@univerjs/core 0.1.16 → 0.2.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.
Files changed (43) hide show
  1. package/lib/cjs/index.js +8 -8
  2. package/lib/es/index.js +2541 -2500
  3. package/lib/types/common/array.d.ts +1 -0
  4. package/lib/types/common/const.d.ts +2 -2
  5. package/lib/types/common/interceptor.d.ts +1 -1
  6. package/lib/types/{observer/index.d.ts → common/url.d.ts} +1 -2
  7. package/lib/types/docs/data-model/document-data-model.d.ts +3 -3
  8. package/lib/types/docs/data-model/json-x/json-x.d.ts +1 -1
  9. package/lib/types/docs/data-model/text-x/apply-utils/common.d.ts +4 -1
  10. package/lib/types/docs/data-model/text-x/utils.d.ts +13 -1
  11. package/lib/types/docs/data-model/types.d.ts +2 -2
  12. package/lib/types/index.d.ts +7 -2
  13. package/lib/types/observer/observable.d.ts +21 -125
  14. package/lib/types/services/__tests__/index.d.ts +18 -0
  15. package/lib/types/services/command/command.service.d.ts +1 -0
  16. package/lib/types/services/instance/instance.service.d.ts +1 -1
  17. package/lib/types/services/resource-loader/resource-loader.service.d.ts +2 -0
  18. package/lib/types/services/resource-loader/type.d.ts +3 -0
  19. package/lib/types/services/resource-manager/resource-manager.service.d.ts +5 -0
  20. package/lib/types/services/resource-manager/type.d.ts +1 -0
  21. package/lib/types/services/undoredo/undoredo.service.d.ts +1 -1
  22. package/lib/types/services/user-manager/user-manager.service.d.ts +2 -2
  23. package/lib/types/shared/__tests__/name.spec.d.ts +16 -0
  24. package/lib/types/shared/common.d.ts +2 -7
  25. package/lib/types/shared/lifecycle.d.ts +1 -4
  26. package/lib/types/shared/name.d.ts +26 -0
  27. package/lib/types/shared/rxjs.d.ts +9 -0
  28. package/lib/types/shared/tools.d.ts +2 -0
  29. package/lib/types/sheets/__tests__/create-core-test-bed.d.ts +6 -6
  30. package/lib/types/sheets/range.d.ts +1 -5
  31. package/lib/types/sheets/workbook.d.ts +1 -0
  32. package/lib/types/types/const/clipboard.d.ts +16 -0
  33. package/lib/types/types/interfaces/i-cell-custom-render.d.ts +3 -3
  34. package/lib/types/types/interfaces/i-cell-data.d.ts +1 -1
  35. package/lib/types/types/interfaces/i-document-data.d.ts +24 -1
  36. package/lib/types/types/interfaces/i-selection-data.d.ts +7 -2
  37. package/lib/types/types/interfaces/i-style-data.d.ts +4 -0
  38. package/lib/umd/index.js +8 -8
  39. package/package.json +7 -7
  40. package/lib/types/observer/observable-hooks.d.ts +0 -18
  41. package/lib/types/services/__test__/index.d.ts +0 -18
  42. package/lib/types/shared/props-from.d.ts +0 -6
  43. /package/lib/types/services/{__test__ → __tests__}/permission.spec.d.ts +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs/core",
3
- "version": "0.1.16",
3
+ "version": "0.2.0",
4
4
  "private": false,
5
5
  "description": "Core library for Univer.",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -46,23 +46,23 @@
46
46
  "lib"
47
47
  ],
48
48
  "peerDependencies": {
49
- "@wendellhu/redi": "0.15.4",
49
+ "@wendellhu/redi": "0.15.5",
50
50
  "rxjs": ">=7.0.0"
51
51
  },
