@remotion/studio 4.0.122 → 4.0.124

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/dist/components/AssetSelector.d.ts +3 -1
  3. package/dist/components/AssetSelector.js +29 -2
  4. package/dist/components/AssetSelectorItem.d.ts +2 -0
  5. package/dist/components/AssetSelectorItem.js +27 -4
  6. package/dist/components/ExplorerPanel.d.ts +3 -1
  7. package/dist/components/ExplorerPanel.js +2 -2
  8. package/dist/components/Modals.js +1 -1
  9. package/dist/components/NewComposition/RemInput.d.ts +1 -1
  10. package/dist/components/RenderButton.js +1 -0
  11. package/dist/components/RenderModal/RenderModal.d.ts +1 -0
  12. package/dist/components/RenderModal/RenderModal.js +22 -14
  13. package/dist/components/RenderModal/RenderModalAudio.d.ts +5 -0
  14. package/dist/components/RenderModal/RenderModalAudio.js +14 -3
  15. package/dist/components/RenderModal/RenderModalBasic.js +2 -2
  16. package/dist/components/RenderModal/RenderModalOutputName.d.ts +11 -0
  17. package/dist/components/RenderModal/RenderModalOutputName.js +12 -0
  18. package/dist/components/RenderModal/SeparateAudioOption.d.ts +13 -0
  19. package/dist/components/RenderModal/SeparateAudioOption.js +42 -0
  20. package/dist/components/RenderModal/get-string-before-suffix.d.ts +1 -0
  21. package/dist/components/RenderModal/get-string-before-suffix.js +11 -0
  22. package/dist/components/RenderModal/human-readable-codec.d.ts +1 -1
  23. package/dist/components/RenderModal/human-readable-codec.js +4 -0
  24. package/dist/components/RenderModal/out-name-checker.d.ts +6 -1
  25. package/dist/components/RenderModal/out-name-checker.js +36 -4
  26. package/dist/components/RenderQueue/actions.d.ts +3 -1
  27. package/dist/components/RenderQueue/actions.js +3 -1
  28. package/dist/components/SidebarRenderButton.js +1 -0
  29. package/dist/components/TopPanel.js +1 -1
  30. package/dist/components/utils.d.ts +1 -0
  31. package/dist/components/utils.js +53 -0
  32. package/dist/helpers/colors.d.ts +1 -1
  33. package/dist/helpers/convert-env-variables.d.ts +8 -2
  34. package/dist/helpers/render-modal-sections.d.ts +0 -1
  35. package/dist/helpers/retry-payload.js +3 -0
  36. package/dist/helpers/use-asset-drag-events.d.ts +12 -0
  37. package/dist/helpers/use-asset-drag-events.js +38 -0
  38. package/dist/state/modals.d.ts +1 -0
  39. package/package.json +7 -7
  40. package/tsconfig.tsbuildinfo +1 -1
