@wereform/pkgm-wire 1.0.0
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/README.md +28 -0
- package/babel.config.js +3 -0
- package/dist/components/WireChannelMetadata.js +1 -0
- package/dist/components/WireTextArea.js +0 -0
- package/dist/index.js +1 -0
- package/dist/layout/WireCardLayout.js +8 -0
- package/dist/layout/WireUploadLayout.js +1 -0
- package/dist/layout/WireViewLayout.js +7 -0
- package/dist/styles/WireCardLayoutStyles.js +1 -0
- package/dist/styles/WireChannelMetadataStyles.js +1 -0
- package/dist/styles/WireUploadStyles.js +1 -0
- package/dist/styles/WireViewLayoutStyles.js +1 -0
- package/dist/styles/globalStyles.js +1 -0
- package/dist/themes/colors.js +0 -0
- package/dist/themes/spacing.js +0 -0
- package/dist/themes/typography.js +0 -0
- package/dist/utils/shadows.js +0 -0
- package/package.json +30 -0
- package/packageJSON.md +29 -0
- package/src/components/WireChannelMetadata.jsx +58 -0
- package/src/components/WireTextArea.jsx +0 -0
- package/src/index.js +3 -0
- package/src/layout/WireCardLayout.jsx +66 -0
- package/src/layout/WireUploadLayout.jsx +241 -0
- package/src/layout/WireViewLayout.jsx +105 -0
- package/src/styles/WireCardLayoutStyles.js +37 -0
- package/src/styles/WireChannelMetadataStyles.js +104 -0
- package/src/styles/WireUploadStyles.js +132 -0
- package/src/styles/WireViewLayoutStyles.js +27 -0
- package/src/styles/globalStyles.js +28 -0
- package/src/themes/colors.js +0 -0
- package/src/themes/spacing.js +0 -0
- package/src/themes/typography.js +0 -0
- package/src/utils/shadows.js +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# @begenone/pkgm-wire
|
|
2
|
+
|
|
3
|
+
This package provides all functionality for the **"Wire" feature**, BEGENONE’s short-post or tweet-like system.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
The Wire is a lightweight social feed for thoughts, links, or discussions. This package handles:
|
|
8
|
+
|
|
9
|
+
- Rendering short posts
|
|
10
|
+
- Creating and deleting wires
|
|
11
|
+
- Displaying like counts and comments
|
|
12
|
+
- Basic interactions (likes, replies)
|
|
13
|
+
|
|
14
|
+
## Features
|
|
15
|
+
|
|
16
|
+
- 📝 Compose & post wires
|
|
17
|
+
- 🧵 Thread-style replies
|
|
18
|
+
- 💬 Comment & like logic
|
|
19
|
+
- 📄 Clean and scrollable feed interface
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
Used in the mobile app’s **Wire tab**, and may also appear on user profiles or notifications.
|
|
24
|
+
|
|
25
|
+
## Tech Stack
|
|
26
|
+
|
|
27
|
+
- React Native FlatList
|
|
28
|
+
- Shared formatting tools from `@begenone/pkgm-shared`
|
package/babel.config.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.WireChannelMetadata=WireChannelMetadata;var _reactNative=require("react-native");var _WireChannelMetadataStyles=require("../styles/WireChannelMetadataStyles");var _vectorIcons=require("@expo/vector-icons");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="F:\\WeReform Corporation\\Products\\BEGENONE\\App\\mobile\\packages\\begenone-pkgm-wire\\src\\components\\WireChannelMetadata.jsx";function WireChannelMetadata(_ref){var channelLogo=_ref.channelLogo,userName=_ref.userName,subscribersCount=_ref.subscribersCount,timeAgo=_ref.timeAgo,viewsText=_ref.viewsText,containerStyles=_ref.containerStyles;return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:_WireChannelMetadataStyles.WireChannelMetadataStyles.channelMetaContainer,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:_WireChannelMetadataStyles.WireChannelMetadataStyles.channelMetaContainer_ColumnOne,children:[(0,_jsxRuntime.jsx)(_reactNative.Image,{source:{uri:channelLogo||"https://begenone-images.s3.us-east-1.amazonaws.com/default-user-photo.jpg"},style:_WireChannelMetadataStyles.WireChannelMetadataStyles.userImage}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:_WireChannelMetadataStyles.WireChannelMetadataStyles.nameSubcountContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:_WireChannelMetadataStyles.WireChannelMetadataStyles.userName,children:userName||"Default Username"}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:_WireChannelMetadataStyles.WireChannelMetadataStyles.subCountContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:_WireChannelMetadataStyles.WireChannelMetadataStyles.subCount,children:subscribersCount||"0"}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:_WireChannelMetadataStyles.WireChannelMetadataStyles.subText,children:"Subscribers"})]})]})]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[_WireChannelMetadataStyles.WireChannelMetadataStyles.dateViewsContainer,containerStyles],children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:_WireChannelMetadataStyles.WireChannelMetadataStyles.dateContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:_WireChannelMetadataStyles.WireChannelMetadataStyles.dateText,children:timeAgo||"14 Hours Ago"}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:_WireChannelMetadataStyles.WireChannelMetadataStyles.dateIcon,children:(0,_jsxRuntime.jsx)(_vectorIcons.Ionicons,{name:"calendar",size:16,color:"white"})})]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:_WireChannelMetadataStyles.WireChannelMetadataStyles.viewsContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:_WireChannelMetadataStyles.WireChannelMetadataStyles.viewsText,children:viewsText||"0"}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:_WireChannelMetadataStyles.WireChannelMetadataStyles.eyeIcon,children:(0,_jsxRuntime.jsx)(_vectorIcons.Ionicons,{name:"eye-outline",size:16,color:"white"})})]})]})]});}
|
|
File without changes
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"WireCardLayout",{enumerable:true,get:function get(){return _WireCardLayout.WireCardLayout;}});Object.defineProperty(exports,"WireUploadLayout",{enumerable:true,get:function get(){return _WireUploadLayout.WireUploadLayout;}});Object.defineProperty(exports,"WireViewLayout",{enumerable:true,get:function get(){return _WireViewLayout.WireViewLayout;}});var _WireCardLayout=require("./layout/WireCardLayout.jsx");var _WireViewLayout=require("./layout/WireViewLayout.jsx");var _WireUploadLayout=require("./layout/WireUploadLayout.jsx");
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.WireCardLayout=WireCardLayout;var _reactNative=require("react-native");var _pkgmShared=require("@wereform/pkgm-shared");var _vectorIcons=require("@expo/vector-icons");var _WireChannelMetadata=require("../components/WireChannelMetadata");var _WireCardLayoutStyles=require("../styles/WireCardLayoutStyles");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="F:\\WeReform Corporation\\Products\\BEGENONE\\App\\mobile\\packages\\begenone-pkgm-wire\\src\\layout\\WireCardLayout.jsx";function WireCardLayout(_ref){var _this=this;var content=_ref.content,channelLogo=_ref.channelLogo,userName=_ref.userName,subscribersCount=_ref.subscribersCount,timeAgo=_ref.timeAgo,viewsText=_ref.viewsText,onPress=_ref.onPress;var limit=8;var contentText=content!=null?content:`Lorem ipsum dolor sit amet consectetur adipisicing elit. Vero quidem
|
|
2
|
+
distinctio porro qui minus totam eius. Sed laudantium nisi expedita
|
|
3
|
+
distinctio dignissimos dicta praesentium nihil iste velit cumque!
|
|
4
|
+
Assumenda illum veritatis, ipsam sint
|
|
5
|
+
|
|
6
|
+
vero corporis distinctio rem
|
|
7
|
+
quisquam natus iste. Unde esse consequuntur maiores repellendus, cum
|
|
8
|
+
voluptatem vero incidunt temporibus.`;var finalText=contentText?contentText.replace(/\r\n/g,"\n").split("\n"):[];return(0,_jsxRuntime.jsxs)(_reactNative.TouchableOpacity,{style:_WireCardLayoutStyles.WireCardLayoutStyles.container,onPress:onPress,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{children:[(0,_jsxRuntime.jsx)(_WireChannelMetadata.WireChannelMetadata,{channelLogo:channelLogo||"https://begenone-images.s3.us-east-1.amazonaws.com/default-user-photo.jpg",userName:userName,subscribersCount:subscribersCount,timeAgo:timeAgo,viewsText:viewsText}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:_WireCardLayoutStyles.WireCardLayoutStyles.mainTextContainer,children:[finalText.length>0&&(0,_jsxRuntime.jsx)(_reactNative.Text,{numberOfLines:limit,style:_WireCardLayoutStyles.WireCardLayoutStyles.mainText,children:finalText.map(function(text,index){return(0,_jsxRuntime.jsxs)(_reactNative.Text,{children:[text.trim().replace(/\s+/g," "),index<finalText.length-1?"\n":""]},index);})}),(0,_jsxRuntime.jsx)(_reactNative.Text,{children:" "}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:_WireCardLayoutStyles.WireCardLayoutStyles.seeMore,children:"See more \u2192"})]})]}),(0,_jsxRuntime.jsx)(_pkgmShared.MenuInteraction,{containerStyles:{marginBottom:12}})]});}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.WireUploadLayout=WireUploadLayout;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=require("react");var _reactNative=require("react-native");var ImagePicker=_interopRequireWildcard(require("expo-image-picker"));var VideoThumbnails=_interopRequireWildcard(require("expo-video-thumbnails"));var _vectorIcons=require("@expo/vector-icons");var _WireUploadStyles=require("../styles/WireUploadStyles");var _pkgmShared=require("@wereform/pkgm-shared");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="F:\\WeReform Corporation\\Products\\BEGENONE\\App\\mobile\\packages\\begenone-pkgm-wire\\src\\layout\\WireUploadLayout.jsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}function WireUploadLayout(_ref){var _this=this;var profilePic=_ref.profilePic,userName=_ref.userName,onPressVideoUploadScreen=_ref.onPressVideoUploadScreen,onPressWireUpload=_ref.onPressWireUpload;var _useState=(0,_react.useState)(``),_useState2=(0,_slicedToArray2.default)(_useState,2),wireText=_useState2[0],setWireText=_useState2[1];var _useState3=(0,_react.useState)(null),_useState4=(0,_slicedToArray2.default)(_useState3,2),media=_useState4[0],setMedia=_useState4[1];var _useState5=(0,_react.useState)([]),_useState6=(0,_slicedToArray2.default)(_useState5,2),thumbnails=_useState6[0],setThumbnails=_useState6[1];var _useState7=(0,_react.useState)("Default Heading!"),_useState8=(0,_slicedToArray2.default)(_useState7,2),heading=_useState8[0],setHeading=_useState8[1];var pickMedia=function(){var _ref2=(0,_asyncToGenerator2.default)(function*(){var result=yield ImagePicker.launchImageLibraryAsync({mediaTypes:["images","videos"],allowsMultipleSelection:true,selectionLimit:4,quality:1});if(result.canceled)return;var assets=result.assets;setMedia(assets);var finalThumbs=yield Promise.all(assets.map(function(){var _ref3=(0,_asyncToGenerator2.default)(function*(asset){var _asset$mimeType;var isVideo=asset.type==="video"||((_asset$mimeType=asset.mimeType)==null?void 0:_asset$mimeType.startsWith("video"));if(isVideo){try{var _yield$VideoThumbnail=yield VideoThumbnails.getThumbnailAsync(asset.uri,{time:1000}),uri=_yield$VideoThumbnail.uri;return uri;}catch(err){console.log("Video thumbnail error:",err);return null;}}return asset.uri;});return function(_x){return _ref3.apply(this,arguments);};}()));console.log(finalThumbs);setThumbnails(finalThumbs);});return function pickMedia(){return _ref2.apply(this,arguments);};}();console.log(wireText);return(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:_WireUploadStyles.WireUploadStyles.container,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:_WireUploadStyles.WireUploadStyles.profileSection,children:[(0,_jsxRuntime.jsx)(_reactNative.Image,{source:{uri:profilePic||"https://begenone-images.s3.us-east-1.amazonaws.com/default-user-photo.jpg"},style:_WireUploadStyles.WireUploadStyles.userImage}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:_WireUploadStyles.WireUploadStyles.userInfo,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:_WireUploadStyles.WireUploadStyles.userName,children:userName||"Default Username"})})]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:_WireUploadStyles.WireUploadStyles.wireInputContainer,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[(0,_jsxRuntime.jsxs)(_reactNative.Text,{style:{color:"#fff",fontWeight:"900",fontSize:24,paddingBottom:12,flexGrow:1,justifyContent:"flex-start"},children:["Create ",(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{color:"#ff6000"},children:"Wire"})]}),(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{onPress:onPressVideoUploadScreen,children:(0,_jsxRuntime.jsxs)(_reactNative.Text,{style:{color:"#fff",fontWeight:"500",fontSize:14,paddingBottom:12,alignSelf:"center"},children:["Upload ",(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{color:"#ff6000"},children:"Video"})]})})]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:_WireUploadStyles.WireUploadStyles.wireInputTextContainer,children:[(0,_jsxRuntime.jsx)(_pkgmShared.InputField,{multiline:true,placeholder:"Write your Wire...",inputWrapper:_WireUploadStyles.WireUploadStyles.inputWrapper,inputStyle:_WireUploadStyles.WireUploadStyles.aboutTextArea,value:wireText,onChangeText:setWireText}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:_WireUploadStyles.WireUploadStyles.mediaContainer,children:thumbnails.map(function(uri,index){return(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{onPress:pickMedia,children:(0,_jsxRuntime.jsx)(_reactNative.Image,{source:{uri:uri},style:_WireUploadStyles.WireUploadStyles.mediaThumb,resizeMode:"cover"})},index);})}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:_WireUploadStyles.WireUploadStyles.uploadButtonContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:_WireUploadStyles.WireUploadStyles.AIGenerateButton,children:(0,_jsxRuntime.jsx)(_vectorIcons.Ionicons,{name:"sparkles-outline",size:24,color:"#fff"})}),(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{onPress:pickMedia,style:_WireUploadStyles.WireUploadStyles.uploadImageButton,children:(0,_jsxRuntime.jsx)(_vectorIcons.Ionicons,{name:"image",size:24,color:"#fff"})})]})]}),(0,_jsxRuntime.jsx)(_pkgmShared.DropDown,{styles:{marginLeft:0,marginRight:0,marginTop:18},iconStyles:{paddingRight:16},selectText:"Select Age Group",data:[{key:1,label:"Under 14 of age"},{key:2,label:"Above 14 of age"}]}),(0,_jsxRuntime.jsx)(_pkgmShared.DropDown,{styles:{marginLeft:0,marginRight:0,marginTop:18},selectText:"Comments",iconStyles:{paddingRight:16},data:[{key:1,label:"Turn — ON"},{key:2,label:"Turn — OFF"}]})]}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:{flexDirection:"row",width:"auto",justifyContent:"space-between",marginTop:60,marginLeft:24,marginRight:24},children:(0,_jsxRuntime.jsx)(_pkgmShared.CustomizedButton,{label:"Post Wire",style:{backgroundColor:"#ff6000",marginRight:6},fontWeight:"900",textColor:"#fff",onPress:function onPress(){return onPressWireUpload(wireText,heading);}})})]})});}var styles=_reactNative.StyleSheet.create({});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.WireViewLayout=WireViewLayout;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _reactNative=require("react-native");var _WireChannelMetadata=require("../components/WireChannelMetadata");var _WireCardLayoutStyles=require("../styles/WireCardLayoutStyles");var _pkgmShared=require("@wereform/pkgm-shared");var _WireViewLayoutStyles=require("../styles/WireViewLayoutStyles");var _react=require("react");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="F:\\WeReform Corporation\\Products\\BEGENONE\\App\\mobile\\packages\\begenone-pkgm-wire\\src\\layout\\WireViewLayout.jsx";function WireViewLayout(_ref){var _this=this;var content=_ref.content,channelLogo=_ref.channelLogo,userName=_ref.userName,subscribersCount=_ref.subscribersCount,timeAgo=_ref.timeAgo,viewsText=_ref.viewsText,isItMe=_ref.isItMe,onPressDeleteButton=_ref.onPressDeleteButton;var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),isPressed=_useState2[0],setPressed=_useState2[1];var contentText=content!=null?content:`Curiosity is the real engine of progress. You don’t need certainty — you need movement. Every experiment, every failure, every weird idea you chase sharpens your understanding of reality.
|
|
2
|
+
|
|
3
|
+
Stop waiting to “figure it out” first. Dive in, break things, rebuild smarter. The mind grows through friction, not comfort.
|
|
4
|
+
|
|
5
|
+
Mastery isn’t perfection; it’s the relentless act of returning to the edge — again and again — until the unknown feels like home. The goal isn’t to win. It’s to keep becoming.
|
|
6
|
+
|
|
7
|
+
#curiosity #growth #mindset #learning`;var finalText=contentText?contentText.replace(/\r\n/g,"\n").split("\n"):[];function togglePressed(){setPressed(function(prev){return!prev;});}return(0,_jsxRuntime.jsxs)(_reactNative.ScrollView,{style:_WireViewLayoutStyles.WireViewLayoutStyles.container,contentContainerStyle:{flexGrow:1},children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:_WireViewLayoutStyles.WireViewLayoutStyles.secondaryContainer,children:[(0,_jsxRuntime.jsx)(_pkgmShared.MenuChannelMeta,{containerStyles:{marginTop:0,paddingBottom:12,marginLeft:0,marginRight:0},channelLogo:channelLogo,userName:userName,subscribersCount:subscribersCount,timeAgo:timeAgo,viewsText:viewsText}),(0,_jsxRuntime.jsx)(_reactNative.View,{children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:_WireViewLayoutStyles.WireViewLayoutStyles.mainText,children:finalText.length>0&&(0,_jsxRuntime.jsx)(_reactNative.Text,{style:_WireViewLayoutStyles.WireViewLayoutStyles.mainText,children:finalText.map(function(text,index){return(0,_jsxRuntime.jsxs)(_reactNative.Text,{children:[text.trim().replace(/\s+/g," "),index<finalText.length-1?"\n":""]},index);})})})})]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{children:[(0,_jsxRuntime.jsx)(_pkgmShared.MenuInteraction,{pressed:togglePressed}),isItMe&&isPressed&&(0,_jsxRuntime.jsx)(_pkgmShared.CustomizedButton,{label:"Delete",textColor:"white",style:[{backgroundColor:"red",marginTop:12},isItMe?{position:"absolute",width:80,height:35,right:24,bottom:48}:""],onPress:function onPress(){console.log("DELETE PRESSED");onPressDeleteButton();}})]})]});}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.WireCardLayoutStyles=void 0;var _reactNative=require("react-native");var _globalStyles=require("./globalStyles");var WireCardLayoutStyles=exports.WireCardLayoutStyles=_reactNative.StyleSheet.create({container:{width:"auto",minHeight:200,justifyContent:"space-between",margin:12,padding:12,backgroundColor:_globalStyles.globalStyles.colors.colorPrimary350,borderRadius:_globalStyles.globalStyles.borders.borderPrimary100},mainTextContainer:{borderRadius:12,paddingVertical:12,paddingHorizontal:10,marginTop:10,maxHeight:360},mainText:{color:"#ddd",fontSize:15,lineHeight:22,letterSpacing:0.3},seeMore:{color:"#fff",fontWeight:"600",marginTop:4,fontSize:14}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.WireChannelMetadataStyles=void 0;var _reactNative=require("react-native");var _globalStyles=require("./globalStyles");var WireChannelMetadataStyles=exports.WireChannelMetadataStyles=_reactNative.StyleSheet.create({dateViewsContainer:{flexDirection:"column",width:"auto",justifyContent:"center",alignItems:"flex-end"},dateContainer:{flexDirection:"row",paddingBottom:4},viewsContainer:{flexDirection:"row",justifyContent:"flex-end"},dateText:{color:_globalStyles.globalStyles.colors.colorPrimary600,marginRight:8,fontSize:_reactNative.Platform.OS==="ios"?14:12},viewsText:{color:_globalStyles.globalStyles.colors.colorPrimary600,marginRight:8,fontSize:_reactNative.Platform.OS==="ios"?14:12},channelMetaContainer:{width:"auto",flexDirection:"row",backgroundColor:_globalStyles.globalStyles.colors.colorPrimary200,justifyContent:"space-between",padding:12,borderRadius:_globalStyles.globalStyles.borders.borderPrimary100},channelMetaContainer_ColumnOne:{flexDirection:"row"},userImage:{width:40,height:40,borderRadius:_globalStyles.globalStyles.borders.borderPrimary50},nameSubcountContainer:{flexDirection:"column",justifyContent:"center",paddingLeft:12},userName:{color:"#fff",fontSize:16,paddingBottom:4,fontWeight:"bold"},subCountContainer:{flexDirection:"row"},subCount:{color:_globalStyles.globalStyles.colors.colorPrimary600,paddingRight:6,fontSize:12,fontWeight:"bold"},subText:{color:"#fff",fontSize:12},subscribeButtonContainer:{backgroundColor:_globalStyles.globalStyles.colors.colorPrimary600,width:100,borderRadius:_globalStyles.globalStyles.borders.borderPrimary400,alignItems:"center",justifyContent:"center"},subscribeButtonText:{color:"#fff",fontWeight:"bold"}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.WireUploadStyles=void 0;var _reactNative=require("react-native");var _globalStyles=require("./globalStyles");var WireUploadStyles=exports.WireUploadStyles=_reactNative.StyleSheet.create({container:{flex:1,backgroundColor:"#141414",marginBottom:120},profileSection:{flexDirection:"row",alignItems:"center",borderBottomWidth:1,paddingTop:18,paddingBottom:18,marginLeft:36,marginRight:36,borderColor:_globalStyles.globalStyles.colors.colorPrimary450},userImage:{width:60,height:60,borderRadius:12,marginRight:16},userInfo:{flexDirection:"column",justifyContent:"center"},userName:{color:"white",fontSize:18,fontWeight:"600"},channelSettingsText:{color:"#ff6600",marginTop:4},wireInputContainer:{marginRight:24,marginLeft:24,marginTop:24},wireInputTextContainer:{backgroundColor:"#202020",borderRadius:12},inputWrapper:{backgroundColor:"#202020",width:"auto",borderBottomRightRadius:0,borderBottomLeftRadius:0},aboutTextArea:{textAlignVertical:"top",whiteSpace:"pre",height:"auto",minHeight:200,color:"white",paddingTop:16,marginTop:0,lineHeight:24,fontWeight:400,fontSize:18,paddingBottom:36},media:{width:"auto",height:200,borderRadius:14,backgroundColor:"#000"},uploadButtonContainer:{flexDirection:"row",alignItems:"center",justifyContent:"flex-end"},AIGenerateButton:{paddingRight:24},uploadImageButton:{paddingRight:24,paddingVertical:24,borderRadius:12},uploadButtonText:{color:"#fff",fontSize:14,fontWeight:"600",marginLeft:8},mediaContainer:{flexDirection:"row",flexWrap:"wrap",gap:10,width:"auto",marginBottom:16,paddingLeft:6,paddingRight:6,justifyContent:"space-evenly"},mediaThumb:{width:120,height:120,borderRadius:12,backgroundColor:"#000"}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.WireViewLayoutStyles=void 0;var _reactNative=require("react-native");var _globalStyles=require("./globalStyles");var WireViewLayoutStyles=exports.WireViewLayoutStyles=_reactNative.StyleSheet.create({container:{width:"auto",margin:12,paddingTop:12,paddingBottom:12,paddingLeft:18,paddingRight:18,backgroundColor:_globalStyles.globalStyles.colors.colorPrimary350,borderRadius:_globalStyles.globalStyles.borders.borderPrimary200,marginBottom:96},secondaryContainer:{flexDirection:"column",paddingBottom:24},mainText:{color:"#fff",lineHeight:28,fontSize:18}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.globalStyles=void 0;var globalStyles=exports.globalStyles={colors:{colorPrimary50:"rgba(21, 21, 21, .7)",colorPrimary100:"#151515",colorPrimary200:"#252525",colorPrimary250:"rgba(37, 37, 37, .9)",colorPrimary300:"#3C3C3C",colorPrimary350:"rgba(60,60,60,.2)",colorPrimary400:"#7F7F7F",colorPrimary450:"rgba(127, 127, 127, .3)",colorPrimary500:"#D3D3D3",colorPrimary600:"#ff6600ff",colorPrimary700:"#FF8800"},borders:{borderPrimary50:8,borderPrimary100:10,borderPrimary200:12,borderPrimary300:15,borderPrimary400:30}};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@wereform/pkgm-wire",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"build": "babel src --out-dir dist --extensions .js,.jsx"
|
|
7
|
+
},
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"access": "public"
|
|
10
|
+
},
|
|
11
|
+
"peerDependencies": {
|
|
12
|
+
"@expo/vector-icons": "*",
|
|
13
|
+
"react": "*",
|
|
14
|
+
"react-native": "*"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@wereform/pkgm-channel": "^1.0.0",
|
|
18
|
+
"@wereform/pkgm-settings": "^1.0.0",
|
|
19
|
+
"@wereform/pkgm-shared": "^1.0.0",
|
|
20
|
+
"@wereform/pkgm-video": "^1.0.0",
|
|
21
|
+
"expo-image-picker": "^17.0.8",
|
|
22
|
+
"expo-video-thumbnails": "^10.0.7"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@babel/cli": "^7.28.3",
|
|
26
|
+
"@babel/core": "^7.28.5",
|
|
27
|
+
"@babel/preset-env": "^7.28.5",
|
|
28
|
+
"metro-react-native-babel-preset": "^0.77.0"
|
|
29
|
+
}
|
|
30
|
+
}
|
package/packageJSON.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@begenone/pkgm-wire",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"peerDependencies": {
|
|
7
|
+
"@expo/vector-icons": "_",
|
|
8
|
+
"react": "_",
|
|
9
|
+
"react-native": "_"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "babel src --out-dir dist --extensions .js,.jsx"
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@begenone/pkgm-channel": "workspace:_",
|
|
16
|
+
"@begenone/pkgm-settings": "workspace:_",
|
|
17
|
+
"@begenone/pkgm-shared": "workspace:_",
|
|
18
|
+
"@begenone/pkgm-video": "workspace:_",
|
|
19
|
+
"@begenone/pkgm-wire": "workspace:_",
|
|
20
|
+
"expo-image-picker": "^17.0.8",
|
|
21
|
+
"expo-video-thumbnails": "^10.0.7"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@babel/cli": "^7.28.3",
|
|
25
|
+
"@babel/core": "^7.28.5",
|
|
26
|
+
"@babel/preset-env": "^7.28.5",
|
|
27
|
+
"metro-react-native-babel-preset": "^0.77.0"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Image, Pressable, Text, View } from "react-native";
|
|
2
|
+
import { WireChannelMetadataStyles } from "../styles/WireChannelMetadataStyles";
|
|
3
|
+
import { Ionicons } from "@expo/vector-icons";
|
|
4
|
+
|
|
5
|
+
export function WireChannelMetadata({
|
|
6
|
+
channelLogo,
|
|
7
|
+
userName,
|
|
8
|
+
subscribersCount,
|
|
9
|
+
timeAgo,
|
|
10
|
+
viewsText,
|
|
11
|
+
containerStyles,
|
|
12
|
+
}) {
|
|
13
|
+
return (
|
|
14
|
+
<View style={WireChannelMetadataStyles.channelMetaContainer}>
|
|
15
|
+
<View style={WireChannelMetadataStyles.channelMetaContainer_ColumnOne}>
|
|
16
|
+
<Image
|
|
17
|
+
source={{
|
|
18
|
+
uri:
|
|
19
|
+
channelLogo ||
|
|
20
|
+
"https://begenone-images.s3.us-east-1.amazonaws.com/default-user-photo.jpg",
|
|
21
|
+
}}
|
|
22
|
+
style={WireChannelMetadataStyles.userImage}
|
|
23
|
+
/>
|
|
24
|
+
<View style={WireChannelMetadataStyles.nameSubcountContainer}>
|
|
25
|
+
<Text style={WireChannelMetadataStyles.userName}>
|
|
26
|
+
{userName || "Default Username"}
|
|
27
|
+
</Text>
|
|
28
|
+
<View style={WireChannelMetadataStyles.subCountContainer}>
|
|
29
|
+
<Text style={WireChannelMetadataStyles.subCount}>
|
|
30
|
+
{subscribersCount || "0"}
|
|
31
|
+
</Text>
|
|
32
|
+
<Text style={WireChannelMetadataStyles.subText}>Subscribers</Text>
|
|
33
|
+
</View>
|
|
34
|
+
</View>
|
|
35
|
+
</View>
|
|
36
|
+
<View
|
|
37
|
+
style={[WireChannelMetadataStyles.dateViewsContainer, containerStyles]}
|
|
38
|
+
>
|
|
39
|
+
<View style={WireChannelMetadataStyles.dateContainer}>
|
|
40
|
+
<Text style={WireChannelMetadataStyles.dateText}>
|
|
41
|
+
{timeAgo || "14 Hours Ago"}
|
|
42
|
+
</Text>
|
|
43
|
+
<View style={WireChannelMetadataStyles.dateIcon}>
|
|
44
|
+
<Ionicons name="calendar" size={16} color="white" />
|
|
45
|
+
</View>
|
|
46
|
+
</View>
|
|
47
|
+
<View style={WireChannelMetadataStyles.viewsContainer}>
|
|
48
|
+
<Text style={WireChannelMetadataStyles.viewsText}>
|
|
49
|
+
{viewsText || "0"}
|
|
50
|
+
</Text>
|
|
51
|
+
<View style={WireChannelMetadataStyles.eyeIcon}>
|
|
52
|
+
<Ionicons name="eye-outline" size={16} color="white" />
|
|
53
|
+
</View>
|
|
54
|
+
</View>
|
|
55
|
+
</View>
|
|
56
|
+
</View>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
File without changes
|
package/src/index.js
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Text, TouchableOpacity, View } from "react-native";
|
|
2
|
+
import { MenuChannelMeta, MenuInteraction } from "@wereform/pkgm-shared";
|
|
3
|
+
import { Ionicons } from "@expo/vector-icons";
|
|
4
|
+
import { WireChannelMetadata } from "../components/WireChannelMetadata";
|
|
5
|
+
import { WireCardLayoutStyles } from "../styles/WireCardLayoutStyles";
|
|
6
|
+
|
|
7
|
+
export function WireCardLayout({
|
|
8
|
+
content,
|
|
9
|
+
channelLogo,
|
|
10
|
+
userName,
|
|
11
|
+
subscribersCount,
|
|
12
|
+
timeAgo,
|
|
13
|
+
viewsText,
|
|
14
|
+
onPress,
|
|
15
|
+
}) {
|
|
16
|
+
const limit = 8;
|
|
17
|
+
|
|
18
|
+
const contentText =
|
|
19
|
+
content ??
|
|
20
|
+
`Lorem ipsum dolor sit amet consectetur adipisicing elit. Vero quidem
|
|
21
|
+
distinctio porro qui minus totam eius. Sed laudantium nisi expedita
|
|
22
|
+
distinctio dignissimos dicta praesentium nihil iste velit cumque!
|
|
23
|
+
Assumenda illum veritatis, ipsam sint
|
|
24
|
+
|
|
25
|
+
vero corporis distinctio rem
|
|
26
|
+
quisquam natus iste. Unde esse consequuntur maiores repellendus, cum
|
|
27
|
+
voluptatem vero incidunt temporibus.`;
|
|
28
|
+
|
|
29
|
+
// Only compute finalText if we actually have content
|
|
30
|
+
const finalText = contentText
|
|
31
|
+
? contentText.replace(/\r\n/g, "\n").split("\n")
|
|
32
|
+
: [];
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<TouchableOpacity style={WireCardLayoutStyles.container} onPress={onPress}>
|
|
36
|
+
<View>
|
|
37
|
+
<WireChannelMetadata
|
|
38
|
+
channelLogo={
|
|
39
|
+
channelLogo ||
|
|
40
|
+
"https://begenone-images.s3.us-east-1.amazonaws.com/default-user-photo.jpg"
|
|
41
|
+
}
|
|
42
|
+
userName={userName}
|
|
43
|
+
subscribersCount={subscribersCount}
|
|
44
|
+
timeAgo={timeAgo}
|
|
45
|
+
viewsText={viewsText}
|
|
46
|
+
/>
|
|
47
|
+
|
|
48
|
+
<View style={WireCardLayoutStyles.mainTextContainer}>
|
|
49
|
+
{finalText.length > 0 && (
|
|
50
|
+
<Text numberOfLines={limit} style={WireCardLayoutStyles.mainText}>
|
|
51
|
+
{finalText.map((text, index) => (
|
|
52
|
+
<Text key={index}>
|
|
53
|
+
{text.trim().replace(/\s+/g, " ")}
|
|
54
|
+
{index < finalText.length - 1 ? "\n" : ""}
|
|
55
|
+
</Text>
|
|
56
|
+
))}
|
|
57
|
+
</Text>
|
|
58
|
+
)}
|
|
59
|
+
<Text> </Text>
|
|
60
|
+
<Text style={WireCardLayoutStyles.seeMore}>See more →</Text>
|
|
61
|
+
</View>
|
|
62
|
+
</View>
|
|
63
|
+
<MenuInteraction containerStyles={{ marginBottom: 12 }} />
|
|
64
|
+
</TouchableOpacity>
|
|
65
|
+
);
|
|
66
|
+
}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import {
|
|
3
|
+
Image,
|
|
4
|
+
ScrollView,
|
|
5
|
+
StyleSheet,
|
|
6
|
+
Text,
|
|
7
|
+
TextInput,
|
|
8
|
+
TouchableOpacity,
|
|
9
|
+
View,
|
|
10
|
+
} from "react-native";
|
|
11
|
+
|
|
12
|
+
import * as ImagePicker from "expo-image-picker";
|
|
13
|
+
import * as VideoThumbnails from "expo-video-thumbnails";
|
|
14
|
+
import { Ionicons } from "@expo/vector-icons";
|
|
15
|
+
import { WireUploadStyles } from "../styles/WireUploadStyles";
|
|
16
|
+
import { CustomizedButton, DropDown, InputField } from "@wereform/pkgm-shared";
|
|
17
|
+
|
|
18
|
+
export function WireUploadLayout({
|
|
19
|
+
profilePic,
|
|
20
|
+
userName,
|
|
21
|
+
onPressVideoUploadScreen,
|
|
22
|
+
onPressWireUpload,
|
|
23
|
+
}) {
|
|
24
|
+
const [wireText, setWireText] = useState(``);
|
|
25
|
+
const [media, setMedia] = useState(null); // image/video URI
|
|
26
|
+
const [thumbnails, setThumbnails] = useState([]);
|
|
27
|
+
const [heading, setHeading] = useState("Default Heading!");
|
|
28
|
+
|
|
29
|
+
const pickMedia = async () => {
|
|
30
|
+
let result = await ImagePicker.launchImageLibraryAsync({
|
|
31
|
+
mediaTypes: ["images", "videos"],
|
|
32
|
+
allowsMultipleSelection: true,
|
|
33
|
+
selectionLimit: 4,
|
|
34
|
+
quality: 1,
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
if (result.canceled) return;
|
|
38
|
+
|
|
39
|
+
const assets = result.assets;
|
|
40
|
+
|
|
41
|
+
// Save raw assets
|
|
42
|
+
setMedia(assets);
|
|
43
|
+
|
|
44
|
+
// Generate thumbnails for videos, or use image URI directly
|
|
45
|
+
const finalThumbs = await Promise.all(
|
|
46
|
+
assets.map(async asset => {
|
|
47
|
+
const isVideo =
|
|
48
|
+
asset.type === "video" || asset.mimeType?.startsWith("video");
|
|
49
|
+
|
|
50
|
+
if (isVideo) {
|
|
51
|
+
try {
|
|
52
|
+
const { uri } = await VideoThumbnails.getThumbnailAsync(asset.uri, {
|
|
53
|
+
time: 1000,
|
|
54
|
+
});
|
|
55
|
+
return uri;
|
|
56
|
+
} catch (err) {
|
|
57
|
+
console.log("Video thumbnail error:", err);
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Image → use directly
|
|
63
|
+
return asset.uri;
|
|
64
|
+
})
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
console.log(finalThumbs);
|
|
68
|
+
|
|
69
|
+
setThumbnails(finalThumbs);
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
console.log(wireText);
|
|
73
|
+
|
|
74
|
+
return (
|
|
75
|
+
<ScrollView>
|
|
76
|
+
<View style={WireUploadStyles.container}>
|
|
77
|
+
<View style={WireUploadStyles.profileSection}>
|
|
78
|
+
<Image
|
|
79
|
+
source={{
|
|
80
|
+
uri:
|
|
81
|
+
profilePic ||
|
|
82
|
+
"https://begenone-images.s3.us-east-1.amazonaws.com/default-user-photo.jpg",
|
|
83
|
+
}}
|
|
84
|
+
style={WireUploadStyles.userImage}
|
|
85
|
+
/>
|
|
86
|
+
|
|
87
|
+
<View style={WireUploadStyles.userInfo}>
|
|
88
|
+
<Text style={WireUploadStyles.userName}>
|
|
89
|
+
{userName || "Default Username"}
|
|
90
|
+
</Text>
|
|
91
|
+
|
|
92
|
+
{/* Link to user's public-facing channel page */}
|
|
93
|
+
{/* <TouchableOpacity
|
|
94
|
+
onPress={() => Linking.openURL("https://begenone.com")}
|
|
95
|
+
>
|
|
96
|
+
<Text style={WireUploadStyles.channelSettingsText}>
|
|
97
|
+
View Channel
|
|
98
|
+
</Text>
|
|
99
|
+
</TouchableOpacity> */}
|
|
100
|
+
</View>
|
|
101
|
+
</View>
|
|
102
|
+
{/* 1 — Composer Input */}
|
|
103
|
+
<View style={WireUploadStyles.wireInputContainer}>
|
|
104
|
+
<View
|
|
105
|
+
style={{
|
|
106
|
+
flexDirection: "row",
|
|
107
|
+
justifyContent: "space-between",
|
|
108
|
+
alignItems: "center",
|
|
109
|
+
}}
|
|
110
|
+
>
|
|
111
|
+
<Text
|
|
112
|
+
style={{
|
|
113
|
+
color: "#fff",
|
|
114
|
+
fontWeight: "900",
|
|
115
|
+
fontSize: 24,
|
|
116
|
+
paddingBottom: 12,
|
|
117
|
+
flexGrow: 1,
|
|
118
|
+
justifyContent: "flex-start",
|
|
119
|
+
}}
|
|
120
|
+
>
|
|
121
|
+
Create <Text style={{ color: "#ff6000" }}>Wire</Text>
|
|
122
|
+
</Text>
|
|
123
|
+
<TouchableOpacity onPress={onPressVideoUploadScreen}>
|
|
124
|
+
<Text
|
|
125
|
+
style={{
|
|
126
|
+
color: "#fff",
|
|
127
|
+
fontWeight: "500",
|
|
128
|
+
fontSize: 14,
|
|
129
|
+
paddingBottom: 12,
|
|
130
|
+
// flexGrow: 1,
|
|
131
|
+
|
|
132
|
+
alignSelf: "center",
|
|
133
|
+
}}
|
|
134
|
+
>
|
|
135
|
+
Upload <Text style={{ color: "#ff6000" }}>Video</Text>
|
|
136
|
+
</Text>
|
|
137
|
+
</TouchableOpacity>
|
|
138
|
+
</View>
|
|
139
|
+
<View style={WireUploadStyles.wireInputTextContainer}>
|
|
140
|
+
<InputField
|
|
141
|
+
multiline
|
|
142
|
+
placeholder="Write your Wire..."
|
|
143
|
+
inputWrapper={WireUploadStyles.inputWrapper}
|
|
144
|
+
inputStyle={WireUploadStyles.aboutTextArea}
|
|
145
|
+
value={wireText}
|
|
146
|
+
onChangeText={setWireText}
|
|
147
|
+
/>
|
|
148
|
+
|
|
149
|
+
{/* 2 — Media Preview (always below text) */}
|
|
150
|
+
<View style={WireUploadStyles.mediaContainer}>
|
|
151
|
+
{thumbnails.map((uri, index) => (
|
|
152
|
+
<TouchableOpacity key={index} onPress={pickMedia}>
|
|
153
|
+
<Image
|
|
154
|
+
source={{ uri }}
|
|
155
|
+
style={WireUploadStyles.mediaThumb}
|
|
156
|
+
resizeMode="cover"
|
|
157
|
+
/>
|
|
158
|
+
</TouchableOpacity>
|
|
159
|
+
))}
|
|
160
|
+
</View>
|
|
161
|
+
|
|
162
|
+
{/* 3 — Upload Button */}
|
|
163
|
+
<View style={WireUploadStyles.uploadButtonContainer}>
|
|
164
|
+
<TouchableOpacity style={WireUploadStyles.AIGenerateButton}>
|
|
165
|
+
<Ionicons name="sparkles-outline" size={24} color="#fff" />
|
|
166
|
+
</TouchableOpacity>
|
|
167
|
+
<TouchableOpacity
|
|
168
|
+
onPress={pickMedia}
|
|
169
|
+
style={WireUploadStyles.uploadImageButton}
|
|
170
|
+
>
|
|
171
|
+
<Ionicons name="image" size={24} color="#fff" />
|
|
172
|
+
</TouchableOpacity>
|
|
173
|
+
</View>
|
|
174
|
+
</View>
|
|
175
|
+
|
|
176
|
+
<DropDown
|
|
177
|
+
styles={{
|
|
178
|
+
marginLeft: 0,
|
|
179
|
+
marginRight: 0,
|
|
180
|
+
marginTop: 18,
|
|
181
|
+
// paddingRight: 24,
|
|
182
|
+
}}
|
|
183
|
+
iconStyles={{ paddingRight: 16 }}
|
|
184
|
+
selectText={"Select Age Group"}
|
|
185
|
+
data={[
|
|
186
|
+
{ key: 1, label: "Under 14 of age" },
|
|
187
|
+
{ key: 2, label: "Above 14 of age" },
|
|
188
|
+
]}
|
|
189
|
+
/>
|
|
190
|
+
|
|
191
|
+
<DropDown
|
|
192
|
+
styles={{ marginLeft: 0, marginRight: 0, marginTop: 18 }}
|
|
193
|
+
selectText={"Comments"}
|
|
194
|
+
iconStyles={{ paddingRight: 16 }}
|
|
195
|
+
data={[
|
|
196
|
+
{ key: 1, label: "Turn — ON" },
|
|
197
|
+
{ key: 2, label: "Turn — OFF" },
|
|
198
|
+
]}
|
|
199
|
+
/>
|
|
200
|
+
</View>
|
|
201
|
+
|
|
202
|
+
<View
|
|
203
|
+
style={{
|
|
204
|
+
flexDirection: "row",
|
|
205
|
+
width: "auto",
|
|
206
|
+
justifyContent: "space-between",
|
|
207
|
+
|
|
208
|
+
marginTop: 60,
|
|
209
|
+
marginLeft: 24,
|
|
210
|
+
marginRight: 24,
|
|
211
|
+
}}
|
|
212
|
+
>
|
|
213
|
+
<CustomizedButton
|
|
214
|
+
label={"Post Wire"}
|
|
215
|
+
style={{
|
|
216
|
+
backgroundColor: "#ff6000",
|
|
217
|
+
marginRight: 6,
|
|
218
|
+
}}
|
|
219
|
+
fontWeight={"900"}
|
|
220
|
+
textColor={"#fff"}
|
|
221
|
+
onPress={() => onPressWireUpload(wireText, heading)}
|
|
222
|
+
/>
|
|
223
|
+
{/* <CustomizedButton
|
|
224
|
+
label={"Schedule"}
|
|
225
|
+
style={{
|
|
226
|
+
backgroundColor: "#202020",
|
|
227
|
+
marginLeft: 6,
|
|
228
|
+
}}
|
|
229
|
+
fontWeight={"900"}
|
|
230
|
+
textColor={"#404040"}
|
|
231
|
+
/> */}
|
|
232
|
+
</View>
|
|
233
|
+
|
|
234
|
+
{/* 4 — Future AI Row */}
|
|
235
|
+
{/* <WireAIBar text={text} onChange={setText} /> */}
|
|
236
|
+
</View>
|
|
237
|
+
</ScrollView>
|
|
238
|
+
);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
const styles = StyleSheet.create({});
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { ScrollView, Text, View } from "react-native";
|
|
2
|
+
import { WireChannelMetadata } from "../components/WireChannelMetadata";
|
|
3
|
+
import { WireCardLayoutStyles } from "../styles/WireCardLayoutStyles";
|
|
4
|
+
import {
|
|
5
|
+
MenuInteraction,
|
|
6
|
+
MenuChannelMeta,
|
|
7
|
+
CustomizedButton,
|
|
8
|
+
} from "@wereform/pkgm-shared";
|
|
9
|
+
import { WireViewLayoutStyles } from "../styles/WireViewLayoutStyles";
|
|
10
|
+
import { useState } from "react";
|
|
11
|
+
|
|
12
|
+
export function WireViewLayout({
|
|
13
|
+
content,
|
|
14
|
+
channelLogo,
|
|
15
|
+
userName,
|
|
16
|
+
subscribersCount,
|
|
17
|
+
timeAgo,
|
|
18
|
+
viewsText,
|
|
19
|
+
isItMe,
|
|
20
|
+
onPressDeleteButton,
|
|
21
|
+
}) {
|
|
22
|
+
const [isPressed, setPressed] = useState(false);
|
|
23
|
+
|
|
24
|
+
const contentText =
|
|
25
|
+
content ??
|
|
26
|
+
`Curiosity is the real engine of progress. You don’t need certainty — you need movement. Every experiment, every failure, every weird idea you chase sharpens your understanding of reality.
|
|
27
|
+
|
|
28
|
+
Stop waiting to “figure it out” first. Dive in, break things, rebuild smarter. The mind grows through friction, not comfort.
|
|
29
|
+
|
|
30
|
+
Mastery isn’t perfection; it’s the relentless act of returning to the edge — again and again — until the unknown feels like home. The goal isn’t to win. It’s to keep becoming.
|
|
31
|
+
|
|
32
|
+
#curiosity #growth #mindset #learning`;
|
|
33
|
+
|
|
34
|
+
// Only compute finalText if we actually have content
|
|
35
|
+
const finalText = contentText
|
|
36
|
+
? contentText.replace(/\r\n/g, "\n").split("\n")
|
|
37
|
+
: [];
|
|
38
|
+
|
|
39
|
+
function togglePressed() {
|
|
40
|
+
setPressed(prev => !prev);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<ScrollView
|
|
45
|
+
style={WireViewLayoutStyles.container}
|
|
46
|
+
contentContainerStyle={{ flexGrow: 1 }}
|
|
47
|
+
>
|
|
48
|
+
<View style={WireViewLayoutStyles.secondaryContainer}>
|
|
49
|
+
<MenuChannelMeta
|
|
50
|
+
containerStyles={{
|
|
51
|
+
marginTop: 0,
|
|
52
|
+
paddingBottom: 12,
|
|
53
|
+
marginLeft: 0,
|
|
54
|
+
marginRight: 0,
|
|
55
|
+
}}
|
|
56
|
+
channelLogo={channelLogo}
|
|
57
|
+
userName={userName}
|
|
58
|
+
subscribersCount={subscribersCount}
|
|
59
|
+
timeAgo={timeAgo}
|
|
60
|
+
viewsText={viewsText}
|
|
61
|
+
/>
|
|
62
|
+
<View>
|
|
63
|
+
<Text style={WireViewLayoutStyles.mainText}>
|
|
64
|
+
{finalText.length > 0 && (
|
|
65
|
+
<Text style={WireViewLayoutStyles.mainText}>
|
|
66
|
+
{finalText.map((text, index) => (
|
|
67
|
+
<Text key={index}>
|
|
68
|
+
{text.trim().replace(/\s+/g, " ")}
|
|
69
|
+
{index < finalText.length - 1 ? "\n" : ""}
|
|
70
|
+
</Text>
|
|
71
|
+
))}
|
|
72
|
+
</Text>
|
|
73
|
+
)}
|
|
74
|
+
</Text>
|
|
75
|
+
</View>
|
|
76
|
+
</View>
|
|
77
|
+
<View>
|
|
78
|
+
<MenuInteraction pressed={togglePressed} />
|
|
79
|
+
|
|
80
|
+
{isItMe && isPressed && (
|
|
81
|
+
<CustomizedButton
|
|
82
|
+
label={"Delete"}
|
|
83
|
+
textColor={"white"}
|
|
84
|
+
style={[
|
|
85
|
+
{ backgroundColor: "red", marginTop: 12 },
|
|
86
|
+
isItMe
|
|
87
|
+
? {
|
|
88
|
+
position: "absolute",
|
|
89
|
+
width: 80,
|
|
90
|
+
height: 35,
|
|
91
|
+
right: 24,
|
|
92
|
+
bottom: 48,
|
|
93
|
+
}
|
|
94
|
+
: "",
|
|
95
|
+
]}
|
|
96
|
+
onPress={() => {
|
|
97
|
+
console.log("DELETE PRESSED");
|
|
98
|
+
onPressDeleteButton();
|
|
99
|
+
}}
|
|
100
|
+
/>
|
|
101
|
+
)}
|
|
102
|
+
</View>
|
|
103
|
+
</ScrollView>
|
|
104
|
+
);
|
|
105
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { StyleSheet } from "react-native";
|
|
2
|
+
import { globalStyles } from "./globalStyles";
|
|
3
|
+
|
|
4
|
+
export const WireCardLayoutStyles = StyleSheet.create({
|
|
5
|
+
container: {
|
|
6
|
+
width: "auto",
|
|
7
|
+
minHeight: 200,
|
|
8
|
+
justifyContent: "space-between",
|
|
9
|
+
// aspectRatio: 1 / 1,
|
|
10
|
+
margin: 12,
|
|
11
|
+
padding: 12,
|
|
12
|
+
backgroundColor: globalStyles.colors.colorPrimary350,
|
|
13
|
+
borderRadius: globalStyles.borders.borderPrimary100,
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
mainTextContainer: {
|
|
17
|
+
borderRadius: 12,
|
|
18
|
+
paddingVertical: 12,
|
|
19
|
+
paddingHorizontal: 10,
|
|
20
|
+
marginTop: 10,
|
|
21
|
+
maxHeight: 360,
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
mainText: {
|
|
25
|
+
color: "#ddd",
|
|
26
|
+
fontSize: 15,
|
|
27
|
+
lineHeight: 22,
|
|
28
|
+
letterSpacing: 0.3,
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
seeMore: {
|
|
32
|
+
color: "#fff",
|
|
33
|
+
fontWeight: "600",
|
|
34
|
+
marginTop: 4,
|
|
35
|
+
fontSize: 14,
|
|
36
|
+
},
|
|
37
|
+
});
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { Platform, StyleSheet } from "react-native";
|
|
2
|
+
import { globalStyles } from "./globalStyles";
|
|
3
|
+
|
|
4
|
+
export const WireChannelMetadataStyles = StyleSheet.create({
|
|
5
|
+
dateViewsContainer: {
|
|
6
|
+
flexDirection: "column",
|
|
7
|
+
width: "auto",
|
|
8
|
+
justifyContent: "center",
|
|
9
|
+
alignItems: "flex-end",
|
|
10
|
+
},
|
|
11
|
+
|
|
12
|
+
dateContainer: {
|
|
13
|
+
flexDirection: "row",
|
|
14
|
+
paddingBottom: 4,
|
|
15
|
+
// rowGap: 20,
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
// dateIcon: {
|
|
19
|
+
// marginRight: 8,
|
|
20
|
+
// },
|
|
21
|
+
|
|
22
|
+
viewsContainer: {
|
|
23
|
+
flexDirection: "row",
|
|
24
|
+
justifyContent: "flex-end",
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
// eyeIcon: {
|
|
28
|
+
// marginRight: 8,
|
|
29
|
+
// },
|
|
30
|
+
|
|
31
|
+
dateText: {
|
|
32
|
+
color: globalStyles.colors.colorPrimary600,
|
|
33
|
+
marginRight: 8,
|
|
34
|
+
fontSize: Platform.OS === "ios" ? 14 : 12,
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
viewsText: {
|
|
38
|
+
color: globalStyles.colors.colorPrimary600,
|
|
39
|
+
marginRight: 8,
|
|
40
|
+
fontSize: Platform.OS === "ios" ? 14 : 12,
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
channelMetaContainer: {
|
|
44
|
+
width: "auto",
|
|
45
|
+
flexDirection: "row",
|
|
46
|
+
backgroundColor: globalStyles.colors.colorPrimary200,
|
|
47
|
+
justifyContent: "space-between",
|
|
48
|
+
// margin: 12,
|
|
49
|
+
padding: 12,
|
|
50
|
+
borderRadius: globalStyles.borders.borderPrimary100,
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
channelMetaContainer_ColumnOne: {
|
|
54
|
+
flexDirection: "row",
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
userImage: {
|
|
58
|
+
width: 40,
|
|
59
|
+
height: 40,
|
|
60
|
+
borderRadius: globalStyles.borders.borderPrimary50,
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
nameSubcountContainer: {
|
|
64
|
+
flexDirection: "column",
|
|
65
|
+
justifyContent: "center",
|
|
66
|
+
paddingLeft: 12,
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
userName: {
|
|
70
|
+
color: "#fff",
|
|
71
|
+
fontSize: 16,
|
|
72
|
+
paddingBottom: 4,
|
|
73
|
+
fontWeight: "bold",
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
subCountContainer: {
|
|
77
|
+
flexDirection: "row",
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
subCount: {
|
|
81
|
+
color: globalStyles.colors.colorPrimary600,
|
|
82
|
+
paddingRight: 6,
|
|
83
|
+
fontSize: 12,
|
|
84
|
+
fontWeight: "bold",
|
|
85
|
+
},
|
|
86
|
+
|
|
87
|
+
subText: {
|
|
88
|
+
color: "#fff",
|
|
89
|
+
fontSize: 12,
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
subscribeButtonContainer: {
|
|
93
|
+
backgroundColor: globalStyles.colors.colorPrimary600,
|
|
94
|
+
width: 100,
|
|
95
|
+
borderRadius: globalStyles.borders.borderPrimary400,
|
|
96
|
+
alignItems: "center",
|
|
97
|
+
justifyContent: "center",
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
subscribeButtonText: {
|
|
101
|
+
color: "#fff",
|
|
102
|
+
fontWeight: "bold",
|
|
103
|
+
},
|
|
104
|
+
});
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { StyleSheet } from "react-native";
|
|
2
|
+
import { globalStyles } from "./globalStyles";
|
|
3
|
+
|
|
4
|
+
export const WireUploadStyles = StyleSheet.create({
|
|
5
|
+
container: {
|
|
6
|
+
flex: 1,
|
|
7
|
+
backgroundColor: "#141414",
|
|
8
|
+
marginBottom: 120,
|
|
9
|
+
// paddingHorizontal: 16,
|
|
10
|
+
// paddingTop: 20,
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
profileSection: {
|
|
14
|
+
flexDirection: "row",
|
|
15
|
+
alignItems: "center",
|
|
16
|
+
// paddingHorizontal: 36,
|
|
17
|
+
|
|
18
|
+
borderBottomWidth: 1,
|
|
19
|
+
paddingTop: 18,
|
|
20
|
+
paddingBottom: 18,
|
|
21
|
+
marginLeft: 36,
|
|
22
|
+
marginRight: 36,
|
|
23
|
+
borderColor: globalStyles.colors.colorPrimary450,
|
|
24
|
+
},
|
|
25
|
+
userImage: {
|
|
26
|
+
width: 60,
|
|
27
|
+
height: 60,
|
|
28
|
+
borderRadius: 12,
|
|
29
|
+
marginRight: 16,
|
|
30
|
+
},
|
|
31
|
+
userInfo: {
|
|
32
|
+
flexDirection: "column",
|
|
33
|
+
justifyContent: "center",
|
|
34
|
+
},
|
|
35
|
+
userName: {
|
|
36
|
+
color: "white",
|
|
37
|
+
fontSize: 18,
|
|
38
|
+
fontWeight: "600",
|
|
39
|
+
},
|
|
40
|
+
channelSettingsText: {
|
|
41
|
+
color: "#ff6600",
|
|
42
|
+
marginTop: 4,
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
// /////////////////
|
|
46
|
+
|
|
47
|
+
wireInputContainer: {
|
|
48
|
+
marginRight: 24,
|
|
49
|
+
marginLeft: 24,
|
|
50
|
+
marginTop: 24,
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
wireInputTextContainer: {
|
|
54
|
+
backgroundColor: "#202020",
|
|
55
|
+
borderRadius: 12,
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
inputWrapper: {
|
|
59
|
+
backgroundColor: "#202020",
|
|
60
|
+
width: "auto",
|
|
61
|
+
borderBottomRightRadius: 0,
|
|
62
|
+
borderBottomLeftRadius: 0,
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
aboutTextArea: {
|
|
66
|
+
textAlignVertical: "top",
|
|
67
|
+
// whiteSpace: "pre-line",
|
|
68
|
+
whiteSpace: "pre",
|
|
69
|
+
|
|
70
|
+
height: "auto",
|
|
71
|
+
minHeight: 200,
|
|
72
|
+
color: "white",
|
|
73
|
+
paddingTop: 16,
|
|
74
|
+
marginTop: 0,
|
|
75
|
+
lineHeight: 24,
|
|
76
|
+
fontWeight: 400,
|
|
77
|
+
fontSize: 18,
|
|
78
|
+
paddingBottom: 36,
|
|
79
|
+
},
|
|
80
|
+
|
|
81
|
+
media: {
|
|
82
|
+
width: "auto",
|
|
83
|
+
height: 200,
|
|
84
|
+
borderRadius: 14,
|
|
85
|
+
// marginBottom: 16,
|
|
86
|
+
backgroundColor: "#000",
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
uploadButtonContainer: {
|
|
90
|
+
flexDirection: "row",
|
|
91
|
+
alignItems: "center",
|
|
92
|
+
justifyContent: "flex-end",
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
AIGenerateButton: {
|
|
96
|
+
paddingRight: 24,
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
uploadImageButton: {
|
|
100
|
+
paddingRight: 24,
|
|
101
|
+
// backgroundColor: "#252525",
|
|
102
|
+
paddingVertical: 24,
|
|
103
|
+
borderRadius: 12,
|
|
104
|
+
// marginBottom: 20,
|
|
105
|
+
// marginTop: 20,
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
uploadButtonText: {
|
|
109
|
+
color: "#fff",
|
|
110
|
+
fontSize: 14,
|
|
111
|
+
fontWeight: "600",
|
|
112
|
+
marginLeft: 8,
|
|
113
|
+
},
|
|
114
|
+
|
|
115
|
+
mediaContainer: {
|
|
116
|
+
flexDirection: "row",
|
|
117
|
+
flexWrap: "wrap",
|
|
118
|
+
gap: 10,
|
|
119
|
+
width: "auto",
|
|
120
|
+
marginBottom: 16,
|
|
121
|
+
paddingLeft: 6,
|
|
122
|
+
paddingRight: 6,
|
|
123
|
+
justifyContent: "space-evenly",
|
|
124
|
+
},
|
|
125
|
+
|
|
126
|
+
mediaThumb: {
|
|
127
|
+
width: 120,
|
|
128
|
+
height: 120,
|
|
129
|
+
borderRadius: 12,
|
|
130
|
+
backgroundColor: "#000",
|
|
131
|
+
},
|
|
132
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { StyleSheet } from "react-native";
|
|
2
|
+
import { globalStyles } from "./globalStyles";
|
|
3
|
+
|
|
4
|
+
export const WireViewLayoutStyles = StyleSheet.create({
|
|
5
|
+
container: {
|
|
6
|
+
width: "auto",
|
|
7
|
+
margin: 12,
|
|
8
|
+
paddingTop: 12,
|
|
9
|
+
paddingBottom: 12,
|
|
10
|
+
paddingLeft: 18,
|
|
11
|
+
paddingRight: 18,
|
|
12
|
+
backgroundColor: globalStyles.colors.colorPrimary350,
|
|
13
|
+
borderRadius: globalStyles.borders.borderPrimary200,
|
|
14
|
+
marginBottom: 96,
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
secondaryContainer: {
|
|
18
|
+
flexDirection: "column",
|
|
19
|
+
paddingBottom: 24,
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
mainText: {
|
|
23
|
+
color: "#fff",
|
|
24
|
+
lineHeight: 28,
|
|
25
|
+
fontSize: 18,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export const globalStyles = {
|
|
2
|
+
colors: {
|
|
3
|
+
colorPrimary50: "rgba(21, 21, 21, .7)",
|
|
4
|
+
colorPrimary100: "#151515",
|
|
5
|
+
|
|
6
|
+
colorPrimary200: "#252525",
|
|
7
|
+
colorPrimary250: "rgba(37, 37, 37, .9)",
|
|
8
|
+
|
|
9
|
+
colorPrimary300: "#3C3C3C",
|
|
10
|
+
colorPrimary350: "rgba(60,60,60,.2)",
|
|
11
|
+
|
|
12
|
+
colorPrimary400: "#7F7F7F",
|
|
13
|
+
colorPrimary450: "rgba(127, 127, 127, .3)",
|
|
14
|
+
|
|
15
|
+
colorPrimary500: "#D3D3D3",
|
|
16
|
+
|
|
17
|
+
colorPrimary600: "#ff6600ff",
|
|
18
|
+
|
|
19
|
+
colorPrimary700: "#FF8800",
|
|
20
|
+
},
|
|
21
|
+
borders: {
|
|
22
|
+
borderPrimary50: 8,
|
|
23
|
+
borderPrimary100: 10,
|
|
24
|
+
borderPrimary200: 12,
|
|
25
|
+
borderPrimary300: 15,
|
|
26
|
+
borderPrimary400: 30,
|
|
27
|
+
},
|
|
28
|
+
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|