@draftbit/core 47.1.1-4be2f3.2 → 47.1.1-5f678a.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,6 +11,7 @@ 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); }
14
15
  const Container = _ref => {
15
16
  let {
16
17
  useThemeGutterPadding,
@@ -72,10 +73,9 @@ const Container = _ref => {
72
73
  };
73
74
  const Wrap = elevation ? _Elevation.default : _reactNative.View;
74
75
  if (elevation) containerStyle.elevation = elevation;
75
- return /*#__PURE__*/React.createElement(Wrap, {
76
- style: [containerStyle, style],
77
- ...rest
78
- }, backgroundImage ? /*#__PURE__*/React.createElement(_reactNative.ImageBackground, {
76
+ return /*#__PURE__*/React.createElement(Wrap, _extends({
77
+ style: [containerStyle, style]
78
+ }, rest), backgroundImage ? /*#__PURE__*/React.createElement(_reactNative.ImageBackground, {
79
79
  source: typeof backgroundImage === "string" ? {
80
80
  uri: backgroundImage
81
81
  } : backgroundImage,
@@ -90,15 +90,4 @@ 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);
104
93
  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;AR_HEIGHT;
15
+ exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;
@@ -12,7 +12,9 @@ const SEED_DATA = {
12
12
  description: "A map view",
13
13
  category: _types.COMPONENT_TYPES.map,
14
14
  layout: {
15
- flex: 1
15
+ flex: 1,
16
+ width: "100%",
17
+ height: "100%"
16
18
  },
17
19
  props: {
18
20
  provider: {
@@ -6,7 +6,9 @@ export const SEED_DATA = {
6
6
  description: "A map view",
7
7
  category: COMPONENT_TYPES.map,
8
8
  layout: {
9
- flex: 1
9
+ flex: 1,
10
+ width: "100%",
11
+ height: "100%"
10
12
  },
11
13
  props: {
12
14
  provider: {
@@ -6,6 +6,8 @@ export declare const SEED_DATA: {
6
6
  category: string;
7
7
  layout: {
8
8
  flex: number;
9
+ width: string;
10
+ height: string;
9
11
  };
10
12
  props: {
11
13
  provider: {
@@ -1 +1 @@
1
- {"version":3,"file":"MapView.d.ts","sourceRoot":"","sources":["../../../../src/mappings/MapView.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2IrB,CAAC"}
1
+ {"version":3,"file":"MapView.d.ts","sourceRoot":"","sources":["../../../../src/mappings/MapView.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6IrB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "47.1.1-4be2f3.2+4be2f3d",
3
+ "version": "47.1.1-5f678a.2+5f678a7",
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-4be2f3.2+4be2f3d",
44
+ "@draftbit/types": "^47.1.1-5f678a.2+5f678a7",
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": "4be2f3d27979c3891f02e80c0b0a7bf397d7d124"
94
+ "gitHead": "5f678a7061534ee81e34fff9ddced9bd61c0834d"
95
95
  }
@@ -7,6 +7,8 @@ export const SEED_DATA = {
7
7
  category: COMPONENT_TYPES.map,
8
8
  layout: {
9
9
  flex: 1,
10
+ width: "100%",
11
+ height: "100%",
10
12
  },
11
13
  props: {
12
14
  provider: {
@@ -17,6 +17,8 @@ export const SEED_DATA = {
17
17
  category: COMPONENT_TYPES.map,
18
18
  layout: {
19
19
  flex: 1,
20
+ width: "100%",
21
+ height: "100%",
20
22
  },
21
23
  props: {
22
24
  provider: {
@@ -1,90 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.SEED_DATA = void 0;
7
- var _types = require("@draftbit/types");
8
- const SEED_DATA = {
9
- name: "Image",
10
- tag: "Image",
11
- package: "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,83 +0,0 @@
1
- import { COMPONENT_TYPES, createImageProp, StylesPanelSections, createTextProp, createStaticBoolProp, createTextEnumProp, createStaticNumberProp, Triggers, createActionProp, GROUPS, createColorProp } from "@draftbit/types";
2
- export const SEED_DATA = {
3
- name: "Image",
4
- tag: "Image",
5
- package: "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
- };
@@ -1,155 +0,0 @@
1
- export declare const SEED_DATA: {
2
- name: string;
3
- tag: string;
4
- package: 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
@@ -1 +0,0 @@
1
- {"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../../../src/mappings/expo/Image.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoHrB,CAAC"}
@@ -1,107 +0,0 @@
1
- import { COMPONENT_TYPES, createImageProp, StylesPanelSections, createTextProp, createStaticBoolProp, createTextEnumProp, createStaticNumberProp, Triggers, createActionProp, GROUPS, createColorProp, } from "@draftbit/types";
2
- export const SEED_DATA = {
3
- name: "Image",
4
- tag: "Image",
5
- package: "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
- };
@@ -1,131 +0,0 @@
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: "Image",
17
- tag: "Image",
18
- package: "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
- };