@rendley/sdk 1.5.3 → 1.7.0

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.
Files changed (32) hide show
  1. package/dist/Engine.d.ts +20 -13
  2. package/dist/index.cjs +1 -1
  3. package/dist/index.d.ts +2 -1
  4. package/dist/index.js +1 -1
  5. package/dist/modules/clip/Clip.d.ts +187 -55
  6. package/dist/modules/clip/ClipStyle.d.ts +7 -5
  7. package/dist/modules/clip/clips/audio/AudioClip.d.ts +31 -13
  8. package/dist/modules/clip/clips/custom/CustomClip.d.ts +27 -10
  9. package/dist/modules/clip/clips/htmlText/HtmlTextClip.d.ts +71 -37
  10. package/dist/modules/clip/clips/lottie/LottieClip.d.ts +44 -12
  11. package/dist/modules/clip/clips/shape/ShapeClip.d.ts +29 -12
  12. package/dist/modules/clip/clips/shape/ShapeStyle.d.ts +55 -2
  13. package/dist/modules/clip/clips/text/TextClip.d.ts +29 -12
  14. package/dist/modules/clip/clips/text/TextStyle.d.ts +95 -6
  15. package/dist/modules/clip/clips/video/VideoClip.d.ts +40 -18
  16. package/dist/modules/display/Display.d.ts +3 -3
  17. package/dist/modules/event-emitter/types/EventEmitter.types.d.ts +20 -1
  18. package/dist/modules/filter/Effect.d.ts +50 -1
  19. package/dist/modules/filter/Filter.d.ts +3 -3
  20. package/dist/modules/filter/MaskFilter.d.ts +46 -0
  21. package/dist/modules/layer/Layer.d.ts +7 -5
  22. package/dist/modules/library/Library.d.ts +3 -1
  23. package/dist/modules/library/Subtitles.d.ts +2 -2
  24. package/dist/modules/{subtitleManager → subtitles}/SubtitleManager.d.ts +86 -86
  25. package/dist/modules/timeline/Timeline.d.ts +8 -1
  26. package/dist/modules/undo/UndoManager.d.ts +35 -0
  27. package/dist/modules/undo/UndoManager.types.d.ts +292 -0
  28. package/dist/modules/undo/index.d.ts +2 -0
  29. package/dist/types/clip.types.d.ts +1 -1
  30. package/dist/utils/animation/animation.d.ts +3 -3
  31. package/package.json +1 -1
  32. /package/dist/modules/{subtitleManager → subtitles}/index.d.ts +0 -0
