@remotion/studio 4.0.155 → 4.0.159

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.
@@ -9,12 +9,12 @@ var __require = ((x) => typeof require !== "undefined" ? require : typeof Proxy
9
9
  // src/Studio.tsx
10
10
  import {useLayoutEffect as useLayoutEffect2} from "react";
11
11
  import {createPortal} from "react-dom";
12
- import {Internals as Internals58} from "remotion";
12
+ import {Internals as Internals59} from "remotion";
13
13
 
14
14
  // src/components/Editor.tsx
15
15
  import {PlayerInternals as PlayerInternals16} from "@remotion/player";
16
- import React161, {useCallback as useCallback118, useEffect as useEffect70, useMemo as useMemo117} from "react";
17
- import {Internals as Internals54} from "remotion";
16
+ import React161, {useCallback as useCallback118, useEffect as useEffect71, useMemo as useMemo117} from "react";
17
+ import {Internals as Internals55} from "remotion";
18
18
 
19
19
  // src/helpers/colors.ts
20
20
  var BACKGROUND = "rgb(31,36,40)";
@@ -857,7 +857,7 @@ var useZIndex = () => {
857
857
 
858
858
  // src/components/EditorContent.tsx
859
859
  import {useContext as useContext61} from "react";
860
- import {Internals as Internals48} from "remotion";
860
+ import {Internals as Internals49} from "remotion";
861
861
 
862
862
  // src/helpers/is-current-selected-still.ts
863
863
  import {useContext as useContext5} from "react";
@@ -7043,10 +7043,10 @@ var MenuBuildIndicator = () => {
7043
7043
  };
7044
7044
 
7045
7045
  // src/components/SidebarCollapserControls.tsx
7046
- import {useCallback as useCallback80, useContext as useContext50, useEffect as useEffect53} from "react";
7046
+ import {useCallback as useCallback80, useContext as useContext50, useEffect as useEffect54} from "react";
7047
7047
 
7048
7048
  // src/components/TopPanel.tsx
7049
- import {useCallback as useCallback79, useContext as useContext49, useEffect as useEffect52, useMemo as useMemo85} from "react";
7049
+ import {useCallback as useCallback79, useContext as useContext49, useEffect as useEffect53, useMemo as useMemo85} from "react";
7050
7050
 
7051
7051
  // src/helpers/use-breakpoint.ts
7052
7052
  import {useEffect as useEffect24, useState as useState28} from "react";
@@ -9976,11 +9976,12 @@ import {
9976
9976
  createRef as createRef8,
9977
9977
  useCallback as useCallback70,
9978
9978
  useContext as useContext39,
9979
+ useEffect as useEffect45,
9979
9980
  useImperativeHandle as useImperativeHandle11,
9980
9981
  useMemo as useMemo79,
9981
9982
  useState as useState46
9982
9983
  } from "react";
9983
- import {Internals as Internals31} from "remotion";
9984
+ import {Internals as Internals32} from "remotion";
9984
9985
 
9985
9986
  // src/components/RenderModal/DataEditor.tsx
9986
9987
  import React85, {
@@ -9990,7 +9991,7 @@ useEffect as useEffect42,
9990
9991
  useMemo as useMemo70,
9991
9992
  useState as useState44
9992
9993
  } from "react";
9993
- import {Internals as Internals27, getInputProps} from "remotion";
9994
+ import {Internals as Internals28, getInputProps} from "remotion";
9994
9995
  import {NoReactInternals as NoReactInternals10} from "remotion/no-react";
9995
9996
 
9996
9997
  // src/components/NewComposition/ValidationMessage.tsx
@@ -10450,10 +10451,7 @@ var RenderModalJSONPropsEditor = ({
10450
10451
 
10451
10452
  // src/components/RenderModal/SchemaEditor/SchemaEditor.tsx
10452
10453
  import {useCallback as useCallback58, useEffect as useEffect41, useMemo as useMemo68, useState as useState43} from "react";
10453
-
10454
- // src/api/update-default-props.ts
10455
- import {Internals as Internals26} from "remotion";
10456
- var PROPS_UPDATED_EXTERNALLY = "remotion.propsUpdatedExternally";
10454
+ import {Internals as Internals27} from "remotion";
10457
10455
 
10458
10456
  // src/components/RenderModal/SchemaEditor/SchemaErrorMessages.tsx
10459
10457
  import {
@@ -11656,6 +11654,7 @@ useMemo as useMemo59,
11656
11654
  useRef as useRef23,
11657
11655
  useState as useState39
11658
11656
  } from "react";
11657
+ import {Internals as Internals26} from "remotion";
11659
11658
  import {
11660
11659
  jsx as jsx104
11661
11660
  } from "react/jsx-runtime";
@@ -11679,35 +11678,33 @@ var useLocalState = ({
11679
11678
  }
11680
11679
  };
11681
11680
  });
11682
- const localValue = useMemo59(() => {
11683
- if (localValueOrNull === null) {
11681
+ const localUnsavedValue = useMemo59(() => {
11682
+ if (localValueOrNull[parentRevision] === null) {
11684
11683
  return {
11685
- [parentRevision]: {
11686
- value: unsavedValue,
11687
- keyStabilityRevision: 0,
11688
- zodValidation: schema.safeParse(unsavedValue)
11689
- }
11684
+ value: unsavedValue,
11685
+ keyStabilityRevision: 0,
11686
+ zodValidation: schema.safeParse(unsavedValue)
11690
11687
  };
11691
11688
  }
11692
- return localValueOrNull;
11689
+ return localValueOrNull[parentRevision];
11693
11690
  }, [localValueOrNull, parentRevision, schema, unsavedValue]);
11694
11691
  useEffect39(() => {
11695
11692
  const checkFile = () => {
11696
11693
  setResetRevision((old) => old + 1);
11697
- setLocalValue(null);
11694
+ setLocalValue({});
11698
11695
  };
11699
- window.addEventListener(PROPS_UPDATED_EXTERNALLY, checkFile);
11696
+ window.addEventListener(Internals26.PROPS_UPDATED_EXTERNALLY, checkFile);
11700
11697
  return () => {
11701
- window.removeEventListener(PROPS_UPDATED_EXTERNALLY, checkFile);
11698
+ window.removeEventListener(Internals26.PROPS_UPDATED_EXTERNALLY, checkFile);
11702
11699
  };
11703
11700
  }, []);
11704
11701
  const currentLocalValue = useMemo59(() => {
11705
- return localValue[parentRevision] ?? {
11702
+ return localUnsavedValue ?? {
11706
11703
  value: savedValue,
11707
11704
  keyStabilityRevision: 0,
11708
11705
  zodValidation: schema.safeParse(savedValue)
11709
11706
  };
11710
- }, [savedValue, localValue, parentRevision, schema]);
11707
+ }, [localUnsavedValue, savedValue, schema]);
11711
11708
  const stateRef = useRef23(currentLocalValue);
11712
11709
  stateRef.current = currentLocalValue;
11713
11710
  const onChange = useCallback46((updater, forceApply, increment) => {
@@ -11728,13 +11725,13 @@ var useLocalState = ({
11728
11725
  };
11729
11726
  stateRef.current = newState;
11730
11727
  return {
11731
- ...localValue,
11728
+ ...localUnsavedValue,
11732
11729
  [parentRevision]: newState
11733
11730
  };
11734
11731
  });
11735
11732
  }, [
11736
11733
  currentLocalValue.keyStabilityRevision,
11737
- localValue,
11734
+ localUnsavedValue,
11738
11735
  parentRevision,
11739
11736
  schema,
11740
11737
  setValue
@@ -13801,9 +13798,9 @@ var SchemaEditor = ({
13801
13798
  const bumpRevision = () => {
13802
13799
  setRevision((old) => old + 1);
13803
13800
  };
13804
- window.addEventListener(PROPS_UPDATED_EXTERNALLY, bumpRevision);
13801
+ window.addEventListener(Internals27.PROPS_UPDATED_EXTERNALLY, bumpRevision);
13805
13802
  return () => {
13806
- window.removeEventListener(PROPS_UPDATED_EXTERNALLY, bumpRevision);
13803
+ window.removeEventListener(Internals27.PROPS_UPDATED_EXTERNALLY, bumpRevision);
13807
13804
  };
13808
13805
  }, []);
13809
13806
  const z = useZodIfPossible();
@@ -14196,6 +14193,7 @@ var DataEditor = ({
14196
14193
  }) => {
14197
14194
  const [mode, setMode] = useState44("schema");
14198
14195
  const [showWarning, setShowWarningWithoutPersistance] = useState44(() => getPersistedShowWarningState());
14196
+ const { updateCompositionDefaultProps } = useContext31(Internals28.CompositionManager);
14199
14197
  const inJSONEditor = mode === "json";
14200
14198
  const serializedJSON = useMemo70(() => {
14201
14199
  if (!inJSONEditor) {
@@ -14248,7 +14246,7 @@ var DataEditor = ({
14248
14246
  return canSaveDefaultPropsObjectState[unresolvedComposition.id] ? canSaveDefaultPropsObjectState[unresolvedComposition.id] : defaultTypeCanSaveState;
14249
14247
  }, [canSaveDefaultPropsObjectState, unresolvedComposition.id]);
14250
14248
  const showSaveButton = mayShowSaveButton && canSaveDefaultProps.canUpdate;
14251
- const { fastRefreshes } = useContext31(Internals27.NonceContext);
14249
+ const { fastRefreshes } = useContext31(Internals28.NonceContext);
14252
14250
  const checkIfCanSaveDefaultProps = useCallback60(async () => {
14253
14251
  try {
14254
14252
  const can = await canUpdateDefaultProps(unresolvedComposition.id, readOnlyStudio);
@@ -14321,30 +14319,33 @@ var DataEditor = ({
14321
14319
  }
14322
14320
  });
14323
14321
  }, [unresolvedComposition.id, defaultProps, schema, z]);
14324
- useEffect42(() => {
14325
- setSaving(false);
14326
- }, [fastRefreshes, setSaving]);
14327
14322
  const onSave = useCallback60((updater) => {
14328
14323
  if (schema === "no-zod" || schema === "no-schema" || z === null) {
14329
14324
  showNotification("Cannot update default props: No Zod schema", 2000);
14330
14325
  return;
14331
14326
  }
14327
+ window.remotion_ignoreFastRefreshUpdate = fastRefreshes + 1;
14332
14328
  setSaving(true);
14333
- callUpdateDefaultPropsApi(unresolvedComposition.id, updater(unresolvedComposition.defaultProps ?? {}), extractEnumJsonPaths(schema, z, [])).then((response) => {
14329
+ const newDefaultProps = updater(unresolvedComposition.defaultProps ?? {});
14330
+ callUpdateDefaultPropsApi(unresolvedComposition.id, newDefaultProps, extractEnumJsonPaths(schema, z, [])).then((response) => {
14334
14331
  if (!response.success) {
14335
14332
  console.log(response.stack);
14336
14333
  showNotification(`Cannot update default props: ${response.reason}. See console for more information.`, 2000);
14337
14334
  }
14335
+ updateCompositionDefaultProps(unresolvedComposition.id, newDefaultProps);
14338
14336
  }).catch((err) => {
14339
14337
  showNotification(`Cannot update default props: ${err.message}`, 2000);
14338
+ }).finally(() => {
14340
14339
  setSaving(false);
14341
14340
  });
14342
14341
  }, [
14343
14342
  schema,
14344
14343
  z,
14344
+ fastRefreshes,
14345
14345
  setSaving,
14346
+ unresolvedComposition.defaultProps,
14346
14347
  unresolvedComposition.id,
14347
- unresolvedComposition.defaultProps
14348
+ updateCompositionDefaultProps
14348
14349
  ]);
14349
14350
  const connectionStatus = previewServerState.type;
14350
14351
  const warnings = useMemo70(() => {
@@ -14466,7 +14467,7 @@ var DataEditor = ({
14466
14467
 
14467
14468
  // src/components/RenderQueue/index.tsx
14468
14469
  import React95, {useContext as useContext37, useEffect as useEffect44, useMemo as useMemo77} from "react";
14469
- import {Internals as Internals29} from "remotion";
14470
+ import {Internals as Internals30} from "remotion";
14470
14471
 
14471
14472
  // src/components/RenderQueue/RenderQueueItem.tsx
14472
14473
  import {
@@ -14476,7 +14477,7 @@ useEffect as useEffect43,
14476
14477
  useMemo as useMemo76,
14477
14478
  useState as useState45
14478
14479
  } from "react";
14479
- import {Internals as Internals28} from "remotion";
14480
+ import {Internals as Internals29} from "remotion";
14480
14481
 
14481
14482
  // src/components/RenderQueue/RenderQueueCopyToClipboard.tsx
14482
14483
  import {useCallback as useCallback61} from "react";
@@ -15063,7 +15064,7 @@ var subtitle2 = {
15063
15064
  var SELECTED_CLASSNAME = "__remotion_selected_classname";
15064
15065
  var RenderQueueItem = ({ job, selected }) => {
15065
15066
  const [hovered, setHovered] = useState45(false);
15066
- const { setCanvasContent } = useContext36(Internals28.CompositionManager);
15067
+ const { setCanvasContent } = useContext36(Internals29.CompositionManager);
15067
15068
  const onPointerEnter = useCallback69(() => {
15068
15069
  setHovered(true);
15069
15070
  }, []);
@@ -15195,7 +15196,7 @@ var renderQueue = {
15195
15196
  var RenderQueue = () => {
15196
15197
  const connectionStatus = useContext37(StudioServerConnectionCtx).previewServerState.type;
15197
15198
  const { jobs } = useContext37(RenderQueueContext);
15198
- const { canvasContent } = useContext37(Internals29.CompositionManager);
15199
+ const { canvasContent } = useContext37(Internals30.CompositionManager);
15199
15200
  const previousJobCount = React95.useRef(jobs.length);
15200
15201
  const jobCount = jobs.length;
15201
15202
  const divRef = React95.useRef(null);
@@ -15275,7 +15276,7 @@ var RenderQueue = () => {
15275
15276
 
15276
15277
  // src/components/RendersTab.tsx
15277
15278
  import {useContext as useContext38, useMemo as useMemo78} from "react";
15278
- import {Internals as Internals30} from "remotion";
15279
+ import {Internals as Internals31} from "remotion";
15279
15280
  import {
15280
15281
  jsx as jsx141,
15281
15282
  jsxs as jsxs68,
@@ -15300,7 +15301,7 @@ var badge = {
15300
15301
  };
15301
15302
  var RendersTab = ({ selected, onClick }) => {
15302
15303
  const { jobs } = useContext38(RenderQueueContext);
15303
- const { canvasContent } = useContext38(Internals30.CompositionManager);
15304
+ const { canvasContent } = useContext38(Internals31.CompositionManager);
15304
15305
  const failedJobs = jobs.filter((j) => j.status === "failed").length;
15305
15306
  const jobCount = jobs.length;
15306
15307
  const isActuallySelected = useMemo78(() => {
@@ -15369,7 +15370,7 @@ var persistSelectedOptionsSidebarPanel2 = (panel) => {
15369
15370
  };
15370
15371
  var optionsSidebarTabs = createRef8();
15371
15372
  var OptionsPanel = ({ readOnlyStudio }) => {
15372
- const { props, updateProps } = useContext39(Internals31.EditorPropsContext);
15373
+ const { props, updateProps, resetUnsaved } = useContext39(Internals32.EditorPropsContext);
15373
15374
  const [saving, setSaving] = useState46(false);
15374
15375
  const isMobileLayout = useMobileLayout();
15375
15376
  const container29 = useMemo79(() => ({
@@ -15397,7 +15398,7 @@ var OptionsPanel = ({ readOnlyStudio }) => {
15397
15398
  }
15398
15399
  };
15399
15400
  }, []);
15400
- const { compositions, canvasContent } = useContext39(Internals31.CompositionManager);
15401
+ const { compositions, canvasContent } = useContext39(Internals32.CompositionManager);
15401
15402
  const circleStyle = useMemo79(() => {
15402
15403
  const onTabColor = saving ? LIGHT_TEXT : "white";
15403
15404
  return {
@@ -15442,6 +15443,15 @@ var OptionsPanel = ({ readOnlyStudio }) => {
15442
15443
  }
15443
15444
  return !deepEqual(composition.defaultProps, currentDefaultProps);
15444
15445
  }, [currentDefaultProps, composition]);
15446
+ const reset = useCallback70(() => {
15447
+ resetUnsaved();
15448
+ }, [resetUnsaved]);
15449
+ useEffect45(() => {
15450
+ window.addEventListener(Internals32.PROPS_UPDATED_EXTERNALLY, reset);
15451
+ return () => {
15452
+ window.removeEventListener(Internals32.PROPS_UPDATED_EXTERNALLY, reset);
15453
+ };
15454
+ }, [reset]);
15445
15455
  return jsxs69("div", {
15446
15456
  style: container29,
15447
15457
  className: "css-reset",
@@ -15485,7 +15495,7 @@ var OptionsPanel = ({ readOnlyStudio }) => {
15485
15495
 
15486
15496
  // src/components/PreviewToolbar.tsx
15487
15497
  import {useContext as useContext46, useState as useState49} from "react";
15488
- import {Internals as Internals39} from "remotion";
15498
+ import {Internals as Internals40} from "remotion";
15489
15499
 
15490
15500
  // src/state/loop.ts
15491
15501
  var key = "remotion.loop";
@@ -15538,13 +15548,13 @@ var CheckboardToggle = () => {
15538
15548
 
15539
15549
  // src/components/FpsCounter.tsx
15540
15550
  import {
15541
- useEffect as useEffect45,
15551
+ useEffect as useEffect46,
15542
15552
  useLayoutEffect,
15543
15553
  useMemo as useMemo80,
15544
15554
  useRef as useRef25,
15545
15555
  useState as useState47
15546
15556
  } from "react";
15547
- import {Internals as Internals32} from "remotion";
15557
+ import {Internals as Internals33} from "remotion";
15548
15558
  import {
15549
15559
  jsxs as jsxs70
15550
15560
  } from "react/jsx-runtime";
@@ -15558,9 +15568,9 @@ var pushWithMaxSize = (arr, value, maxSize) => {
15558
15568
  return arr.slice(-maxSize);
15559
15569
  };
15560
15570
  var FpsCounter = ({ playbackSpeed }) => {
15561
- const videoConfig = Internals32.useUnsafeVideoConfig();
15562
- const [playing] = Internals32.Timeline.usePlayingState();
15563
- const frame2 = Internals32.Timeline.useTimelinePosition();
15571
+ const videoConfig = Internals33.useUnsafeVideoConfig();
15572
+ const [playing] = Internals33.Timeline.usePlayingState();
15573
+ const frame2 = Internals33.Timeline.useTimelinePosition();
15564
15574
  const [marker, rerender] = useState47({});
15565
15575
  const [fps, setFps] = useState47(0);
15566
15576
  const previousUpdates = useRef25([]);
@@ -15583,7 +15593,7 @@ var FpsCounter = ({ playbackSpeed }) => {
15583
15593
  if (previousUpdates.current.length === 2)
15584
15594
  setFps(fpsRef.current);
15585
15595
  }, [frame2]);
15586
- useEffect45(() => {
15596
+ useEffect46(() => {
15587
15597
  if (playing) {
15588
15598
  const t = setTimeout(() => {
15589
15599
  rerender({});
@@ -15621,8 +15631,8 @@ var FpsCounter = ({ playbackSpeed }) => {
15621
15631
  };
15622
15632
 
15623
15633
  // src/components/FullscreenToggle.tsx
15624
- import {useCallback as useCallback72, useContext as useContext41, useEffect as useEffect46} from "react";
15625
- import {Internals as Internals33} from "remotion";
15634
+ import {useCallback as useCallback72, useContext as useContext41, useEffect as useEffect47} from "react";
15635
+ import {Internals as Internals34} from "remotion";
15626
15636
  import {NoReactInternals as NoReactInternals13} from "remotion/no-react";
15627
15637
  import {
15628
15638
  jsx as jsx144
@@ -15633,7 +15643,7 @@ var accessibilityLabel3 = [
15633
15643
  ].filter(NoReactInternals13.truthy).join(" ");
15634
15644
  var FullScreenToggle = () => {
15635
15645
  const keybindings2 = useKeybinding();
15636
- const { setSize } = useContext41(Internals33.PreviewSizeContext);
15646
+ const { setSize } = useContext41(Internals34.PreviewSizeContext);
15637
15647
  const onClick = useCallback72(() => {
15638
15648
  drawRef.current?.requestFullscreen();
15639
15649
  if (document.fullscreenElement)
@@ -15645,7 +15655,7 @@ var FullScreenToggle = () => {
15645
15655
  }
15646
15656
  }));
15647
15657
  }, [setSize]);
15648
- useEffect46(() => {
15658
+ useEffect47(() => {
15649
15659
  const f = keybindings2.registerKeybinding({
15650
15660
  event: "keydown",
15651
15661
  key: "f",
@@ -15765,8 +15775,8 @@ var MuteToggle = ({ muted, setMuted }) => {
15765
15775
 
15766
15776
  // src/components/PlayPause.tsx
15767
15777
  import {PlayerInternals as PlayerInternals11} from "@remotion/player";
15768
- import {useCallback as useCallback75, useEffect as useEffect47, useState as useState48} from "react";
15769
- import {Internals as Internals34} from "remotion";
15778
+ import {useCallback as useCallback75, useEffect as useEffect48, useState as useState48} from "react";
15779
+ import {Internals as Internals35} from "remotion";
15770
15780
 
15771
15781
  // src/icons/jump-to-start.tsx
15772
15782
  import {
@@ -15875,7 +15885,7 @@ var iconButton = {
15875
15885
  };
15876
15886
  var PlayPause = ({ playbackRate, loop: loop2, bufferStateDelayInMilliseconds }) => {
15877
15887
  const { inFrame, outFrame } = useTimelineInOutFramePosition();
15878
- const videoConfig = Internals34.useUnsafeVideoConfig();
15888
+ const videoConfig = Internals35.useUnsafeVideoConfig();
15879
15889
  const [showBufferIndicator, setShowBufferState] = useState48(false);
15880
15890
  const {
15881
15891
  playing,
@@ -15899,7 +15909,7 @@ var PlayPause = ({ playbackRate, loop: loop2, bufferStateDelayInMilliseconds })
15899
15909
  frameRef: remotionInternal_currentFrameRef
15900
15910
  });
15901
15911
  const isStill = useIsStill();
15902
- useEffect47(() => {
15912
+ useEffect48(() => {
15903
15913
  if (isStill) {
15904
15914
  pause2();
15905
15915
  }
@@ -15981,7 +15991,7 @@ var PlayPause = ({ playbackRate, loop: loop2, bufferStateDelayInMilliseconds })
15981
15991
  seek(outFrame ?? getCurrentDuration() - 1);
15982
15992
  }, [seek, outFrame]);
15983
15993
  const keybindings2 = useKeybinding();
15984
- useEffect47(() => {
15994
+ useEffect48(() => {
15985
15995
  const arrowLeft = keybindings2.registerKeybinding({
15986
15996
  event: "keydown",
15987
15997
  key: "ArrowLeft",
@@ -16053,7 +16063,7 @@ var PlayPause = ({ playbackRate, loop: loop2, bufferStateDelayInMilliseconds })
16053
16063
  onEnter,
16054
16064
  onSpace
16055
16065
  ]);
16056
- useEffect47(() => {
16066
+ useEffect48(() => {
16057
16067
  let timeout = null;
16058
16068
  let stopped = false;
16059
16069
  const onBuffer = () => {
@@ -16135,7 +16145,7 @@ var PlayPause = ({ playbackRate, loop: loop2, bufferStateDelayInMilliseconds })
16135
16145
 
16136
16146
  // src/components/PlaybackKeyboardShortcutsManager.tsx
16137
16147
  import {PlayerInternals as PlayerInternals12} from "@remotion/player";
16138
- import {useCallback as useCallback76, useEffect as useEffect48} from "react";
16148
+ import {useCallback as useCallback76, useEffect as useEffect49} from "react";
16139
16149
  var PlaybackKeyboardShortcutsManager = ({ setPlaybackRate }) => {
16140
16150
  const keybindings2 = useKeybinding();
16141
16151
  const { play: play2, pause: pause2, playing } = PlayerInternals12.usePlayer();
@@ -16173,7 +16183,7 @@ var PlaybackKeyboardShortcutsManager = ({ setPlaybackRate }) => {
16173
16183
  });
16174
16184
  play2();
16175
16185
  }, [play2, playing, setPlaybackRate]);
16176
- useEffect48(() => {
16186
+ useEffect49(() => {
16177
16187
  const jKey = keybindings2.registerKeybinding({
16178
16188
  event: "keydown",
16179
16189
  key: "j",
@@ -16211,8 +16221,8 @@ var PlaybackKeyboardShortcutsManager = ({ setPlaybackRate }) => {
16211
16221
  };
16212
16222
 
16213
16223
  // src/components/PlaybackRatePersistor.tsx
16214
- import {useContext as useContext42, useEffect as useEffect49} from "react";
16215
- import {Internals as Internals35} from "remotion";
16224
+ import {useContext as useContext42, useEffect as useEffect50} from "react";
16225
+ import {Internals as Internals36} from "remotion";
16216
16226
 
16217
16227
  // src/state/playbackrate.ts
16218
16228
  var key3 = "remotion.playbackrate";
@@ -16232,11 +16242,11 @@ var loadPlaybackRate = () => {
16232
16242
 
16233
16243
  // src/components/PlaybackRatePersistor.tsx
16234
16244
  var PlaybackRatePersistor = () => {
16235
- const { setPlaybackRate, playbackRate } = useContext42(Internals35.Timeline.TimelineContext);
16236
- useEffect49(() => {
16245
+ const { setPlaybackRate, playbackRate } = useContext42(Internals36.Timeline.TimelineContext);
16246
+ useEffect50(() => {
16237
16247
  setPlaybackRate(loadPlaybackRate());
16238
16248
  }, [setPlaybackRate]);
16239
- useEffect49(() => {
16249
+ useEffect50(() => {
16240
16250
  persistPlaybackRate(playbackRate);
16241
16251
  }, [playbackRate]);
16242
16252
  return null;
@@ -16244,7 +16254,7 @@ var PlaybackRatePersistor = () => {
16244
16254
 
16245
16255
  // src/components/PlaybackRateSelector.tsx
16246
16256
  import {useContext as useContext43, useMemo as useMemo81} from "react";
16247
- import {Internals as Internals36} from "remotion";
16257
+ import {Internals as Internals37} from "remotion";
16248
16258
  import {
16249
16259
  jsx as jsx154
16250
16260
  } from "react/jsx-runtime";
@@ -16267,7 +16277,7 @@ var getPlaybackRateLabel = (playbackRate) => {
16267
16277
  var accessibilityLabel5 = "Change the playback rate";
16268
16278
  var comboStyle2 = { width: 80 };
16269
16279
  var PlaybackRateSelector = ({ playbackRate, setPlaybackRate }) => {
16270
- const { canvasContent } = useContext43(Internals36.CompositionManager);
16280
+ const { canvasContent } = useContext43(Internals37.CompositionManager);
16271
16281
  const isStill = useIsStill();
16272
16282
  const style9 = useMemo81(() => {
16273
16283
  return {
@@ -16317,7 +16327,7 @@ var PlaybackRateSelector = ({ playbackRate, setPlaybackRate }) => {
16317
16327
 
16318
16328
  // src/components/RenderButton.tsx
16319
16329
  import {useCallback as useCallback77, useContext as useContext44, useMemo as useMemo82} from "react";
16320
- import {Internals as Internals37, useCurrentFrame as useCurrentFrame2} from "remotion";
16330
+ import {Internals as Internals38, useCurrentFrame as useCurrentFrame2} from "remotion";
16321
16331
  import {
16322
16332
  jsx as jsx155,
16323
16333
  jsxs as jsxs72
@@ -16345,9 +16355,9 @@ var RenderButton = () => {
16345
16355
  }
16346
16356
  };
16347
16357
  }, []);
16348
- const video2 = Internals37.useVideo();
16358
+ const video2 = Internals38.useVideo();
16349
16359
  const frame2 = useCurrentFrame2();
16350
- const { props } = useContext44(Internals37.EditorPropsContext);
16360
+ const { props } = useContext44(Internals38.EditorPropsContext);
16351
16361
  const onClick = useCallback77(() => {
16352
16362
  if (!video2) {
16353
16363
  return null;
@@ -16429,7 +16439,7 @@ var RenderButton = () => {
16429
16439
 
16430
16440
  // src/components/Timeline/TimelineZoomControls.tsx
16431
16441
  import {useCallback as useCallback78, useContext as useContext45} from "react";
16432
- import {Internals as Internals38} from "remotion";
16442
+ import {Internals as Internals39} from "remotion";
16433
16443
 
16434
16444
  // src/icons/minus.tsx
16435
16445
  import {
@@ -16466,7 +16476,7 @@ var iconStyle4 = {
16466
16476
  width: 14
16467
16477
  };
16468
16478
  var TimelineZoomControls = () => {
16469
- const { canvasContent } = useContext45(Internals38.CompositionManager);
16479
+ const { canvasContent } = useContext45(Internals39.CompositionManager);
16470
16480
  const { setZoom, zoom: zoomMap } = useContext45(TimelineZoomCtx);
16471
16481
  const { tabIndex } = useZIndex();
16472
16482
  const onMinusClicked = useCallback78(() => {
@@ -16567,9 +16577,9 @@ var padding = {
16567
16577
  width: TIMELINE_PADDING
16568
16578
  };
16569
16579
  var PreviewToolbar = ({ readOnlyStudio, bufferStateDelayInMilliseconds }) => {
16570
- const { playbackRate, setPlaybackRate } = useContext46(Internals39.Timeline.TimelineContext);
16571
- const { mediaMuted } = useContext46(Internals39.MediaVolumeContext);
16572
- const { setMediaMuted } = useContext46(Internals39.SetMediaVolumeContext);
16580
+ const { playbackRate, setPlaybackRate } = useContext46(Internals40.Timeline.TimelineContext);
16581
+ const { mediaMuted } = useContext46(Internals40.MediaVolumeContext);
16582
+ const { setMediaMuted } = useContext46(Internals40.SetMediaVolumeContext);
16573
16583
  const isVideoComposition = useIsVideoComposition();
16574
16584
  const isStill = useIsStill();
16575
16585
  const [loop3, setLoop] = useState49(loadLoopOption());
@@ -16654,7 +16664,7 @@ var PreviewToolbar = ({ readOnlyStudio, bufferStateDelayInMilliseconds }) => {
16654
16664
  };
16655
16665
 
16656
16666
  // src/components/Splitter/SplitterContainer.tsx
16657
- import {useEffect as useEffect50, useMemo as useMemo83, useRef as useRef26, useState as useState50} from "react";
16667
+ import {useEffect as useEffect51, useMemo as useMemo83, useRef as useRef26, useState as useState50} from "react";
16658
16668
 
16659
16669
  // src/state/timeline.ts
16660
16670
  var localStorageKey4 = (id) => `remotion.editor.timelineFlex.${id}`;
@@ -16719,7 +16729,7 @@ var SplitterContainer = ({ orientation, children, defaultFlex, maxFlex, minFlex,
16719
16729
  setDomRect(entries[0].contentRect);
16720
16730
  });
16721
16731
  });
16722
- useEffect50(() => {
16732
+ useEffect51(() => {
16723
16733
  const { current } = ref;
16724
16734
  if (!current) {
16725
16735
  return;
@@ -16727,7 +16737,7 @@ var SplitterContainer = ({ orientation, children, defaultFlex, maxFlex, minFlex,
16727
16737
  resizeObserver.observe(current);
16728
16738
  return () => resizeObserver.unobserve(current);
16729
16739
  }, [resizeObserver]);
16730
- useEffect50(() => {
16740
+ useEffect51(() => {
16731
16741
  setDomRect(ref.current?.getBoundingClientRect() ?? null);
16732
16742
  }, []);
16733
16743
  const value = useMemo83(() => {
@@ -16806,7 +16816,7 @@ var SplitterElement = ({ children, type, sticky }) => {
16806
16816
 
16807
16817
  // src/components/Splitter/SplitterHandle.tsx
16808
16818
  import {PlayerInternals as PlayerInternals13} from "@remotion/player";
16809
- import {useContext as useContext48, useEffect as useEffect51, useRef as useRef27, useState as useState51} from "react";
16819
+ import {useContext as useContext48, useEffect as useEffect52, useRef as useRef27, useState as useState51} from "react";
16810
16820
  import {
16811
16821
  jsx as jsx161
16812
16822
  } from "react/jsx-runtime";
@@ -16826,7 +16836,7 @@ var SplitterHandle = ({ allowToCollapse, onCollapse }) => {
16826
16836
  }
16827
16837
  const [lastPointerUp, setLastPointerUp] = useState51(() => Date.now());
16828
16838
  const ref = useRef27(null);
16829
- useEffect51(() => {
16839
+ useEffect52(() => {
16830
16840
  if (context5.isDragging.current) {
16831
16841
  return;
16832
16842
  }
@@ -16978,7 +16988,7 @@ var TopPanel = ({
16978
16988
  return "expanded";
16979
16989
  }, [sidebarCollapsedStateRight]);
16980
16990
  const hasSize = size4 !== null;
16981
- useEffect52(() => {
16991
+ useEffect53(() => {
16982
16992
  onMounted();
16983
16993
  }, [hasSize, onMounted]);
16984
16994
  const canvasContainerStyle = useMemo85(() => ({
@@ -17154,7 +17164,7 @@ var SidebarCollapserControls = () => {
17154
17164
  toggleLeft,
17155
17165
  toggleRight
17156
17166
  ]);
17157
- useEffect53(() => {
17167
+ useEffect54(() => {
17158
17168
  const left3 = keybindings2.registerKeybinding({
17159
17169
  event: "keydown",
17160
17170
  key: "b",
@@ -17232,7 +17242,7 @@ var SidebarCollapserControls = () => {
17232
17242
  import {
17233
17243
  useCallback as useCallback81,
17234
17244
  useContext as useContext51,
17235
- useEffect as useEffect54,
17245
+ useEffect as useEffect55,
17236
17246
  useMemo as useMemo86,
17237
17247
  useState as useState52
17238
17248
  } from "react";
@@ -17286,7 +17296,7 @@ var UpdateCheck = () => {
17286
17296
  });
17287
17297
  return controller;
17288
17298
  }, []);
17289
- useEffect54(() => {
17299
+ useEffect55(() => {
17290
17300
  const abortUpdate = checkForUpdates();
17291
17301
  const abortBugs = checkForBugs();
17292
17302
  return () => {
@@ -17458,7 +17468,7 @@ var MenuToolbar = ({ readOnlyStudio }) => {
17458
17468
 
17459
17469
  // src/components/Timeline/Timeline.tsx
17460
17470
  import {useContext as useContext60, useMemo as useMemo98} from "react";
17461
- import {Internals as Internals47} from "remotion";
17471
+ import {Internals as Internals48} from "remotion";
17462
17472
 
17463
17473
  // src/helpers/get-sequence-visible-range.ts
17464
17474
  var getCascadedStart = (sequence, sequences) => {
@@ -17655,16 +17665,16 @@ import {PlayerInternals as PlayerInternals14} from "@remotion/player";
17655
17665
  import {
17656
17666
  useCallback as useCallback83,
17657
17667
  useContext as useContext54,
17658
- useEffect as useEffect55,
17668
+ useEffect as useEffect56,
17659
17669
  useMemo as useMemo89,
17660
17670
  useRef as useRef28,
17661
17671
  useState as useState54
17662
17672
  } from "react";
17663
- import {Internals as Internals41, useVideoConfig as useVideoConfig4} from "remotion";
17673
+ import {Internals as Internals42, useVideoConfig as useVideoConfig4} from "remotion";
17664
17674
 
17665
17675
  // src/components/Timeline/TimelineInOutPointer.tsx
17666
17676
  import {createRef as createRef9, useContext as useContext52} from "react";
17667
- import {Internals as Internals40} from "remotion";
17677
+ import {Internals as Internals41} from "remotion";
17668
17678
  import {
17669
17679
  jsx as jsx166,
17670
17680
  jsxs as jsxs80,
@@ -17681,7 +17691,7 @@ var inMarkerAreaRef = createRef9();
17681
17691
  var outMarkerAreaRef = createRef9();
17682
17692
  var TimelineInOutPointer = () => {
17683
17693
  const { inFrame, outFrame } = useTimelineInOutFramePosition();
17684
- const videoConfig = Internals40.useUnsafeVideoConfig();
17694
+ const videoConfig = Internals41.useUnsafeVideoConfig();
17685
17695
  const timelineWidth = useContext52(TimelineWidthContext);
17686
17696
  if (!videoConfig || timelineWidth === null) {
17687
17697
  return null;
@@ -17779,9 +17789,9 @@ var getClientXWithScroll = (x) => {
17779
17789
  return x + scrollableRef.current?.scrollLeft;
17780
17790
  };
17781
17791
  var TimelineDragHandler = () => {
17782
- const video2 = Internals41.useUnsafeVideoConfig();
17792
+ const video2 = Internals42.useUnsafeVideoConfig();
17783
17793
  const { zoom: zoomMap } = useContext54(TimelineZoomCtx);
17784
- const { canvasContent } = useContext54(Internals41.CompositionManager);
17794
+ const { canvasContent } = useContext54(Internals42.CompositionManager);
17785
17795
  const containerStyle2 = useMemo89(() => {
17786
17796
  if (!canvasContent || canvasContent.type !== "composition") {
17787
17797
  return {};
@@ -17808,7 +17818,7 @@ var Inner2 = () => {
17808
17818
  shouldApplyCssTransforms: true
17809
17819
  });
17810
17820
  const { isHighestContext } = useZIndex();
17811
- const setFrame = Internals41.useTimelineSetFrame();
17821
+ const setFrame = Internals42.useTimelineSetFrame();
17812
17822
  const [inOutDragging, setInOutDragging] = useState54({
17813
17823
  dragging: false
17814
17824
  });
@@ -18023,7 +18033,7 @@ var Inner2 = () => {
18023
18033
  });
18024
18034
  setFrame((c) => {
18025
18035
  const newObj = { ...c, [videoConfig.id]: frame2 };
18026
- Internals41.persistCurrentFrame(newObj);
18036
+ Internals42.persistCurrentFrame(newObj);
18027
18037
  return newObj;
18028
18038
  });
18029
18039
  if (dragging.wasPlaying) {
@@ -18092,7 +18102,7 @@ var Inner2 = () => {
18092
18102
  videoConfig,
18093
18103
  width
18094
18104
  ]);
18095
- useEffect55(() => {
18105
+ useEffect56(() => {
18096
18106
  if (!dragging.dragging) {
18097
18107
  return;
18098
18108
  }
@@ -18103,7 +18113,7 @@ var Inner2 = () => {
18103
18113
  window.removeEventListener("pointerup", onPointerUpScrubbing);
18104
18114
  };
18105
18115
  }, [dragging.dragging, onPointerMoveScrubbing, onPointerUpScrubbing]);
18106
- useEffect55(() => {
18116
+ useEffect56(() => {
18107
18117
  if (inOutDragging.dragging === false) {
18108
18118
  return;
18109
18119
  }
@@ -18198,7 +18208,7 @@ import {useRef as useRef30} from "react";
18198
18208
 
18199
18209
  // src/components/Timeline/TimelineListItem.tsx
18200
18210
  import {useCallback as useCallback86, useContext as useContext56, useMemo as useMemo91} from "react";
18201
- import {Internals as Internals42} from "remotion";
18211
+ import {Internals as Internals43} from "remotion";
18202
18212
 
18203
18213
  // src/components/Timeline/TimelineLayerEye.tsx
18204
18214
  import {useCallback as useCallback84} from "react";
@@ -18280,7 +18290,7 @@ import {SOURCE_MAP_ENDPOINT} from "@remotion/studio-shared";
18280
18290
  import {
18281
18291
  useCallback as useCallback85,
18282
18292
  useContext as useContext55,
18283
- useEffect as useEffect56,
18293
+ useEffect as useEffect57,
18284
18294
  useMemo as useMemo90,
18285
18295
  useState as useState55
18286
18296
  } from "react";
@@ -18460,7 +18470,7 @@ var TimelineStack = ({ isCompact, sequence }) => {
18460
18470
  window.open(getGitRefUrl(window.remotion_gitSource, originalLocation), "_blank");
18461
18471
  }
18462
18472
  }, [canOpenInEditor, canOpenInGitHub, openEditor, originalLocation]);
18463
- useEffect56(() => {
18473
+ useEffect57(() => {
18464
18474
  if (!sequence.stack) {
18465
18475
  return;
18466
18476
  }
@@ -18567,7 +18577,7 @@ var space = {
18567
18577
  flexShrink: 0
18568
18578
  };
18569
18579
  var TimelineListItem = ({ nestedDepth, sequence, isCompact }) => {
18570
- const { hidden, setHidden } = useContext56(Internals42.SequenceVisibilityToggleContext);
18580
+ const { hidden, setHidden } = useContext56(Internals43.SequenceVisibilityToggleContext);
18571
18581
  const padder = useMemo91(() => {
18572
18582
  return {
18573
18583
  width: Number(SPACING * 1.5) * nestedDepth,
@@ -18608,8 +18618,8 @@ var TimelineListItem = ({ nestedDepth, sequence, isCompact }) => {
18608
18618
  };
18609
18619
 
18610
18620
  // src/components/Timeline/TimelineTimeIndicators.tsx
18611
- import {useContext as useContext57, useEffect as useEffect57, useMemo as useMemo92, useRef as useRef29} from "react";
18612
- import {Internals as Internals43} from "remotion";
18621
+ import {useContext as useContext57, useEffect as useEffect58, useMemo as useMemo92, useRef as useRef29} from "react";
18622
+ import {Internals as Internals44} from "remotion";
18613
18623
  import {
18614
18624
  jsx as jsx172
18615
18625
  } from "react/jsx-runtime";
@@ -18663,7 +18673,7 @@ var TimelineTimePadding = () => {
18663
18673
  };
18664
18674
  var TimelineTimeIndicators = () => {
18665
18675
  const sliderTrack = useContext57(TimelineWidthContext);
18666
- const video2 = Internals43.useVideo();
18676
+ const video2 = Internals44.useVideo();
18667
18677
  if (sliderTrack === null) {
18668
18678
  return null;
18669
18679
  }
@@ -18678,7 +18688,7 @@ var TimelineTimeIndicators = () => {
18678
18688
  };
18679
18689
  var Inner3 = ({ windowWidth, durationInFrames, fps }) => {
18680
18690
  const ref = useRef29(null);
18681
- useEffect57(() => {
18691
+ useEffect58(() => {
18682
18692
  const currentRef = ref.current;
18683
18693
  if (!currentRef) {
18684
18694
  return;
@@ -18788,14 +18798,14 @@ var TimelineList = ({ timeline: timeline2 }) => {
18788
18798
  };
18789
18799
 
18790
18800
  // src/components/Timeline/TimelinePlayCursorSyncer.tsx
18791
- import {useContext as useContext58, useEffect as useEffect58} from "react";
18792
- import {Internals as Internals44} from "remotion";
18801
+ import {useContext as useContext58, useEffect as useEffect59} from "react";
18802
+ import {Internals as Internals45} from "remotion";
18793
18803
  var lastTimelinePositionWhileScrolling = null;
18794
18804
  var TimelinePlayCursorSyncer = () => {
18795
- const video2 = Internals44.useVideo();
18796
- const timelineContext = useContext58(Internals44.Timeline.TimelineContext);
18797
- const timelinePosition = Internals44.Timeline.useTimelinePosition();
18798
- const { canvasContent } = useContext58(Internals44.CompositionManager);
18805
+ const video2 = Internals45.useVideo();
18806
+ const timelineContext = useContext58(Internals45.Timeline.TimelineContext);
18807
+ const timelinePosition = Internals45.Timeline.useTimelinePosition();
18808
+ const { canvasContent } = useContext58(Internals45.CompositionManager);
18799
18809
  const { zoom: zoomMap } = useContext58(TimelineZoomCtx);
18800
18810
  const compositionId = canvasContent && canvasContent.type === "composition" ? canvasContent.compositionId : null;
18801
18811
  const zoom = compositionId ? zoomMap[compositionId] ?? TIMELINE_MIN_ZOOM : null;
@@ -18806,7 +18816,7 @@ var TimelinePlayCursorSyncer = () => {
18806
18816
  setCurrentFps(video2.fps);
18807
18817
  }
18808
18818
  const playing = timelineContext.playing ?? false;
18809
- useEffect58(() => {
18819
+ useEffect59(() => {
18810
18820
  if (!video2) {
18811
18821
  return;
18812
18822
  }
@@ -18819,7 +18829,7 @@ var TimelinePlayCursorSyncer = () => {
18819
18829
  frame: timelinePosition
18820
18830
  });
18821
18831
  }, [playing, timelineContext, timelinePosition, video2]);
18822
- useEffect58(() => {
18832
+ useEffect59(() => {
18823
18833
  const { current } = scrollableRef;
18824
18834
  if (!current) {
18825
18835
  return;
@@ -18888,7 +18898,7 @@ import {useMemo as useMemo97} from "react";
18888
18898
 
18889
18899
  // src/components/Timeline/TimelineSequence.tsx
18890
18900
  import {useContext as useContext59, useMemo as useMemo96, useState as useState58} from "react";
18891
- import {Internals as Internals46, useCurrentFrame as useCurrentFrame3} from "remotion";
18901
+ import {Internals as Internals47, useCurrentFrame as useCurrentFrame3} from "remotion";
18892
18902
 
18893
18903
  // src/helpers/get-timeline-sequence-layout.ts
18894
18904
  var SEQUENCE_BORDER_WIDTH = 1;
@@ -18949,8 +18959,8 @@ var getTimelineSequenceLayout = ({
18949
18959
 
18950
18960
  // src/components/AudioWaveform.tsx
18951
18961
  import {getAudioData, getWaveformPortion} from "@remotion/media-utils";
18952
- import {useEffect as useEffect59, useMemo as useMemo95, useRef as useRef31, useState as useState56} from "react";
18953
- import {Internals as Internals45} from "remotion";
18962
+ import {useEffect as useEffect60, useMemo as useMemo95, useRef as useRef31, useState as useState56} from "react";
18963
+ import {Internals as Internals46} from "remotion";
18954
18964
 
18955
18965
  // src/components/AudioWaveformBar.tsx
18956
18966
  import {useMemo as useMemo94} from "react";
@@ -19015,19 +19025,19 @@ var AudioWaveform = ({
19015
19025
  const [metadata, setMetadata] = useState56(null);
19016
19026
  const [error, setError] = useState56(null);
19017
19027
  const mountState = useRef31({ isMounted: true });
19018
- const vidConf = Internals45.useUnsafeVideoConfig();
19028
+ const vidConf = Internals46.useUnsafeVideoConfig();
19019
19029
  if (vidConf === null) {
19020
19030
  throw new Error("Expected video config");
19021
19031
  }
19022
19032
  const canvas = useRef31(null);
19023
- useEffect59(() => {
19033
+ useEffect60(() => {
19024
19034
  const { current } = mountState;
19025
19035
  current.isMounted = true;
19026
19036
  return () => {
19027
19037
  current.isMounted = false;
19028
19038
  };
19029
19039
  }, []);
19030
- useEffect59(() => {
19040
+ useEffect60(() => {
19031
19041
  if (!canvas.current) {
19032
19042
  return;
19033
19043
  }
@@ -19054,7 +19064,7 @@ var AudioWaveform = ({
19054
19064
  context5.strokeStyle = LIGHT_TRANSPARENT;
19055
19065
  context5.stroke();
19056
19066
  }, [visualizationWidth, metadata, startFrom, volume, doesVolumeChange]);
19057
- useEffect59(() => {
19067
+ useEffect60(() => {
19058
19068
  setError(null);
19059
19069
  getAudioData(src).then((data) => {
19060
19070
  if (mountState.current.isMounted) {
@@ -19232,7 +19242,7 @@ var TimelineSequenceFrame = ({ roundedFrame, premounted }) => {
19232
19242
 
19233
19243
  // src/components/Timeline/TimelineVideoInfo.tsx
19234
19244
  import {getVideoMetadata as getVideoMetadata2} from "@remotion/media-utils";
19235
- import {useEffect as useEffect60, useRef as useRef32, useState as useState57} from "react";
19245
+ import {useEffect as useEffect61, useRef as useRef32, useState as useState57} from "react";
19236
19246
  import {
19237
19247
  jsx as jsx180
19238
19248
  } from "react/jsx-runtime";
@@ -19258,14 +19268,14 @@ var pathStyle = {
19258
19268
  var TimelineVideoInfo = ({ src }) => {
19259
19269
  const mountState = useRef32({ isMounted: true });
19260
19270
  const [videoMetadata, setVideoMetadata] = useState57(null);
19261
- useEffect60(() => {
19271
+ useEffect61(() => {
19262
19272
  getVideoMetadata2(src).then((data) => {
19263
19273
  setVideoMetadata(data);
19264
19274
  }).catch((err) => {
19265
19275
  console.log("Could not get video metadata", err);
19266
19276
  });
19267
19277
  }, [src]);
19268
- useEffect60(() => {
19278
+ useEffect61(() => {
19269
19279
  const { current } = mountState;
19270
19280
  current.isMounted = true;
19271
19281
  return () => {
@@ -19309,7 +19319,7 @@ var TimelineSequence = ({ s }) => {
19309
19319
  };
19310
19320
  var Inner4 = ({ s, windowWidth }) => {
19311
19321
  const [maxMediaDuration, setMaxMediaDuration] = useState58(Infinity);
19312
- const video2 = Internals46.useVideo();
19322
+ const video2 = Internals47.useVideo();
19313
19323
  if (!video2) {
19314
19324
  throw new TypeError("Expected video config");
19315
19325
  }
@@ -19470,8 +19480,8 @@ var noop6 = () => {
19470
19480
  return;
19471
19481
  };
19472
19482
  var Timeline = () => {
19473
- const { sequences } = useContext60(Internals47.SequenceManager);
19474
- const videoConfig = Internals47.useUnsafeVideoConfig();
19483
+ const { sequences } = useContext60(Internals48.SequenceManager);
19484
+ const videoConfig = Internals48.useUnsafeVideoConfig();
19475
19485
  const timeline2 = useMemo98(() => {
19476
19486
  if (!videoConfig) {
19477
19487
  return [];
@@ -19571,7 +19581,7 @@ var EditorContent = ({
19571
19581
  bufferStateDelayInMilliseconds
19572
19582
  }) => {
19573
19583
  const isStill = useIsStill();
19574
- const { canvasContent } = useContext61(Internals48.CompositionManager);
19584
+ const { canvasContent } = useContext61(Internals49.CompositionManager);
19575
19585
  const onlyTopPanel = canvasContent === null || isStill || canvasContent.type !== "composition";
19576
19586
  return jsxs91("div", {
19577
19587
  style: container40,
@@ -19623,12 +19633,12 @@ var EditorContent = ({
19623
19633
  };
19624
19634
 
19625
19635
  // src/components/GlobalKeybindings.tsx
19626
- import {useContext as useContext62, useEffect as useEffect61} from "react";
19636
+ import {useContext as useContext62, useEffect as useEffect62} from "react";
19627
19637
  var GlobalKeybindings = () => {
19628
19638
  const keybindings2 = useKeybinding();
19629
19639
  const { setSelectedModal } = useContext62(ModalsContext);
19630
19640
  const { setCheckerboard } = useContext62(CheckerboardContext);
19631
- useEffect61(() => {
19641
+ useEffect62(() => {
19632
19642
  const nKey = keybindings2.registerKeybinding({
19633
19643
  event: "keypress",
19634
19644
  key: "n",
@@ -19741,8 +19751,8 @@ var NewCompHeader = ({ title: title4 }) => {
19741
19751
  };
19742
19752
 
19743
19753
  // src/components/RenderModal/ResolveCompositionBeforeModal.tsx
19744
- import React131, {useContext as useContext64, useEffect as useEffect62, useMemo as useMemo99} from "react";
19745
- import {Internals as Internals49} from "remotion";
19754
+ import React131, {useContext as useContext64, useEffect as useEffect63, useMemo as useMemo99} from "react";
19755
+ import {Internals as Internals50} from "remotion";
19746
19756
  import {
19747
19757
  jsx as jsx186,
19748
19758
  jsxs as jsxs93
@@ -19765,11 +19775,11 @@ var loaderLabel2 = {
19765
19775
  };
19766
19776
  var ResolvedCompositionContext = React131.createContext(null);
19767
19777
  var ResolveCompositionBeforeModal = ({ compositionId, children }) => {
19768
- const resolved = Internals49.useResolvedVideoConfig(compositionId);
19769
- const unresolvedContext = useContext64(Internals49.CompositionManager);
19778
+ const resolved = Internals50.useResolvedVideoConfig(compositionId);
19779
+ const unresolvedContext = useContext64(Internals50.CompositionManager);
19770
19780
  const unresolved = unresolvedContext.compositions.find((c) => compositionId === c.id);
19771
- useEffect62(() => {
19772
- const { current } = Internals49.resolveCompositionsRef;
19781
+ useEffect63(() => {
19782
+ const { current } = Internals50.resolveCompositionsRef;
19773
19783
  if (!current) {
19774
19784
  throw new Error("No ref to trigger composition calc");
19775
19785
  }
@@ -19826,7 +19836,7 @@ var ResolveCompositionBeforeModal = ({ compositionId, children }) => {
19826
19836
  };
19827
19837
 
19828
19838
  // src/components/NewComposition/CodemodFooter.tsx
19829
- import {useCallback as useCallback88, useContext as useContext65, useEffect as useEffect63, useState as useState59} from "react";
19839
+ import {useCallback as useCallback88, useContext as useContext65, useEffect as useEffect64, useState as useState59} from "react";
19830
19840
 
19831
19841
  // src/components/NewComposition/DiffPreview.tsx
19832
19842
  import {
@@ -19901,7 +19911,7 @@ var CodemodFooter = ({
19901
19911
  type: "loading"
19902
19912
  });
19903
19913
  const [projectInfo, setProjectInfo] = useState59(null);
19904
- useEffect63(() => {
19914
+ useEffect64(() => {
19905
19915
  const controller = new AbortController;
19906
19916
  getProjectInfo(controller.signal).then((info) => {
19907
19917
  setProjectInfo(info.projectInfo);
@@ -19947,7 +19957,7 @@ var CodemodFooter = ({
19947
19957
  });
19948
19958
  }
19949
19959
  }, [codemod]);
19950
- useEffect63(() => {
19960
+ useEffect64(() => {
19951
19961
  const abortController = new AbortController;
19952
19962
  let aborted = false;
19953
19963
  getCanApplyCodemod(abortController.signal).then(() => {
@@ -19965,7 +19975,7 @@ var CodemodFooter = ({
19965
19975
  }, [codemodStatus, getCanApplyCodemod, setSelectedModal]);
19966
19976
  const disabled = !valid || submitting || projectInfo === null || codemodStatus.type !== "success";
19967
19977
  const { registerKeybinding } = useKeybinding();
19968
- useEffect63(() => {
19978
+ useEffect64(() => {
19969
19979
  if (disabled) {
19970
19980
  return;
19971
19981
  }
@@ -20165,13 +20175,13 @@ var DeleteComposition = ({ compositionId }) => {
20165
20175
 
20166
20176
  // src/components/NewComposition/DuplicateComposition.tsx
20167
20177
  import {useCallback as useCallback92, useContext as useContext68, useMemo as useMemo101, useState as useState60} from "react";
20168
- import {Internals as Internals51} from "remotion";
20178
+ import {Internals as Internals52} from "remotion";
20169
20179
 
20170
20180
  // src/helpers/validate-new-comp-data.ts
20171
- import {Internals as Internals50} from "remotion";
20181
+ import {Internals as Internals51} from "remotion";
20172
20182
  var validateCompositionName = (compName, compositions) => {
20173
- if (!Internals50.isCompositionIdValid(compName)) {
20174
- return Internals50.invalidCompositionErrorMessage;
20183
+ if (!Internals51.isCompositionIdValid(compName)) {
20184
+ return Internals51.invalidCompositionErrorMessage;
20175
20185
  }
20176
20186
  if (compositions.find((c) => c.id === compName)) {
20177
20187
  return `A composition with that name already exists.`;
@@ -20288,7 +20298,7 @@ var DuplicateCompositionLoaded = ({ initialType }) => {
20288
20298
  const hadFpsDefined = unresolved.fps !== undefined;
20289
20299
  const hadDurationDefined = unresolved.durationInFrames !== undefined;
20290
20300
  const [selectedFrameRate, setFrameRate] = useState60(resolved.result.fps);
20291
- const { compositions } = useContext68(Internals51.CompositionManager);
20301
+ const { compositions } = useContext68(Internals52.CompositionManager);
20292
20302
  const [type, setType] = useState60(initialCompType);
20293
20303
  const [newId, setName] = useState60(() => {
20294
20304
  const numberAtEnd = resolved.result.id.match(/([0-9]+)$/)?.[0];
@@ -20633,7 +20643,7 @@ var DuplicateComposition = ({ compositionId, compositionType }) => {
20633
20643
 
20634
20644
  // src/components/NewComposition/RenameComposition.tsx
20635
20645
  import {useCallback as useCallback93, useContext as useContext69, useMemo as useMemo102, useState as useState61} from "react";
20636
- import {Internals as Internals52} from "remotion";
20646
+ import {Internals as Internals53} from "remotion";
20637
20647
  import {
20638
20648
  jsx as jsx194,
20639
20649
  jsxs as jsxs99,
@@ -20652,7 +20662,7 @@ var RenameCompositionLoaded = () => {
20652
20662
  throw new Error("Resolved composition context");
20653
20663
  }
20654
20664
  const { resolved } = context5;
20655
- const { compositions } = useContext69(Internals52.CompositionManager);
20665
+ const { compositions } = useContext69(Internals53.CompositionManager);
20656
20666
  const [newId, setName] = useState61(() => {
20657
20667
  return resolved.result.id;
20658
20668
  });
@@ -20750,12 +20760,12 @@ var RenameComposition = ({ compositionId }) => {
20750
20760
  import {
20751
20761
  useCallback as useCallback94,
20752
20762
  useContext as useContext70,
20753
- useEffect as useEffect65,
20763
+ useEffect as useEffect66,
20754
20764
  useMemo as useMemo104,
20755
20765
  useRef as useRef34,
20756
20766
  useState as useState63
20757
20767
  } from "react";
20758
- import {Internals as Internals53} from "remotion";
20768
+ import {Internals as Internals54} from "remotion";
20759
20769
 
20760
20770
  // src/icons/keys.tsx
20761
20771
  import {
@@ -21493,7 +21503,7 @@ var QuickSwitcherNoResults = ({ query, mode }) => {
21493
21503
  };
21494
21504
 
21495
21505
  // src/components/QuickSwitcher/QuickSwitcherResult.tsx
21496
- import {useEffect as useEffect64, useMemo as useMemo103, useRef as useRef33, useState as useState62} from "react";
21506
+ import {useEffect as useEffect65, useMemo as useMemo103, useRef as useRef33, useState as useState62} from "react";
21497
21507
  import {
21498
21508
  jsx as jsx198,
21499
21509
  jsxs as jsxs102,
@@ -21529,7 +21539,7 @@ var QuickSwitcherResult = ({ result, selected }) => {
21529
21539
  const [hovered, setIsHovered] = useState62(false);
21530
21540
  const ref = useRef33(null);
21531
21541
  const keybindings2 = useKeybinding();
21532
- useEffect64(() => {
21542
+ useEffect65(() => {
21533
21543
  const { current } = ref;
21534
21544
  if (!current) {
21535
21545
  return;
@@ -21543,7 +21553,7 @@ var QuickSwitcherResult = ({ result, selected }) => {
21543
21553
  current.removeEventListener("mouseleave", onMouseLeave);
21544
21554
  };
21545
21555
  }, []);
21546
- useEffect64(() => {
21556
+ useEffect65(() => {
21547
21557
  if (!selected) {
21548
21558
  return;
21549
21559
  }
@@ -21560,7 +21570,7 @@ var QuickSwitcherResult = ({ result, selected }) => {
21560
21570
  binding.unregister();
21561
21571
  };
21562
21572
  }, [keybindings2, result.onSelected, selected]);
21563
- useEffect64(() => {
21573
+ useEffect65(() => {
21564
21574
  if (selected) {
21565
21575
  ref.current?.scrollIntoView({
21566
21576
  block: "nearest",
@@ -21789,14 +21799,14 @@ var mapModeToQuery = (mode) => {
21789
21799
  throw new Error("no mode" + mode);
21790
21800
  };
21791
21801
  var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }) => {
21792
- const { compositions } = useContext70(Internals53.CompositionManager);
21802
+ const { compositions } = useContext70(Internals54.CompositionManager);
21793
21803
  const [state, setState] = useState63(() => {
21794
21804
  return {
21795
21805
  query: mapModeToQuery(initialMode),
21796
21806
  selectedIndex: 0
21797
21807
  };
21798
21808
  });
21799
- useEffect65(() => {
21809
+ useEffect66(() => {
21800
21810
  setState({
21801
21811
  query: mapModeToQuery(initialMode),
21802
21812
  selectedIndex: 0
@@ -21870,7 +21880,7 @@ var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }
21870
21880
  };
21871
21881
  });
21872
21882
  }, []);
21873
- useEffect65(() => {
21883
+ useEffect66(() => {
21874
21884
  const binding = keybindings2.registerKeybinding({
21875
21885
  key: "ArrowUp",
21876
21886
  callback: onArrowUp,
@@ -21884,7 +21894,7 @@ var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }
21884
21894
  binding.unregister();
21885
21895
  };
21886
21896
  }, [keybindings2, onArrowDown, onArrowUp]);
21887
- useEffect65(() => {
21897
+ useEffect66(() => {
21888
21898
  if (mode !== "docs") {
21889
21899
  return;
21890
21900
  }
@@ -21909,7 +21919,7 @@ var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }
21909
21919
  cancelled = true;
21910
21920
  };
21911
21921
  }, [actualQuery, mode]);
21912
- useEffect65(() => {
21922
+ useEffect66(() => {
21913
21923
  const binding = keybindings2.registerKeybinding({
21914
21924
  key: "ArrowDown",
21915
21925
  callback: onArrowDown,
@@ -22063,7 +22073,7 @@ import {getDefaultOutLocation} from "@remotion/studio-shared";
22063
22073
  import {
22064
22074
  useCallback as useCallback112,
22065
22075
  useContext as useContext72,
22066
- useEffect as useEffect68,
22076
+ useEffect as useEffect69,
22067
22077
  useMemo as useMemo113,
22068
22078
  useReducer as useReducer2,
22069
22079
  useRef as useRef36,
@@ -22245,7 +22255,7 @@ import {useCallback as useCallback97} from "react";
22245
22255
  import {BrowserSafeApis} from "@remotion/renderer/client.js";
22246
22256
 
22247
22257
  // src/components/RenderModal/CliCopyButton.tsx
22248
- import {useCallback as useCallback96, useEffect as useEffect66, useMemo as useMemo107, useState as useState66} from "react";
22258
+ import {useCallback as useCallback96, useEffect as useEffect67, useMemo as useMemo107, useState as useState66} from "react";
22249
22259
  import {
22250
22260
  jsx as jsx207
22251
22261
  } from "react/jsx-runtime";
@@ -22298,7 +22308,7 @@ var CliCopyButton = ({
22298
22308
  const onPointerLeave = useCallback96(() => {
22299
22309
  setHovered(false);
22300
22310
  }, []);
22301
- useEffect66(() => {
22311
+ useEffect67(() => {
22302
22312
  if (!copied) {
22303
22313
  return;
22304
22314
  }
@@ -23445,14 +23455,14 @@ import {BrowserSafeApis as BrowserSafeApis4} from "@remotion/renderer/client.js"
23445
23455
  import {useCallback as useCallback104, useMemo as useMemo109} from "react";
23446
23456
 
23447
23457
  // src/helpers/use-file-existence.ts
23448
- import {useContext as useContext71, useEffect as useEffect67, useRef as useRef35, useState as useState68} from "react";
23458
+ import {useContext as useContext71, useEffect as useEffect68, useRef as useRef35, useState as useState68} from "react";
23449
23459
  var useFileExistence = (outName) => {
23450
23460
  const [exists, setExists] = useState68(false);
23451
23461
  const { previewServerState: state, subscribeToEvent } = useContext71(StudioServerConnectionCtx);
23452
23462
  const clientId = state.type === "connected" ? state.clientId : undefined;
23453
23463
  const currentOutName = useRef35("");
23454
23464
  currentOutName.current = outName;
23455
- useEffect67(() => {
23465
+ useEffect68(() => {
23456
23466
  if (!clientId) {
23457
23467
  return;
23458
23468
  }
@@ -23468,7 +23478,7 @@ var useFileExistence = (outName) => {
23468
23478
  unsubscribeFromFileExistenceWatcher({ file: outName, clientId });
23469
23479
  };
23470
23480
  }, [clientId, outName]);
23471
- useEffect67(() => {
23481
+ useEffect68(() => {
23472
23482
  const listener = (event) => {
23473
23483
  if (event.type !== "watched-file-deleted") {
23474
23484
  return;
@@ -23485,7 +23495,7 @@ var useFileExistence = (outName) => {
23485
23495
  unsub();
23486
23496
  };
23487
23497
  }, [outName, subscribeToEvent]);
23488
- useEffect67(() => {
23498
+ useEffect68(() => {
23489
23499
  const listener = (event) => {
23490
23500
  if (event.type !== "watched-file-undeleted") {
23491
23501
  return;
@@ -25406,7 +25416,7 @@ var RenderModal = ({
25406
25416
  repro,
25407
25417
  setSelectedModal
25408
25418
  ]);
25409
- useEffect68(() => {
25419
+ useEffect69(() => {
25410
25420
  return () => {
25411
25421
  isMounted.current = false;
25412
25422
  };
@@ -25575,7 +25585,7 @@ var RenderModal = ({
25575
25585
  onClickVideo();
25576
25586
  }
25577
25587
  }, [renderMode, onClickStill, onClickSequence, onClickVideo]);
25578
- useEffect68(() => {
25588
+ useEffect69(() => {
25579
25589
  if (renderDisabled) {
25580
25590
  return;
25581
25591
  }
@@ -26202,7 +26212,7 @@ var RenderStatusModal = ({ jobId }) => {
26202
26212
  import {useCallback as useCallback117, useMemo as useMemo116} from "react";
26203
26213
 
26204
26214
  // src/components/CopyButton.tsx
26205
- import {useCallback as useCallback115, useEffect as useEffect69, useState as useState70} from "react";
26215
+ import {useCallback as useCallback115, useEffect as useEffect70, useState as useState70} from "react";
26206
26216
  import {
26207
26217
  jsx as jsx234,
26208
26218
  jsxs as jsxs123
@@ -26243,7 +26253,7 @@ var CopyButton = ({ textToCopy, label: label10, labelWhenCopied }) => {
26243
26253
  showNotification(`Could not copy: ${err.message}`, 2000);
26244
26254
  });
26245
26255
  }, [textToCopy]);
26246
- useEffect69(() => {
26256
+ useEffect70(() => {
26247
26257
  if (!copied) {
26248
26258
  return;
26249
26259
  }
@@ -26589,7 +26599,7 @@ var Editor = ({ Root, readOnlyStudio }) => {
26589
26599
  triggerOnWindowResize: false,
26590
26600
  shouldApplyCssTransforms: true
26591
26601
  });
26592
- useEffect70(() => {
26602
+ useEffect71(() => {
26593
26603
  if (readOnlyStudio) {
26594
26604
  return;
26595
26605
  }
@@ -26624,13 +26634,13 @@ var Editor = ({ Root, readOnlyStudio }) => {
26624
26634
  onOutsideClick: noop,
26625
26635
  children: jsxs127(TimelineZoomContext, {
26626
26636
  children: [
26627
- jsx239(Internals54.CurrentScaleContext.Provider, {
26637
+ jsx239(Internals55.CurrentScaleContext.Provider, {
26628
26638
  value,
26629
26639
  children: jsxs127("div", {
26630
26640
  style: background2,
26631
26641
  children: [
26632
26642
  canvasMounted ? jsx239(MemoRoot, {}) : null,
26633
- jsxs127(Internals54.CanUseRemotionHooksProvider, {
26643
+ jsxs127(Internals55.CanUseRemotionHooksProvider, {
26634
26644
  children: [
26635
26645
  jsx239(EditorContent, {
26636
26646
  drawRef,
@@ -26659,7 +26669,7 @@ import {PlayerInternals as PlayerInternals17} from "@remotion/player";
26659
26669
 
26660
26670
  // src/state/preview-size.tsx
26661
26671
  import {useCallback as useCallback119, useContext as useContext75, useMemo as useMemo118, useState as useState72} from "react";
26662
- import {Internals as Internals55} from "remotion";
26672
+ import {Internals as Internals56} from "remotion";
26663
26673
  import {
26664
26674
  jsx as jsx240
26665
26675
  } from "react/jsx-runtime";
@@ -26710,7 +26720,7 @@ var PreviewSizeProvider = ({ children }) => {
26710
26720
  setTranslation
26711
26721
  };
26712
26722
  }, [editorZoomGestures, size4, setSize, translation]);
26713
- return jsx240(Internals55.PreviewSizeContext.Provider, {
26723
+ return jsx240(Internals56.PreviewSizeContext.Provider, {
26714
26724
  value: previewSizeCtx,
26715
26725
  children
26716
26726
  });
@@ -26744,7 +26754,7 @@ var CheckerboardProvider = ({ children }) => {
26744
26754
 
26745
26755
  // src/components/MediaVolumeProvider.tsx
26746
26756
  import {useMemo as useMemo120, useState as useState74} from "react";
26747
- import {Internals as Internals56} from "remotion";
26757
+ import {Internals as Internals57} from "remotion";
26748
26758
  import {
26749
26759
  jsx as jsx242
26750
26760
  } from "react/jsx-runtime";
@@ -26763,9 +26773,9 @@ var MediaVolumeProvider = ({ children }) => {
26763
26773
  setMediaVolume
26764
26774
  };
26765
26775
  }, []);
26766
- return jsx242(Internals56.MediaVolumeContext.Provider, {
26776
+ return jsx242(Internals57.MediaVolumeContext.Provider, {
26767
26777
  value: mediaVolumeContextValue,
26768
- children: jsx242(Internals56.SetMediaVolumeContext.Provider, {
26778
+ children: jsx242(Internals57.SetMediaVolumeContext.Provider, {
26769
26779
  value: setMediaVolumeContextValue,
26770
26780
  children
26771
26781
  })
@@ -26792,7 +26802,7 @@ var ModalsProvider = ({ children }) => {
26792
26802
  };
26793
26803
 
26794
26804
  // src/components/SetTimelineInOutProvider.tsx
26795
- import {useEffect as useEffect71, useMemo as useMemo122, useState as useState76} from "react";
26805
+ import {useEffect as useEffect72, useMemo as useMemo122, useState as useState76} from "react";
26796
26806
 
26797
26807
  // src/state/marks.ts
26798
26808
  var localStorageKey5 = () => `remotion.editor.marksv2`;
@@ -26818,7 +26828,7 @@ var SetTimelineInOutProvider = ({ children }) => {
26818
26828
  setInAndOutFrames
26819
26829
  };
26820
26830
  }, []);
26821
- useEffect71(() => {
26831
+ useEffect72(() => {
26822
26832
  persistMarks(inAndOutFrames);
26823
26833
  }, [inAndOutFrames]);
26824
26834
  return jsx244(TimelineInOutContext.Provider, {
@@ -27047,7 +27057,7 @@ var ServerDisconnected = () => {
27047
27057
  };
27048
27058
 
27049
27059
  // src/helpers/inject-css.ts
27050
- import {Internals as Internals57} from "remotion";
27060
+ import {Internals as Internals58} from "remotion";
27051
27061
  var makeDefaultGlobalCSS = () => {
27052
27062
  return `
27053
27063
  html {
@@ -27180,7 +27190,7 @@ var injectCSS = () => {
27180
27190
  if (injected) {
27181
27191
  return;
27182
27192
  }
27183
- Internals57.CSSUtils.injectCSS(makeDefaultGlobalCSS());
27193
+ Internals58.CSSUtils.injectCSS(makeDefaultGlobalCSS());
27184
27194
  injected = true;
27185
27195
  };
27186
27196
 
@@ -27195,12 +27205,12 @@ var getServerDisconnectedDomElement = () => {
27195
27205
  var Studio = ({ rootComponent, readOnly }) => {
27196
27206
  useLayoutEffect2(() => {
27197
27207
  window.remotion_isStudio = true;
27198
- Internals58.enableSequenceStackTraces();
27208
+ Internals59.enableSequenceStackTraces();
27199
27209
  }, []);
27200
27210
  useLayoutEffect2(() => {
27201
27211
  injectCSS();
27202
27212
  }, []);
27203
- return jsx250(Internals58.RemotionRoot, {
27213
+ return jsx250(Internals59.RemotionRoot, {
27204
27214
  numberOfAudioTags: window.remotion_numberOfAudioTags,
27205
27215
  children: jsxs129(EditorContexts, {
27206
27216
  readOnlyStudio: readOnly,