@univerjs/docs-ui 0.25.0 → 1.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/lib/cjs/facade.js +23 -183
  2. package/lib/cjs/index.js +7475 -5364
  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 +7934 -5853
  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 +7934 -5853
  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 +9 -0
  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 +39 -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/html-to-udm/converter.d.ts +1 -0
  89. package/lib/types/services/doc-event-manager.service.d.ts +15 -0
  90. package/lib/types/services/doc-ime-state-change-interceptor.service.d.ts +23 -0
  91. package/lib/types/services/doc-page-layout.service.d.ts +3 -1
  92. package/lib/types/services/doc-paragraph-menu.service.d.ts +26 -2
  93. package/lib/types/services/doc-render-background.d.ts +29 -0
  94. package/lib/types/services/doc-view-scale.d.ts +54 -0
  95. package/lib/types/services/doc-zoom.d.ts +20 -0
  96. package/lib/types/services/docs-render.service.d.ts +5 -2
  97. package/lib/types/services/editor/editor-manager.service.d.ts +8 -1
  98. package/lib/types/services/index.d.ts +2 -0
  99. package/lib/types/services/selection/selection-utils.d.ts +0 -15
  100. package/lib/types/services/{doc-content-insert.service.d.ts → selection/word-boundary.d.ts} +4 -10
  101. package/lib/types/shortcuts/core-editing.shortcut.d.ts +1 -0
  102. package/lib/types/shortcuts/cursor.shortcut.d.ts +12 -0
  103. package/lib/types/shortcuts/heading.shortcut.d.ts +22 -0
  104. package/lib/types/{types/delete-direction.d.ts → views/DocSideMenu.d.ts} +1 -4
  105. package/lib/types/views/Icon.d.ts +49 -0
  106. package/lib/types/views/{page-settings/index.d.ts → PageSettings.d.ts} +1 -1
  107. package/lib/types/views/ParagraphMenu.d.ts +62 -0
  108. package/lib/types/views/{rich-text-editor/index.d.ts → RichTextEditor.d.ts} +3 -3
  109. package/lib/types/{components/side-menu/index.d.ts → views/SideMenu.d.ts} +4 -3
  110. package/lib/types/views/count-bar/CountBar.d.ts +1 -1
  111. package/lib/types/views/count-bar/ZoomSlider.d.ts +1 -1
  112. package/lib/types/views/doc-footer/DocFooter.d.ts +1 -1
  113. package/lib/types/views/float-toolbar/FloatToolbar.d.ts +25 -0
  114. package/lib/types/{components → views}/float-toolbar/FloatToolbar.stories.d.ts +1 -1
  115. package/lib/types/views/header-footer/panel/DocHeaderFooterOptions.d.ts +1 -1
  116. package/lib/types/views/header-footer/panel/DocHeaderFooterPanel.d.ts +1 -1
  117. package/lib/types/{components → views}/list-type-picker/Picker.d.ts +3 -3
  118. package/lib/types/{components/float-toolbar/FloatToolbar.d.ts → views/paragraph-menu/component-keys.d.ts} +2 -5
  119. package/lib/types/views/paragraph-menu/theme-color.d.ts +17 -0
  120. package/lib/types/views/paragraph-setting/Setting.d.ts +1 -1
  121. package/lib/types/views/paragraph-setting/index.d.ts +1 -1
  122. package/lib/types/views/paragraph-setting/line-spacing.d.ts +51 -0
  123. package/lib/types/views/rich-text-editor/hooks/editor-undo-redo-keyboard.d.ts +32 -0
  124. package/lib/types/views/rich-text-editor/hooks/index.d.ts +1 -0
  125. package/lib/types/views/rich-text-editor/hooks/use-editor-click-outside.d.ts +2 -1
  126. package/lib/types/{components → views}/side-menu/SideMenu.stories.d.ts +5 -5
  127. package/lib/types/views/table/create/TableCreate.d.ts +1 -1
  128. package/lib/umd/facade.js +1 -5
  129. package/lib/umd/index.js +11 -26
  130. package/lib/umd/locale/ar-SA.js +1 -1
  131. package/lib/umd/locale/ca-ES.js +1 -1
  132. package/lib/umd/locale/de-DE.js +1 -1
  133. package/lib/umd/locale/en-US.js +1 -1
  134. package/lib/umd/locale/es-ES.js +1 -1
  135. package/lib/umd/locale/fa-IR.js +1 -1
  136. package/lib/umd/locale/fr-FR.js +1 -1
  137. package/lib/umd/locale/id-ID.js +1 -1
  138. package/lib/umd/locale/it-IT.js +1 -1
  139. package/lib/umd/locale/ja-JP.js +1 -1
  140. package/lib/umd/locale/ko-KR.js +1 -1
  141. package/lib/umd/locale/pl-PL.js +1 -1
  142. package/lib/umd/locale/pt-BR.js +1 -1
  143. package/lib/umd/locale/ru-RU.js +1 -1
  144. package/lib/umd/locale/sk-SK.js +1 -1
  145. package/lib/umd/locale/vi-VN.js +1 -1
  146. package/lib/umd/locale/zh-CN.js +1 -1
  147. package/lib/umd/locale/zh-HK.js +1 -1
  148. package/lib/umd/locale/zh-TW.js +1 -1
  149. package/package.json +12 -12
  150. package/lib/types/commands/commands/core-editing.command.d.ts +0 -58
  151. package/lib/types/components/paragraph-menu/index.d.ts +0 -41
  152. package/lib/types/facade/f-univer.d.ts +0 -52
  153. package/lib/types/services/doc-state-change-manager.service.d.ts +0 -50
  154. /package/lib/types/{components → views}/const.d.ts +0 -0
  155. /package/lib/types/{components → views}/editor/utils.d.ts +0 -0
  156. /package/lib/types/{components → views}/list-type-picker/index.d.ts +0 -0
