@univerjs/core 0.6.0 → 0.6.1
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/facade.js +1 -1
- package/lib/cjs/index.js +9 -9
- package/lib/es/facade.js +380 -105
- package/lib/es/index.js +2509 -2556
- package/lib/types/facade/f-blob.d.ts +18 -18
- package/lib/types/facade/f-enum.d.ts +166 -2
- package/lib/types/facade/f-event-registry.d.ts +4 -3
- package/lib/types/facade/f-event.d.ts +41 -14
- package/lib/types/facade/f-hooks.d.ts +8 -8
- package/lib/types/facade/f-univer.d.ts +67 -8
- package/lib/types/facade/f-util.d.ts +22 -0
- package/lib/types/index.d.ts +2 -3
- package/lib/types/services/plugin/plugin.service.d.ts +49 -38
- package/lib/types/shared/generate.d.ts +5 -0
- package/lib/types/shared/rectangle.d.ts +1 -1
- package/lib/types/univer.d.ts +2 -2
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +9 -9
- package/package.json +4 -4
- package/lib/types/services/plugin/plugin.d.ts +0 -46
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs/core",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Core library for Univer.",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -72,9 +72,9 @@
|
|
|
72
72
|
"@types/rbush": "^4.0.0",
|
|
73
73
|
"rxjs": "^7.8.1",
|
|
74
74
|
"typescript": "^5.7.3",
|
|
75
|
-
"vite": "^6.1.
|
|
76
|
-
"vitest": "^3.0.
|
|
77
|
-
"@univerjs-infra/shared": "0.6.
|
|
75
|
+
"vite": "^6.1.1",
|
|
76
|
+
"vitest": "^3.0.6",
|
|
77
|
+
"@univerjs-infra/shared": "0.6.1"
|
|
78
78
|
},
|
|
79
79
|
"scripts": {
|
|
80
80
|
"test": "vitest run",
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { Ctor, Injector } from '../../common/di';
|
|
2
|
-
import { UniverInstanceType } from '../../common/unit';
|
|
3
|
-
import { Disposable } from '../../shared';
|
|
4
|
-
export declare const DependentOnSymbol: unique symbol;
|
|
5
|
-
export type PluginCtor<T extends Plugin = Plugin> = Ctor<T> & {
|
|
6
|
-
type: UniverInstanceType;
|
|
7
|
-
pluginName: string;
|
|
8
|
-
[DependentOnSymbol]?: PluginCtor[];
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* Plug-in base class, all plug-ins must inherit from this base class. Provide basic methods.
|
|
12
|
-
*/
|
|
13
|
-
export declare abstract class Plugin extends Disposable {
|
|
14
|
-
static pluginName: string;
|
|
15
|
-
static type: UniverInstanceType;
|
|
16
|
-
protected abstract _injector: Injector;
|
|
17
|
-
onStarting(): void;
|
|
18
|
-
onReady(): void;
|
|
19
|
-
onRendered(): void;
|
|
20
|
-
onSteady(): void;
|
|
21
|
-
getUniverInstanceType(): UniverInstanceType;
|
|
22
|
-
getPluginName(): string;
|
|
23
|
-
}
|
|
24
|
-
interface IPluginRegistryItem {
|
|
25
|
-
plugin: PluginCtor<Plugin>;
|
|
26
|
-
options: any;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Store plugin instances.
|
|
30
|
-
*/
|
|
31
|
-
export declare class PluginStore {
|
|
32
|
-
private readonly _plugins;
|
|
33
|
-
addPlugin(plugin: Plugin): void;
|
|
34
|
-
removePlugins(): Plugin[];
|
|
35
|
-
forEachPlugin(callback: (plugin: Plugin) => void): void;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Store plugin registry items.
|
|
39
|
-
*/
|
|
40
|
-
export declare class PluginRegistry {
|
|
41
|
-
private _pluginsRegistered;
|
|
42
|
-
registerPlugin(pluginCtor: PluginCtor<any>, options: any): void;
|
|
43
|
-
getRegisterPlugins(): IPluginRegistryItem[];
|
|
44
|
-
removePlugins(): void;
|
|
45
|
-
}
|
|
46
|
-
export {};
|