@remotion/studio 4.0.428 → 4.0.429

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 (117) hide show
  1. package/README.md +7 -7
  2. package/dist/components/AssetSelectorItem.js +1 -1
  3. package/dist/components/Canvas.js +1 -1
  4. package/dist/components/CopyButton.js +1 -1
  5. package/dist/components/FilePreview.js +1 -1
  6. package/dist/components/InstallPackage.js +1 -1
  7. package/dist/components/Menu/MenuSubItem.js +1 -1
  8. package/dist/components/MenuBuildIndicator.js +1 -1
  9. package/dist/components/MenuToolbar.js +1 -1
  10. package/dist/components/ModalHeader.js +1 -1
  11. package/dist/components/NewComposition/CodemodFooter.js +1 -1
  12. package/dist/components/NewComposition/ComboBox.js +1 -1
  13. package/dist/components/NewComposition/DuplicateComposition.js +15 -15
  14. package/dist/components/NewComposition/InputDragger.d.ts +1 -0
  15. package/dist/components/NewComposition/InputDragger.js +7 -2
  16. package/dist/components/NewComposition/MenuContent.js +1 -1
  17. package/dist/components/NewComposition/NewCompDuration.js +5 -5
  18. package/dist/components/NewComposition/RenameComposition.js +5 -5
  19. package/dist/components/OverrideInputProps.js +1 -1
  20. package/dist/components/PreviewToolbar.js +4 -3
  21. package/dist/components/QuickSwitcher/QuickSwitcherContent.js +3 -3
  22. package/dist/components/RenderButton.js +1 -1
  23. package/dist/components/RenderModal/DataEditor.js +4 -4
  24. package/dist/components/RenderModal/EnforceAudioTrackSetting.js +1 -1
  25. package/dist/components/RenderModal/EnvInput.js +1 -1
  26. package/dist/components/RenderModal/MutedSetting.js +1 -1
  27. package/dist/components/RenderModal/NumberSetting.js +2 -2
  28. package/dist/components/RenderModal/OptionExplainer.js +1 -1
  29. package/dist/components/RenderModal/RenderModalAdvanced.js +2 -2
  30. package/dist/components/RenderModal/RenderModalAudio.js +3 -3
  31. package/dist/components/RenderModal/RenderModalBasic.js +3 -3
  32. package/dist/components/RenderModal/RenderModalGif.js +1 -1
  33. package/dist/components/RenderModal/RenderModalJSONPropsEditor.js +2 -2
  34. package/dist/components/RenderModal/RenderModalOutputName.js +1 -1
  35. package/dist/components/RenderModal/RenderModalPicture.js +2 -2
  36. package/dist/components/RenderModal/RenderStatusModal.js +1 -1
  37. package/dist/components/RenderModal/ResolveCompositionBeforeModal.js +1 -1
  38. package/dist/components/RenderModal/SchemaEditor/SchemaEditor.js +3 -3
  39. package/dist/components/RenderModal/SchemaEditor/SchemaErrorMessages.js +1 -1
  40. package/dist/components/RenderModal/SchemaEditor/SchemaLabel.js +1 -1
  41. package/dist/components/RenderModal/SchemaEditor/ZodArrayEditor.d.ts +1 -1
  42. package/dist/components/RenderModal/SchemaEditor/ZodArrayEditor.js +4 -4
  43. package/dist/components/RenderModal/SchemaEditor/ZodArrayItemEditor.d.ts +1 -1
  44. package/dist/components/RenderModal/SchemaEditor/ZodBooleanEditor.d.ts +1 -1
  45. package/dist/components/RenderModal/SchemaEditor/ZodBooleanEditor.js +1 -1
  46. package/dist/components/RenderModal/SchemaEditor/ZodColorEditor.d.ts +1 -1
  47. package/dist/components/RenderModal/SchemaEditor/ZodColorEditor.js +3 -3
  48. package/dist/components/RenderModal/SchemaEditor/ZodDateEditor.d.ts +1 -1
  49. package/dist/components/RenderModal/SchemaEditor/ZodDateEditor.js +2 -2
  50. package/dist/components/RenderModal/SchemaEditor/ZodDiscriminatedUnionEditor.d.ts +1 -1
  51. package/dist/components/RenderModal/SchemaEditor/ZodDiscriminatedUnionEditor.js +4 -4
  52. package/dist/components/RenderModal/SchemaEditor/ZodEffectEditor.d.ts +1 -1
  53. package/dist/components/RenderModal/SchemaEditor/ZodEffectEditor.js +2 -2
  54. package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.d.ts +1 -1
  55. package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.js +2 -2
  56. package/dist/components/RenderModal/SchemaEditor/ZodErrorMessages.js +1 -1
  57. package/dist/components/RenderModal/SchemaEditor/ZodMatrixEditor.d.ts +1 -1
  58. package/dist/components/RenderModal/SchemaEditor/ZodMatrixEditor.js +4 -4
  59. package/dist/components/RenderModal/SchemaEditor/ZodNullableEditor.d.ts +1 -1
  60. package/dist/components/RenderModal/SchemaEditor/ZodNullableEditor.js +1 -1
  61. package/dist/components/RenderModal/SchemaEditor/ZodNumberEditor.d.ts +1 -1
  62. package/dist/components/RenderModal/SchemaEditor/ZodNumberEditor.js +3 -66
  63. package/dist/components/RenderModal/SchemaEditor/ZodObjectEditor.d.ts +1 -1
  64. package/dist/components/RenderModal/SchemaEditor/ZodObjectEditor.js +3 -3
  65. package/dist/components/RenderModal/SchemaEditor/ZodOptionalEditor.d.ts +1 -1
  66. package/dist/components/RenderModal/SchemaEditor/ZodOptionalEditor.js +1 -1
  67. package/dist/components/RenderModal/SchemaEditor/ZodOrNullishEditor.d.ts +1 -1
  68. package/dist/components/RenderModal/SchemaEditor/ZodOrNullishEditor.js +2 -2
  69. package/dist/components/RenderModal/SchemaEditor/ZodStaticFileEditor.d.ts +1 -1
  70. package/dist/components/RenderModal/SchemaEditor/ZodStaticFileEditor.js +1 -1
  71. package/dist/components/RenderModal/SchemaEditor/ZodStringEditor.d.ts +1 -1
  72. package/dist/components/RenderModal/SchemaEditor/ZodStringEditor.js +2 -2
  73. package/dist/components/RenderModal/SchemaEditor/ZodTextareaEditor.d.ts +1 -1
  74. package/dist/components/RenderModal/SchemaEditor/ZodTextareaEditor.js +2 -2
  75. package/dist/components/RenderModal/SchemaEditor/ZodTupleItemEditor.d.ts +1 -1
  76. package/dist/components/RenderModal/SchemaEditor/ZodUnionEditor.d.ts +1 -1
  77. package/dist/components/RenderModal/SchemaEditor/ZodUnionEditor.js +1 -1
  78. package/dist/components/RenderModal/SchemaEditor/local-state.d.ts +1 -1
  79. package/dist/components/RenderModal/SchemaEditor/zod-number-constraints.d.ts +4 -0
  80. package/dist/components/RenderModal/SchemaEditor/zod-number-constraints.js +70 -0
  81. package/dist/components/RenderModal/SeparateAudioOption.js +2 -2
  82. package/dist/components/RenderModal/ServerRenderModal.js +5 -5
  83. package/dist/components/RenderModal/WebRenderModalAudio.js +3 -3
  84. package/dist/components/RenderModal/WebRenderModalLicense.js +1 -1
  85. package/dist/components/RenderQueue/index.js +2 -2
  86. package/dist/components/RendersTab.js +1 -1
  87. package/dist/components/RunningCalculateMetadata.js +1 -1
  88. package/dist/components/TimeValue.js +1 -1
  89. package/dist/components/Timeline/Timeline.js +2 -2
  90. package/dist/components/Timeline/TimelineDragHandler.js +2 -2
  91. package/dist/components/Timeline/TimelineExpandedSection.d.ts +7 -0
  92. package/dist/components/Timeline/TimelineExpandedSection.js +119 -0
  93. package/dist/components/Timeline/TimelineListItem.js +18 -12
  94. package/dist/components/Timeline/TimelineSchemaField.d.ts +15 -0
  95. package/dist/components/Timeline/TimelineSchemaField.js +89 -0
  96. package/dist/components/Timeline/TimelineSlider.js +2 -2
  97. package/dist/components/Timeline/TimelineStack/index.d.ts +2 -0
  98. package/dist/components/Timeline/TimelineStack/index.js +2 -17
  99. package/dist/components/Timeline/TimelineTimeIndicators.js +1 -1
  100. package/dist/components/Timeline/TimelineTracks.js +5 -5
  101. package/dist/components/Timeline/timeline-scroll-logic.js +1 -1
  102. package/dist/components/UpdateModal/UpdateModal.js +1 -1
  103. package/dist/components/VisualControls/VisualControlHandle.js +5 -5
  104. package/dist/error-overlay/react-overlay/listen-to-runtime-errors.js +1 -1
  105. package/dist/error-overlay/remotion-overlay/CompositionIdsDropdown.js +1 -1
  106. package/dist/error-overlay/remotion-overlay/ErrorDisplay.js +2 -2
  107. package/dist/error-overlay/remotion-overlay/StackFrame.js +1 -1
  108. package/dist/esm/{chunk-btxgxqx6.js → chunk-0rv5nqc6.js} +3807 -3489
  109. package/dist/esm/internals.mjs +3807 -3489
  110. package/dist/esm/previewEntry.mjs +32492 -32166
  111. package/dist/esm/renderEntry.mjs +1 -1
  112. package/dist/helpers/calculate-timeline.js +1 -0
  113. package/dist/helpers/timeline-layout.d.ts +14 -0
  114. package/dist/helpers/timeline-layout.js +45 -1
  115. package/dist/helpers/use-menu-structure.js +1 -1
  116. package/dist/previewEntry.js +1 -1
  117. package/package.json +11 -11