@@ -17,6 +17,9 @@ const humanReadableCodec = (codec) => {
17
17
  if (codec === 'h264-mkv') {
18
18
  return 'H.264 Matroska';
19
19
  }
20
+ if (codec === 'h264-ts') {
21
+ return 'H.264 Transport Stream';
22
+ }
20
23
  if (codec === 'h265') {
21
24
  return 'H.265';
22
25
  }
@@ -32,5 +35,6 @@ const humanReadableCodec = (codec) => {
32
35
  if (codec === 'wav') {
33
36
  return 'Waveform';
34
37
  }
38
+ throw new TypeError(`Got unexpected codec "${codec}"`);
35
39
  };
36
40
  exports.humanReadableCodec = humanReadableCodec;
@@ -1,14 +1,19 @@
1
1
  import type { AudioCodec, Codec, StillImageFormat } from '@remotion/renderer';
2
2
  import type { RenderType } from './RenderModalAdvanced';
3
- export declare const validateOutnameGui: ({ outName, codec, audioCodec, renderMode, stillImageFormat, }: {
3
+ export declare const validateOutnameGui: ({ outName, codec, audioCodec, renderMode, stillImageFormat, separateAudioTo, }: {
4
4
  outName: string;
5
5
  codec: Codec;
6
6
  audioCodec: AudioCodec;
7
7
  renderMode: RenderType;
8
8
  stillImageFormat: StillImageFormat | null;
9
+ separateAudioTo: string | null;
9
10
  }) => {
10
11
  valid: true;
11
12
  } | {
12
13
  valid: false;
13
14
  error: Error;
14
15
  };
16
+ export declare const isValidSeparateAudioName: ({ audioCodec, separateAudioTo, }: {
17
+ separateAudioTo: string;
18
+ audioCodec: AudioCodec;
19
+ }) => void;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateOutnameGui = void 0;
3
+ exports.isValidSeparateAudioName = exports.validateOutnameGui = void 0;
4
4
  const client_1 = require("@remotion/renderer/client");
5
5
  const invalidCharacters = ['?', '*', '+', ':', '%'];
6
6
  const isValidStillExtension = (extension, stillImageFormat) => {
@@ -9,7 +9,7 @@ const isValidStillExtension = (extension, stillImageFormat) => {
9
9
  }
10
10
  return extension === stillImageFormat;
11
11
  };
12
- const validateOutnameGui = ({ outName, codec, audioCodec, renderMode, stillImageFormat, }) => {
12
+ const validateOutnameGui = ({ outName, codec, audioCodec, renderMode, stillImageFormat, separateAudioTo, }) => {
13
13
  try {
14
14
  isValidOutName({
15
15
  audioCodec,
@@ -17,6 +17,7 @@ const validateOutnameGui = ({ outName, codec, audioCodec, renderMode, stillImage
17
17
  outName,
18
18
  renderMode,
19
19
  stillImageFormat,
20
+ separateAudioTo,
20
21
  });
21
22
  return { valid: true };
22
23
  }
@@ -25,7 +26,7 @@ const validateOutnameGui = ({ outName, codec, audioCodec, renderMode, stillImage
25
26
  }
26
27
  };
27
28
  exports.validateOutnameGui = validateOutnameGui;
28
- const isValidOutName = ({ outName, codec, audioCodec, renderMode, stillImageFormat, }) => {
29
+ const isValidOutName = ({ outName, codec, audioCodec, renderMode, stillImageFormat, separateAudioTo, }) => {
29
30
  const extension = outName.substring(outName.lastIndexOf('.') + 1);
30
31
  const prefix = outName.substring(0, outName.lastIndexOf('.'));
31
32
  const map = client_1.BrowserSafeApis.defaultFileExtensionMap[codec];
@@ -48,9 +49,10 @@ const isValidOutName = ({ outName, codec, audioCodec, renderMode, stillImageForm
48
49
  if (renderMode === 'video' || renderMode === 'audio') {
49
50
  client_1.BrowserSafeApis.validateOutputFilename({
50
51
  codec,
51
- audioCodec: audioCodec !== null && audioCodec !== void 0 ? audioCodec : null,
52
+ audioCodecSetting: audioCodec !== null && audioCodec !== void 0 ? audioCodec : null,
52
53
  extension,
53
54
  preferLossless: false,
55
+ separateAudioTo,
54
56
  });
55
57
  }
56
58
  if (prefix.length < 1 && renderMode !== 'sequence') {
@@ -73,3 +75,33 @@ const isValidOutName = ({ outName, codec, audioCodec, renderMode, stillImageForm
73
75
  }
74
76
  }
75
77
  };
78
+ const isValidSeparateAudioName = ({ audioCodec, separateAudioTo, }) => {
79
+ const prefix = separateAudioTo.substring(0, separateAudioTo.lastIndexOf('.'));
80
+ const expectedExtension = client_1.BrowserSafeApis.getExtensionFromAudioCodec(audioCodec);
81
+ const actualExtension = separateAudioTo.split('.').pop();
82
+ if (actualExtension !== expectedExtension) {
83
+ throw new Error(`Expected extension: .${expectedExtension}`);
84
+ }
85
+ const hasDotAfterSlash = () => {
86
+ const substrings = prefix.split('/');
87
+ for (const str of substrings) {
88
+ if (str[0] === '.') {
89
+ return true;
90
+ }
91
+ }
92
+ return false;
93
+ };
94
+ const hasInvalidChar = () => {
95
+ return prefix.split('').some((char) => invalidCharacters.includes(char));
96
+ };
97
+ if (prefix.length < 1) {
98
+ throw new Error('The prefix must be at least 1 character long');
99
+ }
100
+ if (prefix[0] === '.' || hasDotAfterSlash()) {
101
+ throw new Error('The output name must not start with a dot');
102
+ }
103
+ if (hasInvalidChar()) {
104
+ throw new Error("Filename can't contain the following characters: ?, *, +, %, :");
105
+ }
106
+ };
107
+ exports.isValidSeparateAudioName = isValidSeparateAudioName;
@@ -36,7 +36,7 @@ export declare const addSequenceRenderJob: ({ compositionId, outName, imageForma
36
36
  beepOnFinish: boolean;
37
37
  repro: boolean;
38
38
  }) => Promise<undefined>;
39
- export declare const addVideoRenderJob: ({ compositionId, outName, imageFormat, jpegQuality, scale, logLevel, codec, concurrency, crf, startFrame, endFrame, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, audioBitrate, videoBitrate, everyNthFrame, numberOfGifLoops, delayRenderTimeout, audioCodec, disallowParallelEncoding, chromiumOptions, envVariables, inputProps, offthreadVideoCacheSizeInBytes, colorSpace, multiProcessOnLinux, encodingMaxRate, encodingBufferSize, beepOnFinish, repro, }: {
39
+ export declare const addVideoRenderJob: ({ compositionId, outName, imageFormat, jpegQuality, scale, logLevel, codec, concurrency, crf, startFrame, endFrame, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, audioBitrate, videoBitrate, everyNthFrame, numberOfGifLoops, delayRenderTimeout, audioCodec, disallowParallelEncoding, chromiumOptions, envVariables, inputProps, offthreadVideoCacheSizeInBytes, colorSpace, multiProcessOnLinux, encodingMaxRate, encodingBufferSize, beepOnFinish, repro, forSeamlessAacConcatenation, separateAudioTo, }: {
40
40
  compositionId: string;
41
41
  outName: string;
42
42
  imageFormat: VideoImageFormat;
@@ -70,6 +70,8 @@ export declare const addVideoRenderJob: ({ compositionId, outName, imageFormat,
70
70
  encodingBufferSize: string | null;
71
71
  beepOnFinish: boolean;
72
72
  repro: boolean;
73
+ forSeamlessAacConcatenation: boolean;
74
+ separateAudioTo: string | null;
73
75
  }) => Promise<undefined>;
74
76
  export declare const unsubscribeFromFileExistenceWatcher: ({ file, clientId, }: {
75
77
  file: string;
@@ -78,7 +78,7 @@ const addSequenceRenderJob = ({ compositionId, outName, imageFormat, startFrame,
78
78
  });
79
79
  };
80
80
  exports.addSequenceRenderJob = addSequenceRenderJob;
81
- const addVideoRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, scale, logLevel, codec, concurrency, crf, startFrame, endFrame, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, audioBitrate, videoBitrate, everyNthFrame, numberOfGifLoops, delayRenderTimeout, audioCodec, disallowParallelEncoding, chromiumOptions, envVariables, inputProps, offthreadVideoCacheSizeInBytes, colorSpace, multiProcessOnLinux, encodingMaxRate, encodingBufferSize, beepOnFinish, repro, }) => {
81
+ const addVideoRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, scale, logLevel, codec, concurrency, crf, startFrame, endFrame, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, audioBitrate, videoBitrate, everyNthFrame, numberOfGifLoops, delayRenderTimeout, audioCodec, disallowParallelEncoding, chromiumOptions, envVariables, inputProps, offthreadVideoCacheSizeInBytes, colorSpace, multiProcessOnLinux, encodingMaxRate, encodingBufferSize, beepOnFinish, repro, forSeamlessAacConcatenation, separateAudioTo, }) => {
82
82
  return callApi('/api/render', {
83
83
  compositionId,
84
84
  type: 'video',
@@ -118,6 +118,8 @@ const addVideoRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, s
118
118
  encodingMaxRate,
119
119
  beepOnFinish,
120
120
  repro,
121
+ forSeamlessAacConcatenation,
122
+ separateAudioTo,
121
123
  });
122
124
  };
123
125
  exports.addVideoRenderJob = addVideoRenderJob;
@@ -67,6 +67,7 @@ const SidebarRenderButton = ({ composition, visible }) => {
67
67
  initialUserAgent: defaults.userAgent,
68
68
  initialBeep: defaults.beepOnFinish,
69
69
  initialRepro: defaults.repro,
70
+ initialForSeamlessAacConcatenation: defaults.forSeamlessAacConcatenation,
70
71
  });
71
72
  }, [composition.defaultProps, composition.id, props, setSelectedModal]);
72
73
  const renderAction = (0, react_1.useCallback)((color) => {
@@ -69,6 +69,6 @@ const TopPanel = ({ readOnlyStudio, onMounted, size, drawRef, bufferStateDelayIn
69
69
  const onCollapseRight = (0, react_1.useCallback)(() => {
70
70
  setSidebarCollapsedState({ left: null, right: 'collapsed' });
71
71
  }, [setSidebarCollapsedState]);
72
- return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)("div", { style: row, children: (0, jsx_runtime_1.jsxs)(SplitterContainer_1.SplitterContainer, { minFlex: 0.15, maxFlex: 0.4, defaultFlex: 0.2, id: "sidebar-to-preview", orientation: "vertical", children: [actualStateLeft === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { sticky: null, type: "flexer", children: (0, jsx_runtime_1.jsx)(ExplorerPanel_1.ExplorerPanel, {}) })) : null, actualStateLeft === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterHandle_1.SplitterHandle, { allowToCollapse: "left", onCollapse: onCollapseLeft })) : null, (0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { sticky: null, type: "anti-flexer", children: (0, jsx_runtime_1.jsxs)(SplitterContainer_1.SplitterContainer, { minFlex: 0.5, maxFlex: 0.8, defaultFlex: 0.7, id: "canvas-to-right-sidebar", orientation: "vertical", children: [(0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { sticky: null, type: "flexer", children: (0, jsx_runtime_1.jsx)("div", { ref: drawRef, style: canvasContainerStyle, children: size ? (0, jsx_runtime_1.jsx)(CanvasOrLoading_1.CanvasOrLoading, { size: size }) : null }) }), actualStateRight === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterHandle_1.SplitterHandle, { allowToCollapse: "right", onCollapse: onCollapseRight })) : null, actualStateRight === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { sticky: null, type: "anti-flexer", children: (0, jsx_runtime_1.jsx)(OptionsPanel_1.OptionsPanel, { readOnlyStudio: readOnlyStudio }) })) : null] }) })] }) }), (0, jsx_runtime_1.jsx)(PreviewToolbar_1.PreviewToolbar, { bufferStateDelayInMilliseconds: bufferStateDelayInMilliseconds, readOnlyStudio: readOnlyStudio }), (0, jsx_runtime_1.jsx)(CurrentCompositionSideEffects_1.CurrentCompositionKeybindings, { readOnlyStudio: readOnlyStudio }), (0, jsx_runtime_1.jsx)(CurrentCompositionSideEffects_1.TitleUpdater, {})] }));
72
+ return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)("div", { style: row, children: (0, jsx_runtime_1.jsxs)(SplitterContainer_1.SplitterContainer, { minFlex: 0.15, maxFlex: 0.4, defaultFlex: 0.2, id: "sidebar-to-preview", orientation: "vertical", children: [actualStateLeft === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { sticky: null, type: "flexer", children: (0, jsx_runtime_1.jsx)(ExplorerPanel_1.ExplorerPanel, { readOnlyStudio: readOnlyStudio }) })) : null, actualStateLeft === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterHandle_1.SplitterHandle, { allowToCollapse: "left", onCollapse: onCollapseLeft })) : null, (0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { sticky: null, type: "anti-flexer", children: (0, jsx_runtime_1.jsxs)(SplitterContainer_1.SplitterContainer, { minFlex: 0.5, maxFlex: 0.8, defaultFlex: 0.7, id: "canvas-to-right-sidebar", orientation: "vertical", children: [(0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { sticky: null, type: "flexer", children: (0, jsx_runtime_1.jsx)("div", { ref: drawRef, style: canvasContainerStyle, children: size ? (0, jsx_runtime_1.jsx)(CanvasOrLoading_1.CanvasOrLoading, { size: size }) : null }) }), actualStateRight === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterHandle_1.SplitterHandle, { allowToCollapse: "right", onCollapse: onCollapseRight })) : null, actualStateRight === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { sticky: null, type: "anti-flexer", children: (0, jsx_runtime_1.jsx)(OptionsPanel_1.OptionsPanel, { readOnlyStudio: readOnlyStudio }) })) : null] }) })] }) }), (0, jsx_runtime_1.jsx)(PreviewToolbar_1.PreviewToolbar, { bufferStateDelayInMilliseconds: bufferStateDelayInMilliseconds, readOnlyStudio: readOnlyStudio }), (0, jsx_runtime_1.jsx)(CurrentCompositionSideEffects_1.CurrentCompositionKeybindings, { readOnlyStudio: readOnlyStudio }), (0, jsx_runtime_1.jsx)(CurrentCompositionSideEffects_1.TitleUpdater, {})] }));
73
73
  };
