@univerjs/docs 0.1.4 → 0.1.6

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 (35) hide show
  1. package/lib/types/basics/component-tools.d.ts +3 -17
  2. package/lib/types/basics/retain-delete-params.d.ts +2 -16
  3. package/lib/types/commands/commands/__tests__/create-command-test-bed.d.ts +10 -25
  4. package/lib/types/commands/commands/__tests__/mock-text-selection-render-manager.d.ts +5 -19
  5. package/lib/types/commands/commands/break-line.command.d.ts +2 -16
  6. package/lib/types/commands/commands/clipboard.inner.command.d.ts +3 -17
  7. package/lib/types/commands/commands/core-editing.command.d.ts +3 -17
  8. package/lib/types/commands/commands/delete.command.d.ts +3 -17
  9. package/lib/types/commands/commands/ime-input.command.d.ts +2 -16
  10. package/lib/types/commands/commands/inline-format.command.d.ts +2 -16
  11. package/lib/types/commands/commands/insert-floating-object.command.d.ts +2 -16
  12. package/lib/types/commands/commands/list.command.d.ts +3 -18
  13. package/lib/types/commands/commands/paragraph-align.command.d.ts +2 -17
  14. package/lib/types/commands/commands/remove-floating-object.command.d.ts +2 -16
  15. package/lib/types/commands/commands/replace-content.command.d.ts +3 -17
  16. package/lib/types/commands/commands/set-doc-zoom-ratio.command.d.ts +2 -16
  17. package/lib/types/commands/commands/set-floating-object-transform.command.d.ts +2 -16
  18. package/lib/types/commands/mutations/core-editing.mutation.d.ts +3 -17
  19. package/lib/types/commands/mutations/insert-floating-object.mutation.d.ts +3 -17
  20. package/lib/types/commands/mutations/remove-floating-object.mutation.d.ts +3 -17
  21. package/lib/types/commands/mutations/set-floating-object.mutation.d.ts +3 -17
  22. package/lib/types/commands/operations/cursor.operation.d.ts +2 -16
  23. package/lib/types/commands/operations/select-all.operation.d.ts +2 -16
  24. package/lib/types/commands/operations/set-doc-zoom-ratio.operation.d.ts +3 -17
  25. package/lib/types/commands/operations/text-selection.operation.d.ts +3 -17
  26. package/lib/types/controllers/ime-input.controller.d.ts +4 -18
  27. package/lib/types/controllers/move-cursor.controller.d.ts +4 -18
  28. package/lib/types/controllers/normal-input.controller.d.ts +3 -17
  29. package/lib/types/doc-plugin.d.ts +2 -16
  30. package/lib/types/services/doc-skeleton-manager.service.d.ts +5 -20
  31. package/lib/types/services/doc-state-change-manager.service.d.ts +4 -19
  32. package/lib/types/services/doc-view-model-manager.service.d.ts +3 -18
  33. package/lib/types/services/ime-input-manager.service.d.ts +5 -19
  34. package/lib/types/services/text-selection-manager.service.d.ts +4 -20
  35. package/package.json +8 -9
