hyperframes 0.8.119 → 0.8.121

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 (160) hide show
  1. package/dist/{add-LVDM5BBO.js → add-CGDIT7CT.js} +14 -14
  2. package/dist/{animatedGifPrep-RH5AEVNX.js → animatedGifPrep-KPT5VB5Q.js} +5 -5
  3. package/dist/{asset-PA7XD3CI.js → asset-6ZAZIWA7.js} +2 -2
  4. package/dist/{assetCataloger-QX37JS5D.js → assetCataloger-FWWCXIEX.js} +2 -2
  5. package/dist/{auth-SQIHPP3J.js → auth-W4WZ5KT2.js} +4 -4
  6. package/dist/{autoUpdate-JCG27FBW.js → autoUpdate-2KRUUCM2.js} +2 -2
  7. package/dist/{backgroundChecks-U7JCBAWI.js → backgroundChecks-M7YRL5G3.js} +3 -3
  8. package/dist/backgroundChecksWorker.js +3 -3
  9. package/dist/{batchRender-BBBUJETN.js → batchRender-2HXYPO62.js} +3 -3
  10. package/dist/{beats-6BSMZTE6.js → beats-KXLHRYXV.js} +13 -13
  11. package/dist/{benchmark-WOZCECBF.js → benchmark-TZRC6JEE.js} +11 -11
  12. package/dist/{browser-KNPH25NJ.js → browser-KFCZEHSG.js} +8 -8
  13. package/dist/{bundleWithLocalizedFonts-I4RJWHKR.js → bundleWithLocalizedFonts-3RRACCEV.js} +2 -2
  14. package/dist/{capture-4WXKXCCV.js → capture-3L7VTWDG.js} +8 -8
  15. package/dist/{capture-PZQOA465.js → capture-N25LJPGM.js} +2 -2
  16. package/dist/{catalog-OXCKYFHY.js → catalog-OJK3RAMA.js} +14 -14
  17. package/dist/{check-N4QDDW6N.js → check-DUQ2OHRX.js} +33 -33
  18. package/dist/{checkBrowser-D3L4OXTQ.js → checkBrowser-XHNFT3DB.js} +30 -30
  19. package/dist/{chunk-P6UJ22SS.js → chunk-2C6UJPQS.js} +1 -1
  20. package/dist/{chunk-TOOQJPUJ.js → chunk-2CGUG4XK.js} +5 -5
  21. package/dist/{chunk-2FJPEXII.js → chunk-2LWWIDPZ.js} +1 -1
  22. package/dist/{chunk-KWABBJYI.js → chunk-2XV3S6TA.js} +2 -2
  23. package/dist/{chunk-HNOJAFT2.js → chunk-3DCZIHXE.js} +21 -21
  24. package/dist/{chunk-WJP3UOB3.js → chunk-3WXWL7AY.js} +1 -1
  25. package/dist/{chunk-Y44PIZOH.js → chunk-44EFU366.js} +11 -11
  26. package/dist/{chunk-523Q6JDM.js → chunk-4JC7LDBQ.js} +2 -2
  27. package/dist/{chunk-OLFFCC2D.js → chunk-5OS5XIWZ.js} +1 -1
  28. package/dist/{chunk-KK7VGMEF.js → chunk-5PTKFXAS.js} +11 -11
  29. package/dist/{chunk-M6LKSPER.js → chunk-6WIWCYD5.js} +3 -3
  30. package/dist/{chunk-V5T6IA7D.js → chunk-6Z4E4GBX.js} +1 -1
  31. package/dist/{chunk-FRIRP3DN.js → chunk-7VXU7E5S.js} +1 -1
  32. package/dist/{chunk-KFKEMNSW.js → chunk-AA4KEZGW.js} +3 -3
  33. package/dist/{chunk-U7AMFQ6G.js → chunk-BN5KOC5O.js} +1 -1
  34. package/dist/{chunk-GVJMAHXQ.js → chunk-DISNXEWU.js} +2 -2
  35. package/dist/{chunk-7UXUVWOY.js → chunk-E5XIJTMU.js} +1 -1
  36. package/dist/{chunk-SUIF4D5H.js → chunk-GF4MOYGU.js} +8 -8
  37. package/dist/{chunk-5IABQ7OX.js → chunk-GPGWCFIA.js} +1 -1
  38. package/dist/{chunk-DNXD7TOA.js → chunk-I465DBM6.js} +27 -12
  39. package/dist/chunk-IGLEPPTN.js +24 -0
  40. package/dist/{chunk-MYSYOQPV.js → chunk-IVLJE3VX.js} +2 -2
  41. package/dist/{chunk-4PTKEI2C.js → chunk-JACPHNUK.js} +1 -1
  42. package/dist/{chunk-MVWXSRY6.js → chunk-JH556Q42.js} +69 -21
  43. package/dist/{chunk-BKQXLO55.js → chunk-JREV7WVY.js} +1 -1
  44. package/dist/{chunk-V2VNJNX6.js → chunk-JWGYWJ5F.js} +1 -1
  45. package/dist/{chunk-AMSNSTLK.js → chunk-JWHQKTVG.js} +3 -3
  46. package/dist/{chunk-FNX7RJIJ.js → chunk-KYDM3W7A.js} +2 -2
  47. package/dist/{chunk-U3CILSBM.js → chunk-LZN67SFR.js} +1 -1
  48. package/dist/{chunk-IUBZ3DSO.js → chunk-MNMD6XLG.js} +2 -2
  49. package/dist/{chunk-CDTPNYO3.js → chunk-NPHNGWJH.js} +3 -3
  50. package/dist/{chunk-EEXM24SY.js → chunk-OWPHLEDI.js} +5 -5
  51. package/dist/chunk-PATLRNZA.js +3541 -0
  52. package/dist/{chunk-2WKWEB4T.js → chunk-RCNDZEBU.js} +1 -1
  53. package/dist/{chunk-KNXXZ73S.js → chunk-RYSHGEZL.js} +4 -4
  54. package/dist/{chunk-OI3IIR2X.js → chunk-S6Y2LOTE.js} +1 -1
  55. package/dist/chunk-SHB5VDMH.js +51 -0
  56. package/dist/{chunk-OWMGDQBZ.js → chunk-SJ64QY5Z.js} +1 -1
  57. package/dist/{chunk-OV62R47Q.js → chunk-VU4KRDRL.js} +1 -1
  58. package/dist/{chunk-6Q3Q7HGA.js → chunk-WBRDOH4A.js} +1 -1
  59. package/dist/{chunk-3NXDJSD5.js → chunk-WG4IZWEH.js} +2 -2
  60. package/dist/{chunk-LHU6KXWL.js → chunk-WW7V2GQJ.js} +1 -1
  61. package/dist/{chunk-2MMAA5I3.js → chunk-XLG5C3XA.js} +1 -1
  62. package/dist/{chunk-RLYTIMTS.js → chunk-Y6W4DVPS.js} +4 -37
  63. package/dist/{chunk-BZKDN6BU.js → chunk-YE5UC4XH.js} +7 -7
  64. package/dist/{chunk-ZTU5PYQJ.js → chunk-YJMQLWG4.js} +36 -23
  65. package/dist/{chunk-PPTHGZTG.js → chunk-ZBMQOBQK.js} +1 -1
  66. package/dist/{chunk-RZAXPDIT.js → chunk-ZTZ7NCJT.js} +1 -1
  67. package/dist/{chunk-RMDKZTSI.js → chunk-ZUVO6Q5Q.js} +2 -2
  68. package/dist/{clean-VWT7OZEN.js → clean-NH5JTTXP.js} +17 -17
  69. package/dist/cli.js +52 -70
  70. package/dist/{cloud-BB7SW4DX.js → cloud-QKM43VWA.js} +4 -4
  71. package/dist/{cloudrun-OQLPEWGP.js → cloudrun-JQCGTNFP.js} +3 -3
  72. package/dist/{compare-3Z4BPHIZ.js → compare-2ZOO6GRL.js} +29 -29
  73. package/dist/{compiler-GPUSYMA6.js → compiler-WNWCQTI6.js} +2 -2
  74. package/dist/{component-6H2NIATV.js → component-Q5AECWP4.js} +3 -3
  75. package/dist/{compositions-I357YMW6.js → compositions-KEMPAOSU.js} +10 -10
  76. package/dist/{delete-YJQPGNJJ.js → delete-TWGIIVHU.js} +6 -5
  77. package/dist/{deterministicFonts-O7BTFDJU.js → deterministicFonts-ITMUXWD2.js} +2 -2
  78. package/dist/{dist-NP53GO3N.js → dist-JGUAVYZS.js} +2 -2
  79. package/dist/{doctor-NP34O2SX.js → doctor-COVUXJ2H.js} +9 -9
  80. package/dist/dotEnv-AI4SYVTX.js +39 -0
  81. package/dist/{events-T4KFU5HZ.js → events-6K4KG2RC.js} +8 -8
  82. package/dist/{events-NV6CNGUD.js → events-PNRVEJOH.js} +7 -7
  83. package/dist/{feedback-DKHIGKC4.js → feedback-YACZS7R7.js} +41 -17
  84. package/dist/{figma-ALVXXDIQ.js → figma-LEEL7JF7.js} +3 -3
  85. package/dist/fontLocalizeCli.js +9 -9
  86. package/dist/{get-CKKP6UBL.js → get-FX23HBPC.js} +6 -5
  87. package/dist/{gpuPolicy-WWBLJO6C.js → gpuPolicy-TCSAVM2S.js} +5 -5
  88. package/dist/{grade-compare-7POS3AY6.js → grade-compare-ENNPIMZX.js} +25 -25
  89. package/dist/{help-KGRXGCVJ.js → help-HNY5LMYR.js} +1 -1
  90. package/dist/{history-JLXPVI2L.js → history-325KQTJM.js} +17 -17
  91. package/dist/hyperframe-runtime.js +54 -54
  92. package/dist/hyperframe.manifest.json +1 -1
  93. package/dist/hyperframe.runtime.iife.js +54 -54
  94. package/dist/hyperframes-player.global.js +1 -1
  95. package/dist/{info-QA5UAYFS.js → info-GKPHG3QO.js} +10 -10
  96. package/dist/{init-7SM4AD76.js → init-UYF6SWL7.js} +21 -21
  97. package/dist/{inspect-ANJ2CRLP.js → inspect-A6DZG7KU.js} +26 -26
  98. package/dist/{installer-EUT2OZTH.js → installer-EY3AB44Q.js} +4 -4
  99. package/dist/{keyframes-H2ZUI3DC.js → keyframes-P62TMLKQ.js} +11 -11
  100. package/dist/{lambda-HZ2ZKLVH.js → lambda-HWU6V36S.js} +4 -4
  101. package/dist/{layout-EDDKQ67V.js → layout-GWF2HD5Z.js} +26 -26
  102. package/dist/{lint-SVXOETDR.js → lint-OBGOECOL.js} +13 -13
  103. package/dist/{list-YRBK24UM.js → list-ZOUMRWXQ.js} +6 -5
  104. package/dist/{login-VE7VGBOA.js → login-4H6ZVI6D.js} +6 -6
  105. package/dist/{logout-HJQT42RL.js → logout-Q654A3SI.js} +2 -2
  106. package/dist/{media-treatment-ZQOBGLJQ.js → media-treatment-GRBN3MG5.js} +13 -13
  107. package/dist/{models-GVMX5TFG.js → models-YFTLSJEG.js} +8 -8
  108. package/dist/{motionShot-2Z6LRHEV.js → motionShot-7VLC2ULG.js} +10 -10
  109. package/dist/{normalize-audio-QHMZWNNH.js → normalize-audio-SLBARKVY.js} +13 -13
  110. package/dist/{pipeline-HYULUMEV.js → pipeline-WRNKPJZH.js} +5 -5
  111. package/dist/{play-EYXIIZHG.js → play-PDEXRHV6.js} +28 -28
  112. package/dist/{preflight-KJHZ46FX.js → preflight-6TUK6Z7A.js} +6 -6
  113. package/dist/{present-YQ2BRUNH.js → present-UXWOO2YL.js} +18 -18
  114. package/dist/{preview-QMAPLY2S.js → preview-CWHCNYYZ.js} +26 -26
  115. package/dist/{producer-FS442D4D.js → producer-WDTJSNXK.js} +1 -1
  116. package/dist/{projectConfig-A4DXJF4P.js → projectConfig-DBP5POAQ.js} +6 -6
  117. package/dist/{publication-QY2H23JU.js → publication-SUAGUL5G.js} +2 -2
  118. package/dist/{publish-PCT6JM4B.js → publish-CDKO6FSQ.js} +39 -33
  119. package/dist/{refresh-IK6LUV5Z.js → refresh-K24ETHMA.js} +2 -2
  120. package/dist/{remove-background-O2J7EVEN.js → remove-background-QFMDODZ4.js} +6 -6
  121. package/dist/{render-6QXPYNLY.js → render-BYD7ZASF.js} +27 -27
  122. package/dist/{render-QUQJP5PP.js → render-NRNF56OV.js} +3 -3
  123. package/dist/{render-HYA6UBZD.js → render-XTI7E22A.js} +20 -19
  124. package/dist/{render-batch-OS4UEZA4.js → render-batch-L2AIXYA3.js} +3 -3
  125. package/dist/{renderCancellation-RWWLGOOD.js → renderCancellation-XR3W2AQT.js} +5 -5
  126. package/dist/{resolver-IM46W362.js → resolver-RYPIAEGU.js} +4 -4
  127. package/dist/{sherpa-COBFACPG.js → sherpa-MXQ34FFS.js} +8 -8
  128. package/dist/skills/media-use/audio/scripts/lib/heygen.mjs +23 -6
  129. package/dist/skills/media-use/audio/scripts/lib/heygen.test.mjs +42 -2
  130. package/dist/{skills-CT7TY7SZ.js → skills-MZQUKPEY.js} +10 -10
  131. package/dist/{skillsUpdateCheck-AWHTVNPB.js → skillsUpdateCheck-B5F5UR7U.js} +3 -3
  132. package/dist/{snapshot-C4PYM7G5.js → snapshot-HPBNWSSK.js} +31 -31
  133. package/dist/{src-QOQJLFDK.js → src-BS6B2UWS.js} +4 -4
  134. package/dist/{src-GGDAYPPK.js → src-RNEWLAP6.js} +8 -8
  135. package/dist/{staticProjectServer-RBGIJQMY.js → staticProjectServer-B44OD7QD.js} +13 -13
  136. package/dist/{status-FCLZF4FT.js → status-RYS52BAQ.js} +7 -7
  137. package/dist/studio/assets/{hyperframes-player-7Icl2uVN.js → hyperframes-player-GkN9yzzq.js} +1 -1
  138. package/dist/studio/assets/{index-7YcUqkoh.js → index-BpKhiuzT.js} +1 -1
  139. package/dist/studio/assets/{index-Dc8FEIEU.js → index-ByV72rWx.js} +1 -1
  140. package/dist/studio/assets/{index-DOO2cYhl.js → index-CyFqMHGS.js} +174 -174
  141. package/dist/studio/index.d.ts +5 -1
  142. package/dist/studio/index.html +1 -1
  143. package/dist/studio/index.js +72 -87
  144. package/dist/studio/index.js.map +1 -1
  145. package/dist/{studio-api-Y67F5TPC.js → studio-api-YCS6DZMR.js} +7 -7
  146. package/dist/{studioServer-SCAZGVUQ.js → studioServer-AEXETXZ2.js} +39 -39
  147. package/dist/{system-QUFWS7NN.js → system-TD2HPCOA.js} +5 -5
  148. package/dist/{telemetry-JJJQWUA3.js → telemetry-7KDXFPTK.js} +8 -8
  149. package/dist/{timeline-BEWRG3QA.js → timeline-P4IMRDIN.js} +17 -17
  150. package/dist/{tokens-GAZXBXWG.js → tokens-HKYWL774.js} +2 -2
  151. package/dist/{transcribe-UJUYNNEH.js → transcribe-2E4QY24M.js} +6 -6
  152. package/dist/{transcribe-ZCFEAIAW.js → transcribe-UIQMMHXI.js} +11 -11
  153. package/dist/{updateCheck-H5DKTWUO.js → updateCheck-KWLMTR35.js} +2 -2
  154. package/dist/{upgrade-RUBSQNRS.js → upgrade-E4TMMCGK.js} +2 -2
  155. package/dist/{urlDownloader-5FUUYAOT.js → urlDownloader-P2EJDWLH.js} +4 -4
  156. package/dist/{validate-5R3OJEGF.js → validate-IX47WBNJ.js} +15 -15
  157. package/dist/{video-RTC4AXZB.js → video-56EQZA6M.js} +5 -5
  158. package/package.json +1 -1
  159. package/dist/chunk-SHLFJFPM.js +0 -3541
  160. package/dist/{chunk-AIYKVE4Y.js → chunk-2GKO3X7F.js} +3 -3
