@cool-office/docs-ui 0.0.0-stage → 1.2.0

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 (343) hide show
  1. package/LICENSE +176 -0
  2. package/README.md +112 -2
  3. package/lib/cjs/facade.js +81 -0
  4. package/lib/cjs/index.js +33220 -0
  5. package/lib/cjs/locale/ar-SA.js +258 -0
  6. package/lib/cjs/locale/ca-ES.js +258 -0
  7. package/lib/cjs/locale/de-DE.js +258 -0
  8. package/lib/cjs/locale/en-US.js +273 -0
  9. package/lib/cjs/locale/es-ES.js +258 -0
  10. package/lib/cjs/locale/fa-IR.js +258 -0
  11. package/lib/cjs/locale/fr-FR.js +258 -0
  12. package/lib/cjs/locale/id-ID.js +258 -0
  13. package/lib/cjs/locale/it-IT.js +258 -0
  14. package/lib/cjs/locale/ja-JP.js +258 -0
  15. package/lib/cjs/locale/ko-KR.js +258 -0
  16. package/lib/cjs/locale/pl-PL.js +258 -0
  17. package/lib/cjs/locale/pt-BR.js +258 -0
  18. package/lib/cjs/locale/ru-RU.js +258 -0
  19. package/lib/cjs/locale/sk-SK.js +258 -0
  20. package/lib/cjs/locale/vi-VN.js +258 -0
  21. package/lib/cjs/locale/zh-CN.js +258 -0
  22. package/lib/cjs/locale/zh-HK.js +258 -0
  23. package/lib/cjs/locale/zh-TW.js +258 -0
  24. package/lib/es/facade.js +82 -0
  25. package/lib/es/index.js +32881 -0
  26. package/lib/es/locale/ar-SA.js +258 -0
  27. package/lib/es/locale/ca-ES.js +258 -0
  28. package/lib/es/locale/de-DE.js +258 -0
  29. package/lib/es/locale/en-US.js +273 -0
  30. package/lib/es/locale/es-ES.js +258 -0
  31. package/lib/es/locale/fa-IR.js +258 -0
  32. package/lib/es/locale/fr-FR.js +258 -0
  33. package/lib/es/locale/id-ID.js +258 -0
  34. package/lib/es/locale/it-IT.js +258 -0
  35. package/lib/es/locale/ja-JP.js +258 -0
  36. package/lib/es/locale/ko-KR.js +258 -0
  37. package/lib/es/locale/pl-PL.js +258 -0
  38. package/lib/es/locale/pt-BR.js +258 -0
  39. package/lib/es/locale/ru-RU.js +258 -0
  40. package/lib/es/locale/sk-SK.js +258 -0
  41. package/lib/es/locale/vi-VN.js +258 -0
  42. package/lib/es/locale/zh-CN.js +258 -0
  43. package/lib/es/locale/zh-HK.js +258 -0
  44. package/lib/es/locale/zh-TW.js +258 -0
  45. package/lib/facade.js +82 -0
  46. package/lib/index.css +1252 -0
  47. package/lib/index.js +32881 -0
  48. package/lib/locale/ar-SA.js +258 -0
  49. package/lib/locale/ca-ES.js +258 -0
  50. package/lib/locale/de-DE.js +258 -0
  51. package/lib/locale/en-US.js +273 -0
  52. package/lib/locale/es-ES.js +258 -0
  53. package/lib/locale/fa-IR.js +258 -0
  54. package/lib/locale/fr-FR.js +258 -0
  55. package/lib/locale/id-ID.js +258 -0
  56. package/lib/locale/it-IT.js +258 -0
  57. package/lib/locale/ja-JP.js +258 -0
  58. package/lib/locale/ko-KR.js +258 -0
  59. package/lib/locale/pl-PL.js +258 -0
  60. package/lib/locale/pt-BR.js +258 -0
  61. package/lib/locale/ru-RU.js +258 -0
  62. package/lib/locale/sk-SK.js +258 -0
  63. package/lib/locale/vi-VN.js +258 -0
  64. package/lib/locale/zh-CN.js +258 -0
  65. package/lib/locale/zh-HK.js +258 -0
  66. package/lib/locale/zh-TW.js +258 -0
  67. package/lib/types/basics/component-tools.d.ts +30 -0
  68. package/lib/types/basics/custom-decoration-factory.d.ts +40 -0
  69. package/lib/types/basics/doc-custom-range-chrome.d.ts +31 -0
  70. package/lib/types/basics/docs-view-key.d.ts +30 -0
  71. package/lib/types/basics/editor.d.ts +16 -0
  72. package/lib/types/basics/paragraph.d.ts +24 -0
  73. package/lib/types/basics/selection.d.ts +17 -0
  74. package/lib/types/basics/table.d.ts +31 -0
  75. package/lib/types/commands/commands/auto-format.command.d.ts +22 -0
  76. package/lib/types/commands/commands/break-line.command.d.ts +29 -0
  77. package/lib/types/commands/commands/clipboard.command.d.ts +39 -0
  78. package/lib/types/commands/commands/clipboard.inner.command.d.ts +43 -0
  79. package/lib/types/commands/commands/doc-block-move.command.d.ts +52 -0
  80. package/lib/types/commands/commands/doc-delete.command.d.ts +44 -0
  81. package/lib/types/commands/commands/doc-header-footer.command.d.ts +40 -0
  82. package/lib/types/commands/commands/doc-horizontal-line.command.d.ts +24 -0
  83. package/lib/types/commands/commands/doc-page-setup.command.d.ts +27 -0
  84. package/lib/types/commands/commands/doc-paragraph-setting.command.d.ts +20 -0
  85. package/lib/types/commands/commands/doc-select-all.command.d.ts +23 -0
  86. package/lib/types/commands/commands/format-painter.command.d.ts +33 -0
  87. package/lib/types/commands/commands/ime-input.command.d.ts +25 -0
  88. package/lib/types/commands/commands/inline-format.command.d.ts +36 -0
  89. package/lib/types/commands/commands/insert-below/insert-bullet-below.command.d.ts +21 -0
  90. package/lib/types/commands/commands/insert-custom-range.command.d.ts +26 -0
  91. package/lib/types/commands/commands/insert-header-footer-field.command.d.ts +28 -0
  92. package/lib/types/commands/commands/insert-special-character.command.d.ts +19 -0
  93. package/lib/types/commands/commands/list.command.d.ts +64 -0
  94. package/lib/types/commands/commands/paragraph-align.command.d.ts +34 -0
  95. package/lib/types/commands/commands/refresh-header-footer-fields.command.d.ts +22 -0
  96. package/lib/types/commands/commands/replace-content.command.d.ts +55 -0
  97. package/lib/types/commands/commands/set-doc-zoom-ratio.command.d.ts +21 -0
  98. package/lib/types/commands/commands/set-heading.command.d.ts +38 -0
  99. package/lib/types/commands/commands/switch-doc-mode.command.d.ts +19 -0
  100. package/lib/types/commands/commands/table/doc-table-create.command.d.ts +56 -0
  101. package/lib/types/commands/commands/table/doc-table-delete.command.d.ts +28 -0
  102. package/lib/types/commands/commands/table/doc-table-insert.command.d.ts +49 -0
  103. package/lib/types/commands/commands/table/doc-table-tab.command.d.ts +20 -0
  104. package/lib/types/commands/commands/table/table.d.ts +108 -0
  105. package/lib/types/commands/commands/util.d.ts +17 -0
  106. package/lib/types/commands/operations/doc-create-table.operation.d.ts +17 -0
  107. package/lib/types/commands/operations/doc-cursor.operation.d.ts +29 -0
  108. package/lib/types/commands/operations/doc-header-footer-panel.operation.d.ts +20 -0
  109. package/lib/types/commands/operations/doc-header-footer-ribbon.operation.d.ts +19 -0
  110. package/lib/types/commands/operations/doc-paragraph-setting-panel.operation.d.ts +17 -0
  111. package/lib/types/commands/operations/doc-section-setting-panel.operation.d.ts +17 -0
  112. package/lib/types/commands/operations/insert-break.operation.d.ts +21 -0
  113. package/lib/types/commands/operations/open-page-setting.operation.d.ts +17 -0
  114. package/lib/types/commands/operations/paragraph-permission.operation.d.ts +17 -0
  115. package/lib/types/commands/operations/permission-panel.operation.d.ts +17 -0
  116. package/lib/types/commands/operations/set-doc-zoom-ratio.operation.d.ts +22 -0
  117. package/lib/types/commands/util.d.ts +23 -0
  118. package/lib/types/components/doc-page-render-component.d.ts +21 -0
  119. package/lib/types/config/config.d.ts +50 -0
  120. package/lib/types/consts/mobile-context.d.ts +17 -0
  121. package/lib/types/controllers/components.controller.d.ts +25 -0
  122. package/lib/types/controllers/doc-auto-format.controller.d.ts +27 -0
  123. package/lib/types/controllers/doc-header-footer-ribbon.controller.d.ts +31 -0
  124. package/lib/types/controllers/doc-header-footer.controller.d.ts +46 -0
  125. package/lib/types/controllers/doc-move-cursor.controller.d.ts +71 -0
  126. package/lib/types/controllers/doc-paragraph-setting.controller.d.ts +25 -0
  127. package/lib/types/controllers/doc-section-setting.controller.d.ts +27 -0
  128. package/lib/types/controllers/doc-table.controller.d.ts +23 -0
  129. package/lib/types/controllers/format-painter.controller.d.ts +23 -0
  130. package/lib/types/controllers/mobile/components.controller.d.ts +25 -0
  131. package/lib/types/controllers/mobile/ui.controller.d.ts +29 -0
  132. package/lib/types/controllers/render-controllers/back-scroll.render-controller.d.ts +50 -0
  133. package/lib/types/controllers/render-controllers/doc-canvas-popup-layout-interaction.controller.d.ts +30 -0
  134. package/lib/types/controllers/render-controllers/doc-checklist.render-controller.d.ts +31 -0
  135. package/lib/types/controllers/render-controllers/doc-clipboard.controller.d.ts +32 -0
  136. package/lib/types/controllers/render-controllers/doc-contextmenu.render-controller.d.ts +38 -0
  137. package/lib/types/controllers/render-controllers/doc-editor-bridge.controller.d.ts +41 -0
  138. package/lib/types/controllers/render-controllers/doc-field.render-controller.d.ts +31 -0
  139. package/lib/types/controllers/render-controllers/doc-ime-input.controller.d.ts +44 -0
  140. package/lib/types/controllers/render-controllers/doc-input.controller.d.ts +36 -0
  141. package/lib/types/controllers/render-controllers/doc-layout-progress.render-controller.d.ts +42 -0
  142. package/lib/types/controllers/render-controllers/doc-layout-recovery.render-controller.d.ts +38 -0
  143. package/lib/types/controllers/render-controllers/doc-mutation-layout.d.ts +35 -0
  144. package/lib/types/controllers/render-controllers/doc-paragraph-placeholder.render-controller.d.ts +61 -0
  145. package/lib/types/controllers/render-controllers/doc-paste-options.render-controller.d.ts +27 -0
  146. package/lib/types/controllers/render-controllers/doc-resize.render-controller.d.ts +30 -0
  147. package/lib/types/controllers/render-controllers/doc-selection-render.controller.d.ts +50 -0
  148. package/lib/types/controllers/render-controllers/doc-selection-render.util.d.ts +21 -0
  149. package/lib/types/controllers/render-controllers/doc.render-controller.d.ts +133 -0
  150. package/lib/types/controllers/render-controllers/format-painter.render-controller.d.ts +23 -0
  151. package/lib/types/controllers/render-controllers/mobile/back-scroll.render-controller.d.ts +30 -0
  152. package/lib/types/controllers/render-controllers/mobile/doc-pinch-zoom.d.ts +51 -0
  153. package/lib/types/controllers/render-controllers/mobile/doc-selection-render.controller.d.ts +73 -0
  154. package/lib/types/controllers/render-controllers/mobile/doc.render-controller.d.ts +36 -0
  155. package/lib/types/controllers/render-controllers/mobile/zoom.render-controller.d.ts +30 -0
  156. package/lib/types/controllers/render-controllers/zoom.render-controller.d.ts +49 -0
  157. package/lib/types/controllers/ui.controller.d.ts +38 -0
  158. package/lib/types/embed-docs-custom-block-bleed.d.ts +32 -0
  159. package/lib/types/embed-docs-custom-block-refresh.d.ts +28 -0
  160. package/lib/types/embed-docs-custom-block-scroll.d.ts +19 -0
  161. package/lib/types/embed-host-anchor.d.ts +48 -0
  162. package/lib/types/facade/f-document.d.ts +39 -0
  163. package/lib/types/facade/index.d.ts +17 -0
  164. package/lib/types/index.d.ts +142 -0
  165. package/lib/types/locale/ar-SA.d.ts +18 -0
  166. package/lib/types/locale/ca-ES.d.ts +18 -0
  167. package/lib/types/locale/de-DE.d.ts +18 -0
  168. package/lib/types/locale/en-US.d.ts +280 -0
  169. package/lib/types/locale/es-ES.d.ts +18 -0
  170. package/lib/types/locale/fa-IR.d.ts +18 -0
  171. package/lib/types/locale/fr-FR.d.ts +18 -0
  172. package/lib/types/locale/id-ID.d.ts +18 -0
  173. package/lib/types/locale/it-IT.d.ts +18 -0
  174. package/lib/types/locale/ja-JP.d.ts +18 -0
  175. package/lib/types/locale/ko-KR.d.ts +18 -0
  176. package/lib/types/locale/pl-PL.d.ts +18 -0
  177. package/lib/types/locale/pt-BR.d.ts +18 -0
  178. package/lib/types/locale/ru-RU.d.ts +18 -0
  179. package/lib/types/locale/sk-SK.d.ts +18 -0
  180. package/lib/types/locale/types.d.ts +18 -0
  181. package/lib/types/locale/vi-VN.d.ts +18 -0
  182. package/lib/types/locale/zh-CN.d.ts +18 -0
  183. package/lib/types/locale/zh-HK.d.ts +18 -0
  184. package/lib/types/locale/zh-TW.d.ts +18 -0
  185. package/lib/types/menu/context-menu.d.ts +39 -0
  186. package/lib/types/menu/display.menu.d.ts +21 -0
  187. package/lib/types/menu/header-footer-ribbon.d.ts +17 -0
  188. package/lib/types/menu/menu.d.ts +77 -0
  189. package/lib/types/menu/mobile-schema.d.ts +17 -0
  190. package/lib/types/menu/paragraph-menu.d.ts +90 -0
  191. package/lib/types/menu/permission.menu.d.ts +19 -0
  192. package/lib/types/menu/schema.d.ts +18 -0
  193. package/lib/types/mobile-plugin.d.ts +36 -0
  194. package/lib/types/plugin.d.ts +37 -0
  195. package/lib/types/services/clipboard/clipboard.service.d.ts +136 -0
  196. package/lib/types/services/clipboard/copy-content-cache.d.ts +24 -0
  197. package/lib/types/services/clipboard/doc-paste-mutation-adapter.service.d.ts +57 -0
  198. package/lib/types/services/clipboard/html-to-udm/converter.d.ts +51 -0
  199. package/lib/types/services/clipboard/html-to-udm/parse-node-style.d.ts +17 -0
  200. package/lib/types/services/clipboard/html-to-udm/parse-to-dom.d.ts +16 -0
  201. package/lib/types/services/clipboard/html-to-udm/paste-plugins/plugin-lark.d.ts +18 -0
  202. package/lib/types/services/clipboard/html-to-udm/paste-plugins/plugin-univer.d.ts +18 -0
  203. package/lib/types/services/clipboard/html-to-udm/paste-plugins/plugin-word.d.ts +18 -0
  204. package/lib/types/services/clipboard/html-to-udm/paste-plugins/type.d.ts +31 -0
  205. package/lib/types/services/clipboard/html-to-udm/utils.d.ts +17 -0
  206. package/lib/types/services/clipboard/internal-fragment.d.ts +34 -0
  207. package/lib/types/services/clipboard/paste-options.d.ts +33 -0
  208. package/lib/types/services/clipboard/rtf-to-plain-text.d.ts +16 -0
  209. package/lib/types/services/clipboard/udm-to-html/convertor.d.ts +25 -0
  210. package/lib/types/services/clipboard/udm-to-html/doc-html-export.service.d.ts +23 -0
  211. package/lib/types/services/doc-auto-format.service.d.ts +54 -0
  212. package/lib/types/services/doc-contextual-ribbon.service.d.ts +29 -0
  213. package/lib/types/services/doc-embed-integration.service.d.ts +65 -0
  214. package/lib/types/services/doc-event-manager.service.d.ts +204 -0
  215. package/lib/types/services/doc-heading-collapse.service.d.ts +38 -0
  216. package/lib/types/services/doc-ime-input-manager.service.d.ts +63 -0
  217. package/lib/types/services/doc-ime-state-change-interceptor.service.d.ts +23 -0
  218. package/lib/types/services/doc-layout-coordinator.service.d.ts +79 -0
  219. package/lib/types/services/doc-layout-interaction.service.d.ts +29 -0
  220. package/lib/types/services/doc-layout-progress.service.d.ts +30 -0
  221. package/lib/types/services/doc-menu-style.service.d.ts +37 -0
  222. package/lib/types/services/doc-mobile-element-menu.service.d.ts +44 -0
  223. package/lib/types/services/doc-page-layout.service.d.ts +28 -0
  224. package/lib/types/services/doc-paragraph-menu.service.d.ts +129 -0
  225. package/lib/types/services/doc-popup-manager.service.d.ts +79 -0
  226. package/lib/types/services/doc-print-interceptor.service.d.ts +55 -0
  227. package/lib/types/services/doc-render-background.d.ts +29 -0
  228. package/lib/types/services/doc-view-scale.d.ts +54 -0
  229. package/lib/types/services/doc-zoom.d.ts +23 -0
  230. package/lib/types/services/docs-render.service.d.ts +30 -0
  231. package/lib/types/services/editor/editor-manager.service.d.ts +88 -0
  232. package/lib/types/services/editor/editor-runtime-config.d.ts +26 -0
  233. package/lib/types/services/editor/editor.d.ts +139 -0
  234. package/lib/types/services/float-menu.service.d.ts +62 -0
  235. package/lib/types/services/index.d.ts +22 -0
  236. package/lib/types/services/mobile/doc-selection-render.service.d.ts +60 -0
  237. package/lib/types/services/mobile/doc-view-scale.d.ts +19 -0
  238. package/lib/types/services/mobile/float-menu.service.d.ts +20 -0
  239. package/lib/types/services/mobile/mobile-text-selection-visuals.d.ts +32 -0
  240. package/lib/types/services/selection/convert-rect-range.d.ts +42 -0
  241. package/lib/types/services/selection/convert-text-range.d.ts +86 -0
  242. package/lib/types/services/selection/doc-selection-render.service.d.ts +203 -0
  243. package/lib/types/services/selection/range-interface.d.ts +34 -0
  244. package/lib/types/services/selection/rect-range.d.ts +63 -0
  245. package/lib/types/services/selection/selection-utils.d.ts +41 -0
  246. package/lib/types/services/selection/text-range.d.ts +88 -0
  247. package/lib/types/services/selection/word-boundary.d.ts +23 -0
  248. package/lib/types/shortcuts/core-editing.shortcut.d.ts +25 -0
  249. package/lib/types/shortcuts/cursor.shortcut.d.ts +41 -0
  250. package/lib/types/shortcuts/format.shortcut.d.ts +19 -0
  251. package/lib/types/shortcuts/heading.shortcut.d.ts +22 -0
  252. package/lib/types/shortcuts/toolbar.shortcut.d.ts +28 -0
  253. package/lib/types/shortcuts/utils.d.ts +19 -0
  254. package/lib/types/types/const/padding.d.ts +16 -0
  255. package/lib/types/utils/date-time-field.d.ts +22 -0
  256. package/lib/types/utils/horizontal-line.d.ts +17 -0
  257. package/lib/types/utils/section-header-footer.d.ts +34 -0
  258. package/lib/types/views/DocLayoutProgress.d.ts +16 -0
  259. package/lib/types/views/DocLayoutRecovery.d.ts +17 -0
  260. package/lib/types/views/DocPasteOptions.d.ts +17 -0
  261. package/lib/types/views/DocSideMenu.d.ts +16 -0
  262. package/lib/types/views/Icon.d.ts +46 -0
  263. package/lib/types/views/PageSettings.d.ts +43 -0
  264. package/lib/types/views/ParagraphMenu.d.ts +79 -0
  265. package/lib/types/views/RichTextEditor.d.ts +62 -0
  266. package/lib/types/views/SideMenu.d.ts +43 -0
  267. package/lib/types/views/const.d.ts +16 -0
  268. package/lib/types/views/count-bar/CountBar.d.ts +21 -0
  269. package/lib/types/views/count-bar/ZoomSlider.d.ts +16 -0
  270. package/lib/types/views/count-bar/index.d.ts +16 -0
  271. package/lib/types/views/doc-footer/DocFooter.d.ts +16 -0
  272. package/lib/types/views/doc-footer/index.d.ts +16 -0
  273. package/lib/types/views/doc-side-menu-layout.d.ts +17 -0
  274. package/lib/types/views/doc-statistics/DocPageStatus.d.ts +30 -0
  275. package/lib/types/views/doc-statistics/DocStatistics.d.ts +16 -0
  276. package/lib/types/views/doc-statistics/use-doc-statistics.d.ts +30 -0
  277. package/lib/types/views/editor/utils.d.ts +22 -0
  278. package/lib/types/views/float-toolbar/FloatToolbar.d.ts +40 -0
  279. package/lib/types/views/float-toolbar/FloatToolbar.stories.d.ts +22 -0
  280. package/lib/types/views/header-footer/content-cover.d.ts +30 -0
  281. package/lib/types/views/header-footer/panel/DocHeaderFooterFields.d.ts +19 -0
  282. package/lib/types/views/header-footer/panel/DocHeaderFooterOptions.d.ts +23 -0
  283. package/lib/types/views/header-footer/panel/DocHeaderFooterPanel.d.ts +17 -0
  284. package/lib/types/views/header-footer/panel/DocHeaderFooterRibbonControl.d.ts +20 -0
  285. package/lib/types/views/header-footer/panel/component-name.d.ts +18 -0
  286. package/lib/types/views/header-footer/panel/use-header-footer-options.d.ts +25 -0
  287. package/lib/types/views/header-footer/text-bubble.d.ts +35 -0
  288. package/lib/types/views/heading-collapse-shape.d.ts +38 -0
  289. package/lib/types/views/list-type-picker/Picker.d.ts +27 -0
  290. package/lib/types/views/list-type-picker/index.d.ts +18 -0
  291. package/lib/types/views/mobile/MobileDocCanvasViewport.d.ts +20 -0
  292. package/lib/types/views/mobile/MobileDocPasteOptions.d.ts +21 -0
  293. package/lib/types/views/mobile/MobileDocSettings.d.ts +20 -0
  294. package/lib/types/views/mobile-doc-toolbar/MobileDocToolbar.d.ts +30 -0
  295. package/lib/types/views/mobile-element-menu/MobileDocElementMenu.d.ts +25 -0
  296. package/lib/types/views/mobile-rich-text-editor/MobileRichTextEditor.d.ts +33 -0
  297. package/lib/types/views/mobile-rich-text-toolbar/MobileRichTextToolbar.d.ts +20 -0
  298. package/lib/types/views/paragraph-menu/component-keys.d.ts +17 -0
  299. package/lib/types/views/paragraph-menu/paragraph-menu-position.d.ts +21 -0
  300. package/lib/types/views/paragraph-menu/theme-color.d.ts +17 -0
  301. package/lib/types/views/paragraph-setting/Setting.d.ts +45 -0
  302. package/lib/types/views/paragraph-setting/hook/utils.d.ts +48 -0
  303. package/lib/types/views/paragraph-setting/index.d.ts +17 -0
  304. package/lib/types/views/paragraph-setting/line-spacing.d.ts +39 -0
  305. package/lib/types/views/permission/DocObjectPermissionEntry.d.ts +24 -0
  306. package/lib/types/views/rich-text-editor/hooks/editor-undo-redo-keyboard.d.ts +36 -0
  307. package/lib/types/views/rich-text-editor/hooks/index.d.ts +23 -0
  308. package/lib/types/views/rich-text-editor/hooks/use-editor-click-outside.d.ts +17 -0
  309. package/lib/types/views/rich-text-editor/hooks/use-editor.d.ts +36 -0
  310. package/lib/types/views/rich-text-editor/hooks/use-is-focusing.d.ts +16 -0
  311. package/lib/types/views/rich-text-editor/hooks/use-keyboard-event.d.ts +26 -0
  312. package/lib/types/views/rich-text-editor/hooks/use-left-and-right-arrow.d.ts +18 -0
  313. package/lib/types/views/rich-text-editor/hooks/use-on-change.d.ts +18 -0
  314. package/lib/types/views/rich-text-editor/hooks/use-resize.d.ts +23 -0
  315. package/lib/types/views/section-setting/Setting.d.ts +27 -0
  316. package/lib/types/views/section-setting/component-name.d.ts +16 -0
  317. package/lib/types/views/section-setting/index.d.ts +17 -0
  318. package/lib/types/views/section-setting/use-section-setting.d.ts +75 -0
  319. package/lib/types/views/side-menu/SideMenu.stories.d.ts +31 -0
  320. package/lib/types/views/table/create/TableCreate.d.ts +24 -0
  321. package/lib/types/views/table/create/component-name.d.ts +16 -0
  322. package/lib/umd/facade.js +1 -0
  323. package/lib/umd/index.js +54 -0
  324. package/lib/umd/locale/ar-SA.js +1 -0
  325. package/lib/umd/locale/ca-ES.js +1 -0
  326. package/lib/umd/locale/de-DE.js +1 -0
  327. package/lib/umd/locale/en-US.js +1 -0
  328. package/lib/umd/locale/es-ES.js +1 -0
  329. package/lib/umd/locale/fa-IR.js +1 -0
  330. package/lib/umd/locale/fr-FR.js +1 -0
  331. package/lib/umd/locale/id-ID.js +1 -0
  332. package/lib/umd/locale/it-IT.js +1 -0
  333. package/lib/umd/locale/ja-JP.js +1 -0
  334. package/lib/umd/locale/ko-KR.js +1 -0
  335. package/lib/umd/locale/pl-PL.js +1 -0
  336. package/lib/umd/locale/pt-BR.js +1 -0
  337. package/lib/umd/locale/ru-RU.js +1 -0
  338. package/lib/umd/locale/sk-SK.js +1 -0
  339. package/lib/umd/locale/vi-VN.js +1 -0
  340. package/lib/umd/locale/zh-CN.js +1 -0
  341. package/lib/umd/locale/zh-HK.js +1 -0
  342. package/lib/umd/locale/zh-TW.js +1 -0
  343. package/package.json +99 -3
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { DocumentDataModel, IAccessor, ITextRangeParam, Nullable } from '@cool-office/core';
17
+ import type { IMenuButtonItem, IMenuItem, IMenuSelectorItem } from '@cool-office/ui';
18
+ import type { LocaleKey } from '../locale/types';
19
+ import { HorizontalAlign, NamedStyleType, PresetListType } from '@cool-office/core';
20
+ import { UnitAction } from '@cool-office/protocol';
21
+ import { Observable } from 'rxjs';
22
+ export declare function shouldSuppressDocMenuStateRefresh(accessor: IAccessor): boolean;
23
+ export declare function disableMenuWhenHeaderFooterEditing(accessor: IAccessor): Observable<boolean>;
24
+ export declare function disableMenuWhenNoDocRange(accessor: IAccessor): Observable<boolean>;
25
+ export declare function disableMenuWithoutDocumentUnitPermission(accessor: IAccessor, action: UnitAction): Observable<boolean>;
26
+ export declare const DOC_INSERT_EMOJI_MENU_ID = "doc.menu.insert-emoji";
27
+ export declare const DOC_INSERT_SYMBOL_MENU_ID = "doc.menu.insert-symbol";
28
+ export declare function EmojiPickerMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<string, string, string>;
29
+ export declare function SymbolPickerMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<string, string, string>;
30
+ export declare function isTextRangeInAnyBlockRange(document: Nullable<DocumentDataModel>, range: ITextRangeParam): boolean;
31
+ export declare function hideMenuWhenSelectionInBlockRange(accessor: IAccessor): Observable<boolean>;
32
+ export declare function BoldMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
33
+ export declare function ItalicMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
34
+ export declare function UnderlineMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
35
+ export declare function StrikeThroughMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
36
+ export declare function SubscriptMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
37
+ export declare function SuperscriptMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
38
+ export declare function FontFamilySelectorMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<LocaleKey, string, string>;
39
+ export declare function FontSizeSelectorMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<LocaleKey, number>;
40
+ export declare function HeadingSelectorMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<LocaleKey, NamedStyleType>;
41
+ export declare const FLOAT_TEXT_STYLE_MENU_ID = "doc.menu.float-text-style";
42
+ export declare const FLOAT_TOOLBAR_MENU_POSITION = "doc.menu.float-toolbar";
43
+ export declare function FloatTextStyleMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<LocaleKey, string | number>;
44
+ export declare function TextColorSelectorMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<LocaleKey, string, string | undefined>;
45
+ export declare function HeaderFooterMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
46
+ export declare const DOC_BREAKS_MENU_ID = "doc.menu.breaks";
47
+ export declare const DOC_SECTION_BREAK_NEXT_PAGE_MENU_ID = "doc.menu.section-break.next-page";
48
+ export declare const DOC_SECTION_BREAK_CONTINUOUS_MENU_ID = "doc.menu.section-break.continuous";
49
+ export declare const DOC_SECTION_BREAK_NEXT_COLUMN_MENU_ID = "doc.menu.section-break.next-column";
50
+ export declare const DOC_SECTION_BREAK_EVEN_PAGE_MENU_ID = "doc.menu.section-break.even-page";
51
+ export declare const DOC_SECTION_BREAK_ODD_PAGE_MENU_ID = "doc.menu.section-break.odd-page";
52
+ export declare function BreaksMenuFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
53
+ export declare function InsertColumnBreakMenuFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
54
+ export declare function InsertNextPageSectionBreakMenuFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
55
+ export declare function InsertContinuousSectionBreakMenuFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
56
+ export declare function InsertNextColumnSectionBreakMenuFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
57
+ export declare function InsertEvenPageSectionBreakMenuFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
58
+ export declare function InsertOddPageSectionBreakMenuFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
59
+ export declare const TableIcon = "GridIcon";
60
+ export declare const TABLE_MENU_ID = "doc.menu.table";
61
+ export declare function TableMenuFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
62
+ export declare function InsertTableMenuFactory(_accessor: IAccessor): IMenuButtonItem<LocaleKey>;
63
+ export declare function InsertDefaultTableMenuFactory(_accessor: IAccessor): IMenuButtonItem<LocaleKey>;
64
+ export declare function AlignLeftMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
65
+ export declare function AlignCenterMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
66
+ export declare function AlignRightMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
67
+ export declare function AlignJustifyMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
68
+ export declare function AlignMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<LocaleKey, HorizontalAlign, HorizontalAlign>;
69
+ export declare function HorizontalLineFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
70
+ export declare function OrderListMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<LocaleKey, PresetListType | undefined, PresetListType | undefined>;
71
+ export declare function BulletListMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<LocaleKey, PresetListType | undefined, PresetListType | undefined>;
72
+ export declare function CheckListMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
73
+ export declare function ResetTextColorMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
74
+ export declare function ResetBackgroundColorMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
75
+ export declare function BackgroundColorSelectorMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<LocaleKey, string, string | undefined>;
76
+ export declare function getParagraphStyleAtCursor(accessor: IAccessor): import("@cool-office/core").IParagraph | null | undefined;
77
+ export declare function PageSettingMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { MenuSchemaType } from '@cool-office/ui';
17
+ export declare const mobileMenuSchema: MenuSchemaType;
@@ -0,0 +1,90 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { IAccessor } from '@cool-office/core';
17
+ import type { IMenuButtonItem, IMenuItem, IMenuSelectorItem } from '@cool-office/ui';
18
+ import type { LocaleKey } from '../locale/types';
19
+ export declare const TEXT_COLORS: string[];
20
+ export declare const TEXT_COLOR_SWATCH_ICONS: readonly ["DocParagraphTextColorSwatchIcon.0", "DocParagraphTextColorSwatchIcon.1", "DocParagraphTextColorSwatchIcon.2", "DocParagraphTextColorSwatchIcon.3", "DocParagraphTextColorSwatchIcon.4", "DocParagraphTextColorSwatchIcon.5", "DocParagraphTextColorSwatchIcon.6"];
21
+ export declare const BACKGROUND_COLOR_SWATCH_ICONS: readonly ["DocParagraphBackgroundColorSwatchIcon.0", "DocParagraphBackgroundColorSwatchIcon.1", "DocParagraphBackgroundColorSwatchIcon.2", "DocParagraphBackgroundColorSwatchIcon.3", "DocParagraphBackgroundColorSwatchIcon.4", "DocParagraphBackgroundColorSwatchIcon.5", "DocParagraphBackgroundColorSwatchIcon.6", "DocParagraphBackgroundColorSwatchIcon.7", "DocParagraphBackgroundColorSwatchIcon.8", "DocParagraphBackgroundColorSwatchIcon.9", "DocParagraphBackgroundColorSwatchIcon.10", "DocParagraphBackgroundColorSwatchIcon.11", "DocParagraphBackgroundColorSwatchIcon.12", "DocParagraphBackgroundColorSwatchIcon.13", "DocParagraphBackgroundColorSwatchIcon.14"];
22
+ export declare function H1HeadingMenuItemFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
23
+ export declare function H2HeadingMenuItemFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
24
+ export declare function H3HeadingMenuItemFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
25
+ export declare function H4HeadingMenuItemFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
26
+ export declare function H5HeadingMenuItemFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
27
+ export declare function NormalTextHeadingMenuItemFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
28
+ export declare function TitleHeadingMenuItemFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
29
+ export declare function SubtitleHeadingMenuItemFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
30
+ export declare const EMPTY_PARAGRAPH_MENU_ID = "doc.menu.empty-paragraph";
31
+ export declare function EmptyParagraphH1MenuItemFactory(): IMenuButtonItem<LocaleKey>;
32
+ export declare function EmptyParagraphH2MenuItemFactory(): IMenuButtonItem<LocaleKey>;
33
+ export declare function EmptyParagraphH3MenuItemFactory(): IMenuButtonItem<LocaleKey>;
34
+ export declare function EmptyParagraphH4MenuItemFactory(): IMenuButtonItem<LocaleKey>;
35
+ export declare function EmptyParagraphH5MenuItemFactory(): IMenuButtonItem<LocaleKey>;
36
+ export declare function EmptyParagraphNormalTextMenuItemFactory(): IMenuButtonItem<LocaleKey>;
37
+ export declare function EmptyParagraphOrderListMenuItemFactory(): IMenuButtonItem<LocaleKey>;
38
+ export declare function EmptyParagraphBulletListMenuItemFactory(): IMenuButtonItem<LocaleKey>;
39
+ export declare function EmptyParagraphCheckListMenuItemFactory(): IMenuButtonItem<LocaleKey>;
40
+ export declare function EmptyParagraphHorizontalLineMenuItemFactory(): IMenuButtonItem<LocaleKey>;
41
+ export declare function CopyCurrentParagraphMenuItemFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
42
+ export declare function CutCurrentParagraphMenuItemFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
43
+ export declare function DeleteCurrentParagraphMenuItemFactory(): IMenuItem<LocaleKey>;
44
+ export declare function InsertBulletListBellowMenuItemFactory(): IMenuItem<LocaleKey>;
45
+ export declare function InsertOrderListBellowMenuItemFactory(): IMenuItem<LocaleKey>;
46
+ export declare function InsertCheckListBellowMenuItemFactory(): IMenuItem<LocaleKey>;
47
+ export declare function InsertHorizontalLineBellowMenuItemFactory(): IMenuItem<LocaleKey>;
48
+ export declare const INSERT_BELLOW_MENU_ID = "doc.menu.insert-bellow";
49
+ export declare const DOC_CONTENT_INSERT_MENU_ID = "doc.menu.content-insert";
50
+ export declare const DOC_TABLE_BLOCK_MENU_ID = "doc.menu.table-block";
51
+ export declare const DOC_PARAGRAPH_T_INSERT_MENU_ID = "doc.menu.paragraph-t.insert";
52
+ export declare const DOC_PARAGRAPH_T_EDIT_MENU_ID = "doc.menu.paragraph-t.edit";
53
+ export declare const DOC_PARAGRAPH_T_DIVIDER_MENU_ID = "doc.menu.paragraph-t.divider";
54
+ export declare const DOC_PARAGRAPH_T_ALIGN_MENU_ID = "doc.menu.paragraph-t.align";
55
+ export declare const DOC_PARAGRAPH_T_COLORS_MENU_ID = "doc.menu.paragraph-t.colors";
56
+ export declare const DOC_PARAGRAPH_T_INSERT_BELOW_MENU_ID = "doc.menu.paragraph-t.insert-below";
57
+ export declare const DOC_PARAGRAPH_T_RESET_COLORS_ID = "doc.menu.paragraph-t.reset-colors";
58
+ export declare const DOC_PARAGRAPH_T_INDENT_INCREASE_ID = "doc.menu.paragraph-t.indent.increase";
59
+ export declare const DOC_PARAGRAPH_T_INDENT_DECREASE_ID = "doc.menu.paragraph-t.indent.decrease";
60
+ export declare const DOC_PARAGRAPH_T_INSERT_BELOW_COMMAND_ID = "doc.menu.paragraph-t.insert-below.command";
61
+ export declare function getDocBlockRangeMenuId(blockType: string): string;
62
+ export declare function TableBlockCopyMenuItemFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
63
+ export declare function TableBlockPasteMenuItemFactory(): IMenuItem<LocaleKey>;
64
+ export declare function TableBlockDeleteMenuItemFactory(): IMenuItem<LocaleKey>;
65
+ export declare function DocInsertBellowMenuItemFactory(): IMenuSelectorItem<LocaleKey>;
66
+ export declare function ParagraphMenuAlignSubmenuItemFactory(accessor: IAccessor): IMenuSelectorItem<LocaleKey>;
67
+ export declare function ParagraphMenuColorsSubmenuItemFactory(accessor: IAccessor): IMenuSelectorItem<LocaleKey>;
68
+ export declare function ParagraphMenuTextColorHeaderActionMenuItemFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
69
+ export declare function ParagraphMenuBackgroundColorHeaderActionMenuItemFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
70
+ export declare function ParagraphMenuInsertBelowSubmenuItemFactory(accessor: IAccessor): IMenuSelectorItem<LocaleKey>;
71
+ export declare function ParagraphMenuInsertBelowHeadingH1MenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
72
+ export declare function ParagraphMenuInsertBelowHeadingH2MenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
73
+ export declare function ParagraphMenuInsertBelowHeadingH3MenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
74
+ export declare function ParagraphMenuInsertBelowHeadingH4MenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
75
+ export declare function ParagraphMenuInsertBelowHeadingH5MenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
76
+ export declare function ParagraphMenuInsertBelowTableMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
77
+ export declare function ParagraphMenuIndentIncreaseMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
78
+ export declare function ParagraphMenuIndentDecreaseMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
79
+ export declare function ParagraphMenuDefaultTextColorMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
80
+ export declare function ParagraphMenuNoBackgroundMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
81
+ export declare function ParagraphMenuResetTextColorMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
82
+ export declare function ParagraphMenuResetColorsMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
83
+ export declare const ParagraphMenuTextColorSwatchMenuItemFactories: Record<string, {
84
+ order: number;
85
+ menuItemFactory: (accessor: IAccessor) => IMenuButtonItem<LocaleKey>;
86
+ }>;
87
+ export declare const ParagraphMenuBackgroundColorSwatchMenuItemFactories: Record<string, {
88
+ order: number;
89
+ menuItemFactory: (accessor: IAccessor) => IMenuButtonItem<LocaleKey>;
90
+ }>;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { IAccessor } from '@cool-office/core';
17
+ import type { IMenuButtonItem } from '@cool-office/ui';
18
+ export declare function DocPermissionMenuItemFactory(accessor: IAccessor): IMenuButtonItem;
19
+ export declare function DocParagraphPermissionMenuItemFactory(accessor: IAccessor): IMenuButtonItem;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { MenuSchemaType } from '@cool-office/ui';
17
+ export declare const floatToolbarMenuSchema: MenuSchemaType;
18
+ export declare const menuSchema: MenuSchemaType;
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { IUniverDocsUIConfig } from './config/config';
17
+ import { ICommandService, IConfigService, Injector, Plugin } from '@cool-office/core';
18
+ import { IRenderManagerService } from '@cool-office/engine-render';
19
+ export declare class UniverDocsMobileUIPlugin extends Plugin {
20
+ private readonly _config;
21
+ _injector: Injector;
22
+ private readonly _renderManagerSrv;
23
+ private _commandService;
24
+ private readonly _configService;
25
+ static pluginName: string;
26
+ static packageName: string;
27
+ static version: string;
28
+ constructor(_config: Partial<IUniverDocsUIConfig> | undefined, _injector: Injector, _renderManagerSrv: IRenderManagerService, _commandService: ICommandService, _configService: IConfigService);
29
+ onReady(): void;
30
+ onRendered(): void;
31
+ private _initCommand;
32
+ private _initDependencies;
33
+ private _initAutoFocus;
34
+ private _initRenderBasics;
35
+ private _initRenderModules;
36
+ }
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { ICommandService, IConfigService, Injector, Plugin } from '@cool-office/core';
17
+ import { IRenderManagerService } from '@cool-office/engine-render';
18
+ import type { IUniverDocsUIConfig } from './config/config';
19
+ export declare class UniverDocsUIPlugin extends Plugin {
20
+ private readonly _config;
21
+ _injector: Injector;
22
+ private readonly _renderManagerSrv;
23
+ private _commandService;
24
+ private readonly _configService;
25
+ static pluginName: string;
26
+ static packageName: string;
27
+ static version: string;
28
+ constructor(_config: Partial<IUniverDocsUIConfig> | undefined, _injector: Injector, _renderManagerSrv: IRenderManagerService, _commandService: ICommandService, _configService: IConfigService);
29
+ onReady(): void;
30
+ onRendered(): void;
31
+ private _initCommand;
32
+ private _initializeShortcut;
33
+ private _initDependencies;
34
+ private _initAutoFocus;
35
+ private _initRenderBasics;
36
+ private _initRenderModules;
37
+ }
@@ -0,0 +1,136 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { IDisposable, IDocumentBody, IDocumentData } from '@cool-office/core';
17
+ import type { IRectRangeWithStyle, ITextRangeWithStyle } from '@cool-office/engine-render';
18
+ import type { Observable } from 'rxjs';
19
+ import { Disposable, ErrorService, ICommandService, ILogService, ImageSourceType, IPermissionService, IUndoRedoService, IUniverInstanceService, SliceBodyType } from '@cool-office/core';
20
+ import { DocSelectionManagerService, DocStateChangeManagerService } from '@cool-office/docs';
21
+ import { IClipboardInterfaceService } from '@cool-office/ui';
22
+ import type { DocPasteMode } from './paste-options';
23
+ import { DocMenuStyleService } from '../doc-menu-style.service';
24
+ import { DocHtmlExportService } from './udm-to-html/doc-html-export.service';
25
+ export declare function convertClipboardHtmlToDocumentData(html: string, unitId?: string): Partial<IDocumentData>;
26
+ export declare function removeClipboardHtmlImages(html: string): string;
27
+ export interface IClipboardPropertyItem {
28
+ }
29
+ export interface IDocClipboardCopyDocDataContext {
30
+ sourceDocuments: IDocumentData[];
31
+ }
32
+ export interface IDocClipboardCopyContentContext {
33
+ body: IDocumentBody;
34
+ segmentId?: string;
35
+ unitId: string;
36
+ }
37
+ export interface IDocClipboardPasteContext {
38
+ documentData: Partial<IDocumentData>;
39
+ targetUnitId: string;
40
+ }
41
+ export interface IDocClipboardHook {
42
+ /** Opt an internal rich-text editor into the post-paste format menu. */
43
+ supportsPasteOptions?(unitId: string): boolean;
44
+ /** Supply a rich fragment for selections owned by a plugin rather than native text ranges. */
45
+ onCopySelection?(unitId: string): {
46
+ documentData: IDocumentData;
47
+ plainText: string;
48
+ } | undefined;
49
+ onCopyDocData?(doc: Partial<IDocumentData>, context: IDocClipboardCopyDocDataContext): Partial<IDocumentData>;
50
+ onCopyProperty?(start: number, end: number): IClipboardPropertyItem;
51
+ onCopyContent?(start: number, end: number, context: IDocClipboardCopyContentContext): string;
52
+ onBeforePaste?: (body: IDocumentBody, context: IDocClipboardPasteContext) => IDocumentBody;
53
+ onBeforePasteImage?: (file: File) => Promise<{
54
+ source: string;
55
+ imageSourceType: ImageSourceType;
56
+ } | null>;
57
+ }
58
+ export interface IDocClipboardPayload {
59
+ html?: string;
60
+ text?: string;
61
+ internalJson?: string;
62
+ files: File[];
63
+ unitId?: string;
64
+ mode?: DocPasteMode;
65
+ }
66
+ export interface IDocPasteOptionsState {
67
+ unitId: string;
68
+ mode: DocPasteMode;
69
+ range: ITextRangeWithStyle;
70
+ }
71
+ export interface IDocClipboardService {
72
+ copy(sliceType?: SliceBodyType, ranges?: ITextRangeWithStyle[]): Promise<boolean>;
73
+ cut(ranges?: ITextRangeWithStyle[]): Promise<boolean>;
74
+ paste(items?: ClipboardItem[], mode?: DocPasteMode): Promise<boolean>;
75
+ pasteFromClipboard(mode?: DocPasteMode): Promise<boolean>;
76
+ legacyPaste(options: IDocClipboardPayload): Promise<boolean>;
77
+ readonly pasteOptions$: Observable<IDocPasteOptionsState | null>;
78
+ isPasteOptionsEnabled(unitId: string): boolean;
79
+ setNextPasteMode(mode: DocPasteMode): void;
80
+ dismissPasteOptions(): void;
81
+ changePasteMode(mode: DocPasteMode): Promise<boolean>;
82
+ addClipboardHook(hook: IDocClipboardHook): IDisposable;
83
+ }
84
+ export declare function getTableClipboardBodySlice(body: IDocumentBody, range: IRectRangeWithStyle): IDocumentBody;
85
+ export declare const IDocClipboardService: import("@wendellhu/redi").IdentifierDecorator<IDocClipboardService>;
86
+ export declare class DocClipboardService extends Disposable implements IDocClipboardService {
87
+ private readonly _univerInstanceService;
88
+ private readonly _logService;
89
+ private readonly _commandService;
90
+ private readonly _permissionService;
91
+ private readonly _clipboardInterfaceService;
92
+ private readonly _errorService;
93
+ private readonly _docSelectionManagerService;
94
+ private readonly _stateChangeManager;
95
+ private readonly _menuStyleService;
96
+ private readonly _undoRedoService;
97
+ private readonly _pasteOptions$;
98
+ readonly pasteOptions$: Observable<IDocPasteOptionsState | null>;
99
+ private _pasteSession;
100
+ private _applyingPaste;
101
+ private _pasteGeneration;
102
+ private _nextPasteMode;
103
+ private _lastSelectionKey;
104
+ private _clipboardHooks;
105
+ private _memoryClipboardData;
106
+ private _htmlToUDM;
107
+ private readonly _umdToHtml;
108
+ constructor(_univerInstanceService: IUniverInstanceService, _logService: ILogService, _commandService: ICommandService, _permissionService: IPermissionService, _clipboardInterfaceService: IClipboardInterfaceService, _errorService: ErrorService, docHtmlExportService: DocHtmlExportService, _docSelectionManagerService: DocSelectionManagerService, _stateChangeManager: DocStateChangeManagerService, _menuStyleService: DocMenuStyleService, _undoRedoService: IUndoRedoService);
109
+ copy(sliceType?: SliceBodyType, ranges?: ITextRangeWithStyle[]): Promise<boolean>;
110
+ cut(ranges?: ITextRangeWithStyle[]): Promise<boolean>;
111
+ pasteFromClipboard(mode?: DocPasteMode): Promise<boolean>;
112
+ paste(items?: ClipboardItem[], mode?: DocPasteMode): Promise<boolean>;
113
+ isPasteOptionsEnabled(unitId: string): boolean;
114
+ setNextPasteMode(mode: DocPasteMode): void;
115
+ legacyPaste(options: IDocClipboardPayload): Promise<boolean>;
116
+ dismissPasteOptions(): void;
117
+ changePasteMode(mode: DocPasteMode): Promise<boolean>;
118
+ private _preparePaste;
119
+ private _pasteWithOptions;
120
+ private _getPasteStyle;
121
+ private _getPasteSelectionKey;
122
+ private _savePasteSession;
123
+ private _getCurrentDocumentUnitId;
124
+ private _canEditTargets;
125
+ private _cut;
126
+ private _paste;
127
+ private _setClipboardData;
128
+ private _getSelectionParams;
129
+ addClipboardHook(hook: IDocClipboardHook): IDisposable;
130
+ private _applyCopyDocDataHooks;
131
+ private _getDocumentBodyInRanges;
132
+ private _readClipboardItems;
133
+ private _genDocDataFromHtmlAndText;
134
+ private _uploadBase64ImagesInHtml;
135
+ private _createImagePasteHtml;
136
+ }
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { IDocumentData } from '@cool-office/core';
17
+ export declare function extractId(html: string): string | null;
18
+ export declare class CopyContentCache {
19
+ private _cache;
20
+ set(id: string, clipboardData: Partial<IDocumentData>): void;
21
+ get(id: string): Partial<IDocumentData> | undefined;
22
+ clear(): void;
23
+ }
24
+ export declare const copyContentCache: CopyContentCache;
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { ICustomRange, IDisposable, IDocumentBlockRange, IDocumentBody, IDocumentData, IDrawingParam, IMutationInfo } from '@cool-office/core';
17
+ export interface IDocClipboardPasteCustomBlockMapping {
18
+ sourceBlockId: string;
19
+ targetBlockId: string;
20
+ sourceDrawing: IDrawingParam;
21
+ targetDrawing: IDrawingParam;
22
+ }
23
+ export interface IDocClipboardPasteBlockRangeMapping {
24
+ sourceBlockRange: IDocumentBlockRange;
25
+ targetBlockRange: IDocumentBlockRange;
26
+ }
27
+ export interface IDocClipboardPasteCustomRangeMapping {
28
+ sourceRange: ICustomRange;
29
+ targetRange: ICustomRange;
30
+ }
31
+ export interface IDocClipboardPasteMutationInfoParams {
32
+ unitId: string;
33
+ segmentId: string;
34
+ doc: Partial<IDocumentData>;
35
+ sourceBody: IDocumentBody;
36
+ targetBody: IDocumentBody;
37
+ blockRangeMappings: IDocClipboardPasteBlockRangeMapping[];
38
+ customRangeMappings?: IDocClipboardPasteCustomRangeMapping[];
39
+ customBlockMappings: IDocClipboardPasteCustomBlockMapping[];
40
+ }
41
+ export interface IDocClipboardPasteMutationInfos {
42
+ redoMutations: IMutationInfo[];
43
+ undoMutations: IMutationInfo[];
44
+ }
45
+ export interface IDocClipboardPasteAdapter {
46
+ getPasteMutationInfos?: (params: IDocClipboardPasteMutationInfoParams) => IDocClipboardPasteMutationInfos | null | undefined;
47
+ }
48
+ export interface IDocClipboardPasteAdapterService {
49
+ registerAdapter(adapter: IDocClipboardPasteAdapter): IDisposable;
50
+ getPasteMutationInfos(params: IDocClipboardPasteMutationInfoParams): IDocClipboardPasteMutationInfos;
51
+ }
52
+ export declare const IDocClipboardPasteAdapterService: import("@wendellhu/redi").IdentifierDecorator<IDocClipboardPasteAdapterService>;
53
+ export declare class DocClipboardPasteAdapterService implements IDocClipboardPasteAdapterService {
54
+ private readonly _adapters;
55
+ registerAdapter(adapter: IDocClipboardPasteAdapter): IDisposable;
56
+ getPasteMutationInfos(params: IDocClipboardPasteMutationInfoParams): IDocClipboardPasteMutationInfos;
57
+ }
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { IDocumentData } from '@cool-office/core';
17
+ import type { IPastePlugin } from './paste-plugins/type';
18
+ /**
19
+ * Convert html strings into data structures in univer, IDocumentBody.
20
+ * Support plug-in, add custom rules,
21
+ */
22
+ export declare class HtmlToUDMService {
23
+ private static _pluginList;
24
+ static use(plugin: IPastePlugin): void;
25
+ private _tableCache;
26
+ private _styleCache;
27
+ private _styleRules;
28
+ private _afterProcessRules;
29
+ private _listStack;
30
+ private _lastParagraphIndex;
31
+ private _createParagraphId;
32
+ private _createSectionId;
33
+ convert(html: string, metaConfig?: {
34
+ unitId?: string;
35
+ }): Partial<IDocumentData>;
36
+ private _process;
37
+ private _processCodeBlock;
38
+ private _processBeforeStructuredBlock;
39
+ private _processAfterStructuredBlock;
40
+ private _processBeforeList;
41
+ private _processAfterList;
42
+ private _processAfterDefaultBlock;
43
+ private _appendParagraph;
44
+ private _applyListInfo;
45
+ private _processHtmlTable;
46
+ private _appendHtmlTableCell;
47
+ private _processBeforeTable;
48
+ private _processAfterTable;
49
+ private _processBeforeLink;
50
+ private _processAfterLink;
51
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { ITextStyle } from '@cool-office/core';
17
+ export declare function extractNodeStyle(node: HTMLElement): ITextStyle;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export default function parseToDom(rawHtml: string): Element | null;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { IPastePlugin } from './type';
17
+ declare const LarkPastePlugin: IPastePlugin;
18
+ export default LarkPastePlugin;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { IPastePlugin } from './type';
17
+ declare const UniverPastePlugin: IPastePlugin;
18
+ export default UniverPastePlugin;