@textbus/adapter-react 4.0.0-alpha.1 → 4.0.0-alpha.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -17,5 +17,5 @@ export declare class Adapter extends DomAdapter<JSX.Element, JSX.Element> {
17
17
  private components;
18
18
  constructor(components: ReactAdapterComponents, mount: (host: HTMLElement, root: JSX.Element) => (void | (() => void)));
19
19
  componentRender(component: ComponentInstance): JSX.Element;
20
- slotRender(slot: Slot, slotHostRender: (children: Array<VElement | VTextNode | ComponentInstance>) => VElement): JSX.Element;
20
+ slotRender(slot: Slot, slotHostRender: (children: Array<VElement | VTextNode | ComponentInstance>) => VElement, renderEnv?: any): JSX.Element;
21
21
  }
@@ -66,8 +66,8 @@ class Adapter extends DomAdapter {
66
66
  }
67
67
  throw adapterError(`cannot found view component \`${component.name}\`!`);
68
68
  }
69
- slotRender(slot, slotHostRender) {
70
- const vElement = slot.toTree(slotHostRender);
69
+ slotRender(slot, slotHostRender, renderEnv) {
70
+ const vElement = slot.toTree(slotHostRender, renderEnv);
71
71
  this.slotRootVElementCaches.set(slot, vElement);
72
72
  const vNodeToJSX = (vNode) => {
73
73
  const children = [];
package/bundles/index.js CHANGED
@@ -68,8 +68,8 @@ class Adapter extends platformBrowser.DomAdapter {
68
68
  }
69
69
  throw adapterError(`cannot found view component \`${component.name}\`!`);
70
70
  }
71
- slotRender(slot, slotHostRender) {
72
- const vElement = slot.toTree(slotHostRender);
71
+ slotRender(slot, slotHostRender, renderEnv) {
72
+ const vElement = slot.toTree(slotHostRender, renderEnv);
73
73
  this.slotRootVElementCaches.set(slot, vElement);
74
74
  const vNodeToJSX = (vNode) => {
75
75
  const children = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@textbus/adapter-react",
3
- "version": "4.0.0-alpha.1",
3
+ "version": "4.0.0-alpha.6",
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,8 +26,8 @@
26
26
  ],
27
27
  "dependencies": {
28
28
  "@tanbo/stream": "^1.2.0",
29
- "@textbus/core": "^4.0.0-alpha.1",
30
- "@textbus/platform-browser": "^4.0.0-alpha.1",
29
+ "@textbus/core": "^4.0.0-alpha.6",
30
+ "@textbus/platform-browser": "^4.0.0-alpha.6",
31
31
  "react": "^18.2.0"
32
32
  },
33
33
  "devDependencies": {
@@ -49,5 +49,5 @@
49
49
  "bugs": {
50
50
  "url": "https://github.com/textbus/textbus.git/issues"
51
51
  },
52
- "gitHead": "c66a476c5776f8cf719ebb0f9e7adebb391f82c1"
52
+ "gitHead": "47394e77de252fdfd9193e1620177f944976c1a9"
53
53
  }