@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
|
@@ -2821,7 +2821,7 @@ import { Internals as Internals79 } from "remotion";
|
|
|
2821
2821
|
|
|
2822
2822
|
// src/components/Editor.tsx
|
|
2823
2823
|
import { PlayerInternals as PlayerInternals20 } from "@remotion/player";
|
|
2824
|
-
import React202, { useCallback as useCallback159, useMemo as
|
|
2824
|
+
import React202, { useCallback as useCallback159, useMemo as useMemo167, useState as useState100 } from "react";
|
|
2825
2825
|
import { Internals as Internals74 } from "remotion";
|
|
2826
2826
|
|
|
2827
2827
|
// src/helpers/noop.ts
|
|
@@ -4854,11 +4854,13 @@ var openInFileExplorer = ({ directory }) => {
|
|
|
4854
4854
|
var applyCodemod = ({
|
|
4855
4855
|
codemod,
|
|
4856
4856
|
dryRun,
|
|
4857
|
+
symbolicatedStack,
|
|
4857
4858
|
signal
|
|
4858
4859
|
}) => {
|
|
4859
4860
|
const body = {
|
|
4860
4861
|
codemod,
|
|
4861
|
-
dryRun
|
|
4862
|
+
dryRun,
|
|
4863
|
+
symbolicatedStack
|
|
4862
4864
|
};
|
|
4863
4865
|
return callApi("/api/apply-codemod", body, signal);
|
|
4864
4866
|
};
|
|
@@ -4875,9 +4877,6 @@ var cancelRenderJob = (job) => {
|
|
|
4875
4877
|
var updateAvailable = (signal) => {
|
|
4876
4878
|
return callApi("/api/update-available", {}, signal);
|
|
4877
4879
|
};
|
|
4878
|
-
var getProjectInfo = (signal) => {
|
|
4879
|
-
return callApi("/api/project-info", {}, signal);
|
|
4880
|
-
};
|
|
4881
4880
|
var callUpdateDefaultPropsApi = (compositionId, defaultProps, enumPaths) => {
|
|
4882
4881
|
return callApi("/api/update-default-props", {
|
|
4883
4882
|
compositionId,
|
|
@@ -10523,6 +10522,12 @@ var getOriginalLocationFromStack = async (stack2, type) => {
|
|
|
10523
10522
|
|
|
10524
10523
|
// src/components/Timeline/use-resolved-stack.ts
|
|
10525
10524
|
var resolvedCache = new Map;
|
|
10525
|
+
var hasResolvedStack = (stack2) => {
|
|
10526
|
+
if (!stack2) {
|
|
10527
|
+
return true;
|
|
10528
|
+
}
|
|
10529
|
+
return resolvedCache.has(stack2);
|
|
10530
|
+
};
|
|
10526
10531
|
var inFlight = new Set;
|
|
10527
10532
|
var subscribers = new Map;
|
|
10528
10533
|
var useResolvedStack = (stack2) => {
|
|
@@ -10554,6 +10559,8 @@ var useResolvedStack = (stack2) => {
|
|
|
10554
10559
|
subs.forEach((fn) => fn(frame2));
|
|
10555
10560
|
}).catch((err) => {
|
|
10556
10561
|
console.error("Could not get original location of Sequence", err);
|
|
10562
|
+
resolvedCache.set(stack2, null);
|
|
10563
|
+
subs.forEach((fn) => fn(null));
|
|
10557
10564
|
}).finally(() => {
|
|
10558
10565
|
inFlight.delete(stack2);
|
|
10559
10566
|
});
|
|
@@ -23328,7 +23335,7 @@ var TimeValue = () => {
|
|
|
23328
23335
|
import { jsx as jsx204 } from "react/jsx-runtime";
|
|
23329
23336
|
var TIMELINE_TIME_INDICATOR_HEIGHT = 39;
|
|
23330
23337
|
var container40 = {
|
|
23331
|
-
height: TIMELINE_TIME_INDICATOR_HEIGHT
|
|
23338
|
+
height: TIMELINE_TIME_INDICATOR_HEIGHT,
|
|
23332
23339
|
boxShadow: `0 0 4px ${TIMELINE_BACKGROUND}`,
|
|
23333
23340
|
position: "absolute",
|
|
23334
23341
|
backgroundColor: TIMELINE_BACKGROUND,
|
|
@@ -23414,9 +23421,8 @@ var TimelineTimeIndicatorsInner = ({ windowWidth, durationInFrames, fps }) => {
|
|
|
23414
23421
|
const style10 = useMemo115(() => {
|
|
23415
23422
|
return {
|
|
23416
23423
|
...container40,
|
|
23417
|
-
width: windowWidth
|
|
23424
|
+
width: windowWidth,
|
|
23418
23425
|
overflow: "hidden",
|
|
23419
|
-
marginLeft: SPLITTER_HANDLE_SIZE / 2,
|
|
23420
23426
|
pointerEvents: "none"
|
|
23421
23427
|
};
|
|
23422
23428
|
}, [windowWidth]);
|
|
@@ -23433,7 +23439,7 @@ var TimelineTimeIndicatorsInner = ({ windowWidth, durationInFrames, fps }) => {
|
|
|
23433
23439
|
frame: index * fps,
|
|
23434
23440
|
style: {
|
|
23435
23441
|
...secondTick,
|
|
23436
|
-
left: frameInterval * index * fps + TIMELINE_PADDING
|
|
23442
|
+
left: frameInterval * index * fps + TIMELINE_PADDING
|
|
23437
23443
|
},
|
|
23438
23444
|
showTime: index > 0
|
|
23439
23445
|
};
|
|
@@ -23443,7 +23449,7 @@ var TimelineTimeIndicatorsInner = ({ windowWidth, durationInFrames, fps }) => {
|
|
|
23443
23449
|
frame: index,
|
|
23444
23450
|
style: {
|
|
23445
23451
|
...tick,
|
|
23446
|
-
left: frameInterval * index + TIMELINE_PADDING
|
|
23452
|
+
left: frameInterval * index + TIMELINE_PADDING,
|
|
23447
23453
|
height: index % fps === 0 ? 10 : index / frameMarkerEveryNth % 2 === 0 ? 5 : 2
|
|
23448
23454
|
},
|
|
23449
23455
|
showTime: false
|
|
@@ -24664,6 +24670,50 @@ var TimelineEffectGroupRow = ({
|
|
|
24664
24670
|
return false;
|
|
24665
24671
|
}, [disabledStatus]);
|
|
24666
24672
|
const canToggle = previewConnected && disabledStatus !== null && disabledStatus.canUpdate;
|
|
24673
|
+
const deleteDisabled = !previewConnected || effectStatus.type !== "can-update-effect" || !validatedLocation.source;
|
|
24674
|
+
const onDeleteEffectFromSource = useCallback117(async () => {
|
|
24675
|
+
if (deleteDisabled) {
|
|
24676
|
+
return;
|
|
24677
|
+
}
|
|
24678
|
+
try {
|
|
24679
|
+
const result = await callApi("/api/delete-effect", {
|
|
24680
|
+
fileName: validatedLocation.source,
|
|
24681
|
+
sequenceNodePath: nodePath,
|
|
24682
|
+
effectIndex
|
|
24683
|
+
});
|
|
24684
|
+
if (result.success) {
|
|
24685
|
+
showNotification("Removed effect from source file", 2000);
|
|
24686
|
+
} else {
|
|
24687
|
+
showNotification(result.reason, 4000);
|
|
24688
|
+
}
|
|
24689
|
+
} catch (err) {
|
|
24690
|
+
showNotification(err.message, 4000);
|
|
24691
|
+
}
|
|
24692
|
+
}, [deleteDisabled, effectIndex, nodePath, validatedLocation.source]);
|
|
24693
|
+
const contextMenuValues = useMemo127(() => {
|
|
24694
|
+
if (!previewConnected) {
|
|
24695
|
+
return [];
|
|
24696
|
+
}
|
|
24697
|
+
return [
|
|
24698
|
+
{
|
|
24699
|
+
type: "item",
|
|
24700
|
+
id: "delete-effect",
|
|
24701
|
+
keyHint: null,
|
|
24702
|
+
label: "Delete",
|
|
24703
|
+
leftItem: null,
|
|
24704
|
+
disabled: deleteDisabled,
|
|
24705
|
+
onClick: () => {
|
|
24706
|
+
if (deleteDisabled) {
|
|
24707
|
+
return;
|
|
24708
|
+
}
|
|
24709
|
+
onDeleteEffectFromSource();
|
|
24710
|
+
},
|
|
24711
|
+
quickSwitcherLabel: null,
|
|
24712
|
+
subMenu: null,
|
|
24713
|
+
value: "delete-effect"
|
|
24714
|
+
}
|
|
24715
|
+
];
|
|
24716
|
+
}, [deleteDisabled, onDeleteEffectFromSource, previewConnected]);
|
|
24667
24717
|
const onToggle = useCallback117((type) => {
|
|
24668
24718
|
if (!canToggle || previewServerState.type !== "connected") {
|
|
24669
24719
|
return;
|
|
@@ -24696,7 +24746,7 @@ var TimelineEffectGroupRow = ({
|
|
|
24696
24746
|
height: TREE_GROUP_ROW_HEIGHT,
|
|
24697
24747
|
paddingRight: EXPANDED_SECTION_PADDING_RIGHT
|
|
24698
24748
|
}), []);
|
|
24699
|
-
|
|
24749
|
+
const row7 = /* @__PURE__ */ jsx218(TimelineRowChrome, {
|
|
24700
24750
|
depth: rowDepth,
|
|
24701
24751
|
eye: canToggle ? /* @__PURE__ */ jsx218(TimelineLayerEye, {
|
|
24702
24752
|
type: "effect",
|
|
@@ -24715,6 +24765,10 @@ var TimelineEffectGroupRow = ({
|
|
|
24715
24765
|
children: label9
|
|
24716
24766
|
})
|
|
24717
24767
|
});
|
|
24768
|
+
return previewConnected ? /* @__PURE__ */ jsx218(ContextMenu, {
|
|
24769
|
+
values: contextMenuValues,
|
|
24770
|
+
children: row7
|
|
24771
|
+
}) : row7;
|
|
24718
24772
|
};
|
|
24719
24773
|
|
|
24720
24774
|
// src/components/Timeline/TimelineFieldRow.tsx
|
|
@@ -26307,6 +26361,22 @@ import {
|
|
|
26307
26361
|
} from "@remotion/timeline-utils";
|
|
26308
26362
|
import { useEffect as useEffect77, useMemo as useMemo134, useRef as useRef50, useState as useState80 } from "react";
|
|
26309
26363
|
import { useVideoConfig as useVideoConfig5 } from "remotion";
|
|
26364
|
+
|
|
26365
|
+
// src/components/Timeline/get-timeline-video-info-widths.ts
|
|
26366
|
+
var getTimelineVideoInfoWidths = ({
|
|
26367
|
+
visualizationWidth,
|
|
26368
|
+
naturalWidth,
|
|
26369
|
+
premountWidth,
|
|
26370
|
+
postmountWidth
|
|
26371
|
+
}) => {
|
|
26372
|
+
const mountWidth = premountWidth + postmountWidth;
|
|
26373
|
+
return {
|
|
26374
|
+
mediaVisualizationWidth: Math.max(0, visualizationWidth - mountWidth),
|
|
26375
|
+
mediaNaturalWidth: Math.max(0, naturalWidth - mountWidth)
|
|
26376
|
+
};
|
|
26377
|
+
};
|
|
26378
|
+
|
|
26379
|
+
// src/components/Timeline/TimelineVideoInfo.tsx
|
|
26310
26380
|
import { jsx as jsx231, jsxs as jsxs110 } from "react/jsx-runtime";
|
|
26311
26381
|
var FILMSTRIP_HEIGHT = TIMELINE_LAYER_HEIGHT_IMAGE - 2;
|
|
26312
26382
|
var outerStyle = {
|
|
@@ -26317,7 +26387,6 @@ var outerStyle = {
|
|
|
26317
26387
|
};
|
|
26318
26388
|
var filmstripContainerStyle = {
|
|
26319
26389
|
height: FILMSTRIP_HEIGHT,
|
|
26320
|
-
width: "100%",
|
|
26321
26390
|
backgroundColor: "rgba(0, 0, 0, 0.3)",
|
|
26322
26391
|
display: "flex",
|
|
26323
26392
|
borderTopLeftRadius: 2,
|
|
@@ -26341,6 +26410,14 @@ var TimelineVideoInfo = ({
|
|
|
26341
26410
|
const ref2 = useRef50(null);
|
|
26342
26411
|
const [error, setError] = useState80(null);
|
|
26343
26412
|
const aspectRatio = useRef50(getAspectRatioFromCache(src));
|
|
26413
|
+
const { mediaVisualizationWidth, mediaNaturalWidth } = useMemo134(() => {
|
|
26414
|
+
return getTimelineVideoInfoWidths({
|
|
26415
|
+
visualizationWidth,
|
|
26416
|
+
naturalWidth,
|
|
26417
|
+
premountWidth,
|
|
26418
|
+
postmountWidth
|
|
26419
|
+
});
|
|
26420
|
+
}, [naturalWidth, postmountWidth, premountWidth, visualizationWidth]);
|
|
26344
26421
|
useEffect77(() => {
|
|
26345
26422
|
if (error) {
|
|
26346
26423
|
return;
|
|
@@ -26351,7 +26428,7 @@ var TimelineVideoInfo = ({
|
|
|
26351
26428
|
}
|
|
26352
26429
|
const controller = new AbortController;
|
|
26353
26430
|
const canvas = document.createElement("canvas");
|
|
26354
|
-
canvas.width =
|
|
26431
|
+
canvas.width = mediaVisualizationWidth;
|
|
26355
26432
|
canvas.height = FILMSTRIP_HEIGHT;
|
|
26356
26433
|
const ctx = canvas.getContext("2d");
|
|
26357
26434
|
if (!ctx) {
|
|
@@ -26359,7 +26436,7 @@ var TimelineVideoInfo = ({
|
|
|
26359
26436
|
}
|
|
26360
26437
|
current.appendChild(canvas);
|
|
26361
26438
|
const loopWidth = getLoopDisplayWidth2({
|
|
26362
|
-
visualizationWidth:
|
|
26439
|
+
visualizationWidth: mediaNaturalWidth,
|
|
26363
26440
|
loopDisplay
|
|
26364
26441
|
});
|
|
26365
26442
|
const shouldRepeatVideo = shouldTileLoopDisplay2(loopDisplay);
|
|
@@ -26388,7 +26465,7 @@ var TimelineVideoInfo = ({
|
|
|
26388
26465
|
const fromSeconds = trimBefore / fps;
|
|
26389
26466
|
const visibleDurationInFrames = shouldRepeatVideo && loopDisplay ? loopDisplay.durationInFrames : durationInFrames;
|
|
26390
26467
|
const toSeconds = fromSeconds + visibleDurationInFrames * playbackRate / fps;
|
|
26391
|
-
const targetWidth = shouldRepeatVideo ? targetCanvas.width :
|
|
26468
|
+
const targetWidth = shouldRepeatVideo ? targetCanvas.width : mediaNaturalWidth;
|
|
26392
26469
|
if (aspectRatio.current !== null) {
|
|
26393
26470
|
ensureSlots({
|
|
26394
26471
|
filledSlots,
|
|
@@ -26507,13 +26584,20 @@ var TimelineVideoInfo = ({
|
|
|
26507
26584
|
error,
|
|
26508
26585
|
fps,
|
|
26509
26586
|
loopDisplay,
|
|
26510
|
-
|
|
26587
|
+
mediaNaturalWidth,
|
|
26588
|
+
mediaVisualizationWidth,
|
|
26511
26589
|
playbackRate,
|
|
26512
26590
|
src,
|
|
26513
|
-
trimBefore
|
|
26514
|
-
visualizationWidth
|
|
26591
|
+
trimBefore
|
|
26515
26592
|
]);
|
|
26516
|
-
const audioWidth =
|
|
26593
|
+
const audioWidth = mediaVisualizationWidth;
|
|
26594
|
+
const filmstripStyle = useMemo134(() => {
|
|
26595
|
+
return {
|
|
26596
|
+
...filmstripContainerStyle,
|
|
26597
|
+
width: mediaVisualizationWidth,
|
|
26598
|
+
marginLeft: premountWidth
|
|
26599
|
+
};
|
|
26600
|
+
}, [mediaVisualizationWidth, premountWidth]);
|
|
26517
26601
|
const audioStyle = useMemo134(() => {
|
|
26518
26602
|
return {
|
|
26519
26603
|
height: TIMELINE_LAYER_HEIGHT_AUDIO,
|
|
@@ -26527,7 +26611,7 @@ var TimelineVideoInfo = ({
|
|
|
26527
26611
|
children: [
|
|
26528
26612
|
/* @__PURE__ */ jsx231("div", {
|
|
26529
26613
|
ref: ref2,
|
|
26530
|
-
style:
|
|
26614
|
+
style: filmstripStyle
|
|
26531
26615
|
}),
|
|
26532
26616
|
/* @__PURE__ */ jsx231("div", {
|
|
26533
26617
|
style: audioStyle,
|
|
@@ -27361,7 +27445,7 @@ var InstallPackageModal = ({ packageManager }) => {
|
|
|
27361
27445
|
};
|
|
27362
27446
|
|
|
27363
27447
|
// src/components/NewComposition/DeleteComposition.tsx
|
|
27364
|
-
import { useCallback as useCallback125, useContext as useContext92, useMemo as
|
|
27448
|
+
import { useCallback as useCallback125, useContext as useContext92, useMemo as useMemo141 } from "react";
|
|
27365
27449
|
|
|
27366
27450
|
// src/components/RenderModal/ResolveCompositionBeforeModal.tsx
|
|
27367
27451
|
import React170, { useContext as useContext90, useEffect as useEffect80, useMemo as useMemo139 } from "react";
|
|
@@ -27446,7 +27530,27 @@ var ResolveCompositionBeforeModal = ({ compositionId, children }) => {
|
|
|
27446
27530
|
};
|
|
27447
27531
|
|
|
27448
27532
|
// src/components/NewComposition/CodemodFooter.tsx
|
|
27449
|
-
import {
|
|
27533
|
+
import {
|
|
27534
|
+
useCallback as useCallback124,
|
|
27535
|
+
useContext as useContext91,
|
|
27536
|
+
useEffect as useEffect81,
|
|
27537
|
+
useMemo as useMemo140,
|
|
27538
|
+
useState as useState81
|
|
27539
|
+
} from "react";
|
|
27540
|
+
|
|
27541
|
+
// src/helpers/resolved-stack-to-symbolicated.ts
|
|
27542
|
+
var resolvedStackToSymbolicated = (location2) => {
|
|
27543
|
+
if (!location2?.source) {
|
|
27544
|
+
return null;
|
|
27545
|
+
}
|
|
27546
|
+
return {
|
|
27547
|
+
originalFileName: location2.source,
|
|
27548
|
+
originalLineNumber: location2.line,
|
|
27549
|
+
originalColumnNumber: location2.column,
|
|
27550
|
+
originalFunctionName: null,
|
|
27551
|
+
originalScriptCode: null
|
|
27552
|
+
};
|
|
27553
|
+
};
|
|
27450
27554
|
|
|
27451
27555
|
// src/components/NewComposition/DiffPreview.tsx
|
|
27452
27556
|
import { jsx as jsx243, jsxs as jsxs118 } from "react/jsx-runtime";
|
|
@@ -27465,7 +27569,7 @@ var CodemodDiffPreview = ({ status }) => {
|
|
|
27465
27569
|
children: [
|
|
27466
27570
|
/* @__PURE__ */ jsx243("span", {
|
|
27467
27571
|
style: { color: LIGHT_TEXT, fontSize: 13, lineHeight: 1.2 },
|
|
27468
|
-
children: "This will edit your
|
|
27572
|
+
children: "This will edit your codebase."
|
|
27469
27573
|
}),
|
|
27470
27574
|
/* @__PURE__ */ jsx243("br", {}),
|
|
27471
27575
|
/* @__PURE__ */ jsxs118("span", {
|
|
@@ -27498,6 +27602,7 @@ var CodemodDiffPreview = ({ status }) => {
|
|
|
27498
27602
|
import { jsx as jsx244, jsxs as jsxs119 } from "react/jsx-runtime";
|
|
27499
27603
|
var CodemodFooter = ({
|
|
27500
27604
|
codemod,
|
|
27605
|
+
stack: stack2,
|
|
27501
27606
|
valid,
|
|
27502
27607
|
loadingNotification,
|
|
27503
27608
|
successNotification,
|
|
@@ -27511,18 +27616,9 @@ var CodemodFooter = ({
|
|
|
27511
27616
|
const [codemodStatus, setCanApplyCodemod] = useState81({
|
|
27512
27617
|
type: "loading"
|
|
27513
27618
|
});
|
|
27514
|
-
const
|
|
27515
|
-
|
|
27516
|
-
|
|
27517
|
-
getProjectInfo(controller.signal).then((info) => {
|
|
27518
|
-
setProjectInfo(info.projectInfo);
|
|
27519
|
-
}).catch((err) => {
|
|
27520
|
-
showNotification(`Could not get project info: ${err.message}. Unable to duplicate composition`, 3000);
|
|
27521
|
-
});
|
|
27522
|
-
return () => {
|
|
27523
|
-
controller.abort();
|
|
27524
|
-
};
|
|
27525
|
-
}, []);
|
|
27619
|
+
const resolvedLocation = useResolvedStack(stack2);
|
|
27620
|
+
const symbolicatedStack = useMemo140(() => resolvedStackToSymbolicated(resolvedLocation), [resolvedLocation]);
|
|
27621
|
+
const relativeFilePath = symbolicatedStack?.originalFileName ?? null;
|
|
27526
27622
|
const trigger = useCallback124(() => {
|
|
27527
27623
|
setSubmitting(true);
|
|
27528
27624
|
setSelectedModal(null);
|
|
@@ -27530,6 +27626,7 @@ var CodemodFooter = ({
|
|
|
27530
27626
|
applyCodemod({
|
|
27531
27627
|
codemod,
|
|
27532
27628
|
dryRun: false,
|
|
27629
|
+
symbolicatedStack,
|
|
27533
27630
|
signal: new AbortController().signal
|
|
27534
27631
|
}).then(() => {
|
|
27535
27632
|
notification2.replaceContent(successNotification, 2000);
|
|
@@ -27543,12 +27640,14 @@ var CodemodFooter = ({
|
|
|
27543
27640
|
loadingNotification,
|
|
27544
27641
|
onSuccess,
|
|
27545
27642
|
setSelectedModal,
|
|
27546
|
-
successNotification
|
|
27643
|
+
successNotification,
|
|
27644
|
+
symbolicatedStack
|
|
27547
27645
|
]);
|
|
27548
27646
|
const getCanApplyCodemod = useCallback124(async (signal) => {
|
|
27549
27647
|
const res = await applyCodemod({
|
|
27550
27648
|
codemod,
|
|
27551
27649
|
dryRun: true,
|
|
27650
|
+
symbolicatedStack,
|
|
27552
27651
|
signal
|
|
27553
27652
|
});
|
|
27554
27653
|
if (res.success) {
|
|
@@ -27559,8 +27658,25 @@ var CodemodFooter = ({
|
|
|
27559
27658
|
error: res.reason
|
|
27560
27659
|
});
|
|
27561
27660
|
}
|
|
27562
|
-
}, [codemod]);
|
|
27661
|
+
}, [codemod, symbolicatedStack]);
|
|
27563
27662
|
useEffect81(() => {
|
|
27663
|
+
if (!stack2) {
|
|
27664
|
+
setCanApplyCodemod({
|
|
27665
|
+
type: "fail",
|
|
27666
|
+
error: "Could not determine where this composition is defined"
|
|
27667
|
+
});
|
|
27668
|
+
return;
|
|
27669
|
+
}
|
|
27670
|
+
if (!hasResolvedStack(stack2)) {
|
|
27671
|
+
return;
|
|
27672
|
+
}
|
|
27673
|
+
if (!symbolicatedStack) {
|
|
27674
|
+
setCanApplyCodemod({
|
|
27675
|
+
type: "fail",
|
|
27676
|
+
error: "Could not resolve the source location of this composition"
|
|
27677
|
+
});
|
|
27678
|
+
return;
|
|
27679
|
+
}
|
|
27564
27680
|
const abortController = new AbortController;
|
|
27565
27681
|
let aborted = false;
|
|
27566
27682
|
getCanApplyCodemod(abortController.signal).then(() => {
|
|
@@ -27569,14 +27685,14 @@ var CodemodFooter = ({
|
|
|
27569
27685
|
if (aborted) {
|
|
27570
27686
|
return;
|
|
27571
27687
|
}
|
|
27572
|
-
showNotification(
|
|
27688
|
+
showNotification(`${errorNotification}: ${err.message}`, 3000);
|
|
27573
27689
|
});
|
|
27574
27690
|
return () => {
|
|
27575
27691
|
aborted = true;
|
|
27576
27692
|
abortController.abort();
|
|
27577
27693
|
};
|
|
27578
|
-
}, [getCanApplyCodemod]);
|
|
27579
|
-
const disabled = !valid || submitting ||
|
|
27694
|
+
}, [errorNotification, getCanApplyCodemod, stack2, symbolicatedStack]);
|
|
27695
|
+
const disabled = !valid || submitting || symbolicatedStack === null || codemodStatus.type !== "success";
|
|
27580
27696
|
const { registerKeybinding } = useKeybinding();
|
|
27581
27697
|
useEffect81(() => {
|
|
27582
27698
|
if (disabled) {
|
|
@@ -27586,7 +27702,7 @@ var CodemodFooter = ({
|
|
|
27586
27702
|
callback() {
|
|
27587
27703
|
trigger();
|
|
27588
27704
|
},
|
|
27589
|
-
commandCtrlKey:
|
|
27705
|
+
commandCtrlKey: false,
|
|
27590
27706
|
key: "Enter",
|
|
27591
27707
|
event: "keydown",
|
|
27592
27708
|
preventDefault: true,
|
|
@@ -27612,10 +27728,10 @@ var CodemodFooter = ({
|
|
|
27612
27728
|
onClick: trigger,
|
|
27613
27729
|
disabled,
|
|
27614
27730
|
children: [
|
|
27615
|
-
|
|
27731
|
+
relativeFilePath ? submitLabel({ relativeRootPath: relativeFilePath }) : genericSubmitLabel,
|
|
27616
27732
|
/* @__PURE__ */ jsx244(ShortcutHint, {
|
|
27617
27733
|
keyToPress: "↵",
|
|
27618
|
-
cmdOrCtrl:
|
|
27734
|
+
cmdOrCtrl: false
|
|
27619
27735
|
})
|
|
27620
27736
|
]
|
|
27621
27737
|
})
|
|
@@ -27637,7 +27753,8 @@ var DeleteCompositionLoaded = ({ compositionId }) => {
|
|
|
27637
27753
|
throw new Error("Resolved composition context");
|
|
27638
27754
|
}
|
|
27639
27755
|
const { unresolved } = context;
|
|
27640
|
-
const
|
|
27756
|
+
const compositionStack = unresolved.stack ?? null;
|
|
27757
|
+
const codemod = useMemo141(() => {
|
|
27641
27758
|
return {
|
|
27642
27759
|
type: "delete-composition",
|
|
27643
27760
|
idToDelete: compositionId
|
|
@@ -27686,6 +27803,7 @@ var DeleteCompositionLoaded = ({ compositionId }) => {
|
|
|
27686
27803
|
genericSubmitLabel: `Delete`,
|
|
27687
27804
|
submitLabel: ({ relativeRootPath }) => `Delete from ${relativeRootPath}`,
|
|
27688
27805
|
codemod,
|
|
27806
|
+
stack: compositionStack,
|
|
27689
27807
|
valid: true,
|
|
27690
27808
|
onSuccess: null
|
|
27691
27809
|
})
|
|
@@ -27707,7 +27825,7 @@ var DeleteComposition = ({ compositionId }) => {
|
|
|
27707
27825
|
};
|
|
27708
27826
|
|
|
27709
27827
|
// src/components/NewComposition/DuplicateComposition.tsx
|
|
27710
|
-
import { useCallback as useCallback127, useContext as useContext93, useMemo as
|
|
27828
|
+
import { useCallback as useCallback127, useContext as useContext93, useMemo as useMemo142, useState as useState82 } from "react";
|
|
27711
27829
|
import { Internals as Internals69 } from "remotion";
|
|
27712
27830
|
|
|
27713
27831
|
// src/helpers/validate-new-comp-data.ts
|
|
@@ -27818,6 +27936,7 @@ var DuplicateCompositionLoaded = ({ initialType }) => {
|
|
|
27818
27936
|
throw new Error("Resolved composition context");
|
|
27819
27937
|
}
|
|
27820
27938
|
const { resolved, unresolved } = context;
|
|
27939
|
+
const compositionStack = unresolved.stack ?? null;
|
|
27821
27940
|
const [initialCompType] = useState82(initialType);
|
|
27822
27941
|
const hadDimensionsDefined = unresolved.width && unresolved.height;
|
|
27823
27942
|
const hadFpsDefined = unresolved.fps !== undefined;
|
|
@@ -27898,7 +28017,7 @@ var DuplicateCompositionLoaded = ({ initialType }) => {
|
|
|
27898
28017
|
const compNameErrMessage = validateCompositionName(newId, compositions);
|
|
27899
28018
|
const compWidthErrMessage = validateCompositionDimension("Width", size3.width);
|
|
27900
28019
|
const compHeightErrMessage = validateCompositionDimension("Height", size3.height);
|
|
27901
|
-
const typeValues =
|
|
28020
|
+
const typeValues = useMemo142(() => {
|
|
27902
28021
|
return [
|
|
27903
28022
|
{
|
|
27904
28023
|
id: "composition",
|
|
@@ -27925,7 +28044,7 @@ var DuplicateCompositionLoaded = ({ initialType }) => {
|
|
|
27925
28044
|
];
|
|
27926
28045
|
}, [onTypeChanged]);
|
|
27927
28046
|
const valid = compNameErrMessage === null && compWidthErrMessage === null && compHeightErrMessage === null;
|
|
27928
|
-
const codemod =
|
|
28047
|
+
const codemod = useMemo142(() => {
|
|
27929
28048
|
return {
|
|
27930
28049
|
type: "duplicate-composition",
|
|
27931
28050
|
idToDuplicate: resolved.result.id,
|
|
@@ -28149,6 +28268,7 @@ var DuplicateCompositionLoaded = ({ initialType }) => {
|
|
|
28149
28268
|
genericSubmitLabel: "Duplicate",
|
|
28150
28269
|
submitLabel: ({ relativeRootPath }) => `Add to ${relativeRootPath}`,
|
|
28151
28270
|
codemod,
|
|
28271
|
+
stack: compositionStack,
|
|
28152
28272
|
valid,
|
|
28153
28273
|
onSuccess: onDuplicateSuccess
|
|
28154
28274
|
})
|
|
@@ -28170,7 +28290,7 @@ var DuplicateComposition = ({ compositionId, compositionType }) => {
|
|
|
28170
28290
|
};
|
|
28171
28291
|
|
|
28172
28292
|
// src/components/NewComposition/RenameComposition.tsx
|
|
28173
|
-
import { useCallback as useCallback128, useContext as useContext94, useMemo as
|
|
28293
|
+
import { useCallback as useCallback128, useContext as useContext94, useMemo as useMemo143, useState as useState83 } from "react";
|
|
28174
28294
|
import { Internals as Internals70 } from "remotion";
|
|
28175
28295
|
import { jsx as jsx248, jsxs as jsxs123, Fragment as Fragment37 } from "react/jsx-runtime";
|
|
28176
28296
|
var content5 = {
|
|
@@ -28185,7 +28305,8 @@ var RenameCompositionLoaded = () => {
|
|
|
28185
28305
|
if (!context) {
|
|
28186
28306
|
throw new Error("Resolved composition context");
|
|
28187
28307
|
}
|
|
28188
|
-
const { resolved } = context;
|
|
28308
|
+
const { resolved, unresolved } = context;
|
|
28309
|
+
const compositionStack = unresolved.stack ?? null;
|
|
28189
28310
|
const { compositions } = useContext94(Internals70.CompositionManager);
|
|
28190
28311
|
const [newId, setName] = useState83(() => {
|
|
28191
28312
|
return resolved.result.id;
|
|
@@ -28195,7 +28316,7 @@ var RenameCompositionLoaded = () => {
|
|
|
28195
28316
|
}, []);
|
|
28196
28317
|
const compNameErrMessage = newId === resolved.result.id ? null : validateCompositionName(newId, compositions);
|
|
28197
28318
|
const valid = compNameErrMessage === null && resolved.result.id !== newId;
|
|
28198
|
-
const codemod =
|
|
28319
|
+
const codemod = useMemo143(() => {
|
|
28199
28320
|
return {
|
|
28200
28321
|
type: "rename-composition",
|
|
28201
28322
|
idToRename: resolved.result.id,
|
|
@@ -28262,6 +28383,7 @@ var RenameCompositionLoaded = () => {
|
|
|
28262
28383
|
genericSubmitLabel: "Rename",
|
|
28263
28384
|
submitLabel: ({ relativeRootPath }) => `Modify ${relativeRootPath}`,
|
|
28264
28385
|
codemod,
|
|
28386
|
+
stack: compositionStack,
|
|
28265
28387
|
valid,
|
|
28266
28388
|
onSuccess: null
|
|
28267
28389
|
})
|
|
@@ -28281,7 +28403,7 @@ var RenameComposition = ({ compositionId }) => {
|
|
|
28281
28403
|
};
|
|
28282
28404
|
|
|
28283
28405
|
// src/components/OverrideInputProps.tsx
|
|
28284
|
-
import { useCallback as useCallback129, useContext as useContext95, useMemo as
|
|
28406
|
+
import { useCallback as useCallback129, useContext as useContext95, useMemo as useMemo144, useState as useState84 } from "react";
|
|
28285
28407
|
import { Internals as Internals71 } from "remotion";
|
|
28286
28408
|
import { jsx as jsx249, jsxs as jsxs124 } from "react/jsx-runtime";
|
|
28287
28409
|
var style10 = {
|
|
@@ -28325,7 +28447,7 @@ var Inner = () => {
|
|
|
28325
28447
|
return null;
|
|
28326
28448
|
});
|
|
28327
28449
|
const { setSelectedModal } = useContext95(ModalsContext);
|
|
28328
|
-
const valid =
|
|
28450
|
+
const valid = useMemo144(() => {
|
|
28329
28451
|
if (!value)
|
|
28330
28452
|
return true;
|
|
28331
28453
|
return isValidJSON(value);
|
|
@@ -28407,7 +28529,7 @@ import {
|
|
|
28407
28529
|
useCallback as useCallback130,
|
|
28408
28530
|
useContext as useContext96,
|
|
28409
28531
|
useEffect as useEffect83,
|
|
28410
|
-
useMemo as
|
|
28532
|
+
useMemo as useMemo146,
|
|
28411
28533
|
useRef as useRef52,
|
|
28412
28534
|
useState as useState86
|
|
28413
28535
|
} from "react";
|
|
@@ -29306,7 +29428,7 @@ var QuickSwitcherNoResults = ({ query, mode }) => {
|
|
|
29306
29428
|
};
|
|
29307
29429
|
|
|
29308
29430
|
// src/components/QuickSwitcher/QuickSwitcherResult.tsx
|
|
29309
|
-
import { useEffect as useEffect82, useMemo as
|
|
29431
|
+
import { useEffect as useEffect82, useMemo as useMemo145, useRef as useRef51, useState as useState85 } from "react";
|
|
29310
29432
|
import { jsx as jsx253, jsxs as jsxs127, Fragment as Fragment39 } from "react/jsx-runtime";
|
|
29311
29433
|
var container50 = {
|
|
29312
29434
|
paddingLeft: 16,
|
|
@@ -29377,7 +29499,7 @@ var QuickSwitcherResult = ({ result, selected }) => {
|
|
|
29377
29499
|
});
|
|
29378
29500
|
}
|
|
29379
29501
|
}, [selected]);
|
|
29380
|
-
const style11 =
|
|
29502
|
+
const style11 = useMemo145(() => {
|
|
29381
29503
|
return {
|
|
29382
29504
|
...container50,
|
|
29383
29505
|
backgroundColor: getBackgroundFromHoverState({
|
|
@@ -29386,7 +29508,7 @@ var QuickSwitcherResult = ({ result, selected }) => {
|
|
|
29386
29508
|
})
|
|
29387
29509
|
};
|
|
29388
29510
|
}, [hovered, selected]);
|
|
29389
|
-
const labelStyle6 =
|
|
29511
|
+
const labelStyle6 = useMemo145(() => {
|
|
29390
29512
|
return {
|
|
29391
29513
|
...result.type === "search-result" ? searchLabel : label10,
|
|
29392
29514
|
color: result.type === "search-result" ? LIGHT_TEXT : selected || hovered ? "white" : LIGHT_TEXT,
|
|
@@ -29524,16 +29646,16 @@ var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }
|
|
|
29524
29646
|
const { setSelectedModal } = useContext96(ModalsContext);
|
|
29525
29647
|
const keybindings = useKeybinding();
|
|
29526
29648
|
const mode = mapQueryToMode(state.query);
|
|
29527
|
-
const actualQuery =
|
|
29649
|
+
const actualQuery = useMemo146(() => {
|
|
29528
29650
|
return stripQuery(state.query);
|
|
29529
29651
|
}, [state.query]);
|
|
29530
|
-
const menuActions =
|
|
29652
|
+
const menuActions = useMemo146(() => {
|
|
29531
29653
|
if (mode !== "commands") {
|
|
29532
29654
|
return [];
|
|
29533
29655
|
}
|
|
29534
29656
|
return makeSearchResults(actions, setSelectedModal);
|
|
29535
29657
|
}, [actions, mode, setSelectedModal]);
|
|
29536
|
-
const resultsArray =
|
|
29658
|
+
const resultsArray = useMemo146(() => {
|
|
29537
29659
|
if (mode === "commands") {
|
|
29538
29660
|
return fuzzySearch(actualQuery, menuActions);
|
|
29539
29661
|
}
|
|
@@ -29663,12 +29785,12 @@ var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }
|
|
|
29663
29785
|
}, []);
|
|
29664
29786
|
const showKeyboardShortcuts = mode === "docs" && actualQuery.trim() === "";
|
|
29665
29787
|
const showSearchLoadingState = mode === "docs" && docResults.type === "loading";
|
|
29666
|
-
const container51 =
|
|
29788
|
+
const container51 = useMemo146(() => {
|
|
29667
29789
|
return {
|
|
29668
29790
|
width: showKeyboardShortcuts ? 800 : 500
|
|
29669
29791
|
};
|
|
29670
29792
|
}, [showKeyboardShortcuts]);
|
|
29671
|
-
const results =
|
|
29793
|
+
const results = useMemo146(() => {
|
|
29672
29794
|
if (showKeyboardShortcuts) {
|
|
29673
29795
|
return {
|
|
29674
29796
|
maxHeight: 600,
|
|
@@ -29934,7 +30056,7 @@ var ClientRenderProgress = ({ job }) => {
|
|
|
29934
30056
|
};
|
|
29935
30057
|
|
|
29936
30058
|
// src/components/RenderModal/GuiRenderStatus.tsx
|
|
29937
|
-
import { useCallback as useCallback131, useMemo as
|
|
30059
|
+
import { useCallback as useCallback131, useMemo as useMemo147 } from "react";
|
|
29938
30060
|
import { jsx as jsx258, jsxs as jsxs130 } from "react/jsx-runtime";
|
|
29939
30061
|
var progressItem2 = {
|
|
29940
30062
|
padding: 10,
|
|
@@ -30076,7 +30198,7 @@ var DownloadsProgress = ({ downloads }) => {
|
|
|
30076
30198
|
});
|
|
30077
30199
|
};
|
|
30078
30200
|
var OpenFile = ({ job }) => {
|
|
30079
|
-
const labelStyle6 =
|
|
30201
|
+
const labelStyle6 = useMemo147(() => {
|
|
30080
30202
|
return {
|
|
30081
30203
|
...label12,
|
|
30082
30204
|
textAlign: "left",
|
|
@@ -30288,7 +30410,7 @@ import {
|
|
|
30288
30410
|
useCallback as useCallback150,
|
|
30289
30411
|
useContext as useContext99,
|
|
30290
30412
|
useEffect as useEffect86,
|
|
30291
|
-
useMemo as
|
|
30413
|
+
useMemo as useMemo158,
|
|
30292
30414
|
useReducer as useReducer2,
|
|
30293
30415
|
useRef as useRef54,
|
|
30294
30416
|
useState as useState92
|
|
@@ -30559,10 +30681,10 @@ var makeReadOnlyStudioRenderCommand = ({
|
|
|
30559
30681
|
};
|
|
30560
30682
|
|
|
30561
30683
|
// src/helpers/render-modal-sections.ts
|
|
30562
|
-
import { useMemo as
|
|
30684
|
+
import { useMemo as useMemo148, useState as useState87 } from "react";
|
|
30563
30685
|
var useRenderModalSections = (renderMode, codec) => {
|
|
30564
30686
|
const [selectedTab, setTab] = useState87("general");
|
|
30565
|
-
const shownTabs =
|
|
30687
|
+
const shownTabs = useMemo148(() => {
|
|
30566
30688
|
if (renderMode === "audio") {
|
|
30567
30689
|
return ["general", "data", "audio", "advanced"];
|
|
30568
30690
|
}
|
|
@@ -30580,13 +30702,13 @@ var useRenderModalSections = (renderMode, codec) => {
|
|
|
30580
30702
|
}
|
|
30581
30703
|
throw new TypeError("Unknown render mode");
|
|
30582
30704
|
}, [codec, renderMode]);
|
|
30583
|
-
const tab =
|
|
30705
|
+
const tab = useMemo148(() => {
|
|
30584
30706
|
if (!shownTabs.includes(selectedTab)) {
|
|
30585
30707
|
return shownTabs[0];
|
|
30586
30708
|
}
|
|
30587
30709
|
return selectedTab;
|
|
30588
30710
|
}, [selectedTab, shownTabs]);
|
|
30589
|
-
return
|
|
30711
|
+
return useMemo148(() => {
|
|
30590
30712
|
return { tab, setTab, shownTabs };
|
|
30591
30713
|
}, [tab, shownTabs]);
|
|
30592
30714
|
};
|
|
@@ -30654,7 +30776,7 @@ var GifIcon = (props) => /* @__PURE__ */ jsx264("svg", {
|
|
|
30654
30776
|
});
|
|
30655
30777
|
|
|
30656
30778
|
// src/components/Tabs/vertical.tsx
|
|
30657
|
-
import { useCallback as useCallback133, useMemo as
|
|
30779
|
+
import { useCallback as useCallback133, useMemo as useMemo149, useState as useState88 } from "react";
|
|
30658
30780
|
import { jsx as jsx265 } from "react/jsx-runtime";
|
|
30659
30781
|
var selectorButton2 = {
|
|
30660
30782
|
border: "none",
|
|
@@ -30678,7 +30800,7 @@ var VerticalTab = ({ children, onClick, style: style11, selected }) => {
|
|
|
30678
30800
|
const onPointerLeave = useCallback133(() => {
|
|
30679
30801
|
setHovered(false);
|
|
30680
30802
|
}, []);
|
|
30681
|
-
const definiteStyle =
|
|
30803
|
+
const definiteStyle = useMemo149(() => {
|
|
30682
30804
|
return {
|
|
30683
30805
|
...selectorButton2,
|
|
30684
30806
|
backgroundColor: selected ? SELECTED_BACKGROUND : hovered ? CLEAR_HOVER : "transparent",
|
|
@@ -30709,7 +30831,7 @@ import { useCallback as useCallback135 } from "react";
|
|
|
30709
30831
|
import { BrowserSafeApis as BrowserSafeApis2 } from "@remotion/renderer/client";
|
|
30710
30832
|
|
|
30711
30833
|
// src/components/RenderModal/CliCopyButton.tsx
|
|
30712
|
-
import { useCallback as useCallback134, useEffect as useEffect84, useMemo as
|
|
30834
|
+
import { useCallback as useCallback134, useEffect as useEffect84, useMemo as useMemo150, useState as useState89 } from "react";
|
|
30713
30835
|
import { jsx as jsx266 } from "react/jsx-runtime";
|
|
30714
30836
|
var svgStyle2 = {
|
|
30715
30837
|
width: 16,
|
|
@@ -30738,7 +30860,7 @@ var CliCopyButton = ({
|
|
|
30738
30860
|
}) => {
|
|
30739
30861
|
const [copied, setCopied] = useState89(false);
|
|
30740
30862
|
const [hovered, setHovered] = useState89(false);
|
|
30741
|
-
const fillColor =
|
|
30863
|
+
const fillColor = useMemo150(() => {
|
|
30742
30864
|
return hovered ? "white" : LIGHT_TEXT;
|
|
30743
30865
|
}, [hovered]);
|
|
30744
30866
|
const clipboardIcon = /* @__PURE__ */ jsx266(ClipboardIcon, {
|
|
@@ -31245,7 +31367,7 @@ var flexer = {
|
|
|
31245
31367
|
|
|
31246
31368
|
// src/components/RenderModal/RenderModalAdvanced.tsx
|
|
31247
31369
|
import { BrowserSafeApis as BrowserSafeApis6 } from "@remotion/renderer/client";
|
|
31248
|
-
import { useCallback as useCallback139, useMemo as
|
|
31370
|
+
import { useCallback as useCallback139, useMemo as useMemo151 } from "react";
|
|
31249
31371
|
|
|
31250
31372
|
// src/helpers/presets-labels.ts
|
|
31251
31373
|
var labelx264Preset = (profile) => {
|
|
@@ -31590,7 +31712,7 @@ var RenderModalAdvanced = ({
|
|
|
31590
31712
|
darkMode,
|
|
31591
31713
|
setDarkMode
|
|
31592
31714
|
}) => {
|
|
31593
|
-
const extendedOpenGlOptions =
|
|
31715
|
+
const extendedOpenGlOptions = useMemo151(() => {
|
|
31594
31716
|
return [
|
|
31595
31717
|
"angle",
|
|
31596
31718
|
"egl",
|
|
@@ -31660,7 +31782,7 @@ var RenderModalAdvanced = ({
|
|
|
31660
31782
|
const onReproToggle = useCallback139((e) => {
|
|
31661
31783
|
setRepro(e.target.checked);
|
|
31662
31784
|
}, [setRepro]);
|
|
31663
|
-
const openGlOptions =
|
|
31785
|
+
const openGlOptions = useMemo151(() => {
|
|
31664
31786
|
return extendedOpenGlOptions.map((option) => {
|
|
31665
31787
|
return {
|
|
31666
31788
|
label: option === "default" ? "Default" : option,
|
|
@@ -31676,7 +31798,7 @@ var RenderModalAdvanced = ({
|
|
|
31676
31798
|
};
|
|
31677
31799
|
});
|
|
31678
31800
|
}, [extendedOpenGlOptions, openGlOption, setOpenGlOption]);
|
|
31679
|
-
const chromeModeOptions =
|
|
31801
|
+
const chromeModeOptions = useMemo151(() => {
|
|
31680
31802
|
return BrowserSafeApis6.validChromeModeOptions.map((option) => {
|
|
31681
31803
|
return {
|
|
31682
31804
|
label: option,
|
|
@@ -31692,7 +31814,7 @@ var RenderModalAdvanced = ({
|
|
|
31692
31814
|
};
|
|
31693
31815
|
});
|
|
31694
31816
|
}, [chromeModeOption, setChromeModeOption]);
|
|
31695
|
-
const x264PresetOptions =
|
|
31817
|
+
const x264PresetOptions = useMemo151(() => {
|
|
31696
31818
|
return BrowserSafeApis6.x264PresetOptions.map((option) => {
|
|
31697
31819
|
return {
|
|
31698
31820
|
label: labelx264Preset(option),
|
|
@@ -31708,7 +31830,7 @@ var RenderModalAdvanced = ({
|
|
|
31708
31830
|
};
|
|
31709
31831
|
});
|
|
31710
31832
|
}, [setx264Preset, x264Preset]);
|
|
31711
|
-
const hardwareAccelerationValues =
|
|
31833
|
+
const hardwareAccelerationValues = useMemo151(() => {
|
|
31712
31834
|
return BrowserSafeApis6.hardwareAccelerationOptions.map((option) => {
|
|
31713
31835
|
return {
|
|
31714
31836
|
label: option,
|
|
@@ -32201,7 +32323,7 @@ var RenderModalAdvanced = ({
|
|
|
32201
32323
|
|
|
32202
32324
|
// src/components/RenderModal/RenderModalAudio.tsx
|
|
32203
32325
|
import { BrowserSafeApis as BrowserSafeApis8 } from "@remotion/renderer/client";
|
|
32204
|
-
import { useCallback as useCallback143, useMemo as
|
|
32326
|
+
import { useCallback as useCallback143, useMemo as useMemo153 } from "react";
|
|
32205
32327
|
|
|
32206
32328
|
// src/components/RenderModal/EnforceAudioTrackSetting.tsx
|
|
32207
32329
|
import { useCallback as useCallback140 } from "react";
|
|
@@ -32294,7 +32416,7 @@ var MutedSetting = ({ muted, setMuted, enforceAudioTrack }) => {
|
|
|
32294
32416
|
|
|
32295
32417
|
// src/components/RenderModal/SeparateAudioOption.tsx
|
|
32296
32418
|
import { BrowserSafeApis as BrowserSafeApis7 } from "@remotion/renderer/client";
|
|
32297
|
-
import { useCallback as useCallback142, useMemo as
|
|
32419
|
+
import { useCallback as useCallback142, useMemo as useMemo152 } from "react";
|
|
32298
32420
|
|
|
32299
32421
|
// src/helpers/use-file-existence.ts
|
|
32300
32422
|
import { useContext as useContext98, useEffect as useEffect85, useRef as useRef53, useState as useState91 } from "react";
|
|
@@ -32427,7 +32549,7 @@ var SeparateAudioOptionInput = ({ separateAudioTo, setSeparateAudioTo, audioCode
|
|
|
32427
32549
|
const onValueChange = useCallback142((e) => {
|
|
32428
32550
|
setSeparateAudioTo(e.target.value);
|
|
32429
32551
|
}, [setSeparateAudioTo]);
|
|
32430
|
-
const validationMessage =
|
|
32552
|
+
const validationMessage = useMemo152(() => {
|
|
32431
32553
|
const expectedExtension = BrowserSafeApis7.getExtensionFromAudioCodec(audioCodec);
|
|
32432
32554
|
const actualExtension = separateAudioTo.split(".").pop();
|
|
32433
32555
|
if (actualExtension !== expectedExtension) {
|
|
@@ -32527,7 +32649,7 @@ var RenderModalAudio = ({
|
|
|
32527
32649
|
const onSeamlessAacConcatenationChanges = useCallback143((e) => {
|
|
32528
32650
|
setForSeamlessAacConcatenation(e.target.checked);
|
|
32529
32651
|
}, [setForSeamlessAacConcatenation]);
|
|
32530
|
-
const sampleRateOptions =
|
|
32652
|
+
const sampleRateOptions = useMemo153(() => {
|
|
32531
32653
|
return commonSampleRates.map((rate) => ({
|
|
32532
32654
|
label: rate === 48000 ? `${rate} Hz (default)` : `${rate} Hz`,
|
|
32533
32655
|
onClick: () => setSampleRate(rate),
|
|
@@ -32714,7 +32836,7 @@ var RenderModalAudio = ({
|
|
|
32714
32836
|
// src/components/RenderModal/RenderModalBasic.tsx
|
|
32715
32837
|
import { BrowserSafeApis as BrowserSafeApis9 } from "@remotion/renderer/client";
|
|
32716
32838
|
import { NoReactAPIs as NoReactAPIs2 } from "@remotion/renderer/pure";
|
|
32717
|
-
import { useCallback as useCallback146, useMemo as
|
|
32839
|
+
import { useCallback as useCallback146, useMemo as useMemo155 } from "react";
|
|
32718
32840
|
|
|
32719
32841
|
// src/helpers/prores-labels.ts
|
|
32720
32842
|
var labelProResProfile = (profile) => {
|
|
@@ -32743,7 +32865,7 @@ var labelProResProfile = (profile) => {
|
|
|
32743
32865
|
import { useCallback as useCallback145 } from "react";
|
|
32744
32866
|
|
|
32745
32867
|
// src/components/RenderModal/MultiRangeSlider.tsx
|
|
32746
|
-
import { useCallback as useCallback144, useMemo as
|
|
32868
|
+
import { useCallback as useCallback144, useMemo as useMemo154 } from "react";
|
|
32747
32869
|
import { jsx as jsx281, jsxs as jsxs142 } from "react/jsx-runtime";
|
|
32748
32870
|
var container57 = {
|
|
32749
32871
|
borderColor: "black",
|
|
@@ -32773,7 +32895,7 @@ var MultiRangeSlider = ({
|
|
|
32773
32895
|
onRightThumbDrag
|
|
32774
32896
|
}) => {
|
|
32775
32897
|
const getPercent = useCallback144((value) => Math.round((value - min) / (max - min) * 100), [min, max]);
|
|
32776
|
-
const rangeStyle =
|
|
32898
|
+
const rangeStyle = useMemo154(() => {
|
|
32777
32899
|
const minPercent = getPercent(start);
|
|
32778
32900
|
const maxPercent = getPercent(end);
|
|
32779
32901
|
return {
|
|
@@ -32980,7 +33102,7 @@ var RenderModalBasic = ({
|
|
|
32980
33102
|
showOutputName
|
|
32981
33103
|
}) => {
|
|
32982
33104
|
const existence = useFileExistence(outName);
|
|
32983
|
-
const videoCodecOptions =
|
|
33105
|
+
const videoCodecOptions = useMemo155(() => {
|
|
32984
33106
|
return BrowserSafeApis9.validCodecs.filter((c) => {
|
|
32985
33107
|
return NoReactAPIs2.isAudioCodec(c) === (renderMode === "audio");
|
|
32986
33108
|
}).map((codecOption) => {
|
|
@@ -32998,7 +33120,7 @@ var RenderModalBasic = ({
|
|
|
32998
33120
|
};
|
|
32999
33121
|
});
|
|
33000
33122
|
}, [renderMode, setCodec, codec]);
|
|
33001
|
-
const proResProfileOptions =
|
|
33123
|
+
const proResProfileOptions = useMemo155(() => {
|
|
33002
33124
|
return BrowserSafeApis9.proResProfileOptions.map((option) => {
|
|
33003
33125
|
return {
|
|
33004
33126
|
label: labelProResProfile(option),
|
|
@@ -33030,7 +33152,7 @@ var RenderModalBasic = ({
|
|
|
33030
33152
|
const onValueChange = useCallback146((e) => {
|
|
33031
33153
|
setOutName(e.target.value);
|
|
33032
33154
|
}, [setOutName]);
|
|
33033
|
-
const logLevelOptions =
|
|
33155
|
+
const logLevelOptions = useMemo155(() => {
|
|
33034
33156
|
return ["trace", "verbose", "info", "warn", "error"].map((level) => {
|
|
33035
33157
|
return {
|
|
33036
33158
|
label: humanReadableLogLevel(level),
|
|
@@ -33284,7 +33406,7 @@ var RenderModalGif = ({
|
|
|
33284
33406
|
|
|
33285
33407
|
// src/components/RenderModal/RenderModalPicture.tsx
|
|
33286
33408
|
import { BrowserSafeApis as BrowserSafeApis10 } from "@remotion/renderer/client";
|
|
33287
|
-
import { useCallback as useCallback149, useMemo as
|
|
33409
|
+
import { useCallback as useCallback149, useMemo as useMemo157 } from "react";
|
|
33288
33410
|
|
|
33289
33411
|
// src/components/RenderModal/JpegQualitySetting.tsx
|
|
33290
33412
|
import { jsx as jsx286 } from "react/jsx-runtime";
|
|
@@ -33303,7 +33425,7 @@ var JpegQualitySetting = ({ jpegQuality, setJpegQuality }) => {
|
|
|
33303
33425
|
};
|
|
33304
33426
|
|
|
33305
33427
|
// src/components/RenderModal/ScaleSetting.tsx
|
|
33306
|
-
import { useMemo as
|
|
33428
|
+
import { useMemo as useMemo156 } from "react";
|
|
33307
33429
|
import { jsx as jsx287, jsxs as jsxs147, Fragment as Fragment48 } from "react/jsx-runtime";
|
|
33308
33430
|
var MIN_SCALE = 0.1;
|
|
33309
33431
|
var MAX_SCALE = 10;
|
|
@@ -33317,7 +33439,7 @@ var outputDimensionsStyle = {
|
|
|
33317
33439
|
marginTop: -10
|
|
33318
33440
|
};
|
|
33319
33441
|
var ScaleSetting = ({ scale, setScale, compositionWidth, compositionHeight }) => {
|
|
33320
|
-
const outputDimensions =
|
|
33442
|
+
const outputDimensions = useMemo156(() => {
|
|
33321
33443
|
const outputWidth = Math.round(compositionWidth * scale);
|
|
33322
33444
|
const outputHeight = Math.round(compositionHeight * scale);
|
|
33323
33445
|
return `${outputWidth}×${outputHeight}`;
|
|
@@ -33386,7 +33508,7 @@ var RenderModalPicture = ({
|
|
|
33386
33508
|
compositionWidth,
|
|
33387
33509
|
compositionHeight
|
|
33388
33510
|
}) => {
|
|
33389
|
-
const colorSpaceOptions =
|
|
33511
|
+
const colorSpaceOptions = useMemo157(() => {
|
|
33390
33512
|
return BrowserSafeApis10.validColorSpaces.map((option) => {
|
|
33391
33513
|
return {
|
|
33392
33514
|
label: option,
|
|
@@ -33402,7 +33524,7 @@ var RenderModalPicture = ({
|
|
|
33402
33524
|
};
|
|
33403
33525
|
});
|
|
33404
33526
|
}, [colorSpace, setColorSpace]);
|
|
33405
|
-
const qualityControlOptions =
|
|
33527
|
+
const qualityControlOptions = useMemo157(() => {
|
|
33406
33528
|
return qualityControlModes.map((option) => {
|
|
33407
33529
|
return {
|
|
33408
33530
|
label: option === "crf" ? "CRF" : "Bitrate",
|
|
@@ -33797,7 +33919,7 @@ var RenderModal = ({
|
|
|
33797
33919
|
const [openGlOption, setOpenGlOption] = useState92(() => initialGl ?? "default");
|
|
33798
33920
|
const [colorSpace, setColorSpace] = useState92(() => initialColorSpace);
|
|
33799
33921
|
const [userAgent, setUserAgent] = useState92(() => initialUserAgent === null ? null : initialUserAgent.trim() === "" ? null : initialUserAgent);
|
|
33800
|
-
const chromiumOptions =
|
|
33922
|
+
const chromiumOptions = useMemo158(() => {
|
|
33801
33923
|
return {
|
|
33802
33924
|
headless,
|
|
33803
33925
|
disableWebSecurity,
|
|
@@ -33839,19 +33961,19 @@ var RenderModal = ({
|
|
|
33839
33961
|
const [offthreadVideoCacheSizeInBytes, setOffthreadVideoCacheSizeInBytes] = useState92(initialOffthreadVideoCacheSizeInBytes);
|
|
33840
33962
|
const [mediaCacheSizeInBytes, setMediaCacheSizeInBytes] = useState92(initialMediaCacheSizeInBytes);
|
|
33841
33963
|
const [offthreadVideoThreads, setOffthreadVideoThreads] = useState92(() => initialOffthreadVideoThreads);
|
|
33842
|
-
const codec =
|
|
33964
|
+
const codec = useMemo158(() => {
|
|
33843
33965
|
if (renderMode === "audio") {
|
|
33844
33966
|
return videoCodecForAudioTab;
|
|
33845
33967
|
}
|
|
33846
33968
|
return videoCodecForVideoTab;
|
|
33847
33969
|
}, [videoCodecForAudioTab, renderMode, videoCodecForVideoTab]);
|
|
33848
|
-
const numberOfGifLoops =
|
|
33970
|
+
const numberOfGifLoops = useMemo158(() => {
|
|
33849
33971
|
if (codec === "gif" && limitNumberOfGifLoops) {
|
|
33850
33972
|
return numberOfGifLoopsSetting;
|
|
33851
33973
|
}
|
|
33852
33974
|
return null;
|
|
33853
33975
|
}, [codec, limitNumberOfGifLoops, numberOfGifLoopsSetting]);
|
|
33854
|
-
const audioBitrate =
|
|
33976
|
+
const audioBitrate = useMemo158(() => {
|
|
33855
33977
|
if (shouldHaveCustomTargetAudioBitrate) {
|
|
33856
33978
|
return customTargetAudioBitrate;
|
|
33857
33979
|
}
|
|
@@ -33859,10 +33981,10 @@ var RenderModal = ({
|
|
|
33859
33981
|
}, [customTargetAudioBitrate, shouldHaveCustomTargetAudioBitrate]);
|
|
33860
33982
|
const supportsCrf = BrowserSafeApis11.codecSupportsCrf(codec);
|
|
33861
33983
|
const supportsVideoBitrate = BrowserSafeApis11.codecSupportsVideoBitrate(codec);
|
|
33862
|
-
const supportsBothQualityControls =
|
|
33984
|
+
const supportsBothQualityControls = useMemo158(() => {
|
|
33863
33985
|
return supportsCrf && supportsVideoBitrate && hardwareAcceleration !== "if-possible" && hardwareAcceleration !== "required";
|
|
33864
33986
|
}, [hardwareAcceleration, supportsCrf, supportsVideoBitrate]);
|
|
33865
|
-
const qualityControlType =
|
|
33987
|
+
const qualityControlType = useMemo158(() => {
|
|
33866
33988
|
if (hardwareAcceleration === "if-possible" || hardwareAcceleration === "required") {
|
|
33867
33989
|
if (supportsVideoBitrate) {
|
|
33868
33990
|
return "bitrate";
|
|
@@ -33886,7 +34008,7 @@ var RenderModal = ({
|
|
|
33886
34008
|
supportsCrf,
|
|
33887
34009
|
supportsVideoBitrate
|
|
33888
34010
|
]);
|
|
33889
|
-
const videoBitrate =
|
|
34011
|
+
const videoBitrate = useMemo158(() => {
|
|
33890
34012
|
if (qualityControlType === "bitrate") {
|
|
33891
34013
|
return customTargetVideoBitrate;
|
|
33892
34014
|
}
|
|
@@ -33898,13 +34020,13 @@ var RenderModal = ({
|
|
|
33898
34020
|
return;
|
|
33899
34021
|
dispatch2(payload);
|
|
33900
34022
|
}, []);
|
|
33901
|
-
const muted =
|
|
34023
|
+
const muted = useMemo158(() => {
|
|
33902
34024
|
if (renderMode === "video") {
|
|
33903
34025
|
return mutedState;
|
|
33904
34026
|
}
|
|
33905
34027
|
return false;
|
|
33906
34028
|
}, [mutedState, renderMode]);
|
|
33907
|
-
const enforceAudioTrack =
|
|
34029
|
+
const enforceAudioTrack = useMemo158(() => {
|
|
33908
34030
|
if (renderMode === "video") {
|
|
33909
34031
|
return enforceAudioTrackState;
|
|
33910
34032
|
}
|
|
@@ -33913,13 +34035,13 @@ var RenderModal = ({
|
|
|
33913
34035
|
}
|
|
33914
34036
|
return false;
|
|
33915
34037
|
}, [enforceAudioTrackState, renderMode]);
|
|
33916
|
-
const proResProfile =
|
|
34038
|
+
const proResProfile = useMemo158(() => {
|
|
33917
34039
|
if (renderMode === "video" && codec === "prores") {
|
|
33918
34040
|
return proResProfileSetting;
|
|
33919
34041
|
}
|
|
33920
34042
|
return null;
|
|
33921
34043
|
}, [codec, proResProfileSetting, renderMode]);
|
|
33922
|
-
const x264Preset =
|
|
34044
|
+
const x264Preset = useMemo158(() => {
|
|
33923
34045
|
if (renderMode === "video" && codec === "h264") {
|
|
33924
34046
|
return x264PresetSetting;
|
|
33925
34047
|
}
|
|
@@ -33930,19 +34052,19 @@ var RenderModal = ({
|
|
|
33930
34052
|
_setInputProps(updater);
|
|
33931
34053
|
}, []);
|
|
33932
34054
|
const [metadata] = useState92(() => defaultMetadata);
|
|
33933
|
-
const endFrame =
|
|
34055
|
+
const endFrame = useMemo158(() => {
|
|
33934
34056
|
if (endFrameOrNull === null) {
|
|
33935
34057
|
return resolvedComposition.durationInFrames - 1;
|
|
33936
34058
|
}
|
|
33937
34059
|
return Math.max(0, Math.min(resolvedComposition.durationInFrames - 1, endFrameOrNull));
|
|
33938
34060
|
}, [resolvedComposition.durationInFrames, endFrameOrNull]);
|
|
33939
|
-
const startFrame =
|
|
34061
|
+
const startFrame = useMemo158(() => {
|
|
33940
34062
|
if (startFrameOrNull === null) {
|
|
33941
34063
|
return 0;
|
|
33942
34064
|
}
|
|
33943
34065
|
return Math.max(0, Math.min(endFrame - 1, startFrameOrNull));
|
|
33944
34066
|
}, [endFrame, startFrameOrNull]);
|
|
33945
|
-
const frame2 =
|
|
34067
|
+
const frame2 = useMemo158(() => {
|
|
33946
34068
|
const parsed = Math.floor(unclampedFrame);
|
|
33947
34069
|
return Math.max(0, Math.min(resolvedComposition.durationInFrames - 1, parsed));
|
|
33948
34070
|
}, [resolvedComposition.durationInFrames, unclampedFrame]);
|
|
@@ -34063,17 +34185,17 @@ var RenderModal = ({
|
|
|
34063
34185
|
mediaCacheSizeInBytes
|
|
34064
34186
|
]);
|
|
34065
34187
|
const [everyNthFrameSetting, setEveryNthFrameSetting] = useState92(() => initialEveryNthFrame);
|
|
34066
|
-
const everyNthFrame =
|
|
34188
|
+
const everyNthFrame = useMemo158(() => {
|
|
34067
34189
|
if (codec === "gif") {
|
|
34068
34190
|
return everyNthFrameSetting;
|
|
34069
34191
|
}
|
|
34070
34192
|
return 1;
|
|
34071
34193
|
}, [codec, everyNthFrameSetting]);
|
|
34072
34194
|
const audioCodec = deriveFinalAudioCodec(codec, userSelectedAudioCodec);
|
|
34073
|
-
const availablePixelFormats =
|
|
34195
|
+
const availablePixelFormats = useMemo158(() => {
|
|
34074
34196
|
return BrowserSafeApis11.validPixelFormatsForCodec(codec);
|
|
34075
34197
|
}, [codec]);
|
|
34076
|
-
const pixelFormat =
|
|
34198
|
+
const pixelFormat = useMemo158(() => {
|
|
34077
34199
|
if (availablePixelFormats.includes(userPreferredPixelFormat)) {
|
|
34078
34200
|
return userPreferredPixelFormat;
|
|
34079
34201
|
}
|
|
@@ -34246,7 +34368,7 @@ var RenderModal = ({
|
|
|
34246
34368
|
isMounted.current = false;
|
|
34247
34369
|
};
|
|
34248
34370
|
}, []);
|
|
34249
|
-
const imageFormatOptions =
|
|
34371
|
+
const imageFormatOptions = useMemo158(() => {
|
|
34250
34372
|
if (renderMode === "still") {
|
|
34251
34373
|
return [
|
|
34252
34374
|
{
|
|
@@ -34342,7 +34464,7 @@ var RenderModal = ({
|
|
|
34342
34464
|
stillImageFormat,
|
|
34343
34465
|
videoCodecForVideoTab
|
|
34344
34466
|
]);
|
|
34345
|
-
const renderTabOptions =
|
|
34467
|
+
const renderTabOptions = useMemo158(() => {
|
|
34346
34468
|
if (resolvedComposition?.durationInFrames < 2) {
|
|
34347
34469
|
return [
|
|
34348
34470
|
{
|
|
@@ -34400,7 +34522,7 @@ var RenderModal = ({
|
|
|
34400
34522
|
});
|
|
34401
34523
|
const { tab, setTab, shownTabs } = useRenderModalSections(renderMode, codec);
|
|
34402
34524
|
const { registerKeybinding } = useKeybinding();
|
|
34403
|
-
const readOnlyRenderCommand =
|
|
34525
|
+
const readOnlyRenderCommand = useMemo158(() => {
|
|
34404
34526
|
if (!readOnlyStudio) {
|
|
34405
34527
|
return null;
|
|
34406
34528
|
}
|
|
@@ -34573,7 +34695,7 @@ var RenderModal = ({
|
|
|
34573
34695
|
enter.unregister();
|
|
34574
34696
|
};
|
|
34575
34697
|
}, [registerKeybinding, renderDisabled, trigger]);
|
|
34576
|
-
const pixelFormatOptions =
|
|
34698
|
+
const pixelFormatOptions = useMemo158(() => {
|
|
34577
34699
|
return availablePixelFormats.map((option) => {
|
|
34578
34700
|
return {
|
|
34579
34701
|
label: option,
|
|
@@ -34872,7 +34994,7 @@ import {
|
|
|
34872
34994
|
getDefaultVideoCodecForContainer,
|
|
34873
34995
|
isAudioOnlyContainer
|
|
34874
34996
|
} from "@remotion/web-renderer";
|
|
34875
|
-
import { useCallback as useCallback154, useContext as useContext100, useMemo as
|
|
34997
|
+
import { useCallback as useCallback154, useContext as useContext100, useMemo as useMemo163, useState as useState96 } from "react";
|
|
34876
34998
|
|
|
34877
34999
|
// src/icons/certificate.tsx
|
|
34878
35000
|
import { jsx as jsx290 } from "react/jsx-runtime";
|
|
@@ -35034,7 +35156,7 @@ var WebRendererExperimentalBadge = () => {
|
|
|
35034
35156
|
};
|
|
35035
35157
|
|
|
35036
35158
|
// src/components/RenderModal/WebRenderModalAdvanced.tsx
|
|
35037
|
-
import { useCallback as useCallback151, useMemo as
|
|
35159
|
+
import { useCallback as useCallback151, useMemo as useMemo159 } from "react";
|
|
35038
35160
|
import { jsx as jsx292, jsxs as jsxs151 } from "react/jsx-runtime";
|
|
35039
35161
|
var tabContainer = {
|
|
35040
35162
|
flex: 1
|
|
@@ -35072,7 +35194,7 @@ var WebRenderModalAdvanced = ({
|
|
|
35072
35194
|
return cb;
|
|
35073
35195
|
});
|
|
35074
35196
|
}, [setMediaCacheSizeInBytes]);
|
|
35075
|
-
const hardwareAccelerationOptions =
|
|
35197
|
+
const hardwareAccelerationOptions = useMemo159(() => {
|
|
35076
35198
|
return [
|
|
35077
35199
|
{
|
|
35078
35200
|
label: "No Preference",
|
|
@@ -35204,7 +35326,7 @@ var WebRenderModalAdvanced = ({
|
|
|
35204
35326
|
|
|
35205
35327
|
// src/components/RenderModal/WebRenderModalAudio.tsx
|
|
35206
35328
|
import { getSupportedAudioCodecsForContainer as getSupportedAudioCodecsForContainer2 } from "@remotion/web-renderer";
|
|
35207
|
-
import { useMemo as
|
|
35329
|
+
import { useMemo as useMemo160 } from "react";
|
|
35208
35330
|
|
|
35209
35331
|
// src/components/RenderModal/quality-options.tsx
|
|
35210
35332
|
import { jsx as jsx293 } from "react/jsx-runtime";
|
|
@@ -35277,8 +35399,8 @@ var WebRenderModalAudio = ({
|
|
|
35277
35399
|
encodableCodecs,
|
|
35278
35400
|
effectiveAudioCodec
|
|
35279
35401
|
}) => {
|
|
35280
|
-
const containerSupported =
|
|
35281
|
-
const audioCodecOptions =
|
|
35402
|
+
const containerSupported = useMemo160(() => getSupportedAudioCodecsForContainer2(videoContainer), [videoContainer]);
|
|
35403
|
+
const audioCodecOptions = useMemo160(() => {
|
|
35282
35404
|
return containerSupported.map((codec) => {
|
|
35283
35405
|
const isEncodable = encodableCodecs.includes(codec);
|
|
35284
35406
|
return {
|
|
@@ -35295,7 +35417,7 @@ var WebRenderModalAudio = ({
|
|
|
35295
35417
|
};
|
|
35296
35418
|
});
|
|
35297
35419
|
}, [containerSupported, encodableCodecs, audioCodec, setAudioCodec]);
|
|
35298
|
-
const audioBitrateOptions =
|
|
35420
|
+
const audioBitrateOptions = useMemo160(() => getQualityOptions(audioBitrate, setAudioBitrate), [audioBitrate, setAudioBitrate]);
|
|
35299
35421
|
const isAudioOnly = renderMode === "audio";
|
|
35300
35422
|
const showAudioSettings = isAudioOnly || !muted;
|
|
35301
35423
|
const showAudioCodecSetting = !isAudioOnly || containerSupported.length > 1;
|
|
@@ -35372,7 +35494,7 @@ var WebRenderModalAudio = ({
|
|
|
35372
35494
|
};
|
|
35373
35495
|
|
|
35374
35496
|
// src/components/RenderModal/WebRenderModalBasic.tsx
|
|
35375
|
-
import { useMemo as
|
|
35497
|
+
import { useMemo as useMemo161 } from "react";
|
|
35376
35498
|
import { jsx as jsx295, jsxs as jsxs153, Fragment as Fragment51 } from "react/jsx-runtime";
|
|
35377
35499
|
var tabContainer2 = {
|
|
35378
35500
|
flex: 1
|
|
@@ -35426,7 +35548,7 @@ var WebRenderModalBasic = ({
|
|
|
35426
35548
|
logLevel,
|
|
35427
35549
|
setLogLevel
|
|
35428
35550
|
}) => {
|
|
35429
|
-
const imageFormatOptions =
|
|
35551
|
+
const imageFormatOptions = useMemo161(() => {
|
|
35430
35552
|
return [
|
|
35431
35553
|
{
|
|
35432
35554
|
label: "PNG",
|
|
@@ -35448,7 +35570,7 @@ var WebRenderModalBasic = ({
|
|
|
35448
35570
|
}
|
|
35449
35571
|
];
|
|
35450
35572
|
}, [imageFormat, setStillFormat]);
|
|
35451
|
-
const logLevelOptions =
|
|
35573
|
+
const logLevelOptions = useMemo161(() => {
|
|
35452
35574
|
return ["trace", "verbose", "info", "warn", "error"].map((level) => {
|
|
35453
35575
|
return {
|
|
35454
35576
|
label: humanReadableLogLevel(level),
|
|
@@ -35463,7 +35585,7 @@ var WebRenderModalBasic = ({
|
|
|
35463
35585
|
};
|
|
35464
35586
|
});
|
|
35465
35587
|
}, [logLevel, setLogLevel]);
|
|
35466
|
-
const containerOptions =
|
|
35588
|
+
const containerOptions = useMemo161(() => {
|
|
35467
35589
|
const containers = renderMode === "audio" ? audioContainers : videoContainers;
|
|
35468
35590
|
return containers.map((c) => ({
|
|
35469
35591
|
label: containerLabels[c],
|
|
@@ -35477,7 +35599,7 @@ var WebRenderModalBasic = ({
|
|
|
35477
35599
|
value: c
|
|
35478
35600
|
}));
|
|
35479
35601
|
}, [container62, setContainerFormat, renderMode]);
|
|
35480
|
-
const codecOptions =
|
|
35602
|
+
const codecOptions = useMemo161(() => {
|
|
35481
35603
|
return encodableVideoCodecs.map((c) => ({
|
|
35482
35604
|
label: codecLabels[c],
|
|
35483
35605
|
onClick: () => setCodec(c),
|
|
@@ -36067,7 +36189,7 @@ var WebRenderModalLicense = ({
|
|
|
36067
36189
|
};
|
|
36068
36190
|
|
|
36069
36191
|
// src/components/RenderModal/WebRenderModalPicture.tsx
|
|
36070
|
-
import { useCallback as useCallback153, useMemo as
|
|
36192
|
+
import { useCallback as useCallback153, useMemo as useMemo162 } from "react";
|
|
36071
36193
|
import { jsx as jsx299, jsxs as jsxs156, Fragment as Fragment53 } from "react/jsx-runtime";
|
|
36072
36194
|
var tabContainer4 = {
|
|
36073
36195
|
flex: 1
|
|
@@ -36085,7 +36207,7 @@ var WebRenderModalPicture = ({
|
|
|
36085
36207
|
compositionWidth,
|
|
36086
36208
|
compositionHeight
|
|
36087
36209
|
}) => {
|
|
36088
|
-
const qualityOptions =
|
|
36210
|
+
const qualityOptions = useMemo162(() => getQualityOptions(videoBitrate, setVideoBitrate), [videoBitrate, setVideoBitrate]);
|
|
36089
36211
|
const onTransparentChanged = useCallback153((e) => {
|
|
36090
36212
|
setTransparent(e.target.checked);
|
|
36091
36213
|
}, [setTransparent]);
|
|
@@ -36258,25 +36380,25 @@ var WebRenderModal = ({
|
|
|
36258
36380
|
const [allowHtmlInCanvas, setAllowHtmlInCanvas] = useState96(initialAllowHtmlInCanvas ?? false);
|
|
36259
36381
|
const encodableAudioCodecs = useEncodableAudioCodecs(container62);
|
|
36260
36382
|
const encodableVideoCodecs = useEncodableVideoCodecs(container62);
|
|
36261
|
-
const effectiveAudioCodec =
|
|
36383
|
+
const effectiveAudioCodec = useMemo163(() => {
|
|
36262
36384
|
if (encodableAudioCodecs.includes(audioCodec)) {
|
|
36263
36385
|
return audioCodec;
|
|
36264
36386
|
}
|
|
36265
36387
|
return encodableAudioCodecs[0] ?? audioCodec;
|
|
36266
36388
|
}, [audioCodec, encodableAudioCodecs]);
|
|
36267
|
-
const effectiveVideoCodec =
|
|
36389
|
+
const effectiveVideoCodec = useMemo163(() => {
|
|
36268
36390
|
if (encodableVideoCodecs.includes(codec)) {
|
|
36269
36391
|
return codec;
|
|
36270
36392
|
}
|
|
36271
36393
|
return encodableVideoCodecs[0] ?? codec;
|
|
36272
36394
|
}, [codec, encodableVideoCodecs]);
|
|
36273
|
-
const finalEndFrame =
|
|
36395
|
+
const finalEndFrame = useMemo163(() => {
|
|
36274
36396
|
if (endFrame === null) {
|
|
36275
36397
|
return resolvedComposition.durationInFrames - 1;
|
|
36276
36398
|
}
|
|
36277
36399
|
return Math.max(0, Math.min(resolvedComposition.durationInFrames - 1, endFrame));
|
|
36278
36400
|
}, [endFrame, resolvedComposition.durationInFrames]);
|
|
36279
|
-
const finalStartFrame =
|
|
36401
|
+
const finalStartFrame = useMemo163(() => {
|
|
36280
36402
|
if (startFrame === null) {
|
|
36281
36403
|
return 0;
|
|
36282
36404
|
}
|
|
@@ -36341,7 +36463,7 @@ var WebRenderModal = ({
|
|
|
36341
36463
|
setTab((prev) => prev === "audio" ? "general" : prev);
|
|
36342
36464
|
}
|
|
36343
36465
|
}, [container62, imageFormat, updateOutNameExtension]);
|
|
36344
|
-
const renderTabOptions =
|
|
36466
|
+
const renderTabOptions = useMemo163(() => {
|
|
36345
36467
|
const options = [
|
|
36346
36468
|
{
|
|
36347
36469
|
label: "Still",
|
|
@@ -36387,7 +36509,7 @@ var WebRenderModal = ({
|
|
|
36387
36509
|
const onOutNameChange = useCallback154((e) => {
|
|
36388
36510
|
setOutName(e.target.value);
|
|
36389
36511
|
}, []);
|
|
36390
|
-
const outnameValidation =
|
|
36512
|
+
const outnameValidation = useMemo163(() => {
|
|
36391
36513
|
if (renderMode === "still") {
|
|
36392
36514
|
return validateOutnameForStill({
|
|
36393
36515
|
outName,
|
|
@@ -36735,7 +36857,7 @@ var WebRenderModalWithLoader = (props) => {
|
|
|
36735
36857
|
};
|
|
36736
36858
|
|
|
36737
36859
|
// src/components/UpdateModal/UpdateModal.tsx
|
|
36738
|
-
import { useCallback as useCallback157, useMemo as
|
|
36860
|
+
import { useCallback as useCallback157, useMemo as useMemo165 } from "react";
|
|
36739
36861
|
|
|
36740
36862
|
// src/components/CopyButton.tsx
|
|
36741
36863
|
import { useCallback as useCallback155, useEffect as useEffect90, useState as useState97 } from "react";
|
|
@@ -36801,7 +36923,7 @@ var CopyButton = ({ textToCopy, label: label13, labelWhenCopied }) => {
|
|
|
36801
36923
|
};
|
|
36802
36924
|
|
|
36803
36925
|
// src/components/UpdateModal/OpenIssueButton.tsx
|
|
36804
|
-
import { useCallback as useCallback156, useMemo as
|
|
36926
|
+
import { useCallback as useCallback156, useMemo as useMemo164, useState as useState98 } from "react";
|
|
36805
36927
|
import { jsx as jsx302 } from "react/jsx-runtime";
|
|
36806
36928
|
var svgStyle3 = {
|
|
36807
36929
|
width: "11px",
|
|
@@ -36821,7 +36943,7 @@ var OpenIssueButton = ({ link: link5 }) => {
|
|
|
36821
36943
|
const handleClick = useCallback156(() => {
|
|
36822
36944
|
window.open(link5, "_blank");
|
|
36823
36945
|
}, [link5]);
|
|
36824
|
-
const svgFillColor =
|
|
36946
|
+
const svgFillColor = useMemo164(() => {
|
|
36825
36947
|
return hovered ? "white" : LIGHT_TEXT;
|
|
36826
36948
|
}, [hovered]);
|
|
36827
36949
|
const openInEditorSvg = /* @__PURE__ */ jsx302("svg", {
|
|
@@ -36918,7 +37040,7 @@ var commands = {
|
|
|
36918
37040
|
unknown: "npx remotion upgrade"
|
|
36919
37041
|
};
|
|
36920
37042
|
var UpdateModal = ({ info, knownBugs }) => {
|
|
36921
|
-
const hasKnownBugs =
|
|
37043
|
+
const hasKnownBugs = useMemo165(() => {
|
|
36922
37044
|
return knownBugs && knownBugs?.length > 0;
|
|
36923
37045
|
}, [knownBugs]);
|
|
36924
37046
|
const command = commands[info.packageManager];
|
|
@@ -37107,7 +37229,7 @@ var Modals = ({ readOnlyStudio }) => {
|
|
|
37107
37229
|
};
|
|
37108
37230
|
|
|
37109
37231
|
// src/components/SequencePropsSubscriptionProvider.tsx
|
|
37110
|
-
import { useState as useState99, useCallback as useCallback158, useMemo as
|
|
37232
|
+
import { useState as useState99, useCallback as useCallback158, useMemo as useMemo166 } from "react";
|
|
37111
37233
|
import { Internals as Internals73 } from "remotion";
|
|
37112
37234
|
import { jsx as jsx306 } from "react/jsx-runtime";
|
|
37113
37235
|
var SequencePropsSubscriptionProvider = ({ children }) => {
|
|
@@ -37121,10 +37243,10 @@ var SequencePropsSubscriptionProvider = ({ children }) => {
|
|
|
37121
37243
|
return { ...prev, [overrideId]: state };
|
|
37122
37244
|
});
|
|
37123
37245
|
}, []);
|
|
37124
|
-
const getters =
|
|
37246
|
+
const getters = useMemo166(() => {
|
|
37125
37247
|
return { overrideIdToNodePathMappings: overrideToNodePathMap };
|
|
37126
37248
|
}, [overrideToNodePathMap]);
|
|
37127
|
-
const setters =
|
|
37249
|
+
const setters = useMemo166(() => {
|
|
37128
37250
|
return { setOverrideIdToNodePath };
|
|
37129
37251
|
}, [setOverrideIdToNodePath]);
|
|
37130
37252
|
return /* @__PURE__ */ jsx306(Internals73.OverrideIdsToNodePathsGettersContext.Provider, {
|
|
@@ -37157,7 +37279,7 @@ var Editor = ({ Root, readOnlyStudio }) => {
|
|
|
37157
37279
|
const onMounted = useCallback159(() => {
|
|
37158
37280
|
setCanvasMounted(true);
|
|
37159
37281
|
}, []);
|
|
37160
|
-
const value =
|
|
37282
|
+
const value = useMemo167(() => {
|
|
37161
37283
|
if (!size3) {
|
|
37162
37284
|
return null;
|
|
37163
37285
|
}
|
|
@@ -37166,15 +37288,15 @@ var Editor = ({ Root, readOnlyStudio }) => {
|
|
|
37166
37288
|
canvasSize: size3
|
|
37167
37289
|
};
|
|
37168
37290
|
}, [size3]);
|
|
37169
|
-
const MemoRoot =
|
|
37291
|
+
const MemoRoot = useMemo167(() => {
|
|
37170
37292
|
return React202.memo(Root);
|
|
37171
37293
|
}, [Root]);
|
|
37172
37294
|
const [renderError, setRenderError] = useState100(null);
|
|
37173
37295
|
const clearError = useCallback159(() => {
|
|
37174
37296
|
setRenderError(null);
|
|
37175
37297
|
}, []);
|
|
37176
|
-
const compositionRenderErrorContextValue =
|
|
37177
|
-
const renderErrorContextValue =
|
|
37298
|
+
const compositionRenderErrorContextValue = useMemo167(() => ({ setError: setRenderError, clearError }), [clearError]);
|
|
37299
|
+
const renderErrorContextValue = useMemo167(() => ({ error: renderError }), [renderError]);
|
|
37178
37300
|
return /* @__PURE__ */ jsx307(HigherZIndex, {
|
|
37179
37301
|
onEscape: noop,
|
|
37180
37302
|
onOutsideClick: noop,
|
|
@@ -37227,7 +37349,7 @@ var Editor = ({ Root, readOnlyStudio }) => {
|
|
|
37227
37349
|
import { PlayerInternals as PlayerInternals21 } from "@remotion/player";
|
|
37228
37350
|
|
|
37229
37351
|
// src/state/preview-size.tsx
|
|
37230
|
-
import { useCallback as useCallback160, useContext as useContext102, useMemo as
|
|
37352
|
+
import { useCallback as useCallback160, useContext as useContext102, useMemo as useMemo168, useState as useState101 } from "react";
|
|
37231
37353
|
import { Internals as Internals75 } from "remotion";
|
|
37232
37354
|
import { jsx as jsx308 } from "react/jsx-runtime";
|
|
37233
37355
|
var key5 = "remotion.previewSize";
|
|
@@ -37263,7 +37385,7 @@ var PreviewSizeProvider = ({ children }) => {
|
|
|
37263
37385
|
return newVal;
|
|
37264
37386
|
});
|
|
37265
37387
|
}, []);
|
|
37266
|
-
const previewSizeCtx =
|
|
37388
|
+
const previewSizeCtx = useMemo168(() => {
|
|
37267
37389
|
return {
|
|
37268
37390
|
size: editorZoomGestures ? size3 : {
|
|
37269
37391
|
size: size3.size,
|
|
@@ -37284,7 +37406,7 @@ var PreviewSizeProvider = ({ children }) => {
|
|
|
37284
37406
|
};
|
|
37285
37407
|
|
|
37286
37408
|
// src/components/CheckerboardProvider.tsx
|
|
37287
|
-
import { useCallback as useCallback161, useMemo as
|
|
37409
|
+
import { useCallback as useCallback161, useMemo as useMemo169, useState as useState102 } from "react";
|
|
37288
37410
|
import { jsx as jsx309 } from "react/jsx-runtime";
|
|
37289
37411
|
var CheckerboardProvider = ({ children }) => {
|
|
37290
37412
|
const [checkerboard, setCheckerboardState] = useState102(() => loadCheckerboardOption());
|
|
@@ -37295,7 +37417,7 @@ var CheckerboardProvider = ({ children }) => {
|
|
|
37295
37417
|
return newVal;
|
|
37296
37418
|
});
|
|
37297
37419
|
}, []);
|
|
37298
|
-
const checkerboardCtx =
|
|
37420
|
+
const checkerboardCtx = useMemo169(() => {
|
|
37299
37421
|
return {
|
|
37300
37422
|
checkerboard,
|
|
37301
37423
|
setCheckerboard
|
|
@@ -37308,19 +37430,19 @@ var CheckerboardProvider = ({ children }) => {
|
|
|
37308
37430
|
};
|
|
37309
37431
|
|
|
37310
37432
|
// src/components/MediaVolumeProvider.tsx
|
|
37311
|
-
import { useMemo as
|
|
37433
|
+
import { useMemo as useMemo170, useState as useState103 } from "react";
|
|
37312
37434
|
import { Internals as Internals76 } from "remotion";
|
|
37313
37435
|
import { jsx as jsx310 } from "react/jsx-runtime";
|
|
37314
37436
|
var MediaVolumeProvider = ({ children }) => {
|
|
37315
37437
|
const [mediaMuted, setMediaMuted] = useState103(() => loadMuteOption());
|
|
37316
37438
|
const [mediaVolume, setMediaVolume] = useState103(1);
|
|
37317
|
-
const mediaVolumeContextValue =
|
|
37439
|
+
const mediaVolumeContextValue = useMemo170(() => {
|
|
37318
37440
|
return {
|
|
37319
37441
|
mediaMuted,
|
|
37320
37442
|
mediaVolume
|
|
37321
37443
|
};
|
|
37322
37444
|
}, [mediaMuted, mediaVolume]);
|
|
37323
|
-
const setMediaVolumeContextValue =
|
|
37445
|
+
const setMediaVolumeContextValue = useMemo170(() => {
|
|
37324
37446
|
return {
|
|
37325
37447
|
setMediaMuted,
|
|
37326
37448
|
setMediaVolume
|
|
@@ -37336,11 +37458,11 @@ var MediaVolumeProvider = ({ children }) => {
|
|
|
37336
37458
|
};
|
|
37337
37459
|
|
|
37338
37460
|
// src/components/ModalsProvider.tsx
|
|
37339
|
-
import { useMemo as
|
|
37461
|
+
import { useMemo as useMemo171, useState as useState104 } from "react";
|
|
37340
37462
|
import { jsx as jsx311 } from "react/jsx-runtime";
|
|
37341
37463
|
var ModalsProvider = ({ children }) => {
|
|
37342
37464
|
const [modalContextType, setModalContextType] = useState104(null);
|
|
37343
|
-
const modalsContext =
|
|
37465
|
+
const modalsContext = useMemo171(() => {
|
|
37344
37466
|
return {
|
|
37345
37467
|
selectedModal: modalContextType,
|
|
37346
37468
|
setSelectedModal: setModalContextType
|
|
@@ -37353,7 +37475,7 @@ var ModalsProvider = ({ children }) => {
|
|
|
37353
37475
|
};
|
|
37354
37476
|
|
|
37355
37477
|
// src/components/SetTimelineInOutProvider.tsx
|
|
37356
|
-
import { useEffect as useEffect91, useMemo as
|
|
37478
|
+
import { useEffect as useEffect91, useMemo as useMemo172, useState as useState105 } from "react";
|
|
37357
37479
|
|
|
37358
37480
|
// src/state/marks.ts
|
|
37359
37481
|
var localStorageKey4 = () => `remotion.editor.marksv2`;
|
|
@@ -37372,7 +37494,7 @@ var loadMarks = () => {
|
|
|
37372
37494
|
import { jsx as jsx312 } from "react/jsx-runtime";
|
|
37373
37495
|
var SetTimelineInOutProvider = ({ children }) => {
|
|
37374
37496
|
const [inAndOutFrames, setInAndOutFrames] = useState105(() => loadMarks());
|
|
37375
|
-
const setTimelineInOutContextValue =
|
|
37497
|
+
const setTimelineInOutContextValue = useMemo172(() => {
|
|
37376
37498
|
return {
|
|
37377
37499
|
setInAndOutFrames
|
|
37378
37500
|
};
|
|
@@ -37390,7 +37512,7 @@ var SetTimelineInOutProvider = ({ children }) => {
|
|
|
37390
37512
|
};
|
|
37391
37513
|
|
|
37392
37514
|
// src/components/ShowGuidesProvider.tsx
|
|
37393
|
-
import { useCallback as useCallback162, useMemo as
|
|
37515
|
+
import { useCallback as useCallback162, useMemo as useMemo173, useRef as useRef57, useState as useState106 } from "react";
|
|
37394
37516
|
import { jsx as jsx313 } from "react/jsx-runtime";
|
|
37395
37517
|
var ShowGuidesProvider = ({ children }) => {
|
|
37396
37518
|
const [guidesList, setGuidesList] = useState106(() => loadGuidesList());
|
|
@@ -37406,7 +37528,7 @@ var ShowGuidesProvider = ({ children }) => {
|
|
|
37406
37528
|
return newVal;
|
|
37407
37529
|
});
|
|
37408
37530
|
}, []);
|
|
37409
|
-
const editorShowGuidesCtx =
|
|
37531
|
+
const editorShowGuidesCtx = useMemo173(() => {
|
|
37410
37532
|
return {
|
|
37411
37533
|
editorShowGuides,
|
|
37412
37534
|
setEditorShowGuides,
|
|
@@ -37433,7 +37555,7 @@ var ShowGuidesProvider = ({ children }) => {
|
|
|
37433
37555
|
};
|
|
37434
37556
|
|
|
37435
37557
|
// src/components/ShowRulersProvider.tsx
|
|
37436
|
-
import { useCallback as useCallback163, useMemo as
|
|
37558
|
+
import { useCallback as useCallback163, useMemo as useMemo174, useState as useState107 } from "react";
|
|
37437
37559
|
import { jsx as jsx314 } from "react/jsx-runtime";
|
|
37438
37560
|
var ShowRulersProvider = ({ children }) => {
|
|
37439
37561
|
const [editorShowRulers, setEditorShowRulersState] = useState107(() => loadEditorShowRulersOption());
|
|
@@ -37444,7 +37566,7 @@ var ShowRulersProvider = ({ children }) => {
|
|
|
37444
37566
|
return newVal;
|
|
37445
37567
|
});
|
|
37446
37568
|
}, []);
|
|
37447
|
-
const editorShowRulersCtx =
|
|
37569
|
+
const editorShowRulersCtx = useMemo174(() => {
|
|
37448
37570
|
return {
|
|
37449
37571
|
editorShowRulers,
|
|
37450
37572
|
setEditorShowRulers
|
|
@@ -37476,7 +37598,7 @@ var VisualControlsUndoSync = () => {
|
|
|
37476
37598
|
};
|
|
37477
37599
|
|
|
37478
37600
|
// src/components/ZoomGesturesProvider.tsx
|
|
37479
|
-
import { useCallback as useCallback164, useMemo as
|
|
37601
|
+
import { useCallback as useCallback164, useMemo as useMemo175, useState as useState108 } from "react";
|
|
37480
37602
|
import { jsx as jsx315 } from "react/jsx-runtime";
|
|
37481
37603
|
var ZoomGesturesProvider = ({ children }) => {
|
|
37482
37604
|
const [editorZoomGestures, setEditorZoomGesturesState] = useState108(() => loadEditorZoomGesturesOption());
|
|
@@ -37487,7 +37609,7 @@ var ZoomGesturesProvider = ({ children }) => {
|
|
|
37487
37609
|
return newVal;
|
|
37488
37610
|
});
|
|
37489
37611
|
}, []);
|
|
37490
|
-
const editorZoomGesturesCtx =
|
|
37612
|
+
const editorZoomGesturesCtx = useMemo175(() => {
|
|
37491
37613
|
return {
|
|
37492
37614
|
editorZoomGestures,
|
|
37493
37615
|
setEditorZoomGestures
|
|
@@ -37624,7 +37746,7 @@ var ServerDisconnected = () => {
|
|
|
37624
37746
|
};
|
|
37625
37747
|
|
|
37626
37748
|
// src/FastRefreshProvider.tsx
|
|
37627
|
-
import { useCallback as useCallback165, useEffect as useEffect93, useMemo as
|
|
37749
|
+
import { useCallback as useCallback165, useEffect as useEffect93, useMemo as useMemo176, useState as useState109 } from "react";
|
|
37628
37750
|
import { jsx as jsx318 } from "react/jsx-runtime";
|
|
37629
37751
|
var FastRefreshProvider = ({ children }) => {
|
|
37630
37752
|
const [fastRefreshes, setFastRefreshes] = useState109(0);
|
|
@@ -37643,7 +37765,7 @@ var FastRefreshProvider = ({ children }) => {
|
|
|
37643
37765
|
}
|
|
37644
37766
|
}
|
|
37645
37767
|
}, []);
|
|
37646
|
-
const value =
|
|
37768
|
+
const value = useMemo176(() => ({ fastRefreshes, manualRefreshes, increaseManualRefreshes }), [fastRefreshes, manualRefreshes, increaseManualRefreshes]);
|
|
37647
37769
|
return /* @__PURE__ */ jsx318(FastRefreshContext.Provider, {
|
|
37648
37770
|
value,
|
|
37649
37771
|
children
|
|
@@ -37815,7 +37937,7 @@ import {
|
|
|
37815
37937
|
useContext as useContext105,
|
|
37816
37938
|
useEffect as useEffect94,
|
|
37817
37939
|
useImperativeHandle as useImperativeHandle14,
|
|
37818
|
-
useMemo as
|
|
37940
|
+
useMemo as useMemo177,
|
|
37819
37941
|
useState as useState110
|
|
37820
37942
|
} from "react";
|
|
37821
37943
|
import { getInputProps as getInputProps2, Internals as Internals78 } from "remotion";
|
|
@@ -37825,20 +37947,20 @@ var ResolveCompositionConfigInStudio = ({ children }) => {
|
|
|
37825
37947
|
const { compositions, canvasContent, currentCompositionMetadata } = useContext105(Internals78.CompositionManager);
|
|
37826
37948
|
const { fastRefreshes, manualRefreshes } = useContext105(FastRefreshContext);
|
|
37827
37949
|
if (manualRefreshes) {}
|
|
37828
|
-
const selectedComposition =
|
|
37950
|
+
const selectedComposition = useMemo177(() => {
|
|
37829
37951
|
return compositions.find((c) => canvasContent && canvasContent.type === "composition" && canvasContent.compositionId === c.id);
|
|
37830
37952
|
}, [canvasContent, compositions]);
|
|
37831
37953
|
const renderModalComposition = compositions.find((c) => c.id === currentRenderModalComposition);
|
|
37832
37954
|
const { props: allEditorProps } = useContext105(Internals78.EditorPropsContext);
|
|
37833
37955
|
const env = Internals78.getRemotionEnvironment();
|
|
37834
|
-
const inputProps =
|
|
37956
|
+
const inputProps = useMemo177(() => {
|
|
37835
37957
|
return typeof window === "undefined" || env.isPlayer ? {} : getInputProps2() ?? {};
|
|
37836
37958
|
}, [env.isPlayer]);
|
|
37837
37959
|
const [resolvedConfigs, setResolvedConfigs] = useState110({});
|
|
37838
|
-
const selectedEditorProps =
|
|
37960
|
+
const selectedEditorProps = useMemo177(() => {
|
|
37839
37961
|
return selectedComposition ? allEditorProps[selectedComposition.id] ?? {} : {};
|
|
37840
37962
|
}, [allEditorProps, selectedComposition]);
|
|
37841
|
-
const renderModalProps =
|
|
37963
|
+
const renderModalProps = useMemo177(() => {
|
|
37842
37964
|
return renderModalComposition ? allEditorProps[renderModalComposition.id] ?? {} : {};
|
|
37843
37965
|
}, [allEditorProps, renderModalComposition]);
|
|
37844
37966
|
const hasResolution = Boolean(currentCompositionMetadata);
|
|
@@ -37975,13 +38097,13 @@ var ResolveCompositionConfigInStudio = ({ children }) => {
|
|
|
37975
38097
|
inputProps
|
|
37976
38098
|
]);
|
|
37977
38099
|
const isTheSame = selectedComposition?.id === renderModalComposition?.id;
|
|
37978
|
-
const currentDefaultProps =
|
|
38100
|
+
const currentDefaultProps = useMemo177(() => {
|
|
37979
38101
|
return {
|
|
37980
38102
|
...selectedComposition?.defaultProps ?? {},
|
|
37981
38103
|
...selectedEditorProps ?? {}
|
|
37982
38104
|
};
|
|
37983
38105
|
}, [selectedComposition?.defaultProps, selectedEditorProps]);
|
|
37984
|
-
const originalProps =
|
|
38106
|
+
const originalProps = useMemo177(() => {
|
|
37985
38107
|
return {
|
|
37986
38108
|
...currentDefaultProps,
|
|
37987
38109
|
...inputProps ?? {}
|
|
@@ -38050,7 +38172,7 @@ var ResolveCompositionConfigInStudio = ({ children }) => {
|
|
|
38050
38172
|
renderModalComposition,
|
|
38051
38173
|
renderModalProps
|
|
38052
38174
|
]);
|
|
38053
|
-
const resolvedConfigsIncludingStaticOnes =
|
|
38175
|
+
const resolvedConfigsIncludingStaticOnes = useMemo177(() => {
|
|
38054
38176
|
const staticComps = compositions.filter((c) => {
|
|
38055
38177
|
return c.calculateMetadata === null;
|
|
38056
38178
|
});
|