@@ -15,46 +15,76 @@
15
15
  */
16
16
  import type { IAccessor } from '@univerjs/core';
17
17
  import type { IMenuButtonItem, IMenuItem, IMenuSelectorItem } from '@univerjs/ui';
18
- import type { ComponentType } from 'react';
19
- import { NamedStyleType } from '@univerjs/core';
20
- export declare const HEADING_ICON_MAP: Record<NamedStyleType, {
21
- key: string;
22
- component: ComponentType<{
23
- className: string;
24
- }>;
25
- }>;
26
- export declare function shouldShowParagraphHeadingOption(headingType: NamedStyleType, currentType?: NamedStyleType): boolean;
27
- export declare const H1HeadingMenuItemFactory: (accessor: IAccessor) => IMenuItem;
28
- export declare const H2HeadingMenuItemFactory: (accessor: IAccessor) => IMenuItem;
29
- export declare const H3HeadingMenuItemFactory: (accessor: IAccessor) => IMenuItem;
30
- export declare const H4HeadingMenuItemFactory: (accessor: IAccessor) => IMenuItem;
31
- export declare const H5HeadingMenuItemFactory: (accessor: IAccessor) => IMenuItem;
32
- export declare const NormalTextHeadingMenuItemFactory: (accessor: IAccessor) => IMenuItem;
33
- export declare const TitleHeadingMenuItemFactory: (accessor: IAccessor) => IMenuItem;
34
- export declare const SubtitleHeadingMenuItemFactory: (accessor: IAccessor) => IMenuItem;
18
+ import type { LocaleKey } from '../locale/types';
19
+ export declare const TEXT_COLORS: string[];
20
+ export declare const TEXT_COLOR_SWATCH_ICONS: readonly ["DocParagraphTextColorSwatchIcon.0", "DocParagraphTextColorSwatchIcon.1", "DocParagraphTextColorSwatchIcon.2", "DocParagraphTextColorSwatchIcon.3", "DocParagraphTextColorSwatchIcon.4", "DocParagraphTextColorSwatchIcon.5", "DocParagraphTextColorSwatchIcon.6"];
21
+ export declare const BACKGROUND_COLOR_SWATCH_ICONS: readonly ["DocParagraphBackgroundColorSwatchIcon.0", "DocParagraphBackgroundColorSwatchIcon.1", "DocParagraphBackgroundColorSwatchIcon.2", "DocParagraphBackgroundColorSwatchIcon.3", "DocParagraphBackgroundColorSwatchIcon.4", "DocParagraphBackgroundColorSwatchIcon.5", "DocParagraphBackgroundColorSwatchIcon.6", "DocParagraphBackgroundColorSwatchIcon.7", "DocParagraphBackgroundColorSwatchIcon.8", "DocParagraphBackgroundColorSwatchIcon.9", "DocParagraphBackgroundColorSwatchIcon.10", "DocParagraphBackgroundColorSwatchIcon.11", "DocParagraphBackgroundColorSwatchIcon.12", "DocParagraphBackgroundColorSwatchIcon.13", "DocParagraphBackgroundColorSwatchIcon.14", "DocParagraphBackgroundColorSwatchIcon.15"];
22
+ export declare function H1HeadingMenuItemFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
23
+ export declare function H2HeadingMenuItemFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
24
+ export declare function H3HeadingMenuItemFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
25
+ export declare function H4HeadingMenuItemFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
26
+ export declare function H5HeadingMenuItemFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
27
+ export declare function NormalTextHeadingMenuItemFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
28
+ export declare function TitleHeadingMenuItemFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
29
+ export declare function SubtitleHeadingMenuItemFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
35
30
  export declare const EMPTY_PARAGRAPH_MENU_ID = "doc.menu.empty-paragraph";
