@remotion/studio-shared 4.0.472 → 4.0.474
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-requests.d.ts +117 -7
- package/dist/asset-drag-data.d.ts +8 -0
- package/dist/asset-drag-data.js +38 -0
- package/dist/component-drag-data.d.ts +27 -0
- package/dist/component-drag-data.js +101 -0
- package/dist/detect-file-type.d.ts +71 -0
- package/dist/detect-file-type.js +295 -0
- package/dist/effect-clipboard-data.d.ts +22 -0
- package/dist/effect-clipboard-data.js +60 -1
- package/dist/index.d.ts +13 -5
- package/dist/index.js +52 -5
- package/dist/optimistic-add-keyframe.js +0 -1
- package/dist/optimistic-move-keyframe.d.ts +23 -0
- package/dist/optimistic-move-keyframe.js +142 -0
- package/dist/optimistic-update-for-effect-prop-statuses.d.ts +8 -0
- package/dist/optimistic-update-for-effect-prop-statuses.js +43 -0
- package/dist/optimistic-update-for-prop-statuses.d.ts +7 -0
- package/dist/optimistic-update-for-prop-statuses.js +30 -0
- package/dist/optimistic-update-keyframe-settings.d.ts +13 -0
- package/dist/optimistic-update-keyframe-settings.js +60 -0
- package/dist/required-package.d.ts +4 -0
- package/dist/required-package.js +42 -0
- package/dist/schema-field-info.d.ts +6 -6
- package/dist/schema-field-info.js +5 -5
- package/dist/sfx-drag-data.d.ts +10 -0
- package/dist/sfx-drag-data.js +41 -0
- package/dist/url.d.ts +1 -0
- package/dist/url.js +13 -0
- package/package.json +4 -4
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.detectFileType = exports.isImageFileType = exports.isM3u = exports.isFlac = exports.isAac = exports.isMp3 = exports.isTransportStream = exports.isIsoBaseMedia = exports.isWebm = exports.isRiffWave = exports.isRiffAvi = exports.matchesPattern = void 0;
|
|
4
|
+
const webmPattern = new Uint8Array([0x1a, 0x45, 0xdf, 0xa3]);
|
|
5
|
+
const matchesPattern = (pattern) => {
|
|
6
|
+
return (data) => {
|
|
7
|
+
return pattern.every((value, index) => data[index] === value);
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
exports.matchesPattern = matchesPattern;
|
|
11
|
+
const isRiffAvi = (data) => {
|
|
12
|
+
const riffPattern = new Uint8Array([0x52, 0x49, 0x46, 0x46]);
|
|
13
|
+
if (!(0, exports.matchesPattern)(riffPattern)(data.subarray(0, 4))) {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
const fileType = data.subarray(8, 12);
|
|
17
|
+
const aviPattern = new Uint8Array([0x41, 0x56, 0x49, 0x20]);
|
|
18
|
+
return (0, exports.matchesPattern)(aviPattern)(fileType);
|
|
19
|
+
};
|
|
20
|
+
exports.isRiffAvi = isRiffAvi;
|
|
21
|
+
const isRiffWave = (data) => {
|
|
22
|
+
const riffPattern = new Uint8Array([0x52, 0x49, 0x46, 0x46]);
|
|
23
|
+
if (!(0, exports.matchesPattern)(riffPattern)(data.subarray(0, 4))) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
const fileType = data.subarray(8, 12);
|
|
27
|
+
const wavePattern = new Uint8Array([0x57, 0x41, 0x56, 0x45]);
|
|
28
|
+
return (0, exports.matchesPattern)(wavePattern)(fileType);
|
|
29
|
+
};
|
|
30
|
+
exports.isRiffWave = isRiffWave;
|
|
31
|
+
const isWebm = (data) => {
|
|
32
|
+
return (0, exports.matchesPattern)(webmPattern)(data.subarray(0, 4));
|
|
33
|
+
};
|
|
34
|
+
exports.isWebm = isWebm;
|
|
35
|
+
const isIsoBaseMedia = (data) => {
|
|
36
|
+
const isoBaseMediaMp4Pattern = new TextEncoder().encode('ftyp');
|
|
37
|
+
return (0, exports.matchesPattern)(isoBaseMediaMp4Pattern)(data.subarray(4, 8));
|
|
38
|
+
};
|
|
39
|
+
exports.isIsoBaseMedia = isIsoBaseMedia;
|
|
40
|
+
const isTransportStream = (data) => {
|
|
41
|
+
return data[0] === 0x47 && data[188] === 0x47;
|
|
42
|
+
};
|
|
43
|
+
exports.isTransportStream = isTransportStream;
|
|
44
|
+
const isMp3 = (data) => {
|
|
45
|
+
const mpegPattern = new Uint8Array([0xff, 0xf3]);
|
|
46
|
+
const mpegPattern2 = new Uint8Array([0xff, 0xfb]);
|
|
47
|
+
const id3v4Pattern = new Uint8Array([0x49, 0x44, 0x33, 4]);
|
|
48
|
+
const id3v3Pattern = new Uint8Array([0x49, 0x44, 0x33, 3]);
|
|
49
|
+
const id3v2Pattern = new Uint8Array([0x49, 0x44, 0x33, 2]);
|
|
50
|
+
const subarray = data.subarray(0, 4);
|
|
51
|
+
return ((0, exports.matchesPattern)(mpegPattern)(subarray) ||
|
|
52
|
+
(0, exports.matchesPattern)(mpegPattern2)(subarray) ||
|
|
53
|
+
(0, exports.matchesPattern)(id3v4Pattern)(subarray) ||
|
|
54
|
+
(0, exports.matchesPattern)(id3v3Pattern)(subarray) ||
|
|
55
|
+
(0, exports.matchesPattern)(id3v2Pattern)(subarray));
|
|
56
|
+
};
|
|
57
|
+
exports.isMp3 = isMp3;
|
|
58
|
+
const isAac = (data) => {
|
|
59
|
+
const aacPattern = new Uint8Array([0xff, 0xf1]);
|
|
60
|
+
return (0, exports.matchesPattern)(aacPattern)(data.subarray(0, 2));
|
|
61
|
+
};
|
|
62
|
+
exports.isAac = isAac;
|
|
63
|
+
const isFlac = (data) => {
|
|
64
|
+
const flacPattern = new Uint8Array([0x66, 0x4c, 0x61, 0x43]);
|
|
65
|
+
return (0, exports.matchesPattern)(flacPattern)(data.subarray(0, 4));
|
|
66
|
+
};
|
|
67
|
+
exports.isFlac = isFlac;
|
|
68
|
+
const isM3u = (data) => {
|
|
69
|
+
return new TextDecoder('utf-8').decode(data.slice(0, 7)) === '#EXTM3U';
|
|
70
|
+
};
|
|
71
|
+
exports.isM3u = isM3u;
|
|
72
|
+
const getPngDimensions = (pngData) => {
|
|
73
|
+
if (pngData.length < 24) {
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
const view = new DataView(pngData.buffer, pngData.byteOffset);
|
|
77
|
+
const pngSignature = [137, 80, 78, 71, 13, 10, 26, 10];
|
|
78
|
+
for (let i = 0; i < 8; i++) {
|
|
79
|
+
if (pngData[i] !== pngSignature[i]) {
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
width: view.getUint32(16, false),
|
|
85
|
+
height: view.getUint32(20, false),
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
const isPng = (data) => {
|
|
89
|
+
const pngPattern = new Uint8Array([0x89, 0x50, 0x4e, 0x47]);
|
|
90
|
+
if ((0, exports.matchesPattern)(pngPattern)(data.subarray(0, 4))) {
|
|
91
|
+
const png = getPngDimensions(data);
|
|
92
|
+
return { dimensions: png, type: 'png' };
|
|
93
|
+
}
|
|
94
|
+
return null;
|
|
95
|
+
};
|
|
96
|
+
const getJpegDimensions = (data) => {
|
|
97
|
+
let offset = 0;
|
|
98
|
+
const readUint16BE = (o) => {
|
|
99
|
+
return (data[o] << 8) | data[o + 1];
|
|
100
|
+
};
|
|
101
|
+
if (data.length < 4 || readUint16BE(offset) !== 0xffd8) {
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
104
|
+
offset += 2;
|
|
105
|
+
while (offset + 3 < data.length) {
|
|
106
|
+
if (data[offset] === 0xff) {
|
|
107
|
+
const marker = data[offset + 1];
|
|
108
|
+
if (marker === 0xc0 || marker === 0xc2) {
|
|
109
|
+
if (offset + 8 >= data.length) {
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
const height = readUint16BE(offset + 5);
|
|
113
|
+
const width = readUint16BE(offset + 7);
|
|
114
|
+
return { width, height };
|
|
115
|
+
}
|
|
116
|
+
const length = readUint16BE(offset + 2);
|
|
117
|
+
if (length <= 0) {
|
|
118
|
+
return null;
|
|
119
|
+
}
|
|
120
|
+
offset += length + 2;
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
offset++;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return null;
|
|
127
|
+
};
|
|
128
|
+
const isJpeg = (data) => {
|
|
129
|
+
const jpegPattern = new Uint8Array([0xff, 0xd8]);
|
|
130
|
+
const jpeg = (0, exports.matchesPattern)(jpegPattern)(data.subarray(0, 2));
|
|
131
|
+
if (!jpeg) {
|
|
132
|
+
return null;
|
|
133
|
+
}
|
|
134
|
+
const dim = getJpegDimensions(data);
|
|
135
|
+
return { dimensions: dim, type: 'jpeg' };
|
|
136
|
+
};
|
|
137
|
+
const getGifDimensions = (data) => {
|
|
138
|
+
if (data.length < 10) {
|
|
139
|
+
return null;
|
|
140
|
+
}
|
|
141
|
+
const view = new DataView(data.buffer, data.byteOffset);
|
|
142
|
+
const width = view.getUint16(6, true);
|
|
143
|
+
const height = view.getUint16(8, true);
|
|
144
|
+
return { width, height };
|
|
145
|
+
};
|
|
146
|
+
const isGif = (data) => {
|
|
147
|
+
const gifPattern = new Uint8Array([0x47, 0x49, 0x46, 0x38]);
|
|
148
|
+
if ((0, exports.matchesPattern)(gifPattern)(data.subarray(0, 4))) {
|
|
149
|
+
return { type: 'gif', dimensions: getGifDimensions(data) };
|
|
150
|
+
}
|
|
151
|
+
return null;
|
|
152
|
+
};
|
|
153
|
+
const getWebPDimensions = (bytes) => {
|
|
154
|
+
if (bytes.length < 30) {
|
|
155
|
+
return null;
|
|
156
|
+
}
|
|
157
|
+
if (bytes[0] !== 0x52 ||
|
|
158
|
+
bytes[1] !== 0x49 ||
|
|
159
|
+
bytes[2] !== 0x46 ||
|
|
160
|
+
bytes[3] !== 0x46 ||
|
|
161
|
+
bytes[8] !== 0x57 ||
|
|
162
|
+
bytes[9] !== 0x45 ||
|
|
163
|
+
bytes[10] !== 0x42 ||
|
|
164
|
+
bytes[11] !== 0x50) {
|
|
165
|
+
return null;
|
|
166
|
+
}
|
|
167
|
+
if (bytes[12] === 0x56 && bytes[13] === 0x50 && bytes[14] === 0x38) {
|
|
168
|
+
if (bytes[15] === 0x20) {
|
|
169
|
+
return {
|
|
170
|
+
width: bytes[26] | ((bytes[27] << 8) & 0x3fff),
|
|
171
|
+
height: bytes[28] | ((bytes[29] << 8) & 0x3fff),
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
if (bytes[12] === 0x56 &&
|
|
176
|
+
bytes[13] === 0x50 &&
|
|
177
|
+
bytes[14] === 0x38 &&
|
|
178
|
+
bytes[15] === 0x4c) {
|
|
179
|
+
return {
|
|
180
|
+
width: 1 + (bytes[21] | ((bytes[22] & 0x3f) << 8)),
|
|
181
|
+
height: 1 +
|
|
182
|
+
(((bytes[22] & 0xc0) >> 6) |
|
|
183
|
+
(bytes[23] << 2) |
|
|
184
|
+
((bytes[24] & 0x0f) << 10)),
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
if (bytes[12] === 0x56 &&
|
|
188
|
+
bytes[13] === 0x50 &&
|
|
189
|
+
bytes[14] === 0x38 &&
|
|
190
|
+
bytes[15] === 0x58) {
|
|
191
|
+
return {
|
|
192
|
+
width: 1 + (bytes[24] | (bytes[25] << 8) | (bytes[26] << 16)),
|
|
193
|
+
height: 1 + (bytes[27] | (bytes[28] << 8) | (bytes[29] << 16)),
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
return null;
|
|
197
|
+
};
|
|
198
|
+
const isWebp = (data) => {
|
|
199
|
+
const webpPattern = new Uint8Array([0x52, 0x49, 0x46, 0x46]);
|
|
200
|
+
if ((0, exports.matchesPattern)(webpPattern)(data.subarray(0, 4))) {
|
|
201
|
+
return {
|
|
202
|
+
type: 'webp',
|
|
203
|
+
dimensions: getWebPDimensions(data),
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
return null;
|
|
207
|
+
};
|
|
208
|
+
const getBmpDimensions = (bmpData) => {
|
|
209
|
+
if (bmpData.length < 26) {
|
|
210
|
+
return null;
|
|
211
|
+
}
|
|
212
|
+
const view = new DataView(bmpData.buffer, bmpData.byteOffset);
|
|
213
|
+
return {
|
|
214
|
+
width: view.getUint32(18, true),
|
|
215
|
+
height: Math.abs(view.getInt32(22, true)),
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
const isBmp = (data) => {
|
|
219
|
+
const bmpPattern = new Uint8Array([0x42, 0x4d]);
|
|
220
|
+
if ((0, exports.matchesPattern)(bmpPattern)(data.subarray(0, 2))) {
|
|
221
|
+
const bmp = getBmpDimensions(data);
|
|
222
|
+
return { dimensions: bmp, type: 'bmp' };
|
|
223
|
+
}
|
|
224
|
+
return null;
|
|
225
|
+
};
|
|
226
|
+
const isPdf = (data) => {
|
|
227
|
+
if (data.length < 4) {
|
|
228
|
+
return null;
|
|
229
|
+
}
|
|
230
|
+
const pdfPattern = new Uint8Array([0x25, 0x50, 0x44, 0x46]);
|
|
231
|
+
return (0, exports.matchesPattern)(pdfPattern)(data.subarray(0, 4)) ? { type: 'pdf' } : null;
|
|
232
|
+
};
|
|
233
|
+
const isImageFileType = (fileType) => {
|
|
234
|
+
return (fileType.type === 'jpeg' ||
|
|
235
|
+
fileType.type === 'webp' ||
|
|
236
|
+
fileType.type === 'gif' ||
|
|
237
|
+
fileType.type === 'png' ||
|
|
238
|
+
fileType.type === 'bmp');
|
|
239
|
+
};
|
|
240
|
+
exports.isImageFileType = isImageFileType;
|
|
241
|
+
const detectFileType = (data) => {
|
|
242
|
+
if ((0, exports.isRiffWave)(data)) {
|
|
243
|
+
return { type: 'wav' };
|
|
244
|
+
}
|
|
245
|
+
if ((0, exports.isRiffAvi)(data)) {
|
|
246
|
+
return { type: 'riff' };
|
|
247
|
+
}
|
|
248
|
+
if ((0, exports.isAac)(data)) {
|
|
249
|
+
return { type: 'aac' };
|
|
250
|
+
}
|
|
251
|
+
if ((0, exports.isFlac)(data)) {
|
|
252
|
+
return { type: 'flac' };
|
|
253
|
+
}
|
|
254
|
+
if ((0, exports.isM3u)(data)) {
|
|
255
|
+
return { type: 'm3u' };
|
|
256
|
+
}
|
|
257
|
+
const webp = isWebp(data);
|
|
258
|
+
if (webp) {
|
|
259
|
+
return webp;
|
|
260
|
+
}
|
|
261
|
+
if ((0, exports.isWebm)(data)) {
|
|
262
|
+
return { type: 'webm' };
|
|
263
|
+
}
|
|
264
|
+
if ((0, exports.isIsoBaseMedia)(data)) {
|
|
265
|
+
return { type: 'iso-base-media' };
|
|
266
|
+
}
|
|
267
|
+
if ((0, exports.isTransportStream)(data)) {
|
|
268
|
+
return { type: 'transport-stream' };
|
|
269
|
+
}
|
|
270
|
+
if ((0, exports.isMp3)(data)) {
|
|
271
|
+
return { type: 'mp3' };
|
|
272
|
+
}
|
|
273
|
+
const gif = isGif(data);
|
|
274
|
+
if (gif) {
|
|
275
|
+
return gif;
|
|
276
|
+
}
|
|
277
|
+
const png = isPng(data);
|
|
278
|
+
if (png) {
|
|
279
|
+
return png;
|
|
280
|
+
}
|
|
281
|
+
const pdf = isPdf(data);
|
|
282
|
+
if (pdf) {
|
|
283
|
+
return pdf;
|
|
284
|
+
}
|
|
285
|
+
const bmp = isBmp(data);
|
|
286
|
+
if (bmp) {
|
|
287
|
+
return bmp;
|
|
288
|
+
}
|
|
289
|
+
const jpeg = isJpeg(data);
|
|
290
|
+
if (jpeg) {
|
|
291
|
+
return jpeg;
|
|
292
|
+
}
|
|
293
|
+
return { type: 'unknown' };
|
|
294
|
+
};
|
|
295
|
+
exports.detectFileType = detectFileType;
|
|
@@ -35,6 +35,17 @@ export type EffectClipboardData = {
|
|
|
35
35
|
readonly remotionClipboard: 'effects';
|
|
36
36
|
readonly effects: EffectClipboardSnapshot[];
|
|
37
37
|
};
|
|
38
|
+
export type EffectPropClipboardData = {
|
|
39
|
+
readonly type: 'effect-prop';
|
|
40
|
+
readonly version: 1;
|
|
41
|
+
readonly remotionClipboard: 'effect-prop';
|
|
42
|
+
readonly effect: {
|
|
43
|
+
readonly callee: string;
|
|
44
|
+
readonly importPath: string;
|
|
45
|
+
};
|
|
46
|
+
readonly key: string;
|
|
47
|
+
readonly param: EffectClipboardParam;
|
|
48
|
+
};
|
|
38
49
|
export type EffectClipboardDataParseResult = {
|
|
39
50
|
readonly status: 'valid';
|
|
40
51
|
readonly data: EffectClipboardData;
|
|
@@ -44,5 +55,16 @@ export type EffectClipboardDataParseResult = {
|
|
|
44
55
|
} | {
|
|
45
56
|
readonly status: 'invalid';
|
|
46
57
|
};
|
|
58
|
+
export type EffectPropClipboardDataParseResult = {
|
|
59
|
+
readonly status: 'valid';
|
|
60
|
+
readonly data: EffectPropClipboardData;
|
|
61
|
+
} | {
|
|
62
|
+
readonly status: 'unsupported-version';
|
|
63
|
+
readonly version: unknown;
|
|
64
|
+
} | {
|
|
65
|
+
readonly status: 'invalid';
|
|
66
|
+
};
|
|
47
67
|
export declare const parseEffectClipboardDataResult: (value: string) => EffectClipboardDataParseResult;
|
|
48
68
|
export declare const parseEffectClipboardData: (value: string) => EffectClipboardData | null;
|
|
69
|
+
export declare const parseEffectPropClipboardDataResult: (value: string) => EffectPropClipboardDataParseResult;
|
|
70
|
+
export declare const parseEffectPropClipboardData: (value: string) => EffectPropClipboardData | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parseEffectClipboardData = exports.parseEffectClipboardDataResult = void 0;
|
|
3
|
+
exports.parseEffectPropClipboardData = exports.parseEffectPropClipboardDataResult = exports.parseEffectClipboardData = exports.parseEffectClipboardDataResult = void 0;
|
|
4
4
|
const keyframe_interpolation_function_1 = require("./keyframe-interpolation-function");
|
|
5
5
|
const isRecord = (value) => {
|
|
6
6
|
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
@@ -111,3 +111,62 @@ const parseEffectClipboardData = (value) => {
|
|
|
111
111
|
return result.data;
|
|
112
112
|
};
|
|
113
113
|
exports.parseEffectClipboardData = parseEffectClipboardData;
|
|
114
|
+
const parseEffectPropClipboardDataResult = (value) => {
|
|
115
|
+
try {
|
|
116
|
+
const parsed = JSON.parse(value);
|
|
117
|
+
if (!isRecord(parsed)) {
|
|
118
|
+
return { status: 'invalid' };
|
|
119
|
+
}
|
|
120
|
+
if (parsed.remotionClipboard !== 'effect-prop') {
|
|
121
|
+
return { status: 'invalid' };
|
|
122
|
+
}
|
|
123
|
+
if (parsed.version !== 1) {
|
|
124
|
+
return {
|
|
125
|
+
status: 'unsupported-version',
|
|
126
|
+
version: parsed.version,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
if (parsed.type !== 'effect-prop') {
|
|
130
|
+
return { status: 'invalid' };
|
|
131
|
+
}
|
|
132
|
+
if (!isRecord(parsed.effect)) {
|
|
133
|
+
return { status: 'invalid' };
|
|
134
|
+
}
|
|
135
|
+
if (typeof parsed.effect.callee !== 'string' ||
|
|
136
|
+
typeof parsed.effect.importPath !== 'string') {
|
|
137
|
+
return { status: 'invalid' };
|
|
138
|
+
}
|
|
139
|
+
if (typeof parsed.key !== 'string') {
|
|
140
|
+
return { status: 'invalid' };
|
|
141
|
+
}
|
|
142
|
+
if (!isEffectClipboardParam(parsed.param)) {
|
|
143
|
+
return { status: 'invalid' };
|
|
144
|
+
}
|
|
145
|
+
return {
|
|
146
|
+
status: 'valid',
|
|
147
|
+
data: {
|
|
148
|
+
type: 'effect-prop',
|
|
149
|
+
version: 1,
|
|
150
|
+
remotionClipboard: 'effect-prop',
|
|
151
|
+
effect: {
|
|
152
|
+
callee: parsed.effect.callee,
|
|
153
|
+
importPath: parsed.effect.importPath,
|
|
154
|
+
},
|
|
155
|
+
key: parsed.key,
|
|
156
|
+
param: parsed.param,
|
|
157
|
+
},
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
catch (_a) {
|
|
161
|
+
return { status: 'invalid' };
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
exports.parseEffectPropClipboardDataResult = parseEffectPropClipboardDataResult;
|
|
165
|
+
const parseEffectPropClipboardData = (value) => {
|
|
166
|
+
const result = (0, exports.parseEffectPropClipboardDataResult)(value);
|
|
167
|
+
if (result.status !== 'valid') {
|
|
168
|
+
return null;
|
|
169
|
+
}
|
|
170
|
+
return result.data;
|
|
171
|
+
};
|
|
172
|
+
exports.parseEffectPropClipboardData = parseEffectPropClipboardData;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
export { splitAnsi, stripAnsi } from './ansi';
|
|
2
|
-
export { AddEffectKeyframeRequest, AddEffectKeyframeResponse, AddEffectRequest, AddEffectResponse, AddRenderRequest, AddSequenceKeyframeRequest, AddSequenceKeyframeResponse, ApiRoutes, ApplyCodemodRequest, ApplyCodemodResponse, ApplyVisualControlRequest, ApplyVisualControlResponse, CanUpdateDefaultPropsResponse, CanUpdateSequencePropsRequest, CancelRenderRequest, CancelRenderResponse, CompositionComponentInfoRequest, CompositionComponentInfoResponse, CopyStillToClipboardRequest, DeleteEffectKeyframe, DeleteEffectRequest, DeleteEffectRequestItem, DeleteEffectResponse, DeleteJsxNodeRequest, DeleteJsxNodeRequestItem, DeleteJsxNodeResponse, DeleteKeyframesRequest, DeleteKeyframesResponse, DeleteSequenceKeyframe, DeleteStaticFileRequest, DeleteStaticFileResponse, DuplicateJsxNodeRequest, DuplicateJsxNodeResponse, InsertJsxElementRequest, InsertJsxElementResponse, InsertableCompositionElement, InstallPackageRequest, InstallPackageResponse, OpenInEditorRequest, OpenInEditorResponse, OpenInFileExplorerRequest, PasteEffectsRequest, PasteEffectsResponse, ProjectInfoRequest, ProjectInfoResponse, RedoRequest, RedoResponse, RemoveRenderRequest, ReorderEffectRequest, ReorderEffectResponse, RestartStudioRequest, RestartStudioResponse, SaveEffectPropsRequest, SaveEffectPropsResponse, SaveSequencePropEdit, SaveSequencePropsRequest, SaveSequencePropsResponse, SaveSequencePropsResult, SimpleDiff, SubscribeToDefaultPropsRequest, SubscribeToDefaultPropsResponse, SubscribeToFileExistenceRequest, SubscribeToFileExistenceResponse, SubscribeToSequencePropsRequest, SubscribeToSequencePropsResponse, UndoRequest, UndoResponse, UnsubscribeFromDefaultPropsRequest, UnsubscribeFromFileExistenceRequest, UnsubscribeFromSequencePropsRequest, UpdateAvailableRequest, UpdateAvailableResponse, UpdateDefaultPropsRequest, UpdateDefaultPropsResponse, } from './api-requests';
|
|
2
|
+
export { AddEffectKeyframeRequest, AddEffectKeyframeResponse, AddEffectRequest, AddEffectResponse, AddRenderRequest, AddSequenceKeyframeRequest, AddSequenceKeyframeResponse, ApiRoutes, ApplyCodemodRequest, ApplyCodemodResponse, ApplyVisualControlRequest, ApplyVisualControlResponse, CanUpdateDefaultPropsResponse, CanUpdateSequencePropsRequest, CancelRenderRequest, CancelRenderResponse, CompositionComponentInfoRequest, CompositionComponentInfoResponse, CopyStillToClipboardRequest, DeleteEffectKeyframe, DeleteEffectRequest, DeleteEffectRequestItem, DeleteEffectResponse, DeleteJsxNodeRequest, DeleteJsxNodeRequestItem, DeleteJsxNodeResponse, DeleteKeyframesRequest, DeleteKeyframesResponse, DeleteSequenceKeyframe, DeleteStaticFileRequest, DeleteStaticFileResponse, DownloadRemoteAssetRequest, DownloadRemoteAssetResponse, DuplicateJsxNodeRequest, DuplicateJsxNodeResponse, InsertJsxElementRequest, InsertJsxElementResponse, InsertableCompositionElement, InstallPackageRequest, InstallPackageResponse, LogStudioErrorRequest, LogStudioErrorResponse, MoveEffectKeyframe, MoveKeyframesRequest, MoveKeyframesResponse, MoveSequenceKeyframe, OpenInEditorRequest, OpenInEditorResponse, OpenInFileExplorerRequest, PasteEffectsRequest, PasteEffectsResponse, ProjectInfoRequest, ProjectInfoResponse, RedoRequest, RedoResponse, RemoveRenderRequest, RenameStaticFileRequest, RenameStaticFileResponse, ReorderEffectRequest, ReorderEffectResponse, ReorderSequencePosition, ReorderSequenceRequest, ReorderSequenceResponse, RestartStudioRequest, RestartStudioResponse, SaveEffectPropsRequest, SaveEffectPropsResponse, SaveSequencePropEdit, SaveSequencePropsRequest, SaveSequencePropsResponse, SaveSequencePropsResult, SimpleDiff, SubscribeToDefaultPropsRequest, SubscribeToDefaultPropsResponse, SubscribeToFileExistenceRequest, SubscribeToFileExistenceResponse, SubscribeToSequencePropsRequest, SubscribeToSequencePropsResponse, UndoRequest, UndoResponse, UnsubscribeFromDefaultPropsRequest, UnsubscribeFromFileExistenceRequest, UnsubscribeFromSequencePropsRequest, UpdateAvailableRequest, UpdateAvailableResponse, UpdateDefaultPropsRequest, UpdateDefaultPropsResponse, UpdateEffectKeyframeSettingsRequest, UpdateEffectKeyframeSettingsResponse, UpdateSequenceKeyframeSettingsRequest, UpdateSequenceKeyframeSettingsResponse, type KeyframeSettings, } from './api-requests';
|
|
3
|
+
export { ASSET_DRAG_MIME_TYPE, makeAssetDragData, parseAssetDragData, type AssetDragData, } from './asset-drag-data';
|
|
3
4
|
export type { ApplyVisualControlCodemod, RecastCodemod } from './codemods';
|
|
5
|
+
export { COMPONENT_DRAG_MIME_TYPE, areComponentProps, isComponentIdentifier, isComponentImportPath, makeComponentDragData, parseComponentDragData, type ComponentDragData, type ComponentProp, } from './component-drag-data';
|
|
4
6
|
export { DEFAULT_BUFFER_STATE_DELAY_IN_MILLISECONDS } from './default-buffer-state-delay-in-milliseconds';
|
|
5
|
-
export {
|
|
7
|
+
export { detectFileType, isImageFileType, type FileDimensions, type FileType, type ImageFileType, } from './detect-file-type';
|
|
8
|
+
export { parseEffectClipboardData, parseEffectClipboardDataResult, parseEffectPropClipboardData, parseEffectPropClipboardDataResult, type EffectClipboardClamping, type EffectClipboardData, type EffectClipboardDataParseResult, type EffectClipboardEasing, type EffectClipboardExtrapolateType, type EffectClipboardInterpolationFunction, type EffectClipboardKeyframe, type EffectClipboardKeyframedParam, type EffectClipboardParam, type EffectClipboardPasteType, type EffectClipboardSnapshot, type EffectClipboardStaticParam, type EffectPropClipboardData, type EffectPropClipboardDataParseResult, } from './effect-clipboard-data';
|
|
6
9
|
export { EFFECT_DRAG_MIME_TYPE, parseEffectDragData, type EffectDragData, } from './effect-drag-data';
|
|
7
10
|
export { EventSourceEvent } from './event-source-event';
|
|
8
11
|
export { formatBytes } from './format-bytes';
|
|
@@ -20,13 +23,18 @@ export { ProjectInfo } from './project-info';
|
|
|
20
23
|
export type { RenderDefaults } from './render-defaults';
|
|
21
24
|
export { AggregateRenderProgress, ArtifactProgress, BrowserDownloadState, BrowserProgressLog, BundlingState, CopyingState, DownloadProgress, JobProgressCallback, RenderJob, RenderJobWithCleanup, RenderingProgressInput, RequiredChromiumOptions, StitchingProgressInput, UiOpenGlOptions, } from './render-job';
|
|
22
25
|
export type { CompletedClientRender } from './render-job';
|
|
26
|
+
export { getRequiredPackageForEffectImportPath, getRequiredPackageForInsertableElement, } from './required-package';
|
|
23
27
|
export { SCHEMA_FIELD_ROW_HEIGHT, getEffectFieldsToShow, getFieldsToShow, } from './schema-field-info';
|
|
24
|
-
export type { AnySchemaFieldInfo,
|
|
28
|
+
export type { AnySchemaFieldInfo, DragOverrides, EffectSchemaFieldInfo, PropStatuses, SchemaFieldInfo, SequenceControls, SequenceSchemaFieldInfo, } from './schema-field-info';
|
|
29
|
+
export { SFX_DRAG_MIME_TYPE, parseSfxDragData, type SfxDragData, } from './sfx-drag-data';
|
|
25
30
|
export { ScriptLine, SomeStackFrame, StackFrame, SymbolicatedStackFrame, } from './stack-types';
|
|
26
31
|
export { EnumPath, stringifyDefaultProps } from './stringify-default-props';
|
|
27
32
|
export type { VisualControlChange } from './codemods';
|
|
28
33
|
export { optimisticAddEffectKeyframe, optimisticAddSequenceKeyframe, } from './optimistic-add-keyframe';
|
|
29
34
|
export { optimisticDeleteEffectKeyframe, optimisticDeleteEffectKeyframes, optimisticDeleteSequenceKeyframe, optimisticDeleteSequenceKeyframes, } from './optimistic-delete-keyframe';
|
|
30
|
-
export {
|
|
31
|
-
export {
|
|
35
|
+
export { canMoveKeyframesWithoutCollisions, optimisticMoveEffectKeyframes, optimisticMoveSequenceKeyframes, type OptimisticKeyframeMove, } from './optimistic-move-keyframe';
|
|
36
|
+
export { optimisticUpdateForEffectPropStatuses } from './optimistic-update-for-effect-prop-statuses';
|
|
37
|
+
export { optimisticUpdateForPropStatuses } from './optimistic-update-for-prop-statuses';
|
|
38
|
+
export { optimisticUpdateEffectKeyframeSettings, optimisticUpdateSequenceKeyframeSettings, } from './optimistic-update-keyframe-settings';
|
|
32
39
|
export { stringifySequenceExpandedRowKey, stringifySequenceSubscriptionKey, } from './stringify-sequence-subscription-key';
|
|
40
|
+
export { isUrl } from './url';
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,46 @@
|
|
|
1
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
17
|
+
exports.optimisticDeleteEffectKeyframes = exports.optimisticDeleteEffectKeyframe = exports.optimisticAddSequenceKeyframe = exports.optimisticAddEffectKeyframe = exports.stringifyDefaultProps = exports.parseSfxDragData = exports.SFX_DRAG_MIME_TYPE = exports.getFieldsToShow = exports.getEffectFieldsToShow = exports.SCHEMA_FIELD_ROW_HEIGHT = exports.getRequiredPackageForInsertableElement = exports.getRequiredPackageForEffectImportPath = exports.packages = exports.installableMap = exports.extraPackages = exports.descriptions = exports.apiDocs = exports.DEFAULT_TIMELINE_TRACKS = exports.keyframeInterpolationFunctions = exports.isSequenceFieldSchemaKeyframable = exports.isSchemaFieldKeyframable = exports.isKeyframeInterpolationFunction = exports.getKeyframeInterpolationFunctionForSchemaField = exports.getKeyframeInterpolationFunction = exports.hotMiddlewareOptions = exports.getProjectName = exports.getLocationFromBuildError = exports.getDefaultOutLocation = exports.getAllSchemaKeys = exports.formatBytes = exports.parseEffectDragData = exports.EFFECT_DRAG_MIME_TYPE = exports.parseEffectPropClipboardDataResult = exports.parseEffectPropClipboardData = exports.parseEffectClipboardDataResult = exports.parseEffectClipboardData = exports.isImageFileType = exports.detectFileType = exports.DEFAULT_BUFFER_STATE_DELAY_IN_MILLISECONDS = exports.parseComponentDragData = exports.makeComponentDragData = exports.isComponentImportPath = exports.isComponentIdentifier = exports.areComponentProps = exports.COMPONENT_DRAG_MIME_TYPE = exports.parseAssetDragData = exports.makeAssetDragData = exports.ASSET_DRAG_MIME_TYPE = exports.stripAnsi = exports.splitAnsi = void 0;
|
|
18
|
+
exports.isUrl = exports.stringifySequenceSubscriptionKey = exports.stringifySequenceExpandedRowKey = exports.optimisticUpdateSequenceKeyframeSettings = exports.optimisticUpdateEffectKeyframeSettings = exports.optimisticUpdateForPropStatuses = exports.optimisticUpdateForEffectPropStatuses = exports.optimisticMoveSequenceKeyframes = exports.optimisticMoveEffectKeyframes = exports.canMoveKeyframesWithoutCollisions = exports.optimisticDeleteSequenceKeyframes = exports.optimisticDeleteSequenceKeyframe = void 0;
|
|
4
19
|
const ansi_1 = require("./ansi");
|
|
5
20
|
Object.defineProperty(exports, "splitAnsi", { enumerable: true, get: function () { return ansi_1.splitAnsi; } });
|
|
6
21
|
Object.defineProperty(exports, "stripAnsi", { enumerable: true, get: function () { return ansi_1.stripAnsi; } });
|
|
22
|
+
__exportStar(require("./api-requests"), exports);
|
|
23
|
+
const asset_drag_data_1 = require("./asset-drag-data");
|
|
24
|
+
Object.defineProperty(exports, "ASSET_DRAG_MIME_TYPE", { enumerable: true, get: function () { return asset_drag_data_1.ASSET_DRAG_MIME_TYPE; } });
|
|
25
|
+
Object.defineProperty(exports, "makeAssetDragData", { enumerable: true, get: function () { return asset_drag_data_1.makeAssetDragData; } });
|
|
26
|
+
Object.defineProperty(exports, "parseAssetDragData", { enumerable: true, get: function () { return asset_drag_data_1.parseAssetDragData; } });
|
|
27
|
+
const component_drag_data_1 = require("./component-drag-data");
|
|
28
|
+
Object.defineProperty(exports, "COMPONENT_DRAG_MIME_TYPE", { enumerable: true, get: function () { return component_drag_data_1.COMPONENT_DRAG_MIME_TYPE; } });
|
|
29
|
+
Object.defineProperty(exports, "areComponentProps", { enumerable: true, get: function () { return component_drag_data_1.areComponentProps; } });
|
|
30
|
+
Object.defineProperty(exports, "isComponentIdentifier", { enumerable: true, get: function () { return component_drag_data_1.isComponentIdentifier; } });
|
|
31
|
+
Object.defineProperty(exports, "isComponentImportPath", { enumerable: true, get: function () { return component_drag_data_1.isComponentImportPath; } });
|
|
32
|
+
Object.defineProperty(exports, "makeComponentDragData", { enumerable: true, get: function () { return component_drag_data_1.makeComponentDragData; } });
|
|
33
|
+
Object.defineProperty(exports, "parseComponentDragData", { enumerable: true, get: function () { return component_drag_data_1.parseComponentDragData; } });
|
|
7
34
|
const default_buffer_state_delay_in_milliseconds_1 = require("./default-buffer-state-delay-in-milliseconds");
|
|
8
35
|
Object.defineProperty(exports, "DEFAULT_BUFFER_STATE_DELAY_IN_MILLISECONDS", { enumerable: true, get: function () { return default_buffer_state_delay_in_milliseconds_1.DEFAULT_BUFFER_STATE_DELAY_IN_MILLISECONDS; } });
|
|
36
|
+
const detect_file_type_1 = require("./detect-file-type");
|
|
37
|
+
Object.defineProperty(exports, "detectFileType", { enumerable: true, get: function () { return detect_file_type_1.detectFileType; } });
|
|
38
|
+
Object.defineProperty(exports, "isImageFileType", { enumerable: true, get: function () { return detect_file_type_1.isImageFileType; } });
|
|
9
39
|
const effect_clipboard_data_1 = require("./effect-clipboard-data");
|
|
10
40
|
Object.defineProperty(exports, "parseEffectClipboardData", { enumerable: true, get: function () { return effect_clipboard_data_1.parseEffectClipboardData; } });
|
|
11
41
|
Object.defineProperty(exports, "parseEffectClipboardDataResult", { enumerable: true, get: function () { return effect_clipboard_data_1.parseEffectClipboardDataResult; } });
|
|
42
|
+
Object.defineProperty(exports, "parseEffectPropClipboardData", { enumerable: true, get: function () { return effect_clipboard_data_1.parseEffectPropClipboardData; } });
|
|
43
|
+
Object.defineProperty(exports, "parseEffectPropClipboardDataResult", { enumerable: true, get: function () { return effect_clipboard_data_1.parseEffectPropClipboardDataResult; } });
|
|
12
44
|
const effect_drag_data_1 = require("./effect-drag-data");
|
|
13
45
|
Object.defineProperty(exports, "EFFECT_DRAG_MIME_TYPE", { enumerable: true, get: function () { return effect_drag_data_1.EFFECT_DRAG_MIME_TYPE; } });
|
|
14
46
|
Object.defineProperty(exports, "parseEffectDragData", { enumerable: true, get: function () { return effect_drag_data_1.parseEffectDragData; } });
|
|
@@ -39,10 +71,16 @@ Object.defineProperty(exports, "descriptions", { enumerable: true, get: function
|
|
|
39
71
|
Object.defineProperty(exports, "extraPackages", { enumerable: true, get: function () { return package_info_1.extraPackages; } });
|
|
40
72
|
Object.defineProperty(exports, "installableMap", { enumerable: true, get: function () { return package_info_1.installableMap; } });
|
|
41
73
|
Object.defineProperty(exports, "packages", { enumerable: true, get: function () { return package_info_1.packages; } });
|
|
74
|
+
const required_package_1 = require("./required-package");
|
|
75
|
+
Object.defineProperty(exports, "getRequiredPackageForEffectImportPath", { enumerable: true, get: function () { return required_package_1.getRequiredPackageForEffectImportPath; } });
|
|
76
|
+
Object.defineProperty(exports, "getRequiredPackageForInsertableElement", { enumerable: true, get: function () { return required_package_1.getRequiredPackageForInsertableElement; } });
|
|
42
77
|
const schema_field_info_1 = require("./schema-field-info");
|
|
43
78
|
Object.defineProperty(exports, "SCHEMA_FIELD_ROW_HEIGHT", { enumerable: true, get: function () { return schema_field_info_1.SCHEMA_FIELD_ROW_HEIGHT; } });
|
|
44
79
|
Object.defineProperty(exports, "getEffectFieldsToShow", { enumerable: true, get: function () { return schema_field_info_1.getEffectFieldsToShow; } });
|
|
45
80
|
Object.defineProperty(exports, "getFieldsToShow", { enumerable: true, get: function () { return schema_field_info_1.getFieldsToShow; } });
|
|
81
|
+
const sfx_drag_data_1 = require("./sfx-drag-data");
|
|
82
|
+
Object.defineProperty(exports, "SFX_DRAG_MIME_TYPE", { enumerable: true, get: function () { return sfx_drag_data_1.SFX_DRAG_MIME_TYPE; } });
|
|
83
|
+
Object.defineProperty(exports, "parseSfxDragData", { enumerable: true, get: function () { return sfx_drag_data_1.parseSfxDragData; } });
|
|
46
84
|
const stringify_default_props_1 = require("./stringify-default-props");
|
|
47
85
|
Object.defineProperty(exports, "stringifyDefaultProps", { enumerable: true, get: function () { return stringify_default_props_1.stringifyDefaultProps; } });
|
|
48
86
|
const optimistic_add_keyframe_1 = require("./optimistic-add-keyframe");
|
|
@@ -53,10 +91,19 @@ Object.defineProperty(exports, "optimisticDeleteEffectKeyframe", { enumerable: t
|
|
|
53
91
|
Object.defineProperty(exports, "optimisticDeleteEffectKeyframes", { enumerable: true, get: function () { return optimistic_delete_keyframe_1.optimisticDeleteEffectKeyframes; } });
|
|
54
92
|
Object.defineProperty(exports, "optimisticDeleteSequenceKeyframe", { enumerable: true, get: function () { return optimistic_delete_keyframe_1.optimisticDeleteSequenceKeyframe; } });
|
|
55
93
|
Object.defineProperty(exports, "optimisticDeleteSequenceKeyframes", { enumerable: true, get: function () { return optimistic_delete_keyframe_1.optimisticDeleteSequenceKeyframes; } });
|
|
56
|
-
const
|
|
57
|
-
Object.defineProperty(exports, "
|
|
58
|
-
|
|
59
|
-
Object.defineProperty(exports, "
|
|
94
|
+
const optimistic_move_keyframe_1 = require("./optimistic-move-keyframe");
|
|
95
|
+
Object.defineProperty(exports, "canMoveKeyframesWithoutCollisions", { enumerable: true, get: function () { return optimistic_move_keyframe_1.canMoveKeyframesWithoutCollisions; } });
|
|
96
|
+
Object.defineProperty(exports, "optimisticMoveEffectKeyframes", { enumerable: true, get: function () { return optimistic_move_keyframe_1.optimisticMoveEffectKeyframes; } });
|
|
97
|
+
Object.defineProperty(exports, "optimisticMoveSequenceKeyframes", { enumerable: true, get: function () { return optimistic_move_keyframe_1.optimisticMoveSequenceKeyframes; } });
|
|
98
|
+
const optimistic_update_for_effect_prop_statuses_1 = require("./optimistic-update-for-effect-prop-statuses");
|
|
99
|
+
Object.defineProperty(exports, "optimisticUpdateForEffectPropStatuses", { enumerable: true, get: function () { return optimistic_update_for_effect_prop_statuses_1.optimisticUpdateForEffectPropStatuses; } });
|
|
100
|
+
const optimistic_update_for_prop_statuses_1 = require("./optimistic-update-for-prop-statuses");
|
|
101
|
+
Object.defineProperty(exports, "optimisticUpdateForPropStatuses", { enumerable: true, get: function () { return optimistic_update_for_prop_statuses_1.optimisticUpdateForPropStatuses; } });
|
|
102
|
+
const optimistic_update_keyframe_settings_1 = require("./optimistic-update-keyframe-settings");
|
|
103
|
+
Object.defineProperty(exports, "optimisticUpdateEffectKeyframeSettings", { enumerable: true, get: function () { return optimistic_update_keyframe_settings_1.optimisticUpdateEffectKeyframeSettings; } });
|
|
104
|
+
Object.defineProperty(exports, "optimisticUpdateSequenceKeyframeSettings", { enumerable: true, get: function () { return optimistic_update_keyframe_settings_1.optimisticUpdateSequenceKeyframeSettings; } });
|
|
60
105
|
const stringify_sequence_subscription_key_1 = require("./stringify-sequence-subscription-key");
|
|
61
106
|
Object.defineProperty(exports, "stringifySequenceExpandedRowKey", { enumerable: true, get: function () { return stringify_sequence_subscription_key_1.stringifySequenceExpandedRowKey; } });
|
|
62
107
|
Object.defineProperty(exports, "stringifySequenceSubscriptionKey", { enumerable: true, get: function () { return stringify_sequence_subscription_key_1.stringifySequenceSubscriptionKey; } });
|
|
108
|
+
const url_1 = require("./url");
|
|
109
|
+
Object.defineProperty(exports, "isUrl", { enumerable: true, get: function () { return url_1.isUrl; } });
|
|
@@ -28,7 +28,6 @@ const addKeyframeToPropStatus = ({ status, fieldKey, frame, value, schema, }) =>
|
|
|
28
28
|
const staticValue = (_a = status.codeValue) !== null && _a !== void 0 ? _a : value;
|
|
29
29
|
return {
|
|
30
30
|
status: 'keyframed',
|
|
31
|
-
codeValue: undefined,
|
|
32
31
|
interpolationFunction: (0, keyframe_interpolation_function_1.getKeyframeInterpolationFunction)({
|
|
33
32
|
schema,
|
|
34
33
|
key: fieldKey,
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { CanUpdateSequencePropsResponse, CanUpdateSequencePropStatus } from 'remotion';
|
|
2
|
+
export type OptimisticKeyframeMove = {
|
|
3
|
+
readonly fieldKey: string;
|
|
4
|
+
readonly fromFrame: number;
|
|
5
|
+
readonly toFrame: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const canMoveKeyframesWithoutCollisions: ({ status, moves, }: {
|
|
8
|
+
status: CanUpdateSequencePropStatus;
|
|
9
|
+
moves: readonly {
|
|
10
|
+
fromFrame: number;
|
|
11
|
+
toFrame: number;
|
|
12
|
+
}[];
|
|
13
|
+
}) => boolean;
|
|
14
|
+
export declare const optimisticMoveSequenceKeyframes: ({ previous, keyframes, }: {
|
|
15
|
+
previous: CanUpdateSequencePropsResponse;
|
|
16
|
+
keyframes: readonly OptimisticKeyframeMove[];
|
|
17
|
+
}) => CanUpdateSequencePropsResponse;
|
|
18
|
+
export declare const optimisticMoveEffectKeyframes: ({ previous, keyframes, }: {
|
|
19
|
+
previous: CanUpdateSequencePropsResponse;
|
|
20
|
+
keyframes: readonly (OptimisticKeyframeMove & {
|
|
21
|
+
effectIndex: number;
|
|
22
|
+
})[];
|
|
23
|
+
}) => CanUpdateSequencePropsResponse;
|