tina4js 1.0.4 → 1.0.5
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/core.cjs.js +1 -1
- package/dist/core.es.js +82 -76
- package/dist/index.es.js +1 -1
- package/dist/signal.cjs.js +1 -1
- package/dist/signal.es.js +71 -59
- package/package.json +1 -1
- package/readme.md +5 -0
package/dist/core.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./signal.cjs.js"),N=require("./component.cjs.js"),_=new WeakMap,m="t4:";function b(t,...e){let n=_.get(t);if(!n){n=document.createElement("template");let f="";for(let i=0;i<t.length;i++)f+=t[i],i<e.length&&(E(f)?f+=`__t4_${i}__`:f+=`<!--${m}${i}-->`);n.innerHTML=f,_.set(t,n)}const o=n.content.cloneNode(!0),c=C(o);for(const{marker:f,index:i}of c)S(f,e[i]);const r=y(o);for(const f of r)T(f,e);return o}function C(t){const e=[];return p(t,n=>{if(n.nodeType===8){const o=n.data;if(o&&o.startsWith(m)){const c=parseInt(o.slice(m.length),10);e.push({marker:n,index:c})}}}),e}function y(t){const e=[];return p(t,n=>{n.nodeType===1&&e.push(n)}),e}function p(t,e){const n=t.childNodes;for(let o=0;o<n.length;o++){const c=n[o];e(c),p(c,e)}}function S(t,e){const n=t.parentNode;if(n)if(s.isSignal(e)){const o=document.createTextNode("");n.replaceChild(o,t),s.effect(()=>{o.data=String(e.value??"")})}else if(typeof e=="function"){const o=document.createComment("");n.replaceChild(o,t);let c=[],r=[];s.effect(()=>{var g;for(const d of r)d();r=[];const f=[],i=s._getEffectCollector();s._setEffectCollector(f);const l=e();s._setEffectCollector(i),r=f;for(const d of c)(g=d.parentNode)==null||g.removeChild(d);c=[];const a=h(l),u=o.parentNode;if(u)for(const d of a)u.insertBefore(d,o),c.push(d)})}else if(A(e))n.replaceChild(e,t);else if(e instanceof Node)n.replaceChild(e,t);else if(Array.isArray(e)){const o=document.createDocumentFragment();for(const c of e){const r=h(c);for(const f of r)o.appendChild(f)}n.replaceChild(o,t)}else{const o=document.createTextNode(String(e??""));n.replaceChild(o,t)}}function T(t,e){const n=[];for(const o of Array.from(t.attributes)){const c=o.name,r=o.value;if(c.startsWith("@")){const i=c.slice(1),l=r.match(/__t4_(\d+)__/);if(l){const a=e[parseInt(l[1],10)];typeof a=="function"&&t.addEventListener(i,a)}n.push(c);continue}if(c.startsWith("?")){const i=c.slice(1),l=r.match(/__t4_(\d+)__/);if(l){const a=e[parseInt(l[1],10)];if(s.isSignal(a)){const u=a;s.effect(()=>{u.value?t.setAttribute(i,""):t.removeAttribute(i)})}else a&&t.setAttribute(i,"")}n.push(c);continue}if(c.startsWith(".")){const i=c.slice(1),l=r.match(/__t4_(\d+)__/);if(l){const a=e[parseInt(l[1],10)];s.isSignal(a)?s.effect(()=>{t[i]=a.value}):t[i]=a}n.push(c);continue}const f=r.match(/__t4_(\d+)__/);if(f){const i=e[parseInt(f[1],10)];if(s.isSignal(i)){const l=i;s.effect(()=>{t.setAttribute(c,String(l.value??""))})}else typeof i=="function"?s.effect(()=>{t.setAttribute(c,String(i()??""))}):t.setAttribute(c,String(i??""))}}for(const o of n)t.removeAttribute(o)}function h(t){if(t==null||t===!1)return[];if(A(t))return Array.from(t.childNodes);if(t instanceof Node)return[t];if(Array.isArray(t)){const e=[];for(const n of t)e.push(...h(n));return e}return[document.createTextNode(String(t))]}function A(t){return t!=null&&typeof t=="object"&&t.nodeType===11}function E(t){let e=!1,n=!1,o=!1;for(let c=0;c<t.length;c++){const r=t[c];r==="<"&&!e&&!n&&(o=!0),r===">"&&!e&&!n&&(o=!1),o&&(r==='"'&&!e&&(n=!n),r==="'"&&!n&&(e=!e))}return o}exports.batch=s.batch;exports.computed=s.computed;exports.effect=s.effect;exports.isSignal=s.isSignal;exports.signal=s.signal;exports.Tina4Element=N.Tina4Element;exports.html=b;
|
package/dist/core.es.js
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { i as
|
|
2
|
-
import { b as
|
|
3
|
-
import { T as
|
|
4
|
-
const
|
|
5
|
-
function
|
|
6
|
-
let n =
|
|
1
|
+
import { i as p, e as d, a as b, d as A } from "./signal.es.js";
|
|
2
|
+
import { b as w, c as M, s as R } from "./signal.es.js";
|
|
3
|
+
import { T as F } from "./component.es.js";
|
|
4
|
+
const N = /* @__PURE__ */ new WeakMap(), u = "t4:";
|
|
5
|
+
function W(t, ...e) {
|
|
6
|
+
let n = N.get(t);
|
|
7
7
|
if (!n) {
|
|
8
8
|
n = document.createElement("template");
|
|
9
|
-
let
|
|
10
|
-
for (let
|
|
11
|
-
|
|
12
|
-
n.innerHTML =
|
|
9
|
+
let i = "";
|
|
10
|
+
for (let r = 0; r < t.length; r++)
|
|
11
|
+
i += t[r], r < e.length && (S(i) ? i += `__t4_${r}__` : i += `<!--${u}${r}-->`);
|
|
12
|
+
n.innerHTML = i, N.set(t, n);
|
|
13
13
|
}
|
|
14
|
-
const o = n.content.cloneNode(!0), s =
|
|
15
|
-
for (const { marker:
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
for (const
|
|
19
|
-
|
|
14
|
+
const o = n.content.cloneNode(!0), s = y(o);
|
|
15
|
+
for (const { marker: i, index: r } of s)
|
|
16
|
+
x(i, e[r]);
|
|
17
|
+
const c = T(o);
|
|
18
|
+
for (const i of c)
|
|
19
|
+
E(i, e);
|
|
20
20
|
return o;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function y(t) {
|
|
23
23
|
const e = [];
|
|
24
|
-
return
|
|
24
|
+
return _(t, (n) => {
|
|
25
25
|
if (n.nodeType === 8) {
|
|
26
26
|
const o = n.data;
|
|
27
|
-
if (o && o.startsWith(
|
|
28
|
-
const s = parseInt(o.slice(
|
|
27
|
+
if (o && o.startsWith(u)) {
|
|
28
|
+
const s = parseInt(o.slice(u.length), 10);
|
|
29
29
|
e.push({ marker: n, index: s });
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
}), e;
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function T(t) {
|
|
35
35
|
const e = [];
|
|
36
|
-
return
|
|
36
|
+
return _(t, (n) => {
|
|
37
37
|
n.nodeType === 1 && e.push(n);
|
|
38
38
|
}), e;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function _(t, e) {
|
|
41
41
|
const n = t.childNodes;
|
|
42
42
|
for (let o = 0; o < n.length; o++) {
|
|
43
43
|
const s = n[o];
|
|
44
|
-
e(s),
|
|
44
|
+
e(s), _(s, e);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function x(t, e) {
|
|
48
48
|
const n = t.parentNode;
|
|
49
49
|
if (n)
|
|
50
|
-
if (
|
|
50
|
+
if (p(e)) {
|
|
51
51
|
const o = document.createTextNode("");
|
|
52
52
|
n.replaceChild(o, t), d(() => {
|
|
53
53
|
o.data = String(e.value ?? "");
|
|
@@ -55,25 +55,31 @@ function b(t, e) {
|
|
|
55
55
|
} else if (typeof e == "function") {
|
|
56
56
|
const o = document.createComment("");
|
|
57
57
|
n.replaceChild(o, t);
|
|
58
|
-
let s = [];
|
|
58
|
+
let s = [], c = [];
|
|
59
59
|
d(() => {
|
|
60
|
-
var
|
|
60
|
+
var g;
|
|
61
|
+
for (const l of c) l();
|
|
62
|
+
c = [];
|
|
63
|
+
const i = [], r = b();
|
|
64
|
+
A(i);
|
|
61
65
|
const f = e();
|
|
62
|
-
|
|
66
|
+
A(r), c = i;
|
|
67
|
+
for (const l of s) (g = l.parentNode) == null || g.removeChild(l);
|
|
63
68
|
s = [];
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
69
|
+
const a = h(f), m = o.parentNode;
|
|
70
|
+
if (m)
|
|
71
|
+
for (const l of a)
|
|
72
|
+
m.insertBefore(l, o), s.push(l);
|
|
67
73
|
});
|
|
68
|
-
} else if (
|
|
74
|
+
} else if (C(e))
|
|
69
75
|
n.replaceChild(e, t);
|
|
70
76
|
else if (e instanceof Node)
|
|
71
77
|
n.replaceChild(e, t);
|
|
72
78
|
else if (Array.isArray(e)) {
|
|
73
79
|
const o = document.createDocumentFragment();
|
|
74
80
|
for (const s of e) {
|
|
75
|
-
const
|
|
76
|
-
for (const
|
|
81
|
+
const c = h(s);
|
|
82
|
+
for (const i of c) o.appendChild(i);
|
|
77
83
|
}
|
|
78
84
|
n.replaceChild(o, t);
|
|
79
85
|
} else {
|
|
@@ -81,88 +87,88 @@ function b(t, e) {
|
|
|
81
87
|
n.replaceChild(o, t);
|
|
82
88
|
}
|
|
83
89
|
}
|
|
84
|
-
function
|
|
90
|
+
function E(t, e) {
|
|
85
91
|
const n = [];
|
|
86
92
|
for (const o of Array.from(t.attributes)) {
|
|
87
|
-
const s = o.name,
|
|
93
|
+
const s = o.name, c = o.value;
|
|
88
94
|
if (s.startsWith("@")) {
|
|
89
|
-
const
|
|
90
|
-
if (
|
|
91
|
-
const
|
|
92
|
-
typeof
|
|
95
|
+
const r = s.slice(1), f = c.match(/__t4_(\d+)__/);
|
|
96
|
+
if (f) {
|
|
97
|
+
const a = e[parseInt(f[1], 10)];
|
|
98
|
+
typeof a == "function" && t.addEventListener(r, a);
|
|
93
99
|
}
|
|
94
100
|
n.push(s);
|
|
95
101
|
continue;
|
|
96
102
|
}
|
|
97
103
|
if (s.startsWith("?")) {
|
|
98
|
-
const
|
|
99
|
-
if (
|
|
100
|
-
const
|
|
101
|
-
if (
|
|
102
|
-
const
|
|
104
|
+
const r = s.slice(1), f = c.match(/__t4_(\d+)__/);
|
|
105
|
+
if (f) {
|
|
106
|
+
const a = e[parseInt(f[1], 10)];
|
|
107
|
+
if (p(a)) {
|
|
108
|
+
const m = a;
|
|
103
109
|
d(() => {
|
|
104
|
-
|
|
110
|
+
m.value ? t.setAttribute(r, "") : t.removeAttribute(r);
|
|
105
111
|
});
|
|
106
112
|
} else
|
|
107
|
-
|
|
113
|
+
a && t.setAttribute(r, "");
|
|
108
114
|
}
|
|
109
115
|
n.push(s);
|
|
110
116
|
continue;
|
|
111
117
|
}
|
|
112
118
|
if (s.startsWith(".")) {
|
|
113
|
-
const
|
|
114
|
-
if (
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
t[
|
|
118
|
-
}) : t[
|
|
119
|
+
const r = s.slice(1), f = c.match(/__t4_(\d+)__/);
|
|
120
|
+
if (f) {
|
|
121
|
+
const a = e[parseInt(f[1], 10)];
|
|
122
|
+
p(a) ? d(() => {
|
|
123
|
+
t[r] = a.value;
|
|
124
|
+
}) : t[r] = a;
|
|
119
125
|
}
|
|
120
126
|
n.push(s);
|
|
121
127
|
continue;
|
|
122
128
|
}
|
|
123
|
-
const
|
|
124
|
-
if (
|
|
125
|
-
const
|
|
126
|
-
if (
|
|
127
|
-
const
|
|
129
|
+
const i = c.match(/__t4_(\d+)__/);
|
|
130
|
+
if (i) {
|
|
131
|
+
const r = e[parseInt(i[1], 10)];
|
|
132
|
+
if (p(r)) {
|
|
133
|
+
const f = r;
|
|
128
134
|
d(() => {
|
|
129
|
-
t.setAttribute(s, String(
|
|
135
|
+
t.setAttribute(s, String(f.value ?? ""));
|
|
130
136
|
});
|
|
131
|
-
} else typeof
|
|
132
|
-
t.setAttribute(s, String(
|
|
133
|
-
}) : t.setAttribute(s, String(
|
|
137
|
+
} else typeof r == "function" ? d(() => {
|
|
138
|
+
t.setAttribute(s, String(r() ?? ""));
|
|
139
|
+
}) : t.setAttribute(s, String(r ?? ""));
|
|
134
140
|
}
|
|
135
141
|
}
|
|
136
142
|
for (const o of n) t.removeAttribute(o);
|
|
137
143
|
}
|
|
138
|
-
function
|
|
144
|
+
function h(t) {
|
|
139
145
|
if (t == null || t === !1) return [];
|
|
140
|
-
if (
|
|
146
|
+
if (C(t)) return Array.from(t.childNodes);
|
|
141
147
|
if (t instanceof Node) return [t];
|
|
142
148
|
if (Array.isArray(t)) {
|
|
143
149
|
const e = [];
|
|
144
|
-
for (const n of t) e.push(...
|
|
150
|
+
for (const n of t) e.push(...h(n));
|
|
145
151
|
return e;
|
|
146
152
|
}
|
|
147
153
|
return [document.createTextNode(String(t))];
|
|
148
154
|
}
|
|
149
|
-
function
|
|
155
|
+
function C(t) {
|
|
150
156
|
return t != null && typeof t == "object" && t.nodeType === 11;
|
|
151
157
|
}
|
|
152
|
-
function
|
|
158
|
+
function S(t) {
|
|
153
159
|
let e = !1, n = !1, o = !1;
|
|
154
160
|
for (let s = 0; s < t.length; s++) {
|
|
155
|
-
const
|
|
156
|
-
|
|
161
|
+
const c = t[s];
|
|
162
|
+
c === "<" && !e && !n && (o = !0), c === ">" && !e && !n && (o = !1), o && (c === '"' && !e && (n = !n), c === "'" && !n && (e = !e));
|
|
157
163
|
}
|
|
158
164
|
return o;
|
|
159
165
|
}
|
|
160
166
|
export {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
167
|
+
F as Tina4Element,
|
|
168
|
+
w as batch,
|
|
169
|
+
M as computed,
|
|
164
170
|
d as effect,
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
171
|
+
W as html,
|
|
172
|
+
p as isSignal,
|
|
173
|
+
R as signal
|
|
168
174
|
};
|
package/dist/index.es.js
CHANGED
package/dist/signal.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";let s=null,
|
|
1
|
+
"use strict";let c=null,s=null,i=null;function C(t){i=t}function h(){return i}let d=null,_=null;function v(t,n){d=t,_=n}let f=0;const b=new Set;function g(t,n){let e=t;const o=new Set,r={_t4:!0,get value(){if(c&&(o.add(c),s)){const u=c;s.push(()=>o.delete(u))}return e},set value(u){if(Object.is(u,e))return;const a=e;if(e=u,r._debugInfo&&r._debugInfo.updateCount++,_&&_(r,a,u),f>0)for(const l of o)b.add(l);else for(const l of[...o])l()},_subscribe(u){return o.add(u),()=>{o.delete(u)}},peek(){return e}};return d&&(r._debugInfo={label:n,createdAt:Date.now(),updateCount:0,subs:o},d(r,n)),r}function S(t){const n=g(void 0);return p(()=>{n.value=t()}),{_t4:!0,get value(){return n.value},set value(e){throw new Error("[tina4] computed signals are read-only")},_subscribe(e){return n._subscribe(e)},peek(){return n.peek()}}}function p(t){let n=!1,e=[];const o=()=>{if(n)return;for(const l of e)l();e=[];const u=c,a=s;c=o,s=e;try{t()}finally{c=u,s=a}};o();const r=()=>{n=!0;for(const u of e)u();e=[]};return i&&i.push(r),r}function y(t){f++;try{t()}finally{if(f--,f===0){const n=[...b];b.clear();for(const e of n)e()}}}function E(t){return t!==null&&typeof t=="object"&&t._t4===!0}exports.__setDebugSignalHooks=v;exports._getEffectCollector=h;exports._setEffectCollector=C;exports.batch=y;exports.computed=S;exports.effect=p;exports.isSignal=E;exports.signal=g;
|
package/dist/signal.es.js
CHANGED
|
@@ -1,98 +1,110 @@
|
|
|
1
|
-
let s = null, a = null;
|
|
2
|
-
function
|
|
3
|
-
a =
|
|
1
|
+
let s = null, l = null, a = null;
|
|
2
|
+
function v(t) {
|
|
3
|
+
a = t;
|
|
4
4
|
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
f = e, i = t;
|
|
5
|
+
function C() {
|
|
6
|
+
return a;
|
|
8
7
|
}
|
|
9
|
-
let
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
let d = null, b = null;
|
|
9
|
+
function h(t, n) {
|
|
10
|
+
d = t, b = n;
|
|
11
|
+
}
|
|
12
|
+
let f = 0;
|
|
13
|
+
const p = /* @__PURE__ */ new Set();
|
|
14
|
+
function _(t, n) {
|
|
15
|
+
let e = t;
|
|
16
|
+
const o = /* @__PURE__ */ new Set(), r = {
|
|
14
17
|
_t4: !0,
|
|
15
18
|
get value() {
|
|
16
|
-
|
|
19
|
+
if (s && (o.add(s), l)) {
|
|
20
|
+
const u = s;
|
|
21
|
+
l.push(() => o.delete(u));
|
|
22
|
+
}
|
|
23
|
+
return e;
|
|
17
24
|
},
|
|
18
|
-
set value(
|
|
19
|
-
if (Object.is(
|
|
20
|
-
const
|
|
21
|
-
if (
|
|
22
|
-
for (const
|
|
25
|
+
set value(u) {
|
|
26
|
+
if (Object.is(u, e)) return;
|
|
27
|
+
const i = e;
|
|
28
|
+
if (e = u, r._debugInfo && r._debugInfo.updateCount++, b && b(r, i, u), f > 0)
|
|
29
|
+
for (const c of o) p.add(c);
|
|
23
30
|
else
|
|
24
|
-
for (const
|
|
31
|
+
for (const c of [...o]) c();
|
|
25
32
|
},
|
|
26
|
-
_subscribe(
|
|
27
|
-
return
|
|
28
|
-
|
|
33
|
+
_subscribe(u) {
|
|
34
|
+
return o.add(u), () => {
|
|
35
|
+
o.delete(u);
|
|
29
36
|
};
|
|
30
37
|
},
|
|
31
38
|
peek() {
|
|
32
|
-
return
|
|
39
|
+
return e;
|
|
33
40
|
}
|
|
34
41
|
};
|
|
35
|
-
return
|
|
42
|
+
return d && (r._debugInfo = { label: n, createdAt: Date.now(), updateCount: 0, subs: o }, d(r, n)), r;
|
|
36
43
|
}
|
|
37
|
-
function
|
|
38
|
-
const
|
|
39
|
-
return
|
|
40
|
-
|
|
44
|
+
function y(t) {
|
|
45
|
+
const n = _(void 0);
|
|
46
|
+
return g(() => {
|
|
47
|
+
n.value = t();
|
|
41
48
|
}), {
|
|
42
49
|
_t4: !0,
|
|
43
50
|
get value() {
|
|
44
|
-
return
|
|
51
|
+
return n.value;
|
|
45
52
|
},
|
|
46
|
-
set value(
|
|
53
|
+
set value(e) {
|
|
47
54
|
throw new Error("[tina4] computed signals are read-only");
|
|
48
55
|
},
|
|
49
|
-
_subscribe(
|
|
50
|
-
return
|
|
56
|
+
_subscribe(e) {
|
|
57
|
+
return n._subscribe(e);
|
|
51
58
|
},
|
|
52
59
|
peek() {
|
|
53
|
-
return
|
|
60
|
+
return n.peek();
|
|
54
61
|
}
|
|
55
62
|
};
|
|
56
63
|
}
|
|
57
|
-
function
|
|
58
|
-
let
|
|
59
|
-
const
|
|
60
|
-
if (
|
|
61
|
-
const
|
|
62
|
-
|
|
64
|
+
function g(t) {
|
|
65
|
+
let n = !1, e = [];
|
|
66
|
+
const o = () => {
|
|
67
|
+
if (n) return;
|
|
68
|
+
for (const c of e) c();
|
|
69
|
+
e = [];
|
|
70
|
+
const u = s, i = l;
|
|
71
|
+
s = o, l = e;
|
|
63
72
|
try {
|
|
64
|
-
|
|
73
|
+
t();
|
|
65
74
|
} finally {
|
|
66
|
-
s =
|
|
75
|
+
s = u, l = i;
|
|
67
76
|
}
|
|
68
77
|
};
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
|
|
78
|
+
o();
|
|
79
|
+
const r = () => {
|
|
80
|
+
n = !0;
|
|
81
|
+
for (const u of e) u();
|
|
82
|
+
e = [];
|
|
72
83
|
};
|
|
73
|
-
return a && a.push(
|
|
84
|
+
return a && a.push(r), r;
|
|
74
85
|
}
|
|
75
|
-
function
|
|
76
|
-
|
|
86
|
+
function S(t) {
|
|
87
|
+
f++;
|
|
77
88
|
try {
|
|
78
|
-
|
|
89
|
+
t();
|
|
79
90
|
} finally {
|
|
80
|
-
if (
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
for (const
|
|
91
|
+
if (f--, f === 0) {
|
|
92
|
+
const n = [...p];
|
|
93
|
+
p.clear();
|
|
94
|
+
for (const e of n) e();
|
|
84
95
|
}
|
|
85
96
|
}
|
|
86
97
|
}
|
|
87
|
-
function
|
|
88
|
-
return
|
|
98
|
+
function w(t) {
|
|
99
|
+
return t !== null && typeof t == "object" && t._t4 === !0;
|
|
89
100
|
}
|
|
90
101
|
export {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
102
|
+
h as _,
|
|
103
|
+
C as a,
|
|
104
|
+
S as b,
|
|
105
|
+
y as c,
|
|
106
|
+
v as d,
|
|
107
|
+
g as e,
|
|
108
|
+
w as i,
|
|
97
109
|
_ as s
|
|
98
110
|
};
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -240,6 +240,11 @@ npm run dev # dev server
|
|
|
240
240
|
|
|
241
241
|
## Changelog
|
|
242
242
|
|
|
243
|
+
### 1.0.5
|
|
244
|
+
- **Fix:** Effects now properly unsubscribe from signals on dispose — prevents stale subscriptions accumulating in signal subscriber sets across navigations
|
|
245
|
+
- **Fix:** Function bindings in `html` templates now dispose inner effects when re-evaluated — fixes duplicate DOM nodes from nested reactive lists and conditionals
|
|
246
|
+
- Added 9 new tests covering effect subscription cleanup, inner effect disposal, and multi-navigation accumulation (116 total)
|
|
247
|
+
|
|
243
248
|
### 1.0.4
|
|
244
249
|
- Added router reactive effect cleanup tests (navigate away/back, stale effects, async handlers, stale async discard)
|
|
245
250
|
- Added debug overlay documentation to README and TINA4.md
|