@draftbit/core 44.1.2 → 44.1.4-ff3881.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.
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  /* Copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx */
4
2
  import * as React from "react";
5
3
  import { Animated, StyleSheet } from "react-native";
@@ -38,6 +36,21 @@ const Surface = _ref => {
38
36
  }
39
37
  };
40
38
 
39
+ return /*#__PURE__*/React.createElement(Animated.View, { ...rest,
40
+ style: [{
41
+ backgroundColor: getBackgroundColor(),
42
+ elevation,
43
+ ...evalationStyles,
44
+ ...restStyle
45
+ }]
46
+ }, children);
47
+ };
48
+
49
+ export default withTheme(Surface);
50
+ //# sourceMappingURL=Surface.js.mapturn colors.surface;
51
+ }
52
+ };
53
+
41
54
  return /*#__PURE__*/React.createElement(Animated.View, _extends({}, rest, {
42
55
  style: [{
43
56
  backgroundColor: getBackgroundColor(),
@@ -1 +1 @@
1
- {"version":3,"sources":["Surface.tsx"],"names":["React","Animated","StyleSheet","shadow","overlay","withTheme","Surface","elevation","propElevation","style","theme","children","rest","styleElevation","backgroundColor","restStyle","flatten","dark","isDarkTheme","mode","colors","evalationStyles","getBackgroundColor","surface"],"mappings":";;AAAA;AACA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SACEC,QADF,EAEEC,UAFF,QAMO,cANP;AAQA,OAAOC,MAAP,MAAmB,kBAAnB;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,SAASC,SAAT,QAA0B,YAA1B;;AASA,MAAMC,OAAwB,GAAG,QAM3B;AAAA,MAN4B;AAChCC,IAAAA,SAAS,EAAEC,aADqB;AAEhCC,IAAAA,KAFgC;AAGhCC,IAAAA,KAHgC;AAIhCC,IAAAA,QAJgC;AAKhC,OAAGC;AAL6B,GAM5B;AACJ,QAAM;AACJL,IAAAA,SAAS,EAAEM,cAAc,GAAG,CADxB;AAEJC,IAAAA,eAFI;AAGJ,OAAGC;AAHC,MAIDb,UAAU,CAACc,OAAX,CAAmBP,KAAnB,KAA6B,EAJlC;AAMA,QAAM;AAAEQ,IAAAA,IAAI,EAAEC,WAAR;AAAqBC,IAAAA,IAArB;AAA2BC,IAAAA;AAA3B,MAAsCV,KAA5C;AAEA,QAAMH,SAAS,GAAGC,aAAa,IAAIK,cAAnC;AAEA,QAAMQ,eAAe,GAAGd,SAAS,GAAGJ,MAAM,CAACI,SAAD,CAAT,GAAuB,EAAxD;;AAEA,QAAMe,kBAAkB,GAAG,MAAM;AAC/B,QAAIR,eAAJ,EAAqB;AACnB,aAAOA,eAAP;AACD,KAFD,MAEO,IAAII,WAAW,IAAIC,IAAI,KAAK,UAA5B,EAAwC;AAC7C,aAAOf,OAAO,CAACG,SAAD,EAAYa,MAAM,CAACG,OAAnB,CAAd;AACD,KAFM,MAEA;AACL,aAAOH,MAAM,CAACG,OAAd;AACD;AACF,GARD;;AAUA,sBACE,oBAAC,QAAD,CAAU,IAAV,eACMX,IADN;AAEE,IAAA,KAAK,EAAE,CACL;AACEE,MAAAA,eAAe,EAAEQ,kBAAkB,EADrC;AAEEf,MAAAA,SAFF;AAGE,SAAGc,eAHL;AAIE,SAAGN;AAJL,KADK;AAFT,MAWGJ,QAXH,CADF;AAeD,CA5CD;;AA8CA,eAAeN,SAAS,CAACC,OAAD,CAAxB","sourcesContent":["/* Copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx */\nimport * as React from \"react\";\nimport {\n Animated,\n StyleSheet,\n ViewProps,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\n\nimport shadow from \"../styles/shadow\";\nimport overlay from \"../styles/overlay\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\n\ntype Props = {\n elevation?: number;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & ViewProps;\n\nconst Surface: React.FC<Props> = ({\n elevation: propElevation,\n style,\n theme,\n children,\n ...rest\n}) => {\n const {\n elevation: styleElevation = 3,\n backgroundColor,\n ...restStyle\n } = (StyleSheet.flatten(style) || {}) as ViewStyle;\n\n const { dark: isDarkTheme, mode, colors } = theme;\n\n const elevation = propElevation || styleElevation;\n\n const evalationStyles = elevation ? shadow(elevation) : {};\n\n const getBackgroundColor = () => {\n if (backgroundColor) {\n return backgroundColor;\n } else if (isDarkTheme && mode === \"adaptive\") {\n return overlay(elevation, colors.surface);\n } else {\n return colors.surface;\n }\n };\n\n return (\n <Animated.View\n {...rest}\n style={[\n {\n backgroundColor: getBackgroundColor(),\n elevation,\n ...evalationStyles,\n ...restStyle,\n },\n ]}\n >\n {children}\n </Animated.View>\n );\n};\n\nexport default withTheme(Surface);\n"]}
1
+ {"version":3,"sources":["Surface.js"],"names":["React","Animated","StyleSheet","shadow","overlay","withTheme","Surface","elevation","propElevation","style","theme","children","rest","styleElevation","backgroundColor","restStyle","flatten","dark","isDarkTheme","mode","colors","evalationStyles","getBackgroundColor","surface","createElement","View"],"mappings":"AAAA;AACA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,QAAT,EAAmBC,UAAnB,QAAsC,cAAtC;AACA,OAAOC,MAAP,MAAmB,kBAAnB;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,SAASC,SAAT,QAA0B,YAA1B;;AACA,MAAMC,OAAO,GAAG,QAAmE;AAAA,MAAlE;AAAEC,IAAAA,SAAS,EAAEC,aAAb;AAA4BC,IAAAA,KAA5B;AAAmCC,IAAAA,KAAnC;AAA0CC,IAAAA,QAA1C;AAAoD,OAAGC;AAAvD,GAAkE;AAC/E,QAAM;AAAEL,IAAAA,SAAS,EAAEM,cAAc,GAAG,CAA9B;AAAiCC,IAAAA,eAAjC;AAAkD,OAAGC;AAArD,MAAoEb,UAAU,CAACc,OAAX,CAAmBP,KAAnB,KAA6B,EAAvG;AACA,QAAM;AAAEQ,IAAAA,IAAI,EAAEC,WAAR;AAAqBC,IAAAA,IAArB;AAA2BC,IAAAA;AAA3B,MAAsCV,KAA5C;AACA,QAAMH,SAAS,GAAGC,aAAa,IAAIK,cAAnC;AACA,QAAMQ,eAAe,GAAGd,SAAS,GAAGJ,MAAM,CAACI,SAAD,CAAT,GAAuB,EAAxD;;AACA,QAAMe,kBAAkB,GAAG,MAAM;AAC7B,QAAIR,eAAJ,EAAqB;AACjB,aAAOA,eAAP;AACH,KAFD,MAGK,IAAII,WAAW,IAAIC,IAAI,KAAK,UAA5B,EAAwC;AACzC,aAAOf,OAAO,CAACG,SAAD,EAAYa,MAAM,CAACG,OAAnB,CAAd;AACH,KAFI,MAGA;AACD,aAAOH,MAAM,CAACG,OAAd;AACH;AACJ,GAVD;;AAWA,sBAAQvB,KAAK,CAACwB,aAAN,CAAoBvB,QAAQ,CAACwB,IAA7B,EAAmC,EAAE,GAAGb,IAAL;AAAWH,IAAAA,KAAK,EAAE,CACrD;AACIK,MAAAA,eAAe,EAAEQ,kBAAkB,EADvC;AAEIf,MAAAA,SAFJ;AAGI,SAAGc,eAHP;AAII,SAAGN;AAJP,KADqD;AAAlB,GAAnC,EAOCJ,QAPD,CAAR;AAQH,CAxBD;;AAyBA,eAAeN,SAAS,CAACC,OAAD,CAAxB","sourcesContent":["/* Copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx */\nimport * as React from \"react\";\nimport { Animated, StyleSheet, } from \"react-native\";\nimport shadow from \"../styles/shadow\";\nimport overlay from \"../styles/overlay\";\nimport { withTheme } from \"../theming\";\nconst Surface = ({ elevation: propElevation, style, theme, children, ...rest }) => {\n const { elevation: styleElevation = 3, backgroundColor, ...restStyle } = (StyleSheet.flatten(style) || {});\n const { dark: isDarkTheme, mode, colors } = theme;\n const elevation = propElevation || styleElevation;\n const evalationStyles = elevation ? shadow(elevation) : {};\n const getBackgroundColor = () => {\n if (backgroundColor) {\n return backgroundColor;\n }\n else if (isDarkTheme && mode === \"adaptive\") {\n return overlay(elevation, colors.surface);\n }\n else {\n return colors.surface;\n }\n };\n return (React.createElement(Animated.View, { ...rest, style: [\n {\n backgroundColor: getBackgroundColor(),\n elevation,\n ...evalationStyles,\n ...restStyle,\n },\n ] }, children));\n};\nexport default withTheme(Surface);\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "44.1.2",
3
+ "version": "44.1.4-ff3881.0+ff38815d",
4
4
  "description": "Core (non-native) Components",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -49,7 +49,6 @@
49
49
  "color": "^3.1.2",
50
50
  "date-fns": "^2.16.1",
51
51
  "dateformat": "^3.0.3",
52
- "expo-linear-gradient": "^9.2.0",
53
52
  "lodash.isnumber": "^3.0.3",
54
53
  "lodash.omit": "^4.5.0",
55
54
  "lodash.tonumber": "^4.0.3",
@@ -80,5 +79,5 @@
80
79
  ]
81
80
  ]
82
81
  },
83
- "gitHead": "84139d3f9b933ad40d360cc97d208d8e97fcc4de"
82
+ "gitHead": "ff38815dd5184b0ad7f8e817432740bee8344423"
84
83
  }