@univerjs/core 0.2.7 → 0.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/lib/cjs/index.js +7 -7
  2. package/lib/es/index.js +850 -41
  3. package/lib/types/common/equal.d.ts +0 -1
  4. package/lib/types/common/interceptor.d.ts +0 -1
  5. package/lib/types/common/unit.d.ts +0 -1
  6. package/lib/types/docs/data-model/document-data-model.d.ts +0 -1
  7. package/lib/types/docs/data-model/empty-snapshot.d.ts +0 -1
  8. package/lib/types/docs/data-model/json-x/json-x.d.ts +0 -1
  9. package/lib/types/docs/data-model/preset-list-type.d.ts +0 -1
  10. package/lib/types/docs/data-model/replacement.d.ts +0 -1
  11. package/lib/types/docs/data-model/text-x/action-iterator.d.ts +0 -1
  12. package/lib/types/docs/data-model/text-x/action-types.d.ts +0 -1
  13. package/lib/types/docs/data-model/text-x/apply-utils/common.d.ts +0 -1
  14. package/lib/types/docs/data-model/text-x/apply-utils/delete-apply.d.ts +0 -1
  15. package/lib/types/docs/data-model/text-x/apply-utils/insert-apply.d.ts +0 -1
  16. package/lib/types/docs/data-model/text-x/apply-utils/update-apply.d.ts +0 -1
  17. package/lib/types/docs/data-model/text-x/apply.d.ts +0 -1
  18. package/lib/types/docs/data-model/text-x/text-x.d.ts +0 -1
  19. package/lib/types/docs/data-model/text-x/transform-utils.d.ts +0 -1
  20. package/lib/types/docs/data-model/text-x/utils.d.ts +0 -1
  21. package/lib/types/observer/observable.d.ts +0 -1
  22. package/lib/types/services/__tests__/index.d.ts +0 -1
  23. package/lib/types/services/authz-io/authz-io-local.service.d.ts +2 -3
  24. package/lib/types/services/authz-io/type.d.ts +0 -1
  25. package/lib/types/services/command/command.service.d.ts +0 -1
  26. package/lib/types/services/config/config.service.d.ts +0 -1
  27. package/lib/types/services/context/context.service.d.ts +0 -1
  28. package/lib/types/services/error/error.service.d.ts +0 -1
  29. package/lib/types/services/instance/instance.service.d.ts +0 -1
  30. package/lib/types/services/lifecycle/lifecycle.d.ts +0 -1
  31. package/lib/types/services/lifecycle/lifecycle.service.d.ts +0 -1
  32. package/lib/types/services/locale/locale.service.d.ts +0 -1
  33. package/lib/types/services/log/log.service.d.ts +0 -1
  34. package/lib/types/services/permission/permission.service.d.ts +0 -1
  35. package/lib/types/services/permission/type.d.ts +0 -1
  36. package/lib/types/services/plugin/plugin-override.d.ts +0 -1
  37. package/lib/types/services/plugin/plugin.d.ts +0 -1
  38. package/lib/types/services/plugin/plugin.service.d.ts +0 -1
  39. package/lib/types/services/resource-loader/resource-loader.service.d.ts +0 -1
  40. package/lib/types/services/resource-loader/type.d.ts +0 -1
  41. package/lib/types/services/resource-manager/resource-manager.service.d.ts +0 -1
  42. package/lib/types/services/resource-manager/type.d.ts +0 -1
  43. package/lib/types/services/snapshot/__tests__/snapshot-mock.d.ts +0 -1
  44. package/lib/types/services/snapshot/snapshot-server.service.d.ts +0 -1
  45. package/lib/types/services/snapshot/snapshot-transform.d.ts +0 -1
  46. package/lib/types/services/snapshot/snapshot-utils.d.ts +0 -1
  47. package/lib/types/services/theme/theme.service.d.ts +0 -1
  48. package/lib/types/services/undoredo/undoredo.service.d.ts +0 -1
  49. package/lib/types/services/user-manager/const.d.ts +0 -1
  50. package/lib/types/shared/after-init-apply.d.ts +0 -1
  51. package/lib/types/shared/check-if-move.d.ts +0 -1
  52. package/lib/types/shared/clipboard.d.ts +0 -1
  53. package/lib/types/shared/color/color.d.ts +0 -1
  54. package/lib/types/shared/common.d.ts +0 -1
  55. package/lib/types/shared/compare.d.ts +0 -1
  56. package/lib/types/shared/doc-tool.d.ts +0 -1
  57. package/lib/types/shared/index.d.ts +1 -0
  58. package/lib/types/shared/lifecycle.d.ts +0 -1
  59. package/lib/types/shared/lru/lru-map.d.ts +0 -1
  60. package/lib/types/shared/numfmt.d.ts +2 -0
  61. package/lib/types/shared/object-matrix-query.d.ts +0 -1
  62. package/lib/types/shared/object-matrix.d.ts +6 -1
  63. package/lib/types/shared/range.d.ts +0 -1
  64. package/lib/types/shared/rectangle.d.ts +0 -1
  65. package/lib/types/shared/rxjs.d.ts +0 -1
  66. package/lib/types/shared/tools.d.ts +0 -1
  67. package/lib/types/sheets/__tests__/create-core-test-bed.d.ts +0 -1
  68. package/lib/types/sheets/column-manager.d.ts +0 -1
  69. package/lib/types/sheets/empty-snapshot.d.ts +0 -1
  70. package/lib/types/sheets/range.d.ts +0 -1
  71. package/lib/types/sheets/row-manager.d.ts +0 -1
  72. package/lib/types/sheets/sheet-snapshot-utils.d.ts +0 -1
  73. package/lib/types/sheets/styles.d.ts +0 -1
  74. package/lib/types/sheets/view-model.d.ts +0 -1
  75. package/lib/types/sheets/workbook.d.ts +0 -1
  76. package/lib/types/sheets/worksheet.d.ts +0 -1
  77. package/lib/types/slides/slide-model.d.ts +0 -1
  78. package/lib/types/types/const/const.d.ts +1 -1
  79. package/lib/types/types/interfaces/i-cell-custom-render.d.ts +0 -1
  80. package/lib/types/types/interfaces/i-cell-data.d.ts +0 -1
  81. package/lib/types/types/interfaces/i-cell-validation-data.d.ts +0 -1
  82. package/lib/types/types/interfaces/i-column-data.d.ts +0 -1
  83. package/lib/types/types/interfaces/i-data-validation.d.ts +0 -1
  84. package/lib/types/types/interfaces/i-document-data-interceptor.d.ts +0 -1
  85. package/lib/types/types/interfaces/i-document-data.d.ts +0 -1
  86. package/lib/types/types/interfaces/i-placeholder.d.ts +0 -1
  87. package/lib/types/types/interfaces/i-row-data.d.ts +0 -1
  88. package/lib/types/types/interfaces/i-selection-data.d.ts +0 -1
  89. package/lib/types/types/interfaces/i-shape-properties.d.ts +0 -1
  90. package/lib/types/types/interfaces/i-slide-data.d.ts +0 -1
  91. package/lib/types/types/interfaces/i-style-data.d.ts +0 -1
  92. package/lib/types/types/interfaces/i-univer-data.d.ts +0 -1
  93. package/lib/types/types/interfaces/i-workbook-data.d.ts +0 -1
  94. package/lib/types/types/interfaces/i-worksheet-data.d.ts +0 -1
  95. package/lib/types/univer.d.ts +0 -1
  96. package/lib/umd/index.js +7 -7
  97. package/package.json +7 -6
