@remotion/studio 4.0.513 → 4.0.515
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/Studio.js +2 -1
- package/dist/api/install-package.js +14 -1
- package/dist/components/AskAiModal.js +1 -1
- package/dist/components/AssetSelector.js +2 -0
- package/dist/components/AssetSelectorItem.d.ts +2 -1
- package/dist/components/AssetSelectorItem.js +19 -16
- package/dist/components/AudioWaveform.d.ts +3 -0
- package/dist/components/AudioWaveform.js +65 -199
- package/dist/components/Canvas.js +40 -5
- package/dist/components/CanvasOrLoading.js +5 -0
- package/dist/components/CompositionSelector.js +2 -0
- package/dist/components/ConfigureDefaultEditorModal.js +17 -11
- package/dist/components/Editor.js +16 -1
- package/dist/components/ElementInstallConfirmation.d.ts +1 -0
- package/dist/components/ElementInstallConfirmation.js +4 -2
- package/dist/components/FixComputedValueModal.d.ts +9 -0
- package/dist/components/FixComputedValueModal.js +217 -0
- package/dist/components/InitialCompositionLoader.js +19 -0
- package/dist/components/InlineDropdown.js +4 -4
- package/dist/components/InspectorInfoHeader.js +3 -3
- package/dist/components/InspectorOpenInEditor.js +3 -1
- package/dist/components/InspectorPanel/CompositionInspector.js +37 -5
- package/dist/components/InspectorPanel/CompositionInspectorHeader.js +2 -2
- package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +1 -1
- package/dist/components/InspectorPanel/EasingInspector.js +1 -1
- package/dist/components/InspectorPanel/KeyframeInspector.js +2 -2
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +1 -1
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +35 -6
- package/dist/components/InspectorPanel/common.d.ts +5 -5
- package/dist/components/InspectorPanel/common.js +8 -8
- package/dist/components/InspectorPanel/styles.d.ts +1 -1
- package/dist/components/InspectorPanel/styles.js +4 -2
- package/dist/components/InspectorSourceLocation.d.ts +1 -1
- package/dist/components/InspectorSourceLocation.js +2 -2
- package/dist/components/InstallPackage.d.ts +1 -1
- package/dist/components/InstallPackage.js +38 -6
- package/dist/components/LicenseKeyValidation.js +2 -2
- package/dist/components/Menu/MenuDivider.js +1 -1
- package/dist/components/Modals.js +11 -3
- package/dist/components/NewComposition/CodemodFooter.d.ts +1 -0
- package/dist/components/NewComposition/CodemodFooter.js +10 -8
- package/dist/components/NewComposition/DeleteComposition.js +1 -1
- package/dist/components/NewComposition/DeleteFolder.js +1 -1
- package/dist/components/NewComposition/DuplicateComposition.js +7 -2
- package/dist/components/NewComposition/NewComposition.js +1 -1
- package/dist/components/NewComposition/NewFolder.js +1 -1
- package/dist/components/NewComposition/RenameComposition.js +1 -1
- package/dist/components/NewComposition/RenameFolder.js +1 -1
- package/dist/components/NewComposition/duplicate-composition-api.d.ts +16 -0
- package/dist/components/NewComposition/duplicate-composition-api.js +16 -0
- package/dist/components/NoRegisterRoot.js +1 -1
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +4 -3
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -0
- package/dist/components/QuickSwitcher/fuzzy-search.js +1 -1
- package/dist/components/RefreshCompositionOverlay.js +1 -1
- package/dist/components/RenderButton.js +6 -3
- package/dist/components/RenderModal/GuiRenderStatus.js +3 -1
- package/dist/components/RenderModal/RenderModalOutputName.js +3 -3
- package/dist/components/RenderModal/WebRenderModal.js +10 -4
- package/dist/components/RenderModal/WebRenderModalAdvanced.d.ts +2 -0
- package/dist/components/RenderModal/WebRenderModalAdvanced.js +9 -2
- package/dist/components/RenderModal/render-modals.js +5 -1
- package/dist/components/RenderQueue/ClientRenderQueueProcessor.js +5 -1
- package/dist/components/RenderQueue/RenderQueueItem.js +3 -1
- package/dist/components/RenderQueue/RenderQueueOpenInFolder.js +3 -1
- package/dist/components/RenderQueue/RenderQueueRemoveItem.js +1 -1
- package/dist/components/RenderQueue/actions.js +12 -2
- package/dist/components/RenderQueue/client-side-render-types.d.ts +1 -0
- package/dist/components/RenderingSettings.d.ts +2 -0
- package/dist/components/RenderingSettings.js +355 -0
- package/dist/components/SelectedOutlineCanvasRotation.d.ts +1 -0
- package/dist/components/SelectedOutlineCanvasRotation.js +11 -4
- package/dist/components/SelectedOutlineElement.js +3 -3
- package/dist/components/SelectedOutlinePolygon.d.ts +2 -0
- package/dist/components/SelectedOutlinePolygon.js +54 -9
- package/dist/components/SettingsContext.d.ts +4 -1
- package/dist/components/SettingsContext.js +9 -2
- package/dist/components/SettingsModal.d.ts +1 -1
- package/dist/components/SettingsModal.js +10 -1
- package/dist/components/SettingsModalFooter.js +1 -1
- package/dist/components/StudioSettings.d.ts +2 -0
- package/dist/components/StudioSettings.js +185 -0
- package/dist/components/Timeline/LoopedIndicator.js +1 -1
- package/dist/components/Timeline/LoopedTimelineIndicators.d.ts +3 -0
- package/dist/components/Timeline/LoopedTimelineIndicators.js +22 -14
- package/dist/components/Timeline/Timeline.js +11 -9
- package/dist/components/Timeline/TimelineAssetField.d.ts +2 -2
- package/dist/components/Timeline/TimelineAssetField.js +1 -1
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +6 -2
- package/dist/components/Timeline/TimelineDragHandler.js +62 -76
- package/dist/components/Timeline/TimelineEffectItem.js +23 -6
- package/dist/components/Timeline/TimelineEffectPropItem.d.ts +4 -2
- package/dist/components/Timeline/TimelineEffectPropItem.js +22 -13
- package/dist/components/Timeline/TimelineExpandArrowButton.js +10 -7
- package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +4 -1
- package/dist/components/Timeline/TimelineExpandedRow.d.ts +1 -1
- package/dist/components/Timeline/TimelineExpandedRow.js +4 -4
- package/dist/components/Timeline/TimelineExpandedSection.js +8 -5
- package/dist/components/Timeline/TimelineHeightContainer.d.ts +0 -4
- package/dist/components/Timeline/TimelineHeightContainer.js +4 -4
- package/dist/components/Timeline/TimelineImageInfo.d.ts +1 -0
- package/dist/components/Timeline/TimelineImageInfo.js +3 -2
- package/dist/components/Timeline/TimelineKeyframeControls.js +6 -1
- package/dist/components/Timeline/TimelineList.d.ts +1 -5
- package/dist/components/Timeline/TimelineList.js +14 -9
- package/dist/components/Timeline/TimelinePinchZoom.js +5 -5
- package/dist/components/Timeline/TimelineRowChrome.d.ts +1 -2
- package/dist/components/Timeline/TimelineRowChrome.js +50 -7
- package/dist/components/Timeline/TimelineSchemaField.d.ts +7 -3
- package/dist/components/Timeline/TimelineSchemaField.js +71 -13
- package/dist/components/Timeline/TimelineScrollable.js +3 -1
- package/dist/components/Timeline/TimelineSelection.d.ts +13 -5
- package/dist/components/Timeline/TimelineSelection.js +95 -106
- package/dist/components/Timeline/TimelineSequence.js +59 -25
- package/dist/components/Timeline/TimelineSequenceItem.d.ts +1 -1
- package/dist/components/Timeline/TimelineSequenceItem.js +21 -12
- package/dist/components/Timeline/TimelineSequenceName.js +1 -1
- package/dist/components/Timeline/TimelineSequencePropItem.d.ts +2 -1
- package/dist/components/Timeline/TimelineSequencePropItem.js +3 -3
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +33 -10
- package/dist/components/Timeline/TimelineSlider.js +42 -33
- package/dist/components/Timeline/TimelineTimeIndicators.js +90 -98
- package/dist/components/Timeline/TimelineTrack.js +4 -1
- package/dist/components/Timeline/TimelineTracks.d.ts +0 -2
- package/dist/components/Timeline/TimelineTracks.js +11 -4
- package/dist/components/Timeline/TimelineTransformOriginField.js +1 -1
- package/dist/components/Timeline/TimelineVideoInfo.d.ts +4 -4
- package/dist/components/Timeline/TimelineVideoInfo.js +155 -63
- package/dist/components/Timeline/TimelineViewport.d.ts +12 -0
- package/dist/components/Timeline/TimelineViewport.js +62 -0
- package/dist/components/Timeline/TimelineVirtualization.d.ts +22 -0
- package/dist/components/Timeline/TimelineVirtualization.js +144 -0
- package/dist/components/Timeline/TimelineZoomControls.js +16 -8
- package/dist/components/Timeline/call-add-keyframe.js +31 -3
- package/dist/components/Timeline/call-delete-keyframe.js +13 -3
- package/dist/components/Timeline/call-move-keyframe.js +11 -1
- package/dist/components/Timeline/call-update-keyframe-settings.js +31 -3
- package/dist/components/Timeline/delete-selected-timeline-item.js +8 -3
- package/dist/components/Timeline/duplicate-selected-timeline-item.js +4 -2
- package/dist/components/Timeline/get-timeline-keyframes.d.ts +1 -2
- package/dist/components/Timeline/get-timeline-keyframes.js +1 -8
- package/dist/components/Timeline/get-timeline-sequence-visible-layout.d.ts +30 -0
- package/dist/components/Timeline/get-timeline-sequence-visible-layout.js +61 -0
- package/dist/components/Timeline/save-effect-prop.js +3 -3
- package/dist/components/Timeline/split-selected-timeline-item.js +2 -2
- package/dist/components/Timeline/timeline-scroll-logic.d.ts +24 -0
- package/dist/components/Timeline/timeline-scroll-logic.js +127 -4
- package/dist/components/Timeline/use-timeline-height.d.ts +3 -5
- package/dist/components/Timeline/use-timeline-height.js +16 -18
- package/dist/components/UpdateCheck.d.ts +2 -10
- package/dist/components/UpdateCheck.js +8 -2
- package/dist/components/VisualControls/VisualControlHandle.js +8 -0
- package/dist/components/delete-jsx-node-api.d.ts +2 -0
- package/dist/components/delete-jsx-node-api.js +12 -0
- package/dist/components/effect-drag-and-drop.js +6 -3
- package/dist/components/effect-operations-api.d.ts +8 -0
- package/dist/components/effect-operations-api.js +52 -0
- package/dist/components/element-install-api.d.ts +3 -0
- package/dist/components/element-install-api.js +19 -0
- package/dist/components/import-assets.js +20 -9
- package/dist/components/reorder-sequence-api.d.ts +2 -0
- package/dist/components/reorder-sequence-api.js +12 -0
- package/dist/components/split-jsx-sequence-api.d.ts +2 -0
- package/dist/components/split-jsx-sequence-api.js +12 -0
- package/dist/components/split-video-from-audio-api.d.ts +2 -0
- package/dist/components/split-video-from-audio-api.js +12 -0
- package/dist/error-overlay/remotion-overlay/Overlay.js +1 -1
- package/dist/error-overlay/remotion-overlay/log-studio-error.js +4 -0
- package/dist/esm/{chunk-r46yxrjr.js → chunk-s6k99gh2.js} +1 -1
- package/dist/esm/{chunk-tv7r0jy3.js → chunk-v5a8vpv4.js} +11479 -7851
- package/dist/esm/index.mjs +7 -5
- package/dist/esm/internals.mjs +11479 -7851
- package/dist/esm/previewEntry.mjs +11311 -7683
- package/dist/esm/renderEntry.mjs +3 -4
- package/dist/helpers/browser-studio-operations.d.ts +5 -0
- package/dist/helpers/browser-studio-operations.js +27 -1
- package/dist/helpers/colors.d.ts +1 -1
- package/dist/helpers/colors.js +1 -1
- package/dist/helpers/get-timeline-max-zoom.d.ts +26 -0
- package/dist/helpers/get-timeline-max-zoom.js +45 -0
- package/dist/helpers/inject-css.js +7 -5
- package/dist/helpers/render-codec-label.d.ts +1 -1
- package/dist/helpers/retry-payload.js +1 -0
- package/dist/helpers/studio-runtime-config.d.ts +1 -1
- package/dist/helpers/studio-runtime-config.js +2 -3
- package/dist/helpers/timeline-layout.d.ts +3 -1
- package/dist/helpers/timeline-layout.js +6 -1
- package/dist/helpers/url-state.js +3 -2
- package/dist/helpers/use-max-media-duration.js +5 -3
- package/dist/helpers/use-media-metadata.js +37 -20
- package/dist/helpers/use-menu-structure.js +67 -84
- package/dist/helpers/use-runtime-values.d.ts +2 -1
- package/dist/helpers/use-runtime-values.js +7 -3
- package/dist/icons/cloud-download.d.ts +4 -0
- package/dist/icons/cloud-download.js +8 -0
- package/dist/icons/remotion-triangle.d.ts +2 -0
- package/dist/icons/remotion-triangle.js +7 -0
- package/dist/renderEntry.js +1 -1
- package/dist/state/composition-list.d.ts +13 -0
- package/dist/state/composition-list.js +21 -0
- package/dist/state/modals.d.ts +8 -2
- package/dist/state/timeline-zoom.d.ts +1 -2
- package/dist/state/timeline-zoom.js +9 -5
- package/package.json +14 -13
|
@@ -6,6 +6,7 @@ const react_1 = require("react");
|
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
7
7
|
const client_id_1 = require("../../helpers/client-id");
|
|
8
8
|
const interactivity_enabled_1 = require("../../helpers/interactivity-enabled");
|
|
9
|
+
const audio_1 = require("../../icons/audio");
|
|
9
10
|
const duplicate_1 = require("../../icons/duplicate");
|
|
10
11
|
const scissors_1 = require("../../icons/scissors");
|
|
11
12
|
const snowflake_1 = require("../../icons/snowflake");
|
|
@@ -13,6 +14,8 @@ const trash_1 = require("../../icons/trash");
|
|
|
13
14
|
const ConfirmationDialog_1 = require("../ConfirmationDialog");
|
|
14
15
|
const InspectorSequenceSection_1 = require("../InspectorSequenceSection");
|
|
15
16
|
const is_menu_item_1 = require("../Menu/is-menu-item");
|
|
17
|
+
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
18
|
+
const split_video_from_audio_api_1 = require("../split-video-from-audio-api");
|
|
16
19
|
const delete_selected_timeline_item_1 = require("../Timeline/delete-selected-timeline-item");
|
|
17
20
|
const duplicate_selected_timeline_item_1 = require("../Timeline/duplicate-selected-timeline-item");
|
|
18
21
|
const split_selected_timeline_item_1 = require("../Timeline/split-selected-timeline-item");
|
|
@@ -34,7 +37,7 @@ const largeActionIconStyle = {
|
|
|
34
37
|
height: 20,
|
|
35
38
|
width: 20,
|
|
36
39
|
};
|
|
37
|
-
const
|
|
40
|
+
const SplitSequenceQuickAction = ({ selection, track }) => {
|
|
38
41
|
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
39
42
|
const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
40
43
|
const sequencePropStatuses = (0, react_1.useMemo)(() => remotion_1.Internals.getPropStatusesCtx(propStatuses, selection.nodePathInfo.sequenceSubscriptionKey), [propStatuses, selection]);
|
|
@@ -63,9 +66,9 @@ const SplitSequenceAction = ({ selection, track }) => {
|
|
|
63
66
|
: eligibility.canSplit
|
|
64
67
|
? undefined
|
|
65
68
|
: eligibility.reason;
|
|
66
|
-
return (jsx_runtime_1.jsx(common_1.
|
|
69
|
+
return (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: !canSplit, onClick: onSplit, title: disabledReason, renderIcon: (color) => (jsx_runtime_1.jsx(scissors_1.ScissorsIcon, { style: actionIconStyle, color: color })), children: "Split clip" }));
|
|
67
70
|
};
|
|
68
|
-
const
|
|
71
|
+
const SequenceSourceQuickActions = ({ selection, track, validatedSource }) => {
|
|
69
72
|
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
70
73
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
71
74
|
const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
@@ -97,7 +100,33 @@ const SequenceSourceActions = ({ selection, track, validatedSource }) => {
|
|
|
97
100
|
}
|
|
98
101
|
(0, delete_selected_timeline_item_1.deleteSequencesFromSource)([selection.nodePathInfo], confirm).catch(() => undefined);
|
|
99
102
|
}, [confirm, selection.nodePathInfo, sourceActionsDisabled]);
|
|
100
|
-
|
|
103
|
+
const splitVideoFromAudioDisabledReason = sourceActionsDisabled
|
|
104
|
+
? 'Studio is read-only'
|
|
105
|
+
: selection.nodePathInfo.numberOfSequencesWithThisNodePath > 1
|
|
106
|
+
? 'Programmatically duplicated sequences cannot be split from source'
|
|
107
|
+
: undefined;
|
|
108
|
+
const onSplitVideoFromAudio = (0, react_1.useCallback)(() => {
|
|
109
|
+
if (splitVideoFromAudioDisabledReason !== undefined) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
const nodePath = selection.nodePathInfo.sequenceSubscriptionKey;
|
|
113
|
+
(0, split_video_from_audio_api_1.splitVideoFromAudio)({
|
|
114
|
+
fileName: nodePath.absolutePath,
|
|
115
|
+
nodePath: nodePath.nodePath,
|
|
116
|
+
})
|
|
117
|
+
.then((result) => {
|
|
118
|
+
if (result.success) {
|
|
119
|
+
(0, NotificationCenter_1.showNotification)('Split video from audio', 2000);
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
(0, NotificationCenter_1.showNotification)(result.reason, 4000);
|
|
123
|
+
}
|
|
124
|
+
})
|
|
125
|
+
.catch((err) => {
|
|
126
|
+
(0, NotificationCenter_1.showNotification)(err.message, 4000);
|
|
127
|
+
});
|
|
128
|
+
}, [selection.nodePathInfo, splitVideoFromAudioDisabledReason]);
|
|
129
|
+
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [(freezeFrameMenuItem === null || freezeFrameMenuItem === void 0 ? void 0 : freezeFrameMenuItem.type) === 'item' ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: Boolean(freezeFrameMenuItem.disabled), onClick: () => freezeFrameMenuItem.onClick(freezeFrameMenuItem.id, null), renderIcon: (color) => (jsx_runtime_1.jsx(snowflake_1.SnowflakeIcon, { style: largeActionIconStyle, color: color })), children: freezeFrameMenuItem.label })) : null, track.sequence.type === 'video' ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: splitVideoFromAudioDisabledReason !== undefined, onClick: onSplitVideoFromAudio, title: splitVideoFromAudioDisabledReason, renderIcon: (color) => (jsx_runtime_1.jsx(audio_1.AudioIcon, { style: actionIconStyle, color: color })), children: "Split video from audio" })) : null, jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: sourceActionsDisabled, onClick: onDuplicate, renderIcon: (color) => (jsx_runtime_1.jsx(duplicate_1.DuplicateIcon, { style: largeActionIconStyle, color: color })), children: "Duplicate" }), jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: sourceActionsDisabled, onClick: onDelete, renderIcon: (color) => (jsx_runtime_1.jsx(trash_1.TrashIcon, { style: actionIconStyle, color: color })), children: "Delete" })] }));
|
|
101
130
|
};
|
|
102
131
|
const SequenceExpandedInspector = ({ track, readOnlyStudio }) => {
|
|
103
132
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
@@ -144,8 +173,8 @@ const SequenceExpandedInspector = ({ track, readOnlyStudio }) => {
|
|
|
144
173
|
return (jsx_runtime_1.jsxs("div", { style: styles_1.selectedContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, onPointerDown: selectSequenceOnInspectorPointerDown, children: [
|
|
145
174
|
jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorHeader, { sourceLocation: sourceLocation, track: track }, stackKey !== null && stackKey !== void 0 ? stackKey : track.sequence.id), jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorDuplicationSection, { track: track }), connectedCompositions.length > 0 ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
146
175
|
jsx_runtime_1.jsx(common_1.InspectorSectionDivider, {}), jsx_runtime_1.jsx(ConnectedCompositionsSection_1.ConnectedCompositionsSection, { connectedCompositions: connectedCompositions })
|
|
147
|
-
] })) : null, validatedLocation ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [jsx_runtime_1.jsx(InspectorSequenceSection_1.InspectorSequenceSection, { sequence: track.sequence, readOnlyStudio: readOnlyStudio, validatedLocation: validatedLocation, nodePathInfo: track.nodePathInfo, keyframeDisplayOffset: track.keyframeDisplayOffset, renderTransformControls: () => jsx_runtime_1.jsx(AlignmentControls_1.AlignmentControls, { track: track }) }), jsx_runtime_1.jsxs(common_1.
|
|
148
|
-
jsx_runtime_1.jsx(
|
|
176
|
+
] })) : null, validatedLocation ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [jsx_runtime_1.jsx(InspectorSequenceSection_1.InspectorSequenceSection, { sequence: track.sequence, readOnlyStudio: readOnlyStudio, validatedLocation: validatedLocation, nodePathInfo: track.nodePathInfo, keyframeDisplayOffset: track.keyframeDisplayOffset, renderTransformControls: () => jsx_runtime_1.jsx(AlignmentControls_1.AlignmentControls, { track: track }) }), jsx_runtime_1.jsxs(common_1.InspectorQuickActionsSection, { children: [
|
|
177
|
+
jsx_runtime_1.jsx(SplitSequenceQuickAction, { selection: sequenceSelection, track: track }), jsx_runtime_1.jsx(SequenceSourceQuickActions, { selection: sequenceSelection, track: track, validatedSource: validatedLocation.source })
|
|
149
178
|
] })
|
|
150
179
|
] })) : (jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Source controls unavailable" }))] }));
|
|
151
180
|
};
|
|
@@ -4,7 +4,7 @@ export declare const InspectorSectionHeader: React.FC<{
|
|
|
4
4
|
readonly children: React.ReactNode;
|
|
5
5
|
}>;
|
|
6
6
|
export declare const InspectorSectionDivider: React.FC;
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const InspectorQuickActionsSection: React.FC<{
|
|
8
8
|
readonly children: React.ReactNode;
|
|
9
9
|
}>;
|
|
10
10
|
export declare const InspectorSection: React.FC<{
|
|
@@ -24,13 +24,13 @@ export declare const InspectorDetailRow: React.FC<{
|
|
|
24
24
|
readonly label: React.ReactNode | ((hovered: boolean) => React.ReactNode);
|
|
25
25
|
readonly children: React.ReactNode;
|
|
26
26
|
}>;
|
|
27
|
-
export type
|
|
27
|
+
export type InspectorQuickActionSegment = {
|
|
28
28
|
readonly disabled: boolean;
|
|
29
29
|
readonly onClick: React.MouseEventHandler<HTMLButtonElement>;
|
|
30
30
|
readonly renderIcon: (color: string) => React.ReactNode;
|
|
31
31
|
readonly title?: string;
|
|
32
32
|
};
|
|
33
|
-
export type
|
|
33
|
+
export type InspectorQuickActionProps = {
|
|
34
34
|
readonly children: React.ReactNode;
|
|
35
35
|
readonly disabled: boolean;
|
|
36
36
|
readonly iconContainerStyle?: React.CSSProperties;
|
|
@@ -43,10 +43,10 @@ export type InspectorInlineActionProps = {
|
|
|
43
43
|
readonly type: 'single';
|
|
44
44
|
} | {
|
|
45
45
|
readonly type: 'segmented';
|
|
46
|
-
readonly trailing:
|
|
46
|
+
readonly trailing: InspectorQuickActionSegment;
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
|
-
export declare const
|
|
49
|
+
export declare const InspectorQuickAction: React.FC<InspectorQuickActionProps>;
|
|
50
50
|
export declare const InspectorDefaultPropsWarnings: React.FC<{
|
|
51
51
|
readonly warnings: RenderModalWarning[];
|
|
52
52
|
}>;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.InspectorDefaultPropsWarnings = exports.
|
|
6
|
+
exports.InspectorDefaultPropsWarnings = exports.InspectorQuickAction = exports.InspectorDetailRow = exports.InspectorMessage = exports.InspectorBackAction = exports.InspectorSection = exports.InspectorQuickActionsSection = exports.InspectorSectionDivider = exports.InspectorSectionHeader = void 0;
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const react_1 = __importDefault(require("react"));
|
|
9
9
|
const colors_1 = require("../../helpers/colors");
|
|
@@ -16,10 +16,10 @@ const InspectorSectionHeader = ({ children }) => jsx_runtime_1.jsx("div", { styl
|
|
|
16
16
|
exports.InspectorSectionHeader = InspectorSectionHeader;
|
|
17
17
|
const InspectorSectionDivider = () => (jsx_runtime_1.jsx("div", { style: styles_1.inspectorSectionDivider }));
|
|
18
18
|
exports.InspectorSectionDivider = InspectorSectionDivider;
|
|
19
|
-
const
|
|
20
|
-
jsx_runtime_1.jsx(exports.InspectorSectionDivider, {}), jsx_runtime_1.jsx("div", { style: styles_1.
|
|
19
|
+
const InspectorQuickActionsSection = ({ children }) => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
20
|
+
jsx_runtime_1.jsx(exports.InspectorSectionDivider, {}), jsx_runtime_1.jsx("div", { style: styles_1.inspectorQuickActionsSection, children: children })
|
|
21
21
|
] }));
|
|
22
|
-
exports.
|
|
22
|
+
exports.InspectorQuickActionsSection = InspectorQuickActionsSection;
|
|
23
23
|
const InspectorSection = ({ children, header }) => {
|
|
24
24
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
25
25
|
jsx_runtime_1.jsx(exports.InspectorSectionDivider, {}), jsx_runtime_1.jsx(exports.InspectorSectionHeader, { children: header }), children === null ? null : (jsx_runtime_1.jsx("div", { style: styles_1.inspectorSectionBody, children: children }))] }));
|
|
@@ -34,7 +34,7 @@ const BackArrow = ({ color }) => {
|
|
|
34
34
|
return (jsx_runtime_1.jsx("svg", { viewBox: "0 0 512 512", style: backArrowIcon, children: jsx_runtime_1.jsx("path", { d: "M7 239c-9.4 9.4-9.4 24.6 0 33.9L175 441c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9L81.9 280 488 280c13.3 0 24-10.7 24-24s-10.7-24-24-24L81.9 232 209 105c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0L7 239z", fill: color }) }));
|
|
35
35
|
};
|
|
36
36
|
const InspectorBackAction = ({ children, disabled, onClick, title }) => {
|
|
37
|
-
return (jsx_runtime_1.jsx("div", { style: styles_1.
|
|
37
|
+
return (jsx_runtime_1.jsx("div", { style: styles_1.inspectorQuickActionsSection, children: jsx_runtime_1.jsx(exports.InspectorQuickAction, { disabled: disabled, onClick: onClick, renderIcon: (color) => jsx_runtime_1.jsx(BackArrow, { color: color }), title: title, children: children }) }));
|
|
38
38
|
};
|
|
39
39
|
exports.InspectorBackAction = InspectorBackAction;
|
|
40
40
|
const InspectorMessage = ({ children }) => jsx_runtime_1.jsx("div", { style: styles_1.centeredMessage, children: children });
|
|
@@ -115,7 +115,7 @@ const segmentedTrailingAction = {
|
|
|
115
115
|
padding: 0,
|
|
116
116
|
width: 28,
|
|
117
117
|
};
|
|
118
|
-
const
|
|
118
|
+
const InspectorQuickAction = ({ children, disabled, iconContainerStyle, onClick, renderIcon, size = 'default', style, title, variant = { type: 'single' }, }) => {
|
|
119
119
|
const isSegmented = variant.type === 'segmented';
|
|
120
120
|
// A non-clickable single action (onClick === null) never shows a hover
|
|
121
121
|
// effect. In the segmented variant, the main segment highlights whenever
|
|
@@ -137,7 +137,7 @@ const InspectorInlineAction = ({ children, disabled, iconContainerStyle, onClick
|
|
|
137
137
|
}), [disabled, showsHover, isSegmented, size, style]);
|
|
138
138
|
const mainContent = (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [renderIcon ? (jsx_runtime_1.jsx("span", { style: { ...inlineLabelIcon, ...iconContainerStyle }, children: renderIcon(colors_1.CURRENT_COLOR) })) : null, jsx_runtime_1.jsx("span", { style: inlineLabelText, children: children })
|
|
139
139
|
] }));
|
|
140
|
-
const mainAction = onClick ? (jsx_runtime_1.jsx("button", { className: `__remotion-inspector-
|
|
140
|
+
const mainAction = onClick ? (jsx_runtime_1.jsx("button", { className: `__remotion-inspector-quick-action ${hoverable_1.HOVERABLE_CLASS_NAME}`, type: "button", disabled: disabled, style: buttonStyle, title: title, onClick: onClick, children: mainContent })) : (jsx_runtime_1.jsx("div", { className: hoverable_1.HOVERABLE_CLASS_NAME, style: buttonStyle, title: title, children: mainContent }));
|
|
141
141
|
if (variant.type === 'segmented') {
|
|
142
142
|
const trailingStyle = {
|
|
143
143
|
...segmentedTrailingAction,
|
|
@@ -159,7 +159,7 @@ const InspectorInlineAction = ({ children, disabled, iconContainerStyle, onClick
|
|
|
159
159
|
}
|
|
160
160
|
return mainAction;
|
|
161
161
|
};
|
|
162
|
-
exports.
|
|
162
|
+
exports.InspectorQuickAction = InspectorQuickAction;
|
|
163
163
|
const InspectorDefaultPropsWarnings = ({ warnings }) => {
|
|
164
164
|
return (jsx_runtime_1.jsx("div", { style: styles_1.defaultPropsWarningMessages, children: warnings.map((warning) => (jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { message: warning.message, align: "flex-start", type: "warning", size: "compact", action: warning.resolveLink ? (jsx_runtime_1.jsx("a", { href: warning.resolveLink, target: "_blank", rel: "noopener noreferrer", style: styles_1.resolveLinkStyle, children: "Resolve" })) : null }, warning.id))) }));
|
|
165
165
|
};
|
|
@@ -20,7 +20,7 @@ export declare const selectedContainer: React.CSSProperties;
|
|
|
20
20
|
export declare const centeredMessage: React.CSSProperties;
|
|
21
21
|
export declare const detailsContainer: React.CSSProperties;
|
|
22
22
|
export declare const detailsWithInlineAction: React.CSSProperties;
|
|
23
|
-
export declare const
|
|
23
|
+
export declare const inspectorQuickActionsSection: React.CSSProperties;
|
|
24
24
|
export declare const detailsBeforeInlineAction: React.CSSProperties;
|
|
25
25
|
export declare const guideDetailsContainer: React.CSSProperties;
|
|
26
26
|
export declare const detailRow: React.CSSProperties;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.keyframeEditorValue = exports.keyframeEditorRow = exports.detailValue = exports.detailLabel = exports.detailRow = exports.guideDetailsContainer = exports.detailsBeforeInlineAction = exports.
|
|
3
|
+
exports.keyframeEditorValue = exports.keyframeEditorRow = exports.detailValue = exports.detailLabel = exports.detailRow = exports.guideDetailsContainer = exports.detailsBeforeInlineAction = exports.inspectorQuickActionsSection = exports.detailsWithInlineAction = exports.detailsContainer = exports.centeredMessage = exports.selectedContainer = exports.resolveLinkStyle = exports.defaultPropsWarningMessages = exports.defaultPropsWarningContainer = exports.sectionHeaderEnd = exports.sectionHeaderStart = exports.sectionHeaderTitle = exports.sectionHeaderRow = exports.sequenceHeaderSubtitle = exports.inspectorSectionBody = exports.sectionHeader = exports.sequenceHeaderDivider = exports.inspectorSectionDivider = exports.inspectorOverviewSection = exports.compositionVisualControlsSection = exports.compositionDefaultPropsSection = exports.scrollableContainer = exports.container = void 0;
|
|
4
4
|
const colors_1 = require("../../helpers/colors");
|
|
5
5
|
const InspectorPanelLayout_1 = require("../InspectorPanelLayout");
|
|
6
6
|
exports.container = {
|
|
@@ -14,6 +14,7 @@ exports.container = {
|
|
|
14
14
|
};
|
|
15
15
|
exports.scrollableContainer = {
|
|
16
16
|
...exports.container,
|
|
17
|
+
overflowX: 'hidden',
|
|
17
18
|
overflowY: 'auto',
|
|
18
19
|
};
|
|
19
20
|
exports.compositionDefaultPropsSection = {
|
|
@@ -127,6 +128,7 @@ exports.selectedContainer = {
|
|
|
127
128
|
backgroundColor: colors_1.BACKGROUND,
|
|
128
129
|
flex: 1,
|
|
129
130
|
minHeight: 0,
|
|
131
|
+
overflowX: 'hidden',
|
|
130
132
|
overflowY: 'auto',
|
|
131
133
|
};
|
|
132
134
|
exports.centeredMessage = {
|
|
@@ -145,7 +147,7 @@ exports.detailsContainer = {
|
|
|
145
147
|
exports.detailsWithInlineAction = {
|
|
146
148
|
paddingBottom: InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING,
|
|
147
149
|
};
|
|
148
|
-
exports.
|
|
150
|
+
exports.inspectorQuickActionsSection = {
|
|
149
151
|
padding: '4px 0',
|
|
150
152
|
};
|
|
151
153
|
exports.detailsBeforeInlineAction = {
|
|
@@ -5,5 +5,5 @@ export declare const InspectorSourceLocation: React.FC<{
|
|
|
5
5
|
readonly canOpen: boolean;
|
|
6
6
|
readonly onOpen: () => void;
|
|
7
7
|
readonly renderIcon?: (color: string) => React.ReactNode;
|
|
8
|
-
readonly size?: 'default' | '
|
|
8
|
+
readonly size?: 'default' | 'quick-action';
|
|
9
9
|
}>;
|
|
@@ -81,8 +81,8 @@ const InspectorSourceLocation = ({ location, canOpen, onOpen, renderIcon, size =
|
|
|
81
81
|
if (!label) {
|
|
82
82
|
return null;
|
|
83
83
|
}
|
|
84
|
-
if (size === '
|
|
85
|
-
return (jsx_runtime_1.jsx(common_1.
|
|
84
|
+
if (size === 'quick-action') {
|
|
85
|
+
return (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: !canOpen, onClick: onClick, renderIcon: (iconColor) => renderIcon === null || renderIcon === void 0 ? void 0 : renderIcon(iconColor), size: "compact", title: fileLocation !== null && fileLocation !== void 0 ? fileLocation : undefined, children: label }));
|
|
86
86
|
}
|
|
87
87
|
return (jsx_runtime_1.jsxs("button", { type: "button", style: style, title: fileLocation !== null && fileLocation !== void 0 ? fileLocation : undefined, onClick: onClick, onPointerEnter: () => setHovered(true), onPointerLeave: () => setHovered(false), children: [renderIcon ? renderIcon(color) : null, jsx_runtime_1.jsx("span", { style: sourceLocationLabelStyle, children: label })
|
|
88
88
|
] }));
|
|
@@ -44,6 +44,7 @@ const ShortcutHint_1 = require("../error-overlay/remotion-overlay/ShortcutHint")
|
|
|
44
44
|
const client_id_1 = require("../helpers/client-id");
|
|
45
45
|
const colors_1 = require("../helpers/colors");
|
|
46
46
|
const use_keybinding_1 = require("../helpers/use-keybinding");
|
|
47
|
+
const modals_1 = require("../state/modals");
|
|
47
48
|
const Checkbox_1 = require("./Checkbox");
|
|
48
49
|
const InstallablePackage_1 = require("./InstallablePackage");
|
|
49
50
|
const layout_1 = require("./layout");
|
|
@@ -64,22 +65,46 @@ const InstallPackageModal = ({ packageManager }) => {
|
|
|
64
65
|
const [state, setState] = react_1.default.useState({ type: 'idle' });
|
|
65
66
|
const [map, setMap] = react_1.default.useState({});
|
|
66
67
|
const { previewServerState: ctx } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
68
|
+
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
67
69
|
const selectedPackages = Object.keys(map).filter((pkg) => map[pkg]);
|
|
70
|
+
const selectedPackageSpecs = selectedPackages.map((name) => {
|
|
71
|
+
var _a;
|
|
72
|
+
var _b;
|
|
73
|
+
return ({
|
|
74
|
+
name,
|
|
75
|
+
version: (_b = (_a = studio_shared_1.extraPackages.find((pkg) => pkg.name === name)) === null || _a === void 0 ? void 0 : _a.version) !== null && _b !== void 0 ? _b : null,
|
|
76
|
+
});
|
|
77
|
+
});
|
|
68
78
|
const onClick = (0, react_1.useCallback)(async () => {
|
|
79
|
+
var _a;
|
|
69
80
|
if (state.type === 'done') {
|
|
81
|
+
if (packageManager === null) {
|
|
82
|
+
setSelectedModal(null);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
70
85
|
setState({ type: 'restarting' });
|
|
71
86
|
(0, restart_studio_1.restartStudio)();
|
|
72
87
|
return;
|
|
73
88
|
}
|
|
74
89
|
setState({ type: 'installing' });
|
|
75
90
|
try {
|
|
76
|
-
await (0, install_package_1.installPackages)(
|
|
91
|
+
await (0, install_package_1.installPackages)(selectedPackageSpecs);
|
|
92
|
+
window.remotion_installedPackages = Array.from(new Set([
|
|
93
|
+
...((_a = window.remotion_installedPackages) !== null && _a !== void 0 ? _a : []),
|
|
94
|
+
...selectedPackages,
|
|
95
|
+
]));
|
|
77
96
|
setState({ type: 'done' });
|
|
78
97
|
}
|
|
79
98
|
catch (err) {
|
|
80
99
|
setState({ type: 'error', error: err });
|
|
81
100
|
}
|
|
82
|
-
}, [
|
|
101
|
+
}, [
|
|
102
|
+
packageManager,
|
|
103
|
+
selectedPackageSpecs,
|
|
104
|
+
selectedPackages,
|
|
105
|
+
setSelectedModal,
|
|
106
|
+
state.type,
|
|
107
|
+
]);
|
|
83
108
|
const canSelectPackages = state.type === 'idle' && ctx.type === 'connected';
|
|
84
109
|
const disabled = !(canSelectPackages || state.type === 'done') ||
|
|
85
110
|
selectedPackages.length === 0;
|
|
@@ -104,7 +129,11 @@ const InstallPackageModal = ({ packageManager }) => {
|
|
|
104
129
|
};
|
|
105
130
|
}, [disabled, onClick, registerKeybinding]);
|
|
106
131
|
return (jsx_runtime_1.jsxs(DismissableModal_1.DismissableModal, { children: [
|
|
107
|
-
jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: "Install packages" }), jsx_runtime_1.jsx("div", { style: container, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: state.type === 'done' ? (jsx_runtime_1.jsxs("div", { style: text, children: ["Installed package", selectedPackages.length === 1 ? '' : 's', ' ', "successfully.
|
|
132
|
+
jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: "Install packages" }), jsx_runtime_1.jsx("div", { style: container, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: state.type === 'done' ? (jsx_runtime_1.jsxs("div", { style: text, children: ["Installed package", selectedPackages.length === 1 ? '' : 's', ' ', "successfully.", packageManager === null
|
|
133
|
+
? null
|
|
134
|
+
: ' Restart the server to complete.'] })) : state.type === 'restarting' ? (jsx_runtime_1.jsx("div", { style: text, children: "Restarting the Studio server..." })) : state.type === 'installing' ? (jsx_runtime_1.jsxs("div", { style: text, children: ["Installing package", selectedPackages.length === 1 ? '' : 's', packageManager === null
|
|
135
|
+
? '.'
|
|
136
|
+
: '. Check your terminal for progress.'] })) : (jsx_runtime_1.jsxs("div", { style: text, children: [Object.entries(studio_shared_1.installableMap)
|
|
108
137
|
.filter(([, install]) => install)
|
|
109
138
|
.map(([pkgShort]) => {
|
|
110
139
|
var _a;
|
|
@@ -136,13 +165,16 @@ const InstallPackageModal = ({ packageManager }) => {
|
|
|
136
165
|
}));
|
|
137
166
|
}, disabled: !canSelectPackages || isInstalled }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1.5 }), jsx_runtime_1.jsx(InstallablePackage_1.InstallablePackageComp, { description: extraPkg.description, isInstalled: isInstalled, link: extraPkg.docsUrl, pkg: `${extraPkg.name}@${extraPkg.version}` })
|
|
138
167
|
] }, extraPkg.name));
|
|
139
|
-
})] })) }), jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { children: jsx_runtime_1.jsxs(layout_1.Row, { align: "center", children: [state.type === 'idle' ? (jsx_runtime_1.jsxs("span", { style: { color: colors_1.LIGHT_TEXT, fontSize: 13, lineHeight: 1.2 }, children: ["This will install ", selectedPackages.length, " package", selectedPackages.length === 1 ? '' : 's', jsx_runtime_1.jsx("br", {}),
|
|
140
|
-
|
|
168
|
+
})] })) }), jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { children: jsx_runtime_1.jsxs(layout_1.Row, { align: "center", children: [state.type === 'idle' ? (jsx_runtime_1.jsxs("span", { style: { color: colors_1.LIGHT_TEXT, fontSize: 13, lineHeight: 1.2 }, children: ["This will install ", selectedPackages.length, " package", selectedPackages.length === 1 ? '' : 's', jsx_runtime_1.jsx("br", {}), packageManager === null
|
|
169
|
+
? `in this project, Remotion v${remotion_1.VERSION}`
|
|
170
|
+
: `using ${packageManager}, Remotion v${remotion_1.VERSION}`] })) : null, jsx_runtime_1.jsx(layout_1.Flex, {}), jsx_runtime_1.jsxs(ModalButton_1.ModalButton, { onClick: onClick, disabled: disabled, children: [state.type === 'restarting'
|
|
141
171
|
? 'Restarting...'
|
|
142
172
|
: state.type === 'installing'
|
|
143
173
|
? 'Installing...'
|
|
144
174
|
: state.type === 'done'
|
|
145
|
-
?
|
|
175
|
+
? packageManager === null
|
|
176
|
+
? 'Done'
|
|
177
|
+
: 'Restart Server'
|
|
146
178
|
: 'Install', disabled ? null : jsx_runtime_1.jsx(ShortcutHint_1.ShortcutHint, { keyToPress: "\u21B5", cmdOrCtrl: true })] })
|
|
147
179
|
] }) })
|
|
148
180
|
] }));
|
|
@@ -102,9 +102,9 @@ const LicenseKeyDetailsDisplay = ({ details }) => {
|
|
|
102
102
|
const projectUrl = `${PRO_HOST}/projects/${details.projectSlug}`;
|
|
103
103
|
const usageUrl = `${projectUrl}/usage#client-renders-usage`;
|
|
104
104
|
const hasActiveLicense = (0, exports.hasActiveCompanyLicense)(details);
|
|
105
|
-
return (jsx_runtime_1.jsxs("div", { children: [jsx_runtime_1.jsx(common_1.
|
|
105
|
+
return (jsx_runtime_1.jsxs("div", { children: [jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: false, onClick: () => window.open(usageUrl, '_blank', 'noopener,noreferrer'), renderIcon: (color) => (jsx_runtime_1.jsx(check_circle_filled_1.CheckCircleFilled, { style: { ...iconStyle, fill: color } })), style: actionStyle, title: "View license usage", children: jsx_runtime_1.jsxs("span", { style: actionContent, children: [
|
|
106
106
|
jsx_runtime_1.jsxs("span", { style: actionText, children: ["Belongs to ", details.projectName] }), jsx_runtime_1.jsx("span", { style: actionLabel, children: "View usage" })
|
|
107
|
-
] }) }), jsx_runtime_1.jsx(common_1.
|
|
107
|
+
] }) }), jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: false, onClick: () => window.open(projectUrl, '_blank', 'noopener,noreferrer'), renderIcon: (color) => hasActiveLicense ? (jsx_runtime_1.jsx(check_circle_filled_1.CheckCircleFilled, { style: { ...iconStyle, fill: color } })) : (jsx_runtime_1.jsx(ErrorIcon, {})), style: actionStyle, title: "Manage Company License", children: jsx_runtime_1.jsxs("span", { style: actionContent, children: [
|
|
108
108
|
jsx_runtime_1.jsx("span", { style: hasActiveLicense ? actionText : inactiveLicenseText, children: hasActiveLicense
|
|
109
109
|
? 'Active Company License'
|
|
110
110
|
: 'No active Company License' }), jsx_runtime_1.jsx("span", { style: actionLabel, children: "Manage" })
|
|
@@ -10,6 +10,6 @@ const menuDivider = {
|
|
|
10
10
|
backgroundColor: colors_1.WHITE_ALPHA_05,
|
|
11
11
|
};
|
|
12
12
|
const MenuDivider = () => {
|
|
13
|
-
return jsx_runtime_1.jsx("div", { style: menuDivider });
|
|
13
|
+
return jsx_runtime_1.jsx("div", { role: "separator", style: menuDivider });
|
|
14
14
|
};
|
|
15
15
|
exports.MenuDivider = MenuDivider;
|
|
@@ -6,12 +6,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.Modals = void 0;
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const react_1 = require("react");
|
|
9
|
+
const browser_studio_operations_1 = require("../helpers/browser-studio-operations");
|
|
9
10
|
const client_id_1 = require("../helpers/client-id");
|
|
10
11
|
const studio_runtime_config_1 = require("../helpers/studio-runtime-config");
|
|
11
12
|
const modals_1 = require("../state/modals");
|
|
12
13
|
const AskAiModal_1 = require("./AskAiModal");
|
|
13
14
|
const ConfirmationDialog_1 = require("./ConfirmationDialog");
|
|
14
15
|
const EffectPickerModal_1 = require("./EffectPickerModal");
|
|
16
|
+
const FixComputedValueModal_1 = require("./FixComputedValueModal");
|
|
15
17
|
const InstallPackage_1 = require("./InstallPackage");
|
|
16
18
|
const DeleteComposition_1 = require("./NewComposition/DeleteComposition");
|
|
17
19
|
const DeleteFolder_1 = require("./NewComposition/DeleteFolder");
|
|
@@ -35,7 +37,11 @@ const Modals = ({ readOnlyStudio }) => {
|
|
|
35
37
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
36
38
|
const { previewServerState, subscribeToEvent } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
37
39
|
const canRender = previewServerState.type === 'connected';
|
|
40
|
+
const isBrowserStudio = (0, browser_studio_operations_1.getBrowserStudioOperations)() !== null;
|
|
38
41
|
(0, react_1.useEffect)(() => {
|
|
42
|
+
if (isBrowserStudio) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
39
45
|
return subscribeToEvent('license-key-install-request', (event) => {
|
|
40
46
|
if (event.type !== 'license-key-install-request') {
|
|
41
47
|
return;
|
|
@@ -46,9 +52,11 @@ const Modals = ({ readOnlyStudio }) => {
|
|
|
46
52
|
initialPublicLicenseKey: event.licenseKey,
|
|
47
53
|
});
|
|
48
54
|
});
|
|
49
|
-
}, [setSelectedModal, subscribeToEvent]);
|
|
50
|
-
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [modalContextType && modalContextType.type === 'new-comp' && (jsx_runtime_1.jsx(NewComposition_1.NewComposition, { folderName: modalContextType.folderName, parentName: modalContextType.parentName, stack: modalContextType.stack, canvasCapture: modalContextType.canvasCapture })), modalContextType && modalContextType.type === 'new-folder' && (jsx_runtime_1.jsx(NewFolder_1.NewFolder, { parentName: modalContextType.parentName, stack: modalContextType.stack })), modalContextType && modalContextType.type === 'duplicate-comp' && (jsx_runtime_1.jsx(DuplicateComposition_1.DuplicateComposition, { compositionType: modalContextType.compositionType, compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'delete-comp' && (jsx_runtime_1.jsx(DeleteComposition_1.DeleteComposition, { compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'rename-comp' && (jsx_runtime_1.jsx(RenameComposition_1.RenameComposition, { compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'delete-folder' && (jsx_runtime_1.jsx(DeleteFolder_1.DeleteFolder, { folderName: modalContextType.folderName, parentName: modalContextType.parentName, stack: modalContextType.stack })), modalContextType && modalContextType.type === 'rename-folder' && (jsx_runtime_1.jsx(RenameFolder_1.RenameFolder, { folderName: modalContextType.folderName, parentName: modalContextType.parentName, stack: modalContextType.stack })), modalContextType && modalContextType.type === 'rename-static-file' && (jsx_runtime_1.jsx(RenameStaticFile_1.RenameStaticFileModal, { relativePath: modalContextType.relativePath })), modalContextType && modalContextType.type === 'input-props-override' && (jsx_runtime_1.jsx(OverrideInputProps_1.OverrideInputPropsModal, {})),
|
|
55
|
+
}, [isBrowserStudio, setSelectedModal, subscribeToEvent]);
|
|
56
|
+
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [modalContextType && modalContextType.type === 'new-comp' && (jsx_runtime_1.jsx(NewComposition_1.NewComposition, { folderName: modalContextType.folderName, parentName: modalContextType.parentName, stack: modalContextType.stack, canvasCapture: modalContextType.canvasCapture })), modalContextType && modalContextType.type === 'new-folder' && (jsx_runtime_1.jsx(NewFolder_1.NewFolder, { parentName: modalContextType.parentName, stack: modalContextType.stack })), modalContextType && modalContextType.type === 'duplicate-comp' && (jsx_runtime_1.jsx(DuplicateComposition_1.DuplicateComposition, { compositionType: modalContextType.compositionType, compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'delete-comp' && (jsx_runtime_1.jsx(DeleteComposition_1.DeleteComposition, { compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'rename-comp' && (jsx_runtime_1.jsx(RenameComposition_1.RenameComposition, { compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'delete-folder' && (jsx_runtime_1.jsx(DeleteFolder_1.DeleteFolder, { folderName: modalContextType.folderName, parentName: modalContextType.parentName, stack: modalContextType.stack })), modalContextType && modalContextType.type === 'rename-folder' && (jsx_runtime_1.jsx(RenameFolder_1.RenameFolder, { folderName: modalContextType.folderName, parentName: modalContextType.parentName, stack: modalContextType.stack })), modalContextType && modalContextType.type === 'rename-static-file' && (jsx_runtime_1.jsx(RenameStaticFile_1.RenameStaticFileModal, { relativePath: modalContextType.relativePath })), modalContextType && modalContextType.type === 'input-props-override' && (jsx_runtime_1.jsx(OverrideInputProps_1.OverrideInputPropsModal, {})), !isBrowserStudio &&
|
|
57
|
+
modalContextType &&
|
|
58
|
+
modalContextType.type === 'settings' && (jsx_runtime_1.jsx(SettingsModal_1.SettingsModal, { initialTab: modalContextType.initialTab, initialPublicLicenseKey: modalContextType.initialPublicLicenseKey }, `${modalContextType.initialTab}-${modalContextType.initialPublicLicenseKey}`)), modalContextType && modalContextType.type === 'web-render' && (jsx_runtime_1.jsx(WebRenderModal_1.WebRenderModalWithLoader, { ...modalContextType })), modalContextType &&
|
|
51
59
|
modalContextType.type === 'server-render' &&
|
|
52
|
-
(canRender || modalContextType.readOnlyStudio) ? (jsx_runtime_1.jsx(ServerRenderModal_1.RenderModalWithLoader, { readOnlyStudio: (_a = modalContextType.readOnlyStudio) !== null && _a !== void 0 ? _a : false, initialFrame: modalContextType.initialFrame, initialDarkMode: modalContextType.initialDarkMode, compositionId: modalContextType.compositionId, initialVideoImageFormat: modalContextType.initialVideoImageFormat, initialJpegQuality: modalContextType.initialJpegQuality, initialScale: modalContextType.initialScale, initialLogLevel: modalContextType.initialLogLevel, initialOffthreadVideoCacheSizeInBytes: modalContextType.initialOffthreadVideoCacheSizeInBytes, initialOffthreadVideoThreads: modalContextType.initialOffthreadVideoThreads, initialMediaCacheSizeInBytes: modalContextType.initialMediaCacheSizeInBytes, initialConcurrency: modalContextType.initialConcurrency, maxConcurrency: modalContextType.maxConcurrency, minConcurrency: modalContextType.minConcurrency, initialStillImageFormat: modalContextType.initialStillImageFormat, initialMuted: modalContextType.initialMuted, initialEnforceAudioTrack: modalContextType.initialEnforceAudioTrack, initialProResProfile: modalContextType.initialProResProfile, initialx264Preset: modalContextType.initialx264Preset, initialGopSize: modalContextType.initialGopSize, initialPixelFormat: modalContextType.initialPixelFormat, initialAudioBitrate: modalContextType.initialAudioBitrate, initialVideoBitrate: modalContextType.initialVideoBitrate, initialEveryNthFrame: modalContextType.initialEveryNthFrame, initialNumberOfGifLoops: modalContextType.initialNumberOfGifLoops, initialDelayRenderTimeout: modalContextType.initialDelayRenderTimeout, initialEnvVariables: modalContextType.initialEnvVariables, initialDisableWebSecurity: modalContextType.initialDisableWebSecurity, initialGl: modalContextType.initialOpenGlRenderer, initialHeadless: modalContextType.initialHeadless, initialIgnoreCertificateErrors: modalContextType.initialIgnoreCertificateErrors, initialEncodingBufferSize: modalContextType.initialEncodingBufferSize, initialEncodingMaxRate: modalContextType.initialEncodingMaxRate, initialUserAgent: modalContextType.initialUserAgent, initialColorSpace: modalContextType.initialColorSpace, initialMultiProcessOnLinux: modalContextType.initialMultiProcessOnLinux, initialRepro: modalContextType.initialRepro, initialBeep: modalContextType.initialBeep, initialForSeamlessAacConcatenation: modalContextType.initialForSeamlessAacConcatenation, defaultProps: modalContextType.defaultProps, inFrameMark: modalContextType.inFrameMark, outFrameMark: modalContextType.outFrameMark, defaultConfigurationAudioCodec: modalContextType.defaultConfigurationAudioCodec, defaultConfigurationVideoCodec: modalContextType.defaultConfigurationVideoCodec, renderTypeOfLastRender: modalContextType.renderTypeOfLastRender, defaultMetadata: modalContextType.defaulMetadata, initialHardwareAcceleration: modalContextType.initialHardwareAcceleration, initialSampleRate: modalContextType.initialSampleRate, initialChromeMode: modalContextType.initialChromeMode, renderDefaults: modalContextType.renderDefaults })) : null, modalContextType && modalContextType.type === 'render-progress' && (jsx_runtime_1.jsx(RenderStatusModal_1.RenderStatusModal, { jobId: modalContextType.jobId })), modalContextType && modalContextType.type === 'update' && (jsx_runtime_1.jsx(UpdateModal_1.UpdateModal, { info: modalContextType.info, knownBugs: modalContextType.knownBugs })), modalContextType && modalContextType.type === 'install-packages' && (jsx_runtime_1.jsx(InstallPackage_1.InstallPackageModal, { packageManager: modalContextType.packageManager })), modalContextType && modalContextType.type === 'quick-switcher' && (jsx_runtime_1.jsx(QuickSwitcher_1.default, { readOnlyStudio: readOnlyStudio, invocationTimestamp: modalContextType.invocationTimestamp, initialMode: modalContextType.mode, assetSelection: modalContextType.assetSelection, compositionSelection: modalContextType.compositionSelection })), modalContextType && modalContextType.type === 'add-effect' && (jsx_runtime_1.jsx(EffectPickerModal_1.EffectPickerModal, { state: modalContextType })), modalContextType && modalContextType.type === 'confirmation-dialog' && (jsx_runtime_1.jsx(ConfirmationDialog_1.ConfirmationDialog, { state: modalContextType })), modalContextType && modalContextType.type === 'svg-import-dialog' && (jsx_runtime_1.jsx(SvgImportDialog_1.SvgImportDialog, { state: modalContextType })), (0, studio_runtime_config_1.getStudioAskAIEnabled)() && jsx_runtime_1.jsx(AskAiModal_1.AskAiModal, {})] }));
|
|
60
|
+
(canRender || modalContextType.readOnlyStudio) ? (jsx_runtime_1.jsx(ServerRenderModal_1.RenderModalWithLoader, { readOnlyStudio: (_a = modalContextType.readOnlyStudio) !== null && _a !== void 0 ? _a : false, initialFrame: modalContextType.initialFrame, initialDarkMode: modalContextType.initialDarkMode, compositionId: modalContextType.compositionId, initialVideoImageFormat: modalContextType.initialVideoImageFormat, initialJpegQuality: modalContextType.initialJpegQuality, initialScale: modalContextType.initialScale, initialLogLevel: modalContextType.initialLogLevel, initialOffthreadVideoCacheSizeInBytes: modalContextType.initialOffthreadVideoCacheSizeInBytes, initialOffthreadVideoThreads: modalContextType.initialOffthreadVideoThreads, initialMediaCacheSizeInBytes: modalContextType.initialMediaCacheSizeInBytes, initialConcurrency: modalContextType.initialConcurrency, maxConcurrency: modalContextType.maxConcurrency, minConcurrency: modalContextType.minConcurrency, initialStillImageFormat: modalContextType.initialStillImageFormat, initialMuted: modalContextType.initialMuted, initialEnforceAudioTrack: modalContextType.initialEnforceAudioTrack, initialProResProfile: modalContextType.initialProResProfile, initialx264Preset: modalContextType.initialx264Preset, initialGopSize: modalContextType.initialGopSize, initialPixelFormat: modalContextType.initialPixelFormat, initialAudioBitrate: modalContextType.initialAudioBitrate, initialVideoBitrate: modalContextType.initialVideoBitrate, initialEveryNthFrame: modalContextType.initialEveryNthFrame, initialNumberOfGifLoops: modalContextType.initialNumberOfGifLoops, initialDelayRenderTimeout: modalContextType.initialDelayRenderTimeout, initialEnvVariables: modalContextType.initialEnvVariables, initialDisableWebSecurity: modalContextType.initialDisableWebSecurity, initialGl: modalContextType.initialOpenGlRenderer, initialHeadless: modalContextType.initialHeadless, initialIgnoreCertificateErrors: modalContextType.initialIgnoreCertificateErrors, initialEncodingBufferSize: modalContextType.initialEncodingBufferSize, initialEncodingMaxRate: modalContextType.initialEncodingMaxRate, initialUserAgent: modalContextType.initialUserAgent, initialColorSpace: modalContextType.initialColorSpace, initialMultiProcessOnLinux: modalContextType.initialMultiProcessOnLinux, initialRepro: modalContextType.initialRepro, initialBeep: modalContextType.initialBeep, initialForSeamlessAacConcatenation: modalContextType.initialForSeamlessAacConcatenation, defaultProps: modalContextType.defaultProps, inFrameMark: modalContextType.inFrameMark, outFrameMark: modalContextType.outFrameMark, defaultConfigurationAudioCodec: modalContextType.defaultConfigurationAudioCodec, defaultConfigurationVideoCodec: modalContextType.defaultConfigurationVideoCodec, renderTypeOfLastRender: modalContextType.renderTypeOfLastRender, defaultMetadata: modalContextType.defaulMetadata, initialHardwareAcceleration: modalContextType.initialHardwareAcceleration, initialSampleRate: modalContextType.initialSampleRate, initialChromeMode: modalContextType.initialChromeMode, renderDefaults: modalContextType.renderDefaults })) : null, modalContextType && modalContextType.type === 'render-progress' && (jsx_runtime_1.jsx(RenderStatusModal_1.RenderStatusModal, { jobId: modalContextType.jobId })), modalContextType && modalContextType.type === 'update' && (jsx_runtime_1.jsx(UpdateModal_1.UpdateModal, { info: modalContextType.info, knownBugs: modalContextType.knownBugs })), modalContextType && modalContextType.type === 'fix-computed-value' && (jsx_runtime_1.jsx(FixComputedValueModal_1.FixComputedValueModal, { state: modalContextType })), modalContextType && modalContextType.type === 'install-packages' && (jsx_runtime_1.jsx(InstallPackage_1.InstallPackageModal, { packageManager: modalContextType.packageManager })), modalContextType && modalContextType.type === 'quick-switcher' && (jsx_runtime_1.jsx(QuickSwitcher_1.default, { readOnlyStudio: readOnlyStudio, invocationTimestamp: modalContextType.invocationTimestamp, initialMode: modalContextType.mode, assetSelection: modalContextType.assetSelection, compositionSelection: modalContextType.compositionSelection })), modalContextType && modalContextType.type === 'add-effect' && (jsx_runtime_1.jsx(EffectPickerModal_1.EffectPickerModal, { state: modalContextType })), modalContextType && modalContextType.type === 'confirmation-dialog' && (jsx_runtime_1.jsx(ConfirmationDialog_1.ConfirmationDialog, { state: modalContextType })), modalContextType && modalContextType.type === 'svg-import-dialog' && (jsx_runtime_1.jsx(SvgImportDialog_1.SvgImportDialog, { state: modalContextType })), (0, studio_runtime_config_1.getStudioAskAIEnabled)() && jsx_runtime_1.jsx(AskAiModal_1.AskAiModal, {})] }));
|
|
53
61
|
};
|
|
54
62
|
exports.Modals = Modals;
|
|
@@ -21,7 +21,7 @@ const CodemodFooterPresentation = ({ codemodStatus, disabled, genericSubmitLabel
|
|
|
21
21
|
] })
|
|
22
22
|
] }));
|
|
23
23
|
};
|
|
24
|
-
const CodemodFooter = ({ codemod, stack, valid, loadingNotification, successNotification, errorNotification, genericSubmitLabel, submitLabel, onSuccess, fallbackToRootFile = false, applyCodemod, }) => {
|
|
24
|
+
const CodemodFooter = ({ codemod, stack, valid, loadingNotification, successNotification, errorNotification, genericSubmitLabel, submitLabel, onSuccess, fallbackToRootFile = false, applyCodemod, applyCodemodForPreview, }) => {
|
|
25
25
|
var _a;
|
|
26
26
|
const [submitting, setSubmitting] = (0, react_1.useState)(false);
|
|
27
27
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
@@ -79,12 +79,14 @@ const CodemodFooter = ({ codemod, stack, valid, loadingNotification, successNoti
|
|
|
79
79
|
symbolicatedStack,
|
|
80
80
|
]);
|
|
81
81
|
const getCanApplyCodemod = (0, react_1.useCallback)(async (signal) => {
|
|
82
|
-
const res =
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
82
|
+
const res = applyCodemodForPreview
|
|
83
|
+
? await applyCodemodForPreview({ signal, symbolicatedStack })
|
|
84
|
+
: await (0, actions_1.applyCodemod)({
|
|
85
|
+
codemod,
|
|
86
|
+
dryRun: true,
|
|
87
|
+
symbolicatedStack,
|
|
88
|
+
signal,
|
|
89
|
+
});
|
|
88
90
|
if (res.success) {
|
|
89
91
|
setCanApplyCodemod({ type: 'success', diff: res.diff });
|
|
90
92
|
}
|
|
@@ -94,7 +96,7 @@ const CodemodFooter = ({ codemod, stack, valid, loadingNotification, successNoti
|
|
|
94
96
|
error: res.reason,
|
|
95
97
|
});
|
|
96
98
|
}
|
|
97
|
-
}, [codemod, symbolicatedStack]);
|
|
99
|
+
}, [applyCodemodForPreview, codemod, symbolicatedStack]);
|
|
98
100
|
(0, react_1.useEffect)(() => {
|
|
99
101
|
if (!stack) {
|
|
100
102
|
if (fallbackToRootFile) {
|
|
@@ -11,10 +11,10 @@ const ModalFooter_1 = require("../ModalFooter");
|
|
|
11
11
|
const ModalHeader_1 = require("../ModalHeader");
|
|
12
12
|
const layout_2 = require("../RenderModal/layout");
|
|
13
13
|
const ResolveCompositionBeforeModal_1 = require("../RenderModal/ResolveCompositionBeforeModal");
|
|
14
|
-
const actions_1 = require("../RenderQueue/actions");
|
|
15
14
|
const CodemodFooter_1 = require("./CodemodFooter");
|
|
16
15
|
const ComboBox_1 = require("./ComboBox");
|
|
17
16
|
const DismissableModal_1 = require("./DismissableModal");
|
|
17
|
+
const duplicate_composition_api_1 = require("./duplicate-composition-api");
|
|
18
18
|
const InputAndValidationContainer_1 = require("./InputAndValidationContainer");
|
|
19
19
|
const InputDragger_1 = require("./InputDragger");
|
|
20
20
|
const NewCompDuration_1 = require("./NewCompDuration");
|
|
@@ -203,11 +203,16 @@ const DuplicateCompositionLoaded = ({ initialType }) => {
|
|
|
203
203
|
] })
|
|
204
204
|
] })) : null, type === 'composition' && hadDurationDefined ? (jsx_runtime_1.jsx(NewCompDuration_1.NewCompDuration, { durationInFrames: durationInFrames, setDurationInFrames: setDurationInFrames })) : null, type === 'composition' && hadFpsDefined ? (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
205
205
|
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "FPS" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: selectedFrameRate, onTextChange: onTextFpsChange, placeholder: "Frame rate (fps)", name: "fps", min: 1, required: true, status: "ok", max: 240, step: 0.01, onValueChange: onFpsChange, rightAlign: false }) })
|
|
206
|
-
] })) : null] }), jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { children: jsx_runtime_1.jsx(CodemodFooter_1.CodemodFooter, { loadingNotification: 'Duplicating...', errorNotification: 'Could not duplicate composition', successNotification: `Duplicated ${unresolved.id} as ${newId}`, genericSubmitLabel: 'Duplicate', submitLabel: ({ relativeRootPath }) => `Add to ${relativeRootPath}`, codemod: codemod, stack: compositionStack, valid: valid, onSuccess: onDuplicateSuccess, applyCodemod: ({ signal, symbolicatedStack }) => (0,
|
|
206
|
+
] })) : null] }), jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { children: jsx_runtime_1.jsx(CodemodFooter_1.CodemodFooter, { loadingNotification: 'Duplicating...', errorNotification: 'Could not duplicate composition', successNotification: `Duplicated ${unresolved.id} as ${newId}`, genericSubmitLabel: 'Duplicate', submitLabel: ({ relativeRootPath }) => `Add to ${relativeRootPath}`, codemod: codemod, stack: compositionStack, valid: valid, onSuccess: onDuplicateSuccess, applyCodemod: ({ signal, symbolicatedStack }) => (0, duplicate_composition_api_1.duplicateComposition)({
|
|
207
207
|
codemod,
|
|
208
208
|
dryRun: false,
|
|
209
209
|
signal,
|
|
210
210
|
symbolicatedStack,
|
|
211
|
+
}), applyCodemodForPreview: ({ signal, symbolicatedStack }) => (0, duplicate_composition_api_1.duplicateComposition)({
|
|
212
|
+
codemod,
|
|
213
|
+
dryRun: true,
|
|
214
|
+
signal,
|
|
215
|
+
symbolicatedStack,
|
|
211
216
|
}) }) })
|
|
212
217
|
] })
|
|
213
218
|
] }));
|
|
@@ -160,7 +160,7 @@ const NewCompositionLoaded = ({ canvasCapture, folderName, parentName, stack })
|
|
|
160
160
|
] }), jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { children: jsx_runtime_1.jsx(CodemodFooter_1.CodemodFooter, { loadingNotification: null, errorNotification: "Could not create composition", successNotification: `Created ${newId}`, genericSubmitLabel: "Add to root file", submitLabel: ({ relativeRootPath }) => `Add to ${relativeRootPath}`, codemod: codemod, stack: stack, valid: valid, onSuccess: null, applyCodemod: ({ signal, symbolicatedStack }) => createCanvasCaptureComposition({
|
|
161
161
|
signal,
|
|
162
162
|
symbolicatedStack,
|
|
163
|
-
}), fallbackToRootFile: true }) })
|
|
163
|
+
}), applyCodemodForPreview: null, fallbackToRootFile: true }) })
|
|
164
164
|
] })
|
|
165
165
|
] }));
|
|
166
166
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DuplicateCompositionResponse, SymbolicatedStackFrame } from '@remotion/studio-shared';
|
|
2
|
+
export declare const duplicateComposition: ({ codemod, dryRun, signal, symbolicatedStack, }: {
|
|
3
|
+
codemod: {
|
|
4
|
+
type: "duplicate-composition";
|
|
5
|
+
idToDuplicate: string;
|
|
6
|
+
newId: string;
|
|
7
|
+
newHeight: number | null;
|
|
8
|
+
newWidth: number | null;
|
|
9
|
+
newFps: number | null;
|
|
10
|
+
newDurationInFrames: number | null;
|
|
11
|
+
tag: "Composition" | "Still";
|
|
12
|
+
};
|
|
13
|
+
dryRun: boolean;
|
|
14
|
+
signal: AbortSignal;
|
|
15
|
+
symbolicatedStack: SymbolicatedStackFrame | null;
|
|
16
|
+
}) => Promise<DuplicateCompositionResponse>;
|