@univerjs/docs-ui 0.25.1 → 1.0.0-alpha.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/lib/cjs/facade.js +23 -183
  2. package/lib/cjs/index.js +9004 -6506
  3. package/lib/cjs/locale/ar-SA.js +35 -1
  4. package/lib/cjs/locale/ca-ES.js +35 -1
  5. package/lib/cjs/locale/de-DE.js +35 -1
  6. package/lib/cjs/locale/en-US.js +35 -1
  7. package/lib/cjs/locale/es-ES.js +35 -1
  8. package/lib/cjs/locale/fa-IR.js +35 -1
  9. package/lib/cjs/locale/fr-FR.js +35 -1
  10. package/lib/cjs/locale/id-ID.js +35 -1
  11. package/lib/cjs/locale/it-IT.js +35 -1
  12. package/lib/cjs/locale/ja-JP.js +35 -1
  13. package/lib/cjs/locale/ko-KR.js +35 -1
  14. package/lib/cjs/locale/pl-PL.js +35 -1
  15. package/lib/cjs/locale/pt-BR.js +35 -1
  16. package/lib/cjs/locale/ru-RU.js +35 -1
  17. package/lib/cjs/locale/sk-SK.js +35 -1
  18. package/lib/cjs/locale/vi-VN.js +35 -1
  19. package/lib/cjs/locale/zh-CN.js +35 -1
  20. package/lib/cjs/locale/zh-HK.js +35 -1
  21. package/lib/cjs/locale/zh-TW.js +35 -1
  22. package/lib/es/facade.js +25 -178
  23. package/lib/es/index.js +8919 -6452
  24. package/lib/es/locale/ar-SA.js +35 -1
  25. package/lib/es/locale/ca-ES.js +35 -1
  26. package/lib/es/locale/de-DE.js +35 -1
  27. package/lib/es/locale/en-US.js +35 -1
  28. package/lib/es/locale/es-ES.js +35 -1
  29. package/lib/es/locale/fa-IR.js +35 -1
  30. package/lib/es/locale/fr-FR.js +35 -1
  31. package/lib/es/locale/id-ID.js +35 -1
  32. package/lib/es/locale/it-IT.js +35 -1
  33. package/lib/es/locale/ja-JP.js +35 -1
  34. package/lib/es/locale/ko-KR.js +35 -1
  35. package/lib/es/locale/pl-PL.js +35 -1
  36. package/lib/es/locale/pt-BR.js +35 -1
  37. package/lib/es/locale/ru-RU.js +35 -1
  38. package/lib/es/locale/sk-SK.js +35 -1
  39. package/lib/es/locale/vi-VN.js +35 -1
  40. package/lib/es/locale/zh-CN.js +35 -1
  41. package/lib/es/locale/zh-HK.js +35 -1
  42. package/lib/es/locale/zh-TW.js +35 -1
  43. package/lib/facade.js +25 -178
  44. package/lib/index.css +25 -35
  45. package/lib/index.js +8919 -6452
  46. package/lib/locale/ar-SA.js +35 -1
  47. package/lib/locale/ca-ES.js +35 -1
  48. package/lib/locale/de-DE.js +35 -1
  49. package/lib/locale/en-US.js +35 -1
  50. package/lib/locale/es-ES.js +35 -1
  51. package/lib/locale/fa-IR.js +35 -1
  52. package/lib/locale/fr-FR.js +35 -1
  53. package/lib/locale/id-ID.js +35 -1
  54. package/lib/locale/it-IT.js +35 -1
  55. package/lib/locale/ja-JP.js +35 -1
  56. package/lib/locale/ko-KR.js +35 -1
  57. package/lib/locale/pl-PL.js +35 -1
  58. package/lib/locale/pt-BR.js +35 -1
  59. package/lib/locale/ru-RU.js +35 -1
  60. package/lib/locale/sk-SK.js +35 -1
  61. package/lib/locale/vi-VN.js +35 -1
  62. package/lib/locale/zh-CN.js +35 -1
  63. package/lib/locale/zh-HK.js +35 -1
  64. package/lib/locale/zh-TW.js +35 -1
  65. package/lib/types/commands/commands/doc-delete.command.d.ts +1 -1
  66. package/lib/types/commands/commands/inline-format.command.d.ts +3 -1
  67. package/lib/types/commands/commands/table/doc-table-create.command.d.ts +31 -1
  68. package/lib/types/commands/operations/doc-cursor.operation.d.ts +2 -0
  69. package/lib/types/commands/util.d.ts +1 -2
  70. package/lib/types/config/config.d.ts +15 -0
  71. package/lib/types/controllers/components.controller.d.ts +25 -0
  72. package/lib/types/controllers/doc-header-footer.controller.d.ts +1 -4
  73. package/lib/types/controllers/doc-move-cursor.controller.d.ts +36 -1
  74. package/lib/types/controllers/doc-paragraph-setting.controller.d.ts +2 -4
  75. package/lib/types/controllers/doc-table.controller.d.ts +1 -4
  76. package/lib/types/controllers/render-controllers/doc-paragraph-placeholder.render-controller.d.ts +51 -0
  77. package/lib/types/controllers/render-controllers/doc.render-controller.d.ts +5 -2
  78. package/lib/types/controllers/render-controllers/zoom.render-controller.d.ts +3 -1
  79. package/lib/types/controllers/{doc-ui.controller.d.ts → ui.controller.d.ts} +2 -4
  80. package/lib/types/facade/f-document.d.ts +11 -43
  81. package/lib/types/facade/index.d.ts +2 -3
  82. package/lib/types/index.d.ts +41 -26
  83. package/lib/types/locale/en-US.d.ts +34 -0
  84. package/lib/types/{views/side-menu/index.d.ts → locale/types.d.ts} +3 -1
  85. package/lib/types/menu/context-menu.d.ts +15 -14
  86. package/lib/types/menu/menu.d.ts +31 -29
  87. package/lib/types/menu/paragraph-menu.d.ts +68 -38
  88. package/lib/types/services/clipboard/clipboard.service.d.ts +3 -2
  89. package/lib/types/services/clipboard/html-to-udm/converter.d.ts +1 -0
  90. package/lib/types/services/clipboard/udm-to-html/convertor.d.ts +3 -0
  91. package/lib/types/services/clipboard/udm-to-html/doc-html-export.service.d.ts +23 -0
  92. package/lib/types/services/doc-event-manager.service.d.ts +15 -0
  93. package/lib/types/services/doc-ime-state-change-interceptor.service.d.ts +23 -0
  94. package/lib/types/services/doc-page-layout.service.d.ts +3 -1
  95. package/lib/types/services/doc-paragraph-menu.service.d.ts +28 -5
  96. package/lib/types/services/doc-render-background.d.ts +29 -0
  97. package/lib/types/services/doc-view-scale.d.ts +54 -0
  98. package/lib/types/services/doc-zoom.d.ts +20 -0
  99. package/lib/types/services/docs-render.service.d.ts +5 -2
  100. package/lib/types/services/editor/editor-manager.service.d.ts +8 -1
  101. package/lib/types/services/index.d.ts +2 -0
  102. package/lib/types/services/selection/selection-utils.d.ts +0 -15
  103. package/lib/types/services/{doc-content-insert.service.d.ts → selection/word-boundary.d.ts} +4 -10
  104. package/lib/types/shortcuts/core-editing.shortcut.d.ts +1 -0
  105. package/lib/types/shortcuts/cursor.shortcut.d.ts +16 -0
  106. package/lib/types/shortcuts/heading.shortcut.d.ts +22 -0
  107. package/lib/types/{types/delete-direction.d.ts → views/DocSideMenu.d.ts} +1 -4
  108. package/lib/types/views/Icon.d.ts +49 -0
  109. package/lib/types/views/{page-settings/index.d.ts → PageSettings.d.ts} +1 -1
  110. package/lib/types/views/ParagraphMenu.d.ts +74 -0
  111. package/lib/types/views/{rich-text-editor/index.d.ts → RichTextEditor.d.ts} +3 -3
  112. package/lib/types/{components/side-menu/index.d.ts → views/SideMenu.d.ts} +4 -3
  113. package/lib/types/views/count-bar/CountBar.d.ts +1 -1
  114. package/lib/types/views/count-bar/ZoomSlider.d.ts +1 -1
  115. package/lib/types/views/doc-footer/DocFooter.d.ts +1 -1
  116. package/lib/types/views/float-toolbar/FloatToolbar.d.ts +25 -0
  117. package/lib/types/{components → views}/float-toolbar/FloatToolbar.stories.d.ts +1 -1
  118. package/lib/types/views/header-footer/panel/DocHeaderFooterOptions.d.ts +1 -1
  119. package/lib/types/views/header-footer/panel/DocHeaderFooterPanel.d.ts +1 -1
  120. package/lib/types/{components → views}/list-type-picker/Picker.d.ts +3 -3
  121. package/lib/types/{components/float-toolbar/FloatToolbar.d.ts → views/paragraph-menu/component-keys.d.ts} +2 -5
  122. package/lib/types/views/paragraph-menu/theme-color.d.ts +17 -0
  123. package/lib/types/views/paragraph-setting/Setting.d.ts +1 -1
  124. package/lib/types/views/paragraph-setting/index.d.ts +1 -1
  125. package/lib/types/views/paragraph-setting/line-spacing.d.ts +51 -0
  126. package/lib/types/views/rich-text-editor/hooks/editor-undo-redo-keyboard.d.ts +32 -0
  127. package/lib/types/views/rich-text-editor/hooks/index.d.ts +1 -0
  128. package/lib/types/views/rich-text-editor/hooks/use-editor-click-outside.d.ts +2 -1
  129. package/lib/types/{components → views}/side-menu/SideMenu.stories.d.ts +5 -5
  130. package/lib/types/views/table/create/TableCreate.d.ts +1 -1
  131. package/lib/umd/facade.js +1 -5
  132. package/lib/umd/index.js +11 -26
  133. package/lib/umd/locale/ar-SA.js +1 -1
  134. package/lib/umd/locale/ca-ES.js +1 -1
  135. package/lib/umd/locale/de-DE.js +1 -1
  136. package/lib/umd/locale/en-US.js +1 -1
  137. package/lib/umd/locale/es-ES.js +1 -1
  138. package/lib/umd/locale/fa-IR.js +1 -1
  139. package/lib/umd/locale/fr-FR.js +1 -1
  140. package/lib/umd/locale/id-ID.js +1 -1
  141. package/lib/umd/locale/it-IT.js +1 -1
  142. package/lib/umd/locale/ja-JP.js +1 -1
  143. package/lib/umd/locale/ko-KR.js +1 -1
  144. package/lib/umd/locale/pl-PL.js +1 -1
  145. package/lib/umd/locale/pt-BR.js +1 -1
  146. package/lib/umd/locale/ru-RU.js +1 -1
  147. package/lib/umd/locale/sk-SK.js +1 -1
  148. package/lib/umd/locale/vi-VN.js +1 -1
  149. package/lib/umd/locale/zh-CN.js +1 -1
  150. package/lib/umd/locale/zh-HK.js +1 -1
  151. package/lib/umd/locale/zh-TW.js +1 -1
  152. package/package.json +12 -12
  153. package/lib/types/commands/commands/core-editing.command.d.ts +0 -58
  154. package/lib/types/components/paragraph-menu/index.d.ts +0 -41
  155. package/lib/types/facade/f-univer.d.ts +0 -52
  156. package/lib/types/services/doc-state-change-manager.service.d.ts +0 -50
  157. /package/lib/types/{components → views}/const.d.ts +0 -0
  158. /package/lib/types/{components → views}/editor/utils.d.ts +0 -0
  159. /package/lib/types/{components → views}/list-type-picker/index.d.ts +0 -0
