vkedit 2.8.5
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 -0
- package/README.en.md +1173 -0
- package/README.md +1172 -0
- package/dist/commands/add-element-command.d.ts +13 -0
- package/dist/commands/align-elements-command.d.ts +13 -0
- package/dist/commands/base-command.d.ts +15 -0
- package/dist/commands/batch-command.d.ts +16 -0
- package/dist/commands/change-layer-order-command.d.ts +15 -0
- package/dist/commands/clear-selection-command.d.ts +11 -0
- package/dist/commands/i-command.d.ts +13 -0
- package/dist/commands/index.d.ts +16 -0
- package/dist/commands/remove-element-command.d.ts +12 -0
- package/dist/commands/transform-element-command.d.ts +18 -0
- package/dist/commands/update-property-command.d.ts +20 -0
- package/dist/components/BaseElementPropertyPanel.vue.d.ts +9 -0
- package/dist/components/CanvasPropertyPanel.vue.d.ts +9 -0
- package/dist/components/ContextMenuDelete.vue.d.ts +5 -0
- package/dist/components/TextProperty.vue.d.ts +15 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/ui/button/Button.vue.d.ts +27 -0
- package/dist/components/ui/button/index.d.ts +7 -0
- package/dist/components/ui/button-group/ButtonGroup.vue.d.ts +23 -0
- package/dist/components/ui/button-group/ButtonGroupSeparator.vue.d.ts +9 -0
- package/dist/components/ui/button-group/ButtonGroupText.vue.d.ts +26 -0
- package/dist/components/ui/button-group/index.d.ts +8 -0
- package/dist/components/ui/dropdown-menu/DropdownMenu.vue.d.ts +22 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.d.ts +28 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuContent.vue.d.ts +36 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuGroup.vue.d.ts +18 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuItem.vue.d.ts +26 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuLabel.vue.d.ts +23 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue.d.ts +22 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuRadioItem.vue.d.ts +26 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuSeparator.vue.d.ts +7 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuShortcut.vue.d.ts +21 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuSub.vue.d.ts +22 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +38 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +23 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuTrigger.vue.d.ts +18 -0
- package/dist/components/ui/dropdown-menu/index.d.ts +15 -0
- package/dist/components/ui/index.d.ts +14 -0
- package/dist/components/ui/input/Input.vue.d.ts +12 -0
- package/dist/components/ui/input/index.d.ts +1 -0
- package/dist/components/ui/input-mm/InputMM.vue.d.ts +13 -0
- package/dist/components/ui/input-mm/InputNumberMM.vue.d.ts +14 -0
- package/dist/components/ui/input-mm/index.d.ts +2 -0
- package/dist/components/ui/input-number/VkInputNumber.vue.d.ts +9 -0
- package/dist/components/ui/input-number/index.d.ts +1 -0
- package/dist/components/ui/label/Label.vue.d.ts +22 -0
- package/dist/components/ui/label/index.d.ts +1 -0
- package/dist/components/ui/number-field/NumberField.vue.d.ts +26 -0
- package/dist/components/ui/number-field/NumberFieldContent.vue.d.ts +21 -0
- package/dist/components/ui/number-field/NumberFieldDecrement.vue.d.ts +22 -0
- package/dist/components/ui/number-field/NumberFieldIncrement.vue.d.ts +22 -0
- package/dist/components/ui/number-field/NumberFieldInput.vue.d.ts +6 -0
- package/dist/components/ui/number-field/index.d.ts +5 -0
- package/dist/components/ui/scroll-area/ScrollArea.vue.d.ts +22 -0
- package/dist/components/ui/scroll-area/ScrollBar.vue.d.ts +9 -0
- package/dist/components/ui/scroll-area/index.d.ts +2 -0
- package/dist/components/ui/select/Select.vue.d.ts +25 -0
- package/dist/components/ui/select/SelectContent.vue.d.ts +32 -0
- package/dist/components/ui/select/SelectGroup.vue.d.ts +18 -0
- package/dist/components/ui/select/SelectItem.vue.d.ts +22 -0
- package/dist/components/ui/select/SelectItemText.vue.d.ts +18 -0
- package/dist/components/ui/select/SelectLabel.vue.d.ts +22 -0
- package/dist/components/ui/select/SelectScrollDownButton.vue.d.ts +22 -0
- package/dist/components/ui/select/SelectScrollUpButton.vue.d.ts +22 -0
- package/dist/components/ui/select/SelectSeparator.vue.d.ts +7 -0
- package/dist/components/ui/select/SelectTrigger.vue.d.ts +25 -0
- package/dist/components/ui/select/SelectValue.vue.d.ts +18 -0
- package/dist/components/ui/select/index.d.ts +11 -0
- package/dist/components/ui/separator/Separator.vue.d.ts +10 -0
- package/dist/components/ui/separator/index.d.ts +1 -0
- package/dist/components/ui/slider/Slider.vue.d.ts +13 -0
- package/dist/components/ui/slider/index.d.ts +1 -0
- package/dist/components/ui/switch/Switch.vue.d.ts +26 -0
- package/dist/components/ui/switch/index.d.ts +1 -0
- package/dist/components/ui/textarea/Textarea.vue.d.ts +12 -0
- package/dist/components/ui/textarea/index.d.ts +1 -0
- package/dist/components/ui/toggle/Toggle.vue.d.ts +33 -0
- package/dist/components/ui/toggle/index.d.ts +7 -0
- package/dist/core/BgLayer.vue.d.ts +8 -0
- package/dist/core/ContentLayer.vue.d.ts +29 -0
- package/dist/core/ContextMenu.vue.d.ts +6 -0
- package/dist/core/Editor.vue.d.ts +38 -0
- package/dist/core/PropertyPanel.vue.d.ts +23 -0
- package/dist/core/RulerLayer.vue.d.ts +10 -0
- package/dist/core/ScrollbarLayer.vue.d.ts +8 -0
- package/dist/core/SelectionLayer.vue.d.ts +6 -0
- package/dist/core/StageView.vue.d.ts +9 -0
- package/dist/core/Toolbar.vue.d.ts +29 -0
- package/dist/core/Toolbox.vue.d.ts +23 -0
- package/dist/core/Zoom.vue.d.ts +6 -0
- package/dist/core/editor-host.d.ts +34 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/create-host.d.ts +9 -0
- package/dist/favicon.ico +0 -0
- package/dist/hooks/index.d.ts +10 -0
- package/dist/hooks/use-bg-layer.d.ts +22 -0
- package/dist/hooks/use-content-layer.d.ts +66 -0
- package/dist/hooks/use-host-state.d.ts +14 -0
- package/dist/hooks/use-property-command.d.ts +6 -0
- package/dist/hooks/use-ruler-layer.d.ts +24 -0
- package/dist/hooks/use-scrollbar-layer.d.ts +47 -0
- package/dist/hooks/use-selection-layer.d.ts +35 -0
- package/dist/hooks/use-stage-event.d.ts +33 -0
- package/dist/hooks/use-stage.d.ts +14 -0
- package/dist/hooks/use-zoom.d.ts +12 -0
- package/dist/html2canvas.esm-Dmi1NfiH.js +4871 -0
- package/dist/index-CjPgwxVC.js +82707 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.es-DekiblxN.js +6674 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/plugins/align/Align.vue.d.ts +6 -0
- package/dist/plugins/align/align.d.ts +11 -0
- package/dist/plugins/align/index.d.ts +2 -0
- package/dist/plugins/barcode/PropertyPanel.vue.d.ts +9 -0
- package/dist/plugins/barcode/Shape.vue.d.ts +8 -0
- package/dist/plugins/barcode/Tool.vue.d.ts +5 -0
- package/dist/plugins/barcode/barcode.d.ts +72 -0
- package/dist/plugins/barcode/index.d.ts +4 -0
- package/dist/plugins/chart/PropertyPanel.vue.d.ts +9 -0
- package/dist/plugins/chart/Shape.vue.d.ts +23 -0
- package/dist/plugins/chart/Tool.vue.d.ts +5 -0
- package/dist/plugins/chart/chart.d.ts +38 -0
- package/dist/plugins/chart/index.d.ts +4 -0
- package/dist/plugins/context-menu-manager/context-menu-manager.d.ts +28 -0
- package/dist/plugins/context-menu-manager/index.d.ts +1 -0
- package/dist/plugins/element-manager.d.ts +24 -0
- package/dist/plugins/export/Export.vue.d.ts +6 -0
- package/dist/plugins/export/export.d.ts +36 -0
- package/dist/plugins/export/index.d.ts +2 -0
- package/dist/plugins/graphic-manager/graphic-manager.d.ts +31 -0
- package/dist/plugins/graphic-manager/index.d.ts +1 -0
- package/dist/plugins/graphic-tool-manager.d.ts +16 -0
- package/dist/plugins/import/Import.vue.d.ts +6 -0
- package/dist/plugins/import/import.d.ts +33 -0
- package/dist/plugins/import/index.d.ts +2 -0
- package/dist/plugins/index.d.ts +19 -0
- package/dist/plugins/keydown.d.ts +15 -0
- package/dist/plugins/line/PropertyPanel.vue.d.ts +9 -0
- package/dist/plugins/line/Shape.vue.d.ts +6 -0
- package/dist/plugins/line/Tool.vue.d.ts +6 -0
- package/dist/plugins/line/index.d.ts +4 -0
- package/dist/plugins/line/line.d.ts +62 -0
- package/dist/plugins/preview/PreviewButton.vue.d.ts +5 -0
- package/dist/plugins/preview/index.d.ts +1 -0
- package/dist/plugins/preview/preview.d.ts +26 -0
- package/dist/plugins/property-panel-manager/index.d.ts +1 -0
- package/dist/plugins/property-panel-manager/property-panel-manager.d.ts +32 -0
- package/dist/plugins/qrcode/PropertyPanel.vue.d.ts +9 -0
- package/dist/plugins/qrcode/Shape.vue.d.ts +8 -0
- package/dist/plugins/qrcode/Tool.vue.d.ts +5 -0
- package/dist/plugins/qrcode/index.d.ts +4 -0
- package/dist/plugins/qrcode/qrcode.d.ts +75 -0
- package/dist/plugins/rect/PropertyPanel.vue.d.ts +9 -0
- package/dist/plugins/rect/Shape.vue.d.ts +6 -0
- package/dist/plugins/rect/Tool.vue.d.ts +6 -0
- package/dist/plugins/rect/index.d.ts +4 -0
- package/dist/plugins/rect/rect.d.ts +70 -0
- package/dist/plugins/selection.d.ts +35 -0
- package/dist/plugins/table/CellsBorder.vue.d.ts +6 -0
- package/dist/plugins/table/ContextMenu.vue.d.ts +9 -0
- package/dist/plugins/table/PropertyPanel.vue.d.ts +9 -0
- package/dist/plugins/table/Shape.vue.d.ts +26 -0
- package/dist/plugins/table/Tool.vue.d.ts +6 -0
- package/dist/plugins/table/cell.d.ts +61 -0
- package/dist/plugins/table/index.d.ts +6 -0
- package/dist/plugins/table/table.d.ts +93 -0
- package/dist/plugins/text/PropertyPanel.vue.d.ts +9 -0
- package/dist/plugins/text/Shape.vue.d.ts +6 -0
- package/dist/plugins/text/TextContextMenu.vue.d.ts +5 -0
- package/dist/plugins/text/Tool.vue.d.ts +5 -0
- package/dist/plugins/text/index.d.ts +5 -0
- package/dist/plugins/text/text.d.ts +75 -0
- package/dist/plugins/toolbar-manager.d.ts +16 -0
- package/dist/purify.es-8O7LIJdo.js +553 -0
- package/dist/stores/index.d.ts +1 -0
- package/dist/stores/use-stage-store.d.ts +40 -0
- package/dist/styles/index.css +144 -0
- package/dist/types/base-graphic-element.d.ts +82 -0
- package/dist/types/base-graphic-type.d.ts +9 -0
- package/dist/types/base-plugin.d.ts +17 -0
- package/dist/types/base.d.ts +81 -0
- package/dist/types/element-type-map.d.ts +12 -0
- package/dist/types/event-data.d.ts +116 -0
- package/dist/types/event-map.d.ts +146 -0
- package/dist/types/index.d.ts +9 -0
- package/dist/types/konva-text.d.ts +3 -0
- package/dist/types/plugin-map.d.ts +12 -0
- package/dist/vkedit.css +1 -0
- package/dist/vkedit.es.js +113 -0
- package/package.json +91 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { QrcodeElement } from './qrcode';
|
|
2
|
+
import { EditorHost } from '../../core';
|
|
3
|
+
interface Props {
|
|
4
|
+
host: EditorHost;
|
|
5
|
+
element: QrcodeElement;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
host: import('../../core').EditorHost;
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { BasePlugin } from '../../types/base-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
|
+
transferable: boolean;
|
|
38
|
+
};
|
|
39
|
+
get config(): {
|
|
40
|
+
[key: string]: any;
|
|
41
|
+
id: string;
|
|
42
|
+
x: number;
|
|
43
|
+
y: number;
|
|
44
|
+
width: number;
|
|
45
|
+
height: number;
|
|
46
|
+
rotation: number;
|
|
47
|
+
scaleX: number;
|
|
48
|
+
scaleY: number;
|
|
49
|
+
visible: boolean;
|
|
50
|
+
draggable: boolean;
|
|
51
|
+
};
|
|
52
|
+
get margin(): number;
|
|
53
|
+
renderQrcode(): Promise<HTMLCanvasElement>;
|
|
54
|
+
getBoundingBox(): {
|
|
55
|
+
x: number;
|
|
56
|
+
y: number;
|
|
57
|
+
width: number;
|
|
58
|
+
height: number;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
export declare class QrcodePlugin extends BasePlugin {
|
|
62
|
+
name: string;
|
|
63
|
+
version: string;
|
|
64
|
+
protected onInstall(): void;
|
|
65
|
+
}
|
|
66
|
+
declare module '../../types' {
|
|
67
|
+
interface ElementTypeMap {
|
|
68
|
+
qr: QrcodeElement;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
declare module '../../types' {
|
|
72
|
+
interface PluginMap {
|
|
73
|
+
'qr-plugin': QrcodePlugin;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EditorHost } from '../../core';
|
|
2
|
+
import { RectElement } from './rect';
|
|
3
|
+
interface Props {
|
|
4
|
+
host: EditorHost;
|
|
5
|
+
element: RectElement;
|
|
6
|
+
selection: RectElement[];
|
|
7
|
+
}
|
|
8
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { RectElement } from './rect';
|
|
2
|
+
interface Props {
|
|
3
|
+
element: RectElement;
|
|
4
|
+
}
|
|
5
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { EditorHost } from '../../core';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
host: EditorHost;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { BasePlugin } from '../../types/base-plugin';
|
|
2
|
+
import { IGraphicElement } from '../../types';
|
|
3
|
+
import { BaseGraphicElement, BaseGraphicElementOptions } from '../../types/base-graphic-element';
|
|
4
|
+
import { EditorHost } from '../../core';
|
|
5
|
+
export interface RectOptions extends BaseGraphicElementOptions {
|
|
6
|
+
x?: number;
|
|
7
|
+
y?: number;
|
|
8
|
+
fill?: string;
|
|
9
|
+
stroke?: string;
|
|
10
|
+
strokeWidthMM?: number;
|
|
11
|
+
xmm?: number;
|
|
12
|
+
ymm?: number;
|
|
13
|
+
}
|
|
14
|
+
export declare class RectElement extends BaseGraphicElement {
|
|
15
|
+
type: string;
|
|
16
|
+
fill: string;
|
|
17
|
+
stroke: string;
|
|
18
|
+
strokeWidthMM: number;
|
|
19
|
+
constructor(host: EditorHost, options?: Partial<RectOptions>);
|
|
20
|
+
get strokeWidth(): number;
|
|
21
|
+
get config(): {
|
|
22
|
+
fill: string;
|
|
23
|
+
stroke: string;
|
|
24
|
+
strokeWidth: number;
|
|
25
|
+
id: string;
|
|
26
|
+
x: number;
|
|
27
|
+
y: number;
|
|
28
|
+
width: number;
|
|
29
|
+
height: number;
|
|
30
|
+
rotation: number;
|
|
31
|
+
scaleX: number;
|
|
32
|
+
scaleY: number;
|
|
33
|
+
visible: boolean;
|
|
34
|
+
draggable: boolean;
|
|
35
|
+
};
|
|
36
|
+
clone(): IGraphicElement;
|
|
37
|
+
serialize(): {
|
|
38
|
+
fill: string;
|
|
39
|
+
stroke: string;
|
|
40
|
+
strokeWidthMM: number;
|
|
41
|
+
id: string;
|
|
42
|
+
type: string;
|
|
43
|
+
xmm: number;
|
|
44
|
+
ymm: number;
|
|
45
|
+
wmm: number;
|
|
46
|
+
hmm: number;
|
|
47
|
+
rotation: number;
|
|
48
|
+
scaleX: number;
|
|
49
|
+
scaleY: number;
|
|
50
|
+
visible: boolean;
|
|
51
|
+
locked: boolean;
|
|
52
|
+
draggable: boolean;
|
|
53
|
+
transferable: boolean;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export declare class RectPlugin extends BasePlugin {
|
|
57
|
+
name: string;
|
|
58
|
+
version: string;
|
|
59
|
+
protected onInstall(): void;
|
|
60
|
+
}
|
|
61
|
+
declare module '../../types' {
|
|
62
|
+
interface ElementTypeMap {
|
|
63
|
+
rect: RectElement;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
declare module '../../types' {
|
|
67
|
+
interface PluginMap {
|
|
68
|
+
'rect-plugin': RectPlugin;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { BasePlugin } from '../types/base-plugin';
|
|
2
|
+
import { IGraphicElement, Point2D } from '../types';
|
|
3
|
+
export declare class SelectionPlugin extends BasePlugin {
|
|
4
|
+
name: string;
|
|
5
|
+
version: string;
|
|
6
|
+
isSelecting: boolean;
|
|
7
|
+
selectionStart: Point2D;
|
|
8
|
+
selectionEnd: Point2D;
|
|
9
|
+
private selectionIds;
|
|
10
|
+
private mouseDownId;
|
|
11
|
+
private elementsPlugin;
|
|
12
|
+
protected onInstall(): void;
|
|
13
|
+
protected onUninstall(): void;
|
|
14
|
+
private handleMouseDown;
|
|
15
|
+
private handleMouseMove;
|
|
16
|
+
private handleMouseUp;
|
|
17
|
+
private getSelectedElements;
|
|
18
|
+
private handleElementAdded;
|
|
19
|
+
private handleElementRemoved;
|
|
20
|
+
private findElementsInRect;
|
|
21
|
+
private getClickElementId;
|
|
22
|
+
private rectIntersect;
|
|
23
|
+
selectElement(element: IGraphicElement): void;
|
|
24
|
+
deselectElement(elementId: string): void;
|
|
25
|
+
clearSelection(): void;
|
|
26
|
+
selectElementByIds(ids: string[]): void;
|
|
27
|
+
getSelectionElements(): IGraphicElement[];
|
|
28
|
+
getSelectionElementIds(): string[];
|
|
29
|
+
getCurrentElement(): IGraphicElement | null;
|
|
30
|
+
}
|
|
31
|
+
declare module '../types' {
|
|
32
|
+
interface PluginMap {
|
|
33
|
+
'selection-plugin': SelectionPlugin;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TableElement } from './table';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
element: TableElement;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EditorHost } from '../../core';
|
|
2
|
+
import { TableElement } from './table';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
host: EditorHost;
|
|
5
|
+
element: TableElement;
|
|
6
|
+
selection: TableElement[];
|
|
7
|
+
};
|
|
8
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EditorHost } from '../../core';
|
|
2
|
+
import { TableElement } from './table';
|
|
3
|
+
interface Props {
|
|
4
|
+
host: EditorHost;
|
|
5
|
+
element: TableElement;
|
|
6
|
+
selection: TableElement[];
|
|
7
|
+
}
|
|
8
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { EditorHost } from '../../core';
|
|
2
|
+
import { TableElement } from './table';
|
|
3
|
+
interface Props {
|
|
4
|
+
element: TableElement;
|
|
5
|
+
host: EditorHost;
|
|
6
|
+
}
|
|
7
|
+
declare function __VLS_template(): {
|
|
8
|
+
attrs: Partial<{}>;
|
|
9
|
+
slots: {
|
|
10
|
+
default?(_: {
|
|
11
|
+
host: EditorHost;
|
|
12
|
+
element: TableElement;
|
|
13
|
+
}): any;
|
|
14
|
+
};
|
|
15
|
+
refs: {};
|
|
16
|
+
rootEl: any;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
19
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { EditorHost } from '../../core';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
host: EditorHost;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export interface CellFont {
|
|
2
|
+
name?: string;
|
|
3
|
+
family?: string;
|
|
4
|
+
scheme?: 'minor' | 'major' | 'none';
|
|
5
|
+
charset?: number;
|
|
6
|
+
size?: number;
|
|
7
|
+
color?: string;
|
|
8
|
+
bold?: boolean;
|
|
9
|
+
italic?: boolean;
|
|
10
|
+
underline?: boolean | 'none' | 'single' | 'double' | 'singleAccounting' | 'doubleAccounting';
|
|
11
|
+
strikeout?: boolean;
|
|
12
|
+
strike?: 'none' | 'single' | 'double';
|
|
13
|
+
outline?: boolean;
|
|
14
|
+
vertAlign?: 'superscript' | 'subscript';
|
|
15
|
+
}
|
|
16
|
+
export interface CellAlignment {
|
|
17
|
+
vertical?: 'top' | 'middle' | 'bottom' | 'distributed' | 'justify';
|
|
18
|
+
horizontal?: 'left' | 'center' | 'right' | 'justify' | 'fill' | 'centerContinuous' | 'distributed';
|
|
19
|
+
wrapText?: boolean;
|
|
20
|
+
indent?: number;
|
|
21
|
+
textRotation?: number | 'vertical';
|
|
22
|
+
readingOrder?: 'rtl' | 'ltr';
|
|
23
|
+
}
|
|
24
|
+
export interface BorderItem {
|
|
25
|
+
style: 'thin' | 'dotted' | 'dashDot' | 'dashDotDot' | 'dashed' | 'double' | 'hair' | 'medium' | 'mediumDashDot' | 'mediumDashDotDot' | 'mediumDashed' | 'slantDashDot' | 'thick';
|
|
26
|
+
color?: {
|
|
27
|
+
argb: string;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export interface CellBorder {
|
|
31
|
+
left?: BorderItem;
|
|
32
|
+
right?: BorderItem;
|
|
33
|
+
top?: BorderItem;
|
|
34
|
+
bottom?: BorderItem;
|
|
35
|
+
}
|
|
36
|
+
export interface CellFill {
|
|
37
|
+
type?: 'pattern';
|
|
38
|
+
pattern?: 'none' | 'solid' | 'darkVertical' | 'darkHorizontal' | 'darkDown' | 'darkUp' | 'darkGrid' | 'darkTrellis' | 'lightVertical' | 'lightHorizontal' | 'lightDown' | 'lightUp' | 'lightGrid' | 'lightTrellis' | 'gray125' | 'gray0625';
|
|
39
|
+
fgColor?: {
|
|
40
|
+
argb: string;
|
|
41
|
+
};
|
|
42
|
+
bgColor?: {
|
|
43
|
+
argb: string;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export declare class Cell {
|
|
47
|
+
value: string;
|
|
48
|
+
font: CellFont;
|
|
49
|
+
alignment: CellAlignment;
|
|
50
|
+
border: CellBorder;
|
|
51
|
+
fill: CellFill;
|
|
52
|
+
visible: boolean;
|
|
53
|
+
master?: Cell;
|
|
54
|
+
mergeRange?: {
|
|
55
|
+
startRow: number;
|
|
56
|
+
endRow: number;
|
|
57
|
+
startCol: number;
|
|
58
|
+
endCol: number;
|
|
59
|
+
};
|
|
60
|
+
constructor();
|
|
61
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as TableCellsBorder } from './CellsBorder.vue';
|
|
2
|
+
export { default as TablePropertyPanel } from './PropertyPanel.vue';
|
|
3
|
+
export { default as TableShape } from './Shape.vue';
|
|
4
|
+
export { default as TableTool } from './Tool.vue';
|
|
5
|
+
export { default as TableContextMenu } from './ContextMenu.vue';
|
|
6
|
+
export * from './table';
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { BasePlugin } from '../../types/base-plugin';
|
|
2
|
+
import { IGraphicElement } from '../../types';
|
|
3
|
+
import { BaseGraphicElement, BaseGraphicElementOptions } from '../../types/base-graphic-element';
|
|
4
|
+
import { EditorHost } from '../../core';
|
|
5
|
+
export interface TableOptions extends BaseGraphicElementOptions {
|
|
6
|
+
x?: number;
|
|
7
|
+
y?: number;
|
|
8
|
+
rowsHeight?: number[];
|
|
9
|
+
colsWidth?: number[];
|
|
10
|
+
cells?: any[][];
|
|
11
|
+
xmm?: number;
|
|
12
|
+
ymm?: number;
|
|
13
|
+
}
|
|
14
|
+
export interface CellConfig {
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
fill: string;
|
|
20
|
+
text: string;
|
|
21
|
+
borderUp: boolean;
|
|
22
|
+
borderLeft: boolean;
|
|
23
|
+
mergeUp: boolean;
|
|
24
|
+
mergeLeft: boolean;
|
|
25
|
+
fontSize: number;
|
|
26
|
+
align: 'left' | 'center' | 'right' | 'justify';
|
|
27
|
+
verticalAlign: 'top' | 'middle' | 'bottom';
|
|
28
|
+
fontStyle?: 'normal' | 'italic' | 'bold' | '500' | 'italic bold';
|
|
29
|
+
visible: boolean;
|
|
30
|
+
}
|
|
31
|
+
export declare class TableElement extends BaseGraphicElement {
|
|
32
|
+
type: string;
|
|
33
|
+
activeCell: CellConfig;
|
|
34
|
+
activeRow: number;
|
|
35
|
+
activeCol: number;
|
|
36
|
+
rowsHeight: number[];
|
|
37
|
+
colsWidth: number[];
|
|
38
|
+
cells: CellConfig[][];
|
|
39
|
+
constructor(host: EditorHost, options?: Partial<TableOptions>);
|
|
40
|
+
initWidthHeight(): void;
|
|
41
|
+
initCells(): void;
|
|
42
|
+
updateCells(): void;
|
|
43
|
+
getCellX(col: number): number;
|
|
44
|
+
getCellY(row: number): number;
|
|
45
|
+
getCellSize: (rowIndex: number, colIndex: number) => {
|
|
46
|
+
width: number;
|
|
47
|
+
height: number;
|
|
48
|
+
};
|
|
49
|
+
setActiveCell(rowIndex: number, colIndex: number): void;
|
|
50
|
+
getDefaultCellConfig(rowIndex: number, colIndex: number): CellConfig;
|
|
51
|
+
addRow(after?: number): void;
|
|
52
|
+
removeRow(index?: number): void;
|
|
53
|
+
addCol(after?: number): void;
|
|
54
|
+
removeCol(index?: number): void;
|
|
55
|
+
clone(): IGraphicElement;
|
|
56
|
+
serialize(): {
|
|
57
|
+
rowsHeight: number[];
|
|
58
|
+
colsWidth: number[];
|
|
59
|
+
cells: CellConfig[][];
|
|
60
|
+
id: string;
|
|
61
|
+
type: string;
|
|
62
|
+
xmm: number;
|
|
63
|
+
ymm: number;
|
|
64
|
+
wmm: number;
|
|
65
|
+
hmm: number;
|
|
66
|
+
rotation: number;
|
|
67
|
+
scaleX: number;
|
|
68
|
+
scaleY: number;
|
|
69
|
+
visible: boolean;
|
|
70
|
+
locked: boolean;
|
|
71
|
+
draggable: boolean;
|
|
72
|
+
transferable: boolean;
|
|
73
|
+
};
|
|
74
|
+
getCell(row?: number, col?: number): CellConfig | undefined;
|
|
75
|
+
get rowCount(): number;
|
|
76
|
+
get colCount(): number;
|
|
77
|
+
offset(row: number, col: number): CellConfig | undefined;
|
|
78
|
+
}
|
|
79
|
+
export declare class TablePlugin extends BasePlugin {
|
|
80
|
+
name: string;
|
|
81
|
+
version: string;
|
|
82
|
+
protected onInstall(): void;
|
|
83
|
+
}
|
|
84
|
+
declare module '../../types' {
|
|
85
|
+
interface ElementTypeMap {
|
|
86
|
+
table: TableElement;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
declare module '../../types' {
|
|
90
|
+
interface PluginMap {
|
|
91
|
+
'table-plugin': TablePlugin;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EditorHost } from '../../core';
|
|
2
|
+
import { TextElement } from './text';
|
|
3
|
+
interface Props {
|
|
4
|
+
host: EditorHost;
|
|
5
|
+
element: TextElement;
|
|
6
|
+
selection: TextElement[];
|
|
7
|
+
}
|
|
8
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TextElement } from './text';
|
|
2
|
+
interface Props {
|
|
3
|
+
element: TextElement;
|
|
4
|
+
}
|
|
5
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
host: import('../../core').EditorHost;
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
host: import('../../core').EditorHost;
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { BasePlugin } from '../../types/base-plugin';
|
|
2
|
+
import { BaseGraphicElement, BaseGraphicElementOptions } from '../../types/base-graphic-element';
|
|
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
|
+
xmm?: number;
|
|
13
|
+
ymm?: number;
|
|
14
|
+
}
|
|
15
|
+
export declare class TextElement extends BaseGraphicElement {
|
|
16
|
+
type: string;
|
|
17
|
+
text: string;
|
|
18
|
+
fontSize: number;
|
|
19
|
+
align: 'left' | 'center' | 'right' | 'justify';
|
|
20
|
+
verticalAlign: 'top' | 'middle' | 'bottom';
|
|
21
|
+
fontStyle: 'normal' | 'italic' | 'bold' | '500' | 'italic bold';
|
|
22
|
+
constructor(host: EditorHost, options?: Partial<TextOptions>);
|
|
23
|
+
get config(): {
|
|
24
|
+
text: string;
|
|
25
|
+
fontSize: number;
|
|
26
|
+
align: "left" | "right" | "center" | "justify";
|
|
27
|
+
verticalAlign: "top" | "bottom" | "middle";
|
|
28
|
+
fontStyle: "bold" | "normal" | "italic" | "500" | "italic bold";
|
|
29
|
+
id: string;
|
|
30
|
+
x: number;
|
|
31
|
+
y: number;
|
|
32
|
+
width: number;
|
|
33
|
+
height: number;
|
|
34
|
+
rotation: number;
|
|
35
|
+
scaleX: number;
|
|
36
|
+
scaleY: number;
|
|
37
|
+
visible: boolean;
|
|
38
|
+
draggable: boolean;
|
|
39
|
+
};
|
|
40
|
+
serialize(): {
|
|
41
|
+
text: string;
|
|
42
|
+
fontSize: number;
|
|
43
|
+
align: "left" | "right" | "center" | "justify";
|
|
44
|
+
verticalAlign: "top" | "bottom" | "middle";
|
|
45
|
+
fontStyle: "bold" | "normal" | "italic" | "500" | "italic bold";
|
|
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
|
+
transferable: boolean;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
export declare class TextPlugin extends BasePlugin {
|
|
62
|
+
name: string;
|
|
63
|
+
version: string;
|
|
64
|
+
protected onInstall(): void;
|
|
65
|
+
}
|
|
66
|
+
declare module '../../types' {
|
|
67
|
+
interface ElementTypeMap {
|
|
68
|
+
text: TextElement;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
declare module '../../types' {
|
|
72
|
+
interface PluginMap {
|
|
73
|
+
'text-plugin': TextPlugin;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BasePlugin } from '../types/base-plugin';
|
|
2
|
+
import { ToolEventData } from '../types';
|
|
3
|
+
export declare class ToolbarManagerPlugin extends BasePlugin {
|
|
4
|
+
name: string;
|
|
5
|
+
version: string;
|
|
6
|
+
private toolbars;
|
|
7
|
+
protected onInstall(): void;
|
|
8
|
+
protected onUninstall(): void;
|
|
9
|
+
private handleRegistered;
|
|
10
|
+
getTools(): ToolEventData[];
|
|
11
|
+
}
|
|
12
|
+
declare module '../types' {
|
|
13
|
+
interface PluginMap {
|
|
14
|
+
'toolbar-manager-plugin': ToolbarManagerPlugin;
|
|
15
|
+
}
|
|
16
|
+
}
|