@univerjs/core 0.17.0 → 0.18.0

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 (128) hide show
  1. package/lib/cjs/facade.js +1 -1
  2. package/lib/cjs/index.js +9 -8
  3. package/lib/es/facade.js +1 -1479
  4. package/lib/es/index.js +9 -20335
  5. package/lib/facade.js +1 -1479
  6. package/lib/index.js +9 -20335
  7. package/lib/types/common/async.d.ts +16 -1
  8. package/lib/types/common/di.d.ts +18 -2
  9. package/lib/types/common/interceptor.d.ts +16 -1
  10. package/lib/types/common/invert-color/invert-hsl.d.ts +16 -1
  11. package/lib/types/common/invert-color/invert-rgb.d.ts +16 -1
  12. package/lib/types/common/unit.d.ts +17 -2
  13. package/lib/types/docs/data-model/document-data-model.d.ts +24 -9
  14. package/lib/types/docs/data-model/empty-snapshot.d.ts +16 -1
  15. package/lib/types/docs/data-model/json-x/json-x.d.ts +19 -4
  16. package/lib/types/docs/data-model/preset-list-type.d.ts +16 -1
  17. package/lib/types/docs/data-model/replacement.d.ts +16 -1
  18. package/lib/types/docs/data-model/rich-text-builder.d.ts +21 -5
  19. package/lib/types/docs/data-model/text-x/action-iterator.d.ts +17 -1
  20. package/lib/types/docs/data-model/text-x/action-types.d.ts +17 -2
  21. package/lib/types/docs/data-model/text-x/apply-utils/common.d.ts +16 -1
  22. package/lib/types/docs/data-model/text-x/apply-utils/delete-apply.d.ts +16 -1
  23. package/lib/types/docs/data-model/text-x/apply-utils/insert-apply.d.ts +16 -1
  24. package/lib/types/docs/data-model/text-x/apply-utils/update-apply.d.ts +16 -1
  25. package/lib/types/docs/data-model/text-x/apply.d.ts +17 -2
  26. package/lib/types/docs/data-model/text-x/build-utils/custom-decoration.d.ts +17 -2
  27. package/lib/types/docs/data-model/text-x/build-utils/custom-range.d.ts +17 -2
  28. package/lib/types/docs/data-model/text-x/build-utils/drawings.d.ts +19 -4
  29. package/lib/types/docs/data-model/text-x/build-utils/index.d.ts +24 -9
  30. package/lib/types/docs/data-model/text-x/build-utils/paragraph.d.ts +18 -3
  31. package/lib/types/docs/data-model/text-x/build-utils/parse.d.ts +16 -1
  32. package/lib/types/docs/data-model/text-x/build-utils/selection.d.ts +17 -2
  33. package/lib/types/docs/data-model/text-x/build-utils/text-x-utils.d.ts +23 -7
  34. package/lib/types/docs/data-model/text-x/text-x.d.ts +18 -3
  35. package/lib/types/docs/data-model/text-x/transform-utils.d.ts +17 -2
  36. package/lib/types/docs/data-model/text-x/utils.d.ts +34 -19
  37. package/lib/types/docs/data-model/utils.d.ts +16 -1
  38. package/lib/types/facade/f-base.d.ts +17 -1
  39. package/lib/types/facade/f-blob.d.ts +17 -1
  40. package/lib/types/facade/f-doc.d.ts +17 -1
  41. package/lib/types/facade/f-enum.d.ts +15 -0
  42. package/lib/types/facade/f-event-registry.d.ts +19 -3
  43. package/lib/types/facade/f-event.d.ts +17 -2
  44. package/lib/types/facade/f-hooks.d.ts +17 -1
  45. package/lib/types/facade/f-univer.d.ts +20 -3
  46. package/lib/types/facade/f-usermanager.d.ts +17 -1
  47. package/lib/types/facade/f-util.d.ts +15 -0
  48. package/lib/types/observer/observable.d.ts +17 -1
  49. package/lib/types/services/authz-io/authz-io-local.service.d.ts +17 -2
  50. package/lib/types/services/authz-io/type.d.ts +18 -3
  51. package/lib/types/services/command/command.service.d.ts +20 -4
  52. package/lib/types/services/config/config.service.d.ts +18 -3
  53. package/lib/types/services/confirm/confirm.service.d.ts +17 -2
  54. package/lib/types/services/context/context.service.d.ts +16 -1
  55. package/lib/types/services/error/error.service.d.ts +16 -1
  56. package/lib/types/services/image-io/image-io.service.d.ts +18 -3
  57. package/lib/types/services/image-io/url-image.service.d.ts +17 -2
  58. package/lib/types/services/instance/instance.service.d.ts +22 -5
  59. package/lib/types/services/lifecycle/lifecycle.service.d.ts +16 -1
  60. package/lib/types/services/local-storage/local-storage.service.d.ts +1 -1
  61. package/lib/types/services/locale/locale.service.d.ts +17 -2
  62. package/lib/types/services/log/log.service.d.ts +16 -1
  63. package/lib/types/services/mention-io/mention-io-local.service.d.ts +16 -1
  64. package/lib/types/services/mention-io/type.d.ts +18 -3
  65. package/lib/types/services/permission/permission.service.d.ts +18 -2
  66. package/lib/types/services/permission/type.d.ts +20 -5
  67. package/lib/types/services/plugin/plugin-override.d.ts +16 -1
  68. package/lib/types/services/plugin/plugin.service.d.ts +18 -2
  69. package/lib/types/services/resource-loader/resource-loader.service.d.ts +17 -2
  70. package/lib/types/services/resource-loader/type.d.ts +17 -2
  71. package/lib/types/services/resource-manager/resource-manager.service.d.ts +19 -4
  72. package/lib/types/services/resource-manager/type.d.ts +19 -4
  73. package/lib/types/services/theme/theme.service.d.ts +16 -1
  74. package/lib/types/services/undoredo/undoredo.service.d.ts +22 -5
  75. package/lib/types/services/user-manager/const.d.ts +17 -1
  76. package/lib/types/services/user-manager/user-manager.service.d.ts +17 -2
  77. package/lib/types/shared/after-init-apply.d.ts +16 -1
  78. package/lib/types/shared/cache/image-cache.d.ts +16 -1
  79. package/lib/types/shared/check-if-move.d.ts +17 -2
  80. package/lib/types/shared/common.d.ts +22 -7
  81. package/lib/types/shared/compare.d.ts +16 -1
  82. package/lib/types/shared/dayjs.d.ts +16 -1
  83. package/lib/types/shared/doc-tool.d.ts +16 -1
  84. package/lib/types/shared/generate.d.ts +17 -2
  85. package/lib/types/shared/lifecycle.d.ts +18 -2
  86. package/lib/types/shared/lru/lru-map.d.ts +16 -1
  87. package/lib/types/shared/object-matrix-query.d.ts +16 -1
  88. package/lib/types/shared/object-matrix.d.ts +17 -2
  89. package/lib/types/shared/r-tree.d.ts +18 -2
  90. package/lib/types/shared/range.d.ts +17 -2
  91. package/lib/types/shared/rectangle.d.ts +17 -2
  92. package/lib/types/shared/rxjs.d.ts +18 -2
  93. package/lib/types/shared/tools.d.ts +17 -23
  94. package/lib/types/sheets/clone.d.ts +17 -2
  95. package/lib/types/sheets/column-manager.d.ts +19 -4
  96. package/lib/types/sheets/empty-snapshot.d.ts +16 -1
  97. package/lib/types/sheets/range.d.ts +23 -6
  98. package/lib/types/sheets/row-manager.d.ts +20 -5
  99. package/lib/types/sheets/sheet-skeleton.d.ts +21 -5
  100. package/lib/types/sheets/sheet-snapshot-utils.d.ts +16 -1
  101. package/lib/types/sheets/span-model.d.ts +16 -1
  102. package/lib/types/sheets/styles.d.ts +18 -3
  103. package/lib/types/sheets/typedef.d.ts +23 -7
  104. package/lib/types/sheets/util.d.ts +20 -4
  105. package/lib/types/sheets/workbook.d.ts +19 -4
  106. package/lib/types/sheets/worksheet.d.ts +25 -7
  107. package/lib/types/skeleton.d.ts +16 -1
  108. package/lib/types/slides/slide-model.d.ts +22 -6
  109. package/lib/types/types/const/const.d.ts +18 -2
  110. package/lib/types/types/const/page-size.d.ts +16 -1
  111. package/lib/types/types/interfaces/i-cell-custom-render.d.ts +20 -5
  112. package/lib/types/types/interfaces/i-cell-validation-data.d.ts +17 -2
  113. package/lib/types/types/interfaces/i-data-validation.d.ts +21 -6
  114. package/lib/types/types/interfaces/i-document-data-interceptor.d.ts +16 -1
  115. package/lib/types/types/interfaces/i-document-data.d.ts +20 -5
  116. package/lib/types/types/interfaces/i-drawing.d.ts +56 -3
  117. package/lib/types/types/interfaces/i-mention.d.ts +16 -1
  118. package/lib/types/types/interfaces/i-need-check-disposable.d.ts +16 -1
  119. package/lib/types/types/interfaces/i-placeholder.d.ts +16 -1
  120. package/lib/types/types/interfaces/i-shape-properties.d.ts +17 -2
  121. package/lib/types/types/interfaces/i-slide-data.d.ts +26 -11
  122. package/lib/types/types/interfaces/i-style-data.d.ts +19 -4
  123. package/lib/types/univer.d.ts +26 -10
  124. package/lib/umd/facade.js +1 -1
  125. package/lib/umd/index.js +9 -8
  126. package/package.json +9 -9
  127. package/lib/types/docs/data-model/text-x/build-utils/__test__/custom-range.spec.d.ts +0 -16
  128. package/lib/types/docs/data-model/text-x/build-utils/__test__/selection.spec.d.ts +0 -16
