@draftbit/core 50.0.1-1abf1b.2 → 50.0.1

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.
Files changed (44) hide show
  1. package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleFlashList.js +1 -1
  2. package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleFlatList.js +1 -1
  3. package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js +1 -1
  4. package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleSectionList.js +1 -1
  5. package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js +1 -1
  6. package/lib/commonjs/components/SimpleStyleScrollables/useSplitContentContainerStyles.js +1 -1
  7. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleFlashList.d.ts +1 -1
  8. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleFlashList.js +3 -3
  9. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleFlashList.js.map +1 -1
  10. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleFlatList.d.ts +1 -1
  11. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleFlatList.js +3 -3
  12. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleFlatList.js.map +1 -1
  13. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.d.ts +1 -1
  14. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js +3 -3
  15. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js.map +1 -1
  16. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleSectionList.d.ts +1 -1
  17. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleSectionList.js +3 -3
  18. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleSectionList.js.map +1 -1
  19. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.d.ts +1 -1
  20. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js +3 -3
  21. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js.map +1 -1
  22. package/lib/typescript/src/components/SimpleStyleScrollables/useSplitContentContainerStyles.d.ts +2 -1
  23. package/lib/typescript/src/components/SimpleStyleScrollables/useSplitContentContainerStyles.js +31 -7
  24. package/lib/typescript/src/components/SimpleStyleScrollables/useSplitContentContainerStyles.js.map +1 -1
  25. package/lib/typescript/tsconfig.tsbuildinfo +1 -1
  26. package/package.json +3 -3
  27. package/src/components/SimpleStyleScrollables/SimpleStyleFlashList.js +3 -3
  28. package/src/components/SimpleStyleScrollables/SimpleStyleFlashList.js.map +1 -1
  29. package/src/components/SimpleStyleScrollables/SimpleStyleFlashList.tsx +4 -1
  30. package/src/components/SimpleStyleScrollables/SimpleStyleFlatList.js +3 -3
  31. package/src/components/SimpleStyleScrollables/SimpleStyleFlatList.js.map +1 -1
  32. package/src/components/SimpleStyleScrollables/SimpleStyleFlatList.tsx +4 -1
  33. package/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js +3 -3
  34. package/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js.map +1 -1
  35. package/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.tsx +4 -1
  36. package/src/components/SimpleStyleScrollables/SimpleStyleSectionList.js +3 -3
  37. package/src/components/SimpleStyleScrollables/SimpleStyleSectionList.js.map +1 -1
  38. package/src/components/SimpleStyleScrollables/SimpleStyleSectionList.tsx +4 -1
  39. package/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js +3 -3
  40. package/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js.map +1 -1
  41. package/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.tsx +4 -1
  42. package/src/components/SimpleStyleScrollables/useSplitContentContainerStyles.js +31 -7
  43. package/src/components/SimpleStyleScrollables/useSplitContentContainerStyles.js.map +1 -1
  44. package/src/components/SimpleStyleScrollables/useSplitContentContainerStyles.ts +36 -7
