@univerjs/core 0.2.6 → 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 (105) hide show
  1. package/lib/cjs/index.js +9 -9
  2. package/lib/es/index.js +2025 -244
  3. package/lib/types/common/const.d.ts +1 -1
  4. package/lib/types/common/equal.d.ts +0 -1
  5. package/lib/types/common/error.d.ts +18 -0
  6. package/lib/types/common/interceptor.d.ts +0 -1
  7. package/lib/types/common/unit.d.ts +3 -1
  8. package/lib/types/docs/data-model/document-data-model.d.ts +4 -4
  9. package/lib/types/docs/data-model/empty-snapshot.d.ts +0 -1
  10. package/lib/types/docs/data-model/json-x/json-x.d.ts +2 -2
  11. package/lib/types/docs/data-model/preset-list-type.d.ts +54 -5
  12. package/lib/types/docs/data-model/replacement.d.ts +0 -1
  13. package/lib/types/docs/data-model/text-x/__tests__/transform-position.spec.d.ts +16 -0
  14. package/lib/types/docs/data-model/text-x/__tests__/transform.spec.d.ts +16 -0
  15. package/lib/types/docs/data-model/text-x/action-iterator.d.ts +0 -1
  16. package/lib/types/docs/data-model/text-x/action-types.d.ts +0 -1
  17. package/lib/types/docs/data-model/text-x/apply-utils/common.d.ts +2 -3
  18. package/lib/types/docs/data-model/text-x/apply-utils/delete-apply.d.ts +0 -1
  19. package/lib/types/docs/data-model/text-x/apply-utils/insert-apply.d.ts +0 -1
  20. package/lib/types/docs/data-model/text-x/apply-utils/update-apply.d.ts +0 -1
  21. package/lib/types/docs/data-model/text-x/apply.d.ts +0 -1
  22. package/lib/types/docs/data-model/text-x/text-x.d.ts +31 -2
  23. package/lib/types/docs/data-model/text-x/transform-utils.d.ts +2 -0
  24. package/lib/types/docs/data-model/text-x/utils.d.ts +0 -1
  25. package/lib/types/docs/data-model/types.d.ts +12 -10
  26. package/lib/types/index.d.ts +2 -1
  27. package/lib/types/observer/observable.d.ts +0 -1
  28. package/lib/types/services/__tests__/index.d.ts +0 -1
  29. package/lib/types/services/authz-io/authz-io-local.service.d.ts +2 -3
  30. package/lib/types/services/authz-io/type.d.ts +0 -1
  31. package/lib/types/services/command/command.service.d.ts +0 -1
  32. package/lib/types/services/config/config.service.d.ts +0 -1
  33. package/lib/types/services/context/context.d.ts +3 -1
  34. package/lib/types/services/context/context.service.d.ts +0 -1
  35. package/lib/types/services/error/error.service.d.ts +0 -1
  36. package/lib/types/services/instance/instance.service.d.ts +18 -7
  37. package/lib/types/services/lifecycle/lifecycle.d.ts +0 -1
  38. package/lib/types/services/lifecycle/lifecycle.service.d.ts +0 -1
  39. package/lib/types/services/locale/locale.service.d.ts +0 -1
  40. package/lib/types/services/log/log.service.d.ts +0 -1
  41. package/lib/types/services/permission/permission.service.d.ts +0 -1
  42. package/lib/types/services/permission/type.d.ts +0 -1
  43. package/lib/types/services/plugin/plugin-override.d.ts +0 -1
  44. package/lib/types/services/plugin/plugin.d.ts +0 -1
  45. package/lib/types/services/plugin/plugin.service.d.ts +0 -1
  46. package/lib/types/services/resource-loader/resource-loader.service.d.ts +0 -1
  47. package/lib/types/services/resource-loader/type.d.ts +0 -1
  48. package/lib/types/services/resource-manager/resource-manager.service.d.ts +4 -7
  49. package/lib/types/services/resource-manager/type.d.ts +8 -5
  50. package/lib/types/services/snapshot/__tests__/snapshot-mock.d.ts +0 -1
  51. package/lib/types/services/snapshot/snapshot-server.service.d.ts +0 -1
  52. package/lib/types/services/snapshot/snapshot-transform.d.ts +3 -1
  53. package/lib/types/services/snapshot/snapshot-utils.d.ts +0 -1
  54. package/lib/types/services/theme/theme.service.d.ts +0 -1
  55. package/lib/types/services/undoredo/undoredo.service.d.ts +0 -1
  56. package/lib/types/services/user-manager/const.d.ts +0 -1
  57. package/lib/types/shared/after-init-apply.d.ts +0 -1
  58. package/lib/types/shared/check-if-move.d.ts +0 -1
  59. package/lib/types/shared/clipboard.d.ts +0 -1
  60. package/lib/types/shared/color/color.d.ts +0 -1
  61. package/lib/types/shared/common.d.ts +0 -1
  62. package/lib/types/shared/compare.d.ts +0 -1
  63. package/lib/types/shared/doc-tool.d.ts +0 -1
  64. package/lib/types/shared/index.d.ts +1 -0
  65. package/lib/types/shared/lifecycle.d.ts +0 -1
  66. package/lib/types/shared/lru/lru-map.d.ts +0 -1
  67. package/lib/types/shared/numfmt.d.ts +2 -0
  68. package/lib/types/shared/object-matrix-query.d.ts +0 -1
  69. package/lib/types/shared/object-matrix.d.ts +6 -1
  70. package/lib/types/shared/range.d.ts +0 -1
  71. package/lib/types/shared/rectangle.d.ts +0 -1
  72. package/lib/types/shared/rxjs.d.ts +0 -1
  73. package/lib/types/shared/shape.d.ts +6 -0
  74. package/lib/types/shared/tools.d.ts +11 -1
  75. package/lib/types/sheets/__tests__/create-core-test-bed.d.ts +0 -1
  76. package/lib/types/sheets/column-manager.d.ts +0 -1
  77. package/lib/types/sheets/empty-snapshot.d.ts +0 -1
  78. package/lib/types/sheets/range.d.ts +0 -1
  79. package/lib/types/sheets/row-manager.d.ts +0 -1
  80. package/lib/types/sheets/sheet-snapshot-utils.d.ts +0 -1
  81. package/lib/types/sheets/styles.d.ts +0 -1
  82. package/lib/types/sheets/view-model.d.ts +0 -1
  83. package/lib/types/sheets/workbook.d.ts +1 -1
  84. package/lib/types/sheets/worksheet.d.ts +0 -1
  85. package/lib/types/slides/slide-model.d.ts +18 -4
  86. package/lib/types/types/const/const.d.ts +1 -1
  87. package/lib/types/types/interfaces/i-cell-custom-render.d.ts +0 -1
  88. package/lib/types/types/interfaces/i-cell-data.d.ts +0 -1
  89. package/lib/types/types/interfaces/i-cell-validation-data.d.ts +0 -1
  90. package/lib/types/types/interfaces/i-column-data.d.ts +0 -1
  91. package/lib/types/types/interfaces/i-data-validation.d.ts +0 -1
  92. package/lib/types/types/interfaces/i-document-data-interceptor.d.ts +5 -2
  93. package/lib/types/types/interfaces/i-document-data.d.ts +93 -47
  94. package/lib/types/types/interfaces/i-placeholder.d.ts +0 -1
  95. package/lib/types/types/interfaces/i-row-data.d.ts +0 -1
  96. package/lib/types/types/interfaces/i-selection-data.d.ts +0 -1
  97. package/lib/types/types/interfaces/i-shape-properties.d.ts +0 -1
  98. package/lib/types/types/interfaces/i-slide-data.d.ts +0 -1
  99. package/lib/types/types/interfaces/i-style-data.d.ts +0 -1
  100. package/lib/types/types/interfaces/i-univer-data.d.ts +0 -1
  101. package/lib/types/types/interfaces/i-workbook-data.d.ts +6 -6
  102. package/lib/types/types/interfaces/i-worksheet-data.d.ts +0 -1
  103. package/lib/types/univer.d.ts +0 -1
  104. package/lib/umd/index.js +9 -9
  105. package/package.json +11 -7
