@rific/scroll-view 0.6.4 → 0.6.6

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 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 }, style], children })
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 }, style], children })
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rific/scroll-view",
3
- "version": "0.6.4",
3
+ "version": "0.6.6",
4
4
  "description": "Blur styled scroll system for React Native. Floating headers/footers, keyboard awareness, and scroll-away chrome",
5
5
  "keywords": [
6
6
  "react-native",
@@ -46,34 +46,33 @@
46
46
  "scripts": {
47
47
  "build": "tsup src/index.ts --format cjs,esm --dts --clean",
48
48
  "build:watch": "tsup src/index.ts --format cjs,esm --dts --watch",
49
+ "ci": "npm run lint && npm test && npm run typecheck && npm run build",
49
50
  "fix": "eslint --fix",
50
51
  "lint": "eslint",
51
52
  "prepublishOnly": "npm run build",
52
53
  "release": "git push --follow-tags",
53
- "release:major": "npm version major && git push --follow-tags",
54
- "release:minor": "npm version minor && git push --follow-tags",
55
- "release:patch": "npm version patch && git push --follow-tags",
54
+ "release:major": "npm version major && npm run release",
55
+ "release:minor": "npm version minor && npm run release",
56
+ "release:patch": "npm version patch && npm run release",
56
57
  "test": "jest",
57
58
  "test:watch": "jest --watchAll",
58
59
  "typecheck": "tsc --noEmit",
59
- "preversion": "npm run lint && npm test && npm run build"
60
+ "preversion": "npm run ci"
60
61
  },
62
+ "prettier": "@infinitetoken/eslint-config/prettier",
61
63
  "devDependencies": {
64
+ "@infinitetoken/eslint-config": "^0.1.4",
65
+ "@infinitetoken/tsconfig": "^0.1.1",
62
66
  "@reduxjs/toolkit": "^2.12.0",
63
- "@rific/auto-paper": "^0.9.2",
67
+ "@rific/auto-paper": "^0.10.0",
64
68
  "@testing-library/dom": "^10.4.1",
65
69
  "@testing-library/react": "^16.3.2",
66
70
  "@types/jest": "^30.0.0",
67
71
  "@types/react": "^19.0.0",
68
72
  "@types/react-native": "^0.73.0",
69
- "@typescript-eslint/parser": "^8.59.3",
70
73
  "eslint": "^9.39.4",
71
- "eslint-config-prettier": "^10.1.8",
72
- "eslint-plugin-package-json": "^1.0.0",
73
- "eslint-plugin-prettier": "^5.5.5",
74
74
  "eslint-plugin-react-hooks": "^7.1.1",
75
75
  "eslint-plugin-react-native": "^5.0.0",
76
- "eslint-plugin-simple-import-sort": "^13.0.0",
77
76
  "jest": "^30.4.2",
78
77
  "jest-environment-jsdom": "^30.4.1",
79
78
  "prettier": "^3.8.3",
@@ -89,11 +88,10 @@
89
88
  "ts-jest": "^29.4.9",
90
89
  "ts-node": "^10.9.2",
91
90
  "tsup": "^8.0.0",
92
- "typescript": "^6.0.3",
93
- "typescript-eslint": "^8.59.3"
91
+ "typescript": "^6.0.3"
94
92
  },
95
93
  "peerDependencies": {
96
- "@rific/auto-paper": "^0.9.2",
94
+ "@rific/auto-paper": "^0.10.0",
97
95
  "react": ">=19.0.0",
98
96
  "react-native": ">=0.83.0",
99
97
  "react-native-gesture-handler": ">=2.0.0 <3.0.0",
@@ -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 }, style]}>{children}</View>
91
+ <View style={[styles.row, restStyle, { paddingBottom: rowPaddingBottom + (typeof consumerPaddingBottom === 'number' ? consumerPaddingBottom : 0) }]}>{children}</View>
86
92
  </Animated.View>
87
93
  )
88
94
  }