@remotion/studio-shared 4.0.507 → 4.0.509
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 +26 -1
- package/dist/canvas-capture.d.ts +19 -0
- package/dist/canvas-capture.js +70 -0
- package/dist/codemods.d.ts +8 -0
- package/dist/config-method-lifecycles.d.ts +1 -0
- package/dist/config-method-lifecycles.js +1 -0
- package/dist/effect-catalog.js +66 -0
- package/dist/effect-clipboard-data.d.ts +2 -0
- package/dist/effect-clipboard-data.js +8 -6
- package/dist/esm/index.mjs +296 -112
- package/dist/esm/keyframe-interpolation-function.mjs +13 -2
- package/dist/esm/studio-html.mjs +2 -0
- package/dist/event-source-event.d.ts +4 -0
- package/dist/index.d.ts +8 -2
- package/dist/index.js +11 -2
- package/dist/keyframe-interpolation-function.d.ts +4 -0
- package/dist/keyframe-interpolation-function.js +11 -3
- package/dist/optimistic-add-keyframe.js +8 -2
- package/dist/package-info.d.ts +2 -2
- package/dist/package-info.js +4 -0
- package/dist/react-refresh-event.d.ts +1 -0
- package/dist/react-refresh-event.js +4 -0
- package/dist/render-job.d.ts +1 -0
- package/dist/sequence-node-path-mutation.d.ts +13 -0
- package/dist/sequence-node-path-mutation.js +2 -0
- package/dist/sequence-prop-clipboard-data.d.ts +21 -0
- package/dist/sequence-prop-clipboard-data.js +45 -0
- package/dist/studio-html.d.ts +2 -1
- package/dist/studio-html.js +2 -1
- package/dist/terminal.d.ts +1 -0
- package/dist/terminal.js +2 -0
- package/package.json +5 -5
package/dist/api-requests.d.ts
CHANGED
|
@@ -7,8 +7,10 @@ import type { EffectClipboardParam, EffectClipboardPasteType, EffectClipboardSna
|
|
|
7
7
|
import type { PackageManager } from './package-manager';
|
|
8
8
|
import type { ProjectInfo } from './project-info';
|
|
9
9
|
import type { CompletedClientRender, RequiredChromiumOptions } from './render-job';
|
|
10
|
+
import type { SequenceNodePathMutation } from './sequence-node-path-mutation';
|
|
10
11
|
import type { SymbolicatedStackFrame } from './stack-types';
|
|
11
12
|
import type { EnumPath } from './stringify-default-props';
|
|
13
|
+
import type { TerminalId } from './terminal';
|
|
12
14
|
type KeyframeEasing = Extract<CanUpdateSequencePropStatus, {
|
|
13
15
|
status: 'keyframed';
|
|
14
16
|
}>['easing'][number];
|
|
@@ -29,6 +31,13 @@ export type OpenInCodingAgentRequest = {
|
|
|
29
31
|
export type OpenInCodingAgentResponse = {
|
|
30
32
|
success: boolean;
|
|
31
33
|
};
|
|
34
|
+
export type OpenInTerminalRequest = {
|
|
35
|
+
directory: string;
|
|
36
|
+
terminalId: TerminalId;
|
|
37
|
+
};
|
|
38
|
+
export type OpenInTerminalResponse = {
|
|
39
|
+
success: boolean;
|
|
40
|
+
};
|
|
32
41
|
export type FindInFileRequest = {
|
|
33
42
|
fileName: string;
|
|
34
43
|
lineNumber: number;
|
|
@@ -261,6 +270,9 @@ export type GoogleFontSourceEdit = {
|
|
|
261
270
|
export type SaveSequencePropSourceEdit = {
|
|
262
271
|
type: 'google-font';
|
|
263
272
|
font: GoogleFontSourceEdit;
|
|
273
|
+
} | {
|
|
274
|
+
type: 'clipboard-param';
|
|
275
|
+
param: EffectClipboardParam;
|
|
264
276
|
};
|
|
265
277
|
export type SaveSequencePropEdit = {
|
|
266
278
|
fileName: string;
|
|
@@ -409,6 +421,7 @@ export type ReorderSequenceRequest = {
|
|
|
409
421
|
};
|
|
410
422
|
export type ReorderSequenceResponse = {
|
|
411
423
|
success: true;
|
|
424
|
+
nodePathMutation: SequenceNodePathMutation;
|
|
412
425
|
} | {
|
|
413
426
|
success: false;
|
|
414
427
|
reason: string;
|
|
@@ -579,6 +592,7 @@ export type DeleteJsxNodeRequest = {
|
|
|
579
592
|
};
|
|
580
593
|
export type DeleteJsxNodeResponse = {
|
|
581
594
|
success: true;
|
|
595
|
+
nodePathMutation: SequenceNodePathMutation;
|
|
582
596
|
} | {
|
|
583
597
|
success: false;
|
|
584
598
|
reason: string;
|
|
@@ -590,6 +604,7 @@ export type DuplicateJsxNodeRequest = {
|
|
|
590
604
|
};
|
|
591
605
|
export type DuplicateJsxNodeResponse = {
|
|
592
606
|
success: true;
|
|
607
|
+
nodePathMutation: SequenceNodePathMutation;
|
|
593
608
|
} | {
|
|
594
609
|
success: false;
|
|
595
610
|
reason: string;
|
|
@@ -602,6 +617,7 @@ export type SplitJsxSequenceRequest = {
|
|
|
602
617
|
};
|
|
603
618
|
export type SplitJsxSequenceResponse = {
|
|
604
619
|
success: true;
|
|
620
|
+
nodePathMutation: SequenceNodePathMutation;
|
|
605
621
|
} | {
|
|
606
622
|
success: false;
|
|
607
623
|
reason: string;
|
|
@@ -656,6 +672,8 @@ export type InsertJsxElementRequest = {
|
|
|
656
672
|
};
|
|
657
673
|
export type InsertJsxElementResponse = {
|
|
658
674
|
success: true;
|
|
675
|
+
insertedNodePath: Pick<SequencePropsSubscriptionKey, 'absolutePath' | 'nodePath'> | null;
|
|
676
|
+
nodePathMutation: SequenceNodePathMutation;
|
|
659
677
|
} | {
|
|
660
678
|
success: false;
|
|
661
679
|
reason: string;
|
|
@@ -709,6 +727,7 @@ export type InsertElementFileConflict = {
|
|
|
709
727
|
};
|
|
710
728
|
export type InsertElementResponse = {
|
|
711
729
|
success: true;
|
|
730
|
+
nodePathMutation: SequenceNodePathMutation;
|
|
712
731
|
} | {
|
|
713
732
|
success: false;
|
|
714
733
|
type: 'file-conflict';
|
|
@@ -810,7 +829,10 @@ export type GetDefaultCodingAgentInfoResponse = {
|
|
|
810
829
|
id: DefaultCodingAgent;
|
|
811
830
|
name: string;
|
|
812
831
|
nameWithType: string;
|
|
813
|
-
|
|
832
|
+
}[];
|
|
833
|
+
installedTerminals: {
|
|
834
|
+
id: TerminalId;
|
|
835
|
+
name: string;
|
|
814
836
|
}[];
|
|
815
837
|
};
|
|
816
838
|
export type PackageInstallSpec = {
|
|
@@ -824,6 +846,7 @@ export type InstallPackageResponse = {};
|
|
|
824
846
|
export type UndoRequest = {};
|
|
825
847
|
export type UndoResponse = {
|
|
826
848
|
success: true;
|
|
849
|
+
nodePathMutation: SequenceNodePathMutation | null;
|
|
827
850
|
} | {
|
|
828
851
|
success: false;
|
|
829
852
|
reason: string;
|
|
@@ -831,6 +854,7 @@ export type UndoResponse = {
|
|
|
831
854
|
export type RedoRequest = {};
|
|
832
855
|
export type RedoResponse = {
|
|
833
856
|
success: true;
|
|
857
|
+
nodePathMutation: SequenceNodePathMutation | null;
|
|
834
858
|
} | {
|
|
835
859
|
success: false;
|
|
836
860
|
reason: string;
|
|
@@ -854,6 +878,7 @@ export type ApiRoutes = {
|
|
|
854
878
|
'/api/default-coding-agent-info': ReqAndRes<GetDefaultCodingAgentInfoRequest, GetDefaultCodingAgentInfoResponse>;
|
|
855
879
|
'/api/find-in-file': ReqAndRes<FindInFileRequest, FindInFileResponse>;
|
|
856
880
|
'/api/open-in-file-explorer': ReqAndRes<OpenInFileExplorerRequest, void>;
|
|
881
|
+
'/api/open-in-terminal': ReqAndRes<OpenInTerminalRequest, OpenInTerminalResponse>;
|
|
857
882
|
'/api/register-client-render': ReqAndRes<CompletedClientRender, void>;
|
|
858
883
|
'/api/unregister-client-render': ReqAndRes<{
|
|
859
884
|
id: string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const CANVAS_CAPTURE_METADATA_TAG = "REMOTION_CAPTURE_DATA";
|
|
2
|
+
export type CanvasCaptureMouseMovement = {
|
|
3
|
+
readonly timeInSeconds: number;
|
|
4
|
+
readonly canvasX: number | null;
|
|
5
|
+
readonly canvasY: number | null;
|
|
6
|
+
readonly cursor: string;
|
|
7
|
+
};
|
|
8
|
+
export type CanvasCapturePointerClick = {
|
|
9
|
+
readonly timeInSeconds: number;
|
|
10
|
+
readonly type: 'pointer-down' | 'pointer-up';
|
|
11
|
+
};
|
|
12
|
+
export type CanvasCaptureData = {
|
|
13
|
+
readonly captureMetadata: {
|
|
14
|
+
readonly density: number;
|
|
15
|
+
};
|
|
16
|
+
readonly mouseMovements: CanvasCaptureMouseMovement[];
|
|
17
|
+
readonly pointerClicks: CanvasCapturePointerClick[];
|
|
18
|
+
};
|
|
19
|
+
export declare const parseCanvasCaptureData: (metadata: unknown) => CanvasCaptureData | null;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseCanvasCaptureData = exports.CANVAS_CAPTURE_METADATA_TAG = void 0;
|
|
4
|
+
exports.CANVAS_CAPTURE_METADATA_TAG = 'REMOTION_CAPTURE_DATA';
|
|
5
|
+
const isRecord = (value) => {
|
|
6
|
+
return typeof value === 'object' && value !== null;
|
|
7
|
+
};
|
|
8
|
+
const isFiniteNumber = (value) => {
|
|
9
|
+
return typeof value === 'number' && Number.isFinite(value);
|
|
10
|
+
};
|
|
11
|
+
const parseCanvasCaptureData = (metadata) => {
|
|
12
|
+
if (!isRecord(metadata) || !isRecord(metadata.raw)) {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
const rawCaptureData = metadata.raw[exports.CANVAS_CAPTURE_METADATA_TAG];
|
|
16
|
+
if (typeof rawCaptureData !== 'string') {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
let parsed;
|
|
20
|
+
try {
|
|
21
|
+
parsed = JSON.parse(rawCaptureData);
|
|
22
|
+
}
|
|
23
|
+
catch (_a) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
if (!isRecord(parsed) ||
|
|
27
|
+
!isRecord(parsed.captureMetadata) ||
|
|
28
|
+
!isFiniteNumber(parsed.captureMetadata.density) ||
|
|
29
|
+
parsed.captureMetadata.density <= 0 ||
|
|
30
|
+
!Array.isArray(parsed.mouseMovements) ||
|
|
31
|
+
!Array.isArray(parsed.pointerClicks)) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
const mouseMovements = [];
|
|
35
|
+
for (const movement of parsed.mouseMovements) {
|
|
36
|
+
if (!isRecord(movement) ||
|
|
37
|
+
!isFiniteNumber(movement.timeInSeconds) ||
|
|
38
|
+
movement.timeInSeconds < 0 ||
|
|
39
|
+
(movement.canvasX !== null && !isFiniteNumber(movement.canvasX)) ||
|
|
40
|
+
(movement.canvasY !== null && !isFiniteNumber(movement.canvasY)) ||
|
|
41
|
+
typeof movement.cursor !== 'string') {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
mouseMovements.push({
|
|
45
|
+
timeInSeconds: movement.timeInSeconds,
|
|
46
|
+
canvasX: movement.canvasX,
|
|
47
|
+
canvasY: movement.canvasY,
|
|
48
|
+
cursor: movement.cursor,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
const pointerClicks = [];
|
|
52
|
+
for (const click of parsed.pointerClicks) {
|
|
53
|
+
if (!isRecord(click) ||
|
|
54
|
+
!isFiniteNumber(click.timeInSeconds) ||
|
|
55
|
+
click.timeInSeconds < 0 ||
|
|
56
|
+
(click.type !== 'pointer-down' && click.type !== 'pointer-up')) {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
pointerClicks.push({
|
|
60
|
+
timeInSeconds: click.timeInSeconds,
|
|
61
|
+
type: click.type,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
captureMetadata: { density: parsed.captureMetadata.density },
|
|
66
|
+
mouseMovements: mouseMovements.sort((a, b) => a.timeInSeconds - b.timeInSeconds),
|
|
67
|
+
pointerClicks: pointerClicks.sort((a, b) => a.timeInSeconds - b.timeInSeconds),
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
exports.parseCanvasCaptureData = parseCanvasCaptureData;
|
package/dist/codemods.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CanvasCaptureData } from './canvas-capture';
|
|
1
2
|
import type { EnumPath } from './stringify-default-props';
|
|
2
3
|
export type VisualControlChange = {
|
|
3
4
|
id: string;
|
|
@@ -20,6 +21,13 @@ export type RecastCodemod = {
|
|
|
20
21
|
newWidth: number;
|
|
21
22
|
newFps: number;
|
|
22
23
|
newDurationInFrames: number;
|
|
24
|
+
canvasCapture: {
|
|
25
|
+
readonly videoFileName: string;
|
|
26
|
+
readonly videoHeight: number;
|
|
27
|
+
readonly videoWidth: number;
|
|
28
|
+
readonly keyframeFps: number;
|
|
29
|
+
readonly data: CanvasCaptureData;
|
|
30
|
+
} | null;
|
|
23
31
|
} | {
|
|
24
32
|
type: 'duplicate-composition';
|
|
25
33
|
idToDuplicate: string;
|
|
@@ -45,6 +45,7 @@ export declare const configMethodLifecycles: {
|
|
|
45
45
|
readonly setEnforceAudioTrack: "runtime";
|
|
46
46
|
readonly setEntryPoint: "restart";
|
|
47
47
|
readonly setEveryNthFrame: "runtime";
|
|
48
|
+
readonly setExperimentalKeepAudioContextAlive: "reload";
|
|
48
49
|
readonly setExperimentalRspackEnabled: "restart";
|
|
49
50
|
readonly setForSeamlessAacConcatenation: "runtime";
|
|
50
51
|
readonly setForceNewStudioEnabled: "restart";
|
|
@@ -48,6 +48,7 @@ exports.configMethodLifecycles = {
|
|
|
48
48
|
setEnforceAudioTrack: 'runtime',
|
|
49
49
|
setEntryPoint: 'restart',
|
|
50
50
|
setEveryNthFrame: 'runtime',
|
|
51
|
+
setExperimentalKeepAudioContextAlive: 'reload',
|
|
51
52
|
setExperimentalRspackEnabled: 'restart',
|
|
52
53
|
setForSeamlessAacConcatenation: 'runtime',
|
|
53
54
|
setForceNewStudioEnabled: 'restart',
|
package/dist/effect-catalog.js
CHANGED
|
@@ -65,6 +65,17 @@ exports.EFFECT_CATALOG = [
|
|
|
65
65
|
config: {},
|
|
66
66
|
},
|
|
67
67
|
},
|
|
68
|
+
{
|
|
69
|
+
id: 'effects-color-correction',
|
|
70
|
+
category: 'Color',
|
|
71
|
+
label: 'colorCorrection()',
|
|
72
|
+
description: 'Combined primary color adjustments',
|
|
73
|
+
effect: {
|
|
74
|
+
name: 'colorCorrection',
|
|
75
|
+
importPath: '@remotion/effects/color-correction',
|
|
76
|
+
config: {},
|
|
77
|
+
},
|
|
78
|
+
},
|
|
68
79
|
{
|
|
69
80
|
id: 'effects-color-key',
|
|
70
81
|
category: 'Color',
|
|
@@ -89,6 +100,17 @@ exports.EFFECT_CATALOG = [
|
|
|
89
100
|
config: {},
|
|
90
101
|
},
|
|
91
102
|
},
|
|
103
|
+
{
|
|
104
|
+
id: 'effects-exposure',
|
|
105
|
+
category: 'Color',
|
|
106
|
+
label: 'exposure()',
|
|
107
|
+
description: 'Stop-based exposure adjustment',
|
|
108
|
+
effect: {
|
|
109
|
+
name: 'exposure',
|
|
110
|
+
importPath: '@remotion/effects/exposure',
|
|
111
|
+
config: {},
|
|
112
|
+
},
|
|
113
|
+
},
|
|
92
114
|
{
|
|
93
115
|
id: 'effects-grayscale',
|
|
94
116
|
category: 'Color',
|
|
@@ -122,6 +144,17 @@ exports.EFFECT_CATALOG = [
|
|
|
122
144
|
config: {},
|
|
123
145
|
},
|
|
124
146
|
},
|
|
147
|
+
{
|
|
148
|
+
id: 'effects-levels',
|
|
149
|
+
category: 'Color',
|
|
150
|
+
label: 'levels()',
|
|
151
|
+
description: 'Black point, white point, and gamma',
|
|
152
|
+
effect: {
|
|
153
|
+
name: 'levels',
|
|
154
|
+
importPath: '@remotion/effects/levels',
|
|
155
|
+
config: {},
|
|
156
|
+
},
|
|
157
|
+
},
|
|
125
158
|
{
|
|
126
159
|
id: 'effects-saturation',
|
|
127
160
|
category: 'Color',
|
|
@@ -133,6 +166,17 @@ exports.EFFECT_CATALOG = [
|
|
|
133
166
|
config: {},
|
|
134
167
|
},
|
|
135
168
|
},
|
|
169
|
+
{
|
|
170
|
+
id: 'effects-shadows-highlights',
|
|
171
|
+
category: 'Color',
|
|
172
|
+
label: 'shadowsHighlights()',
|
|
173
|
+
description: 'Recover dark and bright tonal regions',
|
|
174
|
+
effect: {
|
|
175
|
+
name: 'shadowsHighlights',
|
|
176
|
+
importPath: '@remotion/effects/shadows-highlights',
|
|
177
|
+
config: {},
|
|
178
|
+
},
|
|
179
|
+
},
|
|
136
180
|
{
|
|
137
181
|
id: 'effects-tint',
|
|
138
182
|
category: 'Color',
|
|
@@ -146,6 +190,28 @@ exports.EFFECT_CATALOG = [
|
|
|
146
190
|
},
|
|
147
191
|
},
|
|
148
192
|
},
|
|
193
|
+
{
|
|
194
|
+
id: 'effects-white-balance',
|
|
195
|
+
category: 'Color',
|
|
196
|
+
label: 'whiteBalance()',
|
|
197
|
+
description: 'Temperature and tint correction',
|
|
198
|
+
effect: {
|
|
199
|
+
name: 'whiteBalance',
|
|
200
|
+
importPath: '@remotion/effects/white-balance',
|
|
201
|
+
config: {},
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
id: 'effects-vibrance',
|
|
206
|
+
category: 'Color',
|
|
207
|
+
label: 'vibrance()',
|
|
208
|
+
description: 'Selective saturation adjustment',
|
|
209
|
+
effect: {
|
|
210
|
+
name: 'vibrance',
|
|
211
|
+
importPath: '@remotion/effects/vibrance',
|
|
212
|
+
config: {},
|
|
213
|
+
},
|
|
214
|
+
},
|
|
149
215
|
{
|
|
150
216
|
id: 'effects-linear-gradient',
|
|
151
217
|
category: 'Color',
|
|
@@ -67,6 +67,8 @@ export type EffectPropClipboardDataParseResult = {
|
|
|
67
67
|
} | {
|
|
68
68
|
readonly status: 'invalid';
|
|
69
69
|
};
|
|
70
|
+
export declare const normalizeEffectClipboardParam: (param: EffectClipboardParam) => EffectClipboardParam;
|
|
71
|
+
export declare const isEffectClipboardParam: (value: unknown) => value is EffectClipboardParam;
|
|
70
72
|
export declare const parseEffectClipboardDataResult: (value: string) => EffectClipboardDataParseResult;
|
|
71
73
|
export declare const parseEffectClipboardData: (value: string) => EffectClipboardData | null;
|
|
72
74
|
export declare const parseEffectPropClipboardDataResult: (value: string) => EffectPropClipboardDataParseResult;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parseEffectPropClipboardData = exports.parseEffectPropClipboardDataResult = exports.parseEffectClipboardData = exports.parseEffectClipboardDataResult = void 0;
|
|
3
|
+
exports.parseEffectPropClipboardData = exports.parseEffectPropClipboardDataResult = exports.parseEffectClipboardData = exports.parseEffectClipboardDataResult = exports.isEffectClipboardParam = exports.normalizeEffectClipboardParam = 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);
|
|
@@ -42,7 +42,7 @@ const normalizeEasing = (easing) => {
|
|
|
42
42
|
durationRestThreshold: (_b = easing.durationRestThreshold) !== null && _b !== void 0 ? _b : null,
|
|
43
43
|
};
|
|
44
44
|
};
|
|
45
|
-
const
|
|
45
|
+
const normalizeEffectClipboardParam = (param) => {
|
|
46
46
|
if (param.type === 'static') {
|
|
47
47
|
return param;
|
|
48
48
|
}
|
|
@@ -51,12 +51,13 @@ const normalizeParam = (param) => {
|
|
|
51
51
|
easing: param.easing.map(normalizeEasing),
|
|
52
52
|
};
|
|
53
53
|
};
|
|
54
|
+
exports.normalizeEffectClipboardParam = normalizeEffectClipboardParam;
|
|
54
55
|
const normalizeSnapshot = (snapshot) => {
|
|
55
56
|
return {
|
|
56
57
|
...snapshot,
|
|
57
58
|
params: Object.fromEntries(Object.entries(snapshot.params).map(([key, param]) => [
|
|
58
59
|
key,
|
|
59
|
-
|
|
60
|
+
(0, exports.normalizeEffectClipboardParam)(param),
|
|
60
61
|
])),
|
|
61
62
|
};
|
|
62
63
|
};
|
|
@@ -100,6 +101,7 @@ const isEffectClipboardParam = (value) => {
|
|
|
100
101
|
outputOptions.has(output))) &&
|
|
101
102
|
(posterize === undefined || (isFiniteNumber(posterize) && posterize > 0)));
|
|
102
103
|
};
|
|
104
|
+
exports.isEffectClipboardParam = isEffectClipboardParam;
|
|
103
105
|
const isEffectClipboardSnapshotV3 = (value) => {
|
|
104
106
|
if (!isRecord(value)) {
|
|
105
107
|
return false;
|
|
@@ -107,7 +109,7 @@ const isEffectClipboardSnapshotV3 = (value) => {
|
|
|
107
109
|
return (typeof value.callee === 'string' &&
|
|
108
110
|
typeof value.importPath === 'string' &&
|
|
109
111
|
isRecord(value.params) &&
|
|
110
|
-
Object.values(value.params).every(isEffectClipboardParam));
|
|
112
|
+
Object.values(value.params).every(exports.isEffectClipboardParam));
|
|
111
113
|
};
|
|
112
114
|
const parseEffectClipboardDataResult = (value) => {
|
|
113
115
|
try {
|
|
@@ -189,7 +191,7 @@ const parseEffectPropClipboardDataResult = (value) => {
|
|
|
189
191
|
if (typeof parsed.key !== 'string') {
|
|
190
192
|
return { status: 'invalid' };
|
|
191
193
|
}
|
|
192
|
-
if (!isEffectClipboardParam(parsed.param)) {
|
|
194
|
+
if (!(0, exports.isEffectClipboardParam)(parsed.param)) {
|
|
193
195
|
return { status: 'invalid' };
|
|
194
196
|
}
|
|
195
197
|
return {
|
|
@@ -203,7 +205,7 @@ const parseEffectPropClipboardDataResult = (value) => {
|
|
|
203
205
|
importPath: parsed.effect.importPath,
|
|
204
206
|
},
|
|
205
207
|
key: parsed.key,
|
|
206
|
-
param:
|
|
208
|
+
param: (0, exports.normalizeEffectClipboardParam)(parsed.param),
|
|
207
209
|
},
|
|
208
210
|
};
|
|
209
211
|
}
|