@@ -1 +1 @@
1
- import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["style"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/SimpleStyleScrollables/SimpleStyleFlashList.tsx";import React from"react";import{FlashList}from"@shopify/flash-list";import useSplitContentContainerStyles from"./useSplitContentContainerStyles";import{jsx as _jsx}from"react/jsx-runtime";var SimpleStyleFlashList=function SimpleStyleFlashList(_ref){var styleProp=_ref.style,rest=_objectWithoutProperties(_ref,_excluded);var _React$useState=React.useState(),_React$useState2=_slicedToArray(_React$useState,2),measuredWidth=_React$useState2[0],setMeasuredWidth=_React$useState2[1];var _React$useState3=React.useState(),_React$useState4=_slicedToArray(_React$useState3,2),measuredHeight=_React$useState4[0],setMeasuredHeight=_React$useState4[1];var _useSplitContentConta=useSplitContentContainerStyles(styleProp,measuredWidth,measuredHeight),style=_useSplitContentConta.style,contentContainerStyle=_useSplitContentConta.contentContainerStyle;return _jsx(FlashList,Object.assign({onLayout:function onLayout(event){setMeasuredWidth(event.nativeEvent.layout.width);setMeasuredHeight(event.nativeEvent.layout.height);},style:style,contentContainerStyle:contentContainerStyle},rest));};export default SimpleStyleFlashList;
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["style","data"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/SimpleStyleScrollables/SimpleStyleFlashList.tsx";import React from"react";import{FlashList}from"@shopify/flash-list";import useSplitContentContainerStyles from"./useSplitContentContainerStyles";import{jsx as _jsx}from"react/jsx-runtime";var SimpleStyleFlashList=function SimpleStyleFlashList(_ref){var styleProp=_ref.style,data=_ref.data,rest=_objectWithoutProperties(_ref,_excluded);var _React$useState=React.useState(),_React$useState2=_slicedToArray(_React$useState,2),measuredWidth=_React$useState2[0],setMeasuredWidth=_React$useState2[1];var _React$useState3=React.useState(),_React$useState4=_slicedToArray(_React$useState3,2),measuredHeight=_React$useState4[0],setMeasuredHeight=_React$useState4[1];var _useSplitContentConta=useSplitContentContainerStyles(styleProp,measuredWidth,measuredHeight,[data]),style=_useSplitContentConta.style,contentContainerStyle=_useSplitContentConta.contentContainerStyle;return _jsx(FlashList,Object.assign({onLayout:function onLayout(event){setMeasuredWidth(event.nativeEvent.layout.width);setMeasuredHeight(event.nativeEvent.layout.height);},style:style,contentContainerStyle:contentContainerStyle,data:data},rest));};export default SimpleStyleFlashList;
@@ -1 +1 @@
1
- import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["style"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/SimpleStyleScrollables/SimpleStyleFlatList.tsx";import React from"react";import{FlatList}from"react-native";import useSplitContentContainerStyles from"./useSplitContentContainerStyles";import{jsx as _jsx}from"react/jsx-runtime";var SimpleStyleFlatList=function SimpleStyleFlatList(_ref){var styleProp=_ref.style,rest=_objectWithoutProperties(_ref,_excluded);var _React$useState=React.useState(),_React$useState2=_slicedToArray(_React$useState,2),measuredWidth=_React$useState2[0],setMeasuredWidth=_React$useState2[1];var _React$useState3=React.useState(),_React$useState4=_slicedToArray(_React$useState3,2),measuredHeight=_React$useState4[0],setMeasuredHeight=_React$useState4[1];var _useSplitContentConta=useSplitContentContainerStyles(styleProp,measuredWidth,measuredHeight),style=_useSplitContentConta.style,contentContainerStyle=_useSplitContentConta.contentContainerStyle;return _jsx(FlatList,Object.assign({onLayout:function onLayout(event){setMeasuredWidth(event.nativeEvent.layout.width);setMeasuredHeight(event.nativeEvent.layout.height);},style:style,contentContainerStyle:contentContainerStyle},rest));};export default SimpleStyleFlatList;
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["style","data"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/SimpleStyleScrollables/SimpleStyleFlatList.tsx";import React from"react";import{FlatList}from"react-native";import useSplitContentContainerStyles from"./useSplitContentContainerStyles";import{jsx as _jsx}from"react/jsx-runtime";var SimpleStyleFlatList=function SimpleStyleFlatList(_ref){var styleProp=_ref.style,data=_ref.data,rest=_objectWithoutProperties(_ref,_excluded);var _React$useState=React.useState(),_React$useState2=_slicedToArray(_React$useState,2),measuredWidth=_React$useState2[0],setMeasuredWidth=_React$useState2[1];var _React$useState3=React.useState(),_React$useState4=_slicedToArray(_React$useState3,2),measuredHeight=_React$useState4[0],setMeasuredHeight=_React$useState4[1];var _useSplitContentConta=useSplitContentContainerStyles(styleProp,measuredWidth,measuredHeight,[data]),style=_useSplitContentConta.style,contentContainerStyle=_useSplitContentConta.contentContainerStyle;return _jsx(FlatList,Object.assign({onLayout:function onLayout(event){setMeasuredWidth(event.nativeEvent.layout.width);setMeasuredHeight(event.nativeEvent.layout.height);},style:style,contentContainerStyle:contentContainerStyle,data:data},rest));};export default SimpleStyleFlatList;
@@ -1 +1 @@
1
- import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["style"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.tsx";import React from"react";import{MasonryFlashList}from"@shopify/flash-list";import useSplitContentContainerStyles from"./useSplitContentContainerStyles";import{jsx as _jsx}from"react/jsx-runtime";var SimpleStyleMasonryFlashList=function SimpleStyleMasonryFlashList(_ref){var styleProp=_ref.style,rest=_objectWithoutProperties(_ref,_excluded);var _React$useState=React.useState(),_React$useState2=_slicedToArray(_React$useState,2),measuredWidth=_React$useState2[0],setMeasuredWidth=_React$useState2[1];var _React$useState3=React.useState(),_React$useState4=_slicedToArray(_React$useState3,2),measuredHeight=_React$useState4[0],setMeasuredHeight=_React$useState4[1];var _useSplitContentConta=useSplitContentContainerStyles(styleProp,measuredWidth,measuredHeight),style=_useSplitContentConta.style,contentContainerStyle=_useSplitContentConta.contentContainerStyle;return _jsx(MasonryFlashList,Object.assign({onLayout:function onLayout(event){setMeasuredWidth(event.nativeEvent.layout.width);setMeasuredHeight(event.nativeEvent.layout.height);},style:style,contentContainerStyle:contentContainerStyle},rest));};export default SimpleStyleMasonryFlashList;
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["style","data"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.tsx";import React from"react";import{MasonryFlashList}from"@shopify/flash-list";import useSplitContentContainerStyles from"./useSplitContentContainerStyles";import{jsx as _jsx}from"react/jsx-runtime";var SimpleStyleMasonryFlashList=function SimpleStyleMasonryFlashList(_ref){var styleProp=_ref.style,data=_ref.data,rest=_objectWithoutProperties(_ref,_excluded);var _React$useState=React.useState(),_React$useState2=_slicedToArray(_React$useState,2),measuredWidth=_React$useState2[0],setMeasuredWidth=_React$useState2[1];var _React$useState3=React.useState(),_React$useState4=_slicedToArray(_React$useState3,2),measuredHeight=_React$useState4[0],setMeasuredHeight=_React$useState4[1];var _useSplitContentConta=useSplitContentContainerStyles(styleProp,measuredWidth,measuredHeight,[data]),style=_useSplitContentConta.style,contentContainerStyle=_useSplitContentConta.contentContainerStyle;return _jsx(MasonryFlashList,Object.assign({onLayout:function onLayout(event){setMeasuredWidth(event.nativeEvent.layout.width);setMeasuredHeight(event.nativeEvent.layout.height);},style:style,contentContainerStyle:contentContainerStyle,data:data},rest));};export default SimpleStyleMasonryFlashList;
@@ -1 +1 @@
1
- import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["style"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/SimpleStyleScrollables/SimpleStyleSectionList.tsx";import React from"react";import{SectionList}from"../SectionList";import useSplitContentContainerStyles from"./useSplitContentContainerStyles";import{jsx as _jsx}from"react/jsx-runtime";var SimpleStyleSectionList=function SimpleStyleSectionList(_ref){var styleProp=_ref.style,rest=_objectWithoutProperties(_ref,_excluded);var _React$useState=React.useState(),_React$useState2=_slicedToArray(_React$useState,2),measuredWidth=_React$useState2[0],setMeasuredWidth=_React$useState2[1];var _React$useState3=React.useState(),_React$useState4=_slicedToArray(_React$useState3,2),measuredHeight=_React$useState4[0],setMeasuredHeight=_React$useState4[1];var _useSplitContentConta=useSplitContentContainerStyles(styleProp,measuredWidth,measuredHeight),style=_useSplitContentConta.style,contentContainerStyle=_useSplitContentConta.contentContainerStyle;return _jsx(SectionList,Object.assign({onLayout:function onLayout(event){setMeasuredWidth(event.nativeEvent.layout.width);setMeasuredHeight(event.nativeEvent.layout.height);},style:style,contentContainerStyle:contentContainerStyle},rest));};export default SimpleStyleSectionList;
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["style","data"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/SimpleStyleScrollables/SimpleStyleSectionList.tsx";import React from"react";import{SectionList}from"../SectionList";import useSplitContentContainerStyles from"./useSplitContentContainerStyles";import{jsx as _jsx}from"react/jsx-runtime";var SimpleStyleSectionList=function SimpleStyleSectionList(_ref){var styleProp=_ref.style,data=_ref.data,rest=_objectWithoutProperties(_ref,_excluded);var _React$useState=React.useState(),_React$useState2=_slicedToArray(_React$useState,2),measuredWidth=_React$useState2[0],setMeasuredWidth=_React$useState2[1];var _React$useState3=React.useState(),_React$useState4=_slicedToArray(_React$useState3,2),measuredHeight=_React$useState4[0],setMeasuredHeight=_React$useState4[1];var _useSplitContentConta=useSplitContentContainerStyles(styleProp,measuredWidth,measuredHeight,[data]),style=_useSplitContentConta.style,contentContainerStyle=_useSplitContentConta.contentContainerStyle;return _jsx(SectionList,Object.assign({onLayout:function onLayout(event){setMeasuredWidth(event.nativeEvent.layout.width);setMeasuredHeight(event.nativeEvent.layout.height);},style:style,contentContainerStyle:contentContainerStyle,data:data},rest));};export default SimpleStyleSectionList;
@@ -1 +1 @@
1
- import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["style"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.tsx";import React from"react";import{SwipeableList}from"../SwipeableItem";import useSplitContentContainerStyles from"./useSplitContentContainerStyles";import{jsx as _jsx}from"react/jsx-runtime";var SimpleStyleSwipeableList=function SimpleStyleSwipeableList(_ref){var styleProp=_ref.style,rest=_objectWithoutProperties(_ref,_excluded);var _React$useState=React.useState(),_React$useState2=_slicedToArray(_React$useState,2),measuredWidth=_React$useState2[0],setMeasuredWidth=_React$useState2[1];var _React$useState3=React.useState(),_React$useState4=_slicedToArray(_React$useState3,2),measuredHeight=_React$useState4[0],setMeasuredHeight=_React$useState4[1];var _useSplitContentConta=useSplitContentContainerStyles(styleProp,measuredWidth,measuredHeight),style=_useSplitContentConta.style,contentContainerStyle=_useSplitContentConta.contentContainerStyle;return _jsx(SwipeableList,Object.assign({onLayout:function onLayout(event){setMeasuredWidth(event.nativeEvent.layout.width);setMeasuredHeight(event.nativeEvent.layout.height);},style:style,contentContainerStyle:contentContainerStyle},rest));};export default SimpleStyleSwipeableList;
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["style","data"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.tsx";import React from"react";import{SwipeableList}from"../SwipeableItem";import useSplitContentContainerStyles from"./useSplitContentContainerStyles";import{jsx as _jsx}from"react/jsx-runtime";var SimpleStyleSwipeableList=function SimpleStyleSwipeableList(_ref){var styleProp=_ref.style,data=_ref.data,rest=_objectWithoutProperties(_ref,_excluded);var _React$useState=React.useState(),_React$useState2=_slicedToArray(_React$useState,2),measuredWidth=_React$useState2[0],setMeasuredWidth=_React$useState2[1];var _React$useState3=React.useState(),_React$useState4=_slicedToArray(_React$useState3,2),measuredHeight=_React$useState4[0],setMeasuredHeight=_React$useState4[1];var _useSplitContentConta=useSplitContentContainerStyles(styleProp,measuredWidth,measuredHeight,[data]),style=_useSplitContentConta.style,contentContainerStyle=_useSplitContentConta.contentContainerStyle;return _jsx(SwipeableList,Object.assign({onLayout:function onLayout(event){setMeasuredWidth(event.nativeEvent.layout.width);setMeasuredHeight(event.nativeEvent.layout.height);},style:style,contentContainerStyle:contentContainerStyle,data:data},rest));};export default SimpleStyleSwipeableList;
@@ -1 +1 @@
1
- import{StyleSheet}from"react-native";import{pick,omit}from"lodash";import{useDeepCompareMemo}from"../../utilities";export var contentContainerStyleNames=["padding","paddingBottom","paddingEnd","paddingHorizontal","paddingLeft","paddingRight","paddingStart","paddingTop","paddingVertical","justifyContent","alignItems","alignContent","flexDirection","flexWrap"];export default function useSplitContentContainerStyles(originalStyle,measuredWidth,measuredHeight){return useDeepCompareMemo(function(){var _ref,_flattenedStyle$borde,_ref2,_flattenedStyle$borde2,_ref3,_flattenedStyle$borde3,_ref4,_flattenedStyle$borde4;var flattenedStyle=StyleSheet.flatten(originalStyle);var contentContainerStyle=pick(flattenedStyle,contentContainerStyleNames);var leftBorderWidth=(_ref=(_flattenedStyle$borde=flattenedStyle.borderLeftWidth)!=null?_flattenedStyle$borde:flattenedStyle.borderWidth)!=null?_ref:0;var rightBorderWidth=(_ref2=(_flattenedStyle$borde2=flattenedStyle.borderRightWidth)!=null?_flattenedStyle$borde2:flattenedStyle.borderWidth)!=null?_ref2:0;var topBorderWidth=(_ref3=(_flattenedStyle$borde3=flattenedStyle.borderTopWidth)!=null?_flattenedStyle$borde3:flattenedStyle.borderWidth)!=null?_ref3:0;var bottomBorderWidth=(_ref4=(_flattenedStyle$borde4=flattenedStyle.borderBottomWidth)!=null?_flattenedStyle$borde4:flattenedStyle.borderWidth)!=null?_ref4:0;if(measuredWidth){contentContainerStyle.minWidth=measuredWidth-leftBorderWidth-rightBorderWidth;}if(measuredHeight){contentContainerStyle.minHeight=measuredHeight-topBorderWidth-bottomBorderWidth;}var style=omit(flattenedStyle,contentContainerStyleNames);if(style.flex===undefined){style=Object.assign({flexGrow:0},style);}else if(style.flexGrow===undefined){style=Object.assign({flexGrow:style.flex},style);}return{style:style,contentContainerStyle:contentContainerStyle};},[originalStyle,measuredWidth,measuredHeight]);}
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import React from"react";import{StyleSheet}from"react-native";import{pick,omit}from"lodash";import{useDeepCompareMemo}from"../../utilities";export var contentContainerStyleNames=["padding","paddingBottom","paddingEnd","paddingHorizontal","paddingLeft","paddingRight","paddingStart","paddingTop","paddingVertical","justifyContent","alignItems","alignContent","flexDirection","flexWrap","gap","columnGap","rowGap"];export default function useSplitContentContainerStyles(originalStyle,measuredWidth,measuredHeight){var recalculateSizeDeps=arguments.length>3&&arguments[3]!==undefined?arguments[3]:[];var _React$useState=React.useState(null),_React$useState2=_slicedToArray(_React$useState,2),tempContentContainerStyle=_React$useState2[0],setTempContentContainerStyle=_React$useState2[1];React.useEffect(function(){if(tempContentContainerStyle){setTempContentContainerStyle(null);}},[measuredHeight,measuredWidth]);React.useEffect(function(){setTempContentContainerStyle({minHeight:0,minWidth:0});},recalculateSizeDeps);return useDeepCompareMemo(function(){var _ref,_flattenedStyle$borde,_ref2,_flattenedStyle$borde2,_ref3,_flattenedStyle$borde3,_ref4,_flattenedStyle$borde4;var flattenedStyle=StyleSheet.flatten(originalStyle);var contentContainerStyle=pick(flattenedStyle,contentContainerStyleNames);var leftBorderWidth=(_ref=(_flattenedStyle$borde=flattenedStyle==null?void 0:flattenedStyle.borderLeftWidth)!=null?_flattenedStyle$borde:flattenedStyle==null?void 0:flattenedStyle.borderWidth)!=null?_ref:0;var rightBorderWidth=(_ref2=(_flattenedStyle$borde2=flattenedStyle==null?void 0:flattenedStyle.borderRightWidth)!=null?_flattenedStyle$borde2:flattenedStyle==null?void 0:flattenedStyle.borderWidth)!=null?_ref2:0;var topBorderWidth=(_ref3=(_flattenedStyle$borde3=flattenedStyle==null?void 0:flattenedStyle.borderTopWidth)!=null?_flattenedStyle$borde3:flattenedStyle==null?void 0:flattenedStyle.borderWidth)!=null?_ref3:0;var bottomBorderWidth=(_ref4=(_flattenedStyle$borde4=flattenedStyle==null?void 0:flattenedStyle.borderBottomWidth)!=null?_flattenedStyle$borde4:flattenedStyle==null?void 0:flattenedStyle.borderWidth)!=null?_ref4:0;if(measuredWidth){contentContainerStyle.minWidth=measuredWidth-leftBorderWidth-rightBorderWidth;}if(measuredHeight){contentContainerStyle.minHeight=measuredHeight-topBorderWidth-bottomBorderWidth;}var style=omit(flattenedStyle,contentContainerStyleNames);if(style.flex===undefined){style=Object.assign({flexGrow:0},style);}else if(style.flexGrow===undefined){style=Object.assign({flexGrow:style.flex},style);}return{style:style,contentContainerStyle:StyleSheet.flatten([contentContainerStyle,tempContentContainerStyle])};},[originalStyle,measuredWidth,measuredHeight,tempContentContainerStyle]);}
@@ -4,5 +4,5 @@ import type { FlashListProps } from "@shopify/flash-list";
4
4
  * A FlashList wrapper that takes a single `style` prop and internally extracts
5
5
  * the appropriate style keys into the `contentContainerStyle`
6
6
  */
7
- declare const SimpleStyleFlashList: <T extends unknown>({ style: styleProp, ...rest }: Omit<FlashListProps<T>, "contentContainerStyle">) => React.JSX.Element;
7
+ declare const SimpleStyleFlashList: <T extends unknown>({ style: styleProp, data, ...rest }: Omit<FlashListProps<T>, "contentContainerStyle">) => React.JSX.Element;
8
8
  export default SimpleStyleFlashList;
@@ -5,14 +5,14 @@ import useSplitContentContainerStyles from "./useSplitContentContainerStyles";
5
5
  * A FlashList wrapper that takes a single `style` prop and internally extracts
6
6
  * the appropriate style keys into the `contentContainerStyle`
7
7
  */
8
- const SimpleStyleFlashList = ({ style: styleProp, ...rest }) => {
8
+ const SimpleStyleFlashList = ({ style: styleProp, data, ...rest }) => {
9
9
  const [measuredWidth, setMeasuredWidth] = React.useState();
10
10
  const [measuredHeight, setMeasuredHeight] = React.useState();
11
- const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp, measuredWidth, measuredHeight);
11
+ const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp, measuredWidth, measuredHeight, [data]);
12
12
  return (React.createElement(FlashList, { onLayout: (event) => {
13
13
  setMeasuredWidth(event.nativeEvent.layout.width);
14
14
  setMeasuredHeight(event.nativeEvent.layout.height);
15
- }, style: style, contentContainerStyle: contentContainerStyle, ...rest }));
15
+ }, style: style, contentContainerStyle: contentContainerStyle, data: data, ...rest }));
16
16
  };
17
17
  export default SimpleStyleFlashList;
18
18
  //# sourceMappingURL=SimpleStyleFlashList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SimpleStyleFlashList.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleFlashList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,oBAAoB,GAAG,CAAgB,EAC3C,KAAK,EAAE,SAAS,EAChB,GAAG,IAAI,EAC0C,EAAE,EAAE;IACrD,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAU,CAAC;IACnE,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAU,CAAC;IAErE,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GAAG,8BAA8B,CACrE,SAAS,EACT,aAAa,EACb,cAAc,CACf,CAAC;IAEF,OAAO,CACL,oBAAC,SAAS,IACR,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;YAClB,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACjD,iBAAiB,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACrD,CAAC,EACD,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqC,KACxD,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"SimpleStyleFlashList.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleFlashList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,oBAAoB,GAAG,CAAgB,EAC3C,KAAK,EAAE,SAAS,EAChB,IAAI,EACJ,GAAG,IAAI,EAC0C,EAAE,EAAE;IACrD,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAU,CAAC;IACnE,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAU,CAAC;IAErE,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GAAG,8BAA8B,CACrE,SAAS,EACT,aAAa,EACb,cAAc,EACd,CAAC,IAAI,CAAC,CACP,CAAC;IAEF,OAAO,CACL,oBAAC,SAAS,IACR,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;YAClB,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACjD,iBAAiB,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACrD,CAAC,EACD,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqC,EAC5D,IAAI,EAAE,IAAI,KACN,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -4,5 +4,5 @@ import type { FlatListProps } from "react-native";
4
4
  * A FlatList wrapper that takes a single `style` prop and internally extracts
5
5
  * the appropriate style keys into the `contentContainerStyle`
6
6
  */
7
- declare const SimpleStyleFlatList: <T extends unknown>({ style: styleProp, ...rest }: Omit<FlatListProps<T>, "contentContainerStyle">) => React.JSX.Element;
7
+ declare const SimpleStyleFlatList: <T extends unknown>({ style: styleProp, data, ...rest }: Omit<FlatListProps<T>, "contentContainerStyle">) => React.JSX.Element;
8
8
  export default SimpleStyleFlatList;
@@ -5,14 +5,14 @@ import useSplitContentContainerStyles from "./useSplitContentContainerStyles";
5
5
  * A FlatList wrapper that takes a single `style` prop and internally extracts
6
6
  * the appropriate style keys into the `contentContainerStyle`
7
7
  */
8
- const SimpleStyleFlatList = ({ style: styleProp, ...rest }) => {
8
+ const SimpleStyleFlatList = ({ style: styleProp, data, ...rest }) => {
9
9
  const [measuredWidth, setMeasuredWidth] = React.useState();
10
10
  const [measuredHeight, setMeasuredHeight] = React.useState();
11
- const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp, measuredWidth, measuredHeight);
11
+ const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp, measuredWidth, measuredHeight, [data]);
12
12
  return (React.createElement(FlatList, { onLayout: (event) => {
13
13
  setMeasuredWidth(event.nativeEvent.layout.width);
14
14
  setMeasuredHeight(event.nativeEvent.layout.height);
15
- }, style: style, contentContainerStyle: contentContainerStyle, ...rest }));
15
+ }, style: style, contentContainerStyle: contentContainerStyle, data: data, ...rest }));
16
16
  };
