@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
@@ -19,7 +19,7 @@ import { DocSelectionManagerService, DocSkeletonManagerService } from '@univerjs
19
19
  import * as EngineRender from '@univerjs/engine-render';
20
20
  import { IEditorService } from '../../services/editor/editor-manager.service';
21
21
  export declare class DocBackScrollRenderController extends RxDisposable implements EngineRender.IRenderModule {
22
- private readonly _context;
22
+ protected readonly _context: EngineRender.IRenderContext<DocumentDataModel>;
23
23
  private readonly _textSelectionManagerService;
24
24
  private readonly _editorService;
25
25
  private readonly _docSkeletonManagerService;
@@ -32,7 +32,7 @@ export declare class DocBackScrollRenderController extends RxDisposable implemen
32
32
  private _init;
33
33
  dispose(): void;
34
34
  private _suspendSelectionScroll;
35
- private _cancelPendingSelectionScroll;
35
+ protected _cancelPendingSelectionScroll(): void;
36
36
  private _scheduleScrollToSelection;
37
37
  scrollToRange(range: ITextRangeParam, onResolved?: () => void): void;
38
38
  private _isSameRange;
@@ -45,5 +45,6 @@ export declare class DocBackScrollRenderController extends RxDisposable implemen
45
45
  isViewportReady(): boolean;
46
46
  private _scrollToPage;
47
47
  scrollToNode(startNodePosition: Nullable<EngineRender.INodePosition>): void;
48
- private _scrollToSelection;
48
+ protected _getVerticalScrollDelta(top: number, height: number, boundTop: number, boundBottom: number, delta: number): number;
49
+ protected _scrollToSelection(): void;
49
50
  }
@@ -16,7 +16,7 @@
16
16
  import type { DocumentDataModel, IDocumentBody, Nullable } from '@univerjs/core';
17
17
  import type { IDocumentSkeletonPage, IRenderContext, IRenderModule, UniverRenderingContext } from '@univerjs/engine-render';
18
18
  import type { IUniverDocsUIConfig } from '../../config/config';
19
- import { Disposable, IConfigService, LocaleService } from '@univerjs/core';
19
+ import { Disposable, IConfigService, LocaleService, ThemeService } from '@univerjs/core';
20
20
  import { DocSelectionManagerService } from '@univerjs/docs';
21
21
  export interface IParagraphPlaceholderLayout {
22
22
  clipBottom?: number;
@@ -49,12 +49,13 @@ export declare class DocParagraphPlaceholderRenderController extends Disposable
49
49
  private readonly _localeService;
50
50
  private readonly _docSelectionManagerService;
51
51
  private readonly _configService;
52
- constructor(_context: IRenderContext<DocumentDataModel>, _localeService: LocaleService, _docSelectionManagerService: DocSelectionManagerService, _configService: IConfigService);
52
+ private readonly _themeService;
53
+ constructor(_context: IRenderContext<DocumentDataModel>, _localeService: LocaleService, _docSelectionManagerService: DocSelectionManagerService, _configService: IConfigService, _themeService: ThemeService);
53
54
  private _initParagraphPlaceholderRender;
54
55
  private _drawPagePlaceholders;
55
56
  private _getLocale;
56
57
  }
57
58
  export declare function shouldRenderParagraphPlaceholder(documentModel: DocumentDataModel, unitId: string, config?: Nullable<IUniverDocsUIConfig>): boolean;
58
59
  export declare function getParagraphPlaceholderLayouts(page: IDocumentSkeletonPage, body: IDocumentBody, locale: IParagraphPlaceholderLocale, pageLeft: number | undefined, pageTop: number | undefined, activeOffset: number, options?: IParagraphPlaceholderLayoutOptions): IParagraphPlaceholderLayout[];
59
- export declare function drawParagraphPlaceholders(ctx: UniverRenderingContext, placeholders: IParagraphPlaceholderLayout[]): void;
60
+ export declare function drawParagraphPlaceholders(ctx: UniverRenderingContext, placeholders: IParagraphPlaceholderLayout[], color?: string): void;
60
61
  export {};
