hyperframes 0.8.207 → 0.8.208

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 (212) hide show
  1. package/dist/{add-LXFWHBE3.js → add-XMWRBMBR.js} +14 -13
  2. package/dist/{agentPromptGenerator-D2E62ZP5.js → agentPromptGenerator-4NJ252MR.js} +6 -2
  3. package/dist/{animatedGifPrep-VBPJZKFT.js → animatedGifPrep-6XURJIPV.js} +8 -7
  4. package/dist/api.js +19 -18
  5. package/dist/{asset-JX4RW3GO.js → asset-I5GGEOB2.js} +2 -2
  6. package/dist/{assetCataloger-JKKOPBCF.js → assetCataloger-YBPXUNUP.js} +10 -8
  7. package/dist/{audio-OXQ3L6DW.js → audio-GFJCHH5W.js} +410 -128
  8. package/dist/{auth-JAL7P7ZA.js → auth-QOA55RYR.js} +4 -4
  9. package/dist/{autoUpdate-MRI2AICE.js → autoUpdate-SPS4QPJU.js} +4 -4
  10. package/dist/{backgroundChecks-ORR46PBY.js → backgroundChecks-HRJO7YK7.js} +5 -5
  11. package/dist/backgroundChecksWorker.js +5 -5
  12. package/dist/{batchRender-IFZYPGIW.js → batchRender-FBP3RKUF.js} +5 -4
  13. package/dist/{beats-UDLOEW6U.js → beats-VNGJ7F6W.js} +21 -14
  14. package/dist/{benchmark-VTVDNKSO.js → benchmark-NZ3N3MIV.js} +10 -10
  15. package/dist/{browser-QJC4BL2Y.js → browser-BD5BKRJ5.js} +8 -8
  16. package/dist/{bundleWithLocalizedFonts-Z2JTBNDS.js → bundleWithLocalizedFonts-WXVNPAWD.js} +3 -3
  17. package/dist/{capture-GLM2ACPM.js → capture-CXWXKWS5.js} +62 -36
  18. package/dist/{capture-2P4JERSX.js → capture-LMJ4TQRL.js} +52 -17
  19. package/dist/{captureCompositionFrame-A2A5MGQB.js → captureCompositionFrame-ZKVCRYYU.js} +14 -13
  20. package/dist/{captureFile-RPUEOZO6.js → captureFile-VIVGKFY4.js} +2 -1
  21. package/dist/{catalog-5ZLVUQVJ.js → catalog-WRXQSCAU.js} +14 -13
  22. package/dist/{catch-up-FRMVYJHZ.js → catch-up-MDSPABFC.js} +6 -6
  23. package/dist/{check-WVY7SM7C.js → check-SIBBK5HA.js} +42 -41
  24. package/dist/{checkAudio-PLEQY3SZ.js → checkAudio-QQBR4HR7.js} +12 -11
  25. package/dist/{checkBrowser-XSZUA2DQ.js → checkBrowser-4EBJLLIH.js} +34 -33
  26. package/dist/{chunk-XDMZY3H7.js → chunk-3O2E4Q66.js} +15 -20
  27. package/dist/{chunk-HVOTYAS4.js → chunk-43MW4SY7.js} +2 -2
  28. package/dist/{chunk-TSTONNOD.js → chunk-4F5NRJ6M.js} +2 -2
  29. package/dist/{chunk-JQ32262N.js → chunk-4HT2L6W2.js} +1 -1
  30. package/dist/{chunk-63DP5CB2.js → chunk-4KG3ESVO.js} +4 -4
  31. package/dist/{chunk-LPI7HX4G.js → chunk-4LTBQEPD.js} +2 -2
  32. package/dist/{chunk-C6KE4AFW.js → chunk-56ANHX5U.js} +1 -1
  33. package/dist/{chunk-XULJBZ7K.js → chunk-5HB4JM7H.js} +2 -2
  34. package/dist/{chunk-PL36HK3U.js → chunk-6CWKORZO.js} +3 -3
  35. package/dist/{chunk-ZF3R2IPC.js → chunk-6DSYBW7Z.js} +1 -0
  36. package/dist/{chunk-T4JGFCXU.js → chunk-6JNSYFOH.js} +4 -4
  37. package/dist/{chunk-5PYRU5DT.js → chunk-6N7D2GUV.js} +15 -15
  38. package/dist/{chunk-WL263XM2.js → chunk-6PWQH77E.js} +1 -1
  39. package/dist/{chunk-UAT2UMTP.js → chunk-6WRN4WC6.js} +1 -1
  40. package/dist/{chunk-SXOD5J7T.js → chunk-7CPI2DWL.js} +1 -1
  41. package/dist/{chunk-UYPWH7PH.js → chunk-7PAK7LZ5.js} +11 -11
  42. package/dist/{chunk-YJK6HOL5.js → chunk-B5MPMIKQ.js} +2 -2
  43. package/dist/{chunk-KDHHPJOG.js → chunk-BKDQFOKK.js} +4 -4
  44. package/dist/{chunk-LCCYYTEK.js → chunk-BLCKQPBE.js} +1 -1
  45. package/dist/chunk-BQMAPNDA.js +4830 -0
  46. package/dist/{chunk-QE4WRS3N.js → chunk-CP225S5H.js} +3 -3
  47. package/dist/{chunk-I2TDHVFV.js → chunk-CSWCZA6V.js} +2 -2
  48. package/dist/{chunk-C53ZNJDZ.js → chunk-D2CE2J2A.js} +1 -1
  49. package/dist/{chunk-NSC5A4IR.js → chunk-DHQSDCWD.js} +6 -2
  50. package/dist/chunk-DROFHVQD.js +240 -0
  51. package/dist/{chunk-NHL5CMO2.js → chunk-DXACKQ3F.js} +3 -3
  52. package/dist/{chunk-IK4JY2LI.js → chunk-EGOXYG3M.js} +2 -2
  53. package/dist/{chunk-UKM3JYNB.js → chunk-ENRFKCI6.js} +3 -3
  54. package/dist/{chunk-NWGXTUYS.js → chunk-EQBDKYXR.js} +3 -30
  55. package/dist/{chunk-4UMPIPCQ.js → chunk-ERUQ3S6D.js} +2 -2
  56. package/dist/{chunk-T2EUWCJE.js → chunk-EU7MVORF.js} +13 -1
  57. package/dist/{chunk-CVZO6TFE.js → chunk-EYEEZXLI.js} +11 -11
  58. package/dist/{chunk-ZCJ5EGLU.js → chunk-FC4WT5FX.js} +79 -1
  59. package/dist/{chunk-GXUONASF.js → chunk-FFDYRJBE.js} +24 -1
  60. package/dist/{chunk-NJNC2DQV.js → chunk-G2A6RC5R.js} +52 -9
  61. package/dist/{chunk-HTIUNMTP.js → chunk-GDZA4ALG.js} +8 -2
  62. package/dist/{chunk-H3LQ5X6Q.js → chunk-GEO6THL3.js} +61 -30
  63. package/dist/{chunk-RPZNQV6D.js → chunk-GHSO62LK.js} +2 -2
  64. package/dist/{chunk-P2I4RLJE.js → chunk-HTZJNQYI.js} +1 -1
  65. package/dist/{chunk-XKW4Z7BU.js → chunk-HUKQW4YE.js} +1 -1
  66. package/dist/{chunk-QZ2JQ6O4.js → chunk-HZN7ICAF.js} +3 -3
  67. package/dist/{chunk-DJQZ7DEH.js → chunk-IIJVSCSH.js} +15 -15
  68. package/dist/{chunk-6KCFVLO6.js → chunk-IL2TMC6F.js} +1 -1
  69. package/dist/{chunk-ZYGIDXAK.js → chunk-J67FSI3Q.js} +104 -58
  70. package/dist/{chunk-5KBMYSF2.js → chunk-K4PHB3YQ.js} +7 -2
  71. package/dist/{chunk-HM7SUIQD.js → chunk-KTWGVEN6.js} +3 -3
  72. package/dist/{chunk-6IYIS2U7.js → chunk-LSMFOZ4F.js} +2 -2
  73. package/dist/{chunk-ELP5QZWL.js → chunk-M4QZFUMW.js} +1 -1
  74. package/dist/{chunk-EG3B2VWK.js → chunk-MBGM26P5.js} +16 -21
  75. package/dist/{chunk-LK6KPVX2.js → chunk-MPO25DQW.js} +291 -160
  76. package/dist/{chunk-DML6BD4K.js → chunk-MW2NQQ6Z.js} +2 -2
  77. package/dist/{chunk-MSHL6CF2.js → chunk-MYO77JWR.js} +1 -1
  78. package/dist/{chunk-PSX5SF2N.js → chunk-NEASABW6.js} +1 -1
  79. package/dist/{chunk-VH4PNYOS.js → chunk-NZ6G5YWZ.js} +2 -2
  80. package/dist/{chunk-LXP6XWJL.js → chunk-ORFRUZPB.js} +1 -1
  81. package/dist/{chunk-UUOIH4RW.js → chunk-OTXXDONS.js} +2 -2
  82. package/dist/{chunk-526VSRZ4.js → chunk-P7WGVXR7.js} +6 -6
  83. package/dist/{chunk-HA3V4XAF.js → chunk-PKVA6MPV.js} +1 -1
  84. package/dist/{chunk-QTWXVOZI.js → chunk-PSOAGSNO.js} +2 -2
  85. package/dist/{chunk-ID766OZB.js → chunk-PWEOSJ3E.js} +3 -3
  86. package/dist/{chunk-EHFZEKQM.js → chunk-Q43YUROE.js} +1 -1
  87. package/dist/{chunk-7PJ3AJB2.js → chunk-QP2MJYTJ.js} +1 -1
  88. package/dist/{chunk-7RWUY3BJ.js → chunk-QWBVPWUI.js} +1 -1
  89. package/dist/{chunk-IYZT62UR.js → chunk-S2OLTAEL.js} +2 -2
  90. package/dist/{chunk-U32PA6DI.js → chunk-S4KHJERB.js} +1 -1
  91. package/dist/{chunk-FEO7YW7V.js → chunk-SI7QCT2J.js} +6 -6
  92. package/dist/{chunk-6Z7XDUUJ.js → chunk-SKKQMW5X.js} +1 -1
  93. package/dist/{chunk-VAVDAOUA.js → chunk-TNTGGDSD.js} +1 -1
  94. package/dist/{chunk-EGRIVMCQ.js → chunk-U6KN6OIP.js} +2 -2
  95. package/dist/{chunk-IBZHSU2J.js → chunk-ULL3U6PV.js} +1 -1
  96. package/dist/{chunk-IW5P4KK7.js → chunk-VR3JLTZD.js} +3 -3
  97. package/dist/{chunk-6KOHY5EP.js → chunk-VS4SK7BN.js} +17 -11
  98. package/dist/{chunk-6N65ZMC5.js → chunk-VYRJAQGC.js} +1 -1
  99. package/dist/{chunk-JKE24AG7.js → chunk-WABB4LZS.js} +1 -1
  100. package/dist/{chunk-I3TYUQLB.js → chunk-WNMVC3IT.js} +1 -1
  101. package/dist/{chunk-MAUGXKSI.js → chunk-X6MCIK7L.js} +100 -13
  102. package/dist/chunk-XFMO3BEN.js +71 -0
  103. package/dist/{chunk-PUIG6DHT.js → chunk-XG3IZV62.js} +7 -7
  104. package/dist/{chunk-VBPNCOD7.js → chunk-XOFBXLMG.js} +2 -2
  105. package/dist/{chunk-FVAI7AHF.js → chunk-XUQYC5DD.js} +5 -5
  106. package/dist/chunk-Z5J67X44.js +40 -0
  107. package/dist/{chunk-XAGBSYIQ.js → chunk-Z5TGBEPJ.js} +1 -1
  108. package/dist/{chunk-7JAD4MEW.js → chunk-ZA5TNF4R.js} +1 -0
  109. package/dist/{clean-TL3IPJDN.js → clean-6GX7WAEC.js} +22 -21
  110. package/dist/cli.js +56 -56
  111. package/dist/{cloud-EYMRPJNY.js → cloud-6PFJKLNL.js} +4 -4
  112. package/dist/{cloudrun-TOJ36NLX.js → cloudrun-UGG3ZFH7.js} +6 -5
  113. package/dist/{compare-MP5EOW4D.js → compare-P4EBOP4B.js} +33 -32
  114. package/dist/{compiler-NOPVLJ2S.js → compiler-PG4RKX6K.js} +3 -3
  115. package/dist/{component-ASACDCZK.js → component-SQPMI3W7.js} +3 -3
  116. package/dist/{compositions-WKNZJY34.js → compositions-KRIHY3IY.js} +14 -13
  117. package/dist/{contactSheet-YOBPATEM.js → contactSheet-RYAE7Y5D.js} +3 -2
  118. package/dist/{delete-DQTFHP3G.js → delete-T5TO4SV6.js} +7 -7
  119. package/dist/{deploy-HHCFOUFM.js → deploy-AO6LQR5G.js} +6 -6
  120. package/dist/{dist-NQEYA4ZX.js → dist-23AAB5X2.js} +2 -2
  121. package/dist/{dist-L4Z4ZEYW.js → dist-6IMEDVMC.js} +1 -1
  122. package/dist/docker/Dockerfile.render +1 -1
  123. package/dist/{doctor-JDM65CP7.js → doctor-QBUJQ655.js} +16 -15
  124. package/dist/{events-RKRHRLJD.js → events-J7CESLKQ.js} +4 -4
  125. package/dist/{events-MBRNA3UF.js → events-SIZO7YHI.js} +5 -5
  126. package/dist/{feedback-LZWIWV5J.js → feedback-74WOJ5PN.js} +12 -12
  127. package/dist/{ffmpeg-4PZKSIGE.js → ffmpeg-AKUP6U2S.js} +10 -9
  128. package/dist/{figma-QFNYUT3F.js → figma-GGMYRR4Q.js} +3 -3
  129. package/dist/fontLocalizeCli.js +11 -10
  130. package/dist/{get-2B5ENJOH.js → get-PLKAI6JM.js} +7 -7
  131. package/dist/{gpuPolicy-E5FB2GFR.js → gpuPolicy-EYDAAPJF.js} +8 -7
  132. package/dist/{grade-compare-4GUAPJHE.js → grade-compare-UADJP4AV.js} +33 -32
  133. package/dist/{heifImagePrep-C2RYIEER.js → heifImagePrep-KDF3OPOK.js} +9 -8
  134. package/dist/{help-XGDAXV67.js → help-WSQQ555Q.js} +1 -1
  135. package/dist/{history-WNFF6HGU.js → history-VSQ2DQ3V.js} +9 -9
  136. package/dist/hyperframe.manifest.json +1 -1
  137. package/dist/hyperframe.runtime.iife.js +67 -67
  138. package/dist/hyperframes-player.global.js +3 -3
  139. package/dist/{info-BR2LKGJD.js → info-MOQ4LRC3.js} +9 -9
  140. package/dist/{init-P6UWPUY3.js → init-EONQSZJG.js} +32 -31
  141. package/dist/{inspect-MSRPF7ZO.js → inspect-OLCVLHOU.js} +32 -31
  142. package/dist/{installer-MPUQS3ZX.js → installer-GHISA75B.js} +4 -4
  143. package/dist/{keyframes-J6K66QTO.js → keyframes-DGQYCY24.js} +8 -8
  144. package/dist/{lambda-LJ2OSWFJ.js → lambda-AMMWF2YH.js} +14 -13
  145. package/dist/{layout-CDY65XGA.js → layout-R6CAPGRO.js} +32 -31
  146. package/dist/{lint-CAUNBGPX.js → lint-QZJEYPHD.js} +9 -9
  147. package/dist/{lintProject-ZTSX3AWT.js → lintProject-W3YVHAGP.js} +1 -1
  148. package/dist/{list-33BYQNRZ.js → list-KCJID4SP.js} +7 -7
  149. package/dist/localPage-V3HBGM3Z.js +27 -0
  150. package/dist/{login-5QMRKOHK.js → login-7HKBEPJS.js} +7 -7
  151. package/dist/{logout-JYFWWUGK.js → logout-3IID4KXD.js} +3 -3
  152. package/dist/{manager-3JOHHPVR.js → manager-6YSKJMVD.js} +11 -10
  153. package/dist/{manager-RMYSZ3KI.js → manager-Z7W4GQGF.js} +4 -4
  154. package/dist/{media-treatment-4WP22CFN.js → media-treatment-E3DL6LEZ.js} +25 -22
  155. package/dist/{models-HPWCHAZX.js → models-URWI7YEG.js} +15 -14
  156. package/dist/{motionShot-I7GDIROQ.js → motionShot-27IXMDJK.js} +18 -17
  157. package/dist/{normalize-audio-VTMXPSC7.js → normalize-audio-WGRLPR3P.js} +9 -9
  158. package/dist/{open-SAO7OQTT.js → open-LQ35PLEN.js} +13 -13
  159. package/dist/{parakeetRunner-ZYPBIA73.js → parakeetRunner-XASVIDTI.js} +16 -15
  160. package/dist/{pipeline-VNBMR6QU.js → pipeline-GA7QVCHS.js} +11 -10
  161. package/dist/{play-7VI6A7KN.js → play-RYZP77CI.js} +21 -21
  162. package/dist/{policies-GHVXA5PE.js → policies-PKLD4UW5.js} +1 -1
  163. package/dist/{preflight-VWV7L45J.js → preflight-HJFSJXXF.js} +12 -11
  164. package/dist/{present-CSJGYOFF.js → present-YBMLOWZV.js} +17 -17
  165. package/dist/{preview-B246ZTVO.js → preview-QIRKJCRV.js} +23 -22
  166. package/dist/{producer-WJLFDVQJ.js → producer-524FDOLX.js} +1 -1
  167. package/dist/{projectConfig-OMR46ZWQ.js → projectConfig-IDQN5ZRW.js} +6 -6
  168. package/dist/{publication-AA7NNYET.js → publication-3X3IGSDO.js} +2 -2
  169. package/dist/{publish-TJ4QVVSP.js → publish-2BF7K6HX.js} +13 -13
  170. package/dist/{refresh-USSFPJAU.js → refresh-3IRHJEQA.js} +3 -3
  171. package/dist/{remove-background-LQ2V7W7N.js → remove-background-EZBCEFT6.js} +12 -11
  172. package/dist/{render-E5QJG74D.js → render-EFUA2A6A.js} +6 -5
  173. package/dist/{render-JLTNZ36U.js → render-JFMTAXHD.js} +43 -41
  174. package/dist/{render-AWEEPG3F.js → render-TEEBI2UT.js} +30 -26
  175. package/dist/{render-batch-U4T4VSCM.js → render-batch-XTYNXVSW.js} +7 -6
  176. package/dist/renderSetupWorker.js +6 -6
  177. package/dist/{resolver-GXCTUKPV.js → resolver-FZS6TN6B.js} +4 -4
  178. package/dist/{screenshotCapture-X6OKIXCB.js → screenshotCapture-HOW4VSV6.js} +3 -2
  179. package/dist/{sherpa-4VZWVHWZ.js → sherpa-TQIAIKTH.js} +15 -14
  180. package/dist/skills/hyperframes/SKILL.md +1 -1
  181. package/dist/skills/hyperframes/references/format.md +1 -0
  182. package/dist/skills/hyperframes-cli/references/beats.md +2 -0
  183. package/dist/skills/media-use/references/grading.md +2 -0
  184. package/dist/skills/media-use/references/local.md +1 -0
  185. package/dist/{skills-WUKR7SUE.js → skills-S6ZG5KKH.js} +7 -7
  186. package/dist/{skillsUpdateCheck-YXRBY3JC.js → skillsUpdateCheck-XC7JQL3F.js} +5 -5
  187. package/dist/{snapshot-Q7S2FTNG.js → snapshot-ERYZIM32.js} +66 -47
  188. package/dist/{src-ZOXUSGAP.js → src-6XOMREMS.js} +7 -6
  189. package/dist/{src-CLAALR5W.js → src-OL6RHPE4.js} +10 -9
  190. package/dist/{staticProjectServer-DQ7PIDPA.js → staticProjectServer-JYDDGPAH.js} +16 -16
  191. package/dist/{status-LR7VXITS.js → status-DTP6ZYDU.js} +3 -3
  192. package/dist/studio/assets/{hyperframes-player-Cm5aBiKq.js → hyperframes-player-5dRdMVOq.js} +3 -3
  193. package/dist/studio/assets/{index-BF9YeBnC.js → index-Bu3mJUU2.js} +71 -71
  194. package/dist/studio/assets/{index-BrqAmMRt.js → index-ZqyQ91pm.js} +1 -1
  195. package/dist/studio/index.html +1 -1
  196. package/dist/{studio-api-NUE227JM.js → studio-api-GRU4SHKD.js} +9 -9
  197. package/dist/{studioServer-HVOKP4VI.js → studioServer-OYPBEI5B.js} +54 -53
  198. package/dist/{telemetry-IHU4HL3R.js → telemetry-6BPSGY5W.js} +2 -2
  199. package/dist/{telemetry-2Y5JXLDB.js → telemetry-CPYINR63.js} +5 -5
  200. package/dist/{timeline-WOQGXFRV.js → timeline-RGK5BMPD.js} +23 -22
  201. package/dist/{tokens-T3OHTWUC.js → tokens-EX4BOWRW.js} +2 -2
  202. package/dist/{transcribe-4U74P5TG.js → transcribe-MK367I6A.js} +14 -13
  203. package/dist/{transcribe-JZ3BO546.js → transcribe-RI52JMVW.js} +21 -20
  204. package/dist/{updateCheck-6EUAGAM4.js → updateCheck-BIEJKQI4.js} +4 -4
  205. package/dist/{upgrade-55K6F4MP.js → upgrade-ES3UUI7O.js} +4 -4
  206. package/dist/{urlDownloader-47JMOLNN.js → urlDownloader-XAGYSTAG.js} +7 -6
  207. package/dist/{validate-QBJ3SBS4.js → validate-A6GZHNEI.js} +26 -25
  208. package/dist/{video-3ZAUNAR3.js → video-OEMGR3MN.js} +10 -8
  209. package/dist/warmCheck.js +42 -41
  210. package/package.json +1 -1
  211. package/dist/chunk-BDJIQZN2.js +0 -4830
  212. package/dist/{destroy-SSPAKADI.js → destroy-CGAZIL2C.js} +4 -4
