@agile_jy/word-editor 0.0.1

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 (230) hide show
  1. package/CHANGELOG.md +2543 -0
  2. package/LICENSE +21 -0
  3. package/README.md +110 -0
  4. package/dist/canvas-editor.es.js +25197 -0
  5. package/dist/canvas-editor.es.js.map +1 -0
  6. package/dist/canvas-editor.umd.js +97 -0
  7. package/dist/canvas-editor.umd.js.map +1 -0
  8. package/dist/src/editor/core/actuator/Actuator.d.ts +7 -0
  9. package/dist/src/editor/core/actuator/handlers/positionContextChange.d.ts +3 -0
  10. package/dist/src/editor/core/command/Command.d.ts +147 -0
  11. package/dist/src/editor/core/command/CommandAdapt.d.ts +190 -0
  12. package/dist/src/editor/core/contextmenu/ContextMenu.d.ts +31 -0
  13. package/dist/src/editor/core/contextmenu/menus/controlMenus.d.ts +2 -0
  14. package/dist/src/editor/core/contextmenu/menus/globalMenus.d.ts +2 -0
  15. package/dist/src/editor/core/contextmenu/menus/hyperlinkMenus.d.ts +2 -0
  16. package/dist/src/editor/core/contextmenu/menus/imageMenus.d.ts +2 -0
  17. package/dist/src/editor/core/contextmenu/menus/tableMenus.d.ts +2 -0
  18. package/dist/src/editor/core/cursor/Cursor.d.ts +41 -0
  19. package/dist/src/editor/core/cursor/CursorAgent.d.ts +16 -0
  20. package/dist/src/editor/core/draw/Draw.d.ts +252 -0
  21. package/dist/src/editor/core/draw/control/Control.d.ts +73 -0
  22. package/dist/src/editor/core/draw/control/checkbox/CheckboxControl.d.ts +16 -0
  23. package/dist/src/editor/core/draw/control/date/DateControl.d.ts +24 -0
  24. package/dist/src/editor/core/draw/control/interactive/ControlSearch.d.ts +20 -0
  25. package/dist/src/editor/core/draw/control/number/Calculator.d.ts +16 -0
  26. package/dist/src/editor/core/draw/control/number/NumberControl.d.ts +13 -0
  27. package/dist/src/editor/core/draw/control/radio/RadioControl.d.ts +5 -0
  28. package/dist/src/editor/core/draw/control/richtext/Border.d.ts +10 -0
  29. package/dist/src/editor/core/draw/control/select/SelectControl.d.ts +28 -0
  30. package/dist/src/editor/core/draw/control/text/TextControl.d.ts +18 -0
  31. package/dist/src/editor/core/draw/frame/Background.d.ts +11 -0
  32. package/dist/src/editor/core/draw/frame/Badge.d.ts +14 -0
  33. package/dist/src/editor/core/draw/frame/Footer.d.ts +27 -0
  34. package/dist/src/editor/core/draw/frame/Header.d.ts +27 -0
  35. package/dist/src/editor/core/draw/frame/LineNumber.d.ts +7 -0
  36. package/dist/src/editor/core/draw/frame/Margin.d.ts +7 -0
  37. package/dist/src/editor/core/draw/frame/PageBorder.d.ts +9 -0
  38. package/dist/src/editor/core/draw/frame/PageNumber.d.ts +9 -0
  39. package/dist/src/editor/core/draw/frame/Placeholder.d.ts +20 -0
  40. package/dist/src/editor/core/draw/frame/Watermark.d.ts +10 -0
  41. package/dist/src/editor/core/draw/graffiti/Graffiti.d.ts +19 -0
  42. package/dist/src/editor/core/draw/interactive/Area.d.ts +27 -0
  43. package/dist/src/editor/core/draw/interactive/Group.d.ts +18 -0
  44. package/dist/src/editor/core/draw/interactive/Search.d.ts +30 -0
  45. package/dist/src/editor/core/draw/particle/CheckboxParticle.d.ts +18 -0
  46. package/dist/src/editor/core/draw/particle/HyperlinkParticle.d.ts +17 -0
  47. package/dist/src/editor/core/draw/particle/ImageParticle.d.ts +23 -0
  48. package/dist/src/editor/core/draw/particle/LabelParticle.d.ts +8 -0
  49. package/dist/src/editor/core/draw/particle/LineBreakParticle.d.ts +10 -0
  50. package/dist/src/editor/core/draw/particle/ListParticle.d.ts +20 -0
  51. package/dist/src/editor/core/draw/particle/PageBreakParticle.d.ts +9 -0
  52. package/dist/src/editor/core/draw/particle/RadioParticle.d.ts +18 -0
  53. package/dist/src/editor/core/draw/particle/SeparatorParticle.d.ts +7 -0
  54. package/dist/src/editor/core/draw/particle/SubscriptParticle.d.ts +5 -0
  55. package/dist/src/editor/core/draw/particle/SuperscriptParticle.d.ts +5 -0
  56. package/dist/src/editor/core/draw/particle/TextParticle.d.ts +29 -0
  57. package/dist/src/editor/core/draw/particle/WhiteSpaceParticle.d.ts +7 -0
  58. package/dist/src/editor/core/draw/particle/block/BlockParticle.d.ts +14 -0
  59. package/dist/src/editor/core/draw/particle/block/modules/BaseBlock.d.ts +33 -0
  60. package/dist/src/editor/core/draw/particle/block/modules/IFrameBlock.d.ts +9 -0
  61. package/dist/src/editor/core/draw/particle/block/modules/VideoBlock.d.ts +8 -0
  62. package/dist/src/editor/core/draw/particle/date/DateParticle.d.ts +13 -0
  63. package/dist/src/editor/core/draw/particle/date/DatePicker.d.ts +64 -0
  64. package/dist/src/editor/core/draw/particle/latex/LaTexParticle.d.ts +7 -0
  65. package/dist/src/editor/core/draw/particle/latex/utils/LaTexUtils.d.ts +47 -0
  66. package/dist/src/editor/core/draw/particle/latex/utils/hershey.d.ts +10 -0
  67. package/dist/src/editor/core/draw/particle/latex/utils/symbols.d.ts +8 -0
  68. package/dist/src/editor/core/draw/particle/previewer/Previewer.d.ts +47 -0
  69. package/dist/src/editor/core/draw/particle/table/TableOperate.d.ts +32 -0
  70. package/dist/src/editor/core/draw/particle/table/TableParticle.d.ts +24 -0
  71. package/dist/src/editor/core/draw/particle/table/TableTool.d.ts +31 -0
  72. package/dist/src/editor/core/draw/richtext/AbstractRichText.d.ts +11 -0
  73. package/dist/src/editor/core/draw/richtext/Highlight.d.ts +7 -0
  74. package/dist/src/editor/core/draw/richtext/Strikeout.d.ts +7 -0
  75. package/dist/src/editor/core/draw/richtext/Underline.d.ts +10 -0
  76. package/dist/src/editor/core/event/CanvasEvent.d.ts +52 -0
  77. package/dist/src/editor/core/event/GlobalEvent.d.ts +26 -0
  78. package/dist/src/editor/core/event/eventbus/EventBus.d.ts +9 -0
  79. package/dist/src/editor/core/event/handlers/click.d.ts +11 -0
  80. package/dist/src/editor/core/event/handlers/composition.d.ts +8 -0
  81. package/dist/src/editor/core/event/handlers/copy.d.ts +3 -0
  82. package/dist/src/editor/core/event/handlers/cut.d.ts +2 -0
  83. package/dist/src/editor/core/event/handlers/drag.d.ts +6 -0
  84. package/dist/src/editor/core/event/handlers/drop.d.ts +2 -0
  85. package/dist/src/editor/core/event/handlers/input.d.ts +3 -0
  86. package/dist/src/editor/core/event/handlers/keydown/backspace.d.ts +2 -0
  87. package/dist/src/editor/core/event/handlers/keydown/delete.d.ts +2 -0
  88. package/dist/src/editor/core/event/handlers/keydown/enter.d.ts +2 -0
  89. package/dist/src/editor/core/event/handlers/keydown/index.d.ts +2 -0
  90. package/dist/src/editor/core/event/handlers/keydown/left.d.ts +2 -0
  91. package/dist/src/editor/core/event/handlers/keydown/right.d.ts +2 -0
  92. package/dist/src/editor/core/event/handlers/keydown/tab.d.ts +2 -0
  93. package/dist/src/editor/core/event/handlers/keydown/updown.d.ts +2 -0
  94. package/dist/src/editor/core/event/handlers/mousedown.d.ts +7 -0
  95. package/dist/src/editor/core/event/handlers/mouseleave.d.ts +2 -0
  96. package/dist/src/editor/core/event/handlers/mousemove.d.ts +2 -0
  97. package/dist/src/editor/core/event/handlers/mouseup.d.ts +2 -0
  98. package/dist/src/editor/core/event/handlers/paste.d.ts +8 -0
  99. package/dist/src/editor/core/history/HistoryManager.d.ts +15 -0
  100. package/dist/src/editor/core/i18n/I18n.d.ts +12 -0
  101. package/dist/src/editor/core/listener/Listener.d.ts +15 -0
  102. package/dist/src/editor/core/observer/ImageObserver.d.ts +7 -0
  103. package/dist/src/editor/core/observer/MouseObserver.d.ts +13 -0
  104. package/dist/src/editor/core/observer/ScrollObserver.d.ts +20 -0
  105. package/dist/src/editor/core/observer/SelectionObserver.d.ts +22 -0
  106. package/dist/src/editor/core/override/Override.d.ts +8 -0
  107. package/dist/src/editor/core/plugin/Plugin.d.ts +7 -0
  108. package/dist/src/editor/core/position/Position.d.ts +37 -0
  109. package/dist/src/editor/core/range/RangeManager.d.ts +45 -0
  110. package/dist/src/editor/core/register/Register.d.ts +20 -0
  111. package/dist/src/editor/core/shortcut/Shortcut.d.ts +16 -0
  112. package/dist/src/editor/core/shortcut/keys/listKeys.d.ts +2 -0
  113. package/dist/src/editor/core/shortcut/keys/richtextKeys.d.ts +2 -0
  114. package/dist/src/editor/core/shortcut/keys/titleKeys.d.ts +2 -0
  115. package/dist/src/editor/core/worker/WorkerManager.d.ts +16 -0
  116. package/dist/src/editor/core/worker/works/catalog.d.ts +1 -0
  117. package/dist/src/editor/core/worker/works/group.d.ts +1 -0
  118. package/dist/src/editor/core/worker/works/value.d.ts +1 -0
  119. package/dist/src/editor/core/worker/works/wordCount.d.ts +1 -0
  120. package/dist/src/editor/core/zone/Zone.d.ts +21 -0
  121. package/dist/src/editor/core/zone/ZoneTip.d.ts +17 -0
  122. package/dist/src/editor/dataset/constant/Background.d.ts +2 -0
  123. package/dist/src/editor/dataset/constant/Badge.d.ts +2 -0
  124. package/dist/src/editor/dataset/constant/Checkbox.d.ts +2 -0
  125. package/dist/src/editor/dataset/constant/Common.d.ts +21 -0
  126. package/dist/src/editor/dataset/constant/ContextMenu.d.ts +60 -0
  127. package/dist/src/editor/dataset/constant/Control.d.ts +2 -0
  128. package/dist/src/editor/dataset/constant/Cursor.d.ts +3 -0
  129. package/dist/src/editor/dataset/constant/Editor.d.ts +6 -0
  130. package/dist/src/editor/dataset/constant/Element.d.ts +21 -0
  131. package/dist/src/editor/dataset/constant/Footer.d.ts +2 -0
  132. package/dist/src/editor/dataset/constant/Graffiti.d.ts +2 -0
  133. package/dist/src/editor/dataset/constant/Group.d.ts +2 -0
  134. package/dist/src/editor/dataset/constant/Header.d.ts +2 -0
  135. package/dist/src/editor/dataset/constant/ImgCaption.d.ts +2 -0
  136. package/dist/src/editor/dataset/constant/Label.d.ts +2 -0
  137. package/dist/src/editor/dataset/constant/LineBreak.d.ts +2 -0
  138. package/dist/src/editor/dataset/constant/LineNumber.d.ts +2 -0
  139. package/dist/src/editor/dataset/constant/List.d.ts +6 -0
  140. package/dist/src/editor/dataset/constant/PageBorder.d.ts +2 -0
  141. package/dist/src/editor/dataset/constant/PageBreak.d.ts +2 -0
  142. package/dist/src/editor/dataset/constant/PageNumber.d.ts +6 -0
  143. package/dist/src/editor/dataset/constant/Placeholder.d.ts +2 -0
  144. package/dist/src/editor/dataset/constant/Radio.d.ts +2 -0
  145. package/dist/src/editor/dataset/constant/Regular.d.ts +10 -0
  146. package/dist/src/editor/dataset/constant/Separator.d.ts +2 -0
  147. package/dist/src/editor/dataset/constant/Shortcut.d.ts +3 -0
  148. package/dist/src/editor/dataset/constant/Table.d.ts +2 -0
  149. package/dist/src/editor/dataset/constant/Title.d.ts +6 -0
  150. package/dist/src/editor/dataset/constant/Watermark.d.ts +2 -0
  151. package/dist/src/editor/dataset/constant/WhiteSpace.d.ts +2 -0
  152. package/dist/src/editor/dataset/constant/Zone.d.ts +2 -0
  153. package/dist/src/editor/dataset/enum/Area.d.ts +5 -0
  154. package/dist/src/editor/dataset/enum/Background.d.ts +10 -0
  155. package/dist/src/editor/dataset/enum/Block.d.ts +4 -0
  156. package/dist/src/editor/dataset/enum/Common.d.ts +26 -0
  157. package/dist/src/editor/dataset/enum/Control.d.ts +32 -0
  158. package/dist/src/editor/dataset/enum/Editor.d.ts +44 -0
  159. package/dist/src/editor/dataset/enum/Element.d.ts +21 -0
  160. package/dist/src/editor/dataset/enum/ElementStyle.d.ts +12 -0
  161. package/dist/src/editor/dataset/enum/Event.d.ts +5 -0
  162. package/dist/src/editor/dataset/enum/KeyMap.d.ts +83 -0
  163. package/dist/src/editor/dataset/enum/LineNumber.d.ts +4 -0
  164. package/dist/src/editor/dataset/enum/List.d.ts +20 -0
  165. package/dist/src/editor/dataset/enum/Observer.d.ts +6 -0
  166. package/dist/src/editor/dataset/enum/Row.d.ts +7 -0
  167. package/dist/src/editor/dataset/enum/Text.d.ts +12 -0
  168. package/dist/src/editor/dataset/enum/Title.d.ts +8 -0
  169. package/dist/src/editor/dataset/enum/VerticalAlign.d.ts +5 -0
  170. package/dist/src/editor/dataset/enum/Watermark.d.ts +4 -0
  171. package/dist/src/editor/dataset/enum/table/Table.d.ts +17 -0
  172. package/dist/src/editor/dataset/enum/table/TableTool.d.ts +4 -0
  173. package/dist/src/editor/index.d.ts +59 -0
  174. package/dist/src/editor/interface/Area.d.ts +55 -0
  175. package/dist/src/editor/interface/Background.d.ts +8 -0
  176. package/dist/src/editor/interface/Badge.d.ts +15 -0
  177. package/dist/src/editor/interface/Block.d.ts +15 -0
  178. package/dist/src/editor/interface/Catalog.d.ts +9 -0
  179. package/dist/src/editor/interface/Checkbox.d.ts +15 -0
  180. package/dist/src/editor/interface/Command.d.ts +3 -0
  181. package/dist/src/editor/interface/Common.d.ts +14 -0
  182. package/dist/src/editor/interface/Control.d.ts +198 -0
  183. package/dist/src/editor/interface/Cursor.d.ts +7 -0
  184. package/dist/src/editor/interface/Draw.d.ts +74 -0
  185. package/dist/src/editor/interface/Editor.d.ts +143 -0
  186. package/dist/src/editor/interface/Element.d.ts +234 -0
  187. package/dist/src/editor/interface/Event.d.ts +22 -0
  188. package/dist/src/editor/interface/EventBus.d.ts +26 -0
  189. package/dist/src/editor/interface/Footer.d.ts +8 -0
  190. package/dist/src/editor/interface/Graffiti.d.ts +13 -0
  191. package/dist/src/editor/interface/Group.d.ts +8 -0
  192. package/dist/src/editor/interface/Header.d.ts +8 -0
  193. package/dist/src/editor/interface/Label.d.ts +7 -0
  194. package/dist/src/editor/interface/LineBreak.d.ts +5 -0
  195. package/dist/src/editor/interface/LineNumber.d.ts +9 -0
  196. package/dist/src/editor/interface/Listener.d.ts +66 -0
  197. package/dist/src/editor/interface/Margin.d.ts +1 -0
  198. package/dist/src/editor/interface/PageBorder.d.ts +7 -0
  199. package/dist/src/editor/interface/PageBreak.d.ts +5 -0
  200. package/dist/src/editor/interface/PageNumber.d.ts +15 -0
  201. package/dist/src/editor/interface/Placeholder.d.ts +7 -0
  202. package/dist/src/editor/interface/Plugin.d.ts +3 -0
  203. package/dist/src/editor/interface/Position.d.ts +103 -0
  204. package/dist/src/editor/interface/Previewer.d.ts +13 -0
  205. package/dist/src/editor/interface/Radio.d.ts +15 -0
  206. package/dist/src/editor/interface/Range.d.ts +44 -0
  207. package/dist/src/editor/interface/Row.d.ts +23 -0
  208. package/dist/src/editor/interface/Search.d.ts +30 -0
  209. package/dist/src/editor/interface/Separator.d.ts +4 -0
  210. package/dist/src/editor/interface/Text.d.ts +13 -0
  211. package/dist/src/editor/interface/Title.d.ts +26 -0
  212. package/dist/src/editor/interface/Watermark.d.ts +15 -0
  213. package/dist/src/editor/interface/WhiteSpace.d.ts +5 -0
  214. package/dist/src/editor/interface/Zone.d.ts +3 -0
  215. package/dist/src/editor/interface/contextmenu/ContextMenu.d.ts +73 -0
  216. package/dist/src/editor/interface/i18n/I18n.d.ts +6 -0
  217. package/dist/src/editor/interface/shortcut/Shortcut.d.ts +13 -0
  218. package/dist/src/editor/interface/table/Colgroup.d.ts +4 -0
  219. package/dist/src/editor/interface/table/Table.d.ts +8 -0
  220. package/dist/src/editor/interface/table/Td.d.ts +35 -0
  221. package/dist/src/editor/interface/table/Tr.d.ts +10 -0
  222. package/dist/src/editor/utils/clipboard.d.ts +13 -0
  223. package/dist/src/editor/utils/element.d.ts +57 -0
  224. package/dist/src/editor/utils/hotkey.d.ts +1 -0
  225. package/dist/src/editor/utils/index.d.ts +34 -0
  226. package/dist/src/editor/utils/option.d.ts +3 -0
  227. package/dist/src/editor/utils/paragraph.d.ts +8 -0
  228. package/dist/src/editor/utils/print.d.ts +7 -0
  229. package/dist/src/editor/utils/ua.d.ts +4 -0
  230. package/package.json +77 -0
