@remotion/studio 4.0.464 → 4.0.465
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/NewComposition/CodemodFooter.d.ts +1 -0
- package/dist/components/NewComposition/CodemodFooter.js +35 -23
- package/dist/components/NewComposition/DeleteComposition.js +3 -1
- package/dist/components/NewComposition/DiffPreview.js +1 -1
- package/dist/components/NewComposition/DuplicateComposition.js +3 -1
- package/dist/components/NewComposition/RenameComposition.js +4 -2
- package/dist/components/RenderQueue/actions.d.ts +2 -1
- package/dist/components/RenderQueue/actions.js +2 -1
- package/dist/components/Timeline/TimelineEffectGroupRow.js +53 -1
- package/dist/components/Timeline/TimelineTimeIndicators.js +4 -11
- package/dist/components/Timeline/TimelineVideoInfo.js +25 -8
- package/dist/components/Timeline/get-timeline-video-info-widths.d.ts +9 -0
- package/dist/components/Timeline/get-timeline-video-info-widths.js +11 -0
- package/dist/components/Timeline/use-resolved-stack.d.ts +1 -0
- package/dist/components/Timeline/use-resolved-stack.js +10 -1
- package/dist/esm/{chunk-mawnnpzg.js → chunk-pqk2qd0d.js} +294 -172
- package/dist/esm/internals.mjs +294 -172
- package/dist/esm/previewEntry.mjs +294 -172
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/resolved-stack-to-symbolicated.d.ts +3 -0
- package/dist/helpers/resolved-stack-to-symbolicated.js +16 -0
- package/package.json +10 -10
|
@@ -10,7 +10,7 @@ import { Internals as Internals79 } from "remotion";
|
|
|
10
10
|
|
|
11
11
|
// src/components/Editor.tsx
|
|
12
12
|
import { PlayerInternals as PlayerInternals20 } from "@remotion/player";
|
|
13
|
-
import React201, { useCallback as useCallback159, useMemo as
|
|
13
|
+
import React201, { useCallback as useCallback159, useMemo as useMemo167, useState as useState99 } from "react";
|
|
14
14
|
import { Internals as Internals74 } from "remotion";
|
|
15
15
|
|
|
16
16
|
// src/helpers/colors.ts
|
|
@@ -2512,11 +2512,13 @@ var openInFileExplorer = ({ directory }) => {
|
|
|
2512
2512
|
var applyCodemod = ({
|
|
2513
2513
|
codemod,
|
|
2514
2514
|
dryRun,
|
|
2515
|
+
symbolicatedStack,
|
|
2515
2516
|
signal
|
|
2516
2517
|
}) => {
|
|
2517
2518
|
const body = {
|
|
2518
2519
|
codemod,
|
|
2519
|
-
dryRun
|
|
2520
|
+
dryRun,
|
|
2521
|
+
symbolicatedStack
|
|
2520
2522
|
};
|
|
2521
2523
|
return callApi("/api/apply-codemod", body, signal);
|
|
2522
2524
|
};
|
|
@@ -2533,9 +2535,6 @@ var cancelRenderJob = (job) => {
|
|
|
2533
2535
|
var updateAvailable = (signal) => {
|
|
2534
2536
|
return callApi("/api/update-available", {}, signal);
|
|
2535
2537
|
};
|
|
2536
|
-
var getProjectInfo = (signal) => {
|
|
2537
|
-
return callApi("/api/project-info", {}, signal);
|
|
2538
|
-
};
|
|
2539
2538
|
var callUpdateDefaultPropsApi = (compositionId, defaultProps, enumPaths) => {
|
|
2540
2539
|
return callApi("/api/update-default-props", {
|
|
2541
2540
|
compositionId,
|
|
@@ -9924,6 +9923,12 @@ var getOriginalLocationFromStack = async (stack2, type) => {
|
|
|
9924
9923
|
|
|
9925
9924
|
// src/components/Timeline/use-resolved-stack.ts
|
|
9926
9925
|
var resolvedCache = new Map;
|
|
9926
|
+
var hasResolvedStack = (stack2) => {
|
|
9927
|
+
if (!stack2) {
|
|
9928
|
+
return true;
|
|
9929
|
+
}
|
|
9930
|
+
return resolvedCache.has(stack2);
|
|
9931
|
+
};
|
|
9927
9932
|
var inFlight = new Set;
|
|
9928
9933
|
var subscribers = new Map;
|
|
9929
9934
|
var useResolvedStack = (stack2) => {
|
|
@@ -9955,6 +9960,8 @@ var useResolvedStack = (stack2) => {
|
|
|
9955
9960
|
subs.forEach((fn) => fn(frame2));
|
|
9956
9961
|
}).catch((err) => {
|
|
9957
9962
|
console.error("Could not get original location of Sequence", err);
|
|
9963
|
+
resolvedCache.set(stack2, null);
|
|
9964
|
+
subs.forEach((fn) => fn(null));
|
|
9958
9965
|
}).finally(() => {
|
|
9959
9966
|
inFlight.delete(stack2);
|
|
9960
9967
|
});
|
|
@@ -22729,7 +22736,7 @@ var TimeValue = () => {
|
|
|
22729
22736
|
import { jsx as jsx202 } from "react/jsx-runtime";
|
|
22730
22737
|
var TIMELINE_TIME_INDICATOR_HEIGHT = 39;
|
|
22731
22738
|
var container39 = {
|
|
22732
|
-
height: TIMELINE_TIME_INDICATOR_HEIGHT
|
|
22739
|
+
height: TIMELINE_TIME_INDICATOR_HEIGHT,
|
|
22733
22740
|
boxShadow: `0 0 4px ${TIMELINE_BACKGROUND}`,
|
|
22734
22741
|
position: "absolute",
|
|
22735
22742
|
backgroundColor: TIMELINE_BACKGROUND,
|
|
@@ -22815,9 +22822,8 @@ var TimelineTimeIndicatorsInner = ({ windowWidth, durationInFrames, fps }) => {
|
|
|
22815
22822
|
const style10 = useMemo115(() => {
|
|
22816
22823
|
return {
|
|
22817
22824
|
...container39,
|
|
22818
|
-
width: windowWidth
|
|
22825
|
+
width: windowWidth,
|
|
22819
22826
|
overflow: "hidden",
|
|
22820
|
-
marginLeft: SPLITTER_HANDLE_SIZE / 2,
|
|
22821
22827
|
pointerEvents: "none"
|
|
22822
22828
|
};
|
|
22823
22829
|
}, [windowWidth]);
|
|
@@ -22834,7 +22840,7 @@ var TimelineTimeIndicatorsInner = ({ windowWidth, durationInFrames, fps }) => {
|
|
|
22834
22840
|
frame: index * fps,
|
|
22835
22841
|
style: {
|
|
22836
22842
|
...secondTick,
|
|
22837
|
-
left: frameInterval * index * fps + TIMELINE_PADDING
|
|
22843
|
+
left: frameInterval * index * fps + TIMELINE_PADDING
|
|
22838
22844
|
},
|
|
22839
22845
|
showTime: index > 0
|
|
22840
22846
|
};
|
|
@@ -22844,7 +22850,7 @@ var TimelineTimeIndicatorsInner = ({ windowWidth, durationInFrames, fps }) => {
|
|
|
22844
22850
|
frame: index,
|
|
22845
22851
|
style: {
|
|
22846
22852
|
...tick,
|
|
22847
|
-
left: frameInterval * index + TIMELINE_PADDING
|
|
22853
|
+
left: frameInterval * index + TIMELINE_PADDING,
|
|
22848
22854
|
height: index % fps === 0 ? 10 : index / frameMarkerEveryNth % 2 === 0 ? 5 : 2
|
|
22849
22855
|
},
|
|
22850
22856
|
showTime: false
|
|
@@ -24065,6 +24071,50 @@ var TimelineEffectGroupRow = ({
|
|
|
24065
24071
|
return false;
|
|
24066
24072
|
}, [disabledStatus]);
|
|
24067
24073
|
const canToggle = previewConnected && disabledStatus !== null && disabledStatus.canUpdate;
|
|
24074
|
+
const deleteDisabled = !previewConnected || effectStatus.type !== "can-update-effect" || !validatedLocation.source;
|
|
24075
|
+
const onDeleteEffectFromSource = useCallback117(async () => {
|
|
24076
|
+
if (deleteDisabled) {
|
|
24077
|
+
return;
|
|
24078
|
+
}
|
|
24079
|
+
try {
|
|
24080
|
+
const result = await callApi("/api/delete-effect", {
|
|
24081
|
+
fileName: validatedLocation.source,
|
|
24082
|
+
sequenceNodePath: nodePath,
|
|
24083
|
+
effectIndex
|
|
24084
|
+
});
|
|
24085
|
+
if (result.success) {
|
|
24086
|
+
showNotification("Removed effect from source file", 2000);
|
|
24087
|
+
} else {
|
|
24088
|
+
showNotification(result.reason, 4000);
|
|
24089
|
+
}
|
|
24090
|
+
} catch (err) {
|
|
24091
|
+
showNotification(err.message, 4000);
|
|
24092
|
+
}
|
|
24093
|
+
}, [deleteDisabled, effectIndex, nodePath, validatedLocation.source]);
|
|
24094
|
+
const contextMenuValues = useMemo127(() => {
|
|
24095
|
+
if (!previewConnected) {
|
|
24096
|
+
return [];
|
|
24097
|
+
}
|
|
24098
|
+
return [
|
|
24099
|
+
{
|
|
24100
|
+
type: "item",
|
|
24101
|
+
id: "delete-effect",
|
|
24102
|
+
keyHint: null,
|
|
24103
|
+
label: "Delete",
|
|
24104
|
+
leftItem: null,
|
|
24105
|
+
disabled: deleteDisabled,
|
|
24106
|
+
onClick: () => {
|
|
24107
|
+
if (deleteDisabled) {
|
|
24108
|
+
return;
|
|
24109
|
+
}
|
|
24110
|
+
onDeleteEffectFromSource();
|
|
24111
|
+
},
|
|
24112
|
+
quickSwitcherLabel: null,
|
|
24113
|
+
subMenu: null,
|
|
24114
|
+
value: "delete-effect"
|
|
24115
|
+
}
|
|
24116
|
+
];
|
|
24117
|
+
}, [deleteDisabled, onDeleteEffectFromSource, previewConnected]);
|
|
24068
24118
|
const onToggle = useCallback117((type) => {
|
|
24069
24119
|
if (!canToggle || previewServerState.type !== "connected") {
|
|
24070
24120
|
return;
|
|
@@ -24097,7 +24147,7 @@ var TimelineEffectGroupRow = ({
|
|
|
24097
24147
|
height: TREE_GROUP_ROW_HEIGHT,
|
|
24098
24148
|
paddingRight: EXPANDED_SECTION_PADDING_RIGHT
|
|
24099
24149
|
}), []);
|
|
24100
|
-
|
|
24150
|
+
const row7 = /* @__PURE__ */ jsx216(TimelineRowChrome, {
|
|
24101
24151
|
depth: rowDepth,
|
|
24102
24152
|
eye: canToggle ? /* @__PURE__ */ jsx216(TimelineLayerEye, {
|
|
24103
24153
|
type: "effect",
|
|
@@ -24116,6 +24166,10 @@ var TimelineEffectGroupRow = ({
|
|
|
24116
24166
|
children: label8
|
|
24117
24167
|
})
|
|
24118
24168
|
});
|
|
24169
|
+
return previewConnected ? /* @__PURE__ */ jsx216(ContextMenu, {
|
|
24170
|
+
values: contextMenuValues,
|
|
24171
|
+
children: row7
|
|
24172
|
+
}) : row7;
|
|
24119
24173
|
};
|
|
24120
24174
|
|
|
24121
24175
|
// src/components/Timeline/TimelineFieldRow.tsx
|
|
@@ -25708,6 +25762,22 @@ import {
|
|
|
25708
25762
|
} from "@remotion/timeline-utils";
|
|
25709
25763
|
import { useEffect as useEffect76, useMemo as useMemo134, useRef as useRef50, useState as useState79 } from "react";
|
|
25710
25764
|
import { useVideoConfig as useVideoConfig5 } from "remotion";
|
|
25765
|
+
|
|
25766
|
+
// src/components/Timeline/get-timeline-video-info-widths.ts
|
|
25767
|
+
var getTimelineVideoInfoWidths = ({
|
|
25768
|
+
visualizationWidth,
|
|
25769
|
+
naturalWidth,
|
|
25770
|
+
premountWidth,
|
|
25771
|
+
postmountWidth
|
|
25772
|
+
}) => {
|
|
25773
|
+
const mountWidth = premountWidth + postmountWidth;
|
|
25774
|
+
return {
|
|
25775
|
+
mediaVisualizationWidth: Math.max(0, visualizationWidth - mountWidth),
|
|
25776
|
+
mediaNaturalWidth: Math.max(0, naturalWidth - mountWidth)
|
|
25777
|
+
};
|
|
25778
|
+
};
|
|
25779
|
+
|
|
25780
|
+
// src/components/Timeline/TimelineVideoInfo.tsx
|
|
25711
25781
|
import { jsx as jsx229, jsxs as jsxs109 } from "react/jsx-runtime";
|
|
25712
25782
|
var FILMSTRIP_HEIGHT = TIMELINE_LAYER_HEIGHT_IMAGE - 2;
|
|
25713
25783
|
var outerStyle = {
|
|
@@ -25718,7 +25788,6 @@ var outerStyle = {
|
|
|
25718
25788
|
};
|
|
25719
25789
|
var filmstripContainerStyle = {
|
|
25720
25790
|
height: FILMSTRIP_HEIGHT,
|
|
25721
|
-
width: "100%",
|
|
25722
25791
|
backgroundColor: "rgba(0, 0, 0, 0.3)",
|
|
25723
25792
|
display: "flex",
|
|
25724
25793
|
borderTopLeftRadius: 2,
|
|
@@ -25742,6 +25811,14 @@ var TimelineVideoInfo = ({
|
|
|
25742
25811
|
const ref2 = useRef50(null);
|
|
25743
25812
|
const [error, setError] = useState79(null);
|
|
25744
25813
|
const aspectRatio = useRef50(getAspectRatioFromCache(src));
|
|
25814
|
+
const { mediaVisualizationWidth, mediaNaturalWidth } = useMemo134(() => {
|
|
25815
|
+
return getTimelineVideoInfoWidths({
|
|
25816
|
+
visualizationWidth,
|
|
25817
|
+
naturalWidth,
|
|
25818
|
+
premountWidth,
|
|
25819
|
+
postmountWidth
|
|
25820
|
+
});
|
|
25821
|
+
}, [naturalWidth, postmountWidth, premountWidth, visualizationWidth]);
|
|
25745
25822
|
useEffect76(() => {
|
|
25746
25823
|
if (error) {
|
|
25747
25824
|
return;
|
|
@@ -25752,7 +25829,7 @@ var TimelineVideoInfo = ({
|
|
|
25752
25829
|
}
|
|
25753
25830
|
const controller = new AbortController;
|
|
25754
25831
|
const canvas = document.createElement("canvas");
|
|
25755
|
-
canvas.width =
|
|
25832
|
+
canvas.width = mediaVisualizationWidth;
|
|
25756
25833
|
canvas.height = FILMSTRIP_HEIGHT;
|
|
25757
25834
|
const ctx = canvas.getContext("2d");
|
|
25758
25835
|
if (!ctx) {
|
|
@@ -25760,7 +25837,7 @@ var TimelineVideoInfo = ({
|
|
|
25760
25837
|
}
|
|
25761
25838
|
current.appendChild(canvas);
|
|
25762
25839
|
const loopWidth = getLoopDisplayWidth2({
|
|
25763
|
-
visualizationWidth:
|
|
25840
|
+
visualizationWidth: mediaNaturalWidth,
|
|
25764
25841
|
loopDisplay
|
|
25765
25842
|
});
|
|
25766
25843
|
const shouldRepeatVideo = shouldTileLoopDisplay2(loopDisplay);
|
|
@@ -25789,7 +25866,7 @@ var TimelineVideoInfo = ({
|
|
|
25789
25866
|
const fromSeconds = trimBefore / fps;
|
|
25790
25867
|
const visibleDurationInFrames = shouldRepeatVideo && loopDisplay ? loopDisplay.durationInFrames : durationInFrames;
|
|
25791
25868
|
const toSeconds = fromSeconds + visibleDurationInFrames * playbackRate / fps;
|
|
25792
|
-
const targetWidth = shouldRepeatVideo ? targetCanvas.width :
|
|
25869
|
+
const targetWidth = shouldRepeatVideo ? targetCanvas.width : mediaNaturalWidth;
|
|
25793
25870
|
if (aspectRatio.current !== null) {
|
|
25794
25871
|
ensureSlots({
|
|
25795
25872
|
filledSlots,
|
|
@@ -25908,13 +25985,20 @@ var TimelineVideoInfo = ({
|
|
|
25908
25985
|
error,
|
|
25909
25986
|
fps,
|
|
25910
25987
|
loopDisplay,
|
|
25911
|
-
|
|
25988
|
+
mediaNaturalWidth,
|
|
25989
|
+
mediaVisualizationWidth,
|
|
25912
25990
|
playbackRate,
|
|
25913
25991
|
src,
|
|
25914
|
-
trimBefore
|
|
25915
|
-
visualizationWidth
|
|
25992
|
+
trimBefore
|
|
25916
25993
|
]);
|
|
25917
|
-
const audioWidth =
|
|
25994
|
+
const audioWidth = mediaVisualizationWidth;
|
|
25995
|
+
const filmstripStyle = useMemo134(() => {
|
|
25996
|
+
return {
|
|
25997
|
+
...filmstripContainerStyle,
|
|
25998
|
+
width: mediaVisualizationWidth,
|
|
25999
|
+
marginLeft: premountWidth
|
|
26000
|
+
};
|
|
26001
|
+
}, [mediaVisualizationWidth, premountWidth]);
|
|
25918
26002
|
const audioStyle = useMemo134(() => {
|
|
25919
26003
|
return {
|
|
25920
26004
|
height: TIMELINE_LAYER_HEIGHT_AUDIO,
|
|
@@ -25928,7 +26012,7 @@ var TimelineVideoInfo = ({
|
|
|
25928
26012
|
children: [
|
|
25929
26013
|
/* @__PURE__ */ jsx229("div", {
|
|
25930
26014
|
ref: ref2,
|
|
25931
|
-
style:
|
|
26015
|
+
style: filmstripStyle
|
|
25932
26016
|
}),
|
|
25933
26017
|
/* @__PURE__ */ jsx229("div", {
|
|
25934
26018
|
style: audioStyle,
|
|
@@ -26762,7 +26846,7 @@ var InstallPackageModal = ({ packageManager }) => {
|
|
|
26762
26846
|
};
|
|
26763
26847
|
|
|
26764
26848
|
// src/components/NewComposition/DeleteComposition.tsx
|
|
26765
|
-
import { useCallback as useCallback125, useContext as useContext92, useMemo as
|
|
26849
|
+
import { useCallback as useCallback125, useContext as useContext92, useMemo as useMemo141 } from "react";
|
|
26766
26850
|
|
|
26767
26851
|
// src/components/RenderModal/ResolveCompositionBeforeModal.tsx
|
|
26768
26852
|
import React169, { useContext as useContext90, useEffect as useEffect79, useMemo as useMemo139 } from "react";
|
|
@@ -26847,7 +26931,27 @@ var ResolveCompositionBeforeModal = ({ compositionId, children }) => {
|
|
|
26847
26931
|
};
|
|
26848
26932
|
|
|
26849
26933
|
// src/components/NewComposition/CodemodFooter.tsx
|
|
26850
|
-
import {
|
|
26934
|
+
import {
|
|
26935
|
+
useCallback as useCallback124,
|
|
26936
|
+
useContext as useContext91,
|
|
26937
|
+
useEffect as useEffect80,
|
|
26938
|
+
useMemo as useMemo140,
|
|
26939
|
+
useState as useState80
|
|
26940
|
+
} from "react";
|
|
26941
|
+
|
|
26942
|
+
// src/helpers/resolved-stack-to-symbolicated.ts
|
|
26943
|
+
var resolvedStackToSymbolicated = (location2) => {
|
|
26944
|
+
if (!location2?.source) {
|
|
26945
|
+
return null;
|
|
26946
|
+
}
|
|
26947
|
+
return {
|
|
26948
|
+
originalFileName: location2.source,
|
|
26949
|
+
originalLineNumber: location2.line,
|
|
26950
|
+
originalColumnNumber: location2.column,
|
|
26951
|
+
originalFunctionName: null,
|
|
26952
|
+
originalScriptCode: null
|
|
26953
|
+
};
|
|
26954
|
+
};
|
|
26851
26955
|
|
|
26852
26956
|
// src/components/NewComposition/DiffPreview.tsx
|
|
26853
26957
|
import { jsx as jsx241, jsxs as jsxs117 } from "react/jsx-runtime";
|
|
@@ -26866,7 +26970,7 @@ var CodemodDiffPreview = ({ status }) => {
|
|
|
26866
26970
|
children: [
|
|
26867
26971
|
/* @__PURE__ */ jsx241("span", {
|
|
26868
26972
|
style: { color: LIGHT_TEXT, fontSize: 13, lineHeight: 1.2 },
|
|
26869
|
-
children: "This will edit your
|
|
26973
|
+
children: "This will edit your codebase."
|
|
26870
26974
|
}),
|
|
26871
26975
|
/* @__PURE__ */ jsx241("br", {}),
|
|
26872
26976
|
/* @__PURE__ */ jsxs117("span", {
|
|
@@ -26899,6 +27003,7 @@ var CodemodDiffPreview = ({ status }) => {
|
|
|
26899
27003
|
import { jsx as jsx242, jsxs as jsxs118 } from "react/jsx-runtime";
|
|
26900
27004
|
var CodemodFooter = ({
|
|
26901
27005
|
codemod,
|
|
27006
|
+
stack: stack2,
|
|
26902
27007
|
valid,
|
|
26903
27008
|
loadingNotification,
|
|
26904
27009
|
successNotification,
|
|
@@ -26912,18 +27017,9 @@ var CodemodFooter = ({
|
|
|
26912
27017
|
const [codemodStatus, setCanApplyCodemod] = useState80({
|
|
26913
27018
|
type: "loading"
|
|
26914
27019
|
});
|
|
26915
|
-
const
|
|
26916
|
-
|
|
26917
|
-
|
|
26918
|
-
getProjectInfo(controller.signal).then((info) => {
|
|
26919
|
-
setProjectInfo(info.projectInfo);
|
|
26920
|
-
}).catch((err) => {
|
|
26921
|
-
showNotification(`Could not get project info: ${err.message}. Unable to duplicate composition`, 3000);
|
|
26922
|
-
});
|
|
26923
|
-
return () => {
|
|
26924
|
-
controller.abort();
|
|
26925
|
-
};
|
|
26926
|
-
}, []);
|
|
27020
|
+
const resolvedLocation = useResolvedStack(stack2);
|
|
27021
|
+
const symbolicatedStack = useMemo140(() => resolvedStackToSymbolicated(resolvedLocation), [resolvedLocation]);
|
|
27022
|
+
const relativeFilePath = symbolicatedStack?.originalFileName ?? null;
|
|
26927
27023
|
const trigger = useCallback124(() => {
|
|
26928
27024
|
setSubmitting(true);
|
|
26929
27025
|
setSelectedModal(null);
|
|
@@ -26931,6 +27027,7 @@ var CodemodFooter = ({
|
|
|
26931
27027
|
applyCodemod({
|
|
26932
27028
|
codemod,
|
|
26933
27029
|
dryRun: false,
|
|
27030
|
+
symbolicatedStack,
|
|
26934
27031
|
signal: new AbortController().signal
|
|
26935
27032
|
}).then(() => {
|
|
26936
27033
|
notification2.replaceContent(successNotification, 2000);
|
|
@@ -26944,12 +27041,14 @@ var CodemodFooter = ({
|
|
|
26944
27041
|
loadingNotification,
|
|
26945
27042
|
onSuccess,
|
|
26946
27043
|
setSelectedModal,
|
|
26947
|
-
successNotification
|
|
27044
|
+
successNotification,
|
|
27045
|
+
symbolicatedStack
|
|
26948
27046
|
]);
|
|
26949
27047
|
const getCanApplyCodemod = useCallback124(async (signal) => {
|
|
26950
27048
|
const res = await applyCodemod({
|
|
26951
27049
|
codemod,
|
|
26952
27050
|
dryRun: true,
|
|
27051
|
+
symbolicatedStack,
|
|
26953
27052
|
signal
|
|
26954
27053
|
});
|
|
26955
27054
|
if (res.success) {
|
|
@@ -26960,8 +27059,25 @@ var CodemodFooter = ({
|
|
|
26960
27059
|
error: res.reason
|
|
26961
27060
|
});
|
|
26962
27061
|
}
|
|
26963
|
-
}, [codemod]);
|
|
27062
|
+
}, [codemod, symbolicatedStack]);
|
|
26964
27063
|
useEffect80(() => {
|
|
27064
|
+
if (!stack2) {
|
|
27065
|
+
setCanApplyCodemod({
|
|
27066
|
+
type: "fail",
|
|
27067
|
+
error: "Could not determine where this composition is defined"
|
|
27068
|
+
});
|
|
27069
|
+
return;
|
|
27070
|
+
}
|
|
27071
|
+
if (!hasResolvedStack(stack2)) {
|
|
27072
|
+
return;
|
|
27073
|
+
}
|
|
27074
|
+
if (!symbolicatedStack) {
|
|
27075
|
+
setCanApplyCodemod({
|
|
27076
|
+
type: "fail",
|
|
27077
|
+
error: "Could not resolve the source location of this composition"
|
|
27078
|
+
});
|
|
27079
|
+
return;
|
|
27080
|
+
}
|
|
26965
27081
|
const abortController = new AbortController;
|
|
26966
27082
|
let aborted = false;
|
|
26967
27083
|
getCanApplyCodemod(abortController.signal).then(() => {
|
|
@@ -26970,14 +27086,14 @@ var CodemodFooter = ({
|
|
|
26970
27086
|
if (aborted) {
|
|
26971
27087
|
return;
|
|
26972
27088
|
}
|
|
26973
|
-
showNotification(
|
|
27089
|
+
showNotification(`${errorNotification}: ${err.message}`, 3000);
|
|
26974
27090
|
});
|
|
26975
27091
|
return () => {
|
|
26976
27092
|
aborted = true;
|
|
26977
27093
|
abortController.abort();
|
|
26978
27094
|
};
|
|
26979
|
-
}, [getCanApplyCodemod]);
|
|
26980
|
-
const disabled = !valid || submitting ||
|
|
27095
|
+
}, [errorNotification, getCanApplyCodemod, stack2, symbolicatedStack]);
|
|
27096
|
+
const disabled = !valid || submitting || symbolicatedStack === null || codemodStatus.type !== "success";
|
|
26981
27097
|
const { registerKeybinding } = useKeybinding();
|
|
26982
27098
|
useEffect80(() => {
|
|
26983
27099
|
if (disabled) {
|
|
@@ -26987,7 +27103,7 @@ var CodemodFooter = ({
|
|
|
26987
27103
|
callback() {
|
|
26988
27104
|
trigger();
|
|
26989
27105
|
},
|
|
26990
|
-
commandCtrlKey:
|
|
27106
|
+
commandCtrlKey: false,
|
|
26991
27107
|
key: "Enter",
|
|
26992
27108
|
event: "keydown",
|
|
26993
27109
|
preventDefault: true,
|
|
@@ -27013,10 +27129,10 @@ var CodemodFooter = ({
|
|
|
27013
27129
|
onClick: trigger,
|
|
27014
27130
|
disabled,
|
|
27015
27131
|
children: [
|
|
27016
|
-
|
|
27132
|
+
relativeFilePath ? submitLabel({ relativeRootPath: relativeFilePath }) : genericSubmitLabel,
|
|
27017
27133
|
/* @__PURE__ */ jsx242(ShortcutHint, {
|
|
27018
27134
|
keyToPress: "↵",
|
|
27019
|
-
cmdOrCtrl:
|
|
27135
|
+
cmdOrCtrl: false
|
|
27020
27136
|
})
|
|
27021
27137
|
]
|
|
27022
27138
|
})
|
|
@@ -27038,7 +27154,8 @@ var DeleteCompositionLoaded = ({ compositionId }) => {
|
|
|
27038
27154
|
throw new Error("Resolved composition context");
|
|
27039
27155
|
}
|
|
27040
27156
|
const { unresolved } = context;
|
|
27041
|
-
const
|
|
27157
|
+
const compositionStack = unresolved.stack ?? null;
|
|
27158
|
+
const codemod = useMemo141(() => {
|
|
27042
27159
|
return {
|
|
27043
27160
|
type: "delete-composition",
|
|
27044
27161
|
idToDelete: compositionId
|
|
@@ -27087,6 +27204,7 @@ var DeleteCompositionLoaded = ({ compositionId }) => {
|
|
|
27087
27204
|
genericSubmitLabel: `Delete`,
|
|
27088
27205
|
submitLabel: ({ relativeRootPath }) => `Delete from ${relativeRootPath}`,
|
|
27089
27206
|
codemod,
|
|
27207
|
+
stack: compositionStack,
|
|
27090
27208
|
valid: true,
|
|
27091
27209
|
onSuccess: null
|
|
27092
27210
|
})
|
|
@@ -27108,7 +27226,7 @@ var DeleteComposition = ({ compositionId }) => {
|
|
|
27108
27226
|
};
|
|
27109
27227
|
|
|
27110
27228
|
// src/components/NewComposition/DuplicateComposition.tsx
|
|
27111
|
-
import { useCallback as useCallback127, useContext as useContext93, useMemo as
|
|
27229
|
+
import { useCallback as useCallback127, useContext as useContext93, useMemo as useMemo142, useState as useState81 } from "react";
|
|
27112
27230
|
import { Internals as Internals69 } from "remotion";
|
|
27113
27231
|
|
|
27114
27232
|
// src/helpers/validate-new-comp-data.ts
|
|
@@ -27219,6 +27337,7 @@ var DuplicateCompositionLoaded = ({ initialType }) => {
|
|
|
27219
27337
|
throw new Error("Resolved composition context");
|
|
27220
27338
|
}
|
|
27221
27339
|
const { resolved, unresolved } = context;
|
|
27340
|
+
const compositionStack = unresolved.stack ?? null;
|
|
27222
27341
|
const [initialCompType] = useState81(initialType);
|
|
27223
27342
|
const hadDimensionsDefined = unresolved.width && unresolved.height;
|
|
27224
27343
|
const hadFpsDefined = unresolved.fps !== undefined;
|
|
@@ -27299,7 +27418,7 @@ var DuplicateCompositionLoaded = ({ initialType }) => {
|
|
|
27299
27418
|
const compNameErrMessage = validateCompositionName(newId, compositions);
|
|
27300
27419
|
const compWidthErrMessage = validateCompositionDimension("Width", size3.width);
|
|
27301
27420
|
const compHeightErrMessage = validateCompositionDimension("Height", size3.height);
|
|
27302
|
-
const typeValues =
|
|
27421
|
+
const typeValues = useMemo142(() => {
|
|
27303
27422
|
return [
|
|
27304
27423
|
{
|
|
27305
27424
|
id: "composition",
|
|
@@ -27326,7 +27445,7 @@ var DuplicateCompositionLoaded = ({ initialType }) => {
|
|
|
27326
27445
|
];
|
|
27327
27446
|
}, [onTypeChanged]);
|
|
27328
27447
|
const valid = compNameErrMessage === null && compWidthErrMessage === null && compHeightErrMessage === null;
|
|
27329
|
-
const codemod =
|
|
27448
|
+
const codemod = useMemo142(() => {
|
|
27330
27449
|
return {
|
|
27331
27450
|
type: "duplicate-composition",
|
|
27332
27451
|
idToDuplicate: resolved.result.id,
|
|
@@ -27550,6 +27669,7 @@ var DuplicateCompositionLoaded = ({ initialType }) => {
|
|
|
27550
27669
|
genericSubmitLabel: "Duplicate",
|
|
27551
27670
|
submitLabel: ({ relativeRootPath }) => `Add to ${relativeRootPath}`,
|
|
27552
27671
|
codemod,
|
|
27672
|
+
stack: compositionStack,
|
|
27553
27673
|
valid,
|
|
27554
27674
|
onSuccess: onDuplicateSuccess
|
|
27555
27675
|
})
|
|
@@ -27571,7 +27691,7 @@ var DuplicateComposition = ({ compositionId, compositionType }) => {
|
|
|
27571
27691
|
};
|
|
27572
27692
|
|
|
27573
27693
|
// src/components/NewComposition/RenameComposition.tsx
|
|
27574
|
-
import { useCallback as useCallback128, useContext as useContext94, useMemo as
|
|
27694
|
+
import { useCallback as useCallback128, useContext as useContext94, useMemo as useMemo143, useState as useState82 } from "react";
|
|
27575
27695
|
import { Internals as Internals70 } from "remotion";
|
|
27576
27696
|
import { jsx as jsx246, jsxs as jsxs122, Fragment as Fragment37 } from "react/jsx-runtime";
|
|
27577
27697
|
var content5 = {
|
|
@@ -27586,7 +27706,8 @@ var RenameCompositionLoaded = () => {
|
|
|
27586
27706
|
if (!context) {
|
|
27587
27707
|
throw new Error("Resolved composition context");
|
|
27588
27708
|
}
|
|
27589
|
-
const { resolved } = context;
|
|
27709
|
+
const { resolved, unresolved } = context;
|
|
27710
|
+
const compositionStack = unresolved.stack ?? null;
|
|
27590
27711
|
const { compositions } = useContext94(Internals70.CompositionManager);
|
|
27591
27712
|
const [newId, setName] = useState82(() => {
|
|
27592
27713
|
return resolved.result.id;
|
|
@@ -27596,7 +27717,7 @@ var RenameCompositionLoaded = () => {
|
|
|
27596
27717
|
}, []);
|
|
27597
27718
|
const compNameErrMessage = newId === resolved.result.id ? null : validateCompositionName(newId, compositions);
|
|
27598
27719
|
const valid = compNameErrMessage === null && resolved.result.id !== newId;
|
|
27599
|
-
const codemod =
|
|
27720
|
+
const codemod = useMemo143(() => {
|
|
27600
27721
|
return {
|
|
27601
27722
|
type: "rename-composition",
|
|
27602
27723
|
idToRename: resolved.result.id,
|
|
@@ -27663,6 +27784,7 @@ var RenameCompositionLoaded = () => {
|
|
|
27663
27784
|
genericSubmitLabel: "Rename",
|
|
27664
27785
|
submitLabel: ({ relativeRootPath }) => `Modify ${relativeRootPath}`,
|
|
27665
27786
|
codemod,
|
|
27787
|
+
stack: compositionStack,
|
|
27666
27788
|
valid,
|
|
27667
27789
|
onSuccess: null
|
|
27668
27790
|
})
|
|
@@ -27682,7 +27804,7 @@ var RenameComposition = ({ compositionId }) => {
|
|
|
27682
27804
|
};
|
|
27683
27805
|
|
|
27684
27806
|
// src/components/OverrideInputProps.tsx
|
|
27685
|
-
import { useCallback as useCallback129, useContext as useContext95, useMemo as
|
|
27807
|
+
import { useCallback as useCallback129, useContext as useContext95, useMemo as useMemo144, useState as useState83 } from "react";
|
|
27686
27808
|
import { Internals as Internals71 } from "remotion";
|
|
27687
27809
|
import { jsx as jsx247, jsxs as jsxs123 } from "react/jsx-runtime";
|
|
27688
27810
|
var style10 = {
|
|
@@ -27726,7 +27848,7 @@ var Inner = () => {
|
|
|
27726
27848
|
return null;
|
|
27727
27849
|
});
|
|
27728
27850
|
const { setSelectedModal } = useContext95(ModalsContext);
|
|
27729
|
-
const valid =
|
|
27851
|
+
const valid = useMemo144(() => {
|
|
27730
27852
|
if (!value)
|
|
27731
27853
|
return true;
|
|
27732
27854
|
return isValidJSON(value);
|
|
@@ -27808,7 +27930,7 @@ import {
|
|
|
27808
27930
|
useCallback as useCallback130,
|
|
27809
27931
|
useContext as useContext96,
|
|
27810
27932
|
useEffect as useEffect82,
|
|
27811
|
-
useMemo as
|
|
27933
|
+
useMemo as useMemo146,
|
|
27812
27934
|
useRef as useRef52,
|
|
27813
27935
|
useState as useState85
|
|
27814
27936
|
} from "react";
|
|
@@ -28707,7 +28829,7 @@ var QuickSwitcherNoResults = ({ query, mode }) => {
|
|
|
28707
28829
|
};
|
|
28708
28830
|
|
|
28709
28831
|
// src/components/QuickSwitcher/QuickSwitcherResult.tsx
|
|
28710
|
-
import { useEffect as useEffect81, useMemo as
|
|
28832
|
+
import { useEffect as useEffect81, useMemo as useMemo145, useRef as useRef51, useState as useState84 } from "react";
|
|
28711
28833
|
import { jsx as jsx251, jsxs as jsxs126, Fragment as Fragment39 } from "react/jsx-runtime";
|
|
28712
28834
|
var container49 = {
|
|
28713
28835
|
paddingLeft: 16,
|
|
@@ -28778,7 +28900,7 @@ var QuickSwitcherResult = ({ result, selected }) => {
|
|
|
28778
28900
|
});
|
|
28779
28901
|
}
|
|
28780
28902
|
}, [selected]);
|
|
28781
|
-
const style11 =
|
|
28903
|
+
const style11 = useMemo145(() => {
|
|
28782
28904
|
return {
|
|
28783
28905
|
...container49,
|
|
28784
28906
|
backgroundColor: getBackgroundFromHoverState({
|
|
@@ -28787,7 +28909,7 @@ var QuickSwitcherResult = ({ result, selected }) => {
|
|
|
28787
28909
|
})
|
|
28788
28910
|
};
|
|
28789
28911
|
}, [hovered, selected]);
|
|
28790
|
-
const labelStyle6 =
|
|
28912
|
+
const labelStyle6 = useMemo145(() => {
|
|
28791
28913
|
return {
|
|
28792
28914
|
...result.type === "search-result" ? searchLabel : label9,
|
|
28793
28915
|
color: result.type === "search-result" ? LIGHT_TEXT : selected || hovered ? "white" : LIGHT_TEXT,
|
|
@@ -28925,16 +29047,16 @@ var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }
|
|
|
28925
29047
|
const { setSelectedModal } = useContext96(ModalsContext);
|
|
28926
29048
|
const keybindings = useKeybinding();
|
|
28927
29049
|
const mode = mapQueryToMode(state.query);
|
|
28928
|
-
const actualQuery =
|
|
29050
|
+
const actualQuery = useMemo146(() => {
|
|
28929
29051
|
return stripQuery(state.query);
|
|
28930
29052
|
}, [state.query]);
|
|
28931
|
-
const menuActions =
|
|
29053
|
+
const menuActions = useMemo146(() => {
|
|
28932
29054
|
if (mode !== "commands") {
|
|
28933
29055
|
return [];
|
|
28934
29056
|
}
|
|
28935
29057
|
return makeSearchResults(actions, setSelectedModal);
|
|
28936
29058
|
}, [actions, mode, setSelectedModal]);
|
|
28937
|
-
const resultsArray =
|
|
29059
|
+
const resultsArray = useMemo146(() => {
|
|
28938
29060
|
if (mode === "commands") {
|
|
28939
29061
|
return fuzzySearch(actualQuery, menuActions);
|
|
28940
29062
|
}
|
|
@@ -29064,12 +29186,12 @@ var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }
|
|
|
29064
29186
|
}, []);
|
|
29065
29187
|
const showKeyboardShortcuts = mode === "docs" && actualQuery.trim() === "";
|
|
29066
29188
|
const showSearchLoadingState = mode === "docs" && docResults.type === "loading";
|
|
29067
|
-
const container50 =
|
|
29189
|
+
const container50 = useMemo146(() => {
|
|
29068
29190
|
return {
|
|
29069
29191
|
width: showKeyboardShortcuts ? 800 : 500
|
|
29070
29192
|
};
|
|
29071
29193
|
}, [showKeyboardShortcuts]);
|
|
29072
|
-
const results =
|
|
29194
|
+
const results = useMemo146(() => {
|
|
29073
29195
|
if (showKeyboardShortcuts) {
|
|
29074
29196
|
return {
|
|
29075
29197
|
maxHeight: 600,
|
|
@@ -29335,7 +29457,7 @@ var ClientRenderProgress = ({ job }) => {
|
|
|
29335
29457
|
};
|
|
29336
29458
|
|
|
29337
29459
|
// src/components/RenderModal/GuiRenderStatus.tsx
|
|
29338
|
-
import { useCallback as useCallback131, useMemo as
|
|
29460
|
+
import { useCallback as useCallback131, useMemo as useMemo147 } from "react";
|
|
29339
29461
|
import { jsx as jsx256, jsxs as jsxs129 } from "react/jsx-runtime";
|
|
29340
29462
|
var progressItem2 = {
|
|
29341
29463
|
padding: 10,
|
|
@@ -29477,7 +29599,7 @@ var DownloadsProgress = ({ downloads }) => {
|
|
|
29477
29599
|
});
|
|
29478
29600
|
};
|
|
29479
29601
|
var OpenFile = ({ job }) => {
|
|
29480
|
-
const labelStyle6 =
|
|
29602
|
+
const labelStyle6 = useMemo147(() => {
|
|
29481
29603
|
return {
|
|
29482
29604
|
...label11,
|
|
29483
29605
|
textAlign: "left",
|
|
@@ -29689,7 +29811,7 @@ import {
|
|
|
29689
29811
|
useCallback as useCallback150,
|
|
29690
29812
|
useContext as useContext99,
|
|
29691
29813
|
useEffect as useEffect85,
|
|
29692
|
-
useMemo as
|
|
29814
|
+
useMemo as useMemo158,
|
|
29693
29815
|
useReducer as useReducer2,
|
|
29694
29816
|
useRef as useRef54,
|
|
29695
29817
|
useState as useState91
|
|
@@ -29960,10 +30082,10 @@ var makeReadOnlyStudioRenderCommand = ({
|
|
|
29960
30082
|
};
|
|
29961
30083
|
|
|
29962
30084
|
// src/helpers/render-modal-sections.ts
|
|
29963
|
-
import { useMemo as
|
|
30085
|
+
import { useMemo as useMemo148, useState as useState86 } from "react";
|
|
29964
30086
|
var useRenderModalSections = (renderMode, codec) => {
|
|
29965
30087
|
const [selectedTab, setTab] = useState86("general");
|
|
29966
|
-
const shownTabs =
|
|
30088
|
+
const shownTabs = useMemo148(() => {
|
|
29967
30089
|
if (renderMode === "audio") {
|
|
29968
30090
|
return ["general", "data", "audio", "advanced"];
|
|
29969
30091
|
}
|
|
@@ -29981,13 +30103,13 @@ var useRenderModalSections = (renderMode, codec) => {
|
|
|
29981
30103
|
}
|
|
29982
30104
|
throw new TypeError("Unknown render mode");
|
|
29983
30105
|
}, [codec, renderMode]);
|
|
29984
|
-
const tab =
|
|
30106
|
+
const tab = useMemo148(() => {
|
|
29985
30107
|
if (!shownTabs.includes(selectedTab)) {
|
|
29986
30108
|
return shownTabs[0];
|
|
29987
30109
|
}
|
|
29988
30110
|
return selectedTab;
|
|
29989
30111
|
}, [selectedTab, shownTabs]);
|
|
29990
|
-
return
|
|
30112
|
+
return useMemo148(() => {
|
|
29991
30113
|
return { tab, setTab, shownTabs };
|
|
29992
30114
|
}, [tab, shownTabs]);
|
|
29993
30115
|
};
|
|
@@ -30055,7 +30177,7 @@ var GifIcon = (props) => /* @__PURE__ */ jsx262("svg", {
|
|
|
30055
30177
|
});
|
|
30056
30178
|
|
|
30057
30179
|
// src/components/Tabs/vertical.tsx
|
|
30058
|
-
import { useCallback as useCallback133, useMemo as
|
|
30180
|
+
import { useCallback as useCallback133, useMemo as useMemo149, useState as useState87 } from "react";
|
|
30059
30181
|
import { jsx as jsx263 } from "react/jsx-runtime";
|
|
30060
30182
|
var selectorButton2 = {
|
|
30061
30183
|
border: "none",
|
|
@@ -30079,7 +30201,7 @@ var VerticalTab = ({ children, onClick, style: style11, selected }) => {
|
|
|
30079
30201
|
const onPointerLeave = useCallback133(() => {
|
|
30080
30202
|
setHovered(false);
|
|
30081
30203
|
}, []);
|
|
30082
|
-
const definiteStyle =
|
|
30204
|
+
const definiteStyle = useMemo149(() => {
|
|
30083
30205
|
return {
|
|
30084
30206
|
...selectorButton2,
|
|
30085
30207
|
backgroundColor: selected ? SELECTED_BACKGROUND : hovered ? CLEAR_HOVER : "transparent",
|
|
@@ -30110,7 +30232,7 @@ import { useCallback as useCallback135 } from "react";
|
|
|
30110
30232
|
import { BrowserSafeApis as BrowserSafeApis2 } from "@remotion/renderer/client";
|
|
30111
30233
|
|
|
30112
30234
|
// src/components/RenderModal/CliCopyButton.tsx
|
|
30113
|
-
import { useCallback as useCallback134, useEffect as useEffect83, useMemo as
|
|
30235
|
+
import { useCallback as useCallback134, useEffect as useEffect83, useMemo as useMemo150, useState as useState88 } from "react";
|
|
30114
30236
|
import { jsx as jsx264 } from "react/jsx-runtime";
|
|
30115
30237
|
var svgStyle2 = {
|
|
30116
30238
|
width: 16,
|
|
@@ -30139,7 +30261,7 @@ var CliCopyButton = ({
|
|
|
30139
30261
|
}) => {
|
|
30140
30262
|
const [copied, setCopied] = useState88(false);
|
|
30141
30263
|
const [hovered, setHovered] = useState88(false);
|
|
30142
|
-
const fillColor =
|
|
30264
|
+
const fillColor = useMemo150(() => {
|
|
30143
30265
|
return hovered ? "white" : LIGHT_TEXT;
|
|
30144
30266
|
}, [hovered]);
|
|
30145
30267
|
const clipboardIcon = /* @__PURE__ */ jsx264(ClipboardIcon, {
|
|
@@ -30646,7 +30768,7 @@ var flexer = {
|
|
|
30646
30768
|
|
|
30647
30769
|
// src/components/RenderModal/RenderModalAdvanced.tsx
|
|
30648
30770
|
import { BrowserSafeApis as BrowserSafeApis6 } from "@remotion/renderer/client";
|
|
30649
|
-
import { useCallback as useCallback139, useMemo as
|
|
30771
|
+
import { useCallback as useCallback139, useMemo as useMemo151 } from "react";
|
|
30650
30772
|
|
|
30651
30773
|
// src/helpers/presets-labels.ts
|
|
30652
30774
|
var labelx264Preset = (profile) => {
|
|
@@ -30991,7 +31113,7 @@ var RenderModalAdvanced = ({
|
|
|
30991
31113
|
darkMode,
|
|
30992
31114
|
setDarkMode
|
|
30993
31115
|
}) => {
|
|
30994
|
-
const extendedOpenGlOptions =
|
|
31116
|
+
const extendedOpenGlOptions = useMemo151(() => {
|
|
30995
31117
|
return [
|
|
30996
31118
|
"angle",
|
|
30997
31119
|
"egl",
|
|
@@ -31061,7 +31183,7 @@ var RenderModalAdvanced = ({
|
|
|
31061
31183
|
const onReproToggle = useCallback139((e) => {
|
|
31062
31184
|
setRepro(e.target.checked);
|
|
31063
31185
|
}, [setRepro]);
|
|
31064
|
-
const openGlOptions =
|
|
31186
|
+
const openGlOptions = useMemo151(() => {
|
|
31065
31187
|
return extendedOpenGlOptions.map((option) => {
|
|
31066
31188
|
return {
|
|
31067
31189
|
label: option === "default" ? "Default" : option,
|
|
@@ -31077,7 +31199,7 @@ var RenderModalAdvanced = ({
|
|
|
31077
31199
|
};
|
|
31078
31200
|
});
|
|
31079
31201
|
}, [extendedOpenGlOptions, openGlOption, setOpenGlOption]);
|
|
31080
|
-
const chromeModeOptions =
|
|
31202
|
+
const chromeModeOptions = useMemo151(() => {
|
|
31081
31203
|
return BrowserSafeApis6.validChromeModeOptions.map((option) => {
|
|
31082
31204
|
return {
|
|
31083
31205
|
label: option,
|
|
@@ -31093,7 +31215,7 @@ var RenderModalAdvanced = ({
|
|
|
31093
31215
|
};
|
|
31094
31216
|
});
|
|
31095
31217
|
}, [chromeModeOption, setChromeModeOption]);
|
|
31096
|
-
const x264PresetOptions =
|
|
31218
|
+
const x264PresetOptions = useMemo151(() => {
|
|
31097
31219
|
return BrowserSafeApis6.x264PresetOptions.map((option) => {
|
|
31098
31220
|
return {
|
|
31099
31221
|
label: labelx264Preset(option),
|
|
@@ -31109,7 +31231,7 @@ var RenderModalAdvanced = ({
|
|
|
31109
31231
|
};
|
|
31110
31232
|
});
|
|
31111
31233
|
}, [setx264Preset, x264Preset]);
|
|
31112
|
-
const hardwareAccelerationValues =
|
|
31234
|
+
const hardwareAccelerationValues = useMemo151(() => {
|
|
31113
31235
|
return BrowserSafeApis6.hardwareAccelerationOptions.map((option) => {
|
|
31114
31236
|
return {
|
|
31115
31237
|
label: option,
|
|
@@ -31602,7 +31724,7 @@ var RenderModalAdvanced = ({
|
|
|
31602
31724
|
|
|
31603
31725
|
// src/components/RenderModal/RenderModalAudio.tsx
|
|
31604
31726
|
import { BrowserSafeApis as BrowserSafeApis8 } from "@remotion/renderer/client";
|
|
31605
|
-
import { useCallback as useCallback143, useMemo as
|
|
31727
|
+
import { useCallback as useCallback143, useMemo as useMemo153 } from "react";
|
|
31606
31728
|
|
|
31607
31729
|
// src/components/RenderModal/EnforceAudioTrackSetting.tsx
|
|
31608
31730
|
import { useCallback as useCallback140 } from "react";
|
|
@@ -31695,7 +31817,7 @@ var MutedSetting = ({ muted, setMuted, enforceAudioTrack }) => {
|
|
|
31695
31817
|
|
|
31696
31818
|
// src/components/RenderModal/SeparateAudioOption.tsx
|
|
31697
31819
|
import { BrowserSafeApis as BrowserSafeApis7 } from "@remotion/renderer/client";
|
|
31698
|
-
import { useCallback as useCallback142, useMemo as
|
|
31820
|
+
import { useCallback as useCallback142, useMemo as useMemo152 } from "react";
|
|
31699
31821
|
|
|
31700
31822
|
// src/helpers/use-file-existence.ts
|
|
31701
31823
|
import { useContext as useContext98, useEffect as useEffect84, useRef as useRef53, useState as useState90 } from "react";
|
|
@@ -31828,7 +31950,7 @@ var SeparateAudioOptionInput = ({ separateAudioTo, setSeparateAudioTo, audioCode
|
|
|
31828
31950
|
const onValueChange = useCallback142((e) => {
|
|
31829
31951
|
setSeparateAudioTo(e.target.value);
|
|
31830
31952
|
}, [setSeparateAudioTo]);
|
|
31831
|
-
const validationMessage =
|
|
31953
|
+
const validationMessage = useMemo152(() => {
|
|
31832
31954
|
const expectedExtension = BrowserSafeApis7.getExtensionFromAudioCodec(audioCodec);
|
|
31833
31955
|
const actualExtension = separateAudioTo.split(".").pop();
|
|
31834
31956
|
if (actualExtension !== expectedExtension) {
|
|
@@ -31928,7 +32050,7 @@ var RenderModalAudio = ({
|
|
|
31928
32050
|
const onSeamlessAacConcatenationChanges = useCallback143((e) => {
|
|
31929
32051
|
setForSeamlessAacConcatenation(e.target.checked);
|
|
31930
32052
|
}, [setForSeamlessAacConcatenation]);
|
|
31931
|
-
const sampleRateOptions =
|
|
32053
|
+
const sampleRateOptions = useMemo153(() => {
|
|
31932
32054
|
return commonSampleRates.map((rate) => ({
|
|
31933
32055
|
label: rate === 48000 ? `${rate} Hz (default)` : `${rate} Hz`,
|
|
31934
32056
|
onClick: () => setSampleRate(rate),
|
|
@@ -32115,7 +32237,7 @@ var RenderModalAudio = ({
|
|
|
32115
32237
|
// src/components/RenderModal/RenderModalBasic.tsx
|
|
32116
32238
|
import { BrowserSafeApis as BrowserSafeApis9 } from "@remotion/renderer/client";
|
|
32117
32239
|
import { NoReactAPIs as NoReactAPIs2 } from "@remotion/renderer/pure";
|
|
32118
|
-
import { useCallback as useCallback146, useMemo as
|
|
32240
|
+
import { useCallback as useCallback146, useMemo as useMemo155 } from "react";
|
|
32119
32241
|
|
|
32120
32242
|
// src/helpers/prores-labels.ts
|
|
32121
32243
|
var labelProResProfile = (profile) => {
|
|
@@ -32144,7 +32266,7 @@ var labelProResProfile = (profile) => {
|
|
|
32144
32266
|
import { useCallback as useCallback145 } from "react";
|
|
32145
32267
|
|
|
32146
32268
|
// src/components/RenderModal/MultiRangeSlider.tsx
|
|
32147
|
-
import { useCallback as useCallback144, useMemo as
|
|
32269
|
+
import { useCallback as useCallback144, useMemo as useMemo154 } from "react";
|
|
32148
32270
|
import { jsx as jsx279, jsxs as jsxs141 } from "react/jsx-runtime";
|
|
32149
32271
|
var container56 = {
|
|
32150
32272
|
borderColor: "black",
|
|
@@ -32174,7 +32296,7 @@ var MultiRangeSlider = ({
|
|
|
32174
32296
|
onRightThumbDrag
|
|
32175
32297
|
}) => {
|
|
32176
32298
|
const getPercent = useCallback144((value) => Math.round((value - min) / (max - min) * 100), [min, max]);
|
|
32177
|
-
const rangeStyle =
|
|
32299
|
+
const rangeStyle = useMemo154(() => {
|
|
32178
32300
|
const minPercent = getPercent(start);
|
|
32179
32301
|
const maxPercent = getPercent(end);
|
|
32180
32302
|
return {
|
|
@@ -32381,7 +32503,7 @@ var RenderModalBasic = ({
|
|
|
32381
32503
|
showOutputName
|
|
32382
32504
|
}) => {
|
|
32383
32505
|
const existence = useFileExistence(outName);
|
|
32384
|
-
const videoCodecOptions =
|
|
32506
|
+
const videoCodecOptions = useMemo155(() => {
|
|
32385
32507
|
return BrowserSafeApis9.validCodecs.filter((c) => {
|
|
32386
32508
|
return NoReactAPIs2.isAudioCodec(c) === (renderMode === "audio");
|
|
32387
32509
|
}).map((codecOption) => {
|
|
@@ -32399,7 +32521,7 @@ var RenderModalBasic = ({
|
|
|
32399
32521
|
};
|
|
32400
32522
|
});
|
|
32401
32523
|
}, [renderMode, setCodec, codec]);
|
|
32402
|
-
const proResProfileOptions =
|
|
32524
|
+
const proResProfileOptions = useMemo155(() => {
|
|
32403
32525
|
return BrowserSafeApis9.proResProfileOptions.map((option) => {
|
|
32404
32526
|
return {
|
|
32405
32527
|
label: labelProResProfile(option),
|
|
@@ -32431,7 +32553,7 @@ var RenderModalBasic = ({
|
|
|
32431
32553
|
const onValueChange = useCallback146((e) => {
|
|
32432
32554
|
setOutName(e.target.value);
|
|
32433
32555
|
}, [setOutName]);
|
|
32434
|
-
const logLevelOptions =
|
|
32556
|
+
const logLevelOptions = useMemo155(() => {
|
|
32435
32557
|
return ["trace", "verbose", "info", "warn", "error"].map((level) => {
|
|
32436
32558
|
return {
|
|
32437
32559
|
label: humanReadableLogLevel(level),
|
|
@@ -32685,7 +32807,7 @@ var RenderModalGif = ({
|
|
|
32685
32807
|
|
|
32686
32808
|
// src/components/RenderModal/RenderModalPicture.tsx
|
|
32687
32809
|
import { BrowserSafeApis as BrowserSafeApis10 } from "@remotion/renderer/client";
|
|
32688
|
-
import { useCallback as useCallback149, useMemo as
|
|
32810
|
+
import { useCallback as useCallback149, useMemo as useMemo157 } from "react";
|
|
32689
32811
|
|
|
32690
32812
|
// src/components/RenderModal/JpegQualitySetting.tsx
|
|
32691
32813
|
import { jsx as jsx284 } from "react/jsx-runtime";
|
|
@@ -32704,7 +32826,7 @@ var JpegQualitySetting = ({ jpegQuality, setJpegQuality }) => {
|
|
|
32704
32826
|
};
|
|
32705
32827
|
|
|
32706
32828
|
// src/components/RenderModal/ScaleSetting.tsx
|
|
32707
|
-
import { useMemo as
|
|
32829
|
+
import { useMemo as useMemo156 } from "react";
|
|
32708
32830
|
import { jsx as jsx285, jsxs as jsxs146, Fragment as Fragment48 } from "react/jsx-runtime";
|
|
32709
32831
|
var MIN_SCALE = 0.1;
|
|
32710
32832
|
var MAX_SCALE = 10;
|
|
@@ -32718,7 +32840,7 @@ var outputDimensionsStyle = {
|
|
|
32718
32840
|
marginTop: -10
|
|
32719
32841
|
};
|
|
32720
32842
|
var ScaleSetting = ({ scale, setScale, compositionWidth, compositionHeight }) => {
|
|
32721
|
-
const outputDimensions =
|
|
32843
|
+
const outputDimensions = useMemo156(() => {
|
|
32722
32844
|
const outputWidth = Math.round(compositionWidth * scale);
|
|
32723
32845
|
const outputHeight = Math.round(compositionHeight * scale);
|
|
32724
32846
|
return `${outputWidth}×${outputHeight}`;
|
|
@@ -32787,7 +32909,7 @@ var RenderModalPicture = ({
|
|
|
32787
32909
|
compositionWidth,
|
|
32788
32910
|
compositionHeight
|
|
32789
32911
|
}) => {
|
|
32790
|
-
const colorSpaceOptions =
|
|
32912
|
+
const colorSpaceOptions = useMemo157(() => {
|
|
32791
32913
|
return BrowserSafeApis10.validColorSpaces.map((option) => {
|
|
32792
32914
|
return {
|
|
32793
32915
|
label: option,
|
|
@@ -32803,7 +32925,7 @@ var RenderModalPicture = ({
|
|
|
32803
32925
|
};
|
|
32804
32926
|
});
|
|
32805
32927
|
}, [colorSpace, setColorSpace]);
|
|
32806
|
-
const qualityControlOptions =
|
|
32928
|
+
const qualityControlOptions = useMemo157(() => {
|
|
32807
32929
|
return qualityControlModes.map((option) => {
|
|
32808
32930
|
return {
|
|
32809
32931
|
label: option === "crf" ? "CRF" : "Bitrate",
|
|
@@ -33198,7 +33320,7 @@ var RenderModal = ({
|
|
|
33198
33320
|
const [openGlOption, setOpenGlOption] = useState91(() => initialGl ?? "default");
|
|
33199
33321
|
const [colorSpace, setColorSpace] = useState91(() => initialColorSpace);
|
|
33200
33322
|
const [userAgent, setUserAgent] = useState91(() => initialUserAgent === null ? null : initialUserAgent.trim() === "" ? null : initialUserAgent);
|
|
33201
|
-
const chromiumOptions =
|
|
33323
|
+
const chromiumOptions = useMemo158(() => {
|
|
33202
33324
|
return {
|
|
33203
33325
|
headless,
|
|
33204
33326
|
disableWebSecurity,
|
|
@@ -33240,19 +33362,19 @@ var RenderModal = ({
|
|
|
33240
33362
|
const [offthreadVideoCacheSizeInBytes, setOffthreadVideoCacheSizeInBytes] = useState91(initialOffthreadVideoCacheSizeInBytes);
|
|
33241
33363
|
const [mediaCacheSizeInBytes, setMediaCacheSizeInBytes] = useState91(initialMediaCacheSizeInBytes);
|
|
33242
33364
|
const [offthreadVideoThreads, setOffthreadVideoThreads] = useState91(() => initialOffthreadVideoThreads);
|
|
33243
|
-
const codec =
|
|
33365
|
+
const codec = useMemo158(() => {
|
|
33244
33366
|
if (renderMode === "audio") {
|
|
33245
33367
|
return videoCodecForAudioTab;
|
|
33246
33368
|
}
|
|
33247
33369
|
return videoCodecForVideoTab;
|
|
33248
33370
|
}, [videoCodecForAudioTab, renderMode, videoCodecForVideoTab]);
|
|
33249
|
-
const numberOfGifLoops =
|
|
33371
|
+
const numberOfGifLoops = useMemo158(() => {
|
|
33250
33372
|
if (codec === "gif" && limitNumberOfGifLoops) {
|
|
33251
33373
|
return numberOfGifLoopsSetting;
|
|
33252
33374
|
}
|
|
33253
33375
|
return null;
|
|
33254
33376
|
}, [codec, limitNumberOfGifLoops, numberOfGifLoopsSetting]);
|
|
33255
|
-
const audioBitrate =
|
|
33377
|
+
const audioBitrate = useMemo158(() => {
|
|
33256
33378
|
if (shouldHaveCustomTargetAudioBitrate) {
|
|
33257
33379
|
return customTargetAudioBitrate;
|
|
33258
33380
|
}
|
|
@@ -33260,10 +33382,10 @@ var RenderModal = ({
|
|
|
33260
33382
|
}, [customTargetAudioBitrate, shouldHaveCustomTargetAudioBitrate]);
|
|
33261
33383
|
const supportsCrf = BrowserSafeApis11.codecSupportsCrf(codec);
|
|
33262
33384
|
const supportsVideoBitrate = BrowserSafeApis11.codecSupportsVideoBitrate(codec);
|
|
33263
|
-
const supportsBothQualityControls =
|
|
33385
|
+
const supportsBothQualityControls = useMemo158(() => {
|
|
33264
33386
|
return supportsCrf && supportsVideoBitrate && hardwareAcceleration !== "if-possible" && hardwareAcceleration !== "required";
|
|
33265
33387
|
}, [hardwareAcceleration, supportsCrf, supportsVideoBitrate]);
|
|
33266
|
-
const qualityControlType =
|
|
33388
|
+
const qualityControlType = useMemo158(() => {
|
|
33267
33389
|
if (hardwareAcceleration === "if-possible" || hardwareAcceleration === "required") {
|
|
33268
33390
|
if (supportsVideoBitrate) {
|
|
33269
33391
|
return "bitrate";
|
|
@@ -33287,7 +33409,7 @@ var RenderModal = ({
|
|
|
33287
33409
|
supportsCrf,
|
|
33288
33410
|
supportsVideoBitrate
|
|
33289
33411
|
]);
|
|
33290
|
-
const videoBitrate =
|
|
33412
|
+
const videoBitrate = useMemo158(() => {
|
|
33291
33413
|
if (qualityControlType === "bitrate") {
|
|
33292
33414
|
return customTargetVideoBitrate;
|
|
33293
33415
|
}
|
|
@@ -33299,13 +33421,13 @@ var RenderModal = ({
|
|
|
33299
33421
|
return;
|
|
33300
33422
|
dispatch2(payload);
|
|
33301
33423
|
}, []);
|
|
33302
|
-
const muted =
|
|
33424
|
+
const muted = useMemo158(() => {
|
|
33303
33425
|
if (renderMode === "video") {
|
|
33304
33426
|
return mutedState;
|
|
33305
33427
|
}
|
|
33306
33428
|
return false;
|
|
33307
33429
|
}, [mutedState, renderMode]);
|
|
33308
|
-
const enforceAudioTrack =
|
|
33430
|
+
const enforceAudioTrack = useMemo158(() => {
|
|
33309
33431
|
if (renderMode === "video") {
|
|
33310
33432
|
return enforceAudioTrackState;
|
|
33311
33433
|
}
|
|
@@ -33314,13 +33436,13 @@ var RenderModal = ({
|
|
|
33314
33436
|
}
|
|
33315
33437
|
return false;
|
|
33316
33438
|
}, [enforceAudioTrackState, renderMode]);
|
|
33317
|
-
const proResProfile =
|
|
33439
|
+
const proResProfile = useMemo158(() => {
|
|
33318
33440
|
if (renderMode === "video" && codec === "prores") {
|
|
33319
33441
|
return proResProfileSetting;
|
|
33320
33442
|
}
|
|
33321
33443
|
return null;
|
|
33322
33444
|
}, [codec, proResProfileSetting, renderMode]);
|
|
33323
|
-
const x264Preset =
|
|
33445
|
+
const x264Preset = useMemo158(() => {
|
|
33324
33446
|
if (renderMode === "video" && codec === "h264") {
|
|
33325
33447
|
return x264PresetSetting;
|
|
33326
33448
|
}
|
|
@@ -33331,19 +33453,19 @@ var RenderModal = ({
|
|
|
33331
33453
|
_setInputProps(updater);
|
|
33332
33454
|
}, []);
|
|
33333
33455
|
const [metadata] = useState91(() => defaultMetadata);
|
|
33334
|
-
const endFrame =
|
|
33456
|
+
const endFrame = useMemo158(() => {
|
|
33335
33457
|
if (endFrameOrNull === null) {
|
|
33336
33458
|
return resolvedComposition.durationInFrames - 1;
|
|
33337
33459
|
}
|
|
33338
33460
|
return Math.max(0, Math.min(resolvedComposition.durationInFrames - 1, endFrameOrNull));
|
|
33339
33461
|
}, [resolvedComposition.durationInFrames, endFrameOrNull]);
|
|
33340
|
-
const startFrame =
|
|
33462
|
+
const startFrame = useMemo158(() => {
|
|
33341
33463
|
if (startFrameOrNull === null) {
|
|
33342
33464
|
return 0;
|
|
33343
33465
|
}
|
|
33344
33466
|
return Math.max(0, Math.min(endFrame - 1, startFrameOrNull));
|
|
33345
33467
|
}, [endFrame, startFrameOrNull]);
|
|
33346
|
-
const frame2 =
|
|
33468
|
+
const frame2 = useMemo158(() => {
|
|
33347
33469
|
const parsed = Math.floor(unclampedFrame);
|
|
33348
33470
|
return Math.max(0, Math.min(resolvedComposition.durationInFrames - 1, parsed));
|
|
33349
33471
|
}, [resolvedComposition.durationInFrames, unclampedFrame]);
|
|
@@ -33464,17 +33586,17 @@ var RenderModal = ({
|
|
|
33464
33586
|
mediaCacheSizeInBytes
|
|
33465
33587
|
]);
|
|
33466
33588
|
const [everyNthFrameSetting, setEveryNthFrameSetting] = useState91(() => initialEveryNthFrame);
|
|
33467
|
-
const everyNthFrame =
|
|
33589
|
+
const everyNthFrame = useMemo158(() => {
|
|
33468
33590
|
if (codec === "gif") {
|
|
33469
33591
|
return everyNthFrameSetting;
|
|
33470
33592
|
}
|
|
33471
33593
|
return 1;
|
|
33472
33594
|
}, [codec, everyNthFrameSetting]);
|
|
33473
33595
|
const audioCodec = deriveFinalAudioCodec(codec, userSelectedAudioCodec);
|
|
33474
|
-
const availablePixelFormats =
|
|
33596
|
+
const availablePixelFormats = useMemo158(() => {
|
|
33475
33597
|
return BrowserSafeApis11.validPixelFormatsForCodec(codec);
|
|
33476
33598
|
}, [codec]);
|
|
33477
|
-
const pixelFormat =
|
|
33599
|
+
const pixelFormat = useMemo158(() => {
|
|
33478
33600
|
if (availablePixelFormats.includes(userPreferredPixelFormat)) {
|
|
33479
33601
|
return userPreferredPixelFormat;
|
|
33480
33602
|
}
|
|
@@ -33647,7 +33769,7 @@ var RenderModal = ({
|
|
|
33647
33769
|
isMounted.current = false;
|
|
33648
33770
|
};
|
|
33649
33771
|
}, []);
|
|
33650
|
-
const imageFormatOptions =
|
|
33772
|
+
const imageFormatOptions = useMemo158(() => {
|
|
33651
33773
|
if (renderMode === "still") {
|
|
33652
33774
|
return [
|
|
33653
33775
|
{
|
|
@@ -33743,7 +33865,7 @@ var RenderModal = ({
|
|
|
33743
33865
|
stillImageFormat,
|
|
33744
33866
|
videoCodecForVideoTab
|
|
33745
33867
|
]);
|
|
33746
|
-
const renderTabOptions =
|
|
33868
|
+
const renderTabOptions = useMemo158(() => {
|
|
33747
33869
|
if (resolvedComposition?.durationInFrames < 2) {
|
|
33748
33870
|
return [
|
|
33749
33871
|
{
|
|
@@ -33801,7 +33923,7 @@ var RenderModal = ({
|
|
|
33801
33923
|
});
|
|
33802
33924
|
const { tab, setTab, shownTabs } = useRenderModalSections(renderMode, codec);
|
|
33803
33925
|
const { registerKeybinding } = useKeybinding();
|
|
33804
|
-
const readOnlyRenderCommand =
|
|
33926
|
+
const readOnlyRenderCommand = useMemo158(() => {
|
|
33805
33927
|
if (!readOnlyStudio) {
|
|
33806
33928
|
return null;
|
|
33807
33929
|
}
|
|
@@ -33974,7 +34096,7 @@ var RenderModal = ({
|
|
|
33974
34096
|
enter.unregister();
|
|
33975
34097
|
};
|
|
33976
34098
|
}, [registerKeybinding, renderDisabled, trigger]);
|
|
33977
|
-
const pixelFormatOptions =
|
|
34099
|
+
const pixelFormatOptions = useMemo158(() => {
|
|
33978
34100
|
return availablePixelFormats.map((option) => {
|
|
33979
34101
|
return {
|
|
33980
34102
|
label: option,
|
|
@@ -34273,7 +34395,7 @@ import {
|
|
|
34273
34395
|
getDefaultVideoCodecForContainer,
|
|
34274
34396
|
isAudioOnlyContainer
|
|
34275
34397
|
} from "@remotion/web-renderer";
|
|
34276
|
-
import { useCallback as useCallback154, useContext as useContext100, useMemo as
|
|
34398
|
+
import { useCallback as useCallback154, useContext as useContext100, useMemo as useMemo163, useState as useState95 } from "react";
|
|
34277
34399
|
|
|
34278
34400
|
// src/icons/certificate.tsx
|
|
34279
34401
|
import { jsx as jsx288 } from "react/jsx-runtime";
|
|
@@ -34435,7 +34557,7 @@ var WebRendererExperimentalBadge = () => {
|
|
|
34435
34557
|
};
|
|
34436
34558
|
|
|
34437
34559
|
// src/components/RenderModal/WebRenderModalAdvanced.tsx
|
|
34438
|
-
import { useCallback as useCallback151, useMemo as
|
|
34560
|
+
import { useCallback as useCallback151, useMemo as useMemo159 } from "react";
|
|
34439
34561
|
import { jsx as jsx290, jsxs as jsxs150 } from "react/jsx-runtime";
|
|
34440
34562
|
var tabContainer = {
|
|
34441
34563
|
flex: 1
|
|
@@ -34473,7 +34595,7 @@ var WebRenderModalAdvanced = ({
|
|
|
34473
34595
|
return cb;
|
|
34474
34596
|
});
|
|
34475
34597
|
}, [setMediaCacheSizeInBytes]);
|
|
34476
|
-
const hardwareAccelerationOptions =
|
|
34598
|
+
const hardwareAccelerationOptions = useMemo159(() => {
|
|
34477
34599
|
return [
|
|
34478
34600
|
{
|
|
34479
34601
|
label: "No Preference",
|
|
@@ -34605,7 +34727,7 @@ var WebRenderModalAdvanced = ({
|
|
|
34605
34727
|
|
|
34606
34728
|
// src/components/RenderModal/WebRenderModalAudio.tsx
|
|
34607
34729
|
import { getSupportedAudioCodecsForContainer as getSupportedAudioCodecsForContainer2 } from "@remotion/web-renderer";
|
|
34608
|
-
import { useMemo as
|
|
34730
|
+
import { useMemo as useMemo160 } from "react";
|
|
34609
34731
|
|
|
34610
34732
|
// src/components/RenderModal/quality-options.tsx
|
|
34611
34733
|
import { jsx as jsx291 } from "react/jsx-runtime";
|
|
@@ -34678,8 +34800,8 @@ var WebRenderModalAudio = ({
|
|
|
34678
34800
|
encodableCodecs,
|
|
34679
34801
|
effectiveAudioCodec
|
|
34680
34802
|
}) => {
|
|
34681
|
-
const containerSupported =
|
|
34682
|
-
const audioCodecOptions =
|
|
34803
|
+
const containerSupported = useMemo160(() => getSupportedAudioCodecsForContainer2(videoContainer), [videoContainer]);
|
|
34804
|
+
const audioCodecOptions = useMemo160(() => {
|
|
34683
34805
|
return containerSupported.map((codec) => {
|
|
34684
34806
|
const isEncodable = encodableCodecs.includes(codec);
|
|
34685
34807
|
return {
|
|
@@ -34696,7 +34818,7 @@ var WebRenderModalAudio = ({
|
|
|
34696
34818
|
};
|
|
34697
34819
|
});
|
|
34698
34820
|
}, [containerSupported, encodableCodecs, audioCodec, setAudioCodec]);
|
|
34699
|
-
const audioBitrateOptions =
|
|
34821
|
+
const audioBitrateOptions = useMemo160(() => getQualityOptions(audioBitrate, setAudioBitrate), [audioBitrate, setAudioBitrate]);
|
|
34700
34822
|
const isAudioOnly = renderMode === "audio";
|
|
34701
34823
|
const showAudioSettings = isAudioOnly || !muted;
|
|
34702
34824
|
const showAudioCodecSetting = !isAudioOnly || containerSupported.length > 1;
|
|
@@ -34773,7 +34895,7 @@ var WebRenderModalAudio = ({
|
|
|
34773
34895
|
};
|
|
34774
34896
|
|
|
34775
34897
|
// src/components/RenderModal/WebRenderModalBasic.tsx
|
|
34776
|
-
import { useMemo as
|
|
34898
|
+
import { useMemo as useMemo161 } from "react";
|
|
34777
34899
|
import { jsx as jsx293, jsxs as jsxs152, Fragment as Fragment51 } from "react/jsx-runtime";
|
|
34778
34900
|
var tabContainer2 = {
|
|
34779
34901
|
flex: 1
|
|
@@ -34827,7 +34949,7 @@ var WebRenderModalBasic = ({
|
|
|
34827
34949
|
logLevel,
|
|
34828
34950
|
setLogLevel
|
|
34829
34951
|
}) => {
|
|
34830
|
-
const imageFormatOptions =
|
|
34952
|
+
const imageFormatOptions = useMemo161(() => {
|
|
34831
34953
|
return [
|
|
34832
34954
|
{
|
|
34833
34955
|
label: "PNG",
|
|
@@ -34849,7 +34971,7 @@ var WebRenderModalBasic = ({
|
|
|
34849
34971
|
}
|
|
34850
34972
|
];
|
|
34851
34973
|
}, [imageFormat, setStillFormat]);
|
|
34852
|
-
const logLevelOptions =
|
|
34974
|
+
const logLevelOptions = useMemo161(() => {
|
|
34853
34975
|
return ["trace", "verbose", "info", "warn", "error"].map((level) => {
|
|
34854
34976
|
return {
|
|
34855
34977
|
label: humanReadableLogLevel(level),
|
|
@@ -34864,7 +34986,7 @@ var WebRenderModalBasic = ({
|
|
|
34864
34986
|
};
|
|
34865
34987
|
});
|
|
34866
34988
|
}, [logLevel, setLogLevel]);
|
|
34867
|
-
const containerOptions =
|
|
34989
|
+
const containerOptions = useMemo161(() => {
|
|
34868
34990
|
const containers = renderMode === "audio" ? audioContainers : videoContainers;
|
|
34869
34991
|
return containers.map((c) => ({
|
|
34870
34992
|
label: containerLabels[c],
|
|
@@ -34878,7 +35000,7 @@ var WebRenderModalBasic = ({
|
|
|
34878
35000
|
value: c
|
|
34879
35001
|
}));
|
|
34880
35002
|
}, [container61, setContainerFormat, renderMode]);
|
|
34881
|
-
const codecOptions =
|
|
35003
|
+
const codecOptions = useMemo161(() => {
|
|
34882
35004
|
return encodableVideoCodecs.map((c) => ({
|
|
34883
35005
|
label: codecLabels[c],
|
|
34884
35006
|
onClick: () => setCodec(c),
|
|
@@ -35468,7 +35590,7 @@ var WebRenderModalLicense = ({
|
|
|
35468
35590
|
};
|
|
35469
35591
|
|
|
35470
35592
|
// src/components/RenderModal/WebRenderModalPicture.tsx
|
|
35471
|
-
import { useCallback as useCallback153, useMemo as
|
|
35593
|
+
import { useCallback as useCallback153, useMemo as useMemo162 } from "react";
|
|
35472
35594
|
import { jsx as jsx297, jsxs as jsxs155, Fragment as Fragment53 } from "react/jsx-runtime";
|
|
35473
35595
|
var tabContainer4 = {
|
|
35474
35596
|
flex: 1
|
|
@@ -35486,7 +35608,7 @@ var WebRenderModalPicture = ({
|
|
|
35486
35608
|
compositionWidth,
|
|
35487
35609
|
compositionHeight
|
|
35488
35610
|
}) => {
|
|
35489
|
-
const qualityOptions =
|
|
35611
|
+
const qualityOptions = useMemo162(() => getQualityOptions(videoBitrate, setVideoBitrate), [videoBitrate, setVideoBitrate]);
|
|
35490
35612
|
const onTransparentChanged = useCallback153((e) => {
|
|
35491
35613
|
setTransparent(e.target.checked);
|
|
35492
35614
|
}, [setTransparent]);
|
|
@@ -35659,25 +35781,25 @@ var WebRenderModal = ({
|
|
|
35659
35781
|
const [allowHtmlInCanvas, setAllowHtmlInCanvas] = useState95(initialAllowHtmlInCanvas ?? false);
|
|
35660
35782
|
const encodableAudioCodecs = useEncodableAudioCodecs(container61);
|
|
35661
35783
|
const encodableVideoCodecs = useEncodableVideoCodecs(container61);
|
|
35662
|
-
const effectiveAudioCodec =
|
|
35784
|
+
const effectiveAudioCodec = useMemo163(() => {
|
|
35663
35785
|
if (encodableAudioCodecs.includes(audioCodec)) {
|
|
35664
35786
|
return audioCodec;
|
|
35665
35787
|
}
|
|
35666
35788
|
return encodableAudioCodecs[0] ?? audioCodec;
|
|
35667
35789
|
}, [audioCodec, encodableAudioCodecs]);
|
|
35668
|
-
const effectiveVideoCodec =
|
|
35790
|
+
const effectiveVideoCodec = useMemo163(() => {
|
|
35669
35791
|
if (encodableVideoCodecs.includes(codec)) {
|
|
35670
35792
|
return codec;
|
|
35671
35793
|
}
|
|
35672
35794
|
return encodableVideoCodecs[0] ?? codec;
|
|
35673
35795
|
}, [codec, encodableVideoCodecs]);
|
|
35674
|
-
const finalEndFrame =
|
|
35796
|
+
const finalEndFrame = useMemo163(() => {
|
|
35675
35797
|
if (endFrame === null) {
|
|
35676
35798
|
return resolvedComposition.durationInFrames - 1;
|
|
35677
35799
|
}
|
|
35678
35800
|
return Math.max(0, Math.min(resolvedComposition.durationInFrames - 1, endFrame));
|
|
35679
35801
|
}, [endFrame, resolvedComposition.durationInFrames]);
|
|
35680
|
-
const finalStartFrame =
|
|
35802
|
+
const finalStartFrame = useMemo163(() => {
|
|
35681
35803
|
if (startFrame === null) {
|
|
35682
35804
|
return 0;
|
|
35683
35805
|
}
|
|
@@ -35742,7 +35864,7 @@ var WebRenderModal = ({
|
|
|
35742
35864
|
setTab((prev) => prev === "audio" ? "general" : prev);
|
|
35743
35865
|
}
|
|
35744
35866
|
}, [container61, imageFormat, updateOutNameExtension]);
|
|
35745
|
-
const renderTabOptions =
|
|
35867
|
+
const renderTabOptions = useMemo163(() => {
|
|
35746
35868
|
const options = [
|
|
35747
35869
|
{
|
|
35748
35870
|
label: "Still",
|
|
@@ -35788,7 +35910,7 @@ var WebRenderModal = ({
|
|
|
35788
35910
|
const onOutNameChange = useCallback154((e) => {
|
|
35789
35911
|
setOutName(e.target.value);
|
|
35790
35912
|
}, []);
|
|
35791
|
-
const outnameValidation =
|
|
35913
|
+
const outnameValidation = useMemo163(() => {
|
|
35792
35914
|
if (renderMode === "still") {
|
|
35793
35915
|
return validateOutnameForStill({
|
|
35794
35916
|
outName,
|
|
@@ -36136,7 +36258,7 @@ var WebRenderModalWithLoader = (props) => {
|
|
|
36136
36258
|
};
|
|
36137
36259
|
|
|
36138
36260
|
// src/components/UpdateModal/UpdateModal.tsx
|
|
36139
|
-
import { useCallback as useCallback157, useMemo as
|
|
36261
|
+
import { useCallback as useCallback157, useMemo as useMemo165 } from "react";
|
|
36140
36262
|
|
|
36141
36263
|
// src/components/CopyButton.tsx
|
|
36142
36264
|
import { useCallback as useCallback155, useEffect as useEffect89, useState as useState96 } from "react";
|
|
@@ -36202,7 +36324,7 @@ var CopyButton = ({ textToCopy, label: label12, labelWhenCopied }) => {
|
|
|
36202
36324
|
};
|
|
36203
36325
|
|
|
36204
36326
|
// src/components/UpdateModal/OpenIssueButton.tsx
|
|
36205
|
-
import { useCallback as useCallback156, useMemo as
|
|
36327
|
+
import { useCallback as useCallback156, useMemo as useMemo164, useState as useState97 } from "react";
|
|
36206
36328
|
import { jsx as jsx300 } from "react/jsx-runtime";
|
|
36207
36329
|
var svgStyle3 = {
|
|
36208
36330
|
width: "11px",
|
|
@@ -36222,7 +36344,7 @@ var OpenIssueButton = ({ link: link4 }) => {
|
|
|
36222
36344
|
const handleClick = useCallback156(() => {
|
|
36223
36345
|
window.open(link4, "_blank");
|
|
36224
36346
|
}, [link4]);
|
|
36225
|
-
const svgFillColor =
|
|
36347
|
+
const svgFillColor = useMemo164(() => {
|
|
36226
36348
|
return hovered ? "white" : LIGHT_TEXT;
|
|
36227
36349
|
}, [hovered]);
|
|
36228
36350
|
const openInEditorSvg = /* @__PURE__ */ jsx300("svg", {
|
|
@@ -36319,7 +36441,7 @@ var commands = {
|
|
|
36319
36441
|
unknown: "npx remotion upgrade"
|
|
36320
36442
|
};
|
|
36321
36443
|
var UpdateModal = ({ info, knownBugs }) => {
|
|
36322
|
-
const hasKnownBugs =
|
|
36444
|
+
const hasKnownBugs = useMemo165(() => {
|
|
36323
36445
|
return knownBugs && knownBugs?.length > 0;
|
|
36324
36446
|
}, [knownBugs]);
|
|
36325
36447
|
const command = commands[info.packageManager];
|
|
@@ -36508,7 +36630,7 @@ var Modals = ({ readOnlyStudio }) => {
|
|
|
36508
36630
|
};
|
|
36509
36631
|
|
|
36510
36632
|
// src/components/SequencePropsSubscriptionProvider.tsx
|
|
36511
|
-
import { useState as useState98, useCallback as useCallback158, useMemo as
|
|
36633
|
+
import { useState as useState98, useCallback as useCallback158, useMemo as useMemo166 } from "react";
|
|
36512
36634
|
import { Internals as Internals73 } from "remotion";
|
|
36513
36635
|
import { jsx as jsx304 } from "react/jsx-runtime";
|
|
36514
36636
|
var SequencePropsSubscriptionProvider = ({ children }) => {
|
|
@@ -36522,10 +36644,10 @@ var SequencePropsSubscriptionProvider = ({ children }) => {
|
|
|
36522
36644
|
return { ...prev, [overrideId]: state };
|
|
36523
36645
|
});
|
|
36524
36646
|
}, []);
|
|
36525
|
-
const getters =
|
|
36647
|
+
const getters = useMemo166(() => {
|
|
36526
36648
|
return { overrideIdToNodePathMappings: overrideToNodePathMap };
|
|
36527
36649
|
}, [overrideToNodePathMap]);
|
|
36528
|
-
const setters =
|
|
36650
|
+
const setters = useMemo166(() => {
|
|
36529
36651
|
return { setOverrideIdToNodePath };
|
|
36530
36652
|
}, [setOverrideIdToNodePath]);
|
|
36531
36653
|
return /* @__PURE__ */ jsx304(Internals73.OverrideIdsToNodePathsGettersContext.Provider, {
|
|
@@ -36558,7 +36680,7 @@ var Editor = ({ Root, readOnlyStudio }) => {
|
|
|
36558
36680
|
const onMounted = useCallback159(() => {
|
|
36559
36681
|
setCanvasMounted(true);
|
|
36560
36682
|
}, []);
|
|
36561
|
-
const value =
|
|
36683
|
+
const value = useMemo167(() => {
|
|
36562
36684
|
if (!size3) {
|
|
36563
36685
|
return null;
|
|
36564
36686
|
}
|
|
@@ -36567,15 +36689,15 @@ var Editor = ({ Root, readOnlyStudio }) => {
|
|
|
36567
36689
|
canvasSize: size3
|
|
36568
36690
|
};
|
|
36569
36691
|
}, [size3]);
|
|
36570
|
-
const MemoRoot =
|
|
36692
|
+
const MemoRoot = useMemo167(() => {
|
|
36571
36693
|
return React201.memo(Root);
|
|
36572
36694
|
}, [Root]);
|
|
36573
36695
|
const [renderError, setRenderError] = useState99(null);
|
|
36574
36696
|
const clearError = useCallback159(() => {
|
|
36575
36697
|
setRenderError(null);
|
|
36576
36698
|
}, []);
|
|
36577
|
-
const compositionRenderErrorContextValue =
|
|
36578
|
-
const renderErrorContextValue =
|
|
36699
|
+
const compositionRenderErrorContextValue = useMemo167(() => ({ setError: setRenderError, clearError }), [clearError]);
|
|
36700
|
+
const renderErrorContextValue = useMemo167(() => ({ error: renderError }), [renderError]);
|
|
36579
36701
|
return /* @__PURE__ */ jsx305(HigherZIndex, {
|
|
36580
36702
|
onEscape: noop,
|
|
36581
36703
|
onOutsideClick: noop,
|
|
@@ -36628,7 +36750,7 @@ var Editor = ({ Root, readOnlyStudio }) => {
|
|
|
36628
36750
|
import { PlayerInternals as PlayerInternals21 } from "@remotion/player";
|
|
36629
36751
|
|
|
36630
36752
|
// src/state/preview-size.tsx
|
|
36631
|
-
import { useCallback as useCallback160, useContext as useContext102, useMemo as
|
|
36753
|
+
import { useCallback as useCallback160, useContext as useContext102, useMemo as useMemo168, useState as useState100 } from "react";
|
|
36632
36754
|
import { Internals as Internals75 } from "remotion";
|
|
36633
36755
|
import { jsx as jsx306 } from "react/jsx-runtime";
|
|
36634
36756
|
var key5 = "remotion.previewSize";
|
|
@@ -36664,7 +36786,7 @@ var PreviewSizeProvider = ({ children }) => {
|
|
|
36664
36786
|
return newVal;
|
|
36665
36787
|
});
|
|
36666
36788
|
}, []);
|
|
36667
|
-
const previewSizeCtx =
|
|
36789
|
+
const previewSizeCtx = useMemo168(() => {
|
|
36668
36790
|
return {
|
|
36669
36791
|
size: editorZoomGestures ? size3 : {
|
|
36670
36792
|
size: size3.size,
|
|
@@ -36685,7 +36807,7 @@ var PreviewSizeProvider = ({ children }) => {
|
|
|
36685
36807
|
};
|
|
36686
36808
|
|
|
36687
36809
|
// src/components/CheckerboardProvider.tsx
|
|
36688
|
-
import { useCallback as useCallback161, useMemo as
|
|
36810
|
+
import { useCallback as useCallback161, useMemo as useMemo169, useState as useState101 } from "react";
|
|
36689
36811
|
import { jsx as jsx307 } from "react/jsx-runtime";
|
|
36690
36812
|
var CheckerboardProvider = ({ children }) => {
|
|
36691
36813
|
const [checkerboard, setCheckerboardState] = useState101(() => loadCheckerboardOption());
|
|
@@ -36696,7 +36818,7 @@ var CheckerboardProvider = ({ children }) => {
|
|
|
36696
36818
|
return newVal;
|
|
36697
36819
|
});
|
|
36698
36820
|
}, []);
|
|
36699
|
-
const checkerboardCtx =
|
|
36821
|
+
const checkerboardCtx = useMemo169(() => {
|
|
36700
36822
|
return {
|
|
36701
36823
|
checkerboard,
|
|
36702
36824
|
setCheckerboard
|
|
@@ -36709,19 +36831,19 @@ var CheckerboardProvider = ({ children }) => {
|
|
|
36709
36831
|
};
|
|
36710
36832
|
|
|
36711
36833
|
// src/components/MediaVolumeProvider.tsx
|
|
36712
|
-
import { useMemo as
|
|
36834
|
+
import { useMemo as useMemo170, useState as useState102 } from "react";
|
|
36713
36835
|
import { Internals as Internals76 } from "remotion";
|
|
36714
36836
|
import { jsx as jsx308 } from "react/jsx-runtime";
|
|
36715
36837
|
var MediaVolumeProvider = ({ children }) => {
|
|
36716
36838
|
const [mediaMuted, setMediaMuted] = useState102(() => loadMuteOption());
|
|
36717
36839
|
const [mediaVolume, setMediaVolume] = useState102(1);
|
|
36718
|
-
const mediaVolumeContextValue =
|
|
36840
|
+
const mediaVolumeContextValue = useMemo170(() => {
|
|
36719
36841
|
return {
|
|
36720
36842
|
mediaMuted,
|
|
36721
36843
|
mediaVolume
|
|
36722
36844
|
};
|
|
36723
36845
|
}, [mediaMuted, mediaVolume]);
|
|
36724
|
-
const setMediaVolumeContextValue =
|
|
36846
|
+
const setMediaVolumeContextValue = useMemo170(() => {
|
|
36725
36847
|
return {
|
|
36726
36848
|
setMediaMuted,
|
|
36727
36849
|
setMediaVolume
|
|
@@ -36737,11 +36859,11 @@ var MediaVolumeProvider = ({ children }) => {
|
|
|
36737
36859
|
};
|
|
36738
36860
|
|
|
36739
36861
|
// src/components/ModalsProvider.tsx
|
|
36740
|
-
import { useMemo as
|
|
36862
|
+
import { useMemo as useMemo171, useState as useState103 } from "react";
|
|
36741
36863
|
import { jsx as jsx309 } from "react/jsx-runtime";
|
|
36742
36864
|
var ModalsProvider = ({ children }) => {
|
|
36743
36865
|
const [modalContextType, setModalContextType] = useState103(null);
|
|
36744
|
-
const modalsContext =
|
|
36866
|
+
const modalsContext = useMemo171(() => {
|
|
36745
36867
|
return {
|
|
36746
36868
|
selectedModal: modalContextType,
|
|
36747
36869
|
setSelectedModal: setModalContextType
|
|
@@ -36754,7 +36876,7 @@ var ModalsProvider = ({ children }) => {
|
|
|
36754
36876
|
};
|
|
36755
36877
|
|
|
36756
36878
|
// src/components/SetTimelineInOutProvider.tsx
|
|
36757
|
-
import { useEffect as useEffect90, useMemo as
|
|
36879
|
+
import { useEffect as useEffect90, useMemo as useMemo172, useState as useState104 } from "react";
|
|
36758
36880
|
|
|
36759
36881
|
// src/state/marks.ts
|
|
36760
36882
|
var localStorageKey4 = () => `remotion.editor.marksv2`;
|
|
@@ -36773,7 +36895,7 @@ var loadMarks = () => {
|
|
|
36773
36895
|
import { jsx as jsx310 } from "react/jsx-runtime";
|
|
36774
36896
|
var SetTimelineInOutProvider = ({ children }) => {
|
|
36775
36897
|
const [inAndOutFrames, setInAndOutFrames] = useState104(() => loadMarks());
|
|
36776
|
-
const setTimelineInOutContextValue =
|
|
36898
|
+
const setTimelineInOutContextValue = useMemo172(() => {
|
|
36777
36899
|
return {
|
|
36778
36900
|
setInAndOutFrames
|
|
36779
36901
|
};
|
|
@@ -36791,7 +36913,7 @@ var SetTimelineInOutProvider = ({ children }) => {
|
|
|
36791
36913
|
};
|
|
36792
36914
|
|
|
36793
36915
|
// src/components/ShowGuidesProvider.tsx
|
|
36794
|
-
import { useCallback as useCallback162, useMemo as
|
|
36916
|
+
import { useCallback as useCallback162, useMemo as useMemo173, useRef as useRef57, useState as useState105 } from "react";
|
|
36795
36917
|
import { jsx as jsx311 } from "react/jsx-runtime";
|
|
36796
36918
|
var ShowGuidesProvider = ({ children }) => {
|
|
36797
36919
|
const [guidesList, setGuidesList] = useState105(() => loadGuidesList());
|
|
@@ -36807,7 +36929,7 @@ var ShowGuidesProvider = ({ children }) => {
|
|
|
36807
36929
|
return newVal;
|
|
36808
36930
|
});
|
|
36809
36931
|
}, []);
|
|
36810
|
-
const editorShowGuidesCtx =
|
|
36932
|
+
const editorShowGuidesCtx = useMemo173(() => {
|
|
36811
36933
|
return {
|
|
36812
36934
|
editorShowGuides,
|
|
36813
36935
|
setEditorShowGuides,
|
|
@@ -36834,7 +36956,7 @@ var ShowGuidesProvider = ({ children }) => {
|
|
|
36834
36956
|
};
|
|
36835
36957
|
|
|
36836
36958
|
// src/components/ShowRulersProvider.tsx
|
|
36837
|
-
import { useCallback as useCallback163, useMemo as
|
|
36959
|
+
import { useCallback as useCallback163, useMemo as useMemo174, useState as useState106 } from "react";
|
|
36838
36960
|
import { jsx as jsx312 } from "react/jsx-runtime";
|
|
36839
36961
|
var ShowRulersProvider = ({ children }) => {
|
|
36840
36962
|
const [editorShowRulers, setEditorShowRulersState] = useState106(() => loadEditorShowRulersOption());
|
|
@@ -36845,7 +36967,7 @@ var ShowRulersProvider = ({ children }) => {
|
|
|
36845
36967
|
return newVal;
|
|
36846
36968
|
});
|
|
36847
36969
|
}, []);
|
|
36848
|
-
const editorShowRulersCtx =
|
|
36970
|
+
const editorShowRulersCtx = useMemo174(() => {
|
|
36849
36971
|
return {
|
|
36850
36972
|
editorShowRulers,
|
|
36851
36973
|
setEditorShowRulers
|
|
@@ -36877,7 +36999,7 @@ var VisualControlsUndoSync = () => {
|
|
|
36877
36999
|
};
|
|
36878
37000
|
|
|
36879
37001
|
// src/components/ZoomGesturesProvider.tsx
|
|
36880
|
-
import { useCallback as useCallback164, useMemo as
|
|
37002
|
+
import { useCallback as useCallback164, useMemo as useMemo175, useState as useState107 } from "react";
|
|
36881
37003
|
import { jsx as jsx313 } from "react/jsx-runtime";
|
|
36882
37004
|
var ZoomGesturesProvider = ({ children }) => {
|
|
36883
37005
|
const [editorZoomGestures, setEditorZoomGesturesState] = useState107(() => loadEditorZoomGesturesOption());
|
|
@@ -36888,7 +37010,7 @@ var ZoomGesturesProvider = ({ children }) => {
|
|
|
36888
37010
|
return newVal;
|
|
36889
37011
|
});
|
|
36890
37012
|
}, []);
|
|
36891
|
-
const editorZoomGesturesCtx =
|
|
37013
|
+
const editorZoomGesturesCtx = useMemo175(() => {
|
|
36892
37014
|
return {
|
|
36893
37015
|
editorZoomGestures,
|
|
36894
37016
|
setEditorZoomGestures
|
|
@@ -37025,7 +37147,7 @@ var ServerDisconnected = () => {
|
|
|
37025
37147
|
};
|
|
37026
37148
|
|
|
37027
37149
|
// src/FastRefreshProvider.tsx
|
|
37028
|
-
import { useCallback as useCallback165, useEffect as useEffect92, useMemo as
|
|
37150
|
+
import { useCallback as useCallback165, useEffect as useEffect92, useMemo as useMemo176, useState as useState108 } from "react";
|
|
37029
37151
|
import { jsx as jsx316 } from "react/jsx-runtime";
|
|
37030
37152
|
var FastRefreshProvider = ({ children }) => {
|
|
37031
37153
|
const [fastRefreshes, setFastRefreshes] = useState108(0);
|
|
@@ -37044,7 +37166,7 @@ var FastRefreshProvider = ({ children }) => {
|
|
|
37044
37166
|
}
|
|
37045
37167
|
}
|
|
37046
37168
|
}, []);
|
|
37047
|
-
const value =
|
|
37169
|
+
const value = useMemo176(() => ({ fastRefreshes, manualRefreshes, increaseManualRefreshes }), [fastRefreshes, manualRefreshes, increaseManualRefreshes]);
|
|
37048
37170
|
return /* @__PURE__ */ jsx316(FastRefreshContext.Provider, {
|
|
37049
37171
|
value,
|
|
37050
37172
|
children
|
|
@@ -37216,7 +37338,7 @@ import {
|
|
|
37216
37338
|
useContext as useContext105,
|
|
37217
37339
|
useEffect as useEffect93,
|
|
37218
37340
|
useImperativeHandle as useImperativeHandle14,
|
|
37219
|
-
useMemo as
|
|
37341
|
+
useMemo as useMemo177,
|
|
37220
37342
|
useState as useState109
|
|
37221
37343
|
} from "react";
|
|
37222
37344
|
import { getInputProps as getInputProps2, Internals as Internals78 } from "remotion";
|
|
@@ -37226,20 +37348,20 @@ var ResolveCompositionConfigInStudio = ({ children }) => {
|
|
|
37226
37348
|
const { compositions, canvasContent, currentCompositionMetadata } = useContext105(Internals78.CompositionManager);
|
|
37227
37349
|
const { fastRefreshes, manualRefreshes } = useContext105(FastRefreshContext);
|
|
37228
37350
|
if (manualRefreshes) {}
|
|
37229
|
-
const selectedComposition =
|
|
37351
|
+
const selectedComposition = useMemo177(() => {
|
|
37230
37352
|
return compositions.find((c) => canvasContent && canvasContent.type === "composition" && canvasContent.compositionId === c.id);
|
|
37231
37353
|
}, [canvasContent, compositions]);
|
|
37232
37354
|
const renderModalComposition = compositions.find((c) => c.id === currentRenderModalComposition);
|
|
37233
37355
|
const { props: allEditorProps } = useContext105(Internals78.EditorPropsContext);
|
|
37234
37356
|
const env = Internals78.getRemotionEnvironment();
|
|
37235
|
-
const inputProps =
|
|
37357
|
+
const inputProps = useMemo177(() => {
|
|
37236
37358
|
return typeof window === "undefined" || env.isPlayer ? {} : getInputProps2() ?? {};
|
|
37237
37359
|
}, [env.isPlayer]);
|
|
37238
37360
|
const [resolvedConfigs, setResolvedConfigs] = useState109({});
|
|
37239
|
-
const selectedEditorProps =
|
|
37361
|
+
const selectedEditorProps = useMemo177(() => {
|
|
37240
37362
|
return selectedComposition ? allEditorProps[selectedComposition.id] ?? {} : {};
|
|
37241
37363
|
}, [allEditorProps, selectedComposition]);
|
|
37242
|
-
const renderModalProps =
|
|
37364
|
+
const renderModalProps = useMemo177(() => {
|
|
37243
37365
|
return renderModalComposition ? allEditorProps[renderModalComposition.id] ?? {} : {};
|
|
37244
37366
|
}, [allEditorProps, renderModalComposition]);
|
|
37245
37367
|
const hasResolution = Boolean(currentCompositionMetadata);
|
|
@@ -37376,13 +37498,13 @@ var ResolveCompositionConfigInStudio = ({ children }) => {
|
|
|
37376
37498
|
inputProps
|
|
37377
37499
|
]);
|
|
37378
37500
|
const isTheSame = selectedComposition?.id === renderModalComposition?.id;
|
|
37379
|
-
const currentDefaultProps =
|
|
37501
|
+
const currentDefaultProps = useMemo177(() => {
|
|
37380
37502
|
return {
|
|
37381
37503
|
...selectedComposition?.defaultProps ?? {},
|
|
37382
37504
|
...selectedEditorProps ?? {}
|
|
37383
37505
|
};
|
|
37384
37506
|
}, [selectedComposition?.defaultProps, selectedEditorProps]);
|
|
37385
|
-
const originalProps =
|
|
37507
|
+
const originalProps = useMemo177(() => {
|
|
37386
37508
|
return {
|
|
37387
37509
|
...currentDefaultProps,
|
|
37388
37510
|
...inputProps ?? {}
|
|
@@ -37451,7 +37573,7 @@ var ResolveCompositionConfigInStudio = ({ children }) => {
|
|
|
37451
37573
|
renderModalComposition,
|
|
37452
37574
|
renderModalProps
|
|
37453
37575
|
]);
|
|
37454
|
-
const resolvedConfigsIncludingStaticOnes =
|
|
37576
|
+
const resolvedConfigsIncludingStaticOnes = useMemo177(() => {
|
|
37455
37577
|
const staticComps = compositions.filter((c) => {
|
|
37456
37578
|
return c.calculateMetadata === null;
|
|
37457
37579
|
});
|