@univerjs/docs 0.2.6 → 0.2.8
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.
- package/lib/cjs/index.js +4 -1
- package/lib/es/index.js +2016 -439
- package/lib/types/basics/component-tools.d.ts +0 -1
- package/lib/types/basics/custom-decoration-factory.d.ts +1 -2
- package/lib/types/basics/custom-range-factory.d.ts +0 -1
- package/lib/types/basics/custom-range.d.ts +2 -2
- package/lib/types/basics/plain-text.d.ts +0 -1
- package/lib/types/basics/replace.d.ts +3 -2
- package/lib/types/basics/retain-delete-params.d.ts +0 -1
- package/lib/types/basics/selection.d.ts +2 -6
- package/lib/types/basics/table.d.ts +18 -0
- package/lib/types/commands/commands/__tests__/create-command-test-bed.d.ts +0 -1
- package/lib/types/commands/commands/__tests__/mock-text-selection-render-manager.d.ts +2 -3
- package/lib/types/commands/commands/auto-format.command.d.ts +7 -0
- package/lib/types/commands/commands/break-line.command.d.ts +2 -2
- package/lib/types/commands/commands/clipboard.inner.command.d.ts +2 -3
- package/lib/types/commands/commands/core-editing.command.d.ts +0 -1
- package/lib/types/commands/commands/delete.command.d.ts +3 -3
- package/lib/types/commands/commands/ime-input.command.d.ts +0 -1
- package/lib/types/commands/commands/inline-format.command.d.ts +0 -2
- package/lib/types/commands/commands/list.command.d.ts +28 -3
- package/lib/types/commands/commands/paragraph-align.command.d.ts +0 -1
- package/lib/types/commands/commands/replace-content.command.d.ts +0 -1
- package/lib/types/commands/commands/set-doc-zoom-ratio.command.d.ts +0 -1
- package/lib/types/commands/commands/table/doc-table-create.command.d.ts +10 -0
- package/lib/types/commands/commands/table/doc-table-delete.command.d.ts +10 -0
- package/lib/types/commands/commands/table/doc-table-insert.command.d.ts +34 -0
- package/lib/types/commands/commands/table/doc-table-tab.command.d.ts +7 -0
- package/lib/types/commands/commands/table/table.d.ts +84 -0
- package/lib/types/commands/mutations/core-editing.mutation.d.ts +0 -1
- package/lib/types/commands/mutations/docs-rename.mutation.d.ts +0 -1
- package/lib/types/commands/operations/cursor.operation.d.ts +0 -1
- package/lib/types/commands/operations/select-all.operation.d.ts +0 -1
- package/lib/types/commands/operations/set-doc-zoom-ratio.operation.d.ts +0 -1
- package/lib/types/commands/operations/text-selection.operation.d.ts +0 -1
- package/lib/types/commands/util.d.ts +0 -1
- package/lib/types/controllers/custom-range.controller.d.ts +0 -1
- package/lib/types/controllers/ime-input.controller.d.ts +3 -2
- package/lib/types/controllers/move-cursor.controller.d.ts +0 -1
- package/lib/types/controllers/normal-input.controller.d.ts +0 -1
- package/lib/types/doc-plugin.d.ts +0 -1
- package/lib/types/index.d.ts +23 -7
- package/lib/types/services/doc-auto-format.service.d.ts +37 -0
- package/lib/types/services/doc-custom-range.service.d.ts +0 -1
- package/lib/types/services/doc-interceptor/doc-interceptor.service.d.ts +0 -1
- package/lib/types/services/doc-interceptor/interceptor-const.d.ts +0 -1
- package/lib/types/services/doc-skeleton-manager.service.d.ts +0 -1
- package/lib/types/services/doc-state-change-manager.service.d.ts +0 -1
- package/lib/types/services/doc-view-model-manager.service.d.ts +0 -1
- package/lib/types/services/ime-input-manager.service.d.ts +0 -1
- package/lib/types/services/text-selection-manager.service.d.ts +14 -12
- package/lib/umd/index.js +4 -1
- package/package.json +9 -8
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { DocumentDataModel, IInterceptor, Disposable, DisposableCollection } from '@univerjs/core';
|
|
2
2
|
import { DocumentViewModel, IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
3
3
|
import { DocSkeletonManagerService } from '../doc-skeleton-manager.service';
|
|
4
|
-
|
|
5
4
|
export declare class DocInterceptorService extends Disposable implements IRenderModule {
|
|
6
5
|
private readonly _context;
|
|
7
6
|
private readonly _docSkeletonManagerService;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ICustomDecoration, ICustomDecorationForInterceptor, ICustomRange, ICustomRangeForInterceptor } from '@univerjs/core';
|
|
2
|
-
|
|
3
2
|
export declare const DOC_INTERCEPTOR_POINT: {
|
|
4
3
|
CUSTOM_RANGE: import('@univerjs/core').IInterceptor<ICustomRangeForInterceptor, {
|
|
5
4
|
index: number;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DocumentDataModel, Nullable, IUniverInstanceService, LocaleService, RxDisposable } from '@univerjs/core';
|
|
2
2
|
import { IRenderContext, IRenderModule, DocumentSkeleton, DocumentViewModel } from '@univerjs/engine-render';
|
|
3
|
-
|
|
4
3
|
/**
|
|
5
4
|
* This service is for document build and manage doc skeletons. It also manages
|
|
6
5
|
* DocumentViewModels.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { JSONXActions, Nullable, ICommandService, IUndoRedoService, IUniverInstanceService, RxDisposable } from '@univerjs/core';
|
|
2
2
|
import { ITextRangeWithStyle } from '@univerjs/engine-render';
|
|
3
|
-
|
|
4
3
|
interface IDocChangeState {
|
|
5
4
|
actions: JSONXActions;
|
|
6
5
|
textRanges: Nullable<ITextRangeWithStyle[]>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DocumentDataModel, Nullable, IUniverInstanceService, RxDisposable } from '@univerjs/core';
|
|
2
2
|
import { IRenderContext, IRenderModule, DocumentViewModel } from '@univerjs/engine-render';
|
|
3
|
-
|
|
4
3
|
export interface IDocumentViewModelManagerParam {
|
|
5
4
|
unitId: string;
|
|
6
5
|
docViewModel: DocumentViewModel;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { IDisposable, Nullable } from '@univerjs/core';
|
|
2
2
|
import { ITextRangeWithStyle } from '@univerjs/engine-render';
|
|
3
3
|
import { IRichTextEditingMutationParams } from '../commands/mutations/core-editing.mutation';
|
|
4
|
-
|
|
5
4
|
interface ICacheParams {
|
|
6
5
|
undoCache: IRichTextEditingMutationParams[];
|
|
7
6
|
redoCache: IRichTextEditingMutationParams[];
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Nullable, ICommandService, RxDisposable } from '@univerjs/core';
|
|
2
|
-
import { INodePosition,
|
|
3
|
-
|
|
4
|
-
interface ITextSelectionManagerSearchParam {
|
|
2
|
+
import { IDocRange, INodePosition, ISuccinctDocRangeParam, ITextRangeWithStyle, ITextSelectionInnerParam, ITextSelectionStyle, RANGE_DIRECTION, RectRange, TextRange, ITextSelectionRenderManager } from '@univerjs/engine-render';
|
|
3
|
+
interface IDocSelectionManagerSearchParam {
|
|
5
4
|
unitId: string;
|
|
6
5
|
subUnitId: string;
|
|
7
6
|
}
|
|
@@ -16,9 +15,9 @@ export interface ITextActiveRange {
|
|
|
16
15
|
style: ITextSelectionStyle;
|
|
17
16
|
segmentPage: number;
|
|
18
17
|
}
|
|
19
|
-
interface ITextSelectionManagerInsertParam extends
|
|
18
|
+
interface ITextSelectionManagerInsertParam extends IDocSelectionManagerSearchParam, ITextSelectionInnerParam {
|
|
20
19
|
}
|
|
21
|
-
export declare function
|
|
20
|
+
export declare function serializeDocRange(textRange: IDocRange): ITextRangeWithStyle;
|
|
22
21
|
/**
|
|
23
22
|
* This service is for text selection.
|
|
24
23
|
*/
|
|
@@ -30,17 +29,20 @@ export declare class TextSelectionManagerService extends RxDisposable {
|
|
|
30
29
|
private readonly _textSelection$;
|
|
31
30
|
readonly textSelection$: import('rxjs').Observable<Nullable<ITextSelectionManagerInsertParam>>;
|
|
32
31
|
constructor(_textSelectionRenderManager: ITextSelectionRenderManager, _commandService: ICommandService);
|
|
33
|
-
getCurrentSelection(): Nullable<
|
|
32
|
+
getCurrentSelection(): Nullable<IDocSelectionManagerSearchParam>;
|
|
34
33
|
getCurrentSelectionInfo(): ITextSelectionInnerParam | undefined;
|
|
35
34
|
dispose(): void;
|
|
36
35
|
refreshSelection(): void;
|
|
37
|
-
setCurrentSelection(param:
|
|
38
|
-
setCurrentSelectionNotRefresh(param:
|
|
39
|
-
|
|
36
|
+
setCurrentSelection(param: IDocSelectionManagerSearchParam): void;
|
|
37
|
+
setCurrentSelectionNotRefresh(param: IDocSelectionManagerSearchParam): void;
|
|
38
|
+
getCurrentTextRanges(): Readonly<Nullable<TextRange[]>>;
|
|
39
|
+
getCurrentRectRanges(): Readonly<Nullable<RectRange[]>>;
|
|
40
|
+
getDocRanges(): (TextRange | RectRange)[];
|
|
40
41
|
getActiveTextRange(): Nullable<TextRange>;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
getActiveRectRange(): Nullable<RectRange>;
|
|
43
|
+
getActiveTextRangeWithStyle(): Nullable<ITextActiveRange>;
|
|
44
|
+
add(textRanges: ISuccinctDocRangeParam[], isEditing?: boolean): void;
|
|
45
|
+
replaceTextRanges(docRanges: ISuccinctDocRangeParam[], isEditing?: boolean, options?: {
|
|
44
46
|
[key: string]: boolean;
|
|
45
47
|
}): void;
|
|
46
48
|
private _syncSelectionFromRenderService;
|