@draftbit/core 46.2.4-70e86e.10 → 46.2.4-710cbc.10

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.
@@ -213,12 +213,6 @@ Object.defineProperty(exports, "Link", {
213
213
  return _Text.Link;
214
214
  }
215
215
  });
216
- Object.defineProperty(exports, "Markdown", {
217
- enumerable: true,
218
- get: function () {
219
- return _Markdown.default;
220
- }
221
- });
222
216
  Object.defineProperty(exports, "NumberInput", {
223
217
  enumerable: true,
224
218
  get: function () {
@@ -518,8 +512,6 @@ var _Stepper = _interopRequireDefault(require("./components/Stepper"));
518
512
 
519
513
  var _useAuthState = require("./components/useAuthState");
520
514
 
521
- var _Markdown = _interopRequireDefault(require("./components/Markdown"));
522
-
523
515
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
524
516
 
525
517
  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; }
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SEED_DATA = void 0;
7
+
8
+ var _types = require("@draftbit/types");
9
+
10
+ const SEED_DATA = {
11
+ name: "FlashList",
12
+ tag: "FlashList",
13
+ description: "Flashlist by Shopify",
14
+ packageName: "@shopify/flash-list",
15
+ category: _types.COMPONENT_TYPES.data,
16
+ stylesPanelSections: _types.CONTAINER_COMPONENT_STYLES_SECTIONS,
17
+ layout: {
18
+ flex: 1
19
+ },
20
+ props: {
21
+ estimatedItemSize: (0, _types.createNumberProp)({
22
+ group: _types.GROUPS.basic,
23
+ label: "Est. Item Size",
24
+ description: "Approximate size of the items before rendering.",
25
+ defaultValue: 50,
26
+ step: 1,
27
+ precision: 0
28
+ }),
29
+ horizontal: (0, _types.createStaticBoolProp)({
30
+ label: "Horizontal",
31
+ description: "Render list horizontally"
32
+ }),
33
+ inverted: (0, _types.createStaticBoolProp)({
34
+ label: "Inverted",
35
+ description: "If true, reverses the direction."
36
+ }),
37
+ numColumns: (0, _types.createNumColumnsType)({
38
+ editable: true
39
+ })
40
+ }
41
+ };
42
+ exports.SEED_DATA = SEED_DATA;
@@ -1,5 +1,3 @@
1
- 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); }
2
-
3
1
  import React from "react";
4
2
  import { View, StyleSheet } from "react-native";
5
3
 
@@ -32,6 +30,25 @@ const AspectRatio = props => {
32
30
  }
33
31
  }
34
32
 
33
+ return /*#__PURE__*/React.createElement(View, { ...props,
34
+ style: style,
35
+ onLayout: _ref => {
36
+ let {
37
+ nativeEvent: {
38
+ layout: l
39
+ }
40
+ } = _ref;
41
+ return setLayout(l);
42
+ }
43
+ }, props.children);
44
+ };
45
+
46
+ export default AspectRatio; width,
47
+ height: width * (1 / aspectRatio)
48
+ });
49
+ }
50
+ }
51
+
35
52
  return /*#__PURE__*/React.createElement(View, _extends({}, props, {
36
53
  style: style,
37
54
  onLayout: _ref => {
@@ -1,5 +1,3 @@
1
- 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); }
2
-
3
1
  import React from "react";
4
2
  import { View, Text } from "react-native";
5
3
  import color from "color";
@@ -51,11 +49,12 @@ const CardContainer = _ref => {
51
49
  break;
52
50
  }
53
51
 
54
- return /*#__PURE__*/React.createElement(Card, _extends({
52
+ return /*#__PURE__*/React.createElement(Card, {
55
53
  style: style,
56
54
  onPress: onPress,
57
- numColumns: numColumns
58
- }, rest), /*#__PURE__*/React.createElement(Elevation, {
55
+ numColumns: numColumns,
56
+ ...rest
57
+ }, /*#__PURE__*/React.createElement(Elevation, {
59
58
  style: {
60
59
  elevation,
61
60
  borderRadius: roundness
@@ -125,4 +124,15 @@ const CardContainer = _ref => {
125
124
  })) : null)));
126
125
  };
127
126
 
127
+ export default withTheme(CardContainer);ONTAINER_PADDING,
128
+ borderRadius: ICON_CONTAINER_SIZE,
129
+ backgroundColor: color(colors.strong).alpha(Config.cardIconBackgroundOpacity).rgb().string()
130
+ }
131
+ }, /*#__PURE__*/React.createElement(Icon, {
132
+ name: icon,
133
+ size: Config.cardIconSize,
134
+ color: colors.surface
135
+ })) : null)));
136
+ };
137
+
128
138
  export default withTheme(CardContainer);
