@univerjs-pro/shape-editor-ui 0.25.0-insiders.20260604-29ebbff
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 +34 -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 +714 -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/components/fill-style-tabs-editor/FillStyleTabsEditor.d.ts +39 -0
- package/lib/types/index.d.ts +17 -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 +340 -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/views/shape-editor-panel/ShapeEditorPanel.d.ts +13 -0
- package/lib/types/views/shape-editor-panel/ShapeFillEditor.d.ts +9 -0
- package/lib/types/views/shape-editor-panel/ShapeImageFillEditor.d.ts +5 -0
- package/lib/types/views/shape-editor-panel/ShapeLineEditor.d.ts +5 -0
- package/lib/types/views/shape-editor-panel/types.d.ts +13 -0
- package/lib/types/views/shape-floating-toolbar/ShapeFloatingToolbar.d.ts +48 -0
- package/lib/types/views/shape-floating-toolbar/shape-floating-toolbar-utils.d.ts +16 -0
- package/lib/types/views/shape-text-editor/DocParagraphTypeDropdown.d.ts +11 -0
- package/lib/types/views/shape-text-editor/ShapeTextEditor.d.ts +61 -0
- package/lib/types/views/shape-text-editor/ShapeTextEditorContainer.d.ts +9 -0
- package/lib/types/views/shape-text-editor/ShapeTextFloatToolbar.d.ts +4 -0
- package/lib/types/views/shape-text-editor/ShapeTextPositionWrapper.d.ts +19 -0
- package/lib/types/views/shape-text-editor/hooks/use-shape-position.d.ts +38 -0
- package/lib/types/views/shape-text-editor/shape-text-document.d.ts +15 -0
- package/lib/types/views/shape-text-editor/shape-text-float-menu-render-controller-base.d.ts +25 -0
- package/lib/types/views/shape-text-editor/types.d.ts +62 -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 +88 -0
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
declare const locale: {
|
|
2
|
+
'shape-editor-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
|
+
shape: {
|
|
105
|
+
group: {
|
|
106
|
+
line: string;
|
|
107
|
+
rectangle: string;
|
|
108
|
+
basicShape: string;
|
|
109
|
+
blockArrow: string;
|
|
110
|
+
equationShape: string;
|
|
111
|
+
flowchart: string;
|
|
112
|
+
starAndBanner: string;
|
|
113
|
+
callout: string;
|
|
114
|
+
other: string;
|
|
115
|
+
};
|
|
116
|
+
type: {
|
|
117
|
+
line: string;
|
|
118
|
+
'straight-connector1': string;
|
|
119
|
+
'straight-connector2': string;
|
|
120
|
+
'bent-connector3': string;
|
|
121
|
+
'bent-connector3-arrow1': string;
|
|
122
|
+
'bent-connector3-arrow2': string;
|
|
123
|
+
'curved-connector3': string;
|
|
124
|
+
'curved-connector3-arrow1': string;
|
|
125
|
+
'curved-connector3-arrow2': string;
|
|
126
|
+
rect: string;
|
|
127
|
+
'round-rect': string;
|
|
128
|
+
'snip1-rect': string;
|
|
129
|
+
'snip2-same-rect': string;
|
|
130
|
+
'snip2-diag-rect': string;
|
|
131
|
+
'snip-round-rect': string;
|
|
132
|
+
'round1-rect': string;
|
|
133
|
+
'round2-same-rect': string;
|
|
134
|
+
'round2-diag-rect': string;
|
|
135
|
+
'rect-textbox-horizontal': string;
|
|
136
|
+
'rect-textbox-vertical': string;
|
|
137
|
+
ellipse: string;
|
|
138
|
+
triangle: string;
|
|
139
|
+
'rt-triangle': string;
|
|
140
|
+
parallelogram: string;
|
|
141
|
+
trapezoid: string;
|
|
142
|
+
'non-isosceles-trapezoid': string;
|
|
143
|
+
diamond: string;
|
|
144
|
+
pentagon: string;
|
|
145
|
+
hexagon: string;
|
|
146
|
+
heptagon: string;
|
|
147
|
+
octagon: string;
|
|
148
|
+
decagon: string;
|
|
149
|
+
dodecagon: string;
|
|
150
|
+
pie: string;
|
|
151
|
+
chord: string;
|
|
152
|
+
teardrop: string;
|
|
153
|
+
frame: string;
|
|
154
|
+
'half-frame': string;
|
|
155
|
+
corner: string;
|
|
156
|
+
'diag-stripe': string;
|
|
157
|
+
plus: string;
|
|
158
|
+
plaque: string;
|
|
159
|
+
can: string;
|
|
160
|
+
cube: string;
|
|
161
|
+
bevel: string;
|
|
162
|
+
donut: string;
|
|
163
|
+
'no-smoking': string;
|
|
164
|
+
'block-arc': string;
|
|
165
|
+
'folder-corner': string;
|
|
166
|
+
'smiley-face': string;
|
|
167
|
+
heart: string;
|
|
168
|
+
'lightning-bolt': string;
|
|
169
|
+
sun: string;
|
|
170
|
+
moon: string;
|
|
171
|
+
cloud: string;
|
|
172
|
+
arc: string;
|
|
173
|
+
'bracket-pair': string;
|
|
174
|
+
'brace-pair': string;
|
|
175
|
+
'left-bracket': string;
|
|
176
|
+
'right-bracket': string;
|
|
177
|
+
'left-brace': string;
|
|
178
|
+
'right-brace': string;
|
|
179
|
+
'right-arrow': string;
|
|
180
|
+
'left-arrow': string;
|
|
181
|
+
'up-arrow': string;
|
|
182
|
+
'down-arrow': string;
|
|
183
|
+
'left-right-arrow': string;
|
|
184
|
+
'up-down-arrow': string;
|
|
185
|
+
'quad-arrow': string;
|
|
186
|
+
'left-right-up-arrow': string;
|
|
187
|
+
'bent-arrow': string;
|
|
188
|
+
'uturn-arrow': string;
|
|
189
|
+
'left-up-arrow': string;
|
|
190
|
+
'bent-up-arrow': string;
|
|
191
|
+
'curved-right-arrow': string;
|
|
192
|
+
'curved-left-arrow': string;
|
|
193
|
+
'curved-up-arrow': string;
|
|
194
|
+
'curved-down-arrow': string;
|
|
195
|
+
'striped-right-arrow': string;
|
|
196
|
+
'notched-right-arrow': string;
|
|
197
|
+
'home-plate': string;
|
|
198
|
+
chevron: string;
|
|
199
|
+
'right-arrow-callout': string;
|
|
200
|
+
'down-arrow-callout': string;
|
|
201
|
+
'left-arrow-callout': string;
|
|
202
|
+
'up-arrow-callout': string;
|
|
203
|
+
'left-right-arrow-callout': string;
|
|
204
|
+
'quad-arrow-callout': string;
|
|
205
|
+
'circular-arrow': string;
|
|
206
|
+
'math-plus': string;
|
|
207
|
+
'math-minus': string;
|
|
208
|
+
'math-multiply': string;
|
|
209
|
+
'math-divide': string;
|
|
210
|
+
'math-equal': string;
|
|
211
|
+
'math-not-equal': string;
|
|
212
|
+
'flow-chart-process': string;
|
|
213
|
+
'flow-chart-alternate-process': string;
|
|
214
|
+
'flow-chart-decision': string;
|
|
215
|
+
'flow-chart-input-output': string;
|
|
216
|
+
'flow-chart-predefined-process': string;
|
|
217
|
+
'flow-chart-internal-storage': string;
|
|
218
|
+
'flow-chart-document': string;
|
|
219
|
+
'flow-chart-multidocument': string;
|
|
220
|
+
'flow-chart-terminator': string;
|
|
221
|
+
'flow-chart-preparation': string;
|
|
222
|
+
'flow-chart-manual-input': string;
|
|
223
|
+
'flow-chart-manual-operation': string;
|
|
224
|
+
'flow-chart-connector': string;
|
|
225
|
+
'flow-chart-offpage-connector': string;
|
|
226
|
+
'flow-chart-punched-card': string;
|
|
227
|
+
'flow-chart-punched-tape': string;
|
|
228
|
+
'flow-chart-summing-junction': string;
|
|
229
|
+
'flow-chart-or': string;
|
|
230
|
+
'flow-chart-collate': string;
|
|
231
|
+
'flow-chart-sort': string;
|
|
232
|
+
'flow-chart-extract': string;
|
|
233
|
+
'flow-chart-merge': string;
|
|
234
|
+
'flow-chart-online-storage': string;
|
|
235
|
+
'flow-chart-delay': string;
|
|
236
|
+
'flow-chart-magnetic-tape': string;
|
|
237
|
+
'flow-chart-magnetic-disk': string;
|
|
238
|
+
'flow-chart-magnetic-drum': string;
|
|
239
|
+
'flow-chart-display': string;
|
|
240
|
+
'irregular-seal1': string;
|
|
241
|
+
'irregular-seal2': string;
|
|
242
|
+
star4: string;
|
|
243
|
+
star5: string;
|
|
244
|
+
star6: string;
|
|
245
|
+
star7: string;
|
|
246
|
+
star8: string;
|
|
247
|
+
star10: string;
|
|
248
|
+
star12: string;
|
|
249
|
+
star16: string;
|
|
250
|
+
star24: string;
|
|
251
|
+
star32: string;
|
|
252
|
+
ribbon2: string;
|
|
253
|
+
ribbon: string;
|
|
254
|
+
'ellipse-ribbon2': string;
|
|
255
|
+
'ellipse-ribbon': string;
|
|
256
|
+
'vertical-scroll': string;
|
|
257
|
+
'horizontal-scroll': string;
|
|
258
|
+
wave: string;
|
|
259
|
+
'double-wave': string;
|
|
260
|
+
'wedge-rect-callout': string;
|
|
261
|
+
'wedge-round-rect-callout': string;
|
|
262
|
+
'wedge-ellipse-callout': string;
|
|
263
|
+
'cloud-callout': string;
|
|
264
|
+
'border-callout1': string;
|
|
265
|
+
'border-callout2': string;
|
|
266
|
+
'border-callout3': string;
|
|
267
|
+
'accent-callout1': string;
|
|
268
|
+
'accent-callout2': string;
|
|
269
|
+
'accent-callout3': string;
|
|
270
|
+
callout1: string;
|
|
271
|
+
callout2: string;
|
|
272
|
+
callout3: string;
|
|
273
|
+
'accent-border-callout1': string;
|
|
274
|
+
'accent-border-callout2': string;
|
|
275
|
+
'accent-border-callout3': string;
|
|
276
|
+
'left-circular-arrow': string;
|
|
277
|
+
'left-right-circular-arrow': string;
|
|
278
|
+
'swoosh-arrow': string;
|
|
279
|
+
'left-right-ribbon': string;
|
|
280
|
+
'pie-wedge': string;
|
|
281
|
+
funnel: string;
|
|
282
|
+
gear6: string;
|
|
283
|
+
gear9: string;
|
|
284
|
+
'corner-tabs': string;
|
|
285
|
+
'action-button-back-previous': string;
|
|
286
|
+
'action-button-forward-next': string;
|
|
287
|
+
'action-button-beginning': string;
|
|
288
|
+
'action-button-end': string;
|
|
289
|
+
'action-button-home': string;
|
|
290
|
+
'action-button-information': string;
|
|
291
|
+
'action-button-return': string;
|
|
292
|
+
'action-button-movie': string;
|
|
293
|
+
'action-button-document': string;
|
|
294
|
+
'action-button-sound': string;
|
|
295
|
+
'action-button-help': string;
|
|
296
|
+
'action-button-blank': string;
|
|
297
|
+
'chart-plus': string;
|
|
298
|
+
'chart-star': string;
|
|
299
|
+
'chart-x': string;
|
|
300
|
+
'flow-chart-offline-storage': string;
|
|
301
|
+
'line-inv': string;
|
|
302
|
+
'plaque-tabs': string;
|
|
303
|
+
'square-tabs': string;
|
|
304
|
+
'up-down-arrow-callout': string;
|
|
305
|
+
};
|
|
306
|
+
};
|
|
307
|
+
toolbar: {
|
|
308
|
+
alignLeft: string;
|
|
309
|
+
alignCenter: string;
|
|
310
|
+
alignRight: string;
|
|
311
|
+
alignJustify: string;
|
|
312
|
+
bold: string;
|
|
313
|
+
italic: string;
|
|
314
|
+
underline: string;
|
|
315
|
+
strikethrough: string;
|
|
316
|
+
subscript: string;
|
|
317
|
+
superscript: string;
|
|
318
|
+
textColor: string;
|
|
319
|
+
textBackgroundColor: string;
|
|
320
|
+
fillColor: string;
|
|
321
|
+
resetColor: string;
|
|
322
|
+
};
|
|
323
|
+
align: {
|
|
324
|
+
top: string;
|
|
325
|
+
middle: string;
|
|
326
|
+
bottom: string;
|
|
327
|
+
};
|
|
328
|
+
textWrap: {
|
|
329
|
+
inline: string;
|
|
330
|
+
square: string;
|
|
331
|
+
topAndBottom: string;
|
|
332
|
+
behindText: string;
|
|
333
|
+
inFrontText: string;
|
|
334
|
+
};
|
|
335
|
+
crop: {
|
|
336
|
+
shape: string;
|
|
337
|
+
};
|
|
338
|
+
};
|
|
339
|
+
};
|
|
340
|
+
export default locale;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { IShapeData, ShapeTypeEnum } from '@univerjs-pro/engine-shape';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import type { IShapeEditorUpdateHandlers } from './types';
|
|
4
|
+
export interface IShapeEditPanelProps extends IShapeEditorUpdateHandlers {
|
|
5
|
+
shapeId: string;
|
|
6
|
+
shapeData: IShapeData;
|
|
7
|
+
shapeType: ShapeTypeEnum;
|
|
8
|
+
version: number;
|
|
9
|
+
disableShapeOption: boolean;
|
|
10
|
+
positionEditor?: ReactNode;
|
|
11
|
+
onUpdateShapeFillImage?: (image: HTMLImageElement) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare function ShapeEditPanel(props: IShapeEditPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IShapeData } from '@univerjs-pro/engine-shape';
|
|
2
|
+
import type { IShapeEditorBaseProps } from './types';
|
|
3
|
+
import { ShapeFillEnum } from '@univerjs-pro/engine-shape';
|
|
4
|
+
export interface IShapeFillEditorProps extends IShapeEditorBaseProps {
|
|
5
|
+
isLineShape: boolean;
|
|
6
|
+
onUpdateShapeFillImage?: (image: HTMLImageElement) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function getInitialShapeFillType(shapeData: IShapeData): ShapeFillEnum;
|
|
9
|
+
export declare function ShapeFillEditor(props: IShapeFillEditorProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IShapeEditorBaseProps } from './types';
|
|
2
|
+
export interface IShapeImageFillEditorProps extends IShapeEditorBaseProps {
|
|
3
|
+
onUpdateShapeFillImage?: (image: HTMLImageElement) => void;
|
|
4
|
+
}
|
|
5
|
+
export declare function ShapeImageFillEditor(props: IShapeImageFillEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ICxnShapeData, IShapeData } from '@univerjs-pro/engine-shape';
|
|
2
|
+
export interface IOldShapeData {
|
|
3
|
+
oldShapeData?: IShapeData;
|
|
4
|
+
}
|
|
5
|
+
export interface IShapeEditorUpdateHandlers {
|
|
6
|
+
onUpdateShapeData: (oldShapeJSON: IOldShapeData, shapeData?: IShapeData) => void;
|
|
7
|
+
onUpdateLineShapeData?: (oldShapeJSON: IOldShapeData, shapeData?: ICxnShapeData) => void;
|
|
8
|
+
}
|
|
9
|
+
export interface IShapeEditorBaseProps extends IShapeEditorUpdateHandlers {
|
|
10
|
+
shapeId: string;
|
|
11
|
+
shapeData: IShapeData;
|
|
12
|
+
disableShapeOption: boolean;
|
|
13
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { IShapeData, ShapeTypeEnum } from '@univerjs-pro/engine-shape';
|
|
2
|
+
import type { ITextStyle } from '@univerjs/core';
|
|
3
|
+
import type { ReactNode } from 'react';
|
|
4
|
+
import type { IShapeTextUpdateOptions } from './shape-floating-toolbar-utils';
|
|
5
|
+
import { HorizontalAlign, VerticalAlign } from '@univerjs/core';
|
|
6
|
+
export type IShapeFloatingToolbarWrappingStyle = string | number;
|
|
7
|
+
export interface IShapeFloatingToolbarTextModel {
|
|
8
|
+
ha?: HorizontalAlign;
|
|
9
|
+
va?: VerticalAlign;
|
|
10
|
+
}
|
|
11
|
+
export interface IToolbarDropdownOption<T extends string | number> {
|
|
12
|
+
label: string;
|
|
13
|
+
value: T;
|
|
14
|
+
icon: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export interface IShapeFloatingToolbarProps {
|
|
17
|
+
shapeData: IShapeData;
|
|
18
|
+
shapeType: ShapeTypeEnum;
|
|
19
|
+
textStyle: ITextStyle;
|
|
20
|
+
textModel?: IShapeFloatingToolbarTextModel | null;
|
|
21
|
+
fontOptions: Array<{
|
|
22
|
+
label: string;
|
|
23
|
+
value: string;
|
|
24
|
+
}>;
|
|
25
|
+
wrappingStyle?: IShapeFloatingToolbarWrappingStyle;
|
|
26
|
+
wrappingStyleOptions?: Array<IToolbarDropdownOption<IShapeFloatingToolbarWrappingStyle>>;
|
|
27
|
+
enableShapeFillReset?: boolean;
|
|
28
|
+
enableShapeStrokeReset?: boolean;
|
|
29
|
+
enableTextBackgroundReset?: boolean;
|
|
30
|
+
deferUntilCollapsedStateLoaded?: boolean;
|
|
31
|
+
localePrefix?: string;
|
|
32
|
+
onUpdateShapeData: (oldShapeJSON: {
|
|
33
|
+
oldShapeData?: IShapeData;
|
|
34
|
+
}, shapeData?: IShapeData) => void;
|
|
35
|
+
onUpdateText: (params: IShapeTextUpdateOptions) => void;
|
|
36
|
+
onUpdateWrappingStyle?: (value: IShapeFloatingToolbarWrappingStyle) => void;
|
|
37
|
+
onOpenPanel?: () => void;
|
|
38
|
+
onDelete?: () => void;
|
|
39
|
+
}
|
|
40
|
+
declare function TextWrapShapeIcon(): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export declare function TextFillButton(props: {
|
|
42
|
+
title: string;
|
|
43
|
+
textStyle: ITextStyle;
|
|
44
|
+
fallbackColor: string;
|
|
45
|
+
onChange: (textStyle: ITextStyle) => void;
|
|
46
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
export declare function ShapeFloatingToolbar(props: IShapeFloatingToolbarProps): import("react/jsx-runtime").JSX.Element | null;
|
|
48
|
+
export { TextWrapShapeIcon };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { IShapeData } from '@univerjs-pro/engine-shape';
|
|
2
|
+
import type { IDocumentData, ITextStyle } from '@univerjs/core';
|
|
3
|
+
import { HorizontalAlign, VerticalAlign } from '@univerjs/core';
|
|
4
|
+
export interface IShapeTextModel {
|
|
5
|
+
va?: VerticalAlign;
|
|
6
|
+
ha?: HorizontalAlign;
|
|
7
|
+
doc: IDocumentData;
|
|
8
|
+
}
|
|
9
|
+
export interface IShapeTextUpdateOptions {
|
|
10
|
+
textStyle?: ITextStyle;
|
|
11
|
+
verticalAlign?: VerticalAlign;
|
|
12
|
+
horizontalAlign?: HorizontalAlign;
|
|
13
|
+
}
|
|
14
|
+
export declare function createDefaultShapeTextDocument(textStyle?: ITextStyle, horizontalAlign?: HorizontalAlign): IDocumentData;
|
|
15
|
+
export declare function getShapeTextModel(shapeData: IShapeData, options: IShapeTextUpdateOptions): IShapeTextModel;
|
|
16
|
+
export declare function buildShapeTextDataUpdate(shapeData: IShapeData, options: IShapeTextUpdateOptions): IShapeData;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { MouseEvent as ReactMouseEvent } from 'react';
|
|
2
|
+
export interface IDocParagraphTypeDropdownProps {
|
|
3
|
+
buttonClassName?: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
popupDataComponent?: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
onAfterCommand?: () => void;
|
|
8
|
+
onBeforeCommand?: () => void;
|
|
9
|
+
onMouseDown?: (event: ReactMouseEvent<HTMLButtonElement>) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function DocParagraphTypeDropdown(props: IDocParagraphTypeDropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { Nullable } from '@univerjs/core';
|
|
2
|
+
import type { IKeyboardEventConfig } from '@univerjs/docs-ui';
|
|
3
|
+
import type { CSSProperties } from 'react';
|
|
4
|
+
import type { IShapeTextEditingParams, IShapeTextEditingServiceLike, IShapeTextEditorAdapter } from './types';
|
|
5
|
+
import { ICommandService, VerticalAlign } from '@univerjs/core';
|
|
6
|
+
export interface IShapeTextEditorProps {
|
|
7
|
+
adapter: IShapeTextEditorAdapter;
|
|
8
|
+
containerWidth: number;
|
|
9
|
+
containerHeight: number;
|
|
10
|
+
editingParams: Nullable<IShapeTextEditingParams>;
|
|
11
|
+
editingService: IShapeTextEditingServiceLike;
|
|
12
|
+
editorUnitId: string;
|
|
13
|
+
scaleX: number;
|
|
14
|
+
scaleY: number;
|
|
15
|
+
verticalAlignCommandId?: string;
|
|
16
|
+
}
|
|
17
|
+
interface IShapeTextEditorLayoutOptions {
|
|
18
|
+
actualHeight: number;
|
|
19
|
+
scaleX: number;
|
|
20
|
+
scaleY: number;
|
|
21
|
+
textRect: {
|
|
22
|
+
left: number;
|
|
23
|
+
top: number;
|
|
24
|
+
width: number;
|
|
25
|
+
height: number;
|
|
26
|
+
};
|
|
27
|
+
verticalAlign: VerticalAlign;
|
|
28
|
+
}
|
|
29
|
+
interface IShapeTextEditorLayout {
|
|
30
|
+
documentMarginTop: number;
|
|
31
|
+
editorLeft: number;
|
|
32
|
+
editorTop: number;
|
|
33
|
+
editorWidth: number;
|
|
34
|
+
editorHeight: number;
|
|
35
|
+
pageHeight: number;
|
|
36
|
+
}
|
|
37
|
+
interface IShapeTextEditorHostHeightOptions {
|
|
38
|
+
hostHeight: number;
|
|
39
|
+
textRect: {
|
|
40
|
+
left: number;
|
|
41
|
+
top: number;
|
|
42
|
+
width: number;
|
|
43
|
+
height: number;
|
|
44
|
+
};
|
|
45
|
+
contentHeight: number;
|
|
46
|
+
}
|
|
47
|
+
export declare function resolveShapeTextEditorLayout(options: IShapeTextEditorLayoutOptions): IShapeTextEditorLayout;
|
|
48
|
+
export declare function resolveShapeTextEditorHostHeight(options: IShapeTextEditorHostHeightOptions): number;
|
|
49
|
+
export declare function getShapeTextEditorContentStyle(leftOrWidth: number, topOrHeight: number, width?: number, height?: number): CSSProperties;
|
|
50
|
+
export declare function applyShapeTextEditorCanvasTransparency(renderer: {
|
|
51
|
+
engine?: {
|
|
52
|
+
getCanvasElement?: () => HTMLElement | null;
|
|
53
|
+
};
|
|
54
|
+
} | null | undefined | void): void;
|
|
55
|
+
export declare function getShapeTextEditorKeyboardConfig(commandService: Pick<ICommandService, 'executeCommand'>): IKeyboardEventConfig;
|
|
56
|
+
/**
|
|
57
|
+
* Shape editor component - second layer DOM.
|
|
58
|
+
* Handles document editing, content height tracking, and vertical alignment.
|
|
59
|
+
*/
|
|
60
|
+
export declare const ShapeTextEditor: (props: IShapeTextEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IShapeTextEditingServiceLike, IShapeTextEditorAdapter, IShapeTextEditorPositionOptions } from './types';
|
|
2
|
+
export interface IShapeTextEditorContainerProps {
|
|
3
|
+
adapter: IShapeTextEditorAdapter;
|
|
4
|
+
editorUnitId: string;
|
|
5
|
+
editingService: IShapeTextEditingServiceLike;
|
|
6
|
+
positionOptions: IShapeTextEditorPositionOptions;
|
|
7
|
+
verticalAlignCommandId?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const ShapeTextEditorContainer: import("react").MemoExoticComponent<(props: IShapeTextEditorContainerProps) => import("react/jsx-runtime").JSX.Element | null>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Nullable } from '@univerjs/core';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import type { IShapeTextEditingParams, IShapeTextEditorPositionOptions } from './types';
|
|
4
|
+
export interface IShapePositionWrapperProps {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
editingParams: Nullable<IShapeTextEditingParams>;
|
|
7
|
+
positionOptions: IShapeTextEditorPositionOptions;
|
|
8
|
+
onPositionUpdate?: (position: {
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
scaleX: number;
|
|
12
|
+
scaleY: number;
|
|
13
|
+
}) => void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Position wrapper component that handles shape positioning in DOM.
|
|
17
|
+
* This is the first layer DOM that tracks shape position with scroll.
|
|
18
|
+
*/
|
|
19
|
+
export declare const ShapeTextPositionWrapper: import("react").MemoExoticComponent<(props: IShapePositionWrapperProps) => import("react/jsx-runtime").JSX.Element>;
|