@ones-editor/editor 2.1.7-beta.3 → 2.1.7-beta.31

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 (255) hide show
  1. package/@ones-editor/block-menu/src/block-menu-button/menu-button/index.d.ts +1 -1
  2. package/@ones-editor/block-menu/src/index.d.ts +0 -1
  3. package/@ones-editor/block-padding/src/index.d.ts +1 -1
  4. package/@ones-editor/block-resizer/src/index.d.ts +1 -0
  5. package/@ones-editor/callout-block/src/callout-block/callout-quick-menu-item-filter.d.ts +3 -4
  6. package/@ones-editor/callout-block/src/index.d.ts +1 -0
  7. package/@ones-editor/comments/src/block-hook/block-comment-hook.d.ts +10 -0
  8. package/@ones-editor/comments/src/comment-quick-reply/index.d.ts +1 -0
  9. package/@ones-editor/comments/src/comments-helper/get-comment-abstract.d.ts +2 -1
  10. package/@ones-editor/comments/src/index.d.ts +2 -1
  11. package/@ones-editor/comments/src/text-comments/comments-command-provider.d.ts +4 -3
  12. package/@ones-editor/core/src/core/block-renderers/block-renderers.d.ts +1 -0
  13. package/@ones-editor/core/src/core/blocks/common/execute-block-command.d.ts +2 -2
  14. package/@ones-editor/core/src/core/blocks/complex-blocks/complex-block-helper.d.ts +2 -5
  15. package/@ones-editor/core/src/core/blocks/text-blocks/base/child.d.ts +1 -2
  16. package/@ones-editor/core/src/core/blocks/text-blocks/base/line-breaks.d.ts +1 -2
  17. package/@ones-editor/core/src/core/blocks/text-blocks/base/range.d.ts +1 -2
  18. package/@ones-editor/core/src/core/blocks/text-blocks/base/text-offset.d.ts +1 -2
  19. package/@ones-editor/core/src/core/blocks/text-blocks/text-block/to-plain-html.d.ts +2 -2
  20. package/@ones-editor/core/src/core/command-providers/abstract-providers.d.ts +25 -0
  21. package/@ones-editor/core/src/core/command-providers/block-attributes.d.ts +16 -0
  22. package/@ones-editor/core/src/core/command-providers/commands/index.d.ts +2 -0
  23. package/@ones-editor/core/src/core/command-providers/commands/inject-source.d.ts +3 -0
  24. package/@ones-editor/core/src/core/command-providers/commands/merge-commands.d.ts +4 -0
  25. package/@ones-editor/core/src/core/command-providers/commands/range-commands.d.ts +2 -5
  26. package/@ones-editor/core/src/core/command-providers/editor-command-providers.d.ts +5 -14
  27. package/@ones-editor/core/src/core/command-providers/index.d.ts +3 -1
  28. package/@ones-editor/core/src/core/composition/editor-input.d.ts +2 -2
  29. package/@ones-editor/core/src/core/composition/index.d.ts +1 -0
  30. package/@ones-editor/core/src/core/containers/root-container.d.ts +3 -2
  31. package/@ones-editor/core/src/core/doc/doc.d.ts +1 -1
  32. package/@ones-editor/core/src/core/doc/rich-text/text-style.d.ts +2 -0
  33. package/@ones-editor/core/src/core/editor/actions/clear-selected-contents.d.ts +2 -2
  34. package/@ones-editor/core/src/core/editor/editor-dom/dom-events.d.ts +2 -2
  35. package/@ones-editor/core/src/core/editor/editor-dom/editor-dom.d.ts +1 -0
  36. package/@ones-editor/core/src/core/editor/index.d.ts +1 -1
  37. package/@ones-editor/core/src/core/input-handler/input-handler.d.ts +2 -1
  38. package/@ones-editor/core/src/core/insertions/editor-insertions.d.ts +1 -0
  39. package/@ones-editor/core/src/core/selection/actions/index.d.ts +2 -1
  40. package/@ones-editor/core/src/core/selection/adjust-selection-pos.d.ts +5 -1
  41. package/@ones-editor/core/src/core/selection/index.d.ts +1 -0
  42. package/@ones-editor/core/src/core/selection/select-handler.d.ts +3 -3
  43. package/@ones-editor/core/src/core/types.d.ts +45 -30
  44. package/@ones-editor/core/src/core/undo-manager/actions/action.d.ts +5 -1
  45. package/@ones-editor/core/src/core/undo-manager/actions/block-action.d.ts +1 -0
  46. package/@ones-editor/core/src/core/undo-manager/actions/update-block-data-action.d.ts +1 -0
  47. package/@ones-editor/core/src/helper/hovering-block.d.ts +3 -4
  48. package/@ones-editor/core/src/utils/animate-scroll.d.ts +2 -0
  49. package/@ones-editor/core/src/utils/dom.d.ts +4 -1
  50. package/@ones-editor/core/src/utils/drag-drop.d.ts +8 -3
  51. package/@ones-editor/embed-block-helper/src/block-properties/embed-block-properties.d.ts +6 -5
  52. package/@ones-editor/embed-block-helper/src/block-resizer/index.d.ts +1 -0
  53. package/@ones-editor/excalidraw/package.json +4 -0
  54. package/@ones-editor/file/src/locale/en-us.d.ts +1 -0
  55. package/@ones-editor/file/src/locale/ja-jp.d.ts +1 -0
  56. package/@ones-editor/file/src/locale/zh-cn.d.ts +1 -0
  57. package/@ones-editor/graph-embed/src/helper/graph-block-commands.d.ts +5 -19
  58. package/@ones-editor/html-to-doc/src/html-to-doc/normal-html/underline.d.ts +1 -0
  59. package/@ones-editor/image-embed/src/hovering-toolbar/index.d.ts +1 -1
  60. package/@ones-editor/image-embed/src/image-object.d.ts +1 -0
  61. package/@ones-editor/image-embed/src/splitter-resizer/index.d.ts +3 -3
  62. package/@ones-editor/input-handlers/src/i18n/en-us.d.ts +1 -0
  63. package/@ones-editor/input-handlers/src/i18n/ja-jp.d.ts +1 -0
  64. package/@ones-editor/input-handlers/src/i18n/zh-cn.d.ts +1 -0
  65. package/@ones-editor/layout-block/src/command-filter.d.ts +6 -0
  66. package/@ones-editor/layout-block/src/index.d.ts +1 -0
  67. package/@ones-editor/list-block/src/index.d.ts +2 -1
  68. package/@ones-editor/list-block/src/list-data/index.d.ts +2 -0
  69. package/@ones-editor/main-toolbar/src/index.d.ts +2 -0
  70. package/@ones-editor/main-toolbar/src/items/comment.d.ts +8 -0
  71. package/@ones-editor/main-toolbar/src/items/find.d.ts +8 -0
  72. package/@ones-editor/main-toolbar/src/items/font-style.d.ts +13 -1
  73. package/@ones-editor/main-toolbar/src/items/index.d.ts +8 -4
  74. package/@ones-editor/main-toolbar/src/items/insert.d.ts +12 -0
  75. package/@ones-editor/main-toolbar/src/items/link.d.ts +1 -1
  76. package/@ones-editor/main-toolbar/src/items/list.d.ts +4 -4
  77. package/@ones-editor/main-toolbar/src/items/quote.d.ts +1 -1
  78. package/@ones-editor/main-toolbar/src/items/text-color.d.ts +39 -2
  79. package/@ones-editor/main-toolbar/src/items/undo.d.ts +18 -0
  80. package/@ones-editor/main-toolbar/src/locale/en-us.d.ts +9 -0
  81. package/@ones-editor/main-toolbar/src/locale/ja-jp.d.ts +9 -0
  82. package/@ones-editor/main-toolbar/src/locale/zh-cn.d.ts +9 -0
  83. package/@ones-editor/markdown-to-doc/src/custom/tag.d.ts +8 -0
  84. package/@ones-editor/markdown-to-doc/src/tokens/inline-tokens/custom-tag.d.ts +4 -0
  85. package/@ones-editor/markdown-to-doc/src/tokens/inline-tokens/html.d.ts +2 -0
  86. package/@ones-editor/mathjax/package.json +2 -1
  87. package/@ones-editor/mathjax/src/mathjax-box/mathjax-editor.d.ts +1 -0
  88. package/@ones-editor/mathjax/src/mathjax-state/index.d.ts +2 -0
  89. package/@ones-editor/media-embed/src/core/hovering-toolbar/index.d.ts +3 -10
  90. package/@ones-editor/media-embed/src/utils/dom.d.ts +2 -0
  91. package/@ones-editor/mention/src/locale/en-us.d.ts +3 -0
  92. package/@ones-editor/mention/src/locale/ja-jp.d.ts +3 -0
  93. package/@ones-editor/mention/src/locale/zh-cn.d.ts +3 -0
  94. package/@ones-editor/mention/src/mention.d.ts +24 -1
  95. package/@ones-editor/mobile-helper/src/cursor-toolbar.d.ts +15 -0
  96. package/@ones-editor/mobile-helper/src/embed-mask.d.ts +10 -0
  97. package/@ones-editor/mobile-helper/src/fixed-toolbar/active-observer.d.ts +11 -0
  98. package/@ones-editor/mobile-helper/src/fixed-toolbar/fixed-providers.d.ts +6 -0
  99. package/@ones-editor/mobile-helper/src/fixed-toolbar/index.d.ts +18 -0
  100. package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/align-dropdown.d.ts +9 -0
  101. package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/group.d.ts +7 -0
  102. package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/insert-menu.d.ts +13 -0
  103. package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/insert.d.ts +8 -0
  104. package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/paragraph.d.ts +9 -0
  105. package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/tab-provider.d.ts +10 -0
  106. package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/text-dropdown.d.ts +9 -0
  107. package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/turn-into.d.ts +8 -0
  108. package/@ones-editor/mobile-helper/src/fixed-toolbar/toolbar-handler.d.ts +15 -0
  109. package/@ones-editor/mobile-helper/src/index.d.ts +14 -2
  110. package/@ones-editor/mobile-helper/src/locale/en-us.d.ts +9 -0
  111. package/@ones-editor/mobile-helper/src/locale/index.d.ts +1 -0
  112. package/@ones-editor/mobile-helper/src/locale/ja-jp.d.ts +9 -0
  113. package/@ones-editor/mobile-helper/src/locale/zh-cn.d.ts +9 -0
  114. package/@ones-editor/mobile-helper/src/selection-gripper/index.d.ts +19 -0
  115. package/@ones-editor/mobile-helper/src/selection-gripper/select-handle.d.ts +3 -0
  116. package/@ones-editor/scroll-container/src/utils.d.ts +1 -1
  117. package/@ones-editor/sharedb-doc/src/types.d.ts +3 -3
  118. package/@ones-editor/sharedb-doc/src/versions/sharedb-server.d.ts +1 -1
  119. package/@ones-editor/sharedb-doc/src/versions/simple-client.d.ts +1 -1
  120. package/@ones-editor/table-block/src/commands/index.d.ts +2 -0
  121. package/@ones-editor/table-block/src/commands/mobile-command-provider.d.ts +12 -0
  122. package/@ones-editor/table-block/src/commands/table-block-commands.d.ts +4 -3
  123. package/@ones-editor/table-block/src/index.d.ts +2 -1
  124. package/@ones-editor/table-block/src/locale/en-us.d.ts +5 -0
  125. package/@ones-editor/table-block/src/locale/ja-jp.d.ts +5 -0
  126. package/@ones-editor/table-block/src/locale/zh-cn.d.ts +5 -0
  127. package/@ones-editor/table-block/src/table-block/cell-menu/table-cell-dom.d.ts +6 -0
  128. package/@ones-editor/table-block/src/table-block/table-resize/resize-drag-drop.d.ts +4 -4
  129. package/@ones-editor/text-commands/src/index.d.ts +1 -3
  130. package/@ones-editor/to-docx/src/doc2other/core.d.ts +1 -1
  131. package/@ones-editor/to-docx/src/doc2other/table.d.ts +1 -0
  132. package/@ones-editor/to-docx/src/errors.d.ts +3 -0
  133. package/@ones-editor/to-docx/src/index.d.ts +2 -0
  134. package/@ones-editor/tsconfig.tsbuildinfo +1 -1
  135. package/@ones-editor/ui/src/block-menu/block-command-providers.d.ts +8 -0
  136. package/@ones-editor/{block-menu → ui}/src/block-menu/index.d.ts +3 -1
  137. package/@ones-editor/ui/src/box-helper/standard-box-commands.d.ts +10 -0
  138. package/@ones-editor/ui/src/box-helper/standard-box-provider.d.ts +9 -0
  139. package/@ones-editor/ui/src/index.d.ts +30 -8
  140. package/@ones-editor/ui/src/link-popup/mobile-link-popup.d.ts +22 -0
  141. package/@ones-editor/ui/src/link-popup/types.d.ts +34 -0
  142. package/@ones-editor/ui/src/link-popup/web-link-popup.d.ts +19 -0
  143. package/@ones-editor/ui/src/locale/en-us.d.ts +14 -0
  144. package/@ones-editor/ui/src/locale/ja-jp.d.ts +14 -0
  145. package/@ones-editor/ui/src/locale/zh-cn.d.ts +14 -0
  146. package/@ones-editor/ui/src/providers/align-dropdown.d.ts +10 -0
  147. package/@ones-editor/ui/src/providers/align.d.ts +11 -0
  148. package/@ones-editor/ui/src/providers/block-hook-provider.d.ts +16 -0
  149. package/@ones-editor/ui/src/providers/clipboard-provider.d.ts +20 -0
  150. package/@ones-editor/ui/src/providers/color-provider.d.ts +18 -0
  151. package/@ones-editor/ui/src/providers/edit-link-provider.d.ts +6 -0
  152. package/@ones-editor/ui/src/providers/heading.d.ts +13 -0
  153. package/@ones-editor/ui/src/providers/inline-code-provider.d.ts +10 -0
  154. package/@ones-editor/ui/src/providers/inline-style-provider.d.ts +10 -0
  155. package/@ones-editor/ui/src/providers/insert-above.d.ts +9 -0
  156. package/@ones-editor/ui/src/providers/insert-after.d.ts +9 -0
  157. package/@ones-editor/ui/src/providers/insert-box-provider.d.ts +12 -0
  158. package/@ones-editor/ui/src/providers/insert-group.d.ts +7 -0
  159. package/@ones-editor/ui/src/providers/insert-menu.d.ts +16 -0
  160. package/@ones-editor/ui/src/providers/link.d.ts +12 -0
  161. package/@ones-editor/ui/src/providers/list.d.ts +13 -0
  162. package/@ones-editor/ui/src/providers/mobile-link-provider.d.ts +13 -0
  163. package/@ones-editor/ui/src/providers/paragraph.d.ts +9 -0
  164. package/@ones-editor/ui/src/providers/proxy-provider.d.ts +9 -0
  165. package/@ones-editor/ui/src/providers/quoted.d.ts +10 -0
  166. package/@ones-editor/ui/src/providers/script-with-dropdown.d.ts +9 -0
  167. package/@ones-editor/ui/src/providers/selection-provider.d.ts +9 -0
  168. package/@ones-editor/ui/src/providers/text-command-provider.d.ts +16 -0
  169. package/@ones-editor/ui/src/providers/text-fixed-provider.d.ts +16 -0
  170. package/@ones-editor/ui/src/providers/text-script-provider.d.ts +10 -0
  171. package/@ones-editor/ui/src/providers/text-styles.d.ts +9 -0
  172. package/@ones-editor/ui/src/providers/turn-into.d.ts +9 -0
  173. package/@ones-editor/ui/src/providers/utils/add-section.d.ts +2 -0
  174. package/@ones-editor/ui/src/{quick-menu → providers/utils}/basic-commands.d.ts +1 -2
  175. package/@ones-editor/ui/src/providers/utils/clipboard.d.ts +6 -0
  176. package/@ones-editor/ui/src/providers/utils/index.d.ts +2 -0
  177. package/@ones-editor/ui/src/providers/utils/inject-block-options.d.ts +8 -0
  178. package/@ones-editor/ui/src/providers/utils/text-styles.d.ts +6 -0
  179. package/@ones-editor/ui/src/quick-menu/index.d.ts +7 -19
  180. package/@ones-editor/ui/src/quick-menu/quick-command-providers.d.ts +8 -0
  181. package/@ones-editor/ui/src/quick-menu/types.d.ts +2 -5
  182. package/@ones-editor/ui/src/readonly-toolbar/add-comment-to-old-doc.d.ts +2 -0
  183. package/@ones-editor/ui/src/readonly-toolbar/helper.d.ts +2 -0
  184. package/@ones-editor/ui/src/readonly-toolbar/index.d.ts +3 -2
  185. package/@ones-editor/ui/src/toolbar/link-commands.d.ts +4 -0
  186. package/@ones-editor/ui/src/toolbar/text-commands.d.ts +2 -2
  187. package/@ones-editor/ui/src/toolbar/toolbar-handler.d.ts +4 -1
  188. package/@ones-editor/ui/src/tooltips/index.d.ts +21 -9
  189. package/@ones-editor/ui/src/utils/hide-toolbar.d.ts +2 -0
  190. package/@ones-editor/ui-base/src/auto-suggest/auto-suggest-menu.d.ts +4 -1
  191. package/@ones-editor/ui-base/src/auto-suggest/auto-suggest.d.ts +3 -1
  192. package/@ones-editor/ui-base/src/color-button/text-color-item.d.ts +18 -8
  193. package/@ones-editor/ui-base/src/color-palette/color-palette.d.ts +7 -1
  194. package/@ones-editor/ui-base/src/color-palette/index.d.ts +3 -3
  195. package/@ones-editor/ui-base/src/command-bar/active-observer.d.ts +11 -0
  196. package/@ones-editor/ui-base/src/command-bar/command-bar.d.ts +5 -2
  197. package/@ones-editor/ui-base/src/command-bar/fixed-toolbar.d.ts +3 -1
  198. package/@ones-editor/ui-base/src/command-bar/init-toolbar-item.d.ts +1 -0
  199. package/@ones-editor/ui-base/src/command-bar/manual-command-bar.d.ts +1 -0
  200. package/@ones-editor/ui-base/src/command-bar/types.d.ts +7 -2
  201. package/@ones-editor/ui-base/src/dialog/manual-close-dialog.d.ts +1 -1
  202. package/@ones-editor/ui-base/src/dropdown/index.d.ts +1 -0
  203. package/@ones-editor/ui-base/src/icons/index.d.ts +5 -1
  204. package/@ones-editor/ui-base/src/index.d.ts +3 -0
  205. package/@ones-editor/ui-base/src/input/create-input.d.ts +24 -3
  206. package/@ones-editor/ui-base/src/locale/en-us.d.ts +1 -0
  207. package/@ones-editor/ui-base/src/locale/ja-jp.d.ts +1 -0
  208. package/@ones-editor/ui-base/src/locale/zh-cn.d.ts +1 -0
  209. package/@ones-editor/ui-base/src/mobile-command-bar/init-menu-item.d.ts +3 -0
  210. package/@ones-editor/ui-base/src/mobile-command-bar/mobile-bottom-menu.d.ts +21 -0
  211. package/@ones-editor/ui-base/src/mobile-command-bar/scroll-into-view.d.ts +3 -0
  212. package/@ones-editor/ui-base/src/popup/popup.d.ts +1 -1
  213. package/@ones-editor/{ui → ui-base}/src/text-button/index.d.ts +1 -1
  214. package/@ones-editor/versions/package.json +3 -0
  215. package/@ones-editor/versions/src/constant/index.d.ts +2 -0
  216. package/@ones-editor/versions/src/history-doc/history-doc.d.ts +2 -2
  217. package/@ones-editor/versions/src/history-render/index.d.ts +15 -1
  218. package/@ones-editor/versions/src/history-tooltip/index.d.ts +14 -0
  219. package/@ones-editor/versions/src/index.d.ts +1 -0
  220. package/@ones-editor/versions/src/locale/en-us.d.ts +1 -0
  221. package/@ones-editor/versions/src/locale/ja-jp.d.ts +1 -0
  222. package/@ones-editor/versions/src/locale/zh-cn.d.ts +1 -0
  223. package/@ones-editor/versions/src/types.d.ts +5 -0
  224. package/@ones-editor/versions/src/utils/block-text.d.ts +3 -1
  225. package/@ones-editor/versions/src/version-dialog/versions-dropdown.d.ts +2 -0
  226. package/dist/auto-new-line.d.ts +7 -0
  227. package/dist/index.d.ts +10 -4
  228. package/dist/index.js +17896 -13052
  229. package/dist/lang/en-us.d.ts +1 -1
  230. package/dist/lang/ja-jp.d.ts +1 -1
  231. package/dist/lang/zh-cn.d.ts +1 -1
  232. package/dist/types.d.ts +15 -4
  233. package/package.json +3 -1
  234. package/@ones-editor/block-menu/src/block-menu/items/block-command-items.d.ts +0 -3
  235. package/@ones-editor/block-menu/src/block-menu/items/index.d.ts +0 -5
  236. package/@ones-editor/block-menu/src/block-menu/items/insert-block-items/index.d.ts +0 -5
  237. package/@ones-editor/block-menu/src/block-menu/items/text-styles/text-style-item.d.ts +0 -30
  238. package/@ones-editor/block-menu/src/block-menu/items/types.d.ts +0 -5
  239. package/@ones-editor/text-commands/src/locale/en-us.d.ts +0 -13
  240. package/@ones-editor/text-commands/src/locale/ja-jp.d.ts +0 -13
  241. package/@ones-editor/text-commands/src/locale/zh-cn.d.ts +0 -13
  242. package/@ones-editor/text-commands/src/text-command-provider.d.ts +0 -24
  243. package/@ones-editor/text-commands/src/text-commands.d.ts +0 -4
  244. package/@ones-editor/text-commands/src/text-styles.d.ts +0 -4
  245. package/@ones-editor/ui/src/quick-menu/basic-menu-items.d.ts +0 -16
  246. package/@ones-editor/ui/src/quick-menu/inline-box-items.d.ts +0 -8
  247. package/@ones-editor/ui/src/quick-menu/insert-empty-block.d.ts +0 -4
  248. package/@ones-editor/ui/src/quick-menu/order.d.ts +0 -1
  249. package/@ones-editor/ui/src/quick-menu/quick-menu-items.d.ts +0 -9
  250. package/@ones-editor/ui/src/toolbar/commands/align.d.ts +0 -10
  251. package/@ones-editor/ui/src/toolbar/commands/paragraph.d.ts +0 -11
  252. package/@ones-editor/ui/src/toolbar/commands/turn-into.d.ts +0 -10
  253. package/@ones-editor/ui/src/toolbar/merge-commands.d.ts +0 -2
  254. /package/@ones-editor/{text-commands → main-toolbar}/src/locale/index.d.ts +0 -0
  255. /package/@ones-editor/{block-menu → ui}/src/block-menu/standard-block-actions/hook.d.ts +0 -0
