@remotion/studio 4.0.468 → 4.0.469
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/AudioWaveform.d.ts +1 -0
- package/dist/components/AudioWaveform.js +23 -22
- package/dist/components/CompositionSelectorItem.js +1 -1
- package/dist/components/ContextMenu.d.ts +1 -0
- package/dist/components/ContextMenu.js +3 -2
- package/dist/components/EditorGuides/Guide.js +1 -1
- package/dist/components/ExpandedTracksProvider.js +3 -8
- package/dist/components/Menu/MenuItem.js +2 -2
- package/dist/components/Menu/MenuSubItem.js +5 -5
- package/dist/components/PreviewToolbar.js +2 -4
- package/dist/components/Timeline/Timeline.js +14 -13
- package/dist/components/Timeline/TimelineDragHandler.js +1 -1
- package/dist/components/Timeline/TimelineEffectFieldRow.d.ts +2 -0
- package/dist/components/Timeline/TimelineEffectFieldRow.js +9 -14
- package/dist/components/Timeline/TimelineEffectGroupRow.js +13 -4
- package/dist/components/Timeline/TimelineExpandedKeyframeRow.d.ts +11 -0
- package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +23 -0
- package/dist/components/Timeline/TimelineExpandedRow.js +22 -6
- package/dist/components/Timeline/TimelineExpandedSection.js +2 -2
- package/dist/components/Timeline/TimelineExpandedTrackKeyframes.d.ts +1 -1
- package/dist/components/Timeline/TimelineExpandedTrackKeyframes.js +9 -120
- package/dist/components/Timeline/TimelineFieldLabel.d.ts +6 -0
- package/dist/components/Timeline/TimelineFieldLabel.js +30 -0
- package/dist/components/Timeline/TimelineFieldRow.d.ts +3 -2
- package/dist/components/Timeline/TimelineFieldRow.js +7 -13
- package/dist/components/Timeline/TimelineItemStack.d.ts +5 -0
- package/dist/components/Timeline/TimelineItemStack.js +82 -0
- package/dist/components/Timeline/TimelineKeyframeDiamond.d.ts +7 -0
- package/dist/components/Timeline/TimelineKeyframeDiamond.js +87 -0
- package/dist/components/Timeline/TimelineLayerEye.js +1 -0
- package/dist/components/Timeline/TimelineList.js +13 -9
- package/dist/components/Timeline/TimelineListItem.d.ts +0 -1
- package/dist/components/Timeline/TimelineListItem.js +100 -31
- package/dist/components/Timeline/TimelineMediaInfo.d.ts +13 -1
- package/dist/components/Timeline/TimelineMediaInfo.js +33 -80
- package/dist/components/Timeline/TimelineRowChrome.d.ts +8 -1
- package/dist/components/Timeline/TimelineRowChrome.js +46 -6
- package/dist/components/Timeline/TimelineSchemaField.js +7 -2
- package/dist/components/Timeline/TimelineSelection.d.ts +41 -0
- package/dist/components/Timeline/TimelineSelection.js +160 -0
- package/dist/components/Timeline/TimelineSequence.js +1 -1
- package/dist/components/Timeline/TimelineSequenceName.d.ts +7 -0
- package/dist/components/Timeline/TimelineSequenceName.js +50 -0
- package/dist/components/Timeline/TimelineTrack.d.ts +5 -0
- package/dist/components/Timeline/TimelineTrack.js +64 -0
- package/dist/components/Timeline/TimelineTracks.js +2 -16
- package/dist/components/Timeline/TimelineUvCoordinateField.d.ts +11 -0
- package/dist/components/Timeline/TimelineUvCoordinateField.js +126 -0
- package/dist/components/Timeline/TimelineVideoInfo.js +11 -12
- package/dist/components/Timeline/get-node-keyframes.d.ts +11 -0
- package/dist/components/Timeline/get-node-keyframes.js +23 -0
- package/dist/components/Timeline/get-timeline-keyframes.js +6 -8
- package/dist/components/Timeline/timeline-field-row-layout.d.ts +1 -0
- package/dist/components/Timeline/timeline-field-row-layout.js +11 -1
- package/dist/components/Timeline/use-expanded-track-keyframe-rows.d.ts +17 -0
- package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +45 -0
- package/dist/components/Timeline/use-open-sequence-in-editor.d.ts +6 -0
- package/dist/components/Timeline/use-open-sequence-in-editor.js +31 -0
- package/dist/esm/{chunk-8q828zk7.js → chunk-1mp51e0w.js} +3328 -2705
- package/dist/esm/internals.mjs +3328 -2705
- package/dist/esm/previewEntry.mjs +3338 -2715
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/colors.d.ts +1 -1
- package/dist/helpers/colors.js +1 -1
- package/dist/helpers/timeline-layout.d.ts +8 -7
- package/dist/helpers/timeline-layout.js +9 -8
- package/dist/helpers/timeline-node-path-key.d.ts +2 -0
- package/dist/helpers/timeline-node-path-key.js +10 -0
- package/package.json +10 -10
- package/dist/components/Timeline/TimelineStack/index.d.ts +0 -8
- package/dist/components/Timeline/TimelineStack/index.js +0 -119
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { LoopDisplay } from 'remotion';
|
|
3
3
|
export declare const AudioWaveform: React.FC<{
|
|
4
4
|
readonly src: string;
|
|
5
|
+
readonly height: number;
|
|
5
6
|
readonly visualizationWidth: number;
|
|
6
7
|
readonly startFrom: number;
|
|
7
8
|
readonly durationInFrames: number;
|
|
@@ -21,12 +21,15 @@ const canUseAudioWaveformWorker = () => {
|
|
|
21
21
|
}
|
|
22
22
|
return 'transferControlToOffscreen' in HTMLCanvasElement.prototype;
|
|
23
23
|
};
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
const getContainerStyle = (height) => {
|
|
25
|
+
return {
|
|
26
|
+
display: 'flex',
|
|
27
|
+
flexDirection: 'row',
|
|
28
|
+
alignItems: 'center',
|
|
29
|
+
position: 'relative',
|
|
30
|
+
width: '100%',
|
|
31
|
+
height,
|
|
32
|
+
};
|
|
30
33
|
};
|
|
31
34
|
const errorMessage = {
|
|
32
35
|
fontSize: 13,
|
|
@@ -74,7 +77,7 @@ const drawLoopedWaveform = ({ canvas, peaks, volume, visualizationWidth, loopWid
|
|
|
74
77
|
ctx.fillStyle = pattern;
|
|
75
78
|
ctx.fillRect(0, 0, w, h);
|
|
76
79
|
};
|
|
77
|
-
const AudioWaveform = ({ src, startFrom, durationInFrames, visualizationWidth, volume, doesVolumeChange, playbackRate, loopDisplay, }) => {
|
|
80
|
+
const AudioWaveform = ({ src, height, startFrom, durationInFrames, visualizationWidth, volume, doesVolumeChange, playbackRate, loopDisplay, }) => {
|
|
78
81
|
const [peaks, setPeaks] = (0, react_1.useState)(null);
|
|
79
82
|
const [error, setError] = (0, react_1.useState)(null);
|
|
80
83
|
const [waveformCanvasKey, setWaveformCanvasKey] = (0, react_1.useState)(0);
|
|
@@ -83,12 +86,12 @@ const AudioWaveform = ({ src, startFrom, durationInFrames, visualizationWidth, v
|
|
|
83
86
|
if (vidConf === null) {
|
|
84
87
|
throw new Error('Expected video config');
|
|
85
88
|
}
|
|
86
|
-
const containerRef = (0, react_1.useRef)(null);
|
|
87
89
|
const waveformCanvas = (0, react_1.useRef)(null);
|
|
88
90
|
const volumeCanvas = (0, react_1.useRef)(null);
|
|
89
91
|
const waveformWorker = (0, react_1.useRef)(null);
|
|
90
92
|
const hasTransferredCanvas = (0, react_1.useRef)(false);
|
|
91
93
|
const latestRequestId = (0, react_1.useRef)(0);
|
|
94
|
+
const shouldRenderVolumeOverlay = doesVolumeChange && typeof volume === 'string';
|
|
92
95
|
(0, react_1.useEffect)(() => {
|
|
93
96
|
if (canUseWorkerPath) {
|
|
94
97
|
return;
|
|
@@ -173,11 +176,10 @@ const AudioWaveform = ({ src, startFrom, durationInFrames, visualizationWidth, v
|
|
|
173
176
|
]);
|
|
174
177
|
(0, react_1.useEffect)(() => {
|
|
175
178
|
const { current: canvasElement } = waveformCanvas;
|
|
176
|
-
|
|
177
|
-
if (!canvasElement || !containerElement) {
|
|
179
|
+
if (!canvasElement) {
|
|
178
180
|
return;
|
|
179
181
|
}
|
|
180
|
-
const h =
|
|
182
|
+
const h = height;
|
|
181
183
|
const w = Math.ceil(visualizationWidth);
|
|
182
184
|
const vol = typeof volume === 'number' ? volume : 1;
|
|
183
185
|
if (canUseWorkerPath) {
|
|
@@ -229,6 +231,7 @@ const AudioWaveform = ({ src, startFrom, durationInFrames, visualizationWidth, v
|
|
|
229
231
|
}, [
|
|
230
232
|
canUseWorkerPath,
|
|
231
233
|
durationInFrames,
|
|
234
|
+
height,
|
|
232
235
|
loopDisplay,
|
|
233
236
|
playbackRate,
|
|
234
237
|
portionPeaks,
|
|
@@ -240,12 +243,14 @@ const AudioWaveform = ({ src, startFrom, durationInFrames, visualizationWidth, v
|
|
|
240
243
|
waveformCanvasKey,
|
|
241
244
|
]);
|
|
242
245
|
(0, react_1.useEffect)(() => {
|
|
246
|
+
if (!shouldRenderVolumeOverlay) {
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
243
249
|
const { current: volumeCanvasElement } = volumeCanvas;
|
|
244
|
-
|
|
245
|
-
if (!volumeCanvasElement || !containerElement) {
|
|
250
|
+
if (!volumeCanvasElement) {
|
|
246
251
|
return;
|
|
247
252
|
}
|
|
248
|
-
const h =
|
|
253
|
+
const h = height;
|
|
249
254
|
const context = volumeCanvasElement.getContext('2d');
|
|
250
255
|
if (!context) {
|
|
251
256
|
return;
|
|
@@ -253,9 +258,6 @@ const AudioWaveform = ({ src, startFrom, durationInFrames, visualizationWidth, v
|
|
|
253
258
|
volumeCanvasElement.width = Math.ceil(visualizationWidth);
|
|
254
259
|
volumeCanvasElement.height = h;
|
|
255
260
|
context.clearRect(0, 0, visualizationWidth, h);
|
|
256
|
-
if (!doesVolumeChange || typeof volume === 'number') {
|
|
257
|
-
return;
|
|
258
|
-
}
|
|
259
261
|
const volumes = volume.split(',').map((v) => Number(v));
|
|
260
262
|
context.beginPath();
|
|
261
263
|
context.moveTo(0, h);
|
|
@@ -271,17 +273,16 @@ const AudioWaveform = ({ src, startFrom, durationInFrames, visualizationWidth, v
|
|
|
271
273
|
});
|
|
272
274
|
context.strokeStyle = colors_1.LIGHT_TRANSPARENT;
|
|
273
275
|
context.stroke();
|
|
274
|
-
}, [visualizationWidth, volume
|
|
276
|
+
}, [height, shouldRenderVolumeOverlay, visualizationWidth, volume]);
|
|
275
277
|
if (error) {
|
|
276
278
|
// eslint-disable-next-line no-console
|
|
277
279
|
console.error(error);
|
|
278
|
-
return (jsx_runtime_1.jsx("div", { style:
|
|
280
|
+
return (jsx_runtime_1.jsx("div", { style: getContainerStyle(height), children: jsx_runtime_1.jsx("div", { style: errorMessage, children: "No waveform available. Audio might not support CORS." }) }));
|
|
279
281
|
}
|
|
280
282
|
if (!canUseWorkerPath && !peaks) {
|
|
281
283
|
return null;
|
|
282
284
|
}
|
|
283
|
-
return (jsx_runtime_1.jsxs("div", {
|
|
284
|
-
jsx_runtime_1.jsx("canvas", { ref: waveformCanvas, style: waveformCanvasStyle }, waveformCanvasKey), jsx_runtime_1.jsx("canvas", { ref: volumeCanvas, style: volumeCanvasStyle })
|
|
285
|
-
] }));
|
|
285
|
+
return (jsx_runtime_1.jsxs("div", { style: getContainerStyle(height), children: [
|
|
286
|
+
jsx_runtime_1.jsx("canvas", { ref: waveformCanvas, style: waveformCanvasStyle }, waveformCanvasKey), shouldRenderVolumeOverlay ? (jsx_runtime_1.jsx("canvas", { ref: volumeCanvas, style: volumeCanvasStyle })) : null] }));
|
|
286
287
|
};
|
|
287
288
|
exports.AudioWaveform = AudioWaveform;
|
|
@@ -131,7 +131,7 @@ const CompositionSelectorItem = ({ item, level, currentComposition, tabIndex, se
|
|
|
131
131
|
})
|
|
132
132
|
: null] }));
|
|
133
133
|
}
|
|
134
|
-
return (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: contextMenu, children: jsx_runtime_1.jsx(layout_1.Row, { align: "center", children: jsx_runtime_1.jsxs("a", { ref: compositionRowRef, style: style, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, tabIndex: tabIndex, onClick: onClick, onKeyPress: onKeyPress, type: "button", title: item.composition.id, className: "__remotion-composition", "data-compname": item.composition.id, children: [(0, is_composition_still_1.isCompositionStill)(item.composition) ? (jsx_runtime_1.jsx(still_1.StillIcon, { color: hovered || selected ? 'white' : colors_1.LIGHT_TEXT, style: iconStyle })) : (jsx_runtime_1.jsx(video_1.FilmIcon, { color: hovered || selected ? 'white' : colors_1.LIGHT_TEXT, style: iconStyle })), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: label, children: item.composition.id }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(CompositionContextButton_1.CompositionContextButton, { values: contextMenu, visible: hovered }), jsx_runtime_1.jsx(SidebarRenderButton_1.SidebarRenderButton, { visible: hovered, composition: item.composition })
|
|
134
|
+
return (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: contextMenu, onOpen: null, children: jsx_runtime_1.jsx(layout_1.Row, { align: "center", children: jsx_runtime_1.jsxs("a", { ref: compositionRowRef, style: style, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, tabIndex: tabIndex, onClick: onClick, onKeyPress: onKeyPress, type: "button", title: item.composition.id, className: "__remotion-composition", "data-compname": item.composition.id, children: [(0, is_composition_still_1.isCompositionStill)(item.composition) ? (jsx_runtime_1.jsx(still_1.StillIcon, { color: hovered || selected ? 'white' : colors_1.LIGHT_TEXT, style: iconStyle })) : (jsx_runtime_1.jsx(video_1.FilmIcon, { color: hovered || selected ? 'white' : colors_1.LIGHT_TEXT, style: iconStyle })), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: label, children: item.composition.id }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(CompositionContextButton_1.CompositionContextButton, { values: contextMenu, visible: hovered }), jsx_runtime_1.jsx(SidebarRenderButton_1.SidebarRenderButton, { visible: hovered, composition: item.composition })
|
|
135
135
|
] }) }) }));
|
|
136
136
|
};
|
|
137
137
|
exports.CompositionSelectorItem = CompositionSelectorItem;
|
|
@@ -14,7 +14,7 @@ const z_index_1 = require("../state/z-index");
|
|
|
14
14
|
const portals_1 = require("./Menu/portals");
|
|
15
15
|
const styles_1 = require("./Menu/styles");
|
|
16
16
|
const MenuContent_1 = require("./NewComposition/MenuContent");
|
|
17
|
-
const ContextMenu = ({ children, values }) => {
|
|
17
|
+
const ContextMenu = ({ children, values, onOpen }) => {
|
|
18
18
|
const ref = (0, react_1.useRef)(null);
|
|
19
19
|
const [opened, setOpened] = (0, react_1.useState)({ type: 'not-open' });
|
|
20
20
|
const { currentZIndex } = (0, z_index_1.useZIndex)();
|
|
@@ -34,6 +34,7 @@ const ContextMenu = ({ children, values }) => {
|
|
|
34
34
|
const onClick = (e) => {
|
|
35
35
|
e.preventDefault();
|
|
36
36
|
e.stopPropagation();
|
|
37
|
+
onOpen === null || onOpen === void 0 ? void 0 : onOpen();
|
|
37
38
|
setOpened({ type: 'open', left: e.clientX, top: e.clientY });
|
|
38
39
|
return false;
|
|
39
40
|
};
|
|
@@ -41,7 +42,7 @@ const ContextMenu = ({ children, values }) => {
|
|
|
41
42
|
return () => {
|
|
42
43
|
current.removeEventListener('contextmenu', onClick);
|
|
43
44
|
};
|
|
44
|
-
}, [size]);
|
|
45
|
+
}, [onOpen, size]);
|
|
45
46
|
const spaceToBottom = (0, react_1.useMemo)(() => {
|
|
46
47
|
if (size && opened.type === 'open') {
|
|
47
48
|
return size.windowSize.height - opened.top;
|
|
@@ -80,7 +80,7 @@ const GuideComp = ({ guide, canvasDimensions, scale }) => {
|
|
|
80
80
|
},
|
|
81
81
|
];
|
|
82
82
|
}, [guide.id, setGuidesList]);
|
|
83
|
-
return (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: values, children: jsx_runtime_1.jsx("div", { style: guideStyle, onMouseDown: onMouseDown, className: "__remotion_editor_guide", onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, children: jsx_runtime_1.jsx("div", { style: guideContentStyle, className: [
|
|
83
|
+
return (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: values, onOpen: null, children: jsx_runtime_1.jsx("div", { style: guideStyle, onMouseDown: onMouseDown, className: "__remotion_editor_guide", onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, children: jsx_runtime_1.jsx("div", { style: guideContentStyle, className: [
|
|
84
84
|
'__remotion_editor_guide_content',
|
|
85
85
|
selectedGuideId === guide.id || hoveredGuideId === guide.id
|
|
86
86
|
? '__remotion_editor_guide_selected'
|
|
@@ -2,15 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ExpandedTracksProvider = exports.ExpandedTracksSetterContext = exports.ExpandedTracksGetterContext = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const studio_shared_1 = require("@remotion/studio-shared");
|
|
6
5
|
const react_1 = require("react");
|
|
7
6
|
const migrate_expanded_tracks_for_subscription_key_1 = require("../helpers/migrate-expanded-tracks-for-subscription-key");
|
|
8
7
|
const persist_boolean_map_1 = require("../helpers/persist-boolean-map");
|
|
9
|
-
const
|
|
10
|
-
(0, studio_shared_1.stringifySequenceExpandedRowKey)(info.sequenceSubscriptionKey),
|
|
11
|
-
info.auxiliaryKeys.join('.'),
|
|
12
|
-
info.index,
|
|
13
|
-
].join('.');
|
|
8
|
+
const timeline_node_path_key_1 = require("../helpers/timeline-node-path-key");
|
|
14
9
|
const SESSION_STORAGE_KEY = 'remotion.editor.expandedTracks';
|
|
15
10
|
const loadExpandedTracks = () => {
|
|
16
11
|
return (0, persist_boolean_map_1.loadPersistedBooleanMap)(SESSION_STORAGE_KEY);
|
|
@@ -32,7 +27,7 @@ const ExpandedTracksProvider = ({ children }) => {
|
|
|
32
27
|
const [expandedTracks, setExpandedTracks] = (0, react_1.useState)(loadExpandedTracks);
|
|
33
28
|
const toggleTrack = (0, react_1.useCallback)((nodePathInfo) => {
|
|
34
29
|
setExpandedTracks((prev) => {
|
|
35
|
-
const key =
|
|
30
|
+
const key = (0, timeline_node_path_key_1.timelineNodePathInfoToKey)(nodePathInfo);
|
|
36
31
|
const next = (0, persist_boolean_map_1.toggleBooleanMapKey)(prev, key);
|
|
37
32
|
(0, persist_boolean_map_1.persistBooleanMap)(SESSION_STORAGE_KEY, next);
|
|
38
33
|
return next;
|
|
@@ -51,7 +46,7 @@ const ExpandedTracksProvider = ({ children }) => {
|
|
|
51
46
|
const getterValue = (0, react_1.useMemo)(() => ({
|
|
52
47
|
getIsExpanded: (nodePathInfo) => {
|
|
53
48
|
var _a;
|
|
54
|
-
return (_a = expandedTracks[
|
|
49
|
+
return (_a = expandedTracks[(0, timeline_node_path_key_1.timelineNodePathInfoToKey)(nodePathInfo)]) !== null && _a !== void 0 ? _a : false;
|
|
55
50
|
},
|
|
56
51
|
}), [expandedTracks]);
|
|
57
52
|
const setterValue = (0, react_1.useMemo)(() => ({
|
|
@@ -19,9 +19,9 @@ const portals_1 = require("./portals");
|
|
|
19
19
|
const styles_1 = require("./styles");
|
|
20
20
|
const SubMenu_1 = require("./SubMenu");
|
|
21
21
|
const container = {
|
|
22
|
-
paddingTop:
|
|
23
|
-
paddingBottom:
|
|
24
|
-
paddingLeft:
|
|
22
|
+
paddingTop: 4,
|
|
23
|
+
paddingBottom: 4,
|
|
24
|
+
paddingLeft: 8,
|
|
25
25
|
paddingRight: 8,
|
|
26
26
|
cursor: 'default',
|
|
27
27
|
};
|
|
@@ -38,8 +38,8 @@ const keyHintCss = {
|
|
|
38
38
|
fontSize: 13,
|
|
39
39
|
};
|
|
40
40
|
const leftSpace = {
|
|
41
|
-
width:
|
|
42
|
-
marginLeft: -
|
|
41
|
+
width: 20,
|
|
42
|
+
marginLeft: -2,
|
|
43
43
|
display: 'inline-flex',
|
|
44
44
|
justifyContent: 'center',
|
|
45
45
|
alignItems: 'center',
|
|
@@ -24,13 +24,11 @@ const RenderButton_1 = require("./RenderButton");
|
|
|
24
24
|
const SizeSelector_1 = require("./SizeSelector");
|
|
25
25
|
const TimelineZoomControls_1 = require("./Timeline/TimelineZoomControls");
|
|
26
26
|
const TimelineInOutToggle_1 = require("./TimelineInOutToggle");
|
|
27
|
-
const TOOLBAR_HEIGHT =
|
|
27
|
+
const TOOLBAR_HEIGHT = 50;
|
|
28
28
|
const container = {
|
|
29
29
|
display: 'flex',
|
|
30
30
|
justifyContent: 'center',
|
|
31
31
|
borderTop: '1px solid rgba(0, 0, 0, 0.5)',
|
|
32
|
-
paddingTop: 2,
|
|
33
|
-
paddingBottom: 2,
|
|
34
32
|
alignItems: 'center',
|
|
35
33
|
flexDirection: 'row',
|
|
36
34
|
background: colors_1.BACKGROUND,
|
|
@@ -64,7 +62,7 @@ const scrollIndicatorRight = {
|
|
|
64
62
|
};
|
|
65
63
|
const sideContainer = {
|
|
66
64
|
width: 300,
|
|
67
|
-
height:
|
|
65
|
+
height: 36,
|
|
68
66
|
display: 'flex',
|
|
69
67
|
flexDirection: 'row',
|
|
70
68
|
alignItems: 'center',
|
|
@@ -57,6 +57,7 @@ const TimelineList_1 = require("./TimelineList");
|
|
|
57
57
|
const TimelinePinchZoom_1 = require("./TimelinePinchZoom");
|
|
58
58
|
const TimelinePlayCursorSyncer_1 = require("./TimelinePlayCursorSyncer");
|
|
59
59
|
const TimelineScrollable_1 = require("./TimelineScrollable");
|
|
60
|
+
const TimelineSelection_1 = require("./TimelineSelection");
|
|
60
61
|
const TimelineSlider_1 = require("./TimelineSlider");
|
|
61
62
|
const TimelineTimeIndicators_1 = require("./TimelineTimeIndicators");
|
|
62
63
|
const TimelineTracks_1 = require("./TimelineTracks");
|
|
@@ -98,18 +99,18 @@ const TimelineInner = () => {
|
|
|
98
99
|
: filtered;
|
|
99
100
|
}, [filtered]);
|
|
100
101
|
const hasBeenCut = filtered.length > shown.length;
|
|
101
|
-
return (jsx_runtime_1.
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
102
|
+
return (jsx_runtime_1.jsx("div", { ref: timeline_refs_1.timelineVerticalScroll, style: container, className: 'css-reset ' + is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsxs(TimelineSelection_1.TimelineSelectionProvider, { children: [sequences.map((sequence) => {
|
|
103
|
+
if (!sequence.controls || !previewConnected || !sequence.getStack()) {
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
return (jsx_runtime_1.jsx(SubscribeToNodePaths_1.SubscribeToNodePaths, { overrideId: sequence.controls.overrideId, schema: sequence.controls.schema, getStack: sequence.getStack, effects: sequence.effects }, sequence.id));
|
|
107
|
+
}), jsx_runtime_1.jsx(SequencePropsObserver_1.SequencePropsObserver, {}), 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: [
|
|
108
|
+
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, children: [
|
|
109
|
+
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: [
|
|
110
|
+
jsx_runtime_1.jsx(TimelineTracks_1.TimelineTracks, { timeline: shown, hasBeenCut: hasBeenCut }), jsx_runtime_1.jsx(TimelineInOutPointer_1.TimelineInOutPointer, {}), jsx_runtime_1.jsx(TimelinePlayCursorSyncer_1.TimelinePlayCursorSyncer, {}), jsx_runtime_1.jsx(TimelineDragHandler_1.TimelineDragHandler, {}), jsx_runtime_1.jsx(TimelineTimeIndicators_1.TimelineTimeIndicators, {}), jsx_runtime_1.jsx(TimelineSlider_1.TimelineSlider, {})
|
|
111
|
+
] }) })
|
|
112
|
+
] })
|
|
113
|
+
] })) })
|
|
114
|
+
] }) }));
|
|
114
115
|
};
|
|
115
116
|
exports.Timeline = react_1.default.memo(TimelineInner);
|
|
@@ -501,6 +501,6 @@ const TimelineDragHandlerInner = () => {
|
|
|
501
501
|
];
|
|
502
502
|
}, [setInAndOutFrames, videoConfig.id]);
|
|
503
503
|
return (jsx_runtime_1.jsxs("div", { style: style, onPointerDown: onPointerDown, children: [
|
|
504
|
-
jsx_runtime_1.jsx("div", { style: inner, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME }), inFrame !== null && (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: inContextMenu, children: jsx_runtime_1.jsx(TimelineInOutPointerHandle_1.TimelineInOutPointerHandle, { type: "in", atFrame: inFrame, dragging: inOutDragging.dragging === 'in' }) })), outFrame !== null && (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: outContextMenu, children: jsx_runtime_1.jsx(TimelineInOutPointerHandle_1.TimelineInOutPointerHandle, { type: "out", dragging: inOutDragging.dragging === 'out', atFrame: outFrame }) }))] }));
|
|
504
|
+
jsx_runtime_1.jsx("div", { style: inner, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME }), inFrame !== null && (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: inContextMenu, onOpen: null, children: jsx_runtime_1.jsx(TimelineInOutPointerHandle_1.TimelineInOutPointerHandle, { type: "in", atFrame: inFrame, dragging: inOutDragging.dragging === 'in' }) })), outFrame !== null && (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: outContextMenu, onOpen: null, children: jsx_runtime_1.jsx(TimelineInOutPointerHandle_1.TimelineInOutPointerHandle, { type: "out", dragging: inOutDragging.dragging === 'out', atFrame: outFrame }) }))] }));
|
|
505
505
|
};
|
|
506
506
|
const TimelineDragHandlerInnerMemo = react_1.default.memo(TimelineDragHandlerInner);
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { SequencePropsSubscriptionKey } from 'remotion';
|
|
3
3
|
import type { CodePosition } from '../../error-overlay/react-overlay/utils/get-source-map';
|
|
4
|
+
import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-sort-key';
|
|
4
5
|
import type { EffectSchemaFieldInfo } from '../../helpers/timeline-layout';
|
|
5
6
|
export declare const TimelineEffectFieldRow: React.FC<{
|
|
6
7
|
readonly field: EffectSchemaFieldInfo;
|
|
7
8
|
readonly validatedLocation: CodePosition;
|
|
8
9
|
readonly rowDepth: number;
|
|
9
10
|
readonly nodePath: SequencePropsSubscriptionKey;
|
|
11
|
+
readonly nodePathInfo: SequenceNodePathInfo;
|
|
10
12
|
}>;
|
|
@@ -6,23 +6,17 @@ const studio_shared_1 = require("@remotion/studio-shared");
|
|
|
6
6
|
const react_1 = require("react");
|
|
7
7
|
const remotion_1 = require("remotion");
|
|
8
8
|
const client_id_1 = require("../../helpers/client-id");
|
|
9
|
-
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
10
9
|
const call_api_1 = require("../call-api");
|
|
11
10
|
const get_timeline_keyframes_1 = require("./get-timeline-keyframes");
|
|
12
11
|
const save_prop_queue_1 = require("./save-prop-queue");
|
|
13
12
|
const timeline_field_row_layout_1 = require("./timeline-field-row-layout");
|
|
14
13
|
const TimelineExpandArrowButton_1 = require("./TimelineExpandArrowButton");
|
|
14
|
+
const TimelineFieldLabel_1 = require("./TimelineFieldLabel");
|
|
15
15
|
const TimelineLayerEye_1 = require("./TimelineLayerEye");
|
|
16
16
|
const TimelineRowChrome_1 = require("./TimelineRowChrome");
|
|
17
17
|
const TimelineSchemaField_1 = require("./TimelineSchemaField");
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
};
|
|
21
|
-
const fieldName = {
|
|
22
|
-
fontSize: 12,
|
|
23
|
-
color: 'rgba(255, 255, 255, 0.8)',
|
|
24
|
-
userSelect: 'none',
|
|
25
|
-
};
|
|
18
|
+
const TimelineSelection_1 = require("./TimelineSelection");
|
|
19
|
+
const fieldRowBase = {};
|
|
26
20
|
const Value = ({ field, nodePath, validatedLocation }) => {
|
|
27
21
|
var _a;
|
|
28
22
|
var _b;
|
|
@@ -130,7 +124,8 @@ const Value = ({ field, nodePath, validatedLocation }) => {
|
|
|
130
124
|
throw new Error(`Unsupported effect status: ${effectStatus.reason}`);
|
|
131
125
|
}
|
|
132
126
|
if (propStatus === null || !propStatus.canUpdate) {
|
|
133
|
-
if ((propStatus === null || propStatus === void 0 ? void 0 : propStatus.reason) === 'computed'
|
|
127
|
+
if ((propStatus === null || propStatus === void 0 ? void 0 : propStatus.reason) === 'computed' ||
|
|
128
|
+
(propStatus === null || propStatus === void 0 ? void 0 : propStatus.reason) === 'keyframed') {
|
|
134
129
|
return jsx_runtime_1.jsx(TimelineSchemaField_1.UnsupportedStatus, { label: (0, get_timeline_keyframes_1.getComputedStatusLabel)(propStatus) });
|
|
135
130
|
}
|
|
136
131
|
return null;
|
|
@@ -143,17 +138,17 @@ const Value = ({ field, nodePath, validatedLocation }) => {
|
|
|
143
138
|
});
|
|
144
139
|
return (jsx_runtime_1.jsx(TimelineSchemaField_1.TimelineFieldValue, { field: field, propStatus: propStatus, onSave: onSave, onDragValueChange: onDragValueChange, onDragEnd: onDragEnd, effectiveValue: effectiveValue }));
|
|
145
140
|
};
|
|
146
|
-
const TimelineEffectFieldRow = ({ field, validatedLocation, rowDepth, nodePath }) => {
|
|
141
|
+
const TimelineEffectFieldRow = ({ field, validatedLocation, rowDepth, nodePath, nodePathInfo }) => {
|
|
147
142
|
var _a;
|
|
143
|
+
const selection = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo);
|
|
148
144
|
const style = (0, react_1.useMemo)(() => {
|
|
149
145
|
return {
|
|
150
146
|
...fieldRowBase,
|
|
151
147
|
height: field.rowHeight,
|
|
152
148
|
};
|
|
153
149
|
}, [field.rowHeight]);
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
jsx_runtime_1.jsx("div", { style: labelRowStyle, children: jsx_runtime_1.jsx("span", { style: fieldName, children: (_a = field.description) !== null && _a !== void 0 ? _a : field.key }) }), jsx_runtime_1.jsx(Value, { field: field, nodePath: nodePath, validatedLocation: validatedLocation })
|
|
150
|
+
return (jsx_runtime_1.jsxs(TimelineRowChrome_1.TimelineRowChrome, { depth: rowDepth, eye: jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {}), arrow: jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {}), style: style, selected: selection.selected, selectable: selection.selectable, onSelect: selection.onSelect, showSelectedBackground: true, containsSelection: false, outerHeight: null, children: [
|
|
151
|
+
jsx_runtime_1.jsx(TimelineFieldLabel_1.TimelineFieldLabel, { rowDepth: rowDepth, selected: selection.selected, label: (_a = field.description) !== null && _a !== void 0 ? _a : field.key }), jsx_runtime_1.jsx("div", { style: timeline_field_row_layout_1.timelineFieldValueColumnStyle, children: jsx_runtime_1.jsx(Value, { field: field, nodePath: nodePath, validatedLocation: validatedLocation }) })
|
|
157
152
|
] }));
|
|
158
153
|
};
|
|
159
154
|
exports.TimelineEffectFieldRow = TimelineEffectFieldRow;
|
|
@@ -13,6 +13,7 @@ const save_effect_prop_1 = require("./save-effect-prop");
|
|
|
13
13
|
const TimelineExpandArrowButton_1 = require("./TimelineExpandArrowButton");
|
|
14
14
|
const TimelineLayerEye_1 = require("./TimelineLayerEye");
|
|
15
15
|
const TimelineRowChrome_1 = require("./TimelineRowChrome");
|
|
16
|
+
const TimelineSelection_1 = require("./TimelineSelection");
|
|
16
17
|
const rowLabel = {
|
|
17
18
|
fontSize: 12,
|
|
18
19
|
color: 'rgba(255, 255, 255, 0.8)',
|
|
@@ -26,6 +27,7 @@ const TimelineEffectGroupRow = ({ label, nodePathInfo, effectIndex, effectSchema
|
|
|
26
27
|
const previewConnected = previewServerState.type === 'connected';
|
|
27
28
|
const { codeValues } = (0, react_1.useContext)(remotion_1.Internals.VisualModeCodeValuesContext);
|
|
28
29
|
const { setCodeValues } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
30
|
+
const selection = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo);
|
|
29
31
|
const effectStatus = (0, react_1.useMemo)(() => remotion_1.Internals.getEffectCodeValuesCtx({
|
|
30
32
|
codeValues,
|
|
31
33
|
nodePath,
|
|
@@ -121,24 +123,31 @@ const TimelineEffectGroupRow = ({ label, nodePathInfo, effectIndex, effectSchema
|
|
|
121
123
|
const isExpanded = getIsExpanded(nodePathInfo);
|
|
122
124
|
const rowStyle = (0, react_1.useMemo)(() => ({
|
|
123
125
|
height: timeline_layout_1.TREE_GROUP_ROW_HEIGHT,
|
|
124
|
-
paddingRight: timeline_layout_1.EXPANDED_SECTION_PADDING_RIGHT,
|
|
125
126
|
}), []);
|
|
126
127
|
const labelStyle = (0, react_1.useMemo)(() => {
|
|
127
128
|
const hoverEffect = labelHovered && documentationLink !== null;
|
|
128
129
|
return {
|
|
129
130
|
...rowLabel,
|
|
131
|
+
...(0, TimelineSelection_1.getTimelineSelectedLabelStyle)(selection.selected, true),
|
|
132
|
+
alignSelf: 'stretch',
|
|
133
|
+
alignItems: 'center',
|
|
134
|
+
color: (0, TimelineSelection_1.getTimelineColor)(selection.selected, true),
|
|
135
|
+
display: 'flex',
|
|
136
|
+
flex: 1,
|
|
137
|
+
minWidth: 0,
|
|
138
|
+
paddingRight: timeline_layout_1.EXPANDED_SECTION_PADDING_RIGHT,
|
|
130
139
|
textDecoration: hoverEffect ? 'underline' : 'none',
|
|
131
140
|
textUnderlineOffset: 2,
|
|
132
141
|
cursor: hoverEffect ? 'pointer' : undefined,
|
|
133
142
|
};
|
|
134
|
-
}, [documentationLink, labelHovered]);
|
|
143
|
+
}, [documentationLink, labelHovered, selection.selected]);
|
|
135
144
|
const onClickLabel = (0, react_1.useCallback)(() => {
|
|
136
145
|
if (documentationLink === null) {
|
|
137
146
|
return;
|
|
138
147
|
}
|
|
139
148
|
window.open(documentationLink, '_blank', 'noopener,noreferrer');
|
|
140
149
|
}, [documentationLink]);
|
|
141
|
-
const row = (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: rowDepth, eye: canToggle ? (jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEye, { type: "effect", hidden: isDisabled, onInvoked: onToggle })) : (jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {})), arrow: jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowButton, { isExpanded: isExpanded, onClick: () => toggleTrack(nodePathInfo), label: `${label} section`, disabled: false }), style: rowStyle, children: jsx_runtime_1.jsx("span", { onPointerEnter: () => setLabelHovered(true), onPointerLeave: () => setLabelHovered(false), onClick: onClickLabel, title: documentationLink ? `Open documentation: ${documentationLink}` : label, style: labelStyle, children: label }) }));
|
|
142
|
-
return previewConnected ? (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: contextMenuValues, children: row })) : (row);
|
|
150
|
+
const row = (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: rowDepth, eye: canToggle ? (jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEye, { type: "effect", hidden: isDisabled, onInvoked: onToggle })) : (jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {})), arrow: jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowButton, { isExpanded: isExpanded, onClick: () => toggleTrack(nodePathInfo), label: `${label} section`, disabled: false }), style: rowStyle, selected: selection.selected, selectable: selection.selectable, onSelect: selection.onSelect, showSelectedBackground: true, containsSelection: false, outerHeight: null, children: jsx_runtime_1.jsx("span", { onPointerEnter: () => setLabelHovered(true), onPointerLeave: () => setLabelHovered(false), onClick: onClickLabel, title: documentationLink ? `Open documentation: ${documentationLink}` : label, style: labelStyle, children: label }) }));
|
|
151
|
+
return previewConnected ? (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: contextMenuValues, onOpen: selection.selectable ? selection.onSelect : null, children: row })) : (row);
|
|
143
152
|
};
|
|
144
153
|
exports.TimelineEffectGroupRow = TimelineEffectGroupRow;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-sort-key';
|
|
3
|
+
export declare const TimelineExpandedKeyframeRow: React.NamedExoticComponent<{
|
|
4
|
+
readonly height: number;
|
|
5
|
+
readonly keyframes: {
|
|
6
|
+
frame: number;
|
|
7
|
+
value: unknown;
|
|
8
|
+
}[];
|
|
9
|
+
readonly nodePathInfo: SequenceNodePathInfo;
|
|
10
|
+
readonly showSeparator: boolean;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.TimelineExpandedKeyframeRow = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
10
|
+
const TimelineKeyframeDiamond_1 = require("./TimelineKeyframeDiamond");
|
|
11
|
+
const TimelineSelection_1 = require("./TimelineSelection");
|
|
12
|
+
const row = {
|
|
13
|
+
position: 'relative',
|
|
14
|
+
};
|
|
15
|
+
const rowSeparator = {
|
|
16
|
+
height: timeline_layout_1.TIMELINE_ITEM_BORDER_BOTTOM,
|
|
17
|
+
};
|
|
18
|
+
const TimelineExpandedKeyframeRowUnmemoized = ({ height, keyframes, nodePathInfo, showSeparator }) => {
|
|
19
|
+
const { selected: rowSelected } = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo);
|
|
20
|
+
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [showSeparator ? jsx_runtime_1.jsx("div", { style: rowSeparator }) : null, jsx_runtime_1.jsxs("div", { style: { ...row, height }, children: [rowSelected ? (jsx_runtime_1.jsx("div", { style: TimelineSelection_1.TIMELINE_SELECTED_TRACK_HIGHLIGHT_STYLE })) : null, keyframes.map((keyframe) => (jsx_runtime_1.jsx(TimelineKeyframeDiamond_1.TimelineKeyframeDiamond, { frame: keyframe.frame, rowHeight: height, nodePathInfo: nodePathInfo }, keyframe.frame)))] })
|
|
21
|
+
] }));
|
|
22
|
+
};
|
|
23
|
+
exports.TimelineExpandedKeyframeRow = react_1.default.memo(TimelineExpandedKeyframeRowUnmemoized);
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.TimelineExpandedRow = void 0;
|
|
4
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
5
9
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
6
10
|
const timeline_row_layout_1 = require("./timeline-row-layout");
|
|
7
11
|
const TimelineEffectFieldRow_1 = require("./TimelineEffectFieldRow");
|
|
@@ -10,6 +14,7 @@ const TimelineExpandArrowButton_1 = require("./TimelineExpandArrowButton");
|
|
|
10
14
|
const TimelineFieldRow_1 = require("./TimelineFieldRow");
|
|
11
15
|
const TimelineLayerEye_1 = require("./TimelineLayerEye");
|
|
12
16
|
const TimelineRowChrome_1 = require("./TimelineRowChrome");
|
|
17
|
+
const TimelineSelection_1 = require("./TimelineSelection");
|
|
13
18
|
const rowLabel = {
|
|
14
19
|
fontSize: 12,
|
|
15
20
|
color: 'rgba(255, 255, 255, 0.8)',
|
|
@@ -17,28 +22,39 @@ const rowLabel = {
|
|
|
17
22
|
};
|
|
18
23
|
const TimelineExpandedRow = ({ node, depth, nestedDepth, getIsExpanded, toggleTrack, validatedLocation, nodePath, schema, }) => {
|
|
19
24
|
const rowDepth = (0, timeline_row_layout_1.getExpandedRowDepth)({ nestedDepth, treeDepth: depth });
|
|
25
|
+
const selection = (0, TimelineSelection_1.useTimelineRowSelection)(node.nodePathInfo);
|
|
26
|
+
const labelStyle = react_1.default.useMemo(() => ({
|
|
27
|
+
...rowLabel,
|
|
28
|
+
...(0, TimelineSelection_1.getTimelineSelectedLabelStyle)(selection.selected, true),
|
|
29
|
+
alignSelf: 'stretch',
|
|
30
|
+
alignItems: 'center',
|
|
31
|
+
color: (0, TimelineSelection_1.getTimelineColor)(selection.selected, true),
|
|
32
|
+
display: 'flex',
|
|
33
|
+
flex: 1,
|
|
34
|
+
minWidth: 0,
|
|
35
|
+
paddingRight: timeline_layout_1.EXPANDED_SECTION_PADDING_RIGHT,
|
|
36
|
+
}), [selection.selected]);
|
|
20
37
|
if (node.kind === 'group') {
|
|
21
38
|
if (node.effectInfo) {
|
|
22
39
|
return (jsx_runtime_1.jsx(TimelineEffectGroupRow_1.TimelineEffectGroupRow, { label: node.label, nodePathInfo: node.nodePathInfo, effectIndex: node.effectInfo.effectIndex, effectSchema: node.effectInfo.effectSchema, documentationLink: node.effectInfo.documentationLink, nodePath: nodePath, validatedLocation: validatedLocation, rowDepth: rowDepth, getIsExpanded: getIsExpanded, toggleTrack: toggleTrack }));
|
|
23
40
|
}
|
|
41
|
+
// Group like "Effects"
|
|
24
42
|
const isExpanded = getIsExpanded(node.nodePathInfo);
|
|
25
43
|
return (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: rowDepth, eye: jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {}), arrow: jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowButton, { isExpanded: isExpanded, onClick: () => toggleTrack(node.nodePathInfo), label: `${node.label} section`, disabled: false }), style: {
|
|
26
44
|
height: timeline_layout_1.TREE_GROUP_ROW_HEIGHT,
|
|
27
|
-
|
|
28
|
-
}, children: jsx_runtime_1.jsx("span", { style: rowLabel, children: node.label }) }));
|
|
45
|
+
}, selected: selection.selected, selectable: selection.selectable, onSelect: selection.onSelect, showSelectedBackground: true, containsSelection: false, outerHeight: null, children: jsx_runtime_1.jsx("span", { style: labelStyle, children: node.label }) }));
|
|
29
46
|
}
|
|
30
47
|
if (node.field) {
|
|
31
48
|
if (node.field.kind === 'effect-field') {
|
|
32
|
-
return (jsx_runtime_1.jsx(TimelineEffectFieldRow_1.TimelineEffectFieldRow, { field: node.field, validatedLocation: validatedLocation, rowDepth: rowDepth, nodePath: nodePath }));
|
|
49
|
+
return (jsx_runtime_1.jsx(TimelineEffectFieldRow_1.TimelineEffectFieldRow, { field: node.field, validatedLocation: validatedLocation, rowDepth: rowDepth, nodePath: nodePath, nodePathInfo: node.nodePathInfo }));
|
|
33
50
|
}
|
|
34
51
|
if (node.field.kind === 'sequence-field') {
|
|
35
|
-
return (jsx_runtime_1.jsx(TimelineFieldRow_1.TimelineFieldRow, { field: node.field, validatedLocation: validatedLocation, rowDepth: rowDepth, nodePath: nodePath, schema: schema }));
|
|
52
|
+
return (jsx_runtime_1.jsx(TimelineFieldRow_1.TimelineFieldRow, { field: node.field, validatedLocation: validatedLocation, rowDepth: rowDepth, nodePath: nodePath, nodePathInfo: node.nodePathInfo, schema: schema }));
|
|
36
53
|
}
|
|
37
54
|
throw new Error('Unexpected field kind: ' + JSON.stringify(node.field));
|
|
38
55
|
}
|
|
39
56
|
return (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: rowDepth, eye: jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {}), arrow: jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {}), style: {
|
|
40
57
|
height: (0, timeline_layout_1.getTreeRowHeight)(node),
|
|
41
|
-
|
|
42
|
-
}, children: jsx_runtime_1.jsx("span", { style: rowLabel, children: node.label }) }));
|
|
58
|
+
}, selected: selection.selected, selectable: selection.selectable, onSelect: selection.onSelect, showSelectedBackground: true, containsSelection: false, outerHeight: null, children: jsx_runtime_1.jsx("span", { style: labelStyle, children: node.label }) }));
|
|
43
59
|
};
|
|
44
60
|
exports.TimelineExpandedRow = TimelineExpandedRow;
|
|
@@ -50,8 +50,8 @@ const expandedSectionBase = {
|
|
|
50
50
|
borderBottom: `1px solid ${colors_1.TIMELINE_TRACK_SEPARATOR}`,
|
|
51
51
|
};
|
|
52
52
|
const separator = {
|
|
53
|
-
height:
|
|
54
|
-
|
|
53
|
+
height: 0,
|
|
54
|
+
borderBottom: `1px solid ${colors_1.TIMELINE_TRACK_SEPARATOR}`,
|
|
55
55
|
};
|
|
56
56
|
const TimelineExpandedSection = ({ sequence, validatedLocation, nodePathInfo, nestedDepth }) => {
|
|
57
57
|
const { getIsExpanded } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksGetterContext);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { TSequence } from 'remotion';
|
|
3
3
|
import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-sort-key';
|
|
4
4
|
export declare const TimelineExpandedTrackKeyframes: React.NamedExoticComponent<{
|
|
5
5
|
readonly sequence: TSequence;
|