@draftbit/core 46.4.4-65cd42.2 → 46.4.4-6af1ae.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.
Files changed (33) hide show
  1. package/lib/commonjs/components/Youtube.js +66 -0
  2. package/lib/commonjs/index.js +7 -7
  3. package/lib/commonjs/mappings/Youtube.js +40 -0
  4. package/lib/module/components/Banner.js +25 -4
  5. package/lib/module/components/Checkbox/CheckboxRow.js +24 -6
  6. package/lib/module/components/CircleImage.js +16 -1
  7. package/lib/module/components/Picker/PickerComponent.web.js +19 -4
  8. package/lib/module/components/Portal/PortalHost.js +45 -15
  9. package/lib/module/components/ScreenContainer.js +21 -4
  10. package/lib/module/components/Switch.js +21 -10
  11. package/lib/module/components/Youtube.js +57 -0
  12. package/lib/module/index.js +1 -1
  13. package/lib/module/mappings/Youtube.js +33 -0
  14. package/lib/typescript/src/components/Youtube.d.ts +44 -0
  15. package/lib/typescript/src/index.d.ts +1 -1
  16. package/lib/typescript/src/mappings/Youtube.d.ts +36 -0
  17. package/package.json +6 -6
  18. package/src/components/Youtube.js +38 -0
  19. package/src/components/Youtube.tsx +66 -0
  20. package/src/index.js +1 -1
  21. package/src/index.tsx +1 -1
  22. package/src/mappings/Youtube.js +33 -0
  23. package/src/mappings/Youtube.ts +39 -0
  24. package/lib/commonjs/components/Markdown.js +0 -27
  25. package/lib/commonjs/mappings/Markdown.js +0 -21
  26. package/lib/module/components/Markdown.js +0 -16
  27. package/lib/module/mappings/Markdown.js +0 -14
  28. package/lib/typescript/src/components/Markdown.d.ts +0 -6
  29. package/lib/typescript/src/mappings/Markdown.d.ts +0 -9
  30. package/src/components/Markdown.js +0 -12
  31. package/src/components/Markdown.tsx +0 -25
  32. package/src/mappings/Markdown.js +0 -14
  33. package/src/mappings/Markdown.ts +0 -15
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.SEED_DATA = void 0;
7
+ var _types = require("@draftbit/types");
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _reactNativeYoutubeIframe = _interopRequireDefault(require("react-native-youtube-iframe"));
10
+ var _utilities = require("../utilities");
11
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
+ const Youtube = _ref => {
13
+ let {
14
+ videoId,
15
+ playlist,
16
+ style,
17
+ mute,
18
+ autoplay
19
+ } = _ref;
20
+ const {
21
+ viewStyles: {
22
+ height,
23
+ width
24
+ }
25
+ } = (0, _utilities.extractStyles)(style);
26
+ return /*#__PURE__*/_react.default.createElement(_reactNativeYoutubeIframe.default, {
27
+ height: height,
28
+ width: width,
29
+ play: autoplay,
30
+ videoId: videoId,
31
+ playList: playlist,
32
+ mute: mute
33
+ });
34
+ };
35
+ var _default = Youtube;
36
+ exports.default = _default;
37
+ const SEED_DATA = {
38
+ name: "Youtube",
39
+ tag: "Youtube",
40
+ description: "Youtube Component",
41
+ category: _types.COMPONENT_TYPES.media,
42
+ layout: {
43
+ width: "100%"
44
+ },
45
+ props: {
46
+ videoId: (0, _types.createTextProp)({
47
+ label: "VideoId",
48
+ description: "Youtube Video ID"
49
+ }),
50
+ playlist: (0, _types.createTextProp)({
51
+ label: "PlayList",
52
+ description: "Playlist ID"
53
+ }),
54
+ mute: (0, _types.createBoolProp)({
55
+ label: "Mute",
56
+ description: "Whether to mute video",
57
+ defaultValue: false
58
+ }),
59
+ autoplay: (0, _types.createBoolProp)({
60
+ label: "Autoplay",
61
+ description: "Whether to Autoplay video",
62
+ defaultValue: false
63
+ })
64
+ }
65
+ };
66
+ exports.SEED_DATA = SEED_DATA;
@@ -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 () {
@@ -399,6 +393,12 @@ Object.defineProperty(exports, "Touchable", {
399
393
  return _Touchable.default;
400
394
  }
401
395
  });
