@draftbit/core 47.1.1-1b33f0.2 → 47.1.1-1b6a84.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.
@@ -11,7 +11,6 @@ var _Elevation = _interopRequireDefault(require("./Elevation"));
11
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
12
  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); }
13
13
  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; }
14
- 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
14
  const Container = _ref => {
16
15
  let {
17
16
  useThemeGutterPadding,
@@ -73,9 +72,10 @@ const Container = _ref => {
73
72
  };
74
73
  const Wrap = elevation ? _Elevation.default : _reactNative.View;
75
74
  if (elevation) containerStyle.elevation = elevation;
76
- return /*#__PURE__*/React.createElement(Wrap, _extends({
77
- style: [containerStyle, style]
78
- }, rest), backgroundImage ? /*#__PURE__*/React.createElement(_reactNative.ImageBackground, {
75
+ return /*#__PURE__*/React.createElement(Wrap, {
76
+ style: [containerStyle, style],
77
+ ...rest
78
+ }, backgroundImage ? /*#__PURE__*/React.createElement(_reactNative.ImageBackground, {
79
79
  source: typeof backgroundImage === "string" ? {
80
80
  uri: backgroundImage
81
81
  } : backgroundImage,
@@ -90,4 +90,15 @@ const Container = _ref => {
90
90
  }, children));
91
91
  };
92
92
  var _default = (0, _theming.withTheme)(Container);
93
+ exports.default = _default;sizeMode: backgroundImageResizeMode,
94
+ style: {
95
+ flex: 1
96
+ }
97
+ }, /*#__PURE__*/React.createElement(_reactNative.View, {
98
+ style: innerStyle
99
+ }, children)) : /*#__PURE__*/React.createElement(_reactNative.View, {
100
+ style: innerStyle
101
+ }, children));
102
+ };
103
+ var _default = (0, _theming.withTheme)(Container);
93
104
  exports.default = _default;
@@ -12,4 +12,4 @@ const APPROX_STATUSBAR_HEIGHT = _reactNative.Platform.select({
12
12
  android: DEFAULT_STATUSBAR_HEIGHT_EXPO,
13
13
  ios: _reactNative.Platform.Version < 11 ? DEFAULT_STATUSBAR_HEIGHT_EXPO : 0
14
14
  });
15
- exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;
15
+ exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;AR_HEIGHT;
@@ -39,6 +39,20 @@ const SEED_DATA = [{
39
39
  label: "End Reached Threshold",
40
40
  description: "How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
41
41
  defaultValue: 0.5
42
+ }),
43
+ refreshColor: (0, _types.createColorProp)({
44
+ label: "Refreshing Color",
45
+ description: "Color of the refresh indicator"
46
+ }),
47
+ showsHorizontalScrollIndicator: (0, _types.createStaticBoolProp)({
48
+ label: "Show Horizontal Scroll Indicator",
49
+ description: "When true, shows a horizontal scroll indicator. The default value is true.",
50
+ defaultValue: true
51
+ }),
52
+ showsVerticalScrollIndicator: (0, _types.createStaticBoolProp)({
53
+ label: "Show Vertical Scroll Indicator",
54
+ description: "When true, shows a vertical scroll indicator. The default value is true.",
55
+ defaultValue: true
42
56
  })
43
57
  }
44
58
  }, {
@@ -83,6 +97,20 @@ const SEED_DATA = [{
83
97
  label: "End Reached Threshold",
84
98
  description: "How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
85
99
  defaultValue: 0.5
100
+ }),
101
+ refreshColor: (0, _types.createColorProp)({
102
+ label: "Refreshing Color",
103
+ description: "Color of the refresh indicator"
104
+ }),
105
+ showsHorizontalScrollIndicator: (0, _types.createStaticBoolProp)({
106
+ label: "Show Horizontal Scroll Indicator",
107
+ description: "When true, shows a horizontal scroll indicator. The default value is true.",
108
+ defaultValue: true
109
+ }),
110
+ showsVerticalScrollIndicator: (0, _types.createStaticBoolProp)({
111
+ label: "Show Vertical Scroll Indicator",
112
+ description: "When true, shows a vertical scroll indicator. The default value is true.",
113
+ defaultValue: true
86
114
  })
87
115
  }
88
116
  }];
@@ -38,6 +38,20 @@ const SEED_DATA = {
38
38
  label: "End Reached Threshold",
39
39
  description: "How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
40
40
  defaultValue: 0.5
41
+ }),
42
+ refreshColor: (0, _types.createColorProp)({
43
+ label: "Refreshing Color",
44
+ description: "Color of the refresh indicator"
45
+ }),
46
+ showsHorizontalScrollIndicator: (0, _types.createStaticBoolProp)({
47
+ label: "Show Horizontal Scroll Indicator",
48
+ description: "When true, shows a horizontal scroll indicator. The default value is true.",
49
+ defaultValue: true
50
+ }),
51
+ showsVerticalScrollIndicator: (0, _types.createStaticBoolProp)({
52
+ label: "Show Vertical Scroll Indicator",
53
+ description: "When true, shows a vertical scroll indicator. The default value is true.",
54
+ defaultValue: true
41
55
  })
42
56
  }
43
57
  };
@@ -23,7 +23,7 @@ const SEED_DATA = {
23
23
  showsHorizontalScrollIndicator: (0, _types.createStaticBoolProp)({
24
24
  label: "Show Horizontal Scroll Indicator",
25
25
  description: "When true, shows a horizontal scroll indicator. The default value is true.",
26
- defaultValue: false
26
+ defaultValue: true
27
27
  }),
28
28
  showsVerticalScrollIndicator: (0, _types.createStaticBoolProp)({
29
29
  label: "Show Vertical Scroll Indicator",
@@ -34,6 +34,10 @@ const SEED_DATA = {
34
34
  label: "Bounce",
35
35
  description: "When true, the scroll view bounces when it reaches the end of the content if the content is larger then the scroll view along the axis of the scroll direction.",
36
36
  defaultValue: true
37
+ }),
38
+ refreshColor: (0, _types.createColorProp)({
39
+ label: "Refreshing Color",
40
+ description: "Color of the refresh indicator"
37
41
  })
38
42
  }
39
43
  };
