@univerjs/core 0.1.0-beta.1 → 0.1.0-beta.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.
Files changed (37) hide show
  1. package/{LICENSE.txt → LICENSE} +0 -2
  2. package/lib/cjs/index.js +5 -11
  3. package/lib/es/index.js +2070 -2478
  4. package/lib/types/common/function.d.ts +16 -0
  5. package/lib/types/docs/data-model/document-data-model.d.ts +5 -3
  6. package/lib/types/docs/data-model/mutation-types.d.ts +5 -5
  7. package/lib/types/docs/data-model/text-x/text-x.d.ts +27 -0
  8. package/lib/types/docs/data-model/types.d.ts +1 -1
  9. package/lib/types/index.d.ts +5 -3
  10. package/lib/types/services/{auth/auth.service.d.ts → command/__tests__/command.service.spec.d.ts} +1 -2
  11. package/lib/types/services/command/command.service.d.ts +13 -4
  12. package/lib/types/services/config/config.service.d.ts +2 -2
  13. package/lib/types/services/context/__tests__/context.service.spec.d.ts +16 -0
  14. package/lib/types/services/context/context.d.ts +3 -1
  15. package/lib/types/services/context/context.service.d.ts +9 -3
  16. package/lib/types/services/floating-object/floating-object-manager.service.d.ts +1 -1
  17. package/lib/types/services/lifecycle/__tests__/lifecycle.service.spec.d.ts +16 -0
  18. package/lib/types/services/lifecycle/lifecycle.service.d.ts +19 -1
  19. package/lib/types/services/locale/locale.service.d.ts +2 -2
  20. package/lib/types/services/log/log.service.d.ts +5 -1
  21. package/lib/types/shared/generate.d.ts +5 -5
  22. package/lib/types/shared/lifecycle.d.ts +1 -1
  23. package/lib/types/shared/object-matrix.d.ts +7 -3
  24. package/lib/types/sheets/__tests__/workbook.spec.d.ts +16 -0
  25. package/lib/types/sheets/column-manager.d.ts +13 -0
  26. package/lib/types/sheets/row-manager.d.ts +13 -0
  27. package/lib/types/sheets/workbook.d.ts +18 -0
  28. package/lib/types/sheets/worksheet.d.ts +10 -0
  29. package/lib/types/types/enum/text-style.d.ts +9 -15
  30. package/lib/types/types/interfaces/__tests__/i-cell-data.spec.d.ts +16 -0
  31. package/lib/types/types/interfaces/i-cell-data.d.ts +3 -2
  32. package/lib/types/types/interfaces/i-row-data.d.ts +1 -1
  33. package/lib/types/types/interfaces/i-style-data.d.ts +1 -0
  34. package/lib/umd/index.js +5 -11
  35. package/package.json +31 -28
  36. package/lib/types/sheets/reference.d.ts +0 -60
  37. /package/lib/types/{services/command/command.service.spec.d.ts → docs/data-model/text-x/__tests__/text-x.spec.d.ts} +0 -0
