@remotion/cli 3.3.82 → 3.3.84

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 (79) hide show
  1. package/dist/codemods/update-default-props.js +7 -8
  2. package/dist/color-math.d.ts +1 -0
  3. package/dist/color-math.js +12 -0
  4. package/dist/config/index.d.ts +1 -0
  5. package/dist/config/index.js +3 -0
  6. package/dist/config/user-agent.d.ts +4 -0
  7. package/dist/config/user-agent.js +12 -0
  8. package/dist/editor/components/Canvas.js +1 -4
  9. package/dist/editor/components/NewComposition/RemInputTypeColor.d.ts +7 -0
  10. package/dist/editor/components/NewComposition/RemInputTypeColor.js +53 -0
  11. package/dist/editor/components/RenderButton.js +4 -1
  12. package/dist/editor/components/RenderModal/CrfSetting.js +1 -1
  13. package/dist/editor/components/RenderModal/EnvInput.js +1 -1
  14. package/dist/editor/components/RenderModal/FrameRangeSetting.js +1 -1
  15. package/dist/editor/components/RenderModal/NumberOfLoopsSetting.js +1 -1
  16. package/dist/editor/components/RenderModal/NumberSetting.js +1 -1
  17. package/dist/editor/components/RenderModal/RenderModal.js +25 -15
  18. package/dist/editor/components/RenderModal/RenderModalAdvanced.js +2 -0
  19. package/dist/editor/components/RenderModal/RenderModalAudio.js +1 -1
  20. package/dist/editor/components/RenderModal/RenderModalBasic.js +1 -1
  21. package/dist/editor/components/RenderModal/RenderModalData.js +71 -12
  22. package/dist/editor/components/RenderModal/RenderModalInput.js +1 -1
  23. package/dist/editor/components/RenderModal/RenderModalJSONInputPropsEditor.d.ts +1 -0
  24. package/dist/editor/components/RenderModal/RenderModalJSONInputPropsEditor.js +22 -2
  25. package/dist/editor/components/RenderModal/RenderModalPicture.js +1 -1
  26. package/dist/editor/components/RenderModal/SchemaEditor/SchemaEditor.js +3 -40
  27. package/dist/editor/components/RenderModal/SchemaEditor/SchemaErrorMessages.d.ts +11 -0
  28. package/dist/editor/components/RenderModal/SchemaEditor/SchemaErrorMessages.js +55 -0
  29. package/dist/editor/components/RenderModal/SchemaEditor/ZodColorEditor.d.ts +14 -0
  30. package/dist/editor/components/RenderModal/SchemaEditor/ZodColorEditor.js +108 -0
  31. package/dist/editor/components/RenderModal/SchemaEditor/ZodDateEditor.js +1 -1
  32. package/dist/editor/components/RenderModal/SchemaEditor/{ZodOrNullEditor.d.ts → ZodNullableEditor.d.ts} +1 -2
  33. package/dist/editor/components/RenderModal/SchemaEditor/ZodNullableEditor.js +10 -0
  34. package/dist/editor/components/RenderModal/SchemaEditor/ZodNumberEditor.js +1 -1
  35. package/dist/editor/components/RenderModal/SchemaEditor/ZodOptionalEditor.d.ts +14 -0
  36. package/dist/editor/components/RenderModal/SchemaEditor/ZodOptionalEditor.js +10 -0
  37. package/dist/editor/components/RenderModal/SchemaEditor/ZodOrNullishEditor.js +1 -2
  38. package/dist/editor/components/RenderModal/SchemaEditor/ZodStringEditor.js +1 -1
  39. package/dist/editor/components/RenderModal/SchemaEditor/ZodSwitch.js +12 -0
  40. package/dist/editor/components/RenderModal/SchemaEditor/create-zod-values.js +3 -0
  41. package/dist/editor/components/RenderModal/layout.js +0 -1
  42. package/dist/editor/components/RenderModal/out-name-checker.d.ts +0 -1
  43. package/dist/editor/components/RenderModal/out-name-checker.js +3 -3
  44. package/dist/editor/components/RenderQueue/actions.d.ts +0 -2
  45. package/dist/editor/components/RenderQueue/actions.js +10 -11
  46. package/dist/editor/components/RenderQueue/index.js +25 -1
  47. package/dist/editor/components/RenderToolbarIcon.js +22 -7
  48. package/dist/editor/components/RendersTab.js +3 -3
  49. package/dist/editor/components/RightPanel.js +2 -7
  50. package/dist/editor/components/SegmentedControl.d.ts +0 -5
  51. package/dist/editor/components/SegmentedControl.js +2 -3
  52. package/dist/editor/components/SidebarCollapserControls.js +81 -10
  53. package/dist/editor/components/SizeSelector.js +1 -1
  54. package/dist/editor/components/Splitter/SplitterElement.js +1 -0
  55. package/dist/editor/components/Tabs/index.js +9 -2
  56. package/dist/editor/components/Tabs/vertical.d.ts +7 -0
  57. package/dist/editor/components/Tabs/vertical.js +43 -0
  58. package/dist/editor/components/TimeValue.js +3 -4
  59. package/dist/editor/components/Timeline/TimelineListItem.js +9 -1
  60. package/dist/ffmpeg.js +2 -2
  61. package/dist/get-cli-options.js +1 -0
  62. package/dist/parse-command-line.d.ts +1 -0
  63. package/dist/parse-command-line.js +3 -0
  64. package/dist/preview-server/api-types.d.ts +0 -4
  65. package/dist/preview-server/render-queue/job.d.ts +1 -1
  66. package/dist/preview-server/render-queue/queue.d.ts +1 -13
  67. package/dist/preview-server/render-queue/queue.js +6 -9
  68. package/dist/preview-server/routes/can-update-default-props.d.ts +4 -0
  69. package/dist/preview-server/routes/can-update-default-props.js +38 -0
  70. package/package.json +6 -6
  71. package/dist/editor/components/CheckerboardContext.d.ts +0 -0
  72. package/dist/editor/components/CheckerboardContext.js +0 -1
  73. package/dist/editor/components/CollapsedSidebarExpander.d.ts +0 -5
  74. package/dist/editor/components/CollapsedSidebarExpander.js +0 -40
  75. package/dist/editor/components/RenderModal/SchemaEditor/ZodOrNullEditor.js +0 -45
  76. package/dist/editor/components/RenderModal/SchemaEditor/schema-serialization.d.ts +0 -2
  77. package/dist/editor/components/RenderModal/SchemaEditor/schema-serialization.js +0 -21
  78. package/dist/editor/components/SidebarContent.d.ts +0 -5
  79. package/dist/editor/components/SidebarContent.js +0 -53
@@ -61,7 +61,7 @@ const findEndPosition = (input, currentPosition) => {
61
61
  }
62
62
  throw new Error('Could not find end of defaultProps');
63
63
  };
