one 1.1.298 → 1.1.300

Sign up to get free protection for your applications and to get access to all the features.
Files changed (343) hide show
  1. package/dist/cjs/cleanUrl.js +1 -1
  2. package/dist/cjs/cleanUrl.js.map +1 -1
  3. package/dist/cjs/cleanUrl.native.js +1 -1
  4. package/dist/cjs/cleanUrl.native.js.map +1 -1
  5. package/dist/cjs/cli/runAndroid.js +34 -0
  6. package/dist/cjs/cli/runAndroid.js.map +6 -0
  7. package/dist/cjs/cli/runAndroid.native.js +39 -0
  8. package/dist/cjs/cli/runAndroid.native.js.map +6 -0
  9. package/dist/cjs/cli/runIos.js +34 -0
  10. package/dist/cjs/cli/runIos.js.map +6 -0
  11. package/dist/cjs/cli/runIos.native.js +39 -0
  12. package/dist/cjs/cli/runIos.native.js.map +6 -0
  13. package/dist/cjs/cli.js +23 -1
  14. package/dist/cjs/cli.js.map +1 -1
  15. package/dist/cjs/cli.native.js +25 -1
  16. package/dist/cjs/cli.native.js.map +2 -2
  17. package/dist/cjs/createHandleRequest.js +2 -2
  18. package/dist/cjs/createHandleRequest.js.map +1 -1
  19. package/dist/cjs/createHandleRequest.native.js +2 -2
  20. package/dist/cjs/createHandleRequest.native.js.map +2 -2
  21. package/dist/cjs/vite/createFileSystemRouter.js +1 -1
  22. package/dist/cjs/vite/createFileSystemRouter.js.map +1 -1
  23. package/dist/cjs/vite/createFileSystemRouter.native.js +1 -1
  24. package/dist/cjs/vite/createFileSystemRouter.native.js.map +1 -1
  25. package/dist/cjs/vite/replaceLoader.js +7 -1
  26. package/dist/cjs/vite/replaceLoader.js.map +1 -1
  27. package/dist/cjs/vite/replaceLoader.native.js +7 -1
  28. package/dist/cjs/vite/replaceLoader.native.js.map +1 -1
  29. package/dist/esm/Root.native.js +110 -104
  30. package/dist/esm/Root.native.js.map +6 -1
  31. package/dist/esm/Route.native.js +12 -10
  32. package/dist/esm/Route.native.js.map +6 -1
  33. package/dist/esm/cleanUrl.js +1 -1
  34. package/dist/esm/cleanUrl.js.map +1 -1
  35. package/dist/esm/cleanUrl.mjs +1 -1
  36. package/dist/esm/cleanUrl.mjs.map +1 -1
  37. package/dist/esm/cleanUrl.native.js +13 -14
  38. package/dist/esm/cleanUrl.native.js.map +6 -1
  39. package/dist/esm/cli/label-process.native.js +5 -4
  40. package/dist/esm/cli/label-process.native.js.map +6 -1
  41. package/dist/esm/cli/main.native.js +8 -13
  42. package/dist/esm/cli/main.native.js.map +6 -1
  43. package/dist/esm/cli/prebuild.native.js +5 -5
  44. package/dist/esm/cli/prebuild.native.js.map +6 -1
  45. package/dist/esm/cli/run.native.js +21 -28
  46. package/dist/esm/cli/run.native.js.map +6 -1
  47. package/dist/esm/cli/runAndroid.js +10 -0
  48. package/dist/esm/cli/runAndroid.js.map +6 -0
  49. package/dist/esm/cli/runAndroid.mjs +10 -0
  50. package/dist/esm/cli/runAndroid.mjs.map +1 -0
  51. package/dist/esm/cli/runAndroid.native.js +10 -0
  52. package/dist/esm/cli/runAndroid.native.js.map +6 -0
  53. package/dist/esm/cli/runIos.js +10 -0
  54. package/dist/esm/cli/runIos.js.map +6 -0
  55. package/dist/esm/cli/runIos.mjs +10 -0
  56. package/dist/esm/cli/runIos.mjs.map +1 -0
  57. package/dist/esm/cli/runIos.native.js +10 -0
  58. package/dist/esm/cli/runIos.native.js.map +6 -0
  59. package/dist/esm/cli.js +23 -1
  60. package/dist/esm/cli.js.map +1 -1
  61. package/dist/esm/cli.mjs +33 -1
  62. package/dist/esm/cli.mjs.map +1 -1
  63. package/dist/esm/cli.native.js +143 -148
  64. package/dist/esm/cli.native.js.map +6 -1
  65. package/dist/esm/clientLoaderResolver.native.js +9 -6
  66. package/dist/esm/clientLoaderResolver.native.js.map +6 -1
  67. package/dist/esm/config.native.js +12 -11
  68. package/dist/esm/config.native.js.map +6 -1
  69. package/dist/esm/constants.native.js +7 -5
  70. package/dist/esm/constants.native.js.map +6 -1
  71. package/dist/esm/createApp.native.js +13 -9
  72. package/dist/esm/createApp.native.js.map +6 -1
  73. package/dist/esm/createHandleRequest.js +2 -2
  74. package/dist/esm/createHandleRequest.js.map +1 -1
  75. package/dist/esm/createHandleRequest.mjs +2 -2
  76. package/dist/esm/createHandleRequest.mjs.map +1 -1
  77. package/dist/esm/createHandleRequest.native.js +57 -66
  78. package/dist/esm/createHandleRequest.native.js.map +6 -1
  79. package/dist/esm/createRoute.native.js +16 -16
  80. package/dist/esm/createRoute.native.js.map +6 -1
  81. package/dist/esm/fallbackViews/Sitemap.native.js +6 -3
  82. package/dist/esm/fallbackViews/Sitemap.native.js.map +6 -1
  83. package/dist/esm/fallbackViews/Unmatched.native.js +5 -3
  84. package/dist/esm/fallbackViews/Unmatched.native.js.map +6 -1
  85. package/dist/esm/fork/NavigationContainer.native.js +24 -31
  86. package/dist/esm/fork/NavigationContainer.native.js.map +6 -1
  87. package/dist/esm/fork/createMemoryHistory.native.js +99 -115
  88. package/dist/esm/fork/createMemoryHistory.native.js.map +6 -1
  89. package/dist/esm/fork/extractPathFromURL.native.js +16 -15
  90. package/dist/esm/fork/extractPathFromURL.native.js.map +6 -1
  91. package/dist/esm/fork/findFocusedRoute.native.js +6 -5
  92. package/dist/esm/fork/findFocusedRoute.native.js.map +6 -1
  93. package/dist/esm/fork/getPathFromState.native.js +127 -140
  94. package/dist/esm/fork/getPathFromState.native.js.map +6 -1
  95. package/dist/esm/fork/getStateFromPath.native.js +292 -288
  96. package/dist/esm/fork/getStateFromPath.native.js.map +6 -1
  97. package/dist/esm/fork/useLinking.native.js +70 -61
  98. package/dist/esm/fork/useLinking.native.js.map +6 -1
  99. package/dist/esm/fork/validatePathConfig.native.js +15 -9
  100. package/dist/esm/fork/validatePathConfig.native.js.map +6 -1
  101. package/dist/esm/getLinkingConfig.native.js +11 -6
  102. package/dist/esm/getLinkingConfig.native.js.map +6 -1
  103. package/dist/esm/getReactNavigationConfig.native.js +28 -20
  104. package/dist/esm/getReactNavigationConfig.native.js.map +6 -1
  105. package/dist/esm/getRoutes.native.js +249 -229
  106. package/dist/esm/getRoutes.native.js.map +6 -1
  107. package/dist/esm/getURL.native.js +4 -4
  108. package/dist/esm/getURL.native.js.map +6 -1
  109. package/dist/esm/head/Head.android.js +5 -3
  110. package/dist/esm/head/Head.android.js.map +6 -1
  111. package/dist/esm/head/Head.ios.js +144 -132
  112. package/dist/esm/head/Head.ios.js.map +6 -1
  113. package/dist/esm/head/Head.native.js +7 -7
  114. package/dist/esm/head/Head.native.js.map +6 -1
  115. package/dist/esm/head/HeadModule.native.js +6 -6
  116. package/dist/esm/head/HeadModule.native.js.map +6 -1
  117. package/dist/esm/head/index.native.js +2 -2
  118. package/dist/esm/head/index.native.js.map +6 -1
  119. package/dist/esm/head/types.native.js +1 -2
  120. package/dist/esm/head/types.native.js.map +6 -1
  121. package/dist/esm/head/url.native.js +10 -8
  122. package/dist/esm/head/url.native.js.map +6 -1
  123. package/dist/esm/hooks.native.js +53 -34
  124. package/dist/esm/hooks.native.js.map +6 -1
  125. package/dist/esm/imperative-api.native.js +9 -6
  126. package/dist/esm/imperative-api.native.js.map +6 -1
  127. package/dist/esm/import-mode/index.android.js +4 -3
  128. package/dist/esm/import-mode/index.android.js.map +6 -1
  129. package/dist/esm/import-mode/index.ios.js +4 -3
  130. package/dist/esm/import-mode/index.ios.js.map +6 -1
  131. package/dist/esm/import-mode/index.native.js +3 -1
  132. package/dist/esm/import-mode/index.native.js.map +6 -1
  133. package/dist/esm/index.native.js +65 -27
  134. package/dist/esm/index.native.js.map +6 -1
  135. package/dist/esm/interfaces/router.native.js +4 -2
  136. package/dist/esm/interfaces/router.native.js.map +6 -1
  137. package/dist/esm/layouts/Drawer.native.js +7 -6
  138. package/dist/esm/layouts/Drawer.native.js.map +6 -1
  139. package/dist/esm/layouts/Stack.native.js +7 -6
  140. package/dist/esm/layouts/Stack.native.js.map +6 -1
  141. package/dist/esm/layouts/Tabs.native.js +42 -39
  142. package/dist/esm/layouts/Tabs.native.js.map +6 -1
  143. package/dist/esm/layouts/withLayoutContext.native.js +51 -48
  144. package/dist/esm/layouts/withLayoutContext.native.js.map +6 -1
  145. package/dist/esm/link/Link.native.js +62 -53
  146. package/dist/esm/link/Link.native.js.map +6 -1
  147. package/dist/esm/link/Redirect.native.js +8 -9
  148. package/dist/esm/link/Redirect.native.js.map +6 -1
  149. package/dist/esm/link/href.native.js +28 -27
  150. package/dist/esm/link/href.native.js.map +6 -1
  151. package/dist/esm/link/linking.native.js +51 -40
  152. package/dist/esm/link/linking.native.js.map +6 -1
  153. package/dist/esm/link/path.native.js +28 -19
  154. package/dist/esm/link/path.native.js.map +6 -1
  155. package/dist/esm/link/useLinkTo.native.js +22 -20
  156. package/dist/esm/link/useLinkTo.native.js.map +6 -1
  157. package/dist/esm/link/useLoadedNavigation.native.js +30 -23
  158. package/dist/esm/link/useLoadedNavigation.native.js.map +6 -1
  159. package/dist/esm/matchers.native.js +16 -3
  160. package/dist/esm/matchers.native.js.map +6 -1
  161. package/dist/esm/platform.native.js +4 -2
  162. package/dist/esm/platform.native.js.map +6 -1
  163. package/dist/esm/polyfills-mobile.native.js +4 -5
  164. package/dist/esm/polyfills-mobile.native.js.map +6 -1
  165. package/dist/esm/polyfills-server.native.js +1 -1
  166. package/dist/esm/polyfills-server.native.js.map +6 -1
  167. package/dist/esm/render.native.js +3 -1
  168. package/dist/esm/render.native.js.map +6 -1
  169. package/dist/esm/router/RouterStore.native.js +1 -2
  170. package/dist/esm/router/RouterStore.native.js.map +6 -1
  171. package/dist/esm/router/constants.native.js +4 -2
  172. package/dist/esm/router/constants.native.js.map +6 -1
  173. package/dist/esm/router/getNormalizedStatePath.native.js +18 -17
  174. package/dist/esm/router/getNormalizedStatePath.native.js.map +6 -1
  175. package/dist/esm/router/lastAction.native.js +10 -9
  176. package/dist/esm/router/lastAction.native.js.map +6 -1
  177. package/dist/esm/router/router.native.js +135 -114
  178. package/dist/esm/router/router.native.js.map +6 -1
  179. package/dist/esm/router/serverLocationContext.native.js +4 -2
  180. package/dist/esm/router/serverLocationContext.native.js.map +6 -1
  181. package/dist/esm/router/useInitializeOneRouter.native.js +8 -5
  182. package/dist/esm/router/useInitializeOneRouter.native.js.map +6 -1
  183. package/dist/esm/serve.native.js +77 -104
  184. package/dist/esm/serve.native.js.map +6 -1
  185. package/dist/esm/server/createRoutesManifest.native.js +14 -11
  186. package/dist/esm/server/createRoutesManifest.native.js.map +6 -1
  187. package/dist/esm/server/getServerManifest.native.js +61 -67
  188. package/dist/esm/server/getServerManifest.native.js.map +6 -1
  189. package/dist/esm/server-render.native.js +9 -10
  190. package/dist/esm/server-render.native.js.map +6 -1
  191. package/dist/esm/sortRoutes.native.js +27 -17
  192. package/dist/esm/sortRoutes.native.js.map +6 -1
  193. package/dist/esm/typed-routes/generateRouteTypes.native.js +10 -11
  194. package/dist/esm/typed-routes/generateRouteTypes.native.js.map +6 -1
  195. package/dist/esm/typed-routes/getTypedRoutesDeclarationFile.native.js +38 -37
  196. package/dist/esm/typed-routes/getTypedRoutesDeclarationFile.native.js.map +6 -1
  197. package/dist/esm/types.native.js +1 -2
  198. package/dist/esm/types.native.js.map +6 -1
  199. package/dist/esm/useFocusEffect.native.js +25 -22
  200. package/dist/esm/useFocusEffect.native.js.map +6 -1
  201. package/dist/esm/useLoader.native.js +50 -50
  202. package/dist/esm/useLoader.native.js.map +6 -1
  203. package/dist/esm/useNavigation.native.js +23 -19
  204. package/dist/esm/useNavigation.native.js.map +6 -1
  205. package/dist/esm/useScreens.native.js +143 -160
  206. package/dist/esm/useScreens.native.js.map +6 -1
  207. package/dist/esm/useViteRoutes.native.js +25 -28
  208. package/dist/esm/useViteRoutes.native.js.map +6 -1
  209. package/dist/esm/utils/assertIsReady.native.js +6 -3
  210. package/dist/esm/utils/assertIsReady.native.js.map +6 -1
  211. package/dist/esm/utils/dynamicImport.native.js +5 -3
  212. package/dist/esm/utils/dynamicImport.native.js.map +6 -1
  213. package/dist/esm/utils/existsAsync.native.js +6 -4
  214. package/dist/esm/utils/existsAsync.native.js.map +6 -1
  215. package/dist/esm/utils/getPageExport.native.js +12 -11
  216. package/dist/esm/utils/getPageExport.native.js.map +6 -1
  217. package/dist/esm/utils/globDir.native.js +5 -3
  218. package/dist/esm/utils/globDir.native.js.map +6 -1
  219. package/dist/esm/utils/hashString.native.js +4 -2
  220. package/dist/esm/utils/hashString.native.js.map +6 -1
  221. package/dist/esm/utils/isResponse.native.js +4 -2
  222. package/dist/esm/utils/isResponse.native.js.map +6 -1
  223. package/dist/esm/utils/isStatus.native.js +4 -2
  224. package/dist/esm/utils/isStatus.native.js.map +6 -1
  225. package/dist/esm/utils/promiseWithResolvers.native.js +7 -7
  226. package/dist/esm/utils/promiseWithResolvers.native.js.map +6 -1
  227. package/dist/esm/utils/rand.native.js +5 -3
  228. package/dist/esm/utils/rand.native.js.map +6 -1
  229. package/dist/esm/utils/redirect.native.js +7 -5
  230. package/dist/esm/utils/redirect.native.js.map +6 -1
  231. package/dist/esm/utils/removeSearch.native.js +4 -2
  232. package/dist/esm/utils/removeSearch.native.js.map +6 -1
  233. package/dist/esm/utils/removeUndefined.native.js +6 -3
  234. package/dist/esm/utils/removeUndefined.native.js.map +6 -1
  235. package/dist/esm/utils/requireResolve.native.js +4 -2
  236. package/dist/esm/utils/requireResolve.native.js.map +6 -1
  237. package/dist/esm/utils/url.native.js +6 -2
  238. package/dist/esm/utils/url.native.js.map +6 -1
  239. package/dist/esm/utils/weakKey.native.js +11 -10
  240. package/dist/esm/utils/weakKey.native.js.map +6 -1
  241. package/dist/esm/utils/weakMemo.native.js +8 -8
  242. package/dist/esm/utils/weakMemo.native.js.map +6 -1
  243. package/dist/esm/views/EmptyRoute.native.js +5 -3
  244. package/dist/esm/views/EmptyRoute.native.js.map +6 -1
  245. package/dist/esm/views/ErrorBoundary.native.js +5 -8
  246. package/dist/esm/views/ErrorBoundary.native.js.map +6 -1
  247. package/dist/esm/views/LoadProgressBar.native.js +58 -57
  248. package/dist/esm/views/LoadProgressBar.native.js.map +6 -1
  249. package/dist/esm/views/Navigator.native.js +54 -71
  250. package/dist/esm/views/Navigator.native.js.map +6 -1
  251. package/dist/esm/views/PreloadLinks.native.js +3 -1
  252. package/dist/esm/views/PreloadLinks.native.js.map +6 -1
  253. package/dist/esm/views/RootErrorBoundary.native.js +39 -29
  254. package/dist/esm/views/RootErrorBoundary.native.js.map +6 -1
  255. package/dist/esm/views/Screen.native.js +12 -12
  256. package/dist/esm/views/Screen.native.js.map +6 -1
  257. package/dist/esm/views/ScrollRestoration.native.js +27 -27
  258. package/dist/esm/views/ScrollRestoration.native.js.map +6 -1
  259. package/dist/esm/views/Try.native.js +40 -37
  260. package/dist/esm/views/Try.native.js.map +6 -1
  261. package/dist/esm/vite/build.native.js +260 -295
  262. package/dist/esm/vite/build.native.js.map +6 -1
  263. package/dist/esm/vite/clientTreeShakePlugin.native.js +34 -33
  264. package/dist/esm/vite/clientTreeShakePlugin.native.js.map +6 -1
  265. package/dist/esm/vite/constants.native.js +6 -4
  266. package/dist/esm/vite/constants.native.js.map +6 -1
  267. package/dist/esm/vite/createFileSystemRouter.js +1 -1
  268. package/dist/esm/vite/createFileSystemRouter.js.map +1 -1
  269. package/dist/esm/vite/createFileSystemRouter.mjs +1 -1
  270. package/dist/esm/vite/createFileSystemRouter.mjs.map +1 -1
  271. package/dist/esm/vite/createFileSystemRouter.native.js +100 -131
  272. package/dist/esm/vite/createFileSystemRouter.native.js.map +6 -1
  273. package/dist/esm/vite/customNodeExternals.native.js +9 -10
  274. package/dist/esm/vite/customNodeExternals.native.js.map +6 -1
  275. package/dist/esm/vite/ensureTsConfig.native.js +7 -5
  276. package/dist/esm/vite/ensureTsConfig.native.js.map +6 -1
  277. package/dist/esm/vite/findDepsToOptimize.native.js +27 -19
  278. package/dist/esm/vite/findDepsToOptimize.native.js.map +6 -1
  279. package/dist/esm/vite/fixDependenciesPlugin.native.js +5 -3
  280. package/dist/esm/vite/fixDependenciesPlugin.native.js.map +6 -1
  281. package/dist/esm/vite/generateTypesForRoutes.native.js +9 -9
  282. package/dist/esm/vite/generateTypesForRoutes.native.js.map +6 -1
  283. package/dist/esm/vite/getManifest.native.js +6 -4
  284. package/dist/esm/vite/getManifest.native.js.map +6 -1
  285. package/dist/esm/vite/headers.native.js +11 -5
  286. package/dist/esm/vite/headers.native.js.map +6 -1
  287. package/dist/esm/vite/loadEnv.native.js +7 -6
  288. package/dist/esm/vite/loadEnv.native.js.map +6 -1
  289. package/dist/esm/vite/makePluginWebOnly.native.js +9 -5
  290. package/dist/esm/vite/makePluginWebOnly.native.js.map +6 -1
  291. package/dist/esm/vite/one.native.js +142 -127
  292. package/dist/esm/vite/one.native.js.map +6 -1
  293. package/dist/esm/vite/removeReactNativeWebAnimatedPlugin.native.js +14 -11
  294. package/dist/esm/vite/removeReactNativeWebAnimatedPlugin.native.js.map +6 -1
  295. package/dist/esm/vite/replaceLoader.js +7 -1
  296. package/dist/esm/vite/replaceLoader.js.map +1 -1
  297. package/dist/esm/vite/replaceLoader.mjs +5 -1
  298. package/dist/esm/vite/replaceLoader.mjs.map +1 -1
  299. package/dist/esm/vite/replaceLoader.native.js +13 -10
  300. package/dist/esm/vite/replaceLoader.native.js.map +6 -1
  301. package/dist/esm/vite/resolveAPIRequest.native.js +44 -47
  302. package/dist/esm/vite/resolveAPIRequest.native.js.map +6 -1
  303. package/dist/esm/vite/server.native.js +5 -4
  304. package/dist/esm/vite/server.native.js.map +6 -1
  305. package/dist/esm/vite/types.native.js +1 -2
  306. package/dist/esm/vite/types.native.js.map +6 -1
  307. package/dist/esm/vite/virtualEntryPlugin.native.js +21 -16
  308. package/dist/esm/vite/virtualEntryPlugin.native.js.map +6 -1
  309. package/dist/esm/vite/vitePluginSsrCss.native.js +61 -50
  310. package/dist/esm/vite/vitePluginSsrCss.native.js.map +6 -1
  311. package/dist/esm/vite.native.js +19 -10
  312. package/dist/esm/vite.native.js.map +6 -1
  313. package/dist/esm/zero/getQueryKey.native.js +5 -3
  314. package/dist/esm/zero/getQueryKey.native.js.map +6 -1
  315. package/dist/esm/zero/isZeroQuery.native.js +4 -2
  316. package/dist/esm/zero/isZeroQuery.native.js.map +6 -1
  317. package/dist/esm/zero/resolveQuery.native.js +9 -8
  318. package/dist/esm/zero/resolveQuery.native.js.map +6 -1
  319. package/dist/esm/zero/subscribeToQuery.native.js +5 -3
  320. package/dist/esm/zero/subscribeToQuery.native.js.map +6 -1
  321. package/dist/esm/zero/types.native.js +1 -2
  322. package/dist/esm/zero/types.native.js.map +6 -1
  323. package/dist/esm/zero/useQuery.native.js +12 -12
  324. package/dist/esm/zero/useQuery.native.js.map +6 -1
  325. package/dist/esm/zero/useQueryZero.native.js +24 -20
  326. package/dist/esm/zero/useQueryZero.native.js.map +6 -1
  327. package/dist/esm/zero.native.js +9 -5
  328. package/dist/esm/zero.native.js.map +6 -1
  329. package/package.json +7 -7
  330. package/src/cleanUrl.ts +1 -1
  331. package/src/cli/runAndroid.ts +6 -0
  332. package/src/cli/runIos.ts +6 -0
  333. package/src/cli.ts +27 -1
  334. package/src/createHandleRequest.ts +7 -0
  335. package/src/vite/createFileSystemRouter.tsx +1 -2
  336. package/src/vite/replaceLoader.ts +7 -1
  337. package/types/cli/runAndroid.d.ts +2 -0
  338. package/types/cli/runAndroid.d.ts.map +1 -0
  339. package/types/cli/runIos.d.ts +2 -0
  340. package/types/cli/runIos.d.ts.map +1 -0
  341. package/types/createHandleRequest.d.ts.map +1 -1
  342. package/types/vite/createFileSystemRouter.d.ts.map +1 -1
  343. package/types/vite/replaceLoader.d.ts.map +1 -1