@@ -1,20 +1,6 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IUniverInstanceService, Nullable } from '@univerjs/core';
17
- import type { Documents, Engine, IRenderManagerService, Scene } from '@univerjs/engine-render';
1
+ import { Documents, Engine, IRenderManagerService, Scene } from '@univerjs/engine-render';
2
+ import { IUniverInstanceService, Nullable } from '@univerjs/core';
3
+
18
4
  export interface IDocObjectParam {
19
5
  document: Documents;
20
6
  scene: Scene;
@@ -1,17 +1,3 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { type IDeleteAction, type IRetainAction, type ITextRange } from '@univerjs/core';
1
+ import { IDeleteAction, IRetainAction, ITextRange } from '@univerjs/core';
2
+
17
3
  export declare function getRetainAndDeleteFromReplace(range: ITextRange, segmentId?: string, memoryCursor?: number): Array<IRetainAction | IDeleteAction>;
@@ -1,30 +1,15 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IDocumentData } from '@univerjs/core';
17
- import { Univer } from '@univerjs/core';
18
- import type { Dependency } from '@wendellhu/redi';
1
+ import { Dependency } from '@wendellhu/redi';
2
+ import { IDocumentData, Univer } from '@univerjs/core';
3
+
19
4
  export declare function createCommandTestBed(workbookConfig?: IDocumentData, dependencies?: Dependency[]): {
20
5
  univer: Univer;
21
6
  get: {
22
- <T>(id: import("@wendellhu/redi").DependencyIdentifier<T>, lookUp?: import("@wendellhu/redi").LookUp | undefined): T;
23
- <T_1>(id: import("@wendellhu/redi").DependencyIdentifier<T_1>, quantity: import("@wendellhu/redi").Quantity.MANY, lookUp?: import("@wendellhu/redi").LookUp | undefined): T_1[];
24
- <T_2>(id: import("@wendellhu/redi").DependencyIdentifier<T_2>, quantity: import("@wendellhu/redi").Quantity.OPTIONAL, lookUp?: import("@wendellhu/redi").LookUp | undefined): T_2 | null;
25
- <T_3>(id: import("@wendellhu/redi").DependencyIdentifier<T_3>, quantity: import("@wendellhu/redi").Quantity.REQUIRED, lookUp?: import("@wendellhu/redi").LookUp | undefined): T_3;
26
- <T_4>(id: import("@wendellhu/redi").DependencyIdentifier<T_4>, quantity?: import("@wendellhu/redi").Quantity | undefined, lookUp?: import("@wendellhu/redi").LookUp | undefined): T_4 | T_4[] | null;
27
- <T_5>(id: import("@wendellhu/redi").DependencyIdentifier<T_5>, quantityOrLookup?: import("@wendellhu/redi").Quantity | import("@wendellhu/redi").LookUp | undefined, lookUp?: import("@wendellhu/redi").LookUp | undefined): T_5 | T_5[] | null;
7
+ <T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, lookUp?: import('@wendellhu/redi').LookUp | undefined): T;
8
+ <T_1>(id: import('@wendellhu/redi').DependencyIdentifier<T_1>, quantity: import("@wendellhu/redi").Quantity.MANY, lookUp?: import('@wendellhu/redi').LookUp | undefined): T_1[];
9
+ <T_2>(id: import('@wendellhu/redi').DependencyIdentifier<T_2>, quantity: import("@wendellhu/redi").Quantity.OPTIONAL, lookUp?: import('@wendellhu/redi').LookUp | undefined): T_2 | null;
10
+ <T_3>(id: import('@wendellhu/redi').DependencyIdentifier<T_3>, quantity: import("@wendellhu/redi").Quantity.REQUIRED, lookUp?: import('@wendellhu/redi').LookUp | undefined): T_3;
11
+ <T_4>(id: import('@wendellhu/redi').DependencyIdentifier<T_4>, quantity?: import('@wendellhu/redi').Quantity | undefined, lookUp?: import('@wendellhu/redi').LookUp | undefined): T_4 | T_4[] | null;
12
+ <T_5>(id: import('@wendellhu/redi').DependencyIdentifier<T_5>, quantityOrLookup?: import('@wendellhu/redi').Quantity | import('@wendellhu/redi').LookUp | undefined, lookUp?: import('@wendellhu/redi').LookUp | undefined): T_5 | T_5[] | null;
28
13
  };
29
- doc: import("@univerjs/core").DocumentDataModel;
14
+ doc: import('@univerjs/core').DocumentDataModel;
30
15
  };
