@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
package/dist/esm/internals.mjs
CHANGED
|
@@ -29,7 +29,7 @@ import { Internals as Internals79 } from "remotion";
|
|
|
29
29
|
|
|
30
30
|
// src/components/Editor.tsx
|
|
31
31
|
import { PlayerInternals as PlayerInternals20 } from "@remotion/player";
|
|
32
|
-
import React201, { useCallback as useCallback159, useMemo as
|
|
32
|
+
import React201, { useCallback as useCallback159, useMemo as useMemo167, useState as useState99 } from "react";
|
|
33
33
|
import { Internals as Internals74 } from "remotion";
|
|
34
34
|
|
|
35
35
|
// src/helpers/colors.ts
|
|
@@ -2531,11 +2531,13 @@ var openInFileExplorer = ({ directory }) => {
|
|
|
2531
2531
|
var applyCodemod = ({
|
|
2532
2532
|
codemod,
|
|
2533
2533
|
dryRun,
|
|
2534
|
+
symbolicatedStack,
|
|
2534
2535
|
signal
|
|
2535
2536
|
}) => {
|
|
2536
2537
|
const body = {
|
|
2537
2538
|
codemod,
|
|
2538
|
-
dryRun
|
|
2539
|
+
dryRun,
|
|
2540
|
+
symbolicatedStack
|
|
2539
2541
|
};
|
|
2540
2542
|
return callApi("/api/apply-codemod", body, signal);
|
|
2541
2543
|
};
|
|
@@ -2552,9 +2554,6 @@ var cancelRenderJob = (job) => {
|
|
|
2552
2554
|
var updateAvailable = (signal) => {
|
|
2553
2555
|
return callApi("/api/update-available", {}, signal);
|
|
2554
2556
|
};
|
|
2555
|
-
var getProjectInfo = (signal) => {
|
|
2556
|
-
return callApi("/api/project-info", {}, signal);
|
|
2557
|
-
};
|
|
2558
2557
|
var callUpdateDefaultPropsApi = (compositionId, defaultProps, enumPaths) => {
|
|
2559
2558
|
return callApi("/api/update-default-props", {
|
|
2560
2559
|
compositionId,
|
|
@@ -9943,6 +9942,12 @@ var getOriginalLocationFromStack = async (stack2, type) => {
|
|
|
9943
9942
|
|
|
9944
9943
|
// src/components/Timeline/use-resolved-stack.ts
|
|
9945
9944
|
var resolvedCache = new Map;
|
|
9945
|
+
var hasResolvedStack = (stack2) => {
|
|
9946
|
+
if (!stack2) {
|
|
9947
|
+
return true;
|
|
9948
|
+
}
|
|
9949
|
+
return resolvedCache.has(stack2);
|
|
9950
|
+
};
|
|
9946
9951
|
var inFlight = new Set;
|
|
9947
9952
|
var subscribers = new Map;
|
|
9948
9953
|
var useResolvedStack = (stack2) => {
|
|
@@ -9974,6 +9979,8 @@ var useResolvedStack = (stack2) => {
|
|
|
9974
9979
|
subs.forEach((fn) => fn(frame2));
|
|
9975
9980
|
}).catch((err) => {
|
|
9976
9981
|
console.error("Could not get original location of Sequence", err);
|
|
9982
|
+
resolvedCache.set(stack2, null);
|
|
9983
|
+
subs.forEach((fn) => fn(null));
|
|
9977
9984
|
}).finally(() => {
|
|
9978
9985
|
inFlight.delete(stack2);
|
|
9979
9986
|
});
|
|
@@ -22748,7 +22755,7 @@ var TimeValue = () => {
|
|
|
22748
22755
|
import { jsx as jsx202 } from "react/jsx-runtime";
|
|
22749
22756
|
var TIMELINE_TIME_INDICATOR_HEIGHT = 39;
|
|
22750
22757
|
var container39 = {
|
|
22751
|
-
height: TIMELINE_TIME_INDICATOR_HEIGHT
|
|
22758
|
+
height: TIMELINE_TIME_INDICATOR_HEIGHT,
|
|
22752
22759
|
boxShadow: `0 0 4px ${TIMELINE_BACKGROUND}`,
|
|
22753
22760
|
position: "absolute",
|
|
22754
22761
|
backgroundColor: TIMELINE_BACKGROUND,
|
|
@@ -22834,9 +22841,8 @@ var TimelineTimeIndicatorsInner = ({ windowWidth, durationInFrames, fps }) => {
|
|
|
22834
22841
|
const style10 = useMemo115(() => {
|
|
22835
22842
|
return {
|
|
22836
22843
|
...container39,
|
|
22837
|
-
width: windowWidth
|
|
22844
|
+
width: windowWidth,
|
|
22838
22845
|
overflow: "hidden",
|
|
22839
|
-
marginLeft: SPLITTER_HANDLE_SIZE / 2,
|
|
22840
22846
|
pointerEvents: "none"
|
|
22841
22847
|
};
|
|
22842
22848
|
}, [windowWidth]);
|
|
@@ -22853,7 +22859,7 @@ var TimelineTimeIndicatorsInner = ({ windowWidth, durationInFrames, fps }) => {
|
|
|
22853
22859
|
frame: index * fps,
|
|
22854
22860
|
style: {
|
|
22855
22861
|
...secondTick,
|
|
22856
|
-
left: frameInterval * index * fps + TIMELINE_PADDING
|
|
22862
|
+
left: frameInterval * index * fps + TIMELINE_PADDING
|
|
22857
22863
|
},
|
|
22858
22864
|
showTime: index > 0
|
|
22859
22865
|
};
|
|
@@ -22863,7 +22869,7 @@ var TimelineTimeIndicatorsInner = ({ windowWidth, durationInFrames, fps }) => {
|
|
|
22863
22869
|
frame: index,
|
|
22864
22870
|
style: {
|
|
22865
22871
|
...tick,
|
|
22866
|
-
left: frameInterval * index + TIMELINE_PADDING
|
|
22872
|
+
left: frameInterval * index + TIMELINE_PADDING,
|
|
22867
22873
|
height: index % fps === 0 ? 10 : index / frameMarkerEveryNth % 2 === 0 ? 5 : 2
|
|
22868
22874
|
},
|
|
22869
22875
|
showTime: false
|
|
@@ -24084,6 +24090,50 @@ var TimelineEffectGroupRow = ({
|
|
|
24084
24090
|
return false;
|
|
24085
24091
|
}, [disabledStatus]);
|
|
24086
24092
|
const canToggle = previewConnected && disabledStatus !== null && disabledStatus.canUpdate;
|
|
24093
|
+
const deleteDisabled = !previewConnected || effectStatus.type !== "can-update-effect" || !validatedLocation.source;
|
|
24094
|
+
const onDeleteEffectFromSource = useCallback117(async () => {
|
|
24095
|
+
if (deleteDisabled) {
|
|
24096
|
+
return;
|
|
24097
|
+
}
|
|
24098
|
+
try {
|
|
24099
|
+
const result = await callApi("/api/delete-effect", {
|
|
24100
|
+
fileName: validatedLocation.source,
|
|
24101
|
+
sequenceNodePath: nodePath,
|
|
24102
|
+
effectIndex
|
|
24103
|
+
});
|
|
24104
|
+
if (result.success) {
|
|
24105
|
+
showNotification("Removed effect from source file", 2000);
|
|
24106
|
+
} else {
|
|
24107
|
+
showNotification(result.reason, 4000);
|
|
24108
|
+
}
|
|
24109
|
+
} catch (err) {
|
|
24110
|
+
showNotification(err.message, 4000);
|
|
24111
|
+
}
|
|
24112
|
+
}, [deleteDisabled, effectIndex, nodePath, validatedLocation.source]);
|
|
24113
|
+
const contextMenuValues = useMemo127(() => {
|
|
24114
|
+
if (!previewConnected) {
|
|
24115
|
+
return [];
|
|
24116
|
+
}
|
|
24117
|
+
return [
|
|
24118
|
+
{
|
|
24119
|
+
type: "item",
|
|
24120
|
+
id: "delete-effect",
|
|
24121
|
+
keyHint: null,
|
|
24122
|
+
label: "Delete",
|
|
24123
|
+
leftItem: null,
|
|
24124
|
+
disabled: deleteDisabled,
|
|
24125
|
+
onClick: () => {
|
|
24126
|
+
if (deleteDisabled) {
|
|
24127
|
+
return;
|
|
24128
|
+
}
|
|
24129
|
+
onDeleteEffectFromSource();
|
|
24130
|
+
},
|
|
24131
|
+
quickSwitcherLabel: null,
|
|
24132
|
+
subMenu: null,
|
|
24133
|
+
value: "delete-effect"
|
|
24134
|
+
}
|
|
24135
|
+
];
|
|
24136
|
+
}, [deleteDisabled, onDeleteEffectFromSource, previewConnected]);
|
|
24087
24137
|
const onToggle = useCallback117((type) => {
|
|
24088
24138
|
if (!canToggle || previewServerState.type !== "connected") {
|
|
24089
24139
|
return;
|
|
@@ -24116,7 +24166,7 @@ var TimelineEffectGroupRow = ({
|
|
|
24116
24166
|
height: TREE_GROUP_ROW_HEIGHT,
|
|
24117
24167
|
paddingRight: EXPANDED_SECTION_PADDING_RIGHT
|
|
24118
24168
|
}), []);
|
|
24119
|
-
|
|
24169
|
+
const row7 = /* @__PURE__ */ jsx216(TimelineRowChrome, {
|
|
24120
24170
|
depth: rowDepth,
|
|
24121
24171
|
eye: canToggle ? /* @__PURE__ */ jsx216(TimelineLayerEye, {
|
|
24122
24172
|
type: "effect",
|
|
@@ -24135,6 +24185,10 @@ var TimelineEffectGroupRow = ({
|
|
|
24135
24185
|
children: label8
|
|
24136
24186
|
})
|
|
24137
24187
|
});
|
|
24188
|
+
return previewConnected ? /* @__PURE__ */ jsx216(ContextMenu, {
|
|
24189
|
+
values: contextMenuValues,
|
|
24190
|
+
children: row7
|
|
24191
|
+
}) : row7;
|
|
24138
24192
|
};
|
|
24139
24193
|
|
|
24140
24194
|
// src/components/Timeline/TimelineFieldRow.tsx
|
|
@@ -25727,6 +25781,22 @@ import {
|
|
|
25727
25781
|
} from "@remotion/timeline-utils";
|
|
25728
25782
|
import { useEffect as useEffect76, useMemo as useMemo134, useRef as useRef50, useState as useState79 } from "react";
|
|
25729
25783
|
import { useVideoConfig as useVideoConfig5 } from "remotion";
|
|
25784
|
+
|
|
25785
|
+
// src/components/Timeline/get-timeline-video-info-widths.ts
|
|
25786
|
+
var getTimelineVideoInfoWidths = ({
|
|
25787
|
+
visualizationWidth,
|
|
25788
|
+
naturalWidth,
|
|
25789
|
+
premountWidth,
|
|
25790
|
+
postmountWidth
|
|
25791
|
+
}) => {
|
|
25792
|
+
const mountWidth = premountWidth + postmountWidth;
|
|
25793
|
+
return {
|
|
25794
|
+
mediaVisualizationWidth: Math.max(0, visualizationWidth - mountWidth),
|
|
25795
|
+
mediaNaturalWidth: Math.max(0, naturalWidth - mountWidth)
|
|
25796
|
+
};
|
|
25797
|
+
};
|
|
25798
|
+
|
|
25799
|
+
// src/components/Timeline/TimelineVideoInfo.tsx
|
|
25730
25800
|
import { jsx as jsx229, jsxs as jsxs109 } from "react/jsx-runtime";
|
|
25731
25801
|
var FILMSTRIP_HEIGHT = TIMELINE_LAYER_HEIGHT_IMAGE - 2;
|
|
25732
25802
|
var outerStyle = {
|
|
@@ -25737,7 +25807,6 @@ var outerStyle = {
|
|
|
25737
25807
|
};
|
|
25738
25808
|
var filmstripContainerStyle = {
|
|
25739
25809
|
height: FILMSTRIP_HEIGHT,
|
|
25740
|
-
width: "100%",
|
|
25741
25810
|
backgroundColor: "rgba(0, 0, 0, 0.3)",
|
|
25742
25811
|
display: "flex",
|
|
25743
25812
|
borderTopLeftRadius: 2,
|
|
@@ -25761,6 +25830,14 @@ var TimelineVideoInfo = ({
|
|
|
25761
25830
|
const ref2 = useRef50(null);
|
|
25762
25831
|
const [error, setError] = useState79(null);
|
|
25763
25832
|
const aspectRatio = useRef50(getAspectRatioFromCache(src));
|
|
25833
|
+
const { mediaVisualizationWidth, mediaNaturalWidth } = useMemo134(() => {
|
|
25834
|
+
return getTimelineVideoInfoWidths({
|
|
25835
|
+
visualizationWidth,
|
|
25836
|
+
naturalWidth,
|
|
25837
|
+
premountWidth,
|
|
25838
|
+
postmountWidth
|
|
25839
|
+
});
|
|
25840
|
+
}, [naturalWidth, postmountWidth, premountWidth, visualizationWidth]);
|
|
25764
25841
|
useEffect76(() => {
|
|
25765
25842
|
if (error) {
|
|
25766
25843
|
return;
|
|
@@ -25771,7 +25848,7 @@ var TimelineVideoInfo = ({
|
|
|
25771
25848
|
}
|
|
25772
25849
|
const controller = new AbortController;
|
|
25773
25850
|
const canvas = document.createElement("canvas");
|
|
25774
|
-
canvas.width =
|
|
25851
|
+
canvas.width = mediaVisualizationWidth;
|
|
25775
25852
|
canvas.height = FILMSTRIP_HEIGHT;
|
|
25776
25853
|
const ctx = canvas.getContext("2d");
|
|
25777
25854
|
if (!ctx) {
|
|
@@ -25779,7 +25856,7 @@ var TimelineVideoInfo = ({
|
|
|
25779
25856
|
}
|
|
25780
25857
|
current.appendChild(canvas);
|
|
25781
25858
|
const loopWidth = getLoopDisplayWidth2({
|
|
25782
|
-
visualizationWidth:
|
|
25859
|
+
visualizationWidth: mediaNaturalWidth,
|
|
25783
25860
|
loopDisplay
|
|
25784
25861
|
});
|
|
25785
25862
|
const shouldRepeatVideo = shouldTileLoopDisplay2(loopDisplay);
|
|
@@ -25808,7 +25885,7 @@ var TimelineVideoInfo = ({
|
|
|
25808
25885
|
const fromSeconds = trimBefore / fps;
|
|
25809
25886
|
const visibleDurationInFrames = shouldRepeatVideo && loopDisplay ? loopDisplay.durationInFrames : durationInFrames;
|
|
25810
25887
|
const toSeconds = fromSeconds + visibleDurationInFrames * playbackRate / fps;
|
|
25811
|
-
const targetWidth = shouldRepeatVideo ? targetCanvas.width :
|
|
25888
|
+
const targetWidth = shouldRepeatVideo ? targetCanvas.width : mediaNaturalWidth;
|
|
25812
25889
|
if (aspectRatio.current !== null) {
|
|
25813
25890
|
ensureSlots({
|
|
25814
25891
|
filledSlots,
|
|
@@ -25927,13 +26004,20 @@ var TimelineVideoInfo = ({
|
|
|
25927
26004
|
error,
|
|
25928
26005
|
fps,
|
|
25929
26006
|
loopDisplay,
|
|
25930
|
-
|
|
26007
|
+
mediaNaturalWidth,
|
|
26008
|
+
mediaVisualizationWidth,
|
|
25931
26009
|
playbackRate,
|
|
25932
26010
|
src,
|
|
25933
|
-
trimBefore
|
|
25934
|
-
visualizationWidth
|
|
26011
|
+
trimBefore
|
|
25935
26012
|
]);
|
|
25936
|
-
const audioWidth =
|
|
26013
|
+
const audioWidth = mediaVisualizationWidth;
|
|
26014
|
+
const filmstripStyle = useMemo134(() => {
|
|
26015
|
+
return {
|
|
26016
|
+
...filmstripContainerStyle,
|
|
26017
|
+
width: mediaVisualizationWidth,
|
|
26018
|
+
marginLeft: premountWidth
|
|
26019
|
+
};
|
|
26020
|
+
}, [mediaVisualizationWidth, premountWidth]);
|
|
25937
26021
|
const audioStyle = useMemo134(() => {
|
|
25938
26022
|
return {
|
|
25939
26023
|
height: TIMELINE_LAYER_HEIGHT_AUDIO,
|
|
@@ -25947,7 +26031,7 @@ var TimelineVideoInfo = ({
|
|
|
25947
26031
|
children: [
|
|
25948
26032
|
/* @__PURE__ */ jsx229("div", {
|
|
25949
26033
|
ref: ref2,
|
|
25950
|
-
style:
|
|
26034
|
+
style: filmstripStyle
|
|
25951
26035
|
}),
|
|
25952
26036
|
/* @__PURE__ */ jsx229("div", {
|
|
25953
26037
|
style: audioStyle,
|
|
@@ -26781,7 +26865,7 @@ var InstallPackageModal = ({ packageManager }) => {
|
|
|
26781
26865
|
};
|
|
26782
26866
|
|
|
26783
26867
|
// src/components/NewComposition/DeleteComposition.tsx
|
|
26784
|
-
import { useCallback as useCallback125, useContext as useContext92, useMemo as
|
|
26868
|
+
import { useCallback as useCallback125, useContext as useContext92, useMemo as useMemo141 } from "react";
|
|
26785
26869
|
|
|
26786
26870
|
// src/components/RenderModal/ResolveCompositionBeforeModal.tsx
|
|
26787
26871
|
import React169, { useContext as useContext90, useEffect as useEffect79, useMemo as useMemo139 } from "react";
|
|
@@ -26866,7 +26950,27 @@ var ResolveCompositionBeforeModal = ({ compositionId, children }) => {
|
|
|
26866
26950
|
};
|
|
26867
26951
|
|
|
26868
26952
|
// src/components/NewComposition/CodemodFooter.tsx
|
|
26869
|
-
import {
|
|
26953
|
+
import {
|
|
26954
|
+
useCallback as useCallback124,
|
|
26955
|
+
useContext as useContext91,
|
|
26956
|
+
useEffect as useEffect80,
|
|
26957
|
+
useMemo as useMemo140,
|
|
26958
|
+
useState as useState80
|
|
26959
|
+
} from "react";
|
|
26960
|
+
|
|
26961
|
+
// src/helpers/resolved-stack-to-symbolicated.ts
|
|
26962
|
+
var resolvedStackToSymbolicated = (location2) => {
|
|
26963
|
+
if (!location2?.source) {
|
|
26964
|
+
return null;
|
|
26965
|
+
}
|
|
26966
|
+
return {
|
|
26967
|
+
originalFileName: location2.source,
|
|
26968
|
+
originalLineNumber: location2.line,
|
|
26969
|
+
originalColumnNumber: location2.column,
|
|
26970
|
+
originalFunctionName: null,
|
|
26971
|
+
originalScriptCode: null
|
|
26972
|
+
};
|
|
26973
|
+
};
|
|
26870
26974
|
|
|
26871
26975
|
// src/components/NewComposition/DiffPreview.tsx
|
|
26872
26976
|
import { jsx as jsx241, jsxs as jsxs117 } from "react/jsx-runtime";
|
|
@@ -26885,7 +26989,7 @@ var CodemodDiffPreview = ({ status }) => {
|
|
|
26885
26989
|
children: [
|
|
26886
26990
|
/* @__PURE__ */ jsx241("span", {
|
|
26887
26991
|
style: { color: LIGHT_TEXT, fontSize: 13, lineHeight: 1.2 },
|
|
26888
|
-
children: "This will edit your
|
|
26992
|
+
children: "This will edit your codebase."
|
|
26889
26993
|
}),
|
|
26890
26994
|
/* @__PURE__ */ jsx241("br", {}),
|
|
26891
26995
|
/* @__PURE__ */ jsxs117("span", {
|
|
@@ -26918,6 +27022,7 @@ var CodemodDiffPreview = ({ status }) => {
|
|
|
26918
27022
|
import { jsx as jsx242, jsxs as jsxs118 } from "react/jsx-runtime";
|
|
26919
27023
|
var CodemodFooter = ({
|
|
26920
27024
|
codemod,
|
|
27025
|
+
stack: stack2,
|
|
26921
27026
|
valid,
|
|
26922
27027
|
loadingNotification,
|
|
26923
27028
|
successNotification,
|
|
@@ -26931,18 +27036,9 @@ var CodemodFooter = ({
|
|
|
26931
27036
|
const [codemodStatus, setCanApplyCodemod] = useState80({
|
|
26932
27037
|
type: "loading"
|
|
26933
27038
|
});
|
|
26934
|
-
const
|
|
26935
|
-
|
|
26936
|
-
|
|
26937
|
-
getProjectInfo(controller.signal).then((info) => {
|
|
26938
|
-
setProjectInfo(info.projectInfo);
|
|
26939
|
-
}).catch((err) => {
|
|
26940
|
-
showNotification(`Could not get project info: ${err.message}. Unable to duplicate composition`, 3000);
|
|
26941
|
-
});
|
|
26942
|
-
return () => {
|
|
26943
|
-
controller.abort();
|
|
26944
|
-
};
|
|
26945
|
-
}, []);
|
|
27039
|
+
const resolvedLocation = useResolvedStack(stack2);
|
|
27040
|
+
const symbolicatedStack = useMemo140(() => resolvedStackToSymbolicated(resolvedLocation), [resolvedLocation]);
|
|
27041
|
+
const relativeFilePath = symbolicatedStack?.originalFileName ?? null;
|
|
26946
27042
|
const trigger = useCallback124(() => {
|
|
26947
27043
|
setSubmitting(true);
|
|
26948
27044
|
setSelectedModal(null);
|
|
@@ -26950,6 +27046,7 @@ var CodemodFooter = ({
|
|
|
26950
27046
|
applyCodemod({
|
|
26951
27047
|
codemod,
|
|
26952
27048
|
dryRun: false,
|
|
27049
|
+
symbolicatedStack,
|
|
26953
27050
|
signal: new AbortController().signal
|
|
26954
27051
|
}).then(() => {
|
|
26955
27052
|
notification2.replaceContent(successNotification, 2000);
|
|
@@ -26963,12 +27060,14 @@ var CodemodFooter = ({
|
|
|
26963
27060
|
loadingNotification,
|
|
26964
27061
|
onSuccess,
|
|
26965
27062
|
setSelectedModal,
|
|
26966
|
-
successNotification
|
|
27063
|
+
successNotification,
|
|
27064
|
+
symbolicatedStack
|
|
26967
27065
|
]);
|
|
26968
27066
|
const getCanApplyCodemod = useCallback124(async (signal) => {
|
|
26969
27067
|
const res = await applyCodemod({
|
|
26970
27068
|
codemod,
|
|
26971
27069
|
dryRun: true,
|
|
27070
|
+
symbolicatedStack,
|
|
26972
27071
|
signal
|
|
26973
27072
|
});
|
|
26974
27073
|
if (res.success) {
|
|
@@ -26979,8 +27078,25 @@ var CodemodFooter = ({
|
|
|
26979
27078
|
error: res.reason
|
|
26980
27079
|
});
|
|
26981
27080
|
}
|
|
26982
|
-
}, [codemod]);
|
|
27081
|
+
}, [codemod, symbolicatedStack]);
|
|
26983
27082
|
useEffect80(() => {
|
|
27083
|
+
if (!stack2) {
|
|
27084
|
+
setCanApplyCodemod({
|
|
27085
|
+
type: "fail",
|
|
27086
|
+
error: "Could not determine where this composition is defined"
|
|
27087
|
+
});
|
|
27088
|
+
return;
|
|
27089
|
+
}
|
|
27090
|
+
if (!hasResolvedStack(stack2)) {
|
|
27091
|
+
return;
|
|
27092
|
+
}
|
|
27093
|
+
if (!symbolicatedStack) {
|
|
27094
|
+
setCanApplyCodemod({
|
|
27095
|
+
type: "fail",
|
|
27096
|
+
error: "Could not resolve the source location of this composition"
|
|
27097
|
+
});
|
|
27098
|
+
return;
|
|
27099
|
+
}
|
|
26984
27100
|
const abortController = new AbortController;
|
|
26985
27101
|
let aborted = false;
|
|
26986
27102
|
getCanApplyCodemod(abortController.signal).then(() => {
|
|
@@ -26989,14 +27105,14 @@ var CodemodFooter = ({
|
|
|
26989
27105
|
if (aborted) {
|
|
26990
27106
|
return;
|
|
26991
27107
|
}
|
|
26992
|
-
showNotification(
|
|
27108
|
+
showNotification(`${errorNotification}: ${err.message}`, 3000);
|
|
26993
27109
|
});
|
|
26994
27110
|
return () => {
|
|
26995
27111
|
aborted = true;
|
|
26996
27112
|
abortController.abort();
|
|
26997
27113
|
};
|
|
26998
|
-
}, [getCanApplyCodemod]);
|
|
26999
|
-
const disabled = !valid || submitting ||
|
|
27114
|
+
}, [errorNotification, getCanApplyCodemod, stack2, symbolicatedStack]);
|
|
27115
|
+
const disabled = !valid || submitting || symbolicatedStack === null || codemodStatus.type !== "success";
|
|
27000
27116
|
const { registerKeybinding } = useKeybinding();
|
|
27001
27117
|
useEffect80(() => {
|
|
27002
27118
|
if (disabled) {
|
|
@@ -27006,7 +27122,7 @@ var CodemodFooter = ({
|
|
|
27006
27122
|
callback() {
|
|
27007
27123
|
trigger();
|
|
27008
27124
|
},
|
|
27009
|
-
commandCtrlKey:
|
|
27125
|
+
commandCtrlKey: false,
|
|
27010
27126
|
key: "Enter",
|
|
27011
27127
|
event: "keydown",
|
|
27012
27128
|
preventDefault: true,
|
|
@@ -27032,10 +27148,10 @@ var CodemodFooter = ({
|
|
|
27032
27148
|
onClick: trigger,
|
|
27033
27149
|
disabled,
|
|
27034
27150
|
children: [
|
|
27035
|
-
|
|
27151
|
+
relativeFilePath ? submitLabel({ relativeRootPath: relativeFilePath }) : genericSubmitLabel,
|
|
27036
27152
|
/* @__PURE__ */ jsx242(ShortcutHint, {
|
|
27037
27153
|
keyToPress: "↵",
|
|
27038
|
-
cmdOrCtrl:
|
|
27154
|
+
cmdOrCtrl: false
|
|
27039
27155
|
})
|
|
27040
27156
|
]
|
|
27041
27157
|
})
|
|
@@ -27057,7 +27173,8 @@ var DeleteCompositionLoaded = ({ compositionId }) => {
|
|
|
27057
27173
|
throw new Error("Resolved composition context");
|
|
27058
27174
|
}
|
|
27059
27175
|
const { unresolved } = context;
|
|
27060
|
-
const
|
|
27176
|
+
const compositionStack = unresolved.stack ?? null;
|
|
27177
|
+
const codemod = useMemo141(() => {
|
|
27061
27178
|
return {
|
|
27062
27179
|
type: "delete-composition",
|
|
27063
27180
|
idToDelete: compositionId
|
|
@@ -27106,6 +27223,7 @@ var DeleteCompositionLoaded = ({ compositionId }) => {
|
|
|
27106
27223
|
genericSubmitLabel: `Delete`,
|
|
27107
27224
|
submitLabel: ({ relativeRootPath }) => `Delete from ${relativeRootPath}`,
|
|
27108
27225
|
codemod,
|
|
27226
|
+
stack: compositionStack,
|
|
27109
27227
|
valid: true,
|
|
27110
27228
|
onSuccess: null
|
|
27111
27229
|
})
|
|
@@ -27127,7 +27245,7 @@ var DeleteComposition = ({ compositionId }) => {
|
|
|
27127
27245
|
};
|
|
27128
27246
|
|
|
27129
27247
|
// src/components/NewComposition/DuplicateComposition.tsx
|
|
27130
|
-
import { useCallback as useCallback127, useContext as useContext93, useMemo as
|
|
27248
|
+
import { useCallback as useCallback127, useContext as useContext93, useMemo as useMemo142, useState as useState81 } from "react";
|
|
27131
27249
|
import { Internals as Internals69 } from "remotion";
|
|
27132
27250
|
|
|
27133
27251
|
// src/helpers/validate-new-comp-data.ts
|
|
@@ -27238,6 +27356,7 @@ var DuplicateCompositionLoaded = ({ initialType }) => {
|
|
|
27238
27356
|
throw new Error("Resolved composition context");
|
|
27239
27357
|
}
|
|
27240
27358
|
const { resolved, unresolved } = context;
|
|
27359
|
+
const compositionStack = unresolved.stack ?? null;
|
|
27241
27360
|
const [initialCompType] = useState81(initialType);
|
|
27242
27361
|
const hadDimensionsDefined = unresolved.width && unresolved.height;
|
|
27243
27362
|
const hadFpsDefined = unresolved.fps !== undefined;
|
|
@@ -27318,7 +27437,7 @@ var DuplicateCompositionLoaded = ({ initialType }) => {
|
|
|
27318
27437
|
const compNameErrMessage = validateCompositionName(newId, compositions);
|
|
27319
27438
|
const compWidthErrMessage = validateCompositionDimension("Width", size3.width);
|
|
27320
27439
|
const compHeightErrMessage = validateCompositionDimension("Height", size3.height);
|
|
27321
|
-
const typeValues =
|
|
27440
|
+
const typeValues = useMemo142(() => {
|
|
27322
27441
|
return [
|
|
27323
27442
|
{
|
|
27324
27443
|
id: "composition",
|
|
@@ -27345,7 +27464,7 @@ var DuplicateCompositionLoaded = ({ initialType }) => {
|
|
|
27345
27464
|
];
|
|
27346
27465
|
}, [onTypeChanged]);
|
|
27347
27466
|
const valid = compNameErrMessage === null && compWidthErrMessage === null && compHeightErrMessage === null;
|
|
27348
|
-
const codemod =
|
|
27467
|
+
const codemod = useMemo142(() => {
|
|
27349
27468
|
return {
|
|
27350
27469
|
type: "duplicate-composition",
|
|
27351
27470
|
idToDuplicate: resolved.result.id,
|
|
@@ -27569,6 +27688,7 @@ var DuplicateCompositionLoaded = ({ initialType }) => {
|
|
|
27569
27688
|
genericSubmitLabel: "Duplicate",
|
|
27570
27689
|
submitLabel: ({ relativeRootPath }) => `Add to ${relativeRootPath}`,
|
|
27571
27690
|
codemod,
|
|
27691
|
+
stack: compositionStack,
|
|
27572
27692
|
valid,
|
|
27573
27693
|
onSuccess: onDuplicateSuccess
|
|
27574
27694
|
})
|
|
@@ -27590,7 +27710,7 @@ var DuplicateComposition = ({ compositionId, compositionType }) => {
|
|
|
27590
27710
|
};
|
|
27591
27711
|
|
|
27592
27712
|
// src/components/NewComposition/RenameComposition.tsx
|
|
27593
|
-
import { useCallback as useCallback128, useContext as useContext94, useMemo as
|
|
27713
|
+
import { useCallback as useCallback128, useContext as useContext94, useMemo as useMemo143, useState as useState82 } from "react";
|
|
27594
27714
|
import { Internals as Internals70 } from "remotion";
|
|
27595
27715
|
import { jsx as jsx246, jsxs as jsxs122, Fragment as Fragment37 } from "react/jsx-runtime";
|
|
27596
27716
|
var content5 = {
|
|
@@ -27605,7 +27725,8 @@ var RenameCompositionLoaded = () => {
|
|
|
27605
27725
|
if (!context) {
|
|
27606
27726
|
throw new Error("Resolved composition context");
|
|
27607
27727
|
}
|
|
27608
|
-
const { resolved } = context;
|
|
27728
|
+
const { resolved, unresolved } = context;
|
|
27729
|
+
const compositionStack = unresolved.stack ?? null;
|
|
27609
27730
|
const { compositions } = useContext94(Internals70.CompositionManager);
|
|
27610
27731
|
const [newId, setName] = useState82(() => {
|
|
27611
27732
|
return resolved.result.id;
|
|
@@ -27615,7 +27736,7 @@ var RenameCompositionLoaded = () => {
|
|
|
27615
27736
|
}, []);
|
|
27616
27737
|
const compNameErrMessage = newId === resolved.result.id ? null : validateCompositionName(newId, compositions);
|
|
27617
27738
|
const valid = compNameErrMessage === null && resolved.result.id !== newId;
|
|
27618
|
-
const codemod =
|
|
27739
|
+
const codemod = useMemo143(() => {
|
|
27619
27740
|
return {
|
|
27620
27741
|
type: "rename-composition",
|
|
27621
27742
|
idToRename: resolved.result.id,
|
|
@@ -27682,6 +27803,7 @@ var RenameCompositionLoaded = () => {
|
|
|
27682
27803
|
genericSubmitLabel: "Rename",
|
|
27683
27804
|
submitLabel: ({ relativeRootPath }) => `Modify ${relativeRootPath}`,
|
|
27684
27805
|
codemod,
|
|
27806
|
+
stack: compositionStack,
|
|
27685
27807
|
valid,
|
|
27686
27808
|
onSuccess: null
|
|
27687
27809
|
})
|
|
@@ -27701,7 +27823,7 @@ var RenameComposition = ({ compositionId }) => {
|
|
|
27701
27823
|
};
|
|
27702
27824
|
|
|
27703
27825
|
// src/components/OverrideInputProps.tsx
|
|
27704
|
-
import { useCallback as useCallback129, useContext as useContext95, useMemo as
|
|
27826
|
+
import { useCallback as useCallback129, useContext as useContext95, useMemo as useMemo144, useState as useState83 } from "react";
|
|
27705
27827
|
import { Internals as Internals71 } from "remotion";
|
|
27706
27828
|
import { jsx as jsx247, jsxs as jsxs123 } from "react/jsx-runtime";
|
|
27707
27829
|
var style10 = {
|
|
@@ -27745,7 +27867,7 @@ var Inner = () => {
|
|
|
27745
27867
|
return null;
|
|
27746
27868
|
});
|
|
27747
27869
|
const { setSelectedModal } = useContext95(ModalsContext);
|
|
27748
|
-
const valid =
|
|
27870
|
+
const valid = useMemo144(() => {
|
|
27749
27871
|
if (!value)
|
|
27750
27872
|
return true;
|
|
27751
27873
|
return isValidJSON(value);
|
|
@@ -27827,7 +27949,7 @@ import {
|
|
|
27827
27949
|
useCallback as useCallback130,
|
|
27828
27950
|
useContext as useContext96,
|
|
27829
27951
|
useEffect as useEffect82,
|
|
27830
|
-
useMemo as
|
|
27952
|
+
useMemo as useMemo146,
|
|
27831
27953
|
useRef as useRef52,
|
|
27832
27954
|
useState as useState85
|
|
27833
27955
|
} from "react";
|
|
@@ -28726,7 +28848,7 @@ var QuickSwitcherNoResults = ({ query, mode }) => {
|
|
|
28726
28848
|
};
|
|
28727
28849
|
|
|
28728
28850
|
// src/components/QuickSwitcher/QuickSwitcherResult.tsx
|
|
28729
|
-
import { useEffect as useEffect81, useMemo as
|
|
28851
|
+
import { useEffect as useEffect81, useMemo as useMemo145, useRef as useRef51, useState as useState84 } from "react";
|
|
28730
28852
|
import { jsx as jsx251, jsxs as jsxs126, Fragment as Fragment39 } from "react/jsx-runtime";
|
|
28731
28853
|
var container49 = {
|
|
28732
28854
|
paddingLeft: 16,
|
|
@@ -28797,7 +28919,7 @@ var QuickSwitcherResult = ({ result, selected }) => {
|
|
|
28797
28919
|
});
|
|
28798
28920
|
}
|
|
28799
28921
|
}, [selected]);
|
|
28800
|
-
const style11 =
|
|
28922
|
+
const style11 = useMemo145(() => {
|
|
28801
28923
|
return {
|
|
28802
28924
|
...container49,
|
|
28803
28925
|
backgroundColor: getBackgroundFromHoverState({
|
|
@@ -28806,7 +28928,7 @@ var QuickSwitcherResult = ({ result, selected }) => {
|
|
|
28806
28928
|
})
|
|
28807
28929
|
};
|
|
28808
28930
|
}, [hovered, selected]);
|
|
28809
|
-
const labelStyle6 =
|
|
28931
|
+
const labelStyle6 = useMemo145(() => {
|
|
28810
28932
|
return {
|
|
28811
28933
|
...result.type === "search-result" ? searchLabel : label9,
|
|
28812
28934
|
color: result.type === "search-result" ? LIGHT_TEXT : selected || hovered ? "white" : LIGHT_TEXT,
|
|
@@ -28944,16 +29066,16 @@ var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }
|
|
|
28944
29066
|
const { setSelectedModal } = useContext96(ModalsContext);
|
|
28945
29067
|
const keybindings = useKeybinding();
|
|
28946
29068
|
const mode = mapQueryToMode(state.query);
|
|
28947
|
-
const actualQuery =
|
|
29069
|
+
const actualQuery = useMemo146(() => {
|
|
28948
29070
|
return stripQuery(state.query);
|
|
28949
29071
|
}, [state.query]);
|
|
28950
|
-
const menuActions =
|
|
29072
|
+
const menuActions = useMemo146(() => {
|
|
28951
29073
|
if (mode !== "commands") {
|
|
28952
29074
|
return [];
|
|
28953
29075
|
}
|
|
28954
29076
|
return makeSearchResults(actions, setSelectedModal);
|
|
28955
29077
|
}, [actions, mode, setSelectedModal]);
|
|
28956
|
-
const resultsArray =
|
|
29078
|
+
const resultsArray = useMemo146(() => {
|
|
28957
29079
|
if (mode === "commands") {
|
|
28958
29080
|
return fuzzySearch(actualQuery, menuActions);
|
|
28959
29081
|
}
|
|
@@ -29083,12 +29205,12 @@ var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }
|
|
|
29083
29205
|
}, []);
|
|
29084
29206
|
const showKeyboardShortcuts = mode === "docs" && actualQuery.trim() === "";
|
|
29085
29207
|
const showSearchLoadingState = mode === "docs" && docResults.type === "loading";
|
|
29086
|
-
const container50 =
|
|
29208
|
+
const container50 = useMemo146(() => {
|
|
29087
29209
|
return {
|
|
29088
29210
|
width: showKeyboardShortcuts ? 800 : 500
|
|
29089
29211
|
};
|
|
29090
29212
|
}, [showKeyboardShortcuts]);
|
|
29091
|
-
const results =
|
|
29213
|
+
const results = useMemo146(() => {
|
|
29092
29214
|
if (showKeyboardShortcuts) {
|
|
29093
29215
|
return {
|
|
29094
29216
|
maxHeight: 600,
|
|
@@ -29354,7 +29476,7 @@ var ClientRenderProgress = ({ job }) => {
|
|
|
29354
29476
|
};
|
|
29355
29477
|
|
|
29356
29478
|
// src/components/RenderModal/GuiRenderStatus.tsx
|
|
29357
|
-
import { useCallback as useCallback131, useMemo as
|
|
29479
|
+
import { useCallback as useCallback131, useMemo as useMemo147 } from "react";
|
|
29358
29480
|
import { jsx as jsx256, jsxs as jsxs129 } from "react/jsx-runtime";
|
|
29359
29481
|
var progressItem2 = {
|
|
29360
29482
|
padding: 10,
|
|
@@ -29496,7 +29618,7 @@ var DownloadsProgress = ({ downloads }) => {
|
|
|
29496
29618
|
});
|
|
29497
29619
|
};
|
|
29498
29620
|
var OpenFile = ({ job }) => {
|
|
29499
|
-
const labelStyle6 =
|
|
29621
|
+
const labelStyle6 = useMemo147(() => {
|
|
29500
29622
|
return {
|
|
29501
29623
|
...label11,
|
|
29502
29624
|
textAlign: "left",
|
|
@@ -29708,7 +29830,7 @@ import {
|
|
|
29708
29830
|
useCallback as useCallback150,
|
|
29709
29831
|
useContext as useContext99,
|
|
29710
29832
|
useEffect as useEffect85,
|
|
29711
|
-
useMemo as
|
|
29833
|
+
useMemo as useMemo158,
|
|
29712
29834
|
useReducer as useReducer2,
|
|
29713
29835
|
useRef as useRef54,
|
|
29714
29836
|
useState as useState91
|
|
@@ -29979,10 +30101,10 @@ var makeReadOnlyStudioRenderCommand = ({
|
|
|
29979
30101
|
};
|
|
29980
30102
|
|
|
29981
30103
|
// src/helpers/render-modal-sections.ts
|
|
29982
|
-
import { useMemo as
|
|
30104
|
+
import { useMemo as useMemo148, useState as useState86 } from "react";
|
|
29983
30105
|
var useRenderModalSections = (renderMode, codec) => {
|
|
29984
30106
|
const [selectedTab, setTab] = useState86("general");
|
|
29985
|
-
const shownTabs =
|
|
30107
|
+
const shownTabs = useMemo148(() => {
|
|
29986
30108
|
if (renderMode === "audio") {
|
|
29987
30109
|
return ["general", "data", "audio", "advanced"];
|
|
29988
30110
|
}
|
|
@@ -30000,13 +30122,13 @@ var useRenderModalSections = (renderMode, codec) => {
|
|
|
30000
30122
|
}
|
|
30001
30123
|
throw new TypeError("Unknown render mode");
|
|
30002
30124
|
}, [codec, renderMode]);
|
|
30003
|
-
const tab =
|
|
30125
|
+
const tab = useMemo148(() => {
|
|
30004
30126
|
if (!shownTabs.includes(selectedTab)) {
|
|
30005
30127
|
return shownTabs[0];
|
|
30006
30128
|
}
|
|
30007
30129
|
return selectedTab;
|
|
30008
30130
|
}, [selectedTab, shownTabs]);
|
|
30009
|
-
return
|
|
30131
|
+
return useMemo148(() => {
|
|
30010
30132
|
return { tab, setTab, shownTabs };
|
|
30011
30133
|
}, [tab, shownTabs]);
|
|
30012
30134
|
};
|
|
@@ -30074,7 +30196,7 @@ var GifIcon = (props) => /* @__PURE__ */ jsx262("svg", {
|
|
|
30074
30196
|
});
|
|
30075
30197
|
|
|
30076
30198
|
// src/components/Tabs/vertical.tsx
|
|
30077
|
-
import { useCallback as useCallback133, useMemo as
|
|
30199
|
+
import { useCallback as useCallback133, useMemo as useMemo149, useState as useState87 } from "react";
|
|
30078
30200
|
import { jsx as jsx263 } from "react/jsx-runtime";
|
|
30079
30201
|
var selectorButton2 = {
|
|
30080
30202
|
border: "none",
|
|
@@ -30098,7 +30220,7 @@ var VerticalTab = ({ children, onClick, style: style11, selected }) => {
|
|
|
30098
30220
|
const onPointerLeave = useCallback133(() => {
|
|
30099
30221
|
setHovered(false);
|
|
30100
30222
|
}, []);
|
|
30101
|
-
const definiteStyle =
|
|
30223
|
+
const definiteStyle = useMemo149(() => {
|
|
30102
30224
|
return {
|
|
30103
30225
|
...selectorButton2,
|
|
30104
30226
|
backgroundColor: selected ? SELECTED_BACKGROUND : hovered ? CLEAR_HOVER : "transparent",
|
|
@@ -30129,7 +30251,7 @@ import { useCallback as useCallback135 } from "react";
|
|
|
30129
30251
|
import { BrowserSafeApis as BrowserSafeApis2 } from "@remotion/renderer/client";
|
|
30130
30252
|
|
|
30131
30253
|
// src/components/RenderModal/CliCopyButton.tsx
|
|
30132
|
-
import { useCallback as useCallback134, useEffect as useEffect83, useMemo as
|
|
30254
|
+
import { useCallback as useCallback134, useEffect as useEffect83, useMemo as useMemo150, useState as useState88 } from "react";
|
|
30133
30255
|
import { jsx as jsx264 } from "react/jsx-runtime";
|
|
30134
30256
|
var svgStyle2 = {
|
|
30135
30257
|
width: 16,
|
|
@@ -30158,7 +30280,7 @@ var CliCopyButton = ({
|
|
|
30158
30280
|
}) => {
|
|
30159
30281
|
const [copied, setCopied] = useState88(false);
|
|
30160
30282
|
const [hovered, setHovered] = useState88(false);
|
|
30161
|
-
const fillColor =
|
|
30283
|
+
const fillColor = useMemo150(() => {
|
|
30162
30284
|
return hovered ? "white" : LIGHT_TEXT;
|
|
30163
30285
|
}, [hovered]);
|
|
30164
30286
|
const clipboardIcon = /* @__PURE__ */ jsx264(ClipboardIcon, {
|
|
@@ -30665,7 +30787,7 @@ var flexer = {
|
|
|
30665
30787
|
|
|
30666
30788
|
// src/components/RenderModal/RenderModalAdvanced.tsx
|
|
30667
30789
|
import { BrowserSafeApis as BrowserSafeApis6 } from "@remotion/renderer/client";
|
|
30668
|
-
import { useCallback as useCallback139, useMemo as
|
|
30790
|
+
import { useCallback as useCallback139, useMemo as useMemo151 } from "react";
|
|
30669
30791
|
|
|
30670
30792
|
// src/helpers/presets-labels.ts
|
|
30671
30793
|
var labelx264Preset = (profile) => {
|
|
@@ -31010,7 +31132,7 @@ var RenderModalAdvanced = ({
|
|
|
31010
31132
|
darkMode,
|
|
31011
31133
|
setDarkMode
|
|
31012
31134
|
}) => {
|
|
31013
|
-
const extendedOpenGlOptions =
|
|
31135
|
+
const extendedOpenGlOptions = useMemo151(() => {
|
|
31014
31136
|
return [
|
|
31015
31137
|
"angle",
|
|
31016
31138
|
"egl",
|
|
@@ -31080,7 +31202,7 @@ var RenderModalAdvanced = ({
|
|
|
31080
31202
|
const onReproToggle = useCallback139((e) => {
|
|
31081
31203
|
setRepro(e.target.checked);
|
|
31082
31204
|
}, [setRepro]);
|
|
31083
|
-
const openGlOptions =
|
|
31205
|
+
const openGlOptions = useMemo151(() => {
|
|
31084
31206
|
return extendedOpenGlOptions.map((option) => {
|
|
31085
31207
|
return {
|
|
31086
31208
|
label: option === "default" ? "Default" : option,
|
|
@@ -31096,7 +31218,7 @@ var RenderModalAdvanced = ({
|
|
|
31096
31218
|
};
|
|
31097
31219
|
});
|
|
31098
31220
|
}, [extendedOpenGlOptions, openGlOption, setOpenGlOption]);
|
|
31099
|
-
const chromeModeOptions =
|
|
31221
|
+
const chromeModeOptions = useMemo151(() => {
|
|
31100
31222
|
return BrowserSafeApis6.validChromeModeOptions.map((option) => {
|
|
31101
31223
|
return {
|
|
31102
31224
|
label: option,
|
|
@@ -31112,7 +31234,7 @@ var RenderModalAdvanced = ({
|
|
|
31112
31234
|
};
|
|
31113
31235
|
});
|
|
31114
31236
|
}, [chromeModeOption, setChromeModeOption]);
|
|
31115
|
-
const x264PresetOptions =
|
|
31237
|
+
const x264PresetOptions = useMemo151(() => {
|
|
31116
31238
|
return BrowserSafeApis6.x264PresetOptions.map((option) => {
|
|
31117
31239
|
return {
|
|
31118
31240
|
label: labelx264Preset(option),
|
|
@@ -31128,7 +31250,7 @@ var RenderModalAdvanced = ({
|
|
|
31128
31250
|
};
|
|
31129
31251
|
});
|
|
31130
31252
|
}, [setx264Preset, x264Preset]);
|
|
31131
|
-
const hardwareAccelerationValues =
|
|
31253
|
+
const hardwareAccelerationValues = useMemo151(() => {
|
|
31132
31254
|
return BrowserSafeApis6.hardwareAccelerationOptions.map((option) => {
|
|
31133
31255
|
return {
|
|
31134
31256
|
label: option,
|
|
@@ -31621,7 +31743,7 @@ var RenderModalAdvanced = ({
|
|
|
31621
31743
|
|
|
31622
31744
|
// src/components/RenderModal/RenderModalAudio.tsx
|
|
31623
31745
|
import { BrowserSafeApis as BrowserSafeApis8 } from "@remotion/renderer/client";
|
|
31624
|
-
import { useCallback as useCallback143, useMemo as
|
|
31746
|
+
import { useCallback as useCallback143, useMemo as useMemo153 } from "react";
|
|
31625
31747
|
|
|
31626
31748
|
// src/components/RenderModal/EnforceAudioTrackSetting.tsx
|
|
31627
31749
|
import { useCallback as useCallback140 } from "react";
|
|
@@ -31714,7 +31836,7 @@ var MutedSetting = ({ muted, setMuted, enforceAudioTrack }) => {
|
|
|
31714
31836
|
|
|
31715
31837
|
// src/components/RenderModal/SeparateAudioOption.tsx
|
|
31716
31838
|
import { BrowserSafeApis as BrowserSafeApis7 } from "@remotion/renderer/client";
|
|
31717
|
-
import { useCallback as useCallback142, useMemo as
|
|
31839
|
+
import { useCallback as useCallback142, useMemo as useMemo152 } from "react";
|
|
31718
31840
|
|
|
31719
31841
|
// src/helpers/use-file-existence.ts
|
|
31720
31842
|
import { useContext as useContext98, useEffect as useEffect84, useRef as useRef53, useState as useState90 } from "react";
|
|
@@ -31847,7 +31969,7 @@ var SeparateAudioOptionInput = ({ separateAudioTo, setSeparateAudioTo, audioCode
|
|
|
31847
31969
|
const onValueChange = useCallback142((e) => {
|
|
31848
31970
|
setSeparateAudioTo(e.target.value);
|
|
31849
31971
|
}, [setSeparateAudioTo]);
|
|
31850
|
-
const validationMessage =
|
|
31972
|
+
const validationMessage = useMemo152(() => {
|
|
31851
31973
|
const expectedExtension = BrowserSafeApis7.getExtensionFromAudioCodec(audioCodec);
|
|
31852
31974
|
const actualExtension = separateAudioTo.split(".").pop();
|
|
31853
31975
|
if (actualExtension !== expectedExtension) {
|
|
@@ -31947,7 +32069,7 @@ var RenderModalAudio = ({
|
|
|
31947
32069
|
const onSeamlessAacConcatenationChanges = useCallback143((e) => {
|
|
31948
32070
|
setForSeamlessAacConcatenation(e.target.checked);
|
|
31949
32071
|
}, [setForSeamlessAacConcatenation]);
|
|
31950
|
-
const sampleRateOptions =
|
|
32072
|
+
const sampleRateOptions = useMemo153(() => {
|
|
31951
32073
|
return commonSampleRates.map((rate) => ({
|
|
31952
32074
|
label: rate === 48000 ? `${rate} Hz (default)` : `${rate} Hz`,
|
|
31953
32075
|
onClick: () => setSampleRate(rate),
|
|
@@ -32134,7 +32256,7 @@ var RenderModalAudio = ({
|
|
|
32134
32256
|
// src/components/RenderModal/RenderModalBasic.tsx
|
|
32135
32257
|
import { BrowserSafeApis as BrowserSafeApis9 } from "@remotion/renderer/client";
|
|
32136
32258
|
import { NoReactAPIs as NoReactAPIs2 } from "@remotion/renderer/pure";
|
|
32137
|
-
import { useCallback as useCallback146, useMemo as
|
|
32259
|
+
import { useCallback as useCallback146, useMemo as useMemo155 } from "react";
|
|
32138
32260
|
|
|
32139
32261
|
// src/helpers/prores-labels.ts
|
|
32140
32262
|
var labelProResProfile = (profile) => {
|
|
@@ -32163,7 +32285,7 @@ var labelProResProfile = (profile) => {
|
|
|
32163
32285
|
import { useCallback as useCallback145 } from "react";
|
|
32164
32286
|
|
|
32165
32287
|
// src/components/RenderModal/MultiRangeSlider.tsx
|
|
32166
|
-
import { useCallback as useCallback144, useMemo as
|
|
32288
|
+
import { useCallback as useCallback144, useMemo as useMemo154 } from "react";
|
|
32167
32289
|
import { jsx as jsx279, jsxs as jsxs141 } from "react/jsx-runtime";
|
|
32168
32290
|
var container56 = {
|
|
32169
32291
|
borderColor: "black",
|
|
@@ -32193,7 +32315,7 @@ var MultiRangeSlider = ({
|
|
|
32193
32315
|
onRightThumbDrag
|
|
32194
32316
|
}) => {
|
|
32195
32317
|
const getPercent = useCallback144((value) => Math.round((value - min) / (max - min) * 100), [min, max]);
|
|
32196
|
-
const rangeStyle =
|
|
32318
|
+
const rangeStyle = useMemo154(() => {
|
|
32197
32319
|
const minPercent = getPercent(start);
|
|
32198
32320
|
const maxPercent = getPercent(end);
|
|
32199
32321
|
return {
|
|
@@ -32400,7 +32522,7 @@ var RenderModalBasic = ({
|
|
|
32400
32522
|
showOutputName
|
|
32401
32523
|
}) => {
|
|
32402
32524
|
const existence = useFileExistence(outName);
|
|
32403
|
-
const videoCodecOptions =
|
|
32525
|
+
const videoCodecOptions = useMemo155(() => {
|
|
32404
32526
|
return BrowserSafeApis9.validCodecs.filter((c) => {
|
|
32405
32527
|
return NoReactAPIs2.isAudioCodec(c) === (renderMode === "audio");
|
|
32406
32528
|
}).map((codecOption) => {
|
|
@@ -32418,7 +32540,7 @@ var RenderModalBasic = ({
|
|
|
32418
32540
|
};
|
|
32419
32541
|
});
|
|
32420
32542
|
}, [renderMode, setCodec, codec]);
|
|
32421
|
-
const proResProfileOptions =
|
|
32543
|
+
const proResProfileOptions = useMemo155(() => {
|
|
32422
32544
|
return BrowserSafeApis9.proResProfileOptions.map((option) => {
|
|
32423
32545
|
return {
|
|
32424
32546
|
label: labelProResProfile(option),
|
|
@@ -32450,7 +32572,7 @@ var RenderModalBasic = ({
|
|
|
32450
32572
|
const onValueChange = useCallback146((e) => {
|
|
32451
32573
|
setOutName(e.target.value);
|
|
32452
32574
|
}, [setOutName]);
|
|
32453
|
-
const logLevelOptions =
|
|
32575
|
+
const logLevelOptions = useMemo155(() => {
|
|
32454
32576
|
return ["trace", "verbose", "info", "warn", "error"].map((level) => {
|
|
32455
32577
|
return {
|
|
32456
32578
|
label: humanReadableLogLevel(level),
|
|
@@ -32704,7 +32826,7 @@ var RenderModalGif = ({
|
|
|
32704
32826
|
|
|
32705
32827
|
// src/components/RenderModal/RenderModalPicture.tsx
|
|
32706
32828
|
import { BrowserSafeApis as BrowserSafeApis10 } from "@remotion/renderer/client";
|
|
32707
|
-
import { useCallback as useCallback149, useMemo as
|
|
32829
|
+
import { useCallback as useCallback149, useMemo as useMemo157 } from "react";
|
|
32708
32830
|
|
|
32709
32831
|
// src/components/RenderModal/JpegQualitySetting.tsx
|
|
32710
32832
|
import { jsx as jsx284 } from "react/jsx-runtime";
|
|
@@ -32723,7 +32845,7 @@ var JpegQualitySetting = ({ jpegQuality, setJpegQuality }) => {
|
|
|
32723
32845
|
};
|
|
32724
32846
|
|
|
32725
32847
|
// src/components/RenderModal/ScaleSetting.tsx
|
|
32726
|
-
import { useMemo as
|
|
32848
|
+
import { useMemo as useMemo156 } from "react";
|
|
32727
32849
|
import { jsx as jsx285, jsxs as jsxs146, Fragment as Fragment48 } from "react/jsx-runtime";
|
|
32728
32850
|
var MIN_SCALE = 0.1;
|
|
32729
32851
|
var MAX_SCALE = 10;
|
|
@@ -32737,7 +32859,7 @@ var outputDimensionsStyle = {
|
|
|
32737
32859
|
marginTop: -10
|
|
32738
32860
|
};
|
|
32739
32861
|
var ScaleSetting = ({ scale, setScale, compositionWidth, compositionHeight }) => {
|
|
32740
|
-
const outputDimensions =
|
|
32862
|
+
const outputDimensions = useMemo156(() => {
|
|
32741
32863
|
const outputWidth = Math.round(compositionWidth * scale);
|
|
32742
32864
|
const outputHeight = Math.round(compositionHeight * scale);
|
|
32743
32865
|
return `${outputWidth}×${outputHeight}`;
|
|
@@ -32806,7 +32928,7 @@ var RenderModalPicture = ({
|
|
|
32806
32928
|
compositionWidth,
|
|
32807
32929
|
compositionHeight
|
|
32808
32930
|
}) => {
|
|
32809
|
-
const colorSpaceOptions =
|
|
32931
|
+
const colorSpaceOptions = useMemo157(() => {
|
|
32810
32932
|
return BrowserSafeApis10.validColorSpaces.map((option) => {
|
|
32811
32933
|
return {
|
|
32812
32934
|
label: option,
|
|
@@ -32822,7 +32944,7 @@ var RenderModalPicture = ({
|
|
|
32822
32944
|
};
|
|
32823
32945
|
});
|
|
32824
32946
|
}, [colorSpace, setColorSpace]);
|
|
32825
|
-
const qualityControlOptions =
|
|
32947
|
+
const qualityControlOptions = useMemo157(() => {
|
|
32826
32948
|
return qualityControlModes.map((option) => {
|
|
32827
32949
|
return {
|
|
32828
32950
|
label: option === "crf" ? "CRF" : "Bitrate",
|
|
@@ -33217,7 +33339,7 @@ var RenderModal = ({
|
|
|
33217
33339
|
const [openGlOption, setOpenGlOption] = useState91(() => initialGl ?? "default");
|
|
33218
33340
|
const [colorSpace, setColorSpace] = useState91(() => initialColorSpace);
|
|
33219
33341
|
const [userAgent, setUserAgent] = useState91(() => initialUserAgent === null ? null : initialUserAgent.trim() === "" ? null : initialUserAgent);
|
|
33220
|
-
const chromiumOptions =
|
|
33342
|
+
const chromiumOptions = useMemo158(() => {
|
|
33221
33343
|
return {
|
|
33222
33344
|
headless,
|
|
33223
33345
|
disableWebSecurity,
|
|
@@ -33259,19 +33381,19 @@ var RenderModal = ({
|
|
|
33259
33381
|
const [offthreadVideoCacheSizeInBytes, setOffthreadVideoCacheSizeInBytes] = useState91(initialOffthreadVideoCacheSizeInBytes);
|
|
33260
33382
|
const [mediaCacheSizeInBytes, setMediaCacheSizeInBytes] = useState91(initialMediaCacheSizeInBytes);
|
|
33261
33383
|
const [offthreadVideoThreads, setOffthreadVideoThreads] = useState91(() => initialOffthreadVideoThreads);
|
|
33262
|
-
const codec =
|
|
33384
|
+
const codec = useMemo158(() => {
|
|
33263
33385
|
if (renderMode === "audio") {
|
|
33264
33386
|
return videoCodecForAudioTab;
|
|
33265
33387
|
}
|
|
33266
33388
|
return videoCodecForVideoTab;
|
|
33267
33389
|
}, [videoCodecForAudioTab, renderMode, videoCodecForVideoTab]);
|
|
33268
|
-
const numberOfGifLoops =
|
|
33390
|
+
const numberOfGifLoops = useMemo158(() => {
|
|
33269
33391
|
if (codec === "gif" && limitNumberOfGifLoops) {
|
|
33270
33392
|
return numberOfGifLoopsSetting;
|
|
33271
33393
|
}
|
|
33272
33394
|
return null;
|
|
33273
33395
|
}, [codec, limitNumberOfGifLoops, numberOfGifLoopsSetting]);
|
|
33274
|
-
const audioBitrate =
|
|
33396
|
+
const audioBitrate = useMemo158(() => {
|
|
33275
33397
|
if (shouldHaveCustomTargetAudioBitrate) {
|
|
33276
33398
|
return customTargetAudioBitrate;
|
|
33277
33399
|
}
|
|
@@ -33279,10 +33401,10 @@ var RenderModal = ({
|
|
|
33279
33401
|
}, [customTargetAudioBitrate, shouldHaveCustomTargetAudioBitrate]);
|
|
33280
33402
|
const supportsCrf = BrowserSafeApis11.codecSupportsCrf(codec);
|
|
33281
33403
|
const supportsVideoBitrate = BrowserSafeApis11.codecSupportsVideoBitrate(codec);
|
|
33282
|
-
const supportsBothQualityControls =
|
|
33404
|
+
const supportsBothQualityControls = useMemo158(() => {
|
|
33283
33405
|
return supportsCrf && supportsVideoBitrate && hardwareAcceleration !== "if-possible" && hardwareAcceleration !== "required";
|
|
33284
33406
|
}, [hardwareAcceleration, supportsCrf, supportsVideoBitrate]);
|
|
33285
|
-
const qualityControlType =
|
|
33407
|
+
const qualityControlType = useMemo158(() => {
|
|
33286
33408
|
if (hardwareAcceleration === "if-possible" || hardwareAcceleration === "required") {
|
|
33287
33409
|
if (supportsVideoBitrate) {
|
|
33288
33410
|
return "bitrate";
|
|
@@ -33306,7 +33428,7 @@ var RenderModal = ({
|
|
|
33306
33428
|
supportsCrf,
|
|
33307
33429
|
supportsVideoBitrate
|
|
33308
33430
|
]);
|
|
33309
|
-
const videoBitrate =
|
|
33431
|
+
const videoBitrate = useMemo158(() => {
|
|
33310
33432
|
if (qualityControlType === "bitrate") {
|
|
33311
33433
|
return customTargetVideoBitrate;
|
|
33312
33434
|
}
|
|
@@ -33318,13 +33440,13 @@ var RenderModal = ({
|
|
|
33318
33440
|
return;
|
|
33319
33441
|
dispatch2(payload);
|
|
33320
33442
|
}, []);
|
|
33321
|
-
const muted =
|
|
33443
|
+
const muted = useMemo158(() => {
|
|
33322
33444
|
if (renderMode === "video") {
|
|
33323
33445
|
return mutedState;
|
|
33324
33446
|
}
|
|
33325
33447
|
return false;
|
|
33326
33448
|
}, [mutedState, renderMode]);
|
|
33327
|
-
const enforceAudioTrack =
|
|
33449
|
+
const enforceAudioTrack = useMemo158(() => {
|
|
33328
33450
|
if (renderMode === "video") {
|
|
33329
33451
|
return enforceAudioTrackState;
|
|
33330
33452
|
}
|
|
@@ -33333,13 +33455,13 @@ var RenderModal = ({
|
|
|
33333
33455
|
}
|
|
33334
33456
|
return false;
|
|
33335
33457
|
}, [enforceAudioTrackState, renderMode]);
|
|
33336
|
-
const proResProfile =
|
|
33458
|
+
const proResProfile = useMemo158(() => {
|
|
33337
33459
|
if (renderMode === "video" && codec === "prores") {
|
|
33338
33460
|
return proResProfileSetting;
|
|
33339
33461
|
}
|
|
33340
33462
|
return null;
|
|
33341
33463
|
}, [codec, proResProfileSetting, renderMode]);
|
|
33342
|
-
const x264Preset =
|
|
33464
|
+
const x264Preset = useMemo158(() => {
|
|
33343
33465
|
if (renderMode === "video" && codec === "h264") {
|
|
33344
33466
|
return x264PresetSetting;
|
|
33345
33467
|
}
|
|
@@ -33350,19 +33472,19 @@ var RenderModal = ({
|
|
|
33350
33472
|
_setInputProps(updater);
|
|
33351
33473
|
}, []);
|
|
33352
33474
|
const [metadata] = useState91(() => defaultMetadata);
|
|
33353
|
-
const endFrame =
|
|
33475
|
+
const endFrame = useMemo158(() => {
|
|
33354
33476
|
if (endFrameOrNull === null) {
|
|
33355
33477
|
return resolvedComposition.durationInFrames - 1;
|
|
33356
33478
|
}
|
|
33357
33479
|
return Math.max(0, Math.min(resolvedComposition.durationInFrames - 1, endFrameOrNull));
|
|
33358
33480
|
}, [resolvedComposition.durationInFrames, endFrameOrNull]);
|
|
33359
|
-
const startFrame =
|
|
33481
|
+
const startFrame = useMemo158(() => {
|
|
33360
33482
|
if (startFrameOrNull === null) {
|
|
33361
33483
|
return 0;
|
|
33362
33484
|
}
|
|
33363
33485
|
return Math.max(0, Math.min(endFrame - 1, startFrameOrNull));
|
|
33364
33486
|
}, [endFrame, startFrameOrNull]);
|
|
33365
|
-
const frame2 =
|
|
33487
|
+
const frame2 = useMemo158(() => {
|
|
33366
33488
|
const parsed = Math.floor(unclampedFrame);
|
|
33367
33489
|
return Math.max(0, Math.min(resolvedComposition.durationInFrames - 1, parsed));
|
|
33368
33490
|
}, [resolvedComposition.durationInFrames, unclampedFrame]);
|
|
@@ -33483,17 +33605,17 @@ var RenderModal = ({
|
|
|
33483
33605
|
mediaCacheSizeInBytes
|
|
33484
33606
|
]);
|
|
33485
33607
|
const [everyNthFrameSetting, setEveryNthFrameSetting] = useState91(() => initialEveryNthFrame);
|
|
33486
|
-
const everyNthFrame =
|
|
33608
|
+
const everyNthFrame = useMemo158(() => {
|
|
33487
33609
|
if (codec === "gif") {
|
|
33488
33610
|
return everyNthFrameSetting;
|
|
33489
33611
|
}
|
|
33490
33612
|
return 1;
|
|
33491
33613
|
}, [codec, everyNthFrameSetting]);
|
|
33492
33614
|
const audioCodec = deriveFinalAudioCodec(codec, userSelectedAudioCodec);
|
|
33493
|
-
const availablePixelFormats =
|
|
33615
|
+
const availablePixelFormats = useMemo158(() => {
|
|
33494
33616
|
return BrowserSafeApis11.validPixelFormatsForCodec(codec);
|
|
33495
33617
|
}, [codec]);
|
|
33496
|
-
const pixelFormat =
|
|
33618
|
+
const pixelFormat = useMemo158(() => {
|
|
33497
33619
|
if (availablePixelFormats.includes(userPreferredPixelFormat)) {
|
|
33498
33620
|
return userPreferredPixelFormat;
|
|
33499
33621
|
}
|
|
@@ -33666,7 +33788,7 @@ var RenderModal = ({
|
|
|
33666
33788
|
isMounted.current = false;
|
|
33667
33789
|
};
|
|
33668
33790
|
}, []);
|
|
33669
|
-
const imageFormatOptions =
|
|
33791
|
+
const imageFormatOptions = useMemo158(() => {
|
|
33670
33792
|
if (renderMode === "still") {
|
|
33671
33793
|
return [
|
|
33672
33794
|
{
|
|
@@ -33762,7 +33884,7 @@ var RenderModal = ({
|
|
|
33762
33884
|
stillImageFormat,
|
|
33763
33885
|
videoCodecForVideoTab
|
|
33764
33886
|
]);
|
|
33765
|
-
const renderTabOptions =
|
|
33887
|
+
const renderTabOptions = useMemo158(() => {
|
|
33766
33888
|
if (resolvedComposition?.durationInFrames < 2) {
|
|
33767
33889
|
return [
|
|
33768
33890
|
{
|
|
@@ -33820,7 +33942,7 @@ var RenderModal = ({
|
|
|
33820
33942
|
});
|
|
33821
33943
|
const { tab, setTab, shownTabs } = useRenderModalSections(renderMode, codec);
|
|
33822
33944
|
const { registerKeybinding } = useKeybinding();
|
|
33823
|
-
const readOnlyRenderCommand =
|
|
33945
|
+
const readOnlyRenderCommand = useMemo158(() => {
|
|
33824
33946
|
if (!readOnlyStudio) {
|
|
33825
33947
|
return null;
|
|
33826
33948
|
}
|
|
@@ -33993,7 +34115,7 @@ var RenderModal = ({
|
|
|
33993
34115
|
enter.unregister();
|
|
33994
34116
|
};
|
|
33995
34117
|
}, [registerKeybinding, renderDisabled, trigger]);
|
|
33996
|
-
const pixelFormatOptions =
|
|
34118
|
+
const pixelFormatOptions = useMemo158(() => {
|
|
33997
34119
|
return availablePixelFormats.map((option) => {
|
|
33998
34120
|
return {
|
|
33999
34121
|
label: option,
|
|
@@ -34292,7 +34414,7 @@ import {
|
|
|
34292
34414
|
getDefaultVideoCodecForContainer,
|
|
34293
34415
|
isAudioOnlyContainer
|
|
34294
34416
|
} from "@remotion/web-renderer";
|
|
34295
|
-
import { useCallback as useCallback154, useContext as useContext100, useMemo as
|
|
34417
|
+
import { useCallback as useCallback154, useContext as useContext100, useMemo as useMemo163, useState as useState95 } from "react";
|
|
34296
34418
|
|
|
34297
34419
|
// src/icons/certificate.tsx
|
|
34298
34420
|
import { jsx as jsx288 } from "react/jsx-runtime";
|
|
@@ -34454,7 +34576,7 @@ var WebRendererExperimentalBadge = () => {
|
|
|
34454
34576
|
};
|
|
34455
34577
|
|
|
34456
34578
|
// src/components/RenderModal/WebRenderModalAdvanced.tsx
|
|
34457
|
-
import { useCallback as useCallback151, useMemo as
|
|
34579
|
+
import { useCallback as useCallback151, useMemo as useMemo159 } from "react";
|
|
34458
34580
|
import { jsx as jsx290, jsxs as jsxs150 } from "react/jsx-runtime";
|
|
34459
34581
|
var tabContainer = {
|
|
34460
34582
|
flex: 1
|
|
@@ -34492,7 +34614,7 @@ var WebRenderModalAdvanced = ({
|
|
|
34492
34614
|
return cb;
|
|
34493
34615
|
});
|
|
34494
34616
|
}, [setMediaCacheSizeInBytes]);
|
|
34495
|
-
const hardwareAccelerationOptions =
|
|
34617
|
+
const hardwareAccelerationOptions = useMemo159(() => {
|
|
34496
34618
|
return [
|
|
34497
34619
|
{
|
|
34498
34620
|
label: "No Preference",
|
|
@@ -34624,7 +34746,7 @@ var WebRenderModalAdvanced = ({
|
|
|
34624
34746
|
|
|
34625
34747
|
// src/components/RenderModal/WebRenderModalAudio.tsx
|
|
34626
34748
|
import { getSupportedAudioCodecsForContainer as getSupportedAudioCodecsForContainer2 } from "@remotion/web-renderer";
|
|
34627
|
-
import { useMemo as
|
|
34749
|
+
import { useMemo as useMemo160 } from "react";
|
|
34628
34750
|
|
|
34629
34751
|
// src/components/RenderModal/quality-options.tsx
|
|
34630
34752
|
import { jsx as jsx291 } from "react/jsx-runtime";
|
|
@@ -34697,8 +34819,8 @@ var WebRenderModalAudio = ({
|
|
|
34697
34819
|
encodableCodecs,
|
|
34698
34820
|
effectiveAudioCodec
|
|
34699
34821
|
}) => {
|
|
34700
|
-
const containerSupported =
|
|
34701
|
-
const audioCodecOptions =
|
|
34822
|
+
const containerSupported = useMemo160(() => getSupportedAudioCodecsForContainer2(videoContainer), [videoContainer]);
|
|
34823
|
+
const audioCodecOptions = useMemo160(() => {
|
|
34702
34824
|
return containerSupported.map((codec) => {
|
|
34703
34825
|
const isEncodable = encodableCodecs.includes(codec);
|
|
34704
34826
|
return {
|
|
@@ -34715,7 +34837,7 @@ var WebRenderModalAudio = ({
|
|
|
34715
34837
|
};
|
|
34716
34838
|
});
|
|
34717
34839
|
}, [containerSupported, encodableCodecs, audioCodec, setAudioCodec]);
|
|
34718
|
-
const audioBitrateOptions =
|
|
34840
|
+
const audioBitrateOptions = useMemo160(() => getQualityOptions(audioBitrate, setAudioBitrate), [audioBitrate, setAudioBitrate]);
|
|
34719
34841
|
const isAudioOnly = renderMode === "audio";
|
|
34720
34842
|
const showAudioSettings = isAudioOnly || !muted;
|
|
34721
34843
|
const showAudioCodecSetting = !isAudioOnly || containerSupported.length > 1;
|
|
@@ -34792,7 +34914,7 @@ var WebRenderModalAudio = ({
|
|
|
34792
34914
|
};
|
|
34793
34915
|
|
|
34794
34916
|
// src/components/RenderModal/WebRenderModalBasic.tsx
|
|
34795
|
-
import { useMemo as
|
|
34917
|
+
import { useMemo as useMemo161 } from "react";
|
|
34796
34918
|
import { jsx as jsx293, jsxs as jsxs152, Fragment as Fragment51 } from "react/jsx-runtime";
|
|
34797
34919
|
var tabContainer2 = {
|
|
34798
34920
|
flex: 1
|
|
@@ -34846,7 +34968,7 @@ var WebRenderModalBasic = ({
|
|
|
34846
34968
|
logLevel,
|
|
34847
34969
|
setLogLevel
|
|
34848
34970
|
}) => {
|
|
34849
|
-
const imageFormatOptions =
|
|
34971
|
+
const imageFormatOptions = useMemo161(() => {
|
|
34850
34972
|
return [
|
|
34851
34973
|
{
|
|
34852
34974
|
label: "PNG",
|
|
@@ -34868,7 +34990,7 @@ var WebRenderModalBasic = ({
|
|
|
34868
34990
|
}
|
|
34869
34991
|
];
|
|
34870
34992
|
}, [imageFormat, setStillFormat]);
|
|
34871
|
-
const logLevelOptions =
|
|
34993
|
+
const logLevelOptions = useMemo161(() => {
|
|
34872
34994
|
return ["trace", "verbose", "info", "warn", "error"].map((level) => {
|
|
34873
34995
|
return {
|
|
34874
34996
|
label: humanReadableLogLevel(level),
|
|
@@ -34883,7 +35005,7 @@ var WebRenderModalBasic = ({
|
|
|
34883
35005
|
};
|
|
34884
35006
|
});
|
|
34885
35007
|
}, [logLevel, setLogLevel]);
|
|
34886
|
-
const containerOptions =
|
|
35008
|
+
const containerOptions = useMemo161(() => {
|
|
34887
35009
|
const containers = renderMode === "audio" ? audioContainers : videoContainers;
|
|
34888
35010
|
return containers.map((c) => ({
|
|
34889
35011
|
label: containerLabels[c],
|
|
@@ -34897,7 +35019,7 @@ var WebRenderModalBasic = ({
|
|
|
34897
35019
|
value: c
|
|
34898
35020
|
}));
|
|
34899
35021
|
}, [container61, setContainerFormat, renderMode]);
|
|
34900
|
-
const codecOptions =
|
|
35022
|
+
const codecOptions = useMemo161(() => {
|
|
34901
35023
|
return encodableVideoCodecs.map((c) => ({
|
|
34902
35024
|
label: codecLabels[c],
|
|
34903
35025
|
onClick: () => setCodec(c),
|
|
@@ -35487,7 +35609,7 @@ var WebRenderModalLicense = ({
|
|
|
35487
35609
|
};
|
|
35488
35610
|
|
|
35489
35611
|
// src/components/RenderModal/WebRenderModalPicture.tsx
|
|
35490
|
-
import { useCallback as useCallback153, useMemo as
|
|
35612
|
+
import { useCallback as useCallback153, useMemo as useMemo162 } from "react";
|
|
35491
35613
|
import { jsx as jsx297, jsxs as jsxs155, Fragment as Fragment53 } from "react/jsx-runtime";
|
|
35492
35614
|
var tabContainer4 = {
|
|
35493
35615
|
flex: 1
|
|
@@ -35505,7 +35627,7 @@ var WebRenderModalPicture = ({
|
|
|
35505
35627
|
compositionWidth,
|
|
35506
35628
|
compositionHeight
|
|
35507
35629
|
}) => {
|
|
35508
|
-
const qualityOptions =
|
|
35630
|
+
const qualityOptions = useMemo162(() => getQualityOptions(videoBitrate, setVideoBitrate), [videoBitrate, setVideoBitrate]);
|
|
35509
35631
|
const onTransparentChanged = useCallback153((e) => {
|
|
35510
35632
|
setTransparent(e.target.checked);
|
|
35511
35633
|
}, [setTransparent]);
|
|
@@ -35678,25 +35800,25 @@ var WebRenderModal = ({
|
|
|
35678
35800
|
const [allowHtmlInCanvas, setAllowHtmlInCanvas] = useState95(initialAllowHtmlInCanvas ?? false);
|
|
35679
35801
|
const encodableAudioCodecs = useEncodableAudioCodecs(container61);
|
|
35680
35802
|
const encodableVideoCodecs = useEncodableVideoCodecs(container61);
|
|
35681
|
-
const effectiveAudioCodec =
|
|
35803
|
+
const effectiveAudioCodec = useMemo163(() => {
|
|
35682
35804
|
if (encodableAudioCodecs.includes(audioCodec)) {
|
|
35683
35805
|
return audioCodec;
|
|
35684
35806
|
}
|
|
35685
35807
|
return encodableAudioCodecs[0] ?? audioCodec;
|
|
35686
35808
|
}, [audioCodec, encodableAudioCodecs]);
|
|
35687
|
-
const effectiveVideoCodec =
|
|
35809
|
+
const effectiveVideoCodec = useMemo163(() => {
|
|
35688
35810
|
if (encodableVideoCodecs.includes(codec)) {
|
|
35689
35811
|
return codec;
|
|
35690
35812
|
}
|
|
35691
35813
|
return encodableVideoCodecs[0] ?? codec;
|
|
35692
35814
|
}, [codec, encodableVideoCodecs]);
|
|
35693
|
-
const finalEndFrame =
|
|
35815
|
+
const finalEndFrame = useMemo163(() => {
|
|
35694
35816
|
if (endFrame === null) {
|
|
35695
35817
|
return resolvedComposition.durationInFrames - 1;
|
|
35696
35818
|
}
|
|
35697
35819
|
return Math.max(0, Math.min(resolvedComposition.durationInFrames - 1, endFrame));
|
|
35698
35820
|
}, [endFrame, resolvedComposition.durationInFrames]);
|
|
35699
|
-
const finalStartFrame =
|
|
35821
|
+
const finalStartFrame = useMemo163(() => {
|
|
35700
35822
|
if (startFrame === null) {
|
|
35701
35823
|
return 0;
|
|
35702
35824
|
}
|
|
@@ -35761,7 +35883,7 @@ var WebRenderModal = ({
|
|
|
35761
35883
|
setTab((prev) => prev === "audio" ? "general" : prev);
|
|
35762
35884
|
}
|
|
35763
35885
|
}, [container61, imageFormat, updateOutNameExtension]);
|
|
35764
|
-
const renderTabOptions =
|
|
35886
|
+
const renderTabOptions = useMemo163(() => {
|
|
35765
35887
|
const options = [
|
|
35766
35888
|
{
|
|
35767
35889
|
label: "Still",
|
|
@@ -35807,7 +35929,7 @@ var WebRenderModal = ({
|
|
|
35807
35929
|
const onOutNameChange = useCallback154((e) => {
|
|
35808
35930
|
setOutName(e.target.value);
|
|
35809
35931
|
}, []);
|
|
35810
|
-
const outnameValidation =
|
|
35932
|
+
const outnameValidation = useMemo163(() => {
|
|
35811
35933
|
if (renderMode === "still") {
|
|
35812
35934
|
return validateOutnameForStill({
|
|
35813
35935
|
outName,
|
|
@@ -36155,7 +36277,7 @@ var WebRenderModalWithLoader = (props) => {
|
|
|
36155
36277
|
};
|
|
36156
36278
|
|
|
36157
36279
|
// src/components/UpdateModal/UpdateModal.tsx
|
|
36158
|
-
import { useCallback as useCallback157, useMemo as
|
|
36280
|
+
import { useCallback as useCallback157, useMemo as useMemo165 } from "react";
|
|
36159
36281
|
|
|
36160
36282
|
// src/components/CopyButton.tsx
|
|
36161
36283
|
import { useCallback as useCallback155, useEffect as useEffect89, useState as useState96 } from "react";
|
|
@@ -36221,7 +36343,7 @@ var CopyButton = ({ textToCopy, label: label12, labelWhenCopied }) => {
|
|
|
36221
36343
|
};
|
|
36222
36344
|
|
|
36223
36345
|
// src/components/UpdateModal/OpenIssueButton.tsx
|
|
36224
|
-
import { useCallback as useCallback156, useMemo as
|
|
36346
|
+
import { useCallback as useCallback156, useMemo as useMemo164, useState as useState97 } from "react";
|
|
36225
36347
|
import { jsx as jsx300 } from "react/jsx-runtime";
|
|
36226
36348
|
var svgStyle3 = {
|
|
36227
36349
|
width: "11px",
|
|
@@ -36241,7 +36363,7 @@ var OpenIssueButton = ({ link: link4 }) => {
|
|
|
36241
36363
|
const handleClick = useCallback156(() => {
|
|
36242
36364
|
window.open(link4, "_blank");
|
|
36243
36365
|
}, [link4]);
|
|
36244
|
-
const svgFillColor =
|
|
36366
|
+
const svgFillColor = useMemo164(() => {
|
|
36245
36367
|
return hovered ? "white" : LIGHT_TEXT;
|
|
36246
36368
|
}, [hovered]);
|
|
36247
36369
|
const openInEditorSvg = /* @__PURE__ */ jsx300("svg", {
|
|
@@ -36338,7 +36460,7 @@ var commands = {
|
|
|
36338
36460
|
unknown: "npx remotion upgrade"
|
|
36339
36461
|
};
|
|
36340
36462
|
var UpdateModal = ({ info, knownBugs }) => {
|
|
36341
|
-
const hasKnownBugs =
|
|
36463
|
+
const hasKnownBugs = useMemo165(() => {
|
|
36342
36464
|
return knownBugs && knownBugs?.length > 0;
|
|
36343
36465
|
}, [knownBugs]);
|
|
36344
36466
|
const command = commands[info.packageManager];
|
|
@@ -36527,7 +36649,7 @@ var Modals = ({ readOnlyStudio }) => {
|
|
|
36527
36649
|
};
|
|
36528
36650
|
|
|
36529
36651
|
// src/components/SequencePropsSubscriptionProvider.tsx
|
|
36530
|
-
import { useState as useState98, useCallback as useCallback158, useMemo as
|
|
36652
|
+
import { useState as useState98, useCallback as useCallback158, useMemo as useMemo166 } from "react";
|
|
36531
36653
|
import { Internals as Internals73 } from "remotion";
|
|
36532
36654
|
import { jsx as jsx304 } from "react/jsx-runtime";
|
|
36533
36655
|
var SequencePropsSubscriptionProvider = ({ children }) => {
|
|
@@ -36541,10 +36663,10 @@ var SequencePropsSubscriptionProvider = ({ children }) => {
|
|
|
36541
36663
|
return { ...prev, [overrideId]: state };
|
|
36542
36664
|
});
|
|
36543
36665
|
}, []);
|
|
36544
|
-
const getters =
|
|
36666
|
+
const getters = useMemo166(() => {
|
|
36545
36667
|
return { overrideIdToNodePathMappings: overrideToNodePathMap };
|
|
36546
36668
|
}, [overrideToNodePathMap]);
|
|
36547
|
-
const setters =
|
|
36669
|
+
const setters = useMemo166(() => {
|
|
36548
36670
|
return { setOverrideIdToNodePath };
|
|
36549
36671
|
}, [setOverrideIdToNodePath]);
|
|
36550
36672
|
return /* @__PURE__ */ jsx304(Internals73.OverrideIdsToNodePathsGettersContext.Provider, {
|
|
@@ -36577,7 +36699,7 @@ var Editor = ({ Root, readOnlyStudio }) => {
|
|
|
36577
36699
|
const onMounted = useCallback159(() => {
|
|
36578
36700
|
setCanvasMounted(true);
|
|
36579
36701
|
}, []);
|
|
36580
|
-
const value =
|
|
36702
|
+
const value = useMemo167(() => {
|
|
36581
36703
|
if (!size3) {
|
|
36582
36704
|
return null;
|
|
36583
36705
|
}
|
|
@@ -36586,15 +36708,15 @@ var Editor = ({ Root, readOnlyStudio }) => {
|
|
|
36586
36708
|
canvasSize: size3
|
|
36587
36709
|
};
|
|
36588
36710
|
}, [size3]);
|
|
36589
|
-
const MemoRoot =
|
|
36711
|
+
const MemoRoot = useMemo167(() => {
|
|
36590
36712
|
return React201.memo(Root);
|
|
36591
36713
|
}, [Root]);
|
|
36592
36714
|
const [renderError, setRenderError] = useState99(null);
|
|
36593
36715
|
const clearError = useCallback159(() => {
|
|
36594
36716
|
setRenderError(null);
|
|
36595
36717
|
}, []);
|
|
36596
|
-
const compositionRenderErrorContextValue =
|
|
36597
|
-
const renderErrorContextValue =
|
|
36718
|
+
const compositionRenderErrorContextValue = useMemo167(() => ({ setError: setRenderError, clearError }), [clearError]);
|
|
36719
|
+
const renderErrorContextValue = useMemo167(() => ({ error: renderError }), [renderError]);
|
|
36598
36720
|
return /* @__PURE__ */ jsx305(HigherZIndex, {
|
|
36599
36721
|
onEscape: noop,
|
|
36600
36722
|
onOutsideClick: noop,
|
|
@@ -36647,7 +36769,7 @@ var Editor = ({ Root, readOnlyStudio }) => {
|
|
|
36647
36769
|
import { PlayerInternals as PlayerInternals21 } from "@remotion/player";
|
|
36648
36770
|
|
|
36649
36771
|
// src/state/preview-size.tsx
|
|
36650
|
-
import { useCallback as useCallback160, useContext as useContext102, useMemo as
|
|
36772
|
+
import { useCallback as useCallback160, useContext as useContext102, useMemo as useMemo168, useState as useState100 } from "react";
|
|
36651
36773
|
import { Internals as Internals75 } from "remotion";
|
|
36652
36774
|
import { jsx as jsx306 } from "react/jsx-runtime";
|
|
36653
36775
|
var key5 = "remotion.previewSize";
|
|
@@ -36683,7 +36805,7 @@ var PreviewSizeProvider = ({ children }) => {
|
|
|
36683
36805
|
return newVal;
|
|
36684
36806
|
});
|
|
36685
36807
|
}, []);
|
|
36686
|
-
const previewSizeCtx =
|
|
36808
|
+
const previewSizeCtx = useMemo168(() => {
|
|
36687
36809
|
return {
|
|
36688
36810
|
size: editorZoomGestures ? size3 : {
|
|
36689
36811
|
size: size3.size,
|
|
@@ -36704,7 +36826,7 @@ var PreviewSizeProvider = ({ children }) => {
|
|
|
36704
36826
|
};
|
|
36705
36827
|
|
|
36706
36828
|
// src/components/CheckerboardProvider.tsx
|
|
36707
|
-
import { useCallback as useCallback161, useMemo as
|
|
36829
|
+
import { useCallback as useCallback161, useMemo as useMemo169, useState as useState101 } from "react";
|
|
36708
36830
|
import { jsx as jsx307 } from "react/jsx-runtime";
|
|
36709
36831
|
var CheckerboardProvider = ({ children }) => {
|
|
36710
36832
|
const [checkerboard, setCheckerboardState] = useState101(() => loadCheckerboardOption());
|
|
@@ -36715,7 +36837,7 @@ var CheckerboardProvider = ({ children }) => {
|
|
|
36715
36837
|
return newVal;
|
|
36716
36838
|
});
|
|
36717
36839
|
}, []);
|
|
36718
|
-
const checkerboardCtx =
|
|
36840
|
+
const checkerboardCtx = useMemo169(() => {
|
|
36719
36841
|
return {
|
|
36720
36842
|
checkerboard,
|
|
36721
36843
|
setCheckerboard
|
|
@@ -36728,19 +36850,19 @@ var CheckerboardProvider = ({ children }) => {
|
|
|
36728
36850
|
};
|
|
36729
36851
|
|
|
36730
36852
|
// src/components/MediaVolumeProvider.tsx
|
|
36731
|
-
import { useMemo as
|
|
36853
|
+
import { useMemo as useMemo170, useState as useState102 } from "react";
|
|
36732
36854
|
import { Internals as Internals76 } from "remotion";
|
|
36733
36855
|
import { jsx as jsx308 } from "react/jsx-runtime";
|
|
36734
36856
|
var MediaVolumeProvider = ({ children }) => {
|
|
36735
36857
|
const [mediaMuted, setMediaMuted] = useState102(() => loadMuteOption());
|
|
36736
36858
|
const [mediaVolume, setMediaVolume] = useState102(1);
|
|
36737
|
-
const mediaVolumeContextValue =
|
|
36859
|
+
const mediaVolumeContextValue = useMemo170(() => {
|
|
36738
36860
|
return {
|
|
36739
36861
|
mediaMuted,
|
|
36740
36862
|
mediaVolume
|
|
36741
36863
|
};
|
|
36742
36864
|
}, [mediaMuted, mediaVolume]);
|
|
36743
|
-
const setMediaVolumeContextValue =
|
|
36865
|
+
const setMediaVolumeContextValue = useMemo170(() => {
|
|
36744
36866
|
return {
|
|
36745
36867
|
setMediaMuted,
|
|
36746
36868
|
setMediaVolume
|
|
@@ -36756,11 +36878,11 @@ var MediaVolumeProvider = ({ children }) => {
|
|
|
36756
36878
|
};
|
|
36757
36879
|
|
|
36758
36880
|
// src/components/ModalsProvider.tsx
|
|
36759
|
-
import { useMemo as
|
|
36881
|
+
import { useMemo as useMemo171, useState as useState103 } from "react";
|
|
36760
36882
|
import { jsx as jsx309 } from "react/jsx-runtime";
|
|
36761
36883
|
var ModalsProvider = ({ children }) => {
|
|
36762
36884
|
const [modalContextType, setModalContextType] = useState103(null);
|
|
36763
|
-
const modalsContext =
|
|
36885
|
+
const modalsContext = useMemo171(() => {
|
|
36764
36886
|
return {
|
|
36765
36887
|
selectedModal: modalContextType,
|
|
36766
36888
|
setSelectedModal: setModalContextType
|
|
@@ -36773,7 +36895,7 @@ var ModalsProvider = ({ children }) => {
|
|
|
36773
36895
|
};
|
|
36774
36896
|
|
|
36775
36897
|
// src/components/SetTimelineInOutProvider.tsx
|
|
36776
|
-
import { useEffect as useEffect90, useMemo as
|
|
36898
|
+
import { useEffect as useEffect90, useMemo as useMemo172, useState as useState104 } from "react";
|
|
36777
36899
|
|
|
36778
36900
|
// src/state/marks.ts
|
|
36779
36901
|
var localStorageKey4 = () => `remotion.editor.marksv2`;
|
|
@@ -36792,7 +36914,7 @@ var loadMarks = () => {
|
|
|
36792
36914
|
import { jsx as jsx310 } from "react/jsx-runtime";
|
|
36793
36915
|
var SetTimelineInOutProvider = ({ children }) => {
|
|
36794
36916
|
const [inAndOutFrames, setInAndOutFrames] = useState104(() => loadMarks());
|
|
36795
|
-
const setTimelineInOutContextValue =
|
|
36917
|
+
const setTimelineInOutContextValue = useMemo172(() => {
|
|
36796
36918
|
return {
|
|
36797
36919
|
setInAndOutFrames
|
|
36798
36920
|
};
|
|
@@ -36810,7 +36932,7 @@ var SetTimelineInOutProvider = ({ children }) => {
|
|
|
36810
36932
|
};
|
|
36811
36933
|
|
|
36812
36934
|
// src/components/ShowGuidesProvider.tsx
|
|
36813
|
-
import { useCallback as useCallback162, useMemo as
|
|
36935
|
+
import { useCallback as useCallback162, useMemo as useMemo173, useRef as useRef57, useState as useState105 } from "react";
|
|
36814
36936
|
import { jsx as jsx311 } from "react/jsx-runtime";
|
|
36815
36937
|
var ShowGuidesProvider = ({ children }) => {
|
|
36816
36938
|
const [guidesList, setGuidesList] = useState105(() => loadGuidesList());
|
|
@@ -36826,7 +36948,7 @@ var ShowGuidesProvider = ({ children }) => {
|
|
|
36826
36948
|
return newVal;
|
|
36827
36949
|
});
|
|
36828
36950
|
}, []);
|
|
36829
|
-
const editorShowGuidesCtx =
|
|
36951
|
+
const editorShowGuidesCtx = useMemo173(() => {
|
|
36830
36952
|
return {
|
|
36831
36953
|
editorShowGuides,
|
|
36832
36954
|
setEditorShowGuides,
|
|
@@ -36853,7 +36975,7 @@ var ShowGuidesProvider = ({ children }) => {
|
|
|
36853
36975
|
};
|
|
36854
36976
|
|
|
36855
36977
|
// src/components/ShowRulersProvider.tsx
|
|
36856
|
-
import { useCallback as useCallback163, useMemo as
|
|
36978
|
+
import { useCallback as useCallback163, useMemo as useMemo174, useState as useState106 } from "react";
|
|
36857
36979
|
import { jsx as jsx312 } from "react/jsx-runtime";
|
|
36858
36980
|
var ShowRulersProvider = ({ children }) => {
|
|
36859
36981
|
const [editorShowRulers, setEditorShowRulersState] = useState106(() => loadEditorShowRulersOption());
|
|
@@ -36864,7 +36986,7 @@ var ShowRulersProvider = ({ children }) => {
|
|
|
36864
36986
|
return newVal;
|
|
36865
36987
|
});
|
|
36866
36988
|
}, []);
|
|
36867
|
-
const editorShowRulersCtx =
|
|
36989
|
+
const editorShowRulersCtx = useMemo174(() => {
|
|
36868
36990
|
return {
|
|
36869
36991
|
editorShowRulers,
|
|
36870
36992
|
setEditorShowRulers
|
|
@@ -36896,7 +37018,7 @@ var VisualControlsUndoSync = () => {
|
|
|
36896
37018
|
};
|
|
36897
37019
|
|
|
36898
37020
|
// src/components/ZoomGesturesProvider.tsx
|
|
36899
|
-
import { useCallback as useCallback164, useMemo as
|
|
37021
|
+
import { useCallback as useCallback164, useMemo as useMemo175, useState as useState107 } from "react";
|
|
36900
37022
|
import { jsx as jsx313 } from "react/jsx-runtime";
|
|
36901
37023
|
var ZoomGesturesProvider = ({ children }) => {
|
|
36902
37024
|
const [editorZoomGestures, setEditorZoomGesturesState] = useState107(() => loadEditorZoomGesturesOption());
|
|
@@ -36907,7 +37029,7 @@ var ZoomGesturesProvider = ({ children }) => {
|
|
|
36907
37029
|
return newVal;
|
|
36908
37030
|
});
|
|
36909
37031
|
}, []);
|
|
36910
|
-
const editorZoomGesturesCtx =
|
|
37032
|
+
const editorZoomGesturesCtx = useMemo175(() => {
|
|
36911
37033
|
return {
|
|
36912
37034
|
editorZoomGestures,
|
|
36913
37035
|
setEditorZoomGestures
|
|
@@ -37044,7 +37166,7 @@ var ServerDisconnected = () => {
|
|
|
37044
37166
|
};
|
|
37045
37167
|
|
|
37046
37168
|
// src/FastRefreshProvider.tsx
|
|
37047
|
-
import { useCallback as useCallback165, useEffect as useEffect92, useMemo as
|
|
37169
|
+
import { useCallback as useCallback165, useEffect as useEffect92, useMemo as useMemo176, useState as useState108 } from "react";
|
|
37048
37170
|
import { jsx as jsx316 } from "react/jsx-runtime";
|
|
37049
37171
|
var FastRefreshProvider = ({ children }) => {
|
|
37050
37172
|
const [fastRefreshes, setFastRefreshes] = useState108(0);
|
|
@@ -37063,7 +37185,7 @@ var FastRefreshProvider = ({ children }) => {
|
|
|
37063
37185
|
}
|
|
37064
37186
|
}
|
|
37065
37187
|
}, []);
|
|
37066
|
-
const value =
|
|
37188
|
+
const value = useMemo176(() => ({ fastRefreshes, manualRefreshes, increaseManualRefreshes }), [fastRefreshes, manualRefreshes, increaseManualRefreshes]);
|
|
37067
37189
|
return /* @__PURE__ */ jsx316(FastRefreshContext.Provider, {
|
|
37068
37190
|
value,
|
|
37069
37191
|
children
|
|
@@ -37235,7 +37357,7 @@ import {
|
|
|
37235
37357
|
useContext as useContext105,
|
|
37236
37358
|
useEffect as useEffect93,
|
|
37237
37359
|
useImperativeHandle as useImperativeHandle14,
|
|
37238
|
-
useMemo as
|
|
37360
|
+
useMemo as useMemo177,
|
|
37239
37361
|
useState as useState109
|
|
37240
37362
|
} from "react";
|
|
37241
37363
|
import { getInputProps as getInputProps2, Internals as Internals78 } from "remotion";
|
|
@@ -37245,20 +37367,20 @@ var ResolveCompositionConfigInStudio = ({ children }) => {
|
|
|
37245
37367
|
const { compositions, canvasContent, currentCompositionMetadata } = useContext105(Internals78.CompositionManager);
|
|
37246
37368
|
const { fastRefreshes, manualRefreshes } = useContext105(FastRefreshContext);
|
|
37247
37369
|
if (manualRefreshes) {}
|
|
37248
|
-
const selectedComposition =
|
|
37370
|
+
const selectedComposition = useMemo177(() => {
|
|
37249
37371
|
return compositions.find((c) => canvasContent && canvasContent.type === "composition" && canvasContent.compositionId === c.id);
|
|
37250
37372
|
}, [canvasContent, compositions]);
|
|
37251
37373
|
const renderModalComposition = compositions.find((c) => c.id === currentRenderModalComposition);
|
|
37252
37374
|
const { props: allEditorProps } = useContext105(Internals78.EditorPropsContext);
|
|
37253
37375
|
const env = Internals78.getRemotionEnvironment();
|
|
37254
|
-
const inputProps =
|
|
37376
|
+
const inputProps = useMemo177(() => {
|
|
37255
37377
|
return typeof window === "undefined" || env.isPlayer ? {} : getInputProps2() ?? {};
|
|
37256
37378
|
}, [env.isPlayer]);
|
|
37257
37379
|
const [resolvedConfigs, setResolvedConfigs] = useState109({});
|
|
37258
|
-
const selectedEditorProps =
|
|
37380
|
+
const selectedEditorProps = useMemo177(() => {
|
|
37259
37381
|
return selectedComposition ? allEditorProps[selectedComposition.id] ?? {} : {};
|
|
37260
37382
|
}, [allEditorProps, selectedComposition]);
|
|
37261
|
-
const renderModalProps =
|
|
37383
|
+
const renderModalProps = useMemo177(() => {
|
|
37262
37384
|
return renderModalComposition ? allEditorProps[renderModalComposition.id] ?? {} : {};
|
|
37263
37385
|
}, [allEditorProps, renderModalComposition]);
|
|
37264
37386
|
const hasResolution = Boolean(currentCompositionMetadata);
|
|
@@ -37395,13 +37517,13 @@ var ResolveCompositionConfigInStudio = ({ children }) => {
|
|
|
37395
37517
|
inputProps
|
|
37396
37518
|
]);
|
|
37397
37519
|
const isTheSame = selectedComposition?.id === renderModalComposition?.id;
|
|
37398
|
-
const currentDefaultProps =
|
|
37520
|
+
const currentDefaultProps = useMemo177(() => {
|
|
37399
37521
|
return {
|
|
37400
37522
|
...selectedComposition?.defaultProps ?? {},
|
|
37401
37523
|
...selectedEditorProps ?? {}
|
|
37402
37524
|
};
|
|
37403
37525
|
}, [selectedComposition?.defaultProps, selectedEditorProps]);
|
|
37404
|
-
const originalProps =
|
|
37526
|
+
const originalProps = useMemo177(() => {
|
|
37405
37527
|
return {
|
|
37406
37528
|
...currentDefaultProps,
|
|
37407
37529
|
...inputProps ?? {}
|
|
@@ -37470,7 +37592,7 @@ var ResolveCompositionConfigInStudio = ({ children }) => {
|
|
|
37470
37592
|
renderModalComposition,
|
|
37471
37593
|
renderModalProps
|
|
37472
37594
|
]);
|
|
37473
|
-
const resolvedConfigsIncludingStaticOnes =
|
|
37595
|
+
const resolvedConfigsIncludingStaticOnes = useMemo177(() => {
|
|
37474
37596
|
const staticComps = compositions.filter((c) => {
|
|
37475
37597
|
return c.calculateMetadata === null;
|
|
37476
37598
|
});
|