@ones-editor/editor 0.0.3-beta.24 → 0.0.3-beta.241

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 (415) 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 +2 -1
  4. package/@ones-editor/block-locker/src/i18n/ja-JP.d.ts +8 -0
  5. package/@ones-editor/block-locker/src/index.d.ts +2 -1
  6. package/@ones-editor/block-locker/src/paste-handler.d.ts +4 -0
  7. package/@ones-editor/block-menu/src/block-menu/index.d.ts +2 -1
  8. package/@ones-editor/block-menu/src/block-menu/items/block-command-items.d.ts +1 -1
  9. package/@ones-editor/block-menu/src/block-menu/items/insert-block-items/index.d.ts +3 -2
  10. package/@ones-editor/block-menu/src/block-menu/items/text-styles/text-style-item.d.ts +3 -0
  11. package/@ones-editor/block-menu/src/block-menu-button/drag-drop/drag-handler.d.ts +5 -4
  12. package/@ones-editor/block-menu/src/block-menu-button/drag-drop/find-preview-element.d.ts +1 -1
  13. package/@ones-editor/block-menu/src/block-menu-button/drag-preview/index.d.ts +2 -2
  14. package/@ones-editor/block-menu/src/locale/en-us.d.ts +4 -0
  15. package/@ones-editor/block-menu/src/locale/ja-jp.d.ts +25 -0
  16. package/@ones-editor/block-menu/src/locale/zh-cn.d.ts +4 -0
  17. package/@ones-editor/block-resizer/src/index.d.ts +1 -0
  18. package/@ones-editor/code-block/src/code-block/caption/caption-input-handler.d.ts +2 -2
  19. package/@ones-editor/code-block/src/code-block/child-container.d.ts +2 -2
  20. package/@ones-editor/code-block/src/code-block/code-caret.d.ts +7 -0
  21. package/@ones-editor/code-block/src/code-block/code-copy.d.ts +4 -0
  22. package/@ones-editor/code-block/src/code-block/create-empty-code.d.ts +2 -2
  23. package/@ones-editor/code-block/src/code-block/index.d.ts +3 -1
  24. package/@ones-editor/code-block/src/code-block/settings/index.d.ts +3 -0
  25. package/@ones-editor/code-block/src/code-block/types.d.ts +3 -0
  26. package/@ones-editor/code-block/src/icons/copy.d.ts +1 -1
  27. package/@ones-editor/code-block/src/icons/wrap.d.ts +1 -1
  28. package/@ones-editor/code-block/src/index.d.ts +2 -0
  29. package/@ones-editor/code-block/src/locale/en-us.d.ts +5 -0
  30. package/@ones-editor/code-block/src/locale/ja-jp.d.ts +12 -0
  31. package/@ones-editor/code-block/src/locale/zh-cn.d.ts +5 -0
  32. package/@ones-editor/column-block/package.json +8 -0
  33. package/@ones-editor/column-block/src/child-containers.d.ts +2 -0
  34. package/@ones-editor/column-block/src/columns-options.d.ts +2 -0
  35. package/@ones-editor/column-block/src/columns-properties.d.ts +15 -0
  36. package/@ones-editor/column-block/src/index.d.ts +4 -0
  37. package/@ones-editor/column-block/src/types.d.ts +11 -0
  38. package/@ones-editor/comments/src/comment-input-handler/paste-handler.d.ts +5 -0
  39. package/@ones-editor/comments/src/comment-item/comment-item.d.ts +2 -0
  40. package/@ones-editor/comments/src/comment-item/mobile-comment-item/mobile-comment-item.d.ts +1 -0
  41. package/@ones-editor/comments/src/comments/comments.d.ts +2 -3
  42. package/@ones-editor/comments/src/comments-helper/active-comment.d.ts +1 -1
  43. package/@ones-editor/comments/src/comments-helper/utils.d.ts +0 -1
  44. package/@ones-editor/comments/src/comments-list/arrange-items.d.ts +1 -1
  45. package/@ones-editor/comments/src/comments-list/comments-list.d.ts +3 -3
  46. package/@ones-editor/comments/src/comments-list/group-item.d.ts +1 -0
  47. package/@ones-editor/comments/src/comments-list/group-list.d.ts +6 -3
  48. package/@ones-editor/comments/src/comments-list/mini-comment/group-list.d.ts +1 -0
  49. package/@ones-editor/comments/src/comments-list/mini-comment/mini-comments-list.d.ts +1 -1
  50. package/@ones-editor/comments/src/comments-list/mobile-comments-list/group-list.d.ts +1 -0
  51. package/@ones-editor/comments/src/comments-list/mobile-comments-list/mobile-comments-list.d.ts +5 -3
  52. package/@ones-editor/comments/src/locale/en-us.d.ts +2 -0
  53. package/@ones-editor/comments/src/locale/ja-jp.d.ts +3 -0
  54. package/@ones-editor/comments/src/locale/zh-cn.d.ts +3 -0
  55. package/@ones-editor/comments/src/text-comments/comments-command-provider.d.ts +1 -0
  56. package/@ones-editor/comments/src/types.d.ts +9 -5
  57. package/@ones-editor/core/src/core/block-renderers/standard-block-render.d.ts +2 -0
  58. package/@ones-editor/core/src/core/blocks/block-anchor/create-block-anchor.d.ts +1 -0
  59. package/@ones-editor/core/src/core/blocks/common/block-dom.d.ts +2 -0
  60. package/@ones-editor/core/src/core/blocks/common/block-properties.d.ts +7 -1
  61. package/@ones-editor/core/src/core/blocks/complex-blocks/complex-block-helper.d.ts +4 -4
  62. package/@ones-editor/core/src/core/blocks/text-blocks/index.d.ts +1 -0
  63. package/@ones-editor/core/src/core/blocks/text-blocks/text-block/to-markdown.d.ts +3 -0
  64. package/@ones-editor/core/src/core/blocks/text-blocks/text-block/to-plain-html.d.ts +3 -0
  65. package/@ones-editor/core/src/core/blocks/text-blocks/text-block/to-plain-text.d.ts +3 -0
  66. package/@ones-editor/core/src/core/boxes/anchor-box/index.d.ts +3 -0
  67. package/@ones-editor/core/src/core/boxes/editor-boxes.d.ts +1 -0
  68. package/@ones-editor/core/src/core/boxes/image-box/index.d.ts +3 -0
  69. package/@ones-editor/core/src/core/boxes/index.d.ts +3 -1
  70. package/@ones-editor/core/src/core/composition/clipboard/copy.d.ts +3 -2
  71. package/@ones-editor/core/src/core/composition/clipboard/cut.d.ts +1 -1
  72. package/@ones-editor/core/src/core/composition/clipboard/paste.d.ts +2 -2
  73. package/@ones-editor/core/src/core/composition/editor-input.d.ts +6 -1
  74. package/@ones-editor/core/src/core/composition/index.d.ts +1 -1
  75. package/@ones-editor/core/src/core/containers/root-container.d.ts +3 -1
  76. package/@ones-editor/core/src/core/converter/block-to-doc.d.ts +1 -1
  77. package/@ones-editor/core/src/core/converter/block-to-html.d.ts +2 -2
  78. package/@ones-editor/core/src/core/converter/block-to-markdown.d.ts +2 -2
  79. package/@ones-editor/core/src/core/converter/block-to-text.d.ts +2 -2
  80. package/@ones-editor/core/src/core/converter/selected-block-to-doc.d.ts +1 -3
  81. package/@ones-editor/core/src/core/data-converter/editor-data-converter.d.ts +4 -2
  82. package/@ones-editor/core/src/core/doc/doc.d.ts +18 -3
  83. package/@ones-editor/core/src/core/doc/to-plain-text.d.ts +1 -0
  84. package/@ones-editor/core/src/core/editor/actions/add-text-attribute.d.ts +2 -2
  85. package/@ones-editor/core/src/core/editor/actions/auto-insert-block.d.ts +2 -2
  86. package/@ones-editor/core/src/core/editor/actions/delete-block-text.d.ts +2 -2
  87. package/@ones-editor/core/src/core/editor/actions/focus-to-end.d.ts +0 -1
  88. package/@ones-editor/core/src/core/editor/actions/insert-block.d.ts +2 -2
  89. package/@ones-editor/core/src/core/editor/actions/insert-text.d.ts +3 -2
  90. package/@ones-editor/core/src/core/editor/actions/is-writable.d.ts +1 -1
  91. package/@ones-editor/core/src/core/editor/editor-dom/dom-events.d.ts +1 -1
  92. package/@ones-editor/core/src/core/editor-doc/editor-doc.d.ts +10 -4
  93. package/@ones-editor/core/src/core/index.d.ts +1 -0
  94. package/@ones-editor/core/src/core/input-handler/input-handler.d.ts +5 -1
  95. package/@ones-editor/core/src/core/selection/actions/index.d.ts +2 -2
  96. package/@ones-editor/core/src/core/selection/actions/select-all.d.ts +3 -1
  97. package/@ones-editor/core/src/core/selection/actions/select-block.d.ts +2 -0
  98. package/@ones-editor/core/src/core/selection/actions/word-offset.d.ts +1 -1
  99. package/@ones-editor/core/src/core/selection/editor-selection.d.ts +3 -2
  100. package/@ones-editor/core/src/core/selection/index.d.ts +1 -0
  101. package/@ones-editor/core/src/core/selection/range/simple-range.d.ts +2 -1
  102. package/@ones-editor/core/src/core/selection/select-handler.d.ts +5 -1
  103. package/@ones-editor/core/src/core/settings/index.d.ts +3 -3
  104. package/@ones-editor/core/src/core/types.d.ts +54 -25
  105. package/@ones-editor/core/src/core/undo-manager/actions/action.d.ts +4 -1
  106. package/@ones-editor/core/src/helper/block-helper.d.ts +1 -1
  107. package/@ones-editor/core/src/helper/find-block.d.ts +3 -0
  108. package/@ones-editor/core/src/helper/index.d.ts +1 -0
  109. package/@ones-editor/core/src/i18n/en-us.d.ts +3 -0
  110. package/@ones-editor/core/src/i18n/i18n.d.ts +63 -1
  111. package/@ones-editor/core/src/i18n/ja-jp.d.ts +20 -0
  112. package/@ones-editor/core/src/i18n/zh-cn.d.ts +3 -0
  113. package/@ones-editor/core/src/local-doc/index.d.ts +5 -1
  114. package/@ones-editor/core/src/utils/abbreviation.d.ts +27 -0
  115. package/@ones-editor/core/src/utils/client.d.ts +1 -0
  116. package/@ones-editor/core/src/utils/dom-scroll.d.ts +3 -1
  117. package/@ones-editor/core/src/utils/dom.d.ts +3 -0
  118. package/@ones-editor/core/src/utils/index.d.ts +2 -0
  119. package/@ones-editor/core/src/utils/logger/index.d.ts +9 -0
  120. package/@ones-editor/core/src/utils/overflow-text.d.ts +1 -0
  121. package/@ones-editor/details-block/package.json +8 -0
  122. package/@ones-editor/details-block/src/auto-expand.d.ts +7 -0
  123. package/@ones-editor/details-block/src/create-empty-details.d.ts +8 -0
  124. package/@ones-editor/details-block/src/details-dom.d.ts +3 -0
  125. package/@ones-editor/details-block/src/details-object.d.ts +11 -0
  126. package/@ones-editor/details-block/src/details-options.d.ts +2 -0
  127. package/@ones-editor/details-block/src/index.d.ts +4 -0
  128. package/@ones-editor/details-block/src/types.d.ts +5 -0
  129. package/@ones-editor/details-block/src/update-expand.d.ts +3 -0
  130. package/@ones-editor/dividing-line-embed/src/i18n/en-us.d.ts +1 -0
  131. package/@ones-editor/dividing-line-embed/src/i18n/ja-jp.d.ts +7 -0
  132. package/@ones-editor/dividing-line-embed/src/i18n/zh-cn.d.ts +1 -0
  133. package/@ones-editor/drawio-embed/src/drawio-embed.d.ts +1 -0
  134. package/@ones-editor/drawio-embed/src/helper/index.d.ts +16 -10
  135. package/@ones-editor/drawio-embed/src/lang/en-us.d.ts +9 -4
  136. package/@ones-editor/drawio-embed/src/lang/index.d.ts +1 -1
  137. package/@ones-editor/drawio-embed/src/lang/ja-jp.d.ts +12 -0
  138. package/@ones-editor/drawio-embed/src/lang/zh-cn.d.ts +9 -4
  139. package/@ones-editor/drawio-embed/types/index.d.ts +4 -4
  140. package/@ones-editor/drop-target/src/drop-target.d.ts +2 -0
  141. package/@ones-editor/drop-target/src/handlers/drag-file.d.ts +0 -1
  142. package/@ones-editor/drop-target/src/handlers/patch-insert-file.d.ts +2 -0
  143. package/@ones-editor/drop-target/src/index.d.ts +2 -1
  144. package/@ones-editor/embed-block-helper/src/block-properties/embed-block-properties.d.ts +2 -1
  145. package/@ones-editor/embed-block-helper/src/block-resizer/index.d.ts +14 -0
  146. package/@ones-editor/embed-block-helper/src/index.d.ts +2 -0
  147. package/@ones-editor/embed-block-helper/src/locale/en-us.d.ts +7 -0
  148. package/@ones-editor/embed-block-helper/src/locale/index.d.ts +1 -0
  149. package/@ones-editor/embed-block-helper/src/locale/ja-jp.d.ts +7 -0
  150. package/@ones-editor/embed-block-helper/src/locale/zh-cn.d.ts +7 -0
  151. package/@ones-editor/excalidraw/package.json +11 -0
  152. package/@ones-editor/excalidraw/src/excalidraw/block-properties.d.ts +2 -0
  153. package/@ones-editor/excalidraw/src/excalidraw/editor.d.ts +2 -0
  154. package/@ones-editor/excalidraw/src/index.d.ts +4 -0
  155. package/@ones-editor/excalidraw/src/types.d.ts +9 -0
  156. package/@ones-editor/excalidraw/src/utils/excalidraw-data.d.ts +4 -0
  157. package/@ones-editor/exclusive-block/package.json +6 -0
  158. package/@ones-editor/exclusive-block/src/exclusive-block-hook.d.ts +6 -0
  159. package/@ones-editor/exclusive-block/src/exclusive-block.d.ts +22 -0
  160. package/@ones-editor/exclusive-block/src/exclusive-dom.d.ts +5 -0
  161. package/@ones-editor/exclusive-block/src/handle-remote-exclusive-message.d.ts +3 -0
  162. package/@ones-editor/exclusive-block/src/index.d.ts +7 -0
  163. package/@ones-editor/exclusive-block/src/locale/en-us.d.ts +7 -0
  164. package/@ones-editor/exclusive-block/src/locale/index.d.ts +1 -0
  165. package/@ones-editor/exclusive-block/src/locale/ja-jp.d.ts +7 -0
  166. package/@ones-editor/exclusive-block/src/locale/zh-cn.d.ts +7 -0
  167. package/@ones-editor/exclusive-block/src/types.d.ts +7 -0
  168. package/@ones-editor/file/src/file-embed/card/index.d.ts +3 -3
  169. package/@ones-editor/file/src/index.d.ts +2 -0
  170. package/@ones-editor/file/src/locale/en-us.d.ts +12 -0
  171. package/@ones-editor/file/src/locale/index.d.ts +1 -0
  172. package/@ones-editor/file/src/locale/ja-jp.d.ts +12 -0
  173. package/@ones-editor/file/src/locale/zh-cn.d.ts +12 -0
  174. package/@ones-editor/file/src/types.d.ts +3 -1
  175. package/@ones-editor/find-dialog/src/doc/doc-handler.d.ts +15 -0
  176. package/@ones-editor/find-dialog/src/find-dialog.d.ts +5 -1
  177. package/@ones-editor/find-dialog/src/highlights/highligh-text.d.ts +3 -0
  178. package/@ones-editor/find-dialog/src/highlights/highlight-dom.d.ts +1 -0
  179. package/@ones-editor/find-dialog/src/locale/ja-jp.d.ts +13 -0
  180. package/@ones-editor/graph-embed/assets/index.d.ts +2 -0
  181. package/@ones-editor/graph-embed/src/helper/graph-base.d.ts +9 -3
  182. package/@ones-editor/graph-embed/src/helper/graph-block-commands.d.ts +5 -3
  183. package/@ones-editor/graph-embed/src/lang/en-us.d.ts +10 -5
  184. package/@ones-editor/graph-embed/src/lang/ja-jp.d.ts +13 -0
  185. package/@ones-editor/graph-embed/src/lang/zh-cn.d.ts +6 -3
  186. package/@ones-editor/heading-collapse/src/index.d.ts +1 -0
  187. package/@ones-editor/heading-collapse/src/locale/en-us.d.ts +7 -0
  188. package/@ones-editor/heading-collapse/src/locale/index.d.ts +1 -0
  189. package/@ones-editor/heading-collapse/src/locale/ja-jp.d.ts +7 -0
  190. package/@ones-editor/heading-collapse/src/locale/zh-cn.d.ts +7 -0
  191. package/@ones-editor/html-to-doc/src/html-to-doc/normal-html/code.d.ts +1 -0
  192. package/@ones-editor/image-embed/package.json +2 -1
  193. package/@ones-editor/image-embed/src/copy-handler.d.ts +8 -0
  194. package/@ones-editor/image-embed/src/drag-drop/drag-handler.d.ts +9 -2
  195. package/@ones-editor/image-embed/src/drag-drop/handle-drop-over.d.ts +1 -1
  196. package/@ones-editor/image-embed/src/empty-image-converter.d.ts +5 -0
  197. package/@ones-editor/image-embed/src/image-data.d.ts +6 -4
  198. package/@ones-editor/image-embed/src/image-file.d.ts +4 -0
  199. package/@ones-editor/image-embed/src/image-object.d.ts +5 -1
  200. package/@ones-editor/image-embed/src/image-resizer.d.ts +3 -0
  201. package/@ones-editor/image-embed/src/index.d.ts +5 -2
  202. package/@ones-editor/image-embed/src/locale/en-us.d.ts +2 -1
  203. package/@ones-editor/image-embed/src/locale/ja-jp.d.ts +17 -0
  204. package/@ones-editor/image-embed/src/locale/zh-cn.d.ts +1 -0
  205. package/@ones-editor/image-embed/src/paste-handler.d.ts +7 -0
  206. package/@ones-editor/image-embed/src/shortcuts/copy-image.d.ts +2 -0
  207. package/@ones-editor/image-embed/src/shortcuts/image-clipboard-data.d.ts +7 -0
  208. package/@ones-editor/image-embed/src/shortcuts/index.d.ts +3 -2
  209. package/@ones-editor/image-embed/src/types.d.ts +9 -2
  210. package/@ones-editor/input-handlers/src/enforce-with-document-title/types.d.ts +1 -0
  211. package/@ones-editor/input-handlers/src/i18n/en-us.d.ts +1 -0
  212. package/@ones-editor/input-handlers/src/i18n/ja-jp.d.ts +11 -0
  213. package/@ones-editor/input-handlers/src/i18n/zh-cn.d.ts +1 -0
  214. package/@ones-editor/input-handlers/src/index.d.ts +2 -2
  215. package/@ones-editor/input-handlers/src/markdown-shortcuts/index.d.ts +2 -1
  216. package/@ones-editor/input-handlers/src/markdown-shortcuts/match-block-convert.d.ts +1 -0
  217. package/@ones-editor/input-handlers/src/markdown-shortcuts/table-converter.d.ts +2 -0
  218. package/@ones-editor/list-block/src/converter/convert-list-to.d.ts +2 -0
  219. package/@ones-editor/list-block/src/converter/convert-to-list.d.ts +14 -0
  220. package/@ones-editor/list-block/src/converter/index.d.ts +2 -14
  221. package/@ones-editor/list-block/src/index.d.ts +7 -3
  222. package/@ones-editor/list-block/src/keyboard/shortcut.d.ts +3 -0
  223. package/@ones-editor/list-block/src/lang/ja-jp.d.ts +21 -0
  224. package/@ones-editor/list-block/src/level/change-multi-levels.d.ts +2 -0
  225. package/@ones-editor/list-block/src/level/decrease-level.d.ts +1 -0
  226. package/@ones-editor/list-block/src/marker/customize-start-dialog.d.ts +1 -0
  227. package/@ones-editor/list-block/src/mindmap/index.d.ts +1 -1
  228. package/@ones-editor/list-block/src/mindmap/to-mindmap/close-mindmap.d.ts +1 -0
  229. package/@ones-editor/list-block/src/mindmap/to-mindmap/index.d.ts +3 -1
  230. package/@ones-editor/list-block/src/start/fix-start-by-list.d.ts +9 -0
  231. package/@ones-editor/list-block/src/types.d.ts +2 -1
  232. package/@ones-editor/list-block/src/utils/list-brother.d.ts +5 -1
  233. package/@ones-editor/markdown-to-doc/src/markdown-to-doc.d.ts +1 -0
  234. package/@ones-editor/markdown-to-doc/src/tokens/block-tokens/latex.d.ts +4 -0
  235. package/@ones-editor/markdown-to-doc/src/tokens/block-tokens/paragraph.d.ts +1 -0
  236. package/@ones-editor/mathjax/package.json +3 -0
  237. package/@ones-editor/mathjax/src/index.d.ts +2 -1
  238. package/@ones-editor/mathjax/src/locale/ja-jp.d.ts +7 -0
  239. package/@ones-editor/mathjax/src/mathjax-box/convert-mathjax.d.ts +5 -0
  240. package/@ones-editor/mathjax/src/mathjax-box/mathjax-editor.d.ts +18 -2
  241. package/@ones-editor/media-embed/src/core/media-embed.d.ts +4 -2
  242. package/@ones-editor/media-embed/src/core/media.d.ts +10 -4
  243. package/@ones-editor/media-embed/src/core/video-resizer.d.ts +1 -0
  244. package/@ones-editor/media-embed/src/locale/ja-jp.d.ts +19 -0
  245. package/@ones-editor/media-embed/src/utils/file.d.ts +1 -2
  246. package/@ones-editor/mention/src/block-mention.d.ts +1 -1
  247. package/@ones-editor/mention/src/dom/mention-button.d.ts +1 -1
  248. package/@ones-editor/mention/src/index.d.ts +1 -0
  249. package/@ones-editor/mention/src/locale/en-us.d.ts +6 -0
  250. package/@ones-editor/mention/src/locale/index.d.ts +1 -0
  251. package/@ones-editor/mention/src/locale/ja-jp.d.ts +6 -0
  252. package/@ones-editor/mention/src/locale/zh-cn.d.ts +6 -0
  253. package/@ones-editor/mention/src/mention.d.ts +2 -9
  254. package/@ones-editor/mention/src/types.d.ts +12 -1
  255. package/@ones-editor/misc/src/index.d.ts +2 -1
  256. package/@ones-editor/misc/src/is-secure-env.d.ts +1 -0
  257. package/@ones-editor/mobile-helper/package.json +9 -0
  258. package/@ones-editor/mobile-helper/src/index.d.ts +11 -0
  259. package/@ones-editor/paste-handler/src/paste-handler.d.ts +1 -1
  260. package/@ones-editor/paste-handler/src/text-data-converter.d.ts +2 -2
  261. package/@ones-editor/paste-special/src/index.d.ts +1 -0
  262. package/@ones-editor/paste-special/src/locale/en-us.d.ts +8 -0
  263. package/@ones-editor/paste-special/src/locale/index.d.ts +1 -0
  264. package/@ones-editor/paste-special/src/locale/ja-jp.d.ts +8 -0
  265. package/@ones-editor/paste-special/src/locale/zh-cn.d.ts +8 -0
  266. package/@ones-editor/paste-special/src/paste-special-handler.d.ts +2 -2
  267. package/@ones-editor/scroll-container/src/dom-utils.d.ts +8 -0
  268. package/@ones-editor/scroll-container/src/index.d.ts +8 -18
  269. package/@ones-editor/scroll-container/src/observer/container-resize-observer.d.ts +2 -1
  270. package/@ones-editor/scroll-container/src/observer/locating-resize-observer.d.ts +2 -1
  271. package/@ones-editor/scroll-container/src/scroll-listener.d.ts +2 -0
  272. package/@ones-editor/scroll-container/src/types.d.ts +3 -1
  273. package/@ones-editor/scroll-container/src/utils.d.ts +1 -0
  274. package/@ones-editor/sharedb-doc/src/doc/auth-connection.d.ts +3 -3
  275. package/@ones-editor/sharedb-doc/src/doc/comments.d.ts +0 -1
  276. package/@ones-editor/sharedb-doc/src/doc/op-parser/parse-handler.d.ts +25 -0
  277. package/@ones-editor/sharedb-doc/src/doc/sharedb-client.d.ts +5 -4
  278. package/@ones-editor/sharedb-doc/src/doc/sharedb-doc.d.ts +14 -4
  279. package/@ones-editor/sharedb-doc/src/index.d.ts +1 -0
  280. package/@ones-editor/sharedb-doc/src/types.d.ts +3 -2
  281. package/@ones-editor/table-block/src/constant/index.d.ts +1 -0
  282. package/@ones-editor/table-block/src/locale/en-us.d.ts +5 -0
  283. package/@ones-editor/table-block/src/locale/ja-jp.d.ts +27 -0
  284. package/@ones-editor/table-block/src/locale/zh-cn.d.ts +5 -0
  285. package/@ones-editor/table-block/src/table-block/border-bar/table-border-bar-handler.d.ts +14 -1
  286. package/@ones-editor/table-block/src/table-block/border-bar/table-border-bar-scroll.d.ts +2 -0
  287. package/@ones-editor/table-block/src/table-block/border-bar/table-border-bar.d.ts +2 -1
  288. package/@ones-editor/table-block/src/table-block/border-bar/table-row-column-toolbar.d.ts +1 -0
  289. package/@ones-editor/table-block/src/table-block/convert-table-to.d.ts +2 -0
  290. package/@ones-editor/table-block/src/table-block/doc-change-handler.d.ts +2 -0
  291. package/@ones-editor/table-block/src/table-block/doc-table-data.d.ts +1 -1
  292. package/@ones-editor/table-block/src/table-block/selection-range.d.ts +2 -1
  293. package/@ones-editor/table-block/src/table-block/table-creator/index.d.ts +1 -1
  294. package/@ones-editor/table-block/src/table-block/table-dom.d.ts +1 -0
  295. package/@ones-editor/table-block/src/table-block/table-scroll-events.d.ts +2 -0
  296. package/@ones-editor/table-block/src/types.d.ts +5 -0
  297. package/@ones-editor/tabs-block/package.json +8 -0
  298. package/@ones-editor/tabs-block/src/active-tab.d.ts +2 -0
  299. package/@ones-editor/tabs-block/src/create-empty-tabs.d.ts +8 -0
  300. package/@ones-editor/tabs-block/src/index.d.ts +4 -0
  301. package/@ones-editor/tabs-block/src/tabs-dom.d.ts +4 -0
  302. package/@ones-editor/tabs-block/src/tabs-object.d.ts +14 -0
  303. package/@ones-editor/tabs-block/src/tabs-options.d.ts +2 -0
  304. package/@ones-editor/tabs-block/src/types.d.ts +8 -0
  305. package/@ones-editor/templates/src/locale/ja-jp.d.ts +9 -0
  306. package/@ones-editor/templates/src/templates/select-template.d.ts +0 -1
  307. package/@ones-editor/text-commands/src/index.d.ts +2 -1
  308. package/@ones-editor/text-commands/src/locale/en-us.d.ts +1 -14
  309. package/@ones-editor/text-commands/src/locale/ja-jp.d.ts +13 -0
  310. package/@ones-editor/text-commands/src/locale/zh-cn.d.ts +1 -14
  311. package/@ones-editor/text-commands/src/shortcut-handler.d.ts +2 -0
  312. package/@ones-editor/text-commands/src/text-command-provider.d.ts +1 -1
  313. package/@ones-editor/to-docx/src/doc2other/core.d.ts +1 -1
  314. package/@ones-editor/toc/src/build-toc.d.ts +4 -2
  315. package/@ones-editor/toc/src/heading-scroll/index.d.ts +2 -2
  316. package/@ones-editor/toc/src/index.d.ts +2 -0
  317. package/@ones-editor/toc/src/locale/en-us.d.ts +6 -0
  318. package/@ones-editor/toc/src/locale/index.d.ts +1 -0
  319. package/@ones-editor/toc/src/locale/ja-jp.d.ts +6 -0
  320. package/@ones-editor/toc/src/locale/zh-cn.d.ts +6 -0
  321. package/@ones-editor/toc/src/toc-provider.d.ts +2 -1
  322. package/@ones-editor/toc/src/types.d.ts +3 -0
  323. package/@ones-editor/tsconfig.tsbuildinfo +1 -1
  324. package/@ones-editor/ui/src/index.d.ts +6 -4
  325. package/@ones-editor/ui/src/locale/en-us.d.ts +12 -20
  326. package/@ones-editor/ui/src/locale/ja-jp.d.ts +43 -0
  327. package/@ones-editor/ui/src/locale/zh-cn.d.ts +4 -12
  328. package/@ones-editor/ui/src/quick-menu/basic-commands.d.ts +5 -0
  329. package/@ones-editor/ui/src/quick-menu/basic-menu-items.d.ts +13 -10
  330. package/@ones-editor/ui/src/quick-menu/index.d.ts +6 -0
  331. package/@ones-editor/ui/src/quick-menu/inline-box-items.d.ts +8 -14
  332. package/@ones-editor/ui/src/quick-menu/quick-menu-items.d.ts +4 -1
  333. package/@ones-editor/ui/src/toolbar/box-only.d.ts +2 -0
  334. package/@ones-editor/ui/src/toolbar/commands/paragraph.d.ts +1 -0
  335. package/@ones-editor/ui/src/toolbar/helper.d.ts +1 -1
  336. package/@ones-editor/ui/src/toolbar/object-commands.d.ts +5 -1
  337. package/@ones-editor/ui/src/toolbar/toolbar-handler.d.ts +4 -1
  338. package/@ones-editor/ui/src/tooltips/index.d.ts +6 -1
  339. package/@ones-editor/ui-base/src/auto-suggest/auto-suggest-menu.d.ts +23 -13
  340. package/@ones-editor/ui-base/src/auto-suggest/auto-suggest.d.ts +12 -2
  341. package/@ones-editor/ui-base/src/auto-suggest/editor-auto-suggest-menu.d.ts +12 -0
  342. package/@ones-editor/ui-base/src/auto-suggest/index.d.ts +2 -1
  343. package/@ones-editor/ui-base/src/auto-suggest/should-focus-to-editor.d.ts +2 -0
  344. package/@ones-editor/ui-base/src/command-bar/command-bar.d.ts +8 -2
  345. package/@ones-editor/ui-base/src/command-bar/fixed-toolbar.d.ts +12 -0
  346. package/@ones-editor/ui-base/src/command-bar/index.d.ts +2 -1
  347. package/@ones-editor/ui-base/src/command-bar/init-toolbar-item.d.ts +6 -0
  348. package/@ones-editor/ui-base/src/command-bar/manual-command-bar.d.ts +2 -1
  349. package/@ones-editor/ui-base/src/command-bar/types.d.ts +13 -2
  350. package/@ones-editor/ui-base/src/components/button.d.ts +1 -1
  351. package/@ones-editor/ui-base/src/components/checkbox.d.ts +3 -0
  352. package/@ones-editor/ui-base/src/components/index.d.ts +2 -0
  353. package/@ones-editor/ui-base/src/components/loading.d.ts +2 -0
  354. package/@ones-editor/ui-base/src/dialog/index.d.ts +1 -0
  355. package/@ones-editor/ui-base/src/dialog/types.d.ts +4 -0
  356. package/@ones-editor/ui-base/src/dropdown/index.d.ts +44 -0
  357. package/@ones-editor/ui-base/src/icons/index.d.ts +7 -1
  358. package/@ones-editor/ui-base/src/index.d.ts +2 -0
  359. package/@ones-editor/ui-base/src/input/create-input.d.ts +1 -0
  360. package/@ones-editor/ui-base/src/item-shortcuts/index.d.ts +1 -0
  361. package/@ones-editor/ui-base/src/list/drop-down-filterable-list.d.ts +2 -2
  362. package/@ones-editor/ui-base/src/locale/en-us.d.ts +1 -0
  363. package/@ones-editor/ui-base/src/locale/ja-jp.d.ts +12 -0
  364. package/@ones-editor/ui-base/src/locale/zh-cn.d.ts +1 -0
  365. package/@ones-editor/versions/src/history-doc/history-doc.d.ts +6 -5
  366. package/@ones-editor/versions/src/index.d.ts +1 -1
  367. package/@ones-editor/versions/src/locale/en-us.d.ts +29 -0
  368. package/@ones-editor/versions/src/locale/ja-jp.d.ts +44 -0
  369. package/@ones-editor/versions/src/locale/zh-cn.d.ts +29 -0
  370. package/@ones-editor/versions/src/types.d.ts +8 -8
  371. package/@ones-editor/versions/src/utils/index.d.ts +2 -2
  372. package/@ones-editor/versions/src/version-dialog/index.d.ts +26 -2
  373. package/@ones-editor/versions/src/version-dialog/play-history.d.ts +1 -2
  374. package/@ones-editor/versions/src/version-dialog/size-limit-textarea.d.ts +23 -0
  375. package/@ones-editor/versions/src/version-dialog/version-helper.d.ts +3 -0
  376. package/@ones-editor/versions/src/version-dialog/version-info-header.d.ts +13 -0
  377. package/@ones-editor/versions/src/version-dialog/version-list.d.ts +23 -9
  378. package/@ones-editor/versions/src/version-dialog/versions-dropdown.d.ts +27 -0
  379. package/@ones-editor/webpage-embed/src/locale/en-us.d.ts +6 -0
  380. package/@ones-editor/webpage-embed/src/locale/ja-jp.d.ts +27 -0
  381. package/@ones-editor/webpage-embed/src/locale/zh-cn.d.ts +6 -0
  382. package/@ones-editor/webpage-embed/src/types.d.ts +3 -0
  383. package/@ones-editor/webpage-embed/src/ui/dialog.d.ts +2 -2
  384. package/@ones-editor/webpage-embed/src/webpage-embed/webpage-items.d.ts +2 -14
  385. package/dist/comments/create-comment-editor.d.ts +4 -7
  386. package/dist/comments/local-doc-comments-provider.d.ts +19 -0
  387. package/dist/comments/{comments-provider.d.ts → sharedb-doc-comments-provider.d.ts} +4 -6
  388. package/dist/index.d.ts +19 -4
  389. package/dist/index.js +464 -437
  390. package/dist/lang/en-us.d.ts +19 -0
  391. package/dist/lang/index.d.ts +1 -0
  392. package/dist/lang/ja-jp.d.ts +19 -0
  393. package/dist/lang/zh-cn.d.ts +19 -0
  394. package/dist/standard-components.d.ts +3 -0
  395. package/dist/types.d.ts +35 -3
  396. package/dist/versions/versions-provider.d.ts +1 -1
  397. package/package.json +7 -4
  398. package/@ones-editor/block-menu/src/icons/index.d.ts +0 -4
  399. package/@ones-editor/e2e/cypress/support/commands.d.ts +0 -25
  400. package/@ones-editor/e2e/cypress/support/e2e.d.ts +0 -1
  401. package/@ones-editor/e2e/cypress.config.d.ts +0 -3
  402. package/@ones-editor/e2e/package.json +0 -13
  403. package/@ones-editor/e2e/src/block-menu/case.d.ts +0 -17
  404. package/@ones-editor/e2e/src/block-menu/menu.cy.d.ts +0 -1
  405. package/@ones-editor/e2e/src/data.d.ts +0 -131
  406. package/@ones-editor/e2e/src/input-handlers/case.d.ts +0 -10
  407. package/@ones-editor/e2e/src/input-handlers/shortcut.cy.d.ts +0 -1
  408. package/@ones-editor/e2e/src/list-block/case.d.ts +0 -8
  409. package/@ones-editor/e2e/src/list-block/list.cy.d.ts +0 -1
  410. package/@ones-editor/e2e/src/toc/case.d.ts +0 -5
  411. package/@ones-editor/e2e/src/toc/toc.cy.d.ts +0 -1
  412. package/@ones-editor/graph-embed/src/lang/utils.d.ts +0 -3
  413. package/@ones-editor/list-block/src/command/covert-to-list.d.ts +0 -3
  414. package/@ones-editor/versions/src/version-dialog/actions-buttons.d.ts +0 -17
  415. /package/@ones-editor/block-menu/src/block-menu-button/{drag-drop → drag-preview}/element-to-data-url.d.ts +0 -0