396
+ Object.defineProperty(exports, "Youtube", {
397
+ enumerable: true,
398
+ get: function () {
399
+ return _Youtube.default;
400
+ }
401
+ });
402
402
  Object.defineProperty(exports, "injectIcon", {
403
403
  enumerable: true,
404
404
  get: function () {
@@ -466,7 +466,7 @@ var _RowHeadlineImageIcon = _interopRequireDefault(require("./components/RowHead
466
466
  var _Slider = _interopRequireDefault(require("./components/Slider"));
467
467
  var _Stepper = _interopRequireDefault(require("./components/Stepper"));
468
468
  var _useAuthState = require("./components/useAuthState");
469
- var _Markdown = _interopRequireDefault(require("./components/Markdown"));
469
+ var _Youtube = _interopRequireDefault(require("./components/Youtube"));
470
470
  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); }
471
471
  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; }
472
472
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SEED_DATA = void 0;
7
+ var _types = require("@draftbit/types");
8
+ const SEED_DATA = {
9
+ name: "Youtube",
10
+ tag: "Youtube",
11
+ description: "Given a VideoId orPlaylist and play Youtube video",
12
+ doc_link: "https://lonelycpp.github.io/react-native-youtube-iframe",
13
+ code_link: "https://github.com/LonelyCpp/react-native-youtube-iframe",
14
+ category: _types.COMPONENT_TYPES.media,
15
+ stylesPanelSections: [_types.StylesPanelSections.Size, _types.StylesPanelSections.Position],
16
+ layout: {
17
+ height: 250
18
+ },
19
+ props: {
20
+ videoId: (0, _types.createTextProp)({
21
+ label: "Video ID",
22
+ description: "VideoId of the Youtube video.",
23
+ defaultValue: "nwMUpDESXrI"
24
+ }),
25
+ playlist: (0, _types.createTextProp)({
26
+ label: "Playlist",
27
+ description: "Playlist of the Youtube videos.",
28
+ defaultValue: "PLUa6TiXzjIrwowt6P-uGCJm8ovm-9S1Ks"
29
+ }),
30
+ mute: (0, _types.createStaticBoolProp)({
31
+ label: "Mute Audio",
32
+ description: "Mute the audio of the video."
33
+ }),
34
+ autoplay: (0, _types.createStaticBoolProp)({
35
+ label: "Auto Play",
36
+ description: "Autoplay the video on load."
37
+ })
38
+ }
39
+ };
40
+ exports.SEED_DATA = SEED_DATA;
@@ -1,4 +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
1
  import * as React from "react";
3
2
  import { Button, Text, View, StyleSheet, Animated } from "react-native";
4
3
  import Surface from "./Surface";
@@ -61,7 +60,6 @@ const Banner = _ref => {
61
60
  measured: true
62
61
  });
63
62
  };
64
-
65
63
  // The banner animation has 2 parts:
66
64
  // 1. Blank spacer element which animates its height to move the content
67
65
  // 2. Actual banner which animates its translateY
