@ones-editor/editor 0.0.3-beta.8 → 0.0.3-beta.80

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 (219) hide show
  1. package/@ones-editor/auto-link/package.json +8 -0
  2. package/@ones-editor/auto-link/src/index.d.ts +3 -0
  3. package/@ones-editor/block-locker/src/hook.d.ts +1 -0
  4. package/@ones-editor/block-locker/src/i18n/en-US.d.ts +8 -0
  5. package/@ones-editor/block-locker/src/i18n/index.d.ts +1 -0
  6. package/@ones-editor/block-locker/src/i18n/zh-CN.d.ts +8 -0
  7. package/@ones-editor/block-locker/src/index.d.ts +4 -1
  8. package/@ones-editor/block-locker/src/paste-handler.d.ts +4 -0
  9. package/@ones-editor/block-menu/src/block-menu/items/block-command-items.d.ts +1 -1
  10. package/@ones-editor/block-menu/src/block-menu/items/insert-block-items/index.d.ts +1 -1
  11. package/@ones-editor/block-menu/src/block-menu-button/drag-drop/find-preview-element.d.ts +1 -1
  12. package/@ones-editor/block-menu/src/block-menu-button/drag-preview/index.d.ts +1 -1
  13. package/@ones-editor/code-block/src/code-block/caption/caption-input-handler.d.ts +2 -2
  14. package/@ones-editor/code-block/src/code-block/child-container.d.ts +2 -2
  15. package/@ones-editor/code-block/src/code-block/code-caret.d.ts +7 -0
  16. package/@ones-editor/code-block/src/code-block/code-copy.d.ts +4 -0
  17. package/@ones-editor/code-block/src/code-block/create-empty-code.d.ts +2 -2
  18. package/@ones-editor/code-block/src/code-block/index.d.ts +3 -1
  19. package/@ones-editor/code-block/src/code-block/settings/index.d.ts +3 -0
  20. package/@ones-editor/comments/src/actions/add-comment-to-block.d.ts +3 -2
  21. package/@ones-editor/comments/src/actions/add-comment-to-text-block.d.ts +2 -1
  22. package/@ones-editor/comments/src/actions/editor-add-comment.d.ts +2 -0
  23. package/@ones-editor/comments/src/comment-item/comment-item.d.ts +1 -0
  24. package/@ones-editor/comments/src/comments/comments.d.ts +5 -4
  25. package/@ones-editor/comments/src/comments-helper/utils.d.ts +1 -1
  26. package/@ones-editor/comments/src/comments-list/arrange-items.d.ts +1 -1
  27. package/@ones-editor/comments/src/comments-list/comments-list.d.ts +2 -10
  28. package/@ones-editor/comments/src/comments-list/group-item.d.ts +1 -0
  29. package/@ones-editor/comments/src/comments-list/group-list.d.ts +4 -2
  30. package/@ones-editor/comments/src/comments-list/mini-comment/mini-comments-list.d.ts +1 -4
  31. package/@ones-editor/comments/src/comments-list/mobile-comments-list/mobile-comments-list.d.ts +2 -2
  32. package/@ones-editor/comments/src/index.d.ts +1 -0
  33. package/@ones-editor/comments/src/types.d.ts +11 -4
  34. package/@ones-editor/core/src/core/blocks/block-anchor/create-block-anchor.d.ts +1 -0
  35. package/@ones-editor/core/src/core/blocks/common/block-dom.d.ts +1 -0
  36. package/@ones-editor/core/src/core/blocks/text-blocks/index.d.ts +1 -0
  37. package/@ones-editor/core/src/core/blocks/text-blocks/text-block/to-markdown.d.ts +3 -0
  38. package/@ones-editor/core/src/core/blocks/text-blocks/text-block/to-plain-html.d.ts +3 -0
  39. package/@ones-editor/core/src/core/blocks/text-blocks/text-block/to-plain-text.d.ts +3 -0
  40. package/@ones-editor/core/src/core/composition/clipboard/copy.d.ts +3 -2
  41. package/@ones-editor/core/src/core/composition/editor-input.d.ts +3 -0
  42. package/@ones-editor/core/src/core/composition/index.d.ts +1 -1
  43. package/@ones-editor/core/src/core/containers/root-container.d.ts +2 -1
  44. package/@ones-editor/core/src/core/converter/block-to-html.d.ts +2 -2
  45. package/@ones-editor/core/src/core/converter/block-to-markdown.d.ts +2 -2
  46. package/@ones-editor/core/src/core/converter/block-to-text.d.ts +2 -2
  47. package/@ones-editor/core/src/core/doc/doc.d.ts +6 -2
  48. package/@ones-editor/core/src/core/doc/to-plain-text.d.ts +1 -0
  49. package/@ones-editor/core/src/core/editor/actions/auto-insert-block.d.ts +2 -2
  50. package/@ones-editor/core/src/core/editor/actions/break-text-block.d.ts +2 -0
  51. package/@ones-editor/core/src/core/editor/actions/delete-block-text.d.ts +2 -2
  52. package/@ones-editor/core/src/core/editor/actions/focus-to-end.d.ts +0 -1
  53. package/@ones-editor/core/src/core/editor/actions/insert-block.d.ts +2 -2
  54. package/@ones-editor/core/src/core/editor/actions/insert-text.d.ts +2 -2
  55. package/@ones-editor/core/src/core/editor-doc/editor-doc.d.ts +5 -3
  56. package/@ones-editor/core/src/core/index.d.ts +1 -0
  57. package/@ones-editor/core/src/core/input-handler/input-handler.d.ts +3 -0
  58. package/@ones-editor/core/src/core/input-handler/remove-quoted.d.ts +2 -0
  59. package/@ones-editor/core/src/core/selection/actions/index.d.ts +2 -2
  60. package/@ones-editor/core/src/core/selection/actions/select-all.d.ts +3 -1
  61. package/@ones-editor/core/src/core/selection/actions/select-block.d.ts +2 -0
  62. package/@ones-editor/core/src/core/selection/actions/word-offset.d.ts +1 -1
  63. package/@ones-editor/core/src/core/selection/editor-selection.d.ts +3 -2
  64. package/@ones-editor/core/src/core/selection/index.d.ts +1 -0
  65. package/@ones-editor/core/src/core/selection/range/simple-range.d.ts +2 -1
  66. package/@ones-editor/core/src/core/settings/index.d.ts +3 -3
  67. package/@ones-editor/core/src/core/types.d.ts +30 -18
  68. package/@ones-editor/core/src/i18n/i18n.d.ts +36 -0
  69. package/@ones-editor/core/src/local-doc/index.d.ts +6 -2
  70. package/@ones-editor/core/src/utils/dom-scroll.d.ts +3 -1
  71. package/@ones-editor/core/src/utils/dom.d.ts +2 -0
  72. package/@ones-editor/core/src/utils/file.d.ts +1 -0
  73. package/@ones-editor/core/src/utils/logger/index.d.ts +9 -0
  74. package/@ones-editor/drawio-embed/src/helper/index.d.ts +3 -3
  75. package/@ones-editor/drawio-embed/types/index.d.ts +2 -2
  76. package/@ones-editor/drop-target/src/drop-indicator.d.ts +1 -0
  77. package/@ones-editor/drop-target/src/drop-target.d.ts +1 -1
  78. package/@ones-editor/drop-target/src/handlers/drag-file.d.ts +8 -0
  79. package/@ones-editor/embed-block-helper/src/block-properties/embed-block-properties.d.ts +2 -1
  80. package/@ones-editor/exclusive-block/package.json +6 -0
  81. package/@ones-editor/exclusive-block/src/exclusive-block-hook.d.ts +6 -0
  82. package/@ones-editor/exclusive-block/src/exclusive-block.d.ts +22 -0
  83. package/@ones-editor/exclusive-block/src/exclusive-dom.d.ts +5 -0
  84. package/@ones-editor/exclusive-block/src/handle-remote-exclusive-message.d.ts +3 -0
  85. package/@ones-editor/exclusive-block/src/index.d.ts +5 -0
  86. package/@ones-editor/exclusive-block/src/types.d.ts +7 -0
  87. package/@ones-editor/file/src/file-embed/card/index.d.ts +3 -3
  88. package/@ones-editor/file/src/index.d.ts +1 -0
  89. package/@ones-editor/file/src/types.d.ts +1 -0
  90. package/@ones-editor/find-dialog/src/find-dialog.d.ts +1 -0
  91. package/@ones-editor/graph-embed/src/helper/graph-base.d.ts +3 -2
  92. package/@ones-editor/graph-embed/src/helper/graph-block-commands.d.ts +3 -2
  93. package/@ones-editor/heading-collapse/src/heading-collapse-button/drop-handler.d.ts +1 -1
  94. package/@ones-editor/image-embed/package.json +2 -1
  95. package/@ones-editor/image-embed/src/drag-drop/drag-handler.d.ts +4 -0
  96. package/@ones-editor/image-embed/src/drag-drop/handle-drop-over.d.ts +5 -1
  97. package/@ones-editor/image-embed/src/drag-drop/handle-drop.d.ts +1 -1
  98. package/@ones-editor/image-embed/src/empty-image-converter.d.ts +5 -0
  99. package/@ones-editor/image-embed/src/index.d.ts +2 -1
  100. package/@ones-editor/input-handlers/src/enforce-with-document-title/types.d.ts +1 -0
  101. package/@ones-editor/input-handlers/src/i18n/en-us.d.ts +1 -0
  102. package/@ones-editor/input-handlers/src/i18n/zh-cn.d.ts +1 -0
  103. package/@ones-editor/input-handlers/src/markdown-shortcuts/table-converter.d.ts +2 -0
  104. package/@ones-editor/list-block/src/converter/convert-list-to.d.ts +2 -0
  105. package/@ones-editor/list-block/src/converter/convert-to-list.d.ts +14 -0
  106. package/@ones-editor/list-block/src/converter/index.d.ts +2 -14
  107. package/@ones-editor/list-block/src/drop/index.d.ts +1 -1
  108. package/@ones-editor/list-block/src/index.d.ts +3 -2
  109. package/@ones-editor/list-block/src/level/change-multi-levels.d.ts +2 -0
  110. package/@ones-editor/list-block/src/level/decrease-level.d.ts +1 -0
  111. package/@ones-editor/list-block/src/mindmap/index.d.ts +1 -1
  112. package/@ones-editor/list-block/src/mindmap/to-mindmap/index.d.ts +1 -1
  113. package/@ones-editor/list-block/src/types.d.ts +2 -1
  114. package/@ones-editor/list-block/src/utils/list-brother.d.ts +5 -1
  115. package/@ones-editor/markdown-to-doc/src/markdown-to-doc.d.ts +1 -0
  116. package/@ones-editor/markdown-to-doc/src/tokens/block-tokens/latex.d.ts +4 -0
  117. package/@ones-editor/markdown-to-doc/src/tokens/block-tokens/paragraph.d.ts +1 -0
  118. package/@ones-editor/mathjax/package.json +3 -0
  119. package/@ones-editor/mathjax/src/index.d.ts +2 -1
  120. package/@ones-editor/mathjax/src/mathjax-box/convert-mathjax.d.ts +5 -0
  121. package/@ones-editor/mathjax/src/mathjax-box/mathjax-editor.d.ts +2 -2
  122. package/@ones-editor/media-embed/src/core/media-embed.d.ts +3 -1
  123. package/@ones-editor/mention/src/block-mention.d.ts +1 -1
  124. package/@ones-editor/mention/src/dom/mention-button.d.ts +1 -1
  125. package/@ones-editor/mention/src/mention.d.ts +1 -0
  126. package/@ones-editor/mobile-helper/package.json +9 -0
  127. package/@ones-editor/mobile-helper/src/index.d.ts +11 -0
  128. package/@ones-editor/paste-handler/src/paste-handler.d.ts +1 -1
  129. package/@ones-editor/paste-special/src/paste-special-handler.d.ts +2 -2
  130. package/@ones-editor/scroll-container/src/dom-utils.d.ts +9 -0
  131. package/@ones-editor/scroll-container/src/index.d.ts +8 -18
  132. package/@ones-editor/scroll-container/src/observer/container-resize-observer.d.ts +2 -1
  133. package/@ones-editor/scroll-container/src/observer/locating-resize-observer.d.ts +13 -0
  134. package/@ones-editor/scroll-container/src/scroll-listener.d.ts +3 -0
  135. package/@ones-editor/scroll-container/src/types.d.ts +1 -0
  136. package/@ones-editor/sharedb-doc/src/doc/auth-connection.d.ts +3 -3
  137. package/@ones-editor/sharedb-doc/src/doc/sharedb-client.d.ts +3 -3
  138. package/@ones-editor/sharedb-doc/src/doc/sharedb-doc.d.ts +6 -1
  139. package/@ones-editor/sharedb-doc/src/index.d.ts +1 -0
  140. package/@ones-editor/sharedb-doc/src/types.d.ts +3 -2
  141. package/@ones-editor/table-block/src/constant/index.d.ts +1 -0
  142. package/@ones-editor/table-block/src/locale/en-us.d.ts +5 -0
  143. package/@ones-editor/table-block/src/locale/zh-cn.d.ts +5 -0
  144. package/@ones-editor/table-block/src/table-block/border-bar/table-row-column-toolbar.d.ts +1 -0
  145. package/@ones-editor/table-block/src/table-block/convert-table-to.d.ts +2 -0
  146. package/@ones-editor/table-block/src/table-block/doc-table-data.d.ts +1 -1
  147. package/@ones-editor/table-block/src/table-block/selection-range.d.ts +2 -1
  148. package/@ones-editor/table-block/src/table-block/table-creator/index.d.ts +1 -1
  149. package/@ones-editor/table-block/src/table-block/table-resize/resize-gripper.d.ts +1 -1
  150. package/@ones-editor/table-block/src/table-block/table-scroll-events.d.ts +1 -0
  151. package/@ones-editor/table-block/src/types.d.ts +2 -0
  152. package/@ones-editor/templates/package.json +9 -0
  153. package/@ones-editor/templates/src/index.d.ts +4 -0
  154. package/@ones-editor/templates/src/locale/en-us.d.ts +9 -0
  155. package/@ones-editor/templates/src/locale/index.d.ts +1 -0
  156. package/@ones-editor/templates/src/locale/zh-cn.d.ts +9 -0
  157. package/@ones-editor/templates/src/templates/select-template.d.ts +7 -0
  158. package/@ones-editor/templates/src/templates/types.d.ts +14 -0
  159. package/@ones-editor/text-commands/src/locale/en-us.d.ts +1 -0
  160. package/@ones-editor/text-commands/src/locale/zh-cn.d.ts +1 -0
  161. package/@ones-editor/text-commands/src/text-command-provider.d.ts +1 -0
  162. package/@ones-editor/toc/src/heading-scroll/index.d.ts +22 -0
  163. package/@ones-editor/toc/src/heading-scroll/utils.d.ts +7 -0
  164. package/@ones-editor/toc/src/index.d.ts +1 -0
  165. package/@ones-editor/tsconfig.tsbuildinfo +1 -1
  166. package/@ones-editor/ui/src/index.d.ts +3 -3
  167. package/@ones-editor/ui/src/locale/en-us.d.ts +2 -0
  168. package/@ones-editor/ui/src/locale/zh-cn.d.ts +2 -0
  169. package/@ones-editor/ui/src/quick-menu/basic-commands.d.ts +5 -0
  170. package/@ones-editor/ui/src/quick-menu/basic-menu-items.d.ts +10 -10
  171. package/@ones-editor/ui/src/quick-menu/index.d.ts +6 -0
  172. package/@ones-editor/ui/src/quick-menu/inline-box-items.d.ts +8 -14
  173. package/@ones-editor/ui/src/toolbar/box-only.d.ts +2 -0
  174. package/@ones-editor/ui/src/toolbar/commands/paragraph.d.ts +1 -0
  175. package/@ones-editor/ui/src/toolbar/toolbar-handler.d.ts +4 -1
  176. package/@ones-editor/ui/src/tooltips/index.d.ts +4 -0
  177. package/@ones-editor/ui-base/src/auto-suggest/auto-suggest-menu.d.ts +2 -1
  178. package/@ones-editor/ui-base/src/auto-suggest/auto-suggest.d.ts +4 -1
  179. package/@ones-editor/ui-base/src/auto-suggest/index.d.ts +2 -1
  180. package/@ones-editor/ui-base/src/auto-suggest/should-focus-to-editor.d.ts +2 -0
  181. package/@ones-editor/ui-base/src/command-bar/command-bar.d.ts +4 -1
  182. package/@ones-editor/ui-base/src/command-bar/types.d.ts +6 -0
  183. package/@ones-editor/ui-base/src/dialog/index.d.ts +1 -0
  184. package/@ones-editor/ui-base/src/dialog/manual-close-dialog.d.ts +1 -1
  185. package/@ones-editor/ui-base/src/dialog/types.d.ts +4 -0
  186. package/@ones-editor/ui-base/src/index.d.ts +1 -0
  187. package/@ones-editor/ui-base/src/input/create-input.d.ts +1 -0
  188. package/@ones-editor/ui-base/src/item-shortcuts/index.d.ts +1 -0
  189. package/@ones-editor/ui-base/src/list/drop-down-filterable-list.d.ts +2 -2
  190. package/@ones-editor/ui-base/src/locale/en-us.d.ts +1 -0
  191. package/@ones-editor/ui-base/src/locale/zh-cn.d.ts +1 -0
  192. package/@ones-editor/versions/src/types.d.ts +1 -0
  193. package/@ones-editor/versions/src/version-dialog/index.d.ts +3 -1
  194. package/@ones-editor/webpage-embed/src/ui/dialog.d.ts +2 -2
  195. package/@ones-editor/webpage-embed/src/webpage-embed/webpage-items.d.ts +2 -0
  196. package/dist/comments/create-comment-editor.d.ts +4 -7
  197. package/dist/comments/local-doc-comments-provider.d.ts +18 -0
  198. package/dist/comments/{comments-provider.d.ts → sharedb-doc-comments-provider.d.ts} +3 -6
  199. package/dist/index.d.ts +15 -3
  200. package/dist/index.js +242 -288
  201. package/dist/lang/en-us.d.ts +14 -0
  202. package/dist/lang/index.d.ts +1 -0
  203. package/dist/lang/zh-cn.d.ts +14 -0
  204. package/dist/types.d.ts +31 -2
  205. package/package.json +3 -4
  206. package/@ones-editor/e2e/cypress/support/commands.d.ts +0 -19
  207. package/@ones-editor/e2e/cypress/support/e2e.d.ts +0 -1
  208. package/@ones-editor/e2e/cypress.config.d.ts +0 -3
  209. package/@ones-editor/e2e/package.json +0 -13
  210. package/@ones-editor/e2e/src/block-menu/menu-list.cy.d.ts +0 -0
  211. package/@ones-editor/e2e/src/data.d.ts +0 -106
  212. package/@ones-editor/e2e/src/input-handlers/case.d.ts +0 -10
  213. package/@ones-editor/e2e/src/input-handlers/shortcut.cy.d.ts +0 -1
  214. package/@ones-editor/e2e/src/list-block/case.d.ts +0 -8
  215. package/@ones-editor/e2e/src/list-block/list.cy.d.ts +0 -1
  216. package/@ones-editor/e2e/src/toc/case.d.ts +0 -5
  217. package/@ones-editor/e2e/src/toc/toc.cy.d.ts +0 -1
  218. package/@ones-editor/list-block/src/command/covert-to-list.d.ts +0 -3
  219. /package/@ones-editor/block-menu/src/block-menu-button/{drag-drop → drag-preview}/element-to-data-url.d.ts +0 -0
