one 1.1.319 → 1.1.321

Sign up to get free protection for your applications and to get access to all the features.
Files changed (332) hide show
  1. package/dist/cjs/Root.js +182 -0
  2. package/dist/cjs/Route.js +45 -0
  3. package/dist/cjs/cleanUrl.js +41 -0
  4. package/dist/cjs/cli/label-process.js +25 -0
  5. package/dist/cjs/cli/main.js +46 -0
  6. package/dist/cjs/{getURL.native.cjs → cli/patch.cjs} +11 -15
  7. package/dist/cjs/cli/patch.js +34 -0
  8. package/dist/cjs/cli/patch.js.map +6 -0
  9. package/dist/cjs/cli/patch.native.js +39 -0
  10. package/dist/cjs/cli/patch.native.js.map +6 -0
  11. package/dist/cjs/cli/prebuild.js +34 -0
  12. package/dist/cjs/cli/run.js +52 -0
  13. package/dist/cjs/cli/runAndroid.js +34 -0
  14. package/dist/cjs/cli/runIos.js +34 -0
  15. package/dist/cjs/cli.cjs +17 -0
  16. package/dist/cjs/cli.js +220 -0
  17. package/dist/cjs/{cli.cjs.map → cli.js.map} +1 -1
  18. package/dist/cjs/cli.native.js +12 -0
  19. package/dist/cjs/cli.native.js.map +2 -2
  20. package/dist/cjs/clientLoaderResolver.js +32 -0
  21. package/dist/cjs/config.js +27 -0
  22. package/dist/cjs/constants.js +28 -0
  23. package/dist/cjs/createApp.js +46 -0
  24. package/dist/cjs/createHandleRequest.js +138 -0
  25. package/dist/cjs/createRoute.js +37 -0
  26. package/dist/cjs/fallbackViews/Sitemap.js +82 -0
  27. package/dist/cjs/fallbackViews/Unmatched.js +58 -0
  28. package/dist/cjs/fork/NavigationContainer.js +85 -0
  29. package/dist/cjs/fork/createMemoryHistory.js +100 -0
  30. package/dist/cjs/fork/extractPathFromURL.js +62 -0
  31. package/dist/cjs/fork/findFocusedRoute.js +26 -0
  32. package/dist/cjs/fork/getPathFromState.js +265 -0
  33. package/dist/cjs/fork/getStateFromPath.js +381 -0
  34. package/dist/cjs/fork/useLinking.js +182 -0
  35. package/dist/cjs/fork/validatePathConfig.js +46 -0
  36. package/dist/cjs/getLinkingConfig.js +59 -0
  37. package/dist/cjs/getReactNavigationConfig.js +69 -0
  38. package/dist/cjs/getRoutes.js +294 -0
  39. package/dist/cjs/getURL.js +24 -0
  40. package/dist/cjs/head/Head.js +23 -0
  41. package/dist/cjs/head/HeadModule.js +22 -0
  42. package/dist/cjs/head/index.js +15 -0
  43. package/dist/cjs/head/types.js +14 -0
  44. package/dist/cjs/head/url.js +52 -0
  45. package/dist/cjs/hooks.js +99 -0
  46. package/dist/cjs/imperative-api.js +45 -0
  47. package/dist/cjs/import-mode/index.js +21 -0
  48. package/dist/cjs/import-mode/index.web.js +21 -0
  49. package/dist/cjs/index.js +65 -0
  50. package/dist/cjs/interfaces/router.js +23 -0
  51. package/dist/cjs/layouts/Drawer.js +24 -0
  52. package/dist/cjs/layouts/Stack.js +24 -0
  53. package/dist/cjs/layouts/Tabs.js +52 -0
  54. package/dist/cjs/layouts/withLayoutContext.js +77 -0
  55. package/dist/cjs/link/Link.js +98 -0
  56. package/dist/cjs/link/Redirect.js +31 -0
  57. package/dist/cjs/link/href.js +50 -0
  58. package/dist/cjs/link/linking.js +82 -0
  59. package/dist/cjs/link/path.js +65 -0
  60. package/dist/cjs/link/useLinkTo.js +42 -0
  61. package/dist/cjs/link/useLoadedNavigation.js +50 -0
  62. package/dist/cjs/matchers.js +68 -0
  63. package/dist/cjs/platform.js +21 -0
  64. package/dist/cjs/polyfills-mobile.js +26 -0
  65. package/dist/cjs/polyfills-server.js +23 -0
  66. package/dist/cjs/render.js +44 -0
  67. package/dist/cjs/router/RouterStore.js +14 -0
  68. package/dist/cjs/router/getNormalizedStatePath.js +50 -0
  69. package/dist/cjs/router/lastAction.js +25 -0
  70. package/dist/cjs/router/router.js +345 -0
  71. package/dist/cjs/router/serverLocationContext.js +22 -0
  72. package/dist/cjs/router/useInitializeOneRouter.js +43 -0
  73. package/dist/cjs/serve.js +184 -0
  74. package/dist/cjs/server/createRoutesManifest.js +40 -0
  75. package/dist/cjs/server/getServerManifest.js +109 -0
  76. package/dist/cjs/server-render.js +42 -0
  77. package/dist/cjs/sortRoutes.js +64 -0
  78. package/dist/cjs/typed-routes/generateRouteTypes.js +33 -0
  79. package/dist/cjs/typed-routes/getTypedRoutesDeclarationFile.js +83 -0
  80. package/dist/cjs/types.js +14 -0
  81. package/dist/cjs/useFocusEffect.js +79 -0
  82. package/dist/cjs/useLoader.js +97 -0
  83. package/dist/cjs/useNavigation.js +60 -0
  84. package/dist/cjs/useScreens.js +176 -0
  85. package/dist/cjs/useViteRoutes.js +77 -0
  86. package/dist/cjs/utils/assertIsReady.js +26 -0
  87. package/dist/cjs/utils/dynamicImport.js +24 -0
  88. package/dist/cjs/utils/existsAsync.js +28 -0
  89. package/dist/cjs/utils/getPageExport.js +38 -0
  90. package/dist/cjs/utils/globDir.js +37 -0
  91. package/dist/cjs/utils/hashString.js +32 -0
  92. package/dist/cjs/utils/isResponse.js +23 -0
  93. package/dist/cjs/utils/isStatus.js +23 -0
  94. package/dist/cjs/utils/promiseWithResolvers.js +26 -0
  95. package/dist/cjs/utils/rand.js +21 -0
  96. package/dist/cjs/utils/redirect.js +28 -0
  97. package/dist/cjs/utils/removeSearch.js +23 -0
  98. package/dist/cjs/utils/removeUndefined.js +26 -0
  99. package/dist/cjs/utils/url.js +31 -0
  100. package/dist/cjs/utils/weakKey.js +24 -0
  101. package/dist/cjs/utils/weakMemo.js +30 -0
  102. package/dist/cjs/views/EmptyRoute.js +25 -0
  103. package/dist/cjs/views/ErrorBoundary.js +33 -0
  104. package/dist/cjs/views/LoadProgressBar.js +83 -0
  105. package/dist/cjs/views/Navigator.js +101 -0
  106. package/dist/cjs/views/PreloadLinks.js +42 -0
  107. package/dist/cjs/views/RootErrorBoundary.js +47 -0
  108. package/dist/cjs/views/Screen.js +29 -0
  109. package/dist/cjs/views/ScrollRestoration.js +70 -0
  110. package/dist/cjs/views/Try.js +44 -0
  111. package/dist/cjs/vite/build.js +377 -0
  112. package/dist/cjs/vite/clientTreeShakePlugin.js +76 -0
  113. package/dist/cjs/vite/constants.js +22 -0
  114. package/dist/cjs/vite/createFileSystemRouter.cjs +2 -1
  115. package/dist/cjs/vite/createFileSystemRouter.js +244 -0
  116. package/dist/cjs/vite/createFileSystemRouter.js.map +6 -0
  117. package/dist/cjs/vite/createFileSystemRouter.native.js +2 -1
  118. package/dist/cjs/vite/createFileSystemRouter.native.js.map +2 -2
  119. package/dist/cjs/vite/customNodeExternals.js +52 -0
  120. package/dist/cjs/vite/ensureTsConfig.js +66 -0
  121. package/dist/cjs/vite/findDepsToOptimize.js +66 -0
  122. package/dist/cjs/vite/fixDependenciesPlugin.js +43 -0
  123. package/dist/cjs/vite/generateTypesForRoutes.js +36 -0
  124. package/dist/cjs/vite/getManifest.js +27 -0
  125. package/dist/cjs/vite/headers.js +39 -0
  126. package/dist/cjs/vite/makePluginWebOnly.js +27 -0
  127. package/dist/cjs/vite/one.js +290 -0
  128. package/dist/cjs/vite/removeReactNativeWebAnimatedPlugin.js +50 -0
  129. package/dist/cjs/vite/replaceLoader.js +34 -0
  130. package/dist/cjs/vite/resolveAPIRequest.js +71 -0
  131. package/dist/cjs/vite/server.js +16 -0
  132. package/dist/cjs/vite/types.js +14 -0
  133. package/dist/cjs/vite/virtualEntryPlugin.js +67 -0
  134. package/dist/cjs/vite/vitePluginSsrCss.js +130 -0
  135. package/dist/cjs/vite.cjs +2 -0
  136. package/dist/cjs/vite.js +29 -0
  137. package/dist/cjs/vite.js.map +6 -0
  138. package/dist/cjs/vite.native.js +3 -1
  139. package/dist/cjs/vite.native.js.map +1 -1
  140. package/dist/cjs/zero/getQueryKey.js +24 -0
  141. package/dist/cjs/zero/isZeroQuery.js +23 -0
  142. package/dist/cjs/zero/resolveQuery.js +38 -0
  143. package/dist/cjs/zero/subscribeToQuery.js +28 -0
  144. package/dist/cjs/zero/types.js +14 -0
  145. package/dist/cjs/zero/useQuery.js +47 -0
  146. package/dist/cjs/zero/useQueryZero.js +38 -0
  147. package/dist/cjs/zero.js +23 -0
  148. package/dist/esm/cli/patch.js +10 -0
  149. package/dist/esm/cli/patch.js.map +6 -0
  150. package/dist/esm/cli/patch.mjs +10 -0
  151. package/dist/esm/cli/patch.mjs.map +1 -0
  152. package/dist/esm/cli/patch.native.js +10 -0
  153. package/dist/esm/cli/patch.native.js.map +6 -0
  154. package/dist/esm/cli.js +12 -0
  155. package/dist/esm/cli.js.map +1 -1
  156. package/dist/esm/cli.mjs +17 -0
  157. package/dist/esm/cli.mjs.map +1 -1
  158. package/dist/esm/cli.native.js +12 -0
  159. package/dist/esm/cli.native.js.map +2 -2
  160. package/dist/esm/vite/createFileSystemRouter.js +2 -1
  161. package/dist/esm/vite/createFileSystemRouter.js.map +1 -1
  162. package/dist/esm/vite/createFileSystemRouter.mjs +2 -1
  163. package/dist/esm/vite/createFileSystemRouter.mjs.map +1 -1
  164. package/dist/esm/vite/createFileSystemRouter.native.js +2 -1
  165. package/dist/esm/vite/createFileSystemRouter.native.js.map +2 -2
  166. package/dist/esm/vite.js +2 -0
  167. package/dist/esm/vite.js.map +1 -1
  168. package/dist/esm/vite.mjs +2 -1
  169. package/dist/esm/vite.mjs.map +1 -1
  170. package/dist/esm/vite.native.js +2 -0
  171. package/dist/esm/vite.native.js.map +2 -2
  172. package/package.json +8 -8
  173. package/src/cli/patch.ts +6 -0
  174. package/src/cli.ts +14 -0
  175. package/src/vite/createFileSystemRouter.tsx +1 -1
  176. package/src/vite.ts +1 -0
  177. package/types/cli/patch.d.ts +2 -0
  178. package/types/cli/patch.d.ts.map +1 -0
  179. package/types/vite.d.ts +1 -0
  180. package/types/vite.d.ts.map +1 -1
  181. package/dist/cjs/createApp.native.cjs +0 -38
  182. package/dist/cjs/createApp.native.cjs.map +0 -6
  183. package/dist/cjs/fork/NavigationContainer.native.cjs +0 -103
  184. package/dist/cjs/fork/NavigationContainer.native.cjs.map +0 -6
  185. package/dist/cjs/fork/useLinking.native.cjs +0 -126
  186. package/dist/cjs/fork/useLinking.native.cjs.map +0 -6
  187. package/dist/cjs/getURL.native.cjs.map +0 -6
  188. package/dist/cjs/head/Head.android.cjs +0 -28
  189. package/dist/cjs/head/Head.android.cjs.map +0 -6
  190. package/dist/cjs/head/Head.ios.cjs +0 -210
  191. package/dist/cjs/head/Head.ios.cjs.map +0 -6
  192. package/dist/cjs/import-mode/index.android.cjs +0 -26
  193. package/dist/cjs/import-mode/index.android.cjs.map +0 -6
  194. package/dist/cjs/import-mode/index.ios.cjs +0 -26
  195. package/dist/cjs/import-mode/index.ios.cjs.map +0 -6
  196. package/dist/cjs/import-mode/index.native.cjs +0 -26
  197. package/dist/cjs/import-mode/index.native.cjs.map +0 -6
  198. package/dist/cjs/render.native.cjs +0 -28
  199. package/dist/cjs/render.native.cjs.map +0 -6
  200. package/dist/cjs/views/PreloadLinks.native.cjs +0 -28
  201. package/dist/cjs/views/PreloadLinks.native.cjs.map +0 -6
  202. package/dist/cjs/vite/createFileSystemRouter.cjs.map +0 -6
  203. package/dist/cjs/vite/headers.native.cjs +0 -32
  204. package/dist/cjs/vite/headers.native.cjs.map +0 -6
  205. package/dist/cjs/vite.cjs.map +0 -6
  206. /package/dist/cjs/{Root.cjs.map → Root.js.map} +0 -0
  207. /package/dist/cjs/{Route.cjs.map → Route.js.map} +0 -0
  208. /package/dist/cjs/{cleanUrl.cjs.map → cleanUrl.js.map} +0 -0
  209. /package/dist/cjs/cli/{label-process.cjs.map → label-process.js.map} +0 -0
  210. /package/dist/cjs/cli/{main.cjs.map → main.js.map} +0 -0
  211. /package/dist/cjs/cli/{prebuild.cjs.map → prebuild.js.map} +0 -0
  212. /package/dist/cjs/cli/{run.cjs.map → run.js.map} +0 -0
  213. /package/dist/cjs/cli/{runAndroid.cjs.map → runAndroid.js.map} +0 -0
  214. /package/dist/cjs/cli/{runIos.cjs.map → runIos.js.map} +0 -0
  215. /package/dist/cjs/{clientLoaderResolver.cjs.map → clientLoaderResolver.js.map} +0 -0
  216. /package/dist/cjs/{config.cjs.map → config.js.map} +0 -0
  217. /package/dist/cjs/{constants.cjs.map → constants.js.map} +0 -0
  218. /package/dist/cjs/{createApp.cjs.map → createApp.js.map} +0 -0
  219. /package/dist/cjs/{createHandleRequest.cjs.map → createHandleRequest.js.map} +0 -0
  220. /package/dist/cjs/{createRoute.cjs.map → createRoute.js.map} +0 -0
  221. /package/dist/cjs/fallbackViews/{Sitemap.cjs.map → Sitemap.js.map} +0 -0
  222. /package/dist/cjs/fallbackViews/{Unmatched.cjs.map → Unmatched.js.map} +0 -0
  223. /package/dist/cjs/fork/{NavigationContainer.cjs.map → NavigationContainer.js.map} +0 -0
  224. /package/dist/cjs/fork/{createMemoryHistory.cjs.map → createMemoryHistory.js.map} +0 -0
  225. /package/dist/cjs/fork/{extractPathFromURL.cjs.map → extractPathFromURL.js.map} +0 -0
  226. /package/dist/cjs/fork/{findFocusedRoute.cjs.map → findFocusedRoute.js.map} +0 -0
  227. /package/dist/cjs/fork/{getPathFromState.cjs.map → getPathFromState.js.map} +0 -0
  228. /package/dist/cjs/fork/{getStateFromPath.cjs.map → getStateFromPath.js.map} +0 -0
  229. /package/dist/cjs/fork/{useLinking.cjs.map → useLinking.js.map} +0 -0
  230. /package/dist/cjs/fork/{validatePathConfig.cjs.map → validatePathConfig.js.map} +0 -0
  231. /package/dist/cjs/{getLinkingConfig.cjs.map → getLinkingConfig.js.map} +0 -0
  232. /package/dist/cjs/{getReactNavigationConfig.cjs.map → getReactNavigationConfig.js.map} +0 -0
  233. /package/dist/cjs/{getRoutes.cjs.map → getRoutes.js.map} +0 -0
  234. /package/dist/cjs/{getURL.cjs.map → getURL.js.map} +0 -0
  235. /package/dist/cjs/head/{Head.cjs.map → Head.js.map} +0 -0
  236. /package/dist/cjs/head/{HeadModule.cjs.map → HeadModule.js.map} +0 -0
  237. /package/dist/cjs/head/{index.cjs.map → index.js.map} +0 -0
  238. /package/dist/cjs/head/{types.cjs.map → types.js.map} +0 -0
  239. /package/dist/cjs/head/{url.cjs.map → url.js.map} +0 -0
  240. /package/dist/cjs/{hooks.cjs.map → hooks.js.map} +0 -0
  241. /package/dist/cjs/{imperative-api.cjs.map → imperative-api.js.map} +0 -0
  242. /package/dist/cjs/import-mode/{index.cjs.map → index.js.map} +0 -0
  243. /package/dist/cjs/import-mode/{index.web.cjs.map → index.web.js.map} +0 -0
  244. /package/dist/cjs/{index.cjs.map → index.js.map} +0 -0
  245. /package/dist/cjs/interfaces/{router.cjs.map → router.js.map} +0 -0
  246. /package/dist/cjs/layouts/{Drawer.cjs.map → Drawer.js.map} +0 -0
  247. /package/dist/cjs/layouts/{Stack.cjs.map → Stack.js.map} +0 -0
  248. /package/dist/cjs/layouts/{Tabs.cjs.map → Tabs.js.map} +0 -0
  249. /package/dist/cjs/layouts/{withLayoutContext.cjs.map → withLayoutContext.js.map} +0 -0
  250. /package/dist/cjs/link/{Link.cjs.map → Link.js.map} +0 -0
  251. /package/dist/cjs/link/{Redirect.cjs.map → Redirect.js.map} +0 -0
  252. /package/dist/cjs/link/{href.cjs.map → href.js.map} +0 -0
  253. /package/dist/cjs/link/{linking.cjs.map → linking.js.map} +0 -0
  254. /package/dist/cjs/link/{path.cjs.map → path.js.map} +0 -0
  255. /package/dist/cjs/link/{useLinkTo.cjs.map → useLinkTo.js.map} +0 -0
  256. /package/dist/cjs/link/{useLoadedNavigation.cjs.map → useLoadedNavigation.js.map} +0 -0
  257. /package/dist/cjs/{matchers.cjs.map → matchers.js.map} +0 -0
  258. /package/dist/cjs/{platform.cjs.map → platform.js.map} +0 -0
  259. /package/dist/cjs/{polyfills-mobile.cjs.map → polyfills-mobile.js.map} +0 -0
  260. /package/dist/cjs/{polyfills-server.cjs.map → polyfills-server.js.map} +0 -0
  261. /package/dist/cjs/{render.cjs.map → render.js.map} +0 -0
  262. /package/dist/cjs/router/{RouterStore.cjs.map → RouterStore.js.map} +0 -0
  263. /package/dist/cjs/router/{getNormalizedStatePath.cjs.map → getNormalizedStatePath.js.map} +0 -0
  264. /package/dist/cjs/router/{lastAction.cjs.map → lastAction.js.map} +0 -0
  265. /package/dist/cjs/router/{router.cjs.map → router.js.map} +0 -0
  266. /package/dist/cjs/router/{serverLocationContext.cjs.map → serverLocationContext.js.map} +0 -0
  267. /package/dist/cjs/router/{useInitializeOneRouter.cjs.map → useInitializeOneRouter.js.map} +0 -0
  268. /package/dist/cjs/{serve.cjs.map → serve.js.map} +0 -0
  269. /package/dist/cjs/server/{createRoutesManifest.cjs.map → createRoutesManifest.js.map} +0 -0
  270. /package/dist/cjs/server/{getServerManifest.cjs.map → getServerManifest.js.map} +0 -0
  271. /package/dist/cjs/{server-render.cjs.map → server-render.js.map} +0 -0
  272. /package/dist/cjs/{sortRoutes.cjs.map → sortRoutes.js.map} +0 -0
  273. /package/dist/cjs/typed-routes/{generateRouteTypes.cjs.map → generateRouteTypes.js.map} +0 -0
  274. /package/dist/cjs/typed-routes/{getTypedRoutesDeclarationFile.cjs.map → getTypedRoutesDeclarationFile.js.map} +0 -0
  275. /package/dist/cjs/{types.cjs.map → types.js.map} +0 -0
  276. /package/dist/cjs/{useFocusEffect.cjs.map → useFocusEffect.js.map} +0 -0
  277. /package/dist/cjs/{useLoader.cjs.map → useLoader.js.map} +0 -0
  278. /package/dist/cjs/{useNavigation.cjs.map → useNavigation.js.map} +0 -0
  279. /package/dist/cjs/{useScreens.cjs.map → useScreens.js.map} +0 -0
  280. /package/dist/cjs/{useViteRoutes.cjs.map → useViteRoutes.js.map} +0 -0
  281. /package/dist/cjs/utils/{assertIsReady.cjs.map → assertIsReady.js.map} +0 -0
  282. /package/dist/cjs/utils/{dynamicImport.cjs.map → dynamicImport.js.map} +0 -0
  283. /package/dist/cjs/utils/{existsAsync.cjs.map → existsAsync.js.map} +0 -0
  284. /package/dist/cjs/utils/{getPageExport.cjs.map → getPageExport.js.map} +0 -0
  285. /package/dist/cjs/utils/{globDir.cjs.map → globDir.js.map} +0 -0
  286. /package/dist/cjs/utils/{hashString.cjs.map → hashString.js.map} +0 -0
  287. /package/dist/cjs/utils/{isResponse.cjs.map → isResponse.js.map} +0 -0
  288. /package/dist/cjs/utils/{isStatus.cjs.map → isStatus.js.map} +0 -0
  289. /package/dist/cjs/utils/{promiseWithResolvers.cjs.map → promiseWithResolvers.js.map} +0 -0
  290. /package/dist/cjs/utils/{rand.cjs.map → rand.js.map} +0 -0
  291. /package/dist/cjs/utils/{redirect.cjs.map → redirect.js.map} +0 -0
  292. /package/dist/cjs/utils/{removeSearch.cjs.map → removeSearch.js.map} +0 -0
  293. /package/dist/cjs/utils/{removeUndefined.cjs.map → removeUndefined.js.map} +0 -0
  294. /package/dist/cjs/utils/{url.cjs.map → url.js.map} +0 -0
  295. /package/dist/cjs/utils/{weakKey.cjs.map → weakKey.js.map} +0 -0
  296. /package/dist/cjs/utils/{weakMemo.cjs.map → weakMemo.js.map} +0 -0
  297. /package/dist/cjs/views/{EmptyRoute.cjs.map → EmptyRoute.js.map} +0 -0
  298. /package/dist/cjs/views/{ErrorBoundary.cjs.map → ErrorBoundary.js.map} +0 -0
  299. /package/dist/cjs/views/{LoadProgressBar.cjs.map → LoadProgressBar.js.map} +0 -0
  300. /package/dist/cjs/views/{Navigator.cjs.map → Navigator.js.map} +0 -0
  301. /package/dist/cjs/views/{PreloadLinks.cjs.map → PreloadLinks.js.map} +0 -0
  302. /package/dist/cjs/views/{RootErrorBoundary.cjs.map → RootErrorBoundary.js.map} +0 -0
  303. /package/dist/cjs/views/{Screen.cjs.map → Screen.js.map} +0 -0
  304. /package/dist/cjs/views/{ScrollRestoration.cjs.map → ScrollRestoration.js.map} +0 -0
  305. /package/dist/cjs/views/{Try.cjs.map → Try.js.map} +0 -0
  306. /package/dist/cjs/vite/{build.cjs.map → build.js.map} +0 -0
  307. /package/dist/cjs/vite/{clientTreeShakePlugin.cjs.map → clientTreeShakePlugin.js.map} +0 -0
  308. /package/dist/cjs/vite/{constants.cjs.map → constants.js.map} +0 -0
  309. /package/dist/cjs/vite/{customNodeExternals.cjs.map → customNodeExternals.js.map} +0 -0
  310. /package/dist/cjs/vite/{ensureTsConfig.cjs.map → ensureTsConfig.js.map} +0 -0
  311. /package/dist/cjs/vite/{findDepsToOptimize.cjs.map → findDepsToOptimize.js.map} +0 -0
  312. /package/dist/cjs/vite/{fixDependenciesPlugin.cjs.map → fixDependenciesPlugin.js.map} +0 -0
  313. /package/dist/cjs/vite/{generateTypesForRoutes.cjs.map → generateTypesForRoutes.js.map} +0 -0
  314. /package/dist/cjs/vite/{getManifest.cjs.map → getManifest.js.map} +0 -0
  315. /package/dist/cjs/vite/{headers.cjs.map → headers.js.map} +0 -0
  316. /package/dist/cjs/vite/{makePluginWebOnly.cjs.map → makePluginWebOnly.js.map} +0 -0
  317. /package/dist/cjs/vite/{one.cjs.map → one.js.map} +0 -0
  318. /package/dist/cjs/vite/{removeReactNativeWebAnimatedPlugin.cjs.map → removeReactNativeWebAnimatedPlugin.js.map} +0 -0
  319. /package/dist/cjs/vite/{replaceLoader.cjs.map → replaceLoader.js.map} +0 -0
  320. /package/dist/cjs/vite/{resolveAPIRequest.cjs.map → resolveAPIRequest.js.map} +0 -0
  321. /package/dist/cjs/vite/{server.cjs.map → server.js.map} +0 -0
  322. /package/dist/cjs/vite/{types.cjs.map → types.js.map} +0 -0
  323. /package/dist/cjs/vite/{virtualEntryPlugin.cjs.map → virtualEntryPlugin.js.map} +0 -0
  324. /package/dist/cjs/vite/{vitePluginSsrCss.cjs.map → vitePluginSsrCss.js.map} +0 -0
  325. /package/dist/cjs/zero/{getQueryKey.cjs.map → getQueryKey.js.map} +0 -0
  326. /package/dist/cjs/zero/{isZeroQuery.cjs.map → isZeroQuery.js.map} +0 -0
  327. /package/dist/cjs/zero/{resolveQuery.cjs.map → resolveQuery.js.map} +0 -0
  328. /package/dist/cjs/zero/{subscribeToQuery.cjs.map → subscribeToQuery.js.map} +0 -0
  329. /package/dist/cjs/zero/{types.cjs.map → types.js.map} +0 -0
  330. /package/dist/cjs/zero/{useQuery.cjs.map → useQuery.js.map} +0 -0
  331. /package/dist/cjs/zero/{useQueryZero.cjs.map → useQueryZero.js.map} +0 -0
  332. /package/dist/cjs/{zero.cjs.map → zero.js.map} +0 -0
