hyperframes 0.8.143 → 0.8.145

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 (202) hide show
  1. package/README.md +3 -2
  2. package/dist/{add-Q5EYDUAY.js → add-B6OUH46W.js} +12 -12
  3. package/dist/{animatedGifPrep-H2DUQEZ3.js → animatedGifPrep-MIWRDJIO.js} +7 -7
  4. package/dist/{asset-C7JBYYX4.js → asset-XJ2B2PU3.js} +2 -2
  5. package/dist/{assetCataloger-FRO4G6OU.js → assetCataloger-A5ZLSCMZ.js} +3 -3
  6. package/dist/{auth-FRWLCO36.js → auth-5HOVCZMV.js} +1 -1
  7. package/dist/{autoUpdate-E4OZXQK6.js → autoUpdate-WVNL5K3D.js} +2 -2
  8. package/dist/{backgroundChecks-FSUVHN5L.js → backgroundChecks-IGF54SFH.js} +3 -3
  9. package/dist/backgroundChecksWorker.js +3 -3
  10. package/dist/{batchRender-4U73BYTU.js → batchRender-T6JEGCQV.js} +4 -4
  11. package/dist/{beats-U6KJWF35.js → beats-37T6Y6QP.js} +13 -13
  12. package/dist/{benchmark-5ONT7V7B.js → benchmark-ZVVLOWPP.js} +9 -9
  13. package/dist/{browser-R4DU46IE.js → browser-4SSJOLH4.js} +39 -55
  14. package/dist/{bundleWithLocalizedFonts-VH55VOAL.js → bundleWithLocalizedFonts-XWK423QP.js} +2 -2
  15. package/dist/{capture-OGQAEYKO.js → capture-2SF7YP57.js} +2 -2
  16. package/dist/{capture-26G2DPSI.js → capture-KZXOPBMO.js} +18 -18
  17. package/dist/{catalog-RKORTIUE.js → catalog-NLD4A2C6.js} +12 -12
  18. package/dist/{catch-up-4OBERRQO.js → catch-up-4BSRN6IR.js} +4 -4
  19. package/dist/{check-P2XDN57S.js → check-IA44QQWM.js} +66 -55
  20. package/dist/{checkBrowser-NTGJGAEA.js → checkBrowser-VM35KZMW.js} +81 -30
  21. package/dist/{chunk-LVX6NK36.js → chunk-3IBMBNYY.js} +1 -1
  22. package/dist/{chunk-6XMFEICO.js → chunk-3KU3PFDW.js} +77 -92
  23. package/dist/{chunk-PJU63L6W.js → chunk-4ORLNTET.js} +1 -1
  24. package/dist/{chunk-DF2BHILQ.js → chunk-4QWD6JYN.js} +3 -3
  25. package/dist/{chunk-BT27OYYX.js → chunk-5NRXZGKK.js} +18 -12
  26. package/dist/{chunk-UM2GRYM3.js → chunk-5WVW7P23.js} +3 -3
  27. package/dist/{chunk-I7QGQAZM.js → chunk-6LGNTUZN.js} +7 -7
  28. package/dist/{chunk-LAOCA3MQ.js → chunk-A4Q7W4LV.js} +13 -8
  29. package/dist/{chunk-4PFZPP2N.js → chunk-A6S35NYA.js} +54 -16
  30. package/dist/{chunk-QRKLPWEX.js → chunk-ADF3X6GM.js} +11 -2
  31. package/dist/chunk-AUWHD7RA.js +3753 -0
  32. package/dist/{chunk-W35EKBS6.js → chunk-BFACGEII.js} +2 -2
  33. package/dist/{chunk-HW4AKJ5F.js → chunk-BIAC7IJT.js} +1 -1
  34. package/dist/{chunk-ZLW2V65P.js → chunk-BSQ7XANM.js} +3 -2
  35. package/dist/{chunk-LCSMOLGX.js → chunk-BYSBRF24.js} +69 -8
  36. package/dist/{chunk-2LBBHMKT.js → chunk-CFUXNBWH.js} +1 -1
  37. package/dist/{chunk-BFDJ63J5.js → chunk-DDIVWXN7.js} +1 -1
  38. package/dist/{chunk-KOEWEFHK.js → chunk-DIRJ322I.js} +10 -5
  39. package/dist/{chunk-FVYXDXEV.js → chunk-DWUKJQTO.js} +2 -2
  40. package/dist/{chunk-POLR33RB.js → chunk-EPE2HRJK.js} +15 -17
  41. package/dist/{chunk-UICWP23D.js → chunk-FBCULCAL.js} +3 -3
  42. package/dist/{chunk-F26LCYRY.js → chunk-FDT6KQV4.js} +142 -81
  43. package/dist/{chunk-P7THMINS.js → chunk-FXJJCPPB.js} +1 -1
  44. package/dist/{chunk-BYK73CR7.js → chunk-GBGJ7A3D.js} +5 -5
  45. package/dist/{sherpa-LVIUEAGF.js → chunk-GEMJYBRU.js} +11 -45
  46. package/dist/{chunk-KO5QBV73.js → chunk-GMAJB2P6.js} +1 -1
  47. package/dist/{chunk-KQLGTGE5.js → chunk-GRY3PN3K.js} +2 -2
  48. package/dist/{chunk-7UYBQ6NF.js → chunk-GXJEGZL2.js} +30 -20
  49. package/dist/{chunk-KJJLA674.js → chunk-GZVP4TWN.js} +1 -46
  50. package/dist/{chunk-QVYVUCWD.js → chunk-HB7FJOY4.js} +1 -1
  51. package/dist/{chunk-QFN7NVWM.js → chunk-ICKDMTLA.js} +1 -1
  52. package/dist/{chunk-XONFUK3M.js → chunk-IEIJRMLZ.js} +47 -35
  53. package/dist/{chunk-PAGIICKN.js → chunk-IHTRYDFN.js} +1 -1
  54. package/dist/chunk-IR35BCLK.js +13 -0
  55. package/dist/{chunk-KDPYVTEU.js → chunk-KBB4RG6F.js} +6 -1
  56. package/dist/{chunk-ZQQ3SEIE.js → chunk-KIFHYXPB.js} +99 -31
  57. package/dist/{chunk-TAMQYQGJ.js → chunk-LAFJSYDL.js} +1 -1
  58. package/dist/{chunk-U3X3TPBW.js → chunk-MAYCCGMQ.js} +11 -2
  59. package/dist/{chunk-HC7EVDEL.js → chunk-OB5MJR4W.js} +1 -1
  60. package/dist/{chunk-N3DQEVSI.js → chunk-OTHDVXOJ.js} +8 -5
  61. package/dist/{chunk-Y6QL2LGO.js → chunk-PLR7Z6TC.js} +1 -1
  62. package/dist/{chunk-OBXQRJWQ.js → chunk-QATWIE4K.js} +1 -1
  63. package/dist/{chunk-HLYOEIWM.js → chunk-QLSM7K5S.js} +2 -2
  64. package/dist/{chunk-LW6HO6U3.js → chunk-R42WWQVB.js} +1 -1
  65. package/dist/{chunk-HMT2RPZU.js → chunk-U5QY7KTN.js} +13 -9
  66. package/dist/chunk-UPFUC4DB.js +136 -0
  67. package/dist/{chunk-33RZPZ4K.js → chunk-UXO2L7HJ.js} +366 -156
  68. package/dist/{chunk-GNBGPUJ7.js → chunk-VHFEMFYL.js} +3 -3
  69. package/dist/{chunk-4M4EC7JX.js → chunk-VRW6EBHV.js} +12 -1
  70. package/dist/{chunk-VIVBA6E6.js → chunk-XBX4QJP7.js} +1 -1
  71. package/dist/{chunk-CLOH4LIB.js → chunk-XIHCMVMG.js} +2 -2
  72. package/dist/{chunk-TVCRUG2S.js → chunk-ZEUONDQG.js} +1 -1
  73. package/dist/{chunk-OSSHSIMD.js → chunk-ZF7SXQJ7.js} +1 -1
  74. package/dist/{chunk-5FISWJ37.js → chunk-ZIYZ77MR.js} +4 -4
  75. package/dist/{chunk-3NE7ZYU2.js → chunk-ZSVUAVMT.js} +3 -3
  76. package/dist/{clean-YHGPY33K.js → clean-RDKJB5FK.js} +18 -18
  77. package/dist/cli.js +68 -56
  78. package/dist/{cloud-DOFI5ISR.js → cloud-QVPVVNCW.js} +4 -4
  79. package/dist/{cloudrun-KTZ4XDHL.js → cloudrun-3RE2UCQG.js} +4 -4
  80. package/dist/{compare-SMMIZN2C.js → compare-LEDOY7MO.js} +25 -25
  81. package/dist/{compiler-TEXQWW6N.js → compiler-F54OZZPM.js} +10 -4
  82. package/dist/{component-B3GCNGSS.js → component-N42M67WY.js} +3 -3
  83. package/dist/{compositions-OQNZZTKF.js → compositions-VB2J2LZI.js} +11 -11
  84. package/dist/{delete-EL5LVSEP.js → delete-Q6RWMJ4Z.js} +2 -2
  85. package/dist/{dist-5UVIRMSM.js → dist-KDJTFJHA.js} +2 -2
  86. package/dist/{dist-XN234YFQ.js → dist-Q4BI5A73.js} +4 -4
  87. package/dist/{doctor-UOL3OI2A.js → doctor-JMMUHDRV.js} +13 -13
  88. package/dist/{events-K2DB2PBC.js → events-6ZBSIBE5.js} +2 -2
  89. package/dist/{events-NIZBS6S7.js → events-RGUAHIBW.js} +3 -3
  90. package/dist/{feedback-QMP4E6L7.js → feedback-FIID6MZW.js} +9 -9
  91. package/dist/{ffmpeg-QIUFEFTY.js → ffmpeg-T5SH2EFJ.js} +3 -2
  92. package/dist/{figma-2AUJRNVC.js → figma-BL3JJC36.js} +3 -3
  93. package/dist/fontLocalizeCli.js +9 -9
  94. package/dist/{get-P5NC7SRM.js → get-P46GS7S6.js} +2 -2
  95. package/dist/{gpuPolicy-7N5MCE2G.js → gpuPolicy-AQ2BPLBK.js} +11 -9
  96. package/dist/{grade-compare-HV5AFZ6P.js → grade-compare-GDCWU7ZZ.js} +27 -27
  97. package/dist/{help-3TSTXBLN.js → help-HJR3RWFG.js} +2 -2
  98. package/dist/{history-D65XFJ6D.js → history-GGO5AWJB.js} +5 -5
  99. package/dist/hyperframe-runtime.js +59 -59
  100. package/dist/hyperframe.manifest.json +1 -1
  101. package/dist/hyperframe.runtime.iife.js +59 -59
  102. package/dist/hyperframes-player.global.js +3 -3
  103. package/dist/{info-TXV7MLFO.js → info-3GFWUBJC.js} +8 -8
  104. package/dist/{init-OSDMJZJV.js → init-36OPU2ZG.js} +35 -36
  105. package/dist/{inspect-RQQSAYIJ.js → inspect-F2HEL5ON.js} +26 -26
  106. package/dist/{installer-CDOB32HE.js → installer-NI6P6GC4.js} +5 -5
  107. package/dist/{keyframes-V75Q6GRM.js → keyframes-7OY3LMAZ.js} +6 -6
  108. package/dist/{lambda-RODV4RCX.js → lambda-6GJIWNJ3.js} +5 -5
  109. package/dist/{layout-IZAI5SFC.js → layout-FTMLNL5A.js} +26 -26
  110. package/dist/{lint-PLXOXY5R.js → lint-U6POHUON.js} +8 -8
  111. package/dist/{lintProject-OQ6H6XBR.js → lintProject-UBZ3TDHU.js} +2 -2
  112. package/dist/{list-BQBPNKDZ.js → list-IP5KI5Q2.js} +2 -2
  113. package/dist/{login-NP6F4FHC.js → login-4VWTVPHG.js} +4 -4
  114. package/dist/{manager-CT3D67CG.js → manager-BPSR6D3V.js} +2 -2
  115. package/dist/{manager-GXYF4AVO.js → manager-YKMHR6LN.js} +8 -5
  116. package/dist/{media-treatment-PXGMZ4A4.js → media-treatment-XGV44AGV.js} +16 -13
  117. package/dist/{models-CEZM6XZ7.js → models-UCXB6UR5.js} +59 -19
  118. package/dist/{motionShot-R4GHYWYM.js → motionShot-WPVNBXKA.js} +21 -22
  119. package/dist/{normalize-H6KUHHEI.js → normalize-U3SL5VG3.js} +2 -2
  120. package/dist/{normalize-audio-MQ7NFCOV.js → normalize-audio-TYJ3UEHO.js} +6 -6
  121. package/dist/{open-AKQTGNXF.js → open-HENOLVB2.js} +4 -4
  122. package/dist/parakeetRunner-VFQ6WFTD.js +67 -0
  123. package/dist/{pipeline-SYJYP2RM.js → pipeline-6WPSC3H4.js} +10 -9
  124. package/dist/{play-NBH4B7PL.js → play-OI53WNUM.js} +19 -19
  125. package/dist/{preflight-Y5DN5D37.js → preflight-B4AFK3RG.js} +4 -4
  126. package/dist/{present-XAX55CFS.js → present-NGMEQ4NO.js} +15 -15
  127. package/dist/{preview-OLANKNFA.js → preview-VT2HWRWZ.js} +19 -19
  128. package/dist/{producer-Q6YNZZUJ.js → producer-7TYEAUF7.js} +1 -1
  129. package/dist/{projectConfig-EM26P45P.js → projectConfig-B2AF5DXY.js} +7 -7
  130. package/dist/{publication-OXWJZKSX.js → publication-2PANQVC6.js} +3 -3
  131. package/dist/{publish-4VBWP2UB.js → publish-O5OL42BG.js} +11 -11
  132. package/dist/{remove-background-REB7427G.js → remove-background-T2JM6UVP.js} +11 -10
  133. package/dist/{render-K25YOG3M.js → render-OLPKOJRU.js} +11 -11
  134. package/dist/{render-3CVZ2SZG.js → render-W7OFXDOJ.js} +4 -4
  135. package/dist/{render-TSE75QUL.js → render-Z253WHBK.js} +26 -26
  136. package/dist/{render-batch-GGUOK3DS.js → render-batch-46IIBFKL.js} +4 -4
  137. package/dist/{renderCancellation-PZRWB53I.js → renderCancellation-QTZOCDJ2.js} +10 -9
  138. package/dist/renderSetupWorker.js +32 -44
  139. package/dist/{resolver-S5VK6UCB.js → resolver-J2PL5FVJ.js} +5 -5
  140. package/dist/sherpa-ZF42V3RN.js +75 -0
  141. package/dist/sherpaWorker.js +2 -1
  142. package/dist/skills/hyperframes/scripts/lib/frame-packets-core.mjs +2 -20
  143. package/dist/skills/hyperframes/scripts/lib/main-module.mjs +13 -0
  144. package/dist/skills/hyperframes/scripts/lib/main-module.test.mjs +51 -0
  145. package/dist/skills/hyperframes/scripts/plugin-cli.mjs +4 -3
  146. package/dist/skills/hyperframes/scripts/plugin-cli.test.mjs +5 -1
  147. package/dist/skills/hyperframes-cli/SKILL.md +2 -0
  148. package/dist/skills/hyperframes-cli/references/lint-validate-inspect.md +1 -1
  149. package/dist/skills/media-use/audio/scripts/heygen-voice.mjs +2 -2
  150. package/dist/skills/media-use/audio/scripts/lib/main-module.mjs +13 -0
  151. package/dist/skills/media-use/scripts/lib/cube-validate.mjs +2 -3
  152. package/dist/skills/media-use/scripts/lib/main-module.mjs +13 -0
  153. package/dist/{skills-I65FU5HD.js → skills-ACDOO3PX.js} +7 -7
  154. package/dist/{skillsUpdateCheck-J57RNNIV.js → skillsUpdateCheck-L5OXVVPU.js} +3 -3
  155. package/dist/{snapshot-YROOGY22.js → snapshot-UUVNZOW5.js} +28 -28
  156. package/dist/{src-JO5JOV7Y.js → src-BSLKXEGX.js} +10 -6
  157. package/dist/{src-X426BZAG.js → src-KS3AWFGT.js} +8 -8
  158. package/dist/{staticProjectServer-5VMBS262.js → staticProjectServer-2TTVGPQH.js} +15 -15
  159. package/dist/studio/assets/{hyperframes-player-BXSuksFh.js → hyperframes-player-DZ5JrMDg.js} +3 -3
  160. package/dist/studio/assets/{index-FgyO_5Kv.js → index-BOs6C0aZ.js} +1 -1
  161. package/dist/studio/assets/{index-BgOVCqjo.js → index-BqFRhNZa.js} +1 -1
  162. package/dist/studio/assets/{index-J7jpL4pj.js → index-D8W0a0Z9.js} +149 -149
  163. package/dist/studio/{chunk-TFLU2MGI.js → chunk-6JY3MTIX.js} +108 -2
  164. package/dist/studio/{chunk-H2DUOXTF.js → chunk-NZPJUZKT.js} +100 -4
  165. package/dist/studio/{chunk-UYWON5AX.js → chunk-TP6D3U37.js} +7 -100
  166. package/dist/studio/{chunk-LOVBLSMR.js → chunk-Y2OHHNM2.js} +35 -19
  167. package/dist/studio/{domEditingLayers-KBTPQKGA.js → domEditingLayers-PTP2ICGM.js} +3 -3
  168. package/dist/studio/index.d.ts +8 -5
  169. package/dist/studio/index.html +1 -1
  170. package/dist/studio/index.js +545 -495
  171. package/dist/studio/player.js +3 -3
  172. package/dist/studio/ui.d.ts +4 -5
  173. package/dist/studio/ui.js +1 -1
  174. package/dist/{studio-api-VRBZUGAE.js → studio-api-WYWF7XRC.js} +9 -9
  175. package/dist/{studioServer-DBNKZ6I6.js → studioServer-3FG4YTP7.js} +72 -54
  176. package/dist/{telemetry-CXAX3TO3.js → telemetry-PAOOB4T4.js} +3 -3
  177. package/dist/{timeline-VQ34WH7J.js → timeline-JIIJKKPC.js} +69 -47
  178. package/dist/{tokens-62R7VFAZ.js → tokens-3QRAM75Z.js} +2 -2
  179. package/dist/{transcribe-XOHPPL2O.js → transcribe-QSBP5MUG.js} +115 -51
  180. package/dist/{transcribe-7KR7IPJA.js → transcribe-SZB6UMXE.js} +14 -12
  181. package/dist/{tts-MUV42JXT.js → tts-B6AHFQEO.js} +1 -1
  182. package/dist/{updateCheck-POYNH3B5.js → updateCheck-V3DSB26K.js} +2 -2
  183. package/dist/{upgrade-NBNOT7J2.js → upgrade-L5GISOEV.js} +2 -2
  184. package/dist/{urlDownloader-3NS63A7B.js → urlDownloader-52FERT4X.js} +6 -6
  185. package/dist/{validate-Y2QDHAEP.js → validate-HVVLX7KO.js} +20 -20
  186. package/dist/{video-SJDMTSTL.js → video-MEOWRMFG.js} +7 -7
  187. package/package.json +1 -1
  188. package/dist/chunk-6TPZSTCL.js +0 -3681
  189. package/dist/studio/chunk-EEXSYY5F.js.map +0 -1
  190. package/dist/studio/chunk-H2DUOXTF.js.map +0 -1
  191. package/dist/studio/chunk-LOVBLSMR.js.map +0 -1
  192. package/dist/studio/chunk-PZ5AY32C.js.map +0 -1
  193. package/dist/studio/chunk-TFLU2MGI.js.map +0 -1
  194. package/dist/studio/chunk-UYWON5AX.js.map +0 -1
  195. package/dist/studio/domEditingLayers-KBTPQKGA.js.map +0 -1
  196. package/dist/studio/index.css.map +0 -1
  197. package/dist/studio/index.js.map +0 -1
  198. package/dist/studio/player.js.map +0 -1
  199. package/dist/studio/styles/tailwind-preset.js.map +0 -1
  200. package/dist/studio/ui.js.map +0 -1
  201. package/dist/{screenshotCapture-TEUIWXWN.js → screenshotCapture-3JXXUZND.js} +3 -3
  202. package/dist/{synthesize-C3IWDAXF.js → synthesize-UCI4X5O7.js} +4 -4
