@remotion/studio 4.0.518 → 4.0.520
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/visual-control.js +2 -2
- package/dist/components/AppLaunchButton.d.ts +16 -0
- package/dist/components/AppLaunchButton.js +90 -0
- package/dist/components/AssetSelector.js +7 -6
- package/dist/components/AssetSelectorItem.d.ts +12 -0
- package/dist/components/AssetSelectorItem.js +180 -62
- package/dist/components/AudioWaveform.js +6 -1
- package/dist/components/Button.js +20 -7
- package/dist/components/Canvas.js +117 -92
- package/dist/components/CanvasOrLoading.js +7 -7
- package/dist/components/CodingAgentButton.d.ts +7 -0
- package/dist/components/CodingAgentButton.js +59 -0
- package/dist/components/CompositionContextButton.d.ts +1 -0
- package/dist/components/CompositionContextButton.js +6 -3
- package/dist/components/CompositionSelector.js +21 -20
- package/dist/components/CompositionSelectorItem.js +23 -35
- package/dist/components/ConfigureLicenseModal.js +4 -48
- package/dist/components/CurrentAsset.js +1 -1
- package/dist/components/CurrentCompositionSideEffects.js +5 -0
- package/dist/components/ElementInstallConfirmation.d.ts +2 -10
- package/dist/components/ElementInstallConfirmation.js +339 -32
- package/dist/components/FixComputedValueModal.js +5 -131
- package/dist/components/FpsCounter.js +1 -1
- package/dist/components/FramePersistor.js +1 -1
- package/dist/components/InitialCompositionLoader.js +3 -2
- package/dist/components/InspectorOpenInEditor.js +48 -33
- package/dist/components/InspectorPanel/CompositionInspector.js +35 -3
- package/dist/components/InspectorPanel/CompositionInspectorHeader.js +22 -14
- package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +3 -1
- package/dist/components/InspectorPanel/SequenceInspectorHeader.d.ts +1 -1
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +10 -5
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +5 -4
- package/dist/components/InspectorPanel/common.js +1 -0
- package/dist/components/InspectorPanel/styles.js +1 -0
- package/dist/components/InspectorPanel/use-composition-actions.js +5 -8
- package/dist/components/InspectorSequenceSection.js +8 -3
- package/dist/components/InspectorSourceLocation.js +5 -1
- package/dist/components/KnownBugs.d.ts +1 -1
- package/dist/components/KnownBugs.js +1 -1
- package/dist/components/LicenseExplanation.d.ts +2 -0
- package/dist/components/LicenseExplanation.js +63 -0
- package/dist/components/MenuToolbar.js +7 -1
- package/dist/components/Modals.js +1 -2
- package/dist/components/NewComposition/InputDragger.js +29 -2
- package/dist/components/NewComposition/NewCompDuration.js +1 -1
- package/dist/components/NewComposition/NewComposition.d.ts +23 -0
- package/dist/components/NewComposition/NewComposition.js +217 -80
- package/dist/components/{UpdateModal/OpenIssueButton.js → OpenIssueButton.js} +1 -1
- package/dist/components/PlayPause.js +2 -13
- package/dist/components/PreviewToolbar.js +1 -1
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +2 -1
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +50 -28
- package/dist/components/QuickSwitcher/QuickSwitcherResult.d.ts +14 -1
- package/dist/components/QuickSwitcher/QuickSwitcherResult.js +64 -9
- package/dist/components/QuickSwitcher/composition-search.d.ts +16 -0
- package/dist/components/QuickSwitcher/composition-search.js +136 -0
- package/dist/components/RenderQueue/actions.d.ts +1 -0
- package/dist/components/RenderQueue/actions.js +5 -1
- package/dist/components/ResetZoomButton.js +17 -2
- package/dist/components/SelectedOutlineCanvasRotation.js +27 -1
- package/dist/components/SelectedOutlineElement.js +12 -31
- package/dist/components/SelectedOutlineKeyboardControls.d.ts +2 -2
- package/dist/components/SelectedOutlineOverlay.d.ts +3 -1
- package/dist/components/SelectedOutlineOverlay.js +21 -26
- package/dist/components/SelectedOutlinePolygon.d.ts +1 -0
- package/dist/components/SelectedOutlinePolygon.js +12 -4
- package/dist/components/SelectedOutlineRenderer.js +88 -21
- package/dist/components/SettingsContext.js +2 -1
- package/dist/components/SettingsModal.d.ts +1 -1
- package/dist/components/SettingsModal.js +19 -3
- package/dist/components/SidebarRenderButton.d.ts +1 -0
- package/dist/components/SidebarRenderButton.js +14 -5
- package/dist/components/Timeline/SequencePropsObserver.js +29 -14
- package/dist/components/Timeline/Timeline.js +2 -1
- package/dist/components/Timeline/TimelineAssetField.js +1 -0
- package/dist/components/Timeline/TimelineDeleteKeybindings.js +5 -90
- package/dist/components/Timeline/TimelineDragHandler.js +18 -8
- package/dist/components/Timeline/TimelineInOutDragHandler.js +2 -3
- package/dist/components/Timeline/TimelineKeyframeControls.js +3 -1
- package/dist/components/Timeline/TimelinePinchZoom.js +14 -4
- package/dist/components/Timeline/TimelinePlayCursorSyncer.js +8 -4
- package/dist/components/Timeline/TimelineRowChrome.js +4 -2
- package/dist/components/Timeline/TimelineSequence.js +52 -45
- package/dist/components/Timeline/TimelineSequenceItem.js +44 -32
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +3 -3
- package/dist/components/Timeline/TimelineSlider.js +2 -2
- package/dist/components/Timeline/TimelineStack/get-stack.d.ts +1 -0
- package/dist/components/Timeline/TimelineStack/get-stack.js +35 -3
- package/dist/components/Timeline/TimelineWidthProvider.js +15 -8
- package/dist/components/Timeline/TimelineZoomControls.js +25 -8
- package/dist/components/Timeline/delete-selected-timeline-item.js +2 -2
- package/dist/components/Timeline/duplicate-selected-timeline-item.js +23 -25
- package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +6 -0
- package/dist/components/Timeline/get-sequence-context-menu-items.js +34 -1
- package/dist/components/Timeline/sequence-props-subscription-store.d.ts +2 -0
- package/dist/components/Timeline/sequence-props-subscription-store.js +22 -1
- package/dist/components/Timeline/timeline-scroll-logic.d.ts +1 -0
- package/dist/components/Timeline/timeline-scroll-logic.js +21 -17
- package/dist/components/Timeline/use-delete-timeline-items.d.ts +1 -0
- package/dist/components/Timeline/use-delete-timeline-items.js +118 -0
- package/dist/components/Timeline/use-sequence-props-subscription.js +7 -0
- package/dist/components/Timeline/use-timeline-asset-drop.js +8 -14
- package/dist/components/TimelineCombobox.js +1 -0
- package/dist/components/UpdateCheck.d.ts +0 -8
- package/dist/components/UpdateCheck.js +7 -54
- package/dist/components/UpdateStatusContext.d.ts +18 -0
- package/dist/components/UpdateStatusContext.js +74 -0
- package/dist/components/UpdatesSettings.d.ts +2 -0
- package/dist/components/UpdatesSettings.js +251 -0
- package/dist/components/WebMcp.js +64 -11
- package/dist/components/ZoomPersistor.js +2 -2
- package/dist/components/composition-drag-data.d.ts +36 -0
- package/dist/components/composition-drag-data.js +232 -0
- package/dist/components/drop-handler-data.d.ts +2 -1
- package/dist/components/drop-handler-data.js +6 -4
- package/dist/components/effect-drag-and-drop.d.ts +2 -5
- package/dist/components/get-open-in-menu-items.d.ts +4 -0
- package/dist/components/get-open-in-menu-items.js +28 -24
- package/dist/components/handle-drop.js +6 -2
- package/dist/components/import-assets.d.ts +5 -13
- package/dist/components/root-composition-menu-items.d.ts +4 -1
- package/dist/components/root-composition-menu-items.js +38 -1
- package/dist/components/selected-outline-geometry.d.ts +21 -2
- package/dist/components/selected-outline-geometry.js +16 -5
- package/dist/components/selected-outline-measurement.d.ts +40 -1
- package/dist/components/selected-outline-measurement.js +239 -1
- package/dist/components/selected-outline-order.d.ts +12 -0
- package/dist/components/selected-outline-order.js +251 -0
- package/dist/components/selected-outline-types.d.ts +15 -2
- package/dist/components/selected-outline-uv.js +106 -3
- package/dist/components/use-configure-default-apps.d.ts +1 -0
- package/dist/components/use-configure-default-apps.js +24 -0
- package/dist/error-overlay/current-error.d.ts +13 -0
- package/dist/error-overlay/current-error.js +21 -0
- package/dist/error-overlay/remotion-overlay/CodeFrame.js +5 -6
- package/dist/error-overlay/remotion-overlay/CopyStackTrace.js +1 -1
- package/dist/error-overlay/remotion-overlay/ErrorDisplay.js +47 -18
- package/dist/error-overlay/remotion-overlay/ErrorLoader.js +6 -2
- package/dist/error-overlay/remotion-overlay/ErrorTitle.js +5 -4
- package/dist/error-overlay/remotion-overlay/OpenInEditor.js +48 -76
- package/dist/error-overlay/remotion-overlay/SearchGitHubIssues.js +1 -1
- package/dist/error-overlay/remotion-overlay/ShortcutHint.js +2 -2
- package/dist/error-overlay/remotion-overlay/StackFrame.js +13 -8
- package/dist/error-overlay/remotion-overlay/Symbolicating.js +1 -1
- package/dist/esm/chunk-6jf1natv.js +25 -0
- package/dist/esm/{chunk-4bxz1d3g.js → chunk-je0h1bgt.js} +1 -28
- package/dist/esm/chunk-m0jqdbkr.js +14571 -0
- package/dist/esm/{chunk-7prjt5n5.js → chunk-np6q13k5.js} +18637 -12189
- package/dist/esm/index.mjs +4 -3
- package/dist/esm/internals.mjs +35826 -14822
- package/dist/esm/previewEntry.mjs +40028 -18935
- package/dist/esm/renderEntry.mjs +6 -3
- package/dist/helpers/can-show-updates.d.ts +5 -0
- package/dist/helpers/can-show-updates.js +7 -0
- package/dist/helpers/colors.d.ts +0 -3
- package/dist/helpers/colors.js +2 -5
- package/dist/helpers/create-folder-tree.d.ts +5 -0
- package/dist/helpers/create-folder-tree.js +26 -6
- package/dist/helpers/document-title.d.ts +2 -0
- package/dist/helpers/document-title.js +14 -3
- package/dist/helpers/get-asset-metadata.js +1 -1
- package/dist/helpers/get-box-quads-polyfill-internals.d.ts +82 -0
- package/dist/helpers/get-box-quads-polyfill-internals.js +2403 -0
- package/dist/helpers/get-box-quads-ponyfill.d.ts +10 -0
- package/dist/helpers/get-box-quads-ponyfill.js +23 -0
- package/dist/helpers/get-git-menu-item.d.ts +5 -0
- package/dist/helpers/get-git-menu-item.js +15 -1
- package/dist/helpers/get-timeline-max-zoom.d.ts +34 -28
- package/dist/helpers/get-timeline-max-zoom.js +46 -29
- package/dist/helpers/hoverable.js +10 -5
- package/dist/helpers/install-fiber-sequence-order-observer.d.ts +37 -0
- package/dist/helpers/install-fiber-sequence-order-observer.js +109 -0
- package/dist/helpers/open-in-editor.js +53 -2
- package/dist/helpers/preview-server-events.js +3 -0
- package/dist/helpers/timeline-layout.d.ts +0 -1
- package/dist/helpers/timeline-layout.js +1 -5
- package/dist/helpers/url-state.d.ts +1 -0
- package/dist/helpers/url-state.js +12 -5
- package/dist/helpers/use-runtime-values.d.ts +1 -1
- package/dist/helpers/use-runtime-values.js +5 -4
- package/dist/helpers/use-sync-external-store.d.ts +3 -0
- package/dist/helpers/use-sync-external-store.js +5 -0
- package/dist/previewEntry.js +2 -0
- package/dist/renderEntry.js +2 -0
- package/dist/state/folders.d.ts +3 -0
- package/dist/state/folders.js +40 -1
- package/dist/state/modals.d.ts +19 -8
- package/dist/state/timeline-sequence-hover.js +3 -2
- package/dist/state/timeline-zoom.d.ts +0 -1
- package/dist/state/timeline-zoom.js +13 -6
- package/package.json +18 -15
- package/dist/components/UpdateModal/UpdateModal.d.ts +0 -6
- package/dist/components/UpdateModal/UpdateModal.js +0 -104
- package/dist/helpers/sort-by-nonce-history.d.ts +0 -1
- package/dist/helpers/sort-by-nonce-history.js +0 -6
- /package/dist/components/{UpdateModal/OpenIssueButton.d.ts → OpenIssueButton.d.ts} +0 -0
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.compositionDragDataToSymbolicatedStack = exports.parseCompositionDragData = exports.getCompositionDragPreviewMetadata = exports.makeCompositionDragData = void 0;
|
|
37
|
+
const z = __importStar(require("zod/mini"));
|
|
38
|
+
const REMOTION_DRAG_MIME_TYPE = 'application/vnd.remotion.drag+json';
|
|
39
|
+
const DRAG_MIME_VERSION = 1;
|
|
40
|
+
const MAX_MIME_TYPE_LENGTH = 512;
|
|
41
|
+
const MAX_DIMENSION = 100000;
|
|
42
|
+
const MAX_DURATION_IN_FRAMES = 100000000;
|
|
43
|
+
const compositionIdSchema = z
|
|
44
|
+
.string()
|
|
45
|
+
.check(z.refine((value) => value.length > 0 &&
|
|
46
|
+
value.length < 500 &&
|
|
47
|
+
/^([a-zA-Z0-9-\u4E00-\u9FFF])+$/.test(value)));
|
|
48
|
+
const compositionFileSchema = z.nullable(z
|
|
49
|
+
.string()
|
|
50
|
+
.check(z.refine((value) => value.length > 0 &&
|
|
51
|
+
value.length < 2000 &&
|
|
52
|
+
!value.includes('\0') &&
|
|
53
|
+
!value.includes('\\') &&
|
|
54
|
+
!value.startsWith('/') &&
|
|
55
|
+
!value.split('/').includes('..'))));
|
|
56
|
+
const compositionDragDataSchema = z.object({
|
|
57
|
+
type: z.literal('remotion-composition'),
|
|
58
|
+
version: z.literal(1),
|
|
59
|
+
compositionId: compositionIdSchema,
|
|
60
|
+
compositionFile: compositionFileSchema,
|
|
61
|
+
});
|
|
62
|
+
const parsePositiveNumber = (value, max) => {
|
|
63
|
+
if (!/^(?:[1-9]\d*|0\.\d+|[1-9]\d*\.\d+)$/.test(value)) {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
const parsed = Number(value);
|
|
67
|
+
return Number.isFinite(parsed) && parsed > 0 && parsed <= max ? parsed : null;
|
|
68
|
+
};
|
|
69
|
+
const parsePositiveInteger = (value, max) => {
|
|
70
|
+
if (!/^[1-9]\d*$/.test(value)) {
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
const parsed = Number(value);
|
|
74
|
+
return Number.isInteger(parsed) && parsed <= max ? parsed : null;
|
|
75
|
+
};
|
|
76
|
+
const parseCompositionDragMimeType = (mimeType) => {
|
|
77
|
+
if (mimeType.length > MAX_MIME_TYPE_LENGTH ||
|
|
78
|
+
!mimeType.startsWith(`${REMOTION_DRAG_MIME_TYPE};`)) {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
const segments = mimeType.split(';');
|
|
82
|
+
if (segments.shift() !== REMOTION_DRAG_MIME_TYPE) {
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
const values = new Map();
|
|
86
|
+
for (const segment of segments) {
|
|
87
|
+
const separator = segment.indexOf('=');
|
|
88
|
+
if (separator === -1) {
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
const key = segment.slice(0, separator);
|
|
92
|
+
const value = segment.slice(separator + 1);
|
|
93
|
+
if (!['v', 'type', 'width', 'height', 'duration'].includes(key) ||
|
|
94
|
+
value === '' ||
|
|
95
|
+
values.has(key)) {
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
values.set(key, value);
|
|
99
|
+
}
|
|
100
|
+
if (values.get('v') !== String(DRAG_MIME_VERSION) ||
|
|
101
|
+
values.get('type') !== 'composition') {
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
104
|
+
const widthValue = values.get('width');
|
|
105
|
+
const heightValue = values.get('height');
|
|
106
|
+
if ((widthValue === undefined) !== (heightValue === undefined)) {
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
const width = widthValue === undefined
|
|
110
|
+
? null
|
|
111
|
+
: parsePositiveNumber(widthValue, MAX_DIMENSION);
|
|
112
|
+
const height = heightValue === undefined
|
|
113
|
+
? null
|
|
114
|
+
: parsePositiveNumber(heightValue, MAX_DIMENSION);
|
|
115
|
+
const durationValue = values.get('duration');
|
|
116
|
+
const durationInFrames = durationValue === undefined
|
|
117
|
+
? null
|
|
118
|
+
: parsePositiveInteger(durationValue, MAX_DURATION_IN_FRAMES);
|
|
119
|
+
if (widthValue !== undefined && width === null) {
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
122
|
+
if (heightValue !== undefined && height === null) {
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
if (durationValue !== undefined && durationInFrames === null) {
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
return {
|
|
129
|
+
type: 'composition',
|
|
130
|
+
width,
|
|
131
|
+
height,
|
|
132
|
+
durationInFrames,
|
|
133
|
+
mimeType,
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
const makeCompositionDragData = ({ compositionFile, compositionId, width, height, durationInFrames, }) => {
|
|
137
|
+
if ((width === null) !== (height === null)) {
|
|
138
|
+
throw new TypeError('width and height must either both be numbers or both be null');
|
|
139
|
+
}
|
|
140
|
+
if (width !== null &&
|
|
141
|
+
(!Number.isFinite(width) || width <= 0 || width > MAX_DIMENSION)) {
|
|
142
|
+
throw new TypeError(`width and height must be numbers between 0 and ${MAX_DIMENSION}`);
|
|
143
|
+
}
|
|
144
|
+
if (height !== null &&
|
|
145
|
+
(!Number.isFinite(height) || height <= 0 || height > MAX_DIMENSION)) {
|
|
146
|
+
throw new TypeError(`width and height must be numbers between 0 and ${MAX_DIMENSION}`);
|
|
147
|
+
}
|
|
148
|
+
if (durationInFrames !== null &&
|
|
149
|
+
(!Number.isInteger(durationInFrames) ||
|
|
150
|
+
durationInFrames <= 0 ||
|
|
151
|
+
durationInFrames > MAX_DURATION_IN_FRAMES)) {
|
|
152
|
+
throw new TypeError(`durationInFrames must be an integer between 1 and ${MAX_DURATION_IN_FRAMES}`);
|
|
153
|
+
}
|
|
154
|
+
const data = {
|
|
155
|
+
type: 'remotion-composition',
|
|
156
|
+
version: 1,
|
|
157
|
+
compositionFile,
|
|
158
|
+
compositionId,
|
|
159
|
+
};
|
|
160
|
+
const segments = [
|
|
161
|
+
REMOTION_DRAG_MIME_TYPE,
|
|
162
|
+
`v=${DRAG_MIME_VERSION}`,
|
|
163
|
+
'type=composition',
|
|
164
|
+
];
|
|
165
|
+
if (width !== null && height !== null) {
|
|
166
|
+
segments.push(`width=${width}`, `height=${height}`);
|
|
167
|
+
}
|
|
168
|
+
if (durationInFrames !== null) {
|
|
169
|
+
segments.push(`duration=${durationInFrames}`);
|
|
170
|
+
}
|
|
171
|
+
return {
|
|
172
|
+
mimeType: segments.join(';'),
|
|
173
|
+
payload: JSON.stringify(data),
|
|
174
|
+
data,
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
exports.makeCompositionDragData = makeCompositionDragData;
|
|
178
|
+
const getCompositionDragPreviewMetadata = (mimeTypes) => {
|
|
179
|
+
for (let index = 0; index < mimeTypes.length; index++) {
|
|
180
|
+
const parsed = parseCompositionDragMimeType(mimeTypes[index]);
|
|
181
|
+
if (parsed !== null) {
|
|
182
|
+
return parsed;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
return null;
|
|
186
|
+
};
|
|
187
|
+
exports.getCompositionDragPreviewMetadata = getCompositionDragPreviewMetadata;
|
|
188
|
+
const parseCompositionDragData = (source) => {
|
|
189
|
+
const serialized = 'types' in source
|
|
190
|
+
? (() => {
|
|
191
|
+
const preview = (0, exports.getCompositionDragPreviewMetadata)(source.types);
|
|
192
|
+
return preview === null
|
|
193
|
+
? null
|
|
194
|
+
: {
|
|
195
|
+
mimeType: preview.mimeType,
|
|
196
|
+
payload: source.getData(preview.mimeType),
|
|
197
|
+
};
|
|
198
|
+
})()
|
|
199
|
+
: source;
|
|
200
|
+
if (serialized === null ||
|
|
201
|
+
parseCompositionDragMimeType(serialized.mimeType) === null) {
|
|
202
|
+
return null;
|
|
203
|
+
}
|
|
204
|
+
try {
|
|
205
|
+
const parsed = z.safeParse(compositionDragDataSchema, JSON.parse(serialized.payload));
|
|
206
|
+
return parsed.success
|
|
207
|
+
? {
|
|
208
|
+
type: 'remotion-composition',
|
|
209
|
+
version: 1,
|
|
210
|
+
compositionFile: parsed.data.compositionFile,
|
|
211
|
+
compositionId: parsed.data.compositionId,
|
|
212
|
+
}
|
|
213
|
+
: null;
|
|
214
|
+
}
|
|
215
|
+
catch (_a) {
|
|
216
|
+
return null;
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
exports.parseCompositionDragData = parseCompositionDragData;
|
|
220
|
+
const compositionDragDataToSymbolicatedStack = (dragData) => {
|
|
221
|
+
if (dragData.compositionFile === null) {
|
|
222
|
+
return null;
|
|
223
|
+
}
|
|
224
|
+
return {
|
|
225
|
+
originalColumnNumber: null,
|
|
226
|
+
originalFileName: dragData.compositionFile,
|
|
227
|
+
originalFunctionName: null,
|
|
228
|
+
originalLineNumber: null,
|
|
229
|
+
originalScriptCode: null,
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
exports.compositionDragDataToSymbolicatedStack = compositionDragDataToSymbolicatedStack;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { type ComponentDragData
|
|
1
|
+
import { type ComponentDragData } from '@remotion/studio-protocol';
|
|
2
|
+
import { type CompositionDragData } from './composition-drag-data';
|
|
2
3
|
export declare const isFileDragEvent: (event: DragEvent) => boolean;
|
|
3
4
|
export declare const isAssetDragEvent: (event: DragEvent) => boolean;
|
|
4
5
|
export declare const isComponentDragEvent: (event: DragEvent) => boolean;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getSfxDragUrl = exports.getComponentDragData = exports.getCompositionDragData = exports.getAssetDragPath = exports.isSupportedDropEvent = exports.isRemoteAssetDragEvent = exports.isSfxDragEvent = exports.isElementDragEvent = exports.isCompositionDragEvent = exports.isComponentDragEvent = exports.isAssetDragEvent = exports.isFileDragEvent = void 0;
|
|
4
4
|
const studio_protocol_1 = require("@remotion/studio-protocol");
|
|
5
5
|
const remote_asset_drag_1 = require("../helpers/remote-asset-drag");
|
|
6
|
+
const composition_drag_data_1 = require("./composition-drag-data");
|
|
6
7
|
const isFileDragEvent = (event) => {
|
|
7
8
|
var _a;
|
|
8
9
|
var _b;
|
|
@@ -23,7 +24,9 @@ const isComponentDragEvent = (event) => {
|
|
|
23
24
|
};
|
|
24
25
|
exports.isComponentDragEvent = isComponentDragEvent;
|
|
25
26
|
const isCompositionDragEvent = (event) => {
|
|
26
|
-
|
|
27
|
+
var _a;
|
|
28
|
+
var _b;
|
|
29
|
+
return ((0, composition_drag_data_1.getCompositionDragPreviewMetadata)((_b = (_a = event.dataTransfer) === null || _a === void 0 ? void 0 : _a.types) !== null && _b !== void 0 ? _b : []) !== null);
|
|
27
30
|
};
|
|
28
31
|
exports.isCompositionDragEvent = isCompositionDragEvent;
|
|
29
32
|
const isElementDragEvent = (event) => {
|
|
@@ -62,10 +65,9 @@ const getAssetDragPath = (event) => {
|
|
|
62
65
|
};
|
|
63
66
|
exports.getAssetDragPath = getAssetDragPath;
|
|
64
67
|
const getCompositionDragData = (event) => {
|
|
65
|
-
|
|
66
|
-
?
|
|
68
|
+
return event.dataTransfer
|
|
69
|
+
? (0, composition_drag_data_1.parseCompositionDragData)(event.dataTransfer)
|
|
67
70
|
: null;
|
|
68
|
-
return (parsed === null || parsed === void 0 ? void 0 : parsed.type) === 'composition' ? parsed.data : null;
|
|
69
71
|
};
|
|
70
72
|
exports.getCompositionDragData = getCompositionDragData;
|
|
71
73
|
const getComponentDragData = (event) => {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type EffectDragData } from '@remotion/studio-protocol';
|
|
2
|
+
import { type EffectDefinition } from '@remotion/studio-shared';
|
|
2
3
|
import type { SequencePropsSubscriptionKey } from 'remotion';
|
|
3
4
|
export declare const hasEffectDragType: (dataTransfer: DataTransfer) => boolean;
|
|
4
5
|
export declare const hasExplicitEffectDragType: (dataTransfer: DataTransfer) => boolean;
|
|
@@ -11,11 +12,7 @@ export declare const addEffectFromDragData: ({ clientId, dragData, fileName, nod
|
|
|
11
12
|
}) => Promise<void>;
|
|
12
13
|
export declare const addEffectToSequence: ({ clientId, effect, fileName, nodePath, }: {
|
|
13
14
|
readonly clientId: string;
|
|
14
|
-
readonly effect:
|
|
15
|
-
name: string;
|
|
16
|
-
importPath: string;
|
|
17
|
-
config: Record<string, unknown>;
|
|
18
|
-
};
|
|
15
|
+
readonly effect: EffectDefinition;
|
|
19
16
|
readonly fileName: string;
|
|
20
17
|
readonly nodePath: SequencePropsSubscriptionKey;
|
|
21
18
|
}) => Promise<void>;
|
|
@@ -2,6 +2,10 @@ import type { TerminalId } from '@remotion/studio-shared';
|
|
|
2
2
|
import type { EditorPickerId, GetDefaultCodingAgentInfoResponse, GetDefaultEditorInfoResponse } from '@remotion/studio-shared';
|
|
3
3
|
import type { OriginalPosition } from '../error-overlay/react-overlay/utils/get-source-map';
|
|
4
4
|
import type { ComboboxValue } from './NewComposition/ComboBox';
|
|
5
|
+
export declare const getConfigureDefaultAppsMenuItems: ({ hasPreviousItems, onConfigureApps, }: {
|
|
6
|
+
readonly hasPreviousItems: boolean;
|
|
7
|
+
readonly onConfigureApps: (() => void) | null;
|
|
8
|
+
}) => ComboboxValue[];
|
|
5
9
|
export declare const getOpenInMenuItems: ({ codingAgentInfo, editorDisabled, editorInfo, excludeCodingAgentId, excludeEditorId, fileManagerDisabled, folder, location, onConfigureApps, onOpenInCodingAgent, onOpenInEditor, onOpenInFileExplorer, onOpenInGitClient, onOpenInTerminal, }: {
|
|
6
10
|
readonly codingAgentInfo: GetDefaultCodingAgentInfoResponse | null;
|
|
7
11
|
readonly editorDisabled: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getOpenInMenuItems = void 0;
|
|
3
|
+
exports.getOpenInMenuItems = exports.getConfigureDefaultAppsMenuItems = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const no_react_1 = require("remotion/no-react");
|
|
6
6
|
const get_file_manager_name_1 = require("../helpers/get-file-manager-name");
|
|
@@ -17,6 +17,28 @@ const menuLabel = {
|
|
|
17
17
|
fontSize: 13,
|
|
18
18
|
lineHeight: '16px',
|
|
19
19
|
};
|
|
20
|
+
const getConfigureDefaultAppsMenuItems = ({ hasPreviousItems, onConfigureApps, }) => {
|
|
21
|
+
if (!onConfigureApps) {
|
|
22
|
+
return [];
|
|
23
|
+
}
|
|
24
|
+
return [
|
|
25
|
+
...(hasPreviousItems
|
|
26
|
+
? [{ type: 'divider', id: 'open-in-settings-divider' }]
|
|
27
|
+
: []),
|
|
28
|
+
{
|
|
29
|
+
id: 'change-default-apps',
|
|
30
|
+
keyHint: null,
|
|
31
|
+
label: jsx_runtime_1.jsx("span", { style: menuLabel, children: "Configure default apps..." }),
|
|
32
|
+
leftItem: null,
|
|
33
|
+
onClick: onConfigureApps,
|
|
34
|
+
quickSwitcherLabel: null,
|
|
35
|
+
subMenu: null,
|
|
36
|
+
type: 'item',
|
|
37
|
+
value: 'change-default-apps',
|
|
38
|
+
},
|
|
39
|
+
];
|
|
40
|
+
};
|
|
41
|
+
exports.getConfigureDefaultAppsMenuItems = getConfigureDefaultAppsMenuItems;
|
|
20
42
|
const getOpenInMenuItems = ({ codingAgentInfo, editorDisabled, editorInfo, excludeCodingAgentId, excludeEditorId, fileManagerDisabled, folder, location, onConfigureApps, onOpenInCodingAgent, onOpenInEditor, onOpenInFileExplorer, onOpenInGitClient, onOpenInTerminal, }) => {
|
|
21
43
|
var _a, _b, _c, _d;
|
|
22
44
|
const showFinder = window.remotion_fileSystemPlatform === 'darwin';
|
|
@@ -61,13 +83,7 @@ const getOpenInMenuItems = ({ codingAgentInfo, editorDisabled, editorInfo, exclu
|
|
|
61
83
|
label: jsx_runtime_1.jsx("span", { style: menuLabel, children: "GitHub.com" }),
|
|
62
84
|
leftItem: jsx_runtime_1.jsx(github_1.GitHubIcon, { size: 18 }),
|
|
63
85
|
onClick: () => {
|
|
64
|
-
|
|
65
|
-
if (!gitSource) {
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
window.open(folder || !location
|
|
69
|
-
? (0, get_git_menu_item_1.getGitSourceBranchUrl)(gitSource)
|
|
70
|
-
: (0, get_git_menu_item_1.getGitRefUrl)(gitSource, location, window.remotion_cwd), '_blank');
|
|
86
|
+
(0, get_git_menu_item_1.openGitSource)({ folder, location });
|
|
71
87
|
},
|
|
72
88
|
quickSwitcherLabel: null,
|
|
73
89
|
subMenu: null,
|
|
@@ -174,22 +190,10 @@ const getOpenInMenuItems = ({ codingAgentInfo, editorDisabled, editorInfo, exclu
|
|
|
174
190
|
...systemApps,
|
|
175
191
|
]
|
|
176
192
|
: []),
|
|
177
|
-
...(
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
? {
|
|
182
|
-
id: 'change-default-apps',
|
|
183
|
-
keyHint: null,
|
|
184
|
-
label: jsx_runtime_1.jsx("span", { style: menuLabel, children: "Change default apps..." }),
|
|
185
|
-
leftItem: null,
|
|
186
|
-
onClick: onConfigureApps,
|
|
187
|
-
quickSwitcherLabel: null,
|
|
188
|
-
subMenu: null,
|
|
189
|
-
type: 'item',
|
|
190
|
-
value: 'change-default-apps',
|
|
191
|
-
}
|
|
192
|
-
: null,
|
|
193
|
+
...(0, exports.getConfigureDefaultAppsMenuItems)({
|
|
194
|
+
hasPreviousItems: hasCategorizedApps || systemApps.length > 0,
|
|
195
|
+
onConfigureApps,
|
|
196
|
+
}),
|
|
193
197
|
].filter(no_react_1.NoReactInternals.truthy);
|
|
194
198
|
};
|
|
195
199
|
exports.getOpenInMenuItems = getOpenInMenuItems;
|
|
@@ -8,7 +8,7 @@ const element_install_request_1 = require("./element-install-request");
|
|
|
8
8
|
const import_assets_1 = require("./import-assets");
|
|
9
9
|
const handleDrop = async ({ chooseSvgImportMode, compositionFile, compositionId, destinationDimensions, dropPosition, event, fps, from, localFiles, preferCompositionStart, }) => {
|
|
10
10
|
var _a;
|
|
11
|
-
var _b;
|
|
11
|
+
var _b, _c, _d;
|
|
12
12
|
if (localFiles !== null || (0, drop_handler_data_1.isFileDragEvent)(event)) {
|
|
13
13
|
const files = localFiles !== null && localFiles !== void 0 ? localFiles : Array.from((_b = (_a = event.dataTransfer) === null || _a === void 0 ? void 0 : _a.files) !== null && _b !== void 0 ? _b : []);
|
|
14
14
|
if (files.length === 0) {
|
|
@@ -88,7 +88,11 @@ const handleDrop = async ({ chooseSvgImportMode, compositionFile, compositionId,
|
|
|
88
88
|
createdAt: Date.now(),
|
|
89
89
|
compositionFile,
|
|
90
90
|
compositionId,
|
|
91
|
-
element:
|
|
91
|
+
element: {
|
|
92
|
+
...element.element,
|
|
93
|
+
durationInFrames: (_c = element.element.durationInFrames) !== null && _c !== void 0 ? _c : null,
|
|
94
|
+
installationMode: (_d = element.element.installationMode) !== null && _d !== void 0 ? _d : null,
|
|
95
|
+
},
|
|
92
96
|
from: (0, import_assets_1.getFromForDrop)({
|
|
93
97
|
durationInFrames: element.element.durationInFrames,
|
|
94
98
|
from,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type ElementInstallExpectedFileState, type FileType, type InsertableCompositionElementPosition } from '@remotion/studio-shared';
|
|
1
|
+
import { type ElementInstallExpectedFileState, type FileType, type InsertableCompositionElementPosition, type InstallableElement } from '@remotion/studio-shared';
|
|
3
2
|
import type { Dimensions } from '../helpers/is-current-selected-still';
|
|
3
|
+
import type { CompositionDragData } from './composition-drag-data';
|
|
4
4
|
export type InsertElementDropPosition = {
|
|
5
5
|
readonly centerX: number;
|
|
6
6
|
readonly centerY: number;
|
|
@@ -71,7 +71,7 @@ export declare const getComponentDimensions: (component: {
|
|
|
71
71
|
dimensions?: import("@remotion/studio-protocol").ComponentDimensions | undefined;
|
|
72
72
|
importName: string;
|
|
73
73
|
importPath: string;
|
|
74
|
-
props: ComponentProp[];
|
|
74
|
+
props: import("@remotion/studio-protocol").ComponentProp[];
|
|
75
75
|
}) => Dimensions | null;
|
|
76
76
|
export declare const getDurationInFrames: ({ durationInSeconds, fps, }: {
|
|
77
77
|
durationInSeconds: number | null;
|
|
@@ -139,7 +139,7 @@ export declare const insertComponent: ({ component, compositionFile, composition
|
|
|
139
139
|
dimensions?: import("@remotion/studio-protocol").ComponentDimensions | undefined;
|
|
140
140
|
importName: string;
|
|
141
141
|
importPath: string;
|
|
142
|
-
props: ComponentProp[];
|
|
142
|
+
props: import("@remotion/studio-protocol").ComponentProp[];
|
|
143
143
|
};
|
|
144
144
|
compositionFile: string;
|
|
145
145
|
compositionId: string;
|
|
@@ -158,15 +158,7 @@ export declare const insertComposition: ({ composition, compositionFile, composi
|
|
|
158
158
|
export declare const insertElement: ({ compositionFile, compositionId, element, expectedFileState, position, from, overwriteExisting, }: {
|
|
159
159
|
compositionFile: string;
|
|
160
160
|
compositionId: string;
|
|
161
|
-
element:
|
|
162
|
-
dependencies: import("@remotion/studio-protocol").ElementDependency[];
|
|
163
|
-
durationInFrames?: number | undefined;
|
|
164
|
-
installationMode?: import("@remotion/studio-protocol").ElementInstallationMode | undefined;
|
|
165
|
-
slug: string;
|
|
166
|
-
displayName: string;
|
|
167
|
-
sourceCode: string;
|
|
168
|
-
dimensions: import("@remotion/studio-protocol").ComponentDimensions | null;
|
|
169
|
-
};
|
|
161
|
+
element: InstallableElement;
|
|
170
162
|
expectedFileState: ElementInstallExpectedFileState;
|
|
171
163
|
position: InsertableCompositionElementPosition | null;
|
|
172
164
|
from: number | null;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { SetStateAction } from 'react';
|
|
2
|
+
import type { CompositionSortOrder } from '../state/folders';
|
|
2
3
|
import type { ModalState } from '../state/modals';
|
|
3
4
|
import type { ComboboxValue } from './NewComposition/ComboBox';
|
|
4
|
-
export declare const getRootCompositionMenuItems: ({ connectionStatus, readOnlyStudio, setSelectedModal, }: {
|
|
5
|
+
export declare const getRootCompositionMenuItems: ({ connectionStatus, readOnlyStudio, setSelectedModal, compositionSortOrder, setCompositionSortOrder, }: {
|
|
5
6
|
connectionStatus: "connected" | "disconnected" | "init";
|
|
6
7
|
readOnlyStudio: boolean;
|
|
7
8
|
setSelectedModal: (value: SetStateAction<ModalState | null>) => void;
|
|
9
|
+
compositionSortOrder: CompositionSortOrder;
|
|
10
|
+
setCompositionSortOrder: (sortOrder: CompositionSortOrder) => void;
|
|
8
11
|
}) => ComboboxValue[];
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRootCompositionMenuItems = void 0;
|
|
4
|
-
const
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const Checkmark_1 = require("../icons/Checkmark");
|
|
6
|
+
const getRootCompositionMenuItems = ({ connectionStatus, readOnlyStudio, setSelectedModal, compositionSortOrder, setCompositionSortOrder, }) => {
|
|
5
7
|
return [
|
|
6
8
|
{
|
|
7
9
|
id: 'new-root-composition',
|
|
@@ -41,6 +43,41 @@ const getRootCompositionMenuItems = ({ connectionStatus, readOnlyStudio, setSele
|
|
|
41
43
|
value: 'new-root-folder',
|
|
42
44
|
disabled: readOnlyStudio || connectionStatus !== 'connected',
|
|
43
45
|
},
|
|
46
|
+
{
|
|
47
|
+
id: 'sort-compositions-divider',
|
|
48
|
+
type: 'divider',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: 'sort-compositions-header',
|
|
52
|
+
label: 'Sort',
|
|
53
|
+
type: 'section-header',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
id: 'sort-compositions-registration',
|
|
57
|
+
keyHint: null,
|
|
58
|
+
label: 'As registered',
|
|
59
|
+
leftItem: compositionSortOrder === 'registration' ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, {}) : null,
|
|
60
|
+
onClick: () => {
|
|
61
|
+
setCompositionSortOrder('registration');
|
|
62
|
+
},
|
|
63
|
+
quickSwitcherLabel: 'Sort compositions as registered',
|
|
64
|
+
subMenu: null,
|
|
65
|
+
type: 'item',
|
|
66
|
+
value: 'registration',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
id: 'sort-compositions-alphabetical',
|
|
70
|
+
keyHint: null,
|
|
71
|
+
label: 'Alphabetically',
|
|
72
|
+
leftItem: compositionSortOrder === 'alphabetical' ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, {}) : null,
|
|
73
|
+
onClick: () => {
|
|
74
|
+
setCompositionSortOrder('alphabetical');
|
|
75
|
+
},
|
|
76
|
+
quickSwitcherLabel: 'Sort compositions alphabetically',
|
|
77
|
+
subMenu: null,
|
|
78
|
+
type: 'item',
|
|
79
|
+
value: 'alphabetical',
|
|
80
|
+
},
|
|
44
81
|
];
|
|
45
82
|
};
|
|
46
83
|
exports.getRootCompositionMenuItems = getRootCompositionMenuItems;
|
|
@@ -1,2 +1,21 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
1
|
+
export type OutlinePoint = {
|
|
2
|
+
readonly x: number;
|
|
3
|
+
readonly y: number;
|
|
4
|
+
};
|
|
5
|
+
export type SelectedOutline = {
|
|
6
|
+
readonly key: string;
|
|
7
|
+
readonly dimensions: {
|
|
8
|
+
readonly width: number;
|
|
9
|
+
readonly height: number;
|
|
10
|
+
} | null;
|
|
11
|
+
readonly uncroppedPoints: readonly [OutlinePoint, OutlinePoint, OutlinePoint, OutlinePoint] | null;
|
|
12
|
+
readonly points: readonly [
|
|
13
|
+
OutlinePoint,
|
|
14
|
+
OutlinePoint,
|
|
15
|
+
OutlinePoint,
|
|
16
|
+
OutlinePoint
|
|
17
|
+
];
|
|
18
|
+
};
|
|
19
|
+
export declare const clamp: (value: number, min: number, max: number) => number;
|
|
20
|
+
export declare const mix: (from: number, to: number, progress: number) => number;
|
|
21
|
+
export declare const mixPoint: (from: OutlinePoint, to: OutlinePoint, progress: number) => OutlinePoint;
|
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
exports.mixPoint = exports.mix = exports.clamp = void 0;
|
|
4
|
+
const clamp = (value, min, max) => {
|
|
5
|
+
return Math.min(max, Math.max(min, value));
|
|
6
|
+
};
|
|
7
|
+
exports.clamp = clamp;
|
|
8
|
+
const mix = (from, to, progress) => {
|
|
9
|
+
return from + (to - from) * progress;
|
|
10
|
+
};
|
|
11
|
+
exports.mix = mix;
|
|
12
|
+
const mixPoint = (from, to, progress) => {
|
|
13
|
+
return {
|
|
14
|
+
x: (0, exports.mix)(from.x, to.x, progress),
|
|
15
|
+
y: (0, exports.mix)(from.y, to.y, progress),
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
exports.mixPoint = mixPoint;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { OverrideIdToNodePaths, TSequence } from 'remotion';
|
|
2
|
+
import type { OutlinePoint, SelectedOutline } from './selected-outline-geometry';
|
|
3
|
+
import type { SelectedOutlineLayoutTarget, SequenceWithSelectedOutline } from './selected-outline-types';
|
|
2
4
|
export declare const pointToString: (point: OutlinePoint) => string;
|
|
3
5
|
export declare const midpoint: (from: OutlinePoint, to: OutlinePoint) => OutlinePoint;
|
|
4
6
|
export declare const getOutlineCenter: (points: readonly [OutlinePoint, OutlinePoint, OutlinePoint, OutlinePoint]) => OutlinePoint;
|
|
@@ -26,6 +28,24 @@ export declare const getSelectedOutlineRotationPivot: ({ dimensions, points, tra
|
|
|
26
28
|
readonly points: readonly [OutlinePoint, OutlinePoint, OutlinePoint, OutlinePoint];
|
|
27
29
|
readonly transformOriginValue: string;
|
|
28
30
|
}) => OutlinePoint;
|
|
31
|
+
type SvgViewport = {
|
|
32
|
+
readonly x: number;
|
|
33
|
+
readonly y: number;
|
|
34
|
+
readonly width: number;
|
|
35
|
+
readonly height: number;
|
|
36
|
+
};
|
|
37
|
+
type SvgScreenCtm = Pick<DOMMatrixReadOnly, 'a' | 'b' | 'c' | 'd' | 'e' | 'f'>;
|
|
38
|
+
export declare const getTransformedSvgViewportPoints: ({ viewport, ctm, containerRect, }: {
|
|
39
|
+
readonly viewport: SvgViewport;
|
|
40
|
+
readonly ctm: SvgScreenCtm;
|
|
41
|
+
readonly containerRect: Pick<DOMRect, "left" | "top">;
|
|
42
|
+
}) => readonly [OutlinePoint, OutlinePoint, OutlinePoint, OutlinePoint];
|
|
43
|
+
export declare const cropOutlinePoints: (points: readonly [OutlinePoint, OutlinePoint, OutlinePoint, OutlinePoint], crop: {
|
|
44
|
+
readonly left: number;
|
|
45
|
+
readonly right: number;
|
|
46
|
+
readonly top: number;
|
|
47
|
+
readonly bottom: number;
|
|
48
|
+
}) => readonly [OutlinePoint, OutlinePoint, OutlinePoint, OutlinePoint];
|
|
29
49
|
export declare const getSelectedSequenceKeys: (selectedItems: readonly import("@remotion/canvas").CanvasSelectionItem[]) => Set<string>;
|
|
30
50
|
export declare const getSequenceKeysContainingSelection: (selectedItems: readonly import("@remotion/canvas").CanvasSelectionItem[]) => Set<string>;
|
|
31
51
|
export declare const getOutlineSelectionInteraction: ({ shiftKey, metaKey, ctrlKey, }: {
|
|
@@ -53,4 +73,23 @@ export type SelectedCropInfo = {
|
|
|
53
73
|
export declare const getSelectedCropInfo: (selectedItems: readonly import("@remotion/canvas").CanvasSelectionItem[]) => SelectedCropInfo | null;
|
|
54
74
|
export declare const getSelectedTransformOriginInfo: (selectedItems: readonly import("@remotion/canvas").CanvasSelectionItem[]) => SelectedTransformOriginInfo | null;
|
|
55
75
|
export declare const getSelectedRotationInfo: (selectedItems: readonly import("@remotion/canvas").CanvasSelectionItem[]) => SelectedRotationInfo | null;
|
|
76
|
+
export declare const getSequencesWithSelectableOutlines: ({ sequences, overrideIdsToNodePaths, compositions, timelinePosition, }: {
|
|
77
|
+
readonly sequences: readonly TSequence[];
|
|
78
|
+
readonly overrideIdsToNodePaths: OverrideIdToNodePaths;
|
|
79
|
+
readonly compositions?: readonly import("remotion").AnyComposition[] | undefined;
|
|
80
|
+
readonly timelinePosition: number;
|
|
81
|
+
}) => SequenceWithSelectedOutline[];
|
|
82
|
+
export declare const measureOutlines: (container: SVGSVGElement, targets: readonly SelectedOutlineLayoutTarget[], hoveredTimelineNodePathKey: string | null) => SelectedOutline[];
|
|
83
|
+
export declare const measureOutlineTargets: (container: Element, targets: readonly {
|
|
84
|
+
readonly crop: {
|
|
85
|
+
readonly left: number;
|
|
86
|
+
readonly right: number;
|
|
87
|
+
readonly top: number;
|
|
88
|
+
readonly bottom: number;
|
|
89
|
+
};
|
|
90
|
+
readonly includeOutsideContainer: boolean;
|
|
91
|
+
readonly key: string;
|
|
92
|
+
readonly ref: import("react").RefObject<Element | null>;
|
|
93
|
+
}[]) => SelectedOutline[];
|
|
94
|
+
export declare const outlinesAreEqual: (a: readonly SelectedOutline[], b: readonly SelectedOutline[]) => boolean;
|
|
56
95
|
export {};
|