@@ -0,0 +1,220 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from == "object" || typeof from == "function")
8
+ for (let key of __getOwnPropNames(from))
9
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ return to;
11
+ };
12
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
13
+ // If the importer is in node compatibility mode or this is not an ESM
14
+ // file that has been converted to a CommonJS file using a Babel-
15
+ // compatible transform (i.e. "__esModule" has not been set), then set
16
+ // "default" to the CommonJS "module.exports" for node compatibility.
17
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
18
+ mod
19
+ ));
20
+ var import_citty = require("citty"), import_picocolors = __toESM(require("picocolors"), 1), import_node_fs = require("node:fs"), import_node_path = __toESM(require("node:path"), 1), import_node_url = require("node:url");
21
+ const import_meta = {};
22
+ function getPackageVersion() {
23
+ let dirname;
24
+ typeof __dirname < "u" ? dirname = __dirname : dirname = import_node_path.default.dirname((0, import_node_url.fileURLToPath)(import_meta.url));
25
+ const packagePath = import_node_path.default.join(dirname, "..", "..", "package.json");
26
+ return JSON.parse((0, import_node_fs.readFileSync)(packagePath, "utf-8")).version;
27
+ }
28
+ const version = getPackageVersion();
29
+ import_node_path.default.sep !== "/" && console.warn(
30
+ import_picocolors.default.bgYellow("WARNING: UNSUPPORTED OS") + import_picocolors.default.yellow(
31
+ " - It appears you\u2019re using Windows, which is currently not supported. You may experience unexpected issues."
32
+ )
33
+ );
34
+ const modes = {
35
+ development: "development",
36
+ production: "production"
37
+ }, dev = (0, import_citty.defineCommand)({
38
+ meta: {
39
+ name: "dev",
40
+ version,
41
+ description: "Start the dev server"
42
+ },
43
+ args: {
44
+ clean: {
45
+ type: "boolean"
46
+ },
47
+ host: {
48
+ type: "string"
49
+ },
50
+ port: {
51
+ type: "string"
52
+ },
53
+ https: {
54
+ type: "boolean"
55
+ },
56
+ mode: {
57
+ type: "string",
58
+ description: 'If set to "production" you can run the development server but serve the production bundle'
59
+ }
60
+ },
61
+ async run({ args: { clean: clean2, host, https, mode, port } }) {
62
+ const { run } = await import("./cli/run");
63
+ await run({
64
+ clean: clean2,
65
+ host,
66
+ https,
67
+ mode: modes[mode],
68
+ port
69
+ });
70
+ }
71
+ }), buildCommand = (0, import_citty.defineCommand)({
72
+ meta: {
73
+ name: "build",
74
+ version,
75
+ description: "Build your app"
76
+ },
77
+ args: {
78
+ step: {
79
+ type: "string",
80
+ required: !1
81
+ },
82
+ // limit the pages built
83
+ only: {
84
+ type: "string",
85
+ required: !1
86
+ }
87
+ },
88
+ async run({ args }) {
89
+ const { build } = await import("./vite/build");
90
+ await build(args), process.exit(0);
91
+ }
92
+ }), serveCommand = (0, import_citty.defineCommand)({
93
+ meta: {
94
+ name: "serve",
95
+ version,
96
+ description: "Serve a built app for production"
97
+ },
98
+ args: {
99
+ host: {
100
+ type: "string"
101
+ },
102
+ port: {
103
+ type: "string"
104
+ },
105
+ platform: {
106
+ type: "string"
107
+ },
108
+ compress: {
109
+ type: "boolean"
110
+ },
111
+ cacheHeaders: {
112
+ type: "boolean"
113
+ }
114
+ },
115
+ async run({ args }) {
116
+ const { serve } = await import("./serve");
117
+ await serve({
118
+ port: args.port ? +args.port : void 0,
119
+ host: args.host,
120
+ cacheHeaders: args.cacheHeaders === !1 ? "off" : void 0,
121
+ compress: args.compress,
122
+ platform: args.platform === "vercel" ? "vercel" : "node"
123
+ });
124
+ }
125
+ }), prebuild = (0, import_citty.defineCommand)({
126
+ meta: {
127
+ name: "prebuild",
128
+ version,
129
+ description: "Prebuild native iOS project"
130
+ // TODO: Android
131
+ },
132
+ args: {},
133
+ async run({ args }) {
134
+ const { run } = await import("./cli/prebuild");
135
+ await run(args);
136
+ }
137
+ }), runIos = (0, import_citty.defineCommand)({
138
+ meta: {
139
+ name: "run:ios",
140
+ version
141
+ },
142
+ args: {},
143
+ async run({ args }) {
144
+ const { run } = await import("./cli/runIos");
145
+ await run(args);
146
+ }
147
+ }), runAndroid = (0, import_citty.defineCommand)({
148
+ meta: {
149
+ name: "run:android",
150
+ version
151
+ },
152
+ args: {},
153
+ async run({ args }) {
154
+ const { run } = await import("./cli/runAndroid");
155
+ await run(args);
156
+ }
157
+ }), clean = (0, import_citty.defineCommand)({
158
+ meta: {
159
+ name: "clean",
160
+ version: "0.0.0",
161
+ description: "Clean build folders"
162
+ },
163
+ args: {},
164
+ async run() {
165
+ const { clean: vxrnClean } = await import("vxrn");
166
+ await vxrnClean({
167
+ root: process.cwd()
168
+ });
169
+ }
170
+ }), patch = (0, import_citty.defineCommand)({
171
+ meta: {
172
+ name: "patch",
173
+ version: "0.0.0",
174
+ description: "Apply package patches"
175
+ },
176
+ args: {},
177
+ async run({ args }) {
178
+ const { run } = await import("./cli/patch");
179
+ await run(args);
180
+ }
181
+ }), subCommands = {
182
+ dev,
183
+ clean,
184
+ build: buildCommand,
185
+ prebuild,
186
+ "run:ios": runIos,
187
+ "run:android": runAndroid,
188
+ patch,
189
+ serve: serveCommand
190
+ }, subMain = (0, import_citty.defineCommand)({
191
+ meta: {
192
+ name: "main",
193
+ version,
194
+ description: "Welcome to One"
195
+ },
196
+ subCommands
197
+ }), main = (0, import_citty.defineCommand)({
198
+ meta: {
199
+ name: "main",
200
+ version,
201
+ description: "Welcome to One"
202
+ },
203
+ args: {
204
+ name: {
205
+ type: "positional",
206
+ description: "Folder name to place the app into",
207
+ required: !1
208
+ }
209
+ },
210
+ async run({ args }) {
211
+ if (subCommands[args.name]) {
212
+ (0, import_citty.runMain)(subMain);
213
+ return;
214
+ }
215
+ const { cliMain } = await import("./cli/main");
216
+ await cliMain(args);
217
+ }
218
+ });
219
+ (0, import_citty.runMain)(main);
220
+ //# sourceMappingURL=cli.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/cli.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;AAAA,mBAAuC,kBACvC,oBAAmB,mCACnB,iBAA6B,oBAC7B,mBAAiB,kCACjB,kBAA8B;AAJ9B;AAMA,SAAS,oBAAoB;AAC3B,MAAI;AACJ,EAAI,OAAO,YAAc,MAEvB,UAAU,YAGV,UAAU,iBAAAA,QAAK,YAAQ,+BAAc,YAAY,GAAG,CAAC;AAEvD,QAAM,cAAc,iBAAAA,QAAK,KAAK,SAAS,MAAM,MAAM,cAAc;AAEjE,SADoB,KAAK,UAAM,6BAAa,aAAa,OAAO,CAAC,EAC9C;AACrB;AAEA,MAAM,UAAU,kBAAkB;AAE9B,iBAAAA,QAAK,QAAQ,OACf,QAAQ;AAAA,EACN,kBAAAC,QAAO,SAAS,yBAAyB,IACvC,kBAAAA,QAAO;AAAA,IACL;AAAA,EACF;AACJ;AAGF,MAAM,QAAQ;AAAA,EACZ,aAAa;AAAA,EACb,YAAY;AACd,GAEM,UAAM,4BAAc;AAAA,EACxB,MAAM;AAAA,IACJ,MAAM;AAAA,IACN;AAAA,IACA,aAAa;AAAA,EACf;AAAA,EACA,MAAM;AAAA,IACJ,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,IACA,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,aACE;AAAA,IACJ;AAAA,EACF;AAAA,EACA,MAAM,IAAI,EAAE,MAAM,EAAE,OAAAC,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  }
@@ -164,6 +164,17 @@ var modes = {
164
164
  root: process.cwd()
165
165
  });