@@ -0,0 +1,27 @@
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, IContextService } from '@univerjs/core';
19
+ import { IDocClipboardService } from '../../services/clipboard/clipboard.service';
20
+ import { DocCanvasPopManagerService } from '../../services/doc-popup-manager.service';
21
+ import { DocSelectionRenderService } from '../../services/selection/doc-selection-render.service';
22
+ export declare class DocPasteOptionsRenderController extends Disposable implements IRenderModule {
23
+ private readonly _context;
24
+ private readonly _clipboard;
25
+ private _popup;
26
+ constructor(_context: IRenderContext<DocumentDataModel>, _clipboard: IDocClipboardService, selection: DocSelectionRenderService, popupManager: DocCanvasPopManagerService, contextService: IContextService);
27
+ }
@@ -31,6 +31,7 @@ export declare class DocSelectionRenderController extends Disposable implements
31
31
  private readonly _embedRuntimeFocusCoordinator?;
32
32
  private _loadedMap;
33
33
  private _deferredEditorFocusTimer;
34
+ private _initialSelectionReady;
34
35
  constructor(_context: IRenderContext<DocumentDataModel>, _commandService: ICommandService, _editorService: IEditorService, _instanceSrv: IUniverInstanceService, _docSelectionRenderService: DocSelectionRenderService, _docSkeletonManagerService: DocSkeletonManagerService, _docSelectionManagerService: DocSelectionManagerService, _embedInteractionBoundaryService?: IDocEmbedInteractionBoundaryService, _embedRuntimeFocusCoordinator?: IDocEmbedRuntimeFocusCoordinator | undefined);
35
36
  private _initialize;
36
37
  private _init;
@@ -38,6 +39,7 @@ export declare class DocSelectionRenderController extends Disposable implements
38
39
  private _syncSelection;
39
40
  private _initialMain;
40
41
  dispose(): void;
42
+ private _syncEditArea;
41
43
  private _getTransformCoordForDocumentOffset;
42
44
  private _isEditorReadOnly;
43
45
  private _setEditorFocus;
@@ -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 { IMouseEvent, IPointerEvent } from '@univerjs/engine-render';
17
+ export declare function isEmbedInteractionEvent(evt: IPointerEvent | IMouseEvent): boolean;
18
+ export declare function getEventClientPoint(evt: IPointerEvent | IMouseEvent, target: EventTarget | null): {
19
+ clientX: number;
20
+ clientY: number;
21
+ } | undefined;
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import type { DocumentDataModel, IDocDrawingBase, JSONXActions } from '@univerjs/core';
17
- import type { IDocumentLayoutInvalidation, IRenderContext, IRenderModule } from '@univerjs/engine-render';
17
+ import type { DocumentSkeleton, IDocumentLayoutInvalidation, IRenderContext, IRenderModule } from '@univerjs/engine-render';
18
18
  import { ICommandService, ILogService, IUniverInstanceService, RxDisposable, ThemeService } from '@univerjs/core';
19
19
  import { DocLayoutExecutorService, DocSelectionManagerService, DocSkeletonManagerService } from '@univerjs/docs';
20
20
  import { IRenderManagerService } from '@univerjs/engine-render';
@@ -23,6 +23,17 @@ import { DocPageLayoutService } from '../../services/doc-page-layout.service';
23
23
  import { DocViewScaleService } from '../../services/doc-view-scale';
24
24
  import { IEditorService } from '../../services/editor/editor-manager.service';
25
25
  import { DocSelectionRenderService } from '../../services/selection/doc-selection-render.service';
26
+ export interface IDocLayoutScheduleOptions {
27
+ deferForeground?: boolean;
28
+ reuseMainBaseline?: boolean;
29
+ allowMetadataOnlyStructuralTailReuse?: boolean;
30
+ reason: 'initial' | 'edit';
31
+ anchor?: number;
32
+ priorityAnchor?: number;
33
+ invalidation?: IDocumentLayoutInvalidation;
34
+ modernPageWidth?: number;
35
+ modernHorizontalMargin?: number;
36
+ }
26
37
  /**
27
38
  * Returns false only when a mutation is proven not to affect text layout.
28
39
  *
@@ -34,10 +45,10 @@ import { DocSelectionRenderService } from '../../services/selection/doc-selectio
34
45
  */
35
46
  export declare function doesDocMutationRequireLayout(actions: JSONXActions, drawings: Record<string, IDocDrawingBase> | undefined): boolean;
