@remotion/studio 4.0.134 → 4.0.136
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/.turbo/turbo-build.log +1 -1
- package/dist/components/AssetSelectorItem.js +3 -9
- package/dist/components/CompositionSelectorItem.js +58 -16
- package/dist/components/CopyButton.js +1 -1
- package/dist/components/CurrentCompositionSideEffects.js +2 -2
- package/dist/components/Editor.js +1 -1
- package/dist/components/GlobalKeybindings.js +2 -4
- package/dist/components/KeyboardShortcutsExplainer.js +1 -1
- package/dist/components/Modals.js +4 -2
- package/dist/components/NewComposition/CodemodFooter.d.ts +13 -0
- package/dist/components/NewComposition/CodemodFooter.js +124 -0
- package/dist/components/NewComposition/CopyHint.js +2 -2
- package/dist/components/NewComposition/DeleteComposition.d.ts +4 -0
- package/dist/components/NewComposition/DeleteComposition.js +34 -0
- package/dist/components/NewComposition/DiffPreview.d.ts +14 -0
- package/dist/components/NewComposition/DiffPreview.js +19 -0
- package/dist/components/NewComposition/DismissableModal.d.ts +4 -0
- package/dist/components/NewComposition/DismissableModal.js +15 -0
- package/dist/components/NewComposition/DuplicateComposition.d.ts +4 -0
- package/dist/components/NewComposition/DuplicateComposition.js +177 -0
- package/dist/components/NewComposition/NewCompDuration.d.ts +2 -3
- package/dist/components/NewComposition/NewCompDuration.js +7 -7
- package/dist/components/NewComposition/NewComposition.d.ts +3 -2
- package/dist/components/NewComposition/NewComposition.js +4 -45
- package/dist/components/NewComposition/RenameComposition.d.ts +4 -0
- package/dist/components/NewComposition/RenameComposition.js +52 -0
- package/dist/components/NewComposition/new-comp-layout.d.ts +0 -1
- package/dist/components/NewComposition/new-comp-layout.js +1 -9
- package/dist/components/Notifications/Notification.d.ts +1 -1
- package/dist/components/Notifications/Notification.js +3 -0
- package/dist/components/Notifications/NotificationCenter.d.ts +3 -10
- package/dist/components/Notifications/NotificationCenter.js +24 -8
- package/dist/components/OpenEditorButton.js +2 -2
- package/dist/components/QuickSwitcher/QuickSwitcher.js +2 -9
- package/dist/components/RenderModal/DataEditor.js +5 -5
- package/dist/components/RenderModal/RenderModal.js +21 -62
- package/dist/components/RenderModal/RenderStatusModal.js +2 -2
- package/dist/components/RenderModal/ResolveCompositionBeforeModal.d.ts +15 -0
- package/dist/components/RenderModal/ResolveCompositionBeforeModal.js +83 -0
- package/dist/components/RenderQueue/RenderQueueCopyToClipboard.js +2 -8
- package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +1 -1
- package/dist/components/RenderQueue/RenderQueueOpenInFolder.js +1 -1
- package/dist/components/RenderQueue/RenderQueueRemoveItem.js +2 -8
- package/dist/components/RenderQueue/actions.d.ts +7 -1
- package/dist/components/RenderQueue/actions.js +13 -1
- package/dist/components/Timeline/TimelineStack/index.js +1 -1
- package/dist/components/UpdateModal/UpdateModal.js +3 -8
- package/dist/components/utils.js +4 -25
- package/dist/helpers/client-id.js +1 -1
- package/dist/helpers/colors.d.ts +1 -1
- package/dist/helpers/pick-color.js +3 -15
- package/dist/helpers/use-menu-structure.js +4 -49
- package/dist/helpers/validate-new-comp-data.d.ts +2 -2
- package/dist/helpers/validate-new-comp-data.js +3 -3
- package/dist/hot-middleware-client/process-update.js +1 -7
- package/dist/state/modals.d.ts +8 -3
- package/package.json +7 -7
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -32,52 +32,8 @@ const rotate = {
|
|
|
32
32
|
transform: `rotate(90deg)`,
|
|
33
33
|
};
|
|
34
34
|
const ICON_SIZE = 16;
|
|
35
|
-
const getFileMenu = ({ readOnlyStudio, closeMenu,
|
|
35
|
+
const getFileMenu = ({ readOnlyStudio, closeMenu, previewServerState, }) => {
|
|
36
36
|
const items = [
|
|
37
|
-
readOnlyStudio
|
|
38
|
-
? null
|
|
39
|
-
: {
|
|
40
|
-
id: 'new-sequence',
|
|
41
|
-
value: 'new-sequence',
|
|
42
|
-
label: 'New composition...',
|
|
43
|
-
onClick: () => {
|
|
44
|
-
closeMenu();
|
|
45
|
-
setSelectedModal({
|
|
46
|
-
compType: 'composition',
|
|
47
|
-
type: 'new-comp',
|
|
48
|
-
});
|
|
49
|
-
},
|
|
50
|
-
type: 'item',
|
|
51
|
-
keyHint: 'N',
|
|
52
|
-
leftItem: null,
|
|
53
|
-
subMenu: null,
|
|
54
|
-
quickSwitcherLabel: 'New composition...',
|
|
55
|
-
},
|
|
56
|
-
readOnlyStudio
|
|
57
|
-
? null
|
|
58
|
-
: {
|
|
59
|
-
id: 'new-still',
|
|
60
|
-
value: 'new-still',
|
|
61
|
-
label: 'New still...',
|
|
62
|
-
onClick: () => {
|
|
63
|
-
closeMenu();
|
|
64
|
-
setSelectedModal({
|
|
65
|
-
compType: 'still',
|
|
66
|
-
type: 'new-comp',
|
|
67
|
-
});
|
|
68
|
-
},
|
|
69
|
-
type: 'item',
|
|
70
|
-
keyHint: null,
|
|
71
|
-
leftItem: null,
|
|
72
|
-
subMenu: null,
|
|
73
|
-
quickSwitcherLabel: 'New still...',
|
|
74
|
-
},
|
|
75
|
-
readOnlyStudio
|
|
76
|
-
? null
|
|
77
|
-
: {
|
|
78
|
-
type: 'divider',
|
|
79
|
-
id: 'new-divider',
|
|
80
|
-
},
|
|
81
37
|
readOnlyStudio
|
|
82
38
|
? null
|
|
83
39
|
: {
|
|
@@ -87,7 +43,7 @@ const getFileMenu = ({ readOnlyStudio, closeMenu, setSelectedModal, previewServe
|
|
|
87
43
|
onClick: () => {
|
|
88
44
|
closeMenu();
|
|
89
45
|
if (previewServerState !== 'connected') {
|
|
90
|
-
(0, NotificationCenter_1.
|
|
46
|
+
(0, NotificationCenter_1.showNotification)('Restart the studio to render', 2000);
|
|
91
47
|
return;
|
|
92
48
|
}
|
|
93
49
|
const renderButton = document.getElementById('render-modal-button');
|
|
@@ -121,13 +77,13 @@ const getFileMenu = ({ readOnlyStudio, closeMenu, setSelectedModal, previewServe
|
|
|
121
77
|
.then((res) => res.json())
|
|
122
78
|
.then(({ success }) => {
|
|
123
79
|
if (!success) {
|
|
124
|
-
(0, NotificationCenter_1.
|
|
80
|
+
(0, NotificationCenter_1.showNotification)(`Could not open ${window.remotion_editorName}`, 2000);
|
|
125
81
|
}
|
|
126
82
|
})
|
|
127
83
|
.catch((err) => {
|
|
128
84
|
// eslint-disable-next-line no-console
|
|
129
85
|
console.error(err);
|
|
130
|
-
(0, NotificationCenter_1.
|
|
86
|
+
(0, NotificationCenter_1.showNotification)(`Could not open ${window.remotion_editorName}`, 2000);
|
|
131
87
|
});
|
|
132
88
|
},
|
|
133
89
|
type: 'item',
|
|
@@ -232,7 +188,6 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
|
|
|
232
188
|
readOnlyStudio,
|
|
233
189
|
closeMenu,
|
|
234
190
|
previewServerState: type,
|
|
235
|
-
setSelectedModal,
|
|
236
191
|
}),
|
|
237
192
|
{
|
|
238
193
|
id: 'view',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { AnyComposition } from 'remotion';
|
|
2
2
|
export declare const validateCompositionName: (compName: string, compositions: AnyComposition[]) => string | null;
|
|
3
|
-
export declare const validateCompositionDimension: (dimension: 'Width' | 'Height', value:
|
|
4
|
-
export declare const validateCompositionDuration: (value:
|
|
3
|
+
export declare const validateCompositionDimension: (dimension: 'Width' | 'Height', value: number) => string | null;
|
|
4
|
+
export declare const validateCompositionDuration: (value: number) => string | null;
|
|
@@ -26,13 +26,13 @@ const validateCompositionDimension = (dimension, value) => {
|
|
|
26
26
|
};
|
|
27
27
|
exports.validateCompositionDimension = validateCompositionDimension;
|
|
28
28
|
const validateCompositionDuration = (value) => {
|
|
29
|
-
if (
|
|
29
|
+
if (value % 1 !== 0) {
|
|
30
30
|
return `Duration must be an integer.`;
|
|
31
31
|
}
|
|
32
|
-
if (Number.isNaN(
|
|
32
|
+
if (Number.isNaN(value)) {
|
|
33
33
|
return 'Invalid number.';
|
|
34
34
|
}
|
|
35
|
-
if (
|
|
35
|
+
if (value === 0) {
|
|
36
36
|
return 'Duration cannot be zero.';
|
|
37
37
|
}
|
|
38
38
|
return null;
|
|
@@ -136,19 +136,13 @@ const processUpdate = function (hash, moduleMap, options) {
|
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
function performReload() {
|
|
139
|
-
var _a;
|
|
140
139
|
if (!reload) {
|
|
141
140
|
return;
|
|
142
141
|
}
|
|
143
142
|
if (options.warn)
|
|
144
143
|
console.warn('[Fast refresh] Reloading page');
|
|
145
144
|
if (window.remotion_unsavedProps) {
|
|
146
|
-
(
|
|
147
|
-
id: 'random',
|
|
148
|
-
content: 'Fast refresh needs to reload the page, but you have unsaved props. Save then reload the page to apply changes.',
|
|
149
|
-
created: new Date().getMilliseconds(),
|
|
150
|
-
duration: 1,
|
|
151
|
-
});
|
|
145
|
+
(0, NotificationCenter_1.showNotification)('Fast refresh needs to reload the page, but you have unsaved props. Save then reload the page to apply changes.', 1000);
|
|
152
146
|
}
|
|
153
147
|
else {
|
|
154
148
|
(0, url_state_1.reloadUrl)();
|
package/dist/state/modals.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import type { AudioCodec, Codec, ColorSpace, LogLevel, OpenGlRenderer, PixelForm
|
|
|
2
2
|
import type React from 'react';
|
|
3
3
|
import type { QuickSwitcherMode } from '../components/QuickSwitcher/NoResults';
|
|
4
4
|
import type { Bug, UpdateInfo } from '../components/UpdateCheck';
|
|
5
|
-
export type CompType = 'composition' | 'still';
|
|
6
5
|
export type RenderModalState = {
|
|
7
6
|
type: 'render';
|
|
8
7
|
compositionId: string;
|
|
@@ -46,8 +45,14 @@ export type RenderModalState = {
|
|
|
46
45
|
defaultConfigurationAudioCodec: AudioCodec | null;
|
|
47
46
|
};
|
|
48
47
|
export type ModalState = {
|
|
49
|
-
type: '
|
|
50
|
-
|
|
48
|
+
type: 'duplicate-comp';
|
|
49
|
+
compositionId: string;
|
|
50
|
+
} | {
|
|
51
|
+
type: 'delete-comp';
|
|
52
|
+
compositionId: string;
|
|
53
|
+
} | {
|
|
54
|
+
type: 'rename-comp';
|
|
55
|
+
compositionId: string;
|
|
51
56
|
} | RenderModalState | {
|
|
52
57
|
type: 'render-progress';
|
|
53
58
|
jobId: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/studio",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.136",
|
|
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
|
-
"
|
|
22
|
-
"@remotion/
|
|
23
|
-
"@remotion/media-utils": "4.0.
|
|
24
|
-
"remotion": "4.0.
|
|
25
|
-
"@remotion/studio-shared": "4.0.
|
|
21
|
+
"remotion": "4.0.136",
|
|
22
|
+
"@remotion/player": "4.0.136",
|
|
23
|
+
"@remotion/media-utils": "4.0.136",
|
|
24
|
+
"@remotion/renderer": "4.0.136",
|
|
25
|
+
"@remotion/studio-shared": "4.0.136"
|
|
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.
|
|
43
|
+
"@remotion/zod-types": "4.0.136"
|
|
44
44
|
},
|
|
45
45
|
"publishConfig": {
|
|
46
46
|
"access": "public"
|