@@ -3,7 +3,7 @@ export default class DefaultSettingsProvider implements OnesEditorSettingsProvid
3
3
  private editor;
4
4
  constructor(editor: OnesEditor);
5
5
  getKey(key: string): string;
6
- getItem(key: string): Promise<string | null>;
7
- setItem(key: string, value: string | null): Promise<void>;
8
- removeItem(key: string): Promise<void>;
6
+ getItem(key: string): string | null;
7
+ setItem(key: string, value: string | null): void;
8
+ removeItem(key: string): void;
9
9
  }
@@ -1,5 +1,5 @@
1
1
  import { TypedEmitter } from 'tiny-typed-emitter';
2
- import { DocBlock, DocBlockAttributes, DocBlocks, DocBlockText, DocBlockTextAttributes, DocBox, DocEmbedBlock, DocEmbedData, DocInsertion, DocObject, OnesEditorDoc, OnesEditorDocRange } from './doc';
2
+ import { DocBlock, DocBlockAttributes, DocBlocks, DocBlockText, DocBlockTextAttributes, DocBox, DocEmbedBlock, DocEmbedData, DocInsertion, DocObject, InsertBlockOptions, OnesEditorDoc, OnesEditorDocRange } from './doc';
3
3
  export type ContainerElement = HTMLDivElement & {
4
4
  __neverUse: 'ContainerElement';
5
5
  };