52
52
  "dependencies": {
53
- "@univerjs/protocol": "0.1.38-alpha.6",
53
+ "@univerjs/protocol": "0.1.38-alpha.11",
54
54
  "nanoid": "5.0.7",
55
55
  "numeral": "^2.0.6",
56
56
  "ot-json1": "^1.0.2"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@types/numeral": "^2.0.5",
60
- "@wendellhu/redi": "0.15.4",
60
+ "@wendellhu/redi": "0.15.5",
61
61
  "rxjs": "^7.8.1",
62
- "typescript": "^5.4.5",
63
- "vite": "^5.3.1",
62
+ "typescript": "^5.5.3",
63
+ "vite": "^5.3.3",
64
64
  "vitest": "^1.6.0",
65
- "@univerjs/shared": "0.1.16"
65
+ "@univerjs/shared": "0.2.0"
66
66
  },
67
67
  "univerSpace": {
68
68
  ".": {
@@ -1,18 +0,0 @@
1
- import { Nullable } from '../shared/types';
2
- import { EventState, Observable, Observer } from './observable';
3
-
4
- /**
5
- * Observable Hooks
6
- */
7
- export declare class ObservableHooks<T> extends Observable<T> {
8
- /**
9
- * Create a new WorkBookObserver with the specified callback
10
- * @param callback the callback that will be executed for that WorkBookObserver
11
- * @param insertFirst if true the callback will be inserted at the first position, hence executed before the others ones. If false (default behavior) the callback will be inserted at the last position, executed after all the others already present.
12
- * @param unregisterOnFirstCall defines if the observer as to be unregistered after the next notification
13
- * @returns the new observer created for the callback
14
- */
15
- add(callback: (eventData: T, eventState: EventState) => void): Nullable<Observer<T>>;
16
- makeObserverTopPriority(): void;
17
- makeObserverBottomPriority(): void;
18
- }
@@ -1,18 +0,0 @@
1
- import { ICommandService, Univer } from '@univerjs/core';
2
- import { Dependency } from '@wendellhu/redi';
3
-
4
- export declare const createTestBed: (dependencies?: Dependency[]) => {
5
- univer: Univer;
6
- get: {
7
- <T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, lookUp?: import('@wendellhu/redi').LookUp | undefined): T;
8
- <T_1>(id: import('@wendellhu/redi').DependencyIdentifier<T_1>, quantity: import("@wendellhu/redi").Quantity.MANY, lookUp?: import('@wendellhu/redi').LookUp | undefined): T_1[];
9
- <T_2>(id: import('@wendellhu/redi').DependencyIdentifier<T_2>, quantity: import("@wendellhu/redi").Quantity.OPTIONAL, lookUp?: import('@wendellhu/redi').LookUp | undefined): T_2 | null;
10
- <T_3>(id: import('@wendellhu/redi').DependencyIdentifier<T_3>, quantity: import("@wendellhu/redi").Quantity.REQUIRED, lookUp?: import('@wendellhu/redi').LookUp | undefined): T_3;
11
- <T_4>(id: import('@wendellhu/redi').DependencyIdentifier<T_4>, quantity?: import('@wendellhu/redi').Quantity | undefined, lookUp?: import('@wendellhu/redi').LookUp | undefined): T_4 | T_4[] | null;
12
- <T_5>(id: import('@wendellhu/redi').DependencyIdentifier<T_5>, quantityOrLookup?: import('@wendellhu/redi').Quantity | import('@wendellhu/redi').LookUp | undefined, lookUp?: import('@wendellhu/redi').LookUp | undefined): T_5 | T_5[] | null;
13
- };
14
- workbook: import('@univerjs/core').Workbook;
15
- unitId: string;
16
- subUnitId: string;
17
- commandService: ICommandService;
18
- };
@@ -1,6 +0,0 @@
1
- import { Observable } from '../observer';
2
-
3
- /**
4
- * Get the type of the generic type of T
5
- */
6
- export type PropsFrom<T> = T extends Observable<infer Props> ? Props : void;