17
17
  export default SimpleStyleFlatList;
18
18
  //# sourceMappingURL=SimpleStyleFlatList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SimpleStyleFlatList.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleFlatList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,mBAAmB,GAAG,CAAgB,EAC1C,KAAK,EAAE,SAAS,EAChB,GAAG,IAAI,EACyC,EAAE,EAAE;IACpD,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAU,CAAC;IACnE,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAU,CAAC;IAErE,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GAAG,8BAA8B,CACrE,SAAS,EACT,aAAa,EACb,cAAc,CACf,CAAC;IAEF,OAAO,CACL,oBAAC,QAAQ,IACP,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;YAClB,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACjD,iBAAiB,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACrD,CAAC,EACD,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqB,KACxC,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"SimpleStyleFlatList.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleFlatList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,mBAAmB,GAAG,CAAgB,EAC1C,KAAK,EAAE,SAAS,EAChB,IAAI,EACJ,GAAG,IAAI,EACyC,EAAE,EAAE;IACpD,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAU,CAAC;IACnE,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAU,CAAC;IAErE,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GAAG,8BAA8B,CACrE,SAAS,EACT,aAAa,EACb,cAAc,EACd,CAAC,IAAI,CAAC,CACP,CAAC;IAEF,OAAO,CACL,oBAAC,QAAQ,IACP,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;YAClB,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACjD,iBAAiB,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACrD,CAAC,EACD,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqB,EAC5C,IAAI,EAAE,IAAI,KACN,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -4,5 +4,5 @@ import type { MasonryFlashListProps } from "@shopify/flash-list";