@@ -21,13 +21,13 @@ import {
21
21
  emitWords,
22
22
  getPreparedWavDurationSeconds,
23
23
  prepareWav
24
- } from "./chunk-PL36HK3U.js";
24
+ } from "./chunk-6CWKORZO.js";
25
25
  import {
26
26
  stoppedByCancelSignal
27
- } from "./chunk-6IYIS2U7.js";
27
+ } from "./chunk-LSMFOZ4F.js";
28
28
  import {
29
29
  verifies
30
- } from "./chunk-JQ32262N.js";
30
+ } from "./chunk-4HT2L6W2.js";
31
31
  import {
32
32
  PARAKEET_MODEL_LABEL,
33
33
  SHERPA_ERROR_PREFIX,
@@ -6,14 +6,14 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  resolveProject
9
- } from "./chunk-XAGBSYIQ.js";
9
+ } from "./chunk-Z5TGBEPJ.js";
10
10
  import {
11
11
  DEFAULT_HISTORY_ROOT,
12
12
  HistoryBusyError,
13
13
  MAX_WINDOW_IDLE_MS,
14
14
  openProjectHistory,
15
15
  readProjectHistory
16
- } from "./chunk-XDMZY3H7.js";
16
+ } from "./chunk-3O2E4Q66.js";
17
17
  import {
18
18
  findPreviewServerForProject,
19
19
  studioApiUrl
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  runRenderSetupWorker
9
- } from "./chunk-EHFZEKQM.js";
9
+ } from "./chunk-Q43YUROE.js";
10
10
  import {
11
11
  terminateProcessTree
12
12
  } from "./chunk-KGPLIH7B.js";
