one 1.15.8 → 1.15.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (348) hide show
  1. package/dist/cjs/Root.native.js.map +1 -1
  2. package/dist/cjs/__mocks__/@react-navigation/native-stack.native.js.map +1 -1
  3. package/dist/cjs/__mocks__/expo-linking.native.js.map +1 -1
  4. package/dist/cjs/__mocks__/expo-modules-core.native.js.map +1 -1
  5. package/dist/cjs/__mocks__/react-native-screens.native.js.map +1 -1
  6. package/dist/cjs/babel-plugins/environment-guard.native.js.map +1 -1
  7. package/dist/cjs/babel-plugins/inline-one-server-url.native.js.map +1 -1
  8. package/dist/cjs/babel-plugins/one-router-metro.native.js.map +1 -1
  9. package/dist/cjs/babel-plugins/one-router-metro.test.native.js.map +1 -1
  10. package/dist/cjs/babel-plugins/remove-server-code.native.js.map +1 -1
  11. package/dist/cjs/cli/build.native.js.map +1 -1
  12. package/dist/cjs/cli/buildPage.native.js.map +1 -1
  13. package/dist/cjs/cli/buildPageWorker.native.js.map +1 -1
  14. package/dist/cjs/cli/checkNodeVersion.native.js.map +1 -1
  15. package/dist/cjs/cli/daemon.native.js.map +1 -1
  16. package/dist/cjs/cli/dev.native.js.map +1 -1
  17. package/dist/cjs/cli/generateRoutes.native.js.map +1 -1
  18. package/dist/cjs/cli/generateSitemap.native.js.map +1 -1
  19. package/dist/cjs/cli/generateSitemap.test.native.js.map +1 -1
  20. package/dist/cjs/cli/label-process.native.js.map +1 -1
  21. package/dist/cjs/cli/main.native.js.map +1 -1
  22. package/dist/cjs/cli/patch.native.js.map +1 -1
  23. package/dist/cjs/cli/prebuild.native.js.map +1 -1
  24. package/dist/cjs/cli/runAndroid.native.js.map +1 -1
  25. package/dist/cjs/cli/runIos.native.js.map +1 -1
  26. package/dist/cjs/cli/securityScan.native.js.map +1 -1
  27. package/dist/cjs/cli/workerPool.native.js.map +1 -1
  28. package/dist/cjs/cli.native.js.map +1 -1
  29. package/dist/cjs/clientLoaderResolver.native.js.map +1 -1
  30. package/dist/cjs/config.native.js.map +1 -1
  31. package/dist/cjs/constants.cjs +4 -4
  32. package/dist/cjs/constants.native.js +4 -4
  33. package/dist/cjs/constants.native.js.map +1 -1
  34. package/dist/cjs/createAPIRoute.native.js.map +1 -1
  35. package/dist/cjs/createHandleRequest.native.js.map +1 -1
  36. package/dist/cjs/createHandleRequest.test.native.js.map +1 -1
  37. package/dist/cjs/createMiddleware.native.js.map +1 -1
  38. package/dist/cjs/daemon/index.native.js.map +1 -1
  39. package/dist/cjs/daemon/ipc.native.js.map +1 -1
  40. package/dist/cjs/daemon/picker.native.js.map +1 -1
  41. package/dist/cjs/daemon/proxy.native.js.map +1 -1
  42. package/dist/cjs/daemon/registry.native.js.map +1 -1
  43. package/dist/cjs/daemon/server.native.js.map +1 -1
  44. package/dist/cjs/daemon/tui.native.js.map +1 -1
  45. package/dist/cjs/daemon/types.native.js.map +1 -1
  46. package/dist/cjs/daemon/utils.native.js.map +1 -1
  47. package/dist/cjs/devtools/registry.native.js.map +1 -1
  48. package/dist/cjs/drawer.native.js.map +1 -1
  49. package/dist/cjs/fallbackViews/Sitemap.native.js.map +1 -1
  50. package/dist/cjs/fallbackViews/Unmatched.native.js.map +1 -1
  51. package/dist/cjs/fork/NavigationContainer.native.js.map +1 -1
  52. package/dist/cjs/fork/SSRNavigationContainer.native.js.map +1 -1
  53. package/dist/cjs/fork/__tests__/getPathFromState.test.native.js.map +1 -1
  54. package/dist/cjs/fork/__tests__/getStateFromPath.test.native.js.map +1 -1
  55. package/dist/cjs/fork/_shared.native.js.map +1 -1
  56. package/dist/cjs/fork/createMemoryHistory.native.js.map +1 -1
  57. package/dist/cjs/fork/createMemoryHistory.test.native.js.map +1 -1
  58. package/dist/cjs/fork/extractPathFromURL.native.js.map +1 -1
  59. package/dist/cjs/fork/findFocusedRoute.native.js.map +1 -1
  60. package/dist/cjs/fork/getPathFromState-mods.native.js.map +1 -1
  61. package/dist/cjs/fork/getPathFromState.native.js.map +1 -1
  62. package/dist/cjs/fork/getPathFromState.test.native.js.map +1 -1
  63. package/dist/cjs/fork/getStateFromPath-mods.native.js.map +1 -1
  64. package/dist/cjs/fork/getStateFromPath.native.js.map +1 -1
  65. package/dist/cjs/fork/getStateFromPath.test.native.js.map +1 -1
  66. package/dist/cjs/fork/useThenable.native.js.map +1 -1
  67. package/dist/cjs/fork/validatePathConfig.native.js.map +1 -1
  68. package/dist/cjs/getReactNavigationConfig.native.js.map +1 -1
  69. package/dist/cjs/head/Head.native.js.map +1 -1
  70. package/dist/cjs/head/HeadModule.native.js.map +1 -1
  71. package/dist/cjs/head/index.native.js.map +1 -1
  72. package/dist/cjs/head/types.native.js.map +1 -1
  73. package/dist/cjs/head/url.native.js.map +1 -1
  74. package/dist/cjs/headless-server.native.js.map +1 -1
  75. package/dist/cjs/headless.native.js.map +1 -1
  76. package/dist/cjs/hooks.native.js.map +1 -1
  77. package/dist/cjs/hooks.test.native.js.map +1 -1
  78. package/dist/cjs/href.native.js.map +1 -1
  79. package/dist/cjs/image/getImageData.native.js.map +1 -1
  80. package/dist/cjs/image.native.js.map +1 -1
  81. package/dist/cjs/index.native.js +1 -1
  82. package/dist/cjs/index.native.js.map +1 -1
  83. package/dist/cjs/interfaces/router.native.js.map +1 -1
  84. package/dist/cjs/layouts/Drawer.native.js.map +1 -1
  85. package/dist/cjs/layouts/NativeTabs.native.js.map +1 -1
  86. package/dist/cjs/layouts/Stack.native.js +1 -1
  87. package/dist/cjs/layouts/Stack.native.js.map +1 -1
  88. package/dist/cjs/layouts/Tabs.native.js.map +1 -1
  89. package/dist/cjs/layouts/stack-utils/StackHeaderBackButton.native.js.map +1 -1
  90. package/dist/cjs/layouts/stack-utils/StackHeaderComponent.native.js.map +1 -1
  91. package/dist/cjs/layouts/stack-utils/StackHeaderLeft.native.js.map +1 -1
  92. package/dist/cjs/layouts/stack-utils/StackHeaderRight.native.js.map +1 -1
  93. package/dist/cjs/layouts/stack-utils/StackHeaderSearchBar.native.js.map +1 -1
  94. package/dist/cjs/layouts/stack-utils/StackHeaderTitle.native.js.map +1 -1
  95. package/dist/cjs/layouts/stack-utils/StackScreen.native.js.map +1 -1
  96. package/dist/cjs/layouts/stack-utils/__tests__/composition.test.native.js.map +1 -1
  97. package/dist/cjs/layouts/stack-utils/index.native.js.map +1 -1
  98. package/dist/cjs/layouts/withLayoutContext.native.js.map +1 -1
  99. package/dist/cjs/link/Link.cjs +7 -24
  100. package/dist/cjs/link/Link.native.js +7 -22
  101. package/dist/cjs/link/Link.native.js.map +1 -1
  102. package/dist/cjs/link/Redirect.native.js.map +1 -1
  103. package/dist/cjs/link/href.native.js.map +1 -1
  104. package/dist/cjs/link/path.native.js.map +1 -1
  105. package/dist/cjs/link/prefetchIntent.native.js.map +1 -1
  106. package/dist/cjs/link/prefetchIntent.test.native.js.map +1 -1
  107. package/dist/cjs/link/prefetchViewport.native.js.map +1 -1
  108. package/dist/cjs/link/prefetchViewport.test.native.js.map +1 -1
  109. package/dist/cjs/link/useLinkTo.native.js.map +1 -1
  110. package/dist/cjs/link/useLoadedNavigation.native.js.map +1 -1
  111. package/dist/cjs/metro-config/getViteMetroPluginOptions.native.js.map +1 -1
  112. package/dist/cjs/native-tabs.native.js.map +1 -1
  113. package/dist/cjs/notFoundState.native.js.map +1 -1
  114. package/dist/cjs/polyfills-mobile.native.js.map +1 -1
  115. package/dist/cjs/polyfills-server.native.js.map +1 -1
  116. package/dist/cjs/router/FlagsContext.native.js.map +1 -1
  117. package/dist/cjs/router/Route.native.js.map +1 -1
  118. package/dist/cjs/router/RouteInfoContext.native.js.map +1 -1
  119. package/dist/cjs/router/RouterStore.native.js.map +1 -1
  120. package/dist/cjs/router/SpaShellContext.native.js.map +1 -1
  121. package/dist/cjs/router/createRoute.native.js.map +1 -1
  122. package/dist/cjs/router/filterRootHTML.cjs +4 -22
  123. package/dist/cjs/router/filterRootHTML.native.js +7 -21
  124. package/dist/cjs/router/filterRootHTML.native.js.map +1 -1
  125. package/dist/cjs/router/findRouteNode.native.js.map +1 -1
  126. package/dist/cjs/router/getLinkingConfig.native.js.map +1 -1
  127. package/dist/cjs/router/getNormalizedStatePath.native.js.map +1 -1
  128. package/dist/cjs/router/getRouteInfo.native.js.map +1 -1
  129. package/dist/cjs/router/getRoutes.native.js.map +1 -1
  130. package/dist/cjs/router/getRoutes.test.native.js.map +1 -1
  131. package/dist/cjs/router/glob-patterns.native.js.map +1 -1
  132. package/dist/cjs/router/imperative-api.native.js.map +1 -1
  133. package/dist/cjs/router/interceptRoutes.native.js.map +1 -1
  134. package/dist/cjs/router/isIndexPath.native.js.map +1 -1
  135. package/dist/cjs/router/lastAction.native.js.map +1 -1
  136. package/dist/cjs/router/linkingConfig.native.js.map +1 -1
  137. package/dist/cjs/router/matchers.native.js.map +1 -1
  138. package/dist/cjs/router/matchers.test.native.js.map +1 -1
  139. package/dist/cjs/router/router.cjs +105 -236
  140. package/dist/cjs/router/router.native.js +109 -277
  141. package/dist/cjs/router/router.native.js.map +1 -1
  142. package/dist/cjs/router/serverLocationContext.native.js.map +1 -1
  143. package/dist/cjs/router/sortRoutes.native.js.map +1 -1
  144. package/dist/cjs/router/useInitializeOneRouter.native.js.map +1 -1
  145. package/dist/cjs/router/useNavigation.native.js.map +1 -1
  146. package/dist/cjs/router/useScreens.cjs +71 -146
  147. package/dist/cjs/router/useScreens.native.js +81 -253
  148. package/dist/cjs/router/useScreens.native.js.map +1 -1
  149. package/dist/cjs/router/useViteRoutes.native.js.map +1 -1
  150. package/dist/cjs/router/utils/getNavigateAction.native.js.map +1 -1
  151. package/dist/cjs/router/utils/getNavigateAction.test.native.js.map +1 -1
  152. package/dist/cjs/screensFeatureFlags.native.js.map +1 -1
  153. package/dist/cjs/serve-worker.native.js.map +1 -1
  154. package/dist/cjs/serve.native.js.map +1 -1
  155. package/dist/cjs/server/ServerContextScript.native.js.map +1 -1
  156. package/dist/cjs/server/createRoutesManifest.native.js.map +1 -1
  157. package/dist/cjs/server/getServerManifest.native.js.map +1 -1
  158. package/dist/cjs/server/getServerManifest.test.native.js.map +1 -1
  159. package/dist/cjs/server/oneServe.native.js.map +1 -1
  160. package/dist/cjs/server/setServerGlobals.native.js.map +1 -1
  161. package/dist/cjs/server/setupBuildOptions.native.js.map +1 -1
  162. package/dist/cjs/server/setupServerGlobals.native.js.map +1 -1
  163. package/dist/cjs/server/ssrLoaderData.native.js.map +1 -1
  164. package/dist/cjs/server/staticHtmlFetcher.native.js.map +1 -1
  165. package/dist/cjs/server/workerHandler.native.js.map +1 -1
  166. package/dist/cjs/server-render.native.js.map +1 -1
  167. package/dist/cjs/skewProtection.native.js.map +1 -1
  168. package/dist/cjs/testing-utils.native.js.map +1 -1
  169. package/dist/cjs/typed-routes/generateRouteTypes.native.js.map +1 -1
  170. package/dist/cjs/typed-routes/getTypedRoutesDeclarationFile.native.js.map +1 -1
  171. package/dist/cjs/typed-routes/injectRouteHelpers.native.js.map +1 -1
  172. package/dist/cjs/types.native.js.map +1 -1
  173. package/dist/cjs/ui/Slot.native.js.map +1 -1
  174. package/dist/cjs/ui/TabContext.native.js.map +1 -1
  175. package/dist/cjs/ui/TabList.native.js.map +1 -1
  176. package/dist/cjs/ui/TabRouter.native.js.map +1 -1
  177. package/dist/cjs/ui/TabSlot.native.js.map +1 -1
  178. package/dist/cjs/ui/TabTrigger.native.js.map +1 -1
  179. package/dist/cjs/ui/Tabs.native.js.map +1 -1
  180. package/dist/cjs/ui/common.native.js.map +1 -1
  181. package/dist/cjs/ui/index.native.js.map +1 -1
  182. package/dist/cjs/ui/useComponent.native.js.map +1 -1
  183. package/dist/cjs/useFocusEffect.native.js.map +1 -1
  184. package/dist/cjs/useLoader.cjs +79 -223
  185. package/dist/cjs/useLoader.native.js +153 -206
  186. package/dist/cjs/useLoader.native.js.map +1 -1
  187. package/dist/cjs/useMatches.native.js.map +1 -1
  188. package/dist/cjs/useMatches.test.native.js.map +1 -1
  189. package/dist/cjs/useServerHeadInsertion.native.js.map +1 -1
  190. package/dist/cjs/utils/assertIsReady.native.js.map +1 -1
  191. package/dist/cjs/utils/children.native.js.map +1 -1
  192. package/dist/cjs/utils/cleanUrl.native.js.map +1 -1
  193. package/dist/cjs/utils/cleanUrl.test.native.js.map +1 -1
  194. package/dist/cjs/utils/dynamicImport.cjs +6 -20
  195. package/dist/cjs/utils/dynamicImport.native.js +2 -13
  196. package/dist/cjs/utils/dynamicImport.native.js.map +1 -1
  197. package/dist/cjs/utils/ensureExists.native.js.map +1 -1
  198. package/dist/cjs/utils/evictOldest.native.js.map +1 -1
  199. package/dist/cjs/utils/existsAsync.native.js.map +1 -1
  200. package/dist/cjs/utils/findRootLayout.native.js.map +1 -1
  201. package/dist/cjs/utils/getPageExport.native.js.map +1 -1
  202. package/dist/cjs/utils/getPathnameFromFilePath.native.js.map +1 -1
  203. package/dist/cjs/utils/getPathnameFromFilePath.test.native.js.map +1 -1
  204. package/dist/cjs/utils/getRouterRootFromOneOptions.native.js.map +1 -1
  205. package/dist/cjs/utils/globDir.native.js.map +1 -1
  206. package/dist/cjs/utils/hashString.native.js.map +1 -1
  207. package/dist/cjs/utils/htmlEscape.native.js.map +1 -1
  208. package/dist/cjs/utils/isResponse.native.js.map +1 -1
  209. package/dist/cjs/utils/isRolldown.native.js.map +1 -1
  210. package/dist/cjs/utils/isStatus.native.js.map +1 -1
  211. package/dist/cjs/utils/pLimit.native.js.map +1 -1
  212. package/dist/cjs/utils/promiseWithResolvers.native.js.map +1 -1
  213. package/dist/cjs/utils/rand.native.js.map +1 -1
  214. package/dist/cjs/utils/redirect.native.js.map +1 -1
  215. package/dist/cjs/utils/removeParams.native.js.map +1 -1
  216. package/dist/cjs/utils/removeSearch.native.js.map +1 -1
  217. package/dist/cjs/utils/removeUndefined.native.js.map +1 -1
  218. package/dist/cjs/utils/style.native.js.map +1 -1
  219. package/dist/cjs/utils/toAbsolute.native.js.map +1 -1
  220. package/dist/cjs/utils/trackLoaderDependencies.native.js.map +1 -1
  221. package/dist/cjs/utils/url.native.js.map +1 -1
  222. package/dist/cjs/utils/useConstant.native.js.map +1 -1
  223. package/dist/cjs/utils/watchFile.native.js.map +1 -1
  224. package/dist/cjs/utils/weakKey.native.js.map +1 -1
  225. package/dist/cjs/utils/weakMemo.native.js.map +1 -1
  226. package/dist/cjs/utils/withStaticProperties.native.js.map +1 -1
  227. package/dist/cjs/utils/workerImport.native.js.map +1 -1
  228. package/dist/cjs/validateParams.native.js.map +1 -1
  229. package/dist/cjs/validateSearch.native.js.map +1 -1
  230. package/dist/cjs/vercel/build/buildVercelOutputDirectory.native.js.map +1 -1
  231. package/dist/cjs/vercel/build/config/vc-build-output-config-base.native.js.map +1 -1
  232. package/dist/cjs/vercel/build/config/vc-config-base.native.js.map +1 -1
  233. package/dist/cjs/vercel/build/config/vc-package-base.native.js.map +1 -1
  234. package/dist/cjs/vercel/build/generate/createApiServerlessFunction.native.js.map +1 -1
  235. package/dist/cjs/vercel/build/generate/createSsrServerlessFunction.native.js.map +1 -1
  236. package/dist/cjs/vercel/build/getPathFromRoute.native.js.map +1 -1
  237. package/dist/cjs/views/EmptyRoute.native.js.map +1 -1
  238. package/dist/cjs/views/ErrorBoundary.native.js.map +1 -1
  239. package/dist/cjs/views/LoadProgressBar.native.js.map +1 -1
  240. package/dist/cjs/views/Navigator.native.js.map +1 -1
  241. package/dist/cjs/views/OneStackRouter.cjs +6 -8
  242. package/dist/cjs/views/OneStackRouter.native.js +1 -15
  243. package/dist/cjs/views/OneStackRouter.native.js.map +1 -1
  244. package/dist/cjs/views/Protected.native.js.map +1 -1
  245. package/dist/cjs/views/RootErrorBoundary.native.js.map +1 -1
  246. package/dist/cjs/views/Screen.native.js.map +1 -1
  247. package/dist/cjs/views/ScrollBehavior.native.js.map +1 -1
  248. package/dist/cjs/views/SourceInspector.native.js.map +1 -1
  249. package/dist/cjs/views/Try.native.js.map +1 -1
  250. package/dist/cjs/vite/DevHead.cjs +17 -24
  251. package/dist/cjs/vite/DevHead.native.js +2 -26
  252. package/dist/cjs/vite/DevHead.native.js.map +1 -1
  253. package/dist/cjs/vite/constants.native.js.map +1 -1
  254. package/dist/cjs/vite/customNodeExternals.native.js.map +1 -1
  255. package/dist/cjs/vite/ensureTsConfig.native.js.map +1 -1
  256. package/dist/cjs/vite/findDepsToOptimize.native.js.map +1 -1
  257. package/dist/cjs/vite/getManifest.native.js.map +1 -1
  258. package/dist/cjs/vite/loadConfig.native.js.map +1 -1
  259. package/dist/cjs/vite/makePluginWebOnly.native.js.map +1 -1
  260. package/dist/cjs/vite/one-server-only.test.native.js.map +1 -1
  261. package/dist/cjs/vite/one.cjs +33 -22
  262. package/dist/cjs/vite/one.native.js +37 -27
  263. package/dist/cjs/vite/one.native.js.map +1 -1
  264. package/dist/cjs/vite/plugins/SSRCSSPlugin.native.js.map +1 -1
  265. package/dist/cjs/vite/plugins/clientTreeShakePlugin.native.js.map +1 -1
  266. package/dist/cjs/vite/plugins/clientTreeShakePlugin.test.native.js.map +1 -1
  267. package/dist/cjs/vite/plugins/criticalCSSPlugin.native.js.map +1 -1
  268. package/dist/cjs/vite/plugins/criticalCSSPlugin.test.native.js.map +1 -1
  269. package/dist/cjs/vite/plugins/devtoolsPlugin.native.js.map +1 -1
  270. package/dist/cjs/vite/plugins/environmentGuardPlugin.native.js.map +1 -1
  271. package/dist/cjs/vite/plugins/environmentGuardPlugin.test.native.js.map +1 -1
  272. package/dist/cjs/vite/plugins/fileSystemRouterPlugin.native.js.map +1 -1
  273. package/dist/cjs/vite/plugins/fixDependenciesPlugin.native.js.map +1 -1
  274. package/dist/cjs/vite/plugins/generateFileSystemRouteTypesPlugin.native.js.map +1 -1
  275. package/dist/cjs/vite/plugins/imageDataPlugin.native.js.map +1 -1
  276. package/dist/cjs/vite/plugins/imageDataPlugin.test.native.js.map +1 -1
  277. package/dist/cjs/vite/plugins/removeReactNativeWebAnimatedPlugin.native.js.map +1 -1
  278. package/dist/cjs/vite/plugins/sourceInspectorPlugin.native.js.map +1 -1
  279. package/dist/cjs/vite/plugins/useDomPlugin.native.js.map +1 -1
  280. package/dist/cjs/vite/plugins/virtualEntryConstants.native.js.map +1 -1
  281. package/dist/cjs/vite/plugins/virtualEntryPlugin.native.js.map +1 -1
  282. package/dist/cjs/vite/plugins/virtualEntryPlugin.test.native.js.map +1 -1
  283. package/dist/cjs/vite/plugins/warmRoutesPlugin.native.js.map +1 -1
  284. package/dist/cjs/vite/replaceLoader.native.js.map +1 -1
  285. package/dist/cjs/vite/resolveResponse.native.js.map +1 -1
  286. package/dist/cjs/vite/types.native.js.map +1 -1
  287. package/dist/cjs/vite-auto-warm.native.js.map +1 -1
  288. package/dist/cjs/vite.native.js.map +1 -1
  289. package/dist/cjs/zero/getQueryKey.native.js.map +1 -1
  290. package/dist/cjs/zero/isZeroQuery.native.js.map +1 -1
  291. package/dist/cjs/zero/resolveQuery.native.js.map +1 -1
  292. package/dist/cjs/zero/subscribeToQuery.native.js.map +1 -1
  293. package/dist/cjs/zero/types.native.js.map +1 -1
  294. package/dist/cjs/zero/useQuery.cjs +2 -6
  295. package/dist/cjs/zero/useQuery.native.js +3 -28
  296. package/dist/cjs/zero/useQuery.native.js.map +1 -1
  297. package/dist/cjs/zero/useQueryZero.native.js.map +1 -1
  298. package/dist/cjs/zero.native.js.map +1 -1
  299. package/dist/esm/constants.mjs +4 -4
  300. package/dist/esm/constants.mjs.map +1 -1
  301. package/dist/esm/constants.native.js +4 -4
  302. package/dist/esm/constants.native.js.map +1 -1
  303. package/dist/esm/link/Link.mjs +14 -34
  304. package/dist/esm/link/Link.mjs.map +1 -1
  305. package/dist/esm/link/Link.native.js +14 -32
  306. package/dist/esm/link/Link.native.js.map +1 -1
  307. package/dist/esm/router/filterRootHTML.mjs +4 -21
  308. package/dist/esm/router/filterRootHTML.mjs.map +1 -1
  309. package/dist/esm/router/filterRootHTML.native.js +7 -21
  310. package/dist/esm/router/filterRootHTML.native.js.map +1 -1
  311. package/dist/esm/router/router.mjs +107 -240
  312. package/dist/esm/router/router.mjs.map +1 -1
  313. package/dist/esm/router/router.native.js +108 -278
  314. package/dist/esm/router/router.native.js.map +1 -1
  315. package/dist/esm/router/useScreens.mjs +70 -148
  316. package/dist/esm/router/useScreens.mjs.map +1 -1
  317. package/dist/esm/router/useScreens.native.js +77 -252
  318. package/dist/esm/router/useScreens.native.js.map +1 -1
  319. package/dist/esm/useLoader.mjs +82 -228
  320. package/dist/esm/useLoader.mjs.map +1 -1
  321. package/dist/esm/useLoader.native.js +155 -211
  322. package/dist/esm/useLoader.native.js.map +1 -1
  323. package/dist/esm/utils/dynamicImport.mjs +6 -20
  324. package/dist/esm/utils/dynamicImport.mjs.map +1 -1
  325. package/dist/esm/utils/dynamicImport.native.js +2 -13
  326. package/dist/esm/utils/dynamicImport.native.js.map +1 -1
  327. package/dist/esm/views/OneStackRouter.mjs +6 -8
  328. package/dist/esm/views/OneStackRouter.mjs.map +1 -1
  329. package/dist/esm/views/OneStackRouter.native.js +1 -15
  330. package/dist/esm/views/OneStackRouter.native.js.map +1 -1
  331. package/dist/esm/vite/DevHead.mjs +17 -24
  332. package/dist/esm/vite/DevHead.mjs.map +1 -1
  333. package/dist/esm/vite/DevHead.native.js +0 -24
  334. package/dist/esm/vite/DevHead.native.js.map +1 -1
  335. package/dist/esm/vite/one.mjs +33 -22
  336. package/dist/esm/vite/one.mjs.map +1 -1
  337. package/dist/esm/vite/one.native.js +37 -27
  338. package/dist/esm/vite/one.native.js.map +1 -1
  339. package/dist/esm/zero/useQuery.mjs +2 -6
  340. package/dist/esm/zero/useQuery.mjs.map +1 -1
  341. package/dist/esm/zero/useQuery.native.js +3 -29
  342. package/dist/esm/zero/useQuery.native.js.map +1 -1
  343. package/package.json +10 -10
  344. package/src/vite/one.ts +34 -18
  345. package/src/vite/types.ts +53 -44
  346. package/types/vite/one.d.ts.map +1 -1
  347. package/types/vite/types.d.ts +9 -2
  348. package/types/vite/types.d.ts.map +1 -1