36
47
  export declare class DocRenderController extends RxDisposable implements IRenderModule {
37
- private readonly _context;
48
+ protected readonly _context: IRenderContext<DocumentDataModel>;
38
49
  private readonly _commandService;
39
50
  private readonly _docSelectionRenderService;
40
- private readonly _docSkeletonManagerService;
51
+ protected readonly _docSkeletonManagerService: DocSkeletonManagerService;
41
52
  private readonly _editorService;
42
53
  private readonly _renderManagerService;
43
54
  private readonly _univerInstanceService;
@@ -64,12 +75,14 @@ export declare class DocRenderController extends RxDisposable implements IRender
64
75
  private _isMaterializingPages;
65
76
  private _reservedLayoutWidth;
66
77
  private _reservedLayoutHeight;
78
+ private _fontInitialization;
67
79
  constructor(_context: IRenderContext<DocumentDataModel>, _commandService: ICommandService, _docSelectionRenderService: DocSelectionRenderService, _docSkeletonManagerService: DocSkeletonManagerService, _editorService: IEditorService, _renderManagerService: IRenderManagerService, _univerInstanceService: IUniverInstanceService, _docPageLayoutService: DocPageLayoutService, _textSelectionManagerService: DocSelectionManagerService, _docViewScaleService: DocViewScaleService, _themeService: ThemeService, _docLayoutExecutorService: DocLayoutExecutorService, _docLayoutInteractionService: DocLayoutInteractionService, _logService: ILogService);
68
80
  private _scheduleVisualFrame;
69
81
  reRender(unitId: string, anchor?: number, invalidation?: IDocumentLayoutInvalidation, priorityAnchor?: number, refreshMainSelection?: boolean, preserveInactiveViewportAnchor?: boolean, deferForeground?: boolean): void;
70
82
  dispose(): void;
71
83
  refreshCustomBlockPresentation(unitId: string): boolean;
72
- private _scheduleLayout;
84
+ protected _scheduleLayout(unitId: string, skeleton: DocumentSkeleton, options: IDocLayoutScheduleOptions, refreshMainSelection?: boolean, preserveInactiveViewportAnchor?: boolean): void;
85
+ private _waitForConfiguredFonts;
73
86
  private _scheduleInitialInteractionWindow;
74
87
  private _prepareReservedLayoutExtent;
75
88
  private _scheduleMainInteractionWindow;
@@ -96,7 +109,8 @@ export declare class DocRenderController extends RxDisposable implements IRender
96
109
  private _restoreViewportAnchor;
97
110
  private _addNewRender;
98
111
  private _initViewportInteraction;
99
- private _shouldEnableHorizontalScrollBar;
112
+ protected _shouldEnableHorizontalScrollBar(): boolean;
113
+ protected _getHorizontalPageMargin(): number;
100
114
  private _addComponent;
101
115
  private _initRenderRefresh;
102
116
  private _create;
@@ -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 type { DocumentDataModel } from '@univerjs/core';
17
+ import type { IRenderContext, IRenderModule } from '@univerjs/engine-render';
18
+ import { Disposable, IUniverInstanceService } from '@univerjs/core';
19
+ import { DocSelectionManagerService } from '@univerjs/docs';
20
+ import { FormatPainterSessionService } from '@univerjs/ui';
21
+ export declare class DocFormatPainterRenderController extends Disposable implements IRenderModule {
22
+ constructor(context: IRenderContext<DocumentDataModel>, session: FormatPainterSessionService, selections: DocSelectionManagerService, instances: IUniverInstanceService);
23
+ }
@@ -0,0 +1,30 @@
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 } from '@univerjs/engine-render';
18
+ import type { MobileDocSelectionRenderService } from '../../../services/mobile/doc-selection-render.service';
19
+ import { DocSelectionManagerService, DocSkeletonManagerService } from '@univerjs/docs';
20
+ import { DocPageLayoutService } from '../../../services/doc-page-layout.service';
21
+ import { IEditorService } from '../../../services/editor/editor-manager.service';
22
+ import { DocBackScrollRenderController } from '../back-scroll.render-controller';
23
+ export declare class MobileDocBackScrollRenderController extends DocBackScrollRenderController {
24
+ private readonly _docSelectionRenderService;
25
+ private readonly _docPageLayoutService;
26
+ private _mobileKeyboardInset;
27
+ constructor(context: IRenderContext<DocumentDataModel>, textSelectionManagerService: DocSelectionManagerService, _docSelectionRenderService: MobileDocSelectionRenderService, editorService: IEditorService, docSkeletonManagerService: DocSkeletonManagerService, _docPageLayoutService: DocPageLayoutService);
28
+ dispose(): void;
29
+ protected _getVerticalScrollDelta(top: number, height: number, boundTop: number, boundBottom: number, _delta: number): number;
30
+ }
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { ICommandService, IContextService } from '@univerjs/core';
17
+ import type { DocSelectionManagerService } from '@univerjs/docs';
18
+ import type { Engine, Scene, Viewport } from '@univerjs/engine-render';
19
+ import type { DocViewScaleService } from '../../../services/doc-view-scale';
20
+ import { Disposable } from '@univerjs/core';
21
+ export declare function resolveMobileDocPinchZoomRatio(initialZoomRatio: number, initialDistance: number, currentDistance: number): number;
22
+ interface IMobileDocPinchZoomGestureOptions {
23
+ canvasElement: HTMLCanvasElement;
24
+ commandService: ICommandService;
25
+ contextService: IContextService;
26
+ docViewScaleService: DocViewScaleService;
27
+ engine: Engine;
28
+ scene: Scene;
29
+ textSelectionManagerService: DocSelectionManagerService;
30
+ unitId: string;
31
+ viewport: Viewport;
32
+ }
33
+ export declare class MobileDocPinchZoomGesture extends Disposable {
34
+ private readonly _options;
35
+ private readonly _zoomIndicator;
36
+ private _gestureOwned;
37
+ private _pinchZooming;
38
+ private _initialDistance;
39
+ private _initialZoomRatio;
40
+ private _anchor;
41
+ constructor(_options: IMobileDocPinchZoomGestureOptions);
42
+ private readonly _handleTouchStart;
43
+ private readonly _handleTouchMove;
44
+ private readonly _handleTouchEnd;
45
+ private readonly _handleTouchCancel;
46
+ private _getTouchPoint;
47
+ private _getPinchCenter;
48
+ private _getTouchDistance;
49
+ private _finishPinch;
50
+ }
51
+ export {};
@@ -0,0 +1,73 @@
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 type { MobileDocSelectionRenderService } from '../../../services/mobile/doc-selection-render.service';
19
+ import { Disposable, ICommandService, IContextService, IUniverInstanceService } from '@univerjs/core';
20
+ import { DocSelectionManagerService, DocSkeletonManagerService } from '@univerjs/docs';
21
+ import { IContextMenuService } from '@univerjs/ui';
22
+ import { IDocEmbedInteractionBoundaryService, IDocEmbedRuntimeFocusCoordinator } from '../../../services/doc-embed-integration.service';
23
+ import { DocMobileElementMenuService } from '../../../services/doc-mobile-element-menu.service';
24
+ import { IEditorService } from '../../../services/editor/editor-manager.service';
25
+ export declare class MobileDocSelectionRenderController extends Disposable implements IRenderModule {
26
+ private readonly _context;
27
+ private readonly _commandService;
28
+ private readonly _editorService;
29
+ private readonly _instanceSrv;
30
+ private readonly _docSelectionRenderService;
31
+ private readonly _docSkeletonManagerService;
32
+ private readonly _docSelectionManagerService;
33
+ private readonly _contextService;
34
+ private readonly _contextMenuService;
35
+ private readonly _mobileElementMenuService;
36
+ private readonly _embedRuntimeFocusCoordinator?;
37
+ private _loadedMap;
38
+ private _deferredEditorFocusTimer;
39
+ private _gestureTimer;
40
+ private _gestureDisposables;
41
+ private _lastTap;
42
+ private _inertiaAnimationId;
43
+ private _inertiaLastFrameTime;
44
+ private _inertiaVelocity;
45
+ private _initialSelectionReady;
46
+ constructor(_context: IRenderContext<DocumentDataModel>, _commandService: ICommandService, _editorService: IEditorService, _instanceSrv: IUniverInstanceService, _docSelectionRenderService: MobileDocSelectionRenderService, _docSkeletonManagerService: DocSkeletonManagerService, _docSelectionManagerService: DocSelectionManagerService, _contextService: IContextService, _contextMenuService: IContextMenuService, _mobileElementMenuService: DocMobileElementMenuService, _embedInteractionBoundaryService?: IDocEmbedInteractionBoundaryService, _embedRuntimeFocusCoordinator?: IDocEmbedRuntimeFocusCoordinator | undefined);
47
+ private _initialize;
48
+ private _init;
49
+ private _refreshListener;
50
+ private _syncSelection;
51
+ private _initialMain;
52
+ private _initialEditor;
53
+ dispose(): void;
54
+ private _syncEditArea;
55
+ private _startGesture;
56
+ private _handleTap;
57
+ private _selectWord;
58
+ private _scrollDocument;
59
+ private _startInertia;
60
+ private _stopInertia;
61
+ private _enterEditing;
62
+ private _getDocumentOffset;
63
+ private _showCaretMenu;
64
+ private _clearGestureTimer;
65
+ private _clearGesture;
66
+ private _getTransformCoordForDocumentOffset;
67
+ private _isEditorReadOnly;
68
+ private _setEditorFocus;
69
+ private _isEmbedInteractionEvent;
70
+ private _isEmbedChildInteractionActive;
71
+ private _commandExecutedListener;
72
+ private _skeletonListener;
73
+ }
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { DocumentDataModel } from '@univerjs/core';
17
+ import type { DocumentSkeleton, IRenderContext } from '@univerjs/engine-render';
18
+ import type { IDocLayoutScheduleOptions } from '../doc.render-controller';
19
+ import { ICommandService, ILogService, IUniverInstanceService, ThemeService } from '@univerjs/core';
20
+ import { DocLayoutExecutorService, DocSelectionManagerService, DocSkeletonManagerService } from '@univerjs/docs';
21
+ import { IRenderManagerService } from '@univerjs/engine-render';
22
+ import { DocLayoutInteractionService } from '../../../services/doc-layout-interaction.service';
23
+ import { DocPageLayoutService } from '../../../services/doc-page-layout.service';
24
+ import { DocViewScaleService } from '../../../services/doc-view-scale';
25
+ import { IEditorService } from '../../../services/editor/editor-manager.service';
26
+ import { DocSelectionRenderService } from '../../../services/selection/doc-selection-render.service';
27
+ import { DocRenderController } from '../doc.render-controller';
28
+ export declare class MobileDocRenderController extends DocRenderController {
29
+ private _mobileModernPageWidth;
30
+ constructor(context: IRenderContext<DocumentDataModel>, commandService: ICommandService, docSelectionRenderService: DocSelectionRenderService, docSkeletonManagerService: DocSkeletonManagerService, editorService: IEditorService, renderManagerService: IRenderManagerService, univerInstanceService: IUniverInstanceService, docPageLayoutService: DocPageLayoutService, textSelectionManagerService: DocSelectionManagerService, docViewScaleService: DocViewScaleService, themeService: ThemeService, docLayoutExecutorService: DocLayoutExecutorService, docLayoutInteractionService: DocLayoutInteractionService, logService: ILogService);
31
+ protected _scheduleLayout(unitId: string, skeleton: DocumentSkeleton, options: IDocLayoutScheduleOptions, refreshMainSelection?: boolean, preserveInactiveViewportAnchor?: boolean): void;
32
+ protected _shouldEnableHorizontalScrollBar(): boolean;
33
+ private _getMobileModernLayoutOptions;
34
+ private _initResponsiveLayout;
35
+ protected _getHorizontalPageMargin(): number;
36
+ }
@@ -0,0 +1,30 @@
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 } from '@univerjs/engine-render';
18
+ import { ICommandService, IContextService, IUniverInstanceService } from '@univerjs/core';
19
+ import { DocSelectionManagerService, DocSkeletonManagerService } from '@univerjs/docs';
20
+ import { IRenderManagerService } from '@univerjs/engine-render';
21
+ import { IDocEmbedInteractionBoundaryService } from '../../../services/doc-embed-integration.service';
22
+ import { DocPageLayoutService } from '../../../services/doc-page-layout.service';
23
+ import { DocViewScaleService } from '../../../services/doc-view-scale';
24
+ import { IEditorService } from '../../../services/editor/editor-manager.service';
25
+ import { DocZoomRenderController } from '../zoom.render-controller';
26
+ export declare class MobileDocZoomRenderController extends DocZoomRenderController {
27
+ constructor(context: IRenderContext<DocumentDataModel>, contextService: IContextService, docSkeletonManagerService: DocSkeletonManagerService, univerInstanceService: IUniverInstanceService, commandService: ICommandService, textSelectionManagerService: DocSelectionManagerService, editorService: IEditorService, docPageLayoutService: DocPageLayoutService, renderManagerService: IRenderManagerService, docViewScaleService: DocViewScaleService, embedInteractionBoundaryService?: IDocEmbedInteractionBoundaryService);
28
+ protected _initCommandExecutedListener(): void;
29
+ private _initGestureZoom;
30
+ }
@@ -24,24 +24,26 @@ import { DocViewScaleService } from '../../services/doc-view-scale';
24
24
  import { IEditorService } from '../../services/editor/editor-manager.service';
