@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.
Files changed (128) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +54 -54
  3. package/dist/canvas-editor.es.js +155 -50
  4. package/dist/canvas-editor.es.js.map +1 -1
  5. package/dist/canvas-editor.umd.js +9 -9
  6. package/dist/canvas-editor.umd.js.map +1 -1
  7. package/dist/src/editor/core/command/Command.d.ts +150 -150
  8. package/dist/src/editor/core/command/CommandAdapt.d.ts +93 -93
  9. package/dist/src/editor/core/contextmenu/ContextMenu.d.ts +28 -28
  10. package/dist/src/editor/core/contextmenu/menus/controlMenus.d.ts +2 -2
  11. package/dist/src/editor/core/contextmenu/menus/globalMenus.d.ts +2 -2
  12. package/dist/src/editor/core/contextmenu/menus/hyperlinkMenus.d.ts +2 -2
  13. package/dist/src/editor/core/contextmenu/menus/imageMenus.d.ts +2 -2
  14. package/dist/src/editor/core/contextmenu/menus/tableMenus.d.ts +2 -2
  15. package/dist/src/editor/core/cursor/Cursor.d.ts +17 -15
  16. package/dist/src/editor/core/cursor/CursorAgent.d.ts +15 -15
  17. package/dist/src/editor/core/draw/Draw.d.ts +143 -142
  18. package/dist/src/editor/core/draw/control/Control.d.ts +35 -35
  19. package/dist/src/editor/core/draw/control/checkbox/CheckboxControl.d.ts +15 -15
  20. package/dist/src/editor/core/draw/control/select/SelectControl.d.ts +21 -21
  21. package/dist/src/editor/core/draw/control/text/TextControl.d.ts +13 -13
  22. package/dist/src/editor/core/draw/frame/Background.d.ts +6 -6
  23. package/dist/src/editor/core/draw/frame/Header.d.ts +7 -7
  24. package/dist/src/editor/core/draw/frame/Margin.d.ts +7 -7
  25. package/dist/src/editor/core/draw/frame/PageNumber.d.ts +7 -7
  26. package/dist/src/editor/core/draw/frame/Watermark.d.ts +7 -7
  27. package/dist/src/editor/core/draw/interactive/Search.d.ts +26 -26
  28. package/dist/src/editor/core/draw/particle/CheckboxParticle.d.ts +7 -7
  29. package/dist/src/editor/core/draw/particle/HyperlinkParticle.d.ts +16 -16
  30. package/dist/src/editor/core/draw/particle/ImageParticle.d.ts +9 -9
  31. package/dist/src/editor/core/draw/particle/PageBreak.d.ts +12 -12
  32. package/dist/src/editor/core/draw/particle/Separator.d.ts +4 -4
  33. package/dist/src/editor/core/draw/particle/Subscript.d.ts +4 -4
  34. package/dist/src/editor/core/draw/particle/Superscript.d.ts +4 -4
  35. package/dist/src/editor/core/draw/particle/TextParticle.d.ts +18 -18
  36. package/dist/src/editor/core/draw/particle/block/BlockParticle.d.ts +14 -14
  37. package/dist/src/editor/core/draw/particle/block/modules/BaseBlock.d.ts +15 -15
  38. package/dist/src/editor/core/draw/particle/block/modules/IFrameBlock.d.ts +7 -7
  39. package/dist/src/editor/core/draw/particle/block/modules/VideoBlock.d.ts +6 -6
  40. package/dist/src/editor/core/draw/particle/date/DateParticle.d.ts +14 -14
  41. package/dist/src/editor/core/draw/particle/date/DatePicker.d.ts +64 -64
  42. package/dist/src/editor/core/draw/particle/latex/LaTexParticle.d.ts +7 -7
  43. package/dist/src/editor/core/draw/particle/latex/utils/LaTexUtils.d.ts +47 -47
  44. package/dist/src/editor/core/draw/particle/latex/utils/hershey.d.ts +10 -10
  45. package/dist/src/editor/core/draw/particle/latex/utils/symbols.d.ts +8 -8
  46. package/dist/src/editor/core/draw/particle/previewer/Previewer.d.ts +34 -34
  47. package/dist/src/editor/core/draw/particle/table/TableParticle.d.ts +11 -11
  48. package/dist/src/editor/core/draw/particle/table/TableTool.d.ts +22 -22
  49. package/dist/src/editor/core/draw/richtext/AbstractRichText.d.ts +14 -14
  50. package/dist/src/editor/core/draw/richtext/Highlight.d.ts +7 -7
  51. package/dist/src/editor/core/draw/richtext/Strikeout.d.ts +7 -7
  52. package/dist/src/editor/core/draw/richtext/Underline.d.ts +7 -7
  53. package/dist/src/editor/core/event/CanvasEvent.d.ts +48 -41
  54. package/dist/src/editor/core/event/GlobalEvent.d.ts +26 -24
  55. package/dist/src/editor/core/event/handlers/click.d.ts +8 -8
  56. package/dist/src/editor/core/event/handlers/composition.d.ts +8 -8
  57. package/dist/src/editor/core/event/handlers/copy.d.ts +2 -2
  58. package/dist/src/editor/core/event/handlers/cut.d.ts +2 -2
  59. package/dist/src/editor/core/event/handlers/drag.d.ts +6 -6
  60. package/dist/src/editor/core/event/handlers/drop.d.ts +2 -2
  61. package/dist/src/editor/core/event/handlers/input.d.ts +3 -2
  62. package/dist/src/editor/core/event/handlers/keydown.d.ts +2 -2
  63. package/dist/src/editor/core/event/handlers/mousedown.d.ts +2 -2
  64. package/dist/src/editor/core/event/handlers/mouseleave.d.ts +2 -2
  65. package/dist/src/editor/core/event/handlers/mousemove.d.ts +2 -2
  66. package/dist/src/editor/core/event/handlers/mouseup.d.ts +2 -2
  67. package/dist/src/editor/core/history/HistoryManager.d.ts +10 -10
  68. package/dist/src/editor/core/i18n/I18n.d.ts +10 -9
  69. package/dist/src/editor/core/listener/Listener.d.ts +13 -13
  70. package/dist/src/editor/core/observer/ScrollObserver.d.ts +11 -11
  71. package/dist/src/editor/core/observer/SelectionObserver.d.ts +18 -18
  72. package/dist/src/editor/core/position/Position.d.ts +20 -20
  73. package/dist/src/editor/core/range/RangeManager.d.ts +22 -22
  74. package/dist/src/editor/core/register/Register.d.ts +19 -18
  75. package/dist/src/editor/core/shortcut/Shortcut.d.ts +16 -16
  76. package/dist/src/editor/core/shortcut/keys/richtextKeys.d.ts +2 -2
  77. package/dist/src/editor/core/worker/WorkerManager.d.ts +7 -7
  78. package/dist/src/editor/core/worker/works/wordCount.d.ts +1 -1
  79. package/dist/src/editor/dataset/constant/Checkbox.d.ts +2 -2
  80. package/dist/src/editor/dataset/constant/Common.d.ts +4 -4
  81. package/dist/src/editor/dataset/constant/ContextMenu.d.ts +3 -3
  82. package/dist/src/editor/dataset/constant/Control.d.ts +2 -2
  83. package/dist/src/editor/dataset/constant/Cursor.d.ts +1 -1
  84. package/dist/src/editor/dataset/constant/Editor.d.ts +2 -2
  85. package/dist/src/editor/dataset/constant/Element.d.ts +6 -6
  86. package/dist/src/editor/dataset/constant/Header.d.ts +2 -2
  87. package/dist/src/editor/dataset/constant/Regular.d.ts +4 -4
  88. package/dist/src/editor/dataset/constant/Watermark.d.ts +2 -2
  89. package/dist/src/editor/dataset/enum/Block.d.ts +4 -4
  90. package/dist/src/editor/dataset/enum/Control.d.ts +16 -16
  91. package/dist/src/editor/dataset/enum/Editor.d.ts +21 -21
  92. package/dist/src/editor/dataset/enum/Element.d.ts +16 -16
  93. package/dist/src/editor/dataset/enum/ElementStyle.d.ts +12 -12
  94. package/dist/src/editor/dataset/enum/Event.d.ts +5 -5
  95. package/dist/src/editor/dataset/enum/KeyMap.d.ts +83 -82
  96. package/dist/src/editor/dataset/enum/Observer.d.ts +6 -6
  97. package/dist/src/editor/dataset/enum/Row.d.ts +6 -6
  98. package/dist/src/editor/dataset/enum/table/TableTool.d.ts +4 -4
  99. package/dist/src/editor/index.d.ts +27 -27
  100. package/dist/src/editor/interface/Block.d.ts +12 -12
  101. package/dist/src/editor/interface/Checkbox.d.ts +13 -13
  102. package/dist/src/editor/interface/Common.d.ts +8 -5
  103. package/dist/src/editor/interface/Control.d.ts +50 -50
  104. package/dist/src/editor/interface/Draw.d.ts +30 -30
  105. package/dist/src/editor/interface/Editor.d.ts +55 -55
  106. package/dist/src/editor/interface/Element.d.ts +99 -99
  107. package/dist/src/editor/interface/Header.d.ts +6 -6
  108. package/dist/src/editor/interface/Listener.d.ts +29 -29
  109. package/dist/src/editor/interface/Margin.d.ts +1 -1
  110. package/dist/src/editor/interface/Position.d.ts +37 -37
  111. package/dist/src/editor/interface/Previewer.d.ts +11 -11
  112. package/dist/src/editor/interface/Range.d.ts +11 -11
  113. package/dist/src/editor/interface/Row.d.ts +14 -14
  114. package/dist/src/editor/interface/Search.d.ts +14 -14
  115. package/dist/src/editor/interface/Watermark.d.ts +7 -7
  116. package/dist/src/editor/interface/contextmenu/ContextMenu.d.ts +60 -60
  117. package/dist/src/editor/interface/i18n/I18n.d.ts +6 -6
  118. package/dist/src/editor/interface/shortcut/Shortcut.d.ts +12 -10
  119. package/dist/src/editor/interface/table/Colgroup.d.ts +4 -4
  120. package/dist/src/editor/interface/table/Td.d.ts +19 -19
  121. package/dist/src/editor/interface/table/Tr.d.ts +6 -6
  122. package/dist/src/editor/utils/clipboard.d.ts +9 -9
  123. package/dist/src/editor/utils/element.d.ts +11 -11
  124. package/dist/src/editor/utils/hotkey.d.ts +1 -0
  125. package/dist/src/editor/utils/index.d.ts +11 -8
  126. package/dist/src/editor/utils/print.d.ts +1 -1
  127. package/dist/src/editor/utils/ua.d.ts +1 -0
  128. package/package.json +64 -64
