solid-js 1.7.7 → 1.7.9
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.cjs +24 -13
- package/dist/dev.js +555 -306
- package/dist/server.cjs +3 -3
- package/dist/server.js +177 -79
- package/dist/solid.cjs +24 -13
- package/dist/solid.js +482 -264
- package/h/dist/h.cjs +2 -2
- package/h/dist/h.js +36 -10
- package/h/jsx-runtime/dist/jsx.js +1 -1
- package/h/jsx-runtime/types/index.d.ts +11 -8
- package/h/jsx-runtime/types/jsx.d.ts +130 -100
- package/h/types/hyperscript.d.ts +11 -11
- package/h/types/index.d.ts +3 -2
- package/html/dist/html.cjs +2 -2
- package/html/dist/html.js +218 -96
- package/html/types/index.d.ts +3 -2
- package/html/types/lit.d.ts +45 -31
- package/package.json +1 -1
- package/store/dist/dev.cjs +34 -32
- package/store/dist/dev.js +141 -67
- package/store/dist/server.js +19 -8
- package/store/dist/store.cjs +34 -32
- package/store/dist/store.js +132 -64
- package/store/types/index.d.ts +21 -7
- package/store/types/modifiers.d.ts +6 -3
- package/store/types/mutable.d.ts +5 -2
- package/store/types/server.d.ts +12 -4
- package/store/types/store.d.ts +217 -63
- package/types/index.d.ts +69 -9
- package/types/jsx.d.ts +10 -6
- package/types/reactive/array.d.ts +12 -4
- package/types/reactive/observable.d.ts +25 -17
- package/types/reactive/scheduler.d.ts +9 -6
- package/types/reactive/signal.d.ts +227 -136
- package/types/render/Suspense.d.ts +5 -5
- package/types/render/component.d.ts +62 -31
- package/types/render/flow.d.ts +43 -31
- package/types/render/hydration.d.ts +13 -10
- package/types/server/index.d.ts +55 -2
- package/types/server/reactive.d.ts +67 -40
- package/types/server/rendering.d.ts +171 -95
- package/universal/dist/dev.js +28 -12
- package/universal/dist/universal.js +28 -12
- package/universal/types/index.d.ts +3 -1
- package/universal/types/universal.d.ts +0 -1
- package/web/dist/dev.js +610 -79
- package/web/dist/server.cjs +4 -4
- package/web/dist/server.js +180 -81
- package/web/dist/web.js +610 -79
- package/web/types/client.d.ts +2 -2
- package/web/types/core.d.ts +10 -1
- package/web/types/index.d.ts +27 -10
- package/web/types/server-mock.d.ts +47 -32
package/dist/dev.cjs
CHANGED
|
@@ -880,7 +880,18 @@ function runUserEffects(queue) {
|
|
|
880
880
|
const e = queue[i];
|
|
881
881
|
if (!e.user) runTop(e);else queue[userLength++] = e;
|
|
882
882
|
}
|
|
883
|
-
if (sharedConfig.context)
|
|
883
|
+
if (sharedConfig.context) {
|
|
884
|
+
if (sharedConfig.count) {
|
|
885
|
+
sharedConfig.effects || (sharedConfig.effects = []);
|
|
886
|
+
sharedConfig.effects.push(...queue.slice(0, userLength));
|
|
887
|
+
return;
|
|
888
|
+
} else if (sharedConfig.effects) {
|
|
889
|
+
queue = [...sharedConfig.effects, ...queue];
|
|
890
|
+
userLength += sharedConfig.effects.length;
|
|
891
|
+
delete sharedConfig.effects;
|
|
892
|
+
}
|
|
893
|
+
setHydrateContext();
|
|
894
|
+
}
|
|
884
895
|
for (i = 0; i < userLength; i++) runTop(queue[i]);
|
|
885
896
|
}
|
|
886
897
|
function lookUpstream(node, ignore) {
|
|
@@ -958,26 +969,23 @@ function castError(err) {
|
|
|
958
969
|
cause: err
|
|
959
970
|
});
|
|
960
971
|
}
|
|
972
|
+
function runErrors(err, fns, owner) {
|
|
973
|
+
try {
|
|
974
|
+
for (const f of fns) f(err);
|
|
975
|
+
} catch (e) {
|
|
976
|
+
handleError(e, owner && owner.owner || null);
|
|
977
|
+
}
|
|
978
|
+
}
|
|
961
979
|
function handleError(err, owner = Owner) {
|
|
962
980
|
const fns = ERROR && lookup(owner, ERROR);
|
|
963
981
|
const error = castError(err);
|
|
964
982
|
if (!fns) throw error;
|
|
965
983
|
if (Effects) Effects.push({
|
|
966
984
|
fn() {
|
|
967
|
-
|
|
968
|
-
for (const f of fns) f(error);
|
|
969
|
-
} catch (e) {
|
|
970
|
-
handleError(e, owner?.owner || null);
|
|
971
|
-
}
|
|
985
|
+
runErrors(error, fns, owner);
|
|
972
986
|
},
|
|
973
987
|
state: STALE
|
|
974
|
-
});else
|
|
975
|
-
try {
|
|
976
|
-
for (const f of fns) f(error);
|
|
977
|
-
} catch (e) {
|
|
978
|
-
handleError(e, owner?.owner || null);
|
|
979
|
-
}
|
|
980
|
-
}
|
|
988
|
+
});else runErrors(error, fns, owner);
|
|
981
989
|
}
|
|
982
990
|
function lookup(owner, key) {
|
|
983
991
|
return owner ? owner.context && owner.context[key] !== undefined ? owner.context[key] : lookup(owner.owner, key) : undefined;
|
|
@@ -1399,8 +1407,11 @@ function lazy(fn) {
|
|
|
1399
1407
|
const ctx = sharedConfig.context;
|
|
1400
1408
|
if (ctx) {
|
|
1401
1409
|
const [s, set] = createSignal();
|
|
1410
|
+
sharedConfig.count || (sharedConfig.count = 0);
|
|
1411
|
+
sharedConfig.count++;
|
|
1402
1412
|
(p || (p = fn())).then(mod => {
|
|
1403
1413
|
setHydrateContext(ctx);
|
|
1414
|
+
sharedConfig.count--;
|
|
1404
1415
|
set(() => mod.default);
|
|
1405
1416
|
setHydrateContext();
|
|
1406
1417
|
});
|