@univerjs/core 0.2.7 → 0.2.9

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 (112) hide show
  1. package/lib/cjs/index.js +8 -8
  2. package/lib/es/index.js +987 -185
  3. package/lib/types/common/equal.d.ts +15 -4
  4. package/lib/types/common/interceptor.d.ts +1 -2
  5. package/lib/types/{types/interfaces/i-freeze.d.ts → common/mixin.d.ts} +9 -5
  6. package/lib/types/common/unit.d.ts +2 -2
  7. package/lib/types/docs/data-model/document-data-model.d.ts +2 -4
  8. package/lib/types/docs/data-model/empty-snapshot.d.ts +0 -1
  9. package/lib/types/docs/data-model/json-x/json-x.d.ts +0 -1
  10. package/lib/types/docs/data-model/preset-list-type.d.ts +0 -1
  11. package/lib/types/docs/data-model/replacement.d.ts +0 -1
  12. package/lib/types/docs/data-model/text-x/action-iterator.d.ts +0 -1
  13. package/lib/types/docs/data-model/text-x/action-types.d.ts +0 -1
  14. package/lib/types/docs/data-model/text-x/apply-utils/common.d.ts +0 -1
  15. package/lib/types/docs/data-model/text-x/apply-utils/delete-apply.d.ts +0 -1
  16. package/lib/types/docs/data-model/text-x/apply-utils/insert-apply.d.ts +0 -1
  17. package/lib/types/docs/data-model/text-x/apply-utils/update-apply.d.ts +0 -1
  18. package/lib/types/docs/data-model/text-x/apply.d.ts +0 -1
  19. package/lib/types/docs/data-model/text-x/text-x.d.ts +0 -1
  20. package/lib/types/docs/data-model/text-x/transform-utils.d.ts +0 -1
  21. package/lib/types/docs/data-model/text-x/utils.d.ts +0 -1
  22. package/lib/types/index.d.ts +5 -2
  23. package/lib/types/observer/observable.d.ts +0 -1
  24. package/lib/types/services/__tests__/index.d.ts +0 -1
  25. package/lib/types/services/authz-io/authz-io-local.service.d.ts +2 -3
  26. package/lib/types/services/authz-io/type.d.ts +0 -1
  27. package/lib/types/services/command/command.service.d.ts +0 -1
  28. package/lib/types/services/config/config.service.d.ts +0 -1
  29. package/lib/types/services/context/context.service.d.ts +0 -1
  30. package/lib/types/services/error/error.service.d.ts +0 -1
  31. package/lib/types/services/instance/instance.service.d.ts +0 -1
  32. package/lib/types/services/lifecycle/lifecycle.d.ts +5 -1
  33. package/lib/types/services/lifecycle/lifecycle.service.d.ts +0 -1
  34. package/lib/types/services/locale/locale.service.d.ts +0 -1
  35. package/lib/types/services/log/log.service.d.ts +0 -1
  36. package/lib/types/services/permission/permission.service.d.ts +0 -1
  37. package/lib/types/services/permission/type.d.ts +2 -3
  38. package/lib/types/services/plugin/plugin-override.d.ts +0 -1
  39. package/lib/types/services/plugin/plugin.d.ts +0 -1
  40. package/lib/types/services/plugin/plugin.service.d.ts +0 -1
  41. package/lib/types/services/resource-loader/resource-loader.service.d.ts +3 -6
  42. package/lib/types/services/resource-loader/type.d.ts +4 -7
  43. package/lib/types/services/resource-manager/resource-manager.service.d.ts +4 -5
  44. package/lib/types/services/resource-manager/type.d.ts +9 -6
  45. package/lib/types/services/snapshot/__tests__/snapshot-mock.d.ts +1 -2
  46. package/lib/types/services/snapshot/snapshot-server.service.d.ts +0 -1
  47. package/lib/types/services/snapshot/snapshot-transform.d.ts +1 -2
  48. package/lib/types/services/snapshot/snapshot-utils.d.ts +1 -4
  49. package/lib/types/services/theme/theme.service.d.ts +0 -1
  50. package/lib/types/services/undoredo/undoredo.service.d.ts +1 -2
  51. package/lib/types/services/user-manager/const.d.ts +0 -1
  52. package/lib/types/shared/after-init-apply.d.ts +0 -1
  53. package/lib/types/shared/check-if-move.d.ts +1 -2
  54. package/lib/types/shared/clipboard.d.ts +0 -1
  55. package/lib/types/shared/color/color.d.ts +1 -2
  56. package/lib/types/shared/common.d.ts +2 -5
  57. package/lib/types/shared/compare.d.ts +0 -1
  58. package/lib/types/shared/doc-tool.d.ts +0 -1
  59. package/lib/types/shared/index.d.ts +1 -0
  60. package/lib/types/shared/lifecycle.d.ts +0 -1
  61. package/lib/types/shared/lru/lru-map.d.ts +0 -1
  62. package/lib/types/shared/numfmt.d.ts +2 -0
  63. package/lib/types/shared/object-matrix-query.d.ts +1 -2
  64. package/lib/types/shared/object-matrix.d.ts +7 -2
  65. package/lib/types/shared/range.d.ts +1 -2
  66. package/lib/types/shared/rectangle.d.ts +1 -2
  67. package/lib/types/shared/rxjs.d.ts +0 -1
  68. package/lib/types/shared/tools.d.ts +1 -3
  69. package/lib/types/shared/types.d.ts +4 -13
  70. package/lib/types/{types/interfaces/i-service-data.d.ts → sheets/__tests__/cell-data.spec.d.ts} +1 -2
  71. package/lib/types/sheets/__tests__/create-core-test-bed.d.ts +1 -2
  72. package/lib/types/sheets/column-manager.d.ts +2 -3
  73. package/lib/types/sheets/empty-snapshot.d.ts +1 -2
  74. package/lib/types/sheets/range.d.ts +2 -2
  75. package/lib/types/sheets/row-manager.d.ts +1 -2
  76. package/lib/types/sheets/sheet-snapshot-utils.d.ts +1 -2
  77. package/lib/types/sheets/styles.d.ts +2 -2
  78. package/lib/types/sheets/typedef.d.ts +451 -0
  79. package/lib/types/sheets/util.d.ts +3 -0
  80. package/lib/types/sheets/view-model.d.ts +2 -3
  81. package/lib/types/sheets/workbook.d.ts +13 -5
  82. package/lib/types/sheets/worksheet.d.ts +11 -2
  83. package/lib/types/slides/slide-model.d.ts +0 -2
  84. package/lib/types/types/const/const.d.ts +1 -1
  85. package/lib/types/types/enum/locale-type.d.ts +3 -1
  86. package/lib/types/types/enum/text-style.d.ts +1 -1
  87. package/lib/types/types/interfaces/i-cell-custom-render.d.ts +2 -3
  88. package/lib/types/types/interfaces/i-cell-validation-data.d.ts +0 -1
  89. package/lib/types/types/interfaces/i-data-validation.d.ts +1 -2
  90. package/lib/types/types/interfaces/i-document-data-interceptor.d.ts +0 -1
  91. package/lib/types/types/interfaces/i-document-data.d.ts +2 -5
  92. package/lib/types/types/interfaces/i-placeholder.d.ts +0 -1
  93. package/lib/types/types/interfaces/i-shape-properties.d.ts +0 -1
  94. package/lib/types/types/interfaces/i-slide-data.d.ts +5 -4
  95. package/lib/types/types/interfaces/i-style-data.d.ts +0 -1
  96. package/lib/types/types/interfaces/index.d.ts +0 -11
  97. package/lib/types/univer.d.ts +14 -3
  98. package/lib/umd/index.js +8 -8
  99. package/package.json +7 -6
  100. package/lib/types/common/type-util.d.ts +0 -16
  101. package/lib/types/common/type-utils.d.ts +0 -16
  102. package/lib/types/types/interfaces/i-cell-data.d.ts +0 -67
  103. package/lib/types/types/interfaces/i-column-data.d.ts +0 -15
  104. package/lib/types/types/interfaces/i-extra-model-data.d.ts +0 -27
  105. package/lib/types/types/interfaces/i-range.d.ts +0 -208
  106. package/lib/types/types/interfaces/i-row-data.d.ts +0 -27
  107. package/lib/types/types/interfaces/i-selection-data.d.ts +0 -59
  108. package/lib/types/types/interfaces/i-univer-data.d.ts +0 -14
  109. package/lib/types/types/interfaces/i-workbook-data.d.ts +0 -40
  110. package/lib/types/types/interfaces/i-worksheet-data.d.ts +0 -55
  111. package/lib/types/types/interfaces/i-worksheet-order-data.d.ts +0 -17
  112. /package/lib/types/{types/interfaces/__tests__/i-cell-data.spec.d.ts → services/__tests__/resources.spec.d.ts} +0 -0
