@draftbit/core 50.0.3-6b2618.2 → 50.1.0

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 (58) hide show
  1. package/lib/commonjs/components/Markdown.js +1 -1
  2. package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleFlashList.js +1 -1
  3. package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleFlatList.js +1 -1
  4. package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.js +1 -1
  5. package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js +1 -1
  6. package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleScrollView.js +1 -1
  7. package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleSectionList.js +1 -1
  8. package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js +1 -1
  9. package/lib/commonjs/components/SimpleStyleScrollables/useSplitContentContainerStyles.js +1 -1
  10. package/lib/typescript/src/components/Markdown.d.ts +2 -2
  11. package/lib/typescript/src/components/Markdown.js +11 -2
  12. package/lib/typescript/src/components/Markdown.js.map +1 -1
  13. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleFlashList.js +2 -7
  14. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleFlashList.js.map +1 -1
  15. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleFlatList.js +2 -7
  16. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleFlatList.js.map +1 -1
  17. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.js +2 -7
  18. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.js.map +1 -1
  19. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js +2 -7
  20. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js.map +1 -1
  21. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleScrollView.js +2 -7
  22. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleScrollView.js.map +1 -1
  23. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleSectionList.js +2 -7
  24. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleSectionList.js.map +1 -1
  25. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js +2 -7
  26. package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js.map +1 -1
  27. package/lib/typescript/src/components/SimpleStyleScrollables/useSplitContentContainerStyles.d.ts +1 -2
  28. package/lib/typescript/src/components/SimpleStyleScrollables/useSplitContentContainerStyles.js +5 -36
  29. package/lib/typescript/src/components/SimpleStyleScrollables/useSplitContentContainerStyles.js.map +1 -1
  30. package/lib/typescript/tsconfig.tsbuildinfo +1 -1
  31. package/package.json +3 -3
  32. package/src/components/Markdown.js +11 -2
  33. package/src/components/Markdown.js.map +1 -1
  34. package/src/components/Markdown.tsx +29 -3
  35. package/src/components/SimpleStyleScrollables/SimpleStyleFlashList.js +2 -7
  36. package/src/components/SimpleStyleScrollables/SimpleStyleFlashList.js.map +1 -1
  37. package/src/components/SimpleStyleScrollables/SimpleStyleFlashList.tsx +2 -13
  38. package/src/components/SimpleStyleScrollables/SimpleStyleFlatList.js +2 -7
  39. package/src/components/SimpleStyleScrollables/SimpleStyleFlatList.js.map +1 -1
  40. package/src/components/SimpleStyleScrollables/SimpleStyleFlatList.tsx +2 -13
  41. package/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.js +2 -7
  42. package/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.js.map +1 -1
  43. package/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.tsx +2 -12
  44. package/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js +2 -7
  45. package/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js.map +1 -1
  46. package/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.tsx +2 -13
  47. package/src/components/SimpleStyleScrollables/SimpleStyleScrollView.js +2 -7
  48. package/src/components/SimpleStyleScrollables/SimpleStyleScrollView.js.map +1 -1
  49. package/src/components/SimpleStyleScrollables/SimpleStyleScrollView.tsx +2 -12
  50. package/src/components/SimpleStyleScrollables/SimpleStyleSectionList.js +2 -7
  51. package/src/components/SimpleStyleScrollables/SimpleStyleSectionList.js.map +1 -1
  52. package/src/components/SimpleStyleScrollables/SimpleStyleSectionList.tsx +2 -13
  53. package/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js +2 -7
  54. package/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js.map +1 -1
  55. package/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.tsx +2 -13
  56. package/src/components/SimpleStyleScrollables/useSplitContentContainerStyles.js +5 -36
  57. package/src/components/SimpleStyleScrollables/useSplitContentContainerStyles.js.map +1 -1
  58. package/src/components/SimpleStyleScrollables/useSplitContentContainerStyles.ts +5 -47
