@remotion/cli 4.0.5 → 4.0.6

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.
Files changed (33) hide show
  1. package/dist/benchmark.js +1 -1
  2. package/dist/compositions.js +1 -1
  3. package/dist/editor/components/CanvasOrLoading.js +4 -4
  4. package/dist/editor/components/PlaybackRateSelector.js +1 -1
  5. package/dist/editor/components/RenderModal/DataEditor.js +1 -3
  6. package/dist/editor/components/RenderModal/RenderModalBasic.d.ts +1 -1
  7. package/dist/editor/components/RenderModal/RenderModalJSONPropsEditor.d.ts +1 -2
  8. package/dist/editor/components/RenderModal/RenderModalJSONPropsEditor.js +9 -10
  9. package/dist/editor/components/RenderModal/SchemaEditor/SchemaLabel.js +1 -2
  10. package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayEditor.js +7 -7
  11. package/dist/editor/components/RenderModal/SchemaEditor/ZodBooleanEditor.d.ts +1 -1
  12. package/dist/editor/components/RenderModal/SchemaEditor/ZodBooleanEditor.js +1 -1
  13. package/dist/editor/components/RenderModal/SchemaEditor/ZodColorEditor.js +1 -1
  14. package/dist/editor/components/RenderModal/SchemaEditor/ZodDateEditor.js +1 -1
  15. package/dist/editor/components/RenderModal/SchemaEditor/ZodEffectEditor.js +2 -2
  16. package/dist/editor/components/RenderModal/SchemaEditor/ZodEnumEditor.js +1 -1
  17. package/dist/editor/components/RenderModal/SchemaEditor/ZodFieldValidation.js +1 -1
  18. package/dist/editor/components/RenderModal/SchemaEditor/ZodNonEditableValue.js +1 -1
  19. package/dist/editor/components/RenderModal/SchemaEditor/ZodNumberEditor.js +1 -1
  20. package/dist/editor/components/RenderModal/SchemaEditor/ZodObjectEditor.js +29 -10
  21. package/dist/editor/components/RenderModal/SchemaEditor/ZodOrNullishEditor.js +2 -2
  22. package/dist/editor/components/RenderModal/SchemaEditor/ZodStaticFileEditor.js +1 -1
  23. package/dist/editor/components/RenderModal/SchemaEditor/ZodStringEditor.js +1 -1
  24. package/dist/editor/components/Timeline/TimelineDragHandler.js +1 -1
  25. package/dist/get-composition-id.js +1 -1
  26. package/dist/index.d.ts +6 -0
  27. package/dist/log.d.ts +9 -3
  28. package/dist/preview-server/render-queue/make-retry-payload.js +1 -1
  29. package/dist/preview-server/routes/update-default-props.js +1 -1
  30. package/dist/print-error.js +6 -3
  31. package/dist/render-flows/render.js +1 -1
  32. package/dist/render-flows/still.js +1 -1
  33. package/package.json +9 -9
package/dist/benchmark.js CHANGED
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.benchmarkCommand = void 0;
4
4
  const renderer_1 = require("@remotion/renderer");
5
+ const remotion_1 = require("remotion");
5
6
  const chalk_1 = require("./chalk");
6
7
  const cleanup_before_quit_1 = require("./cleanup-before-quit");
7
8
  const config_1 = require("./config");
@@ -18,7 +19,6 @@ const setup_cache_1 = require("./setup-cache");
18
19
  const should_use_non_overlaying_logger_1 = require("./should-use-non-overlaying-logger");
19
20
  const show_compositions_picker_1 = require("./show-compositions-picker");
20
21
  const truthy_1 = require("./truthy");
21
- const remotion_1 = require("remotion");
22
22
  const DEFAULT_RUNS = 3;
