@remotion/studio-shared 4.0.470 → 4.0.471
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 +60 -7
- package/dist/effect-drag-data.d.ts +11 -0
- package/dist/effect-drag-data.js +40 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +6 -1
- package/dist/optimistic-add-keyframe.js +2 -8
- package/dist/optimistic-delete-keyframe.d.ts +15 -0
- package/dist/optimistic-delete-keyframe.js +24 -1
- package/package.json +4 -4
package/dist/api-requests.d.ts
CHANGED
|
@@ -188,6 +188,7 @@ export type SubscribeToSequencePropsRequest = {
|
|
|
188
188
|
fileName: string;
|
|
189
189
|
line: number;
|
|
190
190
|
column: number;
|
|
191
|
+
nodePath: SequenceNodePath | null;
|
|
191
192
|
keys: string[];
|
|
192
193
|
effects: string[][];
|
|
193
194
|
clientId: string;
|
|
@@ -245,15 +246,42 @@ export type SaveEffectPropsRequest = {
|
|
|
245
246
|
clientId: string;
|
|
246
247
|
};
|
|
247
248
|
export type SaveEffectPropsResponse = CanUpdateEffectPropsResponse;
|
|
248
|
-
export type
|
|
249
|
+
export type AddEffectRequest = {
|
|
250
|
+
fileName: string;
|
|
251
|
+
sequenceNodePath: SequencePropsSubscriptionKey;
|
|
252
|
+
effectName: string;
|
|
253
|
+
effectImportPath: string;
|
|
254
|
+
effectConfig: Record<string, unknown>;
|
|
255
|
+
clientId: string;
|
|
256
|
+
};
|
|
257
|
+
export type AddEffectResponse = {
|
|
258
|
+
success: true;
|
|
259
|
+
} | {
|
|
260
|
+
success: false;
|
|
261
|
+
reason: string;
|
|
262
|
+
stack: string;
|
|
263
|
+
};
|
|
264
|
+
export type ReorderEffectRequest = {
|
|
265
|
+
fileName: string;
|
|
266
|
+
sequenceNodePath: SequencePropsSubscriptionKey;
|
|
267
|
+
fromIndex: number;
|
|
268
|
+
toIndex: number;
|
|
269
|
+
clientId: string;
|
|
270
|
+
};
|
|
271
|
+
export type ReorderEffectResponse = {
|
|
272
|
+
success: true;
|
|
273
|
+
} | {
|
|
274
|
+
success: false;
|
|
275
|
+
reason: string;
|
|
276
|
+
stack: string;
|
|
277
|
+
};
|
|
278
|
+
export type DeleteSequenceKeyframe = {
|
|
249
279
|
fileName: string;
|
|
250
280
|
nodePath: SequencePropsSubscriptionKey;
|
|
251
281
|
key: string;
|
|
252
282
|
frame: number;
|
|
253
283
|
schema: SequenceSchema;
|
|
254
|
-
clientId: string;
|
|
255
284
|
};
|
|
256
|
-
export type DeleteSequenceKeyframeResponse = SaveSequencePropsResponse;
|
|
257
285
|
export type AddSequenceKeyframeRequest = {
|
|
258
286
|
fileName: string;
|
|
259
287
|
nodePath: SequencePropsSubscriptionKey;
|
|
@@ -264,16 +292,22 @@ export type AddSequenceKeyframeRequest = {
|
|
|
264
292
|
clientId: string;
|
|
265
293
|
};
|
|
266
294
|
export type AddSequenceKeyframeResponse = SaveSequencePropsResponse;
|
|
267
|
-
export type
|
|
295
|
+
export type DeleteEffectKeyframe = {
|
|
268
296
|
fileName: string;
|
|
269
297
|
sequenceNodePath: SequencePropsSubscriptionKey;
|
|
270
298
|
effectIndex: number;
|
|
271
299
|
key: string;
|
|
272
300
|
frame: number;
|
|
273
301
|
schema: SequenceSchema;
|
|
302
|
+
};
|
|
303
|
+
export type DeleteKeyframesRequest = {
|
|
304
|
+
sequenceKeyframes: DeleteSequenceKeyframe[];
|
|
305
|
+
effectKeyframes: DeleteEffectKeyframe[];
|
|
274
306
|
clientId: string;
|
|
275
307
|
};
|
|
276
|
-
export type
|
|
308
|
+
export type DeleteKeyframesResponse = {
|
|
309
|
+
success: true;
|
|
310
|
+
};
|
|
277
311
|
export type AddEffectKeyframeRequest = {
|
|
278
312
|
fileName: string;
|
|
279
313
|
sequenceNodePath: SequencePropsSubscriptionKey;
|
|
@@ -328,6 +362,23 @@ export type DuplicateJsxNodeResponse = {
|
|
|
328
362
|
reason: string;
|
|
329
363
|
stack: string;
|
|
330
364
|
};
|
|
365
|
+
export type InsertableCompositionElement = {
|
|
366
|
+
type: 'solid';
|
|
367
|
+
width: number;
|
|
368
|
+
height: number;
|
|
369
|
+
};
|
|
370
|
+
export type InsertJsxElementRequest = {
|
|
371
|
+
compositionFile: string;
|
|
372
|
+
compositionId: string;
|
|
373
|
+
element: InsertableCompositionElement;
|
|
374
|
+
};
|
|
375
|
+
export type InsertJsxElementResponse = {
|
|
376
|
+
success: true;
|
|
377
|
+
} | {
|
|
378
|
+
success: false;
|
|
379
|
+
reason: string;
|
|
380
|
+
stack: string;
|
|
381
|
+
};
|
|
331
382
|
export type UpdateAvailableRequest = {};
|
|
332
383
|
export type UpdateAvailableResponse = {
|
|
333
384
|
currentVersion: string;
|
|
@@ -381,13 +432,15 @@ export type ApiRoutes = {
|
|
|
381
432
|
'/api/unsubscribe-from-sequence-props': ReqAndRes<UnsubscribeFromSequencePropsRequest, undefined>;
|
|
382
433
|
'/api/save-sequence-props': ReqAndRes<SaveSequencePropsRequest, SaveSequencePropsResponse>;
|
|
383
434
|
'/api/save-effect-props': ReqAndRes<SaveEffectPropsRequest, SaveEffectPropsResponse>;
|
|
384
|
-
'/api/
|
|
435
|
+
'/api/add-effect': ReqAndRes<AddEffectRequest, AddEffectResponse>;
|
|
436
|
+
'/api/reorder-effect': ReqAndRes<ReorderEffectRequest, ReorderEffectResponse>;
|
|
437
|
+
'/api/delete-keyframes': ReqAndRes<DeleteKeyframesRequest, DeleteKeyframesResponse>;
|
|
385
438
|
'/api/add-sequence-keyframe': ReqAndRes<AddSequenceKeyframeRequest, AddSequenceKeyframeResponse>;
|
|
386
|
-
'/api/delete-effect-keyframe': ReqAndRes<DeleteEffectKeyframeRequest, DeleteEffectKeyframeResponse>;
|
|
387
439
|
'/api/add-effect-keyframe': ReqAndRes<AddEffectKeyframeRequest, AddEffectKeyframeResponse>;
|
|
388
440
|
'/api/delete-effect': ReqAndRes<DeleteEffectRequest, DeleteEffectResponse>;
|
|
389
441
|
'/api/delete-jsx-node': ReqAndRes<DeleteJsxNodeRequest, DeleteJsxNodeResponse>;
|
|
390
442
|
'/api/duplicate-jsx-node': ReqAndRes<DuplicateJsxNodeRequest, DuplicateJsxNodeResponse>;
|
|
443
|
+
'/api/insert-jsx-element': ReqAndRes<InsertJsxElementRequest, InsertJsxElementResponse>;
|
|
391
444
|
'/api/update-available': ReqAndRes<UpdateAvailableRequest, UpdateAvailableResponse>;
|
|
392
445
|
'/api/apply-codemod': ReqAndRes<ApplyCodemodRequest, ApplyCodemodResponse>;
|
|
393
446
|
'/api/project-info': ReqAndRes<ProjectInfoRequest, ProjectInfoResponse>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const EFFECT_DRAG_MIME_TYPE = "application/vnd.remotion.effect+json";
|
|
2
|
+
export type EffectDragData = {
|
|
3
|
+
type: 'remotion-effect';
|
|
4
|
+
version: 1;
|
|
5
|
+
effect: {
|
|
6
|
+
name: string;
|
|
7
|
+
importPath: string;
|
|
8
|
+
config: Record<string, unknown>;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export declare const parseEffectDragData: (value: string) => EffectDragData | null;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseEffectDragData = exports.EFFECT_DRAG_MIME_TYPE = void 0;
|
|
4
|
+
exports.EFFECT_DRAG_MIME_TYPE = 'application/vnd.remotion.effect+json';
|
|
5
|
+
const isRecord = (value) => {
|
|
6
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
7
|
+
};
|
|
8
|
+
const parseEffectDragData = (value) => {
|
|
9
|
+
try {
|
|
10
|
+
const parsed = JSON.parse(value);
|
|
11
|
+
if (!isRecord(parsed)) {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
if (parsed.type !== 'remotion-effect' || parsed.version !== 1) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
if (!isRecord(parsed.effect)) {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
const { name, importPath, config } = parsed.effect;
|
|
21
|
+
if (typeof name !== 'string' ||
|
|
22
|
+
typeof importPath !== 'string' ||
|
|
23
|
+
!isRecord(config)) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
type: 'remotion-effect',
|
|
28
|
+
version: 1,
|
|
29
|
+
effect: {
|
|
30
|
+
name,
|
|
31
|
+
importPath,
|
|
32
|
+
config,
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
catch (_a) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
exports.parseEffectDragData = parseEffectDragData;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export { splitAnsi, stripAnsi } from './ansi';
|
|
2
|
-
export { AddEffectKeyframeRequest, AddEffectKeyframeResponse, AddRenderRequest, AddSequenceKeyframeRequest, AddSequenceKeyframeResponse, ApiRoutes, ApplyCodemodRequest, ApplyCodemodResponse, ApplyVisualControlRequest, ApplyVisualControlResponse, CanUpdateDefaultPropsResponse, CanUpdateSequencePropsRequest, CancelRenderRequest, CancelRenderResponse, CompositionComponentInfoRequest, CompositionComponentInfoResponse, CopyStillToClipboardRequest,
|
|
2
|
+
export { AddEffectRequest, AddEffectResponse, AddEffectKeyframeRequest, AddEffectKeyframeResponse, 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, InstallPackageRequest, InstallPackageResponse, InsertableCompositionElement, InsertJsxElementRequest, InsertJsxElementResponse, OpenInEditorRequest, OpenInEditorResponse, OpenInFileExplorerRequest, 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';
|
|
3
3
|
export type { ApplyVisualControlCodemod, RecastCodemod } from './codemods';
|
|
4
4
|
export { DEFAULT_BUFFER_STATE_DELAY_IN_MILLISECONDS } from './default-buffer-state-delay-in-milliseconds';
|
|
5
|
+
export { EFFECT_DRAG_MIME_TYPE, parseEffectDragData, type EffectDragData, } from './effect-drag-data';
|
|
5
6
|
export { EventSourceEvent } from './event-source-event';
|
|
6
7
|
export { formatBytes } from './format-bytes';
|
|
7
8
|
export { getAllSchemaKeys } from './get-all-keys';
|
|
@@ -23,7 +24,7 @@ export { ScriptLine, SomeStackFrame, StackFrame, SymbolicatedStackFrame, } from
|
|
|
23
24
|
export { EnumPath, stringifyDefaultProps } from './stringify-default-props';
|
|
24
25
|
export type { VisualControlChange } from './codemods';
|
|
25
26
|
export { optimisticAddEffectKeyframe, optimisticAddSequenceKeyframe, } from './optimistic-add-keyframe';
|
|
26
|
-
export { optimisticDeleteEffectKeyframe, optimisticDeleteSequenceKeyframe, } from './optimistic-delete-keyframe';
|
|
27
|
+
export { optimisticDeleteEffectKeyframe, optimisticDeleteEffectKeyframes, optimisticDeleteSequenceKeyframe, optimisticDeleteSequenceKeyframes, } from './optimistic-delete-keyframe';
|
|
27
28
|
export { optimisticUpdateForCodeValues } from './optimistic-update-for-code-values';
|
|
28
29
|
export { optimisticUpdateForEffectCodeValues } from './optimistic-update-for-effect-code-values';
|
|
29
30
|
export { stringifySequenceExpandedRowKey, stringifySequenceSubscriptionKey, } from './stringify-sequence-subscription-key';
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.stringifySequenceSubscriptionKey = exports.stringifySequenceExpandedRowKey = exports.optimisticUpdateForEffectCodeValues = exports.optimisticUpdateForCodeValues = exports.optimisticDeleteSequenceKeyframe = exports.optimisticDeleteEffectKeyframe = exports.optimisticAddSequenceKeyframe = exports.optimisticAddEffectKeyframe = exports.stringifyDefaultProps = exports.getFieldsToShow = exports.getEffectFieldsToShow = exports.SCHEMA_FIELD_ROW_HEIGHT = exports.packages = exports.installableMap = exports.extraPackages = exports.descriptions = exports.apiDocs = exports.DEFAULT_TIMELINE_TRACKS = exports.hotMiddlewareOptions = exports.getProjectName = exports.getLocationFromBuildError = exports.getDefaultOutLocation = exports.getAllSchemaKeys = exports.formatBytes = exports.DEFAULT_BUFFER_STATE_DELAY_IN_MILLISECONDS = exports.stripAnsi = exports.splitAnsi = void 0;
|
|
3
|
+
exports.stringifySequenceSubscriptionKey = exports.stringifySequenceExpandedRowKey = exports.optimisticUpdateForEffectCodeValues = exports.optimisticUpdateForCodeValues = exports.optimisticDeleteSequenceKeyframes = exports.optimisticDeleteSequenceKeyframe = exports.optimisticDeleteEffectKeyframes = exports.optimisticDeleteEffectKeyframe = exports.optimisticAddSequenceKeyframe = exports.optimisticAddEffectKeyframe = exports.stringifyDefaultProps = exports.getFieldsToShow = exports.getEffectFieldsToShow = exports.SCHEMA_FIELD_ROW_HEIGHT = exports.packages = exports.installableMap = exports.extraPackages = exports.descriptions = exports.apiDocs = exports.DEFAULT_TIMELINE_TRACKS = exports.hotMiddlewareOptions = exports.getProjectName = exports.getLocationFromBuildError = exports.getDefaultOutLocation = exports.getAllSchemaKeys = exports.formatBytes = exports.parseEffectDragData = exports.EFFECT_DRAG_MIME_TYPE = exports.DEFAULT_BUFFER_STATE_DELAY_IN_MILLISECONDS = exports.stripAnsi = exports.splitAnsi = void 0;
|
|
4
4
|
const ansi_1 = require("./ansi");
|
|
5
5
|
Object.defineProperty(exports, "splitAnsi", { enumerable: true, get: function () { return ansi_1.splitAnsi; } });
|
|
6
6
|
Object.defineProperty(exports, "stripAnsi", { enumerable: true, get: function () { return ansi_1.stripAnsi; } });
|
|
7
7
|
const default_buffer_state_delay_in_milliseconds_1 = require("./default-buffer-state-delay-in-milliseconds");
|
|
8
8
|
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; } });
|
|
9
|
+
const effect_drag_data_1 = require("./effect-drag-data");
|
|
10
|
+
Object.defineProperty(exports, "EFFECT_DRAG_MIME_TYPE", { enumerable: true, get: function () { return effect_drag_data_1.EFFECT_DRAG_MIME_TYPE; } });
|
|
11
|
+
Object.defineProperty(exports, "parseEffectDragData", { enumerable: true, get: function () { return effect_drag_data_1.parseEffectDragData; } });
|
|
9
12
|
const format_bytes_1 = require("./format-bytes");
|
|
10
13
|
Object.defineProperty(exports, "formatBytes", { enumerable: true, get: function () { return format_bytes_1.formatBytes; } });
|
|
11
14
|
const get_all_keys_1 = require("./get-all-keys");
|
|
@@ -37,7 +40,9 @@ Object.defineProperty(exports, "optimisticAddEffectKeyframe", { enumerable: true
|
|
|
37
40
|
Object.defineProperty(exports, "optimisticAddSequenceKeyframe", { enumerable: true, get: function () { return optimistic_add_keyframe_1.optimisticAddSequenceKeyframe; } });
|
|
38
41
|
const optimistic_delete_keyframe_1 = require("./optimistic-delete-keyframe");
|
|
39
42
|
Object.defineProperty(exports, "optimisticDeleteEffectKeyframe", { enumerable: true, get: function () { return optimistic_delete_keyframe_1.optimisticDeleteEffectKeyframe; } });
|
|
43
|
+
Object.defineProperty(exports, "optimisticDeleteEffectKeyframes", { enumerable: true, get: function () { return optimistic_delete_keyframe_1.optimisticDeleteEffectKeyframes; } });
|
|
40
44
|
Object.defineProperty(exports, "optimisticDeleteSequenceKeyframe", { enumerable: true, get: function () { return optimistic_delete_keyframe_1.optimisticDeleteSequenceKeyframe; } });
|
|
45
|
+
Object.defineProperty(exports, "optimisticDeleteSequenceKeyframes", { enumerable: true, get: function () { return optimistic_delete_keyframe_1.optimisticDeleteSequenceKeyframes; } });
|
|
41
46
|
const optimistic_update_for_code_values_1 = require("./optimistic-update-for-code-values");
|
|
42
47
|
Object.defineProperty(exports, "optimisticUpdateForCodeValues", { enumerable: true, get: function () { return optimistic_update_for_code_values_1.optimisticUpdateForCodeValues; } });
|
|
43
48
|
const optimistic_update_for_effect_code_values_1 = require("./optimistic-update-for-effect-code-values");
|
|
@@ -10,18 +10,12 @@ const addKeyframeToPropStatus = ({ status, frame, value, }) => {
|
|
|
10
10
|
var _a;
|
|
11
11
|
if (status.canUpdate) {
|
|
12
12
|
const staticValue = (_a = status.codeValue) !== null && _a !== void 0 ? _a : value;
|
|
13
|
-
const initialKeyframes = frame === 0
|
|
14
|
-
? [{ frame, value }]
|
|
15
|
-
: [
|
|
16
|
-
{ frame: 0, value: staticValue },
|
|
17
|
-
{ frame, value },
|
|
18
|
-
];
|
|
19
13
|
return {
|
|
20
14
|
canUpdate: false,
|
|
21
15
|
reason: 'keyframed',
|
|
22
16
|
interpolationFunction: getInterpolationFunction(staticValue, value),
|
|
23
|
-
keyframes:
|
|
24
|
-
easing:
|
|
17
|
+
keyframes: [{ frame, value }],
|
|
18
|
+
easing: [],
|
|
25
19
|
clamping: { left: 'extend', right: 'extend' },
|
|
26
20
|
posterize: undefined,
|
|
27
21
|
};
|
|
@@ -4,9 +4,24 @@ export declare const optimisticDeleteSequenceKeyframe: ({ previous, fieldKey, fr
|
|
|
4
4
|
fieldKey: string;
|
|
5
5
|
frame: number;
|
|
6
6
|
}) => CanUpdateSequencePropsResponse;
|
|
7
|
+
export declare const optimisticDeleteSequenceKeyframes: ({ previous, keyframes, }: {
|
|
8
|
+
previous: CanUpdateSequencePropsResponse;
|
|
9
|
+
keyframes: {
|
|
10
|
+
fieldKey: string;
|
|
11
|
+
frame: number;
|
|
12
|
+
}[];
|
|
13
|
+
}) => CanUpdateSequencePropsResponse;
|
|
7
14
|
export declare const optimisticDeleteEffectKeyframe: ({ previous, effectIndex, fieldKey, frame, }: {
|
|
8
15
|
previous: CanUpdateSequencePropsResponse;
|
|
9
16
|
effectIndex: number;
|
|
10
17
|
fieldKey: string;
|
|
11
18
|
frame: number;
|
|
12
19
|
}) => CanUpdateSequencePropsResponse;
|
|
20
|
+
export declare const optimisticDeleteEffectKeyframes: ({ previous, keyframes, }: {
|
|
21
|
+
previous: CanUpdateSequencePropsResponse;
|
|
22
|
+
keyframes: {
|
|
23
|
+
effectIndex: number;
|
|
24
|
+
fieldKey: string;
|
|
25
|
+
frame: number;
|
|
26
|
+
}[];
|
|
27
|
+
}) => CanUpdateSequencePropsResponse;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.optimisticDeleteEffectKeyframe = exports.optimisticDeleteSequenceKeyframe = void 0;
|
|
3
|
+
exports.optimisticDeleteEffectKeyframes = exports.optimisticDeleteEffectKeyframe = exports.optimisticDeleteSequenceKeyframes = exports.optimisticDeleteSequenceKeyframe = void 0;
|
|
4
4
|
const removeKeyframeFromPropStatus = ({ status, frame, }) => {
|
|
5
5
|
if (status.canUpdate) {
|
|
6
6
|
return status;
|
|
@@ -13,6 +13,12 @@ const removeKeyframeFromPropStatus = ({ status, frame, }) => {
|
|
|
13
13
|
return status;
|
|
14
14
|
}
|
|
15
15
|
const keyframes = status.keyframes.filter((_, i) => i !== index);
|
|
16
|
+
if (keyframes.length === 0) {
|
|
17
|
+
return {
|
|
18
|
+
canUpdate: true,
|
|
19
|
+
codeValue: status.keyframes[index].value,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
16
22
|
// Easing holds one segment per gap between consecutive keyframes
|
|
17
23
|
// (keyframes.length - 1 entries). Drop the segment adjacent to the removed
|
|
18
24
|
// keyframe so the invariant keeps holding until the server responds.
|
|
@@ -44,6 +50,14 @@ const optimisticDeleteSequenceKeyframe = ({ previous, fieldKey, frame, }) => {
|
|
|
44
50
|
};
|
|
45
51
|
};
|
|
46
52
|
exports.optimisticDeleteSequenceKeyframe = optimisticDeleteSequenceKeyframe;
|
|
53
|
+
const optimisticDeleteSequenceKeyframes = ({ previous, keyframes, }) => {
|
|
54
|
+
return keyframes.reduce((current, keyframe) => (0, exports.optimisticDeleteSequenceKeyframe)({
|
|
55
|
+
previous: current,
|
|
56
|
+
fieldKey: keyframe.fieldKey,
|
|
57
|
+
frame: keyframe.frame,
|
|
58
|
+
}), previous);
|
|
59
|
+
};
|
|
60
|
+
exports.optimisticDeleteSequenceKeyframes = optimisticDeleteSequenceKeyframes;
|
|
47
61
|
const optimisticDeleteEffectKeyframe = ({ previous, effectIndex, fieldKey, frame, }) => {
|
|
48
62
|
if (!previous.canUpdate) {
|
|
49
63
|
return previous;
|
|
@@ -75,3 +89,12 @@ const optimisticDeleteEffectKeyframe = ({ previous, effectIndex, fieldKey, frame
|
|
|
75
89
|
};
|
|
76
90
|
};
|
|
77
91
|
exports.optimisticDeleteEffectKeyframe = optimisticDeleteEffectKeyframe;
|
|
92
|
+
const optimisticDeleteEffectKeyframes = ({ previous, keyframes, }) => {
|
|
93
|
+
return keyframes.reduce((current, keyframe) => (0, exports.optimisticDeleteEffectKeyframe)({
|
|
94
|
+
previous: current,
|
|
95
|
+
effectIndex: keyframe.effectIndex,
|
|
96
|
+
fieldKey: keyframe.fieldKey,
|
|
97
|
+
frame: keyframe.frame,
|
|
98
|
+
}), previous);
|
|
99
|
+
};
|
|
100
|
+
exports.optimisticDeleteEffectKeyframes = optimisticDeleteEffectKeyframes;
|
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.471",
|
|
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.471"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@remotion/renderer": "4.0.
|
|
27
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
26
|
+
"@remotion/renderer": "4.0.471",
|
|
27
|
+
"@remotion/eslint-config-internal": "4.0.471",
|
|
28
28
|
"eslint": "9.19.0",
|
|
29
29
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
30
30
|
},
|