@@ -1,13 +1,29 @@
1
- import { Nullable, ObjectMatrix } from '../shared';
2
- import { IDocumentData, IDocumentRenderConfig, IPaddingData } from '../types/interfaces';
3
- import { Styles } from './styles';
4
- import { ICellData, ICellInfo, ICellWithCoord, IPosition, IRange, ISelectionCell, IWorksheetData } from './typedef';
5
- import { Worksheet } from './worksheet';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { IDocumentData, IDocumentRenderConfig, IPaddingData } from '../types/interfaces';
18
+ import type { Styles } from './styles';
19
+ import type { ICellData, ICellInfo, ICellWithCoord, IPosition, IRange, ISelectionCell, IWorksheetData } from './typedef';
20
+ import type { Worksheet } from './worksheet';
6
21
  import { Injector } from '@wendellhu/redi';
7
22
  import { DocumentDataModel } from '../docs/data-model/document-data-model';
8
23
  import { IConfigService } from '../services/config/config.service';
9
24
  import { IContextService } from '../services/context/context.service';
10
25
  import { LocaleService } from '../services/locale/locale.service';
26
+ import { ObjectMatrix } from '../shared';
11
27
  import { ImageCacheMap } from '../shared/cache/image-cache';
12
28
  import { Skeleton } from '../skeleton';
