@draftbit/core 49.5.2-1d074a.2 → 49.5.2-ff55cf.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 _jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/ScreenContainer.tsx";var _excluded=["scrollable","hasSafeArea","hasBottomSafeArea","hasTopSafeArea","hasLeftSafeArea","hasRightSafeArea","theme","style","children"];import*as React from"react";import{StyleSheet,ScrollView,View}from"react-native";import{SafeAreaView}from"react-native-safe-area-context";import{withTheme}from"@draftbit/theme";import{jsx as _jsx}from"react/jsx-runtime";function ScreenContainer(_ref){var _StyleSheet$flatten;var _ref$scrollable=_ref.scrollable,scrollable=_ref$scrollable===void 0?false:_ref$scrollable,_ref$hasSafeArea=_ref.hasSafeArea,hasSafeArea=_ref$hasSafeArea===void 0?false:_ref$hasSafeArea,_ref$hasBottomSafeAre=_ref.hasBottomSafeArea,hasBottomSafeArea=_ref$hasBottomSafeAre===void 0?false:_ref$hasBottomSafeAre,_ref$hasTopSafeArea=_ref.hasTopSafeArea,hasTopSafeArea=_ref$hasTopSafeArea===void 0?false:_ref$hasTopSafeArea,_ref$hasLeftSafeArea=_ref.hasLeftSafeArea,hasLeftSafeArea=_ref$hasLeftSafeArea===void 0?true:_ref$hasLeftSafeArea,_ref$hasRightSafeArea=_ref.hasRightSafeArea,hasRightSafeArea=_ref$hasRightSafeArea===void 0?true:_ref$hasRightSafeArea,theme=_ref.theme,style=_ref.style,children=_ref.children,rest=_objectWithoutProperties(_ref,_excluded);var backgroundColor=((_StyleSheet$flatten=StyleSheet.flatten(style))==null?void 0:_StyleSheet$flatten.backgroundColor)||theme.colors.background.brand;var edges=[];if(hasSafeArea||hasTopSafeArea){edges.push("top");}if(hasSafeArea||hasBottomSafeArea){edges.push("bottom");}if(hasSafeArea||hasLeftSafeArea){edges.push("left");}if(hasSafeArea||hasRightSafeArea){edges.push("right");}return _jsx(SafeAreaView,Object.assign({edges:edges,style:[styles.container,{backgroundColor:backgroundColor}]},rest,{children:scrollable?_jsx(ScrollView,{contentContainerStyle:[styles.scrollViewContainer,{backgroundColor:backgroundColor},style],children:children}):_jsx(View,{style:[styles.container,{backgroundColor:backgroundColor},style],children:children})}));}var styles=StyleSheet.create({container:{flex:1},scrollViewContainer:{flexGrow:1,flex:undefined}});export default withTheme(ScreenContainer);
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/ScreenContainer.tsx";var _excluded=["scrollable","hasSafeArea","hasBottomSafeArea","hasTopSafeArea","hasLeftSafeArea","hasRightSafeArea","theme","style","children"];import*as React from"react";import{StyleSheet,ScrollView,View}from"react-native";import{SafeAreaView}from"react-native-safe-area-context";import{withTheme}from"@draftbit/theme";import{jsx as _jsx}from"react/jsx-runtime";function ScreenContainer(_ref){var _StyleSheet$flatten;var _ref$scrollable=_ref.scrollable,scrollable=_ref$scrollable===void 0?false:_ref$scrollable,_ref$hasSafeArea=_ref.hasSafeArea,hasSafeArea=_ref$hasSafeArea===void 0?false:_ref$hasSafeArea,_ref$hasBottomSafeAre=_ref.hasBottomSafeArea,hasBottomSafeArea=_ref$hasBottomSafeAre===void 0?false:_ref$hasBottomSafeAre,_ref$hasTopSafeArea=_ref.hasTopSafeArea,hasTopSafeArea=_ref$hasTopSafeArea===void 0?false:_ref$hasTopSafeArea,_ref$hasLeftSafeArea=_ref.hasLeftSafeArea,hasLeftSafeArea=_ref$hasLeftSafeArea===void 0?true:_ref$hasLeftSafeArea,_ref$hasRightSafeArea=_ref.hasRightSafeArea,hasRightSafeArea=_ref$hasRightSafeArea===void 0?true:_ref$hasRightSafeArea,theme=_ref.theme,style=_ref.style,children=_ref.children,rest=_objectWithoutProperties(_ref,_excluded);var backgroundColor=((_StyleSheet$flatten=StyleSheet.flatten(style))==null?void 0:_StyleSheet$flatten.backgroundColor)||theme.colors.branding.background.brand;var edges=[];if(hasSafeArea||hasTopSafeArea){edges.push("top");}if(hasSafeArea||hasBottomSafeArea){edges.push("bottom");}if(hasSafeArea||hasLeftSafeArea){edges.push("left");}if(hasSafeArea||hasRightSafeArea){edges.push("right");}return _jsx(SafeAreaView,Object.assign({edges:edges,style:[styles.container,{backgroundColor:backgroundColor}]},rest,{children:scrollable?_jsx(ScrollView,{contentContainerStyle:[styles.scrollViewContainer,{backgroundColor:backgroundColor},style],children:children}):_jsx(View,{style:[styles.container,{backgroundColor:backgroundColor},style],children:children})}));}var styles=StyleSheet.create({container:{flex:1},scrollViewContainer:{flexGrow:1,flex:undefined}});export default withTheme(ScreenContainer);
@@ -4,7 +4,8 @@ import { SafeAreaView } from "react-native-safe-area-context";
4
4
  import { withTheme } from "@draftbit/theme";