@@ -1,5 +1,3 @@
1
- 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); }
2
-
3
1
  import React from "react";
4
2
  import { View, Text } from "react-native";
5
3
  import Image from "./Image";
@@ -25,10 +23,11 @@ const CardContainerShortImage = _ref => {
25
23
  onPress,
26
24
  ...rest
27
25
  } = _ref;
28
- return /*#__PURE__*/React.createElement(Card, _extends({
26
+ return /*#__PURE__*/React.createElement(Card, {
29
27
  style: style,
30
- onPress: onPress
31
- }, rest), /*#__PURE__*/React.createElement(Elevation, {
28
+ onPress: onPress,
29
+ ...rest
30
+ }, /*#__PURE__*/React.createElement(Elevation, {
32
31
  style: {
33
32
  elevation,
34
33
  borderRadius: roundness
@@ -76,4 +75,19 @@ const CardContainerShortImage = _ref => {
76
75
  }))));
77
76
  };
78
77
 
78
+ export default withTheme(CardContainerShortImage);2, {
79
+ color: colors.medium,
80
+ marginTop: 4
81
+ }]
82
+ }, subtitle) : null), mode === "right" && /*#__PURE__*/React.createElement(Image, {
83
+ style: {
84
+ aspectRatio
85
+ },
86
+ source: typeof image === "string" ? {
87
+ uri: image
88
+ } : image,
89
+ resizeMode: "cover"
90
+ }))));
91
+ };
92
+
79
93
  export default withTheme(CardContainerShortImage);
@@ -1,5 +1,3 @@
1
- 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); }
2
-
3
1
  import * as React from "react";
4
2
  import { withTheme } from "../theming";
5
3
  import { ScrollView, View, StyleSheet, Dimensions } from "react-native";
@@ -33,8 +31,6 @@ function Pager(_ref) {
33
31
  }
34
32
 
