vkedit 3.2.6 → 4.0.0
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/CHANGELOG.md +51 -0
- package/LICENSE +21 -21
- package/README.en.md +38 -36
- package/README.md +32 -28
- package/dist/commands/change-layer-order-command.d.ts +1 -0
- package/dist/commands/index.d.ts +1 -0
- package/dist/commands/reorder-elements-command.d.ts +19 -0
- package/dist/components/BaseElementPropertyPanel.vue.d.ts +28 -1
- package/dist/components/TextProperty.vue.d.ts +2 -0
- package/dist/components/ui/VkButton.vue.d.ts +2 -2
- package/dist/components/ui/VkColorPicker.vue.d.ts +26 -0
- package/dist/components/ui/VkTextarea.vue.d.ts +20 -0
- package/dist/components/ui/index.d.ts +2 -1
- package/dist/core/ContentLayer.vue.d.ts +0 -2
- package/dist/core/Editor.vue.d.ts +1 -0
- package/dist/{plugins/rect/Tool.vue.d.ts → core/GraphicToolRenderer.vue.d.ts} +6 -1
- package/dist/core/HelpGuide.vue.d.ts +3 -1
- package/dist/{plugins/table/CellsBorder.vue.d.ts → core/TransformOverlay.vue.d.ts} +2 -2
- package/dist/core/editor-host.d.ts +2 -11
- package/dist/favicon.ico +0 -0
- package/dist/favicon.svg +8 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/use-content-layer.d.ts +6 -6
- package/dist/hooks/use-host-state.d.ts +1 -0
- package/dist/hooks/use-ruler-layer.d.ts +24 -0
- package/dist/hooks/use-selection-layer.d.ts +2 -3
- package/dist/hooks/use-stage-event.d.ts +1 -0
- package/dist/hooks/use-transform-overlay.d.ts +108 -0
- package/dist/index-CSKpw1uX.js +25597 -0
- package/dist/{index.es-CEBX1sXY.js → index.es-Dswe047Z.js} +1 -1
- package/dist/plugins/barcode/Shape.vue.d.ts +1 -1
- package/dist/plugins/barcode/barcode.d.ts +12 -13
- package/dist/plugins/barcode/index.d.ts +0 -1
- package/dist/plugins/export/export.d.ts +1 -2
- package/dist/plugins/graphic-registry/graphic-registry.d.ts +43 -0
- package/dist/plugins/graphic-registry/index.d.ts +1 -0
- package/dist/plugins/import/import.d.ts +1 -2
- package/dist/plugins/index.d.ts +2 -6
- package/dist/plugins/keydown.d.ts +6 -0
- package/dist/plugins/{table/ContextMenu.vue.d.ts → layer-manager/LayerPanel.vue.d.ts} +5 -4
- package/dist/plugins/layer-manager/index.d.ts +2 -0
- package/dist/plugins/layer-manager/layer-manager.d.ts +16 -0
- package/dist/plugins/line/Shape.vue.d.ts +1 -1
- package/dist/plugins/line/index.d.ts +0 -1
- package/dist/plugins/line/line.d.ts +12 -13
- package/dist/plugins/qrcode/Shape.vue.d.ts +1 -1
- package/dist/plugins/qrcode/index.d.ts +0 -1
- package/dist/plugins/qrcode/qrcode.d.ts +12 -13
- package/dist/plugins/rect/Shape.vue.d.ts +1 -1
- package/dist/plugins/rect/index.d.ts +0 -1
- package/dist/plugins/rect/rect.d.ts +11 -13
- package/dist/plugins/selection.d.ts +5 -1
- package/dist/plugins/text/Shape.vue.d.ts +1 -1
- package/dist/plugins/text/index.d.ts +0 -1
- package/dist/plugins/text/text.d.ts +16 -13
- package/dist/types/base-graphic-element.d.ts +10 -3
- package/dist/types/base.d.ts +5 -18
- package/dist/types/event-data.d.ts +17 -0
- package/dist/types/event-map.d.ts +8 -1
- package/dist/types/graphic-plugin.d.ts +27 -0
- package/dist/types/index.d.ts +1 -3
- package/dist/utils/color.d.ts +40 -0
- package/dist/utils/css-var.d.ts +14 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/readability.d.ts +22 -0
- package/dist/utils/theme.d.ts +2 -0
- package/dist/utils/transform-geometry.d.ts +62 -0
- package/dist/utils/transform-overlay.d.ts +62 -0
- package/dist/vkedit.css +1 -1
- package/dist/vkedit.es.js +81 -96
- package/package.json +5 -5
- package/dist/components/ui/VkIcon.vue.d.ts +0 -8
- package/dist/index-Bisex1w7.js +0 -72850
- package/dist/plugins/barcode/Tool.vue.d.ts +0 -6
- package/dist/plugins/chart/PropertyPanel.vue.d.ts +0 -9
- package/dist/plugins/chart/Shape.vue.d.ts +0 -23
- package/dist/plugins/chart/Tool.vue.d.ts +0 -6
- package/dist/plugins/chart/chart.d.ts +0 -38
- package/dist/plugins/chart/index.d.ts +0 -4
- package/dist/plugins/element-manager.d.ts +0 -24
- package/dist/plugins/graphic-manager/graphic-manager.d.ts +0 -31
- package/dist/plugins/graphic-manager/index.d.ts +0 -1
- package/dist/plugins/graphic-tool-manager.d.ts +0 -16
- package/dist/plugins/line/Tool.vue.d.ts +0 -7
- package/dist/plugins/property-panel-manager/index.d.ts +0 -1
- package/dist/plugins/property-panel-manager/property-panel-manager.d.ts +0 -32
- package/dist/plugins/qrcode/Tool.vue.d.ts +0 -6
- package/dist/plugins/table/PropertyPanel.vue.d.ts +0 -9
- package/dist/plugins/table/Shape.vue.d.ts +0 -26
- package/dist/plugins/table/Tool.vue.d.ts +0 -7
- package/dist/plugins/table/cell.d.ts +0 -61
- package/dist/plugins/table/index.d.ts +0 -6
- package/dist/plugins/table/table.d.ts +0 -92
- package/dist/plugins/text/Tool.vue.d.ts +0 -6
- package/dist/types/base-graphic-type.d.ts +0 -9
- package/dist/types/element-type-map.d.ts +0 -12
- package/dist/types/plugin-map.d.ts +0 -12
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
host: import('../../core').EditorHost;
|
|
3
|
-
collapsed?: boolean;
|
|
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, {}, HTMLButtonElement>;
|
|
6
|
-
export default _default;
|
|
@@ -1,9 +0,0 @@
|
|
|
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;
|
|
@@ -1,23 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
host: import('../../core').EditorHost;
|
|
3
|
-
collapsed?: boolean;
|
|
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, {}, HTMLButtonElement>;
|
|
6
|
-
export default _default;
|
|
@@ -1,38 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './graphic-manager';
|
|
@@ -1,16 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { EditorHost } from '../../core';
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
host: EditorHost;
|
|
4
|
-
collapsed?: boolean;
|
|
5
|
-
};
|
|
6
|
-
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>;
|
|
7
|
-
export default _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './property-panel-manager';
|
|
@@ -1,32 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
host: import('../../core').EditorHost;
|
|
3
|
-
collapsed?: boolean;
|
|
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, {}, HTMLButtonElement>;
|
|
6
|
-
export default _default;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { EditorHost } from '../../core';
|
|
2
|
-
import { TableElement } from './table';
|
|
3
|
-
interface Props {
|
|
4
|
-
host: EditorHost;
|
|
5
|
-
element: TableElement;
|
|
6
|
-
selection: TableElement[];
|
|
7
|
-
}
|
|
8
|
-
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
|
-
export default _default;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { EditorHost } from '../../core';
|
|
2
|
-
import { TableElement } from './table';
|
|
3
|
-
interface Props {
|
|
4
|
-
element: TableElement;
|
|
5
|
-
host: EditorHost;
|
|
6
|
-
}
|
|
7
|
-
declare function __VLS_template(): {
|
|
8
|
-
attrs: Partial<{}>;
|
|
9
|
-
slots: {
|
|
10
|
-
default?(_: {
|
|
11
|
-
host: EditorHost;
|
|
12
|
-
element: TableElement;
|
|
13
|
-
}): any;
|
|
14
|
-
};
|
|
15
|
-
refs: {};
|
|
16
|
-
rootEl: any;
|
|
17
|
-
};
|
|
18
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
19
|
-
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
20
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
21
|
-
export default _default;
|
|
22
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
23
|
-
new (): {
|
|
24
|
-
$slots: S;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { EditorHost } from '../../core';
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
host: EditorHost;
|
|
4
|
-
collapsed?: boolean;
|
|
5
|
-
};
|
|
6
|
-
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>;
|
|
7
|
-
export default _default;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
export interface CellFont {
|
|
2
|
-
name?: string;
|
|
3
|
-
family?: string;
|
|
4
|
-
scheme?: 'minor' | 'major' | 'none';
|
|
5
|
-
charset?: number;
|
|
6
|
-
size?: number;
|
|
7
|
-
color?: string;
|
|
8
|
-
bold?: boolean;
|
|
9
|
-
italic?: boolean;
|
|
10
|
-
underline?: boolean | 'none' | 'single' | 'double' | 'singleAccounting' | 'doubleAccounting';
|
|
11
|
-
strikeout?: boolean;
|
|
12
|
-
strike?: 'none' | 'single' | 'double';
|
|
13
|
-
outline?: boolean;
|
|
14
|
-
vertAlign?: 'superscript' | 'subscript';
|
|
15
|
-
}
|
|
16
|
-
export interface CellAlignment {
|
|
17
|
-
vertical?: 'top' | 'middle' | 'bottom' | 'distributed' | 'justify';
|
|
18
|
-
horizontal?: 'left' | 'center' | 'right' | 'justify' | 'fill' | 'centerContinuous' | 'distributed';
|
|
19
|
-
wrapText?: boolean;
|
|
20
|
-
indent?: number;
|
|
21
|
-
textRotation?: number | 'vertical';
|
|
22
|
-
readingOrder?: 'rtl' | 'ltr';
|
|
23
|
-
}
|
|
24
|
-
export interface BorderItem {
|
|
25
|
-
style: 'thin' | 'dotted' | 'dashDot' | 'dashDotDot' | 'dashed' | 'double' | 'hair' | 'medium' | 'mediumDashDot' | 'mediumDashDotDot' | 'mediumDashed' | 'slantDashDot' | 'thick';
|
|
26
|
-
color?: {
|
|
27
|
-
argb: string;
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
export interface CellBorder {
|
|
31
|
-
left?: BorderItem;
|
|
32
|
-
right?: BorderItem;
|
|
33
|
-
top?: BorderItem;
|
|
34
|
-
bottom?: BorderItem;
|
|
35
|
-
}
|
|
36
|
-
export interface CellFill {
|
|
37
|
-
type?: 'pattern';
|
|
38
|
-
pattern?: 'none' | 'solid' | 'darkVertical' | 'darkHorizontal' | 'darkDown' | 'darkUp' | 'darkGrid' | 'darkTrellis' | 'lightVertical' | 'lightHorizontal' | 'lightDown' | 'lightUp' | 'lightGrid' | 'lightTrellis' | 'gray125' | 'gray0625';
|
|
39
|
-
fgColor?: {
|
|
40
|
-
argb: string;
|
|
41
|
-
};
|
|
42
|
-
bgColor?: {
|
|
43
|
-
argb: string;
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
export declare class Cell {
|
|
47
|
-
value: string;
|
|
48
|
-
font: CellFont;
|
|
49
|
-
alignment: CellAlignment;
|
|
50
|
-
border: CellBorder;
|
|
51
|
-
fill: CellFill;
|
|
52
|
-
visible: boolean;
|
|
53
|
-
master?: Cell;
|
|
54
|
-
mergeRange?: {
|
|
55
|
-
startRow: number;
|
|
56
|
-
endRow: number;
|
|
57
|
-
startCol: number;
|
|
58
|
-
endCol: number;
|
|
59
|
-
};
|
|
60
|
-
constructor();
|
|
61
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { default as TableCellsBorder } from './CellsBorder.vue';
|
|
2
|
-
export { default as TablePropertyPanel } from './PropertyPanel.vue';
|
|
3
|
-
export { default as TableShape } from './Shape.vue';
|
|
4
|
-
export { default as TableTool } from './Tool.vue';
|
|
5
|
-
export { default as TableContextMenu } from './ContextMenu.vue';
|
|
6
|
-
export * from './table';
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { BasePlugin } from '../../types/base-plugin';
|
|
2
|
-
import { BaseGraphicElement, BaseGraphicElementOptions } from '../../types/base-graphic-element';
|
|
3
|
-
import { EditorHost } from '../../core';
|
|
4
|
-
export interface TableOptions extends BaseGraphicElementOptions {
|
|
5
|
-
x?: number;
|
|
6
|
-
y?: number;
|
|
7
|
-
rowsHeight?: number[];
|
|
8
|
-
colsWidth?: number[];
|
|
9
|
-
cells?: any[][];
|
|
10
|
-
xmm?: number;
|
|
11
|
-
ymm?: number;
|
|
12
|
-
}
|
|
13
|
-
export interface CellConfig {
|
|
14
|
-
x: number;
|
|
15
|
-
y: number;
|
|
16
|
-
width: number;
|
|
17
|
-
height: number;
|
|
18
|
-
fill: string;
|
|
19
|
-
text: string;
|
|
20
|
-
borderUp: boolean;
|
|
21
|
-
borderLeft: boolean;
|
|
22
|
-
mergeUp: boolean;
|
|
23
|
-
mergeLeft: boolean;
|
|
24
|
-
fontSize: number;
|
|
25
|
-
align: 'left' | 'center' | 'right' | 'justify';
|
|
26
|
-
verticalAlign: 'top' | 'middle' | 'bottom';
|
|
27
|
-
fontStyle?: 'normal' | 'italic' | 'bold' | '500' | 'italic bold';
|
|
28
|
-
visible: boolean;
|
|
29
|
-
}
|
|
30
|
-
export declare class TableElement extends BaseGraphicElement {
|
|
31
|
-
type: string;
|
|
32
|
-
activeCell: CellConfig;
|
|
33
|
-
activeRow: number;
|
|
34
|
-
activeCol: number;
|
|
35
|
-
rowsHeight: number[];
|
|
36
|
-
colsWidth: number[];
|
|
37
|
-
cells: CellConfig[][];
|
|
38
|
-
constructor(host: EditorHost, options?: Partial<TableOptions>);
|
|
39
|
-
initWidthHeight(): void;
|
|
40
|
-
initCells(): void;
|
|
41
|
-
updateCells(): void;
|
|
42
|
-
getCellX(col: number): number;
|
|
43
|
-
getCellY(row: number): number;
|
|
44
|
-
getCellSize: (rowIndex: number, colIndex: number) => {
|
|
45
|
-
width: number;
|
|
46
|
-
height: number;
|
|
47
|
-
};
|
|
48
|
-
setActiveCell(rowIndex: number, colIndex: number): void;
|
|
49
|
-
getDefaultCellConfig(rowIndex: number, colIndex: number): CellConfig;
|
|
50
|
-
addRow(after?: number): void;
|
|
51
|
-
removeRow(index?: number): void;
|
|
52
|
-
addCol(after?: number): void;
|
|
53
|
-
removeCol(index?: number): void;
|
|
54
|
-
deserialize(data: any): void;
|
|
55
|
-
serialize(): {
|
|
56
|
-
rowsHeight: number[];
|
|
57
|
-
colsWidth: number[];
|
|
58
|
-
cells: CellConfig[][];
|
|
59
|
-
id: string;
|
|
60
|
-
type: string;
|
|
61
|
-
xmm: number;
|
|
62
|
-
ymm: number;
|
|
63
|
-
wmm: number;
|
|
64
|
-
hmm: number;
|
|
65
|
-
rotation: number;
|
|
66
|
-
scaleX: number;
|
|
67
|
-
scaleY: number;
|
|
68
|
-
visible: boolean;
|
|
69
|
-
locked: boolean;
|
|
70
|
-
draggable: boolean;
|
|
71
|
-
transferable: boolean;
|
|
72
|
-
};
|
|
73
|
-
getCell(row?: number, col?: number): CellConfig | undefined;
|
|
74
|
-
get rowCount(): number;
|
|
75
|
-
get colCount(): number;
|
|
76
|
-
offset(row: number, col: number): CellConfig | undefined;
|
|
77
|
-
}
|
|
78
|
-
export declare class TablePlugin extends BasePlugin {
|
|
79
|
-
name: string;
|
|
80
|
-
version: string;
|
|
81
|
-
protected onInstall(): void;
|
|
82
|
-
}
|
|
83
|
-
declare module '../../types' {
|
|
84
|
-
interface ElementTypeMap {
|
|
85
|
-
table: TableElement;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
declare module '../../types' {
|
|
89
|
-
interface PluginMap {
|
|
90
|
-
'table-plugin': TablePlugin;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
host: import('../../core').EditorHost;
|
|
3
|
-
collapsed?: boolean;
|
|
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, {}, HTMLButtonElement>;
|
|
6
|
-
export default _default;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Component } from 'vue';
|
|
2
|
-
import { IGraphicElement, IGraphicType } from '.';
|
|
3
|
-
export declare abstract class BaseGraphicType implements IGraphicType {
|
|
4
|
-
abstract readonly type: string;
|
|
5
|
-
abstract render(): Component;
|
|
6
|
-
abstract renderTool(): Component;
|
|
7
|
-
abstract renderPropertyPanel(): Component;
|
|
8
|
-
abstract createElement(x: number, y: number): IGraphicElement;
|
|
9
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 可扩展的元素类型映射(插件可以通过模块声明合并来为此接口添加新类型)
|
|
3
|
-
* 示例:在某个插件中扩展`ElementTypeMap`
|
|
4
|
-
* - `declare module '@/types' {`
|
|
5
|
-
* - `interface ElementTypeMap {`
|
|
6
|
-
* - `yourType: YourElement}`
|
|
7
|
-
* - `}`
|
|
8
|
-
* - 然后你就可以这样使用它了:
|
|
9
|
-
* - const el = elementManager.createElement('yourType') // el 的类型被推断为 YourElement
|
|
10
|
-
*/
|
|
11
|
-
export interface ElementTypeMap {
|
|
12
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* PluginMap 保持为空接口,具体插件应在各自实现文件中用模块声明合并(declare module '@/types')来扩展。
|
|
3
|
-
* 例如在 `src/plugins/rect/rect.ts` 中添加:
|
|
4
|
-
*
|
|
5
|
-
* declare module '@/types' {
|
|
6
|
-
* interface PluginMap {
|
|
7
|
-
* 'rect-plugin': RectPlugin
|
|
8
|
-
* }
|
|
9
|
-
* }
|
|
10
|
-
*/
|
|
11
|
-
export interface PluginMap {
|
|
12
|
-
}
|