@remotion/studio 4.0.438 → 4.0.440
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Studio.js +2 -2
- package/dist/api/helpers/calc-new-props.js +5 -8
- package/dist/api/update-default-props.d.ts +7 -3
- package/dist/api/update-default-props.js +7 -21
- package/dist/api/visual-control.js +6 -0
- package/dist/components/DefaultPropsEditor.d.ts +8 -0
- package/dist/components/DefaultPropsEditor.js +15 -0
- package/dist/components/Editor.js +0 -14
- package/dist/components/EditorContexts.js +6 -3
- package/dist/components/KeyboardShortcutsExplainer.js +6 -2
- package/dist/components/MenuBuildIndicator.js +1 -0
- package/dist/components/MenuToolbar.js +3 -1
- package/dist/components/NewComposition/InputDragger.js +2 -2
- package/dist/components/NewComposition/RemTextarea.js +4 -0
- package/dist/components/ObserveDefaultPropsContext.d.ts +11 -0
- package/dist/components/ObserveDefaultPropsContext.js +120 -0
- package/dist/components/OptionsPanel.js +90 -28
- package/dist/components/RenderModal/CrfSetting.d.ts +1 -1
- package/dist/components/RenderModal/DataEditor.d.ts +4 -5
- package/dist/components/RenderModal/DataEditor.js +9 -111
- package/dist/components/RenderModal/RenderModalJSONPropsEditor.d.ts +1 -1
- package/dist/components/RenderModal/RenderModalJSONPropsEditor.js +52 -48
- package/dist/components/RenderModal/SchemaEditor/Fieldset.d.ts +0 -1
- package/dist/components/RenderModal/SchemaEditor/SchemaEditor.d.ts +4 -9
- package/dist/components/RenderModal/SchemaEditor/SchemaEditor.js +2 -61
- package/dist/components/RenderModal/SchemaEditor/SchemaErrorMessages.d.ts +0 -1
- package/dist/components/RenderModal/SchemaEditor/SchemaErrorMessages.js +2 -3
- package/dist/components/RenderModal/SchemaEditor/SchemaLabel.d.ts +0 -6
- package/dist/components/RenderModal/SchemaEditor/SchemaLabel.js +2 -5
- package/dist/components/RenderModal/SchemaEditor/SchemaSeparationLine.d.ts +3 -1
- package/dist/components/RenderModal/SchemaEditor/SchemaSeparationLine.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodArrayEditor.d.ts +1 -6
- package/dist/components/RenderModal/SchemaEditor/ZodArrayEditor.js +15 -26
- package/dist/components/RenderModal/SchemaEditor/ZodArrayItemEditor.d.ts +0 -5
- package/dist/components/RenderModal/SchemaEditor/ZodArrayItemEditor.js +7 -12
- package/dist/components/RenderModal/SchemaEditor/ZodBooleanEditor.d.ts +0 -7
- package/dist/components/RenderModal/SchemaEditor/ZodBooleanEditor.js +5 -15
- package/dist/components/RenderModal/SchemaEditor/ZodColorEditor.d.ts +1 -6
- package/dist/components/RenderModal/SchemaEditor/ZodColorEditor.js +30 -28
- package/dist/components/RenderModal/SchemaEditor/ZodDateEditor.d.ts +1 -6
- package/dist/components/RenderModal/SchemaEditor/ZodDateEditor.js +13 -17
- package/dist/components/RenderModal/SchemaEditor/ZodDefaultEditor.d.ts +0 -5
- package/dist/components/RenderModal/SchemaEditor/ZodDefaultEditor.js +2 -2
- package/dist/components/RenderModal/SchemaEditor/ZodDiscriminatedUnionEditor.d.ts +1 -6
- package/dist/components/RenderModal/SchemaEditor/ZodDiscriminatedUnionEditor.js +13 -28
- package/dist/components/RenderModal/SchemaEditor/ZodEffectEditor.d.ts +1 -5
- package/dist/components/RenderModal/SchemaEditor/ZodEffectEditor.js +11 -12
- package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.d.ts +1 -5
- package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.js +12 -16
- package/dist/components/RenderModal/SchemaEditor/ZodFieldValidation.d.ts +2 -2
- package/dist/components/RenderModal/SchemaEditor/ZodFieldValidation.js +1 -2
- package/dist/components/RenderModal/SchemaEditor/ZodMatrixEditor.d.ts +1 -6
- package/dist/components/RenderModal/SchemaEditor/ZodMatrixEditor.js +20 -30
- package/dist/components/RenderModal/SchemaEditor/ZodNonEditableValue.d.ts +0 -2
- package/dist/components/RenderModal/SchemaEditor/ZodNonEditableValue.js +3 -6
- package/dist/components/RenderModal/SchemaEditor/ZodNullableEditor.d.ts +0 -5
- package/dist/components/RenderModal/SchemaEditor/ZodNullableEditor.js +2 -2
- package/dist/components/RenderModal/SchemaEditor/ZodNumberEditor.d.ts +1 -6
- package/dist/components/RenderModal/SchemaEditor/ZodNumberEditor.js +16 -21
- package/dist/components/RenderModal/SchemaEditor/ZodObjectEditor.d.ts +2 -7
- package/dist/components/RenderModal/SchemaEditor/ZodObjectEditor.js +27 -49
- package/dist/components/RenderModal/SchemaEditor/ZodOptionalEditor.d.ts +0 -5
- package/dist/components/RenderModal/SchemaEditor/ZodOptionalEditor.js +2 -2
- package/dist/components/RenderModal/SchemaEditor/ZodOrNullishEditor.d.ts +1 -6
- package/dist/components/RenderModal/SchemaEditor/ZodOrNullishEditor.js +8 -15
- package/dist/components/RenderModal/SchemaEditor/ZodStaticFileEditor.d.ts +1 -6
- package/dist/components/RenderModal/SchemaEditor/ZodStaticFileEditor.js +10 -15
- package/dist/components/RenderModal/SchemaEditor/ZodStringEditor.d.ts +1 -6
- package/dist/components/RenderModal/SchemaEditor/ZodStringEditor.js +13 -17
- package/dist/components/RenderModal/SchemaEditor/ZodSwitch.d.ts +3 -6
- package/dist/components/RenderModal/SchemaEditor/ZodSwitch.js +27 -27
- package/dist/components/RenderModal/SchemaEditor/ZodTextareaEditor.d.ts +0 -5
- package/dist/components/RenderModal/SchemaEditor/ZodTextareaEditor.js +45 -17
- package/dist/components/RenderModal/SchemaEditor/ZodTupleEditor.d.ts +1 -6
- package/dist/components/RenderModal/SchemaEditor/ZodTupleEditor.js +15 -26
- package/dist/components/RenderModal/SchemaEditor/ZodTupleItemEditor.d.ts +0 -5
- package/dist/components/RenderModal/SchemaEditor/ZodTupleItemEditor.js +4 -11
- package/dist/components/RenderModal/SchemaEditor/ZodUnionEditor.d.ts +0 -5
- package/dist/components/RenderModal/SchemaEditor/ZodUnionEditor.js +6 -6
- package/dist/components/RenderModal/ServerRenderModal.js +9 -3
- package/dist/components/RenderModal/WebRenderModal.js +9 -3
- package/dist/components/RenderModal/get-default-codecs.d.ts +5 -5
- package/dist/components/RenderModal/get-render-modal-warnings.d.ts +1 -2
- package/dist/components/RenderModal/get-render-modal-warnings.js +4 -6
- package/dist/components/RenderModal/human-readable-codec.d.ts +1 -1
- package/dist/components/RenderModal/human-readable-codec.js +3 -0
- package/dist/components/RenderModal/out-name-checker.d.ts +1 -1
- package/dist/components/RenderQueue/actions.d.ts +2 -3
- package/dist/components/RenderQueue/actions.js +1 -13
- package/dist/components/Timeline/Timeline.js +1 -1
- package/dist/components/Timeline/TimelineExpandedSection.js +7 -1
- package/dist/components/Timeline/TimelineFieldRow.d.ts +1 -0
- package/dist/components/Timeline/TimelineFieldRow.js +25 -3
- package/dist/components/Timeline/TimelineImageInfo.d.ts +5 -0
- package/dist/components/Timeline/TimelineImageInfo.js +61 -0
- package/dist/components/Timeline/TimelineListItem.js +1 -2
- package/dist/components/Timeline/TimelineNumberField.js +4 -6
- package/dist/components/Timeline/TimelineRotationField.js +4 -6
- package/dist/components/Timeline/TimelineSequence.js +9 -4
- package/dist/components/Timeline/TimelineStack/index.js +3 -1
- package/dist/components/Timeline/TimelineTracks.js +1 -1
- package/dist/components/Timeline/TimelineTranslateField.js +28 -13
- package/dist/components/TopPanel.js +10 -5
- package/dist/components/UndoRedoButtons.d.ts +2 -0
- package/dist/components/UndoRedoButtons.js +116 -0
- package/dist/components/VisualControls/VisualControlHandle.js +18 -18
- package/dist/components/VisualControls/VisualControlsUndoSync.d.ts +2 -0
- package/dist/components/VisualControls/VisualControlsUndoSync.js +23 -0
- package/dist/error-overlay/react-overlay/listen-to-runtime-errors.js +0 -1
- package/dist/esm/{chunk-ba0scebn.js → chunk-1x2ychmc.js} +4466 -5252
- package/dist/esm/index.mjs +25 -28
- package/dist/esm/internals.mjs +4466 -5252
- package/dist/esm/previewEntry.mjs +4652 -5497
- package/dist/esm/renderEntry.mjs +6 -6
- package/dist/helpers/client-id.js +13 -1
- package/dist/helpers/document-title.d.ts +0 -1
- package/dist/helpers/document-title.js +1 -17
- package/dist/helpers/render-modal-sections.d.ts +1 -1
- package/dist/helpers/timeline-layout.d.ts +1 -1
- package/dist/helpers/timeline-layout.js +1 -1
- package/dist/hot-middleware-client/client.d.ts +1 -6
- package/dist/hot-middleware-client/client.js +22 -73
- package/dist/hot-middleware-client/process-update.d.ts +0 -2
- package/dist/hot-middleware-client/process-update.js +6 -14
- package/dist/icons/redo.d.ts +3 -0
- package/dist/icons/redo.js +8 -0
- package/dist/icons/undo.d.ts +3 -0
- package/dist/icons/undo.js +8 -0
- package/dist/renderEntry.js +7 -6
- package/dist/visual-controls/VisualControls.js +9 -5
- package/dist/visual-controls/get-current-edited-value.js +5 -4
- package/dist/visual-controls/visual-control-store.d.ts +7 -0
- package/dist/visual-controls/visual-control-store.js +22 -0
- package/package.json +9 -9
- package/dist/components/GlobalPropsEditorUpdateButton.d.ts +0 -5
- package/dist/components/GlobalPropsEditorUpdateButton.js +0 -78
- package/dist/components/RenderModal/SchemaEditor/SchemaSaveButton.d.ts +0 -5
- package/dist/components/RenderModal/SchemaEditor/SchemaSaveButton.js +0 -18
- package/dist/components/RenderModal/SchemaEditor/local-state.d.ts +0 -25
- package/dist/components/RenderModal/SchemaEditor/local-state.js +0 -107
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { AnyZodSchema } from './zod-schema-type';
|
|
3
3
|
import type { JSONPath } from './zod-types';
|
|
4
|
-
export type UpdaterFunction<T> = (updater: (oldValue: T) => T,
|
|
4
|
+
export type UpdaterFunction<T> = (updater: (oldValue: T) => T, { shouldSave }: {
|
|
5
|
+
shouldSave: boolean;
|
|
6
|
+
}) => void;
|
|
5
7
|
export declare const ZodSwitch: React.FC<{
|
|
6
8
|
readonly schema: AnyZodSchema;
|
|
7
9
|
readonly jsonPath: JSONPath;
|
|
8
10
|
readonly value: unknown;
|
|
9
|
-
readonly defaultValue: unknown;
|
|
10
11
|
readonly setValue: UpdaterFunction<unknown>;
|
|
11
|
-
readonly onSave: UpdaterFunction<unknown>;
|
|
12
|
-
readonly showSaveButton: boolean;
|
|
13
12
|
readonly onRemove: null | (() => void);
|
|
14
|
-
readonly saving: boolean;
|
|
15
|
-
readonly saveDisabledByParent: boolean;
|
|
16
13
|
readonly mayPad: boolean;
|
|
17
14
|
}>;
|
|
@@ -23,94 +23,94 @@ const ZodStringEditor_1 = require("./ZodStringEditor");
|
|
|
23
23
|
const ZodTextareaEditor_1 = require("./ZodTextareaEditor");
|
|
24
24
|
const ZodTupleEditor_1 = require("./ZodTupleEditor");
|
|
25
25
|
const ZodUnionEditor_1 = require("./ZodUnionEditor");
|
|
26
|
-
const ZodSwitch = ({ schema, jsonPath, value, setValue,
|
|
26
|
+
const ZodSwitch = ({ schema, jsonPath, value, setValue, onRemove, mayPad }) => {
|
|
27
27
|
const typeName = (0, zod_schema_type_1.getZodSchemaType)(schema);
|
|
28
28
|
const description = (0, zod_schema_type_1.getZodSchemaDescription)(schema);
|
|
29
29
|
const zodTypes = (0, get_zod_if_possible_1.useZodTypesIfPossible)();
|
|
30
30
|
if (typeName === 'object') {
|
|
31
|
-
return (jsx_runtime_1.jsx(ZodObjectEditor_1.ZodObjectEditor, { setValue: setValue,
|
|
31
|
+
return (jsx_runtime_1.jsx(ZodObjectEditor_1.ZodObjectEditor, { setValue: setValue, value: value, jsonPath: jsonPath, schema: schema, onRemove: onRemove, mayPad: mayPad, discriminatedUnionReplacement: null }));
|
|
32
32
|
}
|
|
33
33
|
if (typeName === 'string') {
|
|
34
34
|
// In v4, .refine() doesn't wrap in ZodEffects, so check brand here too
|
|
35
35
|
if (zodTypes &&
|
|
36
36
|
description === zodTypes.ZodZypesInternals.REMOTION_COLOR_BRAND) {
|
|
37
|
-
return (jsx_runtime_1.jsx(ZodColorEditor_1.ZodColorEditor, { value: value, setValue: setValue, jsonPath: jsonPath, schema: schema,
|
|
37
|
+
return (jsx_runtime_1.jsx(ZodColorEditor_1.ZodColorEditor, { value: value, setValue: setValue, jsonPath: jsonPath, schema: schema, onRemove: onRemove, mayPad: mayPad }));
|
|
38
38
|
}
|
|
39
39
|
if (value.startsWith(window.remotion_staticBase)) {
|
|
40
|
-
return (jsx_runtime_1.jsx(ZodStaticFileEditor_1.ZodStaticFileEditor, { setValue: setValue, value: value, jsonPath: jsonPath, schema: schema,
|
|
40
|
+
return (jsx_runtime_1.jsx(ZodStaticFileEditor_1.ZodStaticFileEditor, { setValue: setValue, value: value, jsonPath: jsonPath, schema: schema, onRemove: onRemove, mayPad: mayPad }));
|
|
41
41
|
}
|
|
42
42
|
if (zodTypes &&
|
|
43
43
|
description === zodTypes.ZodZypesInternals.REMOTION_TEXTAREA_BRAND) {
|
|
44
|
-
return (jsx_runtime_1.jsx(ZodTextareaEditor_1.ZodTextareaEditor, { value: value, setValue: setValue, jsonPath: jsonPath, schema: schema,
|
|
44
|
+
return (jsx_runtime_1.jsx(ZodTextareaEditor_1.ZodTextareaEditor, { value: value, setValue: setValue, jsonPath: jsonPath, schema: schema, onRemove: onRemove, mayPad: mayPad }));
|
|
45
45
|
}
|
|
46
|
-
return (jsx_runtime_1.jsx(ZodStringEditor_1.ZodStringEditor, { value: value, setValue: setValue, jsonPath: jsonPath, schema: schema,
|
|
46
|
+
return (jsx_runtime_1.jsx(ZodStringEditor_1.ZodStringEditor, { value: value, setValue: setValue, jsonPath: jsonPath, schema: schema, onRemove: onRemove, mayPad: mayPad }));
|
|
47
47
|
}
|
|
48
48
|
if (typeName === 'date') {
|
|
49
|
-
return (jsx_runtime_1.jsx(ZodDateEditor_1.ZodDateEditor, { value: value, setValue: setValue, jsonPath: jsonPath, schema: schema,
|
|
49
|
+
return (jsx_runtime_1.jsx(ZodDateEditor_1.ZodDateEditor, { value: value, setValue: setValue, jsonPath: jsonPath, schema: schema, onRemove: onRemove, mayPad: mayPad }));
|
|
50
50
|
}
|
|
51
51
|
if (typeName === 'number') {
|
|
52
|
-
return (jsx_runtime_1.jsx(ZodNumberEditor_1.ZodNumberEditor, { value: value, setValue: setValue, jsonPath: jsonPath, schema: schema,
|
|
52
|
+
return (jsx_runtime_1.jsx(ZodNumberEditor_1.ZodNumberEditor, { value: value, setValue: setValue, jsonPath: jsonPath, schema: schema, onRemove: onRemove, mayPad: mayPad }));
|
|
53
53
|
}
|
|
54
54
|
if (typeName === 'boolean') {
|
|
55
|
-
return (jsx_runtime_1.jsx(ZodBooleanEditor_1.ZodBooleanEditor, { value: value, setValue: setValue, jsonPath: jsonPath,
|
|
55
|
+
return (jsx_runtime_1.jsx(ZodBooleanEditor_1.ZodBooleanEditor, { value: value, setValue: setValue, jsonPath: jsonPath, onRemove: onRemove, mayPad: mayPad }));
|
|
56
56
|
}
|
|
57
57
|
if (typeName === 'undefined') {
|
|
58
|
-
return (jsx_runtime_1.jsx(ZodNonEditableValue_1.ZonNonEditableValue, { jsonPath: jsonPath,
|
|
58
|
+
return (jsx_runtime_1.jsx(ZodNonEditableValue_1.ZonNonEditableValue, { jsonPath: jsonPath, label: 'undefined', mayPad: mayPad }));
|
|
59
59
|
}
|
|
60
60
|
if (typeName === 'null') {
|
|
61
|
-
return (jsx_runtime_1.jsx(ZodNonEditableValue_1.ZonNonEditableValue, { jsonPath: jsonPath,
|
|
61
|
+
return (jsx_runtime_1.jsx(ZodNonEditableValue_1.ZonNonEditableValue, { jsonPath: jsonPath, label: 'null', mayPad: mayPad }));
|
|
62
62
|
}
|
|
63
63
|
if (typeName === 'any') {
|
|
64
|
-
return (jsx_runtime_1.jsx(ZodNonEditableValue_1.ZonNonEditableValue, { jsonPath: jsonPath,
|
|
64
|
+
return (jsx_runtime_1.jsx(ZodNonEditableValue_1.ZonNonEditableValue, { jsonPath: jsonPath, label: 'any (not editable)', mayPad: mayPad }));
|
|
65
65
|
}
|
|
66
66
|
if (typeName === 'bigint') {
|
|
67
|
-
return (jsx_runtime_1.jsx(ZodNonEditableValue_1.ZonNonEditableValue, { jsonPath: jsonPath,
|
|
67
|
+
return (jsx_runtime_1.jsx(ZodNonEditableValue_1.ZonNonEditableValue, { jsonPath: jsonPath, label: 'BigInt (not editable)', mayPad: mayPad }));
|
|
68
68
|
}
|
|
69
69
|
if (typeName === 'unknown') {
|
|
70
|
-
return (jsx_runtime_1.jsx(ZodNonEditableValue_1.ZonNonEditableValue, { jsonPath: jsonPath,
|
|
70
|
+
return (jsx_runtime_1.jsx(ZodNonEditableValue_1.ZonNonEditableValue, { jsonPath: jsonPath, label: 'unknown (not editable)', mayPad: mayPad }));
|
|
71
71
|
}
|
|
72
72
|
if (typeName === 'array') {
|
|
73
73
|
// In v4, .refine() doesn't wrap in ZodEffects, so check brand here too
|
|
74
74
|
if (zodTypes &&
|
|
75
75
|
description === zodTypes.ZodZypesInternals.REMOTION_MATRIX_BRAND) {
|
|
76
|
-
return (jsx_runtime_1.jsx(ZodMatrixEditor_1.ZodMatrixEditor, { setValue: setValue, value: value, jsonPath: jsonPath, schema: schema,
|
|
76
|
+
return (jsx_runtime_1.jsx(ZodMatrixEditor_1.ZodMatrixEditor, { setValue: setValue, value: value, jsonPath: jsonPath, schema: schema, onRemove: onRemove, mayPad: mayPad }));
|
|
77
77
|
}
|
|
78
|
-
return (jsx_runtime_1.jsx(ZodArrayEditor_1.ZodArrayEditor, { setValue: setValue, value: value, jsonPath: jsonPath, schema: schema,
|
|
78
|
+
return (jsx_runtime_1.jsx(ZodArrayEditor_1.ZodArrayEditor, { setValue: setValue, value: value, jsonPath: jsonPath, schema: schema, onRemove: onRemove, mayPad: mayPad }));
|
|
79
79
|
}
|
|
80
80
|
if (typeName === 'enum') {
|
|
81
|
-
return (jsx_runtime_1.jsx(ZodEnumEditor_1.ZodEnumEditor, { setValue: setValue, value: value, jsonPath: jsonPath, schema: schema,
|
|
81
|
+
return (jsx_runtime_1.jsx(ZodEnumEditor_1.ZodEnumEditor, { setValue: setValue, value: value, jsonPath: jsonPath, schema: schema, onRemove: onRemove }));
|
|
82
82
|
}
|
|
83
83
|
// In v3, effects wrap schemas (e.g. .refine(), .transform()).
|
|
84
84
|
// In v4, refine/transform are embedded as checks, so this only applies to v3.
|
|
85
85
|
if (typeName === 'effects') {
|
|
86
86
|
if (zodTypes &&
|
|
87
87
|
description === zodTypes.ZodZypesInternals.REMOTION_COLOR_BRAND) {
|
|
88
|
-
return (jsx_runtime_1.jsx(ZodColorEditor_1.ZodColorEditor, { value: value, setValue: setValue, jsonPath: jsonPath, schema: schema,
|
|
88
|
+
return (jsx_runtime_1.jsx(ZodColorEditor_1.ZodColorEditor, { value: value, setValue: setValue, jsonPath: jsonPath, schema: schema, onRemove: onRemove, mayPad: mayPad }));
|
|
89
89
|
}
|
|
90
90
|
if (zodTypes &&
|
|
91
91
|
description === zodTypes.ZodZypesInternals.REMOTION_MATRIX_BRAND) {
|
|
92
|
-
return (jsx_runtime_1.jsx(ZodMatrixEditor_1.ZodMatrixEditor, { setValue: setValue, value: value, jsonPath: jsonPath, schema: (0, zod_schema_type_1.getEffectsInner)(schema),
|
|
92
|
+
return (jsx_runtime_1.jsx(ZodMatrixEditor_1.ZodMatrixEditor, { setValue: setValue, value: value, jsonPath: jsonPath, schema: (0, zod_schema_type_1.getEffectsInner)(schema), onRemove: onRemove, mayPad: mayPad }));
|
|
93
93
|
}
|
|
94
|
-
return (jsx_runtime_1.jsx(ZodEffectEditor_1.ZodEffectEditor, { value: value, setValue: setValue, jsonPath: jsonPath, schema: schema,
|
|
94
|
+
return (jsx_runtime_1.jsx(ZodEffectEditor_1.ZodEffectEditor, { value: value, setValue: setValue, jsonPath: jsonPath, schema: schema, onRemove: onRemove, mayPad: mayPad }));
|
|
95
95
|
}
|
|
96
96
|
if (typeName === 'union') {
|
|
97
|
-
return (jsx_runtime_1.jsx(ZodUnionEditor_1.ZodUnionEditor, { schema: schema,
|
|
97
|
+
return (jsx_runtime_1.jsx(ZodUnionEditor_1.ZodUnionEditor, { schema: schema, jsonPath: jsonPath, value: value, setValue: setValue, onRemove: onRemove, mayPad: mayPad }));
|
|
98
98
|
}
|
|
99
99
|
if (typeName === 'optional') {
|
|
100
|
-
return (jsx_runtime_1.jsx(ZodOptionalEditor_1.ZodOptionalEditor, { jsonPath: jsonPath,
|
|
100
|
+
return (jsx_runtime_1.jsx(ZodOptionalEditor_1.ZodOptionalEditor, { jsonPath: jsonPath, value: value, setValue: setValue, onRemove: onRemove, schema: schema, mayPad: mayPad }));
|
|
101
101
|
}
|
|
102
102
|
if (typeName === 'nullable') {
|
|
103
|
-
return (jsx_runtime_1.jsx(ZodNullableEditor_1.ZodNullableEditor, { jsonPath: jsonPath,
|
|
103
|
+
return (jsx_runtime_1.jsx(ZodNullableEditor_1.ZodNullableEditor, { jsonPath: jsonPath, value: value, setValue: setValue, onRemove: onRemove, schema: schema, mayPad: mayPad }));
|
|
104
104
|
}
|
|
105
105
|
if (typeName === 'default') {
|
|
106
|
-
return (jsx_runtime_1.jsx(ZodDefaultEditor_1.ZodDefaultEditor, { jsonPath: jsonPath,
|
|
106
|
+
return (jsx_runtime_1.jsx(ZodDefaultEditor_1.ZodDefaultEditor, { jsonPath: jsonPath, value: value, setValue: setValue, onRemove: onRemove, schema: schema, mayPad: mayPad }));
|
|
107
107
|
}
|
|
108
108
|
if (typeName === 'discriminatedUnion') {
|
|
109
|
-
return (jsx_runtime_1.jsx(ZodDiscriminatedUnionEditor_1.ZodDiscriminatedUnionEditor, {
|
|
109
|
+
return (jsx_runtime_1.jsx(ZodDiscriminatedUnionEditor_1.ZodDiscriminatedUnionEditor, { mayPad: mayPad, schema: schema, setValue: setValue, value: value, jsonPath: jsonPath, onRemove: onRemove }));
|
|
110
110
|
}
|
|
111
111
|
if (typeName === 'tuple') {
|
|
112
|
-
return (jsx_runtime_1.jsx(ZodTupleEditor_1.ZodTupleEditor, { setValue: setValue, value: value, jsonPath: jsonPath, schema: schema,
|
|
112
|
+
return (jsx_runtime_1.jsx(ZodTupleEditor_1.ZodTupleEditor, { setValue: setValue, value: value, jsonPath: jsonPath, schema: schema, onRemove: onRemove, mayPad: mayPad }));
|
|
113
113
|
}
|
|
114
|
-
return (jsx_runtime_1.jsx(ZodNonEditableValue_1.ZonNonEditableValue, { jsonPath: jsonPath,
|
|
114
|
+
return (jsx_runtime_1.jsx(ZodNonEditableValue_1.ZonNonEditableValue, { jsonPath: jsonPath, label: `${typeName} (not editable)`, mayPad: mayPad }));
|
|
115
115
|
};
|
|
116
116
|
exports.ZodSwitch = ZodSwitch;
|
|
@@ -6,12 +6,7 @@ export declare const ZodTextareaEditor: React.FC<{
|
|
|
6
6
|
readonly schema: AnyZodSchema;
|
|
7
7
|
readonly jsonPath: JSONPath;
|
|
8
8
|
readonly value: string;
|
|
9
|
-
readonly defaultValue: string;
|
|
10
9
|
readonly setValue: UpdaterFunction<string>;
|
|
11
|
-
readonly onSave: UpdaterFunction<string>;
|
|
12
10
|
readonly onRemove: null | (() => void);
|
|
13
|
-
readonly showSaveButton: boolean;
|
|
14
|
-
readonly saving: boolean;
|
|
15
|
-
readonly saveDisabledByParent: boolean;
|
|
16
11
|
readonly mayPad: boolean;
|
|
17
12
|
}>;
|
|
@@ -1,13 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.ZodTextareaEditor = void 0;
|
|
4
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
38
|
+
const react_1 = __importStar(require("react"));
|
|
6
39
|
const get_zod_if_possible_1 = require("../../get-zod-if-possible");
|
|
7
40
|
const RemTextarea_1 = require("../../NewComposition/RemTextarea");
|
|
8
41
|
const Fieldset_1 = require("./Fieldset");
|
|
9
|
-
const local_state_1 = require("./local-state");
|
|
10
42
|
const SchemaLabel_1 = require("./SchemaLabel");
|
|
43
|
+
const zod_schema_type_1 = require("./zod-schema-type");
|
|
11
44
|
const ZodFieldValidation_1 = require("./ZodFieldValidation");
|
|
12
45
|
const fullWidth = {
|
|
13
46
|
width: '100%',
|
|
@@ -16,7 +49,7 @@ const textareaStyle = {
|
|
|
16
49
|
resize: 'vertical',
|
|
17
50
|
minHeight: 100,
|
|
18
51
|
};
|
|
19
|
-
const ZodTextareaEditor = ({ jsonPath, value, setValue,
|
|
52
|
+
const ZodTextareaEditor = ({ jsonPath, value, setValue, schema, onRemove, mayPad }) => {
|
|
20
53
|
const z = (0, get_zod_if_possible_1.useZodIfPossible)();
|
|
21
54
|
if (!z) {
|
|
22
55
|
throw new Error('expected zod');
|
|
@@ -25,21 +58,16 @@ const ZodTextareaEditor = ({ jsonPath, value, setValue, showSaveButton, defaultV
|
|
|
25
58
|
if (!zodTypes) {
|
|
26
59
|
throw new Error('expected zod textarea');
|
|
27
60
|
}
|
|
28
|
-
const { localValue, onChange: setLocalValue, reset, } = (0, local_state_1.useLocalState)({
|
|
29
|
-
schema,
|
|
30
|
-
setValue,
|
|
31
|
-
unsavedValue: value,
|
|
32
|
-
savedValue: defaultValue,
|
|
33
|
-
});
|
|
34
61
|
const onChange = (0, react_1.useCallback)((e) => {
|
|
35
|
-
|
|
36
|
-
}, [
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
}, [
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
62
|
+
setValue(() => e.target.value, { shouldSave: false });
|
|
63
|
+
}, [setValue]);
|
|
64
|
+
const onBlur = (0, react_1.useCallback)(() => {
|
|
65
|
+
setValue(() => value, { shouldSave: true });
|
|
66
|
+
}, [setValue, value]);
|
|
67
|
+
const zodValidation = react_1.default.useMemo(() => (0, zod_schema_type_1.zodSafeParse)(schema, value), [schema, value]);
|
|
68
|
+
return (jsx_runtime_1.jsxs(Fieldset_1.Fieldset, { shouldPad: mayPad, children: [
|
|
69
|
+
jsx_runtime_1.jsx(SchemaLabel_1.SchemaLabel, { handleClick: null, jsonPath: jsonPath, onRemove: onRemove, valid: zodValidation.success, suffix: null }), jsx_runtime_1.jsxs("div", { style: fullWidth, children: [
|
|
70
|
+
jsx_runtime_1.jsx(RemTextarea_1.RemTextarea, { onChange: onChange, onBlur: onBlur, value: value, status: zodValidation ? 'ok' : 'error', placeholder: jsonPath.join('.'), name: jsonPath.join('.'), style: textareaStyle }), jsx_runtime_1.jsx(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, zodValidation: zodValidation })
|
|
43
71
|
] })
|
|
44
72
|
] }));
|
|
45
73
|
};
|
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type
|
|
2
|
+
import { type AnyZodSchema } from './zod-schema-type';
|
|
3
3
|
import type { JSONPath } from './zod-types';
|
|
4
4
|
import type { UpdaterFunction } from './ZodSwitch';
|
|
5
5
|
export declare const ZodTupleEditor: React.FC<{
|
|
6
6
|
readonly schema: AnyZodSchema;
|
|
7
7
|
readonly jsonPath: JSONPath;
|
|
8
8
|
readonly value: unknown[];
|
|
9
|
-
readonly defaultValue: unknown[];
|
|
10
9
|
readonly setValue: UpdaterFunction<unknown[]>;
|
|
11
|
-
readonly onSave: UpdaterFunction<unknown[]>;
|
|
12
|
-
readonly showSaveButton: boolean;
|
|
13
10
|
readonly onRemove: null | (() => void);
|
|
14
|
-
readonly saving: boolean;
|
|
15
|
-
readonly saveDisabledByParent: boolean;
|
|
16
11
|
readonly mayPad: boolean;
|
|
17
12
|
}>;
|
|
@@ -37,25 +37,21 @@ exports.ZodTupleEditor = 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");
|
|
42
40
|
const Fieldset_1 = require("./Fieldset");
|
|
43
|
-
const local_state_1 = require("./local-state");
|
|
44
41
|
const SchemaLabel_1 = require("./SchemaLabel");
|
|
45
42
|
const SchemaSeparationLine_1 = require("./SchemaSeparationLine");
|
|
46
43
|
const SchemaVerticalGuide_1 = require("./SchemaVerticalGuide");
|
|
47
44
|
const zod_schema_type_1 = require("./zod-schema-type");
|
|
45
|
+
const zod_schema_type_2 = require("./zod-schema-type");
|
|
48
46
|
const ZodFieldValidation_1 = require("./ZodFieldValidation");
|
|
49
47
|
const ZodTupleItemEditor_1 = require("./ZodTupleItemEditor");
|
|
50
|
-
const ZodTupleEditor = ({ schema, jsonPath, setValue,
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
savedValue: defaultValue,
|
|
56
|
-
});
|
|
48
|
+
const ZodTupleEditor = ({ schema, jsonPath, setValue, value, onRemove, mayPad }) => {
|
|
49
|
+
const onChange = (0, react_1.useCallback)((updater, { shouldSave }) => {
|
|
50
|
+
setValue(updater, { shouldSave });
|
|
51
|
+
}, [setValue]);
|
|
52
|
+
const zodValidation = (0, react_1.useMemo)(() => (0, zod_schema_type_1.zodSafeParse)(schema, value), [schema, value]);
|
|
57
53
|
const [expanded, setExpanded] = (0, react_1.useState)(true);
|
|
58
|
-
const tupleItems = (0,
|
|
54
|
+
const tupleItems = (0, zod_schema_type_2.getTupleItems)(schema);
|
|
59
55
|
const suffix = (0, react_1.useMemo)(() => {
|
|
60
56
|
return expanded ? ' [' : ' [...] ';
|
|
61
57
|
}, [expanded]);
|
|
@@ -63,24 +59,17 @@ const ZodTupleEditor = ({ schema, jsonPath, setValue, defaultValue, value, onSav
|
|
|
63
59
|
if (!z) {
|
|
64
60
|
throw new Error('expected zod');
|
|
65
61
|
}
|
|
66
|
-
|
|
67
|
-
const isDefaultValue = (0, react_1.useMemo)(() => {
|
|
68
|
-
return (0, deep_equal_1.deepEqual)(localValue.value, defaultValue);
|
|
69
|
-
}, [defaultValue, localValue]);
|
|
70
|
-
return (jsx_runtime_1.jsxs(Fieldset_1.Fieldset, { shouldPad: mayPad, success: localValue.zodValidation.success, children: [
|
|
62
|
+
return (jsx_runtime_1.jsxs(Fieldset_1.Fieldset, { shouldPad: mayPad, children: [
|
|
71
63
|
jsx_runtime_1.jsx("div", { style: {
|
|
72
64
|
display: 'flex',
|
|
73
65
|
flexDirection: 'row',
|
|
74
|
-
}, children: jsx_runtime_1.jsx(SchemaLabel_1.SchemaLabel, {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
jsx_runtime_1.jsx(ZodTupleItemEditor_1.ZodTupleItemEditor, { onChange: onChange, value: child, tupleItems: tupleItems, index: i, jsonPath: jsonPath, defaultValue: (_a = defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue[i]) !== null && _a !== void 0 ? _a : (0, create_zod_values_1.createZodValues)(tupleItems[i], z, zodTypes), onSave: onSave, showSaveButton: showSaveButton, saving: saving, saveDisabledByParent: saveDisabledByParent, mayPad: mayPad }), jsx_runtime_1.jsx(SchemaSeparationLine_1.SchemaArrayItemSeparationLine, { schema: schema, index: i, onChange: onChange, isLast: i === localValue.value.length - 1, showAddButton: false })
|
|
82
|
-
] }, `${i}${localValue.keyStabilityRevision}`));
|
|
83
|
-
}), value.length === 0 ? (jsx_runtime_1.jsx(SchemaSeparationLine_1.SchemaArrayItemSeparationLine, { schema: schema, index: 0, onChange: onChange, isLast: true, showAddButton: false })) : null] }) })) : null, jsx_runtime_1.jsx(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, localValue: localValue })
|
|
66
|
+
}, children: jsx_runtime_1.jsx(SchemaLabel_1.SchemaLabel, { jsonPath: jsonPath, onRemove: onRemove, suffix: suffix, valid: zodValidation.success, handleClick: () => setExpanded(!expanded) }) }), expanded ? (jsx_runtime_1.jsxs(SchemaVerticalGuide_1.SchemaVerticalGuide, { isRoot: false, children: [value.map((child, i) => {
|
|
67
|
+
return (
|
|
68
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
69
|
+
jsx_runtime_1.jsxs(react_1.default.Fragment, { children: [
|
|
70
|
+
jsx_runtime_1.jsx(ZodTupleItemEditor_1.ZodTupleItemEditor, { onChange: onChange, value: child, tupleItems: tupleItems, index: i, jsonPath: jsonPath, mayPad: mayPad }), jsx_runtime_1.jsx(SchemaSeparationLine_1.SchemaArrayItemSeparationLine, { schema: schema, index: i, onChange: onChange, isLast: i === value.length - 1, showAddButton: false })
|
|
71
|
+
] }, i));
|
|
72
|
+
}), value.length === 0 ? (jsx_runtime_1.jsx(SchemaSeparationLine_1.SchemaArrayItemSeparationLine, { schema: schema, index: 0, onChange: onChange, isLast: true, showAddButton: false })) : null] })) : null, jsx_runtime_1.jsx(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, zodValidation: zodValidation })
|
|
84
73
|
] }));
|
|
85
74
|
};
|
|
86
75
|
exports.ZodTupleEditor = ZodTupleEditor;
|
|
@@ -7,10 +7,5 @@ export declare const ZodTupleItemEditor: React.FC<{
|
|
|
7
7
|
tupleItems: AnyZodSchema[];
|
|
8
8
|
index: number;
|
|
9
9
|
value: unknown;
|
|
10
|
-
defaultValue: unknown;
|
|
11
|
-
onSave: UpdaterFunction<unknown[]>;
|
|
12
|
-
showSaveButton: boolean;
|
|
13
|
-
saving: boolean;
|
|
14
|
-
saveDisabledByParent: boolean;
|
|
15
10
|
mayPad: boolean;
|
|
16
11
|
}>;
|
|
@@ -5,26 +5,19 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const get_zod_if_possible_1 = require("../../get-zod-if-possible");
|
|
7
7
|
const ZodSwitch_1 = require("./ZodSwitch");
|
|
8
|
-
const ZodTupleItemEditor = ({ tupleItems, onChange, jsonPath, index, value,
|
|
8
|
+
const ZodTupleItemEditor = ({ tupleItems, onChange, jsonPath, index, value, mayPad }) => {
|
|
9
9
|
const z = (0, get_zod_if_possible_1.useZodIfPossible)();
|
|
10
10
|
if (!z) {
|
|
11
11
|
throw new Error('expected zod');
|
|
12
12
|
}
|
|
13
|
-
const setValue = (0, react_1.useCallback)((val) => {
|
|
13
|
+
const setValue = (0, react_1.useCallback)((val, { shouldSave }) => {
|
|
14
14
|
onChange((oldV) => [
|
|
15
15
|
...oldV.slice(0, index),
|
|
16
16
|
typeof val === 'function' ? val(oldV[index]) : val,
|
|
17
17
|
...oldV.slice(index + 1),
|
|
18
|
-
],
|
|
18
|
+
], { shouldSave });
|
|
19
19
|
}, [index, onChange]);
|
|
20
20
|
const newJsonPath = (0, react_1.useMemo)(() => [...jsonPath, index], [index, jsonPath]);
|
|
21
|
-
|
|
22
|
-
onSaveObject((oldV) => [
|
|
23
|
-
...oldV.slice(0, index),
|
|
24
|
-
updater(oldV[index]),
|
|
25
|
-
...oldV.slice(index + 1),
|
|
26
|
-
], false, false);
|
|
27
|
-
}, [index, onSaveObject]);
|
|
28
|
-
return (jsx_runtime_1.jsx("div", { children: jsx_runtime_1.jsx(ZodSwitch_1.ZodSwitch, { jsonPath: newJsonPath, schema: tupleItems[index], value: value, setValue: setValue, defaultValue: defaultValue, onSave: onSave, showSaveButton: showSaveButton, onRemove: null, saving: saving, saveDisabledByParent: saveDisabledByParent, mayPad: mayPad }) }));
|
|
21
|
+
return (jsx_runtime_1.jsx("div", { children: jsx_runtime_1.jsx(ZodSwitch_1.ZodSwitch, { jsonPath: newJsonPath, schema: tupleItems[index], value: value, setValue: setValue, onRemove: null, mayPad: mayPad }) }));
|
|
29
22
|
};
|
|
30
23
|
exports.ZodTupleItemEditor = ZodTupleItemEditor;
|
|
@@ -2,15 +2,10 @@ import type { AnyZodSchema } from './zod-schema-type';
|
|
|
2
2
|
import type { JSONPath } from './zod-types';
|
|
3
3
|
import type { UpdaterFunction } from './ZodSwitch';
|
|
4
4
|
export declare const ZodUnionEditor: React.FC<{
|
|
5
|
-
showSaveButton: boolean;
|
|
6
5
|
jsonPath: JSONPath;
|
|
7
6
|
value: unknown;
|
|
8
|
-
defaultValue: unknown;
|
|
9
7
|
schema: AnyZodSchema;
|
|
10
8
|
setValue: UpdaterFunction<unknown>;
|
|
11
|
-
onSave: UpdaterFunction<unknown>;
|
|
12
9
|
onRemove: null | (() => void);
|
|
13
|
-
saving: boolean;
|
|
14
|
-
saveDisabledByParent: boolean;
|
|
15
10
|
mayPad: boolean;
|
|
16
11
|
}>;
|
|
@@ -24,22 +24,22 @@ const findNull = (value) => {
|
|
|
24
24
|
otherSchemaIsAlsoNullish,
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
|
-
const ZodUnionEditor = ({ jsonPath, schema, setValue,
|
|
27
|
+
const ZodUnionEditor = ({ jsonPath, schema, setValue, value, onRemove, mayPad }) => {
|
|
28
28
|
const options = (0, zod_schema_type_1.getUnionOptions)(schema);
|
|
29
29
|
if (options.length > 2) {
|
|
30
|
-
return (jsx_runtime_1.jsx(ZodNonEditableValue_1.ZonNonEditableValue, { jsonPath: jsonPath, label: 'Union with more than 2 options not editable',
|
|
30
|
+
return (jsx_runtime_1.jsx(ZodNonEditableValue_1.ZonNonEditableValue, { jsonPath: jsonPath, label: 'Union with more than 2 options not editable', mayPad: mayPad }));
|
|
31
31
|
}
|
|
32
32
|
if (options.length < 2) {
|
|
33
|
-
return (jsx_runtime_1.jsx(ZodNonEditableValue_1.ZonNonEditableValue, { jsonPath: jsonPath, label: 'Union with less than 2 options not editable',
|
|
33
|
+
return (jsx_runtime_1.jsx(ZodNonEditableValue_1.ZonNonEditableValue, { jsonPath: jsonPath, label: 'Union with less than 2 options not editable', mayPad: mayPad }));
|
|
34
34
|
}
|
|
35
35
|
const nullResult = findNull(options);
|
|
36
36
|
if (!nullResult) {
|
|
37
|
-
return (jsx_runtime_1.jsx(ZodNonEditableValue_1.ZonNonEditableValue, { jsonPath: jsonPath, label: 'Union only editable with 1 value being null',
|
|
37
|
+
return (jsx_runtime_1.jsx(ZodNonEditableValue_1.ZonNonEditableValue, { jsonPath: jsonPath, label: 'Union only editable with 1 value being null', mayPad: mayPad }));
|
|
38
38
|
}
|
|
39
39
|
const { otherSchema, nullishValue, otherSchemaIsAlsoNullish } = nullResult;
|
|
40
40
|
if (otherSchemaIsAlsoNullish) {
|
|
41
|
-
return (jsx_runtime_1.jsx(ZodNonEditableValue_1.ZonNonEditableValue, { jsonPath: jsonPath, label: 'Not editable - both union values are nullish',
|
|
41
|
+
return (jsx_runtime_1.jsx(ZodNonEditableValue_1.ZonNonEditableValue, { jsonPath: jsonPath, label: 'Not editable - both union values are nullish', mayPad: mayPad }));
|
|
42
42
|
}
|
|
43
|
-
return (jsx_runtime_1.jsx(ZodOrNullishEditor_1.ZodOrNullishEditor, {
|
|
43
|
+
return (jsx_runtime_1.jsx(ZodOrNullishEditor_1.ZodOrNullishEditor, { jsonPath: jsonPath, onRemove: onRemove, schema: schema, innerSchema: otherSchema, setValue: setValue, value: value, nullishValue: nullishValue, mayPad: mayPad }));
|
|
44
44
|
};
|
|
45
45
|
exports.ZodUnionEditor = ZodUnionEditor;
|
|
@@ -84,7 +84,6 @@ const RenderModal = ({ readOnlyStudio, initialFrame, initialVideoImageFormat, in
|
|
|
84
84
|
});
|
|
85
85
|
const [state, dispatch] = (0, react_1.useReducer)(reducer, initialState);
|
|
86
86
|
const [unclampedFrame, setFrame] = (0, react_1.useState)(() => initialFrame);
|
|
87
|
-
const [saving, setSaving] = (0, react_1.useState)(false);
|
|
88
87
|
const [stillImageFormat, setStillImageFormat] = (0, react_1.useState)(() => initialStillImageFormat);
|
|
89
88
|
const [videoImageFormat, setVideoImageFormat] = (0, react_1.useState)(() => {
|
|
90
89
|
var _a;
|
|
@@ -268,7 +267,10 @@ const RenderModal = ({ readOnlyStudio, initialFrame, initialVideoImageFormat, in
|
|
|
268
267
|
}
|
|
269
268
|
return null;
|
|
270
269
|
}, [codec, x264PresetSetting, renderMode]);
|
|
271
|
-
const [inputProps,
|
|
270
|
+
const [inputProps, _setInputProps] = (0, react_1.useState)(() => defaultProps);
|
|
271
|
+
const setInputProps = (0, react_1.useCallback)((updater) => {
|
|
272
|
+
_setInputProps(updater);
|
|
273
|
+
}, []);
|
|
272
274
|
const [metadata] = (0, react_1.useState)(() => defaultMetadata);
|
|
273
275
|
const endFrame = (0, react_1.useMemo)(() => {
|
|
274
276
|
if (endFrameOrNull === null) {
|
|
@@ -985,7 +987,11 @@ const RenderModal = ({ readOnlyStudio, initialFrame, initialVideoImageFormat, in
|
|
|
985
987
|
jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(gif_1.GifIcon, { style: render_modals_1.icon }) }),
|
|
986
988
|
"GIF"] })) : null, shownTabs.includes('advanced') ? (jsx_runtime_1.jsxs(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'advanced', onClick: () => setTab('advanced'), children: [
|
|
987
989
|
jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(gear_1.GearIcon, { style: render_modals_1.icon }) }),
|
|
988
|
-
"Other"] })) : null] }), jsx_runtime_1.jsx("div", { style: render_modals_1.optionsPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: tab === 'general' ? (jsx_runtime_1.jsx(RenderModalBasic_1.RenderModalBasic, { codec: codec, resolvedComposition: resolvedComposition, frame: frame, imageFormatOptions: imageFormatOptions, outName: outName, proResProfile: proResProfile, renderMode: renderMode, setVideoCodec: setCodec, setFrame: setFrame, setOutName: setOutName, setProResProfile: setProResProfile, endFrame: endFrame, setEndFrame: setEndFrame, setStartFrame: setStartFrame, setVerboseLogging: setLogLevel, logLevel: logLevel, showOutputName: !readOnlyStudio, startFrame: startFrame, validationMessage: outnameValidation.valid ? null : outnameValidation.error.message })) : tab === 'picture' ? (jsx_runtime_1.jsx(RenderModalPicture_1.RenderModalPicture, { renderMode: renderMode, scale: scale, setScale: setScale, pixelFormat: pixelFormat, pixelFormatOptions: pixelFormatOptions, imageFormatOptions: imageFormatOptions, crf: crf, setCrf: setCrf, customTargetVideoBitrate: customTargetVideoBitrate, maxCrf: maxCrf, minCrf: minCrf, jpegQuality: jpegQuality, qualityControlType: qualityControlType, setJpegQuality: setJpegQuality, setColorSpace: setColorSpace, colorSpace: colorSpace, setCustomTargetVideoBitrateValue: setCustomTargetVideoBitrateValue, setQualityControl: setQualityControl, videoImageFormat: videoImageFormat, stillImageFormat: stillImageFormat, shouldDisplayQualityControlPicker: supportsBothQualityControls, encodingBufferSize: encodingBufferSize, setEncodingBufferSize: setEncodingBufferSize, encodingMaxRate: encodingMaxRate, setEncodingMaxRate: setEncodingMaxRate, compositionWidth: resolvedComposition.width, compositionHeight: resolvedComposition.height })) : tab === 'audio' ? (jsx_runtime_1.jsx(RenderModalAudio_1.RenderModalAudio, { muted: muted, renderMode: renderMode, setMuted: setMuted, codec: codec, audioCodec: audioCodec, setAudioCodec: setAudioCodec, enforceAudioTrack: enforceAudioTrack, setEnforceAudioTrackState: setEnforceAudioTrackState, customTargetAudioBitrate: customTargetAudioBitrate, setCustomTargetAudioBitrateValue: setCustomTargetAudioBitrateValue, setShouldHaveCustomTargetAudioBitrate: setShouldHaveCustomTargetAudioBitrate, shouldHaveCustomTargetAudioBitrate: shouldHaveCustomTargetAudioBitrate, forSeamlessAacConcatenation: forSeamlessAacConcatenation, setForSeamlessAacConcatenation: setForSeamlessAacConcatenation, separateAudioTo: separateAudioTo, setSeparateAudioTo: setSeparateAudioTo, outName: outName })) : tab === 'gif' ? (jsx_runtime_1.jsx(RenderModalGif_1.RenderModalGif, { everyNthFrame: everyNthFrame, limitNumberOfGifLoops: limitNumberOfGifLoops, numberOfGifLoopsSetting: numberOfGifLoopsSetting, setEveryNthFrameSetting: setEveryNthFrameSetting, setLimitNumberOfGifLoops: setLimitNumberOfGifLoops, setNumberOfGifLoopsSetting: setNumberOfGifLoopsSetting })) : tab === 'data' ? (jsx_runtime_1.jsx(DataEditor_1.DataEditor, { defaultProps: inputProps, setDefaultProps: setInputProps, unresolvedComposition: unresolvedComposition,
|
|
990
|
+
"Other"] })) : null] }), jsx_runtime_1.jsx("div", { style: render_modals_1.optionsPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: tab === 'general' ? (jsx_runtime_1.jsx(RenderModalBasic_1.RenderModalBasic, { codec: codec, resolvedComposition: resolvedComposition, frame: frame, imageFormatOptions: imageFormatOptions, outName: outName, proResProfile: proResProfile, renderMode: renderMode, setVideoCodec: setCodec, setFrame: setFrame, setOutName: setOutName, setProResProfile: setProResProfile, endFrame: endFrame, setEndFrame: setEndFrame, setStartFrame: setStartFrame, setVerboseLogging: setLogLevel, logLevel: logLevel, showOutputName: !readOnlyStudio, startFrame: startFrame, validationMessage: outnameValidation.valid ? null : outnameValidation.error.message })) : tab === 'picture' ? (jsx_runtime_1.jsx(RenderModalPicture_1.RenderModalPicture, { renderMode: renderMode, scale: scale, setScale: setScale, pixelFormat: pixelFormat, pixelFormatOptions: pixelFormatOptions, imageFormatOptions: imageFormatOptions, crf: crf, setCrf: setCrf, customTargetVideoBitrate: customTargetVideoBitrate, maxCrf: maxCrf, minCrf: minCrf, jpegQuality: jpegQuality, qualityControlType: qualityControlType, setJpegQuality: setJpegQuality, setColorSpace: setColorSpace, colorSpace: colorSpace, setCustomTargetVideoBitrateValue: setCustomTargetVideoBitrateValue, setQualityControl: setQualityControl, videoImageFormat: videoImageFormat, stillImageFormat: stillImageFormat, shouldDisplayQualityControlPicker: supportsBothQualityControls, encodingBufferSize: encodingBufferSize, setEncodingBufferSize: setEncodingBufferSize, encodingMaxRate: encodingMaxRate, setEncodingMaxRate: setEncodingMaxRate, compositionWidth: resolvedComposition.width, compositionHeight: resolvedComposition.height })) : tab === 'audio' ? (jsx_runtime_1.jsx(RenderModalAudio_1.RenderModalAudio, { muted: muted, renderMode: renderMode, setMuted: setMuted, codec: codec, audioCodec: audioCodec, setAudioCodec: setAudioCodec, enforceAudioTrack: enforceAudioTrack, setEnforceAudioTrackState: setEnforceAudioTrackState, customTargetAudioBitrate: customTargetAudioBitrate, setCustomTargetAudioBitrateValue: setCustomTargetAudioBitrateValue, setShouldHaveCustomTargetAudioBitrate: setShouldHaveCustomTargetAudioBitrate, shouldHaveCustomTargetAudioBitrate: shouldHaveCustomTargetAudioBitrate, forSeamlessAacConcatenation: forSeamlessAacConcatenation, setForSeamlessAacConcatenation: setForSeamlessAacConcatenation, separateAudioTo: separateAudioTo, setSeparateAudioTo: setSeparateAudioTo, outName: outName })) : tab === 'gif' ? (jsx_runtime_1.jsx(RenderModalGif_1.RenderModalGif, { everyNthFrame: everyNthFrame, limitNumberOfGifLoops: limitNumberOfGifLoops, numberOfGifLoopsSetting: numberOfGifLoopsSetting, setEveryNthFrameSetting: setEveryNthFrameSetting, setLimitNumberOfGifLoops: setLimitNumberOfGifLoops, setNumberOfGifLoopsSetting: setNumberOfGifLoopsSetting })) : tab === 'data' ? (jsx_runtime_1.jsx(DataEditor_1.DataEditor, { defaultProps: inputProps, setDefaultProps: setInputProps, unresolvedComposition: unresolvedComposition, propsEditType: "input-props", canSaveDefaultProps: {
|
|
991
|
+
canUpdate: false,
|
|
992
|
+
reason: 'render dialogue',
|
|
993
|
+
determined: false,
|
|
994
|
+
} })) : (jsx_runtime_1.jsx(RenderModalAdvanced_1.RenderModalAdvanced, { x264Preset: x264Preset, setx264Preset: setx264Preset, concurrency: concurrency, maxConcurrency: maxConcurrency, minConcurrency: minConcurrency, renderMode: renderMode, setConcurrency: setConcurrency, delayRenderTimeout: delayRenderTimeout, setDelayRenderTimeout: setDelayRenderTimeout, disallowParallelEncoding: disallowParallelEncoding, setDisallowParallelEncoding: setDisallowParallelEncoding, setDisableWebSecurity: setDisableWebSecurity, setIgnoreCertificateErrors: setIgnoreCertificateErrors, setHeadless: setHeadless, headless: headless, ignoreCertificateErrors: ignoreCertificateErrors, disableWebSecurity: disableWebSecurity, openGlOption: openGlOption, setOpenGlOption: setOpenGlOption, setEnvVariables: setEnvVariables, envVariables: envVariables, offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes, setMediaCacheSizeInBytes: setMediaCacheSizeInBytes, mediaCacheSizeInBytes: mediaCacheSizeInBytes, setOffthreadVideoCacheSizeInBytes: setOffthreadVideoCacheSizeInBytes, offthreadVideoThreads: offthreadVideoThreads, setOffthreadVideoThreads: setOffthreadVideoThreads, enableMultiProcessOnLinux: multiProcessOnLinux, setChromiumMultiProcessOnLinux: setChromiumMultiProcessOnLinux, codec: codec, userAgent: userAgent, setUserAgent: setUserAgent, setBeep: setBeepOnFinish, beep: beepOnFinish, repro: repro, setRepro: setRepro, hardwareAcceleration: hardwareAcceleration, setHardwareAcceleration: setHardwareAcceleration, chromeModeOption: chromeMode, setChromeModeOption: setChromeMode, darkMode: darkMode, setDarkMode: setDarkMode })) })
|
|
989
995
|
] })
|
|
990
996
|
] }));
|
|
991
997
|
};
|
|
@@ -104,10 +104,12 @@ const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark,
|
|
|
104
104
|
const [imageFormat, setImageFormat] = (0, react_1.useState)(() => initialStillImageFormat !== null && initialStillImageFormat !== void 0 ? initialStillImageFormat : 'png');
|
|
105
105
|
const [frame, setFrame] = (0, react_1.useState)(() => initialFrame);
|
|
106
106
|
const [logLevel, setLogLevel] = (0, react_1.useState)(() => initialLogLevel);
|
|
107
|
-
const [inputProps,
|
|
107
|
+
const [inputProps, _setInputProps] = (0, react_1.useState)(() => defaultProps);
|
|
108
|
+
const setInputProps = (0, react_1.useCallback)((updater) => {
|
|
109
|
+
_setInputProps(updater);
|
|
110
|
+
}, []);
|
|
108
111
|
const [delayRenderTimeout, setDelayRenderTimeout] = (0, react_1.useState)(initialDelayRenderTimeout !== null && initialDelayRenderTimeout !== void 0 ? initialDelayRenderTimeout : 30000);
|
|
109
112
|
const [mediaCacheSizeInBytes, setMediaCacheSizeInBytes] = (0, react_1.useState)(initialMediaCacheSizeInBytes);
|
|
110
|
-
const [saving, setSaving] = (0, react_1.useState)(false);
|
|
111
113
|
// Video-specific state
|
|
112
114
|
const [codec, setCodec] = (0, react_1.useState)(initialVideoCodec !== null && initialVideoCodec !== void 0 ? initialVideoCodec : 'h264');
|
|
113
115
|
const [container, setContainer] = (0, react_1.useState)(initialContainer !== null && initialContainer !== void 0 ? initialContainer : 'mp4');
|
|
@@ -420,7 +422,11 @@ const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark,
|
|
|
420
422
|
"Other"] }), jsx_runtime_1.jsxs(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'license', onClick: () => setTab('license'), children: [
|
|
421
423
|
jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(certificate_1.CertificateIcon, { style: render_modals_1.icon }) }),
|
|
422
424
|
"License"] })
|
|
423
|
-
] }), jsx_runtime_1.jsx("div", { style: render_modals_1.optionsPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: tab === 'general' ? (jsx_runtime_1.jsx(WebRenderModalBasic_1.WebRenderModalBasic, { renderMode: renderMode, resolvedComposition: resolvedComposition, imageFormat: imageFormat, setStillFormat: setStillFormat, frame: frame, onFrameChanged: onFrameChanged, onFrameSetDirectly: onFrameSetDirectly, container: container, setContainerFormat: setContainerFormat, setCodec: setCodecWithContainer, encodableVideoCodecs: encodableVideoCodecs, effectiveVideoCodec: effectiveVideoCodec, startFrame: finalStartFrame, setStartFrame: setStartFrame, endFrame: finalEndFrame, setEndFrame: setEndFrame, outName: outName, onOutNameChange: onOutNameChange, validationMessage: outnameValidation.valid ? null : outnameValidation.error.message, logLevel: logLevel, setLogLevel: setLogLevel })) : tab === 'data' ? (jsx_runtime_1.jsx(DataEditor_1.DataEditor, { defaultProps: inputProps, setDefaultProps: setInputProps, unresolvedComposition: unresolvedComposition,
|
|
425
|
+
] }), jsx_runtime_1.jsx("div", { style: render_modals_1.optionsPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: tab === 'general' ? (jsx_runtime_1.jsx(WebRenderModalBasic_1.WebRenderModalBasic, { renderMode: renderMode, resolvedComposition: resolvedComposition, imageFormat: imageFormat, setStillFormat: setStillFormat, frame: frame, onFrameChanged: onFrameChanged, onFrameSetDirectly: onFrameSetDirectly, container: container, setContainerFormat: setContainerFormat, setCodec: setCodecWithContainer, encodableVideoCodecs: encodableVideoCodecs, effectiveVideoCodec: effectiveVideoCodec, startFrame: finalStartFrame, setStartFrame: setStartFrame, endFrame: finalEndFrame, setEndFrame: setEndFrame, outName: outName, onOutNameChange: onOutNameChange, validationMessage: outnameValidation.valid ? null : outnameValidation.error.message, logLevel: logLevel, setLogLevel: setLogLevel })) : tab === 'data' ? (jsx_runtime_1.jsx(DataEditor_1.DataEditor, { defaultProps: inputProps, setDefaultProps: setInputProps, unresolvedComposition: unresolvedComposition, propsEditType: "input-props", canSaveDefaultProps: {
|
|
426
|
+
canUpdate: false,
|
|
427
|
+
reason: 'render dialogue',
|
|
428
|
+
determined: false,
|
|
429
|
+
} })) : tab === 'picture' ? (jsx_runtime_1.jsx(WebRenderModalPicture_1.WebRenderModalPicture, { renderMode: renderMode, videoBitrate: videoBitrate, setVideoBitrate: setVideoBitrate, keyframeIntervalInSeconds: keyframeIntervalInSeconds, setKeyframeIntervalInSeconds: setKeyframeIntervalInSeconds, transparent: transparent, setTransparent: setTransparent, scale: scale, setScale: setScale, compositionWidth: resolvedComposition.width, compositionHeight: resolvedComposition.height })) : tab === 'audio' ? (jsx_runtime_1.jsx(WebRenderModalAudio_1.WebRenderModalAudio, { renderMode: renderMode, muted: muted, setMuted: setMuted, audioCodec: audioCodec, setAudioCodec: setAudioCodec, audioBitrate: audioBitrate, setAudioBitrate: setAudioBitrate, container: container, encodableCodecs: encodableAudioCodecs, effectiveAudioCodec: effectiveAudioCodec })) : tab === 'advanced' ? (jsx_runtime_1.jsx(WebRenderModalAdvanced_1.WebRenderModalAdvanced, { renderMode: renderMode, delayRenderTimeout: delayRenderTimeout, setDelayRenderTimeout: setDelayRenderTimeout, mediaCacheSizeInBytes: mediaCacheSizeInBytes, setMediaCacheSizeInBytes: setMediaCacheSizeInBytes, hardwareAcceleration: hardwareAcceleration, setHardwareAcceleration: setHardwareAcceleration })) : (jsx_runtime_1.jsx(WebRenderModalLicense_1.WebRenderModalLicense, { licenseKey: licenseKey, setLicenseKey: setLicenseKey, initialPublicLicenseKey: initialLicenseKey })) })
|
|
424
430
|
] })
|
|
425
431
|
] }));
|
|
426
432
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { RenderType } from './RenderModalAdvanced';
|
|
2
2
|
export declare const getDefaultCodecs: ({ defaultConfigurationVideoCodec, compositionDefaultVideoCodec, renderType, defaultConfigurationAudioCodec, }: {
|
|
3
|
-
defaultConfigurationVideoCodec: "aac" | "gif" | "h264" | "h264-mkv" | "h264-ts" | "h265" | "mp3" | "prores" | "vp8" | "vp9" | "wav" | null;
|
|
3
|
+
defaultConfigurationVideoCodec: "aac" | "av1" | "gif" | "h264" | "h264-mkv" | "h264-ts" | "h265" | "mp3" | "prores" | "vp8" | "vp9" | "wav" | null;
|
|
4
4
|
defaultConfigurationAudioCodec: "aac" | "mp3" | "opus" | "pcm-16" | null;
|
|
5
|
-
compositionDefaultVideoCodec: "aac" | "gif" | "h264" | "h264-mkv" | "h264-ts" | "h265" | "mp3" | "prores" | "vp8" | "vp9" | "wav" | null;
|
|
5
|
+
compositionDefaultVideoCodec: "aac" | "av1" | "gif" | "h264" | "h264-mkv" | "h264-ts" | "h265" | "mp3" | "prores" | "vp8" | "vp9" | "wav" | null;
|
|
6
6
|
renderType: RenderType;
|
|
7
7
|
}) => {
|
|
8
8
|
initialAudioCodec: "aac" | "mp3" | "opus" | "pcm-16" | null;
|
|
9
|
-
initialVideoCodec: "aac" | "gif" | "h264" | "h264-mkv" | "h264-ts" | "h265" | "mp3" | "prores" | "vp8" | "vp9" | "wav";
|
|
9
|
+
initialVideoCodec: "aac" | "av1" | "gif" | "h264" | "h264-mkv" | "h264-ts" | "h265" | "mp3" | "prores" | "vp8" | "vp9" | "wav";
|
|
10
10
|
initialRenderType: RenderType;
|
|
11
|
-
initialVideoCodecForAudioTab: "aac" | "gif" | "h264" | "h264-mkv" | "h264-ts" | "h265" | "mp3" | "prores" | "vp8" | "vp9" | "wav";
|
|
12
|
-
initialVideoCodecForVideoTab: "aac" | "gif" | "h264" | "h264-mkv" | "h264-ts" | "h265" | "mp3" | "prores" | "vp8" | "vp9" | "wav";
|
|
11
|
+
initialVideoCodecForAudioTab: "aac" | "av1" | "gif" | "h264" | "h264-mkv" | "h264-ts" | "h265" | "mp3" | "prores" | "vp8" | "vp9" | "wav";
|
|
12
|
+
initialVideoCodecForVideoTab: "aac" | "av1" | "gif" | "h264" | "h264-mkv" | "h264-ts" | "h265" | "mp3" | "prores" | "vp8" | "vp9" | "wav";
|
|
13
13
|
};
|
|
@@ -6,10 +6,9 @@ export type TypeCanSaveState = {
|
|
|
6
6
|
reason: string;
|
|
7
7
|
determined: boolean;
|
|
8
8
|
};
|
|
9
|
-
export declare const defaultTypeCanSaveState: TypeCanSaveState;
|
|
10
9
|
export declare const getRenderModalWarnings: ({ cliProps, canSaveDefaultProps, isCustomDateUsed, customFileUsed, jsMapUsed, jsSetUsed, inJSONEditor, propsEditType, }: {
|
|
11
10
|
cliProps: unknown;
|
|
12
|
-
canSaveDefaultProps: TypeCanSaveState;
|
|
11
|
+
canSaveDefaultProps: TypeCanSaveState | null;
|
|
13
12
|
isCustomDateUsed: boolean;
|
|
14
13
|
customFileUsed: boolean;
|
|
15
14
|
jsMapUsed: boolean;
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getRenderModalWarnings =
|
|
3
|
+
exports.getRenderModalWarnings = void 0;
|
|
4
4
|
const no_react_1 = require("remotion/no-react");
|
|
5
|
-
exports.defaultTypeCanSaveState = {
|
|
6
|
-
canUpdate: false,
|
|
7
|
-
reason: 'Loading...',
|
|
8
|
-
determined: false,
|
|
9
|
-
};
|
|
10
5
|
const getInputPropsWarning = ({ cliProps, propsEditType, }) => {
|
|
11
6
|
if (Object.keys(cliProps).length > 0 &&
|
|
12
7
|
propsEditType === 'default-props') {
|
|
@@ -15,6 +10,9 @@ const getInputPropsWarning = ({ cliProps, propsEditType, }) => {
|
|
|
15
10
|
return null;
|
|
16
11
|
};
|
|
17
12
|
const getCannotSaveDefaultProps = (canSaveDefaultProps) => {
|
|
13
|
+
if (canSaveDefaultProps === null) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
18
16
|
if (canSaveDefaultProps.canUpdate) {
|
|
19
17
|
return null;
|
|
20
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const humanReadableCodec: (codec: "aac" | "gif" | "h264" | "h264-mkv" | "h264-ts" | "h265" | "mp3" | "prores" | "vp8" | "vp9" | "wav") => "AAC" | "GIF" | "H.264" | "H.264 (Matroska)" | "H.264 (Transport Stream)" | "H.265" | "MP3" | "ProRes" | "VP8" | "VP9" | "Waveform";
|
|
1
|
+
export declare const humanReadableCodec: (codec: "aac" | "av1" | "gif" | "h264" | "h264-mkv" | "h264-ts" | "h265" | "mp3" | "prores" | "vp8" | "vp9" | "wav") => "AAC" | "AV1" | "GIF" | "H.264" | "H.264 (Matroska)" | "H.264 (Transport Stream)" | "H.265" | "MP3" | "ProRes" | "VP8" | "VP9" | "Waveform";
|