@@ -0,0 +1,90 @@
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: "Expo Image",
10
+ tag: "Image",
11
+ packageName: "expo-image",
12
+ collection: "Expo",
13
+ prefixCollectionOnImport: true,
14
+ description: "A responsive Image component",
15
+ category: _types.COMPONENT_TYPES.media,
16
+ stylesPanelSections: [_types.StylesPanelSections.Size, _types.StylesPanelSections.Margins, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects, _types.StylesPanelSections.Borders],
17
+ layout: {
18
+ width: 100,
19
+ height: 100
20
+ },
21
+ triggers: [_types.Triggers.OnLoad, _types.Triggers.OnError],
22
+ props: {
23
+ onLoad: (0, _types.createActionProp)(),
24
+ onError: (0, _types.createActionProp)(),
25
+ source: (0, _types.createImageProp)(),
26
+ placeholder: (0, _types.createImageProp)({
27
+ label: "Placeholder",
28
+ description: "An image to display while loading the proper image and no image has been displayed yet or the source is unset.",
29
+ required: false,
30
+ defaultValue: null
31
+ }),
32
+ contentFit: (0, _types.createTextEnumProp)({
33
+ label: "Content Fit",
34
+ description: 'Determines how the image should be resized to fit its container. This property tells the image to fill the container in a variety of ways; such as "preserve that aspect ratio" or "stretch up and take up as much space as possible". It mirrors the CSS object-fit property.',
35
+ options: ["cover", "contain", "fill", "none", "scale-down"],
36
+ defaultValue: null
37
+ }),
38
+ contentPosition: (0, _types.createTextEnumProp)({
39
+ label: "Content Position",
40
+ description: "It is used together with contentFit to specify how the image should be positioned with x/y coordinates inside its own container. An equivalent of the CSS object-position property.",
41
+ options: ["center", "top", "left", "right", "bottom", "top left", "top center", "top right", "left center", "left top", "left bottom", "right center", "right top", "right bottom", "bottom center", "bottom left", "bottom right"],
42
+ default: null
43
+ }),
44
+ cachePolicy: (0, _types.createTextEnumProp)({
45
+ label: "Cache Policy",
46
+ description: "Determines whether to cache the image and where: on the disk, in the memory or both.",
47
+ options: ["none", "disk", "memory", "memory-disk"],
48
+ defaultValue: null
49
+ }),
50
+ focusable: (0, _types.createStaticBoolProp)({
51
+ label: "Focusable",
52
+ description: "Whether this View should be focusable with a non-touch input device and receive focus with a hardware keyboard.",
53
+ group: _types.GROUPS.android,
54
+ defaultValue: null
55
+ }),
56
+ priority: (0, _types.createTextEnumProp)({
57
+ label: "Priority",
58
+ description: "Priorities for completing loads. If more than one load is queued at a time, the load with the higher priority will be started first. Priorities are considered best effort, there are no guarantees about the order in which loads will start or finish.",
59
+ options: ["normal", "high", "low"],
60
+ defaultValue: null
61
+ }),
62
+ responsivePolicy: (0, _types.createTextEnumProp)({
63
+ label: "Responsive Policy",
64
+ description: "Determines whether to choose image source based on container size only on mount or on every resize. Use initial to improve performance.",
65
+ options: ["initial", "live"],
66
+ defaultValue: null,
67
+ group: _types.GROUPS.web
68
+ }),
69
+ tintColor: (0, _types.createColorProp)({
70
+ label: "Tint Color",
71
+ description: "A color used to tint template images (a bitmap image where only the opacity matters). The color is applied to every non-transparent pixel, causing the image’s shape to adopt that color. This effect is not applied to placeholders."
72
+ }),
73
+ accessibilityLabel: (0, _types.createTextProp)({
74
+ label: "Accessibility Label",
75
+ description: "The text that's read by the screen reader when the user interacts with the image.",
76
+ defaultValue: null
77
+ }),
78
+ accessible: (0, _types.createStaticBoolProp)({
79
+ label: "Accessible",
80
+ description: "When true, indicates that the view is an accessibility element. When a view is an accessibility element, it groups its children into a single selectable component.",
81
+ defaultValue: null
82
+ }),
83
+ blurRadius: (0, _types.createStaticNumberProp)({
84
+ label: "Blur Radius",
85
+ description: "The radius of the blur in points, 0 means no blur effect. This effect is not applied to placeholders.",
86
+ defaultValue: null
87
+ })
88
+ }
89
+ };
90
+ exports.SEED_DATA = SEED_DATA;
@@ -1,4 +1,4 @@
1
- import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, CONTAINER_COMPONENT_STYLES_SECTIONS, GROUPS, Triggers, createActionProp, createStaticNumberProp } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, CONTAINER_COMPONENT_STYLES_SECTIONS, GROUPS, Triggers, createActionProp, createStaticNumberProp, createColorProp } from "@draftbit/types";
2
2
  export const SEED_DATA = [{
3
3
  name: "Masonry List",
4
4
  tag: "MasonryFlashList",
@@ -33,6 +33,20 @@ export const SEED_DATA = [{
33
33
  label: "End Reached Threshold",
34
34
  description: "How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
35
35
  defaultValue: 0.5
36
+ }),
37
+ refreshColor: createColorProp({
38
+ label: "Refreshing Color",
39
+ description: "Color of the refresh indicator"
40
+ }),
41
+ showsHorizontalScrollIndicator: createStaticBoolProp({
42
+ label: "Show Horizontal Scroll Indicator",
43
+ description: "When true, shows a horizontal scroll indicator. The default value is true.",
44
+ defaultValue: true
45
+ }),
46
+ showsVerticalScrollIndicator: createStaticBoolProp({
47
+ label: "Show Vertical Scroll Indicator",
48
+ description: "When true, shows a vertical scroll indicator. The default value is true.",
49
+ defaultValue: true
36
50
  })
37
51
  }
38
52
  }, {
@@ -77,6 +91,20 @@ export const SEED_DATA = [{
77
91
  label: "End Reached Threshold",
78
92
  description: "How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
79
93
  defaultValue: 0.5
94
+ }),
95
+ refreshColor: createColorProp({
96
+ label: "Refreshing Color",
97
+ description: "Color of the refresh indicator"
98
+ }),
99
+ showsHorizontalScrollIndicator: createStaticBoolProp({
100
+ label: "Show Horizontal Scroll Indicator",
101
+ description: "When true, shows a horizontal scroll indicator. The default value is true.",
102
+ defaultValue: true
103
+ }),
104
+ showsVerticalScrollIndicator: createStaticBoolProp({
105
+ label: "Show Vertical Scroll Indicator",
106
+ description: "When true, shows a vertical scroll indicator. The default value is true.",
107
+ defaultValue: true
80
108
  })
81
109
  }
