@univerjs-pro/engine-shape 1.0.0-alpha.2 → 1.0.0-alpha.3
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 +9 -3
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/types/index.d.ts +7 -196
- package/lib/types/models/shape-model.d.ts +3 -3
- package/lib/types/render-engine/shape-render-model.d.ts +0 -1
- package/lib/types/shape-default-size.d.ts +9 -0
- package/lib/types/shape-default.d.ts +10 -2
- package/lib/types/shape-enum.d.ts +192 -1
- package/lib/types/shape-type.d.ts +47 -4
- package/lib/types/utils/shape-text-behavior.util.d.ts +13 -0
- package/lib/umd/index.js +1 -1
- package/package.json +3 -3
|
@@ -128,196 +128,387 @@ export declare enum ShapeOperatorEnum {
|
|
|
128
128
|
Sat2 = "sat2"
|
|
129
129
|
}
|
|
130
130
|
/**
|
|
131
|
-
*
|
|
131
|
+
* Built-in vector shape types supported by the Univer shape engine.
|
|
132
|
+
*
|
|
133
|
+
* Board facade callers should access these values through `univerAPI.Enum.ShapeTypeEnum` so generated scripts remain
|
|
134
|
+
* copy-pasteable and do not need package-level imports.
|
|
132
135
|
*/
|
|
133
136
|
export declare enum ShapeTypeEnum {
|
|
137
|
+
/** No rendered geometry; reserve this value for an explicitly empty shape. */
|
|
134
138
|
None = "none",
|
|
139
|
+
/** Rectangle for generic process steps, cards, and diagram nodes. */
|
|
135
140
|
Rect = "rect",
|
|
141
|
+
/** Rounded rectangle for friendly process steps, states, and cards. */
|
|
136
142
|
RoundRect = "roundRect",
|
|
143
|
+
/** Ellipse for events, states, and circular diagram nodes. */
|
|
137
144
|
Ellipse = "ellipse",
|
|
145
|
+
/** Diamond for decisions, conditions, and branching points. */
|
|
138
146
|
Diamond = "diamond",
|
|
147
|
+
/** Upward-pointing triangle. */
|
|
139
148
|
Triangle = "triangle",
|
|
149
|
+
/** Right triangle with one vertical and one horizontal edge. */
|
|
140
150
|
RightTriangle = "rtTriangle",
|
|
151
|
+
/** Parallelogram commonly used for input and output steps. */
|
|
141
152
|
Parallelogram = "parallelogram",
|
|
153
|
+
/** Symmetric trapezoid. */
|
|
142
154
|
Trapezoid = "trapezoid",
|
|
155
|
+
/** Adjustable hexagon commonly used for preparation steps. */
|
|
143
156
|
Hexagon = "hexagon",// 这个跟Heptagon 不一样的点在于调节点
|
|
157
|
+
/** Eight-sided polygon commonly used for stop or warning nodes. */
|
|
144
158
|
Octagon = "octagon",
|
|
159
|
+
/** Plus-sign shape. */
|
|
145
160
|
Plus = "plus",
|
|
161
|
+
/** 5-point star shape. */
|
|
146
162
|
Star5 = "star5",
|
|
163
|
+
/** 6-point star shape. */
|
|
147
164
|
Star6 = "star6",
|
|
165
|
+
/** 7-point star shape. */
|
|
148
166
|
Star7 = "star7",
|
|
167
|
+
/** 8-point star shape. */
|
|
149
168
|
Star8 = "star8",
|
|
169
|
+
/** 10-point star shape. */
|
|
150
170
|
Star10 = "star10",
|
|
171
|
+
/** 12-point star shape. */
|
|
151
172
|
Star12 = "star12",
|
|
173
|
+
/** 16-point star shape. */
|
|
152
174
|
Star16 = "star16",
|
|
175
|
+
/** 24-point star shape. */
|
|
153
176
|
Star24 = "star24",
|
|
177
|
+
/** 32-point star shape. */
|
|
154
178
|
Star32 = "star32",
|
|
179
|
+
/** Round 1 rect shape. */
|
|
155
180
|
Round1Rect = "round1Rect",
|
|
181
|
+
/** Round 2 same rect shape. */
|
|
156
182
|
Round2SameRect = "round2SameRect",
|
|
183
|
+
/** Round 2 diag rect shape. */
|
|
157
184
|
Round2DiagRect = "round2DiagRect",
|
|
185
|
+
/** Snip 1 rect shape. */
|
|
158
186
|
Snip1Rect = "snip1Rect",
|
|
187
|
+
/** Snip round rect shape. */
|
|
159
188
|
SnipRoundRect = "snipRoundRect",
|
|
189
|
+
/** Snip 2 same rect shape. */
|
|
160
190
|
Snip2SameRect = "snip2SameRect",
|
|
191
|
+
/** Snip 2 diag rect shape. */
|
|
161
192
|
Snip2DiagRect = "snip2DiagRect",
|
|
193
|
+
/** Plaque shape. */
|
|
162
194
|
Plaque = "plaque",
|
|
195
|
+
/** Rectangular frame with an open center. */
|
|
163
196
|
Frame = "frame",
|
|
197
|
+
/** Two-sided partial frame. */
|
|
164
198
|
HalfFrame = "halfFrame",
|
|
199
|
+
/** Right-angle corner shape. */
|
|
165
200
|
Corner = "corner",
|
|
201
|
+
/** Diag stripe shape. */
|
|
166
202
|
DiagStripe = "diagStripe",
|
|
203
|
+
/** Circular segment bounded by a chord. */
|
|
167
204
|
Chord = "chord",
|
|
205
|
+
/** Open circular arc. */
|
|
168
206
|
Arc = "arc",
|
|
207
|
+
/** Left circular arrow shape for directional diagrams. */
|
|
169
208
|
LeftCircularArrow = "leftCircularArrow",
|
|
209
|
+
/** Left right circular arrow shape for directional diagrams. */
|
|
170
210
|
LeftRightCircularArrow = "leftRightCircularArrow",
|
|
211
|
+
/** Swoosh arrow shape for directional diagrams. */
|
|
171
212
|
SwooshArrow = "swooshArrow",
|
|
213
|
+
/** Left right ribbon shape. */
|
|
172
214
|
LeftRightRibbon = "leftRightRibbon",
|
|
215
|
+
/** Seven-sided polygon. */
|
|
173
216
|
Heptagon = "heptagon",
|
|
217
|
+
/** Home-plate pentagon for directional process nodes. */
|
|
174
218
|
HomePlate = "homePlate",
|
|
219
|
+
/** Right arrow shape for directional diagrams. */
|
|
175
220
|
RightArrow = "rightArrow",
|
|
221
|
+
/** Left arrow shape for directional diagrams. */
|
|
176
222
|
LeftArrow = "leftArrow",
|
|
223
|
+
/** Up arrow shape for directional diagrams. */
|
|
177
224
|
UpArrow = "upArrow",
|
|
225
|
+
/** Down arrow shape for directional diagrams. */
|
|
178
226
|
DownArrow = "downArrow",
|
|
227
|
+
/** Left right arrow shape for directional diagrams. */
|
|
179
228
|
LeftRightArrow = "leftRightArrow",
|
|
229
|
+
/** Up down arrow shape for directional diagrams. */
|
|
180
230
|
UpDownArrow = "upDownArrow",
|
|
231
|
+
/** Quad arrow shape for directional diagrams. */
|
|
181
232
|
QuadArrow = "quadArrow",
|
|
233
|
+
/** Left right up arrow shape for directional diagrams. */
|
|
182
234
|
LeftRightUpArrow = "leftRightUpArrow",
|
|
235
|
+
/** Bent arrow shape for directional diagrams. */
|
|
183
236
|
BentArrow = "bentArrow",
|
|
237
|
+
/** Uturn arrow shape for directional diagrams. */
|
|
184
238
|
UturnArrow = "uturnArrow",
|
|
239
|
+
/** Left up arrow shape for directional diagrams. */
|
|
185
240
|
LeftUpArrow = "leftUpArrow",
|
|
241
|
+
/** Bent up arrow shape for directional diagrams. */
|
|
186
242
|
BentUpArrow = "bentUpArrow",
|
|
243
|
+
/** Curved right arrow shape for directional diagrams. */
|
|
187
244
|
CurvedRightArrow = "curvedRightArrow",
|
|
245
|
+
/** Curved left arrow shape for directional diagrams. */
|
|
188
246
|
CurvedLeftArrow = "curvedLeftArrow",
|
|
247
|
+
/** Curved up arrow shape for directional diagrams. */
|
|
189
248
|
CurvedUpArrow = "curvedUpArrow",
|
|
249
|
+
/** Curved down arrow shape for directional diagrams. */
|
|
190
250
|
CurvedDownArrow = "curvedDownArrow",
|
|
251
|
+
/** Striped right arrow shape for directional diagrams. */
|
|
191
252
|
StripedRightArrow = "stripedRightArrow",
|
|
253
|
+
/** Notched right arrow shape for directional diagrams. */
|
|
192
254
|
NotchedRightArrow = "notchedRightArrow",
|
|
255
|
+
/** Five-sided polygon or home-style process node. */
|
|
193
256
|
Pentagon = "pentagon",
|
|
257
|
+
/** Chevron for sequences, progress, and directional stages. */
|
|
194
258
|
Chevron = "chevron",
|
|
259
|
+
/** Right arrow callout shape for directional diagrams. */
|
|
195
260
|
RightArrowCallout = "rightArrowCallout",
|
|
261
|
+
/** Down arrow callout shape for directional diagrams. */
|
|
196
262
|
DownArrowCallout = "downArrowCallout",
|
|
263
|
+
/** Left arrow callout shape for directional diagrams. */
|
|
197
264
|
LeftArrowCallout = "leftArrowCallout",
|
|
265
|
+
/** Up arrow callout shape for directional diagrams. */
|
|
198
266
|
UpArrowCallout = "upArrowCallout",
|
|
267
|
+
/** Left right arrow callout shape for directional diagrams. */
|
|
199
268
|
LeftRightArrowCallout = "leftRightArrowCallout",
|
|
269
|
+
/** Quad arrow callout shape for directional diagrams. */
|
|
200
270
|
QuadArrowCallout = "quadArrowCallout",
|
|
271
|
+
/** Circular arrow for cycles and repeated processes. */
|
|
201
272
|
CircularArrow = "circularArrow",
|
|
273
|
+
/** Equation symbol for plus. */
|
|
202
274
|
MathPlus = "mathPlus",
|
|
275
|
+
/** Equation symbol for minus. */
|
|
203
276
|
MathMinus = "mathMinus",
|
|
277
|
+
/** Equation symbol for multiply. */
|
|
204
278
|
MathMultiply = "mathMultiply",
|
|
279
|
+
/** Equation symbol for divide. */
|
|
205
280
|
MathDivide = "mathDivide",
|
|
281
|
+
/** Equation symbol for equal. */
|
|
206
282
|
MathEqual = "mathEqual",
|
|
283
|
+
/** Equation symbol for not equal. */
|
|
207
284
|
MathNotEqual = "mathNotEqual",
|
|
285
|
+
/** Flowchart process symbol for a standard operation. */
|
|
208
286
|
FlowchartProcess = "flowChartProcess",
|
|
287
|
+
/** Flowchart alternate-process symbol. */
|
|
209
288
|
FlowchartAlternateProcess = "flowChartAlternateProcess",
|
|
289
|
+
/** Flowchart decision symbol for branching conditions. */
|
|
210
290
|
FlowchartDecision = "flowChartDecision",
|
|
291
|
+
/** Flowchart input/output symbol for data entering or leaving a process. */
|
|
211
292
|
FlowChartInputOutput = "flowChartInputOutput",
|
|
293
|
+
/** Flowchart predefined-process symbol for a named subprocess. */
|
|
212
294
|
FlowchartPredefinedProcess = "flowChartPredefinedProcess",
|
|
295
|
+
/** Flowchart internal-storage symbol. */
|
|
213
296
|
FlowchartInternalStorage = "flowChartInternalStorage",
|
|
297
|
+
/** Flowchart document symbol for one document artifact. */
|
|
214
298
|
FlowchartDocument = "flowChartDocument",
|
|
299
|
+
/** Flowchart multiple-documents symbol. */
|
|
215
300
|
FlowchartMultiDocument = "flowChartMultidocument",
|
|
301
|
+
/** Flowchart terminator symbol for a start or end state. */
|
|
216
302
|
FlowchartTerminator = "flowChartTerminator",
|
|
303
|
+
/** Flowchart preparation symbol for initialization or setup. */
|
|
217
304
|
FlowchartPreparation = "flowChartPreparation",
|
|
305
|
+
/** Flowchart manual-input symbol. */
|
|
218
306
|
FlowchartManualInput = "flowChartManualInput",
|
|
307
|
+
/** Flowchart manual-operation symbol. */
|
|
219
308
|
FlowchartManualOperation = "flowChartManualOperation",
|
|
309
|
+
/** Flowchart on-page connector symbol. */
|
|
220
310
|
FlowchartConnector = "flowChartConnector",
|
|
311
|
+
/** Flowchart off-page connector symbol. */
|
|
221
312
|
FlowchartOffPageConnector = "flowChartOffpageConnector",
|
|
313
|
+
/** Flowchart punched-card data symbol. */
|
|
222
314
|
FlowchartPunchedCard = "flowChartPunchedCard",
|
|
315
|
+
/** Flowchart punched-tape data symbol. */
|
|
223
316
|
FlowchartPunchedTape = "flowChartPunchedTape",
|
|
317
|
+
/** Flowchart summing-junction symbol. */
|
|
224
318
|
FlowchartSummingJunction = "flowChartSummingJunction",
|
|
319
|
+
/** Flowchart logical OR junction symbol. */
|
|
225
320
|
FlowchartOr = "flowChartOr",
|
|
321
|
+
/** Flowchart collate symbol. */
|
|
226
322
|
FlowchartCollate = "flowChartCollate",
|
|
323
|
+
/** Flowchart sort symbol. */
|
|
227
324
|
FlowchartSort = "flowChartSort",
|
|
325
|
+
/** Flowchart extract symbol. */
|
|
228
326
|
FlowchartExtract = "flowChartExtract",
|
|
327
|
+
/** Flowchart merge symbol. */
|
|
229
328
|
FlowchartMerge = "flowChartMerge",
|
|
329
|
+
/** Flowchart online-storage symbol. */
|
|
230
330
|
FlowchartOnlineStorage = "flowChartOnlineStorage",
|
|
331
|
+
/** Flowchart delay or wait symbol. */
|
|
231
332
|
FlowchartDelay = "flowChartDelay",
|
|
333
|
+
/** Flowchart sequential-access magnetic-tape storage symbol. */
|
|
232
334
|
FlowchartMagneticTape = "flowChartMagneticTape",
|
|
335
|
+
/** Flowchart magnetic-disk storage symbol. */
|
|
233
336
|
FlowchartMagneticDisk = "flowChartMagneticDisk",
|
|
337
|
+
/** Flowchart direct-access magnetic-drum storage symbol. */
|
|
234
338
|
FlowchartMagneticDrum = "flowChartMagneticDrum",
|
|
339
|
+
/** Flowchart display or screen output symbol. */
|
|
235
340
|
FlowchartDisplay = "flowChartDisplay",
|
|
341
|
+
/** Wedge rect callout shape for annotated content. */
|
|
236
342
|
WedgeRectCallout = "wedgeRectCallout",
|
|
343
|
+
/** Wedge round rect callout shape for annotated content. */
|
|
237
344
|
WedgeRoundRectCallout = "wedgeRoundRectCallout",
|
|
345
|
+
/** Wedge ellipse callout shape for annotated content. */
|
|
238
346
|
WedgeEllipseCallout = "wedgeEllipseCallout",
|
|
347
|
+
/** Cloud callout shape for annotated content. */
|
|
239
348
|
CloudCallout = "cloudCallout",
|
|
349
|
+
/** Border callout 1 shape for annotated content. */
|
|
240
350
|
BorderCallout1 = "borderCallout1",
|
|
351
|
+
/** Border callout 2 shape for annotated content. */
|
|
241
352
|
BorderCallout2 = "borderCallout2",
|
|
353
|
+
/** Border callout 3 shape for annotated content. */
|
|
242
354
|
BorderCallout3 = "borderCallout3",
|
|
355
|
+
/** Accent callout 1 shape for annotated content. */
|
|
243
356
|
AccentCallout1 = "accentCallout1",
|
|
357
|
+
/** Accent callout 2 shape for annotated content. */
|
|
244
358
|
AccentCallout2 = "accentCallout2",
|
|
359
|
+
/** Accent callout 3 shape for annotated content. */
|
|
245
360
|
AccentCallout3 = "accentCallout3",
|
|
361
|
+
/** Callout 1 shape for annotated content. */
|
|
246
362
|
Callout1 = "callout1",
|
|
363
|
+
/** Callout 2 shape for annotated content. */
|
|
247
364
|
Callout2 = "callout2",
|
|
365
|
+
/** Callout 3 shape for annotated content. */
|
|
248
366
|
Callout3 = "callout3",
|
|
367
|
+
/** Accent border callout 1 shape for annotated content. */
|
|
249
368
|
AccentBorderCallout1 = "accentBorderCallout1",
|
|
369
|
+
/** Accent border callout 2 shape for annotated content. */
|
|
250
370
|
AccentBorderCallout2 = "accentBorderCallout2",
|
|
371
|
+
/** Accent border callout 3 shape for annotated content. */
|
|
251
372
|
AccentBorderCallout3 = "accentBorderCallout3",
|
|
373
|
+
/** Ribbon shape. */
|
|
252
374
|
Ribbon = "ribbon",
|
|
375
|
+
/** Ribbon 2 shape. */
|
|
253
376
|
Ribbon2 = "ribbon2",
|
|
377
|
+
/** Ellipse ribbon shape. */
|
|
254
378
|
EllipseRibbon = "ellipseRibbon",
|
|
379
|
+
/** Ellipse ribbon 2 shape. */
|
|
255
380
|
EllipseRibbon2 = "ellipseRibbon2",
|
|
381
|
+
/** Vertical scroll shape. */
|
|
256
382
|
VerticalScroll = "verticalScroll",
|
|
383
|
+
/** Horizontal scroll shape. */
|
|
257
384
|
HorizontalScroll = "horizontalScroll",
|
|
385
|
+
/** Wave shape. */
|
|
258
386
|
Wave = "wave",
|
|
387
|
+
/** Double wave shape. */
|
|
259
388
|
DoubleWave = "doubleWave",
|
|
389
|
+
/** Cube shape. */
|
|
260
390
|
Cube = "cube",
|
|
391
|
+
/** Can shape. */
|
|
261
392
|
Can = "can",
|
|
393
|
+
/** Lightning bolt shape. */
|
|
262
394
|
LightningBolt = "lightningBolt",
|
|
395
|
+
/** Heart shape. */
|
|
263
396
|
Heart = "heart",
|
|
397
|
+
/** Sun shape. */
|
|
264
398
|
Sun = "sun",
|
|
399
|
+
/** Moon shape. */
|
|
265
400
|
Moon = "moon",
|
|
401
|
+
/** Smiley face shape. */
|
|
266
402
|
SmileyFace = "smileyFace",
|
|
403
|
+
/** Irregular seal 1 shape. */
|
|
267
404
|
IrregularSeal1 = "irregularSeal1",
|
|
405
|
+
/** Irregular seal 2 shape. */
|
|
268
406
|
IrregularSeal2 = "irregularSeal2",
|
|
407
|
+
/** Folded corner shape. */
|
|
269
408
|
FoldedCorner = "foldedCorner",
|
|
409
|
+
/** Bevel shape. */
|
|
270
410
|
Bevel = "bevel",
|
|
411
|
+
/** Donut shape. */
|
|
271
412
|
Donut = "donut",
|
|
413
|
+
/** No smoking shape. */
|
|
272
414
|
NoSmoking = "noSmoking",
|
|
415
|
+
/** Block arc shape. */
|
|
273
416
|
BlockArc = "blockArc",
|
|
417
|
+
/** Teardrop shape. */
|
|
274
418
|
Teardrop = "teardrop",
|
|
419
|
+
/** Pie wedge shape. */
|
|
275
420
|
PieWedge = "pieWedge",
|
|
421
|
+
/** Pie shape. */
|
|
276
422
|
Pie = "pie",
|
|
423
|
+
/** Funnel shape. */
|
|
277
424
|
Funnel = "funnel",
|
|
425
|
+
/** Gear 6 shape. */
|
|
278
426
|
Gear6 = "gear6",
|
|
427
|
+
/** Gear 9 shape. */
|
|
279
428
|
Gear9 = "gear9",
|
|
429
|
+
/** Decagon shape. */
|
|
280
430
|
Decagon = "decagon",
|
|
431
|
+
/** Dodecagon shape. */
|
|
281
432
|
Dodecagon = "dodecagon",
|
|
433
|
+
/** Corner tabs shape. */
|
|
282
434
|
CornerTabs = "cornerTabs",
|
|
435
|
+
/** Left brace shape. */
|
|
283
436
|
LeftBrace = "leftBrace",
|
|
437
|
+
/** Right brace shape. */
|
|
284
438
|
RightBrace = "rightBrace",
|
|
439
|
+
/** Left bracket shape. */
|
|
285
440
|
LeftBracket = "leftBracket",
|
|
441
|
+
/** Right bracket shape. */
|
|
286
442
|
RightBracket = "rightBracket",
|
|
443
|
+
/** Action button for back previous. */
|
|
287
444
|
ActionButtonBackPrevious = "actionButtonBackPrevious",
|
|
445
|
+
/** Action button for forward next. */
|
|
288
446
|
ActionButtonForwardNext = "actionButtonForwardNext",
|
|
447
|
+
/** Action button for beginning. */
|
|
289
448
|
ActionButtonBeginning = "actionButtonBeginning",
|
|
449
|
+
/** Action button for end. */
|
|
290
450
|
ActionButtonEnd = "actionButtonEnd",
|
|
451
|
+
/** Action button for home. */
|
|
291
452
|
ActionButtonHome = "actionButtonHome",
|
|
453
|
+
/** Action button for information. */
|
|
292
454
|
ActionButtonInformation = "actionButtonInformation",
|
|
455
|
+
/** Action button for return. */
|
|
293
456
|
ActionButtonReturn = "actionButtonReturn",
|
|
457
|
+
/** Action button for movie. */
|
|
294
458
|
ActionButtonMovie = "actionButtonMovie",
|
|
459
|
+
/** Action button for document. */
|
|
295
460
|
ActionButtonDocument = "actionButtonDocument",
|
|
461
|
+
/** Action button for sound. */
|
|
296
462
|
ActionButtonSound = "actionButtonSound",
|
|
463
|
+
/** Action button for help. */
|
|
297
464
|
ActionButtonHelp = "actionButtonHelp",
|
|
465
|
+
/** Action button for blank. */
|
|
298
466
|
ActionButtonBlank = "actionButtonBlank",
|
|
467
|
+
/** Brace pair shape. */
|
|
299
468
|
BracePair = "bracePair",
|
|
469
|
+
/** Bracket pair shape. */
|
|
300
470
|
BracketPair = "bracketPair",
|
|
471
|
+
/** Chart plus shape. */
|
|
301
472
|
ChartPlus = "chartPlus",
|
|
473
|
+
/** Chart star shape. */
|
|
302
474
|
ChartStar = "chartStar",
|
|
475
|
+
/** Chart x shape. */
|
|
303
476
|
ChartX = "chartX",
|
|
477
|
+
/** Cloud shape. */
|
|
304
478
|
Cloud = "cloud",
|
|
479
|
+
/** Flowchart offline-storage symbol. */
|
|
305
480
|
FlowChartOfflineStorage = "flowChartOfflineStorage",
|
|
481
|
+
/** Line inv shape. */
|
|
306
482
|
LineInv = "lineInv",
|
|
483
|
+
/** Non isosceles trapezoid shape. */
|
|
307
484
|
NonIsoscelesTrapezoid = "nonIsoscelesTrapezoid",
|
|
485
|
+
/** Plaque tabs shape. */
|
|
308
486
|
PlaqueTabs = "plaqueTabs",
|
|
487
|
+
/** Square tabs shape. */
|
|
309
488
|
SquareTabs = "squareTabs",
|
|
489
|
+
/** 4-point star shape. */
|
|
310
490
|
Star4 = "star4",
|
|
491
|
+
/** Up down arrow callout shape for directional diagrams. */
|
|
311
492
|
UpDownArrowCallout = "upDownArrowCallout",
|
|
493
|
+
/** Simple line shape. */
|
|
312
494
|
Line = "line",
|
|
495
|
+
/** Straight connector shape with one segment. */
|
|
313
496
|
StraightConnector1 = "straightConnector1",
|
|
497
|
+
/** Orthogonal connector shape with two segments. */
|
|
314
498
|
BentConnector2 = "bentConnector2",
|
|
499
|
+
/** Orthogonal connector shape with three segments. */
|
|
315
500
|
BentConnector3 = "bentConnector3",
|
|
501
|
+
/** Orthogonal connector shape with four segments. */
|
|
316
502
|
BentConnector4 = "bentConnector4",
|
|
503
|
+
/** Orthogonal connector shape with five segments. */
|
|
317
504
|
BentConnector5 = "bentConnector5",
|
|
505
|
+
/** Curved connector shape with two control sections. */
|
|
318
506
|
CurvedConnector2 = "curvedConnector2",
|
|
507
|
+
/** Curved connector shape with three control sections. */
|
|
319
508
|
CurvedConnector3 = "curvedConnector3",
|
|
509
|
+
/** Curved connector shape with four control sections. */
|
|
320
510
|
CurvedConnector4 = "curvedConnector4",
|
|
511
|
+
/** Curved connector shape with five control sections. */
|
|
321
512
|
CurvedConnector5 = "curvedConnector5"
|
|
322
513
|
}
|
|
323
514
|
/**
|
|
@@ -552,6 +552,13 @@ export interface IShapePath {
|
|
|
552
552
|
dataArray?: IPathCommand[];
|
|
553
553
|
}
|
|
554
554
|
export type ShapeTextDirection = 'horz' | 'vert' | 'vert270' | 'wordArtVert' | 'eaVert' | 'mongolianVert' | 'wordArtVertRtl';
|
|
555
|
+
export type ShapeTextHorizontalAnchor = 'center';
|
|
556
|
+
export type ShapeTextWrapType = 'none' | 'square';
|
|
557
|
+
export declare enum ShapeTextAutoFitType {
|
|
558
|
+
NoAutofit = "noAutofit",
|
|
559
|
+
NormAutofit = "normAutofit",
|
|
560
|
+
SpAutoFit = "spAutoFit"
|
|
561
|
+
}
|
|
555
562
|
export interface IShapeTextAlign {
|
|
556
563
|
isHorizontal: boolean;
|
|
557
564
|
textDirection?: ShapeTextDirection;
|
|
@@ -562,7 +569,24 @@ export interface IShapeTextRectPadding {
|
|
|
562
569
|
right: number;
|
|
563
570
|
bottom: number;
|
|
564
571
|
}
|
|
565
|
-
export interface
|
|
572
|
+
export interface IShapeTextBodyBehavior {
|
|
573
|
+
horizontalAnchor?: ShapeTextHorizontalAnchor;
|
|
574
|
+
textWrap?: ShapeTextWrapType;
|
|
575
|
+
autoFitType?: ShapeTextAutoFitType;
|
|
576
|
+
/**
|
|
577
|
+
* Legacy compatibility. New data should use `autoFitType`.
|
|
578
|
+
*/
|
|
579
|
+
autoFit?: boolean;
|
|
580
|
+
/**
|
|
581
|
+
* OOXML normAutofit fontScale. 100000 means 100%.
|
|
582
|
+
*/
|
|
583
|
+
fontScale?: number;
|
|
584
|
+
/**
|
|
585
|
+
* OOXML normAutofit lnSpcReduction.
|
|
586
|
+
*/
|
|
587
|
+
lineSpaceReduction?: number;
|
|
588
|
+
}
|
|
589
|
+
export interface IShapeText extends IShapeTextAlign, IShapeTextBodyBehavior {
|
|
566
590
|
isRichText: false;
|
|
567
591
|
text?: string;
|
|
568
592
|
color?: string;
|
|
@@ -572,9 +596,28 @@ export interface IShapeText extends IShapeTextAlign {
|
|
|
572
596
|
italic?: boolean;
|
|
573
597
|
underline?: boolean;
|
|
574
598
|
}
|
|
575
|
-
|
|
576
|
-
|
|
599
|
+
/**
|
|
600
|
+
* Shared rich shape text model.
|
|
601
|
+
*
|
|
602
|
+
* `engine-shape` owns the shape-text contract, but does not depend on a concrete
|
|
603
|
+
* document package. Products can specialize the generic parameters with their
|
|
604
|
+
* document and alignment types, for example
|
|
605
|
+
* `IShapeTextDataModel<IDocumentData, HorizontalAlign, VerticalAlign>`.
|
|
606
|
+
*/
|
|
607
|
+
export interface IShapeTextDataModel<TDocument = unknown, THorizontalAlign = unknown, TVerticalAlign = unknown> {
|
|
608
|
+
doc?: TDocument;
|
|
609
|
+
ha?: THorizontalAlign;
|
|
610
|
+
va?: TVerticalAlign;
|
|
611
|
+
}
|
|
612
|
+
export interface ICustomShapeTextData<TDocument = unknown, THorizontalAlign = unknown, TVerticalAlign = unknown> extends IShapeTextAlign, IShapeTextBodyBehavior {
|
|
613
|
+
/**
|
|
614
|
+
* Plain-text summary used by search, measurement, fallback rendering, and
|
|
615
|
+
* product-level display. Formatted content lives in `dataModel.doc`.
|
|
616
|
+
*/
|
|
617
|
+
text?: string;
|
|
618
|
+
dataModel?: IShapeTextDataModel<TDocument, THorizontalAlign, TVerticalAlign>;
|
|
577
619
|
}
|
|
620
|
+
export type IShapeTextData<TDocument = unknown, THorizontalAlign = unknown, TVerticalAlign = unknown> = IShapeText | ICustomShapeTextData<TDocument, THorizontalAlign, TVerticalAlign>;
|
|
578
621
|
/**
|
|
579
622
|
* A shape outer-shadow effect. Distances and blur radius use slide drawing
|
|
580
623
|
* units; direction is in degrees where 0 points right and 90 points down.
|
|
@@ -669,7 +712,7 @@ export interface IBasicShapeData {
|
|
|
669
712
|
customGeometry?: IPresetShapeConfig;
|
|
670
713
|
/** Basic outer shadow effect applied while rendering the shape path. */
|
|
671
714
|
outerShadow?: IShapeShadowEffect;
|
|
672
|
-
shapeText?:
|
|
715
|
+
shapeText?: IShapeTextData;
|
|
673
716
|
/**
|
|
674
717
|
* Text box inset used to calculate the editable/rendered text rect.
|
|
675
718
|
* Values use the same drawing units as the shape rect.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { IShapeData, IShapeTextRectPadding, ShapeTextHorizontalAnchor, ShapeTextWrapType } from '../shape-type';
|
|
2
|
+
import { ShapeTextAutoFitType } from '../shape-type';
|
|
3
|
+
export interface IResolvedShapeTextBodyBehavior {
|
|
4
|
+
autoFitType: ShapeTextAutoFitType;
|
|
5
|
+
fontScale?: number;
|
|
6
|
+
horizontalAnchor?: ShapeTextHorizontalAnchor;
|
|
7
|
+
isTextBox: boolean;
|
|
8
|
+
lineSpaceReduction?: number;
|
|
9
|
+
textRectPadding: IShapeTextRectPadding;
|
|
10
|
+
textWrap: ShapeTextWrapType;
|
|
11
|
+
}
|
|
12
|
+
export declare function resolveShapeTextBodyBehavior(shapeData: IShapeData): IResolvedShapeTextBodyBehavior;
|
|
13
|
+
export declare function shouldUseFullShapeTextRectForAutoFit(shapeData: IShapeData): boolean;
|