hyperframes 0.8.212 → 0.8.214

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 (187) hide show
  1. package/dist/{add-JSM7YBQX.js → add-U2N4ZWNB.js} +12 -12
  2. package/dist/{agentPromptGenerator-NTPYCKOI.js → agentPromptGenerator-EK7NEFV6.js} +7 -7
  3. package/dist/{animatedGifPrep-XTK7UWXF.js → animatedGifPrep-X3FLFGCC.js} +7 -7
  4. package/dist/api.js +17 -17
  5. package/dist/{asset-SMY2EGPH.js → asset-3CSXQ7JI.js} +2 -2
  6. package/dist/{assetCataloger-CVPWY34W.js → assetCataloger-FG2VTSSR.js} +8 -8
  7. package/dist/{audio-Y4OYLTWN.js → audio-US7IUDFM.js} +309 -204
  8. package/dist/{auth-MDEHZR7R.js → auth-IMXNGPGR.js} +1 -1
  9. package/dist/{autoUpdate-3FL6EDPM.js → autoUpdate-IGZP5HIX.js} +2 -2
  10. package/dist/{backgroundChecks-A6TG2BT3.js → backgroundChecks-UGU6SRCU.js} +3 -3
  11. package/dist/backgroundChecksWorker.js +3 -3
  12. package/dist/{batchRender-K2PBRRTQ.js → batchRender-5JS4SAGR.js} +4 -4
  13. package/dist/{beats-RA6XK6J5.js → beats-2F7ZW7QB.js} +10 -10
  14. package/dist/{benchmark-EHU5O4PP.js → benchmark-Y25FBDO7.js} +9 -9
  15. package/dist/{browser-7RUIZT2H.js → browser-43AS35ZL.js} +3 -3
  16. package/dist/{bundleWithLocalizedFonts-O2U2FYY2.js → bundleWithLocalizedFonts-6VHTVRO3.js} +2 -2
  17. package/dist/{capture-77KDKKNK.js → capture-CMP4DHPY.js} +46 -17
  18. package/dist/{capture-JGYBORAG.js → capture-N5AMWY4S.js} +4 -4
  19. package/dist/{captureCompositionFrame-DZ7EHPZV.js → captureCompositionFrame-PQT4GNR2.js} +12 -12
  20. package/dist/{catalog-CUP3SYAI.js → catalog-SZPWUZ75.js} +12 -12
  21. package/dist/{catch-up-ZGUCWH5Q.js → catch-up-OYYHR2UB.js} +4 -4
  22. package/dist/{check-ITGFVBT6.js → check-MBW4AYV6.js} +38 -38
  23. package/dist/{checkAudio-CTLPD6YT.js → checkAudio-DIJNBWAF.js} +28 -13
  24. package/dist/{checkBrowser-G2N4JI6N.js → checkBrowser-NYBDUAT2.js} +32 -32
  25. package/dist/{chunk-VKD23SIO.js → chunk-245CC6JT.js} +1 -1
  26. package/dist/{chunk-UE4CXHMF.js → chunk-3AAAA3KH.js} +3 -3
  27. package/dist/{chunk-3JQ2YOKL.js → chunk-3ZNAP65U.js} +1 -1
  28. package/dist/{chunk-QUXWS5UG.js → chunk-4HMG5CQJ.js} +13 -6
  29. package/dist/{chunk-GVE6I5EL.js → chunk-4NJ57TSE.js} +13 -1
  30. package/dist/{chunk-RDZKBIEB.js → chunk-53ERMOK2.js} +2 -2
  31. package/dist/{chunk-YRO3PXWU.js → chunk-6CGYINE7.js} +97 -2
  32. package/dist/{chunk-V6OSE6VT.js → chunk-6UUPTWUG.js} +1 -1
  33. package/dist/{chunk-YVT5IU6J.js → chunk-7W4DJKZA.js} +9 -9
  34. package/dist/{chunk-DXPC7Z6L.js → chunk-7Y4TTOLE.js} +2 -2
  35. package/dist/{chunk-TPO32Z65.js → chunk-7YUYG6S6.js} +1 -1
  36. package/dist/{chunk-UXH6E5HC.js → chunk-A3ZRV44X.js} +2 -2
  37. package/dist/{chunk-P2VGMOX7.js → chunk-A7UJGIMA.js} +1 -1
  38. package/dist/{chunk-25MKZTRT.js → chunk-BRTWBGFE.js} +1 -1
  39. package/dist/{chunk-WVIH5BBZ.js → chunk-CATLCEDQ.js} +14 -14
  40. package/dist/{chunk-YACECUHX.js → chunk-DFQM3XMK.js} +3 -3
  41. package/dist/{chunk-2YDIEZSF.js → chunk-EJCCJTUH.js} +3 -3
  42. package/dist/{chunk-MX2GMAAW.js → chunk-ENV35BSH.js} +35 -24
  43. package/dist/chunk-FBQVRYMD.js +5061 -0
  44. package/dist/{chunk-7ZAVTGGT.js → chunk-FC6BAQV5.js} +9 -9
  45. package/dist/{chunk-EC77ZBCP.js → chunk-FI3JWR34.js} +1 -1
  46. package/dist/{chunk-UBUKKTNW.js → chunk-FQO3RV6O.js} +2 -2
  47. package/dist/{chunk-YX5ELTKV.js → chunk-G7CFMNRO.js} +2 -2
  48. package/dist/{chunk-BYRXSKIY.js → chunk-GFA5ZCVI.js} +332 -3
  49. package/dist/{chunk-W55BW7KA.js → chunk-GRCS7WRH.js} +10 -10
  50. package/dist/{chunk-RJILJ4OR.js → chunk-GSYZG4E7.js} +2 -2
  51. package/dist/{chunk-DVVTBVKA.js → chunk-GVHEOOGM.js} +8 -8
  52. package/dist/{chunk-J7GPSY5N.js → chunk-HNYTTRLR.js} +7 -7
  53. package/dist/{chunk-UYEZTK4U.js → chunk-HPTFD6MO.js} +10 -10
  54. package/dist/{chunk-T7KNW7PE.js → chunk-HQRI2NT3.js} +1 -1
  55. package/dist/{chunk-BLVHVXRU.js → chunk-HVQDDVN4.js} +3 -3
  56. package/dist/{chunk-N7XJHZ35.js → chunk-I5LDGNYX.js} +1 -1
  57. package/dist/{chunk-GQ724553.js → chunk-ISTUBRV3.js} +4 -4
  58. package/dist/{chunk-U46JEU26.js → chunk-JF3RF6GS.js} +4 -2
  59. package/dist/{chunk-Y3U7ECBH.js → chunk-JMSS47CW.js} +1 -1
  60. package/dist/{chunk-X4SBDDLS.js → chunk-KSC4O2RY.js} +4 -0
  61. package/dist/{chunk-W2VJTKIW.js → chunk-KSV2PMFA.js} +7 -7
  62. package/dist/{chunk-N3J2MLXC.js → chunk-LBS4AS7G.js} +2 -2
  63. package/dist/{chunk-OL5E4Y4L.js → chunk-LIOE46OG.js} +59 -27
  64. package/dist/{chunk-R5B6GXQM.js → chunk-LRYNDYAE.js} +1 -1
  65. package/dist/{chunk-5TQ4AEPF.js → chunk-LWWTOBZ6.js} +3 -3
  66. package/dist/{chunk-ORJY6Z6G.js → chunk-MGUA3DUS.js} +3 -3
  67. package/dist/{chunk-XEWMJWNW.js → chunk-MP7DZH5M.js} +2 -2
  68. package/dist/{chunk-XGXTZNES.js → chunk-MYDM4PQL.js} +3 -3
  69. package/dist/{chunk-RQC4PHO3.js → chunk-MZHYAXUV.js} +1 -1
  70. package/dist/{chunk-JLGVBK5M.js → chunk-N4XNRHFM.js} +18 -4
  71. package/dist/{chunk-NXDKBFEO.js → chunk-PT47MVXR.js} +13 -13
  72. package/dist/{chunk-SXTWQ7CH.js → chunk-QCCPXMKP.js} +5 -5
  73. package/dist/{chunk-MJCIAZSK.js → chunk-QL7ITOPE.js} +1 -1
  74. package/dist/{chunk-AJAXP4HF.js → chunk-S6WDNIUG.js} +1 -1
  75. package/dist/{chunk-3YBXKWAF.js → chunk-T6SMQ4L7.js} +1 -1
  76. package/dist/{chunk-JZNQQI5M.js → chunk-TNKPBI63.js} +5 -5
  77. package/dist/{chunk-ZCYSQ3NQ.js → chunk-TYMD647L.js} +3 -3
  78. package/dist/{chunk-HXZNCXQX.js → chunk-UBDO4EHA.js} +9 -0
  79. package/dist/{chunk-45JN2GIZ.js → chunk-UR6QODTY.js} +1 -1
  80. package/dist/{chunk-PW7FCVHR.js → chunk-URD4QIQS.js} +1 -1
  81. package/dist/{chunk-FW6CYA5D.js → chunk-VAOROEWU.js} +3 -3
  82. package/dist/{chunk-7W7ANGR4.js → chunk-VC6GEQ7P.js} +18 -18
  83. package/dist/{chunk-F5XADOGC.js → chunk-VEWR5HXT.js} +1 -1
  84. package/dist/{chunk-KZZWYIEB.js → chunk-VILE6GFD.js} +1 -1
  85. package/dist/{chunk-CODPTVC2.js → chunk-VW57BBGU.js} +1 -1
  86. package/dist/{chunk-CTZJSMGU.js → chunk-VZBJ5BQF.js} +1 -1
  87. package/dist/{chunk-DS7ANFBV.js → chunk-WJRYQYOM.js} +1 -1
  88. package/dist/{chunk-7Q5TBUC2.js → chunk-XESW4XN7.js} +2 -2
  89. package/dist/{chunk-A2WPZE2R.js → chunk-XM3NMXLX.js} +1 -1
  90. package/dist/{chunk-NGSENR4J.js → chunk-XWMY7FIW.js} +1 -1
  91. package/dist/{chunk-CCLBOLYU.js → chunk-YBNF5ZOC.js} +1 -1
  92. package/dist/{chunk-64XQS7AP.js → chunk-YDHXPY23.js} +1 -1
  93. package/dist/{chunk-6SG3RRAQ.js → chunk-YLEEVMBV.js} +2 -2
  94. package/dist/{chunk-UULZKCBI.js → chunk-YQCDSSIK.js} +1 -1
  95. package/dist/{chunk-SPDSRBIN.js → chunk-ZMKRQ4HE.js} +1 -1
  96. package/dist/{chunk-OSCWTA2O.js → chunk-ZXQNWUDY.js} +5 -5
  97. package/dist/{clean-FBZ7GHRY.js → clean-RDKZTFDC.js} +18 -18
  98. package/dist/cli.js +62 -59
  99. package/dist/{cloud-VYSWJ7UO.js → cloud-2MGM3NSJ.js} +4 -4
  100. package/dist/{cloudrun-U6LI7KLV.js → cloudrun-YQONSO6B.js} +5 -5
  101. package/dist/commands/layout-audit.browser.js +7 -10
  102. package/dist/{compare-YR7BMEHJ.js → compare-HAMCTSXR.js} +29 -29
  103. package/dist/{compiler-6YCAUK7Z.js → compiler-YUM2ODOP.js} +4 -4
  104. package/dist/{component-HVSM6FJV.js → component-2MDTLX6B.js} +3 -3
  105. package/dist/{compositions-QTFL2VNL.js → compositions-EEXADRKF.js} +11 -11
  106. package/dist/{delete-2FHCQ72T.js → delete-X4I63WKN.js} +2 -2
  107. package/dist/{deploy-6S45QWG6.js → deploy-BBGSS4I3.js} +1 -1
  108. package/dist/{deterministicFonts-LKAGUNE5.js → deterministicFonts-2ISM3LMW.js} +1 -1
  109. package/dist/{dist-NCI6JOJZ.js → dist-KXFW5H5Q.js} +4 -2
  110. package/dist/{dist-B4KLCLZ5.js → dist-ZE5X6MWG.js} +17 -3
  111. package/dist/{doctor-4MRS6RED.js → doctor-BNZ6D33R.js} +11 -11
  112. package/dist/{events-4VBBY7PP.js → events-6DI3CND6.js} +2 -2
  113. package/dist/{events-FN45HVPM.js → events-BYOF33UK.js} +5 -3
  114. package/dist/{feedback-T67P2CDA.js → feedback-Z3JOC7TX.js} +8 -8
  115. package/dist/{ffmpeg-ED7ZK6XH.js → ffmpeg-S44OTBCI.js} +7 -7
  116. package/dist/{figma-UXAWKPOY.js → figma-TVX2H5B3.js} +3 -3
  117. package/dist/fontLocalizeCli.js +11 -11
  118. package/dist/{get-EFH3PPJA.js → get-DWKTDVP7.js} +2 -2
  119. package/dist/{gpuPolicy-ZADQMXQT.js → gpuPolicy-GTBFSUHB.js} +7 -7
  120. package/dist/{grade-compare-425BFHSF.js → grade-compare-S4P6Z265.js} +30 -30
  121. package/dist/{heifImagePrep-ZJM7N2XY.js → heifImagePrep-RKQP2Y73.js} +8 -8
  122. package/dist/{help-23PPB2BD.js → help-WIC6DHOF.js} +1 -1
  123. package/dist/{history-CHJV33M5.js → history-UBRUPAHH.js} +6 -6
  124. package/dist/hyperframe.manifest.json +1 -1
  125. package/dist/hyperframe.runtime.iife.js +64 -64
  126. package/dist/hyperframes-player.global.js +1 -1
  127. package/dist/{info-36YPISVA.js → info-F5LTDQ6I.js} +8 -8
  128. package/dist/{init-U6EE2EIU.js → init-6L4WQKOD.js} +27 -27
  129. package/dist/{inspect-NI2RMUFR.js → inspect-DUIBB263.js} +30 -30
  130. package/dist/{installer-K3HIZ5CF.js → installer-JKZ5N47B.js} +5 -5
  131. package/dist/{keyframes-I6T2IT6I.js → keyframes-5FQNFJFE.js} +6 -6
  132. package/dist/{lambda-WL64Z2F3.js → lambda-YTO6N2QH.js} +11 -11
  133. package/dist/{layout-R2YZ4N6P.js → layout-H3F2LW62.js} +30 -30
  134. package/dist/{lint-IAAG6Z65.js → lint-WUWLVCJQ.js} +8 -8
  135. package/dist/{lintProject-EM7Y2ZRB.js → lintProject-SZIPPOJR.js} +2 -2
  136. package/dist/{list-3O6743DJ.js → list-3EFECRWU.js} +2 -2
  137. package/dist/{localPage-L5FRBCNP.js → localPage-C3267GRQ.js} +7 -7
  138. package/dist/{login-27TRFTYB.js → login-W5L64YRM.js} +4 -4
  139. package/dist/{manager-D6TE4ENP.js → manager-46MZB3HK.js} +8 -8
  140. package/dist/{media-treatment-E3YLZVXC.js → media-treatment-XBQWOU5U.js} +15 -15
  141. package/dist/{models-2Q3TGNH5.js → models-ZHNV44XV.js} +11 -11
  142. package/dist/{motionShot-XYW2HMVI.js → motionShot-DO4EQ2U3.js} +15 -15
  143. package/dist/{normalize-audio-D5WNUNDM.js → normalize-audio-2EXTDNBF.js} +10 -10
  144. package/dist/{open-3KO7UUPC.js → open-7ZOY3KI6.js} +12 -12
  145. package/dist/{parakeetRunner-WX6L6MW5.js → parakeetRunner-H3B4QP6W.js} +12 -12
  146. package/dist/{pipeline-WYIO4KGN.js → pipeline-7OKHNKGP.js} +10 -10
  147. package/dist/{play-ZM3ZUJSZ.js → play-B5NNOJN7.js} +21 -21
  148. package/dist/{preflight-7OMCIXNM.js → preflight-R26JZQJU.js} +8 -8
  149. package/dist/{present-E2PLH2GJ.js → present-Y2SEWKGO.js} +17 -17
  150. package/dist/{preview-TVRM75FN.js → preview-7CZX4A5T.js} +18 -18
  151. package/dist/{producer-M5F6KZEF.js → producer-WTO6XYGU.js} +1 -1
  152. package/dist/{projectConfig-VFKGY3XE.js → projectConfig-SJ5NIYUO.js} +7 -7
  153. package/dist/{publication-AF33R7LF.js → publication-47KNSXP7.js} +3 -3
  154. package/dist/{publish-Z7HGDQ5R.js → publish-4J4EKKQN.js} +11 -11
  155. package/dist/{remove-background-PN3KCBT4.js → remove-background-UKC6NKDH.js} +11 -11
  156. package/dist/{render-SEODWRRR.js → render-DBELH4AC.js} +15 -15
  157. package/dist/{render-IZNPEXMU.js → render-S2FJRE3H.js} +6 -6
  158. package/dist/{render-I3HBIJX3.js → render-TABKCTMF.js} +30 -30
  159. package/dist/{render-batch-MQSORY55.js → render-batch-6YJMWHZ4.js} +6 -6
  160. package/dist/renderSetupWorker.js +2 -2
  161. package/dist/{resolver-HXE4F2G4.js → resolver-EDI3JND5.js} +5 -5
  162. package/dist/{sherpa-NPT6S3RP.js → sherpa-R6HDRJCA.js} +11 -11
  163. package/dist/{skills-P3BI55YP.js → skills-2QIW3EOJ.js} +5 -5
  164. package/dist/{skillsUpdateCheck-43Q4ZHWN.js → skillsUpdateCheck-XG5FPCU5.js} +3 -3
  165. package/dist/{snapshot-YLT64YQS.js → snapshot-C5XBKYEF.js} +305 -90
  166. package/dist/{src-7S7K4QUN.js → src-CT2X45TD.js} +10 -10
  167. package/dist/{src-OHJ7USRX.js → src-E467QUBK.js} +10 -6
  168. package/dist/{staticProjectServer-RP3MW2EW.js → staticProjectServer-G54Z4BH7.js} +19 -19
  169. package/dist/studio/assets/{hyperframes-player-DHfuW7Lt.js → hyperframes-player-H1DIJsJZ.js} +1 -1
  170. package/dist/studio/assets/{index-CWgIsKzV.js → index-BftVE_0y.js} +119 -119
  171. package/dist/studio/assets/{index-CkjUY33q.js → index-v_hWj6Kv.js} +1 -1
  172. package/dist/studio/index.html +1 -1
  173. package/dist/{studio-api-BZPZCJL6.js → studio-api-O52RPXZC.js} +11 -11
  174. package/dist/{studioServer-QLRIXNYM.js → studioServer-WDTS6ZDI.js} +50 -50
  175. package/dist/{telemetry-QOBPRUWF.js → telemetry-GEHWCV7C.js} +3 -3
  176. package/dist/{timeline-OLQFVWVU.js → timeline-IVQDNGWZ.js} +19 -19
  177. package/dist/{tokens-BAHLVGEC.js → tokens-EN5PVV3Y.js} +2 -2
  178. package/dist/{transcribe-HR6BFDUR.js → transcribe-HKS3PZAF.js} +10 -10
  179. package/dist/{transcribe-3NHUWW4J.js → transcribe-NXMIBNLX.js} +16 -16
  180. package/dist/{updateCheck-BGHPCA7J.js → updateCheck-35TT5GRF.js} +2 -2
  181. package/dist/{upgrade-NFI6JOME.js → upgrade-G6EOHGUS.js} +2 -2
  182. package/dist/{urlDownloader-P35K74RS.js → urlDownloader-X7V63HCF.js} +6 -6
  183. package/dist/{validate-Q57ZCI4Q.js → validate-4JUCRS64.js} +24 -24
  184. package/dist/{video-OO2M2AKD.js → video-SWQXDG7J.js} +8 -8
  185. package/dist/warmCheck.js +38 -38
  186. package/package.json +1 -1
  187. package/dist/chunk-W5OBRMZ6.js +0 -4870
