@univerjs/core 0.1.8 → 0.1.10

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.
@@ -18,7 +18,8 @@ export declare enum DataStreamTreeNodeType {
18
18
  SECTION_BREAK = 1,// \n 章节
19
19
  TABLE = 2,
20
20
  TABLE_ROW = 3,
21
- TABLE_CELL = 4
21
+ TABLE_CELL = 4,
22
+ CUSTOM_BLOCK = 5
22
23
  }
23
24
  export declare enum DataStreamTreeTokenType {
24
25
  PARAGRAPH = "\r",// 段落
@@ -59,6 +59,7 @@ export { type IStyleSheet, ThemeService } from './services/theme/theme.service';
59
59
  export { type IUndoRedoCommandInfos, type IUndoRedoCommandInfosByInterceptor, type IUndoRedoItem, IUndoRedoService, type IUndoRedoStatus, LocalUndoRedoService, RedoCommand, UndoCommand, RedoCommandId, UndoCommandId, } from './services/undoredo/undoredo.service';
60
60
  export * from './shared';
61
61
  export { fromCallback } from './shared/rxjs';
62
+ export { UserManagerService } from './services/user-manager/user-manager.service';
62
63
  export type { IComposeInterceptors, IInterceptor, InterceptorHandler } from './common/interceptor';
63
64
  export { composeInterceptors, createInterceptorKey, InterceptorManager } from './common/interceptor';
64
65
  export { normalizeTextRuns } from './docs/data-model/apply-utils/common';
@@ -12,6 +12,7 @@ export interface IFloatingObjectManagerSearchItemParam extends IFloatingObjectMa
12
12
  floatingObjectId: string;
13
13
  }
14
14
  export interface IFloatingObjectManagerParam extends IFloatingObjectManagerSearchItemParam {
15
+ behindText?: boolean;
15
16
  floatingObject: ITransformState;
16
17
  }
17
18
  export type FloatingObjects = Map<string, ITransformState>;
@@ -26,8 +27,7 @@ export interface IFloatingObjectManagerService {
26
27
  clear(search: IFloatingObjectManagerSearchParam): void;
27
28
  addOrUpdate(insertParam: IFloatingObjectManagerParam): void;
28
29
  remove(searchItem: IFloatingObjectManagerSearchItemParam): void;
29
- BatchAddOrUpdate(insertParam: IFloatingObjectManagerParam[]): void;
30
- remove(searchItem: IFloatingObjectManagerSearchItemParam): void;
30
+ batchAddOrUpdate(insertParam: IFloatingObjectManagerParam[]): void;
31
31
  pluginUpdateRefresh(searchObjects: IFloatingObjectManagerParam[]): void;
32
32
  }
33
33
  /**
@@ -70,7 +70,7 @@ export declare class FloatingObjectManagerService implements IDisposable, IFloat
70
70
  dispose(): void;
71
71
  clear(search: IFloatingObjectManagerSearchParam): void;
72
72
  addOrUpdate(insertParam: IFloatingObjectManagerParam): void;
73
- BatchAddOrUpdate(insertParams: IFloatingObjectManagerParam[]): void;
73
+ batchAddOrUpdate(insertParams: IFloatingObjectManagerParam[]): void;
74
74
  remove(searchItem: IFloatingObjectManagerSearchItemParam): void;
75
75
  pluginUpdateRefresh(updateObjects: IFloatingObjectManagerParam[]): void;
76
76
  private _getFloatingObjects;
@@ -0,0 +1,16 @@
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
+ export {};
@@ -1,8 +1,9 @@
1
- import { Dependency, DependencyItem, IdentifierDecorator } from '@wendellhu/redi';
1
+ import { Dependency, DependencyIdentifier, DependencyItem } from '@wendellhu/redi';
2
2
 
3
+ export type NullableDependencyPair<T> = [DependencyIdentifier<T>, DependencyItem<T> | null];
3
4
  /**
4
- * Overrides the dependencies definited in the plugin. Only dependencies that are identified by `IdentifierDecorator` can be overridden.
5
+ * Overrides the dependencies defined in the plugin. Only dependencies that are identified by `IdentifierDecorator` can be overridden.
5
6
  * If you override a dependency with `null`, the original dependency will be removed.
6
7
  */
