@univerjs/docs-ui 1.1.0 → 1.2.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 +45 -0
- package/lib/cjs/index.js +527 -106
- package/lib/cjs/locale/ar-SA.js +4 -0
- package/lib/cjs/locale/ca-ES.js +4 -0
- package/lib/cjs/locale/de-DE.js +4 -0
- package/lib/cjs/locale/en-US.js +4 -0
- package/lib/cjs/locale/es-ES.js +4 -0
- package/lib/cjs/locale/fa-IR.js +4 -0
- package/lib/cjs/locale/fr-FR.js +4 -0
- package/lib/cjs/locale/id-ID.js +4 -0
- package/lib/cjs/locale/it-IT.js +4 -0
- package/lib/cjs/locale/ja-JP.js +4 -0
- package/lib/cjs/locale/ko-KR.js +4 -0
- package/lib/cjs/locale/pl-PL.js +4 -0
- package/lib/cjs/locale/pt-BR.js +4 -0
- package/lib/cjs/locale/ru-RU.js +4 -0
- package/lib/cjs/locale/sk-SK.js +4 -0
- package/lib/cjs/locale/vi-VN.js +4 -0
- package/lib/cjs/locale/zh-CN.js +4 -0
- package/lib/cjs/locale/zh-HK.js +4 -0
- package/lib/cjs/locale/zh-TW.js +4 -0
- package/lib/es/index.js +529 -108
- package/lib/es/locale/ar-SA.js +4 -0
- package/lib/es/locale/ca-ES.js +4 -0
- package/lib/es/locale/de-DE.js +4 -0
- package/lib/es/locale/en-US.js +4 -0
- package/lib/es/locale/es-ES.js +4 -0
- package/lib/es/locale/fa-IR.js +4 -0
- package/lib/es/locale/fr-FR.js +4 -0
- package/lib/es/locale/id-ID.js +4 -0
- package/lib/es/locale/it-IT.js +4 -0
- package/lib/es/locale/ja-JP.js +4 -0
- package/lib/es/locale/ko-KR.js +4 -0
- package/lib/es/locale/pl-PL.js +4 -0
- package/lib/es/locale/pt-BR.js +4 -0
- package/lib/es/locale/ru-RU.js +4 -0
- package/lib/es/locale/sk-SK.js +4 -0
- package/lib/es/locale/vi-VN.js +4 -0
- package/lib/es/locale/zh-CN.js +4 -0
- package/lib/es/locale/zh-HK.js +4 -0
- package/lib/es/locale/zh-TW.js +4 -0
- package/lib/index.css +36 -78
- package/lib/index.js +529 -108
- package/lib/locale/ar-SA.js +4 -0
- package/lib/locale/ca-ES.js +4 -0
- package/lib/locale/de-DE.js +4 -0
- package/lib/locale/en-US.js +4 -0
- package/lib/locale/es-ES.js +4 -0
- package/lib/locale/fa-IR.js +4 -0
- package/lib/locale/fr-FR.js +4 -0
- package/lib/locale/id-ID.js +4 -0
- package/lib/locale/it-IT.js +4 -0
- package/lib/locale/ja-JP.js +4 -0
- package/lib/locale/ko-KR.js +4 -0
- package/lib/locale/pl-PL.js +4 -0
- package/lib/locale/pt-BR.js +4 -0
- package/lib/locale/ru-RU.js +4 -0
- package/lib/locale/sk-SK.js +4 -0
- package/lib/locale/vi-VN.js +4 -0
- package/lib/locale/zh-CN.js +4 -0
- package/lib/locale/zh-HK.js +4 -0
- package/lib/locale/zh-TW.js +4 -0
- package/lib/types/config/config.d.ts +5 -0
- package/lib/types/locale/en-US.d.ts +4 -0
- package/lib/types/plugin.d.ts +1 -1
- package/lib/types/services/clipboard/clipboard.service.d.ts +1 -1
- package/lib/types/services/doc-heading-collapse.service.d.ts +38 -0
- package/lib/types/services/doc-paragraph-menu.service.d.ts +1 -1
- package/lib/types/services/doc-popup-manager.service.d.ts +4 -1
- package/lib/types/views/ParagraphMenu.d.ts +2 -2
- package/lib/types/views/doc-side-menu-layout.d.ts +17 -0
- package/lib/types/views/heading-collapse-shape.d.ts +38 -0
- package/lib/types/views/paragraph-setting/hook/utils.d.ts +2 -0
- package/lib/umd/index.js +12 -12
- 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 +12 -12
package/lib/locale/ar-SA.js
CHANGED
|
@@ -216,6 +216,10 @@ const locale = { "docs-ui": {
|
|
|
216
216
|
defaultTextColor: "لون النص الافتراضي",
|
|
217
217
|
noBackground: "بدون خلفية"
|
|
218
218
|
},
|
|
219
|
+
heading: {
|
|
220
|
+
collapse: "طي",
|
|
221
|
+
expand: "توسيع"
|
|
222
|
+
},
|
|
219
223
|
"page-settings": {
|
|
220
224
|
"document-setting": "إعداد المستند",
|
|
221
225
|
"modern-width": "عرض المحتوى",
|
package/lib/locale/ca-ES.js
CHANGED
|
@@ -216,6 +216,10 @@ const locale = { "docs-ui": {
|
|
|
216
216
|
defaultTextColor: "Color de text predeterminat",
|
|
217
217
|
noBackground: "Sense fons"
|
|
218
218
|
},
|
|
219
|
+
heading: {
|
|
220
|
+
collapse: "Redueix",
|
|
221
|
+
expand: "Expandeix"
|
|
222
|
+
},
|
|
219
223
|
"page-settings": {
|
|
220
224
|
"document-setting": "Configuració de document",
|
|
221
225
|
"modern-width": "Amplada del contingut",
|
package/lib/locale/de-DE.js
CHANGED
|
@@ -216,6 +216,10 @@ const locale = { "docs-ui": {
|
|
|
216
216
|
defaultTextColor: "Standardtextfarbe",
|
|
217
217
|
noBackground: "Kein Hintergrund"
|
|
218
218
|
},
|
|
219
|
+
heading: {
|
|
220
|
+
collapse: "Einklappen",
|
|
221
|
+
expand: "Ausklappen"
|
|
222
|
+
},
|
|
219
223
|
"page-settings": {
|
|
220
224
|
"document-setting": "Dokumenteneinstellung",
|
|
221
225
|
"modern-width": "Inhaltsbreite",
|
package/lib/locale/en-US.js
CHANGED
|
@@ -231,6 +231,10 @@ const locale = { "docs-ui": {
|
|
|
231
231
|
defaultTextColor: "Default text color",
|
|
232
232
|
noBackground: "No background"
|
|
233
233
|
},
|
|
234
|
+
heading: {
|
|
235
|
+
collapse: "Collapse",
|
|
236
|
+
expand: "Expand"
|
|
237
|
+
},
|
|
234
238
|
"page-settings": {
|
|
235
239
|
"document-setting": "Page Setup",
|
|
236
240
|
"modern-width": "Content width",
|
package/lib/locale/es-ES.js
CHANGED
|
@@ -216,6 +216,10 @@ const locale = { "docs-ui": {
|
|
|
216
216
|
defaultTextColor: "Color de texto predeterminado",
|
|
217
217
|
noBackground: "Sin fondo"
|
|
218
218
|
},
|
|
219
|
+
heading: {
|
|
220
|
+
collapse: "Contraer",
|
|
221
|
+
expand: "Expandir"
|
|
222
|
+
},
|
|
219
223
|
"page-settings": {
|
|
220
224
|
"document-setting": "Configuración de documento",
|
|
221
225
|
"modern-width": "Ancho del contenido",
|
package/lib/locale/fa-IR.js
CHANGED
|
@@ -216,6 +216,10 @@ const locale = { "docs-ui": {
|
|
|
216
216
|
defaultTextColor: "رنگ پیشفرض متن",
|
|
217
217
|
noBackground: "بدون پسزمینه"
|
|
218
218
|
},
|
|
219
|
+
heading: {
|
|
220
|
+
collapse: "جمع کردن",
|
|
221
|
+
expand: "باز کردن"
|
|
222
|
+
},
|
|
219
223
|
"page-settings": {
|
|
220
224
|
"document-setting": "تنظیمات سند",
|
|
221
225
|
"modern-width": "عرض محتوا",
|
package/lib/locale/fr-FR.js
CHANGED
|
@@ -216,6 +216,10 @@ const locale = { "docs-ui": {
|
|
|
216
216
|
defaultTextColor: "Couleur de texte par défaut",
|
|
217
217
|
noBackground: "Aucun arrière-plan"
|
|
218
218
|
},
|
|
219
|
+
heading: {
|
|
220
|
+
collapse: "Réduire",
|
|
221
|
+
expand: "Développer"
|
|
222
|
+
},
|
|
219
223
|
"page-settings": {
|
|
220
224
|
"document-setting": "Paramètres du document",
|
|
221
225
|
"modern-width": "Largeur du contenu",
|
package/lib/locale/id-ID.js
CHANGED
|
@@ -216,6 +216,10 @@ const locale = { "docs-ui": {
|
|
|
216
216
|
defaultTextColor: "Warna teks default",
|
|
217
217
|
noBackground: "Tanpa latar belakang"
|
|
218
218
|
},
|
|
219
|
+
heading: {
|
|
220
|
+
collapse: "Ciutkan",
|
|
221
|
+
expand: "Perluas"
|
|
222
|
+
},
|
|
219
223
|
"page-settings": {
|
|
220
224
|
"document-setting": "Pengaturan Dokumen",
|
|
221
225
|
"modern-width": "Lebar konten",
|
package/lib/locale/it-IT.js
CHANGED
|
@@ -216,6 +216,10 @@ const locale = { "docs-ui": {
|
|
|
216
216
|
defaultTextColor: "Colore testo predefinito",
|
|
217
217
|
noBackground: "Nessuno sfondo"
|
|
218
218
|
},
|
|
219
|
+
heading: {
|
|
220
|
+
collapse: "Comprimi",
|
|
221
|
+
expand: "Espandi"
|
|
222
|
+
},
|
|
219
223
|
"page-settings": {
|
|
220
224
|
"document-setting": "Impostazione Documento",
|
|
221
225
|
"modern-width": "Larghezza contenuto",
|
package/lib/locale/ja-JP.js
CHANGED
package/lib/locale/ko-KR.js
CHANGED
package/lib/locale/pl-PL.js
CHANGED
|
@@ -216,6 +216,10 @@ const locale = { "docs-ui": {
|
|
|
216
216
|
defaultTextColor: "Domyślny kolor tekstu",
|
|
217
217
|
noBackground: "Brak tła"
|
|
218
218
|
},
|
|
219
|
+
heading: {
|
|
220
|
+
collapse: "Zwiń",
|
|
221
|
+
expand: "Rozwiń"
|
|
222
|
+
},
|
|
219
223
|
"page-settings": {
|
|
220
224
|
"document-setting": "Ustawienia dokumentu",
|
|
221
225
|
"modern-width": "Szerokość treści",
|
package/lib/locale/pt-BR.js
CHANGED
|
@@ -216,6 +216,10 @@ const locale = { "docs-ui": {
|
|
|
216
216
|
defaultTextColor: "Cor de texto padrão",
|
|
217
217
|
noBackground: "Sem plano de fundo"
|
|
218
218
|
},
|
|
219
|
+
heading: {
|
|
220
|
+
collapse: "Recolher",
|
|
221
|
+
expand: "Expandir"
|
|
222
|
+
},
|
|
219
223
|
"page-settings": {
|
|
220
224
|
"document-setting": "Configuração do documento",
|
|
221
225
|
"modern-width": "Largura do conteúdo",
|
package/lib/locale/ru-RU.js
CHANGED
|
@@ -216,6 +216,10 @@ const locale = { "docs-ui": {
|
|
|
216
216
|
defaultTextColor: "Цвет текста по умолчанию",
|
|
217
217
|
noBackground: "Без фона"
|
|
218
218
|
},
|
|
219
|
+
heading: {
|
|
220
|
+
collapse: "Свернуть",
|
|
221
|
+
expand: "Развернуть"
|
|
222
|
+
},
|
|
219
223
|
"page-settings": {
|
|
220
224
|
"document-setting": "Настройки документа",
|
|
221
225
|
"modern-width": "Ширина содержимого",
|
package/lib/locale/sk-SK.js
CHANGED
|
@@ -216,6 +216,10 @@ const locale = { "docs-ui": {
|
|
|
216
216
|
defaultTextColor: "Predvolená farba textu",
|
|
217
217
|
noBackground: "Bez pozadia"
|
|
218
218
|
},
|
|
219
|
+
heading: {
|
|
220
|
+
collapse: "Zbaliť",
|
|
221
|
+
expand: "Rozbaliť"
|
|
222
|
+
},
|
|
219
223
|
"page-settings": {
|
|
220
224
|
"document-setting": "Nastavenia dokumentu",
|
|
221
225
|
"modern-width": "Šírka obsahu",
|
package/lib/locale/vi-VN.js
CHANGED
|
@@ -216,6 +216,10 @@ const locale = { "docs-ui": {
|
|
|
216
216
|
defaultTextColor: "Màu văn bản mặc định",
|
|
217
217
|
noBackground: "Không có nền"
|
|
218
218
|
},
|
|
219
|
+
heading: {
|
|
220
|
+
collapse: "Thu gọn",
|
|
221
|
+
expand: "Mở rộng"
|
|
222
|
+
},
|
|
219
223
|
"page-settings": {
|
|
220
224
|
"document-setting": "Cài đặt tài liệu",
|
|
221
225
|
"modern-width": "Độ rộng nội dung",
|
package/lib/locale/zh-CN.js
CHANGED
package/lib/locale/zh-HK.js
CHANGED
package/lib/locale/zh-TW.js
CHANGED
|
@@ -33,6 +33,11 @@ export interface IDocFitToWidthOptions {
|
|
|
33
33
|
export interface IUniverDocsUIConfig {
|
|
34
34
|
menu?: MenuConfig;
|
|
35
35
|
container?: HTMLElement | string;
|
|
36
|
+
/**
|
|
37
|
+
* Show the left-hand document outline for heading navigation.
|
|
38
|
+
* When omitted, enabled for modern documents and disabled for traditional documents.
|
|
39
|
+
* Explicit `true` or `false` overrides the default in either document mode.
|
|
40
|
+
*/
|
|
36
41
|
toc?: boolean;
|
|
37
42
|
footer?: boolean;
|
|
38
43
|
wordCount?: boolean;
|
package/lib/types/plugin.d.ts
CHANGED
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import type { IUniverDocsUIConfig } from './config/config';
|
|
17
16
|
import { ICommandService, IConfigService, Injector, Plugin } from '@univerjs/core';
|
|
18
17
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
18
|
+
import type { IUniverDocsUIConfig } from './config/config';
|
|
19
19
|
export declare class UniverDocsUIPlugin extends Plugin {
|
|
20
20
|
private readonly _config;
|
|
21
21
|
_injector: Injector;
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
import type { IDisposable, IDocumentBody, IDocumentData } from '@univerjs/core';
|
|
17
17
|
import type { IRectRangeWithStyle, ITextRangeWithStyle } from '@univerjs/engine-render';
|
|
18
18
|
import type { Observable } from 'rxjs';
|
|
19
|
-
import type { DocPasteMode } from './paste-options';
|
|
20
19
|
import { Disposable, ErrorService, ICommandService, ILogService, ImageSourceType, IPermissionService, IUndoRedoService, IUniverInstanceService, SliceBodyType } from '@univerjs/core';
|
|
21
20
|
import { DocSelectionManagerService, DocStateChangeManagerService } from '@univerjs/docs';
|
|
22
21
|
import { IClipboardInterfaceService } from '@univerjs/ui';
|
|
22
|
+
import type { DocPasteMode } from './paste-options';
|
|
23
23
|
import { DocMenuStyleService } from '../doc-menu-style.service';
|
|
24
24
|
import { DocHtmlExportService } from './udm-to-html/doc-html-export.service';
|
|
25
25
|
export declare function convertClipboardHtmlToDocumentData(html: string, unitId?: string): Partial<IDocumentData>;
|
|
@@ -0,0 +1,38 @@
|
|
|
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, ICommandService, LocaleService, ThemeService } from '@univerjs/core';
|
|
19
|
+
import { DocSelectionManagerService, DocSkeletonManagerService } from '@univerjs/docs';
|
|
20
|
+
import { ILayoutService } from '@univerjs/ui';
|
|
21
|
+
import { DocEventManagerService } from './doc-event-manager.service';
|
|
22
|
+
export declare class DocHeadingCollapseService extends Disposable implements IRenderModule {
|
|
23
|
+
private readonly _context;
|
|
24
|
+
private readonly _skeletonManager;
|
|
25
|
+
private readonly _eventManager;
|
|
26
|
+
private readonly _selections;
|
|
27
|
+
private readonly _commandService;
|
|
28
|
+
private readonly _layoutService;
|
|
29
|
+
private readonly _buttons;
|
|
30
|
+
private _colors;
|
|
31
|
+
private _expandLabel;
|
|
32
|
+
private _collapseLabel;
|
|
33
|
+
constructor(_context: IRenderContext<DocumentDataModel>, _skeletonManager: DocSkeletonManagerService, _eventManager: DocEventManagerService, _selections: DocSelectionManagerService, _commandService: ICommandService, _layoutService: ILayoutService, themeService: ThemeService, localeService: LocaleService);
|
|
34
|
+
private _getColors;
|
|
35
|
+
private _normalizeSelection;
|
|
36
|
+
private _update;
|
|
37
|
+
dispose(): void;
|
|
38
|
+
}
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import type { DocumentDataModel, ICustomBlock, ICustomTable, IDocumentBlockRange } from '@univerjs/core';
|
|
17
17
|
import type { IBoundRectNoAngle, IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
18
|
-
import type { IMutiPageParagraphBound, ITableBound } from './doc-event-manager.service';
|
|
19
18
|
import { Disposable, DocumentBlockType, IContextService, IPermissionService } from '@univerjs/core';
|
|
20
19
|
import { DocSelectionManagerService, DocSkeletonManagerService } from '@univerjs/docs';
|
|
20
|
+
import type { IMutiPageParagraphBound, ITableBound } from './doc-event-manager.service';
|
|
21
21
|
import { DocEventManagerService } from './doc-event-manager.service';
|
|
22
22
|
import { DocLayoutInteractionService } from './doc-layout-interaction.service';
|
|
23
23
|
import { DocCanvasPopManagerService } from './doc-popup-manager.service';
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
import type { INeedCheckDisposable, ITextRangeParam } from '@univerjs/core';
|
|
17
17
|
import type { BaseObject, IBoundRectNoAngle, IRender, Scene } from '@univerjs/engine-render';
|
|
18
18
|
import type { IPopup } from '@univerjs/ui';
|
|
19
|
+
import type { Observable } from 'rxjs';
|
|
19
20
|
import { Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
|
|
20
21
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
21
22
|
import { ICanvasPopupService } from '@univerjs/ui';
|
|
@@ -29,6 +30,8 @@ export declare function transformOffset2Bound(offsetX: number, offsetY: number,
|
|
|
29
30
|
y: number;
|
|
30
31
|
};
|
|
31
32
|
export interface IDocCanvasPopup extends Omit<IPopup, 'anchorRect$' | 'children' | 'unitId' | 'subUnitId' | 'canvasElement'> {
|
|
33
|
+
/** Notify when a business-owned rect changes independently of scene transforms. */
|
|
34
|
+
positionChanges$?: Observable<unknown>;
|
|
32
35
|
/** Defaults to true. Passive hover affordances can track layout without holding it. */
|
|
33
36
|
requiresStableLayout?: boolean;
|
|
34
37
|
mask?: boolean;
|
|
@@ -45,7 +48,7 @@ export declare class DocCanvasPopManagerService extends Disposable {
|
|
|
45
48
|
private readonly _commandService;
|
|
46
49
|
private readonly _popupCountByUnit;
|
|
47
50
|
private readonly _popupUnits$;
|
|
48
|
-
readonly popupUnits$:
|
|
51
|
+
readonly popupUnits$: Observable<ReadonlySet<string>>;
|
|
49
52
|
constructor(_globalPopupManagerService: ICanvasPopupService, _renderManagerService: IRenderManagerService, _univerInstanceService: IUniverInstanceService, _commandService: ICommandService);
|
|
50
53
|
dispose(): void;
|
|
51
54
|
private _beginPopupActivity;
|
|
@@ -18,10 +18,10 @@ import type { IDocBlockMoveValidationContext } from '@univerjs/docs';
|
|
|
18
18
|
import type { ITextRangeWithStyle } from '@univerjs/engine-render';
|
|
19
19
|
import type { IPopup, IValueOption } from '@univerjs/ui';
|
|
20
20
|
import type { CSSProperties } from 'react';
|
|
21
|
-
import type { IMutiPageParagraphBound } from '../services/doc-event-manager.service';
|
|
22
|
-
import type { IDocBlockMenuTarget } from '../services/doc-paragraph-menu.service';
|
|
23
21
|
import { NamedStyleType } from '@univerjs/core';
|
|
24
22
|
import { DocBlockMoveValidatorService } from '@univerjs/docs';
|
|
23
|
+
import type { IMutiPageParagraphBound } from '../services/doc-event-manager.service';
|
|
24
|
+
import type { IDocBlockMenuTarget } from '../services/doc-paragraph-menu.service';
|
|
25
25
|
import { DocParagraphMenuService } from '../services/doc-paragraph-menu.service';
|
|
26
26
|
export declare function getParagraphMenuPopupDirection(anchorLeft: number, menuWidth?: number, viewportPadding?: number, options?: {
|
|
27
27
|
anchorRight?: number;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { IBoundRectNoAngle, IDocsTableRenderViewport } from '@univerjs/engine-render';
|
|
17
|
+
export declare function isDocSideMenuTableOverlapping(outline: IBoundRectNoAngle, table: IBoundRectNoAngle, viewport: IDocsTableRenderViewport | null): boolean;
|
|
@@ -0,0 +1,38 @@
|
|
|
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 { IShapeProps, IViewportInfo, UniverRenderingContext } from '@univerjs/engine-render';
|
|
17
|
+
import { Shape } from '@univerjs/engine-render';
|
|
18
|
+
export interface IHeadingCollapseColors {
|
|
19
|
+
normal: string;
|
|
20
|
+
hover: string;
|
|
21
|
+
tooltipBackground: string;
|
|
22
|
+
tooltipText: string;
|
|
23
|
+
}
|
|
24
|
+
export declare class HeadingCollapseShape extends Shape<IShapeProps> {
|
|
25
|
+
private _collapsed;
|
|
26
|
+
private _label;
|
|
27
|
+
private _colors;
|
|
28
|
+
private _hovered;
|
|
29
|
+
private _tooltipVisible;
|
|
30
|
+
private _tooltipTimer;
|
|
31
|
+
private _pressed;
|
|
32
|
+
constructor(key: string, colors: IHeadingCollapseColors, activate: () => void);
|
|
33
|
+
update(collapsed: boolean, label: string, colors: IHeadingCollapseColors): void;
|
|
34
|
+
resetHover(): void;
|
|
35
|
+
private _hideTooltip;
|
|
36
|
+
protected _draw(ctx: UniverRenderingContext, bounds?: IViewportInfo): void;
|
|
37
|
+
dispose(): void;
|
|
38
|
+
}
|
|
@@ -19,6 +19,7 @@ export declare function resolveParagraphsForSettingPanel(paragraphs: IParagraph[
|
|
|
19
19
|
paragraphStyle: import("@univerjs/core").IParagraphStyle;
|
|
20
20
|
startIndex: number;
|
|
21
21
|
paragraphId: string;
|
|
22
|
+
headingCollapsed?: boolean;
|
|
22
23
|
styleId?: string;
|
|
23
24
|
bullet?: import("@univerjs/core").IBullet;
|
|
24
25
|
sourceBullet?: import("@univerjs/core").IBullet | null;
|
|
@@ -28,6 +29,7 @@ export declare const useCurrentParagraph: () => import("@univerjs/core").IParagr
|
|
|
28
29
|
paragraphStyle: import("@univerjs/core").IParagraphStyle;
|
|
29
30
|
startIndex: number;
|
|
30
31
|
paragraphId: string;
|
|
32
|
+
headingCollapsed?: boolean;
|
|
31
33
|
styleId?: string;
|
|
32
34
|
bullet?: import("@univerjs/core").IBullet;
|
|
33
35
|
sourceBullet?: import("@univerjs/core").IBullet | null;
|