82
110
  }];
@@ -1,4 +1,4 @@
1
- import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, Triggers, createActionProp, createStaticNumberProp } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, Triggers, createActionProp, createStaticNumberProp, createColorProp } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "List",
4
4
  tag: "FlatList",
@@ -32,6 +32,20 @@ export const SEED_DATA = {
32
32
  label: "End Reached Threshold",
33
33
  description: "How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
34
34
  defaultValue: 0.5
35
+ }),
36
+ refreshColor: createColorProp({
37
+ label: "Refreshing Color",
38
+ description: "Color of the refresh indicator"
39
+ }),
40
+ showsHorizontalScrollIndicator: createStaticBoolProp({
41
+ label: "Show Horizontal Scroll Indicator",
42
+ description: "When true, shows a horizontal scroll indicator. The default value is true.",
43
+ defaultValue: true
44
+ }),
45
+ showsVerticalScrollIndicator: createStaticBoolProp({
46
+ label: "Show Vertical Scroll Indicator",
47
+ description: "When true, shows a vertical scroll indicator. The default value is true.",
48
+ defaultValue: true
35
49
  })
36
50
  }
37
51
  };
@@ -1,4 +1,4 @@
1
- import { COMPONENT_TYPES, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, Triggers, createActionProp } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, Triggers, createActionProp, createColorProp } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "Scroll View",
4
4
  tag: "ScrollView",
@@ -17,7 +17,7 @@ export const SEED_DATA = {
17
17
  showsHorizontalScrollIndicator: createStaticBoolProp({
18
18
  label: "Show Horizontal Scroll Indicator",
19
19
  description: "When true, shows a horizontal scroll indicator. The default value is true.",
20
- defaultValue: false
20
+ defaultValue: true
21
21
  }),
22
22
  showsVerticalScrollIndicator: createStaticBoolProp({
23
23
  label: "Show Vertical Scroll Indicator",
@@ -28,6 +28,10 @@ export const SEED_DATA = {
28
28
  label: "Bounce",
29
29
  description: "When true, the scroll view bounces when it reaches the end of the content if the content is larger then the scroll view along the axis of the scroll direction.",
30
30
  defaultValue: true
31
+ }),
32
+ refreshColor: createColorProp({
33
+ label: "Refreshing Color",
34
+ description: "Color of the refresh indicator"
31
35
  })
32
36
  }
33
37
  };