@@ -9,11 +9,11 @@ import {
9
9
  } from "./chunk-BHVFTYSI.js";
10
10
  import {
11
11
  findFFmpeg
12
- } from "./chunk-TVCRUG2S.js";
12
+ } from "./chunk-ZEUONDQG.js";
13
13
 
14
14
  // src/whisper/manager.ts
15
15
  import { execFileSync } from "child_process";
16
- import { existsSync, mkdirSync, rmSync } from "fs";
16
+ import { existsSync, mkdirSync, readdirSync, rmSync } from "fs";
17
17
  import { homedir, platform } from "os";
18
18
  import { join } from "path";
19
19
  var MODELS_DIR = join(homedir(), ".cache", "hyperframes", "whisper", "models");
@@ -120,6 +120,14 @@ ${stderr.slice(-500)}`;
120
120
  function findWhisper() {
121
121
  return findFromEnv() ?? findFromSystem() ?? findBuiltBinary();
122
122
  }
123
+ function listWhisperModels() {
124
+ if (!existsSync(MODELS_DIR)) return [];
125
+ return readdirSync(MODELS_DIR).flatMap((file) => {
126
+ const model = /^ggml-(.+)\.bin$/.exec(file)?.[1];
127
+ const path = join(MODELS_DIR, file);
128
+ return model && existsSync(path) ? [{ model, path }] : [];
129
+ }).sort((a, b) => a.model.localeCompare(b.model));
130
+ }
123
131
  function getInstallInstructions() {
124
132
  if (platform() === "darwin") {
125
133
  return "brew install whisper-cpp";
@@ -190,6 +198,7 @@ export {
190
198
  WhisperUnavailableError,
191
199
  isWhisperUnavailable,
192
200
  findWhisper,
201
+ listWhisperModels,
193
202
  getInstallInstructions,
194
203
  ensureWhisper,
195
204
  ensureModel,
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  updateNoticesSuppressed
9
- } from "./chunk-Y6QL2LGO.js";
9
+ } from "./chunk-PLR7Z6TC.js";
10
10
  import {
11
11
  hostAnswers
12
12
  } from "./chunk-K4WIOZFP.js";
@@ -9,28 +9,31 @@ import {
9
9
  } from "./chunk-6IHWCZ3W.js";
10
10
  import {
11
11
  stoppedByCancelSignal
12
- } from "./chunk-UICWP23D.js";
12
+ } from "./chunk-FBCULCAL.js";
13
13
  import {
14
14
  DEFAULT_MODEL,
15
15
  ensureModel,
16
16
  ensureWhisper,
17
17
  hasFFmpeg
18
- } from "./chunk-U3X3TPBW.js";
18
+ } from "./chunk-MAYCCGMQ.js";
19
19
  import {
20
20
  findFFmpeg,
21
21
  findFFprobe,
22
22
  getFFmpegInstallHint
23
- } from "./chunk-TVCRUG2S.js";
23
+ } from "./chunk-ZEUONDQG.js";
24
24
  import {
25
25
  findWavChunk
26
26
  } from "./chunk-UOFAE5RF.js";
27
+ import {
28
+ TRANSCRIPT_FILE
29
+ } from "./chunk-IR35BCLK.js";
27
30
 
28
31
  // src/whisper/transcribe.ts
29
32
  import { execFile, execFileSync } from "child_process";
30
33
  import { once } from "events";
31
34
  import { createInterface } from "readline";
32
35
  import { existsSync, readFileSync, mkdirSync, rmSync, statSync, unlinkSync } from "fs";
33
- import { join, extname } from "path";
36
+ import { basename, join, extname } from "path";
34
37
  import { tmpdir } from "os";
35
38
  import { randomUUID } from "crypto";
36
39
  var WHISPER_TIMEOUT_FLOOR_MS = 3e5;
@@ -297,7 +300,7 @@ async function transcribe(inputPath, outputDir, options) {
297
300
  status: "started",
298
301
  durationSeconds: wavSeconds
299
302
  });
300
- const outputBase = join(outputDir, "transcript");
303
+ const outputBase = join(outputDir, basename(TRANSCRIPT_FILE, ".json"));
301
304
  mkdirSync(outputDir, { recursive: true });
302
305
  const whisperArgs = [
303
306
  "--model",
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-ISN5GRYI.js";
18
18
  import {
19
19
  VERSION
20
- } from "./chunk-W35EKBS6.js";
20
+ } from "./chunk-BFACGEII.js";
21
21
 
22
22
  // src/utils/updateCheck.ts
23
23
  import { existsSync, readFileSync } from "fs";
@@ -18,7 +18,7 @@ import {
18
18
  CSS_URL_RE,
19
19
  isNonRelativeUrl,
20
20
  isPathInside
21
- } from "./chunk-ZLW2V65P.js";
21
+ } from "./chunk-BSQ7XANM.js";
22
22
  import {
23
23
  parseHTML
24
24
  } from "./chunk-SDYDNHEE.js";
@@ -20,7 +20,7 @@ import {
20
20
  typeDirPath,
21
21
  updateRecord,
22
22
  withFigmaErrors
23
- } from "./chunk-LVX6NK36.js";
23
+ } from "./chunk-3IBMBNYY.js";
24
24
  import {
25
25
  defineCommand
26
26
  } from "./chunk-S3S4TGEH.js";
@@ -229,7 +229,7 @@ var asset_default = defineCommand({
229
229
  rendered > 0 ? `(${results.length} nodes, ${rendered} rendered in 1 figma request)` : `(${results.length} nodes, all reused from cache \u2014 no figma request)`
230
230
  );
231
231
  }
232
- const { trackFigmaImport } = await import("./telemetry-CXAX3TO3.js");
232
+ const { trackFigmaImport } = await import("./telemetry-PAOOB4T4.js");
233
233
  trackFigmaImport({
234
234
  phase: "asset",
235
235
  reused: results.every((r) => r.reused),
@@ -16,7 +16,7 @@ import {
16
16
  import {
17
17
  formatVariableValidationIssue,
18
18
  validateVariables
19
- } from "./chunk-4M4EC7JX.js";
19
+ } from "./chunk-VRW6EBHV.js";
20
20
  import {
21
21
  extractCompositionMetadata
22
22
  } from "./chunk-MQZVBHEY.js";
@@ -10,18 +10,19 @@ import {
10
10
  import {
11
11
  launchManagedBrowser,
12
12
  resolveManagedGpuMode
13
- } from "./chunk-PJU63L6W.js";
13
+ } from "./chunk-4ORLNTET.js";
14
14
  import {
15
15
  resolveDiagnosticNavigationTimeoutMs,
16
16
  windowsChromeCrashRemediation
17
- } from "./chunk-P7THMINS.js";
17
+ } from "./chunk-FXJJCPPB.js";
18
18
  import {
19
- resolveLocalBrowserGpuMode
20
- } from "./chunk-QRKLPWEX.js";
19
+ resolveLocalBrowserGpuMode,
20
+ resolveLocalWebGpu
21
+ } from "./chunk-ADF3X6GM.js";
21
22
  import {
22
23
  assertWebGpuAdapterAvailable,
23
24
  compositionRequiresWebGpu
24
- } from "./chunk-33RZPZ4K.js";
25
+ } from "./chunk-UXO2L7HJ.js";
25
26
  import {
26
27
  normalizeErrorMessage
27
28
  } from "./chunk-KNU5COPB.js";
@@ -100,20 +101,23 @@ async function installPageFunctionGuard(page) {
100
101
  }
101
102
  async function openSettledCompositionPage(html, url, options) {
102
103
  const viewport = resolveCompositionViewportFromHtml(html);
103
- const { ensureBrowser, findSystemBrowser } = await import("./manager-CT3D67CG.js");
104
+ const { ensureBrowser, findSystemBrowser } = await import("./manager-BPSR6D3V.js");
104
105
  const browser = await ensureBrowser();
105
106
  const puppeteer = await import("puppeteer-core");
106
- const { buildChromeArgs } = await import("./src-JO5JOV7Y.js");
107
+ const { buildChromeArgs } = await import("./src-BSLKXEGX.js");
107
108
  const requestedGpuMode = options.browserGpuMode ?? resolveCliChromeGpuMode();
108
109
  const requiresWebGpu = compositionRequiresWebGpu(html);
110
+ let softwareWebGpu = false;
109
111
  const launch = async (executablePath) => {
110
112
  const resolvedGpuMode = await resolveManagedGpuMode(requestedGpuMode, executablePath);
113
+ const webGpu = resolveLocalWebGpu(resolvedGpuMode, requiresWebGpu);
114
+ softwareWebGpu = webGpu.softwareWebGpu;
111
115
  return launchManagedBrowser(puppeteer.default, {
112
116
  headless: true,
113
117
  executablePath,
114
118
  args: buildChromeArgs(
115
119
  { ...viewport, captureMode: "screenshot", requiresWebGpu },
116
- { browserGpuMode: resolvedGpuMode }
120
+ webGpu.gpuConfig
117
121
  )
118
122
  });
119
123
  };
@@ -153,7 +157,7 @@ ${remediation}`,
153
157
  waitUntil: "domcontentloaded",
