@draftbit/core 49.6.4 → 49.6.5-080ad8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
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=React.forwardRef(function(_ref,ref){var styleProp=_ref.style,rest=_objectWithoutProperties(_ref,_excluded);var _useSplitContentConta=useSplitContentContainerStyles(styleProp),style=_useSplitContentConta.style,contentContainerStyle=_useSplitContentConta.contentContainerStyle;return _jsx(ScrollView,Object.assign({ref:ref,style:style,contentContainerStyle:contentContainerStyle},rest));});export default SimpleStyleScrollView;
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["style","onRefresh","refreshing"];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,RefreshControl}from"react-native";import useSplitContentContainerStyles from"./useSplitContentContainerStyles";import{jsx as _jsx}from"react/jsx-runtime";var SimpleStyleScrollView=React.forwardRef(function(_ref,ref){var styleProp=_ref.style,onRefresh=_ref.onRefresh,_ref$refreshing=_ref.refreshing,refreshing=_ref$refreshing===void 0?false:_ref$refreshing,rest=_objectWithoutProperties(_ref,_excluded);var _useSplitContentConta=useSplitContentContainerStyles(styleProp),style=_useSplitContentConta.style,contentContainerStyle=_useSplitContentConta.contentContainerStyle;return _jsx(ScrollView,Object.assign({ref:ref,style:style,contentContainerStyle:contentContainerStyle,refreshControl:onRefresh?_jsx(RefreshControl,{refreshing:refreshing,onRefresh:onRefresh}):undefined},rest));});export default SimpleStyleScrollView;
@@ -1,9 +1,13 @@
1
1
  import React from "react";
2
2
  import { ScrollView } from "react-native";
3
3
  import type { ScrollViewProps } from "react-native";
4
+ interface Props extends Omit<ScrollViewProps, "contentContainerStyle"> {
5
+ onRefresh?: () => void;
6
+ refreshing?: boolean;
7
+ }
4
8
  /**
5
9
  * A ScrollView wrapper that takes a single `style` prop and internally extracts
6
10
  * the appropriate style keys into the `contentContainerStyle`
7
11
  */
8
- declare const SimpleStyleScrollView: React.ForwardRefExoticComponent<Omit<ScrollViewProps, "contentContainerStyle"> & React.RefAttributes<ScrollView>>;
12
+ declare const SimpleStyleScrollView: React.ForwardRefExoticComponent<Props & React.RefAttributes<ScrollView>>;
9
13
  export default SimpleStyleScrollView;
@@ -1,13 +1,13 @@
1
1
  import React from "react";
2
- import { ScrollView } from "react-native";
2
+ import { ScrollView, RefreshControl } from "react-native";
3
3
  import useSplitContentContainerStyles from "./useSplitContentContainerStyles";
4
4
  /**
5
5
  * A ScrollView wrapper that takes a single `style` prop and internally extracts
6
6
  * the appropriate style keys into the `contentContainerStyle`
7
7
  */
8
- const SimpleStyleScrollView = React.forwardRef(({ style: styleProp, ...rest }, ref) => {
8
+ const SimpleStyleScrollView = React.forwardRef(({ style: styleProp, onRefresh, refreshing = false, ...rest }, ref) => {
9
9
  const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp);
10
- return (React.createElement(ScrollView, { ref: ref, style: style, contentContainerStyle: contentContainerStyle, ...rest }));
10
+ return (React.createElement(ScrollView, { ref: ref, style: style, contentContainerStyle: contentContainerStyle, refreshControl: onRefresh ? (React.createElement(RefreshControl, { refreshing: refreshing, onRefresh: onRefresh })) : undefined, ...rest }));
11
11
  });
12
12
  export default SimpleStyleScrollView;
13
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,GAAG,KAAK,CAAC,UAAU,CAC5C,CACE,EACE,KAAK,EAAE,SAAS,EAChB,GAAG,IAAI,EACwC,EACjD,GAA0B,EAC1B,EAAE;IACF,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GACpC,8BAA8B,CAAC,SAAS,CAAC,CAAC;IAE5C,OAAO,CACL,oBAAC,UAAU,IACT,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqB,KACxC,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CACF,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,cAAc,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAO9E;;;GAGG;AACH,MAAM,qBAAqB,GAAG,KAAK,CAAC,UAAU,CAC5C,CACE,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,GAAG,KAAK,EAAE,GAAG,IAAI,EAAS,EACnE,GAA0B,EAC1B,EAAE;IACF,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GACpC,8BAA8B,CAAC,SAAS,CAAC,CAAC;IAE5C,OAAO,CACL,oBAAC,UAAU,IACT,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqB,EAC5C,cAAc,EACZ,SAAS,CAAC,CAAC,CAAC,CACV,oBAAC,cAAc,IAAC,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,GAAI,CACjE,CAAC,CAAC,CAAC,SAAS,KAEX,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,qBAAqB,CAAC"}