@draftbit/core 43.6.1-ecec94.4 → 43.6.1
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/IconButton.js +20 -5
- package/lib/commonjs/components/IconButton.js.map +1 -1
- package/lib/commonjs/mappings/Video.js +4 -4
- package/lib/commonjs/mappings/Video.js.map +1 -1
- package/lib/module/components/Accordion/AccordionGroup.js.map +1 -1
- package/lib/module/components/ActionSheet/index.js.map +1 -1
- package/lib/module/mappings/Video.js +5 -5
- package/lib/module/mappings/Video.js.map +1 -1
- package/lib/typescript/src/mappings/Video.d.ts +1 -1
- package/package.json +2 -2
- package/src/mappings/Video.js +5 -5
- package/src/mappings/Video.ts +4 -5
|
@@ -15,8 +15,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
15
15
|
|
|
16
16
|
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
17
|
|
|
18
|
-
function _extends() { _extends = Object.assign || 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); }
|
|
19
|
-
|
|
20
18
|
const IconButton = _ref => {
|
|
21
19
|
let {
|
|
22
20
|
Icon,
|
|
@@ -31,7 +29,7 @@ const IconButton = _ref => {
|
|
|
31
29
|
...props
|
|
32
30
|
} = _ref;
|
|
33
31
|
const iconColor = customColor || theme.colors.primary;
|
|
34
|
-
return /*#__PURE__*/React.createElement(_reactNative.Pressable,
|
|
32
|
+
return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
35
33
|
onPress: onPress,
|
|
36
34
|
disabled: disabled || loading,
|
|
37
35
|
style: _ref2 => {
|
|
@@ -45,8 +43,9 @@ const IconButton = _ref => {
|
|
|
45
43
|
alignItems: "center",
|
|
46
44
|
justifyContent: "center"
|
|
47
45
|
}, style];
|
|
48
|
-
}
|
|
49
|
-
|
|
46
|
+
},
|
|
47
|
+
...props
|
|
48
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, null, icon && !loading ? /*#__PURE__*/React.createElement(Icon, {
|
|
50
49
|
name: icon,
|
|
51
50
|
size: size - 2,
|
|
52
51
|
color: iconColor
|
|
@@ -71,5 +70,21 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
71
70
|
|
|
72
71
|
var _default = (0, _theming.withTheme)(IconButton);
|
|
73
72
|
|
|
73
|
+
exports.default = _default;
|
|
74
|
+
//# sourceMappingURL=IconButton.js.map({
|
|
75
|
+
container: {
|
|
76
|
+
alignItems: "center",
|
|
77
|
+
justifyContent: "center",
|
|
78
|
+
..._reactNative.Platform.select({
|
|
79
|
+
web: {
|
|
80
|
+
cursor: "pointer",
|
|
81
|
+
userSelect: "none"
|
|
82
|
+
}
|
|
83
|
+
})
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
var _default = (0, _theming.withTheme)(IconButton);
|
|
88
|
+
|
|
74
89
|
exports.default = _default;
|
|
75
90
|
//# sourceMappingURL=IconButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["IconButton.
|
|
1
|
+
{"version":3,"sources":["IconButton.js"],"names":["IconButton","Icon","icon","color","customColor","size","disabled","loading","onPress","theme","style","props","iconColor","colors","primary","React","createElement","Pressable","pressed","styles","container","opacity","width","height","alignItems","justifyContent","View","name","ActivityIndicator","StyleSheet","create","Platform","select","web","cursor","userSelect"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;AACA,MAAMA,UAAU,GAAG,QAAuH;AAAA,MAAtH;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,IAAR;AAAcC,IAAAA,KAAK,EAAEC,WAArB;AAAkCC,IAAAA,IAAI,GAAG,EAAzC;AAA6CC,IAAAA,QAAQ,GAAG,KAAxD;AAA+DC,IAAAA,OAAO,GAAG,KAAzE;AAAgFC,IAAAA,OAAhF;AAAyFC,IAAAA,KAAzF;AAAgGC,IAAAA,KAAhG;AAAuG,OAAGC;AAA1G,GAAsH;AACtI,QAAMC,SAAS,GAAGR,WAAW,IAAIK,KAAK,CAACI,MAAN,CAAaC,OAA9C;AACA,sBAAQC,KAAK,CAACC,aAAN,CAAoBC,sBAApB,EAA+B;AAAET,IAAAA,OAAO,EAAEA,OAAX;AAAoBF,IAAAA,QAAQ,EAAEA,QAAQ,IAAIC,OAA1C;AAAmDG,IAAAA,KAAK,EAAE,SAAiB;AAAA,UAAhB;AAAEQ,QAAAA;AAAF,OAAgB;AAC1G,aAAO,CACHC,MAAM,CAACC,SADJ,EAEH;AACIC,QAAAA,OAAO,EAAEH,OAAO,IAAIZ,QAAX,GAAsB,IAAtB,GAA6B,CAD1C;AAEIgB,QAAAA,KAAK,EAAEjB,IAFX;AAGIkB,QAAAA,MAAM,EAAElB,IAHZ;AAIImB,QAAAA,UAAU,EAAE,QAJhB;AAKIC,QAAAA,cAAc,EAAE;AALpB,OAFG,EASHf,KATG,CAAP;AAWH,KAZkC;AAYhC,OAAGC;AAZ6B,GAA/B,eAaJI,KAAK,CAACC,aAAN,CAAoBU,iBAApB,EAA0B,IAA1B,EACIxB,IAAI,IAAI,CAACK,OAAT,gBAAoBQ,KAAK,CAACC,aAAN,CAAoBf,IAApB,EAA0B;AAAE0B,IAAAA,IAAI,EAAEzB,IAAR;AAAcG,IAAAA,IAAI,EAAEA,IAAI,GAAG,CAA3B;AAA8BF,IAAAA,KAAK,EAAES;AAArC,GAA1B,CAApB,GAAmG,IADvG,EAEIL,OAAO,gBAAGQ,KAAK,CAACC,aAAN,CAAoBY,8BAApB,EAAuC;AAAEvB,IAAAA,IAAI,EAAE,OAAR;AAAiBF,IAAAA,KAAK,EAAES;AAAxB,GAAvC,CAAH,GAAiF,IAF5F,CAbI,CAAR;AAgBH,CAlBD;;AAmBA,MAAMO,MAAM,GAAGU,wBAAWC,MAAX,CAAkB;AAC7BV,EAAAA,SAAS,EAAE;AACPI,IAAAA,UAAU,EAAE,QADL;AAEPC,IAAAA,cAAc,EAAE,QAFT;AAGP,OAAGM,sBAASC,MAAT,CAAgB;AACfC,MAAAA,GAAG,EAAE;AACDC,QAAAA,MAAM,EAAE,SADP;AAEDC,QAAAA,UAAU,EAAE;AAFX;AADU,KAAhB;AAHI;AADkB,CAAlB,CAAf;;eAYe,wBAAUnC,UAAV,C","sourcesContent":["import * as React from \"react\";\nimport { View, StyleSheet, ActivityIndicator, Pressable, Platform, } from \"react-native\";\nimport { withTheme } from \"../theming\";\nconst IconButton = ({ Icon, icon, color: customColor, size = 32, disabled = false, loading = false, onPress, theme, style, ...props }) => {\n const iconColor = customColor || theme.colors.primary;\n return (React.createElement(Pressable, { onPress: onPress, disabled: disabled || loading, style: ({ pressed }) => {\n return [\n styles.container,\n {\n opacity: pressed || disabled ? 0.75 : 1,\n width: size,\n height: size,\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n style,\n ];\n }, ...props },\n React.createElement(View, null,\n icon && !loading ? (React.createElement(Icon, { name: icon, size: size - 2, color: iconColor })) : null,\n loading ? React.createElement(ActivityIndicator, { size: \"small\", color: iconColor }) : null)));\n};\nconst styles = StyleSheet.create({\n container: {\n alignItems: \"center\",\n justifyContent: \"center\",\n ...Platform.select({\n web: {\n cursor: \"pointer\",\n userSelect: \"none\",\n },\n }),\n },\n});\nexport default withTheme(IconButton);\n"]}
|
|
@@ -24,15 +24,15 @@ const SEED_DATA = {
|
|
|
24
24
|
defaultValue: "http://static.draftbit.com/videos/intro-to-draftbit.mp4"
|
|
25
25
|
}),
|
|
26
26
|
usePoster: (0, _types.createStaticBoolProp)({
|
|
27
|
-
label: "
|
|
27
|
+
label: "Thumbnail",
|
|
28
28
|
description: "Show a thumbnail before the video starts.",
|
|
29
29
|
defaultValue: false
|
|
30
30
|
}),
|
|
31
|
-
posterSource: (0, _types.
|
|
31
|
+
posterSource: (0, _types.createSourceProp)({
|
|
32
32
|
label: "Thumbnail Source",
|
|
33
33
|
description: "The optional image to display over the video while it is loading.",
|
|
34
|
-
defaultValue:
|
|
35
|
-
|
|
34
|
+
defaultValue: "https://static.draftbit.com/videos/intro-to-draftbit.png",
|
|
35
|
+
group: _types.GROUPS.basic
|
|
36
36
|
}),
|
|
37
37
|
resizeMode: (0, _types.createResizeModeProp)(),
|
|
38
38
|
isMuted: (0, _types.createStaticBoolProp)({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Video.ts"],"names":["SEED_DATA","name","tag","description","doc_link","code_link","category","COMPONENT_TYPES","media","layout","height","props","source","label","defaultValue","usePoster","posterSource","
|
|
1
|
+
{"version":3,"sources":["Video.ts"],"names":["SEED_DATA","name","tag","description","doc_link","code_link","category","COMPONENT_TYPES","media","layout","height","props","source","label","defaultValue","usePoster","posterSource","group","GROUPS","basic","resizeMode","isMuted","useNativeControls","shouldPlay","isLooping","positionMillis","min","step","precision","rate","max","volume"],"mappings":";;;;;;;AAAA;;AASO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,OADiB;AAEvBC,EAAAA,GAAG,EAAE,OAFkB;AAGvBC,EAAAA,WAAW,EAAE,8BAHU;AAIvBC,EAAAA,QAAQ,EAAE,iDAJa;AAKvBC,EAAAA,SAAS,EACP,yEANqB;AAOvBC,EAAAA,QAAQ,EAAEC,uBAAgBC,KA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E,2CAFkB;AAG/BuB,MAAAA,GAAG,EAAE,CAH0B;AAI/BC,MAAAA,IAAI,EAAE,IAJyB;AAK/BC,MAAAA,SAAS,EAAE,CALoB;AAM/BX,MAAAA,KAAK,EAAEC,cAAOC;AANiB,KAAjB,CArCX;AA6CLU,IAAAA,IAAI,EAAE,6BAAiB;AACrBhB,MAAAA,KAAK,EAAE,eADc;AAErBV,MAAAA,WAAW,EACT,sFAHmB;AAIrBuB,MAAAA,GAAG,EAAE,CAJgB;AAKrBI,MAAAA,GAAG,EAAE,EALgB;AAMrBH,MAAAA,IAAI,EAAE,IANe;AAOrBC,MAAAA,SAAS,EAAE,CAPU;AAQrBX,MAAAA,KAAK,EAAEC,cAAOC;AARO,KAAjB,CA7CD;AAuDLY,IAAAA,MAAM,EAAE,6BAAiB;AACvBlB,MAAAA,KAAK,EAAE,QADgB;AAEvBV,MAAAA,WAAW,EACT,0HAHqB;AAIvBuB,MAAAA,GAAG,EAAE,CAJkB;AAKvBI,MAAAA,GAAG,EAAE,CALkB;AAMvBH,MAAAA,IAAI,EAAE,GANiB;AAOvBC,MAAAA,SAAS,EAAE,CAPY;AAQvBX,MAAAA,KAAK,EAAEC,cAAOC;AARS,KAAjB;AAvDH;AAXgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createStaticBoolProp,\n createSourceProp,\n createResizeModeProp,\n createNumberProp,\n GROUPS,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Video\",\n tag: \"Video\",\n description: \"Given a URL, display a video\",\n doc_link: \"https://docs.expo.io/versions/latest/sdk/video/\",\n code_link:\n \"https://github.com/expo/expo/blob/master/packages/expo-av/src/Video.tsx\",\n category: COMPONENT_TYPES.media,\n layout: {\n height: 215,\n },\n props: {\n source: createSourceProp({\n label: \"Source\",\n description: \"The source of the video data to display.\",\n defaultValue: \"http://static.draftbit.com/videos/intro-to-draftbit.mp4\",\n }),\n usePoster: createStaticBoolProp({\n label: \"Thumbnail\",\n description: \"Show a thumbnail before the video starts.\",\n defaultValue: false,\n }),\n posterSource: createSourceProp({\n label: \"Thumbnail Source\",\n description:\n \"The optional image to display over the video while it is loading.\",\n defaultValue: \"https://static.draftbit.com/videos/intro-to-draftbit.png\",\n group: GROUPS.basic,\n }),\n resizeMode: createResizeModeProp(),\n isMuted: createStaticBoolProp({\n label: \"Mute Audio\",\n description: \"Mute the audio of the video.\",\n }),\n useNativeControls: createStaticBoolProp({\n label: \"Use Native Controls\",\n description:\n \"Display the playback controls, allowing users to play or pause the video.\",\n defaultValue: true,\n }),\n shouldPlay: createStaticBoolProp({\n label: \"Play Automatically\",\n description: \"Start playing the video after loading is finished.\",\n }),\n isLooping: createStaticBoolProp({\n label: \"Loop Video\",\n description: \"Automatically replay the video.\",\n }),\n positionMillis: createNumberProp({\n label: \"Starting Point\",\n description: \"Set a certian starting point of the video\",\n min: 0,\n step: 0.01,\n precision: 2,\n group: GROUPS.basic,\n }),\n rate: createNumberProp({\n label: \"Playback Rate\",\n description:\n \"The playback rate of the media. This value must be between 0.0 and 32.0 (Default: 1)\",\n min: 0,\n max: 32,\n step: 0.25,\n precision: 2,\n group: GROUPS.basic,\n }),\n volume: createNumberProp({\n label: \"Volume\",\n description:\n \"The volume of the audio for this media. This value must be between 0.0 (silence) and 1.0 (maximum volume). (Default: .5)\",\n min: 0,\n max: 1,\n step: 0.1,\n precision: 1,\n group: GROUPS.basic,\n }),\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AccordionGroup.
|
|
1
|
+
{"version":3,"sources":["AccordionGroup.tsx"],"names":["React","View","StyleSheet","Pressable","Text","withTheme","extractStyles","AccordionGroup","label","expanded","expandedProp","openColor","closedColor","caretColor","caretColorProp","caretSize","icon","iconSize","style","children","theme","Icon","setExpanded","useState","textStyles","viewStyles","expandedColor","colors","primary","collapsedColor","labelColor","handlePressAction","styles","row","content","color","create","flexDirection","alignItems","flex","justifyContent","marginRight"],"mappings":"AAAA,OAAO,KA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C;AAHpB,KAKGf,IAAI,gBACH,oBAAC,IAAD;AACE,IAAA,IAAI,EAAEA,IADR;AAEE,IAAA,IAAI,EAAEC,QAFR;AAGE,IAAA,KAAK,EAAEa,UAHT;AAIE,IAAA,KAAK,EAAEE,MAAM,CAAChB;AAJhB,IADG,GAOD,IAZN,eAaE,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAEgB,MAAM,CAACE;AAApB,kBACE,oBAAC,IAAD;AACE,IAAA,UAAU,EAAE,KADd;AAEE,IAAA,KAAK,EAAE,CACLV,UADK,EAEL;AACEW,MAAAA,KAAK,EAAEL;AADT,KAFK;AAFT,KASGtB,KATH,CADF,CAbF,eA0BE,oBAAC,IAAD;AACE,IAAA,IAAI,EACFC,QAAQ,GACJ,iCADI,GAEJ,mCAJR;AAME,IAAA,KAAK,EAAEI,UANT;AAOE,IAAA,IAAI,EAAEE;AAPR,IA1BF,CADF,EAqCGN,QAAQ,GAAGU,QAAH,GAAc,IArCzB,CADF;AAyCD,CAlED;;AAoEA,MAAMa,MAAM,GAAG9B,UAAU,CAACkC,MAAX,CAAkB;AAC/BH,EAAAA,GAAG,EAAE;AACHI,IAAAA,aAAa,EAAE,KADZ;AAEHC,IAAAA,UAAU,EAAE;AAFT,GAD0B;AAK/BJ,EAAAA,OAAO,EAAE;AACPK,IAAAA,IAAI,EAAE,CADC;AAEPC,IAAAA,cAAc,EAAE;AAFT,GALsB;AAS/BxB,EAAAA,IAAI,EAAE;AACJyB,IAAAA,WAAW,EAAE;AADT;AATyB,CAAlB,CAAf;AAcA,eAAepC,SAAS,CAACE,cAAD,CAAxB","sourcesContent":["import * as React from \"react\";\nimport {\n View,\n StyleSheet,\n StyleProp,\n TextStyle,\n Pressable,\n} from \"react-native\";\nimport Text from \"../Text\";\nimport { withTheme } from \"../../theming\";\nimport type { IconSlot } from \"../../interfaces/Icon\";\nimport type { Theme } from \"../../styles/DefaultTheme\";\nimport { extractStyles } from \"../../utilities\";\n\ntype AccordionGroupProps = {\n label?: string;\n expanded?: boolean;\n openColor?: string;\n closedColor?: string;\n caretColor?: string;\n caretSize?: number;\n icon?: string;\n iconSize?: number;\n style?: StyleProp<TextStyle>;\n children?: React.ReactNode;\n theme: Theme;\n} & IconSlot;\n\nconst AccordionGroup = ({\n label,\n expanded: expandedProp = false,\n openColor,\n closedColor,\n caretColor: caretColorProp,\n caretSize = 24,\n icon,\n iconSize = 24,\n style,\n children,\n theme,\n Icon,\n}: AccordionGroupProps) => {\n const [expanded, setExpanded] = React.useState<boolean>(expandedProp);\n const { textStyles, viewStyles } = extractStyles(style);\n const expandedColor = openColor || theme.colors.primary;\n const collapsedColor = closedColor || theme.colors.primary;\n const labelColor = expanded ? expandedColor : collapsedColor;\n const caretColor = caretColorProp || labelColor;\n\n const handlePressAction = () => {\n setExpanded(!expanded);\n };\n\n return (\n <>\n <Pressable\n style={[styles.row, viewStyles]}\n onPress={handlePressAction}\n accessibilityRole=\"button\"\n >\n {icon ? (\n <Icon\n name={icon}\n size={iconSize}\n color={labelColor}\n style={styles.icon}\n />\n ) : null}\n <View style={styles.content}>\n <Text\n selectable={false}\n style={[\n textStyles,\n {\n color: labelColor,\n },\n ]}\n >\n {label}\n </Text>\n </View>\n <Icon\n name={\n expanded\n ? \"MaterialIcons/keyboard-arrow-up\"\n : \"MaterialIcons/keyboard-arrow-down\"\n }\n color={caretColor}\n size={caretSize}\n />\n </Pressable>\n {expanded ? children : null}\n </>\n );\n};\n\nconst styles = StyleSheet.create({\n row: {\n flexDirection: \"row\",\n alignItems: \"center\",\n },\n content: {\n flex: 1,\n justifyContent: \"center\",\n },\n icon: {\n marginRight: 8,\n },\n});\n\nexport default withTheme(AccordionGroup);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.
|
|
1
|
+
{"version":3,"sources":["index.tsx"],"names":["default","ActionSheet","ActionSheetItem","ActionSheetCancel"],"mappings":"AAAA,SAASA,OAAO,IAAIC,WAApB,QAAuC,eAAvC;AACA,SAASD,OAAO,IAAIE,eAApB,QAA2C,mBAA3C;AACA,SAASF,OAAO,IAAIG,iBAApB,QAA6C,qBAA7C","sourcesContent":["export { default as ActionSheet } from \"./ActionSheet\";\nexport { default as ActionSheetItem } from \"./ActionSheetItem\";\nexport { default as ActionSheetCancel } from \"./ActionSheetCancel\";\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { COMPONENT_TYPES,
|
|
1
|
+
import { COMPONENT_TYPES, createStaticBoolProp, createSourceProp, createResizeModeProp, createNumberProp, GROUPS } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "Video",
|
|
4
4
|
tag: "Video",
|
|
@@ -16,15 +16,15 @@ export const SEED_DATA = {
|
|
|
16
16
|
defaultValue: "http://static.draftbit.com/videos/intro-to-draftbit.mp4"
|
|
17
17
|
}),
|
|
18
18
|
usePoster: createStaticBoolProp({
|
|
19
|
-
label: "
|
|
19
|
+
label: "Thumbnail",
|
|
20
20
|
description: "Show a thumbnail before the video starts.",
|
|
21
21
|
defaultValue: false
|
|
22
22
|
}),
|
|
23
|
-
posterSource:
|
|
23
|
+
posterSource: createSourceProp({
|
|
24
24
|
label: "Thumbnail Source",
|
|
25
25
|
description: "The optional image to display over the video while it is loading.",
|
|
26
|
-
defaultValue:
|
|
27
|
-
|
|
26
|
+
defaultValue: "https://static.draftbit.com/videos/intro-to-draftbit.png",
|
|
27
|
+
group: GROUPS.basic
|
|
28
28
|
}),
|
|
29
29
|
resizeMode: createResizeModeProp(),
|
|
30
30
|
isMuted: createStaticBoolProp({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Video.ts"],"names":["COMPONENT_TYPES","
|
|
1
|
+
{"version":3,"sources":["Video.ts"],"names":["COMPONENT_TYPES","createStaticBoolProp","createSourceProp","createResizeModeProp","createNumberProp","GROUPS","SEED_DATA","name","tag","description","doc_link","code_link","category","media","layout","height","props","source","label","defaultValue","usePoster","posterSource","group","basic","resizeMode","isM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E,CAPY;AAQvBV,MAAAA,KAAK,EAAEjB,MAAM,CAACkB;AARS,KAAD;AAvDnB;AAXgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createStaticBoolProp,\n createSourceProp,\n createResizeModeProp,\n createNumberProp,\n GROUPS,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Video\",\n tag: \"Video\",\n description: \"Given a URL, display a video\",\n doc_link: \"https://docs.expo.io/versions/latest/sdk/video/\",\n code_link:\n \"https://github.com/expo/expo/blob/master/packages/expo-av/src/Video.tsx\",\n category: COMPONENT_TYPES.media,\n layout: {\n height: 215,\n },\n props: {\n source: createSourceProp({\n label: \"Source\",\n description: \"The source of the video data to display.\",\n defaultValue: \"http://static.draftbit.com/videos/intro-to-draftbit.mp4\",\n }),\n usePoster: createStaticBoolProp({\n label: \"Thumbnail\",\n description: \"Show a thumbnail before the video starts.\",\n defaultValue: false,\n }),\n posterSource: createSourceProp({\n label: \"Thumbnail Source\",\n description:\n \"The optional image to display over the video while it is loading.\",\n defaultValue: \"https://static.draftbit.com/videos/intro-to-draftbit.png\",\n group: GROUPS.basic,\n }),\n resizeMode: createResizeModeProp(),\n isMuted: createStaticBoolProp({\n label: \"Mute Audio\",\n description: \"Mute the audio of the video.\",\n }),\n useNativeControls: createStaticBoolProp({\n label: \"Use Native Controls\",\n description:\n \"Display the playback controls, allowing users to play or pause the video.\",\n defaultValue: true,\n }),\n shouldPlay: createStaticBoolProp({\n label: \"Play Automatically\",\n description: \"Start playing the video after loading is finished.\",\n }),\n isLooping: createStaticBoolProp({\n label: \"Loop Video\",\n description: \"Automatically replay the video.\",\n }),\n positionMillis: createNumberProp({\n label: \"Starting Point\",\n description: \"Set a certian starting point of the video\",\n min: 0,\n step: 0.01,\n precision: 2,\n group: GROUPS.basic,\n }),\n rate: createNumberProp({\n label: \"Playback Rate\",\n description:\n \"The playback rate of the media. This value must be between 0.0 and 32.0 (Default: 1)\",\n min: 0,\n max: 32,\n step: 0.25,\n precision: 2,\n group: GROUPS.basic,\n }),\n volume: createNumberProp({\n label: \"Volume\",\n description:\n \"The volume of the audio for this media. This value must be between 0.0 (silence) and 1.0 (maximum volume). (Default: .5)\",\n min: 0,\n max: 1,\n step: 0.1,\n precision: 1,\n group: GROUPS.basic,\n }),\n },\n};\n"]}
|
|
@@ -32,10 +32,10 @@ export declare const SEED_DATA: {
|
|
|
32
32
|
posterSource: {
|
|
33
33
|
label: string;
|
|
34
34
|
description: string;
|
|
35
|
+
defaultValue: string;
|
|
35
36
|
group: string;
|
|
36
37
|
formType: string;
|
|
37
38
|
propType: string;
|
|
38
|
-
defaultValue: string;
|
|
39
39
|
editable: boolean;
|
|
40
40
|
required: boolean;
|
|
41
41
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "43.6.1
|
|
3
|
+
"version": "43.6.1",
|
|
4
4
|
"description": "Core (non-native) Components",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
]
|
|
81
81
|
]
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "2e18d86e2f83d0d419366dd445faf8d8cbef3577"
|
|
84
84
|
}
|
package/src/mappings/Video.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { COMPONENT_TYPES,
|
|
1
|
+
import { COMPONENT_TYPES, createStaticBoolProp, createSourceProp, createResizeModeProp, createNumberProp, GROUPS, } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "Video",
|
|
4
4
|
tag: "Video",
|
|
@@ -16,15 +16,15 @@ export const SEED_DATA = {
|
|
|
16
16
|
defaultValue: "http://static.draftbit.com/videos/intro-to-draftbit.mp4",
|
|
17
17
|
}),
|
|
18
18
|
usePoster: createStaticBoolProp({
|
|
19
|
-
label: "
|
|
19
|
+
label: "Thumbnail",
|
|
20
20
|
description: "Show a thumbnail before the video starts.",
|
|
21
21
|
defaultValue: false,
|
|
22
22
|
}),
|
|
23
|
-
posterSource:
|
|
23
|
+
posterSource: createSourceProp({
|
|
24
24
|
label: "Thumbnail Source",
|
|
25
25
|
description: "The optional image to display over the video while it is loading.",
|
|
26
|
-
defaultValue:
|
|
27
|
-
|
|
26
|
+
defaultValue: "https://static.draftbit.com/videos/intro-to-draftbit.png",
|
|
27
|
+
group: GROUPS.basic,
|
|
28
28
|
}),
|
|
29
29
|
resizeMode: createResizeModeProp(),
|
|
30
30
|
isMuted: createStaticBoolProp({
|
package/src/mappings/Video.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
2
|
COMPONENT_TYPES,
|
|
3
|
-
createImageProp,
|
|
4
3
|
createStaticBoolProp,
|
|
5
4
|
createSourceProp,
|
|
6
5
|
createResizeModeProp,
|
|
@@ -26,16 +25,16 @@ export const SEED_DATA = {
|
|
|
26
25
|
defaultValue: "http://static.draftbit.com/videos/intro-to-draftbit.mp4",
|
|
27
26
|
}),
|
|
28
27
|
usePoster: createStaticBoolProp({
|
|
29
|
-
label: "
|
|
28
|
+
label: "Thumbnail",
|
|
30
29
|
description: "Show a thumbnail before the video starts.",
|
|
31
30
|
defaultValue: false,
|
|
32
31
|
}),
|
|
33
|
-
posterSource:
|
|
32
|
+
posterSource: createSourceProp({
|
|
34
33
|
label: "Thumbnail Source",
|
|
35
34
|
description:
|
|
36
35
|
"The optional image to display over the video while it is loading.",
|
|
37
|
-
defaultValue:
|
|
38
|
-
|
|
36
|
+
defaultValue: "https://static.draftbit.com/videos/intro-to-draftbit.png",
|
|
37
|
+
group: GROUPS.basic,
|
|
39
38
|
}),
|
|
40
39
|
resizeMode: createResizeModeProp(),
|
|
41
40
|
isMuted: createStaticBoolProp({
|