@remotion/studio-shared 4.0.478 → 4.0.479
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 +11 -11
- package/dist/easing-clipboard-data.d.ts +18 -0
- package/dist/easing-clipboard-data.js +64 -0
- package/dist/effect-catalog.d.ts +19 -0
- package/dist/effect-catalog.js +598 -0
- package/dist/effect-clipboard-data.d.ts +2 -1
- package/dist/effect-clipboard-data.js +12 -4
- package/dist/get-all-keys.d.ts +2 -2
- package/dist/index.d.ts +6 -3
- package/dist/index.js +18 -3
- package/dist/keyframe-easing-presets.d.ts +4 -2
- package/dist/keyframe-easing-presets.js +39 -4
- package/dist/keyframe-interpolation-function.d.ts +5 -5
- package/dist/keyframe-interpolation-function.js +4 -4
- package/dist/optimistic-add-keyframe.d.ts +3 -3
- package/dist/optimistic-add-keyframe.js +2 -1
- package/dist/optimistic-update-for-effect-prop-statuses.d.ts +2 -2
- package/dist/optimistic-update-for-prop-statuses.d.ts +2 -2
- package/dist/optimistic-update-keyframe-settings.js +2 -1
- package/dist/parse-spring-easing-config.d.ts +9 -0
- package/dist/parse-spring-easing-config.js +97 -0
- package/dist/schema-field-info.d.ts +6 -6
- package/package.json +4 -4
package/dist/api-requests.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AudioCodec, ChromeMode, Codec, ColorSpace, LogLevel, PixelFormat, StillImageFormat, VideoImageFormat, X264Preset } from '@remotion/renderer';
|
|
2
2
|
import type { HardwareAccelerationOption } from '@remotion/renderer/client';
|
|
3
|
-
import type { _InternalTypes, CannotUpdateSequenceReason, CanUpdateEffectPropsResponse, CanUpdateSequencePropsResponseFalse, CanUpdateSequencePropsResponseTrue, CanUpdateSequencePropStatus, ExtrapolateType, JsxComponentIdentity, SequenceNodePath, SequencePropsSubscriptionKey,
|
|
3
|
+
import type { _InternalTypes, CannotUpdateSequenceReason, CanUpdateEffectPropsResponse, CanUpdateSequencePropsResponseFalse, CanUpdateSequencePropsResponseTrue, CanUpdateSequencePropStatus, ExtrapolateType, JsxComponentIdentity, SequenceNodePath, SequencePropsSubscriptionKey, InteractivitySchema } from 'remotion';
|
|
4
4
|
import type { RecastCodemod, VisualControlChange } from './codemods';
|
|
5
5
|
import type { ComponentProp } from './component-drag-data';
|
|
6
6
|
import type { EffectClipboardParam, EffectClipboardPasteType, EffectClipboardSnapshot } from './effect-clipboard-data';
|
|
@@ -227,7 +227,7 @@ export type SaveSequencePropEdit = {
|
|
|
227
227
|
key: string;
|
|
228
228
|
value: string;
|
|
229
229
|
defaultValue: string | null;
|
|
230
|
-
schema:
|
|
230
|
+
schema: InteractivitySchema;
|
|
231
231
|
};
|
|
232
232
|
export type SaveSequencePropsRequest = {
|
|
233
233
|
edits: SaveSequencePropEdit[];
|
|
@@ -254,7 +254,7 @@ type SaveEffectPropsRequestBase = {
|
|
|
254
254
|
effectIndex: number;
|
|
255
255
|
key: string;
|
|
256
256
|
defaultValue: string | null;
|
|
257
|
-
schema:
|
|
257
|
+
schema: InteractivitySchema;
|
|
258
258
|
clientId: string;
|
|
259
259
|
};
|
|
260
260
|
export type SaveEffectPropsRequest = (SaveEffectPropsRequestBase & {
|
|
@@ -327,7 +327,7 @@ export type DeleteSequenceKeyframe = {
|
|
|
327
327
|
nodePath: SequencePropsSubscriptionKey;
|
|
328
328
|
key: string;
|
|
329
329
|
frame: number;
|
|
330
|
-
schema:
|
|
330
|
+
schema: InteractivitySchema;
|
|
331
331
|
};
|
|
332
332
|
export type MoveSequenceKeyframe = {
|
|
333
333
|
fileName: string;
|
|
@@ -335,7 +335,7 @@ export type MoveSequenceKeyframe = {
|
|
|
335
335
|
key: string;
|
|
336
336
|
fromFrame: number;
|
|
337
337
|
toFrame: number;
|
|
338
|
-
schema:
|
|
338
|
+
schema: InteractivitySchema;
|
|
339
339
|
};
|
|
340
340
|
export type AddSequenceKeyframeRequest = {
|
|
341
341
|
fileName: string;
|
|
@@ -343,7 +343,7 @@ export type AddSequenceKeyframeRequest = {
|
|
|
343
343
|
key: string;
|
|
344
344
|
frame: number;
|
|
345
345
|
value: string;
|
|
346
|
-
schema:
|
|
346
|
+
schema: InteractivitySchema;
|
|
347
347
|
clientId: string;
|
|
348
348
|
};
|
|
349
349
|
export type AddSequenceKeyframeResponse = SaveSequencePropsResponse;
|
|
@@ -354,7 +354,7 @@ export type DeleteEffectKeyframe = {
|
|
|
354
354
|
effectIndex: number;
|
|
355
355
|
key: string;
|
|
356
356
|
frame: number;
|
|
357
|
-
schema:
|
|
357
|
+
schema: InteractivitySchema;
|
|
358
358
|
};
|
|
359
359
|
export type MoveEffectKeyframe = {
|
|
360
360
|
fileName: string;
|
|
@@ -363,7 +363,7 @@ export type MoveEffectKeyframe = {
|
|
|
363
363
|
key: string;
|
|
364
364
|
fromFrame: number;
|
|
365
365
|
toFrame: number;
|
|
366
|
-
schema:
|
|
366
|
+
schema: InteractivitySchema;
|
|
367
367
|
};
|
|
368
368
|
export type DeleteKeyframesRequest = {
|
|
369
369
|
sequenceKeyframes: DeleteSequenceKeyframe[];
|
|
@@ -388,7 +388,7 @@ export type AddEffectKeyframeRequest = {
|
|
|
388
388
|
key: string;
|
|
389
389
|
frame: number;
|
|
390
390
|
value: string;
|
|
391
|
-
schema:
|
|
391
|
+
schema: InteractivitySchema;
|
|
392
392
|
clientId: string;
|
|
393
393
|
};
|
|
394
394
|
export type AddEffectKeyframeResponse = SaveEffectPropsResponse;
|
|
@@ -418,7 +418,7 @@ export type UpdateSequenceKeyframeSettingsRequest = {
|
|
|
418
418
|
nodePath: SequencePropsSubscriptionKey;
|
|
419
419
|
key: string;
|
|
420
420
|
settings: KeyframeSettings;
|
|
421
|
-
schema:
|
|
421
|
+
schema: InteractivitySchema;
|
|
422
422
|
clientId: string;
|
|
423
423
|
};
|
|
424
424
|
export type UpdateSequenceKeyframeSettingsResponse = SaveSequencePropsResponse;
|
|
@@ -428,7 +428,7 @@ export type UpdateEffectKeyframeSettingsRequest = {
|
|
|
428
428
|
effectIndex: number;
|
|
429
429
|
key: string;
|
|
430
430
|
settings: KeyframeSettings;
|
|
431
|
-
schema:
|
|
431
|
+
schema: InteractivitySchema;
|
|
432
432
|
clientId: string;
|
|
433
433
|
};
|
|
434
434
|
export type UpdateEffectKeyframeSettingsResponse = SaveEffectPropsResponse;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { KeyframeEasing } from './keyframe-easing-presets';
|
|
2
|
+
export type EasingClipboardData = {
|
|
3
|
+
readonly type: 'easing';
|
|
4
|
+
readonly version: 1;
|
|
5
|
+
readonly remotionClipboard: 'easing';
|
|
6
|
+
readonly easing: KeyframeEasing;
|
|
7
|
+
};
|
|
8
|
+
export type EasingClipboardDataParseResult = {
|
|
9
|
+
readonly status: 'valid';
|
|
10
|
+
readonly data: EasingClipboardData;
|
|
11
|
+
} | {
|
|
12
|
+
readonly status: 'unsupported-version';
|
|
13
|
+
readonly version: unknown;
|
|
14
|
+
} | {
|
|
15
|
+
readonly status: 'invalid';
|
|
16
|
+
};
|
|
17
|
+
export declare const parseEasingClipboardDataResult: (value: string) => EasingClipboardDataParseResult;
|
|
18
|
+
export declare const parseEasingClipboardData: (value: string) => EasingClipboardData | null;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseEasingClipboardData = exports.parseEasingClipboardDataResult = void 0;
|
|
4
|
+
const isRecord = (value) => {
|
|
5
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
6
|
+
};
|
|
7
|
+
const isFiniteNumber = (value) => {
|
|
8
|
+
return typeof value === 'number' && Number.isFinite(value);
|
|
9
|
+
};
|
|
10
|
+
const isEasing = (value) => {
|
|
11
|
+
return (isRecord(value) &&
|
|
12
|
+
(value.type === 'linear' ||
|
|
13
|
+
(value.type === 'bezier' &&
|
|
14
|
+
isFiniteNumber(value.x1) &&
|
|
15
|
+
isFiniteNumber(value.y1) &&
|
|
16
|
+
isFiniteNumber(value.x2) &&
|
|
17
|
+
isFiniteNumber(value.y2)) ||
|
|
18
|
+
(value.type === 'spring' &&
|
|
19
|
+
isFiniteNumber(value.damping) &&
|
|
20
|
+
isFiniteNumber(value.mass) &&
|
|
21
|
+
isFiniteNumber(value.stiffness) &&
|
|
22
|
+
typeof value.overshootClamping === 'boolean')));
|
|
23
|
+
};
|
|
24
|
+
const parseEasingClipboardDataResult = (value) => {
|
|
25
|
+
try {
|
|
26
|
+
const parsed = JSON.parse(value);
|
|
27
|
+
if (!isRecord(parsed)) {
|
|
28
|
+
return { status: 'invalid' };
|
|
29
|
+
}
|
|
30
|
+
if (parsed.remotionClipboard !== 'easing') {
|
|
31
|
+
return { status: 'invalid' };
|
|
32
|
+
}
|
|
33
|
+
if (parsed.version !== 1) {
|
|
34
|
+
return {
|
|
35
|
+
status: 'unsupported-version',
|
|
36
|
+
version: parsed.version,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
if (parsed.type !== 'easing' || !isEasing(parsed.easing)) {
|
|
40
|
+
return { status: 'invalid' };
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
status: 'valid',
|
|
44
|
+
data: {
|
|
45
|
+
type: 'easing',
|
|
46
|
+
version: 1,
|
|
47
|
+
remotionClipboard: 'easing',
|
|
48
|
+
easing: parsed.easing,
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
catch (_a) {
|
|
53
|
+
return { status: 'invalid' };
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
exports.parseEasingClipboardDataResult = parseEasingClipboardDataResult;
|
|
57
|
+
const parseEasingClipboardData = (value) => {
|
|
58
|
+
const result = (0, exports.parseEasingClipboardDataResult)(value);
|
|
59
|
+
if (result.status !== 'valid') {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
return result.data;
|
|
63
|
+
};
|
|
64
|
+
exports.parseEasingClipboardData = parseEasingClipboardData;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { EffectDragData } from './effect-drag-data';
|
|
2
|
+
export type EffectCatalogItem = {
|
|
3
|
+
readonly id: string;
|
|
4
|
+
readonly category: string;
|
|
5
|
+
readonly label: string;
|
|
6
|
+
readonly description: string;
|
|
7
|
+
readonly effect: EffectDragData['effect'];
|
|
8
|
+
};
|
|
9
|
+
export type EffectCatalogCategory = {
|
|
10
|
+
readonly title: string;
|
|
11
|
+
readonly effects: readonly EffectCatalogItem[];
|
|
12
|
+
};
|
|
13
|
+
export declare const getEffectDocumentationPath: (item: EffectCatalogItem) => string;
|
|
14
|
+
export declare const getEffectDocumentationLink: (item: EffectCatalogItem) => string;
|
|
15
|
+
export declare const getEffectPreviewSource: (item: EffectCatalogItem) => string;
|
|
16
|
+
export declare const getEffectPreviewAlt: (item: EffectCatalogItem) => string;
|
|
17
|
+
export declare const makeEffectDragDataFromCatalogItem: (item: EffectCatalogItem) => EffectDragData;
|
|
18
|
+
export declare const getEffectCatalogCategories: (items: readonly EffectCatalogItem[]) => readonly EffectCatalogCategory[];
|
|
19
|
+
export declare const EFFECT_CATALOG: readonly EffectCatalogItem[];
|
|
@@ -0,0 +1,598 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EFFECT_CATALOG = exports.getEffectCatalogCategories = exports.makeEffectDragDataFromCatalogItem = exports.getEffectPreviewAlt = exports.getEffectPreviewSource = exports.getEffectDocumentationLink = exports.getEffectDocumentationPath = void 0;
|
|
4
|
+
const getEffectDocumentationPath = (item) => {
|
|
5
|
+
if (item.id === 'effects-light-leak') {
|
|
6
|
+
return '/docs/light-leaks/light-leak-effect';
|
|
7
|
+
}
|
|
8
|
+
if (item.id === 'effects-starburst') {
|
|
9
|
+
return '/docs/starburst/starburst-effect';
|
|
10
|
+
}
|
|
11
|
+
return `/docs/effects/${item.id.slice('effects-'.length)}`;
|
|
12
|
+
};
|
|
13
|
+
exports.getEffectDocumentationPath = getEffectDocumentationPath;
|
|
14
|
+
const getEffectDocumentationLink = (item) => {
|
|
15
|
+
return `https://www.remotion.dev${(0, exports.getEffectDocumentationPath)(item)}`;
|
|
16
|
+
};
|
|
17
|
+
exports.getEffectDocumentationLink = getEffectDocumentationLink;
|
|
18
|
+
const getEffectPreviewSource = (item) => {
|
|
19
|
+
return `/img/${item.id}-preview.png`;
|
|
20
|
+
};
|
|
21
|
+
exports.getEffectPreviewSource = getEffectPreviewSource;
|
|
22
|
+
const getEffectPreviewAlt = (item) => {
|
|
23
|
+
const effectName = item.id
|
|
24
|
+
.slice('effects-'.length)
|
|
25
|
+
.replaceAll('-', ' ')
|
|
26
|
+
.replace(/^uv /, 'UV ')
|
|
27
|
+
.replace(/^xy /, 'XY ')
|
|
28
|
+
.replace(/^tv /, 'TV ');
|
|
29
|
+
return `${effectName} effect preview`;
|
|
30
|
+
};
|
|
31
|
+
exports.getEffectPreviewAlt = getEffectPreviewAlt;
|
|
32
|
+
const makeEffectDragDataFromCatalogItem = (item) => {
|
|
33
|
+
return {
|
|
34
|
+
type: 'remotion-effect',
|
|
35
|
+
version: 1,
|
|
36
|
+
effect: item.effect,
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
exports.makeEffectDragDataFromCatalogItem = makeEffectDragDataFromCatalogItem;
|
|
40
|
+
const getEffectCatalogCategories = (items) => {
|
|
41
|
+
const categories = [];
|
|
42
|
+
for (const item of items) {
|
|
43
|
+
const last = categories[categories.length - 1];
|
|
44
|
+
if ((last === null || last === void 0 ? void 0 : last.title) === item.category) {
|
|
45
|
+
categories[categories.length - 1] = {
|
|
46
|
+
...last,
|
|
47
|
+
effects: [...last.effects, item],
|
|
48
|
+
};
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
categories.push({
|
|
52
|
+
title: item.category,
|
|
53
|
+
effects: [item],
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
return categories;
|
|
57
|
+
};
|
|
58
|
+
exports.getEffectCatalogCategories = getEffectCatalogCategories;
|
|
59
|
+
exports.EFFECT_CATALOG = [
|
|
60
|
+
{
|
|
61
|
+
id: 'effects-brightness',
|
|
62
|
+
category: 'Color',
|
|
63
|
+
label: 'brightness()',
|
|
64
|
+
description: 'Brightness adjustment effect',
|
|
65
|
+
effect: {
|
|
66
|
+
name: 'brightness',
|
|
67
|
+
importPath: '@remotion/effects/brightness',
|
|
68
|
+
config: {},
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
id: 'effects-contrast',
|
|
73
|
+
category: 'Color',
|
|
74
|
+
label: 'contrast()',
|
|
75
|
+
description: 'Contrast adjustment effect',
|
|
76
|
+
effect: {
|
|
77
|
+
name: 'contrast',
|
|
78
|
+
importPath: '@remotion/effects/contrast',
|
|
79
|
+
config: {},
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
id: 'effects-color-key',
|
|
84
|
+
category: 'Color',
|
|
85
|
+
label: 'colorKey()',
|
|
86
|
+
description: 'Remove a key color (greenscreen)',
|
|
87
|
+
effect: {
|
|
88
|
+
name: 'colorKey',
|
|
89
|
+
importPath: '@remotion/effects/color-key',
|
|
90
|
+
config: {
|
|
91
|
+
similarity: 0.45,
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
id: 'effects-duotone',
|
|
97
|
+
category: 'Color',
|
|
98
|
+
label: 'duotone()',
|
|
99
|
+
description: 'Two-color threshold effect',
|
|
100
|
+
effect: {
|
|
101
|
+
name: 'duotone',
|
|
102
|
+
importPath: '@remotion/effects/duotone',
|
|
103
|
+
config: {},
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
id: 'effects-grayscale',
|
|
108
|
+
category: 'Color',
|
|
109
|
+
label: 'grayscale()',
|
|
110
|
+
description: 'Black-and-white effect',
|
|
111
|
+
effect: {
|
|
112
|
+
name: 'grayscale',
|
|
113
|
+
importPath: '@remotion/effects/grayscale',
|
|
114
|
+
config: {},
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
id: 'effects-hue',
|
|
119
|
+
category: 'Color',
|
|
120
|
+
label: 'hue()',
|
|
121
|
+
description: 'Hue rotation effect',
|
|
122
|
+
effect: {
|
|
123
|
+
name: 'hue',
|
|
124
|
+
importPath: '@remotion/effects/hue',
|
|
125
|
+
config: {},
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
id: 'effects-invert',
|
|
130
|
+
category: 'Color',
|
|
131
|
+
label: 'invert()',
|
|
132
|
+
description: 'Negative color effect',
|
|
133
|
+
effect: {
|
|
134
|
+
name: 'invert',
|
|
135
|
+
importPath: '@remotion/effects/invert',
|
|
136
|
+
config: {},
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
id: 'effects-saturation',
|
|
141
|
+
category: 'Color',
|
|
142
|
+
label: 'saturation()',
|
|
143
|
+
description: 'Saturation adjustment effect',
|
|
144
|
+
effect: {
|
|
145
|
+
name: 'saturation',
|
|
146
|
+
importPath: '@remotion/effects/saturation',
|
|
147
|
+
config: {},
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
id: 'effects-tint',
|
|
152
|
+
category: 'Color',
|
|
153
|
+
label: 'tint()',
|
|
154
|
+
description: 'Color tint effect',
|
|
155
|
+
effect: {
|
|
156
|
+
name: 'tint',
|
|
157
|
+
importPath: '@remotion/effects/tint',
|
|
158
|
+
config: {
|
|
159
|
+
color: '#1ec8ff',
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
id: 'effects-thermal-vision',
|
|
165
|
+
category: 'Color',
|
|
166
|
+
label: 'thermalVision()',
|
|
167
|
+
description: 'Thermal heat-map color effect',
|
|
168
|
+
effect: {
|
|
169
|
+
name: 'thermalVision',
|
|
170
|
+
importPath: '@remotion/effects/thermal-vision',
|
|
171
|
+
config: {},
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
id: 'effects-blur',
|
|
176
|
+
category: 'Blur & Shadow',
|
|
177
|
+
label: 'blur()',
|
|
178
|
+
description: 'Gaussian blur effect',
|
|
179
|
+
effect: {
|
|
180
|
+
name: 'blur',
|
|
181
|
+
importPath: '@remotion/effects/blur',
|
|
182
|
+
config: {
|
|
183
|
+
radius: 40,
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
id: 'effects-linear-progressive-blur',
|
|
189
|
+
category: 'Blur & Shadow',
|
|
190
|
+
label: 'linearProgressiveBlur()',
|
|
191
|
+
description: 'Gradient-controlled blur effect',
|
|
192
|
+
effect: {
|
|
193
|
+
name: 'linearProgressiveBlur',
|
|
194
|
+
importPath: '@remotion/effects/linear-progressive-blur',
|
|
195
|
+
config: {},
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
id: 'effects-drop-shadow',
|
|
200
|
+
category: 'Blur & Shadow',
|
|
201
|
+
label: 'dropShadow()',
|
|
202
|
+
description: 'Blurred alpha shadow effect',
|
|
203
|
+
effect: {
|
|
204
|
+
name: 'dropShadow',
|
|
205
|
+
importPath: '@remotion/effects/drop-shadow',
|
|
206
|
+
config: {},
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
id: 'effects-glow',
|
|
211
|
+
category: 'Blur & Shadow',
|
|
212
|
+
label: 'glow()',
|
|
213
|
+
description: 'Soft halo effect',
|
|
214
|
+
effect: {
|
|
215
|
+
name: 'glow',
|
|
216
|
+
importPath: '@remotion/effects/glow',
|
|
217
|
+
config: {},
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
id: 'effects-evolve',
|
|
222
|
+
category: 'Reveal',
|
|
223
|
+
label: 'evolve()',
|
|
224
|
+
description: 'Directional reveal effect',
|
|
225
|
+
effect: {
|
|
226
|
+
name: 'evolve',
|
|
227
|
+
importPath: '@remotion/effects/evolve',
|
|
228
|
+
config: {},
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
id: 'effects-mirror',
|
|
233
|
+
category: 'Transform',
|
|
234
|
+
label: 'mirror()',
|
|
235
|
+
description: 'Mirror reflection effect',
|
|
236
|
+
effect: {
|
|
237
|
+
name: 'mirror',
|
|
238
|
+
importPath: '@remotion/effects/mirror',
|
|
239
|
+
config: {},
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
id: 'effects-scale',
|
|
244
|
+
category: 'Transform',
|
|
245
|
+
label: 'scale()',
|
|
246
|
+
description: 'Scale transform effect',
|
|
247
|
+
effect: {
|
|
248
|
+
name: 'scale',
|
|
249
|
+
importPath: '@remotion/effects/scale',
|
|
250
|
+
config: {
|
|
251
|
+
scale: 1,
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
id: 'effects-uv-translate',
|
|
257
|
+
category: 'Transform',
|
|
258
|
+
label: 'uvTranslate()',
|
|
259
|
+
description: 'UV-based translate effect',
|
|
260
|
+
effect: {
|
|
261
|
+
name: 'uvTranslate',
|
|
262
|
+
importPath: '@remotion/effects/translate',
|
|
263
|
+
config: {},
|
|
264
|
+
},
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
id: 'effects-xy-translate',
|
|
268
|
+
category: 'Transform',
|
|
269
|
+
label: 'xyTranslate()',
|
|
270
|
+
description: 'Pixel-based translate effect',
|
|
271
|
+
effect: {
|
|
272
|
+
name: 'xyTranslate',
|
|
273
|
+
importPath: '@remotion/effects/translate',
|
|
274
|
+
config: {},
|
|
275
|
+
},
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
id: 'effects-barrel-distortion',
|
|
279
|
+
category: 'Distort',
|
|
280
|
+
label: 'barrelDistortion()',
|
|
281
|
+
description: 'Barrel distortion effect',
|
|
282
|
+
effect: {
|
|
283
|
+
name: 'barrelDistortion',
|
|
284
|
+
importPath: '@remotion/effects/barrel-distortion',
|
|
285
|
+
config: {},
|
|
286
|
+
},
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
id: 'effects-chromatic-aberration',
|
|
290
|
+
category: 'Distort',
|
|
291
|
+
label: 'chromaticAberration()',
|
|
292
|
+
description: 'RGB channel split effect',
|
|
293
|
+
effect: {
|
|
294
|
+
name: 'chromaticAberration',
|
|
295
|
+
importPath: '@remotion/effects/chromatic-aberration',
|
|
296
|
+
config: {},
|
|
297
|
+
},
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
id: 'effects-fisheye',
|
|
301
|
+
category: 'Distort',
|
|
302
|
+
label: 'fisheye()',
|
|
303
|
+
description: 'Ultra-wide-angle lens effect',
|
|
304
|
+
effect: {
|
|
305
|
+
name: 'fisheye',
|
|
306
|
+
importPath: '@remotion/effects/fisheye',
|
|
307
|
+
config: {},
|
|
308
|
+
},
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
id: 'effects-wave',
|
|
312
|
+
category: 'Distort',
|
|
313
|
+
label: 'wave()',
|
|
314
|
+
description: 'Sine wave distortion',
|
|
315
|
+
effect: {
|
|
316
|
+
name: 'wave',
|
|
317
|
+
importPath: '@remotion/effects/wave',
|
|
318
|
+
config: {},
|
|
319
|
+
},
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
id: 'effects-burlap',
|
|
323
|
+
category: 'Stylize',
|
|
324
|
+
label: 'burlap()',
|
|
325
|
+
description: 'Procedural woven texture effect',
|
|
326
|
+
effect: {
|
|
327
|
+
name: 'burlap',
|
|
328
|
+
importPath: '@remotion/effects/burlap',
|
|
329
|
+
config: {},
|
|
330
|
+
},
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
id: 'effects-dot-grid',
|
|
334
|
+
category: 'Stylize',
|
|
335
|
+
label: 'dotGrid()',
|
|
336
|
+
description: 'Source-color dot mask effect',
|
|
337
|
+
effect: {
|
|
338
|
+
name: 'dotGrid',
|
|
339
|
+
importPath: '@remotion/effects/dot-grid',
|
|
340
|
+
config: {},
|
|
341
|
+
},
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
id: 'effects-halftone',
|
|
345
|
+
category: 'Stylize',
|
|
346
|
+
label: 'halftone()',
|
|
347
|
+
description: 'Source-image halftone effect',
|
|
348
|
+
effect: {
|
|
349
|
+
name: 'halftone',
|
|
350
|
+
importPath: '@remotion/effects/halftone',
|
|
351
|
+
config: {},
|
|
352
|
+
},
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
id: 'effects-noise',
|
|
356
|
+
category: 'Stylize',
|
|
357
|
+
label: 'noise()',
|
|
358
|
+
description: 'Procedural grain effect',
|
|
359
|
+
effect: {
|
|
360
|
+
name: 'noise',
|
|
361
|
+
importPath: '@remotion/effects/noise',
|
|
362
|
+
config: {},
|
|
363
|
+
},
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
id: 'effects-noise-displacement',
|
|
367
|
+
category: 'Stylize',
|
|
368
|
+
label: 'noiseDisplacement()',
|
|
369
|
+
description: 'Localized noisy displacement',
|
|
370
|
+
effect: {
|
|
371
|
+
name: 'noiseDisplacement',
|
|
372
|
+
importPath: '@remotion/effects/noise-displacement',
|
|
373
|
+
config: {
|
|
374
|
+
center: [0.6124309308853857, 0.5010527449123625],
|
|
375
|
+
radius: 0.41,
|
|
376
|
+
strength: 15.5,
|
|
377
|
+
seed: 78,
|
|
378
|
+
grainSize: 0.9,
|
|
379
|
+
passes: 12,
|
|
380
|
+
blur: 0,
|
|
381
|
+
feather: 1,
|
|
382
|
+
biasDirection: 313,
|
|
383
|
+
biasAmount: 1,
|
|
384
|
+
},
|
|
385
|
+
},
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
id: 'effects-pattern',
|
|
389
|
+
category: 'Stylize',
|
|
390
|
+
label: 'pattern()',
|
|
391
|
+
description: 'Repeated source tile effect',
|
|
392
|
+
effect: {
|
|
393
|
+
name: 'pattern',
|
|
394
|
+
importPath: '@remotion/effects/pattern',
|
|
395
|
+
config: {},
|
|
396
|
+
},
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
id: 'effects-pixel-dissolve',
|
|
400
|
+
category: 'Stylize',
|
|
401
|
+
label: 'pixelDissolve()',
|
|
402
|
+
description: 'Pixelated dissolve effect',
|
|
403
|
+
effect: {
|
|
404
|
+
name: 'pixelDissolve',
|
|
405
|
+
importPath: '@remotion/effects/pixel-dissolve',
|
|
406
|
+
config: {},
|
|
407
|
+
},
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
id: 'effects-pixelate',
|
|
411
|
+
category: 'Stylize',
|
|
412
|
+
label: 'pixelate()',
|
|
413
|
+
description: 'Pixelation effect',
|
|
414
|
+
effect: {
|
|
415
|
+
name: 'pixelate',
|
|
416
|
+
importPath: '@remotion/effects/pixelate',
|
|
417
|
+
config: {
|
|
418
|
+
blockSize: 20,
|
|
419
|
+
},
|
|
420
|
+
},
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
id: 'effects-scanlines',
|
|
424
|
+
category: 'Stylize',
|
|
425
|
+
label: 'scanlines()',
|
|
426
|
+
description: 'Additive horizontal scanlines',
|
|
427
|
+
effect: {
|
|
428
|
+
name: 'scanlines',
|
|
429
|
+
importPath: '@remotion/effects/scanlines',
|
|
430
|
+
config: {},
|
|
431
|
+
},
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
id: 'effects-speckle',
|
|
435
|
+
category: 'Stylize',
|
|
436
|
+
label: 'speckle()',
|
|
437
|
+
description: 'Random alpha-hole effect',
|
|
438
|
+
effect: {
|
|
439
|
+
name: 'speckle',
|
|
440
|
+
importPath: '@remotion/effects/speckle',
|
|
441
|
+
config: {},
|
|
442
|
+
},
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
id: 'effects-shine',
|
|
446
|
+
category: 'Stylize',
|
|
447
|
+
label: 'shine()',
|
|
448
|
+
description: 'Glossy light sweep effect',
|
|
449
|
+
effect: {
|
|
450
|
+
name: 'shine',
|
|
451
|
+
importPath: '@remotion/effects/shine',
|
|
452
|
+
config: {},
|
|
453
|
+
},
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
id: 'effects-shrinkwrap',
|
|
457
|
+
category: 'Stylize',
|
|
458
|
+
label: 'shrinkwrap()',
|
|
459
|
+
description: 'Procedural plastic wrap effect',
|
|
460
|
+
effect: {
|
|
461
|
+
name: 'shrinkwrap',
|
|
462
|
+
importPath: '@remotion/effects/shrinkwrap',
|
|
463
|
+
config: {
|
|
464
|
+
amount: 0.94,
|
|
465
|
+
displacement: 13.5,
|
|
466
|
+
highlightIntensity: 1.54,
|
|
467
|
+
wrinkleDensity: 0.87,
|
|
468
|
+
edgeTension: 0.58,
|
|
469
|
+
phase: 0,
|
|
470
|
+
seed: 12,
|
|
471
|
+
},
|
|
472
|
+
},
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
id: 'effects-vignette',
|
|
476
|
+
category: 'Stylize',
|
|
477
|
+
label: 'vignette()',
|
|
478
|
+
description: 'Edge darkening or transparency effect',
|
|
479
|
+
effect: {
|
|
480
|
+
name: 'vignette',
|
|
481
|
+
importPath: '@remotion/effects/vignette',
|
|
482
|
+
config: {},
|
|
483
|
+
},
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
id: 'effects-contour-lines',
|
|
487
|
+
category: 'Generate',
|
|
488
|
+
label: 'contourLines()',
|
|
489
|
+
description: 'Topographic line overlay effect',
|
|
490
|
+
effect: {
|
|
491
|
+
name: 'contourLines',
|
|
492
|
+
importPath: '@remotion/effects/contour-lines',
|
|
493
|
+
config: {},
|
|
494
|
+
},
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
id: 'effects-halftone-linear-gradient',
|
|
498
|
+
category: 'Generate',
|
|
499
|
+
label: 'halftoneLinearGradient()',
|
|
500
|
+
description: 'Procedural dot gradient effect',
|
|
501
|
+
effect: {
|
|
502
|
+
name: 'halftoneLinearGradient',
|
|
503
|
+
importPath: '@remotion/effects/halftone-linear-gradient',
|
|
504
|
+
config: {},
|
|
505
|
+
},
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
id: 'effects-white-noise',
|
|
509
|
+
category: 'Generate',
|
|
510
|
+
label: 'whiteNoise()',
|
|
511
|
+
description: 'Random grayscale noise layer',
|
|
512
|
+
effect: {
|
|
513
|
+
name: 'whiteNoise',
|
|
514
|
+
importPath: '@remotion/effects/white-noise',
|
|
515
|
+
config: {},
|
|
516
|
+
},
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
id: 'effects-tv-signal-off',
|
|
520
|
+
category: 'Generate',
|
|
521
|
+
label: 'tvSignalOff()',
|
|
522
|
+
description: 'TV color bars test pattern',
|
|
523
|
+
effect: {
|
|
524
|
+
name: 'tvSignalOff',
|
|
525
|
+
importPath: '@remotion/effects/tv-signal-off',
|
|
526
|
+
config: {},
|
|
527
|
+
},
|
|
528
|
+
},
|
|
529
|
+
{
|
|
530
|
+
id: 'effects-lines',
|
|
531
|
+
category: 'Generate',
|
|
532
|
+
label: 'lines()',
|
|
533
|
+
description: 'Alternating line pattern effect',
|
|
534
|
+
effect: {
|
|
535
|
+
name: 'lines',
|
|
536
|
+
importPath: '@remotion/effects/lines',
|
|
537
|
+
config: {},
|
|
538
|
+
},
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
id: 'effects-rings',
|
|
542
|
+
category: 'Generate',
|
|
543
|
+
label: 'rings()',
|
|
544
|
+
description: 'Concentric ring pattern effect',
|
|
545
|
+
effect: {
|
|
546
|
+
name: 'rings',
|
|
547
|
+
importPath: '@remotion/effects/rings',
|
|
548
|
+
config: {},
|
|
549
|
+
},
|
|
550
|
+
},
|
|
551
|
+
{
|
|
552
|
+
id: 'effects-waves',
|
|
553
|
+
category: 'Generate',
|
|
554
|
+
label: 'waves()',
|
|
555
|
+
description: 'Wavy band pattern effect',
|
|
556
|
+
effect: {
|
|
557
|
+
name: 'waves',
|
|
558
|
+
importPath: '@remotion/effects/waves',
|
|
559
|
+
config: {},
|
|
560
|
+
},
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
id: 'effects-zigzag',
|
|
564
|
+
category: 'Generate',
|
|
565
|
+
label: 'zigzag()',
|
|
566
|
+
description: 'Zig-zag band pattern effect',
|
|
567
|
+
effect: {
|
|
568
|
+
name: 'zigzag',
|
|
569
|
+
importPath: '@remotion/effects/zigzag',
|
|
570
|
+
config: {},
|
|
571
|
+
},
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
id: 'effects-light-leak',
|
|
575
|
+
category: 'Generate',
|
|
576
|
+
label: 'lightLeak()',
|
|
577
|
+
description: 'Light leak overlay effect',
|
|
578
|
+
effect: {
|
|
579
|
+
name: 'lightLeak',
|
|
580
|
+
importPath: '@remotion/light-leaks',
|
|
581
|
+
config: {},
|
|
582
|
+
},
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
id: 'effects-starburst',
|
|
586
|
+
category: 'Generate',
|
|
587
|
+
label: 'starburst()',
|
|
588
|
+
description: 'Starburst ray effect',
|
|
589
|
+
effect: {
|
|
590
|
+
name: 'starburst',
|
|
591
|
+
importPath: '@remotion/starburst',
|
|
592
|
+
config: {
|
|
593
|
+
rays: 16,
|
|
594
|
+
colors: ['#ff6600', '#ffff00'],
|
|
595
|
+
},
|
|
596
|
+
},
|
|
597
|
+
},
|
|
598
|
+
];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { KeyframeEasing } from './keyframe-easing-presets';
|
|
1
2
|
import { type KeyframeInterpolationFunction } from './keyframe-interpolation-function';
|
|
2
3
|
export type EffectClipboardPasteType = 'effects-additive' | 'effects-replacing';
|
|
3
4
|
export type EffectClipboardStaticParam = {
|
|
@@ -9,7 +10,7 @@ export type EffectClipboardKeyframe = {
|
|
|
9
10
|
readonly frame: number;
|
|
10
11
|
readonly value: unknown;
|
|
11
12
|
};
|
|
12
|
-
export type EffectClipboardEasing =
|
|
13
|
+
export type EffectClipboardEasing = KeyframeEasing;
|
|
13
14
|
export type EffectClipboardExtrapolateType = 'extend' | 'identity' | 'clamp' | 'wrap';
|
|
14
15
|
export type EffectClipboardClamping = {
|
|
15
16
|
readonly left: EffectClipboardExtrapolateType;
|
|
@@ -10,10 +10,18 @@ const isFiniteNumber = (value) => {
|
|
|
10
10
|
return typeof value === 'number' && Number.isFinite(value);
|
|
11
11
|
};
|
|
12
12
|
const isEasing = (value) => {
|
|
13
|
-
return (value
|
|
14
|
-
(
|
|
15
|
-
value.
|
|
16
|
-
|
|
13
|
+
return (isRecord(value) &&
|
|
14
|
+
(value.type === 'linear' ||
|
|
15
|
+
(value.type === 'bezier' &&
|
|
16
|
+
isFiniteNumber(value.x1) &&
|
|
17
|
+
isFiniteNumber(value.y1) &&
|
|
18
|
+
isFiniteNumber(value.x2) &&
|
|
19
|
+
isFiniteNumber(value.y2)) ||
|
|
20
|
+
(value.type === 'spring' &&
|
|
21
|
+
isFiniteNumber(value.damping) &&
|
|
22
|
+
isFiniteNumber(value.mass) &&
|
|
23
|
+
isFiniteNumber(value.stiffness) &&
|
|
24
|
+
typeof value.overshootClamping === 'boolean')));
|
|
17
25
|
};
|
|
18
26
|
const isKeyframe = (value) => {
|
|
19
27
|
return isRecord(value) && isFiniteNumber(value.frame) && 'value' in value;
|
package/dist/get-all-keys.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const getAllSchemaKeys: (schema:
|
|
1
|
+
import type { InteractivitySchema } from 'remotion';
|
|
2
|
+
export declare const getAllSchemaKeys: (schema: InteractivitySchema) => string[];
|
package/dist/index.d.ts
CHANGED
|
@@ -4,10 +4,12 @@ export { ASSET_DRAG_MIME_TYPE, makeAssetDragData, parseAssetDragData, type Asset
|
|
|
4
4
|
export type { ApplyVisualControlCodemod, RecastCodemod } from './codemods';
|
|
5
5
|
export { COMPONENT_DRAG_MIME_TYPE, areComponentProps, isComponentIdentifier, isComponentImportPath, makeComponentDragData, parseComponentDragData, type ComponentDimensions, type ComponentDragData, type ComponentProp, } from './component-drag-data';
|
|
6
6
|
export { DEFAULT_BUFFER_STATE_DELAY_IN_MILLISECONDS } from './default-buffer-state-delay-in-milliseconds';
|
|
7
|
-
export { KEYFRAME_EASING_PRESETS, type KeyframeEasingPreset, } from './keyframe-easing-presets';
|
|
7
|
+
export { KEYFRAME_EASING_PRESETS, LINEAR_KEYFRAME_EASING, type KeyframeEasing, type KeyframeEasingPreset, } from './keyframe-easing-presets';
|
|
8
8
|
export { detectFileType, isImageFileType, type FileDimensions, type FileType, type ImageFileType, } from './detect-file-type';
|
|
9
|
+
export { parseEasingClipboardData, parseEasingClipboardDataResult, type EasingClipboardData, type EasingClipboardDataParseResult, } from './easing-clipboard-data';
|
|
9
10
|
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';
|
|
10
11
|
export { EFFECT_DRAG_MIME_TYPE, parseEffectDragData, type EffectDragData, } from './effect-drag-data';
|
|
12
|
+
export { EFFECT_CATALOG, getEffectCatalogCategories, getEffectDocumentationLink, getEffectDocumentationPath, getEffectPreviewAlt, getEffectPreviewSource, makeEffectDragDataFromCatalogItem, type EffectCatalogCategory, type EffectCatalogItem, } from './effect-catalog';
|
|
11
13
|
export { EventSourceEvent } from './event-source-event';
|
|
12
14
|
export { formatBytes } from './format-bytes';
|
|
13
15
|
export { getAllSchemaKeys } from './get-all-keys';
|
|
@@ -16,7 +18,8 @@ export { ErrorLocation, getLocationFromBuildError, } from './get-location-from-b
|
|
|
16
18
|
export { getProjectName } from './get-project-name';
|
|
17
19
|
export type { GitSource } from './git-source';
|
|
18
20
|
export { HotMiddlewareMessage, HotMiddlewareOptions, ModuleMap, hotMiddlewareOptions, } from './hot-middleware';
|
|
19
|
-
export { getKeyframeInterpolationFunction, getKeyframeInterpolationFunctionForSchemaField, isKeyframeInterpolationFunction, isSchemaFieldKeyframable,
|
|
21
|
+
export { getKeyframeInterpolationFunction, getKeyframeInterpolationFunctionForSchemaField, isKeyframeInterpolationFunction, isSchemaFieldKeyframable, isInteractivitySchemaFieldKeyframable, keyframeInterpolationFunctions, type KeyframeInterpolationFunction, } from './keyframe-interpolation-function';
|
|
22
|
+
export { DEFAULT_SPRING_EASING, parseSpringEasingConfig, type SpringKeyframeEasing, } from './parse-spring-easing-config';
|
|
20
23
|
export { DEFAULT_TIMELINE_TRACKS } from './max-timeline-tracks';
|
|
21
24
|
export { Pkgs, apiDocs, descriptions, extraPackages, installableMap, packages, type ExtraPackage, } from './package-info';
|
|
22
25
|
export { PackageManager } from './package-manager';
|
|
@@ -26,7 +29,7 @@ export { AggregateRenderProgress, ArtifactProgress, BrowserDownloadState, Browse
|
|
|
26
29
|
export type { CompletedClientRender } from './render-job';
|
|
27
30
|
export { getRequiredPackageForEffectImportPath, getRequiredPackageForInsertableElement, } from './required-package';
|
|
28
31
|
export { SCHEMA_FIELD_ROW_HEIGHT, getEffectFieldsToShow, getFieldsToShow, } from './schema-field-info';
|
|
29
|
-
export type { AnySchemaFieldInfo, DragOverrides, EffectSchemaFieldInfo, PropStatuses, SchemaFieldInfo, SequenceControls,
|
|
32
|
+
export type { AnySchemaFieldInfo, DragOverrides, EffectSchemaFieldInfo, PropStatuses, SchemaFieldInfo, SequenceControls, InteractivitySchemaFieldInfo, } from './schema-field-info';
|
|
30
33
|
export { SFX_DRAG_MIME_TYPE, parseSfxDragData, type SfxDragData, } from './sfx-drag-data';
|
|
31
34
|
export { ScriptLine, SomeStackFrame, StackFrame, SymbolicatedStackFrame, } from './stack-types';
|
|
32
35
|
export { EnumPath, stringifyDefaultProps } from './stringify-default-props';
|
package/dist/index.js
CHANGED
|
@@ -14,8 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
18
|
-
exports.isUrl = exports.stringifySequenceSubscriptionKey = exports.stringifySequenceExpandedRowKey = exports.optimisticUpdateSequenceKeyframeSettings = exports.optimisticUpdateEffectKeyframeSettings = exports.optimisticUpdateForPropStatuses = exports.optimisticUpdateForEffectPropStatuses = exports.optimisticMoveSequenceKeyframes = exports.optimisticMoveEffectKeyframes = exports.moveKeyframesInPropStatus = exports.canMoveKeyframesWithoutCollisions = exports.optimisticDeleteSequenceKeyframes = exports.optimisticDeleteSequenceKeyframe = exports.optimisticDeleteEffectKeyframes = void 0;
|
|
17
|
+
exports.installableMap = exports.extraPackages = exports.descriptions = exports.apiDocs = exports.DEFAULT_TIMELINE_TRACKS = exports.parseSpringEasingConfig = exports.DEFAULT_SPRING_EASING = exports.keyframeInterpolationFunctions = exports.isInteractivitySchemaFieldKeyframable = exports.isSchemaFieldKeyframable = exports.isKeyframeInterpolationFunction = exports.getKeyframeInterpolationFunctionForSchemaField = exports.getKeyframeInterpolationFunction = exports.hotMiddlewareOptions = exports.getProjectName = exports.getLocationFromBuildError = exports.getDefaultOutLocation = exports.getAllSchemaKeys = exports.formatBytes = exports.makeEffectDragDataFromCatalogItem = exports.getEffectPreviewSource = exports.getEffectPreviewAlt = exports.getEffectDocumentationPath = exports.getEffectDocumentationLink = exports.getEffectCatalogCategories = exports.EFFECT_CATALOG = exports.parseEffectDragData = exports.EFFECT_DRAG_MIME_TYPE = exports.parseEffectPropClipboardDataResult = exports.parseEffectPropClipboardData = exports.parseEffectClipboardDataResult = exports.parseEffectClipboardData = exports.parseEasingClipboardDataResult = exports.parseEasingClipboardData = exports.isImageFileType = exports.detectFileType = exports.LINEAR_KEYFRAME_EASING = exports.KEYFRAME_EASING_PRESETS = 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.moveKeyframesInPropStatus = exports.canMoveKeyframesWithoutCollisions = exports.optimisticDeleteSequenceKeyframes = exports.optimisticDeleteSequenceKeyframe = 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 = void 0;
|
|
19
19
|
const ansi_1 = require("./ansi");
|
|
20
20
|
Object.defineProperty(exports, "splitAnsi", { enumerable: true, get: function () { return ansi_1.splitAnsi; } });
|
|
21
21
|
Object.defineProperty(exports, "stripAnsi", { enumerable: true, get: function () { return ansi_1.stripAnsi; } });
|
|
@@ -35,9 +35,13 @@ const default_buffer_state_delay_in_milliseconds_1 = require("./default-buffer-s
|
|
|
35
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
36
|
const keyframe_easing_presets_1 = require("./keyframe-easing-presets");
|
|
37
37
|
Object.defineProperty(exports, "KEYFRAME_EASING_PRESETS", { enumerable: true, get: function () { return keyframe_easing_presets_1.KEYFRAME_EASING_PRESETS; } });
|
|
38
|
+
Object.defineProperty(exports, "LINEAR_KEYFRAME_EASING", { enumerable: true, get: function () { return keyframe_easing_presets_1.LINEAR_KEYFRAME_EASING; } });
|
|
38
39
|
const detect_file_type_1 = require("./detect-file-type");
|
|
39
40
|
Object.defineProperty(exports, "detectFileType", { enumerable: true, get: function () { return detect_file_type_1.detectFileType; } });
|
|
40
41
|
Object.defineProperty(exports, "isImageFileType", { enumerable: true, get: function () { return detect_file_type_1.isImageFileType; } });
|
|
42
|
+
const easing_clipboard_data_1 = require("./easing-clipboard-data");
|
|
43
|
+
Object.defineProperty(exports, "parseEasingClipboardData", { enumerable: true, get: function () { return easing_clipboard_data_1.parseEasingClipboardData; } });
|
|
44
|
+
Object.defineProperty(exports, "parseEasingClipboardDataResult", { enumerable: true, get: function () { return easing_clipboard_data_1.parseEasingClipboardDataResult; } });
|
|
41
45
|
const effect_clipboard_data_1 = require("./effect-clipboard-data");
|
|
42
46
|
Object.defineProperty(exports, "parseEffectClipboardData", { enumerable: true, get: function () { return effect_clipboard_data_1.parseEffectClipboardData; } });
|
|
43
47
|
Object.defineProperty(exports, "parseEffectClipboardDataResult", { enumerable: true, get: function () { return effect_clipboard_data_1.parseEffectClipboardDataResult; } });
|
|
@@ -46,6 +50,14 @@ Object.defineProperty(exports, "parseEffectPropClipboardDataResult", { enumerabl
|
|
|
46
50
|
const effect_drag_data_1 = require("./effect-drag-data");
|
|
47
51
|
Object.defineProperty(exports, "EFFECT_DRAG_MIME_TYPE", { enumerable: true, get: function () { return effect_drag_data_1.EFFECT_DRAG_MIME_TYPE; } });
|
|
48
52
|
Object.defineProperty(exports, "parseEffectDragData", { enumerable: true, get: function () { return effect_drag_data_1.parseEffectDragData; } });
|
|
53
|
+
const effect_catalog_1 = require("./effect-catalog");
|
|
54
|
+
Object.defineProperty(exports, "EFFECT_CATALOG", { enumerable: true, get: function () { return effect_catalog_1.EFFECT_CATALOG; } });
|
|
55
|
+
Object.defineProperty(exports, "getEffectCatalogCategories", { enumerable: true, get: function () { return effect_catalog_1.getEffectCatalogCategories; } });
|
|
56
|
+
Object.defineProperty(exports, "getEffectDocumentationLink", { enumerable: true, get: function () { return effect_catalog_1.getEffectDocumentationLink; } });
|
|
57
|
+
Object.defineProperty(exports, "getEffectDocumentationPath", { enumerable: true, get: function () { return effect_catalog_1.getEffectDocumentationPath; } });
|
|
58
|
+
Object.defineProperty(exports, "getEffectPreviewAlt", { enumerable: true, get: function () { return effect_catalog_1.getEffectPreviewAlt; } });
|
|
59
|
+
Object.defineProperty(exports, "getEffectPreviewSource", { enumerable: true, get: function () { return effect_catalog_1.getEffectPreviewSource; } });
|
|
60
|
+
Object.defineProperty(exports, "makeEffectDragDataFromCatalogItem", { enumerable: true, get: function () { return effect_catalog_1.makeEffectDragDataFromCatalogItem; } });
|
|
49
61
|
const format_bytes_1 = require("./format-bytes");
|
|
50
62
|
Object.defineProperty(exports, "formatBytes", { enumerable: true, get: function () { return format_bytes_1.formatBytes; } });
|
|
51
63
|
const get_all_keys_1 = require("./get-all-keys");
|
|
@@ -63,8 +75,11 @@ Object.defineProperty(exports, "getKeyframeInterpolationFunction", { enumerable:
|
|
|
63
75
|
Object.defineProperty(exports, "getKeyframeInterpolationFunctionForSchemaField", { enumerable: true, get: function () { return keyframe_interpolation_function_1.getKeyframeInterpolationFunctionForSchemaField; } });
|
|
64
76
|
Object.defineProperty(exports, "isKeyframeInterpolationFunction", { enumerable: true, get: function () { return keyframe_interpolation_function_1.isKeyframeInterpolationFunction; } });
|
|
65
77
|
Object.defineProperty(exports, "isSchemaFieldKeyframable", { enumerable: true, get: function () { return keyframe_interpolation_function_1.isSchemaFieldKeyframable; } });
|
|
66
|
-
Object.defineProperty(exports, "
|
|
78
|
+
Object.defineProperty(exports, "isInteractivitySchemaFieldKeyframable", { enumerable: true, get: function () { return keyframe_interpolation_function_1.isInteractivitySchemaFieldKeyframable; } });
|
|
67
79
|
Object.defineProperty(exports, "keyframeInterpolationFunctions", { enumerable: true, get: function () { return keyframe_interpolation_function_1.keyframeInterpolationFunctions; } });
|
|
80
|
+
const parse_spring_easing_config_1 = require("./parse-spring-easing-config");
|
|
81
|
+
Object.defineProperty(exports, "DEFAULT_SPRING_EASING", { enumerable: true, get: function () { return parse_spring_easing_config_1.DEFAULT_SPRING_EASING; } });
|
|
82
|
+
Object.defineProperty(exports, "parseSpringEasingConfig", { enumerable: true, get: function () { return parse_spring_easing_config_1.parseSpringEasingConfig; } });
|
|
68
83
|
const max_timeline_tracks_1 = require("./max-timeline-tracks");
|
|
69
84
|
Object.defineProperty(exports, "DEFAULT_TIMELINE_TRACKS", { enumerable: true, get: function () { return max_timeline_tracks_1.DEFAULT_TIMELINE_TRACKS; } });
|
|
70
85
|
const package_info_1 = require("./package-info");
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import type { CanUpdateSequencePropStatusEasing } from 'remotion';
|
|
2
|
+
export type KeyframeEasing = CanUpdateSequencePropStatusEasing;
|
|
2
3
|
export type KeyframeEasingPreset = {
|
|
3
|
-
readonly id: 'ease-in' | 'ease-out' | 'ease-in-out';
|
|
4
|
+
readonly id: 'ease-in' | 'ease-out' | 'ease-in-out' | 'spring' | 'bouncy-spring';
|
|
4
5
|
readonly label: string;
|
|
5
6
|
readonly easing: KeyframeEasing;
|
|
6
7
|
};
|
|
8
|
+
export declare const LINEAR_KEYFRAME_EASING: KeyframeEasing;
|
|
7
9
|
export declare const KEYFRAME_EASING_PRESETS: KeyframeEasingPreset[];
|
|
@@ -1,8 +1,43 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.KEYFRAME_EASING_PRESETS = void 0;
|
|
3
|
+
exports.KEYFRAME_EASING_PRESETS = exports.LINEAR_KEYFRAME_EASING = void 0;
|
|
4
|
+
exports.LINEAR_KEYFRAME_EASING = { type: 'linear' };
|
|
4
5
|
exports.KEYFRAME_EASING_PRESETS = [
|
|
5
|
-
{
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
{
|
|
7
|
+
id: 'ease-in',
|
|
8
|
+
label: 'Ease in',
|
|
9
|
+
easing: { type: 'bezier', x1: 0.42, y1: 0, x2: 1, y2: 1 },
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
id: 'ease-out',
|
|
13
|
+
label: 'Ease out',
|
|
14
|
+
easing: { type: 'bezier', x1: 0, y1: 0, x2: 0.58, y2: 1 },
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
id: 'ease-in-out',
|
|
18
|
+
label: 'Ease in-out',
|
|
19
|
+
easing: { type: 'bezier', x1: 0.42, y1: 0, x2: 0.58, y2: 1 },
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: 'spring',
|
|
23
|
+
label: 'Spring',
|
|
24
|
+
easing: {
|
|
25
|
+
type: 'spring',
|
|
26
|
+
damping: 10,
|
|
27
|
+
mass: 1,
|
|
28
|
+
overshootClamping: false,
|
|
29
|
+
stiffness: 100,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
id: 'bouncy-spring',
|
|
34
|
+
label: 'Bouncy spring',
|
|
35
|
+
easing: {
|
|
36
|
+
type: 'spring',
|
|
37
|
+
damping: 5,
|
|
38
|
+
mass: 1,
|
|
39
|
+
overshootClamping: false,
|
|
40
|
+
stiffness: 120,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
8
43
|
];
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { InteractivitySchemaField, InteractivitySchema } from 'remotion';
|
|
2
2
|
export declare const keyframeInterpolationFunctions: readonly ["interpolate", "interpolateColors"];
|
|
3
3
|
export type KeyframeInterpolationFunction = (typeof keyframeInterpolationFunctions)[number];
|
|
4
4
|
export declare const isKeyframeInterpolationFunction: (name: string) => name is "interpolate" | "interpolateColors";
|
|
5
|
-
export declare const
|
|
5
|
+
export declare const isInteractivitySchemaFieldKeyframable: (field: InteractivitySchemaField | undefined) => boolean;
|
|
6
6
|
export declare const isSchemaFieldKeyframable: ({ schema, key, }: {
|
|
7
|
-
schema:
|
|
7
|
+
schema: InteractivitySchema | null;
|
|
8
8
|
key: string;
|
|
9
9
|
}) => boolean;
|
|
10
10
|
export declare const getKeyframeInterpolationFunctionForSchemaField: ({ schema, key, }: {
|
|
11
|
-
schema:
|
|
11
|
+
schema: InteractivitySchema | null;
|
|
12
12
|
key: string;
|
|
13
13
|
}) => "interpolate" | "interpolateColors" | null;
|
|
14
14
|
export declare const getKeyframeInterpolationFunction: ({ schema, key, staticValue, newValue, }: {
|
|
15
|
-
schema:
|
|
15
|
+
schema: InteractivitySchema | null;
|
|
16
16
|
key: string;
|
|
17
17
|
staticValue: unknown;
|
|
18
18
|
newValue: unknown;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getKeyframeInterpolationFunction = exports.getKeyframeInterpolationFunctionForSchemaField = exports.isSchemaFieldKeyframable = exports.
|
|
3
|
+
exports.getKeyframeInterpolationFunction = exports.getKeyframeInterpolationFunctionForSchemaField = exports.isSchemaFieldKeyframable = exports.isInteractivitySchemaFieldKeyframable = exports.isKeyframeInterpolationFunction = exports.keyframeInterpolationFunctions = void 0;
|
|
4
4
|
exports.keyframeInterpolationFunctions = [
|
|
5
5
|
'interpolate',
|
|
6
6
|
'interpolateColors',
|
|
@@ -9,7 +9,7 @@ const isKeyframeInterpolationFunction = (name) => {
|
|
|
9
9
|
return exports.keyframeInterpolationFunctions.includes(name);
|
|
10
10
|
};
|
|
11
11
|
exports.isKeyframeInterpolationFunction = isKeyframeInterpolationFunction;
|
|
12
|
-
const
|
|
12
|
+
const isInteractivitySchemaFieldKeyframable = (field) => {
|
|
13
13
|
if (!field) {
|
|
14
14
|
return true;
|
|
15
15
|
}
|
|
@@ -18,7 +18,7 @@ const isSequenceFieldSchemaKeyframable = (field) => {
|
|
|
18
18
|
}
|
|
19
19
|
return field.keyframable !== false;
|
|
20
20
|
};
|
|
21
|
-
exports.
|
|
21
|
+
exports.isInteractivitySchemaFieldKeyframable = isInteractivitySchemaFieldKeyframable;
|
|
22
22
|
const findFieldInSchema = (schema, key) => {
|
|
23
23
|
if (key in schema) {
|
|
24
24
|
return schema[key];
|
|
@@ -38,7 +38,7 @@ const findFieldInSchema = (schema, key) => {
|
|
|
38
38
|
};
|
|
39
39
|
const isSchemaFieldKeyframable = ({ schema, key, }) => {
|
|
40
40
|
const field = schema ? findFieldInSchema(schema, key) : undefined;
|
|
41
|
-
return (0, exports.
|
|
41
|
+
return (0, exports.isInteractivitySchemaFieldKeyframable)(field);
|
|
42
42
|
};
|
|
43
43
|
exports.isSchemaFieldKeyframable = isSchemaFieldKeyframable;
|
|
44
44
|
const getKeyframeInterpolationFunctionForSchemaField = ({ schema, key, }) => {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { type CanUpdateSequencePropsResponse, type
|
|
1
|
+
import { type CanUpdateSequencePropsResponse, type InteractivitySchema } from 'remotion';
|
|
2
2
|
export declare const optimisticAddSequenceKeyframe: ({ previous, fieldKey, frame, value, schema, }: {
|
|
3
3
|
previous: CanUpdateSequencePropsResponse;
|
|
4
4
|
fieldKey: string;
|
|
5
5
|
frame: number;
|
|
6
6
|
value: unknown;
|
|
7
|
-
schema?:
|
|
7
|
+
schema?: InteractivitySchema | undefined;
|
|
8
8
|
}) => CanUpdateSequencePropsResponse;
|
|
9
9
|
export declare const optimisticAddEffectKeyframe: ({ previous, effectIndex, fieldKey, frame, value, schema, }: {
|
|
10
10
|
previous: CanUpdateSequencePropsResponse;
|
|
@@ -12,5 +12,5 @@ export declare const optimisticAddEffectKeyframe: ({ previous, effectIndex, fiel
|
|
|
12
12
|
fieldKey: string;
|
|
13
13
|
frame: number;
|
|
14
14
|
value: unknown;
|
|
15
|
-
schema?:
|
|
15
|
+
schema?: InteractivitySchema | undefined;
|
|
16
16
|
}) => CanUpdateSequencePropsResponse;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.optimisticAddEffectKeyframe = exports.optimisticAddSequenceKeyframe = void 0;
|
|
4
|
+
const keyframe_easing_presets_1 = require("./keyframe-easing-presets");
|
|
4
5
|
const keyframe_interpolation_function_1 = require("./keyframe-interpolation-function");
|
|
5
6
|
const addKeyframeToPropStatus = ({ status, fieldKey, frame, value, schema, }) => {
|
|
6
7
|
var _a;
|
|
@@ -16,7 +17,7 @@ const addKeyframeToPropStatus = ({ status, fieldKey, frame, value, schema, }) =>
|
|
|
16
17
|
const keyframes = [...status.keyframes, { frame, value }].sort((first, second) => first.frame - second.frame);
|
|
17
18
|
const easing = [...status.easing];
|
|
18
19
|
while (easing.length < keyframes.length - 1) {
|
|
19
|
-
easing.push(
|
|
20
|
+
easing.push(keyframe_easing_presets_1.LINEAR_KEYFRAME_EASING);
|
|
20
21
|
}
|
|
21
22
|
return {
|
|
22
23
|
...status,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { type CanUpdateSequencePropsResponse, type
|
|
1
|
+
import { type CanUpdateSequencePropsResponse, type InteractivitySchema } from 'remotion';
|
|
2
2
|
export declare const optimisticUpdateForEffectPropStatuses: ({ previous, effectIndex, fieldKey, value, schema, }: {
|
|
3
3
|
previous: CanUpdateSequencePropsResponse;
|
|
4
4
|
effectIndex: number;
|
|
5
5
|
fieldKey: string;
|
|
6
6
|
value: unknown;
|
|
7
|
-
schema:
|
|
7
|
+
schema: InteractivitySchema;
|
|
8
8
|
}) => CanUpdateSequencePropsResponse;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type CanUpdateSequencePropsResponse, type
|
|
1
|
+
import { type CanUpdateSequencePropsResponse, type InteractivitySchema } from 'remotion';
|
|
2
2
|
export declare const optimisticUpdateForPropStatuses: ({ previous, fieldKey, value, schema, }: {
|
|
3
3
|
previous: CanUpdateSequencePropsResponse;
|
|
4
4
|
fieldKey: string;
|
|
5
5
|
value: unknown;
|
|
6
|
-
schema:
|
|
6
|
+
schema: InteractivitySchema;
|
|
7
7
|
}) => CanUpdateSequencePropsResponse;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.optimisticUpdateEffectKeyframeSettings = exports.optimisticUpdateSequenceKeyframeSettings = void 0;
|
|
4
|
+
const keyframe_easing_presets_1 = require("./keyframe-easing-presets");
|
|
4
5
|
const updateEasing = ({ easing, segmentCount, segmentIndex, value, }) => {
|
|
5
6
|
if (!Number.isInteger(segmentIndex) ||
|
|
6
7
|
segmentIndex < 0 ||
|
|
@@ -9,7 +10,7 @@ const updateEasing = ({ easing, segmentCount, segmentIndex, value, }) => {
|
|
|
9
10
|
}
|
|
10
11
|
const nextEasing = Array.from({ length: segmentCount }, (_, index) => {
|
|
11
12
|
var _a;
|
|
12
|
-
return (_a = easing[index]) !== null && _a !== void 0 ? _a :
|
|
13
|
+
return (_a = easing[index]) !== null && _a !== void 0 ? _a : keyframe_easing_presets_1.LINEAR_KEYFRAME_EASING;
|
|
13
14
|
});
|
|
14
15
|
nextEasing[segmentIndex] = value;
|
|
15
16
|
return nextEasing;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type SpringKeyframeEasing = {
|
|
2
|
+
readonly type: 'spring';
|
|
3
|
+
damping: number;
|
|
4
|
+
mass: number;
|
|
5
|
+
overshootClamping: boolean;
|
|
6
|
+
stiffness: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const DEFAULT_SPRING_EASING: SpringKeyframeEasing;
|
|
9
|
+
export declare const parseSpringEasingConfig: (node: unknown) => SpringKeyframeEasing | null;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseSpringEasingConfig = exports.DEFAULT_SPRING_EASING = void 0;
|
|
4
|
+
exports.DEFAULT_SPRING_EASING = {
|
|
5
|
+
type: 'spring',
|
|
6
|
+
damping: 10,
|
|
7
|
+
mass: 1,
|
|
8
|
+
overshootClamping: false,
|
|
9
|
+
stiffness: 100,
|
|
10
|
+
};
|
|
11
|
+
const isAstNode = (value) => {
|
|
12
|
+
return (typeof value === 'object' &&
|
|
13
|
+
value !== null &&
|
|
14
|
+
typeof value.type === 'string');
|
|
15
|
+
};
|
|
16
|
+
const getNumericValue = (node) => {
|
|
17
|
+
if (node.type === 'NumericLiteral') {
|
|
18
|
+
return typeof node.value === 'number' ? node.value : null;
|
|
19
|
+
}
|
|
20
|
+
if (node.type === 'UnaryExpression' &&
|
|
21
|
+
(node.operator === '-' || node.operator === '+') &&
|
|
22
|
+
isAstNode(node.argument) &&
|
|
23
|
+
node.argument.type === 'NumericLiteral' &&
|
|
24
|
+
typeof node.argument.value === 'number') {
|
|
25
|
+
return node.operator === '-' ? -node.argument.value : node.argument.value;
|
|
26
|
+
}
|
|
27
|
+
if (node.type === 'TSAsExpression' && isAstNode(node.expression)) {
|
|
28
|
+
return getNumericValue(node.expression);
|
|
29
|
+
}
|
|
30
|
+
return null;
|
|
31
|
+
};
|
|
32
|
+
const getBooleanValue = (node) => {
|
|
33
|
+
if (node.type === 'BooleanLiteral') {
|
|
34
|
+
return typeof node.value === 'boolean' ? node.value : null;
|
|
35
|
+
}
|
|
36
|
+
if (node.type === 'TSAsExpression' && isAstNode(node.expression)) {
|
|
37
|
+
return getBooleanValue(node.expression);
|
|
38
|
+
}
|
|
39
|
+
return null;
|
|
40
|
+
};
|
|
41
|
+
const getObjectPropertyName = (prop) => {
|
|
42
|
+
if (prop.computed === true || !isAstNode(prop.key)) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
if (prop.key.type === 'Identifier') {
|
|
46
|
+
return typeof prop.key.name === 'string' ? prop.key.name : null;
|
|
47
|
+
}
|
|
48
|
+
if (prop.key.type === 'StringLiteral') {
|
|
49
|
+
return typeof prop.key.value === 'string' ? prop.key.value : null;
|
|
50
|
+
}
|
|
51
|
+
return null;
|
|
52
|
+
};
|
|
53
|
+
const parseSpringEasingConfig = (node) => {
|
|
54
|
+
if (node === undefined) {
|
|
55
|
+
return { ...exports.DEFAULT_SPRING_EASING };
|
|
56
|
+
}
|
|
57
|
+
if (!isAstNode(node)) {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
if (node.type === 'TSAsExpression') {
|
|
61
|
+
return (0, exports.parseSpringEasingConfig)(node.expression);
|
|
62
|
+
}
|
|
63
|
+
if (node.type !== 'ObjectExpression' || !Array.isArray(node.properties)) {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
const spring = { ...exports.DEFAULT_SPRING_EASING };
|
|
67
|
+
for (const prop of node.properties) {
|
|
68
|
+
if (!isAstNode(prop) || prop.type !== 'ObjectProperty') {
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
const key = getObjectPropertyName(prop);
|
|
72
|
+
if (!key || !isAstNode(prop.value)) {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
if (key === 'damping' || key === 'mass' || key === 'stiffness') {
|
|
76
|
+
const numericValue = getNumericValue(prop.value);
|
|
77
|
+
if (numericValue === null ||
|
|
78
|
+
!Number.isFinite(numericValue) ||
|
|
79
|
+
numericValue <= 0) {
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
spring[key] = numericValue;
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
if (key === 'overshootClamping') {
|
|
86
|
+
const booleanValue = getBooleanValue(prop.value);
|
|
87
|
+
if (booleanValue === null) {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
spring.overshootClamping = booleanValue;
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
return spring;
|
|
96
|
+
};
|
|
97
|
+
exports.parseSpringEasingConfig = parseSpringEasingConfig;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DragOverrides, EffectDefinition, GetDragOverrides, GetEffectDragOverrides, PropStatuses, SequenceControls, SequencePropsSubscriptionKey,
|
|
1
|
+
import type { DragOverrides, EffectDefinition, GetDragOverrides, GetEffectDragOverrides, PropStatuses, SequenceControls, SequencePropsSubscriptionKey, InteractivitySchema, VisibleFieldSchema } from 'remotion';
|
|
2
2
|
export type { DragOverrides, PropStatuses, SequenceControls };
|
|
3
3
|
export type SchemaFieldInfo = {
|
|
4
4
|
key: string;
|
|
@@ -7,25 +7,25 @@ export type SchemaFieldInfo = {
|
|
|
7
7
|
rowHeight: number;
|
|
8
8
|
fieldSchema: VisibleFieldSchema;
|
|
9
9
|
};
|
|
10
|
-
export type
|
|
10
|
+
export type InteractivitySchemaFieldInfo = SchemaFieldInfo & {
|
|
11
11
|
readonly kind: 'sequence-field';
|
|
12
12
|
};
|
|
13
13
|
export type EffectSchemaFieldInfo = SchemaFieldInfo & {
|
|
14
14
|
readonly kind: 'effect-field';
|
|
15
15
|
readonly effectIndex: number;
|
|
16
|
-
readonly effectSchema:
|
|
16
|
+
readonly effectSchema: InteractivitySchema;
|
|
17
17
|
};
|
|
18
|
-
export type AnySchemaFieldInfo =
|
|
18
|
+
export type AnySchemaFieldInfo = InteractivitySchemaFieldInfo | EffectSchemaFieldInfo;
|
|
19
19
|
export declare const SCHEMA_FIELD_ROW_HEIGHT = 22;
|
|
20
20
|
declare const SUPPORTED_SCHEMA_TYPES: readonly ["number", "boolean", "rotation-css", "rotation-degrees", "translate", "transform-origin", "scale", "uv-coordinate", "color", "array", "enum", "hidden"];
|
|
21
21
|
type SupportedSchemaType = (typeof SUPPORTED_SCHEMA_TYPES)[number];
|
|
22
22
|
export declare const getFieldsToShow: ({ getDragOverrides, propStatuses, nodePath, schema, currentRuntimeValueDotNotation, }: {
|
|
23
|
-
schema:
|
|
23
|
+
schema: InteractivitySchema;
|
|
24
24
|
currentRuntimeValueDotNotation: Record<string, unknown>;
|
|
25
25
|
getDragOverrides: GetDragOverrides;
|
|
26
26
|
propStatuses: PropStatuses;
|
|
27
27
|
nodePath: SequencePropsSubscriptionKey;
|
|
28
|
-
}) =>
|
|
28
|
+
}) => InteractivitySchemaFieldInfo[] | null;
|
|
29
29
|
export declare const getEffectFieldsToShow: ({ effect, effectIndex, nodePath, propStatuses, getEffectDragOverrides, }: {
|
|
30
30
|
effect: EffectDefinition<unknown>;
|
|
31
31
|
effectIndex: number;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/studio-shared"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/studio-shared",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.479",
|
|
7
7
|
"description": "Internal package for shared objects between the Studio backend and frontend",
|
|
8
8
|
"main": "dist",
|
|
9
9
|
"scripts": {
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"url": "https://github.com/remotion-dev/remotion/issues"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"remotion": "4.0.
|
|
23
|
+
"remotion": "4.0.479"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@remotion/renderer": "4.0.
|
|
27
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
26
|
+
"@remotion/renderer": "4.0.479",
|
|
27
|
+
"@remotion/eslint-config-internal": "4.0.479",
|
|
28
28
|
"eslint": "9.19.0",
|
|
29
29
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
30
30
|
},
|