@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,2 +1,17 @@
1
- import { default as AsyncLock } from 'async-lock';
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 AsyncLock from 'async-lock';
2
17
  export { AsyncLock };
@@ -1,5 +1,21 @@
1
- import { Dependency, DependencyIdentifier, Injector } from '@wendellhu/redi';
2
- export * 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 { Dependency, DependencyIdentifier, Injector } from '@wendellhu/redi';
17
+ export { createIdentifier, forwardRef, Inject, Injector, InjectSelf, isAsyncDependencyItem, isAsyncHook, isClassDependencyItem, isCtor, isDisposable, isFactoryDependencyItem, isValueDependencyItem, LookUp, Many, Optional, Quantity, RediError, Self, setDependencies, SkipSelf, WithNew, } from '@wendellhu/redi';
18
+ export type { AsyncDependencyItem, AsyncHook, ClassDependencyItem, Ctor, Dependency, DependencyIdentifier, DependencyItem, DependencyPair, FactoryDependencyItem, IAccessor, IdentifierDecorator, IDisposable, SyncDependencyItem, ValueDependencyItem, } from '@wendellhu/redi';
3
19
  /**
4
20
  * Register the dependencies to the injector.
5
21
  * @param injector The injector to register the dependencies.
@@ -1,4 +1,19 @@
1
- import { Nullable } from '../shared/types';
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/types';
2
17
  export type InterceptorHandler<M = unknown, C = unknown> = (value: Nullable<M>, context: C, next: (value: Nullable<M>) => Nullable<M>) => Nullable<M>;
3
18
  export declare enum InterceptorEffectEnum {
4
19
  Style = 1,// 1<< 0
@@ -1,3 +1,18 @@
1
- import { RGBColorType } from './utils';
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 { RGBColorType } from './utils';
2
17
  export declare function stringToRgb(color: string): RGBColorType;
3
18
  export declare function invertColorByHSL(color: RGBColorType): RGBColorType;
@@ -1,4 +1,19 @@
1
- import { RGBColorType } from './utils';
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 { RGBColorType } from './utils';
2
17
  /**
3
18
  * Invert a color by RGB matrix method.
4
19
  * @param color The color to invert. Note that this color is already normalized.
@@ -1,5 +1,20 @@
1
- import { UniverType } from '@univerjs/protocol';
2
- import { Observable } from 'rxjs';
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 { UniverType } from '@univerjs/protocol';
17
+ import type { Observable } from 'rxjs';
3
18
  import { Disposable } from '../shared/lifecycle';
4
19
  export { UniverType as UniverInstanceType } from '@univerjs/protocol';
5
20
  export type UnitType = UniverType | number;
@@ -1,7 +1,22 @@
1
- import { Nullable } from '../../shared';
2
- import { IDocumentBody, IDocumentData, IDocumentRenderConfig, IDocumentStyle, IDrawings, IListData } from '../../types/interfaces/i-document-data';
3
- import { IPaddingData } from '../../types/interfaces/i-style-data';
4
- import { JSONXActions } from './json-x/json-x';
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 { IDocumentBody, IDocumentData, IDocumentRenderConfig, IDocumentStyle, IDrawings, IListData } from '../../types/interfaces/i-document-data';
18
+ import type { IPaddingData } from '../../types/interfaces/i-style-data';
19
+ import type { JSONXActions } from './json-x/json-x';
5
20
  import { BehaviorSubject } from 'rxjs';
6
21
  import { UnitModel, UniverInstanceType } from '../../common/unit';
7
22
  import { SliceBodyType } from './text-x/utils';
@@ -19,7 +34,7 @@ declare class DocumentDataModelSimple extends UnitModel<IDocumentData, UniverIns
19
34
  type: UniverInstanceType.UNIVER_DOC;
20
35
  getUnitId(): string;
21
36
  protected readonly _name$: BehaviorSubject<string>;
22
- name$: import('rxjs').Observable<string>;
37
+ name$: import("rxjs").Observable<string>;
23
38
  protected snapshot: IDocumentData;
24
39
  constructor(snapshot: Partial<IDocumentData>);
25
40
  getRev(): number;
@@ -28,7 +43,7 @@ declare class DocumentDataModelSimple extends UnitModel<IDocumentData, UniverIns
28
43
  setName(name: string): void;
29
44
  get drawings(): IDrawings | undefined;
30
45
  get documentStyle(): IDocumentStyle;
31
- get lists(): import('../..').ILists | undefined;
46
+ get lists(): import("../..").ILists | undefined;
32
47
  get zoomRatio(): number;
33
48
  resetDrawing(drawings: IDrawings, drawingsOrder: string[]): void;
34
49
  getBody(): IDocumentBody | undefined;
@@ -55,9 +70,9 @@ export declare class DocumentDataModel extends DocumentDataModelSimple {
55
70
  dispose(): void;
56
71
  getDrawings(): IDrawings | undefined;
57
72
  getDrawingsOrder(): string[] | undefined;
58
- getCustomRanges(): import('../..').ICustomRange<Record<string, any>>[] | undefined;
59
- getCustomDecorations(): import('../..').ICustomDecoration[] | undefined;
60
- getSettings(): import('../..').IDocumentSettings | undefined;
73
+ getCustomRanges(): import("../..").ICustomRange<Record<string, any>>[] | undefined;
74
+ getCustomDecorations(): import("../..").ICustomDecoration[] | undefined;
75
+ getSettings(): import("../..").IDocumentSettings | undefined;
61
76
  reset(snapshot: Partial<IDocumentData>): void;
62
77
  getSelfOrHeaderFooterModel(segmentId?: string): DocumentDataModel;
63
78
  getUnitId(): string;
@@ -1,3 +1,18 @@
1
- import { IDocumentData } 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 { IDocumentData } from '../../types/interfaces';
2
17
  import { LocaleType } from '../../types/enum/locale-type';
3
18
  export declare function getEmptySnapshot(unitID?: string, locale?: LocaleType, title?: string): IDocumentData;
@@ -1,7 +1,22 @@
1
- import { Doc, JSONOp, Path } from 'ot-json1';
2
- import { IDocumentBody, IDocumentData } from '../../../types/interfaces';
3
- import { TextXAction } from '../text-x/action-types';
4
- import { TPriority } from '../text-x/text-x';
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 { Doc, JSONOp, Path } from 'ot-json1';
17
+ import type { IDocumentBody, IDocumentData } from '../../../types/interfaces';
18
+ import type { TextXAction } from '../text-x/action-types';
19
+ import type { TPriority } from '../text-x/text-x';
5
20
  import * as json1 from 'ot-json1';
6
21
  export interface ISubType {
7
22
  name: string;
@@ -1,4 +1,19 @@
1
- import { IListData } from '../../types/interfaces/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 { IListData } from '../../types/interfaces/i-document-data';
2
17
  export declare enum QuickListType {
3
18
  ORDER_LIST_QUICK_1 = "1.",
4
19
  ORDER_LIST_QUICK_2 = "a)",
@@ -1,2 +1,17 @@
1
- import { IDocumentBody } from '../../types/interfaces/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 { IDocumentBody } from '../../types/interfaces/i-document-data';
2
17
  export declare function replaceInDocumentBody(body: IDocumentBody, query: string, target: string, caseSensitive: boolean): IDocumentBody;
@@ -1,6 +1,22 @@
1
- import { Nullable } from '../../shared';
2
- import { BaselineOffset, HorizontalAlign, TextDecoration, TextDirection, BooleanNumber } from '../../types/enum';
3
- import { IBorderData, IColorStyle, IDocumentBody, IDocumentData, INumberUnit, IParagraphBorder, IParagraphStyle, IShading, ITabStop, ITextDecoration, ITextStyle, NamedStyleType, SpacingRule } 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 { Nullable } from '../../shared';
17
+ import type { BaselineOffset, HorizontalAlign, TextDecoration, TextDirection } from '../../types/enum';
18
+ import type { IBorderData, IColorStyle, IDocumentBody, IDocumentData, INumberUnit, IParagraphBorder, IParagraphStyle, IShading, ITabStop, ITextDecoration, ITextStyle, NamedStyleType, SpacingRule } from '../../types/interfaces';
19
+ import { BooleanNumber } from '../../types/enum';
4
20
  export declare function normalizeBody(body: IDocumentBody): IDocumentBody;
5
21
  export declare function normalizeData(data: IDocumentData): IDocumentData;
6
22
  /**
@@ -1154,7 +1170,7 @@ export declare class RichTextValue {
1154
1170
  * const bullet = richText.getParagraphBullet();
1155
1171
  * ```
1156
1172
  */