64
- const findEnder = (input, position, maxPosition) => {
64
+ const findEnder = (input, position, maxPosition, compositionId) => {
65
65
  let currentPosition = position;
66
66
  while (currentPosition < maxPosition) {
67
67
  const next = findEndPosition(input, currentPosition);
@@ -72,7 +72,7 @@ const findEnder = (input, position, maxPosition) => {
72
72
  }
73
73
  return [position, currentPosition + 1];
74
74
  }
75
- throw new Error('did not find string');
75
+ throw new Error(`No \`defaultProps\` prop found in the <Composition/> tag with the ID "${compositionId}".`);
76
76
  };
77
77
  const findTerminators = (input, position) => {
78
78
  const nextComposition = input.indexOf('<Composition', position);
@@ -101,23 +101,22 @@ const stringifyDefaultProps = (props) => {
101
101
  .replace(/__ADD_AS_CONST__"/g, '" as const');
102
102
  };
103
103
  // TODO: Add more sanity checks
104
- // TODO: better error messages
105
104
  const updateDefaultProps = async ({ input, compositionId, newDefaultProps, }) => {
106
105
  const starter = findStarter({ input, compositionId });
107
106
  const START_TOKEN = 'defaultProps={';
108
107
  const start = input.indexOf(START_TOKEN, starter);
109
108
  if (start === -1) {
110
- throw new Error('Could not find defaultProps in <Composition> tag');
109
+ throw new Error(`No \`defaultProps\` prop found in the <Composition/> tag with the ID "${compositionId}".`);
111
110
  }
112
111
  const maxEnd = findTerminators(input, starter);
113
- const [startPos, endPos] = findEnder(input, start + START_TOKEN.length, maxEnd);
112
+ const [startPos, endPos] = findEnder(input, start + START_TOKEN.length, maxEnd, compositionId);
114
113
  // eslint-disable-next-line @typescript-eslint/consistent-type-imports
115
114
  let prettier = null;
116
115
  try {
117
116
  prettier = await Promise.resolve().then(() => __importStar(require('prettier')));
118
117
  }
119
118
  catch (err) {
120
- throw new Error('Cannot save default props because Prettier cannot be found in the current project.');
119
+ throw new Error('Prettier cannot be found in the current project.');
121
120
  }
122
121
  const { format, resolveConfig, resolveConfigFile } = prettier;
123
122
  const newFile = input.substring(0, startPos) +
@@ -125,11 +124,11 @@ const updateDefaultProps = async ({ input, compositionId, newDefaultProps, }) =>
125
124
  input.substring(endPos);
126
125
  const configFilePath = await resolveConfigFile();
127
126
  if (!configFilePath) {
128
- throw new Error('prettier config file not found');
127
+ throw new Error('The Prettier config file was not found');
129
128
  }
130
129
  const prettierConfig = await resolveConfig(configFilePath);
131
130
  if (!prettierConfig) {
132
- throw new Error('Prettier config not found');
131
+ throw new Error(`The Prettier config at ${configFilePath} could not be read`);
133
132
  }
134
133
  const prettified = format(newFile, {
135
134
  ...prettierConfig,
@@ -0,0 +1 @@
1
+ export declare const colorWithNewOpacity: (color: string, opacity: number) => string;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.colorWithNewOpacity = void 0;
4
+ const remotion_1 = require("remotion");
5
+ const colorWithNewOpacity = (color, opacity) => {
6
+ const { r, g, b } = remotion_1.Internals.parseColor(color);
7
+ if (opacity >= 255) {
8
+ return `#${r.toString(16)}${g.toString(16)}${b.toString(16)}`;
9
+ }
10
+ return `rgba(${r}, ${g}, ${b}, ${(opacity / 255).toFixed(2)})`;
11
+ };
12
+ exports.colorWithNewOpacity = colorWithNewOpacity;
@@ -56,5 +56,6 @@ export declare const ConfigInternals: {
56
56
  getNumberOfGifLoops: () => import("./number-of-gif-loops").Loop;
57
57
  getWebpackPolling: () => number | null;
58
58
  getShouldOpenBrowser: () => boolean;
59
+ getChromiumUserAgent: () => string | null;
59
60
  };
60
61
  export declare const overrideRemotion: () => void;
@@ -82,6 +82,7 @@ const public_dir_1 = require("./public-dir");
82
82
  const quality_2 = require("./quality");
83
83
  const scale_2 = require("./scale");
84
84
  const timeout_2 = require("./timeout");
85
+ const user_agent_1 = require("./user-agent");
85
86
  const webpack_caching_2 = require("./webpack-caching");
86
87
  const webpack_poll_1 = require("./webpack-poll");
87
88
  const width_1 = require("./width");
@@ -110,6 +111,7 @@ const Puppeteer = {
110
111
  setChromiumIgnoreCertificateErrors: chromium_flags_2.setChromiumIgnoreCertificateErrors,
111
112
  setChromiumHeadlessMode: chromium_flags_2.setChromiumHeadlessMode,
112
113
  setChromiumOpenGlRenderer: chromium_flags_2.setChromiumOpenGlRenderer,
114
+ setChromiumUserAgent: user_agent_1.setChromiumUserAgent,
113
115
  };
114
116
  const Rendering = {
115
117
  setDotEnvLocation: env_file_2.setDotEnvLocation,
@@ -207,6 +209,7 @@ exports.ConfigInternals = {
207
209
  getNumberOfGifLoops: number_of_gif_loops_1.getNumberOfGifLoops,
208
210
  getWebpackPolling: webpack_poll_1.getWebpackPolling,
209
211
  getShouldOpenBrowser: open_browser_1.getShouldOpenBrowser,
212
+ getChromiumUserAgent: user_agent_1.getChromiumUserAgent,
210
213
  };
211
214
  const overrideRemotion = () => {
212
215
  Object.assign(remotion_1.Config, exports.Config);
@@ -0,0 +1,4 @@
1
+ declare type UserAgent = string | null;
2
+ export declare const setChromiumUserAgent: (newAgent: UserAgent) => void;
3
+ export declare const getChromiumUserAgent: () => UserAgent;
4
+ export {};
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getChromiumUserAgent = exports.setChromiumUserAgent = void 0;
4
+ let userAgent = null;
5
+ const setChromiumUserAgent = (newAgent) => {
6
+ userAgent = newAgent;
7
+ };
8
+ exports.setChromiumUserAgent = setChromiumUserAgent;
9
+ const getChromiumUserAgent = () => {
10
+ return userAgent;
11
+ };
12
+ exports.getChromiumUserAgent = getChromiumUserAgent;
@@ -37,10 +37,7 @@ const Canvas = () => {
37
37
  triggerOnWindowResize: false,
38
38
  shouldApplyCssTransforms: true,
39
39
  });
40
- const isFit = previewSize.size === 'auto' ||
41
- (previewSize.size === 1 &&
42
- previewSize.translation.x === 0 &&
43
- previewSize.translation.y === 0);
40
+ const isFit = previewSize.size === 'auto';
44
41
  const onWheel = (0, react_1.useCallback)((e) => {
45
42
  if (!editorZoomGestures) {
46
43
  return;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import type { RemInputStatus } from './RemInput';
3
+ declare type Props = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> & {
4
+ status: RemInputStatus;
5
+ };
6
+ export declare const RemInputTypeColor: React.ForwardRefExoticComponent<Pick<Props, "key" | "status" | keyof React.InputHTMLAttributes<HTMLInputElement>> & React.RefAttributes<HTMLInputElement>>;
7
+ export {};
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RemInputTypeColor = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const colors_1 = require("../../helpers/colors");
7
+ const z_index_1 = require("../../state/z-index");
8
+ const RemInput_1 = require("./RemInput");
9
+ const inputBaseStyle = {
10
+ padding: 0,
11
+ borderStyle: 'solid',
12
+ borderWidth: 1,
13
+ };
14
+ const RemInputTypeColorForwardRef = ({ status, ...props }, ref) => {
15
+ const [isFocused, setIsFocused] = (0, react_1.useState)(false);
16
+ const [isHovered, setIsHovered] = (0, react_1.useState)(false);
17
+ const inputRef = (0, react_1.useRef)(null);
18
+ const { tabIndex } = (0, z_index_1.useZIndex)();
19
+ const style = (0, react_1.useMemo)(() => {
20
+ var _a;
21
+ return {
22
+ backgroundColor: colors_1.INPUT_BACKGROUND,
23
+ ...inputBaseStyle,
24
+ borderColor: (0, RemInput_1.getInputBorderColor)({ isFocused, isHovered, status }),
25
+ ...((_a = props.style) !== null && _a !== void 0 ? _a : {}),
26
+ };
27
+ }, [isFocused, isHovered, props.style, status]);
28
+ (0, react_1.useImperativeHandle)(ref, () => {
29
+ return inputRef.current;
30
+ }, []);
31
+ (0, react_1.useEffect)(() => {
32
+ if (!inputRef.current) {
33
+ return;
34
+ }
35
+ const { current } = inputRef;
36
+ const onFocus = () => setIsFocused(true);
37
+ const onBlur = () => setIsFocused(false);
38
+ const onMouseEnter = () => setIsHovered(true);
39
+ const onMouseLeave = () => setIsHovered(false);
40
+ current.addEventListener('focus', onFocus);
41
+ current.addEventListener('blur', onBlur);
42
+ current.addEventListener('mouseenter', onMouseEnter);
43
+ current.addEventListener('mouseleave', onMouseLeave);
44
+ return () => {
45
+ current.removeEventListener('focus', onFocus);
46
+ current.removeEventListener('blur', onBlur);
47
+ current.removeEventListener('mouseenter', onMouseEnter);
48
+ current.removeEventListener('mouseleave', onMouseLeave);
49
+ };
50
+ }, [inputRef]);
51
+ return ((0, jsx_runtime_1.jsx)("input", { ref: inputRef, type: "color", tabIndex: tabIndex, ...props, style: style }));
52
+ };
53
+ exports.RemInputTypeColor = (0, react_1.forwardRef)(RemInputTypeColorForwardRef);
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RenderButton = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const client_1 = require("@remotion/renderer/client");
5
6
  const react_1 = require("react");
6
7
  const get_default_out_name_1 = require("../../get-default-out-name");
7
8
  const get_default_video_contexts_1 = require("../../preview-server/render-queue/get-default-video-contexts");
@@ -39,7 +40,9 @@ const RenderButton = ({ composition, visible }) => {
39
40
  initialVerbose: defaults.logLevel === 'verbose',
40
41
  initialOutName: (0, get_default_out_name_1.getDefaultOutLocation)({
41
42
  compositionName: composition.id,
42
- defaultExtension: isVideo ? 'mp4' : 'png',
43
+ defaultExtension: isVideo
44
+ ? defaults.stillImageFormat
45
+ : client_1.BrowserSafeApis.getFileExtensionFromCodec(initialVideoCodec, defaults.audioCodec),
43
46
  type: 'asset',
44
47
  }),
45
48
  initialVideoCodecForAudioTab: initialAudioCodec,
@@ -33,7 +33,7 @@ const useCrfState = (codec) => {
33
33
  setCrf,
34
34
  minCrf: range[0],
35
35
  maxCrf: range[1],
36
- shouldDisplayOption: range[0] !== range[1],
36
+ shouldDisplayOption: range[0] !== range[1] && client_1.BrowserSafeApis.codecSupportsCrf(codec),
37
37
  };
38
38
  };
39
39
  exports.useCrfState = useCrfState;
@@ -69,6 +69,6 @@ const EnvInput = ({ onEnvKeyChange, onEnvValChange, envKey, envVal, onDelete, in
69
69
  setValueWarningEligible(true);
70
70
  }, []);
71
71
  const isNodeEnvKey = envKey.trim() === 'NODE_ENV';
72
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { status: isNodeEnvKey || isDuplicate || isKeyMissing ? 'warning' : 'ok', type: "text", placeholder: "Key", style: input, value: envKey, onBlur: makeKeyWarningEligible, autoFocus: autoFocus, onChange: handleKeyChange }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), (0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { status: isValMissing ? 'warning' : 'ok', placeholder: "Value", type: showInPlainText ? 'text' : 'password', style: input, value: envVal, onBlur: makeValueWarningEligible, onChange: handleValueChange }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1.5 }), (0, jsx_runtime_1.jsx)(InlineEyeIcon_1.InlineEyeButton, { enabled: !showInPlainText, onClick: togglePlainText }), (0, jsx_runtime_1.jsx)(InlineRemoveButton_1.InlineRemoveButton, { onClick: handleDelete })] }), isNodeEnvKey ? ((0, jsx_runtime_1.jsx)("div", { style: validationStyle, children: (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-start", type: "warning", message: "NODE_ENV will be overwritten by Remotion during the render process." }) })) : null, isDuplicate ? ((0, jsx_runtime_1.jsx)("div", { style: validationStyle, children: (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-start", type: "warning", message: `${envKey.toUpperCase()} is already defined.` }) })) : null, isKeyMissing ? ((0, jsx_runtime_1.jsx)("div", { style: validationStyle, children: (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-start", type: "warning", message: "Key is missing." }) })) : null, isValMissing ? ((0, jsx_runtime_1.jsx)("div", { style: validationStyle, children: (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-start", type: "warning", message: "Value is missing." }) })) : null] }));
72
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { status: isNodeEnvKey || isDuplicate || isKeyMissing ? 'warning' : 'ok', type: "text", placeholder: "Key", style: input, value: envKey, onBlur: makeKeyWarningEligible, autoFocus: autoFocus, onChange: handleKeyChange, rightAlign: false }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), (0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { status: isValMissing ? 'warning' : 'ok', placeholder: "Value", type: showInPlainText ? 'text' : 'password', style: input, value: envVal, onBlur: makeValueWarningEligible, onChange: handleValueChange, rightAlign: false }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1.5 }), (0, jsx_runtime_1.jsx)(InlineEyeIcon_1.InlineEyeButton, { enabled: !showInPlainText, onClick: togglePlainText }), (0, jsx_runtime_1.jsx)(InlineRemoveButton_1.InlineRemoveButton, { onClick: handleDelete })] }), isNodeEnvKey ? ((0, jsx_runtime_1.jsx)("div", { style: validationStyle, children: (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-start", type: "warning", message: "NODE_ENV will be overwritten by Remotion during the render process." }) })) : null, isDuplicate ? ((0, jsx_runtime_1.jsx)("div", { style: validationStyle, children: (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-start", type: "warning", message: `${envKey.toUpperCase()} is already defined.` }) })) : null, isKeyMissing ? ((0, jsx_runtime_1.jsx)("div", { style: validationStyle, children: (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-start", type: "warning", message: "Key is missing." }) })) : null, isValMissing ? ((0, jsx_runtime_1.jsx)("div", { style: validationStyle, children: (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-start", type: "warning", message: "Value is missing." }) })) : null] }));
73
73
  };