4
4
  * A MasonryFlashList wrapper that takes a single `style` prop and internally extracts
5
5
  * the appropriate style keys into the `contentContainerStyle`
6
6
  */
7
- declare const SimpleStyleMasonryFlashList: <T extends unknown>({ style: styleProp, ...rest }: Omit<MasonryFlashListProps<T>, "contentContainerStyle">) => React.JSX.Element;
7
+ declare const SimpleStyleMasonryFlashList: <T extends unknown>({ style: styleProp, data, ...rest }: Omit<MasonryFlashListProps<T>, "contentContainerStyle">) => React.JSX.Element;
8
8
  export default SimpleStyleMasonryFlashList;
@@ -5,14 +5,14 @@ import useSplitContentContainerStyles from "./useSplitContentContainerStyles";
5
5
  * A MasonryFlashList wrapper that takes a single `style` prop and internally extracts
6
6
  * the appropriate style keys into the `contentContainerStyle`
7
7
  */
8
- const SimpleStyleMasonryFlashList = ({ style: styleProp, ...rest }) => {
8
+ const SimpleStyleMasonryFlashList = ({ style: styleProp, data, ...rest }) => {
9
9
  const [measuredWidth, setMeasuredWidth] = React.useState();
10
10
  const [measuredHeight, setMeasuredHeight] = React.useState();
11
- const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp, measuredWidth, measuredHeight);
11
+ const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp, measuredWidth, measuredHeight, [data]);
12
12
  return (React.createElement(MasonryFlashList, { onLayout: (event) => {
13
13
  setMeasuredWidth(event.nativeEvent.layout.width);
14
14
  setMeasuredHeight(event.nativeEvent.layout.height);
15
- }, style: style, contentContainerStyle: contentContainerStyle, ...rest }));
15
+ }, style: style, contentContainerStyle: contentContainerStyle, data: data, ...rest }));
16
16
  };
