@remotion/studio 4.0.436 → 4.0.438

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.
@@ -7900,15 +7900,20 @@ var MenuBuildIndicator = () => {
7900
7900
  import { useCallback as useCallback93, useContext as useContext61, useEffect as useEffect63 } from "react";
7901
7901
 
7902
7902
  // src/components/TopPanel.tsx
7903
- import { useCallback as useCallback92, useContext as useContext60, useEffect as useEffect62, useMemo as useMemo98 } from "react";
7903
+ import React124, { useCallback as useCallback92, useContext as useContext60, useEffect as useEffect62, useMemo as useMemo98 } from "react";
7904
7904
 
7905
7905
  // src/helpers/use-breakpoint.ts
7906
- import { useEffect as useEffect26, useState as useState32 } from "react";
7906
+ import { useEffect as useEffect26, useRef as useRef19, useState as useState32 } from "react";
7907
7907
  function useBreakpoint(breakpoint2) {
7908
7908
  const [compactUI, setCompactUI] = useState32(window.innerWidth < breakpoint2);
7909
+ const compactUIRef = useRef19(compactUI);
7909
7910
  useEffect26(() => {
7910
7911
  function handleResize() {
7911
- setCompactUI(window.innerWidth < breakpoint2);
7912
+ const newValue = window.innerWidth < breakpoint2;
7913
+ if (newValue !== compactUIRef.current) {
7914
+ setCompactUI(newValue);
7915
+ }
7916
+ compactUIRef.current = newValue;
7912
7917
  }
7913
7918
  window.addEventListener("resize", handleResize);
7914
7919
  handleResize();
@@ -8335,7 +8340,7 @@ var style4 = {
8335
8340
  };
8336
8341
 
8337
8342
  // src/error-overlay/remotion-overlay/CompositionIdsDropdown.tsx
8338
- import { useEffect as useEffect28, useMemo as useMemo42, useRef as useRef19, useState as useState33 } from "react";
8343
+ import { useEffect as useEffect28, useMemo as useMemo42, useRef as useRef20, useState as useState33 } from "react";
8339
8344
 
8340
8345
  // src/error-overlay/remotion-overlay/carets.tsx
8341
8346
  import { jsx as jsx69 } from "react/jsx-runtime";
@@ -8439,7 +8444,7 @@ var searchStyle = {
8439
8444
  var CompositionIdsDropdown = ({ compositionIds, currentId }) => {
8440
8445
  const [open, setOpen] = useState33(false);
8441
8446
  const [query, setQuery] = useState33("");
8442
- const containerRef = useRef19(null);
8447
+ const containerRef = useRef20(null);
8443
8448
  const filtered = useMemo42(() => {
8444
8449
  const q = query.trim().toLowerCase();
8445
8450
  if (!q) {
@@ -8581,7 +8586,7 @@ var DismissButton = () => {
8581
8586
 
8582
8587
  // src/error-overlay/remotion-overlay/ErrorMessage.tsx
8583
8588
  import { PlayerInternals as PlayerInternals9 } from "@remotion/player";
8584
- import { useCallback as useCallback32, useMemo as useMemo43, useRef as useRef20, useState as useState34 } from "react";
8589
+ import { useCallback as useCallback32, useMemo as useMemo43, useRef as useRef21, useState as useState34 } from "react";
8585
8590
  import { jsx as jsx73, jsxs as jsxs29 } from "react/jsx-runtime";
8586
8591
  var fontSize = 24;
8587
8592
  var lineHeight = 1.5;
@@ -8623,7 +8628,7 @@ var moreButton = {
8623
8628
  };
8624
8629
  var ErrorMessage = ({ message }) => {
8625
8630
  const [expanded, setExpanded] = useState34(false);
8626
- const ref = useRef20(null);
8631
+ const ref = useRef21(null);
8627
8632
  const size2 = PlayerInternals9.useElementSize(ref, {
8628
8633
  shouldApplyCssTransforms: false,
8629
8634
  triggerOnWindowResize: true
@@ -8949,7 +8954,7 @@ import {
8949
8954
  useEffect as useEffect30,
8950
8955
  useMemo as useMemo44,
8951
8956
  useReducer,
8952
- useRef as useRef21
8957
+ useRef as useRef22
8953
8958
  } from "react";
8954
8959
  import { jsx as jsx77, jsxs as jsxs33 } from "react/jsx-runtime";
8955
8960
  var initialState = { type: "idle" };
@@ -8977,7 +8982,7 @@ var reducer = (state, action) => {
8977
8982
  return state;
8978
8983
  };
8979
8984
  var OpenInEditor = ({ stack, canHaveKeyboardShortcuts }) => {
8980
- const isMounted = useRef21(true);
8985
+ const isMounted = useRef22(true);
8981
8986
  const [state, dispatch] = useReducer(reducer, initialState);
8982
8987
  const { registerKeybinding } = useKeybinding();
8983
8988
  const dispatchIfMounted = useCallback34((payload) => {
@@ -9757,7 +9762,7 @@ import {
9757
9762
  useContext as useContext28,
9758
9763
  useEffect as useEffect34,
9759
9764
  useMemo as useMemo50,
9760
- useRef as useRef23
9765
+ useRef as useRef24
9761
9766
  } from "react";
9762
9767
 
9763
9768
  // src/helpers/editor-ruler.ts
@@ -9972,7 +9977,7 @@ import {
9972
9977
  useContext as useContext27,
9973
9978
  useEffect as useEffect33,
9974
9979
  useMemo as useMemo49,
9975
- useRef as useRef22,
9980
+ useRef as useRef23,
9976
9981
  useState as useState37
9977
9982
  } from "react";
9978
9983
  import { Internals as Internals22 } from "remotion";
@@ -9989,7 +9994,7 @@ var Ruler = ({
9989
9994
  markingGaps,
9990
9995
  orientation
9991
9996
  }) => {
9992
- const rulerCanvasRef = useRef22(null);
9997
+ const rulerCanvasRef = useRef23(null);
9993
9998
  const isVerticalRuler = orientation === "vertical";
9994
9999
  const {
9995
10000
  shouldCreateGuideRef,
@@ -10153,7 +10158,7 @@ var EditorRulers = ({ contentDimensions, canvasSize, assetMetadata, containerRef
10153
10158
  rulerMarkingGaps,
10154
10159
  scale
10155
10160
  }), [verticalRulerScaleRange, rulerMarkingGaps, scale]);
10156
- const requestAnimationFrameRef = useRef23(null);
10161
+ const requestAnimationFrameRef = useRef24(null);
10157
10162
  const onMouseMove = useCallback39((e) => {
10158
10163
  if (requestAnimationFrameRef.current) {
10159
10164
  cancelAnimationFrame(requestAnimationFrameRef.current);
@@ -10977,7 +10982,7 @@ import {
10977
10982
  useEffect as useEffect40,
10978
10983
  useImperativeHandle as useImperativeHandle10,
10979
10984
  useMemo as useMemo54,
10980
- useRef as useRef24,
10985
+ useRef as useRef25,
10981
10986
  useState as useState40
10982
10987
  } from "react";
10983
10988
  import { useRemotionEnvironment as useRemotionEnvironment2 } from "remotion";
@@ -11092,7 +11097,7 @@ var SetVisualControlsContext = createContext17({
11092
11097
  }
11093
11098
  });
11094
11099
  var VisualControlsProvider = ({ children }) => {
11095
- const imperativeHandles = useRef24({});
11100
+ const imperativeHandles = useRef25({});
11096
11101
  const [handles, setHandles] = useState40({});
11097
11102
  const state = useMemo54(() => {
11098
11103
  return {
@@ -11121,7 +11126,7 @@ var VisualControlsProvider = ({ children }) => {
11121
11126
  };
11122
11127
  }, []);
11123
11128
  const z = useZodIfPossible();
11124
- const changedRef = useRef24(false);
11129
+ const changedRef = useRef25(false);
11125
11130
  const env = useRemotionEnvironment2();
11126
11131
  const visualControl = useCallback42(function(key, value, schema) {
11127
11132
  if (handles && false) {}
@@ -12200,7 +12205,7 @@ import {
12200
12205
  useContext as useContext36,
12201
12206
  useEffect as useEffect42,
12202
12207
  useMemo as useMemo59,
12203
- useRef as useRef25,
12208
+ useRef as useRef26,
12204
12209
  useState as useState42
12205
12210
  } from "react";
12206
12211
  import { Internals as Internals31 } from "remotion";
@@ -12252,7 +12257,7 @@ var useLocalState = ({
12252
12257
  zodValidation: zodSafeParse(schema, savedValue)
12253
12258
  };
12254
12259
  }, [localUnsavedValue, savedValue, schema]);
12255
- const stateRef = useRef25(currentLocalValue);
12260
+ const stateRef = useRef26(currentLocalValue);
12256
12261
  stateRef.current = currentLocalValue;
12257
12262
  const onChange = useCallback48((updater, forceApply, increment) => {
12258
12263
  const newValue = updater(stateRef.current.value);
@@ -13185,7 +13190,7 @@ var ZodArrayItemEditor = ({
13185
13190
 
13186
13191
  // src/components/RenderModal/InfoBubble.tsx
13187
13192
  import { PlayerInternals as PlayerInternals11 } from "@remotion/player";
13188
- import { useCallback as useCallback53, useEffect as useEffect43, useMemo as useMemo66, useRef as useRef26, useState as useState45 } from "react";
13193
+ import { useCallback as useCallback53, useEffect as useEffect43, useMemo as useMemo66, useRef as useRef27, useState as useState45 } from "react";
13189
13194
  import ReactDOM7 from "react-dom";
13190
13195
 
13191
13196
  // src/components/RenderModal/InfoTooltip.tsx
@@ -13270,7 +13275,7 @@ var container28 = {
13270
13275
  var InfoBubble = ({ title: title4, children }) => {
13271
13276
  const [hovered, setIsHovered] = useState45(false);
13272
13277
  const [opened, setOpened] = useState45(false);
13273
- const ref = useRef26(null);
13278
+ const ref = useRef27(null);
13274
13279
  const { tabIndex, currentZIndex } = useZIndex();
13275
13280
  const size2 = PlayerInternals11.useElementSize(ref, {
13276
13281
  triggerOnWindowResize: true,
@@ -13563,7 +13568,7 @@ var ZodArrayEditor = ({
13563
13568
  import { useCallback as useCallback54 } from "react";
13564
13569
 
13565
13570
  // src/components/Checkbox.tsx
13566
- import { useEffect as useEffect44, useMemo as useMemo68, useRef as useRef27 } from "react";
13571
+ import { useEffect as useEffect44, useMemo as useMemo68, useRef as useRef28 } from "react";
13567
13572
  import { jsx as jsx117, jsxs as jsxs56 } from "react/jsx-runtime";
13568
13573
  var size2 = 20;
13569
13574
  var background = {
@@ -13590,7 +13595,7 @@ var box = {
13590
13595
  color: "white"
13591
13596
  };
13592
13597
  var Checkbox = ({ checked, onChange, disabled, name, rounded }) => {
13593
- const ref = useRef27(null);
13598
+ const ref = useRef28(null);
13594
13599
  const input2 = useMemo68(() => {
13595
13600
  return {
13596
13601
  appearance: "none",
@@ -13704,7 +13709,7 @@ var colorWithNewOpacity = (color, opacity, zodTypes) => {
13704
13709
  };
13705
13710
 
13706
13711
  // src/components/NewComposition/InputDragger.tsx
13707
- import React81, { useCallback as useCallback55, useEffect as useEffect45, useMemo as useMemo69, useRef as useRef28, useState as useState47 } from "react";
13712
+ import React81, { useCallback as useCallback55, useEffect as useEffect45, useMemo as useMemo69, useRef as useRef29, useState as useState47 } from "react";
13708
13713
  import { interpolate as interpolate2 } from "remotion";
13709
13714
  import { jsx as jsx119 } from "react/jsx-runtime";
13710
13715
  var isInt = (num) => {
@@ -13726,8 +13731,8 @@ var InputDraggerForwardRefFn = ({
13726
13731
  }, ref) => {
13727
13732
  const [inputFallback, setInputFallback] = useState47(false);
13728
13733
  const [dragging, setDragging] = useState47(false);
13729
- const fallbackRef = useRef28(null);
13730
- const pointerDownRef = useRef28(false);
13734
+ const fallbackRef = useRef29(null);
13735
+ const pointerDownRef = useRef29(false);
13731
13736
  const style8 = useMemo69(() => {
13732
13737
  return {
13733
13738
  ...inputBaseStyle,
@@ -13892,7 +13897,7 @@ import {
13892
13897
  useEffect as useEffect46,
13893
13898
  useImperativeHandle as useImperativeHandle11,
13894
13899
  useMemo as useMemo70,
13895
- useRef as useRef29,
13900
+ useRef as useRef30,
13896
13901
  useState as useState48
13897
13902
  } from "react";
13898
13903
  import { jsx as jsx120 } from "react/jsx-runtime";
@@ -13904,7 +13909,7 @@ var inputBaseStyle3 = {
13904
13909
  var RemInputTypeColorForwardRef = ({ status, ...props }, ref) => {
13905
13910
  const [isFocused, setIsFocused] = useState48(false);
13906
13911
  const [isHovered, setIsHovered] = useState48(false);
13907
- const inputRef = useRef29(null);
13912
+ const inputRef = useRef30(null);
13908
13913
  const { tabIndex } = useZIndex();
13909
13914
  const style8 = useMemo70(() => {
13910
13915
  return {
@@ -18240,7 +18245,7 @@ var OptionsPanel = ({ readOnlyStudio }) => {
18240
18245
  };
18241
18246
 
18242
18247
  // src/components/PreviewToolbar.tsx
18243
- import { useContext as useContext57, useEffect as useEffect60, useRef as useRef32, useState as useState62 } from "react";
18248
+ import { useContext as useContext57, useEffect as useEffect60, useRef as useRef33, useState as useState62 } from "react";
18244
18249
  import { Internals as Internals45 } from "remotion";
18245
18250
 
18246
18251
  // src/state/loop.ts
@@ -18295,7 +18300,7 @@ import {
18295
18300
  useEffect as useEffect55,
18296
18301
  useLayoutEffect,
18297
18302
  useMemo as useMemo93,
18298
- useRef as useRef30,
18303
+ useRef as useRef31,
18299
18304
  useState as useState59
18300
18305
  } from "react";
18301
18306
  import { Internals as Internals38 } from "remotion";
@@ -18316,9 +18321,9 @@ var FpsCounter = ({ playbackSpeed }) => {
18316
18321
  const frame2 = Internals38.Timeline.useTimelinePosition();
18317
18322
  const [marker, rerender] = useState59({});
18318
18323
  const [fps, setFps] = useState59(0);
18319
- const previousUpdates = useRef30([]);
18320
- const fpsRef = useRef30(0);
18321
- const playingRef = useRef30(playing);
18324
+ const previousUpdates = useRef31([]);
18325
+ const fpsRef = useRef31(0);
18326
+ const playingRef = useRef31(playing);
18322
18327
  useLayoutEffect(() => {
18323
18328
  fpsRef.current = 0;
18324
18329
  previousUpdates.current = [];
@@ -19049,7 +19054,7 @@ var PlayPause = ({ playbackRate, loop, bufferStateDelayInMilliseconds }) => {
19049
19054
 
19050
19055
  // src/components/RenderButton.tsx
19051
19056
  import { PlayerInternals as PlayerInternals14 } from "@remotion/player";
19052
- import { useCallback as useCallback90, useContext as useContext55, useMemo as useMemo95, useRef as useRef31, useState as useState61 } from "react";
19057
+ import { useCallback as useCallback90, useContext as useContext55, useMemo as useMemo95, useRef as useRef32, useState as useState61 } from "react";
19053
19058
  import ReactDOM8 from "react-dom";
19054
19059
  import { Internals as Internals43 } from "remotion";
19055
19060
  import { jsx as jsx177, jsxs as jsxs82, Fragment as Fragment23 } from "react/jsx-runtime";
@@ -19123,8 +19128,8 @@ var RenderButton = ({
19123
19128
  const { setSelectedModal } = useContext55(ModalsContext);
19124
19129
  const [preferredRenderType, setPreferredRenderType] = useState61(() => getInitialRenderType(readOnlyStudio));
19125
19130
  const [dropdownOpened, setDropdownOpened] = useState61(false);
19126
- const dropdownRef = useRef31(null);
19127
- const containerRef = useRef31(null);
19131
+ const dropdownRef = useRef32(null);
19132
+ const containerRef = useRef32(null);
19128
19133
  const { currentZIndex } = useZIndex();
19129
19134
  const size4 = PlayerInternals14.useElementSize(dropdownRef, {
19130
19135
  triggerOnWindowResize: true,
@@ -19673,9 +19678,9 @@ var PreviewToolbar = ({ readOnlyStudio, bufferStateDelayInMilliseconds }) => {
19673
19678
  const { setMediaMuted } = useContext57(Internals45.SetMediaVolumeContext);
19674
19679
  const { canvasContent } = useContext57(Internals45.CompositionManager);
19675
19680
  const isVideoComposition = useIsVideoComposition();
19676
- const previewToolbarRef = useRef32(null);
19677
- const leftScrollIndicatorRef = useRef32(null);
19678
- const rightScrollIndicatorRef = useRef32(null);
19681
+ const previewToolbarRef = useRef33(null);
19682
+ const leftScrollIndicatorRef = useRef33(null);
19683
+ const rightScrollIndicatorRef = useRef33(null);
19679
19684
  const isStill = useIsStill();
19680
19685
  const [loop, setLoop] = useState62(loadLoopOption());
19681
19686
  const isFullscreenSupported = checkFullscreenSupport();
@@ -19831,7 +19836,7 @@ var PreviewToolbar = ({ readOnlyStudio, bufferStateDelayInMilliseconds }) => {
19831
19836
  };
19832
19837
 
19833
19838
  // src/components/Splitter/SplitterContainer.tsx
19834
- import { useMemo as useMemo96, useRef as useRef33, useState as useState63 } from "react";
19839
+ import { useMemo as useMemo96, useRef as useRef34, useState as useState63 } from "react";
19835
19840
 
19836
19841
  // src/state/timeline.ts
19837
19842
  var localStorageKey4 = (id) => `remotion.editor.timelineFlex.${id}`;
@@ -19886,8 +19891,8 @@ var containerColumn = {
19886
19891
  var SplitterContainer = ({ orientation, children, defaultFlex, maxFlex, minFlex, id }) => {
19887
19892
  const [initialTimelineFlex, persistFlex] = useTimelineFlex(id);
19888
19893
  const [flexValue, setFlexValue] = useState63(initialTimelineFlex ?? defaultFlex);
19889
- const ref = useRef33(null);
19890
- const isDragging = useRef33(false);
19894
+ const ref = useRef34(null);
19895
+ const isDragging = useRef34(false);
19891
19896
  const value = useMemo96(() => {
19892
19897
  return {
19893
19898
  flexValue,
@@ -19960,7 +19965,7 @@ var SplitterElement = ({ children, type, sticky }) => {
19960
19965
 
19961
19966
  // src/components/Splitter/SplitterHandle.tsx
19962
19967
  import { PlayerInternals as PlayerInternals15 } from "@remotion/player";
19963
- import { useContext as useContext59, useEffect as useEffect61, useRef as useRef34, useState as useState64 } from "react";
19968
+ import { useContext as useContext59, useEffect as useEffect61, useRef as useRef35, useState as useState64 } from "react";
19964
19969
  import { jsx as jsx183 } from "react/jsx-runtime";
19965
19970
  var SPLITTER_HANDLE_SIZE = 3;
19966
19971
  var containerRow2 = {
@@ -19975,7 +19980,7 @@ var SplitterHandle = ({ allowToCollapse, onCollapse }) => {
19975
19980
  throw new Error("Cannot find splitter context");
19976
19981
  }
19977
19982
  const [lastPointerUp, setLastPointerUp] = useState64(() => Date.now());
19978
- const ref = useRef34(null);
19983
+ const ref = useRef35(null);
19979
19984
  useEffect61(() => {
19980
19985
  if (context.isDragging.current) {
19981
19986
  return;
@@ -20136,7 +20141,7 @@ var useResponsiveSidebarStatus = () => {
20136
20141
  }, [sidebarCollapsedStateLeft, responsiveLeftStatus]);
20137
20142
  return actualStateLeft;
20138
20143
  };
20139
- var TopPanel = ({ readOnlyStudio, onMounted, drawRef: drawRef2, bufferStateDelayInMilliseconds }) => {
20144
+ var TopPanelInner = ({ readOnlyStudio, onMounted, drawRef: drawRef2, bufferStateDelayInMilliseconds }) => {
20140
20145
  const { setSidebarCollapsedState, sidebarCollapsedStateRight } = useContext60(SidebarContext);
20141
20146
  const rulersAreVisible = useIsRulerVisible();
20142
20147
  const actualStateLeft = useResponsiveSidebarStatus();
@@ -20242,6 +20247,7 @@ var TopPanel = ({ readOnlyStudio, onMounted, drawRef: drawRef2, bufferStateDelay
20242
20247
  ]
20243
20248
  });
20244
20249
  };
20250
+ var TopPanel = React124.memo(TopPanelInner);
20245
20251
 
20246
20252
  // src/components/SidebarCollapserControls.tsx
20247
20253
  import { jsx as jsx185, jsxs as jsxs87, Fragment as Fragment26 } from "react/jsx-runtime";
@@ -20614,7 +20620,7 @@ var MenuToolbar = ({ readOnlyStudio }) => {
20614
20620
  };
20615
20621
 
20616
20622
  // src/components/Timeline/Timeline.tsx
20617
- import { useContext as useContext75, useMemo as useMemo118 } from "react";
20623
+ import React150, { useContext as useContext75, useMemo as useMemo118 } from "react";
20618
20624
  import { Internals as Internals57 } from "remotion";
20619
20625
 
20620
20626
  // src/helpers/get-sequence-visible-range.ts
@@ -20786,6 +20792,33 @@ var calculateTimeline = ({
20786
20792
  });
20787
20793
  };
20788
20794
 
20795
+ // src/components/ExpandedTracksProvider.tsx
20796
+ import { createContext as createContext21, useCallback as useCallback96, useMemo as useMemo101, useState as useState67 } from "react";
20797
+ import { jsx as jsx188 } from "react/jsx-runtime";
20798
+ var ExpandedTracksContext = createContext21({
20799
+ expandedTracks: {},
20800
+ toggleTrack: () => {
20801
+ throw new Error("ExpandedTracksContext not initialized");
20802
+ }
20803
+ });
20804
+ var ExpandedTracksProvider = ({ children }) => {
20805
+ const [expandedTracks, setExpandedTracks] = useState67({});
20806
+ const toggleTrack = useCallback96((id) => {
20807
+ setExpandedTracks((prev) => ({
20808
+ ...prev,
20809
+ [id]: !prev[id]
20810
+ }));
20811
+ }, []);
20812
+ const value = useMemo101(() => ({
20813
+ expandedTracks,
20814
+ toggleTrack
20815
+ }), [expandedTracks, toggleTrack]);
20816
+ return /* @__PURE__ */ jsx188(ExpandedTracksContext.Provider, {
20817
+ value,
20818
+ children
20819
+ });
20820
+ };
20821
+
20789
20822
  // src/components/Timeline/is-collapsed.ts
20790
20823
  var isTrackHidden = (track) => {
20791
20824
  if (!track.sequence.parent) {
@@ -20825,19 +20858,19 @@ var MaxTimelineTracksReached = () => {
20825
20858
  // src/components/Timeline/TimelineDragHandler.tsx
20826
20859
  import { PlayerInternals as PlayerInternals16 } from "@remotion/player";
20827
20860
  import {
20828
- useCallback as useCallback96,
20861
+ useCallback as useCallback97,
20829
20862
  useContext as useContext65,
20830
20863
  useEffect as useEffect65,
20831
- useMemo as useMemo102,
20832
- useRef as useRef35,
20833
- useState as useState67
20864
+ useMemo as useMemo103,
20865
+ useRef as useRef36,
20866
+ useState as useState68
20834
20867
  } from "react";
20835
20868
  import { Internals as Internals47, useVideoConfig as useVideoConfig4 } from "remotion";
20836
20869
 
20837
20870
  // src/components/Timeline/TimelineInOutPointer.tsx
20838
20871
  import { createRef as createRef10, useContext as useContext63 } from "react";
20839
20872
  import { Internals as Internals46 } from "remotion";
20840
- import { jsx as jsx188, jsxs as jsxs90, Fragment as Fragment27 } from "react/jsx-runtime";
20873
+ import { jsx as jsx189, jsxs as jsxs90, Fragment as Fragment27 } from "react/jsx-runtime";
20841
20874
  var areaHighlight = {
20842
20875
  position: "absolute",
20843
20876
  backgroundColor: "rgba(0, 0, 0, 0.5)",
@@ -20856,7 +20889,7 @@ var TimelineInOutPointer = () => {
20856
20889
  }
20857
20890
  return /* @__PURE__ */ jsxs90(Fragment27, {
20858
20891
  children: [
20859
- inFrame !== null && /* @__PURE__ */ jsx188("div", {
20892
+ inFrame !== null && /* @__PURE__ */ jsx189("div", {
20860
20893
  ref: inMarkerAreaRef,
20861
20894
  style: {
20862
20895
  ...areaHighlight,
@@ -20864,7 +20897,7 @@ var TimelineInOutPointer = () => {
20864
20897
  width: getXPositionOfItemInTimelineImperatively(inFrame, videoConfig.durationInFrames, timelineWidth)
20865
20898
  }
20866
20899
  }),
20867
- outFrame !== null && /* @__PURE__ */ jsx188("div", {
20900
+ outFrame !== null && /* @__PURE__ */ jsx189("div", {
20868
20901
  ref: outMarkerAreaRef,
20869
20902
  style: {
20870
20903
  ...areaHighlight,
@@ -20877,9 +20910,9 @@ var TimelineInOutPointer = () => {
20877
20910
  };
20878
20911
 
20879
20912
  // src/components/Timeline/TimelineInOutPointerHandle.tsx
20880
- import { createRef as createRef11, useContext as useContext64, useMemo as useMemo101 } from "react";
20913
+ import { createRef as createRef11, useContext as useContext64, useMemo as useMemo102 } from "react";
20881
20914
  import { useVideoConfig as useVideoConfig3 } from "remotion";
20882
- import { jsx as jsx189 } from "react/jsx-runtime";
20915
+ import { jsx as jsx190 } from "react/jsx-runtime";
20883
20916
  var line3 = {
20884
20917
  height: "100%",
20885
20918
  width: 1,
@@ -20893,14 +20926,14 @@ var inPointerHandle = createRef11();
20893
20926
  var outPointerHandle = createRef11();
20894
20927
  var InnerTimelineInOutPointerHandle = ({ atFrame, dragging, timelineWidth, type }) => {
20895
20928
  const videoConfig = useVideoConfig3();
20896
- const style10 = useMemo101(() => {
20929
+ const style10 = useMemo102(() => {
20897
20930
  return {
20898
20931
  ...line3,
20899
20932
  backgroundColor: dragging ? LIGHT_TRANSPARENT : "rgba(255, 255, 255, 0.1)",
20900
20933
  transform: `translateX(${getXPositionOfItemInTimelineImperatively(atFrame, videoConfig.durationInFrames, timelineWidth)}px)`
20901
20934
  };
20902
20935
  }, [atFrame, dragging, timelineWidth, videoConfig.durationInFrames]);
20903
- return /* @__PURE__ */ jsx189("div", {
20936
+ return /* @__PURE__ */ jsx190("div", {
20904
20937
  ref: type === "in" ? inPointerHandle : outPointerHandle,
20905
20938
  style: style10
20906
20939
  });
@@ -20914,7 +20947,7 @@ var TimelineInOutPointerHandle = ({
20914
20947
  if (timelineWidth === null) {
20915
20948
  return null;
20916
20949
  }
20917
- return /* @__PURE__ */ jsx189(InnerTimelineInOutPointerHandle, {
20950
+ return /* @__PURE__ */ jsx190(InnerTimelineInOutPointerHandle, {
20918
20951
  atFrame,
20919
20952
  dragging,
20920
20953
  timelineWidth,
@@ -20923,7 +20956,7 @@ var TimelineInOutPointerHandle = ({
20923
20956
  };
20924
20957
 
20925
20958
  // src/components/Timeline/TimelineDragHandler.tsx
20926
- import { jsx as jsx190, jsxs as jsxs91 } from "react/jsx-runtime";
20959
+ import { jsx as jsx191, jsxs as jsxs91 } from "react/jsx-runtime";
20927
20960
  var inner = {
20928
20961
  overflowY: "auto",
20929
20962
  overflowX: "hidden"
@@ -20948,7 +20981,7 @@ var TimelineDragHandler = () => {
20948
20981
  const video = Internals47.useUnsafeVideoConfig();
20949
20982
  const { zoom: zoomMap } = useContext65(TimelineZoomCtx);
20950
20983
  const { canvasContent } = useContext65(Internals47.CompositionManager);
20951
- const containerStyle3 = useMemo102(() => {
20984
+ const containerStyle3 = useMemo103(() => {
20952
20985
  if (!canvasContent || canvasContent.type !== "composition") {
20953
20986
  return {};
20954
20987
  }
@@ -20961,10 +20994,10 @@ var TimelineDragHandler = () => {
20961
20994
  if (!canvasContent || canvasContent.type !== "composition") {
20962
20995
  return null;
20963
20996
  }
20964
- return /* @__PURE__ */ jsx190("div", {
20997
+ return /* @__PURE__ */ jsx191("div", {
20965
20998
  ref: sliderAreaRef,
20966
20999
  style: containerStyle3,
20967
- children: video ? /* @__PURE__ */ jsx190(Inner2, {}) : null
21000
+ children: video ? /* @__PURE__ */ jsx191(Inner2, {}) : null
20968
21001
  });
20969
21002
  };
20970
21003
  var Inner2 = () => {
@@ -20975,11 +21008,11 @@ var Inner2 = () => {
20975
21008
  });
20976
21009
  const { isHighestContext } = useZIndex();
20977
21010
  const setFrame = Internals47.useTimelineSetFrame();
20978
- const [inOutDragging, setInOutDragging] = useState67({
21011
+ const [inOutDragging, setInOutDragging] = useState68({
20979
21012
  dragging: false
20980
21013
  });
20981
21014
  const timelineWidth = useContext65(TimelineWidthContext);
20982
- const get = useCallback96((frame2) => {
21015
+ const get = useCallback97((frame2) => {
20983
21016
  if (timelineWidth === null) {
20984
21017
  throw new Error("timeline width is not yet determined");
20985
21018
  }
@@ -20989,18 +21022,18 @@ var Inner2 = () => {
20989
21022
  const left3 = size4?.left ?? 0;
20990
21023
  const { inFrame, outFrame } = useTimelineInOutFramePosition();
20991
21024
  const { setInAndOutFrames } = useTimelineSetInOutFramePosition();
20992
- const [dragging, setDragging] = useState67({
21025
+ const [dragging, setDragging] = useState68({
20993
21026
  dragging: false
20994
21027
  });
20995
21028
  const { playing, play, pause, seek } = PlayerInternals16.usePlayer();
20996
- const scroller = useRef35(null);
21029
+ const scroller = useRef36(null);
20997
21030
  const stopInterval = () => {
20998
21031
  if (scroller.current) {
20999
21032
  clearInterval(scroller.current);
21000
21033
  scroller.current = null;
21001
21034
  }
21002
21035
  };
21003
- const onPointerDown = useCallback96((e) => {
21036
+ const onPointerDown = useCallback97((e) => {
21004
21037
  if (e.button !== 0) {
21005
21038
  return;
21006
21039
  }
@@ -21066,7 +21099,7 @@ var Inner2 = () => {
21066
21099
  get,
21067
21100
  outFrame
21068
21101
  ]);
21069
- const onPointerMoveScrubbing = useCallback96((e) => {
21102
+ const onPointerMoveScrubbing = useCallback97((e) => {
21070
21103
  if (!videoConfig) {
21071
21104
  return;
21072
21105
  }
@@ -21136,7 +21169,7 @@ var Inner2 = () => {
21136
21169
  seek(frame2);
21137
21170
  }
21138
21171
  }, [videoConfig, dragging.dragging, left3, width, seek]);
21139
- const onPointerMoveInOut = useCallback96((e) => {
21172
+ const onPointerMoveInOut = useCallback97((e) => {
21140
21173
  if (!videoConfig) {
21141
21174
  return;
21142
21175
  }
@@ -21172,7 +21205,7 @@ var Inner2 = () => {
21172
21205
  outMarkerAreaRef.current.style.width = String(width - get(outFrame) - offset) + "px";
21173
21206
  }
21174
21207
  }, [get, inFrame, inOutDragging, outFrame, videoConfig, width]);
21175
- const onPointerUpScrubbing = useCallback96((e) => {
21208
+ const onPointerUpScrubbing = useCallback97((e) => {
21176
21209
  stopInterval();
21177
21210
  document.body.style.userSelect = "";
21178
21211
  document.body.style.webkitUserSelect = "";
@@ -21200,7 +21233,7 @@ var Inner2 = () => {
21200
21233
  play();
21201
21234
  }
21202
21235
  }, [dragging, left3, play, videoConfig, setFrame, width]);
21203
- const onPointerUpInOut = useCallback96((e) => {
21236
+ const onPointerUpInOut = useCallback97((e) => {
21204
21237
  document.body.style.userSelect = "";
21205
21238
  document.body.style.webkitUserSelect = "";
21206
21239
  if (!videoConfig) {
@@ -21286,7 +21319,7 @@ var Inner2 = () => {
21286
21319
  window.removeEventListener("pointerup", onPointerUpInOut);
21287
21320
  };
21288
21321
  }, [inOutDragging.dragging, onPointerMoveInOut, onPointerUpInOut]);
21289
- const inContextMenu = useMemo102(() => {
21322
+ const inContextMenu = useMemo103(() => {
21290
21323
  return [
21291
21324
  {
21292
21325
  id: "hide-in",
@@ -21311,7 +21344,7 @@ var Inner2 = () => {
21311
21344
  }
21312
21345
  ];
21313
21346
  }, [setInAndOutFrames, videoConfig.id]);
21314
- const outContextMenu = useMemo102(() => {
21347
+ const outContextMenu = useMemo103(() => {
21315
21348
  return [
21316
21349
  {
21317
21350
  id: "hide-out",
@@ -21340,21 +21373,21 @@ var Inner2 = () => {
21340
21373
  style: style10,
21341
21374
  onPointerDown,
21342
21375
  children: [
21343
- /* @__PURE__ */ jsx190("div", {
21376
+ /* @__PURE__ */ jsx191("div", {
21344
21377
  style: inner,
21345
21378
  className: VERTICAL_SCROLLBAR_CLASSNAME
21346
21379
  }),
21347
- inFrame !== null && /* @__PURE__ */ jsx190(ContextMenu, {
21380
+ inFrame !== null && /* @__PURE__ */ jsx191(ContextMenu, {
21348
21381
  values: inContextMenu,
21349
- children: /* @__PURE__ */ jsx190(TimelineInOutPointerHandle, {
21382
+ children: /* @__PURE__ */ jsx191(TimelineInOutPointerHandle, {
21350
21383
  type: "in",
21351
21384
  atFrame: inFrame,
21352
21385
  dragging: inOutDragging.dragging === "in"
21353
21386
  })
21354
21387
  }),
21355
- outFrame !== null && /* @__PURE__ */ jsx190(ContextMenu, {
21388
+ outFrame !== null && /* @__PURE__ */ jsx191(ContextMenu, {
21356
21389
  values: outContextMenu,
21357
- children: /* @__PURE__ */ jsx190(TimelineInOutPointerHandle, {
21390
+ children: /* @__PURE__ */ jsx191(TimelineInOutPointerHandle, {
21358
21391
  type: "out",
21359
21392
  dragging: inOutDragging.dragging === "out",
21360
21393
  atFrame: outFrame
@@ -21366,39 +21399,12 @@ var Inner2 = () => {
21366
21399
 
21367
21400
  // src/components/Timeline/TimelineList.tsx
21368
21401
  import { PlayerInternals as PlayerInternals18 } from "@remotion/player";
21369
- import { useRef as useRef39 } from "react";
21402
+ import { useRef as useRef40 } from "react";
21370
21403
 
21371
21404
  // src/components/Timeline/TimelineListItem.tsx
21372
21405
  import { useCallback as useCallback106, useContext as useContext70, useMemo as useMemo111 } from "react";
21373
21406
  import { Internals as Internals51 } from "remotion";
21374
21407
 
21375
- // src/components/ExpandedTracksProvider.tsx
21376
- import { createContext as createContext21, useCallback as useCallback97, useMemo as useMemo103, useState as useState68 } from "react";
21377
- import { jsx as jsx191 } from "react/jsx-runtime";
21378
- var ExpandedTracksContext = createContext21({
21379
- expandedTracks: {},
21380
- toggleTrack: () => {
21381
- throw new Error("ExpandedTracksContext not initialized");
21382
- }
21383
- });
21384
- var ExpandedTracksProvider = ({ children }) => {
21385
- const [expandedTracks, setExpandedTracks] = useState68({});
21386
- const toggleTrack = useCallback97((id) => {
21387
- setExpandedTracks((prev) => ({
21388
- ...prev,
21389
- [id]: !prev[id]
21390
- }));
21391
- }, []);
21392
- const value = useMemo103(() => ({
21393
- expandedTracks,
21394
- toggleTrack
21395
- }), [expandedTracks, toggleTrack]);
21396
- return /* @__PURE__ */ jsx191(ExpandedTracksContext.Provider, {
21397
- value,
21398
- children
21399
- });
21400
- };
21401
-
21402
21408
  // src/components/Timeline/TimelineExpandedSection.tsx
21403
21409
  import React137, { useMemo as useMemo108 } from "react";
21404
21410
 
@@ -22278,7 +22284,7 @@ var useResolvedStack = (stack2) => {
22278
22284
  };
22279
22285
 
22280
22286
  // src/components/Timeline/use-sequence-props-subscription.ts
22281
- import { useCallback as useCallback105, useContext as useContext69, useEffect as useEffect70, useMemo as useMemo110, useRef as useRef36 } from "react";
22287
+ import { useCallback as useCallback105, useContext as useContext69, useEffect as useEffect70, useMemo as useMemo110, useRef as useRef37 } from "react";
22282
22288
  import { Internals as Internals50 } from "remotion";
22283
22289
  var useSequencePropsSubscription = (sequence, originalLocation) => {
22284
22290
  const { setCodeValues } = useContext69(Internals50.VisualModeOverridesContext);
@@ -22306,14 +22312,14 @@ var useSequencePropsSubscription = (sequence, originalLocation) => {
22306
22312
  const locationSource = validatedLocation?.source ?? null;
22307
22313
  const locationLine = validatedLocation?.line ?? null;
22308
22314
  const locationColumn = validatedLocation?.column ?? null;
22309
- const currentLocationSource = useRef36(locationSource);
22315
+ const currentLocationSource = useRef37(locationSource);
22310
22316
  currentLocationSource.current = locationSource;
22311
- const currentLocationLine = useRef36(locationLine);
22317
+ const currentLocationLine = useRef37(locationLine);
22312
22318
  currentLocationLine.current = locationLine;
22313
- const currentLocationColumn = useRef36(locationColumn);
22319
+ const currentLocationColumn = useRef37(locationColumn);
22314
22320
  currentLocationColumn.current = locationColumn;
22315
- const nodePathRef = useRef36(null);
22316
- const isMountedRef = useRef36(true);
22321
+ const nodePathRef = useRef37(null);
22322
+ const isMountedRef = useRef37(true);
22317
22323
  useEffect70(() => {
22318
22324
  isMountedRef.current = true;
22319
22325
  return () => {
@@ -22527,7 +22533,7 @@ var TimelineListItem = ({ nestedDepth, sequence, isCompact }) => {
22527
22533
  };
22528
22534
 
22529
22535
  // src/components/Timeline/TimelineTimeIndicators.tsx
22530
- import { useContext as useContext71, useEffect as useEffect72, useMemo as useMemo112, useRef as useRef38 } from "react";
22536
+ import { useContext as useContext71, useEffect as useEffect72, useMemo as useMemo112, useRef as useRef39 } from "react";
22531
22537
  import { Internals as Internals53 } from "remotion";
22532
22538
 
22533
22539
  // src/components/TimeValue.tsx
@@ -22536,7 +22542,7 @@ import {
22536
22542
  useCallback as useCallback107,
22537
22543
  useEffect as useEffect71,
22538
22544
  useImperativeHandle as useImperativeHandle13,
22539
- useRef as useRef37
22545
+ useRef as useRef38
22540
22546
  } from "react";
22541
22547
  import { Internals as Internals52, useCurrentFrame } from "remotion";
22542
22548
  import { jsx as jsx202, jsxs as jsxs97 } from "react/jsx-runtime";
@@ -22569,7 +22575,7 @@ var TimeValue = () => {
22569
22575
  const isStill = useIsStill();
22570
22576
  const { seek, play, pause, toggle } = PlayerInternals17.usePlayer();
22571
22577
  const keybindings = useKeybinding();
22572
- const ref = useRef37(null);
22578
+ const ref = useRef38(null);
22573
22579
  const onTextChange = useCallback107((newVal) => {
22574
22580
  seek(parseInt(newVal, 10));
22575
22581
  }, [seek]);
@@ -22697,7 +22703,7 @@ var TimelineTimeIndicators = () => {
22697
22703
  });
22698
22704
  };
22699
22705
  var Inner3 = ({ windowWidth, durationInFrames, fps }) => {
22700
- const ref = useRef38(null);
22706
+ const ref = useRef39(null);
22701
22707
  useEffect72(() => {
22702
22708
  const currentRef = ref.current;
22703
22709
  if (!currentRef) {
@@ -22780,7 +22786,7 @@ var container42 = {
22780
22786
  background: BACKGROUND
22781
22787
  };
22782
22788
  var TimelineList = ({ timeline }) => {
22783
- const ref = useRef39(null);
22789
+ const ref = useRef40(null);
22784
22790
  const size4 = PlayerInternals18.useElementSize(ref, {
22785
22791
  shouldApplyCssTransforms: false,
22786
22792
  triggerOnWindowResize: false
@@ -23021,7 +23027,7 @@ var useMaxMediaDuration = (s, fps) => {
23021
23027
 
23022
23028
  // src/components/AudioWaveform.tsx
23023
23029
  import { getAudioData, getWaveformPortion } from "@remotion/media-utils";
23024
- import { useEffect as useEffect75, useMemo as useMemo115, useRef as useRef40, useState as useState75 } from "react";
23030
+ import { useEffect as useEffect75, useMemo as useMemo115, useRef as useRef41, useState as useState75 } from "react";
23025
23031
  import { Internals as Internals55 } from "remotion";
23026
23032
 
23027
23033
  // src/components/AudioWaveformBar.tsx
@@ -23080,12 +23086,12 @@ var AudioWaveform = ({
23080
23086
  }) => {
23081
23087
  const [metadata, setMetadata] = useState75(null);
23082
23088
  const [error, setError] = useState75(null);
23083
- const mountState = useRef40({ isMounted: true });
23089
+ const mountState = useRef41({ isMounted: true });
23084
23090
  const vidConf = Internals55.useUnsafeVideoConfig();
23085
23091
  if (vidConf === null) {
23086
23092
  throw new Error("Expected video config");
23087
23093
  }
23088
- const canvas = useRef40(null);
23094
+ const canvas = useRef41(null);
23089
23095
  useEffect75(() => {
23090
23096
  const { current } = mountState;
23091
23097
  current.isMounted = true;
@@ -23296,7 +23302,7 @@ var TimelineSequenceFrame = ({ roundedFrame, premounted, postmounted }) => {
23296
23302
  };
23297
23303
 
23298
23304
  // src/components/Timeline/TimelineVideoInfo.tsx
23299
- import { useEffect as useEffect76, useRef as useRef41, useState as useState76 } from "react";
23305
+ import { useEffect as useEffect76, useRef as useRef42, useState as useState76 } from "react";
23300
23306
  import { useVideoConfig as useVideoConfig5 } from "remotion";
23301
23307
 
23302
23308
  // src/helpers/extract-frames.ts
@@ -23632,9 +23638,9 @@ var TimelineVideoInfo = ({
23632
23638
  playbackRate
23633
23639
  }) => {
23634
23640
  const { fps } = useVideoConfig5();
23635
- const ref = useRef41(null);
23641
+ const ref = useRef42(null);
23636
23642
  const [error, setError] = useState76(null);
23637
- const aspectRatio = useRef41(getAspectRatioFromCache(src));
23643
+ const aspectRatio = useRef42(getAspectRatioFromCache(src));
23638
23644
  useEffect76(() => {
23639
23645
  return () => {
23640
23646
  clearFramesForSrc(src);
@@ -23987,8 +23993,11 @@ var container45 = {
23987
23993
  var noop3 = () => {
23988
23994
  return;
23989
23995
  };
23990
- var Timeline = () => {
23996
+ var TimelineInner = () => {
23991
23997
  const { sequences } = useContext75(Internals57.SequenceManager);
23998
+ const { expandedTracks } = useContext75(ExpandedTracksContext);
23999
+ const { previewServerState } = useContext75(StudioServerConnectionCtx);
24000
+ const visualModeEnabled = Boolean(process.env.EXPERIMENTAL_VISUAL_MODE_ENABLED) && previewServerState.type === "connected";
23992
24001
  const videoConfig = Internals57.useUnsafeVideoConfig();
23993
24002
  const timeline = useMemo118(() => {
23994
24003
  if (!videoConfig) {
@@ -24012,14 +24021,15 @@ var Timeline = () => {
24012
24021
  const inner2 = useMemo118(() => {
24013
24022
  return {
24014
24023
  height: shown.reduce((acc, track) => {
24015
- return acc + getTimelineLayerHeight(track.sequence.type === "video" ? "video" : "other") + Number(TIMELINE_ITEM_BORDER_BOTTOM);
24024
+ const isExpanded = visualModeEnabled && (expandedTracks[track.sequence.id] ?? false);
24025
+ return acc + getTimelineLayerHeight(track.sequence.type === "video" ? "video" : "other") + Number(TIMELINE_ITEM_BORDER_BOTTOM) + (isExpanded ? getExpandedTrackHeight(track.sequence.controls) + TIMELINE_ITEM_BORDER_BOTTOM : 0);
24016
24026
  }, 0) + TIMELINE_ITEM_BORDER_BOTTOM + (hasBeenCut ? MAX_TIMELINE_TRACKS_NOTICE_HEIGHT : 0) + TIMELINE_TIME_INDICATOR_HEIGHT,
24017
24027
  display: "flex",
24018
24028
  flex: 1,
24019
24029
  minHeight: "100%",
24020
24030
  overflowX: "hidden"
24021
24031
  };
24022
- }, [hasBeenCut, shown]);
24032
+ }, [hasBeenCut, shown, expandedTracks, visualModeEnabled]);
24023
24033
  return /* @__PURE__ */ jsx214("div", {
24024
24034
  ref: timelineVerticalScroll,
24025
24035
  style: container45,
@@ -24068,6 +24078,7 @@ var Timeline = () => {
24068
24078
  })
24069
24079
  });
24070
24080
  };
24081
+ var Timeline = React150.memo(TimelineInner);
24071
24082
 
24072
24083
  // src/components/Timeline/TimelineEmptyState.tsx
24073
24084
  import { jsx as jsx215 } from "react/jsx-runtime";
@@ -25582,7 +25593,7 @@ import {
25582
25593
  useContext as useContext86,
25583
25594
  useEffect as useEffect82,
25584
25595
  useMemo as useMemo126,
25585
- useRef as useRef43,
25596
+ useRef as useRef44,
25586
25597
  useState as useState82
25587
25598
  } from "react";
25588
25599
  import { Internals as Internals64 } from "remotion";
@@ -26455,7 +26466,7 @@ var QuickSwitcherNoResults = ({ query, mode }) => {
26455
26466
  };
26456
26467
 
26457
26468
  // src/components/QuickSwitcher/QuickSwitcherResult.tsx
26458
- import { useEffect as useEffect81, useMemo as useMemo125, useRef as useRef42, useState as useState81 } from "react";
26469
+ import { useEffect as useEffect81, useMemo as useMemo125, useRef as useRef43, useState as useState81 } from "react";
26459
26470
  import { jsx as jsx233, jsxs as jsxs118, Fragment as Fragment35 } from "react/jsx-runtime";
26460
26471
  var container51 = {
26461
26472
  paddingLeft: 16,
@@ -26485,7 +26496,7 @@ var labelContainer = {
26485
26496
  };
26486
26497
  var QuickSwitcherResult = ({ result, selected }) => {
26487
26498
  const [hovered, setIsHovered] = useState81(false);
26488
- const ref = useRef42(null);
26499
+ const ref = useRef43(null);
26489
26500
  const keybindings = useKeybinding();
26490
26501
  useEffect81(() => {
26491
26502
  const { current } = ref;
@@ -26663,7 +26674,7 @@ var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }
26663
26674
  selectedIndex: 0
26664
26675
  });
26665
26676
  }, [initialMode, invocationTimestamp]);
26666
- const inputRef = useRef43(null);
26677
+ const inputRef = useRef44(null);
26667
26678
  const selectComposition = useSelectComposition();
26668
26679
  const closeMenu = useCallback116(() => {
26669
26680
  return;
@@ -27439,7 +27450,7 @@ import {
27439
27450
  useEffect as useEffect85,
27440
27451
  useMemo as useMemo137,
27441
27452
  useReducer as useReducer2,
27442
- useRef as useRef45,
27453
+ useRef as useRef46,
27443
27454
  useState as useState88
27444
27455
  } from "react";
27445
27456
 
@@ -29428,12 +29439,12 @@ import { BrowserSafeApis as BrowserSafeApis7 } from "@remotion/renderer/client";
29428
29439
  import { useCallback as useCallback128, useMemo as useMemo132 } from "react";
29429
29440
 
29430
29441
  // src/helpers/use-file-existence.ts
29431
- import { useContext as useContext88, useEffect as useEffect84, useRef as useRef44, useState as useState87 } from "react";
29442
+ import { useContext as useContext88, useEffect as useEffect84, useRef as useRef45, useState as useState87 } from "react";
29432
29443
  var useFileExistence = (outName) => {
29433
29444
  const [exists, setExists] = useState87(false);
29434
29445
  const { previewServerState: state, subscribeToEvent } = useContext88(StudioServerConnectionCtx);
29435
29446
  const clientId = state.type === "connected" ? state.clientId : undefined;
29436
- const currentOutName = useRef44("");
29447
+ const currentOutName = useRef45("");
29437
29448
  currentOutName.current = outName;
29438
29449
  useEffect84(() => {
29439
29450
  if (!clientId) {
@@ -30823,7 +30834,7 @@ var RenderModal = ({
30823
30834
  resolved: { result: resolvedComposition },
30824
30835
  unresolved: unresolvedComposition
30825
30836
  } = context;
30826
- const isMounted = useRef45(true);
30837
+ const isMounted = useRef46(true);
30827
30838
  const [isVideo] = useState88(() => {
30828
30839
  return typeof resolvedComposition.durationInFrames === "undefined" ? true : resolvedComposition.durationInFrames > 1;
30829
30840
  });
@@ -31966,9 +31977,9 @@ import {
31966
31977
  getEncodableAudioCodecs,
31967
31978
  getSupportedAudioCodecsForContainer
31968
31979
  } from "@remotion/web-renderer";
31969
- import { useEffect as useEffect86, useRef as useRef46, useState as useState89 } from "react";
31980
+ import { useEffect as useEffect86, useRef as useRef47, useState as useState89 } from "react";
31970
31981
  var useEncodableAudioCodecs = (container62) => {
31971
- const cacheRef = useRef46({});
31982
+ const cacheRef = useRef47({});
31972
31983
  const [codecsByContainer, setCodecsByContainer] = useState89(() => {
31973
31984
  return {
31974
31985
  [container62]: getSupportedAudioCodecsForContainer(container62)
@@ -32008,9 +32019,9 @@ import {
32008
32019
  getEncodableVideoCodecs,
32009
32020
  getSupportedVideoCodecsForContainer
32010
32021
  } from "@remotion/web-renderer";
32011
- import { useEffect as useEffect87, useRef as useRef47, useState as useState90 } from "react";
32022
+ import { useEffect as useEffect87, useRef as useRef48, useState as useState90 } from "react";
32012
32023
  var useEncodableVideoCodecs = (container62) => {
32013
- const cacheRef = useRef47({});
32024
+ const cacheRef = useRef48({});
32014
32025
  const [codecsByContainer, setCodecsByContainer] = useState90(() => {
32015
32026
  return {
32016
32027
  [container62]: getSupportedVideoCodecsForContainer(container62)
@@ -34391,15 +34402,15 @@ var SetTimelineInOutProvider = ({ children }) => {
34391
34402
  };
34392
34403
 
34393
34404
  // src/components/ShowGuidesProvider.tsx
34394
- import { useCallback as useCallback147, useMemo as useMemo151, useRef as useRef48, useState as useState100 } from "react";
34405
+ import { useCallback as useCallback147, useMemo as useMemo151, useRef as useRef49, useState as useState100 } from "react";
34395
34406
  import { jsx as jsx292 } from "react/jsx-runtime";
34396
34407
  var ShowGuidesProvider = ({ children }) => {
34397
34408
  const [guidesList, setGuidesList] = useState100(() => loadGuidesList());
34398
34409
  const [selectedGuideId, setSelectedGuideId] = useState100(null);
34399
34410
  const [hoveredGuideId, setHoveredGuideId] = useState100(null);
34400
34411
  const [editorShowGuides, setEditorShowGuidesState] = useState100(() => loadEditorShowGuidesOption());
34401
- const shouldCreateGuideRef = useRef48(false);
34402
- const shouldDeleteGuideRef = useRef48(false);
34412
+ const shouldCreateGuideRef = useRef49(false);
34413
+ const shouldDeleteGuideRef = useRef49(false);
34403
34414
  const setEditorShowGuides = useCallback147((newValue) => {
34404
34415
  setEditorShowGuidesState((prevState) => {
34405
34416
  const newVal = newValue(prevState);