@remotion/cli 4.1.0-alpha1 → 4.1.0-alpha11
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/benchmark.js +16 -7
- package/dist/chalk/index.d.ts +2 -1
- package/dist/codemods/stringify-with-path.js +24 -19
- package/dist/compositions.js +9 -4
- package/dist/config/index.d.ts +24 -0
- package/dist/config/index.js +19 -1
- package/dist/editor/components/Canvas.js +4 -4
- package/dist/editor/components/CanvasOrLoading.js +20 -1
- package/dist/editor/components/CopyButton.js +5 -2
- package/dist/editor/components/Editor.js +1 -3
- package/dist/editor/components/FramePersistor.d.ts +0 -2
- package/dist/editor/components/FramePersistor.js +4 -24
- package/dist/editor/components/FullscreenToggle.d.ts +2 -0
- package/dist/editor/components/FullscreenToggle.js +25 -0
- package/dist/editor/components/GlobalKeybindings.js +1 -1
- package/dist/editor/components/InitialCompositionLoader.js +1 -22
- package/dist/editor/components/KeyboardShortcutsExplainer.js +1 -1
- package/dist/editor/components/NewComposition/InputDragger.js +13 -1
- 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/RemTextarea.d.ts +1 -1
- package/dist/editor/components/OpenEditorButton.js +5 -2
- package/dist/editor/components/PlayPause.js +4 -4
- package/dist/editor/components/PlaybackRateSelector.js +1 -1
- package/dist/editor/components/PreviewToolbar.js +3 -1
- package/dist/editor/components/QuickSwitcher/QuickSwitcherResult.js +3 -3
- package/dist/editor/components/RenderModal/DataEditor.d.ts +2 -0
- package/dist/editor/components/RenderModal/DataEditor.js +13 -10
- package/dist/editor/components/RenderModal/FrameRangeSetting.js +9 -25
- package/dist/editor/components/RenderModal/MultiRangeSlider.d.ts +12 -0
- package/dist/editor/components/RenderModal/MultiRangeSlider.js +50 -0
- package/dist/editor/components/RenderModal/RenderModal.js +7 -3
- package/dist/editor/components/RenderModal/RenderModalBasic.d.ts +2 -3
- package/dist/editor/components/RenderModal/RenderModalJSONPropsEditor.d.ts +1 -2
- package/dist/editor/components/RenderModal/RenderModalJSONPropsEditor.js +10 -11
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaEditor.d.ts +2 -2
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaEditor.js +26 -0
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaErrorMessages.js +1 -3
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaLabel.js +1 -2
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaSaveButton.js +2 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayEditor.js +7 -7
- package/dist/editor/components/RenderModal/SchemaEditor/ZodBooleanEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodBooleanEditor.js +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodColorEditor.js +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodDateEditor.js +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEffectEditor.js +2 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEnumEditor.js +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodFieldValidation.js +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNonEditableValue.js +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNumberEditor.js +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodObjectEditor.js +29 -10
- package/dist/editor/components/RenderModal/SchemaEditor/ZodOrNullishEditor.js +2 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodStaticFileEditor.js +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodStringEditor.js +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodSwitch.js +0 -1
- package/dist/editor/components/RenderModal/SchemaEditor/local-state.js +9 -3
- package/dist/editor/components/RenderModal/human-readable-codec.d.ts +1 -1
- package/dist/editor/components/RenderQueue/actions.d.ts +1 -1
- package/dist/editor/components/RenderQueue/actions.js +12 -4
- package/dist/editor/components/RightPanel.js +45 -12
- package/dist/editor/components/SetTimelineInOutProvider.js +5 -4
- package/dist/editor/components/SidebarRenderButton.js +3 -1
- package/dist/editor/components/Timeline/TimelineDragHandler.js +45 -19
- package/dist/editor/components/TimelineInOutToggle.d.ts +2 -1
- package/dist/editor/components/TimelineInOutToggle.js +82 -67
- package/dist/editor/helpers/colors.d.ts +1 -1
- package/dist/editor/helpers/is-composition-still.d.ts +1 -1
- package/dist/editor/helpers/is-current-selected-still.js +5 -6
- package/dist/editor/helpers/use-menu-structure.js +25 -1
- package/dist/editor/icons/keys.js +1 -0
- package/dist/editor/state/canvas-ref.d.ts +2 -0
- package/dist/editor/state/canvas-ref.js +5 -0
- package/dist/editor/state/in-out.d.ts +3 -2
- package/dist/editor/state/in-out.js +22 -5
- package/dist/editor/state/marks.d.ts +3 -2
- package/dist/editor/state/marks.js +6 -6
- package/dist/get-composition-id.d.ts +6 -6
- package/dist/get-composition-id.js +13 -6
- package/dist/get-composition-with-dimension-override.d.ts +6 -6
- package/dist/get-composition-with-dimension-override.js +3 -3
- package/dist/handle-common-errors.js +8 -0
- package/dist/index.d.ts +13 -7
- package/dist/index.js +5 -2
- package/dist/log.d.ts +6 -1
- package/dist/parse-command-line.js +1 -1
- package/dist/preview-server/dev-middleware/range-parser.d.ts +1 -1
- package/dist/preview-server/dev-middleware/setup-hooks.js +1 -1
- package/dist/preview-server/render-queue/job.d.ts +2 -2
- package/dist/preview-server/render-queue/make-retry-payload.js +3 -2
- package/dist/preview-server/render-queue/open-directory-in-finder.js +11 -5
- 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/routes/add-render.js +2 -2
- package/dist/preview-server/routes/update-default-props.js +1 -2
- package/dist/print-compositions.d.ts +2 -2
- package/dist/print-error.js +6 -3
- package/dist/progress-bar.js +2 -5
- package/dist/render-flows/render.d.ts +2 -2
- package/dist/render-flows/render.js +31 -22
- package/dist/render-flows/still.d.ts +2 -2
- package/dist/render-flows/still.js +20 -14
- package/dist/render.js +6 -1
- package/dist/setup-cache.js +1 -1
- package/dist/still.js +6 -1
- package/package.json +11 -11
- package/styles/styles.css +53 -0
- package/dist/editor/components/RenderModal/SchemaEditor/input-props-serialization.d.ts +0 -14
- package/dist/editor/components/RenderModal/SchemaEditor/input-props-serialization.js +0 -42
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { z } from 'zod';
|
|
2
3
|
import type { JSONPath } from './zod-types';
|
|
3
4
|
import type { UpdaterFunction } from './ZodSwitch';
|
|
4
|
-
import type { z } from 'zod';
|
|
5
5
|
export declare const ZodBooleanEditor: React.FC<{
|
|
6
6
|
schema: z.ZodTypeAny;
|
|
7
7
|
jsonPath: JSONPath;
|
|
@@ -4,9 +4,9 @@ exports.ZodBooleanEditor = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const Checkbox_1 = require("../../Checkbox");
|
|
7
|
-
const SchemaLabel_1 = require("./SchemaLabel");
|
|
8
7
|
const Fieldset_1 = require("./Fieldset");
|
|
9
8
|
const local_state_1 = require("./local-state");
|
|
9
|
+
const SchemaLabel_1 = require("./SchemaLabel");
|
|
10
10
|
const fullWidth = {
|
|
11
11
|
width: '100%',
|
|
12
12
|
};
|
|
@@ -9,9 +9,9 @@ const layout_1 = require("../../layout");
|
|
|
9
9
|
const InputDragger_1 = require("../../NewComposition/InputDragger");
|
|
10
10
|
const RemInput_1 = require("../../NewComposition/RemInput");
|
|
11
11
|
const RemInputTypeColor_1 = require("../../NewComposition/RemInputTypeColor");
|
|
12
|
+
const Fieldset_1 = require("./Fieldset");
|
|
12
13
|
const local_state_1 = require("./local-state");
|
|
13
14
|
const SchemaLabel_1 = require("./SchemaLabel");
|
|
14
|
-
const Fieldset_1 = require("./Fieldset");
|
|
15
15
|
const ZodFieldValidation_1 = require("./ZodFieldValidation");
|
|
16
16
|
const fullWidth = {
|
|
17
17
|
width: '100%',
|
|
@@ -6,9 +6,9 @@ const react_1 = require("react");
|
|
|
6
6
|
const colors_1 = require("../../../helpers/colors");
|
|
7
7
|
const layout_1 = require("../../layout");
|
|
8
8
|
const RemInput_1 = require("../../NewComposition/RemInput");
|
|
9
|
+
const Fieldset_1 = require("./Fieldset");
|
|
9
10
|
const local_state_1 = require("./local-state");
|
|
10
11
|
const SchemaLabel_1 = require("./SchemaLabel");
|
|
11
|
-
const Fieldset_1 = require("./Fieldset");
|
|
12
12
|
const ZodFieldValidation_1 = require("./ZodFieldValidation");
|
|
13
13
|
const fullWidth = {
|
|
14
14
|
width: '100%',
|
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ZodEffectEditor = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const get_zod_if_possible_1 = require("../../get-zod-if-possible");
|
|
6
|
-
const local_state_1 = require("./local-state");
|
|
7
|
-
const ZodSwitch_1 = require("./ZodSwitch");
|
|
8
6
|
const Fieldset_1 = require("./Fieldset");
|
|
7
|
+
const local_state_1 = require("./local-state");
|
|
9
8
|
const ZodFieldValidation_1 = require("./ZodFieldValidation");
|
|
9
|
+
const ZodSwitch_1 = require("./ZodSwitch");
|
|
10
10
|
const fullWidth = {
|
|
11
11
|
width: '100%',
|
|
12
12
|
};
|
|
@@ -6,9 +6,9 @@ const react_1 = require("react");
|
|
|
6
6
|
const Checkmark_1 = require("../../../icons/Checkmark");
|
|
7
7
|
const get_zod_if_possible_1 = require("../../get-zod-if-possible");
|
|
8
8
|
const ComboBox_1 = require("../../NewComposition/ComboBox");
|
|
9
|
+
const Fieldset_1 = require("./Fieldset");
|
|
9
10
|
const local_state_1 = require("./local-state");
|
|
10
11
|
const SchemaLabel_1 = require("./SchemaLabel");
|
|
11
|
-
const Fieldset_1 = require("./Fieldset");
|
|
12
12
|
const ZodFieldValidation_1 = require("./ZodFieldValidation");
|
|
13
13
|
const container = {
|
|
14
14
|
width: '100%',
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ZodFieldValidation = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const ValidationMessage_1 = require("../../NewComposition/ValidationMessage");
|
|
6
5
|
const layout_1 = require("../../layout");
|
|
6
|
+
const ValidationMessage_1 = require("../../NewComposition/ValidationMessage");
|
|
7
7
|
const InfoBubble_1 = require("../InfoBubble");
|
|
8
8
|
const legend = {
|
|
9
9
|
display: 'flex',
|
|
@@ -4,8 +4,8 @@ exports.ZonNonEditableValue = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const colors_1 = require("../../../helpers/colors");
|
|
7
|
-
const SchemaLabel_1 = require("./SchemaLabel");
|
|
8
7
|
const Fieldset_1 = require("./Fieldset");
|
|
8
|
+
const SchemaLabel_1 = require("./SchemaLabel");
|
|
9
9
|
const fullWidth = {
|
|
10
10
|
width: '100%',
|
|
11
11
|
};
|
|
@@ -4,9 +4,9 @@ exports.ZodNumberEditor = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const InputDragger_1 = require("../../NewComposition/InputDragger");
|
|
7
|
+
const Fieldset_1 = require("./Fieldset");
|
|
7
8
|
const local_state_1 = require("./local-state");
|
|
8
9
|
const SchemaLabel_1 = require("./SchemaLabel");
|
|
9
|
-
const Fieldset_1 = require("./Fieldset");
|
|
10
10
|
const ZodFieldValidation_1 = require("./ZodFieldValidation");
|
|
11
11
|
const fullWidth = {
|
|
12
12
|
width: '100%',
|
|
@@ -1,21 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
4
24
|
};
|
|
5
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
26
|
exports.ZodObjectEditor = void 0;
|
|
7
27
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const react_1 = require("react");
|
|
9
|
-
const react_2 = __importDefault(require("react"));
|
|
28
|
+
const react_1 = __importStar(require("react"));
|
|
10
29
|
const get_zod_if_possible_1 = require("../../get-zod-if-possible");
|
|
11
|
-
const
|
|
12
|
-
const
|
|
30
|
+
const layout_1 = require("../layout");
|
|
31
|
+
const deep_equal_1 = require("./deep-equal");
|
|
13
32
|
const Fieldset_1 = require("./Fieldset");
|
|
33
|
+
const local_state_1 = require("./local-state");
|
|
34
|
+
const SchemaLabel_1 = require("./SchemaLabel");
|
|
14
35
|
const SchemaSeparationLine_1 = require("./SchemaSeparationLine");
|
|
15
|
-
const layout_1 = require("../layout");
|
|
16
36
|
const SchemaVerticalGuide_1 = require("./SchemaVerticalGuide");
|
|
17
|
-
const
|
|
18
|
-
const deep_equal_1 = require("./deep-equal");
|
|
37
|
+
const ZodSwitch_1 = require("./ZodSwitch");
|
|
19
38
|
const ZodObjectEditor = ({ schema, jsonPath, setValue, value, defaultValue, onSave, showSaveButton, onRemove, saving, saveDisabledByParent, mayPad, }) => {
|
|
20
39
|
const z = (0, get_zod_if_possible_1.useZodIfPossible)();
|
|
21
40
|
if (!z) {
|
|
@@ -43,7 +62,7 @@ const ZodObjectEditor = ({ schema, jsonPath, setValue, value, defaultValue, onSa
|
|
|
43
62
|
return localValue.value;
|
|
44
63
|
}, false, false);
|
|
45
64
|
}, saveDisabledByParent: saveDisabledByParent, saving: saving, showSaveButton: showSaveButton, valid: localValue.zodValidation.success })), (0, jsx_runtime_1.jsx)(RevisionContextProvider, { children: (0, jsx_runtime_1.jsx)(SchemaVerticalGuide_1.SchemaVerticalGuide, { isRoot: isRoot, children: keys.map((key, i) => {
|
|
46
|
-
return ((0, jsx_runtime_1.jsxs)(
|
|
65
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(ZodSwitch_1.ZodSwitch, { mayPad: true, jsonPath: [...jsonPath, key], schema: shape[key], value: localValue.value[key],
|
|
47
66
|
// In case of null | {a: string, b: string} type, we need to fallback to the default value
|
|
48
67
|
defaultValue: (defaultValue !== null && defaultValue !== void 0 ? defaultValue : value)[key], setValue: (val, forceApply) => {
|
|
49
68
|
onChange((oldVal) => {
|
|
@@ -8,10 +8,10 @@ const Checkbox_1 = require("../../Checkbox");
|
|
|
8
8
|
const get_zod_if_possible_1 = require("../../get-zod-if-possible");
|
|
9
9
|
const layout_1 = require("../../layout");
|
|
10
10
|
const create_zod_values_1 = require("./create-zod-values");
|
|
11
|
-
const SchemaLabel_1 = require("./SchemaLabel");
|
|
12
|
-
const ZodSwitch_1 = require("./ZodSwitch");
|
|
13
11
|
const Fieldset_1 = require("./Fieldset");
|
|
14
12
|
const local_state_1 = require("./local-state");
|
|
13
|
+
const SchemaLabel_1 = require("./SchemaLabel");
|
|
14
|
+
const ZodSwitch_1 = require("./ZodSwitch");
|
|
15
15
|
const labelStyle = {
|
|
16
16
|
fontFamily: 'sans-serif',
|
|
17
17
|
fontSize: 14,
|
|
@@ -7,9 +7,9 @@ const remotion_1 = require("remotion");
|
|
|
7
7
|
const Checkmark_1 = require("../../../icons/Checkmark");
|
|
8
8
|
const get_zod_if_possible_1 = require("../../get-zod-if-possible");
|
|
9
9
|
const ComboBox_1 = require("../../NewComposition/ComboBox");
|
|
10
|
+
const Fieldset_1 = require("./Fieldset");
|
|
10
11
|
const local_state_1 = require("./local-state");
|
|
11
12
|
const SchemaLabel_1 = require("./SchemaLabel");
|
|
12
|
-
const Fieldset_1 = require("./Fieldset");
|
|
13
13
|
const ZodFieldValidation_1 = require("./ZodFieldValidation");
|
|
14
14
|
const container = {
|
|
15
15
|
width: '100%',
|
|
@@ -5,9 +5,9 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const get_zod_if_possible_1 = require("../../get-zod-if-possible");
|
|
7
7
|
const RemInput_1 = require("../../NewComposition/RemInput");
|
|
8
|
+
const Fieldset_1 = require("./Fieldset");
|
|
8
9
|
const local_state_1 = require("./local-state");
|
|
9
10
|
const SchemaLabel_1 = require("./SchemaLabel");
|
|
10
|
-
const Fieldset_1 = require("./Fieldset");
|
|
11
11
|
const ZodFieldValidation_1 = require("./ZodFieldValidation");
|
|
12
12
|
const fullWidth = {
|
|
13
13
|
width: '100%',
|
|
@@ -27,7 +27,6 @@ const ZodSwitch = ({ schema, jsonPath, value, setValue, defaultValue, onSave, sh
|
|
|
27
27
|
throw new Error('expected zod');
|
|
28
28
|
}
|
|
29
29
|
const zodTypes = (0, get_zod_if_possible_1.useZodTypesIfPossible)();
|
|
30
|
-
// TODO: (Maybe?) enable saving of inserted input props by cmd+s /ctrl + s (also for JSON view)
|
|
31
30
|
if (typeName === z.ZodFirstPartyTypeKind.ZodObject) {
|
|
32
31
|
return ((0, jsx_runtime_1.jsx)(ZodObjectEditor_1.ZodObjectEditor, { setValue: setValue, value: value, defaultValue: defaultValue, jsonPath: jsonPath, schema: schema, onSave: onSave, showSaveButton: showSaveButton, onRemove: onRemove, saving: saving, saveDisabledByParent: saveDisabledByParent, mayPad: mayPad }));
|
|
33
32
|
}
|
|
@@ -11,16 +11,22 @@ const useLocalState = ({ value, schema, setValue, defaultValue, }) => {
|
|
|
11
11
|
const parentRevision = (0, react_1.useContext)(RevisionContext).childResetRevision;
|
|
12
12
|
const [resetRevision, setResetRevision] = (0, react_1.useState)(0);
|
|
13
13
|
const [localValue, setLocalValue] = (0, react_1.useState)(() => {
|
|
14
|
-
return {
|
|
14
|
+
return {
|
|
15
|
+
[parentRevision]: {
|
|
16
|
+
value,
|
|
17
|
+
keyStabilityRevision: 0,
|
|
18
|
+
zodValidation: schema.safeParse(value),
|
|
19
|
+
},
|
|
20
|
+
};
|
|
15
21
|
});
|
|
16
22
|
const currentLocalValue = (0, react_1.useMemo)(() => {
|
|
17
23
|
var _a;
|
|
18
24
|
return ((_a = localValue[parentRevision]) !== null && _a !== void 0 ? _a : {
|
|
19
25
|
value: defaultValue,
|
|
20
26
|
keyStabilityRevision: 0,
|
|
21
|
-
zodValidation: schema.safeParse(
|
|
27
|
+
zodValidation: schema.safeParse(defaultValue),
|
|
22
28
|
});
|
|
23
|
-
}, [defaultValue, localValue, parentRevision, schema
|
|
29
|
+
}, [defaultValue, localValue, parentRevision, schema]);
|
|
24
30
|
const stateRef = (0, react_1.useRef)(currentLocalValue);
|
|
25
31
|
stateRef.current = currentLocalValue;
|
|
26
32
|
const onChange = (0, react_1.useCallback)(
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Codec } from '@remotion/renderer';
|
|
2
|
-
export declare const humanReadableCodec: (codec: Codec) => "
|
|
2
|
+
export declare const humanReadableCodec: (codec: Codec) => "AAC" | "MP3" | "GIF" | "H.264" | "H.264 Matroska" | "H.265" | "ProRes" | "WebM VP8" | "WebM VP9" | "Waveform" | undefined;
|
|
@@ -56,5 +56,5 @@ export declare const openInFileExplorer: ({ directory }: {
|
|
|
56
56
|
export declare const removeRenderJob: (job: RenderJob) => Promise<undefined>;
|
|
57
57
|
export declare const cancelRenderJob: (job: RenderJob) => Promise<import("../../../preview-server/render-queue/job").CancelRenderResponse>;
|
|
58
58
|
export declare const updateAvailable: (signal: AbortSignal) => Promise<import("../../../preview-server/render-queue/job").UpdateAvailableResponse>;
|
|
59
|
-
export declare const updateDefaultProps: (compositionId: string, defaultProps:
|
|
59
|
+
export declare const updateDefaultProps: (compositionId: string, defaultProps: Record<string, unknown>, enumPaths: EnumPath[]) => Promise<import("../../../preview-server/render-queue/job").UpdateDefaultPropsResponse>;
|
|
60
60
|
export declare const canUpdateDefaultProps: (compositionId: string) => Promise<import("../../../preview-server/render-queue/job").CanUpdateDefaultPropsResponse>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.canUpdateDefaultProps = exports.updateDefaultProps = exports.updateAvailable = exports.cancelRenderJob = exports.removeRenderJob = exports.openInFileExplorer = exports.subscribeToFileExistenceWatcher = exports.unsubscribeFromFileExistenceWatcher = exports.addVideoRenderJob = exports.addStillRenderJob = void 0;
|
|
4
|
-
const
|
|
4
|
+
const remotion_1 = require("remotion");
|
|
5
5
|
const callApi = (endpoint, body, signal) => {
|
|
6
6
|
return new Promise((resolve, reject) => {
|
|
7
7
|
fetch(endpoint, {
|
|
@@ -39,7 +39,11 @@ const addStillRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, f
|
|
|
39
39
|
chromiumOptions,
|
|
40
40
|
delayRenderTimeout,
|
|
41
41
|
envVariables,
|
|
42
|
-
|
|
42
|
+
serializedInputPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
|
|
43
|
+
data: inputProps,
|
|
44
|
+
staticBase: window.remotion_staticBase,
|
|
45
|
+
indent: undefined,
|
|
46
|
+
}).serializedString,
|
|
43
47
|
});
|
|
44
48
|
};
|
|
45
49
|
exports.addStillRenderJob = addStillRenderJob;
|
|
@@ -70,7 +74,11 @@ const addVideoRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, s
|
|
|
70
74
|
disallowParallelEncoding,
|
|
71
75
|
chromiumOptions,
|
|
72
76
|
envVariables,
|
|
73
|
-
|
|
77
|
+
serializedInputPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
|
|
78
|
+
data: inputProps,
|
|
79
|
+
staticBase: window.remotion_staticBase,
|
|
80
|
+
indent: undefined,
|
|
81
|
+
}).serializedString,
|
|
74
82
|
});
|
|
75
83
|
};
|
|
76
84
|
exports.addVideoRenderJob = addVideoRenderJob;
|
|
@@ -112,7 +120,7 @@ exports.updateAvailable = updateAvailable;
|
|
|
112
120
|
const updateDefaultProps = (compositionId, defaultProps, enumPaths) => {
|
|
113
121
|
return callApi('/api/update-default-props', {
|
|
114
122
|
compositionId,
|
|
115
|
-
defaultProps:
|
|
123
|
+
defaultProps: remotion_1.Internals.serializeJSONWithDate({
|
|
116
124
|
data: defaultProps,
|
|
117
125
|
indent: undefined,
|
|
118
126
|
staticBase: window.remotion_staticBase,
|
|
@@ -4,8 +4,10 @@ exports.RightPanel = exports.rightSidebarTabs = exports.persistSelectedPanel = v
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
7
|
+
const ShortcutHint_1 = require("../../preview-server/error-overlay/remotion-overlay/ShortcutHint");
|
|
7
8
|
const colors_1 = require("../helpers/colors");
|
|
8
9
|
const DataEditor_1 = require("./RenderModal/DataEditor");
|
|
10
|
+
const deep_equal_1 = require("./RenderModal/SchemaEditor/deep-equal");
|
|
9
11
|
const RenderQueue_1 = require("./RenderQueue");
|
|
10
12
|
const RendersTab_1 = require("./RendersTab");
|
|
11
13
|
const Tabs_1 = require("./Tabs");
|
|
@@ -16,17 +18,10 @@ const container = {
|
|
|
16
18
|
display: 'flex',
|
|
17
19
|
flexDirection: 'column',
|
|
18
20
|
};
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
id: composition.id,
|
|
24
|
-
defaultProps: composition.defaultProps,
|
|
25
|
-
newProps,
|
|
26
|
-
});
|
|
27
|
-
}, [composition.defaultProps, composition.id, updateProps]);
|
|
28
|
-
const actualProps = (0, react_1.useMemo)(() => { var _a, _b; return (_b = (_a = props[composition.id]) !== null && _a !== void 0 ? _a : composition.defaultProps) !== null && _b !== void 0 ? _b : {}; }, [composition.defaultProps, composition.id, props]);
|
|
29
|
-
return ((0, jsx_runtime_1.jsx)(DataEditor_1.DataEditor, { unresolvedComposition: composition, inputProps: actualProps, setInputProps: setInputProps, mayShowSaveButton: true, propsEditType: "default-props" }, composition.id));
|
|
21
|
+
const circle = {
|
|
22
|
+
width: 8,
|
|
23
|
+
height: 8,
|
|
24
|
+
borderRadius: 4,
|
|
30
25
|
};
|
|
31
26
|
const localStorageKey = 'remotion.sidebarPanel';
|
|
32
27
|
const getSelectedPanel = () => {
|
|
@@ -45,6 +40,8 @@ const persistSelectedPanel = (panel) => {
|
|
|
45
40
|
exports.persistSelectedPanel = persistSelectedPanel;
|
|
46
41
|
exports.rightSidebarTabs = (0, react_1.createRef)();
|
|
47
42
|
const RightPanel = () => {
|
|
43
|
+
const { props, updateProps } = (0, react_1.useContext)(remotion_1.Internals.EditorPropsContext);
|
|
44
|
+
const [saving, setSaving] = (0, react_1.useState)(false);
|
|
48
45
|
const [panel, setPanel] = (0, react_1.useState)(() => getSelectedPanel());
|
|
49
46
|
const onCompositionsSelected = (0, react_1.useCallback)(() => {
|
|
50
47
|
setPanel('input-props');
|
|
@@ -63,6 +60,14 @@ const RightPanel = () => {
|
|
|
63
60
|
};
|
|
64
61
|
}, []);
|
|
65
62
|
const { compositions, currentComposition } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
63
|
+
const circleStyle = (0, react_1.useMemo)(() => {
|
|
64
|
+
const onTabColor = saving ? colors_1.LIGHT_TEXT : 'white';
|
|
65
|
+
return {
|
|
66
|
+
...circle,
|
|
67
|
+
backgroundColor: panel === 'input-props' ? onTabColor : colors_1.LIGHT_TEXT,
|
|
68
|
+
cursor: 'help',
|
|
69
|
+
};
|
|
70
|
+
}, [panel, saving]);
|
|
66
71
|
const composition = (0, react_1.useMemo)(() => {
|
|
67
72
|
for (const comp of compositions) {
|
|
68
73
|
if (comp.id === currentComposition) {
|
|
@@ -71,9 +76,37 @@ const RightPanel = () => {
|
|
|
71
76
|
}
|
|
72
77
|
return null;
|
|
73
78
|
}, [compositions, currentComposition]);
|
|
79
|
+
const saveToolTip = (0, react_1.useMemo)(() => {
|
|
80
|
+
return process.env.KEYBOARD_SHORTCUTS_ENABLED
|
|
81
|
+
? `Save using ${ShortcutHint_1.cmdOrCtrlCharacter}+S`
|
|
82
|
+
: 'There are unsaved changes';
|
|
83
|
+
}, []);
|
|
84
|
+
const setInputProps = (0, react_1.useCallback)((newProps) => {
|
|
85
|
+
if (composition === null) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
updateProps({
|
|
89
|
+
id: composition.id,
|
|
90
|
+
defaultProps: composition.defaultProps,
|
|
91
|
+
newProps,
|
|
92
|
+
});
|
|
93
|
+
}, [composition, updateProps]);
|
|
94
|
+
const actualProps = (0, react_1.useMemo)(() => {
|
|
95
|
+
var _a, _b;
|
|
96
|
+
if (composition === null) {
|
|
97
|
+
return {};
|
|
98
|
+
}
|
|
99
|
+
return (_b = (_a = props[composition.id]) !== null && _a !== void 0 ? _a : composition.defaultProps) !== null && _b !== void 0 ? _b : {};
|
|
100
|
+
}, [composition, props]);
|
|
101
|
+
const unsavedChangesExist = (0, react_1.useMemo)(() => {
|
|
102
|
+
if (composition === null || composition.defaultProps === undefined) {
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
return !(0, deep_equal_1.deepEqual)(composition.defaultProps, actualProps);
|
|
106
|
+
}, [actualProps, composition]);
|
|
74
107
|
if (composition === null) {
|
|
75
108
|
return null;
|
|
76
109
|
}
|
|
77
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: container, className: "css-reset", children: [(0, jsx_runtime_1.jsx)("div", { style: tabsContainer, children: (0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { children: [(0, jsx_runtime_1.
|
|
110
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: container, className: "css-reset", children: [(0, jsx_runtime_1.jsx)("div", { style: tabsContainer, children: (0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { children: [(0, jsx_runtime_1.jsxs)(Tabs_1.Tab, { selected: panel === 'input-props', onClick: onCompositionsSelected, style: { justifyContent: 'space-between' }, children: ["Props", unsavedChangesExist ? ((0, jsx_runtime_1.jsx)("div", { title: saveToolTip, style: circleStyle })) : null] }), (0, jsx_runtime_1.jsx)(RendersTab_1.RendersTab, { onClick: onRendersSelected, selected: panel === 'renders' })] }) }), panel === 'renders' ? ((0, jsx_runtime_1.jsx)(RenderQueue_1.RenderQueue, {})) : ((0, jsx_runtime_1.jsx)(DataEditor_1.DataEditor, { unresolvedComposition: composition, inputProps: actualProps, setInputProps: setInputProps, mayShowSaveButton: true, propsEditType: "default-props", saving: saving, setSaving: setSaving }, composition.id))] }));
|
|
78
111
|
};
|
|
79
112
|
exports.RightPanel = RightPanel;
|
|
@@ -4,16 +4,17 @@ exports.SetTimelineInOutProvider = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const in_out_1 = require("../state/in-out");
|
|
7
|
+
const marks_1 = require("../state/marks");
|
|
7
8
|
const SetTimelineInOutProvider = ({ children }) => {
|
|
8
|
-
const [inAndOutFrames, setInAndOutFrames] = (0, react_1.useState)(
|
|
9
|
-
inFrame: null,
|
|
10
|
-
outFrame: null,
|
|
11
|
-
});
|
|
9
|
+
const [inAndOutFrames, setInAndOutFrames] = (0, react_1.useState)(() => (0, marks_1.loadMarks)());
|
|
12
10
|
const setTimelineInOutContextValue = (0, react_1.useMemo)(() => {
|
|
13
11
|
return {
|
|
14
12
|
setInAndOutFrames,
|
|
15
13
|
};
|
|
16
14
|
}, []);
|
|
15
|
+
(0, react_1.useEffect)(() => {
|
|
16
|
+
(0, marks_1.persistMarks)(inAndOutFrames);
|
|
17
|
+
}, [inAndOutFrames]);
|
|
17
18
|
return ((0, jsx_runtime_1.jsx)(in_out_1.TimelineInOutContext.Provider, { value: inAndOutFrames, children: (0, jsx_runtime_1.jsx)(in_out_1.SetTimelineInOutContext.Provider, { value: setTimelineInOutContextValue, children: children }) }));
|
|
18
19
|
};
|
|
19
20
|
exports.SetTimelineInOutProvider = SetTimelineInOutProvider;
|
|
@@ -22,7 +22,9 @@ const SidebarRenderButton = ({ composition, visible }) => {
|
|
|
22
22
|
}, []);
|
|
23
23
|
const connectionStatus = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx).type;
|
|
24
24
|
const { props } = (0, react_1.useContext)(remotion_1.Internals.EditorPropsContext);
|
|
25
|
-
const isVideo = composition.durationInFrames
|
|
25
|
+
const isVideo = typeof composition.durationInFrames === 'undefined'
|
|
26
|
+
? true
|
|
27
|
+
: composition.durationInFrames > 1;
|
|
26
28
|
const onClick = (0, react_1.useCallback)((e) => {
|
|
27
29
|
var _a;
|
|
28
30
|
const defaults = window.remotion_renderDefaults;
|
|
@@ -9,8 +9,8 @@ const get_left_of_timeline_slider_1 = require("../../helpers/get-left-of-timelin
|
|
|
9
9
|
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
|
-
const FramePersistor_1 = require("../FramePersistor");
|
|
13
12
|
const is_menu_item_1 = require("../Menu/is-menu-item");
|
|
13
|
+
const TimelineInOutToggle_1 = require("../TimelineInOutToggle");
|
|
14
14
|
const timeline_refs_1 = require("./timeline-refs");
|
|
15
15
|
const timeline_scroll_logic_1 = require("./timeline-scroll-logic");
|
|
16
16
|
const TimelineInOutPointer_1 = require("./TimelineInOutPointer");
|
|
@@ -50,6 +50,7 @@ const Inner = () => {
|
|
|
50
50
|
triggerOnWindowResize: true,
|
|
51
51
|
shouldApplyCssTransforms: true,
|
|
52
52
|
});
|
|
53
|
+
const setFrame = remotion_1.Internals.useTimelineSetFrame();
|
|
53
54
|
const [inOutDragging, setInOutDragging] = (0, react_1.useState)({
|
|
54
55
|
dragging: false,
|
|
55
56
|
});
|
|
@@ -254,11 +255,12 @@ const Inner = () => {
|
|
|
254
255
|
width,
|
|
255
256
|
extrapolate: 'clamp',
|
|
256
257
|
});
|
|
257
|
-
(
|
|
258
|
+
remotion_1.Internals.persistCurrentFrame(frame, videoConfig.id);
|
|
259
|
+
setFrame((c) => ({ ...c, [videoConfig.id]: frame }));
|
|
258
260
|
if (dragging.wasPlaying) {
|
|
259
261
|
play();
|
|
260
262
|
}
|
|
261
|
-
}, [dragging, left, play, videoConfig, width]);
|
|
263
|
+
}, [dragging, left, play, videoConfig, setFrame, width]);
|
|
262
264
|
const onPointerUpInOut = (0, react_1.useCallback)((e) => {
|
|
263
265
|
if (!videoConfig) {
|
|
264
266
|
return;
|
|
@@ -277,29 +279,53 @@ const Inner = () => {
|
|
|
277
279
|
});
|
|
278
280
|
if (inOutDragging.dragging === 'in') {
|
|
279
281
|
if (frame < 1) {
|
|
280
|
-
return setInAndOutFrames((prev) =>
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
282
|
+
return setInAndOutFrames((prev) => {
|
|
283
|
+
var _a;
|
|
284
|
+
return ({
|
|
285
|
+
...prev,
|
|
286
|
+
[videoConfig.id]: {
|
|
287
|
+
...((_a = prev[videoConfig.id]) !== null && _a !== void 0 ? _a : TimelineInOutToggle_1.defaultInOutValue),
|
|
288
|
+
inFrame: null,
|
|
289
|
+
},
|
|
290
|
+
});
|
|
291
|
+
});
|
|
284
292
|
}
|
|
285
293
|
const maxFrame = outFrame === null ? Infinity : outFrame - 1;
|
|
286
|
-
setInAndOutFrames((prev) =>
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
294
|
+
setInAndOutFrames((prev) => {
|
|
295
|
+
var _a;
|
|
296
|
+
return ({
|
|
297
|
+
...prev,
|
|
298
|
+
[videoConfig.id]: {
|
|
299
|
+
...((_a = prev[videoConfig.id]) !== null && _a !== void 0 ? _a : TimelineInOutToggle_1.defaultInOutValue),
|
|
300
|
+
inFrame: Math.min(maxFrame, frame),
|
|
301
|
+
},
|
|
302
|
+
});
|
|
303
|
+
});
|
|
290
304
|
}
|
|
291
305
|
else {
|
|
292
306
|
if (frame > videoConfig.durationInFrames - 2) {
|
|
293
|
-
return setInAndOutFrames((prev) =>
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
307
|
+
return setInAndOutFrames((prev) => {
|
|
308
|
+
var _a;
|
|
309
|
+
return ({
|
|
310
|
+
...prev,
|
|
311
|
+
[videoConfig.id]: {
|
|
312
|
+
...((_a = prev[videoConfig.id]) !== null && _a !== void 0 ? _a : TimelineInOutToggle_1.defaultInOutValue),
|
|
313
|
+
outFrame: null,
|
|
314
|
+
},
|
|
315
|
+
});
|
|
316
|
+
});
|
|
297
317
|
}
|
|
298
318
|
const minFrame = inFrame === null ? -Infinity : inFrame + 1;
|
|
299
|
-
setInAndOutFrames((prev) =>
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
319
|
+
setInAndOutFrames((prev) => {
|
|
320
|
+
var _a;
|
|
321
|
+
return ({
|
|
322
|
+
...prev,
|
|
323
|
+
[videoConfig.id]: {
|
|
324
|
+
...((_a = prev[videoConfig.id]) !== null && _a !== void 0 ? _a : TimelineInOutToggle_1.defaultInOutValue),
|
|
325
|
+
outFrame: Math.max(minFrame, frame),
|
|
326
|
+
},
|
|
327
|
+
});
|
|
328
|
+
});
|
|
303
329
|
}
|
|
304
330
|
}, [
|
|
305
331
|
inFrame,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { InOutValue } from '../state/in-out';
|
|
2
3
|
export declare const inOutHandles: React.RefObject<{
|
|
3
4
|
inMarkClick: (e: KeyboardEvent | null) => void;
|
|
4
5
|
outMarkClick: (e: KeyboardEvent | null) => void;
|
|
5
6
|
clearMarks: () => void;
|
|
6
|
-
setMarks: (marks: [number | null, number | null]) => void;
|
|
7
7
|
}>;
|
|
8
|
+
export declare const defaultInOutValue: InOutValue;
|
|
8
9
|
export declare const TimelineInOutPointToggle: React.FC;
|