@remotion/studio 4.0.435 → 4.0.437
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Timeline/Timeline.d.ts +1 -1
- package/dist/components/Timeline/Timeline.js +36 -3
- package/dist/components/TopPanel.d.ts +1 -1
- package/dist/components/TopPanel.js +36 -3
- package/dist/esm/{chunk-x88z6n54.js → chunk-5dvr7831.js} +88 -81
- package/dist/esm/internals.mjs +88 -81
- package/dist/esm/previewEntry.mjs +82 -75
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/use-breakpoint.js +6 -1
- package/package.json +10 -10
|
@@ -10108,15 +10108,20 @@ var MenuBuildIndicator = () => {
|
|
|
10108
10108
|
import { useCallback as useCallback94, useContext as useContext61, useEffect as useEffect64 } from "react";
|
|
10109
10109
|
|
|
10110
10110
|
// src/components/TopPanel.tsx
|
|
10111
|
-
import { useCallback as useCallback93, useContext as useContext60, useEffect as useEffect63, useMemo as useMemo98 } from "react";
|
|
10111
|
+
import React126, { useCallback as useCallback93, useContext as useContext60, useEffect as useEffect63, useMemo as useMemo98 } from "react";
|
|
10112
10112
|
|
|
10113
10113
|
// src/helpers/use-breakpoint.ts
|
|
10114
|
-
import { useEffect as useEffect33, useState as useState38 } from "react";
|
|
10114
|
+
import { useEffect as useEffect33, useRef as useRef22, useState as useState38 } from "react";
|
|
10115
10115
|
function useBreakpoint(breakpoint2) {
|
|
10116
10116
|
const [compactUI, setCompactUI] = useState38(window.innerWidth < breakpoint2);
|
|
10117
|
+
const compactUIRef = useRef22(compactUI);
|
|
10117
10118
|
useEffect33(() => {
|
|
10118
10119
|
function handleResize() {
|
|
10119
|
-
|
|
10120
|
+
const newValue = window.innerWidth < breakpoint2;
|
|
10121
|
+
if (newValue !== compactUIRef.current) {
|
|
10122
|
+
setCompactUI(newValue);
|
|
10123
|
+
}
|
|
10124
|
+
compactUIRef.current = newValue;
|
|
10120
10125
|
}
|
|
10121
10126
|
window.addEventListener("resize", handleResize);
|
|
10122
10127
|
handleResize();
|
|
@@ -10414,7 +10419,7 @@ import {
|
|
|
10414
10419
|
useContext as useContext28,
|
|
10415
10420
|
useEffect as useEffect35,
|
|
10416
10421
|
useMemo as useMemo50,
|
|
10417
|
-
useRef as
|
|
10422
|
+
useRef as useRef24
|
|
10418
10423
|
} from "react";
|
|
10419
10424
|
|
|
10420
10425
|
// src/helpers/editor-ruler.ts
|
|
@@ -10629,7 +10634,7 @@ import {
|
|
|
10629
10634
|
useContext as useContext27,
|
|
10630
10635
|
useEffect as useEffect34,
|
|
10631
10636
|
useMemo as useMemo49,
|
|
10632
|
-
useRef as
|
|
10637
|
+
useRef as useRef23,
|
|
10633
10638
|
useState as useState39
|
|
10634
10639
|
} from "react";
|
|
10635
10640
|
import { Internals as Internals22 } from "remotion";
|
|
@@ -10646,7 +10651,7 @@ var Ruler = ({
|
|
|
10646
10651
|
markingGaps,
|
|
10647
10652
|
orientation
|
|
10648
10653
|
}) => {
|
|
10649
|
-
const rulerCanvasRef =
|
|
10654
|
+
const rulerCanvasRef = useRef23(null);
|
|
10650
10655
|
const isVerticalRuler = orientation === "vertical";
|
|
10651
10656
|
const {
|
|
10652
10657
|
shouldCreateGuideRef,
|
|
@@ -10810,7 +10815,7 @@ var EditorRulers = ({ contentDimensions, canvasSize, assetMetadata, containerRef
|
|
|
10810
10815
|
rulerMarkingGaps,
|
|
10811
10816
|
scale
|
|
10812
10817
|
}), [verticalRulerScaleRange, rulerMarkingGaps, scale]);
|
|
10813
|
-
const requestAnimationFrameRef =
|
|
10818
|
+
const requestAnimationFrameRef = useRef24(null);
|
|
10814
10819
|
const onMouseMove = useCallback40((e) => {
|
|
10815
10820
|
if (requestAnimationFrameRef.current) {
|
|
10816
10821
|
cancelAnimationFrame(requestAnimationFrameRef.current);
|
|
@@ -11634,7 +11639,7 @@ import {
|
|
|
11634
11639
|
useEffect as useEffect41,
|
|
11635
11640
|
useImperativeHandle as useImperativeHandle11,
|
|
11636
11641
|
useMemo as useMemo54,
|
|
11637
|
-
useRef as
|
|
11642
|
+
useRef as useRef25,
|
|
11638
11643
|
useState as useState42
|
|
11639
11644
|
} from "react";
|
|
11640
11645
|
import { useRemotionEnvironment as useRemotionEnvironment2 } from "remotion";
|
|
@@ -11749,7 +11754,7 @@ var SetVisualControlsContext = createContext17({
|
|
|
11749
11754
|
}
|
|
11750
11755
|
});
|
|
11751
11756
|
var VisualControlsProvider = ({ children }) => {
|
|
11752
|
-
const imperativeHandles =
|
|
11757
|
+
const imperativeHandles = useRef25({});
|
|
11753
11758
|
const [handles, setHandles] = useState42({});
|
|
11754
11759
|
const state = useMemo54(() => {
|
|
11755
11760
|
return {
|
|
@@ -11778,7 +11783,7 @@ var VisualControlsProvider = ({ children }) => {
|
|
|
11778
11783
|
};
|
|
11779
11784
|
}, []);
|
|
11780
11785
|
const z = useZodIfPossible();
|
|
11781
|
-
const changedRef =
|
|
11786
|
+
const changedRef = useRef25(false);
|
|
11782
11787
|
const env = useRemotionEnvironment2();
|
|
11783
11788
|
const visualControl = useCallback43(function(key, value, schema) {
|
|
11784
11789
|
if (handles && false) {}
|
|
@@ -12857,7 +12862,7 @@ import {
|
|
|
12857
12862
|
useContext as useContext36,
|
|
12858
12863
|
useEffect as useEffect43,
|
|
12859
12864
|
useMemo as useMemo59,
|
|
12860
|
-
useRef as
|
|
12865
|
+
useRef as useRef26,
|
|
12861
12866
|
useState as useState44
|
|
12862
12867
|
} from "react";
|
|
12863
12868
|
import { Internals as Internals31 } from "remotion";
|
|
@@ -12909,7 +12914,7 @@ var useLocalState = ({
|
|
|
12909
12914
|
zodValidation: zodSafeParse(schema, savedValue)
|
|
12910
12915
|
};
|
|
12911
12916
|
}, [localUnsavedValue, savedValue, schema]);
|
|
12912
|
-
const stateRef =
|
|
12917
|
+
const stateRef = useRef26(currentLocalValue);
|
|
12913
12918
|
stateRef.current = currentLocalValue;
|
|
12914
12919
|
const onChange = useCallback49((updater, forceApply, increment) => {
|
|
12915
12920
|
const newValue = updater(stateRef.current.value);
|
|
@@ -13842,7 +13847,7 @@ var ZodArrayItemEditor = ({
|
|
|
13842
13847
|
|
|
13843
13848
|
// src/components/RenderModal/InfoBubble.tsx
|
|
13844
13849
|
import { PlayerInternals as PlayerInternals11 } from "@remotion/player";
|
|
13845
|
-
import { useCallback as useCallback54, useEffect as useEffect44, useMemo as useMemo66, useRef as
|
|
13850
|
+
import { useCallback as useCallback54, useEffect as useEffect44, useMemo as useMemo66, useRef as useRef27, useState as useState47 } from "react";
|
|
13846
13851
|
import ReactDOM8 from "react-dom";
|
|
13847
13852
|
|
|
13848
13853
|
// src/components/RenderModal/InfoTooltip.tsx
|
|
@@ -13927,7 +13932,7 @@ var container29 = {
|
|
|
13927
13932
|
var InfoBubble = ({ title: title4, children }) => {
|
|
13928
13933
|
const [hovered, setIsHovered] = useState47(false);
|
|
13929
13934
|
const [opened, setOpened] = useState47(false);
|
|
13930
|
-
const ref =
|
|
13935
|
+
const ref = useRef27(null);
|
|
13931
13936
|
const { tabIndex, currentZIndex } = useZIndex();
|
|
13932
13937
|
const size2 = PlayerInternals11.useElementSize(ref, {
|
|
13933
13938
|
triggerOnWindowResize: true,
|
|
@@ -14220,7 +14225,7 @@ var ZodArrayEditor = ({
|
|
|
14220
14225
|
import { useCallback as useCallback55 } from "react";
|
|
14221
14226
|
|
|
14222
14227
|
// src/components/Checkbox.tsx
|
|
14223
|
-
import { useEffect as useEffect45, useMemo as useMemo68, useRef as
|
|
14228
|
+
import { useEffect as useEffect45, useMemo as useMemo68, useRef as useRef28 } from "react";
|
|
14224
14229
|
import { jsx as jsx120, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
14225
14230
|
var size2 = 20;
|
|
14226
14231
|
var background = {
|
|
@@ -14247,7 +14252,7 @@ var box = {
|
|
|
14247
14252
|
color: "white"
|
|
14248
14253
|
};
|
|
14249
14254
|
var Checkbox = ({ checked, onChange, disabled, name, rounded }) => {
|
|
14250
|
-
const ref =
|
|
14255
|
+
const ref = useRef28(null);
|
|
14251
14256
|
const input2 = useMemo68(() => {
|
|
14252
14257
|
return {
|
|
14253
14258
|
appearance: "none",
|
|
@@ -14361,7 +14366,7 @@ var colorWithNewOpacity = (color, opacity, zodTypes) => {
|
|
|
14361
14366
|
};
|
|
14362
14367
|
|
|
14363
14368
|
// src/components/NewComposition/InputDragger.tsx
|
|
14364
|
-
import React83, { useCallback as useCallback56, useEffect as useEffect46, useMemo as useMemo69, useRef as
|
|
14369
|
+
import React83, { useCallback as useCallback56, useEffect as useEffect46, useMemo as useMemo69, useRef as useRef29, useState as useState49 } from "react";
|
|
14365
14370
|
import { interpolate as interpolate2 } from "remotion";
|
|
14366
14371
|
import { jsx as jsx122 } from "react/jsx-runtime";
|
|
14367
14372
|
var isInt = (num) => {
|
|
@@ -14383,8 +14388,8 @@ var InputDraggerForwardRefFn = ({
|
|
|
14383
14388
|
}, ref) => {
|
|
14384
14389
|
const [inputFallback, setInputFallback] = useState49(false);
|
|
14385
14390
|
const [dragging, setDragging] = useState49(false);
|
|
14386
|
-
const fallbackRef =
|
|
14387
|
-
const pointerDownRef =
|
|
14391
|
+
const fallbackRef = useRef29(null);
|
|
14392
|
+
const pointerDownRef = useRef29(false);
|
|
14388
14393
|
const style8 = useMemo69(() => {
|
|
14389
14394
|
return {
|
|
14390
14395
|
...inputBaseStyle,
|
|
@@ -14549,7 +14554,7 @@ import {
|
|
|
14549
14554
|
useEffect as useEffect47,
|
|
14550
14555
|
useImperativeHandle as useImperativeHandle12,
|
|
14551
14556
|
useMemo as useMemo70,
|
|
14552
|
-
useRef as
|
|
14557
|
+
useRef as useRef30,
|
|
14553
14558
|
useState as useState50
|
|
14554
14559
|
} from "react";
|
|
14555
14560
|
import { jsx as jsx123 } from "react/jsx-runtime";
|
|
@@ -14561,7 +14566,7 @@ var inputBaseStyle3 = {
|
|
|
14561
14566
|
var RemInputTypeColorForwardRef = ({ status, ...props }, ref) => {
|
|
14562
14567
|
const [isFocused, setIsFocused] = useState50(false);
|
|
14563
14568
|
const [isHovered, setIsHovered] = useState50(false);
|
|
14564
|
-
const inputRef =
|
|
14569
|
+
const inputRef = useRef30(null);
|
|
14565
14570
|
const { tabIndex } = useZIndex();
|
|
14566
14571
|
const style8 = useMemo70(() => {
|
|
14567
14572
|
return {
|
|
@@ -18897,7 +18902,7 @@ var OptionsPanel = ({ readOnlyStudio }) => {
|
|
|
18897
18902
|
};
|
|
18898
18903
|
|
|
18899
18904
|
// src/components/PreviewToolbar.tsx
|
|
18900
|
-
import { useContext as useContext57, useEffect as useEffect61, useRef as
|
|
18905
|
+
import { useContext as useContext57, useEffect as useEffect61, useRef as useRef33, useState as useState64 } from "react";
|
|
18901
18906
|
import { Internals as Internals45 } from "remotion";
|
|
18902
18907
|
|
|
18903
18908
|
// src/state/loop.ts
|
|
@@ -18952,7 +18957,7 @@ import {
|
|
|
18952
18957
|
useEffect as useEffect56,
|
|
18953
18958
|
useLayoutEffect,
|
|
18954
18959
|
useMemo as useMemo93,
|
|
18955
|
-
useRef as
|
|
18960
|
+
useRef as useRef31,
|
|
18956
18961
|
useState as useState61
|
|
18957
18962
|
} from "react";
|
|
18958
18963
|
import { Internals as Internals38 } from "remotion";
|
|
@@ -18973,9 +18978,9 @@ var FpsCounter = ({ playbackSpeed }) => {
|
|
|
18973
18978
|
const frame2 = Internals38.Timeline.useTimelinePosition();
|
|
18974
18979
|
const [marker, rerender] = useState61({});
|
|
18975
18980
|
const [fps, setFps] = useState61(0);
|
|
18976
|
-
const previousUpdates =
|
|
18977
|
-
const fpsRef =
|
|
18978
|
-
const playingRef =
|
|
18981
|
+
const previousUpdates = useRef31([]);
|
|
18982
|
+
const fpsRef = useRef31(0);
|
|
18983
|
+
const playingRef = useRef31(playing);
|
|
18979
18984
|
useLayoutEffect(() => {
|
|
18980
18985
|
fpsRef.current = 0;
|
|
18981
18986
|
previousUpdates.current = [];
|
|
@@ -19706,7 +19711,7 @@ var PlayPause = ({ playbackRate, loop, bufferStateDelayInMilliseconds }) => {
|
|
|
19706
19711
|
|
|
19707
19712
|
// src/components/RenderButton.tsx
|
|
19708
19713
|
import { PlayerInternals as PlayerInternals14 } from "@remotion/player";
|
|
19709
|
-
import { useCallback as useCallback91, useContext as useContext55, useMemo as useMemo95, useRef as
|
|
19714
|
+
import { useCallback as useCallback91, useContext as useContext55, useMemo as useMemo95, useRef as useRef32, useState as useState63 } from "react";
|
|
19710
19715
|
import ReactDOM9 from "react-dom";
|
|
19711
19716
|
import { Internals as Internals43 } from "remotion";
|
|
19712
19717
|
import { jsx as jsx180, jsxs as jsxs83, Fragment as Fragment23 } from "react/jsx-runtime";
|
|
@@ -19780,8 +19785,8 @@ var RenderButton = ({
|
|
|
19780
19785
|
const { setSelectedModal } = useContext55(ModalsContext);
|
|
19781
19786
|
const [preferredRenderType, setPreferredRenderType] = useState63(() => getInitialRenderType(readOnlyStudio));
|
|
19782
19787
|
const [dropdownOpened, setDropdownOpened] = useState63(false);
|
|
19783
|
-
const dropdownRef =
|
|
19784
|
-
const containerRef =
|
|
19788
|
+
const dropdownRef = useRef32(null);
|
|
19789
|
+
const containerRef = useRef32(null);
|
|
19785
19790
|
const { currentZIndex } = useZIndex();
|
|
19786
19791
|
const size4 = PlayerInternals14.useElementSize(dropdownRef, {
|
|
19787
19792
|
triggerOnWindowResize: true,
|
|
@@ -20330,9 +20335,9 @@ var PreviewToolbar = ({ readOnlyStudio, bufferStateDelayInMilliseconds }) => {
|
|
|
20330
20335
|
const { setMediaMuted } = useContext57(Internals45.SetMediaVolumeContext);
|
|
20331
20336
|
const { canvasContent } = useContext57(Internals45.CompositionManager);
|
|
20332
20337
|
const isVideoComposition = useIsVideoComposition();
|
|
20333
|
-
const previewToolbarRef =
|
|
20334
|
-
const leftScrollIndicatorRef =
|
|
20335
|
-
const rightScrollIndicatorRef =
|
|
20338
|
+
const previewToolbarRef = useRef33(null);
|
|
20339
|
+
const leftScrollIndicatorRef = useRef33(null);
|
|
20340
|
+
const rightScrollIndicatorRef = useRef33(null);
|
|
20336
20341
|
const isStill = useIsStill();
|
|
20337
20342
|
const [loop, setLoop] = useState64(loadLoopOption());
|
|
20338
20343
|
const isFullscreenSupported = checkFullscreenSupport();
|
|
@@ -20488,7 +20493,7 @@ var PreviewToolbar = ({ readOnlyStudio, bufferStateDelayInMilliseconds }) => {
|
|
|
20488
20493
|
};
|
|
20489
20494
|
|
|
20490
20495
|
// src/components/Splitter/SplitterContainer.tsx
|
|
20491
|
-
import { useMemo as useMemo96, useRef as
|
|
20496
|
+
import { useMemo as useMemo96, useRef as useRef34, useState as useState65 } from "react";
|
|
20492
20497
|
|
|
20493
20498
|
// src/state/timeline.ts
|
|
20494
20499
|
var localStorageKey4 = (id) => `remotion.editor.timelineFlex.${id}`;
|
|
@@ -20543,8 +20548,8 @@ var containerColumn = {
|
|
|
20543
20548
|
var SplitterContainer = ({ orientation, children, defaultFlex, maxFlex, minFlex, id }) => {
|
|
20544
20549
|
const [initialTimelineFlex, persistFlex] = useTimelineFlex(id);
|
|
20545
20550
|
const [flexValue, setFlexValue] = useState65(initialTimelineFlex ?? defaultFlex);
|
|
20546
|
-
const ref =
|
|
20547
|
-
const isDragging =
|
|
20551
|
+
const ref = useRef34(null);
|
|
20552
|
+
const isDragging = useRef34(false);
|
|
20548
20553
|
const value = useMemo96(() => {
|
|
20549
20554
|
return {
|
|
20550
20555
|
flexValue,
|
|
@@ -20617,7 +20622,7 @@ var SplitterElement = ({ children, type, sticky }) => {
|
|
|
20617
20622
|
|
|
20618
20623
|
// src/components/Splitter/SplitterHandle.tsx
|
|
20619
20624
|
import { PlayerInternals as PlayerInternals15 } from "@remotion/player";
|
|
20620
|
-
import { useContext as useContext59, useEffect as useEffect62, useRef as
|
|
20625
|
+
import { useContext as useContext59, useEffect as useEffect62, useRef as useRef35, useState as useState66 } from "react";
|
|
20621
20626
|
import { jsx as jsx186 } from "react/jsx-runtime";
|
|
20622
20627
|
var SPLITTER_HANDLE_SIZE = 3;
|
|
20623
20628
|
var containerRow2 = {
|
|
@@ -20632,7 +20637,7 @@ var SplitterHandle = ({ allowToCollapse, onCollapse }) => {
|
|
|
20632
20637
|
throw new Error("Cannot find splitter context");
|
|
20633
20638
|
}
|
|
20634
20639
|
const [lastPointerUp, setLastPointerUp] = useState66(() => Date.now());
|
|
20635
|
-
const ref =
|
|
20640
|
+
const ref = useRef35(null);
|
|
20636
20641
|
useEffect62(() => {
|
|
20637
20642
|
if (context.isDragging.current) {
|
|
20638
20643
|
return;
|
|
@@ -20793,7 +20798,7 @@ var useResponsiveSidebarStatus = () => {
|
|
|
20793
20798
|
}, [sidebarCollapsedStateLeft, responsiveLeftStatus]);
|
|
20794
20799
|
return actualStateLeft;
|
|
20795
20800
|
};
|
|
20796
|
-
var
|
|
20801
|
+
var TopPanelInner = ({ readOnlyStudio, onMounted, drawRef: drawRef2, bufferStateDelayInMilliseconds }) => {
|
|
20797
20802
|
const { setSidebarCollapsedState, sidebarCollapsedStateRight } = useContext60(SidebarContext);
|
|
20798
20803
|
const rulersAreVisible = useIsRulerVisible();
|
|
20799
20804
|
const actualStateLeft = useResponsiveSidebarStatus();
|
|
@@ -20899,6 +20904,7 @@ var TopPanel = ({ readOnlyStudio, onMounted, drawRef: drawRef2, bufferStateDelay
|
|
|
20899
20904
|
]
|
|
20900
20905
|
});
|
|
20901
20906
|
};
|
|
20907
|
+
var TopPanel = React126.memo(TopPanelInner);
|
|
20902
20908
|
|
|
20903
20909
|
// src/components/SidebarCollapserControls.tsx
|
|
20904
20910
|
import { jsx as jsx188, jsxs as jsxs88, Fragment as Fragment26 } from "react/jsx-runtime";
|
|
@@ -21271,7 +21277,7 @@ var MenuToolbar = ({ readOnlyStudio }) => {
|
|
|
21271
21277
|
};
|
|
21272
21278
|
|
|
21273
21279
|
// src/components/Timeline/Timeline.tsx
|
|
21274
|
-
import { useContext as useContext75, useMemo as useMemo118 } from "react";
|
|
21280
|
+
import React152, { useContext as useContext75, useMemo as useMemo118 } from "react";
|
|
21275
21281
|
import { Internals as Internals57 } from "remotion";
|
|
21276
21282
|
|
|
21277
21283
|
// src/helpers/get-sequence-visible-range.ts
|
|
@@ -21486,7 +21492,7 @@ import {
|
|
|
21486
21492
|
useContext as useContext65,
|
|
21487
21493
|
useEffect as useEffect66,
|
|
21488
21494
|
useMemo as useMemo102,
|
|
21489
|
-
useRef as
|
|
21495
|
+
useRef as useRef36,
|
|
21490
21496
|
useState as useState69
|
|
21491
21497
|
} from "react";
|
|
21492
21498
|
import { Internals as Internals47, useVideoConfig as useVideoConfig4 } from "remotion";
|
|
@@ -21650,7 +21656,7 @@ var Inner2 = () => {
|
|
|
21650
21656
|
dragging: false
|
|
21651
21657
|
});
|
|
21652
21658
|
const { playing, play, pause, seek } = PlayerInternals16.usePlayer();
|
|
21653
|
-
const scroller =
|
|
21659
|
+
const scroller = useRef36(null);
|
|
21654
21660
|
const stopInterval = () => {
|
|
21655
21661
|
if (scroller.current) {
|
|
21656
21662
|
clearInterval(scroller.current);
|
|
@@ -22023,7 +22029,7 @@ var Inner2 = () => {
|
|
|
22023
22029
|
|
|
22024
22030
|
// src/components/Timeline/TimelineList.tsx
|
|
22025
22031
|
import { PlayerInternals as PlayerInternals18 } from "@remotion/player";
|
|
22026
|
-
import { useRef as
|
|
22032
|
+
import { useRef as useRef40 } from "react";
|
|
22027
22033
|
|
|
22028
22034
|
// src/components/Timeline/TimelineListItem.tsx
|
|
22029
22035
|
import { useCallback as useCallback107, useContext as useContext70, useMemo as useMemo111 } from "react";
|
|
@@ -22935,7 +22941,7 @@ var useResolvedStack = (stack2) => {
|
|
|
22935
22941
|
};
|
|
22936
22942
|
|
|
22937
22943
|
// src/components/Timeline/use-sequence-props-subscription.ts
|
|
22938
|
-
import { useCallback as useCallback106, useContext as useContext69, useEffect as useEffect71, useMemo as useMemo110, useRef as
|
|
22944
|
+
import { useCallback as useCallback106, useContext as useContext69, useEffect as useEffect71, useMemo as useMemo110, useRef as useRef37 } from "react";
|
|
22939
22945
|
import { Internals as Internals50 } from "remotion";
|
|
22940
22946
|
var useSequencePropsSubscription = (sequence, originalLocation) => {
|
|
22941
22947
|
const { setCodeValues } = useContext69(Internals50.VisualModeOverridesContext);
|
|
@@ -22963,14 +22969,14 @@ var useSequencePropsSubscription = (sequence, originalLocation) => {
|
|
|
22963
22969
|
const locationSource = validatedLocation?.source ?? null;
|
|
22964
22970
|
const locationLine = validatedLocation?.line ?? null;
|
|
22965
22971
|
const locationColumn = validatedLocation?.column ?? null;
|
|
22966
|
-
const currentLocationSource =
|
|
22972
|
+
const currentLocationSource = useRef37(locationSource);
|
|
22967
22973
|
currentLocationSource.current = locationSource;
|
|
22968
|
-
const currentLocationLine =
|
|
22974
|
+
const currentLocationLine = useRef37(locationLine);
|
|
22969
22975
|
currentLocationLine.current = locationLine;
|
|
22970
|
-
const currentLocationColumn =
|
|
22976
|
+
const currentLocationColumn = useRef37(locationColumn);
|
|
22971
22977
|
currentLocationColumn.current = locationColumn;
|
|
22972
|
-
const nodePathRef =
|
|
22973
|
-
const isMountedRef =
|
|
22978
|
+
const nodePathRef = useRef37(null);
|
|
22979
|
+
const isMountedRef = useRef37(true);
|
|
22974
22980
|
useEffect71(() => {
|
|
22975
22981
|
isMountedRef.current = true;
|
|
22976
22982
|
return () => {
|
|
@@ -23184,7 +23190,7 @@ var TimelineListItem = ({ nestedDepth, sequence, isCompact }) => {
|
|
|
23184
23190
|
};
|
|
23185
23191
|
|
|
23186
23192
|
// src/components/Timeline/TimelineTimeIndicators.tsx
|
|
23187
|
-
import { useContext as useContext71, useEffect as useEffect73, useMemo as useMemo112, useRef as
|
|
23193
|
+
import { useContext as useContext71, useEffect as useEffect73, useMemo as useMemo112, useRef as useRef39 } from "react";
|
|
23188
23194
|
import { Internals as Internals53 } from "remotion";
|
|
23189
23195
|
|
|
23190
23196
|
// src/components/TimeValue.tsx
|
|
@@ -23193,7 +23199,7 @@ import {
|
|
|
23193
23199
|
useCallback as useCallback108,
|
|
23194
23200
|
useEffect as useEffect72,
|
|
23195
23201
|
useImperativeHandle as useImperativeHandle14,
|
|
23196
|
-
useRef as
|
|
23202
|
+
useRef as useRef38
|
|
23197
23203
|
} from "react";
|
|
23198
23204
|
import { Internals as Internals52, useCurrentFrame } from "remotion";
|
|
23199
23205
|
import { jsx as jsx205, jsxs as jsxs98 } from "react/jsx-runtime";
|
|
@@ -23226,7 +23232,7 @@ var TimeValue = () => {
|
|
|
23226
23232
|
const isStill = useIsStill();
|
|
23227
23233
|
const { seek, play, pause, toggle } = PlayerInternals17.usePlayer();
|
|
23228
23234
|
const keybindings = useKeybinding();
|
|
23229
|
-
const ref =
|
|
23235
|
+
const ref = useRef38(null);
|
|
23230
23236
|
const onTextChange = useCallback108((newVal) => {
|
|
23231
23237
|
seek(parseInt(newVal, 10));
|
|
23232
23238
|
}, [seek]);
|
|
@@ -23354,7 +23360,7 @@ var TimelineTimeIndicators = () => {
|
|
|
23354
23360
|
});
|
|
23355
23361
|
};
|
|
23356
23362
|
var Inner3 = ({ windowWidth, durationInFrames, fps }) => {
|
|
23357
|
-
const ref =
|
|
23363
|
+
const ref = useRef39(null);
|
|
23358
23364
|
useEffect73(() => {
|
|
23359
23365
|
const currentRef = ref.current;
|
|
23360
23366
|
if (!currentRef) {
|
|
@@ -23437,7 +23443,7 @@ var container43 = {
|
|
|
23437
23443
|
background: BACKGROUND
|
|
23438
23444
|
};
|
|
23439
23445
|
var TimelineList = ({ timeline }) => {
|
|
23440
|
-
const ref =
|
|
23446
|
+
const ref = useRef40(null);
|
|
23441
23447
|
const size4 = PlayerInternals18.useElementSize(ref, {
|
|
23442
23448
|
shouldApplyCssTransforms: false,
|
|
23443
23449
|
triggerOnWindowResize: false
|
|
@@ -23678,7 +23684,7 @@ var useMaxMediaDuration = (s, fps) => {
|
|
|
23678
23684
|
|
|
23679
23685
|
// src/components/AudioWaveform.tsx
|
|
23680
23686
|
import { getAudioData, getWaveformPortion } from "@remotion/media-utils";
|
|
23681
|
-
import { useEffect as useEffect76, useMemo as useMemo115, useRef as
|
|
23687
|
+
import { useEffect as useEffect76, useMemo as useMemo115, useRef as useRef41, useState as useState77 } from "react";
|
|
23682
23688
|
import { Internals as Internals55 } from "remotion";
|
|
23683
23689
|
|
|
23684
23690
|
// src/components/AudioWaveformBar.tsx
|
|
@@ -23737,12 +23743,12 @@ var AudioWaveform = ({
|
|
|
23737
23743
|
}) => {
|
|
23738
23744
|
const [metadata, setMetadata] = useState77(null);
|
|
23739
23745
|
const [error, setError] = useState77(null);
|
|
23740
|
-
const mountState =
|
|
23746
|
+
const mountState = useRef41({ isMounted: true });
|
|
23741
23747
|
const vidConf = Internals55.useUnsafeVideoConfig();
|
|
23742
23748
|
if (vidConf === null) {
|
|
23743
23749
|
throw new Error("Expected video config");
|
|
23744
23750
|
}
|
|
23745
|
-
const canvas =
|
|
23751
|
+
const canvas = useRef41(null);
|
|
23746
23752
|
useEffect76(() => {
|
|
23747
23753
|
const { current } = mountState;
|
|
23748
23754
|
current.isMounted = true;
|
|
@@ -23953,7 +23959,7 @@ var TimelineSequenceFrame = ({ roundedFrame, premounted, postmounted }) => {
|
|
|
23953
23959
|
};
|
|
23954
23960
|
|
|
23955
23961
|
// src/components/Timeline/TimelineVideoInfo.tsx
|
|
23956
|
-
import { useEffect as useEffect77, useRef as
|
|
23962
|
+
import { useEffect as useEffect77, useRef as useRef42, useState as useState78 } from "react";
|
|
23957
23963
|
import { useVideoConfig as useVideoConfig5 } from "remotion";
|
|
23958
23964
|
|
|
23959
23965
|
// src/helpers/extract-frames.ts
|
|
@@ -24289,9 +24295,9 @@ var TimelineVideoInfo = ({
|
|
|
24289
24295
|
playbackRate
|
|
24290
24296
|
}) => {
|
|
24291
24297
|
const { fps } = useVideoConfig5();
|
|
24292
|
-
const ref =
|
|
24298
|
+
const ref = useRef42(null);
|
|
24293
24299
|
const [error, setError] = useState78(null);
|
|
24294
|
-
const aspectRatio =
|
|
24300
|
+
const aspectRatio = useRef42(getAspectRatioFromCache(src));
|
|
24295
24301
|
useEffect77(() => {
|
|
24296
24302
|
return () => {
|
|
24297
24303
|
clearFramesForSrc(src);
|
|
@@ -24644,7 +24650,7 @@ var container46 = {
|
|
|
24644
24650
|
var noop3 = () => {
|
|
24645
24651
|
return;
|
|
24646
24652
|
};
|
|
24647
|
-
var
|
|
24653
|
+
var TimelineInner = () => {
|
|
24648
24654
|
const { sequences } = useContext75(Internals57.SequenceManager);
|
|
24649
24655
|
const videoConfig = Internals57.useUnsafeVideoConfig();
|
|
24650
24656
|
const timeline = useMemo118(() => {
|
|
@@ -24725,6 +24731,7 @@ var Timeline = () => {
|
|
|
24725
24731
|
})
|
|
24726
24732
|
});
|
|
24727
24733
|
};
|
|
24734
|
+
var Timeline = React152.memo(TimelineInner);
|
|
24728
24735
|
|
|
24729
24736
|
// src/components/Timeline/TimelineEmptyState.tsx
|
|
24730
24737
|
import { jsx as jsx218 } from "react/jsx-runtime";
|
|
@@ -26239,7 +26246,7 @@ import {
|
|
|
26239
26246
|
useContext as useContext86,
|
|
26240
26247
|
useEffect as useEffect83,
|
|
26241
26248
|
useMemo as useMemo126,
|
|
26242
|
-
useRef as
|
|
26249
|
+
useRef as useRef44,
|
|
26243
26250
|
useState as useState84
|
|
26244
26251
|
} from "react";
|
|
26245
26252
|
import { Internals as Internals64 } from "remotion";
|
|
@@ -27112,7 +27119,7 @@ var QuickSwitcherNoResults = ({ query, mode }) => {
|
|
|
27112
27119
|
};
|
|
27113
27120
|
|
|
27114
27121
|
// src/components/QuickSwitcher/QuickSwitcherResult.tsx
|
|
27115
|
-
import { useEffect as useEffect82, useMemo as useMemo125, useRef as
|
|
27122
|
+
import { useEffect as useEffect82, useMemo as useMemo125, useRef as useRef43, useState as useState83 } from "react";
|
|
27116
27123
|
import { jsx as jsx236, jsxs as jsxs119, Fragment as Fragment35 } from "react/jsx-runtime";
|
|
27117
27124
|
var container52 = {
|
|
27118
27125
|
paddingLeft: 16,
|
|
@@ -27142,7 +27149,7 @@ var labelContainer = {
|
|
|
27142
27149
|
};
|
|
27143
27150
|
var QuickSwitcherResult = ({ result, selected }) => {
|
|
27144
27151
|
const [hovered, setIsHovered] = useState83(false);
|
|
27145
|
-
const ref =
|
|
27152
|
+
const ref = useRef43(null);
|
|
27146
27153
|
const keybindings = useKeybinding();
|
|
27147
27154
|
useEffect82(() => {
|
|
27148
27155
|
const { current } = ref;
|
|
@@ -27320,7 +27327,7 @@ var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }
|
|
|
27320
27327
|
selectedIndex: 0
|
|
27321
27328
|
});
|
|
27322
27329
|
}, [initialMode, invocationTimestamp]);
|
|
27323
|
-
const inputRef =
|
|
27330
|
+
const inputRef = useRef44(null);
|
|
27324
27331
|
const selectComposition = useSelectComposition();
|
|
27325
27332
|
const closeMenu = useCallback117(() => {
|
|
27326
27333
|
return;
|
|
@@ -28096,7 +28103,7 @@ import {
|
|
|
28096
28103
|
useEffect as useEffect86,
|
|
28097
28104
|
useMemo as useMemo137,
|
|
28098
28105
|
useReducer as useReducer2,
|
|
28099
|
-
useRef as
|
|
28106
|
+
useRef as useRef46,
|
|
28100
28107
|
useState as useState90
|
|
28101
28108
|
} from "react";
|
|
28102
28109
|
|
|
@@ -30085,12 +30092,12 @@ import { BrowserSafeApis as BrowserSafeApis7 } from "@remotion/renderer/client";
|
|
|
30085
30092
|
import { useCallback as useCallback129, useMemo as useMemo132 } from "react";
|
|
30086
30093
|
|
|
30087
30094
|
// src/helpers/use-file-existence.ts
|
|
30088
|
-
import { useContext as useContext88, useEffect as useEffect85, useRef as
|
|
30095
|
+
import { useContext as useContext88, useEffect as useEffect85, useRef as useRef45, useState as useState89 } from "react";
|
|
30089
30096
|
var useFileExistence = (outName) => {
|
|
30090
30097
|
const [exists, setExists] = useState89(false);
|
|
30091
30098
|
const { previewServerState: state, subscribeToEvent } = useContext88(StudioServerConnectionCtx);
|
|
30092
30099
|
const clientId = state.type === "connected" ? state.clientId : undefined;
|
|
30093
|
-
const currentOutName =
|
|
30100
|
+
const currentOutName = useRef45("");
|
|
30094
30101
|
currentOutName.current = outName;
|
|
30095
30102
|
useEffect85(() => {
|
|
30096
30103
|
if (!clientId) {
|
|
@@ -31480,7 +31487,7 @@ var RenderModal = ({
|
|
|
31480
31487
|
resolved: { result: resolvedComposition },
|
|
31481
31488
|
unresolved: unresolvedComposition
|
|
31482
31489
|
} = context;
|
|
31483
|
-
const isMounted =
|
|
31490
|
+
const isMounted = useRef46(true);
|
|
31484
31491
|
const [isVideo] = useState90(() => {
|
|
31485
31492
|
return typeof resolvedComposition.durationInFrames === "undefined" ? true : resolvedComposition.durationInFrames > 1;
|
|
31486
31493
|
});
|
|
@@ -32623,9 +32630,9 @@ import {
|
|
|
32623
32630
|
getEncodableAudioCodecs,
|
|
32624
32631
|
getSupportedAudioCodecsForContainer
|
|
32625
32632
|
} from "@remotion/web-renderer";
|
|
32626
|
-
import { useEffect as useEffect87, useRef as
|
|
32633
|
+
import { useEffect as useEffect87, useRef as useRef47, useState as useState91 } from "react";
|
|
32627
32634
|
var useEncodableAudioCodecs = (container63) => {
|
|
32628
|
-
const cacheRef =
|
|
32635
|
+
const cacheRef = useRef47({});
|
|
32629
32636
|
const [codecsByContainer, setCodecsByContainer] = useState91(() => {
|
|
32630
32637
|
return {
|
|
32631
32638
|
[container63]: getSupportedAudioCodecsForContainer(container63)
|
|
@@ -32665,9 +32672,9 @@ import {
|
|
|
32665
32672
|
getEncodableVideoCodecs,
|
|
32666
32673
|
getSupportedVideoCodecsForContainer
|
|
32667
32674
|
} from "@remotion/web-renderer";
|
|
32668
|
-
import { useEffect as useEffect88, useRef as
|
|
32675
|
+
import { useEffect as useEffect88, useRef as useRef48, useState as useState92 } from "react";
|
|
32669
32676
|
var useEncodableVideoCodecs = (container63) => {
|
|
32670
|
-
const cacheRef =
|
|
32677
|
+
const cacheRef = useRef48({});
|
|
32671
32678
|
const [codecsByContainer, setCodecsByContainer] = useState92(() => {
|
|
32672
32679
|
return {
|
|
32673
32680
|
[container63]: getSupportedVideoCodecsForContainer(container63)
|
|
@@ -35048,15 +35055,15 @@ var SetTimelineInOutProvider = ({ children }) => {
|
|
|
35048
35055
|
};
|
|
35049
35056
|
|
|
35050
35057
|
// src/components/ShowGuidesProvider.tsx
|
|
35051
|
-
import { useCallback as useCallback148, useMemo as useMemo151, useRef as
|
|
35058
|
+
import { useCallback as useCallback148, useMemo as useMemo151, useRef as useRef49, useState as useState102 } from "react";
|
|
35052
35059
|
import { jsx as jsx295 } from "react/jsx-runtime";
|
|
35053
35060
|
var ShowGuidesProvider = ({ children }) => {
|
|
35054
35061
|
const [guidesList, setGuidesList] = useState102(() => loadGuidesList());
|
|
35055
35062
|
const [selectedGuideId, setSelectedGuideId] = useState102(null);
|
|
35056
35063
|
const [hoveredGuideId, setHoveredGuideId] = useState102(null);
|
|
35057
35064
|
const [editorShowGuides, setEditorShowGuidesState] = useState102(() => loadEditorShowGuidesOption());
|
|
35058
|
-
const shouldCreateGuideRef =
|
|
35059
|
-
const shouldDeleteGuideRef =
|
|
35065
|
+
const shouldCreateGuideRef = useRef49(false);
|
|
35066
|
+
const shouldDeleteGuideRef = useRef49(false);
|
|
35060
35067
|
const setEditorShowGuides = useCallback148((newValue) => {
|
|
35061
35068
|
setEditorShowGuidesState((prevState) => {
|
|
35062
35069
|
const newVal = newValue(prevState);
|
package/dist/esm/renderEntry.mjs
CHANGED
|
@@ -208,7 +208,7 @@ var renderContent = (Root) => {
|
|
|
208
208
|
renderToDOM(/* @__PURE__ */ jsx("div", {
|
|
209
209
|
children: /* @__PURE__ */ jsx(DelayedSpinner, {})
|
|
210
210
|
}));
|
|
211
|
-
import("./chunk-
|
|
211
|
+
import("./chunk-5dvr7831.js").then(({ StudioInternals }) => {
|
|
212
212
|
window.remotion_isStudio = true;
|
|
213
213
|
window.remotion_isReadOnlyStudio = true;
|
|
214
214
|
window.remotion_inputProps = "{}";
|
|
@@ -4,9 +4,14 @@ exports.useBreakpoint = useBreakpoint;
|
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
function useBreakpoint(breakpoint) {
|
|
6
6
|
const [compactUI, setCompactUI] = (0, react_1.useState)(window.innerWidth < breakpoint);
|
|
7
|
+
const compactUIRef = (0, react_1.useRef)(compactUI);
|
|
7
8
|
(0, react_1.useEffect)(() => {
|
|
8
9
|
function handleResize() {
|
|
9
|
-
|
|
10
|
+
const newValue = window.innerWidth < breakpoint;
|
|
11
|
+
if (newValue !== compactUIRef.current) {
|
|
12
|
+
setCompactUI(newValue);
|
|
13
|
+
}
|
|
14
|
+
compactUIRef.current = newValue;
|
|
10
15
|
}
|
|
11
16
|
window.addEventListener('resize', handleResize);
|
|
12
17
|
handleResize();
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/studio"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/studio",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.437",
|
|
7
7
|
"description": "APIs for interacting with the Remotion Studio",
|
|
8
8
|
"main": "dist",
|
|
9
9
|
"sideEffects": false,
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"semver": "7.5.3",
|
|
29
|
-
"remotion": "4.0.
|
|
30
|
-
"@remotion/player": "4.0.
|
|
31
|
-
"@remotion/media-utils": "4.0.
|
|
32
|
-
"@remotion/renderer": "4.0.
|
|
33
|
-
"@remotion/web-renderer": "4.0.
|
|
34
|
-
"@remotion/studio-shared": "4.0.
|
|
35
|
-
"@remotion/zod-types": "4.0.
|
|
36
|
-
"mediabunny": "1.
|
|
29
|
+
"remotion": "4.0.437",
|
|
30
|
+
"@remotion/player": "4.0.437",
|
|
31
|
+
"@remotion/media-utils": "4.0.437",
|
|
32
|
+
"@remotion/renderer": "4.0.437",
|
|
33
|
+
"@remotion/web-renderer": "4.0.437",
|
|
34
|
+
"@remotion/studio-shared": "4.0.437",
|
|
35
|
+
"@remotion/zod-types": "4.0.437",
|
|
36
|
+
"mediabunny": "1.39.2",
|
|
37
37
|
"memfs": "3.4.3",
|
|
38
38
|
"source-map": "0.7.3",
|
|
39
39
|
"open": "^8.4.2",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"react": "19.2.3",
|
|
44
44
|
"react-dom": "19.2.3",
|
|
45
45
|
"@types/semver": "^7.3.4",
|
|
46
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
46
|
+
"@remotion/eslint-config-internal": "4.0.437",
|
|
47
47
|
"eslint": "9.19.0",
|
|
48
48
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
49
49
|
},
|