@@ -1 +1 @@
1
- var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Markdown.tsx";import*as React from"react";import{StyleSheet}from"react-native";import MarkdownComponent from"react-native-markdown-display";import{jsx as _jsx}from"react/jsx-runtime";var childToString=function childToString(child){if(typeof child==="undefined"||child===null||typeof child==="boolean"){return"";}if(JSON.stringify(child)==="{}"){return"";}return child.toString();};var Markdown=function Markdown(_ref){var childrenProp=_ref.children,style=_ref.style;var children=React.Children.toArray(childrenProp);var text=children.map(childToString).join("");return _jsx(MarkdownComponent,{style:{body:StyleSheet.flatten(style)},children:text});};export default Markdown;
1
+ var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Markdown.tsx";import*as React from"react";import{Text,StyleSheet}from"react-native";import MarkdownComponent from"react-native-markdown-display";import{extractStyles}from"../utilities";import{jsx as _jsx}from"react/jsx-runtime";var childToString=function childToString(child){if(typeof child==="undefined"||child===null||typeof child==="boolean"){return"";}if(JSON.stringify(child)==="{}"){return"";}return child.toString();};var Markdown=function Markdown(_ref){var childrenProp=_ref.children,style=_ref.style;var children=React.Children.toArray(childrenProp);var text=children.map(childToString).join("");var bodyStyle=StyleSheet.flatten(style);var _extractStyles=extractStyles(bodyStyle),textStyles=_extractStyles.textStyles;return _jsx(MarkdownComponent,{style:{body:bodyStyle},rules:{strong:function strong(node){return _jsx(Text,{style:Object.assign({},textStyles,{fontWeight:"bold"}),children:node.children[0].content},node.key);}},children:text});};export default Markdown;
@@ -1 +1 @@
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
+ 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 _useSplitContentConta=useSplitContentContainerStyles(styleProp),style=_useSplitContentConta.style,contentContainerStyle=_useSplitContentConta.contentContainerStyle;return _jsx(FlashList,Object.assign({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","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
+ 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 _useSplitContentConta=useSplitContentContainerStyles(styleProp),style=_useSplitContentConta.style,contentContainerStyle=_useSplitContentConta.contentContainerStyle;return _jsx(FlatList,Object.assign({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/SimpleStyleKeyboardAwareScrollView.tsx";import React from"react";import{KeyboardAwareScrollView}from"react-native-keyboard-aware-scroll-view";import useSplitContentContainerStyles from"./useSplitContentContainerStyles";import{jsx as _jsx}from"react/jsx-runtime";var SimpleStyleKeyboardAwareScrollView=function SimpleStyleKeyboardAwareScrollView(_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(KeyboardAwareScrollView,Object.assign({onLayout:function onLayout(event){setMeasuredWidth(event.nativeEvent.layout.width);setMeasuredHeight(event.nativeEvent.layout.height);},style:style,contentContainerStyle:contentContainerStyle},rest));};export default SimpleStyleKeyboardAwareScrollView;
1
+ 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/SimpleStyleKeyboardAwareScrollView.tsx";import React from"react";import{KeyboardAwareScrollView}from"react-native-keyboard-aware-scroll-view";import useSplitContentContainerStyles from"./useSplitContentContainerStyles";import{jsx as _jsx}from"react/jsx-runtime";var SimpleStyleKeyboardAwareScrollView=function SimpleStyleKeyboardAwareScrollView(_ref){var styleProp=_ref.style,rest=_objectWithoutProperties(_ref,_excluded);var _useSplitContentConta=useSplitContentContainerStyles(styleProp),style=_useSplitContentConta.style,contentContainerStyle=_useSplitContentConta.contentContainerStyle;return _jsx(KeyboardAwareScrollView,Object.assign({style:style,contentContainerStyle:contentContainerStyle},rest));};export default SimpleStyleKeyboardAwareScrollView;
@@ -1 +1 @@
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
+ 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 _useSplitContentConta=useSplitContentContainerStyles(styleProp),style=_useSplitContentConta.style,contentContainerStyle=_useSplitContentConta.contentContainerStyle;return _jsx(MasonryFlashList,Object.assign({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/SimpleStyleScrollView.tsx";import React from"react";import{ScrollView}from"react-native";import useSplitContentContainerStyles from"./useSplitContentContainerStyles";import{jsx as _jsx}from"react/jsx-runtime";var SimpleStyleScrollView=function SimpleStyleScrollView(_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(ScrollView,Object.assign({onLayout:function onLayout(event){setMeasuredWidth(event.nativeEvent.layout.width);setMeasuredHeight(event.nativeEvent.layout.height);},style:style,contentContainerStyle:contentContainerStyle},rest));};export default SimpleStyleScrollView;
1
+ 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/SimpleStyleScrollView.tsx";import React from"react";import{ScrollView}from"react-native";import useSplitContentContainerStyles from"./useSplitContentContainerStyles";import{jsx as _jsx}from"react/jsx-runtime";var SimpleStyleScrollView=function SimpleStyleScrollView(_ref){var styleProp=_ref.style,rest=_objectWithoutProperties(_ref,_excluded);var _useSplitContentConta=useSplitContentContainerStyles(styleProp),style=_useSplitContentConta.style,contentContainerStyle=_useSplitContentConta.contentContainerStyle;return _jsx(ScrollView,Object.assign({style:style,contentContainerStyle:contentContainerStyle},rest));};export default SimpleStyleScrollView;
@@ -1 +1 @@
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
+ 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 _useSplitContentConta=useSplitContentContainerStyles(styleProp),style=_useSplitContentConta.style,contentContainerStyle=_useSplitContentConta.contentContainerStyle;return _jsx(SectionList,Object.assign({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","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
+ 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 _useSplitContentConta=useSplitContentContainerStyles(styleProp),style=_useSplitContentConta.style,contentContainerStyle=_useSplitContentConta.contentContainerStyle;return _jsx(SwipeableList,Object.assign({style:style,contentContainerStyle:contentContainerStyle,data:data},rest));};export default SimpleStyleSwipeableList;
@@ -1 +1 @@
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]);}
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","gap","columnGap","rowGap"];export default function useSplitContentContainerStyles(originalStyle){return useDeepCompareMemo(function(){var flattenedStyle=StyleSheet.flatten(originalStyle);var contentContainerStyle=pick(flattenedStyle,contentContainerStyleNames);contentContainerStyle.flexGrow=1;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]);}
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
- import { StyleProp, ViewStyle } from "react-native";
2
+ import { StyleProp, ViewStyle, TextStyle } from "react-native";
3
3
  declare type MarkdownProps = {
4
- style?: StyleProp<ViewStyle>;
4
+ style?: StyleProp<ViewStyle & TextStyle>;
5
5
  };
6
6
  declare const Markdown: React.FC<React.PropsWithChildren<MarkdownProps>>;
7
7
  export default Markdown;
@@ -1,6 +1,7 @@
1
1
  import * as React from "react";
2
- import { StyleSheet } from "react-native";
2
+ import { Text, StyleSheet, } from "react-native";
3
3
  import MarkdownComponent from "react-native-markdown-display";
4
+ import { extractStyles } from "../utilities";
4
5
  const childToString = (child) => {
5
6
  if (typeof child === "undefined" ||
6
7
  child === null ||
@@ -15,10 +16,18 @@ const childToString = (child) => {
15
16
  const Markdown = ({ children: childrenProp, style, }) => {
16
17
  const children = React.Children.toArray(childrenProp);
17
18
  const text = children.map(childToString).join("");
19
+ const bodyStyle = StyleSheet.flatten(style);
20
+ const { textStyles } = extractStyles(bodyStyle);
18
21
  return (
19
22
  //'body' style applies to all markdown components
20
23
  //@ts-ignore TS does not like the type of this named style for some reason
21
- React.createElement(MarkdownComponent, { style: { body: StyleSheet.flatten(style) } }, text));
24
+ React.createElement(MarkdownComponent, { style: { body: bodyStyle }, rules: {
25
+ // By default, strong does not work with custom fonts on iOS. This addresses the issue
26
+ strong: (node) => (React.createElement(Text, { key: node.key, style: {
27
+ ...textStyles,
28
+ fontWeight: "bold",
29
+ } }, node.children[0].content)),
30
+ } }, text));
22
31
  };
23
32
  export default Markdown;
24
33
  //# sourceMappingURL=Markdown.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Markdown.js","sourceRoot":"","sources":["../../../../src/components/Markdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAwB,UAAU,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,iBAAiB,MAAM,+BAA+B,CAAC;AAM9D,MAAM,aAAa,GAAG,CAAC,KAAuB,EAAU,EAAE;IACxD,IACE,OAAO,KAAK,KAAK,WAAW;QAC5B,KAAK,KAAK,IAAI;QACd,OAAO,KAAK,KAAK,SAAS,EAC1B;QACA,OAAO,EAAE,CAAC;KACX;IAED,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE;QAClC,OAAO,EAAE,CAAC;KACX;IAED,OAAQ,KAAyB,CAAC,QAAQ,EAAE,CAAC;AAC/C,CAAC,CAAC;AAEF,MAAM,QAAQ,GAAqD,CAAC,EAClE,QAAQ,EAAE,YAAY,EACtB,KAAK,GACN,EAAE,EAAE;IACH,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IACtD,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAElD,OAAO;IACL,iDAAiD;IACjD,0EAA0E;IAC1E,oBAAC,iBAAiB,IAAC,KAAK,EAAE,EAAE,IAAI,EAAE,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,IAC1D,IAAI,CACa,CACrB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"Markdown.js","sourceRoot":"","sources":["../../../../src/components/Markdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,IAAI,EAIJ,UAAU,GACX,MAAM,cAAc,CAAC;AACtB,OAAO,iBAAiB,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAM7C,MAAM,aAAa,GAAG,CAAC,KAAuB,EAAU,EAAE;IACxD,IACE,OAAO,KAAK,KAAK,WAAW;QAC5B,KAAK,KAAK,IAAI;QACd,OAAO,KAAK,KAAK,SAAS,EAC1B;QACA,OAAO,EAAE,CAAC;KACX;IAED,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE;QAClC,OAAO,EAAE,CAAC;KACX;IAED,OAAQ,KAAyB,CAAC,QAAQ,EAAE,CAAC;AAC/C,CAAC,CAAC;AAEF,MAAM,QAAQ,GAAqD,CAAC,EAClE,QAAQ,EAAE,YAAY,EACtB,KAAK,GACN,EAAE,EAAE;IACH,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IACtD,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAElD,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,EAAE,UAAU,EAAE,GAAG,aAAa,CAAC,SAAS,CAAC,CAAC;IAEhD,OAAO;IACL,iDAAiD;IACjD,0EAA0E;IAC1E,oBAAC,iBAAiB,IAChB,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAC1B,KAAK,EAAE;YACL,sFAAsF;YACtF,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAChB,oBAAC,IAAI,IACH,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,KAAK,EAAE;oBACL,GAAG,UAAU;oBACb,UAAU,EAAE,MAAM;iBACnB,IAEA,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,CACpB,CACR;SACF,IAEA,IAAI,CACa,CACrB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -6,13 +6,8 @@ import useSplitContentContainerStyles from "./useSplitContentContainerStyles";
6
6
  * the appropriate style keys into the `contentContainerStyle`
7
7
  */
8
8
  const SimpleStyleFlashList = ({ style: styleProp, data, ...rest }) => {
9
- const [measuredWidth, setMeasuredWidth] = React.useState();
10
- const [measuredHeight, setMeasuredHeight] = React.useState();
11
- const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp, measuredWidth, measuredHeight, [data]);
12
- return (React.createElement(FlashList, { onLayout: (event) => {
13
- setMeasuredWidth(event.nativeEvent.layout.width);
14
- setMeasuredHeight(event.nativeEvent.layout.height);
15
- }, style: style, contentContainerStyle: contentContainerStyle, data: data, ...rest }));
9
+ const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp);
10
+ return (React.createElement(FlashList, { style: style, contentContainerStyle: contentContainerStyle, data: data, ...rest }));
16
11
  };
17
12
  export default SimpleStyleFlashList;
18
13
  //# 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,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"}
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,EAAE,KAAK,EAAE,qBAAqB,EAAE,GACpC,8BAA8B,CAAC,SAAS,CAAC,CAAC;IAE5C,OAAO,CACL,oBAAC,SAAS,IACR,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqC,EAC5D,IAAI,EAAE,IAAI,KACN,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -6,13 +6,8 @@ import useSplitContentContainerStyles from "./useSplitContentContainerStyles";
6
6
  * the appropriate style keys into the `contentContainerStyle`
7
7
  */
8
8
  const SimpleStyleFlatList = ({ style: styleProp, data, ...rest }) => {
9
- const [measuredWidth, setMeasuredWidth] = React.useState();
10
- const [measuredHeight, setMeasuredHeight] = React.useState();
11
- const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp, measuredWidth, measuredHeight, [data]);
12
- return (React.createElement(FlatList, { onLayout: (event) => {
13
- setMeasuredWidth(event.nativeEvent.layout.width);
14
- setMeasuredHeight(event.nativeEvent.layout.height);
15
- }, style: style, contentContainerStyle: contentContainerStyle, data: data, ...rest }));
9
+ const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp);
10
+ return (React.createElement(FlatList, { style: style, contentContainerStyle: contentContainerStyle, data: data, ...rest }));
16
11
  };
17
12
  export default SimpleStyleFlatList;
18
13
  //# 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,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"}
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,EAAE,KAAK,EAAE,qBAAqB,EAAE,GACpC,8BAA8B,CAAC,SAAS,CAAC,CAAC;IAE5C,OAAO,CACL,oBAAC,QAAQ,IACP,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqB,EAC5C,IAAI,EAAE,IAAI,KACN,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -6,13 +6,8 @@ import useSplitContentContainerStyles from "./useSplitContentContainerStyles";
6
6
  * the appropriate style keys into the `contentContainerStyle`
7
7
  */
8
8
  const SimpleStyleKeyboardAwareScrollView = ({ style: styleProp, ...rest }) => {
9
- const [measuredWidth, setMeasuredWidth] = React.useState();
10
- const [measuredHeight, setMeasuredHeight] = React.useState();
11
- const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp, measuredWidth, measuredHeight);
12
- return (React.createElement(KeyboardAwareScrollView, { onLayout: (event) => {
13
- setMeasuredWidth(event.nativeEvent.layout.width);
14
- setMeasuredHeight(event.nativeEvent.layout.height);
15
- }, style: style, contentContainerStyle: contentContainerStyle, ...rest }));
9
+ const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp);
10
+ return (React.createElement(KeyboardAwareScrollView, { style: style, contentContainerStyle: contentContainerStyle, ...rest }));
16
11
  };
17
12
  export default SimpleStyleKeyboardAwareScrollView;
18
13
  //# sourceMappingURL=SimpleStyleKeyboardAwareScrollView.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SimpleStyleKeyboardAwareScrollView.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAElF,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,kCAAkC,GAEpC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IACpC,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,uBAAuB,IACtB,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,kCAAkC,CAAC"}
1
+ {"version":3,"file":"SimpleStyleKeyboardAwareScrollView.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAElF,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,kCAAkC,GAEpC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IACpC,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GACpC,8BAA8B,CAAC,SAAS,CAAC,CAAC;IAE5C,OAAO,CACL,oBAAC,uBAAuB,IACtB,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqB,KACxC,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,kCAAkC,CAAC"}
@@ -6,13 +6,8 @@ import useSplitContentContainerStyles from "./useSplitContentContainerStyles";
6
6
  * the appropriate style keys into the `contentContainerStyle`
7
7
  */
8
8
  const SimpleStyleMasonryFlashList = ({ style: styleProp, data, ...rest }) => {
9
- const [measuredWidth, setMeasuredWidth] = React.useState();
10
- const [measuredHeight, setMeasuredHeight] = React.useState();
11
- const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp, measuredWidth, measuredHeight, [data]);
12
- return (React.createElement(MasonryFlashList, { onLayout: (event) => {
13
- setMeasuredWidth(event.nativeEvent.layout.width);
14
- setMeasuredHeight(event.nativeEvent.layout.height);
15
- }, style: style, contentContainerStyle: contentContainerStyle, data: data, ...rest }));
9
+ const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp);
10
+ return (React.createElement(MasonryFlashList, { style: style, contentContainerStyle: contentContainerStyle, data: data, ...rest }));
16
11
  };
17
12
  export default SimpleStyleMasonryFlashList;
18
13
  //# 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,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"}
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,EAAE,KAAK,EAAE,qBAAqB,EAAE,GACpC,8BAA8B,CAAC,SAAS,CAAC,CAAC;IAE5C,OAAO,CACL,oBAAC,gBAAgB,IACf,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqC,EAC5D,IAAI,EAAE,IAAI,KACN,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
@@ -6,13 +6,8 @@ import useSplitContentContainerStyles from "./useSplitContentContainerStyles";
6
6
  * the appropriate style keys into the `contentContainerStyle`
7
7
  */
8
8
  const SimpleStyleScrollView = ({ style: styleProp, ...rest }) => {
9
- const [measuredWidth, setMeasuredWidth] = React.useState();
10
- const [measuredHeight, setMeasuredHeight] = React.useState();
11
- const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp, measuredWidth, measuredHeight);
12
- return (React.createElement(ScrollView, { onLayout: (event) => {
13
- setMeasuredWidth(event.nativeEvent.layout.width);
14
- setMeasuredHeight(event.nativeEvent.layout.height);
15
- }, style: style, contentContainerStyle: contentContainerStyle, ...rest }));
9
+ const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp);
10
+ return (React.createElement(ScrollView, { style: style, contentContainerStyle: contentContainerStyle, ...rest }));
16
11
  };