@@ -1,7 +1,7 @@
1
- import { Draw } from '../draw/Draw';
2
- export declare class WorkerManager {
3
- private draw;
4
- private wordCountWorker;
5
- constructor(draw: Draw);
6
- getWordCount(): Promise<number>;
7
- }
1
+ import { Draw } from '../draw/Draw';
2
+ export declare class WorkerManager {
3
+ private draw;
4
+ private wordCountWorker;
5
+ constructor(draw: Draw);
6
+ getWordCount(): Promise<number>;
7
+ }
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,2 +1,2 @@
1
- import { ICheckboxOption } from '../../interface/Checkbox';
2
- export declare const defaultCheckboxOption: Readonly<Required<ICheckboxOption>>;
1
+ import { ICheckboxOption } from '../../interface/Checkbox';
2
+ export declare const defaultCheckboxOption: Readonly<Required<ICheckboxOption>>;
@@ -1,4 +1,4 @@
1
- export declare const ZERO = "\u200B";
2
- export declare const WRAP = "\n";
3
- export declare const HORIZON_TAB = "\t";
4
- export declare const NBSP = " ";
1
+ export declare const ZERO = "\u200B";
2
+ export declare const WRAP = "\n";
3
+ export declare const HORIZON_TAB = "\t";
4
+ export declare const NBSP = " ";
@@ -1,3 +1,3 @@
1
- export declare const NAME_PLACEHOLDER: {
2
- SELECTED_TEXT: string;
3
- };
1
+ export declare const NAME_PLACEHOLDER: {
2
+ SELECTED_TEXT: string;
3
+ };
@@ -1,2 +1,2 @@
1
- import { IControlOption } from '../../interface/Control';
2
- export declare const defaultControlOption: Readonly<Required<IControlOption>>;
1
+ import { IControlOption } from '../../interface/Control';
2
+ export declare const defaultControlOption: Readonly<Required<IControlOption>>;
@@ -1 +1 @@
1
- export declare const CURSOR_AGENT_HEIGHT = 12;
1
+ export declare const CURSOR_AGENT_HEIGHT = 12;
@@ -1,2 +1,2 @@
1
- export declare const EDITOR_COMPONENT = "editor-component";
2
- export declare const EDITOR_PREFIX = "ce";
1
+ export declare const EDITOR_COMPONENT = "editor-component";
2
+ export declare const EDITOR_PREFIX = "ce";
@@ -1,6 +1,6 @@
1
- import { ElementType } from '../enum/Element';
2
- import { IElement } from '../../interface/Element';
3
- export declare const EDITOR_ELEMENT_STYLE_ATTR: Array<keyof IElement>;
4
- export declare const EDITOR_ELEMENT_COPY_ATTR: Array<keyof IElement>;
5
- export declare const EDITOR_ELEMENT_ZIP_ATTR: Array<keyof IElement>;
6
- export declare const TEXTLIKE_ELEMENT_TYPE: ElementType[];
1
+ import { ElementType } from '../enum/Element';
2
+ import { IElement } from '../../interface/Element';
3
+ export declare const EDITOR_ELEMENT_STYLE_ATTR: Array<keyof IElement>;
4
+ export declare const EDITOR_ELEMENT_COPY_ATTR: Array<keyof IElement>;
5
+ export declare const EDITOR_ELEMENT_ZIP_ATTR: Array<keyof IElement>;
6
+ export declare const TEXTLIKE_ELEMENT_TYPE: ElementType[];
@@ -1,2 +1,2 @@
1
- import { IHeader } from '../../interface/Header';
2
- export declare const defaultHeaderOption: Readonly<Required<IHeader>>;
1
+ import { IHeader } from '../../interface/Header';
2
+ export declare const defaultHeaderOption: Readonly<Required<IHeader>>;
@@ -1,4 +1,4 @@
1
- export declare const NUMBER_REG: RegExp;
2
- export declare const LETTER_REG: RegExp;
3
- export declare const NUMBER_LIKE_REG: RegExp;
4
- export declare const CHINESE_REG: RegExp;
1
+ export declare const NUMBER_REG: RegExp;
2
+ export declare const LETTER_REG: RegExp;
3
+ export declare const NUMBER_LIKE_REG: RegExp;
4
+ export declare const CHINESE_REG: RegExp;
@@ -1,2 +1,2 @@
1
- import { IWatermark } from '../../interface/Watermark';
2
- export declare const defaultWatermarkOption: Readonly<Required<IWatermark>>;
1
+ import { IWatermark } from '../../interface/Watermark';
2
+ export declare const defaultWatermarkOption: Readonly<Required<IWatermark>>;
@@ -1,4 +1,4 @@
1
- export declare enum BlockType {
2
- IFRAME = "iframe",
3
- VIDEO = "video"
4
- }
1
+ export declare enum BlockType {
2
+ IFRAME = "iframe",
3
+ VIDEO = "video"
4
+ }
@@ -1,16 +1,16 @@
1
- export declare enum ControlType {
2
- TEXT = "text",
3
- SELECT = "select",
4
- CHECKBOX = "checkbox"
5
- }
6
- export declare enum ControlComponent {
7
- PREFIX = "prefix",
8
- POSTFIX = "postfix",
9
- PLACEHOLDER = "placeholder",
10
- VALUE = "value",
11
- CHECKBOX = "checkbox"
12
- }
13
- export declare enum ImageDisplay {
14
- INLINE = "inline",
15
- BLOCK = "block"
16
- }
1
+ export declare enum ControlType {
2
+ TEXT = "text",
3
+ SELECT = "select",
4
+ CHECKBOX = "checkbox"
5
+ }
6
+ export declare enum ControlComponent {
7
+ PREFIX = "prefix",
8
+ POSTFIX = "postfix",
9
+ PLACEHOLDER = "placeholder",
10
+ VALUE = "value",
11
+ CHECKBOX = "checkbox"
12
+ }
13
+ export declare enum ImageDisplay {
14
+ INLINE = "inline",
15
+ BLOCK = "block"
16
+ }
@@ -1,21 +1,21 @@
1
- export declare enum EditorComponent {
2
- COMPONENT = "component",
3
- MENU = "menu",
4
- MAIN = "main",
5
- FOOTER = "footer",
6
- CONTEXTMENU = "contextmenu",
7
- POPUP = "popup"
8
- }
9
- export declare enum EditorContext {
10
- PAGE = "page",
11
- TABLE = "table"
12
- }
13
- export declare enum EditorMode {
14
- EDIT = "edit",
15
- CLEAN = "clean",
16
- READONLY = "readonly"
17
- }
18
- export declare enum PageMode {
19
- PAGING = "paging",
20
- CONTINUITY = "continuity"
21
- }
1
+ export declare enum EditorComponent {
2
+ COMPONENT = "component",
3
+ MENU = "menu",
4
+ MAIN = "main",
5
+ FOOTER = "footer",
6
+ CONTEXTMENU = "contextmenu",
7
+ POPUP = "popup"
8
+ }
9
+ export declare enum EditorContext {
10
+ PAGE = "page",
11
+ TABLE = "table"
12
+ }
13
+ export declare enum EditorMode {
14
+ EDIT = "edit",
15
+ CLEAN = "clean",
16
+ READONLY = "readonly"
17
+ }
18
+ export declare enum PageMode {
19
+ PAGING = "paging",
20
+ CONTINUITY = "continuity"
21
+ }
@@ -1,16 +1,16 @@
1
- export declare enum ElementType {
2
- TEXT = "text",
3
- IMAGE = "image",
4
- TABLE = "table",
5
- HYPERLINK = "hyperlink",
6
- SUPERSCRIPT = "superscript",
7
- SUBSCRIPT = "subscript",
8
- SEPARATOR = "separator",
9
- PAGE_BREAK = "pageBreak",
10
- CONTROL = "control",
11
- CHECKBOX = "checkbox",
12
- LATEX = "latex",
13
- TAB = "tab",
14
- DATE = "date",
15
- BLOCK = "block"
16
- }
1
+ export declare enum ElementType {
2
+ TEXT = "text",
3
+ IMAGE = "image",
4
+ TABLE = "table",
5
+ HYPERLINK = "hyperlink",
6
+ SUPERSCRIPT = "superscript",
7
+ SUBSCRIPT = "subscript",
8
+ SEPARATOR = "separator",
9
+ PAGE_BREAK = "pageBreak",
10
+ CONTROL = "control",
11
+ CHECKBOX = "checkbox",
12
+ LATEX = "latex",
13
+ TAB = "tab",
14
+ DATE = "date",
15
+ BLOCK = "block"
16
+ }
@@ -1,12 +1,12 @@
1
- export declare enum ElementStyleKey {
2
- font = "font",
3
- size = "size",
4
- width = "width",
5
- height = "height",
6
- bold = "bold",
7
- color = "color",
8
- highlight = "highlight",
9
- italic = "italic",
10
- underline = "underline",
11
- strikeout = "strikeout"
12
- }
1
+ export declare enum ElementStyleKey {
2
+ font = "font",
3
+ size = "size",
4
+ width = "width",
5
+ height = "height",
6
+ bold = "bold",
7
+ color = "color",
8
+ highlight = "highlight",
9
+ italic = "italic",
10
+ underline = "underline",
11
+ strikeout = "strikeout"
12
+ }
@@ -1,5 +1,5 @@
1
- export declare enum MouseEventButton {
2
- LEFT = 0,
3
- CENTER = 1,
4
- RIGHT = 2
5
- }
1
+ export declare enum MouseEventButton {
2
+ LEFT = 0,
3
+ CENTER = 1,
4
+ RIGHT = 2
5
+ }
@@ -1,82 +1,83 @@
1
- export declare enum KeyMap {
2
- Delete = "Delete",
3
- Backspace = "Backspace",
4
- Enter = "Enter",
5
- Left = "ArrowLeft",
6
- Right = "ArrowRight",
7
- Up = "ArrowUp",
8
- Down = "ArrowDown",
9
- ESC = "Escape",
10
- TAB = "Tab",
11
- LEFT_BRACKET = "[",
12
- RIGHT_BRACKET = "]",
13
- COMMA = ",",
14
- PERIOD = ".",
15
- LEFT_ANGLE_BRACKET = "<",
16
- RIGHT_ANGLE_BRACKET = ">",
17
- EQUAL = "=",
18
- MINUS = "-",
19
- PLUS = "+",
20
- A = "a",
21
- B = "b",
22
- C = "c",
23
- D = "d",
24
- E = "e",
25
- F = "f",
26
- G = "g",
27
- H = "h",
28
- I = "i",
29
- J = "j",
30
- K = "k",
31
- L = "l",
32
- M = "m",
33
- N = "n",
34
- O = "o",
35
- P = "p",
36
- Q = "q",
37
- R = "r",
38
- S = "s",
39
- T = "t",
40
- U = "u",
41
- V = "v",
42
- W = "w",
43
- X = "x",
44
- Y = "y",
45
- Z = "z",
46
- A_UPPERCASE = "A",
47
- B_UPPERCASE = "B",
48
- C_UPPERCASE = "C",
49
- D_UPPERCASE = "D",
50
- E_UPPERCASE = "E",
51
- F_UPPERCASE = "F",
52
- G_UPPERCASE = "G",
53
- H_UPPERCASE = "H",
54
- I_UPPERCASE = "I",
55
- J_UPPERCASE = "J",
56
- K_UPPERCASE = "K",
57
- L_UPPERCASE = "L",
58
- M_UPPERCASE = "M",
59
- N_UPPERCASE = "N",
60
- O_UPPERCASE = "O",
61
- P_UPPERCASE = "P",
62
- Q_UPPERCASE = "Q",
63
- R_UPPERCASE = "R",
64
- S_UPPERCASE = "S",
65
- T_UPPERCASE = "T",
66
- U_UPPERCASE = "U",
67
- V_UPPERCASE = "V",
68
- W_UPPERCASE = "W",
69
- X_UPPERCASE = "X",
70
- Y_UPPERCASE = "Y",
71
- Z_UPPERCASE = "Z",
72
- ZERO = "0",
73
- ONE = "1",
74
- TWO = "2",
75
- THREE = "3",
76
- FOUR = "4",
77
- FIVE = "5",
78
- SIX = "6",
79
- SEVEN = "7",
80
- EIGHT = "8",
81
- NINE = "9"
82
- }
1
+ export declare enum KeyMap {
2
+ Delete = "Delete",
3
+ Backspace = "Backspace",
4
+ Enter = "Enter",
5
+ Left = "ArrowLeft",
6
+ Right = "ArrowRight",
7
+ Up = "ArrowUp",
8
+ Down = "ArrowDown",
9
+ ESC = "Escape",
10
+ TAB = "Tab",
11
+ META = "Meta",
12
+ LEFT_BRACKET = "[",
13
+ RIGHT_BRACKET = "]",
14
+ COMMA = ",",
15
+ PERIOD = ".",
16
+ LEFT_ANGLE_BRACKET = "<",
17
+ RIGHT_ANGLE_BRACKET = ">",
18
+ EQUAL = "=",
19
+ MINUS = "-",
20
+ PLUS = "+",
21
+ A = "a",
22
+ B = "b",
23
+ C = "c",
24
+ D = "d",
25
+ E = "e",
26
+ F = "f",
27
+ G = "g",
28
+ H = "h",
29
+ I = "i",
30
+ J = "j",
31
+ K = "k",
32
+ L = "l",
33
+ M = "m",
34
+ N = "n",
35
+ O = "o",
36
+ P = "p",
37
+ Q = "q",
38
+ R = "r",
39
+ S = "s",
40
+ T = "t",
41
+ U = "u",
42
+ V = "v",
43
+ W = "w",
44
+ X = "x",
45
+ Y = "y",
46
+ Z = "z",
47
+ A_UPPERCASE = "A",
48
+ B_UPPERCASE = "B",
49
+ C_UPPERCASE = "C",
50
+ D_UPPERCASE = "D",
51
+ E_UPPERCASE = "E",
52
+ F_UPPERCASE = "F",
53
+ G_UPPERCASE = "G",
54
+ H_UPPERCASE = "H",
55
+ I_UPPERCASE = "I",
56
+ J_UPPERCASE = "J",
57
+ K_UPPERCASE = "K",
58
+ L_UPPERCASE = "L",
59
+ M_UPPERCASE = "M",
60
+ N_UPPERCASE = "N",
61
+ O_UPPERCASE = "O",
62
+ P_UPPERCASE = "P",
63
+ Q_UPPERCASE = "Q",
64
+ R_UPPERCASE = "R",
65
+ S_UPPERCASE = "S",
66
+ T_UPPERCASE = "T",
67
+ U_UPPERCASE = "U",
68
+ V_UPPERCASE = "V",
69
+ W_UPPERCASE = "W",
70
+ X_UPPERCASE = "X",
71
+ Y_UPPERCASE = "Y",
72
+ Z_UPPERCASE = "Z",
73
+ ZERO = "0",
74
+ ONE = "1",
75
+ TWO = "2",
76
+ THREE = "3",
77
+ FOUR = "4",
78
+ FIVE = "5",
79
+ SIX = "6",
80
+ SEVEN = "7",
81
+ EIGHT = "8",
82
+ NINE = "9"
83
+ }
@@ -1,6 +1,6 @@
1
- export declare enum MoveDirection {
2
- UP = "top",
3
- DOWN = "down",
4
- LEFT = "left",
5
- RIGHT = "right"
6
- }
1
+ export declare enum MoveDirection {
2
+ UP = "top",
3
+ DOWN = "down",
4
+ LEFT = "left",
5
+ RIGHT = "right"
6
+ }
@@ -1,6 +1,6 @@
1
- export declare enum RowFlex {
2
- LEFT = "left",
3
- CENTER = "center",
4
- RIGHT = "right",
5
- ALIGNMENT = "alignment"
6
- }
1
+ export declare enum RowFlex {
2
+ LEFT = "left",
3
+ CENTER = "center",
4
+ RIGHT = "right",
5
+ ALIGNMENT = "alignment"
6
+ }
@@ -1,4 +1,4 @@
1
- export declare enum TableOrder {
2
- ROW = "row",
3
- COL = "col"
4
- }
1
+ export declare enum TableOrder {
2
+ ROW = "row",
3
+ COL = "col"
4
+ }
@@ -1,27 +1,27 @@
1
- import './assets/css/index.css';
2
- import { IEditorOption, IEditorResult } from './interface/Editor';
3
- import { IElement } from './interface/Element';
4
- import { Command } from './core/command/Command';
5
- import { Listener } from './core/listener/Listener';
6
- import { RowFlex } from './dataset/enum/Row';
7
- import { ElementType } from './dataset/enum/Element';
8
- import { Register } from './core/register/Register';
9
- import { IContextMenuContext, IRegisterContextMenu } from './interface/contextmenu/ContextMenu';
10
- import { EditorComponent, EditorMode, PageMode } from './dataset/enum/Editor';
11
- import { EDITOR_COMPONENT } from './dataset/constant/Editor';
12
- import { IWatermark } from './interface/Watermark';
13
- import { ControlType, ImageDisplay } from './dataset/enum/Control';
14
- import { INavigateInfo } from './core/draw/interactive/Search';
15
- import { KeyMap } from './dataset/enum/KeyMap';
16
- import { BlockType } from './dataset/enum/Block';
17
- import { IBlock } from './interface/Block';
18
- import { ILang } from './interface/i18n/I18n';
19
- export default class Editor {
20
- command: Command;
21
- listener: Listener;
22
- register: Register;
23
- destroy: Function;
24
- constructor(container: HTMLDivElement, elementList: IElement[], options?: IEditorOption);
25
- }
26
- export { Editor, RowFlex, EditorMode, ElementType, ControlType, EditorComponent, EDITOR_COMPONENT, PageMode, ImageDisplay, Command, KeyMap, BlockType };
27
- export type { IElement, IEditorOption, IEditorResult, IContextMenuContext, IRegisterContextMenu, IWatermark, INavigateInfo, IBlock, ILang };
1
+ import './assets/css/index.css';
2
+ import { IEditorOption, IEditorResult } from './interface/Editor';
3
+ import { IElement } from './interface/Element';
4
+ import { Command } from './core/command/Command';
5
+ import { Listener } from './core/listener/Listener';
6
+ import { RowFlex } from './dataset/enum/Row';
7
+ import { ElementType } from './dataset/enum/Element';
8
+ import { Register } from './core/register/Register';
9
+ import { IContextMenuContext, IRegisterContextMenu } from './interface/contextmenu/ContextMenu';
10
+ import { EditorComponent, EditorMode, PageMode } from './dataset/enum/Editor';
11
+ import { EDITOR_COMPONENT } from './dataset/constant/Editor';
12
+ import { IWatermark } from './interface/Watermark';
13
+ import { ControlType, ImageDisplay } from './dataset/enum/Control';
14
+ import { INavigateInfo } from './core/draw/interactive/Search';
15
+ import { KeyMap } from './dataset/enum/KeyMap';
16
+ import { BlockType } from './dataset/enum/Block';
17
+ import { IBlock } from './interface/Block';
18
+ import { ILang } from './interface/i18n/I18n';
19
+ export default class Editor {
20
+ command: Command;
21
+ listener: Listener;
22
+ register: Register;
23
+ destroy: Function;
24
+ constructor(container: HTMLDivElement, elementList: IElement[], options?: IEditorOption);
25
+ }
26
+ export { Editor, RowFlex, EditorMode, ElementType, ControlType, EditorComponent, EDITOR_COMPONENT, PageMode, ImageDisplay, Command, KeyMap, BlockType };
27
+ export type { IElement, IEditorOption, IEditorResult, IContextMenuContext, IRegisterContextMenu, IWatermark, INavigateInfo, IBlock, ILang };
@@ -1,12 +1,12 @@
1
- import { BlockType } from '../dataset/enum/Block';
2
- export interface IIFrameBlock {
3
- src: string;
4
- }
5
- export interface IVideoBlock {
6
- src: string;
7
- }
8
- export interface IBlock {
9
- type: BlockType;
10
- iframeBlock?: IIFrameBlock;
11
- videoBlock?: IVideoBlock;
12
- }
1
+ import { BlockType } from '../dataset/enum/Block';
2
+ export interface IIFrameBlock {
3
+ src: string;
4
+ }
5
+ export interface IVideoBlock {
6
+ src: string;
7
+ }
8
+ export interface IBlock {
9
+ type: BlockType;
10
+ iframeBlock?: IIFrameBlock;
11
+ videoBlock?: IVideoBlock;
12
+ }
@@ -1,13 +1,13 @@
1
- export interface ICheckbox {
2
- value: boolean | null;
3
- code?: string;
4
- disabled?: boolean;
5
- }
6
- export interface ICheckboxOption {
7
- width?: number;
8
- height?: number;
9
- gap?: number;
10
- lineWidth?: number;
11
- fillStyle?: string;
12
- fontStyle?: string;
13
- }
1
+ export interface ICheckbox {
2
+ value: boolean | null;
3
+ code?: string;
4
+ disabled?: boolean;
5
+ }
6
+ export interface ICheckboxOption {
7
+ width?: number;
8
+ height?: number;
9
+ gap?: number;
10
+ lineWidth?: number;
11
+ fillStyle?: string;
12
+ fontStyle?: string;
13
+ }
@@ -1,5 +1,8 @@
1
- export declare type Primitive = string | number | boolean | bigint | symbol | undefined | null;
2
- export declare type Builtin = Primitive | Function | Date | Error | RegExp;
3
- export declare type DeepRequired<T> = T extends Error ? Required<T> : T extends Builtin ? T : T extends Map<infer K, infer V> ? Map<DeepRequired<K>, DeepRequired<V>> : T extends ReadonlyMap<infer K, infer V> ? ReadonlyMap<DeepRequired<K>, DeepRequired<V>> : T extends WeakMap<infer K, infer V> ? WeakMap<DeepRequired<K>, DeepRequired<V>> : T extends Set<infer U> ? Set<DeepRequired<U>> : T extends ReadonlySet<infer U> ? ReadonlySet<DeepRequired<U>> : T extends WeakSet<infer U> ? WeakSet<DeepRequired<U>> : T extends Promise<infer U> ? Promise<DeepRequired<U>> : T extends {} ? {
4
- [K in keyof T]-?: DeepRequired<T[K]>;
5
- } : Required<T>;
1
+ export declare type Primitive = string | number | boolean | bigint | symbol | undefined | null;
2
+ export declare type Builtin = Primitive | Function | Date | Error | RegExp;
3
+ export declare type DeepRequired<T> = T extends Error ? Required<T> : T extends Builtin ? T : T extends Map<infer K, infer V> ? Map<DeepRequired<K>, DeepRequired<V>> : T extends ReadonlyMap<infer K, infer V> ? ReadonlyMap<DeepRequired<K>, DeepRequired<V>> : T extends WeakMap<infer K, infer V> ? WeakMap<DeepRequired<K>, DeepRequired<V>> : T extends Set<infer U> ? Set<DeepRequired<U>> : T extends ReadonlySet<infer U> ? ReadonlySet<DeepRequired<U>> : T extends WeakSet<infer U> ? WeakSet<DeepRequired<U>> : T extends Promise<infer U> ? Promise<DeepRequired<U>> : T extends {} ? {
4
+ [K in keyof T]-?: DeepRequired<T[K]>;
5
+ } : Required<T>;
6
+ export declare type DeepPartial<T> = {
7
+ [P in keyof T]?: DeepPartial<T[P]>;
8
+ };