@draftbit/core 46.2.4-e9fc2e.5 → 46.2.4-ea5e37.5

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.
@@ -15,6 +15,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
15
15
 
16
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
17
 
18
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
19
+
18
20
  const CONSTANTS = {
19
21
  baseHeight: 42,
20
22
  borderRadius: 4,
@@ -71,7 +73,7 @@ function Base(_ref) {
71
73
  buttonStyles.justifyContent = "flex-end";
72
74
  }
73
75
 
74
- return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
76
+ return /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({
75
77
  onPress: onPress,
76
78
  disabled: disabled || loading,
77
79
  style: _ref2 => {
@@ -81,9 +83,8 @@ function Base(_ref) {
81
83
  return [styles.base, {
82
84
  opacity: pressed || disabled ? 0.75 : 1
83
85
  }, buttonStyles];
84
- },
85
- ...props
86
- }, loading ? /*#__PURE__*/React.createElement(_reactNative.ActivityIndicator, {
86
+ }
87
+ }, props), loading ? /*#__PURE__*/React.createElement(_reactNative.ActivityIndicator, {
87
88
  size: "small",
88
89
  color: color,
89
90
  style: styles.loading
@@ -103,14 +104,13 @@ const Solid = _ref3 => {
103
104
  theme,
104
105
  ...props
105
106
  } = _ref3;
106
- return /*#__PURE__*/React.createElement(Base, {
107
+ return /*#__PURE__*/React.createElement(Base, _extends({
107
108
  style: [{
108
109
  color: "#FFF",
109
110
  borderRadius: theme.roundness,
110
111
  backgroundColor: theme.colors.primary
111
- }, style],
112
- ...props
113
- });
112
+ }, style]
113
+ }, props));
114
114
  };
115
115
 
116
116
  const ButtonSolid = (0, _theming.withTheme)(Solid);
@@ -122,14 +122,13 @@ const Outline = _ref4 => {
122
122
  theme,
123
123
  ...props
124
124
  } = _ref4;
125
- return /*#__PURE__*/React.createElement(Base, {
125
+ return /*#__PURE__*/React.createElement(Base, _extends({
126
126
  style: [styles.outline, {
127
127
  borderRadius: theme.roundness,
128
128
  borderColor: theme.colors.primary,
129
129
  color: theme.colors.primary
130
- }, style],
131
- ...props
132
- });
130
+ }, style]
131
+ }, props));
133
132
  };
134
133
 
135
134
  const ButtonOutline = (0, _theming.withTheme)(Outline);
@@ -177,24 +176,4 @@ const styles = _reactNative.StyleSheet.create({
177
176
  }
178
177
  })
179
178
  }
180
- });nsparent",
181
- padding: 0,
182
- minHeight: undefined
183
- },
184
- loading: {
185
- marginRight: 6
186
- },
187
- icon: { ..._reactNative.Platform.select({
188
- web: {
189
- marginTop: 1,
190
- marginRight: 4,
191
- alignSelf: "center"
192
- },
193
- default: {
194
- marginBottom: 2,
195
- marginRight: 4,
196
- alignSelf: "center"
197
- }
198
- })
199
- }
200
179
  });
@@ -19,7 +19,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
19
19
 
20
20
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
21
 
22
- const Svg = _ref => {
22
+ const SVG = _ref => {
23
23
  let {
24
24
  source = _Config.default.placeholderSvgURL,
25
25
  style
@@ -44,5 +44,5 @@ const Svg = _ref => {
44
44
  }));
45
45
  };
46
46
 
47
- var _default = Svg;
47
+ var _default = SVG;
48
48
  exports.default = _default;
@@ -70,6 +70,7 @@ const StarRating = _ref => {
70
70
  };
71
71
 