23
23
  const getValidConcurrency = (cliConcurrency) => {
24
24
  const { concurrencies } = parse_command_line_1.parsedCli;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.listCompositionsCommand = void 0;
4
4
  const renderer_1 = require("@remotion/renderer");
5
+ const remotion_1 = require("remotion");
5
6
  const cleanup_before_quit_1 = require("./cleanup-before-quit");
6
7
  const config_1 = require("./config");
7
8
  const entry_point_1 = require("./entry-point");
@@ -9,7 +10,6 @@ const get_cli_options_1 = require("./get-cli-options");
9
10
  const log_1 = require("./log");
10
11
  const print_compositions_1 = require("./print-compositions");
11
12
  const setup_cache_1 = require("./setup-cache");
12
- const remotion_1 = require("remotion");
13
13
  const listCompositionsCommand = async (remotionRoot, args) => {
14
14
  const { file, reason } = (0, entry_point_1.findEntryPoint)(args, remotionRoot);
15
15
  if (!file) {
@@ -6,15 +6,15 @@ const react_1 = require("react");
6
6
  const remotion_1 = require("remotion");
7
7
  const ErrorLoader_1 = require("../../preview-server/error-overlay/remotion-overlay/ErrorLoader");
8
8
  const colors_1 = require("../helpers/colors");
9
+ const timeline_zoom_1 = require("../state/timeline-zoom");
9
10
  const Canvas_1 = require("./Canvas");
11
+ const FramePersistor_1 = require("./FramePersistor");
10
12
  const layout_1 = require("./layout");
11
13
  const styles_1 = require("./Menu/styles");
12
14
  const Spinner_1 = require("./Spinner");
13
- const FramePersistor_1 = require("./FramePersistor");
14
- const ZoomPersistor_1 = require("./ZoomPersistor");
15
- const timeline_scroll_logic_1 = require("./Timeline/timeline-scroll-logic");
16
- const timeline_zoom_1 = require("../state/timeline-zoom");
17
15
  const imperative_state_1 = require("./Timeline/imperative-state");
16
+ const timeline_scroll_logic_1 = require("./Timeline/timeline-scroll-logic");
17
+ const ZoomPersistor_1 = require("./ZoomPersistor");
18
18
  const container = {
19
19
  color: 'white',
20
20
  flex: 1,
@@ -9,7 +9,7 @@ const playbackrate_1 = require("../state/playbackrate");
9
9
  const ControlButton_1 = require("./ControlButton");
10
10
  const ComboBox_1 = require("./NewComposition/ComboBox");
11
11
  const commonPlaybackRates = [
12
- -4, -2, -1, -0.5, -0.25, 0.25, 0.5, 1, 2, 4,
12
+ -4, -2, -1, -0.5, -0.25, 0.25, 0.5, 1, 1.5, 2, 4,
13
13
  ];
14
14
  const getPlaybackRateLabel = (playbackRate) => {
15
15
  return `${playbackRate}x`;
@@ -89,7 +89,6 @@ const setPersistedShowWarningState = (val) => {
89
89
  };
90
90
  const DataEditor = ({ unresolvedComposition, inputProps, setInputProps, mayShowSaveButton, propsEditType, }) => {
91
91
  const [mode, setMode] = (0, react_1.useState)('schema');
92
- const [valBeforeSafe, setValBeforeSafe] = (0, react_1.useState)(inputProps);
93
92
  const [saving, setSaving] = (0, react_1.useState)(false);
94
93
  const [showWarning, setShowWarningWithoutPersistance] = (0, react_1.useState)(() => getPersistedShowWarningState());
95
94
  const inJSONEditor = mode === 'json';
@@ -214,7 +213,6 @@ const DataEditor = ({ unresolvedComposition, inputProps, setInputProps, mayShowS
214
213
  (0, NotificationCenter_1.sendErrorNotification)('Cannot update default props: No Zod schema');
215
214
  return;
216
215
  }
217
- setValBeforeSafe(inputProps);
218
216
  (0, actions_1.updateDefaultProps)(unresolvedComposition.id, inputProps, (0, extract_enum_json_paths_1.extractEnumJsonPaths)(schema, z, [])).then((response) => {
219
217
  if (!response.success) {
220
218
  (0, NotificationCenter_1.sendErrorNotification)('Cannot update default props: ' + response.reason);
@@ -291,6 +289,6 @@ const DataEditor = ({ unresolvedComposition, inputProps, setInputProps, mayShowS
291
289
  }
292
290
  return ((0, jsx_runtime_1.jsxs)("div", { style: outer, children: [(0, jsx_runtime_1.jsxs)("div", { style: controlContainer, children: [(0, jsx_runtime_1.jsxs)("div", { style: tabWrapper, children: [(0, jsx_runtime_1.jsx)(SegmentedControl_1.SegmentedControl, { items: modeItems, needsWrapping: false }), (0, jsx_runtime_1.jsx)(layout_1.Flex, {}), warnings.length > 0 ? ((0, jsx_runtime_1.jsx)(WarningIndicatorButton_1.WarningIndicatorButton, { setShowWarning: setShowWarning, showWarning: showWarning, warningCount: warnings.length })) : null] }), showWarning && warnings.length > 0
293
291
  ? warnings.map((warning) => ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1 }), (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { message: warning, align: "flex-start", type: "warning" })] }, warning)))
294
- : null] }), mode === 'schema' ? ((0, jsx_runtime_1.jsx)(SchemaEditor_1.SchemaEditor, { value: inputProps, setValue: setInputProps, schema: schema, zodValidationResult: zodValidationResult, defaultProps: unresolvedComposition.defaultProps, onSave: onSave, showSaveButton: showSaveButton, saving: saving, saveDisabledByParent: !zodValidationResult.success })) : ((0, jsx_runtime_1.jsx)(RenderModalJSONPropsEditor_1.RenderModalJSONPropsEditor, { value: inputProps !== null && inputProps !== void 0 ? inputProps : {}, setValue: setInputProps, onSave: onUpdate, valBeforeSafe: valBeforeSafe, showSaveButton: showSaveButton, serializedJSON: serializedJSON, defaultProps: unresolvedComposition.defaultProps, schema: schema }))] }));
292
+ : null] }), mode === 'schema' ? ((0, jsx_runtime_1.jsx)(SchemaEditor_1.SchemaEditor, { value: inputProps, setValue: setInputProps, schema: schema, zodValidationResult: zodValidationResult, defaultProps: unresolvedComposition.defaultProps, onSave: onSave, showSaveButton: showSaveButton, saving: saving, saveDisabledByParent: !zodValidationResult.success })) : ((0, jsx_runtime_1.jsx)(RenderModalJSONPropsEditor_1.RenderModalJSONPropsEditor, { value: inputProps !== null && inputProps !== void 0 ? inputProps : {}, setValue: setInputProps, onSave: onUpdate, showSaveButton: showSaveButton, serializedJSON: serializedJSON, defaultProps: unresolvedComposition.defaultProps, schema: schema }))] }));
295
293
  };