@@ -25,7 +25,7 @@ import {
25
25
  findFFmpeg,
26
26
  findFFprobe,
27
27
  getFFmpegInstallHint
28
- } from "./chunk-T7KNW7PE.js";
28
+ } from "./chunk-HQRI2NT3.js";
29
29
  import {
30
30
  parseTimeoutMs,
31
31
  pngDimensions,
@@ -34,22 +34,22 @@ import {
34
34
  } from "./chunk-KUXOAS4Z.js";
35
35
  import {
36
36
  captureArtifactRevision
37
- } from "./chunk-UULZKCBI.js";
38
- import "./chunk-64XQS7AP.js";
37
+ } from "./chunk-YQCDSSIK.js";
38
+ import "./chunk-YDHXPY23.js";
39
39
  import "./chunk-X7MTZ4T2.js";
40
40
  import {
41
41
  resolveProject
42
- } from "./chunk-KZZWYIEB.js";
42
+ } from "./chunk-VILE6GFD.js";
43
43
  import {
44
44
  serveStaticProjectHtml
45
- } from "./chunk-DVVTBVKA.js";
46
- import "./chunk-5TQ4AEPF.js";
45
+ } from "./chunk-GVHEOOGM.js";
46
+ import "./chunk-LWWTOBZ6.js";
47
47
  import "./chunk-X7MTZ4T2.js";
