@univerjs/core 1.3.1 → 1.5.0
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 +7 -5
- package/lib/cjs/facade.js +20 -35
- package/lib/cjs/index.js +448 -592
- package/lib/es/facade.js +20 -35
- package/lib/es/index.js +448 -593
- package/lib/facade.js +20 -35
- package/lib/index.js +448 -593
- package/lib/types/bases/typedef.d.ts +25 -25
- package/lib/types/common/interceptor.d.ts +6 -3
- package/lib/types/common/regexp/index.d.ts +4 -4
- package/lib/types/docs/data-model/paragraph-style.d.ts +5 -2
- package/lib/types/docs/data-model/preset-list-type.d.ts +8 -8
- package/lib/types/docs/data-model/rich-text-builder.d.ts +1 -1
- package/lib/types/docs/data-model/text-x/build-utils/custom-range.d.ts +1 -1
- package/lib/types/docs/data-model/text-x/build-utils/index.d.ts +15 -13
- package/lib/types/docs/data-model/text-x/utils.d.ts +20 -20
- package/lib/types/index.d.ts +1 -0
- package/lib/types/services/lifecycle/lifecycle.d.ts +4 -4
- package/lib/types/services/resource-loader/type.d.ts +2 -2
- package/lib/types/services/user-manager/user-manager.service.d.ts +2 -2
- package/lib/types/shared/common.d.ts +1 -0
- package/lib/types/shared/r-tree.d.ts +3 -1
- package/lib/types/shared/sort-rules.d.ts +2 -2
- package/lib/types/sheets/sheet-skeleton.d.ts +12 -4
- package/lib/types/sheets/typedef.d.ts +8 -3
- package/lib/types/types/enum/sheet-types.d.ts +2 -1
- package/lib/types/types/interfaces/i-document-data.d.ts +1 -5
- package/lib/types/types/interfaces/i-drawing.d.ts +3 -1
- package/lib/types/types/interfaces/index.d.ts +0 -3
- package/lib/types/univer.d.ts +1 -1
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +26 -26
- package/package.json +8 -8
- package/lib/types/slides/slide-data-model.d.ts +0 -27
- package/lib/types/types/enum/place-holder-type.d.ts +0 -34
- package/lib/types/types/interfaces/i-image-properties.d.ts +0 -34
- package/lib/types/types/interfaces/i-placeholder.d.ts +0 -21
- package/lib/types/types/interfaces/i-shape-properties.d.ts +0 -30
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Core runtime, data models, command system, dependency injection, and Facade APIs for Univer.",
|
|
6
6
|
"author": "DreamNum Co., Ltd. <developer@univer.ai>",
|
|
@@ -62,8 +62,8 @@
|
|
|
62
62
|
"rxjs": ">=7.0.0"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@univerjs/protocol": "1.
|
|
66
|
-
"@univerjs/themes": "1.
|
|
65
|
+
"@univerjs/protocol": "1.5.0",
|
|
66
|
+
"@univerjs/themes": "1.5.0",
|
|
67
67
|
"@wendellhu/redi": "1.1.3",
|
|
68
68
|
"async-lock": "^1.4.1",
|
|
69
69
|
"fast-diff": "1.3.0",
|
|
@@ -76,18 +76,18 @@
|
|
|
76
76
|
"@types/async-lock": "^1.4.2",
|
|
77
77
|
"@types/lodash-es": "^4.17.12",
|
|
78
78
|
"@types/rbush": "^4.0.0",
|
|
79
|
-
"@univerjs-infra/shared": "1.
|
|
79
|
+
"@univerjs-infra/shared": "1.5.0",
|
|
80
80
|
"rxjs": "7.8.2",
|
|
81
|
-
"
|
|
82
|
-
"vitest": "^5.0
|
|
81
|
+
"tsrs": "0.23.0-ts7.1.0-beta",
|
|
82
|
+
"vitest": "^5.1.0"
|
|
83
83
|
},
|
|
84
84
|
"scripts": {
|
|
85
85
|
"test": "vitest run",
|
|
86
86
|
"test:watch": "vitest",
|
|
87
87
|
"coverage": "vitest run --coverage",
|
|
88
|
-
"typecheck": "
|
|
88
|
+
"typecheck": "tsrs --noEmit",
|
|
89
89
|
"build:bundle": "univer-cli build",
|
|
90
|
-
"build:types": "
|
|
90
|
+
"build:types": "tsrs -p tsconfig.node.json",
|
|
91
91
|
"build": "pnpm run build:bundle && pnpm run build:types"
|
|
92
92
|
},
|
|
93
93
|
"module": "./lib/es/index.js"
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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 { Observable } from 'rxjs';
|
|
17
|
-
import { UnitModel } from '../common/unit';
|
|
18
|
-
export declare class SlideDataModel extends UnitModel {
|
|
19
|
-
type: number;
|
|
20
|
-
getUnitId(): string;
|
|
21
|
-
name$: Observable<string>;
|
|
22
|
-
setName(name: string): void;
|
|
23
|
-
getSnapshot(): object;
|
|
24
|
-
getRev(): number;
|
|
25
|
-
incrementRev(): void;
|
|
26
|
-
setRev(rev: number): void;
|
|
27
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
-
export declare enum PlaceholderType {
|
|
17
|
-
NONE = 0,//Default value, signifies it is not a placeholder.
|
|
18
|
-
BODY = 1,//Body text.
|
|
19
|
-
CHART = 2,//Chart or graph.
|
|
20
|
-
CLIP_ART = 3,//Clip art image.
|
|
21
|
-
CENTERED_TITLE = 4,//Title centered.
|
|
22
|
-
DIAGRAM = 5,//Diagram.
|
|
23
|
-
DATE_AND_TIME = 6,//Date and time.
|
|
24
|
-
FOOTER = 7,//Footer text.
|
|
25
|
-
HEADER = 8,//Header text.
|
|
26
|
-
MEDIA = 9,//Multimedia.
|
|
27
|
-
OBJECT = 10,//Any content type.
|
|
28
|
-
PICTURE = 11,//Picture.
|
|
29
|
-
SLIDE_NUMBER = 12,//Number of a slide.
|
|
30
|
-
SUBTITLE = 13,//Subtitle.
|
|
31
|
-
TABLE = 14,//Table.
|
|
32
|
-
TITLE = 15,//Slide title.
|
|
33
|
-
SLIDE_IMAGE = 16
|
|
34
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
-
export interface IImageProperties {
|
|
17
|
-
contentUrl: string;
|
|
18
|
-
sourceUrl?: string;
|
|
19
|
-
brightness?: number;
|
|
20
|
-
contrast?: number;
|
|
21
|
-
transparency?: number;
|
|
22
|
-
cropProperties?: ICropProperties;
|
|
23
|
-
angle?: number;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Properties of crop image
|
|
27
|
-
*/
|
|
28
|
-
export interface ICropProperties {
|
|
29
|
-
offsetLeft: number;
|
|
30
|
-
offsetRight: number;
|
|
31
|
-
offsetTop: number;
|
|
32
|
-
offsetBottom: number;
|
|
33
|
-
angle: number;
|
|
34
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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 { PlaceholderType } from '../enum/place-holder-type';
|
|
17
|
-
export interface IPlaceholder {
|
|
18
|
-
type: PlaceholderType;
|
|
19
|
-
index: number;
|
|
20
|
-
parentObjectId: string;
|
|
21
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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 { BorderStyleTypes } from '../enum/border-style-types';
|
|
17
|
-
import type { IColorStyle } from './i-style-data';
|
|
18
|
-
/**
|
|
19
|
-
* ShapeProperties
|
|
20
|
-
*/
|
|
21
|
-
export interface IShapeProperties {
|
|
22
|
-
shapeBackgroundFill: IColorStyle;
|
|
23
|
-
radius?: number;
|
|
24
|
-
outline?: IOutline;
|
|
25
|
-
}
|
|
26
|
-
export interface IOutline {
|
|
27
|
-
outlineFill: IColorStyle;
|
|
28
|
-
weight: number;
|
|
29
|
-
dashStyle?: BorderStyleTypes;
|
|
30
|
-
}
|