@remotion/studio 4.0.477 → 4.0.478

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/components/CanvasIfSizeIsAvailable.js +2 -6
  2. package/dist/components/EditorGuides/Guide.js +37 -9
  3. package/dist/components/EditorRuler/Ruler.js +4 -14
  4. package/dist/components/EditorRuler/index.js +9 -4
  5. package/dist/components/InlineAction.js +1 -0
  6. package/dist/components/MenuToolbar.d.ts +1 -0
  7. package/dist/components/MenuToolbar.js +4 -1
  8. package/dist/components/SelectedOutlineElement.js +85 -14
  9. package/dist/components/SelectedOutlineOverlay.d.ts +1 -1
  10. package/dist/components/SelectedOutlineOverlay.js +5 -1
  11. package/dist/components/Timeline/TimelineSequence.js +7 -15
  12. package/dist/components/Timeline/TimelineVideoInfo.d.ts +1 -0
  13. package/dist/components/Timeline/TimelineVideoInfo.js +93 -8
  14. package/dist/components/Timeline/duplicate-selected-timeline-item.d.ts +7 -0
  15. package/dist/components/Timeline/duplicate-selected-timeline-item.js +32 -3
  16. package/dist/components/Timeline/timeline-video-filmstrip-times.d.ts +17 -0
  17. package/dist/components/Timeline/timeline-video-filmstrip-times.js +22 -0
  18. package/dist/components/import-assets.d.ts +11 -2
  19. package/dist/components/import-assets.js +61 -6
  20. package/dist/components/selected-outline-drag.d.ts +23 -0
  21. package/dist/components/selected-outline-drag.js +49 -1
  22. package/dist/error-overlay/remotion-overlay/Overlay.js +3 -0
  23. package/dist/esm/{chunk-t8fjnw2d.js → chunk-hrw9799x.js} +926 -578
  24. package/dist/esm/internals.mjs +926 -578
  25. package/dist/esm/previewEntry.mjs +10204 -9852
  26. package/dist/esm/renderEntry.mjs +1 -1
  27. package/dist/helpers/editor-guide-selection.js +1 -1
  28. package/dist/helpers/get-preview-file-type.js +1 -1
  29. package/dist/helpers/ruler-canvas-size.d.ts +5 -0
  30. package/dist/helpers/ruler-canvas-size.js +17 -0
  31. package/package.json +11 -11
@@ -23,13 +23,13 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
23
23
  });
24
24
 
25
25
  // src/Studio.tsx
26
- import { useLayoutEffect as useLayoutEffect5 } from "react";
26
+ import { useLayoutEffect as useLayoutEffect6 } from "react";
27
27
  import { createPortal } from "react-dom";
28
28
  import { Internals as Internals103 } from "remotion";
29
29
 
30
30
  // src/components/Editor.tsx
31
31
  import { PlayerInternals as PlayerInternals22 } from "@remotion/player";
32
- import React233, { useCallback as useCallback189, useMemo as useMemo195, useState as useState115 } from "react";
32
+ import React233, { useCallback as useCallback189, useMemo as useMemo195, useState as useState114 } from "react";
33
33
  import { Internals as Internals98 } from "remotion";
34
34
 
35
35
  // src/helpers/colors.ts
@@ -1664,7 +1664,7 @@ var InitialCompositionLoader = () => {
1664
1664
  };
1665
1665
 
1666
1666
  // src/components/MenuToolbar.tsx
1667
- import { useCallback as useCallback116, useMemo as useMemo117, useState as useState73 } from "react";
1667
+ import { useCallback as useCallback116, useMemo as useMemo117, useState as useState72 } from "react";
1668
1668
 
1669
1669
  // src/helpers/use-menu-structure.tsx
1670
1670
  import { useContext as useContext12, useEffect as useEffect17, useMemo as useMemo21 } from "react";
@@ -2439,7 +2439,7 @@ var getPreviewFileType = (fileName) => {
2439
2439
  }
2440
2440
  const audioExtensions = ["mp3", "wav", "ogg", "aac"];
2441
2441
  const videoExtensions = ["mp4", "avi", "mkv", "mov", "webm"];
2442
- const imageExtensions = ["jpg", "jpeg", "png", "gif", "bmp"];
2442
+ const imageExtensions = ["jpg", "jpeg", "png", "apng", "gif", "bmp"];
2443
2443
  const fileExtension = fileName.split(".").pop()?.toLowerCase();