7
- export type DependencyOverride = [identifier: IdentifierDecorator<any>, DependencyItem<any> | null][];
8
+ export type DependencyOverride = NullableDependencyPair<any>[];
8
9
  export declare function mergeOverrideWithDependencies(dependencies: Dependency[], override?: DependencyOverride): Dependency[];
@@ -0,0 +1,16 @@
1
+ import { IUser } from '@univerjs/protocol';
2
+
3
+ export declare class UserManagerService {
4
+ private _model;
5
+ private _userChange$;
6
+ userChange$: import('rxjs').Observable<{
7
+ type: 'add' | 'delete';
8
+ user: IUser;
9
+ } | {
10
+ type: 'clear';
11
+ }>;
12
+ addUser(user: IUser): void;
13
+ getUser(userId: string, callBack?: () => void): IUser | undefined;
14
+ delete(userId: string): void;
15
+ clear(): void;
16
+ }
@@ -0,0 +1,3 @@
1
+ import { ICommandService } from '../services/command/command.service';
2
+
3
+ export declare const afterInitApply: (commandService: ICommandService) => Promise<void>;
@@ -39,3 +39,4 @@ export * from './debounce';
39
39
  export * from './clipboard';
40
40
  export { queryObjectMatrix } from './object-matrix-query';
41
41
  export { moveRangeByOffset } from './range';
42
+ export { afterInitApply } from './after-init-apply';
@@ -409,8 +409,8 @@ export declare enum PositionedObjectLayoutType {
409
409
  */
410
410
  export interface IObjectTransform {
411
411
  size: ISize;
412
- positionH: ObjectPositionH;
413
- positionV: ObjectPositionV;
412
+ positionH: IObjectPositionH;
413
+ positionV: IObjectPositionV;
414
414
  angle: number;
415
415
  }
416
416
  /**
@@ -609,37 +609,37 @@ export interface INumberUnit {
609
609
  v: number;
610
610
  u: NumberUnitType;
611
611
  }
612
- export interface ObjectPositionH {
612
+ export interface IObjectPositionH {
613
613
  relativeFrom: ObjectRelativeFromH;
614
614
  align?: AlignTypeH;
615
615
  posOffset?: number;
616
616
  percent?: number;
617
617
  }
618
- export interface ObjectPositionV {
618
+ export interface IObjectPositionV {
619
619
  relativeFrom: ObjectRelativeFromV;
620
620
  align?: AlignTypeV;
621
621
  posOffset?: number;
622
622
  percent?: number;
623
623
  }
624
624
  export declare enum ObjectRelativeFromH {
625
- CHARACTER = 0,
625
+ PAGE = 0,
626
626
  COLUMN = 1,
627
- INSIDE_MARGIN = 2,
628
- LEFT_MARGIN = 3,
629
- MARGIN = 4,
627
+ CHARACTER = 2,
628
+ MARGIN = 3,
629
+ INSIDE_MARGIN = 4,
630
630
  OUTSIDE_MARGIN = 5,
631
- PAGE = 6,
631
+ LEFT_MARGIN = 6,
632
632
  RIGHT_MARGIN = 7
633
633
  }
634
634
  export declare enum ObjectRelativeFromV {
635
- BOTTOM_MARGIN = 0,
636
- INSIDE_MARGIN = 1,
635
+ PAGE = 0,
636
+ PARAGRAPH = 1,
637
637
  LINE = 2,
638
638
  MARGIN = 3,
639
- OUTSIDE_MARGIN = 4,
640
- PAGE = 5,
641
- PARAGRAPH = 6,
642
- TOP_MARGIN = 7
639
+ TOP_MARGIN = 4,
640
+ BOTTOM_MARGIN = 5,
641
+ INSIDE_MARGIN = 6,
642
+ OUTSIDE_MARGIN = 7
643
643
  }
644
644
  export declare enum NumberUnitType {
645
645
  POINT = 0,