@textbus/platform-browser 5.4.8 → 5.4.10
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/dist/index.esm.js +480 -329
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +480 -329
- package/dist/index.js.map +1 -1
- package/dist/native-input.d.ts +2 -4
- package/dist/selection-bridge.d.ts +14 -7
- package/package.json +2 -2
package/dist/native-input.d.ts
CHANGED
|
@@ -34,8 +34,7 @@ export declare class NativeInput extends Input {
|
|
|
34
34
|
private nativeRange;
|
|
35
35
|
private isSafari;
|
|
36
36
|
private isMac;
|
|
37
|
-
private
|
|
38
|
-
private ignoreComposition;
|
|
37
|
+
private compositionEndedAt;
|
|
39
38
|
constructor(textbus: Textbus, parser: Parser, selection: Selection, keyboard: Keyboard, domAdapter: DomAdapter, commander: Commander, controller: Controller);
|
|
40
39
|
focus(nativeRange: Range): void;
|
|
41
40
|
blur(): void;
|
|
@@ -46,7 +45,6 @@ export declare class NativeInput extends Input {
|
|
|
46
45
|
private paste;
|
|
47
46
|
private handleShortcut;
|
|
48
47
|
private handleInput;
|
|
49
|
-
private
|
|
50
|
-
private handlePCInput;
|
|
48
|
+
private syncCompositionText;
|
|
51
49
|
}
|
|
52
50
|
export {};
|
|
@@ -46,17 +46,24 @@ export declare class SelectionBridge implements NativeSelectionBridge {
|
|
|
46
46
|
getNextLinePositionByCurrent(position: SelectionPosition): SelectionPosition | null;
|
|
47
47
|
private getLinePosition;
|
|
48
48
|
/**
|
|
49
|
-
*
|
|
49
|
+
* 计算光标到下一行或上一行的位置
|
|
50
50
|
* @param currentPosition
|
|
51
|
-
* @param startLeft
|
|
51
|
+
* @param startLeft
|
|
52
|
+
* @param toNext
|
|
53
|
+
* @private
|
|
52
54
|
*/
|
|
53
|
-
private
|
|
55
|
+
private getVerticalMovePosition;
|
|
56
|
+
/** 目标位置是否仍在当前视觉行内 */
|
|
57
|
+
private isSameLine;
|
|
54
58
|
/**
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
59
|
+
* 沿目标行微调位置。
|
|
60
|
+
* 起点在 targetX 右侧 → 向左找到离 targetX 最近的右侧位置;
|
|
61
|
+
* 起点在 targetX 左侧 → 向右找到第一个右侧位置。
|
|
58
62
|
*/
|
|
59
|
-
private
|
|
63
|
+
private refineXOnLine;
|
|
64
|
+
/** 跳转到文档开头或结尾 */
|
|
65
|
+
private getDocumentBoundary;
|
|
66
|
+
private caretPositionFromPoint;
|
|
60
67
|
private unListen;
|
|
61
68
|
private listen;
|
|
62
69
|
private syncSelection;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@textbus/platform-browser",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.10",
|
|
4
4
|
"description": "Textbus is a rich text editor and framework that is highly customizable and extensible to achieve rich wysiwyg effects.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.esm.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@tanbo/stream": "^1.2.7",
|
|
36
36
|
"@viewfly/core": "^3.0.5",
|
|
37
|
-
"@textbus/core": "^5.4.
|
|
37
|
+
"@textbus/core": "^5.4.10"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"rimraf": "^3.0.2",
|