48
48
  import "./chunk-XUHOIDKG.js";
49
- import "./chunk-W55BW7KA.js";
50
- import "./chunk-SXTWQ7CH.js";
51
- import "./chunk-CTZJSMGU.js";
52
- import "./chunk-ZCYSQ3NQ.js";
49
+ import "./chunk-GRCS7WRH.js";
50
+ import "./chunk-QCCPXMKP.js";
51
+ import "./chunk-VZBJ5BQF.js";
52
+ import "./chunk-TYMD647L.js";
53
53
  import {
54
54
  artifactDirectory,
55
55
  finishSnapshotRun,
@@ -57,8 +57,8 @@ import {
57
57
  recordArtifacts,
58
58
  retainSnapshotOutput
59
59
  } from "./chunk-24F7TOW2.js";
60
- import "./chunk-FW6CYA5D.js";
61
- import "./chunk-R5B6GXQM.js";
60
+ import "./chunk-VAOROEWU.js";
61
+ import "./chunk-LRYNDYAE.js";
62
62
  import "./chunk-ALVXFXUG.js";
63
63
  import {
64
64
  DEFAULT_ZOOM_SCALE,
@@ -70,35 +70,37 @@ import {
70
70
  runFfmpegOnce,
71
71
  seekCompositionTimelineOnly,
72
72
  settleCompositionSeek
73
- } from "./chunk-7ZAVTGGT.js";
73
+ } from "./chunk-FC6BAQV5.js";
74
74
  import "./chunk-7J6LQ3SQ.js";
75
- import "./chunk-UE4CXHMF.js";
76
- import "./chunk-V6OSE6VT.js";
75
+ import "./chunk-3AAAA3KH.js";
76
+ import "./chunk-6UUPTWUG.js";
77
77
  import "./chunk-5ZBMHUY2.js";
78
78
  import "./chunk-EHSBBBR2.js";
79
- import "./chunk-A2WPZE2R.js";
79
+ import "./chunk-XM3NMXLX.js";
80
80
  import "./chunk-543U46OR.js";
81
- import "./chunk-F5XADOGC.js";
81
+ import "./chunk-VEWR5HXT.js";
82
82
  import "./chunk-XT7X6QCP.js";
83
83
  import "./chunk-5YPMCCCA.js";
84
84
  import "./chunk-HVW7ABXD.js";
85
- import "./chunk-Y3U7ECBH.js";
85
+ import "./chunk-JMSS47CW.js";
86
86
  import {
87
87
  runWithConcurrencyLimit
88
88
  } from "./chunk-JHOCK3DG.js";
89
- import "./chunk-XGXTZNES.js";
90
- import "./chunk-45JN2GIZ.js";
89
+ import "./chunk-MYDM4PQL.js";
90
+ import "./chunk-UR6QODTY.js";
91
91
  import "./chunk-AWDFDFI3.js";
92
92
  import "./chunk-P6LJ4Y32.js";
93
93
  import "./chunk-T2WJO4XM.js";
94
94
  import "./chunk-W4DMQZL5.js";
95
- import "./chunk-RDZKBIEB.js";
95
+ import "./chunk-53ERMOK2.js";
96
96
  import {
97
97
  resolveLocalBrowserGpuMode
98
- } from "./chunk-XEWMJWNW.js";
98
+ } from "./chunk-MP7DZH5M.js";
99
99
  import "./chunk-A4ZTSQLW.js";