@@ -0,0 +1,14 @@
1
+ declare const _default: {
2
+ placeholder: {
3
+ common: {
4
+ title: string;
5
+ readonlyTitle: string;
6
+ content: string;
7
+ contentInTable: string;
8
+ };
9
+ local: {
10
+ readonlyTitle: string;
11
+ };
12
+ };
13
+ };
14
+ export default _default;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,14 @@
1
+ declare const _default: {
2
+ placeholder: {
3
+ common: {
4
+ title: string;
5
+ readonlyTitle: string;
6
+ content: string;
7
+ contentInTable: string;
8
+ };
9
+ local: {
10
+ readonlyTitle: string;
11
+ };
12
+ };
13
+ };
14
+ export default _default;
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Embed, OnesEditor, OnesEditorUser, OnesEditorUserPermission } from '../@ones-editor/core';
1
+ import { Embed, Box, i18n, OnesEditor, OnesEditorUser, OnesEditorUserPermission, OnesEditorBlockHook, OnesEditorCommandProvider, LogLevel } from '../@ones-editor/core';
2
2
  import { DrawIoOptions } from '../@ones-editor/drawio-embed';
3
3
  import { MermaidEmbedOptions } from '../@ones-editor/graph-embed';
4
4
  import { ImageOptions } from '../@ones-editor/image-embed';