17
12
  export default SimpleStyleScrollView;
18
13
  //# sourceMappingURL=SimpleStyleScrollView.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SimpleStyleScrollView.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleScrollView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,qBAAqB,GAEvB,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IACpC,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,UAAU,IACT,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,qBAAqB,CAAC"}
1
+ {"version":3,"file":"SimpleStyleScrollView.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleScrollView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,qBAAqB,GAEvB,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IACpC,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GACpC,8BAA8B,CAAC,SAAS,CAAC,CAAC;IAE5C,OAAO,CACL,oBAAC,UAAU,IACT,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqB,KACxC,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
@@ -6,15 +6,10 @@ import useSplitContentContainerStyles from "./useSplitContentContainerStyles";
6
6
  * the appropriate style keys into the `contentContainerStyle`
7
7
  */
8
8
  const SimpleStyleSectionList = ({ style: styleProp, data, ...rest }) => {
9
- const [measuredWidth, setMeasuredWidth] = React.useState();
10
- const [measuredHeight, setMeasuredHeight] = React.useState();
11
- const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp, measuredWidth, measuredHeight, [data]);
9
+ const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp);
12
10
  return (
13
11
  //@ts-ignore contentContainerStyle has different types for FlashList and FlatList implmentations and confuses TS
14
- React.createElement(SectionList, { onLayout: (event) => {
15
- setMeasuredWidth(event.nativeEvent.layout.width);
16
- setMeasuredHeight(event.nativeEvent.layout.height);
17
- }, style: style, contentContainerStyle: contentContainerStyle, data: data, ...rest }));
12
+ React.createElement(SectionList, { style: style, contentContainerStyle: contentContainerStyle, data: data, ...rest }));
18
13
  };
