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,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, {}, HTMLDivElement>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BasePlugin } from '../../types/base-plugin';
|
|
2
|
+
export declare class AlignPlugin extends BasePlugin {
|
|
3
|
+
name: string;
|
|
4
|
+
version: string;
|
|
5
|
+
protected onInstall(): void;
|
|
6
|
+
}
|
|
7
|
+
declare module '../../types' {
|
|
8
|
+
interface PluginMap {
|
|
9
|
+
'align-plugin': AlignPlugin;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EditorHost } from '../../core';
|
|
2
|
+
import { BarcodeElement } from './barcode';
|
|
3
|
+
interface Props {
|
|
4
|
+
host: EditorHost;
|
|
5
|
+
element: BarcodeElement;
|
|
6
|
+
selection: BarcodeElement[];
|
|
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,8 @@
|
|
|
1
|
+
import { BarcodeElement } from './barcode';
|
|
2
|
+
import { EditorHost } from '../../core';
|
|
3
|
+
interface Props {
|
|
4
|
+
host: EditorHost;
|
|
5
|
+
element: BarcodeElement;
|
|
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,72 @@
|
|
|
1
|
+
import { BasePlugin } from '../../types/base-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
|
+
deserialize(data: any): void;
|
|
32
|
+
serialize(): {
|
|
33
|
+
content: string;
|
|
34
|
+
format: string;
|
|
35
|
+
foreground: string;
|
|
36
|
+
background: string;
|
|
37
|
+
displayValue: boolean;
|
|
38
|
+
fontSizeMM: number;
|
|
39
|
+
marginMM: number;
|
|
40
|
+
barcodeHeightMM: number;
|
|
41
|
+
barcodeWidthMM: number;
|
|
42
|
+
id: string;
|
|
43
|
+
type: string;
|
|
44
|
+
xmm: number;
|
|
45
|
+
ymm: number;
|
|
46
|
+
wmm: number;
|
|
47
|
+
hmm: number;
|
|
48
|
+
rotation: number;
|
|
49
|
+
scaleX: number;
|
|
50
|
+
scaleY: number;
|
|
51
|
+
visible: boolean;
|
|
52
|
+
locked: boolean;
|
|
53
|
+
draggable: boolean;
|
|
54
|
+
transferable: boolean;
|
|
55
|
+
};
|
|
56
|
+
renderBarcode(): Promise<HTMLCanvasElement>;
|
|
57
|
+
}
|
|
58
|
+
export declare class BarcodePlugin extends BasePlugin {
|
|
59
|
+
name: string;
|
|
60
|
+
version: string;
|
|
61
|
+
protected onInstall(): void;
|
|
62
|
+
}
|
|
63
|
+
declare module '../../types' {
|
|
64
|
+
interface ElementTypeMap {
|
|
65
|
+
barcode: BarcodeElement;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
declare module '../../types' {
|
|
69
|
+
interface PluginMap {
|
|
70
|
+
'barcode-plugin': BarcodePlugin;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EditorHost } from '../../core';
|
|
2
|
+
import { ChartElement } from './chart';
|
|
3
|
+
interface Props {
|
|
4
|
+
host: EditorHost;
|
|
5
|
+
element: ChartElement;
|
|
6
|
+
selection: ChartElement[];
|
|
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,23 @@
|
|
|
1
|
+
import { ChartElement } from './chart';
|
|
2
|
+
import { EditorHost } from '../../core';
|
|
3
|
+
interface Props {
|
|
4
|
+
host: EditorHost;
|
|
5
|
+
element: ChartElement;
|
|
6
|
+
}
|
|
7
|
+
declare function __VLS_template(): {
|
|
8
|
+
attrs: Partial<{}>;
|
|
9
|
+
slots: {
|
|
10
|
+
default?(_: {}): any;
|
|
11
|
+
};
|
|
12
|
+
refs: {};
|
|
13
|
+
rootEl: any;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
|
+
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>;
|
|
17
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -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,38 @@
|
|
|
1
|
+
import { BasePlugin } from '../../types/base-plugin';
|
|
2
|
+
import { BaseGraphicElement, BaseGraphicElementOptions } from '../../types/base-graphic-element';
|
|
3
|
+
import { EditorHost } from '../../core';
|
|
4
|
+
import { EChartsOption } from 'echarts';
|
|
5
|
+
export interface ChartOptions extends BaseGraphicElementOptions {
|
|
6
|
+
x?: number;
|
|
7
|
+
y?: number;
|
|
8
|
+
chartType?: 'bar' | 'line' | 'pie' | 'scatter' | 'candlestick';
|
|
9
|
+
chartData?: any;
|
|
10
|
+
chartOptions?: EChartsOption;
|
|
11
|
+
}
|
|
12
|
+
export declare class ChartElement extends BaseGraphicElement {
|
|
13
|
+
type: string;
|
|
14
|
+
chartOptions: EChartsOption;
|
|
15
|
+
constructor(host: EditorHost, options?: Partial<ChartOptions>);
|
|
16
|
+
deserialize(data: any): void;
|
|
17
|
+
serialize(): {
|
|
18
|
+
chartOptions: EChartsOption;
|
|
19
|
+
id: string;
|
|
20
|
+
type: string;
|
|
21
|
+
xmm: number;
|
|
22
|
+
ymm: number;
|
|
23
|
+
wmm: number;
|
|
24
|
+
hmm: number;
|
|
25
|
+
rotation: number;
|
|
26
|
+
scaleX: number;
|
|
27
|
+
scaleY: number;
|
|
28
|
+
visible: boolean;
|
|
29
|
+
locked: boolean;
|
|
30
|
+
draggable: boolean;
|
|
31
|
+
transferable: boolean;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export declare class ChartPlugin extends BasePlugin {
|
|
35
|
+
name: string;
|
|
36
|
+
version: string;
|
|
37
|
+
protected onInstall(): void;
|
|
38
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BasePlugin, BaseEventData } from '../../types';
|
|
2
|
+
import { Component } from 'vue';
|
|
3
|
+
export declare class ContextMenuManagerPlugin extends BasePlugin {
|
|
4
|
+
name: string;
|
|
5
|
+
version: string;
|
|
6
|
+
contextMenus: ContextMenuRegisteredEventData[];
|
|
7
|
+
protected onInstall(): void;
|
|
8
|
+
protected onUninstall(): void;
|
|
9
|
+
private handleContextMenuRegistered;
|
|
10
|
+
getContextMenus(): ContextMenuRegisteredEventData[];
|
|
11
|
+
}
|
|
12
|
+
declare module '../../types' {
|
|
13
|
+
interface PluginMap {
|
|
14
|
+
'context-menu-manager-plugin': ContextMenuManagerPlugin;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export interface ContextMenuRegisteredEventData extends BaseEventData {
|
|
18
|
+
render: () => Component;
|
|
19
|
+
graphicTypes: string[];
|
|
20
|
+
isPublic: boolean;
|
|
21
|
+
isCanvas: boolean;
|
|
22
|
+
}
|
|
23
|
+
declare module '../../types' {
|
|
24
|
+
interface EventMap {
|
|
25
|
+
'context-menu:registered': (payload: ContextMenuRegisteredEventData) => void;
|
|
26
|
+
'context-menu:unregistered': (payload: ContextMenuRegisteredEventData) => void;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './context-menu-manager';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BasePlugin } from '../types/base-plugin';
|
|
2
|
+
import { IGraphicElement, ElementTypeMap } from '../types';
|
|
3
|
+
export declare class ElementManagerPlugin extends BasePlugin {
|
|
4
|
+
name: string;
|
|
5
|
+
version: string;
|
|
6
|
+
elements: Map<string, IGraphicElement>;
|
|
7
|
+
private elementConstructors;
|
|
8
|
+
protected onInstall(): void;
|
|
9
|
+
protected onUninstall(): void;
|
|
10
|
+
addElement(element: IGraphicElement): void;
|
|
11
|
+
removeElement(elementId: string): void;
|
|
12
|
+
getElement<K extends keyof ElementTypeMap>(elementId: string, type: K): ElementTypeMap[K];
|
|
13
|
+
getElement<T extends IGraphicElement = IGraphicElement>(elementId: string): T;
|
|
14
|
+
getAllElements<K extends keyof ElementTypeMap>(type: K): ElementTypeMap[K][];
|
|
15
|
+
getAllElements<T extends IGraphicElement = IGraphicElement>(): T[];
|
|
16
|
+
createElement<K extends keyof ElementTypeMap>(type: K): ElementTypeMap[K];
|
|
17
|
+
createElement<T extends IGraphicElement = IGraphicElement>(type: string): T;
|
|
18
|
+
createElement(type: string): IGraphicElement;
|
|
19
|
+
}
|
|
20
|
+
declare module '../types' {
|
|
21
|
+
interface PluginMap {
|
|
22
|
+
'element-manager-plugin': ElementManagerPlugin;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -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, {}, HTMLDivElement>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { BasePlugin } from '../../types/base-plugin';
|
|
2
|
+
import { BaseEventData } from '../../types';
|
|
3
|
+
import { EditorHost } from '../../core';
|
|
4
|
+
export declare class ExportPlugin extends BasePlugin {
|
|
5
|
+
name: string;
|
|
6
|
+
version: string;
|
|
7
|
+
pixelRatio: number;
|
|
8
|
+
constructor(host: EditorHost, pixelRatio?: number);
|
|
9
|
+
protected onInstall(): void;
|
|
10
|
+
handleExportExcel(): void;
|
|
11
|
+
handleExportImage(): void;
|
|
12
|
+
handleExportJSON(): void;
|
|
13
|
+
handleExportPdf(): void;
|
|
14
|
+
exportImage(mimeType?: 'image/png' | 'image/jpeg', background?: string): void;
|
|
15
|
+
exportJSON(): void;
|
|
16
|
+
exportPdf(): void;
|
|
17
|
+
elementsToDataURL(mimeType?: 'image/png' | 'image/jpeg', background?: string): string;
|
|
18
|
+
}
|
|
19
|
+
declare module '../../types' {
|
|
20
|
+
interface PluginMap {
|
|
21
|
+
'export-plugin': ExportPlugin;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
declare module '../../types' {
|
|
25
|
+
interface EventMap {
|
|
26
|
+
'export:start': (payload: ExportEventData) => void;
|
|
27
|
+
'export:complete': (payload: ExportEventData) => void;
|
|
28
|
+
'export:error': (payload: ExportEventData) => void;
|
|
29
|
+
'export:progress': (payload: ExportEventData) => void;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export interface ExportEventData extends BaseEventData {
|
|
33
|
+
format: 'png' | 'jpeg' | 'pdf' | 'json' | 'excel' | string;
|
|
34
|
+
error?: any;
|
|
35
|
+
prevent?: () => void;
|
|
36
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { BasePlugin } from '../../types/base-plugin';
|
|
2
|
+
import { Component } from 'vue';
|
|
3
|
+
import { BaseEventData } from '../../types';
|
|
4
|
+
export declare class GraphicManagerPlugin extends BasePlugin {
|
|
5
|
+
name: string;
|
|
6
|
+
version: string;
|
|
7
|
+
graphics: Map<string, GraphicRegisteredEventData>;
|
|
8
|
+
protected onInstall(): void;
|
|
9
|
+
getElementComponent(type: string): Component;
|
|
10
|
+
}
|
|
11
|
+
declare module '../../types' {
|
|
12
|
+
interface PluginMap {
|
|
13
|
+
'graphic-manager-plugin': GraphicManagerPlugin;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export interface GraphicRegisteredEventData extends BaseEventData {
|
|
17
|
+
type: string;
|
|
18
|
+
render: () => Component;
|
|
19
|
+
}
|
|
20
|
+
export interface GraphicToolRegisteredEventData extends BaseEventData {
|
|
21
|
+
type: string;
|
|
22
|
+
render: () => Component;
|
|
23
|
+
}
|
|
24
|
+
declare module '../../types' {
|
|
25
|
+
interface EventMap {
|
|
26
|
+
'graphic:registered': (payload: GraphicRegisteredEventData) => void;
|
|
27
|
+
'graphic:unregistered': (payload: GraphicRegisteredEventData) => void;
|
|
28
|
+
'graphic-tool:registered': (payload: GraphicToolRegisteredEventData) => void;
|
|
29
|
+
'graphic-tool:unregistered': (payload: GraphicToolRegisteredEventData) => void;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './graphic-manager';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BasePlugin } from '../types/base-plugin';
|
|
2
|
+
import { Component } from 'vue';
|
|
3
|
+
import { GraphicToolRegisteredEventData } from './graphic-manager';
|
|
4
|
+
export declare class GraphicToolManagerPlugin extends BasePlugin {
|
|
5
|
+
name: string;
|
|
6
|
+
version: string;
|
|
7
|
+
tools: Map<string, GraphicToolRegisteredEventData>;
|
|
8
|
+
protected onInstall(): void;
|
|
9
|
+
getToolList(): GraphicToolRegisteredEventData[];
|
|
10
|
+
getToolComponent(type: string): Component;
|
|
11
|
+
}
|
|
12
|
+
declare module '../types' {
|
|
13
|
+
interface PluginMap {
|
|
14
|
+
'graphic-tool-manager-plugin': GraphicToolManagerPlugin;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -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, {}, HTMLDivElement>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { BasePlugin } from '../../types/base-plugin';
|
|
2
|
+
import { BaseEventData } from '../../types';
|
|
3
|
+
export declare class ImportPlugin extends BasePlugin {
|
|
4
|
+
name: string;
|
|
5
|
+
version: string;
|
|
6
|
+
protected onInstall(): void;
|
|
7
|
+
createEventData(format: string, error?: any): {
|
|
8
|
+
format: string;
|
|
9
|
+
error: any;
|
|
10
|
+
timestamp: number;
|
|
11
|
+
source: string;
|
|
12
|
+
};
|
|
13
|
+
handleImportJSON(): void;
|
|
14
|
+
importJSON(data: string): void;
|
|
15
|
+
importExcel(): void;
|
|
16
|
+
}
|
|
17
|
+
declare module '../../types' {
|
|
18
|
+
interface PluginMap {
|
|
19
|
+
'import-plugin': ImportPlugin;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export interface ImportEventData extends BaseEventData {
|
|
23
|
+
format: 'json' | 'excel' | string;
|
|
24
|
+
error?: any;
|
|
25
|
+
}
|
|
26
|
+
declare module '../../types' {
|
|
27
|
+
interface EventMap {
|
|
28
|
+
'import:start': (payload: ImportEventData) => void;
|
|
29
|
+
'import:complete': (payload: ImportEventData) => void;
|
|
30
|
+
'import:error': (payload: ImportEventData) => void;
|
|
31
|
+
'import:progress': (payload: ImportEventData) => void;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export * from './align';
|
|
2
|
+
export * from './barcode';
|
|
3
|
+
export * from './chart';
|
|
4
|
+
export * from './context-menu-manager';
|
|
5
|
+
export * from './element-manager';
|
|
6
|
+
export * from './export';
|
|
7
|
+
export * from './graphic-manager';
|
|
8
|
+
export * from './graphic-tool-manager';
|
|
9
|
+
export * from './import';
|
|
10
|
+
export * from './keydown';
|
|
11
|
+
export * from './line';
|
|
12
|
+
export * from './preview';
|
|
13
|
+
export * from './property-panel-manager';
|
|
14
|
+
export * from './qrcode';
|
|
15
|
+
export * from './rect';
|
|
16
|
+
export * from './selection';
|
|
17
|
+
export * from './table';
|
|
18
|
+
export * from './text';
|
|
19
|
+
export * from './toolbar-manager';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BasePlugin } from '../types/base-plugin';
|
|
2
|
+
export declare class KeyDownPlugin extends BasePlugin {
|
|
3
|
+
name: string;
|
|
4
|
+
version: string;
|
|
5
|
+
protected onInstall(): void;
|
|
6
|
+
protected onUninstall(): void;
|
|
7
|
+
private handleKeyDown;
|
|
8
|
+
private deleteSelectionElement;
|
|
9
|
+
private toLeft;
|
|
10
|
+
}
|
|
11
|
+
declare module '../types' {
|
|
12
|
+
interface PluginMap {
|
|
13
|
+
'keydown-plugin': KeyDownPlugin;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EditorHost } from '../../core';
|
|
2
|
+
import { LineElement } from './line';
|
|
3
|
+
interface Props {
|
|
4
|
+
host: EditorHost;
|
|
5
|
+
element: LineElement;
|
|
6
|
+
selection: LineElement[];
|
|
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 { LineElement } from './line';
|
|
2
|
+
interface Props {
|
|
3
|
+
element: LineElement;
|
|
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,62 @@
|
|
|
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 LineOptions extends BaseGraphicElementOptions {
|
|
6
|
+
stroke?: string;
|
|
7
|
+
xmm?: number;
|
|
8
|
+
ymm?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare class LineElement extends BaseGraphicElement {
|
|
11
|
+
type: string;
|
|
12
|
+
stroke: string;
|
|
13
|
+
constructor(host: EditorHost, options?: Partial<LineOptions>);
|
|
14
|
+
get config(): {
|
|
15
|
+
points: number[];
|
|
16
|
+
stroke: string;
|
|
17
|
+
strokeWidth: number;
|
|
18
|
+
hitStrokeWidth: number;
|
|
19
|
+
id: string;
|
|
20
|
+
x: number;
|
|
21
|
+
y: number;
|
|
22
|
+
width: number;
|
|
23
|
+
height: number;
|
|
24
|
+
rotation: number;
|
|
25
|
+
scaleX: number;
|
|
26
|
+
scaleY: number;
|
|
27
|
+
visible: boolean;
|
|
28
|
+
draggable: boolean;
|
|
29
|
+
};
|
|
30
|
+
clone(): IGraphicElement;
|
|
31
|
+
serialize(): {
|
|
32
|
+
stroke: string;
|
|
33
|
+
id: string;
|
|
34
|
+
type: string;
|
|
35
|
+
xmm: number;
|
|
36
|
+
ymm: number;
|
|
37
|
+
wmm: number;
|
|
38
|
+
hmm: number;
|
|
39
|
+
rotation: number;
|
|
40
|
+
scaleX: number;
|
|
41
|
+
scaleY: number;
|
|
42
|
+
visible: boolean;
|
|
43
|
+
locked: boolean;
|
|
44
|
+
draggable: boolean;
|
|
45
|
+
transferable: boolean;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export declare class LinePlugin extends BasePlugin {
|
|
49
|
+
name: string;
|
|
50
|
+
version: string;
|
|
51
|
+
protected onInstall(): void;
|
|
52
|
+
}
|
|
53
|
+
declare module '../../types' {
|
|
54
|
+
interface ElementTypeMap {
|
|
55
|
+
line: LineElement;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
declare module '../../types' {
|
|
59
|
+
interface PluginMap {
|
|
60
|
+
'line-plugin': LinePlugin;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -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 @@
|
|
|
1
|
+
export * from './preview';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { BasePlugin, BaseEventData } from '../../types';
|
|
2
|
+
export declare class PreviewPlugin extends BasePlugin {
|
|
3
|
+
name: string;
|
|
4
|
+
version: string;
|
|
5
|
+
protected onInstall(): void;
|
|
6
|
+
handlePreview(): void;
|
|
7
|
+
preview(): void;
|
|
8
|
+
handlePrintPreview(): void;
|
|
9
|
+
printPreview(): void;
|
|
10
|
+
}
|
|
11
|
+
declare module '../../types' {
|
|
12
|
+
interface PluginMap {
|
|
13
|
+
'preview-plugin': PreviewPlugin;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export interface PreviewEventData extends BaseEventData {
|
|
17
|
+
error?: any;
|
|
18
|
+
prevent?: () => void;
|
|
19
|
+
}
|
|
20
|
+
declare module '../../types' {
|
|
21
|
+
interface EventMap {
|
|
22
|
+
'preview:start': (payload: PreviewEventData) => void;
|
|
23
|
+
'preview:complete': (payload: PreviewEventData) => void;
|
|
24
|
+
'preview:error': (payload: PreviewEventData) => void;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './property-panel-manager';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { BasePlugin } from '../../types/base-plugin';
|
|
2
|
+
import { IGraphicElement, BaseEventData } from '../../types';
|
|
3
|
+
import { Component } from 'vue';
|
|
4
|
+
export declare class PropertyPanelManagerPlugin extends BasePlugin {
|
|
5
|
+
name: string;
|
|
6
|
+
version: string;
|
|
7
|
+
propertyPanels: PropertyRegisteredPanelEventData[];
|
|
8
|
+
protected onInstall(): void;
|
|
9
|
+
protected onUninstall(): void;
|
|
10
|
+
getPanelsBySelection(selection: IGraphicElement[]): Component[];
|
|
11
|
+
private getPanelsByType;
|
|
12
|
+
private getPanelsByMultipleSelect;
|
|
13
|
+
private findCommonElements;
|
|
14
|
+
getCanvasPanels(): Component[];
|
|
15
|
+
}
|
|
16
|
+
declare module '../../types' {
|
|
17
|
+
interface PluginMap {
|
|
18
|
+
'property-panel-manager-plugin': PropertyPanelManagerPlugin;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
export interface PropertyRegisteredPanelEventData extends BaseEventData {
|
|
22
|
+
graphicTypes: string[];
|
|
23
|
+
isPublic: boolean;
|
|
24
|
+
isCanvas: boolean;
|
|
25
|
+
render: () => Component;
|
|
26
|
+
}
|
|
27
|
+
declare module '../../types' {
|
|
28
|
+
interface EventMap {
|
|
29
|
+
'property-panel:registered': (payload: PropertyRegisteredPanelEventData) => void;
|
|
30
|
+
'property-panel:unregistered': (payload: PropertyRegisteredPanelEventData) => void;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EditorHost } from '../../core';
|
|
2
|
+
import { QrcodeElement } from './qrcode';
|
|
3
|
+
interface Props {
|
|
4
|
+
host: EditorHost;
|
|
5
|
+
element: QrcodeElement;
|
|
6
|
+
selection: QrcodeElement[];
|
|
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;
|