@hufe921/canvas-editor 0.9.14 → 0.9.16
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 +20 -20
- package/README.md +54 -54
- package/dist/canvas-editor.es.js +155 -50
- package/dist/canvas-editor.es.js.map +1 -1
- package/dist/canvas-editor.umd.js +9 -9
- package/dist/canvas-editor.umd.js.map +1 -1
- package/dist/src/editor/core/command/Command.d.ts +150 -150
- package/dist/src/editor/core/command/CommandAdapt.d.ts +93 -93
- package/dist/src/editor/core/contextmenu/ContextMenu.d.ts +28 -28
- package/dist/src/editor/core/contextmenu/menus/controlMenus.d.ts +2 -2
- package/dist/src/editor/core/contextmenu/menus/globalMenus.d.ts +2 -2
- package/dist/src/editor/core/contextmenu/menus/hyperlinkMenus.d.ts +2 -2
- package/dist/src/editor/core/contextmenu/menus/imageMenus.d.ts +2 -2
- package/dist/src/editor/core/contextmenu/menus/tableMenus.d.ts +2 -2
- package/dist/src/editor/core/cursor/Cursor.d.ts +17 -15
- package/dist/src/editor/core/cursor/CursorAgent.d.ts +15 -15
- package/dist/src/editor/core/draw/Draw.d.ts +143 -142
- package/dist/src/editor/core/draw/control/Control.d.ts +35 -35
- package/dist/src/editor/core/draw/control/checkbox/CheckboxControl.d.ts +15 -15
- package/dist/src/editor/core/draw/control/select/SelectControl.d.ts +21 -21
- package/dist/src/editor/core/draw/control/text/TextControl.d.ts +13 -13
- package/dist/src/editor/core/draw/frame/Background.d.ts +6 -6
- package/dist/src/editor/core/draw/frame/Header.d.ts +7 -7
- package/dist/src/editor/core/draw/frame/Margin.d.ts +7 -7
- package/dist/src/editor/core/draw/frame/PageNumber.d.ts +7 -7
- package/dist/src/editor/core/draw/frame/Watermark.d.ts +7 -7
- package/dist/src/editor/core/draw/interactive/Search.d.ts +26 -26
- package/dist/src/editor/core/draw/particle/CheckboxParticle.d.ts +7 -7
- package/dist/src/editor/core/draw/particle/HyperlinkParticle.d.ts +16 -16
- package/dist/src/editor/core/draw/particle/ImageParticle.d.ts +9 -9
- package/dist/src/editor/core/draw/particle/PageBreak.d.ts +12 -12
- package/dist/src/editor/core/draw/particle/Separator.d.ts +4 -4
- package/dist/src/editor/core/draw/particle/Subscript.d.ts +4 -4
- package/dist/src/editor/core/draw/particle/Superscript.d.ts +4 -4
- package/dist/src/editor/core/draw/particle/TextParticle.d.ts +18 -18
- package/dist/src/editor/core/draw/particle/block/BlockParticle.d.ts +14 -14
- package/dist/src/editor/core/draw/particle/block/modules/BaseBlock.d.ts +15 -15
- package/dist/src/editor/core/draw/particle/block/modules/IFrameBlock.d.ts +7 -7
- package/dist/src/editor/core/draw/particle/block/modules/VideoBlock.d.ts +6 -6
- package/dist/src/editor/core/draw/particle/date/DateParticle.d.ts +14 -14
- package/dist/src/editor/core/draw/particle/date/DatePicker.d.ts +64 -64
- package/dist/src/editor/core/draw/particle/latex/LaTexParticle.d.ts +7 -7
- package/dist/src/editor/core/draw/particle/latex/utils/LaTexUtils.d.ts +47 -47
- package/dist/src/editor/core/draw/particle/latex/utils/hershey.d.ts +10 -10
- package/dist/src/editor/core/draw/particle/latex/utils/symbols.d.ts +8 -8
- package/dist/src/editor/core/draw/particle/previewer/Previewer.d.ts +34 -34
- package/dist/src/editor/core/draw/particle/table/TableParticle.d.ts +11 -11
- package/dist/src/editor/core/draw/particle/table/TableTool.d.ts +22 -22
- package/dist/src/editor/core/draw/richtext/AbstractRichText.d.ts +14 -14
- package/dist/src/editor/core/draw/richtext/Highlight.d.ts +7 -7
- package/dist/src/editor/core/draw/richtext/Strikeout.d.ts +7 -7
- package/dist/src/editor/core/draw/richtext/Underline.d.ts +7 -7
- package/dist/src/editor/core/event/CanvasEvent.d.ts +48 -41
- package/dist/src/editor/core/event/GlobalEvent.d.ts +26 -24
- package/dist/src/editor/core/event/handlers/click.d.ts +8 -8
- package/dist/src/editor/core/event/handlers/composition.d.ts +8 -8
- package/dist/src/editor/core/event/handlers/copy.d.ts +2 -2
- package/dist/src/editor/core/event/handlers/cut.d.ts +2 -2
- package/dist/src/editor/core/event/handlers/drag.d.ts +6 -6
- package/dist/src/editor/core/event/handlers/drop.d.ts +2 -2
- package/dist/src/editor/core/event/handlers/input.d.ts +3 -2
- package/dist/src/editor/core/event/handlers/keydown.d.ts +2 -2
- package/dist/src/editor/core/event/handlers/mousedown.d.ts +2 -2
- package/dist/src/editor/core/event/handlers/mouseleave.d.ts +2 -2
- package/dist/src/editor/core/event/handlers/mousemove.d.ts +2 -2
- package/dist/src/editor/core/event/handlers/mouseup.d.ts +2 -2
- package/dist/src/editor/core/history/HistoryManager.d.ts +10 -10
- package/dist/src/editor/core/i18n/I18n.d.ts +10 -9
- package/dist/src/editor/core/listener/Listener.d.ts +13 -13
- package/dist/src/editor/core/observer/ScrollObserver.d.ts +11 -11
- package/dist/src/editor/core/observer/SelectionObserver.d.ts +18 -18
- package/dist/src/editor/core/position/Position.d.ts +20 -20
- package/dist/src/editor/core/range/RangeManager.d.ts +22 -22
- package/dist/src/editor/core/register/Register.d.ts +19 -18
- package/dist/src/editor/core/shortcut/Shortcut.d.ts +16 -16
- package/dist/src/editor/core/shortcut/keys/richtextKeys.d.ts +2 -2
- package/dist/src/editor/core/worker/WorkerManager.d.ts +7 -7
- package/dist/src/editor/core/worker/works/wordCount.d.ts +1 -1
- package/dist/src/editor/dataset/constant/Checkbox.d.ts +2 -2
- package/dist/src/editor/dataset/constant/Common.d.ts +4 -4
- package/dist/src/editor/dataset/constant/ContextMenu.d.ts +3 -3
- package/dist/src/editor/dataset/constant/Control.d.ts +2 -2
- package/dist/src/editor/dataset/constant/Cursor.d.ts +1 -1
- package/dist/src/editor/dataset/constant/Editor.d.ts +2 -2
- package/dist/src/editor/dataset/constant/Element.d.ts +6 -6
- package/dist/src/editor/dataset/constant/Header.d.ts +2 -2
- package/dist/src/editor/dataset/constant/Regular.d.ts +4 -4
- package/dist/src/editor/dataset/constant/Watermark.d.ts +2 -2
- package/dist/src/editor/dataset/enum/Block.d.ts +4 -4
- package/dist/src/editor/dataset/enum/Control.d.ts +16 -16
- package/dist/src/editor/dataset/enum/Editor.d.ts +21 -21
- package/dist/src/editor/dataset/enum/Element.d.ts +16 -16
- package/dist/src/editor/dataset/enum/ElementStyle.d.ts +12 -12
- package/dist/src/editor/dataset/enum/Event.d.ts +5 -5
- package/dist/src/editor/dataset/enum/KeyMap.d.ts +83 -82
- package/dist/src/editor/dataset/enum/Observer.d.ts +6 -6
- package/dist/src/editor/dataset/enum/Row.d.ts +6 -6
- package/dist/src/editor/dataset/enum/table/TableTool.d.ts +4 -4
- package/dist/src/editor/index.d.ts +27 -27
- package/dist/src/editor/interface/Block.d.ts +12 -12
- package/dist/src/editor/interface/Checkbox.d.ts +13 -13
- package/dist/src/editor/interface/Common.d.ts +8 -5
- package/dist/src/editor/interface/Control.d.ts +50 -50
- package/dist/src/editor/interface/Draw.d.ts +30 -30
- package/dist/src/editor/interface/Editor.d.ts +55 -55
- package/dist/src/editor/interface/Element.d.ts +99 -99
- package/dist/src/editor/interface/Header.d.ts +6 -6
- package/dist/src/editor/interface/Listener.d.ts +29 -29
- package/dist/src/editor/interface/Margin.d.ts +1 -1
- package/dist/src/editor/interface/Position.d.ts +37 -37
- package/dist/src/editor/interface/Previewer.d.ts +11 -11
- package/dist/src/editor/interface/Range.d.ts +11 -11
- package/dist/src/editor/interface/Row.d.ts +14 -14
- package/dist/src/editor/interface/Search.d.ts +14 -14
- package/dist/src/editor/interface/Watermark.d.ts +7 -7
- package/dist/src/editor/interface/contextmenu/ContextMenu.d.ts +60 -60
- package/dist/src/editor/interface/i18n/I18n.d.ts +6 -6
- package/dist/src/editor/interface/shortcut/Shortcut.d.ts +12 -10
- package/dist/src/editor/interface/table/Colgroup.d.ts +4 -4
- package/dist/src/editor/interface/table/Td.d.ts +19 -19
- package/dist/src/editor/interface/table/Tr.d.ts +6 -6
- package/dist/src/editor/utils/clipboard.d.ts +9 -9
- package/dist/src/editor/utils/element.d.ts +11 -11
- package/dist/src/editor/utils/hotkey.d.ts +1 -0
- package/dist/src/editor/utils/index.d.ts +11 -8
- package/dist/src/editor/utils/print.d.ts +1 -1
- package/dist/src/editor/utils/ua.d.ts +1 -0
- package/package.json +64 -64
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { IElementFillRect } from '../../../interface/Element';
|
|
2
|
-
export declare abstract class AbstractRichText {
|
|
3
|
-
fillRect: IElementFillRect;
|
|
4
|
-
fillColor?: string;
|
|
5
|
-
constructor();
|
|
6
|
-
clearFillInfo(): {
|
|
7
|
-
x: number;
|
|
8
|
-
y: number;
|
|
9
|
-
width: number;
|
|
10
|
-
height: number;
|
|
11
|
-
};
|
|
12
|
-
recordFillInfo(ctx: CanvasRenderingContext2D, x: number, y: number, width: number, height?: number, color?: string): void;
|
|
13
|
-
abstract render(ctx: CanvasRenderingContext2D): void;
|
|
14
|
-
}
|
|
1
|
+
import { IElementFillRect } from '../../../interface/Element';
|
|
2
|
+
export declare abstract class AbstractRichText {
|
|
3
|
+
fillRect: IElementFillRect;
|
|
4
|
+
fillColor?: string;
|
|
5
|
+
constructor();
|
|
6
|
+
clearFillInfo(): {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
};
|
|
12
|
+
recordFillInfo(ctx: CanvasRenderingContext2D, x: number, y: number, width: number, height?: number, color?: string): void;
|
|
13
|
+
abstract render(ctx: CanvasRenderingContext2D): void;
|
|
14
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AbstractRichText } from './AbstractRichText';
|
|
2
|
-
import { Draw } from '../Draw';
|
|
3
|
-
export declare class Highlight extends AbstractRichText {
|
|
4
|
-
private options;
|
|
5
|
-
constructor(draw: Draw);
|
|
6
|
-
render(ctx: CanvasRenderingContext2D): void;
|
|
7
|
-
}
|
|
1
|
+
import { AbstractRichText } from './AbstractRichText';
|
|
2
|
+
import { Draw } from '../Draw';
|
|
3
|
+
export declare class Highlight extends AbstractRichText {
|
|
4
|
+
private options;
|
|
5
|
+
constructor(draw: Draw);
|
|
6
|
+
render(ctx: CanvasRenderingContext2D): void;
|
|
7
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AbstractRichText } from './AbstractRichText';
|
|
2
|
-
import { Draw } from '../Draw';
|
|
3
|
-
export declare class Strikeout extends AbstractRichText {
|
|
4
|
-
private options;
|
|
5
|
-
constructor(draw: Draw);
|
|
6
|
-
render(ctx: CanvasRenderingContext2D): void;
|
|
7
|
-
}
|
|
1
|
+
import { AbstractRichText } from './AbstractRichText';
|
|
2
|
+
import { Draw } from '../Draw';
|
|
3
|
+
export declare class Strikeout extends AbstractRichText {
|
|
4
|
+
private options;
|
|
5
|
+
constructor(draw: Draw);
|
|
6
|
+
render(ctx: CanvasRenderingContext2D): void;
|
|
7
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AbstractRichText } from './AbstractRichText';
|
|
2
|
-
import { Draw } from '../Draw';
|
|
3
|
-
export declare class Underline extends AbstractRichText {
|
|
4
|
-
private options;
|
|
5
|
-
constructor(draw: Draw);
|
|
6
|
-
render(ctx: CanvasRenderingContext2D): void;
|
|
7
|
-
}
|
|
1
|
+
import { AbstractRichText } from './AbstractRichText';
|
|
2
|
+
import { Draw } from '../Draw';
|
|
3
|
+
export declare class Underline extends AbstractRichText {
|
|
4
|
+
private options;
|
|
5
|
+
constructor(draw: Draw);
|
|
6
|
+
render(ctx: CanvasRenderingContext2D): void;
|
|
7
|
+
}
|
|
@@ -1,41 +1,48 @@
|
|
|
1
|
-
import { IElement, IElementPosition } from '../../interface/Element';
|
|
2
|
-
import { ICurrentPosition } from '../../interface/Position';
|
|
3
|
-
import { Draw } from '../draw/Draw';
|
|
4
|
-
import { IRange } from '../../interface/Range';
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
1
|
+
import { IElement, IElementPosition } from '../../interface/Element';
|
|
2
|
+
import { ICurrentPosition } from '../../interface/Position';
|
|
3
|
+
import { Draw } from '../draw/Draw';
|
|
4
|
+
import { IRange } from '../../interface/Range';
|
|
5
|
+
export interface ICompositionInfo {
|
|
6
|
+
elementList: IElement[];
|
|
7
|
+
startIndex: number;
|
|
8
|
+
endIndex: number;
|
|
9
|
+
value: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class CanvasEvent {
|
|
12
|
+
isAllowSelection: boolean;
|
|
13
|
+
isComposing: boolean;
|
|
14
|
+
compositionInfo: ICompositionInfo | null;
|
|
15
|
+
isAllowDrag: boolean;
|
|
16
|
+
isAllowDrop: boolean;
|
|
17
|
+
cacheRange: IRange | null;
|
|
18
|
+
cacheElementList: IElement[] | null;
|
|
19
|
+
cachePositionList: IElementPosition[] | null;
|
|
20
|
+
mouseDownStartPosition: ICurrentPosition | null;
|
|
21
|
+
private draw;
|
|
22
|
+
private pageContainer;
|
|
23
|
+
private pageList;
|
|
24
|
+
private range;
|
|
25
|
+
private position;
|
|
26
|
+
constructor(draw: Draw);
|
|
27
|
+
getDraw(): Draw;
|
|
28
|
+
register(): void;
|
|
29
|
+
setIsAllowSelection(payload: boolean): void;
|
|
30
|
+
setIsAllowDrag(payload: boolean): void;
|
|
31
|
+
clearPainterStyle(): void;
|
|
32
|
+
applyPainterStyle(): void;
|
|
33
|
+
selectAll(): void;
|
|
34
|
+
mousemove(evt: MouseEvent): void;
|
|
35
|
+
mousedown(evt: MouseEvent): void;
|
|
36
|
+
mouseup(evt: MouseEvent): void;
|
|
37
|
+
mouseleave(evt: MouseEvent): void;
|
|
38
|
+
keydown(evt: KeyboardEvent): void;
|
|
39
|
+
dblclick(): void;
|
|
40
|
+
threeClick(): void;
|
|
41
|
+
input(data: string): void;
|
|
42
|
+
cut(): void;
|
|
43
|
+
copy(): void;
|
|
44
|
+
compositionstart(): void;
|
|
45
|
+
compositionend(evt: CompositionEvent): void;
|
|
46
|
+
drop(evt: DragEvent): void;
|
|
47
|
+
dragover(evt: DragEvent | MouseEvent): void;
|
|
48
|
+
}
|
|
@@ -1,24 +1,26 @@
|
|
|
1
|
-
import { Draw } from '../draw/Draw';
|
|
2
|
-
import { CanvasEvent } from './CanvasEvent';
|
|
3
|
-
export declare class GlobalEvent {
|
|
4
|
-
private draw;
|
|
5
|
-
private canvas;
|
|
6
|
-
private options;
|
|
7
|
-
private cursor;
|
|
8
|
-
private canvasEvent;
|
|
9
|
-
private range;
|
|
10
|
-
private previewer;
|
|
11
|
-
private tableTool;
|
|
12
|
-
private hyperlinkParticle;
|
|
13
|
-
private control;
|
|
14
|
-
private dateParticle;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
import { Draw } from '../draw/Draw';
|
|
2
|
+
import { CanvasEvent } from './CanvasEvent';
|
|
3
|
+
export declare class GlobalEvent {
|
|
4
|
+
private draw;
|
|
5
|
+
private canvas;
|
|
6
|
+
private options;
|
|
7
|
+
private cursor;
|
|
8
|
+
private canvasEvent;
|
|
9
|
+
private range;
|
|
10
|
+
private previewer;
|
|
11
|
+
private tableTool;
|
|
12
|
+
private hyperlinkParticle;
|
|
13
|
+
private control;
|
|
14
|
+
private dateParticle;
|
|
15
|
+
private dprMediaQueryList;
|
|
16
|
+
constructor(draw: Draw, canvasEvent: CanvasEvent);
|
|
17
|
+
register(): void;
|
|
18
|
+
private addEvent;
|
|
19
|
+
removeEvent(): void;
|
|
20
|
+
recoverEffect: (evt: Event) => void;
|
|
21
|
+
setCanvasEventAbility: () => void;
|
|
22
|
+
setRangeStyle: () => void;
|
|
23
|
+
setPageScale: (evt: WheelEvent) => void;
|
|
24
|
+
private _handleVisibilityChange;
|
|
25
|
+
private _handleDprChange;
|
|
26
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { CanvasEvent } from '../CanvasEvent';
|
|
2
|
-
declare function dblclick(host: CanvasEvent): void;
|
|
3
|
-
declare function threeClick(host: CanvasEvent): void;
|
|
4
|
-
declare const _default: {
|
|
5
|
-
dblclick: typeof dblclick;
|
|
6
|
-
threeClick: typeof threeClick;
|
|
7
|
-
};
|
|
8
|
-
export default _default;
|
|
1
|
+
import { CanvasEvent } from '../CanvasEvent';
|
|
2
|
+
declare function dblclick(host: CanvasEvent): void;
|
|
3
|
+
declare function threeClick(host: CanvasEvent): void;
|
|
4
|
+
declare const _default: {
|
|
5
|
+
dblclick: typeof dblclick;
|
|
6
|
+
threeClick: typeof threeClick;
|
|
7
|
+
};
|
|
8
|
+
export default _default;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { CanvasEvent } from '../CanvasEvent';
|
|
2
|
-
declare function compositionstart(host: CanvasEvent): void;
|
|
3
|
-
declare function compositionend(host: CanvasEvent): void;
|
|
4
|
-
declare const _default: {
|
|
5
|
-
compositionstart: typeof compositionstart;
|
|
6
|
-
compositionend: typeof compositionend;
|
|
7
|
-
};
|
|
8
|
-
export default _default;
|
|
1
|
+
import { CanvasEvent } from '../CanvasEvent';
|
|
2
|
+
declare function compositionstart(host: CanvasEvent): void;
|
|
3
|
+
declare function compositionend(host: CanvasEvent, evt: CompositionEvent): void;
|
|
4
|
+
declare const _default: {
|
|
5
|
+
compositionstart: typeof compositionstart;
|
|
6
|
+
compositionend: typeof compositionend;
|
|
7
|
+
};
|
|
8
|
+
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CanvasEvent } from '../CanvasEvent';
|
|
2
|
-
export declare function copy(host: CanvasEvent): void;
|
|
1
|
+
import { CanvasEvent } from '../CanvasEvent';
|
|
2
|
+
export declare function copy(host: CanvasEvent): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CanvasEvent } from '../CanvasEvent';
|
|
2
|
-
export declare function cut(host: CanvasEvent): void;
|
|
1
|
+
import { CanvasEvent } from '../CanvasEvent';
|
|
2
|
+
export declare function cut(host: CanvasEvent): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CanvasEvent } from '../CanvasEvent';
|
|
2
|
-
declare function dragover(evt: DragEvent | MouseEvent, host: CanvasEvent): void;
|
|
3
|
-
declare const _default: {
|
|
4
|
-
dragover: typeof dragover;
|
|
5
|
-
};
|
|
6
|
-
export default _default;
|
|
1
|
+
import { CanvasEvent } from '../CanvasEvent';
|
|
2
|
+
declare function dragover(evt: DragEvent | MouseEvent, host: CanvasEvent): void;
|
|
3
|
+
declare const _default: {
|
|
4
|
+
dragover: typeof dragover;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CanvasEvent } from '../CanvasEvent';
|
|
2
|
-
export declare function drop(evt: DragEvent, host: CanvasEvent): void;
|
|
1
|
+
import { CanvasEvent } from '../CanvasEvent';
|
|
2
|
+
export declare function drop(evt: DragEvent, host: CanvasEvent): void;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { CanvasEvent } from '../CanvasEvent';
|
|
2
|
-
export declare function input(data: string, host: CanvasEvent): void;
|
|
1
|
+
import { CanvasEvent } from '../CanvasEvent';
|
|
2
|
+
export declare function input(data: string, host: CanvasEvent): void;
|
|
3
|
+
export declare function removeComposingInput(host: CanvasEvent): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CanvasEvent } from '../CanvasEvent';
|
|
2
|
-
export declare function keydown(evt: KeyboardEvent, host: CanvasEvent): void;
|
|
1
|
+
import { CanvasEvent } from '../CanvasEvent';
|
|
2
|
+
export declare function keydown(evt: KeyboardEvent, host: CanvasEvent): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CanvasEvent } from '../CanvasEvent';
|
|
2
|
-
export declare function mousedown(evt: MouseEvent, host: CanvasEvent): void;
|
|
1
|
+
import { CanvasEvent } from '../CanvasEvent';
|
|
2
|
+
export declare function mousedown(evt: MouseEvent, host: CanvasEvent): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CanvasEvent } from '../CanvasEvent';
|
|
2
|
-
export declare function mouseleave(evt: MouseEvent, host: CanvasEvent): void;
|
|
1
|
+
import { CanvasEvent } from '../CanvasEvent';
|
|
2
|
+
export declare function mouseleave(evt: MouseEvent, host: CanvasEvent): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CanvasEvent } from '../CanvasEvent';
|
|
2
|
-
export declare function mousemove(evt: MouseEvent, host: CanvasEvent): void;
|
|
1
|
+
import { CanvasEvent } from '../CanvasEvent';
|
|
2
|
+
export declare function mousemove(evt: MouseEvent, host: CanvasEvent): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CanvasEvent } from '../CanvasEvent';
|
|
2
|
-
export declare function mouseup(evt: MouseEvent, host: CanvasEvent): void;
|
|
1
|
+
import { CanvasEvent } from '../CanvasEvent';
|
|
2
|
+
export declare function mouseup(evt: MouseEvent, host: CanvasEvent): void;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export declare class HistoryManager {
|
|
2
|
-
private readonly MAX_RECORD_COUNT;
|
|
3
|
-
private undoStack;
|
|
4
|
-
private redoStack;
|
|
5
|
-
undo(): void;
|
|
6
|
-
redo(): void;
|
|
7
|
-
execute(fn: Function): void;
|
|
8
|
-
isCanUndo(): boolean;
|
|
9
|
-
isCanRedo(): boolean;
|
|
10
|
-
}
|
|
1
|
+
export declare class HistoryManager {
|
|
2
|
+
private readonly MAX_RECORD_COUNT;
|
|
3
|
+
private undoStack;
|
|
4
|
+
private redoStack;
|
|
5
|
+
undo(): void;
|
|
6
|
+
redo(): void;
|
|
7
|
+
execute(fn: Function): void;
|
|
8
|
+
isCanUndo(): boolean;
|
|
9
|
+
isCanRedo(): boolean;
|
|
10
|
+
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { ILang } from '../../interface/i18n/I18n';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
private
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { ILang } from '../../interface/i18n/I18n';
|
|
2
|
+
import { DeepPartial } from '../../interface/Common';
|
|
3
|
+
export declare class I18n {
|
|
4
|
+
private langMap;
|
|
5
|
+
private currentLocale;
|
|
6
|
+
registerLangMap(locale: string, lang: DeepPartial<ILang>): void;
|
|
7
|
+
setLocale(locale: string): void;
|
|
8
|
+
getLang(): ILang;
|
|
9
|
+
t(path: string): string;
|
|
10
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { IContentChange, IControlChange, IIntersectionPageNoChange, IPageModeChange, IPageScaleChange, IPageSizeChange, IRangeStyleChange, ISaved, IVisiblePageNoListChange } from '../../interface/Listener';
|
|
2
|
-
export declare class Listener {
|
|
3
|
-
rangeStyleChange: IRangeStyleChange | null;
|
|
4
|
-
visiblePageNoListChange: IVisiblePageNoListChange | null;
|
|
5
|
-
intersectionPageNoChange: IIntersectionPageNoChange | null;
|
|
6
|
-
pageSizeChange: IPageSizeChange | null;
|
|
7
|
-
pageScaleChange: IPageScaleChange | null;
|
|
8
|
-
saved: ISaved | null;
|
|
9
|
-
contentChange: IContentChange | null;
|
|
10
|
-
controlChange: IControlChange | null;
|
|
11
|
-
pageModeChange: IPageModeChange | null;
|
|
12
|
-
constructor();
|
|
13
|
-
}
|
|
1
|
+
import { IContentChange, IControlChange, IIntersectionPageNoChange, IPageModeChange, IPageScaleChange, IPageSizeChange, IRangeStyleChange, ISaved, IVisiblePageNoListChange } from '../../interface/Listener';
|
|
2
|
+
export declare class Listener {
|
|
3
|
+
rangeStyleChange: IRangeStyleChange | null;
|
|
4
|
+
visiblePageNoListChange: IVisiblePageNoListChange | null;
|
|
5
|
+
intersectionPageNoChange: IIntersectionPageNoChange | null;
|
|
6
|
+
pageSizeChange: IPageSizeChange | null;
|
|
7
|
+
pageScaleChange: IPageScaleChange | null;
|
|
8
|
+
saved: ISaved | null;
|
|
9
|
+
contentChange: IContentChange | null;
|
|
10
|
+
controlChange: IControlChange | null;
|
|
11
|
+
pageModeChange: IPageModeChange | null;
|
|
12
|
+
constructor();
|
|
13
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Draw } from '../draw/Draw';
|
|
2
|
-
export declare class ScrollObserver {
|
|
3
|
-
private draw;
|
|
4
|
-
private options;
|
|
5
|
-
private pageContainer;
|
|
6
|
-
private pageHeight;
|
|
7
|
-
constructor(draw: Draw);
|
|
8
|
-
private _addEvent;
|
|
9
|
-
removeEvent(): void;
|
|
10
|
-
private _observer;
|
|
11
|
-
}
|
|
1
|
+
import { Draw } from '../draw/Draw';
|
|
2
|
+
export declare class ScrollObserver {
|
|
3
|
+
private draw;
|
|
4
|
+
private options;
|
|
5
|
+
private pageContainer;
|
|
6
|
+
private pageHeight;
|
|
7
|
+
constructor(draw: Draw);
|
|
8
|
+
private _addEvent;
|
|
9
|
+
removeEvent(): void;
|
|
10
|
+
private _observer;
|
|
11
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export declare class SelectionObserver {
|
|
2
|
-
private threshold;
|
|
3
|
-
private requestAnimationFrameId;
|
|
4
|
-
private tippingPoints;
|
|
5
|
-
private isMousedown;
|
|
6
|
-
private isMoving;
|
|
7
|
-
private clientWidth;
|
|
8
|
-
private clientHeight;
|
|
9
|
-
constructor();
|
|
10
|
-
private _addEvent;
|
|
11
|
-
removeEvent(): void;
|
|
12
|
-
private _mousedown;
|
|
13
|
-
private _mouseup;
|
|
14
|
-
private _mousemove;
|
|
15
|
-
private _move;
|
|
16
|
-
private _startMove;
|
|
17
|
-
private _stopMove;
|
|
18
|
-
}
|
|
1
|
+
export declare class SelectionObserver {
|
|
2
|
+
private threshold;
|
|
3
|
+
private requestAnimationFrameId;
|
|
4
|
+
private tippingPoints;
|
|
5
|
+
private isMousedown;
|
|
6
|
+
private isMoving;
|
|
7
|
+
private clientWidth;
|
|
8
|
+
private clientHeight;
|
|
9
|
+
constructor();
|
|
10
|
+
private _addEvent;
|
|
11
|
+
removeEvent(): void;
|
|
12
|
+
private _mousedown;
|
|
13
|
+
private _mouseup;
|
|
14
|
+
private _mousemove;
|
|
15
|
+
private _move;
|
|
16
|
+
private _startMove;
|
|
17
|
+
private _stopMove;
|
|
18
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { IElementPosition } from '../../interface/Element';
|
|
2
|
-
import { ICurrentPosition, IGetPositionByXYPayload, IPositionContext } from '../../interface/Position';
|
|
3
|
-
import { Draw } from '../draw/Draw';
|
|
4
|
-
export declare class Position {
|
|
5
|
-
private cursorPosition;
|
|
6
|
-
private positionContext;
|
|
7
|
-
private positionList;
|
|
8
|
-
private draw;
|
|
9
|
-
private options;
|
|
10
|
-
constructor(draw: Draw);
|
|
11
|
-
getOriginalPositionList(): IElementPosition[];
|
|
12
|
-
getPositionList(): IElementPosition[];
|
|
13
|
-
setPositionList(payload: IElementPosition[]): void;
|
|
14
|
-
setCursorPosition(position: IElementPosition | null): void;
|
|
15
|
-
getCursorPosition(): IElementPosition | null;
|
|
16
|
-
getPositionContext(): IPositionContext;
|
|
17
|
-
setPositionContext(payload: IPositionContext): void;
|
|
18
|
-
getPositionByXY(payload: IGetPositionByXYPayload): ICurrentPosition;
|
|
19
|
-
adjustPositionContext(payload: Pick<IGetPositionByXYPayload, 'x' | 'y'>): ICurrentPosition;
|
|
20
|
-
}
|
|
1
|
+
import { IElementPosition } from '../../interface/Element';
|
|
2
|
+
import { ICurrentPosition, IGetPositionByXYPayload, IPositionContext } from '../../interface/Position';
|
|
3
|
+
import { Draw } from '../draw/Draw';
|
|
4
|
+
export declare class Position {
|
|
5
|
+
private cursorPosition;
|
|
6
|
+
private positionContext;
|
|
7
|
+
private positionList;
|
|
8
|
+
private draw;
|
|
9
|
+
private options;
|
|
10
|
+
constructor(draw: Draw);
|
|
11
|
+
getOriginalPositionList(): IElementPosition[];
|
|
12
|
+
getPositionList(): IElementPosition[];
|
|
13
|
+
setPositionList(payload: IElementPosition[]): void;
|
|
14
|
+
setCursorPosition(position: IElementPosition | null): void;
|
|
15
|
+
getCursorPosition(): IElementPosition | null;
|
|
16
|
+
getPositionContext(): IPositionContext;
|
|
17
|
+
setPositionContext(payload: IPositionContext): void;
|
|
18
|
+
getPositionByXY(payload: IGetPositionByXYPayload): ICurrentPosition;
|
|
19
|
+
adjustPositionContext(payload: Pick<IGetPositionByXYPayload, 'x' | 'y'>): ICurrentPosition;
|
|
20
|
+
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { IElement } from '../../interface/Element';
|
|
2
|
-
import { IRange, RangeRowMap } from '../../interface/Range';
|
|
3
|
-
import { Draw } from '../draw/Draw';
|
|
4
|
-
export declare class RangeManager {
|
|
5
|
-
private draw;
|
|
6
|
-
private options;
|
|
7
|
-
private range;
|
|
8
|
-
private listener;
|
|
9
|
-
private position;
|
|
10
|
-
private historyManager;
|
|
11
|
-
constructor(draw: Draw);
|
|
12
|
-
getRange(): IRange;
|
|
13
|
-
getSelection(): IElement[] | null;
|
|
14
|
-
getRangeRow(): RangeRowMap | null;
|
|
15
|
-
getIsPointInRange(x: number, y: number): boolean;
|
|
16
|
-
setRange(startIndex: number, endIndex: number, tableId?: string, startTdIndex?: number, endTdIndex?: number, startTrIndex?: number, endTrIndex?: number): void;
|
|
17
|
-
setRangeStyle(): void;
|
|
18
|
-
recoveryRangeStyle(): void;
|
|
19
|
-
shrinkBoundary(): void;
|
|
20
|
-
render(ctx: CanvasRenderingContext2D, x: number, y: number, width: number, height: number): void;
|
|
21
|
-
toString(): string;
|
|
22
|
-
}
|
|
1
|
+
import { IElement } from '../../interface/Element';
|
|
2
|
+
import { IRange, RangeRowMap } from '../../interface/Range';
|
|
3
|
+
import { Draw } from '../draw/Draw';
|
|
4
|
+
export declare class RangeManager {
|
|
5
|
+
private draw;
|
|
6
|
+
private options;
|
|
7
|
+
private range;
|
|
8
|
+
private listener;
|
|
9
|
+
private position;
|
|
10
|
+
private historyManager;
|
|
11
|
+
constructor(draw: Draw);
|
|
12
|
+
getRange(): IRange;
|
|
13
|
+
getSelection(): IElement[] | null;
|
|
14
|
+
getRangeRow(): RangeRowMap | null;
|
|
15
|
+
getIsPointInRange(x: number, y: number): boolean;
|
|
16
|
+
setRange(startIndex: number, endIndex: number, tableId?: string, startTdIndex?: number, endTdIndex?: number, startTrIndex?: number, endTrIndex?: number): void;
|
|
17
|
+
setRangeStyle(): void;
|
|
18
|
+
recoveryRangeStyle(): void;
|
|
19
|
+
shrinkBoundary(): void;
|
|
20
|
+
render(ctx: CanvasRenderingContext2D, x: number, y: number, width: number, height: number): void;
|
|
21
|
+
toString(): string;
|
|
22
|
+
}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { IRegisterContextMenu } from '../../interface/contextmenu/ContextMenu';
|
|
2
|
-
import { IRegisterShortcut } from '../../interface/shortcut/Shortcut';
|
|
3
|
-
import { ContextMenu } from '../contextmenu/ContextMenu';
|
|
4
|
-
import { Shortcut } from '../shortcut/Shortcut';
|
|
5
|
-
import { I18n } from '../i18n/I18n';
|
|
6
|
-
import { ILang } from '../../interface/i18n/I18n';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import { IRegisterContextMenu } from '../../interface/contextmenu/ContextMenu';
|
|
2
|
+
import { IRegisterShortcut } from '../../interface/shortcut/Shortcut';
|
|
3
|
+
import { ContextMenu } from '../contextmenu/ContextMenu';
|
|
4
|
+
import { Shortcut } from '../shortcut/Shortcut';
|
|
5
|
+
import { I18n } from '../i18n/I18n';
|
|
6
|
+
import { ILang } from '../../interface/i18n/I18n';
|
|
7
|
+
import { DeepPartial } from '../../interface/Common';
|
|
8
|
+
interface IRegisterPayload {
|
|
9
|
+
contextMenu: ContextMenu;
|
|
10
|
+
shortcut: Shortcut;
|
|
11
|
+
i18n: I18n;
|
|
12
|
+
}
|
|
13
|
+
export declare class Register {
|
|
14
|
+
contextMenuList: (payload: IRegisterContextMenu[]) => void;
|
|
15
|
+
shortcutList: (payload: IRegisterShortcut[]) => void;
|
|
16
|
+
langMap: (locale: string, lang: DeepPartial<ILang>) => void;
|
|
17
|
+
constructor(payload: IRegisterPayload);
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { IRegisterShortcut } from '../../interface/shortcut/Shortcut';
|
|
2
|
-
import { Command } from '../command/Command';
|
|
3
|
-
import { Draw } from '../draw/Draw';
|
|
4
|
-
export declare class Shortcut {
|
|
5
|
-
private command;
|
|
6
|
-
private globalShortcutList;
|
|
7
|
-
private agentShortcutList;
|
|
8
|
-
constructor(draw: Draw, command: Command);
|
|
9
|
-
private _addEvent;
|
|
10
|
-
removeEvent(): void;
|
|
11
|
-
private _addShortcutList;
|
|
12
|
-
registerShortcutList(payload: IRegisterShortcut[]): void;
|
|
13
|
-
private _globalKeydown;
|
|
14
|
-
private _agentKeydown;
|
|
15
|
-
private _execute;
|
|
16
|
-
}
|
|
1
|
+
import { IRegisterShortcut } from '../../interface/shortcut/Shortcut';
|
|
2
|
+
import { Command } from '../command/Command';
|
|
3
|
+
import { Draw } from '../draw/Draw';
|
|
4
|
+
export declare class Shortcut {
|
|
5
|
+
private command;
|
|
6
|
+
private globalShortcutList;
|
|
7
|
+
private agentShortcutList;
|
|
8
|
+
constructor(draw: Draw, command: Command);
|
|
9
|
+
private _addEvent;
|
|
10
|
+
removeEvent(): void;
|
|
11
|
+
private _addShortcutList;
|
|
12
|
+
registerShortcutList(payload: IRegisterShortcut[]): void;
|
|
13
|
+
private _globalKeydown;
|
|
14
|
+
private _agentKeydown;
|
|
15
|
+
private _execute;
|
|
16
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { IRegisterShortcut } from '../../../interface/shortcut/Shortcut';
|
|
2
|
-
export declare const richtextKeys: IRegisterShortcut[];
|
|
1
|
+
import { IRegisterShortcut } from '../../../interface/shortcut/Shortcut';
|
|
2
|
+
export declare const richtextKeys: IRegisterShortcut[];
|