@draftbit/core 46.4.4-9a666e.2 → 46.4.4-b53636.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.
@@ -21,8 +21,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
21
21
 
22
22
  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; }
23
23
 
24
- 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); }
25
-
26
24
  const AccordionItem = _ref => {
27
25
  let {
28
26
  Icon,
@@ -37,9 +35,10 @@ const AccordionItem = _ref => {
37
35
  textStyles,
38
36
  viewStyles
39
37
  } = (0, _utilities.extractStyles)(style);
40
- return /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({
41
- style: [styles.container, viewStyles]
42
- }, rest), /*#__PURE__*/React.createElement(_reactNative.View, {
38
+ return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
39
+ style: [styles.container, viewStyles],
40
+ ...rest
41
+ }, /*#__PURE__*/React.createElement(_reactNative.View, {
43
42
  style: styles.row
44
43
  }, icon ? /*#__PURE__*/React.createElement(Icon, {
45
44
  name: icon,
@@ -74,4 +73,25 @@ const styles = _reactNative.StyleSheet.create({
74
73
 
75
74
  var _default = (0, _theming.withTheme)(AccordionItem);
76
75
 
76
+ exports.default = _default;StyleSheet.create({
77
+ container: {
78
+ padding: 8
79
+ },
80
+ row: {
81
+ flexDirection: "row",
82
+ alignItems: "center",
83
+ paddingLeft: 8
84
+ },
85
+ item: {
86
+ marginVertical: 6,
87
+ paddingLeft: 8
88
+ },
89
+ content: {
90
+ flex: 1,
91
+ justifyContent: "center"
92
+ }
93
+ });
94
+
95
+ var _default = (0, _theming.withTheme)(AccordionItem);
96
+
77
97
  exports.default = _default;
@@ -17,8 +17,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
17
17
 
18
18
  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; }
19
19
 
20
- 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); }
21
-
22
20
  const AnimatedProgress = _reactNative.Animated.createAnimatedComponent(_CircularProgress.default);
23
21
 
24
22
  const AnimatedCircularProgress = _ref => {
@@ -69,6 +67,18 @@ const AnimatedCircularProgress = _ref => {
69
67
  React.useEffect(() => {
70
68
  animate();
71
69
  }, [fill, animate]);
70
+ return /*#__PURE__*/React.createElement(AnimatedProgress, { ...other,
71
+ style: other.style,
72
+ childrenContainerStyle: other.childrenContainerStyle,
73
+ fill: fillAnimation,
74
+ tintColor: animateColor()
75
+ });
76
+ };
77
+
78
+ var _default = AnimatedCircularProgress;
79
+ exports.default = _default;eEffect(() => {
80
+ animate();
81
+ }, [fill, animate]);
72
82
  return /*#__PURE__*/React.createElement(AnimatedProgress, _extends({}, other, {
73
83
  style: other.style,
74
84
  childrenContainerStyle: other.childrenContainerStyle,
@@ -17,8 +17,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
17
17
 
18
18
  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; }
19
19
 
20
- 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); }
21
-
22
20
  const CircleImage = _ref => {
23
21
  let {
24
22
  source = _Config.default.placeholderImageURL,
@@ -27,6 +25,22 @@ const CircleImage = _ref => {
27
25
  ...props
28
26
  } = _ref;
29
27
  const borderRadius = size / 2;
28
+ return /*#__PURE__*/React.createElement(_reactNative.Image, {
29
+ style: [{
30
+ width: size,
31
+ height: size,
32
+ borderRadius
33
+ }, style],
34
+ source: typeof source === "string" ? {
35
+ uri: source
36
+ } : source,
37
+ resizeMode: "cover",
38
+ ...props
39
+ });
40
+ };
41
+
42
+ var _default = CircleImage;
43
+ exports.default = _default;size / 2;
30
44
  return /*#__PURE__*/React.createElement(_reactNative.Image, _extends({
31
45
  style: [{
32
46
  width: size,
@@ -12,7 +12,17 @@ const SEED_DATA = {
12
12
  tag: "AudioPlayer",
13
13
  description: "Given a source URL, plays sounds & audio!",
14
14
  category: _types.COMPONENT_TYPES.media,
15
- layout: {},
15
+ stylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.Background, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position],
16
+ layout: {
17
+ backgroundColor: "#eee",
18
+ paddingLeft: 16,
19
+ paddingRight: 16,
20
+ paddingTop: 8,
21
+ paddingBottom: 8,
22
+ borderRadius: 24,
23
+ flexDirection: "row",
24
+ alignItems: "center"
25
+ },
16
26
  props: {
17
27
  source: {
18
28
  group: _types.GROUPS.data,
@@ -23,7 +33,27 @@ const SEED_DATA = {
23
33
  defaultValue: "https://static.draftbit.com/audio/intro-to-draftbit-audio.mp3",
24
34
  formType: _types.FORM_TYPES.sourceUrl,
25
35
  propType: _types.PROP_TYPES.OBJECT
26
- }
36
+ },
37
+ sliderColor: (0, _types.createColorProp)({
38
+ label: "Thumb Color",
39
+ defaultValue: "black"
40
+ }),
41
+ completedTrackColor: (0, _types.createColorProp)({
42
+ label: "Completed Track Color",
43
+ defaultValue: "white"
44
+ }),
45
+ remainingTrackColor: (0, _types.createColorProp)({
46
+ label: "Remaining Track Color",
47
+ defaultValue: "#333333"
48
+ }),
49
+ trackThumbSize: (0, _types.createNumberProp)({
50
+ label: "Thumb Size",
51
+ defaultValue: 24
52
+ }),
53
+ playIconColor: (0, _types.createColorProp)({
54
+ label: "Play Icon Color",
55
+ defaultValue: "black"
56
+ })
27
57
  }
28
58
  };
29
59
  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 * as React from "react";
4
2
  import { Pressable, StyleSheet, View } from "react-native";
5
3
  import Text from "../Text";
@@ -20,9 +18,10 @@ const AccordionItem = _ref => {
20
18
  textStyles,
21
19
  viewStyles
22
20
  } = extractStyles(style);
23
- return /*#__PURE__*/React.createElement(Pressable, _extends({
24
- style: [styles.container, viewStyles]
25
- }, rest), /*#__PURE__*/React.createElement(View, {
21
+ return /*#__PURE__*/React.createElement(Pressable, {
22
+ style: [styles.container, viewStyles],
23
+ ...rest
24
+ }, /*#__PURE__*/React.createElement(View, {
26
25
  style: styles.row
27
26
  }, icon ? /*#__PURE__*/React.createElement(Icon, {
28
27
  name: icon,
@@ -36,6 +35,28 @@ const AccordionItem = _ref => {
36
35
  }, label))));
37
36
  };
38
37
 
38
+ const styles = StyleSheet.create({
39
+ container: {
40
+ padding: 8
41
+ },
42
+ row: {
43
+ flexDirection: "row",
44
+ alignItems: "center",
45
+ paddingLeft: 8
46
+ },
47
+ item: {
48
+ marginVertical: 6,
49
+ paddingLeft: 8
50
+ },
51
+ content: {
52
+ flex: 1,
53
+ justifyContent: "center"
54
+ }
55
+ });
56
+ export default withTheme(AccordionItem);xtStyles
57
+ }, label))));
58
+ };
59
+
39
60
  const styles = StyleSheet.create({
40
61
  container: {
41
62
  padding: 8
@@ -1,10 +1,20 @@
1
- import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES } from "@draftbit/types";
1
+ import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, StylesPanelSections, createColorProp, createNumberProp } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "Audio Player",
4
4
  tag: "AudioPlayer",
5
5
  description: "Given a source URL, plays sounds & audio!",
6
6
  category: COMPONENT_TYPES.media,
7
- layout: {},
7
+ stylesPanelSections: [StylesPanelSections.Typography, StylesPanelSections.Background, StylesPanelSections.Borders, StylesPanelSections.Size, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position],
8
+ layout: {
9
+ backgroundColor: "#eee",
10
+ paddingLeft: 16,
11
+ paddingRight: 16,
12
+ paddingTop: 8,
13
+ paddingBottom: 8,
14
+ borderRadius: 24,
15
+ flexDirection: "row",
16
+ alignItems: "center"
17
+ },
8
18
  props: {
9
19
  source: {
10
20
  group: GROUPS.data,
@@ -15,6 +25,26 @@ export const SEED_DATA = {
15
25
  defaultValue: "https://static.draftbit.com/audio/intro-to-draftbit-audio.mp3",
16
26
  formType: FORM_TYPES.sourceUrl,
17
27
  propType: PROP_TYPES.OBJECT
18
- }
28
+ },
29
+ sliderColor: createColorProp({
30
+ label: "Thumb Color",
31
+ defaultValue: "black"
32
+ }),
33
+ completedTrackColor: createColorProp({
34
+ label: "Completed Track Color",
35
+ defaultValue: "white"
36
+ }),
37
+ remainingTrackColor: createColorProp({
38
+ label: "Remaining Track Color",
39
+ defaultValue: "#333333"
40
+ }),
41
+ trackThumbSize: createNumberProp({
42
+ label: "Thumb Size",
43
+ defaultValue: 24
44
+ }),
45
+ playIconColor: createColorProp({
46
+ label: "Play Icon Color",
47
+ defaultValue: "black"
48
+ })
19
49
  }
20
50
  };
@@ -3,7 +3,17 @@ export declare const SEED_DATA: {
3
3
  tag: string;
4
4
  description: string;
5
5
  category: string;
6
- layout: {};
6
+ stylesPanelSections: string[];
7
+ layout: {
8
+ backgroundColor: string;
9
+ paddingLeft: number;
10
+ paddingRight: number;
11
+ paddingTop: number;
12
+ paddingBottom: number;
13
+ borderRadius: number;
14
+ flexDirection: string;
15
+ alignItems: string;
16
+ };
7
17
  props: {
8
18
  source: {
9
19
  group: string;
@@ -15,5 +25,56 @@ export declare const SEED_DATA: {
15
25
  formType: string;
16
26
  propType: string;
17
27
  };
28
+ sliderColor: {
29
+ group: string;
30
+ label: string;
31
+ description: string;
32
+ editable: boolean;
33
+ required: boolean;
34
+ defaultValue: null;
35
+ formType: string;
36
+ propType: string;
37
+ };
38
+ completedTrackColor: {
39
+ group: string;
40
+ label: string;
41
+ description: string;
42
+ editable: boolean;
43
+ required: boolean;
44
+ defaultValue: null;
45
+ formType: string;
46
+ propType: string;
47
+ };
48
+ remainingTrackColor: {
49
+ group: string;
50
+ label: string;
51
+ description: string;
52
+ editable: boolean;
53
+ required: boolean;
54
+ defaultValue: null;
55
+ formType: string;
56
+ propType: string;
57
+ };
58
+ trackThumbSize: {
59
+ label: string;
60
+ description: string;
61
+ formType: string;
62
+ propType: string;
63
+ group: string;
64
+ defaultValue: null;
65
+ editable: boolean;
66
+ required: boolean;
67
+ step: number;
68
+ };
69
+ playIconColor: {
70
+ group: string;
71
+ label: string;
72
+ description: string;
73
+ editable: boolean;
74
+ required: boolean;
75
+ defaultValue: null;
76
+ formType: string;
77
+ propType: string;
78
+ };
18
79
  };
19
80
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "46.4.4-9a666e.2+9a666e4",
3
+ "version": "46.4.4-b53636.2+b536363",
4
4
  "description": "Core (non-native) Components",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -41,8 +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-9a666e.2+9a666e4",
45
- "@expo/html-elements": "^0.2.0",
44
+ "@draftbit/types": "^46.4.4-b53636.2+b536363",
46
45
  "@material-ui/core": "^4.11.0",
47
46
  "@material-ui/pickers": "^3.2.10",
48
47
  "@react-native-community/slider": "4.2.3",
@@ -82,5 +81,5 @@
82
81
  ]
83
82
  ]
84
83
  },
85
- "gitHead": "9a666e4ecef86b3d4122a10d5b0efd540f7cdb2b"
84
+ "gitHead": "b536363885da285bd8327c5c4cb51fd9e03bdf78"
86
85
  }
@@ -1,10 +1,27 @@
1
- import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, } from "@draftbit/types";
1
+ import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, StylesPanelSections, createColorProp, createNumberProp, } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "Audio Player",
4
4
  tag: "AudioPlayer",
5
5
  description: "Given a source URL, plays sounds & audio!",
6
6
  category: COMPONENT_TYPES.media,
7
- layout: {},
7
+ stylesPanelSections: [
8
+ StylesPanelSections.Typography,
9
+ StylesPanelSections.Background,
10
+ StylesPanelSections.Borders,
11
+ StylesPanelSections.Size,
12
+ StylesPanelSections.MarginsAndPaddings,
13
+ StylesPanelSections.Position,
14
+ ],
15
+ layout: {
16
+ backgroundColor: "#eee",
17
+ paddingLeft: 16,
18
+ paddingRight: 16,
19
+ paddingTop: 8,
20
+ paddingBottom: 8,
21
+ borderRadius: 24,
22
+ flexDirection: "row",
23
+ alignItems: "center",
24
+ },
8
25
  props: {
9
26
  source: {
10
27
  group: GROUPS.data,
@@ -16,5 +33,25 @@ export const SEED_DATA = {
16
33
  formType: FORM_TYPES.sourceUrl,
17
34
  propType: PROP_TYPES.OBJECT,
18
35
  },
36
+ sliderColor: createColorProp({
37
+ label: "Thumb Color",
38
+ defaultValue: "black",
39
+ }),
40
+ completedTrackColor: createColorProp({
41
+ label: "Completed Track Color",
42
+ defaultValue: "white",
43
+ }),
44
+ remainingTrackColor: createColorProp({
45
+ label: "Remaining Track Color",
46
+ defaultValue: "#333333",
47
+ }),
48
+ trackThumbSize: createNumberProp({
49
+ label: "Thumb Size",
50
+ defaultValue: 24,
51
+ }),
52
+ playIconColor: createColorProp({
53
+ label: "Play Icon Color",
54
+ defaultValue: "black",
55
+ }),
19
56
  },
20
57
  };
@@ -3,6 +3,9 @@ import {
3
3
  COMPONENT_TYPES,
4
4
  FORM_TYPES,
5
5
  PROP_TYPES,
6
+ StylesPanelSections,
7
+ createColorProp,
8
+ createNumberProp,
6
9
  } from "@draftbit/types";
7
10
 
8
11
  export const SEED_DATA = {
@@ -10,7 +13,24 @@ export const SEED_DATA = {
10
13
  tag: "AudioPlayer",
11
14
  description: "Given a source URL, plays sounds & audio!",
12
15
  category: COMPONENT_TYPES.media,
13
- layout: {},
16
+ stylesPanelSections: [
17
+ StylesPanelSections.Typography,
18
+ StylesPanelSections.Background,
19
+ StylesPanelSections.Borders,
20
+ StylesPanelSections.Size,
21
+ StylesPanelSections.MarginsAndPaddings,
22
+ StylesPanelSections.Position,
23
+ ],
24
+ layout: {
25
+ backgroundColor: "#eee",
26
+ paddingLeft: 16,
27
+ paddingRight: 16,
28
+ paddingTop: 8,
29
+ paddingBottom: 8,
30
+ borderRadius: 24,
31
+ flexDirection: "row",
32
+ alignItems: "center",
33
+ },
14
34
  props: {
15
35
  source: {
16
36
  group: GROUPS.data,
@@ -23,5 +43,25 @@ export const SEED_DATA = {
23
43
  formType: FORM_TYPES.sourceUrl,
24
44
  propType: PROP_TYPES.OBJECT,
25
45
  },
46
+ sliderColor: createColorProp({
47
+ label: "Thumb Color",
48
+ defaultValue: "black",
49
+ }),
50
+ completedTrackColor: createColorProp({
51
+ label: "Completed Track Color",
52
+ defaultValue: "white",
53
+ }),
54
+ remainingTrackColor: createColorProp({
55
+ label: "Remaining Track Color",
56
+ defaultValue: "#333333",
57
+ }),
58
+ trackThumbSize: createNumberProp({
59
+ label: "Thumb Size",
60
+ defaultValue: 24,
61
+ }),
62
+ playIconColor: createColorProp({
63
+ label: "Play Icon Color",
64
+ defaultValue: "black",
65
+ }),
26
66
  },
27
67
  };
@@ -1,129 +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_TRIGGERS = [_types.Triggers.OnValueChange];
11
- const ELEMENT_PROPS = {
12
- category: _types.COMPONENT_TYPES.element,
13
- doc_link: "https://www.npmjs.com/package/@expo/html-elements",
14
- code_link: "https://github.com/expo/expo/tree/master/packages/html-elements",
15
- stylesPanelSections: _types.BLOCK_STYLES_SECTIONS,
16
- layout: {
17
- margin: 0
18
- },
19
- triggers: SEED_DATA_TRIGGERS
20
- };
21
- const HEADING_PROPS = { ...ELEMENT_PROPS
22
- };
23
- const SEED_DATA = [{
24
- name: "H1",
25
- tag: "H1",
26
- ...HEADING_PROPS
27
- }, {
28
- name: "H2",
29
- tag: "H2",
30
- ...HEADING_PROPS
31
- }, {
32
- name: "H3",
33
- tag: "H3",
34
- ...HEADING_PROPS
35
- }, {
36
- name: "H4",
37
- tag: "H4",
38
- ...HEADING_PROPS
39
- }, {
40
- name: "H5",
41
- tag: "H5",
42
- ...HEADING_PROPS
43
- }, {
44
- name: "H6",
45
- tag: "H6",
46
- ...HEADING_PROPS
47
- }, {
48
- name: "Anchor",
49
- tag: "A",
50
- ...ELEMENT_PROPS,
51
- props: {
52
- href: (0, _types.createTextProp)({
53
- label: "href",
54
- description: "Specify the URL",
55
- defaultValue: ""
56
- }),
57
- target: {
58
- group: _types.GROUPS.basic,
59
- label: "target",
60
- description: "decide where link should open",
61
- formType: _types.FORM_TYPES.flatArray,
62
- defaultValue: "_blank",
63
- options: ["_blank", "_self", "_parent", "_top"]
64
- }
65
- }
66
- }, {
67
- name: "Paragraph",
68
- tag: "P",
69
- ...ELEMENT_PROPS,
70
- props: {// NOTE - Keeping the props commented until we figure out a way to use this props from draftbit side.
71
- // strong: createBoolProp({
72
- // label: "Strong",
73
- // description: "Strong",
74
- // }),
75
- // strike: createBoolProp({
76
- // label: "Strike",
77
- // description: "Strike through",
78
- // }),
79
- // italic: createBoolProp({
80
- // label: "Italic",
81
- // description: "Italic Fonts",
82
- // }),
83
- // bold: createBoolProp({
84
- // label: "Bold",
85
- // description: "Bold",
86
- // }),
87
- }
88
- }, {
89
- name: "Code",
90
- tag: "Code",
91
- ...ELEMENT_PROPS
92
- }, {
93
- name: "Pre",
94
- tag: "Pre",
95
- ...ELEMENT_PROPS
96
- }, {
97
- name: "Mark",
98
- tag: "Mark",
99
- ...ELEMENT_PROPS
100
- }, {
101
- name: "BR",
102
- tag: "BR",
103
- ...ELEMENT_PROPS
104
- }, {
105
- name: "Quote",
106
- tag: "Q",
107
- ...ELEMENT_PROPS
108
- }, {
109
- name: "BlockQuote",
110
- tag: "BlockQuote",
111
- ...ELEMENT_PROPS
112
- }, {
113
- name: "Time",
114
- tag: "Time",
115
- ...ELEMENT_PROPS
116
- }, {
117
- name: "UL",
118
- tag: "UL",
119
- ...ELEMENT_PROPS
120
- }, {
121
- name: "LI",
122
- tag: "LI",
123
- ...ELEMENT_PROPS
124
- }, {
125
- name: "HR",
126
- tag: "HR",
127
- ...ELEMENT_PROPS
128
- }];
129
- exports.SEED_DATA = SEED_DATA;
@@ -1,121 +0,0 @@
1
- import { BLOCK_STYLES_SECTIONS, COMPONENT_TYPES, // createBoolProp,
2
- createTextProp, FORM_TYPES, GROUPS, Triggers } from "@draftbit/types";
3
- const SEED_DATA_TRIGGERS = [Triggers.OnValueChange];
4
- const ELEMENT_PROPS = {
5
- category: COMPONENT_TYPES.element,
6
- doc_link: "https://www.npmjs.com/package/@expo/html-elements",
7
- code_link: "https://github.com/expo/expo/tree/master/packages/html-elements",
8
- stylesPanelSections: BLOCK_STYLES_SECTIONS,
9
- layout: {
10
- margin: 0
11
- },
12
- triggers: SEED_DATA_TRIGGERS
13
- };
14
- const HEADING_PROPS = { ...ELEMENT_PROPS
15
- };
16
- export const SEED_DATA = [{
17
- name: "H1",
18
- tag: "H1",
19
- ...HEADING_PROPS
20
- }, {
21
- name: "H2",
22
- tag: "H2",
23
- ...HEADING_PROPS
24
- }, {
25
- name: "H3",
26
- tag: "H3",
27
- ...HEADING_PROPS
28
- }, {
29
- name: "H4",
30
- tag: "H4",
31
- ...HEADING_PROPS
32
- }, {
33
- name: "H5",
34
- tag: "H5",
35
- ...HEADING_PROPS
36
- }, {
37
- name: "H6",
38
- tag: "H6",
39
- ...HEADING_PROPS
40
- }, {
41
- name: "Anchor",
42
- tag: "A",
43
- ...ELEMENT_PROPS,
44
- props: {
45
- href: createTextProp({
46
- label: "href",
47
- description: "Specify the URL",
48
- defaultValue: ""
49
- }),
50
- target: {
51
- group: GROUPS.basic,
52
- label: "target",
53
- description: "decide where link should open",
54
- formType: FORM_TYPES.flatArray,
55
- defaultValue: "_blank",
56
- options: ["_blank", "_self", "_parent", "_top"]
57
- }
58
- }
59
- }, {
60
- name: "Paragraph",
61
- tag: "P",
62
- ...ELEMENT_PROPS,
63
- props: {// NOTE - Keeping the props commented until we figure out a way to use this props from draftbit side.
64
- // strong: createBoolProp({
65
- // label: "Strong",
66
- // description: "Strong",
67
- // }),
68
- // strike: createBoolProp({
69
- // label: "Strike",
70
- // description: "Strike through",
71
- // }),
72
- // italic: createBoolProp({
73
- // label: "Italic",
74
- // description: "Italic Fonts",
75
- // }),
76
- // bold: createBoolProp({
77
- // label: "Bold",
78
- // description: "Bold",
79
- // }),
80
- }
81
- }, {
82
- name: "Code",
83
- tag: "Code",
84
- ...ELEMENT_PROPS
85
- }, {
86
- name: "Pre",
87
- tag: "Pre",
88
- ...ELEMENT_PROPS
89
- }, {
90
- name: "Mark",
91
- tag: "Mark",
92
- ...ELEMENT_PROPS
93
- }, {
94
- name: "BR",
95
- tag: "BR",
96
- ...ELEMENT_PROPS
97
- }, {
98
- name: "Quote",
99
- tag: "Q",
100
- ...ELEMENT_PROPS
101
- }, {
102
- name: "BlockQuote",
103
- tag: "BlockQuote",
104
- ...ELEMENT_PROPS
105
- }, {
106
- name: "Time",
107
- tag: "Time",
108
- ...ELEMENT_PROPS
109
- }, {
110
- name: "UL",
111
- tag: "UL",
112
- ...ELEMENT_PROPS
113
- }, {
114
- name: "LI",
115
- tag: "LI",
116
- ...ELEMENT_PROPS
117
- }, {
118
- name: "HR",
119
- tag: "HR",
120
- ...ELEMENT_PROPS
121
- }];
@@ -1,49 +0,0 @@
1
- export declare const SEED_DATA: ({
2
- category: string;
3
- doc_link: string;
4
- code_link: string;
5
- stylesPanelSections: string[];
6
- layout: {
7
- margin: number;
8
- };
9
- triggers: string[];
10
- name: string;
11
- tag: string;
12
- } | {
13
- props: {
14
- href: any;
15
- target: {
16
- group: string;
17
- label: string;
18
- description: string;
19
- formType: string;
20
- defaultValue: string;
21
- options: string[];
22
- };
23
- };
24
- category: string;
25
- doc_link: string;
26
- code_link: string;
27
- stylesPanelSections: string[];
28
- layout: {
29
- margin: number;
30
- };
31
- triggers: string[];
32
- name: string;
33
- tag: string;
34
- } | {
35
- props: {
36
- href?: undefined;
37
- target?: undefined;
38
- };
39
- category: string;
40
- doc_link: string;
41
- code_link: string;
42
- stylesPanelSections: string[];
43
- layout: {
44
- margin: number;
45
- };
46
- triggers: string[];
47
- name: string;
48
- tag: string;
49
- })[];
@@ -1,143 +0,0 @@
1
- import { BLOCK_STYLES_SECTIONS, COMPONENT_TYPES,
2
- // createBoolProp,
3
- createTextProp, FORM_TYPES, GROUPS, Triggers, } from "@draftbit/types";
4
- const SEED_DATA_TRIGGERS = [Triggers.OnValueChange];
5
- const ELEMENT_PROPS = {
6
- category: COMPONENT_TYPES.element,
7
- doc_link: "https://www.npmjs.com/package/@expo/html-elements",
8
- code_link: "https://github.com/expo/expo/tree/master/packages/html-elements",
9
- stylesPanelSections: BLOCK_STYLES_SECTIONS,
10
- layout: {
11
- margin: 0,
12
- },
13
- triggers: SEED_DATA_TRIGGERS,
14
- };
15
- const HEADING_PROPS = {
16
- ...ELEMENT_PROPS,
17
- };
18
- export const SEED_DATA = [
19
- {
20
- name: "H1",
21
- tag: "H1",
22
- ...HEADING_PROPS,
23
- },
24
- {
25
- name: "H2",
26
- tag: "H2",
27
- ...HEADING_PROPS,
28
- },
29
- {
30
- name: "H3",
31
- tag: "H3",
32
- ...HEADING_PROPS,
33
- },
34
- {
35
- name: "H4",
36
- tag: "H4",
37
- ...HEADING_PROPS,
38
- },
39
- {
40
- name: "H5",
41
- tag: "H5",
42
- ...HEADING_PROPS,
43
- },
44
- {
45
- name: "H6",
46
- tag: "H6",
47
- ...HEADING_PROPS,
48
- },
49
- {
50
- name: "Anchor",
51
- tag: "A",
52
- ...ELEMENT_PROPS,
53
- props: {
54
- href: createTextProp({
55
- label: "href",
56
- description: "Specify the URL",
57
- defaultValue: "",
58
- }),
59
- target: {
60
- group: GROUPS.basic,
61
- label: "target",
62
- description: "decide where link should open",
63
- formType: FORM_TYPES.flatArray,
64
- defaultValue: "_blank",
65
- options: ["_blank", "_self", "_parent", "_top"],
66
- },
67
- },
68
- },
69
- {
70
- name: "Paragraph",
71
- tag: "P",
72
- ...ELEMENT_PROPS,
73
- props: {
74
- // NOTE - Keeping the props commented until we figure out a way to use this props from draftbit side.
75
- // strong: createBoolProp({
76
- // label: "Strong",
77
- // description: "Strong",
78
- // }),
79
- // strike: createBoolProp({
80
- // label: "Strike",
81
- // description: "Strike through",
82
- // }),
83
- // italic: createBoolProp({
84
- // label: "Italic",
85
- // description: "Italic Fonts",
86
- // }),
87
- // bold: createBoolProp({
88
- // label: "Bold",
89
- // description: "Bold",
90
- // }),
91
- },
92
- },
93
- {
94
- name: "Code",
95
- tag: "Code",
96
- ...ELEMENT_PROPS,
97
- },
98
- {
99
- name: "Pre",
100
- tag: "Pre",
101
- ...ELEMENT_PROPS,
102
- },
103
- {
104
- name: "Mark",
105
- tag: "Mark",
106
- ...ELEMENT_PROPS,
107
- },
108
- {
109
- name: "BR",
110
- tag: "BR",
111
- ...ELEMENT_PROPS,
112
- },
113
- {
114
- name: "Quote",
115
- tag: "Q",
116
- ...ELEMENT_PROPS,
117
- },
118
- {
119
- name: "BlockQuote",
120
- tag: "BlockQuote",
121
- ...ELEMENT_PROPS,
122
- },
123
- {
124
- name: "Time",
125
- tag: "Time",
126
- ...ELEMENT_PROPS,
127
- },
128
- {
129
- name: "UL",
130
- tag: "UL",
131
- ...ELEMENT_PROPS,
132
- },
133
- {
134
- name: "LI",
135
- tag: "LI",
136
- ...ELEMENT_PROPS,
137
- },
138
- {
139
- name: "HR",
140
- tag: "HR",
141
- ...ELEMENT_PROPS,
142
- },
143
- ];
@@ -1,152 +0,0 @@
1
- import {
2
- BLOCK_STYLES_SECTIONS,
3
- COMPONENT_TYPES,
4
- // createBoolProp,
5
- createTextProp,
6
- FORM_TYPES,
7
- GROUPS,
8
- Triggers,
9
- } from "@draftbit/types";
10
- const SEED_DATA_TRIGGERS = [Triggers.OnValueChange];
11
-
12
- const ELEMENT_PROPS = {
13
- category: COMPONENT_TYPES.element,
14
- doc_link: "https://www.npmjs.com/package/@expo/html-elements",
15
- code_link: "https://github.com/expo/expo/tree/master/packages/html-elements",
16
- stylesPanelSections: BLOCK_STYLES_SECTIONS,
17
- layout: {
18
- margin: 0,
19
- },
20
- triggers: SEED_DATA_TRIGGERS,
21
- };
22
-
23
- const HEADING_PROPS = {
24
- ...ELEMENT_PROPS,
25
- };
26
-
27
- export const SEED_DATA = [
28
- {
29
- name: "H1",
30
- tag: "H1",
31
- ...HEADING_PROPS,
32
- },
33
- {
34
- name: "H2",
35
- tag: "H2",
36
- ...HEADING_PROPS,
37
- },
38
- {
39
- name: "H3",
40
- tag: "H3",
41
- ...HEADING_PROPS,
42
- },
43
- {
44
- name: "H4",
45
- tag: "H4",
46
- ...HEADING_PROPS,
47
- },
48
- {
49
- name: "H5",
50
- tag: "H5",
51
- ...HEADING_PROPS,
52
- },
53
- {
54
- name: "H6",
55
- tag: "H6",
56
- ...HEADING_PROPS,
57
- },
58
- {
59
- name: "Anchor",
60
- tag: "A",
61
- ...ELEMENT_PROPS,
62
- props: {
63
- href: createTextProp({
64
- label: "href",
65
- description: "Specify the URL",
66
- defaultValue: "",
67
- }),
68
- target: {
69
- group: GROUPS.basic,
70
- label: "target",
71
- description: "decide where link should open",
72
- formType: FORM_TYPES.flatArray,
73
- defaultValue: "_blank",
74
- options: ["_blank", "_self", "_parent", "_top"],
75
- },
76
- },
77
- },
78
- {
79
- name: "Paragraph",
80
- tag: "P",
81
- ...ELEMENT_PROPS,
82
- props: {
83
- // NOTE - Keeping the props commented until we figure out a way to use this props from draftbit side.
84
- // strong: createBoolProp({
85
- // label: "Strong",
86
- // description: "Strong",
87
- // }),
88
- // strike: createBoolProp({
89
- // label: "Strike",
90
- // description: "Strike through",
91
- // }),
92
- // italic: createBoolProp({
93
- // label: "Italic",
94
- // description: "Italic Fonts",
95
- // }),
96
- // bold: createBoolProp({
97
- // label: "Bold",
98
- // description: "Bold",
99
- // }),
100
- },
101
- },
102
- {
103
- name: "Code",
104
- tag: "Code",
105
- ...ELEMENT_PROPS,
106
- },
107
- {
108
- name: "Pre",
109
- tag: "Pre",
110
- ...ELEMENT_PROPS,
111
- },
112
- {
113
- name: "Mark",
114
- tag: "Mark",
115
- ...ELEMENT_PROPS,
116
- },
117
- {
118
- name: "BR",
119
- tag: "BR",
120
- ...ELEMENT_PROPS,
121
- },
122
- {
123
- name: "Quote",
124
- tag: "Q",
125
- ...ELEMENT_PROPS,
126
- },
127
- {
128
- name: "BlockQuote",
129
- tag: "BlockQuote",
130
- ...ELEMENT_PROPS,
131
- },
132
- {
133
- name: "Time",
134
- tag: "Time",
135
- ...ELEMENT_PROPS,
136
- },
137
- {
138
- name: "UL",
139
- tag: "UL",
140
- ...ELEMENT_PROPS,
141
- },
142
- {
143
- name: "LI",
144
- tag: "LI",
145
- ...ELEMENT_PROPS,
146
- },
147
- {
148
- name: "HR",
149
- tag: "HR",
150
- ...ELEMENT_PROPS,
151
- },
152
- ];