@univerjs/docs-ui 1.0.0-rc.0 → 1.0.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.
- package/README.md +27 -0
- package/lib/cjs/index.js +27388 -23213
- package/lib/cjs/locale/ar-SA.js +28 -1
- package/lib/cjs/locale/ca-ES.js +28 -1
- package/lib/cjs/locale/de-DE.js +28 -1
- package/lib/cjs/locale/en-US.js +28 -1
- package/lib/cjs/locale/es-ES.js +28 -1
- package/lib/cjs/locale/fa-IR.js +28 -1
- package/lib/cjs/locale/fr-FR.js +28 -1
- package/lib/cjs/locale/id-ID.js +28 -1
- package/lib/cjs/locale/it-IT.js +28 -1
- package/lib/cjs/locale/ja-JP.js +28 -1
- package/lib/cjs/locale/ko-KR.js +28 -1
- package/lib/cjs/locale/pl-PL.js +28 -1
- package/lib/cjs/locale/pt-BR.js +28 -1
- package/lib/cjs/locale/ru-RU.js +28 -1
- package/lib/cjs/locale/sk-SK.js +28 -1
- package/lib/cjs/locale/vi-VN.js +28 -1
- package/lib/cjs/locale/zh-CN.js +28 -1
- package/lib/cjs/locale/zh-HK.js +28 -1
- package/lib/cjs/locale/zh-TW.js +28 -1
- package/lib/es/index.js +26448 -22297
- package/lib/es/locale/ar-SA.js +28 -0
- package/lib/es/locale/ca-ES.js +28 -0
- package/lib/es/locale/de-DE.js +28 -0
- package/lib/es/locale/en-US.js +28 -0
- package/lib/es/locale/es-ES.js +28 -0
- package/lib/es/locale/fa-IR.js +28 -0
- package/lib/es/locale/fr-FR.js +28 -0
- package/lib/es/locale/id-ID.js +28 -0
- package/lib/es/locale/it-IT.js +28 -0
- package/lib/es/locale/ja-JP.js +28 -0
- package/lib/es/locale/ko-KR.js +28 -0
- package/lib/es/locale/pl-PL.js +28 -0
- package/lib/es/locale/pt-BR.js +28 -0
- package/lib/es/locale/ru-RU.js +28 -0
- package/lib/es/locale/sk-SK.js +28 -0
- package/lib/es/locale/vi-VN.js +28 -0
- package/lib/es/locale/zh-CN.js +28 -0
- package/lib/es/locale/zh-HK.js +28 -0
- package/lib/es/locale/zh-TW.js +28 -0
- package/lib/index.css +322 -84
- package/lib/index.js +26448 -22297
- package/lib/locale/ar-SA.js +28 -0
- package/lib/locale/ca-ES.js +28 -0
- package/lib/locale/de-DE.js +28 -0
- package/lib/locale/en-US.js +28 -0
- package/lib/locale/es-ES.js +28 -0
- package/lib/locale/fa-IR.js +28 -0
- package/lib/locale/fr-FR.js +28 -0
- package/lib/locale/id-ID.js +28 -0
- package/lib/locale/it-IT.js +28 -0
- package/lib/locale/ja-JP.js +28 -0
- package/lib/locale/ko-KR.js +28 -0
- package/lib/locale/pl-PL.js +28 -0
- package/lib/locale/pt-BR.js +28 -0
- package/lib/locale/ru-RU.js +28 -0
- package/lib/locale/sk-SK.js +28 -0
- package/lib/locale/vi-VN.js +28 -0
- package/lib/locale/zh-CN.js +28 -0
- package/lib/locale/zh-HK.js +28 -0
- package/lib/locale/zh-TW.js +28 -0
- package/lib/types/basics/paragraph.d.ts +4 -1
- package/lib/types/basics/transform-position.d.ts +18 -0
- package/lib/types/commands/commands/clipboard.command.d.ts +9 -2
- package/lib/types/commands/commands/clipboard.inner.command.d.ts +1 -1
- package/lib/types/commands/commands/core-editing.command.d.ts +58 -0
- package/lib/types/commands/commands/doc-select-all.command.d.ts +1 -0
- package/lib/types/commands/commands/format-painter.command.d.ts +33 -0
- package/lib/types/commands/commands/table/doc-table-delete.command.d.ts +1 -0
- package/lib/types/components/const.d.ts +16 -0
- package/lib/types/components/doc-page-render-component.d.ts +21 -0
- package/lib/types/components/editor/utils.d.ts +22 -0
- package/lib/types/components/float-toolbar/FloatToolbar.d.ts +20 -0
- package/lib/types/components/float-toolbar/FloatToolbar.stories.d.ts +22 -0
- package/lib/types/components/list-type-picker/Picker.d.ts +30 -0
- package/lib/types/components/list-type-picker/index.d.ts +18 -0
- package/lib/types/components/paragraph-menu/index.d.ts +41 -0
- package/lib/types/components/side-menu/SideMenu.stories.d.ts +31 -0
- package/lib/types/components/side-menu/index.d.ts +41 -0
- package/lib/types/config/config.d.ts +2 -0
- package/lib/types/consts/mobile-context.d.ts +17 -0
- package/lib/types/controllers/doc-header-footer.controller.d.ts +3 -6
- package/lib/types/controllers/doc-move-cursor.controller.d.ts +1 -0
- package/lib/types/controllers/doc-ui.controller.d.ts +36 -0
- package/lib/types/controllers/format-painter.controller.d.ts +23 -0
- package/lib/types/controllers/mobile/components.controller.d.ts +25 -0
- package/lib/types/controllers/mobile/ui.controller.d.ts +29 -0
- package/lib/types/controllers/render-controllers/back-scroll.render-controller.d.ts +4 -3
- package/lib/types/controllers/render-controllers/doc-paragraph-placeholder.render-controller.d.ts +4 -3
- package/lib/types/controllers/render-controllers/doc-paste-options.render-controller.d.ts +27 -0
- package/lib/types/controllers/render-controllers/doc-selection-render.controller.d.ts +2 -0
- package/lib/types/controllers/render-controllers/doc-selection-render.util.d.ts +21 -0
- package/lib/types/controllers/render-controllers/doc.render-controller.d.ts +19 -5
- package/lib/types/controllers/render-controllers/format-painter.render-controller.d.ts +23 -0
- package/lib/types/controllers/render-controllers/mobile/back-scroll.render-controller.d.ts +30 -0
- package/lib/types/controllers/render-controllers/mobile/doc-pinch-zoom.d.ts +51 -0
- package/lib/types/controllers/render-controllers/mobile/doc-selection-render.controller.d.ts +73 -0
- package/lib/types/controllers/render-controllers/mobile/doc.render-controller.d.ts +36 -0
- package/lib/types/controllers/render-controllers/mobile/zoom.render-controller.d.ts +30 -0
- package/lib/types/controllers/render-controllers/zoom.render-controller.d.ts +8 -6
- package/lib/types/facade/f-univer.d.ts +52 -0
- package/lib/types/index.d.ts +10 -1
- package/lib/types/locale/en-US.d.ts +30 -0
- package/lib/types/menu/context-menu.d.ts +3 -0
- package/lib/types/menu/mobile-schema.d.ts +17 -0
- package/lib/types/mobile-plugin.d.ts +36 -0
- package/lib/types/services/clipboard/clipboard.service.d.ts +53 -20
- package/lib/types/services/clipboard/paste-options.d.ts +33 -0
- package/lib/types/services/doc-content-insert.service.d.ts +28 -0
- package/lib/types/services/doc-contextual-ribbon.service.d.ts +29 -0
- package/lib/types/services/doc-event-manager.service.d.ts +3 -0
- package/lib/types/services/doc-mobile-element-menu.service.d.ts +44 -0
- package/lib/types/services/doc-page-layout.service.d.ts +3 -0
- package/lib/types/services/doc-paragraph-menu.service.d.ts +3 -2
- package/lib/types/services/doc-popup-manager.service.d.ts +1 -0
- package/lib/types/services/doc-state-change-manager.service.d.ts +50 -0
- package/lib/types/services/doc-view-scale.d.ts +1 -1
- package/lib/types/services/editor/editor-manager.service.d.ts +2 -0
- package/lib/types/services/editor/editor-runtime-config.d.ts +24 -0
- package/lib/types/services/editor/editor.d.ts +9 -0
- package/lib/types/services/float-menu.service.d.ts +12 -4
- package/lib/types/services/mobile/doc-selection-render.service.d.ts +60 -0
- package/lib/types/services/mobile/doc-view-scale.d.ts +19 -0
- package/lib/types/services/mobile/float-menu.service.d.ts +20 -0
- package/lib/types/services/mobile/mobile-text-selection-visuals.d.ts +32 -0
- package/lib/types/services/selection/convert-text-range.d.ts +7 -0
- package/lib/types/services/selection/doc-selection-render.service.d.ts +38 -21
- package/lib/types/types/delete-direction.d.ts +19 -0
- package/lib/types/views/DocPasteOptions.d.ts +17 -0
- package/lib/types/views/Icon.d.ts +0 -3
- package/lib/types/views/PageSettings.d.ts +5 -1
- package/lib/types/views/ParagraphMenu.d.ts +1 -2
- package/lib/types/views/RichTextEditor.d.ts +20 -1
- package/lib/types/views/SideMenu.d.ts +1 -0
- package/lib/types/views/doc-statistics/DocPageStatus.d.ts +30 -0
- package/lib/types/views/float-toolbar/FloatToolbar.d.ts +1 -0
- package/lib/types/views/header-footer/content-cover.d.ts +30 -0
- package/lib/types/views/header-footer/panel/DocHeaderFooterOptions.d.ts +4 -0
- package/lib/types/views/header-footer/panel/DocHeaderFooterPanel.d.ts +2 -1
- package/lib/types/views/header-footer/panel/use-header-footer-options.d.ts +25 -0
- package/lib/types/views/mobile/MobileDocCanvasViewport.d.ts +20 -0
- package/lib/types/views/mobile/MobileDocPasteOptions.d.ts +21 -0
- package/lib/types/views/mobile/MobileDocSettings.d.ts +20 -0
- package/lib/types/views/mobile-doc-toolbar/MobileDocToolbar.d.ts +30 -0
- package/lib/types/views/mobile-element-menu/MobileDocElementMenu.d.ts +25 -0
- package/lib/types/views/mobile-rich-text-editor/MobileRichTextEditor.d.ts +33 -0
- package/lib/types/views/page-settings/index.d.ts +39 -0
- package/lib/types/views/paragraph-setting/Setting.d.ts +30 -1
- package/lib/types/views/paragraph-setting/hook/utils.d.ts +4 -0
- package/lib/types/views/paragraph-setting/index.d.ts +2 -1
- package/lib/types/views/rich-text-editor/hooks/use-editor.d.ts +8 -0
- package/lib/types/views/rich-text-editor/hooks/use-resize.d.ts +2 -1
- package/lib/types/views/rich-text-editor/index.d.ts +40 -0
- package/lib/types/views/section-setting/Setting.d.ts +12 -1
- package/lib/types/views/section-setting/index.d.ts +2 -1
- package/lib/types/views/side-menu/index.d.ts +16 -0
- package/lib/umd/index.js +19 -18
- package/lib/umd/locale/ar-SA.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/id-ID.js +1 -1
- package/lib/umd/locale/it-IT.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/pl-PL.js +1 -1
- package/lib/umd/locale/pt-BR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +13 -12
|
@@ -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 { PresetListType } from '@univerjs/core';
|
|
17
|
+
export interface IListTypePickerBaseProps {
|
|
18
|
+
value?: PresetListType;
|
|
19
|
+
onChange: (value: PresetListType | undefined) => void;
|
|
20
|
+
}
|
|
21
|
+
interface IListTypePickerProps extends IListTypePickerBaseProps {
|
|
22
|
+
options: {
|
|
23
|
+
value: PresetListType;
|
|
24
|
+
img: string;
|
|
25
|
+
}[];
|
|
26
|
+
}
|
|
27
|
+
export declare const ListTypePicker: (props: IListTypePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare const OrderListTypePicker: (props: IListTypePickerBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare const BulletListTypePicker: (props: IListTypePickerBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
export { BulletListTypePicker, OrderListTypePicker } from './Picker';
|
|
17
|
+
export declare const ORDER_LIST_TYPE_COMPONENT = "UI_PLUGIN_DOCS_ORDER_LIST_TYPE_COMPONENT";
|
|
18
|
+
export declare const BULLET_LIST_TYPE_COMPONENT = "UI_PLUGIN_DOCS_BULLET_LIST_TYPE_COMPONENT";
|
|
@@ -0,0 +1,41 @@
|
|
|
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 { ITextRangeWithStyle } from '@univerjs/engine-render';
|
|
17
|
+
import type { IPopup, IValueOption } from '@univerjs/ui';
|
|
18
|
+
import type { IMutiPageParagraphBound } from '../../services/doc-event-manager.service';
|
|
19
|
+
import type { IDocBlockMenuTarget } from '../../services/doc-paragraph-menu.service';
|
|
20
|
+
import { NamedStyleType } from '@univerjs/core';
|
|
21
|
+
export declare function getParagraphMenuIconSizeClass(iconKey: string): string;
|
|
22
|
+
export declare function getParagraphMenuPopupDirection(anchorLeft: number, menuWidth?: number, viewportPadding?: number): 'left' | 'right';
|
|
23
|
+
export declare const PARAGRAPH_MENU_HOVER_OPEN_DELAY = 260;
|
|
24
|
+
export declare function createParagraphMenuHoverOpenScheduler(openMenu: () => void, delay?: number): {
|
|
25
|
+
schedule(): void;
|
|
26
|
+
cancel: () => void;
|
|
27
|
+
openNow(): void;
|
|
28
|
+
};
|
|
29
|
+
export declare function isEmptyParagraphMenuTarget(dataStream: string, paragraph?: IMutiPageParagraphBound | null | void): boolean;
|
|
30
|
+
export declare function getParagraphMenuTargetRange(paragraph?: IMutiPageParagraphBound | null | void): ITextRangeWithStyle | null;
|
|
31
|
+
export declare function getParagraphMenuActiveHeadingCommandId(namedStyleType?: NamedStyleType): string;
|
|
32
|
+
export declare function getParagraphMenuHiddenHeadingCommandIds(namedStyleType?: NamedStyleType): string[];
|
|
33
|
+
export declare function getParagraphMenuCommand(params: IValueOption, targetRange?: ITextRangeWithStyle | null): {
|
|
34
|
+
commandId?: string;
|
|
35
|
+
params?: object;
|
|
36
|
+
};
|
|
37
|
+
export declare function shouldShowParagraphSettingMenu(target: IDocBlockMenuTarget | null | undefined): boolean;
|
|
38
|
+
export declare const ParagraphMenu: ({ popup }: {
|
|
39
|
+
popup: IPopup;
|
|
40
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export declare function shouldUseInsertBelowRange(commandId: string, params: IValueOption): boolean;
|
|
@@ -0,0 +1,31 @@
|
|
|
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 { Meta } from '@storybook/react';
|
|
17
|
+
import { SideMenu } from './index';
|
|
18
|
+
declare const meta: Meta<typeof SideMenu>;
|
|
19
|
+
export default meta;
|
|
20
|
+
export declare const SideMenuBasic: {
|
|
21
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
};
|
|
23
|
+
export declare const EmptySideMenu: {
|
|
24
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
};
|
|
26
|
+
export declare const CustomStyledSideMenu: {
|
|
27
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
};
|
|
29
|
+
export declare const MultiLevelSideMenu: {
|
|
30
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
export interface ISideMenuItem {
|
|
17
|
+
text: string;
|
|
18
|
+
level: number;
|
|
19
|
+
id: string;
|
|
20
|
+
isTitle?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface ISideMenuProps {
|
|
23
|
+
menus?: ISideMenuItem[];
|
|
24
|
+
onClick?: (menu: ISideMenuItem) => void;
|
|
25
|
+
className?: string;
|
|
26
|
+
style?: React.CSSProperties;
|
|
27
|
+
mode?: 'float' | 'side-bar';
|
|
28
|
+
maxHeight: number;
|
|
29
|
+
activeId?: string;
|
|
30
|
+
open?: boolean;
|
|
31
|
+
onOpenChange?: (open: boolean) => void;
|
|
32
|
+
maxWidth?: number;
|
|
33
|
+
wrapperClass?: string;
|
|
34
|
+
wrapperStyle?: React.CSSProperties;
|
|
35
|
+
iconClass?: string;
|
|
36
|
+
iconStyle?: React.CSSProperties;
|
|
37
|
+
}
|
|
38
|
+
export interface ISideMenuInstance {
|
|
39
|
+
scrollTo: (id: string) => void;
|
|
40
|
+
}
|
|
41
|
+
export declare const SideMenu: import("react").ForwardRefExoticComponent<ISideMenuProps & import("react").RefAttributes<ISideMenuInstance>>;
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
import type { DependencyOverride } from '@univerjs/core';
|
|
17
17
|
import type { MenuConfig } from '@univerjs/ui';
|
|
18
18
|
export declare const DOCS_UI_PLUGIN_CONFIG_KEY = "docs-ui.config";
|
|
19
|
+
export declare const DOCS_UI_PLUGIN_NAME = "DOC_UI_PLUGIN";
|
|
19
20
|
export declare const configSymbol: unique symbol;
|
|
20
21
|
export type DocFitMode = 'none' | 'fit-width';
|
|
21
22
|
export type DocFitTarget = 'viewport' | 'container';
|
|
@@ -41,3 +42,4 @@ export interface IUniverDocsUIConfig {
|
|
|
41
42
|
}
|
|
42
43
|
export declare const DEFAULT_DOC_FIT_TO_WIDTH_OPTIONS: Required<Omit<IDocFitToWidthOptions, 'maxScale'>> & Pick<IDocFitToWidthOptions, 'maxScale'>;
|
|
43
44
|
export declare const defaultPluginConfig: IUniverDocsUIConfig;
|
|
45
|
+
export declare const defaultPluginMobileConfig: IUniverDocsUIConfig;
|
|
@@ -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
|
+
export declare const DOC_CARET_MENU_ID = "docs.contextMenu.caret";
|
|
17
|
+
export declare const MOBILE_DOC_PINCH_ZOOMING = "MOBILE_DOC_PINCH_ZOOMING";
|
|
@@ -15,24 +15,22 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import type { DocumentDataModel } from '@univerjs/core';
|
|
17
17
|
import type { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
18
|
-
import { Disposable, ICommandService,
|
|
18
|
+
import { Disposable, ICommandService, LocaleService, ThemeService } from '@univerjs/core';
|
|
19
19
|
import { DocSkeletonManagerService } from '@univerjs/docs';
|
|
20
|
-
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
21
20
|
import { IEditorService } from '../services/editor/editor-manager.service';
|
|
22
21
|
import { DocSelectionRenderService } from '../services/selection/doc-selection-render.service';
|
|
23
22
|
export declare class DocHeaderFooterController extends Disposable implements IRenderModule {
|
|
24
23
|
private readonly _context;
|
|
25
24
|
private readonly _commandService;
|
|
26
25
|
private readonly _editorService;
|
|
27
|
-
private readonly _instanceSrv;
|
|
28
|
-
private readonly _renderManagerService;
|
|
29
26
|
private readonly _docSkeletonManagerService;
|
|
30
27
|
private readonly _docSelectionRenderService;
|
|
31
28
|
private readonly _localeService;
|
|
32
29
|
private readonly _themeService;
|
|
33
30
|
private _loadedMap;
|
|
31
|
+
private _contentCover?;
|
|
34
32
|
private _headerFooterColors;
|
|
35
|
-
constructor(_context: IRenderContext<DocumentDataModel>, _commandService: ICommandService, _editorService: IEditorService,
|
|
33
|
+
constructor(_context: IRenderContext<DocumentDataModel>, _commandService: ICommandService, _editorService: IEditorService, _docSkeletonManagerService: DocSkeletonManagerService, _docSelectionRenderService: DocSelectionRenderService, _localeService: LocaleService, _themeService: ThemeService);
|
|
36
34
|
private _initialize;
|
|
37
35
|
private _initThemeColors;
|
|
38
36
|
dispose(): void;
|
|
@@ -42,7 +40,6 @@ export declare class DocHeaderFooterController extends Disposable implements IRe
|
|
|
42
40
|
private _getTransformCoordForDocumentOffset;
|
|
43
41
|
private _drawHeaderFooterLabel;
|
|
44
42
|
private _drawHeaderFooterPage;
|
|
45
|
-
private _drawHeaderFooterCover;
|
|
46
43
|
private _drawHeaderFooterGuides;
|
|
47
44
|
private _isEditorReadOnly;
|
|
48
45
|
private _isTraditionalMode;
|
|
@@ -27,6 +27,7 @@ export declare class DocMoveCursorController extends Disposable {
|
|
|
27
27
|
private _commandExecutedListener;
|
|
28
28
|
private _handleShiftMoveSelection;
|
|
29
29
|
private _handleMoveCursor;
|
|
30
|
+
private _deferUnmaterializedCursorMove;
|
|
30
31
|
private _getCursorOffsetByGranularity;
|
|
31
32
|
private _getParagraphBoundaryOffset;
|
|
32
33
|
private _getCurrentParagraphStartOffset;
|
|
@@ -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 { Disposable, ICommandService, IConfigService, Injector, IUniverInstanceService } from '@univerjs/core';
|
|
17
|
+
import { ComponentManager, ILayoutService, IMenuManagerService, IShortcutService, IUIPartsService } from '@univerjs/ui';
|
|
18
|
+
export declare class DocUIController extends Disposable {
|
|
19
|
+
protected readonly _injector: Injector;
|
|
20
|
+
protected readonly _componentManager: ComponentManager;
|
|
21
|
+
protected readonly _commandService: ICommandService;
|
|
22
|
+
protected readonly _layoutService: ILayoutService;
|
|
23
|
+
protected readonly _menuManagerService: IMenuManagerService;
|
|
24
|
+
protected readonly _uiPartsService: IUIPartsService;
|
|
25
|
+
protected readonly _univerInstanceService: IUniverInstanceService;
|
|
26
|
+
protected readonly _shortcutService: IShortcutService;
|
|
27
|
+
protected readonly _configService: IConfigService;
|
|
28
|
+
constructor(_injector: Injector, _componentManager: ComponentManager, _commandService: ICommandService, _layoutService: ILayoutService, _menuManagerService: IMenuManagerService, _uiPartsService: IUIPartsService, _univerInstanceService: IUniverInstanceService, _shortcutService: IShortcutService, _configService: IConfigService);
|
|
29
|
+
private _initCustomComponents;
|
|
30
|
+
private _initUiParts;
|
|
31
|
+
private _initMenus;
|
|
32
|
+
private _initShortCut;
|
|
33
|
+
private _init;
|
|
34
|
+
private _initCommands;
|
|
35
|
+
private _initFocusHandler;
|
|
36
|
+
}
|
|
@@ -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 { Disposable, ICommandService, IContextService, IPermissionService, IUniverInstanceService } from '@univerjs/core';
|
|
17
|
+
import { DocSelectionManagerService } from '@univerjs/docs';
|
|
18
|
+
import { FormatPainterSessionService } from '@univerjs/ui';
|
|
19
|
+
import { DocMenuStyleService } from '../services/doc-menu-style.service';
|
|
20
|
+
import { IEditorService } from '../services/editor/editor-manager.service';
|
|
21
|
+
export declare class DocFormatPainterController extends Disposable {
|
|
22
|
+
constructor(session: FormatPainterSessionService, selections: DocSelectionManagerService, styles: DocMenuStyleService, instances: IUniverInstanceService, context: IContextService, permissions: IPermissionService, editors: IEditorService, commands: ICommandService);
|
|
23
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { Disposable } from '@univerjs/core';
|
|
17
|
+
import { ComponentManager, IconManager } from '@univerjs/ui';
|
|
18
|
+
export declare class MobileComponentsController extends Disposable {
|
|
19
|
+
protected readonly _componentManager: ComponentManager;
|
|
20
|
+
private readonly _iconManager;
|
|
21
|
+
constructor(_componentManager: ComponentManager, _iconManager: IconManager);
|
|
22
|
+
private _registerParts;
|
|
23
|
+
private _registerIcons;
|
|
24
|
+
protected _registerComponents(): void;
|
|
25
|
+
}
|
|
@@ -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 { Disposable, ICommandService, Injector } from '@univerjs/core';
|
|
17
|
+
import { ILayoutService, IMenuManagerService, IUIPartsService } from '@univerjs/ui';
|
|
18
|
+
export declare class DocMobileUIController extends Disposable {
|
|
19
|
+
private readonly _injector;
|
|
20
|
+
private readonly _commandService;
|
|
21
|
+
private readonly _layoutService;
|
|
22
|
+
private readonly _menuManagerService;
|
|
23
|
+
private readonly _uiPartsService;
|
|
24
|
+
constructor(_injector: Injector, _commandService: ICommandService, _layoutService: ILayoutService, _menuManagerService: IMenuManagerService, _uiPartsService: IUIPartsService);
|
|
25
|
+
private _initUiParts;
|
|
26
|
+
private _initMenus;
|
|
27
|
+
private _initFocusHandler;
|
|
28
|
+
private _initCommands;
|
|
29
|
+
}
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
48
|
+
protected _getVerticalScrollDelta(top: number, height: number, boundTop: number, boundBottom: number, delta: number): number;
|
|
49
|
+
protected _scrollToSelection(): void;
|
|
49
50
|
}
|
package/lib/types/controllers/render-controllers/doc-paragraph-placeholder.render-controller.d.ts
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
48
|
+
protected readonly _context: IRenderContext<DocumentDataModel>;
|
|
38
49
|
private readonly _commandService;
|
|
39
50
|
private readonly _docSelectionRenderService;
|
|
40
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
+
}
|