@apollo-office/drawing-ui 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/LICENSE +176 -0
  2. package/MODIFICATIONS.md +26 -0
  3. package/NOTICE +14 -0
  4. package/README.md +42 -0
  5. package/lib/cjs/index.js +3146 -0
  6. package/lib/cjs/locale/ar-SA.js +74 -0
  7. package/lib/cjs/locale/ca-ES.js +74 -0
  8. package/lib/cjs/locale/de-DE.js +74 -0
  9. package/lib/cjs/locale/en-US.js +89 -0
  10. package/lib/cjs/locale/es-ES.js +74 -0
  11. package/lib/cjs/locale/fa-IR.js +74 -0
  12. package/lib/cjs/locale/fr-FR.js +74 -0
  13. package/lib/cjs/locale/id-ID.js +74 -0
  14. package/lib/cjs/locale/it-IT.js +74 -0
  15. package/lib/cjs/locale/ja-JP.js +74 -0
  16. package/lib/cjs/locale/ko-KR.js +74 -0
  17. package/lib/cjs/locale/pl-PL.js +74 -0
  18. package/lib/cjs/locale/pt-BR.js +74 -0
  19. package/lib/cjs/locale/ru-RU.js +74 -0
  20. package/lib/cjs/locale/sk-SK.js +74 -0
  21. package/lib/cjs/locale/vi-VN.js +74 -0
  22. package/lib/cjs/locale/zh-CN.js +74 -0
  23. package/lib/cjs/locale/zh-HK.js +74 -0
  24. package/lib/cjs/locale/zh-TW.js +74 -0
  25. package/lib/es/index.js +3116 -0
  26. package/lib/es/locale/ar-SA.js +73 -0
  27. package/lib/es/locale/ca-ES.js +73 -0
  28. package/lib/es/locale/de-DE.js +73 -0
  29. package/lib/es/locale/en-US.js +88 -0
  30. package/lib/es/locale/es-ES.js +73 -0
  31. package/lib/es/locale/fa-IR.js +73 -0
  32. package/lib/es/locale/fr-FR.js +73 -0
  33. package/lib/es/locale/id-ID.js +73 -0
  34. package/lib/es/locale/it-IT.js +73 -0
  35. package/lib/es/locale/ja-JP.js +73 -0
  36. package/lib/es/locale/ko-KR.js +73 -0
  37. package/lib/es/locale/pl-PL.js +73 -0
  38. package/lib/es/locale/pt-BR.js +73 -0
  39. package/lib/es/locale/ru-RU.js +73 -0
  40. package/lib/es/locale/sk-SK.js +73 -0
  41. package/lib/es/locale/vi-VN.js +73 -0
  42. package/lib/es/locale/zh-CN.js +73 -0
  43. package/lib/es/locale/zh-HK.js +73 -0
  44. package/lib/es/locale/zh-TW.js +73 -0
  45. package/lib/index.css +311 -0
  46. package/lib/index.js +3116 -0
  47. package/lib/locale/ar-SA.js +73 -0
  48. package/lib/locale/ca-ES.js +73 -0
  49. package/lib/locale/de-DE.js +73 -0
  50. package/lib/locale/en-US.js +88 -0
  51. package/lib/locale/es-ES.js +73 -0
  52. package/lib/locale/fa-IR.js +73 -0
  53. package/lib/locale/fr-FR.js +73 -0
  54. package/lib/locale/id-ID.js +73 -0
  55. package/lib/locale/it-IT.js +73 -0
  56. package/lib/locale/ja-JP.js +73 -0
  57. package/lib/locale/ko-KR.js +73 -0
  58. package/lib/locale/pl-PL.js +73 -0
  59. package/lib/locale/pt-BR.js +73 -0
  60. package/lib/locale/ru-RU.js +73 -0
  61. package/lib/locale/sk-SK.js +73 -0
  62. package/lib/locale/vi-VN.js +73 -0
  63. package/lib/locale/zh-CN.js +73 -0
  64. package/lib/locale/zh-HK.js +73 -0
  65. package/lib/locale/zh-TW.js +73 -0
  66. package/lib/types/commands/operations/drawing-align.operation.d.ts +43 -0
  67. package/lib/types/commands/operations/drawing-arrange.operation.d.ts +29 -0
  68. package/lib/types/commands/operations/drawing-group.operation.d.ts +35 -0
  69. package/lib/types/commands/operations/image-crop.operation.d.ts +36 -0
  70. package/lib/types/commands/operations/image-reset-size.operation.d.ts +17 -0
  71. package/lib/types/config/config.d.ts +22 -0
  72. package/lib/types/controllers/drawing-ui.controller.d.ts +27 -0
  73. package/lib/types/controllers/drawing-update.controller.d.ts +49 -0
  74. package/lib/types/controllers/image-cropper.controller.d.ts +41 -0
  75. package/lib/types/controllers/image-update.controller.d.ts +40 -0
  76. package/lib/types/controllers/utils.d.ts +25 -0
  77. package/lib/types/index.d.ts +32 -0
  78. package/lib/types/locale/ar-SA.d.ts +18 -0
  79. package/lib/types/locale/ca-ES.d.ts +18 -0
  80. package/lib/types/locale/de-DE.d.ts +18 -0
  81. package/lib/types/locale/en-US.d.ts +89 -0
  82. package/lib/types/locale/es-ES.d.ts +18 -0
  83. package/lib/types/locale/fa-IR.d.ts +18 -0
  84. package/lib/types/locale/fr-FR.d.ts +18 -0
  85. package/lib/types/locale/id-ID.d.ts +18 -0
  86. package/lib/types/locale/it-IT.d.ts +18 -0
  87. package/lib/types/locale/ja-JP.d.ts +18 -0
  88. package/lib/types/locale/ko-KR.d.ts +18 -0
  89. package/lib/types/locale/pl-PL.d.ts +18 -0
  90. package/lib/types/locale/pt-BR.d.ts +18 -0
  91. package/lib/types/locale/ru-RU.d.ts +18 -0
  92. package/lib/types/locale/sk-SK.d.ts +18 -0
  93. package/lib/types/locale/vi-VN.d.ts +18 -0
  94. package/lib/types/locale/zh-CN.d.ts +18 -0
  95. package/lib/types/locale/zh-HK.d.ts +18 -0
  96. package/lib/types/locale/zh-TW.d.ts +18 -0
  97. package/lib/types/menu/align.menu.d.ts +27 -0
  98. package/lib/types/menu/arrange.menu.d.ts +22 -0
  99. package/lib/types/menu/group.menu.d.ts +21 -0
  100. package/lib/types/menu/schema.d.ts +17 -0
  101. package/lib/types/plugin.d.ts +29 -0
  102. package/lib/types/services/drawing-image-clip.service.d.ts +48 -0
  103. package/lib/types/services/drawing-render.service.d.ts +38 -0
  104. package/lib/types/utils/config.d.ts +18 -0
  105. package/lib/types/utils/get-update-params.d.ts +19 -0
  106. package/lib/types/views/crop/image-cropper-object.d.ts +49 -0
  107. package/lib/types/views/image-popup-menu/ImagePopupMenu.d.ts +35 -0
  108. package/lib/types/views/image-popup-menu/component-name.d.ts +16 -0
  109. package/lib/types/views/panel/DrawingAlign.d.ts +21 -0
  110. package/lib/types/views/panel/DrawingArrange.d.ts +21 -0
  111. package/lib/types/views/panel/DrawingCommonPanel.d.ts +25 -0
  112. package/lib/types/views/panel/DrawingGroup.d.ts +21 -0
  113. package/lib/types/views/panel/DrawingTransform.d.ts +21 -0
  114. package/lib/types/views/panel/ImageCropper.d.ts +21 -0
  115. package/lib/umd/index.js +4 -0
  116. package/lib/umd/locale/ar-SA.js +1 -0
  117. package/lib/umd/locale/ca-ES.js +1 -0
  118. package/lib/umd/locale/de-DE.js +1 -0
  119. package/lib/umd/locale/en-US.js +1 -0
  120. package/lib/umd/locale/es-ES.js +1 -0
  121. package/lib/umd/locale/fa-IR.js +1 -0
  122. package/lib/umd/locale/fr-FR.js +1 -0
  123. package/lib/umd/locale/id-ID.js +1 -0
  124. package/lib/umd/locale/it-IT.js +1 -0
  125. package/lib/umd/locale/ja-JP.js +1 -0
  126. package/lib/umd/locale/ko-KR.js +1 -0
  127. package/lib/umd/locale/pl-PL.js +1 -0
  128. package/lib/umd/locale/pt-BR.js +1 -0
  129. package/lib/umd/locale/ru-RU.js +1 -0
  130. package/lib/umd/locale/sk-SK.js +1 -0
  131. package/lib/umd/locale/vi-VN.js +1 -0
  132. package/lib/umd/locale/zh-CN.js +1 -0
  133. package/lib/umd/locale/zh-HK.js +1 -0
  134. package/lib/umd/locale/zh-TW.js +1 -0
  135. package/package.json +74 -0