@@ -1,16 +1,14 @@
1
1
  import { ISize } from '../../shared/shape';
2
2
  import { IKeyType, Nullable } from '../../shared/types';
3
+ import { IWorksheetData } from '../../sheets/typedef';
3
4
  import { LocaleType, ThemeColorType } from '../enum';
4
5
  import { ShapeType } from '../enum/prst-geom-type';
5
6
  import { ICustomBlock, IDocumentData, ILists, ITransformState } from './i-document-data';
6
- import { IExtraModelData } from './i-extra-model-data';
7
7
  import { IImageProperties } from './i-image-properties';
8
8
  import { IPlaceholder } from './i-placeholder';
9
9
  import { IShapeProperties } from './i-shape-properties';
10
10
  import { IColorStyle, IStyleBase, IStyleData } from './i-style-data';
11
- import { IWorksheetData } from './i-worksheet-data';
12
-
13
- export interface ISlideData extends IReferenceSource, IExtraModelData {
11
+ export interface ISlideData extends IReferenceSource {
14
12
  id: string;
15
13
  locale?: LocaleType;
16
14
  title: string;
@@ -97,11 +95,14 @@ export interface IPageElement {
97
95
  shape?: IShape;
98
96
  image?: IImage;
99
97
  richText?: IRichTextProps;
98
+ /** @deprecated */
100
99
  spreadsheet?: {
101
100
  worksheet: IWorksheetData;
102
101
  styles: IKeyType<Nullable<IStyleData>>;
103
102
  };
103
+ /** @deprecated */
104
104
  document?: IDocumentData;
105
+ /** @deprecated */
105
106
  slide?: ISlideData;
106
107
  customBlock?: ICustomBlock;
107
108
  }
@@ -2,7 +2,6 @@ import { Nullable } from '../../shared/types';
2
2
  import { BorderStyleTypes } from '../enum/border-style-types';
3
3
  import { BaselineOffset, BooleanNumber, HorizontalAlign, TextDecoration, TextDirection, VerticalAlign, WrapStrategy } from '../enum/text-style';
4
4
  import { ThemeColorType } from '../enum/theme-color-type';
5
-
6
5
  /**
7
6
  * Properties of text decoration
8
7
  */
@@ -13,21 +13,10 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- export * from './i-cell-data';
17
- export * from './i-column-data';
18
16
  export * from './i-document-data';
19
17
  export * from './i-document-data-interceptor';
20
- export * from './i-freeze';
21
18
  export * from './i-image-properties';
22
19
  export * from './i-placeholder';
23
- export * from './i-range';
24
- export * from './i-row-data';
25
- export * from './i-selection-data';
26
- export * from './i-service-data';
27
20
  export * from './i-shape-properties';
28
21
  export * from './i-slide-data';
29
22
  export * from './i-style-data';
30
- export * from './i-univer-data';
31
- export * from './i-workbook-data';
32
- export * from './i-worksheet-data';
33
- export * from './i-worksheet-order-data';
@@ -1,12 +1,23 @@
1
1
  import { Injector } from './common/di';
2
2
  import { DocumentDataModel } from './docs/data-model/document-data-model';
3
+ import { LogLevel } from './services/log/log.service';
4
+ import { IStyleSheet } from './services/theme/theme.service';
3
5
  import { Workbook } from './sheets/workbook';
4
6
  import { SlideDataModel } from './slides/slide-model';
5
7
  import { LocaleType } from './types/enum/locale-type';
6
- import { IDocumentData, ISlideData, IUniverData, IWorkbookData } from './types/interfaces';
8
+ import { IDocumentData, ISlideData } from './types/interfaces';
7
9
  import { UnitModel, UnitType } from './common/unit';
8
10
  import { Plugin, PluginCtor } from './services/plugin/plugin';
9
-
11
+ import { DependencyOverride } from './services/plugin/plugin-override';
12
+ import { ILocales } from './shared';
13
+ import { IWorkbookData } from './sheets/typedef';
14
+ export interface IUniverConfig {
15
+ theme: IStyleSheet;
16
+ locale: LocaleType;
17
+ locales: ILocales;
18
+ logLevel: LogLevel;
19
+ override?: DependencyOverride;
20
+ }
10
21
  export declare class Univer {
11
22
  private _startedTypes;
12
23
  private _injector;
@@ -17,7 +28,7 @@ export declare class Univer {
17
28
  * @param config Configuration data for Univer
18
29
  * @param parentInjector An optional parent injector of the Univer injector. For more information, see https://redi.wendell.fun/docs/hierarchy.
19
30
  */
20
- constructor(config?: Partial<IUniverData>, parentInjector?: Injector);
31
+ constructor(config?: Partial<IUniverConfig>, parentInjector?: Injector);
21
32
  __getInjector(): Injector;
22
33
  dispose(): void;
23
34
  setLocale(locale: LocaleType): void;