25
25
  export declare function shouldHandleDocWheelZoom(event: Pick<IWheelEvent, 'ctrlKey' | 'metaKey'>, focusingDoc: boolean, _documentFlavor?: DocumentFlavor): boolean;
26
26
  export declare class DocZoomRenderController extends Disposable implements IRenderModule {
27
- private readonly _context;
28
- private readonly _contextService;
27
+ protected readonly _context: IRenderContext<DocumentDataModel>;
28
+ protected readonly _contextService: IContextService;
29
29
  private readonly _docSkeletonManagerService;
30
30
  private readonly _univerInstanceService;
31
- private readonly _commandService;
32
- private readonly _textSelectionManagerService;
31
+ protected readonly _commandService: ICommandService;
32
+ protected readonly _textSelectionManagerService: DocSelectionManagerService;
33
33
  private readonly _editorService;
34
34
  private readonly _docPageLayoutService;
35
35
  private readonly _renderManagerService;
36
- private readonly _docViewScaleService;
36
+ protected readonly _docViewScaleService: DocViewScaleService;
37
37
  private readonly _embedInteractionBoundaryService?;
38
38
  private _isSheetEditor;
39
39
  private _initTimer;
40
40
  private _updateTimer;
41
+ private _fitToWidthAvailableWidth;
41
42
  constructor(_context: IRenderContext<DocumentDataModel>, _contextService: IContextService, _docSkeletonManagerService: DocSkeletonManagerService, _univerInstanceService: IUniverInstanceService, _commandService: ICommandService, _textSelectionManagerService: DocSelectionManagerService, _editorService: IEditorService, _docPageLayoutService: DocPageLayoutService, _renderManagerService: IRenderManagerService, _docViewScaleService: DocViewScaleService, _embedInteractionBoundaryService?: IDocEmbedInteractionBoundaryService | undefined);
42
43
  dispose(): void;
43
44
  private _initSkeletonListener;
44
- private _initCommandExecutedListener;
45
+ protected _initCommandExecutedListener(): void;
46
+ private _initFitToWidthResizeListener;
45
47
  updateViewZoom(zoomRatio: number, needRefreshSelection?: boolean): void;
46
48
  private _initZoomEventListener;
47
49
  }