@@ -45,14 +45,14 @@ module.exports = __toCommonJS(useScreens_exports);
45
45
  var import_jsx_runtime = require("react/jsx-runtime");
46
46
  var import_react = require("react");
47
47
  var import_core = require("@react-navigation/core");
48
- var import_elements = require("@react-navigation/elements");
48
+ require("@react-navigation/elements");
49
49
  var import_react2 = __toESM(require("react"), 1);
50
50
  var import_react_native = require("react-native");
51
- var import_ServerContextScript = require("../server/ServerContextScript.native.js");
51
+ require("../server/ServerContextScript.native.js");
52
52
  var import_getPageExport = require("../utils/getPageExport.native.js");
53
53
  var import_EmptyRoute = require("../views/EmptyRoute.native.js");
54
54
  var import_Try = require("../views/Try.native.js");
55
- var import_DevHead = require("../vite/DevHead.native.js");
55
+ require("../vite/DevHead.native.js");
56
56
  var import_one_server_only = require("../vite/one-server-only.native.js");
57
57
  var import_filterRootHTML = require("./filterRootHTML.native.js");
58
58
  var import_Route = require("./Route.native.js");
@@ -60,9 +60,7 @@ var import_SpaShellContext = require("./SpaShellContext.native.js");
60
60
  var import_Navigator = require("../views/Navigator.native.js");