74
74
  exports.EnvInput = EnvInput;
@@ -37,6 +37,6 @@ const FrameRangeSetting = ({ startFrame, endFrame, setEndFrame, durationInFrames
37
37
  return newEndFrameClamped;
38
38
  });
39
39
  }, [maxEndFrame, minEndFrame, setEndFrame]);
40
- return ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Frame range" }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.rightRow, children: [(0, jsx_runtime_1.jsx)(RemInput_1.RightAlignInput, { children: (0, jsx_runtime_1.jsx)(InputDragger_1.InputDragger, { value: startFrame, onTextChange: onStartFrameChanged, placeholder: `${minStartFrame}-${maxStartFrame}`, onValueChange: onStartFrameChangedDirectly, name: "startFrame", step: 1, min: minStartFrame, max: maxStartFrame, status: "ok" }) }), (0, jsx_runtime_1.jsx)(RemInput_1.RightAlignInput, { children: (0, jsx_runtime_1.jsx)(InputDragger_1.InputDragger, { value: endFrame, onTextChange: onEndFrameChanged, placeholder: `${minEndFrame}-${maxEndFrame}`, onValueChange: onEndFrameChangedDirectly, name: "endFrame", step: 1, min: minEndFrame, max: maxEndFrame, status: "ok" }) })] })] }));
40
+ return ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Frame range" }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.rightRow, children: [(0, jsx_runtime_1.jsx)(RemInput_1.RightAlignInput, { children: (0, jsx_runtime_1.jsx)(InputDragger_1.InputDragger, { value: startFrame, onTextChange: onStartFrameChanged, placeholder: `${minStartFrame}-${maxStartFrame}`, onValueChange: onStartFrameChangedDirectly, name: "startFrame", step: 1, min: minStartFrame, max: maxStartFrame, status: "ok", rightAlign: true }) }), (0, jsx_runtime_1.jsx)(RemInput_1.RightAlignInput, { children: (0, jsx_runtime_1.jsx)(InputDragger_1.InputDragger, { value: endFrame, onTextChange: onEndFrameChanged, placeholder: `${minEndFrame}-${maxEndFrame}`, onValueChange: onEndFrameChangedDirectly, name: "endFrame", step: 1, min: minEndFrame, max: maxEndFrame, status: "ok", rightAlign: true }) })] })] }));
41
41
  };
42
42
  exports.FrameRangeSetting = FrameRangeSetting;
@@ -21,6 +21,6 @@ const NumberOfLoopsSetting = ({ numberOfGifLoops, setNumberOfGifLoops }) => {
21
21
  return newConcurrencyClamped;
22
22
  });
