@textbus/platform-browser 3.1.7 → 3.1.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/LICENSE +674 -674
- package/README.md +123 -123
- package/bundles/_utils/env.d.ts +5 -5
- package/bundles/_utils/uikit.d.ts +26 -26
- package/bundles/collaborate/collaborate-cursor.d.ts +45 -45
- package/bundles/core/_api.d.ts +6 -6
- package/bundles/core/dom-renderer.d.ts +53 -53
- package/bundles/core/injection-tokens.d.ts +18 -18
- package/bundles/core/magic-input.d.ts +81 -81
- package/bundles/core/native-input.d.ts +54 -54
- package/bundles/core/selection-bridge.d.ts +68 -68
- package/bundles/core/types.d.ts +74 -74
- package/bundles/dom-support/_api.d.ts +2 -2
- package/bundles/dom-support/output-translator.d.ts +16 -16
- package/bundles/dom-support/parser.d.ts +56 -56
- package/bundles/index.esm.js +2769 -2751
- package/bundles/index.js +2768 -2750
- package/bundles/public-api.d.ts +7 -7
- package/bundles/viewer.d.ts +86 -86
- package/package.json +2 -2
package/bundles/public-api.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
import 'reflect-metadata';
|
2
|
-
export * from './_utils/uikit';
|
3
|
-
export * from './_utils/env';
|
4
|
-
export * from './collaborate/collaborate-cursor';
|
5
|
-
export * from './core/_api';
|
6
|
-
export * from './dom-support/_api';
|
7
|
-
export * from './viewer';
|
1
|
+
import 'reflect-metadata';
|
2
|
+
export * from './_utils/uikit';
|
3
|
+
export * from './_utils/env';
|
4
|
+
export * from './collaborate/collaborate-cursor';
|
5
|
+
export * from './core/_api';
|
6
|
+
export * from './dom-support/_api';
|
7
|
+
export * from './viewer';
|
package/bundles/viewer.d.ts
CHANGED
@@ -1,86 +1,86 @@
|
|
1
|
-
import { Observable, Subject, Subscription } from '@tanbo/stream';
|
2
|
-
import { Starter, ComponentLiteral, Component } from '@textbus/core';
|
3
|
-
import { ComponentLoader } from './dom-support/_api';
|
4
|
-
import { ViewOptions } from './core/_api';
|
5
|
-
export interface Resources {
|
6
|
-
styleSheets: string[];
|
7
|
-
styleSheet: string;
|
8
|
-
links: Record<string, string>[];
|
9
|
-
scripts: string[];
|
10
|
-
}
|
11
|
-
/**
|
12
|
-
* Textbus PC 端编辑器
|
13
|
-
*/
|
14
|
-
export declare class Viewer extends Starter {
|
15
|
-
rootComponent: Component;
|
16
|
-
rootComponentLoader: ComponentLoader;
|
17
|
-
options: ViewOptions;
|
18
|
-
/** 当视图获得焦点时触发 */
|
19
|
-
onFocus: Observable<void>;
|
20
|
-
/** 当视图失去焦点时触发 */
|
21
|
-
onBlur: Observable<void>;
|
22
|
-
/** 当编辑器内容变化时触发 */
|
23
|
-
onChange: Observable<void>;
|
24
|
-
/** 当用户按 Ctrl + S 时触发 */
|
25
|
-
onSave: Observable<void>;
|
26
|
-
/** 编辑器是否已销毁 */
|
27
|
-
destroyed: boolean;
|
28
|
-
/** 编辑器是否已准备好 */
|
29
|
-
isReady: boolean;
|
30
|
-
get readonly(): boolean;
|
31
|
-
set readonly(b: boolean);
|
32
|
-
isFocus(): boolean;
|
33
|
-
protected changeEvent: Subject<void>;
|
34
|
-
protected subs: Subscription[];
|
35
|
-
protected _isFocus: boolean;
|
36
|
-
private controller;
|
37
|
-
private workbench;
|
38
|
-
private id;
|
39
|
-
private resourceNodes;
|
40
|
-
private focusEvent;
|
41
|
-
private blurEvent;
|
42
|
-
private saveEvent;
|
43
|
-
private styleSheet;
|
44
|
-
private scripts;
|
45
|
-
private links;
|
46
|
-
constructor(rootComponent: Component, rootComponentLoader: ComponentLoader, options?: ViewOptions);
|
47
|
-
/**
|
48
|
-
* 初始化编辑器
|
49
|
-
* @param host 编辑器容器
|
50
|
-
*/
|
51
|
-
mount(host: HTMLElement): Promise<this>;
|
52
|
-
/**
|
53
|
-
* 获取焦点
|
54
|
-
*/
|
55
|
-
focus(): void;
|
56
|
-
/**
|
57
|
-
* 取消编辑器焦点
|
58
|
-
*/
|
59
|
-
blur(): void;
|
60
|
-
/**
|
61
|
-
* 获取编辑器所有资源
|
62
|
-
*/
|
63
|
-
getResources(): Resources;
|
64
|
-
/**
|
65
|
-
* 获取 HTML 格式的内容
|
66
|
-
*/
|
67
|
-
getHTML(): string;
|
68
|
-
/**
|
69
|
-
* 获取 JSON 格式的内容
|
70
|
-
*/
|
71
|
-
getJSON(): ComponentLiteral;
|
72
|
-
/**
|
73
|
-
* 销毁编辑器
|
74
|
-
*/
|
75
|
-
destroy(): void;
|
76
|
-
/**
|
77
|
-
* 替换编辑的内容
|
78
|
-
* @param content
|
79
|
-
*/
|
80
|
-
replaceContent(content: string | ComponentLiteral): void;
|
81
|
-
protected guardReady(): void;
|
82
|
-
private initDefaultShortcut;
|
83
|
-
private initDocStyleSheetsAndScripts;
|
84
|
-
private static createLayout;
|
85
|
-
private static cssMin;
|
86
|
-
}
|
1
|
+
import { Observable, Subject, Subscription } from '@tanbo/stream';
|
2
|
+
import { Starter, ComponentLiteral, Component } from '@textbus/core';
|
3
|
+
import { ComponentLoader } from './dom-support/_api';
|
4
|
+
import { ViewOptions } from './core/_api';
|
5
|
+
export interface Resources {
|
6
|
+
styleSheets: string[];
|
7
|
+
styleSheet: string;
|
8
|
+
links: Record<string, string>[];
|
9
|
+
scripts: string[];
|
10
|
+
}
|
11
|
+
/**
|
12
|
+
* Textbus PC 端编辑器
|
13
|
+
*/
|
14
|
+
export declare class Viewer extends Starter {
|
15
|
+
rootComponent: Component;
|
16
|
+
rootComponentLoader: ComponentLoader;
|
17
|
+
options: ViewOptions;
|
18
|
+
/** 当视图获得焦点时触发 */
|
19
|
+
onFocus: Observable<void>;
|
20
|
+
/** 当视图失去焦点时触发 */
|
21
|
+
onBlur: Observable<void>;
|
22
|
+
/** 当编辑器内容变化时触发 */
|
23
|
+
onChange: Observable<void>;
|
24
|
+
/** 当用户按 Ctrl + S 时触发 */
|
25
|
+
onSave: Observable<void>;
|
26
|
+
/** 编辑器是否已销毁 */
|
27
|
+
destroyed: boolean;
|
28
|
+
/** 编辑器是否已准备好 */
|
29
|
+
isReady: boolean;
|
30
|
+
get readonly(): boolean;
|
31
|
+
set readonly(b: boolean);
|
32
|
+
isFocus(): boolean;
|
33
|
+
protected changeEvent: Subject<void>;
|
34
|
+
protected subs: Subscription[];
|
35
|
+
protected _isFocus: boolean;
|
36
|
+
private controller;
|
37
|
+
private workbench;
|
38
|
+
private id;
|
39
|
+
private resourceNodes;
|
40
|
+
private focusEvent;
|
41
|
+
private blurEvent;
|
42
|
+
private saveEvent;
|
43
|
+
private styleSheet;
|
44
|
+
private scripts;
|
45
|
+
private links;
|
46
|
+
constructor(rootComponent: Component, rootComponentLoader: ComponentLoader, options?: ViewOptions);
|
47
|
+
/**
|
48
|
+
* 初始化编辑器
|
49
|
+
* @param host 编辑器容器
|
50
|
+
*/
|
51
|
+
mount(host: HTMLElement): Promise<this>;
|
52
|
+
/**
|
53
|
+
* 获取焦点
|
54
|
+
*/
|
55
|
+
focus(): void;
|
56
|
+
/**
|
57
|
+
* 取消编辑器焦点
|
58
|
+
*/
|
59
|
+
blur(): void;
|
60
|
+
/**
|
61
|
+
* 获取编辑器所有资源
|
62
|
+
*/
|
63
|
+
getResources(): Resources;
|
64
|
+
/**
|
65
|
+
* 获取 HTML 格式的内容
|
66
|
+
*/
|
67
|
+
getHTML(): string;
|
68
|
+
/**
|
69
|
+
* 获取 JSON 格式的内容
|
70
|
+
*/
|
71
|
+
getJSON(): ComponentLiteral;
|
72
|
+
/**
|
73
|
+
* 销毁编辑器
|
74
|
+
*/
|
75
|
+
destroy(): void;
|
76
|
+
/**
|
77
|
+
* 替换编辑的内容
|
78
|
+
* @param content
|
79
|
+
*/
|
80
|
+
replaceContent(content: string | ComponentLiteral): void;
|
81
|
+
protected guardReady(): void;
|
82
|
+
private initDefaultShortcut;
|
83
|
+
private initDocStyleSheetsAndScripts;
|
84
|
+
private static createLayout;
|
85
|
+
private static cssMin;
|
86
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@textbus/platform-browser",
|
3
|
-
"version": "3.1.
|
3
|
+
"version": "3.1.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": "./bundles/index.js",
|
6
6
|
"module": "./bundles/index.esm.js",
|
@@ -48,5 +48,5 @@
|
|
48
48
|
"bugs": {
|
49
49
|
"url": "https://github.com/textbus/textbus.git/issues"
|
50
50
|
},
|
51
|
-
"gitHead": "
|
51
|
+
"gitHead": "8b0b2eb7ddc40eb9a7f31aca26f7953a80dfdfcf"
|
52
52
|
}
|