@univerjs/core 0.1.3 → 0.1.5

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 (87) hide show
  1. package/lib/cjs/index.js +8 -7
  2. package/lib/es/index.js +1396 -1319
  3. package/lib/types/basics/plugin-holder.d.ts +5 -19
  4. package/lib/types/basics/univer-doc.d.ts +5 -19
  5. package/lib/types/basics/univer-sheet.d.ts +5 -20
  6. package/lib/types/basics/univer-slide.d.ts +6 -20
  7. package/lib/types/basics/univer.d.ts +11 -25
  8. package/lib/types/common/interceptor.d.ts +2 -16
  9. package/lib/types/docs/data-model/action-types.d.ts +3 -17
  10. package/lib/types/docs/data-model/apply-utils/common.d.ts +2 -16
  11. package/lib/types/docs/data-model/apply-utils/delete-apply.d.ts +2 -16
  12. package/lib/types/docs/data-model/apply-utils/insert-apply.d.ts +2 -16
  13. package/lib/types/docs/data-model/apply-utils/update-apply.d.ts +2 -16
  14. package/lib/types/docs/data-model/document-data-model.d.ts +8 -22
  15. package/lib/types/docs/data-model/empty-snapshot.d.ts +4 -0
  16. package/lib/types/docs/data-model/preset-list-type.d.ts +1 -15
  17. package/lib/types/docs/data-model/replacement.d.ts +2 -16
  18. package/lib/types/docs/data-model/text-x/action-iterator.d.ts +2 -17
  19. package/lib/types/docs/data-model/text-x/text-x.d.ts +4 -18
  20. package/lib/types/docs/data-model/text-x/utils.d.ts +3 -17
  21. package/lib/types/index.d.ts +2 -1
  22. package/lib/types/observer/observable-hooks.d.ts +3 -18
  23. package/lib/types/observer/observable.d.ts +2 -16
  24. package/lib/types/plugin/plugin.d.ts +2 -16
  25. package/lib/types/services/command/command.service.d.ts +6 -21
  26. package/lib/types/services/config/config.service.d.ts +3 -17
  27. package/lib/types/services/context/context.d.ts +2 -1
  28. package/lib/types/services/context/context.service.d.ts +3 -17
  29. package/lib/types/services/error/error.service.d.ts +2 -16
  30. package/lib/types/services/floating-object/floating-object-manager.service.d.ts +6 -20
  31. package/lib/types/services/instance/instance.service.d.ts +28 -42
  32. package/lib/types/services/lifecycle/lifecycle.d.ts +2 -16
  33. package/lib/types/services/lifecycle/lifecycle.service.d.ts +5 -19
  34. package/lib/types/services/local-storage/local-storage.service.d.ts +1 -1
  35. package/lib/types/services/locale/locale.service.d.ts +5 -18
  36. package/lib/types/services/log/log.service.d.ts +2 -16
  37. package/lib/types/services/permission/permission-point.d.ts +1 -15
  38. package/lib/types/services/permission/permission.service.d.ts +6 -21
  39. package/lib/types/services/permission/univer.permission.service.d.ts +3 -17
  40. package/lib/types/services/resource-manager/resource-manager.service.d.ts +4 -18
  41. package/lib/types/services/resource-manager/type.d.ts +7 -21
  42. package/lib/types/services/snapshot/__tests__/snapshot-mock.d.ts +5 -19
  43. package/lib/types/services/snapshot/snapshot-server.service.d.ts +4 -18
  44. package/lib/types/services/snapshot/snapshot-transform.d.ts +6 -20
  45. package/lib/types/services/snapshot/snapshot-utils.d.ts +7 -21
  46. package/lib/types/services/theme/theme.service.d.ts +2 -16
  47. package/lib/types/services/undoredo/undoredo.service.d.ts +8 -24
  48. package/lib/types/shared/__test__/common.spec.d.ts +16 -0
  49. package/lib/types/shared/__test__/rectangle.spec.d.ts +16 -0
  50. package/lib/types/shared/color/color.d.ts +2 -16
  51. package/lib/types/shared/common.d.ts +15 -22
  52. package/lib/types/shared/compare.d.ts +2 -16
  53. package/lib/types/shared/doc-tool.d.ts +2 -16
  54. package/lib/types/shared/lifecycle.d.ts +5 -20
  55. package/lib/types/shared/lru/lru-map.d.ts +2 -16
  56. package/lib/types/shared/object-matrix.d.ts +3 -17
  57. package/lib/types/shared/props-from.d.ts +2 -16
  58. package/lib/types/shared/rectangle.d.ts +4 -18
  59. package/lib/types/shared/ref-alias.d.ts +8 -1
  60. package/lib/types/shared/rxjs.d.ts +2 -16
  61. package/lib/types/shared/tools.d.ts +2 -16
  62. package/lib/types/sheets/__tests__/create-core-test-bed.d.ts +9 -23
  63. package/lib/types/sheets/column-manager.d.ts +4 -18
  64. package/lib/types/sheets/range.d.ts +6 -22
  65. package/lib/types/sheets/row-manager.d.ts +4 -18
  66. package/lib/types/sheets/sheet-snapshot-utils.d.ts +2 -16
  67. package/lib/types/sheets/styles.d.ts +3 -17
  68. package/lib/types/sheets/view-model.d.ts +4 -18
  69. package/lib/types/sheets/workbook.d.ts +9 -23
  70. package/lib/types/sheets/worksheet.d.ts +9 -24
  71. package/lib/types/slides/domain/slide-model.d.ts +8 -20
  72. package/lib/types/types/const/const.d.ts +2 -16
  73. package/lib/types/types/enum/interpolation-point-type.d.ts +3 -3
  74. package/lib/types/types/interfaces/i-cell-data.d.ts +4 -18
  75. package/lib/types/types/interfaces/i-column-data.d.ts +2 -16
  76. package/lib/types/types/interfaces/i-document-data.d.ts +6 -19
  77. package/lib/types/types/interfaces/i-placeholder.d.ts +2 -16
  78. package/lib/types/types/interfaces/i-row-data.d.ts +2 -16
  79. package/lib/types/types/interfaces/i-selection-data.d.ts +3 -17
  80. package/lib/types/types/interfaces/i-shape-properties.d.ts +3 -17
  81. package/lib/types/types/interfaces/i-slide-data.d.ts +13 -26
  82. package/lib/types/types/interfaces/i-style-data.d.ts +5 -19
  83. package/lib/types/types/interfaces/i-univer-data.d.ts +5 -19
  84. package/lib/types/types/interfaces/i-workbook-data.d.ts +6 -20
  85. package/lib/types/types/interfaces/i-worksheet-data.d.ts +8 -22
  86. package/lib/umd/index.js +8 -7
  87. package/package.json +10 -9