23
23
  }, [setNumberOfGifLoops]);
24
- return ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Number of loops" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(RemInput_1.RightAlignInput, { children: (0, jsx_runtime_1.jsx)(InputDragger_1.InputDragger, { value: numberOfGifLoops, onTextChange: onNumberOfGifLoopsChanged, placeholder: `${min}-`, onValueChange: onNumberOfGifLoopsChangedDirectly, name: "number-of-gif-loops", step: 1, min: min, status: "ok" }) }) })] }));
24
+ return ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Number of loops" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(RemInput_1.RightAlignInput, { children: (0, jsx_runtime_1.jsx)(InputDragger_1.InputDragger, { value: numberOfGifLoops, onTextChange: onNumberOfGifLoopsChanged, placeholder: `${min}-`, onValueChange: onNumberOfGifLoopsChangedDirectly, name: "number-of-gif-loops", step: 1, min: min, status: "ok", rightAlign: true }) }) })] }));
25
25
  };
26
26
  exports.NumberOfLoopsSetting = NumberOfLoopsSetting;
@@ -24,6 +24,6 @@ const NumberSetting = ({ name, value, step, hint, onValueChanged, max, min, form
24
24
  }, [onValueChanged]);
25
25
  return ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsxs)("div", { style: layout_2.label, children: [name, hint ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.25 }), ' ', (0, jsx_runtime_1.jsx)(InfoBubble_1.InfoBubble, { title: "Learn more about this option", children: (0, jsx_runtime_1.jsx)(OptionExplainer_1.OptionExplainer, { option: hint }) })] })) : null] }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(RemInput_1.RightAlignInput, { children: (0, jsx_runtime_1.jsx)(InputDragger_1.InputDragger, { value: value, name: name.toLowerCase(), onTextChange: onTextChanged, onValueChange: onValueChange, step: step, placeholder: [min, max]
26
26
  .map((f) => (f !== null && f !== undefined ? f : ''))
27
- .join('-'), min: min, max: max, formatter: formatter, status: "ok" }) }) })] }));
27
+ .join('-'), min: min, max: max, formatter: formatter, status: "ok", rightAlign: true }) }) })] }));
28
28
  };
29
29
  exports.NumberSetting = NumberSetting;
@@ -24,7 +24,7 @@ const ModalHeader_1 = require("../ModalHeader");
24
24
  const actions_1 = require("../RenderQueue/actions");
25
25
  const RightPanel_1 = require("../RightPanel");
26
26
  const SegmentedControl_1 = require("../SegmentedControl");
27
- const Tabs_1 = require("../Tabs");
27
+ const vertical_1 = require("../Tabs/vertical");
28
28
  const CrfSetting_1 = require("./CrfSetting");
29
29
  const out_name_checker_1 = require("./out-name-checker");
30
30
  const RenderModalAdvanced_1 = require("./RenderModalAdvanced");
@@ -57,17 +57,17 @@ const container = {
57
57
  flexDirection: 'row',
58
58
  alignItems: 'center',
59
59
  padding: '12px 16px',
60
- width: '100%',
61
60
  borderBottom: '1px solid black',
62
61
  };
63
62
  const rightPanel = {
64
- height: 600,
65
- width: 650,
66
63
  display: 'flex',
64
+ width: '100%',
65
+ height: 600,
67
66
  };
68
67
  const horizontalLayout = {
69
68
  display: 'flex',
70
69
  flexDirection: 'row',
70
+ overflowY: 'auto',
71
71
  };