@@ -0,0 +1,83 @@
1
+ import { COMPONENT_TYPES, createImageProp, StylesPanelSections, createTextProp, createStaticBoolProp, createTextEnumProp, createStaticNumberProp, Triggers, createActionProp, GROUPS, createColorProp } from "@draftbit/types";
2
+ export const SEED_DATA = {
3
+ name: "Expo Image",
4
+ tag: "Image",
5
+ packageName: "expo-image",
6
+ collection: "Expo",
7
+ prefixCollectionOnImport: true,
8
+ description: "A responsive Image component",
9
+ category: COMPONENT_TYPES.media,
10
+ stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins, StylesPanelSections.Position, StylesPanelSections.Effects, StylesPanelSections.Borders],
11
+ layout: {
12
+ width: 100,
13
+ height: 100
14
+ },
15
+ triggers: [Triggers.OnLoad, Triggers.OnError],
16
+ props: {
17
+ onLoad: createActionProp(),
18
+ onError: createActionProp(),
19
+ source: createImageProp(),
20
+ placeholder: createImageProp({
21
+ label: "Placeholder",
22
+ description: "An image to display while loading the proper image and no image has been displayed yet or the source is unset.",
23
+ required: false,
24
+ defaultValue: null
25
+ }),
26
+ contentFit: createTextEnumProp({
27
+ label: "Content Fit",
28
+ description: 'Determines how the image should be resized to fit its container. This property tells the image to fill the container in a variety of ways; such as "preserve that aspect ratio" or "stretch up and take up as much space as possible". It mirrors the CSS object-fit property.',
29
+ options: ["cover", "contain", "fill", "none", "scale-down"],
30
+ defaultValue: null
31
+ }),
32
+ contentPosition: createTextEnumProp({
33
+ label: "Content Position",
34
+ description: "It is used together with contentFit to specify how the image should be positioned with x/y coordinates inside its own container. An equivalent of the CSS object-position property.",
35
+ options: ["center", "top", "left", "right", "bottom", "top left", "top center", "top right", "left center", "left top", "left bottom", "right center", "right top", "right bottom", "bottom center", "bottom left", "bottom right"],
36
+ default: null
37
+ }),
38
+ cachePolicy: createTextEnumProp({
39
+ label: "Cache Policy",
40
+ description: "Determines whether to cache the image and where: on the disk, in the memory or both.",
41
+ options: ["none", "disk", "memory", "memory-disk"],
42
+ defaultValue: null
43
+ }),
44
+ focusable: createStaticBoolProp({
45
+ label: "Focusable",
46
+ description: "Whether this View should be focusable with a non-touch input device and receive focus with a hardware keyboard.",
47
+ group: GROUPS.android,
48
+ defaultValue: null
49
+ }),
50
+ priority: createTextEnumProp({
51
+ label: "Priority",
52
+ description: "Priorities for completing loads. If more than one load is queued at a time, the load with the higher priority will be started first. Priorities are considered best effort, there are no guarantees about the order in which loads will start or finish.",
53
+ options: ["normal", "high", "low"],
54
+ defaultValue: null
55
+ }),
56
+ responsivePolicy: createTextEnumProp({
57
+ label: "Responsive Policy",
58
+ description: "Determines whether to choose image source based on container size only on mount or on every resize. Use initial to improve performance.",
59
+ options: ["initial", "live"],
60
+ defaultValue: null,
61
+ group: GROUPS.web
62
+ }),
63
+ tintColor: createColorProp({
64
+ label: "Tint Color",
65
+ description: "A color used to tint template images (a bitmap image where only the opacity matters). The color is applied to every non-transparent pixel, causing the image’s shape to adopt that color. This effect is not applied to placeholders."
66
+ }),
67
+ accessibilityLabel: createTextProp({
68
+ label: "Accessibility Label",
69
+ description: "The text that's read by the screen reader when the user interacts with the image.",
70
+ defaultValue: null
71
+ }),
72
+ accessible: createStaticBoolProp({
73
+ label: "Accessible",
74
+ description: "When true, indicates that the view is an accessibility element. When a view is an accessibility element, it groups its children into a single selectable component.",
75
+ defaultValue: null
76
+ }),
77
+ blurRadius: createStaticNumberProp({
78
+ label: "Blur Radius",
79
+ description: "The radius of the blur in points, 0 means no blur effect. This effect is not applied to placeholders.",
80
+ defaultValue: null
81
+ })
82
+ }
83
+ };
@@ -73,6 +73,36 @@ export declare const SEED_DATA: ({
73
73
  required: boolean;
74
74
  step: number;
75
75
  };
76
+ refreshColor: {
77
+ group: string;
78
+ label: string;
79
+ description: string;
80
+ editable: boolean;
81
+ required: boolean;
82
+ defaultValue: null;
83
+ formType: string;
84
+ propType: string;
85
+ };
86
+ showsHorizontalScrollIndicator: {
87
+ label: string;
88
+ description: string;
89
+ formType: string;
90
+ propType: string;
91
+ defaultValue: boolean;
92
+ editable: boolean;
93
+ required: boolean;
94
+ group: string;
95
+ };
96
+ showsVerticalScrollIndicator: {
97
+ label: string;
98
+ description: string;
99
+ formType: string;
100
+ propType: string;
101
+ defaultValue: boolean;
102
+ editable: boolean;
103
+ required: boolean;
104
+ group: string;
105
+ };
76
106
  horizontal?: undefined;
77
107
  inverted?: undefined;
78
108
  };
@@ -171,6 +201,36 @@ export declare const SEED_DATA: ({
171
201
  required: boolean;
172
202
  step: number;
173
203
  };
204
+ refreshColor: {
205
+ group: string;
206
+ label: string;
207
+ description: string;
208
+ editable: boolean;
209
+ required: boolean;
210
+ defaultValue: null;
211
+ formType: string;
212
+ propType: string;
213
+ };
214
+ showsHorizontalScrollIndicator: {
215
+ label: string;
216
+ description: string;
217
+ formType: string;
218
+ propType: string;
219
+ defaultValue: boolean;
220
+ editable: boolean;
221
+ required: boolean;
222
+ group: string;
223
+ };
224
+ showsVerticalScrollIndicator: {
225
+ label: string;
226
+ description: string;
227
+ formType: string;
228
+ propType: string;
229
+ defaultValue: boolean;
230
+ editable: boolean;
231
+ required: boolean;
232
+ group: string;
233
+ };
174
234
  };
175
235
  })[];
176
236
  //# sourceMappingURL=FlashList.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FlashList.d.ts","sourceRoot":"","sources":["../../../../src/mappings/FlashList.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqFrB,CAAC"}
1
+ {"version":3,"file":"FlashList.d.ts","sourceRoot":"","sources":["../../../../src/mappings/FlashList.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqHrB,CAAC"}
@@ -81,6 +81,36 @@ export declare const SEED_DATA: {
81
81
  required: boolean;
82
82
  step: number;
83
83
  };
84
+ refreshColor: {
85
+ group: string;
86
+ label: string;
87
+ description: string;
88
+ editable: boolean;
89
+ required: boolean;
90
+ defaultValue: null;
91
+ formType: string;
92
+ propType: string;
93
+ };
94
+ showsHorizontalScrollIndicator: {
95
+ label: string;
96
+ description: string;
97
+ formType: string;
98
+ propType: string;
99
+ defaultValue: boolean;
100
+ editable: boolean;
101
+ required: boolean;
102
+ group: string;
103
+ };
104
+ showsVerticalScrollIndicator: {
105
+ label: string;
106
+ description: string;
107
+ formType: string;
108
+ propType: string;
109
+ defaultValue: boolean;
110
+ editable: boolean;
111
+ required: boolean;
112
+ group: string;
113
+ };
84
114
  };
85
115
  };
86
116
  //# sourceMappingURL=FlatList.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FlatList.d.ts","sourceRoot":"","sources":["../../../../src/mappings/FlatList.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCrB,CAAC"}
1
+ {"version":3,"file":"FlatList.d.ts","sourceRoot":"","sources":["../../../../src/mappings/FlatList.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDrB,CAAC"}
@@ -57,6 +57,16 @@ export declare const SEED_DATA: {
57
57
  required: boolean;
58
58
  group: string;
59
59
  };
60
+ refreshColor: {
61
+ group: string;
62
+ label: string;
63
+ description: string;
64
+ editable: boolean;
65
+ required: boolean;
66
+ defaultValue: null;
67
+ formType: string;
68
+ propType: string;
69
+ };
60
70
  };
61
71
  };