13
29
  import { HorizontalAlign } from '../types/enum';
@@ -1,4 +1,19 @@
1
- import { IWorksheetData } from './typedef';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { IWorksheetData } from './typedef';
2
17
  export declare const DEFAULT_WORKSHEET_ROW_COUNT_KEY = "DEFAULT_WORKSHEET_ROW_COUNT";
3
18
  export declare const DEFAULT_WORKSHEET_ROW_COUNT = 1000;
4
19
  export declare const DEFAULT_WORKSHEET_COLUMN_COUNT_KEY = "DEFAULT_WORKSHEET_COLUMN_COUNT";
@@ -1,4 +1,19 @@
1
- import { IRange } from './typedef';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { IRange } from './typedef';
2
17
  import { Disposable } from '../shared/lifecycle';
3
18
  export declare class SpanModel extends Disposable {
4
19
  /**
@@ -1,6 +1,21 @@
1
- import { IKeyType, Nullable } from '../shared';
2
- import { IStyleData } from '../types/interfaces';
3
- import { ICellDataForSheetInterceptor } from './typedef';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { IKeyType, Nullable } from '../shared';
17
+ import type { IStyleData } from '../types/interfaces';
18
+ import type { ICellDataForSheetInterceptor } from './typedef';
4
19
  /**
5
20
  * Styles in a workbook, cells locate styles based on style IDs
6
21
  *
@@ -1,10 +1,26 @@
1
- import { IResources } from '../services/resource-manager/type';
2
- import { IObjectArrayPrimitiveType, IObjectMatrixPrimitiveType, Nullable } from '../shared';
3
- import { BooleanNumber, CellValueType } from '../types/enum';
4
- import { LocaleType } from '../types/enum/locale-type';
5
- import { IDocumentData } from '../types/interfaces';
6
- import { ICellCustomRender } from '../types/interfaces/i-cell-custom-render';
7
- import { IStyleData } from '../types/interfaces/i-style-data';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { IResources } from '../services/resource-manager/type';
17
+ import type { IObjectArrayPrimitiveType, IObjectMatrixPrimitiveType, Nullable } from '../shared';
18
+ import type { BooleanNumber } from '../types/enum';
19
+ import type { LocaleType } from '../types/enum/locale-type';
20
+ import type { IDocumentData } from '../types/interfaces';
21
+ import type { ICellCustomRender } from '../types/interfaces/i-cell-custom-render';
22
+ import type { IStyleData } from '../types/interfaces/i-style-data';
23
+ import { CellValueType } from '../types/enum';
8
24
  /**
9
25
  * Snapshot of a workbook.
10
26
  */
@@ -1,8 +1,24 @@
1
- import { Nullable } from '../shared';
2
- import { CellValueType, TextDirection, HorizontalAlign, VerticalAlign, WrapStrategy } from '../types/enum';
3
- import { IPaddingData, IStyleBase, IStyleData, ITextRotation, ITextStyle } from '../types/interfaces';
4
- import { ICellData, IRange, IUnitRange } from './typedef';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { CellValueType, TextDirection } from '../types/enum';
18
+ import type { IPaddingData, IStyleBase, IStyleData, ITextRotation, ITextStyle } from '../types/interfaces';
19
+ import type { ICellData, IRange, IUnitRange } from './typedef';
5
20
  import { DocumentDataModel } from '../docs';
21
+ import { HorizontalAlign, VerticalAlign, WrapStrategy } from '../types/enum';
6
22
  export interface IFontLocale {
7
23
  fontList: string[];
8
24
  defaultFontSize: number;
@@ -1,7 +1,22 @@
1
- import { Observable } from 'rxjs';
2
- import { Nullable } from '../shared';
3
- import { IStyleData } from '../types/interfaces';
4
- import { CustomData, IRangeType, IWorkbookData, IWorksheetData } from './typedef';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { Observable } from 'rxjs';
17
+ import type { Nullable } from '../shared';
18
+ import type { IStyleData } from '../types/interfaces';
19
+ import type { CustomData, IRangeType, IWorkbookData, IWorksheetData } from './typedef';
5
20
  import { UnitModel, UniverInstanceType } from '../common/unit';
6
21
  import { ILogService } from '../services/log/log.service';
7
22
  import { Styles } from './styles';
@@ -1,14 +1,32 @@
1
- import { IInterceptor } from '../common/interceptor';
2
- import { Nullable, ObjectMatrix } from '../shared';
3
- import { BooleanNumber, HorizontalAlign, TextDirection, VerticalAlign, WrapStrategy, CellValueType } from '../types/enum';
4
- import { IPaddingData, IStyleData, ITextRotation } from '../types/interfaces';
5
- import { Styles } from './styles';
6
- import { CustomData, ICellData, ICellDataForSheetInterceptor, ICellDataWithSpanAndDisplay, IFreeze, IRange, ISelectionCell, IWorksheetData, CellModeEnum } from './typedef';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { IInterceptor } from '../common/interceptor';
17
+ import type { Nullable } from '../shared';
18
+ import type { BooleanNumber, HorizontalAlign, TextDirection, VerticalAlign, WrapStrategy } from '../types/enum';
19
+ import type { IPaddingData, IStyleData, ITextRotation } from '../types/interfaces';
20
+ import type { Styles } from './styles';
21
+ import type { CustomData, ICellData, ICellDataForSheetInterceptor, ICellDataWithSpanAndDisplay, IFreeze, IRange, ISelectionCell, IWorksheetData } from './typedef';
7
22
  import { DocumentDataModel } from '../docs';
23
+ import { ObjectMatrix } from '../shared';
24
+ import { CellValueType } from '../types/enum';
8
25
  import { ColumnManager } from './column-manager';
9
26
  import { Range } from './range';
10
27
  import { RowManager } from './row-manager';
11
28
  import { SpanModel } from './span-model';
29
+ import { CellModeEnum } from './typedef';
12
30
  import { SheetViewModel } from './view-model';
13
31
  export interface IDocumentLayoutObject {
14
32
  documentModel: Nullable<DocumentDataModel>;
@@ -453,4 +471,4 @@ export interface ICell {
453
471
  * @returns pure text in this cell
454
472
  */
455
473
  export declare function extractPureTextFromCell(cell: Nullable<ICellData>): string;
456
- export declare function getOriginCellValue(cell: Nullable<ICellData>): Nullable<import('./typedef').CellValue>;
474
+ export declare function getOriginCellValue(cell: Nullable<ICellData>): Nullable<import("./typedef").CellValue>;
@@ -1,4 +1,19 @@
1
- import { IFontLocale } from './sheets/util';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { IFontLocale } from './sheets/util';
2
17
  import { LocaleService } from './services/locale/locale.service';
3
18
  import { Disposable } from './shared/lifecycle';
4
19
  export declare class Skeleton extends Disposable {
@@ -1,7 +1,23 @@
1
- import { Observable } from 'rxjs';
2
- import { Nullable } from '../shared';
3
- import { ISlideData, ISlidePage, PageType } from '../types/interfaces';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { Observable } from 'rxjs';
17
+ import type { Nullable } from '../shared';
18
+ import type { ISlideData, ISlidePage } from '../types/interfaces';
4
19
  import { UnitModel, UniverInstanceType } from '../common/unit';
20
+ import { PageType } from '../types/interfaces';
5
21
  export declare class SlideDataModel extends UnitModel<ISlideData, UniverInstanceType.UNIVER_SLIDE> {
6
22
  type: UniverInstanceType.UNIVER_SLIDE;
7
23
  private readonly _activePage$;
@@ -24,10 +40,10 @@ export declare class SlideDataModel extends UnitModel<ISlideData, UniverInstance
24
40
  getPageOrder(): string[] | undefined;
25
41
  getPage(pageId: string): ISlidePage | undefined;
26
42
  getElementsByPage(pageId: string): {
27
- [elementId: string]: import('..').IPageElement;
43
+ [elementId: string]: import("..").IPageElement;
28
44
  } | undefined;
29
- getElement(pageId: string, elementId: string): import('..').IPageElement | undefined;
30
- getPageSize(): import('..').ISize;
45
+ getElement(pageId: string, elementId: string): import("..").IPageElement | undefined;
46
+ getPageSize(): import("..").ISize;
31
47
  getBlankPage(): {
32
48
  id: string;
33
49
  pageType: PageType;
@@ -1,6 +1,22 @@
1
- import { Nullable } from '../../shared';
2
- import { IParagraphStyle, ITextStyle, NamedStyleType } from '../interfaces';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { IParagraphStyle, ITextStyle } from '../interfaces';
3
18
  import { BooleanNumber, HorizontalAlign, TextDirection, VerticalAlign, WrapStrategy } from '../enum';
19
+ import { NamedStyleType } from '../interfaces';
4
20
  /**
5
21
  * Used as an illegal range array return value
6
22
  */
@@ -1,3 +1,18 @@
1
- import { ISize } from '../../shared';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { ISize } from '../../shared';
2
17
  import { PaperType } from '../interfaces';
3
18
  export declare const PAGE_SIZE: Record<PaperType, Required<ISize>>;
@@ -1,8 +1,23 @@
1
- import { Nullable } from '../../shared';
2
- import { ICellDataForSheetInterceptor, ICellWithCoord } from '../../sheets/typedef';
3
- import { Workbook } from '../../sheets/workbook';
4
- import { Worksheet } from '../../sheets/worksheet';
5
- import { IStyleData } from './i-style-data';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { ICellDataForSheetInterceptor, ICellWithCoord } from '../../sheets/typedef';
18
+ import type { Workbook } from '../../sheets/workbook';
19
+ import type { Worksheet } from '../../sheets/worksheet';
20
+ import type { IStyleData } from './i-style-data';
6
21
  export interface ICellRenderContext {
7
22
  data: Nullable<ICellDataForSheetInterceptor>;
8
23
  style: Nullable<IStyleData>;
@@ -1,5 +1,20 @@
1
- import { DataValidationStatus } from '../enum/data-validation-status';
2
- import { IDataValidationRule } from './i-data-validation';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { DataValidationStatus } from '../enum/data-validation-status';
17
+ import type { IDataValidationRule } from './i-data-validation';
3
18
  export interface ICellValidationData {
4
19
  ruleId: string;
5
20
  validStatus: DataValidationStatus;
@@ -1,9 +1,24 @@
1
- import { IRange } from '../../sheets/typedef';
2
- import { DataValidationErrorStyle } from '../enum/data-validation-error-style';
3
- import { DataValidationImeMode } from '../enum/data-validation-ime-mode';
4
- import { DataValidationOperator } from '../enum/data-validation-operator';
5
- import { DataValidationRenderMode } from '../enum/data-validation-render-mode';
6
- import { DataValidationType } from '../enum/data-validation-type';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { IRange } from '../../sheets/typedef';
17
+ import type { DataValidationErrorStyle } from '../enum/data-validation-error-style';
18
+ import type { DataValidationImeMode } from '../enum/data-validation-ime-mode';
19
+ import type { DataValidationOperator } from '../enum/data-validation-operator';
20
+ import type { DataValidationRenderMode } from '../enum/data-validation-render-mode';
21
+ import type { DataValidationType } from '../enum/data-validation-type';
7
22
  export interface IDataValidationRuleBase {
8
23
  /**
9
24
  * data validation type
@@ -1,4 +1,19 @@
1
- import { ICustomDecoration, ICustomRange, IParagraph } from './i-document-data';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { ICustomDecoration, ICustomRange, IParagraph } from './i-document-data';
2
17
  export interface ICustomRangeForInterceptor extends ICustomRange {
3
18
  active?: boolean;
4
19
  show?: boolean;
@@ -1,8 +1,23 @@
1
- import { ISize } from '../../shared/shape';
2
- import { BooleanNumber, CellValueType, HorizontalAlign, LocaleType, TextDirection, VerticalAlign, WrapStrategy } from '../enum';
3
- import { IDrawingParam } from './i-drawing';
4
- import { IMention } from './i-mention';
5
- import { IColorStyle, IStyleBase } from './i-style-data';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { ISize } from '../../shared/shape';
17
+ import type { BooleanNumber, CellValueType, HorizontalAlign, LocaleType, TextDirection, VerticalAlign, WrapStrategy } from '../enum';
18
+ import type { IDrawingParam } from './i-drawing';
19
+ import type { IMention } from './i-mention';
20
+ import type { IColorStyle, IStyleBase } from './i-style-data';
6
21
  /**
7
22
  * Properties of document
8
23
  */
@@ -1,6 +1,21 @@
1
- import { IAbsoluteTransform, IGroupBaseBound } from '../../shared/shape';
2
- import { Nullable } from '../../shared/types';
3
- import { BooleanNumber } from '../enum/text-style';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { IAbsoluteTransform, IGroupBaseBound } from '../../shared/shape';
17
+ import type { Nullable } from '../../shared/types';
18
+ import type { BooleanNumber } from '../enum/text-style';
4
19
  /**
5
20
  * The layer type of Drawing, used to distinguish between forward, backward, front, and back
6
21
  */
@@ -102,3 +117,41 @@ export interface IDrawingParam extends IDrawingSearch {
102
117
  */
103
118
  groupBaseBound?: Nullable<IGroupBaseBound>;
104
119
  }
120
+ /**
121
+ * Describes a single group node's direct children in a group hierarchy.
122
+ */
123
+ export interface IDrawingGroupNestedIds {
124
+ /** The drawing ID of the group itself. */
125
+ drawingId: string;
126
+ /**
127
+ * The drawing IDs of the direct children of this group (both group and
128
+ * non-group children). Does not include deeply-nested descendants.
129
+ */
130
+ children?: string[];
131
+ }
132
+ /**
133
+ * A flattened representation of a nested group hierarchy, produced by a
134
+ * post-order DFS traversal so that every child always appears before its
135
+ * parent in the respective arrays.
136
+ */
137
+ export interface IDrawingGroupNestedParam {
138
+ /**
139
+ * A map from each group's drawingId to its {@link IDrawingGroupNestedIds}
140
+ * descriptor. Covers the root group and every nested sub-group. Look up
141
+ * any group's direct children in O(1) via `nestedIdRecord[groupId].children`.
142
+ */
143
+ nestedIdRecord: Record<string, IDrawingGroupNestedIds>;
144
+ /**
145
+ * All non-group (leaf) drawing params that belong anywhere in the group
146
+ * hierarchy. Post-order: a leaf always appears before the group that
147
+ * directly contains it.
148
+ */
149
+ flatChildren?: IDrawingParam[];
150
+ /**
151
+ * All group drawing params in the hierarchy (including the root group).
152
+ * Post-order: nested child groups appear before their parent group, so
153
+ * callers can safely iterate in order without dependency issues.
154
+ * The root group is always the last element.
155
+ */
156
+ groups: IDrawingParam[];
157
+ }
@@ -1,4 +1,19 @@
1
- import { MentionType } from '../enum/mention-type';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { MentionType } from '../enum/mention-type';
2
17
  export interface IDocMention extends IMention {
3
18
  id: string;
4
19
  }
@@ -1,4 +1,19 @@
1
- import { IDisposable } from '@wendellhu/redi';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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';
2
17
  export interface INeedCheckDisposable extends IDisposable {
3
18
  canDispose: () => boolean;
4
19
  }
@@ -1,4 +1,19 @@
1
- import { PlaceholderType } from '../enum/place-holder-type';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { PlaceholderType } from '../enum/place-holder-type';
2
17
  export interface IPlaceholder {
3
18
  type: PlaceholderType;
4
19
  index: number;