@hgdc/ui 0.14.1 → 0.14.2
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/app-shell.js +5 -2
- package/package.json +1 -1
package/dist/app-shell.js
CHANGED
|
@@ -139,7 +139,6 @@ export function AppShell({ product, organization, productRail = true, accountHre
|
|
|
139
139
|
// Chargement de la zone de contenu : navigation en cours (après 50 ms, au moins 300 ms), ou départ
|
|
140
140
|
// vers un autre produit (aussitôt). Une page qui affiche déjà `PagePending` montre le même H au
|
|
141
141
|
// même endroit : le calque de la coque s'efface alors derrière lui.
|
|
142
|
-
const navigatingShown = useDelayedFlag(navigating, PAGE_PENDING_MS, PAGE_PENDING_MIN_MS);
|
|
143
142
|
const [leaving, setLeaving] = useState(false);
|
|
144
143
|
const [pagePending, setPagePending] = useState(0);
|
|
145
144
|
const registerPagePending = useCallback(() => {
|
|
@@ -156,7 +155,11 @@ export function AppShell({ product, organization, productRail = true, accountHre
|
|
|
156
155
|
window.addEventListener("pageshow", onPageShow);
|
|
157
156
|
return () => window.removeEventListener("pageshow", onPageShow);
|
|
158
157
|
}, []);
|
|
159
|
-
|
|
158
|
+
// Le calque attend 50 ms et reste au moins 300 ms ; quand la page prend le relais avec
|
|
159
|
+
// `PagePending` (même H, même place, même phase), il s'efface derrière elle sans que rien ne bouge,
|
|
160
|
+
// et ne revient pas quand la page arrive.
|
|
161
|
+
const navigatingShown = useDelayedFlag(navigating && pagePending === 0, PAGE_PENDING_MS, PAGE_PENDING_MIN_MS);
|
|
162
|
+
const loading = navigatingShown || leaving;
|
|
160
163
|
const contentRef = useRef(null);
|
|
161
164
|
useEffect(() => {
|
|
162
165
|
// Sur ordinateur, la zone de contenu défile seule : le calque couvre sa partie visible, en haut.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hgdc/ui",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.2",
|
|
4
4
|
"description": "Interface de la H family : jetons de la DA, thèmes, polices et composants.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"homepage": "https://github.com/hugogebel-boop/hgdc-kit/tree/main/packages/ui#readme",
|