296
294
  exports.DataEditor = DataEditor;
@@ -1,8 +1,8 @@
1
1
  import type { Codec, ProResProfile } from '@remotion/renderer';
2
2
  import React from 'react';
3
+ import type { VideoConfig } from 'remotion';
3
4
  import type { SegmentedControlItem } from '../SegmentedControl';
4
5
  import type { RenderType } from './RenderModalAdvanced';
5
- import type { VideoConfig } from 'remotion';
6
6
  export declare const RenderModalBasic: React.FC<{
7
7
  renderMode: RenderType;
8
8
  imageFormatOptions: SegmentedControlItem[];
@@ -1,12 +1,11 @@
1
1
  import React from 'react';
2
- import type { z } from 'zod';
3
2
  import type { SerializedJSONWithCustomFields } from 'remotion';
3
+ import type { z } from 'zod';
4
4
  export type EditType = 'inputProps' | 'defaultProps';
5
5
  export declare const RenderModalJSONPropsEditor: React.FC<{
6
6
  value: unknown;
7
7
  setValue: React.Dispatch<React.SetStateAction<Record<string, unknown>>>;
8
8
  onSave: () => void;
9
- valBeforeSafe: unknown;
10
9
  showSaveButton: boolean;
11
10
  serializedJSON: SerializedJSONWithCustomFields | null;
12
11
  defaultProps: Record<string, unknown>;
@@ -26,14 +26,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.RenderModalJSONPropsEditor = void 0;
27
27
  const jsx_runtime_1 = require("react/jsx-runtime");
28
28
  const react_1 = __importStar(require("react"));
29
+ const remotion_1 = require("remotion");
29
30
  const Button_1 = require("../../../preview-server/error-overlay/remotion-overlay/Button");
30
31
  const colors_1 = require("../../helpers/colors");
31
32
  const use_keybinding_1 = require("../../helpers/use-keybinding");
32
33
  const layout_1 = require("../layout");
33
34
  const RemTextarea_1 = require("../NewComposition/RemTextarea");
34
35
  const ValidationMessage_1 = require("../NewComposition/ValidationMessage");
36
+ const deep_equal_1 = require("./SchemaEditor/deep-equal");
35
37
  const ZodErrorMessages_1 = require("./SchemaEditor/ZodErrorMessages");
36
- const remotion_1 = require("remotion");
37
38
  const style = {
38
39
  fontFamily: 'monospace',
39
40
  flex: 1,
@@ -54,7 +55,7 @@ const parseJSON = (str, schema) => {
54
55
  return { str, validJSON: false, error: e.message };
55
56
  }
56
57
  };
57
- const RenderModalJSONPropsEditor = ({ setValue, value, defaultProps, onSave, valBeforeSafe, showSaveButton, serializedJSON, schema, }) => {
58
+ const RenderModalJSONPropsEditor = ({ setValue, value, defaultProps, onSave, showSaveButton, serializedJSON, schema, }) => {
58
59
  if (serializedJSON === null) {
59
60
  throw new Error('expecting serializedJSON to be defined');
60
61
  }
@@ -92,8 +93,8 @@ const RenderModalJSONPropsEditor = ({ setValue, value, defaultProps, onSave, val
92
93
  }
93
94
  }, [schema, setValue]);
94
95
  const hasChanged = (0, react_1.useMemo)(() => {
95
- return value && JSON.stringify(value) !== JSON.stringify(valBeforeSafe);
96
- }, [valBeforeSafe, value]);
96
+ return !(0, deep_equal_1.deepEqual)(value, defaultProps);
97
+ }, [defaultProps, value]);
97
98
  const onQuickSave = (0, react_1.useCallback)(() => {
98
99
  if (hasChanged) {
99
100
  onSave();
@@ -117,9 +118,9 @@ const RenderModalJSONPropsEditor = ({ setValue, value, defaultProps, onSave, val
117
118
  };
118
119
  }, [keybindings, onQuickSave, onSave]);
119
120
  const reset = (0, react_1.useCallback)(() => {
120
- setLocalValue(parseJSON(serializedJSON.serializedString, schema));
121
121
  setValue(defaultProps);
122
- }, [defaultProps, schema, serializedJSON.serializedString, setValue]);
122
+ setLocalValue(parseJSON(JSON.stringify(defaultProps, null, 2), schema));
123
+ }, [defaultProps, schema, setValue]);
123
124
  const textAreaStyle = (0, react_1.useMemo)(() => {
124
125
  const fail = !localValue.validJSON || !localValue.zodValidation.success;
125
126
  if (!fail) {
@@ -130,10 +131,8 @@ const RenderModalJSONPropsEditor = ({ setValue, value, defaultProps, onSave, val
130
131
  borderColor: colors_1.FAIL_COLOR,
131
132
  };
132
133
  }, [localValue]);
133
- return ((0, jsx_runtime_1.jsxs)("div", { style: scrollable, children: [(0, jsx_runtime_1.jsx)(RemTextarea_1.RemTextarea, { onChange: onChange, value: localValue.str, status: localValue.validJSON ? 'ok' : 'error', style: textAreaStyle }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1 }), localValue.validJSON === false ? ((0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: localValue.error, type: "error" })) : localValue.zodValidation.success === false ? ((0, jsx_runtime_1.jsx)(ZodErrorMessages_1.ZodErrorMessages, { zodValidationResult: localValue.zodValidation, viewTab: "json" })) : null, (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1 }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { children: [(0, jsx_runtime_1.jsx)(Button_1.Button, { disabled: !localValue.validJSON ||
134
- !(localValue.validJSON && !localValue.zodValidation.success), onClick: reset, children: "Reset" }), (0, jsx_runtime_1.jsx)(layout_1.Flex, {}), (0, jsx_runtime_1.jsx)(Button_1.Button, { disabled: !localValue.validJSON, onClick: onPretty, children: "Format" }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), (0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: onSave, disabled: !(localValue.validJSON && localValue.zodValidation.success) ||
134
+ return ((0, jsx_runtime_1.jsxs)("div", { style: scrollable, children: [(0, jsx_runtime_1.jsx)(RemTextarea_1.RemTextarea, { onChange: onChange, value: localValue.str, status: localValue.validJSON ? 'ok' : 'error', style: textAreaStyle }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1 }), localValue.validJSON === false ? ((0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: localValue.error, type: "error" })) : localValue.zodValidation.success === false ? ((0, jsx_runtime_1.jsx)(ZodErrorMessages_1.ZodErrorMessages, { zodValidationResult: localValue.zodValidation, viewTab: "json" })) : null, (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1 }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { children: [(0, jsx_runtime_1.jsx)(Button_1.Button, { disabled: !(hasChanged || !localValue.validJSON), onClick: reset, children: "Reset" }), (0, jsx_runtime_1.jsx)(layout_1.Flex, {}), (0, jsx_runtime_1.jsx)(Button_1.Button, { disabled: !localValue.validJSON, onClick: onPretty, children: "Format" }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), showSaveButton ? ((0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: onSave, disabled: !(localValue.validJSON && localValue.zodValidation.success) ||
135
135
  !localValue.validJSON ||
136
- !hasChanged ||
137
- !showSaveButton, children: "Save" })] })] }));
136
+ !hasChanged, children: "Save" })) : null] })] }));
138
137
  };
