vkedit 4.0.0 → 4.0.1
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/LICENSE +21 -21
- package/README.md +9 -0
- package/THIRD_PARTY_LICENSES.md +64 -0
- package/dist/commands/add-element-command.d.ts +0 -2
- package/dist/commands/change-layer-order-command.d.ts +1 -0
- package/dist/commands/index.d.ts +1 -0
- package/dist/commands/reorder-elements-command.d.ts +1 -0
- package/dist/commands/update-canvas-property-command.d.ts +23 -0
- package/dist/core/editor-host.d.ts +2 -0
- package/dist/favicon.svg +21 -8
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/use-canvas-property-command.d.ts +5 -0
- package/dist/{index-CSKpw1uX.js → index-Dpse_csX.js} +7462 -7403
- package/dist/{index.es-Dswe047Z.js → index.es-LscL1n3Y.js} +1 -1
- package/dist/plugins/line/Shape.vue.d.ts +2 -0
- package/dist/types/base.d.ts +1 -0
- package/dist/types/event-data.d.ts +21 -0
- package/dist/types/event-map.d.ts +7 -7
- package/dist/types/graphic-plugin.d.ts +26 -0
- package/dist/vkedit.css +1 -1
- package/dist/vkedit.es.js +41 -39
- package/package.json +19 -18
- package/dist/favicon.ico +0 -0
- package/dist/plugins/barcode/barcode.d.ts +0 -75
- package/dist/plugins/line/line.d.ts +0 -60
- package/dist/plugins/qrcode/qrcode.d.ts +0 -74
- package/dist/plugins/rect/rect.d.ts +0 -67
- package/dist/plugins/text/text.d.ts +0 -79
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { GraphicPlugin, PropertyPanelRegistration } from '../../types/graphic-plugin';
|
|
2
|
-
import { BaseGraphicElement, BaseGraphicElementOptions } from '../../types/base-graphic-element';
|
|
3
|
-
import { EditorHost } from '../../core';
|
|
4
|
-
export interface BarcodeOptions extends BaseGraphicElementOptions {
|
|
5
|
-
x?: number;
|
|
6
|
-
y?: number;
|
|
7
|
-
content?: string;
|
|
8
|
-
format?: string;
|
|
9
|
-
foreground?: string;
|
|
10
|
-
background?: string;
|
|
11
|
-
marginMM?: number;
|
|
12
|
-
displayValue: boolean;
|
|
13
|
-
fontSizeMM: number;
|
|
14
|
-
}
|
|
15
|
-
export declare class BarcodeElement extends BaseGraphicElement {
|
|
16
|
-
type: string;
|
|
17
|
-
content: string;
|
|
18
|
-
format: string;
|
|
19
|
-
foreground: string;
|
|
20
|
-
background: string;
|
|
21
|
-
displayValue: boolean;
|
|
22
|
-
fontSizeMM: number;
|
|
23
|
-
marginMM: number;
|
|
24
|
-
barcodeHeightMM: number;
|
|
25
|
-
barcodeWidthMM: number;
|
|
26
|
-
constructor(host: EditorHost, options?: Partial<BarcodeOptions>);
|
|
27
|
-
get fontSize(): number;
|
|
28
|
-
get margin(): number;
|
|
29
|
-
get barcodeHeight(): number;
|
|
30
|
-
get barcodeWidth(): number;
|
|
31
|
-
getTransformAttr(event: any): {
|
|
32
|
-
oldAttrs: any;
|
|
33
|
-
newAttrs: any;
|
|
34
|
-
};
|
|
35
|
-
deserialize(data: any): void;
|
|
36
|
-
serialize(): {
|
|
37
|
-
content: string;
|
|
38
|
-
format: string;
|
|
39
|
-
foreground: string;
|
|
40
|
-
background: string;
|
|
41
|
-
displayValue: boolean;
|
|
42
|
-
fontSizeMM: number;
|
|
43
|
-
marginMM: number;
|
|
44
|
-
barcodeHeightMM: number;
|
|
45
|
-
barcodeWidthMM: number;
|
|
46
|
-
id: string;
|
|
47
|
-
type: string;
|
|
48
|
-
xmm: number;
|
|
49
|
-
ymm: number;
|
|
50
|
-
wmm: number;
|
|
51
|
-
hmm: number;
|
|
52
|
-
rotation: number;
|
|
53
|
-
scaleX: number;
|
|
54
|
-
scaleY: number;
|
|
55
|
-
visible: boolean;
|
|
56
|
-
locked: boolean;
|
|
57
|
-
draggable: boolean;
|
|
58
|
-
resizable: boolean;
|
|
59
|
-
zIndex: number;
|
|
60
|
-
displayName: string | null;
|
|
61
|
-
};
|
|
62
|
-
renderBarcode(): Promise<HTMLCanvasElement>;
|
|
63
|
-
}
|
|
64
|
-
export declare class BarcodePlugin extends GraphicPlugin<BarcodeElement> {
|
|
65
|
-
name: string;
|
|
66
|
-
version: string;
|
|
67
|
-
graphicType: string;
|
|
68
|
-
graphicElement: typeof BarcodeElement;
|
|
69
|
-
shapeComponent: import('vue').DefineComponent<import('./Shape.vue').Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('./Shape.vue').Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
70
|
-
iconComponent: import('vue').Component;
|
|
71
|
-
typeDisplayName: string;
|
|
72
|
-
propertyPanels: PropertyPanelRegistration[];
|
|
73
|
-
protected onInstall(): void;
|
|
74
|
-
protected onUninstall(): void;
|
|
75
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { GraphicPlugin, PropertyPanelRegistration } from '../../types/graphic-plugin';
|
|
2
|
-
import { BaseGraphicElement, BaseGraphicElementOptions } from '../../types/base-graphic-element';
|
|
3
|
-
import { EditorHost } from '../../core';
|
|
4
|
-
export interface LineOptions extends BaseGraphicElementOptions {
|
|
5
|
-
stroke?: string;
|
|
6
|
-
xmm?: number;
|
|
7
|
-
ymm?: number;
|
|
8
|
-
}
|
|
9
|
-
export declare class LineElement extends BaseGraphicElement {
|
|
10
|
-
type: string;
|
|
11
|
-
stroke: string;
|
|
12
|
-
constructor(host: EditorHost, options?: Partial<LineOptions>);
|
|
13
|
-
get config(): {
|
|
14
|
-
points: number[];
|
|
15
|
-
stroke: string;
|
|
16
|
-
strokeWidth: number;
|
|
17
|
-
hitStrokeWidth: number;
|
|
18
|
-
id: string;
|
|
19
|
-
x: number;
|
|
20
|
-
y: number;
|
|
21
|
-
width: number;
|
|
22
|
-
height: number;
|
|
23
|
-
rotation: number;
|
|
24
|
-
scaleX: number;
|
|
25
|
-
scaleY: number;
|
|
26
|
-
visible: boolean;
|
|
27
|
-
draggable: boolean;
|
|
28
|
-
};
|
|
29
|
-
deserialize(data: any): void;
|
|
30
|
-
serialize(): {
|
|
31
|
-
stroke: string;
|
|
32
|
-
id: string;
|
|
33
|
-
type: string;
|
|
34
|
-
xmm: number;
|
|
35
|
-
ymm: number;
|
|
36
|
-
wmm: number;
|
|
37
|
-
hmm: number;
|
|
38
|
-
rotation: number;
|
|
39
|
-
scaleX: number;
|
|
40
|
-
scaleY: number;
|
|
41
|
-
visible: boolean;
|
|
42
|
-
locked: boolean;
|
|
43
|
-
draggable: boolean;
|
|
44
|
-
resizable: boolean;
|
|
45
|
-
zIndex: number;
|
|
46
|
-
displayName: string | null;
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
export declare class LinePlugin extends GraphicPlugin<LineElement> {
|
|
50
|
-
name: string;
|
|
51
|
-
version: string;
|
|
52
|
-
graphicType: string;
|
|
53
|
-
graphicElement: typeof LineElement;
|
|
54
|
-
shapeComponent: import('vue').DefineComponent<import('./Shape.vue').Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('./Shape.vue').Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
55
|
-
iconComponent: import('vue').Component;
|
|
56
|
-
typeDisplayName: string;
|
|
57
|
-
propertyPanels: PropertyPanelRegistration[];
|
|
58
|
-
protected onInstall(): void;
|
|
59
|
-
protected onUninstall(): void;
|
|
60
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { GraphicPlugin, PropertyPanelRegistration } from '../../types/graphic-plugin';
|
|
2
|
-
import { BaseGraphicElement, BaseGraphicElementOptions } from '../../types/base-graphic-element';
|
|
3
|
-
import { EditorHost } from '../../core';
|
|
4
|
-
export interface QrcodeOptions extends BaseGraphicElementOptions {
|
|
5
|
-
x?: number;
|
|
6
|
-
y?: number;
|
|
7
|
-
content?: string;
|
|
8
|
-
foreground?: string;
|
|
9
|
-
background?: string;
|
|
10
|
-
marginMM?: number;
|
|
11
|
-
}
|
|
12
|
-
export declare class QrcodeElement extends BaseGraphicElement {
|
|
13
|
-
type: string;
|
|
14
|
-
content: string;
|
|
15
|
-
foreground: string;
|
|
16
|
-
background: string;
|
|
17
|
-
marginMM: number;
|
|
18
|
-
constructor(host: EditorHost, options?: Partial<QrcodeOptions>);
|
|
19
|
-
deserialize(data: any): void;
|
|
20
|
-
serialize(): {
|
|
21
|
-
content: string;
|
|
22
|
-
foreground: string;
|
|
23
|
-
background: string;
|
|
24
|
-
marginMM: number;
|
|
25
|
-
id: string;
|
|
26
|
-
type: string;
|
|
27
|
-
xmm: number;
|
|
28
|
-
ymm: number;
|
|
29
|
-
wmm: number;
|
|
30
|
-
hmm: number;
|
|
31
|
-
rotation: number;
|
|
32
|
-
scaleX: number;
|
|
33
|
-
scaleY: number;
|
|
34
|
-
visible: boolean;
|
|
35
|
-
locked: boolean;
|
|
36
|
-
draggable: boolean;
|
|
37
|
-
resizable: boolean;
|
|
38
|
-
zIndex: number;
|
|
39
|
-
displayName: string | null;
|
|
40
|
-
};
|
|
41
|
-
get config(): {
|
|
42
|
-
[key: string]: any;
|
|
43
|
-
id: string;
|
|
44
|
-
x: number;
|
|
45
|
-
y: number;
|
|
46
|
-
width: number;
|
|
47
|
-
height: number;
|
|
48
|
-
rotation: number;
|
|
49
|
-
scaleX: number;
|
|
50
|
-
scaleY: number;
|
|
51
|
-
visible: boolean;
|
|
52
|
-
draggable: boolean;
|
|
53
|
-
};
|
|
54
|
-
get margin(): number;
|
|
55
|
-
renderQrcode(): Promise<HTMLCanvasElement>;
|
|
56
|
-
getBoundingBox(): {
|
|
57
|
-
x: number;
|
|
58
|
-
y: number;
|
|
59
|
-
width: number;
|
|
60
|
-
height: number;
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
export declare class QrcodePlugin extends GraphicPlugin<QrcodeElement> {
|
|
64
|
-
name: string;
|
|
65
|
-
version: string;
|
|
66
|
-
graphicType: string;
|
|
67
|
-
graphicElement: typeof QrcodeElement;
|
|
68
|
-
shapeComponent: import('vue').DefineComponent<import('./Shape.vue').Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('./Shape.vue').Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
69
|
-
iconComponent: import('vue').Component;
|
|
70
|
-
typeDisplayName: string;
|
|
71
|
-
propertyPanels: PropertyPanelRegistration[];
|
|
72
|
-
protected onInstall(): void;
|
|
73
|
-
protected onUninstall(): void;
|
|
74
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { BaseGraphicElement, BaseGraphicElementOptions } from '../../types/base-graphic-element';
|
|
2
|
-
import { EditorHost } from '../../core';
|
|
3
|
-
import { GraphicPlugin, PropertyPanelRegistration } from '../../types/graphic-plugin';
|
|
4
|
-
export interface RectOptions extends BaseGraphicElementOptions {
|
|
5
|
-
x?: number;
|
|
6
|
-
y?: number;
|
|
7
|
-
fill?: string;
|
|
8
|
-
stroke?: string;
|
|
9
|
-
strokeWidthMM?: number;
|
|
10
|
-
xmm?: number;
|
|
11
|
-
ymm?: number;
|
|
12
|
-
}
|
|
13
|
-
export declare class RectElement extends BaseGraphicElement {
|
|
14
|
-
type: string;
|
|
15
|
-
fill: string;
|
|
16
|
-
stroke: string;
|
|
17
|
-
strokeWidthMM: number;
|
|
18
|
-
constructor(host: EditorHost, options?: Partial<RectOptions>);
|
|
19
|
-
get strokeWidth(): number;
|
|
20
|
-
get config(): {
|
|
21
|
-
fill: string;
|
|
22
|
-
stroke: string;
|
|
23
|
-
strokeWidth: number;
|
|
24
|
-
id: string;
|
|
25
|
-
x: number;
|
|
26
|
-
y: number;
|
|
27
|
-
width: number;
|
|
28
|
-
height: number;
|
|
29
|
-
rotation: number;
|
|
30
|
-
scaleX: number;
|
|
31
|
-
scaleY: number;
|
|
32
|
-
visible: boolean;
|
|
33
|
-
draggable: boolean;
|
|
34
|
-
};
|
|
35
|
-
deserialize(data: any): void;
|
|
36
|
-
serialize(): {
|
|
37
|
-
fill: string;
|
|
38
|
-
stroke: string;
|
|
39
|
-
strokeWidthMM: number;
|
|
40
|
-
id: string;
|
|
41
|
-
type: string;
|
|
42
|
-
xmm: number;
|
|
43
|
-
ymm: number;
|
|
44
|
-
wmm: number;
|
|
45
|
-
hmm: number;
|
|
46
|
-
rotation: number;
|
|
47
|
-
scaleX: number;
|
|
48
|
-
scaleY: number;
|
|
49
|
-
visible: boolean;
|
|
50
|
-
locked: boolean;
|
|
51
|
-
draggable: boolean;
|
|
52
|
-
resizable: boolean;
|
|
53
|
-
zIndex: number;
|
|
54
|
-
displayName: string | null;
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
export declare class RectPlugin extends GraphicPlugin<RectElement> {
|
|
58
|
-
name: string;
|
|
59
|
-
version: string;
|
|
60
|
-
graphicType: string;
|
|
61
|
-
graphicElement: typeof RectElement;
|
|
62
|
-
shapeComponent: import('vue').DefineComponent<import('./Shape.vue').Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('./Shape.vue').Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
63
|
-
iconComponent: import('vue').Component;
|
|
64
|
-
typeDisplayName: string;
|
|
65
|
-
propertyPanels: PropertyPanelRegistration[];
|
|
66
|
-
protected onInstall(): void;
|
|
67
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { BaseGraphicElement, BaseGraphicElementOptions } from '../../types/base-graphic-element';
|
|
2
|
-
import { GraphicPlugin, PropertyPanelRegistration } from '../../types/graphic-plugin';
|
|
3
|
-
import { EditorHost } from '../../core';
|
|
4
|
-
export interface TextOptions extends BaseGraphicElementOptions {
|
|
5
|
-
x?: number;
|
|
6
|
-
y?: number;
|
|
7
|
-
text?: string;
|
|
8
|
-
fontSize?: number;
|
|
9
|
-
align?: 'left' | 'center' | 'right' | 'justify';
|
|
10
|
-
verticalAlign?: 'top' | 'middle' | 'bottom';
|
|
11
|
-
fontStyle?: 'normal' | 'italic' | 'bold' | '500' | 'italic bold';
|
|
12
|
-
fill?: string;
|
|
13
|
-
xmm?: number;
|
|
14
|
-
ymm?: number;
|
|
15
|
-
}
|
|
16
|
-
export declare class TextElement extends BaseGraphicElement {
|
|
17
|
-
type: string;
|
|
18
|
-
text: string;
|
|
19
|
-
fontSize: number;
|
|
20
|
-
align: 'left' | 'center' | 'right' | 'justify';
|
|
21
|
-
verticalAlign: 'top' | 'middle' | 'bottom';
|
|
22
|
-
fontStyle: 'normal' | 'italic' | 'bold' | '500' | 'italic bold';
|
|
23
|
-
fill: string;
|
|
24
|
-
constructor(host: EditorHost, options?: Partial<TextOptions>);
|
|
25
|
-
get config(): {
|
|
26
|
-
text: string;
|
|
27
|
-
fontSize: number;
|
|
28
|
-
align: "left" | "right" | "center" | "justify";
|
|
29
|
-
verticalAlign: "top" | "bottom" | "middle";
|
|
30
|
-
fontStyle: "bold" | "normal" | "italic" | "500" | "italic bold";
|
|
31
|
-
fill: string;
|
|
32
|
-
id: string;
|
|
33
|
-
x: number;
|
|
34
|
-
y: number;
|
|
35
|
-
width: number;
|
|
36
|
-
height: number;
|
|
37
|
-
rotation: number;
|
|
38
|
-
scaleX: number;
|
|
39
|
-
scaleY: number;
|
|
40
|
-
visible: boolean;
|
|
41
|
-
draggable: boolean;
|
|
42
|
-
};
|
|
43
|
-
deserialize(data: any): void;
|
|
44
|
-
serialize(): {
|
|
45
|
-
text: string;
|
|
46
|
-
fontSize: number;
|
|
47
|
-
align: "left" | "right" | "center" | "justify";
|
|
48
|
-
verticalAlign: "top" | "bottom" | "middle";
|
|
49
|
-
fontStyle: "bold" | "normal" | "italic" | "500" | "italic bold";
|
|
50
|
-
fill: string;
|
|
51
|
-
id: string;
|
|
52
|
-
type: string;
|
|
53
|
-
xmm: number;
|
|
54
|
-
ymm: number;
|
|
55
|
-
wmm: number;
|
|
56
|
-
hmm: number;
|
|
57
|
-
rotation: number;
|
|
58
|
-
scaleX: number;
|
|
59
|
-
scaleY: number;
|
|
60
|
-
visible: boolean;
|
|
61
|
-
locked: boolean;
|
|
62
|
-
draggable: boolean;
|
|
63
|
-
resizable: boolean;
|
|
64
|
-
zIndex: number;
|
|
65
|
-
displayName: string | null;
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
export declare class TextPlugin extends GraphicPlugin<TextElement> {
|
|
69
|
-
name: string;
|
|
70
|
-
version: string;
|
|
71
|
-
graphicType: string;
|
|
72
|
-
graphicElement: typeof TextElement;
|
|
73
|
-
shapeComponent: import('vue').DefineComponent<import('./Shape.vue').Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('./Shape.vue').Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
74
|
-
iconComponent: import('vue').Component;
|
|
75
|
-
typeDisplayName: string;
|
|
76
|
-
propertyPanels: PropertyPanelRegistration[];
|
|
77
|
-
protected onInstall(): void;
|
|
78
|
-
protected onUninstall(): void;
|
|
79
|
-
}
|