@draftbit/core 46.8.2-2fe7f4.2 → 46.8.2-387722.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 (56) hide show
  1. package/lib/commonjs/components/Accordion/AccordionItem.js +4 -23
  2. package/lib/commonjs/components/Markdown.js +30 -0
  3. package/lib/commonjs/index.js +7 -13
  4. package/lib/commonjs/mappings/FlashList.js +2 -8
  5. package/lib/commonjs/mappings/Markdown.js +27 -0
  6. package/lib/module/components/AspectRatio.js +18 -1
  7. package/lib/module/components/Markdown.js +20 -0
  8. package/lib/module/index.js +1 -1
  9. package/lib/module/mappings/FlashList.js +3 -9
  10. package/lib/module/mappings/Markdown.js +20 -0
  11. package/lib/typescript/src/components/Markdown.d.ts +8 -0
  12. package/lib/typescript/src/components/Markdown.d.ts.map +1 -0
  13. package/lib/typescript/src/index.d.ts +1 -1
  14. package/lib/typescript/src/index.d.ts.map +1 -1
  15. package/lib/typescript/src/mappings/FlashList.d.ts +0 -6
  16. package/lib/typescript/src/mappings/FlashList.d.ts.map +1 -1
  17. package/lib/typescript/src/mappings/{TabViewItem.d.ts → Markdown.d.ts} +5 -10
  18. package/lib/typescript/src/mappings/Markdown.d.ts.map +1 -0
  19. package/package.json +4 -5
  20. package/src/components/Markdown.js +10 -0
  21. package/src/components/Markdown.tsx +22 -0
  22. package/src/index.js +1 -1
  23. package/src/index.tsx +1 -1
  24. package/src/mappings/FlashList.js +9 -9
  25. package/src/mappings/FlashList.ts +9 -9
  26. package/src/mappings/Markdown.js +25 -0
  27. package/src/mappings/Markdown.ts +32 -0
  28. package/lib/commonjs/components/TabView/TabView.js +0 -132
  29. package/lib/commonjs/components/TabView/TabViewItem.js +0 -25
  30. package/lib/commonjs/components/TabView/index.js +0 -20
  31. package/lib/commonjs/mappings/TabView.js +0 -77
  32. package/lib/commonjs/mappings/TabViewItem.js +0 -37
  33. package/lib/module/components/TabView/TabView.js +0 -123
  34. package/lib/module/components/TabView/TabViewItem.js +0 -20
  35. package/lib/module/components/TabView/index.js +0 -2
  36. package/lib/module/mappings/TabView.js +0 -70
  37. package/lib/module/mappings/TabViewItem.js +0 -30
  38. package/lib/typescript/src/components/TabView/TabView.d.ts +0 -26
  39. package/lib/typescript/src/components/TabView/TabView.d.ts.map +0 -1
  40. package/lib/typescript/src/components/TabView/TabViewItem.d.ts +0 -11
  41. package/lib/typescript/src/components/TabView/TabViewItem.d.ts.map +0 -1
  42. package/lib/typescript/src/components/TabView/index.d.ts +0 -3
  43. package/lib/typescript/src/components/TabView/index.d.ts.map +0 -1
  44. package/lib/typescript/src/mappings/TabView.d.ts +0 -126
  45. package/lib/typescript/src/mappings/TabView.d.ts.map +0 -1
  46. package/lib/typescript/src/mappings/TabViewItem.d.ts.map +0 -1
  47. package/src/components/TabView/TabView.js +0 -61
  48. package/src/components/TabView/TabView.tsx +0 -161
  49. package/src/components/TabView/TabViewItem.js +0 -11
  50. package/src/components/TabView/TabViewItem.tsx +0 -25
  51. package/src/components/TabView/index.js +0 -2
  52. package/src/components/TabView/index.tsx +0 -2
  53. package/src/mappings/TabView.js +0 -76
  54. package/src/mappings/TabView.ts +0 -86
  55. package/src/mappings/TabViewItem.js +0 -30
  56. package/src/mappings/TabViewItem.ts +0 -38
