@univerjs/core 0.5.3 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/lib/cjs/index.js +9 -8
  2. package/lib/es/index.js +10234 -7967
  3. package/lib/types/common/error.d.ts +3 -0
  4. package/lib/types/docs/data-model/rich-text-builder.d.ts +1340 -0
  5. package/lib/types/docs/data-model/text-x/build-utils/index.d.ts +2 -1
  6. package/lib/types/docs/data-model/text-x/build-utils/text-x-utils.d.ts +2 -2
  7. package/lib/types/facade/f-blob.d.ts +12 -12
  8. package/lib/types/facade/f-doc.d.ts +7 -0
  9. package/lib/types/facade/f-enum.d.ts +51 -0
  10. package/lib/types/facade/f-event.d.ts +168 -13
  11. package/lib/types/facade/f-univer.d.ts +95 -20
  12. package/lib/types/facade/f-usermanager.d.ts +4 -3
  13. package/lib/types/facade/f-util.d.ts +16 -23
  14. package/lib/types/index.d.ts +3 -1
  15. package/lib/types/services/image-io/image-io.service.d.ts +12 -0
  16. package/lib/types/shared/check-if-move.d.ts +1 -1
  17. package/lib/types/shared/rectangle.d.ts +267 -12
  18. package/lib/types/sheets/column-manager.d.ts +3 -1
  19. package/lib/types/sheets/row-manager.d.ts +3 -1
  20. package/lib/types/sheets/typedef.d.ts +8 -0
  21. package/lib/types/sheets/workbook.d.ts +11 -1
  22. package/lib/types/sheets/worksheet.d.ts +11 -1
  23. package/lib/types/types/const/const.d.ts +9 -0
  24. package/lib/types/types/interfaces/i-document-data.d.ts +2 -52
  25. package/lib/types/types/interfaces/i-drawing.d.ts +93 -0
  26. package/lib/types/types/interfaces/i-slide-data.d.ts +2 -1
  27. package/lib/types/types/interfaces/i-style-data.d.ts +12 -0
  28. package/lib/types/types/interfaces/index.d.ts +1 -0
  29. package/lib/umd/index.js +9 -8
  30. package/package.json +3 -3
