UNPKG

repoweaver

Version:

A GitHub App that skillfully weaves multiple templates together to create and update repositories with intelligent merge strategies

1 lines 14.6 kB
{"ast":null,"code":"import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nimport React from 'react';\nimport ScrollView from \"react-native-web/dist/exports/ScrollView\";\nimport StyleSheet from \"react-native-web/dist/exports/StyleSheet\";\nimport View from \"react-native-web/dist/exports/View\";\nimport { Card, Title, Paragraph, List, Chip, Button } from 'react-native-paper';\nimport { useRoute } from '@react-navigation/native';\nimport { useSelector } from 'react-redux';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport function TemplateDetailScreen() {\n var route = useRoute();\n var templateId = route.params.templateId;\n var template = useSelector(function (state) {\n return state.templates.templates.find(function (t) {\n return t.id === templateId;\n });\n });\n if (!template) {\n return _jsx(View, {\n style: styles.container,\n children: _jsx(Card, {\n style: styles.card,\n children: _jsxs(Card.Content, {\n children: [_jsx(Title, {\n children: \"Template Not Found\"\n }), _jsx(Paragraph, {\n children: \"The requested template could not be found.\"\n })]\n })\n })\n });\n }\n return _jsxs(ScrollView, {\n style: styles.container,\n children: [_jsx(Card, {\n style: styles.card,\n children: _jsxs(Card.Content, {\n children: [_jsx(Title, {\n children: template.name\n }), template.description && _jsx(Paragraph, {\n style: styles.description,\n children: template.description\n }), _jsxs(View, {\n style: styles.chipContainer,\n children: [_jsxs(Chip, {\n mode: \"outlined\",\n compact: true,\n children: [\"Branch: \", template.branch || 'main']\n }), template.subDirectory && _jsxs(Chip, {\n mode: \"outlined\",\n compact: true,\n style: styles.chip,\n children: [\"Subdir: \", template.subDirectory]\n })]\n })]\n })\n }), _jsx(Card, {\n style: styles.card,\n children: _jsxs(Card.Content, {\n children: [_jsx(Title, {\n children: \"Repository Details\"\n }), _jsx(List.Item, {\n title: \"Repository URL\",\n description: template.url,\n left: function left(props) {\n return _jsx(List.Icon, _objectSpread(_objectSpread({}, props), {}, {\n icon: \"github\"\n }));\n }\n }), _jsx(List.Item, {\n title: \"Branch\",\n description: template.branch || 'main',\n left: function left(props) {\n return _jsx(List.Icon, _objectSpread(_objectSpread({}, props), {}, {\n icon: \"source-branch\"\n }));\n }\n }), template.subDirectory && _jsx(List.Item, {\n title: \"Subdirectory\",\n description: template.subDirectory,\n left: function left(props) {\n return _jsx(List.Icon, _objectSpread(_objectSpread({}, props), {}, {\n icon: \"folder\"\n }));\n }\n })]\n })\n }), _jsx(Card, {\n style: styles.card,\n children: _jsxs(Card.Content, {\n children: [_jsx(Title, {\n children: \"Actions\"\n }), _jsx(Button, {\n mode: \"contained\",\n style: styles.button,\n contentStyle: styles.buttonContent,\n onPress: function onPress() {},\n children: \"Use This Template\"\n }), _jsx(Button, {\n mode: \"outlined\",\n style: styles.button,\n contentStyle: styles.buttonContent,\n onPress: function onPress() {},\n children: \"Edit Template\"\n }), _jsx(Button, {\n mode: \"outlined\",\n style: [styles.button, styles.dangerButton],\n contentStyle: styles.buttonContent,\n textColor: \"#F44336\",\n onPress: function onPress() {},\n children: \"Delete Template\"\n })]\n })\n })]\n });\n}\nvar styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: '#f5f5f5',\n padding: 16\n },\n card: {\n marginBottom: 16\n },\n description: {\n marginTop: 8,\n marginBottom: 16\n },\n chipContainer: {\n flexDirection: 'row',\n flexWrap: 'wrap',\n marginTop: 8\n },\n chip: {\n marginLeft: 8\n },\n button: {\n marginBottom: 12\n },\n buttonContent: {\n paddingVertical: 8\n },\n dangerButton: {\n borderColor: '#F44336'\n }\n});","map":{"version":3,"names":["React","ScrollView","StyleSheet","View","Card","Title","Paragraph","List","Chip","Button","useRoute","useSelector","jsx","_jsx","jsxs","_jsxs","TemplateDetailScreen","route","templateId","params","template","state","templates","find","t","id","style","styles","container","children","card","Content","name","description","chipContainer","mode","compact","branch","subDirectory","chip","Item","title","url","left","props","Icon","_objectSpread","icon","button","contentStyle","buttonContent","onPress","dangerButton","textColor","create","flex","backgroundColor","padding","marginBottom","marginTop","flexDirection","flexWrap","marginLeft","paddingVertical","borderColor"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/src/screens/TemplateDetailScreen.tsx"],"sourcesContent":["import React from 'react';\nimport { ScrollView, StyleSheet, View } from 'react-native';\nimport { Card, Title, Paragraph, List, Chip, Button } from 'react-native-paper';\nimport { RouteProp, useRoute } from '@react-navigation/native';\nimport { useSelector } from 'react-redux';\nimport { RootState } from '../store';\nimport { RootStackParamList } from '../types';\n\ntype TemplateDetailRouteProp = RouteProp<RootStackParamList, 'TemplateDetail'>;\n\nexport function TemplateDetailScreen() {\n const route = useRoute<TemplateDetailRouteProp>();\n const { templateId } = route.params;\n \n const template = useSelector((state: RootState) => \n state.templates.templates.find(t => t.id === templateId)\n );\n\n if (!template) {\n return (\n <View style={styles.container}>\n <Card style={styles.card}>\n <Card.Content>\n <Title>Template Not Found</Title>\n <Paragraph>The requested template could not be found.</Paragraph>\n </Card.Content>\n </Card>\n </View>\n );\n }\n\n return (\n <ScrollView style={styles.container}>\n <Card style={styles.card}>\n <Card.Content>\n <Title>{template.name}</Title>\n {template.description && (\n <Paragraph style={styles.description}>{template.description}</Paragraph>\n )}\n \n <View style={styles.chipContainer}>\n <Chip mode=\"outlined\" compact>\n Branch: {template.branch || 'main'}\n </Chip>\n {template.subDirectory && (\n <Chip mode=\"outlined\" compact style={styles.chip}>\n Subdir: {template.subDirectory}\n </Chip>\n )}\n </View>\n </Card.Content>\n </Card>\n\n <Card style={styles.card}>\n <Card.Content>\n <Title>Repository Details</Title>\n \n <List.Item\n title=\"Repository URL\"\n description={template.url}\n left={(props) => <List.Icon {...props} icon=\"github\" />}\n />\n \n <List.Item\n title=\"Branch\"\n description={template.branch || 'main'}\n left={(props) => <List.Icon {...props} icon=\"source-branch\" />}\n />\n \n {template.subDirectory && (\n <List.Item\n title=\"Subdirectory\"\n description={template.subDirectory}\n left={(props) => <List.Icon {...props} icon=\"folder\" />}\n />\n )}\n </Card.Content>\n </Card>\n\n <Card style={styles.card}>\n <Card.Content>\n <Title>Actions</Title>\n \n <Button\n mode=\"contained\"\n style={styles.button}\n contentStyle={styles.buttonContent}\n onPress={() => {\n // Navigate to create project with this template pre-selected\n }}\n >\n Use This Template\n </Button>\n \n <Button\n mode=\"outlined\"\n style={styles.button}\n contentStyle={styles.buttonContent}\n onPress={() => {\n // Open edit template modal\n }}\n >\n Edit Template\n </Button>\n \n <Button\n mode=\"outlined\"\n style={[styles.button, styles.dangerButton]}\n contentStyle={styles.buttonContent}\n textColor=\"#F44336\"\n onPress={() => {\n // Show delete confirmation\n }}\n >\n Delete Template\n </Button>\n </Card.Content>\n </Card>\n </ScrollView>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: '#f5f5f5',\n padding: 16,\n },\n card: {\n marginBottom: 16,\n },\n description: {\n marginTop: 8,\n marginBottom: 16,\n },\n chipContainer: {\n flexDirection: 'row',\n flexWrap: 'wrap',\n marginTop: 8,\n },\n chip: {\n marginLeft: 8,\n },\n button: {\n marginBottom: 12,\n },\n buttonContent: {\n paddingVertical: 8,\n },\n dangerButton: {\n borderColor: '#F44336',\n },\n});"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AAAC,OAAAC,UAAA;AAAA,OAAAC,UAAA;AAAA,OAAAC,IAAA;AAE1B,SAASC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