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

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 (218) 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/types.d.ts +1 -0
  89. package/@ones-editor/find-dialog/src/find-dialog.d.ts +1 -0
  90. package/@ones-editor/graph-embed/src/helper/graph-base.d.ts +3 -2
  91. package/@ones-editor/graph-embed/src/helper/graph-block-commands.d.ts +3 -2
  92. package/@ones-editor/heading-collapse/src/heading-collapse-button/drop-handler.d.ts +1 -1
  93. package/@ones-editor/image-embed/package.json +2 -1
  94. package/@ones-editor/image-embed/src/drag-drop/drag-handler.d.ts +4 -0
  95. package/@ones-editor/image-embed/src/drag-drop/handle-drop-over.d.ts +5 -1
  96. package/@ones-editor/image-embed/src/drag-drop/handle-drop.d.ts +1 -1
  97. package/@ones-editor/image-embed/src/empty-image-converter.d.ts +5 -0
  98. package/@ones-editor/image-embed/src/index.d.ts +2 -1
  99. package/@ones-editor/input-handlers/src/enforce-with-document-title/types.d.ts +1 -0
  100. package/@ones-editor/input-handlers/src/i18n/en-us.d.ts +1 -0
  101. package/@ones-editor/input-handlers/src/i18n/zh-cn.d.ts +1 -0
  102. package/@ones-editor/input-handlers/src/markdown-shortcuts/table-converter.d.ts +2 -0
  103. package/@ones-editor/list-block/src/converter/convert-list-to.d.ts +2 -0
  104. package/@ones-editor/list-block/src/converter/convert-to-list.d.ts +14 -0
  105. package/@ones-editor/list-block/src/converter/index.d.ts +2 -14
  106. package/@ones-editor/list-block/src/drop/index.d.ts +1 -1
  107. package/@ones-editor/list-block/src/index.d.ts +3 -2
  108. package/@ones-editor/list-block/src/level/change-multi-levels.d.ts +2 -0
  109. package/@ones-editor/list-block/src/level/decrease-level.d.ts +1 -0
  110. package/@ones-editor/list-block/src/mindmap/index.d.ts +1 -1
  111. package/@ones-editor/list-block/src/mindmap/to-mindmap/index.d.ts +1 -1
  112. package/@ones-editor/list-block/src/types.d.ts +2 -1
  113. package/@ones-editor/list-block/src/utils/list-brother.d.ts +5 -1
  114. package/@ones-editor/markdown-to-doc/src/markdown-to-doc.d.ts +1 -0
  115. package/@ones-editor/markdown-to-doc/src/tokens/block-tokens/latex.d.ts +4 -0
  116. package/@ones-editor/markdown-to-doc/src/tokens/block-tokens/paragraph.d.ts +1 -0
  117. package/@ones-editor/mathjax/package.json +3 -0
  118. package/@ones-editor/mathjax/src/index.d.ts +2 -1
  119. package/@ones-editor/mathjax/src/mathjax-box/convert-mathjax.d.ts +5 -0
  120. package/@ones-editor/mathjax/src/mathjax-box/mathjax-editor.d.ts +2 -2
  121. package/@ones-editor/media-embed/src/core/media-embed.d.ts +3 -1
  122. package/@ones-editor/mention/src/block-mention.d.ts +1 -1
  123. package/@ones-editor/mention/src/dom/mention-button.d.ts +1 -1
  124. package/@ones-editor/mention/src/mention.d.ts +1 -0
  125. package/@ones-editor/mobile-helper/package.json +9 -0
  126. package/@ones-editor/mobile-helper/src/index.d.ts +11 -0
  127. package/@ones-editor/paste-handler/src/paste-handler.d.ts +1 -1
  128. package/@ones-editor/paste-special/src/paste-special-handler.d.ts +2 -2
  129. package/@ones-editor/scroll-container/src/dom-utils.d.ts +9 -0
  130. package/@ones-editor/scroll-container/src/index.d.ts +8 -18
  131. package/@ones-editor/scroll-container/src/observer/container-resize-observer.d.ts +2 -1
  132. package/@ones-editor/scroll-container/src/observer/locating-resize-observer.d.ts +13 -0
  133. package/@ones-editor/scroll-container/src/scroll-listener.d.ts +3 -0
  134. package/@ones-editor/scroll-container/src/types.d.ts +1 -0
  135. package/@ones-editor/sharedb-doc/src/doc/auth-connection.d.ts +3 -3
  136. package/@ones-editor/sharedb-doc/src/doc/sharedb-client.d.ts +3 -3
  137. package/@ones-editor/sharedb-doc/src/doc/sharedb-doc.d.ts +6 -1
  138. package/@ones-editor/sharedb-doc/src/index.d.ts +1 -0
  139. package/@ones-editor/sharedb-doc/src/types.d.ts +3 -2
  140. package/@ones-editor/table-block/src/constant/index.d.ts +1 -0
  141. package/@ones-editor/table-block/src/locale/en-us.d.ts +5 -0
  142. package/@ones-editor/table-block/src/locale/zh-cn.d.ts +5 -0
  143. package/@ones-editor/table-block/src/table-block/border-bar/table-row-column-toolbar.d.ts +1 -0
  144. package/@ones-editor/table-block/src/table-block/convert-table-to.d.ts +2 -0
  145. package/@ones-editor/table-block/src/table-block/doc-table-data.d.ts +1 -1
  146. package/@ones-editor/table-block/src/table-block/selection-range.d.ts +2 -1
  147. package/@ones-editor/table-block/src/table-block/table-creator/index.d.ts +1 -1
  148. package/@ones-editor/table-block/src/table-block/table-resize/resize-gripper.d.ts +1 -1
  149. package/@ones-editor/table-block/src/table-block/table-scroll-events.d.ts +1 -0
  150. package/@ones-editor/table-block/src/types.d.ts +2 -0
  151. package/@ones-editor/templates/package.json +9 -0
  152. package/@ones-editor/templates/src/index.d.ts +4 -0
  153. package/@ones-editor/templates/src/locale/en-us.d.ts +9 -0
  154. package/@ones-editor/templates/src/locale/index.d.ts +1 -0
  155. package/@ones-editor/templates/src/locale/zh-cn.d.ts +9 -0
  156. package/@ones-editor/templates/src/templates/select-template.d.ts +7 -0
  157. package/@ones-editor/templates/src/templates/types.d.ts +14 -0
  158. package/@ones-editor/text-commands/src/locale/en-us.d.ts +1 -0
  159. package/@ones-editor/text-commands/src/locale/zh-cn.d.ts +1 -0
  160. package/@ones-editor/text-commands/src/text-command-provider.d.ts +1 -0
  161. package/@ones-editor/toc/src/heading-scroll/index.d.ts +22 -0
  162. package/@ones-editor/toc/src/heading-scroll/utils.d.ts +7 -0
  163. package/@ones-editor/toc/src/index.d.ts +1 -0
  164. package/@ones-editor/tsconfig.tsbuildinfo +1 -1
  165. package/@ones-editor/ui/src/index.d.ts +3 -3
  166. package/@ones-editor/ui/src/locale/en-us.d.ts +2 -0
  167. package/@ones-editor/ui/src/locale/zh-cn.d.ts +2 -0
  168. package/@ones-editor/ui/src/quick-menu/basic-commands.d.ts +5 -0
  169. package/@ones-editor/ui/src/quick-menu/basic-menu-items.d.ts +10 -10
  170. package/@ones-editor/ui/src/quick-menu/index.d.ts +6 -0
  171. package/@ones-editor/ui/src/quick-menu/inline-box-items.d.ts +8 -14
  172. package/@ones-editor/ui/src/toolbar/box-only.d.ts +2 -0
  173. package/@ones-editor/ui/src/toolbar/commands/paragraph.d.ts +1 -0
  174. package/@ones-editor/ui/src/toolbar/toolbar-handler.d.ts +4 -1
  175. package/@ones-editor/ui/src/tooltips/index.d.ts +4 -0
  176. package/@ones-editor/ui-base/src/auto-suggest/auto-suggest-menu.d.ts +2 -1
  177. package/@ones-editor/ui-base/src/auto-suggest/auto-suggest.d.ts +4 -1
  178. package/@ones-editor/ui-base/src/auto-suggest/index.d.ts +2 -1
  179. package/@ones-editor/ui-base/src/auto-suggest/should-focus-to-editor.d.ts +2 -0
  180. package/@ones-editor/ui-base/src/command-bar/command-bar.d.ts +4 -1
  181. package/@ones-editor/ui-base/src/command-bar/types.d.ts +6 -0
  182. package/@ones-editor/ui-base/src/dialog/index.d.ts +1 -0
  183. package/@ones-editor/ui-base/src/dialog/manual-close-dialog.d.ts +1 -1
  184. package/@ones-editor/ui-base/src/dialog/types.d.ts +4 -0
  185. package/@ones-editor/ui-base/src/index.d.ts +1 -0
  186. package/@ones-editor/ui-base/src/input/create-input.d.ts +1 -0
  187. package/@ones-editor/ui-base/src/item-shortcuts/index.d.ts +1 -0
  188. package/@ones-editor/ui-base/src/list/drop-down-filterable-list.d.ts +2 -2
  189. package/@ones-editor/ui-base/src/locale/en-us.d.ts +1 -0
  190. package/@ones-editor/ui-base/src/locale/zh-cn.d.ts +1 -0
  191. package/@ones-editor/versions/src/types.d.ts +1 -0
  192. package/@ones-editor/versions/src/version-dialog/index.d.ts +3 -1
  193. package/@ones-editor/webpage-embed/src/ui/dialog.d.ts +2 -2
  194. package/@ones-editor/webpage-embed/src/webpage-embed/webpage-items.d.ts +2 -0
  195. package/dist/comments/create-comment-editor.d.ts +4 -7
  196. package/dist/comments/local-doc-comments-provider.d.ts +18 -0
  197. package/dist/comments/{comments-provider.d.ts → sharedb-doc-comments-provider.d.ts} +3 -6
  198. package/dist/index.d.ts +15 -3
  199. package/dist/index.js +242 -288
  200. package/dist/lang/en-us.d.ts +14 -0
  201. package/dist/lang/index.d.ts +1 -0
  202. package/dist/lang/zh-cn.d.ts +14 -0
  203. package/dist/types.d.ts +29 -2
  204. package/package.json +3 -4
  205. package/@ones-editor/e2e/cypress/support/commands.d.ts +0 -19
  206. package/@ones-editor/e2e/cypress/support/e2e.d.ts +0 -1
  207. package/@ones-editor/e2e/cypress.config.d.ts +0 -3
  208. package/@ones-editor/e2e/package.json +0 -13
  209. package/@ones-editor/e2e/src/block-menu/menu-list.cy.d.ts +0 -0
  210. package/@ones-editor/e2e/src/data.d.ts +0 -106
  211. package/@ones-editor/e2e/src/input-handlers/case.d.ts +0 -10
  212. package/@ones-editor/e2e/src/input-handlers/shortcut.cy.d.ts +0 -1
  213. package/@ones-editor/e2e/src/list-block/case.d.ts +0 -8
  214. package/@ones-editor/e2e/src/list-block/list.cy.d.ts +0 -1
  215. package/@ones-editor/e2e/src/toc/case.d.ts +0 -5
  216. package/@ones-editor/e2e/src/toc/toc.cy.d.ts +0 -1
  217. package/@ones-editor/list-block/src/command/covert-to-list.d.ts +0 -3
  218. /package/@ones-editor/block-menu/src/block-menu-button/{drag-drop → drag-preview}/element-to-data-url.d.ts +0 -0
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "@ones-editor/auto-link",
3
+ "version": "1.0.0",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "main": "./src/index.ts",
7
+ "types": "src/index.d.ts"
8
+ }
@@ -0,0 +1,3 @@
1
+ import { ShortcutRecords } from '../../../@ones-editor/core';
2
+ declare const AutoLinkShortcuts: ShortcutRecords;
3
+ export { AutoLinkShortcuts, };
@@ -1,6 +1,7 @@
1
1
  import { BlockCommands, BlockElement, BlockPath, CommandItem, ContainerElement, DocBlock, OnesEditor, OnesEditorBlockHook } from '../../../@ones-editor/core';
