@rendley/sdk 1.0.1 → 1.0.3
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/Engine.d.ts +16 -19
- package/dist/config/config.d.ts +2 -3
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +12 -6
- package/dist/index.js +1 -1
- package/dist/libs/ffmpeg/classes.d.ts +9 -5
- package/dist/libs/ffmpeg/config.d.ts +1 -1
- package/dist/libs/ffmpeg/const.d.ts +8 -6
- package/dist/libs/ffmpeg/types.d.ts +4 -1
- package/dist/libs/ffmpeg/worker.d.ts +1 -1
- package/dist/modules/clip/Clip.d.ts +8 -17
- package/dist/modules/clip/ClipStyle.d.ts +2 -8
- package/dist/modules/clip/clips/audio/AudioClip.d.ts +2 -2
- package/dist/modules/clip/clips/gif/GifClip.d.ts +3 -3
- package/dist/modules/clip/clips/image/ImageClip.d.ts +3 -3
- package/dist/modules/clip/clips/index.d.ts +7 -4
- package/dist/modules/clip/clips/shape/ShapeClip.d.ts +3 -5
- package/dist/modules/clip/clips/shape/ShapeSprite.d.ts +1 -1
- package/dist/modules/clip/clips/shape/ShapeStyle.d.ts +2 -3
- package/dist/modules/clip/clips/text/TextClip.d.ts +3 -5
- package/dist/modules/clip/clips/text/TextSprite.d.ts +1 -1
- package/dist/modules/clip/clips/text/TextStyle.d.ts +3 -4
- package/dist/modules/clip/clips/video/VideoClip.d.ts +3 -3
- package/dist/modules/clip/index.d.ts +3 -2
- package/dist/modules/display/Display.d.ts +8 -8
- package/dist/modules/display/index.d.ts +1 -1
- package/dist/modules/display/renderer/PixiRenderer.d.ts +1 -1
- package/dist/modules/display/utils/WebCodecsVideoFrameResource.d.ts +1 -1
- package/dist/modules/display/utils/registerSelectionEvents.d.ts +1 -1
- package/dist/modules/event-emitter/EventEmitter.d.ts +2 -2
- package/dist/modules/event-emitter/index.d.ts +2 -2
- package/dist/modules/event-emitter/types/EventEmitter.types.d.ts +8 -8
- package/dist/modules/filter/Effect.d.ts +1 -2
- package/dist/modules/filter/Filter.d.ts +2 -6
- package/dist/modules/filter/index.d.ts +2 -2
- package/dist/modules/font-registry/index.d.ts +1 -1
- package/dist/modules/layer/Layer.d.ts +7 -21
- package/dist/modules/layer/index.d.ts +1 -1
- package/dist/modules/library/Library.d.ts +3 -3
- package/dist/modules/library/MediaData.d.ts +14 -3
- package/dist/modules/library/Subtitles.d.ts +1 -1
- package/dist/modules/library/index.d.ts +3 -1
- package/dist/modules/subtitleManager/SubtitleManager.d.ts +1 -1
- package/dist/modules/subtitleManager/index.d.ts +1 -1
- package/dist/modules/timeline/Timeline.d.ts +4 -27
- package/dist/modules/timeline/index.d.ts +1 -1
- package/dist/modules/transition/Transition.d.ts +3 -3
- package/dist/modules/transition/index.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/utils/dom/recreateDomCanvas.d.ts +1 -0
- package/dist/utils/texture/createGradientTexture.d.ts +1 -1
- package/package.json +6 -8
- package/dist/modules/filter/effects/OldFilmEffect.d.ts +0 -2
- package/dist/modules/filter/effects/WaveEffect.d.ts +0 -2
- package/dist/modules/filter/filters/VintageFilter.d.ts +0 -2
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import * as PIXI from
|
|
2
|
-
import { z } from
|
|
3
|
-
import { AudioClipOptions, Clip, ImageClipOptions, TextClipOptions, VideoClipOptions } from
|
|
4
|
-
import { GifClipOptions } from
|
|
5
|
-
import { ShapeClipOptions } from
|
|
6
|
-
import { Transition } from
|
|
1
|
+
import * as PIXI from "pixi.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { AudioClipOptions, Clip, ImageClipOptions, TextClipOptions, VideoClipOptions } from "../clip";
|
|
4
|
+
import { GifClipOptions } from "../clip/clips/gif/GifClip";
|
|
5
|
+
import { ShapeClipOptions } from "../clip/clips/shape/ShapeClip";
|
|
6
|
+
import { Transition } from "../transition/Transition";
|
|
7
7
|
type ClipOptions = ImageClipOptions | VideoClipOptions | TextClipOptions | AudioClipOptions | GifClipOptions | ShapeClipOptions;
|
|
8
|
-
export type ClipTypeRange = Pick<ClipOptions,
|
|
8
|
+
export type ClipTypeRange = Pick<ClipOptions, "startTime" | "duration">;
|
|
9
9
|
export declare const LayerSchema: z.ZodObject<{
|
|
10
10
|
id: z.ZodString;
|
|
11
11
|
isEnabled: z.ZodBoolean;
|
|
12
12
|
isMuted: z.ZodBoolean;
|
|
13
13
|
clips: z.ZodArray<z.ZodObject<{
|
|
14
|
-
name: z.ZodString;
|
|
15
14
|
id: z.ZodString;
|
|
16
15
|
type: z.ZodString;
|
|
17
16
|
mediaDataId: z.ZodOptional<z.ZodString>;
|
|
@@ -23,7 +22,6 @@ export declare const LayerSchema: z.ZodObject<{
|
|
|
23
22
|
rightTrim: z.ZodNumber;
|
|
24
23
|
filters: z.ZodArray<z.ZodObject<{
|
|
25
24
|
id: z.ZodString;
|
|
26
|
-
name: z.ZodString;
|
|
27
25
|
sourceId: z.ZodString;
|
|
28
26
|
options: z.ZodObject<{
|
|
29
27
|
lutUrl: z.ZodString;
|
|
@@ -33,14 +31,12 @@ export declare const LayerSchema: z.ZodObject<{
|
|
|
33
31
|
lutUrl: string;
|
|
34
32
|
}>;
|
|
35
33
|
}, "strip", z.ZodTypeAny, {
|
|
36
|
-
name: string;
|
|
37
34
|
options: {
|
|
38
35
|
lutUrl: string;
|
|
39
36
|
};
|
|
40
37
|
id: string;
|
|
41
38
|
sourceId: string;
|
|
42
39
|
}, {
|
|
43
|
-
name: string;
|
|
44
40
|
options: {
|
|
45
41
|
lutUrl: string;
|
|
46
42
|
};
|
|
@@ -52,12 +48,10 @@ export declare const LayerSchema: z.ZodObject<{
|
|
|
52
48
|
style: z.ZodUnknown;
|
|
53
49
|
text: z.ZodOptional<z.ZodString>;
|
|
54
50
|
}, "strip", z.ZodTypeAny, {
|
|
55
|
-
name: string;
|
|
56
51
|
type: string;
|
|
57
52
|
id: string;
|
|
58
53
|
duration: number;
|
|
59
54
|
filters: {
|
|
60
|
-
name: string;
|
|
61
55
|
options: {
|
|
62
56
|
lutUrl: string;
|
|
63
57
|
};
|
|
@@ -75,12 +69,10 @@ export declare const LayerSchema: z.ZodObject<{
|
|
|
75
69
|
style?: unknown;
|
|
76
70
|
text?: string | undefined;
|
|
77
71
|
}, {
|
|
78
|
-
name: string;
|
|
79
72
|
type: string;
|
|
80
73
|
id: string;
|
|
81
74
|
duration: number;
|
|
82
75
|
filters: {
|
|
83
|
-
name: string;
|
|
84
76
|
options: {
|
|
85
77
|
lutUrl: string;
|
|
86
78
|
};
|
|
@@ -131,12 +123,10 @@ export declare const LayerSchema: z.ZodObject<{
|
|
|
131
123
|
isEnabled: boolean;
|
|
132
124
|
isMuted: boolean;
|
|
133
125
|
clips: {
|
|
134
|
-
name: string;
|
|
135
126
|
type: string;
|
|
136
127
|
id: string;
|
|
137
128
|
duration: number;
|
|
138
129
|
filters: {
|
|
139
|
-
name: string;
|
|
140
130
|
options: {
|
|
141
131
|
lutUrl: string;
|
|
142
132
|
};
|
|
@@ -169,12 +159,10 @@ export declare const LayerSchema: z.ZodObject<{
|
|
|
169
159
|
isEnabled: boolean;
|
|
170
160
|
isMuted: boolean;
|
|
171
161
|
clips: {
|
|
172
|
-
name: string;
|
|
173
162
|
type: string;
|
|
174
163
|
id: string;
|
|
175
164
|
duration: number;
|
|
176
165
|
filters: {
|
|
177
|
-
name: string;
|
|
178
166
|
options: {
|
|
179
167
|
lutUrl: string;
|
|
180
168
|
};
|
|
@@ -239,12 +227,10 @@ export declare class Layer {
|
|
|
239
227
|
isEnabled: boolean;
|
|
240
228
|
isMuted: boolean;
|
|
241
229
|
clips: {
|
|
242
|
-
name: string;
|
|
243
230
|
type: string;
|
|
244
231
|
id: string;
|
|
245
232
|
duration: number;
|
|
246
233
|
filters: {
|
|
247
|
-
name: string;
|
|
248
234
|
options: {
|
|
249
235
|
lutUrl: string;
|
|
250
236
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./Layer";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { z } from
|
|
2
|
-
import { MediaData } from
|
|
3
|
-
import { Subtitles } from
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { MediaData } from "./MediaData";
|
|
3
|
+
import { Subtitles } from "./Subtitles";
|
|
4
4
|
export declare const LibrarySchema: z.ZodObject<{
|
|
5
5
|
media: z.ZodArray<z.ZodObject<{
|
|
6
6
|
id: z.ZodString;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { z } from
|
|
2
|
-
import { MediaDataStatus } from
|
|
3
|
-
import { MediaInfo } from
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { MediaDataStatus } from "./types/MediaData.types";
|
|
3
|
+
import { MediaInfo } from "../ffmpeg/types/FFmpeg.types";
|
|
4
4
|
export declare const MediaDataSchema: z.ZodObject<{
|
|
5
5
|
id: z.ZodString;
|
|
6
6
|
type: z.ZodString;
|
|
@@ -39,6 +39,17 @@ export declare class MediaData {
|
|
|
39
39
|
getId(): string;
|
|
40
40
|
readFileIntoBlob(file: File, mimeType?: string): Promise<Blob>;
|
|
41
41
|
checkCompatibilityOrTranscode(filePath: string, blobUrl: string, hasAudio: boolean): Promise<boolean>;
|
|
42
|
+
hookRawData(file: File | string | Uint8Array, mimeType: string | undefined): Promise<{
|
|
43
|
+
status: boolean;
|
|
44
|
+
data: Uint8Array;
|
|
45
|
+
filePath: string;
|
|
46
|
+
mimeType: string;
|
|
47
|
+
} | {
|
|
48
|
+
status: boolean;
|
|
49
|
+
data?: undefined;
|
|
50
|
+
filePath?: undefined;
|
|
51
|
+
mimeType?: undefined;
|
|
52
|
+
}>;
|
|
42
53
|
load(file: File | string | Uint8Array, mimeType?: string): Promise<void>;
|
|
43
54
|
serialize(): {
|
|
44
55
|
type: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./SubtitleManager";
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import { z } from
|
|
2
|
-
import { Clip } from
|
|
3
|
-
import { Layer } from
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { Clip } from "../clip";
|
|
3
|
+
import { Layer } from "../layer";
|
|
4
4
|
export declare const TimelineSchema: z.ZodObject<{
|
|
5
5
|
startTime: z.ZodNumber;
|
|
6
|
-
duration: z.ZodNumber;
|
|
7
6
|
fps: z.ZodNumber;
|
|
8
7
|
layers: z.ZodArray<z.ZodObject<{
|
|
9
8
|
id: z.ZodString;
|
|
10
9
|
isEnabled: z.ZodBoolean;
|
|
11
10
|
isMuted: z.ZodBoolean;
|
|
12
11
|
clips: z.ZodArray<z.ZodObject<{
|
|
13
|
-
name: z.ZodString;
|
|
14
12
|
id: z.ZodString;
|
|
15
13
|
type: z.ZodString;
|
|
16
14
|
mediaDataId: z.ZodOptional<z.ZodString>;
|
|
@@ -22,7 +20,6 @@ export declare const TimelineSchema: z.ZodObject<{
|
|
|
22
20
|
rightTrim: z.ZodNumber;
|
|
23
21
|
filters: z.ZodArray<z.ZodObject<{
|
|
24
22
|
id: z.ZodString;
|
|
25
|
-
name: z.ZodString;
|
|
26
23
|
sourceId: z.ZodString;
|
|
27
24
|
options: z.ZodObject<{
|
|
28
25
|
lutUrl: z.ZodString;
|
|
@@ -32,14 +29,12 @@ export declare const TimelineSchema: z.ZodObject<{
|
|
|
32
29
|
lutUrl: string;
|
|
33
30
|
}>;
|
|
34
31
|
}, "strip", z.ZodTypeAny, {
|
|
35
|
-
name: string;
|
|
36
32
|
options: {
|
|
37
33
|
lutUrl: string;
|
|
38
34
|
};
|
|
39
35
|
id: string;
|
|
40
36
|
sourceId: string;
|
|
41
37
|
}, {
|
|
42
|
-
name: string;
|
|
43
38
|
options: {
|
|
44
39
|
lutUrl: string;
|
|
45
40
|
};
|
|
@@ -51,12 +46,10 @@ export declare const TimelineSchema: z.ZodObject<{
|
|
|
51
46
|
style: z.ZodUnknown;
|
|
52
47
|
text: z.ZodOptional<z.ZodString>;
|
|
53
48
|
}, "strip", z.ZodTypeAny, {
|
|
54
|
-
name: string;
|
|
55
49
|
type: string;
|
|
56
50
|
id: string;
|
|
57
51
|
duration: number;
|
|
58
52
|
filters: {
|
|
59
|
-
name: string;
|
|
60
53
|
options: {
|
|
61
54
|
lutUrl: string;
|
|
62
55
|
};
|
|
@@ -74,12 +67,10 @@ export declare const TimelineSchema: z.ZodObject<{
|
|
|
74
67
|
style?: unknown;
|
|
75
68
|
text?: string | undefined;
|
|
76
69
|
}, {
|
|
77
|
-
name: string;
|
|
78
70
|
type: string;
|
|
79
71
|
id: string;
|
|
80
72
|
duration: number;
|
|
81
73
|
filters: {
|
|
82
|
-
name: string;
|
|
83
74
|
options: {
|
|
84
75
|
lutUrl: string;
|
|
85
76
|
};
|
|
@@ -130,12 +121,10 @@ export declare const TimelineSchema: z.ZodObject<{
|
|
|
130
121
|
isEnabled: boolean;
|
|
131
122
|
isMuted: boolean;
|
|
132
123
|
clips: {
|
|
133
|
-
name: string;
|
|
134
124
|
type: string;
|
|
135
125
|
id: string;
|
|
136
126
|
duration: number;
|
|
137
127
|
filters: {
|
|
138
|
-
name: string;
|
|
139
128
|
options: {
|
|
140
129
|
lutUrl: string;
|
|
141
130
|
};
|
|
@@ -168,12 +157,10 @@ export declare const TimelineSchema: z.ZodObject<{
|
|
|
168
157
|
isEnabled: boolean;
|
|
169
158
|
isMuted: boolean;
|
|
170
159
|
clips: {
|
|
171
|
-
name: string;
|
|
172
160
|
type: string;
|
|
173
161
|
id: string;
|
|
174
162
|
duration: number;
|
|
175
163
|
filters: {
|
|
176
|
-
name: string;
|
|
177
164
|
options: {
|
|
178
165
|
lutUrl: string;
|
|
179
166
|
};
|
|
@@ -203,7 +190,6 @@ export declare const TimelineSchema: z.ZodObject<{
|
|
|
203
190
|
}[];
|
|
204
191
|
}>, "many">;
|
|
205
192
|
}, "strip", z.ZodTypeAny, {
|
|
206
|
-
duration: number;
|
|
207
193
|
startTime: number;
|
|
208
194
|
fps: number;
|
|
209
195
|
layers: {
|
|
@@ -211,12 +197,10 @@ export declare const TimelineSchema: z.ZodObject<{
|
|
|
211
197
|
isEnabled: boolean;
|
|
212
198
|
isMuted: boolean;
|
|
213
199
|
clips: {
|
|
214
|
-
name: string;
|
|
215
200
|
type: string;
|
|
216
201
|
id: string;
|
|
217
202
|
duration: number;
|
|
218
203
|
filters: {
|
|
219
|
-
name: string;
|
|
220
204
|
options: {
|
|
221
205
|
lutUrl: string;
|
|
222
206
|
};
|
|
@@ -246,7 +230,6 @@ export declare const TimelineSchema: z.ZodObject<{
|
|
|
246
230
|
}[];
|
|
247
231
|
}[];
|
|
248
232
|
}, {
|
|
249
|
-
duration: number;
|
|
250
233
|
startTime: number;
|
|
251
234
|
fps: number;
|
|
252
235
|
layers: {
|
|
@@ -254,12 +237,10 @@ export declare const TimelineSchema: z.ZodObject<{
|
|
|
254
237
|
isEnabled: boolean;
|
|
255
238
|
isMuted: boolean;
|
|
256
239
|
clips: {
|
|
257
|
-
name: string;
|
|
258
240
|
type: string;
|
|
259
241
|
id: string;
|
|
260
242
|
duration: number;
|
|
261
243
|
filters: {
|
|
262
|
-
name: string;
|
|
263
244
|
options: {
|
|
264
245
|
lutUrl: string;
|
|
265
246
|
};
|
|
@@ -291,7 +272,6 @@ export declare const TimelineSchema: z.ZodObject<{
|
|
|
291
272
|
}>;
|
|
292
273
|
export declare class Timeline {
|
|
293
274
|
private startTime;
|
|
294
|
-
duration: number;
|
|
295
275
|
layers: Record<string, Layer>;
|
|
296
276
|
layersOrder: string[];
|
|
297
277
|
fps: number;
|
|
@@ -320,12 +300,11 @@ export declare class Timeline {
|
|
|
320
300
|
removeClip(clipId: string): boolean;
|
|
321
301
|
removeLayer(layerId: string): boolean;
|
|
322
302
|
moveClipToLayer(clipId: string, newLayerId: string): void;
|
|
323
|
-
alignTime(time: number): number;
|
|
303
|
+
alignTime(time: number, roundUp?: boolean): number;
|
|
324
304
|
adjustClipsLayout(): void;
|
|
325
305
|
getFitDuration(): number;
|
|
326
306
|
render(): Promise<void>;
|
|
327
307
|
serialize(): {
|
|
328
|
-
duration: number;
|
|
329
308
|
startTime: number;
|
|
330
309
|
fps: number;
|
|
331
310
|
layers: {
|
|
@@ -333,12 +312,10 @@ export declare class Timeline {
|
|
|
333
312
|
isEnabled: boolean;
|
|
334
313
|
isMuted: boolean;
|
|
335
314
|
clips: {
|
|
336
|
-
name: string;
|
|
337
315
|
type: string;
|
|
338
316
|
id: string;
|
|
339
317
|
duration: number;
|
|
340
318
|
filters: {
|
|
341
|
-
name: string;
|
|
342
319
|
options: {
|
|
343
320
|
lutUrl: string;
|
|
344
321
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./Timeline";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as PIXI from
|
|
2
|
-
import { z } from
|
|
3
|
-
import { Clip } from
|
|
1
|
+
import * as PIXI from "pixi.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { Clip } from "../clip";
|
|
4
4
|
export declare const TransitionSchema: z.ZodObject<{
|
|
5
5
|
id: z.ZodString;
|
|
6
6
|
name: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./Transition";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./clip.types";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function recreateDomCanvas(canvas: HTMLCanvasElement): HTMLCanvasElement;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import * as PIXI from
|
|
1
|
+
import * as PIXI from "pixi.js";
|
|
2
2
|
export declare function createGradientTexture(colorInput: string, width: number, height: number): PIXI.Texture;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rendley/sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"license": "LICENSE",
|
|
5
5
|
"author": "Onix Technologies",
|
|
6
6
|
"homepage": "https://rendley.com",
|
|
@@ -28,12 +28,14 @@
|
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
|
-
"start": "cd example && npm run dev",
|
|
32
31
|
"build:docs": "typedoc",
|
|
33
32
|
"build": "tsc && vite build --mode development",
|
|
34
|
-
"build:
|
|
33
|
+
"build:watch": "tsc && vite build --watch --mode development",
|
|
34
|
+
"build:production": "tsc && vite build --mode production && npm run obfuscate",
|
|
35
35
|
"obfuscate": "node ./plugins/obfuscate.js",
|
|
36
|
-
"test": "jest"
|
|
36
|
+
"test": "jest",
|
|
37
|
+
"lint": "eslint --ext .ts,.tsx src --fix",
|
|
38
|
+
"format": "prettier --write 'src/**/*.{ts,tsx}'"
|
|
37
39
|
},
|
|
38
40
|
"devDependencies": {
|
|
39
41
|
"@babel/core": "7.23.7",
|
|
@@ -52,7 +54,6 @@
|
|
|
52
54
|
"eslint-plugin-import": "2.29.1",
|
|
53
55
|
"javascript-obfuscator": "4.1.0",
|
|
54
56
|
"jest": "29.7.0",
|
|
55
|
-
"lerna": "8.0.1",
|
|
56
57
|
"prettier": "3.1.1",
|
|
57
58
|
"rollup-plugin-copy": "^3.5.0",
|
|
58
59
|
"ts-jest": "29.1.1",
|
|
@@ -62,12 +63,9 @@
|
|
|
62
63
|
"vite-plugin-dts": "3.7.2"
|
|
63
64
|
},
|
|
64
65
|
"dependencies": {
|
|
65
|
-
"@pixi/filter-ascii": "^5.1.1",
|
|
66
|
-
"@pixi/filter-old-film": "^5.1.1",
|
|
67
66
|
"@pixi/gif": "^2.1.1",
|
|
68
67
|
"eventemitter3": "5.0.1",
|
|
69
68
|
"gradient-parser": "^1.0.2",
|
|
70
|
-
"mp4-muxer": "^4.1.0",
|
|
71
69
|
"pixi.js": "7.4.0",
|
|
72
70
|
"uuid": "9.0.1",
|
|
73
71
|
"zod": "3.22.4"
|