@univerjs/drawing-ui 0.17.0 → 0.18.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 +32 -1
- package/lib/cjs/locale/ca-ES.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/es-ES.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/sk-SK.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/index.js +32 -2332
- package/lib/es/locale/ca-ES.js +1 -65
- package/lib/es/locale/en-US.js +1 -65
- package/lib/es/locale/es-ES.js +1 -65
- package/lib/es/locale/fa-IR.js +1 -65
- package/lib/es/locale/fr-FR.js +1 -65
- package/lib/es/locale/ja-JP.js +1 -65
- package/lib/es/locale/ko-KR.js +1 -65
- package/lib/es/locale/ru-RU.js +1 -65
- package/lib/es/locale/sk-SK.js +1 -65
- package/lib/es/locale/vi-VN.js +1 -65
- package/lib/es/locale/zh-CN.js +1 -65
- package/lib/es/locale/zh-TW.js +1 -65
- package/lib/index.css +128 -1
- package/lib/index.js +32 -2332
- package/lib/locale/ca-ES.js +1 -65
- package/lib/locale/en-US.js +1 -65
- package/lib/locale/es-ES.js +1 -65
- package/lib/locale/fa-IR.js +1 -65
- package/lib/locale/fr-FR.js +1 -65
- package/lib/locale/ja-JP.js +1 -65
- package/lib/locale/ko-KR.js +1 -65
- package/lib/locale/ru-RU.js +1 -65
- package/lib/locale/sk-SK.js +1 -65
- package/lib/locale/vi-VN.js +1 -65
- package/lib/locale/zh-CN.js +1 -65
- package/lib/locale/zh-TW.js +1 -65
- package/lib/types/commands/operations/drawing-align.operation.d.ts +28 -1
- package/lib/types/commands/operations/drawing-arrange.operation.d.ts +29 -0
- package/lib/types/commands/operations/drawing-group.operation.d.ts +35 -0
- package/lib/types/commands/operations/image-crop.operation.d.ts +16 -1
- package/lib/types/commands/operations/image-reset-size.operation.d.ts +16 -1
- package/lib/types/config/config.d.ts +16 -1
- package/lib/types/controllers/drawing-ui.controller.d.ts +21 -4
- package/lib/types/controllers/drawing-update.controller.d.ts +15 -0
- package/lib/types/controllers/image-cropper.controller.d.ts +15 -0
- package/lib/types/controllers/image-update.controller.d.ts +15 -0
- package/lib/types/controllers/utils.d.ts +19 -4
- package/lib/types/index.d.ts +2 -0
- package/lib/types/locale/ca-ES.d.ts +16 -1
- package/lib/types/locale/es-ES.d.ts +16 -1
- package/lib/types/locale/fa-IR.d.ts +16 -1
- package/lib/types/locale/fr-FR.d.ts +16 -1
- package/lib/types/locale/ja-JP.d.ts +16 -1
- package/lib/types/locale/ko-KR.d.ts +16 -1
- package/lib/types/locale/ru-RU.d.ts +16 -1
- package/lib/types/locale/sk-SK.d.ts +16 -1
- package/lib/types/locale/vi-VN.d.ts +16 -1
- package/lib/types/locale/zh-CN.d.ts +16 -1
- package/lib/types/locale/zh-TW.d.ts +16 -1
- package/lib/types/menu/align.menu.d.ts +27 -0
- package/lib/types/menu/arrange.menu.d.ts +22 -0
- package/lib/types/menu/group.menu.d.ts +21 -0
- package/lib/types/menu/schema.d.ts +17 -0
- package/lib/types/plugin.d.ts +16 -1
- package/lib/types/services/drawing-render.service.d.ts +21 -3
- package/lib/types/utils/get-update-params.d.ts +18 -3
- package/lib/types/views/crop/image-cropper-object.d.ts +18 -2
- package/lib/types/views/image-popup-menu/ImagePopupMenu.d.ts +16 -1
- package/lib/types/views/panel/DrawingAlign.d.ts +16 -1
- package/lib/types/views/panel/DrawingArrange.d.ts +16 -1
- package/lib/types/views/panel/DrawingCommonPanel.d.ts +16 -1
- package/lib/types/views/panel/DrawingGroup.d.ts +16 -1
- package/lib/types/views/panel/DrawingTransform.d.ts +16 -1
- package/lib/types/views/panel/ImageCropper.d.ts +16 -1
- package/lib/umd/index.js +32 -1
- package/lib/umd/locale/ca-ES.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/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.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-TW.js +1 -1
- package/package.json +11 -10
package/lib/locale/vi-VN.js
CHANGED
|
@@ -1,65 +1 @@
|
|
|
1
|
-
const
|
|
2
|
-
"image-popup": {
|
|
3
|
-
replace: "Thay thế",
|
|
4
|
-
delete: "Xóa",
|
|
5
|
-
edit: "Chỉnh sửa",
|
|
6
|
-
crop: "Cắt",
|
|
7
|
-
reset: "Đặt lại kích thước"
|
|
8
|
-
},
|
|
9
|
-
"image-cropper": {
|
|
10
|
-
error: "Không thể cắt phần tử không phải hình ảnh"
|
|
11
|
-
},
|
|
12
|
-
"image-panel": {
|
|
13
|
-
arrange: {
|
|
14
|
-
title: "Sắp xếp",
|
|
15
|
-
forward: "Di chuyển lên một lớp",
|
|
16
|
-
backward: "Di chuyển xuống một lớp",
|
|
17
|
-
front: "Đưa lên trên cùng",
|
|
18
|
-
back: "Đưa xuống dưới cùng"
|
|
19
|
-
},
|
|
20
|
-
transform: {
|
|
21
|
-
title: "Biến đổi",
|
|
22
|
-
rotate: "Xoay (°)",
|
|
23
|
-
x: "X (px)",
|
|
24
|
-
y: "Y (px)",
|
|
25
|
-
width: "Chiều rộng (px)",
|
|
26
|
-
height: "Chiều cao (px)",
|
|
27
|
-
lock: "Khóa tỷ lệ (%)"
|
|
28
|
-
},
|
|
29
|
-
crop: {
|
|
30
|
-
title: "Cắt",
|
|
31
|
-
start: "Bắt đầu cắt",
|
|
32
|
-
mode: "Cắt tự do tỷ lệ"
|
|
33
|
-
},
|
|
34
|
-
group: {
|
|
35
|
-
title: "Nhóm",
|
|
36
|
-
group: "Nhóm",
|
|
37
|
-
reGroup: "Nhóm lại",
|
|
38
|
-
unGroup: "Hủy nhóm"
|
|
39
|
-
},
|
|
40
|
-
align: {
|
|
41
|
-
title: "Căn chỉnh",
|
|
42
|
-
default: "Chọn cách căn chỉnh",
|
|
43
|
-
left: "Căn trái",
|
|
44
|
-
center: "Căn giữa theo chiều ngang",
|
|
45
|
-
right: "Căn phải",
|
|
46
|
-
top: "Căn trên",
|
|
47
|
-
middle: "Căn giữa theo chiều dọc",
|
|
48
|
-
bottom: "Căn dưới",
|
|
49
|
-
horizon: "Phân phối theo chiều ngang",
|
|
50
|
-
vertical: "Phân phối theo chiều dọc"
|
|
51
|
-
},
|
|
52
|
-
null: "Không có đối tượng nào được chọn"
|
|
53
|
-
},
|
|
54
|
-
"drawing-view": "Drawing",
|
|
55
|
-
shortcut: {
|
|
56
|
-
"drawing-move-down": "Move Drawing down",
|
|
57
|
-
"drawing-move-up": "Move Drawing up",
|
|
58
|
-
"drawing-move-left": "Move Drawing left",
|
|
59
|
-
"drawing-move-right": "Move Drawing right",
|
|
60
|
-
"drawing-delete": "Delete Drawing"
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
export {
|
|
64
|
-
n as default
|
|
65
|
-
};
|
|
1
|
+
const e={"image-popup":{replace:`Thay thế`,delete:`Xóa`,edit:`Chỉnh sửa`,crop:`Cắt`,reset:`Đặt lại kích thước`},"image-cropper":{error:`Không thể cắt phần tử không phải hình ảnh`},"image-panel":{arrange:{title:`Sắp xếp`,forward:`Di chuyển lên một lớp`,backward:`Di chuyển xuống một lớp`,front:`Đưa lên trên cùng`,back:`Đưa xuống dưới cùng`},transform:{title:`Biến đổi`,rotate:`Xoay (°)`,x:`X (px)`,y:`Y (px)`,width:`Chiều rộng (px)`,height:`Chiều cao (px)`,lock:`Khóa tỷ lệ (%)`},crop:{title:`Cắt`,start:`Bắt đầu cắt`,mode:`Cắt tự do tỷ lệ`},group:{title:`Nhóm`,group:`Nhóm`,reGroup:`Nhóm lại`,unGroup:`Hủy nhóm`},align:{title:`Căn chỉnh`,default:`Chọn cách căn chỉnh`,left:`Căn trái`,center:`Căn giữa theo chiều ngang`,right:`Căn phải`,top:`Căn trên`,middle:`Căn giữa theo chiều dọc`,bottom:`Căn dưới`,horizon:`Phân phối theo chiều ngang`,vertical:`Phân phối theo chiều dọc`},null:`Không có đối tượng nào được chọn`},"drawing-view":`Drawing`,shortcut:{"drawing-move-down":`Move Drawing down`,"drawing-move-up":`Move Drawing up`,"drawing-move-left":`Move Drawing left`,"drawing-move-right":`Move Drawing right`,"drawing-delete":`Delete Drawing`}};export{e as default};
|
package/lib/locale/zh-CN.js
CHANGED
|
@@ -1,65 +1 @@
|
|
|
1
|
-
const e
|
|
2
|
-
"image-popup": {
|
|
3
|
-
replace: "替换",
|
|
4
|
-
delete: "删除",
|
|
5
|
-
edit: "编辑",
|
|
6
|
-
crop: "裁剪",
|
|
7
|
-
reset: "重置大小"
|
|
8
|
-
},
|
|
9
|
-
"image-cropper": {
|
|
10
|
-
error: "无法裁剪非图片元素"
|
|
11
|
-
},
|
|
12
|
-
"image-panel": {
|
|
13
|
-
arrange: {
|
|
14
|
-
title: "排列",
|
|
15
|
-
forward: "上移一层",
|
|
16
|
-
backward: "下移一层",
|
|
17
|
-
front: "置于顶层",
|
|
18
|
-
back: "置于底层"
|
|
19
|
-
},
|
|
20
|
-
transform: {
|
|
21
|
-
title: "变换",
|
|
22
|
-
rotate: "旋转 (°)",
|
|
23
|
-
x: "X (px)",
|
|
24
|
-
y: "Y (px)",
|
|
25
|
-
width: "宽度 (px)",
|
|
26
|
-
height: "高度 (px)",
|
|
27
|
-
lock: "锁定比例 (%)"
|
|
28
|
-
},
|
|
29
|
-
crop: {
|
|
30
|
-
title: "裁剪",
|
|
31
|
-
start: "开始裁剪",
|
|
32
|
-
mode: "自由比例裁剪"
|
|
33
|
-
},
|
|
34
|
-
group: {
|
|
35
|
-
title: "组合",
|
|
36
|
-
group: "组合",
|
|
37
|
-
reGroup: "重新组合",
|
|
38
|
-
unGroup: "取消组合"
|
|
39
|
-
},
|
|
40
|
-
align: {
|
|
41
|
-
title: "对齐方式",
|
|
42
|
-
default: "选择对齐方式",
|
|
43
|
-
left: "左对齐",
|
|
44
|
-
center: "水平居中",
|
|
45
|
-
right: "右对齐",
|
|
46
|
-
top: "顶部对齐",
|
|
47
|
-
middle: "垂直居中",
|
|
48
|
-
bottom: "底部对齐",
|
|
49
|
-
horizon: "水平分布",
|
|
50
|
-
vertical: "垂直分布"
|
|
51
|
-
},
|
|
52
|
-
null: "未选中任何对象"
|
|
53
|
-
},
|
|
54
|
-
"drawing-view": "绘图",
|
|
55
|
-
shortcut: {
|
|
56
|
-
"drawing-move-down": "下移绘图",
|
|
57
|
-
"drawing-move-up": "上移绘图",
|
|
58
|
-
"drawing-move-left": "左移绘图",
|
|
59
|
-
"drawing-move-right": "右移绘图",
|
|
60
|
-
"drawing-delete": "删除绘图"
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
export {
|
|
64
|
-
e as default
|
|
65
|
-
};
|
|
1
|
+
const e={"image-popup":{replace:`替换`,delete:`删除`,edit:`编辑`,crop:`裁剪`,reset:`重置大小`},"image-cropper":{error:`无法裁剪非图片元素`},"image-panel":{arrange:{title:`排列`,forward:`上移一层`,backward:`下移一层`,front:`置于顶层`,back:`置于底层`},transform:{title:`变换`,rotate:`旋转 (°)`,x:`X (px)`,y:`Y (px)`,width:`宽度 (px)`,height:`高度 (px)`,lock:`锁定比例 (%)`},crop:{title:`裁剪`,start:`开始裁剪`,mode:`自由比例裁剪`},group:{title:`组合`,group:`组合`,reGroup:`重新组合`,unGroup:`取消组合`},align:{title:`对齐方式`,default:`选择对齐方式`,left:`左对齐`,center:`水平居中`,right:`右对齐`,top:`顶部对齐`,middle:`垂直居中`,bottom:`底部对齐`,horizon:`水平分布`,vertical:`垂直分布`},null:`未选中任何对象`},"drawing-view":`绘图`,shortcut:{"drawing-move-down":`下移绘图`,"drawing-move-up":`上移绘图`,"drawing-move-left":`左移绘图`,"drawing-move-right":`右移绘图`,"drawing-delete":`删除绘图`}};export{e as default};
|
package/lib/locale/zh-TW.js
CHANGED
|
@@ -1,65 +1 @@
|
|
|
1
|
-
const e
|
|
2
|
-
"image-popup": {
|
|
3
|
-
replace: "替換",
|
|
4
|
-
delete: "刪除",
|
|
5
|
-
edit: "編輯",
|
|
6
|
-
crop: "裁切",
|
|
7
|
-
reset: "重置大小"
|
|
8
|
-
},
|
|
9
|
-
"image-cropper": {
|
|
10
|
-
error: "無法裁切非圖片元素"
|
|
11
|
-
},
|
|
12
|
-
"image-panel": {
|
|
13
|
-
arrange: {
|
|
14
|
-
title: "排列",
|
|
15
|
-
forward: "上移一層",
|
|
16
|
-
backward: "下移一層",
|
|
17
|
-
front: "置於頂層",
|
|
18
|
-
back: "置於底層"
|
|
19
|
-
},
|
|
20
|
-
transform: {
|
|
21
|
-
title: "變換",
|
|
22
|
-
rotate: "旋轉 (°)",
|
|
23
|
-
x: "X (px)",
|
|
24
|
-
y: "Y (px)",
|
|
25
|
-
width: "寬度 (px)",
|
|
26
|
-
height: "高度 (px)",
|
|
27
|
-
lock: "鎖定比例 (%)"
|
|
28
|
-
},
|
|
29
|
-
crop: {
|
|
30
|
-
title: "裁切",
|
|
31
|
-
start: "開始裁切",
|
|
32
|
-
mode: "自由比例裁切"
|
|
33
|
-
},
|
|
34
|
-
group: {
|
|
35
|
-
title: "組合",
|
|
36
|
-
group: "組合",
|
|
37
|
-
reGroup: "重新組合",
|
|
38
|
-
unGroup: "取消組合"
|
|
39
|
-
},
|
|
40
|
-
align: {
|
|
41
|
-
title: "對齊方式",
|
|
42
|
-
default: "選擇對齊方式",
|
|
43
|
-
left: "左對齊",
|
|
44
|
-
center: "水平居中",
|
|
45
|
-
right: "右對齊",
|
|
46
|
-
top: "頂部對齊",
|
|
47
|
-
middle: "垂直居中",
|
|
48
|
-
bottom: "底部對齊",
|
|
49
|
-
horizon: "水平分佈",
|
|
50
|
-
vertical: "垂直分佈"
|
|
51
|
-
},
|
|
52
|
-
null: "未選取任何物件"
|
|
53
|
-
},
|
|
54
|
-
"drawing-view": "繪圖",
|
|
55
|
-
shortcut: {
|
|
56
|
-
"drawing-move-down": "下移繪圖",
|
|
57
|
-
"drawing-move-up": "上移繪圖",
|
|
58
|
-
"drawing-move-left": "左移繪圖",
|
|
59
|
-
"drawing-move-right": "右移繪圖",
|
|
60
|
-
"drawing-delete": "刪除繪圖"
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
export {
|
|
64
|
-
e as default
|
|
65
|
-
};
|
|
1
|
+
const e={"image-popup":{replace:`替換`,delete:`刪除`,edit:`編輯`,crop:`裁切`,reset:`重置大小`},"image-cropper":{error:`無法裁切非圖片元素`},"image-panel":{arrange:{title:`排列`,forward:`上移一層`,backward:`下移一層`,front:`置於頂層`,back:`置於底層`},transform:{title:`變換`,rotate:`旋轉 (°)`,x:`X (px)`,y:`Y (px)`,width:`寬度 (px)`,height:`高度 (px)`,lock:`鎖定比例 (%)`},crop:{title:`裁切`,start:`開始裁切`,mode:`自由比例裁切`},group:{title:`組合`,group:`組合`,reGroup:`重新組合`,unGroup:`取消組合`},align:{title:`對齊方式`,default:`選擇對齊方式`,left:`左對齊`,center:`水平居中`,right:`右對齊`,top:`頂部對齊`,middle:`垂直居中`,bottom:`底部對齊`,horizon:`水平分佈`,vertical:`垂直分佈`},null:`未選取任何物件`},"drawing-view":`繪圖`,shortcut:{"drawing-move-down":`下移繪圖`,"drawing-move-up":`上移繪圖`,"drawing-move-left":`左移繪圖`,"drawing-move-right":`右移繪圖`,"drawing-delete":`刪除繪圖`}};export{e as default};
|
|
@@ -1,4 +1,19 @@
|
|
|
1
|
-
|
|
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 { IDrawingParam, IOperation } from '@univerjs/core';
|
|
2
17
|
export declare enum AlignType {
|
|
3
18
|
default = "0",
|
|
4
19
|
left = "1",
|
|
@@ -12,5 +27,17 @@ export declare enum AlignType {
|
|
|
12
27
|
}
|
|
13
28
|
export interface ISetDrawingAlignOperationParams {
|
|
14
29
|
alignType: AlignType;
|
|
30
|
+
drawings?: IDrawingParam[];
|
|
15
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Set drawing align operation, including left, center, right, top, middle, bottom, horizon and vertical align.
|
|
34
|
+
*/
|
|
16
35
|
export declare const SetDrawingAlignOperation: IOperation<ISetDrawingAlignOperationParams>;
|
|
36
|
+
export declare const SetDrawingAlignLeftOperation: IOperation;
|
|
37
|
+
export declare const SetDrawingAlignCenterOperation: IOperation;
|
|
38
|
+
export declare const SetDrawingAlignRightOperation: IOperation;
|
|
39
|
+
export declare const SetDrawingAlignTopOperation: IOperation;
|
|
40
|
+
export declare const SetDrawingAlignMiddleOperation: IOperation;
|
|
41
|
+
export declare const SetDrawingAlignBottomOperation: IOperation;
|
|
42
|
+
export declare const SetDrawingAlignHorizonOperation: IOperation;
|
|
43
|
+
export declare const SetDrawingAlignVerticalOperation: IOperation;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { IDrawingParam, IOperation } from '@univerjs/core';
|
|
17
|
+
import { ArrangeTypeEnum } from '@univerjs/core';
|
|
18
|
+
export interface IDrawingArrangeOperationParams {
|
|
19
|
+
arrangeType: ArrangeTypeEnum;
|
|
20
|
+
drawings?: IDrawingParam[];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Set the layer of the drawing, including forward, backward, front, and back
|
|
24
|
+
*/
|
|
25
|
+
export declare const SetDrawingArrangeOperation: IOperation<IDrawingArrangeOperationParams>;
|
|
26
|
+
export declare const SetDrawingArrangeFrontOperation: IOperation;
|
|
27
|
+
export declare const SetDrawingArrangeForwardOperation: IOperation;
|
|
28
|
+
export declare const SetDrawingArrangeBackOperation: IOperation;
|
|
29
|
+
export declare const SetDrawingArrangeBackwardOperation: IOperation;
|
|
@@ -0,0 +1,35 @@
|
|
|
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 { IDrawingParam, IOperation } from '@univerjs/core';
|
|
17
|
+
import { DrawingTypeEnum } from '@univerjs/core';
|
|
18
|
+
/**
|
|
19
|
+
* Now only support grouping images, shapes, and groups.
|
|
20
|
+
*/
|
|
21
|
+
export declare const DRAWING_GROUP_TYPES: DrawingTypeEnum[];
|
|
22
|
+
export interface IDrawingGroupOperationParams {
|
|
23
|
+
drawings?: IDrawingParam[];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Group the selected drawings into a new group. The selected drawings must be of type image, shape, or group, and there must be at least 2 drawings selected.
|
|
27
|
+
*/
|
|
28
|
+
export declare const SetDrawingGroupOperation: IOperation<IDrawingGroupOperationParams>;
|
|
29
|
+
export interface ICancelDrawingGroupOperationParams {
|
|
30
|
+
drawings?: IDrawingParam[];
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Ungroup the selected groups. The selected drawings must be at least 1 group selected.
|
|
34
|
+
*/
|
|
35
|
+
export declare const CancelDrawingGroupOperation: IOperation<ICancelDrawingGroupOperationParams>;
|
|
@@ -1,4 +1,19 @@
|
|
|
1
|
-
|
|
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 { IDrawingSearch, IOperation } from '@univerjs/core';
|
|
2
17
|
export declare const OpenImageCropOperation: IOperation<IDrawingSearch>;
|
|
3
18
|
export declare const CloseImageCropOperation: IOperation<{
|
|
4
19
|
isAuto?: boolean;
|
|
@@ -1,2 +1,17 @@
|
|
|
1
|
-
|
|
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 { IDrawingSearch, IOperation } from '@univerjs/core';
|
|
2
17
|
export declare const ImageResetSizeOperation: IOperation<IDrawingSearch[]>;
|
|
@@ -1,4 +1,19 @@
|
|
|
1
|
-
|
|
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 { MenuConfig } from '@univerjs/ui';
|
|
2
17
|
export declare const DRAWING_UI_PLUGIN_CONFIG_KEY = "drawing-ui.config";
|
|
3
18
|
export declare const configSymbol: unique symbol;
|
|
4
19
|
export interface IUniverDrawingUIConfig {
|
|
@@ -1,10 +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
|
+
*/
|
|
1
16
|
import { Disposable, ICommandService } from '@univerjs/core';
|
|
2
|
-
import { ComponentManager } from '@univerjs/ui';
|
|
17
|
+
import { ComponentManager, IMenuManagerService } from '@univerjs/ui';
|
|
3
18
|
export declare class DrawingUIController extends Disposable {
|
|
4
19
|
private readonly _componentManager;
|
|
5
20
|
private readonly _commandService;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
private _initCommands;
|
|
21
|
+
private readonly _menuManagerService;
|
|
22
|
+
constructor(_componentManager: ComponentManager, _commandService: ICommandService, _menuManagerService: IMenuManagerService);
|
|
9
23
|
private _init;
|
|
24
|
+
private _initMenus;
|
|
25
|
+
private _initCommands;
|
|
26
|
+
private _initComponents;
|
|
10
27
|
}
|
|
@@ -1,3 +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
|
+
*/
|
|
1
16
|
import { Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
|
|
2
17
|
import { IDrawingManagerService } from '@univerjs/drawing';
|
|
3
18
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
@@ -1,3 +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
|
+
*/
|
|
1
16
|
import { Disposable, ICommandService, IUniverInstanceService, LocaleService } from '@univerjs/core';
|
|
2
17
|
import { IDrawingManagerService } from '@univerjs/drawing';
|
|
3
18
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
@@ -1,3 +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
|
+
*/
|
|
1
16
|
import { Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
|
|
2
17
|
import { IDrawingManagerService, IImageIoService } from '@univerjs/drawing';
|
|
3
18
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
@@ -1,9 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { IDrawingSearch, IUniverInstanceService, Nullable } from '@univerjs/core';
|
|
17
|
+
import type { IDrawingManagerService } from '@univerjs/drawing';
|
|
18
|
+
import type { BaseObject, Scene } from '@univerjs/engine-render';
|
|
4
19
|
export declare function insertGroupObject(objectParam: IDrawingSearch, object: BaseObject, scene: Scene, drawingManagerService: IDrawingManagerService): void;
|
|
5
20
|
export declare function getCurrentUnitInfo(currentUniverService: IUniverInstanceService, propUnitId?: string): {
|
|
6
21
|
unitId: string;
|
|
7
22
|
subUnitId: Nullable<string>;
|
|
8
|
-
current: import(
|
|
23
|
+
current: import("@univerjs/core").UnitModel<object, number>;
|
|
9
24
|
} | undefined;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import './global.css';
|
|
17
17
|
export { SetDrawingAlignOperation } from './commands/operations/drawing-align.operation';
|
|
18
|
+
export { type IDrawingArrangeOperationParams, SetDrawingArrangeOperation, } from './commands/operations/drawing-arrange.operation';
|
|
19
|
+
export { CancelDrawingGroupOperation, DRAWING_GROUP_TYPES, type ICancelDrawingGroupOperationParams, type IDrawingGroupOperationParams, SetDrawingGroupOperation, } from './commands/operations/drawing-group.operation';
|
|
18
20
|
export { AutoImageCropOperation, CloseImageCropOperation, OpenImageCropOperation } from './commands/operations/image-crop.operation';
|
|
19
21
|
export { ImageResetSizeOperation } from './commands/operations/image-reset-size.operation';
|
|
20
22
|
export type { IUniverDrawingUIConfig } from './config/config';
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
-
|
|
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 enUS from './en-US';
|
|
2
17
|
declare const locale: typeof enUS;
|
|
3
18
|
export default locale;
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
-
|
|
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 enUS from './en-US';
|
|
2
17
|
declare const locale: typeof enUS;
|
|
3
18
|
export default locale;
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
-
|
|
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 enUS from './en-US';
|
|
2
17
|
declare const locale: typeof enUS;
|
|
3
18
|
export default locale;
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
-
|
|
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 enUS from './en-US';
|
|
2
17
|
declare const locale: typeof enUS;
|
|
3
18
|
export default locale;
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
-
|
|
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 enUS from './en-US';
|
|
2
17
|
declare const locale: typeof enUS;
|
|
3
18
|
export default locale;
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
-
|
|
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 enUS from './en-US';
|
|
2
17
|
declare const locale: typeof enUS;
|
|
3
18
|
export default locale;
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
-
|
|
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 enUS from './en-US';
|
|
2
17
|
declare const locale: typeof enUS;
|
|
3
18
|
export default locale;
|