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,13 @@
|
|
|
1
|
+
import { SliderRootProps } from 'reka-ui';
|
|
2
|
+
import { HTMLAttributes } from 'vue';
|
|
3
|
+
type __VLS_Props = SliderRootProps & {
|
|
4
|
+
class?: HTMLAttributes["class"];
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
"update:modelValue": (payload: number[] | undefined) => any;
|
|
8
|
+
valueCommit: (payload: number[]) => any;
|
|
9
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
"onUpdate:modelValue"?: ((payload: number[] | undefined) => any) | undefined;
|
|
11
|
+
onValueCommit?: ((payload: number[]) => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Slider } from './Slider.vue';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { SwitchRootProps } from 'reka-ui';
|
|
2
|
+
import { HTMLAttributes } from 'vue';
|
|
3
|
+
type __VLS_Props = SwitchRootProps & {
|
|
4
|
+
class?: HTMLAttributes["class"];
|
|
5
|
+
};
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
slots: {
|
|
9
|
+
thumb?(_: {}): any;
|
|
10
|
+
};
|
|
11
|
+
refs: {};
|
|
12
|
+
rootEl: any;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
16
|
+
"update:modelValue": (payload: boolean) => any;
|
|
17
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
|
+
"onUpdate:modelValue"?: ((payload: boolean) => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, 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 @@
|
|
|
1
|
+
export { default as Switch } from './Switch.vue';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
class?: HTMLAttributes["class"];
|
|
4
|
+
defaultValue?: string | number;
|
|
5
|
+
modelValue?: string | number;
|
|
6
|
+
};
|
|
7
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
8
|
+
"update:modelValue": (payload: string | number) => any;
|
|
9
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
"onUpdate:modelValue"?: ((payload: string | number) => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLTextAreaElement>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Textarea } from './Textarea.vue';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ToggleProps } from 'reka-ui';
|
|
2
|
+
import { HTMLAttributes } from 'vue';
|
|
3
|
+
import { ToggleVariants } from '.';
|
|
4
|
+
type __VLS_Props = ToggleProps & {
|
|
5
|
+
class?: HTMLAttributes["class"];
|
|
6
|
+
variant?: ToggleVariants["variant"];
|
|
7
|
+
size?: ToggleVariants["size"];
|
|
8
|
+
};
|
|
9
|
+
declare function __VLS_template(): {
|
|
10
|
+
attrs: Partial<{}>;
|
|
11
|
+
slots: {
|
|
12
|
+
default?(_: any): any;
|
|
13
|
+
};
|
|
14
|
+
refs: {};
|
|
15
|
+
rootEl: any;
|
|
16
|
+
};
|
|
17
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
18
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
19
|
+
"update:modelValue": (value: boolean) => any;
|
|
20
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
21
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
22
|
+
}>, {
|
|
23
|
+
size: "default" | "sm" | "lg" | null;
|
|
24
|
+
variant: "default" | "outline" | null;
|
|
25
|
+
disabled: boolean;
|
|
26
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
28
|
+
export default _default;
|
|
29
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
30
|
+
new (): {
|
|
31
|
+
$slots: S;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
export { default as Toggle } from './Toggle.vue';
|
|
3
|
+
export declare const toggleVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "outline" | null | undefined;
|
|
5
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
export type ToggleVariants = VariantProps<typeof toggleVariants>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EditorHost } from '.';
|
|
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, {
|
|
6
|
+
bgLayerRef: unknown;
|
|
7
|
+
}, any>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { EditorHost } from '.';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
host: EditorHost;
|
|
4
|
+
};
|
|
5
|
+
declare function __VLS_template(): {
|
|
6
|
+
attrs: Partial<{}>;
|
|
7
|
+
slots: {
|
|
8
|
+
default?(_: {}): any;
|
|
9
|
+
};
|
|
10
|
+
refs: {
|
|
11
|
+
contentLayerRef: unknown;
|
|
12
|
+
groupRef: unknown;
|
|
13
|
+
transformerRef: unknown;
|
|
14
|
+
};
|
|
15
|
+
rootEl: any;
|
|
16
|
+
};
|
|
17
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
18
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
19
|
+
contentLayerRef: unknown;
|
|
20
|
+
groupRef: unknown;
|
|
21
|
+
transformerRef: unknown;
|
|
22
|
+
}, any>;
|
|
23
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { EditorHost } from '.';
|
|
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,38 @@
|
|
|
1
|
+
import { EditorHost } from '.';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
host: EditorHost;
|
|
4
|
+
showToolbox?: boolean;
|
|
5
|
+
showPropertyPanel?: boolean;
|
|
6
|
+
showToolbar?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare function __VLS_template(): {
|
|
9
|
+
attrs: Partial<{}>;
|
|
10
|
+
slots: {
|
|
11
|
+
'toolbar-left'?(_: {
|
|
12
|
+
host: EditorHost;
|
|
13
|
+
}): any;
|
|
14
|
+
'toolbar-center'?(_: {
|
|
15
|
+
host: EditorHost;
|
|
16
|
+
}): any;
|
|
17
|
+
'toolbar-right'?(_: {
|
|
18
|
+
host: EditorHost;
|
|
19
|
+
}): any;
|
|
20
|
+
toolbox?(_: {
|
|
21
|
+
host: EditorHost;
|
|
22
|
+
}): any;
|
|
23
|
+
'property-panel'?(_: {
|
|
24
|
+
host: EditorHost;
|
|
25
|
+
}): any;
|
|
26
|
+
};
|
|
27
|
+
refs: {};
|
|
28
|
+
rootEl: HTMLDivElement;
|
|
29
|
+
};
|
|
30
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
31
|
+
declare const __VLS_component: 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>;
|
|
32
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
33
|
+
export default _default;
|
|
34
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
35
|
+
new (): {
|
|
36
|
+
$slots: S;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { EditorHost } from '.';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
host: EditorHost;
|
|
4
|
+
};
|
|
5
|
+
declare function __VLS_template(): {
|
|
6
|
+
attrs: Partial<{}>;
|
|
7
|
+
slots: {
|
|
8
|
+
'property-panel'?(_: {
|
|
9
|
+
host: EditorHost;
|
|
10
|
+
}): any;
|
|
11
|
+
};
|
|
12
|
+
refs: {};
|
|
13
|
+
rootEl: HTMLDivElement;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
|
+
declare const __VLS_component: 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>;
|
|
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,10 @@
|
|
|
1
|
+
import { EditorHost } from '.';
|
|
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, {
|
|
6
|
+
rulerLayerRef: unknown;
|
|
7
|
+
upRulerShapeRef: unknown;
|
|
8
|
+
leftRulerShapeRef: unknown;
|
|
9
|
+
}, any>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EditorHost } from '.';
|
|
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, {
|
|
6
|
+
scrollbarLayerRef: unknown;
|
|
7
|
+
}, any>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { EditorHost } from '.';
|
|
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,9 @@
|
|
|
1
|
+
import { EditorHost } from '.';
|
|
2
|
+
interface Props {
|
|
3
|
+
host: EditorHost;
|
|
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, {
|
|
6
|
+
stageWrapperRef: HTMLDivElement;
|
|
7
|
+
stageRef: unknown;
|
|
8
|
+
}, HTMLDivElement>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { EditorHost } from '.';
|
|
2
|
+
interface Props {
|
|
3
|
+
host: EditorHost;
|
|
4
|
+
}
|
|
5
|
+
declare function __VLS_template(): {
|
|
6
|
+
attrs: Partial<{}>;
|
|
7
|
+
slots: {
|
|
8
|
+
left?(_: {
|
|
9
|
+
host: EditorHost;
|
|
10
|
+
}): any;
|
|
11
|
+
center?(_: {
|
|
12
|
+
host: EditorHost;
|
|
13
|
+
}): any;
|
|
14
|
+
right?(_: {
|
|
15
|
+
host: EditorHost;
|
|
16
|
+
}): any;
|
|
17
|
+
};
|
|
18
|
+
refs: {};
|
|
19
|
+
rootEl: HTMLDivElement;
|
|
20
|
+
};
|
|
21
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
22
|
+
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, {}, HTMLDivElement>;
|
|
23
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { EditorHost } from '.';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
host: EditorHost;
|
|
4
|
+
};
|
|
5
|
+
declare function __VLS_template(): {
|
|
6
|
+
attrs: Partial<{}>;
|
|
7
|
+
slots: {
|
|
8
|
+
toolbox?(_: {
|
|
9
|
+
host: EditorHost;
|
|
10
|
+
}): any;
|
|
11
|
+
};
|
|
12
|
+
refs: {};
|
|
13
|
+
rootEl: HTMLDivElement;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
|
+
declare const __VLS_component: 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>;
|
|
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,6 @@
|
|
|
1
|
+
import { EditorHost } from '.';
|
|
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,34 @@
|
|
|
1
|
+
import { IEditorPlugin, IEditorState, EventMap, PluginMap } from '../types';
|
|
2
|
+
import { ICommand } from '../commands/i-command';
|
|
3
|
+
import { RectPlugin } from '../plugins';
|
|
4
|
+
export declare class EditorHost {
|
|
5
|
+
private plugins;
|
|
6
|
+
private events;
|
|
7
|
+
private commandStack;
|
|
8
|
+
private currentCommandIndex;
|
|
9
|
+
contentLayer: any;
|
|
10
|
+
contentGroup: any;
|
|
11
|
+
stage: any;
|
|
12
|
+
private _status;
|
|
13
|
+
emit<K extends keyof EventMap>(event: K, payload: Parameters<EventMap[K]>[0]): void;
|
|
14
|
+
on<K extends keyof EventMap>(event: K, handler: EventMap[K]): void;
|
|
15
|
+
off<K extends keyof EventMap>(event: K, handler: EventMap[K]): void;
|
|
16
|
+
installPlugin<K extends keyof PluginMap>(name: K, pluginClass: PluginMap[K] | (new (...args: any[]) => PluginMap[K])): EditorHost;
|
|
17
|
+
installPlugin(name: string, pluginClass: IEditorPlugin | (new (...args: any[]) => IEditorPlugin)): EditorHost;
|
|
18
|
+
uninstallPlugin<K extends keyof PluginMap>(pluginName: K): EditorHost;
|
|
19
|
+
uninstallPlugin(pluginName: string): EditorHost;
|
|
20
|
+
getPlugin<K extends keyof PluginMap>(pluginName: K): PluginMap[K];
|
|
21
|
+
getPlugin<T extends IEditorPlugin = IEditorPlugin>(pluginName: string): T;
|
|
22
|
+
executeCommand(command: ICommand): void;
|
|
23
|
+
undo(): void;
|
|
24
|
+
redo(): void;
|
|
25
|
+
get status(): IEditorState;
|
|
26
|
+
setStatus(newStatus: Partial<IEditorState>): void;
|
|
27
|
+
toJSON(): string;
|
|
28
|
+
loadJSON(jsonStr: string): void;
|
|
29
|
+
}
|
|
30
|
+
declare module '../types' {
|
|
31
|
+
interface PluginMap {
|
|
32
|
+
ttt: RectPlugin;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EditorHost } from './core/editor-host';
|
|
2
|
+
export interface IOptions {
|
|
3
|
+
basePropertyPanel?: boolean;
|
|
4
|
+
baseCanvasPropertyPanel?: boolean;
|
|
5
|
+
exportPlugin?: boolean;
|
|
6
|
+
previewPlugin?: boolean;
|
|
7
|
+
importPlugin?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function createEditorHost({ basePropertyPanel, baseCanvasPropertyPanel, exportPlugin, previewPlugin, importPlugin, }: IOptions): EditorHost;
|
package/dist/favicon.ico
ADDED
|
Binary file
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './use-bg-layer';
|
|
2
|
+
export * from './use-content-layer';
|
|
3
|
+
export * from './use-host-state';
|
|
4
|
+
export * from './use-property-command';
|
|
5
|
+
export * from './use-ruler-layer';
|
|
6
|
+
export * from './use-scrollbar-layer';
|
|
7
|
+
export * from './use-selection-layer';
|
|
8
|
+
export * from './use-stage-event';
|
|
9
|
+
export * from './use-stage';
|
|
10
|
+
export * from './use-zoom';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { EditorHost } from '../core';
|
|
2
|
+
export declare function useBgLayer(host: EditorHost): {
|
|
3
|
+
bgLayerConfig: import('vue').ComputedRef<{
|
|
4
|
+
listening: boolean;
|
|
5
|
+
}>;
|
|
6
|
+
bgConfig: import('vue').ComputedRef<{
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
fill: string;
|
|
12
|
+
listening: boolean;
|
|
13
|
+
}>;
|
|
14
|
+
contentBgConfig: import('vue').ComputedRef<{
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
fill: string;
|
|
20
|
+
listening: boolean;
|
|
21
|
+
}>;
|
|
22
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { IGraphicElement } from '../types';
|
|
2
|
+
import { EditorHost } from '../core';
|
|
3
|
+
export declare function useContentLayer(host: EditorHost): {
|
|
4
|
+
contentLayerRef: import('vue').Ref<any, any>;
|
|
5
|
+
transformerRef: import('vue').Ref<any, any>;
|
|
6
|
+
contentLayerConfig: import('vue').ComputedRef<{}>;
|
|
7
|
+
contentGroupConfig: import('vue').ComputedRef<{
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
scaleX: number;
|
|
11
|
+
scaleY: number;
|
|
12
|
+
}>;
|
|
13
|
+
elements: import('vue').Ref<{
|
|
14
|
+
id: string;
|
|
15
|
+
type: string;
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
rotation: number;
|
|
21
|
+
scaleX: number;
|
|
22
|
+
scaleY: number;
|
|
23
|
+
visible: boolean;
|
|
24
|
+
locked: boolean;
|
|
25
|
+
draggable: boolean;
|
|
26
|
+
transferable: boolean;
|
|
27
|
+
getBoundingBox: () => import('../types').BoundingBox;
|
|
28
|
+
clone: () => IGraphicElement;
|
|
29
|
+
serialize: () => any;
|
|
30
|
+
deserialize: (data: any) => void;
|
|
31
|
+
updateProperty: (host: EditorHost, property: string, oldValue: any, newValue: any) => void;
|
|
32
|
+
getTransformAttr?: ((event: any) => {
|
|
33
|
+
oldAttrs: any;
|
|
34
|
+
newAttrs: any;
|
|
35
|
+
}) | undefined;
|
|
36
|
+
}[], IGraphicElement[] | {
|
|
37
|
+
id: string;
|
|
38
|
+
type: string;
|
|
39
|
+
x: number;
|
|
40
|
+
y: number;
|
|
41
|
+
width: number;
|
|
42
|
+
height: number;
|
|
43
|
+
rotation: number;
|
|
44
|
+
scaleX: number;
|
|
45
|
+
scaleY: number;
|
|
46
|
+
visible: boolean;
|
|
47
|
+
locked: boolean;
|
|
48
|
+
draggable: boolean;
|
|
49
|
+
transferable: boolean;
|
|
50
|
+
getBoundingBox: () => import('../types').BoundingBox;
|
|
51
|
+
clone: () => IGraphicElement;
|
|
52
|
+
serialize: () => any;
|
|
53
|
+
deserialize: (data: any) => void;
|
|
54
|
+
updateProperty: (host: EditorHost, property: string, oldValue: any, newValue: any) => void;
|
|
55
|
+
getTransformAttr?: ((event: any) => {
|
|
56
|
+
oldAttrs: any;
|
|
57
|
+
newAttrs: any;
|
|
58
|
+
}) | undefined;
|
|
59
|
+
}[]>;
|
|
60
|
+
initElements: () => void;
|
|
61
|
+
handleDragEnd: (event: any, element: any) => void;
|
|
62
|
+
handleElementTransform: (event: any, element: IGraphicElement) => void;
|
|
63
|
+
handleElementTransformEnd: (event: any, element: any) => void;
|
|
64
|
+
updateTransformerNodes: (selection: IGraphicElement[]) => void;
|
|
65
|
+
updateCanvas: () => void;
|
|
66
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EditorHost } from '../core';
|
|
2
|
+
export declare function useHostState(host: EditorHost): {
|
|
3
|
+
hostState: {
|
|
4
|
+
zoom: number;
|
|
5
|
+
currentTool: string;
|
|
6
|
+
snapToGrid: boolean;
|
|
7
|
+
showGrid: boolean;
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
wmm: number;
|
|
11
|
+
hmm: number;
|
|
12
|
+
dpm: number;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IGraphicElement } from '../types';
|
|
2
|
+
import { EditorHost } from '../core';
|
|
3
|
+
export declare function usePropertyCommand(host: EditorHost): {
|
|
4
|
+
updateProperty: (element: IGraphicElement, propertyPath: string, newValue: any) => void;
|
|
5
|
+
batchUpdateProperty: (elements: IGraphicElement[], propertyPath: string, newValue: any) => void;
|
|
6
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare function useRulerLayer(): {
|
|
2
|
+
rulerLayerRef: import('vue').Ref<any, any>;
|
|
3
|
+
rulerLayerConfig: import('vue').ComputedRef<{
|
|
4
|
+
listening: boolean;
|
|
5
|
+
}>;
|
|
6
|
+
upRulerConfig: import('vue').ComputedRef<{
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
fill: string;
|
|
12
|
+
listening: boolean;
|
|
13
|
+
}>;
|
|
14
|
+
leftRulerConfig: import('vue').ComputedRef<{
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
fill: string;
|
|
20
|
+
listening: boolean;
|
|
21
|
+
}>;
|
|
22
|
+
upRulerShapeRef: import('vue').Ref<any, any>;
|
|
23
|
+
leftRulerShapeRef: import('vue').Ref<any, any>;
|
|
24
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { EditorHost } from '../core';
|
|
2
|
+
export declare function useScrollbarLayer(host: EditorHost): {
|
|
3
|
+
scrollbarLayerRef: import('vue').Ref<any, any>;
|
|
4
|
+
scrollbarLayerConfig: {};
|
|
5
|
+
showVerticalScroll: import('vue').ComputedRef<boolean>;
|
|
6
|
+
showHorizontalScroll: import('vue').ComputedRef<boolean>;
|
|
7
|
+
horizontalThumbConfig: import('vue').ComputedRef<{
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
fill: string;
|
|
13
|
+
draggable: boolean;
|
|
14
|
+
}>;
|
|
15
|
+
verticalThumbConfig: import('vue').ComputedRef<{
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
fill: string;
|
|
21
|
+
draggable: boolean;
|
|
22
|
+
}>;
|
|
23
|
+
horizontalTrackConfig: import('vue').ComputedRef<{
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
width: number;
|
|
27
|
+
height: number;
|
|
28
|
+
fill: string;
|
|
29
|
+
listening: boolean;
|
|
30
|
+
}>;
|
|
31
|
+
verticalTrackConfig: import('vue').ComputedRef<{
|
|
32
|
+
x: number;
|
|
33
|
+
y: number;
|
|
34
|
+
width: number;
|
|
35
|
+
height: number;
|
|
36
|
+
fill: string;
|
|
37
|
+
listening: boolean;
|
|
38
|
+
}>;
|
|
39
|
+
handleVerticalDragMove: (e: any) => void;
|
|
40
|
+
handleHorizontalDragMove: (e: any) => void;
|
|
41
|
+
contentScrollX: import('vue').ComputedRef<number>;
|
|
42
|
+
contentScrollY: import('vue').ComputedRef<number>;
|
|
43
|
+
handleWheel: (e: any) => void;
|
|
44
|
+
verticalThumbY: import('vue').Ref<number, number>;
|
|
45
|
+
horizontalThumbX: import('vue').Ref<number, number>;
|
|
46
|
+
resetScrollbarPosition: () => void;
|
|
47
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Point2D } from '../types';
|
|
2
|
+
import { EditorHost } from '../core';
|
|
3
|
+
export declare function useSelectionLayer(host: EditorHost): {
|
|
4
|
+
isSelecting: import('vue').Ref<boolean, boolean>;
|
|
5
|
+
selectionStart: import('vue').Ref<{
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
}, Point2D | {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
}>;
|
|
12
|
+
selectionEnd: import('vue').Ref<{
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
}, Point2D | {
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
}>;
|
|
19
|
+
handleMouseDown: (event: any) => void;
|
|
20
|
+
handleMouseMove: (event: any) => void;
|
|
21
|
+
handleMouseUp: (event: any) => void;
|
|
22
|
+
handlePMouseleave: (event: any) => void;
|
|
23
|
+
rectConfig: import('vue').ComputedRef<{
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
width: number;
|
|
27
|
+
height: number;
|
|
28
|
+
fill: string;
|
|
29
|
+
stroke: string;
|
|
30
|
+
strokeWidth: number;
|
|
31
|
+
dash: number[];
|
|
32
|
+
listening: boolean;
|
|
33
|
+
}>;
|
|
34
|
+
selectionLayerConfig: import('vue').Ref<{}, {}>;
|
|
35
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { EditorHost } from '../core';
|
|
2
|
+
export declare function useStageEvent(host: EditorHost): {
|
|
3
|
+
stageWrapperRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
4
|
+
transformOrigin: import('vue').Ref<{
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
}, {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
} | {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
}>;
|
|
14
|
+
hostState: {
|
|
15
|
+
zoom: number;
|
|
16
|
+
currentTool: string;
|
|
17
|
+
snapToGrid: boolean;
|
|
18
|
+
showGrid: boolean;
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
wmm: number;
|
|
22
|
+
hmm: number;
|
|
23
|
+
dpm: number;
|
|
24
|
+
};
|
|
25
|
+
handleClick: (event: any) => void;
|
|
26
|
+
handleMouseDown: (event: any) => void;
|
|
27
|
+
handleMouseMove: (event: any) => void;
|
|
28
|
+
handleMouseUp: (event: any) => void;
|
|
29
|
+
handleWheel: (e: any) => void;
|
|
30
|
+
handleKeyDown: (event: any) => void;
|
|
31
|
+
handleMouseleave: (event: any) => void;
|
|
32
|
+
handleContextmenu: (event: any) => void;
|
|
33
|
+
};
|