74
74
  exports.TopPanel = TopPanel;
@@ -0,0 +1 @@
1
+ export declare const handleUploadFile: (file: File, assetPath: string) => Promise<void>;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.handleUploadFile = void 0;
4
+ const NotificationCenter_1 = require("./Notifications/NotificationCenter");
5
+ const handleUploadFile = async (file, assetPath) => {
6
+ var _a, _b, _c, _d;
7
+ if (!file) {
8
+ (_a = NotificationCenter_1.notificationCenter.current) === null || _a === void 0 ? void 0 : _a.addNotification({
9
+ content: `Please select a file first!`,
10
+ created: Date.now(),
11
+ duration: 3000,
12
+ id: String(Math.random()),
13
+ });
14
+ return;
15
+ }
16
+ try {
17
+ const url = new URL('/api/add-asset', window.location.origin);
18
+ url.search = new URLSearchParams({
19
+ folder: assetPath,
20
+ file: file.name,
21
+ }).toString();
22
+ const response = await fetch(url, {
23
+ method: 'POST',
24
+ body: file,
25
+ });
26
+ if (response.ok) {
27
+ (_b = NotificationCenter_1.notificationCenter.current) === null || _b === void 0 ? void 0 : _b.addNotification({
28
+ content: `Added ${file.name} to ${assetPath}`,
29
+ created: Date.now(),
30
+ duration: 3000,
31
+ id: String(Math.random()),
32
+ });
33
+ }
34
+ else {
35
+ const jsonResponse = await response.json();
36
+ (_c = NotificationCenter_1.notificationCenter.current) === null || _c === void 0 ? void 0 : _c.addNotification({
37
+ content: `Upload failed: ${jsonResponse.error}`,
38
+ created: Date.now(),
39
+ duration: 3000,
40
+ id: String(Math.random()),
41
+ });
42
+ }
43
+ }
44
+ catch (error) {
45
+ (_d = NotificationCenter_1.notificationCenter.current) === null || _d === void 0 ? void 0 : _d.addNotification({
46
+ content: `Error during upload: ${error}`,
47
+ created: Date.now(),
48
+ duration: 3000,
49
+ id: String(Math.random()),
50
+ });
51
+ }
52
+ };
53
+ exports.handleUploadFile = handleUploadFile;
@@ -23,4 +23,4 @@ export declare const TIMELINE_TRACK_SEPARATOR = "rgba(0, 0, 0, 0.3)";
23
23
  export declare const getBackgroundFromHoverState: ({ selected, hovered, }: {
24
24
  selected: boolean;
25
25
  hovered: boolean;
26
- }) => "transparent" | "hsla(0, 0%, 100%, 0.15)" | "rgba(255, 255, 255, 0.06)" | "hsla(0, 0%, 100%, 0.25)";
26
+ }) => "hsla(0, 0%, 100%, 0.15)" | "hsla(0, 0%, 100%, 0.25)" | "rgba(255, 255, 255, 0.06)" | "transparent";
@@ -1,2 +1,8 @@
1
- export declare const envVariablesObjectToArray: (envVariables: Record<string, string>) => [string, string][];
2
- export declare const envVariablesArrayToObject: (envVariables: [string, string][]) => Record<string, string>;
1
+ export declare const envVariablesObjectToArray: (envVariables: Record<string, string>) => [
2
+ string,
3
+ string
4
+ ][];
5
+ export declare const envVariablesArrayToObject: (envVariables: [
6
+ string,
7
+ string
8
+ ][]) => Record<string, string>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { Codec } from '@remotion/renderer';
3
2
  import type { RenderType } from '../components/RenderModal/RenderModalAdvanced';
