@univerjs-pro/docs-shape-ui 0.24.0-insiders.20260528-29f582d
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/README.md +43 -0
- package/lib/cjs/index.js +1 -0
- package/lib/cjs/locale/ar-SA.js +1 -0
- package/lib/cjs/locale/ca-ES.js +1 -0
- package/lib/cjs/locale/de-DE.js +1 -0
- package/lib/cjs/locale/en-US.js +1 -0
- package/lib/cjs/locale/es-ES.js +1 -0
- package/lib/cjs/locale/fa-IR.js +1 -0
- package/lib/cjs/locale/fr-FR.js +1 -0
- package/lib/cjs/locale/id-ID.js +1 -0
- package/lib/cjs/locale/it-IT.js +1 -0
- package/lib/cjs/locale/ja-JP.js +1 -0
- package/lib/cjs/locale/ko-KR.js +1 -0
- package/lib/cjs/locale/pl-PL.js +1 -0
- package/lib/cjs/locale/pt-BR.js +1 -0
- package/lib/cjs/locale/ru-RU.js +1 -0
- package/lib/cjs/locale/sk-SK.js +1 -0
- package/lib/cjs/locale/vi-VN.js +1 -0
- package/lib/cjs/locale/zh-CN.js +1 -0
- package/lib/cjs/locale/zh-HK.js +1 -0
- package/lib/cjs/locale/zh-TW.js +1 -0
- package/lib/es/index.js +1 -0
- package/lib/es/locale/ar-SA.js +1 -0
- package/lib/es/locale/ca-ES.js +1 -0
- package/lib/es/locale/de-DE.js +1 -0
- package/lib/es/locale/en-US.js +1 -0
- package/lib/es/locale/es-ES.js +1 -0
- package/lib/es/locale/fa-IR.js +1 -0
- package/lib/es/locale/fr-FR.js +1 -0
- package/lib/es/locale/id-ID.js +1 -0
- package/lib/es/locale/it-IT.js +1 -0
- package/lib/es/locale/ja-JP.js +1 -0
- package/lib/es/locale/ko-KR.js +1 -0
- package/lib/es/locale/pl-PL.js +1 -0
- package/lib/es/locale/pt-BR.js +1 -0
- package/lib/es/locale/ru-RU.js +1 -0
- package/lib/es/locale/sk-SK.js +1 -0
- package/lib/es/locale/vi-VN.js +1 -0
- package/lib/es/locale/zh-CN.js +1 -0
- package/lib/es/locale/zh-HK.js +1 -0
- package/lib/es/locale/zh-TW.js +1 -0
- package/lib/index.css +612 -0
- package/lib/index.js +1 -0
- package/lib/locale/ar-SA.js +1 -0
- package/lib/locale/ca-ES.js +1 -0
- package/lib/locale/de-DE.js +1 -0
- package/lib/locale/en-US.js +1 -0
- package/lib/locale/es-ES.js +1 -0
- package/lib/locale/fa-IR.js +1 -0
- package/lib/locale/fr-FR.js +1 -0
- package/lib/locale/id-ID.js +1 -0
- package/lib/locale/it-IT.js +1 -0
- package/lib/locale/ja-JP.js +1 -0
- package/lib/locale/ko-KR.js +1 -0
- package/lib/locale/pl-PL.js +1 -0
- package/lib/locale/pt-BR.js +1 -0
- package/lib/locale/ru-RU.js +1 -0
- package/lib/locale/sk-SK.js +1 -0
- package/lib/locale/vi-VN.js +1 -0
- package/lib/locale/zh-CN.js +1 -0
- package/lib/locale/zh-HK.js +1 -0
- package/lib/locale/zh-TW.js +1 -0
- package/lib/types/command-util.d.ts +19 -0
- package/lib/types/commands/command/menu-insert-shape.command.d.ts +20 -0
- package/lib/types/commands/operations/close-shape-panel.operation.d.ts +7 -0
- package/lib/types/commands/operations/open-shape-panel.operation.d.ts +7 -0
- package/lib/types/const.d.ts +3 -0
- package/lib/types/controllers/config.schema.d.ts +7 -0
- package/lib/types/controllers/doc-shape-adjust.controller.d.ts +43 -0
- package/lib/types/controllers/doc-shape-render.controller.d.ts +24 -0
- package/lib/types/controllers/docs-shape-ui.controller.d.ts +64 -0
- package/lib/types/controllers/image-shape-clip.controller.d.ts +11 -0
- package/lib/types/controllers/menu.schema.d.ts +2 -0
- package/lib/types/controllers/shape-text-editing.render-controller.d.ts +22 -0
- package/lib/types/controllers/shape-text-float-menu.render-controller.d.ts +18 -0
- package/lib/types/controllers/shape-update.controller.d.ts +18 -0
- package/lib/types/index.d.ts +7 -0
- package/lib/types/locale/ar-SA.d.ts +3 -0
- package/lib/types/locale/ca-ES.d.ts +3 -0
- package/lib/types/locale/de-DE.d.ts +3 -0
- package/lib/types/locale/en-US.d.ts +309 -0
- package/lib/types/locale/es-ES.d.ts +3 -0
- package/lib/types/locale/fa-IR.d.ts +3 -0
- package/lib/types/locale/fr-FR.d.ts +3 -0
- package/lib/types/locale/id-ID.d.ts +3 -0
- package/lib/types/locale/it-IT.d.ts +3 -0
- package/lib/types/locale/ja-JP.d.ts +3 -0
- package/lib/types/locale/ko-KR.d.ts +3 -0
- package/lib/types/locale/pl-PL.d.ts +3 -0
- package/lib/types/locale/pt-BR.d.ts +3 -0
- package/lib/types/locale/ru-RU.d.ts +3 -0
- package/lib/types/locale/sk-SK.d.ts +3 -0
- package/lib/types/locale/vi-VN.d.ts +3 -0
- package/lib/types/locale/zh-CN.d.ts +3 -0
- package/lib/types/locale/zh-HK.d.ts +3 -0
- package/lib/types/locale/zh-TW.d.ts +3 -0
- package/lib/types/plugin.d.ts +18 -0
- package/lib/types/services/shape-text-editing.service.d.ts +20 -0
- package/lib/types/utils/shape-text-document.d.ts +11 -0
- package/lib/types/view-model/doc-shape-adjust-point-object.d.ts +22 -0
- package/lib/types/view-model/drawing-shape.d.ts +78 -0
- package/lib/types/view-model/shape-data-model.d.ts +6 -0
- package/lib/types/views/ShapeOptions.d.ts +30 -0
- package/lib/types/views/ShapePicker.d.ts +8 -0
- package/lib/types/views/shape-editor-panel/ShapeEditorPanel.d.ts +12 -0
- package/lib/types/views/shape-editor-panel/ShapeFillEditor.d.ts +13 -0
- package/lib/types/views/shape-editor-panel/ShapeImageFillEditor.d.ts +10 -0
- package/lib/types/views/shape-editor-panel/ShapeLineEditor.d.ts +11 -0
- package/lib/types/views/shape-editor-panel/ShapePositionEditor.d.ts +1 -0
- package/lib/types/views/shape-editor-panel/index.d.ts +1 -0
- package/lib/types/views/shape-floating-toolbar/ShapeFloatingToolbar.d.ts +19 -0
- package/lib/types/views/shape-floating-toolbar/shape-floating-toolbar-utils.d.ts +10 -0
- package/lib/types/views/shape-menu/shape-menu-factory.d.ts +11 -0
- package/lib/types/views/shape-text-editor/Editor.d.ts +24 -0
- package/lib/types/views/shape-text-editor/ShapeTextFloatToolbar.d.ts +1 -0
- package/lib/types/views/shape-text-editor/hooks/use-shape-position.d.ts +29 -0
- package/lib/types/views/shape-text-editor/index.d.ts +5 -0
- package/lib/types/views/shape-text-editor/position-wrapper.d.ts +15 -0
- package/lib/types/views/shapes.d.ts +58 -0
- package/lib/umd/index.js +1 -0
- package/lib/umd/locale/ar-SA.js +1 -0
- package/lib/umd/locale/ca-ES.js +1 -0
- package/lib/umd/locale/de-DE.js +1 -0
- package/lib/umd/locale/en-US.js +1 -0
- package/lib/umd/locale/es-ES.js +1 -0
- package/lib/umd/locale/fa-IR.js +1 -0
- package/lib/umd/locale/fr-FR.js +1 -0
- package/lib/umd/locale/id-ID.js +1 -0
- package/lib/umd/locale/it-IT.js +1 -0
- package/lib/umd/locale/ja-JP.js +1 -0
- package/lib/umd/locale/ko-KR.js +1 -0
- package/lib/umd/locale/pl-PL.js +1 -0
- package/lib/umd/locale/pt-BR.js +1 -0
- package/lib/umd/locale/ru-RU.js +1 -0
- package/lib/umd/locale/sk-SK.js +1 -0
- package/lib/umd/locale/vi-VN.js +1 -0
- package/lib/umd/locale/zh-CN.js +1 -0
- package/lib/umd/locale/zh-HK.js +1 -0
- package/lib/umd/locale/zh-TW.js +1 -0
- package/package.json +93 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ShapeTypeEnum } from '@univerjs-pro/engine-shape';
|
|
2
|
+
import { Disposable } from '@univerjs/core';
|
|
3
|
+
import { IDrawingManagerService } from '@univerjs/drawing';
|
|
4
|
+
import { DrawingImageClipService } from '@univerjs/drawing-ui';
|
|
5
|
+
export declare class ImageShapeClipController extends Disposable {
|
|
6
|
+
private readonly _clipService;
|
|
7
|
+
private readonly _drawingManagerService;
|
|
8
|
+
constructor(_clipService: DrawingImageClipService, _drawingManagerService: IDrawingManagerService);
|
|
9
|
+
private _registerImageShapeClipDelegate;
|
|
10
|
+
clipByShape(unitId: string, subUnitId: string, imageId: string, shapeType: ShapeTypeEnum, adjustValues?: Record<string, number>): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { DocumentDataModel } from '@univerjs/core';
|
|
2
|
+
import type { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
3
|
+
import { DocsShapeService } from '@univerjs-pro/docs-shape';
|
|
4
|
+
import { Disposable, IContextService } from '@univerjs/core';
|
|
5
|
+
import { IDrawingManagerService } from '@univerjs/drawing';
|
|
6
|
+
import { ShapeTextEditingService } from '../services/shape-text-editing.service';
|
|
7
|
+
import { DrawingShape } from '../view-model/drawing-shape';
|
|
8
|
+
export declare function findPickedTarget<T>(target: unknown, isMatch: (target: unknown) => target is T): T | null;
|
|
9
|
+
export declare function findDrawingShapeFromPickedTarget(target: unknown): DrawingShape | null;
|
|
10
|
+
export declare class ShapeTextEditingRenderController extends Disposable implements IRenderModule {
|
|
11
|
+
private readonly _context;
|
|
12
|
+
private readonly _shapeTextEditingService;
|
|
13
|
+
private readonly _drawingManagerService;
|
|
14
|
+
private readonly _contextService;
|
|
15
|
+
private _docsShapeService;
|
|
16
|
+
private _lastEditingShapeKey;
|
|
17
|
+
constructor(_context: IRenderContext<DocumentDataModel>, _shapeTextEditingService: ShapeTextEditingService, _drawingManagerService: IDrawingManagerService, _contextService: IContextService, _docsShapeService: DocsShapeService);
|
|
18
|
+
private _initEvents;
|
|
19
|
+
private _getFocusedShapeAtPoint;
|
|
20
|
+
private _initSelection;
|
|
21
|
+
private _initEditingParams;
|
|
22
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { DocumentDataModel } from '@univerjs/core';
|
|
2
|
+
import type { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
3
|
+
import { Disposable } from '@univerjs/core';
|
|
4
|
+
import { DocSelectionManagerService } from '@univerjs/docs';
|
|
5
|
+
import { DocCanvasPopManagerService, DocSelectionRenderService } from '@univerjs/docs-ui';
|
|
6
|
+
import { ComponentManager } from '@univerjs/ui';
|
|
7
|
+
export declare class ShapeTextFloatMenuRenderController extends Disposable implements IRenderModule {
|
|
8
|
+
private readonly _context;
|
|
9
|
+
private readonly _docSelectionManagerService;
|
|
10
|
+
private readonly _docCanvasPopManagerService;
|
|
11
|
+
private readonly _componentManager;
|
|
12
|
+
private readonly _docSelectionRenderService;
|
|
13
|
+
private _floatMenu;
|
|
14
|
+
constructor(_context: IRenderContext<DocumentDataModel>, _docSelectionManagerService: DocSelectionManagerService, _docCanvasPopManagerService: DocCanvasPopManagerService, _componentManager: ComponentManager, _docSelectionRenderService: DocSelectionRenderService);
|
|
15
|
+
private _initSelectionChange;
|
|
16
|
+
private _hideFloatMenu;
|
|
17
|
+
private _showFloatMenu;
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IDocShapeDrawingParam } from '@univerjs-pro/docs-shape';
|
|
2
|
+
import { Disposable, ICommandService } from '@univerjs/core';
|
|
3
|
+
import { IDrawingManagerService } from '@univerjs/drawing';
|
|
4
|
+
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
5
|
+
import { DocDrawingShapeRenderController } from './doc-shape-render.controller';
|
|
6
|
+
export declare class ShapeUpdateController extends Disposable {
|
|
7
|
+
private readonly _commandService;
|
|
8
|
+
private readonly _renderManagerService;
|
|
9
|
+
private readonly _drawingManagerService;
|
|
10
|
+
private readonly _docDrawingShapeRenderController;
|
|
11
|
+
constructor(_commandService: ICommandService, _renderManagerService: IRenderManagerService, _drawingManagerService: IDrawingManagerService, _docDrawingShapeRenderController: DocDrawingShapeRenderController);
|
|
12
|
+
private _initialize;
|
|
13
|
+
updateShapeFillImage(param: IDocShapeDrawingParam, image: HTMLImageElement | undefined): void;
|
|
14
|
+
private _insertShapes;
|
|
15
|
+
private _updateShape;
|
|
16
|
+
private _refreshShapeData;
|
|
17
|
+
private _getSceneByUnitId;
|
|
18
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import './global.css';
|
|
2
|
+
export { MenuInsertShapeCommand } from './commands/command/menu-insert-shape.command';
|
|
3
|
+
export { CloseDocShapeFormatPanelOperation } from './commands/operations/close-shape-panel.operation';
|
|
4
|
+
export { OpenDocShapeFormatPanelOperation } from './commands/operations/open-shape-panel.operation';
|
|
5
|
+
export type { IUniverDocsShapeUIConfig } from './controllers/config.schema';
|
|
6
|
+
export { DocsShapeUIController } from './controllers/docs-shape-ui.controller';
|
|
7
|
+
export { UniverDocsShapeUIPlugin } from './plugin';
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
declare const locale: {
|
|
2
|
+
'docs-shape-ui': {
|
|
3
|
+
title: string;
|
|
4
|
+
insertShape: string;
|
|
5
|
+
openPanel: string;
|
|
6
|
+
deleteShape: string;
|
|
7
|
+
hidePanel: string;
|
|
8
|
+
formatShape: string;
|
|
9
|
+
shapeStyle: string;
|
|
10
|
+
shapePosition: string;
|
|
11
|
+
toggleFlipH: string;
|
|
12
|
+
toggleFlipV: string;
|
|
13
|
+
rotateRight90: string;
|
|
14
|
+
rotateLeft90: string;
|
|
15
|
+
toggleTextVertical: string;
|
|
16
|
+
fill: {
|
|
17
|
+
title: string;
|
|
18
|
+
noFill: string;
|
|
19
|
+
solidFill: string;
|
|
20
|
+
gradientFill: string;
|
|
21
|
+
pictureFill: string;
|
|
22
|
+
patternFill: string;
|
|
23
|
+
color: string;
|
|
24
|
+
transparency: string;
|
|
25
|
+
picture: {
|
|
26
|
+
source: string;
|
|
27
|
+
insert: string;
|
|
28
|
+
tileAsTexture: string;
|
|
29
|
+
offsetX: string;
|
|
30
|
+
offsetY: string;
|
|
31
|
+
scaleX: string;
|
|
32
|
+
scaleY: string;
|
|
33
|
+
alignment: string;
|
|
34
|
+
rotateWithShape: string;
|
|
35
|
+
align: {
|
|
36
|
+
tl: string;
|
|
37
|
+
t: string;
|
|
38
|
+
tr: string;
|
|
39
|
+
l: string;
|
|
40
|
+
ctr: string;
|
|
41
|
+
r: string;
|
|
42
|
+
bl: string;
|
|
43
|
+
b: string;
|
|
44
|
+
br: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
line: {
|
|
49
|
+
title: string;
|
|
50
|
+
noLine: string;
|
|
51
|
+
solidLine: string;
|
|
52
|
+
gradientLine: string;
|
|
53
|
+
color: string;
|
|
54
|
+
transparency: string;
|
|
55
|
+
width: string;
|
|
56
|
+
dashType: {
|
|
57
|
+
title: string;
|
|
58
|
+
solid: string;
|
|
59
|
+
roundDot: string;
|
|
60
|
+
squareDot: string;
|
|
61
|
+
dash: string;
|
|
62
|
+
dashDot: string;
|
|
63
|
+
longDash: string;
|
|
64
|
+
longDashDot: string;
|
|
65
|
+
longDashDotDot: string;
|
|
66
|
+
};
|
|
67
|
+
capType: {
|
|
68
|
+
title: string;
|
|
69
|
+
flat: string;
|
|
70
|
+
round: string;
|
|
71
|
+
square: string;
|
|
72
|
+
};
|
|
73
|
+
joinType: {
|
|
74
|
+
title: string;
|
|
75
|
+
miter: string;
|
|
76
|
+
round: string;
|
|
77
|
+
bevel: string;
|
|
78
|
+
};
|
|
79
|
+
beginArrowType: string;
|
|
80
|
+
beginArrowSize: string;
|
|
81
|
+
endArrowType: string;
|
|
82
|
+
endArrowSize: string;
|
|
83
|
+
arrowType: {
|
|
84
|
+
none: string;
|
|
85
|
+
arrow: string;
|
|
86
|
+
openArrow: string;
|
|
87
|
+
stealthArrow: string;
|
|
88
|
+
diamondArrow: string;
|
|
89
|
+
ovalArrow: string;
|
|
90
|
+
};
|
|
91
|
+
arrowSize: {
|
|
92
|
+
small: string;
|
|
93
|
+
medium: string;
|
|
94
|
+
large: string;
|
|
95
|
+
};
|
|
96
|
+
sketchType: {
|
|
97
|
+
title: string;
|
|
98
|
+
none: string;
|
|
99
|
+
curved: string;
|
|
100
|
+
freehand: string;
|
|
101
|
+
handDrawn: string;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
shape: {
|
|
106
|
+
group: {
|
|
107
|
+
line: string;
|
|
108
|
+
rectangle: string;
|
|
109
|
+
basicShape: string;
|
|
110
|
+
blockArrow: string;
|
|
111
|
+
equationShape: string;
|
|
112
|
+
flowchart: string;
|
|
113
|
+
starAndBanner: string;
|
|
114
|
+
callout: string;
|
|
115
|
+
other: string;
|
|
116
|
+
};
|
|
117
|
+
type: {
|
|
118
|
+
line: string;
|
|
119
|
+
'straight-connector1': string;
|
|
120
|
+
'straight-connector2': string;
|
|
121
|
+
'bent-connector3': string;
|
|
122
|
+
'bent-connector3-arrow1': string;
|
|
123
|
+
'bent-connector3-arrow2': string;
|
|
124
|
+
'curved-connector3': string;
|
|
125
|
+
'curved-connector3-arrow1': string;
|
|
126
|
+
'curved-connector3-arrow2': string;
|
|
127
|
+
rect: string;
|
|
128
|
+
'round-rect': string;
|
|
129
|
+
'snip1-rect': string;
|
|
130
|
+
'snip2-same-rect': string;
|
|
131
|
+
'snip2-diag-rect': string;
|
|
132
|
+
'snip-round-rect': string;
|
|
133
|
+
'round1-rect': string;
|
|
134
|
+
'round2-same-rect': string;
|
|
135
|
+
'round2-diag-rect': string;
|
|
136
|
+
'rect-textbox-horizontal': string;
|
|
137
|
+
'rect-textbox-vertical': string;
|
|
138
|
+
ellipse: string;
|
|
139
|
+
triangle: string;
|
|
140
|
+
'rt-triangle': string;
|
|
141
|
+
parallelogram: string;
|
|
142
|
+
trapezoid: string;
|
|
143
|
+
'non-isosceles-trapezoid': string;
|
|
144
|
+
diamond: string;
|
|
145
|
+
pentagon: string;
|
|
146
|
+
hexagon: string;
|
|
147
|
+
heptagon: string;
|
|
148
|
+
octagon: string;
|
|
149
|
+
decagon: string;
|
|
150
|
+
dodecagon: string;
|
|
151
|
+
pie: string;
|
|
152
|
+
chord: string;
|
|
153
|
+
teardrop: string;
|
|
154
|
+
frame: string;
|
|
155
|
+
'half-frame': string;
|
|
156
|
+
corner: string;
|
|
157
|
+
'diag-stripe': string;
|
|
158
|
+
plus: string;
|
|
159
|
+
plaque: string;
|
|
160
|
+
can: string;
|
|
161
|
+
cube: string;
|
|
162
|
+
bevel: string;
|
|
163
|
+
donut: string;
|
|
164
|
+
'no-smoking': string;
|
|
165
|
+
'block-arc': string;
|
|
166
|
+
'folder-corner': string;
|
|
167
|
+
'smiley-face': string;
|
|
168
|
+
heart: string;
|
|
169
|
+
'lightning-bolt': string;
|
|
170
|
+
sun: string;
|
|
171
|
+
moon: string;
|
|
172
|
+
cloud: string;
|
|
173
|
+
arc: string;
|
|
174
|
+
'bracket-pair': string;
|
|
175
|
+
'brace-pair': string;
|
|
176
|
+
'left-bracket': string;
|
|
177
|
+
'right-bracket': string;
|
|
178
|
+
'left-brace': string;
|
|
179
|
+
'right-brace': string;
|
|
180
|
+
'right-arrow': string;
|
|
181
|
+
'left-arrow': string;
|
|
182
|
+
'up-arrow': string;
|
|
183
|
+
'down-arrow': string;
|
|
184
|
+
'left-right-arrow': string;
|
|
185
|
+
'up-down-arrow': string;
|
|
186
|
+
'quad-arrow': string;
|
|
187
|
+
'left-right-up-arrow': string;
|
|
188
|
+
'bent-arrow': string;
|
|
189
|
+
'uturn-arrow': string;
|
|
190
|
+
'left-up-arrow': string;
|
|
191
|
+
'bent-up-arrow': string;
|
|
192
|
+
'curved-right-arrow': string;
|
|
193
|
+
'curved-left-arrow': string;
|
|
194
|
+
'curved-up-arrow': string;
|
|
195
|
+
'curved-down-arrow': string;
|
|
196
|
+
'striped-right-arrow': string;
|
|
197
|
+
'notched-right-arrow': string;
|
|
198
|
+
'home-plate': string;
|
|
199
|
+
chevron: string;
|
|
200
|
+
'right-arrow-callout': string;
|
|
201
|
+
'down-arrow-callout': string;
|
|
202
|
+
'left-arrow-callout': string;
|
|
203
|
+
'up-arrow-callout': string;
|
|
204
|
+
'left-right-arrow-callout': string;
|
|
205
|
+
'quad-arrow-callout': string;
|
|
206
|
+
'circular-arrow': string;
|
|
207
|
+
'math-plus': string;
|
|
208
|
+
'math-minus': string;
|
|
209
|
+
'math-multiply': string;
|
|
210
|
+
'math-divide': string;
|
|
211
|
+
'math-equal': string;
|
|
212
|
+
'math-not-equal': string;
|
|
213
|
+
'flow-chart-process': string;
|
|
214
|
+
'flow-chart-alternate-process': string;
|
|
215
|
+
'flow-chart-decision': string;
|
|
216
|
+
'flow-chart-input-output': string;
|
|
217
|
+
'flow-chart-predefined-process': string;
|
|
218
|
+
'flow-chart-internal-storage': string;
|
|
219
|
+
'flow-chart-document': string;
|
|
220
|
+
'flow-chart-multidocument': string;
|
|
221
|
+
'flow-chart-terminator': string;
|
|
222
|
+
'flow-chart-preparation': string;
|
|
223
|
+
'flow-chart-manual-input': string;
|
|
224
|
+
'flow-chart-manual-operation': string;
|
|
225
|
+
'flow-chart-connector': string;
|
|
226
|
+
'flow-chart-offpage-connector': string;
|
|
227
|
+
'flow-chart-punched-card': string;
|
|
228
|
+
'flow-chart-punched-tape': string;
|
|
229
|
+
'flow-chart-summing-junction': string;
|
|
230
|
+
'flow-chart-or': string;
|
|
231
|
+
'flow-chart-collate': string;
|
|
232
|
+
'flow-chart-sort': string;
|
|
233
|
+
'flow-chart-extract': string;
|
|
234
|
+
'flow-chart-merge': string;
|
|
235
|
+
'flow-chart-online-storage': string;
|
|
236
|
+
'flow-chart-delay': string;
|
|
237
|
+
'flow-chart-magnetic-tape': string;
|
|
238
|
+
'flow-chart-magnetic-disk': string;
|
|
239
|
+
'flow-chart-magnetic-drum': string;
|
|
240
|
+
'flow-chart-display': string;
|
|
241
|
+
'irregular-seal1': string;
|
|
242
|
+
'irregular-seal2': string;
|
|
243
|
+
star4: string;
|
|
244
|
+
star5: string;
|
|
245
|
+
star6: string;
|
|
246
|
+
star7: string;
|
|
247
|
+
star8: string;
|
|
248
|
+
star10: string;
|
|
249
|
+
star12: string;
|
|
250
|
+
star16: string;
|
|
251
|
+
star24: string;
|
|
252
|
+
star32: string;
|
|
253
|
+
ribbon2: string;
|
|
254
|
+
ribbon: string;
|
|
255
|
+
'ellipse-ribbon2': string;
|
|
256
|
+
'ellipse-ribbon': string;
|
|
257
|
+
'vertical-scroll': string;
|
|
258
|
+
'horizontal-scroll': string;
|
|
259
|
+
wave: string;
|
|
260
|
+
'double-wave': string;
|
|
261
|
+
'wedge-rect-callout': string;
|
|
262
|
+
'wedge-round-rect-callout': string;
|
|
263
|
+
'wedge-ellipse-callout': string;
|
|
264
|
+
'cloud-callout': string;
|
|
265
|
+
'border-callout1': string;
|
|
266
|
+
'border-callout2': string;
|
|
267
|
+
'border-callout3': string;
|
|
268
|
+
'accent-callout1': string;
|
|
269
|
+
'accent-callout2': string;
|
|
270
|
+
'accent-callout3': string;
|
|
271
|
+
callout1: string;
|
|
272
|
+
callout2: string;
|
|
273
|
+
callout3: string;
|
|
274
|
+
'accent-border-callout1': string;
|
|
275
|
+
'accent-border-callout2': string;
|
|
276
|
+
'accent-border-callout3': string;
|
|
277
|
+
'left-circular-arrow': string;
|
|
278
|
+
'left-right-circular-arrow': string;
|
|
279
|
+
'swoosh-arrow': string;
|
|
280
|
+
'left-right-ribbon': string;
|
|
281
|
+
'pie-wedge': string;
|
|
282
|
+
funnel: string;
|
|
283
|
+
gear6: string;
|
|
284
|
+
gear9: string;
|
|
285
|
+
'corner-tabs': string;
|
|
286
|
+
'action-button-back-previous': string;
|
|
287
|
+
'action-button-forward-next': string;
|
|
288
|
+
'action-button-beginning': string;
|
|
289
|
+
'action-button-end': string;
|
|
290
|
+
'action-button-home': string;
|
|
291
|
+
'action-button-information': string;
|
|
292
|
+
'action-button-return': string;
|
|
293
|
+
'action-button-movie': string;
|
|
294
|
+
'action-button-document': string;
|
|
295
|
+
'action-button-sound': string;
|
|
296
|
+
'action-button-help': string;
|
|
297
|
+
'action-button-blank': string;
|
|
298
|
+
'chart-plus': string;
|
|
299
|
+
'chart-star': string;
|
|
300
|
+
'chart-x': string;
|
|
301
|
+
'flow-chart-offline-storage': string;
|
|
302
|
+
'line-inv': string;
|
|
303
|
+
'plaque-tabs': string;
|
|
304
|
+
'square-tabs': string;
|
|
305
|
+
'up-down-arrow-callout': string;
|
|
306
|
+
};
|
|
307
|
+
};
|
|
308
|
+
};
|
|
309
|
+
export default locale;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IUniverDocsShapeUIConfig } from './controllers/config.schema';
|
|
2
|
+
import { ICommandService, IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
3
|
+
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
4
|
+
export declare class UniverDocsShapeUIPlugin extends Plugin {
|
|
5
|
+
private readonly _config;
|
|
6
|
+
protected readonly _injector: Injector;
|
|
7
|
+
private readonly _commandService;
|
|
8
|
+
private readonly _configService;
|
|
9
|
+
private readonly _renderManagerService;
|
|
10
|
+
static type: UniverInstanceType;
|
|
11
|
+
static pluginName: string;
|
|
12
|
+
static packageName: string;
|
|
13
|
+
static version: string;
|
|
14
|
+
constructor(_config: Partial<IUniverDocsShapeUIConfig> | undefined, _injector: Injector, _commandService: ICommandService, _configService: IConfigService, _renderManagerService: IRenderManagerService);
|
|
15
|
+
onStarting(): void;
|
|
16
|
+
onReady(): void;
|
|
17
|
+
private _initCommands;
|
|
18
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Nullable } from '@univerjs/core';
|
|
2
|
+
import type { Observable } from 'rxjs';
|
|
3
|
+
import { Disposable } from '@univerjs/core';
|
|
4
|
+
export interface IEditingParams {
|
|
5
|
+
unitId: string;
|
|
6
|
+
subUnitId: string;
|
|
7
|
+
shapeId: string;
|
|
8
|
+
shapeKey: string;
|
|
9
|
+
visible: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare class ShapeTextEditingService extends Disposable {
|
|
12
|
+
private readonly _editingParams$;
|
|
13
|
+
readonly editingParams$: Observable<Nullable<IEditingParams>>;
|
|
14
|
+
private readonly _onSavingEditorData$;
|
|
15
|
+
readonly onSavingEditorData$: Observable<Nullable<boolean>>;
|
|
16
|
+
dispose(): void;
|
|
17
|
+
setEditing(params: Nullable<IEditingParams>): void;
|
|
18
|
+
setOnSavingEditorData(params: Nullable<boolean>): void;
|
|
19
|
+
getEditing(): Nullable<IEditingParams>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { IShapeRect } from '@univerjs-pro/engine-shape';
|
|
2
|
+
import type { HorizontalAlign, IDocumentData, VerticalAlign } from '@univerjs/core';
|
|
3
|
+
interface IPrepareShapeTextDocumentOptions {
|
|
4
|
+
isHorizontal: boolean;
|
|
5
|
+
textRect: IShapeRect;
|
|
6
|
+
verticalAlign?: VerticalAlign;
|
|
7
|
+
horizontalAlign?: HorizontalAlign;
|
|
8
|
+
}
|
|
9
|
+
export declare function prepareShapeTextDocumentData(documentData: IDocumentData, options: IPrepareShapeTextDocumentOptions): IDocumentData;
|
|
10
|
+
export declare function stripShapeTextDocumentLayout(documentData: IDocumentData): IDocumentData;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { IShapeProps } from '@univerjs/engine-render';
|
|
2
|
+
import { Shape } from '@univerjs/engine-render';
|
|
3
|
+
export interface IDocShapeAdjustPointObjectProps extends IShapeProps {
|
|
4
|
+
shapeId: string;
|
|
5
|
+
adjName: string;
|
|
6
|
+
unitId: string;
|
|
7
|
+
subUnitId: string;
|
|
8
|
+
}
|
|
9
|
+
export declare class DocShapeAdjustPointObject extends Shape<IDocShapeAdjustPointObjectProps> {
|
|
10
|
+
private _shapeId;
|
|
11
|
+
private _adjName;
|
|
12
|
+
private _unitId;
|
|
13
|
+
private _subUnitId;
|
|
14
|
+
constructor(key?: string, props?: IDocShapeAdjustPointObjectProps);
|
|
15
|
+
getDrawingSearch(): {
|
|
16
|
+
unitId: string;
|
|
17
|
+
subUnitId: string;
|
|
18
|
+
drawingId: string;
|
|
19
|
+
};
|
|
20
|
+
setShapeProps(props: Partial<IDocShapeAdjustPointObjectProps>): void;
|
|
21
|
+
protected _draw(ctx: CanvasRenderingContext2D): void;
|
|
22
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { ShapeModel } from '@univerjs-pro/engine-shape';
|
|
2
|
+
import type { IDrawingParam, ISrcRect, LocaleService, Nullable } from '@univerjs/core';
|
|
3
|
+
import type { IShapeProps, IViewportInfo, UniverRenderingContext, Vector2 } from '@univerjs/engine-render';
|
|
4
|
+
import { DrawingTypeEnum } from '@univerjs/core';
|
|
5
|
+
import { RENDER_CLASS_TYPE, Shape, Transform } from '@univerjs/engine-render';
|
|
6
|
+
export interface IDrawingShapeProps extends IShapeProps {
|
|
7
|
+
shapeModel: ShapeModel;
|
|
8
|
+
/**
|
|
9
|
+
* 20.1.8.55 srcRect (Source Rectangle)
|
|
10
|
+
*/
|
|
11
|
+
srcRect?: Nullable<ISrcRect>;
|
|
12
|
+
/**
|
|
13
|
+
* 20.1.9.18 prstGeom (Preset geometry)
|
|
14
|
+
*/
|
|
15
|
+
prstGeom?: Nullable<string>;
|
|
16
|
+
drawingType: DrawingTypeEnum;
|
|
17
|
+
/**
|
|
18
|
+
* LocaleService for rich text rendering
|
|
19
|
+
*/
|
|
20
|
+
localeService?: LocaleService;
|
|
21
|
+
shapeId: string;
|
|
22
|
+
/**
|
|
23
|
+
* The unit ID (workbook ID).
|
|
24
|
+
*/
|
|
25
|
+
unitId: string;
|
|
26
|
+
/**
|
|
27
|
+
* The sub-unit ID.
|
|
28
|
+
*/
|
|
29
|
+
subUnitId: string;
|
|
30
|
+
/**
|
|
31
|
+
* Whether the shape is currently being edited
|
|
32
|
+
*/
|
|
33
|
+
isEditing?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Pre-loaded HTMLImageElement for picture fill rendering.
|
|
36
|
+
* Populated asynchronously by the render controller after image loading.
|
|
37
|
+
*/
|
|
38
|
+
image?: HTMLImageElement;
|
|
39
|
+
}
|
|
40
|
+
export interface IDrawingShapeData extends IDrawingParam {
|
|
41
|
+
/**
|
|
42
|
+
* 20.1.8.55 srcRect (Source Rectangle)
|
|
43
|
+
*/
|
|
44
|
+
srcRect?: Nullable<ISrcRect>;
|
|
45
|
+
/**
|
|
46
|
+
* 20.1.9.18 prstGeom (Preset geometry)
|
|
47
|
+
*/
|
|
48
|
+
prstGeom?: Nullable<string>;
|
|
49
|
+
}
|
|
50
|
+
export declare class DrawingShape extends Shape<IDrawingShapeProps> {
|
|
51
|
+
protected _props: IDrawingShapeProps;
|
|
52
|
+
private _transformCalculateSrcRect;
|
|
53
|
+
private readonly _drawingType;
|
|
54
|
+
isDrawingObject: boolean;
|
|
55
|
+
constructor(id: string, config: IDrawingShapeProps);
|
|
56
|
+
private _init;
|
|
57
|
+
setPrstGeom(prstGeom?: Nullable<string>): void;
|
|
58
|
+
setEditing(isEditing: boolean): void;
|
|
59
|
+
get unitId(): string;
|
|
60
|
+
get subUnitId(): string;
|
|
61
|
+
private _updateSrcRectByTransform;
|
|
62
|
+
setSrcRect(srcRect?: Nullable<ISrcRect>): void;
|
|
63
|
+
setFillImage(image: HTMLImageElement | undefined): void;
|
|
64
|
+
set transform(trans: Transform);
|
|
65
|
+
get transform(): Transform;
|
|
66
|
+
get shapeModel(): ShapeModel;
|
|
67
|
+
get shapeId(): string;
|
|
68
|
+
get classType(): RENDER_CLASS_TYPE;
|
|
69
|
+
_draw(ctx: UniverRenderingContext, bounds?: IViewportInfo, renderWidth?: number, renderHeight?: number): void;
|
|
70
|
+
getDrawingPoints(_bounds: IViewportInfo): void;
|
|
71
|
+
private _drawShapeText;
|
|
72
|
+
private _drawSimpleText;
|
|
73
|
+
private _drawRichText;
|
|
74
|
+
render(mainCtx: UniverRenderingContext, bounds: IViewportInfo, _drawAdj?: boolean): this;
|
|
75
|
+
getInverseCoord(coord: Vector2): Vector2;
|
|
76
|
+
isHit(coord: Vector2): boolean;
|
|
77
|
+
dispose(): void;
|
|
78
|
+
}
|