@remotion/cli 3.3.83 → 3.3.86
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/editor/components/Splitter/SplitterElement.js +1 -0
- package/dist/editor/components/TimeValue.js +3 -4
- package/dist/editor/components/Timeline/TimelineListItem.js +9 -1
- package/package.json +6 -6
- package/dist/cloudrun-command.d.ts +0 -1
- package/dist/cloudrun-command.js +0 -27
- package/dist/codemods/update-default-props.d.ts +0 -5
- package/dist/codemods/update-default-props.js +0 -143
- package/dist/color-math.d.ts +0 -1
- package/dist/color-math.js +0 -12
- package/dist/config/jpeg-quality.d.ts +0 -2
- package/dist/config/jpeg-quality.js +0 -17
- package/dist/convert-entry-point-to-serve-url.d.ts +0 -1
- package/dist/convert-entry-point-to-serve-url.js +0 -15
- package/dist/editor/components/Checkbox.d.ts +0 -6
- package/dist/editor/components/Checkbox.js +0 -42
- package/dist/editor/components/CheckerboardProvider.d.ts +0 -4
- package/dist/editor/components/CheckerboardProvider.js +0 -24
- package/dist/editor/components/CollapsableOptions.d.ts +0 -6
- package/dist/editor/components/CollapsableOptions.js +0 -35
- package/dist/editor/components/CurrentCompositionSideEffects.d.ts +0 -3
- package/dist/editor/components/CurrentCompositionSideEffects.js +0 -51
- package/dist/editor/components/InlineAction.d.ts +0 -5
- package/dist/editor/components/InlineAction.js +0 -35
- package/dist/editor/components/MediaVolumeProvider.d.ts +0 -4
- package/dist/editor/components/MediaVolumeProvider.js +0 -25
- package/dist/editor/components/Modals.d.ts +0 -2
- package/dist/editor/components/Modals.js +0 -23
- package/dist/editor/components/ModalsProvider.d.ts +0 -4
- package/dist/editor/components/ModalsProvider.js +0 -17
- package/dist/editor/components/NewComposition/RemInputTypeColor.d.ts +0 -8
- package/dist/editor/components/NewComposition/RemInputTypeColor.js +0 -53
- package/dist/editor/components/NewComposition/RemTextarea.d.ts +0 -7
- package/dist/editor/components/NewComposition/RemTextarea.js +0 -92
- package/dist/editor/components/PlayerEmitterContext.d.ts +0 -4
- package/dist/editor/components/PlayerEmitterContext.js +0 -11
- package/dist/editor/components/RenderButton.d.ts +0 -6
- package/dist/editor/components/RenderButton.js +0 -73
- package/dist/editor/components/RenderModal/CliCopyButton.d.ts +0 -4
- package/dist/editor/components/RenderModal/CliCopyButton.js +0 -22
- package/dist/editor/components/RenderModal/CrfSetting.d.ts +0 -16
- package/dist/editor/components/RenderModal/CrfSetting.js +0 -43
- package/dist/editor/components/RenderModal/EnforceAudioTrackSetting.d.ts +0 -8
- package/dist/editor/components/RenderModal/EnforceAudioTrackSetting.js +0 -16
- package/dist/editor/components/RenderModal/EnvInput.d.ts +0 -11
- package/dist/editor/components/RenderModal/EnvInput.js +0 -74
- package/dist/editor/components/RenderModal/FrameRangeSetting.d.ts +0 -8
- package/dist/editor/components/RenderModal/FrameRangeSetting.js +0 -42
- package/dist/editor/components/RenderModal/GuiRenderStatus.d.ts +0 -5
- package/dist/editor/components/RenderModal/GuiRenderStatus.js +0 -78
- package/dist/editor/components/RenderModal/InfoBubble.d.ts +0 -5
- package/dist/editor/components/RenderModal/InfoBubble.js +0 -115
- package/dist/editor/components/RenderModal/InfoTooltip.d.ts +0 -5
- package/dist/editor/components/RenderModal/InfoTooltip.js +0 -40
- package/dist/editor/components/RenderModal/InlineEyeIcon.d.ts +0 -5
- package/dist/editor/components/RenderModal/InlineEyeIcon.js +0 -14
- package/dist/editor/components/RenderModal/InlineRemoveButton.d.ts +0 -4
- package/dist/editor/components/RenderModal/InlineRemoveButton.js +0 -12
- package/dist/editor/components/RenderModal/JpegQualitySetting.d.ts +0 -5
- package/dist/editor/components/RenderModal/JpegQualitySetting.js +0 -12
- package/dist/editor/components/RenderModal/MutedSetting.d.ts +0 -8
- package/dist/editor/components/RenderModal/MutedSetting.js +0 -16
- package/dist/editor/components/RenderModal/NumberOfLoopsSetting.d.ts +0 -5
- package/dist/editor/components/RenderModal/NumberOfLoopsSetting.js +0 -26
- package/dist/editor/components/RenderModal/NumberSetting.d.ts +0 -12
- package/dist/editor/components/RenderModal/NumberSetting.js +0 -29
- package/dist/editor/components/RenderModal/OptionExplainer.d.ts +0 -5
- package/dist/editor/components/RenderModal/OptionExplainer.js +0 -45
- package/dist/editor/components/RenderModal/RenderModal.d.ts +0 -34
- package/dist/editor/components/RenderModal/RenderModal.js +0 -567
- package/dist/editor/components/RenderModal/RenderModalAdvanced.d.ts +0 -26
- package/dist/editor/components/RenderModal/RenderModalAdvanced.js +0 -61
- package/dist/editor/components/RenderModal/RenderModalAudio.d.ts +0 -17
- package/dist/editor/components/RenderModal/RenderModalAudio.js +0 -46
- package/dist/editor/components/RenderModal/RenderModalBasic.d.ts +0 -23
- package/dist/editor/components/RenderModal/RenderModalBasic.js +0 -79
- package/dist/editor/components/RenderModal/RenderModalData.d.ts +0 -9
- package/dist/editor/components/RenderModal/RenderModalData.js +0 -107
- package/dist/editor/components/RenderModal/RenderModalEnvironmentVariables.d.ts +0 -5
- package/dist/editor/components/RenderModal/RenderModalEnvironmentVariables.js +0 -55
- package/dist/editor/components/RenderModal/RenderModalGif.d.ts +0 -9
- package/dist/editor/components/RenderModal/RenderModalGif.js +0 -19
- package/dist/editor/components/RenderModal/RenderModalHr.d.ts +0 -2
- package/dist/editor/components/RenderModal/RenderModalHr.js +0 -18
- package/dist/editor/components/RenderModal/RenderModalInput.d.ts +0 -10
- package/dist/editor/components/RenderModal/RenderModalInput.js +0 -13
- package/dist/editor/components/RenderModal/RenderModalJSONInputPropsEditor.d.ts +0 -11
- package/dist/editor/components/RenderModal/RenderModalJSONInputPropsEditor.js +0 -118
- package/dist/editor/components/RenderModal/RenderModalPicture.d.ts +0 -28
- package/dist/editor/components/RenderModal/RenderModalPicture.js +0 -56
- package/dist/editor/components/RenderModal/RenderStatusModal.d.ts +0 -4
- package/dist/editor/components/RenderModal/RenderStatusModal.js +0 -72
- package/dist/editor/components/RenderModal/ScaleSetting.d.ts +0 -5
- package/dist/editor/components/RenderModal/ScaleSetting.js +0 -17
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaEditor.d.ts +0 -12
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaEditor.js +0 -72
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaEmptyStateGraphic.d.ts +0 -2
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaEmptyStateGraphic.js +0 -15
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaLabel.d.ts +0 -15
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaLabel.js +0 -40
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaResetButton.d.ts +0 -4
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaResetButton.js +0 -12
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaSaveButton.d.ts +0 -4
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaSaveButton.js +0 -12
- package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayEditor.d.ts +0 -14
- package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayEditor.js +0 -79
- package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayItemEditor.d.ts +0 -13
- package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayItemEditor.js +0 -28
- package/dist/editor/components/RenderModal/SchemaEditor/ZodBooleanEditor.d.ts +0 -12
- package/dist/editor/components/RenderModal/SchemaEditor/ZodBooleanEditor.js +0 -27
- package/dist/editor/components/RenderModal/SchemaEditor/ZodColorEditor.d.ts +0 -14
- package/dist/editor/components/RenderModal/SchemaEditor/ZodColorEditor.js +0 -108
- package/dist/editor/components/RenderModal/SchemaEditor/ZodDateEditor.d.ts +0 -14
- package/dist/editor/components/RenderModal/SchemaEditor/ZodDateEditor.js +0 -76
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEffectEditor.d.ts +0 -14
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEffectEditor.js +0 -51
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEnumEditor.d.ts +0 -14
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEnumEditor.js +0 -68
- package/dist/editor/components/RenderModal/SchemaEditor/ZodErrorMessages.d.ts +0 -5
- package/dist/editor/components/RenderModal/SchemaEditor/ZodErrorMessages.js +0 -23
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNonEditableValue.d.ts +0 -8
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNonEditableValue.js +0 -27
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNumberEditor.d.ts +0 -14
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNumberEditor.js +0 -89
- package/dist/editor/components/RenderModal/SchemaEditor/ZodObjectEditor.d.ts +0 -14
- package/dist/editor/components/RenderModal/SchemaEditor/ZodObjectEditor.js +0 -60
- package/dist/editor/components/RenderModal/SchemaEditor/ZodOrNullishEditor.d.ts +0 -15
- package/dist/editor/components/RenderModal/SchemaEditor/ZodOrNullishEditor.js +0 -45
- package/dist/editor/components/RenderModal/SchemaEditor/ZodStringEditor.d.ts +0 -14
- package/dist/editor/components/RenderModal/SchemaEditor/ZodStringEditor.js +0 -43
- package/dist/editor/components/RenderModal/SchemaEditor/ZodSwitch.d.ts +0 -14
- package/dist/editor/components/RenderModal/SchemaEditor/ZodSwitch.js +0 -69
- package/dist/editor/components/RenderModal/SchemaEditor/ZodUnionEditor.d.ts +0 -14
- package/dist/editor/components/RenderModal/SchemaEditor/ZodUnionEditor.js +0 -45
- package/dist/editor/components/RenderModal/SchemaEditor/create-zod-values.d.ts +0 -2
- package/dist/editor/components/RenderModal/SchemaEditor/create-zod-values.js +0 -153
- package/dist/editor/components/RenderModal/SchemaEditor/date-serialization.d.ts +0 -2
- package/dist/editor/components/RenderModal/SchemaEditor/date-serialization.js +0 -21
- package/dist/editor/components/RenderModal/SchemaEditor/get-schema-label.d.ts +0 -2
- package/dist/editor/components/RenderModal/SchemaEditor/get-schema-label.js +0 -15
- package/dist/editor/components/RenderModal/SchemaEditor/zod-types.d.ts +0 -1
- package/dist/editor/components/RenderModal/SchemaEditor/zod-types.js +0 -2
- package/dist/editor/components/RenderModal/human-readable-audio-codecs.d.ts +0 -2
- package/dist/editor/components/RenderModal/human-readable-audio-codecs.js +0 -18
- package/dist/editor/components/RenderModal/human-readable-codec.d.ts +0 -2
- package/dist/editor/components/RenderModal/human-readable-codec.js +0 -36
- package/dist/editor/components/RenderModal/layout.d.ts +0 -7
- package/dist/editor/components/RenderModal/layout.js +0 -46
- package/dist/editor/components/RenderModal/out-name-checker.d.ts +0 -15
- package/dist/editor/components/RenderModal/out-name-checker.js +0 -80
- package/dist/editor/components/RenderQueue/CircularProgress.d.ts +0 -5
- package/dist/editor/components/RenderQueue/CircularProgress.js +0 -18
- package/dist/editor/components/RenderQueue/RenderQueueError.d.ts +0 -5
- package/dist/editor/components/RenderQueue/RenderQueueError.js +0 -26
- package/dist/editor/components/RenderQueue/RenderQueueItem.d.ts +0 -5
- package/dist/editor/components/RenderQueue/RenderQueueItem.js +0 -40
- package/dist/editor/components/RenderQueue/RenderQueueItemCancelButton.d.ts +0 -5
- package/dist/editor/components/RenderQueue/RenderQueueItemCancelButton.js +0 -22
- package/dist/editor/components/RenderQueue/RenderQueueItemStatus.d.ts +0 -5
- package/dist/editor/components/RenderQueue/RenderQueueItemStatus.js +0 -43
- package/dist/editor/components/RenderQueue/RenderQueueOpenInFolder.d.ts +0 -5
- package/dist/editor/components/RenderQueue/RenderQueueOpenInFolder.js +0 -22
- package/dist/editor/components/RenderQueue/RenderQueueOutputName.d.ts +0 -5
- package/dist/editor/components/RenderQueue/RenderQueueOutputName.js +0 -26
- package/dist/editor/components/RenderQueue/RenderQueueProgressMessage.d.ts +0 -5
- package/dist/editor/components/RenderQueue/RenderQueueProgressMessage.js +0 -26
- package/dist/editor/components/RenderQueue/RenderQueueRemoveItem.d.ts +0 -5
- package/dist/editor/components/RenderQueue/RenderQueueRemoveItem.js +0 -33
- package/dist/editor/components/RenderQueue/RenderQueueRepeat.d.ts +0 -5
- package/dist/editor/components/RenderQueue/RenderQueueRepeat.js +0 -22
- package/dist/editor/components/RenderQueue/SuccessIcon.d.ts +0 -2
- package/dist/editor/components/RenderQueue/SuccessIcon.js +0 -14
- package/dist/editor/components/RenderQueue/actions.d.ts +0 -60
- package/dist/editor/components/RenderQueue/actions.js +0 -120
- package/dist/editor/components/RenderQueue/context.d.ts +0 -18
- package/dist/editor/components/RenderQueue/context.js +0 -49
- package/dist/editor/components/RenderQueue/index.d.ts +0 -2
- package/dist/editor/components/RenderQueue/index.js +0 -19
- package/dist/editor/components/RenderQueue/item-style.d.ts +0 -2
- package/dist/editor/components/RenderQueue/item-style.js +0 -21
- package/dist/editor/components/RenderToolbarIcon.d.ts +0 -2
- package/dist/editor/components/RenderToolbarIcon.js +0 -86
- package/dist/editor/components/RendersTab.d.ts +0 -6
- package/dist/editor/components/RendersTab.js +0 -43
- package/dist/editor/components/RightPanel.d.ts +0 -8
- package/dist/editor/components/RightPanel.js +0 -76
- package/dist/editor/components/SegmentedControl.d.ts +0 -16
- package/dist/editor/components/SegmentedControl.js +0 -63
- package/dist/editor/components/SetTimelineInOutProvider.d.ts +0 -4
- package/dist/editor/components/SetTimelineInOutProvider.js +0 -19
- package/dist/editor/components/SidebarCollapserControls.d.ts +0 -2
- package/dist/editor/components/SidebarCollapserControls.js +0 -122
- package/dist/editor/components/Tabs/index.d.ts +0 -12
- package/dist/editor/components/Tabs/index.js +0 -58
- package/dist/editor/components/Tabs/vertical.d.ts +0 -12
- package/dist/editor/components/Tabs/vertical.js +0 -57
- package/dist/editor/components/ZoomGesturesProvider.d.ts +0 -4
- package/dist/editor/components/ZoomGesturesProvider.js +0 -24
- package/dist/editor/helpers/client-id.d.ts +0 -17
- package/dist/editor/helpers/client-id.js +0 -46
- package/dist/editor/helpers/convert-env-variables.d.ts +0 -2
- package/dist/editor/helpers/convert-env-variables.js +0 -20
- package/dist/editor/helpers/prores-labels.d.ts +0 -2
- package/dist/editor/helpers/prores-labels.js +0 -25
- package/dist/editor/helpers/render-modal-sections.d.ts +0 -10
- package/dist/editor/helpers/render-modal-sections.js +0 -32
- package/dist/editor/helpers/use-breakpoint.d.ts +0 -1
- package/dist/editor/helpers/use-breakpoint.js +0 -17
- package/dist/editor/helpers/use-file-existence.d.ts +0 -1
- package/dist/editor/helpers/use-file-existence.js +0 -66
- package/dist/editor/icons/RenderStillIcon.d.ts +0 -3
- package/dist/editor/icons/RenderStillIcon.js +0 -8
- package/dist/editor/icons/audio.d.ts +0 -2
- package/dist/editor/icons/audio.js +0 -6
- package/dist/editor/icons/data.d.ts +0 -2
- package/dist/editor/icons/data.js +0 -8
- package/dist/editor/icons/file.d.ts +0 -2
- package/dist/editor/icons/file.js +0 -6
- package/dist/editor/icons/frame.d.ts +0 -2
- package/dist/editor/icons/frame.js +0 -6
- package/dist/editor/icons/gear.d.ts +0 -2
- package/dist/editor/icons/gear.js +0 -6
- package/dist/editor/icons/gif.d.ts +0 -2
- package/dist/editor/icons/gif.js +0 -6
- package/dist/editor/icons/render.d.ts +0 -8
- package/dist/editor/icons/render.js +0 -12
- package/dist/editor/icons/video.d.ts +0 -5
- package/dist/editor/icons/video.js +0 -8
- package/dist/ffmpeg.d.ts +0 -2
- package/dist/ffmpeg.js +0 -21
- package/dist/file-watcher.d.ts +0 -9
- package/dist/file-watcher.js +0 -35
- package/dist/get-default-out-name.d.ts +0 -5
- package/dist/get-default-out-name.js +0 -10
- package/dist/preview-server/api-routes.d.ts +0 -4
- package/dist/preview-server/api-routes.js +0 -21
- package/dist/preview-server/api-types.d.ts +0 -29
- package/dist/preview-server/api-types.js +0 -2
- package/dist/preview-server/file-existence-watchers.d.ts +0 -13
- package/dist/preview-server/file-existence-watchers.js +0 -62
- package/dist/preview-server/handler.d.ts +0 -9
- package/dist/preview-server/handler.js +0 -34
- package/dist/preview-server/parse-body.d.ts +0 -2
- package/dist/preview-server/parse-body.js +0 -16
- package/dist/preview-server/render-queue/get-default-video-contexts.d.ts +0 -10
- package/dist/preview-server/render-queue/get-default-video-contexts.js +0 -13
- package/dist/preview-server/render-queue/job.d.ts +0 -138
- package/dist/preview-server/render-queue/job.js +0 -2
- package/dist/preview-server/render-queue/make-retry-payload.d.ts +0 -3
- package/dist/preview-server/render-queue/make-retry-payload.js +0 -89
- package/dist/preview-server/render-queue/open-directory-in-finder.d.ts +0 -1
- package/dist/preview-server/render-queue/open-directory-in-finder.js +0 -43
- package/dist/preview-server/render-queue/process-still.d.ts +0 -8
- package/dist/preview-server/render-queue/process-still.js +0 -46
- package/dist/preview-server/render-queue/process-video.d.ts +0 -8
- package/dist/preview-server/render-queue/process-video.js +0 -63
- package/dist/preview-server/render-queue/queue.d.ts +0 -21
- package/dist/preview-server/render-queue/queue.js +0 -208
- package/dist/preview-server/routes/add-render.d.ts +0 -3
- package/dist/preview-server/routes/add-render.js +0 -76
- package/dist/preview-server/routes/can-update-default-props.d.ts +0 -4
- package/dist/preview-server/routes/can-update-default-props.js +0 -39
- package/dist/preview-server/routes/cancel-render.d.ts +0 -3
- package/dist/preview-server/routes/cancel-render.js +0 -9
- package/dist/preview-server/routes/open-in-file-explorer.d.ts +0 -3
- package/dist/preview-server/routes/open-in-file-explorer.js +0 -8
- package/dist/preview-server/routes/remove-render.d.ts +0 -3
- package/dist/preview-server/routes/remove-render.js +0 -9
- package/dist/preview-server/routes/subscribe-to-file-existence.d.ts +0 -3
- package/dist/preview-server/routes/subscribe-to-file-existence.js +0 -13
- package/dist/preview-server/routes/unsubscribe-from-file-existence.d.ts +0 -3
- package/dist/preview-server/routes/unsubscribe-from-file-existence.js +0 -13
- package/dist/preview-server/routes/update-default-props.d.ts +0 -3
- package/dist/preview-server/routes/update-default-props.js +0 -24
- package/dist/progress-types.d.ts +0 -32
- package/dist/progress-types.js +0 -17
- package/dist/render-flows/render.d.ts +0 -47
- package/dist/render-flows/render.js +0 -290
- package/dist/render-flows/still.d.ts +0 -29
- package/dist/render-flows/still.js +0 -168
- package/dist/required-chromium-options.d.ts +0 -3
- package/dist/required-chromium-options.js +0 -2
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ZodOrNullishEditor = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const colors_1 = require("../../../helpers/colors");
|
|
7
|
-
const Checkbox_1 = require("../../Checkbox");
|
|
8
|
-
const layout_1 = require("../../layout");
|
|
9
|
-
const create_zod_values_1 = require("./create-zod-values");
|
|
10
|
-
const SchemaLabel_1 = require("./SchemaLabel");
|
|
11
|
-
const ZodSwitch_1 = require("./ZodSwitch");
|
|
12
|
-
const fullWidth = {
|
|
13
|
-
width: '100%',
|
|
14
|
-
};
|
|
15
|
-
const labelStyle = {
|
|
16
|
-
fontFamily: 'sans-serif',
|
|
17
|
-
fontSize: 14,
|
|
18
|
-
color: colors_1.LIGHT_TEXT,
|
|
19
|
-
};
|
|
20
|
-
const checkBoxWrapper = {
|
|
21
|
-
margin: '2px',
|
|
22
|
-
display: 'flex',
|
|
23
|
-
flexDirection: 'row',
|
|
24
|
-
alignItems: 'center',
|
|
25
|
-
marginTop: '5px',
|
|
26
|
-
};
|
|
27
|
-
const ZodOrNullishEditor = ({ jsonPath, compact, schema, setValue, onSave, defaultValue, value, showSaveButton, onRemove, nullishValue, }) => {
|
|
28
|
-
const isChecked = value === nullishValue;
|
|
29
|
-
const onValueChange = (0, react_1.useCallback)((newValue) => {
|
|
30
|
-
setValue(newValue);
|
|
31
|
-
}, [setValue]);
|
|
32
|
-
const onCheckBoxChange = (0, react_1.useCallback)((e) => {
|
|
33
|
-
console.log({ schema, newVal: (0, create_zod_values_1.createZodValues)(schema) });
|
|
34
|
-
const val = e.target.checked ? nullishValue : (0, create_zod_values_1.createZodValues)(schema);
|
|
35
|
-
onValueChange(val);
|
|
36
|
-
}, [nullishValue, onValueChange, schema]);
|
|
37
|
-
const reset = (0, react_1.useCallback)(() => {
|
|
38
|
-
onValueChange(defaultValue);
|
|
39
|
-
}, [defaultValue, onValueChange]);
|
|
40
|
-
const save = (0, react_1.useCallback)(() => {
|
|
41
|
-
onSave(() => value);
|
|
42
|
-
}, [onSave, value]);
|
|
43
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [value === null ? ((0, jsx_runtime_1.jsx)(SchemaLabel_1.SchemaLabel, { isDefaultValue: value === defaultValue, jsonPath: jsonPath, onReset: reset, onSave: save, showSaveButton: showSaveButton, compact: compact, onRemove: onRemove })) : ((0, jsx_runtime_1.jsx)("div", { style: fullWidth, children: (0, jsx_runtime_1.jsx)(ZodSwitch_1.ZodSwitch, { value: value, setValue: onValueChange, jsonPath: jsonPath, schema: schema, compact: compact, defaultValue: defaultValue, onSave: onSave, showSaveButton: showSaveButton, onRemove: onRemove }) })), (0, jsx_runtime_1.jsxs)("div", { style: checkBoxWrapper, children: [(0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: isChecked, onChange: onCheckBoxChange, disabled: false }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), (0, jsx_runtime_1.jsx)("div", { style: labelStyle, children: String(nullishValue) })] })] }));
|
|
44
|
-
};
|
|
45
|
-
exports.ZodOrNullishEditor = ZodOrNullishEditor;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { z } from 'remotion';
|
|
3
|
-
import type { JSONPath } from './zod-types';
|
|
4
|
-
export declare const ZodStringEditor: React.FC<{
|
|
5
|
-
schema: z.ZodTypeAny;
|
|
6
|
-
jsonPath: JSONPath;
|
|
7
|
-
value: string;
|
|
8
|
-
defaultValue: string;
|
|
9
|
-
setValue: React.Dispatch<React.SetStateAction<string>>;
|
|
10
|
-
onSave: (updater: (oldNum: unknown) => string) => void;
|
|
11
|
-
onRemove: null | (() => void);
|
|
12
|
-
compact: boolean;
|
|
13
|
-
showSaveButton: boolean;
|
|
14
|
-
}>;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ZodStringEditor = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const layout_1 = require("../../layout");
|
|
7
|
-
const RemInput_1 = require("../../NewComposition/RemInput");
|
|
8
|
-
const ValidationMessage_1 = require("../../NewComposition/ValidationMessage");
|
|
9
|
-
const layout_2 = require("../layout");
|
|
10
|
-
const SchemaLabel_1 = require("./SchemaLabel");
|
|
11
|
-
const fullWidth = {
|
|
12
|
-
width: '100%',
|
|
13
|
-
};
|
|
14
|
-
const ZodStringEditor = ({ jsonPath, value, setValue, showSaveButton, defaultValue, schema, compact, onSave, onRemove, }) => {
|
|
15
|
-
const [localValue, setLocalValue] = (0, react_1.useState)(() => {
|
|
16
|
-
return {
|
|
17
|
-
value,
|
|
18
|
-
zodValidation: schema.safeParse(value),
|
|
19
|
-
};
|
|
20
|
-
});
|
|
21
|
-
const onValueChange = (0, react_1.useCallback)((newValue) => {
|
|
22
|
-
const safeParse = schema.safeParse(newValue);
|
|
23
|
-
const newLocalState = {
|
|
24
|
-
value: newValue,
|
|
25
|
-
zodValidation: safeParse,
|
|
26
|
-
};
|
|
27
|
-
setLocalValue(newLocalState);
|
|
28
|
-
if (safeParse.success) {
|
|
29
|
-
setValue(newValue);
|
|
30
|
-
}
|
|
31
|
-
}, [schema, setValue]);
|
|
32
|
-
const onChange = (0, react_1.useCallback)((e) => {
|
|
33
|
-
onValueChange(e.target.value);
|
|
34
|
-
}, [onValueChange]);
|
|
35
|
-
const reset = (0, react_1.useCallback)(() => {
|
|
36
|
-
onValueChange(defaultValue);
|
|
37
|
-
}, [defaultValue, onValueChange]);
|
|
38
|
-
const save = (0, react_1.useCallback)(() => {
|
|
39
|
-
onSave(() => value);
|
|
40
|
-
}, [onSave, value]);
|
|
41
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: compact ? layout_2.narrowOption : layout_2.optionRow, children: [(0, jsx_runtime_1.jsx)(SchemaLabel_1.SchemaLabel, { compact: compact, isDefaultValue: value === defaultValue, jsonPath: jsonPath, onReset: reset, onSave: save, showSaveButton: showSaveButton, onRemove: onRemove }), (0, jsx_runtime_1.jsxs)("div", { style: fullWidth, children: [(0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { value: localValue.value, status: localValue.zodValidation.success ? 'ok' : 'error', placeholder: jsonPath.join('.'), onChange: onChange }), !localValue.zodValidation.success && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1, block: true }), (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-end", message: localValue.zodValidation.error.format()._errors[0], type: "error" })] }))] })] }));
|
|
42
|
-
};
|
|
43
|
-
exports.ZodStringEditor = ZodStringEditor;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { z } from 'remotion';
|
|
3
|
-
import type { JSONPath } from './zod-types';
|
|
4
|
-
export declare const ZodSwitch: React.FC<{
|
|
5
|
-
schema: z.ZodTypeAny;
|
|
6
|
-
jsonPath: JSONPath;
|
|
7
|
-
value: unknown;
|
|
8
|
-
defaultValue: unknown;
|
|
9
|
-
setValue: React.Dispatch<React.SetStateAction<unknown>>;
|
|
10
|
-
onSave: (newValue: (oldVal: unknown) => unknown) => void;
|
|
11
|
-
compact: boolean;
|
|
12
|
-
showSaveButton: boolean;
|
|
13
|
-
onRemove: null | (() => void);
|
|
14
|
-
}>;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ZodSwitch = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const remotion_1 = require("remotion");
|
|
6
|
-
const ZodArrayEditor_1 = require("./ZodArrayEditor");
|
|
7
|
-
const ZodBooleanEditor_1 = require("./ZodBooleanEditor");
|
|
8
|
-
const ZodColorEditor_1 = require("./ZodColorEditor");
|
|
9
|
-
const ZodDateEditor_1 = require("./ZodDateEditor");
|
|
10
|
-
const ZodEffectEditor_1 = require("./ZodEffectEditor");
|
|
11
|
-
const ZodEnumEditor_1 = require("./ZodEnumEditor");
|
|
12
|
-
const ZodNonEditableValue_1 = require("./ZodNonEditableValue");
|
|
13
|
-
const ZodNumberEditor_1 = require("./ZodNumberEditor");
|
|
14
|
-
const ZodObjectEditor_1 = require("./ZodObjectEditor");
|
|
15
|
-
const ZodStringEditor_1 = require("./ZodStringEditor");
|
|
16
|
-
const ZodUnionEditor_1 = require("./ZodUnionEditor");
|
|
17
|
-
const ZodSwitch = ({ schema, jsonPath, compact, value, setValue, defaultValue, onSave, showSaveButton, onRemove, }) => {
|
|
18
|
-
const def = schema._def;
|
|
19
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20
|
-
const typeName = def.typeName;
|
|
21
|
-
// TODO: (Maybe?) enable saving of inserted input props by cmd+s /ctrl + s (also for JSON view)
|
|
22
|
-
if (typeName === remotion_1.z.ZodFirstPartyTypeKind.ZodObject) {
|
|
23
|
-
return ((0, jsx_runtime_1.jsx)(ZodObjectEditor_1.ZodObjectEditor, { setValue: setValue, value: value, defaultValue: defaultValue, jsonPath: jsonPath, schema: schema, compact: compact, onSave: onSave, showSaveButton: showSaveButton, onRemove: onRemove }));
|
|
24
|
-
}
|
|
25
|
-
if (typeName === remotion_1.z.ZodFirstPartyTypeKind.ZodString) {
|
|
26
|
-
return ((0, jsx_runtime_1.jsx)(ZodStringEditor_1.ZodStringEditor, { value: value, setValue: setValue, jsonPath: jsonPath, schema: schema, compact: compact, onSave: onSave, defaultValue: defaultValue, showSaveButton: showSaveButton, onRemove: onRemove }));
|
|
27
|
-
}
|
|
28
|
-
if (typeName === remotion_1.z.ZodFirstPartyTypeKind.ZodDate) {
|
|
29
|
-
return ((0, jsx_runtime_1.jsx)(ZodDateEditor_1.ZodDateEditor, { value: value, setValue: setValue, jsonPath: jsonPath, schema: schema, compact: compact, onSave: onSave, defaultValue: defaultValue, showSaveButton: showSaveButton, onRemove: onRemove }));
|
|
30
|
-
}
|
|
31
|
-
if (typeName === remotion_1.z.ZodFirstPartyTypeKind.ZodNumber) {
|
|
32
|
-
return ((0, jsx_runtime_1.jsx)(ZodNumberEditor_1.ZodNumberEditor, { value: value, setValue: setValue, jsonPath: jsonPath, schema: schema, compact: compact, defaultValue: defaultValue, onSave: onSave, showSaveButton: showSaveButton, onRemove: onRemove }));
|
|
33
|
-
}
|
|
34
|
-
if (typeName === remotion_1.z.ZodFirstPartyTypeKind.ZodBoolean) {
|
|
35
|
-
return ((0, jsx_runtime_1.jsx)(ZodBooleanEditor_1.ZodBooleanEditor, { value: value, setValue: setValue, jsonPath: jsonPath, compact: compact, defaultValue: defaultValue, onSave: onSave, showSaveButton: showSaveButton, onRemove: onRemove }));
|
|
36
|
-
}
|
|
37
|
-
if (typeName === remotion_1.z.ZodFirstPartyTypeKind.ZodUndefined) {
|
|
38
|
-
return ((0, jsx_runtime_1.jsx)(ZodNonEditableValue_1.ZonNonEditableValue, { compact: compact, jsonPath: jsonPath, showSaveButton: showSaveButton, label: 'undefined' }));
|
|
39
|
-
}
|
|
40
|
-
if (typeName === remotion_1.z.ZodFirstPartyTypeKind.ZodNull) {
|
|
41
|
-
return ((0, jsx_runtime_1.jsx)(ZodNonEditableValue_1.ZonNonEditableValue, { compact: compact, jsonPath: jsonPath, showSaveButton: showSaveButton, label: 'null' }));
|
|
42
|
-
}
|
|
43
|
-
if (typeName === remotion_1.z.ZodFirstPartyTypeKind.ZodAny) {
|
|
44
|
-
return ((0, jsx_runtime_1.jsx)(ZodNonEditableValue_1.ZonNonEditableValue, { compact: compact, jsonPath: jsonPath, showSaveButton: showSaveButton, label: 'any (not editable)' }));
|
|
45
|
-
}
|
|
46
|
-
if (typeName === remotion_1.z.ZodFirstPartyTypeKind.ZodBigInt) {
|
|
47
|
-
return ((0, jsx_runtime_1.jsx)(ZodNonEditableValue_1.ZonNonEditableValue, { compact: compact, jsonPath: jsonPath, showSaveButton: showSaveButton, label: 'BigInt (not editable)' }));
|
|
48
|
-
}
|
|
49
|
-
if (typeName === remotion_1.z.ZodFirstPartyTypeKind.ZodUnknown) {
|
|
50
|
-
return ((0, jsx_runtime_1.jsx)(ZodNonEditableValue_1.ZonNonEditableValue, { compact: compact, jsonPath: jsonPath, showSaveButton: showSaveButton, label: 'unknown (not editable)' }));
|
|
51
|
-
}
|
|
52
|
-
if (typeName === remotion_1.z.ZodFirstPartyTypeKind.ZodArray) {
|
|
53
|
-
return ((0, jsx_runtime_1.jsx)(ZodArrayEditor_1.ZodArrayEditor, { setValue: setValue, value: value, jsonPath: jsonPath, schema: schema, compact: compact, defaultValue: defaultValue, onSave: onSave, showSaveButton: showSaveButton, onRemove: onRemove }));
|
|
54
|
-
}
|
|
55
|
-
if (typeName === remotion_1.z.ZodFirstPartyTypeKind.ZodEnum) {
|
|
56
|
-
return ((0, jsx_runtime_1.jsx)(ZodEnumEditor_1.ZodEnumEditor, { setValue: setValue, value: value, jsonPath: jsonPath, schema: schema, compact: compact, defaultValue: defaultValue, onSave: onSave, showSaveButton: showSaveButton, onRemove: onRemove }));
|
|
57
|
-
}
|
|
58
|
-
if (typeName === remotion_1.z.ZodFirstPartyTypeKind.ZodEffects) {
|
|
59
|
-
if (schema._def.description === remotion_1.Internals.REMOTION_COLOR_BRAND) {
|
|
60
|
-
return ((0, jsx_runtime_1.jsx)(ZodColorEditor_1.ZodColorEditor, { value: value, setValue: setValue, jsonPath: jsonPath, schema: schema, compact: compact, onSave: onSave, defaultValue: defaultValue, showSaveButton: showSaveButton, onRemove: onRemove }));
|
|
61
|
-
}
|
|
62
|
-
return ((0, jsx_runtime_1.jsx)(ZodEffectEditor_1.ZodEffectEditor, { value: value, setValue: setValue, jsonPath: jsonPath, schema: schema, compact: compact, defaultValue: defaultValue, onSave: onSave, showSaveButton: showSaveButton, onRemove: onRemove }));
|
|
63
|
-
}
|
|
64
|
-
if (typeName === remotion_1.z.ZodFirstPartyTypeKind.ZodUnion) {
|
|
65
|
-
return ((0, jsx_runtime_1.jsx)(ZodUnionEditor_1.ZodUnionEditor, { schema: schema, showSaveButton: showSaveButton, jsonPath: jsonPath, compact: compact, value: value, defaultValue: defaultValue, setValue: setValue, onSave: onSave, onRemove: onRemove }));
|
|
66
|
-
}
|
|
67
|
-
return ((0, jsx_runtime_1.jsx)(ZodNonEditableValue_1.ZonNonEditableValue, { compact: compact, jsonPath: jsonPath, showSaveButton: showSaveButton, label: `${typeName} (not editable)` }));
|
|
68
|
-
};
|
|
69
|
-
exports.ZodSwitch = ZodSwitch;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { z } from 'remotion';
|
|
3
|
-
import type { JSONPath } from './zod-types';
|
|
4
|
-
export declare const ZodUnionEditor: React.FC<{
|
|
5
|
-
showSaveButton: boolean;
|
|
6
|
-
jsonPath: JSONPath;
|
|
7
|
-
compact: boolean;
|
|
8
|
-
value: unknown;
|
|
9
|
-
defaultValue: unknown;
|
|
10
|
-
schema: z.ZodTypeAny;
|
|
11
|
-
setValue: React.Dispatch<React.SetStateAction<unknown>>;
|
|
12
|
-
onSave: (updater: (oldNum: unknown) => unknown) => void;
|
|
13
|
-
onRemove: null | (() => void);
|
|
14
|
-
}>;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ZodUnionEditor = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const remotion_1 = require("remotion");
|
|
6
|
-
const ZodNonEditableValue_1 = require("./ZodNonEditableValue");
|
|
7
|
-
const ZodOrNullishEditor_1 = require("./ZodOrNullishEditor");
|
|
8
|
-
const findNull = (value) => {
|
|
9
|
-
const nullIndex = value.findIndex((v) => v._def.typeName === remotion_1.z.ZodFirstPartyTypeKind.ZodNull ||
|
|
10
|
-
v._def.typeName === remotion_1.z.ZodFirstPartyTypeKind.ZodUndefined);
|
|
11
|
-
if (nullIndex === -1) {
|
|
12
|
-
return null;
|
|
13
|
-
}
|
|
14
|
-
const nullishValue = value[nullIndex]._def.typeName === remotion_1.z.ZodFirstPartyTypeKind.ZodNull
|
|
15
|
-
? null
|
|
16
|
-
: undefined;
|
|
17
|
-
const otherSchema = value[nullIndex === 0 ? 1 : 0];
|
|
18
|
-
const otherSchemaIsAlsoNullish = otherSchema._def.typeName === remotion_1.z.ZodFirstPartyTypeKind.ZodNull ||
|
|
19
|
-
otherSchema._def.typeName === remotion_1.z.ZodFirstPartyTypeKind.ZodUndefined;
|
|
20
|
-
return {
|
|
21
|
-
nullIndex,
|
|
22
|
-
nullishValue,
|
|
23
|
-
otherSchema,
|
|
24
|
-
otherSchemaIsAlsoNullish,
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
const ZodUnionEditor = ({ jsonPath, compact, schema, setValue, onSave, defaultValue, value, showSaveButton, onRemove, }) => {
|
|
28
|
-
const { options } = schema._def;
|
|
29
|
-
if (options.length > 2) {
|
|
30
|
-
return ((0, jsx_runtime_1.jsx)(ZodNonEditableValue_1.ZonNonEditableValue, { jsonPath: jsonPath, label: 'Union with more than 2 options not editable', compact: compact, showSaveButton: showSaveButton }));
|
|
31
|
-
}
|
|
32
|
-
if (options.length < 2) {
|
|
33
|
-
return ((0, jsx_runtime_1.jsx)(ZodNonEditableValue_1.ZonNonEditableValue, { jsonPath: jsonPath, label: 'Union with less than 2 options not editable', compact: compact, showSaveButton: showSaveButton }));
|
|
34
|
-
}
|
|
35
|
-
const nullResult = findNull(options);
|
|
36
|
-
if (!nullResult) {
|
|
37
|
-
return ((0, jsx_runtime_1.jsx)(ZodNonEditableValue_1.ZonNonEditableValue, { jsonPath: jsonPath, label: 'Union only editable with 1 value being null', compact: compact, showSaveButton: showSaveButton }));
|
|
38
|
-
}
|
|
39
|
-
const { otherSchema, nullishValue, otherSchemaIsAlsoNullish } = nullResult;
|
|
40
|
-
if (otherSchemaIsAlsoNullish) {
|
|
41
|
-
return ((0, jsx_runtime_1.jsx)(ZodNonEditableValue_1.ZonNonEditableValue, { jsonPath: jsonPath, label: 'Not editable - both union values are nullish', compact: compact, showSaveButton: showSaveButton }));
|
|
42
|
-
}
|
|
43
|
-
return ((0, jsx_runtime_1.jsx)(ZodOrNullishEditor_1.ZodOrNullishEditor, { compact: compact, defaultValue: defaultValue, jsonPath: jsonPath, onRemove: onRemove, onSave: onSave, schema: otherSchema, setValue: setValue, showSaveButton: showSaveButton, value: value, nullishValue: nullishValue }));
|
|
44
|
-
};
|
|
45
|
-
exports.ZodUnionEditor = ZodUnionEditor;
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createZodValues = void 0;
|
|
4
|
-
const remotion_1 = require("remotion");
|
|
5
|
-
const createZodValues = (schema) => {
|
|
6
|
-
if (!schema) {
|
|
7
|
-
throw new Error('Invalid zod schema');
|
|
8
|
-
}
|
|
9
|
-
const def = schema._def;
|
|
10
|
-
const typeName = def.typeName;
|
|
11
|
-
switch (typeName) {
|
|
12
|
-
case remotion_1.z.ZodFirstPartyTypeKind.ZodString:
|
|
13
|
-
return '';
|
|
14
|
-
case remotion_1.z.ZodFirstPartyTypeKind.ZodNumber:
|
|
15
|
-
return 0;
|
|
16
|
-
case remotion_1.z.ZodFirstPartyTypeKind.ZodBigInt:
|
|
17
|
-
return BigInt(0);
|
|
18
|
-
case remotion_1.z.ZodFirstPartyTypeKind.ZodBoolean:
|
|
19
|
-
return false;
|
|
20
|
-
case remotion_1.z.ZodFirstPartyTypeKind.ZodNaN:
|
|
21
|
-
return NaN;
|
|
22
|
-
case remotion_1.z.ZodFirstPartyTypeKind.ZodDate:
|
|
23
|
-
return new Date();
|
|
24
|
-
case remotion_1.z.ZodFirstPartyTypeKind.ZodSymbol:
|
|
25
|
-
return Symbol('remotion');
|
|
26
|
-
case remotion_1.z.ZodFirstPartyTypeKind.ZodUndefined:
|
|
27
|
-
return undefined;
|
|
28
|
-
case remotion_1.z.ZodFirstPartyTypeKind.ZodNull:
|
|
29
|
-
return null;
|
|
30
|
-
case remotion_1.z.ZodFirstPartyTypeKind.ZodAny:
|
|
31
|
-
throw new Error('Cannot create a value for type z.any()');
|
|
32
|
-
case remotion_1.z.ZodFirstPartyTypeKind.ZodUnknown:
|
|
33
|
-
throw new Error('Cannot create a value for type z.unknown()');
|
|
34
|
-
case remotion_1.z.ZodFirstPartyTypeKind.ZodNever:
|
|
35
|
-
throw new Error('Cannot create a value for type z.never()');
|
|
36
|
-
case remotion_1.z.ZodFirstPartyTypeKind.ZodVoid:
|
|
37
|
-
return undefined;
|
|
38
|
-
case remotion_1.z.ZodFirstPartyTypeKind.ZodObject: {
|
|
39
|
-
const shape = def.shape();
|
|
40
|
-
const keys = Object.keys(shape);
|
|
41
|
-
const returnValue = keys.reduce((existing, key) => {
|
|
42
|
-
existing[key] = (0, exports.createZodValues)(shape[key]);
|
|
43
|
-
return existing;
|
|
44
|
-
}, {});
|
|
45
|
-
return returnValue;
|
|
46
|
-
}
|
|
47
|
-
case remotion_1.z.ZodFirstPartyTypeKind.ZodArray: {
|
|
48
|
-
return [(0, exports.createZodValues)(def.type)];
|
|
49
|
-
}
|
|
50
|
-
case remotion_1.z.ZodFirstPartyTypeKind.ZodUnion: {
|
|
51
|
-
const firstOptions = def.options[0];
|
|
52
|
-
return firstOptions ? (0, exports.createZodValues)(firstOptions) : undefined;
|
|
53
|
-
}
|
|
54
|
-
case remotion_1.z.ZodFirstPartyTypeKind.ZodDiscriminatedUnion: {
|
|
55
|
-
const options = def.options[0];
|
|
56
|
-
return (0, exports.createZodValues)(options);
|
|
57
|
-
}
|
|
58
|
-
case remotion_1.z.ZodFirstPartyTypeKind.ZodLiteral: {
|
|
59
|
-
return def.value;
|
|
60
|
-
}
|
|
61
|
-
case remotion_1.z.ZodFirstPartyTypeKind.ZodEffects: {
|
|
62
|
-
if (schema._def.description === remotion_1.Internals.REMOTION_COLOR_BRAND) {
|
|
63
|
-
return '#ffffff';
|
|
64
|
-
}
|
|
65
|
-
return (0, exports.createZodValues)(def.schema);
|
|
66
|
-
}
|
|
67
|
-
case remotion_1.z.ZodFirstPartyTypeKind.ZodIntersection: {
|
|
68
|
-
const { left, right } = def;
|
|
69
|
-
const leftValue = (0, exports.createZodValues)(left);
|
|
70
|
-
if (typeof leftValue !== 'object') {
|
|
71
|
-
throw new Error('Cannot create value for type z.intersection: Left side is not an object');
|
|
72
|
-
}
|
|
73
|
-
const rightValue = (0, exports.createZodValues)(right);
|
|
74
|
-
if (typeof rightValue !== 'object') {
|
|
75
|
-
throw new Error('Cannot create value for type z.intersection: Right side is not an object');
|
|
76
|
-
}
|
|
77
|
-
return { ...leftValue, ...rightValue };
|
|
78
|
-
}
|
|
79
|
-
case remotion_1.z.ZodFirstPartyTypeKind.ZodTuple: {
|
|
80
|
-
const items = def.items.map((item) => (0, exports.createZodValues)(item));
|
|
81
|
-
return items;
|
|
82
|
-
}
|
|
83
|
-
case remotion_1.z.ZodFirstPartyTypeKind.ZodRecord: {
|
|
84
|
-
const values = (0, exports.createZodValues)(def.valueType);
|
|
85
|
-
return { key: values };
|
|
86
|
-
}
|
|
87
|
-
case remotion_1.z.ZodFirstPartyTypeKind.ZodMap: {
|
|
88
|
-
const defType = def;
|
|
89
|
-
const values = (0, exports.createZodValues)(defType.valueType);
|
|
90
|
-
const key = (0, exports.createZodValues)(defType.keyType);
|
|
91
|
-
return new Map([[key, values]]);
|
|
92
|
-
}
|
|
93
|
-
case remotion_1.z.ZodFirstPartyTypeKind.ZodLazy: {
|
|
94
|
-
const defType = def;
|
|
95
|
-
const type = defType.getter();
|
|
96
|
-
return (0, exports.createZodValues)(type);
|
|
97
|
-
}
|
|
98
|
-
case remotion_1.z.ZodFirstPartyTypeKind.ZodSet: {
|
|
99
|
-
const defType = def;
|
|
100
|
-
const values = (0, exports.createZodValues)(defType.valueType);
|
|
101
|
-
return new Set([values]);
|
|
102
|
-
}
|
|
103
|
-
case remotion_1.z.ZodFirstPartyTypeKind.ZodFunction: {
|
|
104
|
-
throw new Error('Cannot create a value for type function');
|
|
105
|
-
}
|
|
106
|
-
case remotion_1.z.ZodFirstPartyTypeKind.ZodEnum: {
|
|
107
|
-
const { values } = def;
|
|
108
|
-
return values[0];
|
|
109
|
-
}
|
|
110
|
-
case remotion_1.z.ZodFirstPartyTypeKind.ZodNativeEnum: {
|
|
111
|
-
return 0;
|
|
112
|
-
}
|
|
113
|
-
case remotion_1.z.ZodFirstPartyTypeKind.ZodOptional: {
|
|
114
|
-
const defType = def;
|
|
115
|
-
const value = (0, exports.createZodValues)(defType.innerType);
|
|
116
|
-
return value;
|
|
117
|
-
}
|
|
118
|
-
case remotion_1.z.ZodFirstPartyTypeKind.ZodNullable: {
|
|
119
|
-
const defType = def;
|
|
120
|
-
const value = (0, exports.createZodValues)(defType.innerType);
|
|
121
|
-
return value;
|
|
122
|
-
}
|
|
123
|
-
case remotion_1.z.ZodFirstPartyTypeKind.ZodDefault: {
|
|
124
|
-
const defType = def;
|
|
125
|
-
return defType.defaultValue();
|
|
126
|
-
}
|
|
127
|
-
case remotion_1.z.ZodFirstPartyTypeKind.ZodCatch: {
|
|
128
|
-
const defType = def;
|
|
129
|
-
const value = (0, exports.createZodValues)(defType.innerType);
|
|
130
|
-
return value;
|
|
131
|
-
}
|
|
132
|
-
case remotion_1.z.ZodFirstPartyTypeKind.ZodPromise: {
|
|
133
|
-
const defType = def;
|
|
134
|
-
const value = (0, exports.createZodValues)(defType.type);
|
|
135
|
-
return Promise.resolve(value);
|
|
136
|
-
}
|
|
137
|
-
case remotion_1.z.ZodFirstPartyTypeKind.ZodBranded: {
|
|
138
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
139
|
-
const defType = def;
|
|
140
|
-
const value = (0, exports.createZodValues)(defType.type);
|
|
141
|
-
return value;
|
|
142
|
-
}
|
|
143
|
-
case remotion_1.z.ZodFirstPartyTypeKind.ZodPipeline: {
|
|
144
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
145
|
-
const defType = def;
|
|
146
|
-
const value = (0, exports.createZodValues)(defType.out);
|
|
147
|
-
return value;
|
|
148
|
-
}
|
|
149
|
-
default:
|
|
150
|
-
throw new Error('Not implemented: ' + typeName);
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
|
-
exports.createZodValues = createZodValues;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deserializeJSONWithDate = exports.serializeJSONWithDate = void 0;
|
|
4
|
-
const serializeJSONWithDate = (data, indent) => {
|
|
5
|
-
return JSON.stringify(data, function (key, value) {
|
|
6
|
-
if (this[key] instanceof Date) {
|
|
7
|
-
return `remotion-date:${this[key].toISOString()}`;
|
|
8
|
-
}
|
|
9
|
-
return value;
|
|
10
|
-
}, indent);
|
|
11
|
-
};
|
|
12
|
-
exports.serializeJSONWithDate = serializeJSONWithDate;
|
|
13
|
-
const deserializeJSONWithDate = (data) => {
|
|
14
|
-
return JSON.parse(data, (_, value) => {
|
|
15
|
-
if (typeof value === 'string' && value.startsWith('remotion-date:')) {
|
|
16
|
-
return new Date(value.replace('remotion-date:', ''));
|
|
17
|
-
}
|
|
18
|
-
return value;
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
exports.deserializeJSONWithDate = deserializeJSONWithDate;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getSchemaLabel = void 0;
|
|
4
|
-
const getSchemaLabel = (jsonPath) => {
|
|
5
|
-
const lastKey = jsonPath[jsonPath.length - 1];
|
|
6
|
-
if (typeof lastKey === 'number') {
|
|
7
|
-
const secondLastKey = jsonPath[jsonPath.length - 2];
|
|
8
|
-
if (typeof secondLastKey === 'undefined') {
|
|
9
|
-
return `[${lastKey}]`;
|
|
10
|
-
}
|
|
11
|
-
return `${(0, exports.getSchemaLabel)(jsonPath.slice(0, jsonPath.length - 1))}[${lastKey}]`;
|
|
12
|
-
}
|
|
13
|
-
return lastKey;
|
|
14
|
-
};
|
|
15
|
-
exports.getSchemaLabel = getSchemaLabel;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare type JSONPath = (string | number)[];
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.humanReadableAudioCodec = void 0;
|
|
4
|
-
const humanReadableAudioCodec = (audioCodec) => {
|
|
5
|
-
if (audioCodec === 'aac') {
|
|
6
|
-
return 'AAC';
|
|
7
|
-
}
|
|
8
|
-
if (audioCodec === 'mp3') {
|
|
9
|
-
return 'MP3';
|
|
10
|
-
}
|
|
11
|
-
if (audioCodec === 'pcm-16') {
|
|
12
|
-
return 'Lossless';
|
|
13
|
-
}
|
|
14
|
-
if (audioCodec === 'opus') {
|
|
15
|
-
return 'Opus';
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
exports.humanReadableAudioCodec = humanReadableAudioCodec;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.humanReadableCodec = void 0;
|
|
4
|
-
const humanReadableCodec = (codec) => {
|
|
5
|
-
if (codec === 'aac') {
|
|
6
|
-
return 'AAC';
|
|
7
|
-
}
|
|
8
|
-
if (codec === 'mp3') {
|
|
9
|
-
return 'MP3';
|
|
10
|
-
}
|
|
11
|
-
if (codec === 'gif') {
|
|
12
|
-
return 'GIF';
|
|
13
|
-
}
|
|
14
|
-
if (codec === 'h264') {
|
|
15
|
-
return 'H.264';
|
|
16
|
-
}
|
|
17
|
-
if (codec === 'h264-mkv') {
|
|
18
|
-
return 'H.264 Matroska';
|
|
19
|
-
}
|
|
20
|
-
if (codec === 'h265') {
|
|
21
|
-
return 'H.265';
|
|
22
|
-
}
|
|
23
|
-
if (codec === 'prores') {
|
|
24
|
-
return 'ProRes';
|
|
25
|
-
}
|
|
26
|
-
if (codec === 'vp8') {
|
|
27
|
-
return 'WebM VP8';
|
|
28
|
-
}
|
|
29
|
-
if (codec === 'vp9') {
|
|
30
|
-
return 'WebM VP9';
|
|
31
|
-
}
|
|
32
|
-
if (codec === 'wav') {
|
|
33
|
-
return 'Waveform';
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
exports.humanReadableCodec = humanReadableCodec;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
|
-
export declare const optionRow: React.CSSProperties;
|
|
3
|
-
export declare const narrowOption: React.CSSProperties;
|
|
4
|
-
export declare const label: React.CSSProperties;
|
|
5
|
-
export declare const rightRow: React.CSSProperties;
|
|
6
|
-
export declare const input: React.CSSProperties;
|
|
7
|
-
export declare const fieldsetLabel: React.CSSProperties;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fieldsetLabel = exports.input = exports.rightRow = exports.label = exports.narrowOption = exports.optionRow = void 0;
|
|
4
|
-
const colors_1 = require("../../helpers/colors");
|
|
5
|
-
exports.optionRow = {
|
|
6
|
-
display: 'flex',
|
|
7
|
-
flexDirection: 'row',
|
|
8
|
-
minHeight: 40,
|
|
9
|
-
paddingLeft: 16,
|
|
10
|
-
paddingRight: 16,
|
|
11
|
-
paddingTop: 8,
|
|
12
|
-
paddingBottom: 8,
|
|
13
|
-
};
|
|
14
|
-
exports.narrowOption = {
|
|
15
|
-
display: 'flex',
|
|
16
|
-
flexDirection: 'column',
|
|
17
|
-
};
|
|
18
|
-
exports.label = {
|
|
19
|
-
width: 170,
|
|
20
|
-
fontSize: 15,
|
|
21
|
-
lineHeight: '40px',
|
|
22
|
-
color: colors_1.LIGHT_TEXT,
|
|
23
|
-
fontFamily: 'sans-serif',
|
|
24
|
-
};
|
|
25
|
-
exports.rightRow = {
|
|
26
|
-
display: 'flex',
|
|
27
|
-
flexDirection: 'row',
|
|
28
|
-
justifyContent: 'flex-end',
|
|
29
|
-
alignSelf: 'center',
|
|
30
|
-
flex: 1,
|
|
31
|
-
};
|
|
32
|
-
exports.input = {
|
|
33
|
-
minWidth: 250,
|
|
34
|
-
textAlign: 'right',
|
|
35
|
-
};
|
|
36
|
-
exports.fieldsetLabel = {
|
|
37
|
-
color: colors_1.LIGHT_TEXT,
|
|
38
|
-
fontSize: 14,
|
|
39
|
-
paddingLeft: 5,
|
|
40
|
-
paddingRight: 5,
|
|
41
|
-
display: 'flex',
|
|
42
|
-
flexDirection: 'row',
|
|
43
|
-
fontFamily: 'monospace',
|
|
44
|
-
alignItems: 'center',
|
|
45
|
-
width: '100%',
|
|
46
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { AudioCodec, Codec, StillImageFormat } from '@remotion/renderer';
|
|
2
|
-
import type { RenderType } from './RenderModalAdvanced';
|
|
3
|
-
export declare const invalidCharacters: string[];
|
|
4
|
-
export declare const validateOutnameGui: ({ outName, codec, audioCodec, renderMode, stillImageFormat, }: {
|
|
5
|
-
outName: string;
|
|
6
|
-
codec: Codec;
|
|
7
|
-
audioCodec: AudioCodec;
|
|
8
|
-
renderMode: RenderType;
|
|
9
|
-
stillImageFormat: StillImageFormat | null;
|
|
10
|
-
}) => {
|
|
11
|
-
valid: true;
|
|
12
|
-
} | {
|
|
13
|
-
valid: false;
|
|
14
|
-
error: Error;
|
|
15
|
-
};
|