@@ -37,6 +37,7 @@ export type { IDeleteCurrentParagraphCommandParams, IDeleteCustomBlockParams, }
37
37
  export { getCursorWhenDelete } from './commands/commands/doc-delete.command';
38
38
  export { HorizontalLineCommand } from './commands/commands/doc-horizontal-line.command';
39
39
  export { DocSelectAllCommand } from './commands/commands/doc-select-all.command';
40
+ export { captureTextFormat } from './commands/commands/format-painter.command';
40
41
  export { IMEInputCommand } from './commands/commands/ime-input.command';
41
42
  export type { IIMEInputCommandParams } from './commands/commands/ime-input.command';
42
43
  export { getStyleInTextRange, ResetInlineFormatTextBackgroundColorCommand, ResetInlineFormatTextColorCommand, SetInlineFormatBoldCommand, SetInlineFormatCommand, SetInlineFormatFontFamilyCommand, SetInlineFormatFontSizeCommand, SetInlineFormatItalicCommand, SetInlineFormatStrikethroughCommand, SetInlineFormatSubscriptCommand, SetInlineFormatSuperscriptCommand, SetInlineFormatTextBackgroundColorCommand, SetInlineFormatTextColorCommand, SetInlineFormatTextFillCommand, SetInlineFormatUnderlineCommand, } from './commands/commands/inline-format.command';
