@remotion/studio 4.0.503 → 4.0.504
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 +2 -14
- package/dist/components/Canvas.js +12 -5
- package/dist/components/CheckboardToggle.js +3 -1
- package/dist/components/CompositionSelectorItem.js +2 -3
- 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/EffectPickerModal.js +68 -7
- 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 +5 -3
- package/dist/components/InspectorPanel/CompositionMetadata.js +7 -6
- package/dist/components/InspectorPanel/KeyframeInspector.js +2 -3
- package/dist/components/InspectorPanel/styles.js +4 -0
- package/dist/components/LoopToggle.js +1 -1
- package/dist/components/MenuBuildIndicator.d.ts +3 -1
- package/dist/components/MenuBuildIndicator.js +5 -3
- package/dist/components/MenuToolbar.js +1 -1
- 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 +4 -0
- package/dist/components/NewComposition/InputDragger.js +7 -3
- package/dist/components/Notifications/NotificationCenter.js +12 -2
- package/dist/components/OutlineToggle.js +10 -2
- package/dist/components/PlayPause.js +1 -5
- package/dist/components/PlaybackRateSelector.js +2 -1
- package/dist/components/PreviewToolbar.js +8 -7
- 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 +0 -1
- package/dist/components/RenderButton.js +10 -9
- 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 +4 -12
- package/dist/components/SidebarRenderButton.js +1 -15
- package/dist/components/SizeSelector.js +2 -1
- 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 +1 -1
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +3 -6
- package/dist/components/Timeline/TimelineDeleteKeybindings.js +5 -7
- package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +2 -1
- package/dist/components/Timeline/TimelineKeyframeEasingLine.d.ts +1 -1
- package/dist/components/Timeline/TimelineKeyframeEasingLine.js +2 -2
- package/dist/components/Timeline/TimelineSelection.js +2 -3
- package/dist/components/Timeline/TimelineZoomControls.d.ts +3 -1
- package/dist/components/Timeline/TimelineZoomControls.js +24 -12
- package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +2 -3
- package/dist/components/Timeline/use-timeline-asset-drop.js +3 -3
- package/dist/components/TimelineInOutToggle.js +3 -3
- package/dist/components/TopPanel.js +3 -2
- 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/esm/{chunk-bj1r1hh5.js → chunk-43m68z1k.js} +4824 -4457
- package/dist/esm/internals.mjs +4824 -4457
- package/dist/esm/previewEntry.mjs +4801 -4434
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/inject-css.js +40 -23
- package/dist/helpers/install-required-package.d.ts +3 -2
- package/dist/helpers/install-required-package.js +20 -15
- package/dist/helpers/use-menu-structure.js +85 -49
- package/dist/icons/audio.d.ts +1 -1
- package/dist/icons/audio.js +1 -1
- 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/plus.js +1 -1
- package/dist/icons/redo.js +2 -2
- 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
|
@@ -11,6 +11,7 @@ const use_keybinding_1 = require("../helpers/use-keybinding");
|
|
|
11
11
|
const render_frame_1 = require("../state/render-frame");
|
|
12
12
|
const layout_1 = require("./layout");
|
|
13
13
|
const InputDragger_1 = require("./NewComposition/InputDragger");
|
|
14
|
+
const TimelineZoomControls_1 = require("./Timeline/TimelineZoomControls");
|
|
14
15
|
const text = {
|
|
15
16
|
color: colors_1.WHITE,
|
|
16
17
|
display: 'flex',
|
|
@@ -20,19 +21,32 @@ const text = {
|
|
|
20
21
|
lineHeight: 1,
|
|
21
22
|
width: '100%',
|
|
22
23
|
};
|
|
23
|
-
const
|
|
24
|
+
const currentTimeTypography = {
|
|
25
|
+
color: colors_1.WHITE,
|
|
24
26
|
display: 'inline-block',
|
|
25
|
-
fontSize:
|
|
27
|
+
fontSize: 14,
|
|
28
|
+
fontVariantNumeric: 'tabular-nums',
|
|
29
|
+
fontWeight: 400,
|
|
26
30
|
lineHeight: 1,
|
|
27
31
|
fontFamily: 'monospace',
|
|
28
32
|
};
|
|
29
|
-
const
|
|
33
|
+
const currentTimeInputStyle = {
|
|
34
|
+
...currentTimeTypography,
|
|
35
|
+
padding: '4px 6px 4px 0',
|
|
36
|
+
};
|
|
37
|
+
const currentTimeButtonStyle = {
|
|
38
|
+
paddingLeft: 0,
|
|
39
|
+
transform: 'translateY(-1px)',
|
|
40
|
+
};
|
|
41
|
+
const currentTimeSubtitle = {
|
|
30
42
|
color: colors_1.LIGHT_TEXT,
|
|
31
|
-
|
|
32
|
-
lineHeight: 1,
|
|
33
|
-
fontSize: 16,
|
|
43
|
+
display: 'block',
|
|
34
44
|
fontFamily: 'monospace',
|
|
35
|
-
|
|
45
|
+
fontSize: 10,
|
|
46
|
+
fontWeight: 400,
|
|
47
|
+
lineHeight: 1,
|
|
48
|
+
marginTop: -2,
|
|
49
|
+
textAlign: 'left',
|
|
36
50
|
};
|
|
37
51
|
const TimeValue = () => {
|
|
38
52
|
const frame = (0, remotion_1.useCurrentFrame)();
|
|
@@ -47,6 +61,10 @@ const TimeValue = () => {
|
|
|
47
61
|
const onValueChange = (0, react_1.useCallback)((val) => {
|
|
48
62
|
seek(val);
|
|
49
63
|
}, [seek]);
|
|
64
|
+
const formatter = (0, react_1.useCallback)((value) => {
|
|
65
|
+
return config ? (0, render_frame_1.renderFrame)(Number(value), config.fps) : String(value);
|
|
66
|
+
}, [config]);
|
|
67
|
+
const formatterSubtitle = (0, react_1.useCallback)((value) => String(value), []);
|
|
50
68
|
(0, react_1.useImperativeHandle)(remotion_1.Internals.timeValueRef, () => ({
|
|
51
69
|
goToFrame: () => {
|
|
52
70
|
var _a;
|
|
@@ -81,7 +99,7 @@ const TimeValue = () => {
|
|
|
81
99
|
return null;
|
|
82
100
|
}
|
|
83
101
|
return (jsx_runtime_1.jsxs("div", { style: text, children: [
|
|
84
|
-
jsx_runtime_1.jsx(
|
|
102
|
+
jsx_runtime_1.jsx(InputDragger_1.InputDragger, { ref: ref, "aria-label": String(frame), value: frame, onTextChange: onTextChange, onValueChange: onValueChange, formatter: formatter, formatterStyle: currentTimeTypography, formatterSubtitle: formatterSubtitle, formatterSubtitleStyle: currentTimeSubtitle, buttonStyle: currentTimeButtonStyle, rightAlign: false, status: "ok", style: currentTimeInputStyle }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 }), jsx_runtime_1.jsx(layout_1.Flex, {}), jsx_runtime_1.jsx(TimelineZoomControls_1.TimelineZoomControls, { sliderMaxWidth: 80 }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 })
|
|
85
103
|
] }));
|
|
86
104
|
};
|
|
87
105
|
exports.TimeValue = TimeValue;
|
|
@@ -268,7 +268,7 @@ const TimelineInner = () => {
|
|
|
268
268
|
}
|
|
269
269
|
return (jsx_runtime_1.jsx(SubscribeToNodePaths_1.SubscribeToNodePaths, { overrideId: sequence.controls.overrideId, componentIdentity: sequence.controls.componentIdentity, schema: sequence.controls.schema, getStack: sequence.getStack, effects: sequence.effects }, sequence.id));
|
|
270
270
|
}), (0, interactivity_enabled_1.isStudioInteractivityEnabled)() ? jsx_runtime_1.jsx(SequencePropsObserver_1.SequencePropsObserver, {}) : null, jsx_runtime_1.jsx(TimelineKeyframeTracksContext_1.TimelineKeyframeTracksProvider, { tracks: filtered, children: jsx_runtime_1.jsxs(TimelineSelection_1.TimelineSelectableItemsProvider, { timeline: shown, children: [(0, interactivity_enabled_1.isStudioInteractivityEnabled)() ? (jsx_runtime_1.jsx(TimelineSelection_1.TimelineSelectAllKeybindings, { timeline: shown })) : null, jsx_runtime_1.jsx(TimelineHeightContainer_1.TimelineHeightContainer, { shown: shown, hasBeenCut: hasBeenCut, children: isStill ? (jsx_runtime_1.jsx(TimelineList_1.TimelineList, { timeline: shown })) : (jsx_runtime_1.jsxs(TimelineWidthProvider_1.TimelineWidthProvider, { children: [
|
|
271
|
-
jsx_runtime_1.jsx(TimelinePinchZoom_1.TimelinePinchZoom, {}), jsx_runtime_1.jsxs(SplitterContainer_1.SplitterContainer, { orientation: "vertical", defaultFlex: 0.2, id: "names-to-timeline", maxFlex: 0.5, minFlex: 0.15, maxFlexerSize: null, minFlexerSize: MIN_TIMELINE_LABELS_WIDTH, maxAntiFlexerSize: null, children: [
|
|
271
|
+
jsx_runtime_1.jsx(TimelinePinchZoom_1.TimelinePinchZoom, {}), jsx_runtime_1.jsxs(SplitterContainer_1.SplitterContainer, { orientation: "vertical", defaultFlex: 0.2, id: "names-to-timeline", maxFlex: 0.5, minFlex: 0.15, maxFlexerSize: null, minFlexerSize: MIN_TIMELINE_LABELS_WIDTH, maxAntiFlexerSize: null, minAntiFlexerSize: null, children: [
|
|
272
272
|
jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { type: "flexer", sticky: jsx_runtime_1.jsx(TimelineTimeIndicators_1.TimelineTimePlaceholders, {}), children: jsx_runtime_1.jsx(TimelineList_1.TimelineList, { timeline: shown }) }), jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { onCollapse: noop, allowToCollapse: "none" }), jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { type: "anti-flexer", sticky: null, children: jsx_runtime_1.jsxs(TimelineScrollable_1.TimelineScrollable, { children: [
|
|
273
273
|
jsx_runtime_1.jsx(TimelineTracks_1.TimelineTracks, { timeline: shown, hasBeenCut: hasBeenCut }), jsx_runtime_1.jsx(TimelinePlayCursorSyncer_1.TimelinePlayCursorSyncer, {}), jsx_runtime_1.jsx(TimelineInOutPointer_1.TimelineInOutPointer, {}), jsx_runtime_1.jsx(TimelineTimeIndicators_1.TimelineTimeIndicators, {}), jsx_runtime_1.jsx(TimelineDragHandler_1.TimelineDragHandler, {}), (0, interactivity_enabled_1.isStudioInteractivityEnabled)() ? (jsx_runtime_1.jsx(TimelineInOutDragHandler_1.TimelineInOutDragHandler, {})) : null, jsx_runtime_1.jsx(TimelineSlider_1.TimelineSlider, {})
|
|
274
274
|
] }) })
|
|
@@ -18,6 +18,7 @@ const call_update_keyframe_settings_1 = require("./call-update-keyframe-settings
|
|
|
18
18
|
const delete_selected_timeline_item_1 = require("./delete-selected-timeline-item");
|
|
19
19
|
const effects_clipboard_1 = require("./effects-clipboard");
|
|
20
20
|
const find_track_for_node_path_info_1 = require("./find-track-for-node-path-info");
|
|
21
|
+
const imperative_state_1 = require("./imperative-state");
|
|
21
22
|
const keyframe_clipboard_1 = require("./keyframe-clipboard");
|
|
22
23
|
const save_effect_prop_1 = require("./save-effect-prop");
|
|
23
24
|
const TimelineSelection_1 = require("./TimelineSelection");
|
|
@@ -379,9 +380,6 @@ const getPasteEffectPropTarget = ({ selectedItems, payload, propStatuses, sequen
|
|
|
379
380
|
exports.getPasteEffectPropTarget = getPasteEffectPropTarget;
|
|
380
381
|
const TimelineClipboardKeybindings = () => {
|
|
381
382
|
const keybindings = (0, use_keybinding_1.useKeybinding)();
|
|
382
|
-
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
383
|
-
const timelinePositionRef = (0, react_1.useRef)(timelinePosition);
|
|
384
|
-
timelinePositionRef.current = timelinePosition;
|
|
385
383
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
386
384
|
const { canSelect } = (0, TimelineSelection_1.useTimelineSelection)();
|
|
387
385
|
const currentSelection = (0, TimelineSelection_1.useCurrentTimelineSelectionStateAsRef)();
|
|
@@ -556,7 +554,7 @@ const TimelineClipboardKeybindings = () => {
|
|
|
556
554
|
clientId,
|
|
557
555
|
confirm,
|
|
558
556
|
propStatuses,
|
|
559
|
-
timelinePosition:
|
|
557
|
+
timelinePosition: (0, imperative_state_1.getCurrentFrame)(),
|
|
560
558
|
});
|
|
561
559
|
return deletePromise === null || deletePromise === void 0 ? void 0 : deletePromise.then((deleted) => {
|
|
562
560
|
if (!deleted) {
|
|
@@ -612,7 +610,7 @@ const TimelineClipboardKeybindings = () => {
|
|
|
612
610
|
const keyframeTarget = (0, keyframe_clipboard_1.getPasteKeyframeTarget)({
|
|
613
611
|
selectedItems,
|
|
614
612
|
payload: keyframeResult.data,
|
|
615
|
-
timelinePosition:
|
|
613
|
+
timelinePosition: (0, imperative_state_1.getCurrentFrame)(),
|
|
616
614
|
sequences,
|
|
617
615
|
overrideIdsToNodePaths: overrideIdToNodePathMappings,
|
|
618
616
|
propStatuses,
|
|
@@ -870,7 +868,6 @@ const TimelineClipboardKeybindings = () => {
|
|
|
870
868
|
previewServerState,
|
|
871
869
|
sequencesRef,
|
|
872
870
|
setPropStatuses,
|
|
873
|
-
timelinePositionRef,
|
|
874
871
|
]);
|
|
875
872
|
return null;
|
|
876
873
|
};
|
|
@@ -10,6 +10,7 @@ const editor_guides_1 = require("../../state/editor-guides");
|
|
|
10
10
|
const ConfirmationDialog_1 = require("../ConfirmationDialog");
|
|
11
11
|
const delete_selected_timeline_item_1 = require("./delete-selected-timeline-item");
|
|
12
12
|
const duplicate_selected_timeline_item_1 = require("./duplicate-selected-timeline-item");
|
|
13
|
+
const imperative_state_1 = require("./imperative-state");
|
|
13
14
|
const reset_selected_timeline_props_1 = require("./reset-selected-timeline-props");
|
|
14
15
|
const split_selected_timeline_item_1 = require("./split-selected-timeline-item");
|
|
15
16
|
const TimelineSelection_1 = require("./TimelineSelection");
|
|
@@ -25,15 +26,13 @@ const TimelineDeleteKeybindings = () => {
|
|
|
25
26
|
const { canSelect } = (0, TimelineSelection_1.useTimelineSelection)();
|
|
26
27
|
const currentSelection = (0, TimelineSelection_1.useCurrentTimelineSelectionStateAsRef)();
|
|
27
28
|
const confirm = (0, ConfirmationDialog_1.useConfirmationDialog)();
|
|
28
|
-
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
29
|
-
const timelinePositionRef = (0, react_1.useRef)(timelinePosition);
|
|
30
|
-
timelinePositionRef.current = timelinePosition;
|
|
31
29
|
(0, react_1.useEffect)(() => {
|
|
32
30
|
if (!canSelect || previewServerState.type !== 'connected') {
|
|
33
31
|
return;
|
|
34
32
|
}
|
|
35
33
|
const { clientId } = previewServerState;
|
|
36
34
|
const handleDelete = () => {
|
|
35
|
+
const timelinePosition = (0, imperative_state_1.getCurrentFrame)();
|
|
37
36
|
const { selectedItems, clearSelection, selectItems } = currentSelection.current;
|
|
38
37
|
const sequences = sequencesRef.current;
|
|
39
38
|
const propStatuses = propStatusesRef.current;
|
|
@@ -58,7 +57,7 @@ const TimelineDeleteKeybindings = () => {
|
|
|
58
57
|
clientId,
|
|
59
58
|
confirm,
|
|
60
59
|
propStatuses,
|
|
61
|
-
timelinePosition
|
|
60
|
+
timelinePosition,
|
|
62
61
|
});
|
|
63
62
|
if (deletePromise !== null) {
|
|
64
63
|
deletePromise
|
|
@@ -69,7 +68,7 @@ const TimelineDeleteKeybindings = () => {
|
|
|
69
68
|
sequences,
|
|
70
69
|
overrideIdsToNodePaths: overrideIdToNodePathMappings,
|
|
71
70
|
propStatuses,
|
|
72
|
-
timelinePosition
|
|
71
|
+
timelinePosition,
|
|
73
72
|
});
|
|
74
73
|
if (nextSelection.length === 0) {
|
|
75
74
|
clearSelection();
|
|
@@ -169,7 +168,7 @@ const TimelineDeleteKeybindings = () => {
|
|
|
169
168
|
sequences: sequencesRef.current,
|
|
170
169
|
overrideIdsToNodePaths: overrideIdToNodePathMappings,
|
|
171
170
|
propStatuses: propStatusesRef.current,
|
|
172
|
-
splitFrame:
|
|
171
|
+
splitFrame: (0, imperative_state_1.getCurrentFrame)(),
|
|
173
172
|
});
|
|
174
173
|
if (splitPromise === null) {
|
|
175
174
|
return;
|
|
@@ -198,7 +197,6 @@ const TimelineDeleteKeybindings = () => {
|
|
|
198
197
|
sequencesRef,
|
|
199
198
|
setGuidesList,
|
|
200
199
|
setPropStatuses,
|
|
201
|
-
timelinePositionRef,
|
|
202
200
|
]);
|
|
203
201
|
return null;
|
|
204
202
|
};
|
|
@@ -43,6 +43,7 @@ const TimelineKeyframeEasingLine_1 = require("./TimelineKeyframeEasingLine");
|
|
|
43
43
|
const TimelineSelection_1 = require("./TimelineSelection");
|
|
44
44
|
const TimelineWidthProvider_1 = require("./TimelineWidthProvider");
|
|
45
45
|
const rowClipper = {
|
|
46
|
+
boxSizing: 'border-box',
|
|
46
47
|
marginLeft: -timeline_layout_1.TIMELINE_PADDING,
|
|
47
48
|
marginRight: -timeline_layout_1.TIMELINE_PADDING,
|
|
48
49
|
overflow: 'hidden',
|
|
@@ -61,7 +62,7 @@ const TimelineExpandedKeyframeRowUnmemoized = ({ height, keyframes, canEditEasin
|
|
|
61
62
|
const easingSegments = canEditEasing
|
|
62
63
|
? (0, get_timeline_easing_segments_1.getTimelineEasingSegments)(keyframes)
|
|
63
64
|
: [];
|
|
64
|
-
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [showSeparator ? jsx_runtime_1.jsx("div", { style: rowSeparator }) : null, jsx_runtime_1.jsx("div", { style: { ...rowClipper, height }, children: jsx_runtime_1.jsxs("div", { style: { ...row, height }, children: [rowHighlightBackground && timelineWidth !== null ? (jsx_runtime_1.jsx("div", { style: (0, TimelineSelection_1.getTimelineSelectedTrackHighlightStyle)(timelineWidth, rowHighlightBackground) })) : null, easingSegments.map((segment) => (jsx_runtime_1.jsx(TimelineKeyframeEasingLine_1.TimelineKeyframeEasingLine, { fromFrame: segment.fromFrame, toFrame: segment.toFrame, rowHeight: height, nodePathInfo: nodePathInfo, segmentIndex: segment.segmentIndex }, `${segment.segmentIndex}-${segment.fromFrame}-${segment.toFrame}`))), keyframes.map((keyframe) => (jsx_runtime_1.jsx(TimelineKeyframeDiamond_1.TimelineKeyframeDiamond, { frame: keyframe.frame, rowHeight: height, nodePathInfo: nodePathInfo }, keyframe.frame)))] }) })
|
|
65
|
+
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [showSeparator ? jsx_runtime_1.jsx("div", { style: rowSeparator }) : null, jsx_runtime_1.jsx("div", { style: { ...rowClipper, height, width: timelineWidth !== null && timelineWidth !== void 0 ? timelineWidth : undefined }, children: jsx_runtime_1.jsxs("div", { style: { ...row, height }, children: [rowHighlightBackground && timelineWidth !== null ? (jsx_runtime_1.jsx("div", { style: (0, TimelineSelection_1.getTimelineSelectedTrackHighlightStyle)(timelineWidth, rowHighlightBackground) })) : null, easingSegments.map((segment) => (jsx_runtime_1.jsx(TimelineKeyframeEasingLine_1.TimelineKeyframeEasingLine, { fromFrame: segment.fromFrame, toFrame: segment.toFrame, rowHeight: height, nodePathInfo: nodePathInfo, segmentIndex: segment.segmentIndex }, `${segment.segmentIndex}-${segment.fromFrame}-${segment.toFrame}`))), keyframes.map((keyframe) => (jsx_runtime_1.jsx(TimelineKeyframeDiamond_1.TimelineKeyframeDiamond, { frame: keyframe.frame, rowHeight: height, nodePathInfo: nodePathInfo }, keyframe.frame)))] }) })
|
|
65
66
|
] }));
|
|
66
67
|
};
|
|
67
68
|
exports.TimelineExpandedKeyframeRow = react_1.default.memo(TimelineExpandedKeyframeRowUnmemoized);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-sort-key';
|
|
3
3
|
export declare const getTimelineKeyframeEasingLineStyle: (selected: boolean) => React.CSSProperties;
|
|
4
|
-
export declare const TimelineKeyframeEasingLineVisual: React.
|
|
4
|
+
export declare const TimelineKeyframeEasingLineVisual: React.NamedExoticComponent<{
|
|
5
5
|
readonly selected: boolean;
|
|
6
6
|
}>;
|
|
7
7
|
export declare const TimelineKeyframeEasingLine: React.NamedExoticComponent<{
|
|
@@ -72,11 +72,11 @@ const getTimelineKeyframeEasingLineStyle = (selected) => ({
|
|
|
72
72
|
outline: selected ? `1px solid ${colors_1.BLUE}` : undefined,
|
|
73
73
|
});
|
|
74
74
|
exports.getTimelineKeyframeEasingLineStyle = getTimelineKeyframeEasingLineStyle;
|
|
75
|
-
const
|
|
75
|
+
const TimelineKeyframeEasingLineVisualUnmemoized = ({ selected }) => {
|
|
76
76
|
const lineStyle = (0, react_1.useMemo)(() => (0, exports.getTimelineKeyframeEasingLineStyle)(selected), [selected]);
|
|
77
77
|
return jsx_runtime_1.jsx("div", { style: lineStyle });
|
|
78
78
|
};
|
|
79
|
-
exports.TimelineKeyframeEasingLineVisual =
|
|
79
|
+
exports.TimelineKeyframeEasingLineVisual = react_1.default.memo(TimelineKeyframeEasingLineVisualUnmemoized);
|
|
80
80
|
const TimelineKeyframeEasingLineUnmemoized = ({ fromFrame, toFrame, rowHeight, nodePathInfo, segmentIndex }) => {
|
|
81
81
|
const buttonRef = (0, react_1.useRef)(null);
|
|
82
82
|
const videoConfig = (0, remotion_1.useVideoConfig)();
|
|
@@ -17,6 +17,7 @@ const ExpandedTracksProvider_1 = require("../ExpandedTracksProvider");
|
|
|
17
17
|
const options_sidebar_tabs_1 = require("../options-sidebar-tabs");
|
|
18
18
|
const get_node_keyframes_1 = require("./get-node-keyframes");
|
|
19
19
|
const get_timeline_easing_segments_1 = require("./get-timeline-easing-segments");
|
|
20
|
+
const imperative_state_1 = require("./imperative-state");
|
|
20
21
|
const timeline_expanded_filter_1 = require("./timeline-expanded-filter");
|
|
21
22
|
const timeline_refs_1 = require("./timeline-refs");
|
|
22
23
|
const TimelineClipboardKeybindings_1 = require("./TimelineClipboardKeybindings");
|
|
@@ -571,7 +572,6 @@ const TimelineSelectableItemsProvider = ({ children, timeline }) => {
|
|
|
571
572
|
const { getIsExpanded } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksGetterContext);
|
|
572
573
|
const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
573
574
|
const { getDragOverrides, getEffectDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
|
|
574
|
-
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
575
575
|
const { selectedItems } = (0, exports.useTimelineSelection)();
|
|
576
576
|
const selectableItems = (0, react_1.useMemo)(() => (0, exports.getSelectableTimelineItems)({
|
|
577
577
|
getDragOverrides,
|
|
@@ -580,7 +580,7 @@ const TimelineSelectableItemsProvider = ({ children, timeline }) => {
|
|
|
580
580
|
propStatuses,
|
|
581
581
|
selectedItems,
|
|
582
582
|
timeline,
|
|
583
|
-
timelinePosition,
|
|
583
|
+
timelinePosition: (0, imperative_state_1.getCurrentFrame)(),
|
|
584
584
|
}), [
|
|
585
585
|
getDragOverrides,
|
|
586
586
|
getEffectDragOverrides,
|
|
@@ -588,7 +588,6 @@ const TimelineSelectableItemsProvider = ({ children, timeline }) => {
|
|
|
588
588
|
propStatuses,
|
|
589
589
|
selectedItems,
|
|
590
590
|
timeline,
|
|
591
|
-
timelinePosition,
|
|
592
591
|
]);
|
|
593
592
|
return (jsx_runtime_1.jsx(exports.TimelineSelectionOrderProvider, { items: selectableItems, children: children }));
|
|
594
593
|
};
|
|
@@ -22,34 +22,46 @@ const buttonStyle = {
|
|
|
22
22
|
fontSize: 24,
|
|
23
23
|
};
|
|
24
24
|
const iconStyle = {
|
|
25
|
-
color: colors_1.WHITE,
|
|
26
25
|
width: 14,
|
|
27
26
|
};
|
|
28
|
-
const
|
|
27
|
+
const TimelineZoomSlider = ({ maxWidth }) => {
|
|
29
28
|
var _a;
|
|
30
29
|
const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
31
30
|
const { setZoom, zoom: zoomMap } = (0, react_1.useContext)(timeline_zoom_1.TimelineZoomCtx);
|
|
32
31
|
const { tabIndex } = (0, z_index_1.useZIndex)();
|
|
33
|
-
const
|
|
32
|
+
const isStill = (0, is_current_selected_still_1.useIsStill)();
|
|
33
|
+
const onChange = (0, react_1.useCallback)((e) => {
|
|
34
34
|
if (canvasContent === null || canvasContent.type !== 'composition') {
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
|
-
setZoom(canvasContent.compositionId, (
|
|
37
|
+
setZoom(canvasContent.compositionId, () => Number(e.target.value), {
|
|
38
|
+
anchorFrame: null,
|
|
39
|
+
anchorContentX: null,
|
|
40
|
+
});
|
|
38
41
|
}, [canvasContent, setZoom]);
|
|
39
|
-
|
|
42
|
+
if (isStill ||
|
|
43
|
+
canvasContent === null ||
|
|
44
|
+
canvasContent.type !== 'composition') {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
const zoom = (_a = zoomMap[canvasContent.compositionId]) !== null && _a !== void 0 ? _a : timeline_zoom_1.TIMELINE_MIN_ZOOM;
|
|
48
|
+
return (jsx_runtime_1.jsx("input", { style: maxWidth === undefined ? undefined : { maxWidth }, title: `Timeline zoom (${zoom}x)`, alt: `Timeline zoom (${zoom}x)`, type: "range", min: timeline_zoom_1.TIMELINE_MIN_ZOOM, step: 0.1, value: zoom, max: timeline_zoom_1.TIMELINE_MAX_ZOOM, onChange: onChange, className: "__remotion-timeline-slider", tabIndex: tabIndex }));
|
|
49
|
+
};
|
|
50
|
+
const TimelineZoomControls = ({ sliderMaxWidth }) => {
|
|
51
|
+
var _a;
|
|
52
|
+
const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
53
|
+
const { setZoom, zoom: zoomMap } = (0, react_1.useContext)(timeline_zoom_1.TimelineZoomCtx);
|
|
54
|
+
const onMinusClicked = (0, react_1.useCallback)(() => {
|
|
40
55
|
if (canvasContent === null || canvasContent.type !== 'composition') {
|
|
41
56
|
return;
|
|
42
57
|
}
|
|
43
|
-
setZoom(canvasContent.compositionId, (z) => Math.
|
|
58
|
+
setZoom(canvasContent.compositionId, (z) => Math.max(timeline_zoom_1.TIMELINE_MIN_ZOOM, z - 0.2), { anchorFrame: null, anchorContentX: null });
|
|
44
59
|
}, [canvasContent, setZoom]);
|
|
45
|
-
const
|
|
60
|
+
const onPlusClicked = (0, react_1.useCallback)(() => {
|
|
46
61
|
if (canvasContent === null || canvasContent.type !== 'composition') {
|
|
47
62
|
return;
|
|
48
63
|
}
|
|
49
|
-
setZoom(canvasContent.compositionId, () =>
|
|
50
|
-
anchorFrame: null,
|
|
51
|
-
anchorContentX: null,
|
|
52
|
-
});
|
|
64
|
+
setZoom(canvasContent.compositionId, (z) => Math.min(timeline_zoom_1.TIMELINE_MAX_ZOOM, z + 0.2), { anchorFrame: null, anchorContentX: null });
|
|
53
65
|
}, [canvasContent, setZoom]);
|
|
54
66
|
const isStill = (0, is_current_selected_still_1.useIsStill)();
|
|
55
67
|
if (isStill ||
|
|
@@ -59,7 +71,7 @@ const TimelineZoomControls = () => {
|
|
|
59
71
|
}
|
|
60
72
|
const zoom = (_a = zoomMap[canvasContent.compositionId]) !== null && _a !== void 0 ? _a : timeline_zoom_1.TIMELINE_MIN_ZOOM;
|
|
61
73
|
return (jsx_runtime_1.jsxs("div", { style: container, children: [
|
|
62
|
-
jsx_runtime_1.jsx(ControlButton_1.ControlButton, { onClick: onMinusClicked, style: buttonStyle, title: "Zoom out timeline", role: 'ControlButton', type: "button", disabled: timeline_zoom_1.TIMELINE_MIN_ZOOM === zoom, children: jsx_runtime_1.jsx(minus_1.Minus, { style: iconStyle }) }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(
|
|
74
|
+
jsx_runtime_1.jsx(ControlButton_1.ControlButton, { onClick: onMinusClicked, style: buttonStyle, title: "Zoom out timeline", role: 'ControlButton', type: "button", disabled: timeline_zoom_1.TIMELINE_MIN_ZOOM === zoom, children: (color) => jsx_runtime_1.jsx(minus_1.Minus, { style: iconStyle, color: color }) }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(TimelineZoomSlider, { maxWidth: sliderMaxWidth }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(ControlButton_1.ControlButton, { onClick: onPlusClicked, style: buttonStyle, title: "Zoom in timeline", role: 'button', type: "button", disabled: timeline_zoom_1.TIMELINE_MAX_ZOOM === zoom, children: (color) => jsx_runtime_1.jsx(plus_1.Plus, { color: color, style: iconStyle }) })
|
|
63
75
|
] }));
|
|
64
76
|
};
|
|
65
77
|
exports.TimelineZoomControls = TimelineZoomControls;
|
|
@@ -8,6 +8,7 @@ const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
|
8
8
|
const timeline_node_path_key_1 = require("../../helpers/timeline-node-path-key");
|
|
9
9
|
const ExpandedTracksProvider_1 = require("../ExpandedTracksProvider");
|
|
10
10
|
const get_node_keyframes_1 = require("./get-node-keyframes");
|
|
11
|
+
const imperative_state_1 = require("./imperative-state");
|
|
11
12
|
const timeline_expanded_filter_1 = require("./timeline-expanded-filter");
|
|
12
13
|
const TimelineSelection_1 = require("./TimelineSelection");
|
|
13
14
|
const getNodeCanEditEasing = ({ node, nodePath, propStatuses, }) => {
|
|
@@ -36,7 +37,6 @@ const useExpandedTrackKeyframeRows = ({ sequence, nodePathInfo, keyframeDisplayO
|
|
|
36
37
|
const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
37
38
|
const { getDragOverrides, getEffectDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
|
|
38
39
|
const { selectedItems } = (0, TimelineSelection_1.useTimelineSelection)();
|
|
39
|
-
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
40
40
|
const tree = (0, react_1.useMemo)(() => (0, timeline_layout_1.buildTimelineTree)({
|
|
41
41
|
sequence,
|
|
42
42
|
nodePathInfo,
|
|
@@ -89,7 +89,7 @@ const useExpandedTrackKeyframeRows = ({ sequence, nodePathInfo, keyframeDisplayO
|
|
|
89
89
|
keyframeDisplayOffset,
|
|
90
90
|
getDragOverrides,
|
|
91
91
|
getEffectDragOverrides,
|
|
92
|
-
timelinePosition,
|
|
92
|
+
timelinePosition: (0, imperative_state_1.getCurrentFrame)(),
|
|
93
93
|
}),
|
|
94
94
|
])), [
|
|
95
95
|
flat,
|
|
@@ -98,7 +98,6 @@ const useExpandedTrackKeyframeRows = ({ sequence, nodePathInfo, keyframeDisplayO
|
|
|
98
98
|
keyframeDisplayOffset,
|
|
99
99
|
nodePathInfo.sequenceSubscriptionKey,
|
|
100
100
|
propStatuses,
|
|
101
|
-
timelinePosition,
|
|
102
101
|
]);
|
|
103
102
|
const rows = (0, react_1.useMemo)(() => flat.map(({ node }) => {
|
|
104
103
|
var _a;
|
|
@@ -11,6 +11,7 @@ const effect_drag_and_drop_1 = require("../effect-drag-and-drop");
|
|
|
11
11
|
const handle_drop_1 = require("../handle-drop");
|
|
12
12
|
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
13
13
|
const SvgImportDialog_1 = require("../SvgImportDialog");
|
|
14
|
+
const imperative_state_1 = require("./imperative-state");
|
|
14
15
|
const timeline_refs_1 = require("./timeline-refs");
|
|
15
16
|
const timeline_scroll_logic_1 = require("./timeline-scroll-logic");
|
|
16
17
|
const use_resolved_stack_1 = require("./use-resolved-stack");
|
|
@@ -28,7 +29,6 @@ const useTimelineAssetDrop = () => {
|
|
|
28
29
|
var _a, _b;
|
|
29
30
|
const { canvasContent, compositions } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
30
31
|
const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
|
|
31
|
-
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
32
32
|
const chooseSvgImportMode = (0, SvgImportDialog_1.useSvgImportDialog)();
|
|
33
33
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
34
34
|
const [isAddingAsset, setIsAddingAsset] = (0, react_1.useState)(false);
|
|
@@ -65,8 +65,8 @@ const useTimelineAssetDrop = () => {
|
|
|
65
65
|
timelineLeft: scrollable.getBoundingClientRect().left,
|
|
66
66
|
timelineWidth: scrollable.scrollWidth,
|
|
67
67
|
})
|
|
68
|
-
:
|
|
69
|
-
}, [
|
|
68
|
+
: (0, imperative_state_1.getCurrentFrame)();
|
|
69
|
+
}, [videoConfig]);
|
|
70
70
|
const onAssetDragOver = (0, react_1.useCallback)((event) => {
|
|
71
71
|
const timeline = timeline_refs_1.timelineVerticalScroll.current;
|
|
72
72
|
const { dataTransfer } = event;
|
|
@@ -19,8 +19,8 @@ const getTooltipText = (pointType, key) => [
|
|
|
19
19
|
.filter(no_react_1.NoReactInternals.truthy)
|
|
20
20
|
.join(' ');
|
|
21
21
|
const style = {
|
|
22
|
-
width:
|
|
23
|
-
height:
|
|
22
|
+
width: 17,
|
|
23
|
+
height: 17,
|
|
24
24
|
};
|
|
25
25
|
exports.inOutHandles = (0, react_1.createRef)();
|
|
26
26
|
exports.defaultInOutValue = { inFrame: null, outFrame: null };
|
|
@@ -239,7 +239,7 @@ const TimelineInOutPointToggle = () => {
|
|
|
239
239
|
};
|
|
240
240
|
}, [confId, onInMark, onInOutClear, onOutMark]);
|
|
241
241
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
242
|
-
jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title: getTooltipText('In', 'I'), "aria-label": getTooltipText('In', 'I'), onClick: onInMark, onContextMenu: clearInMark, disabled: !videoConfig || isFirstFrame, children: jsx_runtime_1.jsx(timelineInOutPointer_1.TimelineInPointer, { color: inFrame === null ?
|
|
242
|
+
jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title: getTooltipText('In', 'I'), "aria-label": getTooltipText('In', 'I'), onClick: onInMark, onContextMenu: clearInMark, disabled: !videoConfig || isFirstFrame, children: (color) => (jsx_runtime_1.jsx(timelineInOutPointer_1.TimelineInPointer, { color: inFrame === null ? color : colors_1.BLUE, style: style })) }), jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title: getTooltipText('Out', 'O'), "aria-label": getTooltipText('Out', 'O'), onClick: onOutMark, onContextMenu: clearOutMark, disabled: !videoConfig || isLastFrame, children: (color) => (jsx_runtime_1.jsx(timelineInOutPointer_1.TimelineOutPointer, { color: outFrame === null ? color : colors_1.BLUE, style: style })) })
|
|
243
243
|
] }));
|
|
244
244
|
};
|
|
245
245
|
exports.TimelineInOutPointToggle = TimelineInOutPointToggle;
|
|
@@ -69,6 +69,7 @@ const row = {
|
|
|
69
69
|
minHeight: 0,
|
|
70
70
|
};
|
|
71
71
|
const MAX_SIDEBAR_WIDTH = 350;
|
|
72
|
+
const MIN_SIDEBAR_WIDTH = 250;
|
|
72
73
|
const useResponsiveSidebarStatus = () => {
|
|
73
74
|
const { sidebarCollapsedStateLeft } = (0, react_1.useContext)(sidebar_1.SidebarContext);
|
|
74
75
|
const responsiveLeftStatus = (0, use_breakpoint_1.useBreakpoint)(1200) ? 'collapsed' : 'expanded';
|
|
@@ -114,8 +115,8 @@ const TopPanelInner = ({ readOnlyStudio, onMounted, drawRef, bufferStateDelayInM
|
|
|
114
115
|
return (jsx_runtime_1.jsx(ObserveDefaultPropsContext_1.ObserveDefaultProps, { compositionId: (canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) === 'composition'
|
|
115
116
|
? canvasContent.compositionId
|
|
116
117
|
: 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' ? (isMobileLayout ? (jsx_runtime_1.jsx(MobilePanel_1.default, { onClose: onCollapseLeft,
|
|
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'
|
|
118
|
+
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' ? (isMobileLayout ? (jsx_runtime_1.jsx(MobilePanel_1.default, { onClose: onCollapseLeft, children: jsx_runtime_1.jsx(ExplorerPanel_1.ExplorerPanel, { readOnlyStudio: readOnlyStudio }) })) : (jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "flexer", children: jsx_runtime_1.jsx(ExplorerPanel_1.ExplorerPanel, { readOnlyStudio: readOnlyStudio }) }))) : null, actualStateLeft === 'expanded' && !isMobileLayout ? (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: [
|
|
119
|
+
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
120
|
] }) }), jsx_runtime_1.jsx(PreviewToolbar_1.PreviewToolbar, { bufferStateDelayInMilliseconds: bufferStateDelayInMilliseconds, readOnlyStudio: readOnlyStudio }), jsx_runtime_1.jsx(CurrentCompositionSideEffects_1.TitleUpdater, {})
|
|
120
121
|
] }) }));
|
|
121
122
|
};
|
|
@@ -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] })
|