@@ -1,23 +1,9 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { Injector } from '@wendellhu/redi';
17
- import type { Plugin, PluginCtor } from '../plugin/plugin';
18
- import { LifecycleStages } from '../services/lifecycle/lifecycle';
19
- import type { LifecycleInitializerService, LifecycleService } from '../services/lifecycle/lifecycle.service';
20
1
  import { Disposable } from '../shared/lifecycle';
2
+ import { LifecycleInitializerService, LifecycleService } from '../services/lifecycle/lifecycle.service';
3
+ import { LifecycleStages } from '../services/lifecycle/lifecycle';
4
+ import { Plugin, PluginCtor } from '../plugin/plugin';
5
+ import { Injector } from '@wendellhu/redi';
6
+
21
7
  export declare abstract class PluginHolder extends Disposable {
22
8
  protected abstract get _lifecycleService(): LifecycleService;
23
9
  protected abstract get _lifecycleInitializerService(): LifecycleInitializerService;
@@ -1,23 +1,9 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { Injector } from '@wendellhu/redi';
17
- import { DocumentDataModel } from '../docs/data-model/document-data-model';
18
- import { LifecycleInitializerService, LifecycleService } from '../services/lifecycle/lifecycle.service';
19
- import type { IDocumentData } from '../types/interfaces/i-document-data';
20
1
  import { PluginHolder } from './plugin-holder';
2
+ import { IDocumentData } from '../types/interfaces/i-document-data';
3
+ import { LifecycleInitializerService, LifecycleService } from '../services/lifecycle/lifecycle.service';
4
+ import { DocumentDataModel } from '../docs/data-model/document-data-model';
5
+ import { Injector } from '@wendellhu/redi';
6
+
21
7
  /**
22
8
  * Externally provided UniverDoc root instance
23
9
  */
@@ -1,24 +1,9 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IDisposable } from '@wendellhu/redi';
17
- import { Injector } from '@wendellhu/redi';
18
- import { LifecycleInitializerService, LifecycleService } from '../services/lifecycle/lifecycle.service';
19
- import { Workbook } from '../sheets/workbook';
20
- import type { IWorkbookData } from '../types/interfaces/i-workbook-data';
21
1
  import { PluginHolder } from './plugin-holder';
