vkedit 2.8.6 → 3.2.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/README.en.md +385 -1193
- package/README.md +383 -1190
- package/dist/commands/distribute-elements-command.d.ts +13 -0
- package/dist/commands/index.d.ts +1 -0
- package/dist/components/ContextMenuDelete.vue.d.ts +1 -1
- package/dist/components/ui/{select/SelectTrigger.vue.d.ts → VkButton.vue.d.ts} +13 -7
- package/dist/components/ui/VkDropdown.vue.d.ts +22 -0
- package/dist/components/ui/VkIcon.vue.d.ts +8 -0
- package/dist/components/ui/{textarea/Textarea.vue.d.ts → VkInput.vue.d.ts} +6 -4
- package/dist/components/ui/VkInputMM.vue.d.ts +17 -0
- package/dist/components/ui/VkInputNumber.vue.d.ts +16 -0
- package/dist/components/ui/{input-mm/InputMM.vue.d.ts → VkInputNumberMM.vue.d.ts} +8 -6
- package/dist/components/ui/{number-field/NumberFieldContent.vue.d.ts → VkLabel.vue.d.ts} +3 -3
- package/dist/components/ui/{dropdown-menu/DropdownMenuRadioItem.vue.d.ts → VkSelect.vue.d.ts} +7 -7
- package/dist/components/ui/VkSwitch.vue.d.ts +14 -0
- package/dist/components/ui/{toggle/Toggle.vue.d.ts → VkToggle.vue.d.ts} +9 -12
- package/dist/components/ui/index.d.ts +11 -14
- package/dist/core/Editor.vue.d.ts +1 -7
- package/dist/{components/ui/button-group/ButtonGroupText.vue.d.ts → core/GraphicToolPanel.vue.d.ts} +14 -12
- package/dist/core/HelpGuide.vue.d.ts +2 -0
- package/dist/core/PropertyPanel.vue.d.ts +1 -0
- package/dist/core/{ScrollbarLayer.vue.d.ts → StatusBar.vue.d.ts} +1 -3
- package/dist/core/Toolbar.vue.d.ts +4 -6
- package/dist/core/editor-host.d.ts +12 -0
- package/dist/create-host.d.ts +1 -1
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/use-bg-layer.d.ts +6 -0
- package/dist/hooks/use-content-layer.d.ts +4 -0
- package/dist/hooks/use-ruler-layer.d.ts +6 -1
- package/dist/hooks/use-stage-event.d.ts +6 -1
- package/dist/hooks/use-stage.d.ts +11 -7
- package/dist/hooks/use-zoom.d.ts +20 -1
- package/dist/{index-CjPgwxVC.js → index-Bisex1w7.js} +25500 -35357
- package/dist/index.d.ts +0 -1
- package/dist/{index.es-DekiblxN.js → index.es-CEBX1sXY.js} +1 -1
- package/dist/lib/utils.d.ts +1 -2
- package/dist/plugins/barcode/Tool.vue.d.ts +2 -1
- package/dist/plugins/barcode/barcode.d.ts +4 -0
- package/dist/plugins/chart/Tool.vue.d.ts +2 -1
- package/dist/plugins/clipboard/clipboard.d.ts +33 -0
- package/dist/plugins/clipboard/index.d.ts +1 -0
- package/dist/plugins/index.d.ts +2 -0
- package/dist/plugins/keydown.d.ts +11 -1
- package/dist/plugins/line/Tool.vue.d.ts +2 -1
- package/dist/plugins/line/line.d.ts +1 -2
- package/dist/plugins/preview/PreviewButton.vue.d.ts +1 -1
- package/dist/plugins/qrcode/Tool.vue.d.ts +2 -1
- package/dist/plugins/rect/Tool.vue.d.ts +2 -1
- package/dist/plugins/rect/rect.d.ts +1 -2
- package/dist/plugins/selection.d.ts +5 -0
- package/dist/{components/ui/number-field/NumberFieldInput.vue.d.ts → plugins/snap/SnapToggle.vue.d.ts} +4 -3
- package/dist/plugins/snap/index.d.ts +2 -0
- package/dist/plugins/snap/snap.d.ts +24 -0
- package/dist/plugins/table/Tool.vue.d.ts +2 -1
- package/dist/plugins/table/table.d.ts +1 -2
- package/dist/plugins/text/TextContextMenu.vue.d.ts +1 -1
- package/dist/plugins/text/Tool.vue.d.ts +2 -1
- package/dist/plugins/text/text.d.ts +1 -0
- package/dist/plugins/toolbar-manager.d.ts +3 -1
- package/dist/types/base-graphic-element.d.ts +3 -0
- package/dist/types/base.d.ts +14 -0
- package/dist/types/event-data.d.ts +16 -0
- package/dist/types/event-map.d.ts +6 -3
- package/dist/utils/geometry.d.ts +38 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/vkedit.css +1 -1
- package/dist/vkedit.es.js +97 -107
- package/package.json +12 -21
- package/dist/components/ui/button/Button.vue.d.ts +0 -27
- package/dist/components/ui/button/index.d.ts +0 -7
- package/dist/components/ui/button-group/ButtonGroup.vue.d.ts +0 -23
- package/dist/components/ui/button-group/ButtonGroupSeparator.vue.d.ts +0 -9
- package/dist/components/ui/button-group/index.d.ts +0 -8
- package/dist/components/ui/dropdown-menu/DropdownMenu.vue.d.ts +0 -22
- package/dist/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.d.ts +0 -28
- package/dist/components/ui/dropdown-menu/DropdownMenuContent.vue.d.ts +0 -36
- package/dist/components/ui/dropdown-menu/DropdownMenuGroup.vue.d.ts +0 -18
- package/dist/components/ui/dropdown-menu/DropdownMenuItem.vue.d.ts +0 -26
- package/dist/components/ui/dropdown-menu/DropdownMenuLabel.vue.d.ts +0 -23
- package/dist/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue.d.ts +0 -22
- package/dist/components/ui/dropdown-menu/DropdownMenuSeparator.vue.d.ts +0 -7
- package/dist/components/ui/dropdown-menu/DropdownMenuShortcut.vue.d.ts +0 -21
- package/dist/components/ui/dropdown-menu/DropdownMenuSub.vue.d.ts +0 -22
- package/dist/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +0 -38
- package/dist/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +0 -23
- package/dist/components/ui/dropdown-menu/DropdownMenuTrigger.vue.d.ts +0 -18
- package/dist/components/ui/dropdown-menu/index.d.ts +0 -15
- package/dist/components/ui/input/Input.vue.d.ts +0 -12
- package/dist/components/ui/input/index.d.ts +0 -1
- package/dist/components/ui/input-mm/InputNumberMM.vue.d.ts +0 -14
- package/dist/components/ui/input-mm/index.d.ts +0 -2
- package/dist/components/ui/input-number/VkInputNumber.vue.d.ts +0 -9
- package/dist/components/ui/input-number/index.d.ts +0 -1
- package/dist/components/ui/label/Label.vue.d.ts +0 -22
- package/dist/components/ui/label/index.d.ts +0 -1
- package/dist/components/ui/number-field/NumberField.vue.d.ts +0 -26
- package/dist/components/ui/number-field/NumberFieldDecrement.vue.d.ts +0 -22
- package/dist/components/ui/number-field/NumberFieldIncrement.vue.d.ts +0 -22
- package/dist/components/ui/number-field/index.d.ts +0 -5
- package/dist/components/ui/scroll-area/ScrollArea.vue.d.ts +0 -22
- package/dist/components/ui/scroll-area/ScrollBar.vue.d.ts +0 -9
- package/dist/components/ui/scroll-area/index.d.ts +0 -2
- package/dist/components/ui/select/Select.vue.d.ts +0 -25
- package/dist/components/ui/select/SelectContent.vue.d.ts +0 -32
- package/dist/components/ui/select/SelectGroup.vue.d.ts +0 -18
- package/dist/components/ui/select/SelectItem.vue.d.ts +0 -22
- package/dist/components/ui/select/SelectItemText.vue.d.ts +0 -18
- package/dist/components/ui/select/SelectLabel.vue.d.ts +0 -22
- package/dist/components/ui/select/SelectScrollDownButton.vue.d.ts +0 -22
- package/dist/components/ui/select/SelectScrollUpButton.vue.d.ts +0 -22
- package/dist/components/ui/select/SelectSeparator.vue.d.ts +0 -7
- package/dist/components/ui/select/SelectValue.vue.d.ts +0 -18
- package/dist/components/ui/select/index.d.ts +0 -11
- package/dist/components/ui/separator/Separator.vue.d.ts +0 -10
- package/dist/components/ui/separator/index.d.ts +0 -1
- package/dist/components/ui/slider/Slider.vue.d.ts +0 -13
- package/dist/components/ui/slider/index.d.ts +0 -1
- package/dist/components/ui/switch/Switch.vue.d.ts +0 -26
- package/dist/components/ui/switch/index.d.ts +0 -1
- package/dist/components/ui/textarea/index.d.ts +0 -1
- package/dist/components/ui/toggle/index.d.ts +0 -7
- package/dist/core/Toolbox.vue.d.ts +0 -23
- package/dist/hooks/use-scrollbar-layer.d.ts +0 -47
- package/dist/stores/index.d.ts +0 -1
- package/dist/stores/use-stage-store.d.ts +0 -40
- package/dist/styles/index.css +0 -144
- /package/dist/core/{Zoom.vue.d.ts → GuideLayer.vue.d.ts} +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseCommand } from './base-command';
|
|
2
|
+
import { EditorHost } from '../core';
|
|
3
|
+
export declare class DistributeElementsCommand extends BaseCommand {
|
|
4
|
+
private direction;
|
|
5
|
+
private elementIds;
|
|
6
|
+
name: string;
|
|
7
|
+
private previousPositions;
|
|
8
|
+
constructor(host: EditorHost, direction: 'horizontal' | 'vertical', elementIds: string[]);
|
|
9
|
+
execute(): void;
|
|
10
|
+
undo(): void;
|
|
11
|
+
private distributeElements;
|
|
12
|
+
private restorePreviousPositions;
|
|
13
|
+
}
|
package/dist/commands/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export * from './clear-selection-command';
|
|
|
8
8
|
export * from './batch-command';
|
|
9
9
|
export * from './change-layer-order-command';
|
|
10
10
|
export * from './align-elements-command';
|
|
11
|
+
export * from './distribute-elements-command';
|
|
11
12
|
export * from './clear-selection-command';
|
|
12
13
|
export declare class CommandUtils {
|
|
13
14
|
static createBatchFromSelection(host: any, commandClass: any, ...args: any[]): Promise<any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
host: import('../core').EditorHost;
|
|
3
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, {},
|
|
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, {}, HTMLButtonElement>;
|
|
5
5
|
export default _default;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { SelectTriggerProps } from 'reka-ui';
|
|
2
1
|
import { HTMLAttributes } from 'vue';
|
|
3
|
-
type
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
type ButtonVariant = 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link';
|
|
3
|
+
type ButtonSize = 'default' | 'xs' | 'sm' | 'lg' | 'icon' | 'icon-sm' | 'icon-lg';
|
|
4
|
+
type __VLS_Props = {
|
|
5
|
+
variant?: ButtonVariant;
|
|
6
|
+
size?: ButtonSize;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
title?: string;
|
|
9
|
+
class?: HTMLAttributes['class'];
|
|
6
10
|
};
|
|
7
11
|
declare function __VLS_template(): {
|
|
8
12
|
attrs: Partial<{}>;
|
|
@@ -10,12 +14,14 @@ declare function __VLS_template(): {
|
|
|
10
14
|
default?(_: {}): any;
|
|
11
15
|
};
|
|
12
16
|
refs: {};
|
|
13
|
-
rootEl:
|
|
17
|
+
rootEl: HTMLButtonElement;
|
|
14
18
|
};
|
|
15
19
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
20
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
17
|
-
|
|
18
|
-
|
|
21
|
+
variant: ButtonVariant;
|
|
22
|
+
size: ButtonSize;
|
|
23
|
+
disabled: boolean;
|
|
24
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
|
19
25
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
20
26
|
export default _default;
|
|
21
27
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
attrs: Partial<{}>;
|
|
3
|
+
slots: {
|
|
4
|
+
trigger?(_: {}): any;
|
|
5
|
+
default?(_: {}): any;
|
|
6
|
+
};
|
|
7
|
+
refs: {
|
|
8
|
+
dropdownRef: HTMLDivElement;
|
|
9
|
+
};
|
|
10
|
+
rootEl: HTMLDivElement;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
13
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
14
|
+
dropdownRef: HTMLDivElement;
|
|
15
|
+
}, HTMLDivElement>;
|
|
16
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
name: string;
|
|
3
|
+
size?: string | number;
|
|
4
|
+
}
|
|
5
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
6
|
+
size: string | number;
|
|
7
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
|
|
8
|
+
export default _default;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'vue';
|
|
2
2
|
type __VLS_Props = {
|
|
3
|
-
class?: HTMLAttributes["class"];
|
|
4
|
-
defaultValue?: string | number;
|
|
5
3
|
modelValue?: string | number;
|
|
4
|
+
defaultValue?: string | number;
|
|
5
|
+
class?: HTMLAttributes['class'];
|
|
6
6
|
};
|
|
7
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
8
|
"update:modelValue": (payload: string | number) => any;
|
|
9
9
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
10
|
"onUpdate:modelValue"?: ((payload: string | number) => any) | undefined;
|
|
11
|
-
}>, {
|
|
11
|
+
}>, {
|
|
12
|
+
defaultValue: string | number;
|
|
13
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLInputElement>;
|
|
12
14
|
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue: number;
|
|
3
|
+
dpm?: number;
|
|
4
|
+
step?: number;
|
|
5
|
+
min?: number;
|
|
6
|
+
};
|
|
7
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
+
"update:modelValue": (value: number) => any;
|
|
9
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
11
|
+
}>, {
|
|
12
|
+
dpm: number;
|
|
13
|
+
step: number;
|
|
14
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
15
|
+
inputRef: HTMLInputElement;
|
|
16
|
+
}, HTMLDivElement>;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
modelValue: number;
|
|
4
|
+
min?: number;
|
|
5
|
+
max?: number;
|
|
6
|
+
step?: number;
|
|
7
|
+
class?: HTMLAttributes['class'];
|
|
8
|
+
};
|
|
9
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
|
+
"update:modelValue": (value: number) => any;
|
|
11
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
+
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
13
|
+
}>, {
|
|
14
|
+
step: number;
|
|
15
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLInputElement>;
|
|
16
|
+
export default _default;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
modelValue: number;
|
|
3
|
-
dpm?: number;
|
|
4
3
|
step?: number;
|
|
4
|
+
min?: number;
|
|
5
5
|
};
|
|
6
6
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
-
"update:
|
|
7
|
+
"update:modelValue": (value: number) => any;
|
|
8
8
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
-
"onUpdate:
|
|
10
|
-
}>, {
|
|
11
|
-
|
|
12
|
-
},
|
|
9
|
+
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
10
|
+
}>, {
|
|
11
|
+
step: number;
|
|
12
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
13
|
+
inputRef: HTMLInputElement;
|
|
14
|
+
}, HTMLDivElement>;
|
|
13
15
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'vue';
|
|
2
2
|
type __VLS_Props = {
|
|
3
|
-
class?: HTMLAttributes[
|
|
3
|
+
class?: HTMLAttributes['class'];
|
|
4
4
|
};
|
|
5
5
|
declare function __VLS_template(): {
|
|
6
6
|
attrs: Partial<{}>;
|
|
@@ -8,10 +8,10 @@ declare function __VLS_template(): {
|
|
|
8
8
|
default?(_: {}): any;
|
|
9
9
|
};
|
|
10
10
|
refs: {};
|
|
11
|
-
rootEl:
|
|
11
|
+
rootEl: HTMLLabelElement;
|
|
12
12
|
};
|
|
13
13
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
|
-
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, {},
|
|
14
|
+
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, {}, HTMLLabelElement>;
|
|
15
15
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
16
16
|
export default _default;
|
|
17
17
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
package/dist/components/ui/{dropdown-menu/DropdownMenuRadioItem.vue.d.ts → VkSelect.vue.d.ts}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DropdownMenuRadioItemProps } from 'reka-ui';
|
|
2
1
|
import { HTMLAttributes } from 'vue';
|
|
3
|
-
type __VLS_Props =
|
|
4
|
-
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
modelValue: string;
|
|
4
|
+
class?: HTMLAttributes['class'];
|
|
5
5
|
};
|
|
6
6
|
declare function __VLS_template(): {
|
|
7
7
|
attrs: Partial<{}>;
|
|
@@ -9,14 +9,14 @@ declare function __VLS_template(): {
|
|
|
9
9
|
default?(_: {}): any;
|
|
10
10
|
};
|
|
11
11
|
refs: {};
|
|
12
|
-
rootEl:
|
|
12
|
+
rootEl: HTMLSelectElement;
|
|
13
13
|
};
|
|
14
14
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
15
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
16
|
-
|
|
16
|
+
"update:modelValue": (value: string) => any;
|
|
17
17
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
|
-
|
|
19
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {},
|
|
18
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSelectElement>;
|
|
20
20
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
21
21
|
export default _default;
|
|
22
22
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
modelValue: boolean;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
class?: HTMLAttributes['class'];
|
|
6
|
+
};
|
|
7
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
+
"update:modelValue": (value: boolean) => any;
|
|
9
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
11
|
+
}>, {
|
|
12
|
+
disabled: boolean;
|
|
13
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLLabelElement>;
|
|
14
|
+
export default _default;
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import { ToggleProps } from 'reka-ui';
|
|
2
1
|
import { HTMLAttributes } from 'vue';
|
|
3
|
-
|
|
4
|
-
type __VLS_Props =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
type ToggleSize = 'default' | 'sm' | 'lg';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
modelValue: boolean;
|
|
5
|
+
size?: ToggleSize;
|
|
6
|
+
class?: HTMLAttributes['class'];
|
|
8
7
|
};
|
|
9
8
|
declare function __VLS_template(): {
|
|
10
9
|
attrs: Partial<{}>;
|
|
11
10
|
slots: {
|
|
12
|
-
default?(_:
|
|
11
|
+
default?(_: {}): any;
|
|
13
12
|
};
|
|
14
13
|
refs: {};
|
|
15
|
-
rootEl:
|
|
14
|
+
rootEl: HTMLButtonElement;
|
|
16
15
|
};
|
|
17
16
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
18
17
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
@@ -20,10 +19,8 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
20
19
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
21
20
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
22
21
|
}>, {
|
|
23
|
-
size:
|
|
24
|
-
|
|
25
|
-
disabled: boolean;
|
|
26
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
size: ToggleSize;
|
|
23
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
|
27
24
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
28
25
|
export default _default;
|
|
29
26
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export { InputMM as VkInputMM } from './input-mm';
|
|
13
|
-
export { InputNumberMM as VkInputNumberMM } from './input-mm';
|
|
14
|
-
export * from './input-number';
|
|
1
|
+
export { default as VkButton } from './VkButton.vue';
|
|
2
|
+
export { default as VkToggle } from './VkToggle.vue';
|
|
3
|
+
export { default as VkInput } from './VkInput.vue';
|
|
4
|
+
export { default as VkLabel } from './VkLabel.vue';
|
|
5
|
+
export { default as VkSelect } from './VkSelect.vue';
|
|
6
|
+
export { default as VkSwitch } from './VkSwitch.vue';
|
|
7
|
+
export { default as VkInputMM } from './VkInputMM.vue';
|
|
8
|
+
export { default as VkInputNumberMM } from './VkInputNumberMM.vue';
|
|
9
|
+
export { default as VkInputNumber } from './VkInputNumber.vue';
|
|
10
|
+
export { default as VkDropdown } from './VkDropdown.vue';
|
|
11
|
+
export { default as VkIcon } from './VkIcon.vue';
|
|
@@ -8,13 +8,7 @@ type __VLS_Props = {
|
|
|
8
8
|
declare function __VLS_template(): {
|
|
9
9
|
attrs: Partial<{}>;
|
|
10
10
|
slots: {
|
|
11
|
-
'toolbar-
|
|
12
|
-
host: EditorHost;
|
|
13
|
-
}): any;
|
|
14
|
-
'toolbar-center'?(_: {
|
|
15
|
-
host: EditorHost;
|
|
16
|
-
}): any;
|
|
17
|
-
'toolbar-right'?(_: {
|
|
11
|
+
'toolbar-actions'?(_: {
|
|
18
12
|
host: EditorHost;
|
|
19
13
|
}): any;
|
|
20
14
|
toolbox?(_: {
|
package/dist/{components/ui/button-group/ButtonGroupText.vue.d.ts → core/GraphicToolPanel.vue.d.ts}
RENAMED
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class?: HTMLAttributes["class"];
|
|
6
|
-
orientation?: ButtonGroupVariants["orientation"];
|
|
1
|
+
import { EditorHost } from '.';
|
|
2
|
+
interface Props {
|
|
3
|
+
host: EditorHost;
|
|
4
|
+
collapsed?: boolean;
|
|
7
5
|
}
|
|
8
6
|
declare function __VLS_template(): {
|
|
9
7
|
attrs: Partial<{}>;
|
|
10
|
-
slots: {
|
|
11
|
-
|
|
8
|
+
slots: Readonly<{
|
|
9
|
+
toolbox?(props: {
|
|
10
|
+
host: EditorHost;
|
|
11
|
+
}): any;
|
|
12
|
+
}> & {
|
|
13
|
+
toolbox?(props: {
|
|
14
|
+
host: EditorHost;
|
|
15
|
+
}): any;
|
|
12
16
|
};
|
|
13
17
|
refs: {};
|
|
14
|
-
rootEl:
|
|
18
|
+
rootEl: HTMLDivElement;
|
|
15
19
|
};
|
|
16
20
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
17
|
-
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
18
|
-
as: import('reka-ui').AsTag | import('vue').Component;
|
|
19
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
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>;
|
|
20
22
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
21
23
|
export default _default;
|
|
22
24
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
|
+
export default _default;
|
|
@@ -2,7 +2,5 @@ import { EditorHost } from '.';
|
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
host: EditorHost;
|
|
4
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>;
|
|
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>;
|
|
8
6
|
export default _default;
|
|
@@ -4,14 +4,12 @@ interface Props {
|
|
|
4
4
|
}
|
|
5
5
|
declare function __VLS_template(): {
|
|
6
6
|
attrs: Partial<{}>;
|
|
7
|
-
slots: {
|
|
8
|
-
|
|
7
|
+
slots: Readonly<{
|
|
8
|
+
actions?(props: {
|
|
9
9
|
host: EditorHost;
|
|
10
10
|
}): any;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}): any;
|
|
14
|
-
right?(_: {
|
|
11
|
+
}> & {
|
|
12
|
+
actions?(props: {
|
|
15
13
|
host: EditorHost;
|
|
16
14
|
}): any;
|
|
17
15
|
};
|
|
@@ -10,6 +10,18 @@ export declare class EditorHost {
|
|
|
10
10
|
contentGroup: any;
|
|
11
11
|
stage: any;
|
|
12
12
|
private _status;
|
|
13
|
+
stageState: {
|
|
14
|
+
viewportWidth: number;
|
|
15
|
+
viewportHeight: number;
|
|
16
|
+
wrapperEl: HTMLElement | null;
|
|
17
|
+
currentCursorMode: import('../types').CursorMode;
|
|
18
|
+
mouseStageX: number;
|
|
19
|
+
mouseStageY: number;
|
|
20
|
+
spacePressed: boolean;
|
|
21
|
+
isPanning: boolean;
|
|
22
|
+
offsetX: number;
|
|
23
|
+
offsetY: number;
|
|
24
|
+
};
|
|
13
25
|
emit<K extends keyof EventMap>(event: K, payload: Parameters<EventMap[K]>[0]): void;
|
|
14
26
|
on<K extends keyof EventMap>(event: K, handler: EventMap[K]): void;
|
|
15
27
|
off<K extends keyof EventMap>(event: K, handler: EventMap[K]): void;
|
package/dist/create-host.d.ts
CHANGED
|
@@ -6,4 +6,4 @@ export interface IOptions {
|
|
|
6
6
|
previewPlugin?: boolean;
|
|
7
7
|
importPlugin?: boolean;
|
|
8
8
|
}
|
|
9
|
-
export declare function createEditorHost({ basePropertyPanel, baseCanvasPropertyPanel, exportPlugin, previewPlugin, importPlugin, }
|
|
9
|
+
export declare function createEditorHost({ basePropertyPanel, baseCanvasPropertyPanel, exportPlugin, previewPlugin, importPlugin, }?: IOptions): EditorHost;
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ export * from './use-content-layer';
|
|
|
3
3
|
export * from './use-host-state';
|
|
4
4
|
export * from './use-property-command';
|
|
5
5
|
export * from './use-ruler-layer';
|
|
6
|
-
export * from './use-scrollbar-layer';
|
|
7
6
|
export * from './use-selection-layer';
|
|
8
7
|
export * from './use-stage-event';
|
|
9
8
|
export * from './use-stage';
|
|
@@ -17,6 +17,12 @@ export declare function useBgLayer(host: EditorHost): {
|
|
|
17
17
|
width: number;
|
|
18
18
|
height: number;
|
|
19
19
|
fill: string;
|
|
20
|
+
cornerRadius: number;
|
|
21
|
+
shadowColor: string;
|
|
22
|
+
shadowBlur: number;
|
|
23
|
+
shadowOffsetX: number;
|
|
24
|
+
shadowOffsetY: number;
|
|
25
|
+
shadowOpacity: number;
|
|
20
26
|
listening: boolean;
|
|
21
27
|
}>;
|
|
22
28
|
};
|
|
@@ -24,6 +24,7 @@ export declare function useContentLayer(host: EditorHost): {
|
|
|
24
24
|
locked: boolean;
|
|
25
25
|
draggable: boolean;
|
|
26
26
|
transferable: boolean;
|
|
27
|
+
resizeAnchors?: string[] | null | undefined;
|
|
27
28
|
getBoundingBox: () => import('../types').BoundingBox;
|
|
28
29
|
clone: () => IGraphicElement;
|
|
29
30
|
serialize: () => any;
|
|
@@ -47,6 +48,7 @@ export declare function useContentLayer(host: EditorHost): {
|
|
|
47
48
|
locked: boolean;
|
|
48
49
|
draggable: boolean;
|
|
49
50
|
transferable: boolean;
|
|
51
|
+
resizeAnchors?: string[] | null | undefined;
|
|
50
52
|
getBoundingBox: () => import('../types').BoundingBox;
|
|
51
53
|
clone: () => IGraphicElement;
|
|
52
54
|
serialize: () => any;
|
|
@@ -58,6 +60,8 @@ export declare function useContentLayer(host: EditorHost): {
|
|
|
58
60
|
}) | undefined;
|
|
59
61
|
}[]>;
|
|
60
62
|
initElements: () => void;
|
|
63
|
+
handleDragStart: (event: any, element: any) => void;
|
|
64
|
+
handleDragMove: (event: any, element: any) => void;
|
|
61
65
|
handleDragEnd: (event: any, element: any) => void;
|
|
62
66
|
handleElementTransform: (event: any, element: IGraphicElement) => void;
|
|
63
67
|
handleElementTransformEnd: (event: any, element: any) => void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { EditorHost } from '../core';
|
|
2
|
+
export declare function useRulerLayer(host: EditorHost): {
|
|
2
3
|
rulerLayerRef: import('vue').Ref<any, any>;
|
|
3
4
|
rulerLayerConfig: import('vue').ComputedRef<{
|
|
4
5
|
listening: boolean;
|
|
@@ -9,6 +10,8 @@ export declare function useRulerLayer(): {
|
|
|
9
10
|
width: number;
|
|
10
11
|
height: number;
|
|
11
12
|
fill: string;
|
|
13
|
+
stroke: string;
|
|
14
|
+
strokeWidth: number;
|
|
12
15
|
listening: boolean;
|
|
13
16
|
}>;
|
|
14
17
|
leftRulerConfig: import('vue').ComputedRef<{
|
|
@@ -17,6 +20,8 @@ export declare function useRulerLayer(): {
|
|
|
17
20
|
width: number;
|
|
18
21
|
height: number;
|
|
19
22
|
fill: string;
|
|
23
|
+
stroke: string;
|
|
24
|
+
strokeWidth: number;
|
|
20
25
|
listening: boolean;
|
|
21
26
|
}>;
|
|
22
27
|
upRulerShapeRef: import('vue').Ref<any, any>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { EditorHost } from '../core';
|
|
2
2
|
export declare function useStageEvent(host: EditorHost): {
|
|
3
|
-
stageWrapperRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
4
3
|
transformOrigin: import('vue').Ref<{
|
|
5
4
|
x: number;
|
|
6
5
|
y: number;
|
|
@@ -23,11 +22,17 @@ export declare function useStageEvent(host: EditorHost): {
|
|
|
23
22
|
dpm: number;
|
|
24
23
|
};
|
|
25
24
|
handleClick: (event: any) => void;
|
|
25
|
+
handleDblClick: (event: any) => void;
|
|
26
26
|
handleMouseDown: (event: any) => void;
|
|
27
27
|
handleMouseMove: (event: any) => void;
|
|
28
28
|
handleMouseUp: (event: any) => void;
|
|
29
29
|
handleWheel: (e: any) => void;
|
|
30
30
|
handleKeyDown: (event: any) => void;
|
|
31
|
+
handleMouseenter: (event: any) => void;
|
|
31
32
|
handleMouseleave: (event: any) => void;
|
|
32
33
|
handleContextmenu: (event: any) => void;
|
|
34
|
+
handleSpaceDown: (e: KeyboardEvent) => void;
|
|
35
|
+
handleSpaceUp: (e: KeyboardEvent) => void;
|
|
36
|
+
isPanning: import('vue').Ref<boolean, boolean>;
|
|
37
|
+
panThresholdMet: import('vue').Ref<boolean, boolean>;
|
|
33
38
|
};
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { EditorHost } from '../core';
|
|
2
|
+
export declare function useStage(host: EditorHost): {
|
|
3
|
+
width: import('vue').ComputedRef<number>;
|
|
4
|
+
height: import('vue').ComputedRef<number>;
|
|
4
5
|
stageConfig: import('vue').ComputedRef<{
|
|
5
6
|
width: number;
|
|
6
7
|
height: number;
|
|
7
8
|
scaleX: number;
|
|
8
9
|
scaleY: number;
|
|
9
10
|
}>;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
currentCursorMode: import('vue').Ref<import('../types').CursorMode, import('../types').CursorMode>;
|
|
12
|
+
mouseStageX: import('vue').Ref<number, number>;
|
|
13
|
+
mouseStageY: import('vue').Ref<number, number>;
|
|
14
|
+
spacePressed: import('vue').Ref<boolean, boolean>;
|
|
15
|
+
isPanning: import('vue').Ref<boolean, boolean>;
|
|
16
|
+
offsetX: import('vue').Ref<number, number>;
|
|
17
|
+
offsetY: import('vue').Ref<number, number>;
|
|
14
18
|
};
|
package/dist/hooks/use-zoom.d.ts
CHANGED
|
@@ -8,5 +8,24 @@ export declare function useZoom(host: EditorHost): {
|
|
|
8
8
|
handleZoomOut: (step?: number) => void;
|
|
9
9
|
handleZoomAuto: () => void;
|
|
10
10
|
zoom: import('vue').ComputedRef<number>;
|
|
11
|
-
handleWheel: (e:
|
|
11
|
+
handleWheel: (e: {
|
|
12
|
+
evt: WheelEvent & {
|
|
13
|
+
deltaY: number;
|
|
14
|
+
ctrlKey: boolean;
|
|
15
|
+
shiftKey: boolean;
|
|
16
|
+
};
|
|
17
|
+
target: {
|
|
18
|
+
getStage: () => {
|
|
19
|
+
getPointerPosition: () => {
|
|
20
|
+
x: number;
|
|
21
|
+
y: number;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
}) => void;
|
|
26
|
+
dynamicStep: import('vue').ComputedRef<number>;
|
|
27
|
+
offsetX: import('vue').Ref<number, number>;
|
|
28
|
+
offsetY: import('vue').Ref<number, number>;
|
|
29
|
+
handlePanByPixels: (deltaX: number, deltaY: number) => void;
|
|
30
|
+
resetPanOffset: () => void;
|
|
12
31
|
};
|