72
72
  const leftSidebar = {
73
73
  padding: 12,
@@ -103,6 +103,12 @@ const buttonStyle = {
103
103
  const flexer = {
104
104
  flex: 1,
105
105
  };
106
+ const outer = {
107
+ width: (0, ModalContainer_1.getMaxModalWidth)(1000),
108
+ height: (0, ModalContainer_1.getMaxModalHeight)(640),
109
+ overflow: 'hidden',
110
+ };
111
+ // TODO: Copy edited props from Props editor to Render modal
106
112
  const RenderModal = ({ compositionId, initialFrame, initialVideoImageFormat, initialStillImageFormat, initialJpegQuality, initialScale, initialVerbose, initialOutName, initialRenderType, initialVideoCodecForAudioTab, initialVideoCodecForVideoTab, initialConcurrency, maxConcurrency, minConcurrency, initialMuted, initialEnforceAudioTrack, initialProResProfile, initialPixelFormat, initialVideoBitrate, initialAudioBitrate, initialEveryNthFrame, initialNumberOfGifLoops, initialDelayRenderTimeout, initialAudioCodec, initialEnvVariables, initialDisableWebSecurity, initialGl, initialHeadless, initialIgnoreCertificateErrors, }) => {
107
113
  const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
108
114
  const onQuit = (0, react_1.useCallback)(() => {
@@ -135,6 +141,8 @@ const RenderModal = ({ compositionId, initialFrame, initialVideoImageFormat, ini
135
141
  disableWebSecurity,
136
142
  ignoreCertificateErrors,
137
143
  gl: openGlOption === 'default' ? null : openGlOption,
144
+ // TODO: Make this configurable at some point (not necessary for V4)
145
+ userAgent: null,
138
146
  };
139
147
  }, [headless, disableWebSecurity, ignoreCertificateErrors, openGlOption]);
140
148
  const [outName, setOutName] = (0, react_1.useState)(() => initialOutName);
@@ -284,10 +292,10 @@ const RenderModal = ({ compositionId, initialFrame, initialVideoImageFormat, ini
284
292
  setStillImageFormat(format);
285
293
  setDefaultOutName({ type: 'still', imageFormat: format });
286
294
  }, [setDefaultOutName]);
287
- const { setSidebarCollapsedStateRight } = (0, react_1.useContext)(sidebar_1.SidebarContext);
295
+ const { setSidebarCollapsedState } = (0, react_1.useContext)(sidebar_1.SidebarContext);
288
296
  const onClickStill = (0, react_1.useCallback)(() => {
289
297
  var _a;
290
- setSidebarCollapsedStateRight('expanded');
298
+ setSidebarCollapsedState({ left: null, right: 'expanded' });
291
299
  (0, RightPanel_1.persistSelectedPanel)('renders');
292
300
  (_a = RightPanel_1.rightSidebarTabs.current) === null || _a === void 0 ? void 0 : _a.selectRendersPanel();
293
301
  dispatchIfMounted({ type: 'start' });
@@ -312,7 +320,7 @@ const RenderModal = ({ compositionId, initialFrame, initialVideoImageFormat, ini
312
320
  dispatchIfMounted({ type: 'fail' });
313
321
  });
314
322
  }, [
315
- setSidebarCollapsedStateRight,
323
+ setSidebarCollapsedState,
316
324
  dispatchIfMounted,
317
325
  compositionId,
318
326
  outName,
@@ -337,7 +345,7 @@ const RenderModal = ({ compositionId, initialFrame, initialVideoImageFormat, ini
337
345
  const audioCodec = deriveFinalAudioCodec(codec, userSelectedAudioCodec);
338
346
  const onClickVideo = (0, react_1.useCallback)(() => {
339
347
  var _a;
340
- setSidebarCollapsedStateRight('expanded');
348
+ setSidebarCollapsedState({ left: null, right: 'expanded' });
341
349
  (0, RightPanel_1.persistSelectedPanel)('renders');
342
350
  (_a = RightPanel_1.rightSidebarTabs.current) === null || _a === void 0 ? void 0 : _a.selectRendersPanel();
343
351
  dispatchIfMounted({ type: 'start' });
@@ -376,7 +384,7 @@ const RenderModal = ({ compositionId, initialFrame, initialVideoImageFormat, ini
376
384
  dispatchIfMounted({ type: 'fail' });
377
385
  });
378
386
  }, [
379
- setSidebarCollapsedStateRight,
387
+ setSidebarCollapsedState,
380
388
  dispatchIfMounted,
381
389
  compositionId,
382
390
  outName,
@@ -556,11 +564,13 @@ const RenderModal = ({ compositionId, initialFrame, initialVideoImageFormat, ini
556
564
  triggerIfInputFieldFocused: false,
557
565
  });
558
566
  }, [registerKeybinding, trigger]);
559
- return ((0, jsx_runtime_1.jsxs)(ModalContainer_1.ModalContainer, { onOutsideClick: onQuit, onEscape: onQuit, children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.NewCompHeader, { title: `Render ${compositionId}` }), (0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)(SegmentedControl_1.SegmentedControl, { items: renderTabOptions, needsWrapping: false }), (0, jsx_runtime_1.jsx)("div", { style: flexer }), (0, jsx_runtime_1.jsxs)(Button_1.Button, { autoFocus: true, onClick: trigger, disabled: renderDisabled, style: {
560
- ...buttonStyle,
561
- backgroundColor: outnameValidation.valid
562
- ? 'var(--blue)'
563
- : 'var(--blue-disabled)',
564
- }, children: [state.type === 'idle' ? `Render ${renderMode}` : 'Rendering...', (0, jsx_runtime_1.jsx)(ShortcutHint_1.ShortcutHint, { keyToPress: "\u21B5", cmdOrCtrl: true })] })] }), (0, jsx_runtime_1.jsxs)("div", { style: horizontalLayout, children: [(0, jsx_runtime_1.jsxs)("div", { style: leftSidebar, children: [shownTabs.includes('general') ? ((0, jsx_runtime_1.jsxs)(Tabs_1.Tab, { style: horizontalTab, selected: tab === 'general', onClick: () => setTab('general'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(file_1.FileIcon, { style: icon }) }), "General"] })) : null, shownTabs.includes('data') ? ((0, jsx_runtime_1.jsxs)(Tabs_1.Tab, { style: horizontalTab, selected: tab === 'data', onClick: () => setTab('data'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(data_1.DataIcon, { style: icon }) }), "Input Props"] })) : null, shownTabs.includes('picture') ? ((0, jsx_runtime_1.jsxs)(Tabs_1.Tab, { style: horizontalTab, selected: tab === 'picture', onClick: () => setTab('picture'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(frame_1.PicIcon, { style: icon }) }), "Picture"] })) : null, shownTabs.includes('audio') ? ((0, jsx_runtime_1.jsxs)(Tabs_1.Tab, { style: horizontalTab, selected: tab === 'audio', onClick: () => setTab('audio'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(audio_1.AudioIcon, { style: icon }) }), "Audio"] })) : null, shownTabs.includes('gif') ? ((0, jsx_runtime_1.jsxs)(Tabs_1.Tab, { style: horizontalTab, selected: tab === 'gif', onClick: () => setTab('gif'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(gif_1.GifIcon, { style: icon }) }), "GIF"] })) : null, shownTabs.includes('advanced') ? ((0, jsx_runtime_1.jsxs)(Tabs_1.Tab, { style: horizontalTab, selected: tab === 'advanced', onClick: () => setTab('advanced'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(gear_1.GearIcon, { style: icon }) }), "Other"] })) : null] }), (0, jsx_runtime_1.jsx)("div", { style: rightPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: tab === 'general' ? ((0, jsx_runtime_1.jsx)(RenderModalBasic_1.RenderModalBasic, { codec: codec, currentComposition: currentComposition, frame: frame, imageFormatOptions: imageFormatOptions, outName: outName, proResProfile: proResProfile, renderMode: renderMode, setVideoCodec: setCodec, setFrame: setFrame, setOutName: setOutName, setProResProfile: setProResProfile, endFrame: endFrame, setEndFrame: setEndFrame, setStartFrame: setStartFrame, startFrame: startFrame, validationMessage: outnameValidation.valid ? null : outnameValidation.error.message })) : tab === 'picture' ? ((0, jsx_runtime_1.jsx)(RenderModalPicture_1.RenderModalPicture, { renderMode: renderMode, scale: scale, setScale: setScale, pixelFormat: pixelFormat, setPixelFormat: setPixelFormat, imageFormatOptions: imageFormatOptions, crf: crf, setCrf: setCrf, customTargetVideoBitrate: customTargetVideoBitrate, maxCrf: maxCrf, minCrf: minCrf, jpegQuality: jpegQuality, qualityControlType: qualityControlType, setJpegQuality: setJpegQuality, setCustomTargetVideoBitrateValue: setCustomTargetVideoBitrateValue, setQualityControl: setQualityControl, shouldDisplayCrfOption: shouldDisplayCrfOption, videoImageFormat: videoImageFormat, stillImageFormat: stillImageFormat })) : tab === 'audio' ? ((0, jsx_runtime_1.jsx)(RenderModalAudio_1.RenderModalAudio, { muted: muted, renderMode: renderMode, setMuted: setMuted, codec: codec, audioCodec: audioCodec, setAudioCodec: setAudioCodec, enforceAudioTrack: enforceAudioTrack, setEnforceAudioTrackState: setEnforceAudioTrackState, customTargetAudioBitrate: customTargetAudioBitrate, setCustomTargetAudioBitrateValue: setCustomTargetAudioBitrateValue, setShouldHaveCustomTargetAudioBitrate: setShouldHaveCustomTargetAudioBitrate, shouldHaveCustomTargetAudioBitrate: shouldHaveCustomTargetAudioBitrate })) : tab === 'gif' ? ((0, jsx_runtime_1.jsx)(RenderModalGif_1.RenderModalGif, { everyNthFrame: everyNthFrame, limitNumberOfGifLoops: limitNumberOfGifLoops, numberOfGifLoopsSetting: numberOfGifLoopsSetting, setEveryNthFrameSetting: setEveryNthFrameSetting, setLimitNumberOfGifLoops: setLimitNumberOfGifLoops, setNumberOfGifLoopsSetting: setNumberOfGifLoopsSetting })) : tab === 'data' ? ((0, jsx_runtime_1.jsx)(RenderModalData_1.RenderModalData, { inputProps: inputProps, setInputProps: setInputProps, composition: currentComposition, compact: false, mayShowSaveButton: false })) : ((0, jsx_runtime_1.jsx)(RenderModalAdvanced_1.RenderModalAdvanced, { concurrency: concurrency, maxConcurrency: maxConcurrency, minConcurrency: minConcurrency, renderMode: renderMode, setConcurrency: setConcurrency, setVerboseLogging: setVerboseLogging, verbose: verbose, delayRenderTimeout: delayRenderTimeout, setDelayRenderTimeout: setDelayRenderTimeout, disallowParallelEncoding: disallowParallelEncoding, setDisallowParallelEncoding: setDisallowParallelEncoding, setDisableWebSecurity: setDisableWebSecurity, setIgnoreCertificateErrors: setIgnoreCertificateErrors, setHeadless: setHeadless, headless: headless, ignoreCertificateErrors: ignoreCertificateErrors, disableWebSecurity: disableWebSecurity, openGlOption: openGlOption, setOpenGlOption: setOpenGlOption, setEnvVariables: setEnvVariables, envVariables: envVariables })) })] })] }));
567
+ return ((0, jsx_runtime_1.jsx)(ModalContainer_1.ModalContainer, { onOutsideClick: onQuit, onEscape: onQuit, children: (0, jsx_runtime_1.jsxs)("div", { style: outer, children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.NewCompHeader, { title: `Render ${compositionId}` }), (0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)(SegmentedControl_1.SegmentedControl, { items: renderTabOptions, needsWrapping: false }), (0, jsx_runtime_1.jsx)("div", { style: flexer }), (0, jsx_runtime_1.jsxs)(Button_1.Button, { autoFocus: true, onClick: trigger, disabled: renderDisabled, style: {
568
+ ...buttonStyle,
569
+ backgroundColor: outnameValidation.valid
570
+ ? 'var(--blue)'
571
+ : 'var(--blue-disabled)',
572
+ }, children: [state.type === 'idle' ? `Render ${renderMode}` : 'Rendering...', (0, jsx_runtime_1.jsx)(ShortcutHint_1.ShortcutHint, { keyToPress: "\u21B5", cmdOrCtrl: true })] })] }), (0, jsx_runtime_1.jsxs)("div", { style: horizontalLayout, children: [(0, jsx_runtime_1.jsxs)("div", { style: leftSidebar, children: [shownTabs.includes('general') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'general', onClick: () => setTab('general'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(file_1.FileIcon, { style: icon }) }), "General"] })) : null, shownTabs.includes('data') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'data', onClick: () => setTab('data'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(data_1.DataIcon, { style: icon }) }), "Input Props"] })) : null, shownTabs.includes('picture') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'picture', onClick: () => setTab('picture'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(frame_1.PicIcon, { style: icon }) }), "Picture"] })) : null, shownTabs.includes('audio') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'audio', onClick: () => setTab('audio'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(audio_1.AudioIcon, { style: icon }) }), "Audio"] })) : null, shownTabs.includes('gif') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'gif', onClick: () => setTab('gif'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(gif_1.GifIcon, { style: icon }) }), "GIF"] })) : null, shownTabs.includes('advanced') ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: horizontalTab, selected: tab === 'advanced', onClick: () => setTab('advanced'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(gear_1.GearIcon, { style: icon }) }), "Other"] })) : null] }), (0, jsx_runtime_1.jsx)("div", { style: rightPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: tab === 'general' ? ((0, jsx_runtime_1.jsx)(RenderModalBasic_1.RenderModalBasic, { codec: codec, currentComposition: currentComposition, frame: frame, imageFormatOptions: imageFormatOptions, outName: outName, proResProfile: proResProfile, renderMode: renderMode, setVideoCodec: setCodec, setFrame: setFrame, setOutName: setOutName, setProResProfile: setProResProfile, endFrame: endFrame, setEndFrame: setEndFrame, setStartFrame: setStartFrame, startFrame: startFrame, validationMessage: outnameValidation.valid
573
+ ? null
574
+ : outnameValidation.error.message })) : tab === 'picture' ? ((0, jsx_runtime_1.jsx)(RenderModalPicture_1.RenderModalPicture, { renderMode: renderMode, scale: scale, setScale: setScale, pixelFormat: pixelFormat, setPixelFormat: setPixelFormat, imageFormatOptions: imageFormatOptions, crf: crf, setCrf: setCrf, customTargetVideoBitrate: customTargetVideoBitrate, maxCrf: maxCrf, minCrf: minCrf, jpegQuality: jpegQuality, qualityControlType: qualityControlType, setJpegQuality: setJpegQuality, setCustomTargetVideoBitrateValue: setCustomTargetVideoBitrateValue, setQualityControl: setQualityControl, shouldDisplayCrfOption: shouldDisplayCrfOption, videoImageFormat: videoImageFormat, stillImageFormat: stillImageFormat })) : tab === 'audio' ? ((0, jsx_runtime_1.jsx)(RenderModalAudio_1.RenderModalAudio, { muted: muted, renderMode: renderMode, setMuted: setMuted, codec: codec, audioCodec: audioCodec, setAudioCodec: setAudioCodec, enforceAudioTrack: enforceAudioTrack, setEnforceAudioTrackState: setEnforceAudioTrackState, customTargetAudioBitrate: customTargetAudioBitrate, setCustomTargetAudioBitrateValue: setCustomTargetAudioBitrateValue, setShouldHaveCustomTargetAudioBitrate: setShouldHaveCustomTargetAudioBitrate, shouldHaveCustomTargetAudioBitrate: shouldHaveCustomTargetAudioBitrate })) : tab === 'gif' ? ((0, jsx_runtime_1.jsx)(RenderModalGif_1.RenderModalGif, { everyNthFrame: everyNthFrame, limitNumberOfGifLoops: limitNumberOfGifLoops, numberOfGifLoopsSetting: numberOfGifLoopsSetting, setEveryNthFrameSetting: setEveryNthFrameSetting, setLimitNumberOfGifLoops: setLimitNumberOfGifLoops, setNumberOfGifLoopsSetting: setNumberOfGifLoopsSetting })) : tab === 'data' ? ((0, jsx_runtime_1.jsx)(RenderModalData_1.RenderModalData, { inputProps: inputProps, setInputProps: setInputProps, composition: currentComposition, compact: false, mayShowSaveButton: false })) : ((0, jsx_runtime_1.jsx)(RenderModalAdvanced_1.RenderModalAdvanced, { concurrency: concurrency, maxConcurrency: maxConcurrency, minConcurrency: minConcurrency, renderMode: renderMode, setConcurrency: setConcurrency, setVerboseLogging: setVerboseLogging, verbose: verbose, delayRenderTimeout: delayRenderTimeout, setDelayRenderTimeout: setDelayRenderTimeout, disallowParallelEncoding: disallowParallelEncoding, setDisallowParallelEncoding: setDisallowParallelEncoding, setDisableWebSecurity: setDisableWebSecurity, setIgnoreCertificateErrors: setIgnoreCertificateErrors, setHeadless: setHeadless, headless: headless, ignoreCertificateErrors: ignoreCertificateErrors, disableWebSecurity: disableWebSecurity, openGlOption: openGlOption, setOpenGlOption: setOpenGlOption, setEnvVariables: setEnvVariables, envVariables: envVariables })) })] })] }) }));
565
575
  };
