summaryrefslogtreecommitdiff
path: root/web-build/static/js/app.767fd55b.chunk.js.map
diff options
context:
space:
mode:
Diffstat (limited to 'web-build/static/js/app.767fd55b.chunk.js.map')
-rw-r--r--web-build/static/js/app.767fd55b.chunk.js.map1
1 files changed, 1 insertions, 0 deletions
diff --git a/web-build/static/js/app.767fd55b.chunk.js.map b/web-build/static/js/app.767fd55b.chunk.js.map
new file mode 100644
index 0000000..c568461
--- /dev/null
+++ b/web-build/static/js/app.767fd55b.chunk.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["app/i18n/translate.ts","app/i18n/i18n.ts","app/utils/ignore-warnings.ts","app/utils/storage/storage.ts","app/theme/palette.ts","app/theme/color.ts","app/theme/spacing.ts","app/theme/typography.ts","app/components/text/text.presets.ts","app/components/text/text.tsx","app/components/auto-image/auto-image.tsx","app/components/icon/icons/index.ts","app/components/icon/icon.tsx","app/components/bullet-item/bullet-item.tsx","app/components/button/button.presets.ts","app/components/button/button.tsx","app/components/checkbox/checkbox.tsx","app/components/form-row/form-row.presets.ts","app/components/header/header.tsx","app/components/screen/screen.presets.ts","app/components/screen/screen.tsx","app/components/switch/switch.tsx","app/components/text-field/text-field.tsx","app/components/wallpaper/wallpaper.presets.ts","app/components/wallpaper/wallpaper.tsx","app/components/graph/graph.tsx","app/components/tweaks/tweaks.tsx","app/screens/welcome/welcome-screen.tsx","app/services/api/api-problem.ts","app/services/api/api-config.ts","app/services/api/api.ts","app/screens/demo/demo-screen.tsx","app/models/character/character.ts","app/services/api/character-api.ts","app/models/character-store/character-store.ts","app/models/extensions/with-environment.ts","app/models/root-store/root-store.ts","app/models/root-store/root-store-context.ts","app/models/environment.ts","app/models/root-store/setup-root-store.ts","app/screens/demo/demo-list-screen.tsx","app/screens/graph/graph-screen.tsx","app/navigators/main-navigator.tsx","app/navigators/root-navigator.tsx","app/navigators/navigation-utilities.tsx","storybook/toggle-storybook.web.tsx","app/app.tsx","app/theme/fonts/index.ts","App.js","app/components/icon/icons/arrow-left.png","app/components/icon/icons/bullet.png","app/components/wallpaper/bg.png","app/screens/welcome/bowser.png","app/screens/demo/logo-ignite.png","app/screens/demo/heart.png"],"names":["translate","key","options","i18n","t","fallbacks","translations","en","ja","locale","Localization","LogBox","ignoreLogs","loadString","a","async","AsyncStorage","getItem","saveString","value","setItem","load","almostThere","JSON","parse","save","stringify","remove","removeItem","clear","palette","black","white","offWhite","orange","orangeDarker","lightGrey","lighterGrey","angry","deepPurple","color","transparent","background","primary","primaryDarker","line","text","dim","error","storybookDarkBg","storybookTextColor","spacing","typography","Platform","select","ios","android","secondary","code","BASE","fontFamily","fontSize","presets","default","bold","fontWeight","header","fieldLabel","Text","props","preset","tx","txOptions","children","styleOverride","style","rest","content","styles","AutoImage","useState","width","height","imageSize","setImageSize","useLayoutEffect","source","uri","RNImage","getSize","OS","resolveAssetSource","icons","back","require","bullet","ROOT","resizeMode","Icon","icon","containerStyle","View","BULLET_ITEM","flexDirection","marginTop","paddingBottom","borderBottomWidth","borderBottomColor","BULLET_CONTAINER","marginRight","BULLET","BULLET_TEXT","flex","lineHeight","BulletItem","BASE_VIEW","paddingVertical","paddingHorizontal","borderRadius","justifyContent","alignItems","BASE_TEXT","viewPresets","backgroundColor","link","textPresets","Button","textStyleOverride","textStyle","viewStyles","textStyles","TouchableOpacity","DIMENSIONS","borderWidth","borderColor","padding","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","paddingTop","TITLE","textAlign","TITLE_MIDDLE","LEFT","RIGHT","Header","onLeftPress","onRightPress","rightIcon","leftIcon","headerText","headerTx","titleStyle","onPress","offsets","none","fixed","outer","inner","scroll","isIos","ScreenWithoutScrolling","insets","useSafeAreaInsets","backgroundStyle","insetStyle","unsafe","top","KeyboardAvoidingView","behavior","undefined","keyboardVerticalOffset","keyboardOffset","StatusBar","barStyle","statusBar","ScreenWithScrolling","ScrollView","contentContainerStyle","keyboardShouldPersistTaps","Screen","stretch","position","left","bottom","right","defaultImage","Wallpaper","backgroundImage","CONTAINER","Graph","observer","physics","gData","fgRef","nodeIds","flatten","useRef","useEffect","fg","current","d3Force","strength","linkStrength","iterations","linkIts","collision","d3","radius","charge","useMemo","nodesById","Object","fromEntries","nodes","map","node","id","forEach","collapsed","childLinks","parentLink","links","push","threedim","ref","graphData","nodeAutoColorBy","linkColor","linkWidth","linkDirectionalParticles","particles","nodeLabel","title","linkOpacity","nodeRelSize","nodeRel","linkDirectionalParticleWidth","particleWidth","linkAutoColorBy","Tweaks","setPhysics","minimumValue","maximumValue","onValueChange","step","marginVertical","collapse","activeSections","setActiveSections","tweaks","setTweaks","container","marginLeft","name","size","Accordion","sections","touchAbleComponent","expandMultiple","renderHeader","section","_","isActive","duration","active","inactive","transition","renderContent","onChange","includes","renderAsFlatList","zIndex","StyleSheet","create","borderStyle","maxHeight","marginBottom","paddingLeft","selectors","selector","activeSelector","selectTitle","multipleToggle","multipleToggle__title","bowserLogo","FULL","TEXT","BOLD","HEADER","HEADER_TITLE","letterSpacing","TITLE_WRAPPER","ALMOST","fontStyle","BOWSER","alignSelf","maxWidth","CONTENT","CONTINUE","CONTINUE_TEXT","FOOTER","FOOTER_CONTENT","navigation","useNavigation","testID","SafeAreaView","navigate","getGeneralApiProblem","response","problem","kind","temporary","status","DEFAULT_API_CONFIG","url","timeout","Api","config","this","apisauce","baseURL","headers","Accept","get","ok","convertUser","raw","rawUsers","data","resultUsers","users","resultUser","user","logoIgnite","heart","DEMO","DEMO_TEXT","TAGLINE","IGNITE","LOVE_WRAPPER","LOVE","HEART","marginHorizontal","HINT","platformCommand","demoReactotron","React","console","tron","log","logImportant","display","numbers","strings","booleans","arrays","objects","deeper","yay","functionNames","preview","important","image","demo","setup","getUser","goBack","CharacterModel","types","model","identifierNumber","maybe","string","CharacterApi","api","amount","characters","results","CharacterStoreModel","optional","array","extend","self","views","getEnv","actions","saveCharacters","characterSnapshots","replace","getCharacters","characterApi","environment","result","RootStoreModel","characterStore","RootStoreContext","createContext","RootStoreProvider","Provider","Environment","createEnvironment","env","setupRootStore","storage","rootStore","onSnapshot","snapshot","LIST_CONTAINER","IMAGE","LIST_TEXT","FLAT_LIST","useContext","FlatList","keyExtractor","item","String","renderItem","GraphScreen","setGraphData","setNodeIds","physicsInit","getData","valueJson","keys","length","timer","clearTimeout","setTimeout","jsonValue","mergeItem","storeData","test","then","axios","dataa","nods","temp","getNodesById","cleanData","cleanLinks","i","target","sanitizeGraph","catch","e","Stack","createStackNavigator","MainNavigator","Navigator","screenOptions","cardStyle","headerShown","component","exitRoutes","canExit","routeName","RootStack","RootNavigator","forwardRef","NavigationContainer","displayName","RootNavigation","resetRoot","state","getRootState","getActiveRouteName","route","routes","index","ToggleStorybook","StorybookUIRoot","queryParams","__DEV__","window","location","search","storybook","enableScreens","App","navigationRef","setRootStore","method","setRootNavigation","canExitRef","onBackPress","canGoBack","BackHandler","addEventListener","removeEventListener","useBackButtonHandler","persistenceKey","initialNavigationState","setInitialNavigationState","isRestoringNavigationState","setIsRestoringNavigationState","routeNameRef","restoreState","onNavigationStateChange","currentRouteName","useNavigationPersistence","initialMetrics","initialWindowMetrics","initialState","onStateChange","registerRootComponent","module","exports"],"mappings":"owDAQO,SAASA,EAAUC,EAAgBC,GACxC,OAAOD,EAAME,IAAKC,EAAEH,EAAKC,GAAW,KCJtCC,IAAKE,WAAY,EACjBF,IAAKG,aAAe,CAAEC,KAAIC,MAE1BL,IAAKM,OAASC,KAAuB,K,OCDrCC,EAAOC,WAAW,CAChB,mB,8CCDK,SAAeC,EAAWZ,GAA1B,SAAAa,EAAAC,OAAA,2EAAAD,EAAA,MAEUE,IAAaC,QAAQhB,IAF/B,iGAKI,MALJ,+DAeA,SAAeiB,EAAWjB,EAAakB,GAAvC,SAAAL,EAAAC,OAAA,2EAAAD,EAAA,MAEGE,IAAaI,QAAQnB,EAAKkB,IAF7B,iCAGI,GAHJ,0DAKI,GALJ,+DAcA,SAAeE,EAAKpB,GAApB,eAAAa,EAAAC,OAAA,2EAAAD,EAAA,MAEuBE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uB,aAAcX,EACdY,cAAeN,OAVF,M,UE1DzBO,aAAsB1B,IACPA,Q,+DCLf2B,EAAOC,QAAU,kd,kBCAjBD,EAAOC,QAAU,0S,oBCAjBD,EAAOC,QAAU,IAA0B,gC,oBCA3CD,EAAOC,QAAU,IAA0B,oC,oBCA3CD,EAAOC,QAAU,IAA0B,yC,kBCA3CD,EAAOC,QAAU,2S","file":"static/js/app.767fd55b.chunk.js","sourcesContent":["import i18n from \"i18n-js\"\nimport { TxKeyPath } from \"./i18n\"\n\n/**\n * Translates text.\n *\n * @param key The i18n key.\n */\nexport function translate(key: TxKeyPath, options?: i18n.TranslateOptions) {\n return key ? i18n.t(key, options) : null\n}\n","import * as Localization from \"expo-localization\"\nimport i18n from \"i18n-js\"\nimport en from \"./en.json\"\nimport ja from \"./ja.json\"\n\ni18n.fallbacks = true\ni18n.translations = { en, ja }\n\ni18n.locale = Localization.locale || \"en\"\n\n/**\n * Builds up valid keypaths for translations.\n * Update to your default locale of choice if not English.\n */\ntype DefaultLocale = typeof en\nexport type TxKeyPath = RecursiveKeyOf<DefaultLocale>\n\ntype RecursiveKeyOf<TObj extends Record<string, any>> = {\n [TKey in keyof TObj & string]: TObj[TKey] extends Record<string, any>\n ? `${TKey}` | `${TKey}.${RecursiveKeyOf<TObj[TKey]>}`\n : `${TKey}`\n}[keyof TObj & string]\n","/**\n * Ignore some yellowbox warnings. Some of these are for deprecated functions\n * that we haven't gotten around to replacing yet.\n */\nimport { LogBox } from \"react-native\"\n\n// prettier-ignore\nLogBox.ignoreLogs([\n \"Require cycle:\",\n])\n","import AsyncStorage from \"@react-native-async-storage/async-storage\"\n\n/**\n * Loads a string from storage.\n *\n * @param key The key to fetch.\n */\nexport async function loadString(key: string): Promise<string | null> {\n try {\n return await AsyncStorage.getItem(key)\n } catch {\n // not sure why this would fail... even reading the RN docs I'm unclear\n return null\n }\n}\n\n/**\n * Saves a string to storage.\n *\n * @param key The key to fetch.\n * @param value The value to store.\n */\nexport async function saveString(key: string, value: string): Promise<boolean> {\n try {\n await AsyncStorage.setItem(key, value)\n return true\n } catch {\n return false\n }\n}\n\n/**\n * Loads something from storage and runs it thru JSON.parse.\n *\n * @param key The key to fetch.\n */\nexport async function load(key: string): Promise<any | null> {\n try {\n const almostThere = await AsyncStorage.getItem(key)\n return JSON.parse(almostThere)\n } catch {\n return null\n }\n}\n\n/**\n * Saves an object to storage.\n *\n * @param key The key to fetch.\n * @param value The value to store.\n */\nexport async function save(key: string, value: any): Promise<boolean> {\n try {\n await AsyncStorage.setItem(key, JSON.stringify(value))\n return true\n } catch {\n return false\n }\n}\n\n/**\n * Removes something from storage.\n *\n * @param key The key to kill.\n */\nexport async function remove(key: string): Promise<void> {\n try {\n await AsyncStorage.removeItem(key)\n } catch {}\n}\n\n/**\n * Burn it all to the ground.\n */\nexport async function clear(): Promise<void> {\n try {\n await AsyncStorage.clear()\n } catch {}\n}\n","export const palette = {\n black: \"#1d1d1d\",\n white: \"#ffffff\",\n offWhite: \"#e6e6e6\",\n orange: \"#FBA928\",\n orangeDarker: \"#EB9918\",\n lightGrey: \"#939AA4\",\n lighterGrey: \"#CDD4DA\",\n angry: \"#dd3333\",\n deepPurple: \"#5D2555\",\n}\n","import { palette } from \"./palette\"\n\n/**\n * Roles for colors. Prefer using these over the palette. It makes it easier\n * to change things.\n *\n * The only roles we need to place in here are the ones that span through the app.\n *\n * If you have a specific use-case, like a spinner color. It makes more sense to\n * put that in the <Spinner /> component.\n */\nexport const color = {\n /**\n * The palette is available to use, but prefer using the name.\n */\n palette,\n /**\n * A helper for making something see-thru. Use sparingly as many layers of transparency\n * can cause older Android devices to slow down due to the excessive compositing required\n * by their under-powered GPUs.\n */\n transparent: \"rgba(0, 0, 0, 0)\",\n /**\n * The screen background.\n */\n background: palette.white,\n /**\n * The main tinting color.\n */\n primary: palette.orange,\n /**\n * The main tinting color, but darker.\n */\n primaryDarker: palette.orangeDarker,\n /**\n * A subtle color used for borders and lines.\n */\n line: palette.offWhite,\n /**\n * The default color of text in many components.\n */\n text: palette.white,\n /**\n * Secondary information.\n */\n dim: palette.lightGrey,\n /**\n * Error messages and icons.\n */\n error: palette.angry,\n\n /**\n * Storybook background for Text stories, or any stories where\n * the text color is color.text, which is white by default, and does not show\n * in Stories against the default white background\n */\n storybookDarkBg: palette.black,\n\n /**\n * Storybook text color for stories that display Text components against the\n * white background\n */\n storybookTextColor: palette.black,\n}\n","/**\n * NOTE TO DEVS:\n *\n * Spacing should be consistent and whitespace thought of as a first class technique up\n * there with color and typefaces.\n *\n * Which type of scale you use is based on the design.\n *\n * If you've got simpler app, you may only need 6 items. Or maybe you want a spacing scale\n * to be named:\n *\n * export const spacing = {\n * tiny: 4,\n * small: 8,\n * medium: 12,\n * large: 24,\n * huge: 64\n * }\n *\n * Whatever you choose, try to stick with these, and not freestyle it everywhere.\n *\n * Feel free to delete this block.\n */\n\n/**\n * The available spacing.\n *\n * Here's the rough guideline. Customize this for you usage. It's ok to put exceptions\n * within the components themselves if they are truly exceptions.\n *\n * 0 = none - nothing. only here to bust out of a zero-based array.\n * 1 = tiny - elements contextually close to each other\n * 2 = smaller - for groups of closely related items or perhaps borders\n * 3 = small - ?\n * 4 = medium - ?\n * 5 = medium+ - ?\n * 6 = large - between groups of content that aren't related?\n * 7 = huge - ?\n * 8 = massive - an uncomfortable amount of whitespace\n */\nexport const spacing = [0, 4, 8, 12, 16, 24, 32, 48, 64]\n","import { Platform } from \"react-native\"\n\n/**\n * You can find a list of available fonts on both iOS and Android here:\n * https://github.com/react-native-training/react-native-fonts\n *\n * If you're interested in adding a custom font to your project,\n * check out the readme file in ./assets/fonts/ then come back here\n * and enter your new font name. Remember the Android font name\n * is probably different than iOS.\n * More on that here:\n * https://github.com/lendup/react-native-cross-platform-text\n *\n * The various styles of fonts are defined in the <Text /> component.\n */\nexport const typography = {\n /**\n * The primary font. Used in most places.\n */\n primary: Platform.select({ ios: \"Helvetica\", android: \"normal\" }),\n\n /**\n * An alternate font used for perhaps titles and stuff.\n */\n secondary: Platform.select({ ios: \"Arial\", android: \"sans-serif\" }),\n\n /**\n * Lets get fancy with a monospace font!\n */\n code: Platform.select({ ios: \"Courier\", android: \"monospace\" }),\n}\n","import { TextStyle } from \"react-native\"\nimport { color, typography } from \"../../theme\"\n\n/**\n * All text will start off looking like this.\n */\nconst BASE: TextStyle = {\n fontFamily: typography.primary,\n color: color.text,\n fontSize: 15,\n}\n\n/**\n * All the variations of text styling within the app.\n *\n * You want to customize these to whatever you need in your app.\n */\nexport const presets = {\n /**\n * The default text styles.\n */\n default: BASE,\n\n /**\n * A bold version of the default text.\n */\n bold: { ...BASE, fontWeight: \"bold\" } as TextStyle,\n\n /**\n * Large headers.\n */\n header: { ...BASE, fontSize: 24, fontWeight: \"bold\" } as TextStyle,\n\n /**\n * Field labels that appear on forms above the inputs.\n */\n fieldLabel: { ...BASE, fontSize: 13, color: color.dim } as TextStyle,\n\n /**\n * A smaller piece of secondard information.\n */\n secondary: { ...BASE, fontSize: 9, color: color.dim } as TextStyle,\n}\n\n/**\n * A list of preset names.\n */\nexport type TextPresets = keyof typeof presets\n","import * as React from \"react\"\nimport { Text as ReactNativeText } from \"react-native\"\nimport { presets } from \"./text.presets\"\nimport { TextProps } from \"./text.props\"\nimport { translate } from \"../../i18n\"\n\n/**\n * For your text displaying needs.\n *\n * This component is a HOC over the built-in React Native one.\n */\nexport function Text(props: TextProps) {\n // grab the props\n const { preset = \"default\", tx, txOptions, text, children, style: styleOverride, ...rest } = props\n\n // figure out which content to use\n const i18nText = tx && translate(tx, txOptions)\n const content = i18nText || text || children\n\n const style = presets[preset] || presets.default\n const styles = [style, styleOverride]\n\n return (\n <ReactNativeText {...rest} style={styles}>\n {content}\n </ReactNativeText>\n )\n}\n","import React, { useLayoutEffect, useState } from \"react\"\nimport {\n Image as RNImage,\n ImageProps as DefaultImageProps,\n ImageURISource,\n Platform,\n} from \"react-native\"\n\ntype ImageProps = DefaultImageProps & {\n source: ImageURISource\n}\n\n/**\n * An Image wrapper component that autosizes itself to the size of the actual image.\n * You can always override by passing a width and height in the style.\n * If passing only one of width/height this image component will use the actual\n * size of the other dimension.\n *\n * This component isn't required, but is provided as a convenience so that\n * we don't have to remember to explicitly set image sizes on every image instance.\n *\n * To use as a stand-in replacement import { AutoImage as Image } and remove the\n * Image import from react-native. Now all images in that file are handled by this\n * component and are web-ready if not explicitly sized in the style property.\n */\nexport function AutoImage(props: ImageProps) {\n const [imageSize, setImageSize] = useState({ width: 0, height: 0 })\n\n useLayoutEffect(() => {\n if (props.source?.uri) {\n RNImage.getSize(props.source.uri as any, (width, height) => {\n setImageSize({ width, height })\n })\n } else if (Platform.OS === \"web\") {\n // web requires a different method to get it's size\n RNImage.getSize(props.source as any, (width, height) => {\n setImageSize({ width, height })\n })\n } else {\n const { width, height } = RNImage.resolveAssetSource(props.source)\n setImageSize({ width, height })\n }\n }, [])\n\n return <RNImage {...props} style={[imageSize, props.style]} />\n}\n","export const icons = {\n back: require(\"./arrow-left.png\"),\n bullet: require(\"./bullet.png\"),\n}\n\nexport type IconTypes = keyof typeof icons\n","import * as React from \"react\"\nimport { View, ImageStyle } from \"react-native\"\nimport { AutoImage as Image } from \"../auto-image/auto-image\"\nimport { IconProps } from \"./icon.props\"\nimport { icons } from \"./icons\"\n\nconst ROOT: ImageStyle = {\n resizeMode: \"contain\",\n}\n\nexport function Icon(props: IconProps) {\n const { style: styleOverride, icon, containerStyle } = props\n\n return (\n <View style={containerStyle}>\n <Image style={[ROOT, styleOverride]} source={icons[icon]} />\n </View>\n )\n}\n","import * as React from \"react\"\nimport { View, ViewStyle, ImageStyle, TextStyle } from \"react-native\"\nimport { Text } from \"../text/text\"\nimport { Icon } from \"../icon/icon\"\nimport { spacing, typography } from \"../../theme\"\n\nconst BULLET_ITEM: ViewStyle = {\n flexDirection: \"row\",\n marginTop: spacing[4],\n paddingBottom: spacing[4],\n borderBottomWidth: 1,\n borderBottomColor: \"#3A3048\",\n}\nconst BULLET_CONTAINER: ViewStyle = {\n marginRight: spacing[4] - 1,\n marginTop: spacing[2],\n}\nconst BULLET: ImageStyle = {\n width: 8,\n height: 8,\n}\nconst BULLET_TEXT: TextStyle = {\n flex: 1,\n fontFamily: typography.primary,\n color: \"#BAB6C8\",\n fontSize: 15,\n lineHeight: 22,\n}\n\nexport interface BulletItemProps {\n text: string\n}\n\nexport function BulletItem(props: BulletItemProps) {\n return (\n <View style={BULLET_ITEM}>\n <Icon icon=\"bullet\" containerStyle={BULLET_CONTAINER} style={BULLET} />\n <Text style={BULLET_TEXT} text={props.text} />\n </View>\n )\n}\n","import { ViewStyle, TextStyle } from \"react-native\"\nimport { color, spacing } from \"../../theme\"\n\n/**\n * All text will start off looking like this.\n */\nconst BASE_VIEW: ViewStyle = {\n paddingVertical: spacing[2],\n paddingHorizontal: spacing[2],\n borderRadius: 4,\n justifyContent: \"center\",\n alignItems: \"center\",\n}\n\nconst BASE_TEXT: TextStyle = {\n paddingHorizontal: spacing[3],\n}\n\n/**\n * All the variations of text styling within the app.\n *\n * You want to customize these to whatever you need in your app.\n */\nexport const viewPresets: Record<string, ViewStyle> = {\n /**\n * A smaller piece of secondard information.\n */\n primary: { ...BASE_VIEW, backgroundColor: color.palette.orange } as ViewStyle,\n\n /**\n * A button without extras.\n */\n link: {\n ...BASE_VIEW,\n paddingHorizontal: 0,\n paddingVertical: 0,\n alignItems: \"flex-start\",\n } as ViewStyle,\n}\n\nexport const textPresets: Record<ButtonPresetNames, TextStyle> = {\n primary: { ...BASE_TEXT, fontSize: 9, color: color.palette.white } as TextStyle,\n link: {\n ...BASE_TEXT,\n color: color.text,\n paddingHorizontal: 0,\n paddingVertical: 0,\n } as TextStyle,\n}\n\n/**\n * A list of preset names.\n */\nexport type ButtonPresetNames = keyof typeof viewPresets\n","import * as React from \"react\"\nimport { TouchableOpacity } from \"react-native\"\nimport { Text } from \"../text/text\"\nimport { viewPresets, textPresets } from \"./button.presets\"\nimport { ButtonProps } from \"./button.props\"\n\n/**\n * For your text displaying needs.\n *\n * This component is a HOC over the built-in React Native one.\n */\nexport function Button(props: ButtonProps) {\n // grab the props\n const {\n preset = \"primary\",\n tx,\n text,\n style: styleOverride,\n textStyle: textStyleOverride,\n children,\n ...rest\n } = props\n\n const viewStyle = viewPresets[preset] || viewPresets.primary\n const viewStyles = [viewStyle, styleOverride]\n const textStyle = textPresets[preset] || textPresets.primary\n const textStyles = [textStyle, textStyleOverride]\n\n const content = children || <Text tx={tx} text={text} style={textStyles} />\n\n return (\n <TouchableOpacity style={viewStyles} {...rest}>\n {content}\n </TouchableOpacity>\n )\n}\n","import * as React from \"react\"\nimport { TextStyle, TouchableOpacity, View, ViewStyle } from \"react-native\"\nimport { Text } from \"../text/text\"\nimport { color, spacing } from \"../../theme\"\nimport { CheckboxProps } from \"./checkbox.props\"\n\nconst ROOT: ViewStyle = {\n flexDirection: \"row\",\n paddingVertical: spacing[1],\n alignSelf: \"flex-start\",\n}\n\nconst DIMENSIONS = { width: 16, height: 16 }\n\nconst OUTLINE: ViewStyle = {\n ...DIMENSIONS,\n marginTop: 2, // finicky and will depend on font/line-height/baseline/weather\n justifyContent: \"center\",\n alignItems: \"center\",\n borderWidth: 1,\n borderColor: color.primaryDarker,\n borderRadius: 1,\n}\n\nconst FILL: ViewStyle = {\n width: DIMENSIONS.width - 4,\n height: DIMENSIONS.height - 4,\n backgroundColor: color.primary,\n}\n\nconst LABEL: TextStyle = { paddingLeft: spacing[2] }\n\nexport function Checkbox(props: CheckboxProps) {\n const numberOfLines = props.multiline ? 0 : 1\n\n const rootStyle = [ROOT, props.style]\n const outlineStyle = [OUTLINE, props.outlineStyle]\n const fillStyle = [FILL, props.fillStyle]\n\n const onPress = props.onToggle ? () => props.onToggle && props.onToggle(!props.value) : null\n\n return (\n <TouchableOpacity\n activeOpacity={1}\n disabled={!props.onToggle}\n onPress={onPress}\n style={rootStyle}\n >\n <View style={outlineStyle}>{props.value && <View style={fillStyle} />}</View>\n <Text text={props.text} tx={props.tx} numberOfLines={numberOfLines} style={LABEL} />\n </TouchableOpacity>\n )\n}\n","import { ViewStyle } from \"react-native\"\nimport { color, spacing } from \"../../theme\"\n\n/**\n * The size of the border radius.\n */\nconst RADIUS = 8\n\n/**\n * The default style of the container.\n */\nconst ROOT: ViewStyle = {\n borderWidth: 1,\n borderColor: color.line,\n padding: spacing[2],\n}\n\n/**\n * What each of the presets look like.\n */\nexport const PRESETS = {\n /**\n * Rounded borders on the the top only.\n */\n top: {\n ...ROOT,\n borderTopLeftRadius: RADIUS,\n borderTopRightRadius: RADIUS,\n borderBottomWidth: 0,\n },\n /**\n * No rounded borders.\n */\n middle: {\n ...ROOT,\n borderBottomWidth: 0,\n },\n /**\n * Rounded borders on the bottom.\n */\n bottom: {\n ...ROOT,\n borderBottomLeftRadius: RADIUS,\n borderBottomRightRadius: RADIUS,\n },\n /**\n * Rounded borders everywhere.\n */\n soloRound: {\n ...ROOT,\n borderRadius: RADIUS,\n },\n /**\n * Straight borders everywhere.\n */\n soloStraight: {\n ...ROOT,\n },\n /**\n * Transparent borders useful to keep things lined up.\n */\n clear: {\n ...ROOT,\n borderColor: color.transparent,\n },\n}\n\n/**\n * The names of the presets supported by FormRow.\n */\nexport type FormRowPresets = keyof typeof PRESETS\n","import React from \"react\"\nimport { View, ViewStyle, TextStyle } from \"react-native\"\nimport { HeaderProps } from \"./header.props\"\nimport { Button } from \"../button/button\"\nimport { Text } from \"../text/text\"\nimport { Icon } from \"../icon/icon\"\nimport { spacing } from \"../../theme\"\nimport { translate } from \"../../i18n/\"\n\n// static styles\nconst ROOT: ViewStyle = {\n flexDirection: \"row\",\n paddingHorizontal: spacing[4],\n alignItems: \"center\",\n paddingTop: spacing[5],\n paddingBottom: spacing[5],\n justifyContent: \"flex-start\",\n}\nconst TITLE: TextStyle = { textAlign: \"center\" }\nconst TITLE_MIDDLE: ViewStyle = { flex: 1, justifyContent: \"center\" }\nconst LEFT: ViewStyle = { width: 32 }\nconst RIGHT: ViewStyle = { width: 32 }\n\n/**\n * Header that appears on many screens. Will hold navigation buttons and screen title.\n */\nexport function Header(props: HeaderProps) {\n const {\n onLeftPress,\n onRightPress,\n rightIcon,\n leftIcon,\n headerText,\n headerTx,\n style,\n titleStyle,\n } = props\n const header = headerText || (headerTx && translate(headerTx)) || \"\"\n\n return (\n <View style={[ROOT, style]}>\n {leftIcon ? (\n <Button preset=\"link\" onPress={onLeftPress}>\n <Icon icon={leftIcon} />\n </Button>\n ) : (\n <View style={LEFT} />\n )}\n <View style={TITLE_MIDDLE}>\n <Text style={[TITLE, titleStyle]} text={header} />\n </View>\n {rightIcon ? (\n <Button preset=\"link\" onPress={onRightPress}>\n <Icon icon={rightIcon} />\n </Button>\n ) : (\n <View style={RIGHT} />\n )}\n </View>\n )\n}\n","import { ViewStyle } from \"react-native\"\nimport { color } from \"../../theme\"\n\n/**\n * All screen keyboard offsets.\n */\nexport const offsets = {\n none: 0,\n}\n\n/**\n * The variations of keyboard offsets.\n */\nexport type KeyboardOffsets = keyof typeof offsets\n\n/**\n * All the variations of screens.\n */\nexport const presets = {\n /**\n * No scrolling. Suitable for full-screen carousels and components\n * which have built-in scrolling like FlatList.\n */\n fixed: {\n outer: {\n backgroundColor: color.background,\n flex: 1,\n height: \"100%\",\n } as ViewStyle,\n inner: {\n justifyContent: \"flex-start\",\n alignItems: \"stretch\",\n height: \"100%\",\n width: \"100%\",\n } as ViewStyle,\n },\n\n /**\n * Scrolls. Suitable for forms or other things requiring a keyboard.\n *\n * Pick this one if you don't know which one you want yet.\n */\n scroll: {\n outer: {\n backgroundColor: color.background,\n flex: 1,\n height: \"100%\",\n } as ViewStyle,\n inner: { justifyContent: \"flex-start\", alignItems: \"stretch\" } as ViewStyle,\n },\n}\n\n/**\n * The variations of screens.\n */\nexport type ScreenPresets = keyof typeof presets\n\n/**\n * Is this preset a non-scrolling one?\n *\n * @param preset The preset to check\n */\nexport function isNonScrolling(preset?: ScreenPresets) {\n // any of these things will make you scroll\n return !preset || !presets[preset] || preset === \"fixed\"\n}\n","import * as React from \"react\"\nimport { KeyboardAvoidingView, Platform, ScrollView, StatusBar, View } from \"react-native\"\nimport { useSafeAreaInsets } from \"react-native-safe-area-context\"\nimport { ScreenProps } from \"./screen.props\"\nimport { isNonScrolling, offsets, presets } from \"./screen.presets\"\n\nconst isIos = Platform.OS === \"ios\"\n\nfunction ScreenWithoutScrolling(props: ScreenProps) {\n const insets = useSafeAreaInsets()\n const preset = presets.fixed\n const style = props.style || {}\n const backgroundStyle = props.backgroundColor ? { backgroundColor: props.backgroundColor } : {}\n const insetStyle = { paddingTop: props.unsafe ? 0 : insets.top }\n\n return (\n <KeyboardAvoidingView\n style={[preset.outer, backgroundStyle]}\n behavior={isIos ? \"padding\" : undefined}\n keyboardVerticalOffset={offsets[props.keyboardOffset || \"none\"]}\n >\n <StatusBar barStyle={props.statusBar || \"light-content\"} />\n <View style={[preset.inner, style, insetStyle]}>{props.children}</View>\n </KeyboardAvoidingView>\n )\n}\n\nfunction ScreenWithScrolling(props: ScreenProps) {\n const insets = useSafeAreaInsets()\n const preset = presets.scroll\n const style = props.style || {}\n const backgroundStyle = props.backgroundColor ? { backgroundColor: props.backgroundColor } : {}\n const insetStyle = { paddingTop: props.unsafe ? 0 : insets.top }\n\n return (\n <KeyboardAvoidingView\n style={[preset.outer, backgroundStyle]}\n behavior={isIos ? \"padding\" : undefined}\n keyboardVerticalOffset={offsets[props.keyboardOffset || \"none\"]}\n >\n <StatusBar barStyle={props.statusBar || \"light-content\"} />\n <View style={[preset.outer, backgroundStyle, insetStyle]}>\n <ScrollView\n style={[preset.outer, backgroundStyle]}\n contentContainerStyle={[preset.inner, style]}\n keyboardShouldPersistTaps={props.keyboardShouldPersistTaps || \"handled\"}\n >\n {props.children}\n </ScrollView>\n </View>\n </KeyboardAvoidingView>\n )\n}\n\n/**\n * The starting component on every screen in the app.\n *\n * @param props The screen props\n */\nexport function Screen(props: ScreenProps) {\n if (isNonScrolling(props.preset)) {\n return <ScreenWithoutScrolling {...props} />\n } else {\n return <ScreenWithScrolling {...props} />\n }\n}\n","import React from \"react\"\nimport { ViewStyle, Animated, Easing, TouchableWithoutFeedback } from \"react-native\"\nimport { color } from \"../../theme\"\nimport { SwitchProps } from \"./switch.props\"\n\n// dimensions\nconst THUMB_SIZE = 30\nconst WIDTH = 56\nconst MARGIN = 2\nconst OFF_POSITION = -0.5\nconst ON_POSITION = WIDTH - THUMB_SIZE - MARGIN\nconst BORDER_RADIUS = (THUMB_SIZE * 3) / 4\n\n// colors\nconst ON_COLOR = color.primary\nconst OFF_COLOR = color.palette.offWhite\nconst BORDER_ON_COLOR = ON_COLOR\nconst BORDER_OFF_COLOR = \"rgba(0, 0, 0, 0.1)\"\n\n// animation\nconst DURATION = 250\n\n// the track always has these props\nconst TRACK = {\n height: THUMB_SIZE + MARGIN,\n width: WIDTH,\n borderRadius: BORDER_RADIUS,\n borderWidth: MARGIN / 2,\n backgroundColor: color.background,\n}\n\n// the thumb always has these props\nconst THUMB: ViewStyle = {\n position: \"absolute\",\n width: THUMB_SIZE,\n height: THUMB_SIZE,\n borderColor: BORDER_OFF_COLOR,\n borderRadius: THUMB_SIZE / 2,\n borderWidth: MARGIN / 2,\n backgroundColor: color.background,\n shadowColor: BORDER_OFF_COLOR,\n shadowOffset: { width: 1, height: 2 },\n shadowOpacity: 1,\n shadowRadius: 2,\n elevation: 2,\n}\n\nconst makeAnimatedValue = (switchOn) => new Animated.Value(switchOn ? 1 : 0)\n\nexport function Switch(props: SwitchProps) {\n const [timer] = React.useState<Animated.Value>(makeAnimatedValue(props.value))\n const startAnimation = React.useMemo(\n () => (newValue: boolean) => {\n const toValue = newValue ? 1 : 0\n const easing = Easing.out(Easing.circle)\n Animated.timing(timer, {\n toValue,\n duration: DURATION,\n easing,\n useNativeDriver: true,\n }).start()\n },\n [timer],\n )\n\n const [previousValue, setPreviousValue] = React.useState<boolean>(props.value)\n React.useEffect(() => {\n if (props.value !== previousValue) {\n startAnimation(props.value)\n setPreviousValue(props.value)\n }\n }, [props.value])\n\n const handlePress = React.useMemo(() => () => props.onToggle && props.onToggle(!props.value), [\n props.onToggle,\n props.value,\n ])\n\n if (!timer) {\n return null\n }\n\n const translateX = timer.interpolate({\n inputRange: [0, 1],\n outputRange: [OFF_POSITION, ON_POSITION],\n })\n\n const style = props.style\n\n const trackStyle = [\n TRACK,\n {\n backgroundColor: props.value ? ON_COLOR : OFF_COLOR,\n borderColor: props.value ? BORDER_ON_COLOR : BORDER_OFF_COLOR,\n },\n props.value ? props.trackOnStyle : props.trackOffStyle,\n ]\n\n const thumbStyle = [\n THUMB,\n {\n transform: [{ translateX }],\n },\n props.value ? props.thumbOnStyle : props.thumbOffStyle,\n ]\n\n return (\n <TouchableWithoutFeedback onPress={handlePress} style={style}>\n <Animated.View style={trackStyle}>\n <Animated.View style={thumbStyle} />\n </Animated.View>\n </TouchableWithoutFeedback>\n )\n}\n","import React from \"react\"\nimport { StyleProp, TextInput, TextInputProps, TextStyle, View, ViewStyle } from \"react-native\"\nimport { color, spacing, typography } from \"../../theme\"\nimport { translate, TxKeyPath } from \"../../i18n\"\nimport { Text } from \"../text/text\"\n\n// the base styling for the container\nconst CONTAINER: ViewStyle = {\n paddingVertical: spacing[3],\n}\n\n// the base styling for the TextInput\nconst INPUT: TextStyle = {\n fontFamily: typography.primary,\n color: color.text,\n minHeight: 44,\n fontSize: 18,\n backgroundColor: color.palette.white,\n}\n\n// currently we have no presets, but that changes quickly when you build your app.\nconst PRESETS: { [name: string]: ViewStyle } = {\n default: {},\n}\n\nexport interface TextFieldProps extends TextInputProps {\n /**\n * The placeholder i18n key.\n */\n placeholderTx?: TxKeyPath\n\n /**\n * The Placeholder text if no placeholderTx is provided.\n */\n placeholder?: string\n\n /**\n * The label i18n key.\n */\n labelTx?: TxKeyPath\n\n /**\n * The label text if no labelTx is provided.\n */\n label?: string\n\n /**\n * Optional container style overrides useful for margins & padding.\n */\n style?: StyleProp<ViewStyle>\n\n /**\n * Optional style overrides for the input.\n */\n inputStyle?: StyleProp<TextStyle>\n\n /**\n * Various look & feels.\n */\n preset?: keyof typeof PRESETS\n\n forwardedRef?: any\n}\n\n/**\n * A component which has a label and an input together.\n */\nexport function TextField(props: TextFieldProps) {\n const {\n placeholderTx,\n placeholder,\n labelTx,\n label,\n preset = \"default\",\n style: styleOverride,\n inputStyle: inputStyleOverride,\n forwardedRef,\n ...rest\n } = props\n\n const containerStyles = [CONTAINER, PRESETS[preset], styleOverride]\n const inputStyles = [INPUT, inputStyleOverride]\n const actualPlaceholder = placeholderTx ? translate(placeholderTx) : placeholder\n\n return (\n <View style={containerStyles}>\n <Text preset=\"fieldLabel\" tx={labelTx} text={label} />\n <TextInput\n placeholder={actualPlaceholder}\n placeholderTextColor={color.palette.lighterGrey}\n underlineColorAndroid={color.transparent}\n {...rest}\n style={inputStyles}\n ref={forwardedRef}\n />\n </View>\n )\n}\n","import { ImageStyle } from \"react-native\"\n\n/**\n * All wallpaper will start off looking like this.\n */\nconst BASE: ImageStyle = {\n position: \"absolute\",\n top: 0,\n left: 0,\n bottom: 0,\n right: 0,\n}\n\n/**\n * All the variations of wallpaper styling within the app.\n *\n * You want to customize these to whatever you need in your app.\n */\nexport const presets = {\n /**\n * The default wallpaper styles.\n */\n stretch: {\n ...BASE,\n resizeMode: \"stretch\",\n width: null, // Have to set these to null because android ¯\\_(ツ)_/¯\n height: null,\n } as ImageStyle,\n}\n\n/**\n * A list of preset names.\n */\nexport type WallpaperPresets = keyof typeof presets\n","import React from \"react\"\nimport { AutoImage as Image } from \"../auto-image/auto-image\"\nimport { presets } from \"./wallpaper.presets\"\nimport { WallpaperProps } from \"./wallpaper.props\"\n\nconst defaultImage = require(\"./bg.png\")\n\n/**\n * For your text displaying needs.\n *\n * This component is a HOC over the built-in React Native one.\n */\nexport function Wallpaper(props: WallpaperProps) {\n // grab the props\n const { preset = \"stretch\", style: styleOverride, backgroundImage } = props\n\n // assemble the style\n const presetToUse = presets[preset] || presets.stretch\n const styles = [presetToUse, styleOverride]\n\n // figure out which image to use\n const source = backgroundImage || defaultImage\n\n return <Image source={source} style={styles} />\n}\n","import * as React from \"react\"\nimport { useState, useEffect, useRef, useMemo, useCallback } from \"react\"\nimport { StyleProp, TextStyle, View, ViewStyle } from \"react-native\"\nimport { observer } from \"mobx-react-lite\"\nimport { color, typography } from \"../../theme\"\nimport { Text } from \"../\"\nimport { flatten } from \"ramda\"\n\n//import data from \"../../data/miserables.json\"\n//import genRandomTree from \"../../data/randomdata\";\n//import rando from \"../../data/rando.json\"\n\nimport { ForceGraph2D, ForceGraph3D, ForceGraphVR, ForceGraphAR } from \"react-force-graph\"\nimport * as d3 from \"d3-force\"\n\nconst CONTAINER: ViewStyle = {\n justifyContent: \"center\",\n}\n\nconst TEXT: TextStyle = {\n fontFamily: typography.primary,\n fontSize: 14,\n color: color.primary,\n}\n\nexport interface GraphProps {\n /**\n * An optional style override useful for padding & margin.\n */\n style?: StyleProp<ViewStyle>\n physics\n gData\n nodeIds: string[]\n}\n\n/**\n * Describe your component here\n */\nexport const Graph = observer(function Graph(props: GraphProps): JSX.Element {\n const { style, physics, gData, nodeIds } = props\n const styles = flatten([CONTAINER, style])\n\n const fgRef = useRef()\n\n const GROUPS: number = 12\n const NODE_R: number = 8\n //const gData = genRandomTree(200);\n\n //const [charge, setCharge] = useState(-30);\n //const [link, setLink] = useState(-30);\n\n useEffect(() => {\n const fg = fgRef.current\n\n //fg.d3Force('center').strength(0.05);\n fg.d3Force(\"link\").strength(physics.linkStrength)\n fg.d3Force(\"link\").iterations(physics.linkIts)\n physics.collision\n ? fg.d3Force(\"collide\", d3.forceCollide().radius(20))\n : fg.d3Force(\"collide\", null)\n fg.d3Force(\"charge\").strength(physics.charge)\n })\n\n // For the expandable version of the graph\n const rootId = 0\n\n const nodesById = useMemo(() => {\n const nodesById = Object.fromEntries(gData.nodes.map((node) => [node.id, node]))\n\n // link parent/children\n gData.nodes.forEach((node) => {\n node.collapsed = node.id !== rootId\n node.childLinks = []\n node.parentLink = []\n })\n gData.links.forEach((link) => nodesById[link.source].childLinks.push(link))\n\n return nodesById\n }, [gData])\n\n /* const getPrunedTree = useCallback(() => {\n* const visibleNodes = [];\n* const visibleLinks = [];\n* (function traverseTree(node = nodesById[rootId]) {\n* visibleNodes.push(node);\n* if (node.collapsed) return\n* visibleLinks.push(...node.childLinks)\n* node.childLinks\n* .map((link) => (typeof link.target === \"object\" ? link.target : nodesById[link.target])) // get child node\n* .forEach(traverseTree)\n* })()\n\n* return { nodes: visibleNodes, links: visibleLinks }\n* }, [nodesById])\n\n* const [prunedTree, setPrunedTree] = useState(getPrunedTree())\n\n* const handleNodeClick = useCallback((node) => {\n* node.collapsed = !node.collapsed // toggle collapse state\n* setPrunedTree(getPrunedTree())\n* }, []);\n */\n\n // Highlight Graph\n /**\n/* const data = useMemo(() => {\n* // cross-link node objects\n* rando.links.forEach(link => {\n* const a = rando.nodes[link.source];\n* const b = rando.nodes[link.target];\n* !a.neighbors && (a.neighbors = []);\n* !b.neighbors && (b.neighbors = []);\n* a.neighbors.push(b);\n* b.neighbors.push(a);\n*\n* !a.links && (a.links = []);\n* !b.links && (b.links = []);\n* a.links.push(link);\n* b.links.push(link);\n* });\n*\n* return rando;\n* }, []);\n* const [highlightNodes, setHighlightNodes] = useState(new Set());\n* const [highlightLinks, setHighlightLinks] = useState(new Set());\n* const [hoverNode, setHoverNode] = useState(null);\n*\n* const updateHighlight = () => {\n* setHighlightNodes(highlightNodes);\n* setHighlightLinks(highlightLinks);\n* };\n*\n* const handleNodeHover = node => {\n* highlightNodes.clear();\n* highlightLinks.clear();\n* if (node) {\n* highlightNodes.add(node);\n* node.neighbors.forEach(neighbor => highlightNodes.add(neighbor));\n* node.links.forEach(link => highlightLinks.add(link));\n* }\n*\n* setHoverNode(node || null);\n* updateHighlight();\n* };\n*\n* const handleLinkHover = link => {\n* highlightNodes.clear();\n* highlightLinks.clear();\n*\n* if (link) {\n* highlightLinks.add(link);\n* highlightNodes.add(link.source);\n* highlightNodes.add(link.target);\n* }\n*\n* updateHighlight();\n* };\n*\n* const paintRing = useCallback((node, ctx) => {\n* // add ring just for highlighted nodes\n* ctx.beginPath();\n* ctx.arc(node.x, node.y, NODE_R * 1.4, 0, 2 * Math.PI, false);\n* ctx.fillStyle = node === hoverNode ? 'red' : 'orange';\n* ctx.fill();\n* }, [hoverNode]);\n*/\n\n /* autoPauseRedraw={false}\n linkWidth={link => highlightLinks.has(link) ? 5 : 1}\n linkDirectionalParticles={4}\n linkDirectionalParticleWidth={link => highlightLinks.has(link) ? 4 : 0}\n nodeCanvasObjectMode={node => highlightNodes.has(node) ? 'before' : undefined}\n nodeCanvasObject={paintRing}\n onNodeHover={handleNodeHover}\n onLinkHover={handleLinkHover}\n nodeRelSize={NODE_R} */\n\n //nodeColor={(node) =>\n // !node.childLinks.length ? \"green\" : node.collapsed ? \"red\" : \"yellow\"\n //}\n return (\n <View>\n {!physics.threedim ? (\n <ForceGraph2D\n ref={fgRef}\n graphData={gData}\n //graphData={physics.collapse ? prunedTree : gData}\n nodeAutoColorBy=\"id\"\n linkAutoColorBy=\"target\"\n //linkAutoColorBy={(d) => gData.nodes[d.source].id % GROUPS}\n linkColor=\"#ffffff\"\n linkDirectionalParticles={physics.particles}\n //onNodeClick={!physics.collapse ? null : handleNodeClick}\n nodeLabel={(node) => node.title}\n //nodeVal ={(node)=> node.childLinks.length * 0.5 + 1}\n //d3VelocityDecay={visco}\n linkWidth={physics.linkWidth}\n linkOpacity={physics.linkOpacity}\n nodeRelSize={physics.nodeRel}\n linkDirectionalParticleWidth={physics.particleWidth}\n />\n ) : (\n <ForceGraph3D\n ref={fgRef}\n graphData={gData}\n nodeAutoColorBy=\"group\"\n //graphData={physics.collapse ? prunedTree : gData}\n // nodeAutoColorBy={d => d.id%GROUPS}\n //linkAutoColorBy={(d) => gData.nodes[d.source].id % GROUPS}\n linkColor=\"#ffffff\"\n linkWidth={2}\n linkDirectionalParticles={physics.particles}\n //nodeColor={(node) =>\n // !node.childLinks.length ? \"green\" : node.collapsed ? \"red\" : \"yellow\"\n //}\n //onNodeClick={!physics.collapse ? null : handleNodeClick}\n nodeLabel={node => node.title}\n //nodeVal={(node) => node.childLinks.length + 1}\n //d3VelocityDecay={visco}\n linkWidth={physics.linkWidth}\n linkOpacity={physics.linkOpacity}\n nodeRelSize={physics.nodeRel}\n linkDirectionalParticleWidth={physics.particleWidth}\n backgroundColor=\"#1d1d1d\"\n />\n )}\n </View>\n )\n})\n","import * as React from \"react\"\nimport { ScrollView, StyleProp, Switch, TextStyle, TouchableOpacity, View, ViewStyle, StyleSheet, Button } from \"react-native\"\nimport { observer } from \"mobx-react-lite\"\nimport { color, typography } from \"../../theme\"\nimport { Text } from \"../\"\nimport { flatten } from \"ramda\"\nimport Slider from \"@react-native-community/slider\"\nimport { useState } from \"react\"\nimport Accordion from 'react-native-collapsible/Accordion'\nimport * as Animatable from 'react-native-animatable'\nimport Icon from 'react-native-vector-icons/MaterialCommunityIcons'\n\nconst CONTAINER: ViewStyle = {\n justifyContent: \"center\",\n}\n\nconst TEXT: TextStyle = {\n fontFamily: typography.primary,\n fontSize: 14,\n color: color.primary,\n}\n\nexport interface TweaksProps {\n /**\n * An optional style override useful for padding & margin.\n */\n style?: StyleProp<ViewStyle>\n physics\n setPhysics\n}\n\n/**\n * Describe your component here\n */\nexport const Tweaks = observer(function Tweaks(props: TweaksProps): JSX.Element {\n const { style, physics, setPhysics } = props\n // const styles = flatten([CONTAINER, style])\n\n const content = [\n {\n title: \"Physics\",\n content:\n <View>\n <Text preset=\"fieldLabel\" text={\"Repulsive force: \" + physics.charge} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={-400}\n maximumValue={100}\n onValueChange={(value) => { setPhysics({ ...physics, charge: value }) }}\n value={physics.charge}\n step={1} />\n <Text preset=\"fieldLabel\" text={\"Link Force: \" + physics.linkStrength} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={-2}\n maximumValue={2}\n onValueChange={(value) => { setPhysics({ ...physics, linkStrength: value }) }}\n value={physics.linkStrength}\n step={0.1}\n />\n <Text preset=\"fieldLabel\" text={\"'Link Iterations': \" + physics.linkIts} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={1}\n maximumValue={10}\n onValueChange={(value) => { setPhysics({ ...physics, linkIts: value }) }}\n value={physics.linkIts}\n step={1} />\n <Text preset=\"fieldLabel\" text=\"Collision\" />\n <Switch style={{ width: \"5\", height: 20, marginVertical: 10 }}\n value={physics.collision}\n onValueChange={() => { setPhysics({ ...physics, collision: !physics.collision }) }}\n />\n </View>,\n },\n {\n title: 'Visual',\n content:\n <View>\n <Text preset=\"fieldLabel\" text={\"Line Opacity: \" + physics.linkOpacity} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={0}\n maximumValue={1}\n onValueChange={(value) => { setPhysics({ ...physics, linkOpacity: value }) }}\n value={physics.linkOpacity}\n step={.01} />\n <Text preset=\"fieldLabel\" text={\"Line width: \" + physics.linkWidth} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={.1}\n maximumValue={10}\n onValueChange={(value) => { setPhysics({ ...physics, linkWidth: value }) }}\n value={physics.linkWidth}\n step={0.1} />\n <Text preset=\"fieldLabel\" text={\"Node size: \" + physics.nodeRel} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={1}\n maximumValue={10}\n onValueChange={(value) => { setPhysics({ ...physics, nodeRel: value }) }}\n value={physics.nodeRel}\n step={.01} />\n <Text preset=\"fieldLabel\" text={\"Particles: \" + physics.particles} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={0}\n maximumValue={10}\n onValueChange={(value) => { setPhysics({ ...physics, particles: value }) }}\n value={physics.particles}\n step={1} />\n <Text preset=\"fieldLabel\" text={\"Particle Size: \" + physics.particleWidth} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={1}\n maximumValue={10}\n onValueChange={(value) => { setPhysics({ ...physics, particleWidth: value }) }}\n value={physics.particleWidth}\n step={.1} />\n </View>,\n },\n {\n title: 'Modes',\n content:\n <View>\n <Text preset=\"fieldLabel\" text=\"Expandable Graph\" />\n <Switch style={{ width: \"5\", height: 20, marginVertical: 10 }}\n value={physics.collapse}\n onValueChange={() => { setPhysics({ ...physics, collapse: !physics.collapse }) }}\n />\n <Text preset=\"fieldLabel\" text=\"3D\" />\n <Switch style={{ width: \"5\", height: 20, marginVertical: 10 }}\n value={physics.threedim}\n onValueChange={() => { setPhysics({ ...physics, threedim: !physics.threedim }) }}\n />\n </View>\n },\n ];\n\n const [activeSections, setActiveSections] = useState([]);\n\n const setSections = (sections) => {\n setActiveSections(\n sections.includes(undefined) ? [] : sections\n );\n };\n\n const renderHeader = (section, _, isActive) => {\n return (\n <Animatable.View\n duration={400}\n style={[styles.header, isActive ? styles.active : styles.inactive]}\n transition=\"backgroundColor\"\n >\n <Text style={styles.headerText}>{section.title}</Text>\n </Animatable.View>\n );\n };\n\n const renderContent = (section, _, isActive) => {\n return (\n <Animatable.View\n duration={400}\n style={[styles.content, isActive ? styles.active : styles.inactive]}\n transition=\"backgroundColor\"\n >\n {section.content}\n </Animatable.View>\n );\n }\n const [tweaks, setTweaks] = useState(true);\n if (true) {\n if (tweaks) {\n return (\n <View style={styles.container}>\n <View style={{ height: 30, width: \"100%\", backgroundColor: \"rgb(20,20,20)\" }}>\n <TouchableOpacity style={{ width: 30, color: \"#ffffff\", textAlign: \"center\", marginLeft: \"auto\", padding: 5 }}\n onPress={() => { setTweaks(false) }}>\n <Icon name=\"close-circle\" color=\"#ffffff\" size={20} />\n </TouchableOpacity>\n </View>\n <ScrollView>\n <Accordion\n activeSections={activeSections}\n sections={content}\n touchAbleComponent={TouchableOpacity}\n expandMultiple={true}\n renderHeader={renderHeader}\n renderContent={renderContent}\n duration={200}\n onChange={setSections}\n renderAsFlatList={false}\n\n />\n </ScrollView>\n </View>\n );\n } else {\n return (\n <TouchableOpacity\n onPress={() => { setTweaks(true) }}\n style={{ position: \"absolute\", top: 50, left: 50, width: 30, color: \"#ffffff\", zIndex: 100 }}>\n <Icon name=\"cog\" color=\"#ffffff\" size={30} />\n </TouchableOpacity>\n )\n }\n } else {\n return (\n <View style={{ position: \"absolute\", top: \"5%\", left: \"5%\", zIndex: 100, width: 300, backgroundColor: \"#000000\", padding: 20 }}>\n <Text preset=\"bold\" text=\"Physics\" />\n <Text preset=\"fieldLabel\" text={\"Repulsive force: \" + physics.charge} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={-400}\n maximumValue={100}\n onValueChange={(value) => { setPhysics({ ...physics, charge: value }) }}\n value={physics.charge}\n step={1} />\n <Text preset=\"fieldLabel\" text={\"Link Force: \" + physics.linkStrength} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={0}\n maximumValue={2}\n onValueChange={(value) => { setPhysics({ ...physics, linkStrength: value }) }}\n value={physics.linkStrength}\n step={0.1}\n />\n <Text preset=\"fieldLabel\" text={\"'Link Iterations': \" + physics.linkIts} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={1}\n maximumValue={10}\n onValueChange={(value) => { setPhysics({ ...physics, linkIts: value }) }}\n value={physics.linkIts}\n step={1} />\n <Text preset=\"fieldLabel\" text=\"Collision\" />\n <Switch style={{ width: \"5\", height: 20, marginVertical: 10 }}\n value={physics.collision}\n onValueChange={() => { setPhysics({ ...physics, collision: !physics.collision }) }}\n />\n <Text preset=\"bold\" text=\"Visual\" />\n <Text preset=\"fieldLabel\" text={\"Particles: \" + physics.particles} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={0}\n maximumValue={5}\n onValueChange={(value) => { setPhysics({ ...physics, particles: value }) }}\n value={physics.particles}\n step={1} />\n <Text preset=\"bold\" text=\"Modes\" />\n <Text preset=\"fieldLabel\" text=\"Expandable Graph\" />\n <Switch style={{ width: \"5\", height: 20, marginVertical: 10 }}\n value={physics.collapse}\n onValueChange={() => { setPhysics({ ...physics, collapse: !physics.collapse }) }}\n />\n <Text preset=\"fieldLabel\" text=\"3D\" />\n <Switch style={{ width: \"5\", height: 20, marginVertical: 10 }}\n value={physics.threedim}\n onValueChange={() => { setPhysics({ ...physics, threedim: !physics.threedim }) }}\n />\n </View>\n );\n }\n})\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: 'rgb(20,20,20)',\n position: \"absolute\",\n zIndex: 100,\n left: 50,\n top: 50,\n width: 250,\n borderRadius: 5,\n borderStyle: \"solid\",\n maxHeight: \"70%\",\n paddingBottom: 20,\n },\n title: {\n textAlign: 'left',\n fontSize: 22,\n fontWeight: '300',\n marginBottom: 20,\n paddingLeft: 20,\n },\n header: {\n backgroundColor: '#111111',\n padding: 10,\n paddingBottom: 20,\n textAlign: \"left\",\n },\n headerText: {\n textAlign: 'left',\n paddingLeft: 30,\n fontSize: 16,\n fontWeight: '500',\n },\n content: {\n padding: 20,\n paddingLeft: 60,\n backgroundColor: '#000000',\n },\n active: {\n backgroundColor: 'rgba(0,0,0,1)',\n },\n inactive: {\n backgroundColor: 'rgba(20,20,20,1)',\n },\n selectors: {\n marginBottom: 10,\n flexDirection: 'row',\n justifyContent: 'center',\n },\n selector: {\n backgroundColor: '#111111',\n padding: 10,\n },\n activeSelector: {\n fontWeight: 'bold',\n },\n selectTitle: {\n fontSize: 14,\n fontWeight: '500',\n padding: 10,\n },\n multipleToggle: {\n flexDirection: 'row',\n justifyContent: 'center',\n marginVertical: 30,\n alignItems: 'center',\n },\n multipleToggle__title: {\n fontSize: 16,\n marginRight: 8,\n },\n});\n","import React from \"react\"\nimport { View, ViewStyle, TextStyle, ImageStyle, SafeAreaView } from \"react-native\"\nimport { useNavigation } from \"@react-navigation/native\"\nimport { observer } from \"mobx-react-lite\"\nimport { Button, Header, Screen, Text, Wallpaper, AutoImage as Image } from \"../../components\"\nimport { color, spacing, typography } from \"../../theme\"\nconst bowserLogo = require(\"./bowser.png\")\n\nconst FULL: ViewStyle = { flex: 1 }\nconst CONTAINER: ViewStyle = {\n backgroundColor: color.transparent,\n paddingHorizontal: spacing[4],\n}\nconst TEXT: TextStyle = {\n color: color.palette.white,\n fontFamily: typography.primary,\n}\nconst BOLD: TextStyle = { fontWeight: \"bold\" }\nconst HEADER: TextStyle = {\n paddingTop: spacing[3],\n paddingBottom: spacing[4] + spacing[1],\n paddingHorizontal: 0,\n}\nconst HEADER_TITLE: TextStyle = {\n ...TEXT,\n ...BOLD,\n fontSize: 12,\n lineHeight: 15,\n textAlign: \"center\",\n letterSpacing: 1.5,\n}\nconst TITLE_WRAPPER: TextStyle = {\n ...TEXT,\n textAlign: \"center\",\n}\nconst TITLE: TextStyle = {\n ...TEXT,\n ...BOLD,\n fontSize: 28,\n lineHeight: 38,\n textAlign: \"center\",\n}\nconst ALMOST: TextStyle = {\n ...TEXT,\n ...BOLD,\n fontSize: 26,\n fontStyle: \"italic\",\n}\nconst BOWSER: ImageStyle = {\n alignSelf: \"center\",\n marginVertical: spacing[5],\n maxWidth: \"100%\",\n width: 343,\n height: 230,\n}\nconst CONTENT: TextStyle = {\n ...TEXT,\n color: \"#BAB6C8\",\n fontSize: 15,\n lineHeight: 22,\n marginBottom: spacing[5],\n}\nconst CONTINUE: ViewStyle = {\n paddingVertical: spacing[4],\n paddingHorizontal: spacing[4],\n backgroundColor: color.palette.deepPurple,\n}\nconst CONTINUE_TEXT: TextStyle = {\n ...TEXT,\n ...BOLD,\n fontSize: 13,\n letterSpacing: 2,\n}\nconst FOOTER: ViewStyle = { backgroundColor: \"#20162D\" }\nconst FOOTER_CONTENT: ViewStyle = {\n paddingVertical: spacing[4],\n paddingHorizontal: spacing[4],\n}\n\nexport const WelcomeScreen = observer(function WelcomeScreen() {\n const navigation = useNavigation()\n const nextScreen = () => navigation.navigate(\"demo\")\n\n return (\n <View testID=\"WelcomeScreen\" style={FULL}>\n <Wallpaper />\n <Screen style={CONTAINER} preset=\"scroll\" backgroundColor={color.transparent}>\n <Header headerTx=\"welcomeScreen.poweredBy\" style={HEADER} titleStyle={HEADER_TITLE} />\n <Text style={TITLE_WRAPPER}>\n <Text style={TITLE} text=\"Your new app, \" />\n <Text style={ALMOST} text=\"almost\" />\n <Text style={TITLE} text=\"!\" />\n </Text>\n <Text style={TITLE} preset=\"header\" tx=\"welcomeScreen.readyForLaunch\" />\n <Image source={bowserLogo} style={BOWSER} />\n <Text style={CONTENT}>\n This probably isn't what your app is going to look like. Unless your designer handed you\n this screen and, in that case, congrats! You're ready to ship.\n </Text>\n <Text style={CONTENT}>\n For everyone else, this is where you'll see a live preview of your fully functioning app\n using Ignite.\n </Text>\n </Screen>\n <SafeAreaView style={FOOTER}>\n <View style={FOOTER_CONTENT}>\n <Button\n testID=\"next-screen-button\"\n style={CONTINUE}\n textStyle={CONTINUE_TEXT}\n tx=\"welcomeScreen.continue\"\n onPress={nextScreen}\n />\n </View>\n </SafeAreaView>\n </View>\n )\n})\n","import { ApiResponse } from \"apisauce\"\n\nexport type GeneralApiProblem =\n /**\n * Times up.\n */\n | { kind: \"timeout\"; temporary: true }\n /**\n * Cannot connect to the server for some reason.\n */\n | { kind: \"cannot-connect\"; temporary: true }\n /**\n * The server experienced a problem. Any 5xx error.\n */\n | { kind: \"server\" }\n /**\n * We're not allowed because we haven't identified ourself. This is 401.\n */\n | { kind: \"unauthorized\" }\n /**\n * We don't have access to perform that request. This is 403.\n */\n | { kind: \"forbidden\" }\n /**\n * Unable to find that resource. This is a 404.\n */\n | { kind: \"not-found\" }\n /**\n * All other 4xx series errors.\n */\n | { kind: \"rejected\" }\n /**\n * Something truly unexpected happened. Most likely can try again. This is a catch all.\n */\n | { kind: \"unknown\"; temporary: true }\n /**\n * The data we received is not in the expected format.\n */\n | { kind: \"bad-data\" }\n\n/**\n * Attempts to get a common cause of problems from an api response.\n *\n * @param response The api response.\n */\nexport function getGeneralApiProblem(response: ApiResponse<any>): GeneralApiProblem | void {\n switch (response.problem) {\n case \"CONNECTION_ERROR\":\n return { kind: \"cannot-connect\", temporary: true }\n case \"NETWORK_ERROR\":\n return { kind: \"cannot-connect\", temporary: true }\n case \"TIMEOUT_ERROR\":\n return { kind: \"timeout\", temporary: true }\n case \"SERVER_ERROR\":\n return { kind: \"server\" }\n case \"UNKNOWN_ERROR\":\n return { kind: \"unknown\", temporary: true }\n case \"CLIENT_ERROR\":\n switch (response.status) {\n case 401:\n return { kind: \"unauthorized\" }\n case 403:\n return { kind: \"forbidden\" }\n case 404:\n return { kind: \"not-found\" }\n default:\n return { kind: \"rejected\" }\n }\n case \"CANCEL_ERROR\":\n return null\n }\n\n return null\n}\n","// Use this import if you want to use \"env.js\" file\n// const { API_URL } = require(\"../../config/env\")\n// Or just specify it directly like this:\nconst API_URL = \"http://example.com\"\n\n/**\n * The options used to configure the API.\n */\nexport interface ApiConfig {\n /**\n * The URL of the api.\n */\n url: string\n\n /**\n * Milliseconds before we timeout the request.\n */\n timeout: number\n}\n\n/**\n * The default configuration for the app.\n */\nexport const DEFAULT_API_CONFIG: ApiConfig = {\n url: API_URL || \"https://jsonplaceholder.typicode.com\",\n timeout: 10000,\n}\n","import { ApisauceInstance, create, ApiResponse } from \"apisauce\"\nimport { getGeneralApiProblem } from \"./api-problem\"\nimport { ApiConfig, DEFAULT_API_CONFIG } from \"./api-config\"\nimport * as Types from \"./api.types\"\n\n/**\n * Manages all requests to the API.\n */\nexport class Api {\n /**\n * The underlying apisauce instance which performs the requests.\n */\n apisauce: ApisauceInstance\n\n /**\n * Configurable options.\n */\n config: ApiConfig\n\n /**\n * Creates the api.\n *\n * @param config The configuration to use.\n */\n constructor(config: ApiConfig = DEFAULT_API_CONFIG) {\n this.config = config\n }\n\n /**\n * Sets up the API. This will be called during the bootup\n * sequence and will happen before the first React component\n * is mounted.\n *\n * Be as quick as possible in here.\n */\n setup() {\n // construct the apisauce instance\n this.apisauce = create({\n baseURL: this.config.url,\n timeout: this.config.timeout,\n headers: {\n Accept: \"application/json\",\n },\n })\n }\n\n /**\n * Gets a list of users.\n */\n async getUsers(): Promise<Types.GetUsersResult> {\n // make the api call\n const response: ApiResponse<any> = await this.apisauce.get(`/users`)\n\n // the typical ways to die when calling an api\n if (!response.ok) {\n const problem = getGeneralApiProblem(response)\n if (problem) return problem\n }\n\n const convertUser = (raw) => {\n return {\n id: raw.id,\n name: raw.name,\n }\n }\n\n // transform the data into the format we are expecting\n try {\n const rawUsers = response.data\n const resultUsers: Types.User[] = rawUsers.map(convertUser)\n return { kind: \"ok\", users: resultUsers }\n } catch {\n return { kind: \"bad-data\" }\n }\n }\n\n /**\n * Gets a single user by ID\n */\n\n async getUser(id: string): Promise<Types.GetUserResult> {\n // make the api call\n const response: ApiResponse<any> = await this.apisauce.get(`/users/${id}`)\n\n // the typical ways to die when calling an api\n if (!response.ok) {\n const problem = getGeneralApiProblem(response)\n if (problem) return problem\n }\n\n // transform the data into the format we are expecting\n try {\n const resultUser: Types.User = {\n id: response.data.id,\n name: response.data.name,\n }\n return { kind: \"ok\", user: resultUser }\n } catch {\n return { kind: \"bad-data\" }\n }\n }\n}\n","import React from \"react\"\nimport { ImageStyle, Platform, TextStyle, View, ViewStyle } from \"react-native\"\nimport { useNavigation } from \"@react-navigation/native\"\nimport { observer } from \"mobx-react-lite\"\nimport {\n BulletItem,\n Button,\n Header,\n Text,\n Screen,\n Wallpaper,\n AutoImage as Image,\n} from \"../../components\"\nimport { color, spacing } from \"../../theme\"\nimport { Api } from \"../../services/api\"\nimport { save } from \"../../utils/storage\"\nexport const logoIgnite = require(\"./logo-ignite.png\")\nexport const heart = require(\"./heart.png\")\n\nconst FULL: ViewStyle = { flex: 1 }\nconst CONTAINER: ViewStyle = {\n backgroundColor: color.transparent,\n paddingHorizontal: spacing[4],\n}\nconst DEMO: ViewStyle = {\n paddingVertical: spacing[4],\n paddingHorizontal: spacing[4],\n backgroundColor: color.palette.deepPurple,\n}\nconst BOLD: TextStyle = { fontWeight: \"bold\" }\nconst DEMO_TEXT: TextStyle = {\n ...BOLD,\n fontSize: 13,\n letterSpacing: 2,\n}\nconst HEADER: TextStyle = {\n paddingTop: spacing[3],\n paddingBottom: spacing[5] - 1,\n paddingHorizontal: 0,\n}\nconst HEADER_TITLE: TextStyle = {\n ...BOLD,\n fontSize: 12,\n lineHeight: 15,\n textAlign: \"center\",\n letterSpacing: 1.5,\n}\nconst TITLE: TextStyle = {\n ...BOLD,\n fontSize: 28,\n lineHeight: 38,\n textAlign: \"center\",\n marginBottom: spacing[5],\n}\nconst TAGLINE: TextStyle = {\n color: \"#BAB6C8\",\n fontSize: 15,\n lineHeight: 22,\n marginBottom: spacing[4] + spacing[1],\n}\nconst IGNITE: ImageStyle = {\n marginVertical: spacing[6],\n alignSelf: \"center\",\n width: 180,\n height: 100,\n}\nconst LOVE_WRAPPER: ViewStyle = {\n flexDirection: \"row\",\n alignItems: \"center\",\n alignSelf: \"center\",\n}\nconst LOVE: TextStyle = {\n color: \"#BAB6C8\",\n fontSize: 15,\n lineHeight: 22,\n}\nconst HEART: ImageStyle = {\n marginHorizontal: spacing[2],\n width: 10,\n height: 10,\n resizeMode: \"contain\",\n}\nconst HINT: TextStyle = {\n color: \"#BAB6C8\",\n fontSize: 12,\n lineHeight: 15,\n marginVertical: spacing[2],\n}\n\nconst platformCommand = Platform.select({\n ios: \"Cmd + D\",\n android: \"Cmd/Ctrl + M\",\n})\n\nexport const DemoScreen = observer(function DemoScreen() {\n const navigation = useNavigation()\n const goBack = () => navigation.goBack()\n\n const demoReactotron = React.useMemo(\n () => async () => {\n console.tron.log(\"Your Friendly tron log message\")\n console.tron.logImportant(\"I am important\")\n console.tron.display({\n name: \"DISPLAY\",\n value: {\n numbers: 1,\n strings: \"strings\",\n booleans: true,\n arrays: [1, 2, 3],\n objects: {\n deeper: {\n deeper: {\n yay: \"👾\",\n },\n },\n },\n functionNames: function hello() {\n /* dummy function */\n },\n },\n preview: \"More control with display()\",\n important: true,\n image: {\n uri:\n \"https://avatars2.githubusercontent.com/u/3902527?s=200&u=a0d16b13ed719f35d95ca0f4440f5d07c32c349a&v=4\",\n },\n })\n // make an API call for the demo\n // Don't do API like this, use store's API\n const demo = new Api()\n demo.setup()\n demo.getUser(\"1\")\n // Let's do some async storage stuff\n await save(\"Cool Name\", \"Boaty McBoatface\")\n },\n [],\n )\n\n return (\n <View testID=\"DemoScreen\" style={FULL}>\n <Wallpaper />\n <Screen style={CONTAINER} preset=\"scroll\" backgroundColor={color.transparent}>\n <Header\n headerTx=\"demoScreen.howTo\"\n leftIcon=\"back\"\n onLeftPress={goBack}\n style={HEADER}\n titleStyle={HEADER_TITLE}\n />\n <Text style={TITLE} preset=\"header\" tx=\"demoScreen.title\" />\n <Text style={TAGLINE} tx=\"demoScreen.tagLine\" />\n <BulletItem text=\"Integrated here, Navigation with State, TypeScript, Storybook, Solidarity, and i18n.\" />\n <BulletItem\n text={`To run Storybook, press ${platformCommand} or shake the device to show the developer menu, then select \"Toggle Storybook\"`}\n />\n <BulletItem text=\"Load up Reactotron! You can inspect your app, view the events, interact, and so much more!\" />\n <View>\n <Button\n style={DEMO}\n textStyle={DEMO_TEXT}\n tx=\"demoScreen.reactotron\"\n onPress={demoReactotron}\n />\n <Text style={HINT} tx={`demoScreen.${Platform.OS}ReactotronHint` as const} />\n </View>\n <Button\n style={DEMO}\n textStyle={DEMO_TEXT}\n tx=\"demoScreen.demoList\"\n onPress={() => navigation.navigate(\"demoList\")}\n />\n <Image source={logoIgnite} style={IGNITE} />\n <View style={LOVE_WRAPPER}>\n <Text style={LOVE} text=\"Made with\" />\n <Image source={heart} style={HEART} />\n <Text style={LOVE} text=\"by Infinite Red\" />\n </View>\n </Screen>\n </View>\n )\n})\n","import { Instance, SnapshotOut, types } from \"mobx-state-tree\"\n\n/**\n * Rick and Morty character model.\n */\nexport const CharacterModel = types.model(\"Character\").props({\n id: types.identifierNumber,\n name: types.maybe(types.string),\n status: types.maybe(types.string),\n image: types.maybe(types.string),\n})\n\ntype CharacterType = Instance<typeof CharacterModel>\nexport interface Character extends CharacterType {}\ntype CharacterSnapshotType = SnapshotOut<typeof CharacterModel>\nexport interface CharacterSnapshot extends CharacterSnapshotType {}\nexport const createCharacterDefaultModel = () => types.optional(CharacterModel, {})\n","import { ApiResponse } from \"apisauce\"\nimport { Api } from \"./api\"\nimport { GetCharactersResult } from \"./api.types\"\nimport { getGeneralApiProblem } from \"./api-problem\"\n\nconst API_PAGE_SIZE = 50\n\nexport class CharacterApi {\n private api: Api\n\n constructor(api: Api) {\n this.api = api\n }\n\n async getCharacters(): Promise<GetCharactersResult> {\n try {\n // make the api call\n const response: ApiResponse<any> = await this.api.apisauce.get(\n \"https://raw.githubusercontent.com/infinitered/ignite/master/data/rick-and-morty.json\",\n { amount: API_PAGE_SIZE },\n )\n\n // the typical ways to die when calling an api\n if (!response.ok) {\n const problem = getGeneralApiProblem(response)\n if (problem) return problem\n }\n\n const characters = response.data.results\n\n return { kind: \"ok\", characters }\n } catch (e) {\n __DEV__ && console.tron.log(e.message)\n return { kind: \"bad-data\" }\n }\n }\n}\n","import { Instance, SnapshotOut, types } from \"mobx-state-tree\"\nimport { CharacterModel, CharacterSnapshot } from \"../character/character\"\nimport { CharacterApi } from \"../../services/api/character-api\"\nimport { withEnvironment } from \"../extensions/with-environment\"\n\n/**\n * Example store containing Rick and Morty characters\n */\nexport const CharacterStoreModel = types\n .model(\"CharacterStore\")\n .props({\n characters: types.optional(types.array(CharacterModel), []),\n })\n .extend(withEnvironment)\n .actions((self) => ({\n saveCharacters: (characterSnapshots: CharacterSnapshot[]) => {\n self.characters.replace(characterSnapshots)\n },\n }))\n .actions((self) => ({\n getCharacters: async () => {\n const characterApi = new CharacterApi(self.environment.api)\n const result = await characterApi.getCharacters()\n\n if (result.kind === \"ok\") {\n self.saveCharacters(result.characters)\n } else {\n __DEV__ && console.tron.log(result.kind)\n }\n },\n }))\n\ntype CharacterStoreType = Instance<typeof CharacterStoreModel>\nexport interface CharacterStore extends CharacterStoreType {}\ntype CharacterStoreSnapshotType = SnapshotOut<typeof CharacterStoreModel>\nexport interface CharacterStoreSnapshot extends CharacterStoreSnapshotType {}\nexport const createCharacterStoreDefaultModel = () => types.optional(CharacterStoreModel, {})\n","import { getEnv, IStateTreeNode } from \"mobx-state-tree\"\nimport { Environment } from \"../environment\"\n\n/**\n * Adds a environment property to the node for accessing our\n * Environment in strongly typed.\n */\nexport const withEnvironment = (self: IStateTreeNode) => ({\n views: {\n /**\n * The environment.\n */\n get environment() {\n return getEnv<Environment>(self)\n },\n },\n})\n","import { Instance, SnapshotOut, types } from \"mobx-state-tree\"\nimport { CharacterStoreModel } from \"../character-store/character-store\"\n\n/**\n * A RootStore model.\n */\n// prettier-ignore\nexport const RootStoreModel = types.model(\"RootStore\").props({\n characterStore: types.optional(CharacterStoreModel, {} as any),\n})\n\n/**\n * The RootStore instance.\n */\nexport interface RootStore extends Instance<typeof RootStoreModel> {}\n\n/**\n * The data of a RootStore.\n */\nexport interface RootStoreSnapshot extends SnapshotOut<typeof RootStoreModel> {}\n","import { createContext, useContext } from \"react\"\nimport { RootStore } from \"./root-store\"\n\n/**\n * Create a context we can use to\n * - Provide access to our stores from our root component\n * - Consume stores in our screens (or other components, though it's\n * preferable to just connect screens)\n */\nconst RootStoreContext = createContext<RootStore>({} as RootStore)\n\n/**\n * The provider our root component will use to expose the root store\n */\nexport const RootStoreProvider = RootStoreContext.Provider\n\n/**\n * A hook that screens can use to gain access to our stores, with\n * `const { someStore, someOtherStore } = useStores()`,\n * or less likely: `const rootStore = useStores()`\n */\nexport const useStores = () => useContext(RootStoreContext)\n","import { Api } from \"../services/api\"\n\nlet ReactotronDev\nif (__DEV__) {\n const { Reactotron } = require(\"../services/reactotron\")\n ReactotronDev = Reactotron\n}\n\n/**\n * The environment is a place where services and shared dependencies between\n * models live. They are made available to every model via dependency injection.\n */\nexport class Environment {\n constructor() {\n // create each service\n if (__DEV__) {\n // dev-only services\n this.reactotron = new ReactotronDev()\n }\n this.api = new Api()\n }\n\n async setup() {\n // allow each service to setup\n if (__DEV__) {\n await this.reactotron.setup()\n }\n await this.api.setup()\n }\n\n /**\n * Reactotron is only available in dev.\n */\n reactotron: typeof ReactotronDev\n\n /**\n * Our api.\n */\n api: Api\n}\n","import { onSnapshot } from \"mobx-state-tree\"\nimport { RootStoreModel, RootStore } from \"./root-store\"\nimport { Environment } from \"../environment\"\nimport * as storage from \"../../utils/storage\"\n\n/**\n * The key we'll be saving our state as within async storage.\n */\nconst ROOT_STATE_STORAGE_KEY = \"root\"\n\n/**\n * Setup the environment that all the models will be sharing.\n *\n * The environment includes other functions that will be picked from some\n * of the models that get created later. This is how we loosly couple things\n * like events between models.\n */\nexport async function createEnvironment() {\n const env = new Environment()\n await env.setup()\n return env\n}\n\n/**\n * Setup the root state.\n */\nexport async function setupRootStore() {\n let rootStore: RootStore\n let data: any\n\n // prepare the environment that will be associated with the RootStore.\n const env = await createEnvironment()\n try {\n // load data from storage\n data = (await storage.load(ROOT_STATE_STORAGE_KEY)) || {}\n rootStore = RootStoreModel.create(data, env)\n } catch (e) {\n // if there's any problems loading, then let's at least fallback to an empty state\n // instead of crashing.\n rootStore = RootStoreModel.create({}, env)\n\n // but please inform us what happened\n __DEV__ && console.tron.error(e.message, null)\n }\n\n // reactotron logging\n if (__DEV__) {\n env.reactotron.setRootStore(rootStore, data)\n }\n\n // track changes & save to storage\n onSnapshot(rootStore, (snapshot) => storage.save(ROOT_STATE_STORAGE_KEY, snapshot))\n\n return rootStore\n}\n","import React, { useEffect } from \"react\"\nimport { FlatList, TextStyle, View, ViewStyle, ImageStyle } from \"react-native\"\nimport { useNavigation } from \"@react-navigation/native\"\nimport { observer } from \"mobx-react-lite\"\nimport { Header, Screen, Text, Wallpaper, AutoImage as Image } from \"../../components\"\nimport { color, spacing } from \"../../theme\"\nimport { useStores } from \"../../models\"\n\nconst FULL: ViewStyle = {\n flex: 1,\n}\nconst CONTAINER: ViewStyle = {\n backgroundColor: color.transparent,\n}\nconst HEADER: TextStyle = {\n paddingBottom: spacing[5] - 1,\n paddingHorizontal: spacing[4],\n paddingTop: spacing[3],\n}\nconst HEADER_TITLE: TextStyle = {\n fontSize: 12,\n fontWeight: \"bold\",\n letterSpacing: 1.5,\n lineHeight: 15,\n textAlign: \"center\",\n}\nconst LIST_CONTAINER: ViewStyle = {\n alignItems: \"center\",\n flexDirection: \"row\",\n padding: 10,\n}\nconst IMAGE: ImageStyle = {\n borderRadius: 35,\n height: 65,\n width: 65,\n}\nconst LIST_TEXT: TextStyle = {\n marginLeft: 10,\n}\nconst FLAT_LIST: ViewStyle = {\n paddingHorizontal: spacing[4],\n}\n\nexport const DemoListScreen = observer(function DemoListScreen() {\n const navigation = useNavigation()\n const goBack = () => navigation.goBack()\n\n const { characterStore } = useStores()\n const { characters } = characterStore\n\n useEffect(() => {\n async function fetchData() {\n await characterStore.getCharacters()\n }\n\n fetchData()\n }, [])\n\n return (\n <View testID=\"DemoListScreen\" style={FULL}>\n <Wallpaper />\n <Screen style={CONTAINER} preset=\"fixed\" backgroundColor={color.transparent}>\n <Header\n headerTx=\"demoListScreen.title\"\n leftIcon=\"back\"\n onLeftPress={goBack}\n style={HEADER}\n titleStyle={HEADER_TITLE}\n />\n <FlatList\n contentContainerStyle={FLAT_LIST}\n data={[...characters]}\n keyExtractor={(item) => String(item.id)}\n renderItem={({ item }) => (\n <View style={LIST_CONTAINER}>\n <Image source={{ uri: item.image }} style={IMAGE} />\n <Text style={LIST_TEXT}>\n {item.name} ({item.status})\n </Text>\n </View>\n )}\n />\n </Screen>\n </View>\n )\n})\n","import React, { useEffect, useState } from \"react\"\nimport { observer } from \"mobx-react-lite\"\nimport { ViewStyle } from \"react-native\"\nimport { Screen, Text } from \"../../components\"\n// import { useNavigation } from \"@react-navigation/native\"\n// import { useStores } from \"../../models\"\nimport { color } from \"../../theme\"\n\nimport { Graph } from \"../../components\"\nimport { Tweaks } from \"../../components\"\n\nimport genRandomTree from \"../../data/randomdata\"\n\nimport AsyncStorage from \"@react-native-async-storage/async-storage\"\n\nimport axios from \"axios\";\n\nimport rando from \"../../data/rando.json\"\n\nconst ROOT: ViewStyle = {\n backgroundColor: color.palette.black,\n flex: 1,\n}\n\nexport const GraphScreen = observer(function GraphScreen() {\n // Pull in one of our MST stores\n // const { someStore, anotherStore } = useStores()\n\n // Pull in navigation via hook\n // const navigation = useNavigation()\n\n\n const [physics, setPhysics] = useState({})\n const [graphData, setGraphData] = useState();\n const [nodeIds, setNodeIds] = useState([]);\n // { \"nodes\": [{ \"id\": 1 }, { \"id\": 2 }], \"links\": [{ \"target\": 1, \"source\": 2 }] });\n const physicsInit = {\n charge: -30,\n collision: false,\n linkStrength: 1,\n linkIts: 1,\n collapse: false,\n threedim: false,\n particles: 2,\n linkOpacity: 1,\n linkWidth: 1,\n particleWidth: 1,\n nodeRel: 1,\n }\n\n const getData = async () => {\n try {\n const value: string = await AsyncStorage.getItem(\"@physics\");\n if (value !== null) {\n const valueJson = JSON.parse(value);\n if (Object.keys(valueJson).length === Object.keys(physicsInit).length) {\n return valueJson;\n } else { return physicsInit };\n } else {\n return physicsInit\n }\n } catch (e) {\n console.log(e)\n }\n }\n const storeData = async (value) => {\n try {\n const jsonValue = JSON.stringify(value)\n await AsyncStorage.mergeItem(\"@physics\", jsonValue)\n console.log(\"Writing \" + jsonValue)\n } catch (e) {\n console.log(e)\n }\n }\n\n // hook to save the current configuration of the physics tweaks\n // after it is updated\n useEffect(() => {\n if (timer) {\n clearTimeout(timer)\n }\n // set timer so the thing doesn't run every single slider tick\n const timer = setTimeout(() => {\n storeData(physics)\n const test = getData()\n console.log(test)\n }, 1000)\n return () => clearTimeout(timer)\n }, [physics]);\n\n //\"ComponentOnMount\"\n // Get previous settings and the data from the org-roam-server\n const sanitizeGraph = (data, nodeIds: string[]) => {\n const cleanLinks = [];\n data.links.forEach((link, i) => {\n for (i=0; i<=nodeIds.length; i++){\n if (link.target === nodeIds[i]) {\n cleanLinks.push(link);\n break;\n };\n };\n });\n console.log(cleanLinks);\n data.links = cleanLinks;\n return data;\n };\n\n const getNodesById = (data) => {\n let temp = [];\n data.nodes.forEach(node => temp.push(node.id));\n setNodeIds(temp);\n return temp;\n };\n\n useEffect(() => {\n getData().then((data) => setPhysics(data));\n axios.get(\"http://localhost:35901/graph\")\n .then((dataa) => {\n let nods = getNodesById(dataa.data);\n setNodeIds(nods);\n console.log(nodeIds);\n let cleanData = sanitizeGraph(dataa.data, nods);\n console.log(cleanData)\n setGraphData(cleanData);\n })\n .catch((e) => {\n console.log(e);\n console.log(\"Couldn't get data.\");\n //setGraphData(rando);\n });\n }, [])\n if (!graphData) { return null }\n else {\n return (\n <Screen style={ROOT} preset=\"scroll\">\n <Tweaks physics={physics} setPhysics={setPhysics} />\n <Graph physics={physics} gData={graphData} nodeIds={nodeIds}/>\n </Screen>\n )\n }\n })\n","/**\n * This is the navigator you will modify to display the logged-in screens of your app.\n * You can use RootNavigator to also display an auth flow or other user flows.\n *\n * You'll likely spend most of your time in this file.\n */\nimport React from \"react\"\nimport { createStackNavigator } from \"@react-navigation/stack\"\nimport { WelcomeScreen, DemoScreen, DemoListScreen, GraphScreen } from \"../screens\"\n\n/**\n * This type allows TypeScript to know what routes are defined in this navigator\n * as well as what properties (if any) they might take when navigating to them.\n *\n * If no params are allowed, pass through `undefined`. Generally speaking, we\n * recommend using your MobX-State-Tree store(s) to keep application state\n * rather than passing state through navigation params.\n *\n * For more information, see this documentation:\n * https://reactnavigation.org/docs/params/\n * https://reactnavigation.org/docs/typescript#type-checking-the-navigator\n */\nexport type PrimaryParamList = {\n welcome: undefined\n demo: undefined\n demoList: undefined\n graph: undefined\n}\n\n// Documentation: https://reactnavigation.org/docs/stack-navigator/\nconst Stack = createStackNavigator<PrimaryParamList>()\n\nexport function MainNavigator() {\n return (\n <Stack.Navigator\n screenOptions={{\n cardStyle: { backgroundColor: \"transparent\" },\n headerShown: false,\n }}\n >\n <Stack.Screen name=\"graph\" component={GraphScreen}/>\n </Stack.Navigator>\n )\n}\n\n/**\n <Stack.Screen name=\"welcome\" component={WelcomeScreen} />\n <Stack.Screen name=\"demo\" component={DemoScreen} />\n <Stack.Screen name=\"demoList\" component={DemoListScreen} />\n * A list of routes from which we're allowed to leave the app when\n * the user presses the back button on Android.\n *\n * Anything not on this list will be a standard `back` action in\n * react-navigation.\n *\n * `canExit` is used in ./app/app.tsx in the `useBackButtonHandler` hook.\n */\nconst exitRoutes = [\"welcome\"]\nexport const canExit = (routeName: string) => exitRoutes.includes(routeName)\n","/**\n * The root navigator is used to switch between major navigation flows of your app.\n * Generally speaking, it will contain an auth flow (registration, login, forgot password)\n * and a \"main\" flow (which is contained in your MainNavigator) which the user\n * will use once logged in.\n */\nimport React from \"react\"\nimport { NavigationContainer, NavigationContainerRef } from \"@react-navigation/native\"\nimport { createStackNavigator } from \"@react-navigation/stack\"\nimport { MainNavigator } from \"./main-navigator\"\nimport { color } from \"../theme\"\n\n/**\n * This type allows TypeScript to know what routes are defined in this navigator\n * as well as what properties (if any) they might take when navigating to them.\n *\n * We recommend using MobX-State-Tree store(s) to handle state rather than navigation params.\n *\n * For more information, see this documentation:\n * https://reactnavigation.org/docs/params/\n * https://reactnavigation.org/docs/typescript#type-checking-the-navigator\n */\nexport type RootParamList = {\n mainStack: undefined\n}\n\nconst Stack = createStackNavigator<RootParamList>()\n\nconst RootStack = () => {\n return (\n <Stack.Navigator\n screenOptions={{\n cardStyle: { backgroundColor: color.palette.deepPurple },\n headerShown: false,\n }}\n >\n <Stack.Screen\n name=\"mainStack\"\n component={MainNavigator}\n options={{\n headerShown: false,\n }}\n />\n </Stack.Navigator>\n )\n}\n\nexport const RootNavigator = React.forwardRef<\n NavigationContainerRef,\n Partial<React.ComponentProps<typeof NavigationContainer>>\n>((props, ref) => {\n return (\n <NavigationContainer {...props} ref={ref}>\n <RootStack />\n </NavigationContainer>\n )\n})\n\nRootNavigator.displayName = \"RootNavigator\"\n","import React, { useState, useEffect, useRef } from \"react\"\nimport { BackHandler } from \"react-native\"\nimport { PartialState, NavigationState, NavigationContainerRef } from \"@react-navigation/native\"\n\nexport const RootNavigation = {\n navigate(name: string) {\n name // eslint-disable-line no-unused-expressions\n },\n goBack() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n resetRoot(state?: PartialState<NavigationState> | NavigationState) {}, // eslint-disable-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function\n getRootState(): NavigationState {\n return {} as any\n },\n}\n\nexport const setRootNavigation = (ref: React.RefObject<NavigationContainerRef>) => {\n for (const method in RootNavigation) {\n RootNavigation[method] = (...args: any) => {\n if (ref.current) {\n return ref.current[method](...args)\n }\n }\n }\n}\n\n/**\n * Gets the current screen from any navigation state.\n */\nexport function getActiveRouteName(state: NavigationState | PartialState<NavigationState>) {\n const route = state.routes[state.index]\n\n // Found the active route -- return the name\n if (!route.state) return route.name\n\n // Recursive call to deal with nested routers\n return getActiveRouteName(route.state)\n}\n\n/**\n * Hook that handles Android back button presses and forwards those on to\n * the navigation or allows exiting the app.\n */\nexport function useBackButtonHandler(\n ref: React.RefObject<NavigationContainerRef>,\n canExit: (routeName: string) => boolean,\n) {\n const canExitRef = useRef(canExit)\n\n useEffect(() => {\n canExitRef.current = canExit\n }, [canExit])\n\n useEffect(() => {\n // We'll fire this when the back button is pressed on Android.\n const onBackPress = () => {\n const navigation = ref.current\n\n if (navigation == null) {\n return false\n }\n\n // grab the current route\n const routeName = getActiveRouteName(navigation.getRootState())\n\n // are we allowed to exit?\n if (canExitRef.current(routeName)) {\n // let the system know we've not handled this event\n return false\n }\n\n // we can't exit, so let's turn this into a back action\n if (navigation.canGoBack()) {\n navigation.goBack()\n\n return true\n }\n\n return false\n }\n\n // Subscribe when we come to life\n BackHandler.addEventListener(\"hardwareBackPress\", onBackPress)\n\n // Unsubscribe when we're done\n return () => BackHandler.removeEventListener(\"hardwareBackPress\", onBackPress)\n }, [ref])\n}\n\n/**\n * Custom hook for persisting navigation state.\n */\nexport function useNavigationPersistence(storage: any, persistenceKey: string) {\n const [initialNavigationState, setInitialNavigationState] = useState()\n const [isRestoringNavigationState, setIsRestoringNavigationState] = useState(true)\n\n const routeNameRef = useRef()\n const onNavigationStateChange = (state) => {\n const previousRouteName = routeNameRef.current\n const currentRouteName = getActiveRouteName(state)\n\n if (previousRouteName !== currentRouteName) {\n // track screens.\n __DEV__ && console.tron.log(currentRouteName)\n }\n\n // Save the current route name for later comparision\n routeNameRef.current = currentRouteName\n\n // Persist state to storage\n storage.save(persistenceKey, state)\n }\n\n const restoreState = async () => {\n try {\n const state = await storage.load(persistenceKey)\n if (state) setInitialNavigationState(state)\n } finally {\n setIsRestoringNavigationState(false)\n }\n }\n\n useEffect(() => {\n if (isRestoringNavigationState) restoreState()\n }, [isRestoringNavigationState])\n\n return { onNavigationStateChange, restoreState, initialNavigationState }\n}\n","import React, { useState, useEffect } from \"react\"\nimport * as QueryString from \"query-string\"\n\ninterface StorybookQueryParams {\n storybook?: boolean\n}\n\nexport const ToggleStorybook = (props) => {\n const [StorybookUIRoot, setStorybookUIRoot] = useState<any>(null)\n const [queryParams, setQueryParams] = useState<StorybookQueryParams>({})\n\n useEffect(() => {\n if (__DEV__) {\n // Load the storybook UI once\n setStorybookUIRoot(() => require(\"./storybook\").StorybookUIRoot)\n }\n }, [])\n\n useEffect(() => {\n if (__DEV__) {\n setQueryParams(QueryString.parse(window.location.search))\n }\n }, [window.location.search])\n\n if (queryParams?.storybook) {\n return StorybookUIRoot ? <StorybookUIRoot /> : null\n } else {\n return props.children\n }\n}\n","/**\n * Welcome to the main entry point of the app. In this file, we'll\n * be kicking off our app.\n *\n * Most of this file is boilerplate and you shouldn't need to modify\n * it very often. But take some time to look through and understand\n * what is going on here.\n *\n * The app navigation resides in ./app/navigators, so head over there\n * if you're interested in adding screens and navigators.\n */\nimport \"./i18n\"\nimport \"./utils/ignore-warnings\"\nimport React, { useState, useEffect, useRef } from \"react\"\nimport { NavigationContainerRef } from \"@react-navigation/native\"\nimport { SafeAreaProvider, initialWindowMetrics } from \"react-native-safe-area-context\"\nimport { initFonts } from \"./theme/fonts\" // expo\nimport * as storage from \"./utils/storage\"\nimport {\n useBackButtonHandler,\n RootNavigator,\n canExit,\n setRootNavigation,\n useNavigationPersistence,\n} from \"./navigators\"\nimport { RootStore, RootStoreProvider, setupRootStore } from \"./models\"\nimport { ToggleStorybook } from \"../storybook/toggle-storybook\"\n\n// This puts screens in a native ViewController or Activity. If you want fully native\n// stack navigation, use `createNativeStackNavigator` in place of `createStackNavigator`:\n// https://github.com/kmagiera/react-native-screens#using-native-stack-navigator\nimport { enableScreens } from \"react-native-screens\"\nenableScreens()\n\nexport const NAVIGATION_PERSISTENCE_KEY = \"NAVIGATION_STATE\"\n\n/**\n * This is the root component of our app.\n */\nfunction App() {\n const navigationRef = useRef<NavigationContainerRef>(null)\n const [rootStore, setRootStore] = useState<RootStore | undefined>(undefined)\n\n setRootNavigation(navigationRef)\n useBackButtonHandler(navigationRef, canExit)\n const { initialNavigationState, onNavigationStateChange } = useNavigationPersistence(\n storage,\n NAVIGATION_PERSISTENCE_KEY,\n )\n\n // Kick off initial async loading actions, like loading fonts and RootStore\n useEffect(() => {\n ;(async () => {\n await initFonts() // expo\n setupRootStore().then(setRootStore)\n })()\n }, [])\n\n // Before we show the app, we have to wait for our state to be ready.\n // In the meantime, don't render anything. This will be the background\n // color set in native by rootView's background color. You can replace\n // with your own loading component if you wish.\n if (!rootStore) return null\n\n // otherwise, we're ready to render the app\n return (\n <ToggleStorybook>\n <RootStoreProvider value={rootStore}>\n <SafeAreaProvider initialMetrics={initialWindowMetrics}>\n <RootNavigator\n ref={navigationRef}\n initialState={initialNavigationState}\n onStateChange={onNavigationStateChange}\n />\n </SafeAreaProvider>\n </RootStoreProvider>\n </ToggleStorybook>\n )\n}\n\nexport default App\n","// import * as Font from \"expo-font\"\n\nexport const initFonts = async () => {\n // Refer to ./assets/fonts/custom-fonts.md for instructions.\n // ...\n // Welcome back! Just uncomment this and replace/append with your font file names!\n // ⬇\n // await Font.loadAsync({\n // Montserrat: require(\"./Montserrat-Regular.ttf\"),\n // \"Montserrat-Regular\": require(\"./Montserrat-Regular.ttf\"),\n // })\n}\n","// This is the first file that ReactNative will run when it starts up.\nimport App from \"./app/app.tsx\"\nimport { registerRootComponent } from \"expo\"\n\nregisterRootComponent(App)\nexport default App\n","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAPCAYAAADtc08vAAAAAXNSR0IArs4c6QAAAQNJREFUKBWdk8EOwUAQhme2InFy9yB1cSTReAIOPIeEEyKObs4knkBS2pNbK57A3cETcKBjtmKzJd0mO5fO9p//63Q6BciJ0D83wn3cyZHV7ZLKtISNPUqeawB8EFEVEV+anElF5sSHj5nYDI4AmpnM0pvpQDcjinHTc+eyyBT4FX/NLc+dfjXTNQXYmiUYAz/uAtGGc35nsSOgwPREXeP5RBj60ZUIatzKnQAqekFRzp5biSlL/lQLbqaMCAc2XYqMSkdx/MzAP42IkgkLLxTYb7XrW1VUkKQAWRNaQhTAFpIB2ED+VlkukNxChjmQ0IoH7EhwXvwBZGEKEThAAcOif+ENKNR3psyHynYAAAAASUVORK5CYII=\"","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAAXNSR0IArs4c6QAAAIZJREFUGBljZACC/w4OMgy/fnUxMDI6gPgM//8fYGBjK2M8cOAJI1TyIlBYCCyJIN4BFekzgXWCJBkZtwMFZMEYxAaJAU1l/G9t/QxopCRIAmQkyACoqY+Bmp4zIUzEzmICOwgk9/v3LJBOsG4gG6wc6FjCjgTbC3QtUMdykJ1gDGIDxUByAK6uPrQ53B7lAAAAAElFTkSuQmCC\"","module.exports = __webpack_public_path__ + \"static/media/bg.27c56310.png\";","module.exports = __webpack_public_path__ + \"static/media/bowser.4ba9aedf.png\";","module.exports = __webpack_public_path__ + \"static/media/logo-ignite.5c0bc1b0.png\";","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAIZJREFUGBljYACC////5wHxIyB+AsRFQNwPxG+A+BIQ+4DUgBTFADE+8Bco6QFSeB2fKqjcASagofxgo/ET7CCFq/CrAcsuAVktAMTX8Fi/EyjHAlYOZMgD8X0gRgfHgAK8KDYCBaSBGNnk3UA+N4oiGAcoIQLEZ4F4HRCzw8Sx0kAFzNgkAGi11d75H7oeAAAAAElFTkSuQmCC\""],"sourceRoot":""} \ No newline at end of file