@@ -80,9 +81,10 @@ export { scrollDocsTableLikeCustomBlockLive } from './embed-docs-custom-block-sc
80
81
  export type { IDocsTableLikeCustomBlockScrollOptions } from './embed-docs-custom-block-scroll';
81
82
  export { resolveDocsCustomBlockRenderViewport } from './embed-host-anchor';
82
83
  export type { IDocsCustomBlockLayoutViewport, IDocsCustomBlockRenderViewportParams } from './embed-host-anchor';
83
- export { AlignMenuItemFactory, BackgroundColorSelectorMenuItemFactory, BoldMenuItemFactory, disableMenuWhenHeaderFooterEditing, FLOAT_TEXT_STYLE_MENU_ID, FLOAT_TOOLBAR_MENU_POSITION, FloatTextStyleMenuItemFactory, FontFamilySelectorMenuItemFactory, FontSizeSelectorMenuItemFactory, hideMenuWhenSelectionInBlockRange, isTextRangeInAnyBlockRange, ItalicMenuItemFactory, StrikeThroughMenuItemFactory, TextColorSelectorMenuItemFactory, UnderlineMenuItemFactory, } from './menu/menu';
84
+ 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';
84
85
  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';
85
86
  export { menuSchema as DocsUIMenuSchema } from './menu/schema';