1157
- getParagraphBullet(): import('../..').IBullet | undefined;
1173
+ getParagraphBullet(): import("../..").IBullet | undefined;
1158
1174
  /**
1159
1175
  * Gets the paragraphs of the current RichTextValue instance
1160
1176
  * @returns {RichTextValue[]} The paragraphs of the current RichTextValue instance
@@ -1189,7 +1205,7 @@ export declare class RichTextValue {
1189
1205
  * const links = richText.getLinks();
1190
1206
  * ```
1191
1207
  */
1192
- getLinks(): import('../..').ICustomRange<Record<string, any>>[];
1208
+ getLinks(): import("../..").ICustomRange<Record<string, any>>[];
1193
1209
  /**
1194
1210
  * Gets the data of the current RichTextValue instance
1195
1211
  * @returns {IDocumentData} The data of the current RichTextValue instance
@@ -1,4 +1,20 @@
1
- import { TextXAction, TextXActionType } from './action-types';
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 { TextXAction } from './action-types';
17
+ import { TextXActionType } from './action-types';
2
18
  export declare class ActionIterator {
3
19
  private _actions;
4
20
  private _index;
@@ -1,5 +1,20 @@
1
- import { UpdateDocsAttributeType } from '../../../shared/command-enum';
2
- import { IDocumentBody } from '../../../types/interfaces/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 { UpdateDocsAttributeType } from '../../../shared/command-enum';
17
+ import type { IDocumentBody } from '../../../types/interfaces/i-document-data';
3
18
  export declare enum TextXActionType {
4
19
  RETAIN = "r",
5
20
  INSERT = "i",
@@ -1,4 +1,19 @@
1
- import { ICustomBlock, ICustomDecoration, ICustomRange, ICustomTable, IDocumentBody, IParagraph, ISectionBreak, ITextRun } 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 { ICustomBlock, ICustomDecoration, ICustomRange, ICustomTable, IDocumentBody, IParagraph, ISectionBreak, ITextRun } from '../../../../types/interfaces';
2
17
  export declare function normalizeTextRuns(textRuns: ITextRun[], reserveEmptyTextRun?: boolean): ITextRun[];
3
18
  /**
4
19
  * Inserting styled text content into the current document model.
@@ -1,2 +1,17 @@
1
- import { IDocumentBody } 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 { IDocumentBody } from '../../../../types/interfaces';
2
17
  export declare function updateAttributeByDelete(body: IDocumentBody, textLength: number, currentIndex: number): IDocumentBody;
@@ -1,2 +1,17 @@
1
- import { IDocumentBody } 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 { IDocumentBody } from '../../../../types/interfaces';
2
17
  export declare function updateAttributeByInsert(body: IDocumentBody, insertBody: IDocumentBody, textLength: number, currentIndex: number): void;
@@ -1,4 +1,19 @@
1
- import { IDocumentBody, ITextRun } 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 { IDocumentBody, ITextRun } from '../../../../types/interfaces';
2
17
  import { UpdateDocsAttributeType } from '../../../../shared';
3
18
  export declare function updateAttribute(body: IDocumentBody, updateBody: IDocumentBody, textLength: number, currentIndex: number, coverType: UpdateDocsAttributeType): IDocumentBody;
4
19
  export declare function coverTextRuns(updateDataTextRuns: ITextRun[], originTextRuns: ITextRun[], coverType: UpdateDocsAttributeType): ITextRun[];
@@ -1,3 +1,18 @@
1
- import { IDocumentBody } from '../../../types/interfaces';
2
- import { TextXAction } from './action-types';
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 { IDocumentBody } from '../../../types/interfaces';
17
+ import type { TextXAction } from './action-types';
3
18
  export declare function textXApply(doc: IDocumentBody, actions: TextXAction[]): IDocumentBody;
@@ -1,5 +1,20 @@
1
- import { ITextRange } from '../../../../sheets/typedef';
2
- import { DocumentDataModel } from '../../document-data-model';
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 { ITextRange } from '../../../../sheets/typedef';
17
+ import type { DocumentDataModel } from '../../document-data-model';
3
18
  import { CustomDecorationType } from '../../../../types/interfaces';
4
19
  import { TextX } from '../text-x';
5
20
  interface IAddCustomDecorationParam {
@@ -1,5 +1,20 @@
1
- import { ITextRange } from '../../../../sheets/typedef';
2
- import { CustomRangeType, ICustomRange, IDocumentBody } 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 { ITextRange } from '../../../../sheets/typedef';
17
+ import type { CustomRangeType, ICustomRange, IDocumentBody } from '../../../../types/interfaces';
3
18
  /**
4
19
  * Check if two ranges intersect
5
20
  * @param line1Start - The start of the first range
@@ -1,7 +1,22 @@
1
- import { ITextRange, ITextRangeParam } from '../../../../sheets/typedef';
2
- import { IDocumentBody } from '../../../../types/interfaces';
3
- import { DocumentDataModel } from '../../document-data-model';
4
- import { JSONXActions } from '../../json-x/json-x';
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 { ITextRange, ITextRangeParam } from '../../../../sheets/typedef';
17
+ import type { IDocumentBody } from '../../../../types/interfaces';
18
+ import type { DocumentDataModel } from '../../document-data-model';
19
+ import type { JSONXActions } from '../../json-x/json-x';
5
20
  export interface IAddDrawingParam {
6
21
  selection: ITextRangeParam;
7
22
  documentDataModel: DocumentDataModel;
@@ -1,3 +1,18 @@
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
+ */
1
16
  import { addCustomDecorationTextX, deleteCustomDecorationTextX } from './custom-decoration';
