@cliquify.me/timeline 3.1.14 → 3.1.15
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/constants/scale.d.ts +3 -0
- package/dist/index.es.js +2043 -1972
- package/dist/index.umd.js +50 -50
- package/dist/objects/shape.d.ts +36 -0
- package/dist/utils/load-object.d.ts +6 -1
- package/package.json +2 -2
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Control, Rect, RectProps } from 'fabric';
|
|
2
|
+
import { IDisplay } from '@cliquify.me/types';
|
|
3
|
+
|
|
4
|
+
export interface ShapeProps extends Pick<RectProps, "width" | "height" | "left" | "top"> {
|
|
5
|
+
id: string;
|
|
6
|
+
src: string;
|
|
7
|
+
tScale: number;
|
|
8
|
+
display: IDisplay;
|
|
9
|
+
}
|
|
10
|
+
declare class Shape extends Rect {
|
|
11
|
+
static type: string;
|
|
12
|
+
itemType: string;
|
|
13
|
+
src: string;
|
|
14
|
+
isSelected: boolean;
|
|
15
|
+
static createControls(): {
|
|
16
|
+
controls: Record<string, Control>;
|
|
17
|
+
};
|
|
18
|
+
static getDefaults(): Record<string, any>;
|
|
19
|
+
static ownDefaults: {
|
|
20
|
+
rx: number;
|
|
21
|
+
ry: number;
|
|
22
|
+
objectCaching: boolean;
|
|
23
|
+
borderColor: string;
|
|
24
|
+
stroke: string;
|
|
25
|
+
strokeWidth: number;
|
|
26
|
+
fill: string;
|
|
27
|
+
borderOpacityWhenMoving: number;
|
|
28
|
+
hoverCursor: string;
|
|
29
|
+
};
|
|
30
|
+
constructor(props: ShapeProps);
|
|
31
|
+
setSelected(selected: boolean): void;
|
|
32
|
+
_render(ctx: CanvasRenderingContext2D): void;
|
|
33
|
+
updateSelected(ctx: CanvasRenderingContext2D): void;
|
|
34
|
+
setSrc(src: string): void;
|
|
35
|
+
}
|
|
36
|
+
export default Shape;
|
|
@@ -3,6 +3,7 @@ import { IAudio, IDisplay, ITextDetails, ITrackItem, ITrackItemAndDetails, ITrim
|
|
|
3
3
|
import { default as Template } from '../objects/template';
|
|
4
4
|
import { default as Composition } from '../objects/composition';
|
|
5
5
|
import { default as Illustration } from '../objects/illustration';
|
|
6
|
+
import { default as Shape } from '../objects/shape';
|
|
6
7
|
|
|
7
8
|
export declare const loadVideoObject: (item: IVideo, options: {
|
|
8
9
|
tScale: number;
|
|
@@ -49,7 +50,11 @@ export declare const loadIllustrationObject: (item: ITrackItemAndDetails, option
|
|
|
49
50
|
tScale: number;
|
|
50
51
|
sizesMap: Record<string, number>;
|
|
51
52
|
}) => Illustration;
|
|
53
|
+
export declare const loadShapeObject: (item: ITrackItemAndDetails, options: {
|
|
54
|
+
tScale: number;
|
|
55
|
+
sizesMap: Record<string, number>;
|
|
56
|
+
}) => Shape;
|
|
52
57
|
export declare const loadMediaObject: (item: ITrackItemAndDetails, options: {
|
|
53
58
|
tScale: number;
|
|
54
59
|
sizesMap: Record<string, number>;
|
|
55
|
-
}) => Image | Video | Audio | Text | Caption | Template | Composition | Illustration | undefined;
|
|
60
|
+
}) => Image | Video | Audio | Text | Caption | Template | Composition | Illustration | Shape | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cliquify.me/timeline",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.15",
|
|
4
4
|
"private": false,
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"@types/lodash-es": "^4.17.12",
|
|
36
36
|
"@designcombo/events": "^1.0.2",
|
|
37
|
-
"@cliquify.me/types": "3.1.
|
|
37
|
+
"@cliquify.me/types": "3.1.15"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"dev": "vite",
|