@@ -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;
@@ -1,24 +1,21 @@
1
1
  import { Disposable } from '../../shared/lifecycle';
2
- import { IWorkbookData } from '../../types/interfaces/i-workbook-data';
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$;
9
8
  register$: import('rxjs').Observable<IResourceHook<any>>;
10
9
  getAllResourceHooks(): IResourceHook<any>[];
11
- getResources(unitId: string): {
12
- name: `SHEET_${string}_PLUGIN` | `DOC_${string}_PLUGIN`;
13
- data: string;
14
- }[];
10
+ getResources(unitId: string): Resources;
11
+ getResources(unitId: string, type: UniverInstanceType): Resources;
15
12
  getResourcesByType(unitId: string, type: UniverInstanceType): {
16
13
  name: `SHEET_${string}_PLUGIN` | `DOC_${string}_PLUGIN`;
17
14
  data: string;
18
15
  }[];
19
16
  registerPluginResource<T = unknown>(hook: IResourceHook<T>): import('@wendellhu/redi').IDisposable;
20
17
  disposePluginResource(pluginName: IResourceName): void;
21
- loadResources(unitId: string, resources: IWorkbookData['resources']): void;
18
+ loadResources(unitId: string, resources?: Resources): void;
22
19
  unloadResources(unitId: string): void;