@@ -1,5 +1,4 @@
1
1
  import { IRange, IUnitRange } from '../types/interfaces';
2
-
3
2
  /**
4
3
  * Copyright 2023-present DreamNum Inc.
5
4
  *
@@ -1,5 +1,4 @@
1
1
  import { Nullable } from './type-util';
2
-
3
2
  export type InterceptorHandler<M = unknown, C = unknown> = (value: Nullable<M>, context: C, next: (value: Nullable<M>) => Nullable<M>) => Nullable<M>;
4
3
  export interface IInterceptor<M, C> {
5
4
  priority?: number;
@@ -1,7 +1,6 @@
1
1
  import { UniverType } from '@univerjs/protocol';
2
2
  import { Observable } from 'rxjs';
3
3
  import { Disposable } from '../shared';
4
-
5
4
  export { UniverType as UniverInstanceType } from '@univerjs/protocol';
6
5
  export type UnitType = UniverType | number;
7
6
  export declare abstract class UnitModel<_D = object, T extends UnitType = UnitType> extends Disposable {
@@ -5,7 +5,6 @@ import { IPaddingData } from '../../types/interfaces/i-style-data';
5
5
  import { UnitModel, UniverInstanceType } from '../../common/unit';
6
6
  import { SliceBodyType } from './text-x/utils';
7
7
  import { JSONXActions } from './json-x/json-x';
8
-
9
8
  export declare const DEFAULT_DOC: {
10
9
  id: string;
11
10
  documentStyle: {};
@@ -1,4 +1,3 @@
1
1
  import { LocaleType } from '../../types/enum/locale-type';
2
2
  import { IDocumentData } from '../../types/interfaces';
3
-
4
3
  export declare function getEmptySnapshot(unitID?: string, locale?: LocaleType, title?: string): IDocumentData;
@@ -2,7 +2,6 @@ import { Doc, JSONOp, Path } from 'ot-json1';
2
2
  import { IDocumentBody, IDocumentData } from '../../../types/interfaces';
3
3
  import { TPriority } from '../text-x/text-x';
4
4
  import { TextXAction } from '../text-x/action-types';
5
-
6
5
  import * as json1 from 'ot-json1';
7
6
  export interface ISubType {
8
7
  name: string;
@@ -1,5 +1,4 @@
1
1
  import { IListData } from '../../types/interfaces/i-document-data';
2
-
3
2
  export declare enum QuickListType {
4
3
  ORDER_LIST_QUICK_1 = "1.",
5
4
  ORDER_LIST_QUICK_2 = "a)",
@@ -1,3 +1,2 @@
1
1
  import { IDocumentBody } from '../../types/interfaces/i-document-data';
2
-
3
2
  export declare function replaceInDocumentBody(body: IDocumentBody, query: string, target: string): IDocumentBody;
@@ -1,5 +1,4 @@
1
1
  import { TextXAction, TextXActionType } from './action-types';
2
-
3
2
  export declare class ActionIterator {
4
3
  private _actions;
5
4
  private _index;
@@ -1,6 +1,5 @@
1
1
  import { UpdateDocsAttributeType } from '../../../shared/command-enum';
2
2
  import { IDocumentBody } from '../../../types/interfaces/i-document-data';
3
-
4
3
  export declare enum TextXActionType {
5
4
  RETAIN = "r",
6
5
  INSERT = "i",
@@ -1,5 +1,4 @@
1
1
  import { ICustomBlock, ICustomDecoration, ICustomRange, ICustomTable, IDocumentBody, IParagraph, ISectionBreak, ITextRun } from '../../../../types/interfaces';
2
-
3
2
  export declare function normalizeTextRuns(textRuns: ITextRun[]): ITextRun[];
4
3
  /**
5
4
  * Inserting styled text content into the current document model.
@@ -1,3 +1,2 @@
1
1
  import { IDocumentBody } from '../../../../types/interfaces';
2
-
3
2
  export declare function updateAttributeByDelete(body: IDocumentBody, textLength: number, currentIndex: number): IDocumentBody;
@@ -1,3 +1,2 @@
1
1
  import { IDocumentBody } from '../../../../types/interfaces';
2
-
3
2
  export declare function updateAttributeByInsert(body: IDocumentBody, insertBody: IDocumentBody, textLength: number, currentIndex: number): void;
@@ -1,5 +1,4 @@
1
1
  import { UpdateDocsAttributeType } from '../../../../shared';
2
2
  import { IDocumentBody, ITextRun } from '../../../../types/interfaces';
3
-
4
3
  export declare function updateAttribute(body: IDocumentBody, updateBody: IDocumentBody, textLength: number, currentIndex: number, coverType: UpdateDocsAttributeType): IDocumentBody;
5
4
  export declare function coverTextRuns(updateDataTextRuns: ITextRun[], removeTextRuns: ITextRun[], coverType: UpdateDocsAttributeType): ITextRun[];
@@ -1,4 +1,3 @@
1
1
  import { IDocumentBody } from '../../../types/interfaces';
2
2
  import { TextXAction } from './action-types';
3
-
4
3
  export declare function textXApply(doc: IDocumentBody, actions: TextXAction[]): IDocumentBody;
@@ -1,7 +1,6 @@
1
1
  import { UpdateDocsAttributeType } from '../../../shared/command-enum';
2
2
  import { IDocumentBody } from '../../../types/interfaces/i-document-data';
3
3
  import { TextXAction } from './action-types';
4
-
5
4
  export type TPriority = 'left' | 'right';
6
5
  export declare class TextX {
7
6
  static id: string;
@@ -1,3 +1,2 @@
1
1
  import { IDocumentBody, IRetainAction } from '@univerjs/core';
2
-
3
2
  export declare function transformBody(thisAction: IRetainAction, otherAction: IRetainAction, priority?: boolean): IDocumentBody;
@@ -1,7 +1,6 @@
1
1
  import { UpdateDocsAttributeType } from '../../../shared/command-enum';
2
2
  import { ICustomDecoration, IDocumentBody } from '../../../types/interfaces/i-document-data';
3
3
  import { IRetainAction } from './action-types';
4
-
5
4
  export declare enum SliceBodyType {
6
5
  copy = 0,
7
6
  cut = 1
@@ -1,5 +1,4 @@
1
1
  import { Observer as RxObserver, Subscription, Observable, Subject } from 'rxjs';
2
-
3
2
  /**
4
3
  * A class serves as a medium between the observable and its observers
5
4
  */
