@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.
@@ -7881,15 +7881,20 @@ var MenuBuildIndicator = () => {
7881
7881
  import { useCallback as useCallback93, useContext as useContext61, useEffect as useEffect63 } from "react";
7882
7882
 
7883
7883
  // src/components/TopPanel.tsx
7884
- import { useCallback as useCallback92, useContext as useContext60, useEffect as useEffect62, useMemo as useMemo98 } from "react";
7884
+ import React124, { useCallback as useCallback92, useContext as useContext60, useEffect as useEffect62, useMemo as useMemo98 } from "react";
7885
7885
 
7886
7886
  // src/helpers/use-breakpoint.ts
7887
- import { useEffect as useEffect26, useState as useState32 } from "react";
7887
+ import { useEffect as useEffect26, useRef as useRef19, useState as useState32 } from "react";
7888
7888
  function useBreakpoint(breakpoint2) {
7889
7889
  const [compactUI, setCompactUI] = useState32(window.innerWidth < breakpoint2);
7890
+ const compactUIRef = useRef19(compactUI);
7890
7891
  useEffect26(() => {
7891
7892
  function handleResize() {
7892
- setCompactUI(window.innerWidth < breakpoint2);
7893
+ const newValue = window.innerWidth < breakpoint2;
7894
+ if (newValue !== compactUIRef.current) {
7895
+ setCompactUI(newValue);
7896
+ }
7897
+ compactUIRef.current = newValue;
7893
7898
  }
7894
7899
  window.addEventListener("resize", handleResize);
7895
7900
  handleResize();
@@ -8316,7 +8321,7 @@ var style4 = {
8316
8321
  };
8317
8322
 
8318
8323
  // src/error-overlay/remotion-overlay/CompositionIdsDropdown.tsx
8319
- import { useEffect as useEffect28, useMemo as useMemo42, useRef as useRef19, useState as useState33 } from "react";
8324
+ import { useEffect as useEffect28, useMemo as useMemo42, useRef as useRef20, useState as useState33 } from "react";
8320
8325
 
8321
8326
  // src/error-overlay/remotion-overlay/carets.tsx
8322
8327
  import { jsx as jsx69 } from "react/jsx-runtime";
@@ -8420,7 +8425,7 @@ var searchStyle = {
8420
8425
  var CompositionIdsDropdown = ({ compositionIds, currentId }) => {
8421
8426
  const [open, setOpen] = useState33(false);
8422
8427
  const [query, setQuery] = useState33("");
8423
- const containerRef = useRef19(null);
8428
+ const containerRef = useRef20(null);
8424
8429
  const filtered = useMemo42(() => {
8425
8430
  const q = query.trim().toLowerCase();
8426
8431
  if (!q) {
@@ -8562,7 +8567,7 @@ var DismissButton = () => {
8562
8567
 
8563
8568
  // src/error-overlay/remotion-overlay/ErrorMessage.tsx
8564
8569
  import { PlayerInternals as PlayerInternals9 } from "@remotion/player";
8565
- import { useCallback as useCallback32, useMemo as useMemo43, useRef as useRef20, useState as useState34 } from "react";
8570
+ import { useCallback as useCallback32, useMemo as useMemo43, useRef as useRef21, useState as useState34 } from "react";
8566
8571
  import { jsx as jsx73, jsxs as jsxs29 } from "react/jsx-runtime";
8567
8572
  var fontSize = 24;
8568
8573
  var lineHeight = 1.5;
@@ -8604,7 +8609,7 @@ var moreButton = {
8604
8609
  };
8605
8610
  var ErrorMessage = ({ message }) => {
8606
8611
  const [expanded, setExpanded] = useState34(false);
8607
- const ref = useRef20(null);
8612
+ const ref = useRef21(null);
8608
8613
  const size2 = PlayerInternals9.useElementSize(ref, {
8609
8614
  shouldApplyCssTransforms: false,
8610
8615
  triggerOnWindowResize: true
@@ -8930,7 +8935,7 @@ import {
8930
8935
  useEffect as useEffect30,
8931
8936
  useMemo as useMemo44,
8932
8937
  useReducer,
8933
- useRef as useRef21
8938
+ useRef as useRef22
8934
8939
  } from "react";
8935
8940
  import { jsx as jsx77, jsxs as jsxs33 } from "react/jsx-runtime";
8936
8941
  var initialState = { type: "idle" };
@@ -8958,7 +8963,7 @@ var reducer = (state, action) => {
8958
8963
  return state;
8959
8964
  };
8960
8965
  var OpenInEditor = ({ stack, canHaveKeyboardShortcuts }) => {
8961
- const isMounted = useRef21(true);
8966
+ const isMounted = useRef22(true);
8962
8967
  const [state, dispatch] = useReducer(reducer, initialState);
8963
8968
  const { registerKeybinding } = useKeybinding();
8964
8969
  const dispatchIfMounted = useCallback34((payload) => {
@@ -9738,7 +9743,7 @@ import {
9738
9743
  useContext as useContext28,
9739
9744
  useEffect as useEffect34,
9740
9745
  useMemo as useMemo50,
9741
- useRef as useRef23
9746
+ useRef as useRef24
9742
9747
  } from "react";
9743
9748
 
9744
9749
  // src/helpers/editor-ruler.ts
@@ -9953,7 +9958,7 @@ import {
9953
9958
  useContext as useContext27,
9954
9959
  useEffect as useEffect33,
9955
9960
  useMemo as useMemo49,
9956
- useRef as useRef22,
9961
+ useRef as useRef23,
9957
9962
  useState as useState37
9958
9963
  } from "react";
9959
9964
  import { Internals as Internals22 } from "remotion";
@@ -9970,7 +9975,7 @@ var Ruler = ({
9970
9975
  markingGaps,
9971
9976
  orientation
9972
9977
  }) => {
9973
- const rulerCanvasRef = useRef22(null);
9978
+ const rulerCanvasRef = useRef23(null);
9974
9979
  const isVerticalRuler = orientation === "vertical";
9975
9980
  const {
9976
9981
  shouldCreateGuideRef,
@@ -10134,7 +10139,7 @@ var EditorRulers = ({ contentDimensions, canvasSize, assetMetadata, containerRef
10134
10139
  rulerMarkingGaps,
10135
10140
  scale
10136
10141
  }), [verticalRulerScaleRange, rulerMarkingGaps, scale]);
10137
- const requestAnimationFrameRef = useRef23(null);
10142
+ const requestAnimationFrameRef = useRef24(null);
10138
10143
  const onMouseMove = useCallback39((e) => {
10139
10144
  if (requestAnimationFrameRef.current) {
10140
10145
  cancelAnimationFrame(requestAnimationFrameRef.current);
@@ -10958,7 +10963,7 @@ import {
10958
10963
  useEffect as useEffect40,
10959
10964
  useImperativeHandle as useImperativeHandle10,
10960
10965
  useMemo as useMemo54,
10961
- useRef as useRef24,
10966
+ useRef as useRef25,
10962
10967
  useState as useState40
10963
10968
  } from "react";
10964
10969
  import { useRemotionEnvironment as useRemotionEnvironment2 } from "remotion";
@@ -11073,7 +11078,7 @@ var SetVisualControlsContext = createContext17({
11073
11078
  }
11074
11079
  });
11075
11080
  var VisualControlsProvider = ({ children }) => {
11076
- const imperativeHandles = useRef24({});
11081
+ const imperativeHandles = useRef25({});
11077
11082
  const [handles, setHandles] = useState40({});
11078
11083
  const state = useMemo54(() => {
11079
11084
  return {
@@ -11102,7 +11107,7 @@ var VisualControlsProvider = ({ children }) => {
11102
11107
  };
11103
11108
  }, []);
11104
11109
  const z = useZodIfPossible();
11105
- const changedRef = useRef24(false);
11110
+ const changedRef = useRef25(false);
11106
11111
  const env = useRemotionEnvironment2();
11107
11112
  const visualControl = useCallback42(function(key, value, schema) {
11108
11113
  if (handles && false) {}
@@ -12181,7 +12186,7 @@ import {
12181
12186
  useContext as useContext36,
12182
12187
  useEffect as useEffect42,
12183
12188
  useMemo as useMemo59,
12184
- useRef as useRef25,
12189
+ useRef as useRef26,
12185
12190
  useState as useState42
12186
12191
  } from "react";
12187
12192
  import { Internals as Internals31 } from "remotion";
@@ -12233,7 +12238,7 @@ var useLocalState = ({
12233
12238
  zodValidation: zodSafeParse(schema, savedValue)
12234
12239
  };
12235
12240
  }, [localUnsavedValue, savedValue, schema]);
12236
- const stateRef = useRef25(currentLocalValue);
12241
+ const stateRef = useRef26(currentLocalValue);
12237
12242
  stateRef.current = currentLocalValue;
12238
12243
  const onChange = useCallback48((updater, forceApply, increment) => {
12239
12244
  const newValue = updater(stateRef.current.value);
@@ -13166,7 +13171,7 @@ var ZodArrayItemEditor = ({
13166
13171
 
13167
13172
  // src/components/RenderModal/InfoBubble.tsx
13168
13173
  import { PlayerInternals as PlayerInternals11 } from "@remotion/player";
13169
- import { useCallback as useCallback53, useEffect as useEffect43, useMemo as useMemo66, useRef as useRef26, useState as useState45 } from "react";
13174
+ import { useCallback as useCallback53, useEffect as useEffect43, useMemo as useMemo66, useRef as useRef27, useState as useState45 } from "react";
13170
13175
  import ReactDOM7 from "react-dom";
13171
13176
 
13172
13177
  // src/components/RenderModal/InfoTooltip.tsx
@@ -13251,7 +13256,7 @@ var container28 = {
13251
13256
  var InfoBubble = ({ title: title4, children }) => {
13252
13257
  const [hovered, setIsHovered] = useState45(false);
13253
13258
  const [opened, setOpened] = useState45(false);
13254
- const ref = useRef26(null);
13259
+ const ref = useRef27(null);
13255
13260
  const { tabIndex, currentZIndex } = useZIndex();
13256
13261
  const size2 = PlayerInternals11.useElementSize(ref, {
13257
13262
  triggerOnWindowResize: true,
@@ -13544,7 +13549,7 @@ var ZodArrayEditor = ({
13544
13549
  import { useCallback as useCallback54 } from "react";
13545
13550
 
13546
13551
  // src/components/Checkbox.tsx
13547
- import { useEffect as useEffect44, useMemo as useMemo68, useRef as useRef27 } from "react";
13552
+ import { useEffect as useEffect44, useMemo as useMemo68, useRef as useRef28 } from "react";
13548
13553
  import { jsx as jsx117, jsxs as jsxs56 } from "react/jsx-runtime";
13549
13554
  var size2 = 20;
13550
13555
  var background = {
@@ -13571,7 +13576,7 @@ var box = {
13571
13576
  color: "white"
13572
13577
  };
13573
13578
  var Checkbox = ({ checked, onChange, disabled, name, rounded }) => {
13574
- const ref = useRef27(null);
13579
+ const ref = useRef28(null);
13575
13580
  const input2 = useMemo68(() => {
13576
13581
  return {
13577
13582
  appearance: "none",
@@ -13685,7 +13690,7 @@ var colorWithNewOpacity = (color, opacity, zodTypes) => {
13685
13690
  };
13686
13691
 
13687
13692
  // src/components/NewComposition/InputDragger.tsx
13688
- import React81, { useCallback as useCallback55, useEffect as useEffect45, useMemo as useMemo69, useRef as useRef28, useState as useState47 } from "react";
13693
+ import React81, { useCallback as useCallback55, useEffect as useEffect45, useMemo as useMemo69, useRef as useRef29, useState as useState47 } from "react";
13689
13694
  import { interpolate as interpolate2 } from "remotion";
13690
13695
  import { jsx as jsx119 } from "react/jsx-runtime";
13691
13696
  var isInt = (num) => {
@@ -13707,8 +13712,8 @@ var InputDraggerForwardRefFn = ({
13707
13712
  }, ref) => {
13708
13713
  const [inputFallback, setInputFallback] = useState47(false);
13709
13714
  const [dragging, setDragging] = useState47(false);
13710
- const fallbackRef = useRef28(null);
13711
- const pointerDownRef = useRef28(false);
13715
+ const fallbackRef = useRef29(null);
13716
+ const pointerDownRef = useRef29(false);
13712
13717
  const style8 = useMemo69(() => {
13713
13718
  return {
13714
13719
  ...inputBaseStyle,
@@ -13873,7 +13878,7 @@ import {
13873
13878
  useEffect as useEffect46,
13874
13879
  useImperativeHandle as useImperativeHandle11,
13875
13880
  useMemo as useMemo70,
13876
- useRef as useRef29,
13881
+ useRef as useRef30,
13877
13882
  useState as useState48
13878
13883
  } from "react";
13879
13884
  import { jsx as jsx120 } from "react/jsx-runtime";
@@ -13885,7 +13890,7 @@ var inputBaseStyle3 = {
13885
13890
  var RemInputTypeColorForwardRef = ({ status, ...props }, ref) => {
13886
13891
  const [isFocused, setIsFocused] = useState48(false);
13887
13892
  const [isHovered, setIsHovered] = useState48(false);
13888
- const inputRef = useRef29(null);
13893
+ const inputRef = useRef30(null);
13889
13894
  const { tabIndex } = useZIndex();
13890
13895
  const style8 = useMemo70(() => {
13891
13896
  return {
@@ -18221,7 +18226,7 @@ var OptionsPanel = ({ readOnlyStudio }) => {
18221
18226
  };
18222
18227
 
18223
18228
  // src/components/PreviewToolbar.tsx
18224
- import { useContext as useContext57, useEffect as useEffect60, useRef as useRef32, useState as useState62 } from "react";
18229
+ import { useContext as useContext57, useEffect as useEffect60, useRef as useRef33, useState as useState62 } from "react";
18225
18230
  import { Internals as Internals45 } from "remotion";
18226
18231
 
18227
18232
  // src/state/loop.ts
@@ -18276,7 +18281,7 @@ import {
18276
18281
  useEffect as useEffect55,
18277
18282
  useLayoutEffect,
18278
18283
  useMemo as useMemo93,
18279
- useRef as useRef30,
18284
+ useRef as useRef31,
18280
18285
  useState as useState59
18281
18286
  } from "react";
18282
18287
  import { Internals as Internals38 } from "remotion";
@@ -18297,9 +18302,9 @@ var FpsCounter = ({ playbackSpeed }) => {
18297
18302
  const frame2 = Internals38.Timeline.useTimelinePosition();
18298
18303
  const [marker, rerender] = useState59({});
18299
18304
  const [fps, setFps] = useState59(0);
18300
- const previousUpdates = useRef30([]);
18301
- const fpsRef = useRef30(0);
18302
- const playingRef = useRef30(playing);
18305
+ const previousUpdates = useRef31([]);
18306
+ const fpsRef = useRef31(0);
18307
+ const playingRef = useRef31(playing);
18303
18308
  useLayoutEffect(() => {
18304
18309
  fpsRef.current = 0;
18305
18310
  previousUpdates.current = [];
@@ -19030,7 +19035,7 @@ var PlayPause = ({ playbackRate, loop, bufferStateDelayInMilliseconds }) => {
19030
19035
 
19031
19036
  // src/components/RenderButton.tsx
19032
19037
  import { PlayerInternals as PlayerInternals14 } from "@remotion/player";
19033
- import { useCallback as useCallback90, useContext as useContext55, useMemo as useMemo95, useRef as useRef31, useState as useState61 } from "react";
19038
+ import { useCallback as useCallback90, useContext as useContext55, useMemo as useMemo95, useRef as useRef32, useState as useState61 } from "react";
19034
19039
  import ReactDOM8 from "react-dom";
19035
19040
  import { Internals as Internals43 } from "remotion";
19036
19041
  import { jsx as jsx177, jsxs as jsxs82, Fragment as Fragment23 } from "react/jsx-runtime";
@@ -19104,8 +19109,8 @@ var RenderButton = ({
19104
19109
  const { setSelectedModal } = useContext55(ModalsContext);
19105
19110
  const [preferredRenderType, setPreferredRenderType] = useState61(() => getInitialRenderType(readOnlyStudio));
19106
19111
  const [dropdownOpened, setDropdownOpened] = useState61(false);
19107
- const dropdownRef = useRef31(null);
19108
- const containerRef = useRef31(null);
19112
+ const dropdownRef = useRef32(null);
19113
+ const containerRef = useRef32(null);
19109
19114
  const { currentZIndex } = useZIndex();
19110
19115
  const size4 = PlayerInternals14.useElementSize(dropdownRef, {
19111
19116
  triggerOnWindowResize: true,
@@ -19654,9 +19659,9 @@ var PreviewToolbar = ({ readOnlyStudio, bufferStateDelayInMilliseconds }) => {
19654
19659
  const { setMediaMuted } = useContext57(Internals45.SetMediaVolumeContext);
19655
19660
  const { canvasContent } = useContext57(Internals45.CompositionManager);
19656
19661
  const isVideoComposition = useIsVideoComposition();
19657
- const previewToolbarRef = useRef32(null);
19658
- const leftScrollIndicatorRef = useRef32(null);
19659
- const rightScrollIndicatorRef = useRef32(null);
19662
+ const previewToolbarRef = useRef33(null);
19663
+ const leftScrollIndicatorRef = useRef33(null);
19664
+ const rightScrollIndicatorRef = useRef33(null);
19660
19665
  const isStill = useIsStill();
19661
19666
  const [loop, setLoop] = useState62(loadLoopOption());
19662
19667
  const isFullscreenSupported = checkFullscreenSupport();
@@ -19812,7 +19817,7 @@ var PreviewToolbar = ({ readOnlyStudio, bufferStateDelayInMilliseconds }) => {
19812
19817
  };
19813
19818
 
19814
19819
  // src/components/Splitter/SplitterContainer.tsx
19815
- import { useMemo as useMemo96, useRef as useRef33, useState as useState63 } from "react";
19820
+ import { useMemo as useMemo96, useRef as useRef34, useState as useState63 } from "react";
19816
19821
 
19817
19822
  // src/state/timeline.ts
19818
19823
  var localStorageKey4 = (id) => `remotion.editor.timelineFlex.${id}`;
@@ -19867,8 +19872,8 @@ var containerColumn = {
19867
19872
  var SplitterContainer = ({ orientation, children, defaultFlex, maxFlex, minFlex, id }) => {
19868
19873
  const [initialTimelineFlex, persistFlex] = useTimelineFlex(id);
19869
19874
  const [flexValue, setFlexValue] = useState63(initialTimelineFlex ?? defaultFlex);
19870
- const ref = useRef33(null);
19871
- const isDragging = useRef33(false);
19875
+ const ref = useRef34(null);
19876
+ const isDragging = useRef34(false);
19872
19877
  const value = useMemo96(() => {
19873
19878
  return {
19874
19879
  flexValue,
@@ -19941,7 +19946,7 @@ var SplitterElement = ({ children, type, sticky }) => {
19941
19946
 
19942
19947
  // src/components/Splitter/SplitterHandle.tsx
19943
19948
  import { PlayerInternals as PlayerInternals15 } from "@remotion/player";
19944
- import { useContext as useContext59, useEffect as useEffect61, useRef as useRef34, useState as useState64 } from "react";
19949
+ import { useContext as useContext59, useEffect as useEffect61, useRef as useRef35, useState as useState64 } from "react";
19945
19950
  import { jsx as jsx183 } from "react/jsx-runtime";
19946
19951
  var SPLITTER_HANDLE_SIZE = 3;
19947
19952
  var containerRow2 = {
@@ -19956,7 +19961,7 @@ var SplitterHandle = ({ allowToCollapse, onCollapse }) => {
19956
19961
  throw new Error("Cannot find splitter context");
19957
19962
  }
19958
19963
  const [lastPointerUp, setLastPointerUp] = useState64(() => Date.now());
19959
- const ref = useRef34(null);
19964
+ const ref = useRef35(null);
19960
19965
  useEffect61(() => {
19961
19966
  if (context.isDragging.current) {
19962
19967
  return;
@@ -20117,7 +20122,7 @@ var useResponsiveSidebarStatus = () => {
20117
20122
  }, [sidebarCollapsedStateLeft, responsiveLeftStatus]);
20118
20123
  return actualStateLeft;
20119
20124
  };
20120
- var TopPanel = ({ readOnlyStudio, onMounted, drawRef: drawRef2, bufferStateDelayInMilliseconds }) => {
20125
+ var TopPanelInner = ({ readOnlyStudio, onMounted, drawRef: drawRef2, bufferStateDelayInMilliseconds }) => {
20121
20126
  const { setSidebarCollapsedState, sidebarCollapsedStateRight } = useContext60(SidebarContext);
20122
20127
  const rulersAreVisible = useIsRulerVisible();
20123
20128
  const actualStateLeft = useResponsiveSidebarStatus();
@@ -20223,6 +20228,7 @@ var TopPanel = ({ readOnlyStudio, onMounted, drawRef: drawRef2, bufferStateDelay
20223
20228
  ]
20224
20229
  });
20225
20230
  };
20231
+ var TopPanel = React124.memo(TopPanelInner);
20226
20232
 
20227
20233
  // src/components/SidebarCollapserControls.tsx
20228
20234
  import { jsx as jsx185, jsxs as jsxs87, Fragment as Fragment26 } from "react/jsx-runtime";
@@ -20595,7 +20601,7 @@ var MenuToolbar = ({ readOnlyStudio }) => {
20595
20601
  };
20596
20602
 
20597
20603
  // src/components/Timeline/Timeline.tsx
20598
- import { useContext as useContext75, useMemo as useMemo118 } from "react";
20604
+ import React150, { useContext as useContext75, useMemo as useMemo118 } from "react";
20599
20605
  import { Internals as Internals57 } from "remotion";
20600
20606
 
20601
20607
  // src/helpers/get-sequence-visible-range.ts
@@ -20767,6 +20773,33 @@ var calculateTimeline = ({
20767
20773
  });
20768
20774
  };
20769
20775
 
20776
+ // src/components/ExpandedTracksProvider.tsx
20777
+ import { createContext as createContext21, useCallback as useCallback96, useMemo as useMemo101, useState as useState67 } from "react";
20778
+ import { jsx as jsx188 } from "react/jsx-runtime";
20779
+ var ExpandedTracksContext = createContext21({
20780
+ expandedTracks: {},
20781
+ toggleTrack: () => {
20782
+ throw new Error("ExpandedTracksContext not initialized");
20783
+ }
20784
+ });
20785
+ var ExpandedTracksProvider = ({ children }) => {
20786
+ const [expandedTracks, setExpandedTracks] = useState67({});
20787
+ const toggleTrack = useCallback96((id) => {
20788
+ setExpandedTracks((prev) => ({
20789
+ ...prev,
20790
+ [id]: !prev[id]
20791
+ }));
20792
+ }, []);
20793
+ const value = useMemo101(() => ({
20794
+ expandedTracks,
20795
+ toggleTrack
20796
+ }), [expandedTracks, toggleTrack]);
20797
+ return /* @__PURE__ */ jsx188(ExpandedTracksContext.Provider, {
20798
+ value,
20799
+ children
20800
+ });
20801
+ };
20802
+
20770
20803
  // src/components/Timeline/is-collapsed.ts
20771
20804
  var isTrackHidden = (track) => {
20772
20805
  if (!track.sequence.parent) {
@@ -20806,19 +20839,19 @@ var MaxTimelineTracksReached = () => {
20806
20839
  // src/components/Timeline/TimelineDragHandler.tsx
20807
20840
  import { PlayerInternals as PlayerInternals16 } from "@remotion/player";
20808
20841
  import {
20809
- useCallback as useCallback96,
20842
+ useCallback as useCallback97,
20810
20843
  useContext as useContext65,
20811
20844
  useEffect as useEffect65,
20812
- useMemo as useMemo102,
20813
- useRef as useRef35,
20814
- useState as useState67
20845
+ useMemo as useMemo103,
20846
+ useRef as useRef36,
20847
+ useState as useState68
20815
20848
  } from "react";
20816
20849
  import { Internals as Internals47, useVideoConfig as useVideoConfig4 } from "remotion";
20817
20850
 
20818
20851
  // src/components/Timeline/TimelineInOutPointer.tsx
20819
20852
  import { createRef as createRef10, useContext as useContext63 } from "react";
20820
20853
  import { Internals as Internals46 } from "remotion";
20821
- import { jsx as jsx188, jsxs as jsxs90, Fragment as Fragment27 } from "react/jsx-runtime";
20854
+ import { jsx as jsx189, jsxs as jsxs90, Fragment as Fragment27 } from "react/jsx-runtime";
20822
20855
  var areaHighlight = {
20823
20856
  position: "absolute",
20824
20857
  backgroundColor: "rgba(0, 0, 0, 0.5)",
@@ -20837,7 +20870,7 @@ var TimelineInOutPointer = () => {
20837
20870
  }
20838
20871
  return /* @__PURE__ */ jsxs90(Fragment27, {
20839
20872
  children: [
20840
- inFrame !== null && /* @__PURE__ */ jsx188("div", {
20873
+ inFrame !== null && /* @__PURE__ */ jsx189("div", {
20841
20874
  ref: inMarkerAreaRef,
20842
20875
  style: {
20843
20876
  ...areaHighlight,
@@ -20845,7 +20878,7 @@ var TimelineInOutPointer = () => {
20845
20878
  width: getXPositionOfItemInTimelineImperatively(inFrame, videoConfig.durationInFrames, timelineWidth)
20846
20879
  }
20847
20880
  }),
20848
- outFrame !== null && /* @__PURE__ */ jsx188("div", {
20881
+ outFrame !== null && /* @__PURE__ */ jsx189("div", {
20849
20882
  ref: outMarkerAreaRef,
20850
20883
  style: {
20851
20884
  ...areaHighlight,
@@ -20858,9 +20891,9 @@ var TimelineInOutPointer = () => {
20858
20891
  };
20859
20892
 
20860
20893
  // src/components/Timeline/TimelineInOutPointerHandle.tsx
20861
- import { createRef as createRef11, useContext as useContext64, useMemo as useMemo101 } from "react";
20894
+ import { createRef as createRef11, useContext as useContext64, useMemo as useMemo102 } from "react";
20862
20895
  import { useVideoConfig as useVideoConfig3 } from "remotion";
20863
- import { jsx as jsx189 } from "react/jsx-runtime";
20896
+ import { jsx as jsx190 } from "react/jsx-runtime";
20864
20897
  var line3 = {
20865
20898
  height: "100%",
20866
20899
  width: 1,
@@ -20874,14 +20907,14 @@ var inPointerHandle = createRef11();
20874
20907
  var outPointerHandle = createRef11();
20875
20908
  var InnerTimelineInOutPointerHandle = ({ atFrame, dragging, timelineWidth, type }) => {
20876
20909
  const videoConfig = useVideoConfig3();
20877
- const style10 = useMemo101(() => {
20910
+ const style10 = useMemo102(() => {
20878
20911
  return {
20879
20912
  ...line3,
20880
20913
  backgroundColor: dragging ? LIGHT_TRANSPARENT : "rgba(255, 255, 255, 0.1)",
20881
20914
  transform: `translateX(${getXPositionOfItemInTimelineImperatively(atFrame, videoConfig.durationInFrames, timelineWidth)}px)`
20882
20915
  };
20883
20916
  }, [atFrame, dragging, timelineWidth, videoConfig.durationInFrames]);
20884
- return /* @__PURE__ */ jsx189("div", {
20917
+ return /* @__PURE__ */ jsx190("div", {
20885
20918
  ref: type === "in" ? inPointerHandle : outPointerHandle,
20886
20919
  style: style10
20887
20920
  });
@@ -20895,7 +20928,7 @@ var TimelineInOutPointerHandle = ({
20895
20928
  if (timelineWidth === null) {
20896
20929
  return null;
20897
20930
  }
20898
- return /* @__PURE__ */ jsx189(InnerTimelineInOutPointerHandle, {
20931
+ return /* @__PURE__ */ jsx190(InnerTimelineInOutPointerHandle, {
20899
20932
  atFrame,
20900
20933
  dragging,
20901
20934
  timelineWidth,
@@ -20904,7 +20937,7 @@ var TimelineInOutPointerHandle = ({
20904
20937
  };
20905
20938
 
20906
20939
  // src/components/Timeline/TimelineDragHandler.tsx
20907
- import { jsx as jsx190, jsxs as jsxs91 } from "react/jsx-runtime";
20940
+ import { jsx as jsx191, jsxs as jsxs91 } from "react/jsx-runtime";
20908
20941
  var inner = {
20909
20942
  overflowY: "auto",
20910
20943
  overflowX: "hidden"
@@ -20929,7 +20962,7 @@ var TimelineDragHandler = () => {
20929
20962
  const video = Internals47.useUnsafeVideoConfig();
20930
20963
  const { zoom: zoomMap } = useContext65(TimelineZoomCtx);
20931
20964
  const { canvasContent } = useContext65(Internals47.CompositionManager);
20932
- const containerStyle3 = useMemo102(() => {
20965
+ const containerStyle3 = useMemo103(() => {
20933
20966
  if (!canvasContent || canvasContent.type !== "composition") {
20934
20967
  return {};
20935
20968
  }
@@ -20942,10 +20975,10 @@ var TimelineDragHandler = () => {
20942
20975
  if (!canvasContent || canvasContent.type !== "composition") {
20943
20976
  return null;
20944
20977
  }
20945
- return /* @__PURE__ */ jsx190("div", {
20978
+ return /* @__PURE__ */ jsx191("div", {
20946
20979
  ref: sliderAreaRef,
20947
20980
  style: containerStyle3,
20948
- children: video ? /* @__PURE__ */ jsx190(Inner2, {}) : null
20981
+ children: video ? /* @__PURE__ */ jsx191(Inner2, {}) : null
20949
20982
  });
20950
20983
  };
20951
20984
  var Inner2 = () => {
@@ -20956,11 +20989,11 @@ var Inner2 = () => {
20956
20989
  });
20957
20990
  const { isHighestContext } = useZIndex();
20958
20991
  const setFrame = Internals47.useTimelineSetFrame();
20959
- const [inOutDragging, setInOutDragging] = useState67({
20992
+ const [inOutDragging, setInOutDragging] = useState68({
20960
20993
  dragging: false
20961
20994
  });
20962
20995
  const timelineWidth = useContext65(TimelineWidthContext);
20963
- const get = useCallback96((frame2) => {
20996
+ const get = useCallback97((frame2) => {
20964
20997
  if (timelineWidth === null) {
20965
20998
  throw new Error("timeline width is not yet determined");
20966
20999
  }
@@ -20970,18 +21003,18 @@ var Inner2 = () => {
20970
21003
  const left3 = size4?.left ?? 0;
20971
21004
  const { inFrame, outFrame } = useTimelineInOutFramePosition();
20972
21005
  const { setInAndOutFrames } = useTimelineSetInOutFramePosition();
20973
- const [dragging, setDragging] = useState67({
21006
+ const [dragging, setDragging] = useState68({
20974
21007
  dragging: false
20975
21008
  });
20976
21009
  const { playing, play, pause, seek } = PlayerInternals16.usePlayer();
20977
- const scroller = useRef35(null);
21010
+ const scroller = useRef36(null);
20978
21011
  const stopInterval = () => {
20979
21012
  if (scroller.current) {
20980
21013
  clearInterval(scroller.current);
20981
21014
  scroller.current = null;
20982
21015
  }
20983
21016
  };
20984
- const onPointerDown = useCallback96((e) => {
21017
+ const onPointerDown = useCallback97((e) => {
20985
21018
  if (e.button !== 0) {
20986
21019
  return;
20987
21020
  }
@@ -21047,7 +21080,7 @@ var Inner2 = () => {
21047
21080
  get,
21048
21081
  outFrame
21049
21082
  ]);
21050
- const onPointerMoveScrubbing = useCallback96((e) => {
21083
+ const onPointerMoveScrubbing = useCallback97((e) => {
21051
21084
  if (!videoConfig) {
21052
21085
  return;
21053
21086
  }
@@ -21117,7 +21150,7 @@ var Inner2 = () => {
21117
21150
  seek(frame2);
21118
21151
  }
21119
21152
  }, [videoConfig, dragging.dragging, left3, width, seek]);
21120
- const onPointerMoveInOut = useCallback96((e) => {
21153
+ const onPointerMoveInOut = useCallback97((e) => {
21121
21154
  if (!videoConfig) {
21122
21155
  return;
21123
21156
  }
@@ -21153,7 +21186,7 @@ var Inner2 = () => {
21153
21186
  outMarkerAreaRef.current.style.width = String(width - get(outFrame) - offset) + "px";
21154
21187
  }
21155
21188
  }, [get, inFrame, inOutDragging, outFrame, videoConfig, width]);
21156
- const onPointerUpScrubbing = useCallback96((e) => {
21189
+ const onPointerUpScrubbing = useCallback97((e) => {
21157
21190
  stopInterval();
21158
21191
  document.body.style.userSelect = "";
21159
21192
  document.body.style.webkitUserSelect = "";
@@ -21181,7 +21214,7 @@ var Inner2 = () => {
21181
21214
  play();
21182
21215
  }
21183
21216
  }, [dragging, left3, play, videoConfig, setFrame, width]);
21184
- const onPointerUpInOut = useCallback96((e) => {
21217
+ const onPointerUpInOut = useCallback97((e) => {
21185
21218
  document.body.style.userSelect = "";
21186
21219
  document.body.style.webkitUserSelect = "";
21187
21220
  if (!videoConfig) {
@@ -21267,7 +21300,7 @@ var Inner2 = () => {
21267
21300
  window.removeEventListener("pointerup", onPointerUpInOut);
21268
21301
  };
21269
21302
  }, [inOutDragging.dragging, onPointerMoveInOut, onPointerUpInOut]);
21270
- const inContextMenu = useMemo102(() => {
21303
+ const inContextMenu = useMemo103(() => {
21271
21304
  return [
21272
21305
  {
21273
21306
  id: "hide-in",
@@ -21292,7 +21325,7 @@ var Inner2 = () => {
21292
21325
  }
21293
21326
  ];
21294
21327
  }, [setInAndOutFrames, videoConfig.id]);
21295
- const outContextMenu = useMemo102(() => {
21328
+ const outContextMenu = useMemo103(() => {
21296
21329
  return [
21297
21330
  {
21298
21331
  id: "hide-out",
@@ -21321,21 +21354,21 @@ var Inner2 = () => {
21321
21354
  style: style10,
21322
21355
  onPointerDown,
21323
21356
  children: [
21324
- /* @__PURE__ */ jsx190("div", {
21357
+ /* @__PURE__ */ jsx191("div", {
21325
21358
  style: inner,
21326
21359
  className: VERTICAL_SCROLLBAR_CLASSNAME
21327
21360
  }),
21328
- inFrame !== null && /* @__PURE__ */ jsx190(ContextMenu, {
21361
+ inFrame !== null && /* @__PURE__ */ jsx191(ContextMenu, {
21329
21362
  values: inContextMenu,
21330
- children: /* @__PURE__ */ jsx190(TimelineInOutPointerHandle, {
21363
+ children: /* @__PURE__ */ jsx191(TimelineInOutPointerHandle, {
21331
21364
  type: "in",
21332
21365
  atFrame: inFrame,
21333
21366
  dragging: inOutDragging.dragging === "in"
21334
21367
  })
21335
21368
  }),
21336
- outFrame !== null && /* @__PURE__ */ jsx190(ContextMenu, {
21369
+ outFrame !== null && /* @__PURE__ */ jsx191(ContextMenu, {
21337
21370
  values: outContextMenu,
21338
- children: /* @__PURE__ */ jsx190(TimelineInOutPointerHandle, {
21371
+ children: /* @__PURE__ */ jsx191(TimelineInOutPointerHandle, {
21339
21372
  type: "out",
21340
21373
  dragging: inOutDragging.dragging === "out",
21341
21374
  atFrame: outFrame
@@ -21347,39 +21380,12 @@ var Inner2 = () => {
21347
21380
 
21348
21381
  // src/components/Timeline/TimelineList.tsx
21349
21382
  import { PlayerInternals as PlayerInternals18 } from "@remotion/player";
21350
- import { useRef as useRef39 } from "react";
21383
+ import { useRef as useRef40 } from "react";
21351
21384
 
21352
21385
  // src/components/Timeline/TimelineListItem.tsx
21353
21386
  import { useCallback as useCallback106, useContext as useContext70, useMemo as useMemo111 } from "react";
21354
21387
  import { Internals as Internals51 } from "remotion";
21355
21388
 
21356
- // src/components/ExpandedTracksProvider.tsx
21357
- import { createContext as createContext21, useCallback as useCallback97, useMemo as useMemo103, useState as useState68 } from "react";
21358
- import { jsx as jsx191 } from "react/jsx-runtime";
21359
- var ExpandedTracksContext = createContext21({
21360
- expandedTracks: {},
21361
- toggleTrack: () => {
21362
- throw new Error("ExpandedTracksContext not initialized");
21363
- }
21364
- });
21365
- var ExpandedTracksProvider = ({ children }) => {
21366
- const [expandedTracks, setExpandedTracks] = useState68({});
21367
- const toggleTrack = useCallback97((id) => {
21368
- setExpandedTracks((prev) => ({
21369
- ...prev,
21370
- [id]: !prev[id]
21371
- }));
21372
- }, []);
21373
- const value = useMemo103(() => ({
21374
- expandedTracks,
21375
- toggleTrack
21376
- }), [expandedTracks, toggleTrack]);
21377
- return /* @__PURE__ */ jsx191(ExpandedTracksContext.Provider, {
21378
- value,
21379
- children
21380
- });
21381
- };
21382
-
21383
21389
  // src/components/Timeline/TimelineExpandedSection.tsx
21384
21390
  import React137, { useMemo as useMemo108 } from "react";
21385
21391
 
@@ -22259,7 +22265,7 @@ var useResolvedStack = (stack2) => {
22259
22265
  };
22260
22266
 
22261
22267
  // src/components/Timeline/use-sequence-props-subscription.ts
22262
- import { useCallback as useCallback105, useContext as useContext69, useEffect as useEffect70, useMemo as useMemo110, useRef as useRef36 } from "react";
22268
+ import { useCallback as useCallback105, useContext as useContext69, useEffect as useEffect70, useMemo as useMemo110, useRef as useRef37 } from "react";
22263
22269
  import { Internals as Internals50 } from "remotion";
22264
22270
  var useSequencePropsSubscription = (sequence, originalLocation) => {
22265
22271
  const { setCodeValues } = useContext69(Internals50.VisualModeOverridesContext);
@@ -22287,14 +22293,14 @@ var useSequencePropsSubscription = (sequence, originalLocation) => {
22287
22293
  const locationSource = validatedLocation?.source ?? null;
22288
22294
  const locationLine = validatedLocation?.line ?? null;
22289
22295
  const locationColumn = validatedLocation?.column ?? null;
22290
- const currentLocationSource = useRef36(locationSource);
22296
+ const currentLocationSource = useRef37(locationSource);
22291
22297
  currentLocationSource.current = locationSource;
22292
- const currentLocationLine = useRef36(locationLine);
22298
+ const currentLocationLine = useRef37(locationLine);
22293
22299
  currentLocationLine.current = locationLine;
22294
- const currentLocationColumn = useRef36(locationColumn);
22300
+ const currentLocationColumn = useRef37(locationColumn);
22295
22301
  currentLocationColumn.current = locationColumn;
22296
- const nodePathRef = useRef36(null);
22297
- const isMountedRef = useRef36(true);
22302
+ const nodePathRef = useRef37(null);
22303
+ const isMountedRef = useRef37(true);
22298
22304
  useEffect70(() => {
22299
22305
  isMountedRef.current = true;
22300
22306
  return () => {
@@ -22508,7 +22514,7 @@ var TimelineListItem = ({ nestedDepth, sequence, isCompact }) => {
22508
22514
  };
22509
22515
 
22510
22516
  // src/components/Timeline/TimelineTimeIndicators.tsx
22511
- import { useContext as useContext71, useEffect as useEffect72, useMemo as useMemo112, useRef as useRef38 } from "react";
22517
+ import { useContext as useContext71, useEffect as useEffect72, useMemo as useMemo112, useRef as useRef39 } from "react";
22512
22518
  import { Internals as Internals53 } from "remotion";
22513
22519
 
22514
22520
  // src/components/TimeValue.tsx
@@ -22517,7 +22523,7 @@ import {
22517
22523
  useCallback as useCallback107,
22518
22524
  useEffect as useEffect71,
22519
22525
  useImperativeHandle as useImperativeHandle13,
22520
- useRef as useRef37
22526
+ useRef as useRef38
22521
22527
  } from "react";
22522
22528
  import { Internals as Internals52, useCurrentFrame } from "remotion";
22523
22529
  import { jsx as jsx202, jsxs as jsxs97 } from "react/jsx-runtime";
@@ -22550,7 +22556,7 @@ var TimeValue = () => {
22550
22556
  const isStill = useIsStill();
22551
22557
  const { seek, play, pause, toggle } = PlayerInternals17.usePlayer();
22552
22558
  const keybindings = useKeybinding();
22553
- const ref = useRef37(null);
22559
+ const ref = useRef38(null);
22554
22560
  const onTextChange = useCallback107((newVal) => {
22555
22561
  seek(parseInt(newVal, 10));
22556
22562
  }, [seek]);
@@ -22678,7 +22684,7 @@ var TimelineTimeIndicators = () => {
22678
22684
  });
22679
22685
  };
22680
22686
  var Inner3 = ({ windowWidth, durationInFrames, fps }) => {
22681
- const ref = useRef38(null);
22687
+ const ref = useRef39(null);
22682
22688
  useEffect72(() => {
22683
22689
  const currentRef = ref.current;
22684
22690
  if (!currentRef) {
@@ -22761,7 +22767,7 @@ var container42 = {
22761
22767
  background: BACKGROUND
22762
22768
  };
22763
22769
  var TimelineList = ({ timeline }) => {
22764
- const ref = useRef39(null);
22770
+ const ref = useRef40(null);
22765
22771
  const size4 = PlayerInternals18.useElementSize(ref, {
22766
22772
  shouldApplyCssTransforms: false,
22767
22773
  triggerOnWindowResize: false
@@ -23002,7 +23008,7 @@ var useMaxMediaDuration = (s, fps) => {
23002
23008
 
23003
23009
  // src/components/AudioWaveform.tsx
23004
23010
  import { getAudioData, getWaveformPortion } from "@remotion/media-utils";
23005
- import { useEffect as useEffect75, useMemo as useMemo115, useRef as useRef40, useState as useState75 } from "react";
23011
+ import { useEffect as useEffect75, useMemo as useMemo115, useRef as useRef41, useState as useState75 } from "react";
23006
23012
  import { Internals as Internals55 } from "remotion";
23007
23013
 
23008
23014
  // src/components/AudioWaveformBar.tsx
@@ -23061,12 +23067,12 @@ var AudioWaveform = ({
23061
23067
  }) => {
23062
23068
  const [metadata, setMetadata] = useState75(null);
23063
23069
  const [error, setError] = useState75(null);
23064
- const mountState = useRef40({ isMounted: true });
23070
+ const mountState = useRef41({ isMounted: true });
23065
23071
  const vidConf = Internals55.useUnsafeVideoConfig();
23066
23072
  if (vidConf === null) {
23067
23073
  throw new Error("Expected video config");
23068
23074
  }
23069
- const canvas = useRef40(null);
23075
+ const canvas = useRef41(null);
23070
23076
  useEffect75(() => {
23071
23077
  const { current } = mountState;
23072
23078
  current.isMounted = true;
@@ -23277,7 +23283,7 @@ var TimelineSequenceFrame = ({ roundedFrame, premounted, postmounted }) => {
23277
23283
  };
23278
23284
 
23279
23285
  // src/components/Timeline/TimelineVideoInfo.tsx
23280
- import { useEffect as useEffect76, useRef as useRef41, useState as useState76 } from "react";
23286
+ import { useEffect as useEffect76, useRef as useRef42, useState as useState76 } from "react";
23281
23287
  import { useVideoConfig as useVideoConfig5 } from "remotion";
23282
23288
 
23283
23289
  // src/helpers/extract-frames.ts
@@ -23613,9 +23619,9 @@ var TimelineVideoInfo = ({
23613
23619
  playbackRate
23614
23620
  }) => {
23615
23621
  const { fps } = useVideoConfig5();
23616
- const ref = useRef41(null);
23622
+ const ref = useRef42(null);
23617
23623
  const [error, setError] = useState76(null);
23618
- const aspectRatio = useRef41(getAspectRatioFromCache(src));
23624
+ const aspectRatio = useRef42(getAspectRatioFromCache(src));
23619
23625
  useEffect76(() => {
23620
23626
  return () => {
23621
23627
  clearFramesForSrc(src);
@@ -23968,8 +23974,11 @@ var container45 = {
23968
23974
  var noop3 = () => {
23969
23975
  return;
23970
23976
  };
23971
- var Timeline = () => {
23977
+ var TimelineInner = () => {
23972
23978
  const { sequences } = useContext75(Internals57.SequenceManager);
23979
+ const { expandedTracks } = useContext75(ExpandedTracksContext);
23980
+ const { previewServerState } = useContext75(StudioServerConnectionCtx);
23981
+ const visualModeEnabled = Boolean(process.env.EXPERIMENTAL_VISUAL_MODE_ENABLED) && previewServerState.type === "connected";
23973
23982
  const videoConfig = Internals57.useUnsafeVideoConfig();
23974
23983
  const timeline = useMemo118(() => {
23975
23984
  if (!videoConfig) {
@@ -23993,14 +24002,15 @@ var Timeline = () => {
23993
24002
  const inner2 = useMemo118(() => {
23994
24003
  return {
23995
24004
  height: shown.reduce((acc, track) => {
23996
- return acc + getTimelineLayerHeight(track.sequence.type === "video" ? "video" : "other") + Number(TIMELINE_ITEM_BORDER_BOTTOM);
24005
+ const isExpanded = visualModeEnabled && (expandedTracks[track.sequence.id] ?? false);
24006
+ return acc + getTimelineLayerHeight(track.sequence.type === "video" ? "video" : "other") + Number(TIMELINE_ITEM_BORDER_BOTTOM) + (isExpanded ? getExpandedTrackHeight(track.sequence.controls) + TIMELINE_ITEM_BORDER_BOTTOM : 0);
23997
24007
  }, 0) + TIMELINE_ITEM_BORDER_BOTTOM + (hasBeenCut ? MAX_TIMELINE_TRACKS_NOTICE_HEIGHT : 0) + TIMELINE_TIME_INDICATOR_HEIGHT,
23998
24008
  display: "flex",
23999
24009
  flex: 1,
24000
24010
  minHeight: "100%",
24001
24011
  overflowX: "hidden"
24002
24012
  };
24003
- }, [hasBeenCut, shown]);
24013
+ }, [hasBeenCut, shown, expandedTracks, visualModeEnabled]);
24004
24014
  return /* @__PURE__ */ jsx214("div", {
24005
24015
  ref: timelineVerticalScroll,
24006
24016
  style: container45,
@@ -24049,6 +24059,7 @@ var Timeline = () => {
24049
24059
  })
24050
24060
  });
24051
24061
  };
24062
+ var Timeline = React150.memo(TimelineInner);
24052
24063
 
24053
24064
  // src/components/Timeline/TimelineEmptyState.tsx
24054
24065
  import { jsx as jsx215 } from "react/jsx-runtime";
@@ -25563,7 +25574,7 @@ import {
25563
25574
  useContext as useContext86,
25564
25575
  useEffect as useEffect82,
25565
25576
  useMemo as useMemo126,
25566
- useRef as useRef43,
25577
+ useRef as useRef44,
25567
25578
  useState as useState82
25568
25579
  } from "react";
25569
25580
  import { Internals as Internals64 } from "remotion";
@@ -26436,7 +26447,7 @@ var QuickSwitcherNoResults = ({ query, mode }) => {
26436
26447
  };
26437
26448
 
26438
26449
  // src/components/QuickSwitcher/QuickSwitcherResult.tsx
26439
- import { useEffect as useEffect81, useMemo as useMemo125, useRef as useRef42, useState as useState81 } from "react";
26450
+ import { useEffect as useEffect81, useMemo as useMemo125, useRef as useRef43, useState as useState81 } from "react";
26440
26451
  import { jsx as jsx233, jsxs as jsxs118, Fragment as Fragment35 } from "react/jsx-runtime";
26441
26452
  var container51 = {
26442
26453
  paddingLeft: 16,
@@ -26466,7 +26477,7 @@ var labelContainer = {
26466
26477
  };
26467
26478
  var QuickSwitcherResult = ({ result, selected }) => {
26468
26479
  const [hovered, setIsHovered] = useState81(false);
26469
- const ref = useRef42(null);
26480
+ const ref = useRef43(null);
26470
26481
  const keybindings = useKeybinding();
26471
26482
  useEffect81(() => {
26472
26483
  const { current } = ref;
@@ -26644,7 +26655,7 @@ var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }
26644
26655
  selectedIndex: 0
26645
26656
  });
26646
26657
  }, [initialMode, invocationTimestamp]);
26647
- const inputRef = useRef43(null);
26658
+ const inputRef = useRef44(null);
26648
26659
  const selectComposition = useSelectComposition();
26649
26660
  const closeMenu = useCallback116(() => {
26650
26661
  return;
@@ -27420,7 +27431,7 @@ import {
27420
27431
  useEffect as useEffect85,
27421
27432
  useMemo as useMemo137,
27422
27433
  useReducer as useReducer2,
27423
- useRef as useRef45,
27434
+ useRef as useRef46,
27424
27435
  useState as useState88
27425
27436
  } from "react";
27426
27437
 
@@ -29409,12 +29420,12 @@ import { BrowserSafeApis as BrowserSafeApis7 } from "@remotion/renderer/client";
29409
29420
  import { useCallback as useCallback128, useMemo as useMemo132 } from "react";
29410
29421
 
29411
29422
  // src/helpers/use-file-existence.ts
29412
- import { useContext as useContext88, useEffect as useEffect84, useRef as useRef44, useState as useState87 } from "react";
29423
+ import { useContext as useContext88, useEffect as useEffect84, useRef as useRef45, useState as useState87 } from "react";
29413
29424
  var useFileExistence = (outName) => {
29414
29425
  const [exists, setExists] = useState87(false);
29415
29426
  const { previewServerState: state, subscribeToEvent } = useContext88(StudioServerConnectionCtx);
29416
29427
  const clientId = state.type === "connected" ? state.clientId : undefined;
29417
- const currentOutName = useRef44("");
29428
+ const currentOutName = useRef45("");
29418
29429
  currentOutName.current = outName;
29419
29430
  useEffect84(() => {
29420
29431
  if (!clientId) {
@@ -30804,7 +30815,7 @@ var RenderModal = ({
30804
30815
  resolved: { result: resolvedComposition },
30805
30816
  unresolved: unresolvedComposition
30806
30817
  } = context;
30807
- const isMounted = useRef45(true);
30818
+ const isMounted = useRef46(true);
30808
30819
  const [isVideo] = useState88(() => {
30809
30820
  return typeof resolvedComposition.durationInFrames === "undefined" ? true : resolvedComposition.durationInFrames > 1;
30810
30821
  });
@@ -31947,9 +31958,9 @@ import {
31947
31958
  getEncodableAudioCodecs,
31948
31959
  getSupportedAudioCodecsForContainer
31949
31960
  } from "@remotion/web-renderer";
31950
- import { useEffect as useEffect86, useRef as useRef46, useState as useState89 } from "react";
31961
+ import { useEffect as useEffect86, useRef as useRef47, useState as useState89 } from "react";
31951
31962
  var useEncodableAudioCodecs = (container62) => {
31952
- const cacheRef = useRef46({});
31963
+ const cacheRef = useRef47({});
31953
31964
  const [codecsByContainer, setCodecsByContainer] = useState89(() => {
31954
31965
  return {
31955
31966
  [container62]: getSupportedAudioCodecsForContainer(container62)
@@ -31989,9 +32000,9 @@ import {
31989
32000
  getEncodableVideoCodecs,
31990
32001
  getSupportedVideoCodecsForContainer
31991
32002
  } from "@remotion/web-renderer";
31992
- import { useEffect as useEffect87, useRef as useRef47, useState as useState90 } from "react";
32003
+ import { useEffect as useEffect87, useRef as useRef48, useState as useState90 } from "react";
31993
32004
  var useEncodableVideoCodecs = (container62) => {
31994
- const cacheRef = useRef47({});
32005
+ const cacheRef = useRef48({});
31995
32006
  const [codecsByContainer, setCodecsByContainer] = useState90(() => {
31996
32007
  return {
31997
32008
  [container62]: getSupportedVideoCodecsForContainer(container62)
@@ -34372,15 +34383,15 @@ var SetTimelineInOutProvider = ({ children }) => {
34372
34383
  };
34373
34384
 
34374
34385
  // src/components/ShowGuidesProvider.tsx
34375
- import { useCallback as useCallback147, useMemo as useMemo151, useRef as useRef48, useState as useState100 } from "react";
34386
+ import { useCallback as useCallback147, useMemo as useMemo151, useRef as useRef49, useState as useState100 } from "react";
34376
34387
  import { jsx as jsx292 } from "react/jsx-runtime";
34377
34388
  var ShowGuidesProvider = ({ children }) => {
34378
34389
  const [guidesList, setGuidesList] = useState100(() => loadGuidesList());
34379
34390
  const [selectedGuideId, setSelectedGuideId] = useState100(null);
34380
34391
  const [hoveredGuideId, setHoveredGuideId] = useState100(null);
34381
34392
  const [editorShowGuides, setEditorShowGuidesState] = useState100(() => loadEditorShowGuidesOption());
34382
- const shouldCreateGuideRef = useRef48(false);
34383
- const shouldDeleteGuideRef = useRef48(false);
34393
+ const shouldCreateGuideRef = useRef49(false);
34394
+ const shouldDeleteGuideRef = useRef49(false);
34384
34395
  const setEditorShowGuides = useCallback147((newValue) => {
34385
34396
  setEditorShowGuidesState((prevState) => {
34386
34397
  const newVal = newValue(prevState);