@@ -12,6 +12,7 @@ var _theming = require("../../theming");
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
13
  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); }
14
14
  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; }
15
+ 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); }
15
16
  const AccordionItem = _ref => {
16
17
  let {
17
18
  Icon,
@@ -26,10 +27,9 @@ const AccordionItem = _ref => {
26
27
  textStyles,
27
28
  viewStyles
28
29
  } = (0, _utilities.extractStyles)(style);
29
- return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
30
- style: [styles.container, viewStyles],
31
- ...rest
32
- }, /*#__PURE__*/React.createElement(_reactNative.View, {
30
+ return /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({
31
+ style: [styles.container, viewStyles]
32
+ }, rest), /*#__PURE__*/React.createElement(_reactNative.View, {
33
33
  style: styles.row
34
34
  }, icon ? /*#__PURE__*/React.createElement(Icon, {
35
35
  name: icon,
@@ -61,23 +61,4 @@ const styles = _reactNative.StyleSheet.create({
61
61
  }
62
62
  });
63
63
  var _default = (0, _theming.withTheme)(AccordionItem);
64
- exports.default = _default;.StyleSheet.create({
65
- container: {
66
- padding: 8
67
- },
68
- row: {
69
- flexDirection: "row",
70
- alignItems: "center",
71
- paddingLeft: 8
72
- },
73
- item: {
74
- marginVertical: 6,
75
- paddingLeft: 8
76
- },
77
- content: {
78
- flex: 1,
79
- justifyContent: "center"
80
- }
81
- });
82
- var _default = (0, _theming.withTheme)(AccordionItem);
83
64
  exports.default = _default;
@@ -0,0 +1,30 @@
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 _reactNative = require("react-native");
9
+ var _reactNativeMarkdownDisplay = _interopRequireDefault(require("react-native-markdown-display"));
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+ 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); }
12
+ 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; }
13
+ const Markdown = _ref => {
14
+ let {
15
+ children,
16
+ style
17
+ } = _ref;
18
+ return (
19
+ /*#__PURE__*/
20
+ //'body' style applies to all markdown components
21
+ //@ts-ignore TS does not like the type of this named style for some reason
22
+ React.createElement(_reactNativeMarkdownDisplay.default, {
23
+ style: {
24
+ body: _reactNative.StyleSheet.flatten(style)
25
+ }
26
+ }, children)
27
+ );
28
+ };
29
+ var _default = Markdown;
30
+ exports.default = _default;
@@ -177,6 +177,12 @@ Object.defineProperty(exports, "Link", {
177
177
  return _Text.Link;
178
178
  }
179
179
  });
180
+ Object.defineProperty(exports, "Markdown", {
181
+ enumerable: true,
182
+ get: function () {
183
+ return _Markdown.default;
184
+ }
185
+ });
180
186
  Object.defineProperty(exports, "NumberInput", {
181
187
  enumerable: true,
182
188
  get: function () {
@@ -339,18 +345,6 @@ Object.defineProperty(exports, "SwitchRow", {
339
345
  return _Switch.SwitchRow;
340
346
  }
341
347
  });
342
- Object.defineProperty(exports, "TabView", {
343
- enumerable: true,
344
- get: function () {
345
- return _TabView.TabView;
346
- }
347
- });
348
- Object.defineProperty(exports, "TabViewItem", {
349
- enumerable: true,
350
- get: function () {
351
- return _TabView.TabViewItem;
352
- }
353
- });
354
348
  Object.defineProperty(exports, "TextField", {
355
349
  enumerable: true,
356
350
  get: function () {
@@ -426,7 +420,7 @@ var _Swiper = require("./components/Swiper");
426
420
  var _Layout = require("./components/Layout");
427
421
  var _index = require("./components/RadioButton/index");
428
422
  var _DeckSwiper = require("./components/DeckSwiper");
429
- var _TabView = require("./components/TabView");
423
+ var _Markdown = _interopRequireDefault(require("./components/Markdown"));
430
424
  var _DatePicker = _interopRequireDefault(require("./components/DatePicker/DatePicker"));
431
425
  var _Picker = _interopRequireDefault(require("./components/Picker/Picker"));
432
426
  var _ProgressBar = _interopRequireDefault(require("./components/ProgressBar"));
@@ -11,10 +11,7 @@ const SEED_DATA = [{
11
11
  description: "Masonry Flashlist by Shopify",
12
12
  packageName: "@shopify/flash-list",
13
13
  category: _types.COMPONENT_TYPES.data,
14
- stylesPanelSections: _types.CONTAINER_COMPONENT_STYLES_SECTIONS,
15
- layout: {
16
- flex: 1
17
- },
14
+ stylesPanelSections: [_types.StylesPanelSections.Background, _types.StylesPanelSections.MarginsAndPaddings],
18
15
  triggers: [_types.Triggers.OnRefresh, _types.Triggers.OnEndReached],
19
16
  props: {
20
17
  onRefresh: (0, _types.createActionProp)(),
@@ -61,10 +58,7 @@ const SEED_DATA = [{
61
58
  description: "Flashlist by Shopify",
62
59
  packageName: "@shopify/flash-list",
63
60
  category: _types.COMPONENT_TYPES.data,
64
- stylesPanelSections: _types.CONTAINER_COMPONENT_STYLES_SECTIONS,
65
- layout: {
66
- flex: 1
67
- },
61
+ stylesPanelSections: [_types.StylesPanelSections.Background, _types.StylesPanelSections.MarginsAndPaddings],
68
62
  triggers: [_types.Triggers.OnRefresh, _types.Triggers.OnEndReached],
69
63
  props: {
70
64
  onRefresh: (0, _types.createActionProp)(),
@@ -0,0 +1,27 @@
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: "Markdown",
11
+ description: "A component that renders markdown",
12
+ category: _types.COMPONENT_TYPES.text,
13
+ stylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.LayoutSelectedItem, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Effects],
14
+ props: {
15
+ children: {
16
+ group: _types.GROUPS.data,
17
+ label: "Markdown Text",
18
+ description: "Markdown text to be rendered ",
19
+ editable: true,
20
+ required: true,
21
+ formType: _types.FORM_TYPES.string,
22
+ propType: _types.PROP_TYPES.STRING,
23
+ defaultValue: "### Markdown"
24
+ }
25
+ }
26
+ };
27
+ 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 React from "react";
3
2
  import { View, StyleSheet } from "react-native";
4
3
  const AspectRatio = props => {
@@ -27,6 +26,24 @@ const AspectRatio = props => {
27
26
  });
28
27
  }
29
28
  }
29
+ return /*#__PURE__*/React.createElement(View, {
30
+ ...props,
31
+ style: style,
32
+ onLayout: _ref => {
33
+ let {
34
+ nativeEvent: {
35
+ layout: l
36
+ }
37
+ } = _ref;
38
+ return setLayout(l);
39
+ }
40
+ }, props.children);
41
+ };
42
+ export default AspectRatio;idth,
43
+ height: width * (1 / aspectRatio)
44
+ });
45
+ }
46
+ }
30
47
  return /*#__PURE__*/React.createElement(View, _extends({}, props, {
31
48
  style: style,
32
49
  onLayout: _ref => {
@@ -0,0 +1,20 @@
1
+ import * as React from "react";
2
+ import { StyleSheet } from "react-native";
3
+ import MarkdownComponent from "react-native-markdown-display";
4
+ const Markdown = _ref => {
5
+ let {
6
+ children,
7
+ style
8
+ } = _ref;
9
+ return (
10
+ /*#__PURE__*/
11
+ //'body' style applies to all markdown components
12
+ //@ts-ignore TS does not like the type of this named style for some reason
13
+ React.createElement(MarkdownComponent, {
14
+ style: {
15
+ body: StyleSheet.flatten(style)
16
+ }
17
+ }, children)
18
+ );
19
+ };
20
+ export default Markdown;
@@ -32,7 +32,7 @@ export { Swiper, SwiperItem } from "./components/Swiper";
32
32
  export { Center, Circle, Square, Row, Stack, Spacer } from "./components/Layout";
33
33
  export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup } from "./components/RadioButton/index";
34
34
  export { DeckSwiper, DeckSwiperCard } from "./components/DeckSwiper";
35
- export { TabView, TabViewItem } from "./components/TabView";
35
+ export { default as Markdown } from "./components/Markdown";
36
36
 
37
37
  /* Deprecated: Fix or Delete! */
38
38
  export { default as DatePicker } from "./components/DatePicker/DatePicker";
@@ -1,14 +1,11 @@
1
- import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, CONTAINER_COMPONENT_STYLES_SECTIONS, GROUPS, Triggers, createActionProp, createStaticNumberProp, createColorProp } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, GROUPS, Triggers, createActionProp, createStaticNumberProp, createColorProp, StylesPanelSections } from "@draftbit/types";
2
2
  export const SEED_DATA = [{
3
3
  name: "Masonry List",
4
4
  tag: "MasonryFlashList",
5
5
  description: "Masonry Flashlist by Shopify",
6
6
  packageName: "@shopify/flash-list",
7
7
  category: COMPONENT_TYPES.data,
8
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
9
- layout: {
10
- flex: 1
11
- },
8
+ stylesPanelSections: [StylesPanelSections.Background, StylesPanelSections.MarginsAndPaddings],
12
9
  triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
13
10
  props: {
14
11
  onRefresh: createActionProp(),
@@ -55,10 +52,7 @@ export const SEED_DATA = [{
55
52
  description: "Flashlist by Shopify",
56
53
  packageName: "@shopify/flash-list",
57
54
  category: COMPONENT_TYPES.data,
58
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
59
- layout: {
60
- flex: 1
61
- },
55
+ stylesPanelSections: [StylesPanelSections.Background, StylesPanelSections.MarginsAndPaddings],
62
56
  triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
63
57
  props: {
64
58
  onRefresh: createActionProp(),
@@ -0,0 +1,20 @@
1
+ import { COMPONENT_TYPES, FORM_TYPES, GROUPS, PROP_TYPES, StylesPanelSections } from "@draftbit/types";
2
+ export const SEED_DATA = {
3
+ name: "Markdown",
4
+ tag: "Markdown",
5
+ description: "A component that renders markdown",
6
+ category: COMPONENT_TYPES.text,
7
+ stylesPanelSections: [StylesPanelSections.Typography, StylesPanelSections.LayoutSelectedItem, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Effects],
8
+ props: {
9
+ children: {
10
+ group: GROUPS.data,
11
+ label: "Markdown Text",
12
+ description: "Markdown text to be rendered ",
13
+ editable: true,
14
+ required: true,
15
+ formType: FORM_TYPES.string,
16
+ propType: PROP_TYPES.STRING,
17
+ defaultValue: "### Markdown"
18
+ }
19
+ }
20
+ };
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ import { StyleProp, ViewStyle } from "react-native";
3
+ declare type MarkdownProps = {
4
+ style?: StyleProp<ViewStyle>;
5
+ };
6
+ declare const Markdown: React.FC<React.PropsWithChildren<MarkdownProps>>;
7
+ export default Markdown;
8
+ //# sourceMappingURL=Markdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../../../src/components/Markdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAc,MAAM,cAAc,CAAC;AAGhE,aAAK,aAAa,GAAG;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC;AAEF,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,aAAa,CAAC,CAW9D,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -32,7 +32,7 @@ export { Swiper, SwiperItem } from "./components/Swiper";
32
32
  export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
33
33
  export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
34
34
  export { DeckSwiper, DeckSwiperCard } from "./components/DeckSwiper";
35
- export { TabView, TabViewItem } from "./components/TabView";
35
+ export { default as Markdown } from "./components/Markdown";
36
36
  export { default as DatePicker } from "./components/DatePicker/DatePicker";
37
37
  export { default as Picker } from "./components/Picker/Picker";
38
38
  export { default as ProgressBar } from "./components/ProgressBar";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM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MAAM,uBAAuB,CAAC;AAG5D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC"}
@@ -5,9 +5,6 @@ export declare const SEED_DATA: ({
5
5
  packageName: string;
6
6
  category: string;
7
7
  stylesPanelSections: string[];
8
- layout: {
9
- flex: number;
10
- };
11
8
  triggers: string[];
12
9
  props: {
13
10
  onRefresh: {
@@ -113,9 +110,6 @@ export declare const SEED_DATA: ({
113
110
  packageName: string;
114
111
  category: string;
115
112
  stylesPanelSections: string[];
116
- layout: {
117
- flex: number;
118
- };
119
113
  triggers: string[];
120
114
  props: {
121
115
  onRefresh: {
@@ -1 +1 @@
1
- {"version":3,"file":"FlashList.d.ts","sourceRoot":"","sources":["../../../../src/mappings/FlashList.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqHrB,CAAC"}
1
+ {"version":3,"file":"FlashList.d.ts","sourceRoot":"","sources":["../../../../src/mappings/FlashList.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqHrB,CAAC"}
@@ -4,22 +4,17 @@ export declare const SEED_DATA: {
4
4
  description: string;
5
5
  category: string;
6
6
  stylesPanelSections: string[];
7
- layout: {
8
- flex: number;
9
- };
10
7
  props: {
11
- title: any;
12
- icon: {
8
+ children: {
9
+ group: string;
13
10
  label: string;
14
11
  description: string;
12
+ editable: boolean;
13
+ required: boolean;
15
14
  formType: string;
16
15
  propType: string;
17
16
  defaultValue: string;
18
- required: boolean;
19
- editable: boolean;
20
- group: string;
21
17
  };
22
- accessibilityLabel: any;
23
18
  };
24
19
  };
25
- //# sourceMappingURL=TabViewItem.d.ts.map
20
+ //# sourceMappingURL=Markdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../../../src/mappings/Markdown.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;CAuBrB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "46.8.2-2fe7f4.2+2fe7f49",
3
+ "version": "46.8.2-387722.2+3877227",
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.8.2-2fe7f4.2+2fe7f49",
44
+ "@draftbit/types": "^46.8.2-387722.2+3877227",
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",
@@ -54,10 +54,9 @@
54
54
  "lodash.omit": "^4.5.0",
55
55
  "lodash.tonumber": "^4.0.3",
56
56
  "react-native-deck-swiper": "^2.0.12",
57
+ "react-native-markdown-display": "^7.0.0-alpha.2",
57
58
  "react-native-modal-datetime-picker": "^13.0.0",
58
- "react-native-pager-view": "5.4.24",
59
59
  "react-native-svg": "12.3.0",
60
- "react-native-tab-view": "^3.4.0",
61
60
  "react-native-typography": "^1.4.1",
62
61
  "react-native-web-swiper": "^2.2.3"
63
62
  },
@@ -94,5 +93,5 @@
94
93
  ]
95
94
  ]
96
95
  },
97
- "gitHead": "2fe7f498ea206b3d2f0103d25975d06e235a7fec"
96
+ "gitHead": "3877227d472caa50d2c7ab2dc6674090b2fa3393"
98
97
  }
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ import { StyleSheet } from "react-native";
3
+ import MarkdownComponent from "react-native-markdown-display";
4
+ const Markdown = ({ children, style, }) => {
5
+ return (
6
+ //'body' style applies to all markdown components
7
+ //@ts-ignore TS does not like the type of this named style for some reason
8
+ React.createElement(MarkdownComponent, { style: { body: StyleSheet.flatten(style) } }, children));
9
+ };
10
+ export default Markdown;
@@ -0,0 +1,22 @@
1
+ import * as React from "react";
2
+ import { StyleProp, ViewStyle, StyleSheet } from "react-native";
3
+ import MarkdownComponent from "react-native-markdown-display";
4
+
5
+ type MarkdownProps = {
6
+ style?: StyleProp<ViewStyle>;
7
+ };
8
+
9
+ const Markdown: React.FC<React.PropsWithChildren<MarkdownProps>> = ({
10
+ children,
11
+ style,
12
+ }) => {
13
+ return (
14
+ //'body' style applies to all markdown components
15
+ //@ts-ignore TS does not like the type of this named style for some reason
16
+ <MarkdownComponent style={{ body: StyleSheet.flatten(style) }}>
17
+ {children}
18
+ </MarkdownComponent>
19
+ );
20
+ };
21
+
22
+ export default Markdown;
package/src/index.js CHANGED
@@ -32,7 +32,7 @@ export { Swiper, SwiperItem } from "./components/Swiper";
32
32
  export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
33
33
  export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
34
34
  export { DeckSwiper, DeckSwiperCard } from "./components/DeckSwiper";
35
- export { TabView, TabViewItem } from "./components/TabView";
35
+ export { default as Markdown } from "./components/Markdown";
36
36
  /* Deprecated: Fix or Delete! */
37
37
  export { default as DatePicker } from "./components/DatePicker/DatePicker";
38
38
  export { default as Picker } from "./components/Picker/Picker";
package/src/index.tsx CHANGED
@@ -53,7 +53,7 @@ export {
53
53
 
54
54
  export { DeckSwiper, DeckSwiperCard } from "./components/DeckSwiper";
55
55
 
56
- export { TabView, TabViewItem } from "./components/TabView";
56
+ export { default as Markdown } from "./components/Markdown";
57
57
 
58
58
  /* Deprecated: Fix or Delete! */
59
59
  export { default as DatePicker } from "./components/DatePicker/DatePicker";
@@ -1,4 +1,4 @@
1
- import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, CONTAINER_COMPONENT_STYLES_SECTIONS, GROUPS, Triggers, createActionProp, createStaticNumberProp, createColorProp, } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, GROUPS, Triggers, createActionProp, createStaticNumberProp, createColorProp, StylesPanelSections, } from "@draftbit/types";
2
2
  export const SEED_DATA = [
3
3
  {
4
4
  name: "Masonry List",
@@ -6,10 +6,10 @@ export const SEED_DATA = [
6
6
  description: "Masonry Flashlist by Shopify",
7
7
  packageName: "@shopify/flash-list",
8
8
  category: COMPONENT_TYPES.data,
9
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
10
- layout: {
11
- flex: 1,
12
- },
9
+ stylesPanelSections: [
10
+ StylesPanelSections.Background,
11
+ StylesPanelSections.MarginsAndPaddings,
12
+ ],
13
13
  triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
14
14
  props: {
15
15
  onRefresh: createActionProp(),
@@ -57,10 +57,10 @@ export const SEED_DATA = [
57
57
  description: "Flashlist by Shopify",
58
58
  packageName: "@shopify/flash-list",
59
59
  category: COMPONENT_TYPES.data,
60
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
61
- layout: {
62
- flex: 1,
63
- },
60
+ stylesPanelSections: [
61
+ StylesPanelSections.Background,
62
+ StylesPanelSections.MarginsAndPaddings,
63
+ ],
64
64
  triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
65
65
  props: {
66
66
  onRefresh: createActionProp(),
@@ -3,12 +3,12 @@ import {
3
3
  createNumColumnsType,
4
4
  createStaticBoolProp,
5
5
  createNumberProp,
6
- CONTAINER_COMPONENT_STYLES_SECTIONS,
7
6
  GROUPS,
8
7
  Triggers,
9
8
  createActionProp,
10
9
  createStaticNumberProp,
11
10
  createColorProp,
11
+ StylesPanelSections,
12
12
  } from "@draftbit/types";
13
13
 
14
14
  export const SEED_DATA = [
@@ -18,10 +18,10 @@ export const SEED_DATA = [
18
18
  description: "Masonry Flashlist by Shopify",
19
19
  packageName: "@shopify/flash-list",
20
20
  category: COMPONENT_TYPES.data,
21
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
22
- layout: {
23
- flex: 1,
24
- },
21
+ stylesPanelSections: [
22
+ StylesPanelSections.Background,
23
+ StylesPanelSections.MarginsAndPaddings,
24
+ ],
25
25
  triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
26
26
  props: {
27
27
  onRefresh: createActionProp(),
@@ -72,10 +72,10 @@ export const SEED_DATA = [
72
72
  description: "Flashlist by Shopify",
73
73
  packageName: "@shopify/flash-list",
74
74
  category: COMPONENT_TYPES.data,
75
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
76
- layout: {
77
- flex: 1,
78
- },
75
+ stylesPanelSections: [
76
+ StylesPanelSections.Background,
77
+ StylesPanelSections.MarginsAndPaddings,
78
+ ],
79
79
  triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
80
80
  props: {
81
81
  onRefresh: createActionProp(),
@@ -0,0 +1,25 @@
1
+ import { COMPONENT_TYPES, FORM_TYPES, GROUPS, PROP_TYPES, StylesPanelSections, } from "@draftbit/types";
2
+ export const SEED_DATA = {
3
+ name: "Markdown",
4
+ tag: "Markdown",
5
+ description: "A component that renders markdown",
6
+ category: COMPONENT_TYPES.text,
7
+ stylesPanelSections: [
8
+ StylesPanelSections.Typography,
9
+ StylesPanelSections.LayoutSelectedItem,
10
+ StylesPanelSections.MarginsAndPaddings,
11
+ StylesPanelSections.Effects,
12
+ ],
13
+ props: {
14
+ children: {
15
+ group: GROUPS.data,
16
+ label: "Markdown Text",
17
+ description: "Markdown text to be rendered ",
18
+ editable: true,
19
+ required: true,
20
+ formType: FORM_TYPES.string,
21
+ propType: PROP_TYPES.STRING,
22
+ defaultValue: "### Markdown",
23
+ },
24
+ },
25
+ };
@@ -0,0 +1,32 @@
1
+ import {
2
+ COMPONENT_TYPES,
3
+ FORM_TYPES,
4
+ GROUPS,
5
+ PROP_TYPES,
6
+ StylesPanelSections,
7
+ } from "@draftbit/types";
8
+
9
+ export const SEED_DATA = {
10
+ name: "Markdown",
11
+ tag: "Markdown",
12
+ description: "A component that renders markdown",
13
+ category: COMPONENT_TYPES.text,
14
+ stylesPanelSections: [
15
+ StylesPanelSections.Typography,
16
+ StylesPanelSections.LayoutSelectedItem,
17
+ StylesPanelSections.MarginsAndPaddings,
18
+ StylesPanelSections.Effects,
19
+ ],
20
+ props: {
21
+ children: {
22
+ group: GROUPS.data,
23
+ label: "Markdown Text",
24
+ description: "Markdown text to be rendered ",
25
+ editable: true,
26
+ required: true,
27
+ formType: FORM_TYPES.string,
28
+ propType: PROP_TYPES.STRING,
29
+ defaultValue: "### Markdown",
30
+ },
31
+ },
32
+ };