@@ -17,7 +17,7 @@ import {
17
17
  parseStrictFiniteTimingNumber,
18
18
  resolveNaturalMediaTimelineDuration,
19
19
  resolveTimedImageDurationSeconds
20
- } from "./chunk-SHLFJFPM.js";
20
+ } from "./chunk-PATLRNZA.js";
21
21
  import {
22
22
  COMPOSITION_ATTRIBUTES,
23
23
  parseStartExpression
@@ -7,16 +7,16 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  parseFeedbackRating,
9
9
  trackRenderFeedback
10
- } from "./chunk-CDTPNYO3.js";
10
+ } from "./chunk-NPHNGWJH.js";
11
11
  import {
12
12
  shouldTrack
13
- } from "./chunk-M6LKSPER.js";
13
+ } from "./chunk-6WIWCYD5.js";
14
14
  import {
15
15
  c
16
16
  } from "./chunk-ZTZA4UWZ.js";
17
17
  import {
18
18
  detectAgentRuntime
19
- } from "./chunk-U7AMFQ6G.js";
19
+ } from "./chunk-BN5KOC5O.js";
20
20
  import {
21
21
  readConfig,
22
22
  writeConfig
@@ -83,7 +83,7 @@ async function maybePromptRenderFeedback(opts) {
83
83
  async function getDoctorSummary() {
84
84
  try {
85
85
  const [{ getSystemMeta }, { findFFmpeg }] = await Promise.all([
86
- import("./system-QUFWS7NN.js"),
86
+ import("./system-TD2HPCOA.js"),
87
87
  import("./ffmpeg-QIUFEFTY.js")
88
88
  ]);
89
89
  const sys = getSystemMeta();
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  resolveCaptureBrowserGpuMode
9
- } from "./chunk-V5T6IA7D.js";
9
+ } from "./chunk-6Z4E4GBX.js";
10
10
  import {
11
11
  requestCliExit
12
12
  } from "./chunk-PBN6GBJE.js";
@@ -0,0 +1,51 @@
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
+ apiBaseUrl,
9
+ buildAuthHeaders,
10
+ refreshTokens,
11
+ resolveCredential
12
+ } from "./chunk-I465DBM6.js";
13
+
14
+ // src/cloud/auth.ts
15
+ async function resolveCloudAuthHeaders() {
16
+ let credential = await resolveCredential();
17
+ credential = await refreshIfNeeded(credential);
18
+ return buildAuthHeaders(credential);
19
+ }
20
+ function resolveCloudBaseUrl() {
21
+ return apiBaseUrl();
22
+ }
23
+ async function refreshIfNeeded(credential) {
24
+ if (credential.type !== "oauth") return credential;
25
+ if (!credential.refreshable || !credential.refresh_token) return credential;
26
+ const fresh = await refreshTokens(credential.refresh_token);
27
+ return {
28
+ ...credential,
29
+ access_token: fresh.access_token,
30
+ expires_at: parseDateOrUndef(fresh.expires_at),
31
+ refreshable: false,
32
+ ...fresh.refresh_token ? { refresh_token: fresh.refresh_token } : {}
33
+ };
34
+ }
35
+ function parseDateOrUndef(value) {
36
+ if (!value) return void 0;
37
+ const d = new Date(value);
38
+ return Number.isNaN(d.getTime()) ? void 0 : d;
39
+ }
40
+ async function forceRefreshCredentials() {
41
+ const credential = await resolveCredential();
42
+ if (credential.type !== "oauth" || !credential.refresh_token) return;
43
+ await refreshTokens(credential.refresh_token);
44
+ }
45
+
46
+ export {
47
+ resolveCloudAuthHeaders,
48
+ resolveCloudBaseUrl,
49
+ refreshIfNeeded,
50
+ forceRefreshCredentials
51
+ };
@@ -8,7 +8,7 @@ import {
8
8
  firstFrameColourArgs,
9
9
  hdrToSdrToneMapFilter,
10
10
  parseFirstFrameColour
11
- } from "./chunk-2WKWEB4T.js";
11
+ } from "./chunk-RCNDZEBU.js";
12
12
  import {
13
13
  mkdirWithinProject,
14
14
  realProjectRoot,
@@ -13,7 +13,7 @@ import {
13
13
  } from "./chunk-TVCRUG2S.js";
14
14
  import {
15
15
  getFreeDiskMb
16
- } from "./chunk-U7AMFQ6G.js";
16
+ } from "./chunk-BN5KOC5O.js";
17
17
  import {
18
18
  ensureBrowser,
19
19
  findBrowser
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-IHFUKJOR.js";
10
10
  import {
11
11
  trackCommandFailure
12
- } from "./chunk-CDTPNYO3.js";
12
+ } from "./chunk-NPHNGWJH.js";
13
13
  import {
14
14
  failCommand
15
15
  } from "./chunk-PBN6GBJE.js";
