@remotion/studio 4.0.521 → 4.0.522
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/CanvasIfSizeIsAvailable.js +7 -0
- package/dist/components/CopyButton.js +7 -14
- package/dist/components/Editor.js +6 -5
- package/dist/components/EditorContent.js +1 -1
- package/dist/components/ElementInstallConfirmation.js +3 -1
- package/dist/components/FixComputedValueModal.js +20 -10
- package/dist/components/InspectorLocationCopy.js +10 -5
- package/dist/components/MenuBuildIndicator.js +7 -2
- package/dist/components/MenuCompositionName.js +62 -6
- package/dist/components/RenderModal/CliCopyButton.js +13 -27
- package/dist/components/RenderQueue/RenderQueueCopyToClipboard.js +7 -4
- package/dist/components/SidebarCollapserControls.js +11 -5
- package/dist/components/SkillsSettings.js +9 -5
- package/dist/components/Splitter/SplitterContainer.js +63 -10
- package/dist/components/Splitter/SplitterContext.d.ts +3 -0
- package/dist/components/Splitter/SplitterContext.js +5 -1
- package/dist/components/Splitter/SplitterElement.js +11 -2
- package/dist/components/Splitter/SplitterHandle.d.ts +1 -0
- package/dist/components/Splitter/SplitterHandle.js +55 -25
- package/dist/components/Timeline/SubscribeToNodePaths.d.ts +2 -1
- package/dist/components/Timeline/SubscribeToNodePaths.js +2 -1
- package/dist/components/Timeline/Timeline.js +15 -4
- package/dist/components/Timeline/TimelineDragHandler.js +9 -4
- package/dist/components/Timeline/TimelinePinchZoom.js +6 -30
- package/dist/components/Timeline/TimelinePlayCursorSyncer.js +1 -7
- package/dist/components/Timeline/TimelineSequence.js +77 -12
- package/dist/components/Timeline/TimelineSequenceItem.js +12 -1
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +13 -3
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +168 -121
- package/dist/components/Timeline/TimelineSlider.js +1 -4
- package/dist/components/Timeline/TimelineWidthProvider.js +2 -5
- package/dist/components/Timeline/TimelineZoomControls.js +20 -20
- package/dist/components/Timeline/get-sequence-split-menu-item.d.ts +11 -0
- package/dist/components/Timeline/get-sequence-split-menu-item.js +55 -0
- package/dist/components/Timeline/use-sequence-props-subscription.d.ts +3 -2
- package/dist/components/Timeline/use-sequence-props-subscription.js +4 -10
- package/dist/components/TopPanel.js +3 -19
- package/dist/components/UpdatesSettings.js +9 -5
- package/dist/components/ZoomPersistor.js +6 -3
- package/dist/components/composition-menu-items.js +1 -1
- package/dist/esm/{chunk-emw4k5b0.js → chunk-3netyjd9.js} +4917 -4651
- package/dist/esm/internals.mjs +4917 -4651
- package/dist/esm/previewEntry.mjs +4895 -4629
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/copy-text.js +1 -2
- package/dist/helpers/use-copy-feedback.d.ts +4 -0
- package/dist/helpers/use-copy-feedback.js +19 -0
- package/dist/icons/copy.d.ts +5 -0
- package/dist/icons/copy.js +12 -0
- package/dist/state/canvas-ref.d.ts +1 -0
- package/dist/state/canvas-ref.js +2 -1
- package/dist/state/sidebar.d.ts +3 -0
- package/dist/state/sidebar.js +6 -1
- package/dist/state/timeline-zoom.d.ts +1 -1
- package/dist/state/timeline-zoom.js +3 -3
- package/dist/visual-controls/VisualControls.js +4 -0
- package/package.json +15 -15
- package/dist/esm/chunk-vkrvnx2h.js +0 -99378
- package/dist/helpers/use-max-media-duration.d.ts +0 -2
- package/dist/helpers/use-max-media-duration.js +0 -61
|
@@ -59,32 +59,29 @@ const buttonStyle = {
|
|
|
59
59
|
};
|
|
60
60
|
const TimelineZoomSlider = ({ maxWidth, minZoom, timelineViewportWidth }) => {
|
|
61
61
|
var _a, _b;
|
|
62
|
-
const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
63
62
|
const { setZoom, zoom: zoomMap } = (0, react_1.useContext)(timeline_zoom_1.TimelineZoomCtx);
|
|
64
63
|
const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
|
|
65
64
|
const { tabIndex } = (0, z_index_1.useZIndex)();
|
|
66
|
-
const
|
|
65
|
+
const isVideoComposition = (0, is_current_selected_still_1.useIsVideoComposition)();
|
|
67
66
|
const onChange = (0, react_1.useCallback)((e) => {
|
|
68
|
-
if (
|
|
67
|
+
if (videoConfig === null) {
|
|
69
68
|
return;
|
|
70
69
|
}
|
|
71
|
-
setZoom(
|
|
70
|
+
setZoom(videoConfig.id, () => (0, get_timeline_max_zoom_1.sliderValueToTimelineZoom)({
|
|
72
71
|
sliderValue: Number(e.target.value),
|
|
73
72
|
minZoom,
|
|
74
73
|
}), {
|
|
75
74
|
anchorFrame: null,
|
|
76
75
|
anchorContentX: null,
|
|
77
76
|
});
|
|
78
|
-
}, [
|
|
79
|
-
if (
|
|
80
|
-
canvasContent === null ||
|
|
81
|
-
canvasContent.type !== 'composition') {
|
|
77
|
+
}, [minZoom, setZoom, videoConfig]);
|
|
78
|
+
if (!isVideoComposition || videoConfig === null) {
|
|
82
79
|
return null;
|
|
83
80
|
}
|
|
84
81
|
const zoom = (0, get_timeline_max_zoom_1.getTimelineZoom)({
|
|
85
82
|
durationInFrames: (_a = videoConfig === null || videoConfig === void 0 ? void 0 : videoConfig.durationInFrames) !== null && _a !== void 0 ? _a : 1,
|
|
86
83
|
timelineViewportWidth,
|
|
87
|
-
zoom: (_b = zoomMap[
|
|
84
|
+
zoom: (_b = zoomMap[videoConfig.id]) !== null && _b !== void 0 ? _b : null,
|
|
88
85
|
});
|
|
89
86
|
const roundedZoom = Math.round(zoom * 100) / 100;
|
|
90
87
|
return (jsx_runtime_1.jsx("input", { style: maxWidth === undefined ? undefined : { maxWidth }, title: `Timeline zoom (${roundedZoom}px/frame)`, alt: `Timeline zoom (${roundedZoom}px/frame)`, type: "range", min: get_timeline_max_zoom_1.TIMELINE_ZOOM_SLIDER_PROPS.min, max: get_timeline_max_zoom_1.TIMELINE_ZOOM_SLIDER_PROPS.max, step: get_timeline_max_zoom_1.TIMELINE_ZOOM_SLIDER_PROPS.step, value: (0, get_timeline_max_zoom_1.timelineZoomToSliderValue)({ zoom, minZoom }), onChange: onChange, className: "__remotion-timeline-slider", tabIndex: tabIndex }));
|
|
@@ -92,7 +89,6 @@ const TimelineZoomSlider = ({ maxWidth, minZoom, timelineViewportWidth }) => {
|
|
|
92
89
|
const TimelineZoomControlsInner = ({ sliderMaxWidth }) => {
|
|
93
90
|
var _a;
|
|
94
91
|
var _b, _c, _d;
|
|
95
|
-
const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
96
92
|
const { setZoom } = (0, react_1.useContext)(timeline_zoom_1.TimelineZoomCtx);
|
|
97
93
|
const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
|
|
98
94
|
const timelineSize = player_1.PlayerInternals.useElementSize(timeline_refs_1.scrollableRef, {
|
|
@@ -105,21 +101,25 @@ const TimelineZoomControlsInner = ({ sliderMaxWidth }) => {
|
|
|
105
101
|
timelineViewportWidth,
|
|
106
102
|
});
|
|
107
103
|
const onMinusClicked = (0, react_1.useCallback)(() => {
|
|
108
|
-
if (
|
|
104
|
+
if (videoConfig === null) {
|
|
109
105
|
return;
|
|
110
106
|
}
|
|
111
|
-
setZoom(
|
|
112
|
-
|
|
107
|
+
setZoom(videoConfig.id, (z) => z / TIMELINE_ZOOM_BUTTON_FACTOR, {
|
|
108
|
+
anchorFrame: null,
|
|
109
|
+
anchorContentX: null,
|
|
110
|
+
});
|
|
111
|
+
}, [setZoom, videoConfig]);
|
|
113
112
|
const onPlusClicked = (0, react_1.useCallback)(() => {
|
|
114
|
-
if (
|
|
113
|
+
if (videoConfig === null) {
|
|
115
114
|
return;
|
|
116
115
|
}
|
|
117
|
-
setZoom(
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
116
|
+
setZoom(videoConfig.id, (z) => z * TIMELINE_ZOOM_BUTTON_FACTOR, {
|
|
117
|
+
anchorFrame: null,
|
|
118
|
+
anchorContentX: null,
|
|
119
|
+
});
|
|
120
|
+
}, [setZoom, videoConfig]);
|
|
121
|
+
const isVideoComposition = (0, is_current_selected_still_1.useIsVideoComposition)();
|
|
122
|
+
if (!isVideoComposition || videoConfig === null) {
|
|
123
123
|
return null;
|
|
124
124
|
}
|
|
125
125
|
return (jsx_runtime_1.jsxs("div", { style: container, children: [
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CanUpdateSequencePropStatus, TSequence } from 'remotion';
|
|
2
|
+
import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-sort-key';
|
|
3
|
+
import type { ComboboxValue } from '../NewComposition/ComboBox';
|
|
4
|
+
export declare const getSequenceSplitMenuItem: ({ nodePathInfo, sequence, propStatuses, splitFrame, canEditSource, hasMultipleSelection, }: {
|
|
5
|
+
readonly nodePathInfo: SequenceNodePathInfo | null;
|
|
6
|
+
readonly sequence: TSequence;
|
|
7
|
+
readonly propStatuses: Record<string, CanUpdateSequencePropStatus> | undefined;
|
|
8
|
+
readonly splitFrame: number;
|
|
9
|
+
readonly canEditSource: boolean;
|
|
10
|
+
readonly hasMultipleSelection: boolean;
|
|
11
|
+
}) => ComboboxValue | null;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSequenceSplitMenuItem = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const split_selected_timeline_item_1 = require("./split-selected-timeline-item");
|
|
6
|
+
const getSequenceSplitMenuItem = ({ nodePathInfo, sequence, propStatuses, splitFrame, canEditSource, hasMultipleSelection, }) => {
|
|
7
|
+
if (hasMultipleSelection) {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
const eligibility = nodePathInfo
|
|
11
|
+
? (0, split_selected_timeline_item_1.getTimelineSequenceSplitEligibility)({
|
|
12
|
+
selection: { type: 'sequence', nodePathInfo },
|
|
13
|
+
sequence,
|
|
14
|
+
propStatuses,
|
|
15
|
+
splitFrame,
|
|
16
|
+
})
|
|
17
|
+
: {
|
|
18
|
+
canSplit: false,
|
|
19
|
+
reason: 'Sequence has no editable source node',
|
|
20
|
+
};
|
|
21
|
+
const disabledReason = !canEditSource
|
|
22
|
+
? 'Sequence source is unavailable'
|
|
23
|
+
: propStatuses === undefined
|
|
24
|
+
? 'Waiting for sequence prop status'
|
|
25
|
+
: eligibility.canSplit
|
|
26
|
+
? null
|
|
27
|
+
: eligibility.reason;
|
|
28
|
+
return {
|
|
29
|
+
type: 'item',
|
|
30
|
+
id: 'split-sequence',
|
|
31
|
+
label: (jsx_runtime_1.jsx("span", { style: {
|
|
32
|
+
fontFamily: 'inherit',
|
|
33
|
+
fontSize: 'inherit',
|
|
34
|
+
lineHeight: 'inherit',
|
|
35
|
+
color: 'inherit',
|
|
36
|
+
}, title: disabledReason !== null && disabledReason !== void 0 ? disabledReason : 'Split at the playhead', children: "Split clip" })),
|
|
37
|
+
value: 'split-sequence',
|
|
38
|
+
keyHint: null,
|
|
39
|
+
leftItem: null,
|
|
40
|
+
quickSwitcherLabel: null,
|
|
41
|
+
subMenu: null,
|
|
42
|
+
disabled: disabledReason !== null,
|
|
43
|
+
onClick: () => {
|
|
44
|
+
if (disabledReason !== null || !eligibility.canSplit) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
// Keep the frame used to enable the menu item, even during playback.
|
|
48
|
+
(0, split_selected_timeline_item_1.splitTimelineSequenceFromSource)({
|
|
49
|
+
nodePathInfo: eligibility.nodePathInfo,
|
|
50
|
+
splitFrame,
|
|
51
|
+
}).catch(() => undefined);
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
exports.getSequenceSplitMenuItem = getSequenceSplitMenuItem;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { InteractivitySchema } from 'remotion';
|
|
1
|
+
import type { InteractivitySchema, VideoConfigValues } from 'remotion';
|
|
2
2
|
import type { OriginalPosition } from '../../error-overlay/react-overlay/utils/get-source-map';
|
|
3
|
-
export declare const useSequencePropsSubscription: ({ originalLocation, overrideId, componentIdentity, schema, effects, preferMappedNodePath, stack, }: {
|
|
3
|
+
export declare const useSequencePropsSubscription: ({ originalLocation, overrideId, componentIdentity, schema, effects, preferMappedNodePath, stack, videoConfigValues, }: {
|
|
4
4
|
overrideId: string;
|
|
5
5
|
componentIdentity: string | null;
|
|
6
6
|
schema: InteractivitySchema;
|
|
@@ -8,4 +8,5 @@ export declare const useSequencePropsSubscription: ({ originalLocation, override
|
|
|
8
8
|
originalLocation: OriginalPosition | null;
|
|
9
9
|
preferMappedNodePath: boolean;
|
|
10
10
|
stack: string | null;
|
|
11
|
+
videoConfigValues: VideoConfigValues | null;
|
|
11
12
|
}) => void;
|
|
@@ -8,7 +8,7 @@ const client_id_1 = require("../../helpers/client-id");
|
|
|
8
8
|
const ExpandedTracksProvider_1 = require("../ExpandedTracksProvider");
|
|
9
9
|
const sequence_props_subscription_store_1 = require("./sequence-props-subscription-store");
|
|
10
10
|
const should_subscribe_to_source_file_1 = require("./should-subscribe-to-source-file");
|
|
11
|
-
const useSequencePropsSubscription = ({ originalLocation, overrideId, componentIdentity, schema, effects, preferMappedNodePath, stack, }) => {
|
|
11
|
+
const useSequencePropsSubscription = ({ originalLocation, overrideId, componentIdentity, schema, effects, preferMappedNodePath, stack, videoConfigValues, }) => {
|
|
12
12
|
var _a, _b, _c;
|
|
13
13
|
const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
14
14
|
const { setOverrideIdToNodePath } = (0, react_1.useContext)(remotion_1.Internals.OverrideIdsToNodePathsSettersContext);
|
|
@@ -20,7 +20,6 @@ const useSequencePropsSubscription = ({ originalLocation, overrideId, componentI
|
|
|
20
20
|
const overrideIdToNodePathMappingsRef = (0, react_1.useRef)(overrideIdToNodePathMappings);
|
|
21
21
|
overrideIdToNodePathMappingsRef.current = overrideIdToNodePathMappings;
|
|
22
22
|
const clientId = state.type === 'connected' ? state.clientId : undefined;
|
|
23
|
-
const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
|
|
24
23
|
const effectsSignature = (0, react_1.useMemo)(() => effects.map((effect) => (0, studio_shared_1.getAllSchemaKeys)(effect).join('\0')).join('\0\0'), [effects]);
|
|
25
24
|
const validatedLocation = (0, react_1.useMemo)(() => {
|
|
26
25
|
var _a;
|
|
@@ -51,7 +50,7 @@ const useSequencePropsSubscription = ({ originalLocation, overrideId, componentI
|
|
|
51
50
|
!locationLine ||
|
|
52
51
|
locationColumn === null ||
|
|
53
52
|
!schema ||
|
|
54
|
-
|
|
53
|
+
videoConfigValues === null) {
|
|
55
54
|
return;
|
|
56
55
|
}
|
|
57
56
|
const nodePathAtResubscribe = (_a = overrideIdToNodePathMappingsRef.current[overrideId]) !== null && _a !== void 0 ? _a : null;
|
|
@@ -67,12 +66,7 @@ const useSequencePropsSubscription = ({ originalLocation, overrideId, componentI
|
|
|
67
66
|
: null,
|
|
68
67
|
clientId,
|
|
69
68
|
stack,
|
|
70
|
-
videoConfigValues
|
|
71
|
-
durationInFrames: videoConfig.durationInFrames,
|
|
72
|
-
fps: videoConfig.fps,
|
|
73
|
-
height: videoConfig.height,
|
|
74
|
-
width: videoConfig.width,
|
|
75
|
-
},
|
|
69
|
+
videoConfigValues,
|
|
76
70
|
applyOnce: (result) => {
|
|
77
71
|
if (!result.success) {
|
|
78
72
|
return;
|
|
@@ -119,7 +113,7 @@ const useSequencePropsSubscription = ({ originalLocation, overrideId, componentI
|
|
|
119
113
|
setPropStatuses,
|
|
120
114
|
setOverrideIdToNodePath,
|
|
121
115
|
stack,
|
|
122
|
-
|
|
116
|
+
videoConfigValues,
|
|
123
117
|
]);
|
|
124
118
|
};
|
|
125
119
|
exports.useSequencePropsSubscription = useSequencePropsSubscription;
|
|
@@ -35,7 +35,6 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.TopPanel = exports.useResponsiveSidebarStatus = void 0;
|
|
37
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
-
const player_1 = require("@remotion/player");
|
|
39
38
|
const react_1 = __importStar(require("react"));
|
|
40
39
|
const remotion_1 = require("remotion");
|
|
41
40
|
const mobile_layout_1 = require("../helpers/mobile-layout");
|
|
@@ -87,7 +86,7 @@ const useResponsiveSidebarStatus = () => {
|
|
|
87
86
|
};
|
|
88
87
|
exports.useResponsiveSidebarStatus = useResponsiveSidebarStatus;
|
|
89
88
|
const TopPanelInner = ({ readOnlyStudio, onMounted, drawRef, bufferStateDelayInMilliseconds }) => {
|
|
90
|
-
const { setSidebarCollapsedState, sidebarCollapsedStateRight } = (0, react_1.useContext)(sidebar_1.SidebarContext);
|
|
89
|
+
const { setSidebarCollapsedState, sidebarCollapsedStateRight, setSidebarCollapsedDuringDrag, } = (0, react_1.useContext)(sidebar_1.SidebarContext);
|
|
91
90
|
const rulersAreVisible = (0, use_is_ruler_visible_1.useIsRulerVisible)();
|
|
92
91
|
const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
93
92
|
const actualStateLeft = (0, exports.useResponsiveSidebarStatus)();
|
|
@@ -97,21 +96,6 @@ const TopPanelInner = ({ readOnlyStudio, onMounted, drawRef, bufferStateDelayInM
|
|
|
97
96
|
}
|
|
98
97
|
return 'expanded';
|
|
99
98
|
}, [sidebarCollapsedStateRight]);
|
|
100
|
-
const previousSidebarState = (0, react_1.useRef)({
|
|
101
|
-
left: actualStateLeft,
|
|
102
|
-
right: actualStateRight,
|
|
103
|
-
});
|
|
104
|
-
(0, react_1.useLayoutEffect)(() => {
|
|
105
|
-
if (previousSidebarState.current.left === actualStateLeft &&
|
|
106
|
-
previousSidebarState.current.right === actualStateRight) {
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
previousSidebarState.current = {
|
|
110
|
-
left: actualStateLeft,
|
|
111
|
-
right: actualStateRight,
|
|
112
|
-
};
|
|
113
|
-
player_1.PlayerInternals.updateAllElementsSizes();
|
|
114
|
-
}, [actualStateLeft, actualStateRight]);
|
|
115
99
|
(0, react_1.useEffect)(() => {
|
|
116
100
|
onMounted();
|
|
117
101
|
}, [onMounted]);
|
|
@@ -130,8 +114,8 @@ const TopPanelInner = ({ readOnlyStudio, onMounted, drawRef, bufferStateDelayInM
|
|
|
130
114
|
return (jsx_runtime_1.jsx(ObserveDefaultPropsContext_1.ObserveDefaultProps, { compositionId: (canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) === 'composition'
|
|
131
115
|
? canvasContent.compositionId
|
|
132
116
|
: null, readOnlyStudio: readOnlyStudio, children: jsx_runtime_1.jsxs("div", { style: container, children: [
|
|
133
|
-
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: [
|
|
134
|
-
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] }) })
|
|
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, onCollapseDuringDrag: setSidebarCollapsedDuringDrag })) : 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, onCollapseDuringDrag: setSidebarCollapsedDuringDrag })) : 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] }) })
|
|
135
119
|
] }) }), jsx_runtime_1.jsx(PreviewToolbar_1.PreviewToolbar, { bufferStateDelayInMilliseconds: bufferStateDelayInMilliseconds, readOnlyStudio: readOnlyStudio }), jsx_runtime_1.jsx(CurrentCompositionSideEffects_1.TitleUpdater, {})
|
|
136
120
|
] }) }));
|
|
137
121
|
};
|
|
@@ -5,7 +5,8 @@ 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 use_copy_feedback_1 = require("../helpers/use-copy-feedback");
|
|
9
|
+
const copy_1 = require("../icons/copy");
|
|
9
10
|
const InlineAction_1 = require("./InlineAction");
|
|
10
11
|
const KnownBugs_1 = require("./KnownBugs");
|
|
11
12
|
const ModalButton_1 = require("./ModalButton");
|
|
@@ -213,17 +214,20 @@ const UpdatesSettings = () => {
|
|
|
213
214
|
const updateActionType = (remotionSkillsInfo === null || remotionSkillsInfo === void 0 ? void 0 : remotionSkillsInfo.remotionUpgradeSkillAvailable)
|
|
214
215
|
? 'skill'
|
|
215
216
|
: 'command';
|
|
217
|
+
const { copied, markCopied } = (0, use_copy_feedback_1.useCopyFeedback)();
|
|
216
218
|
const onClick = (0, react_1.useCallback)(() => {
|
|
217
219
|
if (updateAction === null) {
|
|
218
220
|
return;
|
|
219
221
|
}
|
|
220
|
-
(0, copy_text_1.copyText)(updateAction)
|
|
222
|
+
(0, copy_text_1.copyText)(updateAction)
|
|
223
|
+
.then(markCopied)
|
|
224
|
+
.catch((err) => {
|
|
221
225
|
(0, NotificationCenter_1.showNotification)('Could not copy: ' + err.message, 2000);
|
|
222
226
|
});
|
|
223
|
-
}, [updateAction]);
|
|
227
|
+
}, [markCopied, updateAction]);
|
|
224
228
|
const renderCopyAction = (0, react_1.useCallback)((color) => {
|
|
225
|
-
return jsx_runtime_1.jsx(
|
|
226
|
-
}, []);
|
|
229
|
+
return jsx_runtime_1.jsx(copy_1.CopyIcon, { copied: copied, color: color, style: copyIcon });
|
|
230
|
+
}, [copied]);
|
|
227
231
|
const onUpgrade = (0, react_1.useCallback)(() => {
|
|
228
232
|
if (info) {
|
|
229
233
|
upgrade(info.latestVersion);
|
|
@@ -22,10 +22,13 @@ const ZoomPersistor = () => {
|
|
|
22
22
|
const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
23
23
|
const urlState = (0, load_canvas_content_from_url_1.deriveCanvasContentFromUrl)();
|
|
24
24
|
const isActive = urlState &&
|
|
25
|
-
urlState.type === 'composition' &&
|
|
26
25
|
canvasContent &&
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
((urlState.type === 'composition' &&
|
|
27
|
+
canvasContent.type === 'composition' &&
|
|
28
|
+
urlState.compositionId === canvasContent.compositionId) ||
|
|
29
|
+
(urlState.type === 'asset' &&
|
|
30
|
+
canvasContent.type === 'asset' &&
|
|
31
|
+
urlState.asset === canvasContent.asset));
|
|
29
32
|
(0, react_1.useEffect)(() => {
|
|
30
33
|
if (!isActive) {
|
|
31
34
|
return;
|
|
@@ -218,7 +218,7 @@ const getCompositionMenuItems = ({ composition, connectionStatus, resolvedLocati
|
|
|
218
218
|
navigator.clipboard
|
|
219
219
|
.writeText(composition.id)
|
|
220
220
|
.then(() => {
|
|
221
|
-
(0, NotificationCenter_1.showNotification)('Copied
|
|
221
|
+
(0, NotificationCenter_1.showNotification)('Copied composition name', 1000);
|
|
222
222
|
})
|
|
223
223
|
.catch((err) => {
|
|
224
224
|
(0, NotificationCenter_1.showNotification)(`Could not copy to clipboard: ${err.message}`, 1000);
|