solid-js 1.8.19 → 1.8.21
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 +6 -6
- package/dist/dev.js +562 -321
- package/dist/server.js +168 -74
- package/dist/solid.cjs +6 -6
- package/dist/solid.js +489 -279
- package/h/dist/h.js +38 -9
- package/h/jsx-runtime/dist/jsx.js +1 -1
- package/h/jsx-runtime/types/index.d.ts +11 -8
- package/h/types/hyperscript.d.ts +11 -11
- package/html/dist/html.js +216 -94
- package/html/types/lit.d.ts +47 -33
- package/package.json +1 -1
- package/store/dist/dev.js +122 -43
- package/store/dist/server.js +19 -8
- package/store/dist/store.js +113 -40
- 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 +218 -61
- package/types/index.d.ts +75 -10
- package/types/jsx.d.ts +913 -862
- 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 +233 -142
- package/types/render/Suspense.d.ts +5 -5
- package/types/render/component.d.ts +64 -33
- package/types/render/flow.d.ts +43 -31
- package/types/render/hydration.d.ts +15 -15
- package/types/server/index.d.ts +57 -2
- package/types/server/reactive.d.ts +73 -42
- package/types/server/rendering.d.ts +169 -98
- 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.cjs +34 -18
- package/web/dist/dev.js +655 -97
- package/web/dist/server.cjs +1 -1
- package/web/dist/server.js +210 -96
- package/web/dist/web.cjs +32 -16
- package/web/dist/web.js +646 -95
- package/web/storage/dist/storage.js +3 -3
- 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
|
@@ -119,6 +119,7 @@ function workLoop(hasTimeRemaining, initialTime) {
|
|
|
119
119
|
const sharedConfig = {
|
|
120
120
|
context: undefined,
|
|
121
121
|
registry: undefined,
|
|
122
|
+
done: false,
|
|
122
123
|
getContextId() {
|
|
123
124
|
return getContextId(this.context.count);
|
|
124
125
|
},
|
|
@@ -297,8 +298,7 @@ function createResource(pSource, pFetcher, pOptions) {
|
|
|
297
298
|
[state, setState] = createSignal(resolved ? "ready" : "unresolved");
|
|
298
299
|
if (sharedConfig.context) {
|
|
299
300
|
id = sharedConfig.getNextContextId();
|
|
300
|
-
|
|
301
|
-
if (options.ssrLoadFrom === "initial") initP = options.initialValue;else if (sharedConfig.load && (v = sharedConfig.load(id))) initP = v;
|
|
301
|
+
if (options.ssrLoadFrom === "initial") initP = options.initialValue;else if (sharedConfig.load && sharedConfig.has(id)) initP = sharedConfig.load(id);
|
|
302
302
|
}
|
|
303
303
|
function loadEnd(p, v, error, key) {
|
|
304
304
|
if (pr === p) {
|
|
@@ -1447,7 +1447,7 @@ function lazy(fn) {
|
|
|
1447
1447
|
sharedConfig.count || (sharedConfig.count = 0);
|
|
1448
1448
|
sharedConfig.count++;
|
|
1449
1449
|
(p || (p = fn())).then(mod => {
|
|
1450
|
-
setHydrateContext(ctx);
|
|
1450
|
+
!sharedConfig.done && setHydrateContext(ctx);
|
|
1451
1451
|
sharedConfig.count--;
|
|
1452
1452
|
set(() => mod.default);
|
|
1453
1453
|
setHydrateContext();
|
|
@@ -1458,17 +1458,17 @@ function lazy(fn) {
|
|
|
1458
1458
|
comp = s;
|
|
1459
1459
|
}
|
|
1460
1460
|
let Comp;
|
|
1461
|
-
return createMemo(() => (Comp = comp())
|
|
1461
|
+
return createMemo(() => (Comp = comp()) ? untrack(() => {
|
|
1462
1462
|
if (true) Object.assign(Comp, {
|
|
1463
1463
|
[$DEVCOMP]: true
|
|
1464
1464
|
});
|
|
1465
|
-
if (!ctx) return Comp(props);
|
|
1465
|
+
if (!ctx || sharedConfig.done) return Comp(props);
|
|
1466
1466
|
const c = sharedConfig.context;
|
|
1467
1467
|
setHydrateContext(ctx);
|
|
1468
1468
|
const r = Comp(props);
|
|
1469
1469
|
setHydrateContext(c);
|
|
1470
1470
|
return r;
|
|
1471
|
-
}));
|
|
1471
|
+
}) : "");
|
|
1472
1472
|
};
|
|
1473
1473
|
wrap.preload = () => p || ((p = fn()).then(mod => comp = () => mod.default), p);
|
|
1474
1474
|
return wrap;
|