nexa-runtime 0.7.8 → 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/dist/vdom/dom.js +3 -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/dist/vdom/dom.js
CHANGED
|
@@ -106,6 +106,9 @@ export const domOptions = {
|
|
|
106
106
|
else if (key === 'htmlFor') {
|
|
107
107
|
el.setAttribute('for', String(nextValue));
|
|
108
108
|
}
|
|
109
|
+
else if (key === 'innerHTML') {
|
|
110
|
+
el.innerHTML = nextValue ?? '';
|
|
111
|
+
}
|
|
109
112
|
else if (typeof nextValue === 'boolean') {
|
|
110
113
|
if (nextValue)
|
|
111
114
|
el.setAttribute(key, '');
|
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"
|