@jsenv/navi 0.30.27 → 0.30.28
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/jsenv_navi.js +14 -4
- package/dist/dev/jsenv_navi.js.map +2 -2
- package/dist/jsenv_navi.js +14 -4
- package/dist/jsenv_navi.js.map +2 -2
- package/docs/data_states.md +4 -2
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -32391,6 +32391,16 @@ const useActionAsyncData = (action, {
|
|
|
32391
32391
|
if (runningState === COMPLETED) {
|
|
32392
32392
|
return [action.dataSignal.peek(), false, undefined];
|
|
32393
32393
|
}
|
|
32394
|
+
// Called off (abort(), a route left with nothing else asking for it): nothing
|
|
32395
|
+
// is on its way until something runs it again. What it held stays drawn and
|
|
32396
|
+
// no wait is claimed. A delegated wait holding nothing has nothing to draw,
|
|
32397
|
+
// and suspends below until the next run.
|
|
32398
|
+
if (runningState === ABORTED) {
|
|
32399
|
+
const dataHeld = action.dataSignal.peek();
|
|
32400
|
+
if (dataHeld !== undefined || loadingEffect === "use") {
|
|
32401
|
+
return [dataHeld, false, undefined];
|
|
32402
|
+
}
|
|
32403
|
+
}
|
|
32394
32404
|
if (runningState === FAILED) {
|
|
32395
32405
|
if (prerun) {
|
|
32396
32406
|
// Neither shown nor reported from a head start: the failure is the
|
|
@@ -32466,8 +32476,7 @@ const useActionAsyncData = (action, {
|
|
|
32466
32476
|
|
|
32467
32477
|
// `loading: true` says the component draws its own wait, so this hook never
|
|
32468
32478
|
// suspends: running, or holding params nobody has started yet — a debounced
|
|
32469
|
-
// binding that just retargeted,
|
|
32470
|
-
// about to issue. Either way what is on screen is not the current answer,
|
|
32479
|
+
// binding that just retargeted, a run this very render is about to issue. Either way what is on screen is not the current answer,
|
|
32471
32480
|
// which is what `loading` says. Suspending would not draw a spinner: it swaps
|
|
32472
32481
|
// the subtree for the boundary, and everything under it remounts — a dialog
|
|
32473
32482
|
// open inside it is then closed, by a hook the caller told to stay out of it.
|
|
@@ -32475,7 +32484,8 @@ const useActionAsyncData = (action, {
|
|
|
32475
32484
|
return [action.dataSignal.peek(), true, undefined];
|
|
32476
32485
|
}
|
|
32477
32486
|
|
|
32478
|
-
// IDLE or
|
|
32487
|
+
// IDLE, RUNNING, or called off holding nothing, with loadingEffect:
|
|
32488
|
+
// "delegate" — suspend
|
|
32479
32489
|
const reason = runningState === RUNNING ? "loading" : "idle";
|
|
32480
32490
|
loadingRef.current = {
|
|
32481
32491
|
reason,
|
|
@@ -32497,7 +32507,7 @@ const useActionAsyncData = (action, {
|
|
|
32497
32507
|
} else if (reason === "loading" && state === ABORTED) {
|
|
32498
32508
|
// The run waited on was called off: drawn again, this reader asks
|
|
32499
32509
|
// for it again when nothing else will (calledOffBeforeThisReader),
|
|
32500
|
-
// or waits for the next run as idle.
|
|
32510
|
+
// draws what the instance held, or waits for the next run as idle.
|
|
32501
32511
|
actionPendingPromiseWeakMap.delete(action);
|
|
32502
32512
|
unsubscribe();
|
|
32503
32513
|
resolve();
|