@remotion/studio 4.0.432 → 4.0.434
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 +1 -3
- package/dist/components/CompositionSelector.js +16 -9
- package/dist/components/CurrentComposition.js +2 -5
- package/dist/components/CurrentCompositionSideEffects.js +2 -4
- package/dist/components/EditorContent.js +4 -5
- package/dist/components/Modals.js +3 -2
- package/dist/components/NewComposition/DuplicateComposition.js +4 -1
- package/dist/components/NewComposition/InputDragger.d.ts +1 -0
- package/dist/components/NewComposition/InputDragger.js +27 -8
- package/dist/components/OptionsPanel.js +1 -1
- package/dist/components/PlaybackRatePersistor.js +1 -1
- package/dist/components/PreviewToolbar.js +5 -4
- package/dist/components/RenderButton.d.ts +1 -1
- package/dist/components/RenderButton.js +64 -17
- package/dist/components/RenderModal/RenderModalBasic.d.ts +1 -0
- package/dist/components/RenderModal/RenderModalBasic.js +2 -2
- package/dist/components/RenderModal/SchemaEditor/SchemaLabel.js +3 -1
- package/dist/components/RenderModal/SchemaEditor/ZodArrayEditor.js +3 -1
- package/dist/components/RenderModal/SchemaEditor/ZodFieldValidation.js +3 -1
- package/dist/components/RenderModal/SchemaEditor/ZodTupleEditor.js +3 -1
- package/dist/components/RenderModal/ServerRenderModal.d.ts +1 -0
- package/dist/components/RenderModal/ServerRenderModal.js +170 -5
- package/dist/components/RenderModal/WebRenderModalAudio.js +5 -2
- package/dist/components/RenderModal/WebRenderModalBasic.js +8 -1
- package/dist/components/RendersTab.js +1 -9
- package/dist/components/SidebarRenderButton.js +1 -0
- package/dist/components/Timeline/TimelineBooleanField.d.ts +9 -0
- package/dist/components/Timeline/TimelineBooleanField.js +20 -0
- package/dist/components/Timeline/TimelineEmptyState.d.ts +2 -0
- package/dist/components/Timeline/TimelineEmptyState.js +15 -0
- package/dist/components/Timeline/TimelineExpandedSection.d.ts +5 -0
- package/dist/components/Timeline/TimelineExpandedSection.js +45 -7
- package/dist/components/Timeline/TimelineFieldRow.d.ts +3 -0
- package/dist/components/Timeline/TimelineFieldRow.js +17 -12
- package/dist/components/Timeline/TimelineListItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineListItem.js +7 -7
- package/dist/components/Timeline/TimelineNumberField.d.ts +11 -0
- package/dist/components/Timeline/TimelineNumberField.js +53 -0
- package/dist/components/Timeline/TimelinePlayCursorSyncer.js +1 -1
- package/dist/components/Timeline/TimelineRotationField.d.ts +11 -0
- package/dist/components/Timeline/TimelineRotationField.js +64 -0
- package/dist/components/Timeline/TimelineSchemaField.d.ts +1 -3
- package/dist/components/Timeline/TimelineSchemaField.js +19 -74
- package/dist/components/Timeline/TimelineTranslateField.d.ts +11 -0
- package/dist/components/Timeline/TimelineTranslateField.js +115 -0
- package/dist/components/Timeline/timeline-field-utils.d.ts +2 -0
- package/dist/components/Timeline/timeline-field-utils.js +12 -0
- package/dist/components/Timeline/use-sequence-props-subscription.d.ts +2 -1
- package/dist/components/Timeline/use-sequence-props-subscription.js +32 -12
- package/dist/esm/{chunk-t28xqw5n.js → chunk-t3wtt582.js} +3198 -2341
- package/dist/esm/internals.mjs +3198 -2341
- package/dist/esm/previewEntry.mjs +3203 -2346
- package/dist/esm/renderEntry.mjs +1 -3
- package/dist/helpers/calculate-timeline.js +17 -11
- package/dist/helpers/get-timeline-sequence-sort-key.d.ts +1 -1
- package/dist/helpers/get-timeline-sequence-sort-key.js +6 -3
- package/dist/helpers/inject-css.js +6 -1
- package/dist/helpers/make-render-command.d.ts +51 -0
- package/dist/helpers/make-render-command.js +201 -0
- package/dist/helpers/retry-payload.js +3 -0
- package/dist/helpers/sort-by-nonce-history.d.ts +5 -0
- package/dist/helpers/sort-by-nonce-history.js +73 -0
- package/dist/helpers/timeline-layout.js +8 -2
- package/dist/renderEntry.js +2 -2
- package/dist/state/modals.d.ts +1 -0
- package/package.json +11 -11
- package/dist/helpers/should-show-render-button.d.ts +0 -1
- package/dist/helpers/should-show-render-button.js +0 -11
|
@@ -5,6 +5,7 @@ import React from 'react';
|
|
|
5
5
|
import type { _InternalTypes } from 'remotion';
|
|
6
6
|
import type { RenderType } from './RenderModalAdvanced';
|
|
7
7
|
type RenderModalProps = {
|
|
8
|
+
readonly readOnlyStudio: boolean;
|
|
8
9
|
readonly compositionId: string;
|
|
9
10
|
readonly initialFrame: number;
|
|
10
11
|
readonly initialVideoImageFormat: VideoImageFormat | null;
|
|
@@ -8,6 +8,8 @@ const react_1 = require("react");
|
|
|
8
8
|
const ShortcutHint_1 = require("../../error-overlay/remotion-overlay/ShortcutHint");
|
|
9
9
|
const colors_1 = require("../../helpers/colors");
|
|
10
10
|
const convert_env_variables_1 = require("../../helpers/convert-env-variables");
|
|
11
|
+
const copy_text_1 = require("../../helpers/copy-text");
|
|
12
|
+
const make_render_command_1 = require("../../helpers/make-render-command");
|
|
11
13
|
const render_modal_sections_1 = require("../../helpers/render-modal-sections");
|
|
12
14
|
const use_keybinding_1 = require("../../helpers/use-keybinding");
|
|
13
15
|
const audio_1 = require("../../icons/audio");
|
|
@@ -23,6 +25,7 @@ const Button_1 = require("../Button");
|
|
|
23
25
|
const is_menu_item_1 = require("../Menu/is-menu-item");
|
|
24
26
|
const ModalHeader_1 = require("../ModalHeader");
|
|
25
27
|
const DismissableModal_1 = require("../NewComposition/DismissableModal");
|
|
28
|
+
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
26
29
|
const OptionsPanel_1 = require("../OptionsPanel");
|
|
27
30
|
const actions_1 = require("../RenderQueue/actions");
|
|
28
31
|
const SegmentedControl_1 = require("../SegmentedControl");
|
|
@@ -58,7 +61,7 @@ const reducer = (state, action) => {
|
|
|
58
61
|
}
|
|
59
62
|
return state;
|
|
60
63
|
};
|
|
61
|
-
const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageFormat, initialJpegQuality, initialScale, initialLogLevel, initialConcurrency, maxConcurrency, minConcurrency, initialMuted, initialEnforceAudioTrack, initialProResProfile, initialx264Preset, initialPixelFormat, initialVideoBitrate, initialAudioBitrate, initialEveryNthFrame, initialNumberOfGifLoops, initialDelayRenderTimeout, initialOffthreadVideoCacheSizeInBytes, initialEnvVariables, initialDisableWebSecurity, initialGl, initialHeadless, initialIgnoreCertificateErrors, initialEncodingBufferSize, initialEncodingMaxRate, initialOffthreadVideoThreads, initialMediaCacheSizeInBytes, initialDarkMode, initialUserAgent, defaultProps, inFrameMark, outFrameMark, initialColorSpace, initialMultiProcessOnLinux, defaultConfigurationAudioCodec, defaultConfigurationVideoCodec, initialBeep, initialRepro, initialForSeamlessAacConcatenation, renderTypeOfLastRender, initialHardwareAcceleration, defaultMetadata, initialChromeMode, renderDefaults, }) => {
|
|
64
|
+
const RenderModal = ({ readOnlyStudio, initialFrame, initialVideoImageFormat, initialStillImageFormat, initialJpegQuality, initialScale, initialLogLevel, initialConcurrency, maxConcurrency, minConcurrency, initialMuted, initialEnforceAudioTrack, initialProResProfile, initialx264Preset, initialPixelFormat, initialVideoBitrate, initialAudioBitrate, initialEveryNthFrame, initialNumberOfGifLoops, initialDelayRenderTimeout, initialOffthreadVideoCacheSizeInBytes, initialEnvVariables, initialDisableWebSecurity, initialGl, initialHeadless, initialIgnoreCertificateErrors, initialEncodingBufferSize, initialEncodingMaxRate, initialOffthreadVideoThreads, initialMediaCacheSizeInBytes, initialDarkMode, initialUserAgent, defaultProps, inFrameMark, outFrameMark, initialColorSpace, initialMultiProcessOnLinux, defaultConfigurationAudioCodec, defaultConfigurationVideoCodec, initialBeep, initialRepro, initialForSeamlessAacConcatenation, renderTypeOfLastRender, initialHardwareAcceleration, defaultMetadata, initialChromeMode, renderDefaults, }) => {
|
|
62
65
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
63
66
|
const context = (0, react_1.useContext)(ResolveCompositionBeforeModal_1.ResolvedCompositionContext);
|
|
64
67
|
if (!context) {
|
|
@@ -753,8 +756,148 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
753
756
|
});
|
|
754
757
|
const { tab, setTab, shownTabs } = (0, render_modal_sections_1.useRenderModalSections)(renderMode, codec);
|
|
755
758
|
const { registerKeybinding } = (0, use_keybinding_1.useKeybinding)();
|
|
756
|
-
const
|
|
759
|
+
const readOnlyRenderCommand = (0, react_1.useMemo)(() => {
|
|
760
|
+
if (!readOnlyStudio) {
|
|
761
|
+
return null;
|
|
762
|
+
}
|
|
763
|
+
return (0, make_render_command_1.makeReadOnlyStudioRenderCommand)({
|
|
764
|
+
remotionVersion: window.remotion_version,
|
|
765
|
+
locationHref: window.location.href,
|
|
766
|
+
compositionId: resolvedComposition.id,
|
|
767
|
+
outName,
|
|
768
|
+
renderMode,
|
|
769
|
+
renderDefaults,
|
|
770
|
+
durationInFrames: resolvedComposition.durationInFrames,
|
|
771
|
+
concurrency,
|
|
772
|
+
frame,
|
|
773
|
+
startFrame,
|
|
774
|
+
endFrame,
|
|
775
|
+
stillImageFormat,
|
|
776
|
+
sequenceImageFormat,
|
|
777
|
+
videoImageFormat,
|
|
778
|
+
jpegQuality: renderMode === 'video'
|
|
779
|
+
? stillImageFormat === 'jpeg'
|
|
780
|
+
? jpegQuality
|
|
781
|
+
: null
|
|
782
|
+
: renderMode === 'audio'
|
|
783
|
+
? null
|
|
784
|
+
: jpegQuality,
|
|
785
|
+
codec,
|
|
786
|
+
muted,
|
|
787
|
+
enforceAudioTrack,
|
|
788
|
+
proResProfile,
|
|
789
|
+
x264Preset,
|
|
790
|
+
pixelFormat,
|
|
791
|
+
crf: qualityControlType === 'crf' &&
|
|
792
|
+
hardwareAcceleration !== 'if-possible' &&
|
|
793
|
+
hardwareAcceleration !== 'required'
|
|
794
|
+
? crf
|
|
795
|
+
: null,
|
|
796
|
+
videoBitrate,
|
|
797
|
+
audioBitrate,
|
|
798
|
+
audioCodec,
|
|
799
|
+
everyNthFrame,
|
|
800
|
+
numberOfGifLoops,
|
|
801
|
+
disallowParallelEncoding,
|
|
802
|
+
encodingBufferSize,
|
|
803
|
+
encodingMaxRate,
|
|
804
|
+
forSeamlessAacConcatenation,
|
|
805
|
+
separateAudioTo,
|
|
806
|
+
colorSpace,
|
|
807
|
+
scale,
|
|
808
|
+
logLevel,
|
|
809
|
+
delayRenderTimeout,
|
|
810
|
+
hardwareAcceleration,
|
|
811
|
+
chromeMode,
|
|
812
|
+
headless,
|
|
813
|
+
disableWebSecurity,
|
|
814
|
+
ignoreCertificateErrors,
|
|
815
|
+
gl: openGlOption === 'default' ? null : openGlOption,
|
|
816
|
+
userAgent,
|
|
817
|
+
multiProcessOnLinux,
|
|
818
|
+
darkMode,
|
|
819
|
+
offthreadVideoCacheSizeInBytes,
|
|
820
|
+
offthreadVideoThreads,
|
|
821
|
+
mediaCacheSizeInBytes,
|
|
822
|
+
beepOnFinish,
|
|
823
|
+
repro,
|
|
824
|
+
metadata,
|
|
825
|
+
envVariables: (0, convert_env_variables_1.envVariablesArrayToObject)(envVariables),
|
|
826
|
+
inputProps,
|
|
827
|
+
});
|
|
828
|
+
}, [
|
|
829
|
+
audioBitrate,
|
|
830
|
+
audioCodec,
|
|
831
|
+
beepOnFinish,
|
|
832
|
+
chromeMode,
|
|
833
|
+
codec,
|
|
834
|
+
colorSpace,
|
|
835
|
+
concurrency,
|
|
836
|
+
crf,
|
|
837
|
+
darkMode,
|
|
838
|
+
delayRenderTimeout,
|
|
839
|
+
disableWebSecurity,
|
|
840
|
+
disallowParallelEncoding,
|
|
841
|
+
endFrame,
|
|
842
|
+
encodingBufferSize,
|
|
843
|
+
encodingMaxRate,
|
|
844
|
+
enforceAudioTrack,
|
|
845
|
+
envVariables,
|
|
846
|
+
everyNthFrame,
|
|
847
|
+
frame,
|
|
848
|
+
forSeamlessAacConcatenation,
|
|
849
|
+
hardwareAcceleration,
|
|
850
|
+
headless,
|
|
851
|
+
ignoreCertificateErrors,
|
|
852
|
+
inputProps,
|
|
853
|
+
jpegQuality,
|
|
854
|
+
logLevel,
|
|
855
|
+
mediaCacheSizeInBytes,
|
|
856
|
+
metadata,
|
|
857
|
+
multiProcessOnLinux,
|
|
858
|
+
muted,
|
|
859
|
+
numberOfGifLoops,
|
|
860
|
+
offthreadVideoCacheSizeInBytes,
|
|
861
|
+
offthreadVideoThreads,
|
|
862
|
+
openGlOption,
|
|
863
|
+
outName,
|
|
864
|
+
pixelFormat,
|
|
865
|
+
proResProfile,
|
|
866
|
+
qualityControlType,
|
|
867
|
+
readOnlyStudio,
|
|
868
|
+
renderDefaults,
|
|
869
|
+
renderMode,
|
|
870
|
+
repro,
|
|
871
|
+
resolvedComposition.durationInFrames,
|
|
872
|
+
resolvedComposition.id,
|
|
873
|
+
scale,
|
|
874
|
+
separateAudioTo,
|
|
875
|
+
sequenceImageFormat,
|
|
876
|
+
startFrame,
|
|
877
|
+
stillImageFormat,
|
|
878
|
+
userAgent,
|
|
879
|
+
videoImageFormat,
|
|
880
|
+
videoBitrate,
|
|
881
|
+
x264Preset,
|
|
882
|
+
]);
|
|
883
|
+
const [commandCopiedAt, setCommandCopiedAt] = (0, react_1.useState)(null);
|
|
884
|
+
const renderDisabled = readOnlyStudio
|
|
885
|
+
? false
|
|
886
|
+
: !outnameValidation.valid || state.type === 'load';
|
|
757
887
|
const trigger = (0, react_1.useCallback)(() => {
|
|
888
|
+
if (readOnlyStudio) {
|
|
889
|
+
if (!readOnlyRenderCommand) {
|
|
890
|
+
return;
|
|
891
|
+
}
|
|
892
|
+
(0, copy_text_1.copyText)(readOnlyRenderCommand)
|
|
893
|
+
.then(() => {
|
|
894
|
+
setCommandCopiedAt(Date.now());
|
|
895
|
+
})
|
|
896
|
+
.catch((err) => {
|
|
897
|
+
(0, NotificationCenter_1.showNotification)(`Could not copy: ${err.message}`, 2000);
|
|
898
|
+
});
|
|
899
|
+
return;
|
|
900
|
+
}
|
|
758
901
|
if (renderMode === 'still') {
|
|
759
902
|
onClickStill();
|
|
760
903
|
}
|
|
@@ -764,7 +907,23 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
764
907
|
else {
|
|
765
908
|
onClickVideo();
|
|
766
909
|
}
|
|
767
|
-
}, [
|
|
910
|
+
}, [
|
|
911
|
+
onClickSequence,
|
|
912
|
+
onClickStill,
|
|
913
|
+
onClickVideo,
|
|
914
|
+
readOnlyRenderCommand,
|
|
915
|
+
readOnlyStudio,
|
|
916
|
+
renderMode,
|
|
917
|
+
]);
|
|
918
|
+
(0, react_1.useEffect)(() => {
|
|
919
|
+
if (commandCopiedAt === null) {
|
|
920
|
+
return;
|
|
921
|
+
}
|
|
922
|
+
const timeout = setTimeout(() => {
|
|
923
|
+
setCommandCopiedAt(null);
|
|
924
|
+
}, 2000);
|
|
925
|
+
return () => clearTimeout(timeout);
|
|
926
|
+
}, [commandCopiedAt]);
|
|
768
927
|
(0, react_1.useEffect)(() => {
|
|
769
928
|
if (renderDisabled) {
|
|
770
929
|
return;
|
|
@@ -805,7 +964,13 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
805
964
|
jsx_runtime_1.jsx(SegmentedControl_1.SegmentedControl, { items: renderTabOptions, needsWrapping: false }), jsx_runtime_1.jsx("div", { style: render_modals_1.flexer }), jsx_runtime_1.jsxs(Button_1.Button, { autoFocus: true, onClick: trigger, disabled: renderDisabled, style: {
|
|
806
965
|
...render_modals_1.buttonStyle,
|
|
807
966
|
backgroundColor: outnameValidation.valid ? colors_1.BLUE : colors_1.BLUE_DISABLED,
|
|
808
|
-
}, children: [
|
|
967
|
+
}, children: [readOnlyStudio
|
|
968
|
+
? commandCopiedAt
|
|
969
|
+
? 'Copied command!'
|
|
970
|
+
: 'Copy command'
|
|
971
|
+
: state.type === 'idle'
|
|
972
|
+
? `Render ${renderMode}`
|
|
973
|
+
: 'Rendering...', jsx_runtime_1.jsx(ShortcutHint_1.ShortcutHint, { keyToPress: "\u21B5", cmdOrCtrl: true })
|
|
809
974
|
] })
|
|
810
975
|
] }), jsx_runtime_1.jsxs("div", { style: render_modals_1.horizontalLayout, children: [
|
|
811
976
|
jsx_runtime_1.jsxs("div", { style: render_modals_1.leftSidebar, children: [shownTabs.includes('general') ? (jsx_runtime_1.jsxs(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'general', onClick: () => setTab('general'), children: [
|
|
@@ -820,7 +985,7 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
820
985
|
jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(gif_1.GifIcon, { style: render_modals_1.icon }) }),
|
|
821
986
|
"GIF"] })) : null, shownTabs.includes('advanced') ? (jsx_runtime_1.jsxs(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'advanced', onClick: () => setTab('advanced'), children: [
|
|
822
987
|
jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(gear_1.GearIcon, { style: render_modals_1.icon }) }),
|
|
823
|
-
"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, 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, mayShowSaveButton: false, propsEditType: "input-props", saving: saving, setSaving: setSaving, readOnlyStudio:
|
|
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, mayShowSaveButton: false, propsEditType: "input-props", saving: saving, setSaving: setSaving, readOnlyStudio: readOnlyStudio })) : (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 })) })
|
|
824
989
|
] })
|
|
825
990
|
] }));
|
|
826
991
|
};
|
|
@@ -40,6 +40,8 @@ const humanReadableWebAudioCodec = (audioCodec) => {
|
|
|
40
40
|
return 'Vorbis';
|
|
41
41
|
case 'pcm-s16':
|
|
42
42
|
return 'Lossless (PCM)';
|
|
43
|
+
case 'flac':
|
|
44
|
+
return 'FLAC';
|
|
43
45
|
default:
|
|
44
46
|
throw new Error(`Unsupported audio codec: ${audioCodec}`);
|
|
45
47
|
}
|
|
@@ -66,14 +68,15 @@ const WebRenderModalAudio = ({ renderMode, muted, setMuted, audioCodec, setAudio
|
|
|
66
68
|
const audioBitrateOptions = (0, react_1.useMemo)(() => (0, quality_options_1.getQualityOptions)(audioBitrate, setAudioBitrate), [audioBitrate, setAudioBitrate]);
|
|
67
69
|
const isAudioOnly = renderMode === 'audio';
|
|
68
70
|
const showAudioSettings = isAudioOnly || !muted;
|
|
71
|
+
const showAudioCodecSetting = !isAudioOnly || containerSupported.length > 1;
|
|
69
72
|
return (jsx_runtime_1.jsxs("div", { style: container, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [isAudioOnly ? null : (jsx_runtime_1.jsx(MutedSetting_1.MutedSetting, { enforceAudioTrack: false, muted: muted, setMuted: setMuted })), showAudioSettings ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [isAudioOnly ? null : jsx_runtime_1.jsx(RenderModalHr_1.RenderModalHr, {}), jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
70
73
|
jsx_runtime_1.jsxs("div", { style: layout_2.label, children: ["Audio Quality",
|
|
71
74
|
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 })
|
|
72
75
|
] }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: audioBitrateOptions, selectedId: audioBitrate, title: "Audio Quality" }) })
|
|
73
|
-
] }), jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
76
|
+
] }), showAudioCodecSetting ? (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
74
77
|
jsx_runtime_1.jsxs("div", { style: layout_2.label, children: ["Audio Codec",
|
|
75
78
|
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 })
|
|
76
79
|
] }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: audioCodecOptions, selectedId: audioCodec, title: "Audio Codec" }) })
|
|
77
|
-
] }), effectiveAudioCodec !== audioCodec ? (jsx_runtime_1.jsxs("div", { style: fallbackNoticeStyle, children: [humanReadableWebAudioCodec(audioCodec), " is not available in this browser. Using ", humanReadableWebAudioCodec(effectiveAudioCodec), ' ', "instead."] })) : null] })) : null] }));
|
|
80
|
+
] })) : null, showAudioCodecSetting && effectiveAudioCodec !== audioCodec ? (jsx_runtime_1.jsxs("div", { style: fallbackNoticeStyle, children: [humanReadableWebAudioCodec(audioCodec), " is not available in this browser. Using ", humanReadableWebAudioCodec(effectiveAudioCodec), ' ', "instead."] })) : null] })) : null] }));
|
|
78
81
|
};
|
|
79
82
|
exports.WebRenderModalAudio = WebRenderModalAudio;
|
|
@@ -26,9 +26,16 @@ const containerLabels = {
|
|
|
26
26
|
mp3: 'MP3',
|
|
27
27
|
aac: 'AAC',
|
|
28
28
|
ogg: 'OGG',
|
|
29
|
+
flac: 'FLAC',
|
|
29
30
|
};
|
|
30
31
|
const videoContainers = ['mp4', 'webm', 'mkv', 'mov'];
|
|
31
|
-
const audioContainers = [
|
|
32
|
+
const audioContainers = [
|
|
33
|
+
'wav',
|
|
34
|
+
'mp3',
|
|
35
|
+
'aac',
|
|
36
|
+
'ogg',
|
|
37
|
+
'flac',
|
|
38
|
+
];
|
|
32
39
|
const codecLabels = {
|
|
33
40
|
h264: 'H.264',
|
|
34
41
|
h265: 'H.265',
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.RendersTab = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const remotion_1 = require("remotion");
|
|
7
6
|
const colors_1 = require("../helpers/colors");
|
|
8
7
|
const layout_1 = require("./layout");
|
|
9
8
|
const context_1 = require("./RenderQueue/context");
|
|
@@ -27,15 +26,8 @@ const badge = {
|
|
|
27
26
|
};
|
|
28
27
|
const RendersTab = ({ selected, onClick }) => {
|
|
29
28
|
const { jobs } = (0, react_1.useContext)(context_1.RenderQueueContext);
|
|
30
|
-
const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
31
29
|
const failedJobs = jobs.filter((j) => j.status === 'failed').length;
|
|
32
30
|
const jobCount = jobs.length;
|
|
33
|
-
const isActuallySelected = (0, react_1.useMemo)(() => {
|
|
34
|
-
if (!canvasContent || canvasContent.type !== 'composition') {
|
|
35
|
-
return true;
|
|
36
|
-
}
|
|
37
|
-
return selected;
|
|
38
|
-
}, [canvasContent, selected]);
|
|
39
31
|
const badgeStyle = (0, react_1.useMemo)(() => {
|
|
40
32
|
return {
|
|
41
33
|
...badge,
|
|
@@ -46,7 +38,7 @@ const RendersTab = ({ selected, onClick }) => {
|
|
|
46
38
|
borderColor: colors_1.LIGHT_TEXT,
|
|
47
39
|
};
|
|
48
40
|
}, [failedJobs]);
|
|
49
|
-
return (jsx_runtime_1.jsx(Tabs_1.Tab, { selected:
|
|
41
|
+
return (jsx_runtime_1.jsx(Tabs_1.Tab, { selected: selected, onClick: onClick, children: jsx_runtime_1.jsxs("div", { style: row, children: ["Renders", jobCount > 0 ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
50
42
|
jsx_runtime_1.jsx(layout_1.Flex, {}), jsx_runtime_1.jsx("div", { style: badgeStyle, children: jobCount })
|
|
51
43
|
] })) : null] }) }));
|
|
52
44
|
};
|
|
@@ -80,6 +80,7 @@ const SidebarRenderButton = ({ composition, visible }) => {
|
|
|
80
80
|
initialMediaCacheSizeInBytes: defaults.mediaCacheSizeInBytes,
|
|
81
81
|
renderDefaults: defaults,
|
|
82
82
|
initialDarkMode: defaults.darkMode,
|
|
83
|
+
readOnlyStudio: false,
|
|
83
84
|
});
|
|
84
85
|
if (isMobileLayout) {
|
|
85
86
|
setSidebarCollapsedState({ left: 'collapsed', right: 'collapsed' });
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SchemaFieldInfo } from '../../helpers/timeline-layout';
|
|
3
|
+
export declare const TimelineBooleanField: React.FC<{
|
|
4
|
+
readonly field: SchemaFieldInfo;
|
|
5
|
+
readonly codeValue: unknown;
|
|
6
|
+
readonly effectiveValue: unknown;
|
|
7
|
+
readonly canUpdate: boolean;
|
|
8
|
+
readonly onSave: (key: string, value: unknown) => Promise<void>;
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TimelineBooleanField = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const Checkbox_1 = require("../Checkbox");
|
|
7
|
+
const checkboxContainer = {
|
|
8
|
+
marginLeft: 8,
|
|
9
|
+
};
|
|
10
|
+
const TimelineBooleanField = ({ field, codeValue, effectiveValue, canUpdate, onSave }) => {
|
|
11
|
+
const checked = Boolean(effectiveValue);
|
|
12
|
+
const onChange = (0, react_1.useCallback)(() => {
|
|
13
|
+
const newValue = !checked;
|
|
14
|
+
if (canUpdate && newValue !== codeValue) {
|
|
15
|
+
onSave(field.key, newValue);
|
|
16
|
+
}
|
|
17
|
+
}, [canUpdate, onSave, field.key, checked, codeValue]);
|
|
18
|
+
return (jsx_runtime_1.jsx("div", { style: checkboxContainer, children: jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: checked, onChange: onChange, name: field.key, disabled: !canUpdate }) }));
|
|
19
|
+
};
|
|
20
|
+
exports.TimelineBooleanField = TimelineBooleanField;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TimelineEmptyState = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const colors_1 = require("../../helpers/colors");
|
|
6
|
+
const container = {
|
|
7
|
+
display: 'flex',
|
|
8
|
+
flex: 1,
|
|
9
|
+
height: 0,
|
|
10
|
+
backgroundColor: colors_1.BACKGROUND,
|
|
11
|
+
};
|
|
12
|
+
const TimelineEmptyState = () => {
|
|
13
|
+
return jsx_runtime_1.jsx("div", { style: container });
|
|
14
|
+
};
|
|
15
|
+
exports.TimelineEmptyState = TimelineEmptyState;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
import type { SequenceNodePath } from '@remotion/studio-shared';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import type { TSequence } from 'remotion';
|
|
3
4
|
import type { OriginalPosition } from '../../error-overlay/react-overlay/utils/get-source-map';
|
|
5
|
+
export declare const EXPANDED_SECTION_PADDING_LEFT = 28;
|
|
6
|
+
export declare const EXPANDED_SECTION_PADDING_RIGHT = 10;
|
|
4
7
|
export declare const TimelineExpandedSection: React.FC<{
|
|
5
8
|
readonly sequence: TSequence;
|
|
6
9
|
readonly originalLocation: OriginalPosition | null;
|
|
10
|
+
readonly nestedDepth: number;
|
|
11
|
+
readonly nodePath: SequenceNodePath | null;
|
|
7
12
|
}>;
|
|
@@ -1,22 +1,59 @@
|
|
|
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
|
-
exports.TimelineExpandedSection = void 0;
|
|
36
|
+
exports.TimelineExpandedSection = exports.EXPANDED_SECTION_PADDING_RIGHT = exports.EXPANDED_SECTION_PADDING_LEFT = 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 colors_1 = require("../../helpers/colors");
|
|
7
40
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
8
41
|
const TimelineFieldRow_1 = require("./TimelineFieldRow");
|
|
42
|
+
exports.EXPANDED_SECTION_PADDING_LEFT = 28;
|
|
43
|
+
exports.EXPANDED_SECTION_PADDING_RIGHT = 10;
|
|
9
44
|
const expandedSectionBase = {
|
|
10
45
|
color: 'white',
|
|
11
46
|
fontFamily: 'Arial, Helvetica, sans-serif',
|
|
12
47
|
fontSize: 12,
|
|
13
48
|
display: 'flex',
|
|
14
49
|
flexDirection: 'column',
|
|
15
|
-
paddingLeft: 28,
|
|
16
|
-
paddingRight: 10,
|
|
17
50
|
borderBottom: `1px solid ${colors_1.TIMELINE_TRACK_SEPARATOR}`,
|
|
18
51
|
};
|
|
19
|
-
const
|
|
52
|
+
const separator = {
|
|
53
|
+
height: 1,
|
|
54
|
+
backgroundColor: colors_1.TIMELINE_TRACK_SEPARATOR,
|
|
55
|
+
};
|
|
56
|
+
const TimelineExpandedSection = ({ sequence, originalLocation, nestedDepth, nodePath }) => {
|
|
20
57
|
var _a;
|
|
21
58
|
var _b;
|
|
22
59
|
const overrideId = (_b = (_a = sequence.controls) === null || _a === void 0 ? void 0 : _a.overrideId) !== null && _b !== void 0 ? _b : sequence.id;
|
|
@@ -42,8 +79,9 @@ const TimelineExpandedSection = ({ sequence, originalLocation }) => {
|
|
|
42
79
|
};
|
|
43
80
|
}, [expandedHeight]);
|
|
44
81
|
return (jsx_runtime_1.jsx("div", { style: style, children: schemaFields
|
|
45
|
-
? schemaFields.map((field) => {
|
|
46
|
-
return (jsx_runtime_1.jsx(TimelineFieldRow_1.TimelineFieldRow, { field: field, overrideId: overrideId, validatedLocation: validatedLocation
|
|
82
|
+
? schemaFields.map((field, i) => {
|
|
83
|
+
return (jsx_runtime_1.jsxs(react_1.default.Fragment, { children: [i > 0 ? jsx_runtime_1.jsx("div", { style: separator }) : null, jsx_runtime_1.jsx(TimelineFieldRow_1.TimelineFieldRow, { field: field, overrideId: overrideId, validatedLocation: validatedLocation, nestedDepth: nestedDepth, nodePath: nodePath })
|
|
84
|
+
] }, field.key));
|
|
47
85
|
})
|
|
48
86
|
: 'No schema' }));
|
|
49
87
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SequenceNodePath } from '@remotion/studio-shared';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import type { CodePosition } from '../../error-overlay/react-overlay/utils/get-source-map';
|
|
3
4
|
import type { SchemaFieldInfo } from '../../helpers/timeline-layout';
|
|
@@ -5,4 +6,6 @@ export declare const TimelineFieldRow: React.FC<{
|
|
|
5
6
|
readonly field: SchemaFieldInfo;
|
|
6
7
|
readonly overrideId: string;
|
|
7
8
|
readonly validatedLocation: CodePosition | null;
|
|
9
|
+
readonly nestedDepth: number;
|
|
10
|
+
readonly nodePath: SequenceNodePath | null;
|
|
8
11
|
}>;
|
|
@@ -5,25 +5,28 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
7
7
|
const call_api_1 = require("../call-api");
|
|
8
|
+
const TimelineExpandedSection_1 = require("./TimelineExpandedSection");
|
|
9
|
+
const TimelineListItem_1 = require("./TimelineListItem");
|
|
8
10
|
const TimelineSchemaField_1 = require("./TimelineSchemaField");
|
|
9
|
-
const
|
|
11
|
+
const FIELD_ROW_PADDING_LEFT = 24;
|
|
12
|
+
const fieldRowBase = {
|
|
10
13
|
display: 'flex',
|
|
11
14
|
alignItems: 'center',
|
|
12
15
|
gap: 8,
|
|
13
|
-
|
|
16
|
+
paddingRight: TimelineExpandedSection_1.EXPANDED_SECTION_PADDING_RIGHT,
|
|
14
17
|
};
|
|
15
18
|
const fieldName = {
|
|
16
19
|
fontSize: 12,
|
|
17
20
|
color: 'rgba(255, 255, 255, 0.8)',
|
|
18
21
|
};
|
|
19
22
|
const fieldLabelRow = {
|
|
20
|
-
flex:
|
|
23
|
+
flex: '0 0 50%',
|
|
21
24
|
display: 'flex',
|
|
22
25
|
flexDirection: 'row',
|
|
23
26
|
alignItems: 'center',
|
|
24
27
|
gap: 6,
|
|
25
28
|
};
|
|
26
|
-
const TimelineFieldRow = ({ field, overrideId, validatedLocation }) => {
|
|
29
|
+
const TimelineFieldRow = ({ field, overrideId, validatedLocation, nestedDepth, nodePath }) => {
|
|
27
30
|
var _a, _b, _c, _d;
|
|
28
31
|
const { setDragOverrides, clearDragOverrides, dragOverrides, codeValues: allPropStatuses, } = (0, react_1.useContext)(remotion_1.Internals.VisualModeOverridesContext);
|
|
29
32
|
const propStatuses = ((_a = allPropStatuses[overrideId]) !== null && _a !== void 0 ? _a : null);
|
|
@@ -37,9 +40,10 @@ const TimelineFieldRow = ({ field, overrideId, validatedLocation }) => {
|
|
|
37
40
|
runtimeValue: field.currentValue,
|
|
38
41
|
dragOverrideValue,
|
|
39
42
|
defaultValue: field.fieldSchema.default,
|
|
43
|
+
shouldResortToDefaultValueIfUndefined: true,
|
|
40
44
|
});
|
|
41
45
|
const onSave = (0, react_1.useCallback)((key, value) => {
|
|
42
|
-
if (!propStatuses || !validatedLocation) {
|
|
46
|
+
if (!propStatuses || !validatedLocation || !nodePath) {
|
|
43
47
|
return Promise.reject(new Error('Cannot save'));
|
|
44
48
|
}
|
|
45
49
|
const status = propStatuses[key];
|
|
@@ -51,14 +55,12 @@ const TimelineFieldRow = ({ field, overrideId, validatedLocation }) => {
|
|
|
51
55
|
: null;
|
|
52
56
|
return (0, call_api_1.callApi)('/api/save-sequence-props', {
|
|
53
57
|
fileName: validatedLocation.source,
|
|
54
|
-
|
|
55
|
-
column: validatedLocation.column,
|
|
58
|
+
nodePath,
|
|
56
59
|
key,
|
|
57
60
|
value: JSON.stringify(value),
|
|
58
|
-
enumPaths: [],
|
|
59
61
|
defaultValue,
|
|
60
62
|
}).then(() => undefined);
|
|
61
|
-
}, [propStatuses, validatedLocation, field.fieldSchema.default]);
|
|
63
|
+
}, [propStatuses, validatedLocation, nodePath, field.fieldSchema.default]);
|
|
62
64
|
const onDragValueChange = (0, react_1.useCallback)((key, value) => {
|
|
63
65
|
setDragOverrides(overrideId, key, value);
|
|
64
66
|
}, [setDragOverrides, overrideId]);
|
|
@@ -67,12 +69,15 @@ const TimelineFieldRow = ({ field, overrideId, validatedLocation }) => {
|
|
|
67
69
|
}, [clearDragOverrides, overrideId]);
|
|
68
70
|
const style = (0, react_1.useMemo)(() => {
|
|
69
71
|
return {
|
|
70
|
-
...
|
|
72
|
+
...fieldRowBase,
|
|
71
73
|
height: field.rowHeight,
|
|
74
|
+
paddingLeft: TimelineExpandedSection_1.EXPANDED_SECTION_PADDING_LEFT +
|
|
75
|
+
FIELD_ROW_PADDING_LEFT +
|
|
76
|
+
TimelineListItem_1.SPACING * 3 * nestedDepth,
|
|
72
77
|
};
|
|
73
|
-
}, [field.rowHeight]);
|
|
78
|
+
}, [field.rowHeight, nestedDepth]);
|
|
74
79
|
return (jsx_runtime_1.jsxs("div", { style: style, children: [
|
|
75
|
-
jsx_runtime_1.jsx("div", { style: fieldLabelRow, children: jsx_runtime_1.jsx("span", { style: fieldName, children: (_c = field.description) !== null && _c !== void 0 ? _c : field.key }) }), jsx_runtime_1.jsx(TimelineSchemaField_1.TimelineFieldValue, { field: field, propStatus: propStatus, onSave: onSave, onDragValueChange: onDragValueChange, onDragEnd: onDragEnd, canUpdate: (_d = propStatus === null || propStatus === void 0 ? void 0 : propStatus.canUpdate) !== null && _d !== void 0 ? _d : false, effectiveValue: effectiveValue })
|
|
80
|
+
jsx_runtime_1.jsx("div", { style: fieldLabelRow, children: jsx_runtime_1.jsx("span", { style: fieldName, children: (_c = field.description) !== null && _c !== void 0 ? _c : field.key }) }), jsx_runtime_1.jsx(TimelineSchemaField_1.TimelineFieldValue, { field: field, propStatus: propStatus, onSave: onSave, onDragValueChange: onDragValueChange, onDragEnd: onDragEnd, canUpdate: (_d = propStatus === null || propStatus === void 0 ? void 0 : propStatus.canUpdate) !== null && _d !== void 0 ? _d : false, effectiveValue: effectiveValue, codeValue: propStatus })
|
|
76
81
|
] }));
|
|
77
82
|
};
|
|
78
83
|
exports.TimelineFieldRow = TimelineFieldRow;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TimelineListItem = void 0;
|
|
3
|
+
exports.TimelineListItem = exports.SPACING = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
@@ -13,9 +13,9 @@ const TimelineLayerEye_1 = require("./TimelineLayerEye");
|
|
|
13
13
|
const TimelineStack_1 = require("./TimelineStack");
|
|
14
14
|
const use_resolved_stack_1 = require("./use-resolved-stack");
|
|
15
15
|
const use_sequence_props_subscription_1 = require("./use-sequence-props-subscription");
|
|
16
|
-
|
|
16
|
+
exports.SPACING = 5;
|
|
17
17
|
const space = {
|
|
18
|
-
width: SPACING,
|
|
18
|
+
width: exports.SPACING,
|
|
19
19
|
flexShrink: 0,
|
|
20
20
|
};
|
|
21
21
|
const arrowButton = {
|
|
@@ -44,14 +44,14 @@ const TimelineListItem = ({ nestedDepth, sequence, isCompact }) => {
|
|
|
44
44
|
const { hidden, setHidden } = (0, react_1.useContext)(remotion_1.Internals.SequenceVisibilityToggleContext);
|
|
45
45
|
const { expandedTracks, toggleTrack } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksContext);
|
|
46
46
|
const originalLocation = (0, use_resolved_stack_1.useResolvedStack)((_a = sequence.stack) !== null && _a !== void 0 ? _a : null);
|
|
47
|
-
(0, use_sequence_props_subscription_1.useSequencePropsSubscription)(sequence, originalLocation);
|
|
47
|
+
const nodePath = (0, use_sequence_props_subscription_1.useSequencePropsSubscription)(sequence, originalLocation);
|
|
48
48
|
const isExpanded = visualModeEnabled && ((_b = expandedTracks[sequence.id]) !== null && _b !== void 0 ? _b : false);
|
|
49
49
|
const onToggleExpand = (0, react_1.useCallback)(() => {
|
|
50
50
|
toggleTrack(sequence.id);
|
|
51
51
|
}, [sequence.id, toggleTrack]);
|
|
52
52
|
const padder = (0, react_1.useMemo)(() => {
|
|
53
53
|
return {
|
|
54
|
-
width: Number(SPACING *
|
|
54
|
+
width: Number(exports.SPACING * 3) * nestedDepth,
|
|
55
55
|
flexShrink: 0,
|
|
56
56
|
};
|
|
57
57
|
}, [nestedDepth]);
|
|
@@ -78,7 +78,7 @@ const TimelineListItem = ({ nestedDepth, sequence, isCompact }) => {
|
|
|
78
78
|
alignItems: 'center',
|
|
79
79
|
wordBreak: 'break-all',
|
|
80
80
|
textAlign: 'left',
|
|
81
|
-
paddingLeft: SPACING,
|
|
81
|
+
paddingLeft: exports.SPACING,
|
|
82
82
|
borderBottom: `1px solid ${colors_1.TIMELINE_TRACK_SEPARATOR}`,
|
|
83
83
|
};
|
|
84
84
|
}, [sequence.type]);
|
|
@@ -91,6 +91,6 @@ const TimelineListItem = ({ nestedDepth, sequence, isCompact }) => {
|
|
|
91
91
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
92
92
|
jsx_runtime_1.jsxs("div", { style: outer, children: [
|
|
93
93
|
jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEye, { type: sequence.type === 'audio' ? 'speaker' : 'eye', hidden: isItemHidden, onInvoked: onToggleVisibility }), jsx_runtime_1.jsx("div", { style: padder }), sequence.parent && nestedDepth > 0 ? jsx_runtime_1.jsx("div", { style: space }) : null, visualModeEnabled ? (sequence.controls ? (jsx_runtime_1.jsx("button", { type: "button", style: arrowStyle, onClick: onToggleExpand, "aria-expanded": isExpanded, "aria-label": `${isExpanded ? 'Collapse' : 'Expand'} track`, children: jsx_runtime_1.jsx("svg", { width: "12", height: "12", viewBox: "0 0 8 8", style: { display: 'block' }, children: jsx_runtime_1.jsx("path", { d: "M2 1L6 4L2 7Z", fill: "white" }) }) })) : (jsx_runtime_1.jsx("div", { style: arrowButton }))) : null, jsx_runtime_1.jsx(TimelineStack_1.TimelineStack, { sequence: sequence, isCompact: isCompact, originalLocation: originalLocation })
|
|
94
|
-
] }), visualModeEnabled && isExpanded && sequence.controls ? (jsx_runtime_1.jsx(TimelineExpandedSection_1.TimelineExpandedSection, { sequence: sequence, originalLocation: originalLocation })) : null] }));
|
|
94
|
+
] }), visualModeEnabled && isExpanded && sequence.controls ? (jsx_runtime_1.jsx(TimelineExpandedSection_1.TimelineExpandedSection, { sequence: sequence, originalLocation: originalLocation, nestedDepth: nestedDepth, nodePath: nodePath })) : null] }));
|
|
95
95
|
};
|
|
96
96
|
exports.TimelineListItem = TimelineListItem;
|