166
166
  }
167
+ }), patch = (0, import_citty.defineCommand)({
168
+ meta: {
169
+ name: "patch",
170
+ version: "0.0.0",
171
+ description: "Apply package patches"
172
+ },
173
+ args: {},
174
+ async run(param) {
175
+ var { args } = param, { run } = await import("./cli/patch");
176
+ await run(args);
177
+ }
167
178
  }), subCommands = {
168
179
  dev,
169
180
  clean,
@@ -171,6 +182,7 @@ var modes = {
171
182
  prebuild,
172
183
  "run:ios": runIos,
173
184
  "run:android": runAndroid,
185
+ patch,
174
186
  serve: serveCommand
175
187
  }, subMain = (0, import_citty.defineCommand)({
176
188
  meta: {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Users/n8/one/packages/one/src/cli.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA,mBAAuC,kBACvC,oBAAmB,mCACnB,iBAA6B,oBAC7B,mBAAiB,kCACjB,kBAA8B;AAJ9B;AAMA,SAASA,oBAAAA;AACP,MAAIC;AACJ,EAAI,OAAOC,YAAc,MAEvBD,UAAUC,YAGVD,UAAUE,iBAAAA,QAAKF,YAAQG,+BAAc,YAAYC,GAAG,CAAA;AAEtD,MAAMC,cAAcH,iBAAAA,QAAKI,KAAKN,SAAS,MAAM,MAAM,cAAA,GAC7CO,cAAcC,KAAKC,UAAMC,6BAAaL,aAAa,OAAA,CAAA;AACzD,SAAOE,YAAYI;AACrB;AAEA,IAAMA,UAAUZ,kBAAAA;AAEZG,iBAAAA,QAAKU,QAAQ,OACfC,QAAQC,KACNC,kBAAAA,QAAOC,SAAS,yBAAA,IACdD,kBAAAA,QAAOE,OACL,kHAAA,CAAA;AAKR,IAAMC,QAAQ;EACZC,aAAa;EACbC,YAAY;AACd,GAEMC,UAAMC,4BAAc;EACxBC,MAAM;IACJC,MAAM;IACNb;IACAc,aAAa;EACf;EACAC,MAAM;IACJC,OAAO;MACLC,MAAM;IACR;IAC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C,MAAM;IACJF,MAAM;MACJI,MAAM;MACNH,aAAa;MACbW,UAAU;IACZ;EACF;EACA,MAAMH,IAAI,OAAQ;QAAR,EAAEP,KAAI,IAAN;AACR,QAAI2B,YAAY3B,KAAKF,IAAI,GAAG;AAE1BgC,gCAAQF,OAAAA;AACR;IACF;AAEA,QAAM,EAAEG,QAAO,IAAK,MAAM,OAAO,YAAA;AACjC,UAAMA,QAAQ/B,IAAAA;EAChB;AACF,CAAA;IAEA8B,sBAAQD,IAAAA;",
5
- "names": ["getPackageVersion", "dirname", "__dirname", "path", "fileURLToPath", "url", "packagePath", "join", "packageJson", "JSON", "parse", "readFileSync", "version", "sep", "console", "warn", "colors", "bgYellow", "yellow", "modes", "development", "production", "dev", "defineCommand", "meta", "name", "description", "args", "clean", "type", "host", "port", "https", "mode", "run", "buildCommand", "step", "required", "only", "build", "process", "exit", "serveCommand", "platform", "compress", "cacheHeaders", "serve", "undefined", "prebuild", "runIos", "runAndroid", "vxrnClean", "root", "cwd", "subCommands", "subMain", "main", "runMain", "cliMain"]
4
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA,mBAAuC,kBACvC,oBAAmB,mCACnB,iBAA6B,oBAC7B,mBAAiB,kCACjB,kBAA8B;AAJ9B;AAMA,SAASA,oBAAAA;AACP,MAAIC;AACJ,EAAI,OAAOC,YAAc,MAEvBD,UAAUC,YAGVD,UAAUE,iBAAAA,QAAKF,YAAQG,+BAAc,YAAYC,GAAG,CAAA;AAEtD,MAAMC,cAAcH,iBAAAA,QAAKI,KAAKN,SAAS,MAAM,MAAM,cAAA,GAC7CO,cAAcC,KAAKC,UAAMC,6BAAaL,aAAa,OAAA,CAAA;AACzD,SAAOE,YAAYI;AACrB;AAEA,IAAMA,UAAUZ,kBAAAA;AAEZG,iBAAAA,QAAKU,QAAQ,OACfC,QAAQC,KACNC,kBAAAA,QAAOC,SAAS,yBAAA,IACdD,kBAAAA,QAAOE,OACL,kHAAA,CAAA;AAKR,IAAMC,QAAQ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I,OAAQ;QAAR,EAAEP,KAAI,IAAN,OACF,EAAEO,IAAG,IAAK,MAAM,OAAO,aAAA;AAC7B,UAAMA,IAAIP,IAAAA;EACZ;AACF,CAAA,GAEM4B,cAAc;EAClBjC;EACAM;EACAW,OAAOJ;EACPa;EACA,WAAWC;EACX,eAAeC;EACfI;EACAR,OAAOJ;AACT,GAGMc,cAAUjC,4BAAc;EAC5BC,MAAM;IACJC,MAAM;IACNb;IACAc,aAAa;EACf;EACA6B;AACF,CAAA,GAEME,WAAOlC,4BAAc;EACzBC,MAAM;IACJC,MAAM;IACNb;IACAc,aAAa;EACf;EACAC,MAAM;IACJF,MAAM;MACJI,MAAM;MACNH,aAAa;MACbW,UAAU;IACZ;EACF;EACA,MAAMH,IAAI,OAAQ;QAAR,EAAEP,KAAI,IAAN;AACR,QAAI4B,YAAY5B,KAAKF,IAAI,GAAG;AAE1BiC,gCAAQF,OAAAA;AACR;IACF;AAEA,QAAM,EAAEG,QAAO,IAAK,MAAM,OAAO,YAAA;AACjC,UAAMA,QAAQhC,IAAAA;EAChB;AACF,CAAA;IAEA+B,sBAAQD,IAAAA;",
5
+ "names": ["getPackageVersion", "dirname", "__dirname", "path", "fileURLToPath", "url", "packagePath", "join", "packageJson", "JSON", "parse", "readFileSync", "version", "sep", "console", "warn", "colors", "bgYellow", "yellow", "modes", "development", "production", "dev", "defineCommand", "meta", "name", "description", "args", "clean", "type", "host", "port", "https", "mode", "run", "buildCommand", "step", "required", "only", "build", "process", "exit", "serveCommand", "platform", "compress", "cacheHeaders", "serve", "undefined", "prebuild", "runIos", "runAndroid", "vxrnClean", "root", "cwd", "patch", "subCommands", "subMain", "main", "runMain", "cliMain"]
6
6
  }
@@ -0,0 +1,32 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: !0 });
8
+ }, __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from == "object" || typeof from == "function")
10
+ for (let key of __getOwnPropNames(from))
11
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
+ var clientLoaderResolver_exports = {};
16
+ __export(clientLoaderResolver_exports, {
17
+ onClientLoaderResolve: () => onClientLoaderResolve,
18
+ resolveClientLoader: () => resolveClientLoader
19
+ });
20
+ module.exports = __toCommonJS(clientLoaderResolver_exports);
21
+ let clientLoaderResolver = null, didRun = !1;
22
+ function onClientLoaderResolve(resolver) {
23
+ if (didRun)
24
+ throw new Error(
25
+ process.env.NODE_ENV === "production" ? "Error 002" : "Error: You called onClientLoaderResolve after it was run, register it in your root _layout.tsx"
26
+ );
27
+ clientLoaderResolver = resolver;
28
+ }
29
+ async function resolveClientLoader(props) {
30
+ didRun = !0, clientLoaderResolver && await clientLoaderResolver(props);
31
+ }
32
+ //# sourceMappingURL=clientLoaderResolver.js.map
@@ -0,0 +1,27 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: !0 });
8
+ }, __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from == "object" || typeof from == "function")
10
+ for (let key of __getOwnPropNames(from))
11
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
+ var config_exports = {};
16
+ __export(config_exports, {
17
+ getDefaultRenderMode: () => getDefaultRenderMode
18
+ });
19
+ module.exports = __toCommonJS(config_exports);
20
+ var import_constants = require("./constants");
21
+ const CLIENT_RENDER_MODE = process.env.ONE_DEFAULT_RENDER_MODE, getDefaultRenderMode = () => {
22
+ const serverConfig = globalThis.__vxrnPluginConfig__;
23
+ if (import_constants.isWebServer && !serverConfig)
24
+ throw new Error("Internal one error: should call setServerConfig before createManifest");
25
+ return CLIENT_RENDER_MODE ?? serverConfig?.web?.defaultRenderMode ?? "ssg";
26
+ };
27
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1,28 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: !0 });
8
+ }, __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from == "object" || typeof from == "function")
10
+ for (let key of __getOwnPropNames(from))
11
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
+ var constants_exports = {};
16
+ __export(constants_exports, {
17
+ CACHE_KEY: () => CACHE_KEY,
18
+ LOADER_JS_POSTFIX: () => LOADER_JS_POSTFIX,
19
+ LOADER_JS_POSTFIX_REGEX: () => LOADER_JS_POSTFIX_REGEX,
20
+ LOADER_JS_POSTFIX_UNCACHED: () => LOADER_JS_POSTFIX_UNCACHED,
21
+ PRELOAD_JS_POSTFIX: () => PRELOAD_JS_POSTFIX,
22
+ isNative: () => isNative,
23
+ isWebClient: () => isWebClient,
24
+ isWebServer: () => isWebServer
25
+ });
26
+ module.exports = __toCommonJS(constants_exports);
27
+ const isWebClient = typeof window < "u", isWebServer = typeof window > "u", isNative = !1, CACHE_KEY = `${process.env.ONE_CACHE_KEY ?? Math.round(Math.random() * 1e8)}`, LOADER_JS_POSTFIX_UNCACHED = "_vxrn_loader.js", LOADER_JS_POSTFIX_REGEX = new RegExp(`_\\d+${LOADER_JS_POSTFIX_UNCACHED}$`), LOADER_JS_POSTFIX = `_${CACHE_KEY}${LOADER_JS_POSTFIX_UNCACHED}`, PRELOAD_JS_POSTFIX = `_${CACHE_KEY}_preload.js`;
28
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1,46 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: !0 });
8
+ }, __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from == "object" || typeof from == "function")
10
+ for (let key of __getOwnPropNames(from))
11
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
+ var createApp_exports = {};
16
+ __export(createApp_exports, {
17
+ createApp: () => createApp
18
+ });
19
+ module.exports = __toCommonJS(createApp_exports);
20
+ var import_Root = require("./Root"), import_clientLoaderResolver = require("./clientLoaderResolver"), import_render = require("./render"), import_server_render = require("./server-render"), import_jsx_runtime = require("react/jsx-runtime");
21
+ const import_meta = {};
22
+ function createApp(options) {
23
+ return import_meta.env.SSR ? {
24
+ options,
25
+ render: async (props) => {
26
+ let html = await (0, import_server_render.renderToString)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Root.Root, { routes: options.routes, ...props }), {
27
+ preloads: props.preloads
28
+ });
29
+ const serverData = globalThis.__vxrnServerData__;
30
+ return serverData && Object.keys(serverData).length && (html = html.replace("{ __vxrn__: 'post-render' }", JSON.stringify(serverData))), html;
31
+ }
32
+ } : (options.routes["/app/_layout.tsx"]?.()).then(() => {
33
+ (0, import_clientLoaderResolver.resolveClientLoader)({
34
+ loaderData: globalThis.__vxrnLoaderData__,
35
+ loaderServerData: globalThis.__vxrnLoaderServerData__,
36
+ loaderProps: globalThis.__vxrnLoaderProps__
37
+ }).then(() => {
38
+ (0, import_render.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Root.Root, { isClient: !0, routes: options.routes, path: window.location.href }));
39
+ }).catch((err) => {
40
+ console.error('Error running client loader resolver "onClientLoaderResolve":', err);
41
+ });
42
+ }).catch((err) => {
43
+ console.error("Error importing root layout on client", err);
44
+ });
45
+ }
46
+ //# sourceMappingURL=createApp.js.map
@@ -0,0 +1,138 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: !0 });
8
+ }, __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from == "object" || typeof from == "function")
10
+ for (let key of __getOwnPropNames(from))
11
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
+ var createHandleRequest_exports = {};
16
+ __export(createHandleRequest_exports, {
17
+ createHandleRequest: () => createHandleRequest
18
+ });
19
+ module.exports = __toCommonJS(createHandleRequest_exports);
20
+ var import_cleanUrl = require("./cleanUrl"), import_constants = require("./constants"), import_isResponse = require("./utils/isResponse"), import_promiseWithResolvers = require("./utils/promiseWithResolvers"), import_getManifest = require("./vite/getManifest");
21
+ function createHandleRequest(options, handlers) {
22
+ const manifest = (0, import_getManifest.getManifest)();
23
+ if (!manifest)
24
+ throw new Error("No routes manifest");
25
+ const apiRoutesMap = manifest.apiRoutes.reduce((acc, cur) => (acc[cur.page] = { ...cur, compiledRegex: new RegExp(cur.namedRegex) }, acc), {}), apiRoutesList = Object.values(apiRoutesMap), activeRequests = {}, pageRoutes = manifest.pageRoutes.map((route) => ({
26
+ ...route,
27
+ workingRegex: new RegExp(route.namedRegex)
28
+ }));
29
+ return {
30
+ manifest,
31
+ handler: async function(request) {
32
+ const urlString = request.url || "", url = new URL(
33
+ urlString || "",
34
+ request.headers.get("host") ? `http://${request.headers.get("host")}` : ""
35
+ ), { pathname, search } = url;
36
+ if (process.env.NODE_ENV !== "production" && activeRequests[pathname])
37
+ return await activeRequests[pathname];
38
+ if (pathname === "/__vxrnhmr" || pathname.startsWith("/@"))
39
+ return null;
40
+ if (handlers.handleAPI) {
41
+ const apiRoute = apiRoutesList.find((route) => route.compiledRegex.test(pathname));
42
+ if (apiRoute) {
43
+ const params = getRouteParams(pathname, apiRoute);
44
+ try {
45
+ return await handlers.handleAPI({
46
+ request,
47
+ route: apiRoute,
48
+ url,
49
+ loaderProps: {
50
+ path: pathname,
51
+ params
52
+ }
53
+ });
54
+ } catch (err) {
55
+ if ((0, import_isResponse.isResponse)(err))
56
+ return err;
57
+ throw err;
58
+ }
59
+ }
60
+ }
61
+ if (request.method !== "GET")
62
+ return null;
63
+ if (handlers.handleLoader && pathname.endsWith(import_constants.LOADER_JS_POSTFIX_UNCACHED)) {
64
+ const originalUrl = (0, import_cleanUrl.getPathFromLoaderPath)(pathname), finalUrl = new URL(originalUrl, url.origin);
65
+ for (const route of pageRoutes) {
66
+ if (route.file === "" || !route.workingRegex.test(finalUrl.pathname))
67
+ continue;
68
+ process.env.NODE_ENV === "development" && console.info(` \u2776 Running loader for route: ${finalUrl.pathname}`);
69
+ const headers = new Headers();
70
+ headers.set("Content-Type", "text/javascript");
71
+ try {
72
+ const loaderResponse = await handlers.handleLoader({
73
+ request,
74
+ route,
75
+ url,
76
+ loaderProps: {
77
+ path: finalUrl.pathname,
78
+ params: getLoaderParams(finalUrl, route)
79
+ }
80
+ });
81
+ return new Response(loaderResponse, {
82
+ headers
83
+ });
84
+ } catch (err) {
85
+ if ((0, import_isResponse.isResponse)(err))
86
+ return err;
87
+ throw console.error(`Error running loader: ${err}`), err;
88
+ }
89
+ }
90
+ return process.env.NODE_ENV === "development" && console.error("No matching route found!", {
91
+ originalUrl,
92
+ routes: manifest.pageRoutes
93
+ }), Response.error();
94
+ }
95
+ if (handlers.handleSSR) {
96
+ const { promise, reject, resolve } = (0, import_promiseWithResolvers.promiseWithResolvers)();
97
+ activeRequests[pathname] = promise;
98
+ try {
99
+ for (const route of pageRoutes) {
100
+ if (!route.workingRegex.test(pathname))
101
+ continue;
102
+ const ssrResponse = await handlers.handleSSR({
103
+ request,
104
+ route,
105
+ url,
106
+ loaderProps: {
107
+ path: pathname + search,
108
+ params: getLoaderParams(url, route)
109
+ }
110
+ });
111
+ return resolve(ssrResponse), ssrResponse;
112
+ }
113
+ } catch (err) {
114
+ throw reject(err), err;
115
+ } finally {
116
+ delete activeRequests[pathname];
117
+ }
118
+ }
119
+ return null;
120
+ }
121
+ };
122
+ }
123
+ function getLoaderParams(url, config) {
124
+ const params = {}, match = new RegExp(config.workingRegex).exec(url.pathname);
125
+ if (match?.groups)
126
+ for (const [key, value] of Object.entries(match.groups)) {
127
+ const namedKey = config.routeKeys[key];
128
+ params[namedKey] = value;
129
+ }
130
+ return params;
131
+ }
132
+ function getRouteParams(pathname, route) {
133
+ const match = new RegExp(route.namedRegex).exec(pathname);
134
+ return match ? Object.fromEntries(
135
+ Object.entries(route.routeKeys).map(([key, value]) => [value, match.groups?.[key]])
136
+ ) : {};
137
+ }
138
+ //# sourceMappingURL=createHandleRequest.js.map
@@ -0,0 +1,37 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: !0 });
8
+ }, __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from == "object" || typeof from == "function")
10
+ for (let key of __getOwnPropNames(from))
11
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
+ var createRoute_exports = {};
16
+ __export(createRoute_exports, {
17
+ createRoute: () => createRoute,
18
+ route: () => route
19
+ });
20
+ module.exports = __toCommonJS(createRoute_exports);
21
+ var import_hooks = require("./hooks");
22
+ function createRoute() {
23
+ return {
24
+ useParams: () => (0, import_hooks.useParams)(),
25
+ useActiveParams: () => (0, import_hooks.useActiveParams)(),
26
+ createLoader: (a) => a
27
+ };
28
+ }
29
+ const defaults = createRoute(), getProxy = () => new Proxy(
30
+ {},
31
+ {
32
+ get(target, key) {
33
+ return Reflect.has(defaults, key) ? Reflect.get(defaults, key) : getProxy();
34
+ }
35
+ }
36
+ ), postIdRoute = createRoute(), route = getProxy();
37
+ //# sourceMappingURL=createRoute.js.map