@univerjs/docs 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.
- package/lib/cjs/index.js +4 -3
- package/lib/es/index.js +200 -147
- package/lib/types/basics/component-tools.d.ts +0 -1
- package/lib/types/basics/custom-decoration-factory.d.ts +0 -1
- package/lib/types/basics/custom-range-factory.d.ts +0 -2
- package/lib/types/basics/custom-range.d.ts +1 -2
- package/lib/types/basics/paragraph.d.ts +2 -0
- package/lib/types/basics/plain-text.d.ts +5 -2
- package/lib/types/basics/replace.d.ts +5 -4
- package/lib/types/basics/retain-delete-params.d.ts +0 -1
- package/lib/types/basics/selection.d.ts +1 -2
- package/lib/types/basics/table.d.ts +0 -3
- 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 +0 -1
- package/lib/types/commands/commands/auto-format.command.d.ts +0 -1
- package/lib/types/commands/commands/break-line.command.d.ts +0 -1
- package/lib/types/commands/commands/clipboard.inner.command.d.ts +0 -1
- package/lib/types/commands/commands/core-editing.command.d.ts +0 -2
- package/lib/types/commands/commands/delete.command.d.ts +0 -1
- package/lib/types/commands/commands/ime-input.command.d.ts +0 -1
- package/lib/types/commands/commands/inline-format.command.d.ts +0 -1
- package/lib/types/commands/commands/list.command.d.ts +1 -1
- 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 +0 -1
- package/lib/types/commands/commands/table/doc-table-delete.command.d.ts +0 -1
- package/lib/types/commands/commands/table/doc-table-insert.command.d.ts +0 -1
- package/lib/types/commands/commands/table/doc-table-tab.command.d.ts +1 -4
- package/lib/types/commands/commands/table/table.d.ts +10 -1
- 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 +0 -1
- 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 +5 -3
- package/lib/types/services/doc-auto-format.service.d.ts +4 -5
- package/lib/types/services/doc-custom-range.service.d.ts +0 -1
- package/lib/types/services/doc-interceptor/doc-interceptor.service.d.ts +2 -3
- 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 +0 -1
- package/lib/umd/index.js +4 -3
- package/package.json +8 -8
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DocumentDataModel, IUniverInstanceService, Nullable } from '@univerjs/core';
|
|
2
2
|
import { DocBackground, Documents, Engine, IRenderContext, IRenderManagerService, Scene } from '@univerjs/engine-render';
|
|
3
|
-
|
|
4
3
|
export interface IDocObjectParam {
|
|
5
4
|
document: Documents;
|
|
6
5
|
docBackground: DocBackground;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { CustomDecorationType, IAccessor, IMutationInfo, ITextRange } from '@univerjs/core';
|
|
2
2
|
import { IRichTextEditingMutationParams } from '../commands/mutations/core-editing.mutation';
|
|
3
|
-
|
|
4
3
|
interface IAddCustomDecorationParam {
|
|
5
4
|
unitId: string;
|
|
6
5
|
ranges: ITextRange[];
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { CustomRangeType, IAccessor, IDocumentBody, IMutationInfo, ITextRange } from '@univerjs/core';
|
|
2
2
|
import { IRichTextEditingMutationParams } from '../commands/mutations/core-editing.mutation';
|
|
3
|
-
|
|
4
3
|
interface IAddCustomRangeParam {
|
|
5
4
|
unitId: string;
|
|
6
5
|
range: ITextRange;
|
|
@@ -10,7 +9,6 @@ interface IAddCustomRangeParam {
|
|
|
10
9
|
}
|
|
11
10
|
export declare function addCustomRangeFactory(param: IAddCustomRangeParam, body: IDocumentBody): false | IMutationInfo<IRichTextEditingMutationParams>;
|
|
12
11
|
interface IAddCustomRangeFactoryParam {
|
|
13
|
-
segmentId?: string;
|
|
14
12
|
rangeId: string;
|
|
15
13
|
rangeType: CustomRangeType;
|
|
16
14
|
wholeEntity?: boolean;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ICustomRange, ITextRange, DataStreamTreeTokenType } from '@univerjs/core';
|
|
2
|
-
|
|
3
2
|
export declare function isCustomRangeSplitSymbol(text: string): text is DataStreamTreeTokenType.CUSTOM_RANGE_START | DataStreamTreeTokenType.CUSTOM_RANGE_END;
|
|
4
3
|
export declare function isIntersecting(line1Start: number, line1End: number, line2Start: number, line2End: number): boolean;
|
|
5
4
|
export declare function shouldDeleteCustomRange(deleteStart: number, deleteLen: number, customRange: ICustomRange, dataStream: string): boolean;
|
|
6
|
-
export declare function
|
|
5
|
+
export declare function getCustomRangesInterestsWithRange(range: ITextRange, customRanges: ICustomRange[]): ICustomRange[];
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { IDocumentData } from '@univerjs/core';
|
|
2
|
-
|
|
1
|
+
import { IDocumentBody, IDocumentData } from '@univerjs/core';
|
|
2
|
+
/**
|
|
3
|
+
* get plain text from rich-text
|
|
4
|
+
*/
|
|
5
|
+
export declare const getPlainTextFormBody: (body: IDocumentBody) => string;
|
|
3
6
|
/**
|
|
4
7
|
* get plain text from rich-text
|
|
5
8
|
*/
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { IAccessor, IDeleteAction, IDocumentBody, IMutationInfo, IRetainAction, ITextRange } from '@univerjs/core';
|
|
1
|
+
import { IAccessor, IDeleteAction, IDocumentBody, IMutationInfo, IRetainAction, ITextRange, ITextRangeParam } from '@univerjs/core';
|
|
2
2
|
import { ITextRangeWithStyle } from '@univerjs/engine-render';
|
|
3
3
|
import { IRichTextEditingMutationParams } from '../commands/mutations/core-editing.mutation';
|
|
4
|
-
|
|
5
|
-
export declare function getRetainAndDeleteAndExcludeLineBreak(selection: ITextRange, body: IDocumentBody, segmentId?: string, memoryCursor?: number): Array<IRetainAction | IDeleteAction>;
|
|
4
|
+
export declare function getRetainAndDeleteAndExcludeLineBreak(selection: ITextRange, body: IDocumentBody, segmentId?: string, memoryCursor?: number, preserveLineBreak?: boolean): Array<IRetainAction | IDeleteAction>;
|
|
6
5
|
export interface IReplaceSelectionFactoryParams {
|
|
7
6
|
unitId: string;
|
|
8
|
-
selection?:
|
|
7
|
+
selection?: ITextRangeParam;
|
|
8
|
+
originBody?: IDocumentBody;
|
|
9
|
+
/** Body to be inserted at the given position. */
|
|
9
10
|
body: IDocumentBody;
|
|
10
11
|
textRanges?: ITextRangeWithStyle[];
|
|
11
12
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { IDeleteAction, IDocumentBody, IRetainAction, ITextRange } from '@univerjs/core';
|
|
2
|
-
|
|
3
2
|
export declare function getRetainAndDeleteFromReplace(range: ITextRange, segmentId: string | undefined, memoryCursor: number, body: IDocumentBody): {
|
|
4
3
|
dos: (IRetainAction | IDeleteAction)[];
|
|
5
4
|
cursor: number;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { IDocumentBody, ITextRange, Nullable } from '@univerjs/core';
|
|
2
2
|
import { DeleteDirection } from '../types/enums/delete-direction';
|
|
3
|
-
|
|
4
3
|
export declare function makeSelection(startOffset: number, endOffset?: number): ITextRange;
|
|
5
4
|
export declare function normalizeSelection(selection: ITextRange): ITextRange;
|
|
6
5
|
export declare function getSelectionWithSymbolMax(selection: ITextRange, body: IDocumentBody): {
|
|
@@ -12,7 +11,7 @@ export declare function getSelectionWithNoSymbolSide(selection: ITextRange, body
|
|
|
12
11
|
endOffset: number;
|
|
13
12
|
};
|
|
14
13
|
export declare function getDeleteSelection<T extends ITextRange>(selection: T, body: IDocumentBody, direction?: DeleteDirection): T;
|
|
15
|
-
export declare function getInsertSelection(selection:
|
|
14
|
+
export declare function getInsertSelection<T extends ITextRange>(selection: T, body: IDocumentBody): T;
|
|
16
15
|
/**
|
|
17
16
|
* Ensure custom-range has a correct order,
|
|
18
17
|
* when range contains range, it won't be present as intersect. <br/>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Nullable } from '@univerjs/core';
|
|
2
2
|
import { IDocumentSkeletonLine, IDocumentSkeletonPage, IDocumentSkeletonTable } from '@univerjs/engine-render';
|
|
3
|
-
|
|
4
3
|
export declare function firstLineInTable(table: IDocumentSkeletonTable): IDocumentSkeletonLine;
|
|
5
4
|
export declare function lastLineInTable(table: IDocumentSkeletonTable): IDocumentSkeletonLine | undefined;
|
|
6
5
|
export declare function findTableAfterLine(line: IDocumentSkeletonLine, page: IDocumentSkeletonPage): IDocumentSkeletonTable | null;
|
|
@@ -10,8 +9,6 @@ export declare function findLineBeforeAndAfterTable(table: Nullable<IDocumentSke
|
|
|
10
9
|
};
|
|
11
10
|
export declare function findBellowCell(cell: IDocumentSkeletonPage): IDocumentSkeletonPage | undefined;
|
|
12
11
|
export declare function findAboveCell(cell: IDocumentSkeletonPage): IDocumentSkeletonPage | undefined;
|
|
13
|
-
export declare function findNextCell(cell: IDocumentSkeletonPage): void;
|
|
14
|
-
export declare function findPrevCell(cell: IDocumentSkeletonPage): void;
|
|
15
12
|
export declare function findTableBeforeLine(line: IDocumentSkeletonLine, page: IDocumentSkeletonPage): IDocumentSkeletonTable | null;
|
|
16
13
|
export declare function firstLineInCell(cell: IDocumentSkeletonPage): IDocumentSkeletonLine;
|
|
17
14
|
export declare function lastLineInCell(cell: IDocumentSkeletonPage): IDocumentSkeletonLine | undefined;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Dependency, DependencyIdentifier, DocumentDataModel, IDocumentData, Nullable, Injector, IUniverInstanceService, RxDisposable, Univer } from '@univerjs/core';
|
|
2
2
|
import { DocumentSkeleton, IRender, IRenderContext, IRenderModule, DocumentViewModel, IRenderManagerService } from '@univerjs/engine-render';
|
|
3
|
-
|
|
4
3
|
export declare function createCommandTestBed(workbookData?: IDocumentData, dependencies?: Dependency[]): {
|
|
5
4
|
univer: Univer;
|
|
6
5
|
get: {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Nullable } from '@univerjs/core';
|
|
2
2
|
import { ITextSelectionInnerParam } from '@univerjs/engine-render';
|
|
3
|
-
|
|
4
3
|
export declare class TextSelectionRenderManager {
|
|
5
4
|
private readonly _textSelectionInner$;
|
|
6
5
|
readonly textSelectionInner$: import('rxjs').Observable<Nullable<ITextSelectionInnerParam>>;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { ICommand, IDocumentBody, IDocumentData, ITextRange, UpdateDocsAttributeType } from '@univerjs/core';
|
|
2
2
|
import { ITextRangeWithStyle } from '@univerjs/engine-render';
|
|
3
3
|
import { DeleteDirection } from '../../types/enums/delete-direction';
|
|
4
|
-
|
|
5
4
|
export interface IInsertCommandParams {
|
|
6
5
|
unitId: string;
|
|
7
6
|
body: IDocumentBody;
|
|
8
7
|
range: ITextRange;
|
|
9
|
-
textRanges?: ITextRangeWithStyle[];
|
|
10
8
|
segmentId?: string;
|
|
11
9
|
cursorOffset?: number;
|
|
12
10
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ICommand, Nullable } from '@univerjs/core';
|
|
2
2
|
import { IActiveTextRange, RectRange, TextRange } from '@univerjs/engine-render';
|
|
3
3
|
import { DeleteDirection } from '../../types/enums/delete-direction';
|
|
4
|
-
|
|
5
4
|
export interface IDeleteCustomBlockParams {
|
|
6
5
|
direction: DeleteDirection;
|
|
7
6
|
range: IActiveTextRange;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ICommand, IParagraph, IParagraphRange, ISectionBreak, PresetListType } from '@univerjs/core';
|
|
2
2
|
import { IActiveTextRange, IDocRange } from '@univerjs/engine-render';
|
|
3
|
-
|
|
4
3
|
interface IListOperationCommandParams {
|
|
5
4
|
listType: PresetListType;
|
|
6
5
|
}
|
|
@@ -24,6 +23,7 @@ export declare const BulletListCommand: ICommand<IBulletListCommandParams>;
|
|
|
24
23
|
export declare const CheckListCommand: ICommand<IBulletListCommandParams>;
|
|
25
24
|
export interface IToggleCheckListCommandParams {
|
|
26
25
|
index: number;
|
|
26
|
+
segmentId?: string;
|
|
27
27
|
}
|
|
28
28
|
export declare const ToggleCheckListCommand: ICommand<IToggleCheckListCommandParams>;
|
|
29
29
|
interface IOrderListCommandParams {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ICommand } from '@univerjs/core';
|
|
2
2
|
import { INSERT_COLUMN_POSITION, INSERT_ROW_POSITION } from './table';
|
|
3
|
-
|
|
4
3
|
export declare const DocTableInsertRowCommandId = "doc.command.table-insert-row";
|
|
5
4
|
export declare const DocTableInsertColumnCommandId = "doc.command.table-insert-column";
|
|
6
5
|
export declare const DocTableInsertRowAboveCommandId = "doc.command.table-insert-row-above";
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { ICommand } from '@univerjs/core';
|
|
2
|
-
|
|
3
2
|
export interface IDocTableTabCommandParams {
|
|
3
|
+
shift: boolean;
|
|
4
4
|
}
|
|
5
5
|
export declare const DocTableTabCommand: ICommand<IDocTableTabCommandParams>;
|
|
6
|
-
export interface IDocTableShiftTabCommandParams {
|
|
7
|
-
}
|
|
8
|
-
export declare const DocTableShiftTabCommand: ICommand<IDocTableShiftTabCommandParams>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IParagraph, ISectionBreak, ITable, ITableCell, ITableColumn, ITableRow, Nullable } from '@univerjs/core';
|
|
2
2
|
import { DocumentViewModel, RectRange, TextRange } from '@univerjs/engine-render';
|
|
3
|
-
|
|
3
|
+
import { ITextActiveRange } from '../../../services/text-selection-manager.service';
|
|
4
4
|
export declare enum INSERT_ROW_POSITION {
|
|
5
5
|
ABOVE = 0,
|
|
6
6
|
BELLOW = 1
|
|
@@ -82,4 +82,13 @@ export declare function getDeleteRowContentActionParams(rangeInfo: IRangeInfo, v
|
|
|
82
82
|
cursor: number;
|
|
83
83
|
rowCount: number;
|
|
84
84
|
} | null;
|
|
85
|
+
export interface IOffsets {
|
|
86
|
+
startOffset: number;
|
|
87
|
+
endOffset: number;
|
|
88
|
+
}
|
|
89
|
+
export declare enum CellPosition {
|
|
90
|
+
NEXT = 0,
|
|
91
|
+
PREV = 1
|
|
92
|
+
}
|
|
93
|
+
export declare function getCellOffsets(viewModel: DocumentViewModel, range: ITextActiveRange, position: CellPosition): Nullable<IOffsets>;
|
|
85
94
|
export {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { IMutation, IMutationCommonParams, JSONXActions, Nullable } from '@univerjs/core';
|
|
2
2
|
import { ITextRangeWithStyle } from '@univerjs/engine-render';
|
|
3
|
-
|
|
4
3
|
export interface IRichTextEditingMutationParams extends IMutationCommonParams {
|
|
5
4
|
unitId: string;
|
|
6
5
|
actions: JSONXActions;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
|
|
2
2
|
import { TextSelectionManagerService } from '../services/text-selection-manager.service';
|
|
3
|
-
|
|
4
3
|
export declare class DocCustomRangeController extends Disposable {
|
|
5
4
|
private readonly _commandService;
|
|
6
5
|
private readonly _textSelectionManagerService;
|
|
@@ -2,7 +2,6 @@ import { Disposable, ICommandService, IUniverInstanceService } from '@univerjs/c
|
|
|
2
2
|
import { IRenderManagerService, ITextSelectionRenderManager } from '@univerjs/engine-render';
|
|
3
3
|
import { IMEInputManagerService } from '../services/ime-input-manager.service';
|
|
4
4
|
import { TextSelectionManagerService } from '../services/text-selection-manager.service';
|
|
5
|
-
|
|
6
5
|
export declare class IMEInputController extends Disposable {
|
|
7
6
|
private readonly _univerInstanceService;
|
|
8
7
|
private readonly _renderManagerSrv;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
|
|
2
2
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
3
3
|
import { TextSelectionManagerService } from '../services/text-selection-manager.service';
|
|
4
|
-
|
|
5
4
|
export declare class MoveCursorController extends Disposable {
|
|
6
5
|
private readonly _univerInstanceService;
|
|
7
6
|
private readonly _renderManagerService;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
|
|
2
2
|
import { IRenderManagerService, ITextSelectionRenderManager } from '@univerjs/engine-render';
|
|
3
|
-
|
|
4
3
|
export declare class NormalInputController extends Disposable {
|
|
5
4
|
private readonly _univerInstanceService;
|
|
6
5
|
private readonly _renderManagerService;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -13,9 +13,11 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
export { getCustomRangesInterestsWithRange } from './basics/custom-range';
|
|
16
17
|
export { getParagraphsInRange, getParagraphsInRanges } from './commands/commands/list.command';
|
|
17
18
|
export { replaceSelectionFactory } from './basics/replace';
|
|
18
19
|
export { makeSelection, getSelectionText, getDeleteSelection, getInsertSelection, isSegmentIntersects } from './basics/selection';
|
|
20
|
+
export { hasParagraphInTable } from './basics/paragraph';
|
|
19
21
|
export type { IDocObjectParam } from './basics/component-tools';
|
|
20
22
|
export { getDocObject, neoGetDocObject, getDocObjectById } from './basics/component-tools';
|
|
21
23
|
export * from './basics/docs-view-key';
|
|
@@ -43,7 +45,7 @@ export { SetDocZoomRatioOperation, type ISetDocZoomRatioOperationParams } from '
|
|
|
43
45
|
export { SetTextSelectionsOperation, type ISetTextSelectionsOperationParams, } from './commands/operations/text-selection.operation';
|
|
44
46
|
export { getRetainAndDeleteFromReplace } from './basics/retain-delete-params';
|
|
45
47
|
export { getRichTextEditPath } from './commands/util';
|
|
46
|
-
export { getPlainTextFormDocument } from './basics/plain-text';
|
|
48
|
+
export { getPlainTextFormDocument, getPlainTextFormBody } from './basics/plain-text';
|
|
47
49
|
export { addCustomRangeFactory, addCustomRangeBySelectionFactory, deleteCustomRangeFactory } from './basics/custom-range-factory';
|
|
48
50
|
export { addCustomDecorationBySelectionFactory, addCustomDecorationFactory, deleteCustomDecorationFactory } from './basics/custom-decoration-factory';
|
|
49
51
|
export { DocInterceptorService } from './services/doc-interceptor/doc-interceptor.service';
|
|
@@ -58,7 +60,7 @@ export { DocTableDeleteRowsCommand, DocTableDeleteColumnsCommand, DocTableDelete
|
|
|
58
60
|
export type { IDocTableDeleteRowsCommandParams, IDocTableDeleteColumnsCommandParams, IDocTableDeleteTableCommandParams } from './commands/commands/table/doc-table-delete.command';
|
|
59
61
|
export type { IDocTableInsertColumnCommandParams, IDocTableInsertRowCommandParams, IDocTableInsertColumnRightCommandParams, IDocTableInsertRowAboveCommandParams, IDocTableInsertRowBellowCommandParams, IDocTableInsertColumnLeftCommandParams } from './commands/commands/table/doc-table-insert.command';
|
|
60
62
|
export { DocTableInsertColumnCommand, DocTableInsertRowCommand, DocTableInsertColumnRightCommand, DocTableInsertRowAboveCommand, DocTableInsertRowBellowCommand, DocTableInsertColumnLeftCommand } from './commands/commands/table/doc-table-insert.command';
|
|
61
|
-
export type {
|
|
62
|
-
export { DocTableTabCommand
|
|
63
|
+
export type { IDocTableTabCommandParams } from './commands/commands/table/doc-table-tab.command';
|
|
64
|
+
export { DocTableTabCommand } from './commands/commands/table/doc-table-tab.command';
|
|
63
65
|
export { genTableSource, getEmptyTableRow, getEmptyTableCell, getTableColumn } from './commands/commands/table/table';
|
|
64
66
|
export { getCursorWhenDelete } from './commands/commands/delete.command';
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { DocumentDataModel, ICommandInfo, ICustomRange, IDisposable, IParagraphRange,
|
|
2
|
-
import { TextSelectionManagerService } from './text-selection-manager.service';
|
|
3
|
-
|
|
1
|
+
import { DocumentDataModel, ICommandInfo, ICustomRange, IDisposable, IParagraphRange, Nullable, Disposable, IUniverInstanceService } from '@univerjs/core';
|
|
2
|
+
import { ITextActiveRange, TextSelectionManagerService } from './text-selection-manager.service';
|
|
4
3
|
export interface IAutoFormatContext {
|
|
5
4
|
unit: DocumentDataModel;
|
|
6
|
-
selection:
|
|
5
|
+
selection: ITextActiveRange;
|
|
7
6
|
/**
|
|
8
7
|
* is selection at doc body
|
|
9
8
|
*/
|
|
@@ -26,7 +25,7 @@ export interface IAutoFormat {
|
|
|
26
25
|
priority?: number;
|
|
27
26
|
}
|
|
28
27
|
/**
|
|
29
|
-
* service for auto-
|
|
28
|
+
* service for auto-formatting, handle shortcut like `Space` or `Tab`.
|
|
30
29
|
*/
|
|
31
30
|
export declare class DocAutoFormatService extends Disposable {
|
|
32
31
|
private readonly _univerInstanceService;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { DocumentDataModel, IInterceptor, Disposable, DisposableCollection } from '@univerjs/core';
|
|
1
|
+
import { DocumentDataModel, IInterceptor, Nullable, 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;
|
|
8
7
|
private _interceptorsByName;
|
|
9
8
|
constructor(_context: IRenderContext<DocumentDataModel>, _docSkeletonManagerService: DocSkeletonManagerService);
|
|
10
9
|
intercept<T extends IInterceptor<any, any>>(name: T, interceptor: T): import('@univerjs/core').IDisposable;
|
|
11
|
-
fetchThroughInterceptors<T, C>(name: IInterceptor<T, C>): (initValue:
|
|
10
|
+
fetchThroughInterceptors<T, C>(name: IInterceptor<T, C>): (initValue: Nullable<T>, initContext: C) => Nullable<T>;
|
|
12
11
|
interceptDocumentViewModel(viewModel: DocumentViewModel): DisposableCollection;
|
|
13
12
|
}
|
|
@@ -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,6 +1,5 @@
|
|
|
1
1
|
import { Nullable, ICommandService, RxDisposable } from '@univerjs/core';
|
|
2
2
|
import { IDocRange, INodePosition, ISuccinctDocRangeParam, ITextRangeWithStyle, ITextSelectionInnerParam, ITextSelectionStyle, RANGE_DIRECTION, RectRange, TextRange, ITextSelectionRenderManager } from '@univerjs/engine-render';
|
|
3
|
-
|
|
4
3
|
interface IDocSelectionManagerSearchParam {
|
|
5
4
|
unitId: string;
|
|
6
5
|
subUnitId: string;
|