@remotion/cli 4.0.76 → 4.0.79

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 (70) hide show
  1. package/dist/benchmark.js +3 -1
  2. package/dist/config/bitrate.d.ts +4 -0
  3. package/dist/config/bitrate.js +22 -1
  4. package/dist/config/index.d.ts +10 -0
  5. package/dist/config/index.js +4 -0
  6. package/dist/editor/components/Canvas.js +1 -1
  7. package/dist/editor/components/Modals.js +1 -1
  8. package/dist/editor/components/NewComposition/RemInput.d.ts +1 -1
  9. package/dist/editor/components/RenderButton.js +3 -0
  10. package/dist/editor/components/RenderModal/CrfSetting.d.ts +3 -2
  11. package/dist/editor/components/RenderModal/EnforceAudioTrackSetting.d.ts +0 -2
  12. package/dist/editor/components/RenderModal/EnforceAudioTrackSetting.js +3 -4
  13. package/dist/editor/components/RenderModal/JpegQualitySetting.js +1 -2
  14. package/dist/editor/components/RenderModal/MutedSetting.d.ts +0 -2
  15. package/dist/editor/components/RenderModal/MutedSetting.js +3 -4
  16. package/dist/editor/components/RenderModal/NumberSetting.d.ts +2 -2
  17. package/dist/editor/components/RenderModal/NumberSetting.js +4 -5
  18. package/dist/editor/components/RenderModal/OptionExplainerBubble.d.ts +5 -0
  19. package/dist/editor/components/RenderModal/OptionExplainerBubble.js +12 -0
  20. package/dist/editor/components/RenderModal/RenderModal.d.ts +3 -0
  21. package/dist/editor/components/RenderModal/RenderModal.js +15 -4
  22. package/dist/editor/components/RenderModal/RenderModalAdvanced.d.ts +2 -0
  23. package/dist/editor/components/RenderModal/RenderModalAdvanced.js +19 -5
  24. package/dist/editor/components/RenderModal/RenderModalAudio.js +4 -4
  25. package/dist/editor/components/RenderModal/RenderModalBasic.js +2 -3
  26. package/dist/editor/components/RenderModal/RenderModalPicture.d.ts +4 -0
  27. package/dist/editor/components/RenderModal/RenderModalPicture.js +19 -5
  28. package/dist/editor/components/RenderModal/ScaleSetting.js +1 -2
  29. package/dist/editor/components/RenderModal/SchemaEditor/SchemaLabel.d.ts +1 -0
  30. package/dist/editor/components/RenderModal/SchemaEditor/SchemaLabel.js +19 -4
  31. package/dist/editor/components/RenderModal/SchemaEditor/SchemaSeparationLine.d.ts +8 -0
  32. package/dist/editor/components/RenderModal/SchemaEditor/SchemaSeparationLine.js +70 -2
  33. package/dist/editor/components/RenderModal/SchemaEditor/SchemaVerticalGuide.d.ts +1 -1
  34. package/dist/editor/components/RenderModal/SchemaEditor/SchemaVerticalGuide.js +23 -5
  35. package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayEditor.js +12 -23
  36. package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayItemEditor.js +6 -1
  37. package/dist/editor/components/RenderModal/SchemaEditor/ZodBooleanEditor.js +1 -1
  38. package/dist/editor/components/RenderModal/SchemaEditor/ZodColorEditor.js +1 -1
  39. package/dist/editor/components/RenderModal/SchemaEditor/ZodDateEditor.js +1 -1
  40. package/dist/editor/components/RenderModal/SchemaEditor/ZodDiscriminatedUnionEditor.js +1 -1
  41. package/dist/editor/components/RenderModal/SchemaEditor/ZodEnumEditor.js +1 -1
  42. package/dist/editor/components/RenderModal/SchemaEditor/ZodNonEditableValue.js +1 -1
  43. package/dist/editor/components/RenderModal/SchemaEditor/ZodNumberEditor.js +1 -1
  44. package/dist/editor/components/RenderModal/SchemaEditor/ZodObjectEditor.js +13 -5
  45. package/dist/editor/components/RenderModal/SchemaEditor/ZodOrNullishEditor.js +1 -1
  46. package/dist/editor/components/RenderModal/SchemaEditor/ZodStaticFileEditor.js +1 -1
  47. package/dist/editor/components/RenderModal/SchemaEditor/ZodStringEditor.js +1 -1
  48. package/dist/editor/components/RenderModal/SchemaEditor/ZodTextareaEditor.js +1 -1
  49. package/dist/editor/components/RenderModal/layout.d.ts +1 -0
  50. package/dist/editor/components/RenderModal/layout.js +6 -3
  51. package/dist/editor/components/RenderQueue/actions.d.ts +3 -1
  52. package/dist/editor/components/RenderQueue/actions.js +3 -1
  53. package/dist/editor/components/SidebarRenderButton.js +3 -0
  54. package/dist/editor/helpers/colors.d.ts +1 -0
  55. package/dist/editor/helpers/colors.js +2 -1
  56. package/dist/editor/state/modals.d.ts +3 -0
  57. package/dist/get-cli-options.d.ts +2 -0
  58. package/dist/get-cli-options.js +4 -0
  59. package/dist/index.d.ts +4 -0
  60. package/dist/parse-command-line.d.ts +6 -2
  61. package/dist/parse-command-line.js +6 -0
  62. package/dist/preview-server/render-queue/job.d.ts +4 -0
  63. package/dist/preview-server/render-queue/make-retry-payload.js +9 -0
  64. package/dist/preview-server/render-queue/process-video.js +2 -0
  65. package/dist/preview-server/routes/add-render.js +2 -0
  66. package/dist/preview-server/routes.js +6 -0
  67. package/dist/render-flows/render.d.ts +3 -1
  68. package/dist/render-flows/render.js +3 -1
  69. package/dist/render.js +3 -1
  70. package/package.json +8 -8
@@ -5,22 +5,24 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const client_1 = require("@remotion/renderer/client");
6
6
  const react_1 = require("react");
7
7
  const Checkmark_1 = require("../../icons/Checkmark");
8
+ const Checkbox_1 = require("../Checkbox");
8
9
  const layout_1 = require("../layout");
10
+ const is_menu_item_1 = require("../Menu/is-menu-item");
9
11
  const ComboBox_1 = require("../NewComposition/ComboBox");
10
12
  const RemInput_1 = require("../NewComposition/RemInput");
11
13
  const SegmentedControl_1 = require("../SegmentedControl");
12
14
  const CrfSetting_1 = require("./CrfSetting");
13
- const InfoBubble_1 = require("./InfoBubble");
14
15
  const JpegQualitySetting_1 = require("./JpegQualitySetting");
15
16
  const layout_2 = require("./layout");
16
- const OptionExplainer_1 = require("./OptionExplainer");
17
+ const OptionExplainerBubble_1 = require("./OptionExplainerBubble");
17
18
  const RenderModalHr_1 = require("./RenderModalHr");
18
19
  const ScaleSetting_1 = require("./ScaleSetting");
19
20
  const qualityControlModes = ['crf', 'bitrate'];
20
21
  const container = {
21
22
  flex: 1,
23
+ overflowY: 'auto',
22
24
  };
