nwui-cli 0.3.6 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (235) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/build/index.js +15 -3
  3. package/build/install-component.js +117 -32
  4. package/build/utils/env.js +3 -0
  5. package/my-expo-app-2/app/+html.tsx +46 -0
  6. package/my-expo-app-2/app/+not-found.tsx +33 -0
  7. package/my-expo-app-2/app/_layout.tsx +22 -0
  8. package/my-expo-app-2/app/details.tsx +17 -0
  9. package/my-expo-app-2/app/index.tsx +23 -0
  10. package/my-expo-app-2/app-env.d.ts +2 -0
  11. package/my-expo-app-2/app.json +48 -0
  12. package/my-expo-app-2/assets/adaptive-icon.png +0 -0
  13. package/my-expo-app-2/assets/favicon.png +0 -0
  14. package/my-expo-app-2/assets/icon.png +0 -0
  15. package/my-expo-app-2/assets/splash.png +0 -0
  16. package/my-expo-app-2/babel.config.js +18 -0
  17. package/my-expo-app-2/cesconfig.json +35 -0
  18. package/my-expo-app-2/components/Button.tsx +19 -0
  19. package/my-expo-app-2/components/Container.tsx +9 -0
  20. package/my-expo-app-2/components/EditScreenInfo.tsx +34 -0
  21. package/my-expo-app-2/components/ScreenContent.tsx +25 -0
  22. package/my-expo-app-2/components/nativewindui/ActivityIndicator.tsx +13 -0
  23. package/my-expo-app-2/components/nativewindui/AdaptiveSearchHeader/AdaptiveSearchHeader.ios.tsx +97 -0
  24. package/my-expo-app-2/components/nativewindui/AdaptiveSearchHeader/AdaptiveSearchHeader.tsx +264 -0
  25. package/my-expo-app-2/components/nativewindui/AdaptiveSearchHeader/index.ts +1 -0
  26. package/my-expo-app-2/components/nativewindui/AdaptiveSearchHeader/types.ts +95 -0
  27. package/my-expo-app-2/components/nativewindui/Alert/Alert.ios.tsx +65 -0
  28. package/my-expo-app-2/components/nativewindui/Alert/Alert.tsx +291 -0
  29. package/my-expo-app-2/components/nativewindui/Alert/index.ts +1 -0
  30. package/my-expo-app-2/components/nativewindui/Alert/types.ts +27 -0
  31. package/my-expo-app-2/components/nativewindui/Badge.tsx +84 -0
  32. package/my-expo-app-2/components/nativewindui/Button.tsx +156 -0
  33. package/my-expo-app-2/components/nativewindui/Checkbox.tsx +61 -0
  34. package/my-expo-app-2/components/nativewindui/ContextMenu/ContextMenu.ios.tsx +221 -0
  35. package/my-expo-app-2/components/nativewindui/ContextMenu/ContextMenu.tsx +420 -0
  36. package/my-expo-app-2/components/nativewindui/ContextMenu/index.ts +1 -0
  37. package/my-expo-app-2/components/nativewindui/ContextMenu/types.ts +91 -0
  38. package/my-expo-app-2/components/nativewindui/ContextMenu/utils.ts +14 -0
  39. package/my-expo-app-2/components/nativewindui/DrawerContent.tsx +145 -0
  40. package/my-expo-app-2/components/nativewindui/DropdownMenu/DropdownMenu.ios.tsx +168 -0
  41. package/my-expo-app-2/components/nativewindui/DropdownMenu/DropdownMenu.tsx +330 -0
  42. package/my-expo-app-2/components/nativewindui/DropdownMenu/index.ts +1 -0
  43. package/my-expo-app-2/components/nativewindui/DropdownMenu/types.ts +93 -0
  44. package/my-expo-app-2/components/nativewindui/DropdownMenu/utils.ts +14 -0
  45. package/my-expo-app-2/components/nativewindui/Form.tsx +125 -0
  46. package/my-expo-app-2/components/nativewindui/LargeTitleHeader/LargeTitleHeader.ios.tsx +99 -0
  47. package/my-expo-app-2/components/nativewindui/LargeTitleHeader/LargeTitleHeader.tsx +288 -0
  48. package/my-expo-app-2/components/nativewindui/LargeTitleHeader/index.ts +1 -0
  49. package/my-expo-app-2/components/nativewindui/LargeTitleHeader/types.ts +89 -0
  50. package/my-expo-app-2/components/nativewindui/List.tsx +433 -0
  51. package/my-expo-app-2/components/nativewindui/SearchInput/SearchInput.ios.tsx +177 -0
  52. package/my-expo-app-2/components/nativewindui/SearchInput/SearchInput.tsx +86 -0
  53. package/my-expo-app-2/components/nativewindui/SearchInput/index.tsx +1 -0
  54. package/my-expo-app-2/components/nativewindui/SearchInput/types.ts +12 -0
  55. package/my-expo-app-2/components/nativewindui/SegmentedControl/SegmentedControl.ios.tsx +31 -0
  56. package/my-expo-app-2/components/nativewindui/SegmentedControl/SegmentedControl.tsx +55 -0
  57. package/my-expo-app-2/components/nativewindui/SegmentedControl/index.ts +1 -0
  58. package/my-expo-app-2/components/nativewindui/SegmentedControl/types.ts +15 -0
  59. package/my-expo-app-2/components/nativewindui/Stepper.tsx +62 -0
  60. package/my-expo-app-2/components/nativewindui/Text.tsx +55 -0
  61. package/my-expo-app-2/components/nativewindui/TextField/TextField.ios.tsx +85 -0
  62. package/my-expo-app-2/components/nativewindui/TextField/TextField.tsx +326 -0
  63. package/my-expo-app-2/components/nativewindui/TextField/index.tsx +1 -0
  64. package/my-expo-app-2/components/nativewindui/TextField/types.ts +26 -0
  65. package/my-expo-app-2/components/nativewindui/Toolbar.tsx +116 -0
  66. package/my-expo-app-2/global.css +3 -0
  67. package/my-expo-app-2/metro.config.js +12 -0
  68. package/my-expo-app-2/package-lock.json +19162 -0
  69. package/my-expo-app-2/package.json +74 -0
  70. package/my-expo-app-2/prettier.config.js +11 -0
  71. package/my-expo-app-2/tailwind.config.js +11 -0
  72. package/my-expo-app-3/app/+html.tsx +46 -0
  73. package/my-expo-app-3/app/+not-found.tsx +33 -0
  74. package/my-expo-app-3/app/_layout.tsx +22 -0
  75. package/my-expo-app-3/app/details.tsx +17 -0
  76. package/my-expo-app-3/app/index.tsx +23 -0
  77. package/my-expo-app-3/app-env.d.ts +2 -0
  78. package/my-expo-app-3/app.json +48 -0
  79. package/my-expo-app-3/assets/adaptive-icon.png +0 -0
  80. package/my-expo-app-3/assets/favicon.png +0 -0
  81. package/my-expo-app-3/assets/icon.png +0 -0
  82. package/my-expo-app-3/assets/splash.png +0 -0
  83. package/my-expo-app-3/babel.config.js +18 -0
  84. package/my-expo-app-3/cesconfig.json +35 -0
  85. package/my-expo-app-3/components/Button.tsx +19 -0
  86. package/my-expo-app-3/components/Container.tsx +9 -0
  87. package/my-expo-app-3/components/EditScreenInfo.tsx +34 -0
  88. package/my-expo-app-3/components/ScreenContent.tsx +25 -0
  89. package/my-expo-app-3/components/nativewindui/ActivityIndicator.tsx +13 -0
  90. package/my-expo-app-3/components/nativewindui/AdaptiveSearchHeader/AdaptiveSearchHeader.ios.tsx +97 -0
  91. package/my-expo-app-3/components/nativewindui/AdaptiveSearchHeader/AdaptiveSearchHeader.tsx +264 -0
  92. package/my-expo-app-3/components/nativewindui/AdaptiveSearchHeader/index.ts +1 -0
  93. package/my-expo-app-3/components/nativewindui/AdaptiveSearchHeader/types.ts +95 -0
  94. package/my-expo-app-3/components/nativewindui/Alert/Alert.ios.tsx +65 -0
  95. package/my-expo-app-3/components/nativewindui/Alert/Alert.tsx +291 -0
  96. package/my-expo-app-3/components/nativewindui/Alert/index.ts +1 -0
  97. package/my-expo-app-3/components/nativewindui/Alert/types.ts +27 -0
  98. package/my-expo-app-3/components/nativewindui/Badge.tsx +84 -0
  99. package/my-expo-app-3/components/nativewindui/Button.tsx +156 -0
  100. package/my-expo-app-3/components/nativewindui/Checkbox.tsx +61 -0
  101. package/my-expo-app-3/components/nativewindui/ContextMenu/ContextMenu.ios.tsx +221 -0
  102. package/my-expo-app-3/components/nativewindui/ContextMenu/ContextMenu.tsx +420 -0
  103. package/my-expo-app-3/components/nativewindui/ContextMenu/index.ts +1 -0
  104. package/my-expo-app-3/components/nativewindui/ContextMenu/types.ts +91 -0
  105. package/my-expo-app-3/components/nativewindui/ContextMenu/utils.ts +14 -0
  106. package/my-expo-app-3/components/nativewindui/DrawerContent.tsx +145 -0
  107. package/my-expo-app-3/components/nativewindui/DropdownMenu/DropdownMenu.ios.tsx +168 -0
  108. package/my-expo-app-3/components/nativewindui/DropdownMenu/DropdownMenu.tsx +330 -0
  109. package/my-expo-app-3/components/nativewindui/DropdownMenu/index.ts +1 -0
  110. package/my-expo-app-3/components/nativewindui/DropdownMenu/types.ts +93 -0
  111. package/my-expo-app-3/components/nativewindui/DropdownMenu/utils.ts +14 -0
  112. package/my-expo-app-3/components/nativewindui/Form.tsx +125 -0
  113. package/my-expo-app-3/components/nativewindui/LargeTitleHeader/LargeTitleHeader.ios.tsx +99 -0
  114. package/my-expo-app-3/components/nativewindui/LargeTitleHeader/LargeTitleHeader.tsx +288 -0
  115. package/my-expo-app-3/components/nativewindui/LargeTitleHeader/index.ts +1 -0
  116. package/my-expo-app-3/components/nativewindui/LargeTitleHeader/types.ts +89 -0
  117. package/my-expo-app-3/components/nativewindui/List.tsx +433 -0
  118. package/my-expo-app-3/components/nativewindui/SearchInput/SearchInput.ios.tsx +177 -0
  119. package/my-expo-app-3/components/nativewindui/SearchInput/SearchInput.tsx +86 -0
  120. package/my-expo-app-3/components/nativewindui/SearchInput/index.tsx +1 -0
  121. package/my-expo-app-3/components/nativewindui/SearchInput/types.ts +12 -0
  122. package/my-expo-app-3/components/nativewindui/SegmentedControl/SegmentedControl.ios.tsx +31 -0
  123. package/my-expo-app-3/components/nativewindui/SegmentedControl/SegmentedControl.tsx +55 -0
  124. package/my-expo-app-3/components/nativewindui/SegmentedControl/index.ts +1 -0
  125. package/my-expo-app-3/components/nativewindui/SegmentedControl/types.ts +15 -0
  126. package/my-expo-app-3/components/nativewindui/Stepper.tsx +62 -0
  127. package/my-expo-app-3/components/nativewindui/Text.tsx +55 -0
  128. package/my-expo-app-3/components/nativewindui/TextField/TextField.ios.tsx +85 -0
  129. package/my-expo-app-3/components/nativewindui/TextField/TextField.tsx +326 -0
  130. package/my-expo-app-3/components/nativewindui/TextField/index.tsx +1 -0
  131. package/my-expo-app-3/components/nativewindui/TextField/types.ts +26 -0
  132. package/my-expo-app-3/components/nativewindui/Toolbar.tsx +116 -0
  133. package/my-expo-app-3/components/nativewindui/examples/selectable-text.tsx +43 -0
  134. package/my-expo-app-3/components/nativewindui/examples/text.tsx +43 -0
  135. package/my-expo-app-3/global.css +3 -0
  136. package/my-expo-app-3/metro.config.js +12 -0
  137. package/my-expo-app-3/package-lock.json +19141 -0
  138. package/my-expo-app-3/package.json +73 -0
  139. package/my-expo-app-3/prettier.config.js +11 -0
  140. package/my-expo-app-3/tailwind.config.js +11 -0
  141. package/my-expo-app-test-case/app/+html.tsx +46 -0
  142. package/my-expo-app-test-case/app/+not-found.tsx +33 -0
  143. package/my-expo-app-test-case/app/_layout.tsx +22 -0
  144. package/my-expo-app-test-case/app/details.tsx +17 -0
  145. package/my-expo-app-test-case/app/index.tsx +23 -0
  146. package/my-expo-app-test-case/app-env.d.ts +2 -0
  147. package/my-expo-app-test-case/app.json +48 -0
  148. package/my-expo-app-test-case/assets/adaptive-icon.png +0 -0
  149. package/my-expo-app-test-case/assets/favicon.png +0 -0
  150. package/my-expo-app-test-case/assets/icon.png +0 -0
  151. package/my-expo-app-test-case/assets/splash.png +0 -0
  152. package/my-expo-app-test-case/babel.config.js +18 -0
  153. package/my-expo-app-test-case/cesconfig.json +35 -0
  154. package/my-expo-app-test-case/components/Button.tsx +19 -0
  155. package/my-expo-app-test-case/components/Container.tsx +9 -0
  156. package/my-expo-app-test-case/components/EditScreenInfo.tsx +34 -0
  157. package/my-expo-app-test-case/components/ScreenContent.tsx +25 -0
  158. package/my-expo-app-test-case/components/nativewindui/ActivityIndicator.tsx +13 -0
  159. package/my-expo-app-test-case/components/nativewindui/AdaptiveSearchHeader/AdaptiveSearchHeader.ios.tsx +97 -0
  160. package/my-expo-app-test-case/components/nativewindui/AdaptiveSearchHeader/AdaptiveSearchHeader.tsx +264 -0
  161. package/my-expo-app-test-case/components/nativewindui/AdaptiveSearchHeader/index.ts +1 -0
  162. package/my-expo-app-test-case/components/nativewindui/AdaptiveSearchHeader/types.ts +95 -0
  163. package/my-expo-app-test-case/components/nativewindui/Alert/Alert.ios.tsx +65 -0
  164. package/my-expo-app-test-case/components/nativewindui/Alert/Alert.tsx +291 -0
  165. package/my-expo-app-test-case/components/nativewindui/Alert/index.ts +1 -0
  166. package/my-expo-app-test-case/components/nativewindui/Alert/types.ts +27 -0
  167. package/my-expo-app-test-case/components/nativewindui/Badge.tsx +84 -0
  168. package/my-expo-app-test-case/components/nativewindui/Button.tsx +156 -0
  169. package/my-expo-app-test-case/components/nativewindui/Checkbox.tsx +61 -0
  170. package/my-expo-app-test-case/components/nativewindui/ContextMenu/ContextMenu.ios.tsx +221 -0
  171. package/my-expo-app-test-case/components/nativewindui/ContextMenu/ContextMenu.tsx +420 -0
  172. package/my-expo-app-test-case/components/nativewindui/ContextMenu/index.ts +1 -0
  173. package/my-expo-app-test-case/components/nativewindui/ContextMenu/types.ts +91 -0
  174. package/my-expo-app-test-case/components/nativewindui/ContextMenu/utils.ts +14 -0
  175. package/my-expo-app-test-case/components/nativewindui/DrawerContent.tsx +145 -0
  176. package/my-expo-app-test-case/components/nativewindui/DropdownMenu/DropdownMenu.ios.tsx +168 -0
  177. package/my-expo-app-test-case/components/nativewindui/DropdownMenu/DropdownMenu.tsx +330 -0
  178. package/my-expo-app-test-case/components/nativewindui/DropdownMenu/index.ts +1 -0
  179. package/my-expo-app-test-case/components/nativewindui/DropdownMenu/types.ts +93 -0
  180. package/my-expo-app-test-case/components/nativewindui/DropdownMenu/utils.ts +14 -0
  181. package/my-expo-app-test-case/components/nativewindui/Form.tsx +125 -0
  182. package/my-expo-app-test-case/components/nativewindui/LargeTitleHeader/LargeTitleHeader.ios.tsx +99 -0
  183. package/my-expo-app-test-case/components/nativewindui/LargeTitleHeader/LargeTitleHeader.tsx +288 -0
  184. package/my-expo-app-test-case/components/nativewindui/LargeTitleHeader/index.ts +1 -0
  185. package/my-expo-app-test-case/components/nativewindui/LargeTitleHeader/types.ts +89 -0
  186. package/my-expo-app-test-case/components/nativewindui/List.tsx +433 -0
  187. package/my-expo-app-test-case/components/nativewindui/SearchInput/SearchInput.ios.tsx +177 -0
  188. package/my-expo-app-test-case/components/nativewindui/SearchInput/SearchInput.tsx +86 -0
  189. package/my-expo-app-test-case/components/nativewindui/SearchInput/index.tsx +1 -0
  190. package/my-expo-app-test-case/components/nativewindui/SearchInput/types.ts +12 -0
  191. package/my-expo-app-test-case/components/nativewindui/SegmentedControl/SegmentedControl.ios.tsx +31 -0
  192. package/my-expo-app-test-case/components/nativewindui/SegmentedControl/SegmentedControl.tsx +55 -0
  193. package/my-expo-app-test-case/components/nativewindui/SegmentedControl/index.ts +1 -0
  194. package/my-expo-app-test-case/components/nativewindui/SegmentedControl/types.ts +15 -0
  195. package/my-expo-app-test-case/components/nativewindui/Stepper.tsx +62 -0
  196. package/my-expo-app-test-case/components/nativewindui/Text.tsx +55 -0
  197. package/my-expo-app-test-case/components/nativewindui/TextField/TextField.ios.tsx +85 -0
  198. package/my-expo-app-test-case/components/nativewindui/TextField/TextField.tsx +326 -0
  199. package/my-expo-app-test-case/components/nativewindui/TextField/index.tsx +1 -0
  200. package/my-expo-app-test-case/components/nativewindui/TextField/types.ts +26 -0
  201. package/my-expo-app-test-case/components/nativewindui/Toolbar.tsx +116 -0
  202. package/my-expo-app-test-case/components/nativewindui/examples/a-user-created-file.tsx +0 -0
  203. package/my-expo-app-test-case/components/nativewindui/examples/selectable-text.tsx +43 -0
  204. package/my-expo-app-test-case/components/nativewindui/examples/text.tsx +43 -0
  205. package/my-expo-app-test-case/global.css +3 -0
  206. package/my-expo-app-test-case/metro.config.js +12 -0
  207. package/my-expo-app-test-case/package-lock.json +19141 -0
  208. package/my-expo-app-test-case/package.json +73 -0
  209. package/my-expo-app-test-case/prettier.config.js +11 -0
  210. package/my-expo-app-test-case/tailwind.config.js +11 -0
  211. package/no-install/app/+html.tsx +46 -0
  212. package/no-install/app/+not-found.tsx +25 -0
  213. package/no-install/app/_layout.tsx +7 -0
  214. package/no-install/app/details.tsx +20 -0
  215. package/no-install/app/index.tsx +19 -0
  216. package/no-install/app-env.d.ts +2 -0
  217. package/no-install/app.json +41 -0
  218. package/no-install/assets/adaptive-icon.png +0 -0
  219. package/no-install/assets/favicon.png +0 -0
  220. package/no-install/assets/icon.png +0 -0
  221. package/no-install/assets/splash.png +0 -0
  222. package/no-install/babel.config.js +13 -0
  223. package/no-install/cesconfig.json +35 -0
  224. package/no-install/components/Button.tsx +25 -0
  225. package/no-install/components/Container.tsx +9 -0
  226. package/no-install/components/EditScreenInfo.tsx +31 -0
  227. package/no-install/components/ScreenContent.tsx +29 -0
  228. package/no-install/components/nativewindui/Slider.tsx +26 -0
  229. package/no-install/global.css +3 -0
  230. package/no-install/metro.config.js +10 -0
  231. package/no-install/package-lock.json +17505 -0
  232. package/no-install/package.json +59 -0
  233. package/no-install/prettier.config.js +10 -0
  234. package/no-install/tailwind.config.js +14 -0
  235. package/package.json +2 -2