@@ -9,6 +9,9 @@ import { WebpageOptions } from '../@ones-editor/webpage-embed';
9
9
  import { OnesEditorCommentOptions } from '../@ones-editor/comments';
10
10
  import { ListOptions } from '../@ones-editor/list-block';
11
11
  import { QuickMenuOptions } from '../@ones-editor/ui/src/quick-menu';
12
+ import { TemplateOptions } from '../@ones-editor/templates';
13
+ import { FindDialogOptions, PopoverOptions } from '../@ones-editor/ui-base';
14
+ import { FileOptions } from '../@ones-editor/file';
12
15
  export interface RemoteCaretsOptions {
13
16
  onUserChanged?: (editor: OnesEditor, users: OnesEditorUser[]) => void;
14
17
  }
@@ -24,7 +27,14 @@ export type EditorComponentOptions = {
24
27
  comment?: OnesEditorCommentOptions;
25
28
  list?: ListOptions;
26
29
  quickMenu?: QuickMenuOptions;
30
+ templates?: TemplateOptions;
27
31
  custom?: Record<string, unknown>;
32
+ popover?: PopoverOptions;
33
+ findDialog?: FindDialogOptions;
34
+ file?: FileOptions;
35
+ };
36
+ export type EditorEvents = {
37
+ onClickLink?: (editor: OnesEditor, event: MouseEvent, link: Element) => void;
28
38
  };