@@ -1,22 +1,22 @@
1
1
  import { join } from "node:path";
2
2
  import { debounce } from "perfect-debounce";
3
- import { generateRouteTypes } from "../typed-routes/generateRouteTypes.native.js";
3
+ import { generateRouteTypes } from "../typed-routes/generateRouteTypes";
4
4
  function generateTypesForRoutes(options) {
5
5
  return {
6
6
  name: "one-generate-fs-route-types",
7
7
  enforce: "post",
8
8
  apply: "serve",
9
9
  configureServer(server) {
10
- var appDir = join(process.cwd(), "app"),
11
- outFile = join(process.cwd(), "routes.d.ts"),
12
- fileWatcherChangeListener = debounce(async function (type, path) {
13
- (type === "add" || type === "delete") && path.startsWith(appDir) && generateRouteTypes(outFile);
14
- }, 100);
15
- return server.watcher.addListener("all", fileWatcherChangeListener), function () {
10
+ var appDir = join(process.cwd(), "app"), outFile = join(process.cwd(), "routes.d.ts"), fileWatcherChangeListener = debounce(async function(type, path) {
11
+ (type === "add" || type === "delete") && path.startsWith(appDir) && generateRouteTypes(outFile);
12
+ }, 100);
13
+ return server.watcher.addListener("all", fileWatcherChangeListener), function() {
16
14
  generateRouteTypes(outFile);
17
15
  };
18
16
  }
19
17
  };
20
18
  }
21
- export { generateTypesForRoutes };
22
- //# sourceMappingURL=generateTypesForRoutes.native.js.map
19
+ export {
20
+ generateTypesForRoutes
21
+ };
22
+ //# sourceMappingURL=generateTypesForRoutes.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["join","debounce","generateRouteTypes","generateTypesForRoutes","options","name","enforce","apply","configureServer","server","appDir","process","cwd","outFile","fileWatcherChangeListener","type","path","startsWith","watcher","addListener"],"sources":["../../../src/vite/generateTypesForRoutes.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,IAAA,QAAY;AACrB,SAASC,QAAA,QAAgB;AAGzB,SAASC,kBAAA,QAA0B;AAE5B,SAASC,uBAAuBC,OAAA,EAAoC;EACzE,OAAO;IACLC,IAAA,EAAM;IACNC,OAAA,EAAS;IACTC,KAAA,EAAO;IAEPC,gBAAgBC,MAAA,EAAQ;MACtB,IAAAC,MAAM,GAAAV,IAAS,CAAAW,OAAK,CAAAC,GAAQ,IAAI,KAAG;QAAKC,OAClC,GAAAb,IAAU,CAAAW,OAAK,CAAAC,GAAQ,IAAI,aAAG;QAAaE,yBAG3C,GAAAb,QAA4B,iBAA8Bc,IAAA,EAAAC,IAAiB;UAC/E,CAAID,IAAA,KAAS,SAASA,IAAA,KAAS,aACzBC,IAAA,CAAKC,UAAA,CAAWP,MAAM,KAExBR,kBAAA,CAAmBW,OAAO;QAGhC,GAAG,GAAG;MAEN,OAAAJ,MAAA,CAAOS,OAAA,CAAQC,WAAA,CAAY,OAAOL,yBAAyB,GAEpD,YAAM;QAGXZ,kBAAA,CAAmBW,OAAO;MAC5B;IACF;EACF;AACF","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/vite/Users/n8/one/packages/one/src/vite/generateTypesForRoutes.tsx"],
4
+ "mappings": "AAAA,SAASA,YAAY;AACrB,SAASC,gBAAgB;AAGzB,SAASC,0BAA0B;AAE5B,SAASC,uBAAuBC,SAA0B;AAC/D,SAAO;IACLC,MAAM;IACNC,SAAS;IACTC,OAAO;IAEPC,gBAAgBC,QAAM;AACpB,UAAMC,SAASV,KAAKW,QAAQC,IAAG,GAAI,KAAA,GAC7BC,UAAUb,KAAKW,QAAQC,IAAG,GAAI,aAAA,GAG9BE,4BAA4Bb,SAAS,eAAOc,MAAcC,MAAAA;AAC9D,SAAID,SAAS,SAASA,SAAS,aACzBC,KAAKC,WAAWP,MAAAA,KAElBR,mBAAmBW,OAAAA;MAGzB,GAAG,GAAA;AAEHJ,oBAAOS,QAAQC,YAAY,OAAOL,yBAAAA,GAE3B,WAAA;AAGLZ,2BAAmBW,OAAAA;MACrB;IACF;EACF;AACF;",
5
+ "names": ["join", "debounce", "generateRouteTypes", "generateTypesForRoutes", "options", "name", "enforce", "apply", "configureServer", "server", "appDir", "process", "cwd", "outFile", "fileWatcherChangeListener", "type", "path", "startsWith", "watcher", "addListener"]
6
+ }
@@ -1,10 +1,12 @@
1
- import { createRoutesManifest } from "../server/createRoutesManifest.native.js";
2
- import { globDir } from "../utils/globDir.native.js";
1
+ import { createRoutesManifest } from "../server/createRoutesManifest";
2
+ import { globDir } from "../utils/globDir";
3
3
  function getManifest() {
4
4
  var routePaths = globDir("app");
5
5
  return createRoutesManifest(routePaths, {
6
6
  platform: "web"
7
7
  });
8
8
  }