36
- export declare const EmptyParagraphH1MenuItemFactory: (accessor: IAccessor) => IMenuButtonItem;
37
- export declare const EmptyParagraphH2MenuItemFactory: (accessor: IAccessor) => IMenuButtonItem;
38
- export declare const EmptyParagraphH3MenuItemFactory: (accessor: IAccessor) => IMenuButtonItem;
39
- export declare const EmptyParagraphH4MenuItemFactory: (accessor: IAccessor) => IMenuButtonItem;
40
- export declare const EmptyParagraphH5MenuItemFactory: (accessor: IAccessor) => IMenuButtonItem;
41
- export declare const EmptyParagraphNormalTextMenuItemFactory: (accessor: IAccessor) => IMenuButtonItem;
42
- export declare const EmptyParagraphOrderListMenuItemFactory: (accessor: IAccessor) => IMenuButtonItem;
43
- export declare const EmptyParagraphBulletListMenuItemFactory: (accessor: IAccessor) => IMenuButtonItem;
44
- export declare const EmptyParagraphCheckListMenuItemFactory: (accessor: IAccessor) => IMenuButtonItem;
45
- export declare const EmptyParagraphHorizontalLineMenuItemFactory: (accessor: IAccessor) => IMenuButtonItem;
46
- export declare const CopyCurrentParagraphMenuItemFactory: (accessor: IAccessor) => IMenuItem;
47
- export declare const CutCurrentParagraphMenuItemFactory: (accessor: IAccessor) => IMenuItem;
48
- export declare const DeleteCurrentParagraphMenuItemFactory: (accessor: IAccessor) => IMenuItem;
49
- export declare const InsertBulletListBellowMenuItemFactory: (accessor: IAccessor) => IMenuItem;
50
- export declare const InsertOrderListBellowMenuItemFactory: (accessor: IAccessor) => IMenuItem;
51
- export declare const InsertCheckListBellowMenuItemFactory: (accessor: IAccessor) => IMenuItem;
52
- export declare const InsertHorizontalLineBellowMenuItemFactory: (accessor: IAccessor) => IMenuItem;
31
+ export declare function EmptyParagraphH1MenuItemFactory(): IMenuButtonItem<LocaleKey>;
32
+ export declare function EmptyParagraphH2MenuItemFactory(): IMenuButtonItem<LocaleKey>;
33
+ export declare function EmptyParagraphH3MenuItemFactory(): IMenuButtonItem<LocaleKey>;
34
+ export declare function EmptyParagraphH4MenuItemFactory(): IMenuButtonItem<LocaleKey>;
35
+ export declare function EmptyParagraphH5MenuItemFactory(): IMenuButtonItem<LocaleKey>;
36
+ export declare function EmptyParagraphNormalTextMenuItemFactory(): IMenuButtonItem<LocaleKey>;
37
+ export declare function EmptyParagraphOrderListMenuItemFactory(): IMenuButtonItem<LocaleKey>;
38
+ export declare function EmptyParagraphBulletListMenuItemFactory(): IMenuButtonItem<LocaleKey>;
39
+ export declare function EmptyParagraphCheckListMenuItemFactory(): IMenuButtonItem<LocaleKey>;
40
+ export declare function EmptyParagraphHorizontalLineMenuItemFactory(): IMenuButtonItem<LocaleKey>;
41
+ export declare function CopyCurrentParagraphMenuItemFactory(): IMenuItem<LocaleKey>;
42
+ export declare function CutCurrentParagraphMenuItemFactory(): IMenuItem<LocaleKey>;
43
+ export declare function DeleteCurrentParagraphMenuItemFactory(): IMenuItem<LocaleKey>;
44
+ export declare function InsertBulletListBellowMenuItemFactory(): IMenuItem<LocaleKey>;
45
+ export declare function InsertOrderListBellowMenuItemFactory(): IMenuItem<LocaleKey>;
46
+ export declare function InsertCheckListBellowMenuItemFactory(): IMenuItem<LocaleKey>;
47
+ export declare function InsertHorizontalLineBellowMenuItemFactory(): IMenuItem<LocaleKey>;
53
48
  export declare const INSERT_BELLOW_MENU_ID = "doc.menu.insert-bellow";
54
49
  export declare const DOC_CONTENT_INSERT_MENU_ID = "doc.menu.content-insert";
55
50
  export declare const DOC_TABLE_BLOCK_MENU_ID = "doc.menu.table-block";
51
+ export declare const DOC_PARAGRAPH_T_INSERT_MENU_ID = "doc.menu.paragraph-t.insert";
52
+ export declare const DOC_PARAGRAPH_T_EDIT_MENU_ID = "doc.menu.paragraph-t.edit";
53
+ export declare const DOC_PARAGRAPH_T_DIVIDER_MENU_ID = "doc.menu.paragraph-t.divider";
54
+ export declare const DOC_PARAGRAPH_T_ALIGN_MENU_ID = "doc.menu.paragraph-t.align";
55
+ export declare const DOC_PARAGRAPH_T_COLORS_MENU_ID = "doc.menu.paragraph-t.colors";
56
+ export declare const DOC_PARAGRAPH_T_INSERT_BELOW_MENU_ID = "doc.menu.paragraph-t.insert-below";
57
+ export declare const DOC_PARAGRAPH_T_RESET_COLORS_ID = "doc.menu.paragraph-t.reset-colors";
58
+ export declare const DOC_PARAGRAPH_T_INDENT_INCREASE_ID = "doc.menu.paragraph-t.indent.increase";
59
+ export declare const DOC_PARAGRAPH_T_INDENT_DECREASE_ID = "doc.menu.paragraph-t.indent.decrease";
60
+ export declare const DOC_PARAGRAPH_T_INSERT_BELOW_COMMAND_ID = "doc.menu.paragraph-t.insert-below.command";
56
61
  export declare function getDocBlockRangeMenuId(blockType: string): string;