@@ -8,7 +8,7 @@ import {
8
8
  flush,
9
9
  shouldTrack,
10
10
  trackEvent
11
- } from "./chunk-QTWXVOZI.js";
11
+ } from "./chunk-PSOAGSNO.js";
12
12
  import {
13
13
  CliRuntimeError
14
14
  } from "./chunk-JVBRJMOP.js";
@@ -20,7 +20,7 @@ import {
20
20
  } from "./chunk-QSFWGZG6.js";
21
21
  import {
22
22
  readConfig
23
- } from "./chunk-PSX5SF2N.js";
23
+ } from "./chunk-NEASABW6.js";
24
24
 
25
25
  // src/utils/feedbackRating.ts
26
26
  var FEEDBACK_RATING_SCALE = 10;
@@ -556,6 +556,10 @@ function trackCheckReport(props) {
556
556
  launch_settle_ms: props.launchSettleMs,
557
557
  seek_loop_ms: props.seekLoopMs,
558
558
  contrast_ms: props.contrastMs,
559
+ grid_ms: props.gridMs,
560
+ craft_ms: props.craftMs,
561
+ overlap_ms: props.overlapMs,
562
+ composition_s: props.durationSec,
559
563
  grid_points: props.gridPoints,
560
564
  contrast_points: props.contrastPoints,
561
565
  ok: props.ok,
@@ -0,0 +1,240 @@
1
+ import { createRequire as __hf_createRequire } from "node:module";
2
+ import { fileURLToPath as __hf_fileURLToPath } from "node:url";
3
+ import { dirname as __hf_dirname } from "node:path";
4
+ var require = __hf_createRequire(import.meta.url);
5
+ var __filename = __hf_fileURLToPath(import.meta.url);
6
+ var __dirname = __hf_dirname(__filename);
7
+ import {
8
+ writeCaptureFileSync
9
+ } from "./chunk-EQBDKYXR.js";
10
+
11
+ // src/capture/localPage.ts
12
+ import {
13
+ createReadStream,
14
+ readdirSync,
15
+ readFileSync,
16
+ realpathSync,
17
+ statSync
18
+ } from "fs";
19
+ import { realpath, stat } from "fs/promises";
20
+ import { createServer } from "http";
21
+ import { basename, dirname, extname, isAbsolute, join, relative, resolve, sep } from "path";
22
+ import { Readable } from "stream";
23
+ import { fileURLToPath, pathToFileURL } from "url";
24
+ var CONTENT_TYPES = {
25
+ ".html": "text/html; charset=utf-8",
26
+ ".htm": "text/html; charset=utf-8",
27
+ ".css": "text/css; charset=utf-8",
28
+ ".js": "text/javascript; charset=utf-8",
29
+ ".mjs": "text/javascript; charset=utf-8",
30
+ ".json": "application/json",
31
+ ".svg": "image/svg+xml",
32
+ ".png": "image/png",
33
+ ".jpg": "image/jpeg",
34
+ ".jpeg": "image/jpeg",
35
+ ".gif": "image/gif",
36
+ ".webp": "image/webp",
37
+ ".avif": "image/avif",
38
+ ".ico": "image/x-icon",
39
+ ".woff": "font/woff",
40
+ ".woff2": "font/woff2",
41
+ ".ttf": "font/ttf",
42
+ ".otf": "font/otf",
43
+ ".mp4": "video/mp4",
44
+ ".webm": "video/webm",
45
+ ".mov": "video/quicktime",
46
+ ".mp3": "audio/mpeg",
47
+ ".wav": "audio/wav",
48
+ ".txt": "text/plain; charset=utf-8"
49
+ };
50
+ var activeSites = /* @__PURE__ */ new Map();
51
+ function localSiteName(entry) {
52
+ const stem = basename(entry, extname(entry));
53
+ const name = stem.toLowerCase() === "index" ? basename(dirname(entry)) : stem;
54
+ return name.toLowerCase().replace(/[^a-z0-9._-]+/g, "-").replace(/^-+|-+$/g, "") || "local";
55
+ }
56
+ function captureSiteName(url) {
57
+ const parsed = new URL(url);
58
+ return activeSites.get(parsed.origin)?.name ?? parsed.hostname.replace(/^www\./, "");
59
+ }
60
+ function isInside(root, path) {
61
+ const rel = relative(root, path);
62
+ return rel === "" || !!rel && !rel.startsWith(`..${sep}`) && rel !== ".." && !isAbsolute(rel);
63
+ }
64
+ function resolveLocalCaptureTarget(target, root) {
65
+ const path = resolve(target.startsWith("file:") ? fileURLToPath(target) : target);
66
+ let entry;
67
+ let directory;
68
+ try {
69
+ entry = realpathSync.native(path);
70
+ directory = realpathSync.native(dirname(path));
71
+ if (statSync(entry).isDirectory()) {
72
+ directory = entry;
73
+ entry = realpathSync.native(join(entry, "index.html"));
74
+ }
75
+ } catch {
76
+ throw new Error(`Local file not found: ${target}`);
77
+ }
78
+ if (!statSync(entry).isFile()) throw new Error(`Local capture target is not a file: ${target}`);
79
+ let rootPath;
80
+ try {
81
+ rootPath = root === void 0 ? directory : realpathSync.native(resolve(root));
82
+ } catch {
83
+ throw new Error(`Local capture root not found: ${root}`);
84
+ }
85
+ if (!statSync(rootPath).isDirectory()) {
86
+ throw new Error(`Local capture root is not a directory: ${root}`);
87
+ }
88
+ if (!isInside(rootPath, entry)) {
89
+ throw new Error(`Local capture target ${entry} is outside the root ${rootPath}`);
90
+ }
91
+ return { root: rootPath, entry, fileUrl: pathToFileURL(entry).href };
92
+ }
93
+ async function servedFile(root, pathname) {
94
+ let decoded;
95
+ try {
96
+ decoded = decodeURIComponent(pathname);
97
+ } catch {
98
+ return null;
99
+ }
100
+ if (decoded.includes("\0")) return null;
101
+ const candidate = resolve(root, `.${decoded}`);
102
+ if (!isInside(root, candidate)) return null;
103
+ try {
104
+ const real = await realpath(candidate);
105
+ if (!isInside(root, real) || !(await stat(real)).isFile()) return null;
106
+ return real;
107
+ } catch {
108
+ return null;
109
+ }
110
+ }
111
+ function contentType(file) {
112
+ return CONTENT_TYPES[extname(file).toLowerCase()] ?? "application/octet-stream";
113
+ }
114
+ function end(response, status) {
115
+ response.writeHead(status, { "Content-Length": 0, Connection: "close" });
116
+ response.end();
117
+ }
118
+ async function startLocalPageServer(target) {
119
+ const sockets = /* @__PURE__ */ new Set();
120
+ const server = createServer((request, response) => {
121
+ void (async () => {
122
+ if (request.method !== "GET" && request.method !== "HEAD") return end(response, 405);
123
+ const pathname = new URL(request.url ?? "/", "http://local").pathname;
124
+ const file = await servedFile(target.root, pathname);
125
+ if (!file) return end(response, 404);
126
+ response.writeHead(200, { "Content-Type": contentType(file), "Cache-Control": "no-store" });
127
+ if (request.method === "HEAD") return response.end();
128
+ const stream = createReadStream(file);
129
+ stream.on("error", () => response.destroy());
130
+ stream.pipe(response);
131
+ })().catch(() => response.destroy());
132
+ });
133
+ server.on("connection", (socket) => {
134
+ sockets.add(socket);
135
+ socket.once("close", () => sockets.delete(socket));
136
+ });
137
+ await new Promise((resolveListen, reject) => {
138
+ server.once("error", reject);
139
+ server.listen(0, "127.0.0.1", resolveListen);
140
+ });
141
+ const address = server.address();
142
+ if (!address || typeof address === "string") throw new Error("Local page server did not bind");
143
+ const origin = `http://127.0.0.1:${address.port}`;
144
+ const entryPath = relative(target.root, target.entry).split(sep).map(encodeURIComponent);
145
+ activeSites.set(origin, { root: target.root, name: localSiteName(target.entry) });
146
+ let closing;
147
+ return {
148
+ origin,
149
+ url: `${origin}/${entryPath.join("/")}`,
150
+ close() {
151
+ closing ??= new Promise((resolveClose) => {
152
+ activeSites.delete(origin);
153
+ server.close(() => resolveClose());
154
+ for (const socket of sockets) socket.destroy();
155
+ });
156
+ return closing;
157
+ }
158
+ };
159
+ }
160
+ async function localResponse(root, pathname, method) {
161
+ if (method !== "GET" && method !== "HEAD") return new Response(null, { status: 405 });
162
+ const file = await servedFile(root, pathname);
163
+ if (!file) return new Response(null, { status: 404 });
164
+ const body = method === "HEAD" ? null : Readable.toWeb(createReadStream(file));
165
+ return new Response(body, { status: 200, headers: { "Content-Type": contentType(file) } });
166
+ }
167
+ function fetchLocalPageUrl(url, init) {
168
+ let parsed;
169
+ try {
170
+ parsed = new URL(url);
171
+ } catch {
172
+ return null;
173
+ }
174
+ const site = activeSites.get(parsed.origin);
175
+ if (site === void 0) return null;
176
+ return localResponse(site.root, parsed.pathname, (init?.method ?? "GET").toUpperCase());
177
+ }
178
+ var TEXT_OUTPUTS = /* @__PURE__ */ new Set([".json", ".md", ".html", ".htm", ".css", ".txt", ".svg", ".js", ""]);
179
+ function localUrlRewriter(origin, root) {
180
+ const escapedOrigin = origin.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
181
+ const pattern = new RegExp(`${escapedOrigin}(?![0-9])(/[^\\s"'<>()\\\\]*)?`, "g");
182
+ return (text) => text.replace(pattern, (_match, path) => {
183
+ const url = new URL(path ?? "/", origin);
184
+ let decoded;
185
+ try {
186
+ decoded = decodeURIComponent(url.pathname);
187
+ } catch {
188
+ decoded = url.pathname;
189
+ }
190
+ return pathToFileURL(join(root, decoded)).href + url.search + url.hash;
191
+ });
192
+ }
193
+ function rewriteStrings(value, rewrite) {
194
+ if (typeof value === "string") return rewrite(value);
195
+ if (Array.isArray(value)) return value.map((item) => rewriteStrings(item, rewrite));
196
+ if (value && typeof value === "object") {
197
+ return Object.fromEntries(
198
+ Object.entries(value).map(([key, item]) => [key, rewriteStrings(item, rewrite)])
199
+ );
200
+ }
201
+ return value;
202
+ }
203
+ function rewriteLocalCaptureOutput(outputDir, rewrite, sourceUrl) {
204
+ const walk = (dir) => {
205
+ let entries;
206
+ try {
207
+ entries = readdirSync(dir, { withFileTypes: true });
208
+ } catch {
209
+ return;
210
+ }
211
+ for (const entry of entries) {
212
+ const path = join(dir, entry.name);
213
+ if (entry.isDirectory()) walk(path);
214
+ else if (entry.isFile() && TEXT_OUTPUTS.has(extname(entry.name).toLowerCase())) {
215
+ const text = readFileSync(path, "utf8");
216
+ const next = rewrite(text);
217
+ if (next !== text) writeCaptureFileSync(path, next, "utf-8");
218
+ }
219
+ }
220
+ };
221
+ walk(outputDir);
222
+ const metaPath = join(outputDir, "meta.json");
223
+ try {
224
+ const meta = JSON.parse(readFileSync(metaPath, "utf8"));
225
+ if (meta && typeof meta === "object" && !Array.isArray(meta)) {
226
+ writeCaptureFileSync(metaPath, JSON.stringify({ ...meta, source: sourceUrl }, null, 2));
227
+ }
228
+ } catch {
229
+ }
230
+ }
231
+
232
+ export {
233
+ captureSiteName,
234
+ resolveLocalCaptureTarget,
235
+ startLocalPageServer,
236
+ fetchLocalPageUrl,
237
+ localUrlRewriter,
238
+ rewriteStrings,
239
+ rewriteLocalCaptureOutput
240
+ };
@@ -6,13 +6,13 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  getMimeType
9
- } from "./chunk-NJNC2DQV.js";
9
+ } from "./chunk-G2A6RC5R.js";
10
10
  import {
11
11
  stripSdrPngColourTags
12
- } from "./chunk-RPZNQV6D.js";
12
+ } from "./chunk-GHSO62LK.js";
13
13
  import {
14
14
  injectTagsAtHeadStart
15
- } from "./chunk-BDJIQZN2.js";
15
+ } from "./chunk-BQMAPNDA.js";
16
16
 