62
72
  //# sourceMappingURL=ScrollView.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ScrollView.d.ts","sourceRoot":"","sources":["../../../../src/mappings/ScrollView.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCrB,CAAC"}
1
+ {"version":3,"file":"ScrollView.d.ts","sourceRoot":"","sources":["../../../../src/mappings/ScrollView.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCrB,CAAC"}
@@ -0,0 +1,155 @@
1
+ export declare const SEED_DATA: {
2
+ name: string;
3
+ tag: string;
4
+ packageName: string;
5
+ collection: string;
6
+ prefixCollectionOnImport: boolean;
7
+ description: string;
8
+ category: string;
9
+ stylesPanelSections: string[];
10
+ layout: {
11
+ width: number;
12
+ height: number;
13
+ };
14
+ triggers: string[];
15
+ props: {
16
+ onLoad: {
17
+ label: string;
18
+ description: string;
19
+ editable: boolean;
20
+ required: boolean;
21
+ formType: string;
22
+ propType: string;
23
+ defaultValue: null;
24
+ group: string;
25
+ };
26
+ onError: {
27
+ label: string;
28
+ description: string;
29
+ editable: boolean;
30
+ required: boolean;
31
+ formType: string;
32
+ propType: string;
33
+ defaultValue: null;
34
+ group: string;
35
+ };
36
+ source: {
37
+ label: string;
38
+ description: string;
39
+ group: string;
40
+ formType: string;
41
+ propType: string;
42
+ defaultValue: string;
43
+ editable: boolean;
44
+ required: boolean;
45
+ };
46
+ placeholder: {
47
+ label: string;
48
+ description: string;
49
+ group: string;
50
+ formType: string;
51
+ propType: string;
52
+ defaultValue: string;
53
+ editable: boolean;
54
+ required: boolean;
55
+ };
56
+ contentFit: {
57
+ group: string;
58
+ label: string;
59
+ description: string;
60
+ editable: boolean;
61
+ required: boolean;
62
+ formType: string;
63
+ propType: string;
64
+ defaultValue: null;
65
+ options: never[];
66
+ };
67
+ contentPosition: {
68
+ group: string;
69
+ label: string;
70
+ description: string;
71
+ editable: boolean;
72
+ required: boolean;
73
+ formType: string;
74
+ propType: string;
75
+ defaultValue: null;
76
+ options: never[];
77
+ };
78
+ cachePolicy: {
79
+ group: string;
80
+ label: string;
81
+ description: string;
82
+ editable: boolean;
83
+ required: boolean;
84
+ formType: string;
85
+ propType: string;
86
+ defaultValue: null;
87
+ options: never[];
88
+ };
89
+ focusable: {
90
+ label: string;
91
+ description: string;
92
+ formType: string;
93
+ propType: string;
94
+ defaultValue: boolean;
95
+ editable: boolean;
96
+ required: boolean;
97
+ group: string;
98
+ };
99
+ priority: {
100
+ group: string;
101
+ label: string;
102
+ description: string;
103
+ editable: boolean;
104
+ required: boolean;
105
+ formType: string;
106
+ propType: string;
107
+ defaultValue: null;
108
+ options: never[];
109
+ };
110
+ responsivePolicy: {
111
+ group: string;
112
+ label: string;
113
+ description: string;
114
+ editable: boolean;
115
+ required: boolean;
116
+ formType: string;
117
+ propType: string;
118
+ defaultValue: null;
119
+ options: never[];
120
+ };
121
+ tintColor: {
122
+ group: string;
123
+ label: string;
124
+ description: string;
125
+ editable: boolean;
126
+ required: boolean;
127
+ defaultValue: null;
128
+ formType: string;
129
+ propType: string;
130
+ };
131
+ accessibilityLabel: any;
132
+ accessible: {
133
+ label: string;
134
+ description: string;
135
+ formType: string;
136
+ propType: string;
137
+ defaultValue: boolean;
138
+ editable: boolean;
139
+ required: boolean;
140
+ group: string;
141
+ };
142
+ blurRadius: {
143
+ label: string;
144
+ description: string;
145
+ formType: string;
146
+ propType: string;
147
+ group: string;
148
+ defaultValue: null;
149
+ editable: boolean;
150
+ required: boolean;
151
+ step: number;
152
+ };
153
+ };
154
+ };
155
+ //# sourceMappingURL=Image.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../../../src/mappings/expo/Image.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoHrB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "47.1.1-1b33f0.2+1b33f0e",
3
+ "version": "47.1.1-1b6a84.2+1b6a849",
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": "^47.1.1-1b33f0.2+1b33f0e",
44
+ "@draftbit/types": "^47.1.1-1b6a84.2+1b6a849",
45
45
  "@material-ui/core": "^4.11.0",
46
46
  "@material-ui/pickers": "^3.2.10",
47
47
  "@react-native-community/slider": "4.2.4",
@@ -91,5 +91,5 @@
91
91
  ]
92
92
  ]
93
93
  },
94
- "gitHead": "1b33f0e5ab8440108af2f836998aea2282b8f557"
94
+ "gitHead": "1b6a8493182d42aff6978579f4475e94569a4fd6"
95
95
  }
@@ -1,4 +1,4 @@
1
- import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, CONTAINER_COMPONENT_STYLES_SECTIONS, GROUPS, Triggers, createActionProp, createStaticNumberProp, } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, CONTAINER_COMPONENT_STYLES_SECTIONS, GROUPS, Triggers, createActionProp, createStaticNumberProp, createColorProp, } from "@draftbit/types";
2
2
  export const SEED_DATA = [
3
3
  {
4
4
  name: "Masonry List",
@@ -35,6 +35,20 @@ export const SEED_DATA = [
35
35
  description: "How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
36
36
  defaultValue: 0.5,
37
37
  }),
38
+ refreshColor: createColorProp({
39
+ label: "Refreshing Color",
40
+ description: "Color of the refresh indicator",
41
+ }),
42
+ showsHorizontalScrollIndicator: createStaticBoolProp({
43
+ label: "Show Horizontal Scroll Indicator",
44
+ description: "When true, shows a horizontal scroll indicator. The default value is true.",
45
+ defaultValue: true,
46
+ }),
47
+ showsVerticalScrollIndicator: createStaticBoolProp({
48
+ label: "Show Vertical Scroll Indicator",
49
+ description: "When true, shows a vertical scroll indicator. The default value is true.",
50
+ defaultValue: true,
51
+ }),
38
52
  },
