@univerjs/docs-ui 1.0.4 → 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 (98) hide show
  1. package/README.md +45 -0
  2. package/lib/cjs/index.js +937 -296
  3. package/lib/cjs/locale/ar-SA.js +6 -0
  4. package/lib/cjs/locale/ca-ES.js +6 -0
  5. package/lib/cjs/locale/de-DE.js +6 -0
  6. package/lib/cjs/locale/en-US.js +6 -0
  7. package/lib/cjs/locale/es-ES.js +6 -0
  8. package/lib/cjs/locale/fa-IR.js +6 -0
  9. package/lib/cjs/locale/fr-FR.js +6 -0
  10. package/lib/cjs/locale/id-ID.js +6 -0
  11. package/lib/cjs/locale/it-IT.js +6 -0
  12. package/lib/cjs/locale/ja-JP.js +6 -0
  13. package/lib/cjs/locale/ko-KR.js +6 -0
  14. package/lib/cjs/locale/pl-PL.js +6 -0
  15. package/lib/cjs/locale/pt-BR.js +6 -0
  16. package/lib/cjs/locale/ru-RU.js +6 -0
  17. package/lib/cjs/locale/sk-SK.js +6 -0
  18. package/lib/cjs/locale/vi-VN.js +6 -0
  19. package/lib/cjs/locale/zh-CN.js +6 -0
  20. package/lib/cjs/locale/zh-HK.js +6 -0
  21. package/lib/cjs/locale/zh-TW.js +6 -0
  22. package/lib/es/index.js +918 -283
  23. package/lib/es/locale/ar-SA.js +6 -0
  24. package/lib/es/locale/ca-ES.js +6 -0
  25. package/lib/es/locale/de-DE.js +6 -0
  26. package/lib/es/locale/en-US.js +6 -0
  27. package/lib/es/locale/es-ES.js +6 -0
  28. package/lib/es/locale/fa-IR.js +6 -0
  29. package/lib/es/locale/fr-FR.js +6 -0
  30. package/lib/es/locale/id-ID.js +6 -0
  31. package/lib/es/locale/it-IT.js +6 -0
  32. package/lib/es/locale/ja-JP.js +6 -0
  33. package/lib/es/locale/ko-KR.js +6 -0
  34. package/lib/es/locale/pl-PL.js +6 -0
  35. package/lib/es/locale/pt-BR.js +6 -0
  36. package/lib/es/locale/ru-RU.js +6 -0
  37. package/lib/es/locale/sk-SK.js +6 -0
  38. package/lib/es/locale/vi-VN.js +6 -0
  39. package/lib/es/locale/zh-CN.js +6 -0
  40. package/lib/es/locale/zh-HK.js +6 -0
  41. package/lib/es/locale/zh-TW.js +6 -0
  42. package/lib/index.css +41 -82
  43. package/lib/index.js +918 -283
  44. package/lib/locale/ar-SA.js +6 -0
  45. package/lib/locale/ca-ES.js +6 -0
  46. package/lib/locale/de-DE.js +6 -0
  47. package/lib/locale/en-US.js +6 -0
  48. package/lib/locale/es-ES.js +6 -0
  49. package/lib/locale/fa-IR.js +6 -0
  50. package/lib/locale/fr-FR.js +6 -0
  51. package/lib/locale/id-ID.js +6 -0
  52. package/lib/locale/it-IT.js +6 -0
  53. package/lib/locale/ja-JP.js +6 -0
  54. package/lib/locale/ko-KR.js +6 -0
  55. package/lib/locale/pl-PL.js +6 -0
  56. package/lib/locale/pt-BR.js +6 -0
  57. package/lib/locale/ru-RU.js +6 -0
  58. package/lib/locale/sk-SK.js +6 -0
  59. package/lib/locale/vi-VN.js +6 -0
  60. package/lib/locale/zh-CN.js +6 -0
  61. package/lib/locale/zh-HK.js +6 -0
  62. package/lib/locale/zh-TW.js +6 -0
  63. package/lib/types/config/config.d.ts +5 -0
  64. package/lib/types/index.d.ts +1 -0
  65. package/lib/types/locale/en-US.d.ts +6 -0
  66. package/lib/types/menu/display.menu.d.ts +21 -0
  67. package/lib/types/plugin.d.ts +1 -1
  68. package/lib/types/services/clipboard/clipboard.service.d.ts +1 -1
  69. package/lib/types/services/doc-heading-collapse.service.d.ts +38 -0
  70. package/lib/types/services/doc-paragraph-menu.service.d.ts +12 -3
  71. package/lib/types/services/doc-popup-manager.service.d.ts +4 -1
  72. package/lib/types/services/doc-zoom.d.ts +4 -1
  73. package/lib/types/views/ParagraphMenu.d.ts +2 -2
  74. package/lib/types/views/doc-side-menu-layout.d.ts +17 -0
  75. package/lib/types/views/heading-collapse-shape.d.ts +38 -0
  76. package/lib/types/views/paragraph-setting/hook/utils.d.ts +2 -0
  77. package/lib/umd/facade.js +1 -1
  78. package/lib/umd/index.js +16 -16
  79. package/lib/umd/locale/ar-SA.js +1 -1
  80. package/lib/umd/locale/ca-ES.js +1 -1
  81. package/lib/umd/locale/de-DE.js +1 -1
  82. package/lib/umd/locale/en-US.js +1 -1
  83. package/lib/umd/locale/es-ES.js +1 -1
  84. package/lib/umd/locale/fa-IR.js +1 -1
  85. package/lib/umd/locale/fr-FR.js +1 -1
  86. package/lib/umd/locale/id-ID.js +1 -1
  87. package/lib/umd/locale/it-IT.js +1 -1
  88. package/lib/umd/locale/ja-JP.js +1 -1
  89. package/lib/umd/locale/ko-KR.js +1 -1
  90. package/lib/umd/locale/pl-PL.js +1 -1
  91. package/lib/umd/locale/pt-BR.js +1 -1
  92. package/lib/umd/locale/ru-RU.js +1 -1
  93. package/lib/umd/locale/sk-SK.js +1 -1
  94. package/lib/umd/locale/vi-VN.js +1 -1
  95. package/lib/umd/locale/zh-CN.js +1 -1
  96. package/lib/umd/locale/zh-HK.js +1 -1
  97. package/lib/umd/locale/zh-TW.js +1 -1
  98. package/package.json +15 -15