17
17
  export default SimpleStyleMasonryFlashList;
18
18
  //# sourceMappingURL=SimpleStyleMasonryFlashList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SimpleStyleMasonryFlashList.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,2BAA2B,GAAG,CAAgB,EAClD,KAAK,EAAE,SAAS,EAChB,GAAG,IAAI,EACiD,EAAE,EAAE;IAC5D,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAU,CAAC;IACnE,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAU,CAAC;IAErE,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GAAG,8BAA8B,CACrE,SAAS,EACT,aAAa,EACb,cAAc,CACf,CAAC;IAEF,OAAO,CACL,oBAAC,gBAAgB,IACf,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;YAClB,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACjD,iBAAiB,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACrD,CAAC,EACD,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqC,KACxD,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
1
+ {"version":3,"file":"SimpleStyleMasonryFlashList.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,2BAA2B,GAAG,CAAgB,EAClD,KAAK,EAAE,SAAS,EAChB,IAAI,EACJ,GAAG,IAAI,EACiD,EAAE,EAAE;IAC5D,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAU,CAAC;IACnE,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAU,CAAC;IAErE,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GAAG,8BAA8B,CACrE,SAAS,EACT,aAAa,EACb,cAAc,EACd,CAAC,IAAI,CAAC,CACP,CAAC;IAEF,OAAO,CACL,oBAAC,gBAAgB,IACf,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;YAClB,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACjD,iBAAiB,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACrD,CAAC,EACD,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqC,EAC5D,IAAI,EAAE,IAAI,KACN,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
@@ -6,5 +6,5 @@ import type { FlatListSectionListProps, FlashListSectionListProps } from "../Sec
6
6
  */
7
7
  declare const SimpleStyleSectionList: <T extends {
8
8
  [key: string]: any;
9
- }>({ style: styleProp, ...rest }: Omit<FlatListSectionListProps<T> | FlashListSectionListProps<T>, "contentContainerStyle">) => React.JSX.Element;
9
+ }>({ style: styleProp, data, ...rest }: Omit<FlatListSectionListProps<T> | FlashListSectionListProps<T>, "contentContainerStyle">) => React.JSX.Element;
10
10
  export default SimpleStyleSectionList;
