@draftbit/core 46.2.4-2f63da.5 → 46.2.4-3ab91b.10
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/{Svg.js → SVG.js} +7 -3
- package/lib/commonjs/constants.js +1 -1
- package/lib/commonjs/index.js +7 -7
- package/lib/commonjs/mappings/FlashList.js +42 -0
- package/lib/commonjs/mappings/{Svg.js → SVG.js} +1 -2
- package/lib/module/components/{Svg.js → SVG.js} +4 -3
- package/lib/module/index.js +1 -1
- package/lib/module/mappings/FlashList.js +33 -0
- package/lib/module/mappings/{Svg.js → SVG.js} +2 -3
- package/lib/typescript/src/components/SVG.d.ts +8 -0
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/mappings/FlashList.d.ts +54 -0
- package/lib/typescript/src/mappings/{Svg.d.ts → SVG.d.ts} +0 -1
- package/package.json +5 -4
- package/src/components/{Svg.js → SVG.js} +3 -2
- package/src/components/{Svg.tsx → SVG.tsx} +13 -3
- package/src/index.js +1 -1
- package/src/index.tsx +1 -1
- package/src/mappings/FlashList.js +33 -0
- package/src/mappings/FlashList.ts +41 -0
- package/src/mappings/{Svg.js → SVG.js} +2 -3
- package/src/mappings/{Svg.ts → SVG.ts} +2 -3
- package/lib/typescript/src/components/Svg.d.ts +0 -6
|
@@ -11,13 +11,17 @@ var _reactNative = require("react-native");
|
|
|
11
11
|
|
|
12
12
|
var _reactNativeSvg = require("react-native-svg");
|
|
13
13
|
|
|
14
|
+
var _Config = _interopRequireDefault(require("./Config"));
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
14
18
|
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); }
|
|
15
19
|
|
|
16
20
|
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; }
|
|
17
21
|
|
|
18
|
-
const
|
|
22
|
+
const SVG = _ref => {
|
|
19
23
|
let {
|
|
20
|
-
source,
|
|
24
|
+
source = _Config.default.placeholderSvgURL,
|
|
21
25
|
style
|
|
22
26
|
} = _ref;
|
|
23
27
|
return /*#__PURE__*/React.createElement(React.Fragment, null, _reactNative.Platform.OS === "ios" && /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
@@ -40,5 +44,5 @@ const Svg = _ref => {
|
|
|
40
44
|
}));
|
|
41
45
|
};
|
|
42
46
|
|
|
43
|
-
var _default =
|
|
47
|
+
var _default = SVG;
|
|
44
48
|
exports.default = _default;
|
|
@@ -16,4 +16,4 @@ const APPROX_STATUSBAR_HEIGHT = _reactNative.Platform.select({
|
|
|
16
16
|
ios: _reactNative.Platform.Version < 11 ? DEFAULT_STATUSBAR_HEIGHT_EXPO : 0
|
|
17
17
|
});
|
|
18
18
|
|
|
19
|
-
exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;
|
|
19
|
+
exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;
|
package/lib/commonjs/index.js
CHANGED
|
@@ -291,6 +291,12 @@ Object.defineProperty(exports, "RowHeadlineImageIcon", {
|
|
|
291
291
|
return _RowHeadlineImageIcon.default;
|
|
292
292
|
}
|
|
293
293
|
});
|
|
294
|
+
Object.defineProperty(exports, "SVG", {
|
|
295
|
+
enumerable: true,
|
|
296
|
+
get: function () {
|
|
297
|
+
return _SVG.default;
|
|
298
|
+
}
|
|
299
|
+
});
|
|
294
300
|
Object.defineProperty(exports, "ScreenContainer", {
|
|
295
301
|
enumerable: true,
|
|
296
302
|
get: function () {
|
|
@@ -339,12 +345,6 @@ Object.defineProperty(exports, "Surface", {
|
|
|
339
345
|
return _Surface.default;
|
|
340
346
|
}
|
|
341
347
|
});
|
|
342
|
-
Object.defineProperty(exports, "Svg", {
|
|
343
|
-
enumerable: true,
|
|
344
|
-
get: function () {
|
|
345
|
-
return _Svg.default;
|
|
346
|
-
}
|
|
347
|
-
});
|
|
348
348
|
Object.defineProperty(exports, "Swiper", {
|
|
349
349
|
enumerable: true,
|
|
350
350
|
get: function () {
|
|
@@ -448,7 +448,7 @@ var _IconButton = _interopRequireDefault(require("./components/IconButton"));
|
|
|
448
448
|
|
|
449
449
|
var _Image = _interopRequireDefault(require("./components/Image"));
|
|
450
450
|
|
|
451
|
-
var
|
|
451
|
+
var _SVG = _interopRequireDefault(require("./components/SVG"));
|
|
452
452
|
|
|
453
453
|
var _NumberInput = _interopRequireDefault(require("./components/NumberInput"));
|
|
454
454
|
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SEED_DATA = void 0;
|
|
7
|
+
|
|
8
|
+
var _types = require("@draftbit/types");
|
|
9
|
+
|
|
10
|
+
const SEED_DATA = {
|
|
11
|
+
name: "FlashList",
|
|
12
|
+
tag: "FlashList",
|
|
13
|
+
description: "Flashlist by Shopify",
|
|
14
|
+
packageName: "@shopify/flash-list",
|
|
15
|
+
category: _types.COMPONENT_TYPES.data,
|
|
16
|
+
stylesPanelSections: _types.CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
17
|
+
layout: {
|
|
18
|
+
flex: 1
|
|
19
|
+
},
|
|
20
|
+
props: {
|
|
21
|
+
estimatedItemSize: (0, _types.createNumberProp)({
|
|
22
|
+
group: _types.GROUPS.basic,
|
|
23
|
+
label: "Est. Item Size",
|
|
24
|
+
description: "Approximate size of the items before rendering.",
|
|
25
|
+
defaultValue: 50,
|
|
26
|
+
step: 1,
|
|
27
|
+
precision: 0
|
|
28
|
+
}),
|
|
29
|
+
horizontal: (0, _types.createStaticBoolProp)({
|
|
30
|
+
label: "Horizontal",
|
|
31
|
+
description: "Render list horizontally"
|
|
32
|
+
}),
|
|
33
|
+
inverted: (0, _types.createStaticBoolProp)({
|
|
34
|
+
label: "Inverted",
|
|
35
|
+
description: "If true, reverses the direction."
|
|
36
|
+
}),
|
|
37
|
+
numColumns: (0, _types.createNumColumnsType)({
|
|
38
|
+
editable: true
|
|
39
|
+
})
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
exports.SEED_DATA = SEED_DATA;
|
|
@@ -11,7 +11,6 @@ const SEED_DATA = {
|
|
|
11
11
|
name: "SVG",
|
|
12
12
|
tag: "SVG",
|
|
13
13
|
description: "An SVG component",
|
|
14
|
-
packageName: "@draftbit/core",
|
|
15
14
|
category: _types.COMPONENT_TYPES.media,
|
|
16
15
|
layout: {
|
|
17
16
|
width: 100,
|
|
@@ -19,7 +18,7 @@ const SEED_DATA = {
|
|
|
19
18
|
},
|
|
20
19
|
stylesPanelSections: [_types.StylesPanelSections.Size, _types.StylesPanelSections.Margins, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
|
|
21
20
|
props: {
|
|
22
|
-
source: (0, _types.
|
|
21
|
+
source: (0, _types.createSVGProp)()
|
|
23
22
|
}
|
|
24
23
|
};
|
|
25
24
|
exports.SEED_DATA = SEED_DATA;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { View, Platform, Image } from "react-native";
|
|
3
3
|
import { SvgUri } from "react-native-svg";
|
|
4
|
+
import Config from "./Config";
|
|
4
5
|
|
|
5
|
-
const
|
|
6
|
+
const SVG = _ref => {
|
|
6
7
|
let {
|
|
7
|
-
source,
|
|
8
|
+
source = Config.placeholderSvgURL,
|
|
8
9
|
style
|
|
9
10
|
} = _ref;
|
|
10
11
|
return /*#__PURE__*/React.createElement(React.Fragment, null, Platform.OS === "ios" && /*#__PURE__*/React.createElement(View, {
|
|
@@ -27,4 +28,4 @@ const Svg = _ref => {
|
|
|
27
28
|
}));
|
|
28
29
|
};
|
|
29
30
|
|
|
30
|
-
export default
|
|
31
|
+
export default SVG;
|
package/lib/module/index.js
CHANGED
|
@@ -17,7 +17,7 @@ export { default as FAB } from "./components/FAB";
|
|
|
17
17
|
export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
|
|
18
18
|
export { default as IconButton } from "./components/IconButton";
|
|
19
19
|
export { default as Image } from "./components/Image";
|
|
20
|
-
export { default as
|
|
20
|
+
export { default as SVG } from "./components/SVG";
|
|
21
21
|
export { default as NumberInput } from "./components/NumberInput";
|
|
22
22
|
export { default as ScreenContainer } from "./components/ScreenContainer";
|
|
23
23
|
export { default as StarRating } from "./components/StarRating";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, CONTAINER_COMPONENT_STYLES_SECTIONS, GROUPS } from "@draftbit/types";
|
|
2
|
+
export const SEED_DATA = {
|
|
3
|
+
name: "FlashList",
|
|
4
|
+
tag: "FlashList",
|
|
5
|
+
description: "Flashlist by Shopify",
|
|
6
|
+
packageName: "@shopify/flash-list",
|
|
7
|
+
category: COMPONENT_TYPES.data,
|
|
8
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
9
|
+
layout: {
|
|
10
|
+
flex: 1
|
|
11
|
+
},
|
|
12
|
+
props: {
|
|
13
|
+
estimatedItemSize: createNumberProp({
|
|
14
|
+
group: GROUPS.basic,
|
|
15
|
+
label: "Est. Item Size",
|
|
16
|
+
description: "Approximate size of the items before rendering.",
|
|
17
|
+
defaultValue: 50,
|
|
18
|
+
step: 1,
|
|
19
|
+
precision: 0
|
|
20
|
+
}),
|
|
21
|
+
horizontal: createStaticBoolProp({
|
|
22
|
+
label: "Horizontal",
|
|
23
|
+
description: "Render list horizontally"
|
|
24
|
+
}),
|
|
25
|
+
inverted: createStaticBoolProp({
|
|
26
|
+
label: "Inverted",
|
|
27
|
+
description: "If true, reverses the direction."
|
|
28
|
+
}),
|
|
29
|
+
numColumns: createNumColumnsType({
|
|
30
|
+
editable: true
|
|
31
|
+
})
|
|
32
|
+
}
|
|
33
|
+
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { COMPONENT_TYPES,
|
|
1
|
+
import { COMPONENT_TYPES, createSVGProp, StylesPanelSections } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "SVG",
|
|
4
4
|
tag: "SVG",
|
|
5
5
|
description: "An SVG component",
|
|
6
|
-
packageName: "@draftbit/core",
|
|
7
6
|
category: COMPONENT_TYPES.media,
|
|
8
7
|
layout: {
|
|
9
8
|
width: 100,
|
|
@@ -11,6 +10,6 @@ export const SEED_DATA = {
|
|
|
11
10
|
},
|
|
12
11
|
stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins, StylesPanelSections.Position, StylesPanelSections.Effects],
|
|
13
12
|
props: {
|
|
14
|
-
source:
|
|
13
|
+
source: createSVGProp()
|
|
15
14
|
}
|
|
16
15
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { StyleProp, ImageStyle } from "react-native";
|
|
3
|
+
declare type SVGComponentProps = {
|
|
4
|
+
source: string;
|
|
5
|
+
style?: StyleProp<ImageStyle>;
|
|
6
|
+
};
|
|
7
|
+
declare const SVG: React.FC<React.PropsWithChildren<SVGComponentProps>>;
|
|
8
|
+
export default SVG;
|
|
@@ -17,7 +17,7 @@ export { default as FAB } from "./components/FAB";
|
|
|
17
17
|
export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
|
|
18
18
|
export { default as IconButton } from "./components/IconButton";
|
|
19
19
|
export { default as Image } from "./components/Image";
|
|
20
|
-
export { default as
|
|
20
|
+
export { default as SVG } from "./components/SVG";
|
|
21
21
|
export { default as NumberInput } from "./components/NumberInput";
|
|
22
22
|
export { default as ScreenContainer } from "./components/ScreenContainer";
|
|
23
23
|
export { default as StarRating } from "./components/StarRating";
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export declare const SEED_DATA: {
|
|
2
|
+
name: string;
|
|
3
|
+
tag: string;
|
|
4
|
+
description: string;
|
|
5
|
+
packageName: string;
|
|
6
|
+
category: string;
|
|
7
|
+
stylesPanelSections: string[];
|
|
8
|
+
layout: {
|
|
9
|
+
flex: number;
|
|
10
|
+
};
|
|
11
|
+
props: {
|
|
12
|
+
estimatedItemSize: {
|
|
13
|
+
label: string;
|
|
14
|
+
description: string;
|
|
15
|
+
formType: string;
|
|
16
|
+
propType: string;
|
|
17
|
+
group: string;
|
|
18
|
+
defaultValue: null;
|
|
19
|
+
editable: boolean;
|
|
20
|
+
required: boolean;
|
|
21
|
+
step: number;
|
|
22
|
+
};
|
|
23
|
+
horizontal: {
|
|
24
|
+
label: string;
|
|
25
|
+
description: string;
|
|
26
|
+
formType: string;
|
|
27
|
+
propType: string;
|
|
28
|
+
defaultValue: boolean;
|
|
29
|
+
editable: boolean;
|
|
30
|
+
required: boolean;
|
|
31
|
+
group: string;
|
|
32
|
+
};
|
|
33
|
+
inverted: {
|
|
34
|
+
label: string;
|
|
35
|
+
description: string;
|
|
36
|
+
formType: string;
|
|
37
|
+
propType: string;
|
|
38
|
+
defaultValue: boolean;
|
|
39
|
+
editable: boolean;
|
|
40
|
+
required: boolean;
|
|
41
|
+
group: string;
|
|
42
|
+
};
|
|
43
|
+
numColumns: {
|
|
44
|
+
label: string;
|
|
45
|
+
description: string;
|
|
46
|
+
group: string;
|
|
47
|
+
formType: string;
|
|
48
|
+
propType: string;
|
|
49
|
+
defaultValue: number;
|
|
50
|
+
editable: boolean;
|
|
51
|
+
required: boolean;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "46.2.4-
|
|
3
|
+
"version": "46.2.4-3ab91b.10+3ab91b0d",
|
|
4
4
|
"description": "Core (non-native) Components",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -41,11 +41,12 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@date-io/date-fns": "^1.3.13",
|
|
43
43
|
"@draftbit/react-theme-provider": "^2.1.1",
|
|
44
|
-
"@draftbit/types": "^46.
|
|
44
|
+
"@draftbit/types": "^46.3.0",
|
|
45
45
|
"@material-ui/core": "^4.11.0",
|
|
46
46
|
"@material-ui/pickers": "^3.2.10",
|
|
47
47
|
"@react-native-community/slider": "4.2.3",
|
|
48
48
|
"@react-native-picker/picker": "2.4.2",
|
|
49
|
+
"@shopify/flash-list": "1.1.0",
|
|
49
50
|
"color": "^3.1.2",
|
|
50
51
|
"date-fns": "^2.16.1",
|
|
51
52
|
"dateformat": "^3.0.3",
|
|
@@ -53,7 +54,7 @@
|
|
|
53
54
|
"lodash.omit": "^4.5.0",
|
|
54
55
|
"lodash.tonumber": "^4.0.3",
|
|
55
56
|
"react-native-modal-datetime-picker": "^13.0.0",
|
|
56
|
-
"react-native-svg": "
|
|
57
|
+
"react-native-svg": "12.3.0",
|
|
57
58
|
"react-native-typography": "^1.4.1",
|
|
58
59
|
"react-native-web-swiper": "^2.2.3"
|
|
59
60
|
},
|
|
@@ -80,5 +81,5 @@
|
|
|
80
81
|
]
|
|
81
82
|
]
|
|
82
83
|
},
|
|
83
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "3ab91b0dcdcfbc69a99c257602a0b54d3fbc8ed8"
|
|
84
85
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { View, Platform, Image } from "react-native";
|
|
3
3
|
import { SvgUri } from "react-native-svg";
|
|
4
|
-
|
|
4
|
+
import Config from "./Config";
|
|
5
|
+
const SVG = ({ source = Config.placeholderSvgURL, style, }) => {
|
|
5
6
|
return (React.createElement(React.Fragment, null,
|
|
6
7
|
Platform.OS === "ios" && (React.createElement(View, { style: style },
|
|
7
8
|
React.createElement(SvgUri, { width: "100%", height: "100%", uri: source }))),
|
|
@@ -9,4 +10,4 @@ const Svg = ({ source, style }) => {
|
|
|
9
10
|
React.createElement(SvgUri, { width: "100%", height: "100%", uri: source }))),
|
|
10
11
|
Platform.OS === "web" && (React.createElement(Image, { style: style, source: { uri: source } }))));
|
|
11
12
|
};
|
|
12
|
-
export default
|
|
13
|
+
export default SVG;
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { View, Platform, Image } from "react-native";
|
|
2
|
+
import { View, Platform, Image, StyleProp, ImageStyle } from "react-native";
|
|
3
3
|
import { SvgUri } from "react-native-svg";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
import Config from "./Config";
|
|
6
|
+
|
|
7
|
+
type SVGComponentProps = {
|
|
8
|
+
source: string;
|
|
9
|
+
style?: StyleProp<ImageStyle>;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const SVG: React.FC<React.PropsWithChildren<SVGComponentProps>> = ({
|
|
13
|
+
source = Config.placeholderSvgURL,
|
|
14
|
+
style,
|
|
15
|
+
}) => {
|
|
6
16
|
return (
|
|
7
17
|
<>
|
|
8
18
|
{Platform.OS === "ios" && (
|
|
@@ -22,4 +32,4 @@ const Svg = ({ source, style }: { source: any; style: any }) => {
|
|
|
22
32
|
);
|
|
23
33
|
};
|
|
24
34
|
|
|
25
|
-
export default
|
|
35
|
+
export default SVG;
|
package/src/index.js
CHANGED
|
@@ -17,7 +17,7 @@ export { default as FAB } from "./components/FAB";
|
|
|
17
17
|
export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
|
|
18
18
|
export { default as IconButton } from "./components/IconButton";
|
|
19
19
|
export { default as Image } from "./components/Image";
|
|
20
|
-
export { default as
|
|
20
|
+
export { default as SVG } from "./components/SVG";
|
|
21
21
|
export { default as NumberInput } from "./components/NumberInput";
|
|
22
22
|
export { default as ScreenContainer } from "./components/ScreenContainer";
|
|
23
23
|
export { default as StarRating } from "./components/StarRating";
|
package/src/index.tsx
CHANGED
|
@@ -18,7 +18,7 @@ export { default as FAB } from "./components/FAB";
|
|
|
18
18
|
export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
|
|
19
19
|
export { default as IconButton } from "./components/IconButton";
|
|
20
20
|
export { default as Image } from "./components/Image";
|
|
21
|
-
export { default as
|
|
21
|
+
export { default as SVG } from "./components/SVG";
|
|
22
22
|
export { default as NumberInput } from "./components/NumberInput";
|
|
23
23
|
export { default as ScreenContainer } from "./components/ScreenContainer";
|
|
24
24
|
export { default as StarRating } from "./components/StarRating";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, CONTAINER_COMPONENT_STYLES_SECTIONS, GROUPS, } from "@draftbit/types";
|
|
2
|
+
export const SEED_DATA = {
|
|
3
|
+
name: "FlashList",
|
|
4
|
+
tag: "FlashList",
|
|
5
|
+
description: "Flashlist by Shopify",
|
|
6
|
+
packageName: "@shopify/flash-list",
|
|
7
|
+
category: COMPONENT_TYPES.data,
|
|
8
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
9
|
+
layout: {
|
|
10
|
+
flex: 1,
|
|
11
|
+
},
|
|
12
|
+
props: {
|
|
13
|
+
estimatedItemSize: createNumberProp({
|
|
14
|
+
group: GROUPS.basic,
|
|
15
|
+
label: "Est. Item Size",
|
|
16
|
+
description: "Approximate size of the items before rendering.",
|
|
17
|
+
defaultValue: 50,
|
|
18
|
+
step: 1,
|
|
19
|
+
precision: 0,
|
|
20
|
+
}),
|
|
21
|
+
horizontal: createStaticBoolProp({
|
|
22
|
+
label: "Horizontal",
|
|
23
|
+
description: "Render list horizontally",
|
|
24
|
+
}),
|
|
25
|
+
inverted: createStaticBoolProp({
|
|
26
|
+
label: "Inverted",
|
|
27
|
+
description: "If true, reverses the direction.",
|
|
28
|
+
}),
|
|
29
|
+
numColumns: createNumColumnsType({
|
|
30
|
+
editable: true,
|
|
31
|
+
}),
|
|
32
|
+
},
|
|
33
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import {
|
|
2
|
+
COMPONENT_TYPES,
|
|
3
|
+
createNumColumnsType,
|
|
4
|
+
createStaticBoolProp,
|
|
5
|
+
createNumberProp,
|
|
6
|
+
CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
7
|
+
GROUPS,
|
|
8
|
+
} from "@draftbit/types";
|
|
9
|
+
|
|
10
|
+
export const SEED_DATA = {
|
|
11
|
+
name: "FlashList",
|
|
12
|
+
tag: "FlashList",
|
|
13
|
+
description: "Flashlist by Shopify",
|
|
14
|
+
packageName: "@shopify/flash-list",
|
|
15
|
+
category: COMPONENT_TYPES.data,
|
|
16
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
17
|
+
layout: {
|
|
18
|
+
flex: 1,
|
|
19
|
+
},
|
|
20
|
+
props: {
|
|
21
|
+
estimatedItemSize: createNumberProp({
|
|
22
|
+
group: GROUPS.basic,
|
|
23
|
+
label: "Est. Item Size",
|
|
24
|
+
description: "Approximate size of the items before rendering.",
|
|
25
|
+
defaultValue: 50,
|
|
26
|
+
step: 1,
|
|
27
|
+
precision: 0,
|
|
28
|
+
}),
|
|
29
|
+
horizontal: createStaticBoolProp({
|
|
30
|
+
label: "Horizontal",
|
|
31
|
+
description: "Render list horizontally",
|
|
32
|
+
}),
|
|
33
|
+
inverted: createStaticBoolProp({
|
|
34
|
+
label: "Inverted",
|
|
35
|
+
description: "If true, reverses the direction.",
|
|
36
|
+
}),
|
|
37
|
+
numColumns: createNumColumnsType({
|
|
38
|
+
editable: true,
|
|
39
|
+
}),
|
|
40
|
+
},
|
|
41
|
+
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { COMPONENT_TYPES,
|
|
1
|
+
import { COMPONENT_TYPES, createSVGProp, StylesPanelSections, } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "SVG",
|
|
4
4
|
tag: "SVG",
|
|
5
5
|
description: "An SVG component",
|
|
6
|
-
packageName: "@draftbit/core",
|
|
7
6
|
category: COMPONENT_TYPES.media,
|
|
8
7
|
layout: {
|
|
9
8
|
width: 100,
|
|
@@ -16,6 +15,6 @@ export const SEED_DATA = {
|
|
|
16
15
|
StylesPanelSections.Effects,
|
|
17
16
|
],
|
|
18
17
|
props: {
|
|
19
|
-
source:
|
|
18
|
+
source: createSVGProp(),
|
|
20
19
|
},
|
|
21
20
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
COMPONENT_TYPES,
|
|
3
|
-
|
|
3
|
+
createSVGProp,
|
|
4
4
|
StylesPanelSections,
|
|
5
5
|
} from "@draftbit/types";
|
|
6
6
|
|
|
@@ -8,7 +8,6 @@ export const SEED_DATA = {
|
|
|
8
8
|
name: "SVG",
|
|
9
9
|
tag: "SVG",
|
|
10
10
|
description: "An SVG component",
|
|
11
|
-
packageName: "@draftbit/core",
|
|
12
11
|
category: COMPONENT_TYPES.media,
|
|
13
12
|
layout: {
|
|
14
13
|
width: 100,
|
|
@@ -21,6 +20,6 @@ export const SEED_DATA = {
|
|
|
21
20
|
StylesPanelSections.Effects,
|
|
22
21
|
],
|
|
23
22
|
props: {
|
|
24
|
-
source:
|
|
23
|
+
source: createSVGProp(),
|
|
25
24
|
},
|
|
26
25
|
};
|