9
- export { getManifest };
10
- //# sourceMappingURL=getManifest.native.js.map
9
+ export {
10
+ getManifest
11
+ };
12
+ //# sourceMappingURL=getManifest.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["createRoutesManifest","globDir","getManifest","routePaths","platform"],"sources":["../../../src/vite/getManifest.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,oBAAA,QAA4B;AACrC,SAASC,OAAA,QAAe;AAEjB,SAASC,YAAA,EAAc;EAC5B,IAAAC,UAAM,GAAAF,OAAa,MAAQ;EAC3B,OAAOD,oBAAA,CAAqBG,UAAA,EAAY;IACtCC,QAAA,EAAU;EACZ,CAAC;AACH","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/vite/Users/n8/one/packages/one/src/vite/getManifest.ts"],
4
+ "mappings": "AAAA,SAASA,4BAA4B;AACrC,SAASC,eAAe;AAEjB,SAASC,cAAAA;AACd,MAAMC,aAAaF,QAAQ,KAAA;AAC3B,SAAOD,qBAAqBG,YAAY;IACtCC,UAAU;EACZ,CAAA;AACF;",
5
+ "names": ["createRoutesManifest", "globDir", "getManifest", "routePaths", "platform"]
6
+ }
@@ -1,6 +1,12 @@
1
- var requestAsyncLocalStore = null,
2
- asyncHeadersCache = /* @__PURE__ */new WeakMap();
3
- async function setCurrentRequestHeaders(cb) {}
4
- function mergeHeaders(onto, from) {}
5
- export { asyncHeadersCache, mergeHeaders, requestAsyncLocalStore, setCurrentRequestHeaders };
1
+ var requestAsyncLocalStore = null, asyncHeadersCache = /* @__PURE__ */ new WeakMap();
2
+ async function setCurrentRequestHeaders(cb) {
3
+ }
4
+ function mergeHeaders(onto, from) {
5
+ }
6
+ export {
7
+ asyncHeadersCache,
8
+ mergeHeaders,
9
+ requestAsyncLocalStore,
10
+ setCurrentRequestHeaders
11
+ };
6
12
  //# sourceMappingURL=headers.native.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["requestAsyncLocalStore","asyncHeadersCache","WeakMap","setCurrentRequestHeaders","cb","mergeHeaders","onto","from"],"sources":["../../../src/vite/Users/n8/one/packages/one/src/vite/headers.native.ts"],"sourcesContent":[null],"mappings":"AAAO,IAAMA,sBAAA,GAAyB;EAEzBC,iBAAA,GAAoB,mBAAIC,OAAA;AAIrC,eAAsBC,yBAAyBC,EAAA,EAA8B,CAAG;AAEzE,SAASC,aAAaC,IAAA,EAAeC,IAAA,EAAa,CAAG","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/vite/Users/n8/one/packages/one/src/vite/headers.native.ts"],
