@univerjs/core 0.9.4 → 0.10.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/lib/cjs/index.js +8 -8
- package/lib/es/index.js +11139 -11128
- package/lib/index.js +11139 -11128
- package/lib/types/common/lodash.d.ts +16 -0
- package/lib/types/common/unit.d.ts +1 -1
- package/lib/types/index.d.ts +1 -1
- package/lib/types/shared/locale.d.ts +9 -0
- package/lib/types/univer.d.ts +7 -0
- package/lib/umd/index.js +8 -8
- package/package.json +4 -4
|
@@ -0,0 +1,16 @@
|
|
|
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 { debounce, get, merge, mergeWith, set } from 'lodash-es';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UniverType } from '@univerjs/protocol';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { Disposable } from '../shared';
|
|
3
|
+
import { Disposable } from '../shared/lifecycle';
|
|
4
4
|
export { UniverType as UniverInstanceType } from '@univerjs/protocol';
|
|
5
5
|
export type UnitType = UniverType | number;
|
|
6
6
|
/**
|
package/lib/types/index.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export { invertColorByHSL } from './common/invert-color/invert-hsl';
|
|
|
27
27
|
export { invertColorByMatrix } from './common/invert-color/invert-rgb';
|
|
28
28
|
export type { RGBColorType } from './common/invert-color/utils';
|
|
29
29
|
export type { Serializable } from './common/json';
|
|
30
|
+
export * from './common/lodash';
|
|
30
31
|
export { MemoryCursor } from './common/memory-cursor';
|
|
31
32
|
export { mixinClass } from './common/mixin';
|
|
32
33
|
export { isNumeric, isSafeNumeric, willLoseNumericPrecision } from './common/number';
|
|
@@ -123,4 +124,3 @@ export * from './types/interfaces';
|
|
|
123
124
|
export type { ICellCustomRender, ICellRenderContext } from './types/interfaces/i-cell-custom-render';
|
|
124
125
|
export type { IDataValidationRule, IDataValidationRuleBase, IDataValidationRuleInfo, IDataValidationRuleOptions, ISheetDataValidationRule } from './types/interfaces/i-data-validation';
|
|
125
126
|
export { type IUniverConfig, Univer } from './univer';
|
|
126
|
-
export { debounce, get, merge, mergeWith, set } from 'lodash-es';
|
|
@@ -20,3 +20,12 @@ export interface ILanguagePack {
|
|
|
20
20
|
export interface ILocales {
|
|
21
21
|
[key: string]: ILanguagePack;
|
|
22
22
|
}
|
|
23
|
+
type MergeLocalesInput = Record<string, any>;
|
|
24
|
+
/**
|
|
25
|
+
* Merges multiple locale objects into a single locale object.
|
|
26
|
+
* It can accept either multiple locale objects as arguments or a single array of locale objects.
|
|
27
|
+
* @param locales - An array of locale objects or multiple locale objects.
|
|
28
|
+
* @returns A merged locale object containing all key-value pairs from the input locales.
|
|
29
|
+
*/
|
|
30
|
+
export declare function mergeLocales(...locales: (MergeLocalesInput | MergeLocalesInput[])[]): MergeLocalesInput;
|
|
31
|
+
export {};
|
package/lib/types/univer.d.ts
CHANGED
|
@@ -87,4 +87,11 @@ export declare class Univer implements IDisposable {
|
|
|
87
87
|
private _tryProgressToReady;
|
|
88
88
|
/** Register a plugin into univer. */
|
|
89
89
|
registerPlugin<T extends PluginCtor<Plugin>>(plugin: T, config?: ConstructorParameters<T>[0]): void;
|
|
90
|
+
/**
|
|
91
|
+
* Register multiple plugins into univer.
|
|
92
|
+
* @param plugins An array of tuples, where each tuple contains a plugin constructor and its optional configuration.
|
|
93
|
+
*/
|
|
94
|
+
registerPlugins<T extends readonly (readonly [PluginCtor<Plugin>] | readonly [PluginCtor<Plugin>, unknown])[]>(plugins: {
|
|
95
|
+
readonly [K in keyof T]: T[K] extends readonly [infer P] ? P extends PluginCtor<Plugin> ? readonly [P] : T[K] : T[K] extends readonly [infer P, unknown] ? P extends PluginCtor<Plugin> ? readonly [P, ConstructorParameters<P>[0]?] : T[K] : T[K];
|
|
96
|
+
}): void;
|
|
90
97
|
}
|