4
3
  type Section = 'general' | 'picture' | 'advanced' | 'data' | 'gif' | 'audio';
@@ -49,6 +49,7 @@ const makeRetryPayload = (job) => {
49
49
  initialUserAgent: job.chromiumOptions.userAgent,
50
50
  initialBeep: job.beepOnFinish,
51
51
  initialRepro: job.repro,
52
+ initialForSeamlessAacConcatenation: defaults.forSeamlessAacConcatenation,
52
53
  };
53
54
  }
54
55
  if (job.type === 'sequence') {
@@ -92,6 +93,7 @@ const makeRetryPayload = (job) => {
92
93
  initialUserAgent: job.chromiumOptions.userAgent,
93
94
  initialBeep: job.beepOnFinish,
94
95
  initialRepro: job.repro,
96
+ initialForSeamlessAacConcatenation: defaults.forSeamlessAacConcatenation,
95
97
  };
96
98
  }
97
99
  if (job.type === 'video') {
@@ -135,6 +137,7 @@ const makeRetryPayload = (job) => {
135
137
  initialUserAgent: job.chromiumOptions.userAgent,
136
138
  initialBeep: job.beepOnFinish,
137
139
  initialRepro: job.repro,
140
+ initialForSeamlessAacConcatenation: job.forSeamlessAacConcatenation,
138
141
  };
139
142
  }
