hyperframes 0.8.116 → 0.8.118

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 (147) hide show
  1. package/dist/{add-5AOKGJRR.js → add-3S6KP4AK.js} +14 -14
  2. package/dist/{animatedGifPrep-XKCVQ4ZL.js → animatedGifPrep-Q43TI2YV.js} +5 -5
  3. package/dist/{asset-QE74HE7H.js → asset-EMLJLATM.js} +2 -2
  4. package/dist/{assetCataloger-3VJRWB3N.js → assetCataloger-Y23LGNYN.js} +2 -2
  5. package/dist/{auth-HQE2GKY2.js → auth-4Z7VZPCZ.js} +2 -2
  6. package/dist/{autoUpdate-MH57H575.js → autoUpdate-PGW6OY5X.js} +2 -2
  7. package/dist/{backgroundChecks-JP2GHEP4.js → backgroundChecks-O6QYKWTF.js} +3 -3
  8. package/dist/backgroundChecksWorker.js +3 -3
  9. package/dist/{batchRender-KIFBKKVN.js → batchRender-TEZOU3YE.js} +3 -3
  10. package/dist/{beats-V334Q2GV.js → beats-APZ6AZGK.js} +11 -11
  11. package/dist/{benchmark-62QZH5YE.js → benchmark-F5L6KI64.js} +11 -11
  12. package/dist/{browser-EK7OBU6W.js → browser-Y5BMYRTQ.js} +8 -8
  13. package/dist/{bundleWithLocalizedFonts-263BUY7C.js → bundleWithLocalizedFonts-GSZWNYEA.js} +2 -2
  14. package/dist/{capture-6F3XPKXI.js → capture-K4HV4DA6.js} +2 -2
  15. package/dist/{capture-56HMZGJW.js → capture-ZBBG543M.js} +8 -8
  16. package/dist/{catalog-JO7WHBYC.js → catalog-H2NX2XRP.js} +14 -14
  17. package/dist/{check-S4RZIS26.js → check-CCUKKQ2W.js} +30 -30
  18. package/dist/{checkBrowser-NVWULRE7.js → checkBrowser-VGS4QPIS.js} +29 -29
  19. package/dist/{chunk-TY76XMMP.js → chunk-5AREBP56.js} +1 -1
  20. package/dist/{chunk-MZPMAU25.js → chunk-7CXLMMUA.js} +1 -1
  21. package/dist/{chunk-EWR3SLQV.js → chunk-BYYKHP54.js} +1 -1
  22. package/dist/{chunk-7Z2XNQ7F.js → chunk-CNQ565U6.js} +2 -2
  23. package/dist/{chunk-34AE4KPB.js → chunk-D6YMMYSZ.js} +2 -2
  24. package/dist/{chunk-63O3AR5U.js → chunk-DA5FLVIF.js} +12 -4
  25. package/dist/{chunk-ENQL7NCM.js → chunk-DI6EGQVC.js} +3 -3
  26. package/dist/{chunk-IGWZCCLO.js → chunk-FEUS6YMC.js} +7 -7
  27. package/dist/{chunk-JYB7NKO6.js → chunk-FQ4EMFVL.js} +3 -3
  28. package/dist/{chunk-GNQF4NZW.js → chunk-FWZHAEIF.js} +1 -1
  29. package/dist/{chunk-VLB4NGRR.js → chunk-GCARCDLC.js} +1 -1
  30. package/dist/{chunk-WUUEWXA2.js → chunk-GCPMAZQ2.js} +1 -1
  31. package/dist/{chunk-SXV67HVP.js → chunk-HONQFJNH.js} +93 -73
  32. package/dist/{chunk-AKZD7VWZ.js → chunk-I47W3MA3.js} +14 -2
  33. package/dist/{chunk-2E4A277E.js → chunk-JPRW4XXE.js} +1 -1
  34. package/dist/{chunk-DRLB5STV.js → chunk-JR27ESBU.js} +2 -2
  35. package/dist/{chunk-VJ2RAP65.js → chunk-K4SAACM7.js} +2 -2
  36. package/dist/{chunk-JBZYEZPZ.js → chunk-KDI2GPBM.js} +1 -1
  37. package/dist/{chunk-KNCLHJB5.js → chunk-KUTZBSIW.js} +2 -2
  38. package/dist/{chunk-WWL6YGYK.js → chunk-L6TT37IY.js} +1 -1
  39. package/dist/{chunk-C47XJXSK.js → chunk-LR4O57S2.js} +9 -9
  40. package/dist/{chunk-FERBBWDU.js → chunk-MNC2KEC6.js} +1 -1
  41. package/dist/{chunk-CCWSLTWA.js → chunk-MWCROBLZ.js} +9 -8
  42. package/dist/{chunk-WN62HDA7.js → chunk-N7PX6IO4.js} +1 -1
  43. package/dist/{chunk-PAZUQZYV.js → chunk-OTCO5QAK.js} +1 -1
  44. package/dist/{chunk-NCQV2NMY.js → chunk-PDAPLJXH.js} +1 -1
  45. package/dist/{chunk-IX75NQSA.js → chunk-PXHMTKFZ.js} +2 -2
  46. package/dist/{chunk-6FRHKGRY.js → chunk-PZ3SCTYJ.js} +1 -1
  47. package/dist/{chunk-QITH7ALB.js → chunk-QJ3ODWQ3.js} +4 -4
  48. package/dist/{chunk-23KZNTIV.js → chunk-R6BVKVII.js} +1 -1
  49. package/dist/{chunk-6TSA2KDM.js → chunk-SVUKHYTG.js} +1 -1
  50. package/dist/{chunk-VU5IDWKX.js → chunk-TLDEZQG2.js} +1 -1
  51. package/dist/{chunk-FFF36PQA.js → chunk-TOS2MNWW.js} +2 -2
  52. package/dist/{chunk-PHBPRHKK.js → chunk-U7FPFCI7.js} +1 -1
  53. package/dist/{chunk-TEYBS6T3.js → chunk-UCKAUBNA.js} +5 -5
  54. package/dist/{chunk-EWUI4PU6.js → chunk-W4UNEYYH.js} +1 -1
  55. package/dist/{chunk-XTCMIITZ.js → chunk-WXQLHFXI.js} +1 -1
  56. package/dist/{chunk-S5Q46UEI.js → chunk-XI77IJXJ.js} +5 -5
  57. package/dist/{chunk-YX55Y7UO.js → chunk-XJOUFF2F.js} +9 -9
  58. package/dist/{chunk-2HE5ZOXK.js → chunk-XJTER22X.js} +1 -1
  59. package/dist/{chunk-CHWO3UN6.js → chunk-Y523LGYR.js} +2 -2
  60. package/dist/{chunk-RTLYNXAC.js → chunk-YO6TVUAJ.js} +1 -1
  61. package/dist/{chunk-CVE7OUZE.js → chunk-ZRXUZ2NU.js} +3 -3
  62. package/dist/{clean-DPW2FTMM.js → clean-WWCCHAD6.js} +14 -14
  63. package/dist/cli.js +50 -50
  64. package/dist/{cloud-OAYSRXAJ.js → cloud-EAJRM253.js} +4 -4
  65. package/dist/{cloudrun-NM2ZMAJV.js → cloudrun-6Q2EJYVH.js} +3 -3
  66. package/dist/{compare-CZC6ROYF.js → compare-XQ6ZW7VX.js} +24 -24
  67. package/dist/{compiler-3MFRD377.js → compiler-66K2RT7V.js} +2 -2
  68. package/dist/{component-6D5RBOWZ.js → component-55HRN5XR.js} +3 -3
  69. package/dist/{compositions-5KCUVODZ.js → compositions-GHHXSBHE.js} +10 -10
  70. package/dist/{delete-ZGLELTUJ.js → delete-EM7MGX3J.js} +2 -2
  71. package/dist/{dist-XSSXGBRH.js → dist-5CN37P7P.js} +2 -2
  72. package/dist/{doctor-CICSVC7I.js → doctor-DQDHQZXD.js} +9 -9
  73. package/dist/{events-Y4NBIJBP.js → events-SQRZ2NYO.js} +8 -8
  74. package/dist/{events-V3O6Q5ZH.js → events-Y6SCC5LR.js} +7 -7
  75. package/dist/{feedback-EA3K6QXT.js → feedback-R5KCVSR5.js} +9 -9
  76. package/dist/{figma-WOOHCXDA.js → figma-6CHD45P2.js} +3 -3
  77. package/dist/fontLocalizeCli.js +7 -7
  78. package/dist/{get-64SDPINM.js → get-3T52JGUQ.js} +2 -2
  79. package/dist/{gpuPolicy-TFCLAD64.js → gpuPolicy-AXT3ZIXS.js} +5 -5
  80. package/dist/{grade-compare-NXAFWDBR.js → grade-compare-SPWLJSY2.js} +27 -25
  81. package/dist/{gsapParser-KVMPC2SC.js → gsapParser-ZGBBDA54.js} +30 -12
  82. package/dist/{help-6H4ICA27.js → help-ZR5MP5UU.js} +1 -1
  83. package/dist/{history-TPRRROOR.js → history-F2MOFF25.js} +14 -14
  84. package/dist/hyperframe-runtime.js +33 -33
  85. package/dist/hyperframe.manifest.json +1 -1
  86. package/dist/hyperframe.runtime.iife.js +33 -33
  87. package/dist/hyperframes-player.global.js +1 -1
  88. package/dist/{info-DDXWWAM3.js → info-BH6XM6PU.js} +10 -10
  89. package/dist/{init-KULZFAS7.js → init-TFQQ54JU.js} +21 -21
  90. package/dist/{inspect-VEJH72DJ.js → inspect-GL35XBUV.js} +25 -25
  91. package/dist/{installer-TBL3PE2J.js → installer-CJS2BO3E.js} +4 -4
  92. package/dist/{keyframes-W6KIRZ4O.js → keyframes-6WRSQWF3.js} +11 -11
  93. package/dist/{lambda-JJXODPS5.js → lambda-GWFX55EE.js} +4 -4
  94. package/dist/{layout-KVG7PJ3F.js → layout-Q7GJFMWL.js} +25 -25
  95. package/dist/{lint-GQ5IVVCN.js → lint-AGVDEHRD.js} +11 -11
  96. package/dist/{list-QZ7LV6HF.js → list-P56UBPBI.js} +2 -2
  97. package/dist/{login-526R3KCB.js → login-DGA2JL24.js} +4 -4
  98. package/dist/{media-treatment-H7LGSO3I.js → media-treatment-HX2PRGEN.js} +11 -11
  99. package/dist/{models-WOEP555T.js → models-LM3OQBZK.js} +6 -6
  100. package/dist/{motionShot-235LNUY7.js → motionShot-RFT7CMBB.js} +10 -10
  101. package/dist/{normalize-audio-GTAESDG6.js → normalize-audio-E3RFEHHI.js} +10 -10
  102. package/dist/{pipeline-NBHOEZPA.js → pipeline-HDOQRVOB.js} +5 -5
  103. package/dist/{play-SBTJLOWX.js → play-2GTIXCRQ.js} +19 -19
  104. package/dist/{preflight-KQCXRC6W.js → preflight-UDMLHFS5.js} +6 -6
  105. package/dist/{present-TXULFA2J.js → present-LF2OM7BN.js} +15 -15
  106. package/dist/{preview-E2U4ER7H.js → preview-FBW5SEQD.js} +16 -16
  107. package/dist/{producer-DR3TOPSC.js → producer-X4YXKWD5.js} +1 -1
  108. package/dist/{projectConfig-QBYFCJYE.js → projectConfig-ST22CO2D.js} +6 -6
  109. package/dist/{publication-TWGRIP5F.js → publication-FZY2NLGL.js} +2 -2
  110. package/dist/{publish-JOUHOKGX.js → publish-CI3UZKGR.js} +7 -7
  111. package/dist/{remove-background-GQZIZBHM.js → remove-background-ZBSZ3HAG.js} +6 -6
  112. package/dist/{render-UVGS7PLJ.js → render-ECICJRKC.js} +20 -20
  113. package/dist/{render-2LC2DUR3.js → render-JKL6KFIS.js} +11 -11
  114. package/dist/{render-JR3YIYZ4.js → render-PT5KRN5E.js} +3 -3
  115. package/dist/{render-batch-MYH6ZGO3.js → render-batch-S4MKBU4I.js} +3 -3
  116. package/dist/{renderCancellation-EIBZHTFW.js → renderCancellation-4X2JXB54.js} +5 -5
  117. package/dist/{resolver-4Z5YISAU.js → resolver-IAWRYTA6.js} +4 -4
  118. package/dist/{sherpa-UX3MQXO5.js → sherpa-CL4LNREK.js} +6 -6
  119. package/dist/{skills-GXETMIED.js → skills-F4ZESP7J.js} +10 -10
  120. package/dist/{skillsUpdateCheck-XS7OE6FX.js → skillsUpdateCheck-VRWBVQRX.js} +3 -3
  121. package/dist/{snapshot-OAHQ3EVJ.js → snapshot-ORYO5ZGK.js} +25 -25
  122. package/dist/{src-X6ACPJHG.js → src-5DVUT7WJ.js} +4 -4
  123. package/dist/{src-AZ5YCYQP.js → src-HJYZAMBR.js} +6 -6
  124. package/dist/{staticProjectServer-P4QSLLF6.js → staticProjectServer-PHOMSVUD.js} +13 -13
  125. package/dist/{status-KDRWJBPW.js → status-AOAHP4RA.js} +5 -5
  126. package/dist/studio/assets/{hyperframes-player-mGYvPVpw.js → hyperframes-player-CnpIuNRl.js} +1 -1
  127. package/dist/studio/assets/{index-DYNaXPVf.js → index-B4SbAADe.js} +196 -194
  128. package/dist/studio/assets/{index-Dr3hNpvS.js → index-BZ23-h1_.js} +1 -1
  129. package/dist/studio/assets/{index-BWHt0-ir.js → index-FeRU6G3G.js} +1 -1
  130. package/dist/studio/index.d.ts +29 -19
  131. package/dist/studio/index.html +1 -1
  132. package/dist/studio/index.js +2366 -2305
  133. package/dist/studio/index.js.map +1 -1
  134. package/dist/{studio-api-SYQOPCMB.js → studio-api-HAY3XELJ.js} +7 -7
  135. package/dist/{studioServer-ANSX6DY2.js → studioServer-VZYT5MYF.js} +37 -37
  136. package/dist/{system-B6UYANYL.js → system-U22WZ4QS.js} +5 -5
  137. package/dist/{telemetry-AZEW2DZP.js → telemetry-CLPATL2D.js} +8 -8
  138. package/dist/{timeline-VIKY65W6.js → timeline-5GFZ3VTQ.js} +14 -14
  139. package/dist/{tokens-SSGCAC7E.js → tokens-MZZ4FLYN.js} +2 -2
  140. package/dist/{transcribe-O33POKJY.js → transcribe-C6JZ3YM4.js} +11 -11
  141. package/dist/{transcribe-PF6BUHHQ.js → transcribe-FIRUSTL7.js} +6 -6
  142. package/dist/{updateCheck-Y4SUY6VE.js → updateCheck-WOW7SP7I.js} +2 -2
  143. package/dist/{upgrade-EGIS5OCB.js → upgrade-I54CASRP.js} +2 -2
  144. package/dist/{urlDownloader-UBY27GFW.js → urlDownloader-BK3MFIPW.js} +4 -4
  145. package/dist/{validate-FE74RMPD.js → validate-IZNFBUOL.js} +15 -15
  146. package/dist/{video-DODRESEY.js → video-3JQY7QPM.js} +5 -5
  147. package/package.json +1 -1
