@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/dev/jsenv_navi.js
CHANGED
|
@@ -33521,6 +33521,16 @@ const useActionAsyncData = (action, {
|
|
|
33521
33521
|
if (runningState === COMPLETED) {
|
|
33522
33522
|
return [action.dataSignal.peek(), false, undefined];
|
|
33523
33523
|
}
|
|
33524
|
+
// Called off (abort(), a route left with nothing else asking for it): nothing
|
|
33525
|
+
// is on its way until something runs it again. What it held stays drawn and
|
|
33526
|
+
// no wait is claimed. A delegated wait holding nothing has nothing to draw,
|
|
33527
|
+
// and suspends below until the next run.
|
|
33528
|
+
if (runningState === ABORTED) {
|
|
33529
|
+
const dataHeld = action.dataSignal.peek();
|
|
33530
|
+
if (dataHeld !== undefined || loadingEffect === "use") {
|
|
33531
|
+
return [dataHeld, false, undefined];
|
|
33532
|
+
}
|
|
33533
|
+
}
|
|
33524
33534
|
if (runningState === FAILED) {
|
|
33525
33535
|
if (prerun) {
|
|
33526
33536
|
// Neither shown nor reported from a head start: the failure is the
|
|
@@ -33596,8 +33606,7 @@ const useActionAsyncData = (action, {
|
|
|
33596
33606
|
|
|
33597
33607
|
// `loading: true` says the component draws its own wait, so this hook never
|
|
33598
33608
|
// suspends: running, or holding params nobody has started yet — a debounced
|
|
33599
|
-
// binding that just retargeted,
|
|
33600
|
-
// about to issue. Either way what is on screen is not the current answer,
|
|
33609
|
+
// binding that just retargeted, a run this very render is about to issue. Either way what is on screen is not the current answer,
|
|
33601
33610
|
// which is what `loading` says. Suspending would not draw a spinner: it swaps
|
|
33602
33611
|
// the subtree for the boundary, and everything under it remounts — a dialog
|
|
33603
33612
|
// open inside it is then closed, by a hook the caller told to stay out of it.
|
|
@@ -33605,7 +33614,8 @@ const useActionAsyncData = (action, {
|
|
|
33605
33614
|
return [action.dataSignal.peek(), true, undefined];
|
|
33606
33615
|
}
|
|
33607
33616
|
|
|
33608
|
-
// IDLE or
|
|
33617
|
+
// IDLE, RUNNING, or called off holding nothing, with loadingEffect:
|
|
33618
|
+
// "delegate" — suspend
|
|
33609
33619
|
const reason = runningState === RUNNING ? "loading" : "idle";
|
|
33610
33620
|
loadingRef.current = {
|
|
33611
33621
|
reason,
|
|
@@ -33627,7 +33637,7 @@ const useActionAsyncData = (action, {
|
|
|
33627
33637
|
} else if (reason === "loading" && state === ABORTED) {
|
|
33628
33638
|
// The run waited on was called off: drawn again, this reader asks
|
|
33629
33639
|
// for it again when nothing else will (calledOffBeforeThisReader),
|
|
33630
|
-
// or waits for the next run as idle.
|
|
33640
|
+
// draws what the instance held, or waits for the next run as idle.
|
|
33631
33641
|
actionPendingPromiseWeakMap.delete(action);
|
|
33632
33642
|
unsubscribe();
|
|
33633
33643
|
resolve();
|