39
53
  },
40
54
  {
@@ -80,6 +94,20 @@ export const SEED_DATA = [
80
94
  description: "How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
81
95
  defaultValue: 0.5,
82
96
  }),
97
+ refreshColor: createColorProp({
98
+ label: "Refreshing Color",
99
+ description: "Color of the refresh indicator",
100
+ }),
101
+ showsHorizontalScrollIndicator: createStaticBoolProp({
102
+ label: "Show Horizontal Scroll Indicator",
103
+ description: "When true, shows a horizontal scroll indicator. The default value is true.",
104
+ defaultValue: true,
105
+ }),
106
+ showsVerticalScrollIndicator: createStaticBoolProp({
107
+ label: "Show Vertical Scroll Indicator",
108
+ description: "When true, shows a vertical scroll indicator. The default value is true.",
109
+ defaultValue: true,
110
+ }),
83
111
  },
84
112
  },
85
113
  ];
@@ -8,6 +8,7 @@ import {
8
8
  Triggers,
9
9
  createActionProp,
10
10
  createStaticNumberProp,
11
+ createColorProp,
11
12
  } from "@draftbit/types";
12
13
 
13
14
  export const SEED_DATA = [
@@ -47,6 +48,22 @@ export const SEED_DATA = [
47
48
  "How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
48
49
  defaultValue: 0.5,
49
50
  }),
51
+ refreshColor: createColorProp({
52
+ label: "Refreshing Color",
53
+ description: "Color of the refresh indicator",
54
+ }),
55
+ showsHorizontalScrollIndicator: createStaticBoolProp({
56
+ label: "Show Horizontal Scroll Indicator",
57
+ description:
58
+ "When true, shows a horizontal scroll indicator. The default value is true.",
59
+ defaultValue: true,
60
+ }),
61
+ showsVerticalScrollIndicator: createStaticBoolProp({
62
+ label: "Show Vertical Scroll Indicator",
63
+ description:
64
+ "When true, shows a vertical scroll indicator. The default value is true.",
65
+ defaultValue: true,
66
+ }),
50
67
  },
51
68
  },
52
69
  {
@@ -93,6 +110,22 @@ export const SEED_DATA = [
93
110
  "How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
94
111
  defaultValue: 0.5,
95
112
  }),
113
+ refreshColor: createColorProp({
114
+ label: "Refreshing Color",
115
+ description: "Color of the refresh indicator",
116
+ }),
117
+ showsHorizontalScrollIndicator: createStaticBoolProp({
118
+ label: "Show Horizontal Scroll Indicator",
119
+ description:
120
+ "When true, shows a horizontal scroll indicator. The default value is true.",
121
+ defaultValue: true,
122
+ }),
123
+ showsVerticalScrollIndicator: createStaticBoolProp({
124
+ label: "Show Vertical Scroll Indicator",
125
+ description:
126
+ "When true, shows a vertical scroll indicator. The default value is true.",
127
+ defaultValue: true,
128
+ }),
96
129
  },
97
130
  },
98
131
  ];
@@ -1,4 +1,4 @@
1
- import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, Triggers, createActionProp, createStaticNumberProp, } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, Triggers, createActionProp, createStaticNumberProp, createColorProp, } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "List",
4
4
  tag: "FlatList",
@@ -33,5 +33,19 @@ export const SEED_DATA = {
33
33
  description: "How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
34
34
  defaultValue: 0.5,
35
35
  }),
36
+ refreshColor: createColorProp({
37
+ label: "Refreshing Color",
38
+ description: "Color of the refresh indicator",
39
+ }),
40
+ showsHorizontalScrollIndicator: createStaticBoolProp({
41
+ label: "Show Horizontal Scroll Indicator",
42
+ description: "When true, shows a horizontal scroll indicator. The default value is true.",
43
+ defaultValue: true,
44
+ }),
45
+ showsVerticalScrollIndicator: createStaticBoolProp({
46
+ label: "Show Vertical Scroll Indicator",
47
+ description: "When true, shows a vertical scroll indicator. The default value is true.",
48
+ defaultValue: true,
49
+ }),
36
50
  },
37
51
  };
@@ -6,6 +6,7 @@ import {
6
6
  Triggers,
7
7
  createActionProp,
8
8
  createStaticNumberProp,
9
+ createColorProp,
9
10
  } from "@draftbit/types";
10
11
 
11
12
  export const SEED_DATA = {
@@ -43,5 +44,21 @@ export const SEED_DATA = {
43
44
  "How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
44
45
  defaultValue: 0.5,
45
46
  }),
47
+ refreshColor: createColorProp({
48
+ label: "Refreshing Color",
49
+ description: "Color of the refresh indicator",
50
+ }),
51
+ showsHorizontalScrollIndicator: createStaticBoolProp({
52
+ label: "Show Horizontal Scroll Indicator",
53
+ description:
54
+ "When true, shows a horizontal scroll indicator. The default value is true.",
55
+ defaultValue: true,
56
+ }),
57
+ showsVerticalScrollIndicator: createStaticBoolProp({
58
+ label: "Show Vertical Scroll Indicator",
59
+ description:
60
+ "When true, shows a vertical scroll indicator. The default value is true.",
61
+ defaultValue: true,
62
+ }),
46
63
  },
47
64
  };
@@ -1,4 +1,4 @@
1
- import { COMPONENT_TYPES, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, Triggers, createActionProp, } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, Triggers, createActionProp, createColorProp, } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "Scroll View",
4
4
  tag: "ScrollView",
