@remotion/studio 4.0.479 → 4.0.482
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/AudioWaveform.js +19 -11
- package/dist/components/Button.d.ts +1 -0
- package/dist/components/Button.js +2 -2
- package/dist/components/CurrentCompositionSideEffects.d.ts +0 -3
- package/dist/components/CurrentCompositionSideEffects.js +1 -37
- package/dist/components/Editor.js +2 -5
- package/dist/components/EditorContent.js +2 -1
- package/dist/components/ExpandedTracksProvider.d.ts +1 -0
- package/dist/components/ExpandedTracksProvider.js +81 -7
- package/dist/components/GlobalKeybindings.d.ts +3 -1
- package/dist/components/GlobalKeybindings.js +104 -10
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +7 -5
- package/dist/components/InspectorPanel/inspector-selection.d.ts +3 -3
- package/dist/components/InspectorPanel/inspector-selection.js +7 -6
- package/dist/components/InspectorPanel/styles.d.ts +1 -0
- package/dist/components/InspectorPanel/styles.js +19 -1
- package/dist/components/InspectorPanel.js +3 -3
- package/dist/components/InspectorSequenceSection.d.ts +3 -0
- package/dist/components/InspectorSequenceSection.js +12 -2
- package/dist/components/KeyboardShortcutsExplainer.js +10 -2
- package/dist/components/MediaVolumeProvider.js +4 -4
- package/dist/components/Modals.js +2 -1
- package/dist/components/NewComposition/CodemodFooter.d.ts +1 -0
- package/dist/components/NewComposition/CodemodFooter.js +25 -3
- package/dist/components/NewComposition/InputDragger.d.ts +4 -0
- package/dist/components/NewComposition/InputDragger.js +18 -2
- package/dist/components/NewComposition/NewComposition.d.ts +2 -0
- package/dist/components/NewComposition/NewComposition.js +178 -0
- package/dist/components/PreviewToolbar.js +3 -3
- package/dist/components/ResetZoomButton.d.ts +2 -1
- package/dist/components/ResetZoomButton.js +5 -1
- package/dist/components/SelectedOutlineElement.js +39 -0
- package/dist/components/SelectedOutlineOverlay.d.ts +6 -0
- package/dist/components/SelectedOutlineOverlay.js +21 -3
- package/dist/components/Timeline/Timeline.js +9 -9
- package/dist/components/Timeline/TimelineEffectItem.js +1 -1
- package/dist/components/Timeline/TimelineEffectPropItem.js +1 -1
- package/dist/components/Timeline/TimelineExpandArrowButton.js +42 -2
- package/dist/components/Timeline/TimelineExpandedRow.js +2 -2
- package/dist/components/Timeline/TimelineExpandedSection.js +8 -9
- package/dist/components/Timeline/TimelineRowChrome.d.ts +2 -0
- package/dist/components/Timeline/TimelineRowChrome.js +5 -3
- package/dist/components/Timeline/TimelineSelection.d.ts +26 -3
- package/dist/components/Timeline/TimelineSelection.js +322 -91
- package/dist/components/Timeline/TimelineSequenceItem.js +62 -5
- package/dist/components/Timeline/TimelineSequencePropItem.js +1 -1
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +6 -4
- package/dist/components/Timeline/find-track-for-node-path-info.js +2 -2
- package/dist/components/Timeline/get-node-keyframes.d.ts +7 -0
- package/dist/components/Timeline/get-node-keyframes.js +26 -1
- package/dist/components/Timeline/reset-selected-timeline-props.js +15 -2
- package/dist/components/Timeline/timeline-expanded-filter.d.ts +12 -0
- package/dist/components/Timeline/timeline-expanded-filter.js +38 -0
- package/dist/components/Timeline/timeline-field-display-utils.js +3 -0
- package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +50 -18
- package/dist/components/Timeline/use-timeline-expanded-tree.d.ts +1 -0
- package/dist/components/Timeline/use-timeline-expanded-tree.js +27 -0
- package/dist/components/Timeline/use-timeline-height.js +51 -7
- package/dist/components/Timeline/use-timeline-keyframe-drag.js +12 -6
- package/dist/components/TopPanel.js +1 -1
- package/dist/components/composition-menu-items.js +17 -0
- package/dist/components/selected-outline-measurement.js +48 -14
- package/dist/error-overlay/remotion-overlay/ErrorLoader.js +8 -1
- package/dist/esm/{chunk-fge2mq5p.js → chunk-nkqfa5bw.js} +17611 -16502
- package/dist/esm/internals.mjs +17611 -16502
- package/dist/esm/previewEntry.mjs +5179 -4068
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/calculate-timeline.js +6 -2
- package/dist/helpers/get-sequence-visible-range.d.ts +1 -0
- package/dist/helpers/get-sequence-visible-range.js +15 -1
- package/dist/helpers/migrate-expanded-tracks-for-subscription-key.js +3 -3
- package/dist/state/modals.d.ts +2 -0
- package/package.json +11 -11
- package/dist/components/Timeline/TimelineItemStack.d.ts +0 -5
- package/dist/components/Timeline/TimelineItemStack.js +0 -29
|
@@ -285,7 +285,8 @@ const useTimelineKeyframeDrag = ({ frame, nodePathInfo, onSelect, selectable, se
|
|
|
285
285
|
toggleKey: e.metaKey || e.ctrlKey,
|
|
286
286
|
};
|
|
287
287
|
const shouldDragExistingSelection = selected && !interaction.shiftKey && !interaction.toggleKey;
|
|
288
|
-
|
|
288
|
+
const shouldSelectOnPointerUp = !selected && !interaction.shiftKey && !interaction.toggleKey;
|
|
289
|
+
if (!shouldDragExistingSelection && !shouldSelectOnPointerUp) {
|
|
289
290
|
onSelect(interaction);
|
|
290
291
|
}
|
|
291
292
|
const clickedSelection = {
|
|
@@ -380,6 +381,9 @@ const useTimelineKeyframeDrag = ({ frame, nodePathInfo, onSelect, selectable, se
|
|
|
380
381
|
cleanup();
|
|
381
382
|
const targets = dragTargets;
|
|
382
383
|
if (!hasDragged || lastDelta === 0 || targets === null) {
|
|
384
|
+
if (shouldSelectOnPointerUp) {
|
|
385
|
+
onSelect(interaction);
|
|
386
|
+
}
|
|
383
387
|
clearActiveOverrides();
|
|
384
388
|
clearDraggedKeyframes();
|
|
385
389
|
return;
|
|
@@ -392,11 +396,13 @@ const useTimelineKeyframeDrag = ({ frame, nodePathInfo, onSelect, selectable, se
|
|
|
392
396
|
clearDraggedKeyframes();
|
|
393
397
|
return;
|
|
394
398
|
}
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
399
|
+
if (shouldDragExistingSelection) {
|
|
400
|
+
currentSelection.current.selectItems(targets.map((target) => ({
|
|
401
|
+
type: 'keyframe',
|
|
402
|
+
nodePathInfo: target.nodePathInfo,
|
|
403
|
+
frame: target.displayFrame + lastDelta,
|
|
404
|
+
})));
|
|
405
|
+
}
|
|
400
406
|
clearActiveOverrides();
|
|
401
407
|
clearDraggedKeyframes();
|
|
402
408
|
(0, call_move_keyframe_1.callMoveKeyframes)({
|
|
@@ -115,7 +115,7 @@ const TopPanelInner = ({ readOnlyStudio, onMounted, drawRef, bufferStateDelayInM
|
|
|
115
115
|
: null, readOnlyStudio: readOnlyStudio, children: jsx_runtime_1.jsxs("div", { style: container, children: [
|
|
116
116
|
jsx_runtime_1.jsx("div", { style: row, children: 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' ? (isMobileLayout ? (jsx_runtime_1.jsx(MobilePanel_1.default, { onClose: onCollapseLeft, children: jsx_runtime_1.jsx(ExplorerPanel_1.ExplorerPanel, { readOnlyStudio: readOnlyStudio }) })) : (jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "flexer", children: jsx_runtime_1.jsx(ExplorerPanel_1.ExplorerPanel, { readOnlyStudio: readOnlyStudio }) }))) : null, actualStateLeft === 'expanded' ? (jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { allowToCollapse: "left", onCollapse: onCollapseLeft })) : null, jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "anti-flexer", children: jsx_runtime_1.jsxs(SplitterContainer_1.SplitterContainer, { minFlex: 0.5, maxFlex: 0.8, defaultFlex: 0.7, id: "canvas-to-right-sidebar", orientation: "vertical", children: [
|
|
117
117
|
jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "flexer", children: jsx_runtime_1.jsx("div", { ref: drawRef, style: canvasContainerStyle, children: jsx_runtime_1.jsx(CanvasIfSizeIsAvailable_1.CanvasIfSizeIsAvailable, {}) }) }), actualStateRight === 'expanded' ? (jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { allowToCollapse: "right", onCollapse: onCollapseRight })) : null, actualStateRight === 'expanded' ? (isMobileLayout ? (jsx_runtime_1.jsx(MobilePanel_1.default, { onClose: onCollapseRight, children: jsx_runtime_1.jsx(OptionsPanel_1.OptionsPanel, { readOnlyStudio: readOnlyStudio }) })) : (jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "anti-flexer", children: jsx_runtime_1.jsx(OptionsPanel_1.OptionsPanel, { readOnlyStudio: readOnlyStudio }) }))) : null] }) })
|
|
118
|
-
] }) }), jsx_runtime_1.jsx(PreviewToolbar_1.PreviewToolbar, { bufferStateDelayInMilliseconds: bufferStateDelayInMilliseconds, readOnlyStudio: readOnlyStudio }), jsx_runtime_1.jsx(CurrentCompositionSideEffects_1.
|
|
118
|
+
] }) }), jsx_runtime_1.jsx(PreviewToolbar_1.PreviewToolbar, { bufferStateDelayInMilliseconds: bufferStateDelayInMilliseconds, readOnlyStudio: readOnlyStudio }), jsx_runtime_1.jsx(CurrentCompositionSideEffects_1.TitleUpdater, {})
|
|
119
119
|
] }) }));
|
|
120
120
|
};
|
|
121
121
|
exports.TopPanel = react_1.default.memo(TopPanelInner);
|
|
@@ -99,6 +99,23 @@ const getCompositionMenuItems = ({ composition, connectionStatus, resolvedLocati
|
|
|
99
99
|
id: 'show-in-editor-divider',
|
|
100
100
|
}
|
|
101
101
|
: null,
|
|
102
|
+
{
|
|
103
|
+
id: 'new',
|
|
104
|
+
keyHint: null,
|
|
105
|
+
label: `New...`,
|
|
106
|
+
leftItem: null,
|
|
107
|
+
onClick: () => {
|
|
108
|
+
closeMenu();
|
|
109
|
+
setSelectedModal({
|
|
110
|
+
type: 'new-comp',
|
|
111
|
+
});
|
|
112
|
+
},
|
|
113
|
+
quickSwitcherLabel: 'New composition...',
|
|
114
|
+
subMenu: null,
|
|
115
|
+
type: 'item',
|
|
116
|
+
value: 'new',
|
|
117
|
+
disabled: readOnlyStudio,
|
|
118
|
+
},
|
|
102
119
|
{
|
|
103
120
|
id: 'rename',
|
|
104
121
|
keyHint: null,
|
|
@@ -219,28 +219,60 @@ const getOutlineSelectionInteraction = ({ shiftKey, metaKey, ctrlKey, }) => ({
|
|
|
219
219
|
toggleKey: metaKey || ctrlKey,
|
|
220
220
|
});
|
|
221
221
|
exports.getOutlineSelectionInteraction = getOutlineSelectionInteraction;
|
|
222
|
+
const getKeyframeOrEasingField = (item) => {
|
|
223
|
+
if (item.type !== 'keyframe' && item.type !== 'easing') {
|
|
224
|
+
return null;
|
|
225
|
+
}
|
|
226
|
+
return (0, parse_keyframe_field_from_node_path_1.parseKeyframeFieldFromNodePath)(item.nodePathInfo.auxiliaryKeys);
|
|
227
|
+
};
|
|
222
228
|
const getSelectedEffectFieldsBySequenceKey = (selectedItems) => {
|
|
223
|
-
var _a
|
|
229
|
+
var _a;
|
|
224
230
|
const selectedEffects = new Map();
|
|
225
231
|
for (const item of selectedItems) {
|
|
226
|
-
if (item.type
|
|
227
|
-
item.type !== 'sequence-effect-prop') {
|
|
232
|
+
if (item.type === 'guide') {
|
|
228
233
|
continue;
|
|
229
234
|
}
|
|
230
235
|
const sequenceKey = (0, TimelineSelection_1.getTimelineSequenceSelectionKey)(item.nodePathInfo);
|
|
231
236
|
const effectsForSequence = (_a = selectedEffects.get(sequenceKey)) !== null && _a !== void 0 ? _a : new Map();
|
|
232
|
-
const
|
|
233
|
-
|
|
234
|
-
|
|
237
|
+
const addSelectedFields = ({ effectIndex, fieldKey, allFields, }) => {
|
|
238
|
+
var _a;
|
|
239
|
+
const selectedFields = (_a = effectsForSequence.get(effectIndex)) !== null && _a !== void 0 ? _a : {
|
|
240
|
+
allFields: false,
|
|
241
|
+
fieldKeys: new Set(),
|
|
242
|
+
};
|
|
243
|
+
if (allFields) {
|
|
244
|
+
selectedFields.allFields = true;
|
|
245
|
+
}
|
|
246
|
+
else if (fieldKey !== null) {
|
|
247
|
+
selectedFields.fieldKeys.add(fieldKey);
|
|
248
|
+
}
|
|
249
|
+
effectsForSequence.set(effectIndex, selectedFields);
|
|
250
|
+
selectedEffects.set(sequenceKey, effectsForSequence);
|
|
235
251
|
};
|
|
236
252
|
if (item.type === 'sequence-effect') {
|
|
237
|
-
|
|
253
|
+
addSelectedFields({
|
|
254
|
+
effectIndex: item.i,
|
|
255
|
+
fieldKey: null,
|
|
256
|
+
allFields: true,
|
|
257
|
+
});
|
|
258
|
+
continue;
|
|
259
|
+
}
|
|
260
|
+
if (item.type === 'sequence-effect-prop') {
|
|
261
|
+
addSelectedFields({
|
|
262
|
+
effectIndex: item.i,
|
|
263
|
+
fieldKey: item.key,
|
|
264
|
+
allFields: false,
|
|
265
|
+
});
|
|
266
|
+
continue;
|
|
238
267
|
}
|
|
239
|
-
|
|
240
|
-
|
|
268
|
+
const keyframedField = getKeyframeOrEasingField(item);
|
|
269
|
+
if ((keyframedField === null || keyframedField === void 0 ? void 0 : keyframedField.type) === 'effect') {
|
|
270
|
+
addSelectedFields({
|
|
271
|
+
effectIndex: keyframedField.effectIndex,
|
|
272
|
+
fieldKey: keyframedField.fieldKey,
|
|
273
|
+
allFields: false,
|
|
274
|
+
});
|
|
241
275
|
}
|
|
242
|
-
effectsForSequence.set(item.i, selectedFields);
|
|
243
|
-
selectedEffects.set(sequenceKey, effectsForSequence);
|
|
244
276
|
}
|
|
245
277
|
return selectedEffects;
|
|
246
278
|
};
|
|
@@ -257,17 +289,19 @@ const getSelectedTransformOriginInfo = (selectedItems) => {
|
|
|
257
289
|
displayFrame: null,
|
|
258
290
|
};
|
|
259
291
|
}
|
|
260
|
-
if (selectedItem.type !== 'keyframe') {
|
|
292
|
+
if (selectedItem.type !== 'keyframe' && selectedItem.type !== 'easing') {
|
|
261
293
|
return null;
|
|
262
294
|
}
|
|
263
|
-
const field = (
|
|
295
|
+
const field = getKeyframeOrEasingField(selectedItem);
|
|
264
296
|
if ((field === null || field === void 0 ? void 0 : field.type) !== 'sequence' ||
|
|
265
297
|
field.fieldKey !== selected_outline_types_1.transformOriginFieldKey) {
|
|
266
298
|
return null;
|
|
267
299
|
}
|
|
268
300
|
return {
|
|
269
301
|
sequenceKey: (0, TimelineSelection_1.getTimelineSequenceSelectionKey)(selectedItem.nodePathInfo),
|
|
270
|
-
displayFrame: selectedItem.
|
|
302
|
+
displayFrame: selectedItem.type === 'keyframe'
|
|
303
|
+
? selectedItem.frame
|
|
304
|
+
: selectedItem.fromFrame,
|
|
271
305
|
};
|
|
272
306
|
};
|
|
273
307
|
exports.getSelectedTransformOriginInfo = getSelectedTransformOriginInfo;
|
|
@@ -24,6 +24,12 @@ const errorWhileErrorStyle = {
|
|
|
24
24
|
lineHeight: 1.5,
|
|
25
25
|
whiteSpace: 'pre',
|
|
26
26
|
};
|
|
27
|
+
const errorWhileSymbolicatingStyle = {
|
|
28
|
+
color: 'white',
|
|
29
|
+
lineHeight: 1.5,
|
|
30
|
+
marginTop: 24,
|
|
31
|
+
opacity: 0.7,
|
|
32
|
+
};
|
|
27
33
|
const shouldLogError = (error) => {
|
|
28
34
|
return (!(0, error_origin_1.wasErrorLoggedByServer)(error) && (0, studio_shared_1.getLocationFromBuildError)(error) === null);
|
|
29
35
|
};
|
|
@@ -51,6 +57,7 @@ const logSymbolicatedStudioError = (record) => {
|
|
|
51
57
|
});
|
|
52
58
|
};
|
|
53
59
|
const ErrorLoader = ({ error, keyboardShortcuts, onRetry, canHaveDismissButton, calculateMetadata, }) => {
|
|
60
|
+
var _a;
|
|
54
61
|
const [state, setState] = (0, react_1.useState)({
|
|
55
62
|
type: 'loading',
|
|
56
63
|
});
|
|
@@ -90,7 +97,7 @@ const ErrorLoader = ({ error, keyboardShortcuts, onRetry, canHaveDismissButton,
|
|
|
90
97
|
}
|
|
91
98
|
if (state.type === 'error') {
|
|
92
99
|
return (jsx_runtime_1.jsxs("div", { style: container, children: [
|
|
93
|
-
jsx_runtime_1.jsx(ErrorTitle_1.ErrorTitle, { symbolicating: false, name: error.name, message: error.message, canHaveDismissButton: canHaveDismissButton }), jsx_runtime_1.jsx("div", { style: errorWhileErrorStyle, children:
|
|
100
|
+
jsx_runtime_1.jsx(ErrorTitle_1.ErrorTitle, { symbolicating: false, name: error.name, message: error.message, canHaveDismissButton: canHaveDismissButton }), jsx_runtime_1.jsx("div", { style: errorWhileErrorStyle, children: (_a = error.stack) !== null && _a !== void 0 ? _a : 'Check the Terminal and browser console for error messages.' }), jsx_runtime_1.jsxs("div", { style: errorWhileSymbolicatingStyle, children: ["Could not symbolicate the stack trace: ", state.err.message] })
|
|
94
101
|
] }));
|
|
95
102
|
}
|
|
96
103
|
if (state.type === 'no-record') {
|