2444
2444
  if (fileExtension === undefined) {
2445
2445
  throw new Error("File extension is undefined");
@@ -6109,7 +6109,7 @@ var MenuBuildIndicator = () => {
6109
6109
  };
6110
6110
 
6111
6111
  // src/components/SidebarCollapserControls.tsx
6112
- import { useCallback as useCallback113, useContext as useContext74, useEffect as useEffect69 } from "react";
6112
+ import { useCallback as useCallback113, useContext as useContext74, useEffect as useEffect68 } from "react";
6113
6113
 
6114
6114
  // src/components/InlineAction.tsx
6115
6115
  import { useCallback as useCallback22, useMemo as useMemo26, useState as useState19 } from "react";
@@ -6134,6 +6134,7 @@ var InlineAction = ({
6134
6134
  background: disabled ? "transparent" : getBackgroundFromHoverState({ hovered, selected: false }),
6135
6135
  height: 24,
6136
6136
  width: 24,
6137
+ padding: 0,
6137
6138
  display: "inline-flex",
6138
6139
  justifyContent: "center",
6139
6140
  alignItems: "center",
@@ -6154,7 +6155,7 @@ var InlineAction = ({
6154
6155
  };
6155
6156
 
6156
6157
  // src/components/TopPanel.tsx
6157
- import React139, { useCallback as useCallback112, useContext as useContext73, useEffect as useEffect68, useMemo as useMemo115 } from "react";
6158
+ import React139, { useCallback as useCallback112, useContext as useContext73, useEffect as useEffect67, useMemo as useMemo115 } from "react";
6158
6159
  import { Internals as Internals57 } from "remotion";
6159
6160
 
6160
6161
  // src/helpers/use-breakpoint.ts
@@ -6181,8 +6182,25 @@ function useBreakpoint(breakpoint2) {
6181
6182
  import { useContext as useContext34, useMemo as useMemo51 } from "react";
6182
6183
  import { Internals as Internals34 } from "remotion";
6183
6184
 
6185
+ // src/helpers/ruler-canvas-size.ts
6186
+ var applyRulerInsetsToCanvasSize = ({
6187
+ rulersAreVisible,
6188
+ size
6189
+ }) => {
6190
+ if (!rulersAreVisible) {
6191
+ return size;
6192
+ }
6193
+ return {
6194
+ ...size,
6195
+ left: size.left + RULER_WIDTH,
6196
+ top: size.top + RULER_WIDTH,
6197
+ width: size.width - RULER_WIDTH,
6198
+ height: size.height - RULER_WIDTH
6199
+ };
6200
+ };
6201
+
6184
6202
  // src/components/CanvasOrLoading.tsx
6185
- import { useContext as useContext33, useEffect as useEffect43 } from "react";
6203
+ import { useContext as useContext33, useEffect as useEffect42 } from "react";
6186
6204
  import { Internals as Internals33 } from "remotion";
6187
6205
 
6188
6206
  // src/error-overlay/remotion-overlay/ErrorLoader.tsx
@@ -7696,10 +7714,10 @@ import {
7696
7714
  import {
7697
7715
  useCallback as useCallback43,
7698
7716
  useContext as useContext32,
7699
- useEffect as useEffect41,
7717
+ useEffect as useEffect40,
7700
7718
  useMemo as useMemo50,
7701
7719
  useRef as useRef28,
7702
- useState as useState39
7720
+ useState as useState38
7703
7721
  } from "react";
7704
7722
  import { Internals as Internals31, watchStaticFile } from "remotion";
7705
7723
 
@@ -8059,7 +8077,7 @@ var findGuide = (guidesList, guideId) => {
8059
8077
  if (guideId === null) {
8060
8078
  return null;
8061
8079
  }
8062
- return guidesList.find((guide) => guide.id === guideId) ?? null;
8080
+ return guidesList.find((guide) => guide.id === guideId && guide.show) ?? null;
8063
8081
  };
8064
8082
  var getRulerGuideHighlight = ({
8065
8083
  guidesList,
@@ -9765,15 +9783,38 @@ var duplicateSequencesFromSource = (nodePathInfos, confirm) => {
9765
9783
  });
9766
9784
  };
9767
9785
  var isDuplicatableSequenceRowSelection = (selection) => selection.type === "sequence";
9786
+ var isDuplicatableEffectSelection = (selection) => selection.type === "sequence-effect";
9787
+ var duplicateEffectsFromSource = (effects) => {
9788
+ return callApi("/api/duplicate-effect", effects.map((effect) => {
9789
+ const nodePath = effect.nodePathInfo.sequenceSubscriptionKey;
9790
+ return {
9791
+ fileName: nodePath.absolutePath,
9792
+ sequenceNodePath: nodePath,
9793
+ effectIndex: effect.i
9794
+ };
9795
+ })).then((result) => {
9796
+ if (result.success) {
9797
+ showNotification(effects.length === 1 ? "Duplicated effect in source file" : "Duplicated effects in source files", 2000);
9798
+ } else {
9799
+ showNotification(result.reason, 4000);
9800
+ }
9801
+ }).catch((err) => {
9802
+ showNotification(err.message, 4000);
9803
+ });
9804
+ };
9768
9805
  var duplicateSelectedTimelineItems = ({
9769
9806
  selections,
9770
9807
  confirm
9771
9808
  }) => {
9772
9809
  const sequenceSelections = selections.filter(isDuplicatableSequenceRowSelection);
9773
- if (sequenceSelections.length === 0) {
9810
+ if (sequenceSelections.length > 0) {
9811
+ return duplicateSequencesFromSource(sequenceSelections.map((selection) => selection.nodePathInfo), confirm);
9812
+ }
9813
+ const effectSelections = selections.filter(isDuplicatableEffectSelection);
9814
+ if (effectSelections.length === 0) {
9774
9815
  return null;
9775
9816
  }
9776
- return duplicateSequencesFromSource(sequenceSelections.map((selection) => selection.nodePathInfo), confirm);
9817
+ return duplicateEffectsFromSource(effectSelections);
9777
9818
  };
9778
9819
 
9779
9820
  // src/components/Timeline/reset-selected-timeline-props.ts
@@ -11131,8 +11172,7 @@ var GuideComp = ({ guide, canvasDimensions, scale }) => {
11131
11172
  clientX: e.clientX,
11132
11173
  clientY: e.clientY
11133
11174
  };
11134
- shouldCreateGuideRef.current = true;
11135
- forceSpecificCursor("no-drop");
11175
+ shouldCreateGuideRef.current = false;
11136
11176
  setDraggingGuideId(() => guide.id);
11137
11177
  }, [guide.id, setDraggingGuideId, shouldCreateGuideRef]);
11138
11178
  const onMouseDown = useCallback35((e) => {
@@ -11147,8 +11187,7 @@ var GuideComp = ({ guide, canvasDimensions, scale }) => {
11147
11187
  clientX: e.clientX,
11148
11188
  clientY: e.clientY
11149
11189
  };
11150
- shouldCreateGuideRef.current = true;
11151
- forceSpecificCursor("no-drop");
11190
+ shouldCreateGuideRef.current = false;
11152
11191
  setDraggingGuideId(() => guide.id);
11153
11192
  }, [guide.id, setDraggingGuideId, shouldCreateGuideRef]);
11154
11193
  const updateHasMovedGuide = useCallback35((clientX, clientY) => {
@@ -11171,13 +11210,38 @@ var GuideComp = ({ guide, canvasDimensions, scale }) => {
11171
11210
  const onMouseMove = useCallback35((e) => {
11172
11211
  updateHasMovedGuide(e.clientX, e.clientY);
11173
11212
  }, [updateHasMovedGuide]);
11213
+ const finishGuideInteraction = useCallback35(() => {
11214
+ const shouldDeleteGuide = shouldDeleteGuideRef.current;
11215
+ setGuidesList((prevState) => {
11216
+ const newGuides = shouldDeleteGuide ? prevState.filter((candidate) => candidate.id !== guide.id) : prevState;
11217
+ persistGuidesList(newGuides);
11218
+ return newGuides;
11219
+ });
11220
+ if (shouldDeleteGuide && selected) {
11221
+ clearSelection();
11222
+ }
11223
+ shouldDeleteGuideRef.current = false;
11224
+ shouldCreateGuideRef.current = false;
11225
+ stopForcingSpecificCursor();
11226
+ setDraggingGuideId(() => null);
11227
+ }, [
11228
+ clearSelection,
11229
+ guide.id,
11230
+ selected,
11231
+ setDraggingGuideId,
11232
+ setGuidesList,
11233
+ shouldCreateGuideRef,
11234
+ shouldDeleteGuideRef
11235
+ ]);
11174
11236
  const onPointerUp = useCallback35((e) => {
11175
11237
  if (e.currentTarget.hasPointerCapture(e.pointerId)) {
11176
11238
  e.currentTarget.releasePointerCapture(e.pointerId);
11177
11239
  }
11178
11240
  const pointerDownPosition = pointerDownPositionRef.current;
11179
11241
  pointerDownPositionRef.current = null;
11180
- if (shouldDeleteGuideRef.current) {
11242
+ const shouldDeleteGuide = shouldDeleteGuideRef.current;
11243
+ finishGuideInteraction();
11244
+ if (shouldDeleteGuide) {
11181
11245
  return;
11182
11246
  }
11183
11247
  if (isGuidePointerUpAClick({
@@ -11188,11 +11252,13 @@ var GuideComp = ({ guide, canvasDimensions, scale }) => {
11188
11252
  })) {
11189
11253
  onSelect();
11190
11254
  }
11191
- }, [guide.id, onSelect, shouldDeleteGuideRef]);
11255
+ }, [finishGuideInteraction, guide.id, onSelect, shouldDeleteGuideRef]);
11192
11256
  const onMouseUp = useCallback35((e) => {
11193
11257
  const pointerDownPosition = pointerDownPositionRef.current;
11194
11258
  pointerDownPositionRef.current = null;
11195
- if (shouldDeleteGuideRef.current) {
11259
+ const shouldDeleteGuide = shouldDeleteGuideRef.current;
11260
+ finishGuideInteraction();
11261
+ if (shouldDeleteGuide) {
11196
11262
  return;
11197
11263
  }
11198
11264
  if (isGuidePointerUpAClick({
@@ -11203,7 +11269,7 @@ var GuideComp = ({ guide, canvasDimensions, scale }) => {
11203
11269
  })) {
11204
11270
  onSelect();
11205
11271
  }
11206
- }, [guide.id, onSelect, shouldDeleteGuideRef]);
11272
+ }, [finishGuideInteraction, guide.id, onSelect, shouldDeleteGuideRef]);
11207
11273
  const onClick = useCallback35((e) => {
11208
11274
  if (e.button !== 0) {
11209
11275
  return;
@@ -11213,7 +11279,8 @@ var GuideComp = ({ guide, canvasDimensions, scale }) => {
11213
11279
  }, []);
11214
11280
  const onPointerCancel = useCallback35(() => {
11215
11281
  pointerDownPositionRef.current = null;
11216
- }, []);
11282
+ finishGuideInteraction();
11283
+ }, [finishGuideInteraction]);
11217
11284
  const isActive = selected || hoveredGuideId === guide.id;
11218
11285
  const activeClassName = isActive ? "__remotion_editor_guide_selected" : null;
11219
11286
  const guideClassName = useMemo38(() => {
@@ -11305,7 +11372,7 @@ var EditorGuides_default = EditorGuides;
11305
11372
  import {
11306
11373
  useCallback as useCallback37,
11307
11374
  useContext as useContext23,
11308
- useEffect as useEffect32,
11375
+ useLayoutEffect as useLayoutEffect2,
11309
11376
  useMemo as useMemo41,
11310
11377
  useRef as useRef20
11311
11378
  } from "react";
@@ -11523,8 +11590,7 @@ import {
11523
11590
  useContext as useContext22,
11524
11591
  useEffect as useEffect31,
11525
11592
  useMemo as useMemo40,
11526
- useRef as useRef19,
11527
- useState as useState29
11593
+ useRef as useRef19
11528
11594
  } from "react";
11529
11595
  import { Internals as Internals23 } from "remotion";
11530
11596
  import { jsx as jsx67 } from "react/jsx-runtime";
@@ -11556,7 +11622,7 @@ var Ruler = ({
11556
11622
  if (!unsafeVideoConfig) {
11557
11623
  throw new Error("Video config not set");
11558
11624
  }
11559
- const [cursor, setCursor] = useState29(isVerticalRuler ? "ew-resize" : "ns-resize");
11625
+ const cursor = isVerticalRuler ? "ew-resize" : "ns-resize";
11560
11626
  const guideHighlight = useMemo40(() => getRulerGuideHighlight({
11561
11627
  guidesList,
11562
11628
  selectedItems,
@@ -11608,7 +11674,7 @@ var Ruler = ({
11608
11674
  e.preventDefault();
11609
11675
  e.stopPropagation();
11610
11676
  shouldCreateGuideRef.current = true;
11611
- forceSpecificCursor("no-drop");
11677
+ forceSpecificCursor(cursor);
11612
11678
  const guideId = makeGuideId();
11613
11679
  setEditorShowGuides(() => true);
11614
11680
  setDraggingGuideId(() => guideId);
@@ -11631,28 +11697,16 @@ var Ruler = ({
11631
11697
  setGuidesList,
11632
11698
  orientation,
11633
11699
  originOffset,
11634
- unsafeVideoConfig.id
11700
+ unsafeVideoConfig.id,
11701
+ cursor
11635
11702
  ]);
11636
- const changeCursor = useCallback36((e) => {
11637
- e.preventDefault();
11638
- if (draggingGuideId !== null) {
11639
- setCursor("no-drop");
11640
- }
11641
- }, [setCursor, draggingGuideId]);
11642
- useEffect31(() => {
11643
- if (draggingGuideId === null) {
11644
- setCursor(isVerticalRuler ? "ew-resize" : "ns-resize");
11645
- }
11646
- }, [draggingGuideId, isVerticalRuler]);
11647
11703
  return /* @__PURE__ */ jsx67("canvas", {
11648
11704
  ref: rulerCanvasRef,
11649
11705
  width: rulerWidth * window.devicePixelRatio,
11650
11706
  height: rulerHeight * window.devicePixelRatio,
11651
11707
  style: rulerStyle,
11652
11708
  ...{ [PREVENT_CLEAR_SELECTION_ON_POINTER_DOWN_ATTR]: "true" },
11653
- onPointerDown,
11654
- onPointerEnter: changeCursor,
11655
- onPointerLeave: changeCursor
11709
+ onPointerDown
11656
11710
  });
11657
11711
  };
11658
11712
  var Ruler_default = Ruler;
@@ -11728,12 +11782,13 @@ var EditorRulers = ({ contentDimensions, canvasSize, assetMetadata, containerRef
11728
11782
  if (!shouldDeleteGuideRef.current) {
11729
11783
  shouldDeleteGuideRef.current = true;
11730
11784
  }
11731
- forceSpecificCursor("no-drop");
11732
11785
  setGuidesList((prevState) => {
11733
11786
  const newGuides = prevState.map((guide) => {
11734
11787
  if (guide.id !== draggingGuideId) {
11735
11788
  return guide;
11736
11789
  }
11790
+ const desiredCursor = guide.orientation === "vertical" ? "ew-resize" : "ns-resize";
11791
+ forceSpecificCursor(desiredCursor);
11737
11792
  return {
11738
11793
  ...guide,
11739
11794
  show: false
@@ -11773,9 +11828,10 @@ var EditorRulers = ({ contentDimensions, canvasSize, assetMetadata, containerRef
11773
11828
  canvasPosition.top
11774
11829
  ]);
11775
11830
  const onMouseUp = useCallback37(() => {
11831
+ const shouldDeleteGuide = shouldDeleteGuideRef.current;
11776
11832
  setGuidesList((prevState) => {
11777
11833
  const newGuides = prevState.filter((selected) => {
11778
- if (!shouldDeleteGuideRef.current) {
11834
+ if (!shouldDeleteGuide) {
11779
11835
  return true;
11780
11836
  }
11781
11837
  return selected.id !== draggingGuideId;
@@ -11784,7 +11840,7 @@ var EditorRulers = ({ contentDimensions, canvasSize, assetMetadata, containerRef
11784
11840
  return newGuides;
11785
11841
  });
11786
11842
  const deletedGuideWasSelected = selectedItems.some((item) => item.type === "guide" && item.guideId === draggingGuideId);
11787
- if (shouldDeleteGuideRef.current && deletedGuideWasSelected) {
11843
+ if (shouldDeleteGuide && deletedGuideWasSelected) {
11788
11844
  clearSelection();
11789
11845
  }
11790
11846
  shouldDeleteGuideRef.current = false;
@@ -11792,6 +11848,7 @@ var EditorRulers = ({ contentDimensions, canvasSize, assetMetadata, containerRef
11792
11848
  shouldCreateGuideRef.current = false;
11793
11849
  setDraggingGuideId(() => null);
11794
11850
  document.removeEventListener("pointerup", onMouseUp);
11851
+ document.removeEventListener("pointercancel", onMouseUp);
11795
11852
  document.removeEventListener("pointermove", onMouseMove);
11796
11853
  }, [
11797
11854
  clearSelection,
@@ -11803,14 +11860,16 @@ var EditorRulers = ({ contentDimensions, canvasSize, assetMetadata, containerRef
11803
11860
  onMouseMove,
11804
11861
  selectedItems
11805
11862
  ]);
11806
- useEffect32(() => {
11863
+ useLayoutEffect2(() => {
11807
11864
  if (draggingGuideId !== null) {
11808
11865
  document.addEventListener("pointermove", onMouseMove);
11809
11866
  document.addEventListener("pointerup", onMouseUp);
11867
+ document.addEventListener("pointercancel", onMouseUp);
11810
11868
  }
11811
11869
  return () => {
11812
11870
  document.removeEventListener("pointermove", onMouseMove);
11813
11871
  document.removeEventListener("pointerup", onMouseUp);
11872
+ document.removeEventListener("pointercancel", onMouseUp);
11814
11873
  if (requestAnimationFrameRef.current) {
11815
11874
  cancelAnimationFrame(requestAnimationFrameRef.current);
11816
11875
  }
@@ -12020,6 +12079,16 @@ var getAssetElement = ({
12020
12079
  position: null
12021
12080
  };
12022
12081
  }
12082
+ if (fileType.type === "apng") {
12083
+ return {
12084
+ type: "asset",
12085
+ assetType: "animated-image",
12086
+ src,
12087
+ srcType: "static",
12088
+ dimensions: fileType.dimensions,
12089
+ position: null
12090
+ };
12091
+ }
12023
12092
  if (fileType.type === "gif") {
12024
12093
  return {
12025
12094
  type: "asset",
@@ -12070,6 +12139,16 @@ var getAssetElementFromPath = (assetPath) => {
12070
12139
  position: null
12071
12140
  };
12072
12141
  }
12142
+ if (extension === "apng") {
12143
+ return {
12144
+ type: "asset",
12145
+ assetType: "animated-image",
12146
+ src: assetPath,
12147
+ srcType: "static",
12148
+ dimensions: null,
12149
+ position: null
12150
+ };
12151
+ }
12073
12152
  if (extension === "gif") {
12074
12153
  return {
12075
12154
  type: "asset",
@@ -12115,6 +12194,9 @@ var getAssetLabel = (element) => {
12115
12194
  if (element.assetType === "gif") {
12116
12195
  return "<Gif>";
12117
12196
  }
12197
+ if (element.assetType === "animated-image") {
12198
+ return "<AnimatedImage>";
12199
+ }
12118
12200
  if (element.assetType === "audio") {
12119
12201
  return "<Audio>";
12120
12202
  }
@@ -12146,6 +12228,9 @@ var getComponentPropNumber = (props, name) => {
12146
12228
  return typeof prop?.value === "number" ? prop.value : null;
12147
12229
  };
12148
12230
  var getComponentDimensions = (component) => {
12231
+ if (component.dimensions) {
12232
+ return component.dimensions;
12233
+ }
12149
12234
  const width = getComponentPropNumber(component.props, "width");
12150
12235
  const height = getComponentPropNumber(component.props, "height");
12151
12236
  if (width !== null && height !== null) {
@@ -12189,7 +12274,7 @@ var getFileDimensions = async ({
12189
12274
  if (fileType.type === "wav" || fileType.type === "mp3" || fileType.type === "aac" || fileType.type === "flac") {
12190
12275
  return null;
12191
12276
  }
12192
- if (fileType.type === "png" || fileType.type === "jpeg" || fileType.type === "webp" || fileType.type === "bmp" || fileType.type === "gif") {
12277
+ if (fileType.type === "png" || fileType.type === "jpeg" || fileType.type === "webp" || fileType.type === "bmp" || fileType.type === "apng" || fileType.type === "gif") {
12193
12278
  if (fileType.dimensions) {
12194
12279
  return fileType.dimensions;
12195
12280
  }
@@ -12209,7 +12294,7 @@ var getFileDimensions = async ({
12209
12294
  var getStaticAssetDimensions = (assetPath) => {
12210
12295
  const extension = assetPath.split(".").pop()?.toLowerCase();
12211
12296
  const src = staticFile2(assetPath);
12212
- if (extension && ["png", "jpg", "jpeg", "webp", "bmp", "gif"].includes(extension)) {
12297
+ if (extension && ["png", "jpg", "jpeg", "webp", "bmp", "gif", "apng"].includes(extension)) {
12213
12298
  return getImageDimensions({ revokeObjectUrl: false, src });
12214
12299
  }
12215
12300
  if (extension && ["mp4", "m4v", "mov", "avi", "webm", "ts", "m2ts"].includes(extension)) {
@@ -12234,6 +12319,31 @@ var getStaticAssetDimensionsOrNull = async (assetPath) => {
12234
12319
  return null;
12235
12320
  }
12236
12321
  };
12322
+ var getStaticAssetFileType = async (assetPath) => {
12323
+ const extension = assetPath.split(".").pop()?.toLowerCase();
12324
+ if (extension !== "png" && extension !== "apng") {
12325
+ return null;
12326
+ }
12327
+ try {
12328
+ const response = await fetch(staticFile2(assetPath));
12329
+ if (!response.ok) {
12330
+ return null;
12331
+ }
12332
+ return detectFileType(new Uint8Array(await response.arrayBuffer()));
12333
+ } catch {
12334
+ return null;
12335
+ }
12336
+ };
12337
+ var getAssetElementFromStaticAsset = async (assetPath) => {
12338
+ const fileType = await getStaticAssetFileType(assetPath);
12339
+ if (fileType) {
12340
+ const element = getAssetElement({ fileType, src: assetPath });
12341
+ if (element) {
12342
+ return element;
12343
+ }
12344
+ }
12345
+ return getAssetElementFromPath(assetPath);
12346
+ };
12237
12347
  var pickFilesToImport = () => {
12238
12348
  return new Promise((resolve) => {
12239
12349
  const input = document.createElement("input");
@@ -12446,18 +12556,18 @@ var insertExistingAssets = async ({
12446
12556
  const unsupportedFiles = [];
12447
12557
  try {
12448
12558
  for (const assetPath of assetPaths) {
12449
- const element = getAssetElementFromPath(assetPath);
12559
+ const element = await getAssetElementFromStaticAsset(assetPath);
12450
12560
  if (element === null) {
12451
12561
  unsupportedFiles.push(assetPath);
12452
12562
  continue;
12453
12563
  }
12454
- const dimensions = await getStaticAssetDimensionsOrNull(assetPath);
12564
+ const dimensions = element.dimensions ?? await getStaticAssetDimensionsOrNull(assetPath);
12455
12565
  const inserted = await insertAssetElement({
12456
12566
  compositionFile,
12457
12567
  compositionId,
12458
12568
  element: {
12459
12569
  ...element,
12460
- dimensions: element.dimensions ?? dimensions,
12570
+ dimensions,
12461
12571
  position: getCenteredPosition({
12462
12572
  dimensions,
12463
12573
  dropPosition
@@ -12511,7 +12621,7 @@ import { PlayerInternals as PlayerInternals10 } from "@remotion/player";
12511
12621
  import {
12512
12622
  useCallback as useCallback42,
12513
12623
  useContext as useContext31,
12514
- useEffect as useEffect40,
12624
+ useEffect as useEffect39,
12515
12625
  useMemo as useMemo49,
12516
12626
  useRef as useRef27
12517
12627
  } from "react";
@@ -12543,32 +12653,32 @@ var checkerboardBackgroundImage = (checkerboard) => {
12543
12653
  };
12544
12654
 
12545
12655
  // src/components/RenderPreview.tsx
12546
- import { useContext as useContext25, useEffect as useEffect37, useState as useState34 } from "react";
12656
+ import { useContext as useContext25, useEffect as useEffect36, useState as useState33 } from "react";
12547
12657
 
12548
12658
  // src/components/FilePreview.tsx
12549
12659
  import { formatBytes } from "@remotion/studio-shared";
12550
12660
 
12551
12661
  // src/components/JSONViewer.tsx
12552
- import { useEffect as useEffect35, useState as useState32 } from "react";
12662
+ import { useEffect as useEffect34, useState as useState31 } from "react";
12553
12663
 
12554
12664
  // src/components/NewComposition/RemTextarea.tsx
12555
12665
  import {
12556
12666
  forwardRef as forwardRef3,
12557
- useEffect as useEffect34,
12667
+ useEffect as useEffect33,
12558
12668
  useImperativeHandle as useImperativeHandle8,
12559
12669
  useMemo as useMemo43,
12560
12670
  useRef as useRef22,
12561
- useState as useState31
12671
+ useState as useState30
12562
12672
  } from "react";
12563
12673
 
12564
12674
  // src/components/NewComposition/RemInput.tsx
12565
12675
  import {
12566
12676
  forwardRef as forwardRef2,
12567
- useEffect as useEffect33,
12677
+ useEffect as useEffect32,
12568
12678
  useImperativeHandle as useImperativeHandle7,
12569
12679
  useMemo as useMemo42,
12570
12680
  useRef as useRef21,
12571
- useState as useState30
12681
+ useState as useState29
12572
12682
  } from "react";
12573
12683
  import { jsx as jsx69 } from "react/jsx-runtime";
12574
12684
  var INPUT_HORIZONTAL_PADDING = 8;
@@ -12594,8 +12704,8 @@ var getInputBorderColor = ({
12594
12704
  isHovered
12595
12705
  }) => status === "warning" ? WARNING_COLOR : status === "error" ? FAIL_COLOR : isFocused ? SELECTED_BACKGROUND : isHovered ? INPUT_BORDER_COLOR_HOVERED : INPUT_BORDER_COLOR_UNHOVERED;
12596
12706
  var RemInputForwardRef = ({ status, rightAlign, ...props }, ref2) => {
12597
- const [isFocused, setIsFocused] = useState30(false);
12598
- const [isHovered, setIsHovered] = useState30(false);
12707
+ const [isFocused, setIsFocused] = useState29(false);
12708
+ const [isHovered, setIsHovered] = useState29(false);
12599
12709
  const inputRef = useRef21(null);
12600
12710
  const { tabIndex } = useZIndex();
12601
12711
  const style5 = useMemo42(() => {
@@ -12611,7 +12721,7 @@ var RemInputForwardRef = ({ status, rightAlign, ...props }, ref2) => {
12611
12721
  useImperativeHandle7(ref2, () => {
12612
12722
  return inputRef.current;
12613
12723
  }, []);
12614
- useEffect33(() => {
12724
+ useEffect32(() => {
12615
12725
  if (!inputRef.current) {
12616
12726
  return;
12617
12727
  }
@@ -12652,8 +12762,8 @@ var inputBaseStyle2 = {
12652
12762
  overflowX: "hidden"
12653
12763
  };
12654
12764
  var RemTextareaFRFunction = ({ status, ...props }, ref2) => {
12655
- const [isFocused, setIsFocused] = useState31(false);
12656
- const [isHovered, setIsHovered] = useState31(false);
12765
+ const [isFocused, setIsFocused] = useState30(false);
12766
+ const [isHovered, setIsHovered] = useState30(false);
12657
12767
  const inputRef = useRef22(null);
12658
12768
  const { tabIndex } = useZIndex();
12659
12769
  useImperativeHandle8(ref2, () => {
@@ -12668,7 +12778,7 @@ var RemTextareaFRFunction = ({ status, ...props }, ref2) => {
12668
12778
  ...props.style ?? {}
12669
12779
  };
12670
12780
  }, [isFocused, isHovered, props.style, status]);
12671
- useEffect34(() => {
12781
+ useEffect33(() => {
12672
12782
  if (!inputRef.current) {
12673
12783
  return;
12674
12784
  }
@@ -12745,8 +12855,8 @@ var jsonStyle = {
12745
12855
  flex: 1
12746
12856
  };
12747
12857
  var JSONViewer = ({ src }) => {
12748
- const [json, setJson] = useState32(null);
12749
- useEffect35(() => {
12858
+ const [json, setJson] = useState31(null);
12859
+ useEffect34(() => {
12750
12860
  fetch(src).then((res) => res.json()).then((jsonRes) => {
12751
12861
  setJson(JSON.stringify(jsonRes, null, 2));
12752
12862
  });
@@ -12762,7 +12872,7 @@ var JSONViewer = ({ src }) => {
12762
12872
  };
12763
12873
 
12764
12874
  // src/components/TextViewer.tsx
12765
- import { useEffect as useEffect36, useState as useState33 } from "react";
12875
+ import { useEffect as useEffect35, useState as useState32 } from "react";
12766
12876
  import { jsxs as jsxs31 } from "react/jsx-runtime";
12767
12877
  var textStyle = {
12768
12878
  margin: 14,
@@ -12772,8 +12882,8 @@ var textStyle = {
12772
12882
  whiteSpace: "pre-wrap"
12773
12883
  };
12774
12884
  var TextViewer = ({ src }) => {
12775
- const [txt, setTxt] = useState33("");
12776
- useEffect36(() => {
12885
+ const [txt, setTxt] = useState32("");
12886
+ useEffect35(() => {
12777
12887
  fetch(src).then(async (res) => {
12778
12888
  if (!res.ok || !res.body) {
12779
12889
  return;
@@ -12874,9 +12984,9 @@ var errMsgStyle = {
12874
12984
  var RenderPreview = ({ path, assetMetadata, getBlob }) => {
12875
12985
  const fileType = getPreviewFileType(path);
12876
12986
  const connectionStatus = useContext25(StudioServerConnectionCtx).previewServerState.type;
12877
- const [blobUrl, setBlobUrl] = useState34(null);
12878
- const [blobError, setBlobError] = useState34(null);
12879
- useEffect37(() => {
12987
+ const [blobUrl, setBlobUrl] = useState33(null);
12988
+ const [blobError, setBlobError] = useState33(null);
12989
+ useEffect36(() => {
12880
12990
  if (!getBlob) {
12881
12991
  setBlobUrl(null);
12882
12992
  setBlobError(null);
@@ -12941,10 +13051,10 @@ import { PlayerInternals as PlayerInternals9 } from "@remotion/player";
12941
13051
  import React63, {
12942
13052
  useCallback as useCallback41,
12943
13053
  useContext as useContext29,
12944
- useEffect as useEffect39,
13054
+ useEffect as useEffect38,
12945
13055
  useMemo as useMemo48,
12946
13056
  useRef as useRef26,
12947
- useState as useState38
13057
+ useState as useState37
12948
13058
  } from "react";
12949
13059
  import { Internals as Internals29 } from "remotion";
12950
13060
  import { NoReactInternals as NoReactInternals10 } from "remotion/no-react";
@@ -15390,11 +15500,11 @@ var serializeTranslate = (x, y, decimalPlaces = translateDecimalPlaces) => {
15390
15500
  };
15391
15501
 
15392
15502
  // src/components/Timeline/TimelineScaleField.tsx
15393
- import { useCallback as useCallback40, useContext as useContext26, useMemo as useMemo45, useRef as useRef24, useState as useState36 } from "react";
15503
+ import { useCallback as useCallback40, useContext as useContext26, useMemo as useMemo45, useRef as useRef24, useState as useState35 } from "react";
15394
15504
  import { NoReactInternals as NoReactInternals5 } from "remotion/no-react";
15395
15505
 
15396
15506
  // src/components/NewComposition/InputDragger.tsx
15397
- import React58, { useCallback as useCallback38, useEffect as useEffect38, useMemo as useMemo44, useRef as useRef23, useState as useState35 } from "react";
15507
+ import React58, { useCallback as useCallback38, useEffect as useEffect37, useMemo as useMemo44, useRef as useRef23, useState as useState34 } from "react";
15398
15508
  import { interpolate as interpolate2 } from "remotion";
15399
15509
  import { jsx as jsx74 } from "react/jsx-runtime";
15400
15510
  var isInt = (num) => {
@@ -15437,8 +15547,8 @@ var InputDraggerForwardRefFn = ({
15437
15547
  dragDecimalPlaces,
15438
15548
  ...props
15439
15549
  }, ref2) => {
15440
- const [inputFallback, setInputFallback] = useState35(false);
15441
- const [dragging, setDragging] = useState35(false);
15550
+ const [inputFallback, setInputFallback] = useState34(false);
15551
+ const [dragging, setDragging] = useState34(false);
15442
15552
  const fallbackRef = useRef23(null);
15443
15553
  const pointerDownRef = useRef23(false);
15444
15554
  const style5 = useMemo44(() => {
@@ -15559,7 +15669,7 @@ var InputDraggerForwardRefFn = ({
15559
15669
  snapToStep,
15560
15670
  dragDecimalPlaces
15561
15671
  ]);
15562
- useEffect38(() => {
15672
+ useEffect37(() => {
15563
15673
  if (inputFallback) {
15564
15674
  fallbackRef.current?.select();
15565
15675
  }
@@ -15815,8 +15925,8 @@ var TimelineScaleField = ({
15815
15925
  onDragEnd,
15816
15926
  scaleLockNodePath
15817
15927
  }) => {
15818
- const [dragX, setDragX] = useState36(null);
15819
- const [dragY, setDragY] = useState36(null);
15928
+ const [dragX, setDragX] = useState35(null);
15929
+ const [dragY, setDragY] = useState35(null);
15820
15930
  const dragStartRef = useRef24(null);
15821
15931
  const { getScaleLockState, setScaleLockState } = useContext26(ScaleLockContext);
15822
15932
  const [codeX, codeY, codeZ] = useMemo45(() => NoReactInternals5.parseScaleValue(effectiveValue), [effectiveValue]);
@@ -16505,9 +16615,66 @@ var compensateTranslateForTransformOrigin = ({
16505
16615
  return [startTranslate[0] - compensationX, startTranslate[1] - compensationY];
16506
16616
  };
16507
16617
  var uvsEqual = (left3, right) => Math.abs(left3[0] - right[0]) < 0.000001 && Math.abs(left3[1] - right[1]) < 0.000001;
16618
+ var getSelectedOutlineTransformOriginLockedAxis = ({
16619
+ axisLocked,
16620
+ dimensions,
16621
+ startUv,
16622
+ uv
16623
+ }) => {
16624
+ if (!axisLocked) {
16625
+ return null;
16626
+ }
16627
+ const deltaX = (uv[0] - startUv[0]) * dimensions.width;
16628
+ const deltaY = (uv[1] - startUv[1]) * dimensions.height;
16629
+ return Math.abs(deltaX) >= Math.abs(deltaY) ? "x" : "y";
16630
+ };
16631
+ var applySelectedOutlineTransformOriginAxisLock = ({
16632
+ lockedAxis,
16633
+ startUv,
16634
+ uv
16635
+ }) => {
16636
+ if (lockedAxis === "x") {
16637
+ return [uv[0], startUv[1]];
16638
+ }
16639
+ if (lockedAxis === "y") {
16640
+ return [startUv[0], uv[1]];
16641
+ }
16642
+ return uv;
16643
+ };
16644
+ var transformOriginSnapTargets = [
16645
+ [0, 0],
16646
+ [0.5, 0],
16647
+ [1, 0],
16648
+ [1, 0.5],
16649
+ [1, 1],
16650
+ [0.5, 1],
16651
+ [0, 1],
16652
+ [0, 0.5],
16653
+ [0.5, 0.5]
16654
+ ];
16655
+ var selectedOutlineTransformOriginSnapThresholdPx = 10;
16656
+ var snapSelectedOutlineTransformOriginUv = ({
16657
+ point,
16658
+ points,
16659
+ thresholdPx = selectedOutlineTransformOriginSnapThresholdPx,
16660
+ uv
16661
+ }) => {
16662
+ let best = null;
16663
+ for (const snapUv of transformOriginSnapTargets) {
16664
+ const snapPoint = getUvHandlePosition(points, snapUv);
16665
+ const distance = Math.hypot(point.x - snapPoint.x, point.y - snapPoint.y);
16666
+ if (distance > thresholdPx) {
16667
+ continue;
16668
+ }
16669
+ if (best === null || distance < best.distance) {
16670
+ best = { distance, uv: snapUv };
16671
+ }
16672
+ }
16673
+ return best?.uv ?? uv;
16674
+ };
16508
16675
 
16509
16676
  // src/components/SelectedOutlineElement.tsx
16510
- import React61, { useContext as useContext27, useMemo as useMemo46, useRef as useRef25, useState as useState37 } from "react";
16677
+ import React61, { useContext as useContext27, useMemo as useMemo46, useRef as useRef25, useState as useState36 } from "react";
16511
16678
  import { Internals as Internals27 } from "remotion";
16512
16679
  import { NoReactInternals as NoReactInternals9 } from "remotion/no-react";
16513
16680
 
@@ -16906,14 +17073,39 @@ var SelectedOutlineTransformOriginHandle = ({ outline, onDraggingChange, target
16906
17073
  const defaultOrigin = transformOriginDrag.originDefault !== undefined ? JSON.stringify(transformOriginDrag.originDefault) : null;
16907
17074
  const defaultTranslate = transformOriginDrag.translateDefault !== undefined ? JSON.stringify(transformOriginDrag.translateDefault) : null;
16908
17075
  let last = null;
17076
+ let currentPointerX = event.clientX;
17077
+ let currentPointerY = event.clientY;
17078
+ let axisLocked = event.shiftKey;
16909
17079
  onDraggingChange(true);
16910
17080
  forceSpecificCursor("crosshair");
16911
- const updateFromPointerEvent = (pointerEvent) => {
17081
+ const updateFromPointerPosition = () => {
16912
17082
  const point = {
16913
- x: pointerEvent.clientX - svgRect.left,
16914
- y: pointerEvent.clientY - svgRect.top
17083
+ x: currentPointerX - svgRect.left,
17084
+ y: currentPointerY - svgRect.top
16915
17085
  };
16916
- const nextUv = getUvCoordinateForPoint(outline.points, point);
17086
+ const rawUv = getUvCoordinateForPoint(outline.points, point);
17087
+ const lockedAxis = getSelectedOutlineTransformOriginLockedAxis({
17088
+ axisLocked,
17089
+ dimensions,
17090
+ startUv: uv,
17091
+ uv: rawUv
17092
+ });
17093
+ const axisLockedUv = applySelectedOutlineTransformOriginAxisLock({
17094
+ lockedAxis,
17095
+ startUv: uv,
17096
+ uv: rawUv
17097
+ });
17098
+ const snapPoint = lockedAxis === null ? point : getUvHandlePosition(outline.points, axisLockedUv);
17099
+ const snappedUv = snapSelectedOutlineTransformOriginUv({
17100
+ point: snapPoint,
17101
+ points: outline.points,
17102
+ uv: axisLockedUv
17103
+ });
17104
+ const nextUv = applySelectedOutlineTransformOriginAxisLock({
17105
+ lockedAxis,
17106
+ startUv: uv,
17107
+ uv: snappedUv
17108
+ });
16917
17109
  const deltaOrigin = [
16918
17110
  (nextUv[0] - uv[0]) * dimensions.width,
16919
17111
  (nextUv[1] - uv[1]) * dimensions.height
@@ -16941,15 +17133,31 @@ var SelectedOutlineTransformOriginHandle = ({ outline, onDraggingChange, target
16941
17133
  value: translate
16942
17134
  }) : Internals27.makeStaticDragOverride(translate));
16943
17135
  };
16944
- updateFromPointerEvent(event);
17136
+ updateFromPointerPosition();
16945
17137
  const onPointerMove = (moveEvent) => {
16946
17138
  moveEvent.preventDefault();
16947
- updateFromPointerEvent(moveEvent);
17139
+ currentPointerX = moveEvent.clientX;
17140
+ currentPointerY = moveEvent.clientY;
17141
+ axisLocked = moveEvent.shiftKey;
17142
+ updateFromPointerPosition();
17143
+ };
17144
+ const onKeyChange = (keyEvent) => {
17145
+ if (keyEvent.key !== "Shift") {
17146
+ return;
17147
+ }
17148
+ const nextAxisLocked = keyEvent.type === "keydown";
17149
+ if (nextAxisLocked === axisLocked) {
17150
+ return;
17151
+ }
17152
+ axisLocked = nextAxisLocked;
17153
+ updateFromPointerPosition();
16948
17154
  };
16949
17155
  const onPointerUp = () => {
16950
17156
  window.removeEventListener("pointermove", onPointerMove);
16951
17157
  window.removeEventListener("pointerup", onPointerUp);
16952
17158
  window.removeEventListener("pointercancel", onPointerUp);
17159
+ window.removeEventListener("keydown", onKeyChange);
17160
+ window.removeEventListener("keyup", onKeyChange);
16953
17161
  stopForcingSpecificCursor();
16954
17162
  onDraggingChange(false);
16955
17163
  if (last === null || uvsEqual(last.uv, uv)) {
@@ -17018,6 +17226,8 @@ var SelectedOutlineTransformOriginHandle = ({ outline, onDraggingChange, target
17018
17226
  window.addEventListener("pointermove", onPointerMove);
17019
17227
  window.addEventListener("pointerup", onPointerUp);
17020
17228
  window.addEventListener("pointercancel", onPointerUp);
17229
+ window.addEventListener("keydown", onKeyChange);
17230
+ window.addEventListener("keyup", onKeyChange);
17021
17231
  }, [
17022
17232
  clearDragOverrides,
17023
17233
  onDraggingChange,
@@ -17091,7 +17301,7 @@ var SelectedOutlinePolygon = ({
17091
17301
  const selected = target?.selected ?? false;
17092
17302
  const containsSelection = target?.containsSelection ?? false;
17093
17303
  const effectDrop = target?.effectDrop ?? null;
17094
- const [effectDropHovered, setEffectDropHovered] = useState37(false);
17304
+ const [effectDropHovered, setEffectDropHovered] = useState36(false);
17095
17305
  const visible = containsSelection || hovered;
17096
17306
  const onPointerDown = React61.useCallback((event) => {
17097
17307
  if (event.button !== 0 || target === undefined) {
@@ -17345,8 +17555,6 @@ var SelectedOutlineScaleEdgeLine = ({
17345
17555
  if (interaction.shiftKey || interaction.toggleKey) {
17346
17556
  return;
17347
17557
  }
17348
- onDraggingChange(true);
17349
- forceSpecificCursor(edgeInfo.cursor);
17350
17558
  const startPointer = { x: event.clientX, y: event.clientY };
17351
17559
  const dragStates = getSelectedOutlineScaleDragStates({
17352
17560
  dragTargets: selected ? allScaleDragTargets : [scaleDrag],
@@ -17354,12 +17562,24 @@ var SelectedOutlineScaleEdgeLine = ({
17354
17562
  timelinePosition: timelinePositionRef.current
17355
17563
  });
17356
17564
  let lastValues = new Map;
17565
+ let dragStarted = false;
17357
17566
  const onPointerMove = (moveEvent) => {
17358
17567
  moveEvent.preventDefault();
17359
17568
  const delta = {
17360
17569
  x: moveEvent.clientX - startPointer.x,
17361
17570
  y: moveEvent.clientY - startPointer.y
17362
17571
  };
17572
+ if (!dragStarted) {
17573
+ if (!isSelectedOutlineDragPastThreshold({
17574
+ deltaX: delta.x,
17575
+ deltaY: delta.y
17576
+ })) {
17577
+ return;
17578
+ }
17579
+ dragStarted = true;
17580
+ onDraggingChange(true);
17581
+ forceSpecificCursor(edgeInfo.cursor);
17582
+ }
17363
17583
  const projectedDelta = dot(delta, edgeInfo.normal);
17364
17584
  const scaleFactor = Math.max(0.001, 1 + projectedDelta / edgeInfo.extent);
17365
17585
  lastValues = getSelectedOutlineScaleDragValues({
@@ -17387,8 +17607,10 @@ var SelectedOutlineScaleEdgeLine = ({
17387
17607
  window.removeEventListener("pointermove", onPointerMove);
17388
17608
  window.removeEventListener("pointerup", onPointerUp);
17389
17609
  window.removeEventListener("pointercancel", onPointerUp);
17390
- stopForcingSpecificCursor();
17391
- onDraggingChange(false);
17610
+ if (dragStarted) {
17611
+ stopForcingSpecificCursor();
17612
+ onDraggingChange(false);
17613
+ }
17392
17614
  const changes = getSelectedOutlineScaleDragChanges({
17393
17615
  dragStates,
17394
17616
  lastValues
@@ -17526,8 +17748,7 @@ var SelectedOutlineRotationCornerHandle = ({
17526
17748
  if (interaction.shiftKey || interaction.toggleKey) {
17527
17749
  return;
17528
17750
  }
17529
- onDraggingChange(true);
17530
- forceSpecificCursor(cornerInfo.cursor);
17751
+ const startPointer = { x: event.clientX, y: event.clientY };
17531
17752
  const svgRect = svg.getBoundingClientRect();
17532
17753
  const center2 = svgPointToClientPoint(getSelectedOutlineRotationPivot({
17533
17754
  dimensions: outline.dimensions,
@@ -17545,8 +17766,21 @@ var SelectedOutlineRotationCornerHandle = ({
17545
17766
  });
17546
17767
  let accumulatedDelta = 0;
17547
17768
  let lastValues = new Map;
17769
+ let dragStarted = false;
17548
17770
  const onPointerMove = (moveEvent) => {
17549
17771
  moveEvent.preventDefault();
17772
+ const screenDeltaX = moveEvent.clientX - startPointer.x;
17773
+ const screenDeltaY = moveEvent.clientY - startPointer.y;
17774
+ if (!dragStarted) {
17775
+ if (!isSelectedOutlineDragPastThreshold({
17776
+ deltaX: screenDeltaX,
17777
+ deltaY: screenDeltaY
17778
+ })) {
17779
+ return;
17780
+ }
17781
+ dragStarted = true;
17782
+ onDraggingChange(true);
17783
+ }
17550
17784
  const nextAngle = getAngleDegrees(center2, {
17551
17785
  x: moveEvent.clientX,
17552
17786
  y: moveEvent.clientY
@@ -17581,8 +17815,10 @@ var SelectedOutlineRotationCornerHandle = ({
17581
17815
  window.removeEventListener("pointermove", onPointerMove);
17582
17816
  window.removeEventListener("pointerup", onPointerUp);
17583
17817
  window.removeEventListener("pointercancel", onPointerUp);
17584
- stopForcingSpecificCursor();
17585
- onDraggingChange(false);
17818
+ if (dragStarted) {
17819
+ stopForcingSpecificCursor();
17820
+ onDraggingChange(false);
17821
+ }
17586
17822
  const changes = getSelectedOutlineRotationDragChanges({
17587
17823
  dragStates,
17588
17824
  lastValues
@@ -18025,9 +18261,9 @@ var SelectedOutlineOverlay = ({ scale }) => {
18025
18261
  const { frameBack, frameForward, getCurrentFrame: getCurrentFrame2, seek } = PlayerInternals9.usePlayer();
18026
18262
  const keybindings = useKeybinding();
18027
18263
  const timelinePosition = Internals29.Timeline.useTimelinePosition();
18028
- const [outlines, setOutlines] = useState38([]);
18029
- const [hoveredOutlineKey, setHoveredOutlineKey] = useState38(null);
18030
- const [draggingOutline, setDraggingOutline] = useState38(false);
18264
+ const [outlines, setOutlines] = useState37([]);
18265
+ const [hoveredOutlineKey, setHoveredOutlineKey] = useState37(null);
18266
+ const [draggingOutline, setDraggingOutline] = useState37(false);
18031
18267
  const overlayRef = useRef26(null);
18032
18268
  const keyboardNudgeSessionRef = useRef26(null);
18033
18269
  const saveKeyboardNudgeSessionRef = useRef26(() => {
@@ -18205,7 +18441,7 @@ var SelectedOutlineOverlay = ({ scale }) => {
18205
18441
  sequences,
18206
18442
  timelinePosition
18207
18443
  ]);
18208
- useEffect39(() => {
18444
+ useEffect38(() => {
18209
18445
  if (hoveredOutlineKey !== null && !outlineTargets.some((target) => target.key === hoveredOutlineKey)) {
18210
18446
  setHoveredOutlineKey(null);
18211
18447
  }
@@ -18268,10 +18504,10 @@ var SelectedOutlineOverlay = ({ scale }) => {
18268
18504
  });
18269
18505
  });
18270
18506
  }, [clearDragOverrides, setPropStatuses]);
18271
- useEffect39(() => {
18507
+ useEffect38(() => {
18272
18508
  saveKeyboardNudgeSessionRef.current = saveKeyboardNudgeSession;
18273
18509
  }, [saveKeyboardNudgeSession]);
18274
- useEffect39(() => {
18510
+ useEffect38(() => {
18275
18511
  return () => {
18276
18512
  saveKeyboardNudgeSessionRef.current();
18277
18513
  };
@@ -18406,7 +18642,7 @@ var SelectedOutlineOverlay = ({ scale }) => {
18406
18642
  event.preventDefault();
18407
18643
  saveKeyboardNudgeSession();
18408
18644
  }, [saveKeyboardNudgeSession]);
18409
- useEffect39(() => {
18645
+ useEffect38(() => {
18410
18646
  const keyDownBindings = ["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"].map((key2) => keybindings.registerKeybinding({
18411
18647
  event: "keydown",
18412
18648
  key: key2,
@@ -18431,7 +18667,7 @@ var SelectedOutlineOverlay = ({ scale }) => {
18431
18667
  }
18432
18668
  };
18433
18669
  }, [keybindings, onArrowKeyDown, onArrowKeyUp, saveKeyboardNudgeSession]);
18434
- useEffect39(() => {
18670
+ useEffect38(() => {
18435
18671
  if (outlineTargets.length === 0) {
18436
18672
  setOutlines((prevOutlines) => prevOutlines.length === 0 ? prevOutlines : []);
18437
18673
  return;
@@ -18722,7 +18958,7 @@ var PortalContainer = ({ scale, xCorrection, yCorrection, contentDimensions }) =
18722
18958
  xCorrection,
18723
18959
  yCorrection
18724
18960
  ]);
18725
- useEffect40(() => {
18961
+ useEffect39(() => {
18726
18962
  const { current } = portalContainer;
18727
18963
  current?.appendChild(Internals30.portalNode());
18728
18964
  return () => {
@@ -18735,7 +18971,7 @@ var PortalContainer = ({ scale, xCorrection, yCorrection, contentDimensions }) =
18735
18971
  }
18736
18972
  clearSelection();
18737
18973
  }, [clearSelection]);
18738
- useEffect40(() => {
18974
+ useEffect39(() => {
18739
18975
  const { current } = portalContainer;
18740
18976
  if (!current) {
18741
18977
  return;
@@ -18888,8 +19124,8 @@ var Canvas = ({ canvasContent, size: size2 }) => {
18888
19124
  const { editorShowGuides } = useContext32(EditorShowGuidesContext);
18889
19125
  const { compositions } = useContext32(Internals31.CompositionManager);
18890
19126
  const { previewServerState } = useContext32(StudioServerConnectionCtx);
18891
- const [isAddingAsset, setIsAddingAsset] = useState39(false);
18892
- const [assetResolution, setAssetResolution] = useState39(null);
19127
+ const [isAddingAsset, setIsAddingAsset] = useState38(false);
19128
+ const [assetResolution, setAssetResolution] = useState38(null);
18893
19129
  const currentCompositionId = canvasContent.type === "composition" ? canvasContent.compositionId : null;
18894
19130
  const currentComposition = useMemo50(() => {
18895
19131
  if (currentCompositionId === null) {
@@ -18983,7 +19219,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
18983
19219
  };
18984
19220
  });
18985
19221
  }, [editorZoomGestures, contentDimensions, isFit, setSize, size2]);
18986
- useEffect41(() => {
19222
+ useEffect40(() => {
18987
19223
  const { current } = canvasRef;
18988
19224
  if (!current) {
18989
19225
  return;
@@ -18994,7 +19230,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
18994
19230
  };
18995
19231
  }, [onWheel]);
18996
19232
  const supportsWebKitPinch = typeof window !== "undefined" && "GestureEvent" in window;
18997
- useEffect41(() => {
19233
+ useEffect40(() => {
18998
19234
  const { current } = canvasRef;
18999
19235
  if (!current || !editorZoomGestures || !supportsWebKitPinch) {
19000
19236
  return;
@@ -19069,7 +19305,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
19069
19305
  current.removeEventListener("gesturecancel", onGestureEnd);
19070
19306
  };
19071
19307
  }, [editorZoomGestures, setSize, supportsWebKitPinch]);
19072
- useEffect41(() => {
19308
+ useEffect40(() => {
19073
19309
  const { current } = canvasRef;
19074
19310
  if (!current || !editorZoomGestures) {
19075
19311
  return;
@@ -19203,7 +19439,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
19203
19439
  };
19204
19440
  });
19205
19441
  }, [contentDimensions, setSize, size2]);
19206
- useEffect41(() => {
19442
+ useEffect40(() => {
19207
19443
  const resetBinding = keybindings.registerKeybinding({
19208
19444
  event: "keydown",
19209
19445
  key: "0",
@@ -19245,7 +19481,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
19245
19481
  const metadata = await getAssetMetadata(canvasContent, canvasContent.type === "asset");
19246
19482
  setAssetResolution(metadata);
19247
19483
  }, [canvasContent]);
19248
- useEffect41(() => {
19484
+ useEffect40(() => {
19249
19485
  if (canvasContent.type !== "asset") {
19250
19486
  return;
19251
19487
  }
@@ -19256,7 +19492,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
19256
19492
  file.cancel();
19257
19493
  };
19258
19494
  }, [canvasContent, fetchMetadata]);
19259
- useEffect41(() => {
19495
+ useEffect40(() => {
19260
19496
  fetchMetadata();
19261
19497
  }, [fetchMetadata]);
19262
19498
  const onDragOver = useCallback43((event) => {
@@ -19352,7 +19588,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
19352
19588
  previewSize,
19353
19589
  size2
19354
19590
  ]);
19355
- useEffect41(() => {
19591
+ useEffect40(() => {
19356
19592
  if (!canDropAssets) {
19357
19593
  return;
19358
19594
  }
@@ -19401,14 +19637,14 @@ var Canvas = ({ canvasContent, size: size2 }) => {
19401
19637
  };
19402
19638
 
19403
19639
  // src/components/FramePersistor.tsx
19404
- import { useEffect as useEffect42 } from "react";
19640
+ import { useEffect as useEffect41 } from "react";
19405
19641
  import { Internals as Internals32, useVideoConfig as useVideoConfig2 } from "remotion";
19406
19642
  var FramePersistor = () => {
19407
19643
  const [playing] = Internals32.Timeline.usePlayingState();
19408
19644
  const config = useVideoConfig2();
19409
19645
  const frame2 = Internals32.Timeline.useTimelinePosition();
19410
19646
  const setFrame = Internals32.useTimelineSetFrame();
19411
- useEffect42(() => {
19647
+ useEffect41(() => {
19412
19648
  if (!playing) {
19413
19649
  setFrame((f) => {
19414
19650
  const newObj = f[config.id] === frame2 ? f : { ...f, [config.id]: frame2 };
@@ -19508,7 +19744,7 @@ var CanvasOrLoading = ({ size: size2 }) => {
19508
19744
  const { setZoom } = useContext33(TimelineZoomCtx);
19509
19745
  const { canvasContent } = useContext33(Internals33.CompositionManager);
19510
19746
  const { error: renderError } = useContext33(RenderErrorContext);
19511
- useEffect43(() => {
19747
+ useEffect42(() => {
19512
19748
  if (resolved?.type !== "success" && resolved?.type !== "success-and-refreshing") {
19513
19749
  return;
19514
19750
  }
@@ -19614,11 +19850,7 @@ var CanvasIfSizeIsAvailable = () => {
19614
19850
  if (!size2) {
19615
19851
  return null;
19616
19852
  }
19617
- return {
19618
- ...size2,
19619
- width: size2.width - RULER_WIDTH,
19620
- height: size2.height - RULER_WIDTH
19621
- };
19853
+ return applyRulerInsetsToCanvasSize({ rulersAreVisible, size: size2 });
19622
19854
  }, [context, rulersAreVisible]);
19623
19855
  if (!sizeWithRulersApplied) {
19624
19856
  return null;
@@ -19629,7 +19861,7 @@ var CanvasIfSizeIsAvailable = () => {
19629
19861
  };
19630
19862
 
19631
19863
  // src/components/CurrentCompositionSideEffects.tsx
19632
- import { useCallback as useCallback44, useContext as useContext35, useEffect as useEffect44 } from "react";
19864
+ import { useCallback as useCallback44, useContext as useContext35, useEffect as useEffect43 } from "react";
19633
19865
  import { Internals as Internals35 } from "remotion";
19634
19866
 
19635
19867
  // src/helpers/document-title.ts
@@ -19687,7 +19919,7 @@ var TitleUpdater = () => {
19687
19919
  const renderQueue = useContext35(RenderQueueContext);
19688
19920
  const { canvasContent } = useContext35(Internals35.CompositionManager);
19689
19921
  const { jobs } = renderQueue;
19690
- useEffect44(() => {
19922
+ useEffect43(() => {
19691
19923
  if (!canvasContent) {
19692
19924
  setCurrentCanvasContentId(null);
19693
19925
  return;
@@ -19706,7 +19938,7 @@ var TitleUpdater = () => {
19706
19938
  }
19707
19939
  setCurrentCanvasContentId(canvasContent.asset);
19708
19940
  }, [canvasContent]);
19709
- useEffect44(() => {
19941
+ useEffect43(() => {
19710
19942
  setRenderJobs(jobs);
19711
19943
  }, [jobs]);
19712
19944
  return null;
@@ -19726,7 +19958,7 @@ var CurrentCompositionKeybindings = ({ readOnlyStudio }) => {
19726
19958
  const renderButton = document.getElementById("render-modal-button");
19727
19959
  renderButton.click();
19728
19960
  }, [readOnlyStudio, type, video]);
19729
- useEffect44(() => {
19961
+ useEffect43(() => {
19730
19962
  const binding = keybindings.registerKeybinding({
19731
19963
  event: "keydown",
19732
19964
  key: "r",
@@ -19744,14 +19976,14 @@ var CurrentCompositionKeybindings = ({ readOnlyStudio }) => {
19744
19976
  };
19745
19977
 
19746
19978
  // src/components/ExplorerPanel.tsx
19747
- import { useCallback as useCallback55, useImperativeHandle as useImperativeHandle10, useState as useState46 } from "react";
19979
+ import { useCallback as useCallback55, useImperativeHandle as useImperativeHandle10, useState as useState45 } from "react";
19748
19980
 
19749
19981
  // src/components/AssetSelector.tsx
19750
- import { useCallback as useCallback47, useContext as useContext38, useMemo as useMemo55, useState as useState42 } from "react";
19982
+ import { useCallback as useCallback47, useContext as useContext38, useMemo as useMemo55, useState as useState41 } from "react";
19751
19983
  import { Internals as Internals38 } from "remotion";
19752
19984
 
19753
19985
  // src/helpers/use-asset-drag-events.ts
19754
- import { useCallback as useCallback45, useEffect as useEffect45, useMemo as useMemo52, useRef as useRef29 } from "react";
19986
+ import { useCallback as useCallback45, useEffect as useEffect44, useMemo as useMemo52, useRef as useRef29 } from "react";
19755
19987
  import { NoReactInternals as NoReactInternals12 } from "remotion/no-react";
19756
19988
  var isFileDragEvent2 = (event) => {
19757
19989
  return Array.from(event.dataTransfer.types).includes("Files");
@@ -19787,7 +20019,7 @@ function useAssetDragEvents({
19787
20019
  setDropLocation((currentPath) => currentPath === combinedParents ? parentFolder : currentPath);
19788
20020
  }
19789
20021
  }, [combinedParents, dragDepthRef, parentFolder, setDropLocation]);
19790
- useEffect45(() => {
20022
+ useEffect44(() => {
19791
20023
  if (dropLocation === null) {
19792
20024
  dragDepthRef.current = 0;
19793
20025
  }
@@ -19805,10 +20037,10 @@ import { ASSET_DRAG_MIME_TYPE as ASSET_DRAG_MIME_TYPE3, makeAssetDragData } from
19805
20037
  import {
19806
20038
  useCallback as useCallback46,
19807
20039
  useContext as useContext36,
19808
- useLayoutEffect as useLayoutEffect2,
20040
+ useLayoutEffect as useLayoutEffect3,
19809
20041
  useMemo as useMemo53,
19810
20042
  useRef as useRef30,
19811
- useState as useState40
20043
+ useState as useState39
19812
20044
  } from "react";
19813
20045
  import { Internals as Internals36 } from "remotion";
19814
20046
  import { NoReactInternals as NoReactInternals14 } from "remotion/no-react";
@@ -20285,7 +20517,7 @@ var AssetFolderItem = ({
20285
20517
  setDropLocation,
20286
20518
  readOnlyStudio
20287
20519
  }) => {
20288
- const [hovered, setHovered] = useState40(false);
20520
+ const [hovered, setHovered] = useState39(false);
20289
20521
  const openFolderTimerRef = useRef30(null);
20290
20522
  const { isDropDiv, onDragEnter, onDragLeave } = use_asset_drag_events_default({
20291
20523
  name: item.name,
@@ -20420,8 +20652,8 @@ var AssetFolderTree = ({
20420
20652
  };
20421
20653
  var AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio }) => {
20422
20654
  const isMobileLayout = useMobileLayout();
20423
- const [hovered, setHovered] = useState40(false);
20424
- const [isDragging, setIsDragging] = useState40(false);
20655
+ const [hovered, setHovered] = useState39(false);
20656
+ const [isDragging, setIsDragging] = useState39(false);
20425
20657
  const { setSidebarCollapsedState } = useContext36(SidebarContext);
20426
20658
  const { setSelectedModal } = useContext36(ModalsContext);
20427
20659
  const confirm = useConfirmationDialog();
@@ -20447,7 +20679,7 @@ var AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio }
20447
20679
  setHovered(false);
20448
20680
  }, []);
20449
20681
  const rowRef = useRef30(null);
20450
- useLayoutEffect2(() => {
20682
+ useLayoutEffect3(() => {
20451
20683
  maybeScrollAssetSidebarRowIntoView({
20452
20684
  element: rowRef.current,
20453
20685
  assetPath: relativePath,
@@ -20726,7 +20958,7 @@ var formatMediaDuration = (seconds) => {
20726
20958
  // src/helpers/use-media-metadata.ts
20727
20959
  import { getVideoMetadata as getVideoMetadata3 } from "@remotion/media-utils";
20728
20960
  import { ALL_FORMATS, Input, UrlSource } from "mediabunny";
20729
- import { useEffect as useEffect46, useState as useState41 } from "react";
20961
+ import { useEffect as useEffect45, useState as useState40 } from "react";
20730
20962
 
20731
20963
  // src/helpers/get-duration-or-compute.ts
20732
20964
  var getDurationOrCompute = async (input) => {
@@ -20821,8 +21053,8 @@ var getMediaMetadata = (src) => {
20821
21053
  return request;
20822
21054
  };
20823
21055
  var useMediaMetadata = (src) => {
20824
- const [mediaMetadata, setMediaMetadata] = useState41(src ? cache.get(src) ?? null : null);
20825
- useEffect46(() => {
21056
+ const [mediaMetadata, setMediaMetadata] = useState40(src ? cache.get(src) ?? null : null);
21057
+ useEffect45(() => {
20826
21058
  const cached = src ? cache.get(src) ?? null : null;
20827
21059
  setMediaMetadata(cached);
20828
21060
  if (!src || cached) {
@@ -20969,7 +21201,7 @@ var AssetSelector = ({ readOnlyStudio }) => {
20969
21201
  const { tabIndex } = useZIndex();
20970
21202
  const { canvasContent } = useContext38(Internals38.CompositionManager);
20971
21203
  const { assetFoldersExpanded, setAssetFoldersExpanded } = useContext38(FolderContext);
20972
- const [dropLocation, setDropLocation] = useState42(null);
21204
+ const [dropLocation, setDropLocation] = useState41(null);
20973
21205
  const connectionStatus = useContext38(StudioServerConnectionCtx).previewServerState.type;
20974
21206
  const shouldAllowUpload = connectionStatus === "connected" && !readOnlyStudio;
20975
21207
  const showCurrentAsset = canvasContent?.type === "asset";
@@ -21113,10 +21345,10 @@ import { Internals as Internals41 } from "remotion";
21113
21345
  import {
21114
21346
  useCallback as useCallback51,
21115
21347
  useContext as useContext41,
21116
- useLayoutEffect as useLayoutEffect3,
21348
+ useLayoutEffect as useLayoutEffect4,
21117
21349
  useMemo as useMemo59,
21118
21350
  useRef as useRef32,
21119
- useState as useState44
21351
+ useState as useState43
21120
21352
  } from "react";
21121
21353
 
21122
21354
  // src/helpers/is-composition-still.ts
@@ -21172,7 +21404,7 @@ var EllipsisIcon = (props) => {
21172
21404
 
21173
21405
  // src/components/InlineDropdown.tsx
21174
21406
  import { PlayerInternals as PlayerInternals11 } from "@remotion/player";
21175
- import { useCallback as useCallback48, useMemo as useMemo56, useRef as useRef31, useState as useState43 } from "react";
21407
+ import { useCallback as useCallback48, useMemo as useMemo56, useRef as useRef31, useState as useState42 } from "react";
21176
21408
  import ReactDOM5 from "react-dom";
21177
21409
  import { jsx as jsx97, jsxs as jsxs45, Fragment as Fragment20 } from "react/jsx-runtime";
21178
21410
  var InlineDropdown = ({
@@ -21180,7 +21412,7 @@ var InlineDropdown = ({
21180
21412
  ...props
21181
21413
  }) => {
21182
21414
  const ref2 = useRef31(null);
21183
- const [opened, setOpened] = useState43({ type: "not-open" });
21415
+ const [opened, setOpened] = useState42({ type: "not-open" });
21184
21416
  const { currentZIndex } = useZIndex();
21185
21417
  const size2 = PlayerInternals11.useElementSize(ref2, {
21186
21418
  triggerOnWindowResize: true,
@@ -21612,7 +21844,7 @@ var CompositionSelectorItem = ({
21612
21844
  }
21613
21845
  return false;
21614
21846
  }, [item, currentComposition]);
21615
- const [hovered, setHovered] = useState44(false);
21847
+ const [hovered, setHovered] = useState43(false);
21616
21848
  const onPointerEnter = useCallback51(() => {
21617
21849
  setHovered(true);
21618
21850
  }, []);
@@ -21621,7 +21853,7 @@ var CompositionSelectorItem = ({
21621
21853
  }, []);
21622
21854
  const compositionRowRef = useRef32(null);
21623
21855
  const compositionId = item.type === "composition" ? item.composition.id : null;
21624
- useLayoutEffect3(() => {
21856
+ useLayoutEffect4(() => {
21625
21857
  if (compositionId === null) {
21626
21858
  return;
21627
21859
  }
@@ -22083,7 +22315,7 @@ var CompSelectorRef = ({ children }) => {
22083
22315
  };
22084
22316
 
22085
22317
  // src/components/Tabs/index.tsx
22086
- import { useCallback as useCallback54, useMemo as useMemo62, useState as useState45 } from "react";
22318
+ import { useCallback as useCallback54, useMemo as useMemo62, useState as useState44 } from "react";
22087
22319
  import { jsx as jsx105 } from "react/jsx-runtime";
22088
22320
  var tabsContainer = {
22089
22321
  display: "flex",
@@ -22117,7 +22349,7 @@ var selectorButton = {
22117
22349
  WebkitUserSelect: "none"
22118
22350
  };
22119
22351
  var Tab = ({ children, onClick, style: style5, selected }) => {
22120
- const [hovered, setHovered] = useState45(false);
22352
+ const [hovered, setHovered] = useState44(false);
22121
22353
  const { tabIndex } = useZIndex();
22122
22354
  const onPointerEnter = useCallback54(() => {
22123
22355
  setHovered(true);
@@ -22169,7 +22401,7 @@ var persistSelectedOptionsSidebarPanel = (panel2) => {
22169
22401
  localStorage.setItem(localStorageKey, panel2);
22170
22402
  };
22171
22403
  var ExplorerPanel = ({ readOnlyStudio }) => {
22172
- const [panel2, setPanel] = useState46(() => getSelectedPanel());
22404
+ const [panel2, setPanel] = useState45(() => getSelectedPanel());
22173
22405
  const onCompositionsSelected = useCallback55(() => {
22174
22406
  setPanel("compositions");
22175
22407
  persistSelectedOptionsSidebarPanel("compositions");
@@ -22271,9 +22503,9 @@ function MobilePanel({
22271
22503
  import React75, {
22272
22504
  useCallback as useCallback56,
22273
22505
  useContext as useContext44,
22274
- useEffect as useEffect47,
22506
+ useEffect as useEffect46,
22275
22507
  useMemo as useMemo63,
22276
- useState as useState47
22508
+ useState as useState46
22277
22509
  } from "react";
22278
22510
  import { Internals as Internals43 } from "remotion";
22279
22511
  import { NoReactInternals as NoReactInternals16 } from "remotion/no-react";
@@ -22282,7 +22514,7 @@ var ObserveDefaultPropsContext = React75.createContext(null);
22282
22514
  var ObserveDefaultProps = ({ compositionId, readOnlyStudio, children }) => {
22283
22515
  const { previewServerState, subscribeToEvent } = useContext44(StudioServerConnectionCtx);
22284
22516
  const { updateProps } = useContext44(Internals43.EditorPropsContext);
22285
- const [canSaveDefaultPropsObjectState, setCanSaveDefaultProps] = useState47({});
22517
+ const [canSaveDefaultPropsObjectState, setCanSaveDefaultProps] = useState46({});
22286
22518
  const canSaveDefaultProps = useMemo63(() => {
22287
22519
  if (compositionId === null) {
22288
22520
  return null;
@@ -22313,7 +22545,7 @@ var ObserveDefaultProps = ({ compositionId, readOnlyStudio, children }) => {
22313
22545
  }));
22314
22546
  }
22315
22547
  }, [updateProps]);
22316
- useEffect47(() => {
22548
+ useEffect46(() => {
22317
22549
  if (readOnlyStudio || !clientId || compositionId === null) {
22318
22550
  return;
22319
22551
  }
@@ -22332,7 +22564,7 @@ var ObserveDefaultProps = ({ compositionId, readOnlyStudio, children }) => {
22332
22564
  }).catch(() => {});
22333
22565
  };
22334
22566
  }, [readOnlyStudio, clientId, compositionId, applyResult]);
22335
- useEffect47(() => {
22567
+ useEffect46(() => {
22336
22568
  const unsub = subscribeToEvent("default-props-updatable-changed", (e) => {
22337
22569
  if (e.type !== "default-props-updatable-changed") {
22338
22570
  return;
@@ -22360,7 +22592,7 @@ import {
22360
22592
  useContext as useContext62,
22361
22593
  useImperativeHandle as useImperativeHandle12,
22362
22594
  useMemo as useMemo109,
22363
- useState as useState65
22595
+ useState as useState64
22364
22596
  } from "react";
22365
22597
  import { Internals as Internals47 } from "remotion";
22366
22598
 
@@ -22369,11 +22601,11 @@ import {
22369
22601
  createContext as createContext20,
22370
22602
  createRef as createRef9,
22371
22603
  useCallback as useCallback57,
22372
- useEffect as useEffect49,
22604
+ useEffect as useEffect48,
22373
22605
  useImperativeHandle as useImperativeHandle11,
22374
22606
  useMemo as useMemo65,
22375
22607
  useRef as useRef33,
22376
- useState as useState49
22608
+ useState as useState48
22377
22609
  } from "react";
22378
22610
  import { useRemotionEnvironment as useRemotionEnvironment2 } from "remotion";
22379
22611
 
@@ -22396,9 +22628,9 @@ function getZodSchemaFromPrimitive(value, z) {
22396
22628
  import {
22397
22629
  createContext as createContext19,
22398
22630
  useContext as useContext45,
22399
- useEffect as useEffect48,
22631
+ useEffect as useEffect47,
22400
22632
  useMemo as useMemo64,
22401
- useState as useState48
22633
+ useState as useState47
22402
22634
  } from "react";
22403
22635
  import { jsx as jsx109 } from "react/jsx-runtime";
22404
22636
  async function getZodIfPossible() {
@@ -22435,16 +22667,16 @@ var useZodTypesIfPossible = () => {
22435
22667
  };
22436
22668
  var ZodContext = createContext19(null);
22437
22669
  var ZodProvider = ({ children }) => {
22438
- const [zod, setZod] = useState48(null);
22439
- const [zodV3, setZodV3] = useState48(null);
22440
- const [zodTypes, setZodTypes] = useState48(null);
22441
- useEffect48(() => {
22670
+ const [zod, setZod] = useState47(null);
22671
+ const [zodV3, setZodV3] = useState47(null);
22672
+ const [zodTypes, setZodTypes] = useState47(null);
22673
+ useEffect47(() => {
22442
22674
  getZodIfPossible().then((z) => setZod(z));
22443
22675
  }, []);
22444
- useEffect48(() => {
22676
+ useEffect47(() => {
22445
22677
  getZodV3IfPossible().then((z) => setZodV3(z));
22446
22678
  }, []);
22447
- useEffect48(() => {
22679
+ useEffect47(() => {
22448
22680
  getZTypesIfPossible().then((z) => setZodTypes(z));
22449
22681
  }, []);
22450
22682
  const contextValue = useMemo64(() => {
@@ -22513,7 +22745,7 @@ var SetVisualControlsContext = createContext20({
22513
22745
  });
22514
22746
  var VisualControlsProvider = ({ children }) => {
22515
22747
  const imperativeHandles = useRef33({});
22516
- const [handles, setHandles] = useState49({});
22748
+ const [handles, setHandles] = useState48({});
22517
22749
  const state = useMemo65(() => {
22518
22750
  return {
22519
22751
  handles
@@ -22582,7 +22814,7 @@ var VisualControlsProvider = ({ children }) => {
22582
22814
  globalVisualControl: visualControl
22583
22815
  };
22584
22816
  }, [visualControl]);
22585
- useEffect49(() => {
22817
+ useEffect48(() => {
22586
22818
  const callback = () => {
22587
22819
  if (imperativeHandles.current) {
22588
22820
  updateHandles();
@@ -22618,7 +22850,7 @@ var VisualControlsProvider = ({ children }) => {
22618
22850
  import { useContext as useContext49 } from "react";
22619
22851
 
22620
22852
  // src/components/RenderModal/DataEditor.tsx
22621
- import React109, { useCallback as useCallback86, useContext as useContext48, useMemo as useMemo98, useState as useState60 } from "react";
22853
+ import React109, { useCallback as useCallback86, useContext as useContext48, useMemo as useMemo98, useState as useState59 } from "react";
22622
22854
  import { getInputProps } from "remotion";
22623
22855
  import { NoReactInternals as NoReactInternals20 } from "remotion/no-react";
22624
22856
 
@@ -22684,7 +22916,7 @@ var ValidationMessage = ({ message, align, type, action }) => {
22684
22916
  };
22685
22917
 
22686
22918
  // src/components/SegmentedControl.tsx
22687
- import { useCallback as useCallback58, useMemo as useMemo67, useState as useState50 } from "react";
22919
+ import { useCallback as useCallback58, useMemo as useMemo67, useState as useState49 } from "react";
22688
22920
  import { jsx as jsx112 } from "react/jsx-runtime";
22689
22921
  var container26 = {
22690
22922
  display: "flex",
@@ -22733,7 +22965,7 @@ var SegmentedControl = ({ items, needsWrapping }) => {
22733
22965
  });
22734
22966
  };
22735
22967
  var Item = ({ selected, onClick, children }) => {
22736
- const [hovered, setHovered] = useState50(false);
22968
+ const [hovered, setHovered] = useState49(false);
22737
22969
  const { tabIndex } = useZIndex();
22738
22970
  const onPointerEnter = useCallback58(() => {
22739
22971
  setHovered(true);
@@ -22841,7 +23073,7 @@ var getRenderModalWarnings = ({
22841
23073
  };
22842
23074
 
22843
23075
  // src/components/RenderModal/RenderModalJSONPropsEditor.tsx
22844
- import React81, { useCallback as useCallback59, useEffect as useEffect50, useMemo as useMemo69 } from "react";
23076
+ import React81, { useCallback as useCallback59, useEffect as useEffect49, useMemo as useMemo69 } from "react";
22845
23077
  import { useContext as useContext46 } from "react";
22846
23078
  import { NoReactInternals as NoReactInternals18 } from "remotion/no-react";
22847
23079
 
@@ -23174,7 +23406,7 @@ var RenderModalJSONPropsEditor = ({
23174
23406
  const [localValue, setLocalValue] = React81.useState(() => {
23175
23407
  return parseJSON(serializedJSON.serializedString, schema);
23176
23408
  });
23177
- useEffect50(() => {
23409
+ useEffect49(() => {
23178
23410
  const unsub = subscribeToEvent("default-props-updatable-changed", (e) => {
23179
23411
  if (e.type !== "default-props-updatable-changed") {
23180
23412
  return;
@@ -23193,7 +23425,7 @@ var RenderModalJSONPropsEditor = ({
23193
23425
  unsub();
23194
23426
  };
23195
23427
  }, [subscribeToEvent, compositionId, schema]);
23196
- useEffect50(() => {
23428
+ useEffect49(() => {
23197
23429
  setLocalValue((prev) => {
23198
23430
  if (prev.validJSON && deepEqual(value, prev.value)) {
23199
23431
  return prev;
@@ -23226,7 +23458,7 @@ var RenderModalJSONPropsEditor = ({
23226
23458
  onSave();
23227
23459
  }
23228
23460
  }, [hasChanged, hasError, onSave]);
23229
- useEffect50(() => {
23461
+ useEffect49(() => {
23230
23462
  setLocalValue((v) => parseJSON(v.str, schema));
23231
23463
  }, [schema]);
23232
23464
  const reset = useCallback59(() => {
@@ -23675,7 +23907,7 @@ var Fieldset = ({ children, shouldPad }) => {
23675
23907
  };
23676
23908
 
23677
23909
  // src/components/RenderModal/SchemaEditor/SchemaLabel.tsx
23678
- import { useCallback as useCallback61, useMemo as useMemo71, useState as useState51 } from "react";
23910
+ import { useCallback as useCallback61, useMemo as useMemo71, useState as useState50 } from "react";
23679
23911
 
23680
23912
  // src/components/RenderModal/InlineRemoveButton.tsx
23681
23913
  import { useCallback as useCallback60 } from "react";
@@ -23727,7 +23959,7 @@ var compactStyles = {
23727
23959
  flex: 1
23728
23960
  };
23729
23961
  var SchemaLabel = ({ jsonPath, onRemove, valid, suffix: suffix2, handleClick }) => {
23730
- const [clickableButtonHovered, setClickableButtonHovered] = useState51(false);
23962
+ const [clickableButtonHovered, setClickableButtonHovered] = useState50(false);
23731
23963
  const labelStyle4 = useMemo71(() => {
23732
23964
  return {
23733
23965
  fontFamily: "monospace",
@@ -23773,7 +24005,7 @@ var SchemaLabel = ({ jsonPath, onRemove, valid, suffix: suffix2, handleClick })
23773
24005
 
23774
24006
  // src/components/RenderModal/SchemaEditor/ZodObjectEditor.tsx
23775
24007
  import { useCallback as useCallback84 } from "react";
23776
- import React107, { useMemo as useMemo95, useState as useState59 } from "react";
24008
+ import React107, { useMemo as useMemo95, useState as useState58 } from "react";
23777
24009
 
23778
24010
  // src/components/RenderModal/layout.ts
23779
24011
  var optionRow = {
@@ -23819,7 +24051,7 @@ var fieldsetLabel = {
23819
24051
  };
23820
24052
 
23821
24053
  // src/components/RenderModal/SchemaEditor/SchemaSeparationLine.tsx
23822
- import { useCallback as useCallback62, useMemo as useMemo72, useState as useState52 } from "react";
24054
+ import { useCallback as useCallback62, useMemo as useMemo72, useState as useState51 } from "react";
23823
24055
 
23824
24056
  // src/icons/plus.tsx
23825
24057
  import { jsx as jsx119 } from "react/jsx-runtime";
@@ -23854,8 +24086,8 @@ var arraySeparationLine = {
23854
24086
  flexBasis: "100%"
23855
24087
  };
23856
24088
  var SchemaArrayItemSeparationLine = ({ onChange, index, schema, isLast, showAddButton }) => {
23857
- const [outerHovered, setOuterHovered] = useState52(false);
23858
- const [innerHovered, setInnerHovered] = useState52(false);
24089
+ const [outerHovered, setOuterHovered] = useState51(false);
24090
+ const [innerHovered, setInnerHovered] = useState51(false);
23859
24091
  const zodTypes = useZodTypesIfPossible();
23860
24092
  const z = useZodIfPossible();
23861
24093
  if (!z) {
@@ -23995,7 +24227,7 @@ var SchemaVerticalGuide = ({ isRoot, children }) => {
23995
24227
  };
23996
24228
 
23997
24229
  // src/components/RenderModal/SchemaEditor/ZodArrayEditor.tsx
23998
- import React89, { useCallback as useCallback65, useMemo as useMemo77, useState as useState54 } from "react";
24230
+ import React89, { useCallback as useCallback65, useMemo as useMemo77, useState as useState53 } from "react";
23999
24231
 
24000
24232
  // src/components/RenderModal/SchemaEditor/ZodArrayItemEditor.tsx
24001
24233
  import { useCallback as useCallback63, useMemo as useMemo74 } from "react";
@@ -24032,7 +24264,7 @@ var ZodArrayItemEditor = ({ elementSchema, onChange, jsonPath, index, value, may
24032
24264
 
24033
24265
  // src/components/RenderModal/InfoBubble.tsx
24034
24266
  import { PlayerInternals as PlayerInternals12 } from "@remotion/player";
24035
- import { useCallback as useCallback64, useEffect as useEffect51, useMemo as useMemo76, useRef as useRef34, useState as useState53 } from "react";
24267
+ import { useCallback as useCallback64, useEffect as useEffect50, useMemo as useMemo76, useRef as useRef34, useState as useState52 } from "react";
24036
24268
  import ReactDOM7 from "react-dom";
24037
24269
 
24038
24270
  // src/components/RenderModal/InfoTooltip.tsx
@@ -24115,8 +24347,8 @@ var container27 = {
24115
24347
  verticalAlign: "text-bottom"
24116
24348
  };
24117
24349
  var InfoBubble = ({ title: title4, children }) => {
24118
- const [hovered, setIsHovered] = useState53(false);
24119
- const [opened, setOpened] = useState53(false);
24350
+ const [hovered, setIsHovered] = useState52(false);
24351
+ const [opened, setOpened] = useState52(false);
24120
24352
  const ref2 = useRef34(null);
24121
24353
  const { tabIndex, currentZIndex } = useZIndex();
24122
24354
  const size2 = PlayerInternals12.useElementSize(ref2, {
@@ -24127,7 +24359,7 @@ var InfoBubble = ({ title: title4, children }) => {
24127
24359
  const onHide = useCallback64(() => {
24128
24360
  setOpened(false);
24129
24361
  }, []);
24130
- useEffect51(() => {
24362
+ useEffect50(() => {
24131
24363
  const { current } = ref2;
24132
24364
  if (!current) {
24133
24365
  return;
@@ -24303,7 +24535,7 @@ var ZodArrayEditor = ({ schema, jsonPath, setValue, value, onRemove, mayPad }) =
24303
24535
  const onChange = useCallback65((updater, { shouldSave }) => {
24304
24536
  setValue(updater, { shouldSave });
24305
24537
  }, [setValue]);
24306
- const [expanded, setExpanded] = useState54(true);
24538
+ const [expanded, setExpanded] = useState53(true);
24307
24539
  const arrayElement = getArrayElement(schema);
24308
24540
  const suffix2 = useMemo77(() => {
24309
24541
  return expanded ? " [" : " [...] ";
@@ -24375,7 +24607,7 @@ var ZodArrayEditor = ({ schema, jsonPath, setValue, value, onRemove, mayPad }) =
24375
24607
  import { useCallback as useCallback66 } from "react";
24376
24608
 
24377
24609
  // src/components/Checkbox.tsx
24378
- import { useEffect as useEffect52, useMemo as useMemo78, useRef as useRef35 } from "react";
24610
+ import { useEffect as useEffect51, useMemo as useMemo78, useRef as useRef35 } from "react";
24379
24611
  import { jsx as jsx127, jsxs as jsxs62 } from "react/jsx-runtime";
24380
24612
  var SIZES = {
24381
24613
  default: 20,
@@ -24430,7 +24662,7 @@ var Checkbox = ({ checked, onChange, disabled, name, rounded, variant = "default
24430
24662
  margin: 0
24431
24663
  };
24432
24664
  }, [disabled, size2]);
24433
- useEffect52(() => {
24665
+ useEffect51(() => {
24434
24666
  if (ref2.current) {
24435
24667
  ref2.current.style.setProperty("border-radius", rounded ? "50%" : "0%", "important");
24436
24668
  }
@@ -24496,7 +24728,7 @@ import { useCallback as useCallback72, useMemo as useMemo84 } from "react";
24496
24728
 
24497
24729
  // src/components/ColorPicker/ColorPicker.tsx
24498
24730
  import { PlayerInternals as PlayerInternals13 } from "@remotion/player";
24499
- import { useCallback as useCallback71, useEffect as useEffect54, useMemo as useMemo83, useRef as useRef40, useState as useState56 } from "react";
24731
+ import { useCallback as useCallback71, useEffect as useEffect53, useMemo as useMemo83, useRef as useRef40, useState as useState55 } from "react";
24500
24732
  import ReactDOM8 from "react-dom";
24501
24733
 
24502
24734
  // src/components/ColorPicker/checker.ts
@@ -24506,7 +24738,7 @@ var CHECKER_BACKGROUND_POSITION = "0 0, 0 4px, 4px -4px, -4px 0";
24506
24738
  var CHECKER_BACKGROUND_COLOR = "#444";
24507
24739
 
24508
24740
  // src/components/ColorPicker/ColorPickerPopup.tsx
24509
- import { useCallback as useCallback70, useEffect as useEffect53, useMemo as useMemo82, useRef as useRef39, useState as useState55 } from "react";
24741
+ import { useCallback as useCallback70, useEffect as useEffect52, useMemo as useMemo82, useRef as useRef39, useState as useState54 } from "react";
24510
24742
 
24511
24743
  // src/helpers/color-conversion.ts
24512
24744
  import { NoReactInternals as NoReactInternals19 } from "remotion/no-react";
@@ -24996,9 +25228,9 @@ var ChannelInput = ({
24996
25228
  max,
24997
25229
  onCommit
24998
25230
  }) => {
24999
- const [draft, setDraft] = useState55(String(Math.round(value)));
25231
+ const [draft, setDraft] = useState54(String(Math.round(value)));
25000
25232
  const { tabIndex } = useZIndex();
25001
- useEffect53(() => {
25233
+ useEffect52(() => {
25002
25234
  setDraft(String(Math.round(value)));
25003
25235
  }, [value]);
25004
25236
  const onChange = useCallback70((e) => {
@@ -25040,9 +25272,9 @@ var ChannelInput = ({
25040
25272
  });
25041
25273
  };
25042
25274
  var HexInput = ({ value, onCommit }) => {
25043
- const [draft, setDraft] = useState55(value);
25275
+ const [draft, setDraft] = useState54(value);
25044
25276
  const { tabIndex } = useZIndex();
25045
- useEffect53(() => {
25277
+ useEffect52(() => {
25046
25278
  setDraft(value);
25047
25279
  }, [value]);
25048
25280
  const onChange = useCallback70((e) => {
@@ -25090,9 +25322,9 @@ var HexInput = ({ value, onCommit }) => {
25090
25322
  };
25091
25323
  var ColorPickerPopup = ({ value, onChange, onChangeComplete }) => {
25092
25324
  const { tabIndex } = useZIndex();
25093
- const [hsva, setHsva] = useState55(() => rgbaToHsva(parseAnyColor(value)));
25325
+ const [hsva, setHsva] = useState54(() => rgbaToHsva(parseAnyColor(value)));
25094
25326
  const lastEmittedRef = useRef39(formatRgba(parseAnyColor(value)));
25095
- useEffect53(() => {
25327
+ useEffect52(() => {
25096
25328
  const incoming = formatRgba(parseAnyColor(value));
25097
25329
  if (incoming === lastEmittedRef.current) {
25098
25330
  return;
@@ -25306,7 +25538,7 @@ var ColorPicker = ({
25306
25538
  className: className2,
25307
25539
  style: customStyle
25308
25540
  }) => {
25309
- const [opened, setOpened] = useState56(false);
25541
+ const [opened, setOpened] = useState55(false);
25310
25542
  const triggerRef = useRef40(null);
25311
25543
  const { tabIndex, currentZIndex } = useZIndex();
25312
25544
  const size2 = PlayerInternals13.useElementSize(triggerRef, {
@@ -25389,7 +25621,7 @@ var ColorPicker = ({
25389
25621
  boxShadow: "none"
25390
25622
  };
25391
25623
  }, [opened, size2]);
25392
- useEffect54(() => {
25624
+ useEffect53(() => {
25393
25625
  if (!opened) {
25394
25626
  return;
25395
25627
  }
@@ -25692,7 +25924,7 @@ var ZodEnumEditor = ({ schema, jsonPath, setValue, value, onRemove }) => {
25692
25924
  };
25693
25925
 
25694
25926
  // src/components/RenderModal/SchemaEditor/ZodMatrixEditor.tsx
25695
- import React101, { useMemo as useMemo88, useState as useState57 } from "react";
25927
+ import React101, { useMemo as useMemo88, useState as useState56 } from "react";
25696
25928
  import { useCallback as useCallback76 } from "react";
25697
25929
  import { jsx as jsx140, jsxs as jsxs72 } from "react/jsx-runtime";
25698
25930
  var rowStyle = {
@@ -25705,7 +25937,7 @@ var ZodMatrixEditor = ({ schema, jsonPath, setValue, value, onRemove, mayPad })
25705
25937
  setValue(updater, { shouldSave });
25706
25938
  }, [setValue]);
25707
25939
  const zodValidation = useMemo88(() => zodSafeParse(schema, value), [schema, value]);
25708
- const [expanded, setExpanded] = useState57(true);
25940
+ const [expanded, setExpanded] = useState56(true);
25709
25941
  const arrayElement = getArrayElement(schema);
25710
25942
  const suffix2 = useMemo88(() => {
25711
25943
  return expanded ? " [" : " [...] ";
@@ -26201,7 +26433,7 @@ var ZodTextareaEditor = ({ jsonPath, value, setValue, schema, onRemove, mayPad }
26201
26433
  };
26202
26434
 
26203
26435
  // src/components/RenderModal/SchemaEditor/ZodTupleEditor.tsx
26204
- import React106, { useCallback as useCallback83, useMemo as useMemo94, useState as useState58 } from "react";
26436
+ import React106, { useCallback as useCallback83, useMemo as useMemo94, useState as useState57 } from "react";
26205
26437
 
26206
26438
  // src/components/RenderModal/SchemaEditor/ZodTupleItemEditor.tsx
26207
26439
  import { useCallback as useCallback82, useMemo as useMemo93 } from "react";
@@ -26238,7 +26470,7 @@ var ZodTupleEditor = ({ schema, jsonPath, setValue, value, onRemove, mayPad }) =
26238
26470
  setValue(updater, { shouldSave });
26239
26471
  }, [setValue]);
26240
26472
  const zodValidation = useMemo94(() => zodSafeParse(schema, value), [schema, value]);
26241
- const [expanded, setExpanded] = useState58(true);
26473
+ const [expanded, setExpanded] = useState57(true);
26242
26474
  const tupleItems = getTupleItems(schema);
26243
26475
  const suffix2 = useMemo94(() => {
26244
26476
  return expanded ? " [" : " [...] ";
@@ -26627,7 +26859,7 @@ var ZodObjectEditor = ({
26627
26859
  mayPad,
26628
26860
  discriminatedUnionReplacement
26629
26861
  }) => {
26630
- const [expanded, setExpanded] = useState59(true);
26862
+ const [expanded, setExpanded] = useState58(true);
26631
26863
  const onChange = useCallback84((updater, { shouldSave }) => {
26632
26864
  setValue(updater, { shouldSave });
26633
26865
  }, [setValue]);
@@ -26943,8 +27175,8 @@ var DataEditor = ({
26943
27175
  propsEditType,
26944
27176
  canSaveDefaultProps
26945
27177
  }) => {
26946
- const [mode, setMode] = useState60("schema");
26947
- const [showWarning, setShowWarningWithoutPersistance] = useState60(() => getPersistedShowWarningState());
27178
+ const [mode, setMode] = useState59("schema");
27179
+ const [showWarning, setShowWarningWithoutPersistance] = useState59(() => getPersistedShowWarningState());
26948
27180
  const jsonEditorSetValue = useCallback86((newProps) => {
26949
27181
  setDefaultProps(typeof newProps === "function" ? newProps : () => newProps, { shouldSave: false });
26950
27182
  }, [setDefaultProps]);
@@ -27356,16 +27588,16 @@ var SchemaResetButton = ({ onClick }) => {
27356
27588
  };
27357
27589
 
27358
27590
  // src/components/RenderQueue/index.tsx
27359
- import React121, { useContext as useContext58, useEffect as useEffect57, useMemo as useMemo106 } from "react";
27591
+ import React121, { useContext as useContext58, useEffect as useEffect56, useMemo as useMemo106 } from "react";
27360
27592
  import { Internals as Internals46 } from "remotion";
27361
27593
 
27362
27594
  // src/components/RenderQueue/RenderQueueItem.tsx
27363
27595
  import {
27364
27596
  useCallback as useCallback98,
27365
27597
  useContext as useContext57,
27366
- useEffect as useEffect56,
27598
+ useEffect as useEffect55,
27367
27599
  useMemo as useMemo105,
27368
- useState as useState61
27600
+ useState as useState60
27369
27601
  } from "react";
27370
27602
  import { Internals as Internals45 } from "remotion";
27371
27603
 
@@ -27466,7 +27698,7 @@ import { useCallback as useCallback90, useMemo as useMemo99 } from "react";
27466
27698
 
27467
27699
  // src/components/RenderQueue/ClientRenderQueueProcessor.tsx
27468
27700
  import { renderMediaOnWeb, renderStillOnWeb } from "@remotion/web-renderer";
27469
- import { useCallback as useCallback89, useContext as useContext50, useEffect as useEffect55 } from "react";
27701
+ import { useCallback as useCallback89, useContext as useContext50, useEffect as useEffect54 } from "react";
27470
27702
 
27471
27703
  // src/api/save-render-output.ts
27472
27704
  var throwIfNotOk = async (response) => {
@@ -27666,7 +27898,7 @@ var ClientRenderQueueProcessor = () => {
27666
27898
  markClientJobFailed,
27667
27899
  markClientJobCancelled
27668
27900
  ]);
27669
- useEffect55(() => {
27901
+ useEffect54(() => {
27670
27902
  setProcessJobCallback(processJob);
27671
27903
  return () => setProcessJobCallback(null);
27672
27904
  }, [processJob, setProcessJobCallback]);
@@ -28375,7 +28607,7 @@ var subtitle3 = {
28375
28607
  };
28376
28608
  var SELECTED_CLASSNAME = "__remotion_selected_classname";
28377
28609
  var RenderQueueItem = ({ job, selected }) => {
28378
- const [hovered, setHovered] = useState61(false);
28610
+ const [hovered, setHovered] = useState60(false);
28379
28611
  const { setCanvasContent } = useContext57(Internals45.CompositionSetters);
28380
28612
  const isClientJob = isClientRenderJob(job);
28381
28613
  const onPointerEnter = useCallback98(() => {
@@ -28452,7 +28684,7 @@ var RenderQueueItem = ({ job, selected }) => {
28452
28684
  selected,
28453
28685
  setCanvasContent
28454
28686
  ]);
28455
- useEffect56(() => {
28687
+ useEffect55(() => {
28456
28688
  if (selected) {
28457
28689
  scrollCurrentIntoView();
28458
28690
  }
@@ -28548,7 +28780,7 @@ var RenderQueue = () => {
28548
28780
  const previousJobCount = React121.useRef(jobs.length);
28549
28781
  const jobCount = jobs.length;
28550
28782
  const divRef = React121.useRef(null);
28551
- useEffect57(() => {
28783
+ useEffect56(() => {
28552
28784
  if (!divRef.current) {
28553
28785
  return;
28554
28786
  }
@@ -28685,7 +28917,7 @@ var RendersTab = ({ selected, onClick }) => {
28685
28917
  import React124, { useContext as useContext61 } from "react";
28686
28918
 
28687
28919
  // src/components/VisualControls/VisualControlHandle.tsx
28688
- import { useCallback as useCallback100, useContext as useContext60, useEffect as useEffect59, useState as useState64 } from "react";
28920
+ import { useCallback as useCallback100, useContext as useContext60, useEffect as useEffect58, useState as useState63 } from "react";
28689
28921
  import { NoReactInternals as NoReactInternals22 } from "remotion/no-react";
28690
28922
 
28691
28923
  // src/fast-refresh-context.ts
@@ -28697,10 +28929,10 @@ var FastRefreshContext = createContext22({
28697
28929
  });
28698
28930
 
28699
28931
  // src/components/VisualControls/get-original-stack-trace.ts
28700
- import { useEffect as useEffect58, useState as useState62 } from "react";
28932
+ import { useEffect as useEffect57, useState as useState61 } from "react";
28701
28933
  var useOriginalFileName = (stack2) => {
28702
- const [originalFileName, setOriginalFileName] = useState62({ type: "loading" });
28703
- useEffect58(() => {
28934
+ const [originalFileName, setOriginalFileName] = useState61({ type: "loading" });
28935
+ useEffect57(() => {
28704
28936
  if (!stack2) {
28705
28937
  return;
28706
28938
  }
@@ -28721,7 +28953,7 @@ var useOriginalFileName = (stack2) => {
28721
28953
  };
28722
28954
 
28723
28955
  // src/components/VisualControls/ClickableFileName.tsx
28724
- import { useCallback as useCallback99, useMemo as useMemo108, useState as useState63 } from "react";
28956
+ import { useCallback as useCallback99, useMemo as useMemo108, useState as useState62 } from "react";
28725
28957
 
28726
28958
  // src/components/Timeline/TimelineStack/source-attribution.ts
28727
28959
  var getOriginalSourceAttribution = (originalLocation) => {
@@ -28746,7 +28978,7 @@ var container32 = {
28746
28978
  var ClickableFileName = ({
28747
28979
  originalFileName
28748
28980
  }) => {
28749
- const [titleHovered, setTitleHovered] = useState63(false);
28981
+ const [titleHovered, setTitleHovered] = useState62(false);
28750
28982
  const hoverEffect = titleHovered && originalFileName.type === "loaded";
28751
28983
  const onTitlePointerEnter = useCallback99(() => {
28752
28984
  setTitleHovered(true);
@@ -28799,7 +29031,7 @@ var VisualControlHandle = ({ value, keyName }) => {
28799
29031
  const state = useContext60(VisualControlsContext);
28800
29032
  const { updateValue } = useContext60(SetVisualControlsContext);
28801
29033
  const { fastRefreshes, increaseManualRefreshes } = useContext60(FastRefreshContext);
28802
- const [_saving, setSaving] = useState64(false);
29034
+ const [_saving, setSaving] = useState63(false);
28803
29035
  const currentValue = getVisualControlEditedValue({
28804
29036
  handles: state.handles,
28805
29037
  key: keyName
@@ -28851,7 +29083,7 @@ var VisualControlHandle = ({ value, keyName }) => {
28851
29083
  keyName,
28852
29084
  zodTypes
28853
29085
  ]);
28854
- useEffect59(() => {
29086
+ useEffect58(() => {
28855
29087
  setSaving(false);
28856
29088
  }, [fastRefreshes]);
28857
29089
  const setValue = useCallback100((updater, { shouldSave }) => {
@@ -28943,7 +29175,7 @@ var OptionsPanel = ({ readOnlyStudio }) => {
28943
29175
  flexDirection: "column",
28944
29176
  flex: 1
28945
29177
  }), [isMobileLayout]);
28946
- const [panel2, setPanel] = useState65(() => getSelectedPanel2(renderingAvailable));
29178
+ const [panel2, setPanel] = useState64(() => getSelectedPanel2(renderingAvailable));
28947
29179
  const onPropsSelected = useCallback101(() => {
28948
29180
  setPanel("input-props");
28949
29181
  persistSelectedOptionsSidebarPanel2("input-props");
@@ -29108,9 +29340,9 @@ var OptionsPanel = ({ readOnlyStudio }) => {
29108
29340
  import {
29109
29341
  useCallback as useCallback111,
29110
29342
  useContext as useContext70,
29111
- useEffect as useEffect65,
29343
+ useEffect as useEffect64,
29112
29344
  useRef as useRef43,
29113
- useState as useState69
29345
+ useState as useState68
29114
29346
  } from "react";
29115
29347
  import { Internals as Internals56 } from "remotion";
29116
29348
 
@@ -29185,11 +29417,11 @@ var CheckboardToggle = () => {
29185
29417
 
29186
29418
  // src/components/FpsCounter.tsx
29187
29419
  import {
29188
- useEffect as useEffect60,
29189
- useLayoutEffect as useLayoutEffect4,
29420
+ useEffect as useEffect59,
29421
+ useLayoutEffect as useLayoutEffect5,
29190
29422
  useMemo as useMemo110,
29191
29423
  useRef as useRef41,
29192
- useState as useState66
29424
+ useState as useState65
29193
29425
  } from "react";
29194
29426
  import { Internals as Internals49 } from "remotion";
29195
29427
  import { jsxs as jsxs90 } from "react/jsx-runtime";
@@ -29207,17 +29439,17 @@ var FpsCounter = ({ playbackSpeed }) => {
29207
29439
  const videoConfig = Internals49.useUnsafeVideoConfig();
29208
29440
  const [playing] = Internals49.Timeline.usePlayingState();
29209
29441
  const frame2 = Internals49.Timeline.useTimelinePosition();
29210
- const [marker, rerender] = useState66({});
29211
- const [fps, setFps] = useState66(0);
29442
+ const [marker, rerender] = useState65({});
29443
+ const [fps, setFps] = useState65(0);
29212
29444
  const previousUpdates = useRef41([]);
29213
29445
  const fpsRef = useRef41(0);
29214
29446
  const playingRef = useRef41(playing);
29215
- useLayoutEffect4(() => {
29447
+ useLayoutEffect5(() => {
29216
29448
  fpsRef.current = 0;
29217
29449
  previousUpdates.current = [];
29218
29450
  playingRef.current = playing;
29219
29451
  }, [playing]);
29220
- useLayoutEffect4(() => {
29452
+ useLayoutEffect5(() => {
29221
29453
  if (playingRef.current === false)
29222
29454
  return;
29223
29455
  previousUpdates.current = pushWithMaxSize(previousUpdates.current, performance.now(), 15);
@@ -29229,7 +29461,7 @@ var FpsCounter = ({ playbackSpeed }) => {
29229
29461
  if (previousUpdates.current.length === 2)
29230
29462
  setFps(fpsRef.current);
29231
29463
  }, [frame2]);
29232
- useEffect60(() => {
29464
+ useEffect59(() => {
29233
29465
  if (playing) {
29234
29466
  const t = setTimeout(() => {
29235
29467
  rerender({});
@@ -29267,7 +29499,7 @@ var FpsCounter = ({ playbackSpeed }) => {
29267
29499
  };
29268
29500
 
29269
29501
  // src/components/FullscreenToggle.tsx
29270
- import { useCallback as useCallback103, useContext as useContext65, useEffect as useEffect61 } from "react";
29502
+ import { useCallback as useCallback103, useContext as useContext65, useEffect as useEffect60 } from "react";
29271
29503
  import { Internals as Internals50 } from "remotion";
29272
29504
  import { NoReactInternals as NoReactInternals24 } from "remotion/no-react";
29273
29505
  import { jsx as jsx182 } from "react/jsx-runtime";
@@ -29289,7 +29521,7 @@ var FullScreenToggle = () => {
29289
29521
  }
29290
29522
  }));
29291
29523
  }, [setSize]);
29292
- useEffect61(() => {
29524
+ useEffect60(() => {
29293
29525
  const f = keybindings.registerKeybinding({
29294
29526
  event: "keydown",
29295
29527
  key: "f",
@@ -29430,7 +29662,7 @@ var OutlineToggle = () => {
29430
29662
 
29431
29663
  // src/components/PlaybackKeyboardShortcutsManager.tsx
29432
29664
  import { PlayerInternals as PlayerInternals14 } from "@remotion/player";
29433
- import { useCallback as useCallback107, useEffect as useEffect62 } from "react";
29665
+ import { useCallback as useCallback107, useEffect as useEffect61 } from "react";
29434
29666
  var PlaybackKeyboardShortcutsManager = ({ setPlaybackRate }) => {
29435
29667
  const keybindings = useKeybinding();
29436
29668
  const { play, pause, playing } = PlayerInternals14.usePlayer();
@@ -29468,7 +29700,7 @@ var PlaybackKeyboardShortcutsManager = ({ setPlaybackRate }) => {
29468
29700
  });
29469
29701
  play();
29470
29702
  }, [play, playing, setPlaybackRate]);
29471
- useEffect62(() => {
29703
+ useEffect61(() => {
29472
29704
  const jKey = keybindings.registerKeybinding({
29473
29705
  event: "keydown",
29474
29706
  key: "j",
@@ -29506,7 +29738,7 @@ var PlaybackKeyboardShortcutsManager = ({ setPlaybackRate }) => {
29506
29738
  };
29507
29739
 
29508
29740
  // src/components/PlaybackRatePersistor.tsx
29509
- import { useEffect as useEffect63 } from "react";
29741
+ import { useEffect as useEffect62 } from "react";
29510
29742
  import { Internals as Internals51 } from "remotion";
29511
29743
 
29512
29744
  // src/state/playbackrate.ts
@@ -29528,10 +29760,10 @@ var loadPlaybackRate = () => {
29528
29760
  // src/components/PlaybackRatePersistor.tsx
29529
29761
  var PlaybackRatePersistor = () => {
29530
29762
  const { setPlaybackRate, playbackRate } = Internals51.usePlaybackRate();
29531
- useEffect63(() => {
29763
+ useEffect62(() => {
29532
29764
  setPlaybackRate(loadPlaybackRate());
29533
29765
  }, [setPlaybackRate]);
29534
- useEffect63(() => {
29766
+ useEffect62(() => {
29535
29767
  persistPlaybackRate(playbackRate);
29536
29768
  }, [playbackRate]);
29537
29769
  return null;
@@ -29610,7 +29842,7 @@ var PlaybackRateSelector = ({ playbackRate, setPlaybackRate }) => {
29610
29842
 
29611
29843
  // src/components/PlayPause.tsx
29612
29844
  import { PlayerInternals as PlayerInternals15 } from "@remotion/player";
29613
- import { useCallback as useCallback108, useEffect as useEffect64, useState as useState67 } from "react";
29845
+ import { useCallback as useCallback108, useEffect as useEffect63, useState as useState66 } from "react";
29614
29846
  import { Internals as Internals53 } from "remotion";
29615
29847
 
29616
29848
  // src/icons/jump-to-start.tsx
@@ -29707,7 +29939,7 @@ var iconButton = {
29707
29939
  var PlayPause = ({ playbackRate, loop, bufferStateDelayInMilliseconds, muted }) => {
29708
29940
  const { inFrame, outFrame } = useTimelineInOutFramePosition();
29709
29941
  const videoConfig = Internals53.useUnsafeVideoConfig();
29710
- const [showBufferIndicator, setShowBufferState] = useState67(false);
29942
+ const [showBufferIndicator, setShowBufferState] = useState66(false);
29711
29943
  const {
29712
29944
  playing,
29713
29945
  play,
@@ -29734,7 +29966,7 @@ var PlayPause = ({ playbackRate, loop, bufferStateDelayInMilliseconds, muted })
29734
29966
  muted
29735
29967
  });
29736
29968
  const isStill = useIsStill();
29737
- useEffect64(() => {
29969
+ useEffect63(() => {
29738
29970
  if (isStill) {
29739
29971
  pause();
29740
29972
  }
@@ -29776,7 +30008,7 @@ var PlayPause = ({ playbackRate, loop, bufferStateDelayInMilliseconds, muted })
29776
30008
  seek(outFrame ?? getCurrentDuration() - 1);
29777
30009
  }, [seek, outFrame]);
29778
30010
  const keybindings = useKeybinding();
29779
- useEffect64(() => {
30011
+ useEffect63(() => {
29780
30012
  const commandArrowLeft = keybindings.registerKeybinding({
29781
30013
  event: "keydown",
29782
30014
  key: "ArrowLeft",
@@ -29848,7 +30080,7 @@ var PlayPause = ({ playbackRate, loop, bufferStateDelayInMilliseconds, muted })
29848
30080
  oneFrameBack,
29849
30081
  oneFrameForward
29850
30082
  ]);
29851
- useEffect64(() => {
30083
+ useEffect63(() => {
29852
30084
  let timeout = null;
29853
30085
  let stopped = false;
29854
30086
  const onBuffer = () => {
@@ -29930,7 +30162,7 @@ var PlayPause = ({ playbackRate, loop, bufferStateDelayInMilliseconds, muted })
29930
30162
 
29931
30163
  // src/components/RenderButton.tsx
29932
30164
  import { PlayerInternals as PlayerInternals16 } from "@remotion/player";
29933
- import { useCallback as useCallback109, useContext as useContext68, useMemo as useMemo112, useRef as useRef42, useState as useState68 } from "react";
30165
+ import { useCallback as useCallback109, useContext as useContext68, useMemo as useMemo112, useRef as useRef42, useState as useState67 } from "react";
29934
30166
  import ReactDOM9 from "react-dom";
29935
30167
  import { Internals as Internals54 } from "remotion";
29936
30168
  import { jsx as jsx194, jsxs as jsxs92, Fragment as Fragment29 } from "react/jsx-runtime";
@@ -30002,8 +30234,8 @@ var RenderButton = ({
30002
30234
  }) => {
30003
30235
  const { inFrame, outFrame } = useTimelineInOutFramePosition();
30004
30236
  const { setSelectedModal } = useContext68(ModalsContext);
30005
- const [preferredRenderType, setPreferredRenderType] = useState68(() => getInitialRenderType(readOnlyStudio));
30006
- const [dropdownOpened, setDropdownOpened] = useState68(false);
30237
+ const [preferredRenderType, setPreferredRenderType] = useState67(() => getInitialRenderType(readOnlyStudio));
30238
+ const [dropdownOpened, setDropdownOpened] = useState67(false);
30007
30239
  const dropdownRef = useRef42(null);
30008
30240
  const containerRef = useRef42(null);
30009
30241
  const { currentZIndex } = useZIndex();
@@ -30580,10 +30812,10 @@ var PreviewToolbar = ({ readOnlyStudio, bufferStateDelayInMilliseconds }) => {
30580
30812
  const leftScrollIndicatorRef = useRef43(null);
30581
30813
  const rightScrollIndicatorRef = useRef43(null);
30582
30814
  const isStill = useIsStill();
30583
- const [loop, setLoop] = useState69(loadLoopOption());
30815
+ const [loop, setLoop] = useState68(loadLoopOption());
30584
30816
  const isFullscreenSupported = checkFullscreenSupport();
30585
30817
  const isMobileLayout = useMobileLayout();
30586
- useEffect65(() => {
30818
+ useEffect64(() => {
30587
30819
  if (!isMobileLayout) {
30588
30820
  if (leftScrollIndicatorRef.current) {
30589
30821
  leftScrollIndicatorRef.current.style.display = "none";
@@ -30776,7 +31008,7 @@ var PreviewToolbar = ({ readOnlyStudio, bufferStateDelayInMilliseconds }) => {
30776
31008
 
30777
31009
  // src/components/Splitter/SplitterContainer.tsx
30778
31010
  import { PlayerInternals as PlayerInternals17 } from "@remotion/player";
30779
- import { useEffect as useEffect66, useMemo as useMemo113, useRef as useRef44, useState as useState70 } from "react";
31011
+ import { useEffect as useEffect65, useMemo as useMemo113, useRef as useRef44, useState as useState69 } from "react";
30780
31012
 
30781
31013
  // src/state/timeline.ts
30782
31014
  var localStorageKey3 = (id) => `remotion.editor.timelineFlex.${id}`;
@@ -30830,7 +31062,7 @@ var containerColumn = {
30830
31062
  };
30831
31063
  var SplitterContainer = ({ orientation, children, defaultFlex, maxFlex, minFlex, id }) => {
30832
31064
  const [initialTimelineFlex, persistFlex] = useTimelineFlex(id);
30833
- const [flexValue, setFlexValue] = useState70(initialTimelineFlex ?? defaultFlex);
31065
+ const [flexValue, setFlexValue] = useState69(initialTimelineFlex ?? defaultFlex);
30834
31066
  const ref2 = useRef44(null);
30835
31067
  const isDragging = useRef44(false);
30836
31068
  const value = useMemo113(() => {
@@ -30856,7 +31088,7 @@ var SplitterContainer = ({ orientation, children, defaultFlex, maxFlex, minFlex,
30856
31088
  persistFlex,
30857
31089
  ref2
30858
31090
  ]);
30859
- useEffect66(() => {
31091
+ useEffect65(() => {
30860
31092
  const frame2 = requestAnimationFrame(() => {
30861
31093
  PlayerInternals17.updateAllElementsSizes();
30862
31094
  });
@@ -30913,7 +31145,7 @@ var SplitterElement = ({ children, type, sticky }) => {
30913
31145
 
30914
31146
  // src/components/Splitter/SplitterHandle.tsx
30915
31147
  import { PlayerInternals as PlayerInternals18 } from "@remotion/player";
30916
- import { useContext as useContext72, useEffect as useEffect67, useRef as useRef45 } from "react";
31148
+ import { useContext as useContext72, useEffect as useEffect66, useRef as useRef45 } from "react";
30917
31149
  import { jsx as jsx200 } from "react/jsx-runtime";
30918
31150
  var SPLITTER_HANDLE_SIZE = 3;
30919
31151
  var containerRow2 = {
@@ -30930,7 +31162,7 @@ var SplitterHandle = ({ allowToCollapse, onCollapse }) => {
30930
31162
  const ref2 = useRef45(null);
30931
31163
  const latest = useRef45({ context, allowToCollapse, onCollapse });
30932
31164
  latest.current = { context, allowToCollapse, onCollapse };
30933
- useEffect67(() => {
31165
+ useEffect66(() => {
30934
31166
  const { current } = ref2;
30935
31167
  if (!current) {
30936
31168
  return;
@@ -31004,7 +31236,7 @@ var SplitterHandle = ({ allowToCollapse, onCollapse }) => {
31004
31236
  endDrag?.();
31005
31237
  };
31006
31238
  }, []);
31007
- useEffect67(() => {
31239
+ useEffect66(() => {
31008
31240
  const { current } = ref2;
31009
31241
  if (!current) {
31010
31242
  return;
@@ -31092,7 +31324,7 @@ var TopPanelInner = ({ readOnlyStudio, onMounted, drawRef: drawRef2, bufferState
31092
31324
  }
31093
31325
  return "expanded";
31094
31326
  }, [sidebarCollapsedStateRight]);
31095
- useEffect68(() => {
31327
+ useEffect67(() => {
31096
31328
  onMounted();
31097
31329
  }, [onMounted]);
31098
31330
  const canvasContainerStyle = useMemo115(() => ({
@@ -31267,7 +31499,7 @@ var SidebarCollapserControls = () => {
31267
31499
  toggleLeft,
31268
31500
  toggleRight
31269
31501
  ]);
31270
- useEffect69(() => {
31502
+ useEffect68(() => {
31271
31503
  const left3 = keybindings.registerKeybinding({
31272
31504
  event: "keydown",
31273
31505
  key: "b",
@@ -31345,9 +31577,9 @@ var SidebarCollapserControls = () => {
31345
31577
  import {
31346
31578
  useCallback as useCallback114,
31347
31579
  useContext as useContext75,
31348
- useEffect as useEffect70,
31580
+ useEffect as useEffect69,
31349
31581
  useRef as useRef46,
31350
- useState as useState71
31582
+ useState as useState70
31351
31583
  } from "react";
31352
31584
 
31353
31585
  // src/icons/redo.tsx
@@ -31383,13 +31615,13 @@ var iconStyle5 = {
31383
31615
  height: 16
31384
31616
  };
31385
31617
  var UndoRedoButtons = () => {
31386
- const [undoFile, setUndoFile] = useState71(null);
31387
- const [redoFile, setRedoFile] = useState71(null);
31618
+ const [undoFile, setUndoFile] = useState70(null);
31619
+ const [redoFile, setRedoFile] = useState70(null);
31388
31620
  const { subscribeToEvent } = useContext75(StudioServerConnectionCtx);
31389
31621
  const keybindings = useKeybinding();
31390
31622
  const undoInFlight = useRef46(false);
31391
31623
  const redoInFlight = useRef46(false);
31392
- useEffect70(() => {
31624
+ useEffect69(() => {
31393
31625
  const unsub = subscribeToEvent("undo-redo-stack-changed", (event) => {
31394
31626
  if (event.type !== "undo-redo-stack-changed") {
31395
31627
  return;
@@ -31417,7 +31649,7 @@ var UndoRedoButtons = () => {
31417
31649
  redoInFlight.current = false;
31418
31650
  });
31419
31651
  }, []);
31420
- useEffect70(() => {
31652
+ useEffect69(() => {
31421
31653
  const undo = keybindings.registerKeybinding({
31422
31654
  event: "keydown",
31423
31655
  key: "z",
@@ -31491,9 +31723,9 @@ var UndoRedoButtons = () => {
31491
31723
  import {
31492
31724
  useCallback as useCallback115,
31493
31725
  useContext as useContext76,
31494
- useEffect as useEffect71,
31726
+ useEffect as useEffect70,
31495
31727
  useMemo as useMemo116,
31496
- useState as useState72
31728
+ useState as useState71
31497
31729
  } from "react";
31498
31730
  import { VERSION } from "remotion";
31499
31731
  import { jsx as jsx206 } from "react/jsx-runtime";
@@ -31509,10 +31741,10 @@ var buttonStyle4 = {
31509
31741
  justifyContent: "center"
31510
31742
  };
31511
31743
  var UpdateCheck = () => {
31512
- const [info, setInfo] = useState72(null);
31744
+ const [info, setInfo] = useState71(null);
31513
31745
  const { setSelectedModal } = useContext76(ModalsContext);
31514
31746
  const { tabIndex } = useZIndex();
31515
- const [knownBugs, setKnownBugs] = useState72(null);
31747
+ const [knownBugs, setKnownBugs] = useState71(null);
31516
31748
  const hasKnownBugs = useMemo116(() => {
31517
31749
  return knownBugs && knownBugs.length > 0;
31518
31750
  }, [knownBugs]);
@@ -31543,7 +31775,7 @@ var UpdateCheck = () => {
31543
31775
  });
31544
31776
  return controller;
31545
31777
  }, []);
31546
- useEffect71(() => {
31778
+ useEffect70(() => {
31547
31779
  const abortUpdate = checkForUpdates();
31548
31780
  const abortBugs = checkForBugs();
31549
31781
  return () => {
@@ -31593,13 +31825,16 @@ var UpdateCheck = () => {
31593
31825
 
31594
31826
  // src/components/MenuToolbar.tsx
31595
31827
  import { jsx as jsx207, jsxs as jsxs99 } from "react/jsx-runtime";
31828
+ var MENU_TOOLBAR_HEIGHT = 30;
31596
31829
  var row6 = {
31597
31830
  alignItems: "center",
31598
31831
  flexDirection: "row",
31599
31832
  display: "flex",
31600
31833
  color: "white",
31601
31834
  borderBottom: "1px solid black",
31835
+ boxSizing: "border-box",
31602
31836
  fontSize: 13,
31837
+ height: MENU_TOOLBAR_HEIGHT,
31603
31838
  paddingLeft: 6,
31604
31839
  paddingRight: 10,
31605
31840
  backgroundColor: BACKGROUND
@@ -31608,7 +31843,7 @@ var flex2 = {
31608
31843
  flex: 1
31609
31844
  };
31610
31845
  var MenuToolbar = ({ readOnlyStudio }) => {
31611
- const [selected, setSelected] = useState73(null);
31846
+ const [selected, setSelected] = useState72(null);
31612
31847
  const mobileLayout = useMobileLayout();
31613
31848
  const fixedWidthRight = useMemo117(() => {
31614
31849
  return {
@@ -31718,7 +31953,7 @@ var MenuToolbar = ({ readOnlyStudio }) => {
31718
31953
  };
31719
31954
 
31720
31955
  // src/components/Timeline/Timeline.tsx
31721
- import React191, { useCallback as useCallback145, useContext as useContext105, useMemo as useMemo160, useState as useState91 } from "react";
31956
+ import React191, { useCallback as useCallback145, useContext as useContext105, useMemo as useMemo160, useState as useState90 } from "react";
31722
31957
  import { Internals as Internals84 } from "remotion";
31723
31958
 
31724
31959
  // src/components/Timeline/MaxTimelineTracks.tsx
@@ -31750,12 +31985,12 @@ var MaxTimelineTracksReached = () => {
31750
31985
  };
31751
31986
 
31752
31987
  // src/components/Timeline/SequencePropsObserver.tsx
31753
- import { useContext as useContext77, useEffect as useEffect72 } from "react";
31988
+ import { useContext as useContext77, useEffect as useEffect71 } from "react";
31754
31989
  import { Internals as Internals58 } from "remotion";
31755
31990
  var SequencePropsObserver = () => {
31756
31991
  const { subscribeToEvent } = useContext77(StudioServerConnectionCtx);
31757
31992
  const { setPropStatuses } = useContext77(Internals58.VisualModeSettersContext);
31758
- useEffect72(() => {
31993
+ useEffect71(() => {
31759
31994
  const handleEvent = (event) => {
31760
31995
  if (event.type !== "sequence-props-updated") {
31761
31996
  return;
@@ -31789,7 +32024,7 @@ import { useMemo as useMemo120 } from "react";
31789
32024
  import { NoReactInternals as NoReactInternals25 } from "remotion/no-react";
31790
32025
 
31791
32026
  // src/components/Timeline/use-resolved-stack-react-to-change.ts
31792
- import { useContext as useContext78, useEffect as useEffect73, useRef as useRef47, useState as useState74 } from "react";
32027
+ import { useContext as useContext78, useEffect as useEffect72, useRef as useRef47, useState as useState73 } from "react";
31793
32028
  var matchesLostNodePathEvent = (event, location2) => {
31794
32029
  if (!location2?.source || !location2.line) {
31795
32030
  return false;
@@ -31798,11 +32033,11 @@ var matchesLostNodePathEvent = (event, location2) => {
31798
32033
  };
31799
32034
  var useResolveStackAndReactToChange = (getStack) => {
31800
32035
  const { subscribeToEvent } = useContext78(StudioServerConnectionCtx);
31801
- const [stack2, setStack] = useState74(() => getStack());
32036
+ const [stack2, setStack] = useState73(() => getStack());
31802
32037
  const resolvedLocation = useResolvedStack(stack2);
31803
32038
  const resolvedLocationRef = useRef47(resolvedLocation);
31804
32039
  resolvedLocationRef.current = resolvedLocation;
31805
- useEffect73(() => {
32040
+ useEffect72(() => {
31806
32041
  let interval = null;
31807
32042
  const handleEvent = (event) => {
31808
32043
  if (event.type !== "lost-node-path") {
@@ -31842,11 +32077,11 @@ import {
31842
32077
  getAllSchemaKeys as getAllSchemaKeys2,
31843
32078
  stringifySequenceSubscriptionKey as stringifySequenceSubscriptionKey3
31844
32079
  } from "@remotion/studio-shared";
31845
- import { useContext as useContext79, useEffect as useEffect74, useMemo as useMemo119, useRef as useRef48 } from "react";
32080
+ import { useContext as useContext79, useEffect as useEffect73, useMemo as useMemo119, useRef as useRef48 } from "react";
31846
32081
  import { Internals as Internals60 } from "remotion";
31847
32082
 
31848
32083
  // src/components/ExpandedTracksProvider.tsx
31849
- import { createContext as createContext23, useCallback as useCallback117, useMemo as useMemo118, useState as useState75 } from "react";
32084
+ import { createContext as createContext23, useCallback as useCallback117, useMemo as useMemo118, useState as useState74 } from "react";
31850
32085
 
31851
32086
  // src/helpers/migrate-expanded-tracks-for-subscription-key.ts
31852
32087
  import { stringifySequenceExpandedRowKey as stringifySequenceExpandedRowKey3 } from "@remotion/studio-shared";
@@ -31892,7 +32127,7 @@ var ExpandedTracksSetterContext = createContext23({
31892
32127
  }
31893
32128
  });
31894
32129
  var ExpandedTracksProvider = ({ children }) => {
31895
- const [expandedTracks, setExpandedTracks] = useState75(loadExpandedTracks);
32130
+ const [expandedTracks, setExpandedTracks] = useState74(loadExpandedTracks);
31896
32131
  const toggleTrack = useCallback117((nodePathInfo) => {
31897
32132
  setExpandedTracks((prev) => {
31898
32133
  const key5 = timelineNodePathInfoToKey(nodePathInfo);
@@ -32063,7 +32298,7 @@ var useSequencePropsSubscription = ({
32063
32298
  const locationSource = validatedLocation?.source ?? null;
32064
32299
  const locationLine = validatedLocation?.line ?? null;
32065
32300
  const locationColumn = validatedLocation?.column ?? null;
32066
- useEffect74(() => {
32301
+ useEffect73(() => {
32067
32302
  if (!clientId || !locationSource || !locationLine || locationColumn === null || !schema) {
32068
32303
  return;
32069
32304
  }
@@ -32143,22 +32378,22 @@ import { PlayerInternals as PlayerInternals20 } from "@remotion/player";
32143
32378
  import React147, {
32144
32379
  useCallback as useCallback119,
32145
32380
  useContext as useContext81,
32146
- useEffect as useEffect77,
32381
+ useEffect as useEffect76,
32147
32382
  useMemo as useMemo122,
32148
32383
  useRef as useRef51,
32149
- useState as useState76
32384
+ useState as useState75
32150
32385
  } from "react";
32151
32386
  import { Internals as Internals63, useVideoConfig as useVideoConfig3 } from "remotion";
32152
32387
 
32153
32388
  // src/components/Timeline/TimelineTimeIndicators.tsx
32154
- import { useContext as useContext80, useEffect as useEffect76, useMemo as useMemo121, useRef as useRef50 } from "react";
32389
+ import { useContext as useContext80, useEffect as useEffect75, useMemo as useMemo121, useRef as useRef50 } from "react";
32155
32390
  import { Internals as Internals62 } from "remotion";
32156
32391
 
32157
32392
  // src/components/TimeValue.tsx
32158
32393
  import { PlayerInternals as PlayerInternals19 } from "@remotion/player";
32159
32394
  import {
32160
32395
  useCallback as useCallback118,
32161
- useEffect as useEffect75,
32396
+ useEffect as useEffect74,
32162
32397
  useImperativeHandle as useImperativeHandle13,
32163
32398
  useRef as useRef49
32164
32399
  } from "react";
@@ -32209,7 +32444,7 @@ var TimeValue = () => {
32209
32444
  pause,
32210
32445
  toggle
32211
32446
  }), [seek, play, pause, toggle]);
32212
- useEffect75(() => {
32447
+ useEffect74(() => {
32213
32448
  const gKey = keybindings.registerKeybinding({
32214
32449
  event: "keypress",
32215
32450
  key: "g",
@@ -32325,7 +32560,7 @@ var TimelineTimeIndicators = () => {
32325
32560
  };
32326
32561
  var TimelineTimeIndicatorsInner = ({ windowWidth, durationInFrames, fps }) => {
32327
32562
  const ref2 = useRef50(null);
32328
- useEffect76(() => {
32563
+ useEffect75(() => {
32329
32564
  const currentRef = ref2.current;
32330
32565
  if (!currentRef) {
32331
32566
  return;
@@ -32459,7 +32694,7 @@ var TimelineDragHandlerInner = () => {
32459
32694
  const setFrame = Internals63.useTimelineSetFrame();
32460
32695
  const width = scrollableRef.current?.scrollWidth ?? 0;
32461
32696
  const left3 = size3?.left ?? 0;
32462
- const [dragging, setDragging] = useState76({
32697
+ const [dragging, setDragging] = useState75({
32463
32698
  dragging: false
32464
32699
  });
32465
32700
  const { playing, play, pause, seek } = PlayerInternals20.usePlayer();
@@ -32595,7 +32830,7 @@ var TimelineDragHandlerInner = () => {
32595
32830
  play();
32596
32831
  }
32597
32832
  }, [dragging, left3, play, videoConfig, setFrame, width]);
32598
- useEffect77(() => {
32833
+ useEffect76(() => {
32599
32834
  if (!dragging.dragging) {
32600
32835
  return;
32601
32836
  }
@@ -32607,7 +32842,7 @@ var TimelineDragHandlerInner = () => {
32607
32842
  };
32608
32843
  }, [dragging.dragging, onPointerMoveScrubbing, onPointerUpScrubbing]);
32609
32844
  const ref2 = useRef51(null);
32610
- useEffect77(() => {
32845
+ useEffect76(() => {
32611
32846
  const currentRef = ref2.current;
32612
32847
  if (!currentRef) {
32613
32848
  return;
@@ -32690,9 +32925,9 @@ import { PlayerInternals as PlayerInternals21 } from "@remotion/player";
32690
32925
  import React151, {
32691
32926
  useCallback as useCallback120,
32692
32927
  useContext as useContext85,
32693
- useEffect as useEffect78,
32928
+ useEffect as useEffect77,
32694
32929
  useMemo as useMemo126,
32695
- useState as useState77
32930
+ useState as useState76
32696
32931
  } from "react";
32697
32932
  import { Internals as Internals66, useVideoConfig as useVideoConfig5 } from "remotion";
32698
32933
 
@@ -32809,7 +33044,7 @@ var TimelineInOutDragHandlerInner = () => {
32809
33044
  shouldApplyCssTransforms: true
32810
33045
  });
32811
33046
  const { isHighestContext } = useZIndex();
32812
- const [inOutDragging, setInOutDragging] = useState77({
33047
+ const [inOutDragging, setInOutDragging] = useState76({
32813
33048
  dragging: false
32814
33049
  });
32815
33050
  const timelineWidth = useContext85(TimelineWidthContext);
@@ -32974,7 +33209,7 @@ var TimelineInOutDragHandlerInner = () => {
32974
33209
  videoConfig,
32975
33210
  width
32976
33211
  ]);
32977
- useEffect78(() => {
33212
+ useEffect77(() => {
32978
33213
  if (inOutDragging.dragging === false) {
32979
33214
  return;
32980
33215
  }
@@ -33077,7 +33312,7 @@ var useTimelineKeyframeTracks = () => {
33077
33312
  };
33078
33313
 
33079
33314
  // src/components/Timeline/TimelineSequenceItem.tsx
33080
- import React176, { useCallback as useCallback138, useContext as useContext93, useMemo as useMemo149, useState as useState85 } from "react";
33315
+ import React176, { useCallback as useCallback138, useContext as useContext93, useMemo as useMemo149, useState as useState84 } from "react";
33081
33316
  import { Internals as Internals74 } from "remotion";
33082
33317
 
33083
33318
  // src/components/Timeline/TimelineExpandArrowButton.tsx
@@ -33172,7 +33407,7 @@ var getExpandedRowDepth = ({
33172
33407
  };
33173
33408
 
33174
33409
  // src/components/Timeline/TimelineEffectItem.tsx
33175
- import { useCallback as useCallback122, useContext as useContext87, useMemo as useMemo130, useState as useState78 } from "react";
33410
+ import { useCallback as useCallback122, useContext as useContext87, useMemo as useMemo130, useState as useState77 } from "react";
33176
33411
  import { Internals as Internals67 } from "remotion";
33177
33412
 
33178
33413
  // src/components/Timeline/TimelineRowChrome.tsx
@@ -33388,7 +33623,7 @@ var TimelineEffectItem = ({
33388
33623
  const { propStatuses } = useContext87(Internals67.VisualModePropStatusesContext);
33389
33624
  const { setPropStatuses } = useContext87(Internals67.VisualModeSettersContext);
33390
33625
  const selection = useTimelineRowSelection(nodePathInfo);
33391
- const [dropIndicator, setDropIndicator] = useState78(null);
33626
+ const [dropIndicator, setDropIndicator] = useState77(null);
33392
33627
  const effectStatus = useMemo130(() => Internals67.getEffectPropStatusesCtx({
33393
33628
  propStatuses,
33394
33629
  nodePath,
@@ -34424,7 +34659,7 @@ var TimelineEnumField = ({
34424
34659
  };
34425
34660
 
34426
34661
  // src/components/Timeline/TimelineNumberField.tsx
34427
- import { useCallback as useCallback127, useMemo as useMemo135, useState as useState79 } from "react";
34662
+ import { useCallback as useCallback127, useMemo as useMemo135, useState as useState78 } from "react";
34428
34663
  import { jsx as jsx227 } from "react/jsx-runtime";
34429
34664
  var TimelineNumberField = ({
34430
34665
  field,
@@ -34434,7 +34669,7 @@ var TimelineNumberField = ({
34434
34669
  onDragEnd,
34435
34670
  propStatus
34436
34671
  }) => {
34437
- const [dragValue, setDragValue] = useState79(null);
34672
+ const [dragValue, setDragValue] = useState78(null);
34438
34673
  const onValueChange = useCallback127((newVal) => {
34439
34674
  setDragValue(newVal);
34440
34675
  onDragValueChange(newVal);
@@ -34492,7 +34727,7 @@ var TimelineNumberField = ({
34492
34727
  };
34493
34728
 
34494
34729
  // src/components/Timeline/TimelineRotationField.tsx
34495
- import { useCallback as useCallback128, useMemo as useMemo136, useState as useState80 } from "react";
34730
+ import { useCallback as useCallback128, useMemo as useMemo136, useState as useState79 } from "react";
34496
34731
  import { jsx as jsx228 } from "react/jsx-runtime";
34497
34732
  var TimelineRotationField = ({
34498
34733
  field,
@@ -34502,7 +34737,7 @@ var TimelineRotationField = ({
34502
34737
  onDragValueChange,
34503
34738
  onDragEnd
34504
34739
  }) => {
34505
- const [dragValue, setDragValue] = useState80(null);
34740
+ const [dragValue, setDragValue] = useState79(null);
34506
34741
  const isCssRotation = field.fieldSchema.type === "rotation-css";
34507
34742
  const degrees = useMemo136(() => {
34508
34743
  if (isCssRotation) {
@@ -34575,7 +34810,7 @@ var TimelineRotationField = ({
34575
34810
  };
34576
34811
 
34577
34812
  // src/components/Timeline/TimelineTransformOriginField.tsx
34578
- import { useCallback as useCallback129, useMemo as useMemo137, useState as useState81 } from "react";
34813
+ import { useCallback as useCallback129, useMemo as useMemo137, useState as useState80 } from "react";
34579
34814
  import { jsx as jsx229, jsxs as jsxs108 } from "react/jsx-runtime";
34580
34815
  var leftDraggerStyle2 = {
34581
34816
  paddingLeft: 0
@@ -34595,8 +34830,8 @@ var TimelineTransformOriginField = ({
34595
34830
  onDragValueChange,
34596
34831
  onDragEnd
34597
34832
  }) => {
34598
- const [dragX, setDragX] = useState81(null);
34599
- const [dragY, setDragY] = useState81(null);
34833
+ const [dragX, setDragX] = useState80(null);
34834
+ const [dragY, setDragY] = useState80(null);
34600
34835
  const parsed = useMemo137(() => parseTransformOrigin(effectiveValue), [effectiveValue]);
34601
34836
  const percent = useMemo137(() => parsed === null ? null : parsedTransformOriginToPercent(parsed), [parsed]);
34602
34837
  const configuredStep = field.fieldSchema.type === "transform-origin" ? field.fieldSchema.step : undefined;
@@ -34750,7 +34985,7 @@ var TimelineTransformOriginField = ({
34750
34985
  };
34751
34986
 
34752
34987
  // src/components/Timeline/TimelineTranslateField.tsx
34753
- import { useCallback as useCallback130, useMemo as useMemo138, useState as useState82 } from "react";
34988
+ import { useCallback as useCallback130, useMemo as useMemo138, useState as useState81 } from "react";
34754
34989
  import { jsx as jsx230, jsxs as jsxs109 } from "react/jsx-runtime";
34755
34990
  var leftDraggerStyle3 = {
34756
34991
  paddingLeft: 0
@@ -34770,8 +35005,8 @@ var TimelineTranslateField = ({
34770
35005
  onDragValueChange,
34771
35006
  onDragEnd
34772
35007
  }) => {
34773
- const [dragX, setDragX] = useState82(null);
34774
- const [dragY, setDragY] = useState82(null);
35008
+ const [dragX, setDragX] = useState81(null);
35009
+ const [dragY, setDragY] = useState81(null);
34775
35010
  const [codeX, codeY] = useMemo138(() => parseTranslate(String(effectiveValue ?? "0px 0px")), [effectiveValue]);
34776
35011
  const configuredStep = field.fieldSchema.type === "translate" ? field.fieldSchema.step : undefined;
34777
35012
  const step = configuredStep ?? 1;
@@ -34894,7 +35129,7 @@ var TimelineTranslateField = ({
34894
35129
  };
34895
35130
 
34896
35131
  // src/components/Timeline/TimelineUvCoordinateField.tsx
34897
- import { useCallback as useCallback131, useMemo as useMemo139, useState as useState83 } from "react";
35132
+ import { useCallback as useCallback131, useMemo as useMemo139, useState as useState82 } from "react";
34898
35133
  import { jsx as jsx231, jsxs as jsxs110 } from "react/jsx-runtime";
34899
35134
  var leftDraggerStyle4 = {
34900
35135
  paddingLeft: 0
@@ -34926,8 +35161,8 @@ var TimelineUvCoordinateField = ({
34926
35161
  onDragValueChange,
34927
35162
  onDragEnd
34928
35163
  }) => {
34929
- const [dragX, setDragX] = useState83(null);
34930
- const [dragY, setDragY] = useState83(null);
35164
+ const [dragX, setDragX] = useState82(null);
35165
+ const [dragY, setDragY] = useState82(null);
34931
35166
  const [codeX, codeY] = useMemo139(() => parseUvCoordinate2(effectiveValue), [effectiveValue]);
34932
35167
  const configuredStep = field.fieldSchema.type === "uv-coordinate" ? field.fieldSchema.step : undefined;
34933
35168
  const step = configuredStep ?? 0.01;
@@ -36567,7 +36802,7 @@ var TimelineMediaInfo = ({ src }) => {
36567
36802
  };
36568
36803
 
36569
36804
  // src/components/Timeline/TimelineSequenceName.tsx
36570
- import { useCallback as useCallback136, useEffect as useEffect79, useMemo as useMemo147, useRef as useRef53, useState as useState84 } from "react";
36805
+ import { useCallback as useCallback136, useEffect as useEffect78, useMemo as useMemo147, useRef as useRef53, useState as useState83 } from "react";
36571
36806
  import { jsx as jsx242, jsxs as jsxs115, Fragment as Fragment37 } from "react/jsx-runtime";
36572
36807
  var MAX_DISPLAY_NAME_LENGTH = 1000;
36573
36808
  var MAX_RENAME_INPUT_WIDTH = 240;
@@ -36587,7 +36822,7 @@ var TimelineSequenceName = ({
36587
36822
  onSaveName
36588
36823
  }) => {
36589
36824
  const inputRef = useRef53(null);
36590
- const [draftName, setDraftName] = useState84(displayName);
36825
+ const [draftName, setDraftName] = useState83(displayName);
36591
36826
  const cancelNextBlurRef = useRef53(false);
36592
36827
  const style10 = useMemo147(() => {
36593
36828
  return {
@@ -36624,7 +36859,7 @@ var TimelineSequenceName = ({
36624
36859
  };
36625
36860
  }, [style10]);
36626
36861
  const text2 = getTruncatedDisplayName(displayName) || "<Sequence>";
36627
- useEffect79(() => {
36862
+ useEffect78(() => {
36628
36863
  if (!editing) {
36629
36864
  setDraftName(displayName);
36630
36865
  return;
@@ -36806,10 +37041,10 @@ var TimelineSequenceItem = ({
36806
37041
  const { onSelect, selectable, selected } = useTimelineRowSelection(nodePathInfo);
36807
37042
  const { selectedItems } = useTimelineSelection();
36808
37043
  const containsSelection = useTimelineRowContainsSelection(nodePathInfo);
36809
- const [effectDropHovered, setEffectDropHovered] = useState85(false);
36810
- const [isRenaming, setIsRenaming] = useState85(false);
36811
- const [sequenceDropIndicator, setSequenceDropIndicator] = useState85(null);
36812
- const [sequenceDropRejection, setSequenceDropRejection] = useState85(null);
37044
+ const [effectDropHovered, setEffectDropHovered] = useState84(false);
37045
+ const [isRenaming, setIsRenaming] = useState84(false);
37046
+ const [sequenceDropIndicator, setSequenceDropIndicator] = useState84(null);
37047
+ const [sequenceDropRejection, setSequenceDropRejection] = useState84(null);
36813
37048
  const timelinePosition = Internals74.Timeline.useTimelinePosition();
36814
37049
  const { canOpenInEditor, openInEditor: openInEditor2, originalLocation } = useOpenSequenceInEditor(sequence);
36815
37050
  const fileLocation = useMemo149(() => formatFileLocation({
@@ -37483,7 +37718,7 @@ var TimelineList = ({ timeline }) => {
37483
37718
  };
37484
37719
 
37485
37720
  // src/components/Timeline/TimelinePinchZoom.tsx
37486
- import { useCallback as useCallback139, useContext as useContext94, useEffect as useEffect80, useRef as useRef54 } from "react";
37721
+ import { useCallback as useCallback139, useContext as useContext94, useEffect as useEffect79, useRef as useRef54 } from "react";
37487
37722
  import { Internals as Internals75 } from "remotion";
37488
37723
  var ZOOM_WHEEL_DELTA = 0.06;
37489
37724
  var TimelinePinchZoom = () => {
@@ -37540,7 +37775,7 @@ var TimelinePinchZoom = () => {
37540
37775
  setZoom
37541
37776
  ]);
37542
37777
  const supportsWebKitPinch = typeof window !== "undefined" && "GestureEvent" in window;
37543
- useEffect80(() => {
37778
+ useEffect79(() => {
37544
37779
  const el = timelineVerticalScroll.current;
37545
37780
  if (!el) {
37546
37781
  return;
@@ -37550,7 +37785,7 @@ var TimelinePinchZoom = () => {
37550
37785
  el.removeEventListener("wheel", onWheel);
37551
37786
  };
37552
37787
  }, [onWheel]);
37553
- useEffect80(() => {
37788
+ useEffect79(() => {
37554
37789
  const el = timelineVerticalScroll.current;
37555
37790
  if (!el || !editorZoomGestures || !supportsWebKitPinch) {
37556
37791
  return;
@@ -37622,7 +37857,7 @@ var TimelinePinchZoom = () => {
37622
37857
  canvasContent,
37623
37858
  setZoom
37624
37859
  ]);
37625
- useEffect80(() => {
37860
+ useEffect79(() => {
37626
37861
  const el = timelineVerticalScroll.current;
37627
37862
  if (!el || !editorZoomGestures) {
37628
37863
  return;
@@ -37700,7 +37935,7 @@ var TimelinePinchZoom = () => {
37700
37935
  };
37701
37936
 
37702
37937
  // src/components/Timeline/TimelinePlayCursorSyncer.tsx
37703
- import { useContext as useContext95, useEffect as useEffect81 } from "react";
37938
+ import { useContext as useContext95, useEffect as useEffect80 } from "react";
37704
37939
  import { Internals as Internals76 } from "remotion";
37705
37940
  var lastTimelinePositionWhileScrolling = null;
37706
37941
  var TimelinePlayCursorSyncer = () => {
@@ -37718,7 +37953,7 @@ var TimelinePlayCursorSyncer = () => {
37718
37953
  setCurrentDuration(video.durationInFrames);
37719
37954
  setCurrentFps(video.fps);
37720
37955
  }
37721
- useEffect81(() => {
37956
+ useEffect80(() => {
37722
37957
  if (!video) {
37723
37958
  return;
37724
37959
  }
@@ -37731,7 +37966,7 @@ var TimelinePlayCursorSyncer = () => {
37731
37966
  frame: timelinePosition
37732
37967
  });
37733
37968
  }, [playbackRate, playing, timelinePosition, video]);
37734
- useEffect81(() => {
37969
+ useEffect80(() => {
37735
37970
  const { current } = scrollableRef;
37736
37971
  if (!current) {
37737
37972
  return;
@@ -37853,7 +38088,7 @@ import {
37853
38088
  useCallback as useCallback140,
37854
38089
  useContext as useContext96,
37855
38090
  useMemo as useMemo151,
37856
- useState as useState86
38091
+ useState as useState85
37857
38092
  } from "react";
37858
38093
  import { jsx as jsx246 } from "react/jsx-runtime";
37859
38094
  var emptyDraggedKeyframes = new Set;
@@ -37873,7 +38108,7 @@ var TimelineKeyframeDragStateContext = createContext25({
37873
38108
  }
37874
38109
  });
37875
38110
  var TimelineKeyframeDragStateProvider = ({ children }) => {
37876
- const [draggedKeys, setDraggedKeys] = useState86(emptyDraggedKeyframes);
38111
+ const [draggedKeys, setDraggedKeys] = useState85(emptyDraggedKeyframes);
37877
38112
  const setDraggedKeyframes = useCallback140((keyframes) => {
37878
38113
  setDraggedKeys(new Set(keyframes.map(getTimelineKeyframeDragKey)));
37879
38114
  }, []);
@@ -39240,7 +39475,7 @@ var getTimelineSequenceLayout = ({
39240
39475
  };
39241
39476
 
39242
39477
  // src/helpers/use-max-media-duration.ts
39243
- import { useEffect as useEffect82, useState as useState87 } from "react";
39478
+ import { useEffect as useEffect81, useState as useState86 } from "react";
39244
39479
  var cache2 = new Map;
39245
39480
  var getCacheKey = (src, fps) => JSON.stringify([src, fps]);
39246
39481
  var getSrc = (s) => {
@@ -39255,8 +39490,8 @@ var getSrc = (s) => {
39255
39490
  var useMaxMediaDuration = (s, fps) => {
39256
39491
  const src = getSrc(s);
39257
39492
  const cacheKey = src ? getCacheKey(src, fps) : null;
39258
- const [maxMediaDuration, setMaxMediaDuration] = useState87(cacheKey ? cache2.get(cacheKey) ?? null : Infinity);
39259
- useEffect82(() => {
39493
+ const [maxMediaDuration, setMaxMediaDuration] = useState86(cacheKey ? cache2.get(cacheKey) ?? null : Infinity);
39494
+ useEffect81(() => {
39260
39495
  if (!src || !cacheKey) {
39261
39496
  return;
39262
39497
  }
@@ -39298,7 +39533,7 @@ import {
39298
39533
  shouldTileLoopDisplay,
39299
39534
  sliceWaveformPeaks
39300
39535
  } from "@remotion/timeline-utils";
39301
- import { useEffect as useEffect83, useMemo as useMemo155, useRef as useRef57, useState as useState88 } from "react";
39536
+ import { useEffect as useEffect82, useMemo as useMemo155, useRef as useRef57, useState as useState87 } from "react";
39302
39537
  import { Internals as Internals81 } from "remotion";
39303
39538
  import { jsx as jsx251, jsxs as jsxs121 } from "react/jsx-runtime";
39304
39539
  var EMPTY_PEAKS = new Float32Array(0);
@@ -39387,9 +39622,9 @@ var AudioWaveform = ({
39387
39622
  playbackRate,
39388
39623
  loopDisplay
39389
39624
  }) => {
39390
- const [peaks, setPeaks] = useState88(null);
39391
- const [error, setError] = useState88(null);
39392
- const [waveformCanvasKey, setWaveformCanvasKey] = useState88(0);
39625
+ const [peaks, setPeaks] = useState87(null);
39626
+ const [error, setError] = useState87(null);
39627
+ const [waveformCanvasKey, setWaveformCanvasKey] = useState87(0);
39393
39628
  const canUseWorkerPath = useMemo155(() => canUseAudioWaveformWorker(), []);
39394
39629
  const vidConf = Internals81.useUnsafeVideoConfig();
39395
39630
  if (vidConf === null) {
@@ -39401,7 +39636,7 @@ var AudioWaveform = ({
39401
39636
  const hasTransferredCanvas = useRef57(false);
39402
39637
  const latestRequestId = useRef57(0);
39403
39638
  const shouldRenderVolumeOverlay = doesVolumeChange && typeof volume === "string";
39404
- useEffect83(() => {
39639
+ useEffect82(() => {
39405
39640
  if (canUseWorkerPath) {
39406
39641
  return;
39407
39642
  }
@@ -39419,7 +39654,7 @@ var AudioWaveform = ({
39419
39654
  });
39420
39655
  return () => controller.abort();
39421
39656
  }, [canUseWorkerPath, src]);
39422
- useEffect83(() => {
39657
+ useEffect82(() => {
39423
39658
  if (!canUseWorkerPath) {
39424
39659
  return;
39425
39660
  }
@@ -39492,7 +39727,7 @@ var AudioWaveform = ({
39492
39727
  startFrom,
39493
39728
  vidConf.fps
39494
39729
  ]);
39495
- useEffect83(() => {
39730
+ useEffect82(() => {
39496
39731
  const { current: canvasElement } = waveformCanvas;
39497
39732
  if (!canvasElement) {
39498
39733
  return;
@@ -39559,7 +39794,7 @@ var AudioWaveform = ({
39559
39794
  volume,
39560
39795
  waveformCanvasKey
39561
39796
  ]);
39562
- useEffect83(() => {
39797
+ useEffect82(() => {
39563
39798
  if (!shouldRenderVolumeOverlay) {
39564
39799
  return;
39565
39800
  }
@@ -39697,7 +39932,7 @@ var LoopedTimelineIndicator = ({ loops }) => {
39697
39932
 
39698
39933
  // src/components/Timeline/TimelineImageInfo.tsx
39699
39934
  import { drawRepeatingImageThumbnail } from "@remotion/timeline-utils";
39700
- import { useEffect as useEffect84, useRef as useRef58 } from "react";
39935
+ import { useEffect as useEffect83, useRef as useRef58 } from "react";
39701
39936
  import { jsx as jsx254 } from "react/jsx-runtime";
39702
39937
  var HEIGHT = getTimelineLayerHeight("image") - 2;
39703
39938
  var containerStyle9 = {
@@ -39710,7 +39945,7 @@ var containerStyle9 = {
39710
39945
  };
39711
39946
  var TimelineImageInfo = ({ src, visualizationWidth }) => {
39712
39947
  const ref2 = useRef58(null);
39713
- useEffect84(() => {
39948
+ useEffect83(() => {
39714
39949
  const { current } = ref2;
39715
39950
  if (!current) {
39716
39951
  return;
@@ -39789,9 +40024,9 @@ import { stringifySequenceSubscriptionKey as stringifySequenceSubscriptionKey4 }
39789
40024
  import {
39790
40025
  useCallback as useCallback143,
39791
40026
  useContext as useContext102,
39792
- useEffect as useEffect85,
40027
+ useEffect as useEffect84,
39793
40028
  useRef as useRef59,
39794
- useState as useState89
40029
+ useState as useState88
39795
40030
  } from "react";
39796
40031
  import { Internals as Internals82 } from "remotion";
39797
40032
  import { NoReactInternals as NoReactInternals26 } from "remotion/no-react";
@@ -39995,7 +40230,7 @@ var useTimelineSequenceFromDrag = ({
39995
40230
  const { overrideIdToNodePathMappings } = useContext102(Internals82.OverrideIdsToNodePathsGettersContext);
39996
40231
  const { previewServerState } = useContext102(StudioServerConnectionCtx);
39997
40232
  const currentSelection = useCurrentTimelineSelectionStateAsRef();
39998
- const [dragging, setDragging] = useState89(false);
40233
+ const [dragging, setDragging] = useState88(false);
39999
40234
  const dragStateRef = useRef59(null);
40000
40235
  const latestRef = useRef59({
40001
40236
  nodePathInfo,
@@ -40098,7 +40333,7 @@ var useTimelineSequenceFromDrag = ({
40098
40333
  timelineDurationInFrames,
40099
40334
  windowWidth
40100
40335
  ]);
40101
- useEffect85(() => {
40336
+ useEffect84(() => {
40102
40337
  if (!dragging) {
40103
40338
  return;
40104
40339
  }
@@ -40157,7 +40392,7 @@ var TimelineSequenceRightEdgeDragHandle = ({ nodePathInfo, windowWidth, timeline
40157
40392
  const { overrideIdToNodePathMappings } = useContext102(Internals82.OverrideIdsToNodePathsGettersContext);
40158
40393
  const { previewServerState } = useContext102(StudioServerConnectionCtx);
40159
40394
  const currentSelection = useCurrentTimelineSelectionStateAsRef();
40160
- const [dragging, setDragging] = useState89(false);
40395
+ const [dragging, setDragging] = useState88(false);
40161
40396
  const dragStateRef = useRef59(null);
40162
40397
  const latestRef = useRef59({
40163
40398
  nodePathInfo,
@@ -40260,7 +40495,7 @@ var TimelineSequenceRightEdgeDragHandle = ({ nodePathInfo, windowWidth, timeline
40260
40495
  timelineDurationInFrames,
40261
40496
  windowWidth
40262
40497
  ]);
40263
- useEffect85(() => {
40498
+ useEffect84(() => {
40264
40499
  if (!dragging) {
40265
40500
  return;
40266
40501
  }
@@ -40329,14 +40564,17 @@ import {
40329
40564
  extractFrames,
40330
40565
  fillFrameWhereItFits,
40331
40566
  fillWithCachedFrames,
40567
+ frameDatabase,
40332
40568
  getAspectRatioFromCache,
40569
+ getFrameDatabaseKeyPrefix,
40333
40570
  getLoopDisplayWidth as getLoopDisplayWidth2,
40571
+ getTimestampFromFrameDatabaseKey,
40334
40572
  makeFrameDatabaseKey,
40335
40573
  resizeVideoFrame,
40336
- shouldTileLoopDisplay as shouldTileLoopDisplay2,
40574
+ shouldTileLoopDisplay as shouldTileLoopDisplay3,
40337
40575
  WEBCODECS_TIMESCALE
40338
40576
  } from "@remotion/timeline-utils";
40339
- import { useEffect as useEffect86, useMemo as useMemo156, useRef as useRef60, useState as useState90 } from "react";
40577
+ import { useEffect as useEffect85, useMemo as useMemo156, useRef as useRef60, useState as useState89 } from "react";
40340
40578
  import { useVideoConfig as useVideoConfig10 } from "remotion";
40341
40579
 
40342
40580
  // src/components/Timeline/get-timeline-video-info-widths.ts
@@ -40353,6 +40591,31 @@ var getTimelineVideoInfoWidths = ({
40353
40591
  };
40354
40592
  };
40355
40593
 
40594
+ // src/components/Timeline/timeline-video-filmstrip-times.ts
40595
+ import { shouldTileLoopDisplay as shouldTileLoopDisplay2 } from "@remotion/timeline-utils";
40596
+ var getTimelineVideoFilmstripTimes = ({
40597
+ trimBefore,
40598
+ durationInFrames,
40599
+ playbackRate,
40600
+ fps,
40601
+ loopDisplay,
40602
+ frozenMediaFrame
40603
+ }) => {
40604
+ if (frozenMediaFrame !== null) {
40605
+ return {
40606
+ type: "frozen",
40607
+ timestampInSeconds: Math.max(0, frozenMediaFrame / fps)
40608
+ };
40609
+ }
40610
+ const fromSeconds = trimBefore / fps;
40611
+ const visibleDurationInFrames = shouldTileLoopDisplay2(loopDisplay) && loopDisplay ? loopDisplay.durationInFrames : durationInFrames;
40612
+ return {
40613
+ type: "range",
40614
+ fromSeconds,
40615
+ toSeconds: fromSeconds + visibleDurationInFrames * playbackRate / fps
40616
+ };
40617
+ };
40618
+
40356
40619
  // src/components/Timeline/TimelineVideoInfo.tsx
40357
40620
  import { jsx as jsx257, jsxs as jsxs125 } from "react/jsx-runtime";
40358
40621
  var outerStyle = {
@@ -40369,6 +40632,7 @@ var filmstripContainerStyle = {
40369
40632
  fontSize: 10,
40370
40633
  fontFamily: "Arial, Helvetica"
40371
40634
  };
40635
+ var MAX_FROZEN_FRAME_CACHE_DEVIATION = WEBCODECS_TIMESCALE * 0.05;
40372
40636
  var TimelineVideoInfo = ({
40373
40637
  src,
40374
40638
  visualizationWidth,
@@ -40380,11 +40644,12 @@ var TimelineVideoInfo = ({
40380
40644
  doesVolumeChange,
40381
40645
  premountWidth,
40382
40646
  postmountWidth,
40383
- loopDisplay
40647
+ loopDisplay,
40648
+ frozenMediaFrame
40384
40649
  }) => {
40385
40650
  const { fps } = useVideoConfig10();
40386
40651
  const ref2 = useRef60(null);
40387
- const [error, setError] = useState90(null);
40652
+ const [error, setError] = useState89(null);
40388
40653
  const aspectRatio = useRef60(getAspectRatioFromCache(src));
40389
40654
  const { mediaVisualizationWidth, mediaNaturalWidth } = useMemo156(() => {
40390
40655
  return getTimelineVideoInfoWidths({
@@ -40394,7 +40659,7 @@ var TimelineVideoInfo = ({
40394
40659
  postmountWidth
40395
40660
  });
40396
40661
  }, [naturalWidth, postmountWidth, premountWidth, visualizationWidth]);
40397
- useEffect86(() => {
40662
+ useEffect85(() => {
40398
40663
  if (error) {
40399
40664
  return;
40400
40665
  }
@@ -40411,11 +40676,96 @@ var TimelineVideoInfo = ({
40411
40676
  return;
40412
40677
  }
40413
40678
  current.appendChild(canvas);
40679
+ const drawRepeatedFrame = (frame2) => {
40680
+ const thumbnailWidth = Math.max(1, frame2.displayWidth / window.devicePixelRatio);
40681
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
40682
+ for (let x = 0;x < canvas.width; x += thumbnailWidth) {
40683
+ ctx.drawImage(frame2, x, 0, thumbnailWidth, TIMELINE_LAYER_FILMSTRIP_HEIGHT);
40684
+ }
40685
+ };
40686
+ const getCachedFrozenFrame = (timestamp) => {
40687
+ const prefix = getFrameDatabaseKeyPrefix(src);
40688
+ const keys = Array.from(frameDatabase.keys()).filter((k) => k.startsWith(prefix));
40689
+ let bestDistance = Infinity;
40690
+ let bestFrame = null;
40691
+ for (const key5 of keys) {
40692
+ const frame2 = frameDatabase.get(key5);
40693
+ if (!frame2) {
40694
+ continue;
40695
+ }
40696
+ const distance = Math.abs(getTimestampFromFrameDatabaseKey(key5) - timestamp);
40697
+ if (distance < bestDistance) {
40698
+ bestDistance = distance;
40699
+ bestFrame = frame2.frame;
40700
+ }
40701
+ }
40702
+ return bestDistance <= MAX_FROZEN_FRAME_CACHE_DEVIATION ? bestFrame : null;
40703
+ };
40704
+ const times = getTimelineVideoFilmstripTimes({
40705
+ trimBefore,
40706
+ durationInFrames,
40707
+ playbackRate,
40708
+ fps,
40709
+ loopDisplay,
40710
+ frozenMediaFrame
40711
+ });
40712
+ if (times.type === "frozen") {
40713
+ const timestamp = times.timestampInSeconds * WEBCODECS_TIMESCALE;
40714
+ const cachedFrame = getCachedFrozenFrame(timestamp);
40715
+ if (cachedFrame) {
40716
+ drawRepeatedFrame(cachedFrame);
40717
+ return () => {
40718
+ current.removeChild(canvas);
40719
+ };
40720
+ }
40721
+ extractFrames({
40722
+ timestampsInSeconds: ({
40723
+ track
40724
+ }) => {
40725
+ aspectRatio.current = track.width / track.height;
40726
+ aspectRatioCache.set(src, aspectRatio.current);
40727
+ return [times.timestampInSeconds];
40728
+ },
40729
+ src,
40730
+ onVideoSample: (sample) => {
40731
+ let frame2;
40732
+ try {
40733
+ frame2 = sample.toVideoFrame();
40734
+ const scale = TIMELINE_LAYER_FILMSTRIP_HEIGHT / frame2.displayHeight * window.devicePixelRatio;
40735
+ const transformed = resizeVideoFrame({
40736
+ frame: frame2,
40737
+ scale
40738
+ });
40739
+ if (transformed !== frame2) {
40740
+ frame2.close();
40741
+ }
40742
+ frame2 = undefined;
40743
+ const databaseKey = makeFrameDatabaseKey(src, transformed.timestamp);
40744
+ addFrameToCache(databaseKey, transformed);
40745
+ drawRepeatedFrame(transformed);
40746
+ } catch (e) {
40747
+ if (frame2) {
40748
+ frame2.close();
40749
+ }
40750
+ throw e;
40751
+ } finally {
40752
+ sample.close();
40753
+ }
40754
+ },
40755
+ signal: controller.signal
40756
+ }).catch((e) => {
40757
+ setError(e);
40758
+ });
40759
+ return () => {
40760
+ controller.abort();
40761
+ current.removeChild(canvas);
40762
+ };
40763
+ }
40414
40764
  const loopWidth = getLoopDisplayWidth2({
40415
40765
  visualizationWidth: mediaNaturalWidth,
40416
40766
  loopDisplay
40417
40767
  });
40418
- const shouldRepeatVideo = shouldTileLoopDisplay2(loopDisplay);
40768
+ const shouldRepeatVideo = shouldTileLoopDisplay3(loopDisplay);
40419
40769
  const targetCanvas = shouldRepeatVideo ? document.createElement("canvas") : canvas;
40420
40770
  targetCanvas.width = shouldRepeatVideo ? Math.max(1, Math.ceil(loopWidth)) : canvas.width;
40421
40771
  targetCanvas.height = canvas.height;
@@ -40438,9 +40788,7 @@ var TimelineVideoInfo = ({
40438
40788
  ctx.fillRect(0, 0, canvas.width, canvas.height);
40439
40789
  };
40440
40790
  const filledSlots = new Map;
40441
- const fromSeconds = trimBefore / fps;
40442
- const visibleDurationInFrames = shouldRepeatVideo && loopDisplay ? loopDisplay.durationInFrames : durationInFrames;
40443
- const toSeconds = fromSeconds + visibleDurationInFrames * playbackRate / fps;
40791
+ const { fromSeconds, toSeconds } = times;
40444
40792
  const targetWidth = shouldRepeatVideo ? targetCanvas.width : mediaNaturalWidth;
40445
40793
  if (aspectRatio.current !== null) {
40446
40794
  ensureSlots({
@@ -40559,6 +40907,7 @@ var TimelineVideoInfo = ({
40559
40907
  durationInFrames,
40560
40908
  error,
40561
40909
  fps,
40910
+ frozenMediaFrame,
40562
40911
  loopDisplay,
40563
40912
  mediaNaturalWidth,
40564
40913
  mediaVisualizationWidth,
@@ -40878,9 +41227,7 @@ var TimelineSequenceInner = ({ s, windowWidth, nodePathInfo, sequenceFrameOffset
40878
41227
  onSelect({ shiftKey: false, toggleKey: false });
40879
41228
  }
40880
41229
  }, [onSelect, selectable]);
40881
- const freezeStatus = propStatusesForOverride?.freeze;
40882
- const runtimeFreezeFrame = typeof s.controls?.currentRuntimeValueDotNotation.freeze === "number" ? s.controls.currentRuntimeValueDotNotation.freeze : null;
40883
- const frozenFrame = freezeStatus?.status === "static" ? typeof freezeStatus.codeValue === "number" ? freezeStatus.codeValue : null : runtimeFreezeFrame;
41230
+ const { frozenFrame } = s;
40884
41231
  const { onPointerDown: onMoveDragPointerDown } = useTimelineSequenceFromDrag({
40885
41232
  nodePathInfo,
40886
41233
  windowWidth,
@@ -40959,7 +41306,8 @@ var TimelineSequenceInner = ({ s, windowWidth, nodePathInfo, sequenceFrameOffset
40959
41306
  doesVolumeChange: s.doesVolumeChange,
40960
41307
  premountWidth: premountWidth ?? 0,
40961
41308
  postmountWidth: postmountWidth ?? 0,
40962
- loopDisplay: s.loopDisplay
41309
+ loopDisplay: s.loopDisplay,
41310
+ frozenMediaFrame: s.frozenMediaFrame
40963
41311
  }) : null,
40964
41312
  s.type === "image" ? /* @__PURE__ */ jsx258(TimelineImageInfo, {
40965
41313
  src: s.src,
@@ -41074,8 +41422,8 @@ var noop3 = () => {
41074
41422
  var TimelineContextMenuArea = ({ children }) => {
41075
41423
  const { compositions, canvasContent } = useContext105(Internals84.CompositionManager);
41076
41424
  const videoConfig = Internals84.useUnsafeVideoConfig();
41077
- const [isAddingSolid, setIsAddingSolid] = useState91(false);
41078
- const [isAddingAsset, setIsAddingAsset] = useState91(false);
41425
+ const [isAddingSolid, setIsAddingSolid] = useState90(false);
41426
+ const [isAddingAsset, setIsAddingAsset] = useState90(false);
41079
41427
  const { previewServerState } = useContext105(StudioServerConnectionCtx);
41080
41428
  const previewConnected = previewServerState.type === "connected";
41081
41429
  const currentCompositionId = canvasContent?.type === "composition" ? canvasContent.compositionId : null;
@@ -41360,13 +41708,13 @@ var EditorContent = ({ readOnlyStudio, children }) => {
41360
41708
  };
41361
41709
 
41362
41710
  // src/components/GlobalKeybindings.tsx
41363
- import { useContext as useContext107, useEffect as useEffect87 } from "react";
41711
+ import { useContext as useContext107, useEffect as useEffect86 } from "react";
41364
41712
  var GlobalKeybindings = () => {
41365
41713
  const keybindings = useKeybinding();
41366
41714
  const { setSelectedModal } = useContext107(ModalsContext);
41367
41715
  const { setCheckerboard } = useContext107(CheckerboardContext);
41368
41716
  const { navigateToNextComposition, navigateToPreviousComposition } = useCompositionNavigation();
41369
- useEffect87(() => {
41717
+ useEffect86(() => {
41370
41718
  const nKey = keybindings.registerKeybinding({
41371
41719
  event: "keypress",
41372
41720
  key: "n",
@@ -41489,7 +41837,7 @@ import {
41489
41837
  extraPackages,
41490
41838
  installableMap
41491
41839
  } from "@remotion/studio-shared";
41492
- import React194, { useCallback as useCallback148, useContext as useContext109, useEffect as useEffect88 } from "react";
41840
+ import React194, { useCallback as useCallback148, useContext as useContext109, useEffect as useEffect87 } from "react";
41493
41841
  import { VERSION as VERSION2 } from "remotion";
41494
41842
 
41495
41843
  // src/components/InstallablePackage.tsx
@@ -41575,7 +41923,7 @@ var InstallPackageModal = ({ packageManager }) => {
41575
41923
  const canSelectPackages = state.type === "idle" && ctx.type === "connected";
41576
41924
  const disabled = !(canSelectPackages || state.type === "done") || selectedPackages.length === 0;
41577
41925
  const { registerKeybinding } = useKeybinding();
41578
- useEffect88(() => {
41926
+ useEffect87(() => {
41579
41927
  if (disabled) {
41580
41928
  return;
41581
41929
  }
@@ -41729,7 +42077,7 @@ var InstallPackageModal = ({ packageManager }) => {
41729
42077
  import { useCallback as useCallback150, useContext as useContext112, useMemo as useMemo163 } from "react";
41730
42078
 
41731
42079
  // src/components/RenderModal/ResolveCompositionBeforeModal.tsx
41732
- import React195, { useContext as useContext110, useEffect as useEffect89, useMemo as useMemo161 } from "react";
42080
+ import React195, { useContext as useContext110, useEffect as useEffect88, useMemo as useMemo161 } from "react";
41733
42081
  import { Internals as Internals86 } from "remotion";
41734
42082
  import { jsx as jsx267, jsxs as jsxs133 } from "react/jsx-runtime";
41735
42083
  var loaderContainer2 = {
@@ -41753,7 +42101,7 @@ var ResolveCompositionBeforeModal = ({ compositionId, children }) => {
41753
42101
  const resolved = Internals86.useResolvedVideoConfig(compositionId);
41754
42102
  const unresolvedContext = useContext110(Internals86.CompositionManager);
41755
42103
  const unresolved = unresolvedContext.compositions.find((c) => compositionId === c.id);
41756
- useEffect89(() => {
42104
+ useEffect88(() => {
41757
42105
  const { current } = Internals86.resolveCompositionsRef;
41758
42106
  if (!current) {
41759
42107
  throw new Error("No ref to trigger composition calc");
@@ -41814,9 +42162,9 @@ var ResolveCompositionBeforeModal = ({ compositionId, children }) => {
41814
42162
  import {
41815
42163
  useCallback as useCallback149,
41816
42164
  useContext as useContext111,
41817
- useEffect as useEffect90,
42165
+ useEffect as useEffect89,
41818
42166
  useMemo as useMemo162,
41819
- useState as useState92
42167
+ useState as useState91
41820
42168
  } from "react";
41821
42169
 
41822
42170
  // src/helpers/resolved-stack-to-symbolicated.ts
@@ -41892,9 +42240,9 @@ var CodemodFooter = ({
41892
42240
  submitLabel,
41893
42241
  onSuccess
41894
42242
  }) => {
41895
- const [submitting, setSubmitting] = useState92(false);
42243
+ const [submitting, setSubmitting] = useState91(false);
41896
42244
  const { setSelectedModal } = useContext111(ModalsContext);
41897
- const [codemodStatus, setCanApplyCodemod] = useState92({
42245
+ const [codemodStatus, setCanApplyCodemod] = useState91({
41898
42246
  type: "loading"
41899
42247
  });
41900
42248
  const resolvedLocation = useResolvedStack(stack2);
@@ -41940,7 +42288,7 @@ var CodemodFooter = ({
41940
42288
  });
41941
42289
  }
41942
42290
  }, [codemod, symbolicatedStack]);
41943
- useEffect90(() => {
42291
+ useEffect89(() => {
41944
42292
  if (!stack2) {
41945
42293
  setCanApplyCodemod({
41946
42294
  type: "fail",
@@ -41975,7 +42323,7 @@ var CodemodFooter = ({
41975
42323
  }, [errorNotification, getCanApplyCodemod, stack2, symbolicatedStack]);
41976
42324
  const disabled = !valid || submitting || symbolicatedStack === null || codemodStatus.type !== "success";
41977
42325
  const { registerKeybinding } = useKeybinding();
41978
- useEffect90(() => {
42326
+ useEffect89(() => {
41979
42327
  if (disabled) {
41980
42328
  return;
41981
42329
  }
@@ -42172,7 +42520,7 @@ var DeleteFolder = ({ folderName, parentName, stack: stack2 }) => {
42172
42520
  };
42173
42521
 
42174
42522
  // src/components/NewComposition/DuplicateComposition.tsx
42175
- import { useCallback as useCallback153, useContext as useContext113, useMemo as useMemo165, useState as useState93 } from "react";
42523
+ import { useCallback as useCallback153, useContext as useContext113, useMemo as useMemo165, useState as useState92 } from "react";
42176
42524
  import { Internals as Internals88 } from "remotion";
42177
42525
 
42178
42526
  // src/helpers/validate-new-comp-data.ts
@@ -42284,14 +42632,14 @@ var DuplicateCompositionLoaded = ({ initialType }) => {
42284
42632
  }
42285
42633
  const { resolved, unresolved } = context;
42286
42634
  const compositionStack = unresolved.stack ?? null;
42287
- const [initialCompType] = useState93(initialType);
42635
+ const [initialCompType] = useState92(initialType);
42288
42636
  const hadDimensionsDefined = unresolved.width && unresolved.height;
42289
42637
  const hadFpsDefined = unresolved.fps !== undefined;
42290
42638
  const hadDurationDefined = unresolved.durationInFrames !== undefined;
42291
- const [selectedFrameRate, setFrameRate] = useState93(resolved.result.fps);
42639
+ const [selectedFrameRate, setFrameRate] = useState92(resolved.result.fps);
42292
42640
  const { compositions } = useContext113(Internals88.CompositionManager);
42293
- const [type, setType] = useState93(initialCompType);
42294
- const [newId, setName] = useState93(() => {
42641
+ const [type, setType] = useState92(initialCompType);
42642
+ const [newId, setName] = useState92(() => {
42295
42643
  const numberAtEnd = resolved.result.id.match(/([0-9]+)$/)?.[0];
42296
42644
  let prefix = numberAtEnd ? Number(numberAtEnd) : 1;
42297
42645
  const initialName = resolved.result.id.replace(/([0-9]+)$/, "");
@@ -42306,11 +42654,11 @@ var DuplicateCompositionLoaded = ({ initialType }) => {
42306
42654
  }
42307
42655
  return currentName;
42308
42656
  });
42309
- const [size3, setSize] = useState93(() => ({
42657
+ const [size3, setSize] = useState92(() => ({
42310
42658
  width: resolved.result.width,
42311
42659
  height: resolved.result.height
42312
42660
  }));
42313
- const [durationInFrames, setDurationInFrames] = useState93(resolved.result.durationInFrames);
42661
+ const [durationInFrames, setDurationInFrames] = useState92(resolved.result.durationInFrames);
42314
42662
  const onTypeChanged = useCallback153((newType) => {
42315
42663
  setType(newType);
42316
42664
  }, []);
@@ -42640,10 +42988,10 @@ var DuplicateComposition = ({ compositionId, compositionType }) => {
42640
42988
  import {
42641
42989
  useCallback as useCallback154,
42642
42990
  useContext as useContext114,
42643
- useEffect as useEffect91,
42991
+ useEffect as useEffect90,
42644
42992
  useMemo as useMemo166,
42645
42993
  useRef as useRef62,
42646
- useState as useState94
42994
+ useState as useState93
42647
42995
  } from "react";
42648
42996
  import { Internals as Internals89 } from "remotion";
42649
42997
  import { jsx as jsx274, jsxs as jsxs140, Fragment as Fragment44 } from "react/jsx-runtime";
@@ -42662,11 +43010,11 @@ var RenameCompositionLoaded = () => {
42662
43010
  const { resolved, unresolved } = context;
42663
43011
  const compositionStack = unresolved.stack ?? null;
42664
43012
  const { compositions } = useContext114(Internals89.CompositionManager);
42665
- const [newId, setName] = useState94(() => {
43013
+ const [newId, setName] = useState93(() => {
42666
43014
  return resolved.result.id;
42667
43015
  });
42668
43016
  const inputRef = useRef62(null);
42669
- useEffect91(() => {
43017
+ useEffect90(() => {
42670
43018
  const input2 = inputRef.current;
42671
43019
  if (!input2)
42672
43020
  return;
@@ -42768,10 +43116,10 @@ var RenameComposition = ({ compositionId }) => {
42768
43116
  import {
42769
43117
  useCallback as useCallback155,
42770
43118
  useContext as useContext115,
42771
- useEffect as useEffect92,
43119
+ useEffect as useEffect91,
42772
43120
  useMemo as useMemo167,
42773
43121
  useRef as useRef63,
42774
- useState as useState95
43122
+ useState as useState94
42775
43123
  } from "react";
42776
43124
  import { Internals as Internals91 } from "remotion";
42777
43125
 
@@ -42808,9 +43156,9 @@ var content8 = {
42808
43156
  };
42809
43157
  var RenameFolder = ({ folderName, parentName, stack: stack2 }) => {
42810
43158
  const { folders } = useContext115(Internals91.CompositionManager);
42811
- const [newName, setName] = useState95(folderName);
43159
+ const [newName, setName] = useState94(folderName);
42812
43160
  const inputRef = useRef63(null);
42813
- useEffect92(() => {
43161
+ useEffect91(() => {
42814
43162
  const input2 = inputRef.current;
42815
43163
  if (!input2)
42816
43164
  return;
@@ -42911,10 +43259,10 @@ var RenameFolder = ({ folderName, parentName, stack: stack2 }) => {
42911
43259
  import {
42912
43260
  useCallback as useCallback156,
42913
43261
  useContext as useContext116,
42914
- useEffect as useEffect93,
43262
+ useEffect as useEffect92,
42915
43263
  useMemo as useMemo168,
42916
43264
  useRef as useRef64,
42917
- useState as useState96
43265
+ useState as useState95
42918
43266
  } from "react";
42919
43267
  import { Internals as Internals92 } from "remotion";
42920
43268
 
@@ -42958,10 +43306,10 @@ var RenameStaticFileModal = ({ relativePath }) => {
42958
43306
  const { canvasContent } = useContext116(Internals92.CompositionManager);
42959
43307
  const { setCanvasContent } = useContext116(Internals92.CompositionSetters);
42960
43308
  const staticFiles = useStaticFiles();
42961
- const [newName, setNewName] = useState96(() => getBaseName(relativePath));
42962
- const [submitting, setSubmitting] = useState96(false);
43309
+ const [newName, setNewName] = useState95(() => getBaseName(relativePath));
43310
+ const [submitting, setSubmitting] = useState95(false);
42963
43311
  const inputRef = useRef64(null);
42964
- useEffect93(() => {
43312
+ useEffect92(() => {
42965
43313
  const input2 = inputRef.current;
42966
43314
  if (!input2)
42967
43315
  return;
@@ -43108,7 +43456,7 @@ var RenameStaticFileModal = ({ relativePath }) => {
43108
43456
  };
43109
43457
 
43110
43458
  // src/components/OverrideInputProps.tsx
43111
- import { useCallback as useCallback157, useContext as useContext117, useMemo as useMemo169, useState as useState97 } from "react";
43459
+ import { useCallback as useCallback157, useContext as useContext117, useMemo as useMemo169, useState as useState96 } from "react";
43112
43460
  import { Internals as Internals93 } from "remotion";
43113
43461
  import { jsx as jsx277, jsxs as jsxs143 } from "react/jsx-runtime";
43114
43462
  var style10 = {
@@ -43144,7 +43492,7 @@ var isValidJSON = (value) => {
43144
43492
  }
43145
43493
  };
43146
43494
  var Inner = () => {
43147
- const [value, setValue] = useState97(() => {
43495
+ const [value, setValue] = useState96(() => {
43148
43496
  const override = Internals93.getInputPropsOverride();
43149
43497
  if (override) {
43150
43498
  return JSON.stringify(override, null, 2);
@@ -43233,10 +43581,10 @@ var OverrideInputPropsModal = () => {
43233
43581
  import {
43234
43582
  useCallback as useCallback158,
43235
43583
  useContext as useContext118,
43236
- useEffect as useEffect95,
43584
+ useEffect as useEffect94,
43237
43585
  useMemo as useMemo171,
43238
43586
  useRef as useRef66,
43239
- useState as useState99
43587
+ useState as useState98
43240
43588
  } from "react";
43241
43589
  import { Internals as Internals94 } from "remotion";
43242
43590
 
@@ -44295,7 +44643,7 @@ var QuickSwitcherNoResults = ({ query, mode }) => {
44295
44643
  };
44296
44644
 
44297
44645
  // src/components/QuickSwitcher/QuickSwitcherResult.tsx
44298
- import { useEffect as useEffect94, useMemo as useMemo170, useRef as useRef65, useState as useState98 } from "react";
44646
+ import { useEffect as useEffect93, useMemo as useMemo170, useRef as useRef65, useState as useState97 } from "react";
44299
44647
  import { jsx as jsx281, jsxs as jsxs146, Fragment as Fragment48 } from "react/jsx-runtime";
44300
44648
  var container48 = {
44301
44649
  paddingLeft: 16,
@@ -44324,10 +44672,10 @@ var labelContainer = {
44324
44672
  paddingBottom: 5
44325
44673
  };
44326
44674
  var QuickSwitcherResult = ({ result, selected }) => {
44327
- const [hovered, setIsHovered] = useState98(false);
44675
+ const [hovered, setIsHovered] = useState97(false);
44328
44676
  const ref2 = useRef65(null);
44329
44677
  const keybindings = useKeybinding();
44330
- useEffect94(() => {
44678
+ useEffect93(() => {
44331
44679
  const { current } = ref2;
44332
44680
  if (!current) {
44333
44681
  return;
@@ -44341,7 +44689,7 @@ var QuickSwitcherResult = ({ result, selected }) => {
44341
44689
  current.removeEventListener("mouseleave", onMouseLeave);
44342
44690
  };
44343
44691
  }, []);
44344
- useEffect94(() => {
44692
+ useEffect93(() => {
44345
44693
  if (!selected) {
44346
44694
  return;
44347
44695
  }
@@ -44358,7 +44706,7 @@ var QuickSwitcherResult = ({ result, selected }) => {
44358
44706
  binding.unregister();
44359
44707
  };
44360
44708
  }, [keybindings, result.onSelected, selected]);
44361
- useEffect94(() => {
44709
+ useEffect93(() => {
44362
44710
  if (selected) {
44363
44711
  ref2.current?.scrollIntoView({
44364
44712
  block: "nearest",
@@ -44491,13 +44839,13 @@ var mapModeToQuery = (mode) => {
44491
44839
  };
44492
44840
  var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }) => {
44493
44841
  const { compositions } = useContext118(Internals94.CompositionManager);
44494
- const [state, setState] = useState99(() => {
44842
+ const [state, setState] = useState98(() => {
44495
44843
  return {
44496
44844
  query: mapModeToQuery(initialMode),
44497
44845
  selectedIndex: 0
44498
44846
  };
44499
44847
  });
44500
- useEffect95(() => {
44848
+ useEffect94(() => {
44501
44849
  setState({
44502
44850
  query: mapModeToQuery(initialMode),
44503
44851
  selectedIndex: 0
@@ -44509,7 +44857,7 @@ var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }
44509
44857
  return;
44510
44858
  }, []);
44511
44859
  const actions = useMenuStructure(closeMenu, readOnlyStudio);
44512
- const [docResults, setDocResults] = useState99({ type: "initial" });
44860
+ const [docResults, setDocResults] = useState98({ type: "initial" });
44513
44861
  const { setSelectedModal } = useContext118(ModalsContext);
44514
44862
  const keybindings = useKeybinding();
44515
44863
  const mode = mapQueryToMode(state.query);
@@ -44571,7 +44919,7 @@ var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }
44571
44919
  };
44572
44920
  });
44573
44921
  }, []);
44574
- useEffect95(() => {
44922
+ useEffect94(() => {
44575
44923
  const binding = keybindings.registerKeybinding({
44576
44924
  key: "ArrowUp",
44577
44925
  callback: onArrowUp,
@@ -44585,7 +44933,7 @@ var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }
44585
44933
  binding.unregister();
44586
44934
  };
44587
44935
  }, [keybindings, onArrowDown, onArrowUp]);
44588
- useEffect95(() => {
44936
+ useEffect94(() => {
44589
44937
  if (mode !== "docs") {
44590
44938
  return;
44591
44939
  }
@@ -44610,7 +44958,7 @@ var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }
44610
44958
  cancelled = true;
44611
44959
  };
44612
44960
  }, [actualQuery, mode]);
44613
- useEffect95(() => {
44961
+ useEffect94(() => {
44614
44962
  const binding = keybindings.registerKeybinding({
44615
44963
  key: "ArrowDown",
44616
44964
  callback: onArrowDown,
@@ -45276,11 +45624,11 @@ import { getDefaultOutLocation } from "@remotion/studio-shared";
45276
45624
  import {
45277
45625
  useCallback as useCallback178,
45278
45626
  useContext as useContext121,
45279
- useEffect as useEffect98,
45627
+ useEffect as useEffect97,
45280
45628
  useMemo as useMemo183,
45281
45629
  useReducer as useReducer2,
45282
45630
  useRef as useRef68,
45283
- useState as useState105
45631
+ useState as useState104
45284
45632
  } from "react";
45285
45633
 
45286
45634
  // src/helpers/convert-env-variables.ts
@@ -45550,9 +45898,9 @@ var makeReadOnlyStudioRenderCommand = ({
45550
45898
  };
45551
45899
 
45552
45900
  // src/helpers/render-modal-sections.ts
45553
- import { useMemo as useMemo173, useState as useState100 } from "react";
45901
+ import { useMemo as useMemo173, useState as useState99 } from "react";
45554
45902
  var useRenderModalSections = (renderMode, codec) => {
45555
- const [selectedTab, setTab] = useState100("general");
45903
+ const [selectedTab, setTab] = useState99("general");
45556
45904
  const shownTabs = useMemo173(() => {
45557
45905
  if (renderMode === "audio") {
45558
45906
  return [
@@ -45675,7 +46023,7 @@ var GifIcon = (props) => /* @__PURE__ */ jsx292("svg", {
45675
46023
  });
45676
46024
 
45677
46025
  // src/components/Tabs/vertical.tsx
45678
- import { useCallback as useCallback161, useMemo as useMemo174, useState as useState101 } from "react";
46026
+ import { useCallback as useCallback161, useMemo as useMemo174, useState as useState100 } from "react";
45679
46027
  import { jsx as jsx293 } from "react/jsx-runtime";
45680
46028
  var selectorButton2 = {
45681
46029
  border: "none",
@@ -45691,7 +46039,7 @@ var selectorButton2 = {
45691
46039
  WebkitUserSelect: "none"
45692
46040
  };
45693
46041
  var VerticalTab = ({ children, onClick, style: style11, selected }) => {
45694
- const [hovered, setHovered] = useState101(false);
46042
+ const [hovered, setHovered] = useState100(false);
45695
46043
  const { tabIndex } = useZIndex();
45696
46044
  const onPointerEnter = useCallback161(() => {
45697
46045
  setHovered(true);
@@ -45721,7 +46069,7 @@ var VerticalTab = ({ children, onClick, style: style11, selected }) => {
45721
46069
 
45722
46070
  // src/components/RenderModal/CrfSetting.tsx
45723
46071
  import { BrowserSafeApis as BrowserSafeApis3 } from "@remotion/renderer/client";
45724
- import { useState as useState103 } from "react";
46072
+ import { useState as useState102 } from "react";
45725
46073
 
45726
46074
  // src/components/RenderModal/NumberSetting.tsx
45727
46075
  import { useCallback as useCallback163 } from "react";
@@ -45730,7 +46078,7 @@ import { useCallback as useCallback163 } from "react";
45730
46078
  import { BrowserSafeApis as BrowserSafeApis2 } from "@remotion/renderer/client";
45731
46079
 
45732
46080
  // src/components/RenderModal/CliCopyButton.tsx
45733
- import { useCallback as useCallback162, useEffect as useEffect96, useMemo as useMemo175, useState as useState102 } from "react";
46081
+ import { useCallback as useCallback162, useEffect as useEffect95, useMemo as useMemo175, useState as useState101 } from "react";
45734
46082
  import { jsx as jsx294 } from "react/jsx-runtime";
45735
46083
  var svgStyle4 = {
45736
46084
  width: 16,
@@ -45757,8 +46105,8 @@ var buttonStyle5 = {
45757
46105
  var CliCopyButton = ({
45758
46106
  valueToCopy
45759
46107
  }) => {
45760
- const [copied, setCopied] = useState102(false);
45761
- const [hovered, setHovered] = useState102(false);
46108
+ const [copied, setCopied] = useState101(false);
46109
+ const [hovered, setHovered] = useState101(false);
45762
46110
  const fillColor = useMemo175(() => {
45763
46111
  return hovered ? "white" : LIGHT_TEXT;
45764
46112
  }, [hovered]);
@@ -45781,7 +46129,7 @@ var CliCopyButton = ({
45781
46129
  const onPointerLeave = useCallback162(() => {
45782
46130
  setHovered(false);
45783
46131
  }, []);
45784
- useEffect96(() => {
46132
+ useEffect95(() => {
45785
46133
  if (!copied) {
45786
46134
  return;
45787
46135
  }
@@ -46046,7 +46394,7 @@ var getDefaultCrfState = () => {
46046
46394
  }, {});
46047
46395
  };
46048
46396
  var useCrfState = (codec) => {
46049
- const [state, setState] = useState103(() => getDefaultCrfState());
46397
+ const [state, setState] = useState102(() => getDefaultCrfState());
46050
46398
  const range = BrowserSafeApis3.getValidCrfRanges(codec);
46051
46399
  const setCrf = (updater) => {
46052
46400
  setState((q) => {
@@ -46928,14 +47276,14 @@ import { BrowserSafeApis as BrowserSafeApis7 } from "@remotion/renderer/client";
46928
47276
  import { useCallback as useCallback167, useMemo as useMemo177 } from "react";
46929
47277
 
46930
47278
  // src/helpers/use-file-existence.ts
46931
- import { useContext as useContext120, useEffect as useEffect97, useRef as useRef67, useState as useState104 } from "react";
47279
+ import { useContext as useContext120, useEffect as useEffect96, useRef as useRef67, useState as useState103 } from "react";
46932
47280
  var useFileExistence = (outName) => {
46933
- const [exists, setExists] = useState104(false);
47281
+ const [exists, setExists] = useState103(false);
46934
47282
  const { previewServerState: state, subscribeToEvent } = useContext120(StudioServerConnectionCtx);
46935
47283
  const clientId = state.type === "connected" ? state.clientId : undefined;
46936
47284
  const currentOutName = useRef67("");
46937
47285
  currentOutName.current = outName;
46938
- useEffect97(() => {
47286
+ useEffect96(() => {
46939
47287
  if (!clientId) {
46940
47288
  return;
46941
47289
  }
@@ -46951,7 +47299,7 @@ var useFileExistence = (outName) => {
46951
47299
  unsubscribeFromFileExistenceWatcher({ file: outName, clientId });
46952
47300
  };
46953
47301
  }, [clientId, outName]);
46954
- useEffect97(() => {
47302
+ useEffect96(() => {
46955
47303
  const listener = (event) => {
46956
47304
  if (event.type !== "watched-file-deleted") {
46957
47305
  return;
@@ -46968,7 +47316,7 @@ var useFileExistence = (outName) => {
46968
47316
  unsub();
46969
47317
  };
46970
47318
  }, [outName, subscribeToEvent]);
46971
- useEffect97(() => {
47319
+ useEffect96(() => {
46972
47320
  const listener = (event) => {
46973
47321
  if (event.type !== "watched-file-undeleted") {
46974
47322
  return;
@@ -48831,7 +49179,7 @@ var RenderModal = ({
48831
49179
  unresolved: unresolvedComposition
48832
49180
  } = context;
48833
49181
  const isMounted = useRef68(true);
48834
- const [isVideo] = useState105(() => {
49182
+ const [isVideo] = useState104(() => {
48835
49183
  return typeof resolvedComposition.durationInFrames === "undefined" ? true : resolvedComposition.durationInFrames > 1;
48836
49184
  });
48837
49185
  const [
@@ -48842,7 +49190,7 @@ var RenderModal = ({
48842
49190
  initialVideoCodecForAudioTab,
48843
49191
  initialVideoCodecForVideoTab
48844
49192
  }
48845
- ] = useState105(() => {
49193
+ ] = useState104(() => {
48846
49194
  return getDefaultCodecs({
48847
49195
  defaultConfigurationVideoCodec,
48848
49196
  compositionDefaultVideoCodec: resolvedComposition.defaultCodec,
@@ -48851,16 +49199,16 @@ var RenderModal = ({
48851
49199
  });
48852
49200
  });
48853
49201
  const [state, dispatch2] = useReducer2(reducer2, initialState2);
48854
- const [unclampedFrame, setFrame] = useState105(() => initialFrame);
48855
- const [stillImageFormat, setStillImageFormat] = useState105(() => initialStillImageFormat);
48856
- const [videoImageFormat, setVideoImageFormat] = useState105(() => initialVideoImageFormat ?? resolvedComposition.defaultVideoImageFormat ?? renderDefaults.videoImageFormat);
48857
- const [sequenceImageFormat, setSequenceImageFormat] = useState105(() => initialStillImageFormat === "jpeg" ? "jpeg" : "png");
48858
- const [concurrency, setConcurrency] = useState105(() => initialConcurrency);
48859
- const [videoCodecForVideoTab, setVideoCodecForVideoTab] = useState105(() => initialVideoCodecForVideoTab);
48860
- const [userSelectedAudioCodec, setUserSelectedAudioCodec] = useState105(() => initialAudioCodec);
48861
- const [separateAudioTo, setSeparateAudioTo] = useState105(null);
48862
- const [envVariables, setEnvVariables] = useState105(() => envVariablesObjectToArray(initialEnvVariables).filter(([key6]) => key6 !== "NODE_ENV"));
48863
- const [initialOutName] = useState105(() => {
49202
+ const [unclampedFrame, setFrame] = useState104(() => initialFrame);
49203
+ const [stillImageFormat, setStillImageFormat] = useState104(() => initialStillImageFormat);
49204
+ const [videoImageFormat, setVideoImageFormat] = useState104(() => initialVideoImageFormat ?? resolvedComposition.defaultVideoImageFormat ?? renderDefaults.videoImageFormat);
49205
+ const [sequenceImageFormat, setSequenceImageFormat] = useState104(() => initialStillImageFormat === "jpeg" ? "jpeg" : "png");
49206
+ const [concurrency, setConcurrency] = useState104(() => initialConcurrency);
49207
+ const [videoCodecForVideoTab, setVideoCodecForVideoTab] = useState104(() => initialVideoCodecForVideoTab);
49208
+ const [userSelectedAudioCodec, setUserSelectedAudioCodec] = useState104(() => initialAudioCodec);
49209
+ const [separateAudioTo, setSeparateAudioTo] = useState104(null);
49210
+ const [envVariables, setEnvVariables] = useState104(() => envVariablesObjectToArray(initialEnvVariables).filter(([key6]) => key6 !== "NODE_ENV"));
49211
+ const [initialOutName] = useState104(() => {
48864
49212
  return getDefaultOutLocation({
48865
49213
  compositionName: resolvedComposition.id,
48866
49214
  defaultExtension: initialRenderType === "still" ? initialStillImageFormat : isVideo ? BrowserSafeApis11.getFileExtensionFromCodec(initialVideoCodec, initialAudioCodec) : initialStillImageFormat,
@@ -48869,26 +49217,26 @@ var RenderModal = ({
48869
49217
  outputLocation: renderDefaults.outputLocation
48870
49218
  });
48871
49219
  });
48872
- const [videoCodecForAudioTab, setVideoCodecForAudioTab] = useState105(() => initialVideoCodecForAudioTab);
48873
- const [mutedState, setMuted] = useState105(() => initialMuted);
48874
- const [repro, setRepro] = useState105(() => initialRepro);
48875
- const [enforceAudioTrackState, setEnforceAudioTrackState] = useState105(() => initialEnforceAudioTrack);
48876
- const [forSeamlessAacConcatenation, setForSeamlessAacConcatenation] = useState105(() => initialForSeamlessAacConcatenation);
48877
- const [sampleRate, setSampleRate] = useState105(() => initialSampleRate);
48878
- const [renderMode, setRenderModeState] = useState105(initialRenderType);
48879
- const [jpegQuality, setJpegQuality] = useState105(() => initialJpegQuality);
48880
- const [scale, setScale] = useState105(() => initialScale);
48881
- const [logLevel, setLogLevel] = useState105(() => initialLogLevel);
48882
- const [disallowParallelEncoding, setDisallowParallelEncoding] = useState105(false);
48883
- const [disableWebSecurity, setDisableWebSecurity] = useState105(() => initialDisableWebSecurity);
48884
- const [headless, setHeadless] = useState105(() => initialHeadless);
48885
- const [beepOnFinish, setBeepOnFinish] = useState105(() => initialBeep);
48886
- const [ignoreCertificateErrors, setIgnoreCertificateErrors] = useState105(() => initialIgnoreCertificateErrors);
48887
- const [multiProcessOnLinux, setChromiumMultiProcessOnLinux] = useState105(() => initialMultiProcessOnLinux);
48888
- const [darkMode, setDarkMode] = useState105(() => initialDarkMode);
48889
- const [openGlOption, setOpenGlOption] = useState105(() => initialGl ?? "default");
48890
- const [colorSpace, setColorSpace] = useState105(() => initialColorSpace);
48891
- const [userAgent, setUserAgent] = useState105(() => initialUserAgent === null ? null : initialUserAgent.trim() === "" ? null : initialUserAgent);
49220
+ const [videoCodecForAudioTab, setVideoCodecForAudioTab] = useState104(() => initialVideoCodecForAudioTab);
49221
+ const [mutedState, setMuted] = useState104(() => initialMuted);
49222
+ const [repro, setRepro] = useState104(() => initialRepro);
49223
+ const [enforceAudioTrackState, setEnforceAudioTrackState] = useState104(() => initialEnforceAudioTrack);
49224
+ const [forSeamlessAacConcatenation, setForSeamlessAacConcatenation] = useState104(() => initialForSeamlessAacConcatenation);
49225
+ const [sampleRate, setSampleRate] = useState104(() => initialSampleRate);
49226
+ const [renderMode, setRenderModeState] = useState104(initialRenderType);
49227
+ const [jpegQuality, setJpegQuality] = useState104(() => initialJpegQuality);
49228
+ const [scale, setScale] = useState104(() => initialScale);
49229
+ const [logLevel, setLogLevel] = useState104(() => initialLogLevel);
49230
+ const [disallowParallelEncoding, setDisallowParallelEncoding] = useState104(false);
49231
+ const [disableWebSecurity, setDisableWebSecurity] = useState104(() => initialDisableWebSecurity);
49232
+ const [headless, setHeadless] = useState104(() => initialHeadless);
49233
+ const [beepOnFinish, setBeepOnFinish] = useState104(() => initialBeep);
49234
+ const [ignoreCertificateErrors, setIgnoreCertificateErrors] = useState104(() => initialIgnoreCertificateErrors);
49235
+ const [multiProcessOnLinux, setChromiumMultiProcessOnLinux] = useState104(() => initialMultiProcessOnLinux);
49236
+ const [darkMode, setDarkMode] = useState104(() => initialDarkMode);
49237
+ const [openGlOption, setOpenGlOption] = useState104(() => initialGl ?? "default");
49238
+ const [colorSpace, setColorSpace] = useState104(() => initialColorSpace);
49239
+ const [userAgent, setUserAgent] = useState104(() => initialUserAgent === null ? null : initialUserAgent.trim() === "" ? null : initialUserAgent);
48892
49240
  const chromiumOptions = useMemo183(() => {
48893
49241
  return {
48894
49242
  headless,
@@ -48908,30 +49256,30 @@ var RenderModal = ({
48908
49256
  multiProcessOnLinux,
48909
49257
  darkMode
48910
49258
  ]);
48911
- const [outName, setOutName] = useState105(() => initialOutName);
48912
- const [endFrameOrNull, setEndFrame] = useState105(() => outFrameMark ?? null);
48913
- const [startFrameOrNull, setStartFrame] = useState105(() => inFrameMark ?? null);
48914
- const [proResProfileSetting, setProResProfile] = useState105(() => initialProResProfile ?? resolvedComposition.defaultProResProfile ?? "hq");
48915
- const [x264PresetSetting, setx264Preset] = useState105(() => initialx264Preset);
48916
- const [gopSize, setGopSize] = useState105(() => initialGopSize);
48917
- const [hardwareAcceleration, setHardwareAcceleration] = useState105(() => initialHardwareAcceleration);
48918
- const [userPreferredPixelFormat, setPixelFormat] = useState105(() => initialPixelFormat ?? resolvedComposition.defaultPixelFormat ?? renderDefaults.pixelFormat);
48919
- const [preferredQualityControlType, setQualityControl] = useState105(() => initialVideoBitrate === null ? "crf" : "bitrate");
49259
+ const [outName, setOutName] = useState104(() => initialOutName);
49260
+ const [endFrameOrNull, setEndFrame] = useState104(() => outFrameMark ?? null);
49261
+ const [startFrameOrNull, setStartFrame] = useState104(() => inFrameMark ?? null);
49262
+ const [proResProfileSetting, setProResProfile] = useState104(() => initialProResProfile ?? resolvedComposition.defaultProResProfile ?? "hq");
49263
+ const [x264PresetSetting, setx264Preset] = useState104(() => initialx264Preset);
49264
+ const [gopSize, setGopSize] = useState104(() => initialGopSize);
49265
+ const [hardwareAcceleration, setHardwareAcceleration] = useState104(() => initialHardwareAcceleration);
49266
+ const [userPreferredPixelFormat, setPixelFormat] = useState104(() => initialPixelFormat ?? resolvedComposition.defaultPixelFormat ?? renderDefaults.pixelFormat);
49267
+ const [preferredQualityControlType, setQualityControl] = useState104(() => initialVideoBitrate === null ? "crf" : "bitrate");
48920
49268
  const [
48921
49269
  shouldHaveCustomTargetAudioBitrate,
48922
49270
  setShouldHaveCustomTargetAudioBitrate
48923
- ] = useState105(() => initialAudioBitrate !== null);
48924
- const [customTargetAudioBitrate, setCustomTargetAudioBitrateValue] = useState105(() => initialAudioBitrate ?? "320K");
48925
- const [customTargetVideoBitrate, setCustomTargetVideoBitrateValue] = useState105(() => initialVideoBitrate ?? "1M");
48926
- const [encodingMaxRate, setEncodingMaxRate] = useState105(() => initialEncodingMaxRate ?? null);
48927
- const [encodingBufferSize, setEncodingBufferSize] = useState105(() => initialEncodingBufferSize ?? null);
48928
- const [limitNumberOfGifLoops, setLimitNumberOfGifLoops] = useState105(() => initialNumberOfGifLoops !== null);
48929
- const [numberOfGifLoopsSetting, setNumberOfGifLoopsSetting] = useState105(() => initialNumberOfGifLoops ?? 0);
48930
- const [delayRenderTimeout, setDelayRenderTimeout] = useState105(() => initialDelayRenderTimeout);
48931
- const [chromeMode, setChromeMode] = useState105(() => initialChromeMode);
48932
- const [offthreadVideoCacheSizeInBytes, setOffthreadVideoCacheSizeInBytes] = useState105(initialOffthreadVideoCacheSizeInBytes);
48933
- const [mediaCacheSizeInBytes, setMediaCacheSizeInBytes] = useState105(initialMediaCacheSizeInBytes);
48934
- const [offthreadVideoThreads, setOffthreadVideoThreads] = useState105(() => initialOffthreadVideoThreads);
49271
+ ] = useState104(() => initialAudioBitrate !== null);
49272
+ const [customTargetAudioBitrate, setCustomTargetAudioBitrateValue] = useState104(() => initialAudioBitrate ?? "320K");
49273
+ const [customTargetVideoBitrate, setCustomTargetVideoBitrateValue] = useState104(() => initialVideoBitrate ?? "1M");
49274
+ const [encodingMaxRate, setEncodingMaxRate] = useState104(() => initialEncodingMaxRate ?? null);
49275
+ const [encodingBufferSize, setEncodingBufferSize] = useState104(() => initialEncodingBufferSize ?? null);
49276
+ const [limitNumberOfGifLoops, setLimitNumberOfGifLoops] = useState104(() => initialNumberOfGifLoops !== null);
49277
+ const [numberOfGifLoopsSetting, setNumberOfGifLoopsSetting] = useState104(() => initialNumberOfGifLoops ?? 0);
49278
+ const [delayRenderTimeout, setDelayRenderTimeout] = useState104(() => initialDelayRenderTimeout);
49279
+ const [chromeMode, setChromeMode] = useState104(() => initialChromeMode);
49280
+ const [offthreadVideoCacheSizeInBytes, setOffthreadVideoCacheSizeInBytes] = useState104(initialOffthreadVideoCacheSizeInBytes);
49281
+ const [mediaCacheSizeInBytes, setMediaCacheSizeInBytes] = useState104(initialMediaCacheSizeInBytes);
49282
+ const [offthreadVideoThreads, setOffthreadVideoThreads] = useState104(() => initialOffthreadVideoThreads);
48935
49283
  const codec = useMemo183(() => {
48936
49284
  if (renderMode === "audio") {
48937
49285
  return videoCodecForAudioTab;
@@ -49018,11 +49366,11 @@ var RenderModal = ({
49018
49366
  }
49019
49367
  return null;
49020
49368
  }, [codec, x264PresetSetting, renderMode]);
49021
- const [inputProps, _setInputProps] = useState105(() => defaultProps);
49369
+ const [inputProps, _setInputProps] = useState104(() => defaultProps);
49022
49370
  const setInputProps = useCallback178((updater) => {
49023
49371
  _setInputProps(updater);
49024
49372
  }, []);
49025
- const [metadata] = useState105(() => defaultMetadata);
49373
+ const [metadata] = useState104(() => defaultMetadata);
49026
49374
  const endFrame = useMemo183(() => {
49027
49375
  if (endFrameOrNull === null) {
49028
49376
  return resolvedComposition.durationInFrames - 1;
@@ -49155,7 +49503,7 @@ var RenderModal = ({
49155
49503
  offthreadVideoThreads,
49156
49504
  mediaCacheSizeInBytes
49157
49505
  ]);
49158
- const [everyNthFrameSetting, setEveryNthFrameSetting] = useState105(() => initialEveryNthFrame);
49506
+ const [everyNthFrameSetting, setEveryNthFrameSetting] = useState104(() => initialEveryNthFrame);
49159
49507
  const everyNthFrame = useMemo183(() => {
49160
49508
  if (codec === "gif") {
49161
49509
  return everyNthFrameSetting;
@@ -49336,7 +49684,7 @@ var RenderModal = ({
49336
49684
  offthreadVideoThreads,
49337
49685
  mediaCacheSizeInBytes
49338
49686
  ]);
49339
- useEffect98(() => {
49687
+ useEffect97(() => {
49340
49688
  return () => {
49341
49689
  isMounted.current = false;
49342
49690
  };
@@ -49613,7 +49961,7 @@ var RenderModal = ({
49613
49961
  videoBitrate,
49614
49962
  x264Preset
49615
49963
  ]);
49616
- const [commandCopiedAt, setCommandCopiedAt] = useState105(null);
49964
+ const [commandCopiedAt, setCommandCopiedAt] = useState104(null);
49617
49965
  const renderDisabled = readOnlyStudio ? false : !outnameValidation.valid || state.type === "load";
49618
49966
  const trigger = useCallback178(() => {
49619
49967
  if (readOnlyStudio) {
@@ -49642,7 +49990,7 @@ var RenderModal = ({
49642
49990
  readOnlyStudio,
49643
49991
  renderMode
49644
49992
  ]);
49645
- useEffect98(() => {
49993
+ useEffect97(() => {
49646
49994
  if (commandCopiedAt === null) {
49647
49995
  return;
49648
49996
  }
@@ -49651,7 +49999,7 @@ var RenderModal = ({
49651
49999
  }, 2000);
49652
50000
  return () => clearTimeout(timeout);
49653
50001
  }, [commandCopiedAt]);
49654
- useEffect98(() => {
50002
+ useEffect97(() => {
49655
50003
  if (renderDisabled) {
49656
50004
  return;
49657
50005
  }
@@ -50003,7 +50351,7 @@ import {
50003
50351
  getDefaultVideoCodecForContainer,
50004
50352
  isAudioOnlyContainer
50005
50353
  } from "@remotion/web-renderer";
50006
- import { useCallback as useCallback182, useContext as useContext122, useMemo as useMemo188, useState as useState109 } from "react";
50354
+ import { useCallback as useCallback182, useContext as useContext122, useMemo as useMemo188, useState as useState108 } from "react";
50007
50355
 
50008
50356
  // src/icons/certificate.tsx
50009
50357
  import { jsx as jsx319 } from "react/jsx-runtime";
@@ -50022,15 +50370,15 @@ import {
50022
50370
  getEncodableAudioCodecs,
50023
50371
  getSupportedAudioCodecsForContainer
50024
50372
  } from "@remotion/web-renderer";
50025
- import { useEffect as useEffect99, useRef as useRef69, useState as useState106 } from "react";
50373
+ import { useEffect as useEffect98, useRef as useRef69, useState as useState105 } from "react";
50026
50374
  var useEncodableAudioCodecs = (container60) => {
50027
50375
  const cacheRef = useRef69({});
50028
- const [codecsByContainer, setCodecsByContainer] = useState106(() => {
50376
+ const [codecsByContainer, setCodecsByContainer] = useState105(() => {
50029
50377
  return {
50030
50378
  [container60]: getSupportedAudioCodecsForContainer(container60)
50031
50379
  };
50032
50380
  });
50033
- useEffect99(() => {
50381
+ useEffect98(() => {
50034
50382
  const cached = cacheRef.current[container60];
50035
50383
  if (cached) {
50036
50384
  return;
@@ -50064,15 +50412,15 @@ import {
50064
50412
  getEncodableVideoCodecs,
50065
50413
  getSupportedVideoCodecsForContainer
50066
50414
  } from "@remotion/web-renderer";
50067
- import { useEffect as useEffect100, useRef as useRef70, useState as useState107 } from "react";
50415
+ import { useEffect as useEffect99, useRef as useRef70, useState as useState106 } from "react";
50068
50416
  var useEncodableVideoCodecs = (container60) => {
50069
50417
  const cacheRef = useRef70({});
50070
- const [codecsByContainer, setCodecsByContainer] = useState107(() => {
50418
+ const [codecsByContainer, setCodecsByContainer] = useState106(() => {
50071
50419
  return {
50072
50420
  [container60]: getSupportedVideoCodecsForContainer(container60)
50073
50421
  };
50074
50422
  });
50075
- useEffect100(() => {
50423
+ useEffect99(() => {
50076
50424
  const cached = cacheRef.current[container60];
50077
50425
  if (cached) {
50078
50426
  return;
@@ -50760,7 +51108,7 @@ var WebRenderModalBasic = ({
50760
51108
  };
50761
51109
 
50762
51110
  // src/components/RenderModal/WebRenderModalLicense.tsx
50763
- import { useCallback as useCallback180, useEffect as useEffect101, useState as useState108 } from "react";
51111
+ import { useCallback as useCallback180, useEffect as useEffect100, useState as useState107 } from "react";
50764
51112
 
50765
51113
  // src/icons/check-circle-filled.tsx
50766
51114
  import { jsx as jsx325 } from "react/jsx-runtime";
@@ -50980,9 +51328,9 @@ var WebRenderModalLicense = ({
50980
51328
  setLicenseKey,
50981
51329
  initialPublicLicenseKey
50982
51330
  }) => {
50983
- const [licenseValidation, setLicenseValidation] = useState108({ valid: true, message: null, details: null });
50984
- const [isLoading, setIsLoading] = useState108(false);
50985
- useEffect101(() => {
51331
+ const [licenseValidation, setLicenseValidation] = useState107({ valid: true, message: null, details: null });
51332
+ const [isLoading, setIsLoading] = useState107(false);
51333
+ useEffect100(() => {
50986
51334
  if (licenseKey === null || licenseKey === "free-license") {
50987
51335
  return setLicenseValidation({
50988
51336
  valid: true,
@@ -51359,34 +51707,34 @@ var WebRenderModal = ({
51359
51707
  resolved: { result: resolvedComposition },
51360
51708
  unresolved: unresolvedComposition
51361
51709
  } = context;
51362
- const [isVideo] = useState109(() => {
51710
+ const [isVideo] = useState108(() => {
51363
51711
  return typeof resolvedComposition.durationInFrames === "undefined" ? true : resolvedComposition.durationInFrames > 1;
51364
51712
  });
51365
- const [renderMode, setRenderMode] = useState109(initialContainer && isAudioOnlyContainer(initialContainer) ? "audio" : isVideo ? "video" : "still");
51366
- const [tab, setTab] = useState109("general");
51367
- const [imageFormat, setImageFormat] = useState109(() => initialStillImageFormat ?? "png");
51368
- const [frame2, setFrame] = useState109(() => initialFrame);
51369
- const [logLevel, setLogLevel] = useState109(() => initialLogLevel);
51370
- const [inputProps, _setInputProps] = useState109(() => defaultProps);
51713
+ const [renderMode, setRenderMode] = useState108(initialContainer && isAudioOnlyContainer(initialContainer) ? "audio" : isVideo ? "video" : "still");
51714
+ const [tab, setTab] = useState108("general");
51715
+ const [imageFormat, setImageFormat] = useState108(() => initialStillImageFormat ?? "png");
51716
+ const [frame2, setFrame] = useState108(() => initialFrame);
51717
+ const [logLevel, setLogLevel] = useState108(() => initialLogLevel);
51718
+ const [inputProps, _setInputProps] = useState108(() => defaultProps);
51371
51719
  const setInputProps = useCallback182((updater) => {
51372
51720
  _setInputProps(updater);
51373
51721
  }, []);
51374
- const [delayRenderTimeout, setDelayRenderTimeout] = useState109(initialDelayRenderTimeout ?? 30000);
51375
- const [mediaCacheSizeInBytes, setMediaCacheSizeInBytes] = useState109(initialMediaCacheSizeInBytes);
51376
- const [codec, setCodec] = useState109(initialVideoCodec ?? "h264");
51377
- const [container61, setContainer] = useState109(initialContainer ?? "mp4");
51378
- const [audioCodec, setAudioCodec] = useState109(initialAudioCodec ?? "aac");
51379
- const [audioBitrate, setAudioBitrate] = useState109(initialAudioBitrate ?? "medium");
51380
- const [videoBitrate, setVideoBitrate] = useState109(initialVideoBitrate ?? "high");
51381
- const [hardwareAcceleration, setHardwareAcceleration] = useState109(initialHardwareAcceleration ?? "no-preference");
51382
- const [keyframeIntervalInSeconds, setKeyframeIntervalInSeconds] = useState109(initialKeyframeIntervalInSeconds ?? 5);
51383
- const [startFrame, setStartFrame] = useState109(() => inFrameMark);
51384
- const [endFrame, setEndFrame] = useState109(() => outFrameMark);
51385
- const [transparent, setTransparent] = useState109(initialTransparent ?? false);
51386
- const [muted, setMuted] = useState109(initialMuted ?? false);
51387
- const [scale, setScale] = useState109(initialScale ?? 1);
51388
- const [licenseKey, setLicenseKey] = useState109(initialLicenseKey);
51389
- const [allowHtmlInCanvas, setAllowHtmlInCanvas] = useState109(initialAllowHtmlInCanvas ?? false);
51722
+ const [delayRenderTimeout, setDelayRenderTimeout] = useState108(initialDelayRenderTimeout ?? 30000);
51723
+ const [mediaCacheSizeInBytes, setMediaCacheSizeInBytes] = useState108(initialMediaCacheSizeInBytes);
51724
+ const [codec, setCodec] = useState108(initialVideoCodec ?? "h264");
51725
+ const [container61, setContainer] = useState108(initialContainer ?? "mp4");
51726
+ const [audioCodec, setAudioCodec] = useState108(initialAudioCodec ?? "aac");
51727
+ const [audioBitrate, setAudioBitrate] = useState108(initialAudioBitrate ?? "medium");
51728
+ const [videoBitrate, setVideoBitrate] = useState108(initialVideoBitrate ?? "high");
51729
+ const [hardwareAcceleration, setHardwareAcceleration] = useState108(initialHardwareAcceleration ?? "no-preference");
51730
+ const [keyframeIntervalInSeconds, setKeyframeIntervalInSeconds] = useState108(initialKeyframeIntervalInSeconds ?? 5);
51731
+ const [startFrame, setStartFrame] = useState108(() => inFrameMark);
51732
+ const [endFrame, setEndFrame] = useState108(() => outFrameMark);
51733
+ const [transparent, setTransparent] = useState108(initialTransparent ?? false);
51734
+ const [muted, setMuted] = useState108(initialMuted ?? false);
51735
+ const [scale, setScale] = useState108(initialScale ?? 1);
51736
+ const [licenseKey, setLicenseKey] = useState108(initialLicenseKey);
51737
+ const [allowHtmlInCanvas, setAllowHtmlInCanvas] = useState108(initialAllowHtmlInCanvas ?? false);
51390
51738
  const encodableAudioCodecs = useEncodableAudioCodecs(container61);
51391
51739
  const encodableVideoCodecs = useEncodableVideoCodecs(container61);
51392
51740
  const effectiveAudioCodec = useMemo188(() => {
@@ -51413,7 +51761,7 @@ var WebRenderModal = ({
51413
51761
  }
51414
51762
  return Math.max(0, Math.min(finalEndFrame, startFrame));
51415
51763
  }, [finalEndFrame, startFrame]);
51416
- const [initialOutNameState] = useState109(() => {
51764
+ const [initialOutNameState] = useState108(() => {
51417
51765
  if (initialDefaultOutName) {
51418
51766
  return initialDefaultOutName;
51419
51767
  }
@@ -51429,7 +51777,7 @@ var WebRenderModal = ({
51429
51777
  }
51430
51778
  return defaultOut;
51431
51779
  });
51432
- const [outName, setOutName] = useState109(() => initialOutNameState);
51780
+ const [outName, setOutName] = useState108(() => initialOutNameState);
51433
51781
  const updateOutNameExtension = useCallback182((extension) => {
51434
51782
  setOutName((prev) => getStringBeforeSuffix(prev) + "." + extension);
51435
51783
  }, []);
@@ -51869,10 +52217,10 @@ var WebRenderModalWithLoader = (props) => {
51869
52217
  import {
51870
52218
  useCallback as useCallback183,
51871
52219
  useContext as useContext123,
51872
- useEffect as useEffect102,
52220
+ useEffect as useEffect101,
51873
52221
  useMemo as useMemo189,
51874
52222
  useRef as useRef71,
51875
- useState as useState110
52223
+ useState as useState109
51876
52224
  } from "react";
51877
52225
  import { Internals as Internals95 } from "remotion";
51878
52226
  import { jsx as jsx330, jsxs as jsxs178 } from "react/jsx-runtime";
@@ -51964,9 +52312,9 @@ var EasingEditorModal = ({ state }) => {
51964
52312
  const { setPropStatuses } = useContext123(Internals95.VisualModeSettersContext);
51965
52313
  const { overrideIdToNodePathMappings } = useContext123(Internals95.OverrideIdsToNodePathsGettersContext);
51966
52314
  const svgRef = useRef71(null);
51967
- const [bezier, setBezier] = useState110(() => easingToBezier(state.initialEasing));
51968
- const [saving, setSaving] = useState110(false);
51969
- const [activeHandle, setActiveHandle] = useState110(null);
52315
+ const [bezier, setBezier] = useState109(() => easingToBezier(state.initialEasing));
52316
+ const [saving, setSaving] = useState109(false);
52317
+ const [activeHandle, setActiveHandle] = useState109(null);
51970
52318
  const close = useCallback183(() => {
51971
52319
  setSelectedModal(null);
51972
52320
  }, [setSelectedModal]);
@@ -52007,7 +52355,7 @@ var EasingEditorModal = ({ state }) => {
52007
52355
  return next;
52008
52356
  });
52009
52357
  }, [getValueFromPointer]);
52010
- useEffect102(() => {
52358
+ useEffect101(() => {
52011
52359
  if (activeHandle === null) {
52012
52360
  return;
52013
52361
  }
@@ -52343,7 +52691,7 @@ var EasingEditorModal = ({ state }) => {
52343
52691
  };
52344
52692
 
52345
52693
  // src/components/Timeline/KeyframeSettingsModal.tsx
52346
- import { useCallback as useCallback184, useContext as useContext124, useMemo as useMemo190, useState as useState111 } from "react";
52694
+ import { useCallback as useCallback184, useContext as useContext124, useMemo as useMemo190, useState as useState110 } from "react";
52347
52695
  import { Internals as Internals96 } from "remotion";
52348
52696
  import { jsx as jsx331, jsxs as jsxs179, Fragment as Fragment63 } from "react/jsx-runtime";
52349
52697
  var container62 = {
@@ -52399,10 +52747,10 @@ var KeyframeSettingsModal = ({ state }) => {
52399
52747
  const { setSelectedModal } = useContext124(ModalsContext);
52400
52748
  const { setPropStatuses } = useContext124(Internals96.VisualModeSettersContext);
52401
52749
  const { previewServerState } = useContext124(StudioServerConnectionCtx);
52402
- const [left4, setLeft] = useState111(state.status.clamping.left);
52403
- const [right5, setRight] = useState111(state.status.clamping.right);
52404
- const [posterize, setPosterize] = useState111(state.status.posterize ?? 0);
52405
- const [saving, setSaving] = useState111(false);
52750
+ const [left4, setLeft] = useState110(state.status.clamping.left);
52751
+ const [right5, setRight] = useState110(state.status.clamping.right);
52752
+ const [posterize, setPosterize] = useState110(state.status.posterize ?? 0);
52753
+ const [saving, setSaving] = useState110(false);
52406
52754
  const canEditClamping = state.status.interpolationFunction === "interpolate";
52407
52755
  const close = useCallback184(() => {
52408
52756
  setSelectedModal(null);
@@ -52562,7 +52910,7 @@ var KeyframeSettingsModal = ({ state }) => {
52562
52910
  import { useCallback as useCallback187, useMemo as useMemo192 } from "react";
52563
52911
 
52564
52912
  // src/components/CopyButton.tsx
52565
- import { useCallback as useCallback185, useEffect as useEffect103, useState as useState112 } from "react";
52913
+ import { useCallback as useCallback185, useEffect as useEffect102, useState as useState111 } from "react";
52566
52914
  import { jsx as jsx332, jsxs as jsxs180 } from "react/jsx-runtime";
52567
52915
  var iconStyle9 = {
52568
52916
  width: 16,
@@ -52592,7 +52940,7 @@ var labelStyle6 = {
52592
52940
  fontSize: 14
52593
52941
  };
52594
52942
  var CopyButton = ({ textToCopy, label: label13, labelWhenCopied }) => {
52595
- const [copied, setCopied] = useState112(false);
52943
+ const [copied, setCopied] = useState111(false);
52596
52944
  const onClick = useCallback185(() => {
52597
52945
  copyText(textToCopy).then(() => {
52598
52946
  setCopied(Date.now());
@@ -52600,7 +52948,7 @@ var CopyButton = ({ textToCopy, label: label13, labelWhenCopied }) => {
52600
52948
  showNotification(`Could not copy: ${err.message}`, 2000);
52601
52949
  });
52602
52950
  }, [textToCopy]);
52603
- useEffect103(() => {
52951
+ useEffect102(() => {
52604
52952
  if (!copied) {
52605
52953
  return;
52606
52954
  }
@@ -52625,7 +52973,7 @@ var CopyButton = ({ textToCopy, label: label13, labelWhenCopied }) => {
52625
52973
  };
52626
52974
 
52627
52975
  // src/components/UpdateModal/OpenIssueButton.tsx
52628
- import { useCallback as useCallback186, useMemo as useMemo191, useState as useState113 } from "react";
52976
+ import { useCallback as useCallback186, useMemo as useMemo191, useState as useState112 } from "react";
52629
52977
  import { jsx as jsx333 } from "react/jsx-runtime";
52630
52978
  var svgStyle6 = {
52631
52979
  width: "11px",
@@ -52640,7 +52988,7 @@ var buttonStyle7 = {
52640
52988
  alignItems: "center"
52641
52989
  };
52642
52990
  var OpenIssueButton = ({ link: link4 }) => {
52643
- const [hovered, setHovered] = useState113(false);
52991
+ const [hovered, setHovered] = useState112(false);
52644
52992
  const buttonTooltip = `Open GitHub issue in new Tab`;
52645
52993
  const handleClick = useCallback186(() => {
52646
52994
  window.open(link4, "_blank");
@@ -52954,11 +53302,11 @@ var Modals = ({ readOnlyStudio }) => {
52954
53302
  };
52955
53303
 
52956
53304
  // src/components/SequencePropsSubscriptionProvider.tsx
52957
- import { useState as useState114, useCallback as useCallback188, useMemo as useMemo193 } from "react";
53305
+ import { useState as useState113, useCallback as useCallback188, useMemo as useMemo193 } from "react";
52958
53306
  import { Internals as Internals97 } from "remotion";
52959
53307
  import { jsx as jsx337 } from "react/jsx-runtime";
52960
53308
  var SequencePropsSubscriptionProvider = ({ children }) => {
52961
- const [overrideToNodePathMap, setOverrideIdToNodePathMap] = useState114({});
53309
+ const [overrideToNodePathMap, setOverrideIdToNodePathMap] = useState113({});
52962
53310
  const setOverrideIdToNodePath = useCallback188((overrideId, state) => {
52963
53311
  setOverrideIdToNodePathMap((prev) => {
52964
53312
  const existing = prev[overrideId];
@@ -52988,7 +53336,7 @@ import {
52988
53336
  HtmlInCanvasCapture,
52989
53337
  isHtmlInCanvasAvailable
52990
53338
  } from "@remotion/canvas-capture";
52991
- import { useEffect as useEffect104, useMemo as useMemo194, useRef as useRef72 } from "react";
53339
+ import { useEffect as useEffect103, useMemo as useMemo194, useRef as useRef72 } from "react";
52992
53340
  import { jsx as jsx338 } from "react/jsx-runtime";
52993
53341
  var logCaptureError = (message, err) => {
52994
53342
  console.error(message, err instanceof Error ? err.message : String(err));
@@ -52997,7 +53345,7 @@ var StudioCanvasCapture = ({ children, density }) => {
52997
53345
  const captureRef = useRef72(null);
52998
53346
  const isSupported = useMemo194(() => isHtmlInCanvasAvailable(), []);
52999
53347
  const keybindings = useKeybinding();
53000
- useEffect104(() => {
53348
+ useEffect103(() => {
53001
53349
  if (!isSupported) {
53002
53350
  return;
53003
53351
  }
@@ -53039,7 +53387,7 @@ var background = {
53039
53387
  var DEFAULT_BUFFER_STATE_DELAY_IN_MILLISECONDS = 300;
53040
53388
  var BUFFER_STATE_DELAY_IN_MILLISECONDS = typeof process.env.BUFFER_STATE_DELAY_IN_MILLISECONDS === "undefined" || process.env.BUFFER_STATE_DELAY_IN_MILLISECONDS === null ? DEFAULT_BUFFER_STATE_DELAY_IN_MILLISECONDS : Number(process.env.BUFFER_STATE_DELAY_IN_MILLISECONDS);
53041
53389
  var Editor = ({ Root, readOnlyStudio }) => {
53042
- const [drawElement, setDrawElement] = useState115(null);
53390
+ const [drawElement, setDrawElement] = useState114(null);
53043
53391
  const size3 = PlayerInternals22.useElementSize(drawElement, {
53044
53392
  triggerOnWindowResize: false,
53045
53393
  shouldApplyCssTransforms: true
@@ -53064,7 +53412,7 @@ var Editor = ({ Root, readOnlyStudio }) => {
53064
53412
  const MemoRoot = useMemo195(() => {
53065
53413
  return React233.memo(Root);
53066
53414
  }, [Root]);
53067
- const [renderError, setRenderError] = useState115(null);
53415
+ const [renderError, setRenderError] = useState114(null);
53068
53416
  const clearError = useCallback189(() => {
53069
53417
  setRenderError(null);
53070
53418
  }, []);
@@ -53128,7 +53476,7 @@ var Editor = ({ Root, readOnlyStudio }) => {
53128
53476
  import { PlayerInternals as PlayerInternals23 } from "@remotion/player";
53129
53477
 
53130
53478
  // src/state/preview-size.tsx
53131
- import { useCallback as useCallback190, useContext as useContext126, useMemo as useMemo196, useState as useState116 } from "react";
53479
+ import { useCallback as useCallback190, useContext as useContext126, useMemo as useMemo196, useState as useState115 } from "react";
53132
53480
  import { Internals as Internals99 } from "remotion";
53133
53481
  import { jsx as jsx340 } from "react/jsx-runtime";
53134
53482
  var key6 = "remotion.previewSize";
@@ -53149,8 +53497,8 @@ var loadPreviewSizeOption = () => {
53149
53497
  return JSON.parse(item2);
53150
53498
  };
53151
53499
  var PreviewSizeProvider = ({ children }) => {
53152
- const [size3, setSizeState] = useState116(() => loadPreviewSizeOption());
53153
- const [translation, setTranslation] = useState116(() => {
53500
+ const [size3, setSizeState] = useState115(() => loadPreviewSizeOption());
53501
+ const [translation, setTranslation] = useState115(() => {
53154
53502
  return {
53155
53503
  x: 0,
53156
53504
  y: 0
@@ -53185,10 +53533,10 @@ var PreviewSizeProvider = ({ children }) => {
53185
53533
  };
53186
53534
 
53187
53535
  // src/components/CheckerboardProvider.tsx
53188
- import { useCallback as useCallback191, useMemo as useMemo197, useState as useState117 } from "react";
53536
+ import { useCallback as useCallback191, useMemo as useMemo197, useState as useState116 } from "react";
53189
53537
  import { jsx as jsx341 } from "react/jsx-runtime";
53190
53538
  var CheckerboardProvider = ({ children }) => {
53191
- const [checkerboard, setCheckerboardState] = useState117(() => loadCheckerboardOption());
53539
+ const [checkerboard, setCheckerboardState] = useState116(() => loadCheckerboardOption());
53192
53540
  const setCheckerboard = useCallback191((newValue) => {
53193
53541
  setCheckerboardState((prevState) => {
53194
53542
  const newVal = newValue(prevState);
@@ -53209,12 +53557,12 @@ var CheckerboardProvider = ({ children }) => {
53209
53557
  };
53210
53558
 
53211
53559
  // src/components/MediaVolumeProvider.tsx
53212
- import { useMemo as useMemo198, useState as useState118 } from "react";
53560
+ import { useMemo as useMemo198, useState as useState117 } from "react";
53213
53561
  import { Internals as Internals100 } from "remotion";
53214
53562
  import { jsx as jsx342 } from "react/jsx-runtime";
53215
53563
  var MediaVolumeProvider = ({ children }) => {
53216
- const [mediaMuted, setMediaMuted] = useState118(() => loadMuteOption());
53217
- const [mediaVolume, setMediaVolume] = useState118(1);
53564
+ const [mediaMuted, setMediaMuted] = useState117(() => loadMuteOption());
53565
+ const [mediaVolume, setMediaVolume] = useState117(1);
53218
53566
  const mediaVolumeContextValue = useMemo198(() => {
53219
53567
  return {
53220
53568
  mediaMuted,
@@ -53237,10 +53585,10 @@ var MediaVolumeProvider = ({ children }) => {
53237
53585
  };
53238
53586
 
53239
53587
  // src/components/ModalsProvider.tsx
53240
- import { useMemo as useMemo199, useState as useState119 } from "react";
53588
+ import { useMemo as useMemo199, useState as useState118 } from "react";
53241
53589
  import { jsx as jsx343 } from "react/jsx-runtime";
53242
53590
  var ModalsProvider = ({ children }) => {
53243
- const [modalContextType, setModalContextType] = useState119(null);
53591
+ const [modalContextType, setModalContextType] = useState118(null);
53244
53592
  const modalsContext = useMemo199(() => {
53245
53593
  return {
53246
53594
  selectedModal: modalContextType,
@@ -53254,7 +53602,7 @@ var ModalsProvider = ({ children }) => {
53254
53602
  };
53255
53603
 
53256
53604
  // src/components/SetTimelineInOutProvider.tsx
53257
- import { useEffect as useEffect105, useMemo as useMemo200, useState as useState120 } from "react";
53605
+ import { useEffect as useEffect104, useMemo as useMemo200, useState as useState119 } from "react";
53258
53606
 
53259
53607
  // src/state/marks.ts
53260
53608
  var localStorageKey4 = () => `remotion.editor.marksv2`;
@@ -53272,13 +53620,13 @@ var loadMarks = () => {
53272
53620
  // src/components/SetTimelineInOutProvider.tsx
53273
53621
  import { jsx as jsx344 } from "react/jsx-runtime";
53274
53622
  var SetTimelineInOutProvider = ({ children }) => {
53275
- const [inAndOutFrames, setInAndOutFrames] = useState120(() => loadMarks());
53623
+ const [inAndOutFrames, setInAndOutFrames] = useState119(() => loadMarks());
53276
53624
  const setTimelineInOutContextValue = useMemo200(() => {
53277
53625
  return {
53278
53626
  setInAndOutFrames
53279
53627
  };
53280
53628
  }, []);
53281
- useEffect105(() => {
53629
+ useEffect104(() => {
53282
53630
  persistMarks(inAndOutFrames);
53283
53631
  }, [inAndOutFrames]);
53284
53632
  return /* @__PURE__ */ jsx344(TimelineInOutContext.Provider, {
@@ -53291,13 +53639,13 @@ var SetTimelineInOutProvider = ({ children }) => {
53291
53639
  };
53292
53640
 
53293
53641
  // src/components/ShowGuidesProvider.tsx
53294
- import { useCallback as useCallback192, useMemo as useMemo201, useRef as useRef73, useState as useState121 } from "react";
53642
+ import { useCallback as useCallback192, useMemo as useMemo201, useRef as useRef73, useState as useState120 } from "react";
53295
53643
  import { jsx as jsx345 } from "react/jsx-runtime";
53296
53644
  var ShowGuidesProvider = ({ children }) => {
53297
- const [guidesList, setGuidesList] = useState121(() => loadGuidesList());
53298
- const [draggingGuideId, setDraggingGuideId] = useState121(null);
53299
- const [hoveredGuideId, setHoveredGuideId] = useState121(null);
53300
- const [editorShowGuides, setEditorShowGuidesState] = useState121(() => loadEditorShowGuidesOption());
53645
+ const [guidesList, setGuidesList] = useState120(() => loadGuidesList());
53646
+ const [draggingGuideId, setDraggingGuideId] = useState120(null);
53647
+ const [hoveredGuideId, setHoveredGuideId] = useState120(null);
53648
+ const [editorShowGuides, setEditorShowGuidesState] = useState120(() => loadEditorShowGuidesOption());
53301
53649
  const shouldCreateGuideRef = useRef73(false);
53302
53650
  const shouldDeleteGuideRef = useRef73(false);
53303
53651
  const setEditorShowGuides = useCallback192((newValue) => {
@@ -53334,10 +53682,10 @@ var ShowGuidesProvider = ({ children }) => {
53334
53682
  };
53335
53683
 
53336
53684
  // src/components/ShowOutlinesProvider.tsx
53337
- import { useCallback as useCallback193, useMemo as useMemo202, useState as useState122 } from "react";
53685
+ import { useCallback as useCallback193, useMemo as useMemo202, useState as useState121 } from "react";
53338
53686
  import { jsx as jsx346 } from "react/jsx-runtime";
53339
53687
  var ShowOutlinesProvider = ({ children }) => {
53340
- const [editorShowOutlines, setEditorShowOutlinesState] = useState122(() => loadEditorShowOutlinesOption());
53688
+ const [editorShowOutlines, setEditorShowOutlinesState] = useState121(() => loadEditorShowOutlinesOption());
53341
53689
  const setEditorShowOutlines = useCallback193((newValue) => {
53342
53690
  setEditorShowOutlinesState((prevState) => {
53343
53691
  const newVal = newValue(prevState);
@@ -53358,10 +53706,10 @@ var ShowOutlinesProvider = ({ children }) => {
53358
53706
  };
53359
53707
 
53360
53708
  // src/components/ShowRulersProvider.tsx
53361
- import { useCallback as useCallback194, useMemo as useMemo203, useState as useState123 } from "react";
53709
+ import { useCallback as useCallback194, useMemo as useMemo203, useState as useState122 } from "react";
53362
53710
  import { jsx as jsx347 } from "react/jsx-runtime";
53363
53711
  var ShowRulersProvider = ({ children }) => {
53364
- const [editorShowRulers, setEditorShowRulersState] = useState123(() => loadEditorShowRulersOption());
53712
+ const [editorShowRulers, setEditorShowRulersState] = useState122(() => loadEditorShowRulersOption());
53365
53713
  const setEditorShowRulers = useCallback194((newValue) => {
53366
53714
  setEditorShowRulersState((prevState) => {
53367
53715
  const newVal = newValue(prevState);
@@ -53382,11 +53730,11 @@ var ShowRulersProvider = ({ children }) => {
53382
53730
  };
53383
53731
 
53384
53732
  // src/components/VisualControls/VisualControlsUndoSync.tsx
53385
- import { useContext as useContext127, useEffect as useEffect106 } from "react";
53733
+ import { useContext as useContext127, useEffect as useEffect105 } from "react";
53386
53734
  var VisualControlsUndoSync = () => {
53387
53735
  const { subscribeToEvent } = useContext127(StudioServerConnectionCtx);
53388
53736
  const { updateValue } = useContext127(SetVisualControlsContext);
53389
- useEffect106(() => {
53737
+ useEffect105(() => {
53390
53738
  const unsub = subscribeToEvent("visual-control-values-changed", (event) => {
53391
53739
  if (event.type !== "visual-control-values-changed") {
53392
53740
  return;
@@ -53401,10 +53749,10 @@ var VisualControlsUndoSync = () => {
53401
53749
  };
53402
53750
 
53403
53751
  // src/components/ZoomGesturesProvider.tsx
53404
- import { useCallback as useCallback195, useMemo as useMemo204, useState as useState124 } from "react";
53752
+ import { useCallback as useCallback195, useMemo as useMemo204, useState as useState123 } from "react";
53405
53753
  import { jsx as jsx348 } from "react/jsx-runtime";
53406
53754
  var ZoomGesturesProvider = ({ children }) => {
53407
- const [editorZoomGestures, setEditorZoomGesturesState] = useState124(() => loadEditorZoomGesturesOption());
53755
+ const [editorZoomGestures, setEditorZoomGesturesState] = useState123(() => loadEditorZoomGesturesOption());
53408
53756
  const setEditorZoomGestures = useCallback195((newValue) => {
53409
53757
  setEditorZoomGesturesState((prevState) => {
53410
53758
  const newVal = newValue(prevState);
@@ -53551,15 +53899,15 @@ var ServerDisconnected = () => {
53551
53899
  };
53552
53900
 
53553
53901
  // src/FastRefreshProvider.tsx
53554
- import { useCallback as useCallback196, useEffect as useEffect107, useMemo as useMemo205, useState as useState125 } from "react";
53902
+ import { useCallback as useCallback196, useEffect as useEffect106, useMemo as useMemo205, useState as useState124 } from "react";
53555
53903
  import { jsx as jsx351 } from "react/jsx-runtime";
53556
53904
  var FastRefreshProvider = ({ children }) => {
53557
- const [fastRefreshes, setFastRefreshes] = useState125(0);
53558
- const [manualRefreshes, setManualRefreshes] = useState125(0);
53905
+ const [fastRefreshes, setFastRefreshes] = useState124(0);
53906
+ const [manualRefreshes, setManualRefreshes] = useState124(0);
53559
53907
  const increaseManualRefreshes = useCallback196(() => {
53560
53908
  setManualRefreshes((i) => i + 1);
53561
53909
  }, []);
53562
- useEffect107(() => {
53910
+ useEffect106(() => {
53563
53911
  if (typeof __webpack_module__ !== "undefined") {
53564
53912
  if (__webpack_module__.hot) {
53565
53913
  __webpack_module__.hot.addStatusHandler((status) => {
@@ -53740,15 +54088,15 @@ var injectCSS = () => {
53740
54088
  import {
53741
54089
  useCallback as useCallback197,
53742
54090
  useContext as useContext129,
53743
- useEffect as useEffect108,
54091
+ useEffect as useEffect107,
53744
54092
  useImperativeHandle as useImperativeHandle14,
53745
54093
  useMemo as useMemo206,
53746
- useState as useState126
54094
+ useState as useState125
53747
54095
  } from "react";
53748
54096
  import { getInputProps as getInputProps2, Internals as Internals102 } from "remotion";
53749
54097
  import { jsx as jsx352 } from "react/jsx-runtime";
53750
54098
  var ResolveCompositionConfigInStudio = ({ children }) => {
53751
- const [currentRenderModalComposition, setCurrentRenderModalComposition] = useState126(null);
54099
+ const [currentRenderModalComposition, setCurrentRenderModalComposition] = useState125(null);
53752
54100
  const { compositions, canvasContent, currentCompositionMetadata } = useContext129(Internals102.CompositionManager);
53753
54101
  const { fastRefreshes, manualRefreshes } = useContext129(FastRefreshContext);
53754
54102
  if (manualRefreshes) {}
@@ -53761,7 +54109,7 @@ var ResolveCompositionConfigInStudio = ({ children }) => {
53761
54109
  const inputProps = useMemo206(() => {
53762
54110
  return typeof window === "undefined" || env.isPlayer ? {} : getInputProps2() ?? {};
53763
54111
  }, [env.isPlayer]);
53764
- const [resolvedConfigs, setResolvedConfigs] = useState126({});
54112
+ const [resolvedConfigs, setResolvedConfigs] = useState125({});
53765
54113
  const selectedEditorProps = useMemo206(() => {
53766
54114
  return selectedComposition ? allEditorProps[selectedComposition.id] ?? {} : {};
53767
54115
  }, [allEditorProps, selectedComposition]);
@@ -53916,7 +54264,7 @@ var ResolveCompositionConfigInStudio = ({ children }) => {
53916
54264
  }, [currentDefaultProps, inputProps]);
53917
54265
  const canResolve = selectedComposition && Boolean(selectedComposition.calculateMetadata);
53918
54266
  const shouldIgnoreUpdate = typeof window !== "undefined" && window.remotion_ignoreFastRefreshUpdate && fastRefreshes <= window.remotion_ignoreFastRefreshUpdate;
53919
- useEffect108(() => {
54267
+ useEffect107(() => {
53920
54268
  if (shouldIgnoreUpdate) {
53921
54269
  return;
53922
54270
  }
@@ -53948,7 +54296,7 @@ var ResolveCompositionConfigInStudio = ({ children }) => {
53948
54296
  selectedComposition?.width,
53949
54297
  shouldIgnoreUpdate
53950
54298
  ]);
53951
- useEffect108(() => {
54299
+ useEffect107(() => {
53952
54300
  if (renderModalComposition && !isTheSame) {
53953
54301
  const combinedProps = {
53954
54302
  ...renderModalComposition.defaultProps ?? {},
@@ -54037,7 +54385,7 @@ var StudioInner = ({ rootComponent, readOnly }) => {
54037
54385
  });
54038
54386
  };
54039
54387
  var Studio = ({ rootComponent, readOnly }) => {
54040
- useLayoutEffect5(() => {
54388
+ useLayoutEffect6(() => {
54041
54389
  injectCSS();
54042
54390
  }, []);
54043
54391
  return /* @__PURE__ */ jsx353(FastRefreshProvider, {