@draftbit/core 47.1.1-2bc708.2 → 47.1.1-4be2f3.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.
- package/lib/commonjs/components/Container.js +15 -4
- package/lib/commonjs/constants.js +1 -1
- package/lib/commonjs/mappings/FlashList.js +28 -4
- package/lib/commonjs/mappings/FlatList.js +14 -0
- package/lib/commonjs/mappings/ScrollView.js +7 -1
- package/lib/commonjs/mappings/expo/Image.js +90 -0
- package/lib/module/constants.js +0 -1
- package/lib/module/mappings/FlashList.js +29 -5
- package/lib/module/mappings/FlatList.js +15 -1
- package/lib/module/mappings/ScrollView.js +8 -2
- package/lib/module/mappings/expo/Image.js +83 -0
- package/lib/typescript/src/mappings/FlashList.d.ts +57 -8
- package/lib/typescript/src/mappings/FlashList.d.ts.map +1 -1
- package/lib/typescript/src/mappings/FlatList.d.ts +30 -0
- package/lib/typescript/src/mappings/FlatList.d.ts.map +1 -1
- package/lib/typescript/src/mappings/ScrollView.d.ts +21 -0
- package/lib/typescript/src/mappings/ScrollView.d.ts.map +1 -1
- package/lib/typescript/src/mappings/expo/Image.d.ts +155 -0
- package/lib/typescript/src/mappings/expo/Image.d.ts.map +1 -0
- package/package.json +3 -3
- package/src/mappings/FlashList.js +29 -5
- package/src/mappings/FlashList.ts +33 -5
- package/src/mappings/FlatList.js +15 -1
- package/src/mappings/FlatList.ts +17 -0
- package/src/mappings/ScrollView.js +8 -2
- package/src/mappings/ScrollView.ts +10 -1
- package/src/mappings/expo/Image.js +107 -0
- package/src/mappings/expo/Image.ts +131 -0
|
@@ -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,
|
|
77
|
-
style: [containerStyle, style]
|
|
78
|
-
|
|
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;
|
|
@@ -30,10 +30,6 @@ const SEED_DATA = [{
|
|
|
30
30
|
step: 1,
|
|
31
31
|
precision: 0
|
|
32
32
|
}),
|
|
33
|
-
optimizeItemArrangement: (0, _types.createStaticBoolProp)({
|
|
34
|
-
label: "Optimize Item Arrangement",
|
|
35
|
-
description: "If enabled, MasonryFlashList will try to reduce difference in column height by modifying item order. If true, specifying overrideItemLayout is required. Default value is false."
|
|
36
|
-
}),
|
|
37
33
|
initialNumToRender: (0, _types.createStaticNumberProp)({
|
|
38
34
|
label: "Initial Num To Render",
|
|
39
35
|
description: "How many items to render in the initial batch",
|
|
@@ -43,6 +39,20 @@ const SEED_DATA = [{
|
|
|
43
39
|
label: "End Reached Threshold",
|
|
44
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.",
|
|
45
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
|
|
46
56
|
})
|
|
47
57
|
}
|
|
48
58
|
}, {
|
|
@@ -87,6 +97,20 @@ const SEED_DATA = [{
|
|
|
87
97
|
label: "End Reached Threshold",
|
|
88
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.",
|
|
89
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
|
|
90
114
|
})
|
|
91
115
|
}
|
|
92
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
|
};
|
|
@@ -12,7 +12,9 @@ const SEED_DATA = {
|
|
|
12
12
|
category: _types.COMPONENT_TYPES.view,
|
|
13
13
|
stylesPanelSections: _types.CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
14
14
|
layout: {},
|
|
15
|
+
triggers: [_types.Triggers.OnRefresh],
|
|
15
16
|
props: {
|
|
17
|
+
onRefresh: (0, _types.createActionProp)(),
|
|
16
18
|
horizontal: (0, _types.createStaticBoolProp)({
|
|
17
19
|
label: "Horizontal",
|
|
18
20
|
description: "Render your list horizontally",
|
|
@@ -21,7 +23,7 @@ const SEED_DATA = {
|
|
|
21
23
|
showsHorizontalScrollIndicator: (0, _types.createStaticBoolProp)({
|
|
22
24
|
label: "Show Horizontal Scroll Indicator",
|
|
23
25
|
description: "When true, shows a horizontal scroll indicator. The default value is true.",
|
|
24
|
-
defaultValue:
|
|
26
|
+
defaultValue: true
|
|
25
27
|
}),
|
|
26
28
|
showsVerticalScrollIndicator: (0, _types.createStaticBoolProp)({
|
|
27
29
|
label: "Show Vertical Scroll Indicator",
|
|
@@ -32,6 +34,10 @@ const SEED_DATA = {
|
|
|
32
34
|
label: "Bounce",
|
|
33
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.",
|
|
34
36
|
defaultValue: true
|
|
37
|
+
}),
|
|
38
|
+
refreshColor: (0, _types.createColorProp)({
|
|
39
|
+
label: "Refreshing Color",
|
|
40
|
+
description: "Color of the refresh indicator"
|
|
35
41
|
})
|
|
36
42
|
}
|
|
37
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: "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;
|
package/lib/module/constants.js
CHANGED
|
@@ -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",
|
|
@@ -24,10 +24,6 @@ export const SEED_DATA = [{
|
|
|
24
24
|
step: 1,
|
|
25
25
|
precision: 0
|
|
26
26
|
}),
|
|
27
|
-
optimizeItemArrangement: createStaticBoolProp({
|
|
28
|
-
label: "Optimize Item Arrangement",
|
|
29
|
-
description: "If enabled, MasonryFlashList will try to reduce difference in column height by modifying item order. If true, specifying overrideItemLayout is required. Default value is false."
|
|
30
|
-
}),
|
|
31
27
|
initialNumToRender: createStaticNumberProp({
|
|
32
28
|
label: "Initial Num To Render",
|
|
33
29
|
description: "How many items to render in the initial batch",
|
|
@@ -37,6 +33,20 @@ export const SEED_DATA = [{
|
|
|
37
33
|
label: "End Reached Threshold",
|
|
38
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.",
|
|
39
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
|
|
40
50
|
})
|
|
41
51
|
}
|
|
42
52
|
}, {
|
|
@@ -81,6 +91,20 @@ export const SEED_DATA = [{
|
|
|
81
91
|
label: "End Reached Threshold",
|
|
82
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.",
|
|
83
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
|
|
84
108
|
})
|
|
85
109
|
}
|
|
86
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 } 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",
|
|
@@ -6,7 +6,9 @@ export const SEED_DATA = {
|
|
|
6
6
|
category: COMPONENT_TYPES.view,
|
|
7
7
|
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
8
8
|
layout: {},
|
|
9
|
+
triggers: [Triggers.OnRefresh],
|
|
9
10
|
props: {
|
|
11
|
+
onRefresh: createActionProp(),
|
|
10
12
|
horizontal: createStaticBoolProp({
|
|
11
13
|
label: "Horizontal",
|
|
12
14
|
description: "Render your list horizontally",
|
|
@@ -15,7 +17,7 @@ export const SEED_DATA = {
|
|
|
15
17
|
showsHorizontalScrollIndicator: createStaticBoolProp({
|
|
16
18
|
label: "Show Horizontal Scroll Indicator",
|
|
17
19
|
description: "When true, shows a horizontal scroll indicator. The default value is true.",
|
|
18
|
-
defaultValue:
|
|
20
|
+
defaultValue: true
|
|
19
21
|
}),
|
|
20
22
|
showsVerticalScrollIndicator: createStaticBoolProp({
|
|
21
23
|
label: "Show Vertical Scroll Indicator",
|
|
@@ -26,6 +28,10 @@ export const SEED_DATA = {
|
|
|
26
28
|
label: "Bounce",
|
|
27
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.",
|
|
28
30
|
defaultValue: true
|
|
31
|
+
}),
|
|
32
|
+
refreshColor: createColorProp({
|
|
33
|
+
label: "Refreshing Color",
|
|
34
|
+
description: "Color of the refresh indicator"
|
|
29
35
|
})
|
|
30
36
|
}
|
|
31
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: "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
|
+
};
|
|
@@ -51,17 +51,18 @@ export declare const SEED_DATA: ({
|
|
|
51
51
|
required: boolean;
|
|
52
52
|
step: number;
|
|
53
53
|
};
|
|
54
|
-
|
|
54
|
+
initialNumToRender: {
|
|
55
55
|
label: string;
|
|
56
56
|
description: string;
|
|
57
57
|
formType: string;
|
|
58
58
|
propType: string;
|
|
59
|
-
|
|
59
|
+
group: string;
|
|
60
|
+
defaultValue: null;
|
|
60
61
|
editable: boolean;
|
|
61
62
|
required: boolean;
|
|
62
|
-
|
|
63
|
+
step: number;
|
|
63
64
|
};
|
|
64
|
-
|
|
65
|
+
onEndReachedThreshold: {
|
|
65
66
|
label: string;
|
|
66
67
|
description: string;
|
|
67
68
|
formType: string;
|
|
@@ -72,16 +73,35 @@ export declare const SEED_DATA: ({
|
|
|
72
73
|
required: boolean;
|
|
73
74
|
step: number;
|
|
74
75
|
};
|
|
75
|
-
|
|
76
|
+
refreshColor: {
|
|
77
|
+
group: string;
|
|
76
78
|
label: string;
|
|
77
79
|
description: string;
|
|
80
|
+
editable: boolean;
|
|
81
|
+
required: boolean;
|
|
82
|
+
defaultValue: null;
|
|
78
83
|
formType: string;
|
|
79
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;
|
|
80
94
|
group: string;
|
|
81
|
-
|
|
95
|
+
};
|
|
96
|
+
showsVerticalScrollIndicator: {
|
|
97
|
+
label: string;
|
|
98
|
+
description: string;
|
|
99
|
+
formType: string;
|
|
100
|
+
propType: string;
|
|
101
|
+
defaultValue: boolean;
|
|
82
102
|
editable: boolean;
|
|
83
103
|
required: boolean;
|
|
84
|
-
|
|
104
|
+
group: string;
|
|
85
105
|
};
|
|
86
106
|
horizontal?: undefined;
|
|
87
107
|
inverted?: undefined;
|
|
@@ -181,7 +201,36 @@ export declare const SEED_DATA: ({
|
|
|
181
201
|
required: boolean;
|
|
182
202
|
step: number;
|
|
183
203
|
};
|
|
184
|
-
|
|
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
|
+
};
|
|
185
234
|
};
|
|
186
235
|
})[];
|
|
187
236
|
//# sourceMappingURL=FlashList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlashList.d.ts","sourceRoot":"","sources":["../../../../src/mappings/FlashList.ts"],"names":[],"mappings":"
|
|
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":"
|
|
1
|
+
{"version":3,"file":"FlatList.d.ts","sourceRoot":"","sources":["../../../../src/mappings/FlatList.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDrB,CAAC"}
|
|
@@ -5,7 +5,18 @@ export declare const SEED_DATA: {
|
|
|
5
5
|
category: string;
|
|
6
6
|
stylesPanelSections: string[];
|
|
7
7
|
layout: {};
|
|
8
|
+
triggers: string[];
|
|
8
9
|
props: {
|
|
10
|
+
onRefresh: {
|
|
11
|
+
label: string;
|
|
12
|
+
description: string;
|
|
13
|
+
editable: boolean;
|
|
14
|
+
required: boolean;
|
|
15
|
+
formType: string;
|
|
16
|
+
propType: string;
|
|
17
|
+
defaultValue: null;
|
|
18
|
+
group: string;
|
|
19
|
+
};
|
|
9
20
|
horizontal: {
|
|
10
21
|
label: string;
|
|
11
22
|
description: string;
|
|
@@ -46,6 +57,16 @@ export declare const SEED_DATA: {
|
|
|
46
57
|
required: boolean;
|
|
47
58
|
group: string;
|
|
48
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
|
+
};
|
|
49
70
|
};
|
|
50
71
|
};
|
|
51
72
|
//# sourceMappingURL=ScrollView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollView.d.ts","sourceRoot":"","sources":["../../../../src/mappings/ScrollView.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScrollView.d.ts","sourceRoot":"","sources":["../../../../src/mappings/ScrollView.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCrB,CAAC"}
|