nexa-runtime 0.7.11 → 0.8.1
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/dom.js +0 -18
- package/dist/vdom/patch.js +2 -4
- package/package.json +2 -2
package/dist/vdom/dom.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { effect } from 'nexa-reactivity';
|
|
2
|
-
import { vCurrency as _vCurrency } from '../directives/currency';
|
|
3
2
|
function normalizeClassValue(value) {
|
|
4
3
|
if (!value)
|
|
5
4
|
return '';
|
|
@@ -81,17 +80,6 @@ export const domOptions = {
|
|
|
81
80
|
delete el._vShowEffect;
|
|
82
81
|
}
|
|
83
82
|
}
|
|
84
|
-
else if (key === 'vCurrency') {
|
|
85
|
-
if (el._vCurrencyCleanup) {
|
|
86
|
-
el._vCurrencyCleanup();
|
|
87
|
-
}
|
|
88
|
-
if (nextValue) {
|
|
89
|
-
el._vCurrencyCleanup = _vCurrency(el, nextValue);
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
delete el._vCurrencyCleanup;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
83
|
else if (key === 'checked') {
|
|
96
84
|
el.checked = !!nextValue;
|
|
97
85
|
}
|
|
@@ -106,9 +94,6 @@ export const domOptions = {
|
|
|
106
94
|
else if (key === 'htmlFor') {
|
|
107
95
|
el.setAttribute('for', String(nextValue));
|
|
108
96
|
}
|
|
109
|
-
else if (key === 'innerHTML') {
|
|
110
|
-
el.innerHTML = nextValue ?? '';
|
|
111
|
-
}
|
|
112
97
|
else if (typeof nextValue === 'boolean') {
|
|
113
98
|
if (nextValue)
|
|
114
99
|
el.setAttribute(key, '');
|
|
@@ -119,9 +104,6 @@ export const domOptions = {
|
|
|
119
104
|
if (nextValue == null) {
|
|
120
105
|
el.removeAttribute(key);
|
|
121
106
|
}
|
|
122
|
-
else if (typeof el.tagName === 'string' && el.tagName.includes('-') && typeof nextValue === 'object') {
|
|
123
|
-
el[key] = nextValue;
|
|
124
|
-
}
|
|
125
107
|
else {
|
|
126
108
|
el.setAttribute(key, String(nextValue));
|
|
127
109
|
}
|
package/dist/vdom/patch.js
CHANGED
|
@@ -62,10 +62,9 @@ export function mount(vnode, parent, options, anchor = null) {
|
|
|
62
62
|
const el = createText('');
|
|
63
63
|
vnode.el = el;
|
|
64
64
|
if (typeof vnode.text === 'function') {
|
|
65
|
-
|
|
65
|
+
effect(() => {
|
|
66
66
|
setText(el, String(vnode.text()));
|
|
67
67
|
});
|
|
68
|
-
vnode._textEffect = textEffect;
|
|
69
68
|
}
|
|
70
69
|
else {
|
|
71
70
|
setText(el, vnode.text ?? '');
|
|
@@ -137,8 +136,7 @@ function mountChildren(vnode, parent, options, anchor = null) {
|
|
|
137
136
|
}
|
|
138
137
|
function replaceNode(oldV, newV, parent, options, anchor) {
|
|
139
138
|
unmount(oldV, parent, options);
|
|
140
|
-
|
|
141
|
-
mount(newV, parent, options, safeAnchor);
|
|
139
|
+
mount(newV, parent, options, anchor);
|
|
142
140
|
}
|
|
143
141
|
function updateNode(vnode, options) {
|
|
144
142
|
const { patchProp, setText } = options;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nexa-runtime",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
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.
|
|
16
|
+
"nexa-reactivity": "0.8.1"
|
|
17
17
|
},
|
|
18
18
|
"files": [
|
|
19
19
|
"dist"
|