4
+ "mappings": "AAAO,IAAMA,yBAAyB,MAEzBC,oBAAoB,oBAAIC,QAAAA;AAIrC,eAAsBC,yBAAyBC,IAA8B;AAAG;AAEzE,SAASC,aAAaC,MAAeC,MAAa;AAAG;",
5
+ "names": ["requestAsyncLocalStore", "asyncHeadersCache", "WeakMap", "setCurrentRequestHeaders", "cb", "mergeHeaders", "onto", "from"]
6
+ }
@@ -3,13 +3,14 @@ import path from "node:path";
3
3
  async function loadEnv(root) {
4
4
  var envPath = path.join(root, ".env");
5
5
  if (fs.existsSync(envPath)) {
6
- var dotenv = await import("dotenv"),
7
- result = dotenv.config({
8
- path: envPath
9
- });
6
+ var dotenv = await import("dotenv"), result = dotenv.config({
7
+ path: envPath
8
+ });
10
9
  if (result.error) throw result.error;
11
10
  return !0;
12
11
  }
13
12
  }
14
- export { loadEnv };
15
- //# sourceMappingURL=loadEnv.native.js.map
13
+ export {
14
+ loadEnv
15
+ };
16
+ //# sourceMappingURL=loadEnv.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["fs","path","loadEnv","root","envPath","join","existsSync","dotenv","result","config","error"],"sources":["../../../src/vite/loadEnv.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,EAAA,MAAQ;AACf,OAAOC,IAAA,MAAU;AAEjB,eAAsBC,QAAQC,IAAA,EAAc;EAC1C,IAAAC,OAAM,GAAAH,IAAU,CAAAI,IAAK,CAAAF,IAAK,QAAM;EAChC,IAAIH,EAAC,CAAAM,UAAG,CAAAF,OAAW,CAAO,EAAG;IAE7B,IAAMG,MAAA,SADS,MAAM,SAAO,CAAQ;MAAAC,MACd,GAAOD,MAAE,CAAME,MAAA;QACjCR,IAAA,EAAAG;MACJ;IACF,IAAAI,MAAA,CAAAE,KAAA,QAAAF,MAAA,CAAAE,KAAA","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/vite/Users/n8/one/packages/one/src/vite/loadEnv.ts"],
4
+ "mappings": "AAAA,OAAOA,QAAQ;AACf,OAAOC,UAAU;AAEjB,eAAsBC,QAAQC,MAAY;AACxC,MAAMC,UAAUH,KAAKI,KAAKF,MAAM,MAAA;AAChC,MAAKH,GAAGM,WAAWF,OAAAA,GACnB;QAAMG,SAAS,MAAM,OAAO,QAAA,GACtBC,SAASD,OAAOE,OAAO;MAAER,MAAMG;IAAQ,CAAA;AAC7C,QAAII,OAAOE,MAAO,OAAMF,OAAOE;AAC/B,WAAO;;AACT;",
5
+ "names": ["fs", "path", "loadEnv", "root", "envPath", "join", "existsSync", "dotenv", "result", "config", "error"]
6
+ }
@@ -1,9 +1,13 @@
1
1
  function makePluginWebOnly(plugin) {
2
2
  var og = plugin.transform;
3
- return og && (plugin.transform = function () {
4
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
5
- if (this.environment.name === "client") return og.call(this, ...args);
3
+ return og && (plugin.transform = function() {
4
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++)
5
+ args[_key] = arguments[_key];
6
+ if (this.environment.name === "client")
7
+ return og.call(this, ...args);
6
8
  }), plugin;
7
9
  }
8
- export { makePluginWebOnly };
9
- //# sourceMappingURL=makePluginWebOnly.native.js.map
10
+ export {
11
+ makePluginWebOnly
12
+ };
13
+ //# sourceMappingURL=makePluginWebOnly.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["makePluginWebOnly","plugin","og","transform","_len","arguments","length","args","Array","_key","environment","name","call"],"sources":["../../../src/vite/makePluginWebOnly.ts"],"sourcesContent":[null],"mappings":"AAEO,SAASA,kBAAkBC,MAAA,EAAgB;EAChD,IAAAC,EAAM,GAAAD,MAAK,CAAAE,SAAO;EAElB,OAAID,EAAA,KACFD,MAAA,CAAOE,SAAA,GAAY;IACjB,KAAI,IAAKC,IAAA,GAAAC,SAAY,CAAAC,MAAS,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA,IAG9BF,IAAA,CAAAE,IAAO,CAAG,GAAAJ,SAAW,CAAAI,IAAG,CAAI;IAC9B,IAGK,KAAAC,WAAA,CAAAC,IAAA,eACT,OAAAT,EAAA,CAAAU,IAAA,UAAAL,IAAA","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/vite/Users/n8/one/packages/one/src/vite/makePluginWebOnly.ts"],
4
+ "mappings": "AAEO,SAASA,kBAAkBC,QAAc;AAC9C,MAAMC,KAAKD,OAAOE;AAElB,SAAID,OACFD,OAAOE,YAAY,WAAA;AAAgB,aAAA,OAAA,UAAA,QAAGC,OAAH,IAAA,MAAA,IAAA,GAAA,OAAA,GAAA,OAAA,MAAA;AAAGA,WAAH,IAAA,IAAA,UAAA,IAAA;AACjC,QAAI,KAAKC,YAAYC,SAAS;AAG9B,aAAOJ,GAAGK,KAAK,MAAI,GAAKH,IAAAA;EAC1B,IAGKH;AACT;",
5
+ "names": ["makePluginWebOnly", "plugin", "og", "transform", "args", "environment", "name", "call"]
6
+ }
@@ -3,55 +3,51 @@ import path, { dirname, resolve } from "node:path";
3
3
  import { loadConfigFromFile } from "vite";
