@remotion/studio 4.0.516 → 4.0.518
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/AssetSelector.js +63 -22
- package/dist/components/AssetSelectorItem.d.ts +2 -1
- package/dist/components/AssetSelectorItem.js +41 -10
- package/dist/components/Canvas.js +15 -12
- package/dist/components/CanvasCaptureDropHandler.d.ts +4 -0
- package/dist/components/CanvasCaptureDropHandler.js +42 -0
- package/dist/components/CanvasOrLoading.js +4 -3
- package/dist/components/CaptionInspector.js +1 -1
- package/dist/components/CaptionTextEditor.js +32 -8
- package/dist/components/CheckboardToggle.js +1 -1
- package/dist/components/Checkbox.d.ts +0 -1
- package/dist/components/Checkbox.js +2 -19
- package/dist/components/CompositionContextButton.js +2 -1
- package/dist/components/CompositionSelector.js +1 -1
- package/dist/components/ConfigureLicenseModal.js +79 -46
- package/dist/components/CurrentAsset.d.ts +1 -1
- package/dist/components/CurrentAsset.js +9 -4
- package/dist/components/Editor.js +2 -1
- package/dist/components/EditorContent.js +11 -5
- package/dist/components/EditorContexts.js +2 -1
- package/dist/components/EditorRuler/Ruler.d.ts +1 -0
- package/dist/components/EditorRuler/Ruler.js +9 -8
- package/dist/components/EditorRuler/index.d.ts +1 -0
- package/dist/components/EditorRuler/index.js +3 -4
- package/dist/components/EditorRuler/use-is-ruler-visible.d.ts +1 -1
- package/dist/components/EditorRuler/use-is-ruler-visible.js +8 -2
- package/dist/components/ElementInstallConfirmation.d.ts +5 -0
- package/dist/components/ElementInstallConfirmation.js +25 -1
- package/dist/components/ElementLibraryModal.d.ts +5 -0
- package/dist/components/ElementLibraryModal.js +40 -0
- package/dist/components/FilePreview.js +71 -0
- package/dist/components/InlineCaptionInspector.js +13 -2
- package/dist/components/InlineEditableTitle.js +2 -2
- package/dist/components/InspectorPanel/CompositionInspector.js +11 -38
- package/dist/components/InspectorPanel/CompositionInspectorHeader.js +2 -2
- package/dist/components/InspectorPanel/CompositionMetadata.js +11 -4
- package/dist/components/InspectorPanel/EasingInspector.js +2 -2
- package/dist/components/InspectorPanel/ElementLibraryButton.d.ts +2 -0
- package/dist/components/InspectorPanel/ElementLibraryButton.js +139 -0
- package/dist/components/InspectorPanel/KeyframeInspector.js +1 -1
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +12 -5
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +1 -3
- package/dist/components/InspectorPanel/common.d.ts +0 -1
- package/dist/components/InspectorPanel/common.js +3 -7
- package/dist/components/InspectorPanel/inspector-selection.d.ts +2 -2
- package/dist/components/InspectorPanel/styles.d.ts +0 -1
- package/dist/components/InspectorPanel/styles.js +3 -4
- package/dist/components/InspectorPanel/use-track-for-selection.d.ts +1 -2
- package/dist/components/InspectorSequenceSection.d.ts +1 -2
- package/dist/components/InspectorSourceLocation.js +1 -1
- package/dist/components/Menu/MenuItem.js +15 -6
- package/dist/components/MenuToolbar.js +7 -3
- package/dist/components/Modals.js +51 -1
- package/dist/components/PlaybackRateSelector.js +3 -6
- package/dist/components/Preview.js +83 -5
- package/dist/components/PreviewToolbar.js +10 -4
- package/dist/components/PreviewToolbarOverflowButton.d.ts +1 -0
- package/dist/components/PreviewToolbarOverflowButton.js +9 -2
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.d.ts +2 -0
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +28 -8
- package/dist/components/RadioButton.d.ts +6 -0
- package/dist/components/RadioButton.js +62 -0
- package/dist/components/RenderButton.js +2 -1
- package/dist/components/RulersAndGuidesToggle.d.ts +3 -1
- package/dist/components/RulersAndGuidesToggle.js +18 -7
- package/dist/components/SelectedOutlineKeyboardControls.d.ts +2 -2
- package/dist/components/SelectedOutlineOverlay.d.ts +1 -3
- package/dist/components/SelectedOutlineOverlay.js +21 -17
- package/dist/components/SelectedOutlinePolygon.d.ts +1 -2
- package/dist/components/SelectedOutlineRenderer.d.ts +2 -3
- package/dist/components/SelectedOutlineRenderer.js +9 -78
- package/dist/components/SelectedOutlineUvControls.d.ts +1 -1
- package/dist/components/SettingsModal.js +1 -1
- package/dist/components/SettingsModalFooter.d.ts +3 -1
- package/dist/components/SettingsModalFooter.js +19 -4
- package/dist/components/ShowPixelGridProvider.d.ts +4 -0
- package/dist/components/ShowPixelGridProvider.js +24 -0
- package/dist/components/SidebarCollapserControls.js +2 -2
- package/dist/components/SidebarRenderButton.js +2 -1
- package/dist/components/Timeline/Timeline.js +41 -0
- package/dist/components/Timeline/TimelineClipboardKeybindings.d.ts +6 -7
- package/dist/components/Timeline/TimelineDragHandler.js +11 -4
- package/dist/components/Timeline/TimelineKeyframeControls.d.ts +1 -2
- package/dist/components/Timeline/TimelinePlayCursorSyncer.js +4 -2
- package/dist/components/Timeline/TimelineSelection.d.ts +29 -66
- package/dist/components/Timeline/TimelineSelection.js +30 -170
- package/dist/components/Timeline/TimelineSequenceItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineSequenceItem.js +8 -6
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +3 -4
- package/dist/components/Timeline/delete-selected-timeline-item.d.ts +3 -4
- package/dist/components/Timeline/duplicate-selected-timeline-item.d.ts +3 -4
- package/dist/components/Timeline/find-track-for-node-path-info.d.ts +1 -1
- package/dist/components/Timeline/keyframe-clipboard.d.ts +2 -3
- package/dist/components/Timeline/reset-selected-timeline-props.d.ts +2 -3
- package/dist/components/Timeline/sequence-prop-clipboard.d.ts +2 -3
- package/dist/components/Timeline/split-selected-timeline-item.d.ts +2 -3
- package/dist/components/Timeline/timeline-expanded-filter.d.ts +1 -2
- package/dist/components/Timeline/timeline-scroll-logic.d.ts +7 -5
- package/dist/components/Timeline/timeline-scroll-logic.js +12 -7
- package/dist/components/Timeline/update-selected-easing.d.ts +7 -7
- package/dist/components/Timeline/use-timeline-asset-drop.js +24 -1
- package/dist/components/Timeline/use-timeline-keyframe-drag.d.ts +6 -7
- package/dist/components/WebMcp.d.ts +2 -0
- package/dist/components/WebMcp.js +945 -0
- package/dist/components/canvas-capture-drop.d.ts +4 -0
- package/dist/components/canvas-capture-drop.js +22 -0
- package/dist/components/composition-menu-items.js +26 -0
- package/dist/components/selected-outline-geometry.d.ts +2 -21
- package/dist/components/selected-outline-geometry.js +5 -16
- package/dist/components/selected-outline-measurement.d.ts +8 -37
- package/dist/components/selected-outline-measurement.js +1 -231
- package/dist/components/selected-outline-types.d.ts +2 -15
- package/dist/components/selected-outline-uv.js +3 -106
- package/dist/esm/{chunk-w4244j4n.js → chunk-7prjt5n5.js} +32831 -26820
- package/dist/esm/internals.mjs +32831 -26820
- package/dist/esm/previewEntry.mjs +17304 -11293
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/calculate-timeline.d.ts +1 -7
- package/dist/helpers/calculate-timeline.js +2 -146
- package/dist/helpers/create-folder-tree.js +16 -1
- package/dist/helpers/editor-ruler.js +6 -5
- package/dist/helpers/format-file-location.d.ts +8 -0
- package/dist/helpers/format-file-location.js +14 -3
- package/dist/helpers/get-asset-metadata.d.ts +19 -0
- package/dist/helpers/get-asset-metadata.js +51 -6
- package/dist/helpers/get-connected-compositions.d.ts +1 -6
- package/dist/helpers/get-connected-compositions.js +2 -8
- package/dist/helpers/get-sequence-visible-range.d.ts +1 -5
- package/dist/helpers/get-sequence-visible-range.js +6 -51
- package/dist/helpers/get-timeline-max-zoom.d.ts +8 -0
- package/dist/helpers/get-timeline-max-zoom.js +17 -6
- package/dist/helpers/get-timeline-nestedness.d.ts +1 -2
- package/dist/helpers/get-timeline-nestedness.js +2 -12
- package/dist/helpers/get-timeline-sequence-sort-key.d.ts +2 -22
- package/dist/helpers/get-timeline-sequence-sort-key.js +2 -16
- package/dist/helpers/hoverable.d.ts +1 -0
- package/dist/helpers/hoverable.js +4 -1
- package/dist/helpers/is-current-selected-still.js +4 -2
- package/dist/helpers/sort-by-nonce-history.d.ts +1 -5
- package/dist/helpers/sort-by-nonce-history.js +3 -148
- package/dist/helpers/timeline-node-path-key.d.ts +1 -2
- package/dist/helpers/timeline-node-path-key.js +2 -2
- package/dist/helpers/use-menu-structure.js +20 -0
- package/dist/icons/enter.d.ts +4 -0
- package/dist/icons/enter.js +10 -0
- package/dist/state/editor-pixel-grid.d.ts +8 -0
- package/dist/state/editor-pixel-grid.js +18 -0
- package/dist/state/modals.d.ts +4 -0
- package/dist/state/playbackrate.d.ts +1 -0
- package/dist/state/playbackrate.js +4 -1
- package/package.json +14 -12
- package/dist/components/selected-outline-order.d.ts +0 -12
- package/dist/components/selected-outline-order.js +0 -251
- package/dist/helpers/get-box-quads-polyfill-internals.d.ts +0 -82
- package/dist/helpers/get-box-quads-polyfill-internals.js +0 -2403
- package/dist/helpers/get-box-quads-ponyfill.d.ts +0 -10
- package/dist/helpers/get-box-quads-ponyfill.js +0 -23
package/dist/esm/renderEntry.mjs
CHANGED
|
@@ -213,7 +213,7 @@ var renderContent = (Root) => {
|
|
|
213
213
|
renderToDOM(/* @__PURE__ */ jsx("div", {
|
|
214
214
|
children: /* @__PURE__ */ jsx(DelayedSpinner, {})
|
|
215
215
|
}));
|
|
216
|
-
import("./chunk-
|
|
216
|
+
import("./chunk-7prjt5n5.js").then(({ StudioInternals }) => {
|
|
217
217
|
window.remotion_isStudio = true;
|
|
218
218
|
window.remotion_isReadOnlyStudio = true;
|
|
219
219
|
window.remotion_inputProps = "{}";
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import type { TimelineTrackData } from './get-timeline-sequence-sort-key';
|
|
3
|
-
export declare const calculateTimeline: ({ sequences, overrideIdsToNodePaths, compositions, }: {
|
|
4
|
-
sequences: TSequence[];
|
|
5
|
-
overrideIdsToNodePaths: OverrideIdToNodePaths;
|
|
6
|
-
compositions?: readonly import("remotion").AnyComposition[] | undefined;
|
|
7
|
-
}) => TimelineTrackData[];
|
|
1
|
+
export { calculateTimeline } from '@remotion/canvas';
|
|
@@ -1,149 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.calculateTimeline = void 0;
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
const get_timeline_nestedness_1 = require("./get-timeline-nestedness");
|
|
7
|
-
const get_timeline_sequence_sort_key_1 = require("./get-timeline-sequence-sort-key");
|
|
8
|
-
const sort_by_nonce_history_1 = require("./sort-by-nonce-history");
|
|
9
|
-
const timeline_node_path_key_1 = require("./timeline-node-path-key");
|
|
10
|
-
const getInheritedLoopDisplay = (sequence, sequences) => {
|
|
11
|
-
if (sequence.loopDisplay) {
|
|
12
|
-
return sequence.loopDisplay;
|
|
13
|
-
}
|
|
14
|
-
if (!sequence.parent) {
|
|
15
|
-
return undefined;
|
|
16
|
-
}
|
|
17
|
-
const parent = sequences.find((s) => s.id === sequence.parent);
|
|
18
|
-
if (!parent) {
|
|
19
|
-
return undefined;
|
|
20
|
-
}
|
|
21
|
-
return getInheritedLoopDisplay(parent, sequences);
|
|
22
|
-
};
|
|
23
|
-
const calculateTimeline = ({ sequences, overrideIdsToNodePaths, compositions = [], }) => {
|
|
24
|
-
var _a, _b;
|
|
25
|
-
var _c, _d;
|
|
26
|
-
const sortedSequences = (0, sort_by_nonce_history_1.sortItemsByNonceHistory)(sequences);
|
|
27
|
-
const tracks = [];
|
|
28
|
-
if (sortedSequences.length === 0) {
|
|
29
|
-
return [];
|
|
30
|
-
}
|
|
31
|
-
const connectedCompositionsBySequenceId = new Map();
|
|
32
|
-
for (const sequence of sortedSequences) {
|
|
33
|
-
const connectedCompositions = (0, get_connected_compositions_1.getConnectedCompositions)({
|
|
34
|
-
compositions,
|
|
35
|
-
singleChildComponent: sequence.singleChildComponent,
|
|
36
|
-
});
|
|
37
|
-
if (connectedCompositions.length > 0) {
|
|
38
|
-
connectedCompositionsBySequenceId.set(sequence.id, connectedCompositions);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
const sequencesById = new Map(sortedSequences.map((sequence) => [sequence.id, sequence]));
|
|
42
|
-
const timelineSequences = sortedSequences.filter((sequence) => {
|
|
43
|
-
var _a;
|
|
44
|
-
var _b;
|
|
45
|
-
let parentId = sequence.parent;
|
|
46
|
-
while (parentId !== null) {
|
|
47
|
-
if (connectedCompositionsBySequenceId.has(parentId)) {
|
|
48
|
-
return false;
|
|
49
|
-
}
|
|
50
|
-
parentId = (_b = (_a = sequencesById.get(parentId)) === null || _a === void 0 ? void 0 : _a.parent) !== null && _b !== void 0 ? _b : null;
|
|
51
|
-
}
|
|
52
|
-
return true;
|
|
53
|
-
});
|
|
54
|
-
for (let i = 0; i < timelineSequences.length; i++) {
|
|
55
|
-
const sequence = timelineSequences[i];
|
|
56
|
-
const cascadedStart = (0, get_sequence_visible_range_1.getCascadedStart)(sequence, sortedSequences);
|
|
57
|
-
const cascadedStartWithTrim = (0, get_sequence_visible_range_1.getCascadedStartWithTrim)(sequence, sortedSequences);
|
|
58
|
-
const effectiveFrom = sequence.trimBefore === null
|
|
59
|
-
? sequence.from
|
|
60
|
-
: sequence.from - sequence.trimBefore;
|
|
61
|
-
const visibleStart = (0, get_sequence_visible_range_1.getTimelineVisibleStart)(sequence, sortedSequences);
|
|
62
|
-
const visibleDuration = (0, get_sequence_visible_range_1.getTimelineVisibleDuration)(sequence, sortedSequences);
|
|
63
|
-
const overrideId = (_c = (_a = sequence.controls) === null || _a === void 0 ? void 0 : _a.overrideId) !== null && _c !== void 0 ? _c : null;
|
|
64
|
-
const nodePath = overrideId ? overrideIdsToNodePaths[overrideId] : null;
|
|
65
|
-
const hasKeyframeRows = sequence.controls !== null || sequence.effects.length > 0;
|
|
66
|
-
const connectedCompositions = (_d = connectedCompositionsBySequenceId.get(sequence.id)) !== null && _d !== void 0 ? _d : [];
|
|
67
|
-
tracks.push({
|
|
68
|
-
...(connectedCompositions.length > 0 ? { connectedCompositions } : {}),
|
|
69
|
-
sequence: {
|
|
70
|
-
...sequence,
|
|
71
|
-
from: visibleStart,
|
|
72
|
-
duration: visibleDuration,
|
|
73
|
-
loopDisplay: sequence.type === 'audio' || sequence.type === 'video'
|
|
74
|
-
? getInheritedLoopDisplay(sequence, sortedSequences)
|
|
75
|
-
: sequence.loopDisplay,
|
|
76
|
-
},
|
|
77
|
-
depth: (0, get_timeline_nestedness_1.getTimelineNestedLevel)(sequence, sortedSequences, 0),
|
|
78
|
-
cascadedStart,
|
|
79
|
-
localStart: sequence.from,
|
|
80
|
-
cascadedDuration: sequence.duration,
|
|
81
|
-
keyframeDisplayOffset: hasKeyframeRows
|
|
82
|
-
? cascadedStartWithTrim - effectiveFrom
|
|
83
|
-
: 0,
|
|
84
|
-
sequenceFrameOffset: visibleStart - cascadedStartWithTrim,
|
|
85
|
-
nodePathInfo: nodePath
|
|
86
|
-
? {
|
|
87
|
-
sequenceSubscriptionKey: nodePath,
|
|
88
|
-
auxiliaryKeys: [],
|
|
89
|
-
index: 0,
|
|
90
|
-
numberOfSequencesWithThisNodePath: 0,
|
|
91
|
-
supportsEffects: ((_b = sequence.controls) === null || _b === void 0 ? void 0 : _b.supportsEffects) === true,
|
|
92
|
-
}
|
|
93
|
-
: null,
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
const nonceRanks = new Map();
|
|
97
|
-
for (let i = 0; i < tracks.length; i++) {
|
|
98
|
-
nonceRanks.set(tracks[i].sequence.id, i);
|
|
99
|
-
}
|
|
100
|
-
const sortedTracks = tracks
|
|
101
|
-
.sort((a, b) => {
|
|
102
|
-
const sortKeyA = (0, get_timeline_sequence_sort_key_1.getTimelineSequenceSortKey)(a, tracks, nonceRanks);
|
|
103
|
-
const sortKeyB = (0, get_timeline_sequence_sort_key_1.getTimelineSequenceSortKey)(b, tracks, nonceRanks);
|
|
104
|
-
return sortKeyA.localeCompare(sortKeyB);
|
|
105
|
-
})
|
|
106
|
-
.map((track) => {
|
|
107
|
-
const { cascadedDuration, ...cleanTrack } = track;
|
|
108
|
-
return cleanTrack;
|
|
109
|
-
});
|
|
110
|
-
const nodePathIndexCounters = new Map();
|
|
111
|
-
return sortedTracks
|
|
112
|
-
.map((track) => {
|
|
113
|
-
var _a;
|
|
114
|
-
if (track.nodePathInfo === null) {
|
|
115
|
-
return track;
|
|
116
|
-
}
|
|
117
|
-
const key = (0, timeline_node_path_key_1.timelineSequenceNodePathToKey)(track.nodePathInfo.sequenceSubscriptionKey);
|
|
118
|
-
const index = (_a = nodePathIndexCounters.get(key)) !== null && _a !== void 0 ? _a : 0;
|
|
119
|
-
nodePathIndexCounters.set(key, index + 1);
|
|
120
|
-
return {
|
|
121
|
-
...track,
|
|
122
|
-
nodePathInfo: {
|
|
123
|
-
sequenceSubscriptionKey: track.nodePathInfo.sequenceSubscriptionKey,
|
|
124
|
-
auxiliaryKeys: track.nodePathInfo.auxiliaryKeys,
|
|
125
|
-
index,
|
|
126
|
-
numberOfSequencesWithThisNodePath: 0,
|
|
127
|
-
supportsEffects: track.nodePathInfo.supportsEffects,
|
|
128
|
-
},
|
|
129
|
-
};
|
|
130
|
-
})
|
|
131
|
-
.map((track) => {
|
|
132
|
-
var _a;
|
|
133
|
-
if (track.nodePathInfo === null) {
|
|
134
|
-
return track;
|
|
135
|
-
}
|
|
136
|
-
const key = (0, timeline_node_path_key_1.timelineSequenceNodePathToKey)(track.nodePathInfo.sequenceSubscriptionKey);
|
|
137
|
-
return {
|
|
138
|
-
...track,
|
|
139
|
-
nodePathInfo: {
|
|
140
|
-
sequenceSubscriptionKey: track.nodePathInfo.sequenceSubscriptionKey,
|
|
141
|
-
auxiliaryKeys: track.nodePathInfo.auxiliaryKeys,
|
|
142
|
-
index: track.nodePathInfo.index,
|
|
143
|
-
numberOfSequencesWithThisNodePath: (_a = nodePathIndexCounters.get(key)) !== null && _a !== void 0 ? _a : 0,
|
|
144
|
-
supportsEffects: track.nodePathInfo.supportsEffects,
|
|
145
|
-
},
|
|
146
|
-
};
|
|
147
|
-
});
|
|
148
|
-
};
|
|
149
|
-
exports.calculateTimeline = calculateTimeline;
|
|
4
|
+
const canvas_1 = require("@remotion/canvas");
|
|
5
|
+
Object.defineProperty(exports, "calculateTimeline", { enumerable: true, get: function () { return canvas_1.calculateTimeline; } });
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createFolderTree = exports.getKeysToExpand = exports.splitParentIntoNameAndParent = exports.buildAssetFolderStructure = void 0;
|
|
4
4
|
const persist_open_folders_1 = require("./persist-open-folders");
|
|
5
|
+
const sort_by_nonce_history_1 = require("./sort-by-nonce-history");
|
|
5
6
|
const buildAssetFolderStructure = (files, parentFolderName, foldersExpanded) => {
|
|
6
7
|
const notInFolder = files.filter((f) => !f.name.includes('/'));
|
|
7
8
|
const inFolder = files.filter((f) => f.name.includes('/'));
|
|
@@ -152,6 +153,20 @@ const createFolderTree = (comps, folders, foldersExpanded) => {
|
|
|
152
153
|
const list = findItemListToPush(items, item.folderName, item.parentFolderName);
|
|
153
154
|
list.push(toPush);
|
|
154
155
|
}
|
|
155
|
-
|
|
156
|
+
const sortTreeItems = (treeItems) => {
|
|
157
|
+
return (0, sort_by_nonce_history_1.sortItemsByNonceHistory)(treeItems.map((item) => ({
|
|
158
|
+
item,
|
|
159
|
+
nonce: item.type === 'folder' ? item.folder.nonce : item.composition.nonce,
|
|
160
|
+
}))).map(({ item }) => {
|
|
161
|
+
if (item.type === 'composition') {
|
|
162
|
+
return item;
|
|
163
|
+
}
|
|
164
|
+
return {
|
|
165
|
+
...item,
|
|
166
|
+
items: sortTreeItems(item.items),
|
|
167
|
+
};
|
|
168
|
+
});
|
|
169
|
+
};
|
|
170
|
+
return sortTreeItems(items);
|
|
156
171
|
};
|
|
157
172
|
exports.createFolderTree = createFolderTree;
|
|
@@ -36,7 +36,8 @@ const drawGuide = ({ guideHighlight, scale, startMarking, context, canvasHeight,
|
|
|
36
36
|
scale,
|
|
37
37
|
}) +
|
|
38
38
|
originOffset -
|
|
39
|
-
startMarking * scale
|
|
39
|
+
startMarking * scale +
|
|
40
|
+
0.5;
|
|
40
41
|
drawGradient({
|
|
41
42
|
canvasHeight,
|
|
42
43
|
context,
|
|
@@ -88,11 +89,11 @@ const drawMarkingOnRulerCanvas = ({ scale, points, startMarking, originOffset, m
|
|
|
88
89
|
canvas.height = canvasHeight;
|
|
89
90
|
context.scale(window.devicePixelRatio, window.devicePixelRatio);
|
|
90
91
|
context.clearRect(0, 0, canvasWidth, canvasHeight);
|
|
91
|
-
context.strokeStyle = colors_1.
|
|
92
|
+
context.strokeStyle = colors_1.WHITE_ALPHA_15;
|
|
92
93
|
context.lineWidth = 1;
|
|
93
94
|
context.beginPath();
|
|
94
95
|
points.forEach((point) => {
|
|
95
|
-
context.strokeStyle = colors_1.
|
|
96
|
+
context.strokeStyle = colors_1.WHITE_ALPHA_15;
|
|
96
97
|
context.lineWidth = 1;
|
|
97
98
|
const originDistance = point.position + originOffset - startMarking * scale;
|
|
98
99
|
context.beginPath();
|
|
@@ -118,13 +119,13 @@ const drawMarkingOnRulerCanvas = ({ scale, points, startMarking, originOffset, m
|
|
|
118
119
|
context.stroke();
|
|
119
120
|
context.font = '10px Arial, Helvetica, sans-serif';
|
|
120
121
|
context.textAlign = 'left';
|
|
121
|
-
context.fillStyle = colors_1.
|
|
122
|
+
context.fillStyle = colors_1.LIGHT_TEXT;
|
|
122
123
|
drawLabel({
|
|
123
124
|
orientation,
|
|
124
125
|
context,
|
|
125
126
|
label: point.value.toString(),
|
|
126
127
|
originDistance,
|
|
127
|
-
color: colors_1.
|
|
128
|
+
color: colors_1.LIGHT_TEXT,
|
|
128
129
|
});
|
|
129
130
|
});
|
|
130
131
|
if (guideHighlight && orientation !== guideHighlight.guide.orientation) {
|
|
@@ -2,6 +2,14 @@ type FileLocation = {
|
|
|
2
2
|
readonly source: string | null;
|
|
3
3
|
readonly line: number | null;
|
|
4
4
|
};
|
|
5
|
+
export type RelativeFileLocation = {
|
|
6
|
+
readonly filename: string;
|
|
7
|
+
readonly line: number;
|
|
8
|
+
};
|
|
9
|
+
export declare const getRelativeFileLocation: ({ location, root, }: {
|
|
10
|
+
readonly location: FileLocation | null;
|
|
11
|
+
readonly root: string;
|
|
12
|
+
}) => RelativeFileLocation | null;
|
|
5
13
|
export declare const formatFileLocation: ({ location, root, }: {
|
|
6
14
|
readonly location: FileLocation | null;
|
|
7
15
|
readonly root: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.formatContextForAgents = exports.formatFileLocation = void 0;
|
|
3
|
+
exports.formatContextForAgents = exports.formatFileLocation = exports.getRelativeFileLocation = void 0;
|
|
4
4
|
const normalizeSlashes = (path) => path.replace(/\\/g, '/');
|
|
5
5
|
const stripTrailingSlashes = (path) => path.replace(/\/+$/, '');
|
|
6
6
|
const stripLeadingDotSlash = (path) => path.replace(/^\.\/+/, '');
|
|
7
|
-
const
|
|
7
|
+
const getRelativeFileLocation = ({ location, root, }) => {
|
|
8
8
|
if (!(location === null || location === void 0 ? void 0 : location.source) || location.line === null) {
|
|
9
9
|
return null;
|
|
10
10
|
}
|
|
@@ -22,7 +22,18 @@ const formatFileLocation = ({ location, root, }) => {
|
|
|
22
22
|
const relativeSource = sourceIsInsideRoot
|
|
23
23
|
? source.slice(normalizedRoot.length + 1)
|
|
24
24
|
: source;
|
|
25
|
-
return
|
|
25
|
+
return {
|
|
26
|
+
filename: stripLeadingDotSlash(relativeSource),
|
|
27
|
+
line: location.line,
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
exports.getRelativeFileLocation = getRelativeFileLocation;
|
|
31
|
+
const formatFileLocation = ({ location, root, }) => {
|
|
32
|
+
const relativeLocation = (0, exports.getRelativeFileLocation)({ location, root });
|
|
33
|
+
if (relativeLocation === null) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
return `${relativeLocation.filename}:${relativeLocation.line}`;
|
|
26
37
|
};
|
|
27
38
|
exports.formatFileLocation = formatFileLocation;
|
|
28
39
|
const formatContextForAgents = ({ name, location, root, }) => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { CanvasContent } from 'remotion';
|
|
2
2
|
import type { Dimensions } from './is-current-selected-still';
|
|
3
|
+
import { type MediaMetadata } from './use-media-metadata';
|
|
3
4
|
export declare const remotion_outputsBase: string;
|
|
4
5
|
export type AssetMetadata = {
|
|
5
6
|
type: 'not-found';
|
|
@@ -11,5 +12,23 @@ export type AssetMetadata = {
|
|
|
11
12
|
size: number;
|
|
12
13
|
dimensions: Dimensions | 'none' | null;
|
|
13
14
|
fetchedAt: number;
|
|
15
|
+
mediaMetadata: MediaMetadata | null;
|
|
14
16
|
};
|
|
17
|
+
export declare const getAssetPreviewMetadata: ({ canvasContent, metadata, }: {
|
|
18
|
+
canvasContent: CanvasContent;
|
|
19
|
+
metadata: AssetMetadata;
|
|
20
|
+
}) => {
|
|
21
|
+
asset: string;
|
|
22
|
+
width: number;
|
|
23
|
+
height: number;
|
|
24
|
+
fps: number;
|
|
25
|
+
durationInFrames: number;
|
|
26
|
+
props: {};
|
|
27
|
+
defaultCodec: null;
|
|
28
|
+
defaultOutName: null;
|
|
29
|
+
defaultVideoImageFormat: null;
|
|
30
|
+
defaultPixelFormat: null;
|
|
31
|
+
defaultProResProfile: null;
|
|
32
|
+
defaultSampleRate: number | null;
|
|
33
|
+
} | null;
|
|
15
34
|
export declare const getAssetMetadata: (canvasContent: CanvasContent, addTime: boolean) => Promise<AssetMetadata>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getAssetMetadata = exports.remotion_outputsBase = void 0;
|
|
4
|
-
const media_utils_1 = require("@remotion/media-utils");
|
|
3
|
+
exports.getAssetMetadata = exports.getAssetPreviewMetadata = exports.remotion_outputsBase = void 0;
|
|
5
4
|
const remotion_1 = require("remotion");
|
|
6
5
|
const add_asset_cache_bust_1 = require("./add-asset-cache-bust");
|
|
7
6
|
const get_preview_file_type_1 = require("./get-preview-file-type");
|
|
7
|
+
const use_media_metadata_1 = require("./use-media-metadata");
|
|
8
8
|
exports.remotion_outputsBase = window.remotion_staticBase.replace('static', 'outputs');
|
|
9
9
|
const getSrcFromCanvasContent = (canvasContent) => {
|
|
10
10
|
if (canvasContent.type === 'asset') {
|
|
@@ -12,14 +12,51 @@ const getSrcFromCanvasContent = (canvasContent) => {
|
|
|
12
12
|
}
|
|
13
13
|
return exports.remotion_outputsBase + canvasContent.path;
|
|
14
14
|
};
|
|
15
|
+
const getAssetPreviewMetadata = ({ canvasContent, metadata, }) => {
|
|
16
|
+
if (canvasContent.type !== 'asset' ||
|
|
17
|
+
metadata.type !== 'found' ||
|
|
18
|
+
metadata.mediaMetadata === null ||
|
|
19
|
+
!Number.isFinite(metadata.mediaMetadata.duration) ||
|
|
20
|
+
metadata.mediaMetadata.duration <= 0) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
const fileType = (0, get_preview_file_type_1.getPreviewFileType)(canvasContent.asset);
|
|
24
|
+
if (fileType !== 'audio' && fileType !== 'video') {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
const { dimensions } = metadata;
|
|
28
|
+
if (dimensions === null || dimensions === 'none') {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
const detectedFps = metadata.mediaMetadata.fps;
|
|
32
|
+
const fps = detectedFps !== null && Number.isFinite(detectedFps) && detectedFps > 0
|
|
33
|
+
? detectedFps
|
|
34
|
+
: 30;
|
|
35
|
+
return {
|
|
36
|
+
asset: canvasContent.asset,
|
|
37
|
+
width: dimensions.width,
|
|
38
|
+
height: dimensions.height,
|
|
39
|
+
fps,
|
|
40
|
+
durationInFrames: Math.max(1, Math.ceil(metadata.mediaMetadata.duration * fps)),
|
|
41
|
+
props: {},
|
|
42
|
+
defaultCodec: null,
|
|
43
|
+
defaultOutName: null,
|
|
44
|
+
defaultVideoImageFormat: null,
|
|
45
|
+
defaultPixelFormat: null,
|
|
46
|
+
defaultProResProfile: null,
|
|
47
|
+
defaultSampleRate: metadata.mediaMetadata.sampleRate,
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
exports.getAssetPreviewMetadata = getAssetPreviewMetadata;
|
|
15
51
|
const getAssetMetadata = async (canvasContent, addTime) => {
|
|
16
|
-
var _a;
|
|
52
|
+
var _a, _b, _c;
|
|
17
53
|
if (canvasContent.type === 'output-blob') {
|
|
18
54
|
return {
|
|
19
55
|
type: 'found',
|
|
20
56
|
size: canvasContent.sizeInBytes,
|
|
21
57
|
dimensions: { width: canvasContent.width, height: canvasContent.height },
|
|
22
58
|
fetchedAt: Date.now(),
|
|
59
|
+
mediaMetadata: null,
|
|
23
60
|
};
|
|
24
61
|
}
|
|
25
62
|
if (canvasContent.type === 'composition') {
|
|
@@ -50,13 +87,19 @@ const getAssetMetadata = async (canvasContent, addTime) => {
|
|
|
50
87
|
const fetchedAt = Date.now();
|
|
51
88
|
const srcWithTime = addTime ? (0, add_asset_cache_bust_1.addAssetCacheBust)({ fetchedAt, src }) : src;
|
|
52
89
|
const fileType = (0, get_preview_file_type_1.getPreviewFileType)(src);
|
|
53
|
-
if (fileType === 'video') {
|
|
54
|
-
const
|
|
90
|
+
if (fileType === 'video' || fileType === 'audio') {
|
|
91
|
+
const mediaMetadata = await (0, use_media_metadata_1.getMediaMetadata)(srcWithTime);
|
|
92
|
+
if (mediaMetadata === null) {
|
|
93
|
+
throw new Error(`Could not read media metadata for ${src}`);
|
|
94
|
+
}
|
|
95
|
+
const width = (_b = mediaMetadata.width) !== null && _b !== void 0 ? _b : 1920;
|
|
96
|
+
const height = (_c = mediaMetadata.height) !== null && _c !== void 0 ? _c : 1080;
|
|
55
97
|
return {
|
|
56
98
|
type: 'found',
|
|
57
99
|
size,
|
|
58
|
-
dimensions: { width
|
|
100
|
+
dimensions: { width, height },
|
|
59
101
|
fetchedAt,
|
|
102
|
+
mediaMetadata,
|
|
60
103
|
};
|
|
61
104
|
}
|
|
62
105
|
if (fileType === 'image') {
|
|
@@ -68,6 +111,7 @@ const getAssetMetadata = async (canvasContent, addTime) => {
|
|
|
68
111
|
size,
|
|
69
112
|
dimensions: { width: img.width, height: img.height },
|
|
70
113
|
fetchedAt,
|
|
114
|
+
mediaMetadata: null,
|
|
71
115
|
});
|
|
72
116
|
};
|
|
73
117
|
img.onerror = () => {
|
|
@@ -82,6 +126,7 @@ const getAssetMetadata = async (canvasContent, addTime) => {
|
|
|
82
126
|
dimensions: 'none',
|
|
83
127
|
size,
|
|
84
128
|
fetchedAt,
|
|
129
|
+
mediaMetadata: null,
|
|
85
130
|
};
|
|
86
131
|
}
|
|
87
132
|
catch (err) {
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
readonly componentFromProps?: unknown;
|
|
3
|
-
}>({ compositions, singleChildComponent, }: {
|
|
4
|
-
readonly compositions: readonly Composition[];
|
|
5
|
-
readonly singleChildComponent: unknown;
|
|
6
|
-
}) => Composition[];
|
|
1
|
+
export { getConnectedCompositions } from '@remotion/canvas';
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getConnectedCompositions = void 0;
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
typeof singleChildComponent === 'undefined') {
|
|
7
|
-
return [];
|
|
8
|
-
}
|
|
9
|
-
return compositions.filter((composition) => composition.componentFromProps === singleChildComponent);
|
|
10
|
-
};
|
|
11
|
-
exports.getConnectedCompositions = getConnectedCompositions;
|
|
4
|
+
const canvas_1 = require("@remotion/canvas");
|
|
5
|
+
Object.defineProperty(exports, "getConnectedCompositions", { enumerable: true, get: function () { return canvas_1.getConnectedCompositions; } });
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const getCascadedStart: (sequence: TSequence, sequences: TSequence[]) => number;
|
|
3
|
-
export declare const getCascadedStartWithTrim: (sequence: TSequence, sequences: TSequence[]) => number;
|
|
4
|
-
export declare const getTimelineVisibleStart: (sequence: TSequence, sequences: TSequence[]) => number;
|
|
5
|
-
export declare const getTimelineVisibleDuration: (sequence: TSequence, sequences: TSequence[]) => number;
|
|
1
|
+
export { getCascadedStart, getCascadedStartWithTrim, getTimelineVisibleDuration, getTimelineVisibleStart, } from '@remotion/canvas';
|
|
@@ -1,53 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
if (!parent) {
|
|
10
|
-
throw new TypeError('Parent not found for sequence ' + sequence.id);
|
|
11
|
-
}
|
|
12
|
-
return (0, exports.getCascadedStart)(parent, sequences) + sequence.from;
|
|
13
|
-
};
|
|
14
|
-
exports.getCascadedStart = getCascadedStart;
|
|
15
|
-
const getCascadedStartWithTrim = (sequence, sequences) => {
|
|
16
|
-
const effectiveFrom = sequence.trimBefore === null
|
|
17
|
-
? sequence.from
|
|
18
|
-
: sequence.from - sequence.trimBefore;
|
|
19
|
-
if (!sequence.parent) {
|
|
20
|
-
return effectiveFrom;
|
|
21
|
-
}
|
|
22
|
-
const parent = sequences.find((s) => s.id === sequence.parent);
|
|
23
|
-
if (!parent) {
|
|
24
|
-
throw new TypeError('Parent not found for sequence ' + sequence.id);
|
|
25
|
-
}
|
|
26
|
-
return (0, exports.getCascadedStartWithTrim)(parent, sequences) + effectiveFrom;
|
|
27
|
-
};
|
|
28
|
-
exports.getCascadedStartWithTrim = getCascadedStartWithTrim;
|
|
29
|
-
const getTimelineVisibleStart = (sequence, sequences) => {
|
|
30
|
-
const cascadedStart = Math.max(0, (0, exports.getCascadedStart)(sequence, sequences));
|
|
31
|
-
if (!sequence.parent) {
|
|
32
|
-
return cascadedStart;
|
|
33
|
-
}
|
|
34
|
-
const parent = sequences.find((s) => s.id === sequence.parent);
|
|
35
|
-
if (!parent) {
|
|
36
|
-
throw new TypeError('Parent not found for sequence ' + sequence.id);
|
|
37
|
-
}
|
|
38
|
-
const timelineVisibleStart = (0, exports.getTimelineVisibleStart)(parent, sequences);
|
|
39
|
-
return Math.max(timelineVisibleStart, cascadedStart);
|
|
40
|
-
};
|
|
41
|
-
exports.getTimelineVisibleStart = getTimelineVisibleStart;
|
|
42
|
-
const getTimelineVisibleDuration = (sequence, sequences) => {
|
|
43
|
-
const visibleDuration = sequence.duration + Math.min(sequence.from, 0);
|
|
44
|
-
if (!sequence.parent) {
|
|
45
|
-
return visibleDuration;
|
|
46
|
-
}
|
|
47
|
-
const parent = sequences.find((s) => s.id === sequence.parent);
|
|
48
|
-
if (!parent) {
|
|
49
|
-
throw new TypeError('Parent not found for sequence ' + sequence.id);
|
|
50
|
-
}
|
|
51
|
-
return Math.min(visibleDuration, (0, exports.getTimelineVisibleDuration)(parent, sequences));
|
|
52
|
-
};
|
|
53
|
-
exports.getTimelineVisibleDuration = getTimelineVisibleDuration;
|
|
3
|
+
exports.getTimelineVisibleStart = exports.getTimelineVisibleDuration = exports.getCascadedStartWithTrim = exports.getCascadedStart = void 0;
|
|
4
|
+
const canvas_1 = require("@remotion/canvas");
|
|
5
|
+
Object.defineProperty(exports, "getCascadedStart", { enumerable: true, get: function () { return canvas_1.getCascadedStart; } });
|
|
6
|
+
Object.defineProperty(exports, "getCascadedStartWithTrim", { enumerable: true, get: function () { return canvas_1.getCascadedStartWithTrim; } });
|
|
7
|
+
Object.defineProperty(exports, "getTimelineVisibleDuration", { enumerable: true, get: function () { return canvas_1.getTimelineVisibleDuration; } });
|
|
8
|
+
Object.defineProperty(exports, "getTimelineVisibleStart", { enumerable: true, get: function () { return canvas_1.getTimelineVisibleStart; } });
|
|
@@ -11,10 +11,18 @@ export declare const clampTimelineZoom: ({ zoom, durationInFrames, }: {
|
|
|
11
11
|
zoom: number;
|
|
12
12
|
durationInFrames: number;
|
|
13
13
|
}) => number;
|
|
14
|
+
export declare const timelineZoomToNormalized: ({ zoom, maxZoom, }: {
|
|
15
|
+
zoom: number;
|
|
16
|
+
maxZoom: number;
|
|
17
|
+
}) => number;
|
|
14
18
|
export declare const timelineZoomToSliderValue: ({ zoom, maxZoom, }: {
|
|
15
19
|
zoom: number;
|
|
16
20
|
maxZoom: number;
|
|
17
21
|
}) => number;
|
|
22
|
+
export declare const normalizedToTimelineZoom: ({ normalized, maxZoom, }: {
|
|
23
|
+
normalized: number;
|
|
24
|
+
maxZoom: number;
|
|
25
|
+
}) => number;
|
|
18
26
|
export declare const sliderValueToTimelineZoom: ({ sliderValue, maxZoom, }: {
|
|
19
27
|
sliderValue: number;
|
|
20
28
|
maxZoom: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TIMELINE_ZOOM_SLIDER_PROPS = exports.sliderValueToTimelineZoom = exports.timelineZoomToSliderValue = exports.clampTimelineZoom = exports.getTimelineMaxZoom = exports.TIMELINE_FRAMES_VISIBLE_AT_MAX_ZOOM = exports.TIMELINE_MAX_ZOOM_FLOOR = exports.TIMELINE_MIN_ZOOM = void 0;
|
|
3
|
+
exports.TIMELINE_ZOOM_SLIDER_PROPS = exports.sliderValueToTimelineZoom = exports.normalizedToTimelineZoom = exports.timelineZoomToSliderValue = exports.timelineZoomToNormalized = exports.clampTimelineZoom = exports.getTimelineMaxZoom = exports.TIMELINE_FRAMES_VISIBLE_AT_MAX_ZOOM = exports.TIMELINE_MAX_ZOOM_FLOOR = exports.TIMELINE_MIN_ZOOM = void 0;
|
|
4
4
|
exports.TIMELINE_MIN_ZOOM = 1;
|
|
5
5
|
exports.TIMELINE_MAX_ZOOM_FLOOR = 5;
|
|
6
6
|
/**
|
|
@@ -20,23 +20,34 @@ const clampTimelineZoom = ({ zoom, durationInFrames, }) => {
|
|
|
20
20
|
return Math.round(clamped * 10) / 10;
|
|
21
21
|
};
|
|
22
22
|
exports.clampTimelineZoom = clampTimelineZoom;
|
|
23
|
-
const
|
|
23
|
+
const timelineZoomToNormalized = ({ zoom, maxZoom, }) => {
|
|
24
24
|
if (maxZoom <= exports.TIMELINE_MIN_ZOOM) {
|
|
25
25
|
return 0;
|
|
26
26
|
}
|
|
27
27
|
const clampedZoom = Math.min(maxZoom, Math.max(exports.TIMELINE_MIN_ZOOM, zoom));
|
|
28
|
-
const
|
|
28
|
+
const normalized = Math.log(clampedZoom / exports.TIMELINE_MIN_ZOOM) /
|
|
29
29
|
Math.log(maxZoom / exports.TIMELINE_MIN_ZOOM);
|
|
30
|
-
return Math.round(
|
|
30
|
+
return (Math.round(normalized * TIMELINE_ZOOM_SLIDER_MAX) / TIMELINE_ZOOM_SLIDER_MAX);
|
|
31
|
+
};
|
|
32
|
+
exports.timelineZoomToNormalized = timelineZoomToNormalized;
|
|
33
|
+
const timelineZoomToSliderValue = ({ zoom, maxZoom, }) => {
|
|
34
|
+
return Math.round((0, exports.timelineZoomToNormalized)({ zoom, maxZoom }) * TIMELINE_ZOOM_SLIDER_MAX);
|
|
31
35
|
};
|
|
32
36
|
exports.timelineZoomToSliderValue = timelineZoomToSliderValue;
|
|
33
|
-
const
|
|
37
|
+
const normalizedToTimelineZoom = ({ normalized, maxZoom, }) => {
|
|
34
38
|
if (maxZoom <= exports.TIMELINE_MIN_ZOOM) {
|
|
35
39
|
return exports.TIMELINE_MIN_ZOOM;
|
|
36
40
|
}
|
|
37
|
-
const t =
|
|
41
|
+
const t = Math.min(1, Math.max(0, normalized));
|
|
38
42
|
return exports.TIMELINE_MIN_ZOOM * (maxZoom / exports.TIMELINE_MIN_ZOOM) ** t;
|
|
39
43
|
};
|
|
44
|
+
exports.normalizedToTimelineZoom = normalizedToTimelineZoom;
|
|
45
|
+
const sliderValueToTimelineZoom = ({ sliderValue, maxZoom, }) => {
|
|
46
|
+
return (0, exports.normalizedToTimelineZoom)({
|
|
47
|
+
normalized: sliderValue / TIMELINE_ZOOM_SLIDER_MAX,
|
|
48
|
+
maxZoom,
|
|
49
|
+
});
|
|
50
|
+
};
|
|
40
51
|
exports.sliderValueToTimelineZoom = sliderValueToTimelineZoom;
|
|
41
52
|
exports.TIMELINE_ZOOM_SLIDER_PROPS = {
|
|
42
53
|
min: 0,
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const getTimelineNestedLevel: (sequence: TSequence, allSequences: TSequence[], depth: number) => number;
|
|
1
|
+
export { getTimelineNestedLevel } from '@remotion/canvas';
|
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getTimelineNestedLevel = void 0;
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
return depth;
|
|
7
|
-
}
|
|
8
|
-
const parentSequence = allSequences.find((s) => s.id === sequence.parent);
|
|
9
|
-
if (!parentSequence) {
|
|
10
|
-
throw new Error('has parentId but no parent');
|
|
11
|
-
}
|
|
12
|
-
const parentContributes = parentSequence.showInTimeline;
|
|
13
|
-
return (0, exports.getTimelineNestedLevel)(parentSequence, allSequences, parentContributes ? depth + 1 : depth);
|
|
14
|
-
};
|
|
15
|
-
exports.getTimelineNestedLevel = getTimelineNestedLevel;
|
|
4
|
+
const canvas_1 = require("@remotion/canvas");
|
|
5
|
+
Object.defineProperty(exports, "getTimelineNestedLevel", { enumerable: true, get: function () { return canvas_1.getTimelineNestedLevel; } });
|
|
@@ -1,22 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export type SequenceNodePathInfo
|
|
3
|
-
sequenceSubscriptionKey: SequencePropsSubscriptionKey;
|
|
4
|
-
auxiliaryKeys: string[];
|
|
5
|
-
index: number;
|
|
6
|
-
numberOfSequencesWithThisNodePath: number;
|
|
7
|
-
supportsEffects: boolean;
|
|
8
|
-
};
|
|
9
|
-
export type TimelineTrackData = {
|
|
10
|
-
sequence: TSequence;
|
|
11
|
-
connectedCompositions?: readonly _InternalTypes['AnyComposition'][];
|
|
12
|
-
depth: number;
|
|
13
|
-
nodePathInfo: SequenceNodePathInfo | null;
|
|
14
|
-
keyframeDisplayOffset: number;
|
|
15
|
-
sequenceFrameOffset: number;
|
|
16
|
-
cascadedStart: number;
|
|
17
|
-
localStart: number;
|
|
18
|
-
};
|
|
19
|
-
export type TimelineTrackWithOriginalTimings = TimelineTrackData & {
|
|
20
|
-
cascadedDuration: number;
|
|
21
|
-
};
|
|
22
|
-
export declare const getTimelineSequenceSortKey: (track: TimelineTrackData, tracks: TimelineTrackData[], nonceRanks: Map<string, number>) => string;
|
|
1
|
+
export { getTimelineSequenceSortKey } from '@remotion/canvas';
|
|
2
|
+
export type { SequenceNodePathInfo, TimelineTrackData, TimelineTrackWithOriginalTimings, } from '@remotion/canvas';
|