package/package.json CHANGED
@@ -1,15 +1,16 @@
1
1
  {
2
2
  "name": "@univerjs/core",
3
- "version": "0.1.0-beta.1",
3
+ "version": "0.1.0-beta.3",
4
+ "private": false,
4
5
  "description": "Core library for Univer.",
5
- "keywords": [],
6
6
  "author": "DreamNum <developer@univer.ai>",
7
- "main": "./lib/cjs/index.js",
8
- "module": "./lib/es/index.js",
9
- "types": "./lib/types/index.d.ts",
10
- "publishConfig": {
11
- "access": "public"
7
+ "license": "Apache-2.0",
8
+ "homepage": "https://github.com/dream-num/univer",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/dream-num/univer.git"
12
12
  },
13
+ "keywords": [],
13
14
  "exports": {
14
15
  ".": {
15
16
  "import": "./lib/es/index.js",
@@ -22,43 +23,45 @@
22
23
  "types": "./lib/types/index.d.ts"
23
24
  }
24
25
  },
25
- "directories": {
26
- "lib": "lib"
27
- },
26
+ "main": "./lib/cjs/index.js",
27
+ "module": "./lib/es/index.js",
28
+ "types": "./lib/types/index.d.ts",
28
29
  "files": [
29
30
  "lib"
30
31
  ],
31
- "private": false,
32
- "license": "Apache-2.0",
33
- "homepage": "https://github.com/dream-num/univer",
34
- "repository": {
35
- "type": "git",
36
- "url": "https://github.com/dream-num/univer.git"
32
+ "engines": {
33
+ "node": ">=16.0.0",
34
+ "npm": ">=8.0.0"
35
+ },
36
+ "publishConfig": {
37
+ "access": "public"
38
+ },
39
+ "directories": {
40
+ "lib": "lib"
41
+ },
42
+ "peerDependencies": {
43
+ "@wendellhu/redi": ">=0.12.13",
44
+ "rxjs": ">=7.0.0"
37
45
  },
38
46
  "dependencies": {
39
- "@wendellhu/redi": "^0.12.12",
40
47
  "dayjs": "^1.11.10",
41
48
  "nanoid": "5.0.4",
42
- "numeral": "^2.0.6",
43
- "rxjs": "^7.8.1"
49
+ "numeral": "^2.0.6"
44
50
  },
45
51
  "devDependencies": {
46
52
  "@types/numeral": "^2.0.5",
47
- "@vitest/coverage-istanbul": "^1.1.0",
53
+ "@wendellhu/redi": "^0.12.13",
54
+ "rxjs": "^7.8.1",
48
55
  "typescript": "^5.3.3",
49
- "vite": "^5.0.10",
50
- "vite-plugin-dts": "^3.6.4",
51
- "vite-plugin-externals": "^0.6.2",
52
- "vitest": "^1.1.0"
53
- },
54
- "peerDependencies": {
55
- "@wendellhu/redi": ">=0.12.12",
56
- "rxjs": ">=7.0.0"
56
+ "vite": "^5.0.12",
57
+ "vitest": "^1.2.1",
58
+ "@univerjs/shared": "0.1.0-beta.3"
57
59
  },
58
60
  "scripts": {
59
61
  "test": "vitest run",
60
62
  "test:watch": "vitest",
61
63
  "coverage": "vitest run --coverage",
64
+ "lint:types": "tsc --noEmit",
62
65
  "build": "tsc && vite build"
63
66
  }
64
67
  }
@@ -1,60 +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 { IRange } from '../types/interfaces/i-range';
17
- import { AbsoluteRefType } from '../types/interfaces/i-range';
18
- export interface IGridRangeName {
19
- unitId: string;
20
- sheetName: string;
21
- range: IRange;
22
- }
23
- /**
24
- *
25
- * @param singleRefString for example A1 or B10, not A1:B10
26
- */
27
- export declare function getAbsoluteRefTypeWithSingleString(singleRefString: string): AbsoluteRefType;
28
- /**
29
- *
30
- * @param refString for example A1:B10
31
- */
32
- export declare function getAbsoluteRefTypeWitString(refString: string): {
33
- startAbsoluteRefType: AbsoluteRefType;
34
- endAbsoluteRefType: AbsoluteRefType;
35
- } | {
36
- startAbsoluteRefType: AbsoluteRefType;
37
- endAbsoluteRefType?: undefined;
38
- };
39
- /**
40
- * Serialize an `IRange` into a string.
41
- * @param range The `IRange` to be serialized
42
- */
43
- export declare function serializeRange(range: IRange): string;
44
- /**
45
- * Serialize an `IRange` and a sheetID into a string.
46
- * @param sheetName
47
- * @param range
48
- * @returns
49
- */
50
- export declare function serializeRangeWithSheet(sheetName: string, range: IRange): string;
51
- /**
52
- * Serialize an `IRange` and a sheetID into a string.
53
- * @param unit unitId or unitName
54
- * @param sheetName
55
- * @param range
56
- * @returns
57
- */
58
- export declare function serializeRangeWithSpreadsheet(unit: string, sheetName: string, range: IRange): string;
59
- export declare function serializeRangeToRefString(gridRangeName: IGridRangeName): string;
60
- export declare function deserializeRangeWithSheet(refString: string): IGridRangeName;