@@ -71,9 +69,10 @@ const Banner = _ref => {
71
69
  // However we can't animated banner's height directly as it'll also resize the content inside
72
70
  const height = Animated.multiply(position, layout.height);
73
71
  const translateY = Animated.multiply(Animated.add(position, -1), layout.height);
74
- return /*#__PURE__*/React.createElement(Surface, _extends({}, rest, {
72
+ return /*#__PURE__*/React.createElement(Surface, {
73
+ ...rest,
75
74
  style: [styles.container, shadow(ELEVATION), style]
76
- }), /*#__PURE__*/React.createElement(View, {
75
+ }, /*#__PURE__*/React.createElement(View, {
77
76
  style: [styles.wrapper, contentStyle]
78
77
  }, /*#__PURE__*/React.createElement(Animated.View, {
79
78
  style: {
@@ -154,4 +153,26 @@ const styles = StyleSheet.create({
154
153
  margin: 8
155
154
  }
156
155
  });
156
+ export default withTheme(Banner);
157
+ },
158
+ content: {
159
+ flexDirection: "row",
160
+ justifyContent: "flex-start",
161
+ marginHorizontal: 8,
162
+ marginTop: 16,
163
+ marginBottom: 0
164
+ },
165
+ icon: {
166
+ margin: 8
167
+ },
168
+ message: {
169
+ flex: 1,
170
+ margin: 8
171
+ },
172
+ actions: {
173
+ flexDirection: "row",
174
+ justifyContent: "flex-end",
175
+ margin: 8
176
+ }
177
+ });
157
178
  export default withTheme(Banner);
@@ -1,4 +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
1
  import * as React from "react";
3
2
  import { StyleSheet, View, Platform } from "react-native";
4
3
  import { isString } from "lodash";
@@ -7,7 +6,7 @@ import { usePrevious } from "../../hooks";
7
6
  import Text from "../Text";
8
7
  import Touchable from "../Touchable";
9
8
  import Checkbox from "./Checkbox";
10
- export let Direction;
9
+ export var Direction;
11
10
  (function (Direction) {
12
11
  Direction["Row"] = "row";
13
12
  Direction["RowReverse"] = "row-reverse";
@@ -49,7 +48,6 @@ const CheckboxRow = _ref => {
49
48
  setInternalValue(status);
50
49
  }
51
50
  }, [status]);
52
-
53
51
  // This special logic is to handle weird APIs like Airtable that return
54
52
  // true or undefined for a boolean
55
53
  const previousDefaultValue = usePrevious(defaultValue);
@@ -73,13 +71,14 @@ const CheckboxRow = _ref => {
73
71
  textStyles,
74
72
  viewStyles
75
73
  } = extractStyles(style);
76
- return /*#__PURE__*/React.createElement(Touchable, _extends({
74
+ return /*#__PURE__*/React.createElement(Touchable, {
77
75
  onPress: handlePress,
78
76
  style: [viewStyles, styles.mainParent, {
79
77
  flexDirection: direction
80
78
  }],
81
- disabled: disabled
82
- }, rest), /*#__PURE__*/React.createElement(View, {
79
+ disabled: disabled,
80
+ ...rest
81
+ }, /*#__PURE__*/React.createElement(View, {
83
82
  style: [styles.label, {
84
83
  alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
85
84
  }, labelContainerStyle]
@@ -115,4 +114,23 @@ const styles = StyleSheet.create({
115
114
  flex: 3
116
115
  }
117
116
  });
117
+ export default CheckboxRow;heet.create({
118
+ mainParent: {
119
+ alignItems: "center",
120
+ justifyContent: "space-around",
121
+ paddingStart: 20,
122
+ minHeight: 50,
123
+ paddingEnd: 20,
124
+ display: "flex",
125
+ ...Platform.select({
126
+ web: {
127
+ cursor: "pointer",
128
+ userSelect: "none"
129
+ }
130
+ })
131
+ },
132
+ label: {
133
+ flex: 3
134
+ }
135
+ });
118
136
  export default CheckboxRow;
@@ -1,4 +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
1
  import * as React from "react";
3
2
  import { Image } from "react-native";
4
3
  import Config from "./Config";
@@ -10,6 +9,22 @@ const CircleImage = _ref => {
10
9
  ...props
11
10
  } = _ref;
12
11
  const borderRadius = size / 2;
12
+ return /*#__PURE__*/React.createElement(Image, {
13
+ style: [{
14
+ width: size,
15
+ height: size,
16
+ borderRadius
17
+ }, style],
18
+ source: typeof source === "string" ? {
19
+ uri: source
20
+ } : source,
21
+ resizeMode: "cover",
22
+ ...props
23
+ });
24
+ };
25
+ export default CircleImage;props
26
+ } = _ref;
27
+ const borderRadius = size / 2;
13
28
  return /*#__PURE__*/React.createElement(Image, _extends({
14
29
  style: [{
15
30
  width: size,
@@ -1,4 +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
1
  import * as React from "react";
3
2
  import { View, StyleSheet } from "react-native";
4
3
  import { Picker as NativePicker } from "@react-native-picker/picker";
@@ -8,7 +7,6 @@ import { extractStyles } from "../../utilities";
8
7
  import TextField from "../TextField";
9
8
  import Touchable from "../Touchable";
10
9
  const Picker = _ref => {
11
- var _options$find;
12
10
  let {
13
11
  style,
14
12
  options,
@@ -18,6 +16,7 @@ const Picker = _ref => {
18
16
  onValueChange: onValueChangeOverride = () => {},
19
17
  ...props
20
18
  } = _ref;
19
+ var _a, _b;
21
20
  const {
22
21
  viewStyles: {
23
22
  borderRadius,
@@ -62,7 +61,7 @@ const Picker = _ref => {
62
61
  };
63
62
 
64
63
  const stylesWithoutMargin = style && omit(StyleSheet.flatten(style), ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft"]);
65
- const selectedLabel = selectedValue && (((_options$find = options.find(o => o.value === selectedValue)) === null || _options$find === void 0 ? void 0 : _options$find.label) ?? selectedValue);
64
+ const selectedLabel = selectedValue && ((_b = (_a = options.find(o => o.value === selectedValue)) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : selectedValue);
66
65
  return /*#__PURE__*/React.createElement(Touchable, {
67
66
  disabled: disabled,
68
67
  onPress: toggleFocus,
@@ -87,7 +86,23 @@ const Picker = _ref => {
87
86
  key: o.value
88
87
  }))), /*#__PURE__*/React.createElement(View, {
89
88
  pointerEvents: "none"
90
- }, /*#__PURE__*/React.createElement(TextField, _extends({}, props, {
89
+ }, /*#__PURE__*/React.createElement(TextField, {
90
+ ...props,
91
+ value: selectedLabel,
92
+ placeholder: placeholder,
93
+ // @ts-ignore
94
+ ref: textField,
95
+ disabled: disabled,
96
+ // @ts-expect-error
97
+ style: stylesWithoutMargin
98
+ }))));
99
+ };
100
+ const styles = StyleSheet.create({
101
+ container: {
102
+ alignSelf: "stretch"
103
+ }
104
+ });
105
+ export default withTheme(Picker);ct.createElement(TextField, _extends({}, props, {
91
106
  value: selectedLabel,
92
107
  placeholder: placeholder
93
108
  // @ts-ignore
@@ -1,11 +1,7 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
4
1
  import * as React from "react";
5
2
  import { View, StyleSheet } from "react-native";
6
3
  import PortalManager from "./PortalManager";
7
4
  export const PortalContext = /*#__PURE__*/React.createContext(null);
8
-
9
5
  /**
10
6
  * Portal host renders all of its children `Portal` elements.
11
7
  * For example, you can wrap a screen in `Portal.Host` to render items above the screen.
@@ -33,10 +29,10 @@ export const PortalContext = /*#__PURE__*/React.createContext(null);
33
29
  export default class PortalHost extends React.Component {
34
30
  constructor() {
35
31
  super(...arguments);
36
- _defineProperty(this, "setManager", manager => {
32
+ this.setManager = manager => {
37
33
  this.manager = manager;
38
- });
39
- _defineProperty(this, "mount", children => {
34
+ };
35
+ this.mount = children => {
40
36
  const key = this.nextKey++;
41
37
  if (this.manager) {
42
38
  this.manager.mount(key, children);
@@ -48,8 +44,8 @@ export default class PortalHost extends React.Component {
48
44
  });
49
45
  }
50
46
  return key;
51
- });
52
- _defineProperty(this, "update", (key, children) => {
47
+ };
48
+ this.update = (key, children) => {
53
49
  if (this.manager) {
54
50
  this.manager.update(key, children);
55
51
  } else {
@@ -66,8 +62,8 @@ export default class PortalHost extends React.Component {
66
62
  this.queue.push(op);
67
63
  }
68
64
  }
69
- });
70
- _defineProperty(this, "unmount", key => {
65
+ };
66
+ this.unmount = key => {
71
67
  if (this.manager) {
72
68
  this.manager.unmount(key);
73
69
  } else {
@@ -76,10 +72,9 @@ export default class PortalHost extends React.Component {
76
72
  key
77
73
  });
78
74
  }
79
- });
80
- _defineProperty(this, "nextKey", 0);
81
- _defineProperty(this, "queue", []);
82
- _defineProperty(this, "manager", void 0);
75
+ };
76
+ this.nextKey = 0;
77
+ this.queue = [];
83
78
  }
84
79
  componentDidMount() {
85
80
  const manager = this.manager;
@@ -117,6 +112,41 @@ export default class PortalHost extends React.Component {
117
112
  }));
118
113
  }
119
114
  }
115
+ PortalHost.displayName = "Portal.Host";
116
+ const styles = StyleSheet.create({
117
+ container: {
118
+ flex: 1
119
+ }
120
+ }); switch (action.type) {
121
+ case "mount":
122
+ manager.mount(action.key, action.children);
123
+ break;
124
+ case "update":
125
+ manager.update(action.key, action.children);
126
+ break;
127
+ case "unmount":
128
+ manager.unmount(action.key);
129
+ break;
130
+ }
131
+ }
132
+ }
133
+ }
134
+ render() {
135
+ return /*#__PURE__*/React.createElement(PortalContext.Provider, {
136
+ value: {
137
+ mount: this.mount,
138
+ update: this.update,
139
+ unmount: this.unmount
140
+ }
141
+ }, /*#__PURE__*/React.createElement(View, {
142
+ style: styles.container,
143
+ collapsable: false,
144
+ pointerEvents: "box-none"
145
+ }, this.props.children), /*#__PURE__*/React.createElement(PortalManager, {
146
+ ref: this.setManager
147
+ }));
148
+ }
149
+ }
120
150
  _defineProperty(PortalHost, "displayName", "Portal.Host");
121
151
  const styles = StyleSheet.create({
122
152
  container: {
@@ -1,4 +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
1
  import * as React from "react";
3
2
  import { StyleSheet, ScrollView, View } from "react-native";
4
3
  import { SafeAreaView } from "react-native-safe-area-context";
@@ -22,12 +21,13 @@ function ScreenContainer(_ref) {
22
21
  if (hasSafeArea || hasBottomSafeArea) {
23
22
  edges.push("bottom");
24
23
  }
25
- return /*#__PURE__*/React.createElement(SafeAreaView, _extends({
24
+ return /*#__PURE__*/React.createElement(SafeAreaView, {
26
25
  edges: edges,
27
26
  style: [styles.container, {
28
27
  backgroundColor
29
- }]
30
- }, rest), scrollable ? /*#__PURE__*/React.createElement(ScrollView, {
28
+ }],
29
+ ...rest
30
+ }, scrollable ? /*#__PURE__*/React.createElement(ScrollView, {
31
31
  contentContainerStyle: [styles.scrollViewContainer, {
32
32
  backgroundColor
33
33
  }, style]
@@ -46,4 +46,21 @@ const styles = StyleSheet.create({
46
46
  flex: undefined
47
47
  }
48
48
  });
49
+ export default withTheme(ScreenContainer);olor
50
+ }, style]
51
+ }, children) : /*#__PURE__*/React.createElement(View, {
52
+ style: [styles.container, {
53
+ backgroundColor
54
+ }, style]
55
+ }, children));
56
+ }
57
+ const styles = StyleSheet.create({
58
+ container: {
59
+ flex: 1
60
+ },
61
+ scrollViewContainer: {
62
+ flexGrow: 1,
63
+ flex: undefined
64
+ }
65
+ });
49
66
  export default withTheme(ScreenContainer);
@@ -1,4 +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
1
  import * as React from "react";
3
2
  import { Switch as NativeSwitch } from "react-native";
4
3
  import { withTheme } from "../theming";
@@ -29,7 +28,6 @@ function Switch(_ref) {
29
28
  setChecked(value);
30
29
  }
31
30
  }, [value, checked]);
32
-
33
31
  // This special logic is to handle weird APIs like Airtable that return
34
32
  // true or undefined for a boolean
35
33
  const previousDefaultValue = usePrevious(defaultValue);
@@ -38,24 +36,24 @@ function Switch(_ref) {
38
36
  setChecked(Boolean(defaultValue));
39
37
  }
40
38
  }, [defaultValue, previousDefaultValue]);
41
- return /*#__PURE__*/React.createElement(NativeSwitch, _extends({
39
+ return /*#__PURE__*/React.createElement(NativeSwitch, {
42
40
  value: checked,
43
41
  disabled: disabled,
44
42
  trackColor: {
45
43
  false: inactiveTrackThemeColor,
46
44
  true: activeTrackThemeColor
47
45
  },
48
- thumbColor: value ? activeThumbThemeColor : inactiveThumbThemeColor
46
+ thumbColor: value ? activeThumbThemeColor : inactiveThumbThemeColor,
49
47
  // @ts-ignore react-native-web only
50
- ,
51
48
  activeThumbColor: activeThumbThemeColor,
52
49
  ios_backgroundColor: inactiveTrackThemeColor,
53
50
  style: style,
54
51
  onValueChange: bool => {
55
52
  setChecked(bool);
56
53
  onValueChange && onValueChange(bool);
57
- }
58
- }, rest));
54
+ },
55
+ ...rest
56
+ });
59
57
  }
60
58
  function Row(_ref2) {
61
59
  let {
@@ -84,7 +82,7 @@ function Row(_ref2) {
84
82
  setChecked(defaultValue);
85
83
  }
86
84
  }, [defaultValue]);
87
- return /*#__PURE__*/React.createElement(FormRow, _extends({
85
+ return /*#__PURE__*/React.createElement(FormRow, {
88
86
  disabled: disabled,
89
87
  onPress: () => {
90
88
  setChecked(!checked);
@@ -92,8 +90,9 @@ function Row(_ref2) {
92
90
  },
93
91
  label: label,
94
92
  direction: direction,
95
- style: style
96
- }, rest), /*#__PURE__*/React.createElement(Switch, {
93
+ style: style,
94
+ ...rest
95
+ }, /*#__PURE__*/React.createElement(Switch, {
97
96
  theme: theme,
98
97
  value: checked,
99
98
  disabled: disabled,
@@ -106,4 +105,16 @@ function Row(_ref2) {
106
105
  }
107
106
  const SwitchRow = withTheme(Row);
108
107
  export { SwitchRow };
108
+ export default withTheme(Switch);: theme,
109
+ value: checked,
110
+ disabled: disabled,
111
+ onValueChange: onValueChange,
112
+ activeTrackColor: activeTrackColor,
113
+ inactiveTrackColor: inactiveTrackColor,
114
+ activeThumbColor: activeThumbColor,
115
+ inactiveThumbColor: inactiveThumbColor
116
+ }));
117
+ }
118
+ const SwitchRow = withTheme(Row);
119
+ export { SwitchRow };
109
120
  export default withTheme(Switch);
@@ -0,0 +1,57 @@
1
+ import { COMPONENT_TYPES, createBoolProp, createTextProp } from "@draftbit/types";
2
+ import React from "react";
3
+ import YoutubePlayer from "react-native-youtube-iframe";
4
+ import { extractStyles } from "../utilities";
5
+ const Youtube = _ref => {
6
+ let {
7
+ videoId,
8
+ playlist,
9
+ style,
10
+ mute,
11
+ autoplay
12
+ } = _ref;
13
+ const {
14
+ viewStyles: {
15
+ height,
16
+ width
17
+ }
18
+ } = extractStyles(style);
19
+ return /*#__PURE__*/React.createElement(YoutubePlayer, {
20
+ height: height,
21
+ width: width,
22
+ play: autoplay,
23
+ videoId: videoId,
24
+ playList: playlist,
25
+ mute: mute
26
+ });
27
+ };
28
+ export default Youtube;
29
+ export const SEED_DATA = {
30
+ name: "Youtube",
31
+ tag: "Youtube",
32
+ description: "Youtube Component",
33
+ category: COMPONENT_TYPES.media,
34
+ layout: {
35
+ width: "100%"
36
+ },
37
+ props: {
38
+ videoId: createTextProp({
39
+ label: "VideoId",
40
+ description: "Youtube Video ID"
41
+ }),
42
+ playlist: createTextProp({
43
+ label: "PlayList",
44
+ description: "Playlist ID"
45
+ }),
46
+ mute: createBoolProp({
47
+ label: "Mute",
48
+ description: "Whether to mute video",
49
+ defaultValue: false
50
+ }),
51
+ autoplay: createBoolProp({
52
+ label: "Autoplay",
53
+ description: "Whether to Autoplay video",
54
+ defaultValue: false
55
+ })
56
+ }
57
+ };
@@ -50,6 +50,6 @@ 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";
53
+ export { default as Youtube } from "./components/Youtube";
54
54
 
55
55
  // a comment to fix sourcemap comment issue
@@ -0,0 +1,33 @@
1
+ import { COMPONENT_TYPES, createStaticBoolProp, createTextProp, StylesPanelSections } from "@draftbit/types";
2
+ export const SEED_DATA = {
3
+ name: "Youtube",
4
+ tag: "Youtube",
5
+ description: "Given a VideoId orPlaylist and play Youtube video",
6
+ doc_link: "https://lonelycpp.github.io/react-native-youtube-iframe",
7
+ code_link: "https://github.com/LonelyCpp/react-native-youtube-iframe",
8
+ category: COMPONENT_TYPES.media,
9
+ stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Position],
10
+ layout: {
11
+ height: 250
12
+ },
13
+ props: {
14
+ videoId: createTextProp({
15
+ label: "Video ID",
16
+ description: "VideoId of the Youtube video.",
17
+ defaultValue: "nwMUpDESXrI"
18
+ }),
19
+ playlist: createTextProp({
20
+ label: "Playlist",
21
+ description: "Playlist of the Youtube videos.",
22
+ defaultValue: "PLUa6TiXzjIrwowt6P-uGCJm8ovm-9S1Ks"
23
+ }),
24
+ mute: createStaticBoolProp({
25
+ label: "Mute Audio",
26
+ description: "Mute the audio of the video."
27
+ }),
28
+ autoplay: createStaticBoolProp({
29
+ label: "Auto Play",
30
+ description: "Autoplay the video on load."
31
+ })
32
+ }
33
+ };
@@ -0,0 +1,44 @@
1
+ /// <reference types="react" />
2
+ import { StyleProp, ViewStyle } from "react-native";
3
+ declare type Props = {
4
+ videoId: string;
5
+ playlist: string;
6
+ style: StyleProp<ViewStyle>;
7
+ mute: boolean;
8
+ autoplay: boolean;
9
+ };
10
+ declare const Youtube: ({ videoId, playlist, style, mute, autoplay }: Props) => JSX.Element;
11
+ export default Youtube;
12
+ export declare const SEED_DATA: {
13
+ name: string;
14
+ tag: string;
15
+ description: string;
16
+ category: string;
17
+ layout: {
18
+ width: string;
19
+ };
20
+ props: {
21
+ videoId: any;
22
+ playlist: any;
23
+ mute: {
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
+ autoplay: {
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
+ };
44
+ };
@@ -48,4 +48,4 @@ export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIc
48
48
  export { default as Slider } from "./components/Slider";
49
49
  export { default as Stepper } from "./components/Stepper";
50
50
  export { useAuthState } from "./components/useAuthState";
51
- export { default as Markdown } from "./components/Markdown";
51
+ export { default as Youtube } from "./components/Youtube";
@@ -0,0 +1,36 @@
1
+ export declare const SEED_DATA: {
2
+ name: string;
3
+ tag: string;
4
+ description: string;
5
+ doc_link: string;
6
+ code_link: string;
7
+ category: string;
8
+ stylesPanelSections: string[];
9
+ layout: {
10
+ height: number;
11
+ };
12
+ props: {
13
+ videoId: any;
14
+ playlist: any;
15
+ mute: {
16
+ label: string;
17
+ description: string;
18
+ formType: string;
19
+ propType: string;
20
+ defaultValue: boolean;
21
+ editable: boolean;
22
+ required: boolean;
23
+ group: string;
24
+ };
25
+ autoplay: {
26
+ label: string;
27
+ description: string;
28
+ formType: string;
29
+ propType: string;
30
+ defaultValue: boolean;
31
+ editable: boolean;
32
+ required: boolean;
33
+ group: string;
34
+ };
35
+ };
36
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "46.4.4-65cd42.2+65cd428",
3
+ "version": "46.4.4-6af1ae.2+6af1aed",
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.4.4-65cd42.2+65cd428",
44
+ "@draftbit/types": "^46.4.4-6af1ae.2+6af1aed",
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",
@@ -53,12 +53,12 @@
53
53
  "lodash.isnumber": "^3.0.3",
54
54
  "lodash.omit": "^4.5.0",
55
55
  "lodash.tonumber": "^4.0.3",
56
- "react-native-markdown-display": "^7.0.0-alpha.2",
57
- "react-native-markdown-package": "^1.8.2",
58
56
  "react-native-modal-datetime-picker": "^13.0.0",
59
57
  "react-native-svg": "12.3.0",
60
58
  "react-native-typography": "^1.4.1",
61
- "react-native-web-swiper": "^2.2.3"
59
+ "react-native-web-swiper": "^2.2.3",
60
+ "react-native-web-webview": "^1.0.2",
61
+ "react-native-youtube-iframe": "^2.2.2"
62
62
  },
63
63
  "devDependencies": {
64
64
  "@types/color": "^3.0.1",
@@ -83,5 +83,5 @@
83
83
  ]
84
84
  ]
85
85
  },
86
- "gitHead": "65cd428a38e995b2900296570798fcad70ab711f"
86
+ "gitHead": "6af1aed228e5e0e5ae2ac88c708ea49ba5b59369"
87
87
  }
@@ -0,0 +1,38 @@
1
+ import { COMPONENT_TYPES, createBoolProp, createTextProp, } from "@draftbit/types";
2
+ import React from "react";
3
+ import YoutubePlayer from "react-native-youtube-iframe";
4
+ import { extractStyles } from "../utilities";
5
+ const Youtube = ({ videoId, playlist, style, mute, autoplay }) => {
6
+ const { viewStyles: { height, width }, } = extractStyles(style);
7
+ return (React.createElement(YoutubePlayer, { height: height, width: width, play: autoplay, videoId: videoId, playList: playlist, mute: mute }));
8
+ };
9
+ export default Youtube;
10
+ export const SEED_DATA = {
11
+ name: "Youtube",
12
+ tag: "Youtube",
13
+ description: "Youtube Component",
14
+ category: COMPONENT_TYPES.media,
15
+ layout: {
16
+ width: "100%",
17
+ },
18
+ props: {
19
+ videoId: createTextProp({
20
+ label: "VideoId",
21
+ description: "Youtube Video ID",
22
+ }),
23
+ playlist: createTextProp({
24
+ label: "PlayList",
25
+ description: "Playlist ID",
26
+ }),
27
+ mute: createBoolProp({
28
+ label: "Mute",
29
+ description: "Whether to mute video",
30
+ defaultValue: false,
31
+ }),
32
+ autoplay: createBoolProp({
33
+ label: "Autoplay",
34
+ description: "Whether to Autoplay video",
35
+ defaultValue: false,
36
+ }),
37
+ },
38
+ };
@@ -0,0 +1,66 @@
1
+ import {
2
+ COMPONENT_TYPES,
3
+ createBoolProp,
4
+ createTextProp,
5
+ } from "@draftbit/types";
6
+ import React from "react";
7
+ import { StyleProp, ViewStyle } from "react-native";
8
+ import YoutubePlayer from "react-native-youtube-iframe";
9
+ import { extractStyles } from "../utilities";
10
+
11
+ type Props = {
12
+ videoId: string;
13
+ playlist: string;
14
+ style: StyleProp<ViewStyle>;
15
+ mute: boolean;
16
+ autoplay: boolean;
17
+ };
18
+
19
+ const Youtube = ({ videoId, playlist, style, mute, autoplay }: Props) => {
20
+ const {
21
+ viewStyles: { height, width },
22
+ } = extractStyles(style);
23
+
24
+ return (
25
+ <YoutubePlayer
26
+ height={height}
27
+ width={width}
28
+ play={autoplay}
29
+ videoId={videoId}
30
+ playList={playlist}
31
+ mute={mute}
32
+ />
33
+ );
34
+ };
35
+
36
+ export default Youtube;
37
+
38
+ export const SEED_DATA = {
39
+ name: "Youtube",
40
+ tag: "Youtube",
41
+ description: "Youtube Component",
42
+ category: COMPONENT_TYPES.media,
43
+ layout: {
44
+ width: "100%",
45
+ },
46
+ props: {
47
+ videoId: createTextProp({
48
+ label: "VideoId",
49
+ description: "Youtube Video ID",
50
+ }),
51
+ playlist: createTextProp({
52
+ label: "PlayList",
53
+ description: "Playlist ID",
54
+ }),
55
+ mute: createBoolProp({
56
+ label: "Mute",
57
+ description: "Whether to mute video",
58
+ defaultValue: false,
59
+ }),
60
+ autoplay: createBoolProp({
61
+ label: "Autoplay",
62
+ description: "Whether to Autoplay video",
63
+ defaultValue: false,
64
+ }),
65
+ },
66
+ };
package/src/index.js CHANGED
@@ -49,5 +49,5 @@ 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";
52
+ export { default as Youtube } from "./components/Youtube";
53
53
  // a comment to fix sourcemap comment issue
package/src/index.tsx CHANGED
@@ -69,6 +69,6 @@ export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIc
69
69
  export { default as Slider } from "./components/Slider";
70
70
  export { default as Stepper } from "./components/Stepper";
71
71
  export { useAuthState } from "./components/useAuthState";
72
- export { default as Markdown } from "./components/Markdown";
72
+ export { default as Youtube } from "./components/Youtube";
73
73
 
74
74
  // a comment to fix sourcemap comment issue
@@ -0,0 +1,33 @@
1
+ import { COMPONENT_TYPES, createStaticBoolProp, createTextProp, StylesPanelSections, } from "@draftbit/types";
2
+ export const SEED_DATA = {
3
+ name: "Youtube",
4
+ tag: "Youtube",
5
+ description: "Given a VideoId orPlaylist and play Youtube video",
6
+ doc_link: "https://lonelycpp.github.io/react-native-youtube-iframe",
7
+ code_link: "https://github.com/LonelyCpp/react-native-youtube-iframe",
8
+ category: COMPONENT_TYPES.media,
9
+ stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Position],
10
+ layout: {
11
+ height: 250,
12
+ },
13
+ props: {
14
+ videoId: createTextProp({
15
+ label: "Video ID",
16
+ description: "VideoId of the Youtube video.",
17
+ defaultValue: "nwMUpDESXrI",
18
+ }),
19
+ playlist: createTextProp({
20
+ label: "Playlist",
21
+ description: "Playlist of the Youtube videos.",
22
+ defaultValue: "PLUa6TiXzjIrwowt6P-uGCJm8ovm-9S1Ks",
23
+ }),
24
+ mute: createStaticBoolProp({
25
+ label: "Mute Audio",
26
+ description: "Mute the audio of the video.",
27
+ }),
28
+ autoplay: createStaticBoolProp({
29
+ label: "Auto Play",
30
+ description: "Autoplay the video on load.",
31
+ }),
32
+ },
33
+ };
@@ -0,0 +1,39 @@
1
+ import {
2
+ COMPONENT_TYPES,
3
+ createStaticBoolProp,
4
+ createTextProp,
5
+ StylesPanelSections,
6
+ } from "@draftbit/types";
7
+
8
+ export const SEED_DATA = {
9
+ name: "Youtube",
10
+ tag: "Youtube",
11
+ description: "Given a VideoId orPlaylist and play Youtube video",
12
+ doc_link: "https://lonelycpp.github.io/react-native-youtube-iframe",
13
+ code_link: "https://github.com/LonelyCpp/react-native-youtube-iframe",
14
+ category: COMPONENT_TYPES.media,
15
+ stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Position],
16
+ layout: {
17
+ height: 250,
18
+ },
19
+ props: {
20
+ videoId: createTextProp({
21
+ label: "Video ID",
22
+ description: "VideoId of the Youtube video.",
23
+ defaultValue: "nwMUpDESXrI",
24
+ }),
25
+ playlist: createTextProp({
26
+ label: "Playlist",
27
+ description: "Playlist of the Youtube videos.",
28
+ defaultValue: "PLUa6TiXzjIrwowt6P-uGCJm8ovm-9S1Ks",
29
+ }),
30
+ mute: createStaticBoolProp({
31
+ label: "Mute Audio",
32
+ description: "Mute the audio of the video.",
33
+ }),
34
+ autoplay: createStaticBoolProp({
35
+ label: "Auto Play",
36
+ description: "Autoplay the video on load.",
37
+ }),
38
+ },
39
+ };
@@ -1,27 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var React = _interopRequireWildcard(require("react"));
8
- var _reactNativeMarkdownPackage = _interopRequireDefault(require("react-native-markdown-package"));
9
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
- 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); }
11
- 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; }
12
- // @ts-ignore
13
-
14
- const MarkdownComponent = _ref => {
15
- let {
16
- content
17
- } = _ref;
18
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_reactNativeMarkdownPackage.default, {
19
- styles: markdownStyle
20
- }, content));
21
- };
22
- const markdownStyle = {
23
- singleLineMd: {},
24
- collectiveMd: {}
25
- };
26
- var _default = MarkdownComponent;
27
- exports.default = _default;
@@ -1,21 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.SEED_DATA = void 0;
7
- var _types = require("@draftbit/types");
8
- const SEED_DATA = {
9
- name: "Markdown",
10
- tag: "MarkdownComponent",
11
- description: "A markdown component",
12
- category: _types.COMPONENT_TYPES.basic,
13
- props: {
14
- content: (0, _types.createTextProp)({
15
- label: "Markdown Text",
16
- description: "Markdown Text",
17
- defaultValue: null
18
- })
19
- }
20
- };
21
- exports.SEED_DATA = SEED_DATA;
@@ -1,16 +0,0 @@
1
- import * as React from "react";
2
- // @ts-ignore
3
- import Markdown from "react-native-markdown-package";
4
- const MarkdownComponent = _ref => {
5
- let {
6
- content
7
- } = _ref;
8
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Markdown, {
9
- styles: markdownStyle
10
- }, content));
11
- };
12
- const markdownStyle = {
13
- singleLineMd: {},
14
- collectiveMd: {}
15
- };
16
- 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,12 +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 }, content)));
7
- };
8
- const markdownStyle = {
9
- singleLineMd: {},
10
- collectiveMd: {},
11
- };
12
- export default MarkdownComponent;
@@ -1,25 +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}>{content}</Markdown>
16
- </>
17
- );
18
- };
19
-
20
- const markdownStyle = {
21
- singleLineMd: {},
22
- collectiveMd: {},
23
- };
24
-
25
- 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
- };