diff --git a/.npmrc b/.npmrc index 2eb073230..d186087a2 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1,2 @@ prefer-workspace-packages=true +public-hoist-pattern[]=* diff --git a/examples/react-native-playground/.expo-shared/assets.json b/examples/react-native-playground/.expo-shared/assets.json deleted file mode 100644 index 1e6decfbb..000000000 --- a/examples/react-native-playground/.expo-shared/assets.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "12bb71342c6255bbf50437ec8f4441c083f47cdb74bd89160c15e4f43e52a1cb": true, - "40b842e832070c58deac6aa9e08fa459302ee3f9da492c7e77d93d2fbf4a56fd": true -} diff --git a/examples/react-native-playground/.gitignore b/examples/react-native-playground/.gitignore new file mode 100644 index 000000000..9a71cbbf8 --- /dev/null +++ b/examples/react-native-playground/.gitignore @@ -0,0 +1,6 @@ + +# @generated expo-cli sync-2b81b286409207a5da26e14c78851eb30d8ccbdb +# The following patterns were generated by expo-cli + +expo-env.d.ts +# @end expo-cli diff --git a/examples/react-native-playground/App.tsx b/examples/react-native-playground/App.tsx deleted file mode 100644 index cf6da639c..000000000 --- a/examples/react-native-playground/App.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import { StyleSheet, Text, View } from 'react-native' -import { StatusBar } from 'expo-status-bar' -import { TestText } from '@suspensive/react-native' - -export default function Native() { - return ( - - - Suspensive - - - - ) -} - -const styles = StyleSheet.create({ - container: { - flex: 1, - backgroundColor: '#fff', - alignItems: 'center', - justifyContent: 'center', - }, - header: { - fontWeight: 'bold', - marginBottom: 20, - fontSize: 36, - }, -}) diff --git a/examples/react-native-playground/README.md b/examples/react-native-playground/README.md deleted file mode 100644 index be1fea035..000000000 --- a/examples/react-native-playground/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Native - -A [react-native](https://reactnative.dev/) app built using [expo](https://docs.expo.dev/) diff --git a/examples/react-native-playground/app.json b/examples/react-native-playground/app.json index 2799c4aff..0f667132f 100644 --- a/examples/react-native-playground/app.json +++ b/examples/react-native-playground/app.json @@ -1,31 +1,34 @@ { "expo": { - "name": "react-native-playground", - "slug": "react-native-playground", + "name": "rn", + "slug": "rn", "version": "1.0.0", "orientation": "portrait", - "icon": "./assets/icon.png", - "userInterfaceStyle": "light", + "icon": "./assets/images/icon.png", + "scheme": "myapp", + "userInterfaceStyle": "automatic", "splash": { - "image": "./assets/splash.png", + "image": "./assets/images/splash.png", "resizeMode": "contain", "backgroundColor": "#ffffff" }, - "updates": { - "fallbackToCacheTimeout": 0 - }, - "assetBundlePatterns": ["**/*"], "ios": { "supportsTablet": true }, "android": { "adaptiveIcon": { - "foregroundImage": "./assets/adaptive-icon.png", - "backgroundColor": "#FFFFFF" + "foregroundImage": "./assets/images/adaptive-icon.png", + "backgroundColor": "#ffffff" } }, "web": { - "favicon": "./assets/favicon.png" + "bundler": "metro", + "output": "static", + "favicon": "./assets/images/favicon.png" + }, + "plugins": ["expo-router", "expo-font"], + "experiments": { + "typedRoutes": true } } } diff --git a/examples/react-native-playground/app/+html.tsx b/examples/react-native-playground/app/+html.tsx new file mode 100644 index 000000000..776700d69 --- /dev/null +++ b/examples/react-native-playground/app/+html.tsx @@ -0,0 +1,40 @@ +import { ScrollViewStyleReset } from 'expo-router/html' + +// This file is web-only and used to configure the root HTML for every +// web page during static rendering. +// The contents of this function only run in Node.js environments and +// do not have access to the DOM or browser APIs. +export default function Root({ children }: { children: React.ReactNode }) { + return ( + + + + + + + {/* + Disable body scrolling on web. This makes ScrollView components work closer to how they do on native. + However, body scrolling is often nice to have for mobile web. If you want to enable it, remove this line. + */} + + + {/* Using raw CSS styles as an escape-hatch to ensure the background color never flickers in dark-mode. */} + + {/* biome-ignore lint/security/noDangerouslySetInnerHtml: */} +