Skip to content

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.

feat(*): add type exports for configurations (#5445)

白熱d9989e79956f
diff --git a/common/shared/eslint/index.ts b/common/shared/eslint/index.ts
index 9b87d17bf0..49332be8fc 100644
--- a/common/shared/eslint/index.ts
+++ b/common/shared/eslint/index.ts
@@ -184,6 +184,7 @@ export const typescriptPreset = (): any => {
leadingUnderscore: 'require',
},
],
+ // 'ts/consistent-type-exports': 'warn',
},
languageOptions: {
parser: typescriptParser,
diff --git a/eslint.config.ts b/eslint.config.ts
index 901a232ada..8b60e8775e 100644
--- a/eslint.config.ts
+++ b/eslint.config.ts
@@ -97,12 +97,6 @@ export default antfu(
'penetrating/no-penetrating-import': 2,
},
},
- {
- files: ['**/*/src/index.ts'],
- rules: {
- 'perfectionist/sort-exports': 'off',
- },
- },
typescriptPreset(),
univerSourcePreset(),
facadePreset(),
diff --git a/packages-experimental/debugger/src/index.ts b/packages-experimental/debugger/src/index.ts
index 49b638f04e..c2ddbb18cc 100644
--- a/packages-experimental/debugger/src/index.ts
+++ b/packages-experimental/debugger/src/index.ts
@@ -16,4 +16,5 @@
import './global.css';
+export type { IUniverDebuggerConfig } from './controllers/config.schema';
export { UniverDebuggerPlugin } from './plugin';
diff --git a/packages-experimental/uni-formula/src/index.ts b/packages-experimental/uni-formula/src/index.ts
index 20581932b0..cfc6283a98 100644
--- a/packages-experimental/uni-formula/src/index.ts
+++ b/packages-experimental/uni-formula/src/index.ts
@@ -14,14 +14,6 @@
* limitations under the License.
*/
-export { UniverDocUniFormulaPlugin } from './plugin';
-export { DumbUniFormulaService, IUniFormulaService } from './services/uni-formula.service';
-export { UNI_FORMULA_PLUGIN_NAME as DOC_FORMULA_PLUGIN_NAME } from './const';
-export type { IDocFormulaCache, IDocFormulaData, IDocFormulaReference } from './models/doc-formula';
-export type { ISlideFormulaCache, ISlideFormulaData, ISlideFormulaReference } from './models/slide-formula';
-
-// #region - all commands
-
export {
AddDocUniFormulaMutation,
type IAddDocUniFormulaMutationParams,
@@ -30,5 +22,8 @@ export {
RemoveDocUniFormulaMutation,
UpdateDocUniFormulaMutation,
} from './commands/mutations/doc-formula.mutation';
-
-// #endregion
+export { UNI_FORMULA_PLUGIN_NAME as DOC_FORMULA_PLUGIN_NAME } from './const';
+export type { IDocFormulaCache, IDocFormulaData, IDocFormulaReference } from './models/doc-formula';
+export type { ISlideFormulaCache, ISlideFormulaData, ISlideFormulaReference } from './models/slide-formula';
+export { UniverDocUniFormulaPlugin } from './plugin';
+export { DumbUniFormulaService, IUniFormulaService } from './services/uni-formula.service';
diff --git a/packages-experimental/uniui/src/index.ts b/packages-experimental/uniui/src/index.ts
index d0708b8232..f6b8726e59 100644
--- a/packages-experimental/uniui/src/index.ts
+++ b/packages-experimental/uniui/src/index.ts
@@ -16,13 +16,13 @@
import './global.css';
-export { UniverUniUIPlugin } from './plugin';
-export { UniUIPart } from './views/outline/Outline';
-export { getGridUnitLocalCacheKey, type IProjectNode, type IUnitGrid, IUnitGridService, UnitGridService } from './services/unit-grid/unit-grid.service';
-export { UniFloatToolbarUIPart } from './views/uni-toolbar/UniFloatToolbar';
export { SetFlowViewportOperation } from './commands/operations/set-flow-viewport.operation';
export { UniFocusUnitOperation } from './commands/operations/uni-focus-unit.operation';
export { DELETE_MENU_ID, DOWNLOAD_MENU_ID, FONT_GROUP_MENU_ID, LOCK_MENU_ID, PRINT_MENU_ID, SHARE_MENU_ID, UNI_MENU_POSITIONS, ZEN_MENU_ID } from './controllers/menu';
+export { generateCloneMutation } from './controllers/utils';
+export { UniverUniUIPlugin } from './plugin';
export { UniToolbarService } from './services/toolbar/uni-toolbar-service';
export { BuiltinUniToolbarItemId } from './services/toolbar/uni-toolbar-service';
-export { generateCloneMutation } from './controllers/utils';
+export { getGridUnitLocalCacheKey, type IProjectNode, type IUnitGrid, IUnitGridService, UnitGridService } from './services/unit-grid/unit-grid.service';
+export { UniUIPart } from './views/outline/Outline';
+export { UniFloatToolbarUIPart } from './views/uni-toolbar/UniFloatToolbar';
diff --git a/packages/action-recorder/src/index.ts b/packages/action-recorder/src/index.ts
index 5eba432bb3..4f36853c6e 100644
--- a/packages/action-recorder/src/index.ts
+++ b/packages/action-recorder/src/index.ts
@@ -16,6 +16,7 @@
import './global.css';
+export type { IUniverActionRecorderConfig } from './controllers/config.schema';
export { UniverActionRecorderPlugin } from './plugin';
export { ActionRecorderService } from './services/action-recorder.service';
export { ActionReplayService } from './services/replay.service';
diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts
index 7876695271..c5df8ce97a 100644
--- a/packages/core/src/index.ts
+++ b/packages/core/src/index.ts
@@ -17,20 +17,21 @@
import { installShims } from './common/shims';
installShims();
-export { getPlainText } from './docs/data-model/text-x/build-utils/parse';
-export { debounce, get, merge, mergeWith, set } from 'lodash-es';
-export { textDiff } from './shared/text-diff';
+
export { dedupe, dedupeBy, groupBy, makeArray, remove, rotate } from './common/array';
+export * from './common/async';
export { isBooleanString } from './common/boolean';
export * from './common/const';
export * from './common/di';
-export * from './common/async';
export { shallowEqual } from './common/equal';
-export { ParagraphStyleBuilder, ParagraphStyleValue, RichTextBuilder, RichTextValue, TextDecorationBuilder, TextStyleBuilder, TextStyleValue } from './docs/data-model/rich-text-builder';
export { CanceledError, CustomCommandExecutionError } from './common/error';
export { throttle } from './common/function';
export type { IAsyncInterceptor, ICellInterceptor, IComposeInterceptors, IInterceptor, InterceptorHandler } from './common/interceptor';
export { AsyncInterceptorManager, composeInterceptors, createAsyncInterceptorKey, createInterceptorKey, InterceptorEffectEnum, InterceptorManager } from './common/interceptor';
+export { invertColorByHSL } from './common/invert-color/invert-hsl';
+// invert color utils
+export { invertColorByMatrix } from './common/invert-color/invert-rgb';
+export type { RGBColorType } from './common/invert-color/utils';
export type { Serializable } from './common/json';
export { MemoryCursor } from './common/memory-cursor';
export { mixinClass } from './common/mixin';
@@ -44,6 +45,7 @@ export * from './docs/data-model';
export { JSON1, JSONX } from './docs/data-model/json-x/json-x';
export type { JSONXActions, JSONXPath } from './docs/data-model/json-x/json-x';
export { replaceInDocumentBody } from './docs/data-model/replacement';
+export { ParagraphStyleBuilder, ParagraphStyleValue, RichTextBuilder, RichTextValue, TextDecorationBuilder, TextStyleBuilder, TextStyleValue } from './docs/data-model/rich-text-builder';
export { DEFAULT_DOCUMENT_SUB_COMPONENT_ID } from './docs/data-model/subdocument';
export { ActionIterator } from './docs/data-model/text-x/action-iterator';
export {
@@ -56,6 +58,7 @@ export {
export { normalizeTextRuns } from './docs/data-model/text-x/apply-utils/common';
export { updateAttributeByDelete } from './docs/data-model/text-x/apply-utils/delete-apply';
export { updateAttributeByInsert } from './docs/data-model/text-x/apply-utils/insert-apply';
+export { getPlainText } from './docs/data-model/text-x/build-utils/parse';
export { TextX } from './docs/data-model/text-x/text-x';
export type { TPriority } from './docs/data-model/text-x/text-x';
export {
@@ -74,8 +77,6 @@ export {
export { EventState, EventSubject, fromEventSubject, type IEventObserver } from './observer/observable';
export { AuthzIoLocalService } from './services/authz-io/authz-io-local.service';
export { IAuthzIoService } from './services/authz-io/type';
-export { MentionIOLocalService } from './services/mention-io/mention-io-local.service';
-export { type IListMentionParam, type IListMentionResponse, IMentionIOService, type ITypeMentionList } from './services/mention-io/type';
export {
type CommandListener,
CommandService,
@@ -99,34 +100,28 @@ export { ConfigService } from './services/config/config.service';
export * from './services/context/context';
export { ContextService, IContextService } from './services/context/context.service';
export { ErrorService, type IError } from './services/error/error.service';
+export { IImageIoService, type IImageIoServiceParam, ImageSourceType, ImageUploadStatusType } from './services/image-io/image-io.service';
export { type ICreateUnitOptions, IUniverInstanceService, UniverInstanceService } from './services/instance/instance.service';
export { LifecycleStages } from './services/lifecycle/lifecycle';
export { LifecycleService, LifecycleUnreachableError } from './services/lifecycle/lifecycle.service';
export { ILocalStorageService } from './services/local-storage/local-storage.service';
export { LocaleService } from './services/locale/locale.service';
export { DesktopLogService, ILogService, LogLevel } from './services/log/log.service';
+export { MentionIOLocalService } from './services/mention-io/mention-io-local.service';
+export { type IListMentionParam, type IListMentionResponse, IMentionIOService, type ITypeMentionList } from './services/mention-io/type';
export { PermissionService } from './services/permission/permission.service';
-export {
- IPermissionService,
- PermissionStatus,
-} from './services/permission/type';
+export { IPermissionService, PermissionStatus } from './services/permission/type';
export type { IPermissionParam } from './services/permission/type';
-
-// #region sheet
-
export type { IPermissionPoint } from './services/permission/type';
export type { IPermissionTypes, RangePermissionPointConstructor, WorkbookPermissionPointConstructor, WorkSheetPermissionPointConstructor } from './services/permission/type';
+export { type DependencyOverride, mergeOverrideWithDependencies } from './services/plugin/plugin-override';
export type { PluginCtor } from './services/plugin/plugin.service';
export { DependentOn, Plugin, PluginService } from './services/plugin/plugin.service';
-export { type DependencyOverride, mergeOverrideWithDependencies } from './services/plugin/plugin-override';
export { IResourceLoaderService } from './services/resource-loader/type';
export { ResourceManagerService } from './services/resource-manager/resource-manager.service';
export type { IResourceHook, IResources } from './services/resource-manager/type';
export { IResourceManagerService } from './services/resource-manager/type';
export { ThemeService } from './services/theme/theme.service';
-
-// #region sheet
-
export {
type IUndoRedoCommandInfos,
type IUndoRedoCommandInfosByInterceptor,
@@ -142,13 +137,20 @@ export {
export { createDefaultUser } from './services/user-manager/const';
export { type IUser, UserManagerService } from './services/user-manager/user-manager.service';
export * from './shared';
+export { ImageCacheMap } from './shared/cache/image-cache';
export { isBlackColor, isWhiteColor } from './shared/color/color-kit';
export { cellToRange } from './shared/common';
-export { getIntersectRange } from './shared/range';
export { nameCharacterCheck } from './shared/name';
+export { type BBox, type IRTreeItem, RBush, RTree } from './shared/r-tree';
+export { getIntersectRange } from './shared/range';
export { afterTime, bufferDebounceTime, convertObservableToBehaviorSubject, fromCallback, takeAfter } from './shared/rxjs';
+export { textDiff } from './shared/text-diff';
export { awaitTime, delayAnimationFrame } from './shared/timer';
+export { isNodeEnv } from './shared/tools';
export { Range } from './sheets/range';
+export { getCellCoordByIndexSimple, getCellPositionByIndexSimple, getCellWithCoordByIndexCore, SheetSkeleton } from './sheets/sheet-skeleton';
+export type { IGetRowColByPosOptions } from './sheets/sheet-skeleton';
+export * from './sheets/sheet-skeleton';
export {
DEFAULT_WORKSHEET_COLUMN_COUNT,
DEFAULT_WORKSHEET_COLUMN_COUNT_KEY,
@@ -164,18 +166,16 @@ export {
DEFAULT_WORKSHEET_ROW_TITLE_WIDTH_KEY,
mergeWorksheetSnapshotWithDefault,
} from './sheets/sheet-snapshot-utils';
+
export { Styles } from './sheets/styles';
export * from './sheets/typedef';
+export type { IPosition } from './sheets/typedef';
export { addLinkToDocumentModel, isNotNullOrUndefined, isRangesEqual, isUnitRangesEqual } from './sheets/util';
-export { SheetViewModel } from './sheets/view-model';
export { createDocumentModelWithStyle } from './sheets/util';
-export { ImageCacheMap } from './shared/cache/image-cache';
-export { IImageIoService, type IImageIoServiceParam, ImageSourceType, ImageUploadStatusType } from './services/image-io/image-io.service';
-// #endregion
-
+export { SheetViewModel } from './sheets/view-model';
export { getWorksheetUID, Workbook } from './sheets/workbook';
export { extractPureTextFromCell, getOriginCellValue, Worksheet } from './sheets/worksheet';
-
+export { Skeleton } from './skeleton';
export { SlideDataModel } from './slides/slide-model';
export * from './types/const';
export { skipParseTagNames } from './types/const/clipboard';
@@ -186,20 +186,8 @@ export { DataValidationOperator } from './types/enum/data-validation-operator';
export { DataValidationRenderMode } from './types/enum/data-validation-render-mode';
export { DataValidationStatus } from './types/enum/data-validation-status';
export { DataValidationType } from './types/enum/data-validation-type';
-export { getCellCoordByIndexSimple, getCellPositionByIndexSimple, getCellWithCoordByIndexCore, SheetSkeleton } from './sheets/sheet-skeleton';
export * from './types/interfaces';
export type { ICellCustomRender, ICellRenderContext } from './types/interfaces/i-cell-custom-render';
export type { IDataValidationRule, IDataValidationRuleBase, IDataValidationRuleInfo, IDataValidationRuleOptions, ISheetDataValidationRule } from './types/interfaces/i-data-validation';
-export { type BBox, type IRTreeItem, RBush, RTree } from './shared/r-tree';
-
export { type IUniverConfig, Univer } from './univer';
-export { isNodeEnv } from './shared/tools';
-export { Skeleton } from './skeleton';
-export type { IGetRowColByPosOptions } from './sheets/sheet-skeleton';
-export type { IPosition } from './sheets/typedef';
-export * from './sheets/sheet-skeleton';
-
-// invert color utils
-export { invertColorByMatrix } from './common/invert-color/invert-rgb';
-export { invertColorByHSL } from './common/invert-color/invert-hsl';
-export type { RGBColorType } from './common/invert-color/utils';
+export { debounce, get, merge, mergeWith, set } from 'lodash-es';
diff --git a/packages/data-validation/src/index.ts b/packages/data-validation/src/index.ts
index 635f56bc81..125cd8e91f 100644
--- a/packages/data-validation/src/index.ts
+++ b/packages/data-validation/src/index.ts
@@ -15,11 +15,16 @@
*/
export {
- getRuleOptions,
- getRuleSetting,
-} from './common/util';
+ AddDataValidationMutation,
+ type IAddDataValidationMutationParams,
+ type IRemoveDataValidationMutationParams,
+ type IUpdateDataValidationMutationParams,
+ RemoveDataValidationMutation,
+ UpdateDataValidationMutation,
+} from './commands/mutations/data-validation.mutation';
+export { getRuleOptions, getRuleSetting } from './common/util';
+export { type IUniverDataValidationConfig } from './controllers/config.schema';
export { DataValidationResourceController } from './controllers/dv-resource.controller';
-
export { type DataValidationChangeSource, type DataValidationChangeType, DataValidationModel, type IRuleChange } from './models/data-validation-model';
export { UniverDataValidationPlugin } from './plugin';
export { DataValidatorRegistryScope, DataValidatorRegistryService } from './services/data-validator-registry.service';
@@ -33,18 +38,7 @@ export type { IUpdateRuleOptionsPayload, IUpdateRulePayload, IUpdateRuleRangePay
export { BaseDataValidator } from './validators/base-data-validator';
export type { IFormulaResult, IValidatorCellInfo } from './validators/base-data-validator';
export type { IFormulaValidResult } from './validators/base-data-validator';
-export type { IBaseDataValidationWidget } from './validators/base-widget';
export { DataValidatorDropdownType } from './validators/base-data-validator';
export { FORMULA1, FORMULA2, TYPE } from './validators/base-data-validator';
-// #region - all commands
-export {
- AddDataValidationMutation,
- type IAddDataValidationMutationParams,
- type IRemoveDataValidationMutationParams,
- type IUpdateDataValidationMutationParams,
- RemoveDataValidationMutation,
- UpdateDataValidationMutation,
-} from './commands/mutations/data-validation.mutation';
-
-// #endregion
+export type { IBaseDataValidationWidget } from './validators/base-widget';
diff --git a/packages/design/src/index.ts b/packages/design/src/index.ts
index 391bb7d075..98af80c998 100644
--- a/packages/design/src/index.ts
+++ b/packages/design/src/index.ts
@@ -16,53 +16,45 @@
import './global.css';
+export { Accordion, type IAccordionProps } from './components/accordion/Accordion';
export { Avatar, type IAvatarProps } from './components/avatar/Avatar';
+export { Badge, type IBadgeProps } from './components/badge/Badge';
export { Button, type IButtonProps } from './components/button/Button';
export { ButtonGroup, type IButtonGroupProps } from './components/button/ButtonGroup';
export { CascaderList, type ICascaderListProps, type ICascaderOption } from './components/cascader-list/CascaderList';
-export { Checkbox, type ICheckboxProps } from './components/checkbox/Checkbox';
export { CheckboxGroup, type ICheckboxGroupProps } from './components/checkbox-group/CheckboxGroup';
+export { Checkbox, type ICheckboxProps } from './components/checkbox/Checkbox';
export { ColorPicker, type IColorPickerProps } from './components/color-picker/ColorPicker';
export { ConfigContext, ConfigProvider, type IConfigProviderProps } from './components/config-provider/ConfigProvider';
export { Confirm, type IConfirmProps } from './components/confirm/Confirm';
+export { DatePanel, DatePicker, type IDatePanelProps, type IDatePickerProps } from './components/date-picker';
+export { DateRangePicker } from './components/date-range-picker';
export { Dialog, type IDialogProps } from './components/dialog/Dialog';
+export { DraggableList, type IDraggableListProps, ReactGridLayout } from './components/draggable-list';
+export { DropdownLegacy, type IDropdownLegacyProps } from './components/dropdown-legacy';
+export { DropdownMenu, type IDropdownMenuProps } from './components/dropdown-menu/DropdownMenu';
export { Dropdown, type IDropdownProps } from './components/dropdown/Dropdown';
+export { FormDualColumnLayout, FormLayout, type IFormDualColumnLayoutProps, type IFormLayoutProps } from './components/form-layout';
+export { Gallery, type IGalleryProps } from './components/gallery/Gallery';
export { HoverCard, type IHoverCardProps } from './components/hover-card/HoverCard';
-export { type IInputProps, Input } from './components/input/Input';
export { type IInputNumberProps, InputNumber } from './components/input-number/InputNumber';
+export { type IInputProps, Input } from './components/input/Input';
+export { type IKBDProps, KBD } from './components/kbd/Kbd';
+export { Menu, MenuItem, MenuItemGroup, type MenuRef, SubMenu, TinyMenuGroup } from './components/menu';
export { type IMessageProps, message, Messager, MessageType, removeMessage } from './components/message/Message';
export { type IPagerProps, Pager } from './components/pager/Pager';
-export { type IRadioProps, Radio } from './components/radio/Radio';
+export { type IPopupProps, Popup } from './components/popup';
export { type IRadioGroupProps, RadioGroup } from './components/radio-group/RadioGroup';
-export { type ISelectProps, Select } from './components/select/Select';
-export { type IMultipleSelectProps, MultipleSelect } from './components/select/MultipleSelect';
-export { Badge, type IBadgeProps } from './components/badge/Badge';
-export { type ISelectListProps, SelectList } from './components/select-list/SelectList';
+export { type IRadioProps, Radio } from './components/radio/Radio';
export { Segmented } from './components/segmented/Segmented';
-export { type ITooltipProps, Tooltip } from './components/tooltip/Tooltip';
-export { Switch } from './components/switch/Switch';
-export { DropdownMenu, type IDropdownMenuProps } from './components/dropdown-menu/DropdownMenu';
+export { type ISelectListProps, SelectList } from './components/select-list/SelectList';
+export { type IMultipleSelectProps, MultipleSelect } from './components/select/MultipleSelect';
+export { type ISelectProps, Select } from './components/select/Select';
export { Separator } from './components/separator/Separator';
-export { type IKBDProps, KBD } from './components/kbd/Kbd';
+export { Switch } from './components/switch/Switch';
export { type IToasterProps, toast, Toaster } from './components/toaster/Toaster';
-export { Accordion, type IAccordionProps } from './components/accordion/Accordion';
-export { Gallery, type IGalleryProps } from './components/gallery/Gallery';
-
-export { DatePanel, DatePicker, type IDatePanelProps, type IDatePickerProps } from './components/date-picker';
-export { DropdownLegacy, type IDropdownLegacyProps } from './components/dropdown-legacy';
-export { FormDualColumnLayout, FormLayout, type IFormDualColumnLayoutProps, type IFormLayoutProps } from './components/form-layout';
-export { DraggableList, type IDraggableListProps, ReactGridLayout } from './components/draggable-list';
+export { type ITooltipProps, Tooltip } from './components/tooltip/Tooltip';
export { filterLeafNode, findNodePathFromTree, findSubTreeFromPath, type ITreeNodeProps, type ITreeProps, mergeTreeSelected, Tree, TreeSelectionMode } from './components/tree';
-export { Menu, MenuItem, MenuItemGroup, type MenuRef, SubMenu, TinyMenuGroup } from './components/menu';
-export { type IPopupProps, Popup } from './components/popup';
-export { DateRangePicker } from './components/date-range-picker';
-
-export { type ILocale } from './locale/interface';
-
-export { clsx } from './helper/clsx';
-export { resizeObserverCtor } from './helper/resize-observer';
-export { render, unmount } from './helper/react-dom';
-export { isBrowser } from './helper/is-browser';
export {
borderBottomClassName,
borderClassName,
@@ -74,6 +66,11 @@ export {
divideYClassName,
scrollbarClassName,
} from './helper/class-utilities';
+export { clsx } from './helper/clsx';
+export { isBrowser } from './helper/is-browser';
+export { render, unmount } from './helper/react-dom';
+export { resizeObserverCtor } from './helper/resize-observer';
+export { type ILocale } from './locale/interface';
/** @deprecated Only for compatibility with versions before 0.7.0, will be removed in future versions */
export { defaultTheme, greenTheme } from '@univerjs/themes';
diff --git a/packages/docs-drawing-ui/src/index.ts b/packages/docs-drawing-ui/src/index.ts
index 72f70e7d81..6bfd1b730d 100644
--- a/packages/docs-drawing-ui/src/index.ts
+++ b/packages/docs-drawing-ui/src/index.ts
@@ -16,22 +16,18 @@
import './global.css';
-export { UniverDocsDrawingUIPlugin } from './plugin';
-export { DOCS_IMAGE_MENU_ID } from './views/menu/image.menu';
-export { DocFloatDomController } from './controllers/doc-float-dom.controller';
-// #region - all commands
-
export { DeleteDocDrawingsCommand } from './commands/commands/delete-doc-drawing.command';
export { GroupDocDrawingCommand } from './commands/commands/group-doc-drawing.command';
export { InsertDocDrawingCommand } from './commands/commands/insert-doc-drawing.command';
+export { InsertDocImageCommand } from './commands/commands/insert-image.command';
export { MoveDocDrawingsCommand } from './commands/commands/move-drawings.command';
export { RemoveDocDrawingCommand } from './commands/commands/remove-doc-drawing.command';
export { SetDocDrawingArrangeCommand } from './commands/commands/set-drawing-arrange.command';
export { UngroupDocDrawingCommand } from './commands/commands/ungroup-doc-drawing.command';
-
export { ClearDocDrawingTransformerOperation } from './commands/operations/clear-drawing-transformer.operation';
export { EditDocDrawingOperation } from './commands/operations/edit-doc-drawing.operation';
-export { InsertDocImageCommand } from './commands/commands/insert-image.command';
export { SidebarDocDrawingOperation } from './commands/operations/open-drawing-panel.operation';
-
-// #endregion
+export { type IUniverDocsDrawingUIConfig } from './controllers/config.schema';
+export { DocFloatDomController } from './controllers/doc-float-dom.controller';
+export { UniverDocsDrawingUIPlugin } from './plugin';
+export { DOCS_IMAGE_MENU_ID } from './views/menu/image.menu';
diff --git a/packages/docs-drawing/src/index.ts b/packages/docs-drawing/src/index.ts
index 6fd7b74f6c..a8ec24f1bc 100644
--- a/packages/docs-drawing/src/index.ts
+++ b/packages/docs-drawing/src/index.ts
@@ -14,9 +14,9 @@
* limitations under the License.
*/
-export { UniverDocsDrawingPlugin } from './plugin';
-export { DocDrawingService, type IDocDrawing, IDocDrawingService, type IDocImage } from './services/doc-drawing.service';
-
+export type { IUniverDocsDrawingConfig } from './controllers/config.schema';
export { DOCS_DRAWING_PLUGIN, type IDocDrawingModel } from './controllers/doc-drawing.controller';
export { DocDrawingController } from './controllers/doc-drawing.controller';
+export { UniverDocsDrawingPlugin } from './plugin';
+export { DocDrawingService, type IDocDrawing, IDocDrawingService, type IDocImage } from './services/doc-drawing.service';
export { type IDocFloatDom } from './services/doc-drawing.service';
diff --git a/packages/docs-hyper-link-ui/src/index.ts b/packages/docs-hyper-link-ui/src/index.ts
index f2e36fa959..4ef9d9c0a8 100644
--- a/packages/docs-hyper-link-ui/src/index.ts
+++ b/packages/docs-hyper-link-ui/src/index.ts
@@ -16,4 +16,5 @@
import './global.css';
+export type { IUniverDocsHyperLinkUIConfig } from './controllers/config.schema';
export { UniverDocsHyperLinkUIPlugin } from './plugin';
diff --git a/packages/docs-hyper-link/src/index.ts b/packages/docs-hyper-link/src/index.ts
index 3b22aacd2d..63a05ee598 100644
--- a/packages/docs-hyper-link/src/index.ts
+++ b/packages/docs-hyper-link/src/index.ts
@@ -14,4 +14,5 @@
* limitations under the License.
*/
+export type { IUniverDocsHyperLinkConfig } from './controllers/config.schema';
export { UniverDocsHyperLinkPlugin } from './plugin';
diff --git a/packages/docs-mention-ui/src/index.ts b/packages/docs-mention-ui/src/index.ts
index 9f4d27e396..fc26a7d636 100644
--- a/packages/docs-mention-ui/src/index.ts
+++ b/packages/docs-mention-ui/src/index.ts
@@ -16,5 +16,6 @@
import './global.css';
-export { DocMentionPopupService } from './services/doc-mention-popup.service';
+export type { IUniverDocsMentionUIConfig } from './controllers/config.schema';
export { UniverDocsMentionUIPlugin } from './plugin';
+export { DocMentionPopupService } from './services/doc-mention-popup.service';
diff --git a/packages/docs-quick-insert-ui/src/controllers/config.schema.ts b/packages/docs-quick-insert-ui/src/controllers/config.schema.ts
new file mode 100644
index 0000000000..4bea3dbf0c
--- /dev/null
+++ b/packages/docs-quick-insert-ui/src/controllers/config.schema.ts
@@ -0,0 +1,27 @@
+/**
+ * Copyright 2023-present DreamNum Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import type { MenuConfig } from '@univerjs/ui';
+
+export const DOCS_QUICK_INSERT_UI_PLUGIN_CONFIG_KEY = 'docs-quick-insert-ui.config';
+
+export const configSymbol = Symbol(DOCS_QUICK_INSERT_UI_PLUGIN_CONFIG_KEY);
+
+export interface IUniverDocsQuickInsertUIConfig {
+ menu?: MenuConfig;
+}
+
+export const defaultPluginConfig: IUniverDocsQuickInsertUIConfig = {};
diff --git a/packages/docs-quick-insert-ui/src/index.ts b/packages/docs-quick-insert-ui/src/index.ts
index fceddd8b01..0416d4917b 100644
--- a/packages/docs-quick-insert-ui/src/index.ts
+++ b/packages/docs-quick-insert-ui/src/index.ts
@@ -16,21 +16,11 @@
import './global.css';
-export { UniverDocsQuickInsertUIPlugin } from './plugin';
-
-export type {
- DocPopupMenu,
- IDocPopup,
- IDocPopupGroupItem,
- IDocPopupMenuItem,
-} from './services/doc-quick-insert-popup.service';
-
-export { DocQuickInsertPopupService } from './services/doc-quick-insert-popup.service';
+export type { IUniverDocsQuickInsertUIConfig } from './controllers/config.schema';
export { DocQuickInsertTriggerController } from './controllers/doc-quick-insert-trigger.controller';
export { DocQuickInsertUIController } from './controllers/doc-quick-insert-ui.controller';
-export { QuickInsertPlaceholderComponentKey } from './views/QuickInsertPlaceholder';
+export { UniverDocsQuickInsertUIPlugin } from './plugin';
+export type { DocPopupMenu, IDocPopup, IDocPopupGroupItem, IDocPopupMenuItem } from './services/doc-quick-insert-popup.service';
+export { DocQuickInsertPopupService } from './services/doc-quick-insert-popup.service';
export { KeywordInputPlaceholderComponentKey } from './views/KeywordInputPlaceholder';
-
-// #region - all commands
-
-// #endregion
+export { QuickInsertPlaceholderComponentKey } from './views/QuickInsertPlaceholder';
diff --git a/packages/docs-quick-insert-ui/src/plugin.ts b/packages/docs-quick-insert-ui/src/plugin.ts
index 44e2772bc6..e84d0a94e5 100644
--- a/packages/docs-quick-insert-ui/src/plugin.ts
+++ b/packages/docs-quick-insert-ui/src/plugin.ts
@@ -15,13 +15,15 @@
*/
import type { Dependency } from '@univerjs/core';
-import { DependentOn, Inject, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
+import type { IUniverDocsQuickInsertUIConfig } from './controllers/config.schema';
+import { DependentOn, IConfigService, Inject, Injector, merge, Plugin, UniverInstanceType } from '@univerjs/core';
import { UniverDocsDrawingPlugin } from '@univerjs/docs-drawing';
import { UniverDocsDrawingUIPlugin } from '@univerjs/docs-drawing-ui';
import { UniverDrawingPlugin } from '@univerjs/drawing';
import { UniverDrawingUIPlugin } from '@univerjs/drawing-ui';
import { IRenderManagerService } from '@univerjs/engine-render';
import { UniverUIPlugin } from '@univerjs/ui';
+import { defaultPluginConfig, DOCS_QUICK_INSERT_UI_PLUGIN_CONFIG_KEY } from './controllers/config.schema';
import { DocQuickInsertMenuController } from './controllers/doc-quick-insert-menu.controller';
import { DocQuickInsertTriggerController } from './controllers/doc-quick-insert-trigger.controller';
import { DocQuickInsertUIController } from './controllers/doc-quick-insert-ui.controller';
@@ -35,10 +37,23 @@ export class UniverDocsQuickInsertUIPlugin extends Plugin {
static override pluginName = PLUGIN_NAME;
constructor(
+ private readonly _config: Partial<IUniverDocsQuickInsertUIConfig> = defaultPluginConfig,
@Inject(Injector) protected _injector: Injector,
- @Inject(IRenderManagerService) private _renderManagerSrv: IRenderManagerService
+ @Inject(IRenderManagerService) private _renderManagerSrv: IRenderManagerService,
+ @IConfigService private readonly _configService: IConfigService
) {
super();
+
+ // Manage the plugin configuration.
+ const { menu, ...rest } = merge(
+ {},
+ defaultPluginConfig,
+ this._config
+ );
+ if (menu) {
+ this._configService.setConfig('menu', menu, { merge: true });
+ }
+ this._configService.setConfig(DOCS_QUICK_INSERT_UI_PLUGIN_CONFIG_KEY, rest);
}
override onStarting(): void {
diff --git a/packages/docs-thread-comment-ui/src/index.ts b/packages/docs-thread-comment-ui/src/index.ts
index 40f0220a8c..f12f644e12 100644
--- a/packages/docs-thread-comment-ui/src/index.ts
+++ b/packages/docs-thread-comment-ui/src/index.ts
@@ -16,14 +16,11 @@
import './global.css';
-export { UniverDocsThreadCommentUIPlugin } from './plugin';
-
-// #region - all commands
export { AddDocCommentComment } from './commands/commands/add-doc-comment.command';
export type { IAddDocCommentComment } from './commands/commands/add-doc-comment.command';
-export { ShowCommentPanelOperation, StartAddCommentOperation } from './commands/operations/show-comment-panel.operation';
-export type { IShowCommentPanelOperationParams } from './commands/operations/show-comment-panel.operation';
export { DeleteDocCommentComment } from './commands/commands/delete-doc-comment.command';
export type { IDeleteDocCommentComment } from './commands/commands/delete-doc-comment.command';
-
-// #endregion
+export { ShowCommentPanelOperation, StartAddCommentOperation } from './commands/operations/show-comment-panel.operation';
+export type { IShowCommentPanelOperationParams } from './commands/operations/show-comment-panel.operation';
+export type { IUniverDocsThreadCommentUIConfig } from './controllers/config.schema';
+export { UniverDocsThreadCommentUIPlugin } from './plugin';
diff --git a/packages/docs-ui/src/index.ts b/packages/docs-ui/src/index.ts
index 5e09de1c03..e42fca83a8 100644
--- a/packages/docs-ui/src/index.ts
+++ b/packages/docs-ui/src/index.ts
@@ -24,43 +24,6 @@ export { addCustomDecorationBySelectionFactory, addCustomDecorationFactory, dele
export * from './basics/docs-view-key';
export { hasParagraphInTable } from './basics/paragraph';
export { docDrawingPositionToTransform, transformToDocDrawingPosition } from './basics/transform-position';
-export { type IKeyboardEventConfig, useKeyboardEvent, useResize } from './views/rich-text-editor/hooks';
-export { type IRichTextEditorProps, RichTextEditor } from './views/rich-text-editor';
-export { getCommandSkeleton, getRichTextEditPath } from './commands/util';
-// export { TextEditor } from './components/editor/TextEditor';
-// export { RangeSelector as DocRangeSelector } from './components/range-selector/RangeSelector';
-export { DocUIController } from './controllers/doc-ui.controller';
-export { menuSchema as DocsUIMenuSchema } from './controllers/menu.schema';
-export { DocBackScrollRenderController } from './controllers/render-controllers/back-scroll.render-controller';
-export { DocRenderController } from './controllers/render-controllers/doc.render-controller';
-export type { IUniverDocsUIConfig } from './controllers/config.schema';
-export { UniverDocsUIPlugin } from './plugin';
-export * from './services';
-export { IDocClipboardService } from './services/clipboard/clipboard.service';
-export { DocEventManagerService } from './services/doc-event-manager.service';
-export { DocIMEInputManagerService } from './services/doc-ime-input-manager.service';
-export { calcDocRangePositions, DocCanvasPopManagerService } from './services/doc-popup-manager.service';
-export { DocStateChangeManagerService } from './services/doc-state-change-manager.service';
-export { DocsRenderService } from './services/docs-render.service';
-export { Editor } from './services/editor/editor';
-export { EditorService, IEditorService } from './services/editor/editor-manager.service';
-export { isInSameTableCell, isValidRectRange, NodePositionConvertToRectRange } from './services/selection/convert-rect-range';
-export { DocPrintInterceptorService, type IDocPrintComponentContext, type IDocPrintContext } from './services/doc-print-interceptor-service';
-export { NodePositionConvertToCursor } from './services/selection/convert-text-range';
-export { getOneTextSelectionRange } from './services/selection/convert-text-range';
-export type { IEditorInputConfig } from './services/selection/doc-selection-render.service';
-export { DocSelectionRenderService } from './services/selection/doc-selection-render.service';
-
-export type { IDocRange } from './services/selection/range-interface';
-export { convertPositionsToRectRanges, RectRange } from './services/selection/rect-range';
-export { getCanvasOffsetByEngine } from './services/selection/selection-utils';
-export { getAnchorBounding, getLineBounding, TEXT_RANGE_LAYER_INDEX, TextRange } from './services/selection/text-range';
-export { whenDocAndEditorFocused } from './shortcuts/utils';
-export { DOC_VERTICAL_PADDING } from './types/const/padding';
-
-// #region - all commands
-export { SwitchDocModeCommand } from './commands/commands/switch-doc-mode.command';
-export { HorizontalLineCommand } from './commands/commands/doc-horizontal-line.command';
export { AfterSpaceCommand, EnterCommand, type ITabCommandParams, TabCommand } from './commands/commands/auto-format.command';
export { BreakLineCommand } from './commands/commands/break-line.command';
export { generateParagraphs } from './commands/commands/break-line.command';
@@ -80,7 +43,8 @@ export {
} from './commands/commands/core-editing.command';
export { DeleteCustomBlockCommand, DeleteLeftCommand, DeleteRightCommand, type IDeleteCustomBlockParams, MergeTwoParagraphCommand } from './commands/commands/doc-delete.command';
export { getCursorWhenDelete } from './commands/commands/doc-delete.command';
-
+export { HorizontalLineCommand } from './commands/commands/doc-horizontal-line.command';
+export { DocSelectAllCommand } from './commands/commands/doc-select-all.command';
export { type IIMEInputCommandParams, IMEInputCommand } from './commands/commands/ime-input.command';
export {
ResetInlineFormatTextBackgroundColorCommand,
@@ -96,6 +60,7 @@ export {
SetInlineFormatTextColorCommand,
SetInlineFormatUnderlineCommand,
} from './commands/commands/inline-format.command';
+export { type IInsertCustomRangeCommandParams, InsertCustomRangeCommand } from './commands/commands/insert-custom-range.command';
export {
BulletListCommand,
ChangeListNestingLevelCommand,
@@ -117,9 +82,11 @@ export {
export { ReplaceTextRunsCommand } from './commands/commands/replace-content.command';
export { CoverContentCommand, type IReplaceSelectionCommandParams, type IReplaceSnapshotCommandParams, ReplaceContentCommand, ReplaceSelectionCommand, ReplaceSnapshotCommand } from './commands/commands/replace-content.command';
export { SetDocZoomRatioCommand } from './commands/commands/set-doc-zoom-ratio.command';
+export { SetParagraphNamedStyleCommand } from './commands/commands/set-heading.command';
+export { SwitchDocModeCommand } from './commands/commands/switch-doc-mode.command';
export { CreateDocTableCommand, type ICreateDocTableCommandParams } from './commands/commands/table/doc-table-create.command';
+
export { DocTableDeleteColumnsCommand, DocTableDeleteRowsCommand, DocTableDeleteTableCommand } from './commands/commands/table/doc-table-delete.command';
-export { type IInsertCustomRangeCommandParams, InsertCustomRangeCommand } from './commands/commands/insert-custom-range.command';
export type {
IDocTableDeleteColumnsCommandParams,
IDocTableDeleteRowsCommandParams,
@@ -141,15 +108,44 @@ export {
DocTableInsertRowBellowCommand,
DocTableInsertRowCommand,
} from './commands/commands/table/doc-table-insert.command';
-
export type { IDocTableTabCommandParams } from './commands/commands/table/doc-table-tab.command';
export { DocTableTabCommand } from './commands/commands/table/doc-table-tab.command';
+
export { genTableSource, getEmptyTableCell, getEmptyTableRow, getTableColumn } from './commands/commands/table/table';
export { DocCreateTableOperation } from './commands/operations/doc-create-table.operation';
export { type IMoveCursorOperationParams, MoveSelectionOperation } from './commands/operations/doc-cursor.operation';
export { MoveCursorOperation } from './commands/operations/doc-cursor.operation';
-export { DocSelectAllCommand } from './commands/commands/doc-select-all.command';
export { type ISetDocZoomRatioOperationParams, SetDocZoomRatioOperation } from './commands/operations/set-doc-zoom-ratio.operation';
-export { SetParagraphNamedStyleCommand } from './commands/commands/set-heading.command';
+export { getCommandSkeleton, getRichTextEditPath } from './commands/util';
+export type { IUniverDocsUIConfig } from './controllers/config.schema';
+export { DocUIController } from './controllers/doc-ui.controller';
+export { menuSchema as DocsUIMenuSchema } from './controllers/menu.schema';
+export { DocBackScrollRenderController } from './controllers/render-controllers/back-scroll.render-controller';
+export { DocRenderController } from './controllers/render-controllers/doc.render-controller';
+export { UniverDocsUIPlugin } from './plugin';
+
+export * from './services';
+export { IDocClipboardService } from './services/clipboard/clipboard.service';
export { convertBodyToHtml } from './services/clipboard/udm-to-html/convertor';
-// #endregion
+export { DocEventManagerService } from './services/doc-event-manager.service';
+export { DocIMEInputManagerService } from './services/doc-ime-input-manager.service';
+export { calcDocRangePositions, DocCanvasPopManagerService } from './services/doc-popup-manager.service';
+export { DocPrintInterceptorService, type IDocPrintComponentContext, type IDocPrintContext } from './services/doc-print-interceptor-service';
+export { DocStateChangeManagerService } from './services/doc-state-change-manager.service';
+export { DocsRenderService } from './services/docs-render.service';
+export { Editor } from './services/editor/editor';
+export { EditorService, IEditorService } from './services/editor/editor-manager.service';
+export { isInSameTableCell, isValidRectRange, NodePositionConvertToRectRange } from './services/selection/convert-rect-range';
+export { NodePositionConvertToCursor } from './services/selection/convert-text-range';
+export { getOneTextSelectionRange } from './services/selection/convert-text-range';
+
+export type { IEditorInputConfig } from './services/selection/doc-selection-render.service';
+export { DocSelectionRenderService } from './services/selection/doc-selection-render.service';
+export type { IDocRange } from './services/selection/range-interface';
+export { convertPositionsToRectRanges, RectRange } from './services/selection/rect-range';
+export { getCanvasOffsetByEngine } from './services/selection/selection-utils';
+export { getAnchorBounding, getLineBounding, TEXT_RANGE_LAYER_INDEX, TextRange } from './services/selection/text-range';
+export { whenDocAndEditorFocused } from './shortcuts/utils';
+export { DOC_VERTICAL_PADDING } from './types/const/padding';
+export { type IRichTextEditorProps, RichTextEditor } from './views/rich-text-editor';
+export { type IKeyboardEventConfig, useKeyboardEvent, useResize } from './views/rich-text-editor/hooks';
diff --git a/packages/docs/src/index.ts b/packages/docs/src/index.ts
index 17ba265b01..36b56895a2 100644
--- a/packages/docs/src/index.ts
+++ b/packages/docs/src/index.ts
@@ -14,27 +14,15 @@
* limitations under the License.
*/
+export { type IRichTextEditingMutationParams, RichTextEditingMutation } from './commands/mutations/core-editing.mutation';
+export { type ISetTextSelectionsOperationParams, SetTextSelectionsOperation } from './commands/operations/text-selection.operation';
export type { IUniverDocsConfig } from './controllers/config.schema';
export { UniverDocsPlugin } from './plugin';
export { DocInterceptorService } from './services/doc-interceptor/doc-interceptor.service';
export { DOC_INTERCEPTOR_POINT } from './services/doc-interceptor/interceptor-const';
export { DocSelectionManagerService } from './services/doc-selection-manager.service';
export { DocSkeletonManagerService } from './services/doc-skeleton-manager.service';
-export { addCustomRangeBySelectionFactory, addCustomRangeFactory, deleteCustomRangeFactory } from './utils/custom-range-factory';
-export { replaceSelectionFactory } from './utils/replace-selection-factory';
export type { IDocStateChangeInfo, IDocStateChangeParams } from './services/doc-state-emit.service';
export { DocStateEmitService } from './services/doc-state-emit.service';
-
-// #region - all commands
-
-export {
- type IRichTextEditingMutationParams,
- RichTextEditingMutation,
-} from './commands/mutations/core-editing.mutation';
-
-export {
- type ISetTextSelectionsOperationParams,
- SetTextSelectionsOperation,
-} from './commands/operations/text-selection.operation';
-
-// #endregion
+export { addCustomRangeBySelectionFactory, addCustomRangeFactory, deleteCustomRangeFactory } from './utils/custom-range-factory';
+export { replaceSelectionFactory } from './utils/replace-selection-factory';
diff --git a/packages/drawing-ui/src/index.ts b/packages/drawing-ui/src/index.ts
index 88fbcc8acb..540704e231 100644
--- a/packages/drawing-ui/src/index.ts
+++ b/packages/drawing-ui/src/index.ts
@@ -16,18 +16,14 @@
import './global.css';
-export { DrawingRenderService } from './services/drawing-render.service';
-export { getUpdateParams } from './utils/get-update-params';
-export { DrawingCommonPanel } from './views/panel/DrawingCommonPanel';
-export { ImagePopupMenu } from './views/image-popup-menu/ImagePopupMenu';
-export { COMPONENT_IMAGE_POPUP_MENU } from './views/image-popup-menu/component-name';
-export { UniverDrawingUIPlugin } from './plugin';
-export { ImageCropperObject } from './views/crop/image-cropper-object';
-
-// #region - all commands
-
export { SetDrawingAlignOperation } from './commands/operations/drawing-align.operation';
export { AutoImageCropOperation, CloseImageCropOperation, OpenImageCropOperation } from './commands/operations/image-crop.operation';
export { ImageResetSizeOperation } from './commands/operations/image-reset-size.operation';
-
-// #endregion
+export type { IUniverDrawingUIConfig } from './controllers/config.schema';
+export { UniverDrawingUIPlugin } from './plugin';
+export { DrawingRenderService } from './services/drawing-render.service';
+export { getUpdateParams } from './utils/get-update-params';
+export { ImageCropperObject } from './views/crop/image-cropper-object';
+export { COMPONENT_IMAGE_POPUP_MENU } from './views/image-popup-menu/component-name';
+export { ImagePopupMenu } from './views/image-popup-menu/ImagePopupMenu';
+export { DrawingCommonPanel } from './views/panel/DrawingCommonPanel';
diff --git a/packages/drawing/src/index.ts b/packages/drawing/src/index.ts
index d48c11edb1..418f7bc60a 100644
--- a/packages/drawing/src/index.ts
+++ b/packages/drawing/src/index.ts
@@ -15,24 +15,26 @@
*/
export { DRAWING_IMAGE_ALLOW_IMAGE_LIST, DRAWING_IMAGE_ALLOW_SIZE, DRAWING_IMAGE_COUNT_LIMIT, DRAWING_IMAGE_HEIGHT_LIMIT, DRAWING_IMAGE_WIDTH_LIMIT } from './basics/config';
-export { DrawingManagerService, type IDrawingJson1Type, type IDrawingJsonUndo1, UnitDrawingService } from './services/drawing-manager-impl.service';
-export { getDrawingShapeKeyByDrawingSearch } from './utils/get-image-shape-key';
-export { getImageSize } from './utils/get-image-size';
+export { SetDrawingSelectedOperation } from './commands/operations/set-drawing-selected.operation';
+export type { IUniverDrawingConfig } from './controllers/config.schema';
+export type { IDocFloatDomData, IDocFloatDomDataBase, IImageData } from './models/image-model-interface';
export { UniverDrawingPlugin } from './plugin';
-export { type IDocFloatDomData, type IDocFloatDomDataBase, type IImageData } from './models/image-model-interface';
-export { IImageIoService, type IImageIoServiceParam, ImageSourceType, ImageUploadStatusType } from './services/image-io.service';
-export { ImageIoService } from './services/image-io-impl.service';
-export {
- type IDrawingGroupUpdateParam,
- IDrawingManagerService,
- type IDrawingMap,
- type IDrawingMapItem,
- type IDrawingMapItemData,
- type IDrawingOrderMapParam,
- type IDrawingOrderUpdateParam,
- type IDrawingSubunitMap,
- type IDrawingVisibleParam,
- type IUnitDrawingService,
+export { DrawingManagerService, UnitDrawingService } from './services/drawing-manager-impl.service';
+export type { IDrawingJson1Type, IDrawingJsonUndo1 } from './services/drawing-manager-impl.service';
+export type {
+ IDrawingGroupUpdateParam,
+ IDrawingMap,
+ IDrawingMapItem,
+ IDrawingMapItemData,
+ IDrawingOrderMapParam,
+ IDrawingOrderUpdateParam,
+ IDrawingSubunitMap,
+ IDrawingVisibleParam,
+ IUnitDrawingService,
} from './services/drawing-manager.service';
-
-export { SetDrawingSelectedOperation } from './commands/operations/set-drawing-selected.operation';
+export { IDrawingManagerService } from './services/drawing-manager.service';
+export { ImageIoService } from './services/image-io-impl.service';
+export { IImageIoService, ImageSourceType, ImageUploadStatusType } from './services/image-io.service';
+export type { IImageIoServiceParam } from './services/image-io.service';
+export { getDrawingShapeKeyByDrawingSearch } from './utils/get-image-shape-key';
+export { getImageSize } from './utils/get-image-size';
diff --git a/packages/engine-formula/src/index.ts b/packages/engine-formula/src/index.ts
index 757229f322..d59b39646b 100644
--- a/packages/engine-formula/src/index.ts
+++ b/packages/engine-formula/src/index.ts
@@ -14,10 +14,6 @@
* limitations under the License.
*/
-export type { BaseAstNode } from './engine/ast-node/base-ast-node.js';
-export { generateExecuteAstNodeData } from './engine/utils/ast-node-tool';
-export { getObjectValue } from './functions/util';
-
export type {
IArrayFormulaRangeType,
IArrayFormulaUnitCellType,
@@ -35,16 +31,17 @@ export type {
IUnitSheetNameMap,
} from './basics/common';
export { BooleanValue } from './basics/common';
+export { type IOtherFormulaData } from './basics/common';
+export { type IUnitRowData } from './basics/common';
export { isInDirtyRange } from './basics/dirty';
export { ERROR_TYPE_SET, ErrorType } from './basics/error-type';
export { FunctionType, type IFunctionInfo, type IFunctionParam } from './basics/function';
export { type IFunctionNames } from './basics/function';
export { includeFormulaLexerToken, isFormulaLexerToken, normalizeSheetName } from './basics/match-token';
-export { convertUnitDataToRuntime } from './basics/runtime';
-export { compareToken, matchToken, operatorToken } from './basics/token';
export { matchRefDrawToken } from './basics/match-token';
-
export { isReferenceString } from './basics/regex';
+export { convertUnitDataToRuntime } from './basics/runtime';
+export { compareToken, matchToken, operatorToken } from './basics/token';
export { RegisterFunctionMutation } from './commands/mutations/register-function.mutation';
export { type ISetArrayFormulaDataMutationParams, SetArrayFormulaDataMutation } from './commands/mutations/set-array-formula-data.mutation';
export { type ISetDefinedNameMutationParam, type ISetDefinedNameMutationSearchParam, RemoveDefinedNameMutation, SetDefinedNameMutation } from './commands/mutations/set-defined-name.mutation';
@@ -63,11 +60,13 @@ export { type ISetFormulaDataMutationParams, SetFormulaDataMutation } from './co
export { type IRemoveOtherFormulaMutationParams, type ISetOtherFormulaMutationParams, RemoveOtherFormulaMutation, SetOtherFormulaMutation } from './commands/mutations/set-other-formula.mutation';
export { RemoveSuperTableMutation, SetSuperTableMutation, SetSuperTableOptionMutation } from './commands/mutations/set-super-table.mutation';
export { CalculateController } from './controller/calculate.controller';
+export { ENGINE_FORMULA_CYCLE_REFERENCE_COUNT, ENGINE_FORMULA_PLUGIN_CONFIG_KEY, type IUniverEngineFormulaConfig } from './controller/config.schema';
export { Lexer } from './engine/analysis/lexer';
export { LexerNode } from './engine/analysis/lexer-node';
export { LexerTreeBuilder } from './engine/analysis/lexer-tree-builder';
export { AstTreeBuilder } from './engine/analysis/parser';
export { AstRootNodeFactory } from './engine/ast-node/ast-root-node';
+export type { BaseAstNode } from './engine/ast-node/base-ast-node.js';
export { FunctionNodeFactory } from './engine/ast-node/function-node';
export { LambdaNodeFactory } from './engine/ast-node/lambda-node';
export { LambdaParameterNodeFactory } from './engine/ast-node/lambda-parameter-node';
@@ -77,11 +76,17 @@ export { ReferenceNodeFactory } from './engine/ast-node/reference-node';
export { SuffixNodeFactory } from './engine/ast-node/suffix-node';
export { UnionNodeFactory } from './engine/ast-node/union-node';
export { ValueNodeFactory } from './engine/ast-node/value-node';
+export { FormulaDependencyTree, type IFormulaDependencyTree } from './engine/dependency/dependency-tree';
+export { FormulaDependencyTreeType } from './engine/dependency/dependency-tree';
+export { FormulaDependencyTreeVirtual } from './engine/dependency/dependency-tree';
export { FormulaDependencyGenerator, IFormulaDependencyGenerator } from './engine/dependency/formula-dependency';
+export { generateRandomDependencyTreeId } from './engine/dependency/formula-dependency';
export { Interpreter } from './engine/interpreter/interpreter';
export { BaseReferenceObject, type FunctionVariantType } from './engine/reference-object/base-reference-object';
export { AsyncArrayObject, AsyncObject } from './engine/reference-object/base-reference-object';
export { RangeReferenceObject } from './engine/reference-object/range-reference-object';
+export { generateExecuteAstNodeData } from './engine/utils/ast-node-tool';
+export { generateAstNode } from './engine/utils/generate-ast-node';
export { strip, stripErrorMargin } from './engine/utils/math-kit';
export { handleNumfmtInCell } from './engine/utils/numfmt-kit';
export { deserializeRangeForR1C1 } from './engine/utils/r1c1-reference';
@@ -100,9 +105,11 @@ export {
singleReferenceToGrid,
} from './engine/utils/reference';
export { handleRefStringInfo } from './engine/utils/reference';
+export { deserializeRangeWithSheetWithCache } from './engine/utils/reference-cache';
export { generateStringWithSequence, type ISequenceNode, sequenceNodeType } from './engine/utils/sequence';
export { ArrayValueObject, ValueObjectFactory } from './engine/value-object/array-value-object';
export { BaseValueObject, ErrorValueObject } from './engine/value-object/base-value-object';
+export { LambdaValueObjectObject } from './engine/value-object/lambda-value-object';
export type { FormulaFunctionResultValueType, FormulaFunctionValueType, PrimitiveValueType } from './engine/value-object/primitive-object';
export { BooleanValueObject, NullValueObject, NumberValueObject, StringValueObject } from './engine/value-object/primitive-object';
export { functionArray } from './functions/array/function-map';
@@ -121,10 +128,8 @@ export { functionEngineering } from './functions/engineering/function-map';
export { FUNCTION_NAMES_ENGINEERING } from './functions/engineering/function-names';
export { functionFinancial } from './functions/financial/function-map';
export { FUNCTION_NAMES_FINANCIAL } from './functions/financial/function-names';
-
export { functionInformation } from './functions/information/function-map';
export { FUNCTION_NAMES_INFORMATION } from './functions/information/function-names';
-
export { functionLogical } from './functions/logical/function-map';
export { FUNCTION_NAMES_LOGICAL } from './functions/logical/function-names';
export { functionLookup } from './functions/lookup/function-map';
@@ -138,40 +143,29 @@ export { functionText } from './functions/text/function-map';
export { FUNCTION_NAMES_TEXT } from './functions/text/function-names';
export { functionUniver } from './functions/univer/function-map';
export { FUNCTION_NAMES_UNIVER } from './functions/univer/function-names';
+export { getObjectValue } from './functions/util';
export { functionWeb } from './functions/web/function-map';
export { FUNCTION_NAMES_WEB } from './functions/web/function-names';
export { FormulaDataModel } from './models/formula-data.model';
export { initSheetFormulaData } from './models/formula-data.model';
export type { IRangeChange } from './models/formula-data.model';
export { UniverFormulaEnginePlugin } from './plugin';
-export { GlobalComputingStatusService } from './services/global-computing-status.service';
export { ActiveDirtyManagerService, IActiveDirtyManagerService } from './services/active-dirty-manager.service';
-export { ISheetRowFilteredService, SheetRowFilteredService } from './services/sheet-row-filtered.service';
export { CalculateFormulaService, ICalculateFormulaService } from './services/calculate-formula.service';
+export { DEFAULT_INTERVAL_COUNT } from './services/calculate-formula.service';
export { FormulaCurrentConfigService, IFormulaCurrentConfigService, type IFormulaDirtyData } from './services/current-data.service';
export { DefinedNamesService, type IDefinedNameMapItem, IDefinedNamesService, type IDefinedNamesServiceParam } from './services/defined-names.service';
export { IDependencyManagerService } from './services/dependency-manager.service';
export { DependencyManagerService } from './services/dependency-manager.service';
+export { DependencyManagerBaseService } from './services/dependency-manager.service';
export { FeatureCalculationManagerService, IFeatureCalculationManagerService } from './services/feature-calculation-manager.service';
+export type { IFeatureCalculationManagerParam } from './services/feature-calculation-manager.service';
export { FunctionService } from './services/function.service';
export { IFunctionService } from './services/function.service';
+export { GlobalComputingStatusService } from './services/global-computing-status.service';
+export { HyperlinkEngineFormulaService, IHyperlinkEngineFormulaService } from './services/hyperlink-engine-formula.service';
export { IOtherFormulaManagerService, OtherFormulaManagerService } from './services/other-formula-manager.service';
export { FormulaExecutedStateType, FormulaExecuteStageType, FormulaRuntimeService, type IAllRuntimeData, type IExecutionInProgressParams, IFormulaRuntimeService } from './services/runtime.service';
+export { ISheetRowFilteredService, SheetRowFilteredService } from './services/sheet-row-filtered.service';
export { ISuperTableService } from './services/super-table.service';
export { SuperTableService } from './services/super-table.service';
-export { deserializeRangeWithSheetWithCache } from './engine/utils/reference-cache';
-export { FormulaDependencyTree, type IFormulaDependencyTree } from './engine/dependency/dependency-tree';
-export { type IOtherFormulaData } from './basics/common';
-export { FormulaDependencyTreeType } from './engine/dependency/dependency-tree';
-export { FormulaDependencyTreeVirtual } from './engine/dependency/dependency-tree';
-export { generateAstNode } from './engine/utils/generate-ast-node';
-export { type IFeatureCalculationManagerParam } from './services/feature-calculation-manager.service';
-export { DEFAULT_INTERVAL_COUNT } from './services/calculate-formula.service';
-export { ENGINE_FORMULA_CYCLE_REFERENCE_COUNT, ENGINE_FORMULA_PLUGIN_CONFIG_KEY, type IUniverEngineFormulaConfig } from './controller/config.schema';
-
-export { generateRandomDependencyTreeId } from './engine/dependency/formula-dependency';
-export { DependencyManagerBaseService } from './services/dependency-manager.service';
-export { LambdaValueObjectObject } from './engine/value-object/lambda-value-object';
-export { type IUnitRowData } from './basics/common';
-
-export { HyperlinkEngineFormulaService, IHyperlinkEngineFormulaService } from './services/hyperlink-engine-formula.service';
diff --git a/packages/engine-render/src/index.ts b/packages/engine-render/src/index.ts
index 5f05afc13c..fe93837ed8 100644
--- a/packages/engine-render/src/index.ts
+++ b/packages/engine-render/src/index.ts
@@ -16,7 +16,6 @@
export * from './base-object';
export * from './basics';
-export * from './components/docs/layout/doc-simple-skeleton';
export { getOffsetRectForDom } from './basics/position';
export * from './canvas';
export * from './components';
@@ -25,34 +24,31 @@ export { Documents } from './components/docs/document';
export type { IPageRenderConfig } from './components/docs/document';
export type { IDocumentOffsetConfig } from './components/docs/document';
export { getTableIdAndSliceIndex } from './components/docs/layout/block/table';
+export * from './components/docs/layout/doc-simple-skeleton';
export { DocumentSkeleton } from './components/docs/layout/doc-skeleton';
export type { IFindNodeRestrictions } from './components/docs/layout/doc-skeleton';
export { getCharSpaceApply, getLastLine, getNumberUnitValue, getPageFromPath, glyphIterator, lineIterator } from './components/docs/layout/tools';
+export { getLastColumn } from './components/docs/layout/tools';
export { Liquid } from './components/docs/liquid';
export { DataStreamTreeNode } from './components/docs/view-model/data-stream-tree-node';
export { DocumentViewModel } from './components/docs/view-model/document-view-model';
export { DocumentEditArea } from './components/docs/view-model/document-view-model';
export { parseDataStreamToTree } from './components/docs/view-model/document-view-model';
-export { getLastColumn } from './components/docs/layout/tools';
export { DEFAULT_PADDING_DATA } from './components/sheets/sheet.render-skeleton';
export * from './context';
+export type { IUniverEngineRenderConfig } from './controllers/config.schema';
export * from './custom';
export * from './engine';
export * from './group';
export * from './layer';
export { IRenderingEngine, UniverRenderEnginePlugin } from './plugin';
-export {
- getCurrentTypeOfRenderer,
- IRenderManagerService,
- type RenderComponentType,
- RenderManagerService,
- withCurrentTypeOfRenderer,
-} from './render-manager/render-manager.service';
-export { CanvasColorService, DumbCanvasColorService, ICanvasColorService } from './services/canvas-color.service';
+export { getCurrentTypeOfRenderer, IRenderManagerService, RenderManagerService, withCurrentTypeOfRenderer } from './render-manager/render-manager.service';
+export { type RenderComponentType } from './render-manager/render-manager.service';
export { type IRender, type IRenderContext, type IRenderModule, RenderUnit } from './render-manager/render-unit';
export * from './scene';
-export { type IChangeObserverConfig } from './scene.transformer';
export * from './scene-viewer';
+export { type IChangeObserverConfig } from './scene.transformer';
export * from './scroll-timer';
+export { CanvasColorService, DumbCanvasColorService, ICanvasColorService } from './services/canvas-color.service';
export * from './shape';
export * from './viewport';
diff --git a/packages/find-replace/src/index.ts b/packages/find-replace/src/index.ts
index 324e94e957..3acb91b2a4 100644
--- a/packages/find-replace/src/index.ts
+++ b/packages/find-replace/src/index.ts
@@ -16,8 +16,11 @@
import './global.css';
-export { UniverFindReplacePlugin } from './plugin';
+export { ReplaceAllMatchesCommand, ReplaceCurrentMatchCommand } from './commands/commands/replace.command';
+export { GoToNextMatchOperation, GoToPreviousMatchOperation, OpenFindDialogOperation, OpenReplaceDialogOperation } from './commands/operations/find-replace.operation';
+export type { IUniverFindReplaceConfig } from './controllers/config.schema';
export { FindReplaceController } from './controllers/find-replace.controller';
+export { UniverFindReplacePlugin } from './plugin';
export type {
IFindComplete,
IFindMatch,
@@ -27,12 +30,4 @@ export type {
IFindReplaceState,
IReplaceAllResult,
} from './services/find-replace.service';
-
export { createInitFindReplaceState, FindBy, FindDirection, FindModel, FindReplaceModel, FindReplaceState, FindScope, IFindReplaceService } from './services/find-replace.service';
-
-// #region - all commands
-
-export { ReplaceAllMatchesCommand, ReplaceCurrentMatchCommand } from './commands/commands/replace.command';
-export { GoToNextMatchOperation, GoToPreviousMatchOperation, OpenFindDialogOperation, OpenReplaceDialogOperation } from './commands/operations/find-replace.operation';
-
-// #endregion
diff --git a/packages/network/src/controllers/config.schema.ts b/packages/network/src/controllers/config.schema.ts
new file mode 100644
index 0000000000..98d77ab9ee
--- /dev/null
+++ b/packages/network/src/controllers/config.schema.ts
@@ -0,0 +1,44 @@
+/**
+ * Copyright 2023-present DreamNum Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import type { DependencyOverride } from '@univerjs/core';
+
+export const NETWORK_PLUGIN_CONFIG_KEY = 'network.config';
+
+export const configSymbol = Symbol(NETWORK_PLUGIN_CONFIG_KEY);
+
+export interface IUniverNetworkConfig {
+ /**
+ * Use fetch instead of XMLHttpRequest. By default, Univer will use fetch on Node.js and XMLHttpRequest in browser.
+ */
+ useFetchImpl?: boolean;
+
+ /**
+ * Build in dependencies that can be overridden:
+ *
+ * - {@link HTTPService}
+ * - {@link IHTTPImplementation}
+ */
+ override?: DependencyOverride;
+
+ /**
+ * Force to use a new instance of {@link HTTPService} and {@link IHTTPImplementation} even if
+ * an ancestor injector already has them registered.
+ */
+ forceUseNewInstance?: boolean;
+}
+
+export const defaultPluginConfig: IUniverNetworkConfig = {};
diff --git a/packages/network/src/index.ts b/packages/network/src/index.ts
index b89fd95610..ccd2251997 100644
--- a/packages/network/src/index.ts
+++ b/packages/network/src/index.ts
@@ -14,14 +14,21 @@
* limitations under the License.
*/
-export { type IUniverNetworkPluginConfig, UniverNetworkPlugin } from './plugin';
+export type { IUniverNetworkConfig } from './controllers/config.schema';
+export { UniverNetworkPlugin } from './plugin';
export { HTTPHeaders } from './services/http/headers';
+export { type HTTPResponseType, HTTPStatusCode } from './services/http/http';
export { HTTPService } from './services/http/http.service';
-export { IHTTPImplementation } from './services/http/implementations/implementation';
+export type { IPostRequestParams, IRequestParams } from './services/http/http.service';
export { FetchHTTPImplementation } from './services/http/implementations/fetch';
+export { IHTTPImplementation } from './services/http/implementations/implementation';
export { XHRHTTPImplementation } from './services/http/implementations/xhr';
+export type { HTTPHandlerFn, HTTPInterceptorFn, HTTPInterceptorFnFactory } from './services/http/interceptor';
+export { AuthInterceptorFactory, type IAuthInterceptorParams } from './services/http/interceptors/auth-interceptor';
+export { MergeInterceptorFactory } from './services/http/interceptors/merge-interceptor';
+export { type IRetryInterceptorFactoryParams, RetryInterceptorFactory } from './services/http/interceptors/retry-interceptor';
+export { ThresholdInterceptorFactory } from './services/http/interceptors/threshold-interceptor';
export { HTTPRequest, type HTTPRequestMethod } from './services/http/request';
-export { type HTTPResponseType, HTTPStatusCode } from './services/http/http';
export {
type HTTPEvent,
HTTPEventType,
@@ -37,9 +44,3 @@ export {
type SocketBodyType,
WebSocketService,
} from './services/web-socket/web-socket.service';
-export type { IPostRequestParams, IRequestParams } from './services/http/http.service';
-export type { HTTPHandlerFn, HTTPInterceptorFn, HTTPInterceptorFnFactory } from './services/http/interceptor';
-export { type IRetryInterceptorFactoryParams, RetryInterceptorFactory } from './services/http/interceptors/retry-interceptor';
-export { ThresholdInterceptorFactory } from './services/http/interceptors/threshold-interceptor';
-export { AuthInterceptorFactory, type IAuthInterceptorParams } from './services/http/interceptors/auth-interceptor';
-export { MergeInterceptorFactory } from './services/http/interceptors/merge-interceptor';
diff --git a/packages/network/src/plugin.ts b/packages/network/src/plugin.ts
index 62429e315e..12e2d79f48 100644
--- a/packages/network/src/plugin.ts
+++ b/packages/network/src/plugin.ts
@@ -14,34 +14,14 @@
* limitations under the License.
*/
-import type { DependencyOverride } from '@univerjs/core';
-import { ILogService, Inject, Injector, LookUp, mergeOverrideWithDependencies, Plugin, Quantity, registerDependencies } from '@univerjs/core';
+import type { IUniverNetworkConfig } from './controllers/config.schema';
+import { IConfigService, ILogService, Inject, Injector, LookUp, merge, mergeOverrideWithDependencies, Plugin, Quantity, registerDependencies } from '@univerjs/core';
+import { defaultPluginConfig, NETWORK_PLUGIN_CONFIG_KEY } from './controllers/config.schema';
import { HTTPService } from './services/http/http.service';
import { FetchHTTPImplementation } from './services/http/implementations/fetch';
import { IHTTPImplementation } from './services/http/implementations/implementation';
import { XHRHTTPImplementation } from './services/http/implementations/xhr';
-export interface IUniverNetworkPluginConfig {
- /**
- * Use fetch instead of XMLHttpRequest. By default, Univer will use fetch on Node.js and XMLHttpRequest in browser.
- */
- useFetchImpl?: boolean;
-
- /**
- * Build in dependencies that can be overridden:
- *
- * - {@link HTTPService}
- * - {@link IHTTPImplementation}
- */
- override?: DependencyOverride;
-
- /**
- * Force to use a new instance of {@link HTTPService} and {@link IHTTPImplementation} even if
- * an ancestor injector already has them registered.
- */
- forceUseNewInstance?: boolean;
-}
-
/**
* This plugin add network services to the Univer instance.
*/
@@ -49,11 +29,20 @@ export class UniverNetworkPlugin extends Plugin {
static override pluginName = 'UNIVER_NETWORK_PLUGIN';
constructor(
- private readonly _config: Partial<IUniverNetworkPluginConfig> | undefined = undefined,
+ private readonly _config: Partial<IUniverNetworkConfig> = defaultPluginConfig,
@ILogService private readonly _logger: ILogService,
- @Inject(Injector) protected readonly _injector: Injector
+ @Inject(Injector) protected readonly _injector: Injector,
+ @IConfigService private readonly _configService: IConfigService
) {
super();
+
+ // Manage the plugin configuration.
+ const { ...rest } = merge(
+ {},
+ defaultPluginConfig,
+ this._config
+ );
+ this._configService.setConfig(NETWORK_PLUGIN_CONFIG_KEY, rest);
}
override onStarting(): void {
diff --git a/packages/rpc-node/src/controllers/config.schema.ts b/packages/rpc-node/src/controllers/config.schema.ts
new file mode 100644
index 0000000000..9bbff380ed
--- /dev/null
+++ b/packages/rpc-node/src/controllers/config.schema.ts
@@ -0,0 +1,34 @@
+/**
+ * Copyright 2023-present DreamNum Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+export const PLUGIN_CONFIG_KEY_MAIN_THREAD = 'rpc-node.main-thread.config';
+
+export const configSymbolMainThread = Symbol(PLUGIN_CONFIG_KEY_MAIN_THREAD);
+
+export interface IUniverRPCNodeMainConfig {
+ workerSrc?: string;
+}
+
+export const defaultPluginMainThreadConfig: IUniverRPCNodeMainConfig = {};
+
+export const PLUGIN_CONFIG_KEY_WORKER_THREAD = 'rpc-node.worker-thread.config';
+
+export const configSymbolWorkerThread = Symbol(PLUGIN_CONFIG_KEY_WORKER_THREAD);
+
+export interface IUniverRPCNodeWorkerThreadConfig {
+}
+
+export const defaultPluginWorkerThreadConfig: IUniverRPCNodeWorkerThreadConfig = {};
diff --git a/packages/rpc-node/src/plugin.ts b/packages/rpc-node/src/plugin.ts
index 9d1103dc57..1571e8f588 100644
--- a/packages/rpc-node/src/plugin.ts
+++ b/packages/rpc-node/src/plugin.ts
@@ -17,9 +17,10 @@
import type { Dependency } from '@univerjs/core';
import type { IMessageProtocol } from '@univerjs/rpc';
import type { Serializable } from 'node:child_process';
+import type { IUniverRPCNodeMainConfig, IUniverRPCNodeWorkerThreadConfig } from './controllers/config.schema';
import { fork } from 'node:child_process';
import process from 'node:process';
-import { IConfigService, ILogService, Inject, Injector, Plugin } from '@univerjs/core';
+import { IConfigService, ILogService, Inject, Injector, merge, Plugin } from '@univerjs/core';
import {
ChannelService,
DataSyncPrimaryController,
@@ -31,29 +32,33 @@ import {
WebWorkerRemoteInstanceService,
} from '@univerjs/rpc';
import { Observable, shareReplay } from 'rxjs';
-
-export interface IUniverRPCNodeMainConfig {
- /** Path of the computing worker scripts. */
- workerSrc: string;
-}
-
-const UNIVER_RPC_NODE_MAIN_PLUGIN_CONFIG_KEY = 'node-rpc.main.config';
+import { defaultPluginMainThreadConfig, defaultPluginWorkerThreadConfig, PLUGIN_CONFIG_KEY_MAIN_THREAD, PLUGIN_CONFIG_KEY_WORKER_THREAD } from './controllers/config.schema';
export class UniverRPCNodeMainPlugin extends Plugin {
static override pluginName = 'UNIVER_RPC_NODE_MAIN_PLUGIN';
constructor(
- private readonly _config: IUniverRPCNodeMainConfig,
+ private readonly _config: Partial<IUniverRPCNodeMainConfig> = defaultPluginMainThreadConfig,
@Inject(Injector) protected readonly _injector: Injector,
@IConfigService private readonly _configService: IConfigService
) {
super();
- this._configService.setConfig(UNIVER_RPC_NODE_MAIN_PLUGIN_CONFIG_KEY, this._config);
+ // Manage the plugin configuration.
+ const { ...rest } = merge(
+ {},
+ defaultPluginMainThreadConfig,
+ this._config
+ );
+ this._configService.setConfig(PLUGIN_CONFIG_KEY_MAIN_THREAD, rest);
}
override onStarting(): void {
const { workerSrc } = this._config;
+ if (!workerSrc) {
+ throw new Error('[UniverRPCNodeMainPlugin] workerSrc is required for UniverRPCNodeMainPlugin');
+ }
+
const messageProtocol = createNodeMessagePortOnMain(this._injector, workerSrc);
const dependencies: Dependency[] = [
@@ -74,10 +79,19 @@ export class UniverRPCNodeWorkerPlugin extends Plugin {
static override pluginName = 'UNIVER_RPC_NODE_WORKER_PLUGIN';
constructor(
- private readonly _config: undefined,
- @Inject(Injector) protected readonly _injector: Injector
+ private readonly _config: Partial<IUniverRPCNodeWorkerThreadConfig> = defaultPluginWorkerThreadConfig,
+ @Inject(Injector) protected readonly _injector: Injector,
+ @IConfigService private readonly _configService: IConfigService
) {
super();
+
+ // Manage the plugin configuration.
+ const { ...rest } = merge(
+ {},
+ defaultPluginWorkerThreadConfig,
+ this._config
+ );
+ this._configService.setConfig(PLUGIN_CONFIG_KEY_WORKER_THREAD, rest);
}
override onStarting(): void {
diff --git a/packages/rpc/src/index.ts b/packages/rpc/src/index.ts
index d0ef555366..fb8fd7b460 100644
--- a/packages/rpc/src/index.ts
+++ b/packages/rpc/src/index.ts
@@ -14,12 +14,13 @@
* limitations under the License.
*/
+export type { IUniverRPCMainThreadConfig, IUniverRPCWorkerThreadConfig } from './controllers/config.schema';
+export { DataSyncPrimaryController } from './controllers/data-sync/data-sync-primary.controller';
+export { DataSyncReplicaController } from './controllers/data-sync/data-sync-replica.controller';
export {
UniverRPCMainThreadPlugin,
UniverRPCWorkerThreadPlugin,
} from './plugin';
-export { DataSyncReplicaController } from './controllers/data-sync/data-sync-replica.controller';
-export { DataSyncPrimaryController } from './controllers/data-sync/data-sync-primary.controller';
export {
IRemoteInstanceService,
RemoteInstanceServiceName,
@@ -27,8 +28,6 @@ export {
RemoteSyncServiceName,
WebWorkerRemoteInstanceService,
} from './services/remote-instance/remote-instance.service';
+export { IRemoteSyncService } from './services/remote-instance/remote-instance.service';
export { ChannelService, IRPCChannelService } from './services/rpc/channel.service';
export { ChannelClient, ChannelServer, fromModule, type IMessageProtocol, toModule } from './services/rpc/rpc.service';
-export { IRemoteSyncService } from './services/remote-instance/remote-instance.service';
-
-export type { IUniverRPCMainThreadConfig, IUniverRPCWorkerThreadConfig } from './controllers/config.schema';
diff --git a/packages/sheets-conditional-formatting-ui/src/index.ts b/packages/sheets-conditional-formatting-ui/src/index.ts
index 5d06bd4d53..e7abb899dc 100644
--- a/packages/sheets-conditional-formatting-ui/src/index.ts
+++ b/packages/sheets-conditional-formatting-ui/src/index.ts
@@ -16,12 +16,6 @@
import './global.css';
-export { UniverSheetsConditionalFormattingMobileUIPlugin } from './mobile-plugin';
-export { UniverSheetsConditionalFormattingUIPlugin } from './plugin';
-export { ConditionalFormattingClearController } from './controllers/cf.clear.controller';
-
-// #region - all commands
-
export { AddAverageCfCommand } from './commands/commands/add-average-cf.command';
export { AddColorScaleConditionalRuleCommand } from './commands/commands/add-color-scale-cf.command';
export { AddDataBarConditionalRuleCommand } from './commands/commands/add-data-bar-cf.command';
@@ -31,7 +25,8 @@ export { AddRankCfCommand } from './commands/commands/add-rank-cf.command';
export { AddTextCfCommand } from './commands/commands/add-text-cf.command';
export { AddTimePeriodCfCommand } from './commands/commands/add-time-period-cf.command';
export { AddUniqueValuesCfCommand } from './commands/commands/add-unique-values-cf.command';
-
export { OpenConditionalFormattingOperator } from './commands/operations/open-conditional-formatting-panel';
-
-// #endregion
+export { ConditionalFormattingClearController } from './controllers/cf.clear.controller';
+export type { IUniverSheetsConditionalFormattingUIConfig } from './controllers/config.schema';
+export { UniverSheetsConditionalFormattingMobileUIPlugin } from './mobile-plugin';
+export { UniverSheetsConditionalFormattingUIPlugin } from './plugin';
diff --git a/packages/sheets-conditional-formatting/src/index.ts b/packages/sheets-conditional-formatting/src/index.ts
index 2d62a922d5..072af103d4 100644
--- a/packages/sheets-conditional-formatting/src/index.ts
+++ b/packages/sheets-conditional-formatting/src/index.ts
@@ -15,50 +15,12 @@
*/
export * from './base/const';
-export * from './models/conditional-formatting-rule-model';
-export * from './models/conditional-formatting-view-model';
-export * from './models/icon-map';
-export * from './models/type';
-export { UniverSheetsConditionalFormattingPlugin } from './plugin';
-export * from './render/data-bar.render';
-export * from './render/icon.render';
-export * from './render/type';
-export * from './services/conditional-formatting.service';
-export * from './services/conditional-formatting-formula.service';
-export * from './models/calculate-unit-v2/utils';
-export * from './utils/anchor';
-export * from './utils/create-cf-id';
-export * from './utils/is-ranges-equal';
-export * from './utils/remove-undefined-attr';
-export * from './utils/type';
-
-// #region - all commands
-
-export {
- AddCfCommand,
- type IAddCfCommandParams,
-} from './commands/commands/add-cf.command';
-export {
- ClearRangeCfCommand,
- type IClearRangeCfParams,
-} from './commands/commands/clear-range-cf.command';
-export {
- ClearWorksheetCfCommand,
- type IClearWorksheetCfParams,
-} from './commands/commands/clear-worksheet-cf.command';
-export {
- DeleteCfCommand,
- type IDeleteCfCommandParams,
-} from './commands/commands/delete-cf.command';
-export {
- type IMoveCfCommandParams,
- MoveCfCommand,
-} from './commands/commands/move-cf.command';
-export {
- type ISetCfCommandParams,
- SetCfCommand,
-} from './commands/commands/set-cf.command';
-
+export { AddCfCommand, type IAddCfCommandParams } from './commands/commands/add-cf.command';
+export { ClearRangeCfCommand, type IClearRangeCfParams } from './commands/commands/clear-range-cf.command';
+export { ClearWorksheetCfCommand, type IClearWorksheetCfParams } from './commands/commands/clear-worksheet-cf.command';
+export { DeleteCfCommand, type IDeleteCfCommandParams } from './commands/commands/delete-cf.command';
+export { type IMoveCfCommandParams, MoveCfCommand } from './commands/commands/move-cf.command';
+export { type ISetCfCommandParams, SetCfCommand } from './commands/commands/set-cf.command';
export {
AddConditionalRuleMutation,
AddConditionalRuleMutationUndoFactory,
@@ -75,10 +37,22 @@ export {
MoveConditionalRuleMutation,
MoveConditionalRuleMutationUndoFactory,
} from './commands/mutations/move-conditional-rule.mutation';
-export {
- type ISetConditionalRuleMutationParams,
- SetConditionalRuleMutation,
- setConditionalRuleMutationUndoFactory,
-} from './commands/mutations/set-conditional-rule.mutation';
-
-// #endregion
+export type { ISetConditionalRuleMutationParams } from './commands/mutations/set-conditional-rule.mutation';
+export { SetConditionalRuleMutation, setConditionalRuleMutationUndoFactory } from './commands/mutations/set-conditional-rule.mutation';
+export type { IUniverSheetsConditionalFormattingConfig } from './controllers/config.schema';
+export * from './models/calculate-unit-v2/utils';
+export * from './models/conditional-formatting-rule-model';
+export * from './models/conditional-formatting-view-model';
+export * from './models/icon-map';
+export * from './models/type';
+export { UniverSheetsConditionalFormattingPlugin } from './plugin';
+export * from './render/data-bar.render';
+export * from './render/icon.render';
+export * from './render/type';
+export * from './services/conditional-formatting-formula.service';
+export * from './services/conditional-formatting.service';
+export * from './utils/anchor';
+export * from './utils/create-cf-id';
+export * from './utils/is-ranges-equal';
+export * from './utils/remove-undefined-attr';
+export * from './utils/type';
diff --git a/packages/sheets-crosshair-highlight/src/index.ts b/packages/sheets-crosshair-highlight/src/index.ts
index e4c9877661..2c210c2c8f 100644
--- a/packages/sheets-crosshair-highlight/src/index.ts
+++ b/packages/sheets-crosshair-highlight/src/index.ts
@@ -16,11 +16,6 @@
import './global.css';
-export { UniverSheetsCrosshairHighlightPlugin } from './plugin';
-export { CROSSHAIR_HIGHLIGHT_COLORS, SheetsCrosshairHighlightService } from './services/crosshair.service';
-
-// #region commands
-
export {
DisableCrosshairHighlightOperation,
EnableCrosshairHighlightOperation,
@@ -28,5 +23,6 @@ export {
SetCrosshairHighlightColorOperation,
ToggleCrosshairHighlightOperation,
} from './commands/operations/operation';
-
-// #endregion
+export type { IUniverSheetsCrosshairHighlightConfig } from './controllers/config.schema';
+export { UniverSheetsCrosshairHighlightPlugin } from './plugin';
+export { CROSSHAIR_HIGHLIGHT_COLORS, SheetsCrosshairHighlightService } from './services/crosshair.service';
diff --git a/packages/sheets-data-validation-ui/src/index.ts b/packages/sheets-data-validation-ui/src/index.ts
index 9227b3d63d..26b6bc9664 100644
--- a/packages/sheets-data-validation-ui/src/index.ts
+++ b/packages/sheets-data-validation-ui/src/index.ts
@@ -16,7 +16,7 @@
import './global.css';
-export { BaseSheetDataValidatorView } from './views/validator-views/sheet-validator-view';
export type { IUniverSheetsDataValidationUIConfig } from './controllers/config.schema';
-export { UniverSheetsDataValidationUIPlugin } from './plugin';
export { UniverSheetsDataValidationMobileUIPlugin } from './mobile-plugin';
+export { UniverSheetsDataValidationUIPlugin } from './plugin';
+export { BaseSheetDataValidatorView } from './views/validator-views/sheet-validator-view';
diff --git a/packages/sheets-data-validation/src/index.ts b/packages/sheets-data-validation/src/index.ts
index 2bf8785e73..f103d74b4b 100644
--- a/packages/sheets-data-validation/src/index.ts
+++ b/packages/sheets-data-validation/src/index.ts
@@ -14,27 +14,6 @@
* limitations under the License.
*/
-export { DATA_VALIDATION_PLUGIN_NAME } from './common/const';
-export { type IValidStatusChange, SheetDataValidationModel } from './models/sheet-data-validation-model';
-export { UniverSheetsDataValidationPlugin } from './plugin';
-export { DataValidationCacheService } from './services/dv-cache.service';
-export { DataValidationCustomFormulaService } from './services/dv-custom-formula.service';
-export { DataValidationFormulaService } from './services/dv-formula.service';
-export { SheetsDataValidationValidatorService } from './services/dv-validator-service';
-export { createDefaultNewRule } from './utils/create';
-export { DataValidationFormulaController } from './controllers/dv-formula.controller';
-export { getFormulaCellData, getFormulaResult } from './utils/formula';
-export { getCellValueOrigin } from './utils/get-cell-data-origin';
-export { ListValidator } from './validators/list-validator';
-export { DateValidator } from './validators/date-validator';
-export { CHECKBOX_FORMULA_1, CHECKBOX_FORMULA_2, CheckboxValidator, transformCheckboxValue } from './validators/checkbox-validator';
-export { ListMultipleValidator } from './validators/list-multiple-validator';
-export { deserializeListOptions, getDataValidationCellValue, serializeListOptions } from './validators/util';
-export { isLegalFormulaResult } from './utils/formula';
-export { getCellValueNumber } from './validators/decimal-validator';
-export { getTransformedFormula } from './validators/util';
-// #region - all commands
-
export {
AddSheetDataValidationCommand,
ClearRangeDataValidationCommand,
@@ -52,9 +31,26 @@ export {
UpdateSheetDataValidationRangeCommand,
UpdateSheetDataValidationSettingCommand,
} from './commands/commands/data-validation.command';
-
-// #endregion
-
+export { DATA_VALIDATION_PLUGIN_NAME } from './common/const';
+export type { IUniverSheetsDataValidationConfig } from './controllers/config.schema';
+export { DataValidationFormulaController } from './controllers/dv-formula.controller';
+export { type IValidStatusChange, SheetDataValidationModel } from './models/sheet-data-validation-model';
+export { UniverSheetsDataValidationPlugin } from './plugin';
+export { DataValidationCacheService } from './services/dv-cache.service';
+export { DataValidationCustomFormulaService } from './services/dv-custom-formula.service';
+export { DataValidationFormulaService } from './services/dv-formula.service';
+export { SheetsDataValidationValidatorService } from './services/dv-validator-service';
+export { createDefaultNewRule } from './utils/create';
+export { getFormulaCellData, getFormulaResult } from './utils/formula';
+export { isLegalFormulaResult } from './utils/formula';
+export { getCellValueOrigin } from './utils/get-cell-data-origin';
+export { CHECKBOX_FORMULA_1, CHECKBOX_FORMULA_2, CheckboxValidator, transformCheckboxValue } from './validators/checkbox-validator';
+export { DateValidator } from './validators/date-validator';
+export { getCellValueNumber } from './validators/decimal-validator';
+export { ListMultipleValidator } from './validators/list-multiple-validator';
+export { ListValidator } from './validators/list-validator';
+export { deserializeListOptions, getDataValidationCellValue, serializeListOptions } from './validators/util';
+export { getTransformedFormula } from './validators/util';
export const CUSTOM_FORMULA_INPUT_NAME = 'data-validation.custom-formula-input';
export const BASE_FORMULA_INPUT_NAME = 'data-validation.formula-input';
export const LIST_FORMULA_INPUT_NAME = 'data-validation.list-formula-input';
diff --git a/packages/sheets-drawing-ui/src/index.ts b/packages/sheets-drawing-ui/src/index.ts
index eda61668eb..7d6ee7c08b 100644
--- a/packages/sheets-drawing-ui/src/index.ts
+++ b/packages/sheets-drawing-ui/src/index.ts
@@ -16,25 +16,21 @@
import './global.css';
-export { UniverSheetsDrawingUIPlugin } from './plugin';
-export { type ICanvasFloatDom, type IDOMAnchor, SheetCanvasFloatDomManagerService } from './services/canvas-float-dom-manager.service';
-export { SHEETS_IMAGE_MENU_ID } from './views/menu/image.menu';
-export { SheetDrawingUpdateController } from './controllers/sheet-drawing-update.controller';
-// #region - all commands
-
export { DeleteDrawingsCommand } from './commands/commands/delete-drawings.command';
export { GroupSheetDrawingCommand } from './commands/commands/group-sheet-drawing.command';
+export { type IInsertImageCommandParams, InsertFloatImageCommand } from './commands/commands/insert-image.command';
export { InsertSheetDrawingCommand } from './commands/commands/insert-sheet-drawing.command';
+export type { IDeleteDrawingCommandParams, IInsertDrawingCommandParams, ISetDrawingCommandParams } from './commands/commands/interfaces';
export { MoveDrawingsCommand } from './commands/commands/move-drawings.command';
export { RemoveSheetDrawingCommand } from './commands/commands/remove-sheet-drawing.command';
export { SetDrawingArrangeCommand } from './commands/commands/set-drawing-arrange.command';
export { SetSheetDrawingCommand } from './commands/commands/set-sheet-drawing.command';
export { UngroupSheetDrawingCommand } from './commands/commands/ungroup-sheet-drawing.command';
-
export { ClearSheetDrawingTransformerOperation } from './commands/operations/clear-drawing-transformer.operation';
export { EditSheetDrawingOperation } from './commands/operations/edit-sheet-drawing.operation';
-export { type IInsertImageCommandParams, InsertFloatImageCommand } from './commands/commands/insert-image.command';
export { SidebarSheetDrawingOperation } from './commands/operations/open-drawing-panel.operation';
-
-export type { IDeleteDrawingCommandParams, IInsertDrawingCommandParams, ISetDrawingCommandParams } from './commands/commands/interfaces';
-// #endregion
+export type { IUniverSheetsDrawingUIConfig } from './controllers/config.schema';
+export { SheetDrawingUpdateController } from './controllers/sheet-drawing-update.controller';
+export { UniverSheetsDrawingUIPlugin } from './plugin';
+export { type ICanvasFloatDom, type IDOMAnchor, SheetCanvasFloatDomManagerService } from './services/canvas-float-dom-manager.service';
+export { SHEETS_IMAGE_MENU_ID } from './views/menu/image.menu';
diff --git a/packages/sheets-drawing/src/index.ts b/packages/sheets-drawing/src/index.ts
index 00d7041b08..c091a890c3 100644
--- a/packages/sheets-drawing/src/index.ts
+++ b/packages/sheets-drawing/src/index.ts
@@ -14,11 +14,9 @@
* limitations under the License.
*/
+export { DrawingApplyType, type ISetDrawingApplyMutationParams, SetDrawingApplyMutation } from './commands/mutations/set-drawing-apply.mutation';
+export type { IUniverSheetsDrawingConfig } from './controllers/config.schema';
+export { SHEET_DRAWING_PLUGIN } from './controllers/sheet-drawing.controller';
export { UniverSheetsDrawingPlugin } from './plugin';
export { ISheetDrawingService, SheetDrawingAnchorType } from './services/sheet-drawing.service';
-export { SHEET_DRAWING_PLUGIN } from './controllers/sheet-drawing.controller';
export type { IFloatDomData, ISheetDrawing, ISheetDrawingPosition, ISheetFloatDom, ISheetImage } from './services/sheet-drawing.service';
-
-// #region - all commands
-export { DrawingApplyType, type ISetDrawingApplyMutationParams, SetDrawingApplyMutation } from './commands/mutations/set-drawing-apply.mutation';
-// #endregion
diff --git a/packages/sheets-filter-ui/src/index.ts b/packages/sheets-filter-ui/src/index.ts
index 17c005143e..fe69605141 100644
--- a/packages/sheets-filter-ui/src/index.ts
+++ b/packages/sheets-filter-ui/src/index.ts
@@ -16,17 +16,9 @@
import './global.css';
-export { UniverSheetsFilterUIPlugin } from './plugin';
+export { ChangeFilterByOperation, CloseFilterPanelOperation, OpenFilterPanelOperation } from './commands/operations/sheets-filter.operation';
+export type { IOpenFilterPanelOperationParams } from './commands/operations/sheets-filter.operation';
+export type { IUniverSheetsFilterUIConfig } from './controllers/config.schema';
export { UniverSheetsFilterMobileUIPlugin } from './mobile-plugin';
+export { UniverSheetsFilterUIPlugin } from './plugin';
export { UniverSheetsFilterUIWorkerPlugin } from './worker/plugin';
-
-// #region - all commands
-
-export {
- ChangeFilterByOperation,
- CloseFilterPanelOperation,
- type IOpenFilterPanelOperationParams,
- OpenFilterPanelOperation,
-} from './commands/operations/sheets-filter.operation';
-
-// #endregion
diff --git a/packages/sheets-filter/src/index.ts b/packages/sheets-filter/src/index.ts
index 85647c0f1d..f8d269bab1 100644
--- a/packages/sheets-filter/src/index.ts
+++ b/packages/sheets-filter/src/index.ts
@@ -14,8 +14,26 @@
* limitations under the License.
*/
-export { UniverSheetsFilterPlugin } from './plugin';
-export { FilterColumn, FilterModel } from './models/filter-model';
+export {
+ ClearSheetsFilterCriteriaCommand,
+ type ISetSheetFilterRangeCommandParams,
+ type ISetSheetsFilterCriteriaCommandParams,
+ ReCalcSheetsFilterCommand,
+ RemoveSheetFilterCommand,
+ SetSheetFilterRangeCommand,
+ SetSheetsFilterCriteriaCommand,
+ SmartToggleSheetsFilterCommand,
+} from './commands/commands/sheets-filter.command';
+export {
+ type ISetSheetsFilterCriteriaMutationParams,
+ type ISetSheetsFilterRangeMutationParams,
+ ReCalcSheetsFilterMutation,
+ RemoveSheetsFilterMutation,
+ SetSheetsFilterCriteriaMutation,
+ SetSheetsFilterRangeMutation,
+} from './commands/mutations/sheets-filter.mutation';
+export { FILTER_MUTATIONS } from './common/const';
+export type { IUniverSheetsFilterConfig } from './controllers/config.schema';
export {
equals,
getCustomFilterFn,
@@ -25,30 +43,8 @@ export {
lessThanOrEqualTo,
notEquals,
} from './models/custom-filters';
-export { SHEET_FILTER_SNAPSHOT_ID, SheetsFilterService } from './services/sheet-filter.service';
+export { FilterColumn, FilterModel } from './models/filter-model';
export type { IAutoFilter, ICustomFilter, ICustomFilters, IFilterColumn, IFilters } from './models/types';
export { CustomFilterOperator } from './models/types';
-export { FILTER_MUTATIONS } from './common/const';
-
-// #region - all commands
-
-export {
- type ISetSheetsFilterCriteriaMutationParams,
- type ISetSheetsFilterRangeMutationParams,
- ReCalcSheetsFilterMutation,
- RemoveSheetsFilterMutation,
- SetSheetsFilterCriteriaMutation,
- SetSheetsFilterRangeMutation,
-} from './commands/mutations/sheets-filter.mutation';
-export {
- ClearSheetsFilterCriteriaCommand,
- type ISetSheetFilterRangeCommandParams,
- type ISetSheetsFilterCriteriaCommandParams,
- ReCalcSheetsFilterCommand,
- RemoveSheetFilterCommand,
- SetSheetFilterRangeCommand,
- SetSheetsFilterCriteriaCommand,
- SmartToggleSheetsFilterCommand,
-} from './commands/commands/sheets-filter.command';
-
-// #endregion
+export { UniverSheetsFilterPlugin } from './plugin';
+export { SHEET_FILTER_SNAPSHOT_ID, SheetsFilterService } from './services/sheet-filter.service';
diff --git a/packages/sheets-find-replace/src/index.ts b/packages/sheets-find-replace/src/index.ts
index 6dd560d8a5..0c7adffeb1 100644
--- a/packages/sheets-find-replace/src/index.ts
+++ b/packages/sheets-find-replace/src/index.ts
@@ -14,11 +14,7 @@
* limitations under the License.
*/
-export { UniverSheetsFindReplacePlugin } from './plugin';
-export { SheetsFindReplaceController } from './controllers/sheet-find-replace.controller';
-
-// #region - all commands
-
export { SheetReplaceCommand } from './commands/commands/sheet-replace.command';
-
-// #endregion
+export type { IUniverSheetsFindReplaceConfig } from './controllers/config.schema';
+export { SheetsFindReplaceController } from './controllers/sheet-find-replace.controller';
+export { UniverSheetsFindReplacePlugin } from './plugin';
diff --git a/packages/sheets-formula-ui/src/index.ts b/packages/sheets-formula-ui/src/index.ts
index 1e0c8a60b9..e340f40e49 100644
--- a/packages/sheets-formula-ui/src/index.ts
+++ b/packages/sheets-formula-ui/src/index.ts
@@ -23,15 +23,11 @@ export { InsertFunctionOperation } from './commands/operations/insert-function.o
export { MoreFunctionsOperation } from './commands/operations/more-functions.operation';
export { ReferenceAbsoluteOperation } from './commands/operations/reference-absolute.operation';
export { SearchFunctionOperation } from './commands/operations/search-function.operation';
-export { FormulaEditor, type IFormulaEditorRef } from './views/formula-editor/index';
-export { type IRangeSelectorInstance, type IRangeSelectorProps, RangeSelector } from './views/range-selector/index';
-export { RefSelectionsRenderService } from './services/render-services/ref-selections.render-service';
-export { GlobalRangeSelectorService, type IShowRangeSelectorDialogOptions } from './services/range-selector.service';
-// #region - all commands
-
+export type { IUniverSheetsFormulaBaseConfig } from './controllers/config.schema';
export { FormulaReorderController } from './controllers/formula-reorder.controller';
-
-export { FORMULA_PROMPT_ACTIVATED } from './services/prompt.service';
export { UniverSheetsFormulaUIPlugin } from './plugin';
-
-// #endregion
+export { FORMULA_PROMPT_ACTIVATED } from './services/prompt.service';
+export { GlobalRangeSelectorService, type IShowRangeSelectorDialogOptions } from './services/range-selector.service';
+export { RefSelectionsRenderService } from './services/render-services/ref-selections.render-service';
+export { FormulaEditor, type IFormulaEditorRef } from './views/formula-editor/index';
+export { type IRangeSelectorInstance, type IRangeSelectorProps, RangeSelector } from './views/range-selector/index';
diff --git a/packages/sheets-formula/src/index.ts b/packages/sheets-formula/src/index.ts
index e0c1d466fd..7f24928735 100644
--- a/packages/sheets-formula/src/index.ts
+++ b/packages/sheets-formula/src/index.ts
@@ -14,26 +14,22 @@
* limitations under the License.
*/
-// #region - all commands
-
export { type IInsertFunction, type IInsertFunctionCommandParams, InsertFunctionCommand } from './commands/commands/insert-function.command';
export { QuickSumCommand } from './commands/commands/quick-sum.command';
export { OtherFormulaMarkDirty } from './commands/mutations/formula.mutation';
-
-// #endregion
-
-export { UpdateDefinedNameController } from './controllers/update-defined-name.controller';
+export { CalculationMode, PLUGIN_CONFIG_KEY_BASE } from './controllers/config.schema';
+export type { IUniverSheetsFormulaBaseConfig, IUniverSheetsFormulaRemoteConfig } from './controllers/config.schema';
export { TriggerCalculationController } from './controllers/trigger-calculation.controller';
-export { CalculationMode, type IUniverSheetsFormulaBaseConfig, PLUGIN_CONFIG_KEY_BASE } from './controllers/config.schema';
-export type { IRegisterAsyncFunction, IRegisterFunction, ISingleFunctionRegisterParams } from './services/register-function.service';
-export { calculateFormula } from './util/calculate';
+export { UpdateDefinedNameController } from './controllers/update-defined-name.controller';
export { UpdateFormulaController } from './controllers/update-formula.controller';
+export { UniverRemoteSheetsFormulaPlugin, UniverSheetsFormulaPlugin } from './plugin';
export { DescriptionService, IDescriptionService, type ISearchItem } from './services/description.service';
export type { IFormulaInfo, IOtherFormulaResult } from './services/formula-common';
export { FormulaRefRangeService } from './services/formula-ref-range.service';
+export type { IRegisterAsyncFunction, IRegisterFunction, ISingleFunctionRegisterParams } from './services/register-function.service';
export type { IRegisterFunctionParams, IUnregisterFunctionParams } from './services/register-function.service';
export { RegisterFunctionService } from './services/register-function.service';
export { IRegisterFunctionService } from './services/register-function.service';
export { RegisterOtherFormulaService } from './services/register-other-formula.service';
export { IRemoteRegisterFunctionService, RemoteRegisterFunctionService } from './services/remote/remote-register-function.service';
-export { UniverRemoteSheetsFormulaPlugin, UniverSheetsFormulaPlugin } from './plugin';
+export { calculateFormula } from './util/calculate';
diff --git a/packages/sheets-formula/src/plugin.ts b/packages/sheets-formula/src/plugin.ts
index a75f317e1d..c979ebffc5 100644
--- a/packages/sheets-formula/src/plugin.ts
+++ b/packages/sheets-formula/src/plugin.ts
@@ -15,15 +15,10 @@
*/
import type { Dependency } from '@univerjs/core';
-import type {
- IUniverSheetsFormulaBaseConfig,
- IUniverSheetsFormulaRemoteConfig,
-} from './controllers/config.schema';
+import type { IUniverSheetsFormulaBaseConfig, IUniverSheetsFormulaRemoteConfig } from './controllers/config.schema';
import { DependentOn, IConfigService, Inject, Injector, isNodeEnv, merge, Plugin, touchDependencies, UniverInstanceType } from '@univerjs/core';
import { UniverFormulaEnginePlugin } from '@univerjs/engine-formula';
-
import { fromModule, IRPCChannelService, toModule } from '@univerjs/rpc';
-
import { UniverSheetsPlugin } from '@univerjs/sheets';
import { SHEETS_FORMULA_PLUGIN_NAME } from './common/plugin-name';
import { ActiveDirtyController } from './controllers/active-dirty.controller';
diff --git a/packages/sheets-graphics/src/index.ts b/packages/sheets-graphics/src/index.ts
index 6da24c132d..5249f9df77 100644
--- a/packages/sheets-graphics/src/index.ts
+++ b/packages/sheets-graphics/src/index.ts
@@ -14,5 +14,6 @@
* limitations under the License.
*/
-export { UniverSheetsGraphicsPlugin } from './plugin';
+export type { IUniverSheetsGraphicsConfig } from './controllers/config.schema';
export { SheetGraphicsRenderController } from './controllers/graphics-render.controller';
+export { UniverSheetsGraphicsPlugin } from './plugin';
diff --git a/packages/sheets-hyper-link-ui/src/index.ts b/packages/sheets-hyper-link-ui/src/index.ts
index 4546b8eb4a..b630cc9e33 100644
--- a/packages/sheets-hyper-link-ui/src/index.ts
+++ b/packages/sheets-hyper-link-ui/src/index.ts
@@ -16,23 +16,16 @@
import './global.css';
+export {
+ CloseHyperLinkPopupOperation,
+ InsertHyperLinkOperation,
+ type IOpenHyperLinkEditPanelOperationParams,
+ OpenHyperLinkEditPanelOperation,
+} from './commands/operations/popup.operations';
export type { IUniverSheetsHyperLinkUIConfig } from './controllers/config.schema';
export { SheetsHyperLinkCopyPasteController } from './controllers/copy-paste.controller';
export { InsertLinkShortcut } from './controllers/menu';
export { UniverSheetsHyperLinkUIPlugin } from './plugin';
-
export { SheetsHyperLinkPopupService } from './services/popup.service';
-
export { SheetsHyperLinkResolverService } from './services/resolver.service';
export { type ICustomHyperLinkView, SheetsHyperLinkSidePanelService } from './services/side-panel.service';
-
-// #region - all commands
-
-export {
- CloseHyperLinkPopupOperation,
- InsertHyperLinkOperation,
- type IOpenHyperLinkEditPanelOperationParams,
- OpenHyperLinkEditPanelOperation,
-} from './commands/operations/popup.operations';
-
-// #endregion
diff --git a/packages/sheets-hyper-link/src/index.ts b/packages/sheets-hyper-link/src/index.ts
index e7078baf09..7feaad6623 100644
--- a/packages/sheets-hyper-link/src/index.ts
+++ b/packages/sheets-hyper-link/src/index.ts
@@ -14,15 +14,6 @@
* limitations under the License.
*/
-export { HyperLinkModel } from './models/hyper-link.model';
-export { SheetHyperLinkType } from './types/enums/hyper-link-type';
-export { UniverSheetsHyperLinkPlugin } from './plugin';
-export type { ICellLinkContent, ISheetHyperLink } from './types/interfaces/i-hyper-link';
-export { type ISheetHyperLinkInfo, type ISheetUrlParams, SheetsHyperLinkParserService } from './services/parser.service';
-export { ERROR_RANGE } from './types/const';
-
-// #region - all commands
-
export { AddHyperLinkCommand, AddRichHyperLinkCommand, type IAddHyperLinkCommandParams, type IAddRichHyperLinkCommandParams } from './commands/commands/add-hyper-link.command';
export { CancelHyperLinkCommand, CancelRichHyperLinkCommand, type ICancelHyperLinkCommandParams, type ICancelRichHyperLinkCommandParams } from './commands/commands/remove-hyper-link.command';
export { type IUpdateHyperLinkCommandParams, type IUpdateRichHyperLinkCommandParams, UpdateHyperLinkCommand, UpdateRichHyperLinkCommand } from './commands/commands/update-hyper-link.command';
@@ -34,5 +25,10 @@ export {
UpdateHyperLinkMutation,
UpdateHyperLinkRefMutation,
} from './commands/mutations/update-hyper-link.mutation';
-
-// #endregion
+export type { IUniverSheetsHyperLinkConfig } from './controllers/config.schema';
+export { HyperLinkModel } from './models/hyper-link.model';
+export { UniverSheetsHyperLinkPlugin } from './plugin';
+export { type ISheetHyperLinkInfo, type ISheetUrlParams, SheetsHyperLinkParserService } from './services/parser.service';
+export { ERROR_RANGE } from './types/const';
+export { SheetHyperLinkType } from './types/enums/hyper-link-type';
+export type { ICellLinkContent, ISheetHyperLink } from './types/interfaces/i-hyper-link';
diff --git a/packages/sheets-note-ui/src/controllers/config.schema.ts b/packages/sheets-note-ui/src/controllers/config.schema.ts
index 52bbace80f..d0a9b0f572 100644
--- a/packages/sheets-note-ui/src/controllers/config.schema.ts
+++ b/packages/sheets-note-ui/src/controllers/config.schema.ts
@@ -20,7 +20,7 @@ export const SHEETS_NOTE_UI_PLUGIN_CONFIG_KEY = 'sheets-note-ui.config';
export const configSymbol = Symbol(SHEETS_NOTE_UI_PLUGIN_CONFIG_KEY);
-export interface IUniverSheetsNoteUIPluginConfig {
+export interface IUniverSheetsNoteUIConfig {
menu?: MenuConfig;
defaultNoteSize?: {
@@ -29,4 +29,4 @@ export interface IUniverSheetsNoteUIPluginConfig {
};
}
-export const defaultPluginConfig: IUniverSheetsNoteUIPluginConfig = {};
+export const defaultPluginConfig: IUniverSheetsNoteUIConfig = {};
diff --git a/packages/sheets-note-ui/src/index.ts b/packages/sheets-note-ui/src/index.ts
index cdf499f086..8317d78dfe 100644
--- a/packages/sheets-note-ui/src/index.ts
+++ b/packages/sheets-note-ui/src/index.ts
@@ -16,9 +16,9 @@
import './global.css';
+export type { IUniverSheetsNoteUIConfig } from './controllers/config.schema';
+export { SheetsCellContentController } from './controllers/sheets-cell-content.controller';
+export { SheetsNotePopupController } from './controllers/sheets-note-popup.controller';
export { UniverSheetsNoteUIPlugin } from './plugin';
-export { type IUniverSheetsNoteUIPluginConfig } from './controllers/config.schema';
export { SheetsNotePopupService } from './services/sheets-note-popup.service';
export { SheetsNote } from './views/note';
-export { SheetsNotePopupController } from './controllers/sheets-note-popup.controller';
-export { SheetsCellContentController } from './controllers/sheets-cell-content.controller';
diff --git a/packages/sheets-note-ui/src/plugin.ts b/packages/sheets-note-ui/src/plugin.ts
index 13885c7024..639c50f443 100644
--- a/packages/sheets-note-ui/src/plugin.ts
+++ b/packages/sheets-note-ui/src/plugin.ts
@@ -15,7 +15,7 @@
*/
import type { Dependency } from '@univerjs/core';
-import type { IUniverSheetsNoteUIPluginConfig } from './controllers/config.schema';
+import type { IUniverSheetsNoteUIConfig } from './controllers/config.schema';
import { DependentOn, IConfigService, Inject, Injector, merge, Plugin, touchDependencies, UniverInstanceType } from '@univerjs/core';
import { UniverSheetsNotePlugin } from '@univerjs/sheets-note';
import { defaultPluginConfig, SHEETS_NOTE_UI_PLUGIN_CONFIG_KEY } from './controllers/config.schema';
@@ -33,7 +33,7 @@ export class UniverSheetsNoteUIPlugin extends Plugin {
static override type = UniverInstanceType.UNIVER_SHEET;
constructor(
- private readonly _config: Partial<IUniverSheetsNoteUIPluginConfig> = defaultPluginConfig,
+ private readonly _config: Partial<IUniverSheetsNoteUIConfig> = defaultPluginConfig,
@Inject(Injector) protected override readonly _injector: Injector,
@IConfigService private readonly _configService: IConfigService
) {
diff --git a/packages/sheets-note-ui/src/views/note.tsx b/packages/sheets-note-ui/src/views/note.tsx
index 005271a378..4ec1a7761e 100644
--- a/packages/sheets-note-ui/src/views/note.tsx
+++ b/packages/sheets-note-ui/src/views/note.tsx
@@ -17,7 +17,7 @@
import type { ISheetLocationBase } from '@univerjs/sheets';
import type { ISheetNote } from '@univerjs/sheets-note';
import type { IPopup } from '@univerjs/ui';
-import type { IUniverSheetsNoteUIPluginConfig } from '../controllers/config.schema';
+import type { IUniverSheetsNoteUIConfig } from '../controllers/config.schema';
import { ICommandService, LocaleService } from '@univerjs/core';
import { borderClassName, clsx, scrollbarClassName } from '@univerjs/design';
import { IRenderManagerService } from '@univerjs/engine-render';
@@ -31,7 +31,7 @@ export const SheetsNote = (props: { popup: IPopup<{ location: ISheetLocationBase
const noteModel = useDependency(SheetsNoteModel);
const localeService = useDependency(LocaleService);
const renderManagerService = useDependency(IRenderManagerService);
- const config = useConfigValue<IUniverSheetsNoteUIPluginConfig>(SHEETS_NOTE_UI_PLUGIN_CONFIG_KEY);
+ const config = useConfigValue<IUniverSheetsNoteUIConfig>(SHEETS_NOTE_UI_PLUGIN_CONFIG_KEY);
const activePopup = props.popup.extraProps?.location;
if (!activePopup) {
console.error('Popup extraProps or location is undefined.');
diff --git a/packages/sheets-note/src/index.ts b/packages/sheets-note/src/index.ts
index 5b97963ab8..0af3064cad 100644
--- a/packages/sheets-note/src/index.ts
+++ b/packages/sheets-note/src/index.ts
@@ -14,8 +14,9 @@
* limitations under the License.
*/
-export { UniverSheetsNotePlugin } from './plugin';
-export * from './models/sheets-note.model';
-export * from './controllers/sheets-note-resource.controller';
-export * from './commands/mutations/note.mutation';
export * from './commands/commands/note.command';
+export * from './commands/mutations/note.mutation';
+export type { IUniverSheetsNoteConfig } from './controllers/config.schema';
+export * from './controllers/sheets-note-resource.controller';
+export * from './models/sheets-note.model';
+export { UniverSheetsNotePlugin } from './plugin';
diff --git a/packages/sheets-numfmt-ui/src/index.ts b/packages/sheets-numfmt-ui/src/index.ts
index e822854f9f..4590e108d5 100644
--- a/packages/sheets-numfmt-ui/src/index.ts
+++ b/packages/sheets-numfmt-ui/src/index.ts
@@ -16,4 +16,5 @@
import './global.css';
+export type { IUniverSheetsNumfmtUIConfig } from './controllers/config.schema';
export { UniverSheetsNumfmtUIPlugin } from './plugin';
diff --git a/packages/sheets-numfmt/src/index.ts b/packages/sheets-numfmt/src/index.ts
index 6a92443fdb..5327494ce9 100644
--- a/packages/sheets-numfmt/src/index.ts
+++ b/packages/sheets-numfmt/src/index.ts
@@ -15,23 +15,19 @@
*/
export { countryCurrencyMap } from './base/const/currency-symbols';
-export { CURRENCYFORMAT, DATEFMTLISG, NUMBERFORMAT } from './base/const/formatdetail';
-export { UniverSheetsNumfmtPlugin } from './plugin';
-export { MenuCurrencyService } from './service/menu.currency.service';
-export { getPatternPreview, getPatternPreviewIgnoreGeneral, getPatternType } from './utils/pattern';
-export { getDecimalFromPattern, getDecimalString, isPatternHasDecimal, setPatternDecimal } from './utils/decimal';
-export { getCurrencyType } from './utils/currency';
export { currencySymbols } from './base/const/currency-symbols';
-export { SheetsNumfmtCellContentController } from './controllers/numfmt-cell-content.controller';
-export { getCurrencyFormatOptions, getCurrencyOptions, getDateFormatOptions, getNumberFormatOptions } from './utils/options';
-export { type IUniverSheetsNumfmtConfig, SHEETS_NUMFMT_PLUGIN_CONFIG_KEY } from './controllers/config.schema';
-
-// #region - all commands
-
+export { CURRENCYFORMAT, DATEFMTLISG, NUMBERFORMAT } from './base/const/formatdetail';
export { AddDecimalCommand } from './commands/commands/add-decimal.command';
export { SetCurrencyCommand } from './commands/commands/set-currency.command';
export { type ISetNumfmtCommandParams, SetNumfmtCommand } from './commands/commands/set-numfmt.command';
export { SetPercentCommand } from './commands/commands/set-percent.command';
export { SubtractDecimalCommand } from './commands/commands/subtract-decimal.command';
-
-// #endregion
+export { SHEETS_NUMFMT_PLUGIN_CONFIG_KEY } from './controllers/config.schema';
+export type { IUniverSheetsNumfmtConfig } from './controllers/config.schema';
+export { SheetsNumfmtCellContentController } from './controllers/numfmt-cell-content.controller';
+export { UniverSheetsNumfmtPlugin } from './plugin';
+export { MenuCurrencyService } from './service/menu.currency.service';
+export { getCurrencyType } from './utils/currency';
+export { getDecimalFromPattern, getDecimalString, isPatternHasDecimal, setPatternDecimal } from './utils/decimal';
+export { getCurrencyFormatOptions, getCurrencyOptions, getDateFormatOptions, getNumberFormatOptions } from './utils/options';
+export { getPatternPreview, getPatternPreviewIgnoreGeneral, getPatternType } from './utils/pattern';
diff --git a/packages/sheets-sort-ui/src/index.ts b/packages/sheets-sort-ui/src/index.ts
index 15f52c56a2..2c8e07f1e2 100644
--- a/packages/sheets-sort-ui/src/index.ts
+++ b/packages/sheets-sort-ui/src/index.ts
@@ -16,10 +16,6 @@
import './global.css';
-export { UniverSheetsSortUIPlugin } from './plugin';
-
-// #region - all commands
-
export {
SortRangeAscCommand,
SortRangeAscExtCommand,
@@ -32,5 +28,5 @@ export {
SortRangeDescExtInCtxMenuCommand,
SortRangeDescInCtxMenuCommand,
} from './commands/commands/sheets-sort.command';
-
-// #endregion
+export type { IUniverSheetsSortUIConfig } from './controllers/config.schema';
+export { UniverSheetsSortUIPlugin } from './plugin';
diff --git a/packages/sheets-sort/src/index.ts b/packages/sheets-sort/src/index.ts
index f3c6e32560..aea689d39e 100644
--- a/packages/sheets-sort/src/index.ts
+++ b/packages/sheets-sort/src/index.ts
@@ -14,16 +14,8 @@
* limitations under the License.
*/
+export { type ISortRangeCommandParams, SortRangeCommand } from './commands/commands/sheets-sort.command';
+export type { IUniverSheetsSortConfig } from './controllers/config.schema';
export { UniverSheetsSortPlugin } from './plugin';
-
-export { SheetsSortService } from './services/sheets-sort.service';
export { type IOrderRule, type ISortOption, SortType } from './services/interface';
-
-// #region - all commands
-
-export {
- type ISortRangeCommandParams,
- SortRangeCommand,
-} from './commands/commands/sheets-sort.command';
-
-// #endregion
+export { SheetsSortService } from './services/sheets-sort.service';
diff --git a/packages/sheets-table-ui/src/index.ts b/packages/sheets-table-ui/src/index.ts
index 0c6b8b0eb3..a224c8c756 100644
--- a/packages/sheets-table-ui/src/index.ts
+++ b/packages/sheets-table-ui/src/index.ts
@@ -16,4 +16,5 @@
import './global.css';
+export type { IUniverSheetsTableUIConfig } from './controllers/config.schema';
export { UniverSheetsTableUIPlugin } from './plugin';
diff --git a/packages/sheets-table/src/index.ts b/packages/sheets-table/src/index.ts
index 33758fd37d..9acebff67d 100644
--- a/packages/sheets-table/src/index.ts
+++ b/packages/sheets-table/src/index.ts
@@ -14,34 +14,32 @@
* limitations under the License.
*/
-export { SheetsTableButtonStateEnum, SheetsTableSortStateEnum, TableColumnDataTypeEnum, TableColumnFilterTypeEnum, TableConditionTypeEnum, TableDateCompareTypeEnum, TableNumberCompareTypeEnum, TableStringCompareTypeEnum } from './types/enum';
-export { UniverSheetsTablePlugin } from './plugin';
-export type { ITableColumnJson, ITableConditionFilterItem, ITableData, ITableFilterItem, ITableInfo, ITableInfoWithUnitId, ITableManualFilterItem, ITableOptions, ITableRange, ITableRangeWithState, TableMetaType, TableRelationTupleType } from './types/type';
-export { SheetTableService } from '../src/services/table-service';
-export { TableManager } from '../src/model/table-manager';
-export { isConditionFilter, isManualFilter } from '../src/util';
-export { SheetsTableController } from '../src/controllers/sheets-table.controller';
-
export { AddSheetTableCommand } from '../src/commands/commands/add-sheet-table.command';
-export { AddSheetTableMutation } from '../src/commands/mutations/add-sheet-table.mutation';
-export { SetSheetTableFilterCommand } from '../src/commands/commands/set-table-filter.command';
-export { SetSheetTableFilterMutation } from '../src/commands/mutations/set-table-filter.mutation';
export { DeleteSheetTableCommand } from '../src/commands/commands/delete-sheet-table.command';
-export { DeleteSheetTableMutation } from '../src/commands/mutations/delete-sheet-table.mutation';
-
-export type { ISetSheetTableParams } from '../src/commands/mutations/set-table-filter.mutation';
+export { SetSheetTableFilterCommand } from '../src/commands/commands/set-table-filter.command';
+export { AddSheetTableMutation } from '../src/commands/mutations/add-sheet-table.mutation';
export type { IAddSheetTableParams } from '../src/commands/mutations/add-sheet-table.mutation';
+export { DeleteSheetTableMutation } from '../src/commands/mutations/delete-sheet-table.mutation';
export type { IDeleteSheetTableParams } from '../src/commands/mutations/delete-sheet-table.mutation';
-
+export { SetSheetTableFilterMutation } from '../src/commands/mutations/set-table-filter.mutation';
+export type { ISetSheetTableParams } from '../src/commands/mutations/set-table-filter.mutation';
+export { SheetsTableController } from '../src/controllers/sheets-table.controller';
+export { TableManager } from '../src/model/table-manager';
+export { SheetTableService } from '../src/services/table-service';
+export { isConditionFilter, isManualFilter } from '../src/util';
export type { IAddSheetTableCommandParams } from './commands/commands/add-sheet-table.command';
-export { SetSheetTableCommand } from './commands/commands/set-sheet-table.command';
-export type { ISetSheetTableCommandParams } from './commands/commands/set-sheet-table.command';
-export type { ITableSetConfig } from './types/type';
-export { SetSheetTableMutation } from './commands/mutations/set-sheet-table.mutation';
-export type { ISetSheetTableMutationParams } from './commands/mutations/set-sheet-table.mutation';
export type { IAddTableThemeCommandParams } from './commands/commands/add-table-theme.command';
export { AddTableThemeCommand } from './commands/commands/add-table-theme.command';
export { RemoveTableThemeCommand } from './commands/commands/remove-table-theme.command';
+export { SetSheetTableCommand } from './commands/commands/set-sheet-table.command';
+export type { ISetSheetTableCommandParams } from './commands/commands/set-sheet-table.command';
export { SheetTableInsertColCommand, SheetTableInsertRowCommand, SheetTableRemoveColCommand, SheetTableRemoveRowCommand } from './commands/commands/sheet-table-row-col.command';
-export { customEmptyThemeWithBorderStyle, processStyleWithBorderStyle } from './controllers/table-theme.factory';
+export { SetSheetTableMutation } from './commands/mutations/set-sheet-table.mutation';
+export type { ISetSheetTableMutationParams } from './commands/mutations/set-sheet-table.mutation';
export { SHEET_TABLE_CUSTOM_THEME_PREFIX } from './const';
+export type { IUniverSheetsTableConfig } from './controllers/config.schema';
+export { customEmptyThemeWithBorderStyle, processStyleWithBorderStyle } from './controllers/table-theme.factory';
+export { UniverSheetsTablePlugin } from './plugin';
+export { SheetsTableButtonStateEnum, SheetsTableSortStateEnum, TableColumnDataTypeEnum, TableColumnFilterTypeEnum, TableConditionTypeEnum, TableDateCompareTypeEnum, TableNumberCompareTypeEnum, TableStringCompareTypeEnum } from './types/enum';
+export type { ITableColumnJson, ITableConditionFilterItem, ITableData, ITableFilterItem, ITableInfo, ITableInfoWithUnitId, ITableManualFilterItem, ITableOptions, ITableRange, ITableRangeWithState, TableMetaType, TableRelationTupleType } from './types/type';
+export type { ITableSetConfig } from './types/type';
diff --git a/packages/sheets-table/src/plugin.ts b/packages/sheets-table/src/plugin.ts
index db22707434..557d64d35d 100644
--- a/packages/sheets-table/src/plugin.ts
+++ b/packages/sheets-table/src/plugin.ts
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+import type { IUniverSheetsTableConfig } from './controllers/config.schema';
import { ICommandService, IConfigService, Inject, Injector, merge, Plugin, registerDependencies, touchDependencies, UniverInstanceType } from '@univerjs/core';
import { AddSheetTableCommand } from './commands/commands/add-sheet-table.command';
import { AddTableThemeCommand } from './commands/commands/add-table-theme.command';
@@ -41,7 +42,7 @@ export class UniverSheetsTablePlugin extends Plugin {
static override type = UniverInstanceType.UNIVER_SHEET;
constructor(
- private readonly _config = defaultPluginConfig,
+ private readonly _config: Partial<IUniverSheetsTableConfig> = defaultPluginConfig,
@Inject(Injector) protected override _injector: Injector,
@IConfigService private readonly _configService: IConfigService,
@Inject(ICommandService) private _commandService: ICommandService
diff --git a/packages/sheets-thread-comment-ui/src/index.ts b/packages/sheets-thread-comment-ui/src/index.ts
index aa37e68fbc..46cad57bad 100644
--- a/packages/sheets-thread-comment-ui/src/index.ts
+++ b/packages/sheets-thread-comment-ui/src/index.ts
@@ -17,13 +17,11 @@
import './global.css';
export { ShowAddSheetCommentModalOperation } from './commands/operations/comment.operation';
+export type { IUniverSheetsThreadCommentUIConfig } from './controllers/config.schema';
export { UniverSheetsThreadCommentUIPlugin } from './plugin';
export { SheetsThreadCommentPopupService } from './services/sheets-thread-comment-popup.service';
export { SHEETS_THREAD_COMMENT } from './types/const';
export { IThreadCommentDataSourceService } from '@univerjs/thread-comment';
-export { UniverThreadCommentUIPlugin } from '@univerjs/thread-comment-ui';
-
-// #region - all commands
export {
AddCommentCommand,
DeleteCommentCommand,
@@ -38,5 +36,4 @@ export type {
IResolveCommentCommandParams,
IUpdateCommentCommandParams,
} from '@univerjs/thread-comment';
-
-// #endregion
+export { UniverThreadCommentUIPlugin } from '@univerjs/thread-comment-ui';
diff --git a/packages/sheets-thread-comment/src/controllers/config.schema.ts b/packages/sheets-thread-comment/src/controllers/config.schema.ts
index 35af4334a2..083d9113c5 100644
--- a/packages/sheets-thread-comment/src/controllers/config.schema.ts
+++ b/packages/sheets-thread-comment/src/controllers/config.schema.ts
@@ -18,7 +18,7 @@ export const SHEETS_THREAD_COMMENT_PLUGIN_CONFIG_KEY = 'sheets-thread-comment.co
export const configSymbol = Symbol(SHEETS_THREAD_COMMENT_PLUGIN_CONFIG_KEY);
-export interface IUniverSheetsThreadCommentBaseConfig {
+export interface IUniverSheetsThreadCommentConfig {
}
-export const defaultPluginConfig: IUniverSheetsThreadCommentBaseConfig = {};
+export const defaultPluginConfig: IUniverSheetsThreadCommentConfig = {};
diff --git a/packages/sheets-thread-comment/src/index.ts b/packages/sheets-thread-comment/src/index.ts
index 94295a091e..fe3ebd01f9 100644
--- a/packages/sheets-thread-comment/src/index.ts
+++ b/packages/sheets-thread-comment/src/index.ts
@@ -14,7 +14,8 @@
* limitations under the License.
*/
+export type { IUniverSheetsThreadCommentConfig } from './controllers/config.schema';
export { SheetsThreadCommentRefRangeController } from './controllers/sheets-thread-comment-ref-range.controller';
export { SheetsThreadCommentModel } from './models/sheets-thread-comment.model';
-export type { ISheetThreadComment } from './types/interfaces/i-sheet-thread-comment';
export { UniverSheetsThreadCommentPlugin } from './plugin';
+export type { ISheetThreadComment } from './types/interfaces/i-sheet-thread-comment';
diff --git a/packages/sheets-thread-comment/src/plugin.ts b/packages/sheets-thread-comment/src/plugin.ts
index e94c918642..23dc1fde60 100644
--- a/packages/sheets-thread-comment/src/plugin.ts
+++ b/packages/sheets-thread-comment/src/plugin.ts
@@ -15,8 +15,10 @@
*/
import type { Dependency } from '@univerjs/core';
+import type { IUniverSheetsThreadCommentConfig } from './controllers/config.schema';
import { DependentOn, ICommandService, Inject, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
import { UniverThreadCommentPlugin } from '@univerjs/thread-comment';
+import { defaultPluginConfig } from './controllers/config.schema';
import { SheetsThreadCommentRefRangeController } from './controllers/sheets-thread-comment-ref-range.controller';
import { SheetsThreadCommentModel } from './models/sheets-thread-comment.model';
import { SHEET_THREAD_COMMENT_BASE } from './types/const';
@@ -27,7 +29,7 @@ export class UniverSheetsThreadCommentPlugin extends Plugin {
static override type = UniverInstanceType.UNIVER_SHEET;
constructor(
- config: unknown,
+ private readonly _config: Partial<IUniverSheetsThreadCommentConfig> = defaultPluginConfig,
@Inject(Injector) protected override _injector: Injector,
@Inject(ICommandService) protected _commandService: ICommandService
) {
diff --git a/packages/sheets-ui/src/index.ts b/packages/sheets-ui/src/index.ts
index 1c0f358f59..ef4161fe80 100644
--- a/packages/sheets-ui/src/index.ts
+++ b/packages/sheets-ui/src/index.ts
@@ -17,88 +17,6 @@
import './global.css';
export { getEditorObject } from './basics/editor/get-editor-object';
-export { useActiveWorkbook, useActiveWorksheet, useWorkbooks } from './components/hook';
-export { SHEET_UI_PLUGIN_NAME } from './consts/plugin-name';
-export { SheetsUIPart } from './consts/ui-name';
-export { AutoFillController } from './controllers/auto-fill.controller';
-export { CellCustomRenderController } from './controllers/cell-custom-render.controller';
-export { EditingRenderController } from './controllers/editor/editing.render-controller';
-export { PASTE_SPECIAL_MENU_ID, SheetMenuPosition } from './controllers/menu/menu';
-export { deriveStateFromActiveSheet$, getCurrentExclusiveRangeInterest$, getCurrentRangeDisable$, getObservableWithExclusiveRange$ } from './controllers/menu/menu-util';
-export { HeaderFreezeRenderController } from './controllers/render-controllers/freeze.render-controller';
-export { HeaderMoveRenderController } from './controllers/render-controllers/header-move.render-controller';
-export { HeaderResizeRenderController } from './controllers/render-controllers/header-resize.render-controller';
-export { SheetsScrollRenderController } from './controllers/render-controllers/scroll.render-controller';
-export { type ITelemetryData, SheetRenderController } from './controllers/render-controllers/sheet.render-controller';
-export { SheetUIController } from './controllers/sheet-ui.controller';
-export { whenFormulaEditorActivated, whenSheetEditorFocused } from './controllers/shortcuts/utils';
-export { getCoordByCell, getCoordByOffset, getSheetObject, getTransformCoord } from './controllers/utils/component-tools';
-export { matchedSelectionByRowColIndex as checkInHeaderRanges } from './controllers/utils/selections-tools';
-export { useHighlightRange } from './hooks/use-highlight-range';
-export { UniverSheetsMobileUIPlugin } from './mobile-plugin';
-export { UniverSheetsUIPlugin } from './plugin';
-export { AutoFillService, IAutoFillService } from './services/auto-fill/auto-fill.service';
-export { getAutoFillRepeatRange } from './services/auto-fill/tools';
-export { APPLY_TYPE, DATA_TYPE, type IAutoFillRule, type ICopyDataInTypeIndexInfo } from './services/auto-fill/type';
-export type { IAutoFillLocation, ICopyDataPiece, ISheetAutoFillHook } from './services/auto-fill/type';
-export { type ICanvasPopup, SheetCanvasPopManagerService } from './services/canvas-pop-manager.service';
-export { CellAlertManagerService, CellAlertType, type ICellAlert } from './services/cell-alert-manager.service';
-export { getMatrixPlainText, ISheetClipboardService, PREDEFINED_HOOK_NAME, SheetClipboardService } from './services/clipboard/clipboard.service';
-export { COPY_TYPE } from './services/clipboard/type';
-export type { ICellDataWithSpanInfo, ICopyPastePayload, IPasteHookValueType, ISheetClipboardHook, ISheetDiscreteRangeLocation } from './services/clipboard/type';
-export { getRepeatRange, mergeSetRangeValues } from './services/clipboard/utils';
-export { DragManagerService, type IDragCellPosition } from './services/drag-manager.service';
-export { EditorBridgeService, IEditorBridgeService, type IEditorBridgeServiceVisibleParam } from './services/editor-bridge.service';
-export type { IEditorBridgeServiceParam } from './services/editor-bridge.service';
-export { CellEditorManagerService, ICellEditorManagerService } from './services/editor/cell-editor-manager.service';
-export { IFormulaEditorManagerService } from './services/editor/formula-editor-manager.service';
-export { HoverManagerService } from './services/hover-manager.service';
-export type { ICellPosWithEvent, IHoverCellPosition, IHoverRichTextInfo, IHoverRichTextPosition } from './services/hover-manager.service';
-export { IMarkSelectionService, MarkSelectionService } from './services/mark-selection/mark-selection.service';
-export { HoverRenderController } from './controllers/hover-render.controller';
-export { DragRenderController } from './controllers/drag-render.controller';
-export { EMBEDDING_FORMULA_EDITOR_COMPONENT_KEY, RANGE_SELECTOR_COMPONENT_KEY, SHEET_VIEW_KEY } from './common/keys';
-export type { IDiscreteRange } from './controllers/utils/range-tools';
-export { discreteRangeToRange, virtualizeDiscreteRanges } from './controllers/utils/range-tools';
-export { AFFECT_LAYOUT_STYLES, AutoHeightController } from './controllers/auto-height.controller';
-export { AutoWidthController } from './controllers/auto-width.controller';
-export { FormulaEditorController } from './controllers/editor/formula-editor.controller';
-export { StatusBarController } from './controllers/status-bar.controller';
-export { SheetPermissionCheckUIController } from './controllers/permission/sheet-permission-check-ui.controller';
-export { SheetPermissionUserManagerService } from './services/permission/sheet-permission-user-list.service';
-export { SheetPrintInterceptorService } from './services/print-interceptor.service';
-export { SheetScrollManagerService } from './services/scroll-manager.service';
-export { BaseSelectionRenderService, genSelectionByRange, selectionDataForSelectAll as getAllSelection, getTopLeftSelectionOfCurrSheet, ISheetSelectionRenderService } from './services/selection/base-selection-render.service';
-export { genNormalSelectionStyle } from './services/selection/const';
-export { SelectionControl, SelectionControl as SelectionShape } from './services/selection/selection-control';
-export { SheetSelectionRenderService } from './services/selection/selection-render.service';
-export { SelectionShapeExtension } from './services/selection/selection-shape-extension';
-export { attachPrimaryWithCoord, attachRangeWithCoord, attachSelectionWithCoord } from './services/selection/util';
-export { SheetSkeletonManagerService } from './services/sheet-skeleton-manager.service';
-export type { ISheetSkeletonManagerParam } from './services/sheet-skeleton-manager.service';
-export { SheetsRenderService } from './services/sheets-render.service';
-export { calculateDocSkeletonRects, getCustomRangePosition, getEditingCustomRangePosition } from './services/utils/doc-skeleton-util';
-export { MobileSheetBar } from './views/mobile/sheet-bar/MobileSheetBar';
-export type { IRangeProtectionRenderCellData } from './views/permission/extensions/range-protection.render';
-export { SheetBar } from './views/sheet-bar/SheetBar';
-export { RenderSheetContent, RenderSheetFooter, RenderSheetHeader } from './views/sheet-container/SheetContainer';
-export { type IUniverSheetsUIConfig } from './controllers/config.schema';
-export { getCellRealRange } from './common/utils';
-export { EMBEDDING_FORMULA_EDITOR, isEmbeddingFormulaEditor } from './controllers/editor/utils/is-embedding-formula-editor';
-export { isRangeSelector, RANGE_SELECTOR_SYMBOLS } from './controllers/editor/utils/is-range-selector';
-export { menuSchema as SheetsUIMenuSchema } from './controllers/menu.schema';
-export { SheetCellEditorResizeService } from './services/editor/cell-editor-resize.service';
-export { FormatPainterStatus, IFormatPainterService } from './services/format-painter/format-painter.service';
-export type { IFormatPainterBeforeApplyHookParams, IFormatPainterHook } from './services/format-painter/format-painter.service';
-export { SELECTION_SHAPE_DEPTH } from './services/selection/const';
-export { type IBaseSheetBarProps } from './views/sheet-bar/sheet-bar-tabs/SheetBarItem';
-export { useKeyEventConfig } from './views/editor-container';
-export { type IDropdownParam, ISheetCellDropdownManagerService, SheetCellDropdownManagerService } from './services/cell-dropdown-manager.service';
-export { FormulaBar } from './views/formula-bar/FormulaBar';
-export { type IPermissionDetailUserPartProps } from './views/permission/panel-detail/PermissionDetailUserPart';
-export { CellPopupManagerService } from './services/cell-popup-manager.service';
-// #region - all commands
-export { SetWorksheetColAutoWidthCommand } from './commands/commands/set-worksheet-auto-col-width.command';
export { AutoClearContentCommand, AutoFillCommand } from './commands/commands/auto-fill.command';
export {
type ISheetPasteByShortKeyParams,
@@ -114,6 +32,7 @@ export {
} from './commands/commands/clipboard.command';
export { DeleteRangeMoveLeftConfirmCommand } from './commands/commands/delete-range-move-left-confirm.command';
export { DeleteRangeMoveUpConfirmCommand } from './commands/commands/delete-range-move-up-confirm.command';
+export { SetColumnHeaderHeightCommand, SetRowHeaderWidthCommand } from './commands/commands/headersize-changed.command';
export { HideColConfirmCommand, HideRowConfirmCommand } from './commands/commands/hide-row-col-confirm.command';
export {
ResetRangeTextColorCommand,
@@ -153,14 +72,10 @@ export {
SetScrollRelativeCommand,
} from './commands/commands/set-scroll.command';
export { ExpandSelectionCommand, JumpOver, MoveSelectionCommand, MoveSelectionEnterAndTabCommand, SelectAllCommand } from './commands/commands/set-selection.command';
+export { SetWorksheetColAutoWidthCommand } from './commands/commands/set-worksheet-auto-col-width.command';
export { ChangeZoomRatioCommand, type ISetZoomRatioCommandParams, SetZoomRatioCommand } from './commands/commands/set-zoom-ratio.command';
export { ShowMenuListCommand } from './commands/commands/unhide.command';
-export {
- ChangeSheetProtectionFromSheetBarCommand,
- DeleteWorksheetProtectionFormSheetBarCommand,
-} from './commands/commands/worksheet-protection.command';
-export { SetColumnHeaderHeightCommand, SetRowHeaderWidthCommand } from './commands/commands/headersize-changed.command';
-
+export { ChangeSheetProtectionFromSheetBarCommand, DeleteWorksheetProtectionFormSheetBarCommand } from './commands/commands/worksheet-protection.command';
export { SetActivateCellEditOperation } from './commands/operations/activate-cell-edit.operation';
export { SetCellEditVisibleArrowOperation, SetCellEditVisibleOperation, SetCellEditVisibleWithF2Operation } from './commands/operations/cell-edit.operation';
export { RenameSheetOperation } from './commands/operations/rename-sheet.operation';
@@ -171,13 +86,89 @@ export { SetZoomRatioOperation } from './commands/operations/set-zoom-ratio.oper
export { SheetPermissionOpenDialogOperation } from './commands/operations/sheet-permission-open-dialog.operation';
export { SheetPermissionOpenPanelOperation } from './commands/operations/sheet-permission-open-panel.operation';
export { SidebarDefinedNameOperation } from './commands/operations/sidebar-defined-name.operation';
+export { EMBEDDING_FORMULA_EDITOR_COMPONENT_KEY, RANGE_SELECTOR_COMPONENT_KEY, SHEET_VIEW_KEY } from './common/keys';
+export { getCellRealRange } from './common/utils';
+export { useActiveWorkbook, useActiveWorksheet, useWorkbooks } from './components/hook';
export { UNIVER_SHEET_PERMISSION_BACKGROUND, UNIVER_SHEET_PERMISSION_USER_PART } from './consts/permission';
-export { convertPositionCellToSheetOverGrid, convertPositionSheetOverGridToAbsolute } from './services/utils/drawing-position-util';
+export { SHEET_UI_PLUGIN_NAME } from './consts/plugin-name';
+export { SheetsUIPart } from './consts/ui-name';
+export { AutoFillController } from './controllers/auto-fill.controller';
+export { AFFECT_LAYOUT_STYLES, AutoHeightController } from './controllers/auto-height.controller';
+export { AutoWidthController } from './controllers/auto-width.controller';
+export { CellCustomRenderController } from './controllers/cell-custom-render.controller';
+export { type IUniverSheetsUIConfig } from './controllers/config.schema';
+export { DragRenderController } from './controllers/drag-render.controller';
+export { EditingRenderController } from './controllers/editor/editing.render-controller';
+export { FormulaEditorController } from './controllers/editor/formula-editor.controller';
+export { EMBEDDING_FORMULA_EDITOR, isEmbeddingFormulaEditor } from './controllers/editor/utils/is-embedding-formula-editor';
+export { isRangeSelector, RANGE_SELECTOR_SYMBOLS } from './controllers/editor/utils/is-range-selector';
+export { HoverRenderController } from './controllers/hover-render.controller';
+export { menuSchema as SheetsUIMenuSchema } from './controllers/menu.schema';
+export { PASTE_SPECIAL_MENU_ID, SheetMenuPosition } from './controllers/menu/menu';
+export { deriveStateFromActiveSheet$, getCurrentExclusiveRangeInterest$, getCurrentRangeDisable$, getObservableWithExclusiveRange$ } from './controllers/menu/menu-util';
+export { SheetPermissionCheckUIController } from './controllers/permission/sheet-permission-check-ui.controller';
+export { HeaderFreezeRenderController } from './controllers/render-controllers/freeze.render-controller';
+export { HeaderMoveRenderController } from './controllers/render-controllers/header-move.render-controller';
+export { HeaderResizeRenderController } from './controllers/render-controllers/header-resize.render-controller';
+export { SheetsScrollRenderController } from './controllers/render-controllers/scroll.render-controller';
+export { type ITelemetryData, SheetRenderController } from './controllers/render-controllers/sheet.render-controller';
+export { SheetUIController } from './controllers/sheet-ui.controller';
+export { whenFormulaEditorActivated, whenSheetEditorFocused } from './controllers/shortcuts/utils';
+export { StatusBarController } from './controllers/status-bar.controller';
+export { getCoordByCell, getCoordByOffset, getSheetObject, getTransformCoord } from './controllers/utils/component-tools';
+export type { IDiscreteRange } from './controllers/utils/range-tools';
+export { discreteRangeToRange, virtualizeDiscreteRanges } from './controllers/utils/range-tools';
+export { matchedSelectionByRowColIndex as checkInHeaderRanges } from './controllers/utils/selections-tools';
+export { useHighlightRange } from './hooks/use-highlight-range';
+export { UniverSheetsMobileUIPlugin } from './mobile-plugin';
+export { UniverSheetsUIPlugin } from './plugin';
+export { AutoFillService, IAutoFillService } from './services/auto-fill/auto-fill.service';
+export { getAutoFillRepeatRange } from './services/auto-fill/tools';
+export { APPLY_TYPE, DATA_TYPE, type IAutoFillRule, type ICopyDataInTypeIndexInfo } from './services/auto-fill/type';
+export type { IAutoFillLocation, ICopyDataPiece, ISheetAutoFillHook } from './services/auto-fill/type';
+export { type ICanvasPopup, SheetCanvasPopManagerService } from './services/canvas-pop-manager.service';
+export { CellAlertManagerService, CellAlertType, type ICellAlert } from './services/cell-alert-manager.service';
+export { type IDropdownParam, ISheetCellDropdownManagerService, SheetCellDropdownManagerService } from './services/cell-dropdown-manager.service';
+export { CellPopupManagerService } from './services/cell-popup-manager.service';
+export { getMatrixPlainText, ISheetClipboardService, PREDEFINED_HOOK_NAME, SheetClipboardService } from './services/clipboard/clipboard.service';
+export { COPY_TYPE } from './services/clipboard/type';
+export type { ICellDataWithSpanInfo, ICopyPastePayload, IPasteHookValueType, ISheetClipboardHook, ISheetDiscreteRangeLocation } from './services/clipboard/type';
+export { getRepeatRange, mergeSetRangeValues } from './services/clipboard/utils';
+export { DragManagerService, type IDragCellPosition } from './services/drag-manager.service';
+export { EditorBridgeService, IEditorBridgeService, type IEditorBridgeServiceVisibleParam } from './services/editor-bridge.service';
+export type { IEditorBridgeServiceParam } from './services/editor-bridge.service';
+export { CellEditorManagerService, ICellEditorManagerService } from './services/editor/cell-editor-manager.service';
+export { SheetCellEditorResizeService } from './services/editor/cell-editor-resize.service';
+export { IFormulaEditorManagerService } from './services/editor/formula-editor-manager.service';
+export { FormatPainterStatus, IFormatPainterService } from './services/format-painter/format-painter.service';
+export type { IFormatPainterBeforeApplyHookParams, IFormatPainterHook } from './services/format-painter/format-painter.service';
+export { HoverManagerService } from './services/hover-manager.service';
+export type { ICellPosWithEvent, IHoverCellPosition, IHoverRichTextInfo, IHoverRichTextPosition } from './services/hover-manager.service';
+export { IMarkSelectionService, MarkSelectionService } from './services/mark-selection/mark-selection.service';
+export { SheetPermissionUserManagerService } from './services/permission/sheet-permission-user-list.service';
+export { SheetPrintInterceptorService } from './services/print-interceptor.service';
+export { SheetScrollManagerService } from './services/scroll-manager.service';
export type { IScrollState, IViewportScrollState } from './services/scroll-manager.service';
-
+export { BaseSelectionRenderService, genSelectionByRange, selectionDataForSelectAll as getAllSelection, getTopLeftSelectionOfCurrSheet, ISheetSelectionRenderService } from './services/selection/base-selection-render.service';
+export { genNormalSelectionStyle } from './services/selection/const';
+export { SELECTION_SHAPE_DEPTH } from './services/selection/const';
+export { SelectionControl, SelectionControl as SelectionShape } from './services/selection/selection-control';
+export { SheetSelectionRenderService } from './services/selection/selection-render.service';
+export { SelectionShapeExtension } from './services/selection/selection-shape-extension';
+export { attachPrimaryWithCoord, attachRangeWithCoord, attachSelectionWithCoord } from './services/selection/util';
+export { SheetSkeletonManagerService } from './services/sheet-skeleton-manager.service';
+export type { ISheetSkeletonManagerParam } from './services/sheet-skeleton-manager.service';
+export { SheetsRenderService } from './services/sheets-render.service';
export { IStatusBarService, StatusBarService } from './services/status-bar.service';
-
+export { calculateDocSkeletonRects, getCustomRangePosition, getEditingCustomRangePosition } from './services/utils/doc-skeleton-util';
+export { convertPositionCellToSheetOverGrid, convertPositionSheetOverGridToAbsolute } from './services/utils/drawing-position-util';
+export { useKeyEventConfig } from './views/editor-container';
+export { FormulaBar } from './views/formula-bar/FormulaBar';
+export { MobileSheetBar } from './views/mobile/sheet-bar/MobileSheetBar';
+export type { IRangeProtectionRenderCellData } from './views/permission/extensions/range-protection.render';
+export { type IPermissionDetailUserPartProps } from './views/permission/panel-detail/PermissionDetailUserPart';
+export { type IBaseSheetBarProps } from './views/sheet-bar/sheet-bar-tabs/SheetBarItem';
+export { SheetBar } from './views/sheet-bar/SheetBar';
+export { RenderSheetContent, RenderSheetFooter, RenderSheetHeader } from './views/sheet-container/SheetContainer';
export { type IStatisticItem } from './views/status-bar/CopyableStatisticItem';
-
export { functionDisplayNames } from './views/status-bar/CopyableStatisticItem';
-// #endregion
diff --git a/packages/sheets-zen-editor/src/index.ts b/packages/sheets-zen-editor/src/index.ts
index 1eb6bee7b6..015c7b319c 100644
--- a/packages/sheets-zen-editor/src/index.ts
+++ b/packages/sheets-zen-editor/src/index.ts
@@ -17,9 +17,5 @@
import './global.css';
export { CancelZenEditCommand, ConfirmZenEditCommand, OpenZenEditorCommand } from './commands/commands/zen-editor.command';
-
-// #region - all commands
-
+export type { IUniverSheetsZenEditorConfig } from './controllers/config.schema';
export { UniverSheetsZenEditorPlugin } from './plugin';
-
-// #endregion
diff --git a/packages/sheets/src/index.ts b/packages/sheets/src/index.ts
index 31b31f3772..dabb186bc4 100644
--- a/packages/sheets/src/index.ts
+++ b/packages/sheets/src/index.ts
@@ -14,9 +14,8 @@
* limitations under the License.
*/
-export { UniverSheetsPlugin } from './plugin';
-
-// #region services
+export type { ICellOverGridPosition, ISheetOverGridPosition } from './basics/cell-position';
+export { checkCellValueType } from './basics/cell-type';
export {
COMMAND_LISTENER_SKELETON_CHANGE,
COMMAND_LISTENER_VALUE_CHANGE,
@@ -27,6 +26,7 @@ export {
SheetSkeletonChangeType,
SheetValueChangeType,
} from './basics/const/command-listener-const';
+export { expandToContinuousRange } from './basics/expand-range';
export {
type IAddWorksheetMergeMutationParams,
type IDeleteRangeMutationParams,
@@ -40,6 +40,7 @@ export {
type IRemoveWorksheetMergeMutationParams,
type IWorksheetRangeThemeStyleMutationParams,
} from './basics/interfaces/mutation-interface';
+export { createTopMatrixFromMatrix, createTopMatrixFromRanges, findAllRectangle, rangeMerge, RangeMergeUtil } from './basics/range-merge';
export {
convertPrimaryWithCoordToPrimary,
convertSelectionDataToRange,
@@ -51,162 +52,10 @@ export {
SELECTION_CONTROL_BORDER_BUFFER_COLOR,
SELECTION_CONTROL_BORDER_BUFFER_WIDTH,
} from './basics/selection';
-export { createTopMatrixFromMatrix, createTopMatrixFromRanges, findAllRectangle, rangeMerge, RangeMergeUtil } from './basics/range-merge';
-export { type IUniverSheetsConfig } from './controllers/config.schema';
-export { MAX_CELL_PER_SHEET_KEY } from './controllers/config/config';
-export { BorderStyleManagerService, type IBorderInfo } from './services/border-style-manager.service';
-export { SheetRangeThemeService } from './services/range-theme-service';
-export { SheetRangeThemeModel } from './model/range-theme-model';
-export type { IRangeThemeStyleJSON } from './model/range-theme-util';
-export { AddRangeThemeMutation } from './commands/mutations/add-range-theme.mutation';
-export type { IAddRangeThemeMutationParams } from './commands/mutations/add-range-theme.mutation';
-export { SetRangeThemeMutation } from './commands/mutations/set-range-theme.mutation';
-export type { ISetRangeThemeMutationParams } from './commands/mutations/set-range-theme.mutation';
-export { RemoveRangeThemeMutation } from './commands/mutations/remove-range-theme.mutation';
-export type { IRemoveRangeThemeMutationParams } from './commands/mutations/remove-range-theme.mutation';
-export * from './services/permission/permission-point';
-export { WorksheetPermissionService } from './services/permission/worksheet-permission/worksheet-permission.service';
-export { WorkbookPermissionService } from './services/permission/workbook-permission/workbook-permission.service';
-export * from './services/selections';
-export { getAddMergeMutationRangeByType } from './controllers/merge-cell.controller';
-export { NumfmtService } from './services/numfmt/numfmt.service';
-export type { INumfmtItem, INumfmtItemWithCache } from './services/numfmt/type';
-export { INumfmtService } from './services/numfmt/type';
-export { RefRangeService } from './services/ref-range/ref-range.service';
-export type { EffectRefRangeParams, IOperator } from './services/ref-range/type';
-export { EffectRefRangId, OperatorType } from './services/ref-range/type';
-export { DefinedNameDataController } from './controllers/defined-name-data.controller';
-export {
- adjustRangeOnMutation,
- getSeparateEffectedRangesOnCommand,
- handleBaseInsertRange,
- handleBaseMoveRowsCols,
- handleBaseRemoveRange,
- handleCommonDefaultRangeChangeWithEffectRefCommands,
- handleCommonRangeChangeWithEffectRefCommandsSkipNoInterests,
- handleDefaultRangeChangeWithEffectRefCommands,
- handleDefaultRangeChangeWithEffectRefCommandsSkipNoInterests,
- handleDeleteRangeMoveLeft,
- handleDeleteRangeMoveUp,
- handleInsertCol,
- handleInsertRangeMoveDown,
- handleInsertRangeMoveRight,
- handleInsertRow,
- handleIRemoveCol,
- handleIRemoveRow,
- handleMoveCols,
- handleMoveRange,
- handleMoveRows,
- rotateRange,
- runRefRangeMutations,
-} from './services/ref-range/util';
-export type { MutationsAffectRange } from './services/ref-range/util';
-export { InterceptCellContentPriority, INTERCEPTOR_POINT } from './services/sheet-interceptor/interceptor-const';
-export { AFTER_CELL_EDIT, BEFORE_CELL_EDIT, type IAutoHeightContext, SheetInterceptorService, VALIDATE_CELL } from './services/sheet-interceptor/sheet-interceptor.service';
-export type { ISheetLocation, ISheetLocationBase, ISheetRowLocation } from './services/sheet-interceptor/utils/interceptor';
-export { MERGE_CELL_INTERCEPTOR_CHECK, MergeCellController } from './controllers/merge-cell.controller';
-export { AddMergeRedoSelectionsOperationFactory, AddMergeUndoSelectionsOperationFactory } from './commands/utils/handle-merge-operation';
-
-export type { FormatType } from './services/numfmt/type';
-export { expandToContinuousRange } from './basics/expand-range';
-export { findFirstNonEmptyCell } from './basics/utils';
export { SplitDelimiterEnum, splitRangeText } from './basics/split-range-text';
-export { getNextPrimaryCell } from './services/selections/move-active-cell-util';
-export { checkCellValueType } from './basics/cell-type';
-
-export { ExclusiveRangeService, IExclusiveRangeService } from './services/exclusive-range/exclusive-range-service';
-
-// permission
-export { defaultWorksheetPermissionPoint, getAllWorksheetPermissionPoint, getAllWorksheetPermissionPointByPointPanel } from './services/permission';
-export type { IWorksheetProtectionRule } from './services/permission/type';
-export { SheetPermissionCheckController } from './controllers/permission/sheet-permission-check.controller';
-export { SheetPermissionInitController } from './controllers/permission/sheet-permission-init.controller';
-export { WorksheetProtectionPointModel, WorksheetProtectionRuleModel } from './services/permission/worksheet-permission';
-export { defaultWorkbookPermissionPoints, getAllWorkbookPermissionPoint } from './services/permission/workbook-permission';
-export {
- WorkbookCommentPermission,
- WorkbookCopyPermission,
- WorkbookCreateProtectPermission,
- WorkbookCreateSheetPermission,
- WorkbookDeleteSheetPermission,
- WorkbookDuplicatePermission,
- WorkbookEditablePermission,
- WorkbookExportPermission,
- WorkbookHideSheetPermission,
- WorkbookHistoryPermission,
- WorkbookManageCollaboratorPermission,
- WorkbookMoveSheetPermission,
- WorkbookPrintPermission,
- WorkbookRecoverHistoryPermission,
- WorkbookRenameSheetPermission,
- WorkbookSharePermission,
- WorkbookViewHistoryPermission,
- WorkbookViewPermission,
- WorksheetCopyPermission,
-
- WorksheetDeleteColumnPermission,
- WorksheetDeleteProtectionPermission,
- WorksheetDeleteRowPermission,
- WorksheetEditExtraObjectPermission,
- WorksheetEditPermission,
- WorksheetFilterPermission,
- WorksheetInsertColumnPermission,
- WorksheetInsertHyperlinkPermission,
- WorksheetInsertRowPermission,
- WorksheetManageCollaboratorPermission,
- WorksheetPivotTablePermission,
- WorksheetSelectProtectedCellsPermission,
- WorksheetSelectUnProtectedCellsPermission,
- WorksheetSetCellStylePermission,
- WorksheetSetCellValuePermission,
- WorksheetSetColumnStylePermission,
- WorksheetSetRowStylePermission,
- WorksheetSortPermission,
- WorksheetViewPermission,
-} from './services/permission/permission-point';
-export { PermissionPointsDefinitions } from './services/permission/permission-point/const';
-export { UnitAction, UnitObject } from '@univerjs/protocol';
-export { checkRangesEditablePermission } from './services/permission/util';
-
-// range-protection
-export { type ICellPermission, RangeProtectionRenderModel } from './model/range-protection-render.model';
-export { EditStateEnum, type IModel, type IObjectModel, type IRangeProtectionRule, RangeProtectionRuleModel, ViewStateEnum } from './model/range-protection-rule.model';
-export { RangeProtectionCache } from './model/range-protection.cache';
-export type { IWorksheetProtectionRenderCellData } from './services/permission/worksheet-permission/type';
-
-export { RangeProtectionRefRangeService } from './services/permission/range-permission/range-protection.ref-range';
-export { RangeProtectionService } from './services/permission/range-permission/range-protection.service';
-export {
- getAllRangePermissionPoint,
- getDefaultRangePermission,
- type IRangePermissionPoint,
-} from './services/permission/range-permission/util';
-
-export { RangeProtectionPermissionEditPoint } from './services/permission/permission-point/range/edit';
-export { RangeProtectionPermissionViewPoint } from './services/permission/permission-point/range/view';
-export { RangeProtectionPermissionManageCollaPoint } from './services/permission/permission-point/range/manage-collaborator';
-export { RangeProtectionPermissionDeleteProtectionPoint } from './services/permission/permission-point/range/delete-protection';
-export { baseProtectionActions } from './services/permission/range-permission/util';
-
+export { findFirstNonEmptyCell } from './basics/utils';
export { generateNullCell, generateNullCellValue, getVisibleRanges, rangeToDiscreteRange } from './basics/utils';
-export { getSheetCommandTarget, getSheetCommandTargetWorkbook, getSheetMutationTarget } from './commands/commands/utils/target-util';
-export { alignToMergedCellsBorders, getCellAtRowCol, isSingleCellSelection, setEndForRange } from './commands/commands/utils/selection-utils';
-export { getSelectionsService } from './commands/utils/selection-command-util';
-export { followSelectionOperation, getPrimaryForRange } from './commands/commands/utils/selection-utils';
-export { handleDeleteRangeMutation } from './commands/utils/handle-range-mutation';
-export { getInsertRangeMutations, getRemoveRangeMutations } from './commands/utils/handle-range-mutation';
-export { handleInsertRangeMutation } from './commands/utils/handle-range-mutation';
-export { type ISheetCommandSharedParams } from './commands/utils/interface';
-export { copyRangeStyles } from './commands/commands/utils/selection-utils';
-export { RangeThemeStyle } from './model/range-theme-util';
-export type { IRangeThemeStyleItem } from './model/range-theme-util';
-
-// #region - all commands
-
export { AddRangeProtectionCommand, type IAddRangeProtectionCommandParams } from './commands/commands/add-range-protection.command';
-export { AddWorksheetProtectionCommand } from './commands/commands/add-worksheet-protection.command';
-export { SetWorksheetProtectionCommand } from './commands/commands/set-worksheet-protection.command';
-export { DeleteWorksheetProtectionCommand } from './commands/commands/delete-worksheet-protection.command';
export {
addMergeCellsUtil,
AddWorksheetMergeAllCommand,
@@ -214,8 +63,8 @@ export {
AddWorksheetMergeHorizontalCommand,
AddWorksheetMergeVerticalCommand,
} from './commands/commands/add-worksheet-merge.command';
+export { AddWorksheetProtectionCommand } from './commands/commands/add-worksheet-protection.command';
export { SetWorksheetRangeThemeStyleCommand } from './commands/commands/add-worksheet-range-theme.command';
-export { DeleteWorksheetRangeThemeStyleCommand } from './commands/commands/delete-worksheet-range-theme.command';
export { AppendRowCommand, type IAppendRowCommandParams } from './commands/commands/append-row.command';
export { ClearSelectionAllCommand } from './commands/commands/clear-selection-all.command';
export { ClearSelectionContentCommand } from './commands/commands/clear-selection-content.command';
@@ -225,15 +74,11 @@ export type { ICopySheetCommandParams } from './commands/commands/copy-worksheet
export { DeleteRangeMoveLeftCommand, type IDeleteRangeMoveLeftCommandParams } from './commands/commands/delete-range-move-left.command';
export { DeleteRangeMoveUpCommand, type IDeleteRangeMoveUpCommandParams } from './commands/commands/delete-range-move-up.command';
export { DeleteRangeProtectionCommand, type IDeleteRangeProtectionCommandParams } from './commands/commands/delete-range-protection.command';
+export { DeleteWorksheetProtectionCommand } from './commands/commands/delete-worksheet-protection.command';
+export { DeleteWorksheetRangeThemeStyleCommand } from './commands/commands/delete-worksheet-range-theme.command';
export { InsertDefinedNameCommand } from './commands/commands/insert-defined-name.command';
export { InsertRangeMoveDownCommand, type InsertRangeMoveDownCommandParams } from './commands/commands/insert-range-move-down.command';
export { InsertRangeMoveRightCommand, type InsertRangeMoveRightCommandParams } from './commands/commands/insert-range-move-right.command';
-export { type ISetWorksheetDefaultStyleMutationParams, SetWorksheetDefaultStyleMutation, SetWorksheetDefaultStyleMutationFactory } from './commands/mutations/set-worksheet-default-style.mutation';
-export { SetWorksheetDefaultStyleCommand } from './commands/commands/set-worksheet-default-style.command';
-export { type ISetRowDataMutationParams, SetRowDataMutation, SetRowDataMutationFactory } from './commands/mutations/set-row-data.mutation';
-export { type ISetRowDataCommandParams, SetRowDataCommand } from './commands/commands/set-row-data.command';
-export { type ISetColDataMutationParams, SetColDataMutation, SetColDataMutationFactory } from './commands/mutations/set-col-data.mutation';
-export { type ISetColDataCommandParams, SetColDataCommand } from './commands/commands/set-col-data.command';
export {
type IInsertColCommandParams,
type IInsertRowCommandParams,
@@ -250,7 +95,6 @@ export {
InsertRowByRangeCommand,
InsertRowCommand,
} from './commands/commands/insert-row-col.command';
-
export { type IInsertSheetCommandParams, InsertSheetCommand } from './commands/commands/insert-sheet.command';
export { getMoveRangeUndoRedoMutations, type IMoveRangeCommandParams, MoveRangeCommand } from './commands/commands/move-range.command';
export {
@@ -259,8 +103,11 @@ export {
MoveColsCommand,
MoveRowsCommand,
} from './commands/commands/move-rows-cols.command';
+export { RegisterWorksheetRangeThemeStyleCommand } from './commands/commands/register-range-theme.command';
+export type { IRegisterWorksheetRangeThemeStyleCommandParams } from './commands/commands/register-range-theme.command';
export { RemoveDefinedNameCommand } from './commands/commands/remove-defined-name.command';
export { type IRemoveColByRangeCommandParams, type IRemoveRowByRangeCommandParams, type IRemoveRowColCommandInterceptParams, type IRemoveRowColCommandParams, RemoveColByRangeCommand, RemoveColCommand, RemoveRowByRangeCommand, RemoveRowCommand } from './commands/commands/remove-row-col.command';
+
export { type IRemoveSheetCommandParams, RemoveSheetCommand } from './commands/commands/remove-sheet.command';
export { RemoveWorksheetMergeCommand } from './commands/commands/remove-worksheet-merge.command';
export { type IReorderRangeCommandParams, ReorderRangeCommand } from './commands/commands/reorder-range.command';
@@ -276,19 +123,20 @@ export {
SetBorderPositionCommand,
SetBorderStyleCommand,
} from './commands/commands/set-border-command';
+export { type ISetColDataCommandParams, SetColDataCommand } from './commands/commands/set-col-data.command';
export {
type ISetSpecificColsVisibleCommandParams,
SetColHiddenCommand,
SetSelectedColsVisibleCommand,
SetSpecificColsVisibleCommand,
} from './commands/commands/set-col-visible.command';
-
export { SetDefinedNameCommand } from './commands/commands/set-defined-name.command';
export { type ICancelFrozenCommandParams, type ISetFrozenCommandParams } from './commands/commands/set-frozen.command';
export { CancelFrozenCommand, SetFrozenCommand } from './commands/commands/set-frozen.command';
-export { type IToggleGridlinesCommandParams, ToggleGridlinesCommand } from './commands/commands/toggle-gridlines.command';
export { type ISetGridlinesColorCommandParams, SetGridlinesColorCommand } from './commands/commands/set-gridlines-color.command';
+export { SetProtectionCommand } from './commands/commands/set-protection.command';
export { type ISetRangeValuesCommandParams, SetRangeValuesCommand } from './commands/commands/set-range-values.command';
+export { type ISetRowDataCommandParams, SetRowDataCommand } from './commands/commands/set-row-data.command';
export {
type ISetSpecificRowsVisibleCommandParams,
SetRowHiddenCommand,
@@ -324,51 +172,43 @@ export {
} from './commands/commands/set-style.command';
export { SetTabColorCommand } from './commands/commands/set-tab-color.command';
export { type ISetWorkbookNameCommandParams, SetWorkbookNameCommand } from './commands/commands/set-workbook-name.command';
-export {
- type ISetWorksheetActivateCommandParams,
- SetWorksheetActivateCommand,
-} from './commands/commands/set-worksheet-activate.command';
-export {
- DeltaColumnWidthCommand,
- type IDeltaColumnWidthCommandParams,
- type ISetColWidthCommandParams,
- SetColWidthCommand,
-} from './commands/commands/set-worksheet-col-width.command';
+export { type ISetWorksheetActivateCommandParams, SetWorksheetActivateCommand } from './commands/commands/set-worksheet-activate.command';
+export { DeltaColumnWidthCommand, SetColWidthCommand } from './commands/commands/set-worksheet-col-width.command';
+export type { IDeltaColumnWidthCommandParams, ISetColWidthCommandParams } from './commands/commands/set-worksheet-col-width.command';
+export { SetWorksheetColumnCountCommand } from './commands/commands/set-worksheet-column-count.command';
+export { SetWorksheetDefaultStyleCommand } from './commands/commands/set-worksheet-default-style.command';
export { SetWorksheetHideCommand } from './commands/commands/set-worksheet-hide.command';
-export {
- type ISetWorksheetNameCommandParams,
- SetWorksheetNameCommand,
-} from './commands/commands/set-worksheet-name.command';
+export { SetWorksheetNameCommand } from './commands/commands/set-worksheet-name.command';
+export { type ISetWorksheetNameCommandParams } from './commands/commands/set-worksheet-name.command';
export { SetWorksheetOrderCommand } from './commands/commands/set-worksheet-order.command';
export { SetWorksheetPermissionPointsCommand } from './commands/commands/set-worksheet-permission-points.command';
+export { SetWorksheetProtectionCommand } from './commands/commands/set-worksheet-protection.command';
export { SetWorksheetRightToLeftCommand } from './commands/commands/set-worksheet-right-to-left.command';
-export {
- DeltaRowHeightCommand,
- type IDeltaRowHeightCommand,
- type ISetWorksheetRowIsAutoHeightCommandParams,
- SetRowHeightCommand,
- SetWorksheetRowIsAutoHeightCommand,
-} from './commands/commands/set-worksheet-row-height.command';
+export { SetWorksheetRowCountCommand } from './commands/commands/set-worksheet-row-count.command';
+export { DeltaRowHeightCommand, SetRowHeightCommand, SetWorksheetRowIsAutoHeightCommand } from './commands/commands/set-worksheet-row-height.command';
+export type { IDeltaRowHeightCommand, ISetWorksheetRowIsAutoHeightCommandParams } from './commands/commands/set-worksheet-row-height.command';
export { SetWorksheetShowCommand } from './commands/commands/set-worksheet-show.command';
-
+export type { ISetWorksheetShowCommandParams } from './commands/commands/set-worksheet-show.command';
export { SplitTextToColumnsCommand } from './commands/commands/split-text-to-columns.command';
export type { ISplitTextToColumnsCommandParams } from './commands/commands/split-text-to-columns.command';
-
+export { type IToggleCellCheckboxCommandParams, ToggleCellCheckboxCommand } from './commands/commands/toggle-checkbox.command';
+export { type IToggleGridlinesCommandParams, ToggleGridlinesCommand } from './commands/commands/toggle-gridlines.command';
export { UnregisterWorksheetRangeThemeStyleCommand } from './commands/commands/unregister-range-theme.command';
export type { IUnregisterWorksheetRangeThemeStyleCommandParams } from './commands/commands/unregister-range-theme.command';
-export { RegisterWorksheetRangeThemeStyleCommand } from './commands/commands/register-range-theme.command';
-export type { IRegisterWorksheetRangeThemeStyleCommandParams } from './commands/commands/register-range-theme.command';
-export { type IRegisterWorksheetRangeThemeStyleMutationParams, RegisterWorksheetRangeThemeStyleMutation } from './commands/mutations/register-range-theme.mutation';
-export { type IUnregisterWorksheetRangeThemeStyleMutationParams, UnregisterWorksheetRangeThemeStyleMutation } from './commands/mutations/unregister-range-theme-style.mutation';
-
-export type { ISetWorksheetShowCommandParams } from './commands/commands/set-worksheet-show.command';
+export { alignToMergedCellsBorders, getCellAtRowCol, isSingleCellSelection, setEndForRange } from './commands/commands/utils/selection-utils';
+export { followSelectionOperation, getPrimaryForRange } from './commands/commands/utils/selection-utils';
+export { copyRangeStyles } from './commands/commands/utils/selection-utils';
+export { getSheetCommandTarget, getSheetCommandTargetWorkbook, getSheetMutationTarget } from './commands/commands/utils/target-util';
export { AddRangeProtectionMutation, FactoryAddRangeProtectionMutation, type IAddRangeProtectionMutationParams } from './commands/mutations/add-range-protection.mutation';
-export { SetProtectionCommand } from './commands/commands/set-protection.command';
+export { AddRangeThemeMutation } from './commands/mutations/add-range-theme.mutation';
+export type { IAddRangeThemeMutationParams } from './commands/mutations/add-range-theme.mutation';
export { AddMergeUndoMutationFactory, AddWorksheetMergeMutation } from './commands/mutations/add-worksheet-merge.mutation';
export { AddWorksheetProtectionMutation, type IAddWorksheetProtectionParams } from './commands/mutations/add-worksheet-protection.mutation';
+export { SetWorksheetRangeThemeStyleMutation, SetWorksheetRangeThemeStyleMutationFactory } from './commands/mutations/add-worksheet-range-theme.mutation';
export { DeleteRangeProtectionMutation, FactoryDeleteRangeProtectionMutation, type IDeleteRangeProtectionMutationParams } from './commands/mutations/delete-range-protection.mutation';
export { DeleteWorksheetProtectionMutation } from './commands/mutations/delete-worksheet-protection.mutation';
export type { IDeleteWorksheetProtectionParams } from './commands/mutations/delete-worksheet-protection.mutation';
+export { DeleteWorksheetRangeThemeStyleMutation, DeleteWorksheetRangeThemeStyleMutationFactory } from './commands/mutations/delete-worksheet-range-theme.mutation';
export { EmptyMutation } from './commands/mutations/empty.mutation';
export {
InsertColMutation,
@@ -377,6 +217,12 @@ export {
InsertRowMutationUndoFactory,
} from './commands/mutations/insert-row-col.mutation';
export { InsertSheetMutation, InsertSheetUndoMutationFactory } from './commands/mutations/insert-sheet.mutation';
+export {
+ CancelMarkDirtyRowAutoHeightMutation,
+ type ICancelMarkDirtyRowAutoHeightMutationParams,
+ type IMarkDirtyRowAutoHeightMutationParams,
+ MarkDirtyRowAutoHeightMutation,
+} from './commands/mutations/mark-dirty-auto-height.mutation';
export { type IMoveRangeMutationParams, MoveRangeMutation } from './commands/mutations/move-range.mutation';
export {
type IMoveColumnsMutationParams,
@@ -396,10 +242,14 @@ export {
SetNumfmtMutation,
transformCellsToRange,
} from './commands/mutations/numfmt-mutation';
+export { type IRegisterWorksheetRangeThemeStyleMutationParams, RegisterWorksheetRangeThemeStyleMutation } from './commands/mutations/register-range-theme.mutation';
+export { RemoveRangeThemeMutation } from './commands/mutations/remove-range-theme.mutation';
+export type { IRemoveRangeThemeMutationParams } from './commands/mutations/remove-range-theme.mutation';
export { RemoveColMutation, RemoveRowMutation } from './commands/mutations/remove-row-col.mutation';
export { RemoveSheetMutation, RemoveSheetUndoMutationFactory } from './commands/mutations/remove-sheet.mutation';
export { RemoveMergeUndoMutationFactory, RemoveWorksheetMergeMutation } from './commands/mutations/remove-worksheet-merge.mutation';
export { type IReorderRangeMutationParams, ReorderRangeMutation, ReorderRangeUndoMutationFactory } from './commands/mutations/reorder-range.mutation';
+export { type ISetColDataMutationParams, SetColDataMutation, SetColDataMutationFactory } from './commands/mutations/set-col-data.mutation';
export {
type ISetColHiddenMutationParams,
type ISetColVisibleMutationParams,
@@ -411,15 +261,17 @@ export {
SetFrozenMutation,
SetFrozenMutationFactory,
} from './commands/mutations/set-frozen.mutation';
-export { type IToggleGridlinesMutationParams, ToggleGridlinesMutation } from './commands/mutations/toggle-gridlines.mutation';
export { type ISetGridlinesColorMutationParams, SetGridlinesColorMutation } from './commands/mutations/set-gridlines-color.mutation';
export { FactorySetRangeProtectionMutation, type ISetRangeProtectionMutationParams, SetRangeProtectionMutation } from './commands/mutations/set-range-protection.mutation';
+export { SetRangeThemeMutation } from './commands/mutations/set-range-theme.mutation';
+export type { ISetRangeThemeMutationParams } from './commands/mutations/set-range-theme.mutation';
export {
type ISetRangeValuesMutationParams,
type ISetRangeValuesRangeMutationParams,
SetRangeValuesMutation,
SetRangeValuesUndoMutationFactory,
} from './commands/mutations/set-range-values.mutation';
+export { type ISetRowDataMutationParams, SetRowDataMutation, SetRowDataMutationFactory } from './commands/mutations/set-row-data.mutation';
export {
type ISetRowHiddenMutationParams,
type ISetRowVisibleMutationParams,
@@ -428,21 +280,23 @@ export {
} from './commands/mutations/set-row-visible.mutation';
export { type ISetTabColorMutationParams, SetTabColorMutation } from './commands/mutations/set-tab-color.mutation';
export { type ISetWorkbookNameMutationParams, SetWorkbookNameMutation } from './commands/mutations/set-workbook-name.mutation';
+
export {
type ISetWorksheetColWidthMutationParams,
SetWorksheetColWidthMutation,
SetWorksheetColWidthMutationFactory,
} from './commands/mutations/set-worksheet-col-width.mutation';
+export { type ISetWorksheetColumnCountMutationParams, SetWorksheetColumnCountMutation, SetWorksheetColumnCountUndoMutationFactory } from './commands/mutations/set-worksheet-column-count.mutation';
+export { type ISetWorksheetDefaultStyleMutationParams, SetWorksheetDefaultStyleMutation, SetWorksheetDefaultStyleMutationFactory } from './commands/mutations/set-worksheet-default-style.mutation';
export { type ISetWorksheetHideMutationParams, SetWorksheetHideMutation } from './commands/mutations/set-worksheet-hide.mutation';
export { type ISetWorksheetNameMutationParams, SetWorksheetNameMutation } from './commands/mutations/set-worksheet-name.mutation';
export { type ISetWorksheetOrderMutationParams, SetWorksheetOrderMutation } from './commands/mutations/set-worksheet-order.mutation';
-export { SetWorksheetRangeThemeStyleMutation, SetWorksheetRangeThemeStyleMutationFactory } from './commands/mutations/add-worksheet-range-theme.mutation';
-export { DeleteWorksheetRangeThemeStyleMutation, DeleteWorksheetRangeThemeStyleMutationFactory } from './commands/mutations/delete-worksheet-range-theme.mutation';
export { SetWorksheetPermissionPointsMutation } from './commands/mutations/set-worksheet-permission-points.mutation';
export type { ISetWorksheetPermissionPointsMutationParams } from './commands/mutations/set-worksheet-permission-points.mutation';
export { SetWorksheetProtectionMutation } from './commands/mutations/set-worksheet-protection.mutation';
export type { ISetWorksheetProtectionParams } from './commands/mutations/set-worksheet-protection.mutation';
export { SetWorksheetRightToLeftMutation } from './commands/mutations/set-worksheet-right-to-left.mutation';
+export { type ISetWorksheetRowCountMutationParams, SetWorksheetRowCountMutation, SetWorksheetRowCountUndoMutationFactory } from './commands/mutations/set-worksheet-row-count.mutation';
export {
type ISetWorksheetRowAutoHeightMutationParams,
type ISetWorksheetRowHeightMutationParams,
@@ -453,26 +307,134 @@ export {
SetWorksheetRowHeightMutation,
SetWorksheetRowIsAutoHeightMutation,
} from './commands/mutations/set-worksheet-row-height.mutation';
-export {
- CancelMarkDirtyRowAutoHeightMutation,
- type ICancelMarkDirtyRowAutoHeightMutationParams,
- type IMarkDirtyRowAutoHeightMutationParams,
- MarkDirtyRowAutoHeightMutation,
-} from './commands/mutations/mark-dirty-auto-height.mutation';
-
+export { type IToggleGridlinesMutationParams, ToggleGridlinesMutation } from './commands/mutations/toggle-gridlines.mutation';
+export { type IUnregisterWorksheetRangeThemeStyleMutationParams, UnregisterWorksheetRangeThemeStyleMutation } from './commands/mutations/unregister-range-theme-style.mutation';
export { type IScrollToCellOperationParams, ScrollToCellOperation } from './commands/operations/scroll-to-cell.operation';
-
export { type ISelectRangeCommandParams, type ISetSelectionsOperationParams, SelectRangeCommand, SetSelectionsOperation } from './commands/operations/selection.operation';
export { type ISetWorksheetActiveOperationParams, SetWorksheetActiveOperation } from './commands/operations/set-worksheet-active.operation';
-export { type IToggleCellCheckboxCommandParams, ToggleCellCheckboxCommand } from './commands/commands/toggle-checkbox.command';
+export { AddMergeRedoSelectionsOperationFactory, AddMergeUndoSelectionsOperationFactory } from './commands/utils/handle-merge-operation';
+export { handleDeleteRangeMutation } from './commands/utils/handle-range-mutation';
+export { getInsertRangeMutations, getRemoveRangeMutations } from './commands/utils/handle-range-mutation';
+export { handleInsertRangeMutation } from './commands/utils/handle-range-mutation';
+export { type ISheetCommandSharedParams } from './commands/utils/interface';
+export { getSelectionsService } from './commands/utils/selection-command-util';
+export { type IUniverSheetsConfig } from './controllers/config.schema';
+export { MAX_CELL_PER_SHEET_KEY } from './controllers/config/config';
+export { DefinedNameDataController } from './controllers/defined-name-data.controller';
export { SCOPE_WORKBOOK_VALUE_DEFINED_NAME } from './controllers/defined-name-data.controller';
-export type { ICellOverGridPosition, ISheetOverGridPosition } from './basics/cell-position';
-
+export { getAddMergeMutationRangeByType } from './controllers/merge-cell.controller';
+export { MERGE_CELL_INTERCEPTOR_CHECK, MergeCellController } from './controllers/merge-cell.controller';
+export { SheetPermissionCheckController } from './controllers/permission/sheet-permission-check.controller';
+export { SheetPermissionInitController } from './controllers/permission/sheet-permission-init.controller';
+export { type ICellPermission, RangeProtectionRenderModel } from './model/range-protection-render.model';
+export { EditStateEnum, type IModel, type IObjectModel, type IRangeProtectionRule, RangeProtectionRuleModel, ViewStateEnum } from './model/range-protection-rule.model';
+export { RangeProtectionCache } from './model/range-protection.cache';
+export { SheetRangeThemeModel } from './model/range-theme-model';
+export type { IRangeThemeStyleJSON } from './model/range-theme-util';
+export { RangeThemeStyle } from './model/range-theme-util';
+export type { IRangeThemeStyleItem } from './model/range-theme-util';
+export { UniverSheetsPlugin } from './plugin';
+export { BorderStyleManagerService, type IBorderInfo } from './services/border-style-manager.service';
+export { ExclusiveRangeService, IExclusiveRangeService } from './services/exclusive-range/exclusive-range-service';
+export { NumfmtService } from './services/numfmt/numfmt.service';
+export type { INumfmtItem, INumfmtItemWithCache } from './services/numfmt/type';
+export { INumfmtService } from './services/numfmt/type';
+export type { FormatType } from './services/numfmt/type';
+export { defaultWorksheetPermissionPoint, getAllWorksheetPermissionPoint, getAllWorksheetPermissionPointByPointPanel } from './services/permission';
+export * from './services/permission/permission-point';
+export {
+ WorkbookCommentPermission,
+ WorkbookCopyPermission,
+ WorkbookCreateProtectPermission,
+ WorkbookCreateSheetPermission,
+ WorkbookDeleteSheetPermission,
+ WorkbookDuplicatePermission,
+ WorkbookEditablePermission,
+ WorkbookExportPermission,
+ WorkbookHideSheetPermission,
+ WorkbookHistoryPermission,
+ WorkbookManageCollaboratorPermission,
+ WorkbookMoveSheetPermission,
+ WorkbookPrintPermission,
+ WorkbookRecoverHistoryPermission,
+ WorkbookRenameSheetPermission,
+ WorkbookSharePermission,
+ WorkbookViewHistoryPermission,
+ WorkbookViewPermission,
+ WorksheetCopyPermission,
+ WorksheetDeleteColumnPermission,
+ WorksheetDeleteProtectionPermission,
+ WorksheetDeleteRowPermission,
+ WorksheetEditExtraObjectPermission,
+ WorksheetEditPermission,
+ WorksheetFilterPermission,
+ WorksheetInsertColumnPermission,
+ WorksheetInsertHyperlinkPermission,
+ WorksheetInsertRowPermission,
+ WorksheetManageCollaboratorPermission,
+ WorksheetPivotTablePermission,
+ WorksheetSelectProtectedCellsPermission,
+ WorksheetSelectUnProtectedCellsPermission,
+ WorksheetSetCellStylePermission,
+ WorksheetSetCellValuePermission,
+ WorksheetSetColumnStylePermission,
+ WorksheetSetRowStylePermission,
+ WorksheetSortPermission,
+ WorksheetViewPermission,
+} from './services/permission/permission-point';
+export { PermissionPointsDefinitions } from './services/permission/permission-point/const';
+export { RangeProtectionPermissionDeleteProtectionPoint } from './services/permission/permission-point/range/delete-protection';
+export { RangeProtectionPermissionEditPoint } from './services/permission/permission-point/range/edit';
+export { RangeProtectionPermissionManageCollaPoint } from './services/permission/permission-point/range/manage-collaborator';
+export { RangeProtectionPermissionViewPoint } from './services/permission/permission-point/range/view';
+export { RangeProtectionRefRangeService } from './services/permission/range-permission/range-protection.ref-range';
+export { RangeProtectionService } from './services/permission/range-permission/range-protection.service';
+export {
+ getAllRangePermissionPoint,
+ getDefaultRangePermission,
+ type IRangePermissionPoint,
+} from './services/permission/range-permission/util';
+export { baseProtectionActions } from './services/permission/range-permission/util';
+export type { IWorksheetProtectionRule } from './services/permission/type';
+export { checkRangesEditablePermission } from './services/permission/util';
+export { defaultWorkbookPermissionPoints, getAllWorkbookPermissionPoint } from './services/permission/workbook-permission';
+export { WorkbookPermissionService } from './services/permission/workbook-permission/workbook-permission.service';
+export { WorksheetProtectionPointModel, WorksheetProtectionRuleModel } from './services/permission/worksheet-permission';
+export type { IWorksheetProtectionRenderCellData } from './services/permission/worksheet-permission/type';
+export { WorksheetPermissionService } from './services/permission/worksheet-permission/worksheet-permission.service';
+export { SheetRangeThemeService } from './services/range-theme-service';
+export { RefRangeService } from './services/ref-range/ref-range.service';
+export type { EffectRefRangeParams, IOperator } from './services/ref-range/type';
+export { EffectRefRangId, OperatorType } from './services/ref-range/type';
+export {
+ adjustRangeOnMutation,
+ getSeparateEffectedRangesOnCommand,
+ handleBaseInsertRange,
+ handleBaseMoveRowsCols,
+ handleBaseRemoveRange,
+ handleCommonDefaultRangeChangeWithEffectRefCommands,
+ handleCommonRangeChangeWithEffectRefCommandsSkipNoInterests,
+ handleDefaultRangeChangeWithEffectRefCommands,
+ handleDefaultRangeChangeWithEffectRefCommandsSkipNoInterests,
+ handleDeleteRangeMoveLeft,
+ handleDeleteRangeMoveUp,
+ handleInsertCol,
+ handleInsertRangeMoveDown,
+ handleInsertRangeMoveRight,
+ handleInsertRow,
+ handleIRemoveCol,
+ handleIRemoveRow,
+ handleMoveCols,
+ handleMoveRange,
+ handleMoveRows,
+ rotateRange,
+ runRefRangeMutations,
+} from './services/ref-range/util';
+export type { MutationsAffectRange } from './services/ref-range/util';
+export * from './services/selections';
+export { getNextPrimaryCell } from './services/selections/move-active-cell-util';
+export { InterceptCellContentPriority, INTERCEPTOR_POINT } from './services/sheet-interceptor/interceptor-const';
+export { AFTER_CELL_EDIT, BEFORE_CELL_EDIT, type IAutoHeightContext, SheetInterceptorService, VALIDATE_CELL } from './services/sheet-interceptor/sheet-interceptor.service';
+export type { ISheetLocation, ISheetLocationBase, ISheetRowLocation } from './services/sheet-interceptor/utils/interceptor';
export { SheetSkeletonService } from './skeleton/skeleton.service';
-
-export { SetWorksheetRowCountCommand } from './commands/commands/set-worksheet-row-count.command';
-export { SetWorksheetColumnCountCommand } from './commands/commands/set-worksheet-column-count.command';
-export { type ISetWorksheetRowCountMutationParams, SetWorksheetRowCountMutation, SetWorksheetRowCountUndoMutationFactory } from './commands/mutations/set-worksheet-row-count.mutation';
-export { type ISetWorksheetColumnCountMutationParams, SetWorksheetColumnCountMutation, SetWorksheetColumnCountUndoMutationFactory } from './commands/mutations/set-worksheet-column-count.mutation';
-
-// #endregion
+export { UnitAction, UnitObject } from '@univerjs/protocol';
diff --git a/packages/slides-ui/src/index.ts b/packages/slides-ui/src/index.ts
index fabb0b206e..29779b4cbf 100644
--- a/packages/slides-ui/src/index.ts
+++ b/packages/slides-ui/src/index.ts
@@ -16,32 +16,23 @@
import './global.css';
-export { UniverSlidesUIPlugin } from './plugin';
-export { SlidesUIController } from './controllers/slide-ui.controller';
-export { SlideSideBar } from './components/slide-bar/SlideBar';
-
-export { ISlideEditorBridgeService } from './services/slide-editor-bridge.service';
-export { SlideCanvasPopMangerService } from './services/slide-popup-manager.service';
-
-export { SlideEditorContainer } from './views/editor-container/EditorContainer';
-export { SLIDE_EDITOR_ID } from './const';
-
-export { CanvasView } from './controllers/canvas-view';
-
-export { SLIDES_IMAGE_MENU_ID } from './controllers/image.menu';
-export { SHAPE_MENU_ID } from './controllers/shape.menu';
-
-export { menuSchema as SlidesUIMenuSchema } from './controllers/menu.schema';
-
-// #region - all commands
-
export { ActivateSlidePageOperation } from './commands/operations/activate.operation';
+export { AppendSlideOperation } from './commands/operations/append-slide.operation';
export { DeleteSlideElementOperation } from './commands/operations/delete-element.operation';
export { InsertSlideFloatImageCommand } from './commands/operations/insert-image.operation';
export { InsertSlideShapeRectangleCommand, InsertSlideShapeRectangleOperation } from './commands/operations/insert-shape.operation';
-export { SetSlidePageThumbOperation } from './commands/operations/set-thumb.operation';
-export { AppendSlideOperation } from './commands/operations/append-slide.operation';
export { SlideAddTextCommand, SlideAddTextOperation } from './commands/operations/insert-text.operation';
+export { SetSlidePageThumbOperation } from './commands/operations/set-thumb.operation';
export { UpdateSlideElementOperation } from './commands/operations/update-element.operation';
-
-// #endregion
+export { SlideSideBar } from './components/slide-bar/SlideBar';
+export { SLIDE_EDITOR_ID } from './const';
+export { CanvasView } from './controllers/canvas-view';
+export type { IUniverSlidesUIConfig } from './controllers/config.schema';
+export { SLIDES_IMAGE_MENU_ID } from './controllers/image.menu';
+export { menuSchema as SlidesUIMenuSchema } from './controllers/menu.schema';
+export { SHAPE_MENU_ID } from './controllers/shape.menu';
+export { SlidesUIController } from './controllers/slide-ui.controller';
+export { UniverSlidesUIPlugin } from './plugin';
+export { ISlideEditorBridgeService } from './services/slide-editor-bridge.service';
+export { SlideCanvasPopMangerService } from './services/slide-popup-manager.service';
+export { SlideEditorContainer } from './views/editor-container/EditorContainer';
diff --git a/packages/slides/src/index.ts b/packages/slides/src/index.ts
index 7781548393..ee3f7f1853 100644
--- a/packages/slides/src/index.ts
+++ b/packages/slides/src/index.ts
@@ -14,5 +14,6 @@
* limitations under the License.
*/
+export type { IUniverSlidesConfig } from './controllers/config.schema';
export { UniverSlidesPlugin } from './plugin';
export * from './views/render';
diff --git a/packages/thread-comment-ui/src/index.ts b/packages/thread-comment-ui/src/index.ts
index 04e44be796..d9afc79409 100644
--- a/packages/thread-comment-ui/src/index.ts
+++ b/packages/thread-comment-ui/src/index.ts
@@ -16,20 +16,16 @@
import './global.css';
+export {
+ type ISetActiveCommentOperationParams,
+ SetActiveCommentOperation,
+ ToggleSheetCommentPanelOperation,
+} from './commands/operations/comment.operations';
+export type { IUniverThreadCommentUIConfig } from './controllers/config.schema';
export { UniverThreadCommentUIPlugin } from './plugin';
export { type ActiveCommentInfo, ThreadCommentPanelService } from './services/thread-comment-panel.service';
+export { THREAD_COMMENT_PANEL } from './types/const';
export { ThreadCommentPanel } from './views/thread-comment-panel';
export type { IThreadCommentPanelProps } from './views/thread-comment-panel';
export { ThreadCommentTree } from './views/thread-comment-tree';
export type { IThreadCommentTreeProps } from './views/thread-comment-tree';
-export { THREAD_COMMENT_PANEL } from './types/const';
-
-// #region - all commands
-
-export {
- type ISetActiveCommentOperationParams,
- SetActiveCommentOperation,
- ToggleSheetCommentPanelOperation,
-} from './commands/operations/comment.operations';
-
-// #endregion
diff --git a/packages/thread-comment/src/index.ts b/packages/thread-comment/src/index.ts
index 4aba8c70a8..8f56342bcf 100644
--- a/packages/thread-comment/src/index.ts
+++ b/packages/thread-comment/src/index.ts
@@ -14,21 +14,20 @@
* limitations under the License.
*/
-export { type CommentUpdate, type IThreadInfo, ThreadCommentModel } from './models/thread-comment.model';
-export { SHEET_UNIVER_THREAD_COMMENT_PLUGIN, ThreadCommentResourceController } from './controllers/tc-resource.controller';
-export { TC_PLUGIN_NAME } from './types/const';
-export type { IBaseComment, IThreadComment, IThreadCommentMention } from './types/interfaces/i-thread-comment';
-export { UniverThreadCommentPlugin } from './plugin';
-export { getDT } from './common/utils';
-
export {
- type IThreadCommentDataSource,
- IThreadCommentDataSourceService,
- ThreadCommentDataSourceService,
- type ThreadCommentJSON,
-} from './services/tc-datasource.service';
-// #region - all commands
-
+ AddCommentCommand,
+ DeleteCommentCommand,
+ DeleteCommentTreeCommand,
+ ResolveCommentCommand,
+ UpdateCommentCommand,
+} from './commands/commands/comment.command';
+export type {
+ IAddCommentCommandParams,
+ IDeleteCommentCommandParams,
+ IDeleteCommentTreeCommandParams,
+ IResolveCommentCommandParams,
+ IUpdateCommentCommandParams,
+} from './commands/commands/comment.command';
export {
AddCommentMutation,
DeleteCommentMutation,
@@ -44,20 +43,16 @@ export type {
IUpdateCommentPayload,
IUpdateCommentRefMutationParams,
} from './commands/mutations/comment.mutation';
-
+export { getDT } from './common/utils';
+export type { IUniverThreadCommentConfig } from './controllers/config.schema';
+export { SHEET_UNIVER_THREAD_COMMENT_PLUGIN, ThreadCommentResourceController } from './controllers/tc-resource.controller';
+export { type CommentUpdate, type IThreadInfo, ThreadCommentModel } from './models/thread-comment.model';
+export { UniverThreadCommentPlugin } from './plugin';
export {
- AddCommentCommand,
- DeleteCommentCommand,
- DeleteCommentTreeCommand,
- ResolveCommentCommand,
- UpdateCommentCommand,
-} from './commands/commands/comment.command';
-export type {
- IAddCommentCommandParams,
- IDeleteCommentCommandParams,
- IDeleteCommentTreeCommandParams,
- IResolveCommentCommandParams,
- IUpdateCommentCommandParams,
-} from './commands/commands/comment.command';
-
-// #endregion
+ type IThreadCommentDataSource,
+ IThreadCommentDataSourceService,
+ ThreadCommentDataSourceService,
+ type ThreadCommentJSON,
+} from './services/tc-datasource.service';
+export { TC_PLUGIN_NAME } from './types/const';
+export type { IBaseComment, IThreadComment, IThreadCommentMention } from './types/interfaces/i-thread-comment';
diff --git a/packages/ui/src/index.ts b/packages/ui/src/index.ts
index b460a5cc9a..5ddc324aa5 100644
--- a/packages/ui/src/index.ts
+++ b/packages/ui/src/index.ts
@@ -16,20 +16,21 @@
import './global.css';
+export { ToggleShortcutPanelOperation } from './commands/operations/toggle-shortcut-panel.operation';
export * from './common';
export { getHeaderFooterMenuHiddenObservable, getMenuHiddenObservable } from './common/menu-hidden-observable';
export { mergeMenuConfigs } from './common/menu-merge-configs';
export * from './components';
export { COLOR_PICKER_COMPONENT } from './components/color-picker/interface';
-export { FontSize } from './components/font-size/FontSize';
export { FontFamily } from './components/font-family/FontFamily';
export { FontFamilyItem } from './components/font-family/FontFamilyItem';
-export { FONT_SIZE_COMPONENT, FONT_SIZE_LIST, HEADING_LIST } from './components/font-size/interface';
export { FONT_FAMILY_COMPONENT, FONT_FAMILY_ITEM_COMPONENT, FONT_FAMILY_LIST, type IFontFamilyItemProps, type IFontFamilyProps } from './components/font-family/interface';
-export { t } from './components/hooks/locale';
+export { FontSize } from './components/font-size/FontSize';
+export { FONT_SIZE_COMPONENT, FONT_SIZE_LIST, HEADING_LIST } from './components/font-size/interface';
export * from './components/hooks';
-export { RectPopup, type RectPopupDirection } from './views/components/popup/RectPopup';
+export { t } from './components/hooks/locale';
export { Menu as UIMenu } from './components/menu/desktop/Menu';
+export { Menu as DesktopMenu } from './components/menu/desktop/Menu';
export { type INotificationOptions } from './components/notification/Notification';
export { ProgressBar } from './components/progress-bar/ProgressBar';
export { UNI_DISABLE_CHANGING_FOCUS_KEY } from './const';
@@ -43,15 +44,13 @@ export {
SharedController,
UndoShortcutItem,
} from './controllers/shared-shortcut.controller';
-export type { IConfirmChildrenProps } from './views/components/confirm-part/interface';
export { ShortcutPanelController } from './controllers/shortcut-display/shortcut-panel.controller';
-export { IUIController, type IWorkbenchOptions } from './controllers/ui/ui.controller';
export { DesktopUIController } from './controllers/ui/ui-desktop.controller';
export { SingleUnitUIController } from './controllers/ui/ui-shared.controller';
+export { IUIController, type IWorkbenchOptions } from './controllers/ui/ui.controller';
export { UniverMobileUIPlugin } from './mobile-plugin';
+export { DISABLE_AUTO_FOCUS_KEY, UNIVER_UI_PLUGIN_NAME, UniverUIPlugin } from './plugin';
export { DesktopBeforeCloseService, IBeforeCloseService } from './services/before-close/before-close.service';
-export { CopyCommand, CutCommand, PasteCommand, SheetPasteShortKeyCommandName } from './services/clipboard/clipboard.command';
-export { supportClipboardAPI } from './services/clipboard/clipboard-utils';
export {
BrowserClipboardService,
FILE__BMP_CLIPBOARD_MIME_TYPE,
@@ -64,14 +63,16 @@ export {
imageMimeTypeSet,
PLAIN_TEXT_CLIPBOARD_MIME_TYPE,
} from './services/clipboard/clipboard-interface.service';
+export { supportClipboardAPI } from './services/clipboard/clipboard-utils';
+export { CopyCommand, CutCommand, PasteCommand, SheetPasteShortKeyCommandName } from './services/clipboard/clipboard.command';
export { IConfirmService, TestConfirmService } from './services/confirm/confirm.service';
export { DesktopConfirmService } from './services/confirm/desktop-confirm.service';
export { ContextMenuService, type IContextMenuHandler, IContextMenuService } from './services/contextmenu/contextmenu.service';
export { DesktopDialogService } from './services/dialog/desktop-dialog.service';
export { IDialogService } from './services/dialog/dialog.service';
-export { IGalleryService } from './services/gallery/gallery.service';
-export { DesktopGalleryService } from './services/gallery/desktop-gallery.service';
export { CanvasFloatDomService, type IFloatDom, type IFloatDomLayout } from './services/dom/canvas-dom-layer.service';
+export { DesktopGalleryService } from './services/gallery/desktop-gallery.service';
+export { IGalleryService } from './services/gallery/gallery.service';
export { DesktopGlobalZoneService } from './services/global-zone/desktop-global-zone.service';
export { IGlobalZoneService } from './services/global-zone/global-zone.service';
export { DesktopLayoutService, ILayoutService } from './services/layout/layout.service';
@@ -104,6 +105,7 @@ export {
RibbonStartGroup,
RibbonViewGroup,
} from './services/menu/types';
+export { MockMessageService } from './services/message/__testing__/mock-message.service.ts';
export { DesktopMessageService } from './services/message/desktop-message.service';
export { IMessageService } from './services/message/message.service';
export { DesktopNotificationService } from './services/notification/desktop-notification.service';
@@ -112,44 +114,30 @@ export { BuiltInUIPart, IUIPartsService, UIPartsService } from './services/parts
export { IPlatformService, PlatformService } from './services/platform/platform.service';
export { CanvasPopupService, ICanvasPopupService, type IPopup } from './services/popup/canvas-popup.service';
export { KeyCode, MetaKeys } from './services/shortcut/keycode';
-export { type IShortcutItem, IShortcutService, ShortcutService } from './services/shortcut/shortcut.service';
export { ShortcutPanelService } from './services/shortcut/shortcut-panel.service';
+export { type IShortcutItem, IShortcutService, ShortcutService } from './services/shortcut/shortcut.service';
export { DesktopSidebarService } from './services/sidebar/desktop-sidebar.service';
export { useSidebarClick } from './services/sidebar/hooks/use-sidebar-click';
export { ILeftSidebarService, ISidebarService } from './services/sidebar/sidebar.service';
+export { ThemeSwitcherService } from './services/theme-switcher/theme-switcher.service';
export { DesktopZenZoneService } from './services/zen-zone/desktop-zen-zone.service';
export { IZenZoneService } from './services/zen-zone/zen-zone.service';
-export { FloatDomSingle } from './views/components/dom/FloatDom';
-export { PrintFloatDomSingle } from './views/components/dom/print';
-export { DISABLE_AUTO_FOCUS_KEY, UNIVER_UI_PLUGIN_NAME, UniverUIPlugin } from './plugin';
export * from './utils';
export { ComponentContainer, type IComponentContainerProps, useComponentsOfPart } from './views/components/ComponentContainer';
-export { ZenZone } from './views/components/zen-zone/ZenZone';
-export { Menu as DesktopMenu } from './components/menu/desktop/Menu';
-export { ThemeSwitcherService } from './services/theme-switcher/theme-switcher.service';
-
-// #region - workbench components
-
+export type { IConfirmChildrenProps } from './views/components/confirm-part/interface';
export { type IConfirmPartMethodOptions } from './views/components/confirm-part/interface';
export { DesktopContextMenu as ContextMenu } from './views/components/context-menu/ContextMenu';
export { MobileContextMenu } from './views/components/context-menu/MobileContextMenu';
export { type IDialogPartMethodOptions } from './views/components/dialog-part/interface';
+export { FloatDomSingle } from './views/components/dom/FloatDom';
export { FloatDom } from './views/components/dom/FloatDom';
+export { PrintFloatDomSingle } from './views/components/dom/print';
export { GlobalZone } from './views/components/global-zone/GlobalZone';
export { CanvasPopup, SingleCanvasPopup } from './views/components/popup/CanvasPopup';
-export { ToolbarButton } from './views/components/ribbon/ToolbarButton';
+export { RectPopup, type RectPopupDirection } from './views/components/popup/RectPopup';
export { useToolbarItemStatus } from './views/components/ribbon/hook';
export { Ribbon } from './views/components/ribbon/Ribbon';
+export { ToolbarButton } from './views/components/ribbon/ToolbarButton';
export { ToolbarItem } from './views/components/ribbon/ToolbarItem';
export { type ISidebarMethodOptions, Sidebar } from './views/components/sidebar/Sidebar';
-// #endregion
-
-// #region - all commands
-
-export { ToggleShortcutPanelOperation } from './commands/operations/toggle-shortcut-panel.operation';
-
-// #endregion
-
-// #region testing
-export { MockMessageService } from './services/message/__testing__/mock-message.service.ts';
-// #endregion
+export { ZenZone } from './views/components/zen-zone/ZenZone';
diff --git a/packages/uniscript/src/index.ts b/packages/uniscript/src/index.ts
index 8df6a0bc9c..2c02e6dc27 100644
--- a/packages/uniscript/src/index.ts
+++ b/packages/uniscript/src/index.ts
@@ -16,12 +16,8 @@
import './global.css';
+export { ToggleScriptPanelOperation } from './commands/operations/panel.operation';
+export type { IUniverUniscriptConfig } from './controllers/config.schema';
export { UniverUniscriptPlugin } from './plugin';
export { ScriptEditorService } from './services/script-editor.service';
export { IUniscriptExecutionService } from './services/script-execution.service';
-
-// #region - all commands
-
-export { ToggleScriptPanelOperation } from './commands/operations/panel.operation';
-
-// #endregion
diff --git a/packages/watermark/src/index.ts b/packages/watermark/src/index.ts
index cfd1ce6bd1..bc2405827b 100644
--- a/packages/watermark/src/index.ts
+++ b/packages/watermark/src/index.ts
@@ -14,6 +14,7 @@
* limitations under the License.
*/
-export { UniverWatermarkPlugin } from './plugin';
export { WATERMARK_IMAGE_ALLOW_IMAGE_LIST, WatermarkImageBaseConfig, WatermarkTextBaseConfig, WatermarkUserInfoBaseConfig } from './common/const';
+export type { IUniverWatermarkConfig } from './controllers/config.schema';
+export { UniverWatermarkPlugin } from './plugin';
export { WatermarkService } from './services/watermark.service';