@rendley/sdk 1.11.12 → 1.11.13

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.
@@ -5,7 +5,7 @@ import { ClipStyle } from "./ClipStyle";
5
5
  import { Effect, EffectSchema } from "../effect";
6
6
  import { Filter, FilterSchema } from "../filter";
7
7
  import { MaskFilter, MaskFilterSchema, MaskWrapModeEnum } from "../filter/MaskFilter";
8
- import { WrapModeEnum } from '../../types/clip.types';
8
+ import { BlendModeEnum, WrapModeEnum } from '../../types/clip.types';
9
9
  export declare enum ClipState {
10
10
  Idle = 0,
11
11
  Preloading = 1,
@@ -36,6 +36,7 @@ export interface ClipOptions<K extends ClipStyle = ClipStyle> {
36
36
  style?: Partial<ReturnType<K["serialize"]>>;
37
37
  isVisible?: boolean;
38
38
  wrapMode?: WrapModeEnum;
39
+ blendMode?: BlendModeEnum;
39
40
  }
40
41
  export declare const AnimationClassSchema: z.ZodObject<{
41
42
  animationDataIn: z.ZodOptional<z.ZodObject<{
@@ -480,6 +481,7 @@ export declare const ClipSchema: z.ZodObject<{
480
481
  }>, "many">;
481
482
  effects: z.ZodArray<z.ZodAny, "many">;
482
483
  wrapMode: z.ZodOptional<z.ZodNativeEnum<typeof WrapModeEnum>>;
484
+ blendMode: z.ZodOptional<z.ZodNativeEnum<typeof BlendModeEnum>>;
483
485
  style: z.ZodUnknown;
484
486
  text: z.ZodOptional<z.ZodString>;
485
487
  animationController: z.ZodOptional<z.ZodObject<{
@@ -929,6 +931,7 @@ export declare const ClipSchema: z.ZodObject<{
929
931
  mediaDataId?: string | undefined;
930
932
  subtitlesId?: string | undefined;
931
933
  wrapMode?: WrapModeEnum | undefined;
934
+ blendMode?: BlendModeEnum | undefined;
932
935
  style?: unknown;
933
936
  text?: string | undefined;
934
937
  animationController?: {
@@ -1022,6 +1025,7 @@ export declare const ClipSchema: z.ZodObject<{
1022
1025
  mediaDataId?: string | undefined;
1023
1026
  subtitlesId?: string | undefined;
1024
1027
  wrapMode?: WrapModeEnum | undefined;
1028
+ blendMode?: BlendModeEnum | undefined;
1025
1029
  style?: unknown;
1026
1030
  text?: string | undefined;
1027
1031
  animationController?: {
@@ -1107,6 +1111,7 @@ export declare class Clip<T extends PIXI.Sprite = PIXI.Sprite, K extends ClipSty
1107
1111
  protected filters: Filter[];
1108
1112
  protected effects: Effect[];
1109
1113
  protected wrapMode: WrapModeEnum;
1114
+ protected blendMode: BlendModeEnum;
1110
1115
  protected isBuffering: boolean;
1111
1116
  protected mediaDataId?: string;
1112
1117
  protected subtitlesId?: string;
@@ -1198,6 +1203,9 @@ export declare class Clip<T extends PIXI.Sprite = PIXI.Sprite, K extends ClipSty
1198
1203
  getVisible(): boolean;
1199
1204
  setWrapMode(wrapMode: WrapModeEnum): void;
1200
1205
  getWrapMode(): WrapModeEnum;
1206
+ setBlendMode(blendMode: BlendModeEnum): void;
1207
+ getBlendMode(): BlendModeEnum;
1208
+ protected setupBlendingMode(pixiBlendMode: PIXI.BLEND_MODES | undefined): void;
1201
1209
  private updatePIXIFilters;
1202
1210
  hasSprite(): boolean;
1203
1211
  update(currentTime: number): void;
@@ -1224,6 +1232,7 @@ export declare class Clip<T extends PIXI.Sprite = PIXI.Sprite, K extends ClipSty
1224
1232
  mediaDataId?: string | undefined;
1225
1233
  subtitlesId?: string | undefined;
1226
1234
  wrapMode?: WrapModeEnum | undefined;
1235
+ blendMode?: BlendModeEnum | undefined;
1227
1236
  style?: unknown;
1228
1237
  text?: string | undefined;
1229
1238
  animationController?: {
@@ -66,6 +66,7 @@ export declare class AudioClip extends Clip {
66
66
  text?: string | undefined;
67
67
  wrapMode?: import('../../../../types').WrapModeEnum | undefined;
68
68
  subtitlesId?: string | undefined;
69
+ blendMode?: import('../../../../types').BlendModeEnum | undefined;
69
70
  style?: unknown;
70
71
  animationController?: {
71
72
  animationInDuration: number;
@@ -28,6 +28,7 @@ export declare class CustomClip extends Clip<PIXI.Sprite, ClipStyle> {
28
28
  mediaDataId?: string | undefined;
29
29
  subtitlesId?: string | undefined;
30
30
  wrapMode?: import('../../../../index').WrapModeEnum | undefined;
31
+ blendMode?: import('../../../../index').BlendModeEnum | undefined;
31
32
  style?: unknown;
32
33
  text?: string | undefined;
33
34
  animationController?: {
@@ -46,7 +46,7 @@ declare const HtmlTextStyleSchema: zod.ZodObject<{
46
46
  letterSpacing: number;
47
47
  lineHeight: number;
48
48
  stroke: string;
49
- whiteSpace: "pre" | "normal" | "pre-line";
49
+ whiteSpace: "normal" | "pre" | "pre-line";
50
50
  wordWrap: boolean;
51
51
  }, {
52
52
  align?: "left" | "center" | "right" | "justify" | undefined;
@@ -68,7 +68,7 @@ declare const HtmlTextStyleSchema: zod.ZodObject<{
68
68
  padding?: number | undefined;
69
69
  stroke?: string | undefined;
70
70
  strokeThickness?: number | undefined;
71
- whiteSpace?: "pre" | "normal" | "pre-line" | undefined;
71
+ whiteSpace?: "normal" | "pre" | "pre-line" | undefined;
72
72
  wordWrap?: boolean | undefined;
73
73
  wordWrapWidth?: number | undefined;
74
74
  }>;
@@ -109,7 +109,7 @@ export declare class HtmlTextClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprit
109
109
  letterSpacing: number;
110
110
  lineHeight: number;
111
111
  stroke: string;
112
- whiteSpace: "pre" | "normal" | "pre-line";
112
+ whiteSpace: "normal" | "pre" | "pre-line";
113
113
  wordWrap: boolean;
114
114
  };
115
115
  loadFonts(fonts: string[]): Promise<void>;
@@ -155,13 +155,14 @@ export declare class HtmlTextClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprit
155
155
  letterSpacing: number;
156
156
  lineHeight: number;
157
157
  stroke: string;
158
- whiteSpace: "pre" | "normal" | "pre-line";
158
+ whiteSpace: "normal" | "pre" | "pre-line";
159
159
  wordWrap: boolean;
160
160
  };
161
161
  text?: string | undefined;
162
162
  wrapMode?: import('../../../../types').WrapModeEnum | undefined;
163
163
  mediaDataId?: string | undefined;
164
164
  subtitlesId?: string | undefined;
165
+ blendMode?: import('../../../../types').BlendModeEnum | undefined;
165
166
  style?: unknown;
166
167
  animationController?: {
167
168
  animationInDuration: number;
@@ -11,3 +11,4 @@ export * from "./subtitles/SubtitlesClip";
11
11
  export * from "./custom/CustomClip";
12
12
  export * from "./lottie/LottieClip";
13
13
  export * from "./htmlText/HtmlTextClip";
14
+ export * from "./placeholder/PlaceholderClip";
@@ -184,6 +184,7 @@ export declare class LottieClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>
184
184
  wrapMode?: WrapModeEnum | undefined;
185
185
  mediaDataId?: string | undefined;
186
186
  subtitlesId?: string | undefined;
187
+ blendMode?: import('../../../../types').BlendModeEnum | undefined;
187
188
  style?: unknown;
188
189
  animationController?: {
189
190
  animationInDuration: number;
@@ -0,0 +1,16 @@
1
+ import { Clip, ClipOptions } from '../../../../index';
2
+ export declare enum PlaceholderClipState {
3
+ Loading = "Loading",
4
+ Error = "Error",
5
+ Loaded = "Loaded"
6
+ }
7
+ export declare class PlaceholderClip extends Clip {
8
+ private placeholderState;
9
+ constructor(options: ClipOptions);
10
+ init(layerId: string): Promise<void>;
11
+ hasSprite(): boolean;
12
+ setMediaDataId(mediaId: string): void;
13
+ getMediaDataId(): string | undefined;
14
+ setPlaceholderState(placeholderState: PlaceholderClipState): void;
15
+ getPlaceholderState(): PlaceholderClipState;
16
+ }
@@ -31,6 +31,7 @@ export declare class ShapeClip extends Clip<ShapeSprite, ShapeStyle> {
31
31
  mediaDataId?: string | undefined;
32
32
  subtitlesId?: string | undefined;
33
33
  wrapMode?: import('../../../../types').WrapModeEnum | undefined;
34
+ blendMode?: import('../../../../types').BlendModeEnum | undefined;
34
35
  style?: unknown;
35
36
  text?: string | undefined;
36
37
  animationController?: {
@@ -39,6 +39,7 @@ export declare class TextClip extends Clip<TextSprite, TextStyle> {
39
39
  wrapMode?: import('../../../../index').WrapModeEnum | undefined;
40
40
  mediaDataId?: string | undefined;
41
41
  subtitlesId?: string | undefined;
42
+ blendMode?: import('../../../../index').BlendModeEnum | undefined;
42
43
  style?: unknown;
43
44
  animationController?: {
44
45
  animationInDuration: number;
@@ -90,6 +90,7 @@ export declare class VideoClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>>
90
90
  text?: string | undefined;
91
91
  wrapMode?: import('../../../../types').WrapModeEnum | undefined;
92
92
  subtitlesId?: string | undefined;
93
+ blendMode?: import('../../../../types').BlendModeEnum | undefined;
93
94
  style?: unknown;
94
95
  animationController?: {
95
96
  animationInDuration: number;
@@ -22,6 +22,7 @@ export declare const LibrarySchema: z.ZodObject<{
22
22
  hash: z.ZodOptional<z.ZodString>;
23
23
  mimeType: z.ZodOptional<z.ZodString>;
24
24
  customData: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodUnknown], null>, "many">>;
25
+ placeholderClipIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
25
26
  }, "strip", z.ZodTypeAny, {
26
27
  type: string;
27
28
  id: string;
@@ -30,6 +31,7 @@ export declare const LibrarySchema: z.ZodObject<{
30
31
  hash?: string | undefined;
31
32
  mimeType?: string | undefined;
32
33
  customData?: [string, unknown][] | undefined;
34
+ placeholderClipIds?: string[] | undefined;
33
35
  }, {
34
36
  type: string;
35
37
  id: string;
@@ -38,6 +40,7 @@ export declare const LibrarySchema: z.ZodObject<{
38
40
  hash?: string | undefined;
39
41
  mimeType?: string | undefined;
40
42
  customData?: [string, unknown][] | undefined;
43
+ placeholderClipIds?: string[] | undefined;
41
44
  }>, "many">;
42
45
  subtitles: z.ZodArray<z.ZodObject<{
43
46
  id: z.ZodString;
@@ -320,6 +323,7 @@ export declare const LibrarySchema: z.ZodObject<{
320
323
  hash?: string | undefined;
321
324
  mimeType?: string | undefined;
322
325
  customData?: [string, unknown][] | undefined;
326
+ placeholderClipIds?: string[] | undefined;
323
327
  }[];
324
328
  }, {
325
329
  subtitles: {
@@ -386,6 +390,7 @@ export declare const LibrarySchema: z.ZodObject<{
386
390
  hash?: string | undefined;
387
391
  mimeType?: string | undefined;
388
392
  customData?: [string, unknown][] | undefined;
393
+ placeholderClipIds?: string[] | undefined;
389
394
  }[];
390
395
  }>;
391
396
  export declare class Library {
@@ -403,7 +408,24 @@ export declare class Library {
403
408
  addMedia(source: File | string | Uint8Array, mimeType?: string): Promise<string | null>;
404
409
  addSerializedMedia(data: any): Promise<string>;
405
410
  deleteMedia(id: string): Promise<void>;
411
+ /**
412
+ * @deprecated Use syncAllMedia instead, that will also remove media that are not in the library
413
+ * Stores all media data in the library using the storage controller.
414
+ * Initiates a batch operation, attempts to store each media asynchronously,
415
+ * and ensures that all operations are completed. If any error occurs during
416
+ * the process, it logs the error. Finally, it ends the batch operation.
417
+ */
406
418
  storeAllMedia(): Promise<void>;
419
+ /**
420
+ * Syncs all media data in the library with the storage controller.
421
+ * Stores all media data in the library using the storage controller.
422
+ * Removes media that are not in the library.
423
+ * Initiates a batch operation, attempts to store each media asynchronously,
424
+ * removes media that are not in the library asynchronously,
425
+ * and ensures that all operations are completed. If any error occurs during
426
+ * the process, it logs the error. Finally, it ends the batch operation.
427
+ */
428
+ syncAllMedia(): Promise<void>;
407
429
  replaceMedia(id: string, file: File | string | Uint8Array, mimeType?: string): Promise<boolean>;
408
430
  replaceSerializedMedia(data: any): Promise<boolean>;
409
431
  addEffect(options: EffectDataOptions): Promise<string>;
@@ -495,6 +517,7 @@ export declare class Library {
495
517
  hash?: string | undefined;
496
518
  mimeType?: string | undefined;
497
519
  customData?: [string, unknown][] | undefined;
520
+ placeholderClipIds?: string[] | undefined;
498
521
  }[];
499
522
  };
500
523
  static deserialize(data: object): Library;
@@ -8,6 +8,7 @@ export declare const MediaDataSchema: z.ZodObject<{
8
8
  hash: z.ZodOptional<z.ZodString>;
9
9
  mimeType: z.ZodOptional<z.ZodString>;
10
10
  customData: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodUnknown], null>, "many">>;
11
+ placeholderClipIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
11
12
  }, "strip", z.ZodTypeAny, {
12
13
  type: string;
13
14
  id: string;
@@ -16,6 +17,7 @@ export declare const MediaDataSchema: z.ZodObject<{
16
17
  hash?: string | undefined;
17
18
  mimeType?: string | undefined;
18
19
  customData?: [string, unknown][] | undefined;
20
+ placeholderClipIds?: string[] | undefined;
19
21
  }, {
20
22
  type: string;
21
23
  id: string;
@@ -24,6 +26,7 @@ export declare const MediaDataSchema: z.ZodObject<{
24
26
  hash?: string | undefined;
25
27
  mimeType?: string | undefined;
26
28
  customData?: [string, unknown][] | undefined;
29
+ placeholderClipIds?: string[] | undefined;
27
30
  }>;
28
31
  export declare enum MediaDataStatus {
29
32
  NONE = "none",
@@ -52,6 +55,7 @@ export declare class MediaData {
52
55
  hash?: string;
53
56
  mimeType?: string;
54
57
  customData?: Map<string, unknown>;
58
+ placeholderClipIds: string[];
55
59
  audioSplit?: string;
56
60
  private static lockMediaInfo;
57
61
  private waitForMediaInfoUnlock;
@@ -62,6 +66,11 @@ export declare class MediaData {
62
66
  getId(): string;
63
67
  store(): Promise<void>;
64
68
  restore(): Promise<boolean>;
69
+ addPlaceholderClip(clipId: string): Promise<void>;
70
+ getPlaceholderClips(): ReadonlyArray<string>;
71
+ removePlaceholderClip(clipId: string): void;
72
+ removeAllPlaceholderClips(): void;
73
+ private checkPlaceholderClips;
65
74
  setCustomData(key: string, value: unknown, overwrite?: boolean): boolean;
66
75
  getCustomData(key: string): unknown;
67
76
  hasCustomData(key: string): boolean;
@@ -119,6 +128,7 @@ export declare class MediaData {
119
128
  hash?: string | undefined;
120
129
  mimeType?: string | undefined;
121
130
  customData?: [string, unknown][] | undefined;
131
+ placeholderClipIds?: string[] | undefined;
122
132
  };
123
133
  static deserialize(data: object): MediaData;
124
134
  }
@@ -14,4 +14,5 @@ export declare class StorageController {
14
14
  removeMedia(mediaHash: string): Promise<void>;
15
15
  hasMedia(mediaHash: string): Promise<boolean>;
16
16
  syncProviders(master: StorageProviderBase): Promise<boolean>;
17
+ getMediaHashList(): Promise<string[]>;
17
18
  }
@@ -1,3 +1,4 @@
1
+ import { BlendModeEnum, WrapModeEnum } from '../../types';
1
2
  import { AnimationTypeEnum } from "../clip";
2
3
  import { ShapeTypeEnum } from "../clip/clips/shape/types/Shape.types";
3
4
  import { TextBlock } from "../library";
@@ -19,6 +20,8 @@ export declare enum UndoActionEnum {
19
20
  CLIP_ANIMATION_SET = "clip-animation-set",
20
21
  CLIP_ANIMATION_SET_DURATION = "clip-animation-set-duration",
21
22
  CLIP_ANIMATION_SET_LOOP_SMOOTHING = "clip-animation-set-loop-smoothing",
23
+ CLIP_WRAP_MODE = "clip-wrap-mode",
24
+ CLIP_BLEND_MODE = "clip-blend-mode",
22
25
  CLIP_STYLE_POSITION = "clip-style-position",
23
26
  CLIP_STYLE_SCALE = "clip-style-scale",
24
27
  CLIP_STYLE_ROTATION = "clip-style-rotation",
@@ -123,6 +126,14 @@ export type UndoActionMappings = {
123
126
  subtitlesId: string | undefined;
124
127
  offset: number;
125
128
  };
129
+ [UndoActionEnum.CLIP_WRAP_MODE]: {
130
+ clipId: string;
131
+ wrapMode: WrapModeEnum;
132
+ };
133
+ [UndoActionEnum.CLIP_BLEND_MODE]: {
134
+ clipId: string;
135
+ blendMode: BlendModeEnum;
136
+ };
126
137
  [UndoActionEnum.CLIP_STYLE_POSITION]: {
127
138
  clipId: string;
128
139
  value: [number, number];
@@ -9,6 +9,7 @@ export declare enum ClipTypeEnum {
9
9
  SHAPE = "shape",
10
10
  LOTTIE = "lottie",
11
11
  SUBTITLES = "subtitles",
12
+ PLACEHOLDER = "placeholder",
12
13
  CUSTOM = "custom"
13
14
  }
14
15
  export declare enum WrapModeEnum {
@@ -17,3 +18,9 @@ export declare enum WrapModeEnum {
17
18
  PING_PONG = "ping_pong",
18
19
  EMPTY = "empty"
19
20
  }
21
+ export declare enum BlendModeEnum {
22
+ NORMAL = "normal",
23
+ ADD = "add",
24
+ SCREEN = "screen",
25
+ MULTIPLY = "multiply"
26
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rendley/sdk",
3
- "version": "1.11.12",
3
+ "version": "1.11.13",
4
4
  "license": "LICENSE",
5
5
  "author": "Onix Technologies",
6
6
  "homepage": "https://rendley.com",