@remotion/studio 4.0.503 → 4.0.505
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/api/install-package.d.ts +2 -1
- package/dist/api/install-package.js +6 -2
- package/dist/components/AssetSelectorItem.js +4 -16
- package/dist/components/AudioWaveform.d.ts +1 -1
- package/dist/components/AudioWaveform.js +36 -3
- package/dist/components/Canvas.js +12 -5
- package/dist/components/CheckboardToggle.js +3 -1
- package/dist/components/CompositionContextButton.d.ts +1 -1
- package/dist/components/CompositionContextButton.js +2 -2
- package/dist/components/CompositionSelector.js +2 -2
- package/dist/components/CompositionSelectorItem.js +6 -7
- package/dist/components/ContextMenu.d.ts +5 -7
- package/dist/components/ContextMenu.js +54 -21
- package/dist/components/ControlButton.d.ts +4 -2
- package/dist/components/ControlButton.js +6 -20
- package/dist/components/EditorContent.js +1 -1
- package/dist/components/EditorGuides/Guide.js +2 -2
- package/dist/components/EffectPickerModal.js +70 -9
- package/dist/components/FullscreenToggle.js +1 -2
- package/dist/components/InitialCompositionLoader.js +1 -14
- package/dist/components/InlineAction.d.ts +3 -4
- package/dist/components/InlineAction.js +16 -13
- package/dist/components/InlineDropdown.d.ts +3 -2
- package/dist/components/InlineDropdown.js +16 -5
- package/dist/components/InspectorPanel/CompositionMetadata.js +7 -6
- package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +2 -2
- package/dist/components/InspectorPanel/KeyframeInspector.js +2 -3
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +1 -1
- package/dist/components/InspectorPanel/common.js +24 -34
- package/dist/components/InspectorPanel/styles.js +4 -0
- package/dist/components/InspectorSequenceSection.js +1 -1
- package/dist/components/LoopToggle.js +1 -1
- package/dist/components/Menu/MenuItem.js +16 -12
- package/dist/components/MenuBuildIndicator.d.ts +3 -1
- package/dist/components/MenuBuildIndicator.js +14 -59
- package/dist/components/MenuCompositionName.js +3 -63
- package/dist/components/MenuToolbar.js +23 -3
- package/dist/components/MobilePanel.d.ts +1 -2
- package/dist/components/MobilePanel.js +6 -10
- package/dist/components/MuteToggle.js +2 -1
- package/dist/components/NewComposition/ComboBox.d.ts +1 -0
- package/dist/components/NewComposition/ComboBox.js +2 -2
- package/dist/components/NewComposition/InputDragger.d.ts +5 -0
- package/dist/components/NewComposition/InputDragger.js +11 -6
- package/dist/components/NewComposition/MenuContent.d.ts +1 -1
- package/dist/components/NewComposition/menu-typeahead.d.ts +1 -1
- package/dist/components/Notifications/NotificationCenter.js +12 -2
- package/dist/components/OutlineToggle.js +10 -2
- package/dist/components/PlayPause.js +2 -6
- package/dist/components/PlaybackRateSelector.js +4 -9
- package/dist/components/PreviewToolbar.js +12 -8
- package/dist/components/PreviewToolbarOverflowButton.d.ts +0 -1
- package/dist/components/PreviewToolbarOverflowButton.js +2 -75
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -2
- package/dist/components/RenderButton.d.ts +1 -1
- package/dist/components/RenderButton.js +55 -37
- package/dist/components/RenderModal/FrameRangeSetting.js +6 -1
- package/dist/components/RenderModal/MultiRangeSlider.js +8 -8
- package/dist/components/RenderModal/RenderModalEnvironmentVariables.js +1 -9
- package/dist/components/RenderModal/RenderModalOutputName.js +11 -2
- package/dist/components/RenderModal/ServerRenderModal.js +2 -17
- package/dist/components/RenderModal/WebRenderModal.js +3 -17
- package/dist/components/RenderModal/layout.js +7 -5
- package/dist/components/RenderModal/render-modals.js +18 -15
- package/dist/components/RenderQueue/RenderQueueRepeat.js +1 -14
- package/dist/components/SelectedOutlineElement.js +13 -22
- package/dist/components/SelectedOutlineOverlay.js +5 -1
- package/dist/components/SidebarRenderButton.js +1 -15
- package/dist/components/SizeSelector.js +4 -9
- package/dist/components/SnappingToggle.js +1 -2
- package/dist/components/Spinner.d.ts +1 -0
- package/dist/components/Spinner.js +2 -2
- package/dist/components/Splitter/SplitterContainer.d.ts +1 -0
- package/dist/components/Splitter/SplitterContainer.js +4 -1
- package/dist/components/Splitter/SplitterContext.d.ts +4 -3
- package/dist/components/Splitter/SplitterContext.js +3 -2
- package/dist/components/Splitter/SplitterElement.js +6 -1
- package/dist/components/Splitter/SplitterHandle.js +1 -0
- package/dist/components/Tabs/vertical.d.ts +1 -0
- package/dist/components/Tabs/vertical.js +8 -10
- package/dist/components/TimeValue.js +26 -8
- package/dist/components/Timeline/Timeline.js +5 -5
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +3 -6
- package/dist/components/Timeline/TimelineDeleteKeybindings.js +5 -7
- package/dist/components/Timeline/TimelineDragHandler.js +3 -0
- package/dist/components/Timeline/TimelineEffectItem.js +6 -2
- package/dist/components/Timeline/TimelineEffectPropItem.js +6 -3
- package/dist/components/Timeline/TimelineExpandedKeyframeRow.d.ts +6 -6
- package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +34 -2
- package/dist/components/Timeline/TimelineHeightContainer.d.ts +1 -0
- package/dist/components/Timeline/TimelineHeightContainer.js +2 -2
- package/dist/components/Timeline/TimelineInOutDragHandler.js +3 -3
- package/dist/components/Timeline/TimelineKeyframeEasingLine.d.ts +5 -3
- package/dist/components/Timeline/TimelineKeyframeEasingLine.js +32 -30
- package/dist/components/Timeline/TimelineList.d.ts +1 -0
- package/dist/components/Timeline/TimelineList.js +2 -3
- package/dist/components/Timeline/TimelineScaleField.js +1 -1
- package/dist/components/Timeline/TimelineSelection.js +2 -3
- package/dist/components/Timeline/TimelineSequence.js +34 -28
- package/dist/components/Timeline/TimelineSequenceItem.d.ts +3 -3
- package/dist/components/Timeline/TimelineSequenceItem.js +34 -23
- package/dist/components/Timeline/TimelineSequencePropItem.d.ts +10 -2
- package/dist/components/Timeline/TimelineSequencePropItem.js +64 -12
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +2 -2
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +38 -5
- package/dist/components/Timeline/TimelineTimeIndicators.js +36 -3
- package/dist/components/Timeline/TimelineVideoInfo.d.ts +1 -1
- package/dist/components/Timeline/TimelineVideoInfo.js +36 -3
- package/dist/components/Timeline/TimelineZoomControls.d.ts +3 -1
- package/dist/components/Timeline/TimelineZoomControls.js +59 -20
- package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +2 -3
- package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.d.ts +1 -1
- package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.js +7 -18
- package/dist/components/Timeline/use-timeline-asset-drop.js +3 -3
- package/dist/components/Timeline/use-timeline-height.d.ts +2 -1
- package/dist/components/Timeline/use-timeline-height.js +3 -2
- package/dist/components/TimelineCombobox.d.ts +11 -0
- package/dist/components/TimelineCombobox.js +181 -0
- package/dist/components/TimelineInOutToggle.js +3 -3
- package/dist/components/TopPanel.js +8 -8
- package/dist/components/UndoRedoButtons.js +6 -5
- package/dist/components/UpdateCheck.js +18 -5
- package/dist/components/UpdateModal/UpdateModal.js +35 -12
- package/dist/components/composition-menu-items.d.ts +2 -4
- package/dist/components/composition-menu-items.js +31 -54
- package/dist/components/import-assets.d.ts +2 -1
- package/dist/components/import-assets.js +1 -1
- package/dist/components/selected-outline-types.d.ts +1 -1
- package/dist/esm/{chunk-bj1r1hh5.js → chunk-7pgk8h5m.js} +9174 -8486
- package/dist/esm/internals.mjs +9174 -8486
- package/dist/esm/previewEntry.mjs +8991 -8303
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/hoverable.d.ts +11 -0
- package/dist/helpers/hoverable.js +70 -0
- package/dist/helpers/inject-css.js +43 -23
- package/dist/helpers/install-required-package.d.ts +3 -2
- package/dist/helpers/install-required-package.js +20 -15
- package/dist/helpers/use-is-fullscreen.d.ts +1 -0
- package/dist/helpers/use-is-fullscreen.js +25 -0
- package/dist/helpers/use-menu-structure.js +88 -59
- package/dist/icons/audio.d.ts +1 -1
- package/dist/icons/audio.js +1 -1
- package/dist/icons/canvas-zoom.d.ts +10 -0
- package/dist/icons/canvas-zoom.js +21 -0
- package/dist/icons/caret.js +1 -1
- package/dist/icons/certificate.d.ts +1 -1
- package/dist/icons/certificate.js +1 -1
- package/dist/icons/data.d.ts +1 -1
- package/dist/icons/data.js +2 -2
- package/dist/icons/effects.d.ts +5 -0
- package/dist/icons/effects.js +8 -0
- package/dist/icons/ellipsis.js +1 -1
- package/dist/icons/external-link.d.ts +5 -0
- package/dist/icons/external-link.js +10 -0
- package/dist/icons/fullscreen.js +1 -1
- package/dist/icons/gear.d.ts +1 -1
- package/dist/icons/gear.js +1 -1
- package/dist/icons/gif.d.ts +1 -1
- package/dist/icons/gif.js +1 -1
- package/dist/icons/input-props.d.ts +2 -0
- package/dist/icons/input-props.js +9 -0
- package/dist/icons/jump-to-start.js +2 -2
- package/dist/icons/magnet.d.ts +3 -1
- package/dist/icons/magnet.js +2 -2
- package/dist/icons/media-volume.d.ts +6 -2
- package/dist/icons/media-volume.js +8 -6
- package/dist/icons/minus.d.ts +3 -1
- package/dist/icons/minus.js +2 -2
- package/dist/icons/pause.js +1 -1
- package/dist/icons/play.js +1 -1
- package/dist/icons/playback-rate.d.ts +5 -0
- package/dist/icons/playback-rate.js +31 -0
- package/dist/icons/plus.js +1 -1
- package/dist/icons/redo.js +2 -2
- package/dist/icons/search.d.ts +5 -0
- package/dist/icons/search.js +10 -0
- package/dist/icons/step-back.js +2 -2
- package/dist/icons/step-forward.js +2 -2
- package/dist/icons/timelineInOutPointer.js +2 -2
- package/dist/icons/undo.js +2 -2
- package/package.json +12 -12
|
@@ -32,9 +32,6 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
32
32
|
return result;
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
-
};
|
|
38
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
36
|
exports.TopPanel = exports.useResponsiveSidebarStatus = void 0;
|
|
40
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
@@ -48,7 +45,6 @@ const CanvasIfSizeIsAvailable_1 = require("./CanvasIfSizeIsAvailable");
|
|
|
48
45
|
const CurrentCompositionSideEffects_1 = require("./CurrentCompositionSideEffects");
|
|
49
46
|
const use_is_ruler_visible_1 = require("./EditorRuler/use-is-ruler-visible");
|
|
50
47
|
const ExplorerPanel_1 = require("./ExplorerPanel");
|
|
51
|
-
const MobilePanel_1 = __importDefault(require("./MobilePanel"));
|
|
52
48
|
const ObserveDefaultPropsContext_1 = require("./ObserveDefaultPropsContext");
|
|
53
49
|
const OptionsPanel_1 = require("./OptionsPanel");
|
|
54
50
|
const PreviewToolbar_1 = require("./PreviewToolbar");
|
|
@@ -69,10 +65,15 @@ const row = {
|
|
|
69
65
|
minHeight: 0,
|
|
70
66
|
};
|
|
71
67
|
const MAX_SIDEBAR_WIDTH = 350;
|
|
68
|
+
const MIN_SIDEBAR_WIDTH = 250;
|
|
72
69
|
const useResponsiveSidebarStatus = () => {
|
|
73
70
|
const { sidebarCollapsedStateLeft } = (0, react_1.useContext)(sidebar_1.SidebarContext);
|
|
71
|
+
const isMobileLayout = (0, mobile_layout_1.useMobileLayout)();
|
|
74
72
|
const responsiveLeftStatus = (0, use_breakpoint_1.useBreakpoint)(1200) ? 'collapsed' : 'expanded';
|
|
75
73
|
const actualStateLeft = (0, react_1.useMemo)(() => {
|
|
74
|
+
if (isMobileLayout) {
|
|
75
|
+
return 'collapsed';
|
|
76
|
+
}
|
|
76
77
|
if (sidebarCollapsedStateLeft === 'collapsed') {
|
|
77
78
|
return 'collapsed';
|
|
78
79
|
}
|
|
@@ -80,7 +81,7 @@ const useResponsiveSidebarStatus = () => {
|
|
|
80
81
|
return 'expanded';
|
|
81
82
|
}
|
|
82
83
|
return responsiveLeftStatus;
|
|
83
|
-
}, [sidebarCollapsedStateLeft, responsiveLeftStatus]);
|
|
84
|
+
}, [isMobileLayout, sidebarCollapsedStateLeft, responsiveLeftStatus]);
|
|
84
85
|
return actualStateLeft;
|
|
85
86
|
};
|
|
86
87
|
exports.useResponsiveSidebarStatus = useResponsiveSidebarStatus;
|
|
@@ -110,12 +111,11 @@ const TopPanelInner = ({ readOnlyStudio, onMounted, drawRef, bufferStateDelayInM
|
|
|
110
111
|
const onCollapseRight = (0, react_1.useCallback)(() => {
|
|
111
112
|
setSidebarCollapsedState({ left: null, right: 'collapsed' });
|
|
112
113
|
}, [setSidebarCollapsedState]);
|
|
113
|
-
const isMobileLayout = (0, mobile_layout_1.useMobileLayout)();
|
|
114
114
|
return (jsx_runtime_1.jsx(ObserveDefaultPropsContext_1.ObserveDefaultProps, { compositionId: (canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) === 'composition'
|
|
115
115
|
? canvasContent.compositionId
|
|
116
116
|
: null, readOnlyStudio: readOnlyStudio, children: jsx_runtime_1.jsxs("div", { style: container, children: [
|
|
117
|
-
jsx_runtime_1.jsx("div", { style: row, children: jsx_runtime_1.jsxs(SplitterContainer_1.SplitterContainer, { minFlex: 0.15, maxFlex: 0.4, defaultFlex: 0.2, maxFlexerSize: MAX_SIDEBAR_WIDTH, minFlexerSize: null, maxAntiFlexerSize: null, id: "sidebar-to-preview", orientation: "vertical", children: [actualStateLeft === 'expanded' ? (
|
|
118
|
-
jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "flexer", children: jsx_runtime_1.jsx("div", { ref: drawRef, style: canvasContainerStyle, children: jsx_runtime_1.jsx(CanvasIfSizeIsAvailable_1.CanvasIfSizeIsAvailable, {}) }) }), actualStateRight === 'expanded'
|
|
117
|
+
jsx_runtime_1.jsx("div", { style: row, children: jsx_runtime_1.jsxs(SplitterContainer_1.SplitterContainer, { minFlex: 0.15, maxFlex: 0.4, defaultFlex: 0.2, maxFlexerSize: MAX_SIDEBAR_WIDTH, minFlexerSize: null, maxAntiFlexerSize: null, minAntiFlexerSize: null, id: "sidebar-to-preview", orientation: "vertical", children: [actualStateLeft === 'expanded' ? (jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "flexer", children: jsx_runtime_1.jsx(ExplorerPanel_1.ExplorerPanel, { readOnlyStudio: readOnlyStudio }) })) : null, actualStateLeft === 'expanded' ? (jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { allowToCollapse: "left", onCollapse: onCollapseLeft })) : null, jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "anti-flexer", children: jsx_runtime_1.jsxs(SplitterContainer_1.SplitterContainer, { minFlex: 0.5, maxFlex: 0.8, defaultFlex: 0.7, maxFlexerSize: null, minFlexerSize: null, maxAntiFlexerSize: MAX_SIDEBAR_WIDTH, minAntiFlexerSize: MIN_SIDEBAR_WIDTH, id: "canvas-to-right-sidebar", orientation: "vertical", children: [
|
|
118
|
+
jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "flexer", children: jsx_runtime_1.jsx("div", { ref: drawRef, style: canvasContainerStyle, children: jsx_runtime_1.jsx(CanvasIfSizeIsAvailable_1.CanvasIfSizeIsAvailable, {}) }) }), actualStateRight === 'expanded' ? (jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { allowToCollapse: "right", onCollapse: onCollapseRight })) : null, actualStateRight === 'expanded' ? (jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "anti-flexer", children: jsx_runtime_1.jsx(OptionsPanel_1.OptionsPanel, { readOnlyStudio: readOnlyStudio }) })) : null] }) })
|
|
119
119
|
] }) }), jsx_runtime_1.jsx(PreviewToolbar_1.PreviewToolbar, { bufferStateDelayInMilliseconds: bufferStateDelayInMilliseconds, readOnlyStudio: readOnlyStudio }), jsx_runtime_1.jsx(CurrentCompositionSideEffects_1.TitleUpdater, {})
|
|
120
120
|
] }) }));
|
|
121
121
|
};
|
|
@@ -6,6 +6,7 @@ const react_1 = require("react");
|
|
|
6
6
|
const ShortcutHint_1 = require("../error-overlay/remotion-overlay/ShortcutHint");
|
|
7
7
|
const browser_studio_operations_1 = require("../helpers/browser-studio-operations");
|
|
8
8
|
const client_id_1 = require("../helpers/client-id");
|
|
9
|
+
const colors_1 = require("../helpers/colors");
|
|
9
10
|
const is_mac_1 = require("../helpers/is-mac");
|
|
10
11
|
const use_keybinding_1 = require("../helpers/use-keybinding");
|
|
11
12
|
const redo_1 = require("../icons/redo");
|
|
@@ -13,8 +14,8 @@ const undo_1 = require("../icons/undo");
|
|
|
13
14
|
const call_api_1 = require("./call-api");
|
|
14
15
|
const InlineAction_1 = require("./InlineAction");
|
|
15
16
|
const iconStyle = {
|
|
16
|
-
width:
|
|
17
|
-
height:
|
|
17
|
+
width: 14,
|
|
18
|
+
height: 14,
|
|
18
19
|
};
|
|
19
20
|
const UndoRedoButtons = () => {
|
|
20
21
|
const [undoFile, setUndoFile] = (0, react_1.useState)(null);
|
|
@@ -130,10 +131,10 @@ const UndoRedoButtons = () => {
|
|
|
130
131
|
? `Redo (${ShortcutHint_1.cmdOrCtrlCharacter}+Shift+Z)`
|
|
131
132
|
: `Redo (${ShortcutHint_1.cmdOrCtrlCharacter}+Y)`;
|
|
132
133
|
const renderUndo = (0, react_1.useCallback)((color) => {
|
|
133
|
-
return jsx_runtime_1.jsx(undo_1.UndoIcon, { style:
|
|
134
|
+
return jsx_runtime_1.jsx(undo_1.UndoIcon, { style: iconStyle, color: color });
|
|
134
135
|
}, []);
|
|
135
136
|
const renderRedo = (0, react_1.useCallback)((color) => {
|
|
136
|
-
return jsx_runtime_1.jsx(redo_1.RedoIcon, { style:
|
|
137
|
+
return jsx_runtime_1.jsx(redo_1.RedoIcon, { style: iconStyle, color: color });
|
|
137
138
|
}, []);
|
|
138
139
|
const canUndo = undoFile !== null;
|
|
139
140
|
const canRedo = redoFile !== null;
|
|
@@ -141,7 +142,7 @@ const UndoRedoButtons = () => {
|
|
|
141
142
|
return null;
|
|
142
143
|
}
|
|
143
144
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
144
|
-
jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: onUndo, renderAction: renderUndo, title: undoTooltip, disabled: !canUndo }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: onRedo, renderAction: renderRedo, title: redoTooltip, disabled: !canRedo })
|
|
145
|
+
jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: onUndo, renderAction: renderUndo, title: undoTooltip, disabled: !canUndo, unhoveredColor: colors_1.WHITE_ALPHA_80 }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: onRedo, renderAction: renderRedo, title: redoTooltip, disabled: !canRedo, unhoveredColor: colors_1.WHITE_ALPHA_80 })
|
|
145
146
|
] }));
|
|
146
147
|
};
|
|
147
148
|
exports.UndoRedoButtons = UndoRedoButtons;
|
|
@@ -7,6 +7,7 @@ const remotion_1 = require("remotion");
|
|
|
7
7
|
const colors_1 = require("../helpers/colors");
|
|
8
8
|
const modals_1 = require("../state/modals");
|
|
9
9
|
const z_index_1 = require("../state/z-index");
|
|
10
|
+
const InlineAction_1 = require("./InlineAction");
|
|
10
11
|
const actions_1 = require("./RenderQueue/actions");
|
|
11
12
|
const buttonStyle = {
|
|
12
13
|
appearance: 'none',
|
|
@@ -19,6 +20,11 @@ const buttonStyle = {
|
|
|
19
20
|
justifyContent: 'center',
|
|
20
21
|
marginLeft: 8,
|
|
21
22
|
};
|
|
23
|
+
const updateIconContainer = {
|
|
24
|
+
alignItems: 'center',
|
|
25
|
+
display: 'flex',
|
|
26
|
+
flexShrink: 0,
|
|
27
|
+
};
|
|
22
28
|
const UpdateCheck = () => {
|
|
23
29
|
const [info, setInfo] = (0, react_1.useState)(null);
|
|
24
30
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
@@ -92,16 +98,23 @@ const UpdateCheck = () => {
|
|
|
92
98
|
const onPointerLeave = (0, react_1.useCallback)(() => {
|
|
93
99
|
setHovered(false);
|
|
94
100
|
}, []);
|
|
101
|
+
const renderUpdateIcon = (0, react_1.useCallback)((color) => {
|
|
102
|
+
return (jsx_runtime_1.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", style: {
|
|
103
|
+
height: 16,
|
|
104
|
+
width: 16,
|
|
105
|
+
color,
|
|
106
|
+
flexShrink: 0,
|
|
107
|
+
}, viewBox: "0 0 512 512", children: jsx_runtime_1.jsx("path", { fill: color, d: "M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM135.1 217.4c-4.5 4.2-7.1 10.1-7.1 16.3c0 12.3 10 22.3 22.3 22.3H208v96c0 17.7 14.3 32 32 32h32c17.7 0 32-14.3 32-32V256h57.7c12.3 0 22.3-10 22.3-22.3c0-6.2-2.6-12.1-7.1-16.3L269.8 117.5c-3.8-3.5-8.7-5.5-13.8-5.5s-10.1 2-13.8 5.5L135.1 217.4z" }) }));
|
|
108
|
+
}, []);
|
|
95
109
|
if (!info) {
|
|
96
110
|
return null;
|
|
97
111
|
}
|
|
98
112
|
if (!info.updateAvailable && !info.skillsUpdateAvailable) {
|
|
99
113
|
return null;
|
|
100
114
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}, viewBox: "0 0 512 512", children: jsx_runtime_1.jsx("path", { fill: colors_1.CURRENT_COLOR_LOWERCASE, d: "M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM135.1 217.4c-4.5 4.2-7.1 10.1-7.1 16.3c0 12.3 10 22.3 22.3 22.3H208v96c0 17.7 14.3 32 32 32h32c17.7 0 32-14.3 32-32V256h57.7c12.3 0 22.3-10 22.3-22.3c0-6.2-2.6-12.1-7.1-16.3L269.8 117.5c-3.8-3.5-8.7-5.5-13.8-5.5s-10.1 2-13.8 5.5L135.1 217.4z" }) })) }));
|
|
115
|
+
if (!hasBugfixesAvailable) {
|
|
116
|
+
return (jsx_runtime_1.jsx("div", { style: updateIconContainer, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: openModal, renderAction: renderUpdateIcon, unhoveredColor: colors_1.WHITE_ALPHA_80, title: "Update available" }) }));
|
|
117
|
+
}
|
|
118
|
+
return (jsx_runtime_1.jsx("button", { tabIndex: tabIndex, style: dynButtonStyle, onClick: openModal, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, type: "button", title: "Bugfixes available", children: "Bugfixes available" }));
|
|
106
119
|
};
|
|
107
120
|
exports.UpdateCheck = UpdateCheck;
|
|
@@ -5,15 +5,18 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const colors_1 = require("../../helpers/colors");
|
|
7
7
|
const copy_text_1 = require("../../helpers/copy-text");
|
|
8
|
-
const
|
|
8
|
+
const clipboard_1 = require("../../icons/clipboard");
|
|
9
|
+
const InlineAction_1 = require("../InlineAction");
|
|
9
10
|
const KnownBugs_1 = require("../KnownBugs");
|
|
10
|
-
const layout_1 = require("../layout");
|
|
11
11
|
const ModalHeader_1 = require("../ModalHeader");
|
|
12
12
|
const DismissableModal_1 = require("../NewComposition/DismissableModal");
|
|
13
13
|
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
14
14
|
const container = {
|
|
15
|
-
padding:
|
|
16
|
-
|
|
15
|
+
padding: '0 16px 8px',
|
|
16
|
+
};
|
|
17
|
+
const panelStyle = {
|
|
18
|
+
borderRadius: 6,
|
|
19
|
+
overflow: 'hidden',
|
|
17
20
|
};
|
|
18
21
|
const text = {
|
|
19
22
|
color: colors_1.LIGHT_TEXT,
|
|
@@ -26,15 +29,32 @@ const title = {
|
|
|
26
29
|
paddingBottom: 8,
|
|
27
30
|
...text,
|
|
28
31
|
};
|
|
29
|
-
const
|
|
32
|
+
const commandField = {
|
|
33
|
+
alignItems: 'center',
|
|
30
34
|
background: colors_1.SELECTED_BACKGROUND,
|
|
31
|
-
|
|
35
|
+
borderRadius: 6,
|
|
36
|
+
boxSizing: 'border-box',
|
|
37
|
+
display: 'flex',
|
|
38
|
+
marginBottom: 10,
|
|
39
|
+
marginTop: 10,
|
|
40
|
+
padding: '8px 8px 8px 10px',
|
|
41
|
+
width: '100%',
|
|
42
|
+
};
|
|
43
|
+
const code = {
|
|
44
|
+
color: colors_1.WHITE,
|
|
45
|
+
flex: 1,
|
|
32
46
|
fontFamily: 'monospace',
|
|
33
|
-
padding: '12px 10px',
|
|
34
47
|
fontSize: 14,
|
|
35
48
|
lineHeight: 1.5,
|
|
36
|
-
|
|
37
|
-
|
|
49
|
+
margin: 0,
|
|
50
|
+
minWidth: 0,
|
|
51
|
+
overflowX: 'auto',
|
|
52
|
+
whiteSpace: 'pre',
|
|
53
|
+
};
|
|
54
|
+
const copyIcon = {
|
|
55
|
+
flexShrink: 0,
|
|
56
|
+
height: 12,
|
|
57
|
+
width: 12,
|
|
38
58
|
};
|
|
39
59
|
const link = {
|
|
40
60
|
...text,
|
|
@@ -68,11 +88,14 @@ const UpdateModal = ({ info, knownBugs }) => {
|
|
|
68
88
|
(0, NotificationCenter_1.showNotification)(`Could not copy: ${err.message}`, 2000);
|
|
69
89
|
});
|
|
70
90
|
}, [updateAction]);
|
|
71
|
-
|
|
91
|
+
const renderCopyAction = (0, react_1.useCallback)((color) => {
|
|
92
|
+
return jsx_runtime_1.jsx(clipboard_1.ClipboardIcon, { color: color, style: copyIcon });
|
|
93
|
+
}, []);
|
|
94
|
+
return (jsx_runtime_1.jsxs(DismissableModal_1.DismissableModal, { panelStyle: panelStyle, children: [
|
|
72
95
|
jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: "Update available" }), jsx_runtime_1.jsxs("div", { style: container, children: [hasKnownBugs && info.updateAvailable ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
73
96
|
jsx_runtime_1.jsxs("div", { style: title, children: ["The currently installed version ", info.currentVersion, " has the following known bugs:"] }), jsx_runtime_1.jsx(KnownBugs_1.KnownBugs, { bugs: knownBugs }), jsx_runtime_1.jsx("div", { style: { height: '20px' } }), jsx_runtime_1.jsxs("div", { style: text, children: ["To upgrade, run the following ", updateActionType, ":"] })
|
|
74
|
-
] })) : info.updateAvailable ? (jsx_runtime_1.jsxs("div", { style: title, children: ["A new update for Remotion is available! Run the following", ' ', updateActionType, ":"] })) : (jsx_runtime_1.jsxs("div", { style: title, children: ["Your Remotion Agent Skills are out of date. Run the following", ' ', updateActionType, ":"] })), jsx_runtime_1.jsxs(
|
|
75
|
-
jsx_runtime_1.jsx(
|
|
97
|
+
] })) : info.updateAvailable ? (jsx_runtime_1.jsxs("div", { style: title, children: ["A new update for Remotion is available! Run the following", ' ', updateActionType, ":"] })) : (jsx_runtime_1.jsxs("div", { style: title, children: ["Your Remotion Agent Skills are out of date. Run the following", ' ', updateActionType, ":"] })), jsx_runtime_1.jsxs("div", { style: commandField, children: [
|
|
98
|
+
jsx_runtime_1.jsx("pre", { style: code, children: updateAction }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: onClick, renderAction: renderCopyAction, title: "Copy command" })
|
|
76
99
|
] }), info.updateAvailable ? (jsx_runtime_1.jsxs("div", { style: text, children: ["This will upgrade Remotion from ", info.currentVersion, " to", ' ', info.latestVersion, info.skillsUpdateAvailable
|
|
77
100
|
? ' and update your project Remotion Agent Skills.'
|
|
78
101
|
: '.'] })) : null, info.updateAvailable ? (jsx_runtime_1.jsxs("div", { style: text, children: ["Read the", ' ', jsx_runtime_1.jsx("a", { style: link, target: "_blank", href: "https://github.com/remotion-dev/remotion/releases", children: "Release notes" }), ' ', "to know what", "'s", " new in Remotion."] })) : null] })
|
|
@@ -2,14 +2,13 @@ import type { SetStateAction } from 'react';
|
|
|
2
2
|
import type { ResolvedStackLocation } from 'remotion';
|
|
3
3
|
import type { ModalState } from '../state/modals';
|
|
4
4
|
import type { ComboboxValue } from './NewComposition/ComboBox';
|
|
5
|
-
export declare const getCompositionMenuItems: ({ composition, connectionStatus, resolvedLocation, setSelectedModal, closeMenu, readOnlyStudio,
|
|
5
|
+
export declare const getCompositionMenuItems: ({ composition, connectionStatus, resolvedLocation, setSelectedModal, closeMenu, readOnlyStudio, includeCompositionManagementItems, }: {
|
|
6
6
|
composition: import("remotion").AnyComposition | null;
|
|
7
7
|
connectionStatus: "connected" | "disconnected" | "init";
|
|
8
8
|
resolvedLocation: ResolvedStackLocation | null;
|
|
9
9
|
setSelectedModal: (value: SetStateAction<ModalState | null>) => void;
|
|
10
10
|
closeMenu: () => void;
|
|
11
11
|
readOnlyStudio: boolean;
|
|
12
|
-
includeNewCompositionItem: boolean;
|
|
13
12
|
includeCompositionManagementItems: boolean;
|
|
14
13
|
}) => ComboboxValue[];
|
|
15
14
|
export declare const getCompositionContextMenuItems: (args: Omit<{
|
|
@@ -19,8 +18,7 @@ export declare const getCompositionContextMenuItems: (args: Omit<{
|
|
|
19
18
|
setSelectedModal: (value: SetStateAction<ModalState | null>) => void;
|
|
20
19
|
closeMenu: () => void;
|
|
21
20
|
readOnlyStudio: boolean;
|
|
22
|
-
includeNewCompositionItem: boolean;
|
|
23
21
|
includeCompositionManagementItems: boolean;
|
|
24
|
-
}, "includeCompositionManagementItems"
|
|
22
|
+
}, "includeCompositionManagementItems"> & {
|
|
25
23
|
readonly includeCompositionManagementItems: boolean;
|
|
26
24
|
}) => ComboboxValue[];
|
|
@@ -6,7 +6,7 @@ const format_file_location_1 = require("../helpers/format-file-location");
|
|
|
6
6
|
const open_in_editor_1 = require("../helpers/open-in-editor");
|
|
7
7
|
const NotificationCenter_1 = require("./Notifications/NotificationCenter");
|
|
8
8
|
const open_in_new_window_1 = require("./open-in-new-window");
|
|
9
|
-
const getCompositionMenuItems = ({ composition, connectionStatus, resolvedLocation, setSelectedModal, closeMenu, readOnlyStudio,
|
|
9
|
+
const getCompositionMenuItems = ({ composition, connectionStatus, resolvedLocation, setSelectedModal, closeMenu, readOnlyStudio, includeCompositionManagementItems, }) => {
|
|
10
10
|
const editorName = window.remotion_editorName;
|
|
11
11
|
const fileLocation = (0, format_file_location_1.formatFileLocation)({
|
|
12
12
|
location: resolvedLocation,
|
|
@@ -69,60 +69,12 @@ const getCompositionMenuItems = ({ composition, connectionStatus, resolvedLocati
|
|
|
69
69
|
disabled: openComponentInEditorDisabled,
|
|
70
70
|
}
|
|
71
71
|
: null,
|
|
72
|
-
|
|
73
|
-
id: 'copy-file-location',
|
|
74
|
-
keyHint: null,
|
|
75
|
-
label: `Copy file location`,
|
|
76
|
-
leftItem: null,
|
|
77
|
-
onClick: () => {
|
|
78
|
-
closeMenu();
|
|
79
|
-
if (!fileLocation) {
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
navigator.clipboard
|
|
83
|
-
.writeText(fileLocation)
|
|
84
|
-
.then(() => {
|
|
85
|
-
(0, NotificationCenter_1.showNotification)('Copied file location to clipboard', 1000);
|
|
86
|
-
})
|
|
87
|
-
.catch((err) => {
|
|
88
|
-
(0, NotificationCenter_1.showNotification)(`Could not copy to clipboard: ${err.message}`, 1000);
|
|
89
|
-
});
|
|
90
|
-
},
|
|
91
|
-
quickSwitcherLabel: 'Copy composition file location',
|
|
92
|
-
subMenu: null,
|
|
93
|
-
type: 'item',
|
|
94
|
-
value: 'copy-file-location',
|
|
95
|
-
disabled: copyFileLocationDisabled,
|
|
96
|
-
},
|
|
97
|
-
(editorName || fileLocation) &&
|
|
98
|
-
(includeNewCompositionItem || includeCompositionManagementItems)
|
|
72
|
+
editorName && includeCompositionManagementItems
|
|
99
73
|
? {
|
|
100
74
|
type: 'divider',
|
|
101
75
|
id: 'show-in-editor-divider',
|
|
102
76
|
}
|
|
103
77
|
: null,
|
|
104
|
-
includeNewCompositionItem
|
|
105
|
-
? {
|
|
106
|
-
id: 'new',
|
|
107
|
-
keyHint: null,
|
|
108
|
-
label: `New...`,
|
|
109
|
-
leftItem: null,
|
|
110
|
-
onClick: () => {
|
|
111
|
-
closeMenu();
|
|
112
|
-
setSelectedModal({
|
|
113
|
-
type: 'new-comp',
|
|
114
|
-
folderName: null,
|
|
115
|
-
parentName: null,
|
|
116
|
-
stack: null,
|
|
117
|
-
});
|
|
118
|
-
},
|
|
119
|
-
quickSwitcherLabel: 'New composition...',
|
|
120
|
-
subMenu: null,
|
|
121
|
-
type: 'item',
|
|
122
|
-
value: 'new',
|
|
123
|
-
disabled: readOnlyStudio,
|
|
124
|
-
}
|
|
125
|
-
: null,
|
|
126
78
|
includeCompositionManagementItems
|
|
127
79
|
? {
|
|
128
80
|
id: 'rename',
|
|
@@ -193,9 +145,36 @@ const getCompositionMenuItems = ({ composition, connectionStatus, resolvedLocati
|
|
|
193
145
|
disabled: !composition || readOnlyStudio,
|
|
194
146
|
}
|
|
195
147
|
: null,
|
|
148
|
+
editorName || includeCompositionManagementItems
|
|
149
|
+
? {
|
|
150
|
+
type: 'divider',
|
|
151
|
+
id: 'copy-actions-divider',
|
|
152
|
+
}
|
|
153
|
+
: null,
|
|
196
154
|
{
|
|
197
|
-
|
|
198
|
-
|
|
155
|
+
id: 'copy-file-location',
|
|
156
|
+
keyHint: null,
|
|
157
|
+
label: `Copy file location`,
|
|
158
|
+
leftItem: null,
|
|
159
|
+
onClick: () => {
|
|
160
|
+
closeMenu();
|
|
161
|
+
if (!fileLocation) {
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
navigator.clipboard
|
|
165
|
+
.writeText(fileLocation)
|
|
166
|
+
.then(() => {
|
|
167
|
+
(0, NotificationCenter_1.showNotification)('Copied file location to clipboard', 1000);
|
|
168
|
+
})
|
|
169
|
+
.catch((err) => {
|
|
170
|
+
(0, NotificationCenter_1.showNotification)(`Could not copy to clipboard: ${err.message}`, 1000);
|
|
171
|
+
});
|
|
172
|
+
},
|
|
173
|
+
quickSwitcherLabel: 'Copy composition file location',
|
|
174
|
+
subMenu: null,
|
|
175
|
+
type: 'item',
|
|
176
|
+
value: 'copy-file-location',
|
|
177
|
+
disabled: copyFileLocationDisabled,
|
|
199
178
|
},
|
|
200
179
|
{
|
|
201
180
|
id: 'copy-id',
|
|
@@ -229,7 +208,6 @@ const getCompositionContextMenuItems = (args) => {
|
|
|
229
208
|
if (args.composition === null) {
|
|
230
209
|
return (0, exports.getCompositionMenuItems)({
|
|
231
210
|
...args,
|
|
232
|
-
includeNewCompositionItem: false,
|
|
233
211
|
});
|
|
234
212
|
}
|
|
235
213
|
return [
|
|
@@ -240,7 +218,6 @@ const getCompositionContextMenuItems = (args) => {
|
|
|
240
218
|
},
|
|
241
219
|
...(0, exports.getCompositionMenuItems)({
|
|
242
220
|
...args,
|
|
243
|
-
includeNewCompositionItem: false,
|
|
244
221
|
}),
|
|
245
222
|
];
|
|
246
223
|
};
|
|
@@ -148,7 +148,8 @@ export declare const insertElement: ({ compositionFile, compositionId, element,
|
|
|
148
148
|
compositionFile: string;
|
|
149
149
|
compositionId: string;
|
|
150
150
|
element: {
|
|
151
|
-
dependencies:
|
|
151
|
+
dependencies: import("@remotion/studio-protocol").ElementDependency[];
|
|
152
|
+
durationInFrames?: number | undefined;
|
|
152
153
|
slug: string;
|
|
153
154
|
displayName: string;
|
|
154
155
|
sourceCode: string;
|
|
@@ -480,7 +480,7 @@ const notifyUnsupportedFiles = (unsupportedFiles) => {
|
|
|
480
480
|
};
|
|
481
481
|
const insertCompositionElement = async ({ compositionFile, compositionId, element, from, }) => {
|
|
482
482
|
const requiredPackage = (0, studio_shared_1.getRequiredPackageForInsertableElement)(element);
|
|
483
|
-
await (0, install_required_package_1.installRequiredPackages)(requiredPackage ? [requiredPackage] : []);
|
|
483
|
+
await (0, install_required_package_1.installRequiredPackages)(requiredPackage ? [{ name: requiredPackage, version: null }] : []);
|
|
484
484
|
const result = await (0, call_api_1.callApi)('/api/insert-jsx-element', {
|
|
485
485
|
compositionFile,
|
|
486
486
|
compositionId,
|
|
@@ -3,7 +3,7 @@ import type { SequenceNodePathInfo } from '../helpers/get-timeline-sequence-sort
|
|
|
3
3
|
import type { ComboboxValue } from './NewComposition/ComboBox';
|
|
4
4
|
import type { SelectedOutlineUvHandle } from './selected-outline-uv';
|
|
5
5
|
import type { TimelineSelection } from './Timeline/TimelineSelection';
|
|
6
|
-
export type SelectedOutlineContextMenuOpenResult = false |
|
|
6
|
+
export type SelectedOutlineContextMenuOpenResult = false | readonly ComboboxValue[];
|
|
7
7
|
export type SelectedOutlineContextMenuOpenHandler = () => SelectedOutlineContextMenuOpenResult | Promise<SelectedOutlineContextMenuOpenResult>;
|
|
8
8
|
export type SelectedOutlineTarget = {
|
|
9
9
|
readonly key: string;
|