@univerjs/docs-drawing-ui 1.0.0-alpha.7 → 1.0.0-beta.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/lib/cjs/index.js +164 -138
- package/lib/cjs/locale/ru-RU.js +34 -34
- package/lib/cjs/locale/vi-VN.js +39 -39
- package/lib/cjs/locale/zh-HK.js +3 -3
- package/lib/cjs/locale/zh-TW.js +3 -3
- package/lib/es/index.js +169 -143
- package/lib/es/locale/ru-RU.js +34 -34
- package/lib/es/locale/vi-VN.js +39 -39
- package/lib/es/locale/zh-HK.js +3 -3
- package/lib/es/locale/zh-TW.js +3 -3
- package/lib/index.js +169 -143
- package/lib/locale/ru-RU.js +34 -34
- package/lib/locale/vi-VN.js +39 -39
- package/lib/locale/zh-HK.js +3 -3
- package/lib/locale/zh-TW.js +3 -3
- package/lib/types/controllers/doc-drawing-transformer-update.controller.d.ts +8 -2
- package/lib/types/controllers/doc-float-dom.controller.d.ts +1 -1
- package/lib/types/controllers/render-controllers/doc-drawing-transform-update.controller.d.ts +2 -2
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/vi-VN.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/ru-RU.js
CHANGED
|
@@ -3,9 +3,9 @@ const locale = { "docs-drawing-ui": {
|
|
|
3
3
|
title: "Изображение",
|
|
4
4
|
upload: { float: "Вставить изображение" },
|
|
5
5
|
shape: { insert: {
|
|
6
|
-
title: "
|
|
7
|
-
rectangle: "
|
|
8
|
-
ellipse: "
|
|
6
|
+
title: "Вставить фигуру",
|
|
7
|
+
rectangle: "Вставить прямоугольник",
|
|
8
|
+
ellipse: "Вставить эллипс"
|
|
9
9
|
} },
|
|
10
10
|
panel: { title: "Редактировать изображение" },
|
|
11
11
|
"image-popup": {
|
|
@@ -16,39 +16,39 @@ const locale = { "docs-drawing-ui": {
|
|
|
16
16
|
reset: "Сбросить размер"
|
|
17
17
|
},
|
|
18
18
|
"image-text-wrap": {
|
|
19
|
-
title: "
|
|
20
|
-
wrappingStyle: "
|
|
21
|
-
square: "
|
|
22
|
-
topAndBottom: "
|
|
23
|
-
inline: "
|
|
24
|
-
behindText: "
|
|
25
|
-
inFrontText: "
|
|
26
|
-
wrapText: "
|
|
27
|
-
bothSide: "
|
|
28
|
-
leftOnly: "
|
|
29
|
-
rightOnly: "
|
|
30
|
-
distanceFromText: "
|
|
31
|
-
top: "
|
|
32
|
-
left: "
|
|
33
|
-
bottom: "
|
|
34
|
-
right: "
|
|
19
|
+
title: "Обтекание текстом",
|
|
20
|
+
wrappingStyle: "Стиль обтекания",
|
|
21
|
+
square: "Квадрат",
|
|
22
|
+
topAndBottom: "Сверху и снизу",
|
|
23
|
+
inline: "В тексте",
|
|
24
|
+
behindText: "За текстом",
|
|
25
|
+
inFrontText: "Перед текстом",
|
|
26
|
+
wrapText: "Обтекание текстом",
|
|
27
|
+
bothSide: "С обеих сторон",
|
|
28
|
+
leftOnly: "Только слева",
|
|
29
|
+
rightOnly: "Только справа",
|
|
30
|
+
distanceFromText: "Расстояние от текста",
|
|
31
|
+
top: "Сверху (px)",
|
|
32
|
+
left: "Слева (px)",
|
|
33
|
+
bottom: "Снизу (px)",
|
|
34
|
+
right: "Справа (px)"
|
|
35
35
|
},
|
|
36
36
|
"image-position": {
|
|
37
|
-
title: "
|
|
38
|
-
horizontal: "
|
|
39
|
-
vertical: "
|
|
40
|
-
absolutePosition: "
|
|
41
|
-
relativePosition: "
|
|
42
|
-
toTheRightOf: "
|
|
43
|
-
relativeTo: "
|
|
44
|
-
bellow: "
|
|
45
|
-
options: "
|
|
46
|
-
moveObjectWithText: "
|
|
47
|
-
column: "
|
|
48
|
-
margin: "
|
|
49
|
-
page: "
|
|
50
|
-
line: "
|
|
51
|
-
paragraph: "
|
|
37
|
+
title: "Положение",
|
|
38
|
+
horizontal: "По горизонтали",
|
|
39
|
+
vertical: "По вертикали",
|
|
40
|
+
absolutePosition: "Абсолютное положение (px)",
|
|
41
|
+
relativePosition: "Относительное положение",
|
|
42
|
+
toTheRightOf: "справа от",
|
|
43
|
+
relativeTo: "относительно",
|
|
44
|
+
bellow: "снизу",
|
|
45
|
+
options: "Параметры",
|
|
46
|
+
moveObjectWithText: "Перемещать объект с текстом",
|
|
47
|
+
column: "Колонка",
|
|
48
|
+
margin: "Поле",
|
|
49
|
+
page: "Страница",
|
|
50
|
+
line: "Строка",
|
|
51
|
+
paragraph: "Абзац"
|
|
52
52
|
},
|
|
53
53
|
"update-status": {
|
|
54
54
|
exceedMaxSize: "Размер изображения превышает лимит, лимит составляет {0}М",
|
package/lib/locale/vi-VN.js
CHANGED
|
@@ -3,9 +3,9 @@ const locale = { "docs-drawing-ui": {
|
|
|
3
3
|
title: "Hình ảnh",
|
|
4
4
|
upload: { float: "Chèn hình ảnh" },
|
|
5
5
|
shape: { insert: {
|
|
6
|
-
title: "
|
|
7
|
-
rectangle: "
|
|
8
|
-
ellipse: "
|
|
6
|
+
title: "Chèn hình",
|
|
7
|
+
rectangle: "Chèn hình chữ nhật",
|
|
8
|
+
ellipse: "Chèn hình elip"
|
|
9
9
|
} },
|
|
10
10
|
panel: { title: "Chỉnh sửa hình ảnh" },
|
|
11
11
|
"image-popup": {
|
|
@@ -16,39 +16,39 @@ const locale = { "docs-drawing-ui": {
|
|
|
16
16
|
reset: "Đặt lại kích thước"
|
|
17
17
|
},
|
|
18
18
|
"image-text-wrap": {
|
|
19
|
-
title: "
|
|
20
|
-
wrappingStyle: "
|
|
21
|
-
square: "
|
|
22
|
-
topAndBottom: "
|
|
23
|
-
inline: "
|
|
24
|
-
behindText: "
|
|
25
|
-
inFrontText: "
|
|
26
|
-
wrapText: "
|
|
27
|
-
bothSide: "
|
|
28
|
-
leftOnly: "
|
|
29
|
-
rightOnly: "
|
|
30
|
-
distanceFromText: "
|
|
31
|
-
top: "
|
|
32
|
-
left: "
|
|
33
|
-
bottom: "
|
|
34
|
-
right: "
|
|
19
|
+
title: "Bọc văn bản",
|
|
20
|
+
wrappingStyle: "Kiểu bọc văn bản",
|
|
21
|
+
square: "Hình vuông",
|
|
22
|
+
topAndBottom: "Trên và dưới",
|
|
23
|
+
inline: "Cùng dòng với văn bản",
|
|
24
|
+
behindText: "Phía sau văn bản",
|
|
25
|
+
inFrontText: "Phía trước văn bản",
|
|
26
|
+
wrapText: "Bọc văn bản",
|
|
27
|
+
bothSide: "Cả hai bên",
|
|
28
|
+
leftOnly: "Chỉ bên trái",
|
|
29
|
+
rightOnly: "Chỉ bên phải",
|
|
30
|
+
distanceFromText: "Khoảng cách với văn bản",
|
|
31
|
+
top: "Trên (px)",
|
|
32
|
+
left: "Trái (px)",
|
|
33
|
+
bottom: "Dưới (px)",
|
|
34
|
+
right: "Phải (px)"
|
|
35
35
|
},
|
|
36
36
|
"image-position": {
|
|
37
|
-
title: "
|
|
38
|
-
horizontal: "
|
|
39
|
-
vertical: "
|
|
40
|
-
absolutePosition: "
|
|
41
|
-
relativePosition: "
|
|
42
|
-
toTheRightOf: "
|
|
43
|
-
relativeTo: "
|
|
44
|
-
bellow: "
|
|
45
|
-
options: "
|
|
46
|
-
moveObjectWithText: "
|
|
47
|
-
column: "
|
|
48
|
-
margin: "
|
|
49
|
-
page: "
|
|
50
|
-
line: "
|
|
51
|
-
paragraph: "
|
|
37
|
+
title: "Vị trí",
|
|
38
|
+
horizontal: "Ngang",
|
|
39
|
+
vertical: "Dọc",
|
|
40
|
+
absolutePosition: "Vị trí tuyệt đối (px)",
|
|
41
|
+
relativePosition: "Vị trí tương đối",
|
|
42
|
+
toTheRightOf: "ở bên phải",
|
|
43
|
+
relativeTo: "tương đối với",
|
|
44
|
+
bellow: "bên dưới",
|
|
45
|
+
options: "Tùy chọn",
|
|
46
|
+
moveObjectWithText: "Di chuyển đối tượng cùng văn bản",
|
|
47
|
+
column: "Cột",
|
|
48
|
+
margin: "Lề",
|
|
49
|
+
page: "Trang",
|
|
50
|
+
line: "Dòng",
|
|
51
|
+
paragraph: "Đoạn văn"
|
|
52
52
|
},
|
|
53
53
|
"update-status": {
|
|
54
54
|
exceedMaxSize: "Kích thước hình ảnh vượt quá giới hạn, giới hạn là {0}M",
|
|
@@ -58,11 +58,11 @@ const locale = { "docs-drawing-ui": {
|
|
|
58
58
|
},
|
|
59
59
|
shortcut: {
|
|
60
60
|
"drawing-view": "Chế độ xem bản vẽ",
|
|
61
|
-
"drawing-move-down": "
|
|
62
|
-
"drawing-move-up": "
|
|
63
|
-
"drawing-move-left": "
|
|
64
|
-
"drawing-move-right": "
|
|
65
|
-
"drawing-delete": "
|
|
61
|
+
"drawing-move-down": "Di chuyển bản vẽ xuống",
|
|
62
|
+
"drawing-move-up": "Di chuyển bản vẽ lên",
|
|
63
|
+
"drawing-move-left": "Di chuyển bản vẽ sang trái",
|
|
64
|
+
"drawing-move-right": "Di chuyển bản vẽ sang phải",
|
|
65
|
+
"drawing-delete": "Xóa bản vẽ"
|
|
66
66
|
}
|
|
67
67
|
} };
|
|
68
68
|
|
package/lib/locale/zh-HK.js
CHANGED
|
@@ -3,9 +3,9 @@ const locale = { "docs-drawing-ui": {
|
|
|
3
3
|
title: "圖片",
|
|
4
4
|
upload: { float: "插入圖片" },
|
|
5
5
|
shape: { insert: {
|
|
6
|
-
title: "
|
|
7
|
-
rectangle: "
|
|
8
|
-
ellipse: "
|
|
6
|
+
title: "插入圖形",
|
|
7
|
+
rectangle: "插入矩形",
|
|
8
|
+
ellipse: "插入橢圓形"
|
|
9
9
|
} },
|
|
10
10
|
panel: { title: "編圖" },
|
|
11
11
|
"image-popup": {
|
package/lib/locale/zh-TW.js
CHANGED
|
@@ -3,9 +3,9 @@ const locale = { "docs-drawing-ui": {
|
|
|
3
3
|
title: "圖片",
|
|
4
4
|
upload: { float: "插入圖片" },
|
|
5
5
|
shape: { insert: {
|
|
6
|
-
title: "
|
|
7
|
-
rectangle: "
|
|
8
|
-
ellipse: "
|
|
6
|
+
title: "插入圖形",
|
|
7
|
+
rectangle: "插入矩形",
|
|
8
|
+
ellipse: "插入橢圓形"
|
|
9
9
|
} },
|
|
10
10
|
panel: { title: "編圖" },
|
|
11
11
|
"image-popup": {
|
|
@@ -13,7 +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 { Nullable } from '@univerjs/core';
|
|
16
|
+
import type { IDocDrawingBase, Nullable } from '@univerjs/core';
|
|
17
17
|
import type { IDocumentSkeletonPage, IDocumentSkeletonRow, IDocumentSkeletonTable } from '@univerjs/engine-render';
|
|
18
18
|
import { Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
|
|
19
19
|
import { IDrawingManagerService } from '@univerjs/drawing';
|
|
@@ -29,6 +29,13 @@ export interface IDocsTableCellAnchorContext {
|
|
|
29
29
|
table: IDocumentSkeletonTable;
|
|
30
30
|
}
|
|
31
31
|
export declare function getDocsTableCellAnchorContext(unitId: string, cell: IDocumentSkeletonPage): Nullable<IDocsTableCellAnchorContext>;
|
|
32
|
+
export declare function shouldUseDocsDrawingOuterPageOrigin(config: {
|
|
33
|
+
drawing: Pick<IDocDrawingBase, 'behindDoc' | 'layoutType'>;
|
|
34
|
+
height: number;
|
|
35
|
+
hostPage?: IDocumentSkeletonPage;
|
|
36
|
+
page: IDocumentSkeletonPage;
|
|
37
|
+
width: number;
|
|
38
|
+
}): boolean;
|
|
32
39
|
export declare class DocDrawingTransformerController extends Disposable {
|
|
33
40
|
private readonly _commandService;
|
|
34
41
|
private readonly _univerInstanceService;
|
|
@@ -54,6 +61,5 @@ export declare class DocDrawingTransformerController extends Disposable {
|
|
|
54
61
|
private _getSceneAndTransformerByDrawingSearch;
|
|
55
62
|
private _getTransformCoordForDocumentOffset;
|
|
56
63
|
private _createOrUpdateInlineAnchor;
|
|
57
|
-
private _getDocObject;
|
|
58
64
|
private _getPageContentSize;
|
|
59
65
|
}
|
|
@@ -26,7 +26,7 @@ import { CanvasFloatDomService } from '@univerjs/ui';
|
|
|
26
26
|
export declare function calcDocFloatDomPositionByRect(rect: IBoundRectNoAngle, scene: Scene, opacity?: number, angle?: number): IFloatDomLayout;
|
|
27
27
|
interface IDocFloatDomParams extends IDocFloatDomDataBase {
|
|
28
28
|
}
|
|
29
|
-
type IDocFloatDomRuntimeViewport = Partial<Pick<IDocsCustomBlockRenderViewport, 'bleedLeft' | 'bleedWidth' | 'contentHeight' | 'contentWidth' | 'height' | 'viewportHeight'>>;
|
|
29
|
+
type IDocFloatDomRuntimeViewport = Partial<Pick<IDocsCustomBlockRenderViewport, 'bleedLeft' | 'bleedWidth' | 'contentHeight' | 'contentWidth' | 'height' | 'pageContentWidth' | 'viewScale' | 'viewportHeight'>>;
|
|
30
30
|
interface IDocFloatDomRuntimeParam extends IDocFloatDom {
|
|
31
31
|
customBlockRenderViewport?: IDocFloatDomRuntimeViewport;
|
|
32
32
|
transform?: Partial<ITransformState>;
|
package/lib/types/controllers/render-controllers/doc-drawing-transform-update.controller.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ interface IDrawingParamsWithBehindText {
|
|
|
28
28
|
hidden?: boolean;
|
|
29
29
|
transform: ITransformState;
|
|
30
30
|
transforms: ITransformState[];
|
|
31
|
-
customBlockRenderViewport?: Partial<Pick<IDocsCustomBlockRenderViewport, 'bleedLeft' | 'bleedWidth' | 'contentHeight' | 'contentWidth' | 'height' | 'viewportHeight'>>;
|
|
31
|
+
customBlockRenderViewport?: Partial<Pick<IDocsCustomBlockRenderViewport, 'bleedLeft' | 'bleedWidth' | 'contentHeight' | 'contentWidth' | 'height' | 'pageContentWidth' | 'viewportHeight'>>;
|
|
32
32
|
isMultiTransform: BooleanNumber;
|
|
33
33
|
}
|
|
34
34
|
interface IDrawingClipBounds {
|
|
@@ -101,7 +101,7 @@ export declare class DocDrawingTransformUpdateController extends Disposable impl
|
|
|
101
101
|
private _initialize;
|
|
102
102
|
private _initialRenderRefresh;
|
|
103
103
|
private _commandExecutedListener;
|
|
104
|
-
private
|
|
104
|
+
private _initTransformRefresh;
|
|
105
105
|
private _refreshDrawing;
|
|
106
106
|
private _getStaleNonMultiDrawings;
|
|
107
107
|
private _handleMultiDrawingsTransform;
|