17
17
  // src/utils/compositionServer.ts
18
18
  import { createHash } from "crypto";
@@ -6,10 +6,10 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  detectGpuEncoder
9
- } from "./chunk-LK6KPVX2.js";
9
+ } from "./chunk-MPO25DQW.js";
10
10
  import {
11
11
  runCancellableProcess
12
- } from "./chunk-EHFZEKQM.js";
12
+ } from "./chunk-Q43YUROE.js";
13
13
  import {
14
14
  findFfBinary
15
15
  } from "./chunk-VAS6HQX3.js";
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  readCompositionFps
9
- } from "./chunk-7PJ3AJB2.js";
9
+ } from "./chunk-QP2MJYTJ.js";
10
10
  import {
11
11
  errorBox
12
12
  } from "./chunk-K2FLNJVB.js";
@@ -16,10 +16,10 @@ import {
16
16
  import {
17
17
  DEFAULT_CONFIG,
18
18
  resolvePageNavigationTimeout
19
- } from "./chunk-LK6KPVX2.js";
19
+ } from "./chunk-MPO25DQW.js";
20
20
  import {
21
21
  parseFps
22
- } from "./chunk-7RWUY3BJ.js";
22
+ } from "./chunk-QWBVPWUI.js";
23
23
 
24
24
  // src/browser/windowsCrash.ts