4
4
  import tsconfigPaths from "vite-tsconfig-paths";
5
5
  import { getOptimizeDeps, getOptionsFilled, isWebEnvironment } from "vxrn";
6
- import "../polyfills-server.native.js";
7
- import { existsAsync } from "../utils/existsAsync.native.js";
8
- import { requireResolve } from "../utils/requireResolve.native.js";
9
- import { clientTreeShakePlugin } from "./clientTreeShakePlugin.native.js";
10
- import { createFileSystemRouter } from "./createFileSystemRouter.native.js";
11
- import { ensureTSConfig } from "./ensureTsConfig.native.js";
12
- import { fixDependenciesPlugin } from "./fixDependenciesPlugin.native.js";
13
- import { generateTypesForRoutes } from "./generateTypesForRoutes.native.js";
14
- import { loadEnv } from "./loadEnv.native.js";
15
- import { createVirtualEntry, virtualEntryId } from "./virtualEntryPlugin.native.js";
16
- import { vitePluginSsrCss } from "./vitePluginSsrCss.native.js";
6
+ import "../polyfills-server";
7
+ import { existsAsync } from "../utils/existsAsync";
8
+ import { requireResolve } from "../utils/requireResolve";
9
+ import { clientTreeShakePlugin } from "./clientTreeShakePlugin";
10
+ import { createFileSystemRouter } from "./createFileSystemRouter";
11
+ import { ensureTSConfig } from "./ensureTsConfig";
12
+ import { fixDependenciesPlugin } from "./fixDependenciesPlugin";
13
+ import { generateTypesForRoutes } from "./generateTypesForRoutes";
14
+ import { loadEnv } from "./loadEnv";
15
+ import { createVirtualEntry, virtualEntryId } from "./virtualEntryPlugin";
16
+ import { vitePluginSsrCss } from "./vitePluginSsrCss";
17
17
  events.setMaxListeners(1e3);
18
18
  globalThis.__vxrnEnableNativeEnv = !0;
