@textbus/adapter-react 4.0.0-alpha.30 → 4.0.0-alpha.32

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  import { useState, useEffect, createElement } from 'react';
2
2
  import { Subject } from '@tanbo/stream';
3
- import { makeError, VElement, VTextNode, replaceEmpty } from '@textbus/core';
3
+ import { makeError, VElement, VTextNode, replaceEmpty, invokeListener } from '@textbus/core';
4
4
  import { DomAdapter } from '@textbus/platform-browser';
5
5
 
6
6
  // hack start
@@ -55,7 +55,9 @@ class Adapter extends DomAdapter {
55
55
  }
56
56
  }
57
57
  });
58
- this.componentRendingStack.pop();
58
+ useEffect(() => {
59
+ this.componentRendingStack.pop();
60
+ });
59
61
  return vNode;
60
62
  };
61
63
  });
@@ -88,6 +90,9 @@ class Adapter extends DomAdapter {
88
90
  }
89
91
  else {
90
92
  children.push(this.componentRender(child));
93
+ if (!this.firstRending) {
94
+ invokeListener(child, 'onParentSlotUpdated');
95
+ }
91
96
  }
92
97
  }
93
98
  const props = Object.assign({}, (Array.from(vNode.attrs).reduce((a, b) => {
package/bundles/index.js CHANGED
@@ -57,7 +57,9 @@ class Adapter extends platformBrowser.DomAdapter {
57
57
  }
58
58
  }
59
59
  });
60
- this.componentRendingStack.pop();
60
+ react.useEffect(() => {
61
+ this.componentRendingStack.pop();
62
+ });
61
63
  return vNode;
62
64
  };
63
65
  });
@@ -90,6 +92,9 @@ class Adapter extends platformBrowser.DomAdapter {
90
92
  }
91
93
  else {
92
94
  children.push(this.componentRender(child));
95
+ if (!this.firstRending) {
96
+ core.invokeListener(child, 'onParentSlotUpdated');
97
+ }
93
98
  }
94
99
  }
95
100
  const props = Object.assign({}, (Array.from(vNode.attrs).reduce((a, b) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@textbus/adapter-react",
3
- "version": "4.0.0-alpha.30",
3
+ "version": "4.0.0-alpha.32",
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.3",
29
- "@textbus/core": "^4.0.0-alpha.30",
30
- "@textbus/platform-browser": "^4.0.0-alpha.30",
29
+ "@textbus/core": "^4.0.0-alpha.31",
30
+ "@textbus/platform-browser": "^4.0.0-alpha.32",
31
31
  "react": "^17.0.0 || ^18.0.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": "9b14d8cf2a2473f31a36b51ee3d988ddecf776fb"
52
+ "gitHead": "00d52c23dde48068e14e46379b85ddac0743c6ff"
53
53
  }