├── .eslintrc.js ├── .github ├── FUNDING.yml └── ISSUE_TEMPLATE │ └── bug.yaml ├── .gitignore ├── .npmignore ├── .prettierrc.js ├── .vscode └── settings.json ├── .yarn └── releases │ └── yarn-4.7.0.cjs ├── .yarnrc.yml ├── LICENSE ├── README.md ├── babel.config.js ├── create-solito-app ├── .yarn │ └── install-state.gz ├── index.ts ├── package.json ├── readme.md ├── run.js ├── tsconfig.json └── yarn.lock ├── develop ├── appdir │ ├── .gitignore │ ├── .yarn │ │ ├── install-state.gz │ │ └── releases │ │ │ └── yarn-4.7.0.cjs │ ├── .yarnrc.yml │ ├── README.md │ ├── app │ │ ├── api │ │ │ └── hello │ │ │ │ └── route.ts │ │ ├── favicon.ico │ │ ├── globals.css │ │ ├── layout.tsx │ │ ├── page.js │ │ ├── styles-provider.tsx │ │ └── users │ │ │ └── [userId] │ │ │ └── page.tsx │ ├── next.config.js │ ├── package.json │ ├── public │ │ ├── next.svg │ │ ├── thirteen.svg │ │ └── vercel.svg │ ├── tsconfig.json │ └── yarn.lock └── next │ ├── next-env.d.ts │ ├── next.config.js │ ├── package.json │ ├── pages │ ├── _document.tsx │ ├── cover.tsx │ ├── import.tsx │ └── index.tsx │ ├── public │ └── mountains.jpg │ ├── tsconfig.json │ ├── yarn-error.log │ └── yarn.lock ├── docs ├── .gitignore ├── .yarn │ ├── install-state.gz │ └── releases │ │ └── yarn-4.1.0.cjs ├── .yarnrc.yml ├── README.md ├── babel.config.js ├── docs │ ├── app-directory │ │ ├── hooks.md │ │ └── overview.md │ ├── community.mdx │ ├── compatibility.md │ ├── expo-router.mdx │ ├── gradual-adoption.md │ ├── guides │ │ ├── auth.md │ │ ├── dynamic-route.md │ │ ├── expo-router.md │ │ └── new-route.md │ ├── index.mdx │ ├── install.md │ ├── intro.md │ ├── methodology.md │ ├── moti-pressable.mdx │ ├── recipes │ │ ├── deep-linking.mdx │ │ ├── deploying.mdx │ │ ├── icons.mdx │ │ ├── modals.mdx │ │ ├── platform-code.mdx │ │ ├── redirects.mdx │ │ ├── scroll-view.mdx │ │ ├── tree-shaking.mdx │ │ └── use-is-focused.mdx │ ├── resources.mdx │ ├── starter.md │ ├── tailwind.mdx │ ├── typescript │ │ ├── navigation-options.mdx │ │ └── next-replacements.mdx │ ├── usage │ │ ├── image.mdx │ │ ├── link.mdx │ │ ├── moti-link.mdx │ │ ├── params.mdx │ │ ├── text-link.mdx │ │ ├── use-link.mdx │ │ └── use-router.mdx │ ├── v2.mdx │ └── v4.mdx ├── docusaurus.config.js ├── package.json ├── sidebars.js ├── src │ ├── components │ │ ├── HomepageFeatures.js │ │ └── HomepageFeatures.module.css │ ├── css │ │ └── custom.css │ └── pages │ │ └── index.module.css ├── static │ ├── .nojekyll │ ├── font │ │ ├── Satoshi-Bold.ttf │ │ ├── Satoshi-Italic.ttf │ │ ├── Satoshi-Medium.ttf │ │ ├── Satoshi-MediumItalic.ttf │ │ └── Satoshi-Regular.ttf │ └── img │ │ ├── 4.png │ │ ├── app.PNG │ │ ├── docusaurus.png │ │ ├── favicon.ico │ │ ├── favicon.png │ │ ├── logo.svg │ │ ├── modals.png │ │ ├── og.png │ │ ├── og.svg │ │ ├── s.png │ │ ├── site.jpg │ │ ├── solito.svg │ │ ├── tutorial │ │ ├── docsVersionDropdown.png │ │ └── localeDropdown.png │ │ ├── undraw_docusaurus_mountain.svg │ │ ├── undraw_docusaurus_react.svg │ │ ├── undraw_docusaurus_tree.svg │ │ ├── v2.png │ │ └── v2.svg └── yarn.lock ├── example-monorepos ├── blank │ ├── .gitignore │ ├── .vscode │ │ └── settings.json │ ├── .yarn │ │ └── releases │ │ │ └── yarn-4.7.0.cjs │ ├── .yarnrc.yml │ ├── apps │ │ ├── expo │ │ │ ├── .gitignore │ │ │ ├── App.tsx │ │ │ ├── app-env.d.ts │ │ │ ├── app.json │ │ │ ├── babel.config.js │ │ │ ├── index.js │ │ │ ├── metro.config.js │ │ │ ├── package.json │ │ │ └── tsconfig.json │ │ └── next │ │ │ ├── .gitignore │ │ │ ├── app-env.d.ts │ │ │ ├── app │ │ │ ├── api │ │ │ │ └── hello │ │ │ │ │ └── route.ts │ │ │ ├── favicon.ico │ │ │ ├── globals.css │ │ │ ├── layout.tsx │ │ │ ├── page.tsx │ │ │ ├── styles-provider.tsx │ │ │ └── users │ │ │ │ └── [userId] │ │ │ │ └── page.tsx │ │ │ ├── next-env.d.ts │ │ │ ├── next.config.js │ │ │ ├── package.json │ │ │ ├── public │ │ │ └── vercel.svg │ │ │ └── tsconfig.json │ ├── package.json │ ├── packages │ │ └── app │ │ │ ├── features │ │ │ ├── home │ │ │ │ └── screen.tsx │ │ │ └── user │ │ │ │ └── detail-screen.tsx │ │ │ ├── index.ts │ │ │ ├── navigation │ │ │ └── native │ │ │ │ └── index.tsx │ │ │ ├── package.json │ │ │ ├── provider │ │ │ ├── index.tsx │ │ │ ├── navigation │ │ │ │ ├── index.native.tsx │ │ │ │ └── index.tsx │ │ │ └── safe-area │ │ │ │ ├── index.native.tsx │ │ │ │ ├── index.tsx │ │ │ │ ├── use-safe-area.native.ts │ │ │ │ └── use-safe-area.ts │ │ │ └── rnw-overrides.d.ts │ ├── readme.md │ ├── tsconfig.json │ ├── turbo.json │ └── yarn.lock ├── with-custom-font │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierrc.json │ ├── .yarn │ │ └── releases │ │ │ └── yarn-3.4.1.cjs │ ├── .yarnrc.yml │ ├── apps │ │ ├── expo │ │ │ ├── .gitignore │ │ │ ├── App.tsx │ │ │ ├── Fonts.tsx │ │ │ ├── app-env.d.ts │ │ │ ├── app.json │ │ │ ├── babel.config.js │ │ │ ├── index.js │ │ │ ├── metro.config.js │ │ │ ├── package.json │ │ │ └── tsconfig.json │ │ └── next │ │ │ ├── .gitignore │ │ │ ├── app-env.d.ts │ │ │ ├── next-env.d.ts │ │ │ ├── next.config.js │ │ │ ├── package.json │ │ │ ├── pages │ │ │ ├── _app.tsx │ │ │ ├── _document.tsx │ │ │ ├── index.tsx │ │ │ └── user │ │ │ │ └── [id].tsx │ │ │ ├── public │ │ │ ├── favicon.ico │ │ │ ├── font │ │ │ │ ├── Inter │ │ │ │ │ ├── Inter-Black.otf │ │ │ │ │ ├── Inter-BlackItalic.otf │ │ │ │ │ ├── Inter-Bold.otf │ │ │ │ │ ├── Inter-BoldItalic.otf │ │ │ │ │ ├── Inter-ExtraBold.otf │ │ │ │ │ ├── Inter-ExtraBoldItalic.otf │ │ │ │ │ ├── Inter-ExtraLight.otf │ │ │ │ │ ├── Inter-ExtraLightItalic.otf │ │ │ │ │ ├── Inter-Italic.otf │ │ │ │ │ ├── Inter-Light.otf │ │ │ │ │ ├── Inter-LightItalic.otf │ │ │ │ │ ├── Inter-Medium.otf │ │ │ │ │ ├── Inter-MediumItalic.otf │ │ │ │ │ ├── Inter-Regular.otf │ │ │ │ │ ├── Inter-SemiBold.otf │ │ │ │ │ ├── Inter-SemiBoldItalic.otf │ │ │ │ │ ├── Inter-Thin.otf │ │ │ │ │ ├── Inter-ThinItalic.otf │ │ │ │ │ └── Inter-V.ttf │ │ │ │ └── LICENSE.txt │ │ │ └── vercel.svg │ │ │ └── tsconfig.json │ ├── package.json │ ├── packages │ │ └── app │ │ │ ├── features │ │ │ ├── home │ │ │ │ └── screen.tsx │ │ │ └── user │ │ │ │ └── detail-screen.tsx │ │ │ ├── index.ts │ │ │ ├── navigation │ │ │ └── native │ │ │ │ └── index.tsx │ │ │ ├── package.json │ │ │ ├── provider │ │ │ ├── dripsy.tsx │ │ │ ├── index.tsx │ │ │ ├── navigation │ │ │ │ ├── index.tsx │ │ │ │ └── index.web.tsx │ │ │ └── safe-area │ │ │ │ ├── index.tsx │ │ │ │ ├── index.web.tsx │ │ │ │ ├── use-safe-area.ts │ │ │ │ └── use-safe-area.web.ts │ │ │ └── rnw-overrides.d.ts │ ├── readme.md │ ├── tsconfig.json │ ├── turbo.json │ └── yarn.lock ├── with-expo-router │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierrc.json │ ├── .yarn │ │ └── releases │ │ │ └── yarn-3.4.1.cjs │ ├── .yarnrc.yml │ ├── apps │ │ ├── expo │ │ │ ├── .gitignore │ │ │ ├── app-env.d.ts │ │ │ ├── app.json │ │ │ ├── app │ │ │ │ ├── _layout.tsx │ │ │ │ ├── index.tsx │ │ │ │ └── user │ │ │ │ │ └── [id].tsx │ │ │ ├── babel.config.js │ │ │ ├── metro.config.js │ │ │ ├── package.json │ │ │ └── tsconfig.json │ │ └── next │ │ │ ├── .gitignore │ │ │ ├── app-env.d.ts │ │ │ ├── app │ │ │ ├── api │ │ │ │ └── hello │ │ │ │ │ └── route.ts │ │ │ ├── favicon.ico │ │ │ ├── globals.css │ │ │ ├── layout.tsx │ │ │ ├── page.tsx │ │ │ ├── styles-provider.tsx │ │ │ └── users │ │ │ │ └── [userId] │ │ │ │ └── page.tsx │ │ │ ├── next-env.d.ts │ │ │ ├── next.config.js │ │ │ ├── package.json │ │ │ ├── plugins │ │ │ └── swc_plugin_reanimated.wasm │ │ │ ├── public │ │ │ ├── favicon.ico │ │ │ └── vercel.svg │ │ │ └── tsconfig.json │ ├── package.json │ ├── packages │ │ └── app │ │ │ ├── features │ │ │ ├── home │ │ │ │ └── screen.tsx │ │ │ └── user │ │ │ │ └── detail-screen.tsx │ │ │ ├── index.ts │ │ │ ├── navigation │ │ │ └── native │ │ │ │ └── index.tsx │ │ │ ├── package.json │ │ │ ├── provider │ │ │ ├── index.tsx │ │ │ ├── navigation │ │ │ │ ├── index.native.tsx │ │ │ │ └── index.tsx │ │ │ └── safe-area │ │ │ │ ├── index.native.tsx │ │ │ │ ├── index.tsx │ │ │ │ ├── use-safe-area.native.ts │ │ │ │ └── use-safe-area.ts │ │ │ └── rnw-overrides.d.ts │ ├── readme.md │ ├── tsconfig.json │ ├── turbo.json │ └── yarn.lock └── with-tailwind │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierrc.json │ ├── .yarn │ └── releases │ │ └── yarn-3.4.1.cjs │ ├── .yarnrc.yml │ ├── apps │ ├── expo │ │ ├── .gitignore │ │ ├── app-env.d.ts │ │ ├── app.json │ │ ├── app │ │ │ ├── _layout.tsx │ │ │ ├── index.tsx │ │ │ └── user │ │ │ │ └── [id].tsx │ │ ├── babel.config.js │ │ ├── index.js │ │ ├── metro.config.js │ │ ├── package.json │ │ ├── tailwind.config.js │ │ └── tsconfig.json │ └── next │ │ ├── .gitignore │ │ ├── app-env.d.ts │ │ ├── global.css │ │ ├── next-env.d.ts │ │ ├── next.config.js │ │ ├── package.json │ │ ├── pages │ │ ├── _app.tsx │ │ ├── _document.tsx │ │ ├── index.tsx │ │ └── user │ │ │ └── [id].tsx │ │ ├── plugins │ │ └── swc_plugin_reanimated.wasm │ │ ├── postcss.config.js │ │ ├── public │ │ ├── favicon.ico │ │ └── vercel.svg │ │ ├── tailwind.config.js │ │ └── tsconfig.json │ ├── package.json │ ├── packages │ └── app │ │ ├── design │ │ ├── layout.tsx │ │ ├── tailwind │ │ │ └── theme.js │ │ ├── typography.tsx │ │ └── view.tsx │ │ ├── features │ │ ├── home │ │ │ └── screen.tsx │ │ └── user │ │ │ └── detail-screen.tsx │ │ ├── index.ts │ │ ├── nativewind.d.ts │ │ ├── package.json │ │ ├── provider │ │ ├── index.tsx │ │ └── safe-area │ │ │ ├── index.tsx │ │ │ ├── index.web.tsx │ │ │ ├── use-safe-area.ts │ │ │ └── use-safe-area.web.ts │ │ ├── rnw-overrides.d.ts │ │ ├── tailwind.config.js │ │ └── tsconfig.json │ ├── readme.md │ ├── tsconfig.json │ ├── turbo.json │ └── yarn.lock ├── image ├── author │ ├── index.d.ts │ └── index.js ├── expo │ ├── index.d.ts │ └── index.js ├── index.d.ts ├── index.js └── react-native-fast-image.js ├── index.d.ts ├── link ├── index.d.ts └── index.js ├── moti ├── app.js ├── app.ts ├── index.d.ts └── index.js ├── navigation ├── index.d.ts └── index.js ├── package.json ├── params.json ├── router ├── index.d.ts └── index.js ├── scripts ├── install-examples.ts ├── upgrade-examples-expo.ts └── upgrade-examples.ts ├── src ├── app │ └── navigation │ │ ├── index.ts │ │ ├── use-link.ts │ │ ├── use-next-params.native.ts │ │ ├── use-next-params.ts │ │ ├── use-next-pathname.native.ts │ │ ├── use-next-pathname.ts │ │ ├── use-next-router.ts │ │ ├── use-next-router.web.ts │ │ ├── use-next-search-params.native.ts │ │ ├── use-next-search-params.ts │ │ ├── use-params.ts │ │ ├── use-pathname.ts │ │ ├── use-router.ts │ │ ├── use-search-params.ts │ │ ├── use-update-search-params.native.ts │ │ ├── use-update-search-params.ts │ │ └── use-update-search-params.types.ts ├── helpers │ ├── merge-refs.ts │ └── use-stable-callback.ts ├── image │ ├── author │ │ └── index.ts │ ├── context.tsx │ ├── create-solito-image.tsx │ ├── default-loader.ts │ ├── expo │ │ ├── image.tsx │ │ ├── image.web.tsx │ │ └── index.ts │ ├── fast │ │ ├── fast.tsx │ │ ├── fast.web.tsx │ │ └── index.ts │ ├── helpers.test.ts │ ├── helpers.ts │ ├── image.types.ts │ ├── types.ts │ └── use-solito-image.ts ├── index.ts ├── link │ ├── LinkCoreProps.tsx │ ├── core.tsx │ ├── index.tsx │ ├── link.tsx │ ├── linking.ts │ ├── linking.web.ts │ ├── next-link.tsx │ ├── next-link.web.tsx │ ├── text-link.tsx │ └── use-custom-link.tsx ├── middleware │ ├── context.tsx │ ├── context.web.tsx │ ├── provider.tsx │ └── types.ts ├── moti │ ├── app.tsx │ ├── index.tsx │ └── link.tsx ├── params │ ├── index.tsx │ ├── router.ts │ ├── router.web.ts │ ├── use-route.ts │ ├── use-route.web.ts │ ├── use-router.ts │ └── use-router.web.ts ├── router │ ├── index.ts │ ├── next-router.ts │ ├── next-router.web.ts │ ├── parse-next-path.test.ts │ ├── parse-next-path.ts │ ├── replace-helpers.ts │ ├── replace-helpers.web.ts │ ├── use-link-to.ts │ ├── use-link-to.web.ts │ ├── use-navigation.ts │ ├── use-navigation.web.ts │ ├── use-next-router.ts │ ├── use-next-router.web.ts │ └── use-router.ts └── types │ └── solito-page.tsx ├── tsconfig.json └── yarn.lock /.eslintrc.js: -------------------------------------------------------------------------------- 1 | const lint = require('expo-module-scripts/eslintrc.base.js') 2 | module.exports = { 3 | ...lint, 4 | rules: { 5 | ...lint.rules, 6 | 'react/react-in-jsx-scope': 'off', 7 | '@typescript-eslint/array-type': 'off', 8 | }, 9 | } 10 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: nandorojo 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | build 3 | dist 4 | 5 | .expo 6 | .next 7 | 8 | ios 9 | android 10 | 11 | .test 12 | create-test-app 13 | 14 | .DS_Store 15 | 16 | 17 | .pnp.* 18 | .yarn/* 19 | !.yarn/patches 20 | !.yarn/plugins 21 | !.yarn/releases 22 | !.yarn/sdks 23 | !.yarn/versions -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | example-monorepos 2 | .next 3 | .expo 4 | create-solito-app 5 | docs -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | // generated by @nandorojo/lint-expo 2 | module.exports = require('eslint-config-nando/prettier') 3 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "typescript.tsdk": "node_modules/typescript/lib", 3 | "explorer.fileNesting.enabled": true, 4 | "explorer.fileNesting.patterns": { 5 | "*.js": "${capture}.js.map, ${capture}.d.ts, ${capture}.d.ts.map", 6 | "*.ts": "$(capture).test.ts, $(capture).benchmark.ts, $(capture).test.tsx, $(capture).test.node.ts, $(capture).test.node.tsx, $(capture).test.native.ts, $(capture).test.native.tsx, $(capture).test.ios.ts, $(capture).test.ios.tsx, $(capture).test.web.ts, $(capture).test.web.tsx, $(capture).test.android.ts, $(capture).test.android.tsx, ${capture}.native.tsx, ${capture}.ios.tsx, ${capture}.android.tsx, ${capture}.web.tsx, ${capture}.native.ts, ${capture}.ios.ts, ${capture}.android.ts, ${capture}.web.ts, ${capture}.native.js, ${capture}.ios.js, ${capture}.android.js, ${capture}.web.js, ${capture}.native.jsx, ${capture}.ios.jsx, ${capture}.android.jsx, ${capture}.web.jsx", 7 | "*.tsx": "$(capture).test.ts, $(capture).test.tsx, $(capture).test.node.ts, $(capture).test.node.tsx, $(capture).test.native.ts, $(capture).test.native.tsx, $(capture).test.ios.ts, $(capture).test.ios.tsx, $(capture).test.web.ts, $(capture).test.web.tsx, $(capture).test.android.ts, $(capture).test.android.tsx, ${capture}.native.tsx, ${capture}.ios.tsx, ${capture}.types.tsx, ${capture}.android.tsx, ${capture}.web.tsx, ${capture}.native.ts, ${capture}.types.ts, ${capture}.ios.ts, ${capture}.android.ts, ${capture}.web.ts, ${capture}.native.js, ${capture}.ios.js, ${capture}.android.js, ${capture}.web.js, ${capture}.native.jsx, ${capture}.ios.jsx, ${capture}.android.jsx, ${capture}.web.jsx" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /.yarnrc.yml: -------------------------------------------------------------------------------- 1 | nodeLinker: node-modules 2 | 3 | yarnPath: .yarn/releases/yarn-4.7.0.cjs 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Fernando Rojo 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![og (4)](https://user-images.githubusercontent.com/13172299/158270455-69bf1044-28ec-476c-b9c5-06ea818a2191.png) 2 | 3 | 4 | A library dedicated to unifying React Native with Next.js, primarily focused on navigation. 5 | 6 | ```sh 7 | yarn add solito 8 | ``` 9 | 10 | Solito is a replacement for my popular `expo-next-react-navigation` library. Consider this the next-generation version, with a brand new API and approach. 11 | 12 | ## Docs & Examples 13 | 14 | - 📚 [Documentation](https://solito.dev) 15 | - 🦄 [Installation](https://solito.dev/install) 16 | - 🐬 [Examples](https://github.com/nandorojo/solito/tree/master/example-monorepos/blank) 17 | 18 | ## Why 19 | 20 | Watch Fernando Rojo's [talk from Next.js Conf 2021](https://www.youtube.com/watch?v=0lnbdRweJtA) to learn more about using React Native with Next.js. 21 | 22 | ## Contributing 23 | 24 | - Add gitmoji: `yarn global add gitmoji-cli` or `npm i -g gitmoji-cli` 25 | - Run `yarn` 26 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = function (api) { 2 | api.cache(true) 3 | 4 | // only used for jest, right? 5 | return { 6 | presets: [ 7 | ['@babel/preset-env', { targets: { node: 'current' } }], 8 | '@babel/preset-typescript', 9 | ], 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /create-solito-app/.yarn/install-state.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nandorojo/solito/be03583de99426d9ac8f8504e9ef90924e79b264/create-solito-app/.yarn/install-state.gz -------------------------------------------------------------------------------- /create-solito-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "create-solito-app", 3 | "version": "0.2.0", 4 | "devDependencies": { 5 | "@types/async-retry": "1.4.2", 6 | "@types/cross-spawn": "^6.0.2", 7 | "@types/node": "^12.6.8", 8 | "@types/prompts": "2.0.1", 9 | "@types/rimraf": "3.0.0", 10 | "@types/tar": "6.1.3", 11 | "@types/validate-npm-package-name": "3.0.0", 12 | "@vercel/ncc": "0.33.1", 13 | "async-retry": "1.3.1", 14 | "chalk": "2.4.2", 15 | "commander": "2.20.0", 16 | "cpy": "7.3.0", 17 | "cross-spawn": "6.0.5", 18 | "got": "10.7.0", 19 | "prompts": "2.1.0", 20 | "rimraf": "3.0.0", 21 | "tar": "6.1.12", 22 | "update-check": "1.5.4", 23 | "validate-npm-package-name": "3.0.0" 24 | }, 25 | "engines": { 26 | "node": ">=12.22.0" 27 | }, 28 | "dependencies": { 29 | "@expo/package-manager": "^0.0.50", 30 | "ts-node": "^10.7.0", 31 | "typescript": "^4.6.2" 32 | }, 33 | "scripts": { 34 | "start": "ts-node index.ts", 35 | "test": "rimraf ./create-test-app/ && yarn release && node dist/index.js create-test-app", 36 | "dev": "ncc build ./index.ts -w -o dist/", 37 | "prerelease": "rimraf ./dist/", 38 | "release": "ncc build ./index.ts -o ./dist/ --minify --no-cache --no-source-map-register", 39 | "prepublish": "yarn release" 40 | }, 41 | "bin": "./dist/index.js" 42 | } 43 | -------------------------------------------------------------------------------- /create-solito-app/readme.md: -------------------------------------------------------------------------------- 1 | # `create-solito-app` 2 | 3 | ```sh 4 | npx create-solito-app@latest 5 | ``` 6 | 7 | A script that creates a [solito monorepo](https://github.com/nandorojo/solito/tree/master/example-monorepos/blank) for you in seconds. 8 | 9 | ## Contributing 10 | 11 | - Clone the root repo. 12 | - `cd create-solito-app` 13 | - `yarn` 14 | - `yarn test` to build your local app into a gitignored `create-test-app` folder 15 | 16 | ## Credits 17 | 18 | Thanks to `create-next-app`, I was able to write `create-solito-app` in about an hour. 19 | -------------------------------------------------------------------------------- /create-solito-app/run.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | require('child_process').execSync('npx ts-node ./index.ts', { 3 | stdio: 'inherit', 4 | }) 5 | -------------------------------------------------------------------------------- /create-solito-app/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2019", 4 | "moduleResolution": "node", 5 | "strict": true, 6 | "resolveJsonModule": true, 7 | "esModuleInterop": true, 8 | "skipLibCheck": false 9 | }, 10 | "include": ["index.ts"] 11 | } 12 | -------------------------------------------------------------------------------- /develop/appdir/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | .pnpm-debug.log* 27 | 28 | # local env files 29 | .env*.local 30 | 31 | # vercel 32 | .vercel 33 | 34 | # typescript 35 | *.tsbuildinfo 36 | next-env.d.ts 37 | -------------------------------------------------------------------------------- /develop/appdir/.yarn/install-state.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nandorojo/solito/be03583de99426d9ac8f8504e9ef90924e79b264/develop/appdir/.yarn/install-state.gz -------------------------------------------------------------------------------- /develop/appdir/.yarnrc.yml: -------------------------------------------------------------------------------- 1 | yarnPath: .yarn/releases/yarn-4.7.0.cjs 2 | -------------------------------------------------------------------------------- /develop/appdir/README.md: -------------------------------------------------------------------------------- 1 | This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). 2 | 3 | ## Getting Started 4 | 5 | First, run the development server: 6 | 7 | ```bash 8 | npm run dev 9 | # or 10 | yarn dev 11 | # or 12 | pnpm dev 13 | ``` 14 | 15 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. 16 | 17 | You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. 18 | 19 | [API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`. 20 | 21 | The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. 22 | 23 | This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. 24 | 25 | ## Learn More 26 | 27 | To learn more about Next.js, take a look at the following resources: 28 | 29 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. 30 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. 31 | 32 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! 33 | 34 | ## Deploy on Vercel 35 | 36 | The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. 37 | 38 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. 39 | -------------------------------------------------------------------------------- /develop/appdir/app/api/hello/route.ts: -------------------------------------------------------------------------------- 1 | export async function GET(request: Request) { 2 | return new Response('Hello, Solito!') 3 | } 4 | -------------------------------------------------------------------------------- /develop/appdir/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nandorojo/solito/be03583de99426d9ac8f8504e9ef90924e79b264/develop/appdir/app/favicon.ico -------------------------------------------------------------------------------- /develop/appdir/app/globals.css: -------------------------------------------------------------------------------- 1 | html, 2 | body, 3 | #__next { 4 | width: 100%; 5 | /* To smooth any scrolling behavior */ 6 | -webkit-overflow-scrolling: touch; 7 | margin: 0px; 8 | padding: 0px; 9 | /* Allows content to fill the viewport and go beyond the bottom */ 10 | min-height: 100%; 11 | } 12 | #__next { 13 | flex-shrink: 0; 14 | flex-basis: auto; 15 | flex-direction: column; 16 | flex-grow: 1; 17 | display: flex; 18 | flex: 1; 19 | } 20 | html { 21 | scroll-behavior: smooth; 22 | /* Prevent text size change on orientation change https://gist.github.com/tfausak/2222823#file-ios-8-web-app-html-L138 */ 23 | -webkit-text-size-adjust: 100%; 24 | height: 100%; 25 | } 26 | body { 27 | display: flex; 28 | /* Allows you to scroll below the viewport; default value is visible */ 29 | overflow-y: auto; 30 | overscroll-behavior-y: none; 31 | text-rendering: optimizeLegibility; 32 | -webkit-font-smoothing: antialiased; 33 | -moz-osx-font-smoothing: grayscale; 34 | -ms-overflow-style: scrollbar; 35 | } 36 | -------------------------------------------------------------------------------- /develop/appdir/app/layout.tsx: -------------------------------------------------------------------------------- 1 | import { StylesProvider } from './styles-provider' 2 | import './globals.css' 3 | 4 | export const metadata = { 5 | title: 'Create Solito App', 6 | description: 'Generated by create Solito app', 7 | } 8 | 9 | export default function RootLayout({ 10 | children, 11 | }: { 12 | children: React.ReactNode 13 | }) { 14 | return ( 15 | 16 | 17 | {children} 18 | 19 | 20 | ) 21 | } 22 | -------------------------------------------------------------------------------- /develop/appdir/app/page.js: -------------------------------------------------------------------------------- 1 | 'use client' 2 | import { Text, View } from 'react-native' 3 | import { MotiLink } from 'solito/moti/app' 4 | 5 | export default function Home() { 6 | return ( 7 | 8 | 19 | Hello, Next.js App Router. 20 | 21 | 22 | ) 23 | } 24 | -------------------------------------------------------------------------------- /develop/appdir/app/styles-provider.tsx: -------------------------------------------------------------------------------- 1 | 'use client' 2 | import { useServerInsertedHTML } from 'next/navigation' 3 | import { StyleSheet } from 'react-native' 4 | 5 | export function StylesProvider({ children }: { children: React.ReactNode }) { 6 | useServerInsertedHTML(() => { 7 | // @ts-ignore 8 | const sheet = StyleSheet.getSheet() 9 | return ( 10 |