@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
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getPasteKeyframeTarget = exports.getKeyframeClipboardDataFromSelections = void 0;
|
|
4
|
+
const studio_shared_1 = require("@remotion/studio-shared");
|
|
5
|
+
const remotion_1 = require("remotion");
|
|
6
|
+
const find_track_for_node_path_info_1 = require("./find-track-for-node-path-info");
|
|
7
|
+
const parse_keyframe_field_from_node_path_1 = require("./parse-keyframe-field-from-node-path");
|
|
8
|
+
const getKeyframeClipboardFieldType = ({ schema, fieldKey, }) => {
|
|
9
|
+
const field = remotion_1.Internals.getFlatSchemaWithAllKeys(schema)[fieldKey];
|
|
10
|
+
if (!field) {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
return (0, studio_shared_1.isKeyframeClipboardFieldType)(field.type) ? field.type : null;
|
|
14
|
+
};
|
|
15
|
+
const getKeyframeFieldIdentity = (selection) => {
|
|
16
|
+
if (selection.type === 'keyframe' || selection.type === 'easing') {
|
|
17
|
+
return (0, parse_keyframe_field_from_node_path_1.parseKeyframeFieldFromNodePath)(selection.nodePathInfo.auxiliaryKeys);
|
|
18
|
+
}
|
|
19
|
+
if (selection.type === 'sequence-prop') {
|
|
20
|
+
return { type: 'sequence', fieldKey: selection.key };
|
|
21
|
+
}
|
|
22
|
+
if (selection.type === 'sequence-effect-prop') {
|
|
23
|
+
return {
|
|
24
|
+
type: 'effect',
|
|
25
|
+
effectIndex: selection.i,
|
|
26
|
+
fieldKey: selection.key,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
return null;
|
|
30
|
+
};
|
|
31
|
+
const resolveKeyframeField = ({ selection, sequences, overrideIdsToNodePaths, propStatuses, }) => {
|
|
32
|
+
var _a, _b;
|
|
33
|
+
if (selection.type !== 'keyframe' &&
|
|
34
|
+
selection.type !== 'easing' &&
|
|
35
|
+
selection.type !== 'sequence-prop' &&
|
|
36
|
+
selection.type !== 'sequence-effect-prop') {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
const identity = getKeyframeFieldIdentity(selection);
|
|
40
|
+
if (identity === null) {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
const track = (0, find_track_for_node_path_info_1.findTrackForNodePathInfo)({
|
|
44
|
+
sequences,
|
|
45
|
+
overrideIdsToNodePaths,
|
|
46
|
+
nodePathInfo: selection.nodePathInfo,
|
|
47
|
+
});
|
|
48
|
+
if (!track || track.nodePathInfo === null) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
const nodePath = track.nodePathInfo.sequenceSubscriptionKey;
|
|
52
|
+
if (identity.type === 'sequence') {
|
|
53
|
+
if (!track.sequence.controls) {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
const sequencePropStatus = (_a = remotion_1.Internals.getPropStatusesCtx(propStatuses, nodePath)) === null || _a === void 0 ? void 0 : _a[identity.fieldKey];
|
|
57
|
+
if (!sequencePropStatus || sequencePropStatus.status === 'computed') {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
const { schema } = track.sequence.controls;
|
|
61
|
+
return {
|
|
62
|
+
identity,
|
|
63
|
+
nodePath,
|
|
64
|
+
fileName: nodePath.absolutePath,
|
|
65
|
+
schema,
|
|
66
|
+
fieldType: getKeyframeClipboardFieldType({
|
|
67
|
+
schema,
|
|
68
|
+
fieldKey: identity.fieldKey,
|
|
69
|
+
}),
|
|
70
|
+
propStatus: sequencePropStatus,
|
|
71
|
+
keyframeDisplayOffset: track.keyframeDisplayOffset,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
const effect = track.sequence.effects[identity.effectIndex];
|
|
75
|
+
const effectStatus = remotion_1.Internals.getEffectPropStatusesCtx({
|
|
76
|
+
propStatuses,
|
|
77
|
+
nodePath,
|
|
78
|
+
effectIndex: identity.effectIndex,
|
|
79
|
+
});
|
|
80
|
+
const effectPropStatus = effectStatus.type === 'can-update-effect'
|
|
81
|
+
? (_b = effectStatus.props) === null || _b === void 0 ? void 0 : _b[identity.fieldKey]
|
|
82
|
+
: null;
|
|
83
|
+
if (!effect || !effectPropStatus || effectPropStatus.status === 'computed') {
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
identity,
|
|
88
|
+
nodePath,
|
|
89
|
+
fileName: nodePath.absolutePath,
|
|
90
|
+
schema: effect.schema,
|
|
91
|
+
fieldType: getKeyframeClipboardFieldType({
|
|
92
|
+
schema: effect.schema,
|
|
93
|
+
fieldKey: identity.fieldKey,
|
|
94
|
+
}),
|
|
95
|
+
propStatus: effectPropStatus,
|
|
96
|
+
keyframeDisplayOffset: track.keyframeDisplayOffset,
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
const areResolvedFieldsEqual = (first, second) => {
|
|
100
|
+
if (remotion_1.Internals.makeSequencePropsSubscriptionKey(first.nodePath) !==
|
|
101
|
+
remotion_1.Internals.makeSequencePropsSubscriptionKey(second.nodePath)) {
|
|
102
|
+
return false;
|
|
103
|
+
}
|
|
104
|
+
if (first.identity.type !== second.identity.type) {
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
if (first.identity.fieldKey !== second.identity.fieldKey) {
|
|
108
|
+
return false;
|
|
109
|
+
}
|
|
110
|
+
return (first.identity.type === 'sequence' ||
|
|
111
|
+
(second.identity.type === 'effect' &&
|
|
112
|
+
first.identity.effectIndex === second.identity.effectIndex));
|
|
113
|
+
};
|
|
114
|
+
const getKeyframeClipboardDataFromSelections = ({ selections, sequences, overrideIdsToNodePaths, propStatuses, }) => {
|
|
115
|
+
var _a, _b;
|
|
116
|
+
const keyframeSelections = selections.filter((selection) => selection.type === 'keyframe');
|
|
117
|
+
const easingSelections = selections.filter((selection) => selection.type === 'easing');
|
|
118
|
+
if (keyframeSelections.length + easingSelections.length !==
|
|
119
|
+
selections.length) {
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
122
|
+
const resolvedFields = keyframeSelections.map((selection) => ({
|
|
123
|
+
selection,
|
|
124
|
+
resolved: resolveKeyframeField({
|
|
125
|
+
selection,
|
|
126
|
+
sequences,
|
|
127
|
+
overrideIdsToNodePaths,
|
|
128
|
+
propStatuses,
|
|
129
|
+
}),
|
|
130
|
+
}));
|
|
131
|
+
const firstResolved = (_a = resolvedFields[0]) === null || _a === void 0 ? void 0 : _a.resolved;
|
|
132
|
+
if (firstResolved === null ||
|
|
133
|
+
firstResolved === undefined ||
|
|
134
|
+
resolvedFields.some(({ resolved }) => resolved === null || !areResolvedFieldsEqual(firstResolved, resolved))) {
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
137
|
+
const keyframedPropStatus = firstResolved.propStatus;
|
|
138
|
+
if (keyframedPropStatus.status !== 'keyframed') {
|
|
139
|
+
return null;
|
|
140
|
+
}
|
|
141
|
+
const keyframes = [];
|
|
142
|
+
for (const { selection } of resolvedFields) {
|
|
143
|
+
const sourceFrame = selection.frame - firstResolved.keyframeDisplayOffset;
|
|
144
|
+
const keyframe = keyframedPropStatus.keyframes.find((item) => item.frame === sourceFrame);
|
|
145
|
+
if (keyframe === undefined ||
|
|
146
|
+
JSON.stringify(keyframe.value) === undefined) {
|
|
147
|
+
return null;
|
|
148
|
+
}
|
|
149
|
+
keyframes.push({ frame: sourceFrame, value: keyframe.value });
|
|
150
|
+
}
|
|
151
|
+
keyframes.sort((first, second) => first.frame - second.frame);
|
|
152
|
+
const firstFrame = (_b = keyframes[0]) === null || _b === void 0 ? void 0 : _b.frame;
|
|
153
|
+
if (firstFrame === undefined) {
|
|
154
|
+
return null;
|
|
155
|
+
}
|
|
156
|
+
const keyframeIndexes = keyframes.map((keyframe) => keyframedPropStatus.keyframes.findIndex((item) => item.frame === keyframe.frame));
|
|
157
|
+
if (keyframeIndexes.some((index, position) => index === -1 ||
|
|
158
|
+
(position > 0 && index !== keyframeIndexes[position - 1] + 1))) {
|
|
159
|
+
return null;
|
|
160
|
+
}
|
|
161
|
+
const firstKeyframeIndex = keyframeIndexes[0];
|
|
162
|
+
const lastKeyframeIndex = keyframeIndexes.at(-1);
|
|
163
|
+
if (firstKeyframeIndex === undefined || lastKeyframeIndex === undefined) {
|
|
164
|
+
return null;
|
|
165
|
+
}
|
|
166
|
+
for (const easingSelection of easingSelections) {
|
|
167
|
+
const resolved = resolveKeyframeField({
|
|
168
|
+
selection: easingSelection,
|
|
169
|
+
sequences,
|
|
170
|
+
overrideIdsToNodePaths,
|
|
171
|
+
propStatuses,
|
|
172
|
+
});
|
|
173
|
+
if (resolved === null ||
|
|
174
|
+
!areResolvedFieldsEqual(firstResolved, resolved) ||
|
|
175
|
+
easingSelection.segmentIndex < firstKeyframeIndex ||
|
|
176
|
+
easingSelection.segmentIndex >= lastKeyframeIndex) {
|
|
177
|
+
return null;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
return {
|
|
181
|
+
type: 'keyframe',
|
|
182
|
+
version: 1,
|
|
183
|
+
remotionClipboard: 'keyframe',
|
|
184
|
+
fieldType: firstResolved.fieldType,
|
|
185
|
+
keyframes: keyframes.map((keyframe) => {
|
|
186
|
+
return {
|
|
187
|
+
frameOffset: keyframe.frame - firstFrame,
|
|
188
|
+
value: keyframe.value,
|
|
189
|
+
};
|
|
190
|
+
}),
|
|
191
|
+
easing: keyframeIndexes.slice(0, -1).map((index) => {
|
|
192
|
+
var _a;
|
|
193
|
+
return (_a = keyframedPropStatus.easing[index]) !== null && _a !== void 0 ? _a : studio_shared_1.LINEAR_KEYFRAME_EASING;
|
|
194
|
+
}),
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
exports.getKeyframeClipboardDataFromSelections = getKeyframeClipboardDataFromSelections;
|
|
198
|
+
const isKeyframeValueCompatible = ({ value, fieldType, }) => {
|
|
199
|
+
if (fieldType === null) {
|
|
200
|
+
return true;
|
|
201
|
+
}
|
|
202
|
+
if (fieldType === 'number' || fieldType === 'rotation-degrees') {
|
|
203
|
+
return typeof value === 'number' && Number.isFinite(value);
|
|
204
|
+
}
|
|
205
|
+
if (fieldType === 'scale') {
|
|
206
|
+
return ((typeof value === 'number' && Number.isFinite(value)) ||
|
|
207
|
+
typeof value === 'string');
|
|
208
|
+
}
|
|
209
|
+
if (fieldType === 'uv-coordinate') {
|
|
210
|
+
return (Array.isArray(value) &&
|
|
211
|
+
value.length === 2 &&
|
|
212
|
+
value.every((item) => typeof item === 'number' && Number.isFinite(item)));
|
|
213
|
+
}
|
|
214
|
+
return typeof value === 'string';
|
|
215
|
+
};
|
|
216
|
+
const getPasteKeyframeTarget = ({ selectedItems, payload, timelinePosition, sequences, overrideIdsToNodePaths, propStatuses, }) => {
|
|
217
|
+
var _a, _b;
|
|
218
|
+
if (selectedItems.length === 0) {
|
|
219
|
+
return { type: 'none' };
|
|
220
|
+
}
|
|
221
|
+
const selection = selectedItems[0];
|
|
222
|
+
if (!selection || getKeyframeFieldIdentity(selection) === null) {
|
|
223
|
+
return { type: 'none' };
|
|
224
|
+
}
|
|
225
|
+
const resolvedFields = selectedItems.map((item) => resolveKeyframeField({
|
|
226
|
+
selection: item,
|
|
227
|
+
sequences,
|
|
228
|
+
overrideIdsToNodePaths,
|
|
229
|
+
propStatuses,
|
|
230
|
+
}));
|
|
231
|
+
const resolved = resolvedFields[0];
|
|
232
|
+
if (resolved === null) {
|
|
233
|
+
return { type: 'uncopyable' };
|
|
234
|
+
}
|
|
235
|
+
if (resolvedFields.some((field) => field === null || !areResolvedFieldsEqual(resolved, field))) {
|
|
236
|
+
return { type: 'multiple' };
|
|
237
|
+
}
|
|
238
|
+
const keyframes = payload.keyframes.map((keyframe) => ({
|
|
239
|
+
sourceFrame: timelinePosition - resolved.keyframeDisplayOffset + keyframe.frameOffset,
|
|
240
|
+
value: keyframe.value,
|
|
241
|
+
}));
|
|
242
|
+
const firstFrame = (_a = keyframes[0]) === null || _a === void 0 ? void 0 : _a.sourceFrame;
|
|
243
|
+
const lastFrame = (_b = keyframes.at(-1)) === null || _b === void 0 ? void 0 : _b.sourceFrame;
|
|
244
|
+
if (firstFrame === undefined || lastFrame === undefined) {
|
|
245
|
+
return { type: 'incompatible' };
|
|
246
|
+
}
|
|
247
|
+
const existingFrames = resolved.propStatus.status === 'keyframed'
|
|
248
|
+
? resolved.propStatus.keyframes.map((keyframe) => keyframe.frame)
|
|
249
|
+
: [];
|
|
250
|
+
const keyframesToDelete = existingFrames.filter((frame) => frame >= firstFrame && frame <= lastFrame);
|
|
251
|
+
const finalFrames = [
|
|
252
|
+
...existingFrames.filter((frame) => frame < firstFrame || frame > lastFrame),
|
|
253
|
+
...keyframes.map((keyframe) => keyframe.sourceFrame),
|
|
254
|
+
].sort((first, second) => first - second);
|
|
255
|
+
const firstEasingSegmentIndex = finalFrames.indexOf(firstFrame);
|
|
256
|
+
if (resolved.fieldType !== payload.fieldType ||
|
|
257
|
+
payload.keyframes.some((keyframe) => !isKeyframeValueCompatible({
|
|
258
|
+
value: keyframe.value,
|
|
259
|
+
fieldType: payload.fieldType,
|
|
260
|
+
}))) {
|
|
261
|
+
return { type: 'incompatible' };
|
|
262
|
+
}
|
|
263
|
+
return {
|
|
264
|
+
type: 'valid',
|
|
265
|
+
fileName: resolved.fileName,
|
|
266
|
+
nodePath: resolved.nodePath,
|
|
267
|
+
fieldKey: resolved.identity.fieldKey,
|
|
268
|
+
effectIndex: resolved.identity.type === 'effect'
|
|
269
|
+
? resolved.identity.effectIndex
|
|
270
|
+
: null,
|
|
271
|
+
keyframes,
|
|
272
|
+
keyframesToDelete,
|
|
273
|
+
easing: payload.easing,
|
|
274
|
+
firstEasingSegmentIndex,
|
|
275
|
+
schema: resolved.schema,
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
exports.getPasteKeyframeTarget = getPasteKeyframeTarget;
|
|
@@ -4,10 +4,11 @@ exports.acquireSequencePropsSubscription = void 0;
|
|
|
4
4
|
const studio_shared_1 = require("@remotion/studio-shared");
|
|
5
5
|
const remotion_1 = require("remotion");
|
|
6
6
|
const call_api_1 = require("../call-api");
|
|
7
|
-
const makeKey = ({ fileName, line, column, componentIdentity, sequenceKeys, effectKeys, videoConfigValues, }) => `${fileName}\0${line}\0${column}\0${componentIdentity !== null && componentIdentity !== void 0 ? componentIdentity : ''}\0${sequenceKeys.join('\0')}\0${effectKeys.map((keys) => keys.join('\0')).join('\0\0')}\0${JSON.stringify(videoConfigValues)}`;
|
|
7
|
+
const makeKey = ({ fileName, line, column, componentIdentity, sequenceKeys, assetKeys, effectKeys, videoConfigValues, }) => `${fileName}\0${line}\0${column}\0${componentIdentity !== null && componentIdentity !== void 0 ? componentIdentity : ''}\0${sequenceKeys.join('\0')}\0${assetKeys.join('\0')}\0${effectKeys.map((keys) => keys.join('\0')).join('\0\0')}\0${JSON.stringify(videoConfigValues)}`;
|
|
8
8
|
const entries = new Map();
|
|
9
9
|
const acquireSequencePropsSubscription = ({ fileName, line, column, schema, componentIdentity, effects, nodePath, clientId, applyOnce, applyEach, videoConfigValues, }) => {
|
|
10
10
|
const sequenceKeys = (0, studio_shared_1.getAllSchemaKeys)(schema);
|
|
11
|
+
const assetKeys = (0, studio_shared_1.getAssetSchemaKeys)(schema);
|
|
11
12
|
const effectKeys = effects.map((effect) => (0, studio_shared_1.getAllSchemaKeys)(effect));
|
|
12
13
|
const key = makeKey({
|
|
13
14
|
fileName,
|
|
@@ -15,6 +16,7 @@ const acquireSequencePropsSubscription = ({ fileName, line, column, schema, comp
|
|
|
15
16
|
column,
|
|
16
17
|
componentIdentity,
|
|
17
18
|
sequenceKeys,
|
|
19
|
+
assetKeys,
|
|
18
20
|
effectKeys,
|
|
19
21
|
videoConfigValues,
|
|
20
22
|
});
|
|
@@ -27,6 +29,7 @@ const acquireSequencePropsSubscription = ({ fileName, line, column, schema, comp
|
|
|
27
29
|
nodePath,
|
|
28
30
|
componentIdentity,
|
|
29
31
|
keys: (0, studio_shared_1.getAllSchemaKeys)(schema),
|
|
32
|
+
assetKeys,
|
|
30
33
|
effects: effectKeys,
|
|
31
34
|
clientId,
|
|
32
35
|
videoConfigValues,
|
|
@@ -88,6 +91,7 @@ const acquireSequencePropsSubscription = ({ fileName, line, column, schema, comp
|
|
|
88
91
|
nodePath: result.nodePath,
|
|
89
92
|
clientId: acquired.clientId,
|
|
90
93
|
sequenceKeys,
|
|
94
|
+
assetKeys,
|
|
91
95
|
effectKeys,
|
|
92
96
|
});
|
|
93
97
|
})
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SequenceControls } from 'remotion';
|
|
1
2
|
type LinkInfo = {
|
|
2
3
|
kind: 'local';
|
|
3
4
|
assetPath: string;
|
|
@@ -8,6 +9,11 @@ type LinkInfo = {
|
|
|
8
9
|
title: string;
|
|
9
10
|
} | null;
|
|
10
11
|
export type TimelineAssetLinkInfo = Exclude<LinkInfo, null>;
|
|
12
|
+
export declare const splitRemoteSourceForMiddleEllipsis: (src: string) => {
|
|
13
|
+
leading: string;
|
|
14
|
+
trailing: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const getTimelineAssetSrcFromSchema: (controls: SequenceControls | null) => string | null;
|
|
11
17
|
export declare const getTimelineAssetLinkInfo: (src: string) => LinkInfo;
|
|
12
18
|
export declare const openTimelineAssetLink: (linkInfo: TimelineAssetLinkInfo, selectAsset: (asset: string) => void) => void;
|
|
13
19
|
export {};
|
|
@@ -1,7 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.openTimelineAssetLink = exports.getTimelineAssetLinkInfo = void 0;
|
|
3
|
+
exports.openTimelineAssetLink = exports.getTimelineAssetLinkInfo = exports.getTimelineAssetSrcFromSchema = exports.splitRemoteSourceForMiddleEllipsis = void 0;
|
|
4
|
+
const studio_shared_1 = require("@remotion/studio-shared");
|
|
4
5
|
const url_state_1 = require("../../helpers/url-state");
|
|
6
|
+
const splitRemoteSourceForMiddleEllipsis = (src) => {
|
|
7
|
+
const protocolEnd = src.indexOf('://');
|
|
8
|
+
const minimumSlashIndex = protocolEnd === -1 ? 0 : protocolEnd + 3;
|
|
9
|
+
const lastSlash = src.lastIndexOf('/');
|
|
10
|
+
if (lastSlash >= minimumSlashIndex && lastSlash < src.length - 1) {
|
|
11
|
+
return {
|
|
12
|
+
leading: src.slice(0, lastSlash + 1),
|
|
13
|
+
trailing: src.slice(lastSlash + 1),
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
const middle = Math.ceil(src.length / 2);
|
|
17
|
+
return {
|
|
18
|
+
leading: src.slice(0, middle),
|
|
19
|
+
trailing: src.slice(middle),
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
exports.splitRemoteSourceForMiddleEllipsis = splitRemoteSourceForMiddleEllipsis;
|
|
23
|
+
const getTimelineAssetSrcFromSchema = (controls) => {
|
|
24
|
+
if (!controls || !(0, studio_shared_1.getAssetSchemaKeys)(controls.schema).includes('src')) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
const { src } = controls.currentRuntimeValueDotNotation;
|
|
28
|
+
return typeof src === 'string' ? src : null;
|
|
29
|
+
};
|
|
30
|
+
exports.getTimelineAssetSrcFromSchema = getTimelineAssetSrcFromSchema;
|
|
5
31
|
const getTimelineAssetLinkInfo = (src) => {
|
|
6
32
|
const staticBase = typeof window === 'undefined' ? null : window.remotion_staticBase;
|
|
7
33
|
if (staticBase && src.startsWith(staticBase + '/')) {
|
|
@@ -236,14 +236,16 @@ const formatTimelineFieldValueForDisplay = ({ fieldSchema, value, }) => {
|
|
|
236
236
|
return ((_e = formatUvCoordinateTimelineFieldValueForDisplay({ fieldSchema, value })) !== null && _e !== void 0 ? _e : formatUnknownTimelineValueForDisplay(value));
|
|
237
237
|
case 'text-content':
|
|
238
238
|
return String(value);
|
|
239
|
+
case 'asset':
|
|
239
240
|
case 'array':
|
|
240
241
|
case 'boolean':
|
|
241
242
|
case 'color':
|
|
242
243
|
case 'enum':
|
|
244
|
+
case 'font-family':
|
|
243
245
|
case 'hidden':
|
|
244
246
|
return formatUnknownTimelineValueForDisplay(value);
|
|
245
247
|
default:
|
|
246
|
-
|
|
248
|
+
throw new Error(`Unsupported field type: ${fieldSchema}`);
|
|
247
249
|
}
|
|
248
250
|
};
|
|
249
251
|
exports.formatTimelineFieldValueForDisplay = formatTimelineFieldValueForDisplay;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
export declare const getTimelineFieldLabelRowStyle: (depth: number) => React.CSSProperties;
|
|
2
|
+
export declare const getTimelineFieldLabelRowStyle: (depth: number, basePadding?: number | undefined) => React.CSSProperties;
|
|
3
3
|
export declare const timelineFieldValueColumnStyle: React.CSSProperties;
|
|
4
4
|
export declare const timelineStackedFieldContentStyle: React.CSSProperties;
|
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.timelineStackedFieldContentStyle = exports.timelineFieldValueColumnStyle = exports.getTimelineFieldLabelRowStyle = void 0;
|
|
4
4
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
5
5
|
const timeline_row_layout_1 = require("./timeline-row-layout");
|
|
6
|
-
const getTimelineFieldLabelRowStyle = (depth) => {
|
|
6
|
+
const getTimelineFieldLabelRowStyle = (depth, basePadding) => {
|
|
7
7
|
return {
|
|
8
|
-
flex: `0 0 ${(0, timeline_row_layout_1.getTimelineFieldLabelFlexBasis)(depth)}`,
|
|
8
|
+
flex: `0 0 ${(0, timeline_row_layout_1.getTimelineFieldLabelFlexBasis)(depth, basePadding)}`,
|
|
9
9
|
minWidth: 0,
|
|
10
10
|
display: 'flex',
|
|
11
11
|
flexDirection: 'row',
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
export declare const TIMELINE_ROW_BASE_PADDING = 10;
|
|
2
|
+
export declare const INSPECTOR_ROW_BASE_PADDING = 5;
|
|
2
3
|
export declare const TIMELINE_EYE_COLUMN_WIDTH = 22;
|
|
3
4
|
export declare const TIMELINE_ARROW_COLUMN_WIDTH = 16;
|
|
4
5
|
export declare const TIMELINE_KEYFRAME_CONTROLS_WIDTH = 38;
|
|
5
6
|
export declare const TIMELINE_FIELD_LABEL_EXTRA_WIDTH = 15;
|
|
6
7
|
export declare const getTimelineRowIndentWidth: (depth: number) => number;
|
|
7
|
-
export declare const getTimelineRowLeftChromeWidth: (depth: number) => number;
|
|
8
|
-
export declare const getTimelineFieldLabelFlexBasis: (depth: number) => string;
|
|
8
|
+
export declare const getTimelineRowLeftChromeWidth: (depth: number, basePadding?: number) => number;
|
|
9
|
+
export declare const getTimelineFieldLabelFlexBasis: (depth: number, basePadding?: number) => string;
|
|
9
10
|
export declare const getExpandedRowDepth: ({ nestedDepth, treeDepth, }: {
|
|
10
11
|
nestedDepth: number;
|
|
11
12
|
treeDepth: number;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getExpandedRowDepth = exports.getTimelineFieldLabelFlexBasis = exports.getTimelineRowLeftChromeWidth = exports.getTimelineRowIndentWidth = exports.TIMELINE_FIELD_LABEL_EXTRA_WIDTH = exports.TIMELINE_KEYFRAME_CONTROLS_WIDTH = exports.TIMELINE_ARROW_COLUMN_WIDTH = exports.TIMELINE_EYE_COLUMN_WIDTH = exports.TIMELINE_ROW_BASE_PADDING = void 0;
|
|
3
|
+
exports.getExpandedRowDepth = exports.getTimelineFieldLabelFlexBasis = exports.getTimelineRowLeftChromeWidth = exports.getTimelineRowIndentWidth = exports.TIMELINE_FIELD_LABEL_EXTRA_WIDTH = exports.TIMELINE_KEYFRAME_CONTROLS_WIDTH = exports.TIMELINE_ARROW_COLUMN_WIDTH = exports.TIMELINE_EYE_COLUMN_WIDTH = exports.INSPECTOR_ROW_BASE_PADDING = exports.TIMELINE_ROW_BASE_PADDING = void 0;
|
|
4
4
|
const timeline_indent_1 = require("./timeline-indent");
|
|
5
5
|
exports.TIMELINE_ROW_BASE_PADDING = 10;
|
|
6
|
+
exports.INSPECTOR_ROW_BASE_PADDING = 5;
|
|
6
7
|
exports.TIMELINE_EYE_COLUMN_WIDTH = 22;
|
|
7
8
|
exports.TIMELINE_ARROW_COLUMN_WIDTH = 16;
|
|
8
9
|
exports.TIMELINE_KEYFRAME_CONTROLS_WIDTH = 38;
|
|
@@ -11,15 +12,15 @@ const getTimelineRowIndentWidth = (depth) => {
|
|
|
11
12
|
return depth * timeline_indent_1.TIMELINE_INDENT;
|
|
12
13
|
};
|
|
13
14
|
exports.getTimelineRowIndentWidth = getTimelineRowIndentWidth;
|
|
14
|
-
const getTimelineRowLeftChromeWidth = (depth) => {
|
|
15
|
-
return (
|
|
15
|
+
const getTimelineRowLeftChromeWidth = (depth, basePadding = exports.TIMELINE_ROW_BASE_PADDING) => {
|
|
16
|
+
return (basePadding +
|
|
16
17
|
exports.TIMELINE_EYE_COLUMN_WIDTH +
|
|
17
18
|
(0, exports.getTimelineRowIndentWidth)(depth) +
|
|
18
19
|
exports.TIMELINE_ARROW_COLUMN_WIDTH);
|
|
19
20
|
};
|
|
20
21
|
exports.getTimelineRowLeftChromeWidth = getTimelineRowLeftChromeWidth;
|
|
21
|
-
const getTimelineFieldLabelFlexBasis = (depth) => {
|
|
22
|
-
return `calc(50% - ${(0, exports.getTimelineRowLeftChromeWidth)(depth) - exports.TIMELINE_FIELD_LABEL_EXTRA_WIDTH}px)`;
|
|
22
|
+
const getTimelineFieldLabelFlexBasis = (depth, basePadding = exports.TIMELINE_ROW_BASE_PADDING) => {
|
|
23
|
+
return `calc(50% - ${(0, exports.getTimelineRowLeftChromeWidth)(depth, basePadding) - exports.TIMELINE_FIELD_LABEL_EXTRA_WIDTH}px)`;
|
|
23
24
|
};
|
|
24
25
|
exports.getTimelineFieldLabelFlexBasis = getTimelineFieldLabelFlexBasis;
|
|
25
26
|
const getExpandedRowDepth = ({ nestedDepth, treeDepth, }) => {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { canEditEasingForInterpolationFunction } from '@remotion/studio-shared';
|
|
1
2
|
import type { CanUpdateSequencePropStatusKeyframed, CanUpdateSequencePropStatusEasing, DragOverrideValue, OverrideIdToNodePaths, PropStatuses, SequencePropsSubscriptionKey, InteractivitySchema, TSequence } from 'remotion';
|
|
2
3
|
import type { SetPropStatuses } from './save-sequence-prop';
|
|
3
4
|
import type { TimelineEasingSelection, TimelineSelection } from './TimelineSelection';
|
|
@@ -23,7 +24,6 @@ export type SelectedEasingUpdate = {
|
|
|
23
24
|
readonly currentEasing: TimelineEasingValue;
|
|
24
25
|
readonly propStatus: CanUpdateSequencePropStatusKeyframed;
|
|
25
26
|
};
|
|
26
|
-
export declare const canEditEasingForInterpolationFunction: (interpolationFunction: string) => boolean;
|
|
27
27
|
export declare const getSelectedEasingUpdate: ({ selection, sequences, overrideIdsToNodePaths, propStatuses, }: {
|
|
28
28
|
selection: {
|
|
29
29
|
readonly type: "easing";
|
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.updateSelectedTimelineEasings = exports.getTimelineEasingValueForSelection = exports.getEasingSelections = exports.makeEasingDragOverride = exports.getSelectedEasingUpdates = exports.getSelectedEasingUpdate = exports.canEditEasingForInterpolationFunction = void 0;
|
|
4
4
|
const studio_shared_1 = require("@remotion/studio-shared");
|
|
5
|
+
const studio_shared_2 = require("@remotion/studio-shared");
|
|
6
|
+
Object.defineProperty(exports, "canEditEasingForInterpolationFunction", { enumerable: true, get: function () { return studio_shared_2.canEditEasingForInterpolationFunction; } });
|
|
5
7
|
const remotion_1 = require("remotion");
|
|
6
8
|
const call_update_keyframe_settings_1 = require("./call-update-keyframe-settings");
|
|
7
9
|
const find_track_for_node_path_info_1 = require("./find-track-for-node-path-info");
|
|
8
10
|
const parse_keyframe_field_from_node_path_1 = require("./parse-keyframe-field-from-node-path");
|
|
9
|
-
const canEditEasingForInterpolationFunction = (interpolationFunction) => interpolationFunction === 'interpolate' ||
|
|
10
|
-
interpolationFunction === 'interpolateColors';
|
|
11
|
-
exports.canEditEasingForInterpolationFunction = canEditEasingForInterpolationFunction;
|
|
12
11
|
const isEasingSelection = (selection) => selection.type === 'easing';
|
|
13
12
|
const getSelectedEasingUpdate = ({ selection, sequences, overrideIdsToNodePaths, propStatuses, }) => {
|
|
14
13
|
var _a;
|
|
@@ -34,7 +33,7 @@ const getSelectedEasingUpdate = ({ selection, sequences, overrideIdsToNodePaths,
|
|
|
34
33
|
}
|
|
35
34
|
const sequencePropStatus = (_a = remotion_1.Internals.getPropStatusesCtx(propStatuses, nodePath)) === null || _a === void 0 ? void 0 : _a[field.fieldKey];
|
|
36
35
|
if ((sequencePropStatus === null || sequencePropStatus === void 0 ? void 0 : sequencePropStatus.status) !== 'keyframed' ||
|
|
37
|
-
!(0,
|
|
36
|
+
!(0, studio_shared_1.canEditEasingForInterpolationFunction)(sequencePropStatus.interpolationFunction)) {
|
|
38
37
|
return null;
|
|
39
38
|
}
|
|
40
39
|
return {
|
|
@@ -61,7 +60,7 @@ const getSelectedEasingUpdate = ({ selection, sequences, overrideIdsToNodePaths,
|
|
|
61
60
|
? effectStatus.props[field.fieldKey]
|
|
62
61
|
: null;
|
|
63
62
|
if ((effectPropStatus === null || effectPropStatus === void 0 ? void 0 : effectPropStatus.status) !== 'keyframed' ||
|
|
64
|
-
!(0,
|
|
63
|
+
!(0, studio_shared_1.canEditEasingForInterpolationFunction)(effectPropStatus.interpolationFunction)) {
|
|
65
64
|
return null;
|
|
66
65
|
}
|
|
67
66
|
return {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useExpandedTrackKeyframeRows = void 0;
|
|
4
|
+
const studio_shared_1 = require("@remotion/studio-shared");
|
|
4
5
|
const react_1 = require("react");
|
|
5
6
|
const remotion_1 = require("remotion");
|
|
6
7
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
@@ -9,8 +10,6 @@ const ExpandedTracksProvider_1 = require("../ExpandedTracksProvider");
|
|
|
9
10
|
const get_node_keyframes_1 = require("./get-node-keyframes");
|
|
10
11
|
const timeline_expanded_filter_1 = require("./timeline-expanded-filter");
|
|
11
12
|
const TimelineSelection_1 = require("./TimelineSelection");
|
|
12
|
-
const canEditEasingForInterpolationFunction = (interpolationFunction) => interpolationFunction === 'interpolate' ||
|
|
13
|
-
interpolationFunction === 'interpolateColors';
|
|
14
13
|
const getNodeCanEditEasing = ({ node, nodePath, propStatuses, }) => {
|
|
15
14
|
var _a;
|
|
16
15
|
if (node.kind !== 'field' || node.field === null) {
|
|
@@ -19,7 +18,7 @@ const getNodeCanEditEasing = ({ node, nodePath, propStatuses, }) => {
|
|
|
19
18
|
if (node.field.kind === 'sequence-field') {
|
|
20
19
|
const sequencePropStatus = (_a = remotion_1.Internals.getPropStatusesCtx(propStatuses, nodePath)) === null || _a === void 0 ? void 0 : _a[node.field.key];
|
|
21
20
|
return ((sequencePropStatus === null || sequencePropStatus === void 0 ? void 0 : sequencePropStatus.status) === 'keyframed' &&
|
|
22
|
-
canEditEasingForInterpolationFunction(sequencePropStatus.interpolationFunction));
|
|
21
|
+
(0, studio_shared_1.canEditEasingForInterpolationFunction)(sequencePropStatus.interpolationFunction));
|
|
23
22
|
}
|
|
24
23
|
const effectStatus = remotion_1.Internals.getEffectPropStatusesCtx({
|
|
25
24
|
propStatuses,
|
|
@@ -30,7 +29,7 @@ const getNodeCanEditEasing = ({ node, nodePath, propStatuses, }) => {
|
|
|
30
29
|
? effectStatus.props[node.field.key]
|
|
31
30
|
: null;
|
|
32
31
|
return ((effectPropStatus === null || effectPropStatus === void 0 ? void 0 : effectPropStatus.status) === 'keyframed' &&
|
|
33
|
-
canEditEasingForInterpolationFunction(effectPropStatus.interpolationFunction));
|
|
32
|
+
(0, studio_shared_1.canEditEasingForInterpolationFunction)(effectPropStatus.interpolationFunction));
|
|
34
33
|
};
|
|
35
34
|
const useExpandedTrackKeyframeRows = ({ sequence, nodePathInfo, keyframeDisplayOffset, }) => {
|
|
36
35
|
const { getIsExpanded } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksGetterContext);
|
|
@@ -45,6 +44,7 @@ const useExpandedTrackKeyframeRows = ({ sequence, nodePathInfo, keyframeDisplayO
|
|
|
45
44
|
getEffectDragOverrides,
|
|
46
45
|
propStatuses,
|
|
47
46
|
includeTextContent: false,
|
|
47
|
+
includeSourceControls: false,
|
|
48
48
|
}), [
|
|
49
49
|
propStatuses,
|
|
50
50
|
getDragOverrides,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { type TSequence } from 'remotion';
|
|
2
2
|
import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-sort-key';
|
|
3
|
-
export declare const useTimelineExpandedTree: ({ sequence, nodePathInfo, includeTextContent, }: {
|
|
3
|
+
export declare const useTimelineExpandedTree: ({ sequence, nodePathInfo, includeTextContent, includeSourceControls, }: {
|
|
4
4
|
readonly sequence: TSequence;
|
|
5
5
|
readonly nodePathInfo: SequenceNodePathInfo;
|
|
6
6
|
readonly includeTextContent: boolean;
|
|
7
|
+
readonly includeSourceControls: boolean;
|
|
7
8
|
}) => {
|
|
8
9
|
filteredTree: import("../../helpers/timeline-layout").TimelineTreeNode[];
|
|
9
10
|
getIsExpanded: import("../ExpandedTracksProvider").GetIsExpanded;
|
|
@@ -8,7 +8,7 @@ const ExpandedTracksProvider_1 = require("../ExpandedTracksProvider");
|
|
|
8
8
|
const get_node_keyframes_1 = require("./get-node-keyframes");
|
|
9
9
|
const timeline_expanded_filter_1 = require("./timeline-expanded-filter");
|
|
10
10
|
const TimelineSelection_1 = require("./TimelineSelection");
|
|
11
|
-
const useTimelineExpandedTree = ({ sequence, nodePathInfo, includeTextContent, }) => {
|
|
11
|
+
const useTimelineExpandedTree = ({ sequence, nodePathInfo, includeTextContent, includeSourceControls, }) => {
|
|
12
12
|
const { getIsExpanded } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksGetterContext);
|
|
13
13
|
const { toggleTrack } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksSetterContext);
|
|
14
14
|
const { propStatuses: visualModePropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
@@ -21,6 +21,7 @@ const useTimelineExpandedTree = ({ sequence, nodePathInfo, includeTextContent, }
|
|
|
21
21
|
getEffectDragOverrides,
|
|
22
22
|
propStatuses: visualModePropStatuses,
|
|
23
23
|
includeTextContent,
|
|
24
|
+
includeSourceControls,
|
|
24
25
|
}), [
|
|
25
26
|
sequence,
|
|
26
27
|
nodePathInfo,
|
|
@@ -28,6 +29,7 @@ const useTimelineExpandedTree = ({ sequence, nodePathInfo, includeTextContent, }
|
|
|
28
29
|
getEffectDragOverrides,
|
|
29
30
|
visualModePropStatuses,
|
|
30
31
|
includeTextContent,
|
|
32
|
+
includeSourceControls,
|
|
31
33
|
]);
|
|
32
34
|
const selectedRowKeys = (0, react_1.useMemo)(() => (0, timeline_expanded_filter_1.getSelectedTimelineExpandedRowKeys)(selectedItems), [selectedItems]);
|
|
33
35
|
const filteredTree = (0, react_1.useMemo)(() => (0, timeline_expanded_filter_1.filterTimelineExpandedTree)({
|
|
@@ -38,6 +38,7 @@ const useTimelineHeight = ({ shown, hasBeenCut, }) => {
|
|
|
38
38
|
getEffectDragOverrides,
|
|
39
39
|
propStatuses,
|
|
40
40
|
includeTextContent: false,
|
|
41
|
+
includeSourceControls: false,
|
|
41
42
|
});
|
|
42
43
|
const filteredTree = (0, timeline_expanded_filter_1.filterTimelineExpandedTree)({
|
|
43
44
|
nodes: tree,
|
|
@@ -33,6 +33,11 @@ export declare const getElementPositionForDrop: ({ dimensions, dropPosition, }:
|
|
|
33
33
|
dimensions: Dimensions | null;
|
|
34
34
|
dropPosition: InsertElementDropPosition | null;
|
|
35
35
|
}) => InsertableCompositionElementPosition | null;
|
|
36
|
+
export declare const getCompositionPositionForDrop: ({ compositionDimensions, destinationDimensions, dropPosition, }: {
|
|
37
|
+
compositionDimensions: Dimensions;
|
|
38
|
+
destinationDimensions: Dimensions | null;
|
|
39
|
+
dropPosition: InsertElementDropPosition | null;
|
|
40
|
+
}) => InsertableCompositionElementPosition | null;
|
|
36
41
|
export declare const getComponentDimensions: (component: {
|
|
37
42
|
componentName: string;
|
|
38
43
|
dimensions?: import("@remotion/studio-shared").ComponentDimensions | undefined;
|
|
@@ -40,7 +45,9 @@ export declare const getComponentDimensions: (component: {
|
|
|
40
45
|
importPath: string;
|
|
41
46
|
props: ComponentProp[];
|
|
42
47
|
}) => Dimensions | null;
|
|
43
|
-
export declare const pickFilesToImport: (
|
|
48
|
+
export declare const pickFilesToImport: ({ multiple, }?: {
|
|
49
|
+
readonly multiple?: boolean | undefined;
|
|
50
|
+
}) => Promise<File[]>;
|
|
44
51
|
export declare const importAssets: ({ compositionFile, compositionId, dropPosition, files, }: {
|
|
45
52
|
compositionFile: string;
|
|
46
53
|
compositionId: string;
|
|
@@ -76,10 +83,11 @@ export declare const insertComponent: ({ component, compositionFile, composition
|
|
|
76
83
|
compositionId: string;
|
|
77
84
|
dropPosition: InsertElementDropPosition | null;
|
|
78
85
|
}) => Promise<void>;
|
|
79
|
-
export declare const insertComposition: ({ composition, compositionFile, compositionId, dropPosition, }: {
|
|
86
|
+
export declare const insertComposition: ({ composition, compositionFile, compositionId, destinationDimensions, dropPosition, }: {
|
|
80
87
|
composition: CompositionDragData;
|
|
81
88
|
compositionFile: string;
|
|
82
89
|
compositionId: string;
|
|
90
|
+
destinationDimensions: Dimensions | null;
|
|
83
91
|
dropPosition: InsertElementDropPosition | null;
|
|
84
92
|
}) => Promise<void>;
|
|
85
93
|
export declare const insertElement: ({ compositionFile, compositionId, dropPosition, element, }: {
|