@@ -0,0 +1,73 @@
1
+ {
2
+ "name": "my-expo-app",
3
+ "version": "1.0.0",
4
+ "main": "expo-router/entry",
5
+ "scripts": {
6
+ "android": "expo start --android",
7
+ "ios": "expo start --ios",
8
+ "start": "expo start",
9
+ "prebuild": "expo prebuild",
10
+ "lint": "eslint \"**/*.{js,jsx,ts,tsx}\" && prettier -c \"**/*.{js,jsx,ts,tsx,json}\"",
11
+ "format": "eslint \"**/*.{js,jsx,ts,tsx}\" --fix && prettier \"**/*.{js,jsx,ts,tsx,json}\" --write",
12
+ "web": "expo start --web"
13
+ },
14
+ "dependencies": {
15
+ "@expo/vector-icons": "^14.0.0",
16
+ "@react-native-segmented-control/segmented-control": "2.5.2",
17
+ "@react-navigation/bottom-tabs": "^6.6.1",
18
+ "@react-navigation/drawer": "^6.7.2",
19
+ "@react-navigation/native": "^6.1.7",
20
+ "@rn-primitives/alert-dialog": "^1.0.3",
21
+ "@rn-primitives/checkbox": "^1.0.3",
22
+ "@rn-primitives/context-menu": "^1.0.3",
23
+ "@rn-primitives/dropdown-menu": "^1.0.3",
24
+ "@rn-primitives/hooks": "^1.0.3",
25
+ "@rn-primitives/portal": "^1.0.3",
26
+ "@rn-primitives/slot": "^1.0.3",
27
+ "expo": "^51.0.0",
28
+ "expo-blur": "~13.0.2",
29
+ "expo-constants": "~16.0.1",
30
+ "expo-haptics": "~13.0.1",
31
+ "expo-linking": "~6.3.1",
32
+ "expo-router": "~3.5.14",
33
+ "expo-status-bar": "~1.12.1",
34
+ "expo-system-ui": "~3.0.4",
35
+ "expo-web-browser": "~13.0.3",
36
+ "nativewind": "^4.0.1",
37
+ "react": "18.2.0",
38
+ "react-dom": "18.2.0",
39
+ "react-native": "0.74.1",
40
+ "react-native-gesture-handler": "~2.16.1",
41
+ "react-native-ios-context-menu": "^2.5.1",
42
+ "react-native-ios-utilities": "^4.4.5",
43
+ "react-native-keyboard-controller": "^1.12.7",
44
+ "react-native-reanimated": "~3.10.1",
45
+ "react-native-safe-area-context": "4.10.1",
46
+ "react-native-screens": "3.31.1",
47
+ "react-native-web": "~0.19.10"
48
+ },
49
+ "devDependencies": {
50
+ "@babel/core": "^7.20.0",
51
+ "@types/react": "~18.2.45",
52
+ "@typescript-eslint/eslint-plugin": "^7.7.0",
53
+ "@typescript-eslint/parser": "^7.7.0",
54
+ "eslint": "^8.57.0",
55
+ "eslint-config-universe": "^12.0.1",
56
+ "prettier": "^3.2.5",
57
+ "prettier-plugin-tailwindcss": "^0.5.11",
58
+ "tailwindcss": "^3.4.0",
59
+ "typescript": "~5.3.3"
60
+ },
61
+ "eslintConfig": {
62
+ "extends": "universe/native",
63
+ "root": true
64
+ },
65
+ "expo": {
66
+ "install": {
67
+ "exclude": [
68
+ "react-native-safe-area-context"
69
+ ]
70
+ }
71
+ },
72
+ "private": true
73
+ }
@@ -0,0 +1,11 @@
1
+ module.exports = {
2
+ printWidth: 100,
3
+ tabWidth: 2,
4
+ singleQuote: true,
5
+ bracketSameLine: true,
6
+ trailingComma: 'es5',
7
+
8
+ plugins: [require.resolve("prettier-plugin-tailwindcss")],
9
+ tailwindAttributes: ["className"],
10
+
11
+ };
@@ -0,0 +1,11 @@
1
+ /** @type {import('tailwindcss').Config} */
2
+ module.exports = {
3
+
4
+ content: ["./index.{js,ts,tsx}", "./app/**/*.{js,ts,tsx}", "./components/**/*.{js,ts,tsx}"],
5
+
6
+ presets: [require("nativewind/preset")],
7
+ theme: {
8
+ extend: {},
9
+ },
10
+ plugins: [],
11
+ }
@@ -0,0 +1,46 @@
1
+ import { ScrollViewStyleReset } from "expo-router/html";
2
+
3
+ // This file is web-only and used to configure the root HTML for every
4
+ // web page during static rendering.
5
+ // The contents of this function only run in Node.js environments and
6
+ // do not have access to the DOM or browser APIs.
7
+ export default function Root({ children }: { children: React.ReactNode }) {
8
+ return (
9
+ <html lang="en">
10
+ <head>
11
+ <meta charSet="utf-8" />
12
+ <meta httpEquiv="X-UA-Compatible" content="IE=edge" />
13
+
14
+ {/*
15
+ This viewport disables scaling which makes the mobile website act more like a native app.
16
+ However this does reduce built-in accessibility. If you want to enable scaling, use this instead:
17
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
18
+ */}
19
+ <meta
20
+ name="viewport"
21
+ content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1.00001,viewport-fit=cover"
22
+ />
23
+ {/*
24
+ Disable body scrolling on web. This makes ScrollView components work closer to how they do on native.
25
+ However, body scrolling is often nice to have for mobile web. If you want to enable it, remove this line.
26
+ */}
27
+ <ScrollViewStyleReset />
28
+
29
+ {/* Using raw CSS styles as an escape-hatch to ensure the background color never flickers in dark-mode. */}
30
+ <style dangerouslySetInnerHTML={{ __html: responsiveBackground }} />
31
+ {/* Add any additional <head> elements that you want globally available on web... */}
32
+ </head>
33
+ <body>{children}</body>
34
+ </html>
35
+ );
36
+ }
37
+
38
+ const responsiveBackground = `
39
+ body {
40
+ background-color: #fff;
41
+ }
42
+ @media (prefers-color-scheme: dark) {
43
+ body {
44
+ background-color: #000;
45
+ }
46
+ }`;
@@ -0,0 +1,25 @@
1
+ import { Link, Stack } from "expo-router";
2
+
3
+ import { Text } from "react-native";
4
+
5
+ import { Container } from "~/components/Container";
6
+
7
+ export default function NotFoundScreen() {
8
+ return (
9
+ <>
10
+ <Stack.Screen options={{ title: "Oops!" }} />
11
+ <Container>
12
+ <Text className={styles.title}>This screen doesn't exist.</Text>
13
+ <Link href="/" className={styles.link}>
14
+ <Text className={styles.linkText}>Go to home screen!</Text>
15
+ </Link>
16
+ </Container>
17
+ </>
18
+ );
19
+ }
20
+
21
+ const styles = {
22
+ title: `text-xl font-bold`,
23
+ link: `mt-4 pt-4`,
24
+ linkText: `text-base text-[#2e78b7]`,
25
+ };
@@ -0,0 +1,7 @@
1
+ import "../global.css";
2
+
3
+ import { Stack } from "expo-router";
4
+
5
+ export default function Layout() {
6
+ return <Stack />;
7
+ }
@@ -0,0 +1,20 @@
1
+ import { Stack, useLocalSearchParams } from "expo-router";
2
+
3
+ import { Container } from "~/components/Container";
4
+ import { ScreenContent } from "~/components/ScreenContent";
5
+
6
+ export default function Details() {
7
+ const { name } = useLocalSearchParams();
8
+
9
+ return (
10
+ <>
11
+ <Stack.Screen options={{ title: "Details" }} />
12
+ <Container>
13
+ <ScreenContent
14
+ path="screens/details.tsx"
15
+ title={`Showing details for user ${name}`}
16
+ />
17
+ </Container>
18
+ </>
19
+ );
20
+ }
@@ -0,0 +1,19 @@
1
+ import { Stack, Link } from "expo-router";
2
+
3
+ import { Button } from "~/components/Button";
4
+ import { Container } from "~/components/Container";
5
+ import { ScreenContent } from "~/components/ScreenContent";
6
+
7
+ export default function Home() {
8
+ return (
9
+ <>
10
+ <Stack.Screen options={{ title: "Home" }} />
11
+ <Container>
12
+ <ScreenContent path="app/index.tsx" title="Home"></ScreenContent>
13
+ <Link href={{ pathname: "/details", params: { name: "Dan" } }} asChild>
14
+ <Button title="Show Details" />
15
+ </Link>
16
+ </Container>
17
+ </>
18
+ );
19
+ }
@@ -0,0 +1,2 @@
1
+ // @ts-ignore
2
+ /// <reference types="nativewind/types" />
@@ -0,0 +1,41 @@
1
+ {
2
+ "expo": {
3
+ "name": "no-install",
4
+ "slug": "no-install",
5
+ "version": "1.0.0",
6
+
7
+ "scheme": "no-install",
8
+ "web": {
9
+ "bundler": "metro",
10
+ "output": "static",
11
+ "favicon": "./assets/favicon.png"
12
+ },
13
+ "plugins": ["expo-router"],
14
+ "experiments": {
15
+ "typedRoutes": true,
16
+
17
+ "tsconfigPaths": true
18
+ },
19
+
20
+ "orientation": "portrait",
21
+ "icon": "./assets/icon.png",
22
+
23
+ "userInterfaceStyle": "light",
24
+
25
+ "splash": {
26
+ "image": "./assets/splash.png",
27
+ "resizeMode": "contain",
28
+ "backgroundColor": "#ffffff"
29
+ },
30
+ "assetBundlePatterns": ["**/*"],
31
+ "ios": {
32
+ "supportsTablet": true
33
+ },
34
+ "android": {
35
+ "adaptiveIcon": {
36
+ "foregroundImage": "./assets/adaptive-icon.png",
37
+ "backgroundColor": "#ffffff"
38
+ }
39
+ }
40
+ }
41
+ }
Binary file
Binary file
Binary file
@@ -0,0 +1,13 @@
1
+ module.exports = function (api) {
2
+ api.cache(true);
3
+ let plugins = [];
4
+
5
+ return {
6
+ presets: [
7
+ ["babel-preset-expo", { jsxImportSource: "nativewind" }],
8
+ "nativewind/babel",
9
+ ],
10
+
11
+ plugins,
12
+ };
13
+ };
@@ -0,0 +1,35 @@
1
+ {
2
+ "cesVersion": "2.11.17",
3
+ "projectName": "no-install",
4
+ "packages": [
5
+ {
6
+ "name": "expo-router",
7
+ "type": "navigation",
8
+ "options": {
9
+ "type": "stack"
10
+ }
11
+ },
12
+ {
13
+ "name": "nativewind",
14
+ "type": "styling"
15
+ }
16
+ ],
17
+ "flags": {
18
+ "noGit": false,
19
+ "noInstall": true,
20
+ "overwrite": false,
21
+ "importAlias": true,
22
+ "packageManager": "npm",
23
+ "eas": false
24
+ },
25
+ "packageManager": {
26
+ "type": "npm",
27
+ "version": "10.8.1"
28
+ },
29
+ "os": {
30
+ "type": "Darwin",
31
+ "platform": "darwin",
32
+ "arch": "arm64",
33
+ "kernelVersion": "23.3.0"
34
+ }
35
+ }
@@ -0,0 +1,25 @@
1
+ import { forwardRef } from "react";
2
+ import { Text, TouchableOpacity, TouchableOpacityProps } from "react-native";
3
+
4
+ type ButtonProps = {
5
+ title: string;
6
+ } & TouchableOpacityProps;
7
+
8
+ export const Button = forwardRef<TouchableOpacity, ButtonProps>(
9
+ ({ title, ...touchableProps }, ref) => {
10
+ return (
11
+ <TouchableOpacity
12
+ ref={ref}
13
+ {...touchableProps}
14
+ className={`${styles.button} ${touchableProps.className}`}
15
+ >
16
+ <Text className={styles.buttonText}>{title}</Text>
17
+ </TouchableOpacity>
18
+ );
19
+ },
20
+ );
21
+
22
+ const styles = {
23
+ button: "items-center bg-indigo-500 rounded-[28px] shadow-md p-4",
24
+ buttonText: "text-white text-lg font-semibold text-center",
25
+ };
@@ -0,0 +1,9 @@
1
+ import { SafeAreaView } from "react-native";
2
+
3
+ export const Container = ({ children }: { children: React.ReactNode }) => {
4
+ return <SafeAreaView className={styles.container}>{children}</SafeAreaView>;
5
+ };
6
+
7
+ const styles = {
8
+ container: "flex flex-1 p-6",
9
+ };
@@ -0,0 +1,31 @@
1
+ import { Text, View } from "react-native";
2
+
3
+ export const EditScreenInfo = ({ path }: { path: string }) => {
4
+ const title = "Open up the code for this screen:";
5
+ const description =
6
+ "Change any of the text, save the file, and your app will automatically update.";
7
+
8
+ return (
9
+ <View>
10
+ <View className={styles.getStartedContainer}>
11
+ <Text className={styles.getStartedText}>{title}</Text>
12
+ <View
13
+ className={styles.codeHighlightContainer + styles.homeScreenFilename}
14
+ >
15
+ <Text>{path}</Text>
16
+ </View>
17
+ <Text className={styles.getStartedText}>{description}</Text>
18
+ </View>
19
+ </View>
20
+ );
21
+ };
22
+
23
+ const styles = {
24
+ codeHighlightContainer: `rounded-md px-1`,
25
+ getStartedContainer: `items-center mx-12`,
26
+ getStartedText: `text-lg leading-6 text-center`,
27
+ helpContainer: `items-center mx-5 mt-4`,
28
+ helpLink: `py-4`,
29
+ helpLinkText: `text-center`,
30
+ homeScreenFilename: `my-2`,
31
+ };
@@ -0,0 +1,29 @@
1
+ import { Text, View } from "react-native";
2
+
3
+ import { EditScreenInfo } from "./EditScreenInfo";
4
+
5
+ type ScreenContentProps = {
6
+ title: string;
7
+ path: string;
8
+ children?: React.ReactNode;
9
+ };
10
+
11
+ export const ScreenContent = ({
12
+ title,
13
+ path,
14
+ children,
15
+ }: ScreenContentProps) => {
16
+ return (
17
+ <View className={styles.container}>
18
+ <Text className={styles.title}>{title}</Text>
19
+ <View className={styles.separator} />
20
+ <EditScreenInfo path={path} />
21
+ {children}
22
+ </View>
23
+ );
24
+ };
25
+ const styles = {
26
+ container: `items-center flex-1 justify-center`,
27
+ separator: `h-[1px] my-7 w-4/5 bg-gray-200`,
28
+ title: `text-xl font-bold`,
29
+ };
@@ -0,0 +1,26 @@
1
+ import RNSlider from '@react-native-community/slider';
2
+ import { Platform } from 'react-native';
3
+
4
+ import { useColorScheme } from '~/lib/useColorScheme';
5
+ import { COLORS } from '~/theme/colors';
6
+
7
+ function Slider({
8
+ thumbTintColor,
9
+ minimumTrackTintColor,
10
+ maximumTrackTintColor,
11
+ ...props
12
+ }: React.ComponentPropsWithoutRef<typeof RNSlider>) {
13
+ const { colors } = useColorScheme();
14
+ return (
15
+ <RNSlider
16
+ thumbTintColor={thumbTintColor ?? Platform.OS === 'ios' ? COLORS.white : colors.primary}
17
+ minimumTrackTintColor={minimumTrackTintColor ?? colors.primary}
18
+ maximumTrackTintColor={
19
+ maximumTrackTintColor ?? Platform.OS === 'android' ? colors.primary : undefined
20
+ }
21
+ {...props}
22
+ />
23
+ );
24
+ }
25
+
26
+ export { Slider };
@@ -0,0 +1,3 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
@@ -0,0 +1,10 @@
1
+ // Learn more https://docs.expo.io/guides/customizing-metro
2
+ const { getDefaultConfig } = require("expo/metro-config");
3
+
4
+ const { withNativeWind } = require("nativewind/metro");
5
+
6
+ /** @type {import('expo/metro-config').MetroConfig} */
7
+ // eslint-disable-next-line no-undef
8
+ const config = getDefaultConfig(__dirname);
9
+
10
+ module.exports = withNativeWind(config, { input: "./global.css" });