23
- const RenderModalPicture = ({ renderMode, scale, setScale, pixelFormat, imageFormatOptions, setQualityControl, qualityControlType, videoImageFormat, setJpegQuality, jpegQuality, maxCrf, minCrf, setCrf, shouldDisplayQualityControlPicker, setCustomTargetVideoBitrateValue, crf, customTargetVideoBitrate, stillImageFormat, colorSpace, setColorSpace, pixelFormatOptions, }) => {
25
+ const RenderModalPicture = ({ renderMode, scale, setScale, pixelFormat, imageFormatOptions, setQualityControl, qualityControlType, videoImageFormat, setJpegQuality, jpegQuality, maxCrf, minCrf, setCrf, shouldDisplayQualityControlPicker, setCustomTargetVideoBitrateValue, crf, customTargetVideoBitrate, stillImageFormat, colorSpace, setColorSpace, pixelFormatOptions, encodingBufferSize, encodingMaxRate, setEncodingBufferSize, setEncodingMaxRate, }) => {
24
26
  const colorSpaceOptions = (0, react_1.useMemo)(() => {
25
27
  return client_1.BrowserSafeApis.validColorSpaces.map((option) => {
26
28
  return {
@@ -50,8 +52,20 @@ const RenderModalPicture = ({ renderMode, scale, setScale, pixelFormat, imageFor
50
52
  const onTargetVideoBitrateChanged = (0, react_1.useCallback)((e) => {
51
53
  setCustomTargetVideoBitrateValue(e.target.value);
52
54
  }, [setCustomTargetVideoBitrateValue]);
53
- return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [renderMode === 'video' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_2.label, children: "Image Format" }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(SegmentedControl_1.SegmentedControl, { items: imageFormatOptions, needsWrapping: false }) })] })) : null, renderMode === 'video' && videoImageFormat === 'jpeg' && ((0, jsx_runtime_1.jsx)(JpegQualitySetting_1.JpegQualitySetting, { jpegQuality: jpegQuality, setJpegQuality: setJpegQuality })), renderMode === 'still' && stillImageFormat === 'jpeg' && ((0, jsx_runtime_1.jsx)(JpegQualitySetting_1.JpegQualitySetting, { jpegQuality: jpegQuality, setJpegQuality: setJpegQuality })), renderMode === 'video' && qualityControlType !== null ? ((0, jsx_runtime_1.jsx)(RenderModalHr_1.RenderModalHr, {})) : null, shouldDisplayQualityControlPicker && renderMode === 'video' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_2.label, children: "Quality control" }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(SegmentedControl_1.SegmentedControl, { items: qualityControlOptions, needsWrapping: true }) })] })) : null, qualityControlType === 'crf' &&
55
+ const onEncodingBufferSizeToggled = (0, react_1.useCallback)((e) => {
56
+ setEncodingBufferSize(e.target.checked ? '10000k' : null);
57
+ }, [setEncodingBufferSize]);
58
+ const onEncodingMaxRateToggled = (0, react_1.useCallback)((e) => {
59
+ setEncodingMaxRate(e.target.checked ? '5000k' : null);
60
+ }, [setEncodingMaxRate]);
61
+ const onEncodingBufferSizeChanged = (0, react_1.useCallback)((e) => {
62
+ setEncodingBufferSize(e.target.value);
63
+ }, [setEncodingBufferSize]);
64
+ const onEncodingMaxRateChanged = (0, react_1.useCallback)((e) => {
65
+ setEncodingMaxRate(e.target.value);
66
+ }, [setEncodingMaxRate]);
67
+ return ((0, jsx_runtime_1.jsxs)("div", { style: container, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [renderMode === 'video' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_2.label, children: "Image Format" }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(SegmentedControl_1.SegmentedControl, { items: imageFormatOptions, needsWrapping: false }) })] })) : null, renderMode === 'video' && videoImageFormat === 'jpeg' && ((0, jsx_runtime_1.jsx)(JpegQualitySetting_1.JpegQualitySetting, { jpegQuality: jpegQuality, setJpegQuality: setJpegQuality })), renderMode === 'still' && stillImageFormat === 'jpeg' && ((0, jsx_runtime_1.jsx)(JpegQualitySetting_1.JpegQualitySetting, { jpegQuality: jpegQuality, setJpegQuality: setJpegQuality })), renderMode === 'video' && qualityControlType !== null ? ((0, jsx_runtime_1.jsx)(RenderModalHr_1.RenderModalHr, {})) : null, shouldDisplayQualityControlPicker && renderMode === 'video' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_2.label, children: "Quality control" }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(SegmentedControl_1.SegmentedControl, { items: qualityControlOptions, needsWrapping: true }) })] })) : null, qualityControlType === 'crf' &&
54
68
  renderMode !== 'still' &&
55
- renderMode !== 'sequence' ? ((0, jsx_runtime_1.jsx)(CrfSetting_1.CrfSetting, { crf: crf, min: minCrf, max: maxCrf, setCrf: setCrf, option: client_1.BrowserSafeApis.options.crfOption })) : null, qualityControlType === 'bitrate' && renderMode !== 'still' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsxs)("div", { style: layout_2.label, children: ["Target video 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.videoBitrate }) })] }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { style: layout_2.input, value: customTargetVideoBitrate, onChange: onTargetVideoBitrateChanged, status: "ok", rightAlign: true }) }) })] })) : null, renderMode === 'video' ? (0, jsx_runtime_1.jsx)(RenderModalHr_1.RenderModalHr, {}) : null, (0, jsx_runtime_1.jsx)(ScaleSetting_1.ScaleSetting, { scale: scale, setScale: setScale }), renderMode === 'video' ? (0, jsx_runtime_1.jsx)(RenderModalHr_1.RenderModalHr, {}) : null, renderMode === 'video' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_2.label, children: "Pixel format" }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { values: pixelFormatOptions, selectedId: pixelFormat, title: "Pixel Format" }) })] })) : null, renderMode === 'video' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsxs)("div", { style: layout_2.label, children: ["Color space", (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: client_1.BrowserSafeApis.options.colorSpaceOption }) })] }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { values: colorSpaceOptions, selectedId: colorSpace, title: "Color Space" }) })] })) : null] }));
69
+ renderMode !== 'sequence' ? ((0, jsx_runtime_1.jsx)(CrfSetting_1.CrfSetting, { crf: crf, min: minCrf, max: maxCrf, setCrf: setCrf, option: "crfOption" })) : null, qualityControlType === 'bitrate' && renderMode === 'video' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsxs)("div", { style: layout_2.label, children: ["Target video bitrate", (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.5 }), (0, jsx_runtime_1.jsx)(OptionExplainerBubble_1.OptionExplainerBubble, { id: "videoBitrate" })] }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { style: layout_2.input, value: customTargetVideoBitrate, onChange: onTargetVideoBitrateChanged, status: "ok", rightAlign: true }) }) })] })) : null, renderMode === 'video' ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsxs)("div", { style: layout_2.label, children: ["Custom FFmpeg -bufsize", (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.5 }), (0, jsx_runtime_1.jsx)(OptionExplainerBubble_1.OptionExplainerBubble, { id: "encodingBufferSizeOption" })] }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: encodingBufferSize !== null, onChange: onEncodingBufferSizeToggled, name: "encoding-buffer-size" }) })] }), encodingBufferSize === null ? null : ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_2.label, children: "-bufsize value" }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { style: layout_2.input, value: encodingBufferSize, onChange: onEncodingBufferSizeChanged, status: "ok", rightAlign: true }) }) })] })), (0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsxs)("div", { style: layout_2.label, children: ["Custom FFmpeg -maxrate", (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.5 }), (0, jsx_runtime_1.jsx)(OptionExplainerBubble_1.OptionExplainerBubble, { id: "encodingMaxRateOption" })] }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: encodingMaxRate !== null, onChange: onEncodingMaxRateToggled, name: "encoding-max-rate" }) })] }), encodingMaxRate === null ? null : ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_2.label, children: "-maxrate value" }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { style: layout_2.input, value: encodingMaxRate, onChange: onEncodingMaxRateChanged, status: "ok", rightAlign: true }) }) })] }))] })) : null, renderMode === 'video' ? (0, jsx_runtime_1.jsx)(RenderModalHr_1.RenderModalHr, {}) : null, (0, jsx_runtime_1.jsx)(ScaleSetting_1.ScaleSetting, { scale: scale, setScale: setScale }), renderMode === 'video' ? (0, jsx_runtime_1.jsx)(RenderModalHr_1.RenderModalHr, {}) : null, renderMode === 'video' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_2.label, children: "Pixel format" }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { values: pixelFormatOptions, selectedId: pixelFormat, title: "Pixel Format" }) })] })) : null, renderMode === 'video' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsxs)("div", { style: layout_2.label, children: ["Color space", (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.5 }), (0, jsx_runtime_1.jsx)(OptionExplainerBubble_1.OptionExplainerBubble, { id: "colorSpaceOption" })] }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { values: colorSpaceOptions, selectedId: colorSpace, title: "Color Space" }) })] })) : null] }));
56
70
  };
57
71
  exports.RenderModalPicture = RenderModalPicture;
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ScaleSetting = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const client_1 = require("@remotion/renderer/client");
6
5
  const NumberSetting_1 = require("./NumberSetting");
7
6
  const MIN_SCALE = 0.1;
8
7
  const MAX_SCALE = 10;
@@ -12,6 +11,6 @@ const ScaleSetting = ({ scale, setScale }) => {
12
11
  return `${w.toFixed(1)}x`;
13
12
  }
14
13
  return `${w}x`;
15
- }, onValueChanged: setScale, value: scale, hint: client_1.BrowserSafeApis.options.scaleOption }));
14
+ }, onValueChanged: setScale, value: scale, hint: 'scaleOption' }));
16
15
  };