@@ -0,0 +1,73 @@
1
+ //#region src/locale/zh-TW.ts
2
+ const locale = { "drawing-ui": {
3
+ "image-cropper": { error: "無法裁切非圖片元素" },
4
+ "image-panel": {
5
+ arrange: {
6
+ title: "排列",
7
+ forward: "上移一層",
8
+ backward: "下移一層",
9
+ front: "置於頂層",
10
+ back: "置於底層"
11
+ },
12
+ transform: {
13
+ title: "變換",
14
+ rotate: "旋轉 (°)",
15
+ x: "X (px)",
16
+ y: "Y (px)",
17
+ width: "寬度 (px)",
18
+ height: "高度 (px)",
19
+ lock: "鎖定比例 (%)"
20
+ },
21
+ crop: {
22
+ title: "裁切",
23
+ start: "開始裁切",
24
+ mode: "自由比例裁切"
25
+ },
26
+ group: {
27
+ title: "組合",
28
+ group: "組合",
29
+ unGroup: "取消組合"
30
+ },
31
+ align: {
32
+ title: "對齊方式",
33
+ default: "選擇對齊方式",
34
+ left: "左對齊",
35
+ center: "水平居中",
36
+ right: "右對齊",
37
+ top: "頂部對齊",
38
+ middle: "垂直居中",
39
+ bottom: "底部對齊",
40
+ horizon: "水平分佈",
41
+ vertical: "垂直分佈"
42
+ },
43
+ null: "未選取任何物件"
44
+ },
45
+ "image-text-wrap": {
46
+ title: "文繞圖",
47
+ wrappingStyle: "文繞圖方式",
48
+ square: "矩形",
49
+ topAndBottom: "上及下",
50
+ inline: "與文字排列",
51
+ behindText: "文字在前",
52
+ inFrontText: "文字在後",
53
+ wrapText: "自動換行",
54
+ bothSide: "兩側",
55
+ leftOnly: "僅左側",
56
+ rightOnly: "僅右側",
57
+ distanceFromText: "與文字距離",
58
+ top: "上(px)",
59
+ left: "左(px)",
60
+ bottom: "下(px)",
61
+ right: "右(px)"
62
+ },
63
+ "image-popup": {
64
+ replace: "替換",
65
+ delete: "刪除",
66
+ edit: "編輯",
67
+ crop: "裁切",
68
+ reset: "重置大小"
69
+ }
70
+ } };
71
+
72
+ //#endregion
73
+ export { locale as default };
@@ -0,0 +1,43 @@
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 '@apollo-office/core';
17
+ export declare enum AlignType {
18
+ default = "0",
19
+ left = "1",
20
+ center = "2",
21
+ right = "3",
22
+ top = "4",
23
+ middle = "5",
24
+ bottom = "6",
25
+ horizon = "7",
26
+ vertical = "8"
27
+ }
28
+ export interface ISetDrawingAlignOperationParams {
29
+ alignType: AlignType;
30
+ drawings?: IDrawingParam[];
31
+ }
32
+ /**
33
+ * Set drawing align operation, including left, center, right, top, middle, bottom, horizon and vertical align.
34
+ */
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 '@apollo-office/core';
17
+ import { ArrangeTypeEnum } from '@apollo-office/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 '@apollo-office/core';
17
+ import { DrawingTypeEnum } from '@apollo-office/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>;
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { IDrawingSearch, IOperation } from '@apollo-office/core';
17
+ export declare const OpenImageCropOperation: IOperation<IDrawingSearch>;
18
+ export declare const CloseImageCropOperation: IOperation<{
19
+ isAuto?: boolean;
20
+ }>;
21
+ export declare enum CropType {
22
+ FREE = "0",
23
+ R1_1 = "1",
24
+ R16_9 = "2",
25
+ R9_16 = "3",
26
+ R5_4 = "4",
27
+ R4_5 = "5",
28
+ R4_3 = "6",
29
+ R3_4 = "7",
30
+ R3_2 = "8",
31
+ R2_3 = "9"
32
+ }
33
+ export interface IOpenImageCropOperationBySrcRectParams {
34
+ cropType: CropType;
35
+ }
36
+ export declare const AutoImageCropOperation: IOperation<IOpenImageCropOperationBySrcRectParams>;
@@ -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 { IDrawingSearch, IOperation } from '@apollo-office/core';
17
+ export declare const ImageResetSizeOperation: IOperation<IDrawingSearch[]>;
@@ -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 type { MenuConfig } from '@apollo-office/ui';
17
+ export declare const DRAWING_UI_PLUGIN_CONFIG_KEY = "drawing-ui.config";
18
+ export declare const configSymbol: unique symbol;
19
+ export interface IUniverDrawingUIConfig {
20
+ menu?: MenuConfig;
21
+ }
22
+ export declare const defaultPluginConfig: IUniverDrawingUIConfig;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Disposable, ICommandService } from '@apollo-office/core';
17
+ import { ComponentManager, IMenuManagerService } from '@apollo-office/ui';
18
+ export declare class DrawingUIController extends Disposable {
19
+ private readonly _componentManager;
20
+ private readonly _commandService;
21
+ private readonly _menuManagerService;
22
+ constructor(_componentManager: ComponentManager, _commandService: ICommandService, _menuManagerService: IMenuManagerService);
23
+ private _init;
24
+ private _initMenus;
25
+ private _initCommands;
26
+ private _initComponents;
27
+ }
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Disposable, ICommandService, IUniverInstanceService } from '@apollo-office/core';
17
+ import { IDrawingManagerService } from '@apollo-office/drawing';
18
+ import { IRenderManagerService } from '@apollo-office/engine-render';
19
+ export declare class DrawingUpdateController extends Disposable {
20
+ private readonly _currentUniverService;
21
+ private readonly _commandService;
22
+ private readonly _renderManagerService;
23
+ private readonly _drawingManagerService;
24
+ constructor(_currentUniverService: IUniverInstanceService, _commandService: ICommandService, _renderManagerService: IRenderManagerService, _drawingManagerService: IDrawingManagerService);
25
+ dispose(): void;
26
+ private _initialize;
27
+ private _recoveryImages;
28
+ private _commandExecutedListener;
29
+ private _drawingGroupListener;
30
+ private _getSceneAndTransformerByDrawingSearch;
31
+ private _groupDrawings;
32
+ private _groupDrawing;
33
+ private _ungroupDrawings;
34
+ private _ungroupDrawing;
35
+ private _drawingAlign;
36
+ private _applyAlignType;
37
+ private _sortDrawingTransform;
38
+ private _drawingArrangeListener;
39
+ private _drawingArrange;
40
+ private _sceneListenerOnDrawingMap;
41
+ private _drawingAddListener;
42
+ private _insertDrawing;
43
+ private _drawingRemoveListener;
44
+ private _drawingUpdateListener;
45
+ private _drawingRefreshListener;
46
+ private _drawingVisibleListener;
47
+ private _filterUpdateParams;
48
+ private _addListenerOnDrawing;
49
+ }
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Disposable, ICommandService, IUniverInstanceService, LocaleService } from '@apollo-office/core';
17
+ import { IDrawingManagerService } from '@apollo-office/drawing';
18
+ import { IRenderManagerService } from '@apollo-office/engine-render';
19
+ import { IMessageService } from '@apollo-office/ui';
20
+ export declare class ImageCropperController extends Disposable {
21
+ private readonly _commandService;
22
+ private readonly _drawingManagerService;
23
+ private readonly _renderManagerService;
24
+ private _univerInstanceService;
25
+ private readonly _messageService;
26
+ private readonly _localeService;
27
+ private _sceneListenerOnImageMap;
28
+ constructor(_commandService: ICommandService, _drawingManagerService: IDrawingManagerService, _renderManagerService: IRenderManagerService, _univerInstanceService: IUniverInstanceService, _messageService: IMessageService, _localeService: LocaleService);
29
+ private _init;
30
+ private _initAutoCrop;
31
+ private _calculateSrcRectByRatio;
32
+ private _updateCropperObject;
33
+ private _initOpenCrop;
34
+ private _searchCropObject;
35
+ private _initCloseCrop;
36
+ private _getApplyObjectByCropObject;
37
+ private _addListenerOnImage;
38
+ private _addHoverForImageCopper;
39
+ private _endCropListener;
40
+ private _getSrcRectByTransformState;
41
+ }
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Disposable, ICommandService, IUniverInstanceService } from '@apollo-office/core';
17
+ import { IDrawingManagerService, IImageIoService } from '@apollo-office/drawing';
18
+ import { IRenderManagerService } from '@apollo-office/engine-render';
19
+ import { IDialogService } from '@apollo-office/ui';
20
+ import { DrawingRenderService } from '../services/drawing-render.service';
21
+ export declare class ImageUpdateController extends Disposable {
22
+ private readonly _commandService;
23
+ private readonly _renderManagerService;
24
+ private readonly _drawingManagerService;
25
+ private readonly _dialogService;
26
+ private readonly _imageIoService;
27
+ private readonly _currentUniverService;
28
+ private readonly _drawingRenderService;
29
+ constructor(_commandService: ICommandService, _renderManagerService: IRenderManagerService, _drawingManagerService: IDrawingManagerService, _dialogService: IDialogService, _imageIoService: IImageIoService, _currentUniverService: IUniverInstanceService, _drawingRenderService: DrawingRenderService);
30
+ dispose(): void;
31
+ private _initialize;
32
+ private _commandExecutedListener;
33
+ private _getSceneAndTransformerByDrawingSearch;
34
+ private _resetImageSize;
35
+ private _drawingAddListener;
36
+ private _insertImages;
37
+ private _imageUpdateListener;
38
+ private _addHoverForImage;
39
+ private _addDialogForImage;
40
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { IDrawingSearch, IUniverInstanceService, Nullable } from '@apollo-office/core';
17
+ import type { IDrawingManagerService } from '@apollo-office/drawing';
18
+ import type { BaseObject, Scene } from '@apollo-office/engine-render';
19
+ import { UniverInstanceType } from '@apollo-office/core';
20
+ export declare function insertGroupObject(objectParam: IDrawingSearch, object: BaseObject, scene: Scene, drawingManagerService: IDrawingManagerService): void;
21
+ export declare function getCurrentUnitInfo(currentUniverService: IUniverInstanceService, propUnitId?: string): {
22
+ unitId: string;
23
+ subUnitId: Nullable<string>;
24
+ current: import("@apollo-office/core").UnitModel<object, UniverInstanceType>;
25
+ } | undefined;
@@ -0,0 +1,32 @@
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 './global.css';
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';
20
+ export { AutoImageCropOperation, CloseImageCropOperation, OpenImageCropOperation } from './commands/operations/image-crop.operation';
21
+ export { ImageResetSizeOperation } from './commands/operations/image-reset-size.operation';
22
+ export type { IUniverDrawingUIConfig } from './config/config';
23
+ export { getCurrentUnitInfo, insertGroupObject } from './controllers/utils';
24
+ export { UniverDrawingUIPlugin } from './plugin';
25
+ export { DrawingImageClipService, IMAGE_CLIP_SHAPE_PICKER_COMPONENT } from './services/drawing-image-clip.service';
26
+ export type { ImageShapeClipDelegate } from './services/drawing-image-clip.service';
27
+ export { DrawingRenderService } from './services/drawing-render.service';
28
+ export { getUpdateParams } from './utils/get-update-params';
29
+ export { ImageCropperObject } from './views/crop/image-cropper-object';
30
+ export { COMPONENT_IMAGE_POPUP_MENU } from './views/image-popup-menu/component-name';
31
+ export { ImagePopupMenu } from './views/image-popup-menu/ImagePopupMenu';
32
+ export { DrawingCommonPanel } from './views/panel/DrawingCommonPanel';
@@ -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 enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
@@ -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 enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
@@ -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 enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
@@ -0,0 +1,89 @@
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
+ declare const locale: {
17
+ 'drawing-ui': {
18
+ 'image-cropper': {
19
+ error: string;
20
+ };
21
+ 'image-panel': {
22
+ arrange: {
23
+ title: string;
24
+ forward: string;
25
+ backward: string;
26
+ front: string;
27
+ back: string;
28
+ };
29
+ transform: {
30
+ title: string;
31
+ rotate: string;
32
+ x: string;
33
+ y: string;
34
+ width: string;
35
+ height: string;
36
+ lock: string;
37
+ };
38
+ crop: {
39
+ title: string;
40
+ start: string;
41
+ mode: string;
42
+ };
43
+ group: {
44
+ title: string;
45
+ group: string;
46
+ unGroup: string;
47
+ };
48
+ align: {
49
+ title: string;
50
+ default: string;
51
+ left: string;
52
+ center: string;
53
+ right: string;
54
+ top: string;
55
+ middle: string;
56
+ bottom: string;
57
+ horizon: string;
58
+ vertical: string;
59
+ };
60
+ null: string;
61
+ };
62
+ 'image-popup': {
63
+ replace: string;
64
+ delete: string;
65
+ edit: string;
66
+ crop: string;
67
+ reset: string;
68
+ };
69
+ 'image-text-wrap': {
70
+ title: string;
71
+ wrappingStyle: string;
72
+ square: string;
73
+ topAndBottom: string;
74
+ inline: string;
75
+ behindText: string;
76
+ inFrontText: string;
77
+ wrapText: string;
78
+ bothSide: string;
79
+ leftOnly: string;
80
+ rightOnly: string;
81
+ distanceFromText: string;
82
+ top: string;
83
+ left: string;
84
+ bottom: string;
85
+ right: string;
86
+ };
87
+ };
88
+ };
89
+ export default locale;
@@ -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 enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
@@ -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 enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;