@ones-editor/editor 0.0.3-beta.9 → 0.0.3-beta.91

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