17
16
  exports.ScaleSetting = ScaleSetting;
@@ -11,4 +11,5 @@ export declare const SchemaLabel: React.FC<{
11
11
  valid: boolean;
12
12
  saveDisabledByParent: boolean;
13
13
  suffix: string | null;
14
+ handleClick: null | (() => void);
14
15
  }>;
@@ -16,17 +16,32 @@ const compactStyles = {
16
16
  display: 'flex',
17
17
  flexDirection: 'row',
18
18
  alignItems: 'center',
19
+ flex: 1,
19
20
  };
20
- const SchemaLabel = ({ jsonPath, isDefaultValue, onReset, onSave, showSaveButton, onRemove, saving, valid, saveDisabledByParent, suffix, }) => {
21
+ const SchemaLabel = ({ jsonPath, isDefaultValue, onReset, onSave, showSaveButton, onRemove, saving, valid, saveDisabledByParent, suffix, handleClick, }) => {
22
+ const [clickableButtonHovered, setClickableButtonHovered] = (0, react_1.useState)(false);
21
23
  const disableSave = saving || !valid || saveDisabledByParent;
22
24
  const labelStyle = (0, react_1.useMemo)(() => {
23
25
  return {
24
26
  fontFamily: 'monospace',
25
27
  fontSize: 14,
26
- color: valid ? colors_1.LIGHT_TEXT : colors_1.FAIL_COLOR,
28
+ color: valid
29
+ ? clickableButtonHovered
30
+ ? 'white'
31
+ : colors_1.LIGHT_TEXT
32
+ : colors_1.FAIL_COLOR,
27
33
  lineHeight: '24px',
28
34
  };
29
- }, [valid]);
30
- return ((0, jsx_runtime_1.jsxs)("div", { style: compactStyles, children: [(0, jsx_runtime_1.jsxs)("span", { style: labelStyle, children: [(0, get_schema_label_1.getSchemaLabel)(jsonPath), " ", suffix ? suffix : null] }), (0, jsx_runtime_1.jsx)(layout_1.Flex, {}), isDefaultValue ? null : (0, jsx_runtime_1.jsx)(SchemaResetButton_1.SchemaResetButton, { onClick: onReset }), isDefaultValue ? null : showSaveButton ? ((0, jsx_runtime_1.jsx)(SchemaSaveButton_1.SchemaSaveButton, { onClick: onSave, disabled: disableSave })) : null, onRemove ? (0, jsx_runtime_1.jsx)(InlineRemoveButton_1.InlineRemoveButton, { onClick: onRemove }) : null] }));
35
+ }, [clickableButtonHovered, valid]);
36
+ const onClickablePointerEnter = (0, react_1.useCallback)(() => {
37
+ setClickableButtonHovered(true);
38
+ }, []);
39
+ const onClickablePointerLeave = (0, react_1.useCallback)(() => {
40
+ setClickableButtonHovered(false);
41
+ }, []);
42
+ const labelContent = ((0, jsx_runtime_1.jsxs)("span", { style: labelStyle, children: [(0, get_schema_label_1.getSchemaLabel)(jsonPath), " ", suffix ? suffix : null] }));
43
+ return ((0, jsx_runtime_1.jsxs)("div", { style: compactStyles, children: [handleClick ? (
44
+ // Minus the padding that a button has (user agent padding-line-start)
45
+ (0, jsx_runtime_1.jsx)("button", { onPointerEnter: onClickablePointerEnter, onPointerLeave: onClickablePointerLeave, type: "button", onClick: handleClick, style: { border: 'none', marginLeft: -6 }, children: labelContent })) : (labelContent), (0, jsx_runtime_1.jsx)(layout_1.Flex, {}), isDefaultValue ? null : (0, jsx_runtime_1.jsx)(SchemaResetButton_1.SchemaResetButton, { onClick: onReset }), isDefaultValue ? null : showSaveButton ? ((0, jsx_runtime_1.jsx)(SchemaSaveButton_1.SchemaSaveButton, { onClick: onSave, disabled: disableSave })) : null, onRemove ? (0, jsx_runtime_1.jsx)(InlineRemoveButton_1.InlineRemoveButton, { onClick: onRemove }) : null] }));
31
46
  };
32
47
  exports.SchemaLabel = SchemaLabel;
@@ -1,2 +1,10 @@
1
1
  import React from 'react';
2
+ import type { z } from 'zod';
3
+ export declare const VERTICAL_GUIDE_HEIGHT = 24;
2
4
  export declare const SchemaSeparationLine: React.FC;
5
+ export declare const SchemaArrayItemSeparationLine: React.FC<{
6
+ onChange: (updater: (oldV: unknown[]) => unknown[], forceApply: boolean, increment: boolean) => void;
7
+ index: number;
8
+ schema: z.ZodTypeAny;
9
+ isLast: boolean;
10
+ }>;
@@ -1,11 +1,79 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SchemaSeparationLine = void 0;
3
+ exports.SchemaArrayItemSeparationLine = exports.SchemaSeparationLine = exports.VERTICAL_GUIDE_HEIGHT = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const colors_1 = require("../../../helpers/colors");
7
+ const plus_1 = require("../../../icons/plus");
8
+ const get_zod_if_possible_1 = require("../../get-zod-if-possible");
9
+ const layout_1 = require("../../layout");
10
+ const layout_2 = require("../layout");
11
+ const create_zod_values_1 = require("./create-zod-values");
12
+ exports.VERTICAL_GUIDE_HEIGHT = 24;
5
13
  const line = {
6
- borderBottom: '1px solid rgba(255, 255, 255, 0.1)',
14
+ borderBottom: '1px solid ' + colors_1.LINE_COLOR,
7
15
  };
8
16
  const SchemaSeparationLine = () => {
9
17
  return (0, jsx_runtime_1.jsx)("div", { style: line });
10
18
  };
11
19
  exports.SchemaSeparationLine = SchemaSeparationLine;
