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
chore(build): fix facade API in the built product (#4016)
#FF00002006e19cca3a
diff --git a/common/shared/vite/utils.ts b/common/shared/vite/utils.tsindex bb3c754d71..870e941a26 100644--- a/common/shared/vite/utils.ts+++ b/common/shared/vite/utils.ts@@ -20,6 +20,7 @@ import JavaScriptObfuscator from 'javascript-obfuscator';export function convertLibNameFromPackageName(name: string) {return name.replace(/^@univerjs(?:-[^/]+)?\//, 'univer-')+ .replace('/facade', '-facade').split('-').map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join('');diff --git a/packages/docs-ui/src/facade/f-document.ts b/packages/docs-ui/src/facade/f-document.tsindex 4ec9b8d481..430b244346 100644--- a/packages/docs-ui/src/facade/f-document.ts+++ b/packages/docs-ui/src/facade/f-document.ts@@ -24,9 +24,8 @@ import { DOC_RANGE_TYPE, ICommandService,UndoCommand,UniverInstanceType,} from '@univerjs/core';+import { DocSelectionRenderService, InsertCommand } from '@univerjs/docs-ui';import { IRenderManagerService } from '@univerjs/engine-render';-import { InsertCommand } from '../commands/commands/core-editing.command';-import { DocSelectionRenderService } from '../services/selection/doc-selection-render.service';export class FDocument {readonly id: string;diff --git a/packages/engine-formula/src/facade/f-formula.ts b/packages/engine-formula/src/facade/f-formula.tsindex 36d8d711db..be42a26754 100644--- a/packages/engine-formula/src/facade/f-formula.ts+++ b/packages/engine-formula/src/facade/f-formula.ts@@ -15,10 +15,9 @@*/import type { ICommandInfo, IDisposable } from '@univerjs/core';-import type { ISetFormulaCalculationNotificationMutation, ISetFormulaCalculationStartMutation } from '../commands/mutations/set-formula-calculation.mutation';-import type { FormulaExecutedStateType, IExecutionInProgressParams } from '../services/runtime.service';+import type { FormulaExecutedStateType, IExecutionInProgressParams, ISetFormulaCalculationNotificationMutation, ISetFormulaCalculationStartMutation } from '@univerjs/engine-formula';import { FBase, ICommandService, Inject, Injector } from '@univerjs/core';-import { SetFormulaCalculationNotificationMutation, SetFormulaCalculationStartMutation, SetFormulaCalculationStopMutation } from '../commands/mutations/set-formula-calculation.mutation';+import { SetFormulaCalculationNotificationMutation, SetFormulaCalculationStartMutation, SetFormulaCalculationStopMutation } from '@univerjs/engine-formula';/*** This interface class provides methods to modify the behavior of the operation formula.diff --git a/packages/sheets-crosshair-highlight/src/facade/f-univer.ts b/packages/sheets-crosshair-highlight/src/facade/f-univer.tsindex 272cd6c1c8..3f8c17c2fa 100644--- a/packages/sheets-crosshair-highlight/src/facade/f-univer.ts+++ b/packages/sheets-crosshair-highlight/src/facade/f-univer.ts@@ -14,9 +14,9 @@* limitations under the License.*/-import type { ISetCrosshairHighlightColorOperationParams } from '../commands/operations/operation';+import type { ISetCrosshairHighlightColorOperationParams } from '@univerjs/sheets-crosshair-highlight';import { FUniver } from '@univerjs/core';-import { DisableCrosshairHighlightOperation, EnableCrosshairHighlightOperation, SetCrosshairHighlightColorOperation } from '../commands/operations/operation';+import { DisableCrosshairHighlightOperation, EnableCrosshairHighlightOperation, SetCrosshairHighlightColorOperation } from '@univerjs/sheets-crosshair-highlight';interface IFUniverCrosshairHighlightMixin {/**diff --git a/packages/sheets-data-validation/src/facade/f-data-validation.ts b/packages/sheets-data-validation/src/facade/f-data-validation.tsindex d00b9db924..c60747a234 100644--- a/packages/sheets-data-validation/src/facade/f-data-validation.ts+++ b/packages/sheets-data-validation/src/facade/f-data-validation.ts@@ -16,11 +16,11 @@import type { DataValidationOperator, DataValidationType, IDataValidationRule, IDataValidationRuleOptions, IRange } from '@univerjs/core';import type { FWorksheet } from '@univerjs/sheets/facade';-import type { IRemoveSheetDataValidationCommandParams, IUpdateSheetDataValidationOptionsCommandParams, IUpdateSheetDataValidationRangeCommandParams, IUpdateSheetDataValidationSettingCommandParams } from '../commands/commands/data-validation.command';+import type { IRemoveSheetDataValidationCommandParams, IUpdateSheetDataValidationOptionsCommandParams, IUpdateSheetDataValidationRangeCommandParams, IUpdateSheetDataValidationSettingCommandParams } from '@univerjs/sheets-data-validation';import { DataValidationErrorStyle, ICommandService } from '@univerjs/core';import { DataValidationModel, getRuleOptions } from '@univerjs/data-validation';import { FRange } from '@univerjs/sheets/facade';-import { RemoveSheetDataValidationCommand, UpdateSheetDataValidationOptionsCommand, UpdateSheetDataValidationRangeCommand, UpdateSheetDataValidationSettingCommand } from '../commands/commands/data-validation.command';+import { RemoveSheetDataValidationCommand, UpdateSheetDataValidationOptionsCommand, UpdateSheetDataValidationRangeCommand, UpdateSheetDataValidationSettingCommand } from '@univerjs/sheets-data-validation';import { FDataValidationBuilder } from './f-data-validation-builder';export class FDataValidation {diff --git a/packages/sheets-data-validation/src/facade/f-range.ts b/packages/sheets-data-validation/src/facade/f-range.tsindex 82d4964e6c..07d7d6b0d0 100644--- a/packages/sheets-data-validation/src/facade/f-range.ts+++ b/packages/sheets-data-validation/src/facade/f-range.ts@@ -15,10 +15,9 @@*/import type { DataValidationStatus, Nullable } from '@univerjs/core';-import type { IAddSheetDataValidationCommandParams, IClearRangeDataValidationCommandParams } from '../commands/commands/data-validation.command';+import type { IAddSheetDataValidationCommandParams, IClearRangeDataValidationCommandParams } from '@univerjs/sheets-data-validation';import { FRange } from '@univerjs/sheets/facade';-import { AddSheetDataValidationCommand, ClearRangeDataValidationCommand } from '../commands/commands/data-validation.command';-import { SheetsDataValidationValidatorService } from '../services/dv-validator-service';+import { AddSheetDataValidationCommand, ClearRangeDataValidationCommand, SheetsDataValidationValidatorService } from '@univerjs/sheets-data-validation';import { FDataValidation } from './f-data-validation';interface IFRangeDataValidationMixin {diff --git a/packages/sheets-data-validation/src/facade/f-workbook.ts b/packages/sheets-data-validation/src/facade/f-workbook.tsindex 06fe899872..93990795a1 100644--- a/packages/sheets-data-validation/src/facade/f-workbook.ts+++ b/packages/sheets-data-validation/src/facade/f-workbook.ts@@ -15,27 +15,26 @@*/import type { IRuleChange } from '@univerjs/data-validation';-import type { IValidStatusChange } from '../models/sheet-data-validation-model';-import type { IDataValidationResCache } from '../services/dv-cache.service';+import type { IAddSheetDataValidationCommandParams,+ IDataValidationResCache,+ IRemoveSheetAllDataValidationCommandParams,+ IRemoveSheetDataValidationCommandParams,+ IUpdateSheetDataValidationOptionsCommandParams,+ IUpdateSheetDataValidationRangeCommandParams,++ IUpdateSheetDataValidationSettingCommandParams,+ IValidStatusChange } from '@univerjs/sheets-data-validation';+import { type IDisposable, type IExecutionOptions, type Nullable, type ObjectMatrix, toDisposable } from '@univerjs/core';import { FWorkbook } from '@univerjs/sheets/facade';-import { filter } from 'rxjs';-import {- AddSheetDataValidationCommand,- type IAddSheetDataValidationCommandParams,- type IRemoveSheetAllDataValidationCommandParams,- type IRemoveSheetDataValidationCommandParams,- type IUpdateSheetDataValidationOptionsCommandParams,- type IUpdateSheetDataValidationRangeCommandParams,- type IUpdateSheetDataValidationSettingCommandParams,+import { AddSheetDataValidationCommand,RemoveSheetAllDataValidationCommand,RemoveSheetDataValidationCommand,+ SheetDataValidationModel,+ SheetsDataValidationValidatorService,UpdateSheetDataValidationOptionsCommand,- UpdateSheetDataValidationRangeCommand,- UpdateSheetDataValidationSettingCommand,-} from '../commands/commands/data-validation.command';-import { SheetDataValidationModel } from '../models/sheet-data-validation-model';-import { SheetsDataValidationValidatorService } from '../services/dv-validator-service';+ UpdateSheetDataValidationRangeCommand, UpdateSheetDataValidationSettingCommand } from '@univerjs/sheets-data-validation';+import { filter } from 'rxjs';interface IFWorkbookDataValidationMixin {/**diff --git a/packages/sheets-data-validation/src/facade/f-worksheet.ts b/packages/sheets-data-validation/src/facade/f-worksheet.tsindex 04517bbe9c..4bf5b3ebe3 100644--- a/packages/sheets-data-validation/src/facade/f-worksheet.ts+++ b/packages/sheets-data-validation/src/facade/f-worksheet.ts@@ -15,10 +15,10 @@*/import type { Nullable, ObjectMatrix } from '@univerjs/core';-import type { IDataValidationResCache } from '../services/dv-cache.service';+import type { IDataValidationResCache } from '@univerjs/sheets-data-validation';import { DataValidationModel } from '@univerjs/data-validation';import { FWorksheet } from '@univerjs/sheets/facade';-import { SheetsDataValidationValidatorService } from '../services/dv-validator-service';+import { SheetsDataValidationValidatorService } from '@univerjs/sheets-data-validation';import { FDataValidation } from './f-data-validation';interface IFWorksheetDataValidationMixin {diff --git a/packages/sheets-drawing-ui/src/facade/f-worksheet.ts b/packages/sheets-drawing-ui/src/facade/f-worksheet.tsindex 6c34494ad0..e2218e3eb5 100644--- a/packages/sheets-drawing-ui/src/facade/f-worksheet.ts+++ b/packages/sheets-drawing-ui/src/facade/f-worksheet.ts@@ -16,9 +16,9 @@import type { Nullable } from '@univerjs/core';import { FWorksheet } from '@univerjs/sheets/facade';+import { type ICanvasFloatDom, SheetCanvasFloatDomManagerService } from '@univerjs/sheets-drawing-ui';import { type IFComponentKey, transformComponentKey } from '@univerjs/sheets-ui/facade';import { ComponentManager } from '@univerjs/ui';-import { type ICanvasFloatDom, SheetCanvasFloatDomManagerService } from '../services/canvas-float-dom-manager.service';interface IFICanvasFloatDom extends Omit<ICanvasFloatDom, 'componentKey' | 'unitId' | 'subUnitId'>, IFComponentKey {}diff --git a/packages/sheets-filter/src/facade/f-filter.ts b/packages/sheets-filter/src/facade/f-filter.tsindex ee92b30dfe..442c4c2c27 100644--- a/packages/sheets-filter/src/facade/f-filter.ts+++ b/packages/sheets-filter/src/facade/f-filter.ts@@ -16,10 +16,11 @@import type { Nullable, Workbook, Worksheet } from '@univerjs/core';import type { ISheetCommandSharedParams } from '@univerjs/sheets';-import type { FilterModel, IFilterColumn } from '@univerjs/sheets-filter';+import type { FilterModel, IFilterColumn, ISetSheetsFilterCriteriaCommandParams } from '@univerjs/sheets-filter';+import { ICommandService, Inject, Injector } from '@univerjs/core';import { FRange } from '@univerjs/sheets/facade';-import { ClearSheetsFilterCriteriaCommand, type ISetSheetsFilterCriteriaCommandParams, RemoveSheetFilterCommand, SetSheetsFilterCriteriaCommand } from '../commands/commands/sheets-filter.command';+import { ClearSheetsFilterCriteriaCommand, RemoveSheetFilterCommand, SetSheetsFilterCriteriaCommand } from '@univerjs/sheets-filter';/*** This interface class provides methods to modify the filter settings of a worksheet.diff --git a/packages/sheets-filter/src/facade/f-range.ts b/packages/sheets-filter/src/facade/f-range.tsindex 28fb67dd72..1bd1f9d8ec 100644--- a/packages/sheets-filter/src/facade/f-range.ts+++ b/packages/sheets-filter/src/facade/f-range.ts@@ -15,11 +15,9 @@*/import type { Nullable } from '@univerjs/core';-import type { ISetSheetFilterRangeCommandParams } from '../commands/commands/sheets-filter.command';-import type { FilterModel } from '../models/filter-model';+import type { FilterModel, ISetSheetFilterRangeCommandParams } from '@univerjs/sheets-filter';import { FRange } from '@univerjs/sheets/facade';-import { SetSheetFilterRangeCommand } from '../commands/commands/sheets-filter.command';-import { SheetsFilterService } from '../services/sheet-filter.service';+import { SetSheetFilterRangeCommand, SheetsFilterService } from '@univerjs/sheets-filter';import { FFilter } from './f-filter';interface IFRangeFilter {diff --git a/packages/sheets-filter/src/facade/f-worksheet.ts b/packages/sheets-filter/src/facade/f-worksheet.tsindex ab18ab0fa3..7702d3df67 100644--- a/packages/sheets-filter/src/facade/f-worksheet.ts+++ b/packages/sheets-filter/src/facade/f-worksheet.ts@@ -15,9 +15,9 @@*/import type { Nullable } from '@univerjs/core';-import type { FilterModel } from '../models/filter-model';+import type { FilterModel } from '@univerjs/sheets-filter';import { FWorksheet } from '@univerjs/sheets/facade';-import { SheetsFilterService } from '../services/sheet-filter.service';+import { SheetsFilterService } from '@univerjs/sheets-filter';import { FFilter } from './f-filter';interface IFWorksheetFilter {diff --git a/packages/sheets-formula/src/facade/f-formula.ts b/packages/sheets-formula/src/facade/f-formula.tsindex d7f02baa4f..e576e48f2d 100644--- a/packages/sheets-formula/src/facade/f-formula.ts+++ b/packages/sheets-formula/src/facade/f-formula.ts@@ -14,11 +14,11 @@* limitations under the License.*/-import type { CalculationMode, IUniverSheetsFormulaBaseConfig } from '../controllers/config.schema';+import type { CalculationMode, IUniverSheetsFormulaBaseConfig } from '@univerjs/sheets-formula';import { IConfigService, ILogService, LifecycleService, LifecycleStages } from '@univerjs/core';import { FFormula } from '@univerjs/engine-formula';-import { PLUGIN_CONFIG_KEY_BASE } from '../controllers/config.schema';+import { PLUGIN_CONFIG_KEY_BASE } from '@univerjs/sheets-formula';interface IFFormulaSheetsMixin {/**diff --git a/packages/sheets-formula/src/facade/f-univer.ts b/packages/sheets-formula/src/facade/f-univer.tsindex 5ab0d04e90..a7b447e429 100644--- a/packages/sheets-formula/src/facade/f-univer.ts+++ b/packages/sheets-formula/src/facade/f-univer.ts@@ -17,7 +17,7 @@import type { IDisposable } from '@univerjs/core';import { debounce, FUniver } from '@univerjs/core';import { SetFormulaCalculationStartMutation } from '@univerjs/engine-formula';-import { type IRegisterFunctionParams, IRegisterFunctionService, RegisterFunctionService } from '../services/register-function.service';+import { type IRegisterFunctionParams, IRegisterFunctionService, RegisterFunctionService } from '@univerjs/sheets-formula';interface IFUniverSheetsFormulaMixin {/**diff --git a/packages/sheets-hyper-link-ui/src/facade/f-workbook.ts b/packages/sheets-hyper-link-ui/src/facade/f-workbook.tsindex 028695ccad..9ffbe47ef9 100644--- a/packages/sheets-hyper-link-ui/src/facade/f-workbook.ts+++ b/packages/sheets-hyper-link-ui/src/facade/f-workbook.ts@@ -17,7 +17,7 @@import { FWorkbook } from '@univerjs/sheets/facade';import { SheetsHyperLinkParserService } from '@univerjs/sheets-hyper-link';import { FWorkbookHyperLinkMixin } from '@univerjs/sheets-hyper-link/facade';-import { SheetsHyperLinkResolverService } from '../services/resolver.service';+import { SheetsHyperLinkResolverService } from '@univerjs/sheets-hyper-link-ui';interface IFWorkbookHyperlinkUIMixin {/**diff --git a/packages/sheets-hyper-link/src/facade/f-range.ts b/packages/sheets-hyper-link/src/facade/f-range.tsindex bec1616357..bdce17f77d 100644--- a/packages/sheets-hyper-link/src/facade/f-range.ts+++ b/packages/sheets-hyper-link/src/facade/f-range.ts@@ -14,14 +14,10 @@* limitations under the License.*/-import type { IAddHyperLinkCommandParams } from '../commands/commands/add-hyper-link.command';-import type { ICancelHyperLinkCommandParams } from '../commands/commands/remove-hyper-link.command';-import type { IUpdateHyperLinkCommandParams } from '../commands/commands/update-hyper-link.command';+import type { IAddHyperLinkCommandParams, ICancelHyperLinkCommandParams, IUpdateHyperLinkCommandParams } from '@univerjs/sheets-hyper-link';import { CustomRangeType, DataStreamTreeTokenType, generateRandomId } from '@univerjs/core';import { FRange } from '@univerjs/sheets/facade';-import { AddHyperLinkCommand } from '../commands/commands/add-hyper-link.command';-import { CancelHyperLinkCommand } from '../commands/commands/remove-hyper-link.command';-import { UpdateHyperLinkCommand } from '../commands/commands/update-hyper-link.command';+import { AddHyperLinkCommand, CancelHyperLinkCommand, UpdateHyperLinkCommand } from '@univerjs/sheets-hyper-link';export interface ICellHyperLink {id: string;diff --git a/packages/sheets-hyper-link/src/facade/f-workbook.ts b/packages/sheets-hyper-link/src/facade/f-workbook.tsindex f2f2cf8f47..6396f55def 100644--- a/packages/sheets-hyper-link/src/facade/f-workbook.ts+++ b/packages/sheets-hyper-link/src/facade/f-workbook.ts@@ -15,9 +15,9 @@*/import type { IRange } from '@univerjs/core';-import type { ISheetHyperLinkInfo } from '../services/parser.service';+import type { ISheetHyperLinkInfo } from '@univerjs/sheets-hyper-link';import { FWorkbook } from '@univerjs/sheets/facade';-import { SheetsHyperLinkParserService } from '../services/parser.service';+import { SheetsHyperLinkParserService } from '@univerjs/sheets-hyper-link';interface IFWorkbookHyperlinkMixin {/**diff --git a/packages/sheets-numfmt/src/facade/f-range.ts b/packages/sheets-numfmt/src/facade/f-range.tsindex 4141f59841..6b0ce4b8ca 100644--- a/packages/sheets-numfmt/src/facade/f-range.ts+++ b/packages/sheets-numfmt/src/facade/f-range.ts@@ -14,9 +14,9 @@* limitations under the License.*/-import type { ISetNumfmtCommandParams } from '../commands/commands/set-numfmt.command';+import type { ISetNumfmtCommandParams } from '@univerjs/sheets-numfmt';import { FRange } from '@univerjs/sheets/facade';-import { SetNumfmtCommand } from '../commands/commands/set-numfmt.command';+import { SetNumfmtCommand } from '@univerjs/sheets-numfmt';interface IFRangeSheetsNumfmtMixin {// TODO@wzhudev: should separate numfmt package to twodiff --git a/packages/sheets-thread-comment/src/facade/f-range.ts b/packages/sheets-thread-comment/src/facade/f-range.tsindex 1d5bf2c383..b7674b6be2 100644--- a/packages/sheets-thread-comment/src/facade/f-range.ts+++ b/packages/sheets-thread-comment/src/facade/f-range.ts@@ -16,8 +16,8 @@import { ICommandService, type IDocumentBody, type Nullable, Tools, UserManagerService } from '@univerjs/core';import { FRange } from '@univerjs/sheets/facade';+import { SheetsThreadCommentModel } from '@univerjs/sheets-thread-comment';import { AddCommentCommand, DeleteCommentTreeCommand, getDT } from '@univerjs/thread-comment';-import { SheetsThreadCommentModel } from '../models/sheets-thread-comment.model';import { FThreadComment } from './f-thread-comment';interface IFRangeCommentMixin {diff --git a/packages/sheets-thread-comment/src/facade/f-thread-comment.ts b/packages/sheets-thread-comment/src/facade/f-thread-comment.tsindex e54af51b1a..78dc48857e 100644--- a/packages/sheets-thread-comment/src/facade/f-thread-comment.ts+++ b/packages/sheets-thread-comment/src/facade/f-thread-comment.ts@@ -19,8 +19,8 @@ import type { IBaseComment, IDeleteCommentCommandParams, IResolveCommentCommandPimport { ICommandService, Inject, Injector, IUniverInstanceService, UniverInstanceType } from '@univerjs/core';import { deserializeRangeWithSheet } from '@univerjs/engine-formula';import { FRange } from '@univerjs/sheets/facade';+import { SheetsThreadCommentModel } from '@univerjs/sheets-thread-comment';import { DeleteCommentCommand, DeleteCommentTreeCommand, getDT, ResolveCommentCommand, UpdateCommentCommand } from '@univerjs/thread-comment';-import { SheetsThreadCommentModel } from '../models/sheets-thread-comment.model';export class FThreadComment {constructor(diff --git a/packages/sheets-thread-comment/src/facade/f-worksheet.ts b/packages/sheets-thread-comment/src/facade/f-worksheet.tsindex f03230dc87..f6e733fbad 100644--- a/packages/sheets-thread-comment/src/facade/f-worksheet.ts+++ b/packages/sheets-thread-comment/src/facade/f-worksheet.ts@@ -15,7 +15,7 @@*/import { FWorksheet } from '@univerjs/sheets/facade';-import { SheetsThreadCommentModel } from '../models/sheets-thread-comment.model';+import { SheetsThreadCommentModel } from '@univerjs/sheets-thread-comment';import { FThreadComment } from './f-thread-comment';interface IFWorksheetCommentMixin {diff --git a/packages/sheets-ui/src/facade/f-range.ts b/packages/sheets-ui/src/facade/f-range.tsindex ace59123d4..65ca88e5ef 100644--- a/packages/sheets-ui/src/facade/f-range.ts+++ b/packages/sheets-ui/src/facade/f-range.ts@@ -19,11 +19,9 @@ import type { ComponentType } from '@univerjs/ui';import { DisposableCollection, generateRandomId, type IDisposable, type ISelectionCellWithMergeInfo, type Nullable } from '@univerjs/core';import { IRenderManagerService } from '@univerjs/engine-render';import { FRange } from '@univerjs/sheets/facade';+import { CellAlertManagerService, type ICanvasPopup, type ICellAlert, SheetCanvasPopManagerService } from '@univerjs/sheets-ui';+import { ISheetClipboardService, SheetSkeletonManagerService } from '@univerjs/sheets-ui';import { ComponentManager } from '@univerjs/ui';-import { type ICanvasPopup, SheetCanvasPopManagerService } from '../services/canvas-pop-manager.service';-import { CellAlertManagerService, type ICellAlert } from '../services/cell-alert-manager.service';-import { ISheetClipboardService } from '../services/clipboard/clipboard.service';-import { SheetSkeletonManagerService } from '../services/sheet-skeleton-manager.service';export interface IFComponentKey {/**diff --git a/packages/sheets-ui/src/facade/f-sheet-hooks.ts b/packages/sheets-ui/src/facade/f-sheet-hooks.tsindex 63a3f10666..07662a40af 100644--- a/packages/sheets-ui/src/facade/f-sheet-hooks.ts+++ b/packages/sheets-ui/src/facade/f-sheet-hooks.ts@@ -15,11 +15,9 @@*/import type { IDisposable, Nullable } from '@univerjs/core';-import type { IDragCellPosition } from '../services/drag-manager.service';-import type { IHoverCellPosition } from '../services/hover-manager.service';+import type { IDragCellPosition, IHoverCellPosition } from '@univerjs/sheets-ui';import { Inject, Injector, toDisposable } from '@univerjs/core';-import { DragManagerService } from '../services/drag-manager.service';-import { HoverManagerService } from '../services/hover-manager.service';+import { DragManagerService, HoverManagerService } from '@univerjs/sheets-ui';export class FSheetHooks {constructor(diff --git a/packages/sheets-ui/src/facade/f-univer.ts b/packages/sheets-ui/src/facade/f-univer.tsindex 5e96b495cc..a0159c2eb8 100644--- a/packages/sheets-ui/src/facade/f-univer.ts+++ b/packages/sheets-ui/src/facade/f-univer.ts@@ -26,7 +26,7 @@ import type {} from '@univerjs/engine-render';import { FUniver, toDisposable } from '@univerjs/core';import { IRenderManagerService } from '@univerjs/engine-render';-import { SHEET_VIEW_KEY } from '../common/keys';+import { SHEET_VIEW_KEY } from '@univerjs/sheets-ui';import '@univerjs/sheets/facade';interface IFUniverSheetsUIMixin {diff --git a/packages/sheets/src/facade/f-range.ts b/packages/sheets/src/facade/f-range.tsindex 9249cc0aa2..9a944b062a 100644--- a/packages/sheets/src/facade/f-range.ts+++ b/packages/sheets/src/facade/f-range.ts@@ -15,15 +15,11 @@*/import type { CellValue, ICellData, IColorStyle, IObjectMatrixPrimitiveType, IRange, IStyleData, ITextDecoration, Nullable, Workbook, Worksheet } from '@univerjs/core';-import type { ISetHorizontalTextAlignCommandParams, ISetStyleCommandParams, ISetTextWrapCommandParams, ISetVerticalTextAlignCommandParams, IStyleTypeValue } from '../commands/commands/set-style.command';+import type { ISetHorizontalTextAlignCommandParams, ISetStyleCommandParams, ISetTextWrapCommandParams, ISetVerticalTextAlignCommandParams, IStyleTypeValue } from '@univerjs/sheets';import type { FHorizontalAlignment, FVerticalAlignment } from './utils';import { BooleanNumber, Dimension, FBase, ICommandService, Inject, Injector, Rectangle, WrapStrategy } from '@univerjs/core';import { FormulaDataModel } from '@univerjs/engine-formula';-import { addMergeCellsUtil } from '../commands/commands/add-worksheet-merge.command';-import { RemoveWorksheetMergeCommand } from '../commands/commands/remove-worksheet-merge.command';-import { SetRangeValuesCommand } from '../commands/commands/set-range-values.command';-import { SetHorizontalTextAlignCommand, SetStyleCommand, SetTextWrapCommand, SetVerticalTextAlignCommand } from '../commands/commands/set-style.command';-import { getAddMergeMutationRangeByType } from '../controllers/merge-cell.controller';+import { addMergeCellsUtil, getAddMergeMutationRangeByType, RemoveWorksheetMergeCommand, SetHorizontalTextAlignCommand, SetRangeValuesCommand, SetStyleCommand, SetTextWrapCommand, SetVerticalTextAlignCommand } from '@univerjs/sheets';import { covertCellValue, covertCellValues, transformCoreHorizontalAlignment, transformCoreVerticalAlignment, transformFacadeHorizontalAlignment, transformFacadeVerticalAlignment } from './utils';export type FontLine = 'none' | 'underline' | 'line-through';diff --git a/packages/sheets/src/facade/f-workbook.ts b/packages/sheets/src/facade/f-workbook.tsindex 33169daf04..6f0631c383 100644--- a/packages/sheets/src/facade/f-workbook.ts+++ b/packages/sheets/src/facade/f-workbook.ts@@ -15,16 +15,9 @@*/import type { CommandListener, ICommandInfo, IDisposable, IRange, IWorkbookData, Workbook } from '@univerjs/core';-import type { ISetSelectionsOperationParams } from '../commands/operations/selection.operation';-import type { ISheetCommandSharedParams } from '../commands/utils/interface';+import type { ISetSelectionsOperationParams, ISheetCommandSharedParams } from '@univerjs/sheets';import { FBase, ICommandService, ILogService, Inject, Injector, IPermissionService, IResourceLoaderService, IUniverInstanceService, mergeWorksheetSnapshotWithDefault, RedoCommand, toDisposable, UndoCommand, UniverInstanceType } from '@univerjs/core';-import { InsertSheetCommand } from '../commands/commands/insert-sheet.command';-import { RemoveSheetCommand } from '../commands/commands/remove-sheet.command';-import { getPrimaryForRange } from '../commands/commands/utils/selection-utils';-import { SetSelectionsOperation } from '../commands/operations/selection.operation';-import { SetWorksheetActiveOperation } from '../commands/operations/set-worksheet-active.operation';-import { WorkbookEditablePermission } from '../services/permission/permission-point';-import { SheetsSelectionsService } from '../services/selections/selection-manager.service';+import { getPrimaryForRange, InsertSheetCommand, RemoveSheetCommand, SetSelectionsOperation, SetWorksheetActiveOperation, SheetsSelectionsService, WorkbookEditablePermission } from '@univerjs/sheets';import { FRange } from './f-range';import { FWorksheet } from './f-worksheet';@@ -68,7 +61,7 @@ export class FWorkbook extends FBase {* @memberof FWorkbook*/getSnapshot(): IWorkbookData {- this._logService.warn(`use 'save' instead of 'getSnapshot'`);+ this._logService.warn('use \'save\' instead of \'getSnapshot\'');return this.save();}@@ -140,7 +133,7 @@ export class FWorkbook extends FBase {/*** Get a worksheet by sheet name.- * @param name The name of the sheet to get.+ * @param name The name of the sheet to get.* @returns The worksheet with given sheet name*/getSheetByName(name: string): FWorksheet | null {diff --git a/packages/sheets/src/facade/f-worksheet.ts b/packages/sheets/src/facade/f-worksheet.tsindex db498d1d7a..1c5592cdc2 100644--- a/packages/sheets/src/facade/f-worksheet.ts+++ b/packages/sheets/src/facade/f-worksheet.ts@@ -15,28 +15,11 @@*/import type { CustomData, ICellData, IColumnData, IDisposable, IFreeze, IObjectArrayPrimitiveType, IRange, IRowData, IStyleData, Nullable, Workbook, Worksheet } from '@univerjs/core';-import type { ISetColDataCommandParams } from '../commands/commands/set-col-data.command';-import type { ISetRowDataCommandParams } from '../commands/commands/set-row-data.command';-import type { IToggleGridlinesCommandParams } from '../commands/commands/toggle-gridlines.command';-import type { ISetRangeValuesMutationParams } from '../commands/mutations/set-range-values.mutation';+import type { ISetColDataCommandParams, ISetRangeValuesMutationParams, ISetRowDataCommandParams, IToggleGridlinesCommandParams } from '@univerjs/sheets';import type { FWorkbook } from './f-workbook';import { BooleanNumber, Direction, FBase, ICommandService, Inject, Injector, ObjectMatrix, RANGE_TYPE } from '@univerjs/core';import { deserializeRangeWithSheet } from '@univerjs/engine-formula';-import { InsertColCommand, InsertRowCommand } from '../commands/commands/insert-row-col.command';-import { MoveColsCommand, MoveRowsCommand } from '../commands/commands/move-rows-cols.command';-import { RemoveColCommand, RemoveRowCommand } from '../commands/commands/remove-row-col.command';-import { SetColDataCommand } from '../commands/commands/set-col-data.command';-import { SetColHiddenCommand, SetSpecificColsVisibleCommand } from '../commands/commands/set-col-visible.command';-import { CancelFrozenCommand, SetFrozenCommand } from '../commands/commands/set-frozen.command';-import { SetRowDataCommand } from '../commands/commands/set-row-data.command';-import { SetRowHiddenCommand, SetSpecificRowsVisibleCommand } from '../commands/commands/set-row-visible.command';-import { SetColWidthCommand } from '../commands/commands/set-worksheet-col-width.command';-import { SetRowHeightCommand, SetWorksheetRowIsAutoHeightCommand } from '../commands/commands/set-worksheet-row-height.command';-import { ToggleGridlinesCommand } from '../commands/commands/toggle-gridlines.command';-import { copyRangeStyles } from '../commands/commands/utils/selection-utils';-import { SetRangeValuesMutation } from '../commands/mutations/set-range-values.mutation';-import { SetWorksheetDefaultStyleMutation } from '../commands/mutations/set-worksheet-default-style.mutation';-import { SheetsSelectionsService } from '../services/selections/selection-manager.service';+import { CancelFrozenCommand, copyRangeStyles, InsertColCommand, InsertRowCommand, MoveColsCommand, MoveRowsCommand, RemoveColCommand, RemoveRowCommand, SetColDataCommand, SetColHiddenCommand, SetColWidthCommand, SetFrozenCommand, SetRangeValuesMutation, SetRowDataCommand, SetRowHeightCommand, SetRowHiddenCommand, SetSpecificColsVisibleCommand, SetSpecificRowsVisibleCommand, SetWorksheetDefaultStyleMutation, SetWorksheetRowIsAutoHeightCommand, SheetsSelectionsService, ToggleGridlinesCommand } from '@univerjs/sheets';import { FRange } from './f-range';import { FSelection } from './f-selection';import { covertToColRange, covertToRowRange } from './utils';diff --git a/packages/ui/src/facade/f-hooks.ts b/packages/ui/src/facade/f-hooks.tsindex 020653a6b9..389e89c2aa 100644--- a/packages/ui/src/facade/f-hooks.ts+++ b/packages/ui/src/facade/f-hooks.ts@@ -16,7 +16,7 @@import type { IDisposable } from '@univerjs/core';import { FHooks, ICommandService } from '@univerjs/core';-import { CopyCommand, PasteCommand } from '../services/clipboard/clipboard.command';+import { CopyCommand, PasteCommand } from '@univerjs/ui';interface IFHooksSheetsUIMixin {/**diff --git a/packages/ui/src/facade/f-univer.ts b/packages/ui/src/facade/f-univer.tsindex 2b6ef0a337..82c3c1edbd 100644--- a/packages/ui/src/facade/f-univer.ts+++ b/packages/ui/src/facade/f-univer.ts@@ -15,12 +15,9 @@*/import type { IDisposable } from '@univerjs/core';-import type { IDialogPartMethodOptions } from '../views/components/dialog-part/interface';-import type { ISidebarMethodOptions } from '../views/components/sidebar/interface';+import type { IDialogPartMethodOptions, ISidebarMethodOptions } from '@univerjs/ui';import { FUniver } from '@univerjs/core';-import { CopyCommand, PasteCommand } from '../services/clipboard/clipboard.command';-import { IDialogService } from '../services/dialog/dialog.service';-import { ISidebarService } from '../services/sidebar/sidebar.service';+import { CopyCommand, IDialogService, ISidebarService, PasteCommand } from '@univerjs/ui';interface IFUniverUIMixin {copy(): Promise<boolean>;diff --git a/packages/watermark/src/facade/f-univer.ts b/packages/watermark/src/facade/f-univer.tsindex 3dd67e34d4..227aaa4b1e 100644--- a/packages/watermark/src/facade/f-univer.ts+++ b/packages/watermark/src/facade/f-univer.ts@@ -14,11 +14,9 @@* limitations under the License.*/-import type { IImageWatermarkConfig, ITextWatermarkConfig } from '../common/type';+import type { IImageWatermarkConfig, ITextWatermarkConfig } from '@univerjs/watermark';import { FUniver } from '@univerjs/core';-import { WatermarkImageBaseConfig, WatermarkTextBaseConfig } from '../common/const';-import { IWatermarkTypeEnum } from '../common/type';-import { WatermarkService } from '../services/watermark.service';+import { IWatermarkTypeEnum, WatermarkImageBaseConfig, WatermarkService, WatermarkTextBaseConfig } from '@univerjs/watermark';interface IFUniverWatermarkMixin {/**