@univerjs/sheets-drawing-ui 0.19.0 → 0.20.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/facade.js +1 -1
- package/lib/cjs/index.js +2 -2
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +2 -2
- package/lib/facade.js +1 -1
- package/lib/index.js +2 -2
- package/lib/types/controllers/render-controllers/sheet-drawing.render-controller.d.ts +3 -4
- package/lib/types/controllers/sheet-drawing-copy-paste.controller.d.ts +3 -1
- package/lib/types/controllers/sheet-drawing-group-copy-paste.controller.d.ts +3 -1
- package/lib/types/controllers/sheet-drawing-transform-affected.controller.d.ts +5 -6
- package/lib/types/controllers/sheet-drawing-update.controller.d.ts +5 -4
- package/lib/types/controllers/sheet-drawing.controller.d.ts +1 -5
- package/lib/types/facade/f-event.d.ts +24 -261
- package/lib/types/facade/f-range.d.ts +3 -3
- package/lib/types/facade/f-univer.d.ts +3 -4
- package/lib/types/facade/f-worksheet.d.ts +4 -211
- package/lib/types/facade/index.d.ts +0 -4
- package/lib/types/index.d.ts +0 -7
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +2 -2
- package/package.json +13 -13
- package/lib/types/basics/transform-position.d.ts +0 -32
- package/lib/types/commands/commands/insert-sheet-drawing.command.d.ts +0 -20
- package/lib/types/commands/commands/interfaces.d.ts +0 -35
- package/lib/types/commands/commands/remove-sheet-drawing.command.d.ts +0 -20
- package/lib/types/commands/commands/set-drawing-arrange.command.d.ts +0 -25
- package/lib/types/commands/commands/set-sheet-drawing.command.d.ts +0 -20
- package/lib/types/commands/operations/clear-drawing-transformer.operation.d.ts +0 -17
- package/lib/types/facade/f-enum.d.ts +0 -38
- package/lib/types/facade/f-over-grid-image.d.ts +0 -603
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs/sheets-drawing-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -62,17 +62,17 @@
|
|
|
62
62
|
"rxjs": ">=7.0.0"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@univerjs/core": "0.
|
|
66
|
-
"@univerjs/docs-drawing": "0.
|
|
67
|
-
"@univerjs/docs-ui": "0.
|
|
68
|
-
"@univerjs/design": "0.
|
|
69
|
-
"@univerjs/drawing
|
|
70
|
-
"@univerjs/drawing": "0.
|
|
71
|
-
"@univerjs/
|
|
72
|
-
"@univerjs/sheets-drawing": "0.
|
|
73
|
-
"@univerjs/
|
|
74
|
-
"@univerjs/
|
|
75
|
-
"@univerjs/
|
|
65
|
+
"@univerjs/core": "0.20.0",
|
|
66
|
+
"@univerjs/docs-drawing": "0.20.0",
|
|
67
|
+
"@univerjs/docs-ui": "0.20.0",
|
|
68
|
+
"@univerjs/design": "0.20.0",
|
|
69
|
+
"@univerjs/drawing": "0.20.0",
|
|
70
|
+
"@univerjs/drawing-ui": "0.20.0",
|
|
71
|
+
"@univerjs/engine-render": "0.20.0",
|
|
72
|
+
"@univerjs/sheets-drawing": "0.20.0",
|
|
73
|
+
"@univerjs/sheets-ui": "0.20.0",
|
|
74
|
+
"@univerjs/ui": "0.20.0",
|
|
75
|
+
"@univerjs/sheets": "0.20.0"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"postcss": "^8.5.8",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"tailwindcss": "3.4.18",
|
|
82
82
|
"typescript": "^6.0.2",
|
|
83
83
|
"vitest": "^4.1.1",
|
|
84
|
-
"@univerjs-infra/shared": "0.
|
|
84
|
+
"@univerjs-infra/shared": "0.20.0"
|
|
85
85
|
},
|
|
86
86
|
"scripts": {
|
|
87
87
|
"test": "vitest run",
|
|
@@ -1,32 +0,0 @@
|
|
|
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 { ITransformState, Nullable } from '@univerjs/core';
|
|
17
|
-
import type { ISheetDrawingPosition } from '@univerjs/sheets-drawing';
|
|
18
|
-
import type { ISheetSelectionRenderService, SheetSkeletonManagerService } from '@univerjs/sheets-ui';
|
|
19
|
-
export declare function drawingPositionToTransform(position: ISheetDrawingPosition, selectionRenderService: ISheetSelectionRenderService, sheetSkeletonManagerService: SheetSkeletonManagerService): Nullable<ITransformState>;
|
|
20
|
-
export declare function transformToDrawingPosition(transform: ITransformState, selectionRenderService: ISheetSelectionRenderService): Nullable<ISheetDrawingPosition>;
|
|
21
|
-
/**
|
|
22
|
-
* In excel, the basic drawing with rotate bound use major axis switch, axis-aligned bound will bu used.That means the position bound of drawing element will save as nearly axis-aligned rectangle.
|
|
23
|
-
* Here is the rule to convert transform to axis-aligned position:
|
|
24
|
-
* [-45°, 45°): use the original bound
|
|
25
|
-
* [45°, 135°): rotate the bound 90° clockwise,and the left, top, bottom,right will use the rotated bound.
|
|
26
|
-
* [135°, 225°): use the original bound
|
|
27
|
-
* [225°, 315°): rotate the bound 90° counterclockwise, and the left, top, bottom, right will use the rotated bound.
|
|
28
|
-
* @param transform The transform state of the drawing element.
|
|
29
|
-
* @param selectionRenderService
|
|
30
|
-
* @return The axis-aligned position of the drawing element.
|
|
31
|
-
*/
|
|
32
|
-
export declare function transformToAxisAlignPosition(transform: ITransformState, selectionRenderService: ISheetSelectionRenderService): Nullable<ISheetDrawingPosition>;
|
|
@@ -1,20 +0,0 @@
|
|
|
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
|
-
/**
|
|
18
|
-
* The command to insert new defined name
|
|
19
|
-
*/
|
|
20
|
-
export declare const InsertSheetDrawingCommand: ICommand;
|
|
@@ -1,35 +0,0 @@
|
|
|
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 { DrawingTypeEnum } from '@univerjs/core';
|
|
17
|
-
import type { ISheetDrawing } from '@univerjs/sheets-drawing';
|
|
18
|
-
export interface IInsertDrawingCommandParams {
|
|
19
|
-
unitId: string;
|
|
20
|
-
drawings: ISheetDrawing[];
|
|
21
|
-
}
|
|
22
|
-
export interface IDeleteDrawingCommandParam {
|
|
23
|
-
unitId: string;
|
|
24
|
-
subUnitId: string;
|
|
25
|
-
drawingId: string;
|
|
26
|
-
drawingType: DrawingTypeEnum;
|
|
27
|
-
}
|
|
28
|
-
export interface IDeleteDrawingCommandParams {
|
|
29
|
-
unitId: string;
|
|
30
|
-
drawings: IDeleteDrawingCommandParam[];
|
|
31
|
-
}
|
|
32
|
-
export interface ISetDrawingCommandParams {
|
|
33
|
-
unitId: string;
|
|
34
|
-
drawings: Partial<ISheetDrawing>[];
|
|
35
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
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
|
-
/**
|
|
18
|
-
* The command to remove new sheet image
|
|
19
|
-
*/
|
|
20
|
-
export declare const RemoveSheetDrawingCommand: ICommand;
|
|
@@ -1,25 +0,0 @@
|
|
|
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
|
-
import type { IDrawingOrderMapParam } from '@univerjs/drawing';
|
|
18
|
-
import { ArrangeTypeEnum } from '@univerjs/core';
|
|
19
|
-
export interface ISetDrawingArrangeCommandParams extends IDrawingOrderMapParam {
|
|
20
|
-
arrangeType: ArrangeTypeEnum;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* The command to insert new defined name
|
|
24
|
-
*/
|
|
25
|
-
export declare const SetDrawingArrangeCommand: ICommand;
|
|
@@ -1,20 +0,0 @@
|
|
|
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
|
-
/**
|
|
18
|
-
* The command to update defined name
|
|
19
|
-
*/
|
|
20
|
-
export declare const SetSheetDrawingCommand: ICommand;
|
|
@@ -1,17 +0,0 @@
|
|
|
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 { IMutation } from '@univerjs/core';
|
|
17
|
-
export declare const ClearSheetDrawingTransformerOperation: IMutation<string[]>;
|
|
@@ -1,38 +0,0 @@
|
|
|
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 { DrawingTypeEnum, ImageSourceType } from '@univerjs/core';
|
|
17
|
-
import { FEnum } from '@univerjs/core/facade';
|
|
18
|
-
import { SheetDrawingAnchorType } from '@univerjs/sheets-drawing';
|
|
19
|
-
/**
|
|
20
|
-
* @ignore
|
|
21
|
-
*/
|
|
22
|
-
export interface IFDrawingEnumMixin {
|
|
23
|
-
/** Please refer to {@link DrawingTypeEnum}. */
|
|
24
|
-
DrawingType: typeof DrawingTypeEnum;
|
|
25
|
-
/** Please refer to {@link ImageSourceType}. */
|
|
26
|
-
ImageSourceType: Omit<typeof ImageSourceType, 'UUID'>;
|
|
27
|
-
/** Please refer to {@link SheetDrawingAnchorType}. */
|
|
28
|
-
SheetDrawingAnchorType: typeof SheetDrawingAnchorType;
|
|
29
|
-
}
|
|
30
|
-
export declare class FDrawingEnumMixin extends FEnum implements IFDrawingEnumMixin {
|
|
31
|
-
get DrawingType(): typeof DrawingTypeEnum;
|
|
32
|
-
get ImageSourceType(): Omit<typeof ImageSourceType, 'UUID'>;
|
|
33
|
-
get SheetDrawingAnchorType(): typeof SheetDrawingAnchorType;
|
|
34
|
-
}
|
|
35
|
-
declare module '@univerjs/core/facade' {
|
|
36
|
-
interface FEnum extends IFDrawingEnumMixin {
|
|
37
|
-
}
|
|
38
|
-
}
|