@cliquify.me/timeline 3.1.13 → 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/constants.d.ts +2 -0
- package/dist/constants/objects.d.ts +1 -0
- package/dist/constants/scale.d.ts +6 -0
- package/dist/controls/draw.d.ts +2 -2
- package/dist/events/canvas/hover-control.d.ts +4 -0
- package/dist/index.es.js +2450 -2198
- package/dist/index.umd.js +50 -50
- package/dist/objects/illustration.d.ts +36 -0
- package/dist/objects/shape.d.ts +36 -0
- package/dist/timeline.d.ts +3 -1
- package/dist/utils/load-object.d.ts +11 -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 IllustrationProps extends Pick<RectProps, "width" | "height" | "left" | "top"> {
|
|
5
|
+
id: string;
|
|
6
|
+
src: string;
|
|
7
|
+
tScale: number;
|
|
8
|
+
display: IDisplay;
|
|
9
|
+
}
|
|
10
|
+
declare class Illustration 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: IllustrationProps);
|
|
31
|
+
setSelected(selected: boolean): void;
|
|
32
|
+
_render(ctx: CanvasRenderingContext2D): void;
|
|
33
|
+
updateSelected(ctx: CanvasRenderingContext2D): void;
|
|
34
|
+
setSrc(src: string): void;
|
|
35
|
+
}
|
|
36
|
+
export default Illustration;
|
|
@@ -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;
|
package/dist/timeline.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Canvas, CanvasOptions, TPointerEvent } from 'fabric';
|
|
1
|
+
import { Canvas, CanvasOptions, FabricObject, TPointerEvent } from 'fabric';
|
|
2
2
|
import { default as CanvasMixin } from './mixins/canvas';
|
|
3
3
|
import { default as TrackItemsMixin } from './mixins/track-items';
|
|
4
4
|
import { default as TracksMixin } from './mixins/tracks';
|
|
@@ -38,6 +38,7 @@ declare class Timeline extends Canvas {
|
|
|
38
38
|
acceptsMap: Record<string, string[]>;
|
|
39
39
|
sizesMap: Record<string, number>;
|
|
40
40
|
tracks: ITrack[];
|
|
41
|
+
hoverCornerItem: boolean;
|
|
41
42
|
trackItemsMap: Record<string, ITrackItem>;
|
|
42
43
|
trackItemIds: string[];
|
|
43
44
|
transitionIds: string[];
|
|
@@ -61,6 +62,7 @@ declare class Timeline extends Canvas {
|
|
|
61
62
|
});
|
|
62
63
|
private initializeCanvasDefaults;
|
|
63
64
|
__onMouseDown(e: TPointerEvent): void;
|
|
65
|
+
_setupCurrentTransform(e: TPointerEvent, target: FabricObject, alreadySelected: boolean): void;
|
|
64
66
|
initEventListeners(): void;
|
|
65
67
|
setActiveIds(activeIds: string[]): void;
|
|
66
68
|
updateState(dataHistory?: IUpdateStateOptions): void;
|
|
@@ -2,6 +2,8 @@ import { Audio, Caption, Image, Text, Video } from '../objects';
|
|
|
2
2
|
import { IAudio, IDisplay, ITextDetails, ITrackItem, ITrackItemAndDetails, ITrim, IVideo } from '@cliquify.me/types';
|
|
3
3
|
import { default as Template } from '../objects/template';
|
|
4
4
|
import { default as Composition } from '../objects/composition';
|
|
5
|
+
import { default as Illustration } from '../objects/illustration';
|
|
6
|
+
import { default as Shape } from '../objects/shape';
|
|
5
7
|
|
|
6
8
|
export declare const loadVideoObject: (item: IVideo, options: {
|
|
7
9
|
tScale: number;
|
|
@@ -44,7 +46,15 @@ export declare const loadCompositionObject: (item: {
|
|
|
44
46
|
}, options: {
|
|
45
47
|
tScale: number;
|
|
46
48
|
}) => Composition;
|
|
49
|
+
export declare const loadIllustrationObject: (item: ITrackItemAndDetails, options: {
|
|
50
|
+
tScale: number;
|
|
51
|
+
sizesMap: Record<string, number>;
|
|
52
|
+
}) => Illustration;
|
|
53
|
+
export declare const loadShapeObject: (item: ITrackItemAndDetails, options: {
|
|
54
|
+
tScale: number;
|
|
55
|
+
sizesMap: Record<string, number>;
|
|
56
|
+
}) => Shape;
|
|
47
57
|
export declare const loadMediaObject: (item: ITrackItemAndDetails, options: {
|
|
48
58
|
tScale: number;
|
|
49
59
|
sizesMap: Record<string, number>;
|
|
50
|
-
}) => Image | Video | Audio | Text | Caption | Template | Composition | 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",
|