@@ -36,6 +36,8 @@ const locale = { "docs-ui": {
36
36
  recovering: "جارٍ استعادة تخطيط المستند…"
37
37
  },
38
38
  toolbar: {
39
+ zoom: "التكبير والتصغير",
40
+ fullscreen: "ملء الشاشة",
39
41
  font: "خط",
40
42
  fontSize: "حجم الخط",
41
43
  bold: "غامق",
@@ -214,6 +216,10 @@ const locale = { "docs-ui": {
214
216
  defaultTextColor: "لون النص الافتراضي",
215
217
  noBackground: "بدون خلفية"
216
218
  },
219
+ heading: {
220
+ collapse: "طي",
221
+ expand: "توسيع"
222
+ },
217
223
  "page-settings": {
218
224
  "document-setting": "إعداد المستند",
219
225
  "modern-width": "عرض المحتوى",
@@ -36,6 +36,8 @@ const locale = { "docs-ui": {
36
36
  recovering: "S’està restaurant el disseny del document…"
37
37
  },
38
38
  toolbar: {
39
+ zoom: "Zoom",
40
+ fullscreen: "Pantalla completa",
39
41
  font: "Tipus de lletra",
40
42
  fontSize: "Mida de lletra",
41
43
  bold: "Negreta",
@@ -214,6 +216,10 @@ const locale = { "docs-ui": {
214
216
  defaultTextColor: "Color de text predeterminat",
215
217
  noBackground: "Sense fons"
216
218
  },
219
+ heading: {
220
+ collapse: "Redueix",
221
+ expand: "Expandeix"
222
+ },
217
223
  "page-settings": {
218
224
  "document-setting": "Configuració de document",
219
225
  "modern-width": "Amplada del contingut",
@@ -36,6 +36,8 @@ const locale = { "docs-ui": {
36
36
  recovering: "Dokumentlayout wird wiederhergestellt…"
37
37
  },
38
38
  toolbar: {
39
+ zoom: "Zoom",
40
+ fullscreen: "Vollbild",
39
41
  font: "Schriftart",
40
42
  fontSize: "Schriftgröße",
41
43
  bold: "Fett",
@@ -214,6 +216,10 @@ const locale = { "docs-ui": {
214
216
  defaultTextColor: "Standardtextfarbe",
215
217
  noBackground: "Kein Hintergrund"
216
218
  },
219
+ heading: {
220
+ collapse: "Einklappen",
221
+ expand: "Ausklappen"
222
+ },
217
223
  "page-settings": {
218
224
  "document-setting": "Dokumenteneinstellung",
219
225
  "modern-width": "Inhaltsbreite",
@@ -51,6 +51,8 @@ const locale = { "docs-ui": {
51
51
  recovering: "Restoring document layout…"
52
52
  },
53
53
  toolbar: {
54
+ zoom: "Zoom",
55
+ fullscreen: "Fullscreen",
54
56
  font: "Font",
55
57
  fontSize: "Font size",
56
58
  bold: "Bold",
@@ -229,6 +231,10 @@ const locale = { "docs-ui": {
229
231
  defaultTextColor: "Default text color",
230
232
  noBackground: "No background"
231
233
  },
234
+ heading: {
235
+ collapse: "Collapse",
236
+ expand: "Expand"
237
+ },
232
238
  "page-settings": {
233
239
  "document-setting": "Page Setup",
234
240
  "modern-width": "Content width",
@@ -36,6 +36,8 @@ const locale = { "docs-ui": {
36
36
  recovering: "Restaurando el diseño del documento…"
37
37
  },
38
38
  toolbar: {
39
+ zoom: "Zoom",
40
+ fullscreen: "Pantalla completa",
39
41
  font: "Fuente",
40
42
  fontSize: "Tamaño de fuente",
41
43
  bold: "Negrita",
@@ -214,6 +216,10 @@ const locale = { "docs-ui": {
214
216
  defaultTextColor: "Color de texto predeterminado",
215
217
  noBackground: "Sin fondo"
216
218
  },
219
+ heading: {
220
+ collapse: "Contraer",
221
+ expand: "Expandir"
222
+ },
217
223
  "page-settings": {
218
224
  "document-setting": "Configuración de documento",
219
225
  "modern-width": "Ancho del contenido",
@@ -36,6 +36,8 @@ const locale = { "docs-ui": {
36
36
  recovering: "در حال بازیابی صفحه‌آرایی سند…"
37
37
  },
38
38
  toolbar: {
39
+ zoom: "بزرگ‌نمایی",
40
+ fullscreen: "تمام‌صفحه",
39
41
  font: "فونت",
40
42
  fontSize: "اندازه فونت",
41
43
  bold: "پررنگ",
@@ -214,6 +216,10 @@ const locale = { "docs-ui": {
214
216
  defaultTextColor: "رنگ پیش‌فرض متن",
215
217
  noBackground: "بدون پس‌زمینه"
216
218
  },
219
+ heading: {
220
+ collapse: "جمع کردن",
221
+ expand: "باز کردن"
222
+ },
217
223
  "page-settings": {
218
224
  "document-setting": "تنظیمات سند",
219
225
  "modern-width": "عرض محتوا",
@@ -36,6 +36,8 @@ const locale = { "docs-ui": {
36
36
  recovering: "Restauration de la mise en page du document…"
37
37
  },
38
38
  toolbar: {
39
+ zoom: "Zoom",
40
+ fullscreen: "Plein écran",
39
41
  font: "Police",
40
42
  fontSize: "Taille de la police",
41
43
  bold: "Gras",
@@ -214,6 +216,10 @@ const locale = { "docs-ui": {
214
216
  defaultTextColor: "Couleur de texte par défaut",
215
217
  noBackground: "Aucun arrière-plan"
216
218
  },
219
+ heading: {
220
+ collapse: "Réduire",
221
+ expand: "Développer"
222
+ },
217
223
  "page-settings": {
218
224
  "document-setting": "Paramètres du document",
219
225
  "modern-width": "Largeur du contenu",
@@ -36,6 +36,8 @@ const locale = { "docs-ui": {
36
36
  recovering: "Memulihkan tata letak dokumen…"
37
37
  },
38
38
  toolbar: {
39
+ zoom: "Zoom",
40
+ fullscreen: "Layar penuh",
39
41
  font: "Font",
40
42
  fontSize: "Ukuran font",
41
43
  bold: "Tebal",
@@ -214,6 +216,10 @@ const locale = { "docs-ui": {
214
216
  defaultTextColor: "Warna teks default",
215
217
  noBackground: "Tanpa latar belakang"
216
218
  },
219
+ heading: {
220
+ collapse: "Ciutkan",
221
+ expand: "Perluas"
222
+ },
217
223
  "page-settings": {
218
224
  "document-setting": "Pengaturan Dokumen",
219
225
  "modern-width": "Lebar konten",
@@ -36,6 +36,8 @@ const locale = { "docs-ui": {
36
36
  recovering: "Ripristino del layout del documento…"
37
37
  },
38
38
  toolbar: {
39
+ zoom: "Zoom",
40
+ fullscreen: "Schermo intero",
39
41
  font: "Carattere",
40
42
  fontSize: "Dimensione carattere",
41
43
  bold: "Grassetto",
@@ -214,6 +216,10 @@ const locale = { "docs-ui": {
214
216
  defaultTextColor: "Colore testo predefinito",
215
217
  noBackground: "Nessuno sfondo"
216
218
  },
219
+ heading: {
220
+ collapse: "Comprimi",
221
+ expand: "Espandi"
222
+ },
217
223
  "page-settings": {
218
224
  "document-setting": "Impostazione Documento",
219
225
  "modern-width": "Larghezza contenuto",
@@ -36,6 +36,8 @@ const locale = { "docs-ui": {
36
36
  recovering: "ドキュメントのレイアウトを復元しています…"
37
37
  },
38
38
  toolbar: {
39
+ zoom: "ズーム",
40
+ fullscreen: "全画面表示",
39
41
  font: "フォント",
40
42
  fontSize: "フォントサイズ",
41
43
  bold: "太字",
@@ -214,6 +216,10 @@ const locale = { "docs-ui": {
214
216
  defaultTextColor: "デフォルトの文字色",
215
217
  noBackground: "背景なし"
216
218
  },
219
+ heading: {
220
+ collapse: "折りたたむ",
221
+ expand: "展開する"
222
+ },
217
223
  "page-settings": {
218
224
  "document-setting": "文書設定",
219
225
  "modern-width": "コンテンツ幅",
@@ -36,6 +36,8 @@ const locale = { "docs-ui": {
36
36
  recovering: "문서 레이아웃을 복구하는 중…"
37
37
  },
38
38
  toolbar: {
39
+ zoom: "확대/축소",
40
+ fullscreen: "전체 화면",
39
41
  font: "글꼴",
40
42
  fontSize: "글꼴 크기",
41
43
  bold: "굵게",
@@ -214,6 +216,10 @@ const locale = { "docs-ui": {
214
216
  defaultTextColor: "기본 텍스트 색상",
215
217
  noBackground: "배경 없음"
216
218
  },
219
+ heading: {
220
+ collapse: "접기",
221
+ expand: "펼치기"
222
+ },
217
223
  "page-settings": {
218
224
  "document-setting": "문서 설정",
219
225
  "modern-width": "콘텐츠 너비",
@@ -36,6 +36,8 @@ const locale = { "docs-ui": {
36
36
  recovering: "Przywracanie układu dokumentu…"
37
37
  },
38
38
  toolbar: {
39
+ zoom: "Powiększenie",
40
+ fullscreen: "Pełny ekran",
39
41
  font: "Czcionka",
40
42
  fontSize: "Rozmiar czcionki",
41
43
  bold: "Pogrubienie",
@@ -214,6 +216,10 @@ const locale = { "docs-ui": {
214
216
  defaultTextColor: "Domyślny kolor tekstu",
215
217
  noBackground: "Brak tła"
216
218
  },
219
+ heading: {
220
+ collapse: "Zwiń",
221
+ expand: "Rozwiń"
222
+ },
217
223
  "page-settings": {
218
224
  "document-setting": "Ustawienia dokumentu",
219
225
  "modern-width": "Szerokość treści",
@@ -36,6 +36,8 @@ const locale = { "docs-ui": {
36
36
  recovering: "Restaurando o layout do documento…"
37
37
  },
38
38
  toolbar: {
39
+ zoom: "Zoom",
40
+ fullscreen: "Tela cheia",
39
41
  font: "Fonte",
40
42
  fontSize: "Tamanho da fonte",
41
43
  bold: "Negrito",
@@ -214,6 +216,10 @@ const locale = { "docs-ui": {
214
216
  defaultTextColor: "Cor de texto padrão",
215
217
  noBackground: "Sem plano de fundo"
216
218
  },
219
+ heading: {
220
+ collapse: "Recolher",
221
+ expand: "Expandir"
222
+ },
217
223
  "page-settings": {
218
224
  "document-setting": "Configuração do documento",
219
225
  "modern-width": "Largura do conteúdo",
@@ -36,6 +36,8 @@ const locale = { "docs-ui": {
36
36
  recovering: "Восстановление макета документа…"
37
37
  },
38
38
  toolbar: {
39
+ zoom: "Масштаб",
40
+ fullscreen: "Полноэкранный режим",
39
41
  font: "Шрифт",
40
42
  fontSize: "Размер шрифта",
41
43
  bold: "Полужирный",
@@ -214,6 +216,10 @@ const locale = { "docs-ui": {
214
216
  defaultTextColor: "Цвет текста по умолчанию",
215
217
  noBackground: "Без фона"
216
218
  },
219
+ heading: {
220
+ collapse: "Свернуть",
221
+ expand: "Развернуть"
222
+ },
217
223
  "page-settings": {
218
224
  "document-setting": "Настройки документа",
219
225
  "modern-width": "Ширина содержимого",
@@ -36,6 +36,8 @@ const locale = { "docs-ui": {
36
36
  recovering: "Obnovuje sa rozloženie dokumentu…"
37
37
  },
38
38
  toolbar: {
39
+ zoom: "Priblíženie",
40
+ fullscreen: "Celá obrazovka",
39
41
  font: "Písmo",
40
42
  fontSize: "Veľkosť písma",
41
43
  bold: "Tučné",
@@ -214,6 +216,10 @@ const locale = { "docs-ui": {
214
216
  defaultTextColor: "Predvolená farba textu",
215
217
  noBackground: "Bez pozadia"
216
218
  },
219
+ heading: {
220
+ collapse: "Zbaliť",
221
+ expand: "Rozbaliť"
222
+ },
217
223
  "page-settings": {
218
224
  "document-setting": "Nastavenia dokumentu",
219
225
  "modern-width": "Šírka obsahu",
@@ -36,6 +36,8 @@ const locale = { "docs-ui": {
36
36
  recovering: "Đang khôi phục bố cục tài liệu…"
37
37
  },
38
38
  toolbar: {
39
+ zoom: "Thu phóng",
40
+ fullscreen: "Toàn màn hình",
39
41
  font: "Phông chữ",
40
42
  fontSize: "Cỡ chữ",
41
43
  bold: "In đậm",
@@ -214,6 +216,10 @@ const locale = { "docs-ui": {
214
216
  defaultTextColor: "Màu văn bản mặc định",
215
217
  noBackground: "Không có nền"
216
218
  },
219
+ heading: {
220
+ collapse: "Thu gọn",
221
+ expand: "Mở rộng"
222
+ },
217
223
  "page-settings": {
218
224
  "document-setting": "Cài đặt tài liệu",
219
225
  "modern-width": "Độ rộng nội dung",
@@ -36,6 +36,8 @@ const locale = { "docs-ui": {
36
36
  recovering: "正在恢复文档排版…"
37
37
  },
38
38
  toolbar: {
39
+ zoom: "缩放",
40
+ fullscreen: "全屏",
39
41
  font: "字体",
40
42
  fontSize: "字号",
41
43
  bold: "粗体",
@@ -214,6 +216,10 @@ const locale = { "docs-ui": {
214
216
  defaultTextColor: "默认文字颜色",
215
217
  noBackground: "无背景色"
216
218
  },
219
+ heading: {
220
+ collapse: "收起",
221
+ expand: "展开"
222
+ },
217
223
  "page-settings": {
218
224
  "document-setting": "页面设置",
219
225
  "modern-width": "内容宽度",
@@ -36,6 +36,8 @@ const locale = { "docs-ui": {
36
36
  recovering: "正在恢復文件排版…"
37
37
  },
38
38
  toolbar: {
39
+ zoom: "縮放",
40
+ fullscreen: "全螢幕",
39
41
  font: "字型",
40
42
  fontSize: "字號",
41
43
  bold: "粗體",
@@ -214,6 +216,10 @@ const locale = { "docs-ui": {
214
216
  defaultTextColor: "預設文字顏色",
215
217
  noBackground: "無背景色"
216
218
  },
219
+ heading: {
220
+ collapse: "收合",
221
+ expand: "展開"
222
+ },
217
223
  "page-settings": {
218
224
  "document-setting": "文件設定",
219
225
  "modern-width": "內容寬度",
@@ -36,6 +36,8 @@ const locale = { "docs-ui": {
36
36
  recovering: "正在復原文件排版…"
37
37
  },
38
38
  toolbar: {
39
+ zoom: "縮放",
40
+ fullscreen: "全螢幕",
39
41
  font: "字體",
40
42
  fontSize: "字號",
41
43
  bold: "粗體",
@@ -214,6 +216,10 @@ const locale = { "docs-ui": {
214
216
  defaultTextColor: "預設文字顏色",
215
217
  noBackground: "無背景色"
216
218
  },
219
+ heading: {
220
+ collapse: "收合",
221
+ expand: "展開"
222
+ },
217
223
  "page-settings": {
218
224
  "document-setting": "文件設定",
219
225
  "modern-width": "內容寬度",
@@ -33,6 +33,11 @@ export interface IDocFitToWidthOptions {
33
33
  export interface IUniverDocsUIConfig {
34
34
  menu?: MenuConfig;
35
35
  container?: HTMLElement | string;
36
+ /**
37
+ * Show the left-hand document outline for heading navigation.
38
+ * When omitted, enabled for modern documents and disabled for traditional documents.
39
+ * Explicit `true` or `false` overrides the default in either document mode.
40
+ */
36
41
  toc?: boolean;
37
42
  footer?: boolean;
38
43
  wordCount?: boolean;
@@ -81,6 +81,7 @@ export { scrollDocsTableLikeCustomBlockLive } from './embed-docs-custom-block-sc
81
81
  export type { IDocsTableLikeCustomBlockScrollOptions } from './embed-docs-custom-block-scroll';
82
82
  export { resolveDocsCustomBlockRenderViewport } from './embed-host-anchor';
83
83
  export type { IDocsCustomBlockLayoutViewport, IDocsCustomBlockRenderViewportParams } from './embed-host-anchor';
84
+ export { ParagraphSettingMenuFactory } from './menu/context-menu';
84
85
  export { AlignMenuItemFactory, BackgroundColorSelectorMenuItemFactory, BoldMenuItemFactory, disableMenuWhenHeaderFooterEditing, disableMenuWithoutDocumentUnitPermission, FLOAT_TEXT_STYLE_MENU_ID, FLOAT_TOOLBAR_MENU_POSITION, FloatTextStyleMenuItemFactory, FontFamilySelectorMenuItemFactory, FontSizeSelectorMenuItemFactory, hideMenuWhenSelectionInBlockRange, isTextRangeInAnyBlockRange, ItalicMenuItemFactory, StrikeThroughMenuItemFactory, TextColorSelectorMenuItemFactory, UnderlineMenuItemFactory, } from './menu/menu';
85
86
  export { DOC_CONTENT_INSERT_MENU_ID, DOC_PARAGRAPH_T_ALIGN_MENU_ID, DOC_PARAGRAPH_T_COLORS_MENU_ID, DOC_PARAGRAPH_T_DIVIDER_MENU_ID, DOC_PARAGRAPH_T_EDIT_MENU_ID, DOC_PARAGRAPH_T_INSERT_BELOW_MENU_ID, DOC_PARAGRAPH_T_INSERT_MENU_ID, DOC_TABLE_BLOCK_MENU_ID, EMPTY_PARAGRAPH_MENU_ID, getDocBlockRangeMenuId, INSERT_BELLOW_MENU_ID, ParagraphMenuInsertBelowSubmenuItemFactory, } from './menu/paragraph-menu';
86
87
  export { menuSchema as DocsUIMenuSchema } from './menu/schema';
@@ -53,6 +53,8 @@ declare const locale: {
53
53
  recovering: string;
54
54
  };
55
55
  toolbar: {
56
+ zoom: string;
57
+ fullscreen: string;
56
58
  font: string;
57
59
  fontSize: string;
58
60
  bold: string;
@@ -237,6 +239,10 @@ declare const locale: {
237
239
  defaultTextColor: string;
238
240
  noBackground: string;
239
241
  };
242
+ heading: {
243
+ collapse: string;
244
+ expand: string;
245
+ };
240
246
  'page-settings': {
241
247
  'document-setting': string;
242
248
  'modern-width': string;
@@ -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 { IAccessor } from '@univerjs/core';
17
+ import type { IMenuButtonItem, IMenuSelectorItem } from '@univerjs/ui';
18
+ import type { LocaleKey } from '../locale/types';
19
+ export declare const DOC_ZOOM_RATIO_MENU_ID = "doc.menu.zoom-ratio";
20
+ export declare function DocZoomRatioMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<LocaleKey, number>;
21
+ export declare function DocFullscreenMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
@@ -13,9 +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 { IUniverDocsUIConfig } from './config/config';
17
16
  import { ICommandService, IConfigService, Injector, Plugin } from '@univerjs/core';
18
17
  import { IRenderManagerService } from '@univerjs/engine-render';
18
+ import type { IUniverDocsUIConfig } from './config/config';
19
19
  export declare class UniverDocsUIPlugin extends Plugin {
20
20
  private readonly _config;
21
21
  _injector: Injector;
@@ -16,10 +16,10 @@
16
16
  import type { IDisposable, IDocumentBody, IDocumentData } from '@univerjs/core';
17
17
  import type { IRectRangeWithStyle, ITextRangeWithStyle } from '@univerjs/engine-render';
18
18
  import type { Observable } from 'rxjs';
19
- import type { DocPasteMode } from './paste-options';
20
19
  import { Disposable, ErrorService, ICommandService, ILogService, ImageSourceType, IPermissionService, IUndoRedoService, IUniverInstanceService, SliceBodyType } from '@univerjs/core';
21
20
  import { DocSelectionManagerService, DocStateChangeManagerService } from '@univerjs/docs';
22
21
  import { IClipboardInterfaceService } from '@univerjs/ui';
22
+ import type { DocPasteMode } from './paste-options';
23
23
  import { DocMenuStyleService } from '../doc-menu-style.service';
24
24
  import { DocHtmlExportService } from './udm-to-html/doc-html-export.service';
25
25
  export declare function convertClipboardHtmlToDocumentData(html: string, unitId?: string): Partial<IDocumentData>;
@@ -0,0 +1,38 @@
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 } from '@univerjs/core';
17
+ import type { IRenderContext, IRenderModule } from '@univerjs/engine-render';
18
+ import { Disposable, ICommandService, LocaleService, ThemeService } from '@univerjs/core';
19
+ import { DocSelectionManagerService, DocSkeletonManagerService } from '@univerjs/docs';
20
+ import { ILayoutService } from '@univerjs/ui';
21
+ import { DocEventManagerService } from './doc-event-manager.service';
22
+ export declare class DocHeadingCollapseService extends Disposable implements IRenderModule {
23
+ private readonly _context;
24
+ private readonly _skeletonManager;
25
+ private readonly _eventManager;
26
+ private readonly _selections;
27
+ private readonly _commandService;
28
+ private readonly _layoutService;
29
+ private readonly _buttons;
30
+ private _colors;
31
+ private _expandLabel;
32
+ private _collapseLabel;
33
+ constructor(_context: IRenderContext<DocumentDataModel>, _skeletonManager: DocSkeletonManagerService, _eventManager: DocEventManagerService, _selections: DocSelectionManagerService, _commandService: ICommandService, _layoutService: ILayoutService, themeService: ThemeService, localeService: LocaleService);
34
+ private _getColors;
35
+ private _normalizeSelection;
36
+ private _update;
37
+ dispose(): void;
38
+ }
@@ -15,9 +15,9 @@
15
15
  */
16
16
  import type { DocumentDataModel, ICustomBlock, ICustomTable, IDocumentBlockRange } from '@univerjs/core';
17
17
  import type { IBoundRectNoAngle, IRenderContext, IRenderModule } from '@univerjs/engine-render';
18
- import type { IMutiPageParagraphBound, ITableBound } from './doc-event-manager.service';
19
18
  import { Disposable, DocumentBlockType, IContextService, IPermissionService } from '@univerjs/core';
20
19
  import { DocSelectionManagerService, DocSkeletonManagerService } from '@univerjs/docs';
20
+ import type { IMutiPageParagraphBound, ITableBound } from './doc-event-manager.service';
21
21
  import { DocEventManagerService } from './doc-event-manager.service';
22
22
  import { DocLayoutInteractionService } from './doc-layout-interaction.service';
23
23
  import { DocCanvasPopManagerService } from './doc-popup-manager.service';
@@ -75,6 +75,11 @@ export declare class DocParagraphMenuService extends Disposable implements IRend
75
75
  private _paragraphMenu;
76
76
  private readonly _activeTarget$;
77
77
  readonly activeTarget$: import("rxjs").Observable<IDocBlockMenuTarget | null>;
78
+ private _focusedTableMenu;
79
+ private readonly _focusedTableTarget$;
80
+ readonly focusedTableTarget$: import("rxjs").Observable<IDocBlockMenuTarget | null>;
81
+ private readonly _focusedTableMenuDismiss$;
82
+ readonly focusedTableMenuDismiss$: import("rxjs").Observable<void>;
78
83
  private readonly _slashMenuRequest$;
79
84
  readonly slashMenuRequest$: import("rxjs").Observable<IDocSlashMenuRequest | null>;
80
85
  private _isBlockMenuDragging;
@@ -84,6 +89,7 @@ export declare class DocParagraphMenuService extends Disposable implements IRend
84
89
  private _dragInteraction;
85
90
  get activeParagraph(): IMutiPageParagraphBound | undefined;
86
91
  get activeTarget(): IDocBlockMenuTarget | null;
92
+ get focusedTableTarget(): IDocBlockMenuTarget | null;
87
93
  setBlockMenuDragging(isDragging: boolean): void;
88
94
  get isBlockMenuDragging(): boolean;
89
95
  constructor(_context: IRenderContext<DocumentDataModel>, _docSelectionManagerService: DocSelectionManagerService, _docEventManagerService: DocEventManagerService, _docPopupManagerService: DocCanvasPopManagerService, _docSkeletonManagerService: DocSkeletonManagerService, _floatMenuService: DocFloatMenuService, _docSelectionRenderService: DocSelectionRenderService, _permissionService: IPermissionService, _docLayoutInteractionService: DocLayoutInteractionService, _contextService: IContextService);
@@ -92,7 +98,7 @@ export declare class DocParagraphMenuService extends Disposable implements IRend
92
98
  private _hasExpandedSelectionRanges;
93
99
  private _hasExpandedTextSelection;
94
100
  private _hasExpandedSelection;
95
- setParagraphMenuActive(active: boolean): void;
101
+ setParagraphMenuActive(active: boolean, focusedTable?: boolean): void;
96
102
  private _init;
97
103
  private _handleSlashMenuKeydown;
98
104
  private _handleSlashMenuInputBefore;
@@ -103,13 +109,16 @@ export declare class DocParagraphMenuService extends Disposable implements IRend
103
109
  private _getSlashMenuParagraph;
104
110
  private _getSlashMenuAnchorRect;
105
111
  showParagraphMenu(paragraph: IMutiPageParagraphBound): void;
106
- showTableMenu(tableBound: ITableBound): void;
112
+ showTableMenu(tableBound: ITableBound, focused?: boolean): void;
113
+ private _showHoverTableMenu;
114
+ private _showFocusedTableMenu;
107
115
  private _shouldKeepCurrentCellMenuForTable;
108
116
  getDropTargetFromClientPoint(clientX: number, clientY: number, sourceRange: {
109
117
  startOffset: number;
110
118
  endOffset: number;
111
119
  }): IDocBlockDropTarget | null;
112
120
  hideParagraphMenu(force?: boolean): void;
121
+ hideFocusedTableMenu(): void;
113
122
  private _canEditDocument;
114
123
  dispose(): void;
115
124
  private _buildParagraphMenuTarget;
@@ -16,6 +16,7 @@
16
16
  import type { INeedCheckDisposable, ITextRangeParam } from '@univerjs/core';
17
17
  import type { BaseObject, IBoundRectNoAngle, IRender, Scene } from '@univerjs/engine-render';
18
18
  import type { IPopup } from '@univerjs/ui';
19
+ import type { Observable } from 'rxjs';
19
20
  import { Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
20
21
  import { IRenderManagerService } from '@univerjs/engine-render';
21
22
  import { ICanvasPopupService } from '@univerjs/ui';
@@ -29,6 +30,8 @@ export declare function transformOffset2Bound(offsetX: number, offsetY: number,
29
30
  y: number;
30
31
  };
31
32
  export interface IDocCanvasPopup extends Omit<IPopup, 'anchorRect$' | 'children' | 'unitId' | 'subUnitId' | 'canvasElement'> {
33
+ /** Notify when a business-owned rect changes independently of scene transforms. */
34
+ positionChanges$?: Observable<unknown>;
32
35
  /** Defaults to true. Passive hover affordances can track layout without holding it. */
33
36
  requiresStableLayout?: boolean;
34
37
  mask?: boolean;
@@ -45,7 +48,7 @@ export declare class DocCanvasPopManagerService extends Disposable {
45
48
  private readonly _commandService;
46
49
  private readonly _popupCountByUnit;
47
50
  private readonly _popupUnits$;
48
- readonly popupUnits$: import("rxjs").Observable<ReadonlySet<string>>;
51
+ readonly popupUnits$: Observable<ReadonlySet<string>>;
49
52
  constructor(_globalPopupManagerService: ICanvasPopupService, _renderManagerService: IRenderManagerService, _univerInstanceService: IUniverInstanceService, _commandService: ICommandService);
50
53
  dispose(): void;
51
54
  private _beginPopupActivity;
@@ -13,8 +13,11 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import type { DocumentDataModel } from '@univerjs/core';
16
+ import type { DocumentDataModel, ICommandService, IUniverInstanceService } from '@univerjs/core';
17
+ import { Observable } from 'rxjs';
17
18
  export declare const DEFAULT_MODERN_DOC_ZOOM_RATIO = 1;
19
+ export declare const DOC_ZOOM_SHORTCUTS: number[];
18
20
  type DocZoomSource = Pick<DocumentDataModel, 'getSettings' | 'getSnapshot'>;
19
21
  export declare function getDocEffectiveZoomRatio(documentModel: DocZoomSource): number;
22
+ export declare function getDocZoomRatio$(commandService: ICommandService, instanceService: IUniverInstanceService): Observable<number>;
20
23
  export {};
@@ -18,10 +18,10 @@ import type { IDocBlockMoveValidationContext } from '@univerjs/docs';
18
18
  import type { ITextRangeWithStyle } from '@univerjs/engine-render';
19
19
  import type { IPopup, IValueOption } from '@univerjs/ui';
20
20
  import type { CSSProperties } from 'react';
21
- import type { IMutiPageParagraphBound } from '../services/doc-event-manager.service';
22
- import type { IDocBlockMenuTarget } from '../services/doc-paragraph-menu.service';
23
21
  import { NamedStyleType } from '@univerjs/core';
24
22
  import { DocBlockMoveValidatorService } from '@univerjs/docs';
23
+ import type { IMutiPageParagraphBound } from '../services/doc-event-manager.service';
24
+ import type { IDocBlockMenuTarget } from '../services/doc-paragraph-menu.service';
25
25
  import { DocParagraphMenuService } from '../services/doc-paragraph-menu.service';
26
26
  export declare function getParagraphMenuPopupDirection(anchorLeft: number, menuWidth?: number, viewportPadding?: number, options?: {
27
27
  anchorRight?: number;
@@ -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 { IBoundRectNoAngle, IDocsTableRenderViewport } from '@univerjs/engine-render';
17
+ export declare function isDocSideMenuTableOverlapping(outline: IBoundRectNoAngle, table: IBoundRectNoAngle, viewport: IDocsTableRenderViewport | null): boolean;