summaryrefslogtreecommitdiff
path: root/web-build/static/js/app.e060ef15.chunk.js.map
diff options
context:
space:
mode:
authorKirill Rogovoy <[email protected]>2021-07-20 21:24:52 +0300
committerKirill Rogovoy <[email protected]>2021-07-20 21:24:52 +0300
commit5f4611d65e40eae3ca6191a15f68d69ea5a1c4cb (patch)
tree273dfc086444533d86d580961c92ba8d14781a67 /web-build/static/js/app.e060ef15.chunk.js.map
parentf0bf4e7afdcd8b02a62be45ab3e7d047ed865a79 (diff)
WIP
Diffstat (limited to 'web-build/static/js/app.e060ef15.chunk.js.map')
-rw-r--r--web-build/static/js/app.e060ef15.chunk.js.map1
1 files changed, 0 insertions, 1 deletions
diff --git a/web-build/static/js/app.e060ef15.chunk.js.map b/web-build/static/js/app.e060ef15.chunk.js.map
deleted file mode 100644
index 49b66be..0000000
--- a/web-build/static/js/app.e060ef15.chunk.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"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/components/local-button/local-button.tsx","app/components/graph-ui/graph-ui.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","web-build/register-service-worker.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","setPhysics","threeDim","local","setThreeDim","setLocal","fgRef","flatten","useRef","useEffect","fg","current","gravityOn","d3Force","d3","strength","gravity","galaxy","linkStrength","iterations","linkIts","collision","radius","charge","useCallback","node","collapsed","setPrunedTree","getPrunedTree","Set","highlightNodes","setHighlightNodes","highlightLinks","setHighlightLinks","setHoverNode","updateHighlight","handleBackgroundClick","event","setSelectedNode","handleNodeHover","console","log","selectedNode","add","neighbors","forEach","neighbor","links","d3ReheatSimulation","doubleClick","setDoubleClick","nodes","localGraphData","setLocalGraphData","length","getLocalGraphData","g","push","neighborLink","targetNode","targetIndex","sourceNode","sourceIndex","id","selectClick","window","open","timeStamp","ref","graphData","nodeColor","colorful","index","size","has","linkColor","linkDirectionalParticles","particles","nodeLabel","title","linkWidth","linkOpacity","nodeRelSize","nodeRel","nodeVal","linkDirectionalParticleWidth","particleWidth","onNodeHover","hover","d3AlphaDecay","alphaDecay","d3AlphaMin","alphaTarget","d3VelocityDecay","velocityDecay","nodeThreeObject","labels","sprite","SpriteText","substring","textHeight","nodeThreeObjectExtend","onNodeClick","onBackgroundClick","nodeCanvasObject","ctx","globalScale","labelScale","label","Math","min","font","bckgDimensions","measureText","map","n","fadeFactor","fillStyle","fillRect","x","y","textBaseline","fillText","__bckgDimensions","nodeCanvasObjectMode","Tweaks","trackColor","false","true","switch","onValueChange","minimumTrackTintColor","maximumTrackTintColor","thumbTintColor","slider","minimumValue","maximumValue","step","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","display","maxWidth","borderStyle","maxHeight","marginBottom","paddingLeft","selectors","selector","activeSelector","selectTitle","multipleToggle","marginVertical","multipleToggle__title","LocalButton","bowserLogo","FULL","TEXT","BOLD","HEADER","HEADER_TITLE","letterSpacing","TITLE_WRAPPER","ALMOST","fontStyle","BOWSER","alignSelf","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","useMemo","tron","logImportant","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","nodeIds","setNodeIds","physicsInit","rootId","timer","clearTimeout","setTimeout","jsonVal","storeData","valueJson","Object","keys","getData","then","axios","dataa","nods","temp","i","getNodesById","cleanData","cleanLinks","j","target","sanitizeGraph","catch","e","Stack","createStackNavigator","MainNavigator","Navigator","screenOptions","cardStyle","headerShown","component","exitRoutes","canExit","routeName","RootStack","RootNavigator","forwardRef","NavigationContainer","displayName","RootNavigation","resetRoot","state","getRootState","getActiveRouteName","route","routes","ToggleStorybook","StorybookUIRoot","queryParams","__DEV__","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","navigator","serviceWorker","register","scope","info","module","exports"],"mappings":"uwDAQO,SAASA,EAAUC,EAAgBC,GACxC,OAAOD,EAAME,IAAKC,EAAEH,EAAKC,GAAW,KCJtCC,IAAKE,WAAY,EACjBF,IAAKG,aAAe,CAAEC,KAAIC,MAE1BL,IAAKM,OAASC,KAAuB,K,OCDrCC,EAAOC,WAAW,CAChB,mB,8CCDK,SAAeC,EAAWZ,GAA1B,SAAAa,EAAAC,OAAA,2EAAAD,EAAA,MAEUE,IAAaC,QAAQhB,IAF/B,iGAKI,MALJ,+DAeA,SAAeiB,EAAWjB,EAAakB,GAAvC,SAAAL,EAAAC,OAAA,2EAAAD,EAAA,MAEGE,IAAaI,QAAQnB,EAAKkB,IAF7B,iCAGI,GAHJ,0DAKI,GALJ,+DAcA,SAAeE,EAAKpB,GAApB,eAAAa,EAAAC,OAAA,2EAAAD,EAAA,MAEuBE,IAAaC,QAAQhB,IAF5C,cAEGqB,EAFH,yBAGIC,KAAKC,MAAMF,IAHf,yDAKI,MALJ,gEAeA,SAAeG,EAAKxB,EAAakB,GAAjC,SAAAL,EAAAC,OAAA,2EAAAD,EAAA,MAEGE,IAAaI,QAAQnB,EAAKsB,KAAKG,UAAUP,KAF5C,iCAGI,GAHJ,0DAKI,GALJ,+DAcA,SAAeQ,EAAO1B,GAAtB,SAAAa,EAAAC,OAAA,2EAAAD,EAAA,MAEGE,IAAaY,WAAW3B,IAF3B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AKqiB,EAAgBzB,IAgBG+B,eAAcL,0BEhFYQ,CAC1D/F,EAZsC,oBAWhCuF,EAAR,EAAQA,uBAAwBM,EAAhC,EAAgCA,wBAiBhC,OAXA1X,qBAAU,WACN,EAAA7L,EAAAC,OAAA,kEAAAD,EAAA,MClDmB,EAAAA,EAAAC,OAAA,sGDkDnB,OAEAwd,KAAiB8B,KAAK+C,GAFtB,8DAID,IAME3E,EAIH,kBAAC,GAAD,KACE,kBAACP,GAAD,CAAmB/c,MAAOsd,GACxB,kBAAC,IAAD,CAAkB+F,eAAgBC,KAChC,kBAAC1C,GAAD,CACEzR,IAAK6S,EACLuB,aAAcX,EACdY,cAAeN,OAVF,M,UE1DzBO,aAAsB1B,IACPA,Q,sECHX,kBAAmB2B,WACrB1U,OAAOwT,iBAAiB,QAAQ,WAC9BkB,UAAUC,cACPC,SAAS,0BAA2B,CAAEC,MAAO,MAC7C3E,MAAK,SAAU4E,OAGfhE,OAAM,SAAUje,GACf0L,QAAQuW,KAAK,oCAAqCjiB,U,kBCV1DkiB,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.e060ef15.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\";\nimport rando from \"../../data/rando.json\"\n\nimport { ForceGraph2D, ForceGraph3D, ForceGraphVR, ForceGraphAR } from \"react-force-graph\"\nimport * as d3 from \"d3-force-3d\"\n//import * as three from \"three\"\nimport SpriteText from \"three-spritetext\"\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 setPhysics\n nodeIds: string[]\n threeDim\n setThreeDim\n local\n setLocal\n}\n\n/**\n * Describe your component here\n */\nexport const Graph = observer(function Graph(props: GraphProps): JSX.Element {\n const { style, physics, setPhysics, gData, threeDim, setThreeDim, local, setLocal } = 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 if (threeDim) {\n if (physics.galaxy) {\n fg.d3Force(\"x\", d3.forceX().strength(physics.gravity / 5))\n fg.d3Force(\"z\", d3.forceZ().strength(physics.gravity / 5))\n } else {\n fg.d3Force(\"x\", d3.forceX().strength(physics.gravity))\n fg.d3Force(\"z\", d3.forceZ().strength(physics.gravity))\n }\n } else {\n fg.d3Force(\"z\", null)\n }\n } else {\n fg.d3Force(\"x\", null)\n fg.d3Force(\"y\", null)\n 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\n /* const nodesById = useMemo(() => {\n * const nodesById = Object.fromEntries(gData.nodes.map((node) => [node.index, node]))\n * console.log(nodesById)\n * // link parent/children\n * gData.nodes.forEach((node) => {\n * typeof physics.rootId === \"number\"\n * ? (node.collapsed = node.index !== physics.rootId)\n * : (node.collapsed = node.id !== physics.rootId)\n * node.childLinks = []\n * })\n * gData.links.forEach((link) => nodesById[link.sourceIndex].childLinks.push(link))\n * return nodesById\n * }, [gData])\n * const getPrunedTree = useCallback(() => {\n * const visibleNodes = []\n * const visibleLinks = []\n * ;(function traverseTree(node = nodesById[physics.rootId]) {\n * visibleNodes.push(node)\n * if (node.collapsed) return\n * visibleLinks.push(...node.childLinks)\n * node.childLinks\n * .map((link) =>\n * typeof link.targetIndex === \"object\" ? link.targetIndex : nodesById[link.targetIndex],\n * ) // get child node\n * .forEach(traverseTree)\n * })()\n\n * return { nodes: visibleNodes, links: visibleLinks }\n * }, [nodesById])\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 //highlighting\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 handleBackgroundClick = (event) => {\n highlightNodes.clear()\n highlightLinks.clear()\n\n setSelectedNode(null)\n updateHighlight()\n }\n\n const handleNodeHover = (node) => {\n console.log(\"hover\")\n if (!selectedNode) {\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\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 // Normally the graph doesn't update when you just change the physics parameters\n // This forces the graph to make a small update when you do\n useEffect(() => {\n fgRef.current.d3ReheatSimulation()\n }, [physics])\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}\nlinkWidth={link => highlightLinks.has(link) ? 5 : 1}\nlinkDirectionalParticles={4}\nlinkDirectionalParticleWidth={link => highlightLinks.has(link) ? 4 : 0}\nnodeCanvasObjectMode={node => highlightNodes.has(node) ? 'before' : undefined}\nnodeCanvasObject={paintRing}\nonNodeHover={handleNodeHover}\nonLinkHover={handleLinkHover}\n nodeRelSize={NODE_R} */\n\n //nodeColor={(node) =>\n // !node.childLinks.length ? \"green\" : node.collapsed ? \"red\" : \"yellow\"\n //}\n\n const [selectedNode, setSelectedNode] = useState({})\n\n //shitty handler to check for doubleClicks\n const [doubleClick, setDoubleClick] = useState(0)\n const [localGraphData, setLocalGraphData] = useState({ nodes: [], links: [] })\n\n useEffect(() => {\n localGraphData.nodes.length && !local && setLocal(true)\n }, [localGraphData])\n\n const getLocalGraphData = (node) => {\n console.log(localGraphData)\n localGraphData.nodes.length ? setLocalGraphData({ nodes: [], links: [] }) : null\n let g = localGraphData\n console.log(g.nodes)\n if (!node.local) {\n g = { nodes: [], links: [] }\n console.log(\"length is 0\")\n node.local = true //keep track of these boys\n g.nodes.push(node) //only add the clicked node if its the first\n }\n node.links.length &&\n node.links.forEach((neighborLink) => {\n if (!neighborLink.local) {\n console.log(\"0\")\n neighborLink.local = true\n g.links.push(neighborLink)\n console.log(neighborLink)\n const targetNode = gData.nodes[neighborLink.targetIndex]\n const sourceNode = gData.nodes[neighborLink.sourceIndex]\n if (targetNode.id !== sourceNode.id) {\n if (targetNode.id === node.id) {\n console.log(\"1. I am the target, the source is \")\n console.log(sourceNode)\n if (!sourceNode.local) {\n console.log(\"2. The source is not local\")\n sourceNode.local = true\n g.nodes.push(sourceNode)\n } else {\n console.log(\"2.5 The source is already local\")\n }\n } else {\n console.log(\"3. I am the source\")\n if (!targetNode.local) {\n console.log(\"4. The target is not local.\")\n targetNode.local = true\n g.nodes.push(targetNode)\n } else {\n console.log(\"The target is already local\")\n }\n }\n }\n }\n })\n setLocalGraphData(g)\n }\n\n const selectClick = (node, event) => {\n window.open('org-protocol://roam-node?node=' + node.id, '_self');\n highlightNodes.clear()\n highlightLinks.clear()\n console.log(localGraphData)\n if (event.timeStamp - doubleClick < 400) {\n getLocalGraphData(node)\n }\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 setSelectedNode(node || null)\n updateHighlight()\n setDoubleClick(event.timeStamp)\n }\n\n useEffect(()=>{\n if(local && selectedNode) {\n getLocalGraphData(selectedNode)\n }\n }, [local])\n return (\n <View style={style}>\n {!threeDim ? (\n <ForceGraph2D\n ref={fgRef}\n //autoPauseRedraw={false}\n //graphData={gData}\n graphData={local ? localGraphData : gData}\n //nodeAutoColorBy={physics.colorful ? (node)=>node.index%GROUPS : 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) ? \"#a991f1\" : \"rgb(50, 50, 50, 0.5)\"\n }\n }\n : (node) => {\n if (node.neighbors.length === 1 || node.neighbors.length === 2) {\n return [\n \"#ff665c\",\n \"#e69055\",\n \"#7bc275\",\n \"#4db5bd\",\n \"#FCCE7B\",\n \"#51afef\",\n \"#1f5582\",\n \"#C57BDB\",\n \"#a991f1\",\n \"#5cEfFF\",\n \"#6A8FBF\",\n ][node.neighbors[0].index % 11]\n } else {\n return [\n \"#ff665c\",\n \"#e69055\",\n \"#7bc275\",\n \"#4db5bd\",\n \"#FCCE7B\",\n \"#51afef\",\n \"#1f5582\",\n \"#C57BDB\",\n \"#a991f1\",\n \"#5cEfFF\",\n \"#6A8FBF\",\n ][node.index % 11]\n }\n }\n }\n //linkAutoColorBy={physics.colorful ? ((d) => gData.nodes[d.sourceIndex].id % GROUPS) : undefined}\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) ? \"#a991f1\" : \"rgb(50, 50, 50, 0.2)\"\n }\n }\n : (link) =>\n [\n \"#ff665c\",\n \"#e69055\",\n \"#7bc275\",\n \"#4db5bd\",\n \"#FCCE7B\",\n \"#51afef\",\n \"#1f5582\",\n \"#C57BDB\",\n \"#a991f1\",\n \"#5cEfFF\",\n \"#6A8FBF\",\n ][gData.nodes[link.sourceIndex].index % 11]\n }\n linkDirectionalParticles={physics.particles}\n onNodeClick={selectClick}\n nodeLabel={(node) => node.title}\n linkWidth={(link) =>\n highlightLinks.has(link) ? 3 * physics.linkWidth : physics.linkWidth\n }\n linkOpacity={physics.linkOpacity}\n nodeRelSize={physics.nodeRel}\n nodeVal={(node) => {\n return highlightNodes.has(node) ? node.neighbors.length + 5 : node.neighbors.length + 3\n }}\n linkDirectionalParticleWidth={physics.particleWidth}\n nodeCanvasObject={(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(\n (3 * (globalScale - physics.labelScale)) / physics.labelScale,\n 1,\n )\n\n ctx.fillStyle =\n \"rgba(20, 20, 20, \" +\n (highlightNodes.size === 0\n ? 0.5 * fadeFactor\n : highlightNodes.has(node)\n ? 0.5\n : 0.15 * fadeFactor) +\n \")\"\n ctx.fillRect(\n node.x - bckgDimensions[0] / 2,\n node.y - bckgDimensions[1] / 2,\n ...bckgDimensions,\n )\n\n ctx.textAlign = \"center\"\n ctx.textBaseline = \"middle\"\n ctx.fillStyle =\n \"rgb(255, 255, 255, \" +\n (highlightNodes.size === 0\n ? fadeFactor\n : highlightNodes.has(node)\n ? 1\n : 0.3 * fadeFactor) +\n \")\"\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 onBackgroundClick={handleBackgroundClick}\n backgroundColor={\"#242730\"}\n />\n ) : (\n <ForceGraph3D\n ref={fgRef}\n graphData={!local ? gData : localGraphData}\n //graphData={gData}\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 }\n : (node) => {\n if (node.neighbors.length === 1 || node.neighbors.length === 2) {\n return [\n \"#ff665c\",\n \"#e69055\",\n \"#7bc275\",\n \"#4db5bd\",\n \"#FCCE7B\",\n \"#51afef\",\n \"#1f5582\",\n \"#C57BDB\",\n \"#a991f1\",\n \"#5cEfFF\",\n \"#6A8FBF\",\n ][node.neighbors[0].index % 11]\n } else {\n return [\n \"#ff665c\",\n \"#e69055\",\n \"#7bc275\",\n \"#4db5bd\",\n \"#FCCE7B\",\n \"#51afef\",\n \"#1f5582\",\n \"#C57BDB\",\n \"#a991f1\",\n \"#5cEfFF\",\n \"#6A8FBF\",\n ][node.index % 11]\n }\n }\n }\n //linkAutoColorBy={physics.colorful ? ((d) => gData.nodes[d.sourceIndex].id % GROUPS) : undefined}\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 }\n : (link) =>\n [\n \"#ff665c\",\n \"#e69055\",\n \"#7bc275\",\n \"#4db5bd\",\n \"#FCCE7B\",\n \"#51afef\",\n \"#1f5582\",\n \"#C57BDB\",\n \"#a991f1\",\n \"#5cEfFF\",\n \"#6A8FBF\",\n ][gData.nodes[link.sourceIndex].index % 11]\n }\n linkDirectionalParticles={physics.particles}\n nodeLabel={(node) => node.title}\n linkWidth={(link) =>\n highlightLinks.has(link) ? 3 * physics.linkWidth : physics.linkWidth\n }\n linkOpacity={physics.linkOpacity}\n nodeRelSize={physics.nodeRel}\n nodeVal={(node) =>\n highlightNodes.has(node) ? node.neighbors.length * 3 : node.neighbors.length * 2\n }\n linkDirectionalParticleWidth={physics.particleWidth}\n onNodeHover={physics.hover ? handleNodeHover : null}\n d3AlphaDecay={physics.alphaDecay}\n d3AlphaMin={physics.alphaTarget}\n d3VelocityDecay={physics.velocityDecay}\n nodeThreeObject={\n !physics.labels\n ? undefined\n : (node) => {\n if (highlightNodes.has(node)) {\n console.log(node.title)\n const sprite = new SpriteText(node.title.substring(0, 30))\n console.log(\"didnt crash here 2\")\n sprite.color = \"#ffffff\"\n sprite.textHeight = 8\n return sprite\n } else {\n return undefined\n }\n }\n }\n nodeThreeObjectExtend={true}\n onNodeClick={selectClick}\n onBackgroundClick={handleBackgroundClick}\n backgroundColor={\"#242730\"}\n />\n )}\n </View>\n )\n})\n","import * as React from \"react\"\nimport {\n ScrollView,\n StyleProp,\n TextStyle,\n TouchableOpacity,\n View,\n ViewStyle,\n StyleSheet,\n Button,\n} 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\"\nimport {Switch} from \"react-native-elements\"\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\n color=\"#a991f1\"\n trackColor={{\n false: \"#62686E\",\n true: \"#a991f1\"\n }}\n style={styles.switch}\n value={physics.gravityOn}\n onValueChange={() => {\n setPhysics({ ...physics, gravityOn: !physics.gravityOn })\n }}\n />\n <Text preset=\"fieldLabel\" text={\"Gravity: \" + physics.gravity} />\n <Slider\n minimumTrackTintColor=\"#a991f1\"\n maximumTrackTintColor=\"#242730\"\n thumbTintColor=\"#a991f1\"\n style={styles.slider}\n minimumValue={0}\n maximumValue={1}\n onValueChange={(value) => {\n setPhysics({ ...physics, gravity: value })\n }}\n value={physics.gravity}\n step={0.01}\n />\n <Text preset=\"fieldLabel\" text={\"Repulsive force: \" + physics.charge} />\n <Slider\n minimumTrackTintColor=\"#a991f1\"\n maximumTrackTintColor=\"#242730\"\n thumbTintColor=\"#a991f1\"\n style={styles.slider}\n minimumValue={-400}\n maximumValue={100}\n onValueChange={(value) => {\n setPhysics({ ...physics, charge: value })\n }}\n value={physics.charge}\n step={1}\n />\n <Text preset=\"fieldLabel\" text={\"Link Force: \" + physics.linkStrength} />\n <Slider\n minimumTrackTintColor=\"#a991f1\"\n maximumTrackTintColor=\"#242730\"\n thumbTintColor=\"#a991f1\"\n style={styles.slider}\n minimumValue={0}\n maximumValue={2}\n onValueChange={(value) => {\n setPhysics({ ...physics, linkStrength: value })\n }}\n value={physics.linkStrength}\n step={0.01}\n />\n <Text preset=\"fieldLabel\" text={\"'Link Iterations': \" + physics.linkIts} />\n <Slider\n minimumTrackTintColor=\"#a991f1\"\n maximumTrackTintColor=\"#242730\"\n thumbTintColor=\"#a991f1\"\n style={styles.slider}\n minimumValue={1}\n maximumValue={10}\n onValueChange={(value) => {\n setPhysics({ ...physics, linkIts: value })\n }}\n value={physics.linkIts}\n step={1}\n />\n <Text preset=\"fieldLabel\" text=\"Collision\" />\n <Switch\n color=\"#a991f1\"\n trackColor={{\n false: \"#62686E\",\n true: \"#a991f1\"\n }}\n style={styles.switch}\n value={physics.collision}\n onValueChange={() => {\n setPhysics({ ...physics, collision: !physics.collision })\n }}\n />\n <Text preset=\"fieldLabel\" text={\"Alpha Decay: \" + physics.alphaDecay} />\n <Slider\n style={styles.slider}\n minimumTrackTintColor=\"#a991f1\"\n maximumTrackTintColor=\"#242730\"\n thumbTintColor=\"#a991f1\"\n minimumValue={0}\n maximumValue={1}\n onValueChange={(value) => {\n setPhysics({ ...physics, alphaDecay: value })\n }}\n value={physics.alphaDecay}\n step={0.01}\n />\n <Text preset=\"fieldLabel\" text={\"Alhpa Target: \" + physics.alphaTarget} />\n <Slider\n minimumTrackTintColor=\"#a991f1\"\n maximumTrackTintColor=\"#242730\"\n thumbTintColor=\"#a991f1\"\n style={styles.slider}\n minimumValue={0}\n maximumValue={1}\n onValueChange={(value) => {\n setPhysics({ ...physics, alphaTarget: value })\n }}\n value={physics.alphaTarget}\n step={0.1}\n />\n <Text preset=\"fieldLabel\" text={\"Viscosity: \" + physics.velocityDecay} />\n <Slider\n minimumTrackTintColor=\"#a991f1\"\n maximumTrackTintColor=\"#242730\"\n thumbTintColor=\"#a991f1\"\n style={styles.slider}\n minimumValue={0}\n maximumValue={1}\n onValueChange={(value) => {\n setPhysics({ ...physics, velocityDecay: value })\n }}\n value={physics.velocityDecay}\n step={0.01}\n />\n <Text preset=\"fieldLabel\" text={\"Galaxy Mode (3D-only)\"} />\n <Switch\n color=\"#a991f1\"\n trackColor={{\n false: \"#62686E\",\n true: \"#a991f1\"\n }}\n style={styles.switch}\n value={physics.galaxy}\n onValueChange={() => {\n setPhysics({ ...physics, galaxy: !physics.galaxy })\n }}\n />\n </View>\n ),\n },\n {\n title: \"Visual\",\n content: (\n <View>\n <Text preset=\"fieldLabel\" text=\"Colorful\" />\n <Switch\n color=\"#a991f1\"\n trackColor={{\n false: \"#62686E\",\n true: \"#a991f1\"\n }}\n style={styles.switch}\n value={physics.colorful}\n onValueChange={() => {\n setPhysics({ ...physics, colorful: !physics.colorful })\n }}\n />\n <Text preset=\"fieldLabel\" text=\"Hover highlight\" />\n <Switch\n color=\"#a991f1\"\n trackColor={{\n false: \"#62686E\",\n true: \"#a991f1\"\n }}\n style={styles.switch}\n value={physics.hover}\n onValueChange={() => {\n setPhysics({ ...physics, hover: !physics.hover })\n }}\n />\n <Text preset=\"fieldLabel\" text={\"Line Opacity: \" + physics.linkOpacity} />\n <Slider\n minimumTrackTintColor=\"#a991f1\"\n maximumTrackTintColor=\"#242730\"\n thumbTintColor=\"#a991f1\"\n style={styles.slider}\n minimumValue={0}\n maximumValue={1}\n onValueChange={(value) => {\n setPhysics({ ...physics, linkOpacity: value })\n }}\n value={physics.linkOpacity}\n step={0.01}\n />\n <Text preset=\"fieldLabel\" text={\"Line width: \" + physics.linkWidth} />\n <Slider\n minimumTrackTintColor=\"#a991f1\"\n maximumTrackTintColor=\"#242730\"\n thumbTintColor=\"#a991f1\"\n style={styles.slider}\n minimumValue={0.1}\n maximumValue={10}\n onValueChange={(value) => {\n setPhysics({ ...physics, linkWidth: value })\n }}\n value={physics.linkWidth}\n step={0.1}\n />\n <Text preset=\"fieldLabel\" text={\"Node size: \" + physics.nodeRel} />\n <Slider\n minimumTrackTintColor=\"#a991f1\"\n maximumTrackTintColor=\"#242730\"\n thumbTintColor=\"#a991f1\"\n style={styles.slider}\n minimumValue={1}\n maximumValue={10}\n onValueChange={(value) => {\n setPhysics({ ...physics, nodeRel: value })\n }}\n value={physics.nodeRel}\n step={0.01}\n />\n <Text preset=\"fieldLabel\" text={\"Particles: \" + physics.particles} />\n <Slider\n minimumTrackTintColor=\"#a991f1\"\n maximumTrackTintColor=\"#242730\"\n thumbTintColor=\"#a991f1\"\n style={styles.slider}\n minimumValue={0}\n maximumValue={10}\n onValueChange={(value) => {\n setPhysics({ ...physics, particles: value })\n }}\n value={physics.particles}\n step={1}\n />\n <Text preset=\"fieldLabel\" text={\"Particle Size: \" + physics.particleWidth} />\n <Slider\n minimumTrackTintColor=\"#a991f1\"\n maximumTrackTintColor=\"#242730\"\n thumbTintColor=\"#a991f1\"\n style={styles.slider}\n minimumValue={1}\n maximumValue={10}\n onValueChange={(value) => {\n setPhysics({ ...physics, particleWidth: value })\n }}\n value={physics.particleWidth}\n step={0.1}\n />\n <Text preset=\"fieldLabel\" text=\"Labels\" />\n <Switch\n color=\"#a991f1\"\n trackColor={{\n false: \"#62686E\",\n true: \"#a991f1\"\n }}\n style={styles.switch}\n value={physics.labels}\n onValueChange={() => {\n setPhysics({ ...physics, labels: !physics.labels })\n }}\n />\n <Text\n preset=\"fieldLabel\"\n text={\"Scale when labels become visible: \" + physics.labelScale}\n />\n <Slider\n minimumTrackTintColor=\"#a991f1\"\n maximumTrackTintColor=\"#242730\"\n thumbTintColor=\"#a991f1\"\n style={styles.slider}\n minimumValue={0.1}\n maximumValue={5}\n onValueChange={(value) => {\n setPhysics({ ...physics, labelScale: value })\n }}\n value={physics.labelScale}\n step={0.1}\n />\n </View>\n ),\n },\n {\n title: \"Modes\",\n content: (\n <View>\n </View>\n ),\n },\n ]\n\n const [activeSections, setActiveSections] = useState([])\n\n const setSections = (sections) => {\n setActiveSections(sections.includes(undefined) ? [] : sections)\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: \"#2a2e38\" }}>\n <TouchableOpacity\n style={{\n width: 30,\n color: \"#a991f1\",\n textAlign: \"center\",\n marginLeft: \"auto\",\n padding: 5,\n }}\n onPress={() => {\n setTweaks(false)\n }}\n >\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 </ScrollView>\n </View>\n )\n } else {\n return (\n <TouchableOpacity\n onPress={() => {\n setTweaks(true)\n }}\n style={{\n position: \"absolute\",\n top: 50,\n left: 50,\n width: 30,\n color: \"#ffffff\",\n zIndex: 100,\n }}\n >\n <Icon name=\"cog\" color=\"#ffffff\" size={30} />\n </TouchableOpacity>\n )\n }\n } else {\n return (\n <View\n style={{\n position: \"absolute\",\n top: \"5%\",\n left: \"5%\",\n zIndex: 100,\n width: 300,\n backgroundColor: \"#000000\",\n padding: 20,\n }}\n >\n <Text preset=\"bold\" text=\"Physics\" />\n <Text preset=\"fieldLabel\" text={\"Repulsive force: \" + physics.charge} />\n <Slider\n minimumTrackTintColor=\"#a991f1\"\n maximumTrackTintColor=\"#242730\"\n thumbTintColor=\"#a991f1\"\n style={styles.slider}\n minimumValue={-400}\n maximumValue={100}\n onValueChange={(value) => {\n setPhysics({ ...physics, charge: value })\n }}\n value={physics.charge}\n step={1}\n />\n <Text preset=\"fieldLabel\" text={\"Link Force: \" + physics.linkStrength} />\n <Slider\n minimumTrackTintColor=\"#a991f1\"\n maximumTrackTintColor=\"#242730\"\n thumbTintColor=\"#a991f1\"\n style={styles.slider}\n minimumValue={0}\n maximumValue={2}\n onValueChange={(value) => {\n setPhysics({ ...physics, linkStrength: value })\n }}\n value={physics.linkStrength}\n step={0.1}\n />\n <Text preset=\"fieldLabel\" text={\"'Link Iterations': \" + physics.linkIts} />\n <Slider\n minimumTrackTintColor=\"#a991f1\"\n maximumTrackTintColor=\"#242730\"\n thumbTintColor=\"#a991f1\"\n style={styles.slider}\n minimumValue={1}\n maximumValue={10}\n onValueChange={(value) => {\n setPhysics({ ...physics, linkIts: value })\n }}\n value={physics.linkIts}\n step={1}\n />\n <Text preset=\"fieldLabel\" text=\"Collision\" />\n <Switch\n color=\"#a991f1\"\n trackColor={{\n false: \"#62686E\",\n true: \"#a991f1\"\n }}\n style={styles.switch}\n value={physics.collision}\n onValueChange={() => {\n setPhysics({ ...physics, collision: !physics.collision })\n }}\n />\n <Text preset=\"bold\" text=\"Visual\" />\n <Text preset=\"fieldLabel\" text={\"Particles: \" + physics.particles} />\n <Slider\n minimumTrackTintColor=\"#a991f1\"\n maximumTrackTintColor=\"#242730\"\n thumbTintColor=\"#a991f1\"\n style={styles.slider}\n minimumValue={0}\n maximumValue={5}\n onValueChange={(value) => {\n setPhysics({ ...physics, particles: value })\n }}\n value={physics.particles}\n step={1}\n />\n <Text preset=\"bold\" text=\"Modes\" />\n <Text preset=\"fieldLabel\" text=\"Expandable Graph\" />\n <Switch\n color=\"#a991f1\"\n trackColor={{\n false: \"#62686E\",\n true: \"#a991f1\"\n }}\n style={styles.switch}\n value={physics.collapse}\n onValueChange={() => {\n setPhysics({ ...physics, collapse: !physics.collapse })\n }}\n />\n <Text preset=\"fieldLabel\" text=\"3D\" />\n <Switch\n color=\"#a991f1\"\n trackColor={{\n false: \"#62686E\",\n true: \"#a991f1\"\n }}\n style={styles.switch}\n value={physics.threedim}\n onValueChange={() => {\n setPhysics({ ...physics, threedim: !physics.threedim })\n }}\n />\n </View>\n )\n }\n})\n\nconst styles = StyleSheet.create({\n container: {\n display: \"flex\",\n backgroundColor: \"#2a2e38\",\n position: \"absolute\",\n zIndex: 5,\n marginLeft: \"2%\",\n marginTop: \"2%\",\n maxWidth: 275,\n borderRadius: 10,\n borderStyle: \"solid\",\n borderWidth: 10,\n borderColor: \"#2a2e38\",\n maxHeight: \"80%\",\n paddingBottom: 20,\n },\n title: {\n textAlign: \"left\",\n fontSize: 22,\n fontWeight: \"300\",\n marginBottom: 20,\n paddingLeft: 10,\n },\n header: {\n backgroundColor: \"#2a2e38\",\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: \"#2a2e38\",\n },\n inactive: {\n backgroundColor: \"#2a2e38\",\n },\n selectors: {\n marginBottom: 10,\n flexDirection: \"row\",\n justifyContent: \"center\",\n },\n selector: {\n backgroundColor: \"#2a2e38\",\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 slider: {\n minimumTrackTintColor: \"#a991f1\",\n thumbTintColor: \"#a991f1\",\n height: 40,\n width: \"90%\",\n },\n switch: {\n width: \"5\",\n height: 20,\n marginVertical: 10,\n },\n})\n","import * as React 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\"\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 LocalButtonProps {\n /**\n * An optional style override useful for padding & margin.\n */\n style?: StyleProp<ViewStyle>\n local\n setLocal\n}\n\n/**\n * Describe your component here\n */\nexport const LocalButton = observer(function LocalButton(props: LocalButtonProps) {\n const { style, local, setLocal } = props\n const styles = flatten([CONTAINER, style])\n\n return (\n <View style={[style, { height: 50, width: 150}]}>\n <Icon.Button name={!local ? \"graph-outline\": \"graph\"} backgroundColor=\"#a991f1\"\n onPress={()=>{setLocal(!local)}}\n size={30}\n style={{textAlign: 'center'}}>\n {!local ? \"Global Graph\" : \"Local Graph\"}\n </Icon.Button>\n </View>\n )\n})\n","import * as React from \"react\"\nimport { StyleProp, TextStyle, View, ViewStyle } from \"react-native\"\nimport { observer } from \"mobx-react-lite\"\nimport { color, typography } from \"../../theme\"\nimport { LocalButton, Text, Tweaks } from \"../\"\nimport { flatten } from \"ramda\"\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 GraphUiProps {\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 GraphUi = observer(function GraphUi(props: GraphUiProps) {\n const { style, physics, setPhysics } = props\n const styles = flatten([CONTAINER, style])\n\n return (\n <View style={{height: \"100%\", width: \"100%\", borderStyle: \"solid\", borderWidth: 5,position:\"relative\"}}>\n <Tweaks physics={physics} setPhysics={setPhysics} />\n <LocalButton physics={physics} setPhysics={setPhysics}/>\n </View>\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 { TouchableOpacity, View, 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\nimport { LocalButton } from \"../../components/\"\nimport { GraphUi } from \"../../components/graph-ui/graph-ui\"\nimport { Switch } from \"react-native-elements\"\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 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: 0.1,\n linkIts: 1,\n particles: 2,\n linkOpacity: 0.4,\n linkWidth: 1,\n particleWidth: 4,\n nodeRel: 4,\n labels: true,\n labelScale: 1.5,\n alphaDecay: 0.16,\n alphaTarget: 0,\n velocityDecay: 0.25,\n gravity: 0.5,\n gravityOn: true,\n hover: true,\n colorful: true,\n galaxy: true,\n rootId: 0,\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 valueJson.local=false;\n return valueJson\n } else {\n return physicsInit\n }\n } else {\n return physicsInit\n }\n } catch (e) {\n console.log(e)\n }\n }\n const storeData = async (value) => {\n try {\n let jsonVal = JSON.stringify(value)\n console.log(jsonVal + \" \" + value)\n await AsyncStorage.setItem(\"@physics\", jsonVal)\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 }, 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) => {\n const cleanLinks = []\n data.links.forEach((link, j) => {\n let target\n let source\n for (let i = 0; i < data.nodes.length; i++) {\n let a = data.nodes[i]\n !a.neighbors && (a.neighbors = [])\n !a.links && (a.links = [])\n // the first time around,\n // index the node as not a part of the local graph\n !j && (a.local=false);\n if (link.target === data.nodes[i].id) {\n a.links.push(link)\n target = [a, i]\n link.target === link.source ? null : cleanLinks.push(link)\n } else if (link.source === data.nodes[i].id) {\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 link.sourceIndex = source[1]\n link.targetIndex = target[1]\n link.index = [j]\n link.local = false;\n }\n })\n data.links = cleanLinks;\n return data;\n }\n\n const getNodesById = (data) => {\n let temp = []\n data.nodes.forEach((node, i) => {\n temp.push(node.id)\n node.index = i\n })\n setNodeIds(temp)\n\n return temp\n }\n\n useEffect(() => {\n getData().then((data) => setPhysics(data))\n axios\n .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)\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\n const [threeDim, setThreeDim] = useState(false);\n const [local, setLocal] = useState(false);\n\n if (!graphData) {\n return null\n } else {\n return (\n <Screen style={ROOT} preset=\"fixed\">\n <View style={{display: \"flex\", flexDirection: \"row\", height: \"100%\", width: \"100%\",position: \"absolute\", zIndex:150}}>\n <Tweaks physics={physics} setPhysics={setPhysics} />\n <View style={{marginLeft: \"auto\", marginRight:\"2%\", marginTop: \"2%\", zIndex: 5, position: \"relative\", height: \"15%\" }}>\n <LocalButton local={local} setLocal={setLocal} />\n <View style={{display: \"flex\", flexDirection: \"row\", alignItems: \"center\",justifyContent: \"center\", paddingTop: \"2%\"}}>\n <Text preset=\"header\" text=\"3D\" style={{marginLeft: 10}} />\n <Switch\n color=\"#a991f1\"\n trackColor={{\n false: \"#62686E\",\n true: \"#a991f1\"\n }}\n style={{\n height: 25,\n marginVertical: 10,\n marginLeft: 20}}\n value={threeDim}\n onValueChange={() => {\n setThreeDim(!threeDim)\n }}\n />\n </View>\n </View>\n <Graph\n style={{position: \"absolute\"}}\n setPhysics={setPhysics} physics={physics} gData={graphData} nodeIds={nodeIds}\n threeDim={threeDim} setThreeDim={setThreeDim}\n local={local} setLocal={setLocal}/>\n </View>\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","/* eslint-env browser */\n\nif ('serviceWorker' in navigator) {\n window.addEventListener('load', function () {\n navigator.serviceWorker\n .register('/expo-service-worker.js', { scope: '/' })\n .then(function (info) {\n // console.info('Registered service-worker', info);\n })\n .catch(function (error) {\n console.info('Failed to register service-worker', error);\n });\n });\n}\n","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAPCAYAAADtc08vAAAAAXNSR0IArs4c6QAAAQNJREFUKBWdk8EOwUAQhme2InFy9yB1cSTReAIOPIeEEyKObs4knkBS2pNbK57A3cETcKBjtmKzJd0mO5fO9p//63Q6BciJ0D83wn3cyZHV7ZLKtISNPUqeawB8EFEVEV+anElF5sSHj5nYDI4AmpnM0pvpQDcjinHTc+eyyBT4FX/NLc+dfjXTNQXYmiUYAz/uAtGGc35nsSOgwPREXeP5RBj60ZUIatzKnQAqekFRzp5biSlL/lQLbqaMCAc2XYqMSkdx/MzAP42IkgkLLxTYb7XrW1VUkKQAWRNaQhTAFpIB2ED+VlkukNxChjmQ0IoH7EhwXvwBZGEKEThAAcOif+ENKNR3psyHynYAAAAASUVORK5CYII=\"","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAAXNSR0IArs4c6QAAAIZJREFUGBljZACC/w4OMgy/fnUxMDI6gPgM//8fYGBjK2M8cOAJI1TyIlBYCCyJIN4BFekzgXWCJBkZtwMFZMEYxAaJAU1l/G9t/QxopCRIAmQkyACoqY+Bmp4zIUzEzmICOwgk9/v3LJBOsG4gG6wc6FjCjgTbC3QtUMdykJ1gDGIDxUByAK6uPrQ53B7lAAAAAElFTkSuQmCC\"","module.exports = __webpack_public_path__ + \"static/media/bg.27c56310.png\";","module.exports = __webpack_public_path__ + \"static/media/bowser.4ba9aedf.png\";","module.exports = __webpack_public_path__ + \"static/media/logo-ignite.5c0bc1b0.png\";","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAIZJREFUGBljYACC////5wHxIyB+AsRFQNwPxG+A+BIQ+4DUgBTFADE+8Bco6QFSeB2fKqjcASagofxgo/ET7CCFq/CrAcsuAVktAMTX8Fi/EyjHAlYOZMgD8X0gRgfHgAK8KDYCBaSBGNnk3UA+N4oiGAcoIQLEZ4F4HRCzw8Sx0kAFzNgkAGi11d75H7oeAAAAAElFTkSuQmCC\""],"sourceRoot":""} \ No newline at end of file