2
+ import { IWorkbookData } from '../types/interfaces/i-workbook-data';
3
+ import { Workbook } from '../sheets/workbook';
4
+ import { LifecycleInitializerService, LifecycleService } from '../services/lifecycle/lifecycle.service';
5
+ import { IDisposable, Injector } from '@wendellhu/redi';
6
+
22
7
  /**
23
8
  * Externally provided UniverSheet root instance
24
9
  */
@@ -1,23 +1,9 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { Injector } from '@wendellhu/redi';
17
- import { LifecycleInitializerService, LifecycleService } from '../services/lifecycle/lifecycle.service';
18
- import { Slide } from '../slides/domain/slide-model';
19
- import type { ISlideData } from '../types/interfaces/i-slide-data';
20
1
  import { PluginHolder } from './plugin-holder';
2
+ import { ISlideData } from '../types/interfaces/i-slide-data';
3
+ import { SlideDataModel } from '../slides/domain/slide-model';
4
+ import { LifecycleInitializerService, LifecycleService } from '../services/lifecycle/lifecycle.service';
5
+ import { Injector } from '@wendellhu/redi';
6
+
21
7
  /**
22
8
  * Externally provided UniverSlide root instance
23
9
  */
@@ -26,5 +12,5 @@ export declare class UniverSlide extends PluginHolder {
26
12
  protected readonly _lifecycleService: LifecycleService;
27
13
  protected readonly _lifecycleInitializerService: LifecycleInitializerService;
28
14
  constructor(_injector: Injector, _lifecycleService: LifecycleService, _lifecycleInitializerService: LifecycleInitializerService);
29
- createSlide(data: Partial<ISlideData>): Slide;
15
+ createSlide(data: Partial<ISlideData>): SlideDataModel;
30
16
  }
@@ -1,27 +1,13 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { Injector } from '@wendellhu/redi';
17
- import type { DocumentDataModel } from '../docs/data-model/document-data-model';
18
- import type { Plugin, PluginCtor } from '../plugin/plugin';
19
- import { LifecycleInitializerService, LifecycleService } from '../services/lifecycle/lifecycle.service';
20
- import type { Workbook } from '../sheets/workbook';
21
- import type { Slide } from '../slides/domain/slide-model';
22
- import type { LocaleType } from '../types/enum/locale-type';
23
- import type { IDocumentData, ISlideData, IUniverData, IWorkbookData } from '../types/interfaces';
24
1
  import { PluginHolder } from './plugin-holder';