566
576
  exports.RenderModal = RenderModal;
@@ -51,8 +51,10 @@ const RenderModalAdvanced = ({ renderMode, maxConcurrency, minConcurrency, setCo
51
51
  });
52
52
  }, [extendedOpenGlOptions, openGlOption, setOpenGlOption]);
53
53
  return ((0, jsx_runtime_1.jsxs)("div", { style: container, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [renderMode === 'still' ? null : ((0, jsx_runtime_1.jsx)(NumberSetting_1.NumberSetting, { min: minConcurrency, max: maxConcurrency, step: 1, name: "Concurrency", formatter: (w) => `${w}x`, onValueChanged: setConcurrency, value: concurrency })), (0, jsx_runtime_1.jsx)(NumberSetting_1.NumberSetting
54
+ // TODO: Should be right aligned
54
55
  // Also appears in packages/renderer/src/validate-puppeteer-timeout.ts
55
56
  , {
57
+ // TODO: Should be right aligned
56
58
  // Also appears in packages/renderer/src/validate-puppeteer-timeout.ts
57
59
  min: 7000, max: 900000, name: "delayRender() timeout", onValueChanged: setDelayRenderTimeout, formatter: (w) => `${w}ms`, step: 1000, value: delayRenderTimeout }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "No parallel encoding" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: disallowParallelEncoding, onChange: onDisallowParallelEncodingChanged }) })] }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Verbose logging" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: verbose, onChange: onVerboseLoggingChanged }) })] }), (0, jsx_runtime_1.jsx)(RenderModalHr_1.RenderModalHr, {}), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Disable web security" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: disableWebSecurity, onChange: onDisableWebSecurityChanged }) })] }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Ignore certificate errors " }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: ignoreCertificateErrors, onChange: onIgnoreCertificatErrors }) })] }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Headless mode" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: headless, onChange: onHeadless }) })] }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "OpenGL render backend" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { values: openGlOptions, selectedId: openGlOption, title: "OpenGl option" }) })] }), (0, jsx_runtime_1.jsx)(RenderModalHr_1.RenderModalHr, {}), (0, jsx_runtime_1.jsx)(RenderModalEnvironmentVariables_1.RenderModalEnvironmentVariables, { envVariables: envVariables, setEnvVariables: setEnvVariables })] }));
58
60
  };
@@ -41,6 +41,6 @@ const RenderModalAudio = ({ muted, setMuted, renderMode, enforceAudioTrack, setE
41
41
  };
42
42
  });
43
43
  }, [codec, setAudioCodec]);