19
14
  export default SimpleStyleSectionList;
20
15
  //# 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,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"}
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,EAAE,KAAK,EAAE,qBAAqB,EAAE,GACpC,8BAA8B,CAAC,SAAS,CAAC,CAAC;IAE5C,OAAO;IACL,gHAAgH;IAChH,oBAAC,WAAW,IACV,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqB,EAC5C,IAAI,EAAE,IAAI,KACN,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -6,15 +6,10 @@ import useSplitContentContainerStyles from "./useSplitContentContainerStyles";
6
6
  * the appropriate style keys into the `contentContainerStyle`
7
7
  */
8
8
  const SimpleStyleSwipeableList = ({ style: styleProp, data, ...rest }) => {
9
- const [measuredWidth, setMeasuredWidth] = React.useState();
10
- const [measuredHeight, setMeasuredHeight] = React.useState();
11
- const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp, measuredWidth, measuredHeight, [data]);
9
+ const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp);
12
10
  return (
13
11
  //@ts-ignore contentContainerStyle has different types for FlashList and FlatList implmentations and confuses TS
14
- React.createElement(SwipeableList, { onLayout: (event) => {
15
- setMeasuredWidth(event.nativeEvent.layout.width);
16
- setMeasuredHeight(event.nativeEvent.layout.height);
17
- }, style: style, contentContainerStyle: contentContainerStyle, data: data, ...rest }));
12
+ React.createElement(SwipeableList, { style: style, contentContainerStyle: contentContainerStyle, data: data, ...rest }));
18
13
  };