@@ -58,7 +58,6 @@ export type BlockPosition = SimpleBlockPosition | ComplexBlockPosition;
58
58
  export interface BoxCommands {
59
59
  group: string;
60
60
  commands: CommandItem[];
61
- startGroup?: boolean;
62
61
  executeCommand: (editor: OnesEditor, block: BlockElement, box: BoxElement, item: CommandItem) => unknown;
63
62
  }
64
63
  export interface BoxProperties {
@@ -126,7 +125,6 @@ export interface Closeable {
126
125
  click: (item: CommandItem, target: HTMLElement) => void;
127
126
  }
128
127
  export type CommandItemChildrenPlacement = 'auto' | 'top' | 'left' | 'right' | 'bottom' | 'auto-start' | 'auto-end' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'right-start' | 'right-end' | 'left-start' | 'left-end';
129
- export type CommandItemMenuType = 'inline' | 'sibling';
130
128
  export interface CommandItem {
131
129
  id: string;
132
130
  name: string;
@@ -137,13 +135,15 @@ export interface CommandItem {
137
135
  type?: CommandItemType;
138
136
  element?: HTMLElement | ((item: CommandItem) => HTMLElement);
139
137
  icon?: string;
140
- childrenType?: 'menu' | 'toolbar';
138
+ childrenType?: 'menu' | 'toolbar' | 'mobile-bottom-menu';
141
139
  children?: CommandItem[];
142
140
  childrenMenuId?: string;
143
141
  data?: unknown;
144
142
  group?: string;
145
143
  groupOrder?: number;
146
144
  dropdown?: boolean;
145
+ dropSplit?: boolean;
146
+ splitTooltip?: string;
147
147
  manualShowChildren?: boolean;
148
148
  childrenPlacement?: CommandItemChildrenPlacement;
149
149
  childrenOffset?: [number, number];
@@ -152,25 +152,17 @@ export interface CommandItem {
152
152
  defaultCheckedChildren?: string[];
153
153
  ellipsisTooltip?: string;
154
154
  disableTooltip?: boolean;
155
+ tooltipPlacement?: CommandItemChildrenPlacement;
155
156
  disableReason?: string;
156
157
  hideGroupItem?: boolean;
157
158
  setCloseable?: (closeable: Closeable) => void;
158
159
  beforePopup?: (parent: unknown) => void;
159
- /**
160
- * defaults to true
161
- */
162
- shouldShown?: (currentBlock: BlockElement | undefined, menuType: CommandItemMenuType) => boolean;
160
+ switchable?: boolean;
163
161
  /**
164
162
  * defaults to true
165
163
  */
166
164
  clickToClose?: boolean;
167
165
  }
168
- export interface BlockCommandItem extends CommandItem {
169
- blockId: string;
170
- blockType: string;
171
- blockKind: BlockKind;
172
- groupIndex: number;
173
- }
174
166
  export type StyleType = boolean | string | number;
175
167
  export type BlockStyles = {
176
168
  [index: string]: StyleType;
@@ -184,7 +176,6 @@ export interface BlockCommands {
184
176
  element?: HTMLElement;
185
177
  group: string;
186
178
  commands: CommandItem[];
187
- startGroup?: boolean;
188
179
  executeCommand: (editor: OnesEditor, block: BlockElement, item: CommandItem, child: TextBlockContentChild | null) => unknown;
189
180
  }
190
181
  export interface BlockProperties {
@@ -363,6 +354,8 @@ export interface OnesEditorUndoAction {
363
354
  redo: (editor: OnesEditor) => boolean;
364
355
  combinable: (other: OnesEditorUndoAction) => boolean;
365
356
  combine: (other: OnesEditorUndoAction) => void;
357
+ getTimeStamp: () => number;
358
+ getBatchActionId?: () => string | undefined;
366
359
  }
367
360
  export interface OnesEditorUndoManager {
368
361
  reset: () => void;
@@ -409,12 +402,14 @@ export interface OnesEditorBlockRenderer {
409
402
  renderBox?: (editor: OnesEditor, path: BlockPath, attributes: DocBlockTextAttributes) => OnesEditorBlockRenderResult;
410
403
  renderText?: (editor: OnesEditor, path: BlockPath, attributes: DocBlockTextAttributes) => OnesEditorBlockRenderResult;
411
404
  renderBlock?: (editor: OnesEditor, path: BlockPath, blockData: DocBlock) => OnesEditorBlockRenderResult;
405
+ renderChildContainer?: (editor: OnesEditor, path: BlockPath, containerId: string) => OnesEditorBlockRenderResult;
412
406
  updateBlock?: (editor: OnesEditor, path: BlockPath, blockElement: BlockElement, blockData: DocBlock) => void;
413
407
  }
414
408
  export interface OnesEditorBlockRenderers {
415
409
  renderBox: (path: BlockPath, attributes: DocBlockTextAttributes) => OnesEditorBlockRenderResult;
416
410
  renderText: (path: BlockPath, attributes: DocBlockTextAttributes) => OnesEditorBlockRenderResult;
417
411
  renderBlock: (editor: OnesEditor, path: BlockPath, blockData: DocBlock) => OnesEditorBlockRenderResult;
412
+ renderChildContainer: (editor: OnesEditor, path: BlockPath, containerId: string) => OnesEditorBlockRenderResult;
418
413
  updateBlock: (editor: OnesEditor, path: BlockPath, blockElement: BlockElement, blockData: DocBlock) => void;
419
414
  registerRender: (decorator: OnesEditorBlockRenderer) => void;
420
415
  }
@@ -518,7 +513,7 @@ export interface CloneBlockResultInfo {
518
513
  boxIdMap: Map<string, string>;
519
514
  }
520
515
  export interface OnesEditorDomEvents extends OnesEditorCustom {
521
- addEventListener: <T = Event>(element: Element | Document | Window, eventName: string, eventHandler: (editor: OnesEditor, event: T) => void) => void;
516
+ addEventListener: <T = Event>(element: Element | Document | Window, eventName: string, eventHandler: (editor: OnesEditor, event: T) => void, options?: boolean | AddEventListenerOptions) => void;
522
517
  removeEventListener: (element: Element | Document | Window | null, eventName: string | null, eventHandler: (editor: OnesEditor, event: Event) => void) => void;
523
518
  removeAllListeners: (element: Element | Document | Window, eventName?: string) => void;
524
519
  }
@@ -649,8 +644,9 @@ export type PasteOptions = {
649
644
  };
650
645
  export interface OnesEditorInput {
651
646
  readonly inputElement: HTMLTextAreaElement;
647
+ getInput: () => HTMLTextAreaElement;
652
648
  destroy: () => void;
653
- focus: () => void;
649
+ focus: (options?: FocusOptions) => void;
654
650
  handleDocumentSelectionChange: () => void;
655
651
  handleCompositionstart: (event: CompositionEvent) => void;
656
652
  handleCompositionend: (event: CompositionEvent) => void;
@@ -668,11 +664,11 @@ export interface OnesEditorInput {
668
664
  export interface OnesEditorSelectionHandler {
669
665
  isSelecting: () => boolean;
670
666
  stopSelection: () => void;
671
- handleMouseDown: (event: MouseEvent, options: {
667
+ handleMouseDown: (event: MouseEvent | TouchEvent, options: {
672
668
  autoScroll: boolean;
673
669
  }) => void;
674
670
  handleMouseMove: (event: MouseEvent) => void;
675
- handleMouseUp: (event: MouseEvent) => void;
671
+ handleMouseUp: (event: MouseEvent | TouchEvent) => void;
676
672
  handleDblClick: (event: MouseEvent) => void;
677
673
  handleTripleClick: (event: MouseEvent) => void;
678
674
  }
@@ -696,6 +692,7 @@ export interface OnesEditorInputHandler {
696
692
  handleRemoteChanged?: (editor: OnesEditor, type: RemoteChangeType) => void;
697
693
  handleCompositionStart?: (editor: OnesEditor, containerId: string, blockIndex: number, offset: number) => void;
698
694
  handleUpdateCompositionText?: (editor: OnesEditor, containerId: string, blockIndex: number, offset: number, end: boolean) => void;
695
+ handleBlur?: (editor: OnesEditor) => void;
699
696
  destroy?: (editor: OnesEditor) => void;
700
697
  }
701
698
  export interface OnesEditorBlocks {
@@ -723,32 +720,43 @@ export interface OnesEditorInsertions {
723
720
  }
724
721
  export type CommandParams = {
725
722
  [index: string]: unknown;
723
+ } & {
724
+ source?: string[];
725
+ isFilter?: boolean;
726
726
  };
727
727
  export type CommandResult = {
728
728
  [index: string]: unknown;
729
729
  };
730
730
  export interface OnesEditorCommandProvider {
731
731
  id: string;
732
- getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange) => BlockCommandItem[];
733
- executeCommand?: (editor: OnesEditor, block: BlockElement, range: SelectionRange, item: BlockCommandItem, params: CommandParams, result: CommandResult) => boolean;
734
- filterCommands?: (editor: OnesEditor, block: BlockElement, range: SelectionRange, commands: BlockCommandItemWithSource[]) => BlockCommandItemWithSource[] | undefined;
735
- beforeExecuteCommand?: (editor: OnesEditor, block: BlockElement, range: SelectionRange, item: BlockCommandItem, params: CommandParams) => boolean | undefined;
736
- afterExecuteCommand?: (editor: OnesEditor, block: BlockElement, range: SelectionRange, item: BlockCommandItem, params: CommandParams, result: CommandResult) => void;
737
- getEmptyBlockTextAttributes?: (editor: OnesEditor, blockId: string) => DocBlockTextAttributes | undefined;
738
- executeRangeCommand?: (editor: OnesEditor, range: SelectionRange, command: BlockCommandItemWithSource, params: CommandParams, result: CommandResult) => boolean;
739
- }
740
- export interface BlockCommandItemWithSource extends BlockCommandItem {
732
+ groupIndex?: number;
733
+ getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange, params?: CommandParams) => CommandItem[];
734
+ getInsertCommands?: (editor: OnesEditor, containerId: string) => CommandItem[];
735
+ executeInsertCommand?: (editor: OnesEditor, containerId: string, blockIndex: number, item: CommandItemWithSource, params: CommandParams, result?: CommandResult) => boolean;
736
+ executeRangeCommand?: (editor: OnesEditor, range: SelectionRange, command: CommandItemWithSource, params: CommandParams, result?: CommandResult) => boolean;
737
+ executeCommand?: (editor: OnesEditor, block: BlockElement, range: SelectionRange, item: CommandItemWithSource, params: CommandParams, result?: CommandResult) => boolean;
738
+ filterCommands?: (editor: OnesEditor, block: BlockElement, range: SelectionRange, commands: CommandItemWithSource[]) => CommandItemWithSource[] | undefined;
739
+ beforeExecuteCommand?: (editor: OnesEditor, block: BlockElement, range: SelectionRange, item: CommandItemWithSource, params: CommandParams) => boolean | undefined;
740
+ afterExecuteCommand?: (editor: OnesEditor, block: BlockElement, range: SelectionRange, item: CommandItemWithSource, params: CommandParams, result: CommandResult) => void;
741
+ }
742
+ export interface CommandItemWithSource extends CommandItem {
741
743
  source: string;
742
744
  }
745
+ export interface CommandFilter {
746
+ filter: (editor: OnesEditor, range: SelectionRange, items: CommandItemWithSource[], source: string[]) => CommandItemWithSource[];
747
+ }
748
+ export type CommandFilterId = keyof any;
743
749
  export interface OnesEditorCommandProviders {
750
+ commandFilters?: Map<CommandFilterId, CommandFilter>;
751
+ addFilter?: (id: CommandFilterId, filter: CommandFilter) => void;
752
+ filterItems?: (range: SelectionRange, items: CommandItemWithSource[]) => CommandItemWithSource[];
744
753
  registerCommandProvider: (provider: OnesEditorCommandProvider) => void;
745
754
  getCommandProviders: () => OnesEditorCommandProvider[];
746
755
  getCommandProvider: (id: string) => OnesEditorCommandProvider;
747
- getCommands: (range: SelectionRange, source: string) => BlockCommandItemWithSource[];
748
- executeCommand: (range: SelectionRange, item: BlockCommandItemWithSource, params: CommandParams) => {
756
+ getCommands: (range: SelectionRange) => CommandItemWithSource[];
757
+ executeCommand: (range: SelectionRange, item: CommandItemWithSource, params: CommandParams) => {
749
758
  [index: string]: CommandResult;
750
759
  };
751
- getEmptyBlockTextAttributes: (editor: OnesEditor, blockId: string) => DocBlockTextAttributes | undefined;
752
760
  }
753
761
  export interface EditorDocLocalActionCallbacks {
754
762
  onBeforeUpdateBlockText: (containerId: string, blockId: string, oldText: DocBlockText, newText: DocBlockText, newRange: OnesEditorDocRange) => void;
@@ -764,3 +772,10 @@ export interface OnesEditorBlockHook {
764
772
  writable?: (editor: OnesEditor, blockElement: BlockElement | BlockElement[]) => boolean | undefined;
765
773
  commands?: (editor: OnesEditor, blockElement: BlockElement, child: TextBlockContentChild | null) => BlockCommands | undefined;
766
774
  }
775
+ export interface MobileClient {
776
+ getViewPortHeight: () => number;
777
+ getOffsetHeight: () => number;
778
+ virtualViewportHeight: number;
779
+ virtualViewportOffsetTop: number;
780
+ isAndroidApp: boolean;
781
+ }
@@ -4,11 +4,15 @@ export default class Action implements OnesEditorUndoAction {
4
4
  protected containerId: string;
5
5
  beforeRange: OnesEditorDocRange;
6
6
  afterRange: OnesEditorDocRange;
7
- constructor(editor: OnesEditor, containerId: string, afterRange: OnesEditorDocRange);
7
+ batchActionId?: string;
8
+ ts: number;
9
+ constructor(editor: OnesEditor, containerId: string, afterRange: OnesEditorDocRange, batchActionId?: string);
10
+ getTimeStamp(): number;
8
11
  undo(editor: OnesEditor): boolean;
9
12
  redo(editor: OnesEditor): boolean;
10
13
  combinable(other: OnesEditorUndoAction): boolean;
11
14
  combine(other: OnesEditorUndoAction): void;
15
+ getBatchActionId(): string | undefined;
12
16
  setAfterRange(range: OnesEditorDocRange): void;
13
17
  hasDocContainerId(editor: OnesEditor, id: string): boolean;
14
18
  findDocBlockById(editor: OnesEditor, id: string): DocBlock | undefined;
@@ -7,4 +7,5 @@ export default class BlockAction extends Action {
7
7
  constructor(editor: OnesEditor, containerId: string, blockIndex: number, data: DocBlock, afterRange: OnesEditorDocRange);
8
8
  deleteBlock(editor: OnesEditor, newRange: OnesEditorDocRange): boolean;
9
9
  insertBlock(editor: OnesEditor, newRange: OnesEditorDocRange): boolean;
10
+ getBatchActionId(): string | undefined;
10
11
  }
@@ -9,4 +9,5 @@ export default class UpdateBlockDataAction extends Action {
9
9
  undo(editor: OnesEditor): boolean;
10
10
  redo(editor: OnesEditor): boolean;
11
11
  private static toAttributes;
12
+ getBatchActionId(): string | undefined;
12
13
  }
@@ -1,6 +1,5 @@
1
1
  import { TypedEmitter } from 'tiny-typed-emitter';
2
- import type { TextBlockContentChild } from '../core/blocks/text-blocks/base/child';
3
- import { BlockElement, OnesEditor, OnesEditorCustom } from '../core/types';
2
+ import { BlockElement, OnesEditor, OnesEditorCustom, TextBlockContentChild } from '../core/types';
4
3
  export interface OnesEditorHoveringBlockEvents {
5
4
  change: (block: BlockElement | null, old: BlockElement | null, event: MouseEvent) => void;
6
5
  targetChange: (block: BlockElement | null, old: BlockElement | null, target: EventTarget | null, oldTarget: EventTarget | null) => void;
@@ -15,8 +14,8 @@ export interface OnesEditorHoveringBlockFinder extends OnesEditorCustom {
15
14
  export default class OnesEditorHoveringBlock extends TypedEmitter<OnesEditorHoveringBlockEvents> {
16
15
  private editor;
17
16
  private hoveringBlock;
18
- private hoveringElem;
19
- private hoveringTextChild;
17
+ hoveringElem: EventTarget | null;
18
+ hoveringTextChild: TextBlockContentChild | null;
20
19
  private filters;
21
20
  private finders;
22
21
  constructor(editor: OnesEditor);
@@ -10,6 +10,7 @@ export interface IUserOptions {
10
10
  verticalOffset?: number;
11
11
  disableHorizontal?: boolean;
12
12
  disableVertical?: boolean;
13
+ getClientHeight?: () => number;
13
14
  }
14
15
  export interface IOptions {
15
16
  cancelOnUserAction: boolean;
@@ -22,6 +23,7 @@ export interface IOptions {
22
23
  verticalOffset: number;
23
24
  disableHorizontal?: boolean;
24
25
  disableVertical?: boolean;
26
+ getClientHeight?: () => number;
25
27
  }
26
28
  declare function animateScrollTo(y: number, userOptions?: IUserOptions): Promise<boolean>;
27
29
  declare function animateScrollTo(coords: TCoords, userOptions?: IUserOptions): Promise<boolean>;
@@ -1,4 +1,4 @@
1
- import type { CSSStyles } from '../core/types';
1
+ import type { CSSStyles, OnesEditor } from '../core/types';
2
2
  export declare function addClass(dom: Element, ...className: Array<string>): void;
3
3
  export declare function hasClass(dom: Node | null, className: string): boolean;
4
4
  export declare function removeClass(dom: Element, ...className: Array<string>): void;
@@ -37,4 +37,7 @@ export declare function bindKeyDownEvent(input: HTMLInputElement | HTMLTextAreaE
37
37
  export declare function getElementFromPoint(x: number, y: number, options?: {
38
38
  noFilter: boolean;
39
39
  }): Element;
40
+ export declare function createMouseEventFromTouchEvent(event: TouchEvent, type: 'mousedown' | 'mousemove' | 'mouseup' | 'click'): MouseEvent;
41
+ export declare function ensureIsMobileEvent(events: MouseEvent | TouchEvent): events is TouchEvent;
42
+ export declare function bindDbClick(editor: OnesEditor, elem: HTMLElement, handler: (event: MouseEvent) => void): () => void;
40
43
  export {};
@@ -1,6 +1,6 @@
1
- export type DragStartHandler<T> = (drag: DragDrop<T>, event: MouseEvent, elem: HTMLElement) => void;
2
- export type DraggingHandler<T> = (drag: DragDrop<T>, event: MouseEvent, elem: HTMLElement, deltaX: number, deltaY: number) => void;
3
- export type DragEndHandler<T> = (drag: DragDrop<T>, event: MouseEvent, elem: HTMLElement, deltaX: number, deltaY: number) => void;
1
+ export type DragStartHandler<T> = (drag: DragDrop<T>, event: MouseEvent | TouchEvent, elem: HTMLElement) => void;
2
+ export type DraggingHandler<T> = (drag: DragDrop<T>, event: MouseEvent | TouchEvent, elem: HTMLElement, deltaX: number, deltaY: number) => void;
3
+ export type DragEndHandler<T> = (drag: DragDrop<T>, event: MouseEvent | TouchEvent, elem: HTMLElement, deltaX: number, deltaY: number) => void;
4
4
  export interface DragDropOptions<T> {
5
5
  elem: HTMLElement;
6
6
  onDragStart: DragStartHandler<T>;
@@ -10,6 +10,7 @@ export interface DragDropOptions<T> {
10
10
  minThreshold?: number;
11
11
  cursor?: string;
12
12
  mouseDownEvent?: MouseEvent;
13
+ mobile?: boolean;
13
14
  }
14
15
  export declare const MIN_DISTANCE_THRESHOLD = 3;
15
16
  export declare class DragDrop<T> {
@@ -37,5 +38,9 @@ export declare class DragDrop<T> {
37
38
  private onDragging;
38
39
  private onDragEnd;
39
40
  destroy(): void;
41
+ static getEventPosition(event: MouseEvent | TouchEvent): {
42
+ x: number;
43
+ y: number;
44
+ };
40
45
  }
41
46
  export declare function registerDragDrop<T>(options: DragDropOptions<T>): DragDrop<T>;
@@ -1,12 +1,13 @@
1
1
  import { BlockCommands, BlockElement, CommandItem, OnesEditor } from '../../../../@ones-editor/core';
2
- export type PresetCommandId = 'edit' | 'add-comment';
3
- export interface StandardEmbedBlockProperties<T = PresetCommandId> {
2
+ export type CommandId = 'edit' | 'separator';
3
+ export interface StandardEmbedBlockProperties<T = CommandId> {
4
4
  presetIds?: T[];
5
- extCommands?: CommandItem[];
5
+ extIds?: T[];
6
+ extCommands?: CommandItem[] | ((editor: OnesEditor, block: BlockElement) => CommandItem[]);
6
7
  handleExecuteCommand?: (editor: OnesEditor, block: BlockElement, item: CommandItem) => boolean;
7
8
  }
8
9
  export declare function addCommentToBlock(editor: OnesEditor, block: BlockElement): boolean;
9
- export declare class StandardEmbedBlockCommands<T = PresetCommandId> implements BlockCommands {
10
+ export declare class StandardEmbedBlockCommands<T = CommandId> implements BlockCommands {
10
11
  protected editor: OnesEditor;
11
12
  protected block: BlockElement;
12
13
  protected properties?: StandardEmbedBlockProperties<T> | undefined;
@@ -18,6 +19,6 @@ export declare class StandardEmbedBlockCommands<T = PresetCommandId> implements
18
19
  }
19
20
  export declare function getStandardEmbedBlockProperties(editor: OnesEditor, block: BlockElement, properties?: StandardEmbedBlockProperties): {
20
21
  blockCommands: {
21
- 'hovering-toolbar': StandardEmbedBlockCommands<PresetCommandId>;
22
+ 'hovering-toolbar': StandardEmbedBlockCommands<CommandId>;
22
23
  };
23
24
  };
@@ -9,6 +9,7 @@ export declare class EmbedBlockResizer {
9
9
  handleResizing: (resizer: BlockResizer, rect: DOMRect) => void;
10
10
  destroy(): void;
11
11
  handleHoveringBlockChange: (block: BlockElement | null, old: BlockElement | null) => void;
12
+ handleEditorResize: () => void;
12
13
  tryEnableResizer(block: BlockElement): void;
13
14
  disableResizer(): void;
14
15
  static get(editor: OnesEditor): EmbedBlockResizer;
@@ -7,5 +7,9 @@
7
7
  "@types/react": "^18.0.26",
8
8
  "@types/react-dom": "^18.0.9"
9
9
  },
10
+ "peerDependencies": {
11
+ "react": "^17.0.2 || ^18.2.0",
12
+ "react-dom": "^17.0.2 || ^18.2.0"
13
+ },
10
14
  "types": "src/index.d.ts"
11
15
  }
@@ -6,6 +6,7 @@ declare const _default: {
6
6
  toLink: string;
7
7
  toCard: string;
8
8
  comment: string;
9
+ preview: string;
9
10
  };
10
11
  };
11
12
  };
@@ -6,6 +6,7 @@ declare const _default: {
6
6
  toLink: string;
7
7
  toCard: string;
8
8
  comment: string;
9
+ preview: string;
9
10
  };
10
11
  };
11
12
  };
@@ -6,6 +6,7 @@ declare const _default: {
6
6
  toLink: string;
7
7
  toCard: string;
8
8
  comment: string;
9
+ preview: string;
9
10
  };
10
11
  };
11
12
  };
@@ -1,25 +1,11 @@
1
1
  import { BlockElement } from '../../../../@ones-editor/core';
2
- import { StandardEmbedBlockCommands } from '../../../../@ones-editor/embed-block-helper';
3
- import type { CommandItem, OnesEditor } from '../../../../@ones-editor/core';
4
- import type { StandardEmbedBlockProperties } from '../../../../@ones-editor/embed-block-helper';
5
- export type PresetCommandId = 'edit' | 'help';
2
+ import type { OnesEditor } from '../../../../@ones-editor/core';
3
+ import { CommandId, type StandardEmbedBlockProperties } from '../../../../@ones-editor/embed-block-helper';
6
4
  export type GraphType = 'mermaid' | 'flowchart' | 'plantuml';
7
- export type GraphEmbedBlockProperties = StandardEmbedBlockProperties<PresetCommandId>;
8
- declare class GraphBlockCommands extends StandardEmbedBlockCommands<PresetCommandId> {
9
- editor: OnesEditor;
10
- block: BlockElement;
11
- graphType: GraphType;
12
- properties?: GraphEmbedBlockProperties | undefined;
13
- group: string;
14
- _commands: CommandItem[];
15
- constructor(editor: OnesEditor, block: BlockElement, graphType: GraphType, properties?: GraphEmbedBlockProperties | undefined);
16
- get commands(): CommandItem[];
17
- executeCommand(editor: OnesEditor, block: BlockElement, item: CommandItem): void;
18
- }
5
+ export type GraphEmbedBlockProperties = StandardEmbedBlockProperties;
19
6
  export declare function getGraphEmbedBlockProperties(editor: OnesEditor, block: BlockElement, type: 'mermaid' | 'flowchart' | 'plantuml', properties?: GraphEmbedBlockProperties): {
7
+ abstract: string;
20
8
  blockCommands: {
21
- 'hovering-toolbar': GraphBlockCommands;
9
+ 'hovering-toolbar': import("@ones-editor/embed-block-helper").StandardEmbedBlockCommands<CommandId>;
22
10
  };
23
- abstract: string;
24
11
  };
25
- export {};
@@ -0,0 +1 @@
1
+ export declare function underline(ts: any): void;
@@ -16,7 +16,7 @@ export default class ImageHoveringToolbarCommands implements BlockCommands {
16
16
  type: CommandItemType;
17
17
  icon?: undefined;
18
18
  })[];
19
- private createIconItem;
19
+ isHoveringImageEmpty: () => boolean;
20
20
  get commands(): CommandItem[];
21
21
  executeCommand(editor: OnesEditor, block: BlockElement, item: CommandItem): void;
22
22
  }
@@ -42,4 +42,5 @@ export declare class ImageObject implements ImageObjectBase {
42
42
  private setData;
43
43
  static create(editor: OnesEditor, blockData: DocEmbedBlock): ImageObject;
44
44
  static getImageObject(editor: OnesEditor, block: BlockElement | string): ImageObject;
45
+ static findImageObject(editor: OnesEditor, block: BlockElement | string): ImageObject | null;
45
46
  }
@@ -11,7 +11,7 @@ export declare class ImageSplitterResizer implements DragDropOptions<ImageSplitt
11
11
  cursor: string;
12
12
  initWidths: number[];
13
13
  constructor(editor: OnesEditor, elem: HTMLElement, data: ImageSplitterResizerData, mouseDownEvent: MouseEvent);
14
- onDragStart(drag: DragDrop<ImageSplitterResizerData>, event: MouseEvent, elem: HTMLElement): void;
15
- onDragging(drag: DragDrop<ImageSplitterResizerData>, event: MouseEvent, elem: HTMLElement, deltaX: number, deltaY: number): void;
16
- onDragEnd(drag: DragDrop<ImageSplitterResizerData>, event: MouseEvent, elem: HTMLElement, deltaX: number, deltaY: number): void;
14
+ onDragStart(drag: DragDrop<ImageSplitterResizerData>, event: MouseEvent | TouchEvent, elem: HTMLElement): void;
15
+ onDragging(drag: DragDrop<ImageSplitterResizerData>, event: MouseEvent | TouchEvent, elem: HTMLElement, deltaX: number, deltaY: number): void;
16
+ onDragEnd(drag: DragDrop<ImageSplitterResizerData>, event: MouseEvent | TouchEvent, elem: HTMLElement, deltaX: number, deltaY: number): void;
17
17
  }
@@ -6,6 +6,7 @@ declare const _default: {
6
6
  mention: string;
7
7
  quote: string;
8
8
  title: string;
9
+ mobileDefault: string;
9
10
  };
10
11
  };
11
12
  export default _default;
@@ -6,6 +6,7 @@ declare const _default: {
6
6
  mention: string;
7
7
  quote: string;
8
8
  title: string;
9
+ mobileDefault: string;
9
10
  };
10
11
  };
11
12
  export default _default;
@@ -6,6 +6,7 @@ declare const _default: {
6
6
  mention: string;
7
7
  quote: string;
8
8
  title: string;
9
+ mobileDefault: string;
9
10
  };
10
11
  };
11
12
  export default _default;
@@ -0,0 +1,6 @@
1
+ import { CommandFilter, CommandItemWithSource, OnesEditor, OnesEditorCustom, SelectionRange } from '../../../@ones-editor/core';
2
+ export declare class LayoutQuickMenuItemFilter implements CommandFilter, OnesEditorCustom {
3
+ filter(editor: OnesEditor, range: SelectionRange, items: CommandItemWithSource[], source: string[]): CommandItemWithSource[];
4
+ destroy(): void;
5
+ static init(editor: OnesEditor): LayoutQuickMenuItemFilter;
6
+ }
@@ -4,3 +4,4 @@ import { LayoutKindBlock } from './types';
4
4
  export declare const LayoutBlock: LayoutKindBlock;
5
5
  export { isLayoutBlock } from './utils';
6
6
  export * from './caption';
7
+ export { LayoutQuickMenuItemFilter } from './command-filter';
@@ -7,8 +7,9 @@ import { resetListStart } from './start/reset-list-start';
7
7
  import './lang';
8
8
  import './style.scss';
9
9
  import { ListPasteHandler } from './local-events/paste-handler';
10
+ import { handleTab, handleShiftTab } from './keyboard/tab';
10
11
  export { type ListOptions, type DocListBlock } from './types';
11
12
  declare const ListBlock: TextKindBlock;
12
13
  export * from './utils';
13
14
  export * from './keyboard/to-text-block';
14
- export { ListBlock, OnesEditorListMindmap, Mindmap, resetListStart, toMindmap, isMindmapRootBlock, ListBlockShortcuts, isViewingAsMindmap, getLastMindmapNode, ListPasteHandler, };
15
+ export { ListBlock, OnesEditorListMindmap, Mindmap, resetListStart, toMindmap, isMindmapRootBlock, ListBlockShortcuts, isViewingAsMindmap, getLastMindmapNode, ListPasteHandler, handleTab, handleShiftTab, };
@@ -1,3 +1,5 @@
1
+ import { DocBlock } from '../../../../@ones-editor/core';
1
2
  import { DocListBlock, ListBlockType } from '../types';
2
3
  export declare function getListType(listData: DocListBlock): ListBlockType;
3
4
  export declare function getListMarker(listData: DocListBlock): string;
5
+ export declare function pickTextBlockData(listBlockData: DocBlock): DocBlock;
@@ -1,6 +1,8 @@
1
1
  import { CommandItem, OnesEditor, OnesEditorCustom } from '../../../@ones-editor/core';
2
2
  import { AbstractCommandBar, FixedToolbar } from '../../../@ones-editor/ui-base';
3
3
  import { ToolbarItem } from './types';
4
+ import './locale';
5
+ import './style.scss';
4
6
  export * from './types';
5
7
  export * from './items';
6
8
  export declare class MainToolbar implements OnesEditorCustom {
@@ -0,0 +1,8 @@
1
+ import { OnesEditor } from '../../../../@ones-editor/core';
2
+ import { ToolbarItem } from '../types';
3
+ export declare class CommentItem implements ToolbarItem {
4
+ id: string;
5
+ name: string;
6
+ icon: string;
7
+ onClick(editor: OnesEditor, item: ToolbarItem): void;
8
+ }
@@ -0,0 +1,8 @@
1
+ import { OnesEditor } from '../../../../@ones-editor/core';
2
+ import { ToolbarItem } from '../types';
3
+ export declare class FindReplaceItem implements ToolbarItem {
4
+ id: string;
5
+ name: string;
6
+ icon: string;
7
+ onClick(editor: OnesEditor, item: ToolbarItem): void;
8
+ }
@@ -5,7 +5,7 @@ declare class FontStyleBaseItem implements ToolbarItem {
5
5
  id: string;
6
6
  states: CommandItemState[];
7
7
  constructor(name: string, id: string);
8
- getCommand(editor: OnesEditor): import("@ones-editor/core").BlockCommandItemWithSource | undefined;
8
+ getCommand(editor: OnesEditor): import("@ones-editor/core").CommandItemWithSource | undefined;
9
9
  onClick(editor: OnesEditor): void;
10
10
  updateState(editor: OnesEditor): void;
11
11
  }
@@ -25,4 +25,16 @@ export declare class FontStrikethroughItem extends FontStyleBaseItem {
25
25
  icon: string;
26
26
  constructor();
27
27
  }
28
+ export declare class InlineCodeItem extends FontStyleBaseItem {
29
+ icon: string;
30
+ constructor();
31
+ }
32
+ export declare class SuperscriptItem extends FontStyleBaseItem {
33
+ icon: string;
34
+ constructor();
35
+ }
36
+ export declare class SubscriptItem extends FontStyleBaseItem {
37
+ icon: string;
38
+ constructor();
39
+ }
28
40
  export {};
@@ -1,6 +1,5 @@
1
- import { TextColorItem } from '../../../../@ones-editor/ui-base';
2
1
  import { OnesEditor } from '../../../../@ones-editor/core';
3
- import { FontBoldItem, FontItalicItem, FontUnderlineItem, FontStrikethroughItem } from './font-style';
2
+ import { FontBoldItem, FontItalicItem, FontUnderlineItem, FontStrikethroughItem, InlineCodeItem, SubscriptItem, SuperscriptItem } from './font-style';
4
3
  import { InsertImageItem } from './image';
5
4
  import { InsertLinkItem } from './link';
6
5
  import { OrderedListItem, UnorderedListItem, CheckListItem } from './list';
@@ -8,5 +7,10 @@ import { ParagraphItem } from './paragraph';
8
7
  import { QuoteItem } from './quote';
9
8
  import { SeparatorItem } from './separator';
10
9
  import { AlignLeftItem, AlignCenterItem, AlignRightItem } from './text-align';
11
- export declare function getToolbarDefaultItems(editor: OnesEditor): (TextColorItem | FontBoldItem | FontItalicItem | FontUnderlineItem | FontStrikethroughItem | AlignLeftItem | AlignCenterItem | AlignRightItem | ParagraphItem | SeparatorItem | OrderedListItem | UnorderedListItem | CheckListItem | InsertImageItem | InsertLinkItem | QuoteItem)[];
12
- export { FontBoldItem, FontItalicItem, FontUnderlineItem, FontStrikethroughItem, TextColorItem, AlignLeftItem, AlignCenterItem, AlignRightItem, ParagraphItem, SeparatorItem, OrderedListItem, UnorderedListItem, CheckListItem, InsertImageItem, InsertLinkItem, QuoteItem, };
10
+ import { RedoItem, UndoItem } from './undo';
11
+ import { InsertItem } from './insert';
12
+ import { FindReplaceItem } from './find';
13
+ import { CommentItem } from './comment';
14
+ import { ColorItem } from './text-color';
15
+ export declare function getToolbarDefaultItems(editor: OnesEditor): (FontBoldItem | FontItalicItem | FontUnderlineItem | FontStrikethroughItem | InlineCodeItem | SuperscriptItem | SubscriptItem | InsertImageItem | InsertLinkItem | OrderedListItem | UnorderedListItem | CheckListItem | ParagraphItem | QuoteItem | SeparatorItem | AlignLeftItem | AlignCenterItem | AlignRightItem | UndoItem | RedoItem | InsertItem | FindReplaceItem | CommentItem | ColorItem)[];
16
+ export { UndoItem, RedoItem, FontBoldItem, FontItalicItem, FontUnderlineItem, FontStrikethroughItem, ColorItem, InlineCodeItem, SuperscriptItem, SubscriptItem, AlignLeftItem, AlignCenterItem, AlignRightItem, ParagraphItem, SeparatorItem, OrderedListItem, UnorderedListItem, CheckListItem, InsertImageItem, InsertLinkItem, QuoteItem, InsertItem, FindReplaceItem, CommentItem, };
@@ -0,0 +1,12 @@
1
+ import { CommandItem, CommandItemChildrenPlacement, OnesEditor } from '../../../../@ones-editor/core';
2
+ import { ToolbarItem } from '../types';
3
+ export declare class InsertItem implements ToolbarItem {
4
+ name: string;
5
+ id: string;
6
+ dropdown: boolean;
7
+ manualShowChildren: boolean;
8
+ childrenPlacement: CommandItemChildrenPlacement;
9
+ children: CommandItem[];
10
+ constructor(editor: OnesEditor);
11
+ onClick(editor: OnesEditor, item: ToolbarItem): void;
12
+ }
@@ -5,7 +5,7 @@ export declare class InsertLinkItem implements ToolbarItem {
5
5
  name: string;
6
6
  icon: string;
7
7
  states: CommandItemState[];
8
- getCommand(editor: OnesEditor): import("@ones-editor/core").BlockCommandItemWithSource | undefined;
8
+ getCommand(editor: OnesEditor): import("@ones-editor/core").CommandItemWithSource | undefined;
9
9
  updateState(editor: OnesEditor): void;
10
10
  onClick(editor: OnesEditor, item: ToolbarItem): void;
11
11
  }