100
- import "./chunk-GVE6I5EL.js";
101
- import "./chunk-EC77ZBCP.js";
100
+ import {
101
+ trackSnapshotRun
102
+ } from "./chunk-4NJ57TSE.js";
103
+ import "./chunk-FI3JWR34.js";
102
104
  import "./chunk-EQGKUPBJ.js";
103
105
  import {
104
106
  defineCommand
@@ -118,11 +120,11 @@ import {
118
120
  extractMediaMetadata,
119
121
  isHdrColorSpace,
120
122
  sdrCanvasColourFilters
121
- } from "./chunk-OL5E4Y4L.js";
123
+ } from "./chunk-LIOE46OG.js";
122
124
  import "./chunk-Z5J67X44.js";
123
125
  import "./chunk-5S7W3TUO.js";
124
126
  import "./chunk-D3MUHMFG.js";
125
- import "./chunk-QUXWS5UG.js";
127
+ import "./chunk-4HMG5CQJ.js";
126
128
  import "./chunk-YWRUQ7XZ.js";
127
129
  import {
128
130
  createRuntimeStartTimeResolver,
@@ -131,12 +133,12 @@ import {
131
133
  isClipVisibleAt,
132
134
  isInClipWindow,
133
135
  parseFirstFrameColour
134
- } from "./chunk-BYRXSKIY.js";
136
+ } from "./chunk-GFA5ZCVI.js";
135
137
  import {
136
138
  readElementRateSpec,
137
139
  sourceTimeAt,
138
140
  timeAtSourceTime
139
- } from "./chunk-W5OBRMZ6.js";
141
+ } from "./chunk-FBQVRYMD.js";
140
142
  import "./chunk-VC76R6W2.js";
141
143
  import "./chunk-OFQWTKPW.js";
142
144
  import "./chunk-RQVDTPGD.js";
@@ -156,11 +158,11 @@ import "./chunk-K4MJX7SR.js";
156
158
  import "./chunk-WE42NVH7.js";
157
159
  import {
158
160
  lintProject
159
- } from "./chunk-U46JEU26.js";
161
+ } from "./chunk-JF3RF6GS.js";
160
162
  import "./chunk-CZGHFATT.js";
161
163
  import "./chunk-VAS6HQX3.js";
162
164
  import "./chunk-PBNWRWKA.js";
163
- import "./chunk-X4SBDDLS.js";
165
+ import "./chunk-KSC4O2RY.js";
164
166
  import {
165
167
  topLevelElements,
166
168
  trackKindOf
@@ -176,7 +178,7 @@ import "./chunk-WC4MTXGN.js";
176
178
  import "./chunk-32NEJ553.js";
177
179
  import {
178
180
  withMeta
179
- } from "./chunk-NGSENR4J.js";
181
+ } from "./chunk-XWMY7FIW.js";
180
182
  import "./chunk-K4WIOZFP.js";