87
+ export { UniverDocsMobileUIPlugin } from './mobile-plugin';
86
88
  export { UniverDocsUIPlugin } from './plugin';
87
89
  export * from './services';
88
90
  export { convertClipboardHtmlToDocumentData, IDocClipboardService, removeClipboardHtmlImages, } from './services/clipboard/clipboard.service';
@@ -94,6 +96,7 @@ export { convertBodyToHtml } from './services/clipboard/udm-to-html/convertor';
94
96
  export { DocHtmlExportService } from './services/clipboard/udm-to-html/doc-html-export.service';
95
97
  export type { DocHtmlExportTransformer } from './services/clipboard/udm-to-html/doc-html-export.service';
96
98
  export { DocAutoFormatService } from './services/doc-auto-format.service';
99
+ export { DocContextualRibbonService } from './services/doc-contextual-ribbon.service';
97
100
  export { DOC_EMBED_INTERACTION_BOUNDARY_OWNER_ATTRIBUTE, IDocEmbedInteractionBoundaryService, IDocEmbedRuntimeFocusCoordinator, } from './services/doc-embed-integration.service';
98
101
  export { DocEventManagerService, getListMarkerFallbackBound, getListParagraphContextMenuHit, } from './services/doc-event-manager.service';
99
102
  export type { IBulletBound, IMutiPageParagraphBound } from './services/doc-event-manager.service';
@@ -101,8 +104,10 @@ export { DocIMEInputManagerService } from './services/doc-ime-input-manager.serv
101
104
  export { DocLayoutInteractionService } from './services/doc-layout-interaction.service';
102
105
  export { SetDocInputStyleCommand } from './services/doc-menu-style.service';
103
106
  export type { ISetDocInputStyleCommandParams } from './services/doc-menu-style.service';
107
+ export { DocMobileElementMenuService } from './services/doc-mobile-element-menu.service';
104
108
  export { DocPageLayoutService } from './services/doc-page-layout.service';
105
109
  export { DocParagraphMenuService } from './services/doc-paragraph-menu.service';
110
+ export type { IDocCanvasPopup } from './services/doc-popup-manager.service';
106
111
  export { calcDocRangePositions, DocCanvasPopManagerService } from './services/doc-popup-manager.service';
107
112
  export type { IDocPrintPreparationContext } from './services/doc-print-interceptor.service';
108
113
  export { DocPrintInterceptorService } from './services/doc-print-interceptor.service';
@@ -110,8 +115,10 @@ export type { IDocPrintComponentContext, IDocPrintContext } from './services/doc
110
115
  export { DocsRenderService } from './services/docs-render.service';
111
116
  export { Editor } from './services/editor/editor';
112
117
  export { EditorService, IEditorService } from './services/editor/editor-manager.service';
118
+ export type { IEditorRuntimeConfig } from './services/editor/editor-runtime-config';
113
119
  export { DocFloatMenuService } from './services/float-menu.service';
114
120
  export { isInSameTableCell, isValidRectRange, NodePositionConvertToRectRange, } from './services/selection/convert-rect-range';