29
39
  export interface CreateOnesEditorOptions {
30
40
  id?: string;
@@ -33,18 +43,37 @@ export interface CreateOnesEditorOptions {
33
43
  docId: string;
34
44
  permission: OnesEditorUserPermission;
35
45
  token: string;
46
+ disableLogout?: boolean;
47
+ enableComments?: boolean;
48
+ scrollContainer?: HTMLElement;
49
+ lang?: i18n.LANGS;
50
+ logLevel?: LogLevel;
51
+ onReauth?: (userId: string, docId: string, permission: OnesEditorUserPermission) => Promise<string>;
36
52
  user: {
37
53
  userId: string;
38
54
  displayName: string;
39
55
  avatarUrl: string;
40
- rainbowIndex: number;
56
+ rainbowIndex?: number;
41
57
  };
42
58
  components?: {
43
59
  embeds?: Embed[];
60
+ boxes?: Box[];
61
+ blockHooks?: OnesEditorBlockHook[];
62
+ commandProviders?: OnesEditorCommandProvider[];
44
63
  };
64
+ events?: EditorEvents;
45
65
  componentsOptions?: EditorComponentOptions;
46
66
  }
47
67
  export interface CreateLocalEditorOptions {
48
68
  id?: string;
69
+ lang?: i18n.LANGS;
70
+ scrollContainer?: HTMLElement;
71
+ components?: {
72
+ embeds?: Embed[];
73
+ blockHooks?: OnesEditorBlockHook[];
74
+ };
75
+ serverUrl?: string;
76
+ enableComments?: boolean;
77
+ events?: EditorEvents;
49
78
  componentsOptions?: EditorComponentOptions;
50
79
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ones-editor/editor",
3
- "version": "0.0.3-beta.8",
3
+ "version": "0.0.3-beta.80",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -12,8 +12,6 @@
12
12
  "blueimp-md5": "^2.19.0",
13
13
  "buffer": "^6.0.3",
14
14
  "css-color-converter": "^2.0.0",
15
- "cypress": "^12.3.0",
16
- "cypress-real-events": "^1.7.6",
17
15
  "docx": "^7.2.0",
18
16
  "dom-to-image": "^2.6.0",
19
17
  "events": "^3.3.0",
@@ -23,6 +21,7 @@
23
21
  "image-size": "^1.0.0",
24
22
  "js-base64": "*",
25
23
  "kiwi-intl": "^1.2.6-beta.0",
24
+ "lodash": "^4.0.8",
26
25
  "lodash.camelcase": "^4.3.0",
27
26
  "lodash.clonedeep": "^4.5.0",
28
27
  "lodash.debounce": "^4.0.8",
@@ -33,10 +32,10 @@
33
32
  "lodash.throttle": "^4.1.1",
34
33
  "lodash.upperfirst": "^4.3.1",
35
34
  "marked": "^4.2.1",
35
+ "marked-extended-latex": "^1.1.0",
36
36
  "markmap-view": "0.2.2",
37
37
  "mermaid": "^9.1.0",
38
38
  "mime-db": "^1.52.0",
39
- "minimist": "^1.2.7",
40
39
  "nanoid": "^3.2.0",
41
40
  "ot-json1": "^1.0.2",
42
41
  "plantuml-encoder": "^1.4.0",
@@ -1,19 +0,0 @@
1
- /// <reference types="cypress" />
2
- /// <reference types="cypress" />
3
- declare namespace Cypress {
4
- interface Chainable {
5
- getBlocksByType: (blockType: string) => Chainable<Element>;
6
- clearAllNoteByKeyboard: () => void;
7
- getBlockContent: () => Chainable<Element>;
8
- getBlockContentByBlockId: (blockId: string) => Chainable<Element>;
9
- cacheBlock: (blockType: string, block: BlockCache) => Chainable<JQuery>;
10
- createHeadingByShortcut: (blockId: string, level: number, title: string) => Chainable<Element>;
11
- }
12
- }
13
- interface BlockCache {
14
- TitleBlockId: string;
15
- BlockCacheMap: Map<string, string[]>;
16
- setBlock(blockType: string, blockId: string): void;
17
- getLastBlockId(blockType: string): string;
18
- setTitleBlockId(blockId: string): void;
19
- }
@@ -1 +0,0 @@
1
- import './commands';
@@ -1,3 +0,0 @@
1
- /// <reference types="cypress" />
2
- declare const _default: Cypress.ConfigOptions<any>;
3
- export default _default;
@@ -1,13 +0,0 @@
1
- {
2
- "name": "@ones-editor/e2e",
3
- "private": "true",
4
- "version": "1.0.0",
5
- "main": "index.ts",
6
- "license": "MIT",
7
- "scripts": {
8
- "test": "cypress open",
9
- "e2e-headless": "node ./scripts/e2e-run-tests.js",
10
- "test-mobile": "cypress open --config viewportWidth=390,viewportHeight=844"
11
- },
12
- "types": "src/index.d.ts"
13
- }
File without changes
@@ -1,106 +0,0 @@
1
- export declare class BlockCache {
2
- TitleBlockId: string;
3
- BlockCacheMap: Map<string, string[]>;
4
- constructor();
5
- setBlock(blockType: string, blockId: string): Map<string, string[]>;
6
- getLastBlockId(blockType: string): string;
7
- setTitleBlockId(blockId: string): void;
8
- }
9
- export declare class TestTextStyleData {
10
- inputStr: string;
11
- checkSpanIndex: number;
12
- expectedClassValue: string;
13
- expectedTextValue: string;
14
- constructor(inputStr: string, checkSpanIndex: number, expectedClassValue: string, expectedTextValue: string);
15
- }
16
- export declare class TestHeadingStyleData {
17
- key: string;
18
- inputStr: string;
19
- expected: string;
20
- expectedPlaceholder: string;
21
- constructor(key: string, inputStr: string, expected: string, expectedPlaceholder: string);
22
- }
23
- export declare const docTestBlockStyle = "block-style";
24
- export declare const blockCache: BlockCache;
25
- export declare const TEXT_BLOCK_ATTRIBUTE: {
26
- PLACE_HOLDER: {
27
- KEY: string;
28
- DEFAULT: string;
29
- HEADING1: string;
30
- HEADING2: string;
31
- HEADING3: string;
32
- HEADING4: string;
33
- HEADING5: string;
34
- HEADING6: string;
35
- HEADING7: string;
36
- HEADING8: string;
37
- };
38
- STYLE_HEADING: {
39
- KEY: string;
40
- };
41
- STYLE_QUOTE: {
42
- QUOTECLASSNAME: string;
43
- };
44
- STYLE_TEXT: {
45
- BoldStyleClass: string;
46
- ItalicStyleClass: string;
47
- CodeStyleClass: string;
48
- StrikeThrough: string;
49
- };
50
- };
51
- export declare const LIST_BLOCK_ATTRIBUTE: {
52
- PLACE_HOLDER: {
53
- KEY: string;
54
- LIST: string;
55
- };
56
- LEVEL: string;
57
- START: string;
58
- GROUP_ID: string;
59
- LISTTYPE: string;
60
- VALUE: {
61
- LISTTYPE_ORDERED: string;
62
- LISTTYPE_UNORDERED: string;
63
- LISTTYPE_CHECKED: string;
64
- LISTTYPE_UNCHECKED: string;
65
- };
66
- };
67
- export declare const CODE_BLOCK_ATTRIBUTE: {
68
- DATA_LANGUAGE: string;
69
- LANGUAGE_PLAIN: string;
70
- LANGUAGE_GOLANG: string;
71
- LANGUAGE_JAVA: string;
72
- LANGUAGE_JAVASCRIPT: string;
73
- LANGUAGE_HTML_XML: string;
74
- };
75
- export declare const EMBED_BLOCK_ATTRIBUTE: {
76
- HR: {
77
- TYPE: string;
78
- CLASS: string;
79
- };
80
- MERMAID: {
81
- TYPE: string;
82
- EMPTY_TIPS: string;
83
- EMPTY_REPLACE: string;
84
- ARIA_EXPANDED: string;
85
- IMAGE_CLASS: string;
86
- };
87
- PLANTUML: {
88
- TYPE: string;
89
- EMPTY_TIPS: string;
90
- EMPTY_REPLACE: string;
91
- ARIA_EXPANDED: string;
92
- IMAGE_CLASS: string;
93
- };
94
- TOC: {
95
- TYPE: string;
96
- CONTAINER_CLASS: string;
97
- EMPTY_REPLACE: string;
98
- EMPTY_CLASS: string;
99
- };
100
- };
101
- export declare class TocNode {
102
- children: TocNode[];
103
- title: string;
104
- level: number;
105
- block: string;
106
- }
@@ -1,10 +0,0 @@
1
- import { TestHeadingStyleData, TestTextStyleData } from '../data';
2
- export declare class ShortcutCase {
3
- testHeadingStyleShortcut: (data: TestHeadingStyleData) => () => void;
4
- testShortcutMethod: (data: TestTextStyleData) => () => void;
5
- testQuoteBlockStyleShortcut: () => () => void;
6
- testEmberStyleBrShortcut: () => () => void;
7
- testEmberStyleMermaidPlantumlShortcut: (input: string, embedType: string, emptyReplace: string) => () => void;
8
- testListBlockStyleShortcut: (input: string, expected: string, start: number, level: number) => () => void;
9
- testCodeBlockShortcut: (input: string, expected: string) => () => void;
10
- }
@@ -1 +0,0 @@
1
- import 'cypress-real-events';
@@ -1,8 +0,0 @@
1
- import 'cypress-real-events';
2
- export declare class ListCase {
3
- OrderListCreate: () => () => void;
4
- OrderListAddLevel: () => () => void;
5
- OrderListFirstNodeAddLevel: () => () => void;
6
- OrderListSoluction4: () => () => void;
7
- OrderListPalceholder: () => () => void;
8
- }
@@ -1 +0,0 @@
1
- import 'cypress-real-events';
@@ -1,5 +0,0 @@
1
- import { TocNode } from '../data';
2
- export declare class TocCase {
3
- empty: (input: string) => () => void;
4
- notempty: (input: string, tocNode: TocNode[]) => () => void;
5
- }
@@ -1 +0,0 @@
1
- import 'cypress-real-events';
@@ -1,3 +0,0 @@
1
- import { BlockElement, OnesEditor } from '../../../../@ones-editor/core';
2
- import { ListBlockType } from '../types';
3
- export declare function convertToList(editor: OnesEditor, block: BlockElement, type: ListBlockType): void;