@@ -56,11 +56,13 @@ export interface BoxCommands {
56
56
  }
57
57
  export interface BoxProperties {
58
58
  boxCommands?: Record<string, BoxCommands>;
59
+ abstract?: string;
59
60
  }
60
61
  export interface Box {
61
62
  boxType: string;
62
63
  updateBoxContent: (editor: OnesEditor, boxElement: BoxElement, boxContent: BoxContentElement, boxData: DocBox) => void;
63
64
  convertFrom?: (editor: OnesEditor, text: string) => DocBox | null;
65
+ convertTo?: (editor: OnesEditor, boxData: DocBox, doc: DocObject, type: 'text' | 'html' | 'markdown') => string;
64
66
  handleClickBox?: (editor: OnesEditor, box: BoxElement, event: MouseEvent) => void;
65
67
  toStandardText?: (editor: OnesEditor, box: DocBox) => Promise<DocBlockText | undefined>;
66
68
  getBoxProperties?: (editor: OnesEditor, boxElement: BoxElement) => BoxProperties;
@@ -88,12 +90,13 @@ export interface Embed {
88
90
  getOptions?: (editor: OnesEditor) => EmbedOptions;
89
91
  handleDeleteBlock?: (editor: OnesEditor, block: BlockElement, local: boolean, options: DeleteBlockEventOptions) => void;
90
92
  handleUpdateBlock?: (editor: OnesEditor, block: BlockElement, blockData: DocEmbedBlock) => boolean;
91
- handleDropOver?: (editor: OnesEditor, block: BlockElement, dragData: DragObject | null, x: number, y: number) => DropInsertPos | undefined;
93
+ handleDropOver?: (editor: OnesEditor, block: BlockElement, dragData: DragObject | DataTransferItemList | null, x: number, y: number) => DropInsertPos | undefined;
92
94
  handleDrop?: (editor: OnesEditor, block: BlockElement, dragData: DragObject | File[], insertPos: DropInsertPos, options: DropOptions) => boolean | undefined;
93
95
  convertFrom?: (editor: OnesEditor, srcBlock: BlockElement, options: {
94
96
  offset: number;
95
97
  data?: DocBlockAttributes;
96
98
  }) => ConvertBlockResult | null;
99
+ toStandardDoc?: (editor: OnesEditor, blockData: DocBlock, doc: DocObject, path: BlockPath) => Promise<DocObject | undefined>;
97
100
  }
98
101
  export interface ConvertBlockResult {
99
102
  blockData: DocBlock;
@@ -105,8 +108,9 @@ export interface DeleteBlockEventOptions {
105
108
  }
106
109
  export type CommandItemType = 'normal' | 'separator' | 'section';
107
110
  export type CommandItemState = 'disabled' | 'checked' | 'selected';
111
+ export type CloseReason = 'selectionChange' | 'clickItem' | 'clickBackground' | 'cancelBar' | 'fromHover' | 'switchItem' | null;
108
112
  export interface Closeable {
109
- close: () => void;
113
+ close: (reason: CloseReason) => void;
110
114
  click: (item: CommandItem, target: HTMLElement) => void;
111
115
  }
112
116
  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';
@@ -130,8 +134,12 @@ export interface CommandItem {
130
134
  manualShowChildren?: boolean;
131
135
  childrenPlacement?: CommandItemChildrenPlacement;
132
136
  childrenOffset?: [number, number];
133
- shortcut?: string;
137
+ childArrow?: boolean;
138
+ subText?: string;
134
139
  defaultCheckedChildren?: string[];
140
+ ellipsisTooltip?: string;
141
+ disableTooltip?: boolean;
142
+ disableReason?: string;
135
143
  setCloseable?: (closeable: Closeable) => void;
136
144
  beforePopup?: (parent: unknown) => void;
137
145
  }
@@ -200,12 +208,12 @@ export interface Block {
200
208
  clearSelection: (editor: OnesEditor) => void;
201
209
  getBlockProperties?: (editor: OnesEditor, block: BlockElement) => BlockProperties;
202
210
  getOptions?: (editor: OnesEditor) => BlockOptions;
203
- notify?: (editor: OnesEditor, command: string, params?: unknown) => void;
211
+ notify?: (editor: OnesEditor, command: string, params?: unknown) => unknown | undefined;
204
212
  handleBlockElementUpdated?: (editor: OnesEditor, block: BlockElement, blockData: DocBlock) => void;
205
213
  handleContainerResized?: (editor: OnesEditor, block: BlockElement) => void;
206
214
  handleDeleteBlock?: (editor: OnesEditor, block: BlockElement, local: boolean, options: DeleteBlockEventOptions) => void;
207
215
  handleUpdateBlock?: (editor: OnesEditor, block: BlockElement, blockData: DocBlock) => boolean;
208
- handleDropOver?: (editor: OnesEditor, block: BlockElement, dragData: DragObject | null, x: number, y: number) => DropInsertPos | undefined;
216
+ handleDropOver?: (editor: OnesEditor, block: BlockElement, dragData: DragObject | DataTransferItemList | null, x: number, y: number) => DropInsertPos | false | undefined;
209
217
  handleDrop?: (editor: OnesEditor, block: BlockElement, dragData: DragObject | File[], insertPos: DropInsertPos, options: DropOptions) => boolean | undefined;
210
218
  getClientRects?: (editor: OnesEditor, block: BlockElement, range: SelectionRange) => DOMRect[];
211
219
  getMinWidth?: (editor: OnesEditor, block: BlockElement) => number | undefined;
@@ -214,7 +222,7 @@ export interface Block {
214
222
  data?: DocBlockAttributes;
215
223
  }) => ConvertBlockResult | null;
216
224
  selectionToDoc?: (editor: OnesEditor, selectedBlock: SelectedBlock) => DocObject;
217
- convertTo?: (editor: OnesEditor, blockData: DocBlock, doc: DocObject, type: 'text' | 'html' | 'markdown') => string;
225
+ convertTo?: (editor: OnesEditor, blockData: DocBlock, doc: DocObject, type: 'text' | 'html' | 'markdown', path: BlockPath) => string;
218
226
  toStandardDoc?: (editor: OnesEditor, blockData: DocBlock, doc: DocObject) => Promise<DocObject | undefined>;
219
227
  getBlockStyles?: (editor: OnesEditor, block: BlockElement) => BlockStyles;
220
228
  blockToDoc?: (srcDoc: DocObject, srcBlockData: DocBlock, childBlockConverter: (srcDoc: DocObject, srcBlockData: DocBlock) => DocObject) => DocObject;
@@ -230,9 +238,12 @@ export interface TextKindBlock extends Block {
230
238
  export interface NextContainerOptions {
231
239
  noWrap?: boolean;
232
240
  }
241
+ export interface GetChildContainerOptions {
242
+ visibleOnly?: boolean;
243
+ }
233
244
  export interface ComplexKindBlock extends Block {
234
245
  enableKeyboardSelect?: boolean;
235
- getChildContainers: (editor: OnesEditor, complexBlock: BlockElement) => ContainerElement[];
246
+ getChildContainers: (editor: OnesEditor, complexBlock: BlockElement, options?: GetChildContainerOptions) => ContainerElement[];
236
247
  getNextContainer: (editor: OnesEditor, complexBlock: BlockElement, childContainer: ContainerElement, type: MoveDirection, options?: NextContainerOptions) => ContainerElement | null;
237
248
  getSelectedContainers: (editor: OnesEditor, complexBlock: BlockElement, start: ComplexBlockPosition, end: ComplexBlockPosition) => ContainerElement[];
238
249
  adjustSelectionPos?: (editor: OnesEditor, complexBlock: BlockElement, anchor: ComplexBlockPosition, focus: ComplexBlockPosition) => {
@@ -336,10 +347,10 @@ export interface OnesEditorBlockRenderers {
336
347
  export type OnesEditorDocSource = 'text/html' | 'text/office-html' | 'text/plain' | 'text/markdown' | 'image/*' | 'text/x-ones-editor-doc' | '*';
337
348
  export type OnesEditorDocs = Partial<Record<OnesEditorDocSource, DocObject>>;
338
349
  export interface OnesEditorDataConverter {
339
- fromData: (editor: OnesEditor, data: DataTransfer) => Promise<OnesEditorDocs | undefined>;
350
+ fromData: (editor: OnesEditor, data: DataTransfer, options?: PasteOptions) => Promise<OnesEditorDocs | undefined>;
340
351
  }
341
352
  export interface OnesEditorDataConverters {
342
- fromData: (editor: OnesEditor, data: DataTransfer) => Promise<OnesEditorDocs | undefined>;
353
+ fromData: (editor: OnesEditor, data: DataTransfer, options?: PasteOptions) => Promise<OnesEditorDocs | undefined>;
343
354
  addConverter: (converter: OnesEditorDataConverter) => void;
344
355
  }
345
356
  export interface BreakTextOptions {
@@ -348,7 +359,7 @@ export interface BreakTextOptions {
348
359
  copyBlockAttributes?: boolean;
349
360
  }
350
361
  export interface OnesEditorEvents {
351
- 'docChanged': (editor: OnesEditor) => void;
362
+ 'docChanged': (editor: OnesEditor, local: boolean) => void;
352
363
  'readonlyChanged': (editor: OnesEditor) => void;
353
364
  'selectionChanged': (editor: OnesEditor) => void;
354
365
  'focusBlockChanged': (editor: OnesEditor, newBlock: BlockElement | null, oldBlock: BlockElement | null) => void;
@@ -357,15 +368,17 @@ export interface OnesEditorEvents {
357
368
  'resize': (editor: OnesEditor) => void;
358
369
  'load': (editor: OnesEditor, reload: boolean) => void;
359
370
  'click': (editor: OnesEditor, event: MouseEvent) => void;
371
+ 'clickLink': (editor: OnesEditor, event: MouseEvent, link: Element) => void;
360
372
  'beforeClearSelection': (editor: OnesEditor) => void;
361
373
  'afterClearSelection': (editor: OnesEditor) => void;
362
374
  'blur': (editor: OnesEditor) => void;
363
375
  'focus': (editor: OnesEditor) => void;
376
+ 'containerRemount': (editor: OnesEditor, containerId: string) => void;
364
377
  }
365
378
  export interface OnesEditorSettingsProvider {
366
- getItem: (key: string) => Promise<string | null>;
367
- setItem: (key: string, value: string | null) => Promise<void>;
368
- removeItem: (key: string) => Promise<void>;
379
+ getItem: (key: string) => string | null;
380
+ setItem: (key: string, value: string | null) => void;
381
+ removeItem: (key: string) => void;
369
382
  }
370
383
  export interface OnesEditorOptionalOptions {
371
384
  shortcuts?: ShortcutRecords[];
@@ -373,6 +386,7 @@ export interface OnesEditorOptionalOptions {
373
386
  components?: OnesEditorComponents;
374
387
  colors?: string[];
375
388
  scrollContainer?: HTMLElement;
389
+ enableComments?: boolean;
376
390
  settingsProvider?: OnesEditorSettingsProvider;
377
391
  }
378
392
  export interface OnesEditorOptions {
@@ -380,6 +394,7 @@ export interface OnesEditorOptions {
380
394
  componentsOptions: {
381
395
  [index: string]: unknown;
382
396
  };
397
+ enableComments?: boolean;
383
398
  scrollContainer?: HTMLElement;
384
399
  }
385
400
  export interface OnesEditorComponents {
@@ -413,7 +428,7 @@ export declare class OnesEditorCustomDataWrapper<T> {
413
428
  private editor;
414
429
  private data;
415
430
  constructor(editor: OnesEditor, data: T);
416
- getData<T>(): T;
431
+ getData(): T;
417
432
  getEditor(): OnesEditor;
418
433
  destroy(): void;
419
434
  }
@@ -427,6 +442,7 @@ export interface OnesEditorDomEvents extends OnesEditorCustom {
427
442
  removeEventListener: (element: Element | Document | Window | null, eventName: string | null, eventHandler: (editor: OnesEditor, event: Event) => void) => void;
428
443
  removeAllListeners: (element: Element | Document | Window, eventName?: string) => void;
429
444
  }
445
+ export type InsertTextOptions = InsertBlockOptions;
430
446
  export interface OnesEditor extends TypedEmitter<OnesEditorEvents> {
431
447
  readonly parent: HTMLElement;
432
448
  readonly rootElement: HTMLDivElement;
@@ -472,7 +488,7 @@ export interface OnesEditor extends TypedEmitter<OnesEditorEvents> {
472
488
  tryFocusToChildSimpleBlock?: boolean;
473
489
  }) => void;
474
490
  isWritable: () => boolean;
475
- isBlockWritable: (block: BlockElement) => boolean;
491
+ isBlockWritable: (block: BlockElement | BlockElement[]) => boolean;
476
492
  reload: () => void;
477
493
  getChildContainerData: (childContainerId: string) => DocBlocks;
478
494
  createChildContainer: (path: BlockPath, parentElement: HTMLElement, childContainerId: string) => ContainerElement;
@@ -491,7 +507,7 @@ export interface OnesEditor extends TypedEmitter<OnesEditorEvents> {
491
507
  contains: (node: Node) => boolean;
492
508
  getSelectedText: () => string;
493
509
  clearSelectedContents: () => void;
494
- insertBlock: (containerId: string, blockIndex: number, blockData: DocBlock, newRange?: OnesEditorDocRange) => BlockElement;
510
+ insertBlock: (containerId: string, blockIndex: number, blockData: DocBlock, newRange?: OnesEditorDocRange, options?: InsertBlockOptions) => BlockElement;
495
511
  insertEmbed: (containerId: string, blockIndex: number, embedType: string, embedData: DocEmbedData, newRange?: OnesEditorDocRange) => BlockElement;
496
512
  deleteBlock: (block: BlockElement, newRange?: OnesEditorDocRange) => void;
497
513
  getTextPosition: () => BlockTextPosition;
@@ -502,8 +518,8 @@ export interface OnesEditor extends TypedEmitter<OnesEditorEvents> {
502
518
  getBlockText: (block: BlockElement) => DocBlockText;
503
519
  setBlockText: (block: BlockElement, text: DocBlockText) => void;
504
520
  getBoxData: (box: BoxElement) => DocBox;
505
- deleteTextFromBlock: (block: BlockElement, offset: number, count: number) => number;
506
- insertTextToBlock: (block: BlockElement, offset: number, text: string | DocBlockText) => DocBlockText;
521
+ deleteTextFromBlock: (block: BlockElement, offset: number, count: number, options?: InsertTextOptions) => number;
522
+ insertTextToBlock: (block: BlockElement, offset: number, text: string | DocBlockText, options?: InsertTextOptions) => DocBlockText;
507
523
  insertBoxToBlock: (block: BlockElement, offset: number, boxData: DocBox) => DocBlockText;
508
524
  mergeTextBlock: (block1: BlockElement, block2: BlockElement, options?: {
509
525
  focus?: boolean;
@@ -511,6 +527,7 @@ export interface OnesEditor extends TypedEmitter<OnesEditorEvents> {
511
527
  breakTextBlock: (block: BlockElement, offset: number, options?: BreakTextOptions) => BlockElement;
512
528
  insertTextBlock: (text?: string | DocBlockText, containerId?: string, blockIndex?: number, options?: {
513
529
  newRange?: OnesEditorDocRange;
530
+ insertBlockOptions?: InsertBlockOptions;
514
531
  }) => BlockElement;
515
532
  insertDoc: (block: BlockElement, offset: number, doc: DocObject, cloneDocResult?: CloneBlockResultInfo) => void;
516
533
  insertDocAt: (container: ContainerElement, blockIndex: number, doc: DocObject, cloneDocResult?: CloneBlockResultInfo) => BlockElement[];
@@ -532,7 +549,7 @@ export interface OnesEditorSelection {
532
549
  readonly startBlock: BlockElement;
533
550
  readonly endBlock: BlockElement;
534
551
  setSelection: (anchor: BlockPosition, focus?: BlockPosition, options?: ChangeSelectionOptions) => SelectionRange;
535
- setRange: (range: SelectionRange) => SelectionRange;
552
+ setRange: (range: SelectionRange, options?: ChangeSelectionOptions) => SelectionRange;
536
553
  selectBlock: (block: BlockElement, start: number, end?: number) => void;
537
554
  updateSelection: (old: SelectionRange | null) => void;
538
555
  updateLastCaretRect: () => void;
@@ -540,8 +557,12 @@ export interface OnesEditorSelection {
540
557
  getAnchorPos: () => BlockPosition;
541
558
  getFocusedPos: () => BlockPosition;
542
559
  scrollIntoView: () => void;
560
+ to: (type: 'text' | 'markdown' | 'html') => string;
543
561
  }
544
562
  export type RemoteChangeType = 'UpdateBlockText' | 'UpdateBlockData' | 'InsertBlock' | 'DeleteBlock' | 'InsertChildContainer' | 'DeleteChildContainer';
563
+ export type PasteOptions = {
564
+ toPlainText?: boolean;
565
+ };
545
566
  export interface OnesEditorInput {
546
567
  readonly inputElement: HTMLInputElement;
547
568
  destroy: () => void;
@@ -553,6 +574,7 @@ export interface OnesEditorInput {
553
574
  handleKeyDown: (event: KeyboardEvent) => void;
554
575
  handleChanged: (action: OnesEditorUndoAction) => void;
555
576
  handleRemoteChanged: (type: RemoteChangeType) => void;
577
+ handlePasteText: (text: string, options?: PasteOptions) => void;
556
578
  addHandler: (handler: OnesEditorInputHandler) => void;
557
579
  removeHandler: (handler: OnesEditorInputHandler) => void;
558
580
  defaultInsertText: (editor: OnesEditor, containerId: string, blockIndex: number, offset: number, text: string) => void;
@@ -561,7 +583,9 @@ export interface OnesEditorInput {
561
583
  export interface OnesEditorSelectionHandler {
562
584
  isSelecting: () => boolean;
563
585
  stopSelection: () => void;
564
- handleMouseDown: (event: MouseEvent) => void;
586
+ handleMouseDown: (event: MouseEvent, options: {
587
+ autoScroll: boolean;
588
+ }) => void;
565
589
  handleMouseMove: (event: MouseEvent) => void;
566
590
  handleMouseUp: (event: MouseEvent) => void;
567
591
  handleDblClick: (event: MouseEvent) => void;
@@ -572,14 +596,17 @@ export interface OnesEditorCaret {
572
596
  visible: () => boolean;
573
597
  }
574
598
  export interface OnesEditorInputHandler {
599
+ order?: number;
575
600
  handleBeforeInsertText?: (editor: OnesEditor, containerId: string, blockIndex: number, offset: number, text: string) => boolean;
576
601
  handleAfterInsertText?: (editor: OnesEditor, containerId: string, blockIndex: number, offset: number, text: string) => boolean;
577
602
  handleBeforeKeyDown?: (editor: OnesEditor, event: KeyboardEvent) => boolean;
578
603
  handleAfterKeyDown?: (editor: OnesEditor, event: KeyboardEvent) => boolean;
579
- handleBeforePaste?: (editor: OnesEditor, event: ClipboardEvent, doc: OnesEditorDocs) => Promise<boolean>;
580
- handleAfterPaste?: (editor: OnesEditor, event: ClipboardEvent, doc: OnesEditorDocs) => Promise<boolean>;
604
+ handleBeforeCopy?: (editor: OnesEditor, event: ClipboardEvent, doc: DocObject) => DocObject | boolean | undefined;
605
+ handleBeforeCut?: (editor: OnesEditor, event: ClipboardEvent) => DocObject | boolean | undefined;
606
+ handleBeforePaste?: (editor: OnesEditor, event: ClipboardEvent | null, doc: OnesEditorDocs) => Promise<boolean>;
607
+ handleAfterPaste?: (editor: OnesEditor, event: ClipboardEvent | null, doc: OnesEditorDocs) => Promise<boolean>;
581
608
  handleBeforePasteDoc?: (editor: OnesEditor, doc: DocObject) => Promise<boolean>;
582
- handleAfterPasteDoc?: (editor: OnesEditor, doc: DocObject) => Promise<boolean>;
609
+ handleAfterPasteDoc?: (editor: OnesEditor, doc: DocObject, cloneDocResult: CloneBlockResultInfo) => Promise<boolean>;
583
610
  handleChanged?: (editor: OnesEditor, action: OnesEditorUndoAction) => void;
584
611
  handleRemoteChanged?: (editor: OnesEditor, type: RemoteChangeType) => void;
585
612
  handleCompositionStart?: (editor: OnesEditor, containerId: string, blockIndex: number, offset: number) => void;
@@ -591,6 +618,7 @@ export interface OnesEditorBlocks {
591
618
  getBlockClass: (type: string) => Block;
592
619
  createBlock: (path: BlockPath, container: ContainerElement, block: DocBlock) => BlockElement;
593
620
  forEach: (callback: (blockClass: Block) => void) => void;
621
+ hasBlock: (type: string) => boolean;
594
622
  }
595
623
  export interface OnesEditorEmbeds {
596
624
  registerEmbedClass: (embedClass: Embed) => void;
@@ -601,6 +629,7 @@ export interface OnesEditorBoxes {
601
629
  registerBoxClass: (boxClass: Box) => void;
602
630
  getBoxClass: (type: string) => Box;
603
631
  createBox: (blockContent: BlockContentElement, box: DocBox) => BoxElement;
632
+ forEach: (callback: (boxClass: Box) => void) => void;
604
633
  }
605
634
  export interface OnesEditorInsertions {
606
635
  registerInsertionClass: (insertionClass: Insertion) => void;
@@ -647,6 +676,6 @@ export interface EditorDocLocalActionCallbacks {
647
676
  export interface OnesEditorBlockHook {
648
677
  create?: (editor: OnesEditor, path: BlockPath, container: ContainerElement, blockElement: BlockElement, blockData: DocBlock) => void;
649
678
  update?: (editor: OnesEditor, path: BlockPath, container: ContainerElement, blockElement: BlockElement, blockData: DocBlock) => void;
650
- writable?: (editor: OnesEditor, blockElement: BlockElement) => boolean | undefined;
679
+ writable?: (editor: OnesEditor, blockElement: BlockElement | BlockElement[]) => boolean | undefined;
651
680
  commands?: (editor: OnesEditor, blockElement: BlockElement) => BlockCommands;
652
681
  }
@@ -1,4 +1,4 @@
1
- import { OnesEditorDocRange } from '../../doc/doc';
1
+ import { DocBlock, OnesEditorDocRange } from '../../doc/doc';
2
2
  import { OnesEditor, OnesEditorUndoAction } from '../../types';
3
3
  export default class Action implements OnesEditorUndoAction {
4
4
  protected containerId: string;
@@ -10,4 +10,7 @@ export default class Action implements OnesEditorUndoAction {
10
10
  combinable(other: OnesEditorUndoAction): boolean;
11
11
  combine(other: OnesEditorUndoAction): void;
12
12
  setAfterRange(range: OnesEditorDocRange): void;
13
+ findContainerById(editor: OnesEditor, id: string): boolean;
14
+ findBlockById(editor: OnesEditor, id: string): boolean;
15
+ checkBlockData(editor: OnesEditor, blockData: DocBlock): boolean;
13
16
  }
@@ -1,2 +1,2 @@
1
- import { BlockElement } from '../core';
1
+ import { BlockElement } from '../core/types';
2
2
  export declare function isRootBlock(block: BlockElement): boolean;
@@ -0,0 +1,3 @@
1
+ import { BlockElement, OnesEditor } from '../core/types';
2
+ export declare function findPrevVisibleSimpleBlock(editor: OnesEditor, block: BlockElement): BlockElement | null;
3
+ export declare function findNextVisibleSimpleBlock(editor: OnesEditor, block: BlockElement): BlockElement | null;
@@ -3,3 +3,4 @@ import type { OnesEditorHoveringBlockFilter, OnesEditorHoveringBlockFinder } fro
3
3
  export { OnesEditorHoveringBlock, OnesEditorHoveringBlockFilter, OnesEditorHoveringBlockFinder };
4
4
  export * from './block-helper';
5
5
  export * from './run-once';
6
+ export * from './find-block';
@@ -13,5 +13,8 @@ declare const _default: {
13
13
  common: {
14
14
  cancel: string;
15
15
  };
16
+ docx: {
17
+ imageExportFailed: string;
18
+ };
16
19
  };
17
20
  export default _default;
@@ -1,3 +1,65 @@
1
- export declare function setLang(lang?: string | null | undefined): void;
1
+ export type LANGS = keyof typeof langs;
2
+ declare const langs: {
3
+ 'en-US': {
4
+ name: string;
5
+ date: {
6
+ dateFromFuture: string;
7
+ dateJustNow: string;
8
+ dateYesterday: string;
9
+ dateMinutesAgo: string;
10
+ date1HourAgo: string;
11
+ dateHoursAgo: string;
12
+ dateDaysAgo: string;
13
+ dateWeeksAgo: string;
14
+ };
15
+ common: {
16
+ cancel: string;
17
+ };
18
+ docx: {
19
+ imageExportFailed: string;
20
+ };
21
+ };
22
+ 'zh-CN': {
23
+ name: string;
24
+ date: {
25
+ dateFromFuture: string;
26
+ dateJustNow: string;
27
+ dateYesterday: string;
28
+ dateMinutesAgo: string;
29
+ date1HourAgo: string;
30
+ dateHoursAgo: string;
31
+ dateDaysAgo: string;
32
+ dateWeeksAgo: string;
33
+ };
34
+ common: {
35
+ cancel: string;
36
+ };
37
+ docx: {
38
+ imageExportFailed: string;
39
+ };
40
+ };
41
+ 'ja-JP': {
42
+ name: string;
43
+ date: {
44
+ dateFromFuture: string;
45
+ dateJustNow: string;
46
+ dateYesterday: string;
47
+ dateMinutesAgo: string;
48
+ date1HourAgo: string;
49
+ dateHoursAgo: string;
50
+ dateDaysAgo: string;
51
+ dateWeeksAgo: string;
52
+ };
53
+ common: {
54
+ cancel: string;
55
+ };
56
+ docx: {
57
+ imageExportFailed: string;
58
+ };
59
+ };
60
+ };
61
+ export declare function setLang(lang?: LANGS | null | undefined): void;
2
62
  export declare function mergeLang(l: any): void;
3
63
  export declare function t(key: string, args?: Record<string, string>): string;
64
+ export declare function getCurrentLang(): "en-US" | "zh-CN" | "ja-JP";
65
+ export {};
@@ -0,0 +1,20 @@
1
+ declare const _default: {
2
+ name: string;
3
+ date: {
4
+ dateFromFuture: string;
5
+ dateJustNow: string;
6
+ dateYesterday: string;
7
+ dateMinutesAgo: string;
8
+ date1HourAgo: string;
9
+ dateHoursAgo: string;
10
+ dateDaysAgo: string;
11
+ dateWeeksAgo: string;
12
+ };
13
+ common: {
14
+ cancel: string;
15
+ };
16
+ docx: {
17
+ imageExportFailed: string;
18
+ };
19
+ };
20
+ export default _default;
@@ -13,5 +13,8 @@ declare const _default: {
13
13
  common: {
14
14
  cancel: string;
15
15
  };
16
+ docx: {
17
+ imageExportFailed: string;
18
+ };
16
19
  };
17
20
  export default _default;
@@ -11,12 +11,16 @@ export declare class LocalDoc extends EventCallbacks<OnesEditorDocCallbacks> imp
11
11
  endBatchUpdate(): number;
12
12
  toJSON(): DocObject;
13
13
  getContainerBlocks(containerId: string): DocBlock[];
14
+ findContainerBlocks(containerId: string): DocBlock[];
14
15
  getBlockData(containerId: string, blockIndex: number): DocBlock;
15
16
  localUpdateBlockText(containerId: string, blockIndex: number, actions: DocBlockTextActions): DocBlockText;
16
17
  localUpdateBlockData(containerId: string, blockIndex: number, delta: DocBlockDelta): DocBlock;
17
18
  localInsertBlock(containerId: string, blockIndex: number, data: DocBlock): DocBlock;
18
19
  localDeleteBlock(containerId: string, blockIndex: number): DocBlock;
19
- localInsertChildContainer(containerId: string, blocks: DocBlock[]): void;
20
+ localInsertChildContainers(containers: {
21
+ containerId: string;
22
+ blocks: DocBlock[];
23
+ }[]): void;
20
24
  localDeleteChildContainers(containerIds: string[]): void;
21
25
  uploadResource(file: File, options?: UploadResourceOptions): Promise<UploadResourceResult>;
22
26
  addResources(resourceIds: string[]): Promise<string[]>;
@@ -0,0 +1,27 @@
1
+ export declare function hashCode(str: string): number;
2
+ /**
3
+ * 用户名缩写
4
+ * @param name 用户名
5
+ * @param maxLength 最大展示长度
6
+ * @returns 缩写
7
+ * 规则:
8
+ * 1. 中日韩字符,从后往前取
9
+ * 2. 英文字符、特殊字符、数字,从前往后取,如果有空格比如 `Mike Tracy` 取 MT
10
+ * 3. emoji,从后往前取
11
+ * 4. 默认处理从前取
12
+ */
13
+ export declare function abbreviation(name: string, maxLength?: number): string;
14
+ declare enum EColor {
15
+ blue = "#338FE5",
16
+ cyan = "#34AFDE",
17
+ teal = "#2CB2AE",
18
+ green = "#24B47E",
19
+ kelly = "#8AAB3F",
20
+ yellow = "#F0A100",
21
+ orange = "#EB6414",
22
+ red = "#E52727",
23
+ fuchsia = "#BE507D",
24
+ purple = "#9678D3"
25
+ }
26
+ export declare function getColorFromContent(content: string): EColor;
27
+ export {};
@@ -11,6 +11,7 @@ declare const clientType: {
11
11
  isWindows: boolean;
12
12
  isIe: boolean;
13
13
  isSafari: boolean;
14
+ isFirefox: boolean;
14
15
  isMobileSafari: boolean;
15
16
  };
16
17
  export { clientType };
@@ -1,3 +1,5 @@
1
- export declare function getScrollContainer(element: HTMLElement): HTMLElement;
1
+ export declare function getScrollContainer(element: HTMLElement, options?: {
2
+ horizontal?: boolean;
3
+ }): HTMLElement;
2
4
  export declare function disablePageScroll(id: string): void;
3
5
  export declare function enablePageScroll(id: string): void;
@@ -26,4 +26,7 @@ export declare function getElementOffset(el: Element): {
26
26
  left: number;
27
27
  };
28
28
  export declare function findTarget(event: Event, cssSelector: string): Element | null;
29
+ export declare function findEventTargetBlock(event: Event): Element | null;
30
+ export declare function isElementVisible(element: Element | null): boolean;
31
+ export declare function getElementScale(element: Element): number;
29
32
  export {};
@@ -29,6 +29,8 @@ export * from './auto-scroll';
29
29
  export * from './date';
30
30
  export * from './number';
31
31
  export * from './string';
32
+ export * from './overflow-text';
33
+ export * from './abbreviation';
32
34
  export { genId };
33
35
  export { assert };
34
36
  export { SimpleCache };
@@ -1,7 +1,16 @@
1
+ export declare enum LogLevel {
2
+ DEBUG = "DEBUG",
3
+ INFO = "INFO ",
4
+ WARN = "WARN ",
5
+ ERROR = "ERROR"
6
+ }
1
7
  export declare class Logger {
2
8
  private category;
3
9
  private times;
10
+ static debugMode: boolean;
11
+ static level: LogLevel;
4
12
  constructor(category: string);
13
+ shouldLog(level: LogLevel): boolean;
5
14
  private _log;
6
15
  log(msg: string | object, context?: string): void;
7
16
  debug(msg: string | object, context?: string): void;
@@ -0,0 +1 @@
1
+ export declare function overflowText(text: string, fontSize: number, maxwidth: number): string | null;
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "@ones-editor/details-block",
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,7 @@
1
+ import { OnesEditor, OnesEditorCustom } from '../../../@ones-editor/core';
2
+ export default class AutoExpandDetails implements OnesEditorCustom {
3
+ private editor;
4
+ constructor(editor: OnesEditor);
5
+ destroy(): void;
6
+ handleSelectionChanged: () => void;
7
+ }
@@ -0,0 +1,8 @@
1
+ import { OnesEditor } from '../../../@ones-editor/core';
2
+ import { DocDetailsBlock } from './types';
3
+ export declare function createEmptyDetailsData(editor: OnesEditor, options?: {
4
+ title?: string;
5
+ }): {
6
+ blockData: DocDetailsBlock;
7
+ focusBlockId: string;
8
+ };
@@ -0,0 +1,3 @@
1
+ import { BlockContentElement, BlockElement, BlockPath, ContainerElement, OnesEditor } from '../../../@ones-editor/core';
2
+ import { DocDetailsBlock } from './types';
3
+ export declare function createDetails(editor: OnesEditor, path: BlockPath, container: ContainerElement, blockElement: BlockElement, blockData: DocDetailsBlock): BlockContentElement;
@@ -0,0 +1,11 @@
1
+ import { BlockElement, OnesEditor, OnesEditorCustom } from '../../../@ones-editor/core';
2
+ export default class DetailsObject implements OnesEditorCustom {
3
+ private editor;
4
+ private blockId;
5
+ private _expanded;
6
+ constructor(editor: OnesEditor, blockId: string);
7
+ destroy(): void;
8
+ get expanded(): boolean;
9
+ set expanded(value: boolean);
10
+ static get(editor: OnesEditor, block: BlockElement | string): DetailsObject;
11
+ }
@@ -0,0 +1,2 @@
1
+ import { BlockOptions, OnesEditor } from '../../../@ones-editor/core';
2
+ export declare function getDetailsOptions(editor: OnesEditor): BlockOptions;
@@ -0,0 +1,4 @@
1
+ import { ComplexKindBlock } from '../../../@ones-editor/core';
2
+ import './details-styles.scss';
3
+ declare const DetailsBlock: ComplexKindBlock;
4
+ export default DetailsBlock;
@@ -0,0 +1,5 @@
1
+ import { DocBlock } from '../../../@ones-editor/core';
2
+ export interface DocDetailsBlock extends DocBlock {
3
+ title: string;
4
+ children: [string];
5
+ }
@@ -0,0 +1,3 @@
1
+ import { BlockElement, ContainerElement, OnesEditor } from '../../../@ones-editor/core';
2
+ export declare function getDetailsContainer(block: BlockElement): ContainerElement;
3
+ export declare function updateExpanded(editor: OnesEditor, block: BlockElement, expanded: boolean): void;
@@ -1,6 +1,7 @@
1
1
  declare const _default: {
2
2
  dividingLine: {
3
3
  type: string;
4
+ abstract: string;
4
5
  };
5
6
  };
6
7
  export default _default;
@@ -0,0 +1,7 @@
1
+ declare const _default: {
2
+ dividingLine: {
3
+ type: string;
4
+ abstract: string;
5
+ };
6
+ };
7
+ export default _default;
@@ -1,6 +1,7 @@
1
1
  declare const _default: {
2
2
  dividingLine: {
3
3
  type: string;
4
+ abstract: string;
4
5
  };
5
6
  };
6
7
  export default _default;