@@ -6,8 +6,8 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
 
8
8
  // src/version.ts
9
- var VERSION = true ? "0.8.119" : "0.0.0-dev";
10
- var PRODUCER_VERSION = true ? "0.8.119" : "0.0.0-dev";
9
+ var VERSION = true ? "0.8.121" : "0.0.0-dev";
10
+ var PRODUCER_VERSION = true ? "0.8.121" : "0.0.0-dev";
11
11
 
12
12
  export {
13
13
  VERSION,
@@ -19,7 +19,7 @@ import {
19
19
  import {
20
20
  formatVariableValidationIssue,
21
21
  validateVariables
22
- } from "./chunk-2WKWEB4T.js";
22
+ } from "./chunk-RCNDZEBU.js";
23
23
  import {
24
24
  extractCompositionMetadata
25
25
  } from "./chunk-FSLYPQ5Z.js";
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
7
7
 
8
8
  // src/utils/producer.ts
9
9
  async function loadProducer() {
10
- return await import("./src-GGDAYPPK.js");
10
+ return await import("./src-RNEWLAP6.js");
11
11
  }
12
12
 
13
13
  export {
@@ -5,11 +5,10 @@ var require = __hf_createRequire(import.meta.url);
5
5
  var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
- apiBaseUrl,
9
- buildAuthHeaders,
10
- refreshTokens,
11
- resolveCredential
12
- } from "./chunk-DNXD7TOA.js";
8
+ forceRefreshCredentials,
9
+ resolveCloudAuthHeaders,
10
+ resolveCloudBaseUrl
11
+ } from "./chunk-SHB5VDMH.js";
13
12
  import {
14
13
  errorBox
15
14
  } from "./chunk-IHFUKJOR.js";