25
25
  var STATUS_STACK_BUFFER_OVERRUN_DEC = "3221225595";
@@ -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
+ removeTreeBestEffort
9
+ } from "./chunk-Z5J67X44.js";
7
10
 
8
11
  // src/capture/captureFile.ts
9
12
  import { mkdirSync, mkdtempSync, realpathSync, renameSync, statSync, writeFileSync } from "fs";
@@ -27,35 +30,6 @@ var CaptureDirRefusedError = class extends Error {
27
30
  }
28
31
  };
29
32
 
30
- // ../core/dist/removeTree.js
31
- import { rmSync } from "fs";
32
- import { rm } from "fs/promises";
33
- var RETRY = { recursive: true, force: true, maxRetries: 10, retryDelay: 100 };
34
- function refusal(path, error) {
35
- const reason = error instanceof Error ? error.message : String(error);
36
- return `[cleanup] could not remove ${path}: ${reason}`;
37
- }
38
- function removeTreeWithRetry(path, remove = rmSync) {
39
- remove(path, RETRY);
40
- }
41
- async function removeTreeWithRetryAsync(path, remove = rm) {
42
- await remove(path, RETRY);
43
- }
44
- function removeTreeBestEffort(path, options = {}) {
45
- try {
46
- removeTreeWithRetry(path, options.remove);
47
- } catch (error) {
48
- (options.warn ?? console.warn)(refusal(path, error));
49
- }
50
- }
51
- async function removeTreeBestEffortAsync(path, options = {}) {
52
- try {
53
- await removeTreeWithRetryAsync(path, options.remove);
54
- } catch (error) {
55
- (options.warn ?? console.warn)(refusal(path, error));
56
- }
57
- }
58
-
59
33
  // src/capture/captureFile.ts