@@ -30,7 +30,18 @@ const locale = { "docs-ui": {
30
30
  alignJustify: "Wyjustuj",
31
31
  horizontalLine: "Linia pozioma",
32
32
  headerFooter: "Nagłówek i stopka",
33
- pageSetup: "Ustawienia strony"
33
+ pageSetup: "Ustawienia strony",
34
+ heading: {
35
+ tooltip: "Heading",
36
+ normal: "Normal text",
37
+ leading1: "Heading 1",
38
+ leading2: "Heading 2",
39
+ leading3: "Heading 3",
40
+ leading4: "Heading 4",
41
+ leading5: "Heading 5",
42
+ title: "Title",
43
+ subTitle: "Subtitle"
44
+ }
34
45
  },
35
46
  table: {
36
47
  insert: "Wstaw",
@@ -54,6 +65,15 @@ const locale = { "docs-ui": {
54
65
  closeHeaderFooter: "Zamknij nagłówek i stopkę",
55
66
  disableText: "Ustawienia nagłówka i stopki są wyłączone"
56
67
  },
68
+ placeholder: {
69
+ heading1: "Heading 1",
70
+ heading2: "Heading 2",
71
+ heading3: "Heading 3",
72
+ heading4: "Heading 4",
73
+ heading5: "Heading 5",
74
+ normalText: "Type text or press \"/\" for commands",
75
+ listItem: "Item"
76
+ },
57
77
  doc: {
58
78
  menu: { paragraphSetting: "Ustawienia akapitu" },
59
79
  slider: { paragraphSetting: "Ustawienia akapitu" },
@@ -69,6 +89,8 @@ const locale = { "docs-ui": {
69
89
  after: "Po",
70
90
  lineSpace: "Odstęp między wierszami",
71
91
  multiSpace: "Wielokrotny odstęp",
92
+ atLeast: "At Least (px)",
93
+ exactly: "Exactly (px)",
72
94
  fixedValue: "Wartość stała (px)"
73
95
  }
74
96
  },
@@ -82,6 +104,18 @@ const locale = { "docs-ui": {
82
104
  checkList: "Lista zadań",
83
105
  insertBellow: "Wstaw poniżej"
84
106
  },
107
+ paragraphMenu: {
108
+ alignAndIndent: "Align and indent",
109
+ align: "Align",
110
+ indent: "Indent",
111
+ color: "Colors",
112
+ increase: "Increase",
113
+ decrease: "Decrease",
114
+ increaseIndent: "Increase indent",
115
+ decreaseIndent: "Decrease indent",
116
+ defaultTextColor: "Default text color",
117
+ noBackground: "No background"
118
+ },
85
119
  "page-settings": {
86
120
  "document-setting": "Ustawienia dokumentu",
87
121
  mode: "Tryb",
@@ -30,7 +30,18 @@ const locale = { "docs-ui": {
30
30
  alignJustify: "Justificar",
31
31
  horizontalLine: "Linha horizontal",
32
32
  headerFooter: "Cabeçalho e rodapé",
33
- pageSetup: "Configurar página"
33
+ pageSetup: "Configurar página",
34
+ heading: {
35
+ tooltip: "Heading",
36
+ normal: "Normal text",
37
+ leading1: "Heading 1",
38
+ leading2: "Heading 2",
39
+ leading3: "Heading 3",
40
+ leading4: "Heading 4",
41
+ leading5: "Heading 5",
42
+ title: "Title",
43
+ subTitle: "Subtitle"
44
+ }
34
45
  },
35
46
  table: {
36
47
  insert: "Inserir",
@@ -54,6 +65,15 @@ const locale = { "docs-ui": {
54
65
  closeHeaderFooter: "Fechar cabeçalho e rodapé",
55
66
  disableText: "As configurações de cabeçalho e rodapé estão desativadas"
56
67
  },
68
+ placeholder: {
69
+ heading1: "Heading 1",
70
+ heading2: "Heading 2",
71
+ heading3: "Heading 3",
72
+ heading4: "Heading 4",
73
+ heading5: "Heading 5",
74
+ normalText: "Type text or press \"/\" for commands",
75
+ listItem: "Item"
76
+ },
57
77
  doc: {
58
78
  menu: { paragraphSetting: "Configurações de parágrafo" },
59
79
  slider: { paragraphSetting: "Configurações de parágrafo" },
@@ -69,6 +89,8 @@ const locale = { "docs-ui": {
69
89
  after: "Depois",
70
90
  lineSpace: "Espaçamento entre linhas",
71
91
  multiSpace: "Espaçamento múltiplo",
92
+ atLeast: "At Least (px)",
93
+ exactly: "Exactly (px)",
72
94
  fixedValue: "Valor fixo (px)"
73
95
  }
74
96
  },
@@ -82,6 +104,18 @@ const locale = { "docs-ui": {
82
104
  checkList: "Lista de tarefas",
83
105
  insertBellow: "Inserir abaixo"
84
106
  },
107
+ paragraphMenu: {
108
+ alignAndIndent: "Align and indent",
109
+ align: "Align",
110
+ indent: "Indent",
111
+ color: "Colors",
112
+ increase: "Increase",
113
+ decrease: "Decrease",
114
+ increaseIndent: "Increase indent",
115
+ decreaseIndent: "Decrease indent",
116
+ defaultTextColor: "Default text color",
117
+ noBackground: "No background"
118
+ },
85
119
  "page-settings": {
86
120
  "document-setting": "Configuração do documento",
87
121
  mode: "Modo",
@@ -30,7 +30,18 @@ const locale = { "docs-ui": {
30
30
  alignJustify: "Выровнять по ширине",
31
31
  horizontalLine: "Горизонтальная линия",
32
32
  headerFooter: "Верхние и нижние колонтитулы",
33
- pageSetup: "Настройки страницы"
33
+ pageSetup: "Настройки страницы",
34
+ heading: {
35
+ tooltip: "Heading",
36
+ normal: "Normal text",
37
+ leading1: "Heading 1",
38
+ leading2: "Heading 2",
39
+ leading3: "Heading 3",
40
+ leading4: "Heading 4",
41
+ leading5: "Heading 5",
42
+ title: "Title",
43
+ subTitle: "Subtitle"
44
+ }
34
45
  },
35
46
  table: {
36
47
  insert: "Вставить",
@@ -54,6 +65,15 @@ const locale = { "docs-ui": {
54
65
  closeHeaderFooter: "Закрыть верхний и нижний колонтитулы",
55
66
  disableText: "Настройки верхнего и нижнего колонтитулов отключены"
56
67
  },
68
+ placeholder: {
69
+ heading1: "Heading 1",
70
+ heading2: "Heading 2",
71
+ heading3: "Heading 3",
72
+ heading4: "Heading 4",
73
+ heading5: "Heading 5",
74
+ normalText: "Type text or press \"/\" for commands",
75
+ listItem: "Item"
76
+ },
57
77
  doc: {
58
78
  menu: { paragraphSetting: "Настройка абзаца" },
59
79
  slider: { paragraphSetting: "Настройка абзаца" },
@@ -69,6 +89,8 @@ const locale = { "docs-ui": {
69
89
  after: "После",
70
90
  lineSpace: "Высота строки",
71
91
  multiSpace: "Двойной отступ",
92
+ atLeast: "At Least (px)",
93
+ exactly: "Exactly (px)",
72
94
  fixedValue: "Фиксированное значение (px)"
73
95
  }
74
96
  },
@@ -82,6 +104,18 @@ const locale = { "docs-ui": {
82
104
  checkList: "Список задач",
83
105
  insertBellow: "Вставить ниже"
84
106
  },
107
+ paragraphMenu: {
108
+ alignAndIndent: "Align and indent",
109
+ align: "Align",
110
+ indent: "Indent",
111
+ color: "Colors",
112
+ increase: "Increase",
113
+ decrease: "Decrease",
114
+ increaseIndent: "Increase indent",
115
+ decreaseIndent: "Decrease indent",
116
+ defaultTextColor: "Default text color",
117
+ noBackground: "No background"
118
+ },
85
119
  "page-settings": {
86
120
  "document-setting": "Настройки документа",
87
121
  mode: "Режим",
@@ -30,7 +30,18 @@ const locale = { "docs-ui": {
30
30
  alignJustify: "Zarovnať do bloku",
31
31
  horizontalLine: "Vodorovná čiara",
32
32
  headerFooter: "Hlavička a päta",
33
- pageSetup: "Nastavenie stránky"
33
+ pageSetup: "Nastavenie stránky",
34
+ heading: {
35
+ tooltip: "Heading",
36
+ normal: "Normal text",
37
+ leading1: "Heading 1",
38
+ leading2: "Heading 2",
39
+ leading3: "Heading 3",
40
+ leading4: "Heading 4",
41
+ leading5: "Heading 5",
42
+ title: "Title",
43
+ subTitle: "Subtitle"
44
+ }
34
45
  },
35
46
  table: {
36
47
  insert: "Vložiť",
@@ -54,6 +65,15 @@ const locale = { "docs-ui": {
54
65
  closeHeaderFooter: "Zavrieť hlavičku a pätu",
55
66
  disableText: "Nastavenia hlavičky a päty sú vypnuté"
56
67
  },
68
+ placeholder: {
69
+ heading1: "Heading 1",
70
+ heading2: "Heading 2",
71
+ heading3: "Heading 3",
72
+ heading4: "Heading 4",
73
+ heading5: "Heading 5",
74
+ normalText: "Type text or press \"/\" for commands",
75
+ listItem: "Item"
76
+ },
57
77
  doc: {
58
78
  menu: { paragraphSetting: "Nastavenia odseku" },
59
79
  slider: { paragraphSetting: "Nastavenia odseku" },
@@ -69,6 +89,8 @@ const locale = { "docs-ui": {
69
89
  after: "Za",
70
90
  lineSpace: "Riadkovanie",
71
91
  multiSpace: "Viacnásobné",
92
+ atLeast: "At Least (px)",
93
+ exactly: "Exactly (px)",
72
94
  fixedValue: "Pevná hodnota (px)"
73
95
  }
74
96
  },
@@ -82,6 +104,18 @@ const locale = { "docs-ui": {
82
104
  checkList: "Zoznam úloh",
83
105
  insertBellow: "Vložiť pod"
84
106
  },
107
+ paragraphMenu: {
108
+ alignAndIndent: "Align and indent",
109
+ align: "Align",
110
+ indent: "Indent",
111
+ color: "Colors",
112
+ increase: "Increase",
113
+ decrease: "Decrease",
114
+ increaseIndent: "Increase indent",
115
+ decreaseIndent: "Decrease indent",
116
+ defaultTextColor: "Default text color",
117
+ noBackground: "No background"
118
+ },
85
119
  "page-settings": {
86
120
  "document-setting": "Nastavenia dokumentu",
87
121
  mode: "Režim",
@@ -30,7 +30,18 @@ const locale = { "docs-ui": {
30
30
  alignJustify: "Căn đều hai bên",
31
31
  horizontalLine: "Horizontal line",
32
32
  headerFooter: "Đầu trang và chân trang",
33
- pageSetup: "Cài đặt trang"
33
+ pageSetup: "Cài đặt trang",
34
+ heading: {
35
+ tooltip: "Heading",
36
+ normal: "Normal text",
37
+ leading1: "Heading 1",
38
+ leading2: "Heading 2",
39
+ leading3: "Heading 3",
40
+ leading4: "Heading 4",
41
+ leading5: "Heading 5",
42
+ title: "Title",
43
+ subTitle: "Subtitle"
44
+ }
34
45
  },
35
46
  table: {
36
47
  insert: "Chèn",
@@ -54,6 +65,15 @@ const locale = { "docs-ui": {
54
65
  closeHeaderFooter: "Đóng đầu trang và chân trang",
55
66
  disableText: "Cài đặt đầu trang và chân trang không khả dụng"
56
67
  },
68
+ placeholder: {
69
+ heading1: "Heading 1",
70
+ heading2: "Heading 2",
71
+ heading3: "Heading 3",
72
+ heading4: "Heading 4",
73
+ heading5: "Heading 5",
74
+ normalText: "Type text or press \"/\" for commands",
75
+ listItem: "Item"
76
+ },
57
77
  doc: {
58
78
  menu: { paragraphSetting: "Paragraph Setting" },
59
79
  slider: { paragraphSetting: "Paragraph Setting" },
@@ -69,6 +89,8 @@ const locale = { "docs-ui": {
69
89
  after: "After",
70
90
  lineSpace: "Line Space",
71
91
  multiSpace: "Multi Space",
92
+ atLeast: "At Least (px)",
93
+ exactly: "Exactly (px)",
72
94
  fixedValue: "Fixed Value(px)"
73
95
  }
74
96
  },
@@ -82,6 +104,18 @@ const locale = { "docs-ui": {
82
104
  checkList: "Danh sách công việc",
83
105
  insertBellow: "Chèn dưới"
84
106
  },
107
+ paragraphMenu: {
108
+ alignAndIndent: "Align and indent",
109
+ align: "Align",
110
+ indent: "Indent",
111
+ color: "Colors",
112
+ increase: "Increase",
113
+ decrease: "Decrease",
114
+ increaseIndent: "Increase indent",
115
+ decreaseIndent: "Decrease indent",
116
+ defaultTextColor: "Default text color",
117
+ noBackground: "No background"
118
+ },
85
119
  "page-settings": {
86
120
  "document-setting": "Cài đặt tài liệu",
87
121
  mode: "Chế độ",
@@ -30,7 +30,18 @@ const locale = { "docs-ui": {
30
30
  alignJustify: "两端对齐",
31
31
  horizontalLine: "水平分割线",
32
32
  headerFooter: "页眉页脚",
33
- pageSetup: "页面设置"
33
+ pageSetup: "页面设置",
34
+ heading: {
35
+ tooltip: "标题",
36
+ normal: "普通文本",
37
+ leading1: "标题1",
38
+ leading2: "标题2",
39
+ leading3: "标题3",
40
+ leading4: "标题4",
41
+ leading5: "标题5",
42
+ title: "标题",
43
+ subTitle: "副标题"
44
+ }
34
45
  },
35
46
  table: {
36
47
  insert: "插入",
@@ -54,6 +65,15 @@ const locale = { "docs-ui": {
54
65
  closeHeaderFooter: "关闭页眉页脚",
55
66
  disableText: "页眉页脚设置不可用"
56
67
  },
68
+ placeholder: {
69
+ heading1: "标题1",
70
+ heading2: "标题2",
71
+ heading3: "标题3",
72
+ heading4: "标题4",
73
+ heading5: "标题5",
74
+ normalText: "请输入文字或按\"/\"启用命令",
75
+ listItem: "项目"
76
+ },
57
77
  doc: {
58
78
  menu: { paragraphSetting: "段落设置" },
59
79
  slider: { paragraphSetting: "段落设置" },
@@ -69,6 +89,8 @@ const locale = { "docs-ui": {
69
89
  after: "段落后",
70
90
  lineSpace: "行距",
71
91
  multiSpace: "多倍行距",
92
+ atLeast: "至少值(px)",
93
+ exactly: "固定值(px)",
72
94
  fixedValue: "固定值(px)"
73
95
  }
74
96
  },
@@ -82,6 +104,18 @@ const locale = { "docs-ui": {
82
104
  checkList: "任务列表",
83
105
  insertBellow: "在下方插入"
84
106
  },
107
+ paragraphMenu: {
108
+ alignAndIndent: "对齐和缩进",
109
+ align: "对齐",
110
+ indent: "缩进",
111
+ color: "颜色",
112
+ increase: "增加",
113
+ decrease: "减少",
114
+ increaseIndent: "增加缩进",
115
+ decreaseIndent: "减少缩进",
116
+ defaultTextColor: "默认文字颜色",
117
+ noBackground: "无背景色"
118
+ },
85
119
  "page-settings": {
86
120
  "document-setting": "文档设置",
87
121
  mode: "模式",
@@ -30,7 +30,18 @@ const locale = { "docs-ui": {
30
30
  alignJustify: "兩端對齊",
31
31
  horizontalLine: "Horizontal line",
32
32
  headerFooter: "頁眉頁腳",
33
- pageSetup: "頁面設置"
33
+ pageSetup: "頁面設置",
34
+ heading: {
35
+ tooltip: "Heading",
36
+ normal: "Normal text",
37
+ leading1: "Heading 1",
38
+ leading2: "Heading 2",
39
+ leading3: "Heading 3",
40
+ leading4: "Heading 4",
41
+ leading5: "Heading 5",
42
+ title: "Title",
43
+ subTitle: "Subtitle"
44
+ }
34
45
  },
35
46
  table: {
36
47
  insert: "Insert",
@@ -54,6 +65,15 @@ const locale = { "docs-ui": {
54
65
  closeHeaderFooter: "關閉頁眉頁腳",
55
66
  disableText: "頁眉頁腳設置不可用"
56
67
  },
68
+ placeholder: {
69
+ heading1: "標題1",
70
+ heading2: "標題2",
71
+ heading3: "標題3",
72
+ heading4: "標題4",
73
+ heading5: "標題5",
74
+ normalText: "請輸入文字或按\"/\"啟用命令",
75
+ listItem: "項目"
76
+ },
57
77
  doc: {
58
78
  menu: { paragraphSetting: "Paragraph Setting" },
59
79
  slider: { paragraphSetting: "Paragraph Setting" },
@@ -69,6 +89,8 @@ const locale = { "docs-ui": {
69
89
  after: "After",
70
90
  lineSpace: "Line Space",
71
91
  multiSpace: "Multi Space",
92
+ atLeast: "At Least (px)",
93
+ exactly: "Exactly (px)",
72
94
  fixedValue: "Fixed Value(px)"
73
95
  }
74
96
  },
@@ -82,6 +104,18 @@ const locale = { "docs-ui": {
82
104
  checkList: "任務列表",
83
105
  insertBellow: "在下方插入"
84
106
  },
107
+ paragraphMenu: {
108
+ alignAndIndent: "對齊與縮進",
109
+ align: "對齊",
110
+ indent: "縮進",
111
+ color: "顏色",
112
+ increase: "增加",
113
+ decrease: "減少",
114
+ increaseIndent: "增加縮進",
115
+ decreaseIndent: "減少縮進",
116
+ defaultTextColor: "預設文字顏色",
117
+ noBackground: "無背景色"
118
+ },
85
119
  "page-settings": {
86
120
  "document-setting": "文檔設置",
87
121
  mode: "模式",
@@ -30,7 +30,18 @@ const locale = { "docs-ui": {
30
30
  alignJustify: "兩端對齊",
31
31
  horizontalLine: "Horizontal line",
32
32
  headerFooter: "頁眉頁腳",
33
- pageSetup: "頁面設置"
33
+ pageSetup: "頁面設置",
34
+ heading: {
35
+ tooltip: "標題",
36
+ normal: "普通文字",
37
+ leading1: "標題1",
38
+ leading2: "標題2",
39
+ leading3: "標題3",
40
+ leading4: "標題4",
41
+ leading5: "標題5",
42
+ title: "標題",
43
+ subTitle: "副標題"
44
+ }
34
45
  },
35
46
  table: {
36
47
  insert: "插入",
@@ -54,6 +65,15 @@ const locale = { "docs-ui": {
54
65
  closeHeaderFooter: "關閉頁眉頁腳",
55
66
  disableText: "頁眉頁腳設置不可用"
56
67
  },
68
+ placeholder: {
69
+ heading1: "標題1",
70
+ heading2: "標題2",
71
+ heading3: "標題3",
72
+ heading4: "標題4",
73
+ heading5: "標題5",
74
+ normalText: "請輸入文字或按\"/\"啟用命令",
75
+ listItem: "項目"
76
+ },
57
77
  doc: {
58
78
  menu: { paragraphSetting: "Paragraph Setting" },
59
79
  slider: { paragraphSetting: "Paragraph Setting" },
@@ -69,6 +89,8 @@ const locale = { "docs-ui": {
69
89
  after: "After",
70
90
  lineSpace: "Line Space",
71
91
  multiSpace: "Multi Space",
92
+ atLeast: "At Least (px)",
93
+ exactly: "Exactly (px)",
72
94
  fixedValue: "Fixed Value(px)"
73
95
  }
74
96
  },
@@ -82,6 +104,18 @@ const locale = { "docs-ui": {
82
104
  checkList: "任務列表",
83
105
  insertBellow: "在下方插入"
84
106
  },
107
+ paragraphMenu: {
108
+ alignAndIndent: "對齊與縮排",
109
+ align: "對齊",
110
+ indent: "縮排",
111
+ color: "顏色",
112
+ increase: "增加",
113
+ decrease: "減少",
114
+ increaseIndent: "增加縮排",
115
+ decreaseIndent: "減少縮排",
116
+ defaultTextColor: "預設文字顏色",
117
+ noBackground: "無背景色"
118
+ },
85
119
  "page-settings": {
86
120
  "document-setting": "文檔設置",
87
121
  mode: "模式",
@@ -15,7 +15,7 @@
15
15
  */
16
16
  import type { ICommand, IDocumentBody, Nullable } from '@univerjs/core';
17
17
  import type { IRectRangeWithStyle, ITextRangeWithStyle } from '@univerjs/engine-render';
18
- import { DeleteDirection } from '../../types/delete-direction';
18
+ import { DeleteDirection } from '@univerjs/core';
19
19
  export interface IDeleteCustomBlockParams {
20
20
  direction: DeleteDirection;
21
21
  range: ITextRangeWithStyle;
@@ -17,7 +17,7 @@ import type { ICommand, IDocumentBody, ITextStyle } from '@univerjs/core';
17
17
  import type { ITextRangeWithStyle } from '@univerjs/engine-render';
18
18
  export interface ISetInlineFormatCommandParams {
19
19
  preCommandId: string;
20
- value?: string;
20
+ value?: string | Partial<ITextStyle> | null;
21
21
  }
22
22
  export declare const SetInlineFormatBoldCommand: ICommand;
23
23
  export declare const SetInlineFormatItalicCommand: ICommand;
@@ -28,6 +28,8 @@ export declare const SetInlineFormatSuperscriptCommand: ICommand;
28
28
  export declare const SetInlineFormatFontSizeCommand: ICommand;
29
29
  export declare const SetInlineFormatFontFamilyCommand: ICommand;
30
30
  export declare const SetInlineFormatTextColorCommand: ICommand;
31
+ export declare const ResetInlineFormatTextColorCommand: ICommand;
32
+ export declare const SetInlineFormatTextFillCommand: ICommand;
31
33
  export declare const SetInlineFormatTextBackgroundColorCommand: ICommand;
32
34
  export declare const ResetInlineFormatTextBackgroundColorCommand: ICommand;
33
35
  export declare const SetInlineFormatCommand: ICommand<ISetInlineFormatCommandParams>;
@@ -13,12 +13,42 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import type { ICommand } from '@univerjs/core';
16
+ import type { ICommand, IParagraph, ISectionBreak, ITextRun } from '@univerjs/core';
17
17
  export declare const CreateDocTableCommandId = "doc.command.create-table";
18
18
  export interface ICreateDocTableCommandParams {
19
19
  rowCount: number;
20
20
  colCount: number;
21
21
  }
22
+ export interface IDocTableInsertBodyParams {
23
+ tableDataStream: string;
24
+ tableParagraphs: IParagraph[];
25
+ sectionBreaks: ISectionBreak[];
26
+ tableId: string;
27
+ textRun: ITextRun;
28
+ existingParagraphIds?: Set<string>;
29
+ }
30
+ export declare function buildDocTableInsertBody(params: IDocTableInsertBodyParams): {
31
+ dataStream: string;
32
+ paragraphs: IParagraph[];
33
+ sectionBreaks: ISectionBreak[];
34
+ textRuns: {
35
+ st: number;
36
+ ed: number;
37
+ sId?: string;
38
+ ts?: import("@univerjs/core").ITextStyle;
39
+ }[];
40
+ tables: {
41
+ startIndex: number;
42
+ endIndex: number;
43
+ tableId: string;
44
+ }[];
45
+ };
46
+ export declare function shouldCreateParagraphBeforeTable(body: {
47
+ dataStream: string;
48
+ }, startOffset: number): boolean;
49
+ export declare function normalizeTableInsertOffset(body: {
50
+ dataStream: string;
51
+ }, startOffset: number): number;
22
52
  /**
23
53
  * The command to create a table at cursor point.
24
54
  */
@@ -14,8 +14,10 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import type { Direction, IOperation } from '@univerjs/core';
17
+ export type DocCursorMoveGranularity = 'character' | 'word' | 'line' | 'paragraph' | 'document';
17
18
  export interface IMoveCursorOperationParams {
18
19
  direction: Direction;
20
+ granularity?: DocCursorMoveGranularity;
19
21
  }
20
22
  /**
21
23
  * The operation to move cursor in the current document.
@@ -13,7 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import type { DocumentDataModel, IAccessor } from '@univerjs/core';
16
+ import type { IAccessor } from '@univerjs/core';
17
17
  import { DocSkeletonManagerService } from '@univerjs/docs';
18
18
  /**
19
19
  * Get the skeleton of the command's target.
@@ -21,4 +21,3 @@ import { DocSkeletonManagerService } from '@univerjs/docs';
21
21
  * @param unitId Unit ID.
22
22
  */
23
23
  export declare function getCommandSkeleton(accessor: IAccessor, unitId: string): DocSkeletonManagerService | undefined;
24
- export declare function getRichTextEditPath(docDataModel: DocumentDataModel, segmentId?: string): string[];
@@ -17,11 +17,26 @@ 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
19
  export declare const configSymbol: unique symbol;
20
+ export type DocFitMode = 'none' | 'fit-width';
21
+ export type DocFitTarget = 'viewport' | 'container';
22
+ export type DocFitAlign = 'center' | 'start';
23
+ export type DocFitPaddingX = number | `${number}%`;
24
+ export interface IDocFitToWidthOptions {
25
+ mode?: DocFitMode;
26
+ target?: DocFitTarget;
27
+ paddingX?: DocFitPaddingX;
28
+ minScale?: number;
29
+ maxScale?: number;
30
+ align?: DocFitAlign;
31
+ }
20
32
  export interface IUniverDocsUIConfig {
21
33
  menu?: MenuConfig;
22
34
  container?: HTMLElement | string;
23
35
  toc?: boolean;
24
36
  footer?: boolean;
37
+ placeholder?: boolean;
38
+ fitToWidth?: IDocFitToWidthOptions;
25
39
  override?: DependencyOverride;
26
40
  }
41
+ export declare const DEFAULT_DOC_FIT_TO_WIDTH_OPTIONS: Required<Omit<IDocFitToWidthOptions, 'maxScale'>> & Pick<IDocFitToWidthOptions, 'maxScale'>;
27
42
  export declare const defaultPluginConfig: IUniverDocsUIConfig;
@@ -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 ComponentsController extends Disposable {
19
+ private readonly _componentManager;
20
+ private readonly _iconManager;
21
+ constructor(_componentManager: ComponentManager, _iconManager: IconManager);
22
+ private _registerParts;
23
+ private _registerIcons;
24
+ private _registerComponents;
25
+ }
@@ -18,7 +18,6 @@ import type { IRenderContext, IRenderModule } from '@univerjs/engine-render';
18
18
  import { Disposable, ICommandService, IUniverInstanceService, LocaleService } from '@univerjs/core';
19
19
  import { DocSkeletonManagerService } from '@univerjs/docs';
20
20
  import { IRenderManagerService } from '@univerjs/engine-render';
21
- import { ComponentManager } from '@univerjs/ui';
22
21
  import { IEditorService } from '../services/editor/editor-manager.service';
23
22
  import { DocSelectionRenderService } from '../services/selection/doc-selection-render.service';
24
23
  export declare enum HeaderFooterType {
@@ -38,13 +37,11 @@ export declare class DocHeaderFooterController extends Disposable implements IRe
38
37
  private readonly _docSkeletonManagerService;
39
38
  private readonly _docSelectionRenderService;
40
39
  private readonly _localeService;
41
- private readonly _componentManager;
42
40
  private _loadedMap;
43
- constructor(_context: IRenderContext<DocumentDataModel>, _commandService: ICommandService, _editorService: IEditorService, _instanceSrv: IUniverInstanceService, _renderManagerService: IRenderManagerService, _docSkeletonManagerService: DocSkeletonManagerService, _docSelectionRenderService: DocSelectionRenderService, _localeService: LocaleService, _componentManager: ComponentManager);
41
+ constructor(_context: IRenderContext<DocumentDataModel>, _commandService: ICommandService, _editorService: IEditorService, _instanceSrv: IUniverInstanceService, _renderManagerService: IRenderManagerService, _docSkeletonManagerService: DocSkeletonManagerService, _docSelectionRenderService: DocSelectionRenderService, _localeService: LocaleService);
44
42
  private _initialize;
45
43
  dispose(): void;
46
44
  private _listenSwitchMode;
47
- private _initCustomComponents;
48
45
  private _init;
49
46
  private _initialMain;
50
47
  private _getTransformCoordForDocumentOffset;