@univerjs/core
Advanced tools
Comparing version 0.5.5-nightly.202501221606 to 0.5.5-nightly.202501231606
@@ -29,2 +29,5 @@ import { UniverInstanceType } from '../common/unit'; | ||
export declare class FEnum { | ||
/** | ||
* @ignore | ||
*/ | ||
static _instance: FEnum | null; | ||
@@ -31,0 +34,0 @@ static get(): FEnum; |
@@ -9,2 +9,3 @@ import { UniverInstanceType } from '../common/unit'; | ||
* @interface IEventBase | ||
* @ignore | ||
*/ | ||
@@ -69,2 +70,5 @@ export interface IEventBase { | ||
export declare class FEventName { | ||
/** | ||
* @ignore | ||
*/ | ||
static _instance: FEventName | null; | ||
@@ -83,4 +87,4 @@ static get(): FEventName; | ||
* univerAPI.addEvent(univerAPI.event.DocCreated, (params) => { | ||
* const { unitId, type, doc, unit } = params; | ||
* console.log('doc created', params); | ||
* const { unitId, type, doc, unit } = params; | ||
* console.log('doc created', params); | ||
* }); | ||
@@ -96,4 +100,4 @@ * ``` | ||
* univerAPI.addEvent(univerAPI.event.DocDisposed, (params) => { | ||
* const { unitId, unitType, snapshot } = params; | ||
* console.log('doc disposed', params); | ||
* const { unitId, unitType, snapshot } = params; | ||
* console.log('doc disposed', params); | ||
* }); | ||
@@ -109,4 +113,4 @@ * ``` | ||
* univerAPI.addEvent(univerAPI.event.LifeCycleChanged, (params) => { | ||
* const { stage } = params; | ||
* console.log('life cycle changed', params); | ||
* const { stage } = params; | ||
* console.log('life cycle changed', params); | ||
* }); | ||
@@ -122,4 +126,4 @@ * ``` | ||
* univerAPI.addEvent(univerAPI.event.Redo, (event) => { | ||
* const { params, id, type } = event; | ||
* console.log('command executed', event); | ||
* const { params, id, type } = event; | ||
* console.log('command executed', event); | ||
* }); | ||
@@ -135,4 +139,4 @@ * ``` | ||
* univerAPI.addEvent(univerAPI.event.Undo, (event) => { | ||
* const { params, id, type } = event; | ||
* console.log('command executed', event); | ||
* const { params, id, type } = event; | ||
* console.log('command executed', event); | ||
* }); | ||
@@ -148,4 +152,4 @@ * ``` | ||
* univerAPI.addEvent(univerAPI.event.BeforeRedo, (event) => { | ||
* const { params, id, type } = event; | ||
* console.log('command executed', event); | ||
* const { params, id, type } = event; | ||
* console.log('command executed', event); | ||
* }); | ||
@@ -161,4 +165,4 @@ * ``` | ||
* univerAPI.addEvent(univerAPI.event.BeforeUndo, (event) => { | ||
* const { params, id, type } = event; | ||
* console.log('command executed', event); | ||
* const { params, id, type } = event; | ||
* console.log('command executed', event); | ||
* }); | ||
@@ -174,4 +178,4 @@ * ``` | ||
* univerAPI.addEvent(univerAPI.event.CommandExecuted, (event) => { | ||
* const { params, id, type } = event; | ||
* console.log('command executed', event); | ||
* const { params, id, type } = event; | ||
* console.log('command executed', event); | ||
* }); | ||
@@ -187,4 +191,4 @@ * ``` | ||
* univerAPI.addEvent(univerAPI.event.BeforeCommandExecute, (event) => { | ||
* const { params, id, type } = event; | ||
* console.log('command executed', event); | ||
* const { params, id, type } = event; | ||
* console.log('command executed', event); | ||
* }); | ||
@@ -191,0 +195,0 @@ * ``` |
@@ -19,2 +19,5 @@ import { IDisposable, Injector } from '../common/di'; | ||
/** | ||
* The root Facade API object to interact with Univer. Please use `newAPI` static method | ||
* to create a new instance. | ||
* | ||
* @hideconstructor | ||
@@ -101,4 +104,4 @@ */ | ||
* Add an event listener | ||
* @param event key of event | ||
* @param callback callback when event triggered | ||
* @param {string} event key of event | ||
* @param {(params: IEventParamConfig[typeof event]) => void} callback callback when event triggered | ||
* @returns {Disposable} The Disposable instance, for remove the listener | ||
@@ -108,3 +111,3 @@ * @example | ||
* univerAPI.addEvent(univerAPI.event.UnitCreated, (params) => { | ||
* console.log('unit created', params); | ||
* console.log('unit created', params); | ||
* }); | ||
@@ -116,4 +119,4 @@ * ``` | ||
* Fire an event, used in internal only. | ||
* @param event {string} key of event | ||
* @param params {any} params of event | ||
* @param {string} event key of event | ||
* @param {any} params params of event | ||
* @returns {boolean} should cancel | ||
@@ -128,3 +131,3 @@ * @example | ||
* Get the callback map corresponding to the event | ||
* @param event | ||
* @param {keyof IEventParamConfig} event | ||
* @returns {number} The number of callbacks | ||
@@ -139,3 +142,3 @@ */ | ||
* ```ts | ||
* const blob = univerApi.newBlob(); | ||
* const blob = univerAPI.newBlob(); | ||
* ``` | ||
@@ -149,3 +152,3 @@ */ | ||
* ```ts | ||
* const color = univerApi.newColor(); | ||
* const color = univerAPI.newColor(); | ||
* ``` | ||
@@ -156,7 +159,7 @@ */ | ||
* Create a new rich text. | ||
* @param data | ||
* @param {IDocumentData} data | ||
* @returns {RichTextBuilder} The new rich text instance | ||
* @example | ||
* ```ts | ||
* const richText = univerApi.newRichText(); | ||
* const richText = univerAPI.newRichText(); | ||
* ``` | ||
@@ -167,7 +170,7 @@ */ | ||
* Create a new rich text value. | ||
* @param data - The rich text data | ||
* @param {IDocumentData} data - The rich text data | ||
* @returns {RichTextValue} The new rich text value instance | ||
* @example | ||
* ```ts | ||
* const richTextValue = univerApi.newRichTextValue(); | ||
* const richTextValue = univerAPI.newRichTextValue(); | ||
* ``` | ||
@@ -178,7 +181,7 @@ */ | ||
* Create a new paragraph style. | ||
* @param style - The paragraph style | ||
* @param {IParagraphStyle} style - The paragraph style | ||
* @returns {ParagraphStyleBuilder} The new paragraph style instance | ||
* @example | ||
* ```ts | ||
* const paragraphStyle = univerApi.newParagraphStyle(); | ||
* const paragraphStyle = univerAPI.newParagraphStyle(); | ||
* ``` | ||
@@ -189,7 +192,7 @@ */ | ||
* Create a new paragraph style value. | ||
* @param style - The paragraph style | ||
* @param {IParagraphStyle} style - The paragraph style | ||
* @returns {ParagraphStyleValue} The new paragraph style value instance | ||
* @example | ||
* ```ts | ||
* const paragraphStyleValue = univerApi.newParagraphStyleValue(); | ||
* const paragraphStyleValue = univerAPI.newParagraphStyleValue(); | ||
* ``` | ||
@@ -200,7 +203,7 @@ */ | ||
* Create a new text style. | ||
* @param style - The text style | ||
* @param {ITextStyle} style - The text style | ||
* @returns {TextStyleBuilder} The new text style instance | ||
* @example | ||
* ```ts | ||
* const textStyle = univerApi.newTextStyle(); | ||
* const textStyle = univerAPI.newTextStyle(); | ||
* ``` | ||
@@ -211,11 +214,20 @@ */ | ||
* Create a new text style value. | ||
* @param style - The text style | ||
* @param {ITextStyle} style - The text style | ||
* @returns {TextStyleValue} The new text style value instance | ||
* @example | ||
* ```ts | ||
* const textStyleValue = univerApi.newTextStyleValue(); | ||
* const textStyleValue = univerAPI.newTextStyleValue(); | ||
* ``` | ||
*/ | ||
newTextStyleValue(style?: ITextStyle): TextStyleValue; | ||
/** | ||
* Create a new text decoration. | ||
* @param {ITextDecoration} decoration - The text decoration | ||
* @returns {TextDecorationBuilder} The new text decoration instance | ||
* @example | ||
* ```ts | ||
* const decoration = univerAPI.newTextDecoration(); | ||
* ``` | ||
*/ | ||
newTextDecoration(decoration?: ITextDecoration): TextDecorationBuilder; | ||
} |
@@ -6,2 +6,5 @@ import { Rectangle, Tools } from '../shared'; | ||
export declare class FUtil { | ||
/** | ||
* @ignore | ||
*/ | ||
static _instance: FUtil | null; | ||
@@ -8,0 +11,0 @@ static get(): FUtil; |
@@ -15,2 +15,3 @@ import { Disposable } from '../../shared/lifecycle'; | ||
error(...args: ArgsType): void; | ||
deprecate(...args: ArgsType): void; | ||
setLogLevel(enabled: LogLevel): void; | ||
@@ -21,2 +22,3 @@ } | ||
private _logLevel; | ||
private _deduction; | ||
debug(...args: ArgsType): void; | ||
@@ -26,5 +28,7 @@ log(...args: ArgsType): void; | ||
error(...args: ArgsType): void; | ||
deprecate(...args: ArgsType): void; | ||
setLogLevel(logLevel: LogLevel): void; | ||
private _log; | ||
private _logWithDeduplication; | ||
} | ||
export {}; |
{ | ||
"name": "@univerjs/core", | ||
"version": "0.5.5-nightly.202501221606", | ||
"version": "0.5.5-nightly.202501231606", | ||
"private": false, | ||
@@ -52,3 +52,3 @@ "description": "Core library for Univer.", | ||
"dependencies": { | ||
"@univerjs/protocol": "0.1.40", | ||
"@univerjs/protocol": "0.1.43", | ||
"@wendellhu/redi": "0.17.0", | ||
@@ -70,3 +70,3 @@ "dayjs": "^1.11.13", | ||
"rxjs": "^7.8.1", | ||
"typescript": "^5.7.2", | ||
"typescript": "^5.7.3", | ||
"vite": "^6.0.7", | ||
@@ -73,0 +73,0 @@ "vitest": "^2.1.8", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
2560637
195
36217
+ Added@univerjs/protocol@0.1.43(transitive)
- Removed@univerjs/protocol@0.1.40(transitive)
Updated@univerjs/protocol@0.1.43