@@ -5,16 +5,16 @@ import useSplitContentContainerStyles from "./useSplitContentContainerStyles";
5
5
  * A SectionList wrapper that takes a single `style` prop and internally extracts
6
6
  * the appropriate style keys into the `contentContainerStyle`
7
7
  */
8
- const SimpleStyleSectionList = ({ style: styleProp, ...rest }) => {
8
+ const SimpleStyleSectionList = ({ style: styleProp, data, ...rest }) => {
9
9
  const [measuredWidth, setMeasuredWidth] = React.useState();
10
10
  const [measuredHeight, setMeasuredHeight] = React.useState();
11
- const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp, measuredWidth, measuredHeight);
11
+ const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp, measuredWidth, measuredHeight, [data]);
12
12
  return (
13
13
  //@ts-ignore contentContainerStyle has different types for FlashList and FlatList implmentations and confuses TS
14
14
  React.createElement(SectionList, { onLayout: (event) => {
15
15
  setMeasuredWidth(event.nativeEvent.layout.width);
16
16
  setMeasuredHeight(event.nativeEvent.layout.height);
17
- }, style: style, contentContainerStyle: contentContainerStyle, ...rest }));
17
+ }, style: style, contentContainerStyle: contentContainerStyle, data: data, ...rest }));
18
18
  };
19
19
  export default SimpleStyleSectionList;
20
20
  //# sourceMappingURL=SimpleStyleSectionList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SimpleStyleSectionList.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleSectionList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAK7C,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,sBAAsB,GAAG,CAAmC,EAChE,KAAK,EAAE,SAAS,EAChB,GAAG,IAAI,EAIR,EAAE,EAAE;IACH,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAU,CAAC;IACnE,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAU,CAAC;IAErE,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GAAG,8BAA8B,CACrE,SAAS,EACT,aAAa,EACb,cAAc,CACf,CAAC;IAEF,OAAO;IACL,gHAAgH;IAChH,oBAAC,WAAW,IACV,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;YAClB,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACjD,iBAAiB,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACrD,CAAC,EACD,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqB,KACxC,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"SimpleStyleSectionList.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleSectionList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAK7C,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,sBAAsB,GAAG,CAAmC,EAChE,KAAK,EAAE,SAAS,EAChB,IAAI,EACJ,GAAG,IAAI,EAIR,EAAE,EAAE;IACH,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAU,CAAC;IACnE,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAU,CAAC;IAErE,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GAAG,8BAA8B,CACrE,SAAS,EACT,aAAa,EACb,cAAc,EACd,CAAC,IAAI,CAAC,CACP,CAAC;IAEF,OAAO;IACL,gHAAgH;IAChH,oBAAC,WAAW,IACV,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;YAClB,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACjD,iBAAiB,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACrD,CAAC,EACD,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqB,EAC5C,IAAI,EAAE,IAAI,KACN,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -6,5 +6,5 @@ import type { FlashListSwipeableListProps, FlatListSwipeableListProps } from "..
6
6
  */
7
7
  declare const SimpleStyleSwipeableList: <T extends {
8
8
  [key: string]: any;
9
- }>({ style: styleProp, ...rest }: Omit<FlashListSwipeableListProps<T> | FlatListSwipeableListProps<T>, "contentContainerStyle">) => React.JSX.Element;
9
+ }>({ style: styleProp, data, ...rest }: Omit<FlashListSwipeableListProps<T> | FlatListSwipeableListProps<T>, "contentContainerStyle">) => React.JSX.Element;
10
10
  export default SimpleStyleSwipeableList;