60
34
  function publishCaptureFileSync(path, data, options) {
61
35
  const stagingDir = mkdtempSync(join(dirname(path), ".capture-"));
@@ -120,7 +94,6 @@ function ensureCaptureDirSync(root, dir) {
120
94
  export {
121
95
  NavigationDeadlineError,
122
96
  CaptureDirRefusedError,
123
- removeTreeBestEffortAsync,
124
97
  writeCaptureFileSync,
125
98
  ensureCaptureDirSync
126
99
  };
@@ -47,11 +47,11 @@ function compareBrowserVersionsDescending(left, right) {
47
47
  }
48
48
  var starts = /* @__PURE__ */ new Map();
49
49
  var debug = debuglog("hyperframes:browser");
50
- function shellStarts(binary) {
50
+ function shellStarts(binary, timeoutMs = 1e4) {
51
51
  let answer = starts.get(binary);
52
52
  if (answer === void 0) {
53
53
  const probe = ["--no-sandbox", "--dump-dom", "about:blank"];
54
- answer = spawnSync(binary, probe, { stdio: "ignore", timeout: 1e4 })?.status === 0;
54
+ answer = spawnSync(binary, probe, { stdio: "ignore", timeout: timeoutMs, killSignal: "SIGKILL" })?.status === 0;
55
55
  if (!answer) debug("skipping %s: it did not start", binary);
56
56
  starts.set(binary, answer);
57
57
  }
@@ -23,7 +23,19 @@ function normalizeErrorMessage(error) {
23
23
  }
24
24
  return String(error ?? "unknown error");
25
25
  }
26
+ var PROTOCOL_TIMEOUT_ADVICE = / Increase the 'protocolTimeout' setting in launch\/connect calls[^.]*\./;
27
+ async function atStep(step, run) {
28
+ try {
29
+ return await run();
30
+ } catch (error) {
31
+ if (error instanceof Error && !error.message.includes(` (while ${step})`)) {
32
+ error.message = error.message.replace(PROTOCOL_TIMEOUT_ADVICE, "") + ` (while ${step})`;
33
+ }
34
+ throw error;
35
+ }
36
+ }
26
37
 
27
38
  export {
28
- normalizeErrorMessage
39
+ normalizeErrorMessage,
40
+ atStep
29
41
  };
@@ -9,27 +9,27 @@ import {
9
9
  } from "./chunk-TQBQYO4L.js";
10
10
  import {
11
11
  resolveProject
12
- } from "./chunk-XAGBSYIQ.js";
12
+ } from "./chunk-Z5TGBEPJ.js";
13
13
  import {
14
14
  serveStaticProjectHtml
15
- } from "./chunk-526VSRZ4.js";
15
+ } from "./chunk-P7WGVXR7.js";
16
16
  import {
17
17
  AUDIT_SEEK_OPTIONS,
18
18
  installPageFunctionGuard,
19
19
  seekCompositionTimeline,
20
20
  waitForCompositionFonts,
21
21
  waitForRuntimeReady
22
- } from "./chunk-UYPWH7PH.js";
22
+ } from "./chunk-7PAK7LZ5.js";
23
23
  import {
24
24
  launchManagedBrowser,
25
25
  resolveManagedGpuMode
26
- } from "./chunk-MAUGXKSI.js";
26
+ } from "./chunk-X6MCIK7L.js";
27
27
  import {
28
28
  gotoWhenSent
29
29
  } from "./chunk-MOEGCMKI.js";