@@ -0,0 +1,1340 @@
1
+ import { Nullable } from '../../shared';
2
+ import { BaselineOffset, HorizontalAlign, TextDecoration, TextDirection, BooleanNumber } from '../../types/enum';
3
+ import { IBorderData, IColorStyle, IDocumentBody, IDocumentData, INumberUnit, IParagraphBorder, IParagraphStyle, IShading, ITabStop, ITextDecoration, ITextStyle, NamedStyleType, SpacingRule } from '../../types/interfaces';
4
+ /**
5
+ * Represents a read-only font style value object.
6
+ * This class provides access to font style properties without modification capabilities.
7
+ */
8
+ export declare class TextStyleValue {
9
+ protected _style: ITextStyle;
10
+ /**
11
+ * Creates an instance of TextStyleValue.
12
+ * @param {ITextStyle} style style object
13
+ * @returns {TextStyleValue} font style instance
14
+ * @example
15
+ * ```ts
16
+ * const style = TextStyleValue.create({ ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE });
17
+ * console.log(style);
18
+ * ```
19
+ */
20
+ static create(style?: ITextStyle): TextStyleValue;
21
+ /**
22
+ * Creates a new TextStyleValue instance
23
+ * @param {ITextStyle} style The initial style object
24
+ * @example
25
+ * ```ts
26
+ * const style = TextStyleValue.create({ ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE });
27
+ * console.log(style);
28
+ * ```
29
+ */
30
+ constructor(style?: ITextStyle);
31
+ /**
32
+ * Gets the font family
33
+ * @returns {Nullable<string>} The font family name or undefined
34
+ * @example
35
+ * ```ts
36
+ * const style = TextStyleValue.create({ ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE });
37
+ * console.log(style.fontFamily);
38
+ * ```
39
+ */
40
+ get fontFamily(): Nullable<string>;
41
+ /**
42
+ * Gets the font size in points
43
+ * @returns {number | undefined} The font size or undefined
44
+ * @example
45
+ * ```ts
46
+ * const style = TextStyleValue.create({ ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE });
47
+ * console.log(style.fontSize);
48
+ * ```
49
+ */
50
+ get fontSize(): number | undefined;
51
+ /**
52
+ * Gets whether the text is italic
53
+ * @returns {boolean} True if italic, false otherwise
54
+ * @example
55
+ * ```ts
56
+ * const style = TextStyleValue.create({ ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE });
57
+ * console.log(style.italic);
58
+ * ```
59
+ */
60
+ get italic(): boolean;
61
+ /**
62
+ * Gets whether the text is bold
63
+ * @returns {boolean} True if bold, false otherwise
64
+ * @example
65
+ * ```ts
66
+ * const style = TextStyleValue.create({ ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE });
67
+ * console.log(style.bold);
68
+ * ```
69
+ */
70
+ get bold(): boolean;
71
+ /**
72
+ * Gets the underline decoration
73
+ * @returns {TextDecorationBuilder | undefined} The underline decoration or undefined
74
+ * @example
75
+ * ```ts
76
+ * const style = TextStyleValue.create({ ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE });
77
+ * console.log(style.underline);
78
+ * ```
79
+ */
80
+ get underline(): TextDecorationBuilder | undefined;
81
+ /**
82
+ * Gets the bottom border line decoration
83
+ * @returns {TextDecorationBuilder | undefined} The bottom border line decoration or undefined
84
+ * @example
85
+ * ```ts
86
+ * const style = TextStyleValue.create({ ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE });
87
+ * console.log(style.bottomBorderLine);
88
+ * ```
89
+ */
90
+ get bottomBorderLine(): TextDecorationBuilder | undefined;
91
+ /**
92
+ * Gets the strikethrough decoration
93
+ * @returns {TextDecorationBuilder | undefined} The strikethrough decoration or undefined
94
+ * @example
95
+ * ```ts
96
+ * const style = TextStyleValue.create({ ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE });
97
+ * console.log(style.strikethrough);
98
+ * ```
99
+ */
100
+ get strikethrough(): TextDecorationBuilder | undefined;
101
+ /**
102
+ * Gets the overline decoration
103
+ * @returns {TextDecorationBuilder | undefined} The overline decoration or undefined
104
+ * @example
105
+ * ```ts
106
+ * const style = TextStyleValue.create({ ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE });
107
+ * console.log(style.overline);
108
+ * ```
109
+ */
110
+ get overline(): TextDecorationBuilder | undefined;
111
+ /**
112
+ * Gets the background color
113
+ * @returns {Nullable<IColorStyle>} The background color or null/undefined
114
+ * @example
115
+ * ```ts
116
+ * const style = TextStyleValue.create({ ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE });
117
+ * console.log(style.background);
118
+ * ```
119
+ */
120
+ get background(): Nullable<IColorStyle>;
121
+ /**
122
+ * Gets the border settings
123
+ * @returns {Nullable<IBorderData>} The border settings or null/undefined
124
+ * @example
125
+ * ```ts
126
+ * const style = TextStyleValue.create({ ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE });
127
+ * console.log(style.border);
128
+ * ```
129
+ */
130
+ get border(): Nullable<IBorderData>;
131
+ /**
132
+ * Gets the text color
133
+ * @returns {Nullable<IColorStyle>} The text color or null/undefined
134
+ * @example
135
+ * ```ts
136
+ * const style = TextStyleValue.create({ ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE });
137
+ * console.log(style.color);
138
+ * ```
139
+ */
140
+ get color(): Nullable<IColorStyle>;
141
+ /**
142
+ * Gets the vertical alignment (subscript/superscript)
143
+ * @returns {Nullable<BaselineOffset>} The vertical alignment or null/undefined
144
+ * @example
145
+ * ```ts
146
+ * const style = TextStyleValue.create({ ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE });
147
+ * console.log(style.verticalAlign);
148
+ * ```
149
+ */
150
+ get verticalAlign(): Nullable<BaselineOffset>;
151
+ /**
152
+ * Gets the number format pattern
153
+ * @returns {Nullable<{ pattern: string }>} The number format pattern or null/undefined
154
+ * @example
155
+ * ```ts
156
+ * const style = TextStyleValue.create({ ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE });
157
+ * console.log(style.numberFormat);
158
+ * ```
159
+ */
160
+ get numberFormat(): Nullable<{
161
+ pattern: string;
162
+ }>;
163
+ /**
164
+ * Creates a copy of this font style as a builder
165
+ * @returns {TextStyleBuilder} A new TextStyleBuilder instance with the same style
166
+ * @example
167
+ * ```ts
168
+ * const style = TextStyleValue.create({ ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE });
169
+ * const copy = style.copy();
170
+ * console.log(copy);
171
+ * ```
172
+ */
173
+ copy(): TextStyleBuilder;
174
+ /**
175
+ * Gets the raw style object
176
+ * @returns {ITextStyle} The underlying style object
177
+ * @example
178
+ * ```ts
179
+ * const style = TextStyleValue.create({ ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE });
180
+ * console.log(style.getValue());
181
+ * ```
182
+ */
183
+ getValue(): ITextStyle;
184
+ }
185
+ /**
186
+ * Builder class for creating and modifying font styles.
187
+ * Extends TextStyleValue to provide setter methods for all style properties.
188
+ */
189
+ export declare class TextStyleBuilder extends TextStyleValue {
190
+ /**
191
+ * Creates a new TextStyleBuilder instance
192
+ * @param {ITextStyle} style Initial style object
193
+ * @returns {TextStyleBuilder} A new TextStyleBuilder instance
194
+ * @example
195
+ * ```ts
196
+ * const style = TextStyleBuilder.create({ ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE });
197
+ * console.log(style);
198
+ * ```
199
+ */
200
+ static create(style?: ITextStyle): TextStyleBuilder;
201
+ /**
202
+ * Creates a new TextStyleBuilder instance
203
+ * @param {ITextStyle} style The initial style object
204
+ * @example
205
+ * ```ts
206
+ * const style = new TextStyleBuilder({ ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE });
207
+ * console.log(style);
208
+ * ```
209
+ */
210
+ constructor(style?: ITextStyle);
211
+ /**
212
+ * Sets the font family
213
+ * @param {string} family The font family name
214
+ * @returns {TextStyleBuilder} The builder instance for chaining
215
+ * @example
216
+ * ```ts
217
+ * const style = TextStyleBuilder.create({ ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE });
218
+ * style.setFontFamily('Times New Roman');
219
+ * console.log(style.fontFamily);
220
+ * ```
221
+ */
222
+ setFontFamily(family: string): TextStyleBuilder;
223
+ /**
224
+ * Sets the font size in points
225
+ * @param {number} size The font size
226
+ * @returns {TextStyleBuilder} The builder instance for chaining
227
+ * @example
228
+ * ```ts
229
+ * const style = TextStyleBuilder.create({ ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE });
230
+ * style.setFontSize(14);
231
+ * console.log(style.fontSize);
232
+ * ```
233
+ */
234
+ setFontSize(size: number): TextStyleBuilder;
235
+ /**
236
+ * Sets the italic style
237
+ * @param {boolean} value True to make italic, false otherwise
238
+ * @returns {TextStyleBuilder} The builder instance for chaining
239
+ * @example
240
+ * ```ts
241
+ * const style = TextStyleBuilder.create({ ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE });
242
+ * style.setItalic(true);
243
+ * console.log(style.italic);
244
+ * ```
245
+ */
246
+ setItalic(value: boolean): TextStyleBuilder;
247
+ /**
248
+ * Sets the bold style
249
+ * @param {boolean} value True to make bold, false otherwise
250
+ * @returns {TextStyleBuilder} The builder instance for chaining
251
+ * @example
252
+ * ```ts
253
+ * const style = TextStyleBuilder.create({ ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE });
254
+ * style.setBold(true);
255
+ * console.log(style.bold);
256
+ * ```
257
+ */
258
+ setBold(value: boolean): TextStyleBuilder;
259
+ /**
260
+ * Sets the underline decoration
261
+ * @param {TextDecorationBuilder} decoration The underline decoration settings
262
+ * @returns {TextStyleBuilder} The builder instance for chaining
263
+ * @example
264
+ * ```ts
265
+ * const style = TextStyleBuilder.create({ ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE });
266
+ * style.setUnderline({ type: 'single', color: '#FF0000' });
267
+ * console.log(style.underline);
268
+ * ```
269
+ */
270
+ setUnderline(decoration: TextDecorationBuilder): TextStyleBuilder;
271
+ /**
272
+ * Sets the bottom border line decoration
273
+ * @param {TextDecorationBuilder} decoration The bottom border line decoration settings
274
+ * @returns {TextStyleBuilder} The builder instance for chaining
275
+ * @example
276
+ * ```ts
277
+ * const style = TextStyleBuilder.create({ ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE });
278
+ * style.setBottomBorderLine({ type: 'single', color: '#FF0000' });
279
+ * console.log(style.bottomBorderLine);
280
+ * ```
281
+ */
282
+ setBottomBorderLine(decoration: TextDecorationBuilder): TextStyleBuilder;
283
+ /**
284
+ * Sets the strikethrough decoration
285
+ * @param {TextDecorationBuilder} decoration The strikethrough decoration settings
286
+ * @returns {TextStyleBuilder} The builder instance for chaining
287
+ */
288
+ setStrikethrough(decoration: TextDecorationBuilder): TextStyleBuilder;
289
+ /**
290
+ * Sets the overline decoration
291
+ * @param {TextDecorationBuilder} decoration The overline decoration settings
292
+ * @returns {TextStyleBuilder} The builder instance for chaining
293
+ */
294
+ setOverline(decoration: TextDecorationBuilder): TextStyleBuilder;
295
+ /**
296
+ * Sets the background color
297
+ * @param {IColorStyle | null} color The background color or null to remove
298
+ * @returns {TextStyleBuilder} The builder instance for chaining
299
+ */
300
+ setBackground(color: IColorStyle | null): TextStyleBuilder;
301
+ /**
302
+ * Sets the border settings
303
+ * @param {IBorderData | null} border The border settings or null to remove
304
+ * @returns {TextStyleBuilder} The builder instance for chaining
305
+ */
306
+ setBorder(border: IBorderData | null): TextStyleBuilder;
307
+ /**
308
+ * Sets the text color
309
+ * @param {IColorStyle | null} color The text color or null to remove
310
+ * @returns {TextStyleBuilder} The builder instance for chaining
311
+ */
312
+ setColor(color: IColorStyle | null): TextStyleBuilder;
313
+ /**
314
+ * Sets the vertical alignment (subscript/superscript)
315
+ * @param {BaselineOffset | null} offset The vertical alignment or null to remove
316
+ * @returns {TextStyleBuilder} The builder instance for chaining
317
+ */
318
+ setVerticalAlign(offset: BaselineOffset | null): TextStyleBuilder;
319
+ /**
320
+ * Creates a copy of this font style builder
321
+ * @returns {TextStyleBuilder} A new TextStyleBuilder instance with the same style
322
+ */
323
+ copy(): TextStyleBuilder;
324
+ /**
325
+ * Builds and returns the final style object
326
+ * @returns {ITextStyle} The complete style object
327
+ */
328
+ build(): ITextStyle;
329
+ }
330
+ /**
331
+ * Builder class for creating and modifying text decorations.
332
+ * Provides a fluent interface for setting text decoration properties.
333
+ */
334
+ export declare class TextDecorationBuilder {
335
+ protected _decoration: ITextDecoration;
336
+ /**
337
+ * Creates an instance of TextDecorationBuilder.
338
+ * @param {ITextDecoration} decoration Initial decoration object
339
+ * @returns {TextDecorationBuilder} text decoration builder instance
340
+ * @example
341
+ * ```ts
342
+ * const decoration = TextDecorationBuilder.create({ s: 1, t: TextDecoration.SINGLE });
343
+ * console.log(decoration);
344
+ * ```
345
+ */
346
+ static create(decoration?: ITextDecoration): TextDecorationBuilder;
347
+ /**
348
+ * Creates a new TextDecorationBuilder instance
349
+ * @param {ITextDecoration} decoration The initial decoration object
350
+ * @example
351
+ * ```ts
352
+ * const decoration = new TextDecorationBuilder({ s: 1, t: TextDecoration.SINGLE });
353
+ * ```
354
+ */
355
+ constructor(decoration?: ITextDecoration);
356
+ /**
357
+ * Gets whether the decoration is shown
358
+ * @returns {boolean} True if the decoration is shown
359
+ */
360
+ get show(): boolean;
361
+ /**
362
+ * Gets whether the decoration color follows the font color
363
+ * @returns {boolean} True if the decoration color follows the font color
364
+ */
365
+ get followFontColor(): boolean;
366
+ /**
367
+ * Gets the decoration color
368
+ * @returns {Nullable<IColorStyle>} The decoration color
369
+ */
370
+ get color(): Nullable<IColorStyle>;
371
+ /**
372
+ * Gets the decoration line type
373
+ * @returns {Nullable<TextDecoration>} The decoration line type
374
+ */
375
+ get type(): Nullable<TextDecoration>;
376
+ /**
377
+ * Sets whether the decoration is shown
378
+ * @param {boolean} value True to show the decoration
379
+ * @returns {TextDecorationBuilder} The builder instance for chaining
380
+ * @example
381
+ * ```ts
382
+ * decoration.setShow(true);
383
+ * ```
384
+ */
385
+ setShow(value: boolean): TextDecorationBuilder;
386
+ /**
387
+ * Sets whether the decoration color follows the font color
388
+ * @param {boolean} value True to follow font color
389
+ * @returns {TextDecorationBuilder} The builder instance for chaining
390
+ * @example
391
+ * ```ts
392
+ * decoration.setFollowFontColor(false);
393
+ * ```
394
+ */
395
+ setFollowFontColor(value: boolean): TextDecorationBuilder;
396
+ /**
397
+ * Sets the decoration color
398
+ * @param {IColorStyle} color The color style
399
+ * @returns {TextDecorationBuilder} The builder instance for chaining
400
+ * @example
401
+ * ```ts
402
+ * decoration.setColor({ rgb: '#FF0000' });
403
+ * ```
404
+ */
405
+ setColor(color: IColorStyle): TextDecorationBuilder;
406
+ /**
407
+ * Sets the decoration line type
408
+ * @param {TextDecoration} type The line type
409
+ * @returns {TextDecorationBuilder} The builder instance for chaining
410
+ * @example
411
+ * ```ts
412
+ * decoration.setLineType(TextDecoration.SINGLE);
413
+ * ```
414
+ */
415
+ setLineType(type: TextDecoration): TextDecorationBuilder;
416
+ /**
417
+ * Creates a copy of this text decoration builder
418
+ * @returns {TextDecorationBuilder} A new TextDecorationBuilder instance with the same decoration
419
+ * @example
420
+ * ```ts
421
+ * const copy = decoration.copy();
422
+ * ```
423
+ */
424
+ copy(): TextDecorationBuilder;
425
+ /**
426
+ * Builds and returns the final decoration object
427
+ * @returns {ITextDecoration} The complete text decoration object
428
+ * @example
429
+ * ```ts
430
+ * const style = decoration.build();
431
+ * ```
432
+ */
433
+ build(): ITextDecoration;
434
+ }
435
+ export declare class ParagraphStyleValue {
436
+ protected _style: IParagraphStyle;
437
+ /**
438
+ * Creates a new ParagraphStyleValue instance
439
+ * @param {IParagraphStyle} style The initial style object
440
+ * @returns A new ParagraphStyleValue instance
441
+ * @example
442
+ * ```ts
443
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
444
+ * ```
445
+ */
446
+ static create(style?: IParagraphStyle): ParagraphStyleValue;
447
+ constructor(style?: IParagraphStyle);
448
+ /**
449
+ * Gets the first line indent
450
+ * @returns {Nullable<INumberUnit>} The first line indent
451
+ * @example
452
+ * ```ts
453
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
454
+ * console.log(style.indentFirstLine);
455
+ * ```
456
+ */
457
+ get indentFirstLine(): Nullable<INumberUnit>;
458
+ /**
459
+ * Gets the hanging indent
460
+ * @returns {Nullable<INumberUnit>} The hanging indent
461
+ * @example
462
+ * ```ts
463
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
464
+ * console.log(style.hanging);
465
+ * ```
466
+ */
467
+ get hanging(): Nullable<INumberUnit>;
468
+ /**
469
+ * Gets the indent start
470
+ * @returns {Nullable<INumberUnit>} The indent start
471
+ * @example
472
+ * ```ts
473
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
474
+ * console.log(style.indentStart);
475
+ * ```
476
+ */
477
+ get indentStart(): Nullable<INumberUnit>;
478
+ /**
479
+ * Gets the indent end
480
+ * @returns {Nullable<INumberUnit>} The indent end
481
+ * @example
482
+ * ```ts
483
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
484
+ * console.log(style.indentEnd);
485
+ * ```
486
+ */
487
+ get tabStops(): Nullable<ITabStop[]>;
488
+ /**
489
+ * Gets the indent end
490
+ * @returns {Nullable<INumberUnit>} The indent end
491
+ * @example
492
+ * ```ts
493
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
494
+ * console.log(style.indentEnd);
495
+ * ```
496
+ */
497
+ get indentEnd(): Nullable<INumberUnit>;
498
+ /**
499
+ * Gets the text style
500
+ * @returns {Nullable<ITextStyle>} The text style
501
+ * @example
502
+ * ```ts
503
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
504
+ * console.log(style.textStyle);
505
+ * ```
506
+ */
507
+ get textStyle(): Nullable<ITextStyle>;
508
+ /**
509
+ * Gets the heading id
510
+ * @returns {Nullable<string>} The heading id
511
+ * @example
512
+ * ```ts
513
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
514
+ * console.log(style.headingId);
515
+ * ```
516
+ */
517
+ get headingId(): Nullable<string>;
518
+ /**
519
+ * Gets the named style type
520
+ * @returns {Nullable<NamedStyleType>} The named style type
521
+ * @example
522
+ * ```ts
523
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
524
+ * console.log(style.namedStyleType);
525
+ * ```
526
+ */
527
+ get namedStyleType(): Nullable<NamedStyleType>;
528
+ /**
529
+ * Gets the horizontal align
530
+ * @returns {Nullable<HorizontalAlign>} The horizontal align
531
+ * @example
532
+ * ```ts
533
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
534
+ * console.log(style.horizontalAlign);
535
+ * ```
536
+ */
537
+ get horizontalAlign(): Nullable<HorizontalAlign>;
538
+ /**
539
+ * Gets the line spacing
540
+ * @returns {Nullable<number>} The line spacing
541
+ * @example
542
+ * ```ts
543
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
544
+ * console.log(style.lineSpacing);
545
+ * ```
546
+ */
547
+ get lineSpacing(): Nullable<number>;
548
+ /**
549
+ * Gets the text direction
550
+ * @returns {Nullable<TextDirection>} The text direction
551
+ * @example
552
+ * ```ts
553
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
554
+ * console.log(style.direction);
555
+ * ```
556
+ */
557
+ get direction(): Nullable<TextDirection>;
558
+ /**
559
+ * Gets the spacing rule
560
+ * @returns {Nullable<SpacingRule>} The spacing rule
561
+ * @example
562
+ * ```ts
563
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
564
+ * console.log(style.spacingRule);
565
+ * ```
566
+ */
567
+ get spacingRule(): Nullable<SpacingRule>;
568
+ /**
569
+ * Gets the snap to grid
570
+ * @returns {Nullable<BooleanNumber>} The snap to grid
571
+ * @example
572
+ * ```ts
573
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
574
+ * console.log(style.snapToGrid);
575
+ * ```
576
+ */
577
+ get snapToGrid(): Nullable<BooleanNumber>;
578
+ /**
579
+ * Gets the space above
580
+ * @returns {Nullable<INumberUnit>} The space above
581
+ * @example
582
+ * ```ts
583
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
584
+ * console.log(style.spaceAbove);
585
+ * ```
586
+ */
587
+ get spaceAbove(): Nullable<INumberUnit>;
588
+ /**
589
+ * Gets the space below
590
+ * @returns {Nullable<INumberUnit>} The space below
591
+ * @example
592
+ * ```ts
593
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
594
+ * console.log(style.spaceBelow);
595
+ * ```
596
+ */
597
+ get spaceBelow(): Nullable<INumberUnit>;
598
+ /**
599
+ * Gets the border between
600
+ * @returns {Nullable<IParagraphBorder>} The border between
601
+ * @example
602
+ * ```ts
603
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
604
+ * console.log(style.borderBetween);
605
+ * ```
606
+ */
607
+ get borderBetween(): Nullable<IParagraphBorder>;
608
+ /**
609
+ * Gets the border top
610
+ * @returns {Nullable<IParagraphBorder>} The border top
611
+ * @example
612
+ * ```ts
613
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
614
+ * console.log(style.borderTop);
615
+ * ```
616
+ */
617
+ get borderTop(): Nullable<IParagraphBorder>;
618
+ /**
619
+ * Gets the border bottom
620
+ * @returns {Nullable<IParagraphBorder>} The border bottom
621
+ * @example
622
+ * ```ts
623
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
624
+ * console.log(style.borderBottom);
625
+ * ```
626
+ */
627
+ get borderBottom(): Nullable<IParagraphBorder>;
628
+ /**
629
+ * Gets the border left
630
+ * @returns {Nullable<IParagraphBorder>} The border left
631
+ * @example
632
+ * ```ts
633
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
634
+ * console.log(style.borderLeft);
635
+ * ```
636
+ */
637
+ get borderLeft(): Nullable<IParagraphBorder>;
638
+ /**
639
+ * Gets the border right
640
+ * @returns {Nullable<IParagraphBorder>} The border right
641
+ * @example
642
+ * ```ts
643
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
644
+ * console.log(style.borderRight);
645
+ * ```
646
+ */
647
+ get borderRight(): Nullable<IParagraphBorder>;
648
+ /**
649
+ * Gets the keep lines
650
+ * @returns {boolean} The keep lines
651
+ * @example
652
+ * ```ts
653
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
654
+ * console.log(style.keepLines);
655
+ * ```
656
+ */
657
+ get keepLines(): boolean;
658
+ /**
659
+ * Gets the keep next
660
+ * @returns {boolean} The keep next
661
+ * @example
662
+ * ```ts
663
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
664
+ * console.log(style.keepNext);
665
+ * ```
666
+ */
667
+ get keepNext(): boolean;
668
+ /**
669
+ * Gets the word wrap
670
+ * @returns {boolean} The word wrap
671
+ * @example
672
+ * ```ts
673
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
674
+ * console.log(style.wordWrap);
675
+ * ```
676
+ */
677
+ get wordWrap(): boolean;
678
+ /**
679
+ * Gets the widow control
680
+ * @returns {boolean} The widow control
681
+ * @example
682
+ * ```ts
683
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
684
+ * console.log(style.widowControl);
685
+ * ```
686
+ */
687
+ get widowControl(): boolean;
688
+ /**
689
+ * Gets the shading
690
+ * @returns {Nullable<IShading>} The shading
691
+ * @example
692
+ * ```ts
693
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
694
+ * console.log(style.shading);
695
+ * ```
696
+ */
697
+ get shading(): Nullable<IShading>;
698
+ /**
699
+ * Gets the suppress hyphenation
700
+ * @returns {boolean} The suppress hyphenation
701
+ * @example
702
+ * ```ts
703
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
704
+ * console.log(style.suppressHyphenation);
705
+ * ```
706
+ */
707
+ get suppressHyphenation(): boolean;
708
+ /**
709
+ * Creates a copy of the paragraph style
710
+ * @returns {ParagraphStyleBuilder} The copy
711
+ * @example
712
+ * ```ts
713
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
714
+ * const copy = style.copy();
715
+ * ```
716
+ */
717
+ copy(): ParagraphStyleBuilder;
718
+ /**
719
+ * Gets the value
720
+ * @returns {IParagraphStyle} The value
721
+ * @example
722
+ * ```ts
723
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
724
+ * console.log(style.getValue());
725
+ * ```
726
+ */
727
+ getValue(): IParagraphStyle;
728
+ }
729
+ /**
730
+ * Paragraph style builder
731
+ */
732
+ export declare class ParagraphStyleBuilder extends ParagraphStyleValue {
733
+ /**
734
+ * Creates a new paragraph style builder
735
+ * @param style The paragraph style
736
+ * @returns A new paragraph style builder
737
+ * @example
738
+ * ```ts
739
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
740
+ * const copy = style.copy();
741
+ * ```
742
+ */
743
+ static create(style?: IParagraphStyle): ParagraphStyleBuilder;
744
+ constructor(style?: IParagraphStyle);
745
+ /**
746
+ * Sets the indent first line
747
+ * @param value The indent first line
748
+ * @returns {ParagraphStyleBuilder} The paragraph style builder
749
+ * @example
750
+ * ```ts
751
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
752
+ * const copy = style.copy();
753
+ * copy.setIndentFirstLine(10);
754
+ * ```
755
+ */
756
+ setIndentFirstLine(value: INumberUnit): ParagraphStyleBuilder;
757
+ /**
758
+ * Sets the hanging
759
+ * @param value The hanging
760
+ * @returns {ParagraphStyleBuilder} The paragraph style builder
761
+ * @example
762
+ * ```ts
763
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
764
+ * const copy = style.copy();
765
+ * copy.setHanging(10);
766
+ * ```
767
+ */
768
+ setHanging(value: INumberUnit): ParagraphStyleBuilder;
769
+ /**
770
+ * Sets the indent start
771
+ * @param value The indent start
772
+ * @returns {ParagraphStyleBuilder} The paragraph style builder
773
+ * @example
774
+ * ```ts
775
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
776
+ * const copy = style.copy();
777
+ * copy.setIndentStart(10);
778
+ * ```
779
+ */
780
+ setIndentStart(value: INumberUnit): ParagraphStyleBuilder;
781
+ /**
782
+ * Sets the tab stops
783
+ * @param value The tab stops
784
+ * @returns {ParagraphStyleBuilder} The paragraph style builder
785
+ * @example
786
+ * ```ts
787
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
788
+ * const copy = style.copy();
789
+ * copy.setTabStops([{ value: 10 }]);
790
+ * ```
791
+ */
792
+ setTabStops(value: ITabStop[]): ParagraphStyleBuilder;
793
+ /**
794
+ * Sets the indent end
795
+ * @param value The indent end
796
+ * @returns {ParagraphStyleBuilder} The paragraph style builder
797
+ * @example
798
+ * ```ts
799
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
800
+ * const copy = style.copy();
801
+ * copy.setIndentEnd(10);
802
+ * ```
803
+ */
804
+ setIndentEnd(value: INumberUnit): ParagraphStyleBuilder;
805
+ /**
806
+ * Sets the text style
807
+ * @param value The text style
808
+ * @returns {ParagraphStyleBuilder} The paragraph style builder
809
+ * @example
810
+ * ```ts
811
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
812
+ * const copy = style.copy();
813
+ * copy.setTextStyle({ ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE });
814
+ * ```
815
+ */
816
+ setTextStyle(value: ITextStyle): ParagraphStyleBuilder;
817
+ /**
818
+ * Sets the heading id
819
+ * @param value The heading id
820
+ * @returns {ParagraphStyleBuilder} The paragraph style builder
821
+ * @example
822
+ * ```ts
823
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
824
+ * const copy = style.copy();
825
+ * copy.setHeadingId('test');
826
+ * ```
827
+ */
828
+ setHeadingId(value: string): ParagraphStyleBuilder;
829
+ /**
830
+ * Sets the named style type
831
+ * @param value The named style type
832
+ * @returns {ParagraphStyleBuilder} The paragraph style builder
833
+ * @example
834
+ * ```ts
835
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
836
+ * const copy = style.copy();
837
+ * copy.setNamedStyleType(NamedStyleType.CHAPTER);
838
+ * ```
839
+ */
840
+ setNamedStyleType(value: NamedStyleType): ParagraphStyleBuilder;
841
+ /**
842
+ * Sets the vertical align
843
+ * @param value The vertical align
844
+ * @returns {ParagraphStyleBuilder} The paragraph style builder
845
+ * @example
846
+ * ```ts
847
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
848
+ * const copy = style.copy();
849
+ * copy.setVerticalAlign(VerticalAlign.CENTER);
850
+ * ```
851
+ */
852
+ setHorizontalAlign(value: HorizontalAlign): ParagraphStyleBuilder;
853
+ /**
854
+ * Sets the line spacing
855
+ * @param value The line spacing
856
+ * @returns {ParagraphStyleBuilder} The paragraph style builder
857
+ * @example
858
+ * ```ts
859
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
860
+ * const copy = style.copy();
861
+ * copy.setLineSpacing(10);
862
+ * ```
863
+ */
864
+ setLineSpacing(value: number): ParagraphStyleBuilder;
865
+ /**
866
+ * Sets the text direction
867
+ * @param value The text direction
868
+ * @returns {ParagraphStyleBuilder} The paragraph style builder
869
+ * @example
870
+ * ```ts
871
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
872
+ * const copy = style.copy();
873
+ * copy.setTextDirection(TextDirection.RIGHT_TO_LEFT);
874
+ * ```
875
+ */
876
+ setDirection(value: TextDirection): ParagraphStyleBuilder;
877
+ /**
878
+ * Sets the spacing rule
879
+ * @param value The spacing rule
880
+ * @returns {ParagraphStyleBuilder} The paragraph style builder
881
+ * @example
882
+ * ```ts
883
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
884
+ * const copy = style.copy();
885
+ * copy.setSpacingRule(SpacingRule.AUTO);
886
+ * ```
887
+ */
888
+ setSpacingRule(value: SpacingRule): ParagraphStyleBuilder;
889
+ /**
890
+ * Sets the snap to grid
891
+ * @param value The snap to grid
892
+ * @returns {ParagraphStyleBuilder} The paragraph style builder
893
+ * @example
894
+ * ```ts
895
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
896
+ * const copy = style.copy();
897
+ * copy.setSnapToGrid(true);
898
+ * ```
899
+ */
900
+ setSnapToGrid(value: boolean): ParagraphStyleBuilder;
901
+ /**
902
+ * Sets the space above
903
+ * @param value The space above
904
+ * @returns {ParagraphStyleBuilder} The paragraph style builder
905
+ * @example
906
+ * ```ts
907
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
908
+ * const copy = style.copy();
909
+ * copy.setSpaceAbove(10);
910
+ * ```
911
+ */
912
+ setSpaceAbove(value: INumberUnit): ParagraphStyleBuilder;
913
+ /**
914
+ * Sets the space below
915
+ * @param value The space below
916
+ * @returns {ParagraphStyleBuilder} The paragraph style builder
917
+ * @example
918
+ * ```ts
919
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
920
+ * const copy = style.copy();
921
+ * copy.setSpaceBelow(10);
922
+ * ```
923
+ */
924
+ setSpaceBelow(value: INumberUnit): ParagraphStyleBuilder;
925
+ /**
926
+ * Sets the border between
927
+ * @param {IParagraphBorder} value The border between
928
+ * @returns {ParagraphStyleBuilder} The paragraph style builder
929
+ * @example
930
+ * ```ts
931
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
932
+ * const copy = style.copy();
933
+ * copy.setBorderBetween({ color: 'red', width: 1 });
934
+ * ```
935
+ */
936
+ setBorderBetween(value: IParagraphBorder): ParagraphStyleBuilder;
937
+ /**
938
+ * Sets the border top
939
+ * @param {IParagraphBorder} value The border top
940
+ * @returns {ParagraphStyleBuilder} The paragraph style builder
941
+ * @example
942
+ * ```ts
943
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
944
+ * const copy = style.copy();
945
+ * copy.setBorderTop({ color: 'red', width: 1 });
946
+ * ```
947
+ */
948
+ setBorderTop(value: IParagraphBorder): ParagraphStyleBuilder;
949
+ /**
950
+ * Sets the border bottom
951
+ * @param {IParagraphBorder} value The border bottom
952
+ * @returns {ParagraphStyleBuilder} The paragraph style builder
953
+ * @example
954
+ * ```ts
955
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
956
+ * const copy = style.copy();
957
+ * copy.setBorderBottom({ color: 'red', width: 1 });
958
+ * ```
959
+ */
960
+ setBorderBottom(value: IParagraphBorder): ParagraphStyleBuilder;
961
+ /**
962
+ * Sets the border left
963
+ * @param {IParagraphBorder} value The border left
964
+ * @returns {ParagraphStyleBuilder} The paragraph style builder
965
+ * @example
966
+ * ```ts
967
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
968
+ * const copy = style.copy();
969
+ * copy.setBorderLeft({ color: 'red', width: 1 });
970
+ * ```
971
+ */
972
+ setBorderLeft(value: IParagraphBorder): ParagraphStyleBuilder;
973
+ /**
974
+ * Sets the border right
975
+ * @param {IParagraphBorder} value The border right
976
+ * @returns {ParagraphStyleBuilder} The paragraph style builder
977
+ * @example
978
+ * ```ts
979
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
980
+ * const copy = style.copy();
981
+ * copy.setBorderRight({ color: 'red', width: 1 });
982
+ * ```
983
+ */
984
+ setBorderRight(value: IParagraphBorder): ParagraphStyleBuilder;
985
+ /**
986
+ * Sets the keep lines
987
+ * @param value The keep lines
988
+ * @returns {ParagraphStyleBuilder} The paragraph style builder
989
+ * @example
990
+ * ```ts
991
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
992
+ * const copy = style.copy();
993
+ * copy.setKeepLines(true);
994
+ * ```
995
+ */
996
+ setKeepLines(value: boolean): ParagraphStyleBuilder;
997
+ /**
998
+ * Sets the keep next
999
+ * @param value The keep next
1000
+ * @returns {ParagraphStyleBuilder} The paragraph style builder
1001
+ * @example
1002
+ * ```ts
1003
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
1004
+ * const copy = style.copy();
1005
+ * copy.setKeepNext(true);
1006
+ * ```
1007
+ */
1008
+ setKeepNext(value: boolean): ParagraphStyleBuilder;
1009
+ /**
1010
+ * Sets the word wrap
1011
+ * @param value The word wrap
1012
+ * @returns {ParagraphStyleBuilder} The paragraph style builder
1013
+ * @example
1014
+ * ```ts
1015
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
1016
+ * const copy = style.copy();
1017
+ * copy.setWordWrap(true);
1018
+ * ```
1019
+ */
1020
+ setWordWrap(value: boolean): ParagraphStyleBuilder;
1021
+ /**
1022
+ * Sets the widow control
1023
+ * @param {boolean} value The widow control value
1024
+ * @returns {ParagraphStyleBuilder} The paragraph style builder
1025
+ * @example
1026
+ * ```ts
1027
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
1028
+ * const copy = style.copy();
1029
+ * copy.setWidowControl(true);
1030
+ * ```
1031
+ */
1032
+ setWidowControl(value: boolean): ParagraphStyleBuilder;
1033
+ /**
1034
+ * Sets the shading style
1035
+ * @param {IShading} value The shading configuration
1036
+ * @returns {ParagraphStyleBuilder} The paragraph style builder
1037
+ * @example
1038
+ * ```ts
1039
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
1040
+ * const copy = style.copy();
1041
+ * copy.setShading({ backgroundColor: '#f0f0f0' });
1042
+ * ```
1043
+ */
1044
+ setShading(value: IShading): ParagraphStyleBuilder;
1045
+ /**
1046
+ * Sets whether to suppress hyphenation
1047
+ * @param {boolean} value The suppress hyphenation value
1048
+ * @returns {ParagraphStyleBuilder} The paragraph style builder
1049
+ * @example
1050
+ * ```ts
1051
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
1052
+ * const copy = style.copy();
1053
+ * copy.setSuppressHyphenation(true);
1054
+ * ```
1055
+ */
1056
+ setSuppressHyphenation(value: boolean): ParagraphStyleBuilder;
1057
+ /**
1058
+ * Creates a copy of the current paragraph style builder
1059
+ * @returns {ParagraphStyleBuilder} A new instance of ParagraphStyleBuilder with the same settings
1060
+ * @example
1061
+ * ```ts
1062
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
1063
+ * const copy = style.copy();
1064
+ * ```
1065
+ */
1066
+ copy(): ParagraphStyleBuilder;
1067
+ /**
1068
+ * Builds and returns the final paragraph style configuration
1069
+ * @returns {IParagraphStyle} The constructed paragraph style object
1070
+ * @example
1071
+ * ```ts
1072
+ * const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
1073
+ * const finalStyle = style.build();
1074
+ * ```
1075
+ */
1076
+ build(): IParagraphStyle;
1077
+ }
1078
+ /**
1079
+ * Represents a rich text value
1080
+ */
1081
+ export declare class RichTextValue {
1082
+ protected _data: IDocumentData;
1083
+ /**
1084
+ * Creates a new RichTextValue instance
1085
+ * @param {IDocumentData} data The initial data for the rich text value
1086
+ * @returns {RichTextValue} A new RichTextValue instance
1087
+ */
1088
+ static create(data: IDocumentData): RichTextValue;
1089
+ /**
1090
+ * Creates a new RichTextValue instance
1091
+ * @param {IDocumentBody} data The initial data for the rich text value
1092
+ * @returns {RichTextValue} A new RichTextValue instance
1093
+ */
1094
+ static createByBody(data: IDocumentBody): RichTextValue;
1095
+ constructor(data: IDocumentData);
1096
+ /**
1097
+ * Creates a copy of the current RichTextValue instance
1098
+ * @returns {RichTextValue} A new instance of RichTextValue with the same data
1099
+ */
1100
+ copy(): RichTextBuilder;
1101
+ /**
1102
+ * Slices the current RichTextValue instance
1103
+ * @param {number} start The start index
1104
+ * @param {number} end The end index
1105
+ * @returns {RichTextBuilder} A new instance of RichTextBuilder with the sliced data
1106
+ */
1107
+ slice(start: number, end: number): RichTextBuilder;
1108
+ /**
1109
+ * Converts the current RichTextValue instance to plain text
1110
+ * @returns {string} The plain text representation of the current RichTextValue instance
1111
+ */
1112
+ toPlainText(): string;
1113
+ /**
1114
+ * Gets the paragraph style of the current RichTextValue instance
1115
+ * @returns {ParagraphStyleValue} The paragraph style of the current RichTextValue instance
1116
+ */
1117
+ getParagraphStyle(): ParagraphStyleValue;
1118
+ /**
1119
+ * Gets the paragraph bullet of the current RichTextValue instance
1120
+ * @returns {ParagraphBulletValue} The paragraph bullet of the current RichTextValue instance
1121
+ */
1122
+ getParagraphBullet(): import('../..').IBullet | undefined;
1123
+ /**
1124
+ * Gets the paragraphs of the current RichTextValue instance
1125
+ * @returns {RichTextValue[]} The paragraphs of the current RichTextValue instance
1126
+ */
1127
+ getParagraphs(): RichTextValue[];
1128
+ /**
1129
+ * Gets the text runs of the current RichTextValue instance
1130
+ * @returns {TextRunValue[]} The text runs of the current RichTextValue instance
1131
+ */
1132
+ getTextRuns(): {
1133
+ ts: TextStyleValue | null;
1134
+ st: number;
1135
+ ed: number;
1136
+ sId?: string;
1137
+ }[];
1138
+ /**
1139
+ * Gets the links of the current RichTextValue instance
1140
+ * @returns {LinkValue[]} The links of the current RichTextValue instance
1141
+ */
1142
+ getLinks(): import('../..').ICustomRange<Record<string, any>>[];
1143
+ /**
1144
+ * Gets the data of the current RichTextValue instance
1145
+ * @returns {IDocumentData} The data of the current RichTextValue instance
1146
+ */
1147
+ getData(): IDocumentData;
1148
+ }
1149
+ /**
1150
+ * Represents a rich text builder
1151
+ */
1152
+ export declare class RichTextBuilder extends RichTextValue {
1153
+ static newEmptyData(): IDocumentData;
1154
+ /**
1155
+ * Creates a new RichTextBuilder instance
1156
+ * @param {IDocumentData} data The initial data for the rich text builder
1157
+ * @returns {RichTextBuilder} A new RichTextBuilder instance
1158
+ */
1159
+ static create(data?: IDocumentData): RichTextBuilder;
1160
+ private _doc;
1161
+ constructor(data: IDocumentData);
1162
+ /**
1163
+ * Inserts text into the rich text builder at the specified start position
1164
+ * @param start The start position of the text to insert
1165
+ * @param text The text to insert
1166
+ * @param style The style of the text to insert
1167
+ * @returns {RichTextBuilder} The current RichTextBuilder instance
1168
+ * @example
1169
+ * ```ts
1170
+ * const richText = RichTextValue.create({ body: { dataStream: 'Hello' } });
1171
+ * const newRichText = richText.insertText(0, 'World');
1172
+ * ```
1173
+ */
1174
+ insertText(start: string, style?: TextStyleBuilder | ITextStyle): RichTextBuilder;
1175
+ /**
1176
+ * Inserts text into the rich text builder at the specified start position
1177
+ * @param start The start position of the text to insert
1178
+ * @param text The text to insert
1179
+ * @param style The style of the text to insert
1180
+ * @returns {RichTextBuilder} The current RichTextBuilder instance
1181
+ * @example
1182
+ * ```ts
1183
+ * const richText = RichTextValue.create({ body: { dataStream: 'Hello' } });
1184
+ * const newRichText = richText.insertText(5, 'World', { ff: 'Arial', fs: 12 });
1185
+ * ```
1186
+ */
1187
+ insertText(start: number, text: string, style?: TextStyleBuilder | ITextStyle): RichTextBuilder;
1188
+ /**
1189
+ * Inserts rich text into the rich text builder at the specified start position
1190
+ * @param {RichTextValue} richText The rich text to insert
1191
+ * @returns {RichTextValue | IDocumentData} The current RichTextBuilder instance
1192
+ * @example
1193
+ * ```ts
1194
+ * const richText = RichTextValue.create({ body: { dataStream: 'Hello' } });
1195
+ * const newRichText = richText.insertRichText(RichTextValue.create({ body: { dataStream: 'World' } }));
1196
+ * ```
1197
+ */
1198
+ insertRichText(richText: RichTextValue | IDocumentData): RichTextBuilder;
1199
+ /**
1200
+ * Inserts rich text into the rich text builder at the specified start position
1201
+ * @param {number} start The start position of the text to insert
1202
+ * @param { RichTextValue | IDocumentData} richText The rich text to insert
1203
+ * @returns {RichTextValue | IDocumentData} The current RichTextBuilder instance
1204
+ * @example
1205
+ * ```ts
1206
+ * const richText = RichTextValue.create({ body: { dataStream: 'Hello' } });
1207
+ * const newRichText = richText.insertRichText(5, RichTextValue.create({ body: { dataStream: 'World' } }));
1208
+ * ```
1209
+ */
1210
+ insertRichText(start: number, richText: RichTextValue | IDocumentData): RichTextBuilder;
1211
+ /**
1212
+ * Deletes text from the rich text builder from the end.
1213
+ * @param {number} count The number of characters to delete (optional)
1214
+ * @returns {RichTextBuilder} The current RichTextBuilder instance
1215
+ * @example
1216
+ * ```ts
1217
+ * const richText = RichTextValue.create({ body: { dataStream: 'Hello World' } });
1218
+ * const newRichText = richText.delete(5);
1219
+ * ```
1220
+ */
1221
+ delete(count: number): RichTextBuilder;
1222
+ /**
1223
+ * Deletes text from the rich text builder at the specified start position
1224
+ * @param {number} start The start position of the text to delete
1225
+ * @param {number} [count] The number of characters to delete (optional)
1226
+ * @returns {RichTextBuilder} The current RichTextBuilder instance
1227
+ * @example
1228
+ * ```ts
1229
+ * const richText = RichTextValue.create({ body: { dataStream: 'Hello World' } });
1230
+ * const newRichText = richText.delete(5, 5);
1231
+ * ```
1232
+ */
1233
+ delete(start: number, count: number): RichTextBuilder;
1234
+ /**
1235
+ * Sets the style of the text at the specified start and end positions
1236
+ * @param {number} start The start position of the text to set the style
1237
+ * @param {number} end The end position of the text to set the style
1238
+ * @param {TextStyleBuilder | ITextStyle} style The style to set
1239
+ * @returns {RichTextBuilder} The current RichTextBuilder instance
1240
+ * @example
1241
+ * ```ts
1242
+ * const richText = RichTextValue.create({ body: { dataStream: 'Hello World' } });
1243
+ * const newRichText = richText.setStyle(5, 10, { ff: 'Arial', fs: 12 });
1244
+ * ```
1245
+ */
1246
+ setStyle(start: number, end: number, style: TextStyleBuilder | ITextStyle): RichTextBuilder;
1247
+ /**
1248
+ * Sets the link of the text at the specified start and end positions
1249
+ * @param {number} start The start position of the text to set the link
1250
+ * @param {number} end The end position of the text to set the link
1251
+ * @param {string} link The link to set
1252
+ * @returns {RichTextBuilder} The current RichTextBuilder instance
1253
+ * @example
1254
+ * ```ts
1255
+ * const richText = RichTextValue.create({ body: { dataStream: 'Hello World' } });
1256
+ * const newRichText = richText.setLink(5, 10, 'https://www.example.com');
1257
+ * ```
1258
+ */
1259
+ setLink(start: number, end: number, link: string): RichTextBuilder;
1260
+ /**
1261
+ * Cancels the link of the text at the specified start and end positions
1262
+ * @param {string} linkId The id of the link to cancel
1263
+ * @returns {RichTextBuilder} The current RichTextBuilder instance
1264
+ * @example
1265
+ * ```ts
1266
+ * const richText = RichTextValue.create({
1267
+ * body: {
1268
+ * dataStream: 'Hello World',
1269
+ * customRanges: [
1270
+ * {
1271
+ * rangeType: CustomRangeType.HYPERLINK,
1272
+ * rangeId: 'linkId',
1273
+ * properties: { url: 'https://www.example.com' },
1274
+ * startIndex: 0,
1275
+ * endIndex: 5
1276
+ * }]
1277
+ * }
1278
+ * });
1279
+ * const newRichText = richText.cancelLink('linkId');
1280
+ * ```
1281
+ */
1282
+ cancelLink(linkId: string): RichTextBuilder;
1283
+ /**
1284
+ * Cancels the link of the text at the specified start and end positions
1285
+ * @param {number} start The start position of the text to cancel the link
1286
+ * @param {number} end The end position of the text to cancel the link
1287
+ * @returns {RichTextBuilder} The current RichTextBuilder instance
1288
+ * @example
1289
+ * ```ts
1290
+ * const richText = RichTextValue.create({
1291
+ * body: {
1292
+ * dataStream: 'Hello World',
1293
+ * customRanges: [
1294
+ * {
1295
+ * rangeType: CustomRangeType.HYPERLINK,
1296
+ * rangeId: 'linkId',
1297
+ * properties: { url: 'https://www.example.com' },
1298
+ * startIndex: 0,
1299
+ * endIndex: 5
1300
+ * }]
1301
+ * }
1302
+ * });
1303
+ * const newRichText = richText.cancelLink(0, 10);
1304
+ * ```
1305
+ */
1306
+ cancelLink(start: number, end: number): RichTextBuilder;
1307
+ updateLink(id: string, url: string): RichTextBuilder;
1308
+ /**
1309
+ * Inserts a new paragraph at the specified start position
1310
+ * @param {number} start The start position of the paragraph to insert
1311
+ * @param {ParagraphStyleBuilder} paragraphStyle The style of the paragraph to insert
1312
+ * @returns {RichTextBuilder} The current RichTextBuilder instance
1313
+ * @example
1314
+ * ```ts
1315
+ * const richText = RichTextValue.create({ body: { dataStream: 'Hello World' } });
1316
+ * const newRichText = richText.insertParagraph();
1317
+ * ```
1318
+ */
1319
+ insertParagraph(paragraphStyle?: ParagraphStyleBuilder): RichTextBuilder;
1320
+ /**
1321
+ * Inserts a new paragraph at the specified start position
1322
+ * @param {number} start The start position of the paragraph to insert
1323
+ * @param {ParagraphStyleBuilder} paragraphStyle The style of the paragraph to insert
1324
+ * @returns {RichTextBuilder} The current RichTextBuilder instance
1325
+ * @example
1326
+ * ```ts
1327
+ * const richText = RichTextValue.create({ body: { dataStream: 'Hello World' } });
1328
+ * const newRichText = richText.insertParagraph(5, { ff: 'Arial', fs: 12 });
1329
+ * ```
1330
+ */
1331
+ insertParagraph(start: number, paragraphStyle: ParagraphStyleBuilder): RichTextBuilder;
1332
+ /**
1333
+ * Inserts a new link
1334
+ * @param text
1335
+ * @param url
1336
+ * @returns
1337
+ */
1338
+ insertLink(text: string, url: string): RichTextBuilder;
1339
+ insertLink(start: number, text: string, url: string): RichTextBuilder;
1340
+ }