72
72
  const styles = _reactNative.StyleSheet.create({
73
+ //comment!
73
74
  container: {
74
75
  flexDirection: "row",
75
76
  alignItems: "center"
@@ -291,6 +291,12 @@ Object.defineProperty(exports, "RowHeadlineImageIcon", {
291
291
  return _RowHeadlineImageIcon.default;
292
292
  }
293
293
  });
294
+ Object.defineProperty(exports, "SVG", {
295
+ enumerable: true,
296
+ get: function () {
297
+ return _SVG.default;
298
+ }
299
+ });
294
300
  Object.defineProperty(exports, "ScreenContainer", {
295
301
  enumerable: true,
296
302
  get: function () {
@@ -339,12 +345,6 @@ Object.defineProperty(exports, "Surface", {
339
345
  return _Surface.default;
340
346
  }
341
347
  });
342
- Object.defineProperty(exports, "Svg", {
343
- enumerable: true,
344
- get: function () {
345
- return _Svg.default;
346
- }
347
- });
348
348
  Object.defineProperty(exports, "Swiper", {
349
349
  enumerable: true,
350
350
  get: function () {
@@ -448,7 +448,7 @@ var _IconButton = _interopRequireDefault(require("./components/IconButton"));
448
448
 
449
449
  var _Image = _interopRequireDefault(require("./components/Image"));
450
450
 
451
- var _Svg = _interopRequireDefault(require("./components/Svg"));
451
+ var _SVG = _interopRequireDefault(require("./components/SVG"));
452
452
 
453
453
  var _NumberInput = _interopRequireDefault(require("./components/NumberInput"));
454
454
 
@@ -11,7 +11,6 @@ const SEED_DATA = {
11
11
  name: "SVG",
12
12
  tag: "SVG",
13
13
  description: "An SVG component",
14
- packageName: "@draftbit/core",
15
14
  category: _types.COMPONENT_TYPES.media,
16
15
  layout: {
17
16
  width: 100,
@@ -19,7 +18,7 @@ const SEED_DATA = {
19
18
  },
20
19
  stylesPanelSections: [_types.StylesPanelSections.Size, _types.StylesPanelSections.Margins, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
21
20
  props: {
22
- source: (0, _types.createSvgProp)()
21
+ source: (0, _types.createSVGProp)()
23
22
  }
24
23
  };
25
24
  exports.SEED_DATA = SEED_DATA;
@@ -3,7 +3,7 @@ import { View, Platform, Image } from "react-native";
3
3
  import { SvgUri } from "react-native-svg";
4
4
  import Config from "./Config";
5
5
 
6
- const Svg = _ref => {
6
+ const SVG = _ref => {
7
7
  let {
8
8
  source = Config.placeholderSvgURL,
9
9
  style
@@ -28,4 +28,4 @@ const Svg = _ref => {
28
28
  }));
29
29
  };
30
30
 
31
- export default Svg;
31
+ export default SVG;
@@ -57,6 +57,7 @@ const StarRating = _ref => {
57
57
  };
58
58
 
59
59
  const styles = StyleSheet.create({
60
+ //comment!
60
61
  container: {
61
62
  flexDirection: "row",
62
63
  alignItems: "center"
@@ -17,7 +17,7 @@ export { default as FAB } from "./components/FAB";
17
17
  export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
18
18
  export { default as IconButton } from "./components/IconButton";
19
19
  export { default as Image } from "./components/Image";
20
- export { default as Svg } from "./components/Svg";
20
+ export { default as SVG } from "./components/SVG";
21
21
  export { default as NumberInput } from "./components/NumberInput";
22
22
  export { default as ScreenContainer } from "./components/ScreenContainer";
23
23
  export { default as StarRating } from "./components/StarRating";
@@ -1,9 +1,8 @@
1
- import { COMPONENT_TYPES, createSvgProp, StylesPanelSections } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createSVGProp, StylesPanelSections } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "SVG",
4
4
  tag: "SVG",
5
5
  description: "An SVG component",
6
- packageName: "@draftbit/core",
7
6
  category: COMPONENT_TYPES.media,
8
7
  layout: {
9
8
  width: 100,
@@ -11,6 +10,6 @@ export const SEED_DATA = {
11
10
  },
12
11
  stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins, StylesPanelSections.Position, StylesPanelSections.Effects],
13
12
  props: {
14
- source: createSvgProp()
13
+ source: createSVGProp()
15
14
  }
16
15
  };
@@ -1,8 +1,8 @@
1
1
  import * as React from "react";
2
2
  import { StyleProp, ImageStyle } from "react-native";
3
- declare type SvgComponentProps = {
3
+ declare type SVGComponentProps = {
4
4
  source: string;
5
5
  style?: StyleProp<ImageStyle>;
6
6
  };
7
- declare const Svg: React.FC<React.PropsWithChildren<SvgComponentProps>>;
8
- export default Svg;
7
+ declare const SVG: React.FC<React.PropsWithChildren<SVGComponentProps>>;
8
+ export default SVG;
@@ -17,7 +17,7 @@ export { default as FAB } from "./components/FAB";
17
17
  export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
18
18
  export { default as IconButton } from "./components/IconButton";
19
19
  export { default as Image } from "./components/Image";
20
- export { default as Svg } from "./components/Svg";
20
+ export { default as SVG } from "./components/SVG";
21
21
  export { default as NumberInput } from "./components/NumberInput";
22
22
  export { default as ScreenContainer } from "./components/ScreenContainer";
23
23
  export { default as StarRating } from "./components/StarRating";
@@ -2,7 +2,6 @@ export declare const SEED_DATA: {
2
2
  name: string;
3
3
  tag: string;
4
4
  description: string;
5
- packageName: string;
6
5
  category: string;
7
6
  layout: {
8
7
  width: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "46.2.4-e9fc2e.5+e9fc2e0a",
3
+ "version": "46.2.4-ea5e37.5+ea5e37f5",
4
4
  "description": "Core (non-native) Components",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -41,7 +41,7 @@
41
41
  "dependencies": {
42
42
  "@date-io/date-fns": "^1.3.13",
43
43
  "@draftbit/react-theme-provider": "^2.1.1",
44
- "@draftbit/types": "^46.2.4-e9fc2e.5+e9fc2e0a",
44
+ "@draftbit/types": "^46.2.4-ea5e37.5+ea5e37f5",
45
45
  "@material-ui/core": "^4.11.0",
46
46
  "@material-ui/pickers": "^3.2.10",
47
47
  "@react-native-community/slider": "4.2.3",
@@ -80,5 +80,5 @@
80
80
  ]
81
81
  ]
82
82
  },
83
- "gitHead": "e9fc2e0a55bda12afee277c131da32b10cede41c"
83
+ "gitHead": "ea5e37f5e875ec7144621fd62eb847567a62c121"
84
84
  }
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import { View, Platform, Image } from "react-native";
3
3
  import { SvgUri } from "react-native-svg";
4
4
  import Config from "./Config";
5
- const Svg = ({ source = Config.placeholderSvgURL, style, }) => {
5
+ const SVG = ({ source = Config.placeholderSvgURL, style, }) => {
6
6
  return (React.createElement(React.Fragment, null,
7
7
  Platform.OS === "ios" && (React.createElement(View, { style: style },
8
8
  React.createElement(SvgUri, { width: "100%", height: "100%", uri: source }))),
@@ -10,4 +10,4 @@ const Svg = ({ source = Config.placeholderSvgURL, style, }) => {
10
10
  React.createElement(SvgUri, { width: "100%", height: "100%", uri: source }))),
11
11
  Platform.OS === "web" && (React.createElement(Image, { style: style, source: { uri: source } }))));
12
12
  };
13
- export default Svg;
13
+ export default SVG;
@@ -4,12 +4,12 @@ import { SvgUri } from "react-native-svg";
4
4
 
5
5
  import Config from "./Config";
6
6
 
7
- type SvgComponentProps = {
7
+ type SVGComponentProps = {
8
8
  source: string;
9
9
  style?: StyleProp<ImageStyle>;
10
10
  };
11
11
 
12
- const Svg: React.FC<React.PropsWithChildren<SvgComponentProps>> = ({
12
+ const SVG: React.FC<React.PropsWithChildren<SVGComponentProps>> = ({
13
13
  source = Config.placeholderSvgURL,
14
14
  style,
15
15
  }) => {
@@ -32,4 +32,4 @@ const Svg: React.FC<React.PropsWithChildren<SvgComponentProps>> = ({
32
32
  );
33
33
  };
34
34
 
35
- export default Svg;
35
+ export default SVG;
@@ -27,6 +27,7 @@ const StarRating = ({ Icon, starSize = 16, maxStars = 5, rating = 0, defaultValu
27
27
  React.createElement(Pressable, { style: styles.pressable, onPress: () => ratingHandler(i + 1) }))))))));
28
28
  };
29
29
  const styles = StyleSheet.create({
30
+ //comment!
30
31
  container: {
31
32
  flexDirection: "row",
32
33
  alignItems: "center",
@@ -94,6 +94,7 @@ const StarRating: React.FC<React.PropsWithChildren<Props>> = ({
94
94
  };
95
95
 
96
96
  const styles = StyleSheet.create({
97
+ //comment!
97
98
  container: {
98
99
  flexDirection: "row",
99
100
  alignItems: "center",
package/src/index.js CHANGED
@@ -17,7 +17,7 @@ export { default as FAB } from "./components/FAB";
17
17
  export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
18
18
  export { default as IconButton } from "./components/IconButton";
19
19
  export { default as Image } from "./components/Image";
20
- export { default as Svg } from "./components/Svg";
20
+ export { default as SVG } from "./components/SVG";
21
21
  export { default as NumberInput } from "./components/NumberInput";
22
22
  export { default as ScreenContainer } from "./components/ScreenContainer";
23
23
  export { default as StarRating } from "./components/StarRating";
package/src/index.tsx CHANGED
@@ -18,7 +18,7 @@ export { default as FAB } from "./components/FAB";
18
18
  export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
19
19
  export { default as IconButton } from "./components/IconButton";
20
20
  export { default as Image } from "./components/Image";
21
- export { default as Svg } from "./components/Svg";
21
+ export { default as SVG } from "./components/SVG";
22
22
  export { default as NumberInput } from "./components/NumberInput";
23
23
  export { default as ScreenContainer } from "./components/ScreenContainer";
24
24
  export { default as StarRating } from "./components/StarRating";
@@ -1,9 +1,8 @@
1
- import { COMPONENT_TYPES, createSvgProp, StylesPanelSections, } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createSVGProp, StylesPanelSections, } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "SVG",
4
4
  tag: "SVG",
5
5
  description: "An SVG component",
6
- packageName: "@draftbit/core",
7
6
  category: COMPONENT_TYPES.media,
8
7
  layout: {
9
8
  width: 100,
@@ -16,6 +15,6 @@ export const SEED_DATA = {
16
15
  StylesPanelSections.Effects,
17
16
  ],
18
17
  props: {
19
- source: createSvgProp(),
18
+ source: createSVGProp(),
20
19
  },
21
20
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  COMPONENT_TYPES,
3
- createSvgProp,
3
+ createSVGProp,
4
4
  StylesPanelSections,
5
5
  } from "@draftbit/types";
6
6
 
@@ -8,7 +8,6 @@ export const SEED_DATA = {
8
8
  name: "SVG",
9
9
  tag: "SVG",
10
10
  description: "An SVG component",
11
- packageName: "@draftbit/core",
12
11
  category: COMPONENT_TYPES.media,
13
12
  layout: {
14
13
  width: 100,
@@ -21,6 +20,6 @@ export const SEED_DATA = {
21
20
  StylesPanelSections.Effects,
22
21
  ],
23
22
  props: {
24
- source: createSvgProp(),
23
+ source: createSVGProp(),
25
24
  },
26
25
  };