20
+ const arraySeparationLine = {
21
+ borderBottom: '1px solid ' + colors_1.LINE_COLOR,
22
+ marginTop: -exports.VERTICAL_GUIDE_HEIGHT / 2,
23
+ pointerEvents: 'none',
24
+ width: '100%',
25
+ };
26
+ const SchemaArrayItemSeparationLine = ({ onChange, index, schema, isLast }) => {
27
+ const [outerHovered, setOuterHovered] = (0, react_1.useState)(false);
28
+ const [innerHovered, setInnerHovered] = (0, react_1.useState)(false);
29
+ const zodTypes = (0, get_zod_if_possible_1.useZodTypesIfPossible)();
30
+ const z = (0, get_zod_if_possible_1.useZodIfPossible)();
31
+ if (!z) {
32
+ throw new Error('expected zod');
33
+ }
34
+ const def = schema._def;
35
+ const onAdd = (0, react_1.useCallback)(() => {
36
+ onChange((oldV) => {
37
+ return [
38
+ ...oldV.slice(0, index + 1),
39
+ (0, create_zod_values_1.createZodValues)(def.type, z, zodTypes),
40
+ ...oldV.slice(index + 1),
41
+ ];
42
+ }, false, true);
43
+ }, [def.type, index, onChange, z, zodTypes]);
44
+ const dynamicAddButtonStyle = (0, react_1.useMemo)(() => {
45
+ return {
46
+ display: 'flex',
47
+ justifyContent: 'center',
48
+ height: exports.VERTICAL_GUIDE_HEIGHT,
49
+ opacity: outerHovered ? 1 : 0,
50
+ position: 'relative',
51
+ marginTop: -4,
52
+ };
53
+ }, [outerHovered]);
54
+ const inner = (0, react_1.useMemo)(() => {
55
+ return {
56
+ background: colors_1.BACKGROUND,
57
+ paddingLeft: 10,
58
+ paddingRight: 10,
59
+ };
60
+ }, []);
61
+ const onOuterMouseEnter = (0, react_1.useCallback)(() => {
62
+ setOuterHovered(true);
63
+ }, []);
64
+ const onOuterMouseLeave = (0, react_1.useCallback)(() => {
65
+ setOuterHovered(false);
66
+ }, []);
67
+ const onInnerMouseEnter = (0, react_1.useCallback)(() => {
68
+ setInnerHovered(true);
69
+ }, []);
70
+ const onInnerMouseLeave = (0, react_1.useCallback)(() => {
71
+ setInnerHovered(false);
72
+ }, []);
73
+ return ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'row' }, children: [(0, jsx_runtime_1.jsxs)("div", { style: { flex: 1 }, children: [(0, jsx_runtime_1.jsx)("div", { style: dynamicAddButtonStyle, onMouseEnter: onOuterMouseEnter, onMouseLeave: onOuterMouseLeave, children: (0, jsx_runtime_1.jsx)("div", { onClick: onAdd, style: inner, onMouseEnter: onInnerMouseEnter, onMouseLeave: onInnerMouseLeave, children: (0, jsx_runtime_1.jsx)(plus_1.Plus, { color: innerHovered ? 'white' : colors_1.LIGHT_TEXT, style: { height: exports.VERTICAL_GUIDE_HEIGHT / 2 } }) }) }), (0, jsx_runtime_1.jsx)("div", { style: arraySeparationLine })] }), isLast ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), (0, jsx_runtime_1.jsx)("div", { style: {
74
+ ...layout_2.fieldSetText,
75
+ alignItems: 'center',
76
+ display: 'flex',
77
+ }, children: ']' })] })) : null] }));
78
+ };
79
+ exports.SchemaArrayItemSeparationLine = SchemaArrayItemSeparationLine;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  export declare const SchemaVerticalGuide: React.FC<{
3
3
  isRoot: boolean;
4
4
  children: React.ReactNode;
@@ -2,12 +2,30 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SchemaVerticalGuide = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const SchemaSeparationLine_1 = require("./SchemaSeparationLine");
7
+ const flex = {
8
+ flex: 1,
9
+ };
5
10
  const SchemaVerticalGuide = ({ isRoot, children }) => {
6
- return ((0, jsx_runtime_1.jsx)("div", { style: isRoot
7
- ? undefined
11
+ const outer = (0, react_1.useMemo)(() => {
12
+ return {
13
+ display: 'flex',
14
+ flexDirection: 'row',
15
+ position: 'relative',
16
+ marginLeft: isRoot ? 0 : 4,
17
+ };
18
+ }, [isRoot]);
19
+ const inner = (0, react_1.useMemo)(() => {
20
+ return isRoot
21
+ ? {}
8
22
  : {
9
- borderLeft: '1px solid rgba(255, 255, 255, 0.1)',
10
- marginLeft: 4,
11
- }, children: children }));
23
+ height: `calc(100% - ${SchemaSeparationLine_1.VERTICAL_GUIDE_HEIGHT / 2}px)`,
24
+ width: 1,
25
+ background: '#363A3E',
26
+ position: 'absolute',
27
+ };
28
+ }, [isRoot]);
29
+ return ((0, jsx_runtime_1.jsxs)("div", { style: outer, children: [(0, jsx_runtime_1.jsx)("div", { style: inner }), (0, jsx_runtime_1.jsx)("div", { style: flex, children: children })] }));
12
30
  };
13
31
  exports.SchemaVerticalGuide = SchemaVerticalGuide;
@@ -26,11 +26,7 @@ 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");
30
29
  const get_zod_if_possible_1 = require("../../get-zod-if-possible");
31
- const InlineAction_1 = require("../../InlineAction");
32
- const layout_1 = require("../layout");
33
- const create_zod_values_1 = require("./create-zod-values");
34
30
  const deep_equal_1 = require("./deep-equal");
35
31
  const Fieldset_1 = require("./Fieldset");
36
32
  const local_state_1 = require("./local-state");
@@ -46,38 +42,31 @@ const ZodArrayEditor = ({ schema, jsonPath, setValue, defaultValue, value, onSav
46
42
  setValue,
47
43
  defaultValue,
48
44
  });
45
+ const [expanded, setExpanded] = (0, react_1.useState)(true);
49
46
  const def = schema._def;
47
+ const suffix = (0, react_1.useMemo)(() => {
48
+ return expanded ? ' [' : ' [...] ';
49
+ }, [expanded]);
50
50
  const z = (0, get_zod_if_possible_1.useZodIfPossible)();
51
51
  if (!z) {
52
52
  throw new Error('expected zod');
53
53
  }
54
- const zodTypes = (0, get_zod_if_possible_1.useZodTypesIfPossible)();
55
54
  const typeName = def.typeName;
56
55
  if (typeName !== z.ZodFirstPartyTypeKind.ZodArray) {
57
56
  throw new Error('expected object');
58
57
  }
59
- const onAdd = (0, react_1.useCallback)(() => {
60
- onChange((oldV) => {
61
- return [...oldV, (0, create_zod_values_1.createZodValues)(def.type, z, zodTypes)];
62
- }, false, true);
63
- }, [def.type, onChange, z, zodTypes]);
64
58
  const isDefaultValue = (0, react_1.useMemo)(() => {
65
59
  return (0, deep_equal_1.deepEqual)(localValue.value, defaultValue);
66
60
  }, [defaultValue, localValue]);
67
- const renderAddButton = (0, react_1.useCallback)((color) => {
68
- return (0, jsx_runtime_1.jsx)(plus_1.Plus, { color: color, style: { height: 12 } });
69
- }, []);
70
- return ((0, jsx_runtime_1.jsxs)(Fieldset_1.Fieldset, { shouldPad: mayPad, success: localValue.zodValidation.success, children: [(0, jsx_runtime_1.jsx)(SchemaLabel_1.SchemaLabel, { onReset: reset, isDefaultValue: isDefaultValue, jsonPath: jsonPath, onRemove: onRemove, suffix: ' [', onSave: () => {
71
- onSave(() => localValue.value, false, false);
72
- }, 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: false, children: localValue.value.map((child, i) => {
73
- var _a;
61
+ return ((0, jsx_runtime_1.jsxs)(Fieldset_1.Fieldset, { shouldPad: mayPad, success: localValue.zodValidation.success, children: [(0, jsx_runtime_1.jsx)("div", { style: {
62
+ display: 'flex',
63
+ flexDirection: 'row',
64
+ }, children: (0, jsx_runtime_1.jsx)(SchemaLabel_1.SchemaLabel, { onReset: reset, isDefaultValue: isDefaultValue, jsonPath: jsonPath, onRemove: onRemove, suffix: suffix, onSave: () => {
65
+ onSave(() => localValue.value, false, false);
66
+ }, saveDisabledByParent: saveDisabledByParent, saving: saving, showSaveButton: showSaveButton, valid: localValue.zodValidation.success, handleClick: () => setExpanded(!expanded) }) }), expanded ? ((0, jsx_runtime_1.jsx)(RevisionContextProvider, { children: (0, jsx_runtime_1.jsx)(SchemaVerticalGuide_1.SchemaVerticalGuide, { isRoot: false, children: localValue.value.map((child, i) => {
74
67
  return (
75
68
  // eslint-disable-next-line react/no-array-index-key
76
- (0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(ZodArrayItemEditor_1.ZodArrayItemEditor, { onChange: onChange, value: child, def: def, index: i, jsonPath: jsonPath, defaultValue: (_a = defaultValue[i]) !== null && _a !== void 0 ? _a : child, onSave: onSave, showSaveButton: showSaveButton, saving: saving, saveDisabledByParent: saveDisabledByParent, mayPad: mayPad }), i === localValue.value.length - 1 ? null : ((0, jsx_runtime_1.jsx)(SchemaSeparationLine_1.SchemaSeparationLine, {}))] }, `${i}${localValue.keyStabilityRevision}`));
77
- }) }) }), (0, jsx_runtime_1.jsxs)("div", { style: {
78
- ...layout_1.fieldsetLabel,
79
- alignItems: 'center',
80
- display: 'flex',
81
- }, children: [']', (0, jsx_runtime_1.jsx)(InlineAction_1.InlineAction, { onClick: onAdd, renderAction: renderAddButton })] }), (0, jsx_runtime_1.jsx)(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, localValue: localValue })] }));
69
+ (0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(ZodArrayItemEditor_1.ZodArrayItemEditor, { onChange: onChange, value: child, def: def, index: i, jsonPath: jsonPath, defaultValue: defaultValue[i], onSave: onSave, showSaveButton: showSaveButton, saving: saving, saveDisabledByParent: saveDisabledByParent, mayPad: mayPad }), (0, jsx_runtime_1.jsx)(SchemaSeparationLine_1.SchemaArrayItemSeparationLine, { schema: schema, index: i, onChange: onChange, isLast: i === localValue.value.length - 1 })] }, `${i}${localValue.keyStabilityRevision}`));
70
+ }) }) })) : null, (0, jsx_runtime_1.jsx)(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, localValue: localValue })] }));
82
71
  };