44
- return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [renderMode === 'video' && audioCodecOptions(codec).length >= 2 ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Audio Codec" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { values: audioCodecOptions(codec), selectedId: audioCodec, title: "AudioCodec" }) })] })) : null, renderMode === 'video' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(MutedSetting_1.MutedSetting, { enforceAudioTrack: enforceAudioTrack, muted: muted, setMuted: setMuted, hint: client_1.BrowserSafeApis.options.muteOption }), (0, jsx_runtime_1.jsx)(EnforceAudioTrackSetting_1.EnforceAudioTrackSetting, { muted: muted, enforceAudioTrack: enforceAudioTrack, setEnforceAudioTrack: setEnforceAudioTrackState, option: client_1.BrowserSafeApis.options.enforceAudioOption }), (0, jsx_runtime_1.jsx)(RenderModalHr_1.RenderModalHr, {})] })), renderMode === 'still' ? null : ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Custom audio bitrate" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: shouldHaveCustomTargetAudioBitrate, onChange: onShouldHaveTargetAudioBitrateChanged }) })] })), shouldHaveCustomTargetAudioBitrate && renderMode !== 'still' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Target audio bitrate" }), (0, jsx_runtime_1.jsx)(InfoBubble_1.InfoBubble, { title: "Learn more about this option", children: (0, jsx_runtime_1.jsx)(OptionExplainer_1.OptionExplainer, { option: client_1.BrowserSafeApis.options.audioBitrateOption }) }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { style: layout_1.input, value: customTargetAudioBitrate, onChange: onTargetAudioBitrateChanged, status: "ok" }) }) })] })) : null] }));
44
+ return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [renderMode === 'video' && audioCodecOptions(codec).length >= 2 ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Audio Codec" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { values: audioCodecOptions(codec), selectedId: audioCodec, title: "AudioCodec" }) })] })) : null, renderMode === 'video' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(MutedSetting_1.MutedSetting, { enforceAudioTrack: enforceAudioTrack, muted: muted, setMuted: setMuted, hint: client_1.BrowserSafeApis.options.muteOption }), (0, jsx_runtime_1.jsx)(EnforceAudioTrackSetting_1.EnforceAudioTrackSetting, { muted: muted, enforceAudioTrack: enforceAudioTrack, setEnforceAudioTrack: setEnforceAudioTrackState, option: client_1.BrowserSafeApis.options.enforceAudioOption }), (0, jsx_runtime_1.jsx)(RenderModalHr_1.RenderModalHr, {})] })), renderMode === 'still' ? null : ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Custom audio bitrate" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: shouldHaveCustomTargetAudioBitrate, onChange: onShouldHaveTargetAudioBitrateChanged }) })] })), shouldHaveCustomTargetAudioBitrate && renderMode !== 'still' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Target audio bitrate" }), (0, jsx_runtime_1.jsx)(InfoBubble_1.InfoBubble, { title: "Learn more about this option", children: (0, jsx_runtime_1.jsx)(OptionExplainer_1.OptionExplainer, { option: client_1.BrowserSafeApis.options.audioBitrateOption }) }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { style: layout_1.input, value: customTargetAudioBitrate, onChange: onTargetAudioBitrateChanged, status: "ok", rightAlign: true }) }) })] })) : null] }));
45
45
  };
46
46
  exports.RenderModalAudio = RenderModalAudio;
@@ -74,6 +74,6 @@ const RenderModalBasic = ({ renderMode, imageFormatOptions, outName, codec, setV
74
74
  const onValueChange = (0, react_1.useCallback)((e) => {
75
75
  setOutName(e.target.value);
76
76
  }, [setOutName]);
77
- return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [renderMode === 'still' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Format" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(SegmentedControl_1.SegmentedControl, { items: imageFormatOptions, needsWrapping: true }) })] })) : ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsxs)("div", { style: layout_1.label, children: ["Codec", (0, jsx_runtime_1.jsx)(InfoBubble_1.InfoBubble, { title: "Learn more about this option", children: (0, jsx_runtime_1.jsx)(OptionExplainer_1.OptionExplainer, { option: client_1.BrowserSafeApis.options.videoCodecOption }) })] }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { values: videoCodecOptions, selectedId: codec, title: "Codec" }) })] })), renderMode === 'still' && currentComposition.durationInFrames > 1 ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Frame" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(RemInput_1.RightAlignInput, { children: (0, jsx_runtime_1.jsx)(InputDragger_1.InputDragger, { value: frame, onTextChange: onFrameChanged, placeholder: `0-${currentComposition.durationInFrames - 1}`, onValueChange: onFrameSetDirectly, name: "frame", step: 1, min: 0, status: "ok", max: currentComposition.durationInFrames - 1 }) }) })] })) : null, renderMode === 'video' && codec === 'prores' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "ProRes profile" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { title: proResProfile, selectedId: proResProfile, values: proResProfileOptions }) })] })) : null, renderMode === 'still' ? null : ((0, jsx_runtime_1.jsx)(FrameRangeSetting_1.FrameRangeSetting, { durationInFrames: currentComposition.durationInFrames, endFrame: endFrame, setEndFrame: setEndFrame, setStartFrame: setStartFrame, startFrame: startFrame })), (0, jsx_runtime_1.jsx)(RenderModalInput_1.RenderModalInput, { existence: existence, inputStyle: layout_1.input, outName: outName, onValueChange: onValueChange, validationMessage: validationMessage })] }));
77
+ return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [renderMode === 'still' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Format" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(SegmentedControl_1.SegmentedControl, { items: imageFormatOptions, needsWrapping: true }) })] })) : ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsxs)("div", { style: layout_1.label, children: ["Codec", (0, jsx_runtime_1.jsx)(InfoBubble_1.InfoBubble, { title: "Learn more about this option", children: (0, jsx_runtime_1.jsx)(OptionExplainer_1.OptionExplainer, { option: client_1.BrowserSafeApis.options.videoCodecOption }) })] }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { values: videoCodecOptions, selectedId: codec, title: "Codec" }) })] })), renderMode === 'still' && currentComposition.durationInFrames > 1 ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Frame" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(RemInput_1.RightAlignInput, { children: (0, jsx_runtime_1.jsx)(InputDragger_1.InputDragger, { value: frame, onTextChange: onFrameChanged, placeholder: `0-${currentComposition.durationInFrames - 1}`, onValueChange: onFrameSetDirectly, name: "frame", step: 1, min: 0, status: "ok", max: currentComposition.durationInFrames - 1, rightAlign: true }) }) })] })) : null, renderMode === 'video' && codec === 'prores' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "ProRes profile" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { title: proResProfile, selectedId: proResProfile, values: proResProfileOptions }) })] })) : null, renderMode === 'still' ? null : ((0, jsx_runtime_1.jsx)(FrameRangeSetting_1.FrameRangeSetting, { durationInFrames: currentComposition.durationInFrames, endFrame: endFrame, setEndFrame: setEndFrame, setStartFrame: setStartFrame, startFrame: startFrame })), (0, jsx_runtime_1.jsx)(RenderModalInput_1.RenderModalInput, { existence: existence, inputStyle: layout_1.input, outName: outName, onValueChange: onValueChange, validationMessage: validationMessage })] }));
78
78
  };
79
79
  exports.RenderModalBasic = RenderModalBasic;
@@ -3,11 +3,31 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RenderModalData = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
+ const remotion_1 = require("remotion");
6
7
  const colors_1 = require("../../helpers/colors");
8
+ const ValidationMessage_1 = require("../NewComposition/ValidationMessage");
9
+ const client_id_1 = require("../../helpers/client-id");
10
+ const layout_1 = require("../layout");
7
11
  const actions_1 = require("../RenderQueue/actions");
8
12
  const SegmentedControl_1 = require("../SegmentedControl");
9
13
  const RenderModalJSONInputPropsEditor_1 = require("./RenderModalJSONInputPropsEditor");
10
14
  const SchemaEditor_1 = require("./SchemaEditor/SchemaEditor");