@@ -1,6 +1,5 @@
1
1
  import { ICommandService, Univer } from '@univerjs/core';
2
2
  import { Dependency } from '../../common/di';
3
-
4
3
  export declare const createTestBed: (dependencies?: Dependency[]) => {
5
4
  univer: Univer;
6
5
  get: {
@@ -2,7 +2,6 @@ import { IActionInfo, IAllowedRequest, IBatchAllowedResponse, ICollaborator, ICr
2
2
  import { IResourceManagerService } from '../resource-manager/type';
3
3
  import { UserManagerService } from '../user-manager/user-manager.service';
4
4
  import { IAuthzIoService } from './type';
5
-
6
5
  /**
7
6
  * Do not use the mock implementation in a production environment as it is a minimal version.
8
7
  */
@@ -15,8 +14,8 @@ export declare class AuthzIoLocalService implements IAuthzIoService {
15
14
  private _getRole;
16
15
  private _initSnapshot;
17
16
  create(config: ICreateRequest): Promise<string>;
18
- allowed(config: IAllowedRequest): Promise<IActionInfo[]>;
19
- batchAllowed(config: IAllowedRequest[]): Promise<IBatchAllowedResponse['objectActions']>;
17
+ allowed(_config: IAllowedRequest): Promise<IActionInfo[]>;
18
+ batchAllowed(_config: IAllowedRequest[]): Promise<IBatchAllowedResponse['objectActions']>;
20
19
  list(config: IListPermPointRequest): Promise<IPermissionPoint[]>;
21
20
  listCollaborators(): Promise<ICollaborator[]>;
22
21
  listRoles(): Promise<{
@@ -1,6 +1,5 @@
1
1
  import { ILogContext } from '@univerjs/core';
2
2
  import { IAllowedRequest, IAllowedResponse, IBatchAllowedResponse, ICreateCollaboratorRequest, ICreateRequest, ICreateResponse, IDeleteCollaboratorRequest, IListCollaboratorRequest, IListCollaboratorResponse, IListPermPointRequest, IListPermPointResponse, IListRolesRequest, IListRolesResponse, IPutCollaboratorsRequest, IUpdateCollaboratorRequest, IUpdatePermPointRequest } from '@univerjs/protocol';
3
-
4
3
  export interface IAuthzIoService {
5
4
  create(config: ICreateRequest, context?: ILogContext): Promise<ICreateResponse['objectID']>;
6
5
  allowed(config: IAllowedRequest, context?: ILogContext): Promise<IAllowedResponse['actions']>;
@@ -2,7 +2,6 @@ import { IAccessor, IDisposable, Injector } from '../../common/di';
2
2
  import { Disposable } from '../../shared/lifecycle';
3
3
  import { IContextService } from '../context/context.service';
4
4
  import { ILogService } from '../log/log.service';
5
-
6
5
  export declare enum CommandType {
7
6
  /** Command could generate some operations or mutations. */
8
7
  COMMAND = 0,
@@ -1,5 +1,4 @@
1
1
  import { Nullable } from '../../shared/types';
2
-
3
2
  /**
4
3
  * IConfig provides universal configuration for the whole application.
5
4
  */
@@ -1,6 +1,5 @@
1
1
  import { Observable } from 'rxjs';
2
2
  import { Disposable } from '../../shared/lifecycle';
3
-
4
3
  export interface IContextService {
5
4
  readonly contextChanged$: Observable<{
6
5
  [key: string]: boolean;
@@ -1,5 +1,4 @@
1
1
  import { Disposable } from '../../shared/lifecycle';
2
-
3
2
  export interface IError {
4
3
  errorKey: string;
5
4
  }
@@ -6,7 +6,6 @@ import { Disposable } from '../../shared/lifecycle';
6
6
  import { Workbook } from '../../sheets/workbook';
7
7
  import { IContextService } from '../context/context.service';
8
8
  import { UnitModel, UnitType, UniverInstanceType } from '../../common/unit';
9
-
10
9
  export type UnitCtor = new (...args: any[]) => UnitModel;
11
10
  export interface ICreateUnitOptions {
12
11
  /**
@@ -1,5 +1,4 @@
1
1
  import { Ctor, DependencyIdentifier } from '../../common/di';
2
-
3
2
  /**
4
3
  * This enum defines multiple lifecycle stages in Univer SDK.
5
4
  */
@@ -3,7 +3,6 @@ import { Injector } from '../../common/di';
3
3
  import { Disposable } from '../../shared/lifecycle';
4
4
  import { ILogService } from '../log/log.service';
5
5
  import { LifecycleStages } from './lifecycle';
6
-
7
6
  /**
8
7
  * This service controls the lifecycle of a Univer instance. Other modules can
9
8
  * inject this service to read the current lifecycle stage or subscribe to
@@ -2,7 +2,6 @@ import { Subject } from 'rxjs';
2
2
  import { Disposable } from '../../shared/lifecycle';
3
3
  import { ILanguagePack, ILocales, LanguageValue } from '../../shared/locale';
4
4
  import { LocaleType } from '../../types/enum/locale-type';
5
-
6
5
  /**
7
6
  * This service provides i18n and timezone / location features to other modules.
8
7
  */
@@ -1,5 +1,4 @@
1
1
  import { Disposable } from '../../shared/lifecycle';
2
-
3
2
  export declare enum LogLevel {
4
3
  SILENT = 0,
5
4
  ERROR = 1,
@@ -1,7 +1,6 @@
1
1
  import { Observable, BehaviorSubject } from 'rxjs';
2
2
  import { Disposable } from '../../shared';
3
3
  import { IPermissionPoint, IPermissionService } from './type';
4
-
5
4
  export declare class PermissionService extends Disposable implements IPermissionService {
6
5
  private _permissionPointMap;
7
6
  private _permissionPointUpdate$;
@@ -2,7 +2,6 @@ import { BehaviorSubject, Observable } from 'rxjs';
2
2
  import { UnitAction, UnitObject } from '@univerjs/protocol';
3
3
  import { Nullable } from '../../common/type-utils';
4
4
  import { IRange } from '../../types/interfaces';
5
-
6
5
  export declare enum PermissionStatus {
7
6
  INIT = "init",
8
7
  FETCHING = "fetching",
@@ -1,5 +1,4 @@
1
1
  import { Dependency, DependencyIdentifier, DependencyItem } from '../../common/di';
2
-
3
2
  export type NullableDependencyPair<T> = [DependencyIdentifier<T>, DependencyItem<T> | null];
4
3
  /**
5
4
  * Overrides the dependencies defined in the plugin. Only dependencies that are identified by `IdentifierDecorator` can be overridden.
@@ -1,7 +1,6 @@
1
1
  import { Ctor, Injector } from '../../common/di';
2
2
  import { Disposable } from '../../shared';
3
3
  import { UniverInstanceType } from '../../common/unit';
4
-
5
4
  export declare const DependentOnSymbol: unique symbol;
6
5
  export type PluginCtor<T extends Plugin = Plugin> = Ctor<T> & {
7
6
  type: UniverInstanceType;
@@ -4,7 +4,6 @@ import { UniverInstanceType } from '../../common/unit';
4
4
  import { LifecycleInitializerService, LifecycleService } from '../lifecycle/lifecycle.service';
5
5
  import { ILogService } from '../log/log.service';
6
6
  import { Plugin, PluginCtor, PluginRegistry, PluginStore } from './plugin';
7
-
8
7
  /**
9
8
  * Use this decorator to declare dependencies among plugins. If a dependent plugin is not registered yet,
10
9
  * Univer will automatically register it with no configuration.
@@ -5,7 +5,6 @@ import { IUniverInstanceService } from '../instance/instance.service';
5
5
  import { Disposable } from '../../shared/lifecycle';
6
6
  import { DocumentDataModel } from '../../docs';
7
7
  import { IResourceLoaderService } from './type';
8
-
9
8
  export declare class ResourceLoaderService extends Disposable implements IResourceLoaderService {
10
9
  private readonly _resourceManagerService;
11
10
  private readonly _univerInstanceService;
@@ -2,7 +2,6 @@ import { Workbook } from '../../sheets/workbook';
2
2
  import { IWorkbookData } from '../../types/interfaces/i-workbook-data';
3
3
  import { IDocumentData } from '../../types/interfaces';
4
4
  import { DocumentDataModel } from '../../docs';
5
-
6
5
  export interface IResourceLoaderService {
7
6
  saveWorkbook: (workbook: Workbook) => IWorkbookData;
8
7
  saveDoc: (doc: DocumentDataModel) => IDocumentData;
@@ -2,7 +2,6 @@ import { Disposable } from '../../shared/lifecycle';
2
2
  import { Resources } from '../../types/interfaces/i-workbook-data';
3
3
  import { UniverInstanceType } from '../../common/unit';
4
4
  import { IResourceHook, IResourceManagerService, IResourceName } from './type';
5
-
6
5
  export declare class ResourceManagerService extends Disposable implements IResourceManagerService {
7
6
  private _resourceMap;
8
7
  private _register$;
@@ -2,7 +2,6 @@ import { Observable } from 'rxjs';
2
2
  import { UniverInstanceType } from '@univerjs/core';
3
3
  import { IDisposable } from '../../common/di';
4
4
  import { Resources } from '../../types/interfaces/i-workbook-data';
5
-
6
5
  type IBusinessName = 'SHEET' | 'DOC';
7
6
  export type IResourceName = `${IBusinessName}_${string}_PLUGIN`;
8
7
  export interface IResourceHook<T = any> {
@@ -2,7 +2,6 @@ import { IFetchMissingChangesetsRequest, IFetchMissingChangesetsResponse, IGetRe
2
2
  import { IWorkbookData } from '../../../types/interfaces/i-workbook-data';
3
3
  import { ILogContext } from '../../log/context';
4
4
  import { ISnapshotServerService } from '../snapshot-server.service';
5
-
6
5
  export declare const testSnapshot: () => ISnapshot;
7
6
  export declare const testSheetBlocks: () => ISheetBlock[];
8
7
  export declare const testWorkbookData: () => IWorkbookData;
@@ -1,6 +1,5 @@
1
1
  import { IFetchMissingChangesetsRequest, IFetchMissingChangesetsResponse, IGetResourcesRequest, IGetResourcesResponse, IGetSheetBlockRequest, IGetSheetBlockResponse, IGetUnitOnRevRequest, IGetUnitOnRevResponse, ISaveChangesetRequest, ISaveChangesetResponse, ISaveSheetBlockRequest, ISaveSheetBlockResponse, ISaveSnapshotRequest, ISaveSnapshotResponse } from '@univerjs/protocol';
2
2
  import { ILogContext } from '../log/context';
3
-
4
3
  /**
5
4
  * It provides implementations for server side controllers to load or save
6
5
  * or load snapshots. This service should be implemented by the host environment.
@@ -3,7 +3,6 @@ import { ILogContext } from '../log/context';
3
3
  import { IWorkbookData } from '../../types/interfaces/i-workbook-data';
4
4
  import { IDocumentData } from '../../types/interfaces/i-document-data';
5
5
  import { ISnapshotServerService } from './snapshot-server.service';
6
-
7
6
  export declare function generateTempDocumentSnapshot(_context: ILogContext, document: IDocumentData, unitID: string, rev: number): Promise<{
8
7
  snapshot: ISnapshot;
9
8
  }>;
@@ -4,7 +4,6 @@ import { IWorkbookData } from '../../types/interfaces/i-workbook-data';
4
4
  import { IDocumentData } from '../../types/interfaces/i-document-data';
5
5
  import { ICellData } from '../../types/interfaces/i-cell-data';
6
6
  import { IObjectMatrixPrimitiveType } from '../../shared/object-matrix';
7
-
8
7
  export declare const textEncoder: TextEncoder;
9
8
  export declare const textDecoder: TextDecoder;
10
9
  /**
@@ -1,6 +1,5 @@
1
1
  import { Observable } from 'rxjs';
2
2
  import { Disposable } from '../../shared/lifecycle';
3
-
4
3
  export interface IStyleSheet {
5
4
  [key: string]: string;
6
5
  }
@@ -5,7 +5,6 @@ import { IMutationInfo, CommandType, ICommandService } from '../command/command.
5
5
  import { IContextService } from '../context/context.service';
6
6
  import { IUniverInstanceService } from '../instance/instance.service';
7
7
  import { Nullable } from '../../common/type-util';
8
-
9
8
  export interface IUndoRedoItem {
10
9
  /** unitID maps to unitId for UniverSheet / UniverDoc / UniverSlide */
11
10
  unitID: string;
@@ -1,4 +1,3 @@
1
1
  import { IUser, UnitRole } from '@univerjs/protocol';
2
-
3
2
  export declare const createDefaultUser: (type?: UnitRole) => IUser;
4
3
  export declare const isDevRole: (userId: string, type: UnitRole) => boolean;
@@ -1,3 +1,2 @@
1
1
  import { ICommandService } from '../services/command/command.service';
2
-
3
2
  export declare const afterInitApply: (commandService: ICommandService) => Promise<void>;
@@ -1,6 +1,5 @@
1
1
  import { Nullable } from '../common/type-util';
2
2
  import { ITransformState } from '../types/interfaces/i-document-data';
3
-
4
3
  export declare const MOVE_BUFFER_VALUE = 2;
5
4
  export declare const ROTATE_BUFFER_VALUE = 1;
6
5
  export declare function checkIfMove(transform: Nullable<ITransformState>, previousTransform: Nullable<ITransformState>): boolean;
@@ -1,5 +1,4 @@
1
1
  import { IDocumentBody, ITextRun } from '../types/interfaces';
2
-
3
2
  export declare function getBodySliceHtml(body: IDocumentBody, startIndex: number, endIndex: number): string;
4
3
  export declare function convertBodyToHtml(body: IDocumentBody, withParagraphInfo?: boolean): string;
5
4
  export declare function covertTextRunToHtml(dataStream: string, textRun: ITextRun): string;
@@ -1,6 +1,5 @@
1
1
  import { Nullable } from '../../common/type-util';
2
2
  import { ColorType, ThemeColors, ThemeColorType } from '../../types/enum';
3
-
4
3
  export declare class ColorBuilder {
5
4
  private _themeValue;
6
5
  private _themeColors;
@@ -4,7 +4,6 @@ import { IDocumentData } from '../types/interfaces/i-document-data';
4
4
  import { IRangeWithCoord, ISelectionCell, ISelectionCellWithMergeInfo } from '../types/interfaces/i-selection-data';
5
5
  import { IColorStyle, IStyleData } from '../types/interfaces/i-style-data';
6
6
  import { Nullable } from './types';
7
-
8
7
  export declare function makeCellToSelection(cellInfo: ISelectionCellWithMergeInfo): IRangeWithCoord;
9
8
  export declare function makeCellRangeToRangeData(cellInfo: Nullable<ISelectionCell>): Nullable<IRange>;
10
9
  export declare function isEmptyCell(cell: Nullable<ICellData>): boolean;
@@ -1,5 +1,4 @@
1
1
  import { ITextRun } from '../types/interfaces/i-document-data';
2
-
3
2
  interface AnyObject {
4
3
  [key: number | string]: AnyObject | AnyObject[] | Array<[number | string]> | any;
5
4
  }
@@ -1,5 +1,4 @@
1
1
  import { IParagraph, IParagraphStyle } from '../types/interfaces/i-document-data';
2
-
3
2
  export declare function horizontalLineSegmentsSubtraction(A1: number, A2: number, B1: number, B2: number): number[];
4
3
  export declare function checkParagraphHasBullet(paragraph: IParagraph): boolean;
5
4
  export declare function checkParagraphHasIndent(paragraph: IParagraph): boolean;
@@ -38,6 +38,7 @@ export * from './tools';
38
38
  export * from './types';
39
39
  export * from './debounce';
40
40
  export * from './clipboard';
41
+ export { numfmt } from './numfmt';
41
42
  export { queryObjectMatrix } from './object-matrix-query';
42
43
  export { moveRangeByOffset } from './range';
43
44
  export { afterInitApply } from './after-init-apply';
@@ -1,6 +1,5 @@
1
1
  import { Subscription, SubscriptionLike, Subject } from 'rxjs';
2
2
  import { IDisposable } from '../common/di';
3
-
4
3
  type DisposableLike = IDisposable | SubscriptionLike | (() => void);
5
4
  export declare function toDisposable(disposable: IDisposable): IDisposable;
6
5
  export declare function toDisposable(subscription: SubscriptionLike): IDisposable;
@@ -1,5 +1,4 @@
1
1
  import { IDisposable } from '../../common/di';
2
-
3
2
  declare const NEWER: unique symbol;
4
3
  declare const OLDER: unique symbol;
5
4
  export declare class KeyIterator<K, V> implements IterableIterator<K> {
@@ -0,0 +1,2 @@
1
+ import { default as numfmt } from 'numfmt';
2
+ export { numfmt };
@@ -1,4 +1,3 @@
1
1
  import { IRange } from '../types/interfaces';
2
2
  import { ObjectMatrix } from './object-matrix';
3
-
4
3
  export declare function queryObjectMatrix<T>(matrix: ObjectMatrix<T>, match: (value: T) => boolean): IRange[];
@@ -1,6 +1,5 @@
1
1
  import { IRange } from '../types/interfaces/i-range';
2
2
  import { Nullable } from './types';
3
-
4
3
  /**
5
4
  * Object Matrix Primitive Type
6
5
  */
@@ -92,6 +91,12 @@ export declare class ObjectMatrix<T> {
92
91
  */
93
92
  getData(): IObjectMatrixPrimitiveType<T>;
94
93
  getArrayData(): IObjectMatrixPrimitiveType<T>;
94
+ /**
95
+ * the function can only be used in all the row and column are positive integer
96
+ * @description the positive integer in V8 Object is stored in a fast memory space and it is sorted when we get the keys
97
+ * @returns {IRange} the start and end scope of the matrix
98
+ */
99
+ getStartEndScope(): IRange;
95
100
  getDataRange(): IRange;
96
101
  getDiscreteRanges(): IRange[];
97
102
  merge(newObject: ObjectMatrix<T>): void;
@@ -1,3 +1,2 @@
1
1
  import { IRange } from '../types/interfaces/i-range';
2
-
3
2
  export declare function moveRangeByOffset(range: IRange, refOffsetX: number, refOffsetY: number, ignoreAbsolute?: boolean): IRange;
@@ -1,6 +1,5 @@
1
1
  import { IRange, IRectLTRB } from '../types/interfaces/i-range';
2
2
  import { Nullable } from './types';
3
-
4
3
  /**
5
4
  * This class provides a set of methods to calculate `IRange`.
6
5
  */
@@ -1,6 +1,5 @@
1
1
  import { Observable } from 'rxjs';
2
2
  import { IDisposable } from '../common/di';
3
-
4
3
  type CallbackFn<T extends readonly unknown[]> = (cb: (...args: T) => void) => IDisposable;
5
4
  /**
6
5
  * Creates an observable from a callback function.
@@ -1,5 +1,4 @@
1
1
  import { Class, IKeyValue } from './types';
2
-
3
2
  /**
4
3
  * Universal tool library
5
4
  */
@@ -1,6 +1,5 @@
1
1
  import { Univer } from '../../univer';
2
2
  import { IWorkbookData } from '../../types/interfaces/i-workbook-data';
3
-
4
3
  export declare function createCoreTestBed(workbookData?: IWorkbookData): {
5
4
  univer: Univer;
6
5
  get: {
@@ -1,7 +1,6 @@
1
1
  import { Nullable } from '../common/type-util';
2
2
  import { IObjectArrayPrimitiveType } from '../shared/object-matrix';
3
3
  import { IColumnData, IRange, IWorksheetData } from '../types/interfaces';
4
-
5
4
  /**
6
5
  * Manage configuration information of all columns, get column width, column length, set column width, etc.
7
6
  */
@@ -1,4 +1,3 @@
1
1
  import { LocaleType } from '../types/enum/locale-type';
2
2
  import { IWorkbookData } from '../types/interfaces';
3
-
4
3
  export declare function getEmptySnapshot(unitID?: string, locale?: LocaleType, name?: string): IWorkbookData;
@@ -3,7 +3,6 @@ import { HorizontalAlign, VerticalAlign, BooleanNumber, FontItalic, FontWeight,
3
3
  import { IBorderData, ICellData, IDocumentBody, IDocumentData, IRange, IStyleBase, IStyleData, ITextDecoration, ITextRotation } from '../types/interfaces';
4
4
  import { Styles } from './styles';
5
5
  import { Worksheet } from './worksheet';
6
-
7
6
  /**
8
7
  * getObjectValues options type
9
8
  */
@@ -2,7 +2,6 @@ import { IObjectArrayPrimitiveType } from '../shared/object-matrix';
2
2
  import { Nullable } from '../shared/types';
3
3
  import { IRange, IRowData, IWorksheetData } from '../types/interfaces';
4
4
  import { SheetViewModel } from './view-model';
5
-
6
5
  /**
7
6
  * Manage configuration information of all rows, get row height, row length, set row height, etc.
8
7
  */
@@ -1,5 +1,4 @@
1
1
  import { IWorksheetData } from '../types/interfaces/i-worksheet-data';
2
-
3
2
  export declare const DEFAULT_WORKSHEET_ROW_COUNT_KEY = "DEFAULT_WORKSHEET_ROW_COUNT";
4
3
  export declare const DEFAULT_WORKSHEET_ROW_COUNT = 1000;
5
4
  export declare const DEFAULT_WORKSHEET_COLUMN_COUNT_KEY = "DEFAULT_WORKSHEET_COLUMN_COUNT";
@@ -1,6 +1,5 @@
1
1
  import { IKeyType, Nullable } from '../shared';
2
2
  import { ICellDataForSheetInterceptor, IStyleData } from '../types/interfaces';
3
-
4
3
  /**
5
4
  * Styles in a workbook, cells locate styles based on style IDs
6
5
  *
@@ -2,7 +2,6 @@ import { IDisposable } from '../common/di';
2
2
  import { Nullable } from '../common/type-util';
3
3
  import { Disposable } from '../shared/lifecycle';
4
4
  import { ICellData, ICellDataForSheetInterceptor } from '../types/interfaces/i-cell-data';
5
-
6
5
  /**
7
6
  * @internal
8
7
  */
@@ -5,7 +5,6 @@ import { IRangeType, IWorkbookData, IWorksheetData } from '../types/interfaces';
5
5
  import { UnitModel, UniverInstanceType } from '../common/unit';
6
6
  import { Styles } from './styles';
7
7
  import { Worksheet } from './worksheet';
8
-
9
8
  export declare function getWorksheetUID(workbook: Workbook, worksheet: Worksheet): string;
10
9
  /**
11
10
  * Access and create Univer Sheets files
@@ -6,7 +6,6 @@ import { Range } from './range';
6
6
  import { RowManager } from './row-manager';
7
7
  import { Styles } from './styles';
8
8
  import { SheetViewModel } from './view-model';
9
-
10
9
  /**
11
10
  * The model of a Worksheet.
12
11
  */