@univerjs/core 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +10 -10
- package/lib/es/index.js +7361 -6969
- package/lib/types/docs/data-model/document-data-model.d.ts +3 -0
- package/lib/types/services/plugin/plugin.d.ts +1 -1
- package/lib/types/services/plugin/plugin.service.d.ts +1 -0
- package/lib/types/services/snapshot/snapshot-utils.d.ts +2 -2
- package/lib/types/slides/slide-model.d.ts +7 -0
- package/lib/types/types/enum/text-style.d.ts +3 -1
- package/lib/types/types/interfaces/i-document-data.d.ts +74 -12
- package/lib/umd/index.js +10 -10
- package/package.json +5 -5
|
@@ -41,7 +41,10 @@ export declare class DocumentDataModel extends DocumentDataModelSimple {
|
|
|
41
41
|
private _unitId;
|
|
42
42
|
headerModelMap: Map<string, DocumentDataModel>;
|
|
43
43
|
footerModelMap: Map<string, DocumentDataModel>;
|
|
44
|
+
private _name$;
|
|
45
|
+
readonly name$: import('rxjs').Observable<string>;
|
|
44
46
|
constructor(snapshot: Partial<IDocumentData>);
|
|
47
|
+
setName(name: string): void;
|
|
45
48
|
dispose(): void;
|
|
46
49
|
getDrawings(): IDrawings | undefined;
|
|
47
50
|
getDrawingsOrder(): string[] | undefined;
|
|
@@ -15,7 +15,7 @@ export declare abstract class Plugin extends Disposable {
|
|
|
15
15
|
static pluginName: string;
|
|
16
16
|
static type: UniverInstanceType;
|
|
17
17
|
protected abstract _injector: Injector;
|
|
18
|
-
onStarting(
|
|
18
|
+
onStarting(_injector?: Injector): void;
|
|
19
19
|
onReady(): void;
|
|
20
20
|
onRendered(): void;
|
|
21
21
|
onSteady(): void;
|
|
@@ -49,6 +49,7 @@ export declare class PluginHolder extends Disposable {
|
|
|
49
49
|
protected readonly _lifecycleInitializerService: LifecycleInitializerService;
|
|
50
50
|
protected _started: boolean;
|
|
51
51
|
get started(): boolean;
|
|
52
|
+
private _warnedAboutOnStartingDeprecation;
|
|
52
53
|
/** Plugin constructors waiting to be initialized. */
|
|
53
54
|
protected readonly _pluginRegistry: PluginRegistry;
|
|
54
55
|
/** Stores initialized plugin instances. */
|
|
@@ -13,8 +13,8 @@ export declare const textDecoder: TextDecoder;
|
|
|
13
13
|
export declare function encodeWorksheetOtherMetas(worksheet: Partial<IWorksheetData>): Uint8Array;
|
|
14
14
|
export declare function encodeWorkbookOtherMetas(workbook: IWorkbookData): Uint8Array;
|
|
15
15
|
export declare function encodeDocOriginalMeta(document: IDocumentData): Uint8Array;
|
|
16
|
-
export declare function decodeWorksheetOtherMetas(buffer: Uint8Array): Partial<IWorksheetData>;
|
|
17
|
-
export declare function decodeWorkbookOtherMetas(buffer: Uint8Array): Partial<IWorkbookData>;
|
|
16
|
+
export declare function decodeWorksheetOtherMetas(buffer: Uint8Array | string): Partial<IWorksheetData>;
|
|
17
|
+
export declare function decodeWorkbookOtherMetas(buffer: Uint8Array | string): Partial<IWorkbookData>;
|
|
18
18
|
export declare function decodePartOfCellData(buffer: Uint8Array | string): IObjectMatrixPrimitiveType<ICellData>;
|
|
19
19
|
export declare function decodeDocOriginalMeta(buffer: Uint8Array | string): Partial<IDocumentData>;
|
|
20
20
|
export declare function splitCellDataToBlocks(cellData: IObjectMatrixPrimitiveType<ICellData>, maxColumn: number): ISheetBlock[];
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { UnitModel, UniverInstanceType } from '../common/unit';
|
|
2
|
+
import { Nullable } from '../shared';
|
|
2
3
|
import { ISlideData, ISlidePage } from '../types/interfaces';
|
|
3
4
|
|
|
4
5
|
export declare class SlideDataModel extends UnitModel<ISlideData, UniverInstanceType.UNIVER_SLIDE> {
|
|
5
6
|
type: UniverInstanceType.UNIVER_SLIDE;
|
|
7
|
+
private readonly _activePage$;
|
|
8
|
+
private get _activePage();
|
|
9
|
+
readonly activePage$: import('rxjs').Observable<Nullable<ISlidePage>>;
|
|
6
10
|
private _snapshot;
|
|
7
11
|
private _unitId;
|
|
8
12
|
constructor(snapshot: Partial<ISlideData>);
|
|
@@ -20,4 +24,7 @@ export declare class SlideDataModel extends UnitModel<ISlideData, UniverInstance
|
|
|
20
24
|
getElement(pageId: string, elementId: string): import('../types/interfaces').IPageElement | undefined;
|
|
21
25
|
getPageSize(): import('../shared').ISize;
|
|
22
26
|
addPage(): ISlidePage;
|
|
27
|
+
setActivePage(page: Nullable<ISlidePage>): void;
|
|
28
|
+
getActivePage(): Nullable<ISlidePage>;
|
|
29
|
+
updatePage(pageId: string, page: ISlidePage): void;
|
|
23
30
|
}
|
|
@@ -49,7 +49,9 @@ export declare enum HorizontalAlign {
|
|
|
49
49
|
LEFT = 1,// The text is explicitly aligned to the left of the cell.
|
|
50
50
|
CENTER = 2,// The text is explicitly aligned to the center of the cell.
|
|
51
51
|
RIGHT = 3,// The text is explicitly aligned to the right of the cell.
|
|
52
|
-
JUSTIFIED = 4
|
|
52
|
+
JUSTIFIED = 4,// The paragraph is justified.
|
|
53
|
+
BOTH = 5,// The paragraph is justified.
|
|
54
|
+
DISTRIBUTED = 6
|
|
53
55
|
}
|
|
54
56
|
/**
|
|
55
57
|
* An enum that specifies the vertical alignment of text.
|
|
@@ -143,12 +143,13 @@ export interface IListData {
|
|
|
143
143
|
/**
|
|
144
144
|
* Contains properties describing the look and feel of a list bullet at a given level of nesting.
|
|
145
145
|
*/
|
|
146
|
-
export interface INestingLevel
|
|
146
|
+
export interface INestingLevel {
|
|
147
|
+
paragraphProperties?: IParagraphProperties;
|
|
147
148
|
bulletAlignment: BulletAlignment;
|
|
148
149
|
glyphFormat: string;
|
|
149
|
-
textStyle
|
|
150
|
+
textStyle?: ITextStyle;
|
|
150
151
|
startNumber: number;
|
|
151
|
-
glyphType?: GlyphType
|
|
152
|
+
glyphType?: GlyphType;
|
|
152
153
|
glyphSymbol?: string;
|
|
153
154
|
}
|
|
154
155
|
/**
|
|
@@ -163,14 +164,71 @@ export declare enum FollowNumberWithType {
|
|
|
163
164
|
* An enumeration of the supported glyph types.
|
|
164
165
|
*/
|
|
165
166
|
export declare enum GlyphType {
|
|
166
|
-
|
|
167
|
+
BULLET = 0,// The glyph type is unspecified or unsupported.
|
|
167
168
|
NONE = 1,// An empty string.
|
|
168
169
|
DECIMAL = 2,// A number, like 1, 2, or 3.
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
170
|
+
DECIMAL_ZERO = 3,// A number where single digit numbers are prefixed with a zero, like 01, 02, or 03. Numbers with more than one digit are not prefixed with a zero.
|
|
171
|
+
UPPER_LETTER = 4,// An uppercase letter, like A, B, or C.
|
|
172
|
+
LOWER_LETTER = 5,// A lowercase letter, like a, b, or c.
|
|
172
173
|
UPPER_ROMAN = 6,// An uppercase Roman numeral, like I, II, or III.
|
|
173
|
-
|
|
174
|
+
LOWER_ROMAN = 7,// A lowercase Roman numeral, like i, ii, or iii.
|
|
175
|
+
/**
|
|
176
|
+
* Not yet achieved, aligned with Excel's standards.
|
|
177
|
+
* 17.18.59 ST_NumberFormat (Numbering Format)
|
|
178
|
+
*/
|
|
179
|
+
ORDINAL = 8,
|
|
180
|
+
CARDINAL_TEXT = 9,
|
|
181
|
+
ORDINAL_TEXT = 10,
|
|
182
|
+
HEX = 11,
|
|
183
|
+
CHICAGO = 12,
|
|
184
|
+
IDEOGRAPH_DIGITAL = 13,
|
|
185
|
+
JAPANESE_COUNTING = 14,
|
|
186
|
+
AIUEO = 15,
|
|
187
|
+
IROHA = 16,
|
|
188
|
+
DECIMAL_FULL_WIDTH = 17,
|
|
189
|
+
DECIMAL_HALF_WIDTH = 18,
|
|
190
|
+
JAPANESE_LEGAL = 19,
|
|
191
|
+
JAPANESE_DIGITAL_TEN_THOUSAND = 20,
|
|
192
|
+
DECIMAL_ENCLOSED_CIRCLE = 21,
|
|
193
|
+
DECIMAL_FULL_WIDTH2 = 22,
|
|
194
|
+
AIUEO_FULL_WIDTH = 23,
|
|
195
|
+
IROHA_FULL_WIDTH = 24,
|
|
196
|
+
GANADA = 25,
|
|
197
|
+
CHOSUNG = 26,
|
|
198
|
+
DECIMAL_ENCLOSED_FULLSTOP = 27,
|
|
199
|
+
DECIMAL_ENCLOSED_PAREN = 28,
|
|
200
|
+
DECIMAL_ENCLOSED_CIRCLE_CHINESE = 29,
|
|
201
|
+
IDEOGRAPH_ENCLOSED_CIRCLE = 30,
|
|
202
|
+
IDEOGRAPH_TRADITIONAL = 31,
|
|
203
|
+
IDEOGRAPH_ZODIAC = 32,
|
|
204
|
+
IDEOGRAPH_ZODIAC_TRADITIONAL = 33,
|
|
205
|
+
TAIWANESE_COUNTING = 34,
|
|
206
|
+
IDEOGRAPH_LEGAL_TRADITIONAL = 35,
|
|
207
|
+
TAIWANESE_COUNTING_THOUSAND = 36,
|
|
208
|
+
TAIWANESE_DIGITAL = 37,
|
|
209
|
+
CHINESE_COUNTING = 38,
|
|
210
|
+
CHINESE_LEGAL_SIMPLIFIED = 39,
|
|
211
|
+
CHINESE_COUNTING_THOUSAND = 40,
|
|
212
|
+
KOREAN_DIGITAL = 41,
|
|
213
|
+
KOREAN_COUNTING = 42,
|
|
214
|
+
KOREAN_LEGAL = 43,
|
|
215
|
+
KOREAN_DIGITAL2 = 44,
|
|
216
|
+
VIETNAMESE_COUNTING = 45,
|
|
217
|
+
RUSSIAN_LOWER = 46,
|
|
218
|
+
RUSSIAN_UPPER = 47,
|
|
219
|
+
NUMBER_IN_DASH = 48,
|
|
220
|
+
HEBREW1 = 49,
|
|
221
|
+
HEBREW2 = 50,
|
|
222
|
+
ARABIC_ALPHA = 51,
|
|
223
|
+
ARABIC_ABJAD = 52,
|
|
224
|
+
HINDI_VOWELS = 53,
|
|
225
|
+
HINDI_CONSONANTS = 54,
|
|
226
|
+
HINDI_NUMBERS = 55,
|
|
227
|
+
HINDI_COUNTING = 56,
|
|
228
|
+
THAI_LETTERS = 57,
|
|
229
|
+
THAI_NUMBERS = 58,
|
|
230
|
+
THAI_COUNTING = 59,
|
|
231
|
+
CUSTOM = 60
|
|
174
232
|
}
|
|
175
233
|
/**
|
|
176
234
|
* The types of alignment for a bullet.
|
|
@@ -179,7 +237,8 @@ export declare enum BulletAlignment {
|
|
|
179
237
|
BULLET_ALIGNMENT_UNSPECIFIED = 0,// The bullet alignment is unspecified.
|
|
180
238
|
START = 1,// The bullet is aligned to the start of the space allotted for rendering the bullet. Left-aligned for LTR text, right-aligned otherwise.
|
|
181
239
|
CENTER = 2,// The bullet is aligned to the center of the space allotted for rendering the bullet.
|
|
182
|
-
END = 3
|
|
240
|
+
END = 3,// The bullet is aligned to the end of the space allotted for rendering the bullet. Right-aligned for LTR text, left-aligned otherwise.
|
|
241
|
+
BOTH = 4
|
|
183
242
|
}
|
|
184
243
|
export interface IMargin {
|
|
185
244
|
marginTop?: number;
|
|
@@ -393,7 +452,7 @@ export interface IBullet {
|
|
|
393
452
|
listType: string;
|
|
394
453
|
listId: string;
|
|
395
454
|
nestingLevel: number;
|
|
396
|
-
textStyle
|
|
455
|
+
textStyle?: ITextStyle;
|
|
397
456
|
}
|
|
398
457
|
/**
|
|
399
458
|
* Properties of Drawing
|
|
@@ -468,11 +527,15 @@ export interface IIndentStart {
|
|
|
468
527
|
hanging?: INumberUnit;
|
|
469
528
|
indentStart?: INumberUnit;
|
|
470
529
|
tabStops?: ITabStop[];
|
|
530
|
+
indentEnd?: INumberUnit;
|
|
471
531
|
}
|
|
472
532
|
/**
|
|
473
533
|
* Properties of paragraph style
|
|
474
534
|
*/
|
|
475
|
-
export interface IParagraphStyle extends
|
|
535
|
+
export interface IParagraphStyle extends IParagraphProperties {
|
|
536
|
+
textStyle?: ITextStyle;
|
|
537
|
+
}
|
|
538
|
+
export interface IParagraphProperties extends IIndentStart {
|
|
476
539
|
headingId?: string;
|
|
477
540
|
namedStyleType?: NamedStyleType;
|
|
478
541
|
horizontalAlign?: HorizontalAlign;
|
|
@@ -487,7 +550,6 @@ export interface IParagraphStyle extends IIndentStart {
|
|
|
487
550
|
borderBottom?: IParagraphBorder;
|
|
488
551
|
borderLeft?: IParagraphBorder;
|
|
489
552
|
borderRight?: IParagraphBorder;
|
|
490
|
-
indentEnd?: INumberUnit;
|
|
491
553
|
keepLines?: BooleanNumber;
|
|
492
554
|
keepNext?: BooleanNumber;
|
|
493
555
|
wordWrap?: BooleanNumber;
|