@textbus/platform-browser 3.0.0-alpha.25 → 3.0.0-alpha.26
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/bundles/_utils/uikit.d.ts +10 -0
- package/bundles/collaborate/collaborate-cursor.d.ts +2 -1
- package/bundles/core/_api.d.ts +2 -2
- package/bundles/core/dom-renderer.d.ts +1 -0
- package/bundles/core/magic-input.d.ts +71 -0
- package/bundles/core/native-input.d.ts +51 -0
- package/bundles/core/selection-bridge.d.ts +4 -13
- package/bundles/core/types.d.ts +31 -0
- package/bundles/index.esm.js +1633 -1411
- package/bundles/index.js +1630 -1407
- package/package.json +3 -3
- package/bundles/core/caret.d.ts +0 -51
- package/bundles/core/input.d.ts +0 -40
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@textbus/platform-browser",
|
3
|
-
"version": "3.0.0-alpha.
|
3
|
+
"version": "3.0.0-alpha.26",
|
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": "./bundles/index.js",
|
6
6
|
"module": "./bundles/index.esm.js",
|
@@ -27,7 +27,7 @@
|
|
27
27
|
"dependencies": {
|
28
28
|
"@tanbo/di": "^1.1.3",
|
29
29
|
"@tanbo/stream": "^1.1.8",
|
30
|
-
"@textbus/core": "^3.0.0-alpha.
|
30
|
+
"@textbus/core": "^3.0.0-alpha.26",
|
31
31
|
"reflect-metadata": "^0.1.13"
|
32
32
|
},
|
33
33
|
"devDependencies": {
|
@@ -48,5 +48,5 @@
|
|
48
48
|
"bugs": {
|
49
49
|
"url": "https://github.com/textbus/textbus.git/issues"
|
50
50
|
},
|
51
|
-
"gitHead": "
|
51
|
+
"gitHead": "04e1a5ca0c3f2986f8f154a83a696cbd96eff44d"
|
52
52
|
}
|
package/bundles/core/caret.d.ts
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
import { Observable } from '@tanbo/stream';
|
2
|
-
import { Injector } from '@tanbo/di';
|
3
|
-
import { Scheduler } from '@textbus/core';
|
4
|
-
import { Rect } from './selection-bridge';
|
5
|
-
export declare function getLayoutRectByRange(range: Range): Rect;
|
6
|
-
export interface CaretPosition {
|
7
|
-
left: number;
|
8
|
-
top: number;
|
9
|
-
height: number;
|
10
|
-
}
|
11
|
-
export interface CaretStyle {
|
12
|
-
height: string;
|
13
|
-
lineHeight: string;
|
14
|
-
fontSize: string;
|
15
|
-
}
|
16
|
-
export interface CaretLimit {
|
17
|
-
top: number;
|
18
|
-
bottom: number;
|
19
|
-
}
|
20
|
-
export interface Scroller {
|
21
|
-
onScroll: Observable<any>;
|
22
|
-
getLimit(): CaretLimit;
|
23
|
-
setOffset(offsetScrollTop: number): void;
|
24
|
-
}
|
25
|
-
export declare class Caret {
|
26
|
-
private scheduler;
|
27
|
-
private injector;
|
28
|
-
onPositionChange: Observable<CaretPosition | null>;
|
29
|
-
onStyleChange: Observable<CaretStyle>;
|
30
|
-
elementRef: HTMLElement;
|
31
|
-
private timer;
|
32
|
-
private caret;
|
33
|
-
private oldPosition;
|
34
|
-
private set display(value);
|
35
|
-
private get display();
|
36
|
-
private _display;
|
37
|
-
private flashing;
|
38
|
-
private subs;
|
39
|
-
private positionChangeEvent;
|
40
|
-
private styleChangeEvent;
|
41
|
-
private oldRange;
|
42
|
-
private isFixed;
|
43
|
-
private editorMask;
|
44
|
-
constructor(scheduler: Scheduler, injector: Injector);
|
45
|
-
refresh(isFixedCaret?: boolean): void;
|
46
|
-
show(range: Range, restart: boolean): void;
|
47
|
-
hide(): void;
|
48
|
-
destroy(): void;
|
49
|
-
correctScrollTop(scroller: Scroller): void;
|
50
|
-
private updateCursorPosition;
|
51
|
-
}
|
package/bundles/core/input.d.ts
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
import { Commander, Controller, Keyboard, Scheduler, Selection } from '@textbus/core';
|
2
|
-
import { Parser } from '../dom-support/parser';
|
3
|
-
import { Caret } from './caret';
|
4
|
-
/**
|
5
|
-
* Textbus PC 端输入实现
|
6
|
-
*/
|
7
|
-
export declare class Input {
|
8
|
-
private parser;
|
9
|
-
private keyboard;
|
10
|
-
private commander;
|
11
|
-
private selection;
|
12
|
-
private controller;
|
13
|
-
private scheduler;
|
14
|
-
private caret;
|
15
|
-
static openExperimentalCompositionInput: boolean;
|
16
|
-
onReady: Promise<void>;
|
17
|
-
private container;
|
18
|
-
private subscription;
|
19
|
-
private doc;
|
20
|
-
private textarea;
|
21
|
-
private isFocus;
|
22
|
-
private inputFormatterId;
|
23
|
-
private inputFormatter;
|
24
|
-
private nativeFocus;
|
25
|
-
private isSafari;
|
26
|
-
private isMac;
|
27
|
-
private isWindows;
|
28
|
-
private isSougouPinYin;
|
29
|
-
constructor(parser: Parser, keyboard: Keyboard, commander: Commander, selection: Selection, controller: Controller, scheduler: Scheduler, caret: Caret);
|
30
|
-
focus(): void;
|
31
|
-
blur(): void;
|
32
|
-
destroy(): void;
|
33
|
-
private init;
|
34
|
-
private handleDefaultActions;
|
35
|
-
private handlePaste;
|
36
|
-
private handleShortcut;
|
37
|
-
private handleInput;
|
38
|
-
private experimentalCompositionInput;
|
39
|
-
private createEditableFrame;
|
40
|
-
}
|