@@ -277,38 +276,6 @@ var HyperframesCloudClient = class {
277
276
  }
278
277
  };
279
278
 
280
- // src/cloud/auth.ts
281
- async function resolveCloudAuthHeaders() {
282
- let credential = await resolveCredential();
283
- credential = await refreshIfNeeded(credential);
284
- return buildAuthHeaders(credential);
285
- }
286
- function resolveCloudBaseUrl() {
287
- return apiBaseUrl();
288
- }
289
- async function refreshIfNeeded(credential) {
290
- if (credential.type !== "oauth") return credential;
291
- if (!credential.refreshable || !credential.refresh_token) return credential;
292
- const fresh = await refreshTokens(credential.refresh_token);
293
- return {
294
- ...credential,
295
- access_token: fresh.access_token,
296
- expires_at: parseDateOrUndef(fresh.expires_at),
297
- refreshable: false,
298
- ...fresh.refresh_token ? { refresh_token: fresh.refresh_token } : {}
299
- };
300
- }
301
- function parseDateOrUndef(value) {
302
- if (!value) return void 0;
303
- const d = new Date(value);
304
- return Number.isNaN(d.getTime()) ? void 0 : d;
305
- }
306
- async function forceRefreshCredentials() {
307
- const credential = await resolveCredential();
308
- if (credential.type !== "oauth" || !credential.refresh_token) return;
309
- await refreshTokens(credential.refresh_token);
310
- }
311
-
312
279
  // src/cloud/index.ts
