@draftbit/core 46.2.4-0e692a.5 → 46.2.4-1897f4.12
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/CircleImage.js +16 -2
- package/lib/commonjs/components/CircularProgress.js +15 -7
- package/lib/commonjs/components/DatePicker/DatePicker.js +7 -8
- package/lib/commonjs/components/Divider.js +16 -2
- package/lib/commonjs/components/Layout.js +40 -19
- package/lib/commonjs/components/Portal/Portal.js +12 -3
- package/lib/commonjs/components/{Svg.js → SVG.js} +2 -2
- package/lib/commonjs/components/ScreenContainer.js +23 -5
- package/lib/commonjs/components/StarRating.js +25 -5
- package/lib/commonjs/components/Switch.js +23 -10
- package/lib/commonjs/components/ToggleButton.js +18 -3
- package/lib/commonjs/components/Youtube.js +73 -0
- package/lib/commonjs/constants.js +1 -1
- package/lib/commonjs/index.js +15 -7
- package/lib/commonjs/mappings/FlashList.js +42 -0
- package/lib/commonjs/mappings/{Svg.js → SVG.js} +1 -1
- package/lib/commonjs/mappings/Youtube.js +42 -0
- package/lib/module/components/{Svg.js → SVG.js} +2 -2
- package/lib/module/components/Youtube.js +59 -0
- package/lib/module/index.js +3 -2
- package/lib/module/mappings/FlashList.js +33 -0
- package/lib/module/mappings/{Svg.js → SVG.js} +2 -2
- package/lib/module/mappings/Youtube.js +33 -0
- package/lib/typescript/src/components/SVG.d.ts +8 -0
- package/lib/typescript/src/components/Youtube.d.ts +44 -0
- package/lib/typescript/src/index.d.ts +2 -1
- package/lib/typescript/src/mappings/FlashList.d.ts +54 -0
- package/lib/typescript/src/mappings/{Svg.d.ts → SVG.d.ts} +0 -0
- package/lib/typescript/src/mappings/Youtube.d.ts +36 -0
- package/package.json +8 -5
- package/src/components/{Svg.js → SVG.js} +2 -2
- package/src/components/{Svg.tsx → SVG.tsx} +5 -5
- package/src/components/Youtube.js +38 -0
- package/src/components/Youtube.tsx +66 -0
- package/src/index.js +2 -1
- package/src/index.tsx +2 -1
- package/src/mappings/FlashList.js +33 -0
- package/src/mappings/FlashList.ts +41 -0
- package/src/mappings/{Svg.js → SVG.js} +2 -2
- package/src/mappings/{Svg.ts → SVG.ts} +2 -2
- package/src/mappings/Youtube.js +33 -0
- package/src/mappings/Youtube.ts +39 -0
- package/lib/typescript/src/components/Svg.d.ts +0 -7
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";
|
|
@@ -50,4 +50,5 @@ export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIc
|
|
|
50
50
|
export { default as Slider } from "./components/Slider";
|
|
51
51
|
export { default as Stepper } from "./components/Stepper";
|
|
52
52
|
export { useAuthState } from "./components/useAuthState";
|
|
53
|
+
export { default as Youtube } from "./components/Youtube";
|
|
53
54
|
// a comment to fix sourcemap comment issue
|
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";
|
|
@@ -70,5 +70,6 @@ export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIc
|
|
|
70
70
|
export { default as Slider } from "./components/Slider";
|
|
71
71
|
export { default as Stepper } from "./components/Stepper";
|
|
72
72
|
export { useAuthState } from "./components/useAuthState";
|
|
73
|
+
export { default as Youtube } from "./components/Youtube";
|
|
73
74
|
|
|
74
75
|
// a comment to fix sourcemap comment issue
|
|
@@ -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,4 +1,4 @@
|
|
|
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",
|
|
@@ -15,6 +15,6 @@ export const SEED_DATA = {
|
|
|
15
15
|
StylesPanelSections.Effects,
|
|
16
16
|
],
|
|
17
17
|
props: {
|
|
18
|
-
source:
|
|
18
|
+
source: createSVGProp(),
|
|
19
19
|
},
|
|
20
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
|
|
|
@@ -20,6 +20,6 @@ export const SEED_DATA = {
|
|
|
20
20
|
StylesPanelSections.Effects,
|
|
21
21
|
],
|
|
22
22
|
props: {
|
|
23
|
-
source:
|
|
23
|
+
source: createSVGProp(),
|
|
24
24
|
},
|
|
25
25
|
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, createStaticBoolProp, createTextProp, StylesPanelSections, } from "@draftbit/types";
|
|
2
|
+
export const SEED_DATA = {
|
|
3
|
+
name: "Youtube",
|
|
4
|
+
tag: "Youtube",
|
|
5
|
+
description: "Given a VideoId orPlaylist and play Youtube video",
|
|
6
|
+
doc_link: "https://lonelycpp.github.io/react-native-youtube-iframe",
|
|
7
|
+
code_link: "https://github.com/LonelyCpp/react-native-youtube-iframe",
|
|
8
|
+
category: COMPONENT_TYPES.media,
|
|
9
|
+
stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Position],
|
|
10
|
+
layout: {
|
|
11
|
+
height: 250,
|
|
12
|
+
},
|
|
13
|
+
props: {
|
|
14
|
+
videoId: createTextProp({
|
|
15
|
+
label: "Video ID",
|
|
16
|
+
description: "VideoId of the Youtube video.",
|
|
17
|
+
defaultValue: "nwMUpDESXrI",
|
|
18
|
+
}),
|
|
19
|
+
playlist: createTextProp({
|
|
20
|
+
label: "Playlist",
|
|
21
|
+
description: "Playlist of the Youtube videos.",
|
|
22
|
+
defaultValue: "PLUa6TiXzjIrwowt6P-uGCJm8ovm-9S1Ks",
|
|
23
|
+
}),
|
|
24
|
+
mute: createStaticBoolProp({
|
|
25
|
+
label: "Mute Audio",
|
|
26
|
+
description: "Mute the audio of the video.",
|
|
27
|
+
}),
|
|
28
|
+
autoplay: createStaticBoolProp({
|
|
29
|
+
label: "Auto Play",
|
|
30
|
+
description: "Autoplay the video on load.",
|
|
31
|
+
}),
|
|
32
|
+
},
|
|
33
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import {
|
|
2
|
+
COMPONENT_TYPES,
|
|
3
|
+
createStaticBoolProp,
|
|
4
|
+
createTextProp,
|
|
5
|
+
StylesPanelSections,
|
|
6
|
+
} from "@draftbit/types";
|
|
7
|
+
|
|
8
|
+
export const SEED_DATA = {
|
|
9
|
+
name: "Youtube",
|
|
10
|
+
tag: "Youtube",
|
|
11
|
+
description: "Given a VideoId orPlaylist and play Youtube video",
|
|
12
|
+
doc_link: "https://lonelycpp.github.io/react-native-youtube-iframe",
|
|
13
|
+
code_link: "https://github.com/LonelyCpp/react-native-youtube-iframe",
|
|
14
|
+
category: COMPONENT_TYPES.media,
|
|
15
|
+
stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Position],
|
|
16
|
+
layout: {
|
|
17
|
+
height: 250,
|
|
18
|
+
},
|
|
19
|
+
props: {
|
|
20
|
+
videoId: createTextProp({
|
|
21
|
+
label: "Video ID",
|
|
22
|
+
description: "VideoId of the Youtube video.",
|
|
23
|
+
defaultValue: "nwMUpDESXrI",
|
|
24
|
+
}),
|
|
25
|
+
playlist: createTextProp({
|
|
26
|
+
label: "Playlist",
|
|
27
|
+
description: "Playlist of the Youtube videos.",
|
|
28
|
+
defaultValue: "PLUa6TiXzjIrwowt6P-uGCJm8ovm-9S1Ks",
|
|
29
|
+
}),
|
|
30
|
+
mute: createStaticBoolProp({
|
|
31
|
+
label: "Mute Audio",
|
|
32
|
+
description: "Mute the audio of the video.",
|
|
33
|
+
}),
|
|
34
|
+
autoplay: createStaticBoolProp({
|
|
35
|
+
label: "Auto Play",
|
|
36
|
+
description: "Autoplay the video on load.",
|
|
37
|
+
}),
|
|
38
|
+
},
|
|
39
|
+
};
|