@remotion/cli 4.0.0-alpha10 → 4.0.0-alpha12
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/config/index.d.ts +3 -3
- package/dist/config/log.d.ts +1 -1
- package/dist/config/max-timeline-tracks.js +6 -5
- package/dist/config/preview-server.js +2 -2
- package/dist/editor/components/AudioWaveform.d.ts +0 -1
- package/dist/editor/components/AudioWaveform.js +11 -6
- package/dist/editor/components/CurrentCompositionSideEffects.js +1 -1
- package/dist/editor/components/KeyboardShortcutsExplainer.js +1 -1
- package/dist/editor/components/Menu/is-menu-item.d.ts +2 -2
- package/dist/editor/components/Menu/is-menu-item.js +2 -2
- package/dist/editor/components/NewComposition/RemInput.d.ts +2 -2
- package/dist/editor/components/NewComposition/RemInputTypeColor.d.ts +1 -1
- package/dist/editor/components/NewComposition/ValidationMessage.d.ts +2 -0
- package/dist/editor/components/NewComposition/ValidationMessage.js +3 -2
- package/dist/editor/components/Notifications/ServerDisconnected.js +1 -1
- package/dist/editor/components/RenderButton.js +1 -1
- package/dist/editor/components/RenderModal/DataEditor.js +1 -1
- package/dist/editor/components/RenderModal/RenderModalData.d.ts +2 -3
- package/dist/editor/components/RenderModal/RenderModalData.js +34 -23
- package/dist/editor/components/RenderModal/RenderModalJSONPropsEditor.js +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaErrorMessages.js +2 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodErrorMessages.d.ts +1 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodErrorMessages.js +31 -6
- package/dist/editor/components/RenderQueue/index.js +1 -1
- package/dist/editor/components/Splitter/SplitterContainer.js +1 -0
- package/dist/editor/components/Timeline/MaxTimelineTracks.d.ts +1 -0
- package/dist/editor/components/Timeline/MaxTimelineTracks.js +3 -2
- package/dist/editor/components/Timeline/Timeline.js +4 -5
- package/dist/editor/components/Timeline/TimelineDragHandler.js +26 -11
- package/dist/editor/components/Timeline/TimelineInOutPointer.js +7 -5
- package/dist/editor/components/Timeline/TimelineInOutPointerHandle.js +9 -3
- package/dist/editor/components/Timeline/TimelineSequence.d.ts +0 -1
- package/dist/editor/components/Timeline/TimelineSequence.js +23 -21
- package/dist/editor/components/Timeline/TimelineSlider.js +17 -4
- package/dist/editor/components/Timeline/TimelineTimeIndicators.js +21 -23
- package/dist/editor/components/Timeline/TimelineTracks.d.ts +0 -1
- package/dist/editor/components/Timeline/TimelineTracks.js +2 -2
- package/dist/editor/components/Timeline/TimelineWidthProvider.d.ts +7 -0
- package/dist/editor/components/Timeline/TimelineWidthProvider.js +17 -0
- package/dist/editor/helpers/get-left-of-timeline-slider.d.ts +0 -4
- package/dist/editor/helpers/get-left-of-timeline-slider.js +1 -24
- package/dist/editor/helpers/use-keybinding.js +1 -1
- package/dist/editor/helpers/use-menu-structure.js +1 -1
- package/dist/event-source.js +1 -1
- package/dist/get-cli-options.d.ts +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/log.d.ts +3 -3
- package/dist/preview-server/live-events.js +5 -0
- package/dist/preview-server/render-queue/process-still.js +1 -1
- package/dist/preview-server/render-queue/process-video.js +1 -1
- package/dist/preview-server/start-server.js +4 -4
- package/dist/preview.js +0 -2
- package/dist/print-help.js +1 -1
- package/dist/server-ready-comment.d.ts +2 -0
- package/dist/server-ready-comment.js +13 -0
- package/dist/studio.js +4 -2
- package/package.json +8 -8
- package/dist/ansi/ansi-regex.d.ts +0 -2
- package/dist/ansi/ansi-regex.js +0 -18
- package/dist/config/ffmpeg-executable.d.ts +0 -5
- package/dist/config/ffmpeg-executable.js +0 -21
- package/dist/config/quality.d.ts +0 -2
- package/dist/config/quality.js +0 -17
- package/dist/editor/components/ClipboardIcon.d.ts +0 -2
- package/dist/editor/components/ClipboardIcon.js +0 -12
- package/dist/editor/components/CollapsedCompositionSelector.d.ts +0 -4
- package/dist/editor/components/CollapsedCompositionSelector.js +0 -39
- package/dist/editor/components/RichTimelineToggle.d.ts +0 -2
- package/dist/editor/components/RichTimelineToggle.js +0 -29
- package/dist/editor/components/Thumbnail.d.ts +0 -8
- package/dist/editor/components/Thumbnail.js +0 -76
- package/dist/editor/helpers/use-compact-ui.d.ts +0 -1
- package/dist/editor/helpers/use-compact-ui.js +0 -18
- package/dist/editor/icons/film.d.ts +0 -3
- package/dist/editor/icons/film.js +0 -8
- package/dist/editor/icons/timeline.d.ts +0 -3
- package/dist/editor/icons/timeline.js +0 -9
- package/dist/editor/state/rich-timeline.d.ts +0 -9
- package/dist/editor/state/rich-timeline.js +0 -17
- package/dist/get-render-media-options.d.ts +0 -8
- package/dist/get-render-media-options.js +0 -55
- package/dist/install.d.ts +0 -2
- package/dist/install.js +0 -36
- package/dist/is-javascript.d.ts +0 -2
- package/dist/is-javascript.js +0 -9
- package/dist/preview-server/dev-middleware/is-color-supported.d.ts +0 -1
- package/dist/preview-server/dev-middleware/is-color-supported.js +0 -37
- package/dist/preview-server/hot-middleware/strip-ansi.d.ts +0 -1
- package/dist/preview-server/hot-middleware/strip-ansi.js +0 -21
|
@@ -15,6 +15,7 @@ const containerColumn = {
|
|
|
15
15
|
display: 'flex',
|
|
16
16
|
flexDirection: 'column',
|
|
17
17
|
flex: 1,
|
|
18
|
+
height: '100%',
|
|
18
19
|
};
|
|
19
20
|
const SplitterContainer = ({ orientation, children, defaultFlex, maxFlex, minFlex, id }) => {
|
|
20
21
|
const [initialTimelineFlex, persistFlex] = (0, timeline_1.useTimelineFlex)(id);
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MaxTimelineTracksReached = exports.MAX_TIMELINE_TRACKS_NOTICE_HEIGHT = exports.MAX_TIMELINE_TRACKS = void 0;
|
|
3
|
+
exports.MaxTimelineTracksReached = exports.MAX_TIMELINE_TRACKS_NOTICE_HEIGHT = exports.MAX_TIMELINE_TRACKS = exports.DEFAULT_TIMELINE_TRACKS = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
6
|
+
exports.DEFAULT_TIMELINE_TRACKS = 90;
|
|
6
7
|
exports.MAX_TIMELINE_TRACKS = typeof process.env.MAX_TIMELINE_TRACKS === 'undefined'
|
|
7
|
-
?
|
|
8
|
+
? exports.DEFAULT_TIMELINE_TRACKS
|
|
8
9
|
: Number(process.env.MAX_TIMELINE_TRACKS);
|
|
9
10
|
exports.MAX_TIMELINE_TRACKS_NOTICE_HEIGHT = 24;
|
|
10
11
|
const container = {
|
|
@@ -8,6 +8,7 @@ const calculate_timeline_1 = require("../../helpers/calculate-timeline");
|
|
|
8
8
|
const colors_1 = require("../../helpers/colors");
|
|
9
9
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
10
10
|
const timeline_ref_1 = require("../../state/timeline-ref");
|
|
11
|
+
const is_menu_item_1 = require("../Menu/is-menu-item");
|
|
11
12
|
const SplitterContainer_1 = require("../Splitter/SplitterContainer");
|
|
12
13
|
const SplitterElement_1 = require("../Splitter/SplitterElement");
|
|
13
14
|
const SplitterHandle_1 = require("../Splitter/SplitterHandle");
|
|
@@ -23,6 +24,7 @@ const TimelineScrollable_1 = require("./TimelineScrollable");
|
|
|
23
24
|
const TimelineSlider_1 = require("./TimelineSlider");
|
|
24
25
|
const TimelineTimeIndicators_1 = require("./TimelineTimeIndicators");
|
|
25
26
|
const TimelineTracks_1 = require("./TimelineTracks");
|
|
27
|
+
const TimelineWidthProvider_1 = require("./TimelineWidthProvider");
|
|
26
28
|
const container = {
|
|
27
29
|
minHeight: '100%',
|
|
28
30
|
flex: 1,
|
|
@@ -34,7 +36,7 @@ const container = {
|
|
|
34
36
|
const noop = () => undefined;
|
|
35
37
|
const Timeline = () => {
|
|
36
38
|
var _a;
|
|
37
|
-
const { sequences } = (0, react_1.useContext)(remotion_1.Internals.
|
|
39
|
+
const { sequences } = (0, react_1.useContext)(remotion_1.Internals.SequenceManager);
|
|
38
40
|
const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
|
|
39
41
|
const [state, dispatch] = (0, react_1.useReducer)(timeline_state_reducer_1.timelineStateReducer, {
|
|
40
42
|
collapsed: {},
|
|
@@ -85,9 +87,6 @@ const Timeline = () => {
|
|
|
85
87
|
overflowX: 'hidden',
|
|
86
88
|
};
|
|
87
89
|
}, [hasBeenCut, shown.length]);
|
|
88
|
-
|
|
89
|
-
return (0, jsx_runtime_1.jsx)("div", { style: container, className: "css-reset" });
|
|
90
|
-
}
|
|
91
|
-
return ((0, jsx_runtime_1.jsx)("div", { ref: timeline_refs_1.timelineVerticalScroll, style: container, className: "css-reset", children: (0, jsx_runtime_1.jsx)("div", { style: inner, children: (0, jsx_runtime_1.jsxs)(SplitterContainer_1.SplitterContainer, { orientation: "vertical", defaultFlex: 0.2, id: "names-to-timeline", maxFlex: 0.5, minFlex: 0.15, children: [(0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "flexer", children: (0, jsx_runtime_1.jsx)(TimelineList_1.TimelineList, { dispatchStateChange: dispatch, viewState: state, timeline: shown }) }), (0, jsx_runtime_1.jsx)(SplitterHandle_1.SplitterHandle, { onCollapse: noop, allowToCollapse: "none" }), (0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "anti-flexer", children: (0, jsx_runtime_1.jsxs)(TimelineScrollable_1.TimelineScrollable, { children: [(0, jsx_runtime_1.jsx)(TimelineTracks_1.TimelineTracks, { viewState: state, timeline: shown, fps: videoConfig.fps, hasBeenCut: hasBeenCut }), (0, jsx_runtime_1.jsx)(TimelineInOutPointer_1.TimelineInOutPointer, {}), (0, jsx_runtime_1.jsx)(TimelineDragHandler_1.TimelineDragHandler, {}), (0, jsx_runtime_1.jsx)(TimelineSlider_1.TimelineSlider, {}), (0, jsx_runtime_1.jsx)(TimelinePlayCursorSyncer_1.TimelinePlayCursorSyncer, {})] }) })] }) }) }));
|
|
90
|
+
return ((0, jsx_runtime_1.jsx)("div", { ref: timeline_refs_1.timelineVerticalScroll, style: container, className: 'css-reset ' + is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: (0, jsx_runtime_1.jsx)(TimelineWidthProvider_1.TimelineWidthProvider, { children: (0, jsx_runtime_1.jsx)("div", { style: inner, children: (0, jsx_runtime_1.jsxs)(SplitterContainer_1.SplitterContainer, { orientation: "vertical", defaultFlex: 0.2, id: "names-to-timeline", maxFlex: 0.5, minFlex: 0.15, children: [(0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "flexer", children: (0, jsx_runtime_1.jsx)(TimelineList_1.TimelineList, { dispatchStateChange: dispatch, viewState: state, timeline: shown }) }), (0, jsx_runtime_1.jsx)(SplitterHandle_1.SplitterHandle, { onCollapse: noop, allowToCollapse: "none" }), (0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "anti-flexer", children: (0, jsx_runtime_1.jsxs)(TimelineScrollable_1.TimelineScrollable, { children: [(0, jsx_runtime_1.jsx)(TimelineTracks_1.TimelineTracks, { viewState: state, timeline: shown, hasBeenCut: hasBeenCut }), (0, jsx_runtime_1.jsx)(TimelineInOutPointer_1.TimelineInOutPointer, {}), (0, jsx_runtime_1.jsx)(TimelineDragHandler_1.TimelineDragHandler, {}), (0, jsx_runtime_1.jsx)(TimelineSlider_1.TimelineSlider, {}), (0, jsx_runtime_1.jsx)(TimelinePlayCursorSyncer_1.TimelinePlayCursorSyncer, {})] }) })] }) }) }) }));
|
|
92
91
|
};
|
|
93
92
|
exports.Timeline = Timeline;
|
|
@@ -10,11 +10,13 @@ const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
|
10
10
|
const in_out_1 = require("../../state/in-out");
|
|
11
11
|
const timeline_zoom_1 = require("../../state/timeline-zoom");
|
|
12
12
|
const FramePersistor_1 = require("../FramePersistor");
|
|
13
|
+
const is_menu_item_1 = require("../Menu/is-menu-item");
|
|
13
14
|
const timeline_refs_1 = require("./timeline-refs");
|
|
14
15
|
const timeline_scroll_logic_1 = require("./timeline-scroll-logic");
|
|
15
16
|
const TimelineInOutPointer_1 = require("./TimelineInOutPointer");
|
|
16
17
|
const TimelineInOutPointerHandle_1 = require("./TimelineInOutPointerHandle");
|
|
17
18
|
const TimelineSlider_1 = require("./TimelineSlider");
|
|
19
|
+
const TimelineWidthProvider_1 = require("./TimelineWidthProvider");
|
|
18
20
|
const inner = {
|
|
19
21
|
overflowY: 'auto',
|
|
20
22
|
overflowX: 'hidden',
|
|
@@ -30,7 +32,20 @@ const getClientXWithScroll = (x) => {
|
|
|
30
32
|
return x + ((_a = timeline_refs_1.scrollableRef.current) === null || _a === void 0 ? void 0 : _a.scrollLeft);
|
|
31
33
|
};
|
|
32
34
|
const TimelineDragHandler = () => {
|
|
35
|
+
const video = remotion_1.Internals.useUnsafeVideoConfig();
|
|
36
|
+
const { zoom } = (0, react_1.useContext)(timeline_zoom_1.TimelineZoomCtx);
|
|
37
|
+
const containerStyle = (0, react_1.useMemo)(() => {
|
|
38
|
+
return {
|
|
39
|
+
...container,
|
|
40
|
+
width: 100 * zoom + '%',
|
|
41
|
+
};
|
|
42
|
+
}, [zoom]);
|
|
43
|
+
return ((0, jsx_runtime_1.jsx)("div", { ref: timeline_refs_1.sliderAreaRef, style: containerStyle, children: video ? (0, jsx_runtime_1.jsx)(Inner, {}) : null }));
|
|
44
|
+
};
|
|
45
|
+
exports.TimelineDragHandler = TimelineDragHandler;
|
|
46
|
+
const Inner = () => {
|
|
33
47
|
var _a, _b, _c;
|
|
48
|
+
const videoConfig = (0, remotion_1.useVideoConfig)();
|
|
34
49
|
const size = player_1.PlayerInternals.useElementSize(timeline_refs_1.scrollableRef, {
|
|
35
50
|
triggerOnWindowResize: true,
|
|
36
51
|
shouldApplyCssTransforms: true,
|
|
@@ -38,16 +53,21 @@ const TimelineDragHandler = () => {
|
|
|
38
53
|
const [inOutDragging, setInOutDragging] = (0, react_1.useState)({
|
|
39
54
|
dragging: false,
|
|
40
55
|
});
|
|
56
|
+
const timelineWidth = (0, react_1.useContext)(TimelineWidthProvider_1.TimelineWidthContext);
|
|
57
|
+
const get = (0, react_1.useCallback)((frame) => {
|
|
58
|
+
if (timelineWidth === null) {
|
|
59
|
+
throw new Error('timeline width is not yet determined');
|
|
60
|
+
}
|
|
61
|
+
return (0, get_left_of_timeline_slider_1.getXPositionOfItemInTimelineImperatively)(frame, videoConfig.durationInFrames, timelineWidth);
|
|
62
|
+
}, [timelineWidth, videoConfig.durationInFrames]);
|
|
41
63
|
const width = (_b = (_a = timeline_refs_1.scrollableRef.current) === null || _a === void 0 ? void 0 : _a.scrollWidth) !== null && _b !== void 0 ? _b : 0;
|
|
42
64
|
const left = (_c = size === null || size === void 0 ? void 0 : size.left) !== null && _c !== void 0 ? _c : 0;
|
|
43
65
|
const { inFrame, outFrame } = (0, in_out_1.useTimelineInOutFramePosition)();
|
|
44
66
|
const { setInAndOutFrames } = (0, in_out_1.useTimelineSetInOutFramePosition)();
|
|
45
|
-
const { get } = (0, get_left_of_timeline_slider_1.useGetXPositionOfItemInTimeline)();
|
|
46
67
|
const [dragging, setDragging] = (0, react_1.useState)({
|
|
47
68
|
dragging: false,
|
|
48
69
|
});
|
|
49
70
|
const { playing, play, pause, seek } = player_1.PlayerInternals.usePlayer();
|
|
50
|
-
const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
|
|
51
71
|
const scroller = (0, react_1.useRef)(null);
|
|
52
72
|
const stopInterval = () => {
|
|
53
73
|
if (scroller.current) {
|
|
@@ -312,13 +332,8 @@ const TimelineDragHandler = () => {
|
|
|
312
332
|
window.removeEventListener('pointerup', onPointerUpInOut);
|
|
313
333
|
};
|
|
314
334
|
}, [inOutDragging.dragging, onPointerMoveInOut, onPointerUpInOut]);
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
width: 100 * zoom + '%',
|
|
320
|
-
};
|
|
321
|
-
}, [zoom]);
|
|
322
|
-
return ((0, jsx_runtime_1.jsxs)("div", { ref: timeline_refs_1.sliderAreaRef, style: containerStyle, onPointerDown: onPointerDown, children: [(0, jsx_runtime_1.jsx)("div", { style: inner }), inFrame !== null && ((0, jsx_runtime_1.jsx)(TimelineInOutPointerHandle_1.TimelineInOutPointerHandle, { type: "in", atFrame: inFrame, dragging: inOutDragging.dragging === 'in' })), outFrame !== null && ((0, jsx_runtime_1.jsx)(TimelineInOutPointerHandle_1.TimelineInOutPointerHandle, { type: "out", dragging: inOutDragging.dragging === 'out', atFrame: outFrame }))] }));
|
|
335
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: {
|
|
336
|
+
width: '100%',
|
|
337
|
+
height: '100%',
|
|
338
|
+
}, onPointerDown: onPointerDown, children: [(0, jsx_runtime_1.jsx)("div", { style: inner, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME }), inFrame !== null && ((0, jsx_runtime_1.jsx)(TimelineInOutPointerHandle_1.TimelineInOutPointerHandle, { type: "in", atFrame: inFrame, dragging: inOutDragging.dragging === 'in' })), outFrame !== null && ((0, jsx_runtime_1.jsx)(TimelineInOutPointerHandle_1.TimelineInOutPointerHandle, { type: "out", dragging: inOutDragging.dragging === 'out', atFrame: outFrame }))] }));
|
|
323
339
|
};
|
|
324
|
-
exports.TimelineDragHandler = TimelineDragHandler;
|
|
@@ -6,6 +6,7 @@ const react_1 = require("react");
|
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
7
7
|
const get_left_of_timeline_slider_1 = require("../../helpers/get-left-of-timeline-slider");
|
|
8
8
|
const in_out_1 = require("../../state/in-out");
|
|
9
|
+
const TimelineWidthProvider_1 = require("./TimelineWidthProvider");
|
|
9
10
|
const areaHighlight = {
|
|
10
11
|
position: 'absolute',
|
|
11
12
|
backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
|
@@ -18,18 +19,19 @@ exports.outMarkerAreaRef = (0, react_1.createRef)();
|
|
|
18
19
|
const TimelineInOutPointer = () => {
|
|
19
20
|
const { inFrame, outFrame } = (0, in_out_1.useTimelineInOutFramePosition)();
|
|
20
21
|
const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
|
|
21
|
-
const
|
|
22
|
-
if (!videoConfig) {
|
|
22
|
+
const timelineWidth = (0, react_1.useContext)(TimelineWidthProvider_1.TimelineWidthContext);
|
|
23
|
+
if (!videoConfig || timelineWidth === null) {
|
|
23
24
|
return null;
|
|
24
25
|
}
|
|
25
26
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [inFrame !== null && ((0, jsx_runtime_1.jsx)("div", { ref: exports.inMarkerAreaRef, style: {
|
|
26
27
|
...areaHighlight,
|
|
27
28
|
left: 0,
|
|
28
|
-
width:
|
|
29
|
+
width: (0, get_left_of_timeline_slider_1.getXPositionOfItemInTimelineImperatively)(inFrame, videoConfig.durationInFrames, timelineWidth),
|
|
29
30
|
} })), outFrame !== null && ((0, jsx_runtime_1.jsx)("div", { ref: exports.outMarkerAreaRef, style: {
|
|
30
31
|
...areaHighlight,
|
|
31
|
-
left:
|
|
32
|
-
width:
|
|
32
|
+
left: (0, get_left_of_timeline_slider_1.getXPositionOfItemInTimelineImperatively)(outFrame, videoConfig.durationInFrames, timelineWidth),
|
|
33
|
+
width: timelineWidth -
|
|
34
|
+
(0, get_left_of_timeline_slider_1.getXPositionOfItemInTimelineImperatively)(outFrame, videoConfig.durationInFrames, timelineWidth),
|
|
33
35
|
} }))] }));
|
|
34
36
|
};
|
|
35
37
|
exports.TimelineInOutPointer = TimelineInOutPointer;
|
|
@@ -3,7 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TimelineInOutPointerHandle = exports.outPointerHandle = exports.inPointerHandle = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
+
const remotion_1 = require("remotion");
|
|
6
7
|
const get_left_of_timeline_slider_1 = require("../../helpers/get-left-of-timeline-slider");
|
|
8
|
+
const TimelineWidthProvider_1 = require("./TimelineWidthProvider");
|
|
7
9
|
const line = {
|
|
8
10
|
height: '100%',
|
|
9
11
|
width: 1,
|
|
@@ -16,16 +18,20 @@ const line = {
|
|
|
16
18
|
exports.inPointerHandle = (0, react_1.createRef)();
|
|
17
19
|
exports.outPointerHandle = (0, react_1.createRef)();
|
|
18
20
|
const TimelineInOutPointerHandle = ({ dragging, type, atFrame }) => {
|
|
19
|
-
const
|
|
21
|
+
const timelineWidth = (0, react_1.useContext)(TimelineWidthProvider_1.TimelineWidthContext);
|
|
22
|
+
const videoConfig = (0, remotion_1.useVideoConfig)();
|
|
23
|
+
if (timelineWidth === null) {
|
|
24
|
+
throw new Error('Timeline width is null');
|
|
25
|
+
}
|
|
20
26
|
const style = (0, react_1.useMemo)(() => {
|
|
21
27
|
return {
|
|
22
28
|
...line,
|
|
23
29
|
backgroundColor: dragging
|
|
24
30
|
? 'rgba(255, 255, 255, 0.7)'
|
|
25
31
|
: 'rgba(255, 255, 255, 0.1)',
|
|
26
|
-
transform: `translateX(${
|
|
32
|
+
transform: `translateX(${(0, get_left_of_timeline_slider_1.getXPositionOfItemInTimelineImperatively)(atFrame, videoConfig.durationInFrames, timelineWidth)}px)`,
|
|
27
33
|
};
|
|
28
|
-
}, [atFrame, dragging,
|
|
34
|
+
}, [atFrame, dragging, timelineWidth, videoConfig.durationInFrames]);
|
|
29
35
|
return ((0, jsx_runtime_1.jsx)("div", { ref: type === 'in' ? exports.inPointerHandle : exports.outPointerHandle, style: style }));
|
|
30
36
|
};
|
|
31
37
|
exports.TimelineInOutPointerHandle = TimelineInOutPointerHandle;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TimelineSequence = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const player_1 = require("@remotion/player");
|
|
6
5
|
const react_1 = require("react");
|
|
7
6
|
const remotion_1 = require("remotion");
|
|
8
7
|
const colors_1 = require("../../helpers/colors");
|
|
@@ -10,17 +9,19 @@ const get_timeline_sequence_layout_1 = require("../../helpers/get-timeline-seque
|
|
|
10
9
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
11
10
|
const AudioWaveform_1 = require("../AudioWaveform");
|
|
12
11
|
const LoopedTimelineIndicators_1 = require("./LoopedTimelineIndicators");
|
|
13
|
-
const timeline_refs_1 = require("./timeline-refs");
|
|
14
12
|
const TimelineVideoInfo_1 = require("./TimelineVideoInfo");
|
|
13
|
+
const TimelineWidthProvider_1 = require("./TimelineWidthProvider");
|
|
15
14
|
const AUDIO_GRADIENT = 'linear-gradient(rgb(16 171 58), rgb(43 165 63) 60%)';
|
|
16
15
|
const VIDEO_GRADIENT = 'linear-gradient(to top, #8e44ad, #9b59b6)';
|
|
17
|
-
const TimelineSequence = ({ s
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
});
|
|
23
|
-
|
|
16
|
+
const TimelineSequence = ({ s }) => {
|
|
17
|
+
const windowWidth = (0, react_1.useContext)(TimelineWidthProvider_1.TimelineWidthContext);
|
|
18
|
+
if (windowWidth === null) {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
return (0, jsx_runtime_1.jsx)(Inner, { windowWidth: windowWidth, s: s });
|
|
22
|
+
};
|
|
23
|
+
exports.TimelineSequence = TimelineSequence;
|
|
24
|
+
const Inner = ({ s, windowWidth }) => {
|
|
24
25
|
// If a duration is 1, it is essentially a still and it should have width 0
|
|
25
26
|
// Some compositions may not be longer than their media duration,
|
|
26
27
|
// if that is the case, it needs to be asynchronously determined
|
|
@@ -29,16 +30,18 @@ const TimelineSequence = ({ s, fps }) => {
|
|
|
29
30
|
if (!video) {
|
|
30
31
|
throw new TypeError('Expected video config');
|
|
31
32
|
}
|
|
32
|
-
const { marginLeft, width } = (0,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
const { marginLeft, width } = (0, react_1.useMemo)(() => {
|
|
34
|
+
return (0, get_timeline_sequence_layout_1.getTimelineSequenceLayout)({
|
|
35
|
+
durationInFrames: s.loopDisplay
|
|
36
|
+
? s.loopDisplay.durationInFrames * s.loopDisplay.numberOfTimes
|
|
37
|
+
: s.duration,
|
|
38
|
+
startFrom: s.loopDisplay ? s.from + s.loopDisplay.startOffset : s.from,
|
|
39
|
+
startFromMedia: s.type === 'sequence' ? 0 : s.startMediaFrom,
|
|
40
|
+
maxMediaDuration,
|
|
41
|
+
video,
|
|
42
|
+
windowWidth,
|
|
43
|
+
});
|
|
44
|
+
}, [maxMediaDuration, s, video, windowWidth]);
|
|
42
45
|
const style = (0, react_1.useMemo)(() => {
|
|
43
46
|
return {
|
|
44
47
|
background: s.type === 'audio'
|
|
@@ -57,6 +60,5 @@ const TimelineSequence = ({ s, fps }) => {
|
|
|
57
60
|
overflow: 'hidden',
|
|
58
61
|
};
|
|
59
62
|
}, [marginLeft, s.type, width]);
|
|
60
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: style, title: s.displayName, children: [s.type === 'audio' ? ((0, jsx_runtime_1.jsx)(AudioWaveform_1.AudioWaveform, { src: s.src, doesVolumeChange: s.doesVolumeChange, visualizationWidth: width, startFrom: s.startMediaFrom, durationInFrames: s.duration,
|
|
63
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: style, title: s.displayName, children: [s.type === 'audio' ? ((0, jsx_runtime_1.jsx)(AudioWaveform_1.AudioWaveform, { src: s.src, doesVolumeChange: s.doesVolumeChange, visualizationWidth: width, startFrom: s.startMediaFrom, durationInFrames: s.duration, volume: s.volume, setMaxMediaDuration: setMaxMediaDuration, playbackRate: s.playbackRate })) : null, s.type === 'video' ? (0, jsx_runtime_1.jsx)(TimelineVideoInfo_1.TimelineVideoInfo, { src: s.src }) : null, s.loopDisplay === undefined ? null : ((0, jsx_runtime_1.jsx)(LoopedTimelineIndicators_1.LoopedTimelineIndicator, { loops: s.loopDisplay.numberOfTimes }))] }, s.id));
|
|
61
64
|
};
|
|
62
|
-
exports.TimelineSequence = TimelineSequence;
|
|
@@ -8,6 +8,7 @@ const get_left_of_timeline_slider_1 = require("../../helpers/get-left-of-timelin
|
|
|
8
8
|
const imperative_state_1 = require("./imperative-state");
|
|
9
9
|
const timeline_refs_1 = require("./timeline-refs");
|
|
10
10
|
const TimelineSliderHandle_1 = require("./TimelineSliderHandle");
|
|
11
|
+
const TimelineWidthProvider_1 = require("./TimelineWidthProvider");
|
|
11
12
|
const container = {
|
|
12
13
|
position: 'absolute',
|
|
13
14
|
bottom: 0,
|
|
@@ -22,16 +23,29 @@ const line = {
|
|
|
22
23
|
};
|
|
23
24
|
exports.redrawTimelineSliderFast = (0, react_1.createRef)();
|
|
24
25
|
const TimelineSlider = () => {
|
|
26
|
+
const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
|
|
27
|
+
const timelineWidth = (0, react_1.useContext)(TimelineWidthProvider_1.TimelineWidthContext);
|
|
28
|
+
if (videoConfig === null || timelineWidth === null) {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
return (0, jsx_runtime_1.jsx)(Inner, {});
|
|
32
|
+
};
|
|
33
|
+
exports.TimelineSlider = TimelineSlider;
|
|
34
|
+
const Inner = () => {
|
|
35
|
+
const videoConfig = (0, remotion_1.useVideoConfig)();
|
|
25
36
|
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
26
|
-
const { get } = (0, get_left_of_timeline_slider_1.useGetXPositionOfItemInTimeline)();
|
|
27
37
|
const ref = (0, react_1.useRef)(null);
|
|
38
|
+
const timelineWidth = (0, react_1.useContext)(TimelineWidthProvider_1.TimelineWidthContext);
|
|
39
|
+
if (timelineWidth === null) {
|
|
40
|
+
throw new Error('Unexpectedly did not have timeline width');
|
|
41
|
+
}
|
|
28
42
|
const style = (0, react_1.useMemo)(() => {
|
|
29
|
-
const left =
|
|
43
|
+
const left = (0, get_left_of_timeline_slider_1.getXPositionOfItemInTimelineImperatively)(timelinePosition, videoConfig.durationInFrames, timelineWidth);
|
|
30
44
|
return {
|
|
31
45
|
...container,
|
|
32
46
|
transform: `translateX(${left}px)`,
|
|
33
47
|
};
|
|
34
|
-
}, [timelinePosition,
|
|
48
|
+
}, [timelinePosition, videoConfig.durationInFrames, timelineWidth]);
|
|
35
49
|
(0, react_1.useImperativeHandle)(exports.redrawTimelineSliderFast, () => {
|
|
36
50
|
return {
|
|
37
51
|
draw: (frame, width) => {
|
|
@@ -63,4 +77,3 @@ const TimelineSlider = () => {
|
|
|
63
77
|
}, []);
|
|
64
78
|
return ((0, jsx_runtime_1.jsxs)("div", { ref: ref, style: style, children: [(0, jsx_runtime_1.jsx)("div", { style: line }), (0, jsx_runtime_1.jsx)(TimelineSliderHandle_1.TimelineSliderHandle, {})] }));
|
|
65
79
|
};
|
|
66
|
-
exports.TimelineSlider = TimelineSlider;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TimelineTimeIndicators = exports.TimelineTimePadding = exports.TimelineTimePlaceholders = exports.TIMELINE_TIME_INDICATOR_HEIGHT = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const player_1 = require("@remotion/player");
|
|
6
5
|
const react_1 = require("react");
|
|
7
6
|
const remotion_1 = require("remotion");
|
|
8
7
|
const colors_1 = require("../../helpers/colors");
|
|
@@ -12,6 +11,7 @@ const TimeValue_1 = require("../TimeValue");
|
|
|
12
11
|
const timeline_refs_1 = require("./timeline-refs");
|
|
13
12
|
const timeline_scroll_logic_1 = require("./timeline-scroll-logic");
|
|
14
13
|
const TimelineListItem_1 = require("./TimelineListItem");
|
|
14
|
+
const TimelineWidthProvider_1 = require("./TimelineWidthProvider");
|
|
15
15
|
exports.TIMELINE_TIME_INDICATOR_HEIGHT = 30;
|
|
16
16
|
const container = {
|
|
17
17
|
height: exports.TIMELINE_TIME_INDICATOR_HEIGHT - 4,
|
|
@@ -77,13 +77,18 @@ const TimelineTimePadding = () => {
|
|
|
77
77
|
};
|
|
78
78
|
exports.TimelineTimePadding = TimelineTimePadding;
|
|
79
79
|
const TimelineTimeIndicators = () => {
|
|
80
|
-
|
|
81
|
-
const size = player_1.PlayerInternals.useElementSize(timeline_refs_1.sliderAreaRef, {
|
|
82
|
-
triggerOnWindowResize: false,
|
|
83
|
-
shouldApplyCssTransforms: true,
|
|
84
|
-
});
|
|
80
|
+
const sliderTrack = (0, react_1.useContext)(TimelineWidthProvider_1.TimelineWidthContext);
|
|
85
81
|
const video = remotion_1.Internals.useVideo();
|
|
86
|
-
|
|
82
|
+
if (sliderTrack === null) {
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
if (video === null) {
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
return ((0, jsx_runtime_1.jsx)(Inner, { durationInFrames: video.durationInFrames, fps: video.fps, windowWidth: sliderTrack }));
|
|
89
|
+
};
|
|
90
|
+
exports.TimelineTimeIndicators = TimelineTimeIndicators;
|
|
91
|
+
const Inner = ({ windowWidth, durationInFrames, fps }) => {
|
|
87
92
|
const ref = (0, react_1.useRef)(null);
|
|
88
93
|
(0, react_1.useEffect)(() => {
|
|
89
94
|
const currentRef = ref.current;
|
|
@@ -110,29 +115,26 @@ const TimelineTimeIndicators = () => {
|
|
|
110
115
|
};
|
|
111
116
|
}, [windowWidth]);
|
|
112
117
|
const ticks = (0, react_1.useMemo)(() => {
|
|
113
|
-
|
|
114
|
-
return [];
|
|
115
|
-
}
|
|
116
|
-
const frameInterval = (0, timeline_scroll_logic_1.getFrameIncrementFromWidth)(video.durationInFrames, windowWidth);
|
|
118
|
+
const frameInterval = (0, timeline_scroll_logic_1.getFrameIncrementFromWidth)(durationInFrames, windowWidth);
|
|
117
119
|
const MIN_SPACING_BETWEEN_TICKS_PX = 5;
|
|
118
|
-
const seconds = Math.floor(
|
|
119
|
-
const secondMarkerEveryNth = Math.ceil((MIN_SPACING_BETWEEN_TICKS_PX *
|
|
120
|
+
const seconds = Math.floor(durationInFrames / fps);
|
|
121
|
+
const secondMarkerEveryNth = Math.ceil((MIN_SPACING_BETWEEN_TICKS_PX * fps) / (frameInterval * fps));
|
|
120
122
|
const frameMarkerEveryNth = Math.ceil(MIN_SPACING_BETWEEN_TICKS_PX / frameInterval);
|
|
121
123
|
// Big ticks showing for every second
|
|
122
124
|
const secondTicks = new Array(seconds)
|
|
123
125
|
.fill(true)
|
|
124
126
|
.map((_, index) => {
|
|
125
127
|
return {
|
|
126
|
-
frame: index *
|
|
128
|
+
frame: index * fps,
|
|
127
129
|
style: {
|
|
128
130
|
...secondTick,
|
|
129
|
-
left: frameInterval * index *
|
|
131
|
+
left: frameInterval * index * fps + timeline_layout_1.TIMELINE_PADDING,
|
|
130
132
|
},
|
|
131
133
|
showTime: index > 0,
|
|
132
134
|
};
|
|
133
135
|
})
|
|
134
136
|
.filter((_, idx) => idx % secondMarkerEveryNth === 0);
|
|
135
|
-
const frameTicks = new Array(
|
|
137
|
+
const frameTicks = new Array(durationInFrames)
|
|
136
138
|
.fill(true)
|
|
137
139
|
.map((_, index) => {
|
|
138
140
|
return {
|
|
@@ -140,7 +142,7 @@ const TimelineTimeIndicators = () => {
|
|
|
140
142
|
style: {
|
|
141
143
|
...tick,
|
|
142
144
|
left: frameInterval * index + timeline_layout_1.TIMELINE_PADDING,
|
|
143
|
-
height: index %
|
|
145
|
+
height: index % fps === 0
|
|
144
146
|
? 10
|
|
145
147
|
: (index / frameMarkerEveryNth) % 2 === 0
|
|
146
148
|
? 5
|
|
@@ -157,12 +159,8 @@ const TimelineTimeIndicators = () => {
|
|
|
157
159
|
hasTicks.push(t.frame);
|
|
158
160
|
return !alreadyUsed;
|
|
159
161
|
});
|
|
160
|
-
}, [
|
|
161
|
-
if (!video) {
|
|
162
|
-
return null;
|
|
163
|
-
}
|
|
162
|
+
}, [durationInFrames, fps, windowWidth]);
|
|
164
163
|
return ((0, jsx_runtime_1.jsx)("div", { ref: ref, style: style, children: ticks.map((t) => {
|
|
165
|
-
return ((0, jsx_runtime_1.jsx)("div", { style: t.style, children: t.showTime ? ((0, jsx_runtime_1.jsx)("div", { style: tickLabel, children: (0, render_frame_1.renderFrame)(t.frame,
|
|
164
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: t.style, children: t.showTime ? ((0, jsx_runtime_1.jsx)("div", { style: tickLabel, children: (0, render_frame_1.renderFrame)(t.frame, fps) })) : null }, t.frame));
|
|
166
165
|
}) }));
|
|
167
166
|
};
|
|
168
|
-
exports.TimelineTimeIndicators = TimelineTimeIndicators;
|
|
@@ -3,7 +3,6 @@ import type { TrackWithHash } from '../../helpers/get-timeline-sequence-sort-key
|
|
|
3
3
|
import type { TimelineViewState } from './timeline-state-reducer';
|
|
4
4
|
export declare const TimelineTracks: React.FC<{
|
|
5
5
|
timeline: TrackWithHash[];
|
|
6
|
-
fps: number;
|
|
7
6
|
viewState: TimelineViewState;
|
|
8
7
|
hasBeenCut: boolean;
|
|
9
8
|
}>;
|
|
@@ -15,7 +15,7 @@ const content = {
|
|
|
15
15
|
const timelineContent = {
|
|
16
16
|
minHeight: '100%',
|
|
17
17
|
};
|
|
18
|
-
const TimelineTracks = ({ timeline,
|
|
18
|
+
const TimelineTracks = ({ timeline, viewState, hasBeenCut }) => {
|
|
19
19
|
const inner = (0, react_1.useMemo)(() => {
|
|
20
20
|
return {
|
|
21
21
|
height: timeline_layout_1.TIMELINE_LAYER_HEIGHT + timeline_layout_1.TIMELINE_BORDER * 2,
|
|
@@ -31,7 +31,7 @@ const TimelineTracks = ({ timeline, fps, viewState, hasBeenCut }) => {
|
|
|
31
31
|
if ((0, is_collapsed_1.isTrackHidden)(track, timeline, viewState)) {
|
|
32
32
|
return null;
|
|
33
33
|
}
|
|
34
|
-
return ((0, jsx_runtime_1.jsx)("div", { style: inner, children: (0, jsx_runtime_1.jsx)(TimelineSequence_1.TimelineSequence, {
|
|
34
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: inner, children: (0, jsx_runtime_1.jsx)(TimelineSequence_1.TimelineSequence, { s: track.sequence }) }, track.sequence.id));
|
|
35
35
|
}), (0, jsx_runtime_1.jsx)(TimelineTimeIndicators_1.TimelineTimeIndicators, {})] }), hasBeenCut ? (0, jsx_runtime_1.jsx)(MaxTimelineTracks_1.MaxTimelineTracksReached, {}) : null] }));
|
|
36
36
|
};
|
|
37
37
|
exports.TimelineTracks = TimelineTracks;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type TimelineWidthContextType = number | null;
|
|
3
|
+
export declare const TimelineWidthContext: import("react").Context<TimelineWidthContextType>;
|
|
4
|
+
export declare const TimelineWidthProvider: React.FC<{
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TimelineWidthProvider = exports.TimelineWidthContext = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const player_1 = require("@remotion/player");
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const timeline_refs_1 = require("./timeline-refs");
|
|
8
|
+
exports.TimelineWidthContext = (0, react_1.createContext)(null);
|
|
9
|
+
const TimelineWidthProvider = ({ children }) => {
|
|
10
|
+
var _a;
|
|
11
|
+
const size = player_1.PlayerInternals.useElementSize(timeline_refs_1.sliderAreaRef, {
|
|
12
|
+
triggerOnWindowResize: false,
|
|
13
|
+
shouldApplyCssTransforms: true,
|
|
14
|
+
});
|
|
15
|
+
return ((0, jsx_runtime_1.jsx)(exports.TimelineWidthContext.Provider, { value: (_a = size === null || size === void 0 ? void 0 : size.width) !== null && _a !== void 0 ? _a : null, children: children }));
|
|
16
|
+
};
|
|
17
|
+
exports.TimelineWidthProvider = TimelineWidthProvider;
|
|
@@ -1,30 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getXPositionOfItemInTimelineImperatively =
|
|
4
|
-
const player_1 = require("@remotion/player");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const remotion_1 = require("remotion");
|
|
7
|
-
const timeline_refs_1 = require("../components/Timeline/timeline-refs");
|
|
3
|
+
exports.getXPositionOfItemInTimelineImperatively = void 0;
|
|
8
4
|
const timeline_layout_1 = require("./timeline-layout");
|
|
9
|
-
const useGetXPositionOfItemInTimeline = () => {
|
|
10
|
-
var _a;
|
|
11
|
-
const size = player_1.PlayerInternals.useElementSize(timeline_refs_1.sliderAreaRef, {
|
|
12
|
-
triggerOnWindowResize: false,
|
|
13
|
-
shouldApplyCssTransforms: true,
|
|
14
|
-
});
|
|
15
|
-
const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
|
|
16
|
-
const width = (_a = size === null || size === void 0 ? void 0 : size.width) !== null && _a !== void 0 ? _a : 0;
|
|
17
|
-
const get = (0, react_1.useCallback)((frame) => {
|
|
18
|
-
if (!videoConfig) {
|
|
19
|
-
return 0;
|
|
20
|
-
}
|
|
21
|
-
return (0, exports.getXPositionOfItemInTimelineImperatively)(frame, videoConfig.durationInFrames, width);
|
|
22
|
-
}, [videoConfig, width]);
|
|
23
|
-
return (0, react_1.useMemo)(() => {
|
|
24
|
-
return { get, width };
|
|
25
|
-
}, [get, width]);
|
|
26
|
-
};
|
|
27
|
-
exports.useGetXPositionOfItemInTimeline = useGetXPositionOfItemInTimeline;
|
|
28
5
|
const getXPositionOfItemInTimelineImperatively = (frame, duration, width) => {
|
|
29
6
|
const proportion = frame / (duration - 1);
|
|
30
7
|
return proportion * (width - timeline_layout_1.TIMELINE_PADDING * 2) + timeline_layout_1.TIMELINE_PADDING;
|
|
@@ -5,7 +5,7 @@ const react_1 = require("react");
|
|
|
5
5
|
const keybindings_1 = require("../state/keybindings");
|
|
6
6
|
const z_index_1 = require("../state/z-index");
|
|
7
7
|
if (!process.env.KEYBOARD_SHORTCUTS_ENABLED) {
|
|
8
|
-
console.warn('Keyboard shortcuts disabled either due to: a) --disable-keyboard-shortcuts being passed b) Config.
|
|
8
|
+
console.warn('Keyboard shortcuts disabled either due to: a) --disable-keyboard-shortcuts being passed b) Config.setKeyboardShortcutsEnabled(false) being set or c) a Remotion version mismatch.');
|
|
9
9
|
}
|
|
10
10
|
const areKeyboardShortcutsDisabled = () => {
|
|
11
11
|
return !process.env.KEYBOARD_SHORTCUTS_ENABLED;
|
|
@@ -138,7 +138,7 @@ const useMenuStructure = (closeMenu) => {
|
|
|
138
138
|
onClick: () => {
|
|
139
139
|
closeMenu();
|
|
140
140
|
if (type !== 'connected') {
|
|
141
|
-
(0, NotificationCenter_1.sendErrorNotification)('
|
|
141
|
+
(0, NotificationCenter_1.sendErrorNotification)('Restart the studio to render');
|
|
142
142
|
return;
|
|
143
143
|
}
|
|
144
144
|
const renderButton = document.getElementById('render-modal-button');
|
package/dist/event-source.js
CHANGED
|
@@ -47,7 +47,7 @@ const openEventSource = () => {
|
|
|
47
47
|
source.addEventListener('error', () => {
|
|
48
48
|
var _a;
|
|
49
49
|
(_a = client_id_1.studioServerConnectionRef.current) === null || _a === void 0 ? void 0 : _a.set({ type: 'disconnected' });
|
|
50
|
-
// Display an error message that the
|
|
50
|
+
// Display an error message that the studio server has disconnected.
|
|
51
51
|
source === null || source === void 0 ? void 0 : source.close();
|
|
52
52
|
// Retry later
|
|
53
53
|
setTimeout(() => {
|
|
@@ -20,7 +20,7 @@ export declare const getCliOptions: (options: {
|
|
|
20
20
|
numberOfGifLoops: import("./config/number-of-gif-loops").Loop;
|
|
21
21
|
stillFrame: number;
|
|
22
22
|
browserExecutable: BrowserExecutable;
|
|
23
|
-
logLevel: "
|
|
23
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
24
24
|
scale: number;
|
|
25
25
|
chromiumOptions: ChromiumOptions;
|
|
26
26
|
overwrite: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -62,19 +62,19 @@ export declare const CliInternals: {
|
|
|
62
62
|
verbose: (message?: any, ...optionalParams: any[]) => void;
|
|
63
63
|
verboseAdvanced: (options: {
|
|
64
64
|
indent: boolean;
|
|
65
|
-
logLevel: "
|
|
65
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
66
66
|
} & {
|
|
67
67
|
tag?: string | undefined;
|
|
68
68
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
69
69
|
info: (message?: any, ...optionalParams: any[]) => void;
|
|
70
70
|
infoAdvanced: (options: {
|
|
71
71
|
indent: boolean;
|
|
72
|
-
logLevel: "
|
|
72
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
73
73
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
74
74
|
warn: (message?: any, ...optionalParams: any[]) => void;
|
|
75
75
|
warnAdvanced: (options: {
|
|
76
76
|
indent: boolean;
|
|
77
|
-
logLevel: "
|
|
77
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
78
78
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
79
79
|
error: (message?: any, ...optionalParams: any[]) => void;
|
|
80
80
|
};
|
|
@@ -98,7 +98,7 @@ export declare const CliInternals: {
|
|
|
98
98
|
numberOfGifLoops: import("./config/number-of-gif-loops").Loop;
|
|
99
99
|
stillFrame: number;
|
|
100
100
|
browserExecutable: import("@remotion/renderer").BrowserExecutable;
|
|
101
|
-
logLevel: "
|
|
101
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
102
102
|
scale: number;
|
|
103
103
|
chromiumOptions: import("@remotion/renderer").ChromiumOptions;
|
|
104
104
|
overwrite: boolean;
|
|
@@ -172,7 +172,7 @@ export declare const CliInternals: {
|
|
|
172
172
|
} & {
|
|
173
173
|
_: string[];
|
|
174
174
|
};
|
|
175
|
-
handleCommonError: (err: Error, logLevel: "
|
|
175
|
+
handleCommonError: (err: Error, logLevel: "verbose" | "info" | "warn" | "error") => Promise<void>;
|
|
176
176
|
formatBytes: (number: number, options?: Intl.NumberFormatOptions & {
|
|
177
177
|
locale: string;
|
|
178
178
|
bits?: boolean | undefined;
|
|
@@ -214,7 +214,7 @@ export declare const CliInternals: {
|
|
|
214
214
|
};
|
|
215
215
|
listOfRemotionPackages: string[];
|
|
216
216
|
shouldUseNonOverlayingLogger: ({ logLevel, }: {
|
|
217
|
-
logLevel: "
|
|
217
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
218
218
|
}) => boolean;
|
|
219
219
|
getCompositionWithDimensionOverride: ({ height, width, args, compositionIdFromUi, chromiumOptions, envVariables, port, puppeteerInstance, timeoutInMilliseconds, browserExecutable, downloadMap, serveUrlOrWebpackUrl, indent, inputProps, verbose, }: {
|
|
220
220
|
height: number | null;
|