313
280
  async function createCloudClient() {
314
281
  const client = new HyperframesCloudClient({
@@ -7,29 +7,29 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  RegistryCompatibilityError,
9
9
  gateRegistryItemsCompatibility
10
- } from "./chunk-P6UJ22SS.js";
10
+ } from "./chunk-2C6UJPQS.js";
11
11
  import {
12
12
  DEFAULT_PROJECT_CONFIG,
13
13
  createProjectConfig,
14
14
  loadProjectConfig,
15
15
  projectConfigPath,
16
16
  recordProjectRegistryItems
17
- } from "./chunk-WJP3UOB3.js";
17
+ } from "./chunk-3WXWL7AY.js";
18
18
  import {
19
19
  resolveItemWithDependencies,
20
20
  resolveItemsByTag
21
- } from "./chunk-4PTKEI2C.js";
21
+ } from "./chunk-JACPHNUK.js";
22
22
  import {
23
23
  InvalidVariableValuesError,
24
24
  prepareItem,
25
25
  publishItem
26
- } from "./chunk-FNX7RJIJ.js";
26
+ } from "./chunk-KYDM3W7A.js";
27
27
  import {
28
28
  DEFAULT_REGISTRY_URL
29
- } from "./chunk-PPTHGZTG.js";
29
+ } from "./chunk-ZBMQOBQK.js";
30
30
  import {
31
31
  trackRegistryItemAdded
32
- } from "./chunk-CDTPNYO3.js";
32
+ } from "./chunk-NPHNGWJH.js";
33
33
  import {
34
34
  c
35
35
  } from "./chunk-ZTZA4UWZ.js";