83
72
  exports.ZodArrayEditor = ZodArrayEditor;
@@ -3,8 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ZodArrayItemEditor = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
+ const get_zod_if_possible_1 = require("../../get-zod-if-possible");
6
7
  const ZodSwitch_1 = require("./ZodSwitch");
7
8
  const ZodArrayItemEditor = ({ def, onChange, jsonPath, index, value, defaultValue, onSave: onSaveObject, showSaveButton, saving, saveDisabledByParent, mayPad, }) => {
9
+ const z = (0, get_zod_if_possible_1.useZodIfPossible)();
10
+ if (!z) {
11
+ throw new Error('expected zod');
12
+ }
8
13
  const onRemove = (0, react_1.useCallback)(() => {
9
14
  onChange((oldV) => [...oldV.slice(0, index), ...oldV.slice(index + 1)], false, true);
10
15
  }, [index, onChange]);
@@ -23,6 +28,6 @@ const ZodArrayItemEditor = ({ def, onChange, jsonPath, index, value, defaultValu
23
28
  ...oldV.slice(index + 1),
24
29
  ], false, false);
25
30
  }, [index, onSaveObject]);
26
- return ((0, jsx_runtime_1.jsx)(ZodSwitch_1.ZodSwitch, { jsonPath: newJsonPath, schema: def.type, value: value, setValue: setValue, defaultValue: defaultValue, onSave: onSave, showSaveButton: showSaveButton, onRemove: onRemove, saving: saving, saveDisabledByParent: saveDisabledByParent, mayPad: mayPad }));
31
+ return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(ZodSwitch_1.ZodSwitch, { jsonPath: newJsonPath, schema: def.type, value: value, setValue: setValue, defaultValue: defaultValue, onSave: onSave, showSaveButton: showSaveButton, onRemove: onRemove, saving: saving, saveDisabledByParent: saveDisabledByParent, mayPad: mayPad }) }));
27
32
  };
28
33
  exports.ZodArrayItemEditor = ZodArrayItemEditor;
@@ -23,6 +23,6 @@ const ZodBooleanEditor = ({ schema, jsonPath, value, setValue, onSave, defaultVa
23
23
  const save = (0, react_1.useCallback)(() => {
24
24
  onSave(() => value, false, false);
25
25
  }, [onSave, value]);
26
- return ((0, jsx_runtime_1.jsxs)(Fieldset_1.Fieldset, { shouldPad: mayPad, success: localValue.zodValidation.success, children: [(0, jsx_runtime_1.jsx)(SchemaLabel_1.SchemaLabel, { isDefaultValue: localValue.value === defaultValue, jsonPath: jsonPath, onReset: reset, onSave: save, showSaveButton: showSaveButton, onRemove: onRemove, saving: saving, valid: true, saveDisabledByParent: saveDisabledByParent, suffix: null }), (0, jsx_runtime_1.jsx)("div", { style: fullWidth, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { name: jsonPath.join('.'), checked: localValue.value, onChange: onToggle, disabled: false }) })] }));
26
+ return ((0, jsx_runtime_1.jsxs)(Fieldset_1.Fieldset, { shouldPad: mayPad, success: localValue.zodValidation.success, children: [(0, jsx_runtime_1.jsx)(SchemaLabel_1.SchemaLabel, { handleClick: null, isDefaultValue: localValue.value === defaultValue, jsonPath: jsonPath, onReset: reset, onSave: save, showSaveButton: showSaveButton, onRemove: onRemove, saving: saving, valid: true, saveDisabledByParent: saveDisabledByParent, suffix: null }), (0, jsx_runtime_1.jsx)("div", { style: fullWidth, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { name: jsonPath.join('.'), checked: localValue.value, onChange: onToggle, disabled: false }) })] }));
27
27
  };
28
28
  exports.ZodBooleanEditor = ZodBooleanEditor;
@@ -64,7 +64,7 @@ const ZodColorEditor = ({ jsonPath, value, setValue, showSaveButton, defaultValu
64
64
  const newColor = (0, color_math_1.colorWithNewOpacity)(localValue.value, Math.round((Number(newValue) / 100) * 255), zodTypes);
65
65
  onValueChange(() => newColor, false, false);
66
66
  }, [localValue.value, onValueChange, zodTypes]);