@@ -0,0 +1,60 @@
1
+ export declare const NAME_PLACEHOLDER: {
2
+ SELECTED_TEXT: string;
3
+ };
4
+ export declare const INTERNAL_CONTEXT_MENU_KEY: {
5
+ GLOBAL: {
6
+ CUT: string;
7
+ COPY: string;
8
+ PASTE: string;
9
+ SELECT_ALL: string;
10
+ PRINT: string;
11
+ };
12
+ CONTROL: {
13
+ DELETE: string;
14
+ };
15
+ HYPERLINK: {
16
+ DELETE: string;
17
+ CANCEL: string;
18
+ EDIT: string;
19
+ };
20
+ IMAGE: {
21
+ CHANGE: string;
22
+ SAVE_AS: string;
23
+ TEXT_WRAP: string;
24
+ TEXT_WRAP_EMBED: string;
25
+ TEXT_WRAP_UP_DOWN: string;
26
+ TEXT_WRAP_SURROUND: string;
27
+ TEXT_WRAP_FLOAT_TOP: string;
28
+ TEXT_WRAP_FLOAT_BOTTOM: string;
29
+ };
30
+ TABLE: {
31
+ BORDER: string;
32
+ BORDER_ALL: string;
33
+ BORDER_EMPTY: string;
34
+ BORDER_DASH: string;
35
+ BORDER_EXTERNAL: string;
36
+ BORDER_INTERNAL: string;
37
+ BORDER_TD: string;
38
+ BORDER_TD_TOP: string;
39
+ BORDER_TD_RIGHT: string;
40
+ BORDER_TD_BOTTOM: string;
41
+ BORDER_TD_LEFT: string;
42
+ BORDER_TD_FORWARD: string;
43
+ BORDER_TD_BACK: string;
44
+ VERTICAL_ALIGN: string;
45
+ VERTICAL_ALIGN_TOP: string;
46
+ VERTICAL_ALIGN_MIDDLE: string;
47
+ VERTICAL_ALIGN_BOTTOM: string;
48
+ INSERT_ROW_COL: string;
49
+ INSERT_TOP_ROW: string;
50
+ INSERT_BOTTOM_ROW: string;
51
+ INSERT_LEFT_COL: string;
52
+ INSERT_RIGHT_COL: string;
53
+ DELETE_ROW_COL: string;
54
+ DELETE_ROW: string;
55
+ DELETE_COL: string;
56
+ DELETE_TABLE: string;
57
+ MERGE_CELL: string;
58
+ CANCEL_MERGE_CELL: string;
59
+ };
60
+ };
@@ -0,0 +1,2 @@
1
+ import { IControlOption } from '../../interface/Control';
2
+ export declare const defaultControlOption: Readonly<Required<IControlOption>>;
@@ -0,0 +1,3 @@
1
+ import { ICursorOption } from '../../interface/Cursor';
2
+ export declare const CURSOR_AGENT_OFFSET_HEIGHT = 12;
3
+ export declare const defaultCursorOption: Readonly<Required<ICursorOption>>;
@@ -0,0 +1,6 @@
1
+ import { DeepRequired } from '../../interface/Common';
2
+ import { IModeRule } from '../../interface/Editor';
3
+ export declare const EDITOR_COMPONENT = "editor-component";
4
+ export declare const EDITOR_PREFIX = "ce";
5
+ export declare const EDITOR_CLIPBOARD: string;
6
+ export declare const defaultModeRuleOption: Readonly<DeepRequired<IModeRule>>;
@@ -0,0 +1,21 @@
1
+ import { ElementType } from '../enum/Element';
2
+ import { IElement } from '../../interface/Element';
3
+ import { ITd } from '../../interface/table/Td';
4
+ import { IControlStyle } from '../../interface/Control';
5
+ export declare const EDITOR_ELEMENT_STYLE_ATTR: Array<keyof IElement>;
6
+ export declare const EDITOR_ROW_ATTR: Array<keyof IElement>;
7
+ export declare const EDITOR_ELEMENT_COPY_ATTR: Array<keyof IElement>;
8
+ export declare const EDITOR_ELEMENT_ZIP_ATTR: Array<keyof IElement>;
9
+ export declare const TABLE_TD_ZIP_ATTR: Array<keyof ITd>;
10
+ export declare const TABLE_CONTEXT_ATTR: Array<keyof IElement>;
11
+ export declare const TITLE_CONTEXT_ATTR: Array<keyof IElement>;
12
+ export declare const LIST_CONTEXT_ATTR: Array<keyof IElement>;
13
+ export declare const CONTROL_CONTEXT_ATTR: Array<keyof IElement>;
14
+ export declare const CONTROL_STYLE_ATTR: Array<keyof IControlStyle>;
15
+ export declare const AREA_CONTEXT_ATTR: Array<keyof IElement>;
16
+ export declare const EDITOR_ELEMENT_CONTEXT_ATTR: Array<keyof IElement>;
17
+ export declare const TEXTLIKE_ELEMENT_TYPE: ElementType[];
18
+ export declare const IMAGE_ELEMENT_TYPE: ElementType[];
19
+ export declare const BLOCK_ELEMENT_TYPE: ElementType[];
20
+ export declare const INLINE_NODE_NAME: string[];
21
+ export declare const VIRTUAL_ELEMENT_TYPE: ElementType[];
@@ -0,0 +1,2 @@
1
+ import { IFooter } from '../../interface/Footer';
2
+ export declare const defaultFooterOption: Readonly<Required<IFooter>>;
@@ -0,0 +1,2 @@
1
+ import { IGraffitiOption } from '../../interface/Graffiti';
2
+ export declare const defaultGraffitiOption: Readonly<Required<IGraffitiOption>>;
@@ -0,0 +1,2 @@
1
+ import { IGroup } from '../../interface/Group';
2
+ export declare const defaultGroupOption: Readonly<Required<IGroup>>;
@@ -0,0 +1,2 @@
1
+ import { IHeader } from '../../interface/Header';
2
+ export declare const defaultHeaderOption: Readonly<Required<IHeader>>;
@@ -0,0 +1,2 @@
1
+ import { IImgCaptionOption } from '../../interface/Element';
2
+ export declare const defaultImgCaptionOption: Readonly<Required<IImgCaptionOption>>;
@@ -0,0 +1,2 @@
1
+ import { ILabelOption } from '../../interface/Label';
2
+ export declare const defaultLabelOption: Readonly<Required<ILabelOption>>;
@@ -0,0 +1,2 @@
1
+ import { ILineBreakOption } from '../../interface/LineBreak';
2
+ export declare const defaultLineBreak: Readonly<Required<ILineBreakOption>>;
@@ -0,0 +1,2 @@
1
+ import { ILineNumberOption } from '../../interface/LineNumber';
2
+ export declare const defaultLineNumberOption: Readonly<Required<ILineNumberOption>>;
@@ -0,0 +1,6 @@
1
+ import { ListStyle, ListType, UlStyle } from '../enum/List';
2
+ import { IListOption } from '../../interface/Element';
3
+ export declare const defaultListOption: Readonly<Required<IListOption>>;
4
+ export declare const ulStyleMapping: Record<UlStyle, string>;
5
+ export declare const listTypeElementMapping: Record<ListType, string>;
6
+ export declare const listStyleCSSMapping: Record<ListStyle, string>;
@@ -0,0 +1,2 @@
1
+ import { IPageBorderOption } from '../../interface/PageBorder';
2
+ export declare const defaultPageBorderOption: Readonly<Required<IPageBorderOption>>;
@@ -0,0 +1,2 @@
1
+ import { IPageBreak } from '../../interface/PageBreak';
2
+ export declare const defaultPageBreakOption: Readonly<Required<IPageBreak>>;
@@ -0,0 +1,6 @@
1
+ import { IPageNumber } from '../../interface/PageNumber';
2
+ export declare const FORMAT_PLACEHOLDER: {
3
+ PAGE_NO: string;
4
+ PAGE_COUNT: string;
5
+ };
6
+ export declare const defaultPageNumberOption: Readonly<Required<IPageNumber>>;
@@ -0,0 +1,2 @@
1
+ import { IPlaceholder } from '../../interface/Placeholder';
2
+ export declare const defaultPlaceholderOption: Readonly<Required<IPlaceholder>>;
@@ -0,0 +1,2 @@
1
+ import { IRadioOption } from '../../interface/Radio';
2
+ export declare const defaultRadioOption: Readonly<Required<IRadioOption>>;
@@ -0,0 +1,10 @@
1
+ export declare const NUMBER_REG: RegExp;
2
+ export declare const NUMBER_LIKE_REG: RegExp;
3
+ export declare const CHINESE_REG: RegExp;
4
+ export declare const SURROGATE_PAIR_REG: RegExp;
5
+ export declare const EMOJI_REG: RegExp;
6
+ export declare const UNICODE_SYMBOL_REG: RegExp;
7
+ export declare const PUNCTUATION_REG: RegExp;
8
+ export declare const START_LINE_BREAK_REG: RegExp;
9
+ export declare const NON_NUMBER_STR_REG: RegExp;
10
+ export declare const WHITE_SPACE_REG: RegExp;
@@ -0,0 +1,2 @@
1
+ import { ISeparatorOption } from '../../interface/Separator';
2
+ export declare const defaultSeparatorOption: Readonly<Required<ISeparatorOption>>;
@@ -0,0 +1,3 @@
1
+ export declare const INTERNAL_SHORTCUT_KEY: {
2
+ PAGE_SCALE: string;
3
+ };
@@ -0,0 +1,2 @@
1
+ import { ITableOption } from '../../interface/table/Table';
2
+ export declare const defaultTableOption: Readonly<Required<ITableOption>>;
@@ -0,0 +1,6 @@
1
+ import { ITitleOption, ITitleSizeOption } from '../../interface/Title';
2
+ import { TitleLevel } from '../enum/Title';
3
+ export declare const defaultTitleOption: Readonly<Required<ITitleOption>>;
4
+ export declare const titleSizeMapping: Record<TitleLevel, keyof ITitleSizeOption>;
5
+ export declare const titleOrderNumberMapping: Record<TitleLevel, number>;
6
+ export declare const titleNodeNameMapping: Record<string, TitleLevel>;
@@ -0,0 +1,2 @@
1
+ import { IWatermark } from '../../interface/Watermark';
2
+ export declare const defaultWatermarkOption: Readonly<Required<IWatermark>>;
@@ -0,0 +1,2 @@
1
+ import { IWhiteSpaceOption } from '../../interface/WhiteSpace';
2
+ export declare const defaultWhiteSpaceOption: Readonly<Required<IWhiteSpaceOption>>;
@@ -0,0 +1,2 @@
1
+ import { IZoneOption } from '../../interface/Zone';
2
+ export declare const defaultZoneOption: Readonly<Required<IZoneOption>>;
@@ -0,0 +1,5 @@
1
+ export declare enum AreaMode {
2
+ EDIT = "edit",
3
+ READONLY = "readonly",
4
+ FORM = "form"
5
+ }
@@ -0,0 +1,10 @@
1
+ export declare enum BackgroundSize {
2
+ CONTAIN = "contain",
3
+ COVER = "cover"
4
+ }
5
+ export declare enum BackgroundRepeat {
6
+ REPEAT = "repeat",
7
+ NO_REPEAT = "no-repeat",
8
+ REPEAT_X = "repeat-x",
9
+ REPEAT_Y = "repeat-y"
10
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum BlockType {
2
+ IFRAME = "iframe",
3
+ VIDEO = "video"
4
+ }
@@ -0,0 +1,26 @@
1
+ export declare enum MaxHeightRatio {
2
+ HALF = "half",
3
+ ONE_THIRD = "one-third",
4
+ QUARTER = "quarter"
5
+ }
6
+ export declare enum NumberType {
7
+ ARABIC = "arabic",
8
+ CHINESE = "chinese"
9
+ }
10
+ export declare enum ImageDisplay {
11
+ INLINE = "inline",
12
+ BLOCK = "block",
13
+ SURROUND = "surround",
14
+ FLOAT_TOP = "float-top",
15
+ FLOAT_BOTTOM = "float-bottom"
16
+ }
17
+ export declare enum LocationPosition {
18
+ BEFORE = "before",
19
+ AFTER = "after",
20
+ OUTER_BEFORE = "outer-before",
21
+ OUTER_AFTER = "outer-after"
22
+ }
23
+ export declare enum FlexDirection {
24
+ ROW = "row",
25
+ COLUMN = "column"
26
+ }
@@ -0,0 +1,32 @@
1
+ export declare enum ControlType {
2
+ TEXT = "text",
3
+ SELECT = "select",
4
+ CHECKBOX = "checkbox",
5
+ RADIO = "radio",
6
+ DATE = "date",
7
+ NUMBER = "number"
8
+ }
9
+ export declare enum ControlComponent {
10
+ PREFIX = "prefix",
11
+ POSTFIX = "postfix",
12
+ PRE_TEXT = "preText",
13
+ POST_TEXT = "postText",
14
+ PLACEHOLDER = "placeholder",
15
+ VALUE = "value",
16
+ CHECKBOX = "checkbox",
17
+ RADIO = "radio"
18
+ }
19
+ export declare enum ControlIndentation {
20
+ ROW_START = "rowStart",
21
+ VALUE_START = "valueStart"
22
+ }
23
+ export declare enum ControlState {
24
+ ACTIVE = "active",
25
+ INACTIVE = "inactive"
26
+ }
27
+ export declare enum CalculatorButtonType {
28
+ NUMBER = "number",
29
+ OPERATOR = "operator",
30
+ UTILITY = "utility",
31
+ EQUAL = "equal"
32
+ }
@@ -0,0 +1,44 @@
1
+ export declare enum EditorComponent {
2
+ COMPONENT = "component",
3
+ MENU = "menu",
4
+ MAIN = "main",
5
+ FOOTER = "footer",
6
+ CONTEXTMENU = "contextmenu",
7
+ POPUP = "popup",
8
+ CATALOG = "catalog",
9
+ COMMENT = "comment"
10
+ }
11
+ export declare enum EditorContext {
12
+ PAGE = "page",
13
+ TABLE = "table"
14
+ }
15
+ export declare enum EditorMode {
16
+ EDIT = "edit",
17
+ CLEAN = "clean",
18
+ READONLY = "readonly",
19
+ FORM = "form",
20
+ PRINT = "print",
21
+ DESIGN = "design",
22
+ GRAFFITI = "graffiti"
23
+ }
24
+ export declare enum EditorZone {
25
+ HEADER = "header",
26
+ MAIN = "main",
27
+ FOOTER = "footer"
28
+ }
29
+ export declare enum PageMode {
30
+ PAGING = "paging",
31
+ CONTINUITY = "continuity"
32
+ }
33
+ export declare enum PaperDirection {
34
+ VERTICAL = "vertical",
35
+ HORIZONTAL = "horizontal"
36
+ }
37
+ export declare enum WordBreak {
38
+ BREAK_ALL = "break-all",
39
+ BREAK_WORD = "break-word"
40
+ }
41
+ export declare enum RenderMode {
42
+ SPEED = "speed",
43
+ COMPATIBILITY = "compatibility"
44
+ }
@@ -0,0 +1,21 @@
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
+ AREA = "area",
12
+ CHECKBOX = "checkbox",
13
+ RADIO = "radio",
14
+ LATEX = "latex",
15
+ TAB = "tab",
16
+ DATE = "date",
17
+ BLOCK = "block",
18
+ TITLE = "title",
19
+ LIST = "list",
20
+ LABEL = "label"
21
+ }
@@ -0,0 +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
+ }
@@ -0,0 +1,5 @@
1
+ export declare enum MouseEventButton {
2
+ LEFT = 0,
3
+ CENTER = 1,
4
+ RIGHT = 2
5
+ }
@@ -0,0 +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
+ 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
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum LineNumberType {
2
+ PAGE = "page",
3
+ CONTINUITY = "continuity"
4
+ }
@@ -0,0 +1,20 @@
1
+ export declare enum ListType {
2
+ UL = "ul",
3
+ OL = "ol"
4
+ }
5
+ export declare enum UlStyle {
6
+ DISC = "disc",
7
+ CIRCLE = "circle",
8
+ SQUARE = "square",
9
+ CHECKBOX = "checkbox"
10
+ }
11
+ export declare enum OlStyle {
12
+ DECIMAL = "decimal"
13
+ }
14
+ export declare enum ListStyle {
15
+ DISC = "disc",
16
+ CIRCLE = "circle",
17
+ SQUARE = "square",
18
+ DECIMAL = "decimal",
19
+ CHECKBOX = "checkbox"
20
+ }
@@ -0,0 +1,6 @@
1
+ export declare enum MoveDirection {
2
+ UP = "top",
3
+ DOWN = "down",
4
+ LEFT = "left",
5
+ RIGHT = "right"
6
+ }
@@ -0,0 +1,7 @@
1
+ export declare enum RowFlex {
2
+ LEFT = "left",
3
+ CENTER = "center",
4
+ RIGHT = "right",
5
+ ALIGNMENT = "alignment",
6
+ JUSTIFY = "justify"
7
+ }
@@ -0,0 +1,12 @@
1
+ export declare enum TextDecorationStyle {
2
+ SOLID = "solid",
3
+ DOUBLE = "double",
4
+ DASHED = "dashed",
5
+ DOTTED = "dotted",
6
+ WAVY = "wavy"
7
+ }
8
+ export declare enum DashType {
9
+ SOLID = "solid",
10
+ DASHED = "dashed",
11
+ DOTTED = "dotted"
12
+ }
@@ -0,0 +1,8 @@
1
+ export declare enum TitleLevel {
2
+ FIRST = "first",
3
+ SECOND = "second",
4
+ THIRD = "third",
5
+ FOURTH = "fourth",
6
+ FIFTH = "fifth",
7
+ SIXTH = "sixth"
8
+ }
@@ -0,0 +1,5 @@
1
+ export declare enum VerticalAlign {
2
+ TOP = "top",
3
+ MIDDLE = "middle",
4
+ BOTTOM = "bottom"
5
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum WatermarkType {
2
+ TEXT = "text",
3
+ IMAGE = "image"
4
+ }
@@ -0,0 +1,17 @@
1
+ export declare enum TableBorder {
2
+ ALL = "all",
3
+ EMPTY = "empty",
4
+ EXTERNAL = "external",
5
+ INTERNAL = "internal",
6
+ DASH = "dash"
7
+ }
8
+ export declare enum TdBorder {
9
+ TOP = "top",
10
+ RIGHT = "right",
11
+ BOTTOM = "bottom",
12
+ LEFT = "left"
13
+ }
14
+ export declare enum TdSlash {
15
+ FORWARD = "forward",
16
+ BACK = "back"
17
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum TableOrder {
2
+ ROW = "row",
3
+ COL = "col"
4
+ }
@@ -0,0 +1,59 @@
1
+ import './assets/css/index.css';
2
+ import { IEditorData, IEditorOption, IEditorResult } from './interface/Editor';
3
+ import { IElement, IFormInputImage, IUpdateElementByIdOption } 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 { FlexDirection, ImageDisplay, LocationPosition } from './dataset/enum/Common';
8
+ import { ElementType } from './dataset/enum/Element';
9
+ import { Register } from './core/register/Register';
10
+ import { IContextMenuContext, IRegisterContextMenu } from './interface/contextmenu/ContextMenu';
11
+ import { EditorComponent, EditorZone, EditorMode, PageMode, PaperDirection, WordBreak, RenderMode } from './dataset/enum/Editor';
12
+ import { EDITOR_CLIPBOARD, EDITOR_COMPONENT } from './dataset/constant/Editor';
13
+ import { IWatermark } from './interface/Watermark';
14
+ import { ControlComponent, ControlIndentation, ControlState, ControlType } from './dataset/enum/Control';
15
+ import { INavigateInfo } from './core/draw/interactive/Search';
16
+ import { KeyMap } from './dataset/enum/KeyMap';
17
+ import { BlockType } from './dataset/enum/Block';
18
+ import { IBlock } from './interface/Block';
19
+ import { ILang } from './interface/i18n/I18n';
20
+ import { VerticalAlign } from './dataset/enum/VerticalAlign';
21
+ import { TableBorder, TdBorder, TdSlash } from './dataset/enum/table/Table';
22
+ import { MaxHeightRatio, NumberType } from './dataset/enum/Common';
23
+ import { TitleLevel } from './dataset/enum/Title';
24
+ import { ListStyle, ListType } from './dataset/enum/List';
25
+ import { ICatalog, ICatalogItem } from './interface/Catalog';
26
+ import { UsePlugin } from './interface/Plugin';
27
+ import { EventBus } from './core/event/eventbus/EventBus';
28
+ import { EventBusMap } from './interface/EventBus';
29
+ import { IRangeStyle } from './interface/Listener';
30
+ import { Override } from './core/override/Override';
31
+ import { LETTER_CLASS } from './dataset/constant/Common';
32
+ import { INTERNAL_CONTEXT_MENU_KEY } from './dataset/constant/ContextMenu';
33
+ import { IRange } from './interface/Range';
34
+ import { splitText } from './utils';
35
+ import { createDomFromElementList, getElementListByHTML, getTextFromElementList, type IGetElementListByHTMLOption } from './utils/element';
36
+ import { BackgroundRepeat, BackgroundSize } from './dataset/enum/Background';
37
+ import { TextDecorationStyle } from './dataset/enum/Text';
38
+ import { LineNumberType } from './dataset/enum/LineNumber';
39
+ import { AreaMode } from './dataset/enum/Area';
40
+ import { IBadge } from './interface/Badge';
41
+ import { WatermarkType } from './dataset/enum/Watermark';
42
+ import { INTERNAL_SHORTCUT_KEY } from './dataset/constant/Shortcut';
43
+ import { formInputPropertiesConfigDialog, formCheckboxPropertiesConfigDialog, formRadioPropertiesConfigDialog } from '../utils';
44
+ export default class Editor {
45
+ command: Command;
46
+ version: string;
47
+ listener: Listener;
48
+ eventBus: EventBus<EventBusMap>;
49
+ override: Override;
50
+ register: Register;
51
+ destroy: () => void;
52
+ use: UsePlugin;
53
+ constructor(container: HTMLDivElement, data: IEditorData | IElement[], options?: IEditorOption);
54
+ }
55
+ export { splitText, createDomFromElementList, getElementListByHTML, getTextFromElementList };
56
+ export { EDITOR_COMPONENT, LETTER_CLASS, INTERNAL_CONTEXT_MENU_KEY, INTERNAL_SHORTCUT_KEY, EDITOR_CLIPBOARD };
57
+ export { Editor, RowFlex, VerticalAlign, EditorZone, EditorMode, ElementType, ControlType, EditorComponent, PageMode, RenderMode, ImageDisplay, Command, KeyMap, BlockType, PaperDirection, TableBorder, TdBorder, TdSlash, MaxHeightRatio, NumberType, TitleLevel, ListType, ListStyle, WordBreak, ControlIndentation, ControlComponent, BackgroundRepeat, BackgroundSize, TextDecorationStyle, LineNumberType, LocationPosition, AreaMode, ControlState, FlexDirection, WatermarkType };
58
+ export type { IElement, IEditorData, IEditorOption, IEditorResult, IContextMenuContext, IRegisterContextMenu, IWatermark, INavigateInfo, IBlock, ILang, ICatalog, ICatalogItem, IRange, IRangeStyle, IBadge, IGetElementListByHTMLOption, IFormInputImage, IUpdateElementByIdOption };
59
+ export { formInputPropertiesConfigDialog, formCheckboxPropertiesConfigDialog, formRadioPropertiesConfigDialog };