@@ -5,16 +5,16 @@ import useSplitContentContainerStyles from "./useSplitContentContainerStyles";
5
5
  * A SwipeableList wrapper that takes a single `style` prop and internally extracts
6
6
  * the appropriate style keys into the `contentContainerStyle`
7
7
  */
8
- const SimpleStyleSwipeableList = ({ style: styleProp, ...rest }) => {
8
+ const SimpleStyleSwipeableList = ({ style: styleProp, data, ...rest }) => {
9
9
  const [measuredWidth, setMeasuredWidth] = React.useState();
10
10
  const [measuredHeight, setMeasuredHeight] = React.useState();
11
- const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp, measuredWidth, measuredHeight);
11
+ const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp, measuredWidth, measuredHeight, [data]);
12
12
  return (
13
13
  //@ts-ignore contentContainerStyle has different types for FlashList and FlatList implmentations and confuses TS
14
14
  React.createElement(SwipeableList, { onLayout: (event) => {
15
15
  setMeasuredWidth(event.nativeEvent.layout.width);
16
16
  setMeasuredHeight(event.nativeEvent.layout.height);
17
- }, style: style, contentContainerStyle: contentContainerStyle, ...rest }));
17
+ }, style: style, contentContainerStyle: contentContainerStyle, data: data, ...rest }));
18
18
  };
19
19
  export default SimpleStyleSwipeableList;
20
20
  //# sourceMappingURL=SimpleStyleSwipeableList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SimpleStyleSwipeableList.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAKjD,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,wBAAwB,GAAG,CAAmC,EAClE,KAAK,EAAE,SAAS,EAChB,GAAG,IAAI,EAIR,EAAE,EAAE;IACH,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAU,CAAC;IACnE,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAU,CAAC;IAErE,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GAAG,8BAA8B,CACrE,SAAS,EACT,aAAa,EACb,cAAc,CACf,CAAC;IAEF,OAAO;IACL,gHAAgH;IAChH,oBAAC,aAAa,IACZ,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;YAClB,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACjD,iBAAiB,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACrD,CAAC,EACD,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqB,KACxC,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
