@william-callao/antonella-ui 2.0.1 → 2.0.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/index.js +16 -14
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10300,6 +10300,10 @@ function AppLayout({
|
|
|
10300
10300
|
() => computeSectionTargets(resolveLayoutState(initialRoute.state), initialNaturalsValue, H)
|
|
10301
10301
|
);
|
|
10302
10302
|
const appliedRef = (0, import_react37.useRef)(layoutHeights);
|
|
10303
|
+
const previousLayoutHeightsRef = (0, import_react37.useRef)(layoutHeights);
|
|
10304
|
+
(0, import_react37.useLayoutEffect)(() => {
|
|
10305
|
+
previousLayoutHeightsRef.current = layoutHeights;
|
|
10306
|
+
}, [layoutHeights]);
|
|
10303
10307
|
const naturalsRef = (0, import_react37.useRef)({ ...initialNaturalsValue });
|
|
10304
10308
|
const routeSnapshotRef = (0, import_react37.useRef)(/* @__PURE__ */ new Map());
|
|
10305
10309
|
const [revealHidden, setRevealHidden] = (0, import_react37.useState)(false);
|
|
@@ -10382,14 +10386,10 @@ function AppLayout({
|
|
|
10382
10386
|
});
|
|
10383
10387
|
return () => sub.remove();
|
|
10384
10388
|
}, [canGoBack, back]);
|
|
10385
|
-
const navigationValue =
|
|
10386
|
-
navigate,
|
|
10387
|
-
back,
|
|
10388
|
-
|
|
10389
|
-
currentRoute,
|
|
10390
|
-
stack,
|
|
10391
|
-
replace
|
|
10392
|
-
};
|
|
10389
|
+
const navigationValue = (0, import_react37.useMemo)(
|
|
10390
|
+
() => ({ navigate, back, canGoBack, currentRoute, stack, replace }),
|
|
10391
|
+
[navigate, back, canGoBack, currentRoute, stack, replace]
|
|
10392
|
+
);
|
|
10393
10393
|
const state = resolveLayoutState(currentRoute.state);
|
|
10394
10394
|
const slots = currentRoute.slots ?? {};
|
|
10395
10395
|
stateRef.current = state;
|
|
@@ -10404,9 +10404,6 @@ function AppLayout({
|
|
|
10404
10404
|
const skipContentFadeOut = leavingFullBottom || leavingOnlyCenter || goingBack;
|
|
10405
10405
|
const contentFadeOutMs = goingBack ? CONTENT_FADE_OUT_BACK_MS : CONTENT_FADE_OUT_MS;
|
|
10406
10406
|
const contentFadeInMs = goingBack ? CONTENT_FADE_IN_BACK_MS : CONTENT_FADE_IN_MS;
|
|
10407
|
-
if (contentFadeEnabled) {
|
|
10408
|
-
contentOutProgress.value = skipContentFadeOut ? 0 : 1;
|
|
10409
|
-
}
|
|
10410
10407
|
const transitionDuration = (() => {
|
|
10411
10408
|
if (transitionLatchRef.current.route === currentRoute.name) {
|
|
10412
10409
|
return transitionLatchRef.current.duration;
|
|
@@ -10598,7 +10595,9 @@ function AppLayout({
|
|
|
10598
10595
|
const cur = state.sections[k];
|
|
10599
10596
|
const prevB = prevLayoutState?.sections[k];
|
|
10600
10597
|
const prevVisible = !!prevB?.visible;
|
|
10601
|
-
if (!cur?.visible && (!prevVisible || goingBack))
|
|
10598
|
+
if (!cur?.visible && (!prevVisible || goingBack)) {
|
|
10599
|
+
return null;
|
|
10600
|
+
}
|
|
10602
10601
|
const usePrevContent = !cur?.visible && prevVisible;
|
|
10603
10602
|
const behavior = usePrevContent ? prevB : cur;
|
|
10604
10603
|
const slot = behavior?.slot;
|
|
@@ -10621,6 +10620,9 @@ function AppLayout({
|
|
|
10621
10620
|
const skipPreviousCenter = enteringOnlyCenter && k === "mid";
|
|
10622
10621
|
const previousSlot = contentFadeEnabled && !skipContentFadeOut && !goingBack && !skipPreviousCenter && !hidePreviousBody && !usePrevContent ? prevB?.slot : void 0;
|
|
10623
10622
|
const previousContent = previousSlot ? prevRoute?.slots?.[previousSlot] : null;
|
|
10623
|
+
const remountOnBack = goingBack && isOnlyCenterLayout(state);
|
|
10624
|
+
const sectionKey = remountOnBack ? `${k}:${currentRoute.name}` : k;
|
|
10625
|
+
const animateSectionLayout = animateLayout && previousLayoutHeightsRef.current[k] !== height;
|
|
10624
10626
|
const currentLayer = /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
10625
10627
|
import_react_native_reanimated17.default.View,
|
|
10626
10628
|
{
|
|
@@ -10650,7 +10652,7 @@ function AppLayout({
|
|
|
10650
10652
|
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
10651
10653
|
import_react_native_reanimated17.default.View,
|
|
10652
10654
|
{
|
|
10653
|
-
layout:
|
|
10655
|
+
layout: remountOnBack || !animateSectionLayout ? void 0 : transition2,
|
|
10654
10656
|
collapsable: false,
|
|
10655
10657
|
style: [
|
|
10656
10658
|
styles79.colBlock,
|
|
@@ -10675,7 +10677,7 @@ function AppLayout({
|
|
|
10675
10677
|
] }) })
|
|
10676
10678
|
]
|
|
10677
10679
|
},
|
|
10678
|
-
|
|
10680
|
+
sectionKey
|
|
10679
10681
|
);
|
|
10680
10682
|
};
|
|
10681
10683
|
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(AppNavigationContext.Provider, { value: navigationValue, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_react_native_reanimated17.default.View, { style: [styles79.root, pageBgStyle], children: [
|