@univerjs/docs 0.2.7 → 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 +3 -3
- package/lib/es/index.js +19 -14
- 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 -1
- package/lib/types/basics/custom-range.d.ts +0 -1
- 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 +0 -1
- package/lib/types/basics/table.d.ts +0 -1
- 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 -1
- 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 +0 -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 +0 -1
- package/lib/types/commands/commands/table/table.d.ts +0 -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/services/doc-auto-format.service.d.ts +0 -1
- 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 +0 -1
- package/lib/umd/index.js +3 -3
- package/package.json +8 -8
package/lib/es/index.js
CHANGED
|
@@ -2,7 +2,7 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key] = value;
|
|
3
3
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
|
|
4
4
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key != "symbol" ? key + "" : key, value);
|
|
5
|
-
import { CommandType, RxDisposable, ICommandService, Inject, IUndoRedoService, UndoCommandId, RedoCommandId, JSONX, IUniverInstanceService, LocaleService, UniverInstanceType,
|
|
5
|
+
import { CommandType, RxDisposable, ICommandService, Inject, IUndoRedoService, UndoCommandId, RedoCommandId, JSONX, IUniverInstanceService, LocaleService, UniverInstanceType, isInternalEditorID, Tools, PresetListType, MemoryCursor, TextX, PRESET_LIST_TYPE, GridType, TextXActionType, BooleanNumber, UpdateDocsAttributeType, sortRulesFactory, DataStreamTreeTokenType, toDisposable, normalizeBody, getBodySlice, updateAttributeByInsert, TableCellHeightRule, TableSizeType, generateRandomId, TableAlignmentType, TableTextWrapType, ObjectRelativeFromH, ObjectRelativeFromV, PositionedObjectLayoutType, getCustomRangeSlice, getCustomDecorationSlice, BaselineOffset, OnLifecycle, LifecycleStages, Disposable, Direction, sequenceExecuteAsync, HorizontalAlign, Plugin, Injector, createInterceptorKey, DOCS_NORMAL_EDITOR_UNIT_ID_KEY, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY, remove, composeInterceptors, DisposableCollection } from "@univerjs/core";
|
|
6
6
|
import { NORMAL_TEXT_SELECTION_PLUGIN_STYLE, ITextSelectionRenderManager, DocumentSkeleton, DocumentViewModel, IRenderManagerService, getCharSpaceApply, getNumberUnitValue, hasListGlyph, isIndentByGlyph, isFirstGlyph, getParagraphByGlyph, DocumentSkeletonPageType, lineIterator, getLastLine, RANGE_DIRECTION, NodePositionConvertToCursor, TextSelectionRenderManager } from "@univerjs/engine-render";
|
|
7
7
|
import { BehaviorSubject, takeUntil } from "rxjs";
|
|
8
8
|
import { TextSelectionManagerService as TextSelectionManagerService$1, getCommandSkeleton as getCommandSkeleton$1, getInsertSelection as getInsertSelection$1, RichTextEditingMutation as RichTextEditingMutation$1, generateParagraphs as generateParagraphs$1, getRichTextEditPath as getRichTextEditPath$1 } from "@univerjs/docs";
|
|
@@ -362,7 +362,7 @@ let DocSkeletonManagerService = (_a3 = class extends RxDisposable {
|
|
|
362
362
|
const unitId = this._context.unitId;
|
|
363
363
|
if (documentDataModel.getBody() == null)
|
|
364
364
|
return;
|
|
365
|
-
this._docViewModel && unitId
|
|
365
|
+
this._docViewModel && isInternalEditorID(unitId) ? (this._docViewModel.reset(documentDataModel), this._context.unit = documentDataModel) : this._docViewModel || (this._docViewModel = this._buildDocViewModel(documentDataModel)), this._skeleton || (this._skeleton = this._buildSkeleton(this._docViewModel));
|
|
366
366
|
const skeleton = this._skeleton;
|
|
367
367
|
skeleton.calculate(), this._currentSkeletonBefore$.next(skeleton), this._currentSkeleton$.next(skeleton), this._currentViewModel$.next(this._docViewModel);
|
|
368
368
|
}
|
|
@@ -1092,7 +1092,7 @@ function isSegmentIntersects(start, end, start2, end2) {
|
|
|
1092
1092
|
return Math.max(start, start2) <= Math.min(end, end2);
|
|
1093
1093
|
}
|
|
1094
1094
|
__name(isSegmentIntersects, "isSegmentIntersects");
|
|
1095
|
-
function getRetainAndDeleteAndExcludeLineBreak(selection, body, segmentId = "", memoryCursor = 0) {
|
|
1095
|
+
function getRetainAndDeleteAndExcludeLineBreak(selection, body, segmentId = "", memoryCursor = 0, preserveLineBreak = !0) {
|
|
1096
1096
|
var _a11;
|
|
1097
1097
|
const { startOffset, endOffset } = getDeleteSelection(selection, body), dos = [], { paragraphs = [], dataStream } = body, textStart = startOffset - memoryCursor, textEnd = endOffset - memoryCursor, paragraphInRange = paragraphs == null ? void 0 : paragraphs.find(
|
|
1098
1098
|
(p) => p.startIndex - memoryCursor >= textStart && p.startIndex - memoryCursor < textEnd
|
|
@@ -1103,7 +1103,7 @@ function getRetainAndDeleteAndExcludeLineBreak(selection, body, segmentId = "",
|
|
|
1103
1103
|
t: TextXActionType.RETAIN,
|
|
1104
1104
|
len: textStart,
|
|
1105
1105
|
segmentId
|
|
1106
|
-
}), paragraphInRange && paragraphInRange.startIndex - memoryCursor > textStart) {
|
|
1106
|
+
}), preserveLineBreak && paragraphInRange && paragraphInRange.startIndex - memoryCursor > textStart) {
|
|
1107
1107
|
const paragraphIndex = paragraphInRange.startIndex - memoryCursor;
|
|
1108
1108
|
retainPoints.add(paragraphIndex);
|
|
1109
1109
|
}
|
|
@@ -1131,10 +1131,16 @@ function getRetainAndDeleteAndExcludeLineBreak(selection, body, segmentId = "",
|
|
|
1131
1131
|
__name(getRetainAndDeleteAndExcludeLineBreak, "getRetainAndDeleteAndExcludeLineBreak");
|
|
1132
1132
|
function replaceSelectionFactory(accessor, params) {
|
|
1133
1133
|
var _a11, _b;
|
|
1134
|
-
const { unitId, body: insertBody } = params,
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1134
|
+
const { unitId, originBody, body: insertBody } = params, univerInstanceService = accessor.get(IUniverInstanceService);
|
|
1135
|
+
let body;
|
|
1136
|
+
if (params.originBody)
|
|
1137
|
+
body = originBody;
|
|
1138
|
+
else {
|
|
1139
|
+
const docDataModel = univerInstanceService.getUnit(unitId);
|
|
1140
|
+
body = docDataModel == null ? void 0 : docDataModel.getBody();
|
|
1141
|
+
}
|
|
1142
|
+
if (!body) return !1;
|
|
1143
|
+
const textSelectionManagerService = accessor.get(TextSelectionManagerService), selection = (_a11 = params.selection) != null ? _a11 : textSelectionManagerService.getActiveTextRangeWithStyle();
|
|
1138
1144
|
if (!selection || !body)
|
|
1139
1145
|
return !1;
|
|
1140
1146
|
const textRanges = (_b = params.textRanges) != null ? _b : [{
|
|
@@ -1599,14 +1605,14 @@ function getInsertRowBody(col) {
|
|
|
1599
1605
|
for (let i = 0; i < col; i++)
|
|
1600
1606
|
dataStream += `${DataStreamTreeTokenType.TABLE_CELL_START}\r
|
|
1601
1607
|
${DataStreamTreeTokenType.TABLE_CELL_END}`, paragraphs.push({
|
|
1602
|
-
startIndex: dataStream.length -
|
|
1608
|
+
startIndex: dataStream.length - 3,
|
|
1603
1609
|
paragraphStyle: {
|
|
1604
1610
|
spaceAbove: { v: 3 },
|
|
1605
1611
|
lineSpacing: 2,
|
|
1606
1612
|
spaceBelow: { v: 0 }
|
|
1607
1613
|
}
|
|
1608
1614
|
}), sectionBreaks.push({
|
|
1609
|
-
startIndex: dataStream.length -
|
|
1615
|
+
startIndex: dataStream.length - 2
|
|
1610
1616
|
});
|
|
1611
1617
|
return dataStream += DataStreamTreeTokenType.TABLE_ROW_END, {
|
|
1612
1618
|
dataStream,
|
|
@@ -1950,7 +1956,7 @@ function getCutActionsFromTextRanges(selections, docDataModel, segmentId) {
|
|
|
1950
1956
|
t: TextXActionType.RETAIN,
|
|
1951
1957
|
len,
|
|
1952
1958
|
segmentId
|
|
1953
|
-
}) : textX.push(...getRetainAndDeleteAndExcludeLineBreak(selection, originBody, segmentId, memoryCursor.cursor)), memoryCursor.reset(), memoryCursor.moveCursor(endOffset);
|
|
1959
|
+
}) : textX.push(...getRetainAndDeleteAndExcludeLineBreak(selection, originBody, segmentId, memoryCursor.cursor, !1)), memoryCursor.reset(), memoryCursor.moveCursor(endOffset);
|
|
1954
1960
|
}
|
|
1955
1961
|
const path = getRichTextEditPath(docDataModel, segmentId);
|
|
1956
1962
|
rawActions.push(jsonX.editOp(textX.serialize(), path));
|
|
@@ -2127,7 +2133,6 @@ const DeleteCustomBlockCommand = {
|
|
|
2127
2133
|
type: CommandType.COMMAND,
|
|
2128
2134
|
// eslint-disable-next-line max-lines-per-function
|
|
2129
2135
|
handler: /* @__PURE__ */ __name(async (accessor, params) => {
|
|
2130
|
-
var _a11, _b;
|
|
2131
2136
|
const textSelectionManagerService = accessor.get(TextSelectionManagerService), univerInstanceService = accessor.get(IUniverInstanceService), commandService = accessor.get(ICommandService), { direction, range } = params, activeRange = textSelectionManagerService.getActiveTextRangeWithStyle(), ranges = textSelectionManagerService.getCurrentTextRanges();
|
|
2132
2137
|
if (activeRange == null || ranges == null)
|
|
2133
2138
|
return !1;
|
|
@@ -2137,7 +2142,7 @@ const DeleteCustomBlockCommand = {
|
|
|
2137
2142
|
const actualRange = getDeleteSelection(activeRange, originBody), unitId = docDataModel.getUnitId(), { startOffset, collapsed } = actualRange;
|
|
2138
2143
|
if (!collapsed)
|
|
2139
2144
|
return !1;
|
|
2140
|
-
const startIndex = direction === DeleteDirection.LEFT ? startOffset : startOffset + 1, endIndex =
|
|
2145
|
+
const startIndex = direction === DeleteDirection.LEFT ? startOffset : startOffset + 1, endIndex = originBody.paragraphs.find((p) => p.startIndex >= startIndex).startIndex, body = getParagraphBody(accessor, unitId, originBody, startIndex, endIndex), cursor = direction === DeleteDirection.LEFT ? startOffset - 1 : startOffset, textRanges = [
|
|
2141
2146
|
{
|
|
2142
2147
|
startOffset: cursor,
|
|
2143
2148
|
endOffset: cursor,
|
|
@@ -2334,7 +2339,7 @@ const DeleteLeftCommand = {
|
|
|
2334
2339
|
}, DeleteRightCommand = {
|
|
2335
2340
|
id: "doc.command.delete-right",
|
|
2336
2341
|
type: CommandType.COMMAND,
|
|
2337
|
-
// eslint-disable-next-line max-lines-per-function
|
|
2342
|
+
// eslint-disable-next-line max-lines-per-function, complexity
|
|
2338
2343
|
handler: /* @__PURE__ */ __name(async (accessor) => {
|
|
2339
2344
|
var _a11, _b;
|
|
2340
2345
|
const textSelectionManagerService = accessor.get(TextSelectionManagerService), docDataModel = accessor.get(IUniverInstanceService).getCurrentUniverDocInstance();
|
|
@@ -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;
|
|
@@ -1,5 +1,4 @@
|
|
|
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;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { IAccessor, IDeleteAction, IDocumentBody, IMutationInfo, IRetainAction, ITextRange } 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
7
|
selection?: ITextRange;
|
|
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): {
|
|
@@ -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;
|
|
@@ -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,7 +1,6 @@
|
|
|
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;
|
|
@@ -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 } 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,6 +1,5 @@
|
|
|
1
1
|
import { IParagraph, ISectionBreak, ITable, ITableCell, ITableColumn, ITableRow, Nullable } from '@univerjs/core';
|
|
2
2
|
import { DocumentViewModel, RectRange, TextRange } from '@univerjs/engine-render';
|
|
3
|
-
|
|
4
3
|
export declare enum INSERT_ROW_POSITION {
|
|
5
4
|
ABOVE = 0,
|
|
6
5
|
BELLOW = 1
|
|
@@ -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;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DocumentDataModel, ICommandInfo, ICustomRange, IDisposable, IParagraphRange, ITextRange, Nullable, Disposable, IUniverInstanceService } from '@univerjs/core';
|
|
2
2
|
import { TextSelectionManagerService } from './text-selection-manager.service';
|
|
3
|
-
|
|
4
3
|
export interface IAutoFormatContext {
|
|
5
4
|
unit: DocumentDataModel;
|
|
6
5
|
selection: ITextRange;
|
|
@@ -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,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;
|