181
183
  import "./chunk-ZCHULPJZ.js";
182
184
  import "./chunk-ISN5GRYI.js";
@@ -190,7 +192,7 @@ import {
190
192
  failCommand
191
193
  } from "./chunk-DP5LF7GF.js";
192
194
  import "./chunk-J3RXEDR2.js";
193
- import "./chunk-UXH6E5HC.js";
195
+ import "./chunk-A3ZRV44X.js";
194
196
  import {
195
197
  atStep,
196
198
  normalizeErrorMessage
@@ -294,6 +296,93 @@ function describeSharpLoadFailure(error) {
294
296
  return reason && !reason.startsWith("Possible solutions") ? `${header} (${reason})` : header;
295
297
  }
296
298
 
299
+ // src/commands/snapshotFrameBank.ts
300
+ var slotKey = (path, want) => `${path}\0${want.time.toFixed(6)}\0${want.displayedPixels}\0${want.holdLastFrame}`;
301
+ function groupOverlappingDecodes(frames) {
302
+ const sorted = [...frames].sort((a, b) => a.decodesFrom - b.decodesFrom);
303
+ const groups = [];
304
+ let end = Number.NEGATIVE_INFINITY;
305
+ for (const frame of sorted) {
306
+ if (frame.decodesFrom > end) groups.push([]);
307
+ groups[groups.length - 1].push(frame);
308
+ end = Math.max(end, frame.seek + frame.select);
309
+ }
310
+ return groups;
311
+ }
312
+ function countAsked(path, wants) {
313
+ const asked = /* @__PURE__ */ new Map();
314
+ for (const want of wants) {
315
+ const key = slotKey(path, want);
316
+ asked.set(key, { want, uses: (asked.get(key)?.uses ?? 0) + 1 });
317
+ }
318
+ return asked;
319
+ }
320
+ async function probeFrames(probe, path, wants) {
321
+ try {
322
+ const plans = await Promise.all(
323
+ wants.map((want) => probe(path, want.time, want.holdLastFrame))
324
+ );
325
+ return plans.flatMap(
326
+ (plan, i) => plan?.seek !== void 0 && plan.select !== void 0 ? [
327
+ {
328
+ ...wants[i],
329
+ seek: plan.seek,
330
+ select: plan.select,
331
+ decodesFrom: plan.decodesFrom ?? plan.seek
332
+ }
333
+ ] : []
334
+ );
335
+ } catch {
336
+ return [];
337
+ }
338
+ }
339
+ function passGroups(planned) {
340
+ const sizes = [...new Set(planned.map((frame) => frame.displayedPixels))];
341
+ return sizes.flatMap(
342
+ (size) => groupOverlappingDecodes(planned.filter((frame) => frame.displayedPixels === size))
343
+ );
344
+ }
345
+ function countPass(stats, group) {
346
+ stats.passes += 1;
347
+ stats.frames += group.length;
348
+ if (group.length > 1) stats.sharedFrames += group.length;
349
+ for (const frame of group)
350
+ stats.longestDecodeSeconds = Math.max(
351
+ stats.longestDecodeSeconds,
352
+ frame.seek + frame.select - frame.decodesFrom
353
+ );
354
+ }
355
+ function createFrameBank(deps) {
356
+ const slots = /* @__PURE__ */ new Map();
357
+ const stats = { passes: 0, frames: 0, sharedFrames: 0, longestDecodeSeconds: 0 };
358
+ return {
359
+ stats,
360
+ async plan(path, wants) {
361
+ const asked = countAsked(path, wants);
362
+ const fresh = [...asked].filter(([key]) => !slots.has(key)).map(([, { want }]) => want);
363
+ for (const group of passGroups(await probeFrames(deps.probe, path, fresh))) {
364
+ countPass(stats, group);
365
+ let run;
366
+ const start = () => run ??= deps.decode(path, group).catch(() => void 0);
367
+ for (const [i, frame] of group.entries()) {
368
+ const key = slotKey(path, frame);
369
+ slots.set(key, {
370
+ frame: () => start().then((buffers) => buffers?.[i]),
371
+ uses: asked.get(key)?.uses ?? 1
372
+ });
373
+ }
374
+ }
375
+ },
376
+ /** The planned frame's bytes; undefined, now or once its pass failed, means decode it alone. */
377
+ take(path, want) {
378
+ const key = slotKey(path, want);
379
+ const slot = slots.get(key);
380
+ if (slot && --slot.uses <= 0) slots.delete(key);
381
+ return slot?.frame();
382
+ }
383
+ };
384
+ }
385
+
297
386
  // src/commands/snapshotReview.ts
298
387
  var REVIEW_SETTLE_SEC = 0.3;
299
388
  var REVIEW_MID_GAP_SEC = 0.5;
@@ -599,6 +688,24 @@ function resolveSnapshotVideoRateSpec(input) {
599
688
  };
600
689
  return readElementRateSpec({ getAttribute: (name) => attrs[name] ?? null });
601
690
  }