@@ -17,7 +17,7 @@ export const SEED_DATA = {
17
17
  showsHorizontalScrollIndicator: createStaticBoolProp({
18
18
  label: "Show Horizontal Scroll Indicator",
19
19
  description: "When true, shows a horizontal scroll indicator. The default value is true.",
20
- defaultValue: false,
20
+ defaultValue: true,
21
21
  }),
22
22
  showsVerticalScrollIndicator: createStaticBoolProp({
23
23
  label: "Show Vertical Scroll Indicator",
@@ -29,5 +29,9 @@ export const SEED_DATA = {
29
29
  description: "When true, the scroll view bounces when it reaches the end of the content if the content is larger then the scroll view along the axis of the scroll direction.",
30
30
  defaultValue: true,
31
31
  }),
32
+ refreshColor: createColorProp({
33
+ label: "Refreshing Color",
34
+ description: "Color of the refresh indicator",
35
+ }),
32
36
  },
33
37
  };
@@ -4,6 +4,7 @@ import {
4
4
  CONTAINER_COMPONENT_STYLES_SECTIONS,
5
5
  Triggers,
6
6
  createActionProp,
7
+ createColorProp,
7
8
  } from "@draftbit/types";
8
9
 
9
10
  export const SEED_DATA = {
@@ -25,7 +26,7 @@ export const SEED_DATA = {
25
26
  label: "Show Horizontal Scroll Indicator",
26
27
  description:
27
28
  "When true, shows a horizontal scroll indicator. The default value is true.",
28
- defaultValue: false,
29
+ defaultValue: true,
29
30
  }),
30
31
  showsVerticalScrollIndicator: createStaticBoolProp({
31
32
  label: "Show Vertical Scroll Indicator",
@@ -39,5 +40,9 @@ export const SEED_DATA = {
39
40
  "When true, the scroll view bounces when it reaches the end of the content if the content is larger then the scroll view along the axis of the scroll direction.",
40
41
  defaultValue: true,
41
42
  }),
43
+ refreshColor: createColorProp({
44
+ label: "Refreshing Color",
45
+ description: "Color of the refresh indicator",
46
+ }),
42
47
  },
43
48
  };
