@remotion/cli 4.0.0-alpha7 → 4.0.0-alpha9
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/codemods/update-default-props.d.ts +1 -1
- package/dist/codemods/update-default-props.js +0 -1
- package/dist/editor/components/CheckboardToggle.js +2 -1
- package/dist/editor/components/InlineAction.d.ts +1 -1
- package/dist/editor/components/InlineAction.js +6 -3
- package/dist/editor/components/LoopToggle.js +2 -1
- package/dist/editor/components/Menu/MenuItem.js +1 -1
- package/dist/editor/components/Menu/SubMenu.js +1 -1
- package/dist/editor/components/MenuBuildIndicator.js +20 -1
- package/dist/editor/components/Modals.js +1 -1
- package/dist/editor/components/NewComposition/ComboBox.js +19 -4
- package/dist/editor/components/NewComposition/InputDragger.js +3 -2
- package/dist/editor/components/NewComposition/MenuContent.d.ts +1 -0
- package/dist/editor/components/NewComposition/MenuContent.js +11 -3
- package/dist/editor/components/OpenEditorButton.d.ts +2 -0
- package/dist/editor/components/OpenEditorButton.js +52 -0
- package/dist/editor/components/RenderButton.js +5 -1
- package/dist/editor/components/RenderModal/CliCopyButton.js +7 -6
- package/dist/editor/components/RenderModal/EnforceAudioTrackSetting.js +3 -2
- package/dist/editor/components/RenderModal/MutedSetting.js +3 -2
- package/dist/editor/components/RenderModal/OptionExplainer.js +1 -0
- package/dist/editor/components/RenderModal/RenderModal.d.ts +3 -1
- package/dist/editor/components/RenderModal/RenderModal.js +9 -7
- package/dist/editor/components/RenderModal/RenderModalAdvanced.js +0 -2
- package/dist/editor/components/RenderModal/RenderModalAudio.js +1 -1
- package/dist/editor/components/RenderModal/RenderModalBasic.js +3 -2
- package/dist/editor/components/RenderModal/RenderModalData.d.ts +3 -3
- package/dist/editor/components/RenderModal/RenderModalData.js +50 -25
- package/dist/editor/components/RenderModal/RenderModalJSONPropsEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaEditor.d.ts +5 -4
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaEditor.js +4 -4
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaErrorMessages.d.ts +3 -0
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaErrorMessages.js +6 -2
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaLabel.d.ts +4 -0
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaLabel.js +5 -4
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaSaveButton.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaSaveButton.js +4 -4
- package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayEditor.d.ts +1 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayEditor.js +38 -26
- package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayItemEditor.d.ts +4 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayItemEditor.js +4 -4
- package/dist/editor/components/RenderModal/SchemaEditor/ZodBooleanEditor.d.ts +2 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodBooleanEditor.js +7 -7
- package/dist/editor/components/RenderModal/SchemaEditor/ZodColorEditor.d.ts +2 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodColorEditor.js +17 -60
- package/dist/editor/components/RenderModal/SchemaEditor/ZodDateEditor.d.ts +2 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodDateEditor.js +10 -18
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEffectEditor.d.ts +3 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEffectEditor.js +6 -19
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEnumEditor.js +12 -26
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNonEditableValue.js +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNullableEditor.d.ts +4 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNullableEditor.js +2 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNumberEditor.d.ts +2 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNumberEditor.js +15 -34
- package/dist/editor/components/RenderModal/SchemaEditor/ZodObjectEditor.d.ts +6 -4
- package/dist/editor/components/RenderModal/SchemaEditor/ZodObjectEditor.js +17 -10
- package/dist/editor/components/RenderModal/SchemaEditor/ZodOptionalEditor.d.ts +4 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodOptionalEditor.js +2 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodOrNullishEditor.d.ts +4 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodOrNullishEditor.js +6 -6
- package/dist/editor/components/RenderModal/SchemaEditor/ZodStaticFileEditor.d.ts +1 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodStaticFileEditor.js +11 -25
- package/dist/editor/components/RenderModal/SchemaEditor/ZodStringEditor.d.ts +2 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodStringEditor.js +12 -23
- package/dist/editor/components/RenderModal/SchemaEditor/ZodSwitch.d.ts +3 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodSwitch.js +12 -12
- package/dist/editor/components/RenderModal/SchemaEditor/ZodUnionEditor.d.ts +4 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodUnionEditor.js +2 -2
- package/dist/editor/components/RenderModal/SchemaEditor/input-props-serialization.d.ts +2 -0
- package/dist/editor/components/RenderModal/SchemaEditor/input-props-serialization.js +11 -1
- package/dist/editor/components/RenderModal/SchemaEditor/local-state.d.ts +16 -0
- package/dist/editor/components/RenderModal/SchemaEditor/local-state.js +44 -0
- package/dist/editor/components/RenderModal/get-render-modal-warnings.d.ts +4 -1
- package/dist/editor/components/RenderModal/get-render-modal-warnings.js +21 -2
- package/dist/editor/components/RenderModal/out-name-checker.js +1 -11
- package/dist/editor/components/RenderQueue/actions.d.ts +3 -3
- package/dist/editor/components/RightPanel.js +3 -3
- package/dist/editor/components/SidebarRenderButton.js +2 -0
- package/dist/editor/components/Spinner.d.ts +4 -0
- package/dist/editor/components/Spinner.js +42 -0
- package/dist/editor/components/Tabs/index.js +12 -14
- package/dist/editor/components/Timeline/TimelineSequence.js +2 -2
- package/dist/editor/components/TimelineInOutToggle.js +2 -1
- package/dist/editor/components/UpdateCheck.js +2 -1
- package/dist/editor/helpers/colors.d.ts +2 -0
- package/dist/editor/helpers/colors.js +3 -1
- package/dist/editor/icons/media-volume.js +2 -1
- package/dist/editor/state/modals.d.ts +3 -1
- package/dist/get-cli-options.d.ts +1 -1
- package/dist/get-input-props.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/list-of-remotion-packages.js +1 -0
- package/dist/preview-server/api-types.d.ts +2 -2
- package/dist/preview-server/error-overlay/remotion-overlay/HelpLink.js +2 -1
- package/dist/preview-server/render-queue/job.d.ts +9 -2
- package/dist/preview-server/render-queue/make-retry-payload.js +5 -1
- package/dist/preview-server/render-queue/queue.js +0 -1
- package/dist/preview-server/routes/update-default-props.d.ts +2 -2
- package/dist/preview-server/routes/update-default-props.js +23 -13
- package/dist/preview-server/routes.d.ts +2 -1
- package/dist/preview-server/start-server.js +1 -1
- package/dist/render-flows/render.d.ts +1 -1
- package/dist/render-flows/still.d.ts +1 -1
- package/package.json +13 -11
- package/styles/styles.css +4 -5
|
@@ -39,20 +39,18 @@ const Tab = ({ children, onClick, style, selected }) => {
|
|
|
39
39
|
const onPointerLeave = (0, react_1.useCallback)(() => {
|
|
40
40
|
setHovered(false);
|
|
41
41
|
}, []);
|
|
42
|
-
const definiteStyle = (0, react_1.useMemo)(() => {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
};
|
|
55
|
-
}, [hovered, selected, style]);
|
|
42
|
+
const definiteStyle = (0, react_1.useMemo)(() => ({
|
|
43
|
+
...selectorButton,
|
|
44
|
+
backgroundColor: selected
|
|
45
|
+
? 'transparent'
|
|
46
|
+
: hovered
|
|
47
|
+
? colors_1.CLEAR_HOVER
|
|
48
|
+
: colors_1.INPUT_BACKGROUND,
|
|
49
|
+
color: selected ? 'white' : colors_1.LIGHT_TEXT,
|
|
50
|
+
borderTop: selected ? '2px solid ' + colors_1.BLUE : '2px solid transparent',
|
|
51
|
+
boxShadow: selected ? 'none' : undefined,
|
|
52
|
+
...style,
|
|
53
|
+
}), [hovered, selected, style]);
|
|
56
54
|
return ((0, jsx_runtime_1.jsx)("button", { style: definiteStyle, type: "button", onClick: onClick, tabIndex: tabIndex, onPointerLeave: onPointerLeave, onPointerEnter: onPointerEnter, children: children }));
|
|
57
55
|
};
|
|
58
56
|
exports.Tab = Tab;
|
|
@@ -5,13 +5,13 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const player_1 = require("@remotion/player");
|
|
6
6
|
const react_1 = require("react");
|
|
7
7
|
const remotion_1 = require("remotion");
|
|
8
|
+
const colors_1 = require("../../helpers/colors");
|
|
8
9
|
const get_timeline_sequence_layout_1 = require("../../helpers/get-timeline-sequence-layout");
|
|
9
10
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
10
11
|
const AudioWaveform_1 = require("../AudioWaveform");
|
|
11
12
|
const LoopedTimelineIndicators_1 = require("./LoopedTimelineIndicators");
|
|
12
13
|
const timeline_refs_1 = require("./timeline-refs");
|
|
13
14
|
const TimelineVideoInfo_1 = require("./TimelineVideoInfo");
|
|
14
|
-
const SEQUENCE_GRADIENT = 'var(--blue)';
|
|
15
15
|
const AUDIO_GRADIENT = 'linear-gradient(rgb(16 171 58), rgb(43 165 63) 60%)';
|
|
16
16
|
const VIDEO_GRADIENT = 'linear-gradient(to top, #8e44ad, #9b59b6)';
|
|
17
17
|
const TimelineSequence = ({ s, fps }) => {
|
|
@@ -45,7 +45,7 @@ const TimelineSequence = ({ s, fps }) => {
|
|
|
45
45
|
? AUDIO_GRADIENT
|
|
46
46
|
: s.type === 'video'
|
|
47
47
|
? VIDEO_GRADIENT
|
|
48
|
-
:
|
|
48
|
+
: colors_1.BLUE,
|
|
49
49
|
border: get_timeline_sequence_layout_1.SEQUENCE_BORDER_WIDTH + 'px solid rgba(255, 255, 255, 0.2)',
|
|
50
50
|
borderRadius: 4,
|
|
51
51
|
position: 'absolute',
|
|
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
7
7
|
const truthy_1 = require("../../truthy");
|
|
8
|
+
const colors_1 = require("../helpers/colors");
|
|
8
9
|
const is_current_selected_still_1 = require("../helpers/is-current-selected-still");
|
|
9
10
|
const use_keybinding_1 = require("../helpers/use-keybinding");
|
|
10
11
|
const timelineInOutPointer_1 = require("../icons/timelineInOutPointer");
|
|
@@ -224,6 +225,6 @@ const TimelineInOutPointToggle = () => {
|
|
|
224
225
|
if (isStill) {
|
|
225
226
|
return null;
|
|
226
227
|
}
|
|
227
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ControlButton_1.ControlButton, { title: getTooltipText('In', 'I'), "aria-label": getTooltipText('In', 'I'), onClick: (e) => onInMark(e), onContextMenu: clearInMark, disabled: timelinePosition === 0, children: (0, jsx_runtime_1.jsx)(timelineInOutPointer_1.TimelineInPointer, { color: inFrame === null ? 'white' :
|
|
228
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ControlButton_1.ControlButton, { title: getTooltipText('In', 'I'), "aria-label": getTooltipText('In', 'I'), onClick: (e) => onInMark(e), onContextMenu: clearInMark, disabled: timelinePosition === 0, children: (0, jsx_runtime_1.jsx)(timelineInOutPointer_1.TimelineInPointer, { color: inFrame === null ? 'white' : colors_1.BLUE, style: style }) }), (0, jsx_runtime_1.jsx)(ControlButton_1.ControlButton, { title: getTooltipText('Out', 'O'), "aria-label": getTooltipText('Out', 'O'), onClick: onOutMark, onContextMenu: clearOutMark, disabled: timelinePosition === videoConfig.durationInFrames - 1, children: (0, jsx_runtime_1.jsx)(timelineInOutPointer_1.TimelineOutPointer, { color: outFrame === null ? 'white' : colors_1.BLUE, style: style }) })] }));
|
|
228
229
|
};
|
|
229
230
|
exports.TimelineInOutPointToggle = TimelineInOutPointToggle;
|
|
@@ -3,11 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.UpdateCheck = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
+
const colors_1 = require("../helpers/colors");
|
|
6
7
|
const modals_1 = require("../state/modals");
|
|
7
8
|
const z_index_1 = require("../state/z-index");
|
|
8
9
|
const buttonStyle = {
|
|
9
10
|
appearance: 'none',
|
|
10
|
-
color:
|
|
11
|
+
color: colors_1.BLUE,
|
|
11
12
|
border: 'none',
|
|
12
13
|
fontWeight: 'bold',
|
|
13
14
|
backgroundColor: 'transparent',
|
|
@@ -11,6 +11,8 @@ export declare const INPUT_BORDER_COLOR_HOVERED = "rgba(255, 255, 255, 0.05)";
|
|
|
11
11
|
export declare const TIMELINE_BACKGROUND = "#111";
|
|
12
12
|
export declare const FAIL_COLOR = "#ff3232";
|
|
13
13
|
export declare const WARNING_COLOR = "#f1c40f";
|
|
14
|
+
export declare const BLUE = "#0b84f3";
|
|
15
|
+
export declare const BLUE_DISABLED = "#284f73";
|
|
14
16
|
export declare const getBackgroundFromHoverState: ({ selected, hovered, }: {
|
|
15
17
|
selected: boolean;
|
|
16
18
|
hovered: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getBackgroundFromHoverState = exports.WARNING_COLOR = exports.FAIL_COLOR = exports.TIMELINE_BACKGROUND = exports.INPUT_BORDER_COLOR_HOVERED = exports.INPUT_BORDER_COLOR_UNHOVERED = exports.CLEAR_HOVER = exports.VERY_LIGHT_TEXT = exports.LIGHT_TEXT = exports.SELECTED_BACKGROUND = exports.LIGHT_COLOR = exports.BORDER_COLOR = exports.INPUT_BACKGROUND = exports.BACKGROUND = void 0;
|
|
3
|
+
exports.getBackgroundFromHoverState = exports.BLUE_DISABLED = exports.BLUE = exports.WARNING_COLOR = exports.FAIL_COLOR = exports.TIMELINE_BACKGROUND = exports.INPUT_BORDER_COLOR_HOVERED = exports.INPUT_BORDER_COLOR_UNHOVERED = exports.CLEAR_HOVER = exports.VERY_LIGHT_TEXT = exports.LIGHT_TEXT = exports.SELECTED_BACKGROUND = exports.LIGHT_COLOR = exports.BORDER_COLOR = exports.INPUT_BACKGROUND = exports.BACKGROUND = void 0;
|
|
4
4
|
exports.BACKGROUND = '#1f2428';
|
|
5
5
|
exports.INPUT_BACKGROUND = '#2f363d';
|
|
6
6
|
exports.BORDER_COLOR = '#000';
|
|
@@ -15,6 +15,8 @@ exports.INPUT_BORDER_COLOR_HOVERED = 'rgba(255, 255, 255, 0.05)';
|
|
|
15
15
|
exports.TIMELINE_BACKGROUND = '#111';
|
|
16
16
|
exports.FAIL_COLOR = '#ff3232';
|
|
17
17
|
exports.WARNING_COLOR = '#f1c40f';
|
|
18
|
+
exports.BLUE = '#0b84f3';
|
|
19
|
+
exports.BLUE_DISABLED = '#284f73';
|
|
18
20
|
const getBackgroundFromHoverState = ({ selected, hovered, }) => {
|
|
19
21
|
if (selected) {
|
|
20
22
|
if (hovered) {
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VolumeOnIcon = exports.VolumeOffIcon = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const colors_1 = require("../helpers/colors");
|
|
5
6
|
const size = 25;
|
|
6
7
|
const VolumeOffIcon = () => {
|
|
7
|
-
return ((0, jsx_runtime_1.jsx)("svg", { width: size, height: size, viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { d: "M3.63 3.63a.996.996 0 000 1.41L7.29 8.7 7 9H4c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h3l3.29 3.29c.63.63 1.71.18 1.71-.71v-4.17l4.18 4.18c-.49.37-1.02.68-1.6.91-.36.15-.58.53-.58.92 0 .72.73 1.18 1.39.91.8-.33 1.55-.77 2.22-1.31l1.34 1.34a.996.996 0 101.41-1.41L5.05 3.63c-.39-.39-1.02-.39-1.42 0zM19 12c0 .82-.15 1.61-.41 2.34l1.53 1.53c.56-1.17.88-2.48.88-3.87 0-3.83-2.4-7.11-5.78-8.4-.59-.23-1.22.23-1.22.86v.19c0 .38.25.71.61.85C17.18 6.54 19 9.06 19 12zm-8.71-6.29l-.17.17L12 7.76V6.41c0-.89-1.08-1.33-1.71-.7zM16.5 12A4.5 4.5 0 0014 7.97v1.79l2.48 2.48c.01-.08.02-.16.02-.24z", fill:
|
|
8
|
+
return ((0, jsx_runtime_1.jsx)("svg", { width: size, height: size, viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { d: "M3.63 3.63a.996.996 0 000 1.41L7.29 8.7 7 9H4c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h3l3.29 3.29c.63.63 1.71.18 1.71-.71v-4.17l4.18 4.18c-.49.37-1.02.68-1.6.91-.36.15-.58.53-.58.92 0 .72.73 1.18 1.39.91.8-.33 1.55-.77 2.22-1.31l1.34 1.34a.996.996 0 101.41-1.41L5.05 3.63c-.39-.39-1.02-.39-1.42 0zM19 12c0 .82-.15 1.61-.41 2.34l1.53 1.53c.56-1.17.88-2.48.88-3.87 0-3.83-2.4-7.11-5.78-8.4-.59-.23-1.22.23-1.22.86v.19c0 .38.25.71.61.85C17.18 6.54 19 9.06 19 12zm-8.71-6.29l-.17.17L12 7.76V6.41c0-.89-1.08-1.33-1.71-.7zM16.5 12A4.5 4.5 0 0014 7.97v1.79l2.48 2.48c.01-.08.02-.16.02-.24z", fill: colors_1.BLUE }) }));
|
|
8
9
|
};
|
|
9
10
|
exports.VolumeOffIcon = VolumeOffIcon;
|
|
10
11
|
const VolumeOnIcon = () => {
|
|
@@ -35,7 +35,9 @@ export declare type RenderModalState = {
|
|
|
35
35
|
initialHeadless: boolean;
|
|
36
36
|
minConcurrency: number;
|
|
37
37
|
maxConcurrency: number;
|
|
38
|
-
defaultProps: unknown
|
|
38
|
+
defaultProps: Record<string, unknown>;
|
|
39
|
+
inFrameMark: number | null;
|
|
40
|
+
outFrameMark: number | null;
|
|
39
41
|
};
|
|
40
42
|
export declare type ModalState = {
|
|
41
43
|
type: 'new-comp';
|
|
@@ -9,7 +9,7 @@ export declare const getCliOptions: (options: {
|
|
|
9
9
|
concurrency: string | number | null;
|
|
10
10
|
frameRange: FrameRange | null;
|
|
11
11
|
shouldOutputImageSequence: boolean;
|
|
12
|
-
inputProps:
|
|
12
|
+
inputProps: Record<string, unknown>;
|
|
13
13
|
envVariables: Record<string, string>;
|
|
14
14
|
jpegQuality: number | undefined;
|
|
15
15
|
browser: import("@remotion/renderer").Browser;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getInputProps: (onUpdate: ((newProps:
|
|
1
|
+
export declare const getInputProps: (onUpdate: ((newProps: Record<string, unknown>) => void) | null) => Record<string, unknown>;
|
package/dist/index.d.ts
CHANGED
|
@@ -87,7 +87,7 @@ export declare const CliInternals: {
|
|
|
87
87
|
concurrency: string | number | null;
|
|
88
88
|
frameRange: import("@remotion/renderer").FrameRange | null;
|
|
89
89
|
shouldOutputImageSequence: boolean;
|
|
90
|
-
inputProps:
|
|
90
|
+
inputProps: Record<string, unknown>;
|
|
91
91
|
envVariables: Record<string, string>;
|
|
92
92
|
jpegQuality: number | undefined;
|
|
93
93
|
browser: import("@remotion/renderer").Browser;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
3
|
-
import type { AddRenderRequest, CancelRenderRequest, CancelRenderResponse, CanUpdateDefaultPropsRequest, CanUpdateDefaultPropsResponse, OpenInFileExplorerRequest, RemoveRenderRequest, SubscribeToFileExistenceRequest, SubscribeToFileExistenceResponse, UnsubscribeFromFileExistenceRequest, UpdateDefaultPropsRequest } from './render-queue/job';
|
|
3
|
+
import type { AddRenderRequest, CancelRenderRequest, CancelRenderResponse, CanUpdateDefaultPropsRequest, CanUpdateDefaultPropsResponse, OpenInFileExplorerRequest, RemoveRenderRequest, SubscribeToFileExistenceRequest, SubscribeToFileExistenceResponse, UnsubscribeFromFileExistenceRequest, UpdateDefaultPropsRequest, UpdateDefaultPropsResponse } from './render-queue/job';
|
|
4
4
|
export declare type ApiHandler<ReqData, ResData> = (params: {
|
|
5
5
|
input: ReqData;
|
|
6
6
|
entryPoint: string;
|
|
@@ -19,7 +19,7 @@ export declare type ApiRoutes = {
|
|
|
19
19
|
'/api/subscribe-to-file-existence': ReqAndRes<SubscribeToFileExistenceRequest, SubscribeToFileExistenceResponse>;
|
|
20
20
|
'/api/remove-render': ReqAndRes<RemoveRenderRequest, undefined>;
|
|
21
21
|
'/api/open-in-file-explorer': ReqAndRes<OpenInFileExplorerRequest, void>;
|
|
22
|
-
'/api/update-default-props': ReqAndRes<UpdateDefaultPropsRequest,
|
|
22
|
+
'/api/update-default-props': ReqAndRes<UpdateDefaultPropsRequest, UpdateDefaultPropsResponse>;
|
|
23
23
|
'/api/can-update-default-props': ReqAndRes<CanUpdateDefaultPropsRequest, CanUpdateDefaultPropsResponse>;
|
|
24
24
|
};
|
|
25
25
|
export {};
|
|
@@ -3,11 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.HelpLink = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
+
const colors_1 = require("../../../editor/helpers/colors");
|
|
6
7
|
const use_keybinding_1 = require("../../../editor/helpers/use-keybinding");
|
|
7
8
|
const Button_1 = require("./Button");
|
|
8
9
|
const ShortcutHint_1 = require("./ShortcutHint");
|
|
9
10
|
const buttonStyle = {
|
|
10
|
-
backgroundColor:
|
|
11
|
+
backgroundColor: colors_1.BLUE,
|
|
11
12
|
color: 'white',
|
|
12
13
|
};
|
|
13
14
|
const HelpLink = ({ canHaveKeyboardShortcuts, link }) => {
|
|
@@ -60,7 +60,7 @@ export declare type RenderJob = {
|
|
|
60
60
|
cancelToken: ReturnType<typeof makeCancelSignal>;
|
|
61
61
|
chromiumOptions: RequiredChromiumOptions;
|
|
62
62
|
envVariables: Record<string, string>;
|
|
63
|
-
inputProps: unknown
|
|
63
|
+
inputProps: Record<string, unknown>;
|
|
64
64
|
} & RenderJobDynamicFields;
|
|
65
65
|
export declare type RenderJobWithCleanup = RenderJob & {
|
|
66
66
|
cleanup: (() => void)[];
|
|
@@ -104,7 +104,7 @@ export declare type AddRenderRequest = {
|
|
|
104
104
|
chromiumOptions: RequiredChromiumOptions;
|
|
105
105
|
delayRenderTimeout: number;
|
|
106
106
|
envVariables: Record<string, string>;
|
|
107
|
-
inputProps: unknown
|
|
107
|
+
inputProps: Record<string, unknown>;
|
|
108
108
|
} & AddRenderRequestDynamicFields;
|
|
109
109
|
export declare type RemoveRenderRequest = {
|
|
110
110
|
jobId: string;
|
|
@@ -128,6 +128,13 @@ export declare type UpdateDefaultPropsRequest = {
|
|
|
128
128
|
defaultProps: string;
|
|
129
129
|
enumPaths: EnumPath[];
|
|
130
130
|
};
|
|
131
|
+
export declare type UpdateDefaultPropsResponse = {
|
|
132
|
+
success: true;
|
|
133
|
+
} | {
|
|
134
|
+
success: false;
|
|
135
|
+
reason: string;
|
|
136
|
+
stack: string;
|
|
137
|
+
};
|
|
131
138
|
export declare type CanUpdateDefaultPropsRequest = {
|
|
132
139
|
compositionId: string;
|
|
133
140
|
};
|
|
@@ -45,11 +45,13 @@ const makeRetryPayload = (job) => {
|
|
|
45
45
|
initialHeadless: job.chromiumOptions.headless,
|
|
46
46
|
initialIgnoreCertificateErrors: job.chromiumOptions.ignoreCertificateErrors,
|
|
47
47
|
defaultProps: job.inputProps,
|
|
48
|
+
inFrameMark: null,
|
|
49
|
+
outFrameMark: null,
|
|
48
50
|
};
|
|
49
51
|
}
|
|
50
52
|
if (job.type === 'video') {
|
|
51
53
|
const { initialAudioCodec, initialRenderType, initialVideoCodec } = (0, get_default_video_contexts_1.getDefaultCodecs)({
|
|
52
|
-
defaultCodec:
|
|
54
|
+
defaultCodec: job.codec,
|
|
53
55
|
isStill: false,
|
|
54
56
|
});
|
|
55
57
|
return {
|
|
@@ -84,6 +86,8 @@ const makeRetryPayload = (job) => {
|
|
|
84
86
|
initialHeadless: job.chromiumOptions.headless,
|
|
85
87
|
initialIgnoreCertificateErrors: job.chromiumOptions.ignoreCertificateErrors,
|
|
86
88
|
defaultProps: job.inputProps,
|
|
89
|
+
inFrameMark: job.startFrame,
|
|
90
|
+
outFrameMark: job.endFrame,
|
|
87
91
|
};
|
|
88
92
|
}
|
|
89
93
|
throw new Error(`Job ${JSON.stringify(job)} Not implemented`);
|
|
@@ -93,7 +93,6 @@ const cancelJob = (jobId) => {
|
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
95
|
exports.cancelJob = cancelJob;
|
|
96
|
-
// TODO: Currently, concurrency = 1 is not enforced
|
|
97
96
|
const processJobIfPossible = async ({ remotionRoot, entryPoint, }) => {
|
|
98
97
|
const runningJob = jobQueue.find((q) => {
|
|
99
98
|
return q.status === 'running';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ApiHandler } from '../api-types';
|
|
2
|
-
import type { UpdateDefaultPropsRequest } from '../render-queue/job';
|
|
3
|
-
export declare const updateDefaultPropsHandler: ApiHandler<UpdateDefaultPropsRequest,
|
|
2
|
+
import type { UpdateDefaultPropsRequest, UpdateDefaultPropsResponse } from '../render-queue/job';
|
|
3
|
+
export declare const updateDefaultPropsHandler: ApiHandler<UpdateDefaultPropsRequest, UpdateDefaultPropsResponse>;
|
|
@@ -7,19 +7,29 @@ const input_props_serialization_1 = require("../../editor/components/RenderModal
|
|
|
7
7
|
const project_info_1 = require("../project-info");
|
|
8
8
|
const can_update_default_props_1 = require("./can-update-default-props");
|
|
9
9
|
const updateDefaultPropsHandler = async ({ input: { compositionId, defaultProps, enumPaths }, remotionRoot }) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
try {
|
|
11
|
+
const projectInfo = await (0, project_info_1.getProjectInfo)(remotionRoot);
|
|
12
|
+
if (!projectInfo.videoFile) {
|
|
13
|
+
throw new Error('Cannot find root file in project');
|
|
14
|
+
}
|
|
15
|
+
(0, can_update_default_props_1.checkIfTypeScriptFile)(projectInfo.videoFile);
|
|
16
|
+
const updated = await (0, update_default_props_1.updateDefaultProps)({
|
|
17
|
+
compositionId,
|
|
18
|
+
input: (0, node_fs_1.readFileSync)(projectInfo.videoFile, 'utf-8'),
|
|
19
|
+
newDefaultProps: (0, input_props_serialization_1.deserializeJSONWithCustomFields)(defaultProps),
|
|
20
|
+
enumPaths,
|
|
21
|
+
});
|
|
22
|
+
(0, node_fs_1.writeFileSync)(projectInfo.videoFile, updated);
|
|
23
|
+
return {
|
|
24
|
+
success: true,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
catch (err) {
|
|
28
|
+
return {
|
|
29
|
+
success: false,
|
|
30
|
+
reason: err.message,
|
|
31
|
+
stack: err.stack,
|
|
32
|
+
};
|
|
14
33
|
}
|
|
15
|
-
(0, can_update_default_props_1.checkIfTypeScriptFile)(projectInfo.videoFile);
|
|
16
|
-
// TODO: Pass error to frontend
|
|
17
|
-
const updated = await (0, update_default_props_1.updateDefaultProps)({
|
|
18
|
-
compositionId,
|
|
19
|
-
input: (0, node_fs_1.readFileSync)(projectInfo.videoFile, 'utf-8'),
|
|
20
|
-
newDefaultProps: (0, input_props_serialization_1.deserializeJSONWithCustomFields)(defaultProps),
|
|
21
|
-
enumPaths,
|
|
22
|
-
});
|
|
23
|
-
(0, node_fs_1.writeFileSync)(projectInfo.videoFile, updated);
|
|
24
34
|
};
|
|
25
35
|
exports.updateDefaultPropsHandler = updateDefaultPropsHandler;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
2
3
|
import type { LiveEventsServer } from './live-events';
|
|
3
4
|
export declare const handleRoutes: ({ hash, hashPrefix, request, response, liveEventsServer, getCurrentInputProps, getEnvVariables, remotionRoot, entryPoint, publicDir, }: {
|
|
@@ -11,4 +12,4 @@ export declare const handleRoutes: ({ hash, hashPrefix, request, response, liveE
|
|
|
11
12
|
remotionRoot: string;
|
|
12
13
|
entryPoint: string;
|
|
13
14
|
publicDir: string;
|
|
14
|
-
}) => void | Promise<void>;
|
|
15
|
+
}) => void | Promise<void> | Promise<ServerResponse<IncomingMessage> | undefined>;
|
|
@@ -13,7 +13,7 @@ export declare const renderVideoFlow: ({ remotionRoot, fullEntryPoint, indent, l
|
|
|
13
13
|
indent: boolean;
|
|
14
14
|
shouldOutputImageSequence: boolean;
|
|
15
15
|
publicDir: string | null;
|
|
16
|
-
inputProps:
|
|
16
|
+
inputProps: Record<string, unknown>;
|
|
17
17
|
envVariables: Record<string, string>;
|
|
18
18
|
puppeteerTimeout: number;
|
|
19
19
|
port: number | null;
|
|
@@ -5,7 +5,7 @@ export declare const renderStillFlow: ({ remotionRoot, fullEntryPoint, entryPoin
|
|
|
5
5
|
fullEntryPoint: string;
|
|
6
6
|
entryPointReason: string;
|
|
7
7
|
remainingArgs: string[];
|
|
8
|
-
inputProps:
|
|
8
|
+
inputProps: Record<string, unknown>;
|
|
9
9
|
envVariables: Record<string, string>;
|
|
10
10
|
jpegQuality: number | undefined;
|
|
11
11
|
browser: Browser;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/cli",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-alpha9",
|
|
4
4
|
"description": "CLI for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -28,18 +28,18 @@
|
|
|
28
28
|
"author": "Jonny Burger <jonny@remotion.dev>",
|
|
29
29
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@remotion/bundler": "4.0.0-alpha7",
|
|
32
|
-
"@remotion/media-utils": "4.0.0-alpha7",
|
|
33
|
-
"@remotion/player": "4.0.0-alpha7",
|
|
34
|
-
"@remotion/renderer": "4.0.0-alpha7",
|
|
35
31
|
"dotenv": "9.0.2",
|
|
36
32
|
"memfs": "3.4.3",
|
|
37
33
|
"minimist": "1.2.6",
|
|
38
34
|
"open": "^8.4.2",
|
|
39
35
|
"prompts": "2.4.1",
|
|
40
|
-
"remotion": "4.0.0-alpha7",
|
|
41
36
|
"semver": "7.3.5",
|
|
42
|
-
"source-map": "0.6.1"
|
|
37
|
+
"source-map": "0.6.1",
|
|
38
|
+
"@remotion/bundler": "4.0.0-alpha9",
|
|
39
|
+
"@remotion/media-utils": "4.0.0-alpha9",
|
|
40
|
+
"@remotion/player": "4.0.0-alpha9",
|
|
41
|
+
"remotion": "4.0.0-alpha9",
|
|
42
|
+
"@remotion/renderer": "4.0.0-alpha9"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"react": ">=16.8.0",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@jonny/eslint-config": "3.0.266",
|
|
50
50
|
"@types/minimist": "^1.2.2",
|
|
51
|
-
"@types/node": "
|
|
51
|
+
"@types/node": "18.14.6",
|
|
52
52
|
"@types/prompts": "^2.4.1",
|
|
53
53
|
"@types/react": "18.0.26",
|
|
54
54
|
"@types/prettier": "^2.7.2",
|
|
@@ -56,7 +56,6 @@
|
|
|
56
56
|
"@types/semver": "^7.3.4",
|
|
57
57
|
"@typescript-eslint/eslint-plugin": "5.18.0",
|
|
58
58
|
"@typescript-eslint/parser": "5.18.0",
|
|
59
|
-
"@remotion/zod-types": "4.0.0-alpha7",
|
|
60
59
|
"eslint": "8.25.0",
|
|
61
60
|
"eslint-plugin-10x": "1.5.2",
|
|
62
61
|
"eslint-plugin-react": "7.29.4",
|
|
@@ -66,8 +65,10 @@
|
|
|
66
65
|
"react": "^18.0.0",
|
|
67
66
|
"react-dom": "^18.0.0",
|
|
68
67
|
"typescript": "^4.7.0",
|
|
69
|
-
"vitest": "0.
|
|
70
|
-
"zod": "^3.21.4"
|
|
68
|
+
"vitest": "0.31.1",
|
|
69
|
+
"zod": "^3.21.4",
|
|
70
|
+
"@remotion/zod-types": "4.0.0-alpha9",
|
|
71
|
+
"@remotion/tailwind": "4.0.0-alpha9"
|
|
71
72
|
},
|
|
72
73
|
"keywords": [
|
|
73
74
|
"remotion",
|
|
@@ -80,6 +81,7 @@
|
|
|
80
81
|
"access": "public"
|
|
81
82
|
},
|
|
82
83
|
"scripts": {
|
|
84
|
+
"formatting": "prettier src --check",
|
|
83
85
|
"lint": "eslint src --ext ts,tsx",
|
|
84
86
|
"test": "vitest --run",
|
|
85
87
|
"build": "tsc -d",
|
package/styles/styles.css
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
html {
|
|
2
|
-
--blue: #0b84f3;
|
|
3
|
-
--blue-disabled: #284f73;
|
|
2
|
+
--remotion-cli-internals-blue: #0b84f3;
|
|
4
3
|
}
|
|
5
4
|
|
|
6
5
|
body {
|
|
@@ -18,7 +17,7 @@ body {
|
|
|
18
17
|
|
|
19
18
|
.remotion-splitter:hover,
|
|
20
19
|
.remotion-splitter-active {
|
|
21
|
-
background-color: var(--blue);
|
|
20
|
+
background-color: var(--remotion-cli-internals-blue);
|
|
22
21
|
}
|
|
23
22
|
|
|
24
23
|
input::-webkit-outer-spin-button,
|
|
@@ -37,9 +36,9 @@ a:focus {
|
|
|
37
36
|
border-radius: 0 !important;
|
|
38
37
|
}
|
|
39
38
|
|
|
40
|
-
input[type=
|
|
39
|
+
input[type='color'].__remotion_color_picker::-webkit-color-swatch-wrapper {
|
|
41
40
|
padding: 0;
|
|
42
41
|
}
|
|
43
|
-
input[type=
|
|
42
|
+
input[type='color'].__remotion_color_picker::-webkit-color-swatch {
|
|
44
43
|
border: none;
|
|
45
44
|
}
|