121
+ export { findDocRangeNodePositions } from './services/selection/convert-text-range';
115
122
  export { NodePositionConvertToCursor } from './services/selection/convert-text-range';
116
123
  export { getOneTextSelectionRange } from './services/selection/convert-text-range';
117
124
  export type { IEditorInputConfig } from './services/selection/doc-selection-render.service';
@@ -123,6 +130,8 @@ export { getAnchorBounding, getLineBounding, TEXT_RANGE_LAYER_INDEX, TextRange }
123
130
  export { whenDocAndEditorFocused } from './shortcuts/utils';
124
131
  export { DOC_VERTICAL_PADDING } from './types/const/padding';
125
132
  export { BulletListTypePicker, OrderListTypePicker } from './views/list-type-picker/Picker';
133
+ export { MOBILE_DOC_ELEMENT_MENU, MobileDocElementMenu } from './views/mobile-element-menu/MobileDocElementMenu';
134
+ export { MobileRichTextEditor } from './views/mobile-rich-text-editor/MobileRichTextEditor';
126
135
  export { MobileRichTextToolbar } from './views/mobile-rich-text-toolbar/MobileRichTextToolbar';
127
136
  export type { IMobileRichTextToolbarProps } from './views/mobile-rich-text-toolbar/MobileRichTextToolbar';
128
137
  export { createEditorUndoRedoKeyboardConfig, executeEditorUndoRedoCommand, useEditor, useEditorClickOutside, useIsFocusing, useKeyboardEvent, useLeftAndRightArrow, useOnChange, useResize, } from './views/rich-text-editor/hooks';
@@ -15,12 +15,38 @@
15
15
  */
16
16
  declare const locale: {
17
17
  'docs-ui': {
18
+ pasteOptions: {
19
+ title: string;
20
+ source: string;
21
+ destination: string;
22
+ text: string;
23
+ useKeyboard: string;
24
+ useSystemPaste: string;
25
+ failed: string;
26
+ };
27
+ outline: {
28
+ title: string;
29
+ };
18
30
  objectPermission: {
19
31
  paragraphPermission: string;
20
32
  title: string;
21
33
  paragraph: string;
22
34
  section: string;
23
35
  };
36
+ mobile: {
37
+ insert: string;
38
+ edit: string;
39
+ done: string;
40
+ more: string;
41
+ back: string;
42
+ close: string;
43
+ format: string;
44
+ layout: string;
45
+ keyboard: string;
46
+ hideKeyboard: string;
47
+ expand: string;
48
+ collapse: string;
49
+ };
24
50
  layout: {
25
51
  progress: string;
26
52
  recovering: string;
@@ -106,6 +132,8 @@ declare const locale: {
106
132
  selection: string;
107
133
  wordCount: string;
108
134
  selectedWords: string;
135
+ currentPage: string;
136
+ currentPageOfTotal: string;
109
137
  pages: string;
110
138
  words: string;
111
139
  charactersWithoutSpaces: string;
@@ -176,6 +204,8 @@ declare const locale: {
176
204
  copy: string;
177
205
  cut: string;
178
206
  paste: string;
207
+ select: string;
208
+ selectAll: string;
179
209
  delete: string;
180
210
  bulletList: string;
181
211
  orderList: string;
@@ -20,6 +20,8 @@ export declare function CopyMenuFactory(accessor: IAccessor): IMenuButtonItem<Lo
20
20
  export declare function ParagraphSettingMenuFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
21
21
  export declare function CutMenuFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
22
22
  export declare function PasteMenuFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
23
+ export declare function SelectWordMenuFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
24
+ export declare function SelectAllMenuFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
23
25
  export declare function DeleteMenuFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
24
26
  export declare const TABLE_INSERT_MENU_ID = "doc.menu.table-insert";
25
27
  export declare function TableInsertMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<LocaleKey>;
@@ -33,3 +35,4 @@ export declare function TableDeleteMenuItemFactory(accessor: IAccessor): IMenuSe
33
35
  export declare function DeleteRowsMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
34
36
  export declare function DeleteColumnsMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
35
37
  export declare function DeleteTableMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
38
+ export declare function PasteSpecialMenuFactory(accessor: IAccessor): IMenuSelectorItem<LocaleKey>;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { MenuSchemaType } from '@univerjs/ui';
17
+ export declare const mobileMenuSchema: MenuSchemaType;