67
- return ((0, jsx_runtime_1.jsxs)(Fieldset_1.Fieldset, { shouldPad: mayPad, success: localValue.zodValidation.success, children: [(0, jsx_runtime_1.jsx)(SchemaLabel_1.SchemaLabel, { isDefaultValue: localValue.value === defaultValue, jsonPath: jsonPath, onReset: reset, onSave: save, showSaveButton: showSaveButton, onRemove: onRemove, saving: saving, valid: localValue.zodValidation.success, saveDisabledByParent: saveDisabledByParent, suffix: null }), (0, jsx_runtime_1.jsxs)("div", { style: fullWidth, children: [(0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: colorPicker, children: (0, jsx_runtime_1.jsx)(RemInputTypeColor_1.RemInputTypeColor, { type: "color", style: {
67
+ return ((0, jsx_runtime_1.jsxs)(Fieldset_1.Fieldset, { shouldPad: mayPad, success: localValue.zodValidation.success, children: [(0, jsx_runtime_1.jsx)(SchemaLabel_1.SchemaLabel, { handleClick: null, isDefaultValue: localValue.value === defaultValue, jsonPath: jsonPath, onReset: reset, onSave: save, showSaveButton: showSaveButton, onRemove: onRemove, saving: saving, valid: localValue.zodValidation.success, saveDisabledByParent: saveDisabledByParent, suffix: null }), (0, jsx_runtime_1.jsxs)("div", { style: fullWidth, children: [(0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: colorPicker, children: (0, jsx_runtime_1.jsx)(RemInputTypeColor_1.RemInputTypeColor, { type: "color", style: {
68
68
  height: 39,
69
69
  }, value: rgb, onChange: onChange, className: "__remotion_color_picker", status: status, name: jsonPath.join('.') }) }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1, block: true }), (0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { value: localValue.value, status: status, placeholder: jsonPath.join('.'), onChange: onTextChange, rightAlign: false }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), (0, jsx_runtime_1.jsx)(InputDragger_1.InputDragger, { onTextChange: onOpacityChange, onValueChange: onOpacityValueChange, status: status, value: (a / 255) * 100, min: 0, max: 100, step: 1, formatter: (v) => `${Math.round(Number(v))}%`, rightAlign: false })] }), (0, jsx_runtime_1.jsx)(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, localValue: localValue })] })] }));
70
70
  };
@@ -57,6 +57,6 @@ const ZodDateEditor = ({ jsonPath, value, setValue, showSaveButton, defaultValue
57
57
  const save = (0, react_1.useCallback)(() => {
58
58
  onSave(() => value, false, false);
59
59
  }, [onSave, value]);
60
- return ((0, jsx_runtime_1.jsxs)(Fieldset_1.Fieldset, { shouldPad: mayPad, success: localValue.zodValidation.success, children: [(0, jsx_runtime_1.jsx)(SchemaLabel_1.SchemaLabel, { isDefaultValue: localValue.value.getTime() === defaultValue.getTime(), jsonPath: jsonPath, onReset: reset, onSave: save, showSaveButton: showSaveButton, onRemove: onRemove, saving: saving, valid: localValue.zodValidation.success, saveDisabledByParent: saveDisabledByParent, suffix: null }), (0, jsx_runtime_1.jsxs)("div", { style: fullWidth, children: [(0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { value: formatDate(localValue.value), type: "datetime-local", status: localValue.zodValidation.success ? 'ok' : 'error', placeholder: jsonPath.join('.'), onChange: onChange, style: inputStyle, rightAlign: false }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1, block: true }), (0, jsx_runtime_1.jsx)("div", { style: explainer, children: "Date is in local format" }), (0, jsx_runtime_1.jsx)(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, localValue: localValue })] })] }));
60
+ return ((0, jsx_runtime_1.jsxs)(Fieldset_1.Fieldset, { shouldPad: mayPad, success: localValue.zodValidation.success, children: [(0, jsx_runtime_1.jsx)(SchemaLabel_1.SchemaLabel, { handleClick: null, isDefaultValue: localValue.value.getTime() === defaultValue.getTime(), jsonPath: jsonPath, onReset: reset, onSave: save, showSaveButton: showSaveButton, onRemove: onRemove, saving: saving, valid: localValue.zodValidation.success, saveDisabledByParent: saveDisabledByParent, suffix: null }), (0, jsx_runtime_1.jsxs)("div", { style: fullWidth, children: [(0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { value: formatDate(localValue.value), type: "datetime-local", status: localValue.zodValidation.success ? 'ok' : 'error', placeholder: jsonPath.join('.'), onChange: onChange, style: inputStyle, rightAlign: false }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1, block: true }), (0, jsx_runtime_1.jsx)("div", { style: explainer, children: "Date is in local format" }), (0, jsx_runtime_1.jsx)(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, localValue: localValue })] })] }));
61
61
  };
62
62
  exports.ZodDateEditor = ZodDateEditor;
@@ -57,7 +57,7 @@ const ZodDiscriminatedUnionEditor = ({ schema, setValue, showSaveButton, saving,
57
57
  const discriminatedUnionReplacement = (0, react_1.useMemo)(() => {
58
58
  return {
59
59
  discriminator: typedSchema.discriminator,
60
- markup: ((0, jsx_runtime_1.jsxs)(Fieldset_1.Fieldset, { shouldPad: mayPad, success: true, children: [(0, jsx_runtime_1.jsx)(SchemaLabel_1.SchemaLabel, { isDefaultValue: localValue.value[typedSchema.discriminator] ===
60
+ markup: ((0, jsx_runtime_1.jsxs)(Fieldset_1.Fieldset, { shouldPad: mayPad, success: true, children: [(0, jsx_runtime_1.jsx)(SchemaLabel_1.SchemaLabel, { handleClick: null, isDefaultValue: localValue.value[typedSchema.discriminator] ===
61
61
  defaultValue[typedSchema.discriminator], jsonPath: [...jsonPath, typedSchema.discriminator], onRemove: onRemove, onReset: reset, onSave: save, saveDisabledByParent: saveDisabledByParent, saving: saving, showSaveButton: showSaveButton, suffix: null, valid: localValue.zodValidation.success }), (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { title: "Select type", values: comboBoxValues, selectedId: value[typedSchema.discriminator] })] }, 'replacement')),
62
62
  };
63
63
  }, [
@@ -50,6 +50,6 @@ const ZodEnumEditor = ({ schema, jsonPath, setValue, defaultValue, value, onSave
50
50
  const save = (0, react_1.useCallback)(() => {
51
51
  onSave(() => value, false, false);
52
52
  }, [onSave, value]);
53
- return ((0, jsx_runtime_1.jsxs)(Fieldset_1.Fieldset, { shouldPad: true, success: localValue.zodValidation.success, children: [(0, jsx_runtime_1.jsx)(SchemaLabel_1.SchemaLabel, { onSave: save, showSaveButton: showSaveButton, isDefaultValue: localValue.value === defaultValue, onReset: reset, jsonPath: jsonPath, onRemove: onRemove, saving: saving, valid: localValue.zodValidation.success, saveDisabledByParent: !localValue.zodValidation.success, suffix: null }), (0, jsx_runtime_1.jsx)("div", { style: isRoot ? undefined : container, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { values: comboBoxValues, selectedId: value, title: value }) }), (0, jsx_runtime_1.jsx)(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, localValue: localValue })] }));
53
+ return ((0, jsx_runtime_1.jsxs)(Fieldset_1.Fieldset, { shouldPad: true, success: localValue.zodValidation.success, children: [(0, jsx_runtime_1.jsx)(SchemaLabel_1.SchemaLabel, { handleClick: null, onSave: save, showSaveButton: showSaveButton, isDefaultValue: localValue.value === defaultValue, onReset: reset, jsonPath: jsonPath, onRemove: onRemove, saving: saving, valid: localValue.zodValidation.success, saveDisabledByParent: !localValue.zodValidation.success, suffix: null }), (0, jsx_runtime_1.jsx)("div", { style: isRoot ? undefined : container, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { values: comboBoxValues, selectedId: value, title: value }) }), (0, jsx_runtime_1.jsx)(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, localValue: localValue })] }));
54
54
  };
55
55
  exports.ZodEnumEditor = ZodEnumEditor;
@@ -22,6 +22,6 @@ const wideEmptyLabel = {
22
22
  const ZonNonEditableValue = ({ jsonPath, label, showSaveButton, saving, mayPad }) => {
23
23
  const save = (0, react_1.useCallback)(() => undefined, []);
24
24
  const reset = (0, react_1.useCallback)(() => undefined, []);
25
- return ((0, jsx_runtime_1.jsxs)(Fieldset_1.Fieldset, { shouldPad: mayPad, success: true, children: [(0, jsx_runtime_1.jsx)(SchemaLabel_1.SchemaLabel, { isDefaultValue: true, jsonPath: jsonPath, onReset: reset, onSave: save, showSaveButton: showSaveButton, onRemove: null, saving: saving, valid: true, saveDisabledByParent: true, suffix: null }), (0, jsx_runtime_1.jsx)("div", { style: fullWidth, children: (0, jsx_runtime_1.jsx)("em", { style: wideEmptyLabel, children: label }) })] }));
25
+ return ((0, jsx_runtime_1.jsxs)(Fieldset_1.Fieldset, { shouldPad: mayPad, success: true, children: [(0, jsx_runtime_1.jsx)(SchemaLabel_1.SchemaLabel, { handleClick: null, isDefaultValue: true, jsonPath: jsonPath, onReset: reset, onSave: save, showSaveButton: showSaveButton, onRemove: null, saving: saving, valid: true, saveDisabledByParent: true, suffix: null }), (0, jsx_runtime_1.jsx)("div", { style: fullWidth, children: (0, jsx_runtime_1.jsx)("em", { style: wideEmptyLabel, children: label }) })] }));
26
26
  };
27
27
  exports.ZonNonEditableValue = ZonNonEditableValue;
@@ -64,6 +64,6 @@ const ZodNumberEditor = ({ jsonPath, value, schema, setValue, onSave, defaultVal
64
64
  const save = (0, react_1.useCallback)(() => {
65
65
  onSave(() => value, false, false);
66
66
  }, [onSave, value]);
67
- return ((0, jsx_runtime_1.jsxs)(Fieldset_1.Fieldset, { shouldPad: mayPad, success: localValue.zodValidation.success, children: [(0, jsx_runtime_1.jsx)(SchemaLabel_1.SchemaLabel, { isDefaultValue: isDefault, jsonPath: jsonPath, onReset: reset, onSave: save, showSaveButton: showSaveButton, onRemove: onRemove, saving: saving, valid: localValue.zodValidation.success, saveDisabledByParent: saveDisabledByParent, suffix: null }), (0, jsx_runtime_1.jsxs)("div", { style: fullWidth, children: [(0, jsx_runtime_1.jsx)(InputDragger_1.InputDragger, { type: 'number', value: localValue.value, style: fullWidth, status: localValue.zodValidation.success ? 'ok' : 'error', placeholder: jsonPath.join('.'), onTextChange: onTextChange, onValueChange: onNumberChange, min: getMinValue(schema), max: getMaxValue(schema), step: getStep(schema), rightAlign: false }), (0, jsx_runtime_1.jsx)(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, localValue: localValue })] })] }));
67
+ return ((0, jsx_runtime_1.jsxs)(Fieldset_1.Fieldset, { shouldPad: mayPad, success: localValue.zodValidation.success, children: [(0, jsx_runtime_1.jsx)(SchemaLabel_1.SchemaLabel, { handleClick: null, isDefaultValue: isDefault, jsonPath: jsonPath, onReset: reset, onSave: save, showSaveButton: showSaveButton, onRemove: onRemove, saving: saving, valid: localValue.zodValidation.success, saveDisabledByParent: saveDisabledByParent, suffix: null }), (0, jsx_runtime_1.jsxs)("div", { style: fullWidth, children: [(0, jsx_runtime_1.jsx)(InputDragger_1.InputDragger, { type: 'number', value: localValue.value, style: fullWidth, status: localValue.zodValidation.success ? 'ok' : 'error', placeholder: jsonPath.join('.'), onTextChange: onTextChange, onValueChange: onNumberChange, min: getMinValue(schema), max: getMaxValue(schema), step: getStep(schema), rightAlign: false }), (0, jsx_runtime_1.jsx)(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, localValue: localValue })] })] }));
68
68
  };
69
69
  exports.ZodNumberEditor = ZodNumberEditor;
@@ -40,6 +40,7 @@ const ZodObjectEditor = ({ schema, jsonPath, setValue, value, defaultValue, onSa
40
40
  if (!z) {
41
41
  throw new Error('expected zod');
42
42
  }
43
+ const [expanded, setExpanded] = (0, react_1.useState)(true);
43
44
  const { localValue, onChange, RevisionContextProvider, reset } = (0, local_state_1.useLocalState)({
44
45
  schema,
45
46
  setValue,
@@ -57,11 +58,14 @@ const ZodObjectEditor = ({ schema, jsonPath, setValue, value, defaultValue, onSa
57
58
  const isDefaultValue = (0, react_1.useMemo)(() => {
58
59
  return (0, deep_equal_1.deepEqual)(localValue.value, defaultValue);
59
60
  }, [defaultValue, localValue]);
60
- return ((0, jsx_runtime_1.jsxs)(Fieldset_1.Fieldset, { shouldPad: !isRoot && mayPad, success: localValue.zodValidation.success, children: [isRoot ? null : ((0, jsx_runtime_1.jsx)(SchemaLabel_1.SchemaLabel, { isDefaultValue: isDefaultValue, onReset: reset, jsonPath: jsonPath, onRemove: onRemove, suffix: ' {', onSave: () => {
61
+ const suffix = (0, react_1.useMemo)(() => {
62
+ return expanded ? ' {' : ' {...}';
63
+ }, [expanded]);
64
+ return ((0, jsx_runtime_1.jsxs)(Fieldset_1.Fieldset, { shouldPad: !isRoot && mayPad, success: localValue.zodValidation.success, children: [isRoot ? null : ((0, jsx_runtime_1.jsx)(SchemaLabel_1.SchemaLabel, { isDefaultValue: isDefaultValue, onReset: reset, jsonPath: jsonPath, onRemove: onRemove, suffix: suffix, onSave: () => {
61
65
  onSave(() => {
62
66
  return localValue.value;
63
67
  }, false, false);
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) => {
68
+ }, saveDisabledByParent: saveDisabledByParent, saving: saving, showSaveButton: showSaveButton, valid: localValue.zodValidation.success, handleClick: () => setExpanded(!expanded) })), expanded ? ((0, jsx_runtime_1.jsx)(RevisionContextProvider, { children: (0, jsx_runtime_1.jsx)(SchemaVerticalGuide_1.SchemaVerticalGuide, { isRoot: isRoot, children: keys.map((key, i) => {
65
69
  if (discriminatedUnionReplacement &&
66
70
  key === discriminatedUnionReplacement.discriminator) {
67
71
  return discriminatedUnionReplacement.markup;
@@ -72,17 +76,21 @@ const ZodObjectEditor = ({ schema, jsonPath, setValue, value, defaultValue, onSa
72
76
  onChange((oldVal) => {
73
77
  return {
74
78
  ...oldVal,
75
- [key]: typeof val === 'function' ? val(oldVal[key]) : val,
79
+ [key]: typeof val === 'function'
80
+ ? val(oldVal[key])
81
+ : val,
76
82
  };
77
83
  }, forceApply, false);
78
84
  }, onSave: (val, forceApply) => {
79
85
  onSave((oldVal) => {
80
86
  return {
81
87
  ...oldVal,
82
- [key]: typeof val === 'function' ? val(oldVal[key]) : val,
88
+ [key]: typeof val === 'function'
89
+ ? val(oldVal[key])
90
+ : val,
83
91
  };
84
92
  }, forceApply, false);
85
93
  }, onRemove: null, showSaveButton: showSaveButton, saving: saving, saveDisabledByParent: saveDisabledByParent }), i === keys.length - 1 ? null : (0, jsx_runtime_1.jsx)(SchemaSeparationLine_1.SchemaSeparationLine, {})] }, key));
86
- }) }) }), isRoot ? null : (0, jsx_runtime_1.jsx)("div", { style: layout_1.fieldsetLabel, children: '}' })] }));
94
+ }) }) })) : null, isRoot || !expanded ? null : (0, jsx_runtime_1.jsx)("div", { style: layout_1.fieldsetLabel, children: '}' })] }));
87
95
  };
88
96
  exports.ZodObjectEditor = ZodObjectEditor;
@@ -45,6 +45,6 @@ const ZodOrNullishEditor = ({ jsonPath, schema, setValue, onSave, defaultValue,
45
45
  const save = (0, react_1.useCallback)(() => {
46
46
  onSave(() => value, false, false);
47
47
  }, [onSave, value]);
48
- return ((0, jsx_runtime_1.jsxs)(Fieldset_1.Fieldset, { shouldPad: mayPad, success: localValue.zodValidation.success, children: [localValue.value === nullishValue ? ((0, jsx_runtime_1.jsx)(SchemaLabel_1.SchemaLabel, { isDefaultValue: localValue.value === defaultValue, jsonPath: jsonPath, onReset: reset, onSave: save, showSaveButton: showSaveButton, onRemove: onRemove, saving: saving, valid: localValue.zodValidation.success, saveDisabledByParent: saveDisabledByParent, suffix: null })) : ((0, jsx_runtime_1.jsx)(ZodSwitch_1.ZodSwitch, { value: localValue.value, setValue: setLocalValue, jsonPath: jsonPath, schema: innerSchema, defaultValue: defaultValue, onSave: onSave, showSaveButton: showSaveButton, onRemove: onRemove, saving: saving, saveDisabledByParent: saveDisabledByParent, mayPad: false })), (0, jsx_runtime_1.jsxs)("div", { style: checkBoxWrapper, children: [(0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: isChecked, onChange: onCheckBoxChange, disabled: false, name: jsonPath.join('.') }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), (0, jsx_runtime_1.jsx)("div", { style: labelStyle, children: String(nullishValue) })] })] }));
48
+ return ((0, jsx_runtime_1.jsxs)(Fieldset_1.Fieldset, { shouldPad: mayPad, success: localValue.zodValidation.success, children: [localValue.value === nullishValue ? ((0, jsx_runtime_1.jsx)(SchemaLabel_1.SchemaLabel, { handleClick: null, isDefaultValue: localValue.value === defaultValue, jsonPath: jsonPath, onReset: reset, onSave: save, showSaveButton: showSaveButton, onRemove: onRemove, saving: saving, valid: localValue.zodValidation.success, saveDisabledByParent: saveDisabledByParent, suffix: null })) : ((0, jsx_runtime_1.jsx)(ZodSwitch_1.ZodSwitch, { value: localValue.value, setValue: setLocalValue, jsonPath: jsonPath, schema: innerSchema, defaultValue: defaultValue, onSave: onSave, showSaveButton: showSaveButton, onRemove: onRemove, saving: saving, saveDisabledByParent: saveDisabledByParent, mayPad: false })), (0, jsx_runtime_1.jsxs)("div", { style: checkBoxWrapper, children: [(0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: isChecked, onChange: onCheckBoxChange, disabled: false, name: jsonPath.join('.') }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), (0, jsx_runtime_1.jsx)("div", { style: labelStyle, children: String(nullishValue) })] })] }));
49
49
  };
50
50
  exports.ZodOrNullishEditor = ZodOrNullishEditor;
@@ -51,6 +51,6 @@ const ZodStaticFileEditor = ({ schema, jsonPath, setValue, defaultValue, value,
51
51
  const save = (0, react_1.useCallback)(() => {
52
52
  onSave(() => value);
53
53
  }, [onSave, value]);
54
- return ((0, jsx_runtime_1.jsxs)(Fieldset_1.Fieldset, { shouldPad: mayPad, success: localValue.zodValidation.success, children: [(0, jsx_runtime_1.jsx)(SchemaLabel_1.SchemaLabel, { onSave: save, showSaveButton: showSaveButton, isDefaultValue: localValue.value === defaultValue, onReset: reset, jsonPath: jsonPath, onRemove: onRemove, saving: saving, valid: localValue.zodValidation.success, saveDisabledByParent: saveDisabledByParent, suffix: null }), (0, jsx_runtime_1.jsx)("div", { style: isRoot ? undefined : container, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { values: comboBoxValues, selectedId: localValue.value, title: value }) }), (0, jsx_runtime_1.jsx)(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, localValue: localValue })] }));
54
+ return ((0, jsx_runtime_1.jsxs)(Fieldset_1.Fieldset, { shouldPad: mayPad, success: localValue.zodValidation.success, children: [(0, jsx_runtime_1.jsx)(SchemaLabel_1.SchemaLabel, { handleClick: null, onSave: save, showSaveButton: showSaveButton, isDefaultValue: localValue.value === defaultValue, onReset: reset, jsonPath: jsonPath, onRemove: onRemove, saving: saving, valid: localValue.zodValidation.success, saveDisabledByParent: saveDisabledByParent, suffix: null }), (0, jsx_runtime_1.jsx)("div", { style: isRoot ? undefined : container, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { values: comboBoxValues, selectedId: localValue.value, title: value }) }), (0, jsx_runtime_1.jsx)(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, localValue: localValue })] }));
55
55
  };
56
56
  exports.ZodStaticFileEditor = ZodStaticFileEditor;
@@ -29,6 +29,6 @@ const ZodStringEditor = ({ jsonPath, value, setValue, showSaveButton, defaultVal
29
29
  const save = (0, react_1.useCallback)(() => {
30
30
  onSave(() => value, false, false);
31
31
  }, [onSave, value]);
32
- return ((0, jsx_runtime_1.jsxs)(Fieldset_1.Fieldset, { shouldPad: mayPad, success: false, children: [(0, jsx_runtime_1.jsx)(SchemaLabel_1.SchemaLabel, { isDefaultValue: localValue.value === defaultValue, jsonPath: jsonPath, onReset: reset, onSave: save, showSaveButton: showSaveButton, onRemove: onRemove, saving: saving, valid: localValue.zodValidation.success, saveDisabledByParent: saveDisabledByParent, suffix: null }), (0, jsx_runtime_1.jsxs)("div", { style: fullWidth, children: [(0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { value: localValue.value, status: localValue.zodValidation ? 'ok' : 'error', placeholder: jsonPath.join('.'), onChange: onChange, rightAlign: false, name: jsonPath.join('.') }), (0, jsx_runtime_1.jsx)(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, localValue: localValue })] })] }));
32
+ return ((0, jsx_runtime_1.jsxs)(Fieldset_1.Fieldset, { shouldPad: mayPad, success: false, children: [(0, jsx_runtime_1.jsx)(SchemaLabel_1.SchemaLabel, { handleClick: null, isDefaultValue: localValue.value === defaultValue, jsonPath: jsonPath, onReset: reset, onSave: save, showSaveButton: showSaveButton, onRemove: onRemove, saving: saving, valid: localValue.zodValidation.success, saveDisabledByParent: saveDisabledByParent, suffix: null }), (0, jsx_runtime_1.jsxs)("div", { style: fullWidth, children: [(0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { value: localValue.value, status: localValue.zodValidation ? 'ok' : 'error', placeholder: jsonPath.join('.'), onChange: onChange, rightAlign: false, name: jsonPath.join('.') }), (0, jsx_runtime_1.jsx)(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, localValue: localValue })] })] }));
33
33
  };
34
34
  exports.ZodStringEditor = ZodStringEditor;
@@ -37,6 +37,6 @@ const ZodTextareaEditor = ({ jsonPath, value, setValue, showSaveButton, defaultV
37
37
  const save = (0, react_1.useCallback)(() => {
38
38
  onSave(() => value, false, false);
39
39
  }, [onSave, value]);
40
- return ((0, jsx_runtime_1.jsxs)(Fieldset_1.Fieldset, { shouldPad: mayPad, success: localValue.zodValidation.success, children: [(0, jsx_runtime_1.jsx)(SchemaLabel_1.SchemaLabel, { isDefaultValue: localValue.value === defaultValue, jsonPath: jsonPath, onReset: reset, onSave: save, showSaveButton: showSaveButton, onRemove: onRemove, saving: saving, valid: localValue.zodValidation.success, saveDisabledByParent: saveDisabledByParent, suffix: null }), (0, jsx_runtime_1.jsxs)("div", { style: fullWidth, children: [(0, jsx_runtime_1.jsx)(RemTextarea_1.RemTextarea, { onChange: onChange, value: localValue.value, status: localValue.zodValidation ? 'ok' : 'error', placeholder: jsonPath.join('.'), name: jsonPath.join('.'), style: textareaStyle }), (0, jsx_runtime_1.jsx)(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, localValue: localValue })] })] }));
40
+ return ((0, jsx_runtime_1.jsxs)(Fieldset_1.Fieldset, { shouldPad: mayPad, success: localValue.zodValidation.success, children: [(0, jsx_runtime_1.jsx)(SchemaLabel_1.SchemaLabel, { handleClick: null, isDefaultValue: localValue.value === defaultValue, jsonPath: jsonPath, onReset: reset, onSave: save, showSaveButton: showSaveButton, onRemove: onRemove, saving: saving, valid: localValue.zodValidation.success, saveDisabledByParent: saveDisabledByParent, suffix: null }), (0, jsx_runtime_1.jsxs)("div", { style: fullWidth, children: [(0, jsx_runtime_1.jsx)(RemTextarea_1.RemTextarea, { onChange: onChange, value: localValue.value, status: localValue.zodValidation ? 'ok' : 'error', placeholder: jsonPath.join('.'), name: jsonPath.join('.'), style: textareaStyle }), (0, jsx_runtime_1.jsx)(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, localValue: localValue })] })] }));
41
41
  };
42
42
  exports.ZodTextareaEditor = ZodTextareaEditor;
@@ -3,4 +3,5 @@ export declare const optionRow: React.CSSProperties;
3
3
  export declare const label: React.CSSProperties;
4
4
  export declare const rightRow: React.CSSProperties;
5
5
  export declare const input: React.CSSProperties;
6
+ export declare const fieldSetText: React.CSSProperties;
6
7
  export declare const fieldsetLabel: React.CSSProperties;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fieldsetLabel = exports.input = exports.rightRow = exports.label = exports.optionRow = void 0;
3
+ exports.fieldsetLabel = exports.fieldSetText = exports.input = exports.rightRow = exports.label = exports.optionRow = void 0;
4
4
  const colors_1 = require("../../helpers/colors");
5
5
  exports.optionRow = {
6
6
  display: 'flex',
@@ -31,12 +31,15 @@ exports.rightRow = {
31
31
  exports.input = {
32
32
  minWidth: 250,
33
33
  };
34
- exports.fieldsetLabel = {
34
+ exports.fieldSetText = {
35
35
  color: colors_1.LIGHT_TEXT,
36
36
  fontSize: 14,
37
+ fontFamily: 'monospace',
38
+ };
39
+ exports.fieldsetLabel = {
40
+ ...exports.fieldSetText,
37
41
  display: 'flex',
38
42
  flexDirection: 'row',
39
- fontFamily: 'monospace',
40
43
  alignItems: 'center',
41
44
  width: '100%',
42
45
  };
@@ -35,7 +35,7 @@ export declare const addSequenceRenderJob: ({ compositionId, outName, imageForma
35
35
  disallowParallelEncoding: boolean;
36
36
  multiProcessOnLinux: boolean;
37
37
  }) => Promise<undefined>;
38
- export declare const addVideoRenderJob: ({ compositionId, outName, imageFormat, jpegQuality, scale, logLevel, codec, concurrency, crf, startFrame, endFrame, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, audioBitrate, videoBitrate, everyNthFrame, numberOfGifLoops, delayRenderTimeout, audioCodec, disallowParallelEncoding, chromiumOptions, envVariables, inputProps, offthreadVideoCacheSizeInBytes, colorSpace, multiProcessOnLinux, }: {
38
+ export declare const addVideoRenderJob: ({ compositionId, outName, imageFormat, jpegQuality, scale, logLevel, codec, concurrency, crf, startFrame, endFrame, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, audioBitrate, videoBitrate, everyNthFrame, numberOfGifLoops, delayRenderTimeout, audioCodec, disallowParallelEncoding, chromiumOptions, envVariables, inputProps, offthreadVideoCacheSizeInBytes, colorSpace, multiProcessOnLinux, encodingMaxRate, encodingBufferSize, }: {
39
39
  compositionId: string;
40
40
  outName: string;
41
41
  imageFormat: VideoImageFormat;
@@ -65,6 +65,8 @@ export declare const addVideoRenderJob: ({ compositionId, outName, imageFormat,
65
65
  offthreadVideoCacheSizeInBytes: number | null;
66
66
  colorSpace: ColorSpace;
67
67
  multiProcessOnLinux: boolean;
68
+ encodingMaxRate: string | null;
69
+ encodingBufferSize: string | null;
68
70
  }) => Promise<undefined>;
69
71
  export declare const unsubscribeFromFileExistenceWatcher: ({ file, clientId, }: {
70
72
  file: string;