57
- export declare const TableBlockCopyMenuItemFactory: (accessor: IAccessor) => IMenuItem;
58
- export declare const TableBlockPasteMenuItemFactory: (accessor: IAccessor) => IMenuItem;
59
- export declare const TableBlockDeleteMenuItemFactory: (accessor: IAccessor) => IMenuItem;
60
- export declare function DocInsertBellowMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<string>;
62
+ export declare function TableBlockCopyMenuItemFactory(): IMenuItem<LocaleKey>;
63
+ export declare function TableBlockPasteMenuItemFactory(): IMenuItem<LocaleKey>;
64
+ export declare function TableBlockDeleteMenuItemFactory(): IMenuItem<LocaleKey>;
65
+ export declare function DocInsertBellowMenuItemFactory(): IMenuSelectorItem<LocaleKey>;
66
+ export declare function ParagraphMenuAlignSubmenuItemFactory(accessor: IAccessor): IMenuSelectorItem<LocaleKey>;
67
+ export declare function ParagraphMenuColorsSubmenuItemFactory(accessor: IAccessor): IMenuSelectorItem<LocaleKey>;
68
+ export declare function ParagraphMenuTextColorHeaderActionMenuItemFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
69
+ export declare function ParagraphMenuBackgroundColorHeaderActionMenuItemFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
70
+ export declare function ParagraphMenuInsertBelowSubmenuItemFactory(accessor: IAccessor): IMenuSelectorItem<LocaleKey>;
71
+ export declare function ParagraphMenuInsertBelowHeadingH1MenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
72
+ export declare function ParagraphMenuInsertBelowHeadingH2MenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
73
+ export declare function ParagraphMenuInsertBelowHeadingH3MenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
74
+ export declare function ParagraphMenuInsertBelowHeadingH4MenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
75
+ export declare function ParagraphMenuInsertBelowHeadingH5MenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
76
+ export declare function ParagraphMenuInsertBelowTableMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
77
+ export declare function ParagraphMenuIndentIncreaseMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
78
+ export declare function ParagraphMenuIndentDecreaseMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
79
+ export declare function ParagraphMenuDefaultTextColorMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
80
+ export declare function ParagraphMenuNoBackgroundMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
81
+ export declare function ParagraphMenuResetTextColorMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
82
+ export declare function ParagraphMenuResetColorsMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
83
+ export declare const ParagraphMenuTextColorSwatchMenuItemFactories: Record<string, {
84
+ order: number;
85
+ menuItemFactory: (accessor: IAccessor) => IMenuButtonItem<LocaleKey>;
86
+ }>;
87
+ export declare const ParagraphMenuBackgroundColorSwatchMenuItemFactories: Record<string, {
88
+ order: number;
89
+ menuItemFactory: (accessor: IAccessor) => IMenuButtonItem<LocaleKey>;
90
+ }>;
@@ -28,6 +28,7 @@ export declare class HtmlToUDMService {
28
28
  private _afterProcessRules;
29
29
  private _listStack;
30
30
  private _lastParagraphIndex;
31
+ private _createParagraphId;
31
32
  convert(html: string, metaConfig?: {
32
33
  unitId?: string;
33
34
  }): Partial<IDocumentData>;
@@ -30,6 +30,16 @@ export interface IBulletBound {
30
30
  paragraph: IParagraph;
31
31
  }
32
32
  export declare const calcDocGlyphPosition: (glyph: IDocumentSkeletonGlyph, documents: Documents, skeleton: DocumentSkeleton, pageIndex?: number) => IBoundRectNoAngle | undefined;
33
+ export declare function getListMarkerFallbackHit(paragraphBound: Pick<IMutiPageParagraphBound, 'firstLine' | 'pageIndex' | 'rect' | 'segmentId'>, paragraph: Pick<IParagraph, 'bullet' | 'startIndex'> | undefined, point: {
34
+ x: number;
35
+ y: number;
36
+ }): IBulletBound | null;
37
+ export declare function getListParagraphContextMenuHit(paragraphBound: Pick<IMutiPageParagraphBound, 'firstLine' | 'pageIndex' | 'rect' | 'segmentId'>, paragraph: Pick<IParagraph, 'bullet' | 'startIndex'> | undefined, point: {
38
+ x: number;
39
+ y: number;
40
+ }): IBulletBound | null;
41
+ export declare function isChecklistListType(listType?: string): boolean;
42
+ export declare function getListMarkerFallbackBound(paragraphBound: Pick<IMutiPageParagraphBound, 'firstLine' | 'pageIndex' | 'rect' | 'segmentId'>, paragraph: Pick<IParagraph, 'bullet' | 'startIndex'> | undefined): IBulletBound | null;
33
43
  interface ICustomRangeActive {
34
44
  range: ICustomRange;
35
45
  segmentId?: string;
@@ -144,19 +154,24 @@ export declare class DocEventManagerService extends Disposable implements IRende
144
154
  private _initResetDirty;
145
155
  private _initEvents;
146
156
  isPointerOnBullet(offsetX: number, offsetY: number): boolean;
157
+ isPointerOnNonChecklistBullet(offsetX: number, offsetY: number): boolean;
147
158
  getBulletBounds(): IBulletBound[];
159
+ getListContextMenuBulletByOffset(offsetX: number, offsetY: number): Nullable<IBulletBound>;
148
160
  private _buildCustomRangeBoundsBySegment;
149
161
  private _buildCustomRangeBounds;
150
162
  private _calcActiveRanges;
151
163
  private _buildBulletBoundsBySegment;
152
164
  private _buildBulletBounds;
153
165
  private _calcActiveBullet;
166
+ private _calcActiveListParagraph;
167
+ private _getParagraphByStartIndex;
154
168
  private _buildParagraphBoundsBySegment;
155
169
  private _buildParagraphBounds;
156
170
  private _calcActiveParagraph;
157
171
  private _calcActiveParagraphLeft;
158
172
  get paragraphBounds(): Map<number, IMutiPageParagraphBound>;
159
173
  get tableBounds(): Map<string, ITableBound>;
174
+ findTableCellBound(tableId: string, rowIndex: number, colIndex: number, pageIndex?: number): ITableCellBound | undefined;
160
175
  findParagraphBoundByIndex(index: number): IMutiPageParagraphBound | ITableParagraphBound | undefined;
161
176
  findParagraphBoundsInRange(startIndex: number, endIndex: number): IMutiPageParagraphBound[];
162
177
  private _getTableViewportSignature;
@@ -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 { Nullable } from '@univerjs/core';
17
+ import type { IDocStateChangeInfo, IDocStateChangeInterceptorService } from '@univerjs/docs';
18
+ import { IRenderManagerService } from '@univerjs/engine-render';
19
+ export declare class DocIMEStateChangeInterceptorService implements IDocStateChangeInterceptorService {
20
+ private readonly _renderManagerService;
21
+ constructor(_renderManagerService: IRenderManagerService);
22
+ transformChangeStateInfo(changeStateInfo: IDocStateChangeInfo): Nullable<IDocStateChangeInfo>;
23
+ }
@@ -16,8 +16,10 @@
16
16
  import type { DocumentDataModel } from '@univerjs/core';
17
17
  import type { IRenderContext, IRenderModule } from '@univerjs/engine-render';
18
18
  import { Disposable } from '@univerjs/core';
19
+ import { DocViewScaleService } from './doc-view-scale';
19
20
  export declare class DocPageLayoutService extends Disposable implements IRenderModule {
20
21
  private _context;
21
- constructor(_context: IRenderContext<DocumentDataModel>);
22
+ private readonly _docViewScaleService;
23
+ constructor(_context: IRenderContext<DocumentDataModel>, _docViewScaleService: DocViewScaleService);
22
24
  calculatePagePosition(): this | undefined;
23
25
  }
@@ -14,13 +14,14 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import type { DocumentDataModel, ICustomBlock, ICustomTable, IDocumentBlockRange } from '@univerjs/core';
17
- import type { IRenderContext, IRenderModule } from '@univerjs/engine-render';
17
+ import type { IBoundRectNoAngle, IRenderContext, IRenderModule } from '@univerjs/engine-render';
18
18
  import type { IMutiPageParagraphBound, ITableBound } from './doc-event-manager.service';
19
19
  import { Disposable } from '@univerjs/core';
20
20
  import { DocSelectionManagerService, DocSkeletonManagerService } from '@univerjs/docs';
21
21
  import { DocEventManagerService } from './doc-event-manager.service';
22
22
  import { DocCanvasPopManagerService } from './doc-popup-manager.service';
23
23
  import { DocFloatMenuService } from './float-menu.service';
24
+ import { DocSelectionRenderService } from './selection/doc-selection-render.service';
24
25
  export type DocBlockMenuTargetKind = 'paragraph' | 'blockRange' | 'table' | 'customBlock';
25
26
  export interface IDocBlockMenuTarget {
26
27
  kind: DocBlockMenuTargetKind;
@@ -55,6 +56,11 @@ export interface IDocBlockDropTarget {
55
56
  bottom: number;
56
57
  };
57
58
  }
59
+ export interface IDocSlashMenuRequest {
60
+ anchorRect: IBoundRectNoAngle;
61
+ nonce: number;
62
+ target: IDocBlockMenuTarget;
63
+ }
58
64
  export declare class DocParagraphMenuService extends Disposable implements IRenderModule {
59
65
  private _context;
60
66
  private _docSelectionManagerService;
@@ -62,20 +68,38 @@ export declare class DocParagraphMenuService extends Disposable implements IRend
62
68
  private _docPopupManagerService;
63
69
  private _docSkeletonManagerService;
64
70
  private _floatMenuService;
71
+ private _docSelectionRenderService;
65
72
  private _paragrahMenu;
66
73
  private readonly _activeTarget$;
67
74
  readonly activeTarget$: import("rxjs").Observable<IDocBlockMenuTarget | null>;
75
+ private readonly _slashMenuRequest$;
76
+ readonly slashMenuRequest$: import("rxjs").Observable<IDocSlashMenuRequest | null>;
68
77
  private _isBlockMenuDragging;
78
+ private _isSlashMenuActive;
79
+ private _slashMenuRequestNonce;
69
80
  get activeParagraph(): IMutiPageParagraphBound | undefined;
70
81
  get activeTarget(): IDocBlockMenuTarget | null;
71
82
  setBlockMenuDragging(isDragging: boolean): void;
72
83
  get isBlockMenuDragging(): boolean;
73
- constructor(_context: IRenderContext<DocumentDataModel>, _docSelectionManagerService: DocSelectionManagerService, _docEventManagerService: DocEventManagerService, _docPopupManagerService: DocCanvasPopManagerService, _docSkeletonManagerService: DocSkeletonManagerService, _floatMenuService: DocFloatMenuService);
84
+ constructor(_context: IRenderContext<DocumentDataModel>, _docSelectionManagerService: DocSelectionManagerService, _docEventManagerService: DocEventManagerService, _docPopupManagerService: DocCanvasPopManagerService, _docSkeletonManagerService: DocSkeletonManagerService, _floatMenuService: DocFloatMenuService, _docSelectionRenderService: DocSelectionRenderService);
74
85
  private _isCursorInActiveParagraph;
86
+ private _getExpandedSelectionState;
87
+ private _hasExpandedSelectionRanges;
88
+ private _hasExpandedTextSelection;
89
+ private _hasExpandedSelection;
75
90
  setParagraphMenuActive(active: boolean): void;
76
91
  private _init;
92
+ private _handleSlashMenuKeydown;
93
+ private _handleSlashMenuInputBefore;
94
+ private _openSlashMenu;
95
+ private _shouldOpenSlashMenu;
96
+ private _shouldOpenSlashMenuFromInput;
97
+ private _getCollapsedTextRange;
98
+ private _getSlashMenuParagraph;
99
+ private _getSlashMenuAnchorRect;
77
100
  showParagraphMenu(paragraph: IMutiPageParagraphBound): void;
78
101
  showTableMenu(tableBound: ITableBound): void;
102
+ private _shouldKeepCurrentCellMenuForTable;
79
103
  getDropTargetFromClientPoint(clientX: number, clientY: number, sourceRange: {
80
104
  startOffset: number;
81
105
  endOffset: number;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { ICanvasColorService } from '@univerjs/engine-render';
17
+ import { DocumentFlavor } from '@univerjs/core';
18
+ export interface IResolveDocRenderBackgroundOptions {
19
+ documentFlavor?: DocumentFlavor;
20
+ canvasColorService?: ICanvasColorService;
21
+ editorBackgroundColor?: string;
22
+ isEditor?: boolean;
23
+ }
24
+ export interface IResolvedDocRenderBackground {
25
+ canvasElementBackgroundColor: string;
26
+ docBackgroundFillColor?: string;
27
+ }
28
+ export declare function resolveDocRenderBackground(options: IResolveDocRenderBackgroundOptions): IResolvedDocRenderBackground;
29
+ export declare function getDefaultDocCanvasBackgroundColor(documentFlavor?: DocumentFlavor, isEditor?: boolean): "#fff" | "transparent" | "#fafafa";
@@ -0,0 +1,54 @@
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 { IDocFitToWidthOptions, IUniverDocsUIConfig } from '../config/config';
19
+ import { Disposable, DocumentFlavor, IConfigService } from '@univerjs/core';
20
+ export interface ICalcDocFitToWidthScaleParams {
21
+ availableWidth: number;
22
+ baseWidth: number;
23
+ options?: IDocFitToWidthOptions;
24
+ }
25
+ export interface IResolveDocFitBaseWidthParams {
26
+ documentFlavor?: DocumentFlavor;
27
+ documentStylePageWidth?: number;
28
+ skeletonPageWidth?: number;
29
+ }
30
+ export declare function normalizeDocFitToWidthOptions(options?: IDocFitToWidthOptions): {
31
+ mode: import("..").DocFitMode;
32
+ target: import("..").DocFitTarget;
33
+ paddingX: import("../config/config").DocFitPaddingX;
34
+ minScale: number;
35
+ maxScale?: number;
36
+ align: import("..").DocFitAlign;
37
+ };
38
+ export declare function resolveDocFitPaddingX(availableWidth: number, paddingX: IDocFitToWidthOptions['paddingX']): number;
39
+ export declare function calcDocFitToWidthScale(params: ICalcDocFitToWidthScaleParams): number;
40
+ export declare function resolveDocFitBaseWidth(params: IResolveDocFitBaseWidthParams): number;
41
+ export declare function resolveDocViewScale(userZoomRatio: number, fitToWidthScale: number): number;
42
+ export declare class DocViewScaleService extends Disposable implements IRenderModule {
43
+ private readonly _context;
44
+ private readonly _configService;
45
+ constructor(_context: IRenderContext<DocumentDataModel>, _configService: IConfigService);
46
+ getPluginConfig(): Partial<IUniverDocsUIConfig>;
47
+ getOptions(): IDocFitToWidthOptions;
48
+ getBaseWidth(): number;
49
+ getAvailableWidth(): number;
50
+ getUserZoomRatio(): number;
51
+ getFitToWidthScale(): number;
52
+ getViewScale(userZoomRatio?: number): number;
53
+ private _resolveContainer;
54
+ }
@@ -0,0 +1,20 @@
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
+ export declare const DEFAULT_MODERN_DOC_ZOOM_RATIO = 1;
18
+ type DocZoomSource = Pick<DocumentDataModel, 'getSettings' | 'getSnapshot'>;
19
+ export declare function getDocEffectiveZoomRatio(documentModel: DocZoomSource): number;
20
+ export {};
@@ -13,9 +13,12 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { DocumentFlavor, IUniverInstanceService, RxDisposable } from '@univerjs/core';
16
+ import type { DocumentFlavor } from '@univerjs/core';
17
+ import type { ICanvasColorService } from '@univerjs/engine-render';
18
+ import { IUniverInstanceService, RxDisposable } from '@univerjs/core';
17
19
  import { IRenderManagerService } from '@univerjs/engine-render';
18
- export declare function getDocsCanvasBackgroundColor(documentFlavor?: DocumentFlavor): "#fff" | "#fafafa";
20
+ export { resolveDocRenderBackground as resolveDocsCanvasBackground } from './doc-render-background';
21
+ export declare function getDocsCanvasBackgroundColor(documentFlavor?: DocumentFlavor, canvasColorService?: ICanvasColorService, editorBackgroundColor?: string, isEditor?: boolean): string;
19
22
  export declare class DocsRenderService extends RxDisposable {
20
23
  private readonly _instanceSrv;
21
24
  private readonly _renderManagerService;
@@ -16,11 +16,15 @@
16
16
  import type { IDisposable, IDocumentBody, Nullable } from '@univerjs/core';
17
17
  import type { ISuccinctDocRangeParam } from '@univerjs/engine-render';
18
18
  import type { Observable } from 'rxjs';
19
- import type { IEditorConfigParams } from './editor';
19
+ import type { IEditorCanvasStyle, IEditorConfigParams } from './editor';
20
20
  import { Disposable, ICommandService, IContextService, Injector, IUndoRedoService, IUniverInstanceService } from '@univerjs/core';
21
21
  import { DocSelectionManagerService } from '@univerjs/docs';
22
22
  import { IRenderManagerService } from '@univerjs/engine-render';
23
23
  import { Editor } from './editor';
24
+ export interface IEditorRenderConfig {
25
+ canvasStyle: IEditorCanvasStyle;
26
+ scrollBar?: boolean;
27
+ }
24
28
  export interface IEditorSetValueParam {
25
29
  editorUnitId: string;
26
30
  body: IDocumentBody;
@@ -34,6 +38,7 @@ export interface IEditorService {
34
38
  register(config: IEditorConfigParams, container: HTMLDivElement): IDisposable;
35
39
  getAllEditor(): Map<string, Editor>;
36
40
  isEditor(editorUnitId: string): boolean;
41
+ getEditorRenderConfig(editorUnitId: string): Nullable<IEditorRenderConfig>;
37
42
  isSheetEditor(editorUnitId: string): boolean;
38
43
  blur$: Observable<unknown>;
39
44
  blur(force?: boolean): void;
@@ -51,6 +56,7 @@ export declare class EditorService extends Disposable implements IEditorService,
51
56
  private readonly _undoRedoService;
52
57
  private readonly _injector;
53
58
  private _editors;
59
+ private _editorRenderConfigs;
54
60
  private _focusEditorUnitId;
55
61
  private readonly _blur$;
56
62
  readonly blur$: Observable<unknown>;
@@ -69,6 +75,7 @@ export declare class EditorService extends Disposable implements IEditorService,
69
75
  dispose(): void;
70
76
  getEditor(id?: string): Readonly<Nullable<Editor>>;
71
77
  getAllEditor(): Map<string, Editor>;
78
+ getEditorRenderConfig(editorUnitId: string): Nullable<IEditorRenderConfig>;
72
79
  register(config: IEditorConfigParams, container: HTMLDivElement): IDisposable;
73
80
  private _unRegister;
74
81
  private _getCurrentEditorUnitId;
@@ -17,3 +17,5 @@ export { default as PastePluginLark } from './clipboard/html-to-udm/paste-plugin
17
17
  export { default as PastePluginUniver } from './clipboard/html-to-udm/paste-plugins/plugin-univer';
18
18
  export { default as PastePluginWord } from './clipboard/html-to-udm/paste-plugins/plugin-word';
19
19
  export { type IPastePlugin } from './clipboard/html-to-udm/paste-plugins/type';
20
+ export { calcDocFitToWidthScale, DocViewScaleService, normalizeDocFitToWidthOptions, resolveDocFitBaseWidth, resolveDocViewScale } from './doc-view-scale';
21
+ export type { ICalcDocFitToWidthScaleParams, IResolveDocFitBaseWidthParams } from './doc-view-scale';
@@ -1,18 +1,3 @@
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
1
  /**
17
2
  * Copyright 2023-present DreamNum Co., Ltd.
18
3
  *
@@ -13,16 +13,10 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { Disposable } from '@univerjs/core';
17
- export interface IDocContentInsertRange {
18
- unitId: string;
16
+ import { Direction } from '@univerjs/core';
17
+ export interface IWordBoundary {
19
18
  startOffset: number;
20
19
  endOffset: number;
21
- segmentId?: string;
22
- }
23
- export declare class DocContentInsertService extends Disposable {
24
- private _range;
25
- setInsertRange(range: IDocContentInsertRange): void;
26
- consumeInsertRange(unitId?: string): IDocContentInsertRange | null;
27
- clearInsertRange(): void;
28
20
  }
21
+ export declare function getWordBoundaryByIndex(content: string, nodeIndex: number, paragraphStartOffset: number): IWordBoundary | null;
22
+ export declare function getNextWordBoundaryOffset(content: string, nodeIndex: number, paragraphStartOffset: number, direction: Direction): number | null;
@@ -15,5 +15,6 @@
15
15
  */
16
16
  import type { IShortcutItem } from '@univerjs/ui';
17
17
  export declare const BreakLineShortcut: IShortcutItem;
18
+ export declare const SoftBreakLineShortcut: IShortcutItem;
18
19
  export declare const DeleteLeftShortcut: IShortcutItem;
19
20
  export declare const DeleteRightShortcut: IShortcutItem;
@@ -22,4 +22,16 @@ export declare const MoveSelectionUpShortcut: IShortcutItem;
22
22
  export declare const MoveSelectionDownShortcut: IShortcutItem;
23
23
  export declare const MoveSelectionLeftShortcut: IShortcutItem;
24
24
  export declare const MoveSelectionRightShortcut: IShortcutItem;
25
+ export declare const MoveCursorLineStartShortcut: IShortcutItem<object>;
26
+ export declare const MoveCursorLineEndShortcut: IShortcutItem<object>;
27
+ export declare const MoveSelectionLineStartShortcut: IShortcutItem<object>;
28
+ export declare const MoveSelectionLineEndShortcut: IShortcutItem<object>;
29
+ export declare const MoveCursorDocumentStartShortcut: IShortcutItem<object>;
30
+ export declare const MoveCursorDocumentEndShortcut: IShortcutItem<object>;
31
+ export declare const MoveSelectionDocumentStartShortcut: IShortcutItem<object>;
32
+ export declare const MoveSelectionDocumentEndShortcut: IShortcutItem<object>;
33
+ export declare const MoveCursorWordLeftShortcut: IShortcutItem<object>;
34
+ export declare const MoveCursorWordRightShortcut: IShortcutItem<object>;
35
+ export declare const MoveSelectionWordLeftShortcut: IShortcutItem<object>;
36
+ export declare const MoveSelectionWordRightShortcut: IShortcutItem<object>;
25
37
  export declare const SelectAllShortcut: IShortcutItem;
@@ -0,0 +1,22 @@
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 { IShortcutItem } from '@univerjs/ui';
17
+ export declare const NormalTextHeadingShortcut: IShortcutItem<object>;
18
+ export declare const H1HeadingShortcut: IShortcutItem<object>;
19
+ export declare const H2HeadingShortcut: IShortcutItem<object>;
20
+ export declare const H3HeadingShortcut: IShortcutItem<object>;
21
+ export declare const H4HeadingShortcut: IShortcutItem<object>;
22
+ export declare const H5HeadingShortcut: IShortcutItem<object>;
@@ -13,7 +13,4 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- export declare enum DeleteDirection {
17
- LEFT = 0,
18
- RIGHT = 1
19
- }
16
+ export declare function DocSideMenu(): import("react").JSX.Element | null;
@@ -0,0 +1,49 @@
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 { IconType, IIconProps } from '@univerjs/ui';
17
+ type ColorSwatchIconProps = IIconProps & {
18
+ color: string;
19
+ };
20
+ export declare function TitleTypeIcon({ className, style, onClick }: IIconProps): import("react").JSX.Element;
21
+ export declare function SubtitleTypeIcon({ className, style, onClick }: IIconProps): import("react").JSX.Element;
22
+ export declare function TextColorSwatchIcon({ className, style, onClick, color }: ColorSwatchIconProps): import("react").JSX.Element;
23
+ export declare function BackgroundColorSwatchIcon({ className, style, onClick, color }: ColorSwatchIconProps): import("react").JSX.Element;
24
+ export declare function HeaderTextColorIcon({ className, style, onClick, extend }: IIconProps): import("react").JSX.Element;
25
+ export declare function DefaultTextColorIcon({ className, style, onClick }: IIconProps): import("react").JSX.Element;
26
+ export declare const DocParagraphTextColorSwatchIcon0: IconType;
27
+ export declare const DocParagraphTextColorSwatchIcon1: IconType;
28
+ export declare const DocParagraphTextColorSwatchIcon2: IconType;
29
+ export declare const DocParagraphTextColorSwatchIcon3: IconType;
30
+ export declare const DocParagraphTextColorSwatchIcon4: IconType;
31
+ export declare const DocParagraphTextColorSwatchIcon5: IconType;
32
+ export declare const DocParagraphTextColorSwatchIcon6: IconType;
33
+ export declare const DocParagraphBackgroundColorSwatchIcon0: IconType;
34
+ export declare const DocParagraphBackgroundColorSwatchIcon1: IconType;
35
+ export declare const DocParagraphBackgroundColorSwatchIcon2: IconType;
36
+ export declare const DocParagraphBackgroundColorSwatchIcon3: IconType;
37
+ export declare const DocParagraphBackgroundColorSwatchIcon4: IconType;
38
+ export declare const DocParagraphBackgroundColorSwatchIcon5: IconType;
39
+ export declare const DocParagraphBackgroundColorSwatchIcon6: IconType;
40
+ export declare const DocParagraphBackgroundColorSwatchIcon7: IconType;
41
+ export declare const DocParagraphBackgroundColorSwatchIcon8: IconType;
42
+ export declare const DocParagraphBackgroundColorSwatchIcon9: IconType;
43
+ export declare const DocParagraphBackgroundColorSwatchIcon10: IconType;
44
+ export declare const DocParagraphBackgroundColorSwatchIcon11: IconType;
45
+ export declare const DocParagraphBackgroundColorSwatchIcon12: IconType;
46
+ export declare const DocParagraphBackgroundColorSwatchIcon13: IconType;
47
+ export declare const DocParagraphBackgroundColorSwatchIcon14: IconType;
48
+ export declare const DocParagraphBackgroundColorSwatchIcon15: IconType;
49
+ export {};
@@ -35,5 +35,5 @@ export interface IPageSettings {
35
35
  height: number;
36
36
  };
37
37
  }
38
- export declare function PageSettings(props: IConfirmChildrenProps): import("react/jsx-runtime").JSX.Element;
38
+ export declare function PageSettings(props: IConfirmChildrenProps): import("react").JSX.Element;
39
39
  export declare const PAGE_SETTING_COMPONENT_ID = "docs.component.page-setting";