19
19
  function one() {
20
- var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {},
21
- _options_config;
20
+ var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _options_config;
22
21
  oneOptions = options, loadEnv(process.cwd()), ((_options_config = options.config) === null || _options_config === void 0 ? void 0 : _options_config.ensureTSConfig) !== !1 && ensureTSConfig(), globalThis.__vxrnPluginConfig__ = options;
23
- var {
24
- optimizeDeps
25
- } = getOptimizeDeps("build"),
26
- optimizeIds = optimizeDeps.include,
27
- optimizeIdRegex = new RegExp(
22
+ var { optimizeDeps } = getOptimizeDeps("build"), optimizeIds = optimizeDeps.include, optimizeIdRegex = new RegExp(
28
23
  // santize ids for regex
29
24
  // https://stackoverflow.com/questions/6300183/sanitize-string-of-regex-characters-before-regexp-build
30
- `${optimizeIds.map(function (id) {
25
+ `${optimizeIds.map(function(id) {
31
26
  return id.replace(/[#-.]|[[-^]|[?|{}]/g, "\\$&");
32
- }).join("|")}`),
33
- tsConfigPathsPlugin = null,
34
- vxrnOptions = getOptionsFilled(),
35
- devAndProdPlugins = [
27
+ }).join("|")}`
28
+ ), tsConfigPathsPlugin = null, vxrnOptions = getOptionsFilled(), devAndProdPlugins = [
36
29
  // proxy because you cant add a plugin inside a plugin
37
30
  new Proxy({
38
31
  name: "one:tsconfig-paths",
39
32
  config(configIncoming) {
40
- var _options_config2,
41
- _configIncoming_plugins,
42
- pathsConfig = (_options_config2 = options.config) === null || _options_config2 === void 0 ? void 0 : _options_config2.tsConfigPaths;
43
- pathsConfig !== !1 && (!((_configIncoming_plugins = configIncoming.plugins) === null || _configIncoming_plugins === void 0) && _configIncoming_plugins.flat().some(function (p) {
33
+ var _options_config2, _configIncoming_plugins, pathsConfig = (_options_config2 = options.config) === null || _options_config2 === void 0 ? void 0 : _options_config2.tsConfigPaths;
34
+ pathsConfig !== !1 && (!((_configIncoming_plugins = configIncoming.plugins) === null || _configIncoming_plugins === void 0) && _configIncoming_plugins.flat().some(function(p) {
44
35
  return p && p.name === "vite-tsconfig-paths";
45
36
  }) || (tsConfigPathsPlugin = tsconfigPaths(pathsConfig && typeof pathsConfig == "object" ? pathsConfig : {})));
46
37
  },
47
- configResolved() {},
48
- resolveId() {}
38
+ configResolved() {
39
+ },
40
+ resolveId() {
41
+ }
49
42
  }, {
50
43
  get(target, key, thisArg) {
51
- if (key === "config" || key === "name") return Reflect.get(target, key, thisArg);
52
- if (tsConfigPathsPlugin) return Reflect.get(tsConfigPathsPlugin, key, thisArg);
44
+ if (key === "config" || key === "name")
45
+ return Reflect.get(target, key, thisArg);
46
+ if (tsConfigPathsPlugin)
47
+ return Reflect.get(tsConfigPathsPlugin, key, thisArg);
53
48
  }
54
- }), {
49
+ }),
50
+ {
55
51
  name: "one-slim-deps",
56
52
  enforce: "pre",
57
53
  config() {
@@ -85,15 +81,15 @@ function one() {
85
81
  var _options_web;
86
82
  return {
87
83
  define: {
88
- ...(((_options_web = options.web) === null || _options_web === void 0 ? void 0 : _options_web.defaultRenderMode) && {
84
+ ...((_options_web = options.web) === null || _options_web === void 0 ? void 0 : _options_web.defaultRenderMode) && {
89
85
  "process.env.One_DEFAULT_RENDER_MODE": JSON.stringify(options.web.defaultRenderMode)
90
- }),
91
- ...(options.setupFile && {
86
+ },
87
+ ...options.setupFile && {
92
88
  "process.env.One_SETUP_FILE": JSON.stringify(options.setupFile)
93
- }),
94
- ...(process.env.NODE_ENV !== "production" && vxrnOptions && {
89
+ },
90
+ ...process.env.NODE_ENV !== "production" && vxrnOptions && {
95
91
  "process.env.ONE_SERVER_URL": JSON.stringify(vxrnOptions.server.url)
96
- })
92
+ }
97
93
  },
98
94
  environments: {
99
95
  client: {
@@ -109,19 +105,22 @@ function one() {
109
105
  }
110
106
  };
111
107
  }
112
- }, {
108
+ },
109
+ {
113
110
  name: "one-zero",
114
111
  config() {
115
- if (options.zero) return {
116
- define: {
117
- "process.env.ZERO_ENABLED": "true",
118
- TESTING: "false",
119
- REPLICACHE_VERSION: '"15.2.1"',
120
- ZERO_VERSION: '"0.0.0"'
121
- }
122
- };
112
+ if (options.zero)
113
+ return {
114
+ define: {
115
+ "process.env.ZERO_ENABLED": "true",
116
+ TESTING: "false",
117
+ REPLICACHE_VERSION: '"15.2.1"',
118
+ ZERO_VERSION: '"0.0.0"'
119
+ }
120
+ };
123
121
  }
124
- }, {
122
+ },
123
+ {
125
124
  name: "tamagui-react-19",
126
125
  config() {
127
126
  return {
@@ -131,91 +130,101 @@ function one() {
131
130
  }
132
131
  };
133
132
  }
134
- }, {
133
+ },
134
+ {
135
135
  name: "route-module-hmr-fix",
136
136
  hotUpdate(param) {
137
- var {
138
- server,
139
- modules
140
- } = param;
141
- return modules.map(function (m) {
142
- var {
143
- id
144
- } = m;
137
+ var { server, modules } = param;
138
+ return modules.map(function(m) {
139
+ var { id } = m;
145
140
  if (!id) return m;
146
- var relativePath = path.relative(server.config.root, id),
147
- rootDir = relativePath.split(path.sep)[0];
148
- return rootDir === "app" && (m.acceptedHmrExports = /* @__PURE__ */new Set()), m;
141
+ var relativePath = path.relative(server.config.root, id), rootDir = relativePath.split(path.sep)[0];
142
+ return rootDir === "app" && (m.acceptedHmrExports = /* @__PURE__ */ new Set()), m;
149
143
  });
150
144
  }
151
- }];
152
- return globalThis.__vxrnAddNativePlugins = [clientTreeShakePlugin()], globalThis.__vxrnAddWebPluginsProd = devAndProdPlugins, [...devAndProdPlugins,
153
- /**
154
- * This is really the meat of one, where it handles requests:
155
- */
156
- createFileSystemRouter(options), generateTypesForRoutes(options), clientTreeShakePlugin(), fixDependenciesPlugin(options.deps), createVirtualEntry({
157
- ...options,
158
- root: "app"
159
- }), {
160
- name: "define-app-key",
161
- config() {
162
- var _options_app;
163
- if (!((_options_app = options.app) === null || _options_app === void 0) && _options_app.key) return {
164
- define: {
165
- "process.env.One_APP_NAME": JSON.stringify(options.app.key)
166
- }
167
- };
168
145
  }
169
- }, {
170
- name: "use-react-18-for-native",
171
- enforce: "pre",
172
- async config() {
173
- var sharedNativeConfig = {
174
- resolve: {
175
- alias: {
176
- react: requireResolve("one/react-18"),
177
- "react-dom": requireResolve("one/react-dom-18")
146
+ ];
147
+ return globalThis.__vxrnAddNativePlugins = [
148
+ clientTreeShakePlugin()
149
+ ], globalThis.__vxrnAddWebPluginsProd = devAndProdPlugins, [
150
+ ...devAndProdPlugins,
151
+ /**
152
+ * This is really the meat of one, where it handles requests:
153
+ */
154
+ createFileSystemRouter(options),
155
+ generateTypesForRoutes(options),
156
+ clientTreeShakePlugin(),
157
+ fixDependenciesPlugin(options.deps),
158
+ createVirtualEntry({
159
+ ...options,
160
+ root: "app"
161
+ }),
162
+ {
163
+ name: "define-app-key",
164
+ config() {
165
+ var _options_app;
166
+ if (!((_options_app = options.app) === null || _options_app === void 0) && _options_app.key)
167
+ return {
168
+ define: {
169
+ "process.env.One_APP_NAME": JSON.stringify(options.app.key)
170
+ }
171
+ };
172
+ }
173
+ },
174
+ {
175
+ name: "use-react-18-for-native",
176
+ enforce: "pre",
177
+ async config() {
178
+ var sharedNativeConfig = {
179
+ resolve: {
180
+ alias: {
181
+ react: requireResolve("one/react-18"),
182
+ "react-dom": requireResolve("one/react-dom-18")
183
+ }
178
184
  }
179
- }
180
- };
181
- return {
182
- environments: {
183
- ios: {
184
- ...sharedNativeConfig
185
- },
186
- android: {
187
- ...sharedNativeConfig
185
+ };
186
+ return {
187
+ environments: {
188
+ ios: {
189
+ ...sharedNativeConfig
190
+ },
191
+ android: {
192
+ ...sharedNativeConfig
193
+ }
188
194
  }
189
- }
190
- };
191
- }
192
- },
193
- // this started erroring for no reason..
194
- {
195
- name: "optimize-deps-load-web-extensions",
196
- enforce: "pre",
197
- applyToEnvironment(environment) {
198
- return isWebEnvironment(environment);
195
+ };
196
+ }
199
197
  },
200
- async resolveId(id) {
201
- var importer = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "",
202
- shouldOptimize = optimizeIdRegex.test(importer);
203
- if (shouldOptimize) {
204
- var absolutePath = resolve(dirname(importer), id),
205
- webPath = absolutePath.replace(/(.m?js)/, "") + ".web.js";
206
- if (webPath === id) return;
207
- try {
208
- var directoryPath = absolutePath + "/index.web.js";
209
- if (await existsAsync(directoryPath)) return directoryPath;
210
- if (await existsAsync(webPath)) return webPath;
211
- } catch (err) {
212
- console.warn("error probably fine", err);
198
+ // this started erroring for no reason..
199
+ {
200
+ name: "optimize-deps-load-web-extensions",
201
+ enforce: "pre",
202
+ applyToEnvironment(environment) {
203
+ return isWebEnvironment(environment);
204
+ },
205
+ async resolveId(id) {
206
+ var importer = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", shouldOptimize = optimizeIdRegex.test(importer);
207
+ if (shouldOptimize) {
208
+ var absolutePath = resolve(dirname(importer), id), webPath = absolutePath.replace(/(.m?js)/, "") + ".web.js";
209
+ if (webPath === id) return;
210
+ try {
211
+ var directoryPath = absolutePath + "/index.web.js";
212
+ if (await existsAsync(directoryPath))
213
+ return directoryPath;
214
+ if (await existsAsync(webPath))
215
+ return webPath;
216
+ } catch (err) {
217
+ console.warn("error probably fine", err);
218
+ }
213
219
  }
214
220
  }
215
- }
216
- }, vitePluginSsrCss({
217
- entries: [virtualEntryId]
218
- })];
221
+ },
222
+ vitePluginSsrCss({
223
+ entries: [
224
+ virtualEntryId
225
+ ]
226
+ })
227
+ ];
219
228
  }
220
229
  var oneOptions = null;
221
230
  async function getUserOneOptions(command) {
@@ -223,7 +232,8 @@ async function getUserOneOptions(command) {
223
232
  if (!command) throw new Error("Options not loaded and no command given");
224
233
  await loadUserOneOptions(command);
225
234
  }
226
- if (!oneOptions) throw new Error("No One options were loaded");
235
+ if (!oneOptions)
236
+ throw new Error("No One options were loaded");
227
237
  return oneOptions;
228
238
  }
229
239
  async function loadUserOneOptions(command) {
@@ -231,10 +241,15 @@ async function loadUserOneOptions(command) {
231
241
  mode: "prod",
232
242
  command
233
243
  });
234
- if (!found) throw new Error(`No config found in ${process.cwd()}. Is this the correct directory?`);
244
+ if (!found)
245
+ throw new Error(`No config found in ${process.cwd()}. Is this the correct directory?`);
235
246
  var foundOptions = getUserOneOptions();
236
- if (!foundOptions) throw new Error("No One plugin found in this vite.config");
247
+ if (!foundOptions)
248
+ throw new Error("No One plugin found in this vite.config");
237
249
  return foundOptions;
238
250
  }
239
- export { loadUserOneOptions, one };
240
- //# sourceMappingURL=one.native.js.map
251
+ export {
252
+ loadUserOneOptions,
253
+ one
254
+ };
255
+ //# sourceMappingURL=one.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["events","path","dirname","resolve","loadConfigFromFile","tsconfigPaths","getOptimizeDeps","getOptionsFilled","isWebEnvironment","existsAsync","requireResolve","clientTreeShakePlugin","createFileSystemRouter","ensureTSConfig","fixDependenciesPlugin","generateTypesForRoutes","loadEnv","createVirtualEntry","virtualEntryId","vitePluginSsrCss","setMaxListeners","globalThis","__vxrnEnableNativeEnv","one","options","arguments","length","_options_config","oneOptions","process","cwd","config","__vxrnPluginConfig__","optimizeDeps","optimizeIds","include","optimizeIdRegex","RegExp","map","id","replace","join","tsConfigPathsPlugin","vxrnOptions","devAndProdPlugins","Proxy","name","configIncoming","_options_config2","_configIncoming_plugins","pathsConfig","tsConfigPaths","plugins","flat","some","p","configResolved","resolveId","get","target","key","thisArg","Reflect","enforce","alias","tslib","_options_web","define","web","defaultRenderMode","JSON","stringify","setupFile","env","NODE_ENV","server","url","environments","client","ssr","zero","TESTING","REPLICACHE_VERSION","ZERO_VERSION","hotUpdate","param","modules","m","relativePath","relative","root","rootDir","split","sep","acceptedHmrExports","Set","__vxrnAddNativePlugins","__vxrnAddWebPluginsProd","deps","_options_app","app","sharedNativeConfig","react","ios","android","applyToEnvironment","environment","importer","shouldOptimize","test","absolutePath","webPath","directoryPath","err","console","warn","entries","getUserOneOptions","command","Error","loadUserOneOptions","found","mode"],"sources":["../../../src/vite/one.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,MAAA,MAAY;AACnB,OAAOC,IAAA,IAAQC,OAAA,EAAeC,OAAA,QAAe;AAC7C,SAA0DC,kBAAA,QAA0B;AACpF,OAAOC,aAAA,MAAmB;AAC1B,SAASC,eAAA,EAAiBC,gBAAA,EAAkBC,gBAAA,QAAwB;AACpE,OAAO;AACP,SAASC,WAAA,QAAmB;AAC5B,SAASC,cAAA,QAAsB;AAC/B,SAASC,qBAAA,QAA6B;AACtC,SAASC,sBAAA,QAA8B;AACvC,SAASC,cAAA,QAAsB;AAC/B,SAASC,qBAAA,QAA6B;AACtC,SAASC,sBAAA,QAA8B;AACvC,SAASC,OAAA,QAAe;AAExB,SAASC,kBAAA,EAAoBC,cAAA,QAAsB;AACnD,SAASC,gBAAA,QAAwB;AAEjCnB,MAAA,CAAOoB,eAAA,CAAgB,GAAK;AAG5BC,UAAA,CAAWC,qBAAA,GAAwB;AAE5B,SAASC,IAAA,EAAI;EAClB,IAAAC,OAAA,GAAaC,SAER,CAAAC,MAAQ,QAAQD,SAG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AI,CAACG;AACH,UAAM,IAAIF,MAAM,sBAAsBpF,QAAQC,IAAG,CAAA,kCAAoC;AAEvF,MAAMuF,eAAeN,kBAAAA;AACrB,MAAI,CAACM;AACH,UAAM,IAAIJ,MAAM,yCAAyC;AAE3D,SAAOI;AACT;",
5
+ "names": ["events", "path", "dirname", "resolve", "loadConfigFromFile", "tsconfigPaths", "getOptimizeDeps", "getOptionsFilled", "isWebEnvironment", "existsAsync", "requireResolve", "clientTreeShakePlugin", "createFileSystemRouter", "ensureTSConfig", "fixDependenciesPlugin", "generateTypesForRoutes", "loadEnv", "createVirtualEntry", "virtualEntryId", "vitePluginSsrCss", "setMaxListeners", "globalThis", "__vxrnEnableNativeEnv", "one", "options", "oneOptions", "process", "cwd", "config", "optimizeDeps", "optimizeIds", "include", "optimizeIdRegex", "RegExp", "map", "id", "replace", "join", "tsConfigPathsPlugin", "vxrnOptions", "devAndProdPlugins", "Proxy", "name", "configIncoming", "pathsConfig", "tsConfigPaths", "plugins", "flat", "some", "p", "configResolved", "resolveId", "get", "target", "key", "thisArg", "Reflect", "enforce", "alias", "tslib", "define", "web", "defaultRenderMode", "JSON", "stringify", "setupFile", "env", "NODE_ENV", "server", "url", "environments", "client", "ssr", "zero", "TESTING", "REPLICACHE_VERSION", "ZERO_VERSION", "hotUpdate", "modules", "m", "relativePath", "relative", "root", "rootDir", "split", "sep", "acceptedHmrExports", "Set", "__vxrnAddNativePlugins", "__vxrnAddWebPluginsProd", "deps", "app", "sharedNativeConfig", "react", "ios", "android", "applyToEnvironment", "environment", "importer", "shouldOptimize", "test", "absolutePath", "webPath", "directoryPath", "err", "console", "warn", "entries", "getUserOneOptions", "command", "Error", "loadUserOneOptions", "found", "mode", "foundOptions"]
6
+ }
@@ -1,13 +1,13 @@
1
1
  function removeReactNativeWebAnimatedPlugin(opts) {
2
- var filter = opts?.panResponder ? /(react-native\/Animated\/Animated|PlatformPressable|PanResponder|ResponderSystem)/ : /(react-native\/Animated\/Animated|PlatformPressable)/,
3
- optimizeDeps = {
4
- esbuildOptions: {
5
- plugins: [{
2
+ var filter = opts?.panResponder ? /(react-native\/Animated\/Animated|PlatformPressable|PanResponder|ResponderSystem)/ : /(react-native\/Animated\/Animated|PlatformPressable)/, optimizeDeps = {
3
+ esbuildOptions: {
4
+ plugins: [
5
+ {
6
6
  name: "remove-react-native-web-animated",
7
7
  setup(build) {
8
8
  build.onResolve({
9
9
  filter
10
- }, function (args) {
10
+ }, function(args) {
11
11
  return {
12
12
  path: args.path,
13
13
  namespace: "proxy-wormify"
@@ -15,16 +15,17 @@ function removeReactNativeWebAnimatedPlugin(opts) {
15
15
  }), build.onLoad({
16
16
  filter: /.*/,
17
17
  namespace: "proxy-wormify"
18
- }, function (args) {
18
+ }, function(args) {
19
19
  return {
20
20
  contents: 'export * from "@tamagui/proxy-worm";',
21
21
  loader: "js"
22
22
  };
23
23
  });
24
24
  }
25
- }]
26
- }
27
- };
25
+ }
26
+ ]
27
+ }
28
+ };
28
29
  return {
29
30
  name: "remove-react-native-web-animated",
30
31
  config() {
@@ -34,5 +35,7 @@ function removeReactNativeWebAnimatedPlugin(opts) {
34
35
  }
35
36
  };
36
37
  }
37
- export { removeReactNativeWebAnimatedPlugin };
38
- //# sourceMappingURL=removeReactNativeWebAnimatedPlugin.native.js.map
38
+ export {
39
+ removeReactNativeWebAnimatedPlugin
40
+ };
41
+ //# sourceMappingURL=removeReactNativeWebAnimatedPlugin.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["removeReactNativeWebAnimatedPlugin","opts","filter","panResponder","optimizeDeps","esbuildOptions","plugins","name","setup","build","onResolve","args","path","namespace","onLoad","contents","loader"],"sources":["../../../src/vite/removeReactNativeWebAnimatedPlugin.ts"],"sourcesContent":[null],"mappings":"AAMO,SAASA,mCAAmCC,IAAA,EAExC;EACT,IAAAC,MAAM,GAAAD,IAAS,EAAAE,YAAM,sFACjB,yDACA;IAAAC,YAEE;MACJC,cAAA,EAAgB;QACdC,OAAA,EAAS,CACP;UACEC,IAAA,EAAM;UACNC,MAAMC,KAAA,EAAO;YACXA,KAAA,CAAMC,SAAA;cACJR;YAAA,aACES,IAAA;cACF;gBACCC,IAAA,EAAAD,IACQ,CAAEC,IAAA;gBAIbC,SAAM;cAEF;YAAU,EACV,EAAAJ,KAAA,CAAQK,MAAA;cAEXZ,MAAA;cACHW,SAAA;YACF,aAAAF,IAAA;cACF;gBACFI,QAAA;gBACFC,MAAA;cAEO;YACC;UAEN;QACE;MACE;IACF;EAEJ;IACFT,IAAA","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/vite/Users/n8/one/packages/one/src/vite/removeReactNativeWebAnimatedPlugin.ts"],
4
+ "mappings": "AAMO,SAASA,mCAAmCC,MAElD;AACC,MAAMC,SAASD,MAAME,eACjB,sFACA,wDAEEC,eAAe;IACnBC,gBAAgB;MACdC,SAAS;QACP;UACEC,MAAM;UACNC,MAAMC,OAAK;AACTA,kBAAMC,UACJ;cACER;YACF,GACA,SAACS,MAAAA;AACC,qBAAO;gBAAEC,MAAMD,KAAKC;gBAAMC,WAAW;cAAgB;YACvD,CAAA,GAGFJ,MAAMK,OAAO;cAAEZ,QAAQ;cAAMW,WAAW;YAAgB,GAAG,SAACF,MAAAA;AAC1D,qBAAO;gBACLI,UAAU;gBACVC,QAAQ;cACV;YACF,CAAA;UACF;QACF;;IAEJ;EACF;AAEA,SAAO;IACLT,MAAM;IAENU,SAAAA;AACE,aAAO;QACLb;MACF;IACF;EACF;AACF;",
5
+ "names": ["removeReactNativeWebAnimatedPlugin", "opts", "filter", "panResponder", "optimizeDeps", "esbuildOptions", "plugins", "name", "setup", "build", "onResolve", "args", "path", "namespace", "onLoad", "contents", "loader", "config"]
6
+ }
@@ -3,7 +3,13 @@ function replaceLoader({
3
3
  loaderData
4
4
  }) {
5
5
  const stringifiedData = JSON.stringify(loaderData);
6
- return code.includes("__vxrn__loader__") ? code.replace(/["']__vxrn__loader__['"]/, stringifiedData) : code + `
6
+ return code.includes("__vxrn__loader__") ? code.replace(
7
+ /["']__vxrn__loader__['"]/,
8
+ // make sure this ' ' is added in front,
9
+ // minifiers will do `return"something"
10
+ // but if its null then it becomes returnnull
11
+ " " + stringifiedData.replace(/\$/g, "$$$$")
12
+ ) : code + `
7
13
  export const loader = () => (${stringifiedData})`;
8
14
  }
9
15
  export {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/vite/replaceLoader.ts"],
4
- "mappings": "AAAO,SAAS,cAAc;AAAA,EAC5B;AAAA,EACA;AACF,GAGG;AACD,QAAM,kBAAkB,KAAK,UAAU,UAAU;AASjD,SANO,KAAK,SAAS,kBAAkB,IAG9B,KAAK,QAAQ,4BAA4B,eAAe,IAFtD,OAAO;AAAA,+BAAkC,eAAe;AAMrE;",
4
+ "mappings": "AAAO,SAAS,cAAc;AAAA,EAC5B;AAAA,EACA;AACF,GAGG;AACD,QAAM,kBAAkB,KAAK,UAAU,UAAU;AAejD,SAZO,KAAK,SAAS,kBAAkB,IAG9B,KAAK;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAIA,MAAM,gBAAgB,QAAQ,OAAO,MAAM;AAAA,EAC7C,IARS,OAAO;AAAA,+BAAkC,eAAe;AAYrE;",
5
5
  "names": []
6
6
  }