@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
package/README.md CHANGED
@@ -34,6 +34,33 @@ univer.registerPlugin(UniverDocsUIPlugin);
34
34
  // Merge EnUS into your Univer locale map when this package contributes UI text.
35
35
  ```
36
36
 
37
+ ## Format painter
38
+
39
+ Use the shared Start ribbon format painter to copy character formatting. Include a paragraph
40
+ mark in the source selection to also copy paragraph formatting and list formatting. Drag over
41
+ a target selection or click a word to apply. Text, paragraph identities, and embedded entities
42
+ are retained, and each application is undoable. The same text command serves embedded Shape
43
+ text editors. The source format is captured when the brush is activated.
44
+ The clear-formatting icon resets the selected text and paragraphs to default formatting,
45
+ retains their content and identities, and supports undo.
46
+
47
+ ## Typing format at text boundaries
48
+
49
+ Backspace in ordinary document text retains the removed character's formatting for immediate
50
+ input. Forward Delete and Cut resolve formatting at the surviving caret. Replacing a text
51
+ selection uses its first character's format, regardless of selection direction. In table cells,
52
+ character-by-character Backspace resolves the surviving caret format; selection Backspace retains
53
+ the first selected character's format.
54
+
55
+ Retained typing format is transient and clears on explicit selection changes or document switches.
56
+ Formatting commands such as Bold update this input format without clearing it.
57
+ It is not serialized as an empty text run. Explicit `paragraphMarkTextStyle` remains authoritative
58
+ after repositioning or reopening; deletion does not overwrite this explicit paragraph style.
59
+ Modern paragraphs, including list items, retain their first character's formatting on the existing
60
+ paragraph-ending character when all text is deleted. This keeps empty-paragraph input and list
61
+ markers stable after editing elsewhere, undo/redo and reopening. Explicit list-marker and
62
+ paragraph-mark style overrides retain their precedence.
63
+
37
64
  ## Resources
38
65
 
39
66
  - [Documentation](https://docs.univer.ai)