1
+ {"version":3,"file":"SimpleStyleSwipeableList.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAKjD,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,wBAAwB,GAAG,CAAmC,EAClE,KAAK,EAAE,SAAS,EAChB,IAAI,EACJ,GAAG,IAAI,EAIR,EAAE,EAAE;IACH,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAU,CAAC;IACnE,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAU,CAAC;IAErE,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GAAG,8BAA8B,CACrE,SAAS,EACT,aAAa,EACb,cAAc,EACd,CAAC,IAAI,CAAC,CACP,CAAC;IAEF,OAAO;IACL,gHAAgH;IAChH,oBAAC,aAAa,IACZ,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;YAClB,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACjD,iBAAiB,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACrD,CAAC,EACD,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqB,EAC5C,IAAI,EAAE,IAAI,KACN,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
@@ -1,8 +1,9 @@
1
+ import React from "react";
1
2
  import { StyleProp, ViewStyle } from "react-native";
2
3
  interface Styles {
3
4
  style?: StyleProp<ViewStyle>;
4
5
  contentContainerStyle?: StyleProp<ViewStyle>;
5
6
  }
6
7
  export declare const contentContainerStyleNames: string[];
7
- export default function useSplitContentContainerStyles(originalStyle: StyleProp<ViewStyle>, measuredWidth?: number, measuredHeight?: number): Styles;
8
+ export default function useSplitContentContainerStyles(originalStyle: StyleProp<ViewStyle>, measuredWidth?: number, measuredHeight?: number, recalculateSizeDeps?: React.DependencyList): Styles;
8
9
  export {};
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import { StyleSheet } from "react-native";
2
3
  import { pick, omit } from "lodash";
3
4
  import { useDeepCompareMemo } from "../../utilities";
@@ -16,16 +17,33 @@ export const contentContainerStyleNames = [
16
17
  "alignContent",
17
18
  "flexDirection",
18
19
  "flexWrap",
20
+ "gap",
21
+ "columnGap",
22
+ "rowGap",
19
23
  ];
20
- export default function useSplitContentContainerStyles(originalStyle, measuredWidth, measuredHeight) {
24
+ export default function useSplitContentContainerStyles(originalStyle, measuredWidth, measuredHeight, recalculateSizeDeps = []) {
25
+ // This temporarily removes contentContainerStyle min sizes whenever some
26
+ // given dependencies change to allow the list to properly recalculate it's measured size
27
+ const [tempContentContainerStyle, setTempContentContainerStyle] = React.useState(null);
28
+ React.useEffect(() => {
29
+ if (tempContentContainerStyle) {
30
+ setTempContentContainerStyle(null);
31
+ }
32
+ // We only want this to run when measured size changes
33
+ // eslint-disable-next-line react-hooks/exhaustive-deps
34
+ }, [measuredHeight, measuredWidth]);
35
+ React.useEffect(() => {
36
+ setTempContentContainerStyle({ minHeight: 0, minWidth: 0 });
37
+ // eslint-disable-next-line react-hooks/exhaustive-deps
38
+ }, recalculateSizeDeps);
21
39
  return useDeepCompareMemo(() => {
22
40
  var _a, _b, _c, _d, _e, _f, _g, _h;
23
41
  const flattenedStyle = StyleSheet.flatten(originalStyle);
24
42
  let contentContainerStyle = pick(flattenedStyle, contentContainerStyleNames);
25
- const leftBorderWidth = (_b = (_a = flattenedStyle.borderLeftWidth) !== null && _a !== void 0 ? _a : flattenedStyle.borderWidth) !== null && _b !== void 0 ? _b : 0;
26
- const rightBorderWidth = (_d = (_c = flattenedStyle.borderRightWidth) !== null && _c !== void 0 ? _c : flattenedStyle.borderWidth) !== null && _d !== void 0 ? _d : 0;
27
- const topBorderWidth = (_f = (_e = flattenedStyle.borderTopWidth) !== null && _e !== void 0 ? _e : flattenedStyle.borderWidth) !== null && _f !== void 0 ? _f : 0;
28
- const bottomBorderWidth = (_h = (_g = flattenedStyle.borderBottomWidth) !== null && _g !== void 0 ? _g : flattenedStyle.borderWidth) !== null && _h !== void 0 ? _h : 0;
43
+ const leftBorderWidth = (_b = (_a = flattenedStyle === null || flattenedStyle === void 0 ? void 0 : flattenedStyle.borderLeftWidth) !== null && _a !== void 0 ? _a : flattenedStyle === null || flattenedStyle === void 0 ? void 0 : flattenedStyle.borderWidth) !== null && _b !== void 0 ? _b : 0;
44
+ const rightBorderWidth = (_d = (_c = flattenedStyle === null || flattenedStyle === void 0 ? void 0 : flattenedStyle.borderRightWidth) !== null && _c !== void 0 ? _c : flattenedStyle === null || flattenedStyle === void 0 ? void 0 : flattenedStyle.borderWidth) !== null && _d !== void 0 ? _d : 0;
45
+ const topBorderWidth = (_f = (_e = flattenedStyle === null || flattenedStyle === void 0 ? void 0 : flattenedStyle.borderTopWidth) !== null && _e !== void 0 ? _e : flattenedStyle === null || flattenedStyle === void 0 ? void 0 : flattenedStyle.borderWidth) !== null && _f !== void 0 ? _f : 0;
46
+ const bottomBorderWidth = (_h = (_g = flattenedStyle === null || flattenedStyle === void 0 ? void 0 : flattenedStyle.borderBottomWidth) !== null && _g !== void 0 ? _g : flattenedStyle === null || flattenedStyle === void 0 ? void 0 : flattenedStyle.borderWidth) !== null && _h !== void 0 ? _h : 0;
29
47
  // contentContainerStyle should always at least fill the parent to ensure sizing changes reflects properly on component and children.
30
48
  // The measured sizes include borders, so we need to subtract those before applying
31
49
  if (measuredWidth) {
@@ -45,7 +63,13 @@ export default function useSplitContentContainerStyles(originalStyle, measuredWi
45
63
  else if (style.flexGrow === undefined) {
46
64
  style = { flexGrow: style.flex, ...style };
47
65
  }
48
- return { style, contentContainerStyle };
49
- }, [originalStyle, measuredWidth, measuredHeight]);
66
+ return {
67
+ style,
68
+ contentContainerStyle: StyleSheet.flatten([
69
+ contentContainerStyle,
70
+ tempContentContainerStyle,
71
+ ]),
72
+ };
73
+ }, [originalStyle, measuredWidth, measuredHeight, tempContentContainerStyle]);
50
74
  }
51
75
  //# sourceMappingURL=useSplitContentContainerStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSplitContentContainerStyles.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/useSplitContentContainerStyles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,UAAU,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAOrD,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,SAAS;IACT,eAAe;IACf,YAAY;IACZ,mBAAmB;IACnB,aAAa;IACb,cAAc;IACd,cAAc;IACd,YAAY;IACZ,iBAAiB;IACjB,gBAAgB;IAChB,YAAY;IACZ,cAAc;IACd,eAAe;IACf,UAAU;CACX,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,8BAA8B,CACpD,aAAmC,EACnC,aAAsB,EACtB,cAAuB;IAEvB,OAAO,kBAAkB,CAAS,GAAG,EAAE;;QACrC,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QAEzD,IAAI,qBAAqB,GAAG,IAAI,CAC9B,cAAc,EACd,0BAA0B,CAC3B,CAAC;QAEF,MAAM,eAAe,GACnB,MAAA,MAAA,cAAc,CAAC,eAAe,mCAAI,cAAc,CAAC,WAAW,mCAAI,CAAC,CAAC;QACpE,MAAM,gBAAgB,GACpB,MAAA,MAAA,cAAc,CAAC,gBAAgB,mCAAI,cAAc,CAAC,WAAW,mCAAI,CAAC,CAAC;QACrE,MAAM,cAAc,GAClB,MAAA,MAAA,cAAc,CAAC,cAAc,mCAAI,cAAc,CAAC,WAAW,mCAAI,CAAC,CAAC;QACnE,MAAM,iBAAiB,GACrB,MAAA,MAAA,cAAc,CAAC,iBAAiB,mCAAI,cAAc,CAAC,WAAW,mCAAI,CAAC,CAAC;QAEtE,qIAAqI;QACrI,mFAAmF;QACnF,IAAI,aAAa,EAAE;YACjB,qBAAqB,CAAC,QAAQ;gBAC5B,aAAa,GAAG,eAAe,GAAG,gBAAgB,CAAC;SACtD;QACD,IAAI,cAAc,EAAE;YAClB,qBAAqB,CAAC,SAAS;gBAC7B,cAAc,GAAG,cAAc,GAAG,iBAAiB,CAAC;SACvD;QAED,IAAI,KAAK,GAAG,IAAI,CAAC,cAAc,EAAE,0BAA0B,CAAC,CAAC;QAE7D,kIAAkI;QAClI,4DAA4D;QAC5D,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,EAAE;YAC5B,KAAK,GAAG,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,KAAK,EAAE,CAAC;SACnC;aAAM,IAAI,KAAK,CAAC,QAAQ,KAAK,SAAS,EAAE;YACvC,KAAK,GAAG,EAAE,QAAQ,EAAE,KAAK,CAAC,IAAI,EAAE,GAAG,KAAK,EAAE,CAAC;SAC5C;QAED,OAAO,EAAE,KAAK,EAAE,qBAAqB,EAAE,CAAC;IAC1C,CAAC,EAAE,CAAC,aAAa,EAAE,aAAa,EAAE,cAAc,CAAC,CAAC,CAAC;AACrD,CAAC"}
1
+ {"version":3,"file":"useSplitContentContainerStyles.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/useSplitContentContainerStyles.ts"],"names":[],"mappings":"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"}