@solidjs/signals 0.9.6 → 0.9.7
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/dev.js +4 -1
- package/dist/node.cjs +4 -1
- package/dist/prod.js +22 -19
- package/package.json +1 -1
package/dist/dev.js
CHANGED
|
@@ -677,7 +677,7 @@ function clearStatus(el) {
|
|
|
677
677
|
}
|
|
678
678
|
}
|
|
679
679
|
function notifyStatus(el, status, error) {
|
|
680
|
-
el._statusFlags = status | (el._statusFlags & STATUS_UNINITIALIZED);
|
|
680
|
+
el._statusFlags = status | (status !== STATUS_ERROR ? el._statusFlags & STATUS_UNINITIALIZED : 0);
|
|
681
681
|
el._error = error;
|
|
682
682
|
updatePendingSignal(el);
|
|
683
683
|
if (el._notifyStatus) return el._notifyStatus();
|
|
@@ -942,7 +942,10 @@ function getPendingValueComputed(el) {
|
|
|
942
942
|
if (!el._pendingValueComputed) {
|
|
943
943
|
const prevPending = pendingReadActive;
|
|
944
944
|
pendingReadActive = false;
|
|
945
|
+
const prevContext = context;
|
|
946
|
+
context = null;
|
|
945
947
|
el._pendingValueComputed = optimisticComputed(() => read(el));
|
|
948
|
+
context = prevContext;
|
|
946
949
|
pendingReadActive = prevPending;
|
|
947
950
|
}
|
|
948
951
|
return el._pendingValueComputed;
|
package/dist/node.cjs
CHANGED
|
@@ -651,7 +651,7 @@ function clearStatus(e) {
|
|
|
651
651
|
}
|
|
652
652
|
}
|
|
653
653
|
function notifyStatus(e, t, n) {
|
|
654
|
-
e.re = t | (e.re & d);
|
|
654
|
+
e.re = t | (t !== a ? e.re & d : 0);
|
|
655
655
|
e.J = n;
|
|
656
656
|
updatePendingSignal(e);
|
|
657
657
|
if (e.pe) return e.pe();
|
|
@@ -907,7 +907,10 @@ function getPendingValueComputed(e) {
|
|
|
907
907
|
if (!e.xe) {
|
|
908
908
|
const t = I;
|
|
909
909
|
I = false;
|
|
910
|
+
const n = Q;
|
|
911
|
+
Q = null;
|
|
910
912
|
e.xe = optimisticComputed(() => read(e));
|
|
913
|
+
Q = n;
|
|
911
914
|
I = t;
|
|
912
915
|
}
|
|
913
916
|
return e.xe;
|
package/dist/prod.js
CHANGED
|
@@ -651,7 +651,7 @@ function clearStatus(e) {
|
|
|
651
651
|
}
|
|
652
652
|
}
|
|
653
653
|
function notifyStatus(e, t, n) {
|
|
654
|
-
e.ie = t | (e.ie & STATUS_UNINITIALIZED);
|
|
654
|
+
e.ie = t | (t !== STATUS_ERROR ? e.ie & STATUS_UNINITIALIZED : 0);
|
|
655
655
|
e.B = n;
|
|
656
656
|
updatePendingSignal(e);
|
|
657
657
|
if (e.Te) return e.Te();
|
|
@@ -907,7 +907,10 @@ function getPendingValueComputed(e) {
|
|
|
907
907
|
if (!e.ge) {
|
|
908
908
|
const t = pendingReadActive;
|
|
909
909
|
pendingReadActive = false;
|
|
910
|
+
const n = context;
|
|
911
|
+
context = null;
|
|
910
912
|
e.ge = optimisticComputed(() => read(e));
|
|
913
|
+
context = n;
|
|
911
914
|
pendingReadActive = t;
|
|
912
915
|
}
|
|
913
916
|
return e.ge;
|
|
@@ -2117,8 +2120,8 @@ function mapArray(e, t, n) {
|
|
|
2117
2120
|
Ue: [],
|
|
2118
2121
|
ke: i,
|
|
2119
2122
|
We: i || n?.keyed === false ? [] : undefined,
|
|
2120
|
-
|
|
2121
|
-
|
|
2123
|
+
xe: t.length > 1 ? [] : undefined,
|
|
2124
|
+
Qe: n?.fallback
|
|
2122
2125
|
})
|
|
2123
2126
|
);
|
|
2124
2127
|
}
|
|
@@ -2133,17 +2136,17 @@ function updateKeyedMap() {
|
|
|
2133
2136
|
r = this.We
|
|
2134
2137
|
? () => {
|
|
2135
2138
|
this.We[i] = signal(e[i], pureOptions);
|
|
2136
|
-
this.
|
|
2139
|
+
this.xe && (this.xe[i] = signal(i, pureOptions));
|
|
2137
2140
|
return this.Ve(
|
|
2138
2141
|
read.bind(null, this.We[i]),
|
|
2139
|
-
this.
|
|
2142
|
+
this.xe ? read.bind(null, this.xe[i]) : undefined
|
|
2140
2143
|
);
|
|
2141
2144
|
}
|
|
2142
|
-
: this.
|
|
2145
|
+
: this.xe
|
|
2143
2146
|
? () => {
|
|
2144
2147
|
const t = e[i];
|
|
2145
|
-
this.
|
|
2146
|
-
return this.Ve(() => t, read.bind(null, this.
|
|
2148
|
+
this.xe[i] = signal(i, pureOptions);
|
|
2149
|
+
return this.Ve(() => t, read.bind(null, this.xe[i]));
|
|
2147
2150
|
}
|
|
2148
2151
|
: () => {
|
|
2149
2152
|
const t = e[i];
|
|
@@ -2157,10 +2160,10 @@ function updateKeyedMap() {
|
|
|
2157
2160
|
this.me = [];
|
|
2158
2161
|
this.we = 0;
|
|
2159
2162
|
this.We && (this.We = []);
|
|
2160
|
-
this.
|
|
2163
|
+
this.xe && (this.xe = []);
|
|
2161
2164
|
}
|
|
2162
|
-
if (this.
|
|
2163
|
-
this.me[0] = runWithOwner((this.Ue[0] = createOwner()), this.
|
|
2165
|
+
if (this.Qe && !this.me[0]) {
|
|
2166
|
+
this.me[0] = runWithOwner((this.Ue[0] = createOwner()), this.Qe);
|
|
2164
2167
|
}
|
|
2165
2168
|
} else if (this.we === 0) {
|
|
2166
2169
|
if (this.Ue[0]) this.Ue[0].dispose();
|
|
@@ -2181,7 +2184,7 @@ function updateKeyedMap() {
|
|
|
2181
2184
|
E = new Array(t),
|
|
2182
2185
|
T = new Array(t),
|
|
2183
2186
|
R = this.We ? new Array(t) : undefined,
|
|
2184
|
-
d = this.
|
|
2187
|
+
d = this.xe ? new Array(t) : undefined;
|
|
2185
2188
|
for (
|
|
2186
2189
|
o = 0, s = Math.min(this.we, t);
|
|
2187
2190
|
o < s && (this.ve[o] === e[o] || (this.We && compare(this.ke, this.ve[o], e[o])));
|
|
@@ -2199,7 +2202,7 @@ function updateKeyedMap() {
|
|
|
2199
2202
|
E[u] = this.me[s];
|
|
2200
2203
|
T[u] = this.Ue[s];
|
|
2201
2204
|
R && (R[u] = this.We[s]);
|
|
2202
|
-
d && (d[u] = this.
|
|
2205
|
+
d && (d[u] = this.xe[s]);
|
|
2203
2206
|
}
|
|
2204
2207
|
a = new Map();
|
|
2205
2208
|
f = new Array(u + 1);
|
|
@@ -2218,7 +2221,7 @@ function updateKeyedMap() {
|
|
|
2218
2221
|
E[i] = this.me[n];
|
|
2219
2222
|
T[i] = this.Ue[n];
|
|
2220
2223
|
R && (R[i] = this.We[n]);
|
|
2221
|
-
d && (d[i] = this.
|
|
2224
|
+
d && (d[i] = this.xe[n]);
|
|
2222
2225
|
i = f[i];
|
|
2223
2226
|
a.set(c, i);
|
|
2224
2227
|
} else this.Ue[n].dispose();
|
|
@@ -2232,8 +2235,8 @@ function updateKeyedMap() {
|
|
|
2232
2235
|
setSignal(this.We[i], e[i]);
|
|
2233
2236
|
}
|
|
2234
2237
|
if (d) {
|
|
2235
|
-
this.
|
|
2236
|
-
setSignal(this.
|
|
2238
|
+
this.xe[i] = d[i];
|
|
2239
|
+
setSignal(this.xe[i], i);
|
|
2237
2240
|
}
|
|
2238
2241
|
} else {
|
|
2239
2242
|
this.me[i] = runWithOwner((this.Ue[i] = createOwner()), r);
|
|
@@ -2255,7 +2258,7 @@ function repeat(e, t, n) {
|
|
|
2255
2258
|
Ue: [],
|
|
2256
2259
|
me: [],
|
|
2257
2260
|
$e: n?.from,
|
|
2258
|
-
|
|
2261
|
+
Qe: n?.fallback
|
|
2259
2262
|
});
|
|
2260
2263
|
}
|
|
2261
2264
|
function updateRepeat() {
|
|
@@ -2269,8 +2272,8 @@ function updateRepeat() {
|
|
|
2269
2272
|
this.me = [];
|
|
2270
2273
|
this.we = 0;
|
|
2271
2274
|
}
|
|
2272
|
-
if (this.
|
|
2273
|
-
this.me[0] = runWithOwner((this.Ue[0] = createOwner()), this.
|
|
2275
|
+
if (this.Qe && !this.me[0]) {
|
|
2276
|
+
this.me[0] = runWithOwner((this.Ue[0] = createOwner()), this.Qe);
|
|
2274
2277
|
}
|
|
2275
2278
|
return;
|
|
2276
2279
|
}
|