@hyperframes/studio 0.8.201 → 0.8.203

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.
package/dist/index.js CHANGED
@@ -35,6 +35,9 @@ import {
35
35
  onPreviewPromoted,
36
36
  panelsInZone,
37
37
  parseDockLayout,
38
+ parsePlaybackHealth,
39
+ parsePreviewCopies,
40
+ parsePreviewFacts,
38
41
  patchElements,
39
42
  positiveClipSpan,
40
43
  readStudioUiPreferences,
@@ -51,7 +54,7 @@ import {
51
54
  whenPreviewBooted,
52
55
  writeStudioUiPreferences,
53
56
  zoomToSelectedClips
54
- } from "./chunk-J6T4KD7Y.js";
57
+ } from "./chunk-2YCKGJFD.js";
55
58
  import {
56
59
  Button,
57
60
  ContextMenu,
@@ -28680,7 +28683,7 @@ var CompositionThumbnail = memo23(function CompositionThumbnail2({
28680
28683
  });
28681
28684
 
28682
28685
  // src/player/hooks/useTimelinePlayer.ts
28683
- import { useRef as useRef49, useCallback as useCallback41, useEffect as useEffect35 } from "react";
28686
+ import { useRef as useRef49, useCallback as useCallback41, useEffect as useEffect36 } from "react";
28684
28687
 
28685
28688
  // src/player/hooks/usePlaybackKeyboard.ts
28686
28689
  import { useRef as useRef46, useCallback as useCallback37 } from "react";
@@ -32319,18 +32322,62 @@ function handleTimelineMessage(deps, iframe, data) {
32319
32322
  } catch {
32320
32323
  }
32321
32324
  }
32325
+ function applyStoreReport(data) {
32326
+ const store = usePlayerStore.getState();
32327
+ switch (data.type) {
32328
+ case "preview-copies":
32329
+ store.setPreviewCopies(parsePreviewCopies(data.copies));
32330
+ return true;
32331
+ case "preview-health":
32332
+ store.setPlaybackHealth(parsePlaybackHealth(data.health));
32333
+ return true;
32334
+ case "preview-facts":
32335
+ store.setPreviewFacts(parsePreviewFacts(data.facts));
32336
+ return true;
32337
+ default:
32338
+ return false;
32339
+ }
32340
+ }
32322
32341
  function createPreviewMessageHandler(deps) {
32323
32342
  return (e) => {
32324
32343
  const iframe = deps.iframeRef.current;
32325
32344
  const data = acceptedPreviewMessage(e, iframe);
32326
32345
  if (!data) return;
32327
32346
  if (data.type === "state") return handleStateMessage(deps, iframe, data.isPlaying === true);
32347
+ if (applyStoreReport(data)) return;
32348
+ if (data.type === "ready") {
32349
+ const level = usePlayerStore.getState().previewQuality;
32350
+ postRuntimeControlMessage(iframe?.contentWindow, "set-preview-quality", { level });
32351
+ return;
32352
+ }
32328
32353
  if (data.type === "timeline" && Array.isArray(data.clips)) {
32329
32354
  handleTimelineMessage(deps, iframe, data);
32330
32355
  }
32331
32356
  };
32332
32357
  }
32333
32358
 
32359
+ // src/player/hooks/usePreviewQualityForwarding.ts
32360
+ import { useEffect as useEffect35 } from "react";
32361
+ function usePreviewQualityForwarding(iframeRef) {
32362
+ const level = usePlayerStore((state) => state.previewQuality);
32363
+ const retries = usePlayerStore((state) => state.previewCopiesRetry);
32364
+ useEffect35(() => {
32365
+ const frame3 = iframeRef.current;
32366
+ if (frame3) postRuntimeControlMessage(frame3.contentWindow, "set-preview-quality", { level });
32367
+ }, [iframeRef, level]);
32368
+ const factsRequests = usePlayerStore((state) => state.previewFactsRequests);
32369
+ useEffect35(() => {
32370
+ const frame3 = iframeRef.current;
32371
+ if (frame3 && factsRequests > 0)
32372
+ postRuntimeControlMessage(frame3.contentWindow, "request-preview-facts");
32373
+ }, [iframeRef, factsRequests]);
32374
+ useEffect35(() => {
32375
+ const frame3 = iframeRef.current;
32376
+ if (frame3 && retries > 0)
32377
+ postRuntimeControlMessage(frame3.contentWindow, "retry-preview-copies");
32378
+ }, [iframeRef, retries]);
32379
+ }
32380
+
32334
32381
  // src/player/hooks/timelinePlayerSync.ts
32335
32382
  var RENDERED_FIELDS = [
32336
32383
  "id",
@@ -32379,7 +32426,6 @@ function useTimelinePlayer({
32379
32426
  const staticSeekWarnedRef = useRef49(false);
32380
32427
  const { setIsPlaying, setCurrentTime, setDuration, requestTimelineReady, setElements } = usePlayerStore.getState();
32381
32428
  const syncTimelineElements = useCallback41(
32382
- // The lease guard adds one deliberate branch at the shared synchronization boundary.
32383
32429
  // fallow-ignore-next-line complexity
32384
32430
  (elements, nextDuration) => {
32385
32431
  if (hasTimelinePerformanceFixtureLease()) return;
@@ -32625,13 +32671,13 @@ function useTimelinePlayer({
32625
32671
  shuttleSpeedIndexRef
32626
32672
  ]
32627
32673
  );
32628
- useEffect35(
32674
+ useEffect36(
32629
32675
  () => usePlayerStore.subscribe((state, prev) => {
32630
32676
  if (state.playLocked && !prev.playLocked && state.isPlaying) pause();
32631
32677
  }),
32632
32678
  [pause]
32633
32679
  );
32634
- useEffect35(() => {
32680
+ useEffect36(() => {
32635
32681
  return usePlayerStore.subscribe((state, prev) => {
32636
32682
  if (state.requestedSeekTime !== null && state.requestedSeekTime !== prev.requestedSeekTime) {
32637
32683
  seek(state.requestedSeekTime);
@@ -32648,7 +32694,7 @@ function useTimelinePlayer({
32648
32694
  }
32649
32695
  });
32650
32696
  }, [seek, play, pause]);
32651
- useEffect35(() => subscribePreviewFrame(getAdapter), [getAdapter]);
32697
+ useEffect36(() => subscribePreviewFrame(getAdapter), [getAdapter]);
32652
32698
  const { playbackKeyDownRef, playbackKeyUpRef, attachIframeShortcutListeners, togglePlay } = usePlaybackKeyboard({
32653
32699
  iframeRef,
32654
32700
  shuttleDirectionRef,
@@ -32762,6 +32808,7 @@ function useTimelinePlayer({
32762
32808
  }, [reloadWholeFilm, previewGeneration]);
32763
32809
  const pauseRef = useRef49(pause);
32764
32810
  pauseRef.current = pause;
32811
+ usePreviewQualityForwarding(iframeRef);
32765
32812
  useMountEffect(() => {
32766
32813
  const handleWindowKeyDown = (e) => playbackKeyDownRef.current(e);
32767
32814
  const handleWindowKeyUp = (e) => playbackKeyUpRef.current(e);
@@ -32800,7 +32847,7 @@ function useTimelinePlayer({
32800
32847
  cancelPendingLoad();
32801
32848
  usePlayerStore.getState().reset();
32802
32849
  }, [stopRAFLoop, stopReverseLoop, cancelPendingLoad]);
32803
- useEffect35(() => {
32850
+ useEffect36(() => {
32804
32851
  return usePlayerStore.subscribe((state, prev) => {
32805
32852
  const playbackRateChanged = state.playbackRate !== prev.playbackRate;
32806
32853
  const audioMutedChanged = state.audioMuted !== prev.audioMuted;
@@ -32835,10 +32882,10 @@ function useTimelinePlayer({
32835
32882
  import { useCallback as useCallback44, useMemo as useMemo38 } from "react";
32836
32883
 
32837
32884
  // src/components/nle/NLEContext.tsx
32838
- import { useContext as useContext8, useState as useState38, useCallback as useCallback43, useRef as useRef51, useEffect as useEffect37 } from "react";
32885
+ import { useContext as useContext8, useState as useState38, useCallback as useCallback43, useRef as useRef51, useEffect as useEffect38 } from "react";
32839
32886
 
32840
32887
  // src/components/nle/useCompositionStack.ts
32841
- import { useState as useState37, useCallback as useCallback42, useRef as useRef50, useEffect as useEffect36 } from "react";
32888
+ import { useState as useState37, useCallback as useCallback42, useRef as useRef50, useEffect as useEffect37 } from "react";
32842
32889
  function useCompositionStack({
32843
32890
  projectId,
32844
32891
  activeCompositionPath,
@@ -32909,7 +32956,7 @@ function useCompositionStack({
32909
32956
  // eslint-disable-next-line react-hooks/exhaustive-deps
32910
32957
  [projectId]
32911
32958
  );
32912
- useEffect36(() => {
32959
+ useEffect37(() => {
32913
32960
  const master = {
32914
32961
  id: "master",
32915
32962
  label: "Master",
@@ -32997,13 +33044,13 @@ function NLEProvider({
32997
33044
  onShadowPromoted: () => shadowPromotedRef.current(),
32998
33045
  onPreviewReloadFailed
32999
33046
  });
33000
- useEffect37(() => {
33047
+ useEffect38(() => {
33001
33048
  usePlayerStore.getState().beginTimelineSession(projectId);
33002
33049
  useAssetPreviewStore.getState().clearPreviewAsset();
33003
33050
  }, [projectId]);
33004
33051
  const [previewCompositionSize, setPreviewCompositionSize] = useState38(null);
33005
33052
  const prevRefreshKeyRef = useRef51(refreshKey);
33006
- useEffect37(() => {
33053
+ useEffect38(() => {
33007
33054
  try {
33008
33055
  if (refreshKey === prevRefreshKeyRef.current) return;
33009
33056
  prevRefreshKeyRef.current = refreshKey;
@@ -33065,7 +33112,7 @@ function NLEProvider({
33065
33112
  compIdToSrcRef.current = compIdToSrc;
33066
33113
  const onCompIdToSrcChangeRef = useRef51(onCompIdToSrcChange);
33067
33114
  onCompIdToSrcChangeRef.current = onCompIdToSrcChange;
33068
- useEffect37(() => {
33115
+ useEffect38(() => {
33069
33116
  const controller = new AbortController();
33070
33117
  let current = true;
33071
33118
  const emptyMap = /* @__PURE__ */ new Map();
@@ -33100,7 +33147,7 @@ function NLEProvider({
33100
33147
  controller.abort();
33101
33148
  };
33102
33149
  }, [projectId, setCompIdToSrc]);
33103
- useEffect37(() => {
33150
+ useEffect38(() => {
33104
33151
  if (compIdToSrc.size === 0) return;
33105
33152
  const patchElements2 = (elements) => {
33106
33153
  const map = compIdToSrcRef.current;
@@ -33139,12 +33186,12 @@ function NLEProvider({
33139
33186
  }, []);
33140
33187
  const timelineDisabled = shouldDisableTimelineWhileCompositionLoading(compositionLoading);
33141
33188
  const timelineSessionEpoch = usePlayerStore((state) => state.timelineSessionEpoch);
33142
- useEffect37(() => {
33189
+ useEffect38(() => {
33143
33190
  onCompositionLoadingChange?.(compositionLoading);
33144
33191
  }, [compositionLoading, onCompositionLoadingChange]);
33145
33192
  const onIframeRefStable = useRef51(onIframeRef);
33146
33193
  onIframeRefStable.current = onIframeRef;
33147
- useEffect37(() => {
33194
+ useEffect38(() => {
33148
33195
  onIframeRefStable.current?.(iframeRef.current);
33149
33196
  }, [compositionStack.length, refreshKey, iframeRef]);
33150
33197
  const value = {
@@ -33253,7 +33300,7 @@ function readPreviewCompositionSize(iframe) {
33253
33300
  import {
33254
33301
  memo as memo24,
33255
33302
  useCallback as useCallback48,
33256
- useEffect as useEffect39,
33303
+ useEffect as useEffect40,
33257
33304
  useLayoutEffect as useLayoutEffect10,
33258
33305
  useRef as useRef55,
33259
33306
  useState as useState40
@@ -33391,7 +33438,7 @@ var usePreviewGuidesStore = create8((set, get) => {
33391
33438
  });
33392
33439
 
33393
33440
  // src/components/nle/PreviewZoomOverlay.tsx
33394
- import { useCallback as useCallback45, useEffect as useEffect38, useRef as useRef52 } from "react";
33441
+ import { useCallback as useCallback45, useEffect as useEffect39, useRef as useRef52 } from "react";
33395
33442
  import { Fragment as Fragment24, jsx as jsx81, jsxs as jsxs55 } from "react/jsx-runtime";
33396
33443
  var NAVIGATOR_PX = 112;
33397
33444
  function zoomChipLabel(zoomPercent) {
@@ -33431,7 +33478,7 @@ function usePreviewNavigator(viewportRef, stageSize, zoomRef) {
33431
33478
  },
33432
33479
  [draw, zoomRef]
33433
33480
  );
33434
- useEffect38(() => draw(zoomRef.current), [stageSize, draw, zoomRef]);
33481
+ useEffect39(() => draw(zoomRef.current), [stageSize, draw, zoomRef]);
33435
33482
  return { draw, setRegion };
33436
33483
  }
33437
33484
  function PreviewZoomOverlay({
@@ -33685,11 +33732,11 @@ var NLEPreview = memo24(function NLEPreview2({
33685
33732
  const viewportRef = useRef55(null);
33686
33733
  const stageRef = useRef55(null);
33687
33734
  const previewIframeRef = useRef55(null);
33688
- useEffect39(() => {
33735
+ useEffect40(() => {
33689
33736
  onStageRef?.(stageRef);
33690
33737
  }, [onStageRef]);
33691
33738
  const previousActiveKeyRef = useRef55(activeKey);
33692
- useEffect39(() => {
33739
+ useEffect40(() => {
33693
33740
  if (previousActiveKeyRef.current === activeKey) return;
33694
33741
  previousActiveKeyRef.current = activeKey;
33695
33742
  resetPreviewSlots();
@@ -33705,19 +33752,19 @@ var NLEPreview = memo24(function NLEPreview2({
33705
33752
  const hintHeight = compositionSizeHint?.height;
33706
33753
  const zoomRef = useRef55(DEFAULT_PREVIEW_ZOOM);
33707
33754
  const [settledZoom, setSettledZoom] = useState40(DEFAULT_PREVIEW_ZOOM);
33708
- useEffect39(() => postFrameDisplayScale(previewIframeRef.current), [settledZoom]);
33755
+ useEffect40(() => postFrameDisplayScale(previewIframeRef.current), [settledZoom]);
33709
33756
  const hudRef = useRef55(null);
33710
33757
  const hudTimerRef = useRef55(null);
33711
33758
  const settleTimerRef = useRef55(null);
33712
33759
  const zoomingRef = useRef55(false);
33713
33760
  const dragRef = useRef55(null);
33714
- useEffect39(() => {
33761
+ useEffect40(() => {
33715
33762
  return () => {
33716
33763
  if (settleTimerRef.current) clearTimeout(settleTimerRef.current);
33717
33764
  if (hudTimerRef.current) clearTimeout(hudTimerRef.current);
33718
33765
  };
33719
33766
  }, []);
33720
- useEffect39(() => {
33767
+ useEffect40(() => {
33721
33768
  const viewport2 = viewportRef.current;
33722
33769
  if (!viewport2) return;
33723
33770
  const updateStageSize = () => {
@@ -33746,7 +33793,7 @@ var NLEPreview = memo24(function NLEPreview2({
33746
33793
  (prev) => prev?.width === next?.width && prev?.height === next?.height ? prev : next
33747
33794
  );
33748
33795
  }, []);
33749
- useEffect39(() => {
33796
+ useEffect40(() => {
33750
33797
  onCompositionSizeChangeRef.current?.(compositionSize);
33751
33798
  }, [compositionSize]);
33752
33799
  const setPreviewIframeRef = useCallback48(
@@ -33852,7 +33899,7 @@ var NLEPreview = memo24(function NLEPreview2({
33852
33899
  writeTransform3(zoomRef.current);
33853
33900
  }
33854
33901
  }, [writeTransform3]);
33855
- useEffect39(() => {
33902
+ useEffect40(() => {
33856
33903
  const live = previewSlots.find((slot) => slot.role === "live");
33857
33904
  if (!live || live.gen === liveGenRef.current) return;
33858
33905
  const isPromotion = liveGenRef.current !== null;
@@ -33862,7 +33909,7 @@ var NLEPreview = memo24(function NLEPreview2({
33862
33909
  updateCompositionSizeFromPreview();
33863
33910
  applyInitialZoom();
33864
33911
  }, [previewSlots, iframeRef, updateCompositionSizeFromPreview, applyInitialZoom]);
33865
- useEffect39(() => {
33912
+ useEffect40(() => {
33866
33913
  const viewport2 = viewportRef.current;
33867
33914
  if (!viewport2) return;
33868
33915
  const handleWheel = (event) => {
@@ -33908,7 +33955,7 @@ var NLEPreview = memo24(function NLEPreview2({
33908
33955
  document.addEventListener("wheel", handleWheel, { passive: false, capture: true });
33909
33956
  return () => document.removeEventListener("wheel", handleWheel, { capture: true });
33910
33957
  }, [applyZoom, applyPan]);
33911
- useEffect39(() => {
33958
+ useEffect40(() => {
33912
33959
  const isInsideViewport = (clientX, clientY) => {
33913
33960
  const viewport2 = viewportRef.current;
33914
33961
  if (!viewport2) return null;
@@ -34269,7 +34316,7 @@ function usePreviewBlockDrop({
34269
34316
  }
34270
34317
 
34271
34318
  // src/components/nle/AssetPreviewOverlay.tsx
34272
- import { useEffect as useEffect40, useCallback as useCallback50 } from "react";
34319
+ import { useEffect as useEffect41, useCallback as useCallback50 } from "react";
34273
34320
 
34274
34321
  // src/utils/assetPreviewDismiss.ts
34275
34322
  var TIME_EPSILON_S = 1e-6;
@@ -34348,12 +34395,12 @@ function AssetPreviewOverlay() {
34348
34395
  },
34349
34396
  [clearPreviewAsset]
34350
34397
  );
34351
- useEffect40(() => {
34398
+ useEffect41(() => {
34352
34399
  if (!previewAsset) return;
34353
34400
  window.addEventListener("keydown", handleKeyDown);
34354
34401
  return () => window.removeEventListener("keydown", handleKeyDown);
34355
34402
  }, [previewAsset, handleKeyDown]);
34356
- useEffect40(() => {
34403
+ useEffect41(() => {
34357
34404
  if (!previewAsset) return;
34358
34405
  const opened = usePlayerStore.getState();
34359
34406
  const openedTime = opened.currentTime;
@@ -34620,11 +34667,11 @@ function safeBoxInsetPercent(boxPercent) {
34620
34667
  import { createContext as createContext6, useContext as useContext10, useRef as useRef58, useState as useState43 } from "react";
34621
34668
 
34622
34669
  // src/components/editor/usePreviewCompositionRect.ts
34623
- import { useEffect as useEffect41, useRef as useRef57 } from "react";
34670
+ import { useEffect as useEffect42, useRef as useRef57 } from "react";
34624
34671
  function usePreviewCompositionRect(overlayRef, iframe) {
34625
34672
  const iframeRef = useRef57(iframe);
34626
34673
  iframeRef.current = iframe;
34627
- useEffect41(() => {
34674
+ useEffect42(() => {
34628
34675
  requestOverlayFrames();
34629
34676
  }, [iframe]);
34630
34677
  return useDomEditCompositionRect({ iframeRef, overlayRef });
@@ -34917,7 +34964,7 @@ function PreviewPane({
34917
34964
  import {
34918
34965
  memo as memo26,
34919
34966
  useCallback as useCallback52,
34920
- useEffect as useEffect42,
34967
+ useEffect as useEffect43,
34921
34968
  useMemo as useMemo41,
34922
34969
  useRef as useRef61
34923
34970
  } from "react";
@@ -35098,7 +35145,7 @@ function useMeterLoop(strips2, bars, iframeRef, clip) {
35098
35145
  const previewIframeRef = iframeRef ?? shell?.previewIframeRef;
35099
35146
  const stripsRef = useRef61(strips2);
35100
35147
  stripsRef.current = strips2;
35101
- useEffect42(() => {
35148
+ useEffect43(() => {
35102
35149
  let raf = 0;
35103
35150
  let active = null;
35104
35151
  let last = performance.now();
@@ -35285,7 +35332,7 @@ function MeterStrip({
35285
35332
  useRef61(null),
35286
35333
  useRef61(null)
35287
35334
  ];
35288
- useEffect42(() => {
35335
+ useEffect43(() => {
35289
35336
  register(strip.id, [
35290
35337
  { mask: refs[0].current, peak: refs[1].current },
35291
35338
  { mask: refs[2].current, peak: refs[3].current }
@@ -35476,7 +35523,7 @@ function TimelinePane({
35476
35523
  import { useCallback as useCallback66 } from "react";
35477
35524
 
35478
35525
  // src/captions/components/CaptionOverlay.tsx
35479
- import { memo as memo27, useEffect as useEffect43, useState as useState44, useCallback as useCallback53, useRef as useRef62 } from "react";
35526
+ import { memo as memo27, useEffect as useEffect44, useState as useState44, useCallback as useCallback53, useRef as useRef62 } from "react";
35480
35527
 
35481
35528
  // src/captions/keyboard.ts
35482
35529
  var CAPTION_NUDGE_KEYS = /* @__PURE__ */ new Set(["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"]);
@@ -35707,7 +35754,7 @@ var CaptionOverlay = memo27(function CaptionOverlay2({ iframeRef }) {
35707
35754
  modelRef.current = model;
35708
35755
  const cancelDragRef = useRef62(null);
35709
35756
  const interactionRef = useRef62(null);
35710
- useEffect43(() => {
35757
+ useEffect44(() => {
35711
35758
  if (!isEditMode) return;
35712
35759
  const unregisterIframe = registerCaptionIframe(iframeRef);
35713
35760
  let prevBoxes = [];
@@ -36106,7 +36153,7 @@ var CaptionOverlay = memo27(function CaptionOverlay2({ iframeRef }) {
36106
36153
  });
36107
36154
 
36108
36155
  // src/components/editor/DomEditOverlay.tsx
36109
- import { memo as memo30, useEffect as useEffect55, useMemo as useMemo42, useRef as useRef72 } from "react";
36156
+ import { memo as memo30, useEffect as useEffect56, useMemo as useMemo42, useRef as useRef72 } from "react";
36110
36157
 
36111
36158
  // src/utils/previewFeatureUsage.ts
36112
36159
  function trackPreviewFeatureUsed(feature, method) {
@@ -36121,7 +36168,7 @@ function trackPreviewEditResult(feature, method, result) {
36121
36168
  }
36122
36169
 
36123
36170
  // src/components/editor/marqueeCommit.ts
36124
- import { useCallback as useCallback54, useEffect as useEffect44, useRef as useRef63, useState as useState45 } from "react";
36171
+ import { useCallback as useCallback54, useEffect as useEffect45, useRef as useRef63, useState as useState45 } from "react";
36125
36172
 
36126
36173
  // src/utils/studioPreviewHelpers.ts
36127
36174
  var FULL_BLEED_RATIO = 0.95;
@@ -37163,7 +37210,7 @@ function useMarqueeGestures(deps) {
37163
37210
  releaseCapture(marqueeRef.current);
37164
37211
  reset();
37165
37212
  }, [reset]);
37166
- useEffect44(() => {
37213
+ useEffect45(() => {
37167
37214
  const cancelBandBeforeHostEscape = (e) => {
37168
37215
  if (e.key !== "Escape" || !marqueeRef.current) return;
37169
37216
  e.preventDefault();
@@ -37284,13 +37331,13 @@ function MarqueeOverlay({ candidateRects, marqueeRect }) {
37284
37331
  }
37285
37332
 
37286
37333
  // src/components/editor/useZOrderCrossedFlash.tsx
37287
- import { useCallback as useCallback55, useEffect as useEffect45, useRef as useRef64, useState as useState46 } from "react";
37334
+ import { useCallback as useCallback55, useEffect as useEffect46, useRef as useRef64, useState as useState46 } from "react";
37288
37335
  import { jsx as jsx94 } from "react/jsx-runtime";
37289
37336
  var Z_ORDER_CROSSED_FLASH_MS = 600;
37290
37337
  function useZOrderCrossedFlash({ overlayRef, iframeRef }) {
37291
37338
  const [zOrderFlashRect, setZOrderFlashRect] = useState46(null);
37292
37339
  const timeoutRef = useRef64(null);
37293
- useEffect45(
37340
+ useEffect46(
37294
37341
  () => () => {
37295
37342
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
37296
37343
  },
@@ -37328,7 +37375,7 @@ function ZOrderCrossedFlash({ rect }) {
37328
37375
  }
37329
37376
 
37330
37377
  // src/components/editor/useCanvasContextMenuState.ts
37331
- import { useCallback as useCallback56, useEffect as useEffect46, useState as useState47 } from "react";
37378
+ import { useCallback as useCallback56, useEffect as useEffect47, useState as useState47 } from "react";
37332
37379
  function useCanvasContextMenuState({
37333
37380
  selection,
37334
37381
  selectionRef,
@@ -37338,7 +37385,7 @@ function useCanvasContextMenuState({
37338
37385
  }) {
37339
37386
  const [contextMenu, setContextMenu] = useState47(null);
37340
37387
  const closeContextMenu = useCallback56(() => setContextMenu(null), []);
37341
- useEffect46(() => {
37388
+ useEffect47(() => {
37342
37389
  if (!contextMenu) return;
37343
37390
  if (!selection || selection.element !== contextMenu.sel.element) {
37344
37391
  setContextMenu(null);
@@ -40589,7 +40636,7 @@ function createDomEditOverlayGestureHandlers(opts) {
40589
40636
  }
40590
40637
 
40591
40638
  // src/components/editor/useDomEditNudge.ts
40592
- import { useCallback as useCallback57, useEffect as useEffect47, useRef as useRef66 } from "react";
40639
+ import { useCallback as useCallback57, useEffect as useEffect48, useRef as useRef66 } from "react";
40593
40640
 
40594
40641
  // src/components/editor/domEditNudge.ts
40595
40642
  var CANVAS_NUDGE_KEYS = /* @__PURE__ */ new Set(["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"]);
@@ -40677,7 +40724,7 @@ function useDomEditNudge(params) {
40677
40724
  };
40678
40725
  const commitSessionRef = useRef66(commitSession);
40679
40726
  commitSessionRef.current = commitSession;
40680
- useEffect47(() => {
40727
+ useEffect48(() => {
40681
40728
  if (params.allowCanvasMovement || !sessionRef.current) return;
40682
40729
  const session = sessionRef.current;
40683
40730
  sessionRef.current = null;
@@ -40738,8 +40785,8 @@ function useDomEditNudge(params) {
40738
40785
  });
40739
40786
  const selectionKey = selectionIdentityKey(params.selection);
40740
40787
  const groupSelectionsKey = groupSelectionsIdentityKey(params.groupSelections);
40741
- useEffect47(() => () => void commitSessionRef.current(), [selectionKey, groupSelectionsKey]);
40742
- useEffect47(() => {
40788
+ useEffect48(() => () => void commitSessionRef.current(), [selectionKey, groupSelectionsKey]);
40789
+ useEffect48(() => {
40743
40790
  const targets = params.groupSelections.length > 1 ? params.groupSelections : params.selection ? [params.selection] : [];
40744
40791
  if (!params.allowCanvasMovement || !canCanvasNudgeTargets(targets)) return;
40745
40792
  return acquireCanvasNudgeKeys();
@@ -40889,7 +40936,7 @@ var SnapGuideOverlay = memo28(function SnapGuideOverlay2({
40889
40936
  });
40890
40937
 
40891
40938
  // src/components/editor/DomEditCropHandles.tsx
40892
- import { useEffect as useEffect49, useRef as useRef68, useState as useState49 } from "react";
40939
+ import { useEffect as useEffect50, useRef as useRef68, useState as useState49 } from "react";
40893
40940
 
40894
40941
  // src/components/editor/cropResize.ts
40895
40942
  var boxOf = (element) => ({
@@ -40977,7 +41024,7 @@ async function writeSizeWithCrop(selection, properties, mutation, commit2, write
40977
41024
  }
40978
41025
 
40979
41026
  // src/components/editor/CropPresetBar.tsx
40980
- import { useEffect as useEffect48 } from "react";
41027
+ import { useEffect as useEffect49 } from "react";
40981
41028
 
40982
41029
  // src/components/editor/cropPresets.ts
40983
41030
  var CROP_ASPECT_PRESETS = [
@@ -41008,7 +41055,7 @@ function CropPresetBar({
41008
41055
  onApply,
41009
41056
  onDone
41010
41057
  }) {
41011
- useEffect48(() => {
41058
+ useEffect49(() => {
41012
41059
  const onKeyDown = (event) => {
41013
41060
  if (event.key === "Escape") onDone();
41014
41061
  };
@@ -41116,7 +41163,7 @@ function DomEditCropHandles({
41116
41163
  const committed = readCropFollowingResize(selection.element) ?? NO_CROP;
41117
41164
  const insets = dragging ? state.insets : committed;
41118
41165
  const hasCrop2 = hasCropInsets(insets);
41119
- useEffect49(() => {
41166
+ useEffect50(() => {
41120
41167
  const el = selection.element;
41121
41168
  if (readElementCropInsets(el) === null) return;
41122
41169
  liftElementCrop(el);
@@ -41800,10 +41847,10 @@ var CanvasContextMenu = memo29(function CanvasContextMenu2({
41800
41847
  });
41801
41848
 
41802
41849
  // src/components/editor/useInlineTextEditing.tsx
41803
- import { useEffect as useEffect53, useRef as useRef70 } from "react";
41850
+ import { useEffect as useEffect54, useRef as useRef70 } from "react";
41804
41851
 
41805
41852
  // src/components/editor/InlineTextCaret.tsx
41806
- import { useEffect as useEffect50, useState as useState50 } from "react";
41853
+ import { useEffect as useEffect51, useState as useState50 } from "react";
41807
41854
  import { createPortal as createPortal10 } from "react-dom";
41808
41855
  import { jsx as jsx102 } from "react/jsx-runtime";
41809
41856
  var CARET_PX = 2;
@@ -41813,7 +41860,7 @@ function InlineTextCaret({
41813
41860
  }) {
41814
41861
  const [placement, setPlacement] = useState50(null);
41815
41862
  const element = session?.element ?? null;
41816
- useEffect50(() => {
41863
+ useEffect51(() => {
41817
41864
  if (!element || !iframe) {
41818
41865
  setPlacement(null);
41819
41866
  return;
@@ -41964,7 +42011,7 @@ function neighbours({ startContainer: at, startOffset: offset }) {
41964
42011
  }
41965
42012
 
41966
42013
  // src/components/editor/InlineTextToolbar.tsx
41967
- import { useCallback as useCallback58, useEffect as useEffect51, useState as useState51 } from "react";
42014
+ import { useCallback as useCallback58, useEffect as useEffect52, useState as useState51 } from "react";
41968
42015
  import { createPortal as createPortal11 } from "react-dom";
41969
42016
 
41970
42017
  // src/components/editor/inlineTextStyleRange.ts
@@ -42354,7 +42401,7 @@ function InlineTextToolbar({
42354
42401
  const refresh2 = useCallback58(() => {
42355
42402
  setPlacement(session && iframe ? placeOverSelection(session.element, iframe) : null);
42356
42403
  }, [session, iframe]);
42357
- useEffect51(() => {
42404
+ useEffect52(() => {
42358
42405
  const doc = session?.element.ownerDocument;
42359
42406
  if (!doc) {
42360
42407
  setPlacement(null);
@@ -42532,7 +42579,7 @@ function isBold(weight) {
42532
42579
  }
42533
42580
 
42534
42581
  // src/hooks/useInlineTextEdit.ts
42535
- import { useCallback as useCallback59, useEffect as useEffect52, useRef as useRef69, useState as useState52 } from "react";
42582
+ import { useCallback as useCallback59, useEffect as useEffect53, useRef as useRef69, useState as useState52 } from "react";
42536
42583
  import { sanitizeRichTextChildren } from "@hyperframes/core/rich-text-sanitize";
42537
42584
  var EDITABLE = "true";
42538
42585
  var EDITING_OUTLINE = "2px solid #3CE6AC";
@@ -42618,10 +42665,10 @@ function useInlineTextEdit({
42618
42665
  if (open.element.isConnected) open.element.innerHTML = open.original;
42619
42666
  teardown();
42620
42667
  }, [teardown]);
42621
- useEffect52(() => {
42668
+ useEffect53(() => {
42622
42669
  if (readOnly && openRef.current) cancel();
42623
42670
  }, [cancel, readOnly]);
42624
- useEffect52(() => {
42671
+ useEffect53(() => {
42625
42672
  const element = session?.element;
42626
42673
  if (!element) return;
42627
42674
  const onKeyDown = (event) => {
@@ -42663,7 +42710,7 @@ function useInlineTextEdit({
42663
42710
  }, [session, commit2]);
42664
42711
  const commitRef = useRef69(commit2);
42665
42712
  commitRef.current = commit2;
42666
- useEffect52(() => () => commitRef.current(), []);
42713
+ useEffect53(() => () => commitRef.current(), []);
42667
42714
  return { session, start, commit: commit2, cancel };
42668
42715
  }
42669
42716
  function placeCaret(element, at) {
@@ -42780,7 +42827,7 @@ function useInlineTextEditing(selectionRef, { enterFromWindow = false } = {}) {
42780
42827
  };
42781
42828
  const handleKeyDownRef = useRef70(handleKeyDown);
42782
42829
  handleKeyDownRef.current = handleKeyDown;
42783
- useEffect53(() => {
42830
+ useEffect54(() => {
42784
42831
  if (!enterFromWindow) return;
42785
42832
  const onKeyDown = (event) => {
42786
42833
  const { body, documentElement } = window.document;
@@ -42824,7 +42871,7 @@ function useInlineTextEditing(selectionRef, { enterFromWindow = false } = {}) {
42824
42871
  }
42825
42872
 
42826
42873
  // src/components/editor/useOffCanvasIndicators.ts
42827
- import { useEffect as useEffect54, useRef as useRef71, useState as useState53 } from "react";
42874
+ import { useEffect as useEffect55, useRef as useRef71, useState as useState53 } from "react";
42828
42875
 
42829
42876
  // src/components/editor/offCanvasIndicatorGeometry.ts
42830
42877
  function rounded(value) {
@@ -43000,7 +43047,7 @@ function useOffCanvasIndicators({
43000
43047
  setRects: setOffCanvasRects
43001
43048
  })
43002
43049
  );
43003
- useEffect54(() => {
43050
+ useEffect55(() => {
43004
43051
  offCanvasDirtyRef.current = true;
43005
43052
  }, [activeCompositionPath]);
43006
43053
  return { offCanvasRects, offCanvasElementsRef };
@@ -43068,7 +43115,7 @@ var DomEditOverlay = memo30(function DomEditOverlay2({
43068
43115
  const inlineText = useInlineTextEditing(selectionRef, { enterFromWindow: hostInput });
43069
43116
  const onTextEditingChangeRef = useRef72(onTextEditingChange);
43070
43117
  onTextEditingChangeRef.current = onTextEditingChange;
43071
- useEffect55(() => {
43118
+ useEffect56(() => {
43072
43119
  if (!inlineText.editing) return;
43073
43120
  onTextEditingChangeRef.current?.(true);
43074
43121
  return () => onTextEditingChangeRef.current?.(false);
@@ -43160,7 +43207,7 @@ var DomEditOverlay = memo30(function DomEditOverlay2({
43160
43207
  onCanvasMouseDown,
43161
43208
  snapGuidesRef
43162
43209
  });
43163
- useEffect55(() => {
43210
+ useEffect56(() => {
43164
43211
  if (readOnly) gestures.clearPointerState(selectionRef, true);
43165
43212
  }, [gestures, readOnly, selectionRef]);
43166
43213
  const cancelGestureRef = useRef72((_dropQueued) => {
@@ -43404,7 +43451,7 @@ import { useCallback as useCallback63, useMemo as useMemo43 } from "react";
43404
43451
  import { useCallback as useCallback61 } from "react";
43405
43452
 
43406
43453
  // src/components/editor/useLayerRevealOverride.ts
43407
- import { useCallback as useCallback60, useEffect as useEffect56, useRef as useRef73 } from "react";
43454
+ import { useCallback as useCallback60, useEffect as useEffect57, useRef as useRef73 } from "react";
43408
43455
  import { revealClip } from "@hyperframes/core/runtime/clip-reveal";
43409
43456
  var LAYER_REVEAL_LIFT_Z = "2147483000";
43410
43457
  var LAYER_REVEAL_PENDING_COMMIT_ATTR = "data-hf-studio-reveal-pending-commit";
@@ -43637,13 +43684,13 @@ function useLayerRevealOverride({
43637
43684
  },
43638
43685
  [cancelScheduledReveal, reveal2]
43639
43686
  );
43640
- useEffect56(() => {
43687
+ useEffect57(() => {
43641
43688
  const pending2 = pendingRevealRef.current;
43642
43689
  if (isPlaying || pending2 && pending2.element !== selectedElement) cancelScheduledReveal();
43643
43690
  const base2 = stateRef.current?.base;
43644
43691
  if (isPlaying || base2 && selectedElement !== base2) restoreReveal();
43645
43692
  }, [cancelScheduledReveal, isPlaying, restoreReveal, selectedElement]);
43646
- useEffect56(
43693
+ useEffect57(
43647
43694
  () => () => {
43648
43695
  cancelScheduledReveal();
43649
43696
  restoreReveal();
@@ -45410,7 +45457,7 @@ function ConnectedDomEditOverlay({
45410
45457
 
45411
45458
  // src/components/editor/TopologyLens.tsx
45412
45459
  import {
45413
- useEffect as useEffect57,
45460
+ useEffect as useEffect58,
45414
45461
  useLayoutEffect as useLayoutEffect11,
45415
45462
  useReducer,
45416
45463
  useRef as useRef75,
@@ -46229,8 +46276,8 @@ function useTopologyLensState() {
46229
46276
  lifecycle,
46230
46277
  (initialLifecycle) => reduceTopologyLens({ phase: "hidden" }, { type: "lifecycle", value: initialLifecycle })
46231
46278
  );
46232
- useEffect57(() => dispatch({ type: "lifecycle", value: lifecycle }), [lifecycle]);
46233
- useEffect57(() => {
46279
+ useEffect58(() => dispatch({ type: "lifecycle", value: lifecycle }), [lifecycle]);
46280
+ useEffect58(() => {
46234
46281
  if (state.phase === "hidden") return;
46235
46282
  const delay2 = state.phase === "acquiring" ? ACQUISITION_MS : state.phase === "sealing" ? SEAL_MS : state.terminal ? TERMINAL_RETRACT_MS : null;
46236
46283
  if (delay2 === null) return;
@@ -46276,13 +46323,13 @@ function TopologyLens({ iframeRef, activeCompositionPath }) {
46276
46323
  setMeasured(geometry2 ? { callId, geometry: geometry2 } : null);
46277
46324
  }, [activeCompositionPath, callId, handle, iframeRef, phase]);
46278
46325
  const livePreviewIframe = useLivePreviewIframe();
46279
- useEffect57(() => {
46326
+ useEffect58(() => {
46280
46327
  const iframe = iframeRef.current;
46281
46328
  if (!iframe || !callId) return;
46282
46329
  const dismiss = () => studioEditLifecycle.dismiss(callId);
46283
46330
  return onPreviewContentReplaced(iframe, dismiss);
46284
46331
  }, [callId, iframeRef, livePreviewIframe]);
46285
- useEffect57(() => {
46332
+ useEffect58(() => {
46286
46333
  if (pendingUnmountDismissRef.current !== null) {
46287
46334
  window.clearTimeout(pendingUnmountDismissRef.current);
46288
46335
  pendingUnmountDismissRef.current = null;
@@ -46550,7 +46597,7 @@ function writeKeyframeCache(sourceFile, elementId2, data) {
46550
46597
  }
46551
46598
 
46552
46599
  // src/components/editor/MotionPathOverlay.tsx
46553
- import { memo as memo31, useEffect as useEffect59, useRef as useRef77, useState as useState56 } from "react";
46600
+ import { memo as memo31, useEffect as useEffect60, useRef as useRef77, useState as useState56 } from "react";
46554
46601
 
46555
46602
  // src/hooks/useGsapInteractionFailureTelemetry.ts
46556
46603
  import { useCallback as useCallback64 } from "react";
@@ -47963,7 +48010,7 @@ function elementHome(el) {
47963
48010
  }
47964
48011
 
47965
48012
  // src/components/editor/useMotionPathData.ts
47966
- import { useEffect as useEffect58, useRef as useRef76, useState as useState55 } from "react";
48013
+ import { useEffect as useEffect59, useRef as useRef76, useState as useState55 } from "react";
47967
48014
  import { isHtmlElement as isHtmlElement8 } from "@hyperframes/core/runtime/dom-realm";
47968
48015
  function transformWDivisor(el) {
47969
48016
  const t2 = el.ownerDocument?.defaultView?.getComputedStyle(el).transform;
@@ -47994,7 +48041,7 @@ function useMotionPathData(iframeRef, selector) {
47994
48041
  const [pScale, setPScale] = useState55(1);
47995
48042
  const armed = usePlayerStore((s) => s.motionPathArmed);
47996
48043
  const drawn = geometry !== null || armed;
47997
- useEffect58(() => {
48044
+ useEffect59(() => {
47998
48045
  if (!selector) {
47999
48046
  setRect(null);
48000
48047
  setHome(null);
@@ -48035,7 +48082,7 @@ function useMotionPathData(iframeRef, selector) {
48035
48082
  };
48036
48083
  return subscribeOverlayFrame(tick);
48037
48084
  }, [selector, iframeRef, drawn]);
48038
- useEffect58(() => {
48085
+ useEffect59(() => {
48039
48086
  if (!selector) {
48040
48087
  setGeometry(null);
48041
48088
  return;
@@ -48111,20 +48158,20 @@ var MotionPathOverlay = memo31(function MotionPathOverlay2({
48111
48158
  geometry?.kind ?? "linear",
48112
48159
  selection
48113
48160
  );
48114
- useEffect59(() => () => clearTimeout(parkTimerRef.current), [animId]);
48161
+ useEffect60(() => () => clearTimeout(parkTimerRef.current), [animId]);
48115
48162
  const createMode = geometryResolved && !geometry && Boolean(selection?.element) && !isPlaying;
48116
48163
  const createSelector = createMode ? selectorFor(selection) : null;
48117
48164
  const compW = compositionSize?.width ?? null;
48118
48165
  const livePreviewIframe = useLivePreviewIframe();
48119
48166
  const canCreate = createMode && !!createSelector && hasMotionPathPlugin(livePreviewIframe);
48120
- useEffect59(() => {
48167
+ useEffect60(() => {
48121
48168
  setMotionPathCreateAvailable(Boolean(canCreate));
48122
48169
  return () => setMotionPathCreateAvailable(false);
48123
48170
  }, [canCreate, setMotionPathCreateAvailable]);
48124
- useEffect59(() => {
48171
+ useEffect60(() => {
48125
48172
  if (armed && !canCreate) setMotionPathArmed(false);
48126
48173
  }, [armed, canCreate, setMotionPathArmed]);
48127
- useEffect59(() => {
48174
+ useEffect60(() => {
48128
48175
  if (!armed || !createSelector || !compW) return;
48129
48176
  const surface = iframeRef.current?.ownerDocument?.querySelector(
48130
48177
  "[data-preview-pan-surface]"
@@ -48426,7 +48473,7 @@ var MotionPathOverlay = memo31(function MotionPathOverlay2({
48426
48473
  });
48427
48474
 
48428
48475
  // src/components/editor/SnapToolbar.tsx
48429
- import { memo as memo32, useCallback as useCallback65, useEffect as useEffect60, useRef as useRef78, useState as useState57 } from "react";
48476
+ import { memo as memo32, useCallback as useCallback65, useEffect as useEffect61, useRef as useRef78, useState as useState57 } from "react";
48430
48477
  import { MagnetStraight, GridFour, Path, Ruler, FrameCorners } from "@phosphor-icons/react";
48431
48478
  import { jsx as jsx110, jsxs as jsxs77 } from "react/jsx-runtime";
48432
48479
  var SnapToolbar = memo32(function SnapToolbar2() {
@@ -48447,7 +48494,7 @@ var SnapToolbar = memo32(function SnapToolbar2() {
48447
48494
  if (previous !== null && previous !== currentGridSpacing.current)
48448
48495
  trackPreviewFeatureUsed("grid_spacing", "field");
48449
48496
  }, []);
48450
- useEffect60(() => settleGridSpacing, [settleGridSpacing]);
48497
+ useEffect61(() => settleGridSpacing, [settleGridSpacing]);
48451
48498
  const updatePrefs = useCallback65(
48452
48499
  (patch) => {
48453
48500
  actions.setSnapPrefs(patch);
@@ -48462,7 +48509,7 @@ var SnapToolbar = memo32(function SnapToolbar2() {
48462
48509
  updatePrefs({ gridVisible: !prefs.gridVisible });
48463
48510
  trackPreviewFeatureUsed("grid", "button");
48464
48511
  }, [prefs.gridVisible, updatePrefs]);
48465
- useEffect60(() => {
48512
+ useEffect61(() => {
48466
48513
  const handleKeyDown = (e) => {
48467
48514
  if (e.defaultPrevented) return;
48468
48515
  if (ownsPlainKeys(e.target)) return;
@@ -48481,7 +48528,7 @@ var SnapToolbar = memo32(function SnapToolbar2() {
48481
48528
  document.addEventListener("keydown", handleKeyDown);
48482
48529
  return () => document.removeEventListener("keydown", handleKeyDown);
48483
48530
  }, [prefs.gridVisible, prefs.snapEnabled, updatePrefs]);
48484
- useEffect60(() => {
48531
+ useEffect61(() => {
48485
48532
  if (!gridPopoverOpen) return;
48486
48533
  const handleClickOutside = (e) => {
48487
48534
  const target = e.target;
@@ -48672,7 +48719,7 @@ var GridOverlay = memo33(function GridOverlay2() {
48672
48719
  });
48673
48720
 
48674
48721
  // src/hooks/useCompositionDimensions.ts
48675
- import { useEffect as useEffect61, useState as useState58 } from "react";
48722
+ import { useEffect as useEffect62, useState as useState58 } from "react";
48676
48723
  function readCompositionSizeMessage(data) {
48677
48724
  if (!isStageSizeMessage(data)) return null;
48678
48725
  const message = data;
@@ -48700,7 +48747,7 @@ function useCompositionDimensions(iframeRef) {
48700
48747
  null
48701
48748
  );
48702
48749
  const livePreviewIframe = useLivePreviewIframe();
48703
- useEffect61(() => {
48750
+ useEffect62(() => {
48704
48751
  const dimensions = readPreviewCompositionSize(livePreviewIframe);
48705
48752
  if (!dimensions) return;
48706
48753
  setCompositionDimensions(
@@ -48861,7 +48908,7 @@ function PreviewOverlays({
48861
48908
  import { useCallback as useCallback68, useMemo as useMemo45 } from "react";
48862
48909
 
48863
48910
  // src/hooks/useGsapTweenCache.ts
48864
- import { useEffect as useEffect62, useMemo as useMemo44, useRef as useRef79, useState as useState59, useCallback as useCallback67 } from "react";
48911
+ import { useEffect as useEffect63, useMemo as useMemo44, useRef as useRef79, useState as useState59, useCallback as useCallback67 } from "react";
48865
48912
 
48866
48913
  // src/hooks/gsapRuntimeBridge.ts
48867
48914
  import { isXYPositionWrite, PROPERTY_GROUPS } from "@hyperframes/parsers/gsap-constants";
@@ -49492,7 +49539,7 @@ function useGsapAnimationsForElement(projectId, sourceFile, target, version, ifr
49492
49539
  const domClipChildrenKey = usePlayerStore(
49493
49540
  (s) => s.domClipChildren.map((c) => `${c.id}<${c.hostId}`).join("|")
49494
49541
  );
49495
- useEffect62(() => {
49542
+ useEffect63(() => {
49496
49543
  const targetKey = target?.id ?? target?.selector ?? "";
49497
49544
  const fetchKey = `${projectId}:${sourceFile}:${version}:${targetKey}`;
49498
49545
  if (fetchKey === lastFetchKeyRef.current) return;
@@ -49584,7 +49631,7 @@ function useGsapAnimationsForElement(projectId, sourceFile, target, version, ifr
49584
49631
  return result;
49585
49632
  }, [rawAnimations, allAnimations, iframeRef, targetId]);
49586
49633
  const elementId2 = target?.id ?? null;
49587
- useEffect62(() => {
49634
+ useEffect63(() => {
49588
49635
  if (!elementId2) return;
49589
49636
  const sourceAnimations = animations.filter(
49590
49637
  (animation2) => !isStaticPositionHold(animation2) && (animation2.keyframes || synthesizeFlatTweenKeyframes(animation2))
@@ -49652,7 +49699,7 @@ function usePopulateKeyframeCacheForFile(projectId, sourceFile, version, iframeR
49652
49699
  files: /* @__PURE__ */ new Set()
49653
49700
  });
49654
49701
  const runtimeScanDoneRef = useRef79("");
49655
- useEffect62(() => {
49702
+ useEffect63(() => {
49656
49703
  const dataKey = `kf-cache:${projectId}:${version}:${elementCount}:${domClipChildrenKey}:${compositionSrcKey}`;
49657
49704
  if (!projectId) return;
49658
49705
  const files = Array.from(
@@ -49672,7 +49719,7 @@ function usePopulateKeyframeCacheForFile(projectId, sourceFile, version, iframeR
49672
49719
  });
49673
49720
  }
49674
49721
  }, [projectId, sourceFile, version, elementCount, domClipChildrenKey, compositionSrcKey]);
49675
- useEffect62(() => {
49722
+ useEffect63(() => {
49676
49723
  if (!projectId) return;
49677
49724
  const sf = sourceFile;
49678
49725
  let attempts = 0;
@@ -50178,7 +50225,7 @@ var CaptionTimeline = memo34(function CaptionTimeline2({
50178
50225
  });
50179
50226
 
50180
50227
  // src/hooks/useTimelineSelectionPreviewSync.ts
50181
- import { useEffect as useEffect63, useMemo as useMemo46, useRef as useRef80 } from "react";
50228
+ import { useEffect as useEffect64, useMemo as useMemo46, useRef as useRef80 } from "react";
50182
50229
  var MAX_UNRESOLVED_SYNC_RETRIES = 3;
50183
50230
  function orderSelectedIds(ids, anchor2) {
50184
50231
  const ordered = [...ids];
@@ -50237,7 +50284,7 @@ function useTimelineSelectionPreviewSync({
50237
50284
  const unresolvedAttemptsRef = useRef80({ id: "", count: 0 });
50238
50285
  domEditSelectionRef.current = domEditSelection;
50239
50286
  domEditGroupSelectionsRef.current = domEditGroupSelections;
50240
- useEffect63(() => {
50287
+ useEffect64(() => {
50241
50288
  const previousSelectedKey = lastSyncedSelectedKeyRef.current;
50242
50289
  lastSyncedSelectedKeyRef.current = selectedKey;
50243
50290
  const currentDomEditSelection = domEditSelectionRef.current;
@@ -50314,10 +50361,10 @@ function useTimelineSelectionPreviewSync({
50314
50361
  }
50315
50362
 
50316
50363
  // src/webmcp/StudioAgentTools.tsx
50317
- import { useCallback as useCallback70, useEffect as useEffect65, useMemo as useMemo47 } from "react";
50364
+ import { useCallback as useCallback70, useEffect as useEffect66, useMemo as useMemo47 } from "react";
50318
50365
 
50319
50366
  // src/webmcp/useStudioAgentTools.ts
50320
- import { useEffect as useEffect64, useRef as useRef81 } from "react";
50367
+ import { useEffect as useEffect65, useRef as useRef81 } from "react";
50321
50368
 
50322
50369
  // src/webmcp/types.ts
50323
50370
  function isModelContext(value) {
@@ -51538,7 +51585,7 @@ function readNumberInput(input, key2) {
51538
51585
  function useStudioAgentTools(deps) {
51539
51586
  const depsRef = useRef81(deps);
51540
51587
  depsRef.current = deps;
51541
- useEffect64(() => {
51588
+ useEffect65(() => {
51542
51589
  if (readStudioUiPreferences().agentToolsEnabled === false) {
51543
51590
  log2("skipped", { why: "disabled by preference" });
51544
51591
  return;
@@ -51602,7 +51649,7 @@ function StudioAgentTools() {
51602
51649
  handleGsapDeleteAnimation,
51603
51650
  getGsapAnimationsForSelection
51604
51651
  } = useDomEditActionsContext();
51605
- useEffect65(() => {
51652
+ useEffect66(() => {
51606
51653
  studioEditLifecycle.activateProject(projectId);
51607
51654
  return () => studioEditLifecycle.reset();
51608
51655
  }, [projectId]);
@@ -51723,7 +51770,7 @@ import {
51723
51770
  createContext as createContext7,
51724
51771
  useCallback as useCallback73,
51725
51772
  useContext as useContext11,
51726
- useEffect as useEffect66,
51773
+ useEffect as useEffect67,
51727
51774
  useRef as useRef82,
51728
51775
  useState as useState60
51729
51776
  } from "react";
@@ -52282,7 +52329,7 @@ function Root({
52282
52329
  }, []);
52283
52330
  const disposeRef = useRef82(() => {
52284
52331
  });
52285
- useEffect66(() => () => disposeRef.current(), []);
52332
+ useEffect67(() => () => disposeRef.current(), []);
52286
52333
  const onReady = useCallback73(
52287
52334
  ({ api }) => {
52288
52335
  disposeRef.current();
@@ -52360,7 +52407,7 @@ function Panel({ id, title, children }) {
52360
52407
  const controller = useDockLayoutStore((state) => state.controller);
52361
52408
  const open = useDockLayoutStore((state) => state.openPanels.has(id));
52362
52409
  const label = title ?? PANEL_DEFINITIONS[id].title;
52363
- useEffect66(() => {
52410
+ useEffect67(() => {
52364
52411
  if (open) controller?.setTitle(id, label);
52365
52412
  }, [controller, id, label, open]);
52366
52413
  const definition = PANEL_DEFINITIONS[id];
@@ -52374,7 +52421,7 @@ function WindowMenu() {
52374
52421
  const resetLayout = useDockLayoutStore((state) => state.resetLayout);
52375
52422
  const [open, setOpen] = useState60(false);
52376
52423
  const rootRef = useRef82(null);
52377
- useEffect66(() => {
52424
+ useEffect67(() => {
52378
52425
  if (!open) return;
52379
52426
  const close = (event) => {
52380
52427
  if (!rootRef.current?.contains(event.target)) setOpen(false);
@@ -52683,6 +52730,9 @@ function dispatchLinkShortcut(event, cb) {
52683
52730
  return true;
52684
52731
  }
52685
52732
 
52733
+ // src/index.ts
52734
+ import { PREVIEW_QUALITY_LEVELS } from "@hyperframes/core/preview-quality";
52735
+
52686
52736
  // src/player/components/ImageThumbnail.tsx
52687
52737
  import { memo as memo36, useMemo as useMemo48 } from "react";
52688
52738
 
@@ -52889,7 +52939,7 @@ function AudibleVideoClipContent({
52889
52939
  }
52890
52940
 
52891
52941
  // src/player/components/ClipPeakMarks.tsx
52892
- import { useContext as useContext12, useEffect as useEffect67, useState as useState61 } from "react";
52942
+ import { useContext as useContext12, useEffect as useEffect68, useState as useState61 } from "react";
52893
52943
  import { jsx as jsx121, jsxs as jsxs86 } from "react/jsx-runtime";
52894
52944
  var dbText2 = (db) => `${db < 0 ? "\u2212" : "+"}${Math.abs(db).toFixed(1)} dBFS`;
52895
52945
  function ClipPeakMarks({
@@ -52899,7 +52949,7 @@ function ClipPeakMarks({
52899
52949
  children
52900
52950
  }) {
52901
52951
  const [map, setMap] = useState61(null);
52902
- useEffect67(() => {
52952
+ useEffect68(() => {
52903
52953
  if (!peaksUrl) return;
52904
52954
  let live = true;
52905
52955
  void loadPeakMap(peaksUrl).then((loaded) => {
@@ -52912,7 +52962,7 @@ function ClipPeakMarks({
52912
52962
  const { runs, peakDbfs } = map ? clipPeakRuns(map, sourceWindow, gain) : { runs: [], peakDbfs: null };
52913
52963
  const detail = runs.length > 0 && peakDbfs !== null ? `Peaks ${dbText2(peakDbfs)} at this volume; export lowers the whole mix` : null;
52914
52964
  const setDetail = useContext12(ClipPeakDescriptionContext);
52915
- useEffect67(() => {
52965
+ useEffect68(() => {
52916
52966
  setDetail?.(detail);
52917
52967
  return () => setDetail?.(null);
52918
52968
  }, [detail, setDetail]);
@@ -53149,7 +53199,7 @@ function useThumbnailStill(url, projectId, { sessionEpoch = 0, priority = "visib
53149
53199
  }
53150
53200
 
53151
53201
  // src/components/editor/SourceEditor.tsx
53152
- import { useRef as useRef83, useCallback as useCallback76, useEffect as useEffect68, memo as memo37 } from "react";
53202
+ import { useRef as useRef83, useCallback as useCallback76, useEffect as useEffect69, memo as memo37 } from "react";
53153
53203
  import {
53154
53204
  EditorView as EditorView2,
53155
53205
  keymap,
@@ -53346,7 +53396,7 @@ var SourceEditor = memo37(function SourceEditor2({
53346
53396
  },
53347
53397
  [filePath, language, readOnly]
53348
53398
  );
53349
- useEffect68(() => {
53399
+ useEffect69(() => {
53350
53400
  const view = editorRef.current;
53351
53401
  if (!view) return;
53352
53402
  const current = view.state.doc.toString();
@@ -53357,7 +53407,7 @@ var SourceEditor = memo37(function SourceEditor2({
53357
53407
  annotations: [ExternalSync.of(true)]
53358
53408
  });
53359
53409
  }, [content]);
53360
- useEffect68(() => {
53410
+ useEffect69(() => {
53361
53411
  const view = editorRef.current;
53362
53412
  if (!view || revealOffset == null || revealOffset < 0) return;
53363
53413
  const docLen = view.state.doc.length;
@@ -54033,13 +54083,13 @@ function buildElementInfoText(element, sourceLabel, gsapAnimations, previewIfram
54033
54083
  }
54034
54084
 
54035
54085
  // src/components/editor/propertyPanelPrimitives.tsx
54036
- import { useCallback as useCallback79, useEffect as useEffect71, useRef as useRef86, useState as useState64 } from "react";
54086
+ import { useCallback as useCallback79, useEffect as useEffect72, useRef as useRef86, useState as useState64 } from "react";
54037
54087
 
54038
54088
  // src/components/editor/propertyPanelCommitField.tsx
54039
- import { useEffect as useEffect70, useRef as useRef85, useState as useState63 } from "react";
54089
+ import { useEffect as useEffect71, useRef as useRef85, useState as useState63 } from "react";
54040
54090
 
54041
54091
  // src/components/editor/useInspectorGestureTransaction.ts
54042
- import { useCallback as useCallback78, useEffect as useEffect69, useRef as useRef84, useState as useState62 } from "react";
54092
+ import { useCallback as useCallback78, useEffect as useEffect70, useRef as useRef84, useState as useState62 } from "react";
54043
54093
  function isPromiseCommit(result) {
54044
54094
  return Boolean(result && typeof result.then === "function");
54045
54095
  }
@@ -54131,7 +54181,7 @@ function useInspectorGestureTransaction({
54131
54181
  previewRef.current(active.before);
54132
54182
  }
54133
54183
  }, []);
54134
- useEffect69(() => cancel, [cancel]);
54184
+ useEffect70(() => cancel, [cancel]);
54135
54185
  return { begin, preview: preview2, settle, cancel, activeRef };
54136
54186
  }
54137
54187
  function useInspectorGestureDraft({
@@ -54151,7 +54201,7 @@ function useInspectorGestureDraft({
54151
54201
  return onCommit(next);
54152
54202
  }
54153
54203
  });
54154
- useEffect69(() => {
54204
+ useEffect70(() => {
54155
54205
  if (!transaction.activeRef.current) setDraft(sourceValue);
54156
54206
  }, [sourceValue, transaction.activeRef]);
54157
54207
  return { draft, setDraft, transaction };
@@ -54291,11 +54341,11 @@ function CommitField({
54291
54341
  }
54292
54342
  previewNumericKeyStep(event);
54293
54343
  };
54294
- useEffect70(() => {
54344
+ useEffect71(() => {
54295
54345
  if (focusedRef.current && dirtyRef.current) return;
54296
54346
  setDraft(value);
54297
54347
  }, [value]);
54298
- useEffect70(() => {
54348
+ useEffect71(() => {
54299
54349
  const el = inputRef.current;
54300
54350
  if (!el) return;
54301
54351
  const handler = (event) => {
@@ -54446,10 +54496,10 @@ function SliderControl({
54446
54496
  const interactionChangedRef = useRef86(false);
54447
54497
  const valueRef = useRef86(value);
54448
54498
  valueRef.current = value;
54449
- useEffect71(() => {
54499
+ useEffect72(() => {
54450
54500
  setDraft(value);
54451
54501
  }, [value]);
54452
- useEffect71(
54502
+ useEffect72(
54453
54503
  () => () => {
54454
54504
  if (commitTimerRef.current) clearTimeout(commitTimerRef.current);
54455
54505
  },
@@ -54687,7 +54737,7 @@ function createTransformCommitHandlers({
54687
54737
  import { resolveEditingSections } from "@hyperframes/core/editing";
54688
54738
 
54689
54739
  // src/components/editor/propertyPanelMediaSection.tsx
54690
- import { useEffect as useEffect72, useState as useState65 } from "react";
54740
+ import { useEffect as useEffect73, useState as useState65 } from "react";
54691
54741
  import {
54692
54742
  AUDIO_GAIN_FADER_MAX as AUDIO_GAIN_FADER_MAX2,
54693
54743
  AUDIO_GAIN_FADER_MIN as AUDIO_GAIN_FADER_MIN2,
@@ -54797,7 +54847,7 @@ function MediaSection({
54797
54847
  const absoluteSrc = projectDir && projectSrc ? `${projectDir}/${projectSrc}` : srcAttr;
54798
54848
  const canRemoveBackground = Boolean(onRemoveBackground && isVisualMedia && projectSrc);
54799
54849
  const panelTitle = isImage ? "Image" : isVideo ? "Video" : "Audio";
54800
- useEffect72(() => {
54850
+ useEffect73(() => {
54801
54851
  setRemoveProgress(null);
54802
54852
  setCreatePlate(false);
54803
54853
  }, [srcAttr]);
@@ -55092,7 +55142,7 @@ import {
55092
55142
  } from "@hyperframes/core/color-grading";
55093
55143
 
55094
55144
  // src/components/editor/propertyPanelColorGradingSlider.tsx
55095
- import { useCallback as useCallback80, useEffect as useEffect73, useRef as useRef87, useState as useState66 } from "react";
55145
+ import { useCallback as useCallback80, useEffect as useEffect74, useRef as useRef87, useState as useState66 } from "react";
55096
55146
  import { jsx as jsx128, jsxs as jsxs90 } from "react/jsx-runtime";
55097
55147
  var SLIDER_THUMB_SIZE = 10;
55098
55148
  var SLIDER_THUMB_RADIUS = SLIDER_THUMB_SIZE / 2;
@@ -55135,7 +55185,7 @@ function ColorGradingSliderControl({
55135
55185
  const interactionChangedRef = useRef87(false);
55136
55186
  const valueRef = useRef87(value);
55137
55187
  valueRef.current = value;
55138
- useEffect73(
55188
+ useEffect74(
55139
55189
  () => () => {
55140
55190
  if (commitTimerRef.current) clearTimeout(commitTimerRef.current);
55141
55191
  },
@@ -55809,7 +55859,7 @@ function ColorGradingControls({
55809
55859
  }
55810
55860
 
55811
55861
  // src/components/editor/useColorGradingController.ts
55812
- import { useCallback as useCallback82, useEffect as useEffect75, useMemo as useMemo52, useRef as useRef90, useState as useState69 } from "react";
55862
+ import { useCallback as useCallback82, useEffect as useEffect76, useMemo as useMemo52, useRef as useRef90, useState as useState69 } from "react";
55813
55863
  import {
55814
55864
  HF_COLOR_GRADING_ATTR as HF_COLOR_GRADING_ATTR3,
55815
55865
  hasHfColorGradingAuthoredValues,
@@ -55819,7 +55869,7 @@ import {
55819
55869
  } from "@hyperframes/core/color-grading";
55820
55870
 
55821
55871
  // src/components/editor/useColorGradingPreviews.ts
55822
- import { useCallback as useCallback81, useEffect as useEffect74, useRef as useRef89, useState as useState68 } from "react";
55872
+ import { useCallback as useCallback81, useEffect as useEffect75, useRef as useRef89, useState as useState68 } from "react";
55823
55873
  import {
55824
55874
  HF_COLOR_GRADING_ACTIVE_EFFECT_KEYS,
55825
55875
  HF_COLOR_GRADING_EFFECT_APPLY_DEFAULTS,
@@ -55900,7 +55950,7 @@ function useColorGradingPreviews({
55900
55950
  }
55901
55951
  const previews = state.identityKey === identityKey ? state.previews : emptyPreviews();
55902
55952
  const livePreviewIframe = useLivePreviewIframe();
55903
- useEffect74(() => {
55953
+ useEffect75(() => {
55904
55954
  if (!request2) return;
55905
55955
  const { kind } = request2;
55906
55956
  const iframe = previewIframeRef?.current;
@@ -56047,7 +56097,7 @@ function useColorGradingPreviews({
56047
56097
  },
56048
56098
  [gradingRef, postColorGrading, previewIframeRef, stopAnimatedPreview, target]
56049
56099
  );
56050
- useEffect74(() => stopAnimatedPreview, [identityKey, stopAnimatedPreview]);
56100
+ useEffect75(() => stopAnimatedPreview, [identityKey, stopAnimatedPreview]);
56051
56101
  const requestPreviews = useCallback81(
56052
56102
  (kind, effects) => {
56053
56103
  setRequest((current) => ({
@@ -56203,7 +56253,7 @@ function useColorGradingController({
56203
56253
  setRuntimeStatus({ state: "pending", message: "Waiting for runtime" });
56204
56254
  setMediaMetadata(null);
56205
56255
  }
56206
- useEffect75(() => {
56256
+ useEffect76(() => {
56207
56257
  return () => {
56208
56258
  for (const timer of statusTimersRef.current) clearTimeout(timer);
56209
56259
  statusTimersRef.current = [];
@@ -56231,7 +56281,7 @@ function useColorGradingController({
56231
56281
  const refreshRuntimeStatus = useCallback82(() => {
56232
56282
  setRuntimeStatus(readRuntimeColorGradingStatus(previewIframeRef?.current, target));
56233
56283
  }, [previewIframeRef, target]);
56234
- useEffect75(() => {
56284
+ useEffect76(() => {
56235
56285
  setMediaMetadata(null);
56236
56286
  if (!selectedAssetPath) return;
56237
56287
  const cacheKey = mediaMetadataUrl(projectId, selectedAssetPath);
@@ -56267,7 +56317,7 @@ function useColorGradingController({
56267
56317
  (delay2) => window.setTimeout(refreshRuntimeStatus, delay2)
56268
56318
  );
56269
56319
  }, [clearStatusTimers, refreshRuntimeStatus]);
56270
- useEffect75(() => {
56320
+ useEffect76(() => {
56271
56321
  refreshRuntimeStatus();
56272
56322
  }, [refreshRuntimeStatus]);
56273
56323
  const persistColorGradingValue = useCallback82(
@@ -56315,8 +56365,8 @@ function useColorGradingController({
56315
56365
  onSetAttributeLive
56316
56366
  );
56317
56367
  }, [onSetAttributeLive, persistColorGradingValue]);
56318
- useEffect75(() => addStudioPendingEditFlushListener(flushPendingPersist), [flushPendingPersist]);
56319
- useEffect75(() => {
56368
+ useEffect76(() => addStudioPendingEditFlushListener(flushPendingPersist), [flushPendingPersist]);
56369
+ useEffect76(() => {
56320
56370
  return () => {
56321
56371
  clearStatusTimers();
56322
56372
  void flushPendingPersist();
@@ -56353,7 +56403,7 @@ function useColorGradingController({
56353
56403
  [previewIframeRef, target]
56354
56404
  );
56355
56405
  const livePreviewIframe = useLivePreviewIframe();
56356
- useEffect75(() => {
56406
+ useEffect76(() => {
56357
56407
  const iframe = previewIframeRef?.current;
56358
56408
  if (!iframe) return;
56359
56409
  const refreshAndReplay = () => {
@@ -56385,7 +56435,7 @@ function useColorGradingController({
56385
56435
  scheduleRuntimeStatusRefresh,
56386
56436
  livePreviewIframe
56387
56437
  ]);
56388
- useEffect75(
56438
+ useEffect76(
56389
56439
  () => () => {
56390
56440
  postCompare(false);
56391
56441
  },
@@ -56689,10 +56739,10 @@ function ColorGradingSection({
56689
56739
  }
56690
56740
 
56691
56741
  // src/components/editor/propertyPanelSections.tsx
56692
- import { useEffect as useEffect81, useRef as useRef95, useState as useState78 } from "react";
56742
+ import { useEffect as useEffect82, useRef as useRef95, useState as useState78 } from "react";
56693
56743
 
56694
56744
  // src/components/editor/propertyPanelColor.tsx
56695
- import { useCallback as useCallback83, useEffect as useEffect76, useLayoutEffect as useLayoutEffect12, useRef as useRef91, useState as useState70 } from "react";
56745
+ import { useCallback as useCallback83, useEffect as useEffect77, useLayoutEffect as useLayoutEffect12, useRef as useRef91, useState as useState70 } from "react";
56696
56746
  import { createPortal as createPortal13 } from "react-dom";
56697
56747
  import { jsx as jsx131, jsxs as jsxs93 } from "react/jsx-runtime";
56698
56748
  var COLOR_PICKER_SIZE = { width: 292, height: 386 };
@@ -56871,7 +56921,7 @@ function ColorField({
56871
56921
  if (resolved2) persistColorValue(resolved2.value);
56872
56922
  }
56873
56923
  });
56874
- useEffect76(() => {
56924
+ useEffect77(() => {
56875
56925
  const nextColor = colorFromCss(value);
56876
56926
  setDraftColor(nextColor);
56877
56927
  setHexDraft(toHexColor(nextColor).toUpperCase());
@@ -56902,7 +56952,7 @@ function ColorField({
56902
56952
  window.removeEventListener("scroll", handlePositionInvalidated, true);
56903
56953
  };
56904
56954
  }, [open, updatePanelPosition]);
56905
- useEffect76(() => {
56955
+ useEffect77(() => {
56906
56956
  if (!open) return;
56907
56957
  panelRef.current?.focus();
56908
56958
  const restoreTarget = buttonRef.current;
@@ -57199,7 +57249,7 @@ function ColorField({
57199
57249
  }
57200
57250
 
57201
57251
  // src/components/editor/propertyPanelFont.tsx
57202
- import { useEffect as useEffect77, useMemo as useMemo53, useRef as useRef92, useState as useState71, useSyncExternalStore as useSyncExternalStore10 } from "react";
57252
+ import { useEffect as useEffect78, useMemo as useMemo53, useRef as useRef92, useState as useState71, useSyncExternalStore as useSyncExternalStore10 } from "react";
57203
57253
 
57204
57254
  // src/components/editor/fontAssets.ts
57205
57255
  var FONT_EXT_RE = /\.(eot|otf|ttc|ttf|woff2?)$/i;
@@ -57375,7 +57425,7 @@ function FontFamilyField({
57375
57425
  if (nextValue !== value) track2("select", "Font family");
57376
57426
  onCommit(nextValue);
57377
57427
  };
57378
- useEffect77(() => {
57428
+ useEffect78(() => {
57379
57429
  if (!open) return;
57380
57430
  const handlePointerDown = (event) => {
57381
57431
  const target = event.target;
@@ -57385,14 +57435,14 @@ function FontFamilyField({
57385
57435
  document.addEventListener("pointerdown", handlePointerDown);
57386
57436
  return () => document.removeEventListener("pointerdown", handlePointerDown);
57387
57437
  }, [open]);
57388
- useEffect77(() => {
57438
+ useEffect78(() => {
57389
57439
  if (!open) return;
57390
57440
  requestAnimationFrame(() => inputRef.current?.focus());
57391
57441
  }, [open]);
57392
- useEffect77(() => {
57442
+ useEffect78(() => {
57393
57443
  if (open) loadFontLists();
57394
57444
  }, [open]);
57395
- useEffect77(() => {
57445
+ useEffect78(() => {
57396
57446
  if (lists.googleKeys.has(currentFamily.toLowerCase())) {
57397
57447
  loadGoogleFontStylesheet(currentFamily);
57398
57448
  }
@@ -57700,7 +57750,7 @@ function FontFamilyField({
57700
57750
  }
57701
57751
 
57702
57752
  // src/components/editor/PromotableControl.tsx
57703
- import { useEffect as useEffect79 } from "react";
57753
+ import { useEffect as useEffect80 } from "react";
57704
57754
 
57705
57755
  // src/components/panels/VariablesBindElement.tsx
57706
57756
  import { useMemo as useMemo54, useState as useState73 } from "react";
@@ -58101,7 +58151,7 @@ function uniqueId(base2, existing) {
58101
58151
  }
58102
58152
 
58103
58153
  // src/contexts/VariablePromoteContext.tsx
58104
- import { useContext as useContext14, useEffect as useEffect78, useMemo as useMemo55, useState as useState74 } from "react";
58154
+ import { useContext as useContext14, useEffect as useEffect79, useMemo as useMemo55, useState as useState74 } from "react";
58105
58155
  import { jsx as jsx135 } from "react/jsx-runtime";
58106
58156
  var VariablePromoteContext = createStableContext(
58107
58157
  "VariablePromoteContext",
@@ -58120,7 +58170,7 @@ function VariablePromoteProvider({
58120
58170
  children
58121
58171
  }) {
58122
58172
  const [revision, setRevision] = useState74(0);
58123
- useEffect78(() => {
58173
+ useEffect79(() => {
58124
58174
  if (!session) return;
58125
58175
  return session.on("change", () => setRevision((r) => r + 1));
58126
58176
  }, [session]);
@@ -58182,7 +58232,7 @@ function PromotableControl({
58182
58232
  }) {
58183
58233
  const promote = useVariablePromoteChannel(channel);
58184
58234
  const danglingId = enabled && promote && promote.boundId != null && promote.declaration == null ? promote.boundId : null;
58185
- useEffect79(() => {
58235
+ useEffect80(() => {
58186
58236
  if (danglingId != null) {
58187
58237
  console.warn(
58188
58238
  `[hyperframes] Control is bound to variable "${danglingId}", but no such declaration exists. The element still carries the binding on disk. Re-declare the variable or unbind the element.`
@@ -58232,7 +58282,7 @@ function PromotableControl({
58232
58282
  }
58233
58283
 
58234
58284
  // src/components/editor/propertyPanelStyleSections.tsx
58235
- import { useEffect as useEffect80, useRef as useRef94, useState as useState77 } from "react";
58285
+ import { useEffect as useEffect81, useRef as useRef94, useState as useState77 } from "react";
58236
58286
 
58237
58287
  // src/components/editor/gradientValue.ts
58238
58288
  var RADIAL_SIZE_KEYWORDS = [
@@ -59268,10 +59318,10 @@ function StyleSections({
59268
59318
  const lastGradientRef = useRef94(
59269
59319
  backgroundImage.includes("gradient") ? backgroundImage : null
59270
59320
  );
59271
- useEffect80(() => {
59321
+ useEffect81(() => {
59272
59322
  lastGradientRef.current = null;
59273
59323
  }, [element.id, element.selector]);
59274
- useEffect80(() => {
59324
+ useEffect81(() => {
59275
59325
  setPreferredFillMode(fillMode);
59276
59326
  if (backgroundImage.includes("gradient")) {
59277
59327
  lastGradientRef.current = backgroundImage;
@@ -59728,17 +59778,17 @@ function TextAreaField({
59728
59778
  const focusedRef = useRef95(false);
59729
59779
  const valueRef = useRef95(value);
59730
59780
  valueRef.current = value;
59731
- useEffect81(() => {
59781
+ useEffect82(() => {
59732
59782
  if (focusedRef.current) return;
59733
59783
  setDraft(value);
59734
59784
  }, [value]);
59735
- useEffect81(
59785
+ useEffect82(
59736
59786
  () => () => {
59737
59787
  if (commitTimerRef.current) clearTimeout(commitTimerRef.current);
59738
59788
  },
59739
59789
  []
59740
59790
  );
59741
- useEffect81(() => {
59791
+ useEffect82(() => {
59742
59792
  if (!autoFocus) return;
59743
59793
  textareaRef.current?.focus();
59744
59794
  }, [autoFocus]);
@@ -60035,7 +60085,7 @@ function TextSection({
60035
60085
  const [activeTextFieldKey, setActiveTextFieldKey] = useState78(
60036
60086
  element.textFields[0]?.key ?? null
60037
60087
  );
60038
- useEffect81(() => {
60088
+ useEffect82(() => {
60039
60089
  const nextFields = element.textFields;
60040
60090
  setActiveTextFieldKey((current) => {
60041
60091
  if (current && nextFields.some((field) => field.key === current)) return current;
@@ -60137,7 +60187,7 @@ import { useCallback as useCallback87, useState as useState80 } from "react";
60137
60187
  import { useShallow } from "zustand/react/shallow";
60138
60188
 
60139
60189
  // src/components/editor/AnimationCard.tsx
60140
- import { memo as memo39, useCallback as useCallback86, useEffect as useEffect82, useMemo as useMemo57, useRef as useRef96, useState as useState79 } from "react";
60190
+ import { memo as memo39, useCallback as useCallback86, useEffect as useEffect83, useMemo as useMemo57, useRef as useRef96, useState as useState79 } from "react";
60141
60191
  import { SUPPORTED_EASES, SUPPORTED_PROPS } from "@hyperframes/core/gsap-constants";
60142
60192
 
60143
60193
  // src/components/editor/gsapAnimationHelpers.ts
@@ -60684,7 +60734,7 @@ var AnimationCard = memo39(function AnimationCard2({
60684
60734
  const [focusedCollidingAnimationTargets, setFocusedCollidingAnimationTargets] = useState79();
60685
60735
  const cardRef = useRef96(null);
60686
60736
  const pendingAutoScrollRef = useRef96(false);
60687
- useEffect82(() => {
60737
+ useEffect83(() => {
60688
60738
  if (!focusedSegment) return;
60689
60739
  setExpanded(true);
60690
60740
  pendingAutoScrollRef.current = true;
@@ -60692,7 +60742,7 @@ var AnimationCard = memo39(function AnimationCard2({
60692
60742
  setFocusedCollidingAnimationTargets(focusedSegment.collidingAnimationTargets);
60693
60743
  onFocusSegmentConsumed?.();
60694
60744
  }, [focusedSegment, onFocusSegmentConsumed]);
60695
- useEffect82(() => {
60745
+ useEffect83(() => {
60696
60746
  if (!pendingAutoScrollRef.current || expandedKfPct === null) return;
60697
60747
  const segment = cardRef.current?.querySelector(
60698
60748
  `[data-ease-segment-pct="${expandedKfPct}"]`
@@ -61272,7 +61322,7 @@ var GsapAnimationSection = memo40(function GsapAnimationSection2({
61272
61322
  import { useState as useState82 } from "react";
61273
61323
 
61274
61324
  // src/components/editor/Transform3DCube.tsx
61275
- import { useEffect as useEffect83, useRef as useRef97, useState as useState81 } from "react";
61325
+ import { useEffect as useEffect84, useRef as useRef97, useState as useState81 } from "react";
61276
61326
 
61277
61327
  // src/components/editor/transform3dProjection.ts
61278
61328
  var DEG = Math.PI / 180;
@@ -61395,7 +61445,7 @@ function Transform3DCube({
61395
61445
  const lens = perspective > 0 ? perspective : defaultPerspective;
61396
61446
  const depthRef = useRef97({ z, onDepthDraft, onDepthCommit, lens });
61397
61447
  depthRef.current = { z, onDepthDraft, onDepthCommit, lens };
61398
- useEffect83(() => {
61448
+ useEffect84(() => {
61399
61449
  const el = svgRef.current;
61400
61450
  if (!el) return;
61401
61451
  let pending2 = null;
@@ -61916,7 +61966,7 @@ function PropertyPanel3dTransform({
61916
61966
  }
61917
61967
 
61918
61968
  // src/components/editor/PropertyPanelFlat.tsx
61919
- import { useEffect as useEffect103, useMemo as useMemo64, useRef as useRef113, useState as useState104 } from "react";
61969
+ import { useEffect as useEffect104, useMemo as useMemo64, useRef as useRef113, useState as useState104 } from "react";
61920
61970
  import { useShallow as useShallow2 } from "zustand/react/shallow";
61921
61971
 
61922
61972
  // src/components/editor/audioFxSummary.ts
@@ -62149,10 +62199,10 @@ function PropertyPanelFlatFooter({
62149
62199
  }
62150
62200
 
62151
62201
  // src/components/editor/propertyPanelFlatPrimitives.tsx
62152
- import { useEffect as useEffect85, useRef as useRef99, useState as useState84 } from "react";
62202
+ import { useEffect as useEffect86, useRef as useRef99, useState as useState84 } from "react";
62153
62203
 
62154
62204
  // src/components/editor/propertyPanelFlatSliderReadout.tsx
62155
- import { useEffect as useEffect84, useRef as useRef98, useState as useState83 } from "react";
62205
+ import { useEffect as useEffect85, useRef as useRef98, useState as useState83 } from "react";
62156
62206
  import { jsx as jsx154 } from "react/jsx-runtime";
62157
62207
  function FlatSliderReadout({
62158
62208
  label,
@@ -62167,7 +62217,7 @@ function FlatSliderReadout({
62167
62217
  const [invalid, setInvalid] = useState83(false);
62168
62218
  const inputRef = useRef98(null);
62169
62219
  const editable = Boolean(onCommitText) && !disabled;
62170
- useEffect84(() => {
62220
+ useEffect85(() => {
62171
62221
  if (!editing) return;
62172
62222
  inputRef.current?.focus();
62173
62223
  inputRef.current?.select();
@@ -62523,12 +62573,12 @@ function FlatSlider({
62523
62573
  const explicitReleaseRef = useRef99(false);
62524
62574
  const dragStartValueRef = useRef99(value);
62525
62575
  const activePointerIdRef = useRef99(null);
62526
- useEffect85(() => {
62576
+ useEffect86(() => {
62527
62577
  if (draggingRef.current) return;
62528
62578
  setDraft(value);
62529
62579
  lastCommittedRef.current = value;
62530
62580
  }, [value]);
62531
- useEffect85(
62581
+ useEffect86(
62532
62582
  () => () => {
62533
62583
  if (commitTimerRef.current) {
62534
62584
  clearTimeout(commitTimerRef.current);
@@ -62733,7 +62783,7 @@ function isSelectionHidden(fromTimeline, element) {
62733
62783
  }
62734
62784
 
62735
62785
  // src/components/editor/propertyPanelFlatTextSection.tsx
62736
- import { useEffect as useEffect86, useState as useState85 } from "react";
62786
+ import { useEffect as useEffect87, useState as useState85 } from "react";
62737
62787
  import { Fragment as Fragment42, jsx as jsx158, jsxs as jsxs117 } from "react/jsx-runtime";
62738
62788
  var ALIGN_OPTIONS = [
62739
62789
  { key: "left", label: "left", node: "L" },
@@ -62946,7 +62996,7 @@ function FlatTextSection({
62946
62996
  element.textFields[0]?.key ?? null
62947
62997
  );
62948
62998
  const [autoFocusFieldKey, setAutoFocusFieldKey] = useState85(null);
62949
- useEffect86(() => {
62999
+ useEffect87(() => {
62950
63000
  const nextFields = element.textFields;
62951
63001
  setActiveFieldKey((current) => {
62952
63002
  if (current && nextFields.some((field) => field.key === current)) return current;
@@ -63098,7 +63148,7 @@ function FlatTextLayerList({
63098
63148
  }
63099
63149
 
63100
63150
  // src/components/editor/propertyPanelFlatStyleSections.tsx
63101
- import { useEffect as useEffect87, useState as useState86 } from "react";
63151
+ import { useEffect as useEffect88, useState as useState86 } from "react";
63102
63152
 
63103
63153
  // src/components/editor/propertyPanelFlatStyleHelpers.ts
63104
63154
  var STROKE_STYLE_OPTIONS = [
@@ -63224,7 +63274,7 @@ function FlatFillFields({
63224
63274
  }
63225
63275
  const [preferredFillMode, setPreferredFillMode] = useState86(fillMode);
63226
63276
  const imageUrl = extractBackgroundImageUrl(backgroundImage);
63227
- useEffect87(() => {
63277
+ useEffect88(() => {
63228
63278
  setPreferredFillMode(fillMode);
63229
63279
  }, [fillMode, element.id, element.selector, backgroundImage]);
63230
63280
  const handleFillModeChange = (nextMode) => {
@@ -64138,7 +64188,7 @@ import {
64138
64188
  } from "@hyperframes/core/audio-automation";
64139
64189
 
64140
64190
  // src/components/editor/propertyPanelFxSection.tsx
64141
- import { useCallback as useCallback90, useEffect as useEffect90, useMemo as useMemo59, useRef as useRef101, useState as useState90 } from "react";
64191
+ import { useCallback as useCallback90, useEffect as useEffect91, useMemo as useMemo59, useRef as useRef101, useState as useState90 } from "react";
64142
64192
 
64143
64193
  // src/components/editor/audioFxRevealTarget.ts
64144
64194
  import { parseAutomationTarget as parseAutomationTarget2 } from "@hyperframes/core/audio-automation";
@@ -64218,7 +64268,7 @@ import { DEFAULT_CARVE as DEFAULT_CARVE2 } from "@hyperframes/core/audio-carve";
64218
64268
  import { fxAutomationTarget as fxAutomationTarget3 } from "@hyperframes/core/audio-automation";
64219
64269
 
64220
64270
  // src/components/editor/propertyPanelFxControls.tsx
64221
- import { useCallback as useCallback88, useEffect as useEffect88, useRef as useRef100, useState as useState87 } from "react";
64271
+ import { useCallback as useCallback88, useEffect as useEffect89, useRef as useRef100, useState as useState87 } from "react";
64222
64272
  import { jsx as jsx164, jsxs as jsxs123 } from "react/jsx-runtime";
64223
64273
  function toSlider(p, value) {
64224
64274
  if (p.scale !== "log" || p.min <= 0) return value;
@@ -64271,10 +64321,10 @@ function FxParamRow({
64271
64321
  const [pending2, setPending] = useState87(null);
64272
64322
  const [typing, setTyping] = useState87(null);
64273
64323
  const edited = useRef100(false);
64274
- useEffect88(() => {
64324
+ useEffect89(() => {
64275
64325
  if (!dragging) setLocal(value);
64276
64326
  }, [value, dragging]);
64277
- useEffect88(() => {
64327
+ useEffect89(() => {
64278
64328
  setPending(null);
64279
64329
  }, [value]);
64280
64330
  const handleNumber = useCallback88(
@@ -64938,7 +64988,7 @@ function CarveAnalysis({
64938
64988
  }
64939
64989
 
64940
64990
  // src/components/editor/propertyPanelFxEqModule.tsx
64941
- import { useCallback as useCallback89, useEffect as useEffect89, useState as useState88 } from "react";
64991
+ import { useCallback as useCallback89, useEffect as useEffect90, useState as useState88 } from "react";
64942
64992
  import {
64943
64993
  audioEqSummary,
64944
64994
  HF_AUDIO_EQ_RANGE_DB
@@ -64960,7 +65010,7 @@ function Fader2({
64960
65010
  }) {
64961
65011
  const [local, setLocal] = useState88(band.gain);
64962
65012
  const [dragging, setDragging] = useState88(false);
64963
- useEffect89(() => {
65013
+ useEffect90(() => {
64964
65014
  if (!dragging) setLocal(band.gain);
64965
65015
  }, [band.gain, dragging]);
64966
65016
  const value = dragging ? local : band.gain;
@@ -66254,7 +66304,7 @@ function FxSection({
66254
66304
  }
66255
66305
  setPendingReveal(where && revealTarget ? { nonce: revealNonce, target: revealTarget } : null);
66256
66306
  }
66257
- useEffect90(() => {
66307
+ useEffect91(() => {
66258
66308
  const target = pendingReveal?.target;
66259
66309
  if (target && scrollRevealedRowIntoView(rootRef.current, target, chain)) {
66260
66310
  setPendingReveal(null);
@@ -66451,7 +66501,7 @@ function FxSection({
66451
66501
  }
66452
66502
 
66453
66503
  // src/components/editor/useFxChainObserved.ts
66454
- import { useEffect as useEffect91, useRef as useRef102 } from "react";
66504
+ import { useEffect as useEffect92, useRef as useRef102 } from "react";
66455
66505
  import { classifyAudioName as classifyAudioName3 } from "@hyperframes/core/audio-carve";
66456
66506
  function useFxChainObserved(element, chain, carve, automation, onSetAttributeQuietRaw) {
66457
66507
  const lastShape = useRef102(null);
@@ -66460,7 +66510,7 @@ function useFxChainObserved(element, chain, carve, automation, onSetAttributeQui
66460
66510
  panelEdits.current += 1;
66461
66511
  return onSetAttributeQuietRaw(attr, value);
66462
66512
  };
66463
- useEffect91(() => {
66513
+ useEffect92(() => {
66464
66514
  const shape = JSON.stringify([
66465
66515
  chain.nodes.map((n) => `${n.type}:${n.fromPreset ?? ""}:${n.fromCarve ? 1 : 0}`),
66466
66516
  carve?.enabled ?? false,
@@ -66488,7 +66538,7 @@ function useFxChainObserved(element, chain, carve, automation, onSetAttributeQui
66488
66538
  }
66489
66539
 
66490
66540
  // src/components/editor/useFxCarve.ts
66491
- import { useEffect as useEffect92, useRef as useRef103 } from "react";
66541
+ import { useEffect as useEffect93, useRef as useRef103 } from "react";
66492
66542
  import {
66493
66543
  HF_AUDIO_FX_ATTR as HF_AUDIO_FX_ATTR9,
66494
66544
  serializeAudioFxChain as serializeAudioFxChain6
@@ -66599,13 +66649,13 @@ function useFxCarve(element, chain, carve, automation, onSetAttributeQuiet, writ
66599
66649
  setAnalysing(false);
66600
66650
  }
66601
66651
  };
66602
- useEffect92(() => {
66652
+ useEffect93(() => {
66603
66653
  if (carvedAgainstBy || !carve?.enabled) return;
66604
66654
  if (survivingSources.length === carve.sources.length) return;
66605
66655
  void setCarve({ ...carve, sources: survivingSources });
66606
66656
  }, [carve, carvedAgainstBy, survivingSources.join(" ")]);
66607
66657
  const candidateIds = autoSourceIds.join("\0");
66608
- useEffect92(() => {
66658
+ useEffect93(() => {
66609
66659
  if (carvedAgainstBy || !autoBed || autoSourceIds.length <= 1) return;
66610
66660
  if (autoCarveInFlight.current) return;
66611
66661
  const all = autoSourceIds;
@@ -66615,7 +66665,7 @@ function useFxCarve(element, chain, carve, automation, onSetAttributeQuiet, writ
66615
66665
  }
66616
66666
  if (carve.enabled && carve.sources.length === 0) setCarveAuto({ ...carve, sources: all });
66617
66667
  }, [carve, carvedAgainstBy, autoBed, candidateIds]);
66618
- useEffect92(() => {
66668
+ useEffect93(() => {
66619
66669
  if (carvedAgainstBy || !autoBed || autoSourceIds.length !== 1) return;
66620
66670
  if (autoCarveInFlight.current) return;
66621
66671
  const only = autoSourceIds[0];
@@ -67001,14 +67051,14 @@ function useVolumeAutomation(element, currentTime, onSetAttributeQuiet, linkedSp
67001
67051
  }
67002
67052
 
67003
67053
  // src/components/editor/useAudioFxRevealSection.ts
67004
- import { useEffect as useEffect93, useState as useState93 } from "react";
67054
+ import { useEffect as useEffect94, useState as useState93 } from "react";
67005
67055
  function useAudioFxRevealSection(input) {
67006
67056
  const revealedAudioFxTarget = usePlayerStore((s) => s.revealedAudioFxTarget);
67007
67057
  const timelineProjectId = usePlayerStore((s) => s.timelineProjectId);
67008
67058
  const timelineSessionEpoch = usePlayerStore((s) => s.timelineSessionEpoch);
67009
67059
  const clearRevealedAudioFxTarget = usePlayerStore((s) => s.clearRevealedAudioFxTarget);
67010
67060
  const [consumed, setConsumed] = useState93(null);
67011
- useEffect93(() => {
67061
+ useEffect94(() => {
67012
67062
  if (consumed === null) return;
67013
67063
  return () => clearRevealedAudioFxTarget(consumed);
67014
67064
  }, [consumed, clearRevealedAudioFxTarget]);
@@ -67023,7 +67073,7 @@ function useAudioFxRevealSection(input) {
67023
67073
  }
67024
67074
 
67025
67075
  // src/components/editor/propertyPanelFlatMediaSection.tsx
67026
- import { useEffect as useEffect94, useState as useState94 } from "react";
67076
+ import { useEffect as useEffect95, useState as useState94 } from "react";
67027
67077
 
67028
67078
  // src/components/editor/propertyPanelFlatToggle.tsx
67029
67079
  import { jsx as jsx176, jsxs as jsxs133 } from "react/jsx-runtime";
@@ -67189,7 +67239,7 @@ function FlatMediaSection({
67189
67239
  const projectSrc = srcAttr && !/^(?:https?:|data:|blob:)/i.test(srcAttr) ? authoredSrcPath(srcAttr.startsWith("./") ? srcAttr.slice(2) : srcAttr) : "";
67190
67240
  const absoluteSrc = projectDir && projectSrc ? `${projectDir}/${projectSrc}` : srcAttr;
67191
67241
  const canRemoveBackground = Boolean(onRemoveBackground && isVisualMedia && projectSrc);
67192
- useEffect94(() => {
67242
+ useEffect95(() => {
67193
67243
  setRemoveProgress(null);
67194
67244
  setCreatePlate(false);
67195
67245
  }, [srcAttr]);
@@ -67536,7 +67586,7 @@ function createGsapLivePreview(iframeRef) {
67536
67586
  }
67537
67587
 
67538
67588
  // src/components/editor/propertyPanelFlatColorGradingSection.tsx
67539
- import { useEffect as useEffect100, useMemo as useMemo62, useRef as useRef112, useState as useState100 } from "react";
67589
+ import { useEffect as useEffect101, useMemo as useMemo62, useRef as useRef112, useState as useState100 } from "react";
67540
67590
  import {
67541
67591
  HF_COLOR_GRADING_GRADE_PRESETS,
67542
67592
  normalizeHfColorGrading as normalizeHfColorGrading6,
@@ -67994,7 +68044,7 @@ function formatPointValue(value, tab, axis) {
67994
68044
  }
67995
68045
 
67996
68046
  // src/components/editor/propertyPanelGradingNumberField.tsx
67997
- import { useEffect as useEffect95, useRef as useRef106, useState as useState95 } from "react";
68047
+ import { useEffect as useEffect96, useRef as useRef106, useState as useState95 } from "react";
67998
68048
  import { jsx as jsx179, jsxs as jsxs136 } from "react/jsx-runtime";
67999
68049
  function GradingNumberField({
68000
68050
  label,
@@ -68017,7 +68067,7 @@ function GradingNumberField({
68017
68067
  const cancelBlurRef = useRef106(false);
68018
68068
  const baselineRef = useRef106(value);
68019
68069
  const dirtyRef = useRef106(false);
68020
- useEffect95(() => {
68070
+ useEffect96(() => {
68021
68071
  if (!focusedRef.current) setDraft(formatValue2(value));
68022
68072
  }, [formatValue2, value]);
68023
68073
  const settle = () => {
@@ -68246,10 +68296,10 @@ function ColorCurves({
68246
68296
  }
68247
68297
 
68248
68298
  // src/components/editor/propertyPanelColorScopes.tsx
68249
- import { useEffect as useEffect97, useRef as useRef108, useState as useState98 } from "react";
68299
+ import { useEffect as useEffect98, useRef as useRef108, useState as useState98 } from "react";
68250
68300
 
68251
68301
  // src/components/editor/useColorGradingScopes.ts
68252
- import { useEffect as useEffect96, useRef as useRef107, useState as useState97 } from "react";
68302
+ import { useEffect as useEffect97, useRef as useRef107, useState as useState97 } from "react";
68253
68303
 
68254
68304
  // src/components/editor/colorGradingFrameAnalysis.ts
68255
68305
  import {
@@ -68411,7 +68461,7 @@ function useColorGradingScopes({
68411
68461
  const [refreshVersion, setRefreshVersion] = useState97(0);
68412
68462
  const captureRef = useRef107(captureFrame);
68413
68463
  captureRef.current = captureFrame;
68414
- useEffect96(() => {
68464
+ useEffect97(() => {
68415
68465
  if (!open) {
68416
68466
  setAnalysis(null);
68417
68467
  setStatus("idle");
@@ -68593,7 +68643,7 @@ function PropertyPanelColorScopes({
68593
68643
  captureFrame,
68594
68644
  refreshKey
68595
68645
  });
68596
- useEffect97(() => {
68646
+ useEffect98(() => {
68597
68647
  const canvas = canvasRef.current;
68598
68648
  if (!canvas) return;
68599
68649
  if (analysis) {
@@ -68657,7 +68707,7 @@ function PropertyPanelColorScopes({
68657
68707
  }
68658
68708
 
68659
68709
  // src/components/editor/propertyPanelColorSecondary.tsx
68660
- import { useEffect as useEffect98, useRef as useRef109, useState as useState99 } from "react";
68710
+ import { useEffect as useEffect99, useRef as useRef109, useState as useState99 } from "react";
68661
68711
  import {
68662
68712
  getHfColorGradingCapabilities,
68663
68713
  normalizeHfColorGrading as normalizeHfColorGrading5
@@ -68710,7 +68760,7 @@ function PropertyPanelColorSecondary({
68710
68760
  const matteCanvasRef = useRef109(null);
68711
68761
  const activeIndex = Math.min(selectedIndex, Math.max(0, secondaries.length - 1));
68712
68762
  const selected = secondaries[activeIndex];
68713
- useEffect98(() => {
68763
+ useEffect99(() => {
68714
68764
  const canvas = matteCanvasRef.current;
68715
68765
  if (!showMatte || !canvas || !sampleFrame || !samplePixels || !selected) return;
68716
68766
  const context = canvas.getContext("2d");
@@ -69376,7 +69426,7 @@ function ColorWheels({
69376
69426
  }
69377
69427
 
69378
69428
  // src/components/editor/propertyPanelFlatColorGradingAccessory.tsx
69379
- import { useEffect as useEffect99, useRef as useRef111 } from "react";
69429
+ import { useEffect as useEffect100, useRef as useRef111 } from "react";
69380
69430
  import { isHfColorGradingActive as isHfColorGradingActive3 } from "@hyperframes/core/color-grading";
69381
69431
  import { jsx as jsx184, jsxs as jsxs141 } from "react/jsx-runtime";
69382
69432
  var STATUS_DOT_CLASS = {
@@ -69393,7 +69443,7 @@ function FlatColorGradingAccessory({
69393
69443
  const { grading, compareEnabled, runtimeStatus, commitCompare, resetGrading } = state;
69394
69444
  const gradingActive = isHfColorGradingActive3(grading);
69395
69445
  const releaseRef = useRef111(null);
69396
- useEffect99(
69446
+ useEffect100(
69397
69447
  () => () => {
69398
69448
  releaseRef.current?.();
69399
69449
  releaseRef.current = null;
@@ -69576,7 +69626,7 @@ function FlatColorGradingSection({
69576
69626
  );
69577
69627
  const actions = createColorGradingActions(grading, onCommitColorGrading);
69578
69628
  const scopesRefreshKey = useMemo62(() => serializeHfColorGrading2(grading), [grading]);
69579
- useEffect100(() => {
69629
+ useEffect101(() => {
69580
69630
  if (presetPreviews.status === "idle") onRequestPresetPreviews();
69581
69631
  }, [onRequestPresetPreviews, presetPreviews.status]);
69582
69632
  const resolvePreset = (presetId) => {
@@ -69587,7 +69637,7 @@ function FlatColorGradingSection({
69587
69637
  palette: grading.palette
69588
69638
  } : grading;
69589
69639
  };
69590
- useEffect100(() => () => onPreviewColorGrading(null), [onPreviewColorGrading]);
69640
+ useEffect101(() => () => onPreviewColorGrading(null), [onPreviewColorGrading]);
69591
69641
  const renderDetailSlider = (key2) => {
69592
69642
  const spec = detailByKey(key2);
69593
69643
  const value = grading.details[key2];
@@ -69935,7 +69985,7 @@ function FlatColorGradingSection({
69935
69985
  }
69936
69986
 
69937
69987
  // src/components/editor/propertyPanelFlatEffectsSection.tsx
69938
- import { useEffect as useEffect101, useState as useState101 } from "react";
69988
+ import { useEffect as useEffect102, useState as useState101 } from "react";
69939
69989
  import {
69940
69990
  HF_COLOR_GRADING_EFFECT_APPLY_DEFAULTS as HF_COLOR_GRADING_EFFECT_APPLY_DEFAULTS3,
69941
69991
  HF_COLOR_GRADING_EFFECT_PRESETS,
@@ -70317,7 +70367,7 @@ function FlatEffectsSection({
70317
70367
  activeEffects[0]?.key ?? null
70318
70368
  );
70319
70369
  const selectedEffect = activeEffects.find((effect) => effect.key === selectedKey) ?? activeEffects[0] ?? null;
70320
- useEffect101(() => {
70370
+ useEffect102(() => {
70321
70371
  if (!catalogOpen) return;
70322
70372
  const group = EFFECT_GROUPS.find((candidate) => candidate.label === catalogGroup);
70323
70373
  if (!group) return;
@@ -70338,7 +70388,7 @@ function FlatEffectsSection({
70338
70388
  previews.images,
70339
70389
  previews.status
70340
70390
  ]);
70341
- useEffect101(() => () => onPreviewColorGrading(null), [onPreviewColorGrading]);
70391
+ useEffect102(() => () => onPreviewColorGrading(null), [onPreviewColorGrading]);
70342
70392
  const commitEffects = (effects) => {
70343
70393
  onCommitColorGrading({
70344
70394
  ...grading,
@@ -70705,7 +70755,7 @@ function FlatEffectsSection({
70705
70755
  import { useState as useState103 } from "react";
70706
70756
 
70707
70757
  // src/hooks/useBlockCatalog.ts
70708
- import { useState as useState102, useEffect as useEffect102, useMemo as useMemo63 } from "react";
70758
+ import { useState as useState102, useEffect as useEffect103, useMemo as useMemo63 } from "react";
70709
70759
 
70710
70760
  // src/utils/blockCategories.ts
70711
70761
  import {
@@ -70785,7 +70835,7 @@ function useBlockCatalog() {
70785
70835
  const [error, setError] = useState102(null);
70786
70836
  const [search, setSearch] = useState102("");
70787
70837
  const [category, setCategory] = useState102(null);
70788
- useEffect102(() => {
70838
+ useEffect103(() => {
70789
70839
  if (catalogCache) return;
70790
70840
  let cancelled = false;
70791
70841
  (async () => {
@@ -71066,7 +71116,7 @@ function PropertyPanelFlat({
71066
71116
  const [justToggledIds, setJustToggledIds] = useState104([]);
71067
71117
  const justToggledTimeoutRef = useRef113(null);
71068
71118
  const panelBodyRef = useRef113(null);
71069
- useEffect103(() => {
71119
+ useEffect104(() => {
71070
71120
  return () => {
71071
71121
  if (justToggledTimeoutRef.current) clearTimeout(justToggledTimeoutRef.current);
71072
71122
  };
@@ -72081,7 +72131,7 @@ import { memo as memo43, useState as useState107, useCallback as useCallback92,
72081
72131
  import { Plus as Plus2, FolderSimplePlus as FolderSimplePlus2 } from "@phosphor-icons/react";
72082
72132
 
72083
72133
  // src/components/editor/FileTreeNodes.tsx
72084
- import { memo as memo42, useState as useState106, useCallback as useCallback91, useMemo as useMemo66, useRef as useRef115, useEffect as useEffect104 } from "react";
72134
+ import { memo as memo42, useState as useState106, useCallback as useCallback91, useMemo as useMemo66, useRef as useRef115, useEffect as useEffect105 } from "react";
72085
72135
  import {
72086
72136
  PencilSimple,
72087
72137
  Copy,
@@ -72218,7 +72268,7 @@ function ContextMenu2({
72218
72268
  }) {
72219
72269
  const menuRef = useRef115(null);
72220
72270
  const restoreFocusRef = useRef115(null);
72221
- useEffect104(() => {
72271
+ useEffect105(() => {
72222
72272
  restoreFocusRef.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
72223
72273
  const firstItem = menuRef.current?.querySelector("button");
72224
72274
  if (firstItem instanceof HTMLElement) firstItem.focus();
@@ -72384,7 +72434,7 @@ function InlineInput({
72384
72434
  if (name.includes("..")) return "Name can't contain ..";
72385
72435
  return null;
72386
72436
  };
72387
- useEffect104(() => {
72437
+ useEffect105(() => {
72388
72438
  const el = inputRef.current;
72389
72439
  if (!el) return;
72390
72440
  el.focus();
@@ -72461,7 +72511,7 @@ function DeleteConfirm({
72461
72511
  onCancel
72462
72512
  }) {
72463
72513
  const ref = useRef115(null);
72464
- useEffect104(() => {
72514
+ useEffect105(() => {
72465
72515
  const handleEscape = (e) => {
72466
72516
  if (e.key === "Escape") onCancel();
72467
72517
  };
@@ -73058,11 +73108,11 @@ function useToolbarSession(session) {
73058
73108
  }
73059
73109
 
73060
73110
  // src/hooks/useRightPanelIntents.ts
73061
- import { useCallback as useCallback93, useEffect as useEffect105, useRef as useRef118 } from "react";
73111
+ import { useCallback as useCallback93, useEffect as useEffect106, useRef as useRef118 } from "react";
73062
73112
  function useSlideshowDockPanel(isSlideshowComposition) {
73063
73113
  const controller = useDockLayoutStore((state) => state.controller);
73064
73114
  const wasSlideshow = useRef118(false);
73065
- useEffect105(() => {
73115
+ useEffect106(() => {
73066
73116
  if (!controller) return;
73067
73117
  const inDock = useDockLayoutStore.getState().openPanels.has("slideshow");
73068
73118
  if (isSlideshowComposition && !inDock) controller.open("slideshow");
@@ -73075,7 +73125,7 @@ function useBlockParamsDismissal({
73075
73125
  onDismiss
73076
73126
  }) {
73077
73127
  const designVisible = useDockLayoutStore((state) => state.visiblePanels.has("design"));
73078
- useEffect105(() => {
73128
+ useEffect106(() => {
73079
73129
  if (hasBlockParams && !designVisible) onDismiss();
73080
73130
  }, [hasBlockParams, designVisible, onDismiss]);
73081
73131
  }
@@ -73093,7 +73143,7 @@ function useCaptionDesignFocus(captionEditMode) {
73093
73143
  const rightShown = useDockLayoutStore(
73094
73144
  (state) => visiblePanelInZone("right", state.lastActive, state.visiblePanels) !== null
73095
73145
  );
73096
- useEffect105(() => {
73146
+ useEffect106(() => {
73097
73147
  if (captionEditMode && rightShown && !designVisible) {
73098
73148
  useDockLayoutStore.getState().activatePanel("design");
73099
73149
  }
@@ -73106,7 +73156,7 @@ function useRightPanelIntent() {
73106
73156
  }
73107
73157
 
73108
73158
  // src/components/renders/useRenderQueue.ts
73109
- import { useState as useState109, useEffect as useEffect107, useCallback as useCallback95, useRef as useRef120, useMemo as useMemo69 } from "react";
73159
+ import { useState as useState109, useEffect as useEffect108, useCallback as useCallback95, useRef as useRef120, useMemo as useMemo69 } from "react";
73110
73160
 
73111
73161
  // src/components/renders/serverError.ts
73112
73162
  async function readServerError(res) {
@@ -73124,7 +73174,7 @@ async function readServerError(res) {
73124
73174
  }
73125
73175
 
73126
73176
  // src/components/renders/useFfmpegStatus.ts
73127
- import { useCallback as useCallback94, useEffect as useEffect106, useRef as useRef119, useState as useState108 } from "react";
73177
+ import { useCallback as useCallback94, useEffect as useEffect107, useRef as useRef119, useState as useState108 } from "react";
73128
73178
  function ffmpegInstallMessage(status) {
73129
73179
  const title = status?.title ?? "FFmpeg not found";
73130
73180
  const remedy = status?.command ?? status?.hint;
@@ -73156,7 +73206,7 @@ function useFfmpegStatus() {
73156
73206
  const [status, setStatus] = useState108(cached4);
73157
73207
  const [checking, setChecking] = useState108(cached4 === null);
73158
73208
  const mounted = useRef119(true);
73159
- useEffect106(() => {
73209
+ useEffect107(() => {
73160
73210
  mounted.current = true;
73161
73211
  return () => {
73162
73212
  mounted.current = false;
@@ -73170,7 +73220,7 @@ function useFfmpegStatus() {
73170
73220
  setStatus(next);
73171
73221
  setChecking(false);
73172
73222
  }, []);
73173
- useEffect106(() => {
73223
+ useEffect107(() => {
73174
73224
  if (cached4 !== null) return;
73175
73225
  void run();
73176
73226
  }, [run]);
@@ -73398,7 +73448,7 @@ function useRenderQueue(projectId, activeCompPathRef) {
73398
73448
  setLoadError("Couldn't load render history. Is the studio server running?");
73399
73449
  }
73400
73450
  }, [projectId]);
73401
- useEffect107(() => {
73451
+ useEffect108(() => {
73402
73452
  loadRenders();
73403
73453
  }, [loadRenders]);
73404
73454
  const startRender = useCallback95(
@@ -73598,7 +73648,7 @@ function useRenderQueue(projectId, activeCompPathRef) {
73598
73648
  });
73599
73649
  }, [projectId]);
73600
73650
  const dismissActionError = useCallback95(() => setActionError(null), []);
73601
- useEffect107(() => {
73651
+ useEffect108(() => {
73602
73652
  for (const job of jobs) {
73603
73653
  if (job.status === "rendering" || job.status === "cancelled") continue;
73604
73654
  const settings = sessionJobs.current.get(job.id);
@@ -73623,7 +73673,7 @@ function useRenderQueue(projectId, activeCompPathRef) {
73623
73673
  });
73624
73674
  }
73625
73675
  }, [jobs]);
73626
- useEffect107(() => {
73676
+ useEffect108(() => {
73627
73677
  return () => {
73628
73678
  eventSourceRef.current?.close();
73629
73679
  eventSourceRef.current = null;
@@ -73676,7 +73726,7 @@ import { useRef as useRef122, useState as useState110 } from "react";
73676
73726
  import { XIcon, WarningIcon, CheckCircleIcon, CaretRightIcon } from "@phosphor-icons/react";
73677
73727
 
73678
73728
  // src/components/ui/useDialogBehavior.ts
73679
- import { useEffect as useEffect108, useCallback as useCallback96, useRef as useRef121 } from "react";
73729
+ import { useEffect as useEffect109, useCallback as useCallback96, useRef as useRef121 } from "react";
73680
73730
  var FOCUSABLE = 'button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), summary, [contenteditable="true"], [tabindex]:not([tabindex="-1"])';
73681
73731
  function useDialogBehavior({
73682
73732
  open,
@@ -73694,7 +73744,7 @@ function useDialogBehavior({
73694
73744
  if (guard && !guard()) return;
73695
73745
  onCloseRef.current();
73696
73746
  }, []);
73697
- useEffect108(() => {
73747
+ useEffect109(() => {
73698
73748
  if (!open) return;
73699
73749
  const previouslyFocused = document.activeElement;
73700
73750
  restoreRef.current = previouslyFocused instanceof HTMLElement ? previouslyFocused : null;
@@ -74034,7 +74084,7 @@ function toastSurface(isError) {
74034
74084
  }
74035
74085
 
74036
74086
  // src/components/feedback/StudioFeedbackCard.tsx
74037
- import { memo as memo44, useState as useState112, useCallback as useCallback97, useRef as useRef124, useEffect as useEffect109 } from "react";
74087
+ import { memo as memo44, useState as useState112, useCallback as useCallback97, useRef as useRef124, useEffect as useEffect110 } from "react";
74038
74088
 
74039
74089
  // src/components/feedback/projectProvenance.ts
74040
74090
  var CONFIG_FILE = "hyperframes.json";
@@ -74154,7 +74204,7 @@ var StudioFeedbackCard = memo44(function StudioFeedbackCard2() {
74154
74204
  },
74155
74205
  [clearTimer]
74156
74206
  );
74157
- useEffect109(
74207
+ useEffect110(
74158
74208
  () => subscribeToFeedbackRequests((next) => {
74159
74209
  setRequest(next);
74160
74210
  setRating(null);
@@ -74166,12 +74216,12 @@ var StudioFeedbackCard = memo44(function StudioFeedbackCard2() {
74166
74216
  }),
74167
74217
  []
74168
74218
  );
74169
- useEffect109(() => {
74219
+ useEffect110(() => {
74170
74220
  if (!request2 || step === "thanks" || rating !== null || comment !== "") return;
74171
74221
  timerRef.current = setTimeout(() => close("timeout"), AUTO_DISMISS_MS);
74172
74222
  return clearTimer;
74173
74223
  }, [request2, step, rating, comment, close, clearTimer]);
74174
- useEffect109(() => {
74224
+ useEffect110(() => {
74175
74225
  if (step === "comment") inputRef.current?.focus();
74176
74226
  }, [step]);
74177
74227
  const submit = useCallback97(
@@ -74671,11 +74721,11 @@ function ExternalFileConflictBanner({
74671
74721
  }
74672
74722
 
74673
74723
  // src/components/ProjectUnreachableBanner.tsx
74674
- import { useEffect as useEffect110, useState as useState114 } from "react";
74724
+ import { useEffect as useEffect111, useState as useState114 } from "react";
74675
74725
  import { Fragment as Fragment57, jsx as jsx203, jsxs as jsxs158 } from "react/jsx-runtime";
74676
74726
  function ProjectUnreachableBanner({ projectId }) {
74677
74727
  const [served, setServed] = useState114(null);
74678
- useEffect110(() => {
74728
+ useEffect111(() => {
74679
74729
  let cancelled = false;
74680
74730
  studioApiFetch("/api/projects").then((res) => res.ok ? res.json() : { projects: [] }).then((data) => {
74681
74731
  if (!cancelled) setServed(data.projects ?? []);
@@ -74903,7 +74953,7 @@ function useCaptionSync(projectId) {
74903
74953
  }
74904
74954
 
74905
74955
  // src/hooks/usePersistentEditHistory.ts
74906
- import { useCallback as useCallback99, useEffect as useEffect111, useMemo as useMemo70, useRef as useRef127, useState as useState115 } from "react";
74956
+ import { useCallback as useCallback99, useEffect as useEffect112, useMemo as useMemo70, useRef as useRef127, useState as useState115 } from "react";
74907
74957
  var EMPTY3 = { entries: [], back: null, forward: null };
74908
74958
  var OWN_ENTRIES_KEPT = 100;
74909
74959
  function createOwnHistory() {
@@ -75051,14 +75101,14 @@ function usePersistentEditHistory({ projectId }) {
75051
75101
  setView(next);
75052
75102
  own.offered(seen, next);
75053
75103
  }, [projectId, own]);
75054
- useEffect111(() => {
75104
+ useEffect112(() => {
75055
75105
  setView(EMPTY3);
75056
75106
  setLoaded(false);
75057
75107
  heldClaimRef.current = null;
75058
75108
  own.clear();
75059
75109
  void refresh2().finally(() => setLoaded(true));
75060
75110
  }, [refresh2, own]);
75061
- useEffect111(() => {
75111
+ useEffect112(() => {
75062
75112
  setStudioPendingEditClaimClock(own.claimCount);
75063
75113
  return () => setStudioPendingEditClaimClock(null);
75064
75114
  }, [own]);
@@ -75169,7 +75219,7 @@ function usePersistentEditHistory({ projectId }) {
75169
75219
  }
75170
75220
 
75171
75221
  // src/hooks/usePanelLayout.ts
75172
- import { useCallback as useCallback100, useEffect as useEffect112, useRef as useRef128 } from "react";
75222
+ import { useCallback as useCallback100, useEffect as useEffect113, useRef as useRef128 } from "react";
75173
75223
  function panelForTab(tab) {
75174
75224
  return tab === "block-params" ? "design" : tab;
75175
75225
  }
@@ -75181,7 +75231,7 @@ function usePanelLayout(initialState2) {
75181
75231
  const lastActive = useDockLayoutStore((state) => state.lastActive);
75182
75232
  const visiblePanels = useDockLayoutStore((state) => state.visiblePanels);
75183
75233
  const initialRef = useRef128(initialState2);
75184
- useEffect112(() => {
75234
+ useEffect113(() => {
75185
75235
  if (!controller) return;
75186
75236
  const { rightCollapsed: rightCollapsed2, rightPanelTab: rightPanelTab2 } = initialRef.current ?? {};
75187
75237
  initialRef.current = void 0;
@@ -75228,7 +75278,7 @@ function usePanelLayout(initialState2) {
75228
75278
  import { useState as useState117, useCallback as useCallback104, useRef as useRef131 } from "react";
75229
75279
 
75230
75280
  // src/hooks/useFileTree.ts
75231
- import { useState as useState116, useCallback as useCallback101, useEffect as useEffect113, useMemo as useMemo71, useRef as useRef129 } from "react";
75281
+ import { useState as useState116, useCallback as useCallback101, useEffect as useEffect114, useMemo as useMemo71, useRef as useRef129 } from "react";
75232
75282
 
75233
75283
  // src/utils/rejectionTelemetry.ts
75234
75284
  function errorProps(value) {
@@ -75261,7 +75311,7 @@ function useFileTree({ projectId, projectIdRef }) {
75261
75311
  const compositionPaths = current?.compositionPaths ?? EMPTY_FILE_LIST;
75262
75312
  const projectDir = current?.projectDir ?? null;
75263
75313
  const fileTreeLoaded = current?.loaded ?? false;
75264
- useEffect113(() => {
75314
+ useEffect114(() => {
75265
75315
  if (!projectId) return;
75266
75316
  let cancelled = false;
75267
75317
  setFetched({ projectId, loaded: false, fileTree: [], compositionPaths: [], projectDir: null });
@@ -76459,7 +76509,7 @@ function usePreviewPersistence({
76459
76509
  }
76460
76510
 
76461
76511
  // src/hooks/usePreviewDocumentVersion.ts
76462
- import { useCallback as useCallback106, useEffect as useEffect114, useRef as useRef133, useState as useState119 } from "react";
76512
+ import { useCallback as useCallback106, useEffect as useEffect115, useRef as useRef133, useState as useState119 } from "react";
76463
76513
  function usePreviewDocumentVersion() {
76464
76514
  const [previewDocumentVersion, setPreviewDocumentVersion] = useState119(0);
76465
76515
  const refreshTimersRef = useRef133([]);
@@ -76472,7 +76522,7 @@ function usePreviewDocumentVersion() {
76472
76522
  window.setTimeout(() => setPreviewDocumentVersion((v) => v + 1), 300)
76473
76523
  );
76474
76524
  }, []);
76475
- useEffect114(
76525
+ useEffect115(
76476
76526
  () => () => {
76477
76527
  for (const id of refreshTimersRef.current) clearTimeout(id);
76478
76528
  },
@@ -79530,7 +79580,7 @@ function useTimelineMoveEditsHandler(handleTimelineGroupMove) {
79530
79580
  import { useCallback as useCallback148 } from "react";
79531
79581
 
79532
79582
  // src/hooks/useAskAgentModal.ts
79533
- import { useState as useState121, useCallback as useCallback124, useRef as useRef142, useEffect as useEffect115 } from "react";
79583
+ import { useState as useState121, useCallback as useCallback124, useRef as useRef142, useEffect as useEffect116 } from "react";
79534
79584
  function useAskAgentModal({
79535
79585
  activeCompPath,
79536
79586
  projectDir,
@@ -79612,13 +79662,13 @@ function useAskAgentModal({
79612
79662
  showToast
79613
79663
  ]
79614
79664
  );
79615
- useEffect115(() => {
79665
+ useEffect116(() => {
79616
79666
  setAgentPromptTagSnippet(void 0);
79617
79667
  setAgentPromptSelectionContext(void 0);
79618
79668
  setAgentModalAnchorPoint(null);
79619
79669
  setCopiedAgentPrompt(false);
79620
79670
  }, [domEditSelection]);
79621
- useEffect115(
79671
+ useEffect116(
79622
79672
  () => () => {
79623
79673
  if (copiedAgentTimerRef.current) clearTimeout(copiedAgentTimerRef.current);
79624
79674
  },
@@ -79642,7 +79692,7 @@ function useAskAgentModal({
79642
79692
  }
79643
79693
 
79644
79694
  // src/hooks/useDomSelection.ts
79645
- import { useState as useState122, useCallback as useCallback125, useRef as useRef143, useEffect as useEffect117 } from "react";
79695
+ import { useState as useState122, useCallback as useCallback125, useRef as useRef143, useEffect as useEffect118 } from "react";
79646
79696
 
79647
79697
  // src/utils/domEditHelpers.ts
79648
79698
  function domEditSelectionsTargetSame(a, b) {
@@ -79692,7 +79742,7 @@ function holdScenesOf(iframe, element) {
79692
79742
  }
79693
79743
 
79694
79744
  // src/hooks/useStudioTestHooks.ts
79695
- import { useEffect as useEffect116 } from "react";
79745
+ import { useEffect as useEffect117 } from "react";
79696
79746
 
79697
79747
  // src/player/lib/timelinePerformanceDiagnostics.ts
79698
79748
  function readNonNegativeNumber(value) {
@@ -79775,7 +79825,7 @@ function useStudioTestHooks({
79775
79825
  buildDomSelectionFromTarget,
79776
79826
  applyDomSelection
79777
79827
  }) {
79778
- useEffect116(() => {
79828
+ useEffect117(() => {
79779
79829
  if (!STUDIO_TEST_HOOKS_ENABLED || typeof window === "undefined") return;
79780
79830
  const api = {
79781
79831
  runtimeMode: STUDIO_RUNTIME_MODE,
@@ -80162,13 +80212,13 @@ function useDomSelection({
80162
80212
  },
80163
80213
  [activeCompPath, announceTimelineSelection2, buildDomSelectionFromTarget, previewIframeRef]
80164
80214
  );
80165
- useEffect117(() => {
80215
+ useEffect118(() => {
80166
80216
  refreshDomEditGroupSelectionsFromPreviewRef.current = refreshDomEditGroupSelectionsFromPreview;
80167
80217
  }, [refreshDomEditGroupSelectionsFromPreview]);
80168
- useEffect117(() => {
80218
+ useEffect118(() => {
80169
80219
  updateDomEditHoverSelection(null);
80170
80220
  }, [activeCompPath, projectId, previewIframe, refreshKey, updateDomEditHoverSelection]);
80171
- useEffect117(() => {
80221
+ useEffect118(() => {
80172
80222
  const previous = compositionIdentityRef.current;
80173
80223
  if (previous.activeCompPath === activeCompPath && previous.projectId === projectId) return;
80174
80224
  compositionIdentityRef.current = { activeCompPath, projectId };
@@ -80176,7 +80226,7 @@ function useDomSelection({
80176
80226
  setActiveGroupElementState(null);
80177
80227
  applyDomSelection(null, { revealPanel: false });
80178
80228
  }, [activeCompPath, projectId, applyDomSelection]);
80179
- useEffect117(() => {
80229
+ useEffect118(() => {
80180
80230
  if (!domEditHoverSelection) return;
80181
80231
  const shouldClear = captionEditMode || domEditSelectionsTargetSame(domEditHoverSelection, domEditSelection) || domEditSelectionInGroup(domEditGroupSelections, domEditHoverSelection) || !domEditHoverSelection.element.isConnected;
80182
80232
  if (shouldClear) updateDomEditHoverSelection(null);
@@ -80187,7 +80237,7 @@ function useDomSelection({
80187
80237
  domEditGroupSelections,
80188
80238
  updateDomEditHoverSelection
80189
80239
  ]);
80190
- useEffect117(() => {
80240
+ useEffect118(() => {
80191
80241
  if (!captionEditMode) return;
80192
80242
  applyDomSelection(null, { revealPanel: false });
80193
80243
  }, [applyDomSelection, captionEditMode]);
@@ -83166,7 +83216,7 @@ function useGsapKeyframeOps({
83166
83216
  }
83167
83217
 
83168
83218
  // src/hooks/useGsapPropertyDebounce.ts
83169
- import { useCallback as useCallback137, useEffect as useEffect118, useRef as useRef148 } from "react";
83219
+ import { useCallback as useCallback137, useEffect as useEffect119, useRef as useRef148 } from "react";
83170
83220
  import { parseGsapScriptAcorn as parseGsapScriptAcorn2 } from "@hyperframes/core/gsap-parser-acorn";
83171
83221
  var DEBOUNCE_MS = 150;
83172
83222
  function mergeTweenProperties(sdkSession, animationId, edited, kind) {
@@ -83236,7 +83286,7 @@ function useGsapPropertyDebounce(commitMutationSafely, sdk) {
83236
83286
  },
83237
83287
  [flushPendingPropertyEdit]
83238
83288
  );
83239
- useEffect118(() => {
83289
+ useEffect119(() => {
83240
83290
  return () => {
83241
83291
  if (debounceTimerRef.current) clearTimeout(debounceTimerRef.current);
83242
83292
  void flushPendingPropertyEdit();
@@ -83803,10 +83853,10 @@ function useGsapScriptCommits({ projectIdRef, activeCompPath, previewIframeRef,
83803
83853
  }
83804
83854
 
83805
83855
  // src/hooks/useDomEditWiring.ts
83806
- import { useCallback as useCallback142, useEffect as useEffect120, useRef as useRef152 } from "react";
83856
+ import { useCallback as useCallback142, useEffect as useEffect121, useRef as useRef152 } from "react";
83807
83857
 
83808
83858
  // src/hooks/useDomEditPreviewSync.ts
83809
- import { useEffect as useEffect119, useRef as useRef150 } from "react";
83859
+ import { useEffect as useEffect120, useRef as useRef150 } from "react";
83810
83860
  function useDomEditPreviewSync({
83811
83861
  previewIframe,
83812
83862
  captionEditMode,
@@ -83819,7 +83869,7 @@ function useDomEditPreviewSync({
83819
83869
  openSourceForSelection,
83820
83870
  gsapCacheVersion
83821
83871
  }) {
83822
- useEffect119(() => {
83872
+ useEffect120(() => {
83823
83873
  if (!previewIframe) return;
83824
83874
  const syncSelectionFromDocument = async () => {
83825
83875
  if (captionEditMode) return;
@@ -83858,7 +83908,7 @@ function useDomEditPreviewSync({
83858
83908
  ]);
83859
83909
  const openSourceRef = useRef150(openSourceForSelection);
83860
83910
  openSourceRef.current = openSourceForSelection;
83861
- useEffect119(
83911
+ useEffect120(
83862
83912
  // fallow-ignore-next-line complexity
83863
83913
  () => {
83864
83914
  if (!domEditSelection || !openSourceRef.current) return;
@@ -84274,7 +84324,7 @@ function useDomEditWiring(params) {
84274
84324
  },
84275
84325
  [openSourceForSelection]
84276
84326
  );
84277
- useEffect120(() => {
84327
+ useEffect121(() => {
84278
84328
  if (!domEditSelection?.id) return;
84279
84329
  const { selectedElementId, elements, setSelectedElementId } = usePlayerStore.getState();
84280
84330
  const matchKey = elements.find(
@@ -84284,7 +84334,7 @@ function useDomEditWiring(params) {
84284
84334
  if (key2 && key2 !== selectedElementId) setSelectedElementId(key2);
84285
84335
  }, [domEditSelection?.id]);
84286
84336
  const prevRefreshKeyRef = useRef152(refreshKey);
84287
- useEffect120(() => {
84337
+ useEffect121(() => {
84288
84338
  if (refreshKey !== prevRefreshKeyRef.current) {
84289
84339
  prevRefreshKeyRef.current = refreshKey;
84290
84340
  bumpGsapCache();
@@ -85898,7 +85948,7 @@ function useGsapAwareEditing({
85898
85948
  }
85899
85949
 
85900
85950
  // src/hooks/useStudioSelectionPublisher.ts
85901
- import { useEffect as useEffect121, useRef as useRef153 } from "react";
85951
+ import { useEffect as useEffect122, useRef as useRef153 } from "react";
85902
85952
 
85903
85953
  // src/utils/studioSelectionSnapshot.ts
85904
85954
  function round34(value) {
@@ -85991,7 +86041,7 @@ function useStudioSelectionPublisher({
85991
86041
  }) {
85992
86042
  const lastSelectionRefreshKeyRef = useRef153(refreshKey);
85993
86043
  const pendingSelectionRefreshKeyRef = useRef153(null);
85994
- useEffect121(() => {
86044
+ useEffect122(() => {
85995
86045
  if (!projectId) return;
85996
86046
  const selection = domEditSelection?.element.isConnected ? buildStudioSelectionSnapshot({
85997
86047
  projectId,
@@ -86002,13 +86052,13 @@ function useStudioSelectionPublisher({
86002
86052
  void putSelection(projectId, selection, controller.signal).catch(reportSelectionPublishError);
86003
86053
  return () => controller.abort();
86004
86054
  }, [domEditSelection, projectId]);
86005
- useEffect121(() => {
86055
+ useEffect122(() => {
86006
86056
  if (!projectId) return;
86007
86057
  return () => {
86008
86058
  void putSelection(projectId, null).catch(reportSelectionPublishError);
86009
86059
  };
86010
86060
  }, [projectId]);
86011
- useEffect121(() => {
86061
+ useEffect122(() => {
86012
86062
  if (lastSelectionRefreshKeyRef.current === refreshKey) return;
86013
86063
  lastSelectionRefreshKeyRef.current = refreshKey;
86014
86064
  pendingSelectionRefreshKeyRef.current = domEditSelectionRef.current ? refreshKey : null;
@@ -86017,7 +86067,7 @@ function useStudioSelectionPublisher({
86017
86067
  void putSelection(projectId, null, controller.signal).catch(reportSelectionPublishError);
86018
86068
  return () => controller.abort();
86019
86069
  }, [domEditSelectionRef, projectId, refreshKey]);
86020
- useEffect121(() => {
86070
+ useEffect122(() => {
86021
86071
  if (pendingSelectionRefreshKeyRef.current === null) return;
86022
86072
  pendingSelectionRefreshKeyRef.current = null;
86023
86073
  const selection = domEditSelectionRef.current;
@@ -86090,7 +86140,7 @@ function useKeyframeEaseCommits({
86090
86140
  }
86091
86141
 
86092
86142
  // src/hooks/useCommitPreflightCapabilities.ts
86093
- import { useEffect as useEffect122, useMemo as useMemo74, useRef as useRef154, useState as useState123 } from "react";
86143
+ import { useEffect as useEffect123, useMemo as useMemo74, useRef as useRef154, useState as useState123 } from "react";
86094
86144
  function runCommitPreflights(selection, fileAnimations, iframe, group) {
86095
86145
  const target = { id: selection.id ?? null, selector: selection.selector ?? null };
86096
86146
  const animations = getAnimationsForElement(fileAnimations, target, selection.element);
@@ -86152,7 +86202,7 @@ function useCommitPreflightCapabilities({
86152
86202
  }) {
86153
86203
  const parsesRef = useRef154(/* @__PURE__ */ new Map());
86154
86204
  const [parseTick, setParseTick] = useState123(0);
86155
- useEffect122(() => {
86205
+ useEffect123(() => {
86156
86206
  if (!enabled || !projectId) return;
86157
86207
  const targets = selection ? [selection, ...groupSelections] : groupSelections;
86158
86208
  for (const file of new Set(targets.map(gsapSourceFileForSelection))) {
@@ -86209,13 +86259,13 @@ function timelineElementsForDelete(members, elements) {
86209
86259
  }
86210
86260
 
86211
86261
  // src/hooks/useLivePreviewIframe.ts
86212
- import { useEffect as useEffect123, useRef as useRef155, useState as useState124 } from "react";
86262
+ import { useEffect as useEffect124, useRef as useRef155, useState as useState124 } from "react";
86213
86263
  function useLivePreviewIframe2(host) {
86214
86264
  const [promoted, setPromoted] = useState124();
86215
86265
  const live = host && promoted?.host === host ? promoted.live : host;
86216
86266
  const liveRef = useRef155(live);
86217
86267
  liveRef.current = live;
86218
- useEffect123(() => {
86268
+ useEffect124(() => {
86219
86269
  if (!host) return;
86220
86270
  return onPreviewPromoted(host.ownerDocument, ({ retired, live: next }) => {
86221
86271
  if (retired === liveRef.current) setPromoted({ host, live: next });
@@ -86761,23 +86811,23 @@ function useDomEditSession({
86761
86811
  }
86762
86812
 
86763
86813
  // src/hooks/useSdkSelectionSync.ts
86764
- import { useEffect as useEffect124 } from "react";
86814
+ import { useEffect as useEffect125 } from "react";
86765
86815
  function toHfIds(group, primary) {
86766
86816
  const source = group.length > 0 ? group : primary ? [primary] : [];
86767
86817
  return source.flatMap((s) => s.hfId ? [s.hfId] : []);
86768
86818
  }
86769
86819
  function useSdkSelectionSync(session, domEditSelection, domEditGroupSelections) {
86770
- useEffect124(() => {
86820
+ useEffect125(() => {
86771
86821
  if (!session) return;
86772
86822
  session.setSelection(toHfIds(domEditGroupSelections, domEditSelection));
86773
86823
  }, [session, domEditSelection, domEditGroupSelections]);
86774
86824
  }
86775
86825
 
86776
86826
  // src/hooks/useStudioSdkSessions.ts
86777
- import { useEffect as useEffect126 } from "react";
86827
+ import { useEffect as useEffect127 } from "react";
86778
86828
 
86779
86829
  // src/hooks/useSdkSession.ts
86780
- import { useState as useState125, useEffect as useEffect125, useCallback as useCallback149, useRef as useRef156 } from "react";
86830
+ import { useState as useState125, useEffect as useEffect126, useCallback as useCallback149, useRef as useRef156 } from "react";
86781
86831
  import { openComposition as openComposition3 } from "@hyperframes/sdk";
86782
86832
 
86783
86833
  // src/hooks/externalFileReloadBus.ts
@@ -86901,7 +86951,7 @@ function useSdkSession(projectId, activeCompPath, fileTree = [], fileTreeLoaded
86901
86951
  const [unreachableProject, setUnreachableProject] = useState125(null);
86902
86952
  const [compositionMissing, setCompositionMissing] = useState125(false);
86903
86953
  const refreshedAbsentPathsRef = useRef156(/* @__PURE__ */ new Set());
86904
- useEffect125(() => {
86954
+ useEffect126(() => {
86905
86955
  refreshedAbsentPathsRef.current.clear();
86906
86956
  }, [projectId]);
86907
86957
  function handleReadFailure(read2, forProjectId, forPath) {
@@ -86914,7 +86964,7 @@ function useSdkSession(projectId, activeCompPath, fileTree = [], fileTreeLoaded
86914
86964
  refreshedAbsentPathsRef.current.add(key2);
86915
86965
  onAbsentRead?.(forPath);
86916
86966
  }
86917
- useEffect125(
86967
+ useEffect126(
86918
86968
  () => addExternalFileReloadListener((changedPath) => {
86919
86969
  if (changedPath === "." || changedPath === activeCompPathRef.current) {
86920
86970
  setReloadToken((token) => token + 1);
@@ -86922,7 +86972,7 @@ function useSdkSession(projectId, activeCompPath, fileTree = [], fileTreeLoaded
86922
86972
  }),
86923
86973
  []
86924
86974
  );
86925
- useEffect125(() => {
86975
+ useEffect126(() => {
86926
86976
  const generation = ++generationRef.current;
86927
86977
  let cancelled = false;
86928
86978
  const previous = ownedSessionRef.current;
@@ -87030,7 +87080,7 @@ function useStudioSdkSessions(projectId, activeCompPath, masterCompPath, fileTre
87030
87080
  refreshFileTree
87031
87081
  );
87032
87082
  const editFlowSdkSession = activeCompPath ? sdkHandle.session : null;
87033
- useEffect126(() => {
87083
+ useEffect127(() => {
87034
87084
  usePreviewVariablesStore.getState().setValues(null);
87035
87085
  }, [projectId, activeCompPath]);
87036
87086
  return { sdkHandle: useStableHandlers(sdkHandle, projectId), editFlowSdkSession };
@@ -87138,7 +87188,7 @@ async function deleteExternalConflictSnapshot(projectId, filePath) {
87138
87188
  }
87139
87189
 
87140
87190
  // src/hooks/useExternalFileChangeCoordinator.ts
87141
- import { useCallback as useCallback150, useEffect as useEffect127, useRef as useRef157, useState as useState126 } from "react";
87191
+ import { useCallback as useCallback150, useEffect as useEffect128, useRef as useRef157, useState as useState126 } from "react";
87142
87192
  function testHotAdapter() {
87143
87193
  const value = globalThis.__HF_STUDIO_HOT_TEST_ADAPTER__;
87144
87194
  if (!value || typeof value !== "object") return null;
@@ -87209,22 +87259,22 @@ function useExternalFileChangeCoordinator({
87209
87259
  blockedRef.current = current;
87210
87260
  setBlockedState(current);
87211
87261
  }, []);
87212
- useEffect127(() => {
87262
+ useEffect128(() => {
87213
87263
  mountedRef.current = true;
87214
87264
  return () => {
87215
87265
  mountedRef.current = false;
87216
87266
  generationRef.current += 1;
87217
87267
  };
87218
87268
  }, []);
87219
- useEffect127(() => {
87269
+ useEffect128(() => {
87220
87270
  pendingPayloadRef.current = null;
87221
87271
  }, [projectId]);
87222
- useEffect127(() => {
87272
+ useEffect128(() => {
87223
87273
  generationRef.current += 1;
87224
87274
  setBlocked(null);
87225
87275
  lastEventIdentityRef.current = null;
87226
87276
  }, [projectId, activeCompPath, setBlocked]);
87227
- useEffect127(() => {
87277
+ useEffect128(() => {
87228
87278
  if (!projectId || !recoveryFilePath || !loadConflictSnapshot) return;
87229
87279
  const generation = ++generationRef.current;
87230
87280
  let cancelled = false;
@@ -87449,7 +87499,7 @@ function useExternalFileChangeCoordinator({
87449
87499
  );
87450
87500
  const processChangeRef = useRef157(processChange);
87451
87501
  processChangeRef.current = processChange;
87452
- useEffect127(() => {
87502
+ useEffect128(() => {
87453
87503
  const handler = (delivery) => processChangeRef.current(decodeFileChange(delivery));
87454
87504
  const adapter = testHotAdapter();
87455
87505
  if (adapter) {
@@ -87944,7 +87994,7 @@ function useBlockHandlers({
87944
87994
  }
87945
87995
 
87946
87996
  // src/hooks/useAppHotkeys.ts
87947
- import { useCallback as useCallback154, useEffect as useEffect128, useRef as useRef159 } from "react";
87997
+ import { useCallback as useCallback154, useEffect as useEffect129, useRef as useRef159 } from "react";
87948
87998
 
87949
87999
  // src/hooks/appHotkeysDispatch.ts
87950
88000
  function handleUndoRedoKey(event, onUndo, onRedo) {
@@ -88372,7 +88422,7 @@ function useAppHotkeys({
88372
88422
  }
88373
88423
  dispatchPlainKey(event, key2, cb);
88374
88424
  }, []);
88375
- useEffect128(() => {
88425
+ useEffect129(() => {
88376
88426
  window.addEventListener("keydown", handleAppKeyDown, true);
88377
88427
  return () => window.removeEventListener("keydown", handleAppKeyDown, true);
88378
88428
  }, [handleAppKeyDown]);
@@ -88388,7 +88438,7 @@ function useAppHotkeys({
88388
88438
  },
88389
88439
  [handleAppKeyDown]
88390
88440
  );
88391
- useEffect128(
88441
+ useEffect129(
88392
88442
  () => () => {
88393
88443
  previewHistoryCleanupRef.current?.();
88394
88444
  previewHistoryCleanupRef.current = null;
@@ -88915,7 +88965,7 @@ function useClipboard({
88915
88965
  }
88916
88966
 
88917
88967
  // src/hooks/useCaptionDetection.ts
88918
- import { useEffect as useEffect129, useRef as useRef161 } from "react";
88968
+ import { useEffect as useEffect130, useRef as useRef161 } from "react";
88919
88969
 
88920
88970
  // src/captions/parser.ts
88921
88971
  import {
@@ -89211,7 +89261,7 @@ function useCaptionDetection({
89211
89261
  }) {
89212
89262
  const livePreviewIframe = useLivePreviewIframe();
89213
89263
  const prevCompPathRef = useRef161(activeCompPath);
89214
- useEffect129(() => {
89264
+ useEffect130(() => {
89215
89265
  if (prevCompPathRef.current !== activeCompPath) {
89216
89266
  prevCompPathRef.current = activeCompPath;
89217
89267
  const store = useCaptionStore.getState();
@@ -89221,7 +89271,7 @@ function useCaptionDetection({
89221
89271
  }
89222
89272
  }
89223
89273
  }, [activeCompPath]);
89224
- useEffect129(() => {
89274
+ useEffect130(() => {
89225
89275
  if (!projectId) return;
89226
89276
  let activating = false;
89227
89277
  const tryActivateCaptions = () => {
@@ -89303,7 +89353,7 @@ function useCaptionDetection({
89303
89353
  window.removeEventListener("message", handleMessage);
89304
89354
  };
89305
89355
  }, [activeCompPath, projectId, compIdToSrc, captionSync, previewIframeRef, livePreviewIframe]);
89306
- useEffect129(() => {
89356
+ useEffect130(() => {
89307
89357
  if (captionEditMode) {
89308
89358
  setRightCollapsed(!captionHasSelection);
89309
89359
  }
@@ -89311,7 +89361,7 @@ function useCaptionDetection({
89311
89361
  }
89312
89362
 
89313
89363
  // src/hooks/useConsoleErrorCapture.ts
89314
- import { useCallback as useCallback156, useEffect as useEffect130, useRef as useRef162, useState as useState128 } from "react";
89364
+ import { useCallback as useCallback156, useEffect as useEffect131, useRef as useRef162, useState as useState128 } from "react";
89315
89365
  import { STUDIO_PREVIEW_ERRORS } from "@hyperframes/core/studio-preview-mark";
89316
89366
  function useConsoleErrorCapture(previewIframe) {
89317
89367
  const [consoleErrors, setConsoleErrors] = useState128(null);
@@ -89320,7 +89370,7 @@ function useConsoleErrorCapture(previewIframe) {
89320
89370
  consoleErrorsRef.current = [];
89321
89371
  setConsoleErrors(null);
89322
89372
  }, []);
89323
- useEffect130(() => {
89373
+ useEffect131(() => {
89324
89374
  resetErrors();
89325
89375
  if (!previewIframe) return;
89326
89376
  let patchedWin = null;
@@ -89491,7 +89541,7 @@ function useFrameCapture({
89491
89541
  }
89492
89542
 
89493
89543
  // src/hooks/useLintModal.ts
89494
- import { useState as useState130, useCallback as useCallback158, useEffect as useEffect131, useRef as useRef164, useMemo as useMemo78 } from "react";
89544
+ import { useState as useState130, useCallback as useCallback158, useEffect as useEffect132, useRef as useRef164, useMemo as useMemo78 } from "react";
89495
89545
  function parseFinding(f) {
89496
89546
  return {
89497
89547
  severity: f.severity === "error" ? "error" : "warning",
@@ -89534,7 +89584,7 @@ function useLintModal(projectId, refreshKey) {
89534
89584
  }
89535
89585
  }, [projectId]);
89536
89586
  const prevProjectIdRef = useRef164(projectId);
89537
- useEffect131(() => {
89587
+ useEffect132(() => {
89538
89588
  if (projectId !== prevProjectIdRef.current) {
89539
89589
  autoLintRanRef.current = false;
89540
89590
  prevProjectIdRef.current = projectId;
@@ -89543,7 +89593,7 @@ function useLintModal(projectId, refreshKey) {
89543
89593
  autoLintRanRef.current = true;
89544
89594
  void runBackgroundLint();
89545
89595
  }, [projectId, runBackgroundLint]);
89546
- useEffect131(() => {
89596
+ useEffect132(() => {
89547
89597
  if (!projectId || !refreshKey) return;
89548
89598
  const timer = setTimeout(() => void runBackgroundLint(), 1e3);
89549
89599
  return () => clearTimeout(timer);
@@ -89569,7 +89619,7 @@ function useLintModal(projectId, refreshKey) {
89569
89619
  const badgeFindings = lintModal ?? backgroundFindings;
89570
89620
  const lintFindingCount = badgeFindings.length;
89571
89621
  const hasLintError = badgeFindings.some((f) => f.severity === "error");
89572
- useEffect131(() => {
89622
+ useEffect132(() => {
89573
89623
  usePlayerStore.getState().setLintFindingsByElement(findingsByElement);
89574
89624
  }, [findingsByElement]);
89575
89625
  return {
@@ -89644,7 +89694,7 @@ function useToast() {
89644
89694
  }
89645
89695
 
89646
89696
  // src/hooks/useStudioUrlState.ts
89647
- import { useCallback as useCallback160, useEffect as useEffect132, useRef as useRef166, useState as useState132 } from "react";
89697
+ import { useCallback as useCallback160, useEffect as useEffect133, useRef as useRef166, useState as useState132 } from "react";
89648
89698
 
89649
89699
  // src/utils/studioUrlState.ts
89650
89700
  var VALID_TABS = [
@@ -89955,7 +90005,7 @@ function useStudioUrlState({
89955
90005
  previewIframeRef
89956
90006
  ]
89957
90007
  );
89958
- useEffect132(() => {
90008
+ useEffect133(() => {
89959
90009
  if (!projectId || hydratedSeekRef.current || compositionLoading) return;
89960
90010
  const nextTime = duration > 0 ? clampNumber(initialState2.currentTime ?? 0, 0, duration) : Math.max(0, initialState2.currentTime ?? 0);
89961
90011
  usePlayerStore.getState().requestSeek(nextTime);
@@ -89963,7 +90013,7 @@ function useStudioUrlState({
89963
90013
  hydratedSeekRef.current = true;
89964
90014
  }, [projectId, compositionLoading, duration, initialState2.currentTime]);
89965
90015
  const selectionHydrationTime = selectionHydrated ? 0 : currentTime;
89966
- useEffect132(() => {
90016
+ useEffect133(() => {
89967
90017
  if (!projectId || hydratedSelectionRef.current || compositionLoading) return;
89968
90018
  if (!hydratedSeekRef.current) return;
89969
90019
  const targetTime = initialState2.currentTime;
@@ -89990,7 +90040,7 @@ function useStudioUrlState({
89990
90040
  projectId,
89991
90041
  refreshKey
89992
90042
  ]);
89993
- useEffect132(() => {
90043
+ useEffect133(() => {
89994
90044
  if (hydratedInitialTimeRef.current) return;
89995
90045
  const targetTime = stableTimeRef.current;
89996
90046
  if (targetTime == null) {
@@ -90000,7 +90050,7 @@ function useStudioUrlState({
90000
90050
  if (Math.abs(currentTime - targetTime) > 0.05) return;
90001
90051
  hydratedInitialTimeRef.current = true;
90002
90052
  }, [currentTime]);
90003
- useEffect132(() => {
90053
+ useEffect133(() => {
90004
90054
  if (!activeCompPathHydrated) return;
90005
90055
  if (!hydratedSeekRef.current) return;
90006
90056
  if (!hydratedInitialTimeRef.current) return;
@@ -90011,12 +90061,12 @@ function useStudioUrlState({
90011
90061
  }, 200);
90012
90062
  return () => window.clearTimeout(handle);
90013
90063
  }, [activeCompPathHydrated, buildUrlState, currentTime, duration, isPlaying, projectId]);
90014
- useEffect132(() => {
90064
+ useEffect133(() => {
90015
90065
  if (!activeCompPathHydrated) return;
90016
90066
  if (!projectId) return;
90017
90067
  replaceHash(buildStudioHash(projectId, buildUrlState()));
90018
90068
  }, [activeCompPathHydrated, buildUrlState, projectId]);
90019
- useEffect132(() => {
90069
+ useEffect133(() => {
90020
90070
  if (!projectId) return;
90021
90071
  const onHashChange = () => {
90022
90072
  if (parseProjectIdFromHash(window.location.hash) !== projectId) return;
@@ -90163,11 +90213,11 @@ function InspectorIcon({ size = 16 }) {
90163
90213
  }
90164
90214
 
90165
90215
  // src/components/OpenInDesktopButton.tsx
90166
- import { useCallback as useCallback162, useEffect as useEffect134, useRef as useRef167, useState as useState134 } from "react";
90216
+ import { useCallback as useCallback162, useEffect as useEffect135, useRef as useRef167, useState as useState134 } from "react";
90167
90217
 
90168
90218
  // src/components/DesktopGuideCard.tsx
90169
90219
  import { ArrowSquareOut, Check as Check2, Copy as Copy2 } from "@phosphor-icons/react";
90170
- import { useEffect as useEffect133, useState as useState133 } from "react";
90220
+ import { useEffect as useEffect134, useState as useState133 } from "react";
90171
90221
 
90172
90222
  // src/components/FrameyGlyph.tsx
90173
90223
  import { jsx as jsx207, jsxs as jsxs161 } from "react/jsx-runtime";
@@ -90322,7 +90372,7 @@ function Spinner() {
90322
90372
  }
90323
90373
  function FolderPath({ dir }) {
90324
90374
  const [copied, setCopied] = useState133(false);
90325
- useEffect133(() => {
90375
+ useEffect134(() => {
90326
90376
  if (!copied) return;
90327
90377
  const timer = setTimeout(() => setCopied(false), 1500);
90328
90378
  return () => clearTimeout(timer);
@@ -90499,7 +90549,7 @@ async function readRoute() {
90499
90549
  }
90500
90550
  function useDesktopRoute() {
90501
90551
  const [route, setRoute] = useState134(null);
90502
- useEffect134(() => {
90552
+ useEffect135(() => {
90503
90553
  let live = true;
90504
90554
  readRoute().then((answered) => {
90505
90555
  if (!live || !answered) return;
@@ -90520,7 +90570,7 @@ function useImpression(anchor2, route) {
90520
90570
  const shown3 = route !== null;
90521
90571
  const routeRef = useRef167(route);
90522
90572
  routeRef.current = route;
90523
- useEffect134(() => {
90573
+ useEffect135(() => {
90524
90574
  const el = anchor2.current;
90525
90575
  if (!shown3 || !el) return;
90526
90576
  const record = () => {
@@ -90541,7 +90591,7 @@ function useImpression(anchor2, route) {
90541
90591
  }, [anchor2, shown3]);
90542
90592
  }
90543
90593
  function useGaze(anchor2, eye) {
90544
- useEffect134(() => {
90594
+ useEffect135(() => {
90545
90595
  let frame3 = 0;
90546
90596
  const look = (event) => {
90547
90597
  cancelAnimationFrame(frame3);
@@ -90562,7 +90612,7 @@ function useGaze(anchor2, eye) {
90562
90612
  }, [anchor2, eye]);
90563
90613
  }
90564
90614
  function useInstallWatch(watching, onAnswer) {
90565
- useEffect134(() => {
90615
+ useEffect135(() => {
90566
90616
  if (!watching) return;
90567
90617
  let live = true;
90568
90618
  const ask = () => readRoute().then((answered) => live && answered && onAnswer(answered)).catch(() => {
@@ -90599,7 +90649,7 @@ function useGuide(route, setRoute) {
90599
90649
  [setRoute]
90600
90650
  );
90601
90651
  useInstallWatch(cardOpen && route !== null && !installed, onAnswer);
90602
- useEffect134(() => {
90652
+ useEffect135(() => {
90603
90653
  if (!downloaded || installed) return;
90604
90654
  setSlow(false);
90605
90655
  const timer = setTimeout(() => setSlow(true), SLOW_MS);
@@ -90963,11 +91013,11 @@ var StudioHeader = memo46(function StudioHeader2({
90963
91013
  });
90964
91014
 
90965
91015
  // src/hooks/useGestureCommit.ts
90966
- import { useState as useState136, useCallback as useCallback164, useRef as useRef169, useEffect as useEffect136 } from "react";
91016
+ import { useState as useState136, useCallback as useCallback164, useRef as useRef169, useEffect as useEffect137 } from "react";
90967
91017
 
90968
91018
  // src/hooks/useGestureRecording.ts
90969
91019
  import { revealClip as revealClip2 } from "@hyperframes/core/runtime/clip-reveal";
90970
- import { useCallback as useCallback163, useEffect as useEffect135, useRef as useRef168, useState as useState135 } from "react";
91020
+ import { useCallback as useCallback163, useEffect as useEffect136, useRef as useRef168, useState as useState135 } from "react";
90971
91021
  function readBasePosition(element, iframeEl) {
90972
91022
  let baseOpacity = 1;
90973
91023
  let baseScale = 1;
@@ -91118,7 +91168,7 @@ function useGestureRecording() {
91118
91168
  const refs = useRef168(createRecordingRefs());
91119
91169
  const samplesRef = useRef168(refs.current.samples);
91120
91170
  const trailRef = useRef168(refs.current.trail);
91121
- useEffect135(() => {
91171
+ useEffect136(() => {
91122
91172
  const r = refs.current;
91123
91173
  return () => {
91124
91174
  isRecordingRef.current = false;
@@ -91509,7 +91559,7 @@ function useGestureCommit({
91509
91559
  const commitInFlightRef = useRef169(false);
91510
91560
  const capturedSelectionRef = useRef169(null);
91511
91561
  const capturedAnimationsRef = useRef169([]);
91512
- useEffect136(() => () => clearInterval(recordingAutoStopRef.current), []);
91562
+ useEffect137(() => () => clearInterval(recordingAutoStopRef.current), []);
91513
91563
  const cancelRecording = useCallback164(() => {
91514
91564
  clearInterval(recordingAutoStopRef.current);
91515
91565
  gestureRecording.stopRecording();
@@ -91519,7 +91569,7 @@ function useGestureCommit({
91519
91569
  capturedSelectionRef.current = null;
91520
91570
  setGestureState("idle");
91521
91571
  }, [gestureRecording, isGestureRecordingRef]);
91522
- useEffect136(() => {
91572
+ useEffect137(() => {
91523
91573
  if (readOnlyPreview && gestureStateRef.current === "recording") cancelRecording();
91524
91574
  }, [cancelRecording, readOnlyPreview]);
91525
91575
  const stopAndCommitRecording = useCallback164(async () => {
@@ -92042,7 +92092,7 @@ function MediaPreview({ projectId, filePath }) {
92042
92092
  }
92043
92093
 
92044
92094
  // src/components/sidebar/AssetsTab.tsx
92045
- import { memo as memo48, useState as useState143, useCallback as useCallback168, useRef as useRef174, useMemo as useMemo84, useEffect as useEffect142 } from "react";
92095
+ import { memo as memo48, useState as useState143, useCallback as useCallback168, useRef as useRef174, useMemo as useMemo84, useEffect as useEffect143 } from "react";
92046
92096
 
92047
92097
  // src/components/ui/SearchInput.tsx
92048
92098
  import { jsx as jsx215, jsxs as jsxs168 } from "react/jsx-runtime";
@@ -92153,11 +92203,11 @@ var CATEGORY_LABELS = {
92153
92203
  var FILTER_ORDER = ["audio", "images", "video", "fonts"];
92154
92204
 
92155
92205
  // src/components/sidebar/AudioRow.tsx
92156
- import { useState as useState139, useRef as useRef172, useEffect as useEffect138, useCallback as useCallback166 } from "react";
92206
+ import { useState as useState139, useRef as useRef172, useEffect as useEffect139, useCallback as useCallback166 } from "react";
92157
92207
  import { classifyWebAudioMediaRoute } from "@hyperframes/core/runtime/web-audio-route";
92158
92208
 
92159
92209
  // src/components/sidebar/AssetContextMenu.tsx
92160
- import { useCallback as useCallback165, useEffect as useEffect137, useLayoutEffect as useLayoutEffect14, useRef as useRef171, useState as useState138 } from "react";
92210
+ import { useCallback as useCallback165, useEffect as useEffect138, useLayoutEffect as useLayoutEffect14, useRef as useRef171, useState as useState138 } from "react";
92161
92211
  import { Fragment as Fragment59, jsx as jsx216, jsxs as jsxs169 } from "react/jsx-runtime";
92162
92212
  function isValidAssetName(name) {
92163
92213
  return name.length > 0 && !/[/\\]/.test(name) && !name.includes("..");
@@ -92187,7 +92237,7 @@ function ContextMenu3({
92187
92237
  y: Math.min(y, window.innerHeight - rect.height - margin)
92188
92238
  });
92189
92239
  }, [x, y, mode]);
92190
- useEffect137(() => {
92240
+ useEffect138(() => {
92191
92241
  const onKeyDown = (e) => {
92192
92242
  if (e.key === "Escape") {
92193
92243
  e.stopPropagation();
@@ -92212,7 +92262,7 @@ function ContextMenu3({
92212
92262
  document.addEventListener("keydown", onKeyDown, true);
92213
92263
  return () => document.removeEventListener("keydown", onKeyDown, true);
92214
92264
  }, [mode, onClose]);
92215
- useEffect137(() => {
92265
+ useEffect138(() => {
92216
92266
  if (mode === "menu") {
92217
92267
  menuRef.current?.querySelector('[role="menuitem"]')?.focus();
92218
92268
  }
@@ -92479,7 +92529,7 @@ function AudioRow({
92479
92529
  },
92480
92530
  [activateRow]
92481
92531
  );
92482
- useEffect138(() => {
92532
+ useEffect139(() => {
92483
92533
  return () => {
92484
92534
  cancelAnimationFrame(animRef.current);
92485
92535
  audioRef.current?.pause();
@@ -92487,7 +92537,7 @@ function AudioRow({
92487
92537
  if (stopCurrentPreview === stopPlayback) stopCurrentPreview = null;
92488
92538
  };
92489
92539
  }, [stopPlayback]);
92490
- useEffect138(() => {
92540
+ useEffect139(() => {
92491
92541
  if (playing) {
92492
92542
  const barCount = 24;
92493
92543
  const loop = () => {
@@ -92654,7 +92704,7 @@ function AudioRow({
92654
92704
  }
92655
92705
 
92656
92706
  // src/components/sidebar/GlobalAssetsView.tsx
92657
- import { useEffect as useEffect139, useMemo as useMemo83, useState as useState140 } from "react";
92707
+ import { useEffect as useEffect140, useMemo as useMemo83, useState as useState140 } from "react";
92658
92708
  import { jsx as jsx218, jsxs as jsxs171 } from "react/jsx-runtime";
92659
92709
  function globalAssetRows(records, query = "") {
92660
92710
  const q = query.trim().toLowerCase();
@@ -92670,7 +92720,7 @@ function globalAssetRows(records, query = "") {
92670
92720
  }
92671
92721
  function GlobalAssetsView({ searchQuery }) {
92672
92722
  const [records, setRecords] = useState140(null);
92673
- useEffect139(() => {
92723
+ useEffect140(() => {
92674
92724
  let cancelled = false;
92675
92725
  studioApiFetch("/api/assets/global").then((r) => r.ok ? r.json() : { assets: [] }).then((d) => {
92676
92726
  if (!cancelled) setRecords(Array.isArray(d.assets) ? d.assets : []);
@@ -92713,10 +92763,10 @@ function GlobalAssetsView({ searchQuery }) {
92713
92763
  }
92714
92764
 
92715
92765
  // src/components/sidebar/AssetCard.tsx
92716
- import { useState as useState142, useEffect as useEffect141, useRef as useRef173, useCallback as useCallback167 } from "react";
92766
+ import { useState as useState142, useEffect as useEffect142, useRef as useRef173, useCallback as useCallback167 } from "react";
92717
92767
 
92718
92768
  // src/components/ui/VideoFrameThumbnail.tsx
92719
- import { useState as useState141, useEffect as useEffect140 } from "react";
92769
+ import { useState as useState141, useEffect as useEffect141 } from "react";
92720
92770
  import { jsx as jsx219 } from "react/jsx-runtime";
92721
92771
  function VideoFrameThumbnail({
92722
92772
  src,
@@ -92724,7 +92774,7 @@ function VideoFrameThumbnail({
92724
92774
  }) {
92725
92775
  const [frame3, setFrame] = useState141(null);
92726
92776
  const [failed2, setFailed] = useState141(false);
92727
- useEffect140(() => {
92777
+ useEffect141(() => {
92728
92778
  setFailed(false);
92729
92779
  const video = document.createElement("video");
92730
92780
  video.crossOrigin = "anonymous";
@@ -92791,7 +92841,7 @@ function openAssetContextMenu(e, setContextMenu) {
92791
92841
  }
92792
92842
  function useProbedDuration(src, skip) {
92793
92843
  const [duration, setDuration] = useState142(void 0);
92794
- useEffect141(() => {
92844
+ useEffect142(() => {
92795
92845
  if (skip) return;
92796
92846
  let cancelled = false;
92797
92847
  let retryTimer;
@@ -93190,7 +93240,7 @@ var AssetsTab = memo48(function AssetsTab2({
93190
93240
  const [manifest, setManifest] = useState143(/* @__PURE__ */ new Map());
93191
93241
  const manifest404Ref = useRef174(/* @__PURE__ */ new Set());
93192
93242
  const assetsKey = assets.join("|");
93193
- useEffect142(() => {
93243
+ useEffect143(() => {
93194
93244
  if (manifest404Ref.current.has(projectId)) return;
93195
93245
  let cancelled = false;
93196
93246
  studioApiFetch(buildProjectApiPath(projectId, `/preview/.media/manifest.jsonl`)).then((r) => {
@@ -93447,11 +93497,11 @@ var AssetsTab = memo48(function AssetsTab2({
93447
93497
  });
93448
93498
 
93449
93499
  // src/components/sidebar/BlocksTab.tsx
93450
- import { memo as memo49, useState as useState145, useCallback as useCallback170, useRef as useRef176, useEffect as useEffect144 } from "react";
93500
+ import { memo as memo49, useState as useState145, useCallback as useCallback170, useRef as useRef176, useEffect as useEffect145 } from "react";
93451
93501
  import { createPortal as createPortal14 } from "react-dom";
93452
93502
 
93453
93503
  // src/components/sidebar/PromptPreviewModal.tsx
93454
- import { useState as useState144, useCallback as useCallback169, useEffect as useEffect143, useRef as useRef175 } from "react";
93504
+ import { useState as useState144, useCallback as useCallback169, useEffect as useEffect144, useRef as useRef175 } from "react";
93455
93505
  import { jsx as jsx222, jsxs as jsxs174 } from "react/jsx-runtime";
93456
93506
  function PromptPreviewModal({
93457
93507
  title,
@@ -93471,7 +93521,7 @@ function PromptPreviewModal({
93471
93521
  containerRef,
93472
93522
  canClose: () => valueRef.current === prompt
93473
93523
  });
93474
- useEffect143(() => {
93524
+ useEffect144(() => {
93475
93525
  requestAnimationFrame(() => {
93476
93526
  setEntered(true);
93477
93527
  textareaRef.current?.focus();
@@ -93777,7 +93827,7 @@ function BlockCard({
93777
93827
  setHovered(false);
93778
93828
  onPreview?.(null);
93779
93829
  }, [onPreview]);
93780
- useEffect144(() => {
93830
+ useEffect145(() => {
93781
93831
  return () => {
93782
93832
  if (hoverTimer.current) clearTimeout(hoverTimer.current);
93783
93833
  };
@@ -93938,7 +93988,7 @@ function BlockCard({
93938
93988
  }
93939
93989
 
93940
93990
  // src/components/sidebar/CompositionsTab.tsx
93941
- import { memo as memo50, useCallback as useCallback171, useEffect as useEffect145, useLayoutEffect as useLayoutEffect15, useMemo as useMemo85, useRef as useRef177, useState as useState146 } from "react";
93991
+ import { memo as memo50, useCallback as useCallback171, useEffect as useEffect146, useLayoutEffect as useLayoutEffect15, useMemo as useMemo85, useRef as useRef177, useState as useState146 } from "react";
93942
93992
  import { jsx as jsx224, jsxs as jsxs176 } from "react/jsx-runtime";
93943
93993
  var DEFAULT_PREVIEW_STAGE = { width: 1920, height: 1080 };
93944
93994
  var CARD_W = 80;
@@ -94017,7 +94067,7 @@ function useLastFrame(request2, snapshot3) {
94017
94067
  function useNearViewport() {
94018
94068
  const [element, setElement] = useState146(null);
94019
94069
  const [near4, setNear] = useState146(false);
94020
- useEffect145(() => {
94070
+ useEffect146(() => {
94021
94071
  if (!element || near4) return;
94022
94072
  if (typeof IntersectionObserver === "undefined") return setNear(true);
94023
94073
  const observer = new IntersectionObserver(
@@ -94098,13 +94148,13 @@ function CompCard({
94098
94148
  });
94099
94149
  const thumbnailOffsetX = (CARD_W - stageSize.width * previewScale) / 2;
94100
94150
  const thumbnailOffsetY = (CARD_H - stageSize.height * previewScale) / 2;
94101
- useEffect145(() => {
94151
+ useEffect146(() => {
94102
94152
  if (hovered) requestIframePlaybackSync(true);
94103
94153
  }, [hovered, requestIframePlaybackSync]);
94104
- useEffect145(() => {
94154
+ useEffect146(() => {
94105
94155
  if (livePreviewLoaded) postFrameDisplayScale(iframeRef.current);
94106
94156
  }, [livePreviewLoaded, previewScale]);
94107
- useEffect145(() => {
94157
+ useEffect146(() => {
94108
94158
  if (!hovered) return;
94109
94159
  const onRuntimeReady = (event) => {
94110
94160
  const frame3 = iframeRef.current;
@@ -94115,7 +94165,7 @@ function CompCard({
94115
94165
  window.addEventListener("message", onRuntimeReady);
94116
94166
  return () => window.removeEventListener("message", onRuntimeReady);
94117
94167
  }, [hovered]);
94118
- useEffect145(() => {
94168
+ useEffect146(() => {
94119
94169
  return () => {
94120
94170
  if (hoverTimer.current) clearTimeout(hoverTimer.current);
94121
94171
  if (syncTimer.current) clearTimeout(syncTimer.current);
@@ -94557,7 +94607,7 @@ function CodeBody({
94557
94607
  import { memo as memo62, useCallback as useCallback190 } from "react";
94558
94608
 
94559
94609
  // src/components/editor/LayersPanel.tsx
94560
- import { memo as memo52, useState as useState148, useCallback as useCallback174, useEffect as useEffect146, useRef as useRef179 } from "react";
94610
+ import { memo as memo52, useState as useState148, useCallback as useCallback174, useEffect as useEffect147, useRef as useRef179 } from "react";
94561
94611
 
94562
94612
  // src/components/editor/layerKind.ts
94563
94613
  function isCompositionHost(el) {
@@ -94876,10 +94926,10 @@ var LayersPanel = memo52(function LayersPanel2({ host }) {
94876
94926
  );
94877
94927
  setLayers(sortLayersByZIndex(items));
94878
94928
  }, [previewIframeRef, activeCompPath, isMasterView, activeGroupElement, setActiveGroupElement]);
94879
- useEffect146(() => {
94929
+ useEffect147(() => {
94880
94930
  collectLayers();
94881
94931
  }, [collectLayers, refreshKey, zEditVersion, livePreviewIframe]);
94882
- useEffect146(() => {
94932
+ useEffect147(() => {
94883
94933
  const iframe = previewIframeRef.current;
94884
94934
  if (!iframe) return;
94885
94935
  const handleLoad = () => {
@@ -94888,13 +94938,13 @@ var LayersPanel = memo52(function LayersPanel2({ host }) {
94888
94938
  };
94889
94939
  return onPreviewContentReplaced(iframe, handleLoad);
94890
94940
  }, [previewIframeRef, livePreviewIframe, collectLayers]);
94891
- useEffect146(() => {
94941
+ useEffect147(() => {
94892
94942
  if (!compositionLoading) {
94893
94943
  const timer = setTimeout(collectLayers, 100);
94894
94944
  return () => clearTimeout(timer);
94895
94945
  }
94896
94946
  }, [compositionLoading, collectLayers]);
94897
- useEffect146(() => {
94947
+ useEffect147(() => {
94898
94948
  const throttle = createRafThrottle(collectLayers, 100);
94899
94949
  const unsubscribe = liveTime.subscribe(throttle.invoke);
94900
94950
  return () => {
@@ -95187,7 +95237,7 @@ import { memo as memo54, useCallback as useCallback176, useState as useState150
95187
95237
  import { memo as memo53, useCallback as useCallback175 } from "react";
95188
95238
 
95189
95239
  // src/captions/components/shared.tsx
95190
- import { useEffect as useEffect147, useRef as useRef180, useState as useState149 } from "react";
95240
+ import { useEffect as useEffect148, useRef as useRef180, useState as useState149 } from "react";
95191
95241
  import { jsx as jsx229, jsxs as jsxs180 } from "react/jsx-runtime";
95192
95242
  var inputCls = "w-full bg-neutral-900 border border-neutral-800 rounded-sm px-1.5 py-0.5 text-2xs text-neutral-200 font-mono outline-hidden focus:border-studio-accent disabled:opacity-40 disabled:cursor-not-allowed";
95193
95243
  function Section2({ label, children }) {
@@ -95214,7 +95264,7 @@ function NumberField2({
95214
95264
  }) {
95215
95265
  const [draft, setDraft] = useState149(null);
95216
95266
  const focusedRef = useRef180(false);
95217
- useEffect147(() => {
95267
+ useEffect148(() => {
95218
95268
  if (!focusedRef.current) setDraft(null);
95219
95269
  }, [value]);
95220
95270
  const display2 = draft !== null ? draft : mixed ? "" : String(value ?? 0);
@@ -95706,7 +95756,7 @@ var CaptionPropertyPanel = memo54(function CaptionPropertyPanel2({
95706
95756
  });
95707
95757
 
95708
95758
  // src/components/editor/BlockParamsPanel.tsx
95709
- import { memo as memo55, useCallback as useCallback177, useEffect as useEffect148, useRef as useRef181, useState as useState151 } from "react";
95759
+ import { memo as memo55, useCallback as useCallback177, useEffect as useEffect149, useRef as useRef181, useState as useState151 } from "react";
95710
95760
  import { jsx as jsx232, jsxs as jsxs183 } from "react/jsx-runtime";
95711
95761
  var BlockParamsPanel = memo55(function BlockParamsPanel2({
95712
95762
  blockName,
@@ -95808,7 +95858,7 @@ var BlockParamsPanel = memo55(function BlockParamsPanel2({
95808
95858
  }
95809
95859
  commitTimersRef.current.clear();
95810
95860
  };
95811
- useEffect148(() => () => flushRef.current(), []);
95861
+ useEffect149(() => () => flushRef.current(), []);
95812
95862
  return /* @__PURE__ */ jsxs183("div", { className: "flex flex-col h-full", children: [
95813
95863
  /* @__PURE__ */ jsxs183("div", { className: "flex items-center justify-between px-3 py-2 border-b border-neutral-800", children: [
95814
95864
  /* @__PURE__ */ jsx232("div", { className: "text-[11px] font-semibold text-neutral-200 truncate", children: blockTitle }),
@@ -95940,7 +95990,7 @@ function ParamControl({
95940
95990
  import { memo as memo59 } from "react";
95941
95991
 
95942
95992
  // src/components/renders/RenderQueue.tsx
95943
- import { memo as memo58, useState as useState154, useRef as useRef183, useEffect as useEffect150, useLayoutEffect as useLayoutEffect16, useId as useId4 } from "react";
95993
+ import { memo as memo58, useState as useState154, useRef as useRef183, useEffect as useEffect151, useLayoutEffect as useLayoutEffect16, useId as useId4 } from "react";
95944
95994
  import { createPortal as createPortal15 } from "react-dom";
95945
95995
  import { CANVAS_DIMENSIONS } from "@hyperframes/parsers";
95946
95996
 
@@ -96171,7 +96221,7 @@ var RenderQueueItem = memo56(function RenderQueueItem2({
96171
96221
  });
96172
96222
 
96173
96223
  // src/components/renders/FfmpegRequiredNotice.tsx
96174
- import { memo as memo57, useEffect as useEffect149, useRef as useRef182, useState as useState153 } from "react";
96224
+ import { memo as memo57, useEffect as useEffect150, useRef as useRef182, useState as useState153 } from "react";
96175
96225
  import { jsx as jsx234, jsxs as jsxs185 } from "react/jsx-runtime";
96176
96226
  var DOWNLOAD_URL = "https://ffmpeg.org/download.html";
96177
96227
  var CUE_MS = 1600;
@@ -96185,16 +96235,16 @@ var FfmpegRequiredNotice = memo57(function FfmpegRequiredNotice2({
96185
96235
  const [recheckFailed, setRecheckFailed] = useState153(false);
96186
96236
  const wasChecking = useRef182(false);
96187
96237
  const cueTimer = useRef182(void 0);
96188
- useEffect149(() => {
96238
+ useEffect150(() => {
96189
96239
  if (wasChecking.current && !checking) setRecheckFailed(true);
96190
96240
  wasChecking.current = checking;
96191
96241
  }, [checking]);
96192
- useEffect149(() => {
96242
+ useEffect150(() => {
96193
96243
  if (!recheckFailed) return;
96194
96244
  cueTimer.current = setTimeout(() => setRecheckFailed(false), CUE_MS);
96195
96245
  return () => clearTimeout(cueTimer.current);
96196
96246
  }, [recheckFailed]);
96197
- useEffect149(() => () => clearTimeout(cueTimer.current), []);
96247
+ useEffect150(() => () => clearTimeout(cueTimer.current), []);
96198
96248
  const copy = async (command) => {
96199
96249
  const ok = await copyTextToClipboard(command);
96200
96250
  if (!ok) return;
@@ -96354,7 +96404,7 @@ function FormatInfoTooltip({ format }) {
96354
96404
  const hide = () => {
96355
96405
  timeoutRef.current = setTimeout(() => setOpen(false), 120);
96356
96406
  };
96357
- useEffect150(() => () => clearTimeout(timeoutRef.current), []);
96407
+ useEffect151(() => () => clearTimeout(timeoutRef.current), []);
96358
96408
  useLayoutEffect16(() => {
96359
96409
  if (!open) return;
96360
96410
  const el = triggerRef.current;
@@ -96368,7 +96418,7 @@ function FormatInfoTooltip({ format }) {
96368
96418
  )
96369
96419
  );
96370
96420
  }, [open]);
96371
- useEffect150(() => {
96421
+ useEffect151(() => {
96372
96422
  if (!open) return;
96373
96423
  const onKeyDown = (e) => {
96374
96424
  if (e.key === "Escape") setOpen(false);
@@ -96608,7 +96658,7 @@ var RenderQueue = memo58(function RenderQueue2({
96608
96658
  onRecheckFfmpeg
96609
96659
  }) {
96610
96660
  const listRef = useRef183(null);
96611
- useEffect150(() => {
96661
+ useEffect151(() => {
96612
96662
  if (listRef.current) {
96613
96663
  listRef.current.scrollTo({ top: listRef.current.scrollHeight, behavior: "smooth" });
96614
96664
  }
@@ -96763,7 +96813,7 @@ var RenderQueuePanel = memo59(function RenderQueuePanel2() {
96763
96813
  });
96764
96814
 
96765
96815
  // src/components/panels/SlideshowPanel.tsx
96766
- import { useState as useState156, useEffect as useEffect151, useCallback as useCallback180, useRef as useRef184 } from "react";
96816
+ import { useState as useState156, useEffect as useEffect152, useCallback as useCallback180, useRef as useRef184 } from "react";
96767
96817
  import { parseSlideshowManifest } from "@hyperframes/core/slideshow";
96768
96818
 
96769
96819
  // src/components/panels/SlideshowSubPanels.tsx
@@ -97459,7 +97509,7 @@ function SlideshowPanel({ scenes, onPersist, onPersistNotes }) {
97459
97509
  const { domEditSelection } = useDomEditSelectionContext();
97460
97510
  const manifestRef = useRef184(manifest);
97461
97511
  const notesCtrlRef = useRef184(makeSlideshowNotesController());
97462
- useEffect151(() => {
97512
+ useEffect152(() => {
97463
97513
  if (!compHtml) {
97464
97514
  notesCtrlRef.current.flush();
97465
97515
  setManifest({ slides: [] });
@@ -97521,7 +97571,7 @@ function SlideshowPanel({ scenes, onPersist, onPersistNotes }) {
97521
97571
  },
97522
97572
  [onPersistNotes]
97523
97573
  );
97524
- useEffect151(() => {
97574
+ useEffect152(() => {
97525
97575
  const ctrl = notesCtrlRef.current;
97526
97576
  return () => {
97527
97577
  ctrl.flush();
@@ -97780,7 +97830,7 @@ function SlideshowPanel({ scenes, onPersist, onPersistNotes }) {
97780
97830
  }
97781
97831
 
97782
97832
  // src/components/panels/VariablesPanel.tsx
97783
- import { memo as memo60, useCallback as useCallback184, useEffect as useEffect153, useMemo as useMemo86, useState as useState160 } from "react";
97833
+ import { memo as memo60, useCallback as useCallback184, useEffect as useEffect154, useMemo as useMemo86, useState as useState160 } from "react";
97784
97834
 
97785
97835
  // src/hooks/useVariablesPersist.ts
97786
97836
  import { useCallback as useCallback181 } from "react";
@@ -97831,7 +97881,7 @@ function useVariablesPersist({
97831
97881
  import { useCallback as useCallback183, useState as useState159 } from "react";
97832
97882
 
97833
97883
  // src/hooks/useProjectCompositionVariables.ts
97834
- import { useCallback as useCallback182, useEffect as useEffect152, useState as useState157 } from "react";
97884
+ import { useCallback as useCallback182, useEffect as useEffect153, useState as useState157 } from "react";
97835
97885
  import { openComposition as openComposition4 } from "@hyperframes/sdk";
97836
97886
  async function readGroup(path, readProjectFile) {
97837
97887
  let content;
@@ -97855,7 +97905,7 @@ async function readGroup(path, readProjectFile) {
97855
97905
  }
97856
97906
  function useProjectCompositionVariables(compositionPaths, excludePath, readProjectFile, refreshKey) {
97857
97907
  const [groups, setGroups] = useState157([]);
97858
- useEffect152(() => {
97908
+ useEffect153(() => {
97859
97909
  let cancelled = false;
97860
97910
  const htmlFiles = compositionPaths.filter((p) => p !== excludePath);
97861
97911
  void (async () => {
@@ -98478,7 +98528,7 @@ var VariablesPanel = memo60(function VariablesPanel2({
98478
98528
  const previewValues = usePreviewVariablesStore((s) => s.values);
98479
98529
  const setPreviewValues = usePreviewVariablesStore((s) => s.setValues);
98480
98530
  const [revision, setRevision] = useState160(0);
98481
- useEffect153(() => {
98531
+ useEffect154(() => {
98482
98532
  if (!sdkSession) return;
98483
98533
  return sdkSession.on("change", () => setRevision((r) => r + 1));
98484
98534
  }, [sdkSession]);
@@ -98733,7 +98783,7 @@ var VariablesPanel = memo60(function VariablesPanel2({
98733
98783
  });
98734
98784
 
98735
98785
  // src/components/panels/MotionBlurPanel.tsx
98736
- import { memo as memo61, useCallback as useCallback185, useEffect as useEffect154, useMemo as useMemo87, useReducer as useReducer2, useRef as useRef185, useState as useState161 } from "react";
98786
+ import { memo as memo61, useCallback as useCallback185, useEffect as useEffect155, useMemo as useMemo87, useReducer as useReducer2, useRef as useRef185, useState as useState161 } from "react";
98737
98787
 
98738
98788
  // src/components/panels/motionBlurPanelModel.ts
98739
98789
  import {
@@ -98803,7 +98853,7 @@ var NothingToChange = class extends Error {
98803
98853
  function useLivePreviewAttributes(previewIframeRef, refreshKey) {
98804
98854
  const [live, setLive] = useState161(null);
98805
98855
  const holdUntil = useRef185(0);
98806
- useEffect154(() => {
98856
+ useEffect155(() => {
98807
98857
  const read2 = () => {
98808
98858
  const found = readPreviewRootAttributes(previewIframeRef.current);
98809
98859
  if (found && Date.now() >= holdUntil.current) {
@@ -98831,7 +98881,7 @@ var MotionBlurPanel = memo61(function MotionBlurPanel2({
98831
98881
  const { readProjectFile, writeProjectFile, compositions } = useFileManagerContext();
98832
98882
  const [, rerender] = useReducer2((n) => n + 1, 0);
98833
98883
  const [live, hold] = useLivePreviewAttributes(previewIframeRef, refreshKey);
98834
- useEffect154(() => sdkSession?.on("change", rerender), [sdkSession]);
98884
+ useEffect155(() => sdkSession?.on("change", rerender), [sdkSession]);
98835
98885
  const root = sdkSession ? findCompositionRoot(sdkSession.getRootElements()) : null;
98836
98886
  const attributes = live ?? root?.attributes ?? null;
98837
98887
  const settings = useMemo87(() => attributes ? settingsOf(attributes) : null, [attributes]);
@@ -99059,7 +99109,7 @@ function DesignPanelPromoteProvider({
99059
99109
  }
99060
99110
 
99061
99111
  // src/hooks/useRemoveBackground.ts
99062
- import { useCallback as useCallback188, useEffect as useEffect155, useRef as useRef186 } from "react";
99112
+ import { useCallback as useCallback188, useEffect as useEffect156, useRef as useRef186 } from "react";
99063
99113
 
99064
99114
  // src/components/studioMediaJobs.ts
99065
99115
  var MEDIA_JOB_RECONNECT_TIMEOUT_MS = 15e3;
@@ -99166,7 +99216,7 @@ function waitForMediaJob(jobId, onProgress, signal) {
99166
99216
  // src/hooks/useRemoveBackground.ts
99167
99217
  function useRemoveBackground(projectId, refreshFileTree, showToast) {
99168
99218
  const abortRef = useRef186(null);
99169
- useEffect155(
99219
+ useEffect156(
99170
99220
  () => () => {
99171
99221
  abortRef.current?.abort();
99172
99222
  },
@@ -99632,7 +99682,7 @@ function useStudioSidePanels(left, right, projectId) {
99632
99682
  }
99633
99683
 
99634
99684
  // src/components/TimelineToolbar.tsx
99635
- import { memo as memo63, useEffect as useEffect157, useRef as useRef187 } from "react";
99685
+ import { memo as memo63, useEffect as useEffect158, useRef as useRef187 } from "react";
99636
99686
  import {
99637
99687
  ArrowsOutLineHorizontal,
99638
99688
  FrameCorners as FrameCorners2,
@@ -99643,7 +99693,7 @@ import {
99643
99693
  } from "@phosphor-icons/react";
99644
99694
 
99645
99695
  // src/hooks/useKeyframeKeyboard.ts
99646
- import { useEffect as useEffect156, useCallback as useCallback191 } from "react";
99696
+ import { useEffect as useEffect157, useCallback as useCallback191 } from "react";
99647
99697
  function useKeyframeKeyboard({ enabled, onAddKeyframe }) {
99648
99698
  const handler = useCallback191(
99649
99699
  (e) => {
@@ -99657,7 +99707,7 @@ function useKeyframeKeyboard({ enabled, onAddKeyframe }) {
99657
99707
  },
99658
99708
  [enabled, onAddKeyframe]
99659
99709
  );
99660
- useEffect156(() => {
99710
+ useEffect157(() => {
99661
99711
  if (!enabled) return;
99662
99712
  window.addEventListener("keydown", handler, { capture: true });
99663
99713
  return () => window.removeEventListener("keydown", handler, { capture: true });
@@ -100009,10 +100059,10 @@ var TimelineToolbar = memo63(function TimelineToolbar2({
100009
100059
  enabled: showKeyframes && Boolean(onToggleKeyframe),
100010
100060
  onAddKeyframe: onToggleKeyframe
100011
100061
  });
100012
- useEffect157(() => {
100062
+ useEffect158(() => {
100013
100063
  if (!showKeyframes) setAutoKeyframeEnabled(false);
100014
100064
  }, [showKeyframes, setAutoKeyframeEnabled]);
100015
- useEffect157(() => {
100065
+ useEffect158(() => {
100016
100066
  const onKeyDown = (e) => {
100017
100067
  if (e.key !== "n" && e.key !== "N") return;
100018
100068
  if (e.metaKey || e.ctrlKey || e.altKey) return;
@@ -100310,7 +100360,7 @@ function StudioSplash({ waiting }) {
100310
100360
  }
100311
100361
 
100312
100362
  // src/hooks/useServerConnection.ts
100313
- import { useEffect as useEffect158, useState as useState163 } from "react";
100363
+ import { useEffect as useEffect159, useState as useState163 } from "react";
100314
100364
  async function resolveHashProject(id) {
100315
100365
  try {
100316
100366
  const res = await studioApiFetch(`/api/projects/${encodeURIComponent(id)}`);
@@ -100384,7 +100434,7 @@ function useServerConnection() {
100384
100434
  if (retryTimer !== null) clearTimeout(retryTimer);
100385
100435
  };
100386
100436
  });
100387
- useEffect158(() => {
100437
+ useEffect159(() => {
100388
100438
  const onHashChange = () => {
100389
100439
  const next = parseProjectIdFromHash(window.location.hash);
100390
100440
  if (!next || next === projectId) return;
@@ -100410,9 +100460,9 @@ function useServerConnection() {
100410
100460
  }
100411
100461
 
100412
100462
  // src/hooks/useStudioSessionStart.ts
100413
- import { useEffect as useEffect159 } from "react";
100463
+ import { useEffect as useEffect160 } from "react";
100414
100464
  function useStudioSessionStart(projectId, resolving, waitingForServer) {
100415
- useEffect159(() => {
100465
+ useEffect160(() => {
100416
100466
  if (resolving || waitingForServer || hasFiredSessionStart()) return;
100417
100467
  markSessionStartFired();
100418
100468
  trackStudioSessionStart({ has_project: projectId != null });
@@ -100439,7 +100489,7 @@ function useTimelineAddAtPlayhead(addAsset, addComposition, projectId) {
100439
100489
  import { useState as useState164 } from "react";
100440
100490
 
100441
100491
  // src/hooks/useHydrateActiveCompPathFromUrl.ts
100442
- import { useEffect as useEffect160 } from "react";
100492
+ import { useEffect as useEffect161 } from "react";
100443
100493
  function useHydrateActiveCompPathFromUrl({
100444
100494
  hydrated,
100445
100495
  fileTreeLoaded,
@@ -100448,7 +100498,7 @@ function useHydrateActiveCompPathFromUrl({
100448
100498
  setActiveCompPath,
100449
100499
  setHydrated
100450
100500
  }) {
100451
- useEffect160(() => {
100501
+ useEffect161(() => {
100452
100502
  if (hydrated) return;
100453
100503
  if (!fileTreeLoaded) return;
100454
100504
  const nextCompPath = normalizeStudioCompositionPath(
@@ -100461,7 +100511,7 @@ function useHydrateActiveCompPathFromUrl({
100461
100511
  }
100462
100512
 
100463
100513
  // src/hooks/useAutoOpenRootComposition.ts
100464
- import { useEffect as useEffect161, useRef as useRef188 } from "react";
100514
+ import { useEffect as useEffect162, useRef as useRef188 } from "react";
100465
100515
  function useAutoOpenRootComposition({
100466
100516
  projectId,
100467
100517
  activeCompPath,
@@ -100470,7 +100520,7 @@ function useAutoOpenRootComposition({
100470
100520
  onSelectComposition
100471
100521
  }) {
100472
100522
  const settledForProjectRef = useRef188(void 0);
100473
- useEffect161(() => {
100523
+ useEffect162(() => {
100474
100524
  if (settledForProjectRef.current === projectId) return;
100475
100525
  if (!activeCompPathHydrated) return;
100476
100526
  if (activeCompPath !== null) {
@@ -101661,6 +101711,7 @@ export {
101661
101711
  MenuShortcut,
101662
101712
  NLEPreview,
101663
101713
  NumberField,
101714
+ PREVIEW_QUALITY_LEVELS,
101664
101715
  Player,
101665
101716
  PlayerControls,
101666
101717
  Popover,