2
+ import { IDocumentData, ISlideData, IUniverData, IWorkbookData } from '../types/interfaces';
3
+ import { LocaleType } from '../types/enum/locale-type';
4
+ import { SlideDataModel } from '../slides/domain/slide-model';
5
+ import { Workbook } from '../sheets/workbook';
6
+ import { LifecycleInitializerService, LifecycleService } from '../services/lifecycle/lifecycle.service';
7
+ import { Plugin, PluginCtor } from '../plugin/plugin';
8
+ import { DocumentDataModel } from '../docs/data-model/document-data-model';
9
+ import { Injector } from '@wendellhu/redi';
10
+
25
11
  export declare class Univer extends PluginHolder {
26
12
  protected readonly _injector: Injector;
27
13
  private readonly _univerPluginStore;
@@ -41,7 +27,7 @@ export declare class Univer extends PluginHolder {
41
27
  */
42
28
  createUniverSheet(config: Partial<IWorkbookData>): Workbook;
43
29
  createUniverDoc(config: Partial<IDocumentData>): DocumentDataModel;
44
- createUniverSlide(config: Partial<ISlideData>): Slide;
30
+ createUniverSlide(config: Partial<ISlideData>): SlideDataModel;
45
31
  private _initDependencies;
46
32
  /**
47
33
  * Initialize modules provided by Univer-type plugins.
@@ -49,7 +35,7 @@ export declare class Univer extends PluginHolder {
49
35
  private _tryProgressToStart;
50
36
  private _tryProgressToReady;
51
37
  /** Register a plugin into univer. */
52
- registerPlugin<T extends Plugin>(plugin: PluginCtor<T>, config?: any): void;
38
+ registerPlugin<T extends PluginCtor<Plugin>>(plugin: T, config?: ConstructorParameters<T>[0]): void;
53
39
  private _initLazyPluginsTimer?;
54
40
  private _scheduleInitPluginAfterStarted;
55
41
  private _flushLazyPlugins;
@@ -1,19 +1,5 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { Nullable } from './type-utils';
1
+ import { Nullable } from './type-utils';
2
+
17
3
  export type InterceptorHandler<M = unknown, C = unknown> = (value: Nullable<M>, context: C, next: (value: Nullable<M>) => Nullable<M>) => Nullable<M>;
18
4
  export interface IInterceptor<M, C> {
19
5
  priority?: number;
@@ -1,20 +1,6 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { UpdateDocsAttributeType } from '../../shared/command-enum';
17
- import type { IDocumentBody } from '../../types/interfaces/i-document-data';
1
+ import { IDocumentBody } from '../../types/interfaces/i-document-data';
2
+ import { UpdateDocsAttributeType } from '../../shared/command-enum';
3
+
18
4
  export declare enum TextXActionType {
19
5
  RETAIN = "r",
20
6
  INSERT = "i",
@@ -1,19 +1,5 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { ICustomBlock, ICustomRange, IDocumentBody, IParagraph, ISectionBreak, ITable, ITextRun } from '../../../types/interfaces';
1
+ import { ICustomBlock, ICustomRange, IDocumentBody, IParagraph, ISectionBreak, ITable, ITextRun } from '../../../types/interfaces';
2
+
17
3
  export declare function normalizeTextRuns(textRuns: ITextRun[]): ITextRun[];
18
4
  /**
19
5
  * Inserting styled text content into the current document model.
@@ -1,17 +1,3 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IDocumentBody } from '../../../types/interfaces';
1
+ import { IDocumentBody } from '../../../types/interfaces';
2
+
17
3
  export declare function updateAttributeByDelete(body: IDocumentBody, textLength: number, currentIndex: number): IDocumentBody;
@@ -1,17 +1,3 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IDocumentBody } from '../../../types/interfaces';
1
+ import { IDocumentBody } from '../../../types/interfaces';
2
+
17
3
  export declare function updateAttributeByInsert(body: IDocumentBody, insertBody: IDocumentBody, textLength: number, currentIndex: number): void;
@@ -1,19 +1,5 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
1
+ import { IDocumentBody, ITextRun } from '../../../types/interfaces';
16
2
  import { UpdateDocsAttributeType } from '../../../shared';
17
- import type { IDocumentBody, ITextRun } from '../../../types/interfaces';
3
+
18
4
  export declare function updateAttribute(body: IDocumentBody, updateBody: IDocumentBody, textLength: number, currentIndex: number, coverType: UpdateDocsAttributeType): IDocumentBody;
19
5
  export declare function coverTextRuns(updateDataTextRuns: ITextRun[], removeTextRuns: ITextRun[], coverType: UpdateDocsAttributeType): ITextRun[];
@@ -1,22 +1,8 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { Nullable } from '../../shared';
17
- import type { IDocumentBody, IDocumentData, IDocumentRenderConfig, IDocumentStyle } from '../../types/interfaces/i-document-data';
18
- import type { IPaddingData } from '../../types/interfaces/i-style-data';
19
- import { type TextXAction } from './action-types';
1
+ import { TextXAction } from './action-types';
2
+ import { IPaddingData } from '../../types/interfaces/i-style-data';
3
+ import { IDocumentBody, IDocumentData, IDocumentRenderConfig, IDocumentStyle } from '../../types/interfaces/i-document-data';
4
+ import { Nullable } from '../../shared';
5
+
20
6
  export declare const DEFAULT_DOC: {
21
7
  id: string;
22
8
  documentStyle: {};
@@ -30,9 +16,9 @@ interface IDrawingUpdateConfig {
30
16
  declare class DocumentDataModelSimple {
31
17
  snapshot: IDocumentData;
32
18
  constructor(snapshot: Partial<IDocumentData>);
33
- get drawings(): import("../../types/interfaces/i-document-data").IDrawings | undefined;
19
+ get drawings(): import('../../types/interfaces/i-document-data').IDrawings | undefined;
34
20
  get documentStyle(): IDocumentStyle;
35
- get lists(): import("../../types/interfaces/i-document-data").ILists | undefined;
21
+ get lists(): import('../../types/interfaces/i-document-data').ILists | undefined;
36
22
  /**
37
23
  * @deprecated use getBody to instead.
38
24
  */
@@ -59,7 +45,7 @@ export declare class DocumentDataModel extends DocumentDataModelSimple {
59
45
  dispose(): void;
60
46
  getRev(): number;
61
47
  incrementRev(): void;
62
- getSettings(): import("../../types/interfaces/i-document-data").IDocumentSettings | undefined;
48
+ getSettings(): import('../../types/interfaces/i-document-data').IDocumentSettings | undefined;
63
49
  reset(snapshot: Partial<IDocumentData>): void;
64
50
  getSelfOrHeaderFooterModel(segmentId?: string): DocumentDataModel;
65
51
  getUnitId(): string;
@@ -0,0 +1,4 @@
1
+ import { IDocumentData } from '../../types/interfaces';
2
+ import { LocaleType } from '../../types/enum/locale-type';
3
+
4
+ export declare function getEmptySnapshot(unitID?: string, locale?: LocaleType, title?: string): IDocumentData;
@@ -1,19 +1,5 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
1
  import { BulletAlignment, GlyphType } from '../../types/interfaces/i-document-data';
2
+
17
3
  export declare enum PresetListType {
18
4
  BULLET_LIST = "BULLET_LIST",
19
5
  ORDER_LIST = "ORDER_LIST"
@@ -1,17 +1,3 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IDocumentBody } from '../../types/interfaces/i-document-data';
1
+ import { IDocumentBody } from '../../types/interfaces/i-document-data';
2
+
17
3
  export declare function replaceInDocumentBody(body: IDocumentBody, query: string, target: string): IDocumentBody;
@@ -1,20 +1,5 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { TextXAction } from '../action-types';
17
- import { TextXActionType } from '../action-types';
1
+ import { TextXAction, TextXActionType } from '../action-types';
2
+
18
3
  export declare class ActionIterator {
19
4
  private _actions;
20
5
  private _index;
@@ -1,21 +1,7 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { UpdateDocsAttributeType } from '../../../shared/command-enum';
17
- import type { IDocumentBody } from '../../../types/interfaces/i-document-data';
18
- import { type TextXAction } from '../action-types';
1
+ import { TextXAction } from '../action-types';
2
+ import { IDocumentBody } from '../../../types/interfaces/i-document-data';
3
+ import { UpdateDocsAttributeType } from '../../../shared/command-enum';
4
+
19
5
  export declare class TextX {
20
6
  static compose(thisActions: TextXAction[], otherActions: TextXAction[]): TextXAction[];
21
7
  private _actions;
@@ -1,21 +1,7 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
1
+ import { IRetainAction } from '../action-types';
2
+ import { IDocumentBody } from '../../../types/interfaces/i-document-data';
16
3
  import { UpdateDocsAttributeType } from '../../../shared/command-enum';
17
- import type { IDocumentBody } from '../../../types/interfaces/i-document-data';
18
- import type { IRetainAction } from '../action-types';
4
+
19
5
  export declare function getBodySlice(body: IDocumentBody, startOffset: number, endOffset: number): IDocumentBody;
20
6
  export declare function composeBody(thisBody: IDocumentBody, otherBody: IDocumentBody, coverType?: UpdateDocsAttributeType): IDocumentBody;
21
7
  export declare function isUselessRetainAction(action: IRetainAction): boolean;
@@ -58,7 +58,7 @@ export { Styles } from './sheets/styles';
58
58
  export { DEFAULT_WORKSHEET_COLUMN_COUNT, DEFAULT_WORKSHEET_COLUMN_COUNT_KEY, DEFAULT_WORKSHEET_COLUMN_TITLE_HEIGHT_KEY, DEFAULT_WORKSHEET_COLUMN_WIDTH_KEY, DEFAULT_WORKSHEET_ROW_COUNT_KEY, DEFAULT_WORKSHEET_ROW_HEIGHT_KEY, DEFAULT_WORKSHEET_ROW_TITLE_WIDTH_KEY, DEFAULT_WORKSHEET_COLUMN_TITLE_HEIGHT, DEFAULT_WORKSHEET_COLUMN_WIDTH, DEFAULT_WORKSHEET_ROW_COUNT, DEFAULT_WORKSHEET_ROW_HEIGHT, DEFAULT_WORKSHEET_ROW_TITLE_WIDTH, mergeWorksheetSnapshotWithDefault, } from './sheets/sheet-snapshot-utils';
59
59
  export { SheetViewModel } from './sheets/view-model';
60
60
  export { getWorksheetUID, Workbook } from './sheets/workbook';
61
- export { Worksheet } from './sheets/worksheet';
61
+ export { Worksheet, extractPureTextFromCell } from './sheets/worksheet';
62
62
  export * from './slides/domain';
63
63
  export * from './types/const';
64
64
  export * from './types/enum';
@@ -74,3 +74,4 @@ export { b64DecodeUnicode, b64EncodeUnicode } from './shared/coder';
74
74
  export { ClientSnapshotServerService } from './services/snapshot/snapshot-server.service';
75
75
  export { getSheetBlocksFromSnapshot } from './services/snapshot/snapshot-transform';
76
76
  export { isBlackColor, isWhiteColor } from './shared/color/color-kit';
77
+ export { cellToRange } from './shared/common';
@@ -1,21 +1,6 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { Nullable } from '../shared/types';
17
- import type { EventState } from './observable';
18
- import { Observable, Observer } from './observable';
1
+ import { EventState, Observable, Observer } from './observable';
2
+ import { Nullable } from '../shared/types';
3
+
19
4
  /**
20
5
  * Observable Hooks
21
6
  */
@@ -1,19 +1,5 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { Nullable } from '../shared/types';
1
+ import { Nullable } from '../shared/types';
2
+
17
3
  /**
18
4
  * A class serves as a medium between the observable and its observers
19
5
  */
@@ -1,19 +1,5 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { Ctor, Injector } from '@wendellhu/redi';
1
+ import { Ctor, Injector } from '@wendellhu/redi';
2
+
17
3
  export type PluginCtor<T extends Plugin> = Ctor<T> & {
18
4
  type: PluginType;
19
5
  };
@@ -1,22 +1,7 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IAccessor, IDisposable } from '@wendellhu/redi';
17
- import { Injector } from '@wendellhu/redi';
18
- import { IContextService } from '../context/context.service';
19
1
  import { ILogService } from '../log/log.service';
2
+ import { IContextService } from '../context/context.service';
3
+ import { IAccessor, IDisposable, Injector } from '@wendellhu/redi';
4
+
20
5
  export declare enum CommandType {
21
6
  /** Command could generate some operations or mutations. */
22
7
  COMMAND = 0,
@@ -117,7 +102,7 @@ export interface ICommandService {
117
102
  */
118
103
  beforeCommandExecuted(listener: CommandListener): IDisposable;
119
104
  }
120
- export declare const ICommandService: import("@wendellhu/redi").IdentifierDecorator<ICommandService>;
105
+ export declare const ICommandService: import('@wendellhu/redi').IdentifierDecorator<ICommandService>;
121
106
  /**
122
107
  * The registry of commands.
123
108
  */
@@ -148,6 +133,6 @@ export declare class CommandService implements ICommandService {
148
133
  private _execute;
149
134
  private _syncExecute;
150
135
  }
151
- export declare function sequenceExecute(tasks: ICommandInfo[], commandService: ICommandService, options?: IExecutionOptions): import("../../common/sequence").ISequenceExecuteResult;
152
- export declare function sequenceExecuteAsync(tasks: ICommandInfo[], commandService: ICommandService, options?: IExecutionOptions): Promise<import("../../common/sequence").ISequenceExecuteResult>;
136
+ export declare function sequenceExecute(tasks: ICommandInfo[], commandService: ICommandService, options?: IExecutionOptions): import('../../common/sequence').ISequenceExecuteResult;
137
+ export declare function sequenceExecuteAsync(tasks: ICommandInfo[], commandService: ICommandService, options?: IExecutionOptions): Promise<import('../../common/sequence').ISequenceExecuteResult>;
153
138
  export declare const NilCommand: ICommand;