@remotion/studio 4.0.491 → 4.0.492
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/AssetSelectorItem.js +7 -4
- package/dist/components/Canvas.js +1 -0
- package/dist/components/CompositionOrStillIcon.d.ts +7 -0
- package/dist/components/CompositionOrStillIcon.js +11 -0
- package/dist/components/CompositionSelector.js +13 -1
- package/dist/components/CompositionSelectorItem.js +33 -5
- package/dist/components/CurrentAsset.d.ts +6 -0
- package/dist/components/CurrentAsset.js +14 -8
- package/dist/components/InlineEditableTitle.d.ts +1 -0
- package/dist/components/InlineEditableTitle.js +12 -7
- package/dist/components/InspectorInfoHeader.d.ts +1 -0
- package/dist/components/InspectorInfoHeader.js +7 -4
- package/dist/components/InspectorPanel/SequenceCompositionsSection.d.ts +5 -0
- package/dist/components/InspectorPanel/SequenceCompositionsSection.js +37 -0
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +2 -1
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +2 -1
- package/dist/components/InspectorPanel/common.js +1 -1
- package/dist/components/InspectorPanel/get-compositions-matching-single-child.d.ts +6 -0
- package/dist/components/InspectorPanel/get-compositions-matching-single-child.js +11 -0
- package/dist/components/InspectorSequenceSection.js +57 -3
- package/dist/components/NewComposition/NewComposition.js +11 -4
- package/dist/components/NewComposition/get-new-composition-defaults.d.ts +4 -0
- package/dist/components/NewComposition/get-new-composition-defaults.js +13 -0
- package/dist/components/Timeline/TimelineAssetField.d.ts +14 -0
- package/dist/components/Timeline/TimelineAssetField.js +125 -0
- package/dist/components/Timeline/TimelineExpandedSection.js +1 -0
- package/dist/components/Timeline/TimelineFieldLabel.js +4 -2
- package/dist/components/Timeline/TimelineKeyframeControls.js +1 -0
- package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +4 -0
- package/dist/components/Timeline/TimelineRowChrome.js +8 -6
- package/dist/components/Timeline/TimelineRowLayoutContext.d.ts +7 -0
- package/dist/components/Timeline/TimelineRowLayoutContext.js +13 -0
- package/dist/components/Timeline/TimelineSelection.js +1 -0
- package/dist/components/Timeline/TimelineSequenceItem.js +1 -0
- package/dist/components/Timeline/get-sequence-context-menu-items.js +3 -3
- package/dist/components/Timeline/sequence-props-subscription-store.js +5 -1
- package/dist/components/Timeline/timeline-asset-link.d.ts +6 -0
- package/dist/components/Timeline/timeline-asset-link.js +27 -1
- package/dist/components/Timeline/timeline-field-display-utils.js +1 -0
- package/dist/components/Timeline/timeline-field-row-layout.d.ts +1 -1
- package/dist/components/Timeline/timeline-field-row-layout.js +2 -2
- package/dist/components/Timeline/timeline-row-layout.d.ts +3 -2
- package/dist/components/Timeline/timeline-row-layout.js +6 -5
- package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +1 -0
- package/dist/components/Timeline/use-timeline-expanded-tree.d.ts +2 -1
- package/dist/components/Timeline/use-timeline-expanded-tree.js +3 -1
- package/dist/components/Timeline/use-timeline-height.js +1 -0
- package/dist/components/import-assets.d.ts +10 -2
- package/dist/components/import-assets.js +20 -6
- package/dist/components/root-composition-menu-items.d.ts +8 -0
- package/dist/components/root-composition-menu-items.js +45 -0
- package/dist/esm/{chunk-9wh9k3jj.js → chunk-ewx0568t.js} +5366 -4870
- package/dist/esm/internals.mjs +5366 -4870
- package/dist/esm/previewEntry.mjs +4742 -4246
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/get-file-manager-name.d.ts +1 -0
- package/dist/helpers/get-file-manager-name.js +13 -0
- package/dist/helpers/timeline-layout.d.ts +2 -1
- package/dist/helpers/timeline-layout.js +5 -1
- package/dist/helpers/url-state.d.ts +1 -0
- package/dist/helpers/url-state.js +8 -6
- package/dist/helpers/use-menu-structure.js +4 -2
- package/package.json +11 -11
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.insertElement = exports.insertComposition = exports.insertComponent = exports.insertExistingAssets = exports.insertRemoteAudio = exports.importRemoteAsset = exports.importAssets = exports.pickFilesToImport = exports.getComponentDimensions = exports.getElementPositionForDrop = exports.getAssetElementFromPath = exports.getAssetElement = void 0;
|
|
3
|
+
exports.insertElement = exports.insertComposition = exports.insertComponent = exports.insertExistingAssets = exports.insertRemoteAudio = exports.importRemoteAsset = exports.importAssets = exports.pickFilesToImport = exports.getComponentDimensions = exports.getCompositionPositionForDrop = exports.getElementPositionForDrop = exports.getAssetElementFromPath = exports.getAssetElement = void 0;
|
|
4
4
|
const media_utils_1 = require("@remotion/media-utils");
|
|
5
5
|
const studio_shared_1 = require("@remotion/studio-shared");
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
@@ -181,6 +181,19 @@ const getElementPositionForDrop = ({ dimensions, dropPosition, }) => {
|
|
|
181
181
|
return getCenteredPosition({ dimensions, dropPosition });
|
|
182
182
|
};
|
|
183
183
|
exports.getElementPositionForDrop = getElementPositionForDrop;
|
|
184
|
+
const getCompositionPositionForDrop = ({ compositionDimensions, destinationDimensions, dropPosition, }) => {
|
|
185
|
+
// No translation makes an equal-sized composition fill the destination.
|
|
186
|
+
if (destinationDimensions !== null &&
|
|
187
|
+
compositionDimensions.width === destinationDimensions.width &&
|
|
188
|
+
compositionDimensions.height === destinationDimensions.height) {
|
|
189
|
+
return null;
|
|
190
|
+
}
|
|
191
|
+
return getCenteredPosition({
|
|
192
|
+
dimensions: compositionDimensions,
|
|
193
|
+
dropPosition,
|
|
194
|
+
});
|
|
195
|
+
};
|
|
196
|
+
exports.getCompositionPositionForDrop = getCompositionPositionForDrop;
|
|
184
197
|
const getComponentPropNumber = (props, name) => {
|
|
185
198
|
const prop = props.find((p) => p.name === name);
|
|
186
199
|
return typeof (prop === null || prop === void 0 ? void 0 : prop.value) === 'number' ? prop.value : null;
|
|
@@ -313,11 +326,11 @@ const getAssetElementFromStaticAsset = async (assetPath) => {
|
|
|
313
326
|
}
|
|
314
327
|
return (0, exports.getAssetElementFromPath)(assetPath);
|
|
315
328
|
};
|
|
316
|
-
const pickFilesToImport = () => {
|
|
329
|
+
const pickFilesToImport = ({ multiple = true, } = {}) => {
|
|
317
330
|
return new Promise((resolve) => {
|
|
318
331
|
const input = document.createElement('input');
|
|
319
332
|
input.type = 'file';
|
|
320
|
-
input.multiple =
|
|
333
|
+
input.multiple = multiple;
|
|
321
334
|
input.style.display = 'none';
|
|
322
335
|
let didResolve = false;
|
|
323
336
|
const resolveOnce = (files) => {
|
|
@@ -584,7 +597,7 @@ const serializeResolvedPropsForSourceCode = (props) => {
|
|
|
584
597
|
staticBase: window.remotion_staticBase,
|
|
585
598
|
}).serializedString;
|
|
586
599
|
};
|
|
587
|
-
const insertComposition = async ({ composition, compositionFile, compositionId, dropPosition, }) => {
|
|
600
|
+
const insertComposition = async ({ composition, compositionFile, compositionId, destinationDimensions, dropPosition, }) => {
|
|
588
601
|
if (composition.compositionId === compositionId) {
|
|
589
602
|
(0, NotificationCenter_1.showNotification)('Cannot add a composition to itself', 3000);
|
|
590
603
|
return;
|
|
@@ -614,8 +627,9 @@ const insertComposition = async ({ composition, compositionFile, compositionId,
|
|
|
614
627
|
width: calculated.width,
|
|
615
628
|
height: calculated.height,
|
|
616
629
|
serializedResolvedPropsWithCustomSchema: serializeResolvedPropsForSourceCode(calculated.props),
|
|
617
|
-
position:
|
|
618
|
-
dimensions,
|
|
630
|
+
position: (0, exports.getCompositionPositionForDrop)({
|
|
631
|
+
compositionDimensions: dimensions,
|
|
632
|
+
destinationDimensions,
|
|
619
633
|
dropPosition,
|
|
620
634
|
}),
|
|
621
635
|
},
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SetStateAction } from 'react';
|
|
2
|
+
import type { ModalState } from '../state/modals';
|
|
3
|
+
import type { ComboboxValue } from './NewComposition/ComboBox';
|
|
4
|
+
export declare const getRootCompositionMenuItems: ({ connectionStatus, readOnlyStudio, setSelectedModal, }: {
|
|
5
|
+
connectionStatus: "connected" | "disconnected" | "init";
|
|
6
|
+
readOnlyStudio: boolean;
|
|
7
|
+
setSelectedModal: (value: SetStateAction<ModalState | null>) => void;
|
|
8
|
+
}) => ComboboxValue[];
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRootCompositionMenuItems = void 0;
|
|
4
|
+
const getRootCompositionMenuItems = ({ connectionStatus, readOnlyStudio, setSelectedModal, }) => {
|
|
5
|
+
return [
|
|
6
|
+
{
|
|
7
|
+
id: 'new-root-composition',
|
|
8
|
+
keyHint: null,
|
|
9
|
+
label: 'New composition...',
|
|
10
|
+
leftItem: null,
|
|
11
|
+
onClick: () => {
|
|
12
|
+
setSelectedModal({
|
|
13
|
+
type: 'new-comp',
|
|
14
|
+
folderName: null,
|
|
15
|
+
parentName: null,
|
|
16
|
+
stack: null,
|
|
17
|
+
});
|
|
18
|
+
},
|
|
19
|
+
quickSwitcherLabel: 'New composition...',
|
|
20
|
+
subMenu: null,
|
|
21
|
+
type: 'item',
|
|
22
|
+
value: 'new-root-composition',
|
|
23
|
+
disabled: readOnlyStudio || connectionStatus !== 'connected',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: 'new-root-folder',
|
|
27
|
+
keyHint: null,
|
|
28
|
+
label: 'New folder...',
|
|
29
|
+
leftItem: null,
|
|
30
|
+
onClick: () => {
|
|
31
|
+
setSelectedModal({
|
|
32
|
+
type: 'new-folder',
|
|
33
|
+
parentName: null,
|
|
34
|
+
stack: null,
|
|
35
|
+
});
|
|
36
|
+
},
|
|
37
|
+
quickSwitcherLabel: 'New folder...',
|
|
38
|
+
subMenu: null,
|
|
39
|
+
type: 'item',
|
|
40
|
+
value: 'new-root-folder',
|
|
41
|
+
disabled: readOnlyStudio || connectionStatus !== 'connected',
|
|
42
|
+
},
|
|
43
|
+
];
|
|
44
|
+
};
|
|
45
|
+
exports.getRootCompositionMenuItems = getRootCompositionMenuItems;
|