23
20
  dispose(): void;
24
21
  }
@@ -1,8 +1,7 @@
1
1
  import { Observable } from 'rxjs';
2
2
  import { UniverInstanceType } from '@univerjs/core';
3
3
  import { IDisposable } from '../../common/di';
4
- import { IWorkbookData } from '../../types/interfaces/i-workbook-data';
5
-
4
+ import { Resources } from '../../types/interfaces/i-workbook-data';
6
5
  type IBusinessName = 'SHEET' | 'DOC';
7
6
  export type IResourceName = `${IBusinessName}_${string}_PLUGIN`;
8
7
  export interface IResourceHook<T = any> {
@@ -18,9 +17,13 @@ export interface IResourceManagerService {
18
17
  registerPluginResource: <T = any>(hook: IResourceHook<T>) => IDisposable;
19
18
  disposePluginResource: (pluginName: IResourceName) => void;
20
19
  getAllResourceHooks: () => IResourceHook[];
21
- getResources: (unitId: string) => IWorkbookData['resources'];
22
- getResourcesByType: (unitId: string, type: UniverInstanceType) => IWorkbookData['resources'];
23
- loadResources: (unitId: string, resources: IWorkbookData['resources']) => void;
20
+ /**
21
+ * @deprecated You should get resource with type specified.
22
+ */
23
+ getResources(unitId: string): Resources;
24
+ getResources(unitId: string, type: UniverInstanceType): Resources;
25
+ getResourcesByType: (unitId: string, type: UniverInstanceType) => Resources;
26
+ loadResources: (unitId: string, resources?: Resources) => void;
24
27
  unloadResources(unitId: string): void;
25
28
  }
26
29
  export declare const IResourceManagerService: import('@univerjs/core').IdentifierDecorator<IResourceManagerService>;
@@ -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,9 @@ 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
-
6
+ export declare function generateTempDocumentSnapshot(_context: ILogContext, document: IDocumentData, unitID: string, rev: number): Promise<{
7
+ snapshot: ISnapshot;
8
+ }>;
7
9
  export declare function generateTemporarySnap(context: ILogContext, workbook: IWorkbookData, unitID: string, rev: number, snapshotService: ISnapshotServerService): Promise<{
8
10
  snapshotRes: ISnapshot;
9
11
  }>;
@@ -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.
@@ -31,3 +31,9 @@ export interface ISrcRect extends IOffset {
31
31
  }
32
32
  export interface IAbsoluteTransform extends ISize, IOffset, IScale {
33
33
  }
34
+ export interface IRectXYWH {
35
+ x: number;
36
+ y: number;
37
+ width: number;
38
+ height: number;
39
+ }
@@ -1,5 +1,4 @@
1
1
  import { Class, IKeyValue } from './types';
2
-
3
2
  /**
4
3
  * Universal tool library
5
4
  */
@@ -113,5 +112,16 @@ export declare class Tools {
113
112
  */
114
113
  static set(data: Record<string, any>, propertyPath: string, value: any): void;
115
114
  static clamp(value: number, min: number, max: number): number;
115
+ /**
116
+ *
117
+ *
118
+ * @static
119
+ * @param {unknown} object Modify the property while leaving the reference unchanged.
120
+ * @param {unknown} source The source being merged in object.
121
+ * @param {(value: unknown, originValue: unknown, key: string, object: unknown, source: unknown, stack: string[]) => {}} [customizer]
122
+ * @return {*}
123
+ * @memberof Tools
124
+ */
125
+ static mergeWith(object: unknown, source: unknown, customizer?: (value: unknown, originValue: unknown, key: string, object: unknown, source: unknown, stack: string[]) => {}): any;
116
126
  }
117
127
  export declare function generateRandomId(n?: number, alphabet?: string): string;
@@ -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
@@ -45,6 +44,7 @@ export declare class Workbook extends UnitModel<IWorkbookData, UniverInstanceTyp
45
44
  save(): IWorkbookData;
46
45
  static isIRangeType(range: IRangeType | IRangeType[]): boolean;
47
46
  getSnapshot(): IWorkbookData;
47
+ /** @deprecated use use name property instead */
48
48
  getName(): string;
49
49
  setName(name: string): void;
50
50
  getUnitId(): string;
@@ -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
  */
@@ -1,15 +1,18 @@
1
+ import { Observable } from 'rxjs';
1
2
  import { UnitModel, UniverInstanceType } from '../common/unit';
2
3
  import { Nullable } from '../shared';
3
- import { ISlideData, ISlidePage } from '../types/interfaces';
4
-
4
+ import { ISlideData, ISlidePage, PageType } from '../types/interfaces';
5
5
  export declare class SlideDataModel extends UnitModel<ISlideData, UniverInstanceType.UNIVER_SLIDE> {
6
6
  type: UniverInstanceType.UNIVER_SLIDE;
7
7
  private readonly _activePage$;
8
8
  private get _activePage();
9
- readonly activePage$: import('rxjs').Observable<Nullable<ISlidePage>>;
9
+ readonly activePage$: Observable<Nullable<ISlidePage>>;
10
+ private readonly _name$;
11
+ name$: Observable<string>;
10
12
  private _snapshot;
11
13
  private _unitId;
12
14
  constructor(snapshot: Partial<ISlideData>);
15
+ setName(name: string): void;
13
16
  getContainer(): string | undefined;
14
17
  getSnapshot(): ISlideData;
15
18
  getUnitId(): string;
@@ -23,8 +26,19 @@ export declare class SlideDataModel extends UnitModel<ISlideData, UniverInstance
23
26
  } | undefined;
24
27
  getElement(pageId: string, elementId: string): import('../types/interfaces').IPageElement | undefined;
25
28
  getPageSize(): import('../shared').ISize;
26
- addPage(): ISlidePage;
29
+ getBlankPage(): {
30
+ id: string;
31
+ pageType: PageType;
32
+ zIndex: number;
33
+ title: string;
34
+ description: string;
35
+ pageBackgroundFill: {
36
+ rgb: string;
37
+ };
38
+ pageElements: {};
39
+ };
27
40
  setActivePage(page: Nullable<ISlidePage>): void;
28
41
  getActivePage(): Nullable<ISlidePage>;
29
42
  updatePage(pageId: string, page: ISlidePage): void;
43
+ appendPage(page: ISlidePage): void;
30
44
  }
