@remotion/studio 4.0.505 → 4.0.506
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/api/install-package.d.ts +2 -3
- package/dist/api/install-package.js +1 -3
- package/dist/api/visual-control.d.ts +3 -0
- package/dist/api/visual-control.js +3 -0
- package/dist/components/AssetSelectorItem.js +1 -1
- package/dist/components/Canvas.js +2 -0
- package/dist/components/CompositionSelector.js +1 -1
- package/dist/components/CompositionSelectorItem.js +1 -1
- package/dist/components/ConfigureDefaultEditorModal.d.ts +3 -1
- package/dist/components/ConfigureDefaultEditorModal.js +90 -32
- package/dist/components/ConfigureLicenseModal.d.ts +2 -1
- package/dist/components/ConfigureLicenseModal.js +40 -32
- package/dist/components/ConfirmationDialog.js +2 -2
- package/dist/components/Editor.js +2 -0
- package/dist/components/EffectPickerModal.js +1 -1
- package/dist/components/GlobalKeybindings.js +3 -2
- package/dist/components/InlineCaptionInspector.d.ts +2 -2
- package/dist/components/InlineDropdown.d.ts +2 -1
- package/dist/components/InlineDropdown.js +10 -4
- package/dist/components/InspectorOpenInEditor.d.ts +1 -0
- package/dist/components/InspectorOpenInEditor.js +33 -9
- package/dist/components/InspectorPanel/AlignmentControls.js +5 -2
- package/dist/components/InspectorPanel/CompositionInspector.js +15 -1
- package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +1 -1
- package/dist/components/InspectorPanel/EasingInspector.js +7 -4
- package/dist/components/InspectorPanel/KeyframeInspector.js +5 -1
- package/dist/components/InspectorPanel/common.d.ts +1 -0
- package/dist/components/InspectorPanel/common.js +2 -2
- package/dist/components/InspectorPanel/use-composition-actions.js +4 -1
- package/dist/components/InspectorSequenceSection.js +4 -4
- package/dist/components/InstallPackage.js +1 -1
- package/dist/components/MenuBuildIndicator.js +1 -0
- package/dist/components/MenuToolbar.js +1 -1
- package/dist/components/ModalFooter.d.ts +1 -0
- package/dist/components/ModalFooter.js +6 -2
- package/dist/components/ModalHeader.js +1 -1
- package/dist/components/Modals.js +18 -7
- package/dist/components/ModalsProvider.js +5 -6
- package/dist/components/NewComposition/CodemodFooter.js +1 -1
- package/dist/components/NewComposition/DismissableModal.js +1 -1
- package/dist/components/NewComposition/RenameStaticFile.js +1 -1
- package/dist/components/OverrideInputProps.js +1 -1
- package/dist/components/PlayPause.js +2 -1
- package/dist/components/PlaybackKeyboardShortcutsManager.js +7 -5
- package/dist/components/PreviewToolbarOverflowButton.js +4 -2
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +1 -1
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -1
- package/dist/components/RenderButton.d.ts +3 -3
- package/dist/components/RenderButton.js +42 -7
- package/dist/components/RenderModal/RenderStatusModal.js +1 -1
- package/dist/components/RenderModal/ServerRenderModal.js +1 -1
- package/dist/components/RenderModal/WebRenderModal.js +3 -2
- package/dist/components/RenderQueue/RenderQueueError.js +1 -1
- package/dist/components/RenderQueue/RenderQueueItemStatus.js +1 -1
- package/dist/components/RenderQueue/RenderQueueProgressMessage.js +1 -1
- package/dist/components/RenderQueue/RenderQueueRepeat.js +1 -1
- package/dist/components/SelectedOutlineElement.js +1 -1
- package/dist/components/SelectedOutlineOverlay.js +62 -19
- package/dist/components/SettingsModal.d.ts +7 -0
- package/dist/components/SettingsModal.js +50 -0
- package/dist/components/SettingsModalFooter.d.ts +4 -0
- package/dist/components/SettingsModalFooter.js +46 -0
- package/dist/components/SidebarRenderButton.js +1 -1
- package/dist/components/SvgImportDialog.js +2 -2
- package/dist/components/TimeValue.js +1 -1
- package/dist/components/Timeline/Timeline.js +1 -0
- package/dist/components/Timeline/TimelineAssetField.js +1 -1
- package/dist/components/Timeline/TimelineDragHandler.js +3 -3
- package/dist/components/Timeline/TimelineEffectPropItem.js +5 -3
- package/dist/components/Timeline/TimelineExpandedRow.d.ts +4 -2
- package/dist/components/Timeline/TimelineExpandedRow.js +2 -2
- package/dist/components/Timeline/TimelineFontFamilyField.js +3 -1
- package/dist/components/Timeline/TimelineKeyframeControls.js +1 -0
- package/dist/components/Timeline/TimelineSelection.js +1 -0
- package/dist/components/Timeline/TimelineSequenceItem.js +28 -34
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +1 -1
- package/dist/components/Timeline/reset-selected-timeline-props.js +1 -1
- package/dist/components/Timeline/should-subscribe-to-sequence-props.d.ts +1 -1
- package/dist/components/Timeline/timeline-asset-link.d.ts +2 -2
- package/dist/components/Timeline/timeline-asset-link.js +2 -2
- package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +4 -0
- package/dist/components/Timeline/use-timeline-asset-drop.js +1 -0
- package/dist/components/Timeline/use-timeline-expanded-tree.d.ts +1 -0
- package/dist/components/Timeline/use-timeline-expanded-tree.js +5 -0
- package/dist/components/Timeline/use-timeline-height.js +20 -0
- package/dist/components/TimelineInOutToggle.js +5 -1
- package/dist/components/TopPanel.js +16 -0
- package/dist/components/UpdateCheck.js +1 -1
- package/dist/components/effect-drag-and-drop.js +1 -1
- package/dist/components/handle-drop.d.ts +2 -1
- package/dist/components/handle-drop.js +12 -2
- package/dist/components/import-assets.d.ts +18 -6
- package/dist/components/import-assets.js +76 -32
- package/dist/esm/{chunk-7pgk8h5m.js → chunk-b49ec3nz.js} +8334 -7701
- package/dist/esm/internals.mjs +8334 -7701
- package/dist/esm/previewEntry.mjs +8343 -7710
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/client-id.d.ts +3 -1
- package/dist/helpers/client-id.js +21 -4
- package/dist/helpers/install-required-package.d.ts +3 -3
- package/dist/helpers/install-required-package.js +1 -6
- package/dist/helpers/studio-fit-padding.d.ts +1 -1
- package/dist/helpers/studio-fit-padding.js +1 -1
- package/dist/helpers/timeline-layout.d.ts +2 -1
- package/dist/helpers/timeline-layout.js +5 -2
- package/dist/helpers/use-menu-structure.js +23 -33
- package/dist/helpers/use-runtime-values.d.ts +11 -0
- package/dist/helpers/use-runtime-values.js +76 -0
- package/dist/icons/apps.d.ts +2 -0
- package/dist/icons/apps.js +7 -0
- package/dist/icons/browse-elements.d.ts +4 -0
- package/dist/icons/browse-elements.js +10 -0
- package/dist/state/modals.d.ts +5 -6
- package/dist/state/modals.js +5 -3
- package/package.json +12 -12
|
@@ -52,7 +52,7 @@ const TimeValue = () => {
|
|
|
52
52
|
const frame = (0, remotion_1.useCurrentFrame)();
|
|
53
53
|
const config = remotion_1.Internals.useUnsafeVideoConfig();
|
|
54
54
|
const isStill = (0, is_current_selected_still_1.useIsStill)();
|
|
55
|
-
const { seek, play, pause, toggle } = player_1.PlayerInternals.
|
|
55
|
+
const { seek, play, pause, toggle } = player_1.PlayerInternals.usePlayerMethods();
|
|
56
56
|
const keybindings = (0, use_keybinding_1.useKeybinding)();
|
|
57
57
|
const ref = (0, react_1.useRef)(null);
|
|
58
58
|
const onTextChange = (0, react_1.useCallback)((newVal) => {
|
|
@@ -34,7 +34,7 @@ const TimelineAssetField = ({ field, effectiveValue, propStatus, onSave, onDragV
|
|
|
34
34
|
if (field.fieldSchema.type !== 'asset') {
|
|
35
35
|
throw new Error('TimelineAssetField rendered for non-asset field');
|
|
36
36
|
}
|
|
37
|
-
const { setSelectedModal } = (0, react_1.useContext)(modals_1.
|
|
37
|
+
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
38
38
|
const staticFiles = (0, use_static_files_1.useStaticFiles)();
|
|
39
39
|
const { getSourceAction, initialQuery, sourceAction } = (0, react_1.useContext)(exports.AssetSelectionContext);
|
|
40
40
|
const inlineSourceAction = (0, react_1.useMemo)(() => {
|
|
@@ -108,7 +108,7 @@ const TimelineDragHandlerInner = () => {
|
|
|
108
108
|
const [dragging, setDragging] = (0, react_1.useState)({
|
|
109
109
|
dragging: false,
|
|
110
110
|
});
|
|
111
|
-
const {
|
|
111
|
+
const { isPlaying, play, pause, seek } = player_1.PlayerInternals.usePlayerMethods();
|
|
112
112
|
const scroller = (0, react_1.useRef)(null);
|
|
113
113
|
const stopInterval = () => {
|
|
114
114
|
if (scroller.current) {
|
|
@@ -140,14 +140,14 @@ const TimelineDragHandlerInner = () => {
|
|
|
140
140
|
seek(frame);
|
|
141
141
|
setDragging({
|
|
142
142
|
dragging: true,
|
|
143
|
-
wasPlaying:
|
|
143
|
+
wasPlaying: isPlaying(),
|
|
144
144
|
button: e.button,
|
|
145
145
|
pointerId: e.pointerId,
|
|
146
146
|
target: e.currentTarget,
|
|
147
147
|
});
|
|
148
148
|
(_b = (_a = e.currentTarget).setPointerCapture) === null || _b === void 0 ? void 0 : _b.call(_a, e.pointerId);
|
|
149
149
|
pause();
|
|
150
|
-
}, [isHighestContext, videoConfig, left, width, seek,
|
|
150
|
+
}, [isHighestContext, videoConfig, left, width, seek, isPlaying, pause]);
|
|
151
151
|
const onPointerMoveScrubbing = (0, react_1.useCallback)((e) => {
|
|
152
152
|
var _a;
|
|
153
153
|
if (!videoConfig) {
|
|
@@ -209,6 +209,10 @@ const TimelineEffectPropValue = ({ field, nodePath, validatedLocation, sourceFra
|
|
|
209
209
|
return (jsx_runtime_1.jsx(TimelineSchemaField_1.TimelineFieldValue, { field: field, propStatus: propStatus, onSave: onSave, onDragValueChange: onDragValueChange, onDragEnd: onDragEnd, effectiveValue: effectiveValue, scaleLockNodePath: null }));
|
|
210
210
|
};
|
|
211
211
|
exports.TimelineEffectPropValue = TimelineEffectPropValue;
|
|
212
|
+
const TimelineEffectPropValueAtCurrentFrame = ({ field, nodePath, validatedLocation, keyframeDisplayOffset }) => {
|
|
213
|
+
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
214
|
+
return (jsx_runtime_1.jsx(exports.TimelineEffectPropValue, { field: field, nodePath: nodePath, validatedLocation: validatedLocation, sourceFrame: timelinePosition - keyframeDisplayOffset }));
|
|
215
|
+
};
|
|
212
216
|
const TimelineEffectPropItem = ({ field, validatedLocation, rowDepth, nodePath, nodePathInfo, keyframeDisplayOffset, keyframeControlsMode = 'timeline', }) => {
|
|
213
217
|
var _a;
|
|
214
218
|
var _b;
|
|
@@ -217,8 +221,6 @@ const TimelineEffectPropItem = ({ field, validatedLocation, rowDepth, nodePath,
|
|
|
217
221
|
const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
218
222
|
const { getEffectDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
|
|
219
223
|
const selection = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo);
|
|
220
|
-
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
221
|
-
const sourceFrame = timelinePosition - keyframeDisplayOffset;
|
|
222
224
|
const style = (0, react_1.useMemo)(() => {
|
|
223
225
|
return field.typeName === 'text-content'
|
|
224
226
|
? fieldRowBase
|
|
@@ -324,7 +326,7 @@ const TimelineEffectPropItem = ({ field, validatedLocation, rowDepth, nodePath,
|
|
|
324
326
|
property: field.key,
|
|
325
327
|
}).catch(() => undefined);
|
|
326
328
|
}, [field.key, previewServerState.type, validatedLocation]);
|
|
327
|
-
const row = (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: rowDepth, eye: jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {}), keyframeControls: keyframeControls, arrow: jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {}), style: style, selected: selection.selected, selectable: selection.selectable, selectionItem: selection.selectionItem, onSelect: selection.onSelect, onDoubleClick: onPropertyDoubleClick, showSelectedBackground: true, containsSelection: false, outerHeight: null, children: jsx_runtime_1.jsx(TimelineFieldRowContent_1.TimelineFieldRowContent, { field: field, rowDepth: rowDepth, selected: selection.selected, children: jsx_runtime_1.jsx(
|
|
329
|
+
const row = (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: rowDepth, eye: jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {}), keyframeControls: keyframeControls, arrow: jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {}), style: style, selected: selection.selected, selectable: selection.selectable, selectionItem: selection.selectionItem, onSelect: selection.onSelect, onDoubleClick: onPropertyDoubleClick, showSelectedBackground: true, containsSelection: false, outerHeight: null, children: jsx_runtime_1.jsx(TimelineFieldRowContent_1.TimelineFieldRowContent, { field: field, rowDepth: rowDepth, selected: selection.selected, children: jsx_runtime_1.jsx(TimelineEffectPropValueAtCurrentFrame, { field: field, nodePath: nodePath, validatedLocation: validatedLocation, keyframeDisplayOffset: keyframeDisplayOffset }) }) }));
|
|
328
330
|
return jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: row });
|
|
329
331
|
};
|
|
330
332
|
exports.TimelineEffectPropItem = TimelineEffectPropItem;
|
|
@@ -5,7 +5,7 @@ import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-s
|
|
|
5
5
|
import type { TimelineTreeNode } from '../../helpers/timeline-layout';
|
|
6
6
|
import type { GetIsExpanded } from '../ExpandedTracksProvider';
|
|
7
7
|
import type { TimelineKeyframeControlsMode } from './TimelineKeyframeControls';
|
|
8
|
-
|
|
8
|
+
type TimelineExpandedRowProps = {
|
|
9
9
|
readonly node: TimelineTreeNode;
|
|
10
10
|
readonly depth: number;
|
|
11
11
|
readonly nestedDepth: number;
|
|
@@ -17,4 +17,6 @@ export declare const TimelineExpandedRow: React.FC<{
|
|
|
17
17
|
readonly schema: InteractivitySchema;
|
|
18
18
|
readonly keyframeDisplayOffset: number;
|
|
19
19
|
readonly keyframeControlsMode?: TimelineKeyframeControlsMode;
|
|
20
|
-
}
|
|
20
|
+
};
|
|
21
|
+
export declare const TimelineExpandedRow: React.NamedExoticComponent<TimelineExpandedRowProps>;
|
|
22
|
+
export {};
|
|
@@ -21,7 +21,7 @@ const rowLabel = {
|
|
|
21
21
|
color: colors_1.WHITE_ALPHA_80,
|
|
22
22
|
userSelect: 'none',
|
|
23
23
|
};
|
|
24
|
-
const
|
|
24
|
+
const TimelineExpandedRowInner = ({ node, depth, nestedDepth, rowDepthBase, getIsExpanded, toggleTrack, validatedLocation, nodePath, schema, keyframeDisplayOffset, keyframeControlsMode, }) => {
|
|
25
25
|
const rowDepth = (rowDepthBase !== null && rowDepthBase !== void 0 ? rowDepthBase : (0, timeline_row_layout_1.getExpandedRowDepth)({ nestedDepth, treeDepth: 0 })) + depth;
|
|
26
26
|
const selection = (0, TimelineSelection_1.useTimelineRowSelection)(node.nodePathInfo);
|
|
27
27
|
const labelStyle = react_1.default.useMemo(() => ({
|
|
@@ -60,4 +60,4 @@ const TimelineExpandedRow = ({ node, depth, nestedDepth, rowDepthBase, getIsExpa
|
|
|
60
60
|
height: (0, timeline_layout_1.getTreeRowHeight)(node),
|
|
61
61
|
}, selected: selection.selected, selectable: selection.selectable, selectionItem: selection.selectionItem, onSelect: selection.onSelect, showSelectedBackground: true, containsSelection: false, outerHeight: null, children: jsx_runtime_1.jsx("span", { style: labelStyle, children: node.label }) }));
|
|
62
62
|
};
|
|
63
|
-
exports.TimelineExpandedRow =
|
|
63
|
+
exports.TimelineExpandedRow = react_1.default.memo(TimelineExpandedRowInner);
|
|
@@ -343,7 +343,9 @@ const TimelineFontFamilyField = ({ field, propStatus, effectiveValue, onSave, on
|
|
|
343
343
|
await onSave(option.value);
|
|
344
344
|
return;
|
|
345
345
|
}
|
|
346
|
-
await (0, install_required_package_1.installRequiredPackages)([
|
|
346
|
+
await (0, install_required_package_1.installRequiredPackages)([
|
|
347
|
+
{ name: '@remotion/google-fonts', version: null },
|
|
348
|
+
]);
|
|
347
349
|
const googleFont = getGoogleFontSourceEdit({
|
|
348
350
|
fontFamily: (_a = option.value) !== null && _a !== void 0 ? _a : option.label,
|
|
349
351
|
importName: option.googleFontImportName,
|
|
@@ -131,6 +131,7 @@ const resolveKeyframeControlTarget = ({ nodePathInfo, tracks, propStatuses, getD
|
|
|
131
131
|
propStatuses,
|
|
132
132
|
includeTextContent: false,
|
|
133
133
|
includeSourceControls: false,
|
|
134
|
+
runtimeValues: null,
|
|
134
135
|
});
|
|
135
136
|
const fieldNode = findFieldNode(tree, (0, timeline_node_path_key_1.timelineNodePathInfoToKey)(nodePathInfo));
|
|
136
137
|
if (fieldNode === null || fieldNode.field === null) {
|
|
@@ -448,6 +448,7 @@ const getSelectableTimelineItems = ({ getDragOverrides, getEffectDragOverrides,
|
|
|
448
448
|
propStatuses,
|
|
449
449
|
includeTextContent: false,
|
|
450
450
|
includeSourceControls: false,
|
|
451
|
+
runtimeValues: null,
|
|
451
452
|
});
|
|
452
453
|
const filteredTree = (0, timeline_expanded_filter_1.filterTimelineExpandedTree)({
|
|
453
454
|
nodes: tree,
|
|
@@ -45,6 +45,7 @@ const interactivity_enabled_1 = require("../../helpers/interactivity-enabled");
|
|
|
45
45
|
const studio_runtime_config_1 = require("../../helpers/studio-runtime-config");
|
|
46
46
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
47
47
|
const use_keybinding_1 = require("../../helpers/use-keybinding");
|
|
48
|
+
const use_runtime_values_1 = require("../../helpers/use-runtime-values");
|
|
48
49
|
const modals_1 = require("../../state/modals");
|
|
49
50
|
const timeline_sequence_hover_1 = require("../../state/timeline-sequence-hover");
|
|
50
51
|
const call_api_1 = require("../call-api");
|
|
@@ -175,9 +176,9 @@ const getDestinationIndex = ({ fromIndex, insertionIndex, }) => {
|
|
|
175
176
|
return insertionIndex > fromIndex ? insertionIndex - 1 : insertionIndex;
|
|
176
177
|
};
|
|
177
178
|
const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDepth, sequence, nodePathInfo, keyframeDisplayOffset, sequenceFrameOffset, siblingIndex, }) => {
|
|
178
|
-
var _a, _b
|
|
179
|
-
var
|
|
180
|
-
const nodePath = (
|
|
179
|
+
var _a, _b;
|
|
180
|
+
var _c, _d;
|
|
181
|
+
const nodePath = (_c = nodePathInfo === null || nodePathInfo === void 0 ? void 0 : nodePathInfo.sequenceSubscriptionKey) !== null && _c !== void 0 ? _c : null;
|
|
181
182
|
const { hovered, onPointerEnter, onPointerLeave } = (0, timeline_sequence_hover_1.useTimelineSequenceHover)(nodePathInfo);
|
|
182
183
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
183
184
|
const previewConnected = previewServerState.type === 'connected';
|
|
@@ -185,7 +186,7 @@ const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDept
|
|
|
185
186
|
const { getIsExpanded } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksGetterContext);
|
|
186
187
|
const { toggleTrack } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksSetterContext);
|
|
187
188
|
const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
188
|
-
const { setSelectedModal } = (0, react_1.useContext)(modals_1.
|
|
189
|
+
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
189
190
|
const { isHighestContext } = (0, use_keybinding_1.useKeybinding)();
|
|
190
191
|
const selectAsset = (0, use_select_asset_1.useSelectAsset)();
|
|
191
192
|
const selectComposition = (0, InitialCompositionLoader_1.useSelectComposition)();
|
|
@@ -227,7 +228,7 @@ const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDept
|
|
|
227
228
|
: displayName;
|
|
228
229
|
const canDeleteFromSource = Boolean(nodePath && (validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source));
|
|
229
230
|
const nodePathKey = (0, react_1.useMemo)(() => nodePath ? remotion_1.Internals.makeSequencePropsSubscriptionKey(nodePath) : null, [nodePath]);
|
|
230
|
-
const parentId = (
|
|
231
|
+
const parentId = (_d = sequence.parent) !== null && _d !== void 0 ? _d : null;
|
|
231
232
|
const canReorderSequence = previewInteractive &&
|
|
232
233
|
Boolean(nodePath && nodePathKey && (validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source)) &&
|
|
233
234
|
(nodePathInfo === null || nodePathInfo === void 0 ? void 0 : nodePathInfo.numberOfSequencesWithThisNodePath) === 1;
|
|
@@ -477,15 +478,14 @@ const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDept
|
|
|
477
478
|
toggleTrack(nodePathInfo);
|
|
478
479
|
}, [nodePathInfo, toggleTrack]);
|
|
479
480
|
const codeHiddenStatus = propStatusesForOverride === null || propStatusesForOverride === void 0 ? void 0 : propStatusesForOverride.hidden;
|
|
481
|
+
const runtimeHidden = (0, use_runtime_values_1.useRuntimeValue)(sequence.controls, 'hidden');
|
|
480
482
|
const isItemHidden = (0, react_1.useMemo)(() => {
|
|
481
|
-
var _a;
|
|
482
483
|
const propStatus = codeHiddenStatus && codeHiddenStatus.status === 'static'
|
|
483
484
|
? codeHiddenStatus.codeValue
|
|
484
485
|
: undefined;
|
|
485
|
-
const
|
|
486
|
-
const effective = (propStatus !== null && propStatus !== void 0 ? propStatus : runtimeValue);
|
|
486
|
+
const effective = (propStatus !== null && propStatus !== void 0 ? propStatus : runtimeHidden);
|
|
487
487
|
return effective !== null && effective !== void 0 ? effective : false;
|
|
488
|
-
}, [codeHiddenStatus,
|
|
488
|
+
}, [codeHiddenStatus, runtimeHidden]);
|
|
489
489
|
const onToggleVisibility = (0, react_1.useCallback)((type) => {
|
|
490
490
|
if (!sequence.controls ||
|
|
491
491
|
!nodePath ||
|
|
@@ -593,7 +593,7 @@ const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDept
|
|
|
593
593
|
const canRenameSelectedSequence = canRenameThisSequence &&
|
|
594
594
|
selected &&
|
|
595
595
|
selectedItems.length === 1 &&
|
|
596
|
-
((
|
|
596
|
+
((_a = selectedItems[0]) === null || _a === void 0 ? void 0 : _a.type) === 'sequence';
|
|
597
597
|
const onCancelRenaming = (0, react_1.useCallback)(() => {
|
|
598
598
|
setIsRenaming(false);
|
|
599
599
|
}, []);
|
|
@@ -638,29 +638,23 @@ const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDept
|
|
|
638
638
|
const canAddEffect = (nodePathInfo === null || nodePathInfo === void 0 ? void 0 : nodePathInfo.supportsEffects) === true &&
|
|
639
639
|
previewInteractive &&
|
|
640
640
|
Boolean(validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source);
|
|
641
|
-
const canCrop = (0,
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
!
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
}
|
|
657
|
-
}
|
|
658
|
-
nodePathInfo,
|
|
659
|
-
previewInteractive,
|
|
660
|
-
propStatusesForOverride,
|
|
661
|
-
sequence.controls,
|
|
662
|
-
validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source,
|
|
663
|
-
]);
|
|
641
|
+
const canCrop = (0, use_runtime_values_1.useRuntimeValueSelector)({
|
|
642
|
+
controls: sequence.controls,
|
|
643
|
+
selector: (runtimeValues) => {
|
|
644
|
+
if (!previewInteractive ||
|
|
645
|
+
!sequence.controls ||
|
|
646
|
+
!nodePathInfo ||
|
|
647
|
+
!propStatusesForOverride ||
|
|
648
|
+
!(validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source)) {
|
|
649
|
+
return false;
|
|
650
|
+
}
|
|
651
|
+
const activeSchema = remotion_1.Internals.flattenActiveSchema(sequence.controls.schema, (key) => runtimeValues[key]);
|
|
652
|
+
return (0, selected_outline_types_1.canEditSelectedOutlineCrop)({
|
|
653
|
+
schema: activeSchema,
|
|
654
|
+
propStatuses: propStatusesForOverride,
|
|
655
|
+
});
|
|
656
|
+
},
|
|
657
|
+
});
|
|
664
658
|
const onAddEffect = (0, react_1.useCallback)(() => {
|
|
665
659
|
if (!canAddEffect ||
|
|
666
660
|
previewServerState.type !== 'connected' ||
|
|
@@ -818,7 +812,7 @@ const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDept
|
|
|
818
812
|
const canDropEffect = previewInteractive &&
|
|
819
813
|
nodePath !== null &&
|
|
820
814
|
validatedLocation !== null &&
|
|
821
|
-
((
|
|
815
|
+
((_b = sequence.controls) === null || _b === void 0 ? void 0 : _b.supportsEffects) === true;
|
|
822
816
|
const sequenceReorderLineStyle = (0, react_1.useMemo)(() => {
|
|
823
817
|
if (sequenceDropIndicator !== 'before') {
|
|
824
818
|
return null;
|
|
@@ -195,7 +195,7 @@ const getTrimBeforePlaybackRate = (sequence) => {
|
|
|
195
195
|
!playbackRateComponentIdentities.has(componentIdentity)) {
|
|
196
196
|
return 1;
|
|
197
197
|
}
|
|
198
|
-
const runtimePlaybackRate = (_b = sequence.controls) === null || _b === void 0 ? void 0 : _b.
|
|
198
|
+
const runtimePlaybackRate = (_b = sequence.controls) === null || _b === void 0 ? void 0 : _b.runtimeValues.getSnapshot().playbackRate;
|
|
199
199
|
return typeof runtimePlaybackRate === 'number' ? runtimePlaybackRate : 1;
|
|
200
200
|
};
|
|
201
201
|
const isFromDraggableSequence = (sequence) => {
|
|
@@ -71,7 +71,7 @@ const getTimelinePropResetTargets = ({ selections, sequences, overrideIdsToNodeP
|
|
|
71
71
|
const sequencePropStatus = remotion_1.Internals.getPropStatusesCtx(propStatuses, nodePath);
|
|
72
72
|
const { merged: sequenceValuesDotNotation } = remotion_1.Internals.computeEffectiveSchemaValuesDotNotation({
|
|
73
73
|
schema: sequence.controls.schema,
|
|
74
|
-
currentValue: sequence.controls.
|
|
74
|
+
currentValue: sequence.controls.runtimeValues.getSnapshot(),
|
|
75
75
|
overrideValues: {},
|
|
76
76
|
propStatus: sequencePropStatus,
|
|
77
77
|
frame: null,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { TSequence } from 'remotion';
|
|
2
2
|
export declare const shouldSubscribeToSequenceProps: (sequence: TSequence, previewConnected: boolean) => sequence is TSequence & {
|
|
3
|
-
readonly controls: import("remotion").
|
|
3
|
+
readonly controls: import("remotion").SequenceRegistrationControls;
|
|
4
4
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SequenceRegistrationControls } from 'remotion';
|
|
2
2
|
type LinkInfo = {
|
|
3
3
|
kind: 'local';
|
|
4
4
|
assetPath: string;
|
|
@@ -13,7 +13,7 @@ export declare const splitRemoteSourceForMiddleEllipsis: (src: string) => {
|
|
|
13
13
|
leading: string;
|
|
14
14
|
trailing: string;
|
|
15
15
|
};
|
|
16
|
-
export declare const getTimelineAssetSrcFromSchema: (controls:
|
|
16
|
+
export declare const getTimelineAssetSrcFromSchema: (controls: SequenceRegistrationControls | null, runtimeValues?: Readonly<Record<string, unknown>> | undefined) => string | null;
|
|
17
17
|
export declare const getTimelineAssetLinkInfo: (src: string) => LinkInfo;
|
|
18
18
|
export declare const openTimelineAssetLink: (linkInfo: TimelineAssetLinkInfo, selectAsset: (asset: string) => void) => void;
|
|
19
19
|
export {};
|
|
@@ -21,11 +21,11 @@ const splitRemoteSourceForMiddleEllipsis = (src) => {
|
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
exports.splitRemoteSourceForMiddleEllipsis = splitRemoteSourceForMiddleEllipsis;
|
|
24
|
-
const getTimelineAssetSrcFromSchema = (controls) => {
|
|
24
|
+
const getTimelineAssetSrcFromSchema = (controls, runtimeValues = controls === null || controls === void 0 ? void 0 : controls.runtimeValues.getSnapshot()) => {
|
|
25
25
|
if (!controls || !(0, studio_shared_1.getAssetSchemaKeys)(controls.schema).includes('src')) {
|
|
26
26
|
return null;
|
|
27
27
|
}
|
|
28
|
-
const { src } =
|
|
28
|
+
const { src } = runtimeValues !== null && runtimeValues !== void 0 ? runtimeValues : {};
|
|
29
29
|
return typeof src === 'string' ? src : null;
|
|
30
30
|
};
|
|
31
31
|
exports.getTimelineAssetSrcFromSchema = getTimelineAssetSrcFromSchema;
|
|
@@ -6,6 +6,7 @@ const react_1 = require("react");
|
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
7
7
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
8
8
|
const timeline_node_path_key_1 = require("../../helpers/timeline-node-path-key");
|
|
9
|
+
const use_runtime_values_1 = require("../../helpers/use-runtime-values");
|
|
9
10
|
const ExpandedTracksProvider_1 = require("../ExpandedTracksProvider");
|
|
10
11
|
const get_node_keyframes_1 = require("./get-node-keyframes");
|
|
11
12
|
const imperative_state_1 = require("./imperative-state");
|
|
@@ -37,6 +38,7 @@ const useExpandedTrackKeyframeRows = ({ sequence, nodePathInfo, keyframeDisplayO
|
|
|
37
38
|
const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
38
39
|
const { getDragOverrides, getEffectDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
|
|
39
40
|
const { selectedItems } = (0, TimelineSelection_1.useTimelineSelection)();
|
|
41
|
+
const runtimeValues = (0, use_runtime_values_1.useRuntimeValues)(sequence.controls);
|
|
40
42
|
const tree = (0, react_1.useMemo)(() => (0, timeline_layout_1.buildTimelineTree)({
|
|
41
43
|
sequence,
|
|
42
44
|
nodePathInfo,
|
|
@@ -45,12 +47,14 @@ const useExpandedTrackKeyframeRows = ({ sequence, nodePathInfo, keyframeDisplayO
|
|
|
45
47
|
propStatuses,
|
|
46
48
|
includeTextContent: false,
|
|
47
49
|
includeSourceControls: false,
|
|
50
|
+
runtimeValues,
|
|
48
51
|
}), [
|
|
49
52
|
propStatuses,
|
|
50
53
|
getDragOverrides,
|
|
51
54
|
getEffectDragOverrides,
|
|
52
55
|
nodePathInfo,
|
|
53
56
|
sequence,
|
|
57
|
+
runtimeValues,
|
|
54
58
|
]);
|
|
55
59
|
const selectedRowKeys = (0, react_1.useMemo)(() => (0, timeline_expanded_filter_1.getSelectedTimelineExpandedRowKeys)(selectedItems), [selectedItems]);
|
|
56
60
|
const filteredTree = (0, react_1.useMemo)(() => (0, timeline_expanded_filter_1.filterTimelineExpandedTree)({
|
|
@@ -9,6 +9,7 @@ export declare const useTimelineExpandedTree: ({ sequence, nodePathInfo, include
|
|
|
9
9
|
filteredTree: import("../../helpers/timeline-layout").TimelineTreeNode[];
|
|
10
10
|
getIsExpanded: import("../ExpandedTracksProvider").GetIsExpanded;
|
|
11
11
|
propStatuses: import("remotion").PropStatuses;
|
|
12
|
+
runtimeValues: Readonly<Record<string, unknown>>;
|
|
12
13
|
toggleTrack: (nodePathInfo: SequenceNodePathInfo) => void;
|
|
13
14
|
tree: import("../../helpers/timeline-layout").TimelineTreeNode[];
|
|
14
15
|
};
|
|
@@ -4,6 +4,7 @@ exports.useTimelineExpandedTree = void 0;
|
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const remotion_1 = require("remotion");
|
|
6
6
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
7
|
+
const use_runtime_values_1 = require("../../helpers/use-runtime-values");
|
|
7
8
|
const ExpandedTracksProvider_1 = require("../ExpandedTracksProvider");
|
|
8
9
|
const get_node_keyframes_1 = require("./get-node-keyframes");
|
|
9
10
|
const timeline_expanded_filter_1 = require("./timeline-expanded-filter");
|
|
@@ -14,6 +15,7 @@ const useTimelineExpandedTree = ({ sequence, nodePathInfo, includeTextContent, i
|
|
|
14
15
|
const { propStatuses: visualModePropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
15
16
|
const { getDragOverrides, getEffectDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
|
|
16
17
|
const { selectedItems } = (0, TimelineSelection_1.useTimelineSelection)();
|
|
18
|
+
const runtimeValues = (0, use_runtime_values_1.useRuntimeValues)(sequence.controls);
|
|
17
19
|
const tree = (0, react_1.useMemo)(() => (0, timeline_layout_1.buildTimelineTree)({
|
|
18
20
|
sequence,
|
|
19
21
|
nodePathInfo,
|
|
@@ -22,6 +24,7 @@ const useTimelineExpandedTree = ({ sequence, nodePathInfo, includeTextContent, i
|
|
|
22
24
|
propStatuses: visualModePropStatuses,
|
|
23
25
|
includeTextContent,
|
|
24
26
|
includeSourceControls,
|
|
27
|
+
runtimeValues,
|
|
25
28
|
}), [
|
|
26
29
|
sequence,
|
|
27
30
|
nodePathInfo,
|
|
@@ -30,6 +33,7 @@ const useTimelineExpandedTree = ({ sequence, nodePathInfo, includeTextContent, i
|
|
|
30
33
|
visualModePropStatuses,
|
|
31
34
|
includeTextContent,
|
|
32
35
|
includeSourceControls,
|
|
36
|
+
runtimeValues,
|
|
33
37
|
]);
|
|
34
38
|
const selectedRowKeys = (0, react_1.useMemo)(() => (0, timeline_expanded_filter_1.getSelectedTimelineExpandedRowKeys)(selectedItems), [selectedItems]);
|
|
35
39
|
const filteredTree = (0, react_1.useMemo)(() => (0, timeline_expanded_filter_1.filterTimelineExpandedTree)({
|
|
@@ -57,6 +61,7 @@ const useTimelineExpandedTree = ({ sequence, nodePathInfo, includeTextContent, i
|
|
|
57
61
|
filteredTree,
|
|
58
62
|
getIsExpanded,
|
|
59
63
|
propStatuses: visualModePropStatuses,
|
|
64
|
+
runtimeValues,
|
|
60
65
|
toggleTrack,
|
|
61
66
|
tree,
|
|
62
67
|
};
|
|
@@ -5,6 +5,7 @@ const react_1 = require("react");
|
|
|
5
5
|
const remotion_1 = require("remotion");
|
|
6
6
|
const client_id_1 = require("../../helpers/client-id");
|
|
7
7
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
8
|
+
const use_runtime_values_1 = require("../../helpers/use-runtime-values");
|
|
8
9
|
const ExpandedTracksProvider_1 = require("../ExpandedTracksProvider");
|
|
9
10
|
const get_node_keyframes_1 = require("./get-node-keyframes");
|
|
10
11
|
const MaxTimelineTracks_1 = require("./MaxTimelineTracks");
|
|
@@ -19,6 +20,20 @@ const useTimelineHeight = ({ shown, hasBeenCut, isStill, }) => {
|
|
|
19
20
|
const { selectedItems } = (0, TimelineSelection_1.useTimelineSelection)();
|
|
20
21
|
const previewServerConnected = previewServerState.type === 'connected';
|
|
21
22
|
const selectedRowKeys = (0, react_1.useMemo)(() => (0, timeline_expanded_filter_1.getSelectedTimelineExpandedRowKeys)(selectedItems), [selectedItems]);
|
|
23
|
+
const expandedControls = (0, react_1.useMemo)(() => shown.flatMap((track) => {
|
|
24
|
+
if (!previewServerConnected ||
|
|
25
|
+
track.nodePathInfo === null ||
|
|
26
|
+
!getIsExpanded(track.nodePathInfo) ||
|
|
27
|
+
track.sequence.controls === null) {
|
|
28
|
+
return [];
|
|
29
|
+
}
|
|
30
|
+
return [track.sequence.controls];
|
|
31
|
+
}), [getIsExpanded, previewServerConnected, shown]);
|
|
32
|
+
const runtimeValueSnapshots = (0, use_runtime_values_1.useRuntimeValueSnapshots)(expandedControls);
|
|
33
|
+
const runtimeValuesByStore = (0, react_1.useMemo)(() => new Map(expandedControls.map((controls, index) => [
|
|
34
|
+
controls.runtimeValues,
|
|
35
|
+
runtimeValueSnapshots[index],
|
|
36
|
+
])), [expandedControls, runtimeValueSnapshots]);
|
|
22
37
|
return (0, react_1.useMemo)(() => {
|
|
23
38
|
const tracksHeight = shown.reduce((acc, track) => {
|
|
24
39
|
const isExpanded = previewServerConnected &&
|
|
@@ -27,6 +42,7 @@ const useTimelineHeight = ({ shown, hasBeenCut, isStill, }) => {
|
|
|
27
42
|
const layerHeight = (0, timeline_layout_1.getTimelineLayerHeight)(track.sequence.type) +
|
|
28
43
|
timeline_layout_1.TIMELINE_ITEM_BORDER_BOTTOM;
|
|
29
44
|
const expandedHeight = (() => {
|
|
45
|
+
var _a;
|
|
30
46
|
if (!isExpanded || track.nodePathInfo === null) {
|
|
31
47
|
return 0;
|
|
32
48
|
}
|
|
@@ -39,6 +55,9 @@ const useTimelineHeight = ({ shown, hasBeenCut, isStill, }) => {
|
|
|
39
55
|
propStatuses,
|
|
40
56
|
includeTextContent: false,
|
|
41
57
|
includeSourceControls: false,
|
|
58
|
+
runtimeValues: track.sequence.controls
|
|
59
|
+
? ((_a = runtimeValuesByStore.get(track.sequence.controls.runtimeValues)) !== null && _a !== void 0 ? _a : null)
|
|
60
|
+
: null,
|
|
42
61
|
});
|
|
43
62
|
const filteredTree = (0, timeline_expanded_filter_1.filterTimelineExpandedTree)({
|
|
44
63
|
nodes: tree,
|
|
@@ -81,6 +100,7 @@ const useTimelineHeight = ({ shown, hasBeenCut, isStill, }) => {
|
|
|
81
100
|
getDragOverrides,
|
|
82
101
|
getEffectDragOverrides,
|
|
83
102
|
selectedRowKeys,
|
|
103
|
+
runtimeValuesByStore,
|
|
84
104
|
]);
|
|
85
105
|
};
|
|
86
106
|
exports.useTimelineHeight = useTimelineHeight;
|
|
@@ -25,11 +25,15 @@ const style = {
|
|
|
25
25
|
exports.inOutHandles = (0, react_1.createRef)();
|
|
26
26
|
exports.defaultInOutValue = { inFrame: null, outFrame: null };
|
|
27
27
|
const TimelineInOutPointToggle = () => {
|
|
28
|
+
var _a;
|
|
28
29
|
const { inFrame, outFrame } = (0, in_out_1.useTimelineInOutFramePosition)();
|
|
29
30
|
const { setInAndOutFrames } = (0, in_out_1.useTimelineSetInOutFramePosition)();
|
|
30
31
|
const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
|
|
31
32
|
const keybindings = (0, use_keybinding_1.useKeybinding)();
|
|
32
|
-
const { getCurrentFrame
|
|
33
|
+
const { getCurrentFrame } = player_1.PlayerInternals.usePlayerMethods();
|
|
34
|
+
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
35
|
+
const isFirstFrame = timelinePosition === 0;
|
|
36
|
+
const isLastFrame = timelinePosition === ((_a = videoConfig === null || videoConfig === void 0 ? void 0 : videoConfig.durationInFrames) !== null && _a !== void 0 ? _a : 1) - 1;
|
|
33
37
|
const onInOutClear = (0, react_1.useCallback)((composition) => {
|
|
34
38
|
setInAndOutFrames((prev) => {
|
|
35
39
|
return {
|
|
@@ -35,6 +35,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.TopPanel = exports.useResponsiveSidebarStatus = void 0;
|
|
37
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
const player_1 = require("@remotion/player");
|
|
38
39
|
const react_1 = __importStar(require("react"));
|
|
39
40
|
const remotion_1 = require("remotion");
|
|
40
41
|
const mobile_layout_1 = require("../helpers/mobile-layout");
|
|
@@ -96,6 +97,21 @@ const TopPanelInner = ({ readOnlyStudio, onMounted, drawRef, bufferStateDelayInM
|
|
|
96
97
|
}
|
|
97
98
|
return 'expanded';
|
|
98
99
|
}, [sidebarCollapsedStateRight]);
|
|
100
|
+
const previousSidebarState = (0, react_1.useRef)({
|
|
101
|
+
left: actualStateLeft,
|
|
102
|
+
right: actualStateRight,
|
|
103
|
+
});
|
|
104
|
+
(0, react_1.useLayoutEffect)(() => {
|
|
105
|
+
if (previousSidebarState.current.left === actualStateLeft &&
|
|
106
|
+
previousSidebarState.current.right === actualStateRight) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
previousSidebarState.current = {
|
|
110
|
+
left: actualStateLeft,
|
|
111
|
+
right: actualStateRight,
|
|
112
|
+
};
|
|
113
|
+
player_1.PlayerInternals.updateAllElementsSizes();
|
|
114
|
+
}, [actualStateLeft, actualStateRight]);
|
|
99
115
|
(0, react_1.useEffect)(() => {
|
|
100
116
|
onMounted();
|
|
101
117
|
}, [onMounted]);
|
|
@@ -27,7 +27,7 @@ const updateIconContainer = {
|
|
|
27
27
|
};
|
|
28
28
|
const UpdateCheck = () => {
|
|
29
29
|
const [info, setInfo] = (0, react_1.useState)(null);
|
|
30
|
-
const { setSelectedModal } = (0, react_1.useContext)(modals_1.
|
|
30
|
+
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
31
31
|
const { tabIndex } = (0, z_index_1.useZIndex)();
|
|
32
32
|
const [knownBugs, setKnownBugs] = (0, react_1.useState)(null);
|
|
33
33
|
const [hovered, setHovered] = (0, react_1.useState)(false);
|
|
@@ -33,7 +33,7 @@ exports.addEffectFromDragData = addEffectFromDragData;
|
|
|
33
33
|
const addEffectToSequence = async ({ clientId, effect, fileName, nodePath, }) => {
|
|
34
34
|
try {
|
|
35
35
|
const requiredPackage = (0, studio_shared_1.getRequiredPackageForEffectImportPath)(effect.importPath);
|
|
36
|
-
await (0, install_required_package_1.installRequiredPackages)(requiredPackage ? [requiredPackage] : []);
|
|
36
|
+
await (0, install_required_package_1.installRequiredPackages)(requiredPackage ? [{ name: requiredPackage, version: null }] : []);
|
|
37
37
|
const result = await (0, call_api_1.callApi)('/api/add-effect', {
|
|
38
38
|
fileName,
|
|
39
39
|
sequenceNodePath: nodePath,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Dimensions } from '../helpers/is-current-selected-still';
|
|
2
2
|
import { type InsertElementDropPosition } from './import-assets';
|
|
3
3
|
import type { SvgImportMode } from './SvgImportDialog';
|
|
4
|
-
export declare const handleDrop: ({ chooseSvgImportMode, compositionFile, compositionId, destinationDimensions, dropPosition, event, fps, from, }: {
|
|
4
|
+
export declare const handleDrop: ({ chooseSvgImportMode, compositionFile, compositionId, destinationDimensions, dropPosition, event, fps, from, preferCompositionStart, }: {
|
|
5
5
|
chooseSvgImportMode: () => Promise<SvgImportMode | null>;
|
|
6
6
|
compositionFile: string;
|
|
7
7
|
compositionId: string;
|
|
@@ -10,4 +10,5 @@ export declare const handleDrop: ({ chooseSvgImportMode, compositionFile, compos
|
|
|
10
10
|
event: DragEvent;
|
|
11
11
|
fps: number;
|
|
12
12
|
from: number | null;
|
|
13
|
+
preferCompositionStart: boolean;
|
|
13
14
|
}) => Promise<void>;
|
|
@@ -6,7 +6,7 @@ const drop_handler_data_1 = require("./drop-handler-data");
|
|
|
6
6
|
const element_drag_and_drop_1 = require("./element-drag-and-drop");
|
|
7
7
|
const element_install_request_1 = require("./element-install-request");
|
|
8
8
|
const import_assets_1 = require("./import-assets");
|
|
9
|
-
const handleDrop = async ({ chooseSvgImportMode, compositionFile, compositionId, destinationDimensions, dropPosition, event, fps, from, }) => {
|
|
9
|
+
const handleDrop = async ({ chooseSvgImportMode, compositionFile, compositionId, destinationDimensions, dropPosition, event, fps, from, preferCompositionStart, }) => {
|
|
10
10
|
var _a;
|
|
11
11
|
var _b;
|
|
12
12
|
if ((0, drop_handler_data_1.isFileDragEvent)(event)) {
|
|
@@ -28,6 +28,7 @@ const handleDrop = async ({ chooseSvgImportMode, compositionFile, compositionId,
|
|
|
28
28
|
files,
|
|
29
29
|
fps,
|
|
30
30
|
from,
|
|
31
|
+
preferCompositionStart,
|
|
31
32
|
svgImportMode,
|
|
32
33
|
});
|
|
33
34
|
return;
|
|
@@ -45,6 +46,7 @@ const handleDrop = async ({ chooseSvgImportMode, compositionFile, compositionId,
|
|
|
45
46
|
dropPosition,
|
|
46
47
|
fps,
|
|
47
48
|
from,
|
|
49
|
+
preferCompositionStart,
|
|
48
50
|
});
|
|
49
51
|
return;
|
|
50
52
|
}
|
|
@@ -58,6 +60,7 @@ const handleDrop = async ({ chooseSvgImportMode, compositionFile, compositionId,
|
|
|
58
60
|
compositionId,
|
|
59
61
|
fps,
|
|
60
62
|
from,
|
|
63
|
+
preferCompositionStart,
|
|
61
64
|
url: sfxUrl,
|
|
62
65
|
});
|
|
63
66
|
return;
|
|
@@ -73,6 +76,7 @@ const handleDrop = async ({ chooseSvgImportMode, compositionFile, compositionId,
|
|
|
73
76
|
compositionId,
|
|
74
77
|
dropPosition,
|
|
75
78
|
from,
|
|
79
|
+
preferCompositionStart,
|
|
76
80
|
});
|
|
77
81
|
return;
|
|
78
82
|
}
|
|
@@ -85,7 +89,11 @@ const handleDrop = async ({ chooseSvgImportMode, compositionFile, compositionId,
|
|
|
85
89
|
compositionFile,
|
|
86
90
|
compositionId,
|
|
87
91
|
element: element.element,
|
|
88
|
-
from,
|
|
92
|
+
from: (0, import_assets_1.getFromForDrop)({
|
|
93
|
+
durationInFrames: element.element.durationInFrames,
|
|
94
|
+
from,
|
|
95
|
+
preferCompositionStart,
|
|
96
|
+
}),
|
|
89
97
|
position: (0, import_assets_1.getElementPositionForDrop)({
|
|
90
98
|
dimensions: element.element.dimensions,
|
|
91
99
|
dropPosition,
|
|
@@ -102,6 +110,7 @@ const handleDrop = async ({ chooseSvgImportMode, compositionFile, compositionId,
|
|
|
102
110
|
compositionId,
|
|
103
111
|
dropPosition,
|
|
104
112
|
from,
|
|
113
|
+
preferCompositionStart,
|
|
105
114
|
});
|
|
106
115
|
return;
|
|
107
116
|
}
|
|
@@ -116,6 +125,7 @@ const handleDrop = async ({ chooseSvgImportMode, compositionFile, compositionId,
|
|
|
116
125
|
dropPosition,
|
|
117
126
|
fps,
|
|
118
127
|
from,
|
|
128
|
+
preferCompositionStart,
|
|
119
129
|
url: remoteAssetUrl,
|
|
120
130
|
});
|
|
121
131
|
};
|