30
30
  import {
31
31
  pageNavigationTimeoutMs
32
- } from "./chunk-UKM3JYNB.js";
32
+ } from "./chunk-ENRFKCI6.js";
33
33
  import {
34
34
  defineCommand
35
35
  } from "./chunk-S3S4TGEH.js";
@@ -43,10 +43,10 @@ import {
43
43
  import {
44
44
  printDeprecationNotice,
45
45
  withMeta
46
- } from "./chunk-EGRIVMCQ.js";
46
+ } from "./chunk-U6KN6OIP.js";
47
47
  import {
48
48
  normalizeErrorMessage
49
- } from "./chunk-T2EUWCJE.js";
49
+ } from "./chunk-EU7MVORF.js";
50
50
 
51
51
  // src/commands/layout.ts
52
52
  import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
@@ -690,7 +690,7 @@ async function collectTweenBoundaries(page) {
690
690
  });
691
691
  }
692
692
  async function bundleProjectHtml(projectDir) {
693
- const { bundleToSingleHtml } = await import("./compiler-NOPVLJ2S.js");
693
+ const { bundleToSingleHtml } = await import("./compiler-PG4RKX6K.js");
694
694
  return bundleToSingleHtml(projectDir);
695
695
  }
696
696
  async function alignViewportToComposition(page, url) {
@@ -707,15 +707,15 @@ async function alignViewportToComposition(page, url) {
707
707
  await gotoWhenSent(page, url, pageNavigationTimeoutMs());
708
708
  }
709
709
  async function runLayoutAudit(projectDir, opts) {
710
- const { ensureBrowser } = await import("./manager-RMYSZ3KI.js");
710
+ const { ensureBrowser } = await import("./manager-Z7W4GQGF.js");
711
711
  const puppeteer = await import("puppeteer-core");
712
- const { buildChromeArgs } = await import("./src-ZOXUSGAP.js");
712
+ const { buildChromeArgs } = await import("./src-6XOMREMS.js");
713
713
  const {
714
714
  assertWebGpuAdapterAvailable,
715
715
  compositionRequiresWebGpu,
716
716
  resolveLocalBrowserGpuMode,
717
717
  resolveLocalWebGpu
718
- } = await import("./gpuPolicy-E5FB2GFR.js");
718
+ } = await import("./gpuPolicy-EYDAAPJF.js");
719
719
  const html = await bundleProjectHtml(projectDir);
720
720
  const server = await serveStaticProjectHtml(
721
721
  projectDir,
@@ -7965,6 +7965,23 @@ ${allInlineStyles}`.replace(/\/\*[\s\S]*?\*\//g, "");
7965
7965
  snippet: truncateSnippet(rootTag.raw)
7966
7966
  }
7967
7967
  ];
7968
+ },
7969
+ // subcomposition_linked_style_names_root_id
7970
+ // The compiler flattens a sub-composition root into its host and rewrites inline <style>
7971
+ // selectors to match; a linked stylesheet is not rewritten, so `#root-id` in it matches nothing.
7972
+ ({ styles, rootTag, options }) => {
7973
+ if (!options.isSubComposition || !rootTag) return [];
7974
+ const rootId = readAttr(rootTag.raw, "id");
7975
+ if (!rootId) return [];
7976
+ const escaped = rootId.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
7977
+ const names = new RegExp(`#${escaped}(?![\\w-])`);
7978
+ return styles.filter((style) => style.index === -1 && names.test(stripCssComments(style.content))).map((style) => ({
7979
+ code: "subcomposition_linked_style_names_root_id",
7980
+ severity: "warning",
7981
+ message: `The linked stylesheet "${style.rootRelativePath ?? style.file}" has a rule on #${rootId}, the id of this sub-composition's root. The root is merged into its host when the composition is compiled, so that selector matches nothing (the same rule in an inline <style> is rewritten and works).`,
7982
+ fixHint: `Move the #${rootId} rules into a <style> inside the <template>, where they are rewritten for the merged root, or select a child element of the root in the linked file instead of the root itself.`,
7983
+ snippet: truncateSnippet(style.content.slice(0, 120))
7984
+ }));
7968
7985
  }
7969
7986
  ];
7970
7987
  var CLIP_MEDIA_TAGS = /* @__PURE__ */ new Set(["img", "video", "audio"]);
@@ -10687,6 +10704,66 @@ var shaderRules = [
10687
10704
  }));