@@ -41,7 +41,7 @@ import {
41
41
  } from "./chunk-PBN6GBJE.js";
42
42
  import {
43
43
  ITEM_TYPE_DIRS
44
- } from "./chunk-2WKWEB4T.js";
44
+ } from "./chunk-RCNDZEBU.js";
45
45
  import {
46
46
  isProjectRootMissing,
47
47
  realpath
@@ -9,6 +9,7 @@ import {
9
9
  dedupeClonedCompositionId,
10
10
  findTargetElement,
11
11
  isHTMLElement,
12
+ nextUniqueId,
12
13
  parseSourceDocument,
13
14
  patchElementInHtml,
14
15
  probeElementInSource,
@@ -20,7 +21,7 @@ import {
20
21
  splitElementInHtml,
21
22
  unwrapElementsFromHtml,
22
23
  wrapElementsInHtml
23
- } from "./chunk-HNOJAFT2.js";
24
+ } from "./chunk-3DCZIHXE.js";
24
25
  import {
25
26
  atomicTempPath,
26
27
  createFileAtomically,
@@ -33,7 +34,7 @@ import {
33
34
  measureAudio,
34
35
  requiredFfmpeg,
35
36
  resolveLocalAudioPath
36
- } from "./chunk-BKQXLO55.js";
37
+ } from "./chunk-JREV7WVY.js";
37
38
  import {
38
39
  PROXY_PARAMS_VERSION,
39
40
  PROXY_PENDING_RETRY_AFTER_SECONDS,
@@ -59,7 +60,7 @@ import {
59
60
  shouldPrewarmProxy,
60
61
  waitForProxy,
61
62
  walkDir
62
- } from "./chunk-OWMGDQBZ.js";
63
+ } from "./chunk-SJ64QY5Z.js";
63
64
  import {
64
65
  findTimelineScript,
65
66
  parseGsapScriptAcorn
@@ -80,7 +81,7 @@ import {
80
81
  motionPathPluginUrl,
81
82
  parseFps,
82
83
  sameInstant
83
- } from "./chunk-2WKWEB4T.js";
84
+ } from "./chunk-RCNDZEBU.js";
84
85
  import {
85
86
  MagicString,
86
87
  VALID_CANVAS_RESOLUTIONS,
@@ -89,7 +90,7 @@ import {
89
90
  import {
90
91
  addScenePartsManifest,
91
92
  ensureHfIds
92
- } from "./chunk-5IABQ7OX.js";
93
+ } from "./chunk-GPGWCFIA.js";
93
94
  import {
94
95
  findStartTags,
95
96
  injectScriptsIntoHtml,
@@ -99,7 +100,7 @@ import {
99
100
  resolveRateSpec,
100
101
  sourceTimeAt,
101
102
  stripEmbeddedRuntimeScripts
102
- } from "./chunk-SHLFJFPM.js";
103
+ } from "./chunk-PATLRNZA.js";
103
104
  import {
104
105
  ProjectRootMissingError,
105
106
  folderGone,
@@ -6021,6 +6022,21 @@ function foldElementPatches(originalContent, patches) {
6021
6022
  return { content, matched };
6022
6023
  }
6023
6024
  var PATCH_CONFLICT_ATTEMPTS = 3;
6025
+ var ID_ATTRIBUTE = /[\s"'/]id\s*=\s*(?=(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+)))/gi;
6026
+ function projectHtmlIds(projectDir) {
6027
+ const ids = /* @__PURE__ */ new Set();
6028
+ for (const rel of walkDir(projectDir)) {
6029
+ if (!rel.endsWith(".html") || isInHiddenOrVendorDir(rel)) continue;
6030
+ let html;
6031
+ try {
6032
+ html = readFileSync32(join52(projectDir, rel), "utf-8");
6033
+ } catch {
6034
+ continue;
6035
+ }
6036
+ for (const m of html.matchAll(ID_ATTRIBUTE)) ids.add(m[1] ?? m[2] ?? m[3] ?? "");
6037
+ }
6038
+ return ids;
6039
+ }
6024
6040
  function commitElementPatchBatches(projectDir, batches, writeFile2 = (path, content) => replaceFileAtomically(path, content, statSync32(path).mode), requestToken) {
6025
6041
  for (let attempt = 1; ; attempt += 1) {
6026
6042
  try {
@@ -6568,7 +6584,7 @@ async function prepareGsapMutationScript(c, res, firstMutation) {
6568
6584
  let block = extractGsapScriptBlock(html);
6569
6585
  if (!block && (firstMutation.type === "add" || firstMutation.type === "add-with-keyframes")) {
6570
6586
  const compId = html.match(/data-composition-id="([^"]+)"/)?.[1] ?? "main";
6571
- const { GSAP_CDN } = await import("./dist-NP53GO3N.js");
6587
+ const { GSAP_CDN } = await import("./dist-JGUAVYZS.js");
6572
6588
  const bootstrap = [
6573
6589
  `<script src="${GSAP_CDN}"></script>`,
6574
6590
  "<script>",
@@ -7912,7 +7928,13 @@ function registerFileRoutes(api, adapter) {
7912
7928
  } catch {
7913
7929
  return c.json({ error: "not found" }, 404);
7914
7930
  }
7915
- const element = patchElementInHtml(originalContent, parsed.target, parsed.body.operations);
7931
+ const takenIds = parsed.body.operations.some((op) => op.type === "ensure-id") ? projectHtmlIds(ctx.project.dir) : void 0;
7932
+ const element = patchElementInHtml(
7933
+ originalContent,
7934
+ parsed.target,
7935
+ parsed.body.operations,
7936
+ takenIds
7937
+ );
7916
7938
  const { matched } = element;
7917
7939
  const patched = matched && isStudioFontFaceCss(fontFaceCss) ? ensureStudioFontFaceCss(element.html, fontFaceCss) : element.html;
7918
7940
  if (patched === originalContent) {
@@ -7922,6 +7944,7 @@ function registerFileRoutes(api, adapter) {
7922
7944
  ok: true,
7923
7945
  changed: false,
7924
7946
  matched,
7947
+ elementId: element.elementId,
7925
7948
  content: originalContent,
7926
7949
  path: ctx.filePath,
7927
7950
  version: version2
@@ -7945,6 +7968,7 @@ function registerFileRoutes(api, adapter) {
7945
7968
  ok: true,
7946
7969
  changed: true,
7947
7970
  matched,
7971
+ elementId: element.elementId,
7948
7972
  content: patched,
7949
7973
  path: ctx.filePath,
7950
7974
  version,
@@ -9884,11 +9908,6 @@ function spans(el, time) {
9884
9908
  if (start === null || duration === null) return false;
9885
9909
  return time > start + EPSILON && time < start + duration - EPSILON;
9886
9910
  }
9887
- function uniqueId(document2, base) {
9888
- let id = base;
9889
- for (let n = 2; document2.getElementById(id); n++) id = `${base}-${n}`;
9890
- return id;
9891
- }
9892
9911
  function shiftTracks(document2, tracks, from, by) {
9893
9912
  for (const el of document2.querySelectorAll("[data-start]")) {
9894
9913
  if (el.hasAttribute("data-composition-id") || !tracks.has(trackOf(el))) continue;
@@ -9972,7 +9991,7 @@ function applyFreezeFrameToHtml(html, input) {
9972
9991
  shiftTracks(document2, tracks, input.playhead, hold);
9973
9992
  const leftHalf = findTargetElement(document2, input.target);
9974
9993
  if (!leftHalf?.parentElement) return null;
9975
- const freezeId = uniqueId(document2, `${video.getAttribute("id") || "clip"}-freeze`);
9994
+ const freezeId = nextUniqueId(document2, `${video.getAttribute("id") || "clip"}-freeze`);
9976
9995
  const still = buildStill(document2, leftHalf, {
9977
9996
  id: freezeId,
9978
9997
  imageSrc: input.imageSrc,
@@ -11003,23 +11022,17 @@ function duplicateElementInHtml(source, target, newId, at) {
11003
11022
  if (duration === null || numericAttribute(element, "data-start") === null) {
11004
11023
  return { html: source, matched: false, newId: null };
11005
11024
  }
11006
- const uniqueId2 = nextUniqueId(document2, newId);
11025
+ const uniqueId = nextUniqueId(document2, newId);
11007
11026
  rippleElements(document2, element, at, duration, track);
11008
11027
  const clone = element.cloneNode(true);
11009
11028
  if (!isHTMLElement(clone)) return { html: source, matched: false, newId: null };
11010
- clone.setAttribute("id", uniqueId2);
11029
+ clone.setAttribute("id", uniqueId);
11011
11030
  dedupeClonedCompositionId(document2, clone);
11012
11031
  stripStableIds(clone);
11013
11032
  clone.setAttribute("data-start", String(at));
11014
11033
  element.parentElement.insertBefore(clone, element.nextSibling);
11015
11034
  const html = wrappedFragment ? document2.body.innerHTML || "" : document2.toString();
11016
- return { html: ensureHfIds(html), matched: true, newId: uniqueId2 };
11017
- }
11018
- function nextUniqueId(document2, newId) {
11019
- let uniqueId2 = newId;
11020
- let suffix = 2;
11021
- while (document2.getElementById(uniqueId2)) uniqueId2 = `${newId}-${suffix++}`;
11022
- return uniqueId2;
11035
+ return { html: ensureHfIds(html), matched: true, newId: uniqueId };
11023
11036
  }
11024
11037
  function rippleElements(document2, element, at, duration, track) {
11025
11038
  for (const candidate of Array.from(document2.querySelectorAll("[data-start][data-duration]"))) {
@@ -27,7 +27,7 @@ import {
27
27
  } from "./chunk-GMECXFAN.js";
28
28
  import {
29
29
  ITEM_TYPE_DIRS
30
- } from "./chunk-2WKWEB4T.js";
30
+ } from "./chunk-RCNDZEBU.js";
31
31
  import {
32
32
  realProjectRoot
33
33
  } from "./chunk-OFQWTKPW.js";
@@ -10,7 +10,7 @@ import {
10
10
  hasPreservedUnknownData,
11
11
  readStore,
12
12
  writeStore
13
- } from "./chunk-DNXD7TOA.js";
13
+ } from "./chunk-I465DBM6.js";
14
14
 
15
15
  // src/auth/user.ts
16
16
  function isUserInfoEmpty(u) {
@@ -6,10 +6,10 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  getMimeType
9
- } from "./chunk-ZTU5PYQJ.js";
9
+ } from "./chunk-YJMQLWG4.js";
10
10
  import {
11
11
  injectTagsAtHeadStart
12
- } from "./chunk-SHLFJFPM.js";
12
+ } from "./chunk-PATLRNZA.js";
13
13
 
14
14
  // src/utils/compositionServer.ts
15
15
  import { createHash } from "crypto";
@@ -6,34 +6,34 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  redactHome
9
- } from "./chunk-EEXM24SY.js";
9
+ } from "./chunk-OWPHLEDI.js";
10
10
  import "./chunk-Z27A7NUB.js";
11
11
  import "./chunk-5ETJX6WM.js";
12
12
  import {
13
13
  loadProducer
14
- } from "./chunk-2MMAA5I3.js";
14
+ } from "./chunk-XLG5C3XA.js";
15
+ import {
16
+ formatBytes
17
+ } from "./chunk-IHFUKJOR.js";
15
18
  import {
16
19
  DEFAULT_HISTORY_ROOT,
17
20
  listProjectHistories,
18
21
  pruneGoneProjectHistories
19
- } from "./chunk-ZTU5PYQJ.js";
20
- import "./chunk-HNOJAFT2.js";
22
+ } from "./chunk-YJMQLWG4.js";
23
+ import "./chunk-3DCZIHXE.js";
21
24
  import "./chunk-EOVYQ3IG.js";
22
- import "./chunk-BKQXLO55.js";
25
+ import "./chunk-JREV7WVY.js";
23
26
  import {
24
27
  CACHE_DIR_NAME,
25
28
  cleanupProxyCache
26
- } from "./chunk-OWMGDQBZ.js";
27
- import {
28
- formatBytes
29
- } from "./chunk-IHFUKJOR.js";
30
- import "./chunk-OV62R47Q.js";
29
+ } from "./chunk-SJ64QY5Z.js";
30
+ import "./chunk-VU4KRDRL.js";
31
31
  import "./chunk-TVCRUG2S.js";
32
32
  import "./chunk-TRLP3CSL.js";
33
33
  import {
34
34
  c
35
35
  } from "./chunk-ZTZA4UWZ.js";
36
- import "./chunk-U7AMFQ6G.js";
36
+ import "./chunk-BN5KOC5O.js";
37
37
  import "./chunk-AMKC3AXA.js";
38
38
  import {
39
39
  defineCommand
@@ -48,12 +48,12 @@ import {
48
48
  directorySizeBytes,
49
49
  gcExtractionCache,
50
50
  resolveExtractCacheDir
51
- } from "./chunk-IUBZ3DSO.js";
52
- import "./chunk-2WKWEB4T.js";
51
+ } from "./chunk-MNMD6XLG.js";
52
+ import "./chunk-RCNDZEBU.js";
53
53
  import "./chunk-FSLYPQ5Z.js";
54
54
  import "./chunk-DPVXBVLL.js";
55
- import "./chunk-5IABQ7OX.js";
56
- import "./chunk-SHLFJFPM.js";
55
+ import "./chunk-GPGWCFIA.js";
56
+ import "./chunk-PATLRNZA.js";
57
57
  import "./chunk-VC76R6W2.js";
58
58
  import "./chunk-OFQWTKPW.js";
59
59
  import "./chunk-4PFZPP2N.js";
@@ -67,12 +67,12 @@ import "./chunk-GK4AIFIH.js";
67
67
  import "./chunk-2PSPARWP.js";
68
68
  import {
69
69
  withMeta
70
- } from "./chunk-FRIRP3DN.js";
70
+ } from "./chunk-7VXU7E5S.js";
71
71
  import "./chunk-K4WIOZFP.js";
72
72
  import "./chunk-XUXGIA7H.js";
73
73
  import "./chunk-WERLJGIC.js";
74
74
  import "./chunk-ISN5GRYI.js";
75
- import "./chunk-3NXDJSD5.js";
75
+ import "./chunk-WG4IZWEH.js";
76
76
  import "./chunk-KNU5COPB.js";
77
77
  import "./chunk-XT5P4QMO.js";
78
78
  import "./chunk-6BEFEWFB.js";