139
138
  exports.RenderModalJSONPropsEditor = RenderModalJSONPropsEditor;
@@ -9,7 +9,6 @@ const InlineRemoveButton_1 = require("../InlineRemoveButton");
9
9
  const get_schema_label_1 = require("./get-schema-label");
10
10
  const SchemaResetButton_1 = require("./SchemaResetButton");
11
11
  const SchemaSaveButton_1 = require("./SchemaSaveButton");
12
- const colors_2 = require("../../../helpers/colors");
13
12
  const compactStyles = {
14
13
  fontSize: 15,
15
14
  color: colors_1.LIGHT_TEXT,
@@ -24,7 +23,7 @@ const SchemaLabel = ({ jsonPath, isDefaultValue, onReset, onSave, showSaveButton
24
23
  return {
25
24
  fontFamily: 'monospace',
26
25
  fontSize: 14,
27
- color: valid ? colors_1.LIGHT_TEXT : colors_2.FAIL_COLOR,
26
+ color: valid ? colors_1.LIGHT_TEXT : colors_1.FAIL_COLOR,
28
27
  lineHeight: '24px',
29
28
  };
30
29
  }, [valid]);
@@ -26,19 +26,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.ZodArrayEditor = void 0;
27
27
  const jsx_runtime_1 = require("react/jsx-runtime");
28
28
  const react_1 = __importStar(require("react"));
29
+ const plus_1 = require("../../../icons/plus");
29
30
  const get_zod_if_possible_1 = require("../../get-zod-if-possible");
31
+ const InlineAction_1 = require("../../InlineAction");
32
+ const layout_1 = require("../layout");
30
33
  const create_zod_values_1 = require("./create-zod-values");
31
34
  const deep_equal_1 = require("./deep-equal");
32
- const local_state_1 = require("./local-state");
33
- const ZodArrayItemEditor_1 = require("./ZodArrayItemEditor");
34
35
  const Fieldset_1 = require("./Fieldset");
35
- const SchemaVerticalGuide_1 = require("./SchemaVerticalGuide");
36
- const layout_1 = require("../layout");
36
+ const local_state_1 = require("./local-state");
37
+ const SchemaLabel_1 = require("./SchemaLabel");
37
38
  const SchemaSeparationLine_1 = require("./SchemaSeparationLine");
38
- const InlineAction_1 = require("../../InlineAction");
39
- const plus_1 = require("../../../icons/plus");
39
+ const SchemaVerticalGuide_1 = require("./SchemaVerticalGuide");
40
+ const ZodArrayItemEditor_1 = require("./ZodArrayItemEditor");
40
41
  const ZodFieldValidation_1 = require("./ZodFieldValidation");
41
- const SchemaLabel_1 = require("./SchemaLabel");
42
42
  const ZodArrayEditor = ({ schema, jsonPath, setValue, defaultValue, value, onSave, showSaveButton, onRemove, saving, saveDisabledByParent, mayPad, }) => {
43
43
  const { localValue, onChange, RevisionContextProvider, reset } = (0, local_state_1.useLocalState)({
44
44
  value,
@@ -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 __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
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 local_state_1 = require("./local-state");
12
- const ZodSwitch_1 = require("./ZodSwitch");
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 SchemaLabel_1 = require("./SchemaLabel");
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)(react_2.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(ZodSwitch_1.ZodSwitch, { mayPad: true, jsonPath: [...jsonPath, key], schema: shape[key], value: localValue.value[key],
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%',
@@ -10,13 +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 is_menu_item_1 = require("../Menu/is-menu-item");
13
+ const TimelineInOutToggle_1 = require("../TimelineInOutToggle");
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");
18
19
  const TimelineWidthProvider_1 = require("./TimelineWidthProvider");
19
- const TimelineInOutToggle_1 = require("../TimelineInOutToggle");
20
20
  const inner = {
21
21
  overflowY: 'auto',
22
22
  overflowX: 'hidden',
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getCompositionId = void 0;
4
4
  const renderer_1 = require("@remotion/renderer");
5
+ const format_bytes_1 = require("./format-bytes");
5
6
  const log_1 = require("./log");
6
7
  const show_compositions_picker_1 = require("./show-compositions-picker");
7
- const format_bytes_1 = require("./format-bytes");
8
8
  const getCompName = ({ cliArgs, compositionIdFromUi, }) => {
9
9
  if (compositionIdFromUi) {
10
10
  return {
package/dist/index.d.ts CHANGED
@@ -78,6 +78,12 @@ export declare const CliInternals: {
78
78
  logLevel: "verbose" | "info" | "warn" | "error";
79
79
  }, message?: any, ...optionalParams: any[]) => void;
80
80
  error: (message?: any, ...optionalParams: any[]) => void;
81
+ errorAdvanced: (options: {
82
+ indent: boolean;
83
+ logLevel: "verbose" | "info" | "warn" | "error";
84
+ } & {
85
+ tag?: string | undefined;
86
+ }, message?: any, ...optionalParams: any[]) => void;
81
87
  };
82
88
  getCliOptions: (options: {
83
89
  isLambda: boolean;
package/dist/log.d.ts CHANGED
@@ -2,19 +2,25 @@ export declare const Log: {
2
2
  verbose: (message?: any, ...optionalParams: any[]) => void;
3
3
  verboseAdvanced: (options: {
4
4
  indent: boolean;
5
- logLevel: "error" | "verbose" | "info" | "warn";
5
+ logLevel: "verbose" | "info" | "warn" | "error";
6
6
  } & {
7
7
  tag?: string | undefined;
8
8
  }, message?: any, ...optionalParams: any[]) => void;
9
9
  info: (message?: any, ...optionalParams: any[]) => void;
10
10
  infoAdvanced: (options: {
11
11
  indent: boolean;
12
- logLevel: "error" | "verbose" | "info" | "warn";
12
+ logLevel: "verbose" | "info" | "warn" | "error";
13
13
  }, message?: any, ...optionalParams: any[]) => void;
14
14
  warn: (message?: any, ...optionalParams: any[]) => void;
15
15
  warnAdvanced: (options: {
16
16
  indent: boolean;
17
- logLevel: "error" | "verbose" | "info" | "warn";
17
+ logLevel: "verbose" | "info" | "warn" | "error";
18
18
  }, message?: any, ...optionalParams: any[]) => void;
19
19
  error: (message?: any, ...optionalParams: any[]) => void;
20
+ errorAdvanced: (options: {
21
+ indent: boolean;
22
+ logLevel: "verbose" | "info" | "warn" | "error";
23
+ } & {
24
+ tag?: string | undefined;
25
+ }, message?: any, ...optionalParams: any[]) => void;
20
26
  };
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.makeRetryPayload = void 0;
4
- const get_default_video_contexts_1 = require("./get-default-video-contexts");
5
4
  const remotion_1 = require("remotion");
5
+ const get_default_video_contexts_1 = require("./get-default-video-contexts");
6
6
  const makeRetryPayload = (job) => {
7
7
  var _a, _b, _c;
8
8
  const defaults = window.remotion_renderDefaults;
@@ -2,10 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.updateDefaultPropsHandler = void 0;
4
4
  const node_fs_1 = require("node:fs");
5
+ const remotion_1 = require("remotion");
5
6
  const update_default_props_1 = require("../../codemods/update-default-props");
6
7
  const project_info_1 = require("../project-info");
7
8
  const can_update_default_props_1 = require("./can-update-default-props");
8
- const remotion_1 = require("remotion");
9
9
  const updateDefaultPropsHandler = async ({ input: { compositionId, defaultProps, enumPaths }, remotionRoot }) => {
10
10
  try {
11
11
  const projectInfo = await (0, project_info_1.getProjectInfo)(remotionRoot);
@@ -9,13 +9,16 @@ const progress_bar_1 = require("./progress-bar");
9
9
  const should_use_non_overlaying_logger_1 = require("./should-use-non-overlaying-logger");
10
10
  const printError = async (err, logLevel) => {
11
11
  if (err instanceof renderer_1.RenderInternals.SymbolicateableError) {
12
+ const updatesDoOverwrite = !(0, should_use_non_overlaying_logger_1.shouldUseNonOverlayingLogger)({ logLevel });
12
13
  const output = (0, progress_bar_1.createOverwriteableCliOutput)({
13
14
  quiet: false,
14
15
  cancelSignal: null,
15
- updatesDontOverwrite: (0, should_use_non_overlaying_logger_1.shouldUseNonOverlayingLogger)({ logLevel }),
16
+ updatesDontOverwrite: !updatesDoOverwrite,
16
17
  indent: false,
17
18
  });
18
- output.update(chalk_1.chalk.red('Symbolicating minified error message...\n' + err.message), false);
19
+ if (updatesDoOverwrite) {
20
+ output.update(chalk_1.chalk.red('Symbolicating minified error message...\n' + err.message), false);
21
+ }
19
22
  try {
20
23
  const symbolicated = await renderer_1.RenderInternals.symbolicateError(err);
21
24
  if (symbolicated.frame === null) {
@@ -27,7 +30,7 @@ const printError = async (err, logLevel) => {
27
30
  (0, code_frame_1.printCodeFrameAndStack)(symbolicated);
28
31
  }
29
32
  catch (e) {
30
- output.update(chalk_1.chalk.red('(Error occurred symbolicating stack trace - printing minified stack trace)'), true);
33
+ output.update(chalk_1.chalk.red(''), true);
31
34
  log_1.Log.error();
32
35
  log_1.Log.error(err.stack || err);
33
36
  }
@@ -31,6 +31,7 @@ const renderer_1 = require("@remotion/renderer");
31
31
  const node_fs_1 = __importStar(require("node:fs"));
32
32
  const node_os_1 = __importDefault(require("node:os"));
33
33
  const node_path_1 = __importDefault(require("node:path"));
34
+ const remotion_1 = require("remotion");
34
35
  const chalk_1 = require("../chalk");
35
36
  const config_1 = require("../config");
36
37
  const get_cli_options_1 = require("../get-cli-options");
@@ -45,7 +46,6 @@ const setup_cache_1 = require("../setup-cache");
45
46
  const should_use_non_overlaying_logger_1 = require("../should-use-non-overlaying-logger");
46
47
  const truthy_1 = require("../truthy");
47
48
  const user_passed_output_location_1 = require("../user-passed-output-location");
48
- const remotion_1 = require("remotion");
49
49
  const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel, browserExecutable, browser, chromiumOptions, scale, shouldOutputImageSequence, publicDir, envVariables, puppeteerTimeout, port, height, width, remainingArgs, compositionIdFromUi, entryPointReason, overwrite, quiet, concurrency, frameRange, everyNthFrame, outputLocationFromUI, jpegQuality, onProgress, addCleanupCallback, cancelSignal, crf, uiCodec, uiImageFormat, ffmpegOverride, audioBitrate, muted, enforceAudioTrack, proResProfile, pixelFormat, videoBitrate, numberOfGifLoops, audioCodec, serializedInputPropsWithCustomSchema, disallowParallelEncoding, }) => {
50
50
  var _a;
51
51
  const downloads = [];
@@ -8,6 +8,7 @@ exports.renderStillFlow = void 0;
8
8
  const renderer_1 = require("@remotion/renderer");
9
9
  const node_fs_1 = require("node:fs");
10
10
  const node_path_1 = __importDefault(require("node:path"));
11
+ const remotion_1 = require("remotion");
11
12
  const chalk_1 = require("../chalk");
12
13
  const cleanup_before_quit_1 = require("../cleanup-before-quit");
13
14
  const config_1 = require("../config");
@@ -22,7 +23,6 @@ const setup_cache_1 = require("../setup-cache");
22
23
  const should_use_non_overlaying_logger_1 = require("../should-use-non-overlaying-logger");
23
24
  const truthy_1 = require("../truthy");
24
25
  const user_passed_output_location_1 = require("../user-passed-output-location");
25
- const remotion_1 = require("remotion");
26
26
  const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason, remainingArgs, browser, browserExecutable, chromiumOptions, envVariables, height, serializedInputPropsWithCustomSchema, overwrite, port, publicDir, puppeteerTimeout, jpegQuality, scale, stillFrame, width, compositionIdFromUi, imageFormatFromUi, logLevel, onProgress, indentOutput, addCleanupCallback, cancelSignal, outputLocationFromUi, }) => {
27
27
  var _a, _b;
28
28
  const downloads = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/cli",
3
- "version": "4.0.5",
3
+ "version": "4.0.6",
4
4
  "description": "CLI for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -35,11 +35,11 @@
35
35
  "prompts": "2.4.1",
36
36
  "semver": "7.5.3",
37
37
  "source-map": "0.6.1",
38
- "@remotion/media-utils": "4.0.5",
39
- "@remotion/player": "4.0.5",
40
- "remotion": "4.0.5",
41
- "@remotion/bundler": "4.0.5",
42
- "@remotion/renderer": "4.0.5"
38
+ "@remotion/bundler": "4.0.6",
39
+ "@remotion/renderer": "4.0.6",
40
+ "remotion": "4.0.6",
41
+ "@remotion/media-utils": "4.0.6",
42
+ "@remotion/player": "4.0.6"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "react": ">=16.8.0",
@@ -59,14 +59,14 @@
59
59
  "eslint-plugin-react": "7.32.2",
60
60
  "eslint-plugin-react-hooks": "4.4.0",
61
61
  "prettier": "^2.7.1",
62
- "prettier-plugin-organize-imports": "^2.3.4",
62
+ "prettier-plugin-organize-imports": "^3.2.2",
63
63
  "react": "^18.0.0",
64
64
  "react-dom": "^18.0.0",
65
65
  "typescript": "4.9.5",
66
66
  "vitest": "0.31.1",
67
67
  "zod": "^3.21.4",
68
- "@remotion/zod-types": "4.0.5",
69
- "@remotion/tailwind": "4.0.5"
68
+ "@remotion/zod-types": "4.0.6",
69
+ "@remotion/tailwind": "4.0.6"
70
70
  },
71
71
  "keywords": [
72
72
  "remotion",