@remotion/studio 4.0.465 → 4.0.467
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/components/CompositionSelectorItem.js +16 -79
- package/dist/components/CurrentAsset.js +8 -54
- package/dist/components/EditorContent.js +1 -3
- package/dist/components/Menu/MenuItem.d.ts +1 -1
- package/dist/components/Modals.js +1 -1
- package/dist/components/NewComposition/MenuContent.js +1 -0
- package/dist/components/NewComposition/ValidationMessage.d.ts +1 -0
- package/dist/components/NewComposition/ValidationMessage.js +3 -3
- package/dist/components/RenderButton.js +1 -0
- package/dist/components/RenderModal/DataEditor.js +8 -2
- package/dist/components/RenderModal/RenderModalAdvanced.d.ts +1 -11
- package/dist/components/RenderModal/RenderModalAdvanced.js +4 -50
- package/dist/components/RenderModal/RenderModalEncoding.d.ts +37 -0
- package/dist/components/RenderModal/RenderModalEncoding.js +165 -0
- package/dist/components/RenderModal/RenderModalPicture.d.ts +1 -22
- package/dist/components/RenderModal/RenderModalPicture.js +6 -84
- package/dist/components/RenderModal/ServerRenderModal.d.ts +1 -0
- package/dist/components/RenderModal/ServerRenderModal.js +16 -4
- package/dist/components/RenderModal/get-render-modal-warnings.d.ts +7 -1
- package/dist/components/RenderModal/get-render-modal-warnings.js +21 -7
- package/dist/components/RenderQueue/actions.d.ts +2 -1
- package/dist/components/RenderQueue/actions.js +2 -1
- package/dist/components/SidebarRenderButton.js +1 -0
- package/dist/components/Timeline/Timeline.js +6 -4
- package/dist/components/Timeline/TimelineEffectFieldRow.js +2 -1
- package/dist/components/Timeline/TimelineEffectGroupRow.d.ts +1 -0
- package/dist/components/Timeline/TimelineEffectGroupRow.js +18 -2
- package/dist/components/Timeline/TimelineExpandedRow.d.ts +1 -1
- package/dist/components/Timeline/TimelineExpandedRow.js +1 -1
- package/dist/components/Timeline/TimelineExpandedSection.js +9 -2
- package/dist/components/Timeline/TimelineExpandedTrackKeyframes.d.ts +7 -0
- package/dist/components/Timeline/TimelineExpandedTrackKeyframes.js +124 -0
- package/dist/components/Timeline/TimelineListItem.js +21 -3
- package/dist/components/Timeline/TimelineMediaInfo.d.ts +5 -0
- package/dist/components/Timeline/TimelineMediaInfo.js +173 -0
- package/dist/components/Timeline/TimelineSchemaField.js +2 -1
- package/dist/components/Timeline/TimelineStack/index.js +7 -47
- package/dist/components/Timeline/TimelineTracks.js +2 -16
- package/dist/components/Timeline/TimelineVideoInfo.js +2 -2
- package/dist/components/Timeline/get-timeline-keyframes.d.ts +6 -0
- package/dist/components/Timeline/get-timeline-keyframes.js +22 -0
- package/dist/components/composition-menu-items.d.ts +12 -0
- package/dist/components/composition-menu-items.js +166 -0
- package/dist/esm/chunk-5gtx3pza.js +9 -0
- package/dist/esm/{chunk-pqk2qd0d.js → chunk-vwnse6c9.js} +4297 -3547
- package/dist/esm/index.mjs +0 -16
- package/dist/esm/internals.mjs +4295 -3560
- package/dist/esm/previewEntry.mjs +4049 -3314
- package/dist/esm/renderEntry.mjs +3 -4
- package/dist/helpers/format-media-duration.d.ts +1 -0
- package/dist/helpers/format-media-duration.js +14 -0
- package/dist/helpers/get-timeline-sequence-layout.js +4 -3
- package/dist/helpers/make-render-command.d.ts +2 -2
- package/dist/helpers/make-render-command.js +2 -1
- package/dist/helpers/open-in-editor.d.ts +8 -0
- package/dist/helpers/open-in-editor.js +58 -1
- package/dist/helpers/render-modal-sections.d.ts +1 -1
- package/dist/helpers/render-modal-sections.js +35 -5
- package/dist/helpers/retry-payload.js +3 -0
- package/dist/helpers/timeline-layout.d.ts +11 -6
- package/dist/helpers/timeline-layout.js +28 -8
- package/dist/helpers/use-max-media-duration.js +25 -28
- package/dist/helpers/use-media-metadata.d.ts +10 -0
- package/dist/helpers/use-media-metadata.js +135 -0
- package/dist/helpers/use-menu-structure.js +43 -0
- package/dist/state/modals.d.ts +1 -0
- package/package.json +10 -10
- package/dist/esm/chunk-6jf1natv.js +0 -25
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getTimelineKeyframes = exports.getComputedStatusLabel = void 0;
|
|
4
|
+
const getComputedStatusLabel = (propStatus) => {
|
|
5
|
+
var _a;
|
|
6
|
+
if (propStatus.reason !== 'computed') {
|
|
7
|
+
throw new Error(`Unsupported prop status: ${propStatus.reason}`);
|
|
8
|
+
}
|
|
9
|
+
return ((_a = propStatus.keyframes) === null || _a === void 0 ? void 0 : _a.length) ? 'keyframed' : 'computed';
|
|
10
|
+
};
|
|
11
|
+
exports.getComputedStatusLabel = getComputedStatusLabel;
|
|
12
|
+
const getTimelineKeyframes = (propStatus) => {
|
|
13
|
+
var _a;
|
|
14
|
+
if (!propStatus || propStatus.canUpdate) {
|
|
15
|
+
return [];
|
|
16
|
+
}
|
|
17
|
+
if (propStatus.reason !== 'computed') {
|
|
18
|
+
throw new Error(`Unsupported prop status: ${propStatus.reason}`);
|
|
19
|
+
}
|
|
20
|
+
return (_a = propStatus.keyframes) !== null && _a !== void 0 ? _a : [];
|
|
21
|
+
};
|
|
22
|
+
exports.getTimelineKeyframes = getTimelineKeyframes;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SetStateAction } from 'react';
|
|
2
|
+
import type { ResolvedStackLocation } from 'remotion';
|
|
3
|
+
import type { ModalState } from '../state/modals';
|
|
4
|
+
import type { ComboboxValue } from './NewComposition/ComboBox';
|
|
5
|
+
export declare const getCompositionMenuItems: ({ composition, connectionStatus, resolvedLocation, setSelectedModal, closeMenu, readOnlyStudio, }: {
|
|
6
|
+
composition: import("remotion").AnyComposition | null;
|
|
7
|
+
connectionStatus: "connected" | "disconnected" | "init";
|
|
8
|
+
resolvedLocation: ResolvedStackLocation | null;
|
|
9
|
+
setSelectedModal: (value: SetStateAction<ModalState | null>) => void;
|
|
10
|
+
closeMenu: () => void;
|
|
11
|
+
readOnlyStudio: boolean;
|
|
12
|
+
}) => ComboboxValue[];
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCompositionMenuItems = void 0;
|
|
4
|
+
const no_react_1 = require("remotion/no-react");
|
|
5
|
+
const open_in_editor_1 = require("../helpers/open-in-editor");
|
|
6
|
+
const NotificationCenter_1 = require("./Notifications/NotificationCenter");
|
|
7
|
+
const getCompositionMenuItems = ({ composition, connectionStatus, resolvedLocation, setSelectedModal, closeMenu, readOnlyStudio, }) => {
|
|
8
|
+
const editorName = window.remotion_editorName;
|
|
9
|
+
const showInEditorDisabled = !composition || connectionStatus !== 'connected' || !resolvedLocation;
|
|
10
|
+
const openComponentInEditorDisabled = showInEditorDisabled || !(resolvedLocation === null || resolvedLocation === void 0 ? void 0 : resolvedLocation.source);
|
|
11
|
+
return [
|
|
12
|
+
editorName
|
|
13
|
+
? {
|
|
14
|
+
id: 'show-in-editor',
|
|
15
|
+
keyHint: null,
|
|
16
|
+
label: `Show composition in ${editorName}`,
|
|
17
|
+
leftItem: null,
|
|
18
|
+
onClick: async () => {
|
|
19
|
+
closeMenu();
|
|
20
|
+
if (!composition || !resolvedLocation) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
try {
|
|
24
|
+
await (0, open_in_editor_1.openOriginalPositionInEditor)(resolvedLocation);
|
|
25
|
+
}
|
|
26
|
+
catch (err) {
|
|
27
|
+
(0, NotificationCenter_1.showNotification)(err.message, 2000);
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
quickSwitcherLabel: `Show composition in ${editorName}`,
|
|
31
|
+
subMenu: null,
|
|
32
|
+
type: 'item',
|
|
33
|
+
value: 'show-in-editor',
|
|
34
|
+
disabled: showInEditorDisabled,
|
|
35
|
+
}
|
|
36
|
+
: null,
|
|
37
|
+
editorName
|
|
38
|
+
? {
|
|
39
|
+
id: 'open-component-in-editor',
|
|
40
|
+
keyHint: null,
|
|
41
|
+
label: `Show component in ${editorName}`,
|
|
42
|
+
leftItem: null,
|
|
43
|
+
onClick: async () => {
|
|
44
|
+
closeMenu();
|
|
45
|
+
if (!composition || !(resolvedLocation === null || resolvedLocation === void 0 ? void 0 : resolvedLocation.source)) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
try {
|
|
49
|
+
await (0, open_in_editor_1.openCompositionComponentInEditor)({
|
|
50
|
+
compositionFile: resolvedLocation.source,
|
|
51
|
+
compositionId: composition.id,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
catch (err) {
|
|
55
|
+
(0, NotificationCenter_1.showNotification)(err.message, 2000);
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
quickSwitcherLabel: `Show composition component in ${editorName}`,
|
|
59
|
+
subMenu: null,
|
|
60
|
+
type: 'item',
|
|
61
|
+
value: 'open-component-in-editor',
|
|
62
|
+
disabled: openComponentInEditorDisabled,
|
|
63
|
+
}
|
|
64
|
+
: null,
|
|
65
|
+
editorName
|
|
66
|
+
? {
|
|
67
|
+
type: 'divider',
|
|
68
|
+
id: 'show-in-editor-divider',
|
|
69
|
+
}
|
|
70
|
+
: null,
|
|
71
|
+
{
|
|
72
|
+
id: 'rename',
|
|
73
|
+
keyHint: null,
|
|
74
|
+
label: `Rename...`,
|
|
75
|
+
leftItem: null,
|
|
76
|
+
onClick: () => {
|
|
77
|
+
if (!composition) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
closeMenu();
|
|
81
|
+
setSelectedModal({
|
|
82
|
+
type: 'rename-comp',
|
|
83
|
+
compositionId: composition.id,
|
|
84
|
+
});
|
|
85
|
+
},
|
|
86
|
+
quickSwitcherLabel: 'Rename composition...',
|
|
87
|
+
subMenu: null,
|
|
88
|
+
type: 'item',
|
|
89
|
+
value: 'rename',
|
|
90
|
+
disabled: !composition || readOnlyStudio,
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
id: 'duplicate',
|
|
94
|
+
keyHint: null,
|
|
95
|
+
label: `Duplicate...`,
|
|
96
|
+
leftItem: null,
|
|
97
|
+
onClick: () => {
|
|
98
|
+
if (!composition) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
closeMenu();
|
|
102
|
+
setSelectedModal({
|
|
103
|
+
type: 'duplicate-comp',
|
|
104
|
+
compositionId: composition.id,
|
|
105
|
+
compositionType: composition.durationInFrames === 1 ? 'still' : 'composition',
|
|
106
|
+
});
|
|
107
|
+
},
|
|
108
|
+
quickSwitcherLabel: 'Duplicate composition...',
|
|
109
|
+
subMenu: null,
|
|
110
|
+
type: 'item',
|
|
111
|
+
value: 'duplicate',
|
|
112
|
+
disabled: !composition || readOnlyStudio,
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
id: 'delete',
|
|
116
|
+
keyHint: null,
|
|
117
|
+
label: `Delete...`,
|
|
118
|
+
leftItem: null,
|
|
119
|
+
onClick: () => {
|
|
120
|
+
if (!composition) {
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
closeMenu();
|
|
124
|
+
setSelectedModal({
|
|
125
|
+
type: 'delete-comp',
|
|
126
|
+
compositionId: composition.id,
|
|
127
|
+
});
|
|
128
|
+
},
|
|
129
|
+
quickSwitcherLabel: 'Delete composition...',
|
|
130
|
+
subMenu: null,
|
|
131
|
+
type: 'item',
|
|
132
|
+
value: 'delete',
|
|
133
|
+
disabled: !composition || readOnlyStudio,
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
type: 'divider',
|
|
137
|
+
id: 'copy-id-divider',
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
id: 'copy-id',
|
|
141
|
+
keyHint: null,
|
|
142
|
+
label: `Copy ID`,
|
|
143
|
+
leftItem: null,
|
|
144
|
+
onClick: () => {
|
|
145
|
+
if (!composition) {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
closeMenu();
|
|
149
|
+
navigator.clipboard
|
|
150
|
+
.writeText(composition.id)
|
|
151
|
+
.then(() => {
|
|
152
|
+
(0, NotificationCenter_1.showNotification)('Copied to clipboard', 1000);
|
|
153
|
+
})
|
|
154
|
+
.catch((err) => {
|
|
155
|
+
(0, NotificationCenter_1.showNotification)(`Could not copy to clipboard: ${err.message}`, 1000);
|
|
156
|
+
});
|
|
157
|
+
},
|
|
158
|
+
quickSwitcherLabel: 'Copy composition ID',
|
|
159
|
+
subMenu: null,
|
|
160
|
+
type: 'item',
|
|
161
|
+
value: 'copy-id',
|
|
162
|
+
disabled: !composition,
|
|
163
|
+
},
|
|
164
|
+
].filter(no_react_1.NoReactInternals.truthy);
|
|
165
|
+
};
|
|
166
|
+
exports.getCompositionMenuItems = getCompositionMenuItems;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
2
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
3
|
+
}) : x)(function(x) {
|
|
4
|
+
if (typeof require !== "undefined")
|
|
5
|
+
return require.apply(this, arguments);
|
|
6
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export { __require };
|