@rific/scroll-view 0.6.4 → 0.6.5
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 +2 -1
- package/dist/index.mjs +2 -1
- package/package.json +1 -1
- package/src/ScrollViewFooter.tsx +7 -1
package/dist/index.js
CHANGED
|
@@ -1096,9 +1096,10 @@ var ScrollViewFooter = ({ children, style }) => {
|
|
|
1096
1096
|
}, [footerHeight, footerFixed, headerHeightShared, pullSearchHeightShared, scrollPosition, snapBackFooterShared, footerOffset]);
|
|
1097
1097
|
const containerPaddingBottom = footerFixed && footerAboveKeyboard ? keyboardHeight : 0;
|
|
1098
1098
|
const rowPaddingBottom = footerFixed && footerAboveKeyboard ? Math.max(insets.bottom - keyboardHeight, 0) : insets.bottom;
|
|
1099
|
+
const { paddingBottom: consumerPaddingBottom, ...restStyle } = style ?? {};
|
|
1099
1100
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_native_reanimated11.default.View, { onLayout: handleLayout, pointerEvents: "box-none", style: [styles6.footer, { bottom: tabBarHeight, paddingBottom: containerPaddingBottom }, footerStyle], children: [
|
|
1100
1101
|
(footerHeight ?? 0) > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_auto_paper3.BlurView, { blur, style: import_react_native11.StyleSheet.absoluteFill }),
|
|
1101
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native11.View, { style: [styles6.row, { paddingBottom: rowPaddingBottom }
|
|
1102
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native11.View, { style: [styles6.row, restStyle, { paddingBottom: rowPaddingBottom + (typeof consumerPaddingBottom === "number" ? consumerPaddingBottom : 0) }], children })
|
|
1102
1103
|
] });
|
|
1103
1104
|
};
|
|
1104
1105
|
var styles6 = import_react_native11.StyleSheet.create({
|
package/dist/index.mjs
CHANGED
|
@@ -1038,6 +1038,7 @@ var ScrollViewFooter = ({ children, style }) => {
|
|
|
1038
1038
|
}, [footerHeight, footerFixed, headerHeightShared, pullSearchHeightShared, scrollPosition, snapBackFooterShared, footerOffset]);
|
|
1039
1039
|
const containerPaddingBottom = footerFixed && footerAboveKeyboard ? keyboardHeight : 0;
|
|
1040
1040
|
const rowPaddingBottom = footerFixed && footerAboveKeyboard ? Math.max(insets.bottom - keyboardHeight, 0) : insets.bottom;
|
|
1041
|
+
const { paddingBottom: consumerPaddingBottom, ...restStyle } = style ?? {};
|
|
1041
1042
|
return (
|
|
1042
1043
|
// bottom: tabBarHeight (not the styles.footer default of 0) - a consuming app's own persistent
|
|
1043
1044
|
// tab bar (a fixture outside this package's header/footer concepts entirely, same as
|
|
@@ -1045,7 +1046,7 @@ var ScrollViewFooter = ({ children, style }) => {
|
|
|
1045
1046
|
// bar has to clear it rather than rendering flush against 0 and overlapping/hiding behind it.
|
|
1046
1047
|
/* @__PURE__ */ jsxs5(Animated5.View, { onLayout: handleLayout, pointerEvents: "box-none", style: [styles6.footer, { bottom: tabBarHeight, paddingBottom: containerPaddingBottom }, footerStyle], children: [
|
|
1047
1048
|
(footerHeight ?? 0) > 0 && /* @__PURE__ */ jsx8(BlurView2, { blur, style: StyleSheet5.absoluteFill }),
|
|
1048
|
-
/* @__PURE__ */ jsx8(View5, { style: [styles6.row, { paddingBottom: rowPaddingBottom }
|
|
1049
|
+
/* @__PURE__ */ jsx8(View5, { style: [styles6.row, restStyle, { paddingBottom: rowPaddingBottom + (typeof consumerPaddingBottom === "number" ? consumerPaddingBottom : 0) }], children })
|
|
1049
1050
|
] })
|
|
1050
1051
|
);
|
|
1051
1052
|
};
|
package/package.json
CHANGED
package/src/ScrollViewFooter.tsx
CHANGED
|
@@ -75,6 +75,12 @@ export const ScrollViewFooter = ({ children, style }: ScrollViewFooterProps) =>
|
|
|
75
75
|
// padding's growth cancel out exactly, so the content holds still at the safe-area line instead
|
|
76
76
|
// of dropping past it and correcting back up.
|
|
77
77
|
const rowPaddingBottom = footerFixed && footerAboveKeyboard ? Math.max(insets.bottom - keyboardHeight, 0) : insets.bottom
|
|
78
|
+
// A consumer's own `style.paddingBottom` (e.g. tightening the row's vertical rhythm to match a
|
|
79
|
+
// header's actionMargin) is spread after rowPaddingBottom below, so it has to be added to it
|
|
80
|
+
// rather than assigned after it — plain style-array merge would otherwise let it silently
|
|
81
|
+
// replace the safe-area clearance instead of sitting on top of it, leaving the row's real
|
|
82
|
+
// content (buttons, etc.) flush against the home indicator.
|
|
83
|
+
const { paddingBottom: consumerPaddingBottom, ...restStyle } = style ?? {}
|
|
78
84
|
return (
|
|
79
85
|
// bottom: tabBarHeight (not the styles.footer default of 0) - a consuming app's own persistent
|
|
80
86
|
// tab bar (a fixture outside this package's header/footer concepts entirely, same as
|
|
@@ -82,7 +88,7 @@ export const ScrollViewFooter = ({ children, style }: ScrollViewFooterProps) =>
|
|
|
82
88
|
// bar has to clear it rather than rendering flush against 0 and overlapping/hiding behind it.
|
|
83
89
|
<Animated.View onLayout={handleLayout} pointerEvents='box-none' style={[styles.footer, { bottom: tabBarHeight, paddingBottom: containerPaddingBottom }, footerStyle]}>
|
|
84
90
|
{(footerHeight ?? 0) > 0 && <BlurView blur={blur} style={StyleSheet.absoluteFill} />}
|
|
85
|
-
<View style={[styles.row, { paddingBottom: rowPaddingBottom }
|
|
91
|
+
<View style={[styles.row, restStyle, { paddingBottom: rowPaddingBottom + (typeof consumerPaddingBottom === 'number' ? consumerPaddingBottom : 0) }]}>{children}</View>
|
|
86
92
|
</Animated.View>
|
|
87
93
|
)
|
|
88
94
|
}
|