10688
10705
  })
10689
10706
  ];
10707
+ var URL_ATTRS = ["src", "href", "poster", "xlink:href"];
10708
+ var ROOT_PATH = /^\/(?!\/)/;
10709
+ var CSS_ROOT_URL = /\burl\(\s*["']?(\/(?!\/)[^"')\s]*)/g;
10710
+ var SCRIPT_ROOT_URL = /\b(?:fetch|new\s+URL)\(\s*(["'`])(\/(?!\/)[^"'`$]*)\1/g;
10711
+ function relativeForm(path, cssFile) {
10712
+ const depth = (cssFile ?? "").split("/").filter(Boolean).length - 1;
10713
+ return `${"../".repeat(Math.max(depth, 0))}${path.slice(1)}`;
10714
+ }
10715
+ function rootPathFinding(path, cssFile, snippet) {
10716
+ return {
10717
+ code: "root_path_missing_in_preview",
10718
+ severity: "warning",
10719
+ message: `"${path}" starts at the server's root. Render and snapshot serve the project there, but Studio's preview serves it under the project's own path, so the preview cannot find this file.`,
10720
+ fixHint: `Use "${relativeForm(path, cssFile)}" instead.`,
10721
+ snippet: truncateSnippet(snippet)
10722
+ };
10723
+ }
10724
+ function cssRootPaths(css, cssFile) {
10725
+ return [...css.matchAll(CSS_ROOT_URL)].map(
10726
+ (match) => rootPathFinding(match[1] ?? "", cssFile, match[0])
10727
+ );
10728
+ }
10729
+ function tagRootPaths(tag) {
10730
+ if (tag.name === "a" || tag.name === "base") return [];
10731
+ const paths = URL_ATTRS.map((attr) => readAttr(tag.raw, attr)?.trim() ?? "").filter(
10732
+ (value) => ROOT_PATH.test(value)
10733
+ );
10734
+ return [
10735
+ ...paths.map((path) => rootPathFinding(path, void 0, tag.raw)),
10736
+ ...cssRootPaths(readAttr(tag.raw, "style") ?? "")
10737
+ ];
10738
+ }
10739
+ var scriptRootPaths = (script) => [...script.matchAll(SCRIPT_ROOT_URL)].map(
10740
+ (match) => rootPathFinding(match[2] ?? "", void 0, match[0])
10741
+ );
10742
+ function invalidImportMap(script) {
10743
+ if (!/\btype\s*=\s*["']?importmap\b/i.test(script.attrs)) return [];
10744
+ try {
10745
+ JSON.parse(script.content);
10746
+ return [];
10747
+ } catch (error) {
10748
+ return [
10749
+ {
10750
+ code: "import_map_invalid",
10751
+ severity: "warning",
10752
+ message: `This import map is not valid JSON (${error instanceof Error ? error.message : String(error)}). The browser ignores it, and preview cannot map root module paths ("/assets/x.js") to the project.`,
10753
+ fixHint: "Make the import map valid JSON: double-quoted keys and values, no trailing commas.",
10754
+ snippet: truncateSnippet(script.content)
10755
+ }
10756
+ ];
10757
+ }
10758
+ }
10759
+ var rootPathRules = [
10760
+ (ctx) => [
10761
+ ...ctx.tags.flatMap(tagRootPaths),
10762
+ ...ctx.styles.flatMap((style) => cssRootPaths(style.content, style.rootRelativePath)),
10763
+ ...ctx.scripts.flatMap((script) => scriptRootPaths(script.content)),
10764
+ ...ctx.scripts.flatMap(invalidImportMap)
10765
+ ]
10766
+ ];
10690
10767
  var RULE_GROUPS = [
10691
10768
  { group: "core", rules: coreRules },
10692
10769
  { group: "media", rules: mediaRules },
@@ -10698,7 +10775,8 @@ var RULE_GROUPS = [
10698
10775
  { group: "fonts", rules: fontRules },
10699
10776
  { group: "slideshow", rules: slideshowRules },
10700
10777
  { group: "structure", rules: structureRules },
10701
- { group: "shaders", rules: shaderRules }
10778
+ { group: "shaders", rules: shaderRules },
10779
+ { group: "rootPaths", rules: rootPathRules }
10702
10780
  ];
10703
10781
  var LINT_RULE_COUNT = RULE_GROUPS.reduce((n, g) => n + g.rules.length, 0);
10704
10782
  var LINT_RULE_GROUP_COUNTS = Object.fromEntries(
@@ -178,9 +178,32 @@ async function withProjectLock(projectDir, command, run, context = readToolConte
178
178
  }
179
179
  }
180
180
 
181
+ // src/utils/timeoutArg.ts
182
+ var UNIT_MS = { ms: 1, s: 1e3, m: 6e4 };
183
+ function parseTimeoutMs(raw, fallback, floorMs = 0, warn = console.error) {
184
+ if (raw === void 0 || raw === null || raw === "") return fallback;
185
+ const text = String(raw).trim();
186
+ const match = /^(\d+(?:\.\d+)?)\s*(ms|s|m)?$/i.exec(text);
187
+ if (!match) {
188
+ warn(`[hyperframes] --timeout "${text}" is not a duration; using ${fallback} ms.`);
189
+ return fallback;
190
+ }
191
+ const unit = match[2]?.toLowerCase();
192
+ const ms = Math.round(Number(match[1]) * UNIT_MS[unit ?? "ms"]);
193
+ if (ms <= 0) return fallback;
194
+ const used = Math.max(ms, floorMs);
195
+ if (!unit && ms < 1e3) {
196
+ warn(
197
+ `[hyperframes] --timeout ${text} is ${ms} ms, so ${used} ms is used. Write ${text}s for seconds.`
198
+ );
199
+ }
200
+ return used;
201
+ }
202
+
181
203
  export {
182
204
  pngDimensions,
183
205
  readToolContext,
184
206
  reportArtifacts,
185
- withProjectLock
207
+ withProjectLock,
208
+ parseTimeoutMs
186
209
  };