19
14
  export default SimpleStyleSwipeableList;
20
15
  //# 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,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
+ {"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,EAAE,KAAK,EAAE,qBAAqB,EAAE,GACpC,8BAA8B,CAAC,SAAS,CAAC,CAAC;IAE5C,OAAO;IACL,gHAAgH;IAChH,oBAAC,aAAa,IACZ,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqB,EAC5C,IAAI,EAAE,IAAI,KACN,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
@@ -1,9 +1,8 @@
1
- import React from "react";
2
1
  import { StyleProp, ViewStyle } from "react-native";
3
2
  interface Styles {
4
3
  style?: StyleProp<ViewStyle>;
5
4
  contentContainerStyle?: StyleProp<ViewStyle>;
6
5
  }
7
6
  export declare const contentContainerStyleNames: string[];
8
- export default function useSplitContentContainerStyles(originalStyle: StyleProp<ViewStyle>, measuredWidth?: number, measuredHeight?: number, recalculateSizeDeps?: React.DependencyList): Styles;
7
+ export default function useSplitContentContainerStyles(originalStyle: StyleProp<ViewStyle>): Styles;
9
8
  export {};
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import { StyleSheet } from "react-native";
3
2
  import { pick, omit } from "lodash";
4
3
  import { useDeepCompareMemo } from "../../utilities";
@@ -21,39 +20,12 @@ export const contentContainerStyleNames = [
21
20
  "columnGap",
22
21
  "rowGap",
23
22
  ];
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);
23
+ export default function useSplitContentContainerStyles(originalStyle) {
39
24
  return useDeepCompareMemo(() => {
40
- var _a, _b, _c, _d, _e, _f, _g, _h;
41
25
  const flattenedStyle = StyleSheet.flatten(originalStyle);
42
- let contentContainerStyle = pick(flattenedStyle, contentContainerStyleNames);
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;
26
+ const contentContainerStyle = pick(flattenedStyle, contentContainerStyleNames);
47
27
  // contentContainerStyle should always at least fill the parent to ensure sizing changes reflects properly on component and children.
48
- // The measured sizes include borders, so we need to subtract those before applying
49
- if (measuredWidth) {
50
- contentContainerStyle.minWidth =
51
- measuredWidth - leftBorderWidth - rightBorderWidth;
52
- }
53
- if (measuredHeight) {
54
- contentContainerStyle.minHeight =
55
- measuredHeight - topBorderWidth - bottomBorderWidth;
56
- }
28
+ contentContainerStyle.flexGrow = 1;
57
29
  let style = omit(flattenedStyle, contentContainerStyleNames);
58
30
  // ScrollView's implementation defaults flexGrow to 1, which prevents the ability to set a static size or use a flex larger than 1
59
31
  // See: https://github.com/facebook/react-native/issues/3422
@@ -65,11 +37,8 @@ export default function useSplitContentContainerStyles(originalStyle, measuredWi
65
37
  }
66
38
  return {
67
39
  style,
68
- contentContainerStyle: StyleSheet.flatten([
69
- contentContainerStyle,
70
- tempContentContainerStyle,
71
- ]),
40
+ contentContainerStyle,
72
41
  };
73
- }, [originalStyle, measuredWidth, measuredHeight, tempContentContainerStyle]);
42
+ }, [originalStyle]);
74
43
  }