@@ -0,0 +1,107 @@
1
+ import { COMPONENT_TYPES, createImageProp, StylesPanelSections, createTextProp, createStaticBoolProp, createTextEnumProp, createStaticNumberProp, Triggers, createActionProp, GROUPS, createColorProp, } from "@draftbit/types";
2
+ export const SEED_DATA = {
3
+ name: "Expo Image",
4
+ tag: "Image",
5
+ packageName: "expo-image",
6
+ collection: "Expo",
7
+ prefixCollectionOnImport: true,
8
+ description: "A responsive Image component",
9
+ category: COMPONENT_TYPES.media,
10
+ stylesPanelSections: [
11
+ StylesPanelSections.Size,
12
+ StylesPanelSections.Margins,
13
+ StylesPanelSections.Position,
14
+ StylesPanelSections.Effects,
15
+ StylesPanelSections.Borders,
16
+ ],
17
+ layout: {
18
+ width: 100,
19
+ height: 100,
20
+ },
21
+ triggers: [Triggers.OnLoad, Triggers.OnError],
22
+ props: {
23
+ onLoad: createActionProp(),
24
+ onError: createActionProp(),
25
+ source: createImageProp(),
26
+ placeholder: createImageProp({
27
+ label: "Placeholder",
28
+ description: "An image to display while loading the proper image and no image has been displayed yet or the source is unset.",
29
+ required: false,
30
+ defaultValue: null,
31
+ }),
32
+ contentFit: createTextEnumProp({
33
+ label: "Content Fit",
34
+ description: 'Determines how the image should be resized to fit its container. This property tells the image to fill the container in a variety of ways; such as "preserve that aspect ratio" or "stretch up and take up as much space as possible". It mirrors the CSS object-fit property.',
35
+ options: ["cover", "contain", "fill", "none", "scale-down"],
36
+ defaultValue: null,
37
+ }),
38
+ contentPosition: createTextEnumProp({
39
+ label: "Content Position",
40
+ description: "It is used together with contentFit to specify how the image should be positioned with x/y coordinates inside its own container. An equivalent of the CSS object-position property.",
41
+ options: [
42
+ "center",
43
+ "top",
44
+ "left",
45
+ "right",
46
+ "bottom",
47
+ "top left",
48
+ "top center",
49
+ "top right",
50
+ "left center",
51
+ "left top",
52
+ "left bottom",
53
+ "right center",
54
+ "right top",
55
+ "right bottom",
56
+ "bottom center",
57
+ "bottom left",
58
+ "bottom right",
59
+ ],
60
+ default: null,
61
+ }),
62
+ cachePolicy: createTextEnumProp({
63
+ label: "Cache Policy",
64
+ description: "Determines whether to cache the image and where: on the disk, in the memory or both.",
65
+ options: ["none", "disk", "memory", "memory-disk"],
66
+ defaultValue: null,
67
+ }),
68
+ focusable: createStaticBoolProp({
69
+ label: "Focusable",
70
+ description: "Whether this View should be focusable with a non-touch input device and receive focus with a hardware keyboard.",
71
+ group: GROUPS.android,
72
+ defaultValue: null,
73
+ }),
74
+ priority: createTextEnumProp({
75
+ label: "Priority",
76
+ description: "Priorities for completing loads. If more than one load is queued at a time, the load with the higher priority will be started first. Priorities are considered best effort, there are no guarantees about the order in which loads will start or finish.",
77
+ options: ["normal", "high", "low"],
78
+ defaultValue: null,
79
+ }),
80
+ responsivePolicy: createTextEnumProp({
81
+ label: "Responsive Policy",
82
+ description: "Determines whether to choose image source based on container size only on mount or on every resize. Use initial to improve performance.",
83
+ options: ["initial", "live"],
84
+ defaultValue: null,
85
+ group: GROUPS.web,
86
+ }),
87
+ tintColor: createColorProp({
88
+ label: "Tint Color",
89
+ description: "A color used to tint template images (a bitmap image where only the opacity matters). The color is applied to every non-transparent pixel, causing the image’s shape to adopt that color. This effect is not applied to placeholders.",
90
+ }),
91
+ accessibilityLabel: createTextProp({
92
+ label: "Accessibility Label",
93
+ description: "The text that's read by the screen reader when the user interacts with the image.",
94
+ defaultValue: null,
95
+ }),
96
+ accessible: createStaticBoolProp({
97
+ label: "Accessible",
98
+ description: "When true, indicates that the view is an accessibility element. When a view is an accessibility element, it groups its children into a single selectable component.",
99
+ defaultValue: null,
100
+ }),
101
+ blurRadius: createStaticNumberProp({
102
+ label: "Blur Radius",
103
+ description: "The radius of the blur in points, 0 means no blur effect. This effect is not applied to placeholders.",
104
+ defaultValue: null,
105
+ }),
106
+ },
107
+ };
@@ -0,0 +1,131 @@
1
+ import {
2
+ COMPONENT_TYPES,
3
+ createImageProp,
4
+ StylesPanelSections,
5
+ createTextProp,
6
+ createStaticBoolProp,
7
+ createTextEnumProp,
8
+ createStaticNumberProp,
9
+ Triggers,
10
+ createActionProp,
11
+ GROUPS,
12
+ createColorProp,
13
+ } from "@draftbit/types";
14
+
15
+ export const SEED_DATA = {
16
+ name: "Expo Image",
17
+ tag: "Image",
18
+ packageName: "expo-image",
19
+ collection: "Expo",
20
+ prefixCollectionOnImport: true,
21
+ description: "A responsive Image component",
22
+ category: COMPONENT_TYPES.media,
23
+ stylesPanelSections: [
24
+ StylesPanelSections.Size,
25
+ StylesPanelSections.Margins,
26
+ StylesPanelSections.Position,
27
+ StylesPanelSections.Effects,
28
+ StylesPanelSections.Borders,
29
+ ],
30
+ layout: {
31
+ width: 100,
32
+ height: 100,
33
+ },
34
+ triggers: [Triggers.OnLoad, Triggers.OnError],
35
+ props: {
36
+ onLoad: createActionProp(),
37
+ onError: createActionProp(),
38
+ source: createImageProp(),
39
+ placeholder: createImageProp({
40
+ label: "Placeholder",
41
+ description:
42
+ "An image to display while loading the proper image and no image has been displayed yet or the source is unset.",
43
+ required: false,
44
+ defaultValue: null,
45
+ }),
46
+ contentFit: createTextEnumProp({
47
+ label: "Content Fit",
48
+ description:
49
+ 'Determines how the image should be resized to fit its container. This property tells the image to fill the container in a variety of ways; such as "preserve that aspect ratio" or "stretch up and take up as much space as possible". It mirrors the CSS object-fit property.',
50
+ options: ["cover", "contain", "fill", "none", "scale-down"],
51
+ defaultValue: null,
52
+ }),
53
+ contentPosition: createTextEnumProp({
54
+ label: "Content Position",
55
+ description:
56
+ "It is used together with contentFit to specify how the image should be positioned with x/y coordinates inside its own container. An equivalent of the CSS object-position property.",
57
+ options: [
58
+ "center",
59
+ "top",
60
+ "left",
61
+ "right",
62
+ "bottom",
63
+ "top left",
64
+ "top center",
65
+ "top right",
66
+ "left center",
67
+ "left top",
68
+ "left bottom",
69
+ "right center",
70
+ "right top",
71
+ "right bottom",
72
+ "bottom center",
73
+ "bottom left",
74
+ "bottom right",
75
+ ],
76
+ default: null,
77
+ }),
78
+ cachePolicy: createTextEnumProp({
79
+ label: "Cache Policy",
80
+ description:
81
+ "Determines whether to cache the image and where: on the disk, in the memory or both.",
82
+ options: ["none", "disk", "memory", "memory-disk"],
83
+ defaultValue: null,
84
+ }),
85
+ focusable: createStaticBoolProp({
86
+ label: "Focusable",
87
+ description:
88
+ "Whether this View should be focusable with a non-touch input device and receive focus with a hardware keyboard.",
89
+ group: GROUPS.android,
90
+ defaultValue: null,
91
+ }),
92
+ priority: createTextEnumProp({
93
+ label: "Priority",
94
+ description:
95
+ "Priorities for completing loads. If more than one load is queued at a time, the load with the higher priority will be started first. Priorities are considered best effort, there are no guarantees about the order in which loads will start or finish.",
96
+ options: ["normal", "high", "low"],
97
+ defaultValue: null,
98
+ }),
99
+ responsivePolicy: createTextEnumProp({
100
+ label: "Responsive Policy",
101
+ description:
102
+ "Determines whether to choose image source based on container size only on mount or on every resize. Use initial to improve performance.",
103
+ options: ["initial", "live"],
104
+ defaultValue: null,
105
+ group: GROUPS.web,
106
+ }),
107
+ tintColor: createColorProp({
108
+ label: "Tint Color",
109
+ description:
110
+ "A color used to tint template images (a bitmap image where only the opacity matters). The color is applied to every non-transparent pixel, causing the image’s shape to adopt that color. This effect is not applied to placeholders.",
111
+ }),
112
+ accessibilityLabel: createTextProp({
113
+ label: "Accessibility Label",
114
+ description:
115
+ "The text that's read by the screen reader when the user interacts with the image.",
116
+ defaultValue: null,
117
+ }),
118
+ accessible: createStaticBoolProp({
119
+ label: "Accessible",
120
+ description:
121
+ "When true, indicates that the view is an accessibility element. When a view is an accessibility element, it groups its children into a single selectable component.",
122
+ defaultValue: null,
123
+ }),
124
+ blurRadius: createStaticNumberProp({
125
+ label: "Blur Radius",
126
+ description:
127
+ "The radius of the blur in points, 0 means no blur effect. This effect is not applied to placeholders.",
128
+ defaultValue: null,
129
+ }),
130
+ },
131
+ };