solid-js 1.6.8 → 1.6.10
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 +144 -127
- package/dist/dev.js +144 -127
- package/dist/server.cjs +30 -25
- package/dist/server.js +30 -25
- package/dist/solid.cjs +130 -115
- package/dist/solid.js +130 -115
- package/h/dist/h.cjs +4 -4
- package/h/dist/h.js +4 -4
- package/h/types/hyperscript.d.ts +3 -3
- package/html/dist/html.cjs +34 -35
- package/html/dist/html.js +34 -35
- package/html/types/lit.d.ts +2 -2
- package/package.json +1 -1
- package/store/dist/dev.cjs +16 -16
- package/store/dist/dev.js +16 -16
- package/store/dist/server.cjs +3 -3
- package/store/dist/server.js +3 -3
- package/store/dist/store.cjs +16 -16
- package/store/dist/store.js +16 -16
- package/types/index.d.ts +1 -1
- package/types/reactive/observable.d.ts +8 -6
- package/types/reactive/signal.d.ts +12 -9
- package/types/render/Suspense.d.ts +2 -2
- package/types/render/flow.d.ts +6 -6
- package/universal/dist/dev.cjs +10 -10
- package/universal/dist/dev.js +10 -10
- package/universal/dist/universal.cjs +10 -10
- package/universal/dist/universal.js +10 -10
- package/web/dist/dev.cjs +29 -22
- package/web/dist/dev.js +29 -22
- package/web/dist/server.cjs +12 -20
- package/web/dist/server.js +12 -20
- package/web/dist/web.cjs +29 -22
- package/web/dist/web.js +29 -22
- package/web/types/index.d.ts +3 -3
package/dist/dev.cjs
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
let taskIdCounter = 1,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
isCallbackScheduled = false,
|
|
5
|
+
isPerformingWork = false,
|
|
6
|
+
taskQueue = [],
|
|
7
|
+
currentTask = null,
|
|
8
|
+
shouldYieldToHost = null,
|
|
9
|
+
yieldInterval = 5,
|
|
10
|
+
deadline = 0,
|
|
11
|
+
maxYieldInterval = 300,
|
|
12
|
+
scheduleCallback = null,
|
|
13
|
+
scheduledCallback = null;
|
|
14
14
|
const maxSigned31BitInt = 1073741823;
|
|
15
15
|
function setupScheduler() {
|
|
16
16
|
const channel = new MessageChannel(),
|
|
17
|
-
|
|
17
|
+
port = channel.port2;
|
|
18
18
|
scheduleCallback = () => port.postMessage(null);
|
|
19
19
|
channel.port1.onmessage = () => {
|
|
20
20
|
if (scheduledCallback !== null) {
|
|
@@ -65,7 +65,7 @@ function enqueue(taskQueue, task) {
|
|
|
65
65
|
function requestCallback(fn, options) {
|
|
66
66
|
if (!scheduleCallback) setupScheduler();
|
|
67
67
|
let startTime = performance.now(),
|
|
68
|
-
|
|
68
|
+
timeout = maxSigned31BitInt;
|
|
69
69
|
if (options && options.timeout) timeout = options.timeout;
|
|
70
70
|
const newTask = {
|
|
71
71
|
id: taskIdCounter++,
|
|
@@ -121,7 +121,8 @@ function setHydrateContext(context) {
|
|
|
121
121
|
sharedConfig.context = context;
|
|
122
122
|
}
|
|
123
123
|
function nextHydrateContext() {
|
|
124
|
-
return {
|
|
124
|
+
return {
|
|
125
|
+
...sharedConfig.context,
|
|
125
126
|
id: `${sharedConfig.context.id}${sharedConfig.context.count++}-`,
|
|
126
127
|
count: 0
|
|
127
128
|
};
|
|
@@ -157,22 +158,22 @@ let rootCount = 0;
|
|
|
157
158
|
const [transPending, setTransPending] = /*@__PURE__*/createSignal(false);
|
|
158
159
|
function createRoot(fn, detachedOwner) {
|
|
159
160
|
const listener = Listener,
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
161
|
+
owner = Owner,
|
|
162
|
+
unowned = fn.length === 0,
|
|
163
|
+
root = unowned ? {
|
|
164
|
+
owned: null,
|
|
165
|
+
cleanups: null,
|
|
166
|
+
context: null,
|
|
167
|
+
owner: null
|
|
168
|
+
} : {
|
|
169
|
+
owned: null,
|
|
170
|
+
cleanups: null,
|
|
171
|
+
context: null,
|
|
172
|
+
owner: detachedOwner || owner
|
|
173
|
+
},
|
|
174
|
+
updateFn = unowned ? () => fn(() => {
|
|
175
|
+
throw new Error("Dispose method must be an explicit argument to createRoot function");
|
|
176
|
+
}) : () => fn(() => untrack(() => cleanNode(root)));
|
|
176
177
|
{
|
|
177
178
|
if (owner) root.name = `${owner.name}-r${rootCount++}`;
|
|
178
179
|
globalThis._$afterCreateRoot && globalThis._$afterCreateRoot(root);
|
|
@@ -214,7 +215,7 @@ function createRenderEffect(fn, value, options) {
|
|
|
214
215
|
function createEffect(fn, value, options) {
|
|
215
216
|
runEffects = runUserEffects;
|
|
216
217
|
const c = createComputation(fn, value, false, STALE, options ),
|
|
217
|
-
|
|
218
|
+
s = SuspenseContext && lookup(Owner, SuspenseContext.id);
|
|
218
219
|
if (s) c.suspense = s;
|
|
219
220
|
c.user = true;
|
|
220
221
|
Effects ? Effects.push(c) : updateComputation(c);
|
|
@@ -222,10 +223,10 @@ function createEffect(fn, value, options) {
|
|
|
222
223
|
function createReaction(onInvalidate, options) {
|
|
223
224
|
let fn;
|
|
224
225
|
const c = createComputation(() => {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
226
|
+
fn ? fn() : untrack(onInvalidate);
|
|
227
|
+
fn = undefined;
|
|
228
|
+
}, undefined, false, 0, options ),
|
|
229
|
+
s = SuspenseContext && lookup(Owner, SuspenseContext.id);
|
|
229
230
|
if (s) c.suspense = s;
|
|
230
231
|
c.user = true;
|
|
231
232
|
return tracking => {
|
|
@@ -259,19 +260,19 @@ function createResource(pSource, pFetcher, pOptions) {
|
|
|
259
260
|
options = pOptions || {};
|
|
260
261
|
}
|
|
261
262
|
let pr = null,
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
263
|
+
initP = NO_INIT,
|
|
264
|
+
id = null,
|
|
265
|
+
loadedUnderTransition = false,
|
|
266
|
+
scheduled = false,
|
|
267
|
+
resolved = ("initialValue" in options),
|
|
268
|
+
dynamic = typeof source === "function" && createMemo(source);
|
|
268
269
|
const contexts = new Set(),
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
270
|
+
[value, setValue] = (options.storage || createSignal)(options.initialValue),
|
|
271
|
+
[error, setError] = createSignal(undefined),
|
|
272
|
+
[track, trigger] = createSignal(undefined, {
|
|
273
|
+
equals: false
|
|
274
|
+
}),
|
|
275
|
+
[state, setState] = createSignal(resolved ? "ready" : "unresolved");
|
|
275
276
|
if (sharedConfig.context) {
|
|
276
277
|
id = `${sharedConfig.context.id}${sharedConfig.context.count++}`;
|
|
277
278
|
let v;
|
|
@@ -307,8 +308,8 @@ function createResource(pSource, pFetcher, pOptions) {
|
|
|
307
308
|
}
|
|
308
309
|
function read() {
|
|
309
310
|
const c = SuspenseContext && lookup(Owner, SuspenseContext.id),
|
|
310
|
-
|
|
311
|
-
|
|
311
|
+
v = value(),
|
|
312
|
+
err = error();
|
|
312
313
|
if (err && !pr) throw err;
|
|
313
314
|
if (Listener && !Listener.user && c) {
|
|
314
315
|
createComputed(() => {
|
|
@@ -380,7 +381,7 @@ function createResource(pSource, pFetcher, pOptions) {
|
|
|
380
381
|
}
|
|
381
382
|
function createDeferred(source, options) {
|
|
382
383
|
let t,
|
|
383
|
-
|
|
384
|
+
timeout = options ? options.timeoutMs : undefined;
|
|
384
385
|
const node = createComputation(() => {
|
|
385
386
|
if (!t || !t.fn) t = requestCallback(() => setDeferred(() => node.value), timeout !== undefined ? {
|
|
386
387
|
timeout
|
|
@@ -470,13 +471,16 @@ function getOwner() {
|
|
|
470
471
|
}
|
|
471
472
|
function runWithOwner(o, fn) {
|
|
472
473
|
const prev = Owner;
|
|
474
|
+
const prevListener = Listener;
|
|
473
475
|
Owner = o;
|
|
476
|
+
Listener = null;
|
|
474
477
|
try {
|
|
475
478
|
return runUpdates(fn, true);
|
|
476
479
|
} catch (err) {
|
|
477
480
|
handleError(err);
|
|
478
481
|
} finally {
|
|
479
482
|
Owner = prev;
|
|
483
|
+
Listener = prevListener;
|
|
480
484
|
}
|
|
481
485
|
}
|
|
482
486
|
function enableScheduling(scheduler = requestCallback) {
|
|
@@ -523,11 +527,10 @@ function devComponent(Comp, props) {
|
|
|
523
527
|
[$DEVCOMP]: true
|
|
524
528
|
});
|
|
525
529
|
return Comp(props);
|
|
526
|
-
}), undefined, true);
|
|
530
|
+
}), undefined, true, 0);
|
|
527
531
|
c.props = props;
|
|
528
532
|
c.observers = null;
|
|
529
533
|
c.observerSlots = null;
|
|
530
|
-
c.state = 0;
|
|
531
534
|
c.componentName = Comp.name;
|
|
532
535
|
updateComputation(c);
|
|
533
536
|
return c.tValue !== undefined ? c.tValue : c.value;
|
|
@@ -560,13 +563,15 @@ function registerGraph(name, value) {
|
|
|
560
563
|
Owner.sourceMap || (Owner.sourceMap = {});
|
|
561
564
|
while (Owner.sourceMap[tryName]) tryName = `${name}-${++i}`;
|
|
562
565
|
Owner.sourceMap[tryName] = value;
|
|
566
|
+
value.graph = Owner;
|
|
563
567
|
}
|
|
564
568
|
return tryName;
|
|
565
569
|
}
|
|
566
570
|
function serializeGraph(owner) {
|
|
567
571
|
owner || (owner = Owner);
|
|
568
572
|
if (!owner) return {};
|
|
569
|
-
return {
|
|
573
|
+
return {
|
|
574
|
+
...serializeValues(owner.sourceMap),
|
|
570
575
|
...(owner.owned ? serializeChildren(owner) : {})
|
|
571
576
|
};
|
|
572
577
|
}
|
|
@@ -682,8 +687,8 @@ function updateComputation(node) {
|
|
|
682
687
|
if (!node.fn) return;
|
|
683
688
|
cleanNode(node);
|
|
684
689
|
const owner = Owner,
|
|
685
|
-
|
|
686
|
-
|
|
690
|
+
listener = Listener,
|
|
691
|
+
time = ExecCount;
|
|
687
692
|
Listener = Owner = node;
|
|
688
693
|
runComputation(node, Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value, time);
|
|
689
694
|
if (Transition && !Transition.running && Transition.sources.has(node)) {
|
|
@@ -704,7 +709,17 @@ function runComputation(node, value, time) {
|
|
|
704
709
|
try {
|
|
705
710
|
nextValue = node.fn(value);
|
|
706
711
|
} catch (err) {
|
|
707
|
-
if (node.pure)
|
|
712
|
+
if (node.pure) {
|
|
713
|
+
if (Transition && Transition.running) {
|
|
714
|
+
node.tState = STALE;
|
|
715
|
+
node.tOwned && node.tOwned.forEach(cleanNode);
|
|
716
|
+
node.tOwned = undefined;
|
|
717
|
+
} else {
|
|
718
|
+
node.state = STALE;
|
|
719
|
+
node.owned && node.owned.forEach(cleanNode);
|
|
720
|
+
node.owned = null;
|
|
721
|
+
}
|
|
722
|
+
}
|
|
708
723
|
handleError(err);
|
|
709
724
|
}
|
|
710
725
|
if (!node.updatedAt || node.updatedAt <= time) {
|
|
@@ -772,7 +787,7 @@ function runTop(node) {
|
|
|
772
787
|
node = ancestors[i];
|
|
773
788
|
if (runningTransition) {
|
|
774
789
|
let top = node,
|
|
775
|
-
|
|
790
|
+
prev = ancestors[i + 1];
|
|
776
791
|
while ((top = top.owner) && top !== prev) {
|
|
777
792
|
if (Transition.disposed.has(top)) return;
|
|
778
793
|
}
|
|
@@ -799,6 +814,7 @@ function runUpdates(fn, init) {
|
|
|
799
814
|
return res;
|
|
800
815
|
} catch (err) {
|
|
801
816
|
if (!Updates) Effects = null;
|
|
817
|
+
Updates = null;
|
|
802
818
|
handleError(err);
|
|
803
819
|
}
|
|
804
820
|
}
|
|
@@ -869,7 +885,7 @@ function scheduleQueue(queue) {
|
|
|
869
885
|
}
|
|
870
886
|
function runUserEffects(queue) {
|
|
871
887
|
let i,
|
|
872
|
-
|
|
888
|
+
userLength = 0;
|
|
873
889
|
for (i = 0; i < queue.length; i++) {
|
|
874
890
|
const e = queue[i];
|
|
875
891
|
if (!e.user) runTop(e);else queue[userLength++] = e;
|
|
@@ -905,11 +921,11 @@ function cleanNode(node) {
|
|
|
905
921
|
if (node.sources) {
|
|
906
922
|
while (node.sources.length) {
|
|
907
923
|
const source = node.sources.pop(),
|
|
908
|
-
|
|
909
|
-
|
|
924
|
+
index = node.sourceSlots.pop(),
|
|
925
|
+
obs = source.observers;
|
|
910
926
|
if (obs && obs.length) {
|
|
911
927
|
const n = obs.pop(),
|
|
912
|
-
|
|
928
|
+
s = source.observerSlots.pop();
|
|
913
929
|
if (index < obs.length) {
|
|
914
930
|
n.sourceSlots[s] = index;
|
|
915
931
|
obs[index] = n;
|
|
@@ -999,7 +1015,8 @@ function serializeChildren(root) {
|
|
|
999
1015
|
const result = {};
|
|
1000
1016
|
for (let i = 0, len = root.owned.length; i < len; i++) {
|
|
1001
1017
|
const node = root.owned[i];
|
|
1002
|
-
result[node.componentName ? `${node.componentName}:${node.name}` : node.name] = {
|
|
1018
|
+
result[node.componentName ? `${node.componentName}:${node.name}` : node.name] = {
|
|
1019
|
+
...serializeValues(node.sourceMap),
|
|
1003
1020
|
...(node.owned ? serializeChildren(node) : {})
|
|
1004
1021
|
};
|
|
1005
1022
|
}
|
|
@@ -1057,27 +1074,27 @@ function dispose(d) {
|
|
|
1057
1074
|
}
|
|
1058
1075
|
function mapArray(list, mapFn, options = {}) {
|
|
1059
1076
|
let items = [],
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1077
|
+
mapped = [],
|
|
1078
|
+
disposers = [],
|
|
1079
|
+
len = 0,
|
|
1080
|
+
indexes = mapFn.length > 1 ? [] : null;
|
|
1064
1081
|
onCleanup(() => dispose(disposers));
|
|
1065
1082
|
return () => {
|
|
1066
1083
|
let newItems = list() || [],
|
|
1067
|
-
|
|
1068
|
-
|
|
1084
|
+
i,
|
|
1085
|
+
j;
|
|
1069
1086
|
newItems[$TRACK];
|
|
1070
1087
|
return untrack(() => {
|
|
1071
1088
|
let newLen = newItems.length,
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1089
|
+
newIndices,
|
|
1090
|
+
newIndicesNext,
|
|
1091
|
+
temp,
|
|
1092
|
+
tempdisposers,
|
|
1093
|
+
tempIndexes,
|
|
1094
|
+
start,
|
|
1095
|
+
end,
|
|
1096
|
+
newEnd,
|
|
1097
|
+
item;
|
|
1081
1098
|
if (newLen === 0) {
|
|
1082
1099
|
if (len !== 0) {
|
|
1083
1100
|
dispose(disposers);
|
|
@@ -1162,11 +1179,11 @@ function mapArray(list, mapFn, options = {}) {
|
|
|
1162
1179
|
}
|
|
1163
1180
|
function indexArray(list, mapFn, options = {}) {
|
|
1164
1181
|
let items = [],
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1182
|
+
mapped = [],
|
|
1183
|
+
disposers = [],
|
|
1184
|
+
signals = [],
|
|
1185
|
+
len = 0,
|
|
1186
|
+
i;
|
|
1170
1187
|
onCleanup(() => dispose(disposers));
|
|
1171
1188
|
return () => {
|
|
1172
1189
|
const newItems = list() || [];
|
|
@@ -1448,21 +1465,21 @@ function Switch(props) {
|
|
|
1448
1465
|
let keyed = false;
|
|
1449
1466
|
const equals = (a, b) => a[0] === b[0] && (strictEqual ? a[1] === b[1] : !a[1] === !b[1]) && a[2] === b[2];
|
|
1450
1467
|
const conditions = children(() => props.children),
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1468
|
+
evalConditions = createMemo(() => {
|
|
1469
|
+
let conds = conditions();
|
|
1470
|
+
if (!Array.isArray(conds)) conds = [conds];
|
|
1471
|
+
for (let i = 0; i < conds.length; i++) {
|
|
1472
|
+
const c = conds[i].when;
|
|
1473
|
+
if (c) {
|
|
1474
|
+
keyed = !!conds[i].keyed;
|
|
1475
|
+
return [i, c, conds[i]];
|
|
1476
|
+
}
|
|
1459
1477
|
}
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
} );
|
|
1478
|
+
return [-1];
|
|
1479
|
+
}, undefined, {
|
|
1480
|
+
equals,
|
|
1481
|
+
name: "eval conditions"
|
|
1482
|
+
} );
|
|
1466
1483
|
return createMemo(() => {
|
|
1467
1484
|
const [index, when, cond] = evalConditions();
|
|
1468
1485
|
if (index < 0) return props.fallback;
|
|
@@ -1511,9 +1528,9 @@ const suspenseListEquals = (a, b) => a.showContent === b.showContent && a.showFa
|
|
|
1511
1528
|
const SuspenseListContext = createContext();
|
|
1512
1529
|
function SuspenseList(props) {
|
|
1513
1530
|
let [wrapper, setWrapper] = createSignal(() => ({
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1531
|
+
inFallback: false
|
|
1532
|
+
})),
|
|
1533
|
+
show;
|
|
1517
1534
|
const listContext = useContext(SuspenseListContext);
|
|
1518
1535
|
const [registry, setRegistry] = createSignal([]);
|
|
1519
1536
|
if (listContext) {
|
|
@@ -1521,13 +1538,13 @@ function SuspenseList(props) {
|
|
|
1521
1538
|
}
|
|
1522
1539
|
const resolved = createMemo(prev => {
|
|
1523
1540
|
const reveal = props.revealOrder,
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1541
|
+
tail = props.tail,
|
|
1542
|
+
{
|
|
1543
|
+
showContent = true,
|
|
1544
|
+
showFallback = true
|
|
1545
|
+
} = show ? show() : {},
|
|
1546
|
+
reg = registry(),
|
|
1547
|
+
reverse = reveal === "backwards";
|
|
1531
1548
|
if (reveal === "together") {
|
|
1532
1549
|
const all = reg.every(inFallback => !inFallback());
|
|
1533
1550
|
const res = reg.map(() => ({
|
|
@@ -1542,7 +1559,7 @@ function SuspenseList(props) {
|
|
|
1542
1559
|
const res = [];
|
|
1543
1560
|
for (let i = 0, len = reg.length; i < len; i++) {
|
|
1544
1561
|
const n = reverse ? len - i - 1 : i,
|
|
1545
|
-
|
|
1562
|
+
s = reg[n]();
|
|
1546
1563
|
if (!stop && !s) {
|
|
1547
1564
|
res[n] = {
|
|
1548
1565
|
showContent,
|
|
@@ -1585,25 +1602,25 @@ function SuspenseList(props) {
|
|
|
1585
1602
|
}
|
|
1586
1603
|
function Suspense(props) {
|
|
1587
1604
|
let counter = 0,
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1605
|
+
show,
|
|
1606
|
+
ctx,
|
|
1607
|
+
p,
|
|
1608
|
+
flicker,
|
|
1609
|
+
error;
|
|
1593
1610
|
const [inFallback, setFallback] = createSignal(false),
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1611
|
+
SuspenseContext = getSuspenseContext(),
|
|
1612
|
+
store = {
|
|
1613
|
+
increment: () => {
|
|
1614
|
+
if (++counter === 1) setFallback(true);
|
|
1615
|
+
},
|
|
1616
|
+
decrement: () => {
|
|
1617
|
+
if (--counter === 0) setFallback(false);
|
|
1618
|
+
},
|
|
1619
|
+
inFallback,
|
|
1620
|
+
effects: [],
|
|
1621
|
+
resolved: false
|
|
1601
1622
|
},
|
|
1602
|
-
|
|
1603
|
-
effects: [],
|
|
1604
|
-
resolved: false
|
|
1605
|
-
},
|
|
1606
|
-
owner = getOwner();
|
|
1623
|
+
owner = getOwner();
|
|
1607
1624
|
if (sharedConfig.context && sharedConfig.load) {
|
|
1608
1625
|
const key = sharedConfig.context.id + sharedConfig.context.count;
|
|
1609
1626
|
let ref = sharedConfig.load(key);
|
|
@@ -1643,10 +1660,10 @@ function Suspense(props) {
|
|
|
1643
1660
|
const rendered = createMemo(() => props.children);
|
|
1644
1661
|
return createMemo(prev => {
|
|
1645
1662
|
const inFallback = store.inFallback(),
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1663
|
+
{
|
|
1664
|
+
showContent = true,
|
|
1665
|
+
showFallback = true
|
|
1666
|
+
} = show ? show() : {};
|
|
1650
1667
|
if ((!inFallback || p && p !== "$$f") && showContent) {
|
|
1651
1668
|
store.resolved = true;
|
|
1652
1669
|
dispose && dispose();
|