35
33
  function Carousel(_ref2) {
36
- var _data$length;
37
-
38
34
  let {
39
35
  data,
40
36
  children,
@@ -42,9 +38,12 @@ function Carousel(_ref2) {
42
38
  style,
43
39
  ...rest
44
40
  } = _ref2;
41
+
42
+ var _a;
43
+
45
44
  const [index, setIndex] = React.useState(0);
46
45
  const length = React.Children.count(children);
47
- const itemsLength = ((_data$length = data === null || data === void 0 ? void 0 : data.length) !== null && _data$length !== void 0 ? _data$length : 0) + length;
46
+ const itemsLength = ((_a = data === null || data === void 0 ? void 0 : data.length) !== null && _a !== void 0 ? _a : 0) + length;
48
47
  const slides = Array.isArray(data) ? data : [];
49
48
  const {
50
49
  width,
@@ -52,9 +51,10 @@ function Carousel(_ref2) {
52
51
  } = StyleSheet.flatten(style || {});
53
52
  const slideWidth = width || screenWidth;
54
53
  const slideHeight = height || 250;
55
- return /*#__PURE__*/React.createElement(View, _extends({
56
- style: [styles.container, style]
57
- }, rest), /*#__PURE__*/React.createElement(ScrollView, {
54
+ return /*#__PURE__*/React.createElement(View, {
55
+ style: [styles.container, style],
56
+ ...rest
57
+ }, /*#__PURE__*/React.createElement(ScrollView, {
58
58
  pagingEnabled: true,
59
59
  horizontal: true,
60
60
  decelerationRate: "fast",
@@ -82,9 +82,9 @@ function Carousel(_ref2) {
82
82
  }]
83
83
  });
84
84
  }) : null, React.Children.map(children, child => {
85
- var _child$props;
85
+ var _a;
86
86
 
87
- const s = (child === null || child === void 0 ? void 0 : (_child$props = child.props) === null || _child$props === void 0 ? void 0 : _child$props.style) || {};
87
+ const s = ((_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.style) || {};
88
88
  return /*#__PURE__*/React.createElement(View, {
89
89
  style: {
90
90
  width: slideWidth
@@ -101,6 +101,31 @@ function Carousel(_ref2) {
101
101
  }));
102
102
  }
103
103
 
104
+ const styles = StyleSheet.create({
105
+ container: {
106
+ backgroundColor: "#eee"
107
+ },
108
+ pager: {
109
+ position: "absolute",
110
+ bottom: 12,
111
+ left: 0,
112
+ right: 0,
113
+ flexDirection: "row",
114
+ justifyContent: "center",
115
+ alignItems: "center"
116
+ },
117
+ bullet: {
118
+ marginHorizontal: 2,
119
+ width: 10,
120
+ height: 10,
121
+ borderRadius: 20,
122
+ backgroundColor: "#000"
123
+ }
124
+ });
125
+ export default withTheme(Carousel);th
126
+ }));
127
+ }
128
+
104
129
  const styles = StyleSheet.create({
105
130
  container: {
106
131
  backgroundColor: "#eee"
@@ -1,5 +1,5 @@
1
1
  import { createContext, useContext } from "react";
2
- export let Direction;
2
+ export var Direction;
3
3
 
4
4
  (function (Direction) {
5
5
  Direction["Horizontal"] = "horizontal";
@@ -1,5 +1,3 @@
1
- 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); }
2
-
3
1
  import React from "react";
4
2
  import { withTheme } from "../theming";
5
3
  import Touchable from "./Touchable";
@@ -18,6 +16,25 @@ const getWidth = numColumns => {
18
16
  };
19
17
 
20
18
  const Card = _ref => {
19
+ let {
20
+ numColumns = 3,
21
+ children,
22
+ onPress,
23
+ style,
24
+ ...rest
25
+ } = _ref;
26
+ const width = getWidth(numColumns);
27
+ return /*#__PURE__*/React.createElement(Touchable, {
28
+ disabled: !onPress,
29
+ onPress: onPress,
30
+ style: [style, {
31
+ width
32
+ }],
33
+ ...rest
34
+ }, children);
35
+ };
36
+
37
+ export default withTheme(Card);ef => {
21
38
  let {
22
39
  numColumns = 3,
23
40
  children,
@@ -1,5 +1,3 @@
1
- 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); }
2
-
3
1
  import * as React from "react";
4
2
  import { View, StyleSheet } from "react-native";
5
3
  import NativeSlider from "@react-native-community/slider";
@@ -73,9 +71,10 @@ function Slider(_ref) {
73
71
  onValueChange(newValue);
74
72
  };
75
73
 
76
- return /*#__PURE__*/React.createElement(View, _extends({
77
- style: [styles.container, style]
78
- }, rest), leftIcon ? /*#__PURE__*/React.createElement(Icon, {
74
+ return /*#__PURE__*/React.createElement(View, {
75
+ style: [styles.container, style],
76
+ ...rest
77
+ }, leftIcon ? /*#__PURE__*/React.createElement(Icon, {
79
78
  color: leftIconThemeColor,
80
79
  name: leftIcon,
81
80
  size: 24
@@ -97,6 +96,24 @@ function Slider(_ref) {
97
96
  }) : null);
98
97
  }
99
98
 
99
+ const styles = StyleSheet.create({
100
+ container: {
101
+ height: 40,
102
+ flexDirection: "row",
103
+ alignItems: "center"
104
+ },
105
+ slider: {
106
+ flex: 1,
107
+ marginHorizontal: 12
108
+ }
109
+ });
110
+ export default withTheme(Slider);Icon ? /*#__PURE__*/React.createElement(Icon, {
111
+ color: rightIconThemeColor,
112
+ name: rightIcon,
113
+ size: 24
114
+ }) : null);
115
+ }
116
+
100
117
  const styles = StyleSheet.create({
101
118
  container: {
102
119
  height: 40,
@@ -50,5 +50,4 @@ export { default as RowHeadlineImageCaption } from "./components/RowHeadlineImag
50
50
  export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIcon";
51
51
  export { default as Slider } from "./components/Slider";
52
52
  export { default as Stepper } from "./components/Stepper";
53
- export { useAuthState } from "./components/useAuthState";
54
- export { default as Markdown } from "./components/Markdown"; // a comment to fix sourcemap comment issue
53
+ export { useAuthState } from "./components/useAuthState"; // a comment to fix sourcemap comment issue
@@ -0,0 +1,33 @@
1
+ import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, CONTAINER_COMPONENT_STYLES_SECTIONS, GROUPS } from "@draftbit/types";
2
+ export const SEED_DATA = {
3
+ name: "FlashList",
4
+ tag: "FlashList",
5
+ description: "Flashlist by Shopify",
6
+ packageName: "@shopify/flash-list",
7
+ category: COMPONENT_TYPES.data,
8
+ stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
9
+ layout: {
10
+ flex: 1
11
+ },
12
+ props: {
13
+ estimatedItemSize: createNumberProp({
14
+ group: GROUPS.basic,
15
+ label: "Est. Item Size",
16
+ description: "Approximate size of the items before rendering.",
17
+ defaultValue: 50,
18
+ step: 1,
19
+ precision: 0
20
+ }),
21
+ horizontal: createStaticBoolProp({
22
+ label: "Horizontal",
23
+ description: "Render list horizontally"
24
+ }),
25
+ inverted: createStaticBoolProp({
26
+ label: "Inverted",
27
+ description: "If true, reverses the direction."
28
+ }),
29
+ numColumns: createNumColumnsType({
30
+ editable: true
31
+ })
32
+ }
33
+ };
@@ -49,4 +49,3 @@ export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIc
49
49
  export { default as Slider } from "./components/Slider";
50
50
  export { default as Stepper } from "./components/Stepper";
51
51
  export { useAuthState } from "./components/useAuthState";
52
- export { default as Markdown } from "./components/Markdown";
@@ -0,0 +1,54 @@
1
+ export declare const SEED_DATA: {
2
+ name: string;
3
+ tag: string;
4
+ description: string;
5
+ packageName: string;
6
+ category: string;
7
+ stylesPanelSections: string[];
8
+ layout: {
9
+ flex: number;
10
+ };
11
+ props: {
12
+ estimatedItemSize: {
13
+ label: string;
14
+ description: string;
15
+ formType: string;
16
+ propType: string;
17
+ group: string;
18
+ defaultValue: null;
19
+ editable: boolean;
20
+ required: boolean;
21
+ step: number;
22
+ };
23
+ horizontal: {
24
+ label: string;
25
+ description: string;
26
+ formType: string;
27
+ propType: string;
28
+ defaultValue: boolean;
29
+ editable: boolean;
30
+ required: boolean;
31
+ group: string;
32
+ };
33
+ inverted: {
34
+ label: string;
35
+ description: string;
36
+ formType: string;
37
+ propType: string;
38
+ defaultValue: boolean;
39
+ editable: boolean;
40
+ required: boolean;
41
+ group: string;
42
+ };
43
+ numColumns: {
44
+ label: string;
45
+ description: string;
46
+ group: string;
47
+ formType: string;
48
+ propType: string;
49
+ defaultValue: number;
50
+ editable: boolean;
51
+ required: boolean;
52
+ };
53
+ };
54
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "46.2.4-70e86e.10+70e86e38",
3
+ "version": "46.2.4-710cbc.10+710cbc93",
4
4
  "description": "Core (non-native) Components",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -46,14 +46,13 @@
46
46
  "@material-ui/pickers": "^3.2.10",
47
47
  "@react-native-community/slider": "4.2.3",
48
48
  "@react-native-picker/picker": "2.4.2",
49
+ "@shopify/flash-list": "1.1.0",
49
50
  "color": "^3.1.2",
50
51
  "date-fns": "^2.16.1",
51
52
  "dateformat": "^3.0.3",
52
53
  "lodash.isnumber": "^3.0.3",
53
54
  "lodash.omit": "^4.5.0",
54
55
  "lodash.tonumber": "^4.0.3",
55
- "react-native-markdown-display": "^7.0.0-alpha.2",
56
- "react-native-markdown-package": "^1.8.2",
57
56
  "react-native-modal-datetime-picker": "^13.0.0",
58
57
  "react-native-svg": "12.3.0",
59
58
  "react-native-typography": "^1.4.1",
@@ -82,5 +81,5 @@
82
81
  ]
83
82
  ]
84
83
  },
85
- "gitHead": "70e86e38470d1aa32cd3a90888166a0c61db9b1a"
84
+ "gitHead": "710cbc93659ee88f995f95167ad63f445cb48a19"
86
85
  }
package/src/index.js CHANGED
@@ -50,5 +50,4 @@ export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIc
50
50
  export { default as Slider } from "./components/Slider";
51
51
  export { default as Stepper } from "./components/Stepper";
52
52
  export { useAuthState } from "./components/useAuthState";
53
- export { default as Markdown } from "./components/Markdown";
54
53
  // a comment to fix sourcemap comment issue
package/src/index.tsx CHANGED
@@ -70,6 +70,5 @@ export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIc
70
70
  export { default as Slider } from "./components/Slider";
71
71
  export { default as Stepper } from "./components/Stepper";
72
72
  export { useAuthState } from "./components/useAuthState";
73
- export { default as Markdown } from "./components/Markdown";
74
73
 
75
74
  // a comment to fix sourcemap comment issue
@@ -0,0 +1,33 @@
1
+ import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, CONTAINER_COMPONENT_STYLES_SECTIONS, GROUPS, } from "@draftbit/types";
2
+ export const SEED_DATA = {
3
+ name: "FlashList",
4
+ tag: "FlashList",
5
+ description: "Flashlist by Shopify",
6
+ packageName: "@shopify/flash-list",
7
+ category: COMPONENT_TYPES.data,
8
+ stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
9
+ layout: {
10
+ flex: 1,
11
+ },
12
+ props: {
13
+ estimatedItemSize: createNumberProp({
14
+ group: GROUPS.basic,
15
+ label: "Est. Item Size",
16
+ description: "Approximate size of the items before rendering.",
17
+ defaultValue: 50,
18
+ step: 1,
19
+ precision: 0,
20
+ }),
21
+ horizontal: createStaticBoolProp({
22
+ label: "Horizontal",
23
+ description: "Render list horizontally",
24
+ }),
25
+ inverted: createStaticBoolProp({
26
+ label: "Inverted",
27
+ description: "If true, reverses the direction.",
28
+ }),
29
+ numColumns: createNumColumnsType({
30
+ editable: true,
31
+ }),
32
+ },
33
+ };
@@ -0,0 +1,41 @@
1
+ import {
2
+ COMPONENT_TYPES,
3
+ createNumColumnsType,
4
+ createStaticBoolProp,
5
+ createNumberProp,
6
+ CONTAINER_COMPONENT_STYLES_SECTIONS,
7
+ GROUPS,
8
+ } from "@draftbit/types";
9
+
10
+ export const SEED_DATA = {
11
+ name: "FlashList",
12
+ tag: "FlashList",
13
+ description: "Flashlist by Shopify",
14
+ packageName: "@shopify/flash-list",
15
+ category: COMPONENT_TYPES.data,
16
+ stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
17
+ layout: {
18
+ flex: 1,
19
+ },
20
+ props: {
21
+ estimatedItemSize: createNumberProp({
22
+ group: GROUPS.basic,
23
+ label: "Est. Item Size",
24
+ description: "Approximate size of the items before rendering.",
25
+ defaultValue: 50,
26
+ step: 1,
27
+ precision: 0,
28
+ }),
29
+ horizontal: createStaticBoolProp({
30
+ label: "Horizontal",
31
+ description: "Render list horizontally",
32
+ }),
33
+ inverted: createStaticBoolProp({
34
+ label: "Inverted",
35
+ description: "If true, reverses the direction.",
36
+ }),
37
+ numColumns: createNumColumnsType({
38
+ editable: true,
39
+ }),
40
+ },
41
+ };
@@ -1,78 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var React = _interopRequireWildcard(require("react"));
9
-
10
- var _reactNativeMarkdownPackage = _interopRequireDefault(require("react-native-markdown-package"));
11
-
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
-
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
-
18
- // @ts-ignore
19
- const MarkdownComponent = _ref => {
20
- let {
21
- content
22
- } = _ref;
23
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_reactNativeMarkdownPackage.default, {
24
- styles: markdownStyle.collectiveMd
25
- }, content));
26
- };
27
-
28
- const markdownStyle = {
29
- singleLineMd: {
30
- text: {
31
- color: "blue",
32
- textAlign: "right"
33
- },
34
- view: {
35
- alignSelf: "stretch"
36
- }
37
- },
38
- collectiveMd: {
39
- heading1: {
40
- color: "red"
41
- },
42
- heading2: {
43
- color: "green",
44
- textAlign: "right"
45
- },
46
- strong: {
47
- color: "blue"
48
- },
49
- em: {
50
- color: "cyan"
51
- },
52
- text: {
53
- color: "black"
54
- },
55
- blockQuoteText: {
56
- color: "grey"
57
- },
58
- blockQuoteSection: {
59
- flexDirection: "row"
60
- },
61
- blockQuoteSectionBar: {
62
- width: 3,
63
- height: null,
64
- backgroundColor: "#DDDDDD",
65
- marginRight: 15
66
- },
67
- codeBlock: {
68
- fontFamily: "Courier",
69
- fontWeight: "500",
70
- backgroundColor: "#DDDDDD"
71
- },
72
- tableHeader: {
73
- backgroundColor: "grey"
74
- }
75
- }
76
- };
77
- var _default = MarkdownComponent;
78
- exports.default = _default;
@@ -1,23 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.SEED_DATA = void 0;
7
-
8
- var _types = require("@draftbit/types");
9
-
10
- const SEED_DATA = {
11
- name: "Markdown",
12
- tag: "MarkdownComponent",
13
- description: "A markdown component",
14
- category: _types.COMPONENT_TYPES.basic,
15
- props: {
16
- content: (0, _types.createTextProp)({
17
- label: "Markdown Text",
18
- description: "Markdown Text",
19
- defaultValue: null
20
- })
21
- }
22
- };
23
- exports.SEED_DATA = SEED_DATA;
@@ -1,63 +0,0 @@
1
- import * as React from "react"; // @ts-ignore
2
-
3
- import Markdown from "react-native-markdown-package";
4
-
5
- const MarkdownComponent = _ref => {
6
- let {
7
- content
8
- } = _ref;
9
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Markdown, {
10
- styles: markdownStyle.collectiveMd
11
- }, content));
12
- };
13
-
14
- const markdownStyle = {
15
- singleLineMd: {
16
- text: {
17
- color: "blue",
18
- textAlign: "right"
19
- },
20
- view: {
21
- alignSelf: "stretch"
22
- }
23
- },
24
- collectiveMd: {
25
- heading1: {
26
- color: "red"
27
- },
28
- heading2: {
29
- color: "green",
30
- textAlign: "right"
31
- },
32
- strong: {
33
- color: "blue"
34
- },
35
- em: {
36
- color: "cyan"
37
- },
38
- text: {
39
- color: "black"
40
- },
41
- blockQuoteText: {
42
- color: "grey"
43
- },
44
- blockQuoteSection: {
45
- flexDirection: "row"
46
- },
47
- blockQuoteSectionBar: {
48
- width: 3,
49
- height: null,
50
- backgroundColor: "#DDDDDD",
51
- marginRight: 15
52
- },
53
- codeBlock: {
54
- fontFamily: "Courier",
55
- fontWeight: "500",
56
- backgroundColor: "#DDDDDD"
57
- },
58
- tableHeader: {
59
- backgroundColor: "grey"
60
- }
61
- }
62
- };
63
- export default MarkdownComponent;
@@ -1,14 +0,0 @@
1
- import { COMPONENT_TYPES, createTextProp } from "@draftbit/types";
2
- export const SEED_DATA = {
3
- name: "Markdown",
4
- tag: "MarkdownComponent",
5
- description: "A markdown component",
6
- category: COMPONENT_TYPES.basic,
7
- props: {
8
- content: createTextProp({
9
- label: "Markdown Text",
10
- description: "Markdown Text",
11
- defaultValue: null
12
- })
13
- }
14
- };
@@ -1,6 +0,0 @@
1
- import * as React from "react";
2
- declare type Props = {
3
- content?: string;
4
- };
5
- declare const MarkdownComponent: React.FC<Props>;
6
- export default MarkdownComponent;
@@ -1,9 +0,0 @@
1
- export declare const SEED_DATA: {
2
- name: string;
3
- tag: string;
4
- description: string;
5
- category: string;
6
- props: {
7
- content: any;
8
- };
9
- };
@@ -1,57 +0,0 @@
1
- import * as React from "react";
2
- // @ts-ignore
3
- import Markdown from "react-native-markdown-package";
4
- const MarkdownComponent = ({ content }) => {
5
- return (React.createElement(React.Fragment, null,
6
- React.createElement(Markdown, { styles: markdownStyle.collectiveMd }, content)));
7
- };
8
- const markdownStyle = {
9
- singleLineMd: {
10
- text: {
11
- color: "blue",
12
- textAlign: "right",
13
- },
14
- view: {
15
- alignSelf: "stretch",
16
- },
17
- },
18
- collectiveMd: {
19
- heading1: {
20
- color: "red",
21
- },
22
- heading2: {
23
- color: "green",
24
- textAlign: "right",
25
- },
26
- strong: {
27
- color: "blue",
28
- },
29
- em: {
30
- color: "cyan",
31
- },
32
- text: {
33
- color: "black",
34
- },
35
- blockQuoteText: {
36
- color: "grey",
37
- },
38
- blockQuoteSection: {
39
- flexDirection: "row",
40
- },
41
- blockQuoteSectionBar: {
42
- width: 3,
43
- height: null,
44
- backgroundColor: "#DDDDDD",
45
- marginRight: 15,
46
- },
47
- codeBlock: {
48
- fontFamily: "Courier",
49
- fontWeight: "500",
50
- backgroundColor: "#DDDDDD",
51
- },
52
- tableHeader: {
53
- backgroundColor: "grey",
54
- },
55
- },
56
- };
57
- export default MarkdownComponent;
@@ -1,70 +0,0 @@
1
- import * as React from "react";
2
- // @ts-ignore
3
- import Markdown from "react-native-markdown-package";
4
-
5
- type Props = {
6
- content?: string;
7
- };
8
-
9
- const MarkdownComponent: React.FC<Props> = ({ content }) => {
10
- return (
11
- <>
12
- {
13
- // @ts-ignore
14
- }
15
- <Markdown styles={markdownStyle.collectiveMd}>{content}</Markdown>
16
- </>
17
- );
18
- };
19
-
20
- const markdownStyle = {
21
- singleLineMd: {
22
- text: {
23
- color: "blue",
24
- textAlign: "right",
25
- },
26
- view: {
27
- alignSelf: "stretch",
28
- },
29
- },
30
- collectiveMd: {
31
- heading1: {
32
- color: "red",
33
- },
34
- heading2: {
35
- color: "green",
36
- textAlign: "right",
37
- },
38
- strong: {
39
- color: "blue",
40
- },
41
- em: {
42
- color: "cyan",
43
- },
44
- text: {
45
- color: "black",
46
- },
47
- blockQuoteText: {
48
- color: "grey",
49
- },
50
- blockQuoteSection: {
51
- flexDirection: "row",
52
- },
53
- blockQuoteSectionBar: {
54
- width: 3,
55
- height: null,
56
- backgroundColor: "#DDDDDD",
57
- marginRight: 15,
58
- },
59
- codeBlock: {
60
- fontFamily: "Courier",
61
- fontWeight: "500",
62
- backgroundColor: "#DDDDDD",
63
- },
64
- tableHeader: {
65
- backgroundColor: "grey",
66
- },
67
- },
68
- };
69
-
70
- export default MarkdownComponent;
@@ -1,14 +0,0 @@
1
- import { COMPONENT_TYPES, createTextProp } from "@draftbit/types";
2
- export const SEED_DATA = {
3
- name: "Markdown",
4
- tag: "MarkdownComponent",
5
- description: "A markdown component",
6
- category: COMPONENT_TYPES.basic,
7
- props: {
8
- content: createTextProp({
9
- label: "Markdown Text",
10
- description: "Markdown Text",
11
- defaultValue: null,
12
- }),
13
- },
14
- };
@@ -1,15 +0,0 @@
1
- import { COMPONENT_TYPES, createTextProp } from "@draftbit/types";
2
-
3
- export const SEED_DATA = {
4
- name: "Markdown",
5
- tag: "MarkdownComponent",
6
- description: "A markdown component",
7
- category: COMPONENT_TYPES.basic,
8
- props: {
9
- content: createTextProp({
10
- label: "Markdown Text",
11
- description: "Markdown Text",
12
- defaultValue: null,
13
- }),
14
- },
15
- };