@@ -41,12 +41,12 @@ const colors_1 = require("../../helpers/colors");
41
41
  const document_title_1 = require("../../helpers/document-title");
42
42
  const use_keybinding_1 = require("../../helpers/use-keybinding");
43
43
  const Button_1 = require("../Button");
44
+ const layout_1 = require("../layout");
44
45
  const RemTextarea_1 = require("../NewComposition/RemTextarea");
45
46
  const ValidationMessage_1 = require("../NewComposition/ValidationMessage");
46
- const layout_1 = require("../layout");
47
- const ZodErrorMessages_1 = require("./SchemaEditor/ZodErrorMessages");
48
47
  const deep_equal_1 = require("./SchemaEditor/deep-equal");
49
48
  const zod_schema_type_1 = require("./SchemaEditor/zod-schema-type");
49
+ const ZodErrorMessages_1 = require("./SchemaEditor/ZodErrorMessages");
50
50
  const style = {
51
51
  fontFamily: 'monospace',
52
52
  flex: 1,
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RenderModalOutputName = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const layout_1 = require("../layout");
5
6
  const RemInput_1 = require("../NewComposition/RemInput");
6
7
  const ValidationMessage_1 = require("../NewComposition/ValidationMessage");
7
- const layout_1 = require("../layout");
8
8
  const layout_2 = require("./layout");
9
9
  const RenderModalOutputName = ({ existence, inputStyle, outName, onValueChange, validationMessage, label: labelText, }) => {
10
10
  return (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
@@ -6,17 +6,17 @@ const client_1 = require("@remotion/renderer/client");
6
6
  const react_1 = require("react");
7
7
  const Checkmark_1 = require("../../icons/Checkmark");
8
8
  const Checkbox_1 = require("../Checkbox");
9
+ const layout_1 = require("../layout");
9
10
  const is_menu_item_1 = require("../Menu/is-menu-item");
10
11
  const ComboBox_1 = require("../NewComposition/ComboBox");
11
12
  const RemInput_1 = require("../NewComposition/RemInput");
12
13
  const SegmentedControl_1 = require("../SegmentedControl");
13
- const layout_1 = require("../layout");
14
14
  const CrfSetting_1 = require("./CrfSetting");
15
15
  const JpegQualitySetting_1 = require("./JpegQualitySetting");
16
+ const layout_2 = require("./layout");
16
17
  const OptionExplainerBubble_1 = require("./OptionExplainerBubble");
17
18
  const RenderModalHr_1 = require("./RenderModalHr");
18
19
  const ScaleSetting_1 = require("./ScaleSetting");
19
- const layout_2 = require("./layout");
20
20
  const qualityControlModes = ['crf', 'bitrate'];
21
21
  const container = {
22
22
  flex: 1,
@@ -6,6 +6,7 @@ const react_1 = require("react");
6
6
  const retry_payload_1 = require("../../helpers/retry-payload");
7
7
  const modals_1 = require("../../state/modals");
8
8
  const Button_1 = require("../Button");
9
+ const layout_1 = require("../layout");
9
10
  const is_menu_item_1 = require("../Menu/is-menu-item");
10
11
  const ModalContainer_1 = require("../ModalContainer");
11
12
  const ModalHeader_1 = require("../ModalHeader");
@@ -13,7 +14,6 @@ const NotificationCenter_1 = require("../Notifications/NotificationCenter");
13
14
  const actions_1 = require("../RenderQueue/actions");
14
15
  const client_side_render_types_1 = require("../RenderQueue/client-side-render-types");
15
16
  const context_1 = require("../RenderQueue/context");
16
- const layout_1 = require("../layout");
17
17
  const ClientRenderProgress_1 = require("./ClientRenderProgress");
18
18
  const GuiRenderStatus_1 = require("./GuiRenderStatus");
19
19
  const container = {
@@ -38,9 +38,9 @@ const jsx_runtime_1 = require("react/jsx-runtime");
38
38
  const react_1 = __importStar(require("react"));
39
39
  const remotion_1 = require("remotion");
40
40
  const colors_1 = require("../../helpers/colors");
41
+ const layout_1 = require("../layout");
41
42
  const styles_1 = require("../Menu/styles");
42
43
  const RunningCalculateMetadata_1 = require("../RunningCalculateMetadata");
43
- const layout_1 = require("../layout");
44
44
  const loaderContainer = {
45
45
  paddingTop: 40,
46
46
  paddingBottom: 40,
@@ -6,14 +6,14 @@ const react_1 = require("react");
6
6
  const remotion_1 = require("remotion");
7
7
  const document_title_1 = require("../../../helpers/document-title");
8
8
  const use_keybinding_1 = require("../../../helpers/use-keybinding");
9
- const is_menu_item_1 = require("../../Menu/is-menu-item");
10
9
  const get_zod_if_possible_1 = require("../../get-zod-if-possible");
11
- const SchemaErrorMessages_1 = require("./SchemaErrorMessages");
12
- const ZodObjectEditor_1 = require("./ZodObjectEditor");
10
+ const is_menu_item_1 = require("../../Menu/is-menu-item");
13
11
  const deep_equal_1 = require("./deep-equal");
14
12
  const local_state_1 = require("./local-state");
13
+ const SchemaErrorMessages_1 = require("./SchemaErrorMessages");
15
14
  const scroll_to_default_props_path_1 = require("./scroll-to-default-props-path");
16
15
  const zod_schema_type_1 = require("./zod-schema-type");
16
+ const ZodObjectEditor_1 = require("./ZodObjectEditor");
17
17
  const scrollable = {
18
18
  display: 'flex',
19
19
  flexDirection: 'column',
@@ -5,8 +5,8 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  // Schema error messages for studio editor
6
6
  const colors_1 = require("../../../helpers/colors");
7
7
  const Button_1 = require("../../Button");
8
- const styles_1 = require("../../Menu/styles");
9
8
  const layout_1 = require("../../layout");
9
+ const styles_1 = require("../../Menu/styles");
10
10
  const ZodErrorMessages_1 = require("./ZodErrorMessages");
11
11
  const explainer = {
12
12
  display: 'flex',
@@ -6,9 +6,9 @@ const react_1 = require("react");
6
6
  const colors_1 = require("../../../helpers/colors");
7
7
  const layout_1 = require("../../layout");
8
8
  const InlineRemoveButton_1 = require("../InlineRemoveButton");
9
+ const get_schema_label_1 = require("./get-schema-label");
9
10
  const SchemaResetButton_1 = require("./SchemaResetButton");
10
11
  const SchemaSaveButton_1 = require("./SchemaSaveButton");
11
- const get_schema_label_1 = require("./get-schema-label");
12
12
  const scroll_to_default_props_path_1 = require("./scroll-to-default-props-path");
13
13
  const compactStyles = {
14
14
  fontSize: 15,
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import type { UpdaterFunction } from './ZodSwitch';
3
2
  import type { AnyZodSchema } from './zod-schema-type';
4
3
  import type { JSONPath } from './zod-types';
4
+ import type { UpdaterFunction } from './ZodSwitch';
5
5
  export declare const ZodArrayEditor: React.FC<{
6
6
  readonly schema: AnyZodSchema;
7
7
  readonly jsonPath: JSONPath;
@@ -37,16 +37,16 @@ exports.ZodArrayEditor = void 0;
37
37
  const jsx_runtime_1 = require("react/jsx-runtime");
38
38
  const react_1 = __importStar(require("react"));
39
39
  const get_zod_if_possible_1 = require("../../get-zod-if-possible");
40
+ const create_zod_values_1 = require("./create-zod-values");
41
+ const deep_equal_1 = require("./deep-equal");
40
42
  const Fieldset_1 = require("./Fieldset");
43
+ const local_state_1 = require("./local-state");
41
44
  const SchemaLabel_1 = require("./SchemaLabel");
42
45
  const SchemaSeparationLine_1 = require("./SchemaSeparationLine");
43
46
  const SchemaVerticalGuide_1 = require("./SchemaVerticalGuide");
47
+ const zod_schema_type_1 = require("./zod-schema-type");
44
48
  const ZodArrayItemEditor_1 = require("./ZodArrayItemEditor");
45
49
  const ZodFieldValidation_1 = require("./ZodFieldValidation");
46
- const create_zod_values_1 = require("./create-zod-values");
47
- const deep_equal_1 = require("./deep-equal");
48
- const local_state_1 = require("./local-state");
49
- const zod_schema_type_1 = require("./zod-schema-type");
50
50
  const ZodArrayEditor = ({ schema, jsonPath, setValue, defaultValue, value, onSave, showSaveButton, onRemove, saving, saveDisabledByParent, mayPad, }) => {
51
51
  const { localValue, onChange, RevisionContextProvider, reset } = (0, local_state_1.useLocalState)({
52
52
  unsavedValue: value,
@@ -1,6 +1,6 @@
1
- import type { UpdaterFunction } from './ZodSwitch';
2
1
  import type { AnyZodSchema } from './zod-schema-type';
3
2
  import type { JSONPath } from './zod-types';
3
+ import type { UpdaterFunction } from './ZodSwitch';
4
4
  export declare const ZodArrayItemEditor: React.FC<{
5
5
  jsonPath: JSONPath;
6
6
  onChange: UpdaterFunction<unknown[]>;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import type { UpdaterFunction } from './ZodSwitch';
3
2
  import type { AnyZodSchema } from './zod-schema-type';
4
3
  import type { JSONPath } from './zod-types';
4
+ import type { UpdaterFunction } from './ZodSwitch';
5
5
  export declare const ZodBooleanEditor: React.FC<{
6
6
  readonly schema: AnyZodSchema;
7
7
  readonly jsonPath: JSONPath;
@@ -5,8 +5,8 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const Checkbox_1 = require("../../Checkbox");
7
7
  const Fieldset_1 = require("./Fieldset");
8
- const SchemaLabel_1 = require("./SchemaLabel");
9
8
  const local_state_1 = require("./local-state");
9
+ const SchemaLabel_1 = require("./SchemaLabel");
10
10
  const fullWidth = {
11
11
  width: '100%',
12
12
  };
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import type { UpdaterFunction } from './ZodSwitch';
3
2
  import type { AnyZodSchema } from './zod-schema-type';
4
3
  import type { JSONPath } from './zod-types';
4
+ import type { UpdaterFunction } from './ZodSwitch';
5
5
  export declare const ZodColorEditor: React.FC<{
6
6
  readonly schema: AnyZodSchema;
7
7
  readonly jsonPath: JSONPath;
@@ -4,15 +4,15 @@ exports.ZodColorEditor = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const color_math_1 = require("../../../helpers/color-math");
7
+ const get_zod_if_possible_1 = require("../../get-zod-if-possible");
8
+ const layout_1 = require("../../layout");
7
9
  const InputDragger_1 = require("../../NewComposition/InputDragger");
8
10
  const RemInput_1 = require("../../NewComposition/RemInput");
9
11
  const RemInputTypeColor_1 = require("../../NewComposition/RemInputTypeColor");
10
- const get_zod_if_possible_1 = require("../../get-zod-if-possible");
11
- const layout_1 = require("../../layout");
12
12
  const Fieldset_1 = require("./Fieldset");
13
+ const local_state_1 = require("./local-state");
13
14
  const SchemaLabel_1 = require("./SchemaLabel");
14
15
  const ZodFieldValidation_1 = require("./ZodFieldValidation");
15
- const local_state_1 = require("./local-state");
16
16
  const fullWidth = {
17
17
  width: '100%',
18
18
  };
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import type { UpdaterFunction } from './ZodSwitch';
3
2
  import type { AnyZodSchema } from './zod-schema-type';
4
3
  import type { JSONPath } from './zod-types';
4
+ import type { UpdaterFunction } from './ZodSwitch';
5
5
  export declare const ZodDateEditor: React.FC<{
6
6
  readonly schema: AnyZodSchema;
7
7
  readonly jsonPath: JSONPath;
@@ -4,12 +4,12 @@ exports.ZodDateEditor = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const colors_1 = require("../../../helpers/colors");
7
- const RemInput_1 = require("../../NewComposition/RemInput");
8
7
  const layout_1 = require("../../layout");
8
+ const RemInput_1 = require("../../NewComposition/RemInput");
9
9
  const Fieldset_1 = require("./Fieldset");
10
+ const local_state_1 = require("./local-state");
10
11
  const SchemaLabel_1 = require("./SchemaLabel");
11
12
  const ZodFieldValidation_1 = require("./ZodFieldValidation");
12
- const local_state_1 = require("./local-state");
13
13
  const fullWidth = {
14
14
  width: '100%',
15
15
  };
@@ -1,6 +1,6 @@
1
- import type { UpdaterFunction } from './ZodSwitch';
2
1
  import type { AnyZodSchema } from './zod-schema-type';
3
2
  import type { JSONPath } from './zod-types';
3
+ import type { UpdaterFunction } from './ZodSwitch';
4
4
  export declare const ZodDiscriminatedUnionEditor: React.FC<{
5
5
  schema: AnyZodSchema;
6
6
  setValue: UpdaterFunction<Record<string, unknown>>;
@@ -4,14 +4,14 @@ exports.ZodDiscriminatedUnionEditor = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const Checkmark_1 = require("../../../icons/Checkmark");
7
- const ComboBox_1 = require("../../NewComposition/ComboBox");
8
7
  const get_zod_if_possible_1 = require("../../get-zod-if-possible");
9
- const Fieldset_1 = require("./Fieldset");
10
- const SchemaLabel_1 = require("./SchemaLabel");
11
- const ZodObjectEditor_1 = require("./ZodObjectEditor");
8
+ const ComboBox_1 = require("../../NewComposition/ComboBox");
12
9
  const create_zod_values_1 = require("./create-zod-values");
10
+ const Fieldset_1 = require("./Fieldset");
13
11
  const local_state_1 = require("./local-state");
12
+ const SchemaLabel_1 = require("./SchemaLabel");
14
13
  const zod_schema_type_1 = require("./zod-schema-type");
14
+ const ZodObjectEditor_1 = require("./ZodObjectEditor");
15
15
  const ZodDiscriminatedUnionEditor = ({ schema, setValue, showSaveButton, saving, value, defaultValue, saveDisabledByParent, onSave, mayPad, jsonPath, onRemove, }) => {
16
16
  const z = (0, get_zod_if_possible_1.useZodIfPossible)();
17
17
  if (!z) {
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import type { UpdaterFunction } from './ZodSwitch';
3
2
  import type { AnyZodSchema } from './zod-schema-type';
4
3
  import type { JSONPath } from './zod-types';
4
+ import type { UpdaterFunction } from './ZodSwitch';
5
5
  export declare const ZodEffectEditor: React.FC<{
6
6
  readonly schema: AnyZodSchema;
7
7
  readonly jsonPath: JSONPath;
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ZodEffectEditor = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const Fieldset_1 = require("./Fieldset");
6
- const ZodFieldValidation_1 = require("./ZodFieldValidation");
7
- const ZodSwitch_1 = require("./ZodSwitch");
8
6
  const local_state_1 = require("./local-state");
9
7
  const zod_schema_type_1 = require("./zod-schema-type");
8
+ const ZodFieldValidation_1 = require("./ZodFieldValidation");
9
+ const ZodSwitch_1 = require("./ZodSwitch");
10
10
  const fullWidth = {
11
11
  width: '100%',
12
12
  };
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import type { UpdaterFunction } from './ZodSwitch';
3
2
  import type { AnyZodSchema } from './zod-schema-type';
4
3
  import type { JSONPath } from './zod-types';
4
+ import type { UpdaterFunction } from './ZodSwitch';
5
5
  export declare const ZodEnumEditor: React.FC<{
6
6
  readonly schema: AnyZodSchema;
7
7
  readonly jsonPath: JSONPath;
@@ -6,10 +6,10 @@ const react_1 = require("react");
6
6
  const Checkmark_1 = require("../../../icons/Checkmark");
7
7
  const ComboBox_1 = require("../../NewComposition/ComboBox");
8
8
  const Fieldset_1 = require("./Fieldset");
9
- const SchemaLabel_1 = require("./SchemaLabel");
10
- const ZodFieldValidation_1 = require("./ZodFieldValidation");
11
9
  const local_state_1 = require("./local-state");
10
+ const SchemaLabel_1 = require("./SchemaLabel");
12
11
  const zod_schema_type_1 = require("./zod-schema-type");
12
+ const ZodFieldValidation_1 = require("./ZodFieldValidation");
13
13
  const container = {
14
14
  width: '100%',
15
15
  };
@@ -4,8 +4,8 @@ exports.ZodErrorMessages = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const colors_1 = require("../../../helpers/colors");
7
- const ValidationMessage_1 = require("../../NewComposition/ValidationMessage");
8
7
  const layout_1 = require("../../layout");
8
+ const ValidationMessage_1 = require("../../NewComposition/ValidationMessage");
9
9
  const schemaLabel = {
10
10
  fontSize: 14,
11
11
  color: colors_1.LIGHT_TEXT,
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import type { UpdaterFunction } from './ZodSwitch';
3
2
  import type { AnyZodSchema } from './zod-schema-type';
4
3
  import type { JSONPath } from './zod-types';
4
+ import type { UpdaterFunction } from './ZodSwitch';
5
5
  export declare const ZodMatrixEditor: React.FC<{
6
6
  readonly schema: AnyZodSchema;
7
7
  readonly jsonPath: JSONPath;
@@ -37,16 +37,16 @@ exports.ZodMatrixEditor = void 0;
37
37
  const jsx_runtime_1 = require("react/jsx-runtime");
38
38
  const react_1 = __importStar(require("react"));
39
39
  const get_zod_if_possible_1 = require("../../get-zod-if-possible");
40
+ const create_zod_values_1 = require("./create-zod-values");
41
+ const deep_equal_1 = require("./deep-equal");
40
42
  const Fieldset_1 = require("./Fieldset");
43
+ const local_state_1 = require("./local-state");
41
44
  const SchemaLabel_1 = require("./SchemaLabel");
42
45
  const SchemaSeparationLine_1 = require("./SchemaSeparationLine");
43
46
  const SchemaVerticalGuide_1 = require("./SchemaVerticalGuide");
47
+ const zod_schema_type_1 = require("./zod-schema-type");
44
48
  const ZodArrayItemEditor_1 = require("./ZodArrayItemEditor");
45
49
  const ZodFieldValidation_1 = require("./ZodFieldValidation");
46
- const create_zod_values_1 = require("./create-zod-values");
47
- const deep_equal_1 = require("./deep-equal");
48
- const local_state_1 = require("./local-state");
49
- const zod_schema_type_1 = require("./zod-schema-type");
50
50
  const rowStyle = {
51
51
  display: 'flex',
52
52
  flexDirection: 'row',
@@ -1,6 +1,6 @@
1
- import type { UpdaterFunction } from './ZodSwitch';
2
1
  import type { AnyZodSchema } from './zod-schema-type';
3
2
  import type { JSONPath } from './zod-types';
3
+ import type { UpdaterFunction } from './ZodSwitch';
4
4
  export declare const ZodNullableEditor: React.FC<{
5
5
  showSaveButton: boolean;
6
6
  jsonPath: JSONPath;
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ZodNullableEditor = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const ZodOrNullishEditor_1 = require("./ZodOrNullishEditor");
6
5
  const zod_schema_type_1 = require("./zod-schema-type");
6
+ const ZodOrNullishEditor_1 = require("./ZodOrNullishEditor");
7
7
  const ZodNullableEditor = ({ jsonPath, schema, setValue, onSave, defaultValue, value, showSaveButton, onRemove, saving, saveDisabledByParent, mayPad, }) => {
8
8
  const innerType = (0, zod_schema_type_1.getInnerType)(schema);
9
9
  return (jsx_runtime_1.jsx(ZodOrNullishEditor_1.ZodOrNullishEditor, { defaultValue: defaultValue, jsonPath: jsonPath, onRemove: onRemove, onSave: onSave, schema: schema, innerSchema: innerType, setValue: setValue, showSaveButton: showSaveButton, value: value, nullishValue: null, saving: saving, saveDisabledByParent: saveDisabledByParent, mayPad: mayPad }));
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import type { UpdaterFunction } from './ZodSwitch';
3
2
  import type { AnyZodSchema } from './zod-schema-type';
4
3
  import type { JSONPath } from './zod-types';
4
+ import type { UpdaterFunction } from './ZodSwitch';
5
5
  export declare const ZodNumberEditor: React.FC<{
6
6
  readonly schema: AnyZodSchema;
7
7
  readonly jsonPath: JSONPath;
@@ -5,76 +5,13 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const InputDragger_1 = require("../../NewComposition/InputDragger");
7
7
  const Fieldset_1 = require("./Fieldset");
8
+ const local_state_1 = require("./local-state");
8
9
  const SchemaLabel_1 = require("./SchemaLabel");
10
+ const zod_number_constraints_1 = require("./zod-number-constraints");
9
11
  const ZodFieldValidation_1 = require("./ZodFieldValidation");
10
- const local_state_1 = require("./local-state");
11
- const zod_schema_type_1 = require("./zod-schema-type");
12
12
  const fullWidth = {
13
13
  width: '100%',
14
14
  };
15
- const getMinValue = (schema) => {
16
- var _a;
17
- const { checks } = (0, zod_schema_type_1.getZodDef)(schema);
18
- if (!checks)
19
- return -Infinity;
20
- if ((0, zod_schema_type_1.isZodV3Schema)(schema)) {
21
- // v3: {kind: "min", value: 0, inclusive: true}
22
- const minCheck = checks.find((c) => c.kind === 'min');
23
- if (!minCheck || !minCheck.inclusive)
24
- return -Infinity;
25
- return minCheck.value;
26
- }
27
- // v4: check objects with _zod.def = {check: "greater_than", value: 0, inclusive: true}
28
- for (const c of checks) {
29
- const def = (_a = c._zod) === null || _a === void 0 ? void 0 : _a.def;
30
- if ((def === null || def === void 0 ? void 0 : def.check) === 'greater_than' && def.inclusive) {
31
- return def.value;
32
- }
33
- }
34
- return -Infinity;
35
- };
36
- const getMaxValue = (schema) => {
37
- var _a;
38
- const { checks } = (0, zod_schema_type_1.getZodDef)(schema);
39
- if (!checks)
40
- return Infinity;
41
- if ((0, zod_schema_type_1.isZodV3Schema)(schema)) {
42
- // v3: {kind: "max", value: 100, inclusive: true}
43
- const maxCheck = checks.find((c) => c.kind === 'max');
44
- if (!maxCheck || !maxCheck.inclusive)
45
- return Infinity;
46
- return maxCheck.value;
47
- }
48
- // v4: check objects with _zod.def = {check: "less_than", value: 100, inclusive: true}
49
- for (const c of checks) {
50
- const def = (_a = c._zod) === null || _a === void 0 ? void 0 : _a.def;
51
- if ((def === null || def === void 0 ? void 0 : def.check) === 'less_than' && def.inclusive) {
52
- return def.value;
53
- }
54
- }
55
- return Infinity;
56
- };
57
- const getStep = (schema) => {
58
- var _a;
59
- const { checks } = (0, zod_schema_type_1.getZodDef)(schema);
60
- if (!checks)
61
- return undefined;
62
- if ((0, zod_schema_type_1.isZodV3Schema)(schema)) {
63
- // v3: {kind: "multipleOf", value: 5}
64
- const multipleStep = checks.find((c) => c.kind === 'multipleOf');
65
- if (!multipleStep)
66
- return undefined;
67
- return multipleStep.value;
68
- }
69
- // v4: check objects with _zod.def = {check: "multiple_of", value: 5}
70
- for (const c of checks) {
71
- const def = (_a = c._zod) === null || _a === void 0 ? void 0 : _a.def;
72
- if ((def === null || def === void 0 ? void 0 : def.check) === 'multiple_of') {
73
- return def.value;
74
- }
75
- }
76
- return undefined;
77
- };
78
15
  const ZodNumberEditor = ({ jsonPath, value, schema, setValue, onSave, defaultValue, onRemove, showSaveButton, saving, saveDisabledByParent, mayPad, }) => {
79
16
  const { localValue, onChange: setLocalValue, reset, } = (0, local_state_1.useLocalState)({
80
17
  unsavedValue: value,
@@ -94,7 +31,7 @@ const ZodNumberEditor = ({ jsonPath, value, schema, setValue, onSave, defaultVal
94
31
  }, [onSave, value]);
95
32
  return (jsx_runtime_1.jsxs(Fieldset_1.Fieldset, { shouldPad: mayPad, success: localValue.zodValidation.success, children: [
96
33
  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 }), jsx_runtime_1.jsxs("div", { style: fullWidth, children: [
97
- 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 }), jsx_runtime_1.jsx(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, localValue: localValue })
34
+ 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: (0, zod_number_constraints_1.getZodNumberMinimum)(schema), max: (0, zod_number_constraints_1.getZodNumberMaximum)(schema), step: (0, zod_number_constraints_1.getZodNumberStep)(schema), rightAlign: false }), jsx_runtime_1.jsx(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, localValue: localValue })
98
35
  ] })
99
36
  ] }));
100
37
  };
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import type { UpdaterFunction } from './ZodSwitch';
3
2
  import type { AnyZodSchema } from './zod-schema-type';
4
3
  import type { JSONPath } from './zod-types';
4
+ import type { UpdaterFunction } from './ZodSwitch';
5
5
  export type ObjectDiscrimatedUnionReplacement = {
6
6
  discriminator: string;
7
7
  markup: React.ReactNode;
@@ -37,14 +37,14 @@ exports.ZodObjectEditor = void 0;
37
37
  const jsx_runtime_1 = require("react/jsx-runtime");
38
38
  const react_1 = __importStar(require("react"));
39
39
  const layout_1 = require("../layout");
40
+ const deep_equal_1 = require("./deep-equal");
40
41
  const Fieldset_1 = require("./Fieldset");
42
+ const local_state_1 = require("./local-state");
41
43
  const SchemaLabel_1 = require("./SchemaLabel");
42
44
  const SchemaSeparationLine_1 = require("./SchemaSeparationLine");
43
45
  const SchemaVerticalGuide_1 = require("./SchemaVerticalGuide");
44
- const ZodSwitch_1 = require("./ZodSwitch");
45
- const deep_equal_1 = require("./deep-equal");
46
- const local_state_1 = require("./local-state");
47
46
  const zod_schema_type_1 = require("./zod-schema-type");
47
+ const ZodSwitch_1 = require("./ZodSwitch");
48
48
  const ZodObjectEditor = ({ schema, jsonPath, setValue, unsavedValue, savedValue, onSave, showSaveButton, onRemove, saving, saveDisabledByParent, mayPad, discriminatedUnionReplacement, }) => {
49
49
  const [expanded, setExpanded] = (0, react_1.useState)(true);
50
50
  const { localValue, onChange, RevisionContextProvider, reset } = (0, local_state_1.useLocalState)({
@@ -1,6 +1,6 @@
1
- import type { UpdaterFunction } from './ZodSwitch';
2
1
  import type { AnyZodSchema } from './zod-schema-type';
3
2
  import type { JSONPath } from './zod-types';
3
+ import type { UpdaterFunction } from './ZodSwitch';
4
4
  export declare const ZodOptionalEditor: React.FC<{
5
5
  showSaveButton: boolean;
6
6
  jsonPath: JSONPath;
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ZodOptionalEditor = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const ZodOrNullishEditor_1 = require("./ZodOrNullishEditor");
6
5
  const zod_schema_type_1 = require("./zod-schema-type");
6
+ const ZodOrNullishEditor_1 = require("./ZodOrNullishEditor");
7
7
  const ZodOptionalEditor = ({ jsonPath, schema, setValue, onSave, defaultValue, value, showSaveButton, onRemove, saving, saveDisabledByParent, mayPad, }) => {
8
8
  const innerType = (0, zod_schema_type_1.getInnerType)(schema);
9
9
  return (jsx_runtime_1.jsx(ZodOrNullishEditor_1.ZodOrNullishEditor, { defaultValue: defaultValue, jsonPath: jsonPath, onRemove: onRemove, onSave: onSave, schema: schema, setValue: setValue, showSaveButton: showSaveButton, value: value, nullishValue: undefined, saving: saving, saveDisabledByParent: saveDisabledByParent, mayPad: mayPad, innerSchema: innerType }));
@@ -1,6 +1,6 @@
1
- import type { UpdaterFunction } from './ZodSwitch';
2
1
  import type { AnyZodSchema } from './zod-schema-type';
3
2
  import type { JSONPath } from './zod-types';
3
+ import type { UpdaterFunction } from './ZodSwitch';
4
4
  export declare const ZodOrNullishEditor: React.FC<{
5
5
  showSaveButton: boolean;
6
6
  jsonPath: JSONPath;
@@ -7,11 +7,11 @@ const colors_1 = require("../../../helpers/colors");
7
7
  const Checkbox_1 = require("../../Checkbox");
8
8
  const get_zod_if_possible_1 = require("../../get-zod-if-possible");
9
9
  const layout_1 = require("../../layout");
10
+ const create_zod_values_1 = require("./create-zod-values");
10
11
  const Fieldset_1 = require("./Fieldset");
12
+ const local_state_1 = require("./local-state");
11
13
  const SchemaLabel_1 = require("./SchemaLabel");
12
14
  const ZodSwitch_1 = require("./ZodSwitch");
13
- const create_zod_values_1 = require("./create-zod-values");
14
- const local_state_1 = require("./local-state");
15
15
  const labelStyle = {
16
16
  fontFamily: 'sans-serif',
17
17
  fontSize: 14,
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import type { UpdaterFunction } from './ZodSwitch';
3
2
  import type { AnyZodSchema } from './zod-schema-type';
4
3
  import type { JSONPath } from './zod-types';
4
+ import type { UpdaterFunction } from './ZodSwitch';
5
5
  export declare const ZodStaticFileEditor: React.FC<{
6
6
  readonly schema: AnyZodSchema;
7
7
  readonly jsonPath: JSONPath;
@@ -7,9 +7,9 @@ const Checkmark_1 = require("../../../icons/Checkmark");
7
7
  const ComboBox_1 = require("../../NewComposition/ComboBox");
8
8
  const use_static_files_1 = require("../../use-static-files");
9
9
  const Fieldset_1 = require("./Fieldset");
10
+ const local_state_1 = require("./local-state");
10
11
  const SchemaLabel_1 = require("./SchemaLabel");
11
12
  const ZodFieldValidation_1 = require("./ZodFieldValidation");
12
- const local_state_1 = require("./local-state");
13
13
  const container = {
14
14
  width: '100%',
15
15
  };
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import type { UpdaterFunction } from './ZodSwitch';
3
2
  import type { AnyZodSchema } from './zod-schema-type';
4
3
  import type { JSONPath } from './zod-types';
4
+ import type { UpdaterFunction } from './ZodSwitch';
5
5
  export declare const ZodStringEditor: React.FC<{
6
6
  readonly schema: AnyZodSchema;
7
7
  readonly jsonPath: JSONPath;
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ZodStringEditor = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
- const RemInput_1 = require("../../NewComposition/RemInput");
7
6
  const get_zod_if_possible_1 = require("../../get-zod-if-possible");
7
+ const RemInput_1 = require("../../NewComposition/RemInput");
8
8
  const Fieldset_1 = require("./Fieldset");
9
+ const local_state_1 = require("./local-state");
9
10
  const SchemaLabel_1 = require("./SchemaLabel");
10
11
  const ZodFieldValidation_1 = require("./ZodFieldValidation");
11
- const local_state_1 = require("./local-state");
12
12
  const fullWidth = {
13
13
  width: '100%',
14
14
  };
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import type { UpdaterFunction } from './ZodSwitch';
3
2
  import type { AnyZodSchema } from './zod-schema-type';
4
3
  import type { JSONPath } from './zod-types';
4
+ import type { UpdaterFunction } from './ZodSwitch';
5
5
  export declare const ZodTextareaEditor: React.FC<{
6
6
  readonly schema: AnyZodSchema;
7
7
  readonly jsonPath: JSONPath;