@@ -1,24 +1,10 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { Nullable } from '@univerjs/core';
17
- import type { ITextSelectionInnerParam } from '@univerjs/engine-render';
1
+ import { ITextSelectionInnerParam } from '@univerjs/engine-render';
2
+ import { Nullable } from '@univerjs/core';
3
+
18
4
  export declare class TextSelectionRenderManager {
19
5
  private readonly _textSelectionInner$;
20
- readonly textSelectionInner$: import("rxjs").Observable<Nullable<ITextSelectionInnerParam>>;
6
+ readonly textSelectionInner$: import('rxjs').Observable<Nullable<ITextSelectionInnerParam>>;
21
7
  removeAllTextRanges(): void;
22
8
  addTextRanges(): void;
23
9
  }
24
- export declare const ITextSelectionRenderManager: import("@wendellhu/redi").IdentifierDecorator<TextSelectionRenderManager>;
10
+ export declare const ITextSelectionRenderManager: import('@wendellhu/redi').IdentifierDecorator<TextSelectionRenderManager>;
@@ -1,17 +1,3 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { ICommand } from '@univerjs/core';
1
+ import { ICommand } from '@univerjs/core';
2
+
17
3
  export declare const BreakLineCommand: ICommand;
@@ -1,20 +1,6 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { ICommand, IDocumentBody } from '@univerjs/core';
17
- import type { ITextRangeWithStyle } from '@univerjs/engine-render';
1
+ import { ITextRangeWithStyle } from '@univerjs/engine-render';
2
+ import { ICommand, IDocumentBody } from '@univerjs/core';
3
+
18
4
  export interface IInnerPasteCommandParams {
19
5
  segmentId: string;
20
6
  body: IDocumentBody;
@@ -1,20 +1,6 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { ICommand, IDocumentBody, IDocumentData, ITextRange, UpdateDocsAttributeType } from '@univerjs/core';
17
- import type { ITextRangeWithStyle } from '@univerjs/engine-render';
1
+ import { ITextRangeWithStyle } from '@univerjs/engine-render';
2
+ import { ICommand, IDocumentBody, IDocumentData, ITextRange, UpdateDocsAttributeType } from '@univerjs/core';
3
+
18
4
  export interface IInsertCommandParams {
19
5
  unitId: string;
20
6
  body: IDocumentBody;
@@ -1,21 +1,7 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { ICommand } from '@univerjs/core';
17
- import { type IActiveTextRange } from '@univerjs/engine-render';
18
1
  import { DeleteDirection } from './core-editing.command';
2
+ import { IActiveTextRange } from '@univerjs/engine-render';
3
+ import { ICommand } from '@univerjs/core';
4
+
19
5
  export declare const DeleteLeftCommand: ICommand;
20
6
  export declare const DeleteRightCommand: ICommand;
21
7
  interface IMergeTwoParagraphParams {
@@ -1,19 +1,5 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { ICommand } from '@univerjs/core';
1
+ import { ICommand } from '@univerjs/core';
2
+
17
3
  export interface IIMEInputCommandParams {
18
4
  unitId: string;
19
5
  newText: string;
@@ -1,19 +1,5 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { ICommand } from '@univerjs/core';
1
+ import { ICommand } from '@univerjs/core';
2
+
17
3
  export interface ISetInlineFormatCommandParams {
18
4
  segmentId: string;
19
5
  preCommandId: string;
@@ -1,17 +1,3 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { ICommand } from '@univerjs/core';
1
+ import { ICommand } from '@univerjs/core';
2
+
17
3
  export declare const InsertDrawingCommand: ICommand;
@@ -1,21 +1,6 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { ICommand, IParagraph } from '@univerjs/core';
17
- import { PresetListType } from '@univerjs/core';
18
- import type { IActiveTextRange } from '@univerjs/engine-render';
1
+ import { IActiveTextRange } from '@univerjs/engine-render';
2
+ import { ICommand, IParagraph, PresetListType } from '@univerjs/core';
3
+
19
4
  interface IListOperationCommandParams {
20
5
  listType: PresetListType;
21
6
  }
@@ -1,20 +1,5 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { ICommand } from '@univerjs/core';
17
- import { HorizontalAlign } from '@univerjs/core';
1
+ import { ICommand, HorizontalAlign } from '@univerjs/core';
2
+
18
3
  interface IAlignOperationCommandParams {
19
4
  alignType: HorizontalAlign;
20
5
  }
@@ -1,17 +1,3 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { ICommand } from '@univerjs/core';
1
+ import { ICommand } from '@univerjs/core';
2
+
17
3
  export declare const RemoveDrawingCommand: ICommand;
@@ -1,20 +1,6 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { ICommand, IDocumentBody } from '@univerjs/core';
17
- import type { ITextRangeWithStyle } from '@univerjs/engine-render';
1
+ import { ITextRangeWithStyle } from '@univerjs/engine-render';
2
+ import { ICommand, IDocumentBody } from '@univerjs/core';
3
+
18
4
  interface IReplaceContentCommandParams {
19
5
  unitId: string;
20
6
  body: IDocumentBody;
@@ -1,19 +1,5 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { ICommand } from '@univerjs/core';
1
+ import { ICommand } from '@univerjs/core';
2
+
17
3
  export interface ISetDocZoomRatioCommandParams {
18
4
  zoomRatio?: number;
19
5
  documentId?: string;
@@ -1,19 +1,5 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { ICommand, ISize, ObjectPositionH, ObjectPositionV } from '@univerjs/core';
1
+ import { ICommand, ISize, ObjectPositionH, ObjectPositionV } from '@univerjs/core';
2
+
17
3
  export interface ISetDrawingSizeCommandParams {
18
4
  documentId: string;
19
5
  objectId: string;
@@ -1,20 +1,6 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IMutation, IMutationCommonParams, Nullable, TextXAction } from '@univerjs/core';
17
- import type { ITextRangeWithStyle } from '@univerjs/engine-render';
1
+ import { ITextRangeWithStyle } from '@univerjs/engine-render';
2
+ import { IMutation, IMutationCommonParams, Nullable, TextXAction } from '@univerjs/core';
3
+
18
4
  export interface IRichTextEditingMutationParams extends IMutationCommonParams {
19
5
  unitId: string;
20
6
  actions: TextXAction[];
@@ -1,20 +1,6 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IDrawing, IMutation } from '@univerjs/core';
17
- import type { ISeachDrawingMutation } from './set-floating-object.mutation';
1
+ import { ISeachDrawingMutation } from './set-floating-object.mutation';
2
+ import { IDrawing, IMutation } from '@univerjs/core';
3
+
18
4
  export interface IInsertDrawingMutation extends ISeachDrawingMutation {
19
5
  drawing: IDrawing;
20
6
  }
@@ -1,18 +1,4 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IMutation } from '@univerjs/core';
17
- import type { ISeachDrawingMutation } from './set-floating-object.mutation';
1
+ import { ISeachDrawingMutation } from './set-floating-object.mutation';
2
+ import { IMutation } from '@univerjs/core';
3
+
18
4
  export declare const RemoveDrawingMutation: IMutation<ISeachDrawingMutation>;
@@ -1,20 +1,6 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { BooleanNumber, IMutation, ISize, ObjectPositionH, ObjectPositionV, PositionedObjectLayoutType, WrapTextType } from '@univerjs/core';
17
- import type { IAccessor } from '@wendellhu/redi';
1
+ import { IAccessor } from '@wendellhu/redi';
2
+ import { BooleanNumber, IMutation, ISize, ObjectPositionH, ObjectPositionV, PositionedObjectLayoutType, WrapTextType } from '@univerjs/core';
3
+
18
4
  export interface ISeachDrawingMutation {
19
5
  documentId: string;
20
6
  objectId: string;
@@ -1,19 +1,5 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { Direction, IOperation } from '@univerjs/core';
1
+ import { Direction, IOperation } from '@univerjs/core';
2
+
17
3
  export interface IMoveCursorOperationParams {
18
4
  direction: Direction;
19
5
  }
@@ -1,19 +1,5 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { ICommand } from '@univerjs/core';
1
+ import { ICommand } from '@univerjs/core';
2
+
17
3
  interface ISelectAllOperationParams {
18
4
  }
19
5
  export declare const SelectAllOperation: ICommand<ISelectAllOperationParams>;
@@ -1,20 +1,6 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IOperation } from '@univerjs/core';
17
- import type { IAccessor } from '@wendellhu/redi';
1
+ import { IAccessor } from '@wendellhu/redi';
2
+ import { IOperation } from '@univerjs/core';
3
+
18
4
  export interface ISetDocZoomRatioOperationParams {
19
5
  zoomRatio: number;
20
6
  unitId: string;
@@ -1,20 +1,6 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { IOperation } from '@univerjs/core';
17
- import type { ITextRangeWithStyle, ITextSelectionStyle } from '@univerjs/engine-render';
1
+ import { ITextRangeWithStyle, ITextSelectionStyle } from '@univerjs/engine-render';
2
+ import { IOperation } from '@univerjs/core';
3
+
18
4
  export interface ISetTextSelectionsOperationParams {
19
5
  unitId: string;
20
6
  subUnitId: string;
@@ -1,22 +1,8 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
17
- import { ITextSelectionRenderManager } from '@univerjs/engine-render';
18
- import { DocSkeletonManagerService } from '../services/doc-skeleton-manager.service';
19
1
  import { IMEInputManagerService } from '../services/ime-input-manager.service';
2
+ import { DocSkeletonManagerService } from '../services/doc-skeleton-manager.service';
3
+ import { ITextSelectionRenderManager } from '@univerjs/engine-render';
4
+ import { Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
5
+
20
6
  export declare class IMEInputController extends Disposable {
21
7
  private readonly _docSkeletonManagerService;
22
8
  private readonly _currentUniverService;
@@ -1,22 +1,8 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
17
- import { IRenderManagerService } from '@univerjs/engine-render';
18
- import { DocSkeletonManagerService } from '../services/doc-skeleton-manager.service';
19
1
  import { TextSelectionManagerService } from '../services/text-selection-manager.service';
2
+ import { DocSkeletonManagerService } from '../services/doc-skeleton-manager.service';
3
+ import { IRenderManagerService } from '@univerjs/engine-render';
4
+ import { Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
5
+
20
6
  export declare class MoveCursorController extends Disposable {
21
7
  private readonly _docSkeletonManagerService;
22
8
  private readonly _currentUniverService;
@@ -1,21 +1,7 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
17
- import { IRenderManagerService, ITextSelectionRenderManager } from '@univerjs/engine-render';
18
1
  import { DocSkeletonManagerService } from '../services/doc-skeleton-manager.service';
2
+ import { IRenderManagerService, ITextSelectionRenderManager } from '@univerjs/engine-render';
3
+ import { Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
4
+
19
5
  export declare class NormalInputController extends Disposable {
20
6
  private readonly _docSkeletonManagerService;
21
7
  private readonly _currentUniverService;
@@ -1,20 +1,6 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { Plugin, PluginType } from '@univerjs/core';
17
1
  import { Injector } from '@wendellhu/redi';
2
+ import { Plugin, PluginType } from '@univerjs/core';
3
+
18
4
  export interface IUniverDocsConfig {
19
5
  hasScroll?: boolean;
20
6
  }
@@ -1,22 +1,7 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { Nullable } from '@univerjs/core';
17
- import { IUniverInstanceService, LocaleService, RxDisposable } from '@univerjs/core';
18
- import { DocumentSkeleton } from '@univerjs/engine-render';
19
1
  import { DocViewModelManagerService } from './doc-view-model-manager.service';
2
+ import { DocumentSkeleton } from '@univerjs/engine-render';
3
+ import { Nullable, IUniverInstanceService, LocaleService, RxDisposable } from '@univerjs/core';
4
+
20
5
  export interface IDocSkeletonManagerParam {
21
6
  unitId: string;
22
7
  skeleton: DocumentSkeleton;
@@ -32,9 +17,9 @@ export declare class DocSkeletonManagerService extends RxDisposable {
32
17
  private _currentSkeletonUnitId;
33
18
  private _docSkeletonMap;
34
19
  private readonly _currentSkeleton$;
35
- readonly currentSkeleton$: import("rxjs").Observable<Nullable<IDocSkeletonManagerParam>>;
20
+ readonly currentSkeleton$: import('rxjs').Observable<Nullable<IDocSkeletonManagerParam>>;
36
21
  private readonly _currentSkeletonBefore$;
37
- readonly currentSkeletonBefore$: import("rxjs").Observable<Nullable<IDocSkeletonManagerParam>>;
22
+ readonly currentSkeletonBefore$: import('rxjs').Observable<Nullable<IDocSkeletonManagerParam>>;
38
23
  constructor(_localeService: LocaleService, _docViewModelManagerService: DocViewModelManagerService, _currentUniverService: IUniverInstanceService);
39
24
  private _initialize;
40
25
  dispose(): void;
@@ -1,21 +1,6 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { Nullable, TextXAction } from '@univerjs/core';
17
- import { ICommandService, IUndoRedoService, IUniverInstanceService, RxDisposable } from '@univerjs/core';
18
- import type { ITextRangeWithStyle } from '@univerjs/engine-render';
1
+ import { ITextRangeWithStyle } from '@univerjs/engine-render';
2
+ import { Nullable, TextXAction, ICommandService, IUndoRedoService, IUniverInstanceService, RxDisposable } from '@univerjs/core';
3
+
19
4
  interface IDocChangeState {
20
5
  actions: TextXAction[];
21
6
  textRanges: Nullable<ITextRangeWithStyle[]>;
@@ -33,7 +18,7 @@ export declare class DocStateChangeManagerService extends RxDisposable {
33
18
  private readonly _commandService;
34
19
  private readonly _univerInstanceService;
35
20
  private readonly _docStateChange$;
36
- readonly docStateChange$: import("rxjs").Observable<Nullable<IDocStateChangeParams>>;
21
+ readonly docStateChange$: import('rxjs').Observable<Nullable<IDocStateChangeParams>>;
37
22
  private _stateCache;
38
23
  private _timer;
39
24
  constructor(_undoRedoService: IUndoRedoService, _commandService: ICommandService, _univerInstanceService: IUniverInstanceService);
@@ -1,21 +1,6 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { Nullable } from '@univerjs/core';
17
- import { IUniverInstanceService, RxDisposable } from '@univerjs/core';
18
1
  import { DocumentViewModel } from '@univerjs/engine-render';
2
+ import { Nullable, IUniverInstanceService, RxDisposable } from '@univerjs/core';
3
+
19
4
  export interface IDocumentViewModelManagerParam {
20
5
  unitId: string;
21
6
  docViewModel: DocumentViewModel;
@@ -27,7 +12,7 @@ export declare class DocViewModelManagerService extends RxDisposable {
27
12
  private readonly _currentUniverService;
28
13
  private _docViewModelMap;
29
14
  private readonly _currentDocViewModel$;
30
- readonly currentDocViewModel$: import("rxjs").Observable<Nullable<IDocumentViewModelManagerParam>>;
15
+ readonly currentDocViewModel$: import('rxjs').Observable<Nullable<IDocumentViewModelManagerParam>>;
31
16
  constructor(_currentUniverService: IUniverInstanceService);
32
17
  private _initialize;
33
18
  dispose(): void;
@@ -1,22 +1,8 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { Nullable } from '@univerjs/core';
17
- import type { ITextRangeWithStyle } from '@univerjs/engine-render';
18
- import type { IDisposable } from '@wendellhu/redi';
19
- import type { IRichTextEditingMutationParams } from '../commands/mutations/core-editing.mutation';
1
+ import { IRichTextEditingMutationParams } from '../commands/mutations/core-editing.mutation';
2
+ import { IDisposable } from '@wendellhu/redi';
3
+ import { ITextRangeWithStyle } from '@univerjs/engine-render';
4
+ import { Nullable } from '@univerjs/core';
5
+
20
6
  interface ICacheParams {
21
7
  undoCache: IRichTextEditingMutationParams[];
22
8
  redoCache: IRichTextEditingMutationParams[];
@@ -1,22 +1,6 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { Nullable } from '@univerjs/core';
17
- import { ICommandService, RxDisposable } from '@univerjs/core';
18
- import type { INodePosition, ISuccinctTextRangeParam, ITextRangeWithStyle, ITextSelectionInnerParam, ITextSelectionStyle, RANGE_DIRECTION, TextRange } from '@univerjs/engine-render';
19
- import { ITextSelectionRenderManager } from '@univerjs/engine-render';
1
+ import { INodePosition, ISuccinctTextRangeParam, ITextRangeWithStyle, ITextSelectionInnerParam, ITextSelectionStyle, RANGE_DIRECTION, TextRange, ITextSelectionRenderManager } from '@univerjs/engine-render';
2
+ import { Nullable, ICommandService, RxDisposable } from '@univerjs/core';
3
+
20
4
  interface ITextSelectionManagerSearchParam {
21
5
  unitId: string;
22
6
  subUnitId: string;
@@ -43,7 +27,7 @@ export declare class TextSelectionManagerService extends RxDisposable {
43
27
  private _currentSelection;
44
28
  private readonly _textSelectionInfo;
45
29
  private readonly _textSelection$;
46
- readonly textSelection$: import("rxjs").Observable<Nullable<ITextSelectionManagerInsertParam>>;
30
+ readonly textSelection$: import('rxjs').Observable<Nullable<ITextSelectionManagerInsertParam>>;
47
31
  constructor(_textSelectionRenderManager: ITextSelectionRenderManager, _commandService: ICommandService);
48
32
  getCurrentSelection(): Nullable<ITextSelectionManagerSearchParam>;
49
33
  getCurrentSelectionInfo(): ITextSelectionInnerParam | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs/docs",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "private": false,
5
5
  "description": "UniverSheet normal base-docs",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -52,19 +52,18 @@
52
52
  "peerDependencies": {
53
53
  "@wendellhu/redi": "0.13.0",
54
54
  "rxjs": ">=7.0.0",
55
- "@univerjs/core": "0.1.4",
56
- "@univerjs/engine-render": "0.1.4"
55
+ "@univerjs/core": "0.1.6",
56
+ "@univerjs/engine-render": "0.1.6"
57
57
  },
58
- "dependencies": {},
59
58
  "devDependencies": {
60
59
  "@wendellhu/redi": "^0.13.0",
61
60
  "rxjs": "^7.8.1",
62
- "typescript": "^5.4.2",
63
- "vite": "^5.1.6",
61
+ "typescript": "^5.4.3",
62
+ "vite": "^5.2.7",
64
63
  "vitest": "^1.4.0",
65
- "@univerjs/core": "0.1.4",
66
- "@univerjs/engine-render": "0.1.4",
67
- "@univerjs/shared": "0.1.4"
64
+ "@univerjs/core": "0.1.6",
65
+ "@univerjs/shared": "0.1.6",
66
+ "@univerjs/engine-render": "0.1.6"
68
67
  },
69
68
  "scripts": {
70
69
  "test": "vitest run",