@textbus/platform-browser 5.4.9 → 5.4.11
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 +457 -335
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +457 -335
- package/dist/index.js.map +1 -1
- package/dist/native-input.d.ts +2 -4
- package/dist/selection-bridge.d.ts +12 -8
- 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,21 @@ export declare class SelectionBridge implements NativeSelectionBridge {
|
|
|
46
46
|
getNextLinePositionByCurrent(position: SelectionPosition): SelectionPosition | null;
|
|
47
47
|
private getLinePosition;
|
|
48
48
|
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* @param startLeft 参考位置。
|
|
49
|
+
* 通过遍历模型位置 + 视觉 rect 判断换行,计算光标到下一行或上一行的位置。
|
|
50
|
+
* 不使用 Selection.modify(),避免复杂布局中的死循环。
|
|
52
51
|
*/
|
|
53
|
-
private
|
|
52
|
+
private getVerticalMovePosition;
|
|
53
|
+
/** 目标位置是否已离开起始行 */
|
|
54
|
+
private isDifferentLine;
|
|
54
55
|
/**
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
56
|
+
* 沿目标行微调位置。
|
|
57
|
+
* 起点在 targetX 右侧 → 向左找到离 targetX 最近的右侧位置;
|
|
58
|
+
* 起点在 targetX 左侧 → 向右找到第一个右侧位置。
|
|
58
59
|
*/
|
|
59
|
-
private
|
|
60
|
+
private refineXOnLine;
|
|
61
|
+
/** 跳转到文档开头或结尾 */
|
|
62
|
+
private getDocumentBoundary;
|
|
63
|
+
private caretPositionFromPoint;
|
|
60
64
|
private unListen;
|
|
61
65
|
private listen;
|
|
62
66
|
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.11",
|
|
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.11"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"rimraf": "^3.0.2",
|