140
143
  throw new Error(`Job ${JSON.stringify(job)} Not implemented`);
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ declare function useAssetDragEvents({ name, parentFolder, dropLocation, setDropLocation, }: {
3
+ name: string | null;
4
+ parentFolder: string | null;
5
+ dropLocation: string | null;
6
+ setDropLocation: React.Dispatch<React.SetStateAction<string | null>>;
7
+ }): {
8
+ isDropDiv: boolean;
9
+ onDragEnter: () => void;
10
+ onDragLeave: () => void;
11
+ };
12
+ export default useAssetDragEvents;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const react_1 = require("react");
4
+ const no_react_1 = require("remotion/no-react");
5
+ function useAssetDragEvents({ name, parentFolder, dropLocation, setDropLocation, }) {
6
+ const dragDepthRef = (0, react_1.useRef)(0);
7
+ const combinedParents = (0, react_1.useMemo)(() => {
8
+ return [parentFolder, name].filter(no_react_1.NoReactInternals.truthy).join('/');
9
+ }, [name, parentFolder]);
10
+ const isDropDiv = (0, react_1.useMemo)(() => {
11
+ return dropLocation === combinedParents;
12
+ }, [combinedParents, dropLocation]);
13
+ const onDragEnter = (0, react_1.useCallback)(() => {
14
+ if (dragDepthRef.current === 0) {
15
+ setDropLocation((currentDropLocation) => (currentDropLocation === null || currentDropLocation === void 0 ? void 0 : currentDropLocation.includes(combinedParents))
16
+ ? currentDropLocation
17
+ : combinedParents);
18
+ }
19
+ dragDepthRef.current++;
20
+ }, [combinedParents, dragDepthRef, setDropLocation]);
21
+ const onDragLeave = (0, react_1.useCallback)(() => {
22
+ dragDepthRef.current--;
23
+ if (dragDepthRef.current === 0) {
24
+ setDropLocation((currentPath) => currentPath === combinedParents ? parentFolder : currentPath);
25
+ }
26
+ }, [combinedParents, dragDepthRef, parentFolder, setDropLocation]);
27
+ (0, react_1.useEffect)(() => {
28
+ if (dropLocation === null) {
29
+ dragDepthRef.current = 0;
30
+ }
31
+ }, [dropLocation]);
32
+ return {
33
+ isDropDiv,
34
+ onDragEnter,
35
+ onDragLeave,
36
+ };
37
+ }
38
+ exports.default = useAssetDragEvents;
@@ -34,6 +34,7 @@ export type RenderModalState = {
34
34
  initialUserAgent: string | null;
35
35
  initialEncodingMaxRate: string | null;
36
36
  initialEncodingBufferSize: string | null;
37
+ initialForSeamlessAacConcatenation: boolean;
37
38
  initialBeep: boolean;
38
39
  initialRepro: boolean;
39
40
  minConcurrency: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/studio",
3
- "version": "4.0.122",
3
+ "version": "4.0.124",
4
4
  "description": "Remotion Editor",
5
5
  "main": "dist",
6
6
  "sideEffects": false,
@@ -18,11 +18,11 @@
18
18
  "memfs": "3.4.3",
19
19
  "source-map": "0.7.3",
20
20
  "open": "^8.4.2",
21
- "@remotion/player": "4.0.122",
22
- "@remotion/media-utils": "4.0.122",
23
- "remotion": "4.0.122",
24
- "@remotion/renderer": "4.0.122",
25
- "@remotion/studio-shared": "4.0.122"
21
+ "remotion": "4.0.124",
22
+ "@remotion/player": "4.0.124",
23
+ "@remotion/renderer": "4.0.124",
24
+ "@remotion/media-utils": "4.0.124",
25
+ "@remotion/studio-shared": "4.0.124"
26
26
  },
27
27
  "devDependencies": {
28
28
  "react": "18.2.0",
@@ -40,7 +40,7 @@
40
40
  "prettier-plugin-organize-imports": "3.2.4",
41
41
  "vitest": "0.31.1",
42
42
  "zod": "^3.22.3",
43
- "@remotion/zod-types": "4.0.122"
43
+ "@remotion/zod-types": "4.0.124"
44
44
  },
45
45
  "publishConfig": {
46
46
  "access": "public"