15
+ const SchemaErrorMessages_1 = require("./SchemaEditor/SchemaErrorMessages");
16
+ const errorExplanation = {
17
+ fontSize: 14,
18
+ color: colors_1.LIGHT_TEXT,
19
+ fontFamily: 'sans-serif',
20
+ lineHeight: 1.5,
21
+ };
22
+ const explainer = {
23
+ display: 'flex',
24
+ flex: 1,
25
+ flexDirection: 'column',
26
+ padding: '0 12px',
27
+ justifyContent: 'center',
28
+ alignItems: 'center',
29
+ textAlign: 'center',
30
+ };
11
31
  const outer = {
12
32
  display: 'flex',
13
33
  flexDirection: 'column',
@@ -15,31 +35,56 @@ const outer = {
15
35
  overflow: 'hidden',
16
36
  };
17
37
  const controlContainer = {
18
- flexDirection: 'row',
38
+ flexDirection: 'column',
19
39
  display: 'flex',
20
- paddingLeft: 12,
21
- paddingTop: 12,
22
- paddingBottom: 12,
40
+ padding: 12,
23
41
  borderBottom: `1px solid ${colors_1.BORDER_COLOR}`,
24
42
  };
43
+ const tabWrapper = {
44
+ display: 'flex',
45
+ marginBottom: '4px',
46
+ flexDirection: 'row',
47
+ };
48
+ const spacer = {
49
+ flex: 1,
50
+ };
25
51
  const RenderModalData = ({ composition, inputProps, setInputProps, compact, mayShowSaveButton }) => {
26
52
  const [mode, setMode] = (0, react_1.useState)('schema');
27
53
  const [valBeforeSafe, setValBeforeSafe] = (0, react_1.useState)(inputProps);
28
54
  const zodValidationResult = (0, react_1.useMemo)(() => {
29
55
  return composition.schema.safeParse(inputProps);
30
56
  }, [composition.schema, inputProps]);
31
- const [canSaveDefaultProps, setCanSaveDefaultProps] = (0, react_1.useState)(false);
32
- const showSaveButton = mayShowSaveButton && canSaveDefaultProps;
33
- // TODO: Show reason
57
+ const cliProps = (0, remotion_1.getInputProps)();
58
+ const [canSaveDefaultProps, setCanSaveDefaultProps] = (0, react_1.useState)({
59
+ canUpdate: false,
60
+ reason: 'Loading...',
61
+ determined: false,
62
+ });
63
+ const showSaveButton = mayShowSaveButton && canSaveDefaultProps.canUpdate;
34
64
  // TODO: Update if root file is updated
65
+ // TODO: Segment the state for different compositions
35
66
  (0, react_1.useEffect)(() => {
36
67
  (0, actions_1.canUpdateDefaultProps)(composition.id)
37
68
  .then((can) => {
38
- setCanSaveDefaultProps(can.canUpdate);
69
+ if (can.canUpdate) {
70
+ setCanSaveDefaultProps({
71
+ canUpdate: true,
72
+ });
73
+ }
74
+ else {
75
+ setCanSaveDefaultProps({
76
+ canUpdate: false,
77
+ reason: can.reason,
78
+ determined: true,
79
+ });
80
+ }
39
81
  })
40
- .catch(() => {
41
- // TODO: Use error as reason
42
- setCanSaveDefaultProps(false);
82
+ .catch((err) => {
83
+ setCanSaveDefaultProps({
84
+ canUpdate: false,
85
+ reason: err.message,
86
+ determined: true,
87
+ });
43
88
  });
44
89
  }, [composition.id]);
45
90
  const modeItems = (0, react_1.useMemo)(() => {
@@ -72,6 +117,20 @@ const RenderModalData = ({ composition, inputProps, setInputProps, compact, mayS
72
117
  const onSave = (0, react_1.useCallback)((updater) => {
73
118
  (0, actions_1.updateDefaultProps)(composition.id, updater(composition.defaultProps));
74
119
  }, [composition.defaultProps, composition.id]);
75
- return ((0, jsx_runtime_1.jsxs)("div", { style: outer, children: [(0, jsx_runtime_1.jsx)("div", { style: controlContainer, children: (0, jsx_runtime_1.jsx)(SegmentedControl_1.SegmentedControl, { items: modeItems, needsWrapping: false }) }), mode === 'schema' ? ((0, jsx_runtime_1.jsx)(SchemaEditor_1.SchemaEditor, { value: inputProps, setValue: setInputProps, schema: composition.schema, zodValidationResult: zodValidationResult, compact: compact, defaultProps: composition.defaultProps, onSave: onSave, showSaveButton: showSaveButton })) : ((0, jsx_runtime_1.jsx)(RenderModalJSONInputPropsEditor_1.RenderModalJSONInputPropsEditor, { value: inputProps !== null && inputProps !== void 0 ? inputProps : {}, setValue: setInputProps, zodValidationResult: zodValidationResult, switchToSchema: switchToSchema, onSave: onUpdate, valBeforeSafe: valBeforeSafe }))] }));
120
+ const connectionStatus = (0, react_1.useContext)(client_id_1.PreviewServerConnectionCtx).type;
121
+ if (connectionStatus === 'disconnected') {
122
+ return ((0, jsx_runtime_1.jsxs)("div", { style: explainer, children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 5 }), (0, jsx_runtime_1.jsx)("div", { style: errorExplanation, children: "The preview server has disconnected. Reconnect to edit the schema." }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 2, block: true })] }));
123
+ }
124
+ const def = composition.schema._def;
125
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
126
+ const typeName = def.typeName;
127
+ if (typeName === remotion_1.z.ZodFirstPartyTypeKind.ZodAny) {
128
+ return (0, jsx_runtime_1.jsx)(SchemaErrorMessages_1.NoSchemaDefined, {});
129
+ }
130
+ if (!composition.defaultProps) {
131
+ return (0, jsx_runtime_1.jsx)(SchemaErrorMessages_1.NoDefaultProps, {});
132
+ }
133
+ 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)("div", { style: spacer })] }), Object.keys(cliProps).length > 0 ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1 }), (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { message: "The data that was passed using --props takes priority over the data you enter here.", align: "flex-start", type: "warning" })] })) : null, canSaveDefaultProps.canUpdate === false &&
134
+ canSaveDefaultProps.determined ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1 }), (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { message: `Can't save default props: ${canSaveDefaultProps.reason}`, align: "flex-start", type: "warning" })] })) : null] }), mode === 'schema' ? ((0, jsx_runtime_1.jsx)(SchemaEditor_1.SchemaEditor, { value: inputProps, setValue: setInputProps, schema: composition.schema, zodValidationResult: zodValidationResult, compact: compact, defaultProps: composition.defaultProps, onSave: onSave, showSaveButton: showSaveButton })) : ((0, jsx_runtime_1.jsx)(RenderModalJSONInputPropsEditor_1.RenderModalJSONInputPropsEditor, { value: inputProps !== null && inputProps !== void 0 ? inputProps : {}, setValue: setInputProps, zodValidationResult: zodValidationResult, switchToSchema: switchToSchema, onSave: onUpdate, valBeforeSafe: valBeforeSafe, showSaveButton: showSaveButton }))] }));
76
135
  };
77
136
  exports.RenderModalData = RenderModalData;
@@ -8,6 +8,6 @@ const ValidationMessage_1 = require("../NewComposition/ValidationMessage");
8
8
  const layout_2 = require("./layout");
9
9
  // eslint-disable-next-line react/function-component-definition
10
10
  function RenderModalInput({ existence, inputStyle, outName, onValueChange, validationMessage, }) {
11
- return ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsx)(layout_1.Column, { children: (0, jsx_runtime_1.jsx)("div", { style: layout_2.label, children: "Output name" }) }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { status: validationMessage ? 'error' : existence ? 'warning' : 'ok', style: inputStyle, type: "text", value: outName, onChange: onValueChange }), validationMessage ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1, block: true }), (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-end", message: validationMessage, type: 'error' })] })) : existence ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1, block: true }), (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-end", message: "Will be overwritten", type: 'warning' })] })) : null] }) })] }));
11
+ return ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsx)(layout_1.Column, { children: (0, jsx_runtime_1.jsx)("div", { style: layout_2.label, children: "Output name" }) }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { status: validationMessage ? 'error' : existence ? 'warning' : 'ok', style: inputStyle, type: "text", value: outName, onChange: onValueChange, rightAlign: true }), validationMessage ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1, block: true }), (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-end", message: validationMessage, type: 'error' })] })) : existence ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1, block: true }), (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-end", message: "Will be overwritten", type: 'warning' })] })) : null] }) })] }));
12
12
  }
13
13
  exports.RenderModalInput = RenderModalInput;
@@ -7,4 +7,5 @@ export declare const RenderModalJSONInputPropsEditor: React.FC<{
7
7
  switchToSchema: () => void;
8
8
  onSave: () => void;
9
9
  valBeforeSafe: unknown;
10
+ showSaveButton: boolean;
10
11
  }>;