@univerjs/docs-drawing-ui 0.25.1 → 1.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1864 -1522
- package/lib/cjs/locale/ar-SA.js +5 -0
- package/lib/cjs/locale/ca-ES.js +5 -0
- package/lib/cjs/locale/de-DE.js +5 -0
- package/lib/cjs/locale/en-US.js +5 -0
- package/lib/cjs/locale/es-ES.js +5 -0
- package/lib/cjs/locale/fa-IR.js +5 -0
- package/lib/cjs/locale/fr-FR.js +5 -0
- package/lib/cjs/locale/id-ID.js +5 -0
- package/lib/cjs/locale/it-IT.js +5 -0
- package/lib/cjs/locale/ja-JP.js +5 -0
- package/lib/cjs/locale/ko-KR.js +5 -0
- package/lib/cjs/locale/pl-PL.js +5 -0
- package/lib/cjs/locale/pt-BR.js +5 -0
- package/lib/cjs/locale/ru-RU.js +5 -0
- package/lib/cjs/locale/sk-SK.js +5 -0
- package/lib/cjs/locale/vi-VN.js +5 -0
- package/lib/cjs/locale/zh-CN.js +5 -0
- package/lib/cjs/locale/zh-HK.js +5 -0
- package/lib/cjs/locale/zh-TW.js +5 -0
- package/lib/es/index.js +1860 -1522
- package/lib/es/locale/ar-SA.js +5 -0
- package/lib/es/locale/ca-ES.js +5 -0
- package/lib/es/locale/de-DE.js +5 -0
- package/lib/es/locale/en-US.js +5 -0
- package/lib/es/locale/es-ES.js +5 -0
- package/lib/es/locale/fa-IR.js +5 -0
- package/lib/es/locale/fr-FR.js +5 -0
- package/lib/es/locale/id-ID.js +5 -0
- package/lib/es/locale/it-IT.js +5 -0
- package/lib/es/locale/ja-JP.js +5 -0
- package/lib/es/locale/ko-KR.js +5 -0
- package/lib/es/locale/pl-PL.js +5 -0
- package/lib/es/locale/pt-BR.js +5 -0
- package/lib/es/locale/ru-RU.js +5 -0
- package/lib/es/locale/sk-SK.js +5 -0
- package/lib/es/locale/vi-VN.js +5 -0
- package/lib/es/locale/zh-CN.js +5 -0
- package/lib/es/locale/zh-HK.js +5 -0
- package/lib/es/locale/zh-TW.js +5 -0
- package/lib/index.js +1860 -1522
- package/lib/locale/ar-SA.js +5 -0
- package/lib/locale/ca-ES.js +5 -0
- package/lib/locale/de-DE.js +5 -0
- package/lib/locale/en-US.js +5 -0
- package/lib/locale/es-ES.js +5 -0
- package/lib/locale/fa-IR.js +5 -0
- package/lib/locale/fr-FR.js +5 -0
- package/lib/locale/id-ID.js +5 -0
- package/lib/locale/it-IT.js +5 -0
- package/lib/locale/ja-JP.js +5 -0
- package/lib/locale/ko-KR.js +5 -0
- package/lib/locale/pl-PL.js +5 -0
- package/lib/locale/pt-BR.js +5 -0
- package/lib/locale/ru-RU.js +5 -0
- package/lib/locale/sk-SK.js +5 -0
- package/lib/locale/vi-VN.js +5 -0
- package/lib/locale/zh-CN.js +5 -0
- package/lib/locale/zh-HK.js +5 -0
- package/lib/locale/zh-TW.js +5 -0
- package/lib/types/commands/commands/insert-shape.command.d.ts +18 -0
- package/lib/types/controllers/components.controller.d.ts +22 -0
- package/lib/types/controllers/render-controllers/doc-drawing-transform-update.controller.d.ts +67 -3
- package/lib/types/controllers/{doc-drawing.controller.d.ts → ui.controller.d.ts} +2 -3
- package/lib/types/index.d.ts +2 -0
- package/lib/types/locale/en-US.d.ts +7 -0
- package/lib/types/locale/types.d.ts +18 -0
- package/lib/types/menu/image.menu.d.ts +4 -2
- package/lib/types/menu/shape.menu.d.ts +26 -0
- package/lib/types/views/{printing-float-dom/index.d.ts → DocPrintingFloatDom.d.ts} +3 -1
- package/lib/types/views/doc-image-panel/DocDrawingPanel.d.ts +1 -1
- package/lib/types/views/doc-image-panel/DocDrawingPosition.d.ts +1 -1
- package/lib/types/views/doc-image-panel/DocDrawingTextWrap.d.ts +1 -1
- package/lib/umd/index.js +1 -1
- 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
package/lib/locale/ar-SA.js
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
const locale = { "docs-drawing-ui": {
|
|
3
3
|
title: "صورة",
|
|
4
4
|
upload: { float: "إدراج صورة" },
|
|
5
|
+
shape: { insert: {
|
|
6
|
+
title: "إدراج شكل",
|
|
7
|
+
rectangle: "إدراج مستطيل",
|
|
8
|
+
ellipse: "إدراج قطع ناقص"
|
|
9
|
+
} },
|
|
5
10
|
panel: { title: "تحرير الصورة" },
|
|
6
11
|
"image-popup": {
|
|
7
12
|
replace: "استبدال",
|
package/lib/locale/ca-ES.js
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
const locale = { "docs-drawing-ui": {
|
|
3
3
|
title: "Imatge",
|
|
4
4
|
upload: { float: "Insereix imatge" },
|
|
5
|
+
shape: { insert: {
|
|
6
|
+
title: "Insereix forma",
|
|
7
|
+
rectangle: "Insereix rectangle",
|
|
8
|
+
ellipse: "Insereix el·lipse"
|
|
9
|
+
} },
|
|
5
10
|
panel: { title: "Edita la imatge" },
|
|
6
11
|
"image-popup": {
|
|
7
12
|
replace: "Reemplaça",
|
package/lib/locale/de-DE.js
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
const locale = { "docs-drawing-ui": {
|
|
3
3
|
title: "Bild",
|
|
4
4
|
upload: { float: "Bild einfügen" },
|
|
5
|
+
shape: { insert: {
|
|
6
|
+
title: "Form einfügen",
|
|
7
|
+
rectangle: "Rechteck einfügen",
|
|
8
|
+
ellipse: "Ellipse einfügen"
|
|
9
|
+
} },
|
|
5
10
|
panel: { title: "Bild bearbeiten" },
|
|
6
11
|
"image-popup": {
|
|
7
12
|
replace: "Ersetzen",
|
package/lib/locale/en-US.js
CHANGED
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
const locale = { "docs-drawing-ui": {
|
|
18
18
|
title: "Image",
|
|
19
19
|
upload: { float: "Insert Image" },
|
|
20
|
+
shape: { insert: {
|
|
21
|
+
title: "Insert Shape",
|
|
22
|
+
rectangle: "Insert Rectangle",
|
|
23
|
+
ellipse: "Insert Ellipse"
|
|
24
|
+
} },
|
|
20
25
|
panel: { title: "Edit Image" },
|
|
21
26
|
"image-popup": {
|
|
22
27
|
replace: "Replace",
|
package/lib/locale/es-ES.js
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
const locale = { "docs-drawing-ui": {
|
|
3
3
|
title: "Imagen",
|
|
4
4
|
upload: { float: "Insertar imagen" },
|
|
5
|
+
shape: { insert: {
|
|
6
|
+
title: "Insertar forma",
|
|
7
|
+
rectangle: "Insertar rectángulo",
|
|
8
|
+
ellipse: "Insertar elipse"
|
|
9
|
+
} },
|
|
5
10
|
panel: { title: "Editar imagen" },
|
|
6
11
|
"image-popup": {
|
|
7
12
|
replace: "Reemplazar",
|
package/lib/locale/fa-IR.js
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
const locale = { "docs-drawing-ui": {
|
|
3
3
|
title: "تصویر",
|
|
4
4
|
upload: { float: "درج تصویر" },
|
|
5
|
+
shape: { insert: {
|
|
6
|
+
title: "درج شکل",
|
|
7
|
+
rectangle: "درج مستطیل",
|
|
8
|
+
ellipse: "بیضی را درج کنید"
|
|
9
|
+
} },
|
|
5
10
|
panel: { title: "ویرایش تصویر" },
|
|
6
11
|
"image-popup": {
|
|
7
12
|
replace: "تعویض",
|
package/lib/locale/fr-FR.js
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
const locale = { "docs-drawing-ui": {
|
|
3
3
|
title: "Image",
|
|
4
4
|
upload: { float: "Insérer une image" },
|
|
5
|
+
shape: { insert: {
|
|
6
|
+
title: "Insérer une forme",
|
|
7
|
+
rectangle: "Insérer un rectangle",
|
|
8
|
+
ellipse: "Insérer une ellipse"
|
|
9
|
+
} },
|
|
5
10
|
panel: { title: "Modifier l'image" },
|
|
6
11
|
"image-popup": {
|
|
7
12
|
replace: "Remplacer",
|
package/lib/locale/id-ID.js
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
const locale = { "docs-drawing-ui": {
|
|
3
3
|
title: "Gambar",
|
|
4
4
|
upload: { float: "Sisipkan Gambar" },
|
|
5
|
+
shape: { insert: {
|
|
6
|
+
title: "Sisipkan Bentuk",
|
|
7
|
+
rectangle: "Sisipkan Persegi Panjang",
|
|
8
|
+
ellipse: "Sisipkan Elips"
|
|
9
|
+
} },
|
|
5
10
|
panel: { title: "Edit Gambar" },
|
|
6
11
|
"image-popup": {
|
|
7
12
|
replace: "Ganti",
|
package/lib/locale/it-IT.js
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
const locale = { "docs-drawing-ui": {
|
|
3
3
|
title: "Immagine",
|
|
4
4
|
upload: { float: "Inserisci immagine" },
|
|
5
|
+
shape: { insert: {
|
|
6
|
+
title: "Inserisci Forma",
|
|
7
|
+
rectangle: "Inserisci Rettangolo",
|
|
8
|
+
ellipse: "Inserisci Ellisse"
|
|
9
|
+
} },
|
|
5
10
|
panel: { title: "Modifica immagine" },
|
|
6
11
|
"image-popup": {
|
|
7
12
|
replace: "Sostituisci",
|
package/lib/locale/ja-JP.js
CHANGED
package/lib/locale/ko-KR.js
CHANGED
package/lib/locale/pl-PL.js
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
const locale = { "docs-drawing-ui": {
|
|
3
3
|
title: "Obraz",
|
|
4
4
|
upload: { float: "Wstaw obraz" },
|
|
5
|
+
shape: { insert: {
|
|
6
|
+
title: "Wstaw kształt",
|
|
7
|
+
rectangle: "Wstaw prostokąt",
|
|
8
|
+
ellipse: "Wstaw elipsę"
|
|
9
|
+
} },
|
|
5
10
|
panel: { title: "Edytuj obraz" },
|
|
6
11
|
"image-popup": {
|
|
7
12
|
replace: "Zamień",
|
package/lib/locale/pt-BR.js
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
const locale = { "docs-drawing-ui": {
|
|
3
3
|
title: "Imagem",
|
|
4
4
|
upload: { float: "Inserir imagem" },
|
|
5
|
+
shape: { insert: {
|
|
6
|
+
title: "Inserir Forma",
|
|
7
|
+
rectangle: "Inserir Retângulo",
|
|
8
|
+
ellipse: "Inserir Elipse"
|
|
9
|
+
} },
|
|
5
10
|
panel: { title: "Editar imagem" },
|
|
6
11
|
"image-popup": {
|
|
7
12
|
replace: "Substituir",
|
package/lib/locale/ru-RU.js
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
const locale = { "docs-drawing-ui": {
|
|
3
3
|
title: "Изображение",
|
|
4
4
|
upload: { float: "Вставить изображение" },
|
|
5
|
+
shape: { insert: {
|
|
6
|
+
title: "Insert Shape",
|
|
7
|
+
rectangle: "Insert Rectangle",
|
|
8
|
+
ellipse: "Insert Ellipse"
|
|
9
|
+
} },
|
|
5
10
|
panel: { title: "Редактировать изображение" },
|
|
6
11
|
"image-popup": {
|
|
7
12
|
replace: "Заменить",
|
package/lib/locale/sk-SK.js
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
const locale = { "docs-drawing-ui": {
|
|
3
3
|
title: "Obrázok",
|
|
4
4
|
upload: { float: "Vložiť obrázok" },
|
|
5
|
+
shape: { insert: {
|
|
6
|
+
title: "Vložiť tvar",
|
|
7
|
+
rectangle: "Vložiť obdĺžnik",
|
|
8
|
+
ellipse: "Vložiť elipsu"
|
|
9
|
+
} },
|
|
5
10
|
panel: { title: "Upraviť obrázok" },
|
|
6
11
|
"image-popup": {
|
|
7
12
|
replace: "Nahradiť",
|
package/lib/locale/vi-VN.js
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
const locale = { "docs-drawing-ui": {
|
|
3
3
|
title: "Hình ảnh",
|
|
4
4
|
upload: { float: "Chèn hình ảnh" },
|
|
5
|
+
shape: { insert: {
|
|
6
|
+
title: "Insert Shape",
|
|
7
|
+
rectangle: "Insert Rectangle",
|
|
8
|
+
ellipse: "Insert Ellipse"
|
|
9
|
+
} },
|
|
5
10
|
panel: { title: "Chỉnh sửa hình ảnh" },
|
|
6
11
|
"image-popup": {
|
|
7
12
|
replace: "Thay thế",
|
package/lib/locale/zh-CN.js
CHANGED
package/lib/locale/zh-HK.js
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
const locale = { "docs-drawing-ui": {
|
|
3
3
|
title: "圖片",
|
|
4
4
|
upload: { float: "插入圖片" },
|
|
5
|
+
shape: { insert: {
|
|
6
|
+
title: "Insert Shape",
|
|
7
|
+
rectangle: "Insert Rectangle",
|
|
8
|
+
ellipse: "Insert Ellipse"
|
|
9
|
+
} },
|
|
5
10
|
panel: { title: "編圖" },
|
|
6
11
|
"image-popup": {
|
|
7
12
|
replace: "替換",
|
package/lib/locale/zh-TW.js
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
const locale = { "docs-drawing-ui": {
|
|
3
3
|
title: "圖片",
|
|
4
4
|
upload: { float: "插入圖片" },
|
|
5
|
+
shape: { insert: {
|
|
6
|
+
title: "Insert Shape",
|
|
7
|
+
rectangle: "Insert Rectangle",
|
|
8
|
+
ellipse: "Insert Ellipse"
|
|
9
|
+
} },
|
|
5
10
|
panel: { title: "編圖" },
|
|
6
11
|
"image-popup": {
|
|
7
12
|
replace: "替換",
|
|
@@ -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
|
+
import type { ICommand } from '@univerjs/core';
|
|
17
|
+
export declare const InsertDocRectangleShapeCommand: ICommand<object, boolean>;
|
|
18
|
+
export declare const InsertDocEllipseShapeCommand: ICommand<object, boolean>;
|
|
@@ -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 { Disposable } from '@univerjs/core';
|
|
17
|
+
import { ComponentManager } from '@univerjs/ui';
|
|
18
|
+
export declare class ComponentsController extends Disposable {
|
|
19
|
+
private readonly _componentManager;
|
|
20
|
+
constructor(_componentManager: ComponentManager);
|
|
21
|
+
private _registerComponents;
|
|
22
|
+
}
|
package/lib/types/controllers/render-controllers/doc-drawing-transform-update.controller.d.ts
CHANGED
|
@@ -13,13 +13,75 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import type { DocumentDataModel } from '@univerjs/core';
|
|
17
|
-
import type { IDocumentSkeletonPage, IDocumentSkeletonRow, IDocumentSkeletonTable, IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
18
|
-
import { Disposable, ICommandService, IUniverInstanceService, LifecycleService } from '@univerjs/core';
|
|
16
|
+
import type { DocumentDataModel, ITransformState } from '@univerjs/core';
|
|
17
|
+
import type { IDocumentSkeletonHeaderFooter, IDocumentSkeletonPage, IDocumentSkeletonRow, IDocumentSkeletonTable, IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
18
|
+
import { AlignTypeH, AlignTypeV, BooleanNumber, Disposable, ICommandService, IUniverInstanceService, LifecycleService, ObjectRelativeFromH, ObjectRelativeFromV, PositionedObjectLayoutType } from '@univerjs/core';
|
|
19
19
|
import { DocSkeletonManagerService } from '@univerjs/docs';
|
|
20
20
|
import { IEditorService } from '@univerjs/docs-ui';
|
|
21
21
|
import { IDrawingManagerService } from '@univerjs/drawing';
|
|
22
22
|
import { DocRefreshDrawingsService } from '../../services/doc-refresh-drawings.service';
|
|
23
|
+
interface IDrawingParamsWithBehindText {
|
|
24
|
+
unitId: string;
|
|
25
|
+
subUnitId: string;
|
|
26
|
+
drawingId: string;
|
|
27
|
+
behindText: boolean;
|
|
28
|
+
hidden?: boolean;
|
|
29
|
+
transform: ITransformState;
|
|
30
|
+
transforms: ITransformState[];
|
|
31
|
+
isMultiTransform: BooleanNumber;
|
|
32
|
+
}
|
|
33
|
+
interface IDrawingClipBounds {
|
|
34
|
+
left: number;
|
|
35
|
+
top: number;
|
|
36
|
+
width: number;
|
|
37
|
+
height: number;
|
|
38
|
+
}
|
|
39
|
+
export declare function getDocsDrawingPageClipBounds(config: {
|
|
40
|
+
docsLeft: number;
|
|
41
|
+
docsTop: number;
|
|
42
|
+
pageOffsetLeft: number;
|
|
43
|
+
pageOffsetTop: number;
|
|
44
|
+
clipOffsetLeft?: number;
|
|
45
|
+
clipOffsetTop?: number;
|
|
46
|
+
page: Pick<IDocumentSkeletonPage | IDocumentSkeletonHeaderFooter, 'pageWidth' | 'pageHeight'>;
|
|
47
|
+
}): IDrawingClipBounds | undefined;
|
|
48
|
+
export declare function getDocsDrawingClipPage(config: {
|
|
49
|
+
drawing: Pick<IDrawingParamsWithBehindText, 'behindText'> & {
|
|
50
|
+
transform?: Pick<ITransformState, 'width' | 'height'>;
|
|
51
|
+
};
|
|
52
|
+
hostPage?: Pick<IDocumentSkeletonPage, 'pageWidth' | 'pageHeight'>;
|
|
53
|
+
page: Pick<IDocumentSkeletonPage | IDocumentSkeletonHeaderFooter, 'pageWidth' | 'pageHeight'>;
|
|
54
|
+
}): Pick<IDocumentSkeletonPage | IDocumentSkeletonHeaderFooter, 'pageWidth' | 'pageHeight'>;
|
|
55
|
+
export declare function getDocsPageRelativeDrawingLeft(config: {
|
|
56
|
+
hostPage: Pick<IDocumentSkeletonPage, 'pageWidth'>;
|
|
57
|
+
positionH: {
|
|
58
|
+
align?: AlignTypeH;
|
|
59
|
+
posOffset?: number;
|
|
60
|
+
relativeFrom?: ObjectRelativeFromH;
|
|
61
|
+
};
|
|
62
|
+
width: number;
|
|
63
|
+
}): number | undefined;
|
|
64
|
+
export declare function getDocsPageRelativeDrawingTop(config: {
|
|
65
|
+
hostPage: Pick<IDocumentSkeletonPage, 'pageHeight'>;
|
|
66
|
+
positionV: {
|
|
67
|
+
align?: AlignTypeV;
|
|
68
|
+
posOffset?: number;
|
|
69
|
+
relativeFrom?: ObjectRelativeFromV;
|
|
70
|
+
};
|
|
71
|
+
height: number;
|
|
72
|
+
}): number | undefined;
|
|
73
|
+
export declare function getDocsPageRelativeDrawingAnchorPage(config: {
|
|
74
|
+
page: Pick<IDocumentSkeletonPage | IDocumentSkeletonHeaderFooter, 'pageWidth' | 'pageHeight'>;
|
|
75
|
+
clipPage: Pick<IDocumentSkeletonPage | IDocumentSkeletonHeaderFooter, 'pageWidth' | 'pageHeight'>;
|
|
76
|
+
hostPage?: Pick<IDocumentSkeletonPage, 'pageWidth' | 'pageHeight'>;
|
|
77
|
+
}): Pick<IDocumentSkeletonPage | IDocumentSkeletonHeaderFooter, 'pageWidth' | 'pageHeight'> | undefined;
|
|
78
|
+
export declare function getDocsDrawingBehindText(config: {
|
|
79
|
+
drawingOrigin: {
|
|
80
|
+
layoutType?: PositionedObjectLayoutType;
|
|
81
|
+
behindDoc?: BooleanNumber;
|
|
82
|
+
};
|
|
83
|
+
hostPage?: Pick<IDocumentSkeletonPage, 'pageWidth' | 'pageHeight'>;
|
|
84
|
+
}): boolean;
|
|
23
85
|
export declare function getDocsTableCellDrawingOffset(unitId: string, table: IDocumentSkeletonTable, row: IDocumentSkeletonRow, cell: IDocumentSkeletonPage): {
|
|
24
86
|
left: number;
|
|
25
87
|
top: number;
|
|
@@ -40,8 +102,10 @@ export declare class DocDrawingTransformUpdateController extends Disposable impl
|
|
|
40
102
|
private _commandExecutedListener;
|
|
41
103
|
private _initResize;
|
|
42
104
|
private _refreshDrawing;
|
|
105
|
+
private _getStaleNonMultiDrawings;
|
|
43
106
|
private _handleMultiDrawingsTransform;
|
|
44
107
|
private _calculateDrawingPosition;
|
|
45
108
|
private _calculateTableCellDrawingPositions;
|
|
46
109
|
private _drawingInitializeListener;
|
|
47
110
|
}
|
|
111
|
+
export {};
|
|
@@ -14,13 +14,12 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { Disposable, ICommandService } from '@univerjs/core';
|
|
17
|
-
import {
|
|
17
|
+
import { IMenuManagerService, IShortcutService } from '@univerjs/ui';
|
|
18
18
|
export declare class DocDrawingUIController extends Disposable {
|
|
19
|
-
private readonly _componentManager;
|
|
20
19
|
private readonly _menuManagerService;
|
|
21
20
|
private readonly _commandService;
|
|
22
21
|
private readonly _shortcutService;
|
|
23
|
-
constructor(
|
|
22
|
+
constructor(_menuManagerService: IMenuManagerService, _commandService: ICommandService, _shortcutService: IShortcutService);
|
|
24
23
|
private _initCustomComponents;
|
|
25
24
|
private _initMenus;
|
|
26
25
|
private _initCommands;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export { DeleteDocDrawingsCommand } from './commands/commands/delete-doc-drawing
|
|
|
18
18
|
export { GroupDocDrawingCommand } from './commands/commands/group-doc-drawing.command';
|
|
19
19
|
export { InsertDocDrawingCommand } from './commands/commands/insert-doc-drawing.command';
|
|
20
20
|
export { InsertDocImageCommand } from './commands/commands/insert-image.command';
|
|
21
|
+
export { InsertDocEllipseShapeCommand, InsertDocRectangleShapeCommand } from './commands/commands/insert-shape.command';
|
|
21
22
|
export { MoveDocDrawingsCommand } from './commands/commands/move-drawings.command';
|
|
22
23
|
export { RemoveDocDrawingCommand } from './commands/commands/remove-doc-drawing.command';
|
|
23
24
|
export { SetDocDrawingArrangeCommand } from './commands/commands/set-drawing-arrange.command';
|
|
@@ -28,6 +29,7 @@ export { SidebarDocDrawingOperation } from './commands/operations/open-drawing-p
|
|
|
28
29
|
export { type IUniverDocsDrawingUIConfig } from './config/config';
|
|
29
30
|
export { DocFloatDomController } from './controllers/doc-float-dom.controller';
|
|
30
31
|
export { DOCS_IMAGE_MENU_ID } from './menu/image.menu';
|
|
32
|
+
export { DOCS_SHAPE_BELOW_MENU_ID, DOCS_SHAPE_MENU_ID } from './menu/shape.menu';
|
|
31
33
|
export { UniverDocsDrawingUIPlugin } from './plugin';
|
|
32
34
|
export { DocDrawingPosition } from './views/doc-image-panel/DocDrawingPosition';
|
|
33
35
|
export { DocDrawingTextWrap } from './views/doc-image-panel/DocDrawingTextWrap';
|
|
@@ -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
|
+
import type { LocaleLeafKeys } from '@univerjs/core';
|
|
17
|
+
import type enUS from './en-US';
|
|
18
|
+
export type LocaleKey = LocaleLeafKeys<typeof enUS>;
|
|
@@ -15,7 +15,9 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import type { IAccessor } from '@univerjs/core';
|
|
17
17
|
import type { IMenuItem } from '@univerjs/ui';
|
|
18
|
+
import type { LocaleKey } from '../locale/types';
|
|
18
19
|
export declare const DOCS_IMAGE_MENU_ID = "doc.menu.image";
|
|
19
20
|
export declare const IMAGE_MENU_UPLOAD_FLOAT_ID: string;
|
|
20
|
-
export declare function ImageMenuFactory(accessor: IAccessor): IMenuItem
|
|
21
|
-
export declare function UploadFloatImageMenuFactory(
|
|
21
|
+
export declare function ImageMenuFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
|
|
22
|
+
export declare function UploadFloatImageMenuFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
|
|
23
|
+
export declare function UploadFloatImageBelowMenuFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
|
|
@@ -0,0 +1,26 @@
|
|
|
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 { IAccessor } from '@univerjs/core';
|
|
17
|
+
import type { IMenuButtonItem, IMenuItem } from '@univerjs/ui';
|
|
18
|
+
import type { LocaleKey } from '../locale/types';
|
|
19
|
+
export declare const DOCS_SHAPE_MENU_ID = "doc.command.menu-insert-shape";
|
|
20
|
+
export declare const DOCS_SHAPE_BELOW_MENU_ID = "doc.command.menu-insert-shape.below";
|
|
21
|
+
export declare function ShapeMenuFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
|
|
22
|
+
export declare function ShapeBelowMenuFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
|
|
23
|
+
export declare function InsertRectangleShapeMenuFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
|
|
24
|
+
export declare function InsertEllipseShapeMenuFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
|
|
25
|
+
export declare function InsertRectangleShapeBelowMenuFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
|
|
26
|
+
export declare function InsertEllipseShapeBelowMenuFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import type { Injector } from '@univerjs/core';
|
|
16
17
|
import type { IDocFloatDom } from '@univerjs/docs-drawing';
|
|
17
18
|
import type { DocumentSkeleton, IBoundRectNoAngle, Scene } from '@univerjs/engine-render';
|
|
18
19
|
export interface IPrintingFloatDomProps {
|
|
@@ -26,4 +27,5 @@ export interface IPrintingFloatDomProps {
|
|
|
26
27
|
};
|
|
27
28
|
bound: IBoundRectNoAngle;
|
|
28
29
|
}
|
|
29
|
-
export declare const DocPrintingFloatDom: (props: IPrintingFloatDomProps) => import("react
|
|
30
|
+
export declare const DocPrintingFloatDom: (props: IPrintingFloatDomProps) => import("react").JSX.Element;
|
|
31
|
+
export declare function mountDocPrintingFloatDom(props: IPrintingFloatDomProps, root: HTMLElement, injector: Injector): () => void;
|
|
@@ -13,4 +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 const DocDrawingPanel: () => false | import("react
|
|
16
|
+
export declare const DocDrawingPanel: () => false | import("react").JSX.Element;
|
|
@@ -17,4 +17,4 @@ import type { IDrawingParam } from '@univerjs/core';
|
|
|
17
17
|
export interface IDocDrawingPositionProps {
|
|
18
18
|
drawings: IDrawingParam[];
|
|
19
19
|
}
|
|
20
|
-
export declare const DocDrawingPosition: (props: IDocDrawingPositionProps) => import("react
|
|
20
|
+
export declare const DocDrawingPosition: (props: IDocDrawingPositionProps) => import("react").JSX.Element | undefined;
|
|
@@ -17,4 +17,4 @@ import type { IDrawingParam } from '@univerjs/core';
|
|
|
17
17
|
export interface IDocDrawingTextWrapProps {
|
|
18
18
|
drawings: IDrawingParam[];
|
|
19
19
|
}
|
|
20
|
-
export declare const DocDrawingTextWrap: (props: IDocDrawingTextWrapProps) => import("react
|
|
20
|
+
export declare const DocDrawingTextWrap: (props: IDocDrawingTextWrapProps) => import("react").JSX.Element | null;
|