75
44
  //# sourceMappingURL=useSplitContentContainerStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSplitContentContainerStyles.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/useSplitContentContainerStyles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,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;IACV,KAAK;IACL,WAAW;IACX,QAAQ;CACT,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,8BAA8B,CACpD,aAAmC,EACnC,aAAsB,EACtB,cAAuB,EACvB,sBAA4C,EAAE;IAE9C,yEAAyE;IACzE,yFAAyF;IACzF,MAAM,CAAC,yBAAyB,EAAE,4BAA4B,CAAC,GAC7D,KAAK,CAAC,QAAQ,CAAmB,IAAI,CAAC,CAAC;IAEzC,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,yBAAyB,EAAE;YAC7B,4BAA4B,CAAC,IAAI,CAAC,CAAC;SACpC;QACD,sDAAsD;QACtD,uDAAuD;IACzD,CAAC,EAAE,CAAC,cAAc,EAAE,aAAa,CAAC,CAAC,CAAC;IAEpC,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,4BAA4B,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC;QAC5D,uDAAuD;IACzD,CAAC,EAAE,mBAAmB,CAAC,CAAC;IAExB,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,aAAd,cAAc,uBAAd,cAAc,CAAE,eAAe,mCAAI,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,WAAW,mCAAI,CAAC,CAAC;QACtE,MAAM,gBAAgB,GACpB,MAAA,MAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,gBAAgB,mCAAI,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,WAAW,mCAAI,CAAC,CAAC;QACvE,MAAM,cAAc,GAClB,MAAA,MAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,cAAc,mCAAI,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,WAAW,mCAAI,CAAC,CAAC;QACrE,MAAM,iBAAiB,GACrB,MAAA,MAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,iBAAiB,mCAAI,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,WAAW,mCAAI,CAAC,CAAC;QAExE,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;YACL,KAAK;YACL,qBAAqB,EAAE,UAAU,CAAC,OAAO,CAAC;gBACxC,qBAAqB;gBACrB,yBAAyB;aAC1B,CAAC;SACH,CAAC;IACJ,CAAC,EAAE,CAAC,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,yBAAyB,CAAC,CAAC,CAAC;AAChF,CAAC"}
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;IACV,KAAK;IACL,WAAW;IACX,QAAQ;CACT,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,8BAA8B,CACpD,aAAmC;IAEnC,OAAO,kBAAkB,CAAS,GAAG,EAAE;QACrC,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QAEzD,MAAM,qBAAqB,GAAG,IAAI,CAChC,cAAc,EACd,0BAA0B,CAC3B,CAAC;QAEF,qIAAqI;QACrI,qBAAqB,CAAC,QAAQ,GAAG,CAAC,CAAC;QAEnC,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;YACL,KAAK;YACL,qBAAqB;SACtB,CAAC;IACJ,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;AACtB,CAAC"}