61
61
  var import_sortRoutes = require("./sortRoutes.native.js");
62
62
  function _assert_this_initialized(self) {
63
- if (self === void 0) {
64
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
65
- }
63
+ if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
66
64
  return self;
67
65
  }
68
66
  function _call_super(_this, derived, args) {
@@ -70,9 +68,7 @@ function _call_super(_this, derived, args) {
70
68
  return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
71
69
  }
72
70
  function _class_call_check(instance, Constructor) {
73
- if (!(instance instanceof Constructor)) {
74
- throw new TypeError("Cannot call a class as a function");
75
- }
71
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
76
72
  }
77
73
  function _defineProperties(target, props) {
78
74
  for (var i = 0; i < props.length; i++) {
@@ -95,9 +91,7 @@ function _get_prototype_of(o) {
95
91
  return _get_prototype_of(o);
96
92
  }
97
93
  function _inherits(subClass, superClass) {
98
- if (typeof superClass !== "function" && superClass !== null) {
99
- throw new TypeError("Super expression must either be null or a function");
100
- }
94
+ if (typeof superClass !== "function" && superClass !== null) throw new TypeError("Super expression must either be null or a function");
101
95
  subClass.prototype = Object.create(superClass && superClass.prototype, {
102
96
  constructor: {
103
97
  value: subClass,
@@ -108,16 +102,10 @@ function _inherits(subClass, superClass) {
108
102
  if (superClass) _set_prototype_of(subClass, superClass);
109
103
  }
110
104
  function _instanceof(left, right) {
111
- if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
112
- return !!right[Symbol.hasInstance](left);
113
- } else {
114
- return left instanceof right;
115
- }
105
+ if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) return !!right[Symbol.hasInstance](left);else return left instanceof right;
116
106
  }
117
107
  function _possible_constructor_return(self, call) {
118
- if (call && (_type_of(call) === "object" || typeof call === "function")) {
119
- return call;
120
- }
108
+ if (call && (_type_of(call) === "object" || typeof call === "function")) return call;
121
109
  return _assert_this_initialized(self);
122
110
  }
123
111
  function _set_prototype_of(o, p) {
@@ -147,19 +135,13 @@ function hasMetaCharset(children) {
147
135
  if (! /* @__PURE__ */import_react2.default.isValidElement(child)) return false;
148
136
  if (child.type === "meta") {
149
137
  var props = child.props;
150
- if ("charSet" in props || "charset" in props) {
151
- return true;
152
- }
138
+ if ("charSet" in props || "charset" in props) return true;
153
139
  }
154
140
  var childProps = child.props;
155
- if (childProps.children) {
156
- return hasMetaCharset(childProps.children);
157
- }
141
+ if (childProps.children) return hasMetaCharset(childProps.children);
158
142
  return false;
159
143
  };
160
- if (Array.isArray(children)) {
161
- return children.some(checkElement);
162
- }
144
+ if (Array.isArray(children)) return children.some(checkElement);
163
145
  return checkElement(children);
164
146
  }
165
147
  return true;
@@ -168,18 +150,15 @@ var {
168
150
  Screen,
169
151
  Group
170
152
  } = (0, import_core.createNavigatorFactory)({})();
171
- var cachedInlineCSSElements = typeof document !== "undefined" ? function () {
153
+ typeof document !== "undefined" && function () {
172
154
  var elements = [];
173
- var cssElements = document.querySelectorAll('style[id^="__one_css_"], link[rel="stylesheet"][data-one-css]');
174
- cssElements.forEach(function (el, i) {
175
- if (el.tagName === "STYLE") {
176
- elements.push(/* @__PURE__ */(0, import_jsx_runtime.jsx)("style", {
177
- id: el.id,
178
- dangerouslySetInnerHTML: {
179
- __html: el.innerHTML
180
- }
181
- }, `inline-css-${i}`));
182
- } else {
155
+ document.querySelectorAll("style[id^=\"__one_css_\"], link[rel=\"stylesheet\"][data-one-css]").forEach(function (el, i) {
156
+ if (el.tagName === "STYLE") elements.push(/* @__PURE__ */(0, import_jsx_runtime.jsx)("style", {
157
+ id: el.id,
158
+ dangerouslySetInnerHTML: {
159
+ __html: el.innerHTML
160
+ }
161
+ }, `inline-css-${i}`));else {
183
162
  var href = el.getAttribute("href");
184
163
  elements.push(/* @__PURE__ */(0, import_jsx_runtime.jsx)("link", {
185
164
  rel: "stylesheet",
@@ -189,28 +168,14 @@ var cachedInlineCSSElements = typeof document !== "undefined" ? function () {
189
168
  }
190
169
  });
191
170
  return elements;
192
- }() : [];
171
+ }();
193
172
  function RootLayoutRenderer(param) {
194
173
  var {
195
174
  LayoutComponent,
196
175
  layoutProps,
197
176
  forwardedRef
198
177
  } = param;
199
- var _serverContext_cssContents, _serverContext_css;
200
- if (process.env.NODE_ENV === "development" && false) {
201
- var [, setHmrKey] = (0, import_react2.useState)(0);
202
- (0, import_react2.useEffect)(function () {
203
- var handler = function () {
204
- return setHmrKey(function (k) {
205
- return k + 1;
206
- });
207
- };
208
- window.addEventListener("one-hmr-update", handler);
209
- return function () {
210
- return window.removeEventListener("one-hmr-update", handler);
211
- };
212
- }, []);
213
- }
178
+ if (process.env.NODE_ENV === "development" && false) ;
214
179
  var out = LayoutComponent(layoutProps, forwardedRef);
215
180
  var {
216
181
  children,
@@ -222,71 +187,16 @@ function RootLayoutRenderer(param) {
222
187
  children: headChildren,
223
188
  ...headProps
224
189
  } = (head === null || head === void 0 ? void 0 : head.props) || {};
225
- var serverContext = (0, import_one_server_only.useServerContext)();
226
- var finalChildren = children;
227
- if (true) {
228
- return finalChildren;
229
- }
230
- if (process.env.NODE_ENV === "development") {
231
- if (!hasMetaCharset(headChildren)) {
232
- console.warn(`[one] Missing <meta charSet="utf-8" /> in your root _layout.tsx <head>. This can cause React hydration issues due to encoding mismatch. Add it as the first element in your <head> tag.`);
233
- }
234
- }
235
- finalChildren = /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
236
- children: [/* @__PURE__ */(0, import_jsx_runtime.jsxs)("head", {
237
- ...headProps,
238
- children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_DevHead.DevHead, {}), /* @__PURE__ */(0, import_jsx_runtime.jsx)("script", {
239
- dangerouslySetInnerHTML: {
240
- __html: `globalThis['global'] = globalThis`
241
- }
242
- }), (serverContext === null || serverContext === void 0 ? void 0 : (_serverContext_cssContents = serverContext.cssContents) === null || _serverContext_cssContents === void 0 ? void 0 : _serverContext_cssContents.length) || (serverContext === null || serverContext === void 0 ? void 0 : serverContext.cssInlineCount) ?
243
- // inline/mixed CSS: render each entry as <style> (if content) or <link>
244
- (serverContext === null || serverContext === void 0 ? void 0 : serverContext.cssContents) ? serverContext.cssContents.map(function (content, i) {
245
- var _serverContext_css2;
246
- return content ? /* @__PURE__ */(0, import_jsx_runtime.jsx)("style", {
247
- id: `__one_css_${i}`,
248
- dangerouslySetInnerHTML: {
249
- __html: content
250
- }
251
- }, `inline-css-${i}`) : ((_serverContext_css2 = serverContext.css) === null || _serverContext_css2 === void 0 ? void 0 : _serverContext_css2[i]) ? /* @__PURE__ */(0, import_jsx_runtime.jsx)("link", {
252
- rel: "stylesheet",
253
- href: serverContext.css[i]
254
- }, serverContext.css[i]) : null;
255
- }) : cachedInlineCSSElements : serverContext === null || serverContext === void 0 ? void 0 : (_serverContext_css = serverContext.css) === null || _serverContext_css === void 0 ? void 0 : _serverContext_css.map(function (file) {
256
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)("link", {
257
- rel: "stylesheet",
258
- href: file
259
- }, file);
260
- }), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_ServerContextScript.ServerContextScript, {}), headChildren]
261
- }, "head"), /* @__PURE__ */(0, import_jsx_runtime.jsx)("body", {
262
- suppressHydrationWarning: true,
263
- ...bodyProps,
264
- children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_elements.SafeAreaProviderCompat, {
265
- children: finalChildren
266
- })
267
- }, "body")]
268
- });
269
- return (
270
- // tamagui and libraries can add className on hydration to have ssr safe styling
271
- // so supress hydration warnings here
272
- /* @__PURE__ */
273
- (0, import_jsx_runtime.jsx)("html", {
274
- suppressHydrationWarning: true,
275
- lang: "en-US",
276
- ...htmlProps,
277
- children: finalChildren
278
- })
279
- );
190
+ (0, import_one_server_only.useServerContext)();
191
+ return children;
280
192
  }
281
193
  function getSortedChildren(children, order, initialRouteName, options) {
282
- if (!(order === null || order === void 0 ? void 0 : order.length)) {
283
- return children.sort((0, import_sortRoutes.sortRoutesWithInitial)(initialRouteName)).map(function (route) {
284
- return {
285
- route,
286
- props: {}
287
- };
288
- });
289
- }
194
+ if (!(order === null || order === void 0 ? void 0 : order.length)) return children.sort((0, import_sortRoutes.sortRoutesWithInitial)(initialRouteName)).map(function (route) {
195
+ return {
196
+ route,
197
+ props: {}
198
+ };
199
+ });
290
200
  var entries = [...children];
291
201
  var ordered = order.map(function (param) {
292
202
  var {
@@ -316,9 +226,7 @@ function getSortedChildren(children, order, initialRouteName, options) {
316
226
  var match = entries[matchIndex];
317
227
  entries.splice(matchIndex, 1);
318
228
  if (redirect) {
319
- if (typeof redirect === "string") {
320
- throw new Error(`Redirecting to a specific route is not supported yet.`);
321
- }
229
+ if (typeof redirect === "string") throw new Error(`Redirecting to a specific route is not supported yet.`);
322
230
  return null;
323
231
  }
324
232
  return {
@@ -331,22 +239,19 @@ function getSortedChildren(children, order, initialRouteName, options) {
331
239
  }
332
240
  };
333
241
  }).filter(Boolean);
334
- if (!(options === null || options === void 0 ? void 0 : options.onlyMatching)) {
335
- ordered.push(...entries.sort((0, import_sortRoutes.sortRoutesWithInitial)(initialRouteName)).map(function (route) {
336
- return {
337
- route,
338
- props: {}
339
- };
340
- }));
341
- }
242
+ if (!(options === null || options === void 0 ? void 0 : options.onlyMatching)) ordered.push(...entries.sort((0, import_sortRoutes.sortRoutesWithInitial)(initialRouteName)).map(function (route) {
243
+ return {
244
+ route,
245
+ props: {}
246
+ };
247
+ }));
342
248
  return ordered;
343
249
  }
344
250
  function useSortedScreens(order, options) {
345
251
  var node = (0, import_Route.useRouteNode)();
346
- var sortedScreens = import_react2.default.useMemo(function () {
252
+ return import_react2.default.useMemo(function () {
347
253
  var _node_children;
348
- var sorted = (node === null || node === void 0 ? void 0 : (_node_children = node.children) === null || _node_children === void 0 ? void 0 : _node_children.length) ? getSortedChildren(node.children, order, node.initialRouteName, options) : [];
349
- return sorted.filter(function (value) {
254
+ return ((node === null || node === void 0 ? void 0 : (_node_children = node.children) === null || _node_children === void 0 ? void 0 : _node_children.length) ? getSortedChildren(node.children, order, node.initialRouteName, options) : []).filter(function (value) {
350
255
  var _options_protectedScreens, _options_protectedScreens1;
351
256
  var routeName = value.route.route;
352
257
  var normalized = routeName.replace(/\/index$/, "");
@@ -355,34 +260,29 @@ function useSortedScreens(order, options) {
355
260
  return routeToScreen(value.route, value.props);
356
261
  });
357
262
  }, [node === null || node === void 0 ? void 0 : node.children, node === null || node === void 0 ? void 0 : node.initialRouteName, order, options === null || options === void 0 ? void 0 : options.protectedScreens]);
358
- return sortedScreens;
359
263
  }
360
264
  function fromImport(param) {
361
265
  var {
362
266
  ErrorBoundary,
363
267
  ...component
364
268
  } = param;
365
- if (ErrorBoundary) {
366
- return {
367
- default: /* @__PURE__ */import_react2.default.forwardRef(function (props, ref) {
368
- var children = /* @__PURE__ */import_react2.default.createElement((0, import_getPageExport.getPageExport)(component) || import_EmptyRoute.EmptyRoute, {
369
- ...props,
370
- ref
371
- });
372
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_Try.Try, {
373
- catch: ErrorBoundary,
374
- children
375
- });
376
- })
377
- };
378
- }
269
+ if (ErrorBoundary) return {
270
+ default: /* @__PURE__ */import_react2.default.forwardRef(function (props, ref) {
271
+ var children = /* @__PURE__ */import_react2.default.createElement((0, import_getPageExport.getPageExport)(component) || import_EmptyRoute.EmptyRoute, {
272
+ ...props,
273
+ ref
274
+ });
275
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_Try.Try, {
276
+ catch: ErrorBoundary,
277
+ children
278
+ });
279
+ })
280
+ };
379
281
  if (process.env.NODE_ENV !== "production") {
380
282
  var exported = (0, import_getPageExport.getPageExport)(component);
381
- if (exported && (typeof exported === "undefined" ? "undefined" : _type_of(exported)) === "object" && Object.keys(exported).length === 0) {
382
- return {
383
- default: import_EmptyRoute.EmptyRoute
384
- };
385
- }
283
+ if (exported && (typeof exported === "undefined" ? "undefined" : _type_of(exported)) === "object" && Object.keys(exported).length === 0) return {
284
+ default: import_EmptyRoute.EmptyRoute
285
+ };
386
286
  }
387
287
  return {
388
288
  default: (0, import_getPageExport.getPageExport)(component)
@@ -390,33 +290,14 @@ function fromImport(param) {
390
290
  }
391
291
  var qualifiedStore = /* @__PURE__ */new WeakMap();
392
292
  function getQualifiedRouteComponent(value) {
393
- if (value && qualifiedStore.has(value)) {
394
- return qualifiedStore.get(value);
395
- }
293
+ if (value && qualifiedStore.has(value)) return qualifiedStore.get(value);
396
294
  var ScreenComponent = /* @__PURE__ */import_react2.default.forwardRef(function (props, ref) {
397
- if (process.env.NODE_ENV === "development" && false) {
398
- var [, setHmrKey] = (0, import_react2.useState)(0);
399
- (0, import_react2.useEffect)(function () {
400
- var handler = function () {
401
- return setHmrKey(function (k) {
402
- return k + 1;
403
- });
404
- };
405
- window.addEventListener("one-hmr-update", handler);
406
- return function () {
407
- return window.removeEventListener("one-hmr-update", handler);
408
- };
409
- }, []);
410
- }
411
- var isSpaShell = (0, import_react2.useContext)(import_SpaShellContext.SpaShellContext);
412
- if (isSpaShell && props.segment !== "") {
295
+ if (process.env.NODE_ENV === "development" && false) ;
296
+ if ((0, import_react2.useContext)(import_SpaShellContext.SpaShellContext) && props.segment !== "") {
413
297
  var _value_children;
414
- var isServerRenderedLayout = ((_value_children = value.children) === null || _value_children === void 0 ? void 0 : _value_children.length) && (value.layoutRenderMode === "ssg" || value.layoutRenderMode === "ssr");
415
- if (!isServerRenderedLayout) {
416
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)("div", {
417
- "data-one-spa-content": ""
418
- });
419
- }
298
+ if (!(((_value_children = value.children) === null || _value_children === void 0 ? void 0 : _value_children.length) && (value.layoutRenderMode === "ssg" || value.layoutRenderMode === "ssr"))) return /* @__PURE__ */(0, import_jsx_runtime.jsx)("div", {
299
+ "data-one-spa-content": ""
300
+ });
420
301
  }
421
302
  var res = value.loadRoute();
422
303
  var Component = (0, import_getPageExport.getPageExport)(fromImport(res));
@@ -444,26 +325,20 @@ function getQualifiedRouteComponent(value) {
444
325
  _iteratorError = err;
445
326
  } finally {
446
327
  try {
447
- if (!_iteratorNormalCompletion && _iterator.return != null) {
448
- _iterator.return();
449
- }
328
+ if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
450
329
  } finally {
451
- if (_didIteratorError) {
452
- throw _iteratorError;
453
- }
330
+ if (_didIteratorError) throw _iteratorError;
454
331
  }
455
332
  }
456
333
  }
457
- if (props.segment === "") {
458
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(RootLayoutRenderer, {
459
- LayoutComponent: Component,
460
- layoutProps: {
461
- ...props,
462
- ...slotProps
463
- },
464
- forwardedRef: ref
465
- });
466
- }
334
+ if (props.segment === "") return /* @__PURE__ */(0, import_jsx_runtime.jsx)(RootLayoutRenderer, {
335
+ LayoutComponent: Component,
336
+ layoutProps: {
337
+ ...props,
338
+ ...slotProps
339
+ },
340
+ forwardedRef: ref
341
+ });
467
342
  return /* @__PURE__ */(0, import_jsx_runtime.jsx)(RouteErrorBoundary, {
468
343
  routeName: value.route,
469
344
  children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(Component, {
@@ -474,30 +349,16 @@ function getQualifiedRouteComponent(value) {
474
349
  });
475
350
  });
476
351
  var wrapSuspense = function (children) {
477
- if (true) {
478
- if (process.env.ONE_SUSPEND_ROUTES_NATIVE === "0" || globalThis.__ONE_DISABLE_SUSPENSE_ROUTES__ === true) {
479
- return children;
480
- }
481
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react2.Suspense, {
482
- fallback: null,
483
- children
484
- });
485
- }
486
- if (process.env.ONE_SUSPEND_ROUTES === "1" && globalThis.__ONE_DISABLE_SUSPENSE_ROUTES__ !== true) {
487
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react2.Suspense, {
488
- fallback: null,
489
- children
490
- });
491
- }
492
- return children;
352
+ if (process.env.ONE_SUSPEND_ROUTES_NATIVE === "0" || globalThis.__ONE_DISABLE_SUSPENSE_ROUTES__ === true) return children;
353
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react2.Suspense, {
354
+ fallback: null,
355
+ children
356
+ });
493
357
  };
494
358
  var QualifiedRoute = /* @__PURE__ */import_react2.default.forwardRef(function (param, ref) {
495
359
  var {
496
- // Remove these React Navigation props to
497
- // enforce usage of router hooks (where the query params are correct).
498
360
  route,
499
361
  navigation,
500
- // Pass all other props to the component
501
362
  ...props
502
363
  } = param;
503
364
  return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_Route.Route, {
@@ -507,8 +368,6 @@ function getQualifiedRouteComponent(value) {
507
368
  children: wrapSuspense(/* @__PURE__ */(0, import_jsx_runtime.jsx)(ScreenComponent, {
508
369
  ...props,
509
370
  ref,
510
- // Expose the template segment path, e.g. `(home)`, `[foo]`, `index`
511
- // the intention is to make it possible to deduce shared routes.
512
371
  segment: value.route
513
372
  }))
514
373
  })
@@ -534,13 +393,9 @@ function createGetIdForRoute(route) {
534
393
  _iteratorError = err;
535
394
  } finally {
536
395
  try {
537
- if (!_iteratorNormalCompletion && _iterator.return != null) {
538
- _iterator.return();
539
- }
396
+ if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
540
397
  } finally {
541
- if (_didIteratorError) {
542
- throw _iteratorError;
543
- }
398
+ if (_didIteratorError) throw _iteratorError;
544
399
  }
545
400
  }
546
401
  }
@@ -557,28 +412,16 @@ function createGetIdForRoute(route) {
557
412
  for (var _iterator2 = include.values()[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
558
413
  var dynamic = _step2.value;
559
414
  var value = params === null || params === void 0 ? void 0 : params[dynamic.name];
560
- if (Array.isArray(value) && value.length > 0) {
561
- segments.push(value.join("/"));
562
- } else if (value && !Array.isArray(value)) {
563
- segments.push(value);
564
- } else if (dynamic.deep) {
565
- segments.push(`[...${dynamic.name}]`);
566
- } else {
567
- segments.push(`[${dynamic.name}]`);
568
- }
415
+ if (Array.isArray(value) && value.length > 0) segments.push(value.join("/"));else if (value && !Array.isArray(value)) segments.push(value);else if (dynamic.deep) segments.push(`[...${dynamic.name}]`);else segments.push(`[${dynamic.name}]`);
569
416
  }
570
417
  } catch (err) {
571
418
  _didIteratorError2 = true;
572
419
  _iteratorError2 = err;
573
420
  } finally {
574
421
  try {
575
- if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
576
- _iterator2.return();
577
- }
422
+ if (!_iteratorNormalCompletion2 && _iterator2.return != null) _iterator2.return();
578
423
  } finally {
579
- if (_didIteratorError2) {
580
- throw _iteratorError2;
581
- }
424
+ if (_didIteratorError2) throw _iteratorError2;
582
425
  }
583
426
  }
584
427
  return (_segments_join = segments.join("/")) !== null && _segments_join !== void 0 ? _segments_join : route.contextKey;
@@ -590,7 +433,6 @@ function routeToScreen(route) {
590
433
  ...props
591
434
  } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
592
435
  return /* @__PURE__ */(0, import_react.createElement)(Screen, {
593
- // Users can override the screen getId function.
594
436
  getId: createGetIdForRoute(route),
595
437
  ...props,
596
438
  name: route.route,
@@ -615,19 +457,6 @@ function routeToScreen(route) {
615
457
  }
616
458
  return output;
617
459
  },
618
- // this doesn't work, also probably better to wrap suspense only on root layout in useScreens
619
- // but it doesnt seem to pick up our startTransitions which i wrapped in a few places.
620
- // now i thought this was due to our use of useSyncExternalStore, but i replaced that with
621
- // `use-sync-external-store/shim` and i also replaced the one in react-navigation that does
622
- // `use-sync-external-store/with-selector` to `use-sync-external-store/shim/with-selector`
623
- // but still it seems something else must be updating state outside a transition.
624
- // layout={({ children }) => {
625
- // console.log('route.contextKey', route.contextKey)
626
- // if (route.contextKey === '') {
627
- // return <Suspense fallback={null}>{children}</Suspense>
628
- // }
629
- // return children
630
- // }}
631
460
  getComponent: function () {
632
461
  return getQualifiedRouteComponent(route);
633
462
  }
@@ -644,8 +473,7 @@ var RouteErrorBoundary = /* @__PURE__ */function (_React_Component) {
644
473
  _inherits(RouteErrorBoundary2, _React_Component);
645
474
  function RouteErrorBoundary2(props) {
646
475
  _class_call_check(this, RouteErrorBoundary2);
647
- var _this;
648
- _this = _call_super(this, RouteErrorBoundary2, [props]);
476
+ var _this = _call_super(this, RouteErrorBoundary2, [props]);
649
477
  _this.state = ROUTE_ERROR_BOUNDARY_INITIAL_STATE;
650
478
  return _this;
651
479
  }
@@ -694,7 +522,7 @@ ${errorInfo.componentStack}`);
694
522
  fontSize: 20,
695
523
  fontFamily: "monospace"
696
524
  },
697
- children: ['Error on route "', this.props.routeName, '"']
525
+ children: ["Error on route \"", this.props.routeName, "\""]
698
526
  }), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.Text, {
699
527
  style: {
700
528
  color: "white",