@remotion/studio 4.0.491 → 4.0.493
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/ResolveCompositionConfigInStudio.js +16 -6
- 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 +14 -2
- package/dist/components/CompositionSelectorItem.js +34 -6
- package/dist/components/CurrentAsset.d.ts +6 -0
- package/dist/components/CurrentAsset.js +14 -8
- package/dist/components/CurrentComposition.d.ts +1 -1
- package/dist/components/CurrentComposition.js +3 -4
- package/dist/components/InlineEditableTitle.d.ts +1 -0
- package/dist/components/InlineEditableTitle.js +12 -7
- package/dist/components/InspectorInfoHeader.d.ts +2 -0
- package/dist/components/InspectorInfoHeader.js +12 -4
- package/dist/components/InspectorPanel/CompositionDimensions.d.ts +6 -0
- package/dist/components/InspectorPanel/CompositionDimensions.js +173 -0
- package/dist/components/InspectorPanel/ConnectedCompositionsSection.d.ts +9 -0
- package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +32 -0
- package/dist/components/InspectorPanel/DefaultInspector.js +6 -3
- package/dist/components/InspectorPanel/EasingInspector.js +3 -3
- package/dist/components/InspectorPanel/KeyframeInspector.js +6 -4
- package/dist/components/InspectorPanel/KeyframeSettings.js +1 -1
- package/dist/components/InspectorPanel/SequenceInspectorHeader.d.ts +1 -1
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +9 -5
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +5 -1
- package/dist/components/InspectorPanel/common.d.ts +2 -1
- package/dist/components/InspectorPanel/common.js +11 -7
- package/dist/components/InspectorPanel/optimistic-composition-metadata.d.ts +22 -0
- package/dist/components/InspectorPanel/optimistic-composition-metadata.js +41 -0
- package/dist/components/InspectorPanel/styles.d.ts +2 -0
- package/dist/components/InspectorPanel/styles.js +7 -2
- package/dist/components/InspectorSequenceSection.js +58 -7
- 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/SelectedOutlineElement.js +21 -2
- package/dist/components/SelectedOutlineOverlay.d.ts +1 -1
- package/dist/components/SelectedOutlineOverlay.js +4 -3
- package/dist/components/Timeline/Timeline.js +8 -1
- package/dist/components/Timeline/TimelineAssetField.d.ts +14 -0
- package/dist/components/Timeline/TimelineAssetField.js +125 -0
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +133 -1
- 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/TimelineList.js +2 -1
- package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +5 -3
- 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 +20 -5
- package/dist/components/Timeline/TimelineSequenceItem.d.ts +2 -1
- package/dist/components/Timeline/TimelineSequenceItem.js +32 -8
- package/dist/components/Timeline/TimelineSequenceName.js +4 -0
- package/dist/components/Timeline/get-sequence-context-menu-items.js +3 -3
- package/dist/components/Timeline/keyframe-clipboard.d.ts +34 -0
- package/dist/components/Timeline/keyframe-clipboard.js +278 -0
- 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 +3 -1
- 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/update-selected-easing.d.ts +1 -1
- package/dist/components/Timeline/update-selected-easing.js +4 -5
- package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +4 -4
- 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/components/selected-outline-measurement.d.ts +2 -5
- package/dist/components/selected-outline-measurement.js +3 -4
- package/dist/esm/{chunk-9wh9k3jj.js → chunk-mndqr3zx.js} +7439 -6121
- package/dist/esm/internals.mjs +7439 -6121
- package/dist/esm/previewEntry.mjs +7371 -6057
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/calculate-timeline.d.ts +2 -1
- package/dist/helpers/calculate-timeline.js +36 -5
- package/dist/helpers/get-connected-compositions.d.ts +6 -0
- package/dist/helpers/get-connected-compositions.js +11 -0
- package/dist/helpers/get-file-manager-name.d.ts +1 -0
- package/dist/helpers/get-file-manager-name.js +13 -0
- package/dist/helpers/get-sequence-double-click-action.d.ts +6 -0
- package/dist/helpers/get-sequence-double-click-action.js +13 -0
- package/dist/helpers/get-timeline-sequence-sort-key.d.ts +2 -1
- 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;
|
|
@@ -48,10 +48,6 @@ export declare const getOutlineSelectionInteraction: ({ shiftKey, metaKey, ctrlK
|
|
|
48
48
|
readonly metaKey: boolean;
|
|
49
49
|
readonly ctrlKey: boolean;
|
|
50
50
|
}) => TimelineSelectionInteraction;
|
|
51
|
-
export declare const getOutlineDoubleClickAction: ({ button, canOpenInEditor, }: {
|
|
52
|
-
readonly button: number;
|
|
53
|
-
readonly canOpenInEditor: boolean;
|
|
54
|
-
}) => "open-in-editor" | null;
|
|
55
51
|
type SelectedEffectFields = {
|
|
56
52
|
allFields: boolean;
|
|
57
53
|
fieldKeys: Set<string>;
|
|
@@ -62,9 +58,10 @@ type SelectedTransformOriginInfo = {
|
|
|
62
58
|
readonly displayFrame: number | null;
|
|
63
59
|
};
|
|
64
60
|
export declare const getSelectedTransformOriginInfo: (selectedItems: readonly TimelineSelection[]) => SelectedTransformOriginInfo | null;
|
|
65
|
-
export declare const getSequencesWithSelectableOutlines: ({ sequences, overrideIdsToNodePaths, }: {
|
|
61
|
+
export declare const getSequencesWithSelectableOutlines: ({ sequences, overrideIdsToNodePaths, compositions, }: {
|
|
66
62
|
readonly sequences: readonly TSequence[];
|
|
67
63
|
readonly overrideIdsToNodePaths: OverrideIdToNodePaths;
|
|
64
|
+
readonly compositions?: readonly import("remotion").AnyComposition[] | undefined;
|
|
68
65
|
}) => SequenceWithSelectedOutline[];
|
|
69
66
|
export declare const measureOutlines: (container: SVGSVGElement, targets: readonly SelectedOutlineTarget[]) => SelectedOutline[];
|
|
70
67
|
export declare const outlinesAreEqual: (a: readonly SelectedOutline[], b: readonly SelectedOutline[]) => boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.outlinesAreEqual = exports.measureOutlines = exports.getSequencesWithSelectableOutlines = exports.getSelectedTransformOriginInfo = exports.getSelectedEffectFieldsBySequenceKey = exports.
|
|
3
|
+
exports.outlinesAreEqual = exports.measureOutlines = exports.getSequencesWithSelectableOutlines = exports.getSelectedTransformOriginInfo = exports.getSelectedEffectFieldsBySequenceKey = exports.getOutlineSelectionInteraction = exports.getSequenceKeysContainingSelection = exports.getSelectedSequenceKeys = exports.getTransformedSvgViewportPoints = exports.getSelectedOutlineRotationPivot = exports.getSelectedOutlineRotationCornerInfo = exports.getRotationCursor = exports.getSelectedOutlineRotationDeltaDegrees = exports.getAngleDegrees = exports.vectorBetween = exports.vectorLength = exports.dot = exports.getOutlineCenter = exports.midpoint = exports.pointToString = void 0;
|
|
4
4
|
const calculate_timeline_1 = require("../helpers/calculate-timeline");
|
|
5
5
|
const colors_1 = require("../helpers/colors");
|
|
6
6
|
const get_box_quads_ponyfill_1 = require("../helpers/get-box-quads-ponyfill");
|
|
@@ -220,8 +220,6 @@ const getOutlineSelectionInteraction = ({ shiftKey, metaKey, ctrlKey, }) => ({
|
|
|
220
220
|
toggleKey: metaKey || ctrlKey,
|
|
221
221
|
});
|
|
222
222
|
exports.getOutlineSelectionInteraction = getOutlineSelectionInteraction;
|
|
223
|
-
const getOutlineDoubleClickAction = ({ button, canOpenInEditor, }) => button === 0 && canOpenInEditor ? 'open-in-editor' : null;
|
|
224
|
-
exports.getOutlineDoubleClickAction = getOutlineDoubleClickAction;
|
|
225
223
|
const getKeyframeOrEasingField = (item) => {
|
|
226
224
|
if (item.type !== 'keyframe' && item.type !== 'easing') {
|
|
227
225
|
return null;
|
|
@@ -308,10 +306,11 @@ const getSelectedTransformOriginInfo = (selectedItems) => {
|
|
|
308
306
|
};
|
|
309
307
|
};
|
|
310
308
|
exports.getSelectedTransformOriginInfo = getSelectedTransformOriginInfo;
|
|
311
|
-
const getSequencesWithSelectableOutlines = ({ sequences, overrideIdsToNodePaths, }) => {
|
|
309
|
+
const getSequencesWithSelectableOutlines = ({ sequences, overrideIdsToNodePaths, compositions = [], }) => {
|
|
312
310
|
return (0, calculate_timeline_1.calculateTimeline)({
|
|
313
311
|
sequences: [...sequences],
|
|
314
312
|
overrideIdsToNodePaths,
|
|
313
|
+
compositions,
|
|
315
314
|
})
|
|
316
315
|
.filter((track) => {
|
|
317
316
|
if (track.nodePathInfo === null) {
|