691
+ function activeVideoAt(candidate, time, compositionDuration) {
692
+ const start = resolveSnapshotVideoClipStart(candidate);
693
+ const playbackRate = resolveSnapshotVideoRateSpec(candidate);
694
+ const duration = candidate.authoredDuration ?? (candidate.srcDuration > 0 ? Math.max(0, timeAtSourceTime(playbackRate, candidate.srcDuration - candidate.mediaStart)) : Number.POSITIVE_INFINITY);
695
+ let relTime = sourceTimeAt(playbackRate, time - start) + candidate.mediaStart;
696
+ if (candidate.loop && candidate.srcDuration > candidate.mediaStart && relTime >= candidate.srcDuration) {
697
+ relTime = candidate.mediaStart + (relTime - candidate.mediaStart) % (candidate.srcDuration - candidate.mediaStart);
698
+ }
699
+ const frameTime = resolveSnapshotVideoFrameTime({
700
+ globalTime: time,
701
+ clipStart: start,
702
+ clipDuration: duration,
703
+ relativeTime: relTime,
704
+ sourceDuration: candidate.srcDuration,
705
+ compositionDuration
706
+ });
707
+ return frameTime === null ? null : { ...candidate, start, playbackRate, duration, relTime: frameTime };
708
+ }
602
709
  function requireSnapshotFfmpeg(ffmpegPath) {
603
710
  if (ffmpegPath) return ffmpegPath;
604
711
  throw new Error(
@@ -703,13 +810,15 @@ async function probeContainingSourceFrameSeek(videoPath, time, holdLastFrame) {
703
810
  const landed = await landing(candidate.pts);
704
811
  if (landed === null) break;
705
812
  if (landed <= 0 || landed > frame) continue;
706
- if (landed < candidate.pts - 1e-6) return { seek: candidate.pts, select: mid - candidate.pts };
813
+ if (landed < candidate.pts - 1e-6)
814
+ return { seek: candidate.pts, select: mid - candidate.pts, decodesFrom: candidate.pts };
707
815
  const again = Math.abs(landed - candidate.pts) < 1e-6 ? landed : await landing(landed);
708
816
  if (again !== null && Math.abs(again - landed) < 1e-6)
709
- return { seek: landed, select: mid - landed };
817
+ return { seek: landed, select: mid - landed, decodesFrom: landed };
710
818
  }
711
819
  const from = timestamps.filter((t) => t > 0 && t <= mid - FALLBACK_SEEK_LEAD_SECONDS).at(-1) ?? 0;
712
- return from > 0 ? { seek: from, select: mid - from } : { select: mid - (timestamps.find((t) => t >= 0) ?? frame) };
820
+ const keyframeBefore = packets.filter((packet) => packet.key && packet.pts <= from).at(-1);
821
+ return from > 0 ? { seek: from, select: mid - from, decodesFrom: keyframeBefore?.pts ?? 0 } : { select: mid - (timestamps.find((t) => t >= 0) ?? frame) };
713
822
  }
714
823
  async function probeSeekLanding(ffmpeg, videoPath, seek) {
715
824
  try {
@@ -745,6 +854,35 @@ function warnNoHdrFiltersOnce() {
745
854
  ` ${c.warn("\u26A0")} A video in this project is HDR, but this ffmpeg has no zscale/tonemap (libzimg), so the still shows it as the browser does and will not match an SDR export. Install an ffmpeg with libzimg.`
746
855
  );
747
856
  }
857
+ async function videoColour(ffmpegPath, videoPath) {
858
+ const metadata = findFFprobe() ? await extractMediaMetadata(videoPath) : null;
859
+ if (!metadata) warnColourUnknownOnce();
860
+ const toneMap = metadata && isHdrColorSpace(metadata.colorSpace) ? hdrToSdrToneMapFilter(
861
+ metadata.colorSpace ?? {},
862
+ parseFirstFrameColour(
863
+ (await runFfmpegOnce(
864
+ ffmpegPath,
865
+ firstFrameColourArgs(videoPath),
866
+ FFMPEG_EXTRACT_TIMEOUT_MS
867
+ )).stderr
868
+ )
869
+ ) : null;
870
+ return { metadata, toneMap };
871
+ }
872
+ function frameFilters(select, displayedPixels, metadata, toneMapFilter) {
873
+ const filters = [];
874
+ if (select !== void 0) filters.push(`select=gte(t-start_t\\,${select})`);
875
+ if (metadata) {
876
+ if (toneMapFilter) filters.push(toneMapFilter);
877
+ filters.push(...sdrCanvasColourFilters(metadata, toneMapFilter !== null));
878
+ }
879
+ if (displayedPixels > 0) {
880
+ filters.push(
881
+ `scale='min(iw,${displayedPixels})':'min(ih,${displayedPixels})':force_original_aspect_ratio=increase`
882
+ );
883
+ }
884
+ return filters;
885
+ }
748
886
  async function extractVideoFrameToBuffer(videoPath, timeSeconds, useVp9AlphaDecoder = false, holdLastFrame = false, displayedPixels = 0) {
749
887
  const tmp = mkdtempSync(join(tmpdir(), "hf-snapshot-frame-"));
750
888
  const outPath = join(tmp, "frame.png");
@@ -756,34 +894,13 @@ async function extractVideoFrameToBuffer(videoPath, timeSeconds, useVp9AlphaDeco
756
894
  holdLastFrame
757
895
  );
758
896
  if (seek === null) return null;
759
- const metadata = findFFprobe() ? await extractMediaMetadata(videoPath) : null;
760
- if (!metadata) warnColourUnknownOnce();
761
- const toneMap = metadata && isHdrColorSpace(metadata.colorSpace) ? hdrToSdrToneMapFilter(
762
- metadata.colorSpace ?? {},
763
- parseFirstFrameColour(
764
- (await runFfmpegOnce(
765
- ffmpegPath,
766
- firstFrameColourArgs(videoPath),
767
- FFMPEG_EXTRACT_TIMEOUT_MS
768
- )).stderr
769
- )
770
- ) : null;
897
+ const { metadata, toneMap } = await videoColour(ffmpegPath, videoPath);
771
898
  const frameArgs = (toneMapFilter) => {
772
899
  const args = ["-hide_banner", "-loglevel", "error"];
773
900
  if (useVp9AlphaDecoder) args.push("-c:v", "libvpx-vp9");
774
901
  if (seek.seek !== void 0) args.push("-ss", String(seek.seek));
775
902
  args.push("-i", videoPath, "-map", "0:v:0");
776
- const filters = [];
777
- if (seek.select !== void 0) filters.push(`select=gte(t-start_t\\,${seek.select})`);
778
- if (metadata) {
779
- if (toneMapFilter) filters.push(toneMapFilter);
780
- filters.push(...sdrCanvasColourFilters(metadata, toneMapFilter !== null));
781
- }
782
- if (displayedPixels > 0) {
783
- filters.push(
784
- `scale='min(iw,${displayedPixels})':'min(ih,${displayedPixels})':force_original_aspect_ratio=increase`
785
- );
786
- }
903
+ const filters = frameFilters(seek.select, displayedPixels, metadata, toneMapFilter);
787
904
  if (filters.length > 0) args.push("-vf", filters.join(","));
788
905
  args.push("-frames:v", "1", "-q:v", "2", "-y", outPath);
789
906
  return args;
@@ -812,9 +929,65 @@ async function extractVideoFrameToBuffer(videoPath, timeSeconds, useVp9AlphaDeco
812
929
  }
813
930
  }
814
931
  }
815
- async function extractVideoFrameOrWarn(warnings, ...args) {
932
+ function selectFirstFrameAfterEach(offsets) {
933
+ const sinceLast = "if(isnan(prev_selected_t)\\,-1\\,prev_selected_t-start_t)";
934
+ const open = offsets.map((offset) => `gte(t-start_t\\,${offset})*gt(${offset}\\,${sinceLast})`);
935
+ return `select=gt(${open.join("+")}\\,0)`;
936
+ }
937
+ async function decodeFramesInOnePass(videoPath, frames, useVp9AlphaDecoder = false) {
938
+ const tmp = mkdtempSync(join(tmpdir(), "hf-snapshot-frames-"));
816
939
  try {
817
- return await extractVideoFrameToBuffer(...args);
940
+ const ffmpegPath = requireSnapshotFfmpeg(findFFmpeg());
941
+ const { metadata, toneMap } = await videoColour(ffmpegPath, videoPath);
942
+ const start = Math.min(...frames.map((frame) => frame.seek));
943
+ const byOffset = /* @__PURE__ */ new Map();
944
+ for (const [index, frame] of frames.entries()) {
945
+ const offset = Number((frame.seek + frame.select - start).toFixed(6));
946
+ byOffset.set(offset, [...byOffset.get(offset) ?? [], index]);
947
+ }
948
+ const byTime = [...byOffset].sort(([a], [b]) => a - b);
949
+ const passArgs = (toneMapFilter) => {
950
+ const rest = frameFilters(void 0, frames[0].displayedPixels, metadata, toneMapFilter);
951
+ const filters = [selectFirstFrameAfterEach(byTime.map(([offset]) => offset)), ...rest];
952
+ const args = ["-hide_banner", "-loglevel", "error"];
953
+ if (useVp9AlphaDecoder) args.push("-c:v", "libvpx-vp9");
954
+ args.push("-ss", String(start), "-i", videoPath, "-map", "0:v:0", "-vf", filters.join(","));
955
+ args.push("-fps_mode", "passthrough", "-frames:v", String(byTime.length));
956
+ args.push("-q:v", "2", "-y", join(tmp, "%d.png"));
957
+ return args;
958
+ };
959
+ const timeoutMs = FFMPEG_EXTRACT_TIMEOUT_MS * frames.length;
960
+ let result = await runFfmpegOnce(ffmpegPath, passArgs(toneMap), timeoutMs);
961
+ if (toneMap && result.code !== 0 && /no such filter/i.test(result.stderr)) {
962
+ warnNoHdrFiltersOnce();
963
+ result = await runFfmpegOnce(ffmpegPath, passArgs(null), timeoutMs);
964
+ }
965
+ const what = `${frames.length} frames of ${videoPath}`;
966
+ if (result.timedOut) {
967
+ throw new FrameExtractError(`FFmpeg timed out after ${timeoutMs / 1e3}s extracting ${what}`);
968
+ }
969
+ const written = (n) => join(tmp, `${n}.png`);
970
+ if (result.code !== 0 || !byTime.every((_, i) => existsSync(written(i + 1)))) {
971
+ throw new FrameExtractError(
972
+ `FFmpeg could not extract ${what}: ${lastLine(result.stderr) || `exit code ${result.code}`}`
973
+ );
974
+ }
975
+ const buffers = [];
976
+ for (const [i, [, indexes]] of byTime.entries()) {
977
+ const png = readFileSync(written(i + 1));
978
+ for (const index of indexes) buffers[index] = png;
979
+ }
980
+ return buffers;
981
+ } finally {
982
+ try {
983
+ rmSync(tmp, { recursive: true, force: true });
984
+ } catch {
985
+ }
986
+ }
987
+ }
988
+ async function frameOrWarn(warnings, frame) {
989
+ try {
990
+ return await frame();
818
991
  } catch (error) {
819
992
  if (!(error instanceof FrameExtractError)) throw error;
820
993
  warnings.push(error.message);
@@ -822,6 +995,9 @@ async function extractVideoFrameOrWarn(warnings, ...args) {
822
995
  return null;
823
996
  }
824
997
  }
998
+ function extractVideoFrameOrWarn(warnings, ...args) {
999
+ return frameOrWarn(warnings, () => extractVideoFrameToBuffer(...args));
1000
+ }
825
1001
  var examples = [
826
1002
  ["Capture 5 key frames from a composition", "snapshot capture"],
827
1003
  ["Capture 10 evenly-spaced frames", "snapshot capture --frames 10"],
@@ -879,8 +1055,9 @@ function serveCapturePage(projectDir, html, proxy) {
879
1055
  return serveStaticProjectHtml(projectDir, html, void 0, [], proxy === true);
880
1056
  }
881
1057
  async function captureSnapshots(projectDir, opts) {
1058
+ const startedAt = performance.now();
882
1059
  const log = opts.log ?? ((message) => console.log(message));
883
- const { bundleWithLocalizedFonts } = await import("./bundleWithLocalizedFonts-O2U2FYY2.js");
1060
+ const { bundleWithLocalizedFonts } = await import("./bundleWithLocalizedFonts-6VHTVRO3.js");
884
1061
  const capture = await captureArtifactRevision(projectDir).catch(warnSnapshotsNotRecorded);
885
1062
  const invocation = randomUUID();
886
1063
  const artifacts = [];
@@ -1007,7 +1184,7 @@ async function captureSnapshots(projectDir, opts) {
1007
1184
  let syncVideoFrameVisibility = null;
1008
1185
  let extractMediaMetadata2 = null;
1009
1186
  try {
1010
- const engine = await import("./src-OHJ7USRX.js");
1187
+ const engine = await import("./src-E467QUBK.js");
1011
1188
  injectVideoFramesBatch = engine.injectVideoFramesBatch;
1012
1189
  syncVideoFrameVisibility = engine.syncVideoFrameVisibility;
1013
1190
  extractMediaMetadata2 = engine.extractMediaMetadata;
@@ -1030,14 +1207,28 @@ async function captureSnapshots(projectDir, opts) {
1030
1207
  if (!hasPlayer) {
1031
1208
  console.warn(` ${c.warn("\u26A0")} No player API \u2014 seeks will be skipped`);
1032
1209
  }
1210
+ const frameBank = createFrameBank({
1211
+ probe: probeContainingSourceFrameSeek,
1212
+ decode: async (path, frames) => decodeFramesInOnePass(
1213
+ path,
1214
+ frames,
1215
+ /^https?:\/\//i.test(path) ? false : await shouldUseVp9AlphaDecoder(path)
1216
+ )
1217
+ });
1218
+ const plannedClips = /* @__PURE__ */ new Set();
1219
+ const loopStartedAt = performance.now();
1220
+ let seekMs = 0;
1221
+ let videoMs = 0;
1033
1222
  for (let i = 0; i < positions.length; i++) {
1034
1223
  const time = positions[i];
1035
1224
  console.error(`[hyperframes] snapshot: frame ${i + 1}/${positions.length} at ${time}s`);
1036
1225
  const seekOptions = { exactTime: true, waitForImagesMs: SCREENSHOT_IMAGE_WAIT_MS };
1226
+ const seekStartedAt = performance.now();
1037
1227
  await atStep(
1038
1228
  `seeking to ${time}s, frame ${i + 1} of ${positions.length}`,
1039
1229
  () => seekCompositionTimelineOnly(page, time, seekOptions)
1040
1230
  );
1231
+ seekMs += performance.now() - seekStartedAt;
1041
1232
  if (cameraExpr) await page.evaluate(cameraExpr);
1042
1233
  if (injectVideoFramesBatch && syncVideoFrameVisibility) {
1043
1234
  const candidates = await page.evaluate(() => {
@@ -1067,34 +1258,17 @@ async function captureSnapshots(projectDir, opts) {
1067
1258
  };
1068
1259
  });
1069
1260
  });
1070
- const compositionDuration = duration;
1071
1261
  let unreadable = 0;
1072
1262
  const active = candidates.flatMap((candidate) => {
1073
- const start = resolveSnapshotVideoClipStart(candidate);
1074
- const playbackRate = resolveSnapshotVideoRateSpec(candidate);
1075
- const duration2 = candidate.authoredDuration ?? (candidate.srcDuration > 0 ? Math.max(
1076
- 0,
1077
- timeAtSourceTime(playbackRate, candidate.srcDuration - candidate.mediaStart)
1078
- ) : Number.POSITIVE_INFINITY);
1079
- let relTime = sourceTimeAt(playbackRate, time - start) + candidate.mediaStart;
1080
- if (candidate.loop && candidate.srcDuration > candidate.mediaStart && relTime >= candidate.srcDuration) {
1081
- relTime = candidate.mediaStart + (relTime - candidate.mediaStart) % (candidate.srcDuration - candidate.mediaStart);
1082
- }
1083
- const frameTime = resolveSnapshotVideoFrameTime({
1084
- globalTime: time,
1085
- clipStart: start,
1086
- clipDuration: duration2,
1087
- relativeTime: relTime,
1088
- sourceDuration: candidate.srcDuration,
1089
- compositionDuration
1090
- });
1091
- if (frameTime === null) return [];
1263
+ const video = activeVideoAt(candidate, time, duration);
1264
+ if (!video) return [];
1092
1265
  if (!candidate.id || !candidate.src) {
1093
1266
  unreadable += 1;
1094
1267
  return [];
1095
1268
  }
1096
- return [{ ...candidate, start, playbackRate, duration: duration2, relTime: frameTime }];
1269
+ return [video];
1097
1270
  });
1271
+ const videoStartedAt = performance.now();
1098
1272
  const extracted = await runWithConcurrencyLimit(
1099
1273
  active,
1100
1274
  VIDEO_FRAME_EXTRACT_CONCURRENCY,
@@ -1116,14 +1290,33 @@ async function captureSnapshots(projectDir, opts) {
1116
1290
  }
1117
1291
  if (!ffmpegInput) return null;
1118
1292
  const useVp9AlphaDecoder = inputIsLocal ? await shouldUseVp9AlphaDecoder(ffmpegInput) : false;
1119
- const png = await extractVideoFrameOrWarn(
1293
+ const displayedPixels = Math.ceil(
1294
+ v.displayedSize * (opts.zoom ? opts.zoomScale ?? DEFAULT_ZOOM_SCALE : v.devicePixelRatio)
1295
+ );
1296
+ const wantAt = (t) => {
1297
+ const shown = activeVideoAt(v, t, duration);
1298
+ if (!shown) return null;
1299
+ const holdLastFrame = shown.srcDuration > 0 && shown.relTime >= shown.srcDuration - 1;
1300
+ return { time: Math.max(0, shown.relTime), displayedPixels, holdLastFrame };
1301
+ };
1302
+ const planKey = `${v.id}\0${ffmpegInput}`;
1303
+ if (!plannedClips.has(planKey)) {
1304
+ plannedClips.add(planKey);
1305
+ await frameBank.plan(
1306
+ ffmpegInput,
1307
+ positions.slice(i).flatMap((t) => wantAt(t) ?? [])
1308
+ );
1309
+ }
1310
+ const want = wantAt(time);
1311
+ const banked = await frameBank.take(ffmpegInput, want);
1312
+ const png = await frameOrWarn(
1120
1313
  warnings,
1121
- ffmpegInput,
1122
- Math.max(0, v.relTime),
1123
- useVp9AlphaDecoder,
1124
- v.srcDuration > 0 && v.relTime >= v.srcDuration - 1,
1125
- Math.ceil(
1126
- v.displayedSize * (opts.zoom ? opts.zoomScale ?? DEFAULT_ZOOM_SCALE : v.devicePixelRatio)
1314
+ async () => banked ?? extractVideoFrameToBuffer(
1315
+ ffmpegInput,
1316
+ want.time,
1317
+ useVp9AlphaDecoder,
1318
+ want.holdLastFrame,
1319
+ want.displayedPixels
1127
1320
  )
1128
1321
  );
1129
1322
  if (!png) return null;
@@ -1153,6 +1346,7 @@ async function captureSnapshots(projectDir, opts) {
1153
1346
  ` ${c.warn("\u26A0")} video frame injection failed at ${time.toFixed(1)}s \u2014 <video> elements will appear black/stale in this snapshot`
1154
1347
  );
1155
1348
  }
1349
+ videoMs += performance.now() - videoStartedAt;
1156
1350
  }
1157
1351
  warnUnsettledImages(await settleCompositionSeek(page, seekOptions), time, warnings);
1158
1352
  await recaptureSnapshotComposite(page);
@@ -1239,6 +1433,23 @@ async function captureSnapshots(projectDir, opts) {
1239
1433
  const rel = relative(projectDir, framePath);
1240
1434
  savedPaths.push(rel.startsWith("..") || isAbsolute(rel) ? framePath : rel);
1241
1435
  }
1436
+ const loopMs = performance.now() - loopStartedAt;
1437
+ const stageMs = {
1438
+ open: loopStartedAt - startedAt,
1439
+ seek: seekMs,
1440
+ video: videoMs,
1441
+ capture: Math.max(0, loopMs - seekMs - videoMs)
1442
+ };
1443
+ trackSnapshotRun({
1444
+ frames: positions.length,
1445
+ videoFrames: frameBank.stats.frames,
1446
+ decodePasses: frameBank.stats.passes,
1447
+ sharedFrames: frameBank.stats.sharedFrames,
1448
+ longestDecodeSeconds: frameBank.stats.longestDecodeSeconds,
1449
+ slowStage: Object.keys(stageMs).reduce(
1450
+ (a, b) => stageMs[b] > stageMs[a] ? b : a
1451
+ )
1452
+ });
1242
1453
  completed = true;
1243
1454
  } finally {
1244
1455
  await chromeBrowser.close();
@@ -1719,15 +1930,18 @@ ${c.error("\u2717")} Snapshot failed: ${msg}`);
1719
1930
  });
1720
1931
  export {
1721
1932
  SNAPSHOT_IMAGE_NAME,
1933
+ activeVideoAt,
1722
1934
  clearEarlierStills,
1723
1935
  clearedNote,
1724
1936
  computeSnapshotTimes,
1725
1937
  containingSourceFrameIndex,
1938
+ decodeFramesInOnePass,
1726
1939
  snapshot_default as default,
1727
1940
  examples,
1728
1941
  extractVideoFrameOrWarn,
1729
1942
  extractVideoFrameToBuffer,
1730
1943
  formatSnapshotTimestamp,
1944
+ frameOrWarn,
1731
1945
  parseZoomScale,
1732
1946
  probeContainingSourceFrameSeek,
1733
1947
  recaptureSnapshotComposite,
@@ -1736,6 +1950,7 @@ export {
1736
1950
  resolveSnapshotVideoClipStart,
1737
1951
  resolveSnapshotVideoFrameTime,
1738
1952
  resolveSnapshotVideoRateSpec,
1953
+ selectFirstFrameAfterEach,
1739
1954
  serveCapturePage,
1740
1955
  snapshotsOnDisk,
1741
1956
  tailFrameTime,