5
5
  function ScreenContainer({ scrollable = false, hasSafeArea = false, hasBottomSafeArea = false, hasTopSafeArea = false, hasLeftSafeArea = true, hasRightSafeArea = true, theme, style, children, ...rest }) {
6
6
  var _a;
7
- const backgroundColor = ((_a = StyleSheet.flatten(style)) === null || _a === void 0 ? void 0 : _a.backgroundColor) || theme.colors.background.brand;
7
+ const backgroundColor = ((_a = StyleSheet.flatten(style)) === null || _a === void 0 ? void 0 : _a.backgroundColor) ||
8
+ theme.colors.branding.background.brand;
8
9
  const edges = [];
9
10
  if (hasSafeArea || hasTopSafeArea) {
10
11
  edges.push("top");
@@ -1 +1 @@
1
- {"version":3,"file":"ScreenContainer.js","sourceRoot":"","sources":["../../../../src/components/ScreenContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,UAAU,EACV,UAAU,EAGV,IAAI,GACL,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;A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AAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,IAAI,EAAE,CAAC;KACR;IACD,mBAAmB,EAAE;QACnB,QAAQ,EAAE,CAAC;QACX,IAAI,EAAE,SAAS;KAChB;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC,eAAe,CAAC,CAAC"}
1
+ {"version":3,"file":"ScreenContainer.js","sourceRoot":"","sources":["../../../../src/components/ScreenContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,UAAU,EACV,UAAU,EAGV,IAAI,GACL,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAe5C,SAAS,eAAe,CAAC,EACvB,UAAU,GAAG,KAAK,EAClB,WAAW,GAAG,KAAK,EACnB,iBAAiB,GAAG,KAAK,EACzB,cAAc,GAAG,KAAK,EACtB,eAAe,GAAG,IAAI,EACtB,gBAAgB,GAAG,IAAI,EACvB,KAAK,EACL,KAAK,EACL,QAAQ,EACR,GAAG,IAAI,EACc;;IACrB,MAAM,eAAe,GACnB,CAAA,MAAA,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,0CAAE,eAAe;QAC1C,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC;IAEzC,MAAM,KAAK,GAAW,EAAE,CAAC;IACzB,IAAI,WAAW,IAAI,cAAc,EAAE;QACjC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACnB;IAED,IAAI,WAAW,IAAI,iBAAiB,EAAE;QACpC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KACtB;IAED,IAAI,WAAW,IAAI,eAAe,EAAE;QAClC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KACpB;IAED,I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