@textbus/platform-browser 4.0.0-alpha.11 → 4.0.0-alpha.12
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/dom-adapter.d.ts +3 -3
- package/bundles/index.esm.js +2 -2
- package/bundles/index.js +2 -2
- package/package.json +3 -3
package/bundles/dom-adapter.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ComponentInstance, Slot, ViewAdapter, NodeLocation, VElement, VTextNode } from '@textbus/core';
|
1
|
+
import { ComponentInstance, Slot, ViewAdapter, NodeLocation, VElement, VTextNode, Textbus } from '@textbus/core';
|
2
2
|
/**
|
3
3
|
* Textbus PC 端浏览器渲染能力桥接器抽象类,提供了 DOM 元素查询能力,具体渲染能力由各前端框架实现相应桥接
|
4
4
|
*/
|
@@ -28,8 +28,8 @@ export declare abstract class DomAdapter<ViewComponent, ViewElement> extends Vie
|
|
28
28
|
remove: (key: HTMLElement | Slot<any>) => void;
|
29
29
|
};
|
30
30
|
protected slotRootVElementCaches: WeakMap<Slot<any>, VElement>;
|
31
|
-
protected constructor(mount: (host: HTMLElement, viewComponent: ViewComponent) => (void | (() => void)));
|
32
|
-
render(rootComponent: ComponentInstance): void | (() => void);
|
31
|
+
protected constructor(mount: (host: HTMLElement, viewComponent: ViewComponent, textbus: Textbus) => (void | (() => void)));
|
32
|
+
render(rootComponent: ComponentInstance, textbus: Textbus): void | (() => void);
|
33
33
|
abstract componentRender(component: ComponentInstance): ViewComponent;
|
34
34
|
abstract slotRender(slot: Slot, slotHostRender: (children: Array<VElement | VTextNode | ComponentInstance>) => VElement, renderEnv: any): ViewElement;
|
35
35
|
copy(): void;
|
package/bundles/index.esm.js
CHANGED
@@ -330,9 +330,9 @@ class DomAdapter extends ViewAdapter {
|
|
330
330
|
});
|
331
331
|
this.slotRootVElementCaches = new WeakMap();
|
332
332
|
}
|
333
|
-
render(rootComponent) {
|
333
|
+
render(rootComponent, textbus) {
|
334
334
|
const view = this.componentRender(rootComponent);
|
335
|
-
return this.mount(this.host, view);
|
335
|
+
return this.mount(this.host, view, textbus);
|
336
336
|
}
|
337
337
|
copy() {
|
338
338
|
document.execCommand('copy');
|
package/bundles/index.js
CHANGED
@@ -332,9 +332,9 @@ class DomAdapter extends core$1.ViewAdapter {
|
|
332
332
|
});
|
333
333
|
this.slotRootVElementCaches = new WeakMap();
|
334
334
|
}
|
335
|
-
render(rootComponent) {
|
335
|
+
render(rootComponent, textbus) {
|
336
336
|
const view = this.componentRender(rootComponent);
|
337
|
-
return this.mount(this.host, view);
|
337
|
+
return this.mount(this.host, view, textbus);
|
338
338
|
}
|
339
339
|
copy() {
|
340
340
|
document.execCommand('copy');
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@textbus/platform-browser",
|
3
|
-
"version": "4.0.0-alpha.
|
3
|
+
"version": "4.0.0-alpha.12",
|
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",
|
@@ -26,7 +26,7 @@
|
|
26
26
|
],
|
27
27
|
"dependencies": {
|
28
28
|
"@tanbo/stream": "^1.2.0",
|
29
|
-
"@textbus/core": "^4.0.0-alpha.
|
29
|
+
"@textbus/core": "^4.0.0-alpha.12",
|
30
30
|
"@viewfly/core": "^0.3.0",
|
31
31
|
"reflect-metadata": "^0.1.13"
|
32
32
|
},
|
@@ -48,5 +48,5 @@
|
|
48
48
|
"bugs": {
|
49
49
|
"url": "https://github.com/textbus/textbus.git/issues"
|
50
50
|
},
|
51
|
-
"gitHead": "
|
51
|
+
"gitHead": "3c0456c3f13888fdeefb4ed307ad643644a05e43"
|
52
52
|
}
|