nexa-runtime 0.7.9 → 0.7.10
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/dist/vdom/diff.js +8 -0
- package/package.json +2 -2
package/dist/vdom/diff.js
CHANGED
|
@@ -61,6 +61,14 @@ function diffVNode(oldV, newV, container, patches) {
|
|
|
61
61
|
else if (oldV._type === 'fragment') {
|
|
62
62
|
diffChildren(oldV, newV, container, patches);
|
|
63
63
|
}
|
|
64
|
+
else if (oldV._type === 'teleport') {
|
|
65
|
+
const targetSelector = newV.props?.to;
|
|
66
|
+
const target = typeof targetSelector === 'string'
|
|
67
|
+
? document.querySelector(targetSelector)
|
|
68
|
+
: targetSelector;
|
|
69
|
+
if (target)
|
|
70
|
+
diffChildren(oldV, newV, target, patches);
|
|
71
|
+
}
|
|
64
72
|
}
|
|
65
73
|
function diffProps(oldV, newV) {
|
|
66
74
|
const oldProps = oldV.props ?? {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nexa-runtime",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"nexa-reactivity": "0.7.
|
|
16
|
+
"nexa-reactivity": "0.7.10"
|
|
17
17
|
},
|
|
18
18
|
"files": [
|
|
19
19
|
"dist"
|