@rendley/sdk 1.14.3 → 1.15.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.
@@ -1,6 +1,7 @@
1
1
  import { TextSprite } from "./TextSprite";
2
2
  import { TextStyle } from "./TextStyle";
3
3
  import { /*AnimationTypeEnum,*/ Clip, ClipOptions } from "../../Clip";
4
+ import { PropertyDescriptionTypeEnum } from '../../../library/types/Property.types';
4
5
  export interface TextClipOptions extends ClipOptions<TextStyle> {
5
6
  text?: string;
6
7
  }
@@ -11,6 +12,7 @@ export declare class TextClip extends Clip<TextSprite, TextStyle> {
11
12
  getText(): string;
12
13
  setText(text?: string, force?: boolean): void;
13
14
  setAnimationText(text: string): void;
15
+ protected registerAnimatableProperties(): void;
14
16
  seek(currentTime: number): void;
15
17
  preload(currentTime: number): void;
16
18
  update(currentTime: number): void;
@@ -38,11 +40,11 @@ export declare class TextClip extends Clip<TextSprite, TextStyle> {
38
40
  effects: any[];
39
41
  isVisible: boolean;
40
42
  name?: string | undefined;
43
+ customData?: [string, unknown][] | undefined;
41
44
  wrapMode?: import('../../../../index').WrapModeEnum | undefined;
42
45
  blendMode?: import('../../../../index').BlendModeEnum | undefined;
43
46
  style?: unknown;
44
47
  mediaDataId?: string | undefined;
45
- customData?: [string, unknown][] | undefined;
46
48
  subtitlesId?: string | undefined;
47
49
  animationController?: {
48
50
  animationInDuration: number;
@@ -54,8 +56,6 @@ export declare class TextClip extends Clip<TextSprite, TextStyle> {
54
56
  inOutOfRange: import('../../../../index').OutOfRangeEnum;
55
57
  outOutOfRange: import('../../../../index').OutOfRangeEnum;
56
58
  propertyAnimations: {
57
- inOutOfRange: import('../../../../index').OutOfRangeEnum;
58
- outOutOfRange: import('../../../../index').OutOfRangeEnum;
59
59
  property: string;
60
60
  keyframes: {
61
61
  value: string | number;
@@ -64,6 +64,8 @@ export declare class TextClip extends Clip<TextSprite, TextStyle> {
64
64
  space: import('../../../../index').AnimationSpaceEnum;
65
65
  relativeProperty?: string | undefined;
66
66
  }[];
67
+ inOutOfRange: import('../../../../index').OutOfRangeEnum;
68
+ outOutOfRange: import('../../../../index').OutOfRangeEnum;
67
69
  }[];
68
70
  speed?: number | undefined;
69
71
  offset?: number | undefined;
@@ -74,8 +76,6 @@ export declare class TextClip extends Clip<TextSprite, TextStyle> {
74
76
  inOutOfRange: import('../../../../index').OutOfRangeEnum;
75
77
  outOutOfRange: import('../../../../index').OutOfRangeEnum;
76
78
  propertyAnimations: {
77
- inOutOfRange: import('../../../../index').OutOfRangeEnum;
78
- outOutOfRange: import('../../../../index').OutOfRangeEnum;
79
79
  property: string;
80
80
  keyframes: {
81
81
  value: string | number;
@@ -84,6 +84,8 @@ export declare class TextClip extends Clip<TextSprite, TextStyle> {
84
84
  space: import('../../../../index').AnimationSpaceEnum;
85
85
  relativeProperty?: string | undefined;
86
86
  }[];
87
+ inOutOfRange: import('../../../../index').OutOfRangeEnum;
88
+ outOutOfRange: import('../../../../index').OutOfRangeEnum;
87
89
  }[];
88
90
  speed?: number | undefined;
89
91
  offset?: number | undefined;
@@ -94,8 +96,6 @@ export declare class TextClip extends Clip<TextSprite, TextStyle> {
94
96
  inOutOfRange: import('../../../../index').OutOfRangeEnum;
95
97
  outOutOfRange: import('../../../../index').OutOfRangeEnum;
96
98
  propertyAnimations: {
97
- inOutOfRange: import('../../../../index').OutOfRangeEnum;
98
- outOutOfRange: import('../../../../index').OutOfRangeEnum;
99
99
  property: string;
100
100
  keyframes: {
101
101
  value: string | number;
@@ -104,6 +104,8 @@ export declare class TextClip extends Clip<TextSprite, TextStyle> {
104
104
  space: import('../../../../index').AnimationSpaceEnum;
105
105
  relativeProperty?: string | undefined;
106
106
  }[];
107
+ inOutOfRange: import('../../../../index').OutOfRangeEnum;
108
+ outOutOfRange: import('../../../../index').OutOfRangeEnum;
107
109
  }[];
108
110
  speed?: number | undefined;
109
111
  offset?: number | undefined;
@@ -115,6 +117,37 @@ export declare class TextClip extends Clip<TextSprite, TextStyle> {
115
117
  id: string;
116
118
  clipId: string;
117
119
  }[] | undefined;
120
+ propertyAnimator?: {
121
+ tracks: {
122
+ type: PropertyDescriptionTypeEnum;
123
+ property: string;
124
+ keyframes: {
125
+ value: (string | number | boolean | number[]) & (string | number | boolean | number[] | undefined);
126
+ time: number;
127
+ handleIn: {
128
+ value: number;
129
+ time: number;
130
+ };
131
+ handleOut: {
132
+ value: number;
133
+ time: number;
134
+ };
135
+ hold?: boolean | undefined;
136
+ }[];
137
+ defaults?: {
138
+ handleIn?: {
139
+ value: number;
140
+ time: number;
141
+ } | undefined;
142
+ handleOut?: {
143
+ value: number;
144
+ time: number;
145
+ } | undefined;
146
+ hold?: boolean | undefined;
147
+ } | undefined;
148
+ customData?: [string, unknown][] | undefined;
149
+ }[];
150
+ } | undefined;
118
151
  };
119
152
  static deserialize(payload: object): TextClip;
120
153
  }
@@ -192,10 +192,10 @@ export declare class VideoClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>>
192
192
  volumeFadeOutCurve: FadeCurveEnum;
193
193
  text?: string | undefined;
194
194
  name?: string | undefined;
195
+ customData?: [string, unknown][] | undefined;
195
196
  wrapMode?: import('../../../../types').WrapModeEnum | undefined;
196
197
  blendMode?: import('../../../../types').BlendModeEnum | undefined;
197
198
  style?: unknown;
198
- customData?: [string, unknown][] | undefined;
199
199
  subtitlesId?: string | undefined;
200
200
  animationController?: {
201
201
  animationInDuration: number;
@@ -207,8 +207,6 @@ export declare class VideoClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>>
207
207
  inOutOfRange: import('../../../../index').OutOfRangeEnum;
208
208
  outOutOfRange: import('../../../../index').OutOfRangeEnum;
209
209
  propertyAnimations: {
210
- inOutOfRange: import('../../../../index').OutOfRangeEnum;
211
- outOutOfRange: import('../../../../index').OutOfRangeEnum;
212
210
  property: string;
213
211
  keyframes: {
214
212
  value: string | number;
@@ -217,6 +215,8 @@ export declare class VideoClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>>
217
215
  space: import('../../../../index').AnimationSpaceEnum;
218
216
  relativeProperty?: string | undefined;
219
217
  }[];
218
+ inOutOfRange: import('../../../../index').OutOfRangeEnum;
219
+ outOutOfRange: import('../../../../index').OutOfRangeEnum;
220
220
  }[];
221
221
  speed?: number | undefined;
222
222
  offset?: number | undefined;
@@ -227,8 +227,6 @@ export declare class VideoClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>>
227
227
  inOutOfRange: import('../../../../index').OutOfRangeEnum;
228
228
  outOutOfRange: import('../../../../index').OutOfRangeEnum;
229
229
  propertyAnimations: {
230
- inOutOfRange: import('../../../../index').OutOfRangeEnum;
231
- outOutOfRange: import('../../../../index').OutOfRangeEnum;
232
230
  property: string;
233
231
  keyframes: {
234
232
  value: string | number;
@@ -237,6 +235,8 @@ export declare class VideoClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>>
237
235
  space: import('../../../../index').AnimationSpaceEnum;
238
236
  relativeProperty?: string | undefined;
239
237
  }[];
238
+ inOutOfRange: import('../../../../index').OutOfRangeEnum;
239
+ outOutOfRange: import('../../../../index').OutOfRangeEnum;
240
240
  }[];
241
241
  speed?: number | undefined;
242
242
  offset?: number | undefined;
@@ -247,8 +247,6 @@ export declare class VideoClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>>
247
247
  inOutOfRange: import('../../../../index').OutOfRangeEnum;
248
248
  outOutOfRange: import('../../../../index').OutOfRangeEnum;
249
249
  propertyAnimations: {
250
- inOutOfRange: import('../../../../index').OutOfRangeEnum;
251
- outOutOfRange: import('../../../../index').OutOfRangeEnum;
252
250
  property: string;
253
251
  keyframes: {
254
252
  value: string | number;
@@ -257,6 +255,8 @@ export declare class VideoClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>>
257
255
  space: import('../../../../index').AnimationSpaceEnum;
258
256
  relativeProperty?: string | undefined;
259
257
  }[];
258
+ inOutOfRange: import('../../../../index').OutOfRangeEnum;
259
+ outOutOfRange: import('../../../../index').OutOfRangeEnum;
260
260
  }[];
261
261
  speed?: number | undefined;
262
262
  offset?: number | undefined;
@@ -268,6 +268,37 @@ export declare class VideoClip extends Clip<PIXI.Sprite, ClipStyle<PIXI.Sprite>>
268
268
  id: string;
269
269
  clipId: string;
270
270
  }[] | undefined;
271
+ propertyAnimator?: {
272
+ tracks: {
273
+ type: import('../../../../index').PropertyDescriptionTypeEnum;
274
+ property: string;
275
+ keyframes: {
276
+ value: (string | number | boolean | number[]) & (string | number | boolean | number[] | undefined);
277
+ time: number;
278
+ handleIn: {
279
+ value: number;
280
+ time: number;
281
+ };
282
+ handleOut: {
283
+ value: number;
284
+ time: number;
285
+ };
286
+ hold?: boolean | undefined;
287
+ }[];
288
+ defaults?: {
289
+ handleIn?: {
290
+ value: number;
291
+ time: number;
292
+ } | undefined;
293
+ handleOut?: {
294
+ value: number;
295
+ time: number;
296
+ } | undefined;
297
+ hold?: boolean | undefined;
298
+ } | undefined;
299
+ customData?: [string, unknown][] | undefined;
300
+ }[];
301
+ } | undefined;
271
302
  volume?: number | undefined;
272
303
  muted?: boolean | undefined;
273
304
  freezeTime?: number | undefined;
@@ -33,6 +33,7 @@ export declare enum EventsEnum {
33
33
  CLIP_EFFECT_UPDATED = "clip:effect:updated",
34
34
  CLIP_LOTTIE_PROPERTY_UPDATED = "clip:lottie-property:updated",
35
35
  CLIP_ANIMATION_UPDATED = "clip:animation:updated",
36
+ CLIP_KEYFRAME_CHANGED = "clip:keyframe:changed",
36
37
  LIBRARY_ADDED = "library:added",
37
38
  LIBRARY_REMOVED = "library:removed",
38
39
  LIBRARY_REPLACED = "library:replaced",
@@ -182,6 +183,10 @@ export type EventPayloadMap = {
182
183
  [EventsEnum.CLIP_ANIMATION_UPDATED]: {
183
184
  clipId: string;
184
185
  };
186
+ [EventsEnum.CLIP_KEYFRAME_CHANGED]: {
187
+ clipId: string;
188
+ property?: string;
189
+ };
185
190
  [EventsEnum.CLIP_LOTTIE_PROPERTY_UPDATED]: {
186
191
  clipId: string;
187
192
  propertyId: string;
@@ -0,0 +1,7 @@
1
+ import * as PIXI from "pixi.js";
2
+ export declare class CropAnimationFilter extends PIXI.Filter {
3
+ constructor();
4
+ setUniforms(cropLeft: number, cropTop: number, cropRight: number, cropBottom: number, zoomX: number, zoomY: number, offsetX: number, offsetY: number): void;
5
+ isIdentity(): boolean;
6
+ reset(): void;
7
+ }
@@ -152,6 +152,8 @@ export declare class UndoManager {
152
152
  getEnabled(): boolean;
153
153
  pushPause(): void;
154
154
  popPause(): void;
155
+ getPauseStack(): boolean[];
156
+ clearPauseStack(): void;
155
157
  startGroup(groupName: string): false | undefined;
156
158
  endGroup(): false | undefined;
157
159
  cancelGroup(): false | undefined;
@@ -1,4 +1,5 @@
1
1
  import { BlendModeEnum, FadeCurveEnum, WrapModeEnum } from '../../types';
2
+ import { PropertyKeyframe } from "../animation/PropertyAnimator.types";
2
3
  import { AnimationTypeEnum, ShapeBezierNode, ShapePoint } from "../clip";
3
4
  import { ShapeTypeEnum } from "../clip/clips/shape/types/Shape.types";
4
5
  import { TextBlock } from "../library";
@@ -93,6 +94,12 @@ export declare enum UndoActionEnum {
93
94
  LIBRARY_SUBTITLES_REMOVE_BLOCK = "library-subtitles-remove-block",
94
95
  LIBRARY_SUBTITLES_UPDATE_BLOCK = "library-subtitles-update-block",
95
96
  LIBRARY_SUBTITLES_SET_BLOCKS = "library-subtitles-set-blocks",
97
+ KEYFRAME_ADD = "keyframe-add",
98
+ KEYFRAME_REMOVE = "keyframe-remove",
99
+ KEYFRAME_UPDATE = "keyframe-update",
100
+ KEYFRAME_MOVE = "keyframe-move",
101
+ KEYFRAME_TRACK_ADD = "keyframe-track-add",
102
+ KEYFRAME_TRACK_REMOVE = "keyframe-track-remove",
96
103
  DISPLAY_BACKGROUND_COLOR = "display-background-color",
97
104
  DISPLAY_RESOLUTION = "display-resolution"
98
105
  }
@@ -494,6 +501,38 @@ export type UndoActionMappings = {
494
501
  subtitlesId: string;
495
502
  prevTextBlocks: TextBlock[];
496
503
  };
504
+ [UndoActionEnum.KEYFRAME_ADD]: {
505
+ clipId: string;
506
+ property: string;
507
+ keyframe: PropertyKeyframe;
508
+ };
509
+ [UndoActionEnum.KEYFRAME_REMOVE]: {
510
+ clipId: string;
511
+ property: string;
512
+ keyframe: PropertyKeyframe;
513
+ };
514
+ [UndoActionEnum.KEYFRAME_UPDATE]: {
515
+ clipId: string;
516
+ property: string;
517
+ time: number;
518
+ prev: Partial<PropertyKeyframe>;
519
+ next: Partial<PropertyKeyframe>;
520
+ };
521
+ [UndoActionEnum.KEYFRAME_MOVE]: {
522
+ clipId: string;
523
+ property: string;
524
+ oldTime: number;
525
+ newTime: number;
526
+ };
527
+ [UndoActionEnum.KEYFRAME_TRACK_ADD]: {
528
+ clipId: string;
529
+ property: string;
530
+ };
531
+ [UndoActionEnum.KEYFRAME_TRACK_REMOVE]: {
532
+ clipId: string;
533
+ property: string;
534
+ keyframes: PropertyKeyframe[];
535
+ };
497
536
  [UndoActionEnum.DISPLAY_BACKGROUND_COLOR]: {
498
537
  prevBackgroundColor: string;
499
538
  backgroundColor: string;
@@ -112,8 +112,6 @@ export declare const PropertyAnimationSchema: z.ZodObject<{
112
112
  relativeProperty?: string | undefined;
113
113
  }>, "many">;
114
114
  }, "strip", z.ZodTypeAny, {
115
- inOutOfRange: OutOfRangeEnum;
116
- outOutOfRange: OutOfRangeEnum;
117
115
  property: string;
118
116
  keyframes: {
119
117
  value: string | number;
@@ -122,6 +120,8 @@ export declare const PropertyAnimationSchema: z.ZodObject<{
122
120
  space: AnimationSpaceEnum;
123
121
  relativeProperty?: string | undefined;
124
122
  }[];
123
+ inOutOfRange: OutOfRangeEnum;
124
+ outOutOfRange: OutOfRangeEnum;
125
125
  }, {
126
126
  property: string;
127
127
  keyframes: {
@@ -165,8 +165,6 @@ export declare const AnimationDataSchema: z.ZodObject<{
165
165
  relativeProperty?: string | undefined;
166
166
  }>, "many">;
167
167
  }, "strip", z.ZodTypeAny, {
168
- inOutOfRange: OutOfRangeEnum;
169
- outOutOfRange: OutOfRangeEnum;
170
168
  property: string;
171
169
  keyframes: {
172
170
  value: string | number;
@@ -175,6 +173,8 @@ export declare const AnimationDataSchema: z.ZodObject<{
175
173
  space: AnimationSpaceEnum;
176
174
  relativeProperty?: string | undefined;
177
175
  }[];
176
+ inOutOfRange: OutOfRangeEnum;
177
+ outOutOfRange: OutOfRangeEnum;
178
178
  }, {
179
179
  property: string;
180
180
  keyframes: {
@@ -192,8 +192,6 @@ export declare const AnimationDataSchema: z.ZodObject<{
192
192
  inOutOfRange: OutOfRangeEnum;
193
193
  outOutOfRange: OutOfRangeEnum;
194
194
  propertyAnimations: {
195
- inOutOfRange: OutOfRangeEnum;
196
- outOutOfRange: OutOfRangeEnum;
197
195
  property: string;
198
196
  keyframes: {
199
197
  value: string | number;
@@ -202,6 +200,8 @@ export declare const AnimationDataSchema: z.ZodObject<{
202
200
  space: AnimationSpaceEnum;
203
201
  relativeProperty?: string | undefined;
204
202
  }[];
203
+ inOutOfRange: OutOfRangeEnum;
204
+ outOutOfRange: OutOfRangeEnum;
205
205
  }[];
206
206
  speed?: number | undefined;
207
207
  offset?: number | undefined;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Cubic bezier interpolator for keyframe animation.
3
+ *
4
+ * The curve is defined by four points:
5
+ * P0 = (0, 0), P1 = handleOut, P2 = handleIn, P3 = (1, 1)
6
+ *
7
+ * Given a normalized time [0-1], returns a normalized value [0-1].
8
+ *
9
+ * @param time - Normalized time in [0, 1]
10
+ * @param handleOut - Outgoing control point [time, value], both in [0, 1]
11
+ * @param handleIn - Incoming control point [time, value], both in [0, 1]
12
+ * @returns Normalized interpolated value
13
+ */
14
+ export declare function bezierInterpolate(time: number, handleOut: [number, number], handleIn: [number, number]): number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rendley/sdk",
3
- "version": "1.14.3",
3
+ "version": "1.15.0",
4
4
  "license": "LICENSE",
5
5
  "author": "Onix Technologies",
6
6
  "homepage": "https://rendleysdk.com",
@@ -33,6 +33,7 @@
33
33
  "build:watch": "tsc && vite build --watch --mode development",
34
34
  "build:production": "tsc && vite build --mode production && npm run obfuscate",
35
35
  "obfuscate": "node ./plugins/obfuscate.js",
36
+ "minify": "node ./plugins/minify.js",
36
37
  "test": "jest",
37
38
  "lint": "eslint --ext .ts,.tsx src --fix",
38
39
  "format": "prettier --write 'src/**/*.{ts,tsx}'",
@@ -59,12 +60,14 @@
59
60
  "patch-package": "8.0.0",
60
61
  "postinstall-postinstall": "2.1.0",
61
62
  "prettier": "3.1.1",
63
+ "terser": "^5.46.1",
62
64
  "ts-jest": "29.1.1",
63
65
  "typedoc": "0.28.12",
64
66
  "typedoc-plugin-markdown": "4.8.1",
65
67
  "typescript": "^5.9.2",
66
68
  "vite": "^5.4.9",
67
- "vite-plugin-dts": "3.7.2"
69
+ "vite-plugin-dts": "3.7.2",
70
+ "vite-plugin-javascript-obfuscator": "^3.1.0"
68
71
  },
69
72
  "dependencies": {
70
73
  "@pixi/gif": "2.1.1",