@@ -1,5 +1,4 @@
1
1
  import { BooleanNumber, HorizontalAlign, TextDirection, VerticalAlign, WrapStrategy } from '../enum';
2
-
3
2
  /**
4
3
  * Used as an illegal range array return value
5
4
  */
@@ -127,6 +126,7 @@ export declare const DEFAULT_STYLES: {
127
126
  b: number;
128
127
  l: number;
129
128
  };
129
+ n: null;
130
130
  };
131
131
  export declare const DEFAULT_SLIDE: {
132
132
  id: string;
@@ -4,7 +4,6 @@ import { Workbook } from '../../sheets/workbook';
4
4
  import { ISelectionCellWithMergeInfo } from './i-selection-data';
5
5
  import { IStyleData } from './i-style-data';
6
6
  import { ICellDataForSheetInterceptor } from './i-cell-data';
7
-
8
7
  export interface ICellRenderContext {
9
8
  data: ICellDataForSheetInterceptor;
10
9
  style: Nullable<IStyleData>;
@@ -4,7 +4,6 @@ import { ICellCustomRender } from './i-cell-custom-render';
4
4
  import { IDocumentData } from './i-document-data';
5
5
  import { IStyleData } from './i-style-data';
6
6
  import { ICellValidationData } from './i-cell-validation-data';
7
-
8
7
  /**
9
8
  * Cell value type
10
9
  */
@@ -1,6 +1,5 @@
1
1
  import { DataValidationStatus } from '../enum/data-validation-status';
2
2
  import { IDataValidationRule } from './i-data-validation';
3
-
4
3
  export interface ICellValidationData {
5
4
  ruleId: string;
6
5
  validStatus: DataValidationStatus;
@@ -1,5 +1,4 @@
1
1
  import { BooleanNumber } from '../enum';
2
-
3
2
  /**
4
3
  * Properties of column data
5
4
  */
@@ -4,7 +4,6 @@ import { DataValidationImeMode } from '../enum/data-validation-ime-mode';
4
4
  import { DataValidationErrorStyle } from '../enum/data-validation-error-style';
5
5
  import { DataValidationRenderMode } from '../enum/data-validation-render-mode';
6
6
  import { IRange } from './i-range';
7
-
8
7
  export interface IDataValidationRuleBase {
9
8
  type: DataValidationType;
10
9
  allowBlank?: boolean;
@@ -1,5 +1,4 @@
1
- import { ICustomDecoration, ICustomRange } from './i-document-data';
2
-
1
+ import { ICustomDecoration, ICustomRange, IParagraph } from './i-document-data';
3
2
  export interface ICustomRangeForInterceptor extends ICustomRange {
4
3
  active?: boolean;
5
4
  show?: boolean;
@@ -8,3 +7,7 @@ export interface ICustomDecorationForInterceptor extends ICustomDecoration {
8
7
  active?: boolean;
9
8
  show?: boolean;
10
9
  }
10
+ export interface IParagraphRange extends IParagraph {
11
+ paragraphStart: number;
12
+ paragraphEnd: number;
13
+ }