@univerjs/core 0.1.0-alpha.2 → 0.1.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 +1 -1
- package/lib/cjs/index.js +5 -5
- package/lib/es/index.js +2668 -2584
- package/lib/types/basics/plugin-holder.d.ts +30 -0
- package/lib/types/basics/univer-doc.d.ts +7 -11
- package/lib/types/basics/univer-sheet.d.ts +7 -21
- package/lib/types/basics/univer-slide.d.ts +6 -19
- package/lib/types/basics/univer.d.ts +18 -13
- package/lib/types/common/memory-cursor.d.ts +1 -0
- package/lib/types/common/shims.d.ts +16 -0
- package/lib/types/docs/data-model/index.d.ts +1 -0
- package/lib/types/docs/data-model/preset-list-type.d.ts +50 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/plugin/plugin.d.ts +4 -3
- package/lib/types/services/command/command.service.d.ts +3 -3
- package/lib/types/services/log/log.service.d.ts +8 -6
- package/lib/types/shared/color/color-kit.d.ts +64 -0
- package/lib/types/shared/color/color.d.ts +17 -3
- package/lib/types/shared/common.d.ts +1 -3
- package/lib/types/shared/index.d.ts +1 -2
- package/lib/types/shared/locale.d.ts +1 -4
- package/lib/types/shared/object-matrix.d.ts +29 -28
- package/lib/types/shared/rectangle.d.ts +1 -0
- package/lib/types/shared/sort-rules.d.ts +2 -2
- package/lib/types/shared/tools.d.ts +0 -5
- package/lib/types/sheets/column-manager.d.ts +7 -8
- package/lib/types/sheets/range.d.ts +4 -4
- package/lib/types/sheets/row-manager.d.ts +7 -7
- package/lib/types/sheets/styles.d.ts +4 -6
- package/lib/types/sheets/workbook.d.ts +5 -3
- package/lib/types/sheets/worksheet.d.ts +1 -1
- package/lib/types/types/enum/text-style.d.ts +3 -3
- package/lib/types/types/interfaces/i-document-data.d.ts +3 -2
- package/lib/types/types/interfaces/i-range.d.ts +13 -11
- package/lib/types/types/interfaces/i-worksheet-data.d.ts +4 -5
- package/lib/umd/index.js +5 -5
- package/package.json +4 -4
- package/lib/types/shared/color/color-builder.d.ts +0 -35
- package/lib/types/shared/object-array.d.ts +0 -110
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs/core",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.3",
|
|
4
4
|
"description": "Core library for Univer.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -42,14 +42,14 @@
|
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/numeral": "^2.0.5",
|
|
45
|
-
"@vitest/coverage-istanbul": "^1.0.
|
|
45
|
+
"@vitest/coverage-istanbul": "^1.0.4",
|
|
46
46
|
"@wendellhu/redi": "^0.12.12",
|
|
47
47
|
"rxjs": "^7.8.1",
|
|
48
48
|
"typescript": "^5.3.3",
|
|
49
|
-
"vite": "^5.0.
|
|
49
|
+
"vite": "^5.0.8",
|
|
50
50
|
"vite-plugin-dts": "^3.6.4",
|
|
51
51
|
"vite-plugin-externals": "^0.6.2",
|
|
52
|
-
"vitest": "^1.0.
|
|
52
|
+
"vitest": "^1.0.4"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"@wendellhu/redi": ">=0.12.12",
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2023-present DreamNum Inc.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { Nullable } from '../../common/type-utils';
|
|
17
|
-
import { ColorType, ThemeColors, ThemeColorType } from '../../types/enum';
|
|
18
|
-
import type { Color } from './color';
|
|
19
|
-
import { RgbColor, ThemeColor } from './color';
|
|
20
|
-
export declare class ColorBuilder {
|
|
21
|
-
private _themeValue;
|
|
22
|
-
private _themeColors;
|
|
23
|
-
private _themeTint;
|
|
24
|
-
private _rgbValue;
|
|
25
|
-
private _colorType;
|
|
26
|
-
constructor();
|
|
27
|
-
asRgbColor(): RgbColor;
|
|
28
|
-
asThemeColor(): ThemeColor;
|
|
29
|
-
build(): Nullable<Color>;
|
|
30
|
-
setRgbColor(cssString: string): ColorBuilder;
|
|
31
|
-
setThemeColors(value: ThemeColors): void;
|
|
32
|
-
setThemeTint(value: number): void;
|
|
33
|
-
setThemeColor(theme: ThemeColorType): ColorBuilder;
|
|
34
|
-
getColorType(): ColorType;
|
|
35
|
-
}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2023-present DreamNum Inc.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { Nullable } from './types';
|
|
17
|
-
/**
|
|
18
|
-
* Predicate Function type
|
|
19
|
-
*/
|
|
20
|
-
export type PredicateFunction<T> = (index: number, value: T) => Nullable<boolean>;
|
|
21
|
-
/**
|
|
22
|
-
* Function type
|
|
23
|
-
*/
|
|
24
|
-
export type Function<T, S> = (value: Nullable<T>) => S;
|
|
25
|
-
/**
|
|
26
|
-
* Unary Operator Function type
|
|
27
|
-
*/
|
|
28
|
-
export type UnaryOperatorFunction<T> = (value: T) => T;
|
|
29
|
-
/**
|
|
30
|
-
* Object Array Primitive Type
|
|
31
|
-
*/
|
|
32
|
-
export interface ObjectArrayPrimitiveType<T> {
|
|
33
|
-
[key: number]: T;
|
|
34
|
-
length?: number;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Object Array Type
|
|
38
|
-
* @deprecated
|
|
39
|
-
*/
|
|
40
|
-
export type ObjectArrayType<T> = ObjectArray<T> | ObjectArrayPrimitiveType<T>;
|
|
41
|
-
/**
|
|
42
|
-
* Arrays in object form and provide an array-like API
|
|
43
|
-
* @beta
|
|
44
|
-
*/
|
|
45
|
-
export declare class ObjectArray<T> {
|
|
46
|
-
private _objectArray;
|
|
47
|
-
private _length;
|
|
48
|
-
constructor();
|
|
49
|
-
constructor(array: ObjectArrayPrimitiveType<T>);
|
|
50
|
-
constructor(size: number);
|
|
51
|
-
constructor(array: ObjectArrayPrimitiveType<T>, size: number);
|
|
52
|
-
static objectKeys<T>(array: Nullable<ObjectArrayPrimitiveType<T>>): string[];
|
|
53
|
-
static getMaxLength<T>(array: Nullable<ObjectArrayPrimitiveType<T>>): number;
|
|
54
|
-
obtain(index: number, defaultValue: T): T;
|
|
55
|
-
getKeys(): string[];
|
|
56
|
-
get(index: number): Nullable<T>;
|
|
57
|
-
set(index: number, value: T): void;
|
|
58
|
-
pop(): Nullable<T>;
|
|
59
|
-
push(value: T): void;
|
|
60
|
-
first(): Nullable<T>;
|
|
61
|
-
last(): Nullable<T>;
|
|
62
|
-
shift(): Nullable<T>;
|
|
63
|
-
unshift(topValue: T): void;
|
|
64
|
-
clear(): void;
|
|
65
|
-
getLength(): number;
|
|
66
|
-
getSizeOf(): number;
|
|
67
|
-
toJSON(): ObjectArrayPrimitiveType<T>;
|
|
68
|
-
toArray(): T[];
|
|
69
|
-
forEach(callback: PredicateFunction<T>): ObjectArray<T>;
|
|
70
|
-
clone(callback: Nullable<UnaryOperatorFunction<T>>): ObjectArray<T>;
|
|
71
|
-
isEmpty(): boolean;
|
|
72
|
-
/**
|
|
73
|
-
* @deprecated use `realDelete` or `splice`
|
|
74
|
-
* @param index
|
|
75
|
-
*/
|
|
76
|
-
delete(index: number): void;
|
|
77
|
-
realDelete(index: number): void;
|
|
78
|
-
includes(target: T): boolean;
|
|
79
|
-
slice(start: number, end: number): ObjectArray<T>;
|
|
80
|
-
concat(target: ObjectArray<T>): ObjectArray<T>;
|
|
81
|
-
find(callback: PredicateFunction<T>): Nullable<T>;
|
|
82
|
-
splice(start: number, count: number): ObjectArray<T>;
|
|
83
|
-
findIndex(callback: PredicateFunction<T>): number;
|
|
84
|
-
map<S>(callback: Function<T, S>): ObjectArray<S>;
|
|
85
|
-
filter(callback: PredicateFunction<T>): ObjectArray<T>;
|
|
86
|
-
insert(index: number, value: T): this;
|
|
87
|
-
/**
|
|
88
|
-
* Move some items some to another position
|
|
89
|
-
* @param fromIndex index to move from, fromIndex is not necessary lesser than toIndex
|
|
90
|
-
* @param count numbers of items to move
|
|
91
|
-
* @param toIndex index moving to
|
|
92
|
-
* @returns this
|
|
93
|
-
*/
|
|
94
|
-
move(fromIndex: number, count: number, toIndex: number): this;
|
|
95
|
-
private _moveBackward;
|
|
96
|
-
private _moveForward;
|
|
97
|
-
inserts(index: number, target: ObjectArray<T>): ObjectArray<T>;
|
|
98
|
-
[Symbol.iterator](): IterableIterator<T>;
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Iterator with ObjectArray
|
|
102
|
-
*/
|
|
103
|
-
export declare class ObjectArrayIterableIterator<T> implements IterableIterator<T> {
|
|
104
|
-
private _array;
|
|
105
|
-
private _keys;
|
|
106
|
-
private _cursor;
|
|
107
|
-
constructor(objectArray: ObjectArray<T>);
|
|
108
|
-
next(): IteratorResult<T, null>;
|
|
109
|
-
[Symbol.iterator](): IterableIterator<T>;
|
|
110
|
-
}
|