2
2
  export default class BlockLockerHook implements OnesEditorBlockHook {
3
3
  create(editor: OnesEditor, path: BlockPath, container: ContainerElement, blockElement: BlockElement, blockData: DocBlock): void;
4
+ update(editor: OnesEditor, path: BlockPath, container: ContainerElement, blockElement: BlockElement, blockData: DocBlock): void;
4
5
  writable(editor: OnesEditor, blockElement: BlockElement): boolean | undefined;
5
6
  commands(editor: OnesEditor, blockElement: BlockElement): BlockCommands;
6
7
  executeCommand: (editor: OnesEditor, blockElement: BlockElement, item: CommandItem) => void;
@@ -0,0 +1,8 @@
1
+ declare const _default: {
2
+ locker: {
3
+ lock: string;
4
+ unlock: string;
5
+ lockedBy: string;
6
+ };
7
+ };
8
+ export default _default;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ declare const _default: {
2
+ locker: {
3
+ lock: string;
4
+ unlock: string;
5
+ lockedBy: string;
6
+ };
7
+ };
8
+ export default _default;
@@ -1,3 +1,6 @@
1
1
  import BlockLockerHook from './hook';
2
2
  import './style.scss';
3
- export { BlockLockerHook };
3
+ import './i18n';
4
+ import BlockLockerPasteHandler from './paste-handler';
5
+ export * from './helper';
6
+ export { BlockLockerHook, BlockLockerPasteHandler };
@@ -0,0 +1,4 @@
1
+ import { DocObject, OnesEditor, OnesEditorInputHandler } from '../../../@ones-editor/core';
2
+ export default class BlockLockerPasteHandler implements OnesEditorInputHandler {
3
+ handleBeforePasteDoc(editor: OnesEditor, doc: DocObject): Promise<boolean>;
4
+ }
@@ -1,3 +1,3 @@
1
1
  import { BlockElement, OnesEditor } from '../../../../../@ones-editor/core';
2
2
  import { BlockMenuItem } from './types';
3
- export declare function getBlockCommandItems(editor: OnesEditor, block: BlockElement): BlockMenuItem[];
3
+ export declare function getBlockCommandItems(editor: OnesEditor, block: BlockElement, excludes?: Set<string>): BlockMenuItem[];
@@ -1,4 +1,4 @@
1
1
  import { BlockElement, OnesEditor } from '../../../../../../@ones-editor/core';
2
2
  import { BlockMenuItem } from '../types';
3
- export declare function getAllInsertBlockItems(editor: OnesEditor): BlockMenuItem[];
3
+ export declare function getAllInsertBlockItems(editor: OnesEditor, source: 'insert-block' | 'insert-block-before'): BlockMenuItem[];
4
4
  export declare function executeInsertBlockCommand(editor: OnesEditor, block: BlockElement, item: BlockMenuItem, insertAbove?: boolean): Promise<BlockElement | null> | undefined;
@@ -1,2 +1,2 @@
1
- import type { BlockElement } from '../../../../../@ones-editor/core';
1
+ import { BlockElement } from '../../../../../@ones-editor/core';
2
2
  export declare function findPreviewElement(block: BlockElement): HTMLElement;
@@ -4,7 +4,7 @@ export declare class DragPreviewImage {
4
4
  private startPosition;
5
5
  constructor(editor: OnesEditor);
6
6
  private dragContainer;
7
- handleDragStart: (e: DragEvent, pendingUrl: string | PromiseLike<string>) => Promise<void>;
7
+ handleDragStart: (e: DragEvent, preview: HTMLElement) => Promise<void>;
8
8
  handleDrag: (e: DragEvent) => void;
9
9
  handleDragEnd: () => void;
10
10
  }
@@ -1,8 +1,8 @@
1
- import { OnesEditor, OnesEditorCustom, OnesEditorInputHandler } from '../../../../../@ones-editor/core';
1
+ import { OnesEditor, OnesEditorCustom, OnesEditorDocs, OnesEditorInputHandler } from '../../../../../@ones-editor/core';
2
2
  export default class CodeBlockCaptionInputHandler implements OnesEditorInputHandler, OnesEditorCustom {
3
3
  constructor(editor: OnesEditor);
4
4
  destroy(): void;
5
5
  handleBeforeKeyDown(editor: OnesEditor, event: KeyboardEvent): boolean;
6
- handleBeforePaste(editor: OnesEditor, event: ClipboardEvent): Promise<boolean>;
6
+ handleBeforePaste(editor: OnesEditor, event: ClipboardEvent | null, docs: OnesEditorDocs): Promise<boolean>;
7
7
  static init(editor: OnesEditor): void;
8
8
  }
@@ -1,5 +1,5 @@
1
- import { BlockElement, ContainerElement } from '../../../../@ones-editor/core';
1
+ import { BlockElement, ContainerElement, OnesEditor } from '../../../../@ones-editor/core';
2
2
  export declare function getTextContainer(codeBlock: BlockElement): ContainerElement;
3
3
  export declare function getCaptionContainer(codeBlock: BlockElement): ContainerElement | null;
4
4
  export declare function getCodeChildContainers(codeBlock: BlockElement): ContainerElement[];
5
- export declare function isCodeTextBlock(block: BlockElement): boolean;
5
+ export declare function isCodeTextBlock(editor: OnesEditor, block: BlockElement): boolean;
@@ -0,0 +1,7 @@
1
+ import { OnesEditor, OnesEditorCustom } from '../../../../@ones-editor/core';
2
+ export default class OnesEditorCodeCaret implements OnesEditorCustom {
3
+ private editor;
4
+ constructor(editor: OnesEditor);
5
+ destroy(): void;
6
+ handleSelectionChange: () => void;
7
+ }
@@ -0,0 +1,4 @@
1
+ import { DocObject, OnesEditor, OnesEditorInputHandler } from '../../../../@ones-editor/core';
2
+ export default class CopyCodeInputHandler implements OnesEditorInputHandler {
3
+ handleBeforeCopy(editor: OnesEditor, event: ClipboardEvent, doc: DocObject): boolean | DocObject | undefined;
4
+ }
@@ -1,6 +1,6 @@
1
1
  import { OnesEditor } from '../../../../@ones-editor/core';
2
2
  import { DocCodeBlockData } from './code-block-data';
3
- export declare function createEmptyCode(editor: OnesEditor): {
3
+ export declare function createEmptyCode(editor: OnesEditor): Promise<{
4
4
  blockData: DocCodeBlockData;
5
5
  focusBlockId: string;
6
- };
6
+ }>;
@@ -1,4 +1,6 @@
1
1
  import CodeBlock, { CodeLineBlock } from './code-block';
2
+ import OnesEditorCodeCaret from './code-caret';
3
+ import CopyCodeInputHandler from './code-copy';
2
4
  import CodeShortcuts from './code-shortcuts';
3
5
  import CodeTextDecorator from './code-text-decorate';
4
- export { CodeBlock, CodeLineBlock, CodeTextDecorator, CodeShortcuts };
6
+ export { CodeBlock, CodeLineBlock, CodeTextDecorator, CodeShortcuts, CopyCodeInputHandler, OnesEditorCodeCaret };
@@ -0,0 +1,3 @@
1
+ import { OnesEditor } from '../../../../../@ones-editor/core';
2
+ export declare function getDefaultLanguage(editor: OnesEditor): string;
3
+ export declare function setDefaultLanguage(editor: OnesEditor, lang: string): void;
@@ -1,3 +1,4 @@
1
- import { BlockElement, OnesEditor } from '../../../../@ones-editor/core';
1
+ import { BlockElement, OnesEditor, OnesEditorComment } from '../../../../@ones-editor/core';
2
2
  import { OnesEditorCommentsProvider } from '../types';
3
- export declare function addCommentToBlock(editor: OnesEditor, block: BlockElement, provider: OnesEditorCommentsProvider): import("@ones-editor/core").OnesEditorComment;
3
+ export declare function updateCommentToBlock(editor: OnesEditor, block: BlockElement, comment: OnesEditorComment): void;
4
+ export declare function addCommentToBlock(editor: OnesEditor, block: BlockElement, provider: OnesEditorCommentsProvider): OnesEditorComment;
@@ -1,3 +1,4 @@
1
- import { OnesEditor, OnesEditorComment, SelectionRange } from '../../../../@ones-editor/core';
1
+ import { OnesEditor, OnesEditorComment, SelectedBlock, SelectionRange } from '../../../../@ones-editor/core';
2
2
  import { OnesEditorCommentsProvider } from '../types';
3
+ export declare function addCommentToSelectedTextBlock(editor: OnesEditor, selectedBlock: SelectedBlock, comment: OnesEditorComment): void;
3
4
  export declare function addCommentToTextBlocks(editor: OnesEditor, range: SelectionRange, provider: OnesEditorCommentsProvider): OnesEditorComment;
@@ -0,0 +1,2 @@
1
+ import { OnesEditor } from '../../../../@ones-editor/core';
2
+ export declare function editorAddComment(editor: OnesEditor): void;
@@ -34,6 +34,7 @@ export declare class CommentItem {
34
34
  getCommentEditor: () => CommentEditor;
35
35
  reloadDoc(): void;
36
36
  edit(): void;
37
+ handleReadonlyChanged: (editor: OnesEditor) => void;
37
38
  destroy(): void;
38
39
  }
39
40
  export {};
@@ -1,19 +1,20 @@
1
1
  import { OnesEditor } from '../../../../@ones-editor/core';
2
- import { OnesEditorCommentsProvider } from '../types';
2
+ import { CommentRoot, OnesEditorCommentsProvider } from '../types';
3
3
  export default class OnesEditorComments {
4
4
  private editor;
5
5
  private provider;
6
- private root;
7
6
  private commentList;
8
7
  private mobileCommentList;
9
8
  private miniCommentList;
10
- constructor(editor: OnesEditor, provider: OnesEditorCommentsProvider, parent?: HTMLElement);
9
+ constructor(editor: OnesEditor, provider: OnesEditorCommentsProvider);
10
+ private get commentOptions();
11
+ get commentProvider(): OnesEditorCommentsProvider;
11
12
  get isMobile(): boolean;
12
13
  destroy(): void;
13
14
  private showComment;
14
15
  showCommentList: (groupId?: string) => void;
16
+ mount(containers: CommentRoot): void;
15
17
  private handleCommentListClose;
16
18
  private handleOnSelectComment;
17
- private handleMiniCommentClose;
18
19
  private handleMiniCommentItemClick;
19
20
  }
@@ -1,6 +1,5 @@
1
1
  import { OnesEditorComment, OnesEditor } from '../../../../@ones-editor/core';
2
2
  export declare function isChildComment(comment: OnesEditorComment): boolean;
3
- export declare function getCommentsRoot(): HTMLDivElement;
4
3
  export declare function getCommentItemCountInGroupItem(groupItemRoot: HTMLElement, commentItemCls?: string): number;
5
4
  export declare function getClosestCommentItemId(element: HTMLElement): string | null;
6
5
  export declare function addGroupActionToElement(element: HTMLElement, action: string): void;
@@ -8,3 +7,4 @@ export declare function getClosestGroupItemActionElement(element: HTMLElement):
8
7
  export declare function getActionFromActionElement(actionElement: HTMLElement): string;
9
8
  export declare function isDisabledActionElement(actionElement: HTMLElement): boolean;
10
9
  export declare function getBlockIdByGroupId(editor: OnesEditor, commentId: string): string | null;
10
+ export declare function getAllCommentInCommentElement(element: HTMLElement): string[];
@@ -1,3 +1,3 @@
1
1
  import { OnesEditor } from '../../../../@ones-editor/core';
2
2
  import type { CommentGroupItem } from './group-item';
3
- export declare function arrangeItems(editor: OnesEditor, items: CommentGroupItem[], activeItem: CommentGroupItem | null): void;
3
+ export declare function arrangeItems(editor: OnesEditor, items: CommentGroupItem[], activeItem: CommentGroupItem | null, fixTop?: number): void;
@@ -3,29 +3,21 @@ import { TypedEmitter } from 'tiny-typed-emitter';
3
3
  import { OnesEditorCommentsEvents, OnesEditorCommentsProvider } from '../types';
4
4
  import CommentGroupList from './group-list';
5
5
  interface CommentsListEvents {
6
- onCommentListClose: () => void;
7
6
  onSelectComment: () => void;
8
7
  }
9
8
  export default class CommentsList extends TypedEmitter<CommentsListEvents> implements OnesEditorCommentsEvents {
10
9
  private editor;
11
10
  private commentsProvider;
12
- private root;
13
- private header;
11
+ root: HTMLElement;
14
12
  private groupsContainer;
15
13
  private list;
16
- constructor(editor: OnesEditor, commentsProvider: OnesEditorCommentsProvider, parent: HTMLElement);
14
+ constructor(editor: OnesEditor, commentsProvider: OnesEditorCommentsProvider);
17
15
  private get commentOptions();
18
16
  destroy(): void;
19
17
  onCreateComment(commentId: string, local: boolean): void;
20
18
  onDeleteComment(commentId: string, local: boolean): void;
21
19
  onUpdateComment(commentId: string, local: boolean): void;
22
- createHeader(): {
23
- header: HTMLDivElement;
24
- count: HTMLSpanElement;
25
- closeButton: HTMLButtonElement;
26
- };
27
20
  createList(): CommentGroupList;
28
- handleCloseButtonClick: () => void;
29
21
  handleSelectionOnComment: () => void;
30
22
  updateCommentCount: () => void;
31
23
  handleActiveItemChanged: () => void;
@@ -33,6 +33,7 @@ export declare class CommentGroupItem extends TypedEmitter<CommentGroupItemEvent
33
33
  handleUpdateChildComment(comment: OnesEditorComment): void;
34
34
  handleUpdateMainComment(comment: OnesEditorComment): void;
35
35
  deleteMainComment(commentId: OnesEditorComment['id']): void;
36
+ handleReadonlyChanged: (editor: OnesEditor) => void;
36
37
  edit(): void;
37
38
  destroy(): void;
38
39
  private handleResize;
@@ -6,7 +6,6 @@ import { CommentGroupItemHandlers } from './handler';
6
6
  export interface CommentGroupListEvents {
7
7
  activeItemChanged: (index: number) => void;
8
8
  itemLayoutUpdated: () => void;
9
- itemCountClicked: () => void;
10
9
  selectionOnComment: () => void;
11
10
  commentCountChanged: () => void;
12
11
  }
@@ -19,7 +18,9 @@ export default class CommentGroupList extends ListBase<CommentWithChildren, Comm
19
18
  private unbindEvents;
20
19
  protected createItem(data: CommentWithChildren, reason: 'init' | 'insert'): CommentGroupItem;
21
20
  protected findInsertPos(data: CommentWithChildren): number;
22
- insertItem(data: CommentWithChildren): CommentGroupItem | null;
21
+ insertItem(data: CommentWithChildren, options?: {
22
+ active: boolean;
23
+ }): CommentGroupItem | null;
23
24
  setActiveItem(index: number): void;
24
25
  get activeIndex(): number;
25
26
  get activeItem(): CommentGroupItem | null;
@@ -32,6 +33,7 @@ export default class CommentGroupList extends ListBase<CommentWithChildren, Comm
32
33
  handleEditorResize: () => void;
33
34
  handleDocChanged: () => void;
34
35
  handleItemResize: () => void;
36
+ handleScroll: (event: WheelEvent) => void;
35
37
  updateGroupItemSwitch: () => void;
36
38
  private updateComments;
37
39
  }
@@ -11,15 +11,12 @@ export declare class MiniCommentsList extends TypedEmitter<MiniCommentsListEvent
11
11
  private commentsProvider;
12
12
  list: MiniGroupList;
13
13
  root: HTMLElement;
14
- header: HTMLElement;
15
- constructor(editor: OnesEditor, commentsProvider: OnesEditorCommentsProvider, parent: HTMLElement);
14
+ constructor(editor: OnesEditor, commentsProvider: OnesEditorCommentsProvider);
16
15
  onCreateComment(commentId: string, local: boolean): void;
17
16
  onDeleteComment(commentId: string, local: boolean): void;
18
17
  onUpdateComment(commentId: string, local: boolean): void;
19
- private createHeader;
20
18
  private createList;
21
19
  private handleListContainerClick;
22
- private closeMiniComment;
23
20
  show(): void;
24
21
  hide(): void;
25
22
  destroy(): void;
@@ -7,11 +7,11 @@ interface MobileCommentsListEvents {
7
7
  export declare class MobileCommentsList extends TypedEmitter<MobileCommentsListEvents> implements OnesEditorCommentsEvents {
8
8
  private editor;
9
9
  private commentsProvider;
10
- private root;
10
+ root: HTMLDivElement;
11
11
  private list;
12
12
  private mask;
13
13
  private pullInfoContainer;
14
- constructor(editor: OnesEditor, commentsProvider: OnesEditorCommentsProvider, parent: HTMLElement);
14
+ constructor(editor: OnesEditor, commentsProvider: OnesEditorCommentsProvider);
15
15
  onCreateComment(commentId: string, local: boolean): void;
16
16
  onDeleteComment(commentId: string, local: boolean): void;
17
17
  onUpdateComment(commentId: string, local: boolean): void;
@@ -8,3 +8,4 @@ export { OnesEditorComments };
8
8
  export type { CommentItem } from './comment-item';
9
9
  export type { CommentGroupItem } from './comments-list/group-item';
10
10
  export { removeCommentFromBlock } from './actions/remove-comment-from-block';
11
+ export { editorAddComment } from './actions/editor-add-comment';
@@ -1,14 +1,22 @@
1
1
  import { DocObject, LocalDoc, OnesEditor, OnesEditorComment } from '../../../@ones-editor/core';
2
- import { AuthMessage } from '../../../@ones-editor/sharedb-doc';
3
2
  export type CommentData = {
4
3
  [p in string]: unknown;
5
4
  };
5
+ export interface OnesEditorCommentController {
6
+ showCommentList: () => void;
7
+ }
8
+ export type CommentRoot = {
9
+ container?: HTMLElement;
10
+ miniContainer?: HTMLElement;
11
+ mobileContainer?: HTMLElement;
12
+ };
6
13
  export interface OnesEditorCommentOptions {
7
- hideHeader?: boolean;
14
+ controller: OnesEditorCommentController;
8
15
  disableReply?: boolean;
9
16
  disableEdit?: boolean;
10
- onUpdateLayout?: (editor: OnesEditor, data: CommentData) => void;
11
17
  pullThreshold?: number;
18
+ onUpdateLayout?: (editor: OnesEditor, data: CommentData) => void;
19
+ onCommentCountChange?: (count: number) => void;
12
20
  }
13
21
  export interface OnesEditorCommentsEvents {
14
22
  onCreateComment: (commentId: string, local: boolean) => void;
@@ -16,7 +24,6 @@ export interface OnesEditorCommentsEvents {
16
24
  onUpdateComment: (commentId: string, local: boolean) => void;
17
25
  }
18
26
  export interface OnesEditorCommentsProvider {
19
- getAuth: () => AuthMessage;
20
27
  getComments: () => OnesEditorComment[];
21
28
  getComment: (id: string) => OnesEditorComment;
22
29
  getCommentDoc: (commentId: string) => DocObject;
@@ -1,3 +1,4 @@
1
1
  import { BlockElement, OnesEditor } from '../../types';
2
2
  import './anchor.scss';
3
3
  export declare function createBlockAnchor(editor: OnesEditor, block: BlockElement, id: string, refClientRect?: DOMRect): HTMLElement;
4
+ export declare function createBlockCaretAnchor(editor: OnesEditor, block: BlockElement, offset: number, id: string): HTMLElement;
@@ -7,6 +7,7 @@ export declare function isVisibleBlock(block: BlockElement): boolean;
7
7
  export declare function getBlockId(block: BlockElement): string;
8
8
  export declare function getBlockType(block: BlockElement): string;
9
9
  export declare function getParentBlock(node: Node): BlockElement | null;
10
+ export declare function getParentBlockExcludeSelf(node: Node): BlockElement | null;
10
11
  export declare function getParentContainer(block: BlockElement): ContainerElement;
11
12
  export declare function getBlockContent(block: BlockElement): BlockContentElement;
12
13
  export declare function getBlockTools(block: BlockElement): BlockToolsElement;
@@ -1,4 +1,5 @@
1
1
  import TextBlock, { updateTextBlockContent } from './text-block';
2
2
  export * from './base/child';
3
3
  export * from './base/text-offset';
4
+ export * from './base/block-text';
4
5
  export { TextBlock, updateTextBlockContent, };
@@ -0,0 +1,3 @@
1
+ import { DocBlock, DocObject } from '../../../doc';
2
+ import { OnesEditor } from '../../../types';
3
+ export declare function textBlockToMarkdown(editor: OnesEditor, blockData: DocBlock, doc: DocObject): string;
@@ -0,0 +1,3 @@
1
+ import { DocBlockText, DocObject } from '../../../doc';
2
+ import { OnesEditor } from '../../../types';
3
+ export declare function textBlockToHtml(editor: OnesEditor, ops: DocBlockText, doc: DocObject): string;
@@ -0,0 +1,3 @@
1
+ import { DocBlockText, DocObject } from '../../../doc';
2
+ import { OnesEditor } from '../../../types';
3
+ export declare function textBlockToText(editor: OnesEditor, ops: DocBlockText, doc: DocObject): string;
@@ -1,7 +1,8 @@
1
1
  import { DocObject } from '../../doc';
2
2
  import { BlockElement, OnesEditor } from '../../types';
3
- export declare function docToPlainText(editor: OnesEditor, doc: DocObject): string;
3
+ export declare function injectDocToHtmlFragment(htmlFragment: string, doc: DocObject): string;
4
4
  export declare function addMetaToDoc(editor: OnesEditor, doc: DocObject): void;
5
- export declare function editorCopy(editor: OnesEditor, event: ClipboardEvent): void;
5
+ export type BeforeCopyCallback = (editor: OnesEditor, event: ClipboardEvent, doc: DocObject) => DocObject | boolean | undefined;
6
+ export declare function editorCopy(editor: OnesEditor, event: ClipboardEvent, beforeCopy?: BeforeCopyCallback): void;
6
7
  export declare function editorCopyWithoutEvent(editor: OnesEditor): void;
7
8
  export declare function editorCopyBlock(editor: OnesEditor, block: BlockElement): Promise<boolean>;
@@ -10,6 +10,8 @@ export interface EditorInputCallbacks {
10
10
  onFocus: () => void;
11
11
  onBlur: () => void;
12
12
  onPaste: (event: ClipboardEvent) => void;
13
+ onPasteText: (text: string) => void;
14
+ onCopy: (event: ClipboardEvent) => void;
13
15
  addHandler: (handler: OnesEditorInputHandler) => void;
14
16
  removeHandler: (handler: OnesEditorInputHandler) => void;
15
17
  defaultInsertText: (editor: OnesEditor, containerId: string, blockIndex: number, offset: number, text: string) => void;
@@ -36,6 +38,7 @@ export declare class EditorInput implements OnesEditorInput {
36
38
  handleCopy: (event: ClipboardEvent) => void;
37
39
  handleCut: (event: ClipboardEvent) => void;
38
40
  handlePaste: (event: ClipboardEvent) => void;
41
+ handlePasteText: (text: string) => void;
39
42
  handleChanged(action: OnesEditorUndoAction): void;
40
43
  handleRemoteChanged(type: RemoteChangeType): void;
41
44
  addHandler(handler: OnesEditorInputHandler): void;
@@ -1 +1 @@
1
- export { editorCopyBlock } from './clipboard/copy';
1
+ export { editorCopyBlock, addMetaToDoc, injectDocToHtmlFragment } from './clipboard/copy';
@@ -1,4 +1,4 @@
1
- import { OnesEditor, ContainerElement } from '../types';
1
+ import { OnesEditor, ContainerElement, BlockElement } from '../types';
2
2
  export declare class RootContainer {
3
3
  private editor;
4
4
  rootContainer: ContainerElement;
@@ -10,6 +10,7 @@ export declare class RootContainer {
10
10
  handleContextMenu: (event: Event) => void;
11
11
  handleResize: () => void;
12
12
  handleClick: (event: MouseEvent) => void;
13
+ handleBlockClick: (event: MouseEvent, block: BlockElement, elem: Element) => void;
13
14
  handleDblClick: (event: MouseEvent) => void;
14
15
  handleMouseDown: (event: MouseEvent) => void;
15
16
  handleMouseMove: (event: MouseEvent) => void;
@@ -1,3 +1,3 @@
1
1
  import { DocBlock, DocObject } from '../doc';
2
- import { OnesEditor } from '../types';
3
- export declare function blockToHtml(editor: OnesEditor, blockData: DocBlock, doc: DocObject): string;
2
+ import { BlockPath, OnesEditor } from '../types';
3
+ export declare function blockToHtml(editor: OnesEditor, blockData: DocBlock, doc: DocObject, path: BlockPath): string;
@@ -1,3 +1,3 @@
1
1
  import { DocBlock, DocObject } from '../doc';
2
- import { OnesEditor } from '../types';
3
- export declare function blockToMarkdown(editor: OnesEditor, blockData: DocBlock, doc: DocObject): string;
2
+ import { BlockPath, OnesEditor } from '../types';
3
+ export declare function blockToMarkdown(editor: OnesEditor, blockData: DocBlock, doc: DocObject, path: BlockPath): string;
@@ -1,3 +1,3 @@
1
1
  import { DocBlock, DocObject } from '../doc';
2
- import { OnesEditor } from '../types';
3
- export declare function blockToText(editor: OnesEditor, blockData: DocBlock, doc: DocObject): string;
2
+ import { BlockPath, OnesEditor } from '../types';
3
+ export declare function blockToText(editor: OnesEditor, blockData: DocBlock, doc: DocObject, path: BlockPath): string;
@@ -179,15 +179,19 @@ export interface RecognizeLinkResult {
179
179
  providerName?: string;
180
180
  url: string;
181
181
  }
182
+ export interface InsertBlockOptions {
183
+ noScroll?: boolean;
184
+ }
185
+ export type UpdateBlockOptions = InsertBlockOptions;
182
186
  export interface OnesEditorDoc {
183
187
  registerCallback: (callbacks: OnesEditorDocCallbacks) => void;
184
188
  unregisterCallback: (callbacks: OnesEditorDocCallbacks) => void;
185
189
  toJSON: () => DocObject;
186
190
  getContainerBlocks: (containerId: string) => DocBlock[];
187
191
  getBlockData: (containerId: string, blockIndex: number) => DocBlock;
188
- localUpdateBlockText: (containerId: string, blockIndex: number, actions: DocBlockTextActions) => DocBlockText;
192
+ localUpdateBlockText: (containerId: string, blockIndex: number, actions: DocBlockTextActions, options?: UpdateBlockOptions) => DocBlockText;
189
193
  localUpdateBlockData: (containerId: string, blockIndex: number, delta: DocBlockDelta, newRange: OnesEditorDocRange) => DocBlock;
190
- localInsertBlock: (containerId: string, blockIndex: number, data: DocBlock, newRange: OnesEditorDocRange) => DocBlock;
194
+ localInsertBlock: (containerId: string, blockIndex: number, data: DocBlock, newRange: OnesEditorDocRange, options?: InsertBlockOptions) => DocBlock;
191
195
  localDeleteBlock: (containerId: string, blockIndex: number, newRange: OnesEditorDocRange) => DocBlock;
192
196
  localInsertChildContainer: (containerId: string, blocks: DocBlock[]) => void;
193
197
  localDeleteChildContainers: (containerIds: string[]) => void;
@@ -3,3 +3,4 @@ export declare const FILL_CHAR = "\u200B";
3
3
  export declare function toPlainText(ops: Op[], options?: {
4
4
  boxReplacement: string;
5
5
  }): string;
6
+ export declare function toPlainTextKeepLength(ops: Op[]): string;
@@ -1,3 +1,3 @@
1
- import { DocBlock, OnesEditorDocRange } from '../../doc';
1
+ import { InsertBlockOptions, DocBlock, OnesEditorDocRange } from '../../doc';
2
2
  import { OnesEditor } from '../../types';
3
- export declare function editorAutoInsertBlock(editor: OnesEditor, blockData: DocBlock, containerId?: string, blockIndex?: number, newRange?: OnesEditorDocRange): import("../../types").BlockElement;
3
+ export declare function editorAutoInsertBlock(editor: OnesEditor, blockData: DocBlock, containerId?: string, blockIndex?: number, newRange?: OnesEditorDocRange, insertBlockOptions?: InsertBlockOptions): import("../../types").BlockElement;
@@ -1,6 +1,8 @@
1
1
  import { BlockElement, BreakTextOptions, OnesEditor } from '../../types';
2
+ import { DocBlockAttributes } from '../../doc';
2
3
  export interface BreakTextBlockResult {
3
4
  block: BlockElement;
4
5
  newBlock: BlockElement;
5
6
  }
7
+ export declare function copyBlockAttributes(editor: OnesEditor, block: BlockElement): DocBlockAttributes;
6
8
  export declare function editorBreakTextBlock(editor: OnesEditor, block: BlockElement, offset: number, options?: BreakTextOptions): BreakTextBlockResult;
@@ -1,2 +1,2 @@
1
- import { OnesEditor, BlockElement } from '../../types';
2
- export declare function editorDeleteBlockText(editor: OnesEditor, block: BlockElement, offset: number, count: number): number;
1
+ import { OnesEditor, BlockElement, InsertTextOptions } from '../../types';
2
+ export declare function editorDeleteBlockText(editor: OnesEditor, block: BlockElement, offset: number, count: number, options?: InsertTextOptions): number;
@@ -1,3 +1,2 @@
1
1
  import { OnesEditor } from '../../types';
2
- export declare function editorSelectEnd(editor: OnesEditor): void;
3
2
  export declare function editorFocusToEnd(editor: OnesEditor): void;
@@ -1,3 +1,3 @@
1
- import { DocBlock, OnesEditorDocRange } from '../../doc';
1
+ import { DocBlock, InsertBlockOptions, OnesEditorDocRange } from '../../doc';
2
2
  import { OnesEditor, BlockElement } from '../../types';
3
- export declare function editorInsertBlock(editor: OnesEditor, containerId: string, blockIndex: number, blockData: DocBlock, newRange: OnesEditorDocRange): BlockElement;
3
+ export declare function editorInsertBlock(editor: OnesEditor, containerId: string, blockIndex: number, blockData: DocBlock, newRange: OnesEditorDocRange, options?: InsertBlockOptions): BlockElement;
@@ -1,6 +1,6 @@
1
- import { OnesEditor, BlockElement } from '../../types';
1
+ import { OnesEditor, BlockElement, InsertTextOptions } from '../../types';
2
2
  import { DocBlockText, DocBox } from '../../doc';
3
- export declare function editorInsertTextToBlock(editor: OnesEditor, block: BlockElement, offset: number, text: string | DocBlockText): DocBlockText;
3
+ export declare function editorInsertTextToBlock(editor: OnesEditor, block: BlockElement, offset: number, text: string | DocBlockText, options?: InsertTextOptions): DocBlockText;
4
4
  export declare function editorInsertBoxToBlock(editor: OnesEditor, block: BlockElement, offset: number, boxData: DocBox): DocBlockText;
5
5
  export declare function editorInsertTextToBlockEx(editor: OnesEditor, text: string | DocBlockText, containerId: string, blockIndex: number, offset: number): DocBlockText;
6
6
  export declare function editorInsertText(editor: OnesEditor, text: string | DocBlockText): void;
@@ -1,5 +1,5 @@
1
1
  import { EditorDocLocalActionCallbacks, OnesEditor } from '../types';
2
- import { BuildResourceUrlOptions, DocBlock, DocBlockDelta, DocBlockText, DocBlockTextActions, DocObject, OnesEditorDoc, OnesEditorDocCallbacks, OnesEditorDocRange, OnesEditorDocServerMeta, OnesEditorDocStatus, UploadResourceOptions, UploadResourceResult } from '../doc';
2
+ import { BuildResourceUrlOptions, InsertBlockOptions, DocBlock, DocBlockDelta, DocBlockText, DocBlockTextActions, DocObject, OnesEditorDoc, OnesEditorDocCallbacks, OnesEditorDocRange, OnesEditorDocServerMeta, OnesEditorDocStatus, UploadResourceOptions, UploadResourceResult, UpdateBlockOptions } from '../doc';
3
3
  import { EventCallbacks } from '../../utils';
4
4
  export default class EditorDoc extends EventCallbacks<OnesEditorDocCallbacks> implements OnesEditorDoc, OnesEditorDocCallbacks {
5
5
  private editor;
@@ -13,9 +13,10 @@ export default class EditorDoc extends EventCallbacks<OnesEditorDocCallbacks> im
13
13
  getVersionHelper(): import("../doc").OnesEditorDocVersionHelper | undefined;
14
14
  getContainerBlocks(containerId: string): DocBlock[];
15
15
  getBlockData(containerId: string, blockIndex: number): DocBlock;
16
- localUpdateBlockText(containerId: string, blockIndex: number, actions: DocBlockTextActions): DocBlockText;
16
+ verifyBlockWritable(containerId: string, blockIndex: number): void;
17
+ localUpdateBlockText(containerId: string, blockIndex: number, actions: DocBlockTextActions, options?: UpdateBlockOptions): DocBlockText;
17
18
  localUpdateBlockData(containerId: string, blockIndex: number, delta: DocBlockDelta, newRange: OnesEditorDocRange): DocBlock;
18
- localInsertBlock(containerId: string, blockIndex: number, data: DocBlock, newRange: OnesEditorDocRange): DocBlock;
19
+ localInsertBlock(containerId: string, blockIndex: number, data: DocBlock, newRange: OnesEditorDocRange, options?: InsertBlockOptions): DocBlock;
19
20
  localDeleteBlock(containerId: string, blockIndex: number, newRange: OnesEditorDocRange): DocBlock;
20
21
  localDeleteChildContainers(containerIds: string[]): void;
21
22
  localInsertChildContainer(containerId: string, blocks: DocBlock[]): void;
@@ -38,4 +39,5 @@ export default class EditorDoc extends EventCallbacks<OnesEditorDocCallbacks> im
38
39
  getRemoteUsers(): import("../doc").OnesEditorRemoteUsers;
39
40
  destroy(): void;
40
41
  getServerMeta(): OnesEditorDocServerMeta;
42
+ reset(doc: OnesEditorDoc): void;
41
43
  }
@@ -7,6 +7,7 @@ export * from './decorators';
7
7
  export * from './doc';
8
8
  export * from './editor';
9
9
  export * from './selection';
10
+ export * from './selection/actions';
10
11
  export * from './keyboard';
11
12
  export * from './converter';
12
13
  export * from './command-providers';