@@ -20,7 +20,7 @@ import {
20
20
  splitElementInHtml,
21
21
  unwrapElementsFromHtml,
22
22
  wrapElementsInHtml
23
- } from "./chunk-34AE4KPB.js";
23
+ } from "./chunk-D6YMMYSZ.js";
24
24
  import {
25
25
  atomicTempPath,
26
26
  createFileAtomically,
@@ -33,7 +33,7 @@ import {
33
33
  measureAudio,
34
34
  requiredFfmpeg,
35
35
  resolveLocalAudioPath
36
- } from "./chunk-23KZNTIV.js";
36
+ } from "./chunk-R6BVKVII.js";
37
37
  import {
38
38
  PROXY_PARAMS_VERSION,
39
39
  PROXY_PENDING_RETRY_AFTER_SECONDS,
@@ -59,7 +59,7 @@ import {
59
59
  shouldPrewarmProxy,
60
60
  waitForProxy,
61
61
  walkDir
62
- } from "./chunk-TY76XMMP.js";
62
+ } from "./chunk-5AREBP56.js";
63
63
  import {
64
64
  findTimelineScript,
65
65
  parseGsapScriptAcorn
@@ -76,9 +76,11 @@ import {
76
76
  } from "./chunk-TJSTGSAW.js";
77
77
  import {
78
78
  formatRenderOutputTimestamp,
79
+ gsapCdnDist,
80
+ motionPathPluginUrl,
79
81
  parseFps,
80
82
  sameInstant
81
- } from "./chunk-AKZD7VWZ.js";
83
+ } from "./chunk-I47W3MA3.js";
82
84
  import {
83
85
  MagicString,
84
86
  VALID_CANVAS_RESOLUTIONS,
@@ -87,7 +89,7 @@ import {
87
89
  import {
88
90
  addScenePartsManifest,
89
91
  ensureHfIds
90
- } from "./chunk-MZPMAU25.js";
92
+ } from "./chunk-7CXLMMUA.js";
91
93
  import {
92
94
  findStartTags,
93
95
  injectScriptsIntoHtml,
@@ -97,7 +99,7 @@ import {
97
99
  resolveRateSpec,
98
100
  sourceTimeAt,
99
101
  stripEmbeddedRuntimeScripts
100
- } from "./chunk-WWL6YGYK.js";
102
+ } from "./chunk-L6TT37IY.js";
101
103
  import {
102
104
  ProjectRootMissingError,
103
105
  folderGone,
@@ -2185,9 +2187,11 @@ var PROP_TO_GROUP2 = /* @__PURE__ */ new Map();
2185
2187
  for (const [group, props] of Object.entries(PROPERTY_GROUPS2)) {
2186
2188
  for (const p of props) PROP_TO_GROUP2.set(p, group);
2187
2189
  }
2190
+ function writesProperty(animation, property) {
2191
+ return property in animation.properties || !!animation.fromProperties && property in animation.fromProperties || !!animation.keyframes?.keyframes.some((k) => property in k.properties);
2192
+ }
2188
2193
  function isXYPositionWrite(a) {
2189
- const xy = (props) => !!props && ("x" in props || "y" in props);
2190
- return a.propertyGroup === "position" && (xy(a.properties) || xy(a.fromProperties) || !!a.keyframes?.keyframes.some((k) => xy(k.properties)));
2194
+ return a.propertyGroup === "position" && (writesProperty(a, "x") || writesProperty(a, "y"));
2191
2195
  }
2192
2196
  function classifyPropertyGroup2(prop) {
2193
2197
  return PROP_TO_GROUP2.get(prop) ?? "other";
@@ -2202,6 +2206,30 @@ function classifyTweenPropertyGroup(properties) {
2202
2206
  if (groups.size === 1) return groups.values().next().value;
2203
2207
  return void 0;
2204
2208
  }
2209
+ function knownStart(animation) {
2210
+ if (animation.resolvedStart !== void 0) return animation.resolvedStart;
2211
+ return typeof animation.position === "number" ? animation.position : void 0;
2212
+ }
2213
+ function positionHoldForAnimation(animation, animations) {
2214
+ if (!animation.keyframes) return null;
2215
+ const start = knownStart(animation) ?? 0;
2216
+ if (!(start > 1e-3)) return null;
2217
+ const first = [...animation.keyframes.keyframes].sort(
2218
+ (left, right) => left.percentage - right.percentage
2219
+ )[0];
2220
+ if (!first) return null;
2221
+ const earlier = animations.filter((other) => {
2222
+ const otherStart = knownStart(other);
2223
+ return other !== animation && !other.global && other.targetSelector === animation.targetSelector && otherStart !== void 0 && otherStart < start - 1e-3;
2224
+ });
2225
+ const position = {};
2226
+ for (const [property, value] of Object.entries(first.properties)) {
2227
+ if (classifyPropertyGroup2(property) !== "position" || typeof value !== "number") continue;
2228
+ if (earlier.some((other) => writesProperty(other, property))) continue;
2229
+ position[property] = value;
2230
+ }
2231
+ return Object.keys(position).length > 0 ? position : null;
2232
+ }
2205
2233
  function mergePercentageKeyframes(keyframes) {
2206
2234
  const byPercentage = /* @__PURE__ */ new Map();
2207
2235
  for (const keyframe of keyframes) {
@@ -4827,7 +4855,8 @@ function insertInheritedStateSetInScript(script, selector, position, properties)
4827
4855
  const tlDecl = findTimelineDeclarationStatement(parsed.ast, parsed.timelineVar);
4828
4856
  const firstLocated = parsed.located[0];
4829
4857
  if (tlDecl) {
4830
- ms.appendLeft(tlDecl.end, "\n" + code);
4858
+ const ownLineEnd = script[tlDecl.end] === "\n" ? "" : "\n";
4859
+ ms.appendLeft(tlDecl.end, "\n" + code + ownLineEnd);
4831
4860
  } else if (firstLocated) {
4832
4861
  const firstCall = firstLocated.call;
4833
4862
  const exprStmt = findEnclosingExpressionStatement(firstCall.ancestors);
@@ -4849,38 +4878,15 @@ function removeStudioHoldSets(script, parsed) {
4849
4878
  for (const hold of staleHolds) removeCallFromMagicString(ms, hold.call, script);
4850
4879
  return ms.toString();
4851
4880
  }
4852
- function animationStart(animation) {
4853
- if (animation.resolvedStart !== void 0) return animation.resolvedStart;
4854
- return typeof animation.position === "number" ? animation.position : 0;
4855
- }
4856
- function positionProperties(properties) {
4857
- const position = {};
4858
- for (const [property, value] of Object.entries(properties)) {
4859
- if (classifyPropertyGroup2(property) === "position" && typeof value === "number") {
4860
- position[property] = value;
4861
- }
4862
- }
4863
- return position;
4864
- }
4865
- function positionHoldForAnimation(animation) {
4866
- if (!animation.keyframes) return null;
4867
- if (!(animationStart(animation) > 1e-3)) return null;
4868
- const first = [...animation.keyframes.keyframes].sort(
4869
- (left, right) => left.percentage - right.percentage
4870
- )[0];
4871
- if (!first) return null;
4872
- const position = positionProperties(first.properties);
4873
- return Object.keys(position).length > 0 ? position : null;
4874
- }
4875
4881
  function syncPositionHoldsBeforeKeyframes(script) {
4876
4882
  const parsed = parseGsapScriptAcornForWrite(script);
4877
4883
  if (!parsed) return script;
4878
4884
  let result = removeStudioHoldSets(script, parsed);
4879
4885
  const current = parseGsapScriptAcornForWrite(result);
4880
4886
  if (!current) return result;
4881
- for (const entry of current.located) {
4882
- const animation = entry.animation;
4883
- const position = positionHoldForAnimation(animation);
4887
+ const animations = current.located.map((entry) => entry.animation);
4888
+ for (const animation of animations) {
4889
+ const position = positionHoldForAnimation(animation, animations);
4884
4890
  if (!position) continue;
4885
4891
  result = insertInheritedStateSetInScript(result, animation.targetSelector, 0, {
4886
4892
  ...position,
@@ -5220,23 +5226,23 @@ import { createHash as createHash32 } from "crypto";
5220
5226
  import { existsSync as existsSync7, readFileSync as readFileSync10, statSync as statSync7 } from "fs";
5221
5227
  import { join as join12, resolve as resolve52 } from "path";
5222
5228
  import { execFile } from "child_process";
5223
- import { existsSync as existsSync8, readFileSync as readFileSync11, statSync as statSync8 } from "fs";
5229
+ import { closeSync as closeSync32, openSync as openSync32, readFileSync as readFileSync11, rmSync as rmSync5, statSync as statSync8 } from "fs";
5224
5230
  import { dirname as dirname52, join as join13, relative as relative4, sep as sep22 } from "path";
5225
5231
  import { createHash as createHash5, randomBytes } from "crypto";
5226
- import { existsSync as existsSync9 } from "fs";
5227
- import { existsSync as existsSync10, readFileSync as readFileSync12, statSync as statSync9 } from "fs";
5232
+ import { existsSync as existsSync8 } from "fs";
5233
+ import { existsSync as existsSync9, readFileSync as readFileSync12, statSync as statSync9 } from "fs";
5228
5234
  import { join as join14, resolve as resolve6 } from "path";
5229
5235
  import { execFile as execFile2, spawn as spawn2 } from "child_process";
5230
5236
  import { promisify } from "util";
5231
- import { closeSync as closeSync32, constants as constants3, fstatSync as fstatSync3, openSync as openSync32, readSync } from "fs";
5237
+ import { closeSync as closeSync4, constants as constants3, fstatSync as fstatSync3, openSync as openSync4, readSync } from "fs";
5232
5238
  import { streamSSE as streamSSE2 } from "hono/streaming";
5233
- import { existsSync as existsSync11 } from "fs";
5239
+ import { existsSync as existsSync10 } from "fs";
5234
5240
  import { basename as basename22, dirname as dirname6, extname as extname2, join as join15, posix } from "path";
5235
- import { existsSync as existsSync12, readFileSync as readFileSync13 } from "fs";
5241
+ import { existsSync as existsSync11, readFileSync as readFileSync13 } from "fs";
5236
5242
  import { homedir as homedir2 } from "os";
5237
5243
  import { join as join16 } from "path";
5238
5244
  import { createHash as createHash6 } from "crypto";
5239
- import { readFileSync as readFileSync14, readdirSync as readdirSync5, rmSync as rmSync5 } from "fs";
5245
+ import { readFileSync as readFileSync14, readdirSync as readdirSync5, rmSync as rmSync6 } from "fs";
5240
5246
  import { join as join17 } from "path";
5241
5247
  async function filterCompositionFiles(projectDir, files) {
5242
5248
  const htmlFiles = files.filter((f) => f.endsWith(".html") && !isInHiddenOrVendorDir(f));
@@ -5916,7 +5922,7 @@ function requestSubPath(url, route) {
5916
5922
  return decodeURIComponent(segments.slice(start + routeSegments.length).join("/"));
5917
5923
  }
5918
5924
  async function loadGsapParser() {
5919
- return import("./gsapParser-KVMPC2SC.js");
5925
+ return import("./gsapParser-ZGBBDA54.js");
5920
5926
  }
5921
5927
  function isDanglingSymlinkInProject(projectDir, lexicalPath) {
5922
5928
  if (!isSafePath(projectDir, dirname32(lexicalPath))) return false;
@@ -6562,7 +6568,7 @@ async function prepareGsapMutationScript(c, res, firstMutation) {
6562
6568
  let block = extractGsapScriptBlock(html);
6563
6569
  if (!block && (firstMutation.type === "add" || firstMutation.type === "add-with-keyframes")) {
6564
6570
  const compId = html.match(/data-composition-id="([^"]+)"/)?.[1] ?? "main";
6565
- const { GSAP_CDN } = await import("./dist-XSSXGBRH.js");
6571
+ const { GSAP_CDN } = await import("./dist-5CN37P7P.js");
6566
6572
  const bootstrap = [
6567
6573
  `<script src="${GSAP_CDN}"></script>`,
6568
6574
  "<script>",
@@ -8407,7 +8413,7 @@ ${compHeadContent}`;
8407
8413
  }
8408
8414
  if (!headContent.includes("gsap")) {
8409
8415
  headContent += `
8410
- <script src="https://cdn.jsdelivr.net/npm/gsap@3/dist/gsap.min.js"></script>`;
8416
+ <script src="${gsapCdnDist()}gsap.min.js"></script>`;
8411
8417
  }
8412
8418
  const htmlOpen = htmlAttrs ? `<html ${htmlAttrs}>` : "<html>";
8413
8419
  const bodyOpen = bodyAttrs ? `<body ${bodyAttrs}>` : "<body>";
@@ -8540,10 +8546,9 @@ function lazyPreviewImages(html) {
8540
8546
  return parts.join("");
8541
8547
  }
8542
8548
  var PROJECT_SIGNATURE_META = "hyperframes-project-signature";
8543
- var GSAP_CDN_VERSION = "3.15.0";
8544
- var GSAP_CDN_SCRIPT = `<script src="https://cdn.jsdelivr.net/npm/gsap@${GSAP_CDN_VERSION}/dist/gsap.min.js"></script>`;
8545
- var GSAP_CUSTOM_EASE_CDN_SCRIPT = `<script src="https://cdn.jsdelivr.net/npm/gsap@${GSAP_CDN_VERSION}/dist/CustomEase.min.js"></script>`;
8546
- var GSAP_MOTION_PATH_CDN_SCRIPT = `<script src="https://cdn.jsdelivr.net/npm/gsap@${GSAP_CDN_VERSION}/dist/MotionPathPlugin.min.js"></script>`;
8549
+ var GSAP_CDN_SCRIPT = `<script src="${gsapCdnDist()}gsap.min.js"></script>`;
8550
+ var GSAP_CUSTOM_EASE_CDN_SCRIPT = `<script src="${gsapCdnDist()}CustomEase.min.js"></script>`;
8551
+ var GSAP_MOTION_PATH_CDN_SCRIPT = `<script src="${motionPathPluginUrl()}"></script>`;
8547
8552
  function injectProjectSignature(html, signature) {
8548
8553
  const tag = `<meta name="${PROJECT_SIGNATURE_META}" content="${signature}">`;
8549
8554
  if (html.includes(`name="${PROJECT_SIGNATURE_META}"`)) {
@@ -8600,8 +8605,8 @@ function injectMotionPathPluginIfNeeded(html) {
8600
8605
  const gsapScript = /<script\b[^>]*\bsrc=["'][^"']*\/gsap(\.min)?\.js["'][^>]*>\s*<\/script>/i;
8601
8606
  const match = html.match(gsapScript);
8602
8607
  if (match) {
8603
- const version = match[0].match(/gsap@([\d.]+)/)?.[1] ?? GSAP_CDN_VERSION;
8604
- const pluginTag = `<script src="https://cdn.jsdelivr.net/npm/gsap@${version}/dist/MotionPathPlugin.min.js"></script>`;
8608
+ const version = match[0].match(/gsap@([\d.]+)/)?.[1];
8609
+ const pluginTag = `<script src="${motionPathPluginUrl(version)}"></script>`;
8605
8610
  const end = html.indexOf(match[0]) + match[0].length;
8606
8611
  return html.slice(0, end) + "\n" + pluginTag + html.slice(end);
8607
8612
  }
@@ -8633,7 +8638,7 @@ function injectStudioMotionScript(html, projectDir, activeCompositionPath) {
8633
8638
  var GSAP_FALLBACK_ATTR = "data-hf-gsap-fallback";
8634
8639
  var GSAP_CDN_FALLBACK_SCRIPT = `<script ${GSAP_FALLBACK_ATTR}>
8635
8640
  (function(){
8636
- var cdnBase="https://cdn.jsdelivr.net/npm/gsap@${GSAP_CDN_VERSION}/dist/";
8641
+ var cdnBase="${gsapCdnDist()}";
8637
8642
  var loaded={};
8638
8643
  function loadFallback(file){
8639
8644
  if(loaded[file])return loaded[file];
@@ -9825,7 +9830,7 @@ function freezeFrameMediaTime(input) {
9825
9830
  return input.mediaStart + sourceTimeAt(rate, Math.max(0, input.playhead - input.clipStart));
9826
9831
  }
9827
9832
  function freezeExtractArgs(src, mediaTime, output) {
9828
- return ["-n", "-ss", String(round3(mediaTime)), "-i", src, "-frames:v", "1", output];
9833
+ return ["-y", "-ss", String(round3(mediaTime)), "-i", src, "-frames:v", "1", output];
9829
9834
  }
9830
9835
  var randomStillToken = () => randomBytes(4).toString("hex");
9831
9836
  function freezeStillFileName(clipId, playhead, token = randomStillToken()) {
@@ -9996,6 +10001,15 @@ function readExpected(absPath, expectedVersion) {
9996
10001
  }
9997
10002
  return fileContentVersion(content) === expectedVersion ? { content } : { error: "file conflict", status: 409 };
9998
10003
  }
10004
+ function claimStillNameBeforeExtracting(path) {
10005
+ try {
10006
+ closeSync32(openSync32(path, "wx"));
10007
+ return true;
10008
+ } catch (error) {
10009
+ if (error.code === "EEXIST") return false;
10010
+ throw error;
10011
+ }
10012
+ }
9999
10013
  async function extractStill(projectDir, absPath, source, playhead, tools) {
10000
10014
  const fileDir = dirname52(absPath);
10001
10015
  const mediaPath = pinWithinProject(projectDir, relative4(projectDir, join13(fileDir, source.src)));
@@ -10007,17 +10021,18 @@ async function extractStill(projectDir, absPath, source, playhead, tools) {
10007
10021
  if (!imagePath || dirname52(imagePath) !== freezeDir) {
10008
10022
  return { error: `forbidden freeze path: ${fileName}`, status: 403 };
10009
10023
  }
10010
- if (existsSync8(imagePath))
10024
+ if (!claimStillNameBeforeExtracting(imagePath))
10011
10025
  return { error: `freeze still already exists: ${fileName}`, status: 409 };
10012
10026
  const extracted = await tools.extract(freezeExtractArgs(mediaPath, source.mediaTime, imagePath));
10013
- if (!extracted.ok) {
10014
- return {
10015
- error: `Could not extract the frame: ${extracted.error ?? "ffmpeg failed"}`,
10016
- status: 500
10017
- };
10027
+ const partialOrNoFrame = !extracted.ok || statSync8(imagePath).size === 0;
10028
+ if (partialOrNoFrame) {
10029
+ rmSync5(imagePath, { force: true });
10030
+ const reason = extracted.ok ? "no frame at this time" : extracted.error ?? "ffmpeg failed";
10031
+ return { error: `Could not extract the frame: ${reason}`, status: 500 };
10018
10032
  }
10019
10033
  const depth = relative4(projectDir, fileDir).split(sep22).filter(Boolean).length;
10020
- return { imageSrc: `${"../".repeat(depth)}${FREEZE_DIR.join("/")}/${fileName}` };
10034
+ const stillPath = `${FREEZE_DIR.join("/")}/${fileName}`;
10035
+ return { imageSrc: `${"../".repeat(depth)}${stillPath}`, stillPath, imagePath };
10021
10036
  }
10022
10037
  function writeFolded(projectDir, absPath, path, before, after, options) {
10023
10038
  if (readFileSync11(absPath, "utf-8") !== before) {
@@ -10051,17 +10066,21 @@ function registerFreezeFrameRoutes(api, adapter, extract = ffmpegExtractor, stil
10051
10066
  stillToken
10052
10067
  });
10053
10068
  if ("error" in still) return c.json({ error: still.error }, still.status);
10054
- const { imageSrc } = still;
10069
+ const { imageSrc, stillPath, imagePath } = still;
10055
10070
  const folded = applyFreezeFrameToHtml(before, {
10056
10071
  target: body.target,
10057
10072
  playhead: body.playhead,
10058
10073
  imageSrc
10059
10074
  });
10060
- if (!folded) return c.json({ error: "Freeze target was not found in the file" }, 400);
10075
+ const failAndRemoveStill = (error, status) => {
10076
+ rmSync5(imagePath, { force: true });
10077
+ return c.json({ error }, status);
10078
+ };
10079
+ if (!folded) return failAndRemoveStill("Freeze target was not found in the file", 400);
10061
10080
  const written = writeFolded(project.dir, absPath, body.path, before, folded.html, {
10062
10081
  token: body.transactionToken ?? c.req.header("X-Hyperframes-Write-Token")
10063
10082
  });
10064
- if ("error" in written) return c.json({ error: written.error }, written.status);
10083
+ if ("error" in written) return failAndRemoveStill(written.error, written.status);
10065
10084
  const { version, writeToken, backupPath } = written;
10066
10085
  return c.json({
10067
10086
  ok: true,
@@ -10072,7 +10091,8 @@ function registerFreezeFrameRoutes(api, adapter, extract = ffmpegExtractor, stil
10072
10091
  writeToken,
10073
10092
  backupPath,
10074
10093
  freezeId: folded.freezeId,
10075
- imageSrc
10094
+ imageSrc,
10095
+ stillPath
10076
10096
  });
10077
10097
  });
10078
10098
  }
@@ -10126,7 +10146,7 @@ function registerLoudnessRoutes(api, adapter, measure = defaultMeasure) {
10126
10146
  } catch (error) {
10127
10147
  return c.json({ error: error instanceof Error ? error.message : String(error) }, 400);
10128
10148
  }
10129
- if (!existsSync9(file)) return c.json({ error: "file not found" }, 404);
10149
+ if (!existsSync8(file)) return c.json({ error: "file not found" }, 404);
10130
10150
  try {
10131
10151
  const measurement = await measure(file, request.window);
10132
10152
  const plan = absoluteLoudnessPlan(
@@ -10247,7 +10267,7 @@ function decodeOnce(cachePath, mediaPath, decode) {
10247
10267
  }
10248
10268
  function readCachedBins(cacheDir, cachePath) {
10249
10269
  try {
10250
- if (!isWaveformCacheDirectory(cacheDir) || !existsSync10(cachePath)) return null;
10270
+ if (!isWaveformCacheDirectory(cacheDir) || !existsSync9(cachePath)) return null;
10251
10271
  const parsed = JSON.parse(readFileSync12(cachePath, "utf-8"));
10252
10272
  return Array.isArray(parsed) && parsed.every((n) => typeof n === "number") ? parsed : null;
10253
10273
  } catch {
@@ -10380,7 +10400,7 @@ function registerFontRoutes(api) {
10380
10400
  if (!located) return c.json({ error: "font not found" }, 404);
10381
10401
  let fd;
10382
10402
  try {
10383
- fd = openSync32(located.path, constants3.O_RDONLY | constants3.O_NOFOLLOW);
10403
+ fd = openSync4(located.path, constants3.O_RDONLY | constants3.O_NOFOLLOW);
10384
10404
  } catch {
10385
10405
  return c.json({ error: "font file not accessible" }, 404);
10386
10406
  }
@@ -10402,7 +10422,7 @@ function registerFontRoutes(api) {
10402
10422
  } catch {
10403
10423
  return c.json({ error: "failed to read font file" }, 500);
10404
10424
  } finally {
10405
- closeSync32(fd);
10425
+ closeSync4(fd);
10406
10426
  }
10407
10427
  });
10408
10428
  }
@@ -10567,7 +10587,7 @@ function uniqueAssetPath(projectDir, assetPath, taken) {
10567
10587
  const ext = extname2(assetPath);
10568
10588
  const withoutExt = assetPath.slice(0, -ext.length);
10569
10589
  let candidate = assetPath;
10570
- for (let index = 2; taken.has(candidate) || existsSync11(join15(projectDir, candidate)); index++) {
10590
+ for (let index = 2; taken.has(candidate) || existsSync10(join15(projectDir, candidate)); index++) {
10571
10591
  candidate = `${withoutExt}-${index}${ext}`;
10572
10592
  }
10573
10593
  return candidate;
@@ -10628,7 +10648,7 @@ function registerMediaRoutes(api, adapter, options = {}) {
10628
10648
  }
10629
10649
  const filePath = resolveWithinProject(project.dir, assetPath);
10630
10650
  if (!filePath) return c.json({ error: "forbidden" }, 403);
10631
- if (!existsSync11(filePath)) return c.json({ error: "media not found" }, 404);
10651
+ if (!existsSync10(filePath)) return c.json({ error: "media not found" }, 404);
10632
10652
  return c.json({ path: assetPath, metadata: await readMediaMetadata(filePath) });
10633
10653
  });
10634
10654
  api.post(
@@ -10650,7 +10670,7 @@ function registerMediaRoutes(api, adapter, options = {}) {
10650
10670
  }
10651
10671
  const inputPath = resolveWithinProject(project.dir, inputAssetPath);
10652
10672
  if (!inputPath) return c.json({ error: "forbidden" }, 403);
10653
- if (!existsSync11(inputPath)) return c.json({ error: "input media not found" }, 404);
10673
+ if (!existsSync10(inputPath)) return c.json({ error: "input media not found" }, 404);
10654
10674
  const inputIsVideo = isVideoPath(inputAssetPath);
10655
10675
  const inputIsImage = isImagePath(inputAssetPath);
10656
10676
  if (!inputIsVideo && !inputIsImage) {
@@ -10744,7 +10764,7 @@ function registerMediaRoutes(api, adapter, options = {}) {
10744
10764
  }
10745
10765
  function readGlobalAssets(home = homedir2()) {
10746
10766
  const manifestPath = join16(home, ".media", "manifest.jsonl");
10747
- if (!existsSync12(manifestPath)) return [];
10767
+ if (!existsSync11(manifestPath)) return [];
10748
10768
  const out = [];
10749
10769
  for (const line of readFileSync13(manifestPath, "utf8").split("\n")) {
10750
10770
  if (!line.trim()) continue;
@@ -11005,7 +11025,7 @@ ${key}`).digest("hex").slice(0, 32)}.html`);
11005
11025
  const file = fileFor(key);
11006
11026
  replaceFileAtomically(file, html, 420);
11007
11027
  for (const name of readdirSync5(dir)) {
11008
- if (join17(dir, name) !== file) rmSync5(join17(dir, name), { force: true });
11028
+ if (join17(dir, name) !== file) rmSync6(join17(dir, name), { force: true });
11009
11029
  }
11010
11030
  } catch {
11011
11031
  }
@@ -17,7 +17,7 @@ import {
17
17
  parseStrictFiniteTimingNumber,
18
18
  resolveNaturalMediaTimelineDuration,
19
19
  resolveTimedImageDurationSeconds
20
- } from "./chunk-WWL6YGYK.js";
20
+ } from "./chunk-L6TT37IY.js";
21
21
  import {
22
22
  COMPOSITION_ATTRIBUTES,
23
23
  parseStartExpression
@@ -138,8 +138,18 @@ function getStageStyles(resolution = "portrait") {
138
138
  return `position: relative; width: ${width}px; height: ${height}px; overflow: hidden; background: #000;`;
139
139
  }
140
140
 
141
+ // ../core/dist/gsapCdn.js
142
+ var GSAP_CDN_VERSION = "3.15.0";
143
+ function gsapCdnDist(gsapVersion) {
144
+ const version = gsapVersion && /^\d+(\.\d+)*$/.test(gsapVersion) ? gsapVersion : GSAP_CDN_VERSION;
145
+ return `https://cdn.jsdelivr.net/npm/gsap@${version}/dist/`;
146
+ }
147
+ function motionPathPluginUrl(gsapVersion) {
148
+ return `${gsapCdnDist(gsapVersion)}MotionPathPlugin.min.js`;
149
+ }
150
+
141
151
  // ../core/dist/templates/constants.js
142
- var GSAP_CDN = "https://cdn.jsdelivr.net/npm/gsap@3.12.5/dist/gsap.min.js";
152
+ var GSAP_CDN = `${gsapCdnDist()}gsap.min.js`;
143
153
  var BASE_STYLES = `* { margin: 0; padding: 0; box-sizing: border-box; }
144
154
  html, body { width: 100%; height: 100%; overflow: hidden; background: #000; display: flex; align-items: center; justify-content: center; }`;
145
155
  var ELEMENT_BASE_STYLES = `position: absolute; visibility: hidden;`;
@@ -5656,6 +5666,8 @@ export {
5656
5666
  parseFpsWithDefault,
5657
5667
  generateBaseHtml,
5658
5668
  getStageStyles,
5669
+ gsapCdnDist,
5670
+ motionPathPluginUrl,
5659
5671
  GSAP_CDN,
5660
5672
  BASE_STYLES,
5661
5673
  ELEMENT_BASE_STYLES,
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-AMKC3AXA.js";
10
10
  import {
11
11
  getSystemTotalMb
12
- } from "./chunk-63O3AR5U.js";
12
+ } from "./chunk-DA5FLVIF.js";
13
13
 
14
14
  // src/telemetry/system.ts
15
15
  import { cpus, freemem, platform as platform2, release as release2 } from "os";
@@ -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.116" : "0.0.0-dev";
10
- var PRODUCER_VERSION = true ? "0.8.116" : "0.0.0-dev";
9
+ var VERSION = true ? "0.8.118" : "0.0.0-dev";
10
+ var PRODUCER_VERSION = true ? "0.8.118" : "0.0.0-dev";
11
11
 
12
12
  export {
13
13
  VERSION,
@@ -8,10 +8,10 @@ import {
8
8
  DEFAULT_VP9_CPU_USED,
9
9
  isHttpUrl,
10
10
  runFfmpeg
11
- } from "./chunk-63O3AR5U.js";
11
+ } from "./chunk-DA5FLVIF.js";
12
12
  import {
13
13
  parseAnimatedGifMetadata
14
- } from "./chunk-AKZD7VWZ.js";
14
+ } from "./chunk-I47W3MA3.js";
15
15
  import {
16
16
  parseHTML
17
17
  } from "./chunk-GK4AIFIH.js";
@@ -1278,7 +1278,7 @@ async function withFigmaErrors(command, fn) {
1278
1278
  } catch (err) {
1279
1279
  if (err instanceof Error) {
1280
1280
  try {
1281
- const { trackCommandFailure } = await import("./events-Y4NBIJBP.js");
1281
+ const { trackCommandFailure } = await import("./events-SQRZ2NYO.js");
1282
1282
  trackCommandFailure(
1283
1283
  command,
1284
1284
  err,
@@ -7,10 +7,10 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  trackLintReport,
9
9
  trackLintRuleStreak
10
- } from "./chunk-JYB7NKO6.js";
10
+ } from "./chunk-FQ4EMFVL.js";
11
11
  import {
12
12
  shouldTrack
13
- } from "./chunk-ENQL7NCM.js";
13
+ } from "./chunk-DI6EGQVC.js";
14
14
  import {
15
15
  LINT_RULE_COUNT,
16
16
  LINT_RULE_GROUP_COUNTS