@viewfly/platform-browser 0.5.2 → 0.5.4
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/create-portal.d.ts +4 -1
- package/bundles/index.esm.js +4 -14
- package/bundles/index.js +3 -13
- package/package.json +3 -3
|
@@ -28,4 +28,7 @@ import { JSXNode, NativeNode } from '@viewfly/core';
|
|
|
28
28
|
* }
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
|
-
export declare function createPortal<T extends NativeNode>(childRender: () => JSXNode, host: T):
|
|
31
|
+
export declare function createPortal<T extends NativeNode>(childRender: () => JSXNode, host: T): {
|
|
32
|
+
$portalHost: T;
|
|
33
|
+
$render: () => JSXNode;
|
|
34
|
+
};
|
package/bundles/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NativeRenderer, viewfly
|
|
1
|
+
import { NativeRenderer, viewfly } from '@viewfly/core';
|
|
2
2
|
|
|
3
3
|
class DomRenderer extends NativeRenderer {
|
|
4
4
|
constructor() {
|
|
@@ -149,19 +149,9 @@ function createApp(root, config = true) {
|
|
|
149
149
|
* ```
|
|
150
150
|
*/
|
|
151
151
|
function createPortal(childRender, host) {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
onPropsChanged(() => {
|
|
156
|
-
component.markAsDirtied();
|
|
157
|
-
});
|
|
158
|
-
onUpdated(() => {
|
|
159
|
-
instance.$$view.atom.child = component.$$view.atom;
|
|
160
|
-
});
|
|
161
|
-
const render = createRenderer(component, nativeRenderer);
|
|
162
|
-
return function () {
|
|
163
|
-
render(host);
|
|
164
|
-
return null;
|
|
152
|
+
return {
|
|
153
|
+
$portalHost: host,
|
|
154
|
+
$render: childRender
|
|
165
155
|
};
|
|
166
156
|
}
|
|
167
157
|
|
package/bundles/index.js
CHANGED
|
@@ -151,19 +151,9 @@ function createApp(root, config = true) {
|
|
|
151
151
|
* ```
|
|
152
152
|
*/
|
|
153
153
|
function createPortal(childRender, host) {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
core.onPropsChanged(() => {
|
|
158
|
-
component.markAsDirtied();
|
|
159
|
-
});
|
|
160
|
-
core.onUpdated(() => {
|
|
161
|
-
instance.$$view.atom.child = component.$$view.atom;
|
|
162
|
-
});
|
|
163
|
-
const render = core.createRenderer(component, nativeRenderer);
|
|
164
|
-
return function () {
|
|
165
|
-
render(host);
|
|
166
|
-
return null;
|
|
154
|
+
return {
|
|
155
|
+
$portalHost: host,
|
|
156
|
+
$render: childRender
|
|
167
157
|
};
|
|
168
158
|
}
|
|
169
159
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viewfly/platform-browser",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"description": "This project is used to enable the Viewfly framework to run in a browser.",
|
|
5
5
|
"main": "./bundles/index.js",
|
|
6
6
|
"module": "./bundles/index.esm.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"keywords": [],
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@viewfly/core": "^0.5.
|
|
15
|
+
"@viewfly/core": "^0.5.4",
|
|
16
16
|
"csstype": "^3.1.2"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"bugs": {
|
|
34
34
|
"url": "https://github.com/viewfly/viewfly.git/issues"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "b66a751b23e5f9a336ac9f52438f9f9a27766762"
|
|
37
37
|
}
|