2
17
  import { copyCustomRange, getCustomRangesInterestsWithSelection, isIntersecting } from './custom-range';
3
18
  import { getParagraphsInRange, getParagraphsInRanges, isSegmentIntersects, makeSelection, normalizeSelection, transformParagraphs } from './selection';
@@ -15,11 +30,11 @@ export declare class BuildTextUtils {
15
30
  delete: typeof deleteCustomDecorationTextX;
16
31
  };
17
32
  static selection: {
18
- replace: (params: import('./text-x-utils').IReplaceSelectionTextXParams) => false | import('../text-x').TextX;
33
+ replace: (params: import("./text-x-utils").IReplaceSelectionTextXParams) => false | import("../text-x").TextX;
19
34
  makeSelection: typeof makeSelection;
20
35
  normalizeSelection: typeof normalizeSelection;
21
36
  delete: typeof deleteSelectionTextX;
22
- replaceTextRuns: (params: import('./text-x-utils').IReplaceSelectionTextRunsParams) => false | import('../text-x').TextX;
37
+ replaceTextRuns: (params: import("./text-x-utils").IReplaceSelectionTextRunsParams) => false | import("../text-x").TextX;
23
38
  retain: typeof retainSelectionTextX;
24
39
  };
25
40
  static range: {
@@ -29,18 +44,18 @@ export declare class BuildTextUtils {
29
44
  };
30
45
  static transform: {
31
46
  getPlainText: (dataStream: string) => string;
32
- fromPlainText: (text: string) => import('../../../..').IDocumentBody;
47
+ fromPlainText: (text: string) => import("../../../..").IDocumentBody;
33
48
  isEmptyDocument: (dataStream?: string) => boolean;
34
49
  };
35
50
  static paragraph: {
36
51
  bullet: {
37
- set: (params: import('./paragraph').ISetParagraphBulletParams) => false | import('../text-x').TextX;
38
- switch: (params: import('./paragraph').ISwitchParagraphBulletParams) => import('../text-x').TextX;
39
- toggleChecklist: (params: import('./paragraph').IToggleChecklistParagraphParams) => false | import('../text-x').TextX;
40
- changeNestLevel: (params: import('./paragraph').IChangeParagraphBulletNestLevelParams) => import('../text-x').TextX;
52
+ set: (params: import("./paragraph").ISetParagraphBulletParams) => false | import("../text-x").TextX;
53
+ switch: (params: import("./paragraph").ISwitchParagraphBulletParams) => import("../text-x").TextX;
54
+ toggleChecklist: (params: import("./paragraph").IToggleChecklistParagraphParams) => false | import("../text-x").TextX;
55
+ changeNestLevel: (params: import("./paragraph").IChangeParagraphBulletNestLevelParams) => import("../text-x").TextX;
41
56
  };
42
57
  style: {
43
- set: (params: import('./paragraph').ISetParagraphStyleParams) => import('../text-x').TextX;
58
+ set: (params: import("./paragraph").ISetParagraphStyleParams) => import("../text-x").TextX;
44
59
  };
45
60
  util: {
46
61
  transform: typeof transformParagraphs;
@@ -49,7 +64,7 @@ export declare class BuildTextUtils {
49
64
  };
50
65
  };
51
66
  static drawing: {
52
- add: (param: import('./drawings').IAddDrawingParam) => false | import('ot-json1').JSONOp;
67
+ add: (param: import("./drawings").IAddDrawingParam) => false | import("ot-json1").JSONOp;
53
68
  };
54
69
  }
55
70
  export type { IAddCustomRangeTextXParam, IDeleteCustomRangeParam, IReplaceSelectionTextXParams } from './text-x-utils';