@univerjs/engine-render 0.1.1 → 0.1.2
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/README.md +8 -3
- package/lib/cjs/index.js +2 -58
- package/lib/es/index.js +1571 -1639
- package/lib/types/components/docs/common/text-range.d.ts +10 -1
- package/lib/types/components/docs/text-selection-render-manager.d.ts +1 -4
- package/lib/types/components/sheets/sheet-skeleton.d.ts +1 -0
- package/lib/umd/index.js +2 -58
- package/package.json +4 -4
|
@@ -17,12 +17,20 @@ import type { Nullable } from '@univerjs/core';
|
|
|
17
17
|
import type { INodePosition } from '../../../basics/interfaces';
|
|
18
18
|
import type { ISuccinctTextRangeParam, ITextSelectionStyle } from '../../../basics/range';
|
|
19
19
|
import { RANGE_DIRECTION } from '../../../basics/range';
|
|
20
|
+
import type { IPoint } from '../../../basics/vector2';
|
|
20
21
|
import type { Scene } from '../../../scene';
|
|
21
22
|
import { Rect } from '../../../shape/rect';
|
|
22
23
|
import type { ThinScene } from '../../../thin-scene';
|
|
23
24
|
import type { DocumentSkeleton } from '../doc-skeleton';
|
|
24
25
|
import type { Documents } from '../document';
|
|
26
|
+
export declare const TEXT_RANGE_LAYER_INDEX = 1;
|
|
25
27
|
export declare function cursorConvertToTextRange(scene: Scene, range: ISuccinctTextRangeParam, docSkeleton: DocumentSkeleton, document: Documents): Nullable<TextRange>;
|
|
28
|
+
export declare function getAnchorBounding(pointsGroup: IPoint[][]): {
|
|
29
|
+
left: number;
|
|
30
|
+
top: number;
|
|
31
|
+
width: number;
|
|
32
|
+
height: number;
|
|
33
|
+
};
|
|
26
34
|
export declare class TextRange {
|
|
27
35
|
private _scene;
|
|
28
36
|
private _document;
|
|
@@ -34,7 +42,9 @@ export declare class TextRange {
|
|
|
34
42
|
private _rangeShape;
|
|
35
43
|
private _anchorShape;
|
|
36
44
|
private _cursorList;
|
|
45
|
+
private _anchorBlinkTimer;
|
|
37
46
|
constructor(_scene: ThinScene, _document: Documents, _docSkeleton: DocumentSkeleton, anchorNodePosition?: Nullable<INodePosition>, focusNodePosition?: Nullable<INodePosition>, style?: ITextSelectionStyle);
|
|
47
|
+
private _anchorBlink;
|
|
38
48
|
get startOffset(): number | undefined;
|
|
39
49
|
get endOffset(): number | undefined;
|
|
40
50
|
get collapsed(): boolean;
|
|
@@ -53,7 +63,6 @@ export declare class TextRange {
|
|
|
53
63
|
private _isEmpty;
|
|
54
64
|
private _isCollapsed;
|
|
55
65
|
private _createOrUpdateRange;
|
|
56
|
-
private _getAnchorBounding;
|
|
57
66
|
private _createOrUpdateAnchor;
|
|
58
67
|
private _setCursorList;
|
|
59
68
|
}
|
|
@@ -111,7 +111,6 @@ export declare class TextSelectionRenderManager extends RxDisposable implements
|
|
|
111
111
|
private _container;
|
|
112
112
|
private _inputParent;
|
|
113
113
|
private _input;
|
|
114
|
-
private _cursor;
|
|
115
114
|
private _moveObserver;
|
|
116
115
|
private _upObserver;
|
|
117
116
|
private _viewportScrollX;
|
|
@@ -153,7 +152,6 @@ export declare class TextSelectionRenderManager extends RxDisposable implements
|
|
|
153
152
|
dispose(): void;
|
|
154
153
|
private _initDOM;
|
|
155
154
|
private _initInput;
|
|
156
|
-
private _initDOMCursor;
|
|
157
155
|
private _getNodePosition;
|
|
158
156
|
private _interactTextRange;
|
|
159
157
|
private _removeAllTextRanges;
|
|
@@ -163,8 +161,7 @@ export declare class TextSelectionRenderManager extends RxDisposable implements
|
|
|
163
161
|
private _updateActiveRangeFocusPosition;
|
|
164
162
|
private _isEmpty;
|
|
165
163
|
private _getCanvasOffset;
|
|
166
|
-
private
|
|
167
|
-
private _updateDomCursorPositionAndSize;
|
|
164
|
+
private _updateInputPosition;
|
|
168
165
|
private _moving;
|
|
169
166
|
private _attachScrollEvent;
|
|
170
167
|
private _initInputEvents;
|
|
@@ -107,6 +107,7 @@ export declare class SpreadsheetSkeleton extends Skeleton {
|
|
|
107
107
|
calculateAutoHeightInRange(ranges: Nullable<IRange[]>): IRowAutoHeightInfo[];
|
|
108
108
|
private _calculateRowAutoHeight;
|
|
109
109
|
updateLayout(): this | undefined;
|
|
110
|
+
private _dynamicallyUpdateRowHeaderWidth;
|
|
110
111
|
getRowColumnSegment(bounds?: IViewportBound): {
|
|
111
112
|
startRow: number;
|
|
112
113
|
endRow: number;
|