@@ -0,0 +1,292 @@
1
+ import { TextBlock } from "../library";
2
+ import { HighlightAnimationEnum } from "../subtitles";
3
+ export declare enum UndoActionEnum {
4
+ MEDIA_ADD = "media-add",
5
+ MEDIA_REMOVE = "media-remove",
6
+ MEDIA_REPLACE = "media-replace",
7
+ LAYER_ADD = "layer-add",
8
+ LAYER_REMOVE = "layer-remove",
9
+ CLIP_ADD = "clip-add",
10
+ CLIP_REMOVE = "clip-remove",
11
+ CLIP_START_TIME = "clip-start-time",
12
+ CLIP_RIGHT_TRIM = "clip-right-trim",
13
+ CLIP_LEFT_TRIM = "clip-left-trim",
14
+ CLIP_MOVE_TO_LAYER = "clip-move-to-layer",
15
+ CLIP_SUBTITLES_SETTINGS = "clip-subtitles-settings",
16
+ CLIP_STYLE_POSITION = "clip-style-position",
17
+ CLIP_STYLE_SCALE = "clip-style-scale",
18
+ CLIP_STYLE_ROTATION = "clip-style-rotation",
19
+ CLIP_STYLE_ALPHA = "clip-style-alpha",
20
+ CLIP_STYLE_CORNER_RADIUS = "clip-style-corner-radius",
21
+ CLIP_TEXT_TEXT = "clip-text-text",
22
+ CLIP_TEXT_COLOR = "clip-text-color",
23
+ CLIP_TEXT_FONT_SIZE = "clip-text-font-size",
24
+ CLIP_TEXT_FONT_WEIGHT = "clip-text-font-weight",
25
+ CLIP_TEXT_FONT_FAMILY = "clip-text-font-family",
26
+ CLIP_TEXT_TEXT_ALIGN = "clip-text-text-align",
27
+ CLIP_TEXT_FONT_STYLE = "clip-text-font-style",
28
+ CLIP_TEXT_BACKGROUND_COLOR = "clip-text-background-color",
29
+ CLIP_TEXT_WORD_WRAP_WIDTH = "clip-text-word-wrap-width",
30
+ CLIP_TEXT_STROKE_COLOR = "clip-text-stroke-color",
31
+ CLIP_TEXT_STROKE_THICKNESS = "clip-text-stroke-thickness",
32
+ CLIP_TEXT_PADDING = "clip-text-padding",
33
+ CLIP_HTML_TEXT = "clip-html-text",
34
+ CLIP_HTML_STYLE = "clip-html-style",
35
+ CLIP_LOTTIE_PROPERTY = "clip-lottie-property",
36
+ TRANSITION_ADD = "transition-add",
37
+ TRANSITION_REMOVE = "transition-remove",
38
+ FILTER_ADD = "filter-add",
39
+ FILTER_REMOVE = "filter-remove",
40
+ EFFECT_ADD = "effect-add",
41
+ EFFECT_REMOVE = "effect-remove",
42
+ SUBTITLES_TEXT_MODE = "subtitles-text-mode",
43
+ SUBTITLES_MAIN_TEXT_STYLE = "subtitles-main-text-style",
44
+ SUBTITLES_HIGHLIGHT_TEXT_STYLE = "subtitles-highlighted-text-style",
45
+ SUBTITLES_HIGHLIGHT_ANIMATION = "subtitles-highlight-animation",
46
+ LIBRARY_SUBTITLES_ADD = "library-subtitles-add",
47
+ LIBRARY_SUBTITLES_REMOVE = "library-subtitles-remove",
48
+ LIBRARY_SUBTITLES_ADD_BLOCK = "library-subtitles-add-block",
49
+ LIBRARY_SUBTITLES_REMOVE_BLOCK = "library-subtitles-remove-block",
50
+ LIBRARY_SUBTITLES_UPDATE_BLOCK = "library-subtitles-update-block",
51
+ LIBRARY_SUBTITLES_SET_BLOCKS = "library-subtitles-set-blocks",
52
+ DISPLAY_BACKGROUND_COLOR = "display-background-color",
53
+ DISPLAY_RESOLUTION = "display-resolution"
54
+ }
55
+ export type UndoActionMappings = {
56
+ [UndoActionEnum.MEDIA_ADD]: {
57
+ mediaDataId: string;
58
+ };
59
+ [UndoActionEnum.MEDIA_REMOVE]: {
60
+ mediaDataId: string;
61
+ data: any;
62
+ };
63
+ [UndoActionEnum.MEDIA_REPLACE]: {
64
+ mediaDataId: string;
65
+ prevMediaData: any;
66
+ };
67
+ [UndoActionEnum.LAYER_ADD]: {
68
+ layerId: string;
69
+ };
70
+ [UndoActionEnum.LAYER_REMOVE]: {
71
+ layerId: string;
72
+ data: any;
73
+ layerIndex: number;
74
+ };
75
+ [UndoActionEnum.CLIP_ADD]: {
76
+ clipId: string;
77
+ };
78
+ [UndoActionEnum.CLIP_REMOVE]: {
79
+ clipId: string;
80
+ layerId: string;
81
+ data: any;
82
+ };
83
+ [UndoActionEnum.CLIP_START_TIME]: {
84
+ clipId: string;
85
+ value: number;
86
+ };
87
+ [UndoActionEnum.CLIP_RIGHT_TRIM]: {
88
+ clipId: string;
89
+ value: number;
90
+ };
91
+ [UndoActionEnum.CLIP_LEFT_TRIM]: {
92
+ clipId: string;
93
+ value: number;
94
+ };
95
+ [UndoActionEnum.CLIP_MOVE_TO_LAYER]: {
96
+ clipId: string;
97
+ fromLayerId: string;
98
+ toLayerId: string;
99
+ };
100
+ [UndoActionEnum.CLIP_SUBTITLES_SETTINGS]: {
101
+ clipId: string;
102
+ prevSubtitlesId: string | undefined;
103
+ prevOffset: number;
104
+ subtitlesId: string | undefined;
105
+ offset: number;
106
+ };
107
+ [UndoActionEnum.CLIP_STYLE_POSITION]: {
108
+ clipId: string;
109
+ value: [number, number];
110
+ };
111
+ [UndoActionEnum.CLIP_STYLE_SCALE]: {
112
+ clipId: string;
113
+ value: [number, number];
114
+ };
115
+ [UndoActionEnum.CLIP_STYLE_ROTATION]: {
116
+ clipId: string;
117
+ value: number;
118
+ };
119
+ [UndoActionEnum.CLIP_STYLE_ALPHA]: {
120
+ clipId: string;
121
+ value: number;
122
+ };
123
+ [UndoActionEnum.CLIP_STYLE_CORNER_RADIUS]: {
124
+ clipId: string;
125
+ cornerRadius: number[];
126
+ relative: boolean;
127
+ };
128
+ [UndoActionEnum.CLIP_TEXT_TEXT]: {
129
+ clipId: string;
130
+ prevText: string;
131
+ text: string;
132
+ };
133
+ [UndoActionEnum.CLIP_TEXT_COLOR]: {
134
+ clipId: string;
135
+ prevColor: string;
136
+ color: string;
137
+ };
138
+ [UndoActionEnum.CLIP_TEXT_FONT_SIZE]: {
139
+ clipId: string;
140
+ prevFontSize: number;
141
+ fontSize: number;
142
+ };
143
+ [UndoActionEnum.CLIP_TEXT_FONT_WEIGHT]: {
144
+ clipId: string;
145
+ prevFontWeight: string;
146
+ fontWeight: string;
147
+ };
148
+ [UndoActionEnum.CLIP_TEXT_FONT_FAMILY]: {
149
+ clipId: string;
150
+ prevFontFamily: string;
151
+ fontFamily: string;
152
+ };
153
+ [UndoActionEnum.CLIP_TEXT_TEXT_ALIGN]: {
154
+ clipId: string;
155
+ prevTextAlign: string;
156
+ textAlign: string;
157
+ };
158
+ [UndoActionEnum.CLIP_TEXT_FONT_STYLE]: {
159
+ clipId: string;
160
+ prevFontStyle: string;
161
+ fontStyle: string;
162
+ };
163
+ [UndoActionEnum.CLIP_TEXT_BACKGROUND_COLOR]: {
164
+ clipId: string;
165
+ prevBackgroundColor: string | null;
166
+ backgroundColor: string | null;
167
+ };
168
+ [UndoActionEnum.CLIP_TEXT_WORD_WRAP_WIDTH]: {
169
+ clipId: string;
170
+ prevWordWrapWidth: number | null;
171
+ wordWrapWidth: number | null;
172
+ };
173
+ [UndoActionEnum.CLIP_TEXT_STROKE_COLOR]: {
174
+ clipId: string;
175
+ prevStrokeColor: string;
176
+ strokeColor: string;
177
+ };
178
+ [UndoActionEnum.CLIP_TEXT_STROKE_THICKNESS]: {
179
+ clipId: string;
180
+ prevStrokeThickness: number;
181
+ strokeThickness: number;
182
+ };
183
+ [UndoActionEnum.CLIP_TEXT_PADDING]: {
184
+ clipId: string;
185
+ prevPadding: number | number[];
186
+ padding: number | number[];
187
+ };
188
+ [UndoActionEnum.CLIP_HTML_TEXT]: {
189
+ clipId: string;
190
+ prevText: string;
191
+ text: string;
192
+ };
193
+ [UndoActionEnum.CLIP_HTML_STYLE]: {
194
+ clipId: string;
195
+ prevStyle: any;
196
+ style: any;
197
+ };
198
+ [UndoActionEnum.CLIP_LOTTIE_PROPERTY]: {
199
+ clipId: string;
200
+ property: string;
201
+ prevValue: any;
202
+ value: any;
203
+ };
204
+ [UndoActionEnum.TRANSITION_ADD]: {
205
+ layerId: string;
206
+ transition: any;
207
+ prevTransitions: any[];
208
+ };
209
+ [UndoActionEnum.TRANSITION_REMOVE]: {
210
+ layerId: string;
211
+ transition: any;
212
+ };
213
+ [UndoActionEnum.FILTER_ADD]: {
214
+ clipId: string;
215
+ filter: any;
216
+ prevFilters: any[];
217
+ };
218
+ [UndoActionEnum.FILTER_REMOVE]: {
219
+ clipId: string;
220
+ filter: any;
221
+ };
222
+ [UndoActionEnum.EFFECT_ADD]: {
223
+ clipId: string;
224
+ effect: any;
225
+ prevEffects: any[];
226
+ };
227
+ [UndoActionEnum.EFFECT_REMOVE]: {
228
+ clipId: string;
229
+ effect: any;
230
+ };
231
+ [UndoActionEnum.SUBTITLES_TEXT_MODE]: {
232
+ prevTextMode: string;
233
+ textMode: string;
234
+ };
235
+ [UndoActionEnum.SUBTITLES_MAIN_TEXT_STYLE]: {
236
+ prevMainTextStyle: any;
237
+ mainTextStyle: any;
238
+ };
239
+ [UndoActionEnum.SUBTITLES_HIGHLIGHT_TEXT_STYLE]: {
240
+ prevHighlightTextStyle: any;
241
+ highlightTextStyle: any;
242
+ };
243
+ [UndoActionEnum.SUBTITLES_HIGHLIGHT_ANIMATION]: {
244
+ prevAnimation: HighlightAnimationEnum;
245
+ prevSpeed: number;
246
+ animation: HighlightAnimationEnum;
247
+ speed: number;
248
+ };
249
+ [UndoActionEnum.LIBRARY_SUBTITLES_ADD]: {
250
+ subtitlesId: string;
251
+ };
252
+ [UndoActionEnum.LIBRARY_SUBTITLES_REMOVE]: {
253
+ subtitlesId: string;
254
+ subtitles: any;
255
+ };
256
+ [UndoActionEnum.LIBRARY_SUBTITLES_ADD_BLOCK]: {
257
+ subtitlesId: string;
258
+ index: number;
259
+ };
260
+ [UndoActionEnum.LIBRARY_SUBTITLES_REMOVE_BLOCK]: {
261
+ subtitlesId: string;
262
+ index: number;
263
+ textBlock: TextBlock;
264
+ };
265
+ [UndoActionEnum.LIBRARY_SUBTITLES_UPDATE_BLOCK]: {
266
+ subtitlesId: string;
267
+ index: number;
268
+ prevTextBlock: TextBlock;
269
+ };
270
+ [UndoActionEnum.LIBRARY_SUBTITLES_SET_BLOCKS]: {
271
+ subtitlesId: string;
272
+ prevTextBlocks: TextBlock[];
273
+ };
274
+ [UndoActionEnum.DISPLAY_BACKGROUND_COLOR]: {
275
+ prevBackgroundColor: string;
276
+ backgroundColor: string;
277
+ };
278
+ [UndoActionEnum.DISPLAY_RESOLUTION]: {
279
+ prevResolution: [number, number];
280
+ resolution: [number, number];
281
+ };
282
+ };
283
+ export declare class UndoRecord {
284
+ action: UndoActionEnum;
285
+ data: any;
286
+ constructor(action: UndoActionEnum, data: any);
287
+ }
288
+ export declare class UndoGroup {
289
+ records: UndoRecord[];
290
+ name: string;
291
+ constructor(name: string);
292
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./UndoManager";
2
+ export * from "./UndoManager.types";
@@ -14,7 +14,7 @@ export declare enum ClipTypeEnum {
14
14
  COLOR = "color",
15
15
  GRADIENT = "gradient"
16
16
  }
17
- export declare enum WarpModeEnum {
17
+ export declare enum WrapModeEnum {
18
18
  CLAMP = "clamp",
19
19
  REPEAT = "repeat",
20
20
  PING_PONG = "ping_ping",
@@ -110,9 +110,9 @@ export declare const PropertyAnimationSchema: z.ZodObject<{
110
110
  relativeProperty?: string | undefined;
111
111
  }>, "many">;
112
112
  }, "strip", z.ZodTypeAny, {
113
- property: string;
114
113
  inOutOfRange: OutOfRangeEnum;
115
114
  outOutOfRange: OutOfRangeEnum;
115
+ property: string;
116
116
  keyframes: {
117
117
  time: number;
118
118
  value: string | number;
@@ -163,9 +163,9 @@ export declare const AnimationDataSchema: z.ZodObject<{
163
163
  relativeProperty?: string | undefined;
164
164
  }>, "many">;
165
165
  }, "strip", z.ZodTypeAny, {
166
- property: string;
167
166
  inOutOfRange: OutOfRangeEnum;
168
167
  outOutOfRange: OutOfRangeEnum;
168
+ property: string;
169
169
  keyframes: {
170
170
  time: number;
171
171
  value: string | number;
@@ -190,9 +190,9 @@ export declare const AnimationDataSchema: z.ZodObject<{
190
190
  inOutOfRange: OutOfRangeEnum;
191
191
  outOutOfRange: OutOfRangeEnum;
192
192
  propertyAnimations: {
193
- property: string;
194
193
  inOutOfRange: OutOfRangeEnum;
195
194
  outOutOfRange: OutOfRangeEnum;
195
+ property: string;
196
196
  keyframes: {
197
197
  time: number;
198
198
  value: string | number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rendley/sdk",
3
- "version": "1.5.3",
3
+ "version": "1.7.0",
4
4
  "license": "LICENSE",
5
5
  "author": "Onix Technologies",
6
6
  "homepage": "https://rendley.com",