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","gravityOn","d3Force","d3","strength","gravity","threedim","linkStrength","iterations","linkIts","collision","radius","charge","useMemo","nodesById","Object","fromEntries","nodes","map","node","id","forEach","collapsed","childLinks","parentLink","links","push","Set","highlightNodes","setHighlightNodes","highlightLinks","setHighlightLinks","setHoverNode","updateHighlight","handleNodeHover","console","log","add","neighbors","neighbor","ref","graphData","linkWidth","linkDirectionalParticles","particles","nodeColor","has","linkColor","nodeLabel","title","linkOpacity","nodeRelSize","nodeRel","linkDirectionalParticleWidth","particleWidth","onNodeHover","hover","onLinkHover","target","d3AlphaDecay","alphaDecay","d3AlphaMin","alphaTarget","d3VelocityDecay","velocityDecay","autoPauseRedraw","nodeAutoColorBy","colorful","size","linkAutoColorBy","nodeVal","length","nodeCanvasObject","ctx","globalScale","labels","labelScale","label","substring","Math","min","font","bckgDimensions","measureText","n","fadeFactor","fillStyle","fillRect","x","y","textBaseline","fillText","__bckgDimensions","nodeCanvasObjectMode","Tweaks","setPhysics","marginVertical","onValueChange","minimumValue","maximumValue","step","collapse","activeSections","setActiveSections","tweaks","setTweaks","container","marginLeft","name","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","tron","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","timer","clearTimeout","setTimeout","jsonValue","mergeItem","storeData","then","axios","dataa","nods","temp","getNodesById","cleanData","cleanLinks","i","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,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AQ5CgC,EAAaxV,QAAU2V,EAGvB5F,EAAQ/a,KAAKmgB,EAAgB3B,IAgBGiC,eAAcL,0BEhFYQ,CAC1D7F,EAZsC,oBAWhCqF,EAAR,EAAQA,uBAAwBM,EAAhC,EAAgCA,wBAiBhC,OAXA5V,qBAAU,WACN,EAAAzL,EAAAC,OAAA,kEAAAD,EAAA,MClDmB,EAAAA,EAAAC,OAAA,sGDkDnB,OAEAwb,KAAiB4B,KAAK+C,GAFtB,8DAID,IAMEzE,EAIH,kBAAC,GAAD,KACE,kBAACP,GAAD,CAAmB/a,MAAOsb,GACxB,kBAAC,IAAD,CAAkB6F,eAAgBC,KAChC,kBAAC5C,GAAD,CACE1Q,IAAKgS,EACLuB,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.f2b5be91.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-3d\"\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 //fg.d3Force('center').strength(0.05);\n if(physics.gravityOn){\n fg.d3Force(\"x\", d3.forceX().strength(physics.gravity));\n fg.d3Force(\"y\", d3.forceY().strength(physics.gravity));\n physics.threedim ? fg.d3Force(\"z\", d3.forceZ().strength(physics.gravity)) : null;\n } else {\n fg.d3Force(\"x\", null);\n fg.d3Force(\"y\", null);\n physics.threedim ? fg.d3Force(\"z\", null) : null;\n };\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 */\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 console.log(\"hover\");\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 autoPauseRedraw={false}\n graphData={gData}\n //graphData={physics.collapse ? prunedTree : gData}\n nodeAutoColorBy={physics.colorful ? \"id\" : undefined}\n nodeColor={\n !physics.colorful ? (\n (node) => {\n if(highlightNodes.size === 0) {\n return \"rgb(100, 100, 100, 1)\"\n } else {\n return highlightNodes.has(node) ? \"purple\" : \"rgb(50, 50, 50, 0.5)\"\n }\n // !node.childLinks.length ? \"green\" : node.collapsed ? \"red\" : \"yellow\"\n }) : undefined\n }\n linkAutoColorBy={physics.colorful ? \"target\" : undefined}\n //linkAutoColorBy={(d) => gData.nodes[d.source].id % GROUPS}\n linkColor={\n !physics.colorful ? (\n (link) => {\n if(highlightLinks.size === 0) {\n return \"rgb(50, 50, 50, 0.8)\"\n } else {\n return highlightLinks.has(link) ? \"purple\" : \"rgb(50, 50, 50, 0.2)\"\n }\n // !node.childLinks.length ? \"green\" : node.collapsed ? \"red\" : \"yellow\"\n }\n ) : undefined\n //highlightLinks.has(link) ? \"purple\" : \"grey\"\n // !node.childLinks.length ? \"green\" : node.collapsed ? \"red\" : \"yellow\"\n }\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={link => highlightLinks.has(link) ? 3 * physics.linkWidth : physics.linkWidth}\n linkOpacity={physics.linkOpacity}\n nodeRelSize={physics.nodeRel}\n nodeVal={node => highlightNodes.has(node) ? node.neighbors.length + 5 : node.neighbors.length + 3}\n linkDirectionalParticleWidth={physics.particleWidth}\n nodeCanvasObject={\n (node, ctx, globalScale) => {\n if(physics.labels) {\n if(globalScale > physics.labelScale || highlightNodes.has(node)) {\n const label = node.title.substring(0, Math.min(node.title.length, 30));\n const fontSize = 12/globalScale;\n ctx.font = `${fontSize}px Sans-Serif`;\n const textWidth = ctx.measureText(label).width;\n const bckgDimensions = [textWidth * 1.1, fontSize].map(n => n + fontSize * 0.5); // some padding\n const fadeFactor = Math.min(3*(globalScale - physics.labelScale)/physics.labelScale, 1);\n\n ctx.fillStyle = 'rgba(20, 20, 20, ' +\n (highlightNodes.size === 0 ? .5 * fadeFactor : (highlightNodes.has(node) ? 0.5 : 0.15 * fadeFactor)) + ')';\n ctx.fillRect(node.x - bckgDimensions[0] / 2, node.y - bckgDimensions[1] / 2, ...bckgDimensions);\n\n ctx.textAlign = 'center';\n ctx.textBaseline = 'middle';\n ctx.fillStyle = 'rgb(255, 255, 255, ' +\n (highlightNodes.size === 0 ? fadeFactor : (highlightNodes.has(node) ? 1 : 0.3 * fadeFactor)) + ')';\n ctx.fillText(label, node.x, node.y);\n\n node.__bckgDimensions = bckgDimensions; // to re-use in nodePointerAreaPaint\n };\n };\n }}\n nodeCanvasObjectMode={()=> 'after'}\n onNodeHover={physics.hover ? handleNodeHover : null}\n //onLinkHover={physics.hover ? handleLinkHover : null}\n d3AlphaDecay={physics.alphaDecay}\n d3AlphaMin={physics.alphaTarget}\n d3VelocityDecay={physics.velocityDecay}\n />\n ) : (\n <ForceGraph3D\n ref={fgRef}\n graphData={gData}\n //graphData={physics.collapse ? prunedTree : gData}\n // nodeAutoColorBy={d => d.id%GROUPS}\n linkWidth={physics.linkWidth}\n linkDirectionalParticles={physics.particles}\n nodeColor={(node) =>\n highlightNodes.has(node) ? \"purple\" : \"grey\"\n // !node.childLinks.length ? \"green\" : node.collapsed ? \"red\" : \"yellow\"\n }\n linkColor={(link) =>\n highlightLinks.has(link) ? \"purple\" : \"grey\"\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={link => highlightLinks.has(link) ? 3 * physics.linkWidth : physics.linkWidth}\n //linkWidth={link => highlightLinks.has(link) ? 3 * physics.linkWidth : physics.linkWidth}\n linkOpacity={physics.linkOpacity}\n nodeRelSize={physics.nodeRel}\n //nodeVal={node => highlightNodes.has(node) ? 10 : 5}\n linkDirectionalParticleWidth={physics.particleWidth}\n backgroundColor=\"#1d1d1d\"\n onNodeHover={physics.hover ? handleNodeHover : null}\n onLinkHover={physics.hover ? handleLinkHover : null}\n d3AlphaDecay={physics.alphaDecay}\n d3AlphaMin={physics.alphaTarget}\n d3VelocityDecay={physics.velocityDecay}\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=\"Gravity\" />\n <Switch style={{ width: \"5\", height: 20, marginVertical: 10 }}\n value={physics.gravityOn}\n onValueChange={() => { setPhysics({ ...physics, gravityOn: !physics.gravityOn })}}\n />\n <Text preset=\"fieldLabel\" text={\"Gravity: \" + physics.gravity} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={0}\n maximumValue={1}\n onValueChange={(value) => { setPhysics({ ...physics, gravity: value }) }}\n value={physics.gravity}\n step={0.01} />\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 <Text preset=\"fieldLabel\" text={\"Alhpa Decay: \" + physics.alphaDecay} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={0}\n maximumValue={1}\n onValueChange={(value) => { setPhysics({ ...physics, alphaDecay: value }) }}\n value={physics.alphaDecay}\n step={.01} />\n <Text preset=\"fieldLabel\" text={\"Alhpa Target: \" + physics.alphaTarget} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={0}\n maximumValue={1}\n onValueChange={(value) => { setPhysics({ ...physics, alphaTarget: value }) }}\n value={physics.alphaTarget}\n step={0.1}\n />\n <Text preset=\"fieldLabel\" text={\"Viscosity: \" + physics.velocityDecay} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={0}\n maximumValue={1}\n onValueChange={(value) => { setPhysics({ ...physics, velocityDecay: value }) }}\n value={physics.velocityDecay}\n step={0.01} />\n </View>,\n },\n {\n title: 'Visual',\n content:\n <View>\n <Text preset=\"fieldLabel\" text=\"Colorful\" />\n <Switch style={{ width: \"5\", height: 20, marginVertical: 10 }}\n value={physics.colorful}\n onValueChange={() => { setPhysics({ ...physics, colorful: !physics.colorful })}}\n />\n <Text preset=\"fieldLabel\" text=\"Hover highlight\" />\n <Switch style={{ width: \"5\", height: 20, marginVertical: 10 }}\n value={physics.hover}\n onValueChange={() => { setPhysics({ ...physics, hover: !physics.hover })}}\n />\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 <Text preset=\"fieldLabel\" text=\"Labels\" />\n <Switch style={{ width: \"5\", height: 20, marginVertical: 10 }}\n value={physics.labels}\n onValueChange={() => { setPhysics({ ...physics, labels: !physics.labels }) }}\n />\n <Text preset=\"fieldLabel\" text={\"Scale when labels become visible: \" + physics.labelScale} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={0.1}\n maximumValue={5}\n onValueChange={(value) => { setPhysics({ ...physics, labelScale: value }) }}\n value={physics.labelScale}\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: -350,\n collision: true,\n linkStrength: .1,\n linkIts: 1,\n collapse: false,\n threedim: false,\n particles: 2,\n linkOpacity: 1,\n linkWidth: 1,\n particleWidth: 4,\n nodeRel: 4,\n labels: true,\n labelScale: 1.5,\n alphaDecay: 0.16,\n alphaTarget: 0.01,\n velocityDecay: 0.25,\n gravity: 0.5,\n gravityOn: true,\n hover: true,\n colorful: true,\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 } 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 }, 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) => {\n let target;\n let source;\n for (let i = 0; i < nodeIds.length; i++) {\n let a = data.nodes[i];\n !a.neighbors && (a.neighbors = []);\n !a.links && (a.links = []);\n if (link.target === nodeIds[i]) {\n //let a = data.nodes[i];\n //!a.neighbors && (a.neighbors = []);\n //a.neighbors.push(a);\n a.links.push(link);\n target=[a, i];\n cleanLinks.push(link);\n } else if (link.source === nodeIds[i]) {\n //let a = data.nodes[i];\n //!a.neighbors && (a.neighbors = []);\n //a.neighbors.push(a);\n a.links.push(link);\n source=[a, i];\n };\n };\n if (target && source) {\n data.nodes[target[1]].neighbors.push(source[0]);\n data.nodes[source[1]].neighbors.push(target[0]);\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":""}
|