nexa-runtime 0.7.2 → 0.7.3

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 CHANGED
@@ -94,10 +94,6 @@ export const domOptions = {
94
94
  else if (key === 'htmlFor') {
95
95
  el.setAttribute('for', String(nextValue));
96
96
  }
97
- else if (key === 'ref') {
98
- if (typeof nextValue === 'function')
99
- nextValue(el);
100
- }
101
97
  else if (typeof nextValue === 'boolean') {
102
98
  if (nextValue)
103
99
  el.setAttribute(key, '');
@@ -62,9 +62,10 @@ 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
- effect(() => {
65
+ const textEffect = effect(() => {
66
66
  setText(el, String(vnode.text()));
67
67
  });
68
+ vnode._textEffect = textEffect;
68
69
  }
69
70
  else {
70
71
  setText(el, vnode.text ?? '');
@@ -8,6 +8,9 @@ export function unmount(vnode, parent, options) {
8
8
  runLifecycle(instance, 'beforeUnmount');
9
9
  const devtools = typeof window !== 'undefined' && window.__NEXA_DEVTOOLS__;
10
10
  devtools?.unregisterComponent(instance);
11
+ if (instance.update) {
12
+ instance.update.dispose();
13
+ }
11
14
  if (instance.vnode) {
12
15
  unmount(instance.vnode, parent, options);
13
16
  }
@@ -18,6 +21,10 @@ export function unmount(vnode, parent, options) {
18
21
  }
19
22
  // Remove the physical element/node
20
23
  if (vnode.el) {
24
+ if (vnode._textEffect) {
25
+ vnode._textEffect.dispose();
26
+ delete vnode._textEffect;
27
+ }
21
28
  if (vnode.el._vShowEffect) {
22
29
  vnode.el._vShowEffect.dispose();
23
30
  delete vnode.el._vShowEffect;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexa-runtime",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
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.2"
16
+ "nexa-reactivity": "0.7.3"
17
17
  },
18
18
  "files": [
19
19
  "dist"