154
158
  timeout: resolveDiagnosticNavigationTimeoutMs(process.env, options.navigationTimeoutMs)
155
159
  });
156
- await assertWebGpuAdapterAvailable(page, requiresWebGpu);
160
+ await assertWebGpuAdapterAvailable(page, requiresWebGpu, softwareWebGpu);
157
161
  const renderReadyTimedOut = !await waitForCompositionSettle(page, options);
158
162
  return { browser: chromeBrowser, page, renderReadyTimedOut };
159
163
  } catch (err) {
@@ -0,0 +1,136 @@
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
+ CliUsageError
9
+ } from "./chunk-PBN6GBJE.js";
10
+ import {
11
+ c
12
+ } from "./chunk-ZTZA4UWZ.js";
13
+
14
+ // src/utils/reject-unknown-flags.ts
15
+ var ALWAYS_KNOWN = /* @__PURE__ */ new Set(["help", "h", "version", "v", "json"]);
16
+ function nameVariants(name) {
17
+ const kebab = name.replace(/[A-Z]/g, (c2) => "-" + c2.toLowerCase());
18
+ const camel = name.replace(/-([a-z])/g, (_, c2) => c2.toUpperCase());
19
+ return [name, kebab, camel];
20
+ }
21
+ function* spellingsOf(name, def) {
22
+ yield* nameVariants(name);
23
+ const alias = def && "alias" in def ? def.alias : void 0;
24
+ if (typeof alias === "string") yield alias;
25
+ else if (Array.isArray(alias)) yield* alias;
26
+ }
27
+ function knownFlags(args) {
28
+ const known = new Set(ALWAYS_KNOWN);
29
+ for (const [name, def] of Object.entries(args ?? {})) {
30
+ for (const s of spellingsOf(name, def)) known.add(s);
31
+ }
32
+ return known;
33
+ }
34
+ function longFlagName(tok) {
35
+ const name = tok.slice(2).split("=")[0] ?? "";
36
+ return name.startsWith("no-") ? name.slice(3) : name;
37
+ }
38
+ function unknownFlagIn(tok, known) {
39
+ if (tok === "-" || !tok.startsWith("-")) return null;
40
+ if (tok.startsWith("--")) {
41
+ const name = longFlagName(tok);
42
+ return name && !known.has(name) ? `--${name}` : null;
43
+ }
44
+ for (const ch of tok.slice(1).split("=")[0] ?? "") {
45
+ if (!known.has(ch)) return `-${ch}`;
46
+ }
47
+ return null;
48
+ }
49
+ function assertKnownFlags(cmd, rawArgs) {
50
+ if (!Array.isArray(rawArgs)) return;
51
+ const rawDef = cmd.args;
52
+ const args = rawDef && typeof rawDef === "object" ? rawDef : void 0;
53
+ const known = knownFlags(args);
54
+ for (const tok of rawArgs) {
55
+ if (tok === "--") break;
56
+ const bad = unknownFlagIn(tok, known);
57
+ if (bad) throw new Error(`Unknown flag: ${bad}`);
58
+ }
59
+ }
60
+ function stringValueFlagOwners(args, ignore) {
61
+ const owners = /* @__PURE__ */ new Map();
62
+ for (const [name, def] of Object.entries(args ?? {})) {
63
+ if (def?.type !== "string" && def?.type !== "enum") continue;
64
+ if (ignore?.has(name)) continue;
65
+ for (const s of spellingsOf(name, def)) owners.set(s, name);
66
+ }
67
+ return owners;
68
+ }
69
+ function ownableFlagSpelling(tok) {
70
+ if (tok.includes("=")) return null;
71
+ if (tok.startsWith("--")) return tok.slice(2);
72
+ if (tok.length === 2 && tok.startsWith("-")) return tok.slice(1);
73
+ return null;
74
+ }
75
+ var SWALLOW_REWRITE_FLAGS = {
76
+ check: /* @__PURE__ */ new Set(["frame-check"])
77
+ };
78
+ var SWALLOW_IGNORE_FLAGS = {
79
+ upgrade: /* @__PURE__ */ new Set(["project"])
80
+ };
81
+ function swallowedValueMessage(flagName, next, hint) {
82
+ if (next === "--")
83
+ return `Missing value for --${flagName}: "--" ends option parsing here; ${hint}`;
84
+ return `Missing value for --${flagName}: value "${next}" appears to have swallowed the next option; ${hint}`;
85
+ }
86
+ function swallowedFlagUsageError(flagName, next) {
87
+ const hint = `use --${flagName}= or move --${flagName} to the end`;
88
+ return new CliUsageError(swallowedValueMessage(flagName, next, hint));
89
+ }
90
+ function throwSwallowedFlagError(flagName, next) {
91
+ const hint = `pass one: --${flagName} <value> or --${flagName}=<value>`;
92
+ const message = swallowedValueMessage(flagName, next, hint);
93
+ console.error(c.error(message));
94
+ throw new CliUsageError(message, { presented: true });
95
+ }
96
+ function looksLikeSwallowedFlag(next, known) {
97
+ if (next === void 0 || next === "-") return false;
98
+ return next === "--" || next.startsWith("-") && unknownFlagIn(next, known) === null;
99
+ }
100
+ function swallowingArgName(tok, next, owners, known) {
101
+ const spelling = ownableFlagSpelling(tok);
102
+ const ownerArgName = spelling ? owners.get(spelling) : void 0;
103
+ return ownerArgName && looksLikeSwallowedFlag(next, known) ? ownerArgName : void 0;
104
+ }
105
+ function rewriteArgName(tok, after, owners, rewriteFlags) {
106
+ if (!after?.startsWith("--no-")) return void 0;
107
+ const spelling = ownableFlagSpelling(tok);
108
+ const name = spelling ? owners.get(spelling) : void 0;
109
+ return name && rewriteFlags?.has(name) ? name : void 0;
110
+ }
111
+ function guardSwallowedFlagValues(cmd, path, rawArgs) {
112
+ if (!Array.isArray(rawArgs)) return { rawArgs, rewritten: false };
113
+ const rawDef = cmd?.args;
114
+ const argsDef = rawDef && typeof rawDef === "object" ? rawDef : void 0;
115
+ const known = knownFlags(argsDef);
116
+ const owners = stringValueFlagOwners(argsDef, SWALLOW_IGNORE_FLAGS[path]);
117
+ const rewriteFlags = SWALLOW_REWRITE_FLAGS[path];
118
+ let out;
119
+ for (const [i, tok] of rawArgs.entries()) {
120
+ if (tok === "--") break;
121
+ const next = rawArgs.slice(i + 1).find((t) => !t.startsWith("--no-"));
122
+ const ownerArgName = swallowingArgName(tok, next, owners, known);
123
+ const rewrite = rewriteArgName(tok, rawArgs[i + 1], owners, rewriteFlags) ?? ownerArgName;
124
+ if (!rewrite) continue;
125
+ if (!rewriteFlags?.has(rewrite)) throwSwallowedFlagError(rewrite, next);
126
+ out ??= rawArgs.slice();
127
+ out[i] = `${tok}=`;
128
+ }
129
+ return { rawArgs: out ?? rawArgs, rewritten: out !== void 0 };
130
+ }
131
+
132
+ export {
133
+ assertKnownFlags,
134
+ swallowedFlagUsageError,
135
+ guardSwallowedFlagValues
136
+ };