@designcombo/state 5.0.1 → 5.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/events.d.ts +1 -0
- package/dist/handlers/add/rect.d.ts +10 -0
- package/dist/index.es.js +866 -794
- package/dist/index.umd.js +3 -3
- package/dist/utils/load-item.d.ts +120 -11
- package/package.json +3 -3
@@ -1,4 +1,4 @@
|
|
1
|
-
import { IAudio, ICaption, IComposition, IDisplay, IIllustration, IImage, ILinealAudioBars, IProgressBar, IProgressFrame, IRadialAudioBars, IShape, ISize, ITemplate, IText, ITrack, ITrackItem, ITrim, IVideo, IVideoDetails } from '@designcombo/types';
|
1
|
+
import { IAudio, ICaption, IComposition, IDisplay, IIllustration, IImage, ILinealAudioBars, IProgressBar, IProgressFrame, IRadialAudioBars, IRect, IShape, ISize, ITemplate, IText, ITrack, ITrackItem, ITrim, IVideo, IVideoDetails } from '@designcombo/types';
|
2
2
|
|
3
3
|
type OptionsType = {
|
4
4
|
size: {
|
@@ -14,17 +14,17 @@ export declare const loadVideoItem: (layer: ITrackItem & IVideo, options: Partia
|
|
14
14
|
type: string;
|
15
15
|
name: string;
|
16
16
|
details: IVideoDetails;
|
17
|
+
animations: {
|
18
|
+
in: import('@designcombo/types').IBasicAnimation;
|
19
|
+
out: import('@designcombo/types').IBasicAnimation;
|
20
|
+
loop: import('@designcombo/types').IBasicAnimation;
|
21
|
+
} | undefined;
|
17
22
|
playbackRate: number;
|
18
23
|
display: IDisplay;
|
19
24
|
duration: number;
|
20
25
|
id: string;
|
21
26
|
preview?: string;
|
22
27
|
isMain?: boolean;
|
23
|
-
animations?: {
|
24
|
-
in: import('@designcombo/types').IBasicAnimation;
|
25
|
-
out: import('@designcombo/types').IBasicAnimation;
|
26
|
-
loop: import('@designcombo/types').IBasicAnimation;
|
27
|
-
};
|
28
28
|
modifier?: IDisplay;
|
29
29
|
activeEdit?: boolean;
|
30
30
|
metadata: Record<string, any>;
|
@@ -283,6 +283,46 @@ export declare const loadShapeItem: (payload: ITrackItem & IShape, options: {
|
|
283
283
|
};
|
284
284
|
metadata: Record<string, any>;
|
285
285
|
}>;
|
286
|
+
export declare const loadRectItem: (payload: ITrackItem & IRect, options: {
|
287
|
+
size?: {
|
288
|
+
width: number;
|
289
|
+
height: number;
|
290
|
+
};
|
291
|
+
scaleMode?: string;
|
292
|
+
scaleAspectRatio?: number;
|
293
|
+
}) => Promise<{
|
294
|
+
id: string;
|
295
|
+
name: string;
|
296
|
+
type: "rect";
|
297
|
+
display: IDisplay;
|
298
|
+
playbackRate: number;
|
299
|
+
details: {
|
300
|
+
width: any;
|
301
|
+
height: any;
|
302
|
+
opacity: any;
|
303
|
+
transform: any;
|
304
|
+
border: any;
|
305
|
+
borderRadius: any;
|
306
|
+
top: any;
|
307
|
+
left: any;
|
308
|
+
borderWidth: any;
|
309
|
+
borderColor: any;
|
310
|
+
flipX: any;
|
311
|
+
flipY: any;
|
312
|
+
rotate: any;
|
313
|
+
visibility: any;
|
314
|
+
backgroundColor: any;
|
315
|
+
boxShadow: any;
|
316
|
+
blur: any;
|
317
|
+
brightness: any;
|
318
|
+
};
|
319
|
+
animations: {
|
320
|
+
in: import('@designcombo/types').IBasicAnimation;
|
321
|
+
out: import('@designcombo/types').IBasicAnimation;
|
322
|
+
loop: import('@designcombo/types').IBasicAnimation;
|
323
|
+
} | undefined;
|
324
|
+
metadata: Record<string, any>;
|
325
|
+
}>;
|
286
326
|
export declare const loadImageItem: (payload: ITrackItem & IImage, options: {
|
287
327
|
origin?: number;
|
288
328
|
size?: {
|
@@ -317,6 +357,11 @@ export declare const loadImageItem: (payload: ITrackItem & IImage, options: {
|
|
317
357
|
rotate: any;
|
318
358
|
visibility: any;
|
319
359
|
};
|
360
|
+
animations: {
|
361
|
+
in: import('@designcombo/types').IBasicAnimation;
|
362
|
+
out: import('@designcombo/types').IBasicAnimation;
|
363
|
+
loop: import('@designcombo/types').IBasicAnimation;
|
364
|
+
} | undefined;
|
320
365
|
metadata: Record<string, any>;
|
321
366
|
}>;
|
322
367
|
export declare const loadCaptionItem: (trackItem: ITrackItem, options: {
|
@@ -420,6 +465,11 @@ export declare const loadTextItem: (payload: ITrackItem & IText, options: {
|
|
420
465
|
transform?: string;
|
421
466
|
borderRadius?: number;
|
422
467
|
};
|
468
|
+
animations: {
|
469
|
+
in: import('@designcombo/types').IBasicAnimation;
|
470
|
+
out: import('@designcombo/types').IBasicAnimation;
|
471
|
+
loop: import('@designcombo/types').IBasicAnimation;
|
472
|
+
} | undefined;
|
423
473
|
metadata: {};
|
424
474
|
}>;
|
425
475
|
export declare const loadTrackItem: (payload: ITrackItem & (IVideo | IAudio | IImage | IText | ICaption | ITemplate), options?: {
|
@@ -435,17 +485,17 @@ export declare const loadTrackItem: (payload: ITrackItem & (IVideo | IAudio | II
|
|
435
485
|
type: string;
|
436
486
|
name: string;
|
437
487
|
details: IVideoDetails;
|
488
|
+
animations: {
|
489
|
+
in: import('@designcombo/types').IBasicAnimation;
|
490
|
+
out: import('@designcombo/types').IBasicAnimation;
|
491
|
+
loop: import('@designcombo/types').IBasicAnimation;
|
492
|
+
} | undefined;
|
438
493
|
playbackRate: number;
|
439
494
|
display: IDisplay;
|
440
495
|
duration: number;
|
441
496
|
id: string;
|
442
497
|
preview?: string;
|
443
498
|
isMain?: boolean;
|
444
|
-
animations?: {
|
445
|
-
in: import('@designcombo/types').IBasicAnimation;
|
446
|
-
out: import('@designcombo/types').IBasicAnimation;
|
447
|
-
loop: import('@designcombo/types').IBasicAnimation;
|
448
|
-
};
|
449
499
|
modifier?: IDisplay;
|
450
500
|
activeEdit?: boolean;
|
451
501
|
metadata: Record<string, any>;
|
@@ -513,6 +563,60 @@ export declare const loadTrackItem: (payload: ITrackItem & (IVideo | IAudio | II
|
|
513
563
|
rotate: any;
|
514
564
|
visibility: any;
|
515
565
|
};
|
566
|
+
animations: {
|
567
|
+
in: import('@designcombo/types').IBasicAnimation;
|
568
|
+
out: import('@designcombo/types').IBasicAnimation;
|
569
|
+
loop: import('@designcombo/types').IBasicAnimation;
|
570
|
+
} | undefined;
|
571
|
+
metadata: Record<string, any>;
|
572
|
+
} | {
|
573
|
+
id: string;
|
574
|
+
name: string;
|
575
|
+
type: string;
|
576
|
+
display: IDisplay;
|
577
|
+
details: {
|
578
|
+
text: string;
|
579
|
+
height: number;
|
580
|
+
fontUrl: string;
|
581
|
+
top: string | number;
|
582
|
+
left: string | number;
|
583
|
+
borderWidth: number;
|
584
|
+
borderColor: string;
|
585
|
+
boxShadow: {
|
586
|
+
color: string;
|
587
|
+
x: number;
|
588
|
+
y: number;
|
589
|
+
blur: number;
|
590
|
+
};
|
591
|
+
words: import('@designcombo/types').ICaptionWord[];
|
592
|
+
appearedColor: string;
|
593
|
+
activeColor: string;
|
594
|
+
activeFillColor: string;
|
595
|
+
skewX: number;
|
596
|
+
skewY: number;
|
597
|
+
fontSize: number;
|
598
|
+
fontFamily: string;
|
599
|
+
color: string;
|
600
|
+
lineHeight: number | string;
|
601
|
+
letterSpacing: number | string;
|
602
|
+
fontWeight: number;
|
603
|
+
fontStyle: string;
|
604
|
+
textDecoration: string;
|
605
|
+
textAlign: "center" | "left" | "right";
|
606
|
+
wordSpacing: number | string;
|
607
|
+
textShadow: string;
|
608
|
+
backgroundColor: string;
|
609
|
+
opacity: number;
|
610
|
+
width: number;
|
611
|
+
textTransform: "capitalize" | "uppercase" | "lowercase";
|
612
|
+
border: string;
|
613
|
+
wordWrap: "normal" | "break-word";
|
614
|
+
wordBreak: "normal" | "break-word" | "break-all";
|
615
|
+
WebkitTextStrokeColor: string;
|
616
|
+
WebkitTextStrokeWidth: string;
|
617
|
+
transform?: string;
|
618
|
+
borderRadius?: number;
|
619
|
+
};
|
516
620
|
metadata: Record<string, any>;
|
517
621
|
} | {
|
518
622
|
id: string;
|
@@ -553,6 +657,11 @@ export declare const loadTrackItem: (payload: ITrackItem & (IVideo | IAudio | II
|
|
553
657
|
transform?: string;
|
554
658
|
borderRadius?: number;
|
555
659
|
};
|
660
|
+
animations: {
|
661
|
+
in: import('@designcombo/types').IBasicAnimation;
|
662
|
+
out: import('@designcombo/types').IBasicAnimation;
|
663
|
+
loop: import('@designcombo/types').IBasicAnimation;
|
664
|
+
} | undefined;
|
556
665
|
metadata: {};
|
557
666
|
}>;
|
558
667
|
export declare function checkIfItemIsInTrack(tracks: ITrack[], trackItemIds: string[]): boolean;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@designcombo/state",
|
3
|
-
"version": "5.0.
|
3
|
+
"version": "5.0.3",
|
4
4
|
"private": false,
|
5
5
|
"files": [
|
6
6
|
"dist"
|
@@ -25,7 +25,7 @@
|
|
25
25
|
"typescript": "^5.3.3",
|
26
26
|
"vite": "^5.2.0",
|
27
27
|
"vite-plugin-dts": "^3.9.1",
|
28
|
-
"@designcombo/types": "5.0.
|
28
|
+
"@designcombo/types": "5.0.3",
|
29
29
|
"@designcombo/typescript-config": "0.0.0"
|
30
30
|
},
|
31
31
|
"dependencies": {
|
@@ -39,7 +39,7 @@
|
|
39
39
|
},
|
40
40
|
"peerDependencies": {
|
41
41
|
"@designcombo/events": "^1.0.2",
|
42
|
-
"@designcombo/types": "5.0.
|
42
|
+
"@designcombo/types": "5.0.3"
|
43
43
|
},
|
44
44
|
"scripts": {
|
45
45
|
"dev": "vite",
|