@univerjs/docs-ui 1.0.0-rc.0 → 1.0.1

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 (159) hide show
  1. package/README.md +27 -0
  2. package/lib/cjs/index.js +27388 -23213
  3. package/lib/cjs/locale/ar-SA.js +28 -1
  4. package/lib/cjs/locale/ca-ES.js +28 -1
  5. package/lib/cjs/locale/de-DE.js +28 -1
  6. package/lib/cjs/locale/en-US.js +28 -1
  7. package/lib/cjs/locale/es-ES.js +28 -1
  8. package/lib/cjs/locale/fa-IR.js +28 -1
  9. package/lib/cjs/locale/fr-FR.js +28 -1
  10. package/lib/cjs/locale/id-ID.js +28 -1
  11. package/lib/cjs/locale/it-IT.js +28 -1
  12. package/lib/cjs/locale/ja-JP.js +28 -1
  13. package/lib/cjs/locale/ko-KR.js +28 -1
  14. package/lib/cjs/locale/pl-PL.js +28 -1
  15. package/lib/cjs/locale/pt-BR.js +28 -1
  16. package/lib/cjs/locale/ru-RU.js +28 -1
  17. package/lib/cjs/locale/sk-SK.js +28 -1
  18. package/lib/cjs/locale/vi-VN.js +28 -1
  19. package/lib/cjs/locale/zh-CN.js +28 -1
  20. package/lib/cjs/locale/zh-HK.js +28 -1
  21. package/lib/cjs/locale/zh-TW.js +28 -1
  22. package/lib/es/index.js +26448 -22297
  23. package/lib/es/locale/ar-SA.js +28 -0
  24. package/lib/es/locale/ca-ES.js +28 -0
  25. package/lib/es/locale/de-DE.js +28 -0
  26. package/lib/es/locale/en-US.js +28 -0
  27. package/lib/es/locale/es-ES.js +28 -0
  28. package/lib/es/locale/fa-IR.js +28 -0
  29. package/lib/es/locale/fr-FR.js +28 -0
  30. package/lib/es/locale/id-ID.js +28 -0
  31. package/lib/es/locale/it-IT.js +28 -0
  32. package/lib/es/locale/ja-JP.js +28 -0
  33. package/lib/es/locale/ko-KR.js +28 -0
  34. package/lib/es/locale/pl-PL.js +28 -0
  35. package/lib/es/locale/pt-BR.js +28 -0
  36. package/lib/es/locale/ru-RU.js +28 -0
  37. package/lib/es/locale/sk-SK.js +28 -0
  38. package/lib/es/locale/vi-VN.js +28 -0
  39. package/lib/es/locale/zh-CN.js +28 -0
  40. package/lib/es/locale/zh-HK.js +28 -0
  41. package/lib/es/locale/zh-TW.js +28 -0
  42. package/lib/index.css +322 -84
  43. package/lib/index.js +26448 -22297
  44. package/lib/locale/ar-SA.js +28 -0
  45. package/lib/locale/ca-ES.js +28 -0
  46. package/lib/locale/de-DE.js +28 -0
  47. package/lib/locale/en-US.js +28 -0
  48. package/lib/locale/es-ES.js +28 -0
  49. package/lib/locale/fa-IR.js +28 -0
  50. package/lib/locale/fr-FR.js +28 -0
  51. package/lib/locale/id-ID.js +28 -0
  52. package/lib/locale/it-IT.js +28 -0
  53. package/lib/locale/ja-JP.js +28 -0
  54. package/lib/locale/ko-KR.js +28 -0
  55. package/lib/locale/pl-PL.js +28 -0
  56. package/lib/locale/pt-BR.js +28 -0
  57. package/lib/locale/ru-RU.js +28 -0
  58. package/lib/locale/sk-SK.js +28 -0
  59. package/lib/locale/vi-VN.js +28 -0
  60. package/lib/locale/zh-CN.js +28 -0
  61. package/lib/locale/zh-HK.js +28 -0
  62. package/lib/locale/zh-TW.js +28 -0
  63. package/lib/types/basics/paragraph.d.ts +4 -1
  64. package/lib/types/commands/commands/clipboard.command.d.ts +9 -2
  65. package/lib/types/commands/commands/clipboard.inner.command.d.ts +1 -1
  66. package/lib/types/commands/commands/doc-select-all.command.d.ts +1 -0
  67. package/lib/types/commands/commands/format-painter.command.d.ts +33 -0
  68. package/lib/types/commands/commands/table/doc-table-delete.command.d.ts +1 -0
  69. package/lib/types/components/doc-page-render-component.d.ts +21 -0
  70. package/lib/types/config/config.d.ts +2 -0
  71. package/lib/types/consts/mobile-context.d.ts +17 -0
  72. package/lib/types/controllers/doc-header-footer.controller.d.ts +3 -6
  73. package/lib/types/controllers/doc-move-cursor.controller.d.ts +1 -0
  74. package/lib/types/controllers/format-painter.controller.d.ts +23 -0
  75. package/lib/types/controllers/mobile/components.controller.d.ts +25 -0
  76. package/lib/types/controllers/mobile/ui.controller.d.ts +29 -0
  77. package/lib/types/controllers/render-controllers/back-scroll.render-controller.d.ts +4 -3
  78. package/lib/types/controllers/render-controllers/doc-paragraph-placeholder.render-controller.d.ts +4 -3
  79. package/lib/types/controllers/render-controllers/doc-paste-options.render-controller.d.ts +27 -0
  80. package/lib/types/controllers/render-controllers/doc-selection-render.controller.d.ts +2 -0
  81. package/lib/types/controllers/render-controllers/doc-selection-render.util.d.ts +21 -0
  82. package/lib/types/controllers/render-controllers/doc.render-controller.d.ts +19 -5
  83. package/lib/types/controllers/render-controllers/format-painter.render-controller.d.ts +23 -0
  84. package/lib/types/controllers/render-controllers/mobile/back-scroll.render-controller.d.ts +30 -0
  85. package/lib/types/controllers/render-controllers/mobile/doc-pinch-zoom.d.ts +51 -0
  86. package/lib/types/controllers/render-controllers/mobile/doc-selection-render.controller.d.ts +73 -0
  87. package/lib/types/controllers/render-controllers/mobile/doc.render-controller.d.ts +36 -0
  88. package/lib/types/controllers/render-controllers/mobile/zoom.render-controller.d.ts +30 -0
  89. package/lib/types/controllers/render-controllers/zoom.render-controller.d.ts +8 -6
  90. package/lib/types/index.d.ts +10 -1
  91. package/lib/types/locale/en-US.d.ts +30 -0
  92. package/lib/types/menu/context-menu.d.ts +3 -0
  93. package/lib/types/menu/mobile-schema.d.ts +17 -0
  94. package/lib/types/mobile-plugin.d.ts +36 -0
  95. package/lib/types/services/clipboard/clipboard.service.d.ts +53 -20
  96. package/lib/types/services/clipboard/paste-options.d.ts +33 -0
  97. package/lib/types/services/doc-contextual-ribbon.service.d.ts +29 -0
  98. package/lib/types/services/doc-event-manager.service.d.ts +3 -0
  99. package/lib/types/services/doc-mobile-element-menu.service.d.ts +44 -0
  100. package/lib/types/services/doc-page-layout.service.d.ts +3 -0
  101. package/lib/types/services/doc-paragraph-menu.service.d.ts +3 -2
  102. package/lib/types/services/doc-popup-manager.service.d.ts +1 -0
  103. package/lib/types/services/doc-view-scale.d.ts +1 -1
  104. package/lib/types/services/editor/editor-manager.service.d.ts +2 -0
  105. package/lib/types/services/editor/editor-runtime-config.d.ts +24 -0
  106. package/lib/types/services/editor/editor.d.ts +9 -0
  107. package/lib/types/services/float-menu.service.d.ts +12 -4
  108. package/lib/types/services/mobile/doc-selection-render.service.d.ts +60 -0
  109. package/lib/types/services/mobile/doc-view-scale.d.ts +19 -0
  110. package/lib/types/services/mobile/float-menu.service.d.ts +20 -0
  111. package/lib/types/services/mobile/mobile-text-selection-visuals.d.ts +32 -0
  112. package/lib/types/services/selection/convert-text-range.d.ts +7 -0
  113. package/lib/types/services/selection/doc-selection-render.service.d.ts +38 -21
  114. package/lib/types/views/DocPasteOptions.d.ts +17 -0
  115. package/lib/types/views/Icon.d.ts +0 -3
  116. package/lib/types/views/PageSettings.d.ts +5 -1
  117. package/lib/types/views/ParagraphMenu.d.ts +1 -2
  118. package/lib/types/views/RichTextEditor.d.ts +20 -1
  119. package/lib/types/views/SideMenu.d.ts +1 -0
  120. package/lib/types/views/doc-statistics/DocPageStatus.d.ts +30 -0
  121. package/lib/types/views/float-toolbar/FloatToolbar.d.ts +1 -0
  122. package/lib/types/views/header-footer/content-cover.d.ts +30 -0
  123. package/lib/types/views/header-footer/panel/DocHeaderFooterOptions.d.ts +4 -0
  124. package/lib/types/views/header-footer/panel/DocHeaderFooterPanel.d.ts +2 -1
  125. package/lib/types/views/header-footer/panel/use-header-footer-options.d.ts +25 -0
  126. package/lib/types/views/mobile/MobileDocCanvasViewport.d.ts +20 -0
  127. package/lib/types/views/mobile/MobileDocPasteOptions.d.ts +21 -0
  128. package/lib/types/views/mobile/MobileDocSettings.d.ts +20 -0
  129. package/lib/types/views/mobile-doc-toolbar/MobileDocToolbar.d.ts +30 -0
  130. package/lib/types/views/mobile-element-menu/MobileDocElementMenu.d.ts +25 -0
  131. package/lib/types/views/mobile-rich-text-editor/MobileRichTextEditor.d.ts +33 -0
  132. package/lib/types/views/paragraph-setting/Setting.d.ts +30 -1
  133. package/lib/types/views/paragraph-setting/hook/utils.d.ts +4 -0
  134. package/lib/types/views/paragraph-setting/index.d.ts +2 -1
  135. package/lib/types/views/rich-text-editor/hooks/use-editor.d.ts +8 -0
  136. package/lib/types/views/rich-text-editor/hooks/use-resize.d.ts +2 -1
  137. package/lib/types/views/section-setting/Setting.d.ts +12 -1
  138. package/lib/types/views/section-setting/index.d.ts +2 -1
  139. package/lib/umd/index.js +19 -18
  140. package/lib/umd/locale/ar-SA.js +1 -1
  141. package/lib/umd/locale/ca-ES.js +1 -1
  142. package/lib/umd/locale/de-DE.js +1 -1
  143. package/lib/umd/locale/en-US.js +1 -1
  144. package/lib/umd/locale/es-ES.js +1 -1
  145. package/lib/umd/locale/fa-IR.js +1 -1
  146. package/lib/umd/locale/fr-FR.js +1 -1
  147. package/lib/umd/locale/id-ID.js +1 -1
  148. package/lib/umd/locale/it-IT.js +1 -1
  149. package/lib/umd/locale/ja-JP.js +1 -1
  150. package/lib/umd/locale/ko-KR.js +1 -1
  151. package/lib/umd/locale/pl-PL.js +1 -1
  152. package/lib/umd/locale/pt-BR.js +1 -1
  153. package/lib/umd/locale/ru-RU.js +1 -1
  154. package/lib/umd/locale/sk-SK.js +1 -1
  155. package/lib/umd/locale/vi-VN.js +1 -1
  156. package/lib/umd/locale/zh-CN.js +1 -1
  157. package/lib/umd/locale/zh-HK.js +1 -1
  158. package/lib/umd/locale/zh-TW.js +1 -1
  159. package/package.json +13 -12
@@ -1,11 +1,35 @@
1
1
  //#region src/locale/pt-BR.ts
2
2
  const locale = { "docs-ui": {
3
+ pasteOptions: {
4
+ title: "Opções de colagem",
5
+ source: "Manter formatação original",
6
+ destination: "Usar formatação de destino",
7
+ text: "Manter somente texto",
8
+ useKeyboard: "Não é possível acessar a área de transferência. Use {0} para colar e altere o formato nas opções de colagem.",
9
+ useSystemPaste: "Não é possível acessar a área de transferência. Use a função de colar do dispositivo ou teclado e altere o formato nas opções de colagem.",
10
+ failed: "Não foi possível alterar o formato da colagem."
11
+ },
12
+ outline: { title: "Estrutura do documento" },
3
13
  objectPermission: {
4
14
  paragraphPermission: "Permissões",
5
15
  title: "Permissões",
6
16
  paragraph: "Parágrafo",
7
17
  section: "Seção"
8
18
  },
19
+ mobile: {
20
+ insert: "Inserir",
21
+ edit: "Editar",
22
+ done: "Concluído",
23
+ more: "Mais",
24
+ back: "Voltar",
25
+ close: "Fechar",
26
+ format: "Formatar",
27
+ layout: "Layout",
28
+ keyboard: "Mostrar teclado",
29
+ hideKeyboard: "Ocultar teclado",
30
+ expand: "Expandir ferramentas",
31
+ collapse: "Recolher ferramentas"
32
+ },
9
33
  layout: {
10
34
  progress: "Formatando o documento…",
11
35
  recovering: "Restaurando o layout do documento…"
@@ -87,6 +111,8 @@ const locale = { "docs-ui": {
87
111
  selection: "Seleção atual",
88
112
  wordCount: "{0} palavras",
89
113
  selectedWords: "{0} de {1} palavras",
114
+ currentPage: "Página {0}",
115
+ currentPageOfTotal: "Página {0} de {1}",
90
116
  pages: "Páginas",
91
117
  words: "Palavras",
92
118
  charactersWithoutSpaces: "Caracteres (sem espaços)",
@@ -155,6 +181,8 @@ const locale = { "docs-ui": {
155
181
  copy: "Copiar",
156
182
  cut: "Recortar",
157
183
  paste: "Colar",
184
+ select: "Selecionar",
185
+ selectAll: "Selecionar tudo",
158
186
  delete: "Excluir",
159
187
  bulletList: "Lista com marcadores",
160
188
  orderList: "Lista ordenada",
@@ -1,11 +1,35 @@
1
1
  //#region src/locale/ru-RU.ts
2
2
  const locale = { "docs-ui": {
3
+ pasteOptions: {
4
+ title: "Параметры вставки",
5
+ source: "Сохранить исходное форматирование",
6
+ destination: "Использовать форматирование назначения",
7
+ text: "Сохранить только текст",
8
+ useKeyboard: "Нет доступа к буферу обмена. Используйте {0} для вставки, затем измените формат через параметры вставки.",
9
+ useSystemPaste: "Нет доступа к буферу обмена. Используйте функцию вставки устройства или клавиатуры, затем измените формат через параметры вставки.",
10
+ failed: "Не удалось изменить формат вставки."
11
+ },
12
+ outline: { title: "Структура документа" },
3
13
  objectPermission: {
4
14
  paragraphPermission: "Права доступа",
5
15
  title: "Права доступа",
6
16
  paragraph: "Абзац",
7
17
  section: "Раздел"
8
18
  },
19
+ mobile: {
20
+ insert: "Вставка",
21
+ edit: "Редактировать",
22
+ done: "Готово",
23
+ more: "Ещё",
24
+ back: "Назад",
25
+ close: "Закрыть",
26
+ format: "Формат",
27
+ layout: "Макет",
28
+ keyboard: "Показать клавиатуру",
29
+ hideKeyboard: "Скрыть клавиатуру",
30
+ expand: "Развернуть инструменты",
31
+ collapse: "Свернуть инструменты"
32
+ },
9
33
  layout: {
10
34
  progress: "Выполняется разметка документа…",
11
35
  recovering: "Восстановление макета документа…"
@@ -87,6 +111,8 @@ const locale = { "docs-ui": {
87
111
  selection: "Текущее выделение",
88
112
  wordCount: "Слов: {0}",
89
113
  selectedWords: "Слов: {0} из {1}",
114
+ currentPage: "Страница {0}",
115
+ currentPageOfTotal: "Страница {0} из {1}",
90
116
  pages: "Страницы",
91
117
  words: "Слова",
92
118
  charactersWithoutSpaces: "Знаки (без пробелов)",
@@ -155,6 +181,8 @@ const locale = { "docs-ui": {
155
181
  copy: "Копировать",
156
182
  cut: "Вырезать",
157
183
  paste: "Вставить",
184
+ select: "Выбрать",
185
+ selectAll: "Выбрать всё",
158
186
  delete: "Удалить",
159
187
  bulletList: "Неупорядоченный список",
160
188
  orderList: "Упорядоченный список",
@@ -1,11 +1,35 @@
1
1
  //#region src/locale/sk-SK.ts
2
2
  const locale = { "docs-ui": {
3
+ pasteOptions: {
4
+ title: "Možnosti prilepenia",
5
+ source: "Zachovať zdrojové formátovanie",
6
+ destination: "Prispôsobiť cieľovému formátovaniu",
7
+ text: "Zachovať iba text",
8
+ useKeyboard: "Schránka nie je dostupná. Použite {0} na prilepenie a potom zmeňte formát v možnostiach prilepenia.",
9
+ useSystemPaste: "Schránka nie je dostupná. Použite funkciu prilepenia zariadenia alebo klávesnice a potom zmeňte formát v možnostiach prilepenia.",
10
+ failed: "Formát prilepenia sa nepodarilo zmeniť."
11
+ },
12
+ outline: { title: "Osnova dokumentu" },
3
13
  objectPermission: {
4
14
  paragraphPermission: "Oprávnenia",
5
15
  title: "Oprávnenia",
6
16
  paragraph: "Odsek",
7
17
  section: "Sekcia"
8
18
  },
19
+ mobile: {
20
+ insert: "Vložiť",
21
+ edit: "Upraviť",
22
+ done: "Hotovo",
23
+ more: "Viac",
24
+ back: "Späť",
25
+ close: "Zavrieť",
26
+ format: "Formát",
27
+ layout: "Rozloženie",
28
+ keyboard: "Zobraziť klávesnicu",
29
+ hideKeyboard: "Skryť klávesnicu",
30
+ expand: "Rozbaliť nástroje",
31
+ collapse: "Zbaliť nástroje"
32
+ },
9
33
  layout: {
10
34
  progress: "Rozkladá sa dokument…",
11
35
  recovering: "Obnovuje sa rozloženie dokumentu…"
@@ -87,6 +111,8 @@ const locale = { "docs-ui": {
87
111
  selection: "Aktuálny výber",
88
112
  wordCount: "Počet slov: {0}",
89
113
  selectedWords: "Počet slov: {0} z {1}",
114
+ currentPage: "Strana {0}",
115
+ currentPageOfTotal: "Strana {0} z {1}",
90
116
  pages: "Strany",
91
117
  words: "Slová",
92
118
  charactersWithoutSpaces: "Znaky (bez medzier)",
@@ -155,6 +181,8 @@ const locale = { "docs-ui": {
155
181
  copy: "Kopírovať",
156
182
  cut: "Vystrihnúť",
157
183
  paste: "Prilepiť",
184
+ select: "Vybrať",
185
+ selectAll: "Vybrať všetko",
158
186
  delete: "Odstrániť",
159
187
  bulletList: "Odrážkový zoznam",
160
188
  orderList: "Číslovaný zoznam",
@@ -1,11 +1,35 @@
1
1
  //#region src/locale/vi-VN.ts
2
2
  const locale = { "docs-ui": {
3
+ pasteOptions: {
4
+ title: "Tùy chọn dán",
5
+ source: "Giữ định dạng nguồn",
6
+ destination: "Khớp định dạng đích",
7
+ text: "Chỉ giữ văn bản",
8
+ useKeyboard: "Không thể truy cập bảng nhớ tạm. Dùng {0} để dán, rồi đổi định dạng trong Tùy chọn dán.",
9
+ useSystemPaste: "Không thể truy cập bảng nhớ tạm. Hãy dùng chức năng dán của thiết bị hoặc bàn phím, rồi đổi định dạng trong Tùy chọn dán.",
10
+ failed: "Không thể thay đổi định dạng dán."
11
+ },
12
+ outline: { title: "Dàn ý tài liệu" },
3
13
  objectPermission: {
4
14
  paragraphPermission: "Quyền",
5
15
  title: "Quyền",
6
16
  paragraph: "Đoạn văn",
7
17
  section: "Phần"
8
18
  },
19
+ mobile: {
20
+ insert: "Chèn",
21
+ edit: "Chỉnh sửa",
22
+ done: "Xong",
23
+ more: "Thêm",
24
+ back: "Quay lại",
25
+ close: "Đóng",
26
+ format: "Định dạng",
27
+ layout: "Bố cục",
28
+ keyboard: "Hiện bàn phím",
29
+ hideKeyboard: "Ẩn bàn phím",
30
+ expand: "Mở rộng công cụ",
31
+ collapse: "Thu gọn công cụ"
32
+ },
9
33
  layout: {
10
34
  progress: "Đang dàn trang tài liệu…",
11
35
  recovering: "Đang khôi phục bố cục tài liệu…"
@@ -87,6 +111,8 @@ const locale = { "docs-ui": {
87
111
  selection: "Vùng chọn hiện tại",
88
112
  wordCount: "{0} từ",
89
113
  selectedWords: "{0} trên {1} từ",
114
+ currentPage: "Trang {0}",
115
+ currentPageOfTotal: "Trang {0} trên {1}",
90
116
  pages: "Trang",
91
117
  words: "Từ",
92
118
  charactersWithoutSpaces: "Ký tự (không có dấu cách)",
@@ -155,6 +181,8 @@ const locale = { "docs-ui": {
155
181
  copy: "Sao chép",
156
182
  cut: "Cắt",
157
183
  paste: "Dán",
184
+ select: "Chọn",
185
+ selectAll: "Chọn tất cả",
158
186
  delete: "Xóa",
159
187
  bulletList: "Danh sách không thứ tự",
160
188
  orderList: "Danh sách có thứ tự",
@@ -1,11 +1,35 @@
1
1
  //#region src/locale/zh-CN.ts
2
2
  const locale = { "docs-ui": {
3
+ pasteOptions: {
4
+ title: "粘贴选项",
5
+ source: "保留源格式",
6
+ destination: "匹配目标格式",
7
+ text: "仅保留文本",
8
+ useKeyboard: "无法读取剪贴板。请按 {0} 粘贴,再通过“粘贴选项”切换格式。",
9
+ useSystemPaste: "无法访问剪贴板。请使用设备或键盘提供的粘贴操作,再通过“粘贴选项”切换格式。",
10
+ failed: "无法切换粘贴格式。"
11
+ },
12
+ outline: { title: "文档大纲" },
3
13
  objectPermission: {
4
14
  paragraphPermission: "权限",
5
15
  title: "权限",
6
16
  paragraph: "段落",
7
17
  section: "节"
8
18
  },
19
+ mobile: {
20
+ insert: "插入",
21
+ edit: "编辑",
22
+ done: "完成",
23
+ more: "更多",
24
+ back: "返回",
25
+ close: "关闭",
26
+ format: "格式",
27
+ layout: "布局",
28
+ keyboard: "显示键盘",
29
+ hideKeyboard: "收起键盘",
30
+ expand: "展开工具",
31
+ collapse: "收起工具"
32
+ },
9
33
  layout: {
10
34
  progress: "正在排版文档…",
11
35
  recovering: "正在恢复文档排版…"
@@ -87,6 +111,8 @@ const locale = { "docs-ui": {
87
111
  selection: "当前选区",
88
112
  wordCount: "字数 {0}",
89
113
  selectedWords: "字数 {0} / {1}",
114
+ currentPage: "第 {0} 页",
115
+ currentPageOfTotal: "第 {0} 页,共 {1} 页",
90
116
  pages: "页数",
91
117
  words: "字数",
92
118
  charactersWithoutSpaces: "字符数(不计空格)",
@@ -155,6 +181,8 @@ const locale = { "docs-ui": {
155
181
  copy: "复制",
156
182
  cut: "剪切",
157
183
  paste: "粘贴",
184
+ select: "选择",
185
+ selectAll: "全选",
158
186
  delete: "删除",
159
187
  bulletList: "无序列表",
160
188
  orderList: "有序列表",
@@ -1,11 +1,35 @@
1
1
  //#region src/locale/zh-HK.ts
2
2
  const locale = { "docs-ui": {
3
+ pasteOptions: {
4
+ title: "貼上選項",
5
+ source: "保留來源格式",
6
+ destination: "符合目標格式",
7
+ text: "只保留文字",
8
+ useKeyboard: "無法讀取剪貼簿。請按 {0} 貼上,再透過「貼上選項」切換格式。",
9
+ useSystemPaste: "無法存取剪貼簿。請使用裝置或鍵盤提供的貼上操作,再透過「貼上選項」切換格式。",
10
+ failed: "無法切換貼上格式。"
11
+ },
12
+ outline: { title: "文件大綱" },
3
13
  objectPermission: {
4
14
  paragraphPermission: "權限",
5
15
  title: "權限",
6
16
  paragraph: "段落",
7
17
  section: "節"
8
18
  },
19
+ mobile: {
20
+ insert: "插入",
21
+ edit: "編輯",
22
+ done: "完成",
23
+ more: "更多",
24
+ back: "返回",
25
+ close: "關閉",
26
+ format: "格式",
27
+ layout: "版面",
28
+ keyboard: "顯示鍵盤",
29
+ hideKeyboard: "收起鍵盤",
30
+ expand: "展開工具",
31
+ collapse: "收起工具"
32
+ },
9
33
  layout: {
10
34
  progress: "正在排版文件…",
11
35
  recovering: "正在恢復文件排版…"
@@ -87,6 +111,8 @@ const locale = { "docs-ui": {
87
111
  selection: "目前選取範圍",
88
112
  wordCount: "字數 {0}",
89
113
  selectedWords: "字數 {0} / {1}",
114
+ currentPage: "第 {0} 頁",
115
+ currentPageOfTotal: "第 {0} 頁,共 {1} 頁",
90
116
  pages: "頁數",
91
117
  words: "字數",
92
118
  charactersWithoutSpaces: "字元數(不計空格)",
@@ -155,6 +181,8 @@ const locale = { "docs-ui": {
155
181
  copy: "複製",
156
182
  cut: "剪切",
157
183
  paste: "貼上",
184
+ select: "選取",
185
+ selectAll: "全選",
158
186
  delete: "刪除",
159
187
  bulletList: "無序列表",
160
188
  orderList: "有序列表",
@@ -1,11 +1,35 @@
1
1
  //#region src/locale/zh-TW.ts
2
2
  const locale = { "docs-ui": {
3
+ pasteOptions: {
4
+ title: "貼上選項",
5
+ source: "保留來源格式",
6
+ destination: "符合目的地格式",
7
+ text: "只保留文字",
8
+ useKeyboard: "無法讀取剪貼簿。請按 {0} 貼上,再透過「貼上選項」切換格式。",
9
+ useSystemPaste: "無法存取剪貼簿。請使用裝置或鍵盤提供的貼上操作,再透過「貼上選項」切換格式。",
10
+ failed: "無法切換貼上格式。"
11
+ },
12
+ outline: { title: "文件大綱" },
3
13
  objectPermission: {
4
14
  paragraphPermission: "權限",
5
15
  title: "權限",
6
16
  paragraph: "段落",
7
17
  section: "節"
8
18
  },
19
+ mobile: {
20
+ insert: "插入",
21
+ edit: "編輯",
22
+ done: "完成",
23
+ more: "更多",
24
+ back: "返回",
25
+ close: "關閉",
26
+ format: "格式",
27
+ layout: "版面",
28
+ keyboard: "顯示鍵盤",
29
+ hideKeyboard: "收合鍵盤",
30
+ expand: "展開工具",
31
+ collapse: "收合工具"
32
+ },
9
33
  layout: {
10
34
  progress: "正在排版文件…",
11
35
  recovering: "正在復原文件排版…"
@@ -87,6 +111,8 @@ const locale = { "docs-ui": {
87
111
  selection: "目前選取範圍",
88
112
  wordCount: "字數 {0}",
89
113
  selectedWords: "字數 {0} / {1}",
114
+ currentPage: "第 {0} 頁",
115
+ currentPageOfTotal: "第 {0} 頁,共 {1} 頁",
90
116
  pages: "頁數",
91
117
  words: "字數",
92
118
  charactersWithoutSpaces: "字元數(不計空格)",
@@ -155,6 +181,8 @@ const locale = { "docs-ui": {
155
181
  copy: "複製",
156
182
  cut: "剪切",
157
183
  paste: "貼上",
184
+ select: "選取",
185
+ selectAll: "全選",
158
186
  delete: "刪除",
159
187
  bulletList: "無序列表",
160
188
  orderList: "有序列表",
@@ -13,9 +13,12 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import type { ICustomDecoration, ICustomRange, ICustomTable, IDocumentBody, IParagraph, ITextRun, ITextStyle, Nullable } from '@univerjs/core';
16
+ import type { ICustomDecoration, ICustomRange, ICustomTable, IDocumentBody, IParagraph, ITextRange, ITextRun, ITextStyle, Nullable } from '@univerjs/core';
17
17
  export declare function isTopLevelStructuralGap(dataStream: string, offset: number): boolean;
18
18
  export declare function hasParagraphInTable(paragraph: IParagraph, tables: ICustomTable[]): boolean;
19
19
  export declare function getTextRunAtPosition(body: IDocumentBody, position: number, defaultStyle: ITextStyle, cacheStyle: Nullable<ITextStyle>, isCellEditor?: boolean): ITextRun;
20
+ export declare function getTextRunAtInputPosition(body: IDocumentBody, position: number, defaultStyle: ITextStyle, cacheStyle: Nullable<ITextStyle>, isCellEditor?: boolean, inheritParagraphStartStyle?: boolean): ITextRun;
21
+ /** Replacing a selection uses its first character; a caret normally uses its left neighbor. */
22
+ export declare function getTextRunForSelection(body: IDocumentBody, range: Pick<ITextRange, 'startOffset' | 'endOffset'>, defaultStyle: ITextStyle, cacheStyle: Nullable<ITextStyle>, isCellEditor?: boolean, inheritParagraphStartStyle?: boolean): ITextRun;
20
23
  export declare function getCustomRangeAtPosition(customRanges: ICustomRange[], position: number, extendRange?: boolean): ICustomRange<Record<string, any>> | null | undefined;
21
24
  export declare function getCustomDecorationAtPosition(customDecorations: ICustomDecoration[], position: number): ICustomDecoration[];
@@ -13,8 +13,9 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import type { IAccessor, IContextService, IMultiCommand } from '@univerjs/core';
17
- import { CommandType } from '@univerjs/core';
16
+ import type { IAccessor, ICommand, IMultiCommand } from '@univerjs/core';
17
+ import type { DocPasteMode } from '../../services/clipboard/paste-options';
18
+ import { CommandType, IContextService } from '@univerjs/core';
18
19
  export declare function whenDocOrEditor(contextService: IContextService): boolean;
19
20
  export declare function whenFocusEditor(contextService: IContextService): boolean;
20
21
  export declare const DocCopyCommand: IMultiCommand;
@@ -29,4 +30,10 @@ export declare const DocCutCurrentParagraphCommand: {
29
30
  type: CommandType;
30
31
  handler: (accessor: IAccessor) => Promise<boolean>;
31
32
  };
33
+ export declare const DocPasteSpecialCommand: ICommand<{
34
+ value: DocPasteMode;
35
+ }>;
32
36
  export declare const DocPasteCommand: IMultiCommand;
37
+ export declare const DocChangePasteModeCommand: ICommand<{
38
+ value: DocPasteMode;
39
+ }>;
@@ -24,7 +24,7 @@ export interface IInnerPasteCommandParams {
24
24
  customRangeMappings?: IDocClipboardPasteCustomRangeMapping[];
25
25
  }
26
26
  export declare const InnerPasteCommand: ICommand<IInnerPasteCommandParams>;
27
- export declare function getCutActionsFromDocRanges(textRanges: Readonly<Nullable<ITextRangeWithStyle[]>>, rectRanges: Readonly<Nullable<IRectRangeWithStyle[]>>, docDataModel: DocumentDataModel, viewModel: DocumentViewModel, segmentId: string, wholeBodySelected?: boolean): JSONXActions;
27
+ export declare function getCutActionsFromDocRanges(textRanges: Readonly<Nullable<ITextRangeWithStyle[]>>, rectRanges: Readonly<Nullable<IRectRangeWithStyle[]>>, docDataModel: DocumentDataModel, viewModel: DocumentViewModel, segmentId: string, wholeBodySelected?: boolean, preserveFormatting?: boolean): JSONXActions;
28
28
  export declare function getReplaceDocRangesActions(textRanges: Readonly<Nullable<ITextRangeWithStyle[]>>, rectRanges: Readonly<Nullable<IRectRangeWithStyle[]>>, docDataModel: DocumentDataModel, viewModel: DocumentViewModel, segmentId: string, insertBody: IDocumentBody, wholeBodySelected?: boolean): {
29
29
  actions: JSONXActions;
30
30
  insertOffset: number;
@@ -19,4 +19,5 @@ interface ISelectAllCommandParams {
19
19
  wholeDocument?: boolean;
20
20
  }
21
21
  export declare const DocSelectAllCommand: ICommand<ISelectAllCommandParams>;
22
+ export declare const DocSelectWordCommand: ICommand;
22
23
  export {};
@@ -0,0 +1,33 @@
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 { IBullet, ICommand, IDocumentBody, IDocumentData, IListData, IParagraphStyle, ITextRangeParam, ITextStyle } from '@univerjs/core';
17
+ import { TextX } from '@univerjs/core';
18
+ export interface ITextFormatPainterSnapshot {
19
+ textStyle: ITextStyle;
20
+ paragraphStyle?: IParagraphStyle;
21
+ bullet?: IBullet;
22
+ listDefinition?: IListData;
23
+ }
24
+ export declare function captureTextFormat(body: IDocumentBody, range: Pick<ITextRangeParam, 'startOffset' | 'endOffset'>, defaultStyle?: ITextStyle, lists?: Record<string, IListData>, document?: Pick<IDocumentData, 'documentStyle' | 'styles'>): ITextFormatPainterSnapshot;
25
+ /** Replace formatting only, preserving text, entity markers and paragraph identities. */
26
+ export declare function buildTextFormatActions(body: IDocumentBody, ranges: ITextRangeParam[], format: ITextFormatPainterSnapshot): TextX;
27
+ interface IApplyTextFormatPainterCommandParams {
28
+ unitId: string;
29
+ ranges: ITextRangeParam[];
30
+ format: ITextFormatPainterSnapshot;
31
+ }
32
+ export declare const ApplyTextFormatPainterCommand: ICommand<IApplyTextFormatPainterCommandParams>;
33
+ export {};
@@ -23,5 +23,6 @@ export interface IDocTableDeleteColumnsCommandParams {
23
23
  export declare const DocTableDeleteColumnsCommand: ICommand<IDocTableDeleteColumnsCommandParams>;
24
24
  export interface IDocTableDeleteTableCommandParams {
25
25
  targetRange?: ITextRangeWithStyle;
26
+ unitId?: string;
26
27
  }
27
28
  export declare const DocTableDeleteTableCommand: ICommand<IDocTableDeleteTableCommandParams>;
@@ -0,0 +1,21 @@
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 { Vector2 } from '@univerjs/engine-render';
17
+ import { Documents } from '@univerjs/engine-render';
18
+ /** Full document pages let whitespace select drawings behind the text. */
19
+ export declare class DocPageRenderComponent extends Documents {
20
+ isHit(coord: Vector2): boolean;
21
+ }
@@ -16,6 +16,7 @@
16
16
  import type { DependencyOverride } from '@univerjs/core';
17
17
  import type { MenuConfig } from '@univerjs/ui';
18
18
  export declare const DOCS_UI_PLUGIN_CONFIG_KEY = "docs-ui.config";
19
+ export declare const DOCS_UI_PLUGIN_NAME = "DOC_UI_PLUGIN";
19
20
  export declare const configSymbol: unique symbol;
20
21
  export type DocFitMode = 'none' | 'fit-width';
21
22
  export type DocFitTarget = 'viewport' | 'container';
@@ -41,3 +42,4 @@ export interface IUniverDocsUIConfig {
41
42
  }
42
43
  export declare const DEFAULT_DOC_FIT_TO_WIDTH_OPTIONS: Required<Omit<IDocFitToWidthOptions, 'maxScale'>> & Pick<IDocFitToWidthOptions, 'maxScale'>;
43
44
  export declare const defaultPluginConfig: IUniverDocsUIConfig;
45
+ export declare const defaultPluginMobileConfig: IUniverDocsUIConfig;
@@ -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
+ export declare const DOC_CARET_MENU_ID = "docs.contextMenu.caret";
17
+ export declare const MOBILE_DOC_PINCH_ZOOMING = "MOBILE_DOC_PINCH_ZOOMING";
@@ -15,24 +15,22 @@
15
15
  */
16
16
  import type { DocumentDataModel } from '@univerjs/core';
17
17
  import type { IRenderContext, IRenderModule } from '@univerjs/engine-render';
18
- import { Disposable, ICommandService, IUniverInstanceService, LocaleService, ThemeService } from '@univerjs/core';
18
+ import { Disposable, ICommandService, LocaleService, ThemeService } from '@univerjs/core';
19
19
  import { DocSkeletonManagerService } from '@univerjs/docs';
20
- import { IRenderManagerService } from '@univerjs/engine-render';
21
20
  import { IEditorService } from '../services/editor/editor-manager.service';
22
21
  import { DocSelectionRenderService } from '../services/selection/doc-selection-render.service';
23
22
  export declare class DocHeaderFooterController extends Disposable implements IRenderModule {
24
23
  private readonly _context;
25
24
  private readonly _commandService;
26
25
  private readonly _editorService;
27
- private readonly _instanceSrv;
28
- private readonly _renderManagerService;
29
26
  private readonly _docSkeletonManagerService;
30
27
  private readonly _docSelectionRenderService;
31
28
  private readonly _localeService;
32
29
  private readonly _themeService;
33
30
  private _loadedMap;
31
+ private _contentCover?;
34
32
  private _headerFooterColors;
35
- constructor(_context: IRenderContext<DocumentDataModel>, _commandService: ICommandService, _editorService: IEditorService, _instanceSrv: IUniverInstanceService, _renderManagerService: IRenderManagerService, _docSkeletonManagerService: DocSkeletonManagerService, _docSelectionRenderService: DocSelectionRenderService, _localeService: LocaleService, _themeService: ThemeService);
33
+ constructor(_context: IRenderContext<DocumentDataModel>, _commandService: ICommandService, _editorService: IEditorService, _docSkeletonManagerService: DocSkeletonManagerService, _docSelectionRenderService: DocSelectionRenderService, _localeService: LocaleService, _themeService: ThemeService);
36
34
  private _initialize;
37
35
  private _initThemeColors;
38
36
  dispose(): void;
@@ -42,7 +40,6 @@ export declare class DocHeaderFooterController extends Disposable implements IRe
42
40
  private _getTransformCoordForDocumentOffset;
43
41
  private _drawHeaderFooterLabel;
44
42
  private _drawHeaderFooterPage;
45
- private _drawHeaderFooterCover;
46
43
  private _drawHeaderFooterGuides;
47
44
  private _isEditorReadOnly;
48
45
  private _isTraditionalMode;
@@ -27,6 +27,7 @@ export declare class DocMoveCursorController extends Disposable {
27
27
  private _commandExecutedListener;
28
28
  private _handleShiftMoveSelection;
29
29
  private _handleMoveCursor;
30
+ private _deferUnmaterializedCursorMove;
30
31
  private _getCursorOffsetByGranularity;
31
32
  private _getParagraphBoundaryOffset;
32
33
  private _getCurrentParagraphStartOffset;
@@ -0,0 +1,23 @@
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 { Disposable, ICommandService, IContextService, IPermissionService, IUniverInstanceService } from '@univerjs/core';
17
+ import { DocSelectionManagerService } from '@univerjs/docs';
18
+ import { FormatPainterSessionService } from '@univerjs/ui';
19
+ import { DocMenuStyleService } from '../services/doc-menu-style.service';
20
+ import { IEditorService } from '../services/editor/editor-manager.service';
21
+ export declare class DocFormatPainterController extends Disposable {
22
+ constructor(session: FormatPainterSessionService, selections: DocSelectionManagerService, styles: DocMenuStyleService, instances: IUniverInstanceService, context: IContextService, permissions: IPermissionService, editors: IEditorService, commands: ICommandService);
23
+ }
@@ -0,0 +1,25 @@
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 { Disposable } from '@univerjs/core';
17
+ import { ComponentManager, IconManager } from '@univerjs/ui';
18
+ export declare class MobileComponentsController extends Disposable {
19
+ protected readonly _componentManager: ComponentManager;
20
+ private readonly _iconManager;
21
+ constructor(_componentManager: ComponentManager, _iconManager: IconManager);
22
+ private _registerParts;
23
+ private _registerIcons;
24
+ protected _registerComponents(): void;
25
+ }
@@ -0,0 +1,29 @@
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 { Disposable, ICommandService, Injector } from '@univerjs/core';
17
+ import { ILayoutService, IMenuManagerService, IUIPartsService } from '@univerjs/ui';
18
+ export declare class DocMobileUIController extends Disposable {
19
+ private readonly _injector;
20
+ private readonly _commandService;
21
+ private readonly _layoutService;
22
+ private readonly _menuManagerService;
23
+ private readonly _uiPartsService;
24
+ constructor(_injector: Injector, _commandService: ICommandService, _layoutService: ILayoutService, _menuManagerService: IMenuManagerService, _uiPartsService: IUIPartsService);
25
+ private _initUiParts;
26
+ private _initMenus;
27
+ private _initFocusHandler;
28
+ private _initCommands;
29
+ }