Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
feat: export types for facade api (#4126)
白熱0d07c86d7daf
diff --git a/packages/docs-ui/src/facade/f-univer.ts b/packages/docs-ui/src/facade/f-univer.tsindex d2c328bdab..7cc5bacff3 100644--- a/packages/docs-ui/src/facade/f-univer.ts+++ b/packages/docs-ui/src/facade/f-univer.ts@@ -18,7 +18,7 @@ import type { DocumentDataModel, IDocumentData } from '@univerjs/core';import { FUniver, UniverInstanceType } from '@univerjs/core';import { FDocument } from './f-document';-interface IFUniverDocsUIMixin {+export interface IFUniverDocsUIMixin {/*** Create a new document and get the API handler of that document.*diff --git a/packages/docs-ui/src/facade/index.ts b/packages/docs-ui/src/facade/index.tsindex ebb5050f51..7579cea3d8 100644--- a/packages/docs-ui/src/facade/index.ts+++ b/packages/docs-ui/src/facade/index.ts@@ -17,3 +17,5 @@import './f-univer';export { FDocument } from './f-document';++export type * from './f-univer';diff --git a/packages/engine-formula/src/facade/f-univer.ts b/packages/engine-formula/src/facade/f-univer.tsindex 3233275bb5..924bc4d30c 100644--- a/packages/engine-formula/src/facade/f-univer.ts+++ b/packages/engine-formula/src/facade/f-univer.ts@@ -17,11 +17,11 @@import { FUniver } from '@univerjs/core';import { FFormula } from './f-formula';-interface IFUniverEngineFormulaMixin {+export interface IFUniverEngineFormulaMixin {getFormula(): FFormula;}-class FUniverEngineFormulaMixin extends FUniver implements IFUniverEngineFormulaMixin {+export class FUniverEngineFormulaMixin extends FUniver implements IFUniverEngineFormulaMixin {override getFormula(): FFormula {return this._injector.createInstance(FFormula);}diff --git a/packages/engine-formula/src/facade/index.ts b/packages/engine-formula/src/facade/index.tsindex 2d6d1dc0ab..2badd09d3d 100644--- a/packages/engine-formula/src/facade/index.ts+++ b/packages/engine-formula/src/facade/index.ts@@ -17,3 +17,5 @@import './f-univer';export { FFormula } from './f-formula';++export type * from './f-univer';diff --git a/packages/sheets-crosshair-highlight/src/facade/f-univer.ts b/packages/sheets-crosshair-highlight/src/facade/f-univer.tsindex 3f8c17c2fa..8a1f6bc08b 100644--- a/packages/sheets-crosshair-highlight/src/facade/f-univer.ts+++ b/packages/sheets-crosshair-highlight/src/facade/f-univer.ts@@ -18,7 +18,7 @@ import type { ISetCrosshairHighlightColorOperationParams } from '@univerjs/sheetimport { FUniver } from '@univerjs/core';import { DisableCrosshairHighlightOperation, EnableCrosshairHighlightOperation, SetCrosshairHighlightColorOperation } from '@univerjs/sheets-crosshair-highlight';-interface IFUniverCrosshairHighlightMixin {+export interface IFUniverCrosshairHighlightMixin {/*** Enable or disable crosshair highlight.* @param {boolean} enabled if crosshair highlight should be enabled@@ -32,7 +32,7 @@ interface IFUniverCrosshairHighlightMixin {setCrosshairHighlightColor(color: string): void;}-class FUniverCrosshairHighlightMixin extends FUniver implements IFUniverCrosshairHighlightMixin {+export class FUniverCrosshairHighlightMixin extends FUniver implements IFUniverCrosshairHighlightMixin {override setCrosshairHighlightEnabled(enabled: boolean): void {if (enabled) {this._commandService.executeCommand(EnableCrosshairHighlightOperation.id);diff --git a/packages/sheets-crosshair-highlight/src/facade/index.ts b/packages/sheets-crosshair-highlight/src/facade/index.tsindex 14bcba31dc..968156fa44 100644--- a/packages/sheets-crosshair-highlight/src/facade/index.ts+++ b/packages/sheets-crosshair-highlight/src/facade/index.ts@@ -15,3 +15,5 @@*/import './f-univer';++export type * from './f-univer';diff --git a/packages/sheets-data-validation/src/facade/f-range.ts b/packages/sheets-data-validation/src/facade/f-range.tsindex 07d7d6b0d0..d249a3f4b1 100644--- a/packages/sheets-data-validation/src/facade/f-range.ts+++ b/packages/sheets-data-validation/src/facade/f-range.ts@@ -20,7 +20,7 @@ import { FRange } from '@univerjs/sheets/facade';import { AddSheetDataValidationCommand, ClearRangeDataValidationCommand, SheetsDataValidationValidatorService } from '@univerjs/sheets-data-validation';import { FDataValidation } from './f-data-validation';-interface IFRangeDataValidationMixin {+export interface IFRangeDataValidationMixin {/*** set a data validation rule to current range* @param rule data validation rule, build by `FUniver.newDataValidation`diff --git a/packages/sheets-data-validation/src/facade/f-univer.ts b/packages/sheets-data-validation/src/facade/f-univer.tsindex 1fd52e4183..c5351f8a93 100644--- a/packages/sheets-data-validation/src/facade/f-univer.ts+++ b/packages/sheets-data-validation/src/facade/f-univer.ts@@ -17,14 +17,13 @@import { FUniver } from '@univerjs/core';import { FDataValidationBuilder } from './f-data-validation-builder';-class FUnvierDataValidationMixin {+export class FUnvierDataValidationMixin {static newDataValidation(): FDataValidationBuilder {return new FDataValidationBuilder();}}FUniver.extend(FUnvierDataValidationMixin);-declare module '@univerjs/core' {// eslint-disable-next-line ts/no-namespacenamespace FUniver {diff --git a/packages/sheets-data-validation/src/facade/f-workbook.ts b/packages/sheets-data-validation/src/facade/f-workbook.tsindex 93990795a1..dc3fd43ea5 100644--- a/packages/sheets-data-validation/src/facade/f-workbook.ts+++ b/packages/sheets-data-validation/src/facade/f-workbook.ts@@ -33,10 +33,12 @@ import { AddSheetDataValidationCommand,SheetDataValidationModel,SheetsDataValidationValidatorService,UpdateSheetDataValidationOptionsCommand,- UpdateSheetDataValidationRangeCommand, UpdateSheetDataValidationSettingCommand } from '@univerjs/sheets-data-validation';+ UpdateSheetDataValidationRangeCommand,+ UpdateSheetDataValidationSettingCommand,+} from '@univerjs/sheets-data-validation';import { filter } from 'rxjs';-interface IFWorkbookDataValidationMixin {+export interface IFWorkbookDataValidationMixin {/*** get data validation validator status for current workbook* @returns matrix of validator status@@ -121,7 +123,7 @@ interface IFWorkbookDataValidationMixin {): IDisposable;}-class FWorkbookDataValidationMixin extends FWorkbook implements IFWorkbookDataValidationMixin {+export class FWorkbookDataValidationMixin extends FWorkbook implements IFWorkbookDataValidationMixin {declare _dataValidationModel: SheetDataValidationModel;override _initialize(): void {diff --git a/packages/sheets-data-validation/src/facade/f-worksheet.ts b/packages/sheets-data-validation/src/facade/f-worksheet.tsindex 4bf5b3ebe3..e10a90f7a7 100644--- a/packages/sheets-data-validation/src/facade/f-worksheet.ts+++ b/packages/sheets-data-validation/src/facade/f-worksheet.ts@@ -21,7 +21,7 @@ import { FWorksheet } from '@univerjs/sheets/facade';import { SheetsDataValidationValidatorService } from '@univerjs/sheets-data-validation';import { FDataValidation } from './f-data-validation';-interface IFWorksheetDataValidationMixin {+export interface IFWorksheetDataValidationMixin {/*** get all data validation rules in current sheet* @returns all data validation rules@@ -34,7 +34,7 @@ interface IFWorksheetDataValidationMixin {getValidatorStatus(): Promise<ObjectMatrix<Nullable<IDataValidationResCache>>>;}-class FWorksheetDataValidationMixin extends FWorksheet implements IFWorksheetDataValidationMixin {+export class FWorksheetDataValidationMixin extends FWorksheet implements IFWorksheetDataValidationMixin {override getDataValidations(): FDataValidation[] {const dataValidationModel = this._injector.get(DataValidationModel);return dataValidationModel.getRules(this._workbook.getUnitId(), this._worksheet.getSheetId()).map((rule) => new FDataValidation(rule));diff --git a/packages/sheets-data-validation/src/facade/index.ts b/packages/sheets-data-validation/src/facade/index.tsindex 7eceb54fc8..bee8e3e0f0 100644--- a/packages/sheets-data-validation/src/facade/index.ts+++ b/packages/sheets-data-validation/src/facade/index.ts@@ -21,3 +21,8 @@ import './f-worksheet';export { FDataValidation } from './f-data-validation';export { FDataValidationBuilder } from './f-data-validation-builder';++export type * from './f-range';+export type * from './f-univer';+export type * from './f-workbook';+export type * from './f-worksheet';diff --git a/packages/sheets-drawing-ui/src/facade/f-worksheet.ts b/packages/sheets-drawing-ui/src/facade/f-worksheet.tsindex e2218e3eb5..43168c25ab 100644--- a/packages/sheets-drawing-ui/src/facade/f-worksheet.ts+++ b/packages/sheets-drawing-ui/src/facade/f-worksheet.ts@@ -20,9 +20,9 @@ import { type ICanvasFloatDom, SheetCanvasFloatDomManagerService } from '@univerimport { type IFComponentKey, transformComponentKey } from '@univerjs/sheets-ui/facade';import { ComponentManager } from '@univerjs/ui';-interface IFICanvasFloatDom extends Omit<ICanvasFloatDom, 'componentKey' | 'unitId' | 'subUnitId'>, IFComponentKey {}+export interface IFICanvasFloatDom extends Omit<ICanvasFloatDom, 'componentKey' | 'unitId' | 'subUnitId'>, IFComponentKey {}-interface IFWorksheetLegacy {+export interface IFWorksheetLegacy {/*** add a float dom to position* @param layer float dom config@@ -35,7 +35,7 @@ interface IFWorksheetLegacy {}>;}-class FWorksheetLegacy extends FWorksheet implements IFWorksheetLegacy {+export class FWorksheetLegacy extends FWorksheet implements IFWorksheetLegacy {override addFloatDomToPosition(layer: IFICanvasFloatDom, id?: string): Nullable<{id: string;dispose: () => void;diff --git a/packages/sheets-drawing-ui/src/facade/index.ts b/packages/sheets-drawing-ui/src/facade/index.tsindex 5673ed5ec1..8e0a40109e 100644--- a/packages/sheets-drawing-ui/src/facade/index.ts+++ b/packages/sheets-drawing-ui/src/facade/index.ts@@ -15,3 +15,5 @@*/import './f-worksheet';++export type * from './f-worksheet';diff --git a/packages/sheets-filter/src/facade/f-range.ts b/packages/sheets-filter/src/facade/f-range.tsindex 1bd1f9d8ec..75c011f056 100644--- a/packages/sheets-filter/src/facade/f-range.ts+++ b/packages/sheets-filter/src/facade/f-range.ts@@ -20,7 +20,7 @@ import { FRange } from '@univerjs/sheets/facade';import { SetSheetFilterRangeCommand, SheetsFilterService } from '@univerjs/sheets-filter';import { FFilter } from './f-filter';-interface IFRangeFilter {+export interface IFRangeFilter {/*** Create a filter for the current range. If the worksheet already has a filter, this method would return `null`.*@@ -39,7 +39,7 @@ interface IFRangeFilter {getFilter(): FFilter | null;}-class FRangeFilter extends FRange implements IFRangeFilter {+export class FRangeFilter extends FRange implements IFRangeFilter {override async createFilter(): Promise<FFilter | null> {if (this._getFilterModel()) return null;diff --git a/packages/sheets-filter/src/facade/f-worksheet.ts b/packages/sheets-filter/src/facade/f-worksheet.tsindex 7702d3df67..3bf2cc3a2c 100644--- a/packages/sheets-filter/src/facade/f-worksheet.ts+++ b/packages/sheets-filter/src/facade/f-worksheet.ts@@ -20,11 +20,11 @@ import { FWorksheet } from '@univerjs/sheets/facade';import { SheetsFilterService } from '@univerjs/sheets-filter';import { FFilter } from './f-filter';-interface IFWorksheetFilter {+export interface IFWorksheetFilter {getFilter(): FFilter | null;}-class FWorksheetFilter extends FWorksheet implements IFWorksheetFilter {+export class FWorksheetFilter extends FWorksheet implements IFWorksheetFilter {override getFilter(): FFilter | null {const filterModel = this._getFilterModel();if (!filterModel) return null;diff --git a/packages/sheets-filter/src/facade/index.ts b/packages/sheets-filter/src/facade/index.tsindex c4b2441903..6398500b53 100644--- a/packages/sheets-filter/src/facade/index.ts+++ b/packages/sheets-filter/src/facade/index.ts@@ -19,3 +19,7 @@ import './f-range';import './f-worksheet';export { FFilter } from './f-filter';++export type * from './f-filter';+export type * from './f-range';+export type * from './f-worksheet';diff --git a/packages/sheets-formula/src/facade/f-formula.ts b/packages/sheets-formula/src/facade/f-formula.tsindex e576e48f2d..475f66dd7f 100644--- a/packages/sheets-formula/src/facade/f-formula.ts+++ b/packages/sheets-formula/src/facade/f-formula.ts@@ -20,7 +20,7 @@ import { IConfigService, ILogService, LifecycleService, LifecycleStages } from 'import { FFormula } from '@univerjs/engine-formula';import { PLUGIN_CONFIG_KEY_BASE } from '@univerjs/sheets-formula';-interface IFFormulaSheetsMixin {+export interface IFFormulaSheetsMixin {/*** Update the calculation mode of the formula.* @param calculationMode@@ -29,7 +29,7 @@ interface IFFormulaSheetsMixin {setInitialFormulaComputing(calculationMode: CalculationMode): void;}-class FFormulaSheetsMixin extends FFormula implements IFFormulaSheetsMixin {+export class FFormulaSheetsMixin extends FFormula implements IFFormulaSheetsMixin {override setInitialFormulaComputing(calculationMode: CalculationMode): void {const lifecycleService = this._injector.get(LifecycleService);const lifecycleStage = lifecycleService.stage;diff --git a/packages/sheets-formula/src/facade/f-univer.ts b/packages/sheets-formula/src/facade/f-univer.tsindex a7b447e429..a5a7f932cb 100644--- a/packages/sheets-formula/src/facade/f-univer.ts+++ b/packages/sheets-formula/src/facade/f-univer.ts@@ -19,7 +19,7 @@ import { debounce, FUniver } from '@univerjs/core';import { SetFormulaCalculationStartMutation } from '@univerjs/engine-formula';import { type IRegisterFunctionParams, IRegisterFunctionService, RegisterFunctionService } from '@univerjs/sheets-formula';-interface IFUniverSheetsFormulaMixin {+export interface IFUniverSheetsFormulaMixin {/*** Register a function to the spreadsheet.*@@ -31,7 +31,7 @@ interface IFUniverSheetsFormulaMixin {// TODO@Dushusir: this API should be implemented on FFormula.}-class FUniverSheetsFormulaMixin extends FUniver implements IFUniverSheetsFormulaMixin {+export class FUniverSheetsFormulaMixin extends FUniver implements IFUniverSheetsFormulaMixin {/*** registerFunction may be executed multiple times, triggering multiple formula forced refreshes*/diff --git a/packages/sheets-formula/src/facade/index.ts b/packages/sheets-formula/src/facade/index.tsindex f443acac52..11b119b565 100644--- a/packages/sheets-formula/src/facade/index.ts+++ b/packages/sheets-formula/src/facade/index.ts@@ -16,3 +16,6 @@import './f-univer';import './f-formula';++export type * from './f-formula';+export type * from './f-univer';diff --git a/packages/sheets-hyper-link/src/facade/f-range.ts b/packages/sheets-hyper-link/src/facade/f-range.tsindex bdce17f77d..7738f38a80 100644--- a/packages/sheets-hyper-link/src/facade/f-range.ts+++ b/packages/sheets-hyper-link/src/facade/f-range.ts@@ -27,7 +27,7 @@ export interface ICellHyperLink {label: string;}-interface IFRangeHyperlinkMixin {+export interface IFRangeHyperlinkMixin {/*** Get all hyperlinks in the cell in the range.* @returns hyperlinks@@ -51,7 +51,7 @@ interface IFRangeHyperlinkMixin {cancelHyperLink(id: string): Promise<boolean>;}-class FRangeHyperlinkMixin extends FRange implements IFRangeHyperlinkMixin {+export class FRangeHyperlinkMixin extends FRange implements IFRangeHyperlinkMixin {// #region hyperlink/**diff --git a/packages/sheets-hyper-link/src/facade/f-workbook.ts b/packages/sheets-hyper-link/src/facade/f-workbook.tsindex 6396f55def..bfab98dbe4 100644--- a/packages/sheets-hyper-link/src/facade/f-workbook.ts+++ b/packages/sheets-hyper-link/src/facade/f-workbook.ts@@ -19,7 +19,7 @@ import type { ISheetHyperLinkInfo } from '@univerjs/sheets-hyper-link';import { FWorkbook } from '@univerjs/sheets/facade';import { SheetsHyperLinkParserService } from '@univerjs/sheets-hyper-link';-interface IFWorkbookHyperlinkMixin {+export interface IFWorkbookHyperlinkMixin {/*** create a hyperlink for the sheet* @param sheetId the sheet id to linkdiff --git a/packages/sheets-hyper-link/src/facade/index.ts b/packages/sheets-hyper-link/src/facade/index.tsindex 43ce6d9d44..d391aae9b2 100644--- a/packages/sheets-hyper-link/src/facade/index.ts+++ b/packages/sheets-hyper-link/src/facade/index.ts@@ -18,3 +18,7 @@ import './f-workbook';import './f-range';export { FWorkbookHyperLinkMixin } from './f-workbook';++// eslint-disable-next-line perfectionist/sort-exports+export type * from './f-range';+export type * from './f-workbook';diff --git a/packages/sheets-numfmt/src/facade/f-range.ts b/packages/sheets-numfmt/src/facade/f-range.tsindex 6b0ce4b8ca..d86b887cb0 100644--- a/packages/sheets-numfmt/src/facade/f-range.ts+++ b/packages/sheets-numfmt/src/facade/f-range.ts@@ -18,7 +18,7 @@ import type { ISetNumfmtCommandParams } from '@univerjs/sheets-numfmt';import { FRange } from '@univerjs/sheets/facade';import { SetNumfmtCommand } from '@univerjs/sheets-numfmt';-interface IFRangeSheetsNumfmtMixin {+export interface IFRangeSheetsNumfmtMixin {// TODO@wzhudev: should separate numfmt package to two/**@@ -29,7 +29,7 @@ interface IFRangeSheetsNumfmtMixin {setNumberFormat(pattern: string): Promise<boolean>;}-class FRangeLegacy extends FRange implements IFRangeSheetsNumfmtMixin {+export class FRangeLegacy extends FRange implements IFRangeSheetsNumfmtMixin {override setNumberFormat(pattern: string): Promise<boolean> {// TODO@Gggpound: the API should support other types of parametersconst values: ISetNumfmtCommandParams['values'] = [];diff --git a/packages/sheets-numfmt/src/facade/index.ts b/packages/sheets-numfmt/src/facade/index.tsindex 3b980c7d77..e9221fcab8 100644--- a/packages/sheets-numfmt/src/facade/index.ts+++ b/packages/sheets-numfmt/src/facade/index.ts@@ -15,3 +15,5 @@*/import './f-range';++export type * from './f-range';diff --git a/packages/sheets-thread-comment/src/facade/f-range.ts b/packages/sheets-thread-comment/src/facade/f-range.tsindex b7674b6be2..97679652f7 100644--- a/packages/sheets-thread-comment/src/facade/f-range.ts+++ b/packages/sheets-thread-comment/src/facade/f-range.ts@@ -20,7 +20,7 @@ import { SheetsThreadCommentModel } from '@univerjs/sheets-thread-comment';import { AddCommentCommand, DeleteCommentTreeCommand, getDT } from '@univerjs/thread-comment';import { FThreadComment } from './f-thread-comment';-interface IFRangeCommentMixin {+export interface IFRangeCommentMixin {/*** Get the comment of the start cell in the current range.* @returns The comment of the start cell in the current range. If the cell does not have a comment, return `null`.@@ -39,7 +39,7 @@ interface IFRangeCommentMixin {clearComment(): Promise<boolean>;}-class FRangeCommentMixin extends FRange implements IFRangeCommentMixin {+export class FRangeCommentMixin extends FRange implements IFRangeCommentMixin {override getComment(): Nullable<FThreadComment> {const injector = this._injector;const sheetsTheadCommentModel = injector.get(SheetsThreadCommentModel);diff --git a/packages/sheets-thread-comment/src/facade/f-workbook.ts b/packages/sheets-thread-comment/src/facade/f-workbook.tsindex 6d998fa39b..347cc8e1d2 100644--- a/packages/sheets-thread-comment/src/facade/f-workbook.ts+++ b/packages/sheets-thread-comment/src/facade/f-workbook.ts@@ -25,7 +25,7 @@ import { filter } from 'rxjs';// eslint-disable-next-line ts/no-explicit-anytype IUpdateCommandParams = any;-interface IFWorkbookThreadCommentMixin {+export interface IFWorkbookThreadCommentMixin {/*** The onThreadCommentChange event is fired when the thread comment of this sheet is changed.* @param callback Callback function that will be called when the event is fired@@ -64,7 +64,7 @@ interface IFWorkbookThreadCommentMixin {): IDisposable;}-class FWorkbookThreadCommentMixin extends FWorkbook implements IFWorkbookThreadCommentMixin {+export class FWorkbookThreadCommentMixin extends FWorkbook implements IFWorkbookThreadCommentMixin {declare _threadCommentModel: ThreadCommentModel;override _initialize(): void {diff --git a/packages/sheets-thread-comment/src/facade/f-worksheet.ts b/packages/sheets-thread-comment/src/facade/f-worksheet.tsindex f6e733fbad..67d4683e9d 100644--- a/packages/sheets-thread-comment/src/facade/f-worksheet.ts+++ b/packages/sheets-thread-comment/src/facade/f-worksheet.ts@@ -18,7 +18,7 @@ import { FWorksheet } from '@univerjs/sheets/facade';import { SheetsThreadCommentModel } from '@univerjs/sheets-thread-comment';import { FThreadComment } from './f-thread-comment';-interface IFWorksheetCommentMixin {+export interface IFWorksheetCommentMixin {/*** Get all comments in the current sheet* @returns all comments in the current sheet@@ -26,7 +26,7 @@ interface IFWorksheetCommentMixin {getComments(): FThreadComment[];}-class FWorksheetCommentMixin extends FWorksheet implements IFWorksheetCommentMixin {+export class FWorksheetCommentMixin extends FWorksheet implements IFWorksheetCommentMixin {override getComments(): FThreadComment[] {const sheetsTheadCommentModel = this._injector.get(SheetsThreadCommentModel);const comments = sheetsTheadCommentModel.getSubUnitAll(this._workbook.getUnitId(), this._worksheet.getSheetId());diff --git a/packages/sheets-thread-comment/src/facade/index.ts b/packages/sheets-thread-comment/src/facade/index.tsindex fc67877172..2fffbdfe55 100644--- a/packages/sheets-thread-comment/src/facade/index.ts+++ b/packages/sheets-thread-comment/src/facade/index.ts@@ -19,3 +19,8 @@ import './f-workbook';import './f-worksheet';export { FThreadComment } from './f-thread-comment';++// eslint-disable-next-line perfectionist/sort-exports+export type * from './f-range';+export type * from './f-workbook';+export type * from './f-worksheet';diff --git a/packages/sheets-ui/src/facade/f-permission.ts b/packages/sheets-ui/src/facade/f-permission.tsindex 34c473dce7..bfde3b2951 100644--- a/packages/sheets-ui/src/facade/f-permission.ts+++ b/packages/sheets-ui/src/facade/f-permission.ts@@ -16,7 +16,7 @@import { FPermission } from '@univerjs/sheets/facade';-interface IFPermissionSheetsUIMixin {+export interface IFPermissionSheetsUIMixin {/*** Set visibility of unauthorized pop-up window*@@ -25,7 +25,7 @@ interface IFPermissionSheetsUIMixin {setPermissionDialogVisible(visible: boolean): void;}-class FPermissionSheetsUIMixin extends FPermission implements IFPermissionSheetsUIMixin {+export class FPermissionSheetsUIMixin extends FPermission implements IFPermissionSheetsUIMixin {override setPermissionDialogVisible(visible: boolean): void {this._permissionService.setShowComponents(visible);}diff --git a/packages/sheets-ui/src/facade/f-sheet-hooks.ts b/packages/sheets-ui/src/facade/f-sheet-hooks.tsindex d25980d436..8c22454825 100644--- a/packages/sheets-ui/src/facade/f-sheet-hooks.ts+++ b/packages/sheets-ui/src/facade/f-sheet-hooks.ts@@ -21,7 +21,7 @@ import { InterceptCellContentPriority, INTERCEPTOR_POINT, SheetInterceptorServicimport { FSheetHooks } from '@univerjs/sheets/facade';import { DragManagerService, HoverManagerService, SetCellEditVisibleOperation } from '@univerjs/sheets-ui';-interface IFSheetHooksUIMixin {+export interface IFSheetHooksUIMixin {/*** The onCellPointerMove event is fired when a pointer changes coordinates.* @param callback Callback function that will be called when the event is fired@@ -74,7 +74,7 @@ interface IFSheetHooksUIMixin {onAfterCellEdit(callback: (params: IEditorBridgeServiceVisibleParam) => void): IDisposable;}-class FSheetHooksUIMixin extends FSheetHooks implements IFSheetHooksUIMixin {+export class FSheetHooksUIMixin extends FSheetHooks implements IFSheetHooksUIMixin {override onCellPointerMove(callback: (cellPos: Nullable<IHoverCellPosition>) => void): IDisposable {return toDisposable(this._injector.get(HoverManagerService).currentPosition$.subscribe(callback));}diff --git a/packages/sheets-ui/src/facade/f-univer.ts b/packages/sheets-ui/src/facade/f-univer.tsindex 5fc30a7dd7..9d298318a9 100644--- a/packages/sheets-ui/src/facade/f-univer.ts+++ b/packages/sheets-ui/src/facade/f-univer.ts@@ -29,7 +29,7 @@ import { IRenderManagerService } from '@univerjs/engine-render';import { FSheetHooks } from '@univerjs/sheets/facade';import { SHEET_VIEW_KEY } from '@univerjs/sheets-ui';-interface IFUniverSheetsUIMixin {+export interface IFUniverSheetsUIMixin {/*** Customize the column header of the spreadsheet.*diff --git a/packages/sheets-ui/src/facade/f-workbook.ts b/packages/sheets-ui/src/facade/f-workbook.tsindex 29963d8d41..09a795c4fc 100644--- a/packages/sheets-ui/src/facade/f-workbook.ts+++ b/packages/sheets-ui/src/facade/f-workbook.ts@@ -23,7 +23,7 @@ import { HoverManagerService, SetCellEditVisibleOperation } from '@univerjs/sheeimport { type IDialogPartMethodOptions, IDialogService, type ISidebarMethodOptions, ISidebarService, KeyCode } from '@univerjs/ui';import { filter } from 'rxjs';-interface IFWorkbookSheetsUIMixin {+export interface IFWorkbookSheetsUIMixin {/*** Open a sidebar.*@@ -75,7 +75,7 @@ interface IFWorkbookSheetsUIMixin {endEditing(save?: boolean): Promise<boolean>;}-class FWorokbookSheetsUIMixin extends FWorkbook implements IFWorkbookSheetsUIMixin {+export class FWorokbookSheetsUIMixin extends FWorkbook implements IFWorkbookSheetsUIMixin {override openSiderbar(params: ISidebarMethodOptions): IDisposable {this._logDeprecation('openSiderbar');@@ -150,4 +150,3 @@ declare module '@univerjs/sheets/facade' {// eslint-disable-next-line ts/naming-conventioninterface FWorkbook extends IFWorkbookSheetsUIMixin {}}-diff --git a/packages/sheets-ui/src/facade/f-worksheet.ts b/packages/sheets-ui/src/facade/f-worksheet.tsindex 1e8323ec93..d26a3b6fd6 100644--- a/packages/sheets-ui/src/facade/f-worksheet.ts+++ b/packages/sheets-ui/src/facade/f-worksheet.ts@@ -18,7 +18,7 @@ import { IRenderManagerService } from '@univerjs/engine-render';import { FWorksheet } from '@univerjs/sheets/facade';import { SheetSkeletonManagerService } from '../services/sheet-skeleton-manager.service';-interface IFWorksheetSkeletonMixin {+export interface IFWorksheetSkeletonMixin {/*** Refresh the canvas.@@ -26,7 +26,7 @@ interface IFWorksheetSkeletonMixin {refreshCanvas(): void;}-class FWorksheetSkeletonMixin extends FWorksheet implements IFWorksheetSkeletonMixin {+export class FWorksheetSkeletonMixin extends FWorksheet implements IFWorksheetSkeletonMixin {override refreshCanvas(): void {const renderManagerService = this._injector.get(IRenderManagerService);const unitId = this._fWorkbook.id;diff --git a/packages/sheets-ui/src/facade/index.ts b/packages/sheets-ui/src/facade/index.tsindex eb2ceaaef9..714b0c8c7f 100644--- a/packages/sheets-ui/src/facade/index.ts+++ b/packages/sheets-ui/src/facade/index.ts@@ -21,3 +21,10 @@ import './f-permission';import './f-sheet-hooks';export { type IFComponentKey, transformComponentKey } from './f-range';++// eslint-disable-next-line perfectionist/sort-exports+export type * from './f-permission';+export type * from './f-sheet-hooks';+export type * from './f-univer';+export type * from './f-workbook';+export type * from './f-worksheet';diff --git a/packages/sheets/src/facade/f-univer.ts b/packages/sheets/src/facade/f-univer.tsindex 6151de774c..003227bc94 100644--- a/packages/sheets/src/facade/f-univer.ts+++ b/packages/sheets/src/facade/f-univer.ts@@ -19,7 +19,7 @@ import { FUniver, IUniverInstanceService, UniverInstanceType } from '@univerjs/cimport { FPermission } from './f-permission';import { FWorkbook } from './f-workbook';-interface IFUniverSheetsMixin {+export interface IFUniverSheetsMixin {/*** Create a new spreadsheet and get the API handler of that spreadsheet.*@@ -48,7 +48,7 @@ interface IFUniverSheetsMixin {getPermission(): FPermission;}-class FUniverSheetsMixin extends FUniver {+export class FUniverSheetsMixin extends FUniver {override createUniverSheet(data: Partial<IWorkbookData>): FWorkbook {const instanceService = this._injector.get(IUniverInstanceService);const workbook = instanceService.createUnit<IWorkbookData, Workbook>(UniverInstanceType.UNIVER_SHEET, data);diff --git a/packages/sheets/src/facade/index.ts b/packages/sheets/src/facade/index.tsindex c799d35b83..2f55a7fe2a 100644--- a/packages/sheets/src/facade/index.ts+++ b/packages/sheets/src/facade/index.ts@@ -21,5 +21,9 @@ export { FRange } from './f-range';export type { FontLine, FontStyle, FontWeight } from './f-range';export { FSelection } from './f-selection';export { FSheetHooks } from './f-sheet-hooks';+export { FWorkbook } from './f-workbook';export { FWorksheet } from './f-worksheet';++// eslint-disable-next-line perfectionist/sort-exports+export type * from './f-univer';diff --git a/packages/ui/src/facade/f-hooks.ts b/packages/ui/src/facade/f-hooks.tsindex 389e89c2aa..d8179f1a0c 100644--- a/packages/ui/src/facade/f-hooks.ts+++ b/packages/ui/src/facade/f-hooks.ts@@ -18,7 +18,7 @@ import type { IDisposable } from '@univerjs/core';import { FHooks, ICommandService } from '@univerjs/core';import { CopyCommand, PasteCommand } from '@univerjs/ui';-interface IFHooksSheetsUIMixin {+export interface IFHooksSheetsUIMixin {/*** The onBeforeCopy event is fired before a copy operation is performed.* @param callback Callback function that will be called when the event is fired@@ -55,7 +55,7 @@ interface IFHooksSheetsUIMixin {onPaste(callback: () => void): IDisposable;}-class FHooksSheetsMixin extends FHooks implements IFHooksSheetsUIMixin {+export class FHooksSheetsMixin extends FHooks implements IFHooksSheetsUIMixin {override onBeforeCopy(callback: () => void): IDisposable {const commandService = this._injector.get(ICommandService);diff --git a/packages/ui/src/facade/f-univer.ts b/packages/ui/src/facade/f-univer.tsindex cc4a3b26d2..ff37c88396 100644--- a/packages/ui/src/facade/f-univer.ts+++ b/packages/ui/src/facade/f-univer.ts@@ -19,7 +19,7 @@ import type { IDialogPartMethodOptions, ISidebarMethodOptions } from '@univerjs/import { FUniver } from '@univerjs/core';import { ComponentManager, CopyCommand, IDialogService, ISidebarService, PasteCommand } from '@univerjs/ui';-interface IFUniverUIMixin {+export interface IFUniverUIMixin {copy(): Promise<boolean>;paste(): Promise<boolean>;@@ -45,7 +45,7 @@ interface IFUniverUIMixin {getComponentManager(): ComponentManager;}-class FUniverUIMixin extends FUniver implements IFUniverUIMixin {+export class FUniverUIMixin extends FUniver implements IFUniverUIMixin {override copy(): Promise<boolean> {return this._commandService.executeCommand(CopyCommand.id);}diff --git a/packages/ui/src/facade/index.ts b/packages/ui/src/facade/index.tsindex e2b6382f7b..ec8f19f3a0 100644--- a/packages/ui/src/facade/index.ts+++ b/packages/ui/src/facade/index.ts@@ -16,3 +16,6 @@import './f-univer';import './f-hooks';++export type * from './f-hooks';+export type * from './f-univer';diff --git a/packages/watermark/src/facade/f-univer.ts b/packages/watermark/src/facade/f-univer.tsindex 227aaa4b1e..fa21df0eb6 100644--- a/packages/watermark/src/facade/f-univer.ts+++ b/packages/watermark/src/facade/f-univer.ts@@ -18,7 +18,7 @@ import type { IImageWatermarkConfig, ITextWatermarkConfig } from '@univerjs/wateimport { FUniver } from '@univerjs/core';import { IWatermarkTypeEnum, WatermarkImageBaseConfig, WatermarkService, WatermarkTextBaseConfig } from '@univerjs/watermark';-interface IFUniverWatermarkMixin {+export interface IFUniverWatermarkMixin {/*** Adds a watermark to the unit. Supports both text and image watermarks based on the specified type.*@@ -43,7 +43,7 @@ interface IFUniverWatermarkMixin {deleteWatermark(): void;}-class FUniverWatermarkMixin extends FUniver {+export class FUniverWatermarkMixin extends FUniver {// #region watermarkoverride addWatermark(type: IWatermarkTypeEnum.Text, config: ITextWatermarkConfig): void;diff --git a/packages/watermark/src/facade/index.ts b/packages/watermark/src/facade/index.tsindex 14bcba31dc..968156fa44 100644--- a/packages/watermark/src/facade/index.ts+++ b/packages/watermark/src/facade/index.ts@@ -15,3 +15,5 @@*/import './f-univer';++export type * from './f-univer';