one 1.1.546 → 1.1.547-1762235181981
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.
- package/dist/cjs/Root.cjs +3 -2
- package/dist/cjs/Root.js +2 -2
- package/dist/cjs/Root.js.map +1 -1
- package/dist/cjs/Root.native.js +3 -2
- package/dist/cjs/Root.native.js.map +1 -1
- package/dist/cjs/cli/build.cjs +7 -7
- package/dist/cjs/cli/build.js +1 -1
- package/dist/cjs/cli/build.js.map +1 -1
- package/dist/cjs/cli/build.native.js +7 -7
- package/dist/cjs/cli/build.native.js.map +1 -1
- package/dist/cjs/cli/buildPage.cjs +2 -2
- package/dist/cjs/cli/buildPage.js +1 -1
- package/dist/cjs/cli/buildPage.js.map +1 -1
- package/dist/cjs/cli/buildPage.native.js +2 -2
- package/dist/cjs/cli/buildPage.native.js.map +1 -1
- package/dist/cjs/cli.cjs +4 -4
- package/dist/cjs/cli.js +1 -1
- package/dist/cjs/cli.js.map +1 -1
- package/dist/cjs/cli.native.js +4 -4
- package/dist/cjs/cli.native.js.map +1 -1
- package/dist/cjs/constants.js.map +1 -1
- package/dist/cjs/constants.native.js.map +1 -1
- package/dist/cjs/createApp.cjs +3 -3
- package/dist/cjs/createApp.js +1 -1
- package/dist/cjs/createApp.js.map +1 -1
- package/dist/cjs/fallbackViews/Sitemap.js.map +1 -1
- package/dist/cjs/fallbackViews/Sitemap.native.js.map +1 -1
- package/dist/cjs/fork/NavigationContainer.cjs +1 -1
- package/dist/cjs/fork/NavigationContainer.js +1 -1
- package/dist/cjs/fork/NavigationContainer.js.map +1 -1
- package/dist/cjs/fork/NavigationContainer.native.js +1 -1
- package/dist/cjs/fork/NavigationContainer.native.js.map +1 -1
- package/dist/cjs/fork/__tests__/getStateFromPath.test.cjs +2 -2
- package/dist/cjs/fork/__tests__/getStateFromPath.test.js +1 -1
- package/dist/cjs/fork/__tests__/getStateFromPath.test.js.map +1 -1
- package/dist/cjs/fork/__tests__/getStateFromPath.test.native.js +2 -2
- package/dist/cjs/fork/__tests__/getStateFromPath.test.native.js.map +1 -1
- package/dist/cjs/fork/extractPathFromURL.cjs +1 -1
- package/dist/cjs/fork/extractPathFromURL.js +1 -1
- package/dist/cjs/fork/extractPathFromURL.js.map +1 -1
- package/dist/cjs/fork/extractPathFromURL.native.js +1 -1
- package/dist/cjs/fork/extractPathFromURL.native.js.map +1 -1
- package/dist/cjs/fork/getPathFromState.cjs +2 -2
- package/dist/cjs/fork/getPathFromState.js +1 -1
- package/dist/cjs/fork/getPathFromState.js.map +1 -1
- package/dist/cjs/fork/getPathFromState.native.js +2 -2
- package/dist/cjs/fork/getPathFromState.native.js.map +1 -1
- package/dist/cjs/fork/getPathFromState.test.js.map +1 -1
- package/dist/cjs/fork/getPathFromState.test.native.js.map +1 -1
- package/dist/cjs/fork/getStateFromPath.cjs +2 -2
- package/dist/cjs/fork/getStateFromPath.js +1 -1
- package/dist/cjs/fork/getStateFromPath.js.map +1 -1
- package/dist/cjs/fork/getStateFromPath.native.js +2 -2
- package/dist/cjs/fork/getStateFromPath.native.js.map +1 -1
- package/dist/cjs/fork/useBackButton.js.map +1 -1
- package/dist/cjs/fork/useDocumentTitle.js.map +1 -1
- package/dist/cjs/fork/useLinking.cjs +1 -1
- package/dist/cjs/fork/useLinking.js +1 -1
- package/dist/cjs/fork/useLinking.js.map +1 -1
- package/dist/cjs/fork/useLinking.native.js.map +1 -1
- package/dist/cjs/fork/validatePathConfig.js.map +1 -1
- package/dist/cjs/fork/validatePathConfig.native.js.map +1 -1
- package/dist/cjs/head/Head.ios.js +5 -5
- package/dist/cjs/head/Head.ios.js.map +1 -1
- package/dist/cjs/hooks.cjs +4 -2
- package/dist/cjs/hooks.js +2 -9
- package/dist/cjs/hooks.js.map +1 -1
- package/dist/cjs/hooks.native.js +5 -4
- package/dist/cjs/hooks.native.js.map +1 -1
- package/dist/cjs/index.cjs +23 -24
- package/dist/cjs/index.js +4 -4
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/index.native.js +22 -23
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/layouts/Tabs.js.map +1 -1
- package/dist/cjs/layouts/Tabs.native.js +1 -1
- package/dist/cjs/layouts/Tabs.native.js.map +1 -1
- package/dist/cjs/layouts/withLayoutContext.cjs +4 -4
- package/dist/cjs/layouts/withLayoutContext.js +7 -5
- package/dist/cjs/layouts/withLayoutContext.js.map +1 -1
- package/dist/cjs/layouts/withLayoutContext.native.js +10 -5
- package/dist/cjs/layouts/withLayoutContext.native.js.map +1 -1
- package/dist/cjs/link/useLinkTo.cjs +2 -2
- package/dist/cjs/link/useLinkTo.js +1 -1
- package/dist/cjs/link/useLinkTo.js.map +1 -1
- package/dist/cjs/link/useLinkTo.native.js +2 -2
- package/dist/cjs/link/useLinkTo.native.js.map +1 -1
- package/dist/cjs/metro-config/getViteMetroPluginOptions.cjs +1 -1
- package/dist/cjs/metro-config/getViteMetroPluginOptions.js +1 -1
- package/dist/cjs/metro-config/getViteMetroPluginOptions.js.map +1 -1
- package/dist/cjs/metro-config/getViteMetroPluginOptions.native.js +1 -1
- package/dist/cjs/metro-config/getViteMetroPluginOptions.native.js.map +1 -1
- package/dist/cjs/polyfills-mobile.cjs +1 -3
- package/dist/cjs/polyfills-mobile.js +1 -2
- package/dist/cjs/polyfills-mobile.js.map +1 -1
- package/dist/cjs/polyfills-mobile.native.js +1 -3
- package/dist/cjs/polyfills-mobile.native.js.map +1 -1
- package/dist/cjs/render.cjs +3 -2
- package/dist/cjs/render.js +3 -2
- package/dist/cjs/render.js.map +1 -1
- package/dist/cjs/router/RouteInfoContext.cjs +5 -5
- package/dist/cjs/router/RouteInfoContext.js +3 -3
- package/dist/cjs/router/RouteInfoContext.js.map +1 -1
- package/dist/cjs/router/RouteInfoContext.native.js +4 -4
- package/dist/cjs/router/RouteInfoContext.native.js.map +1 -1
- package/dist/cjs/router/filterRootHTML.cjs +16 -10
- package/dist/cjs/router/filterRootHTML.js +10 -4
- package/dist/cjs/router/filterRootHTML.js.map +1 -1
- package/dist/cjs/router/filterRootHTML.native.js +16 -10
- package/dist/cjs/router/filterRootHTML.native.js.map +1 -1
- package/dist/cjs/router/getLinkingConfig.js.map +1 -1
- package/dist/cjs/router/getRouteInfo.cjs +50 -0
- package/dist/cjs/router/getRouteInfo.js +41 -0
- package/dist/cjs/router/getRouteInfo.js.map +6 -0
- package/dist/cjs/router/getRouteInfo.native.js +56 -0
- package/dist/cjs/router/getRouteInfo.native.js.map +1 -0
- package/dist/cjs/router/imperative-api.js.map +1 -1
- package/dist/cjs/router/imperative-api.native.js.map +1 -1
- package/dist/cjs/router/isIndexPath.cjs +36 -0
- package/dist/cjs/router/isIndexPath.js +31 -0
- package/dist/cjs/router/isIndexPath.js.map +6 -0
- package/dist/cjs/router/isIndexPath.native.js +41 -0
- package/dist/cjs/router/isIndexPath.native.js.map +1 -0
- package/dist/cjs/router/linkingConfig.cjs +43 -0
- package/dist/cjs/router/linkingConfig.js +41 -0
- package/dist/cjs/router/linkingConfig.js.map +6 -0
- package/dist/cjs/router/linkingConfig.native.js +52 -0
- package/dist/cjs/router/linkingConfig.native.js.map +1 -0
- package/dist/cjs/router/matchers.cjs +2 -2
- package/dist/cjs/router/matchers.js +2 -2
- package/dist/cjs/router/matchers.js.map +1 -1
- package/dist/cjs/router/matchers.native.js +2 -2
- package/dist/cjs/router/matchers.native.js.map +1 -1
- package/dist/cjs/router/router.cjs +9 -44
- package/dist/cjs/router/router.js +9 -44
- package/dist/cjs/router/router.js.map +2 -2
- package/dist/cjs/router/router.native.js +10 -55
- package/dist/cjs/router/router.native.js.map +1 -1
- package/dist/cjs/router/sortRoutes.js.map +1 -1
- package/dist/cjs/router/sortRoutes.native.js.map +1 -1
- package/dist/cjs/router/useInitializeOneRouter.cjs +2 -2
- package/dist/cjs/router/useInitializeOneRouter.js +1 -1
- package/dist/cjs/router/useInitializeOneRouter.js.map +1 -1
- package/dist/cjs/router/useInitializeOneRouter.native.js +1 -1
- package/dist/cjs/router/useInitializeOneRouter.native.js.map +1 -1
- package/dist/cjs/router/useScreens.js.map +1 -1
- package/dist/cjs/router/useViteRoutes.cjs +1 -1
- package/dist/cjs/router/useViteRoutes.js +1 -1
- package/dist/cjs/router/useViteRoutes.js.map +1 -1
- package/dist/cjs/router/useViteRoutes.native.js +1 -1
- package/dist/cjs/router/useViteRoutes.native.js.map +1 -1
- package/dist/cjs/router/utils/getNavigateAction.cjs +2 -2
- package/dist/cjs/router/utils/getNavigateAction.js +1 -1
- package/dist/cjs/router/utils/getNavigateAction.js.map +1 -1
- package/dist/cjs/router/utils/getNavigateAction.native.js +2 -2
- package/dist/cjs/router/utils/getNavigateAction.native.js.map +1 -1
- package/dist/cjs/server/ServerContextScript.native.js +2 -2
- package/dist/cjs/server/createRoutesManifest.js.map +1 -1
- package/dist/cjs/server/createRoutesManifest.native.js.map +1 -1
- package/dist/cjs/server/getServerManifest.js.map +1 -1
- package/dist/cjs/server/getServerManifest.native.js.map +1 -1
- package/dist/cjs/server/oneServe.cjs +5 -5
- package/dist/cjs/server/oneServe.js +1 -1
- package/dist/cjs/server/oneServe.js.map +1 -1
- package/dist/cjs/server/oneServe.native.js +5 -5
- package/dist/cjs/server/oneServe.native.js.map +1 -1
- package/dist/cjs/server-render.js.map +1 -1
- package/dist/cjs/server-render.native.js.map +1 -1
- package/dist/cjs/setup.cjs +0 -1
- package/dist/cjs/setup.js +0 -1
- package/dist/cjs/setup.js.map +2 -2
- package/dist/cjs/setup.native.js.map +1 -6
- package/dist/cjs/testing-utils.cjs +2 -2
- package/dist/cjs/testing-utils.js +1 -1
- package/dist/cjs/testing-utils.js.map +1 -1
- package/dist/cjs/testing-utils.native.js +1 -1
- package/dist/cjs/testing-utils.native.js.map +1 -1
- package/dist/cjs/typed-routes/generateRouteTypes.cjs +2 -2
- package/dist/cjs/typed-routes/generateRouteTypes.js +1 -1
- package/dist/cjs/typed-routes/generateRouteTypes.js.map +1 -1
- package/dist/cjs/typed-routes/generateRouteTypes.native.js +2 -2
- package/dist/cjs/typed-routes/generateRouteTypes.native.js.map +1 -1
- package/dist/cjs/typed-routes/getTypedRoutesDeclarationFile.cjs +3 -1
- package/dist/cjs/typed-routes/getTypedRoutesDeclarationFile.js +1 -0
- package/dist/cjs/typed-routes/getTypedRoutesDeclarationFile.js.map +1 -1
- package/dist/cjs/typed-routes/getTypedRoutesDeclarationFile.native.js +3 -1
- package/dist/cjs/typed-routes/getTypedRoutesDeclarationFile.native.js.map +1 -1
- package/dist/cjs/utils/getPathnameFromFilePath.cjs +1 -1
- package/dist/cjs/utils/getPathnameFromFilePath.js +1 -1
- package/dist/cjs/utils/getPathnameFromFilePath.js.map +1 -1
- package/dist/cjs/utils/getPathnameFromFilePath.native.js +1 -1
- package/dist/cjs/utils/isRolldown.js.map +1 -1
- package/dist/cjs/utils/redirect.js.map +1 -1
- package/dist/cjs/utils/redirect.native.js.map +1 -1
- package/dist/cjs/utils/removeSearch.cjs +1 -1
- package/dist/cjs/utils/removeSearch.js +1 -1
- package/dist/cjs/utils/removeSearch.js.map +1 -1
- package/dist/cjs/utils/removeSearch.native.js +1 -1
- package/dist/cjs/utils/removeSearch.native.js.map +1 -1
- package/dist/cjs/utils/useConstant.cjs +1 -1
- package/dist/cjs/utils/useConstant.js +1 -1
- package/dist/cjs/utils/useConstant.js.map +1 -1
- package/dist/cjs/utils/useConstant.native.js +1 -1
- package/dist/cjs/utils/useConstant.native.js.map +1 -1
- package/dist/cjs/vercel/build/buildVercelOutputDirectory.cjs +2 -2
- package/dist/cjs/vercel/build/buildVercelOutputDirectory.js +1 -1
- package/dist/cjs/vercel/build/buildVercelOutputDirectory.js.map +1 -1
- package/dist/cjs/vercel/build/buildVercelOutputDirectory.native.js +2 -2
- package/dist/cjs/vercel/build/buildVercelOutputDirectory.native.js.map +1 -1
- package/dist/cjs/vercel/build/generate/createApiServerlessFunction.cjs +4 -4
- package/dist/cjs/vercel/build/generate/createApiServerlessFunction.js +1 -1
- package/dist/cjs/vercel/build/generate/createApiServerlessFunction.js.map +1 -1
- package/dist/cjs/vercel/build/generate/createApiServerlessFunction.native.js +4 -4
- package/dist/cjs/vercel/build/generate/createApiServerlessFunction.native.js.map +1 -1
- package/dist/cjs/vercel/build/generate/createSsrServerlessFunction.cjs +2 -2
- package/dist/cjs/vercel/build/generate/createSsrServerlessFunction.js +1 -1
- package/dist/cjs/vercel/build/generate/createSsrServerlessFunction.js.map +1 -1
- package/dist/cjs/vercel/build/generate/createSsrServerlessFunction.native.js +2 -2
- package/dist/cjs/vercel/build/generate/createSsrServerlessFunction.native.js.map +1 -1
- package/dist/cjs/views/Navigator.cjs +1 -1
- package/dist/cjs/views/Navigator.js +1 -1
- package/dist/cjs/views/Navigator.js.map +1 -1
- package/dist/cjs/views/Navigator.native.js +1 -1
- package/dist/cjs/views/Navigator.native.js.map +1 -1
- package/dist/cjs/views/PreloadLinks.cjs +2 -2
- package/dist/cjs/views/PreloadLinks.js +1 -1
- package/dist/cjs/views/PreloadLinks.js.map +1 -1
- package/dist/cjs/vite/findDepsToOptimize.cjs +4 -6
- package/dist/cjs/vite/findDepsToOptimize.js +1 -2
- package/dist/cjs/vite/findDepsToOptimize.js.map +1 -1
- package/dist/cjs/vite/findDepsToOptimize.native.js +4 -6
- package/dist/cjs/vite/findDepsToOptimize.native.js.map +1 -1
- package/dist/cjs/vite/one.cjs +6 -7
- package/dist/cjs/vite/one.js +2 -3
- package/dist/cjs/vite/one.js.map +1 -1
- package/dist/cjs/vite/one.native.js +6 -7
- package/dist/cjs/vite/one.native.js.map +1 -1
- package/dist/cjs/vite/plugins/clientTreeShakePlugin.cjs +2 -2
- package/dist/cjs/vite/plugins/clientTreeShakePlugin.js +1 -1
- package/dist/cjs/vite/plugins/clientTreeShakePlugin.js.map +1 -1
- package/dist/cjs/vite/plugins/clientTreeShakePlugin.native.js +2 -2
- package/dist/cjs/vite/plugins/clientTreeShakePlugin.native.js.map +1 -1
- package/dist/cjs/vite/plugins/fileSystemRouterPlugin.cjs +2 -2
- package/dist/cjs/vite/plugins/fileSystemRouterPlugin.js +1 -1
- package/dist/cjs/vite/plugins/fileSystemRouterPlugin.js.map +1 -1
- package/dist/cjs/vite/plugins/fileSystemRouterPlugin.native.js +2 -2
- package/dist/cjs/vite/plugins/fileSystemRouterPlugin.native.js.map +1 -1
- package/dist/cjs/vite/plugins/generateFileSystemRouteTypesPlugin.js.map +1 -1
- package/dist/cjs/vite/plugins/removeReactNativeWebAnimatedPlugin.js.map +1 -1
- package/dist/cjs/vite/plugins/removeReactNativeWebAnimatedPlugin.native.js.map +1 -1
- package/dist/cjs/vite/plugins/useDomPlugin.cjs +2 -2
- package/dist/cjs/vite/plugins/useDomPlugin.js +1 -1
- package/dist/cjs/vite/plugins/useDomPlugin.js.map +1 -1
- package/dist/cjs/vite/plugins/useDomPlugin.native.js +2 -2
- package/dist/cjs/vite/plugins/useDomPlugin.native.js.map +1 -1
- package/dist/cjs/vite/plugins/virtualEntryPlugin.cjs +2 -2
- package/dist/cjs/vite/plugins/virtualEntryPlugin.js +1 -1
- package/dist/cjs/vite/plugins/virtualEntryPlugin.js.map +1 -1
- package/dist/cjs/vite/plugins/virtualEntryPlugin.native.js +1 -1
- package/dist/cjs/vite/plugins/virtualEntryPlugin.native.js.map +1 -1
- package/dist/cjs/vite/replaceLoader.js +1 -4
- package/dist/cjs/vite/replaceLoader.js.map +1 -1
- package/dist/cjs/vite/replaceLoader.native.js.map +1 -1
- package/dist/cjs/vite.cjs +4 -4
- package/dist/cjs/vite.js +1 -1
- package/dist/cjs/vite.js.map +1 -1
- package/dist/cjs/vite.native.js +4 -4
- package/dist/cjs/zero/useQuery.cjs +3 -3
- package/dist/cjs/zero/useQuery.js +2 -2
- package/dist/cjs/zero/useQuery.js.map +1 -1
- package/dist/cjs/zero/useQuery.native.js +2 -2
- package/dist/cjs/zero/useQuery.native.js.map +1 -1
- package/dist/cjs/zero/useQueryZero.js.map +1 -1
- package/dist/cjs/zero/useQueryZero.native.js.map +1 -1
- package/dist/cjs/zero.cjs +2 -2
- package/dist/cjs/zero.js +1 -1
- package/dist/cjs/zero.js.map +1 -1
- package/dist/cjs/zero.native.js +2 -2
- package/dist/cjs/zero.native.js.map +1 -1
- package/dist/esm/Root.js +3 -2
- package/dist/esm/Root.js.map +1 -1
- package/dist/esm/Root.mjs +3 -2
- package/dist/esm/Root.mjs.map +1 -1
- package/dist/esm/Root.native.js +3 -2
- package/dist/esm/Root.native.js.map +1 -1
- package/dist/esm/cli/build.js +5 -5
- package/dist/esm/cli/build.js.map +1 -1
- package/dist/esm/cli/build.mjs +5 -5
- package/dist/esm/cli/build.mjs.map +1 -1
- package/dist/esm/cli/build.native.js +5 -5
- package/dist/esm/cli/build.native.js.map +1 -1
- package/dist/esm/cli/buildPage.js +1 -1
- package/dist/esm/cli/buildPage.js.map +1 -1
- package/dist/esm/cli/buildPage.mjs +1 -1
- package/dist/esm/cli/buildPage.mjs.map +1 -1
- package/dist/esm/cli/buildPage.native.js +1 -1
- package/dist/esm/cli/buildPage.native.js.map +1 -1
- package/dist/esm/cli.js +2 -2
- package/dist/esm/cli.js.map +1 -1
- package/dist/esm/cli.mjs +2 -2
- package/dist/esm/cli.mjs.map +1 -1
- package/dist/esm/cli.native.js +2 -2
- package/dist/esm/cli.native.js.map +1 -1
- package/dist/esm/constants.js.map +1 -1
- package/dist/esm/constants.mjs.map +1 -1
- package/dist/esm/constants.native.js.map +1 -1
- package/dist/esm/createApp.js +3 -3
- package/dist/esm/createApp.js.map +1 -1
- package/dist/esm/createApp.mjs +3 -3
- package/dist/esm/createApp.mjs.map +1 -1
- package/dist/esm/fallbackViews/Sitemap.js.map +1 -1
- package/dist/esm/fallbackViews/Sitemap.mjs.map +1 -1
- package/dist/esm/fallbackViews/Sitemap.native.js.map +1 -1
- package/dist/esm/fork/NavigationContainer.js +4 -4
- package/dist/esm/fork/NavigationContainer.js.map +1 -1
- package/dist/esm/fork/NavigationContainer.mjs +1 -1
- package/dist/esm/fork/NavigationContainer.mjs.map +1 -1
- package/dist/esm/fork/NavigationContainer.native.js +1 -1
- package/dist/esm/fork/NavigationContainer.native.js.map +1 -1
- package/dist/esm/fork/__tests__/getStateFromPath.test.js +1 -1
- package/dist/esm/fork/__tests__/getStateFromPath.test.js.map +1 -1
- package/dist/esm/fork/__tests__/getStateFromPath.test.mjs +1 -1
- package/dist/esm/fork/__tests__/getStateFromPath.test.mjs.map +1 -1
- package/dist/esm/fork/__tests__/getStateFromPath.test.native.js +1 -1
- package/dist/esm/fork/__tests__/getStateFromPath.test.native.js.map +1 -1
- package/dist/esm/fork/extractPathFromURL.js +1 -1
- package/dist/esm/fork/extractPathFromURL.js.map +1 -1
- package/dist/esm/fork/extractPathFromURL.mjs +1 -1
- package/dist/esm/fork/extractPathFromURL.mjs.map +1 -1
- package/dist/esm/fork/extractPathFromURL.native.js +1 -1
- package/dist/esm/fork/extractPathFromURL.native.js.map +1 -1
- package/dist/esm/fork/getPathFromState.js +3 -3
- package/dist/esm/fork/getPathFromState.js.map +1 -1
- package/dist/esm/fork/getPathFromState.mjs +1 -1
- package/dist/esm/fork/getPathFromState.mjs.map +1 -1
- package/dist/esm/fork/getPathFromState.native.js +1 -1
- package/dist/esm/fork/getPathFromState.native.js.map +1 -1
- package/dist/esm/fork/getPathFromState.test.js.map +1 -1
- package/dist/esm/fork/getPathFromState.test.mjs.map +1 -1
- package/dist/esm/fork/getPathFromState.test.native.js.map +1 -1
- package/dist/esm/fork/getStateFromPath.js +2 -2
- package/dist/esm/fork/getStateFromPath.js.map +1 -1
- package/dist/esm/fork/getStateFromPath.mjs +2 -2
- package/dist/esm/fork/getStateFromPath.mjs.map +1 -1
- package/dist/esm/fork/getStateFromPath.native.js +2 -2
- package/dist/esm/fork/getStateFromPath.native.js.map +1 -1
- package/dist/esm/fork/useBackButton.js.map +1 -1
- package/dist/esm/fork/useBackButton.mjs.map +1 -1
- package/dist/esm/fork/useDocumentTitle.js.map +1 -1
- package/dist/esm/fork/useDocumentTitle.mjs.map +1 -1
- package/dist/esm/fork/useLinking.js +1 -1
- package/dist/esm/fork/useLinking.js.map +1 -1
- package/dist/esm/fork/useLinking.mjs +1 -1
- package/dist/esm/fork/useLinking.mjs.map +1 -1
- package/dist/esm/fork/useLinking.native.js.map +1 -1
- package/dist/esm/fork/validatePathConfig.js.map +1 -1
- package/dist/esm/fork/validatePathConfig.mjs.map +1 -1
- package/dist/esm/fork/validatePathConfig.native.js.map +1 -1
- package/dist/esm/head/Head.ios.js +4 -4
- package/dist/esm/head/Head.ios.js.map +1 -1
- package/dist/esm/hooks.js +2 -9
- package/dist/esm/hooks.js.map +1 -1
- package/dist/esm/hooks.mjs +4 -2
- package/dist/esm/hooks.mjs.map +1 -1
- package/dist/esm/hooks.native.js +4 -3
- package/dist/esm/hooks.native.js.map +1 -1
- package/dist/esm/index.js +31 -33
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs +21 -22
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js +21 -22
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/layouts/Stack.js.map +1 -1
- package/dist/esm/layouts/Stack.mjs.map +1 -1
- package/dist/esm/layouts/Stack.native.js.map +1 -1
- package/dist/esm/layouts/Tabs.js +2 -2
- package/dist/esm/layouts/Tabs.js.map +1 -1
- package/dist/esm/layouts/Tabs.mjs +1 -1
- package/dist/esm/layouts/Tabs.mjs.map +1 -1
- package/dist/esm/layouts/Tabs.native.js +2 -2
- package/dist/esm/layouts/Tabs.native.js.map +1 -1
- package/dist/esm/layouts/withLayoutContext.js +7 -5
- package/dist/esm/layouts/withLayoutContext.js.map +1 -1
- package/dist/esm/layouts/withLayoutContext.mjs +4 -4
- package/dist/esm/layouts/withLayoutContext.mjs.map +1 -1
- package/dist/esm/layouts/withLayoutContext.native.js +9 -4
- package/dist/esm/layouts/withLayoutContext.native.js.map +1 -1
- package/dist/esm/link/Link.js.map +1 -1
- package/dist/esm/link/Link.mjs.map +1 -1
- package/dist/esm/link/Link.native.js.map +1 -1
- package/dist/esm/link/useLinkTo.js +1 -1
- package/dist/esm/link/useLinkTo.js.map +1 -1
- package/dist/esm/link/useLinkTo.mjs +1 -1
- package/dist/esm/link/useLinkTo.mjs.map +1 -1
- package/dist/esm/link/useLinkTo.native.js +1 -1
- package/dist/esm/link/useLinkTo.native.js.map +1 -1
- package/dist/esm/link/useLoadedNavigation.js.map +1 -1
- package/dist/esm/link/useLoadedNavigation.mjs.map +1 -1
- package/dist/esm/link/useLoadedNavigation.native.js.map +1 -1
- package/dist/esm/metro-config/getViteMetroPluginOptions.js +1 -1
- package/dist/esm/metro-config/getViteMetroPluginOptions.js.map +1 -1
- package/dist/esm/metro-config/getViteMetroPluginOptions.mjs +1 -1
- package/dist/esm/metro-config/getViteMetroPluginOptions.mjs.map +1 -1
- package/dist/esm/metro-config/getViteMetroPluginOptions.native.js +1 -1
- package/dist/esm/metro-config/getViteMetroPluginOptions.native.js.map +1 -1
- package/dist/esm/polyfills-mobile.js +1 -2
- package/dist/esm/polyfills-mobile.js.map +1 -1
- package/dist/esm/polyfills-mobile.mjs +1 -3
- package/dist/esm/polyfills-mobile.mjs.map +1 -1
- package/dist/esm/polyfills-mobile.native.js +1 -3
- package/dist/esm/polyfills-mobile.native.js.map +1 -1
- package/dist/esm/render.js +3 -2
- package/dist/esm/render.js.map +1 -1
- package/dist/esm/render.mjs +3 -2
- package/dist/esm/render.mjs.map +1 -1
- package/dist/esm/router/Route.js.map +1 -1
- package/dist/esm/router/Route.mjs.map +1 -1
- package/dist/esm/router/Route.native.js.map +1 -1
- package/dist/esm/router/RouteInfoContext.js +3 -3
- package/dist/esm/router/RouteInfoContext.js.map +1 -1
- package/dist/esm/router/RouteInfoContext.mjs +3 -3
- package/dist/esm/router/RouteInfoContext.mjs.map +1 -1
- package/dist/esm/router/RouteInfoContext.native.js +3 -3
- package/dist/esm/router/RouteInfoContext.native.js.map +1 -1
- package/dist/esm/router/filterRootHTML.js +10 -4
- package/dist/esm/router/filterRootHTML.js.map +1 -1
- package/dist/esm/router/filterRootHTML.mjs +16 -10
- package/dist/esm/router/filterRootHTML.mjs.map +1 -1
- package/dist/esm/router/filterRootHTML.native.js +16 -10
- package/dist/esm/router/filterRootHTML.native.js.map +1 -1
- package/dist/esm/router/getLinkingConfig.js.map +1 -1
- package/dist/esm/router/getLinkingConfig.mjs.map +1 -1
- package/dist/esm/router/getLinkingConfig.native.js.map +1 -1
- package/dist/esm/router/getRouteInfo.js +29 -0
- package/dist/esm/router/getRouteInfo.js.map +6 -0
- package/dist/esm/router/getRouteInfo.mjs +27 -0
- package/dist/esm/router/getRouteInfo.mjs.map +1 -0
- package/dist/esm/router/getRouteInfo.native.js +30 -0
- package/dist/esm/router/getRouteInfo.native.js.map +1 -0
- package/dist/esm/router/imperative-api.js.map +1 -1
- package/dist/esm/router/imperative-api.mjs.map +1 -1
- package/dist/esm/router/imperative-api.native.js.map +1 -1
- package/dist/esm/router/isIndexPath.js +15 -0
- package/dist/esm/router/isIndexPath.js.map +6 -0
- package/dist/esm/router/isIndexPath.mjs +13 -0
- package/dist/esm/router/isIndexPath.mjs.map +1 -0
- package/dist/esm/router/isIndexPath.native.js +15 -0
- package/dist/esm/router/isIndexPath.native.js.map +1 -0
- package/dist/esm/router/linkingConfig.js +25 -0
- package/dist/esm/router/linkingConfig.js.map +6 -0
- package/dist/esm/router/linkingConfig.mjs +17 -0
- package/dist/esm/router/linkingConfig.mjs.map +1 -0
- package/dist/esm/router/linkingConfig.native.js +23 -0
- package/dist/esm/router/linkingConfig.native.js.map +1 -0
- package/dist/esm/router/matchers.js +2 -2
- package/dist/esm/router/matchers.js.map +1 -1
- package/dist/esm/router/matchers.mjs +2 -2
- package/dist/esm/router/matchers.mjs.map +1 -1
- package/dist/esm/router/matchers.native.js +2 -2
- package/dist/esm/router/matchers.native.js.map +1 -1
- package/dist/esm/router/matchers.test.js +5 -5
- package/dist/esm/router/matchers.test.js.map +1 -1
- package/dist/esm/router/matchers.test.mjs +2 -2
- package/dist/esm/router/matchers.test.mjs.map +1 -1
- package/dist/esm/router/matchers.test.native.js +2 -2
- package/dist/esm/router/matchers.test.native.js.map +1 -1
- package/dist/esm/router/router.js +10 -49
- package/dist/esm/router/router.js.map +2 -2
- package/dist/esm/router/router.mjs +9 -42
- package/dist/esm/router/router.mjs.map +1 -1
- package/dist/esm/router/router.native.js +10 -53
- package/dist/esm/router/router.native.js.map +1 -1
- package/dist/esm/router/sortRoutes.js.map +1 -1
- package/dist/esm/router/sortRoutes.mjs.map +1 -1
- package/dist/esm/router/sortRoutes.native.js.map +1 -1
- package/dist/esm/router/useInitializeOneRouter.js +1 -1
- package/dist/esm/router/useInitializeOneRouter.js.map +1 -1
- package/dist/esm/router/useInitializeOneRouter.mjs +1 -1
- package/dist/esm/router/useInitializeOneRouter.mjs.map +1 -1
- package/dist/esm/router/useInitializeOneRouter.native.js +1 -1
- package/dist/esm/router/useInitializeOneRouter.native.js.map +1 -1
- package/dist/esm/router/useScreens.js +1 -1
- package/dist/esm/router/useScreens.js.map +1 -1
- package/dist/esm/router/useScreens.mjs +1 -1
- package/dist/esm/router/useScreens.mjs.map +1 -1
- package/dist/esm/router/useScreens.native.js +1 -1
- package/dist/esm/router/useScreens.native.js.map +1 -1
- package/dist/esm/router/useViteRoutes.js +1 -1
- package/dist/esm/router/useViteRoutes.js.map +1 -1
- package/dist/esm/router/useViteRoutes.mjs +1 -1
- package/dist/esm/router/useViteRoutes.mjs.map +1 -1
- package/dist/esm/router/useViteRoutes.native.js +1 -1
- package/dist/esm/router/useViteRoutes.native.js.map +1 -1
- package/dist/esm/router/utils/getNavigateAction.js +1 -1
- package/dist/esm/router/utils/getNavigateAction.js.map +1 -1
- package/dist/esm/router/utils/getNavigateAction.mjs +1 -1
- package/dist/esm/router/utils/getNavigateAction.mjs.map +1 -1
- package/dist/esm/router/utils/getNavigateAction.native.js +1 -1
- package/dist/esm/router/utils/getNavigateAction.native.js.map +1 -1
- package/dist/esm/router/utils/getNavigateAction.test.js +1 -1
- package/dist/esm/router/utils/getNavigateAction.test.js.map +1 -1
- package/dist/esm/router/utils/getNavigateAction.test.mjs +1 -1
- package/dist/esm/router/utils/getNavigateAction.test.mjs.map +1 -1
- package/dist/esm/router/utils/getNavigateAction.test.native.js +1 -1
- package/dist/esm/router/utils/getNavigateAction.test.native.js.map +1 -1
- package/dist/esm/server/ServerContextScript.native.js +2 -2
- package/dist/esm/server/createRoutesManifest.js.map +1 -1
- package/dist/esm/server/createRoutesManifest.mjs.map +1 -1
- package/dist/esm/server/createRoutesManifest.native.js.map +1 -1
- package/dist/esm/server/getServerManifest.js.map +1 -1
- package/dist/esm/server/getServerManifest.mjs.map +1 -1
- package/dist/esm/server/getServerManifest.native.js.map +1 -1
- package/dist/esm/server/oneServe.js +3 -3
- package/dist/esm/server/oneServe.js.map +1 -1
- package/dist/esm/server/oneServe.mjs +3 -3
- package/dist/esm/server/oneServe.mjs.map +1 -1
- package/dist/esm/server/oneServe.native.js +3 -3
- package/dist/esm/server/oneServe.native.js.map +1 -1
- package/dist/esm/server-render.js.map +1 -1
- package/dist/esm/server-render.mjs.map +1 -1
- package/dist/esm/server-render.native.js.map +1 -1
- package/dist/esm/setup.js +0 -1
- package/dist/esm/setup.js.map +2 -2
- package/dist/esm/setup.mjs +1 -1
- package/dist/esm/setup.mjs.map +1 -1
- package/dist/esm/testing-utils.js +1 -1
- package/dist/esm/testing-utils.js.map +1 -1
- package/dist/esm/testing-utils.mjs +1 -1
- package/dist/esm/testing-utils.mjs.map +1 -1
- package/dist/esm/testing-utils.native.js +1 -1
- package/dist/esm/testing-utils.native.js.map +1 -1
- package/dist/esm/typed-routes/generateRouteTypes.js +1 -1
- package/dist/esm/typed-routes/generateRouteTypes.js.map +1 -1
- package/dist/esm/typed-routes/generateRouteTypes.mjs +1 -1
- package/dist/esm/typed-routes/generateRouteTypes.mjs.map +1 -1
- package/dist/esm/typed-routes/generateRouteTypes.native.js +1 -1
- package/dist/esm/typed-routes/generateRouteTypes.native.js.map +1 -1
- package/dist/esm/typed-routes/getTypedRoutesDeclarationFile.js +1 -0
- package/dist/esm/typed-routes/getTypedRoutesDeclarationFile.js.map +1 -1
- package/dist/esm/typed-routes/getTypedRoutesDeclarationFile.mjs +3 -1
- package/dist/esm/typed-routes/getTypedRoutesDeclarationFile.mjs.map +1 -1
- package/dist/esm/typed-routes/getTypedRoutesDeclarationFile.native.js +3 -1
- package/dist/esm/typed-routes/getTypedRoutesDeclarationFile.native.js.map +1 -1
- package/dist/esm/utils/getPathnameFromFilePath.js +1 -1
- package/dist/esm/utils/getPathnameFromFilePath.js.map +1 -1
- package/dist/esm/utils/getPathnameFromFilePath.mjs +1 -1
- package/dist/esm/utils/getPathnameFromFilePath.mjs.map +1 -1
- package/dist/esm/utils/getPathnameFromFilePath.native.js +1 -1
- package/dist/esm/utils/getPathnameFromFilePath.native.js.map +1 -1
- package/dist/esm/utils/isRolldown.js.map +1 -1
- package/dist/esm/utils/isRolldown.mjs.map +1 -1
- package/dist/esm/utils/isRolldown.native.js.map +1 -1
- package/dist/esm/utils/redirect.js.map +1 -1
- package/dist/esm/utils/redirect.mjs.map +1 -1
- package/dist/esm/utils/redirect.native.js.map +1 -1
- package/dist/esm/utils/removeSearch.js +1 -1
- package/dist/esm/utils/removeSearch.js.map +1 -1
- package/dist/esm/utils/removeSearch.mjs +1 -1
- package/dist/esm/utils/removeSearch.mjs.map +1 -1
- package/dist/esm/utils/removeSearch.native.js +1 -1
- package/dist/esm/utils/removeSearch.native.js.map +1 -1
- package/dist/esm/utils/useConstant.js +1 -1
- package/dist/esm/utils/useConstant.js.map +1 -1
- package/dist/esm/utils/useConstant.mjs +1 -1
- package/dist/esm/utils/useConstant.mjs.map +1 -1
- package/dist/esm/utils/useConstant.native.js +1 -1
- package/dist/esm/vercel/build/buildVercelOutputDirectory.js +2 -2
- package/dist/esm/vercel/build/buildVercelOutputDirectory.js.map +1 -1
- package/dist/esm/vercel/build/buildVercelOutputDirectory.mjs +2 -2
- package/dist/esm/vercel/build/buildVercelOutputDirectory.mjs.map +1 -1
- package/dist/esm/vercel/build/buildVercelOutputDirectory.native.js +2 -2
- package/dist/esm/vercel/build/buildVercelOutputDirectory.native.js.map +1 -1
- package/dist/esm/vercel/build/generate/createApiServerlessFunction.js +4 -4
- package/dist/esm/vercel/build/generate/createApiServerlessFunction.js.map +1 -1
- package/dist/esm/vercel/build/generate/createApiServerlessFunction.mjs +4 -4
- package/dist/esm/vercel/build/generate/createApiServerlessFunction.mjs.map +1 -1
- package/dist/esm/vercel/build/generate/createApiServerlessFunction.native.js +4 -4
- package/dist/esm/vercel/build/generate/createApiServerlessFunction.native.js.map +1 -1
- package/dist/esm/vercel/build/generate/createSsrServerlessFunction.js +1 -1
- package/dist/esm/vercel/build/generate/createSsrServerlessFunction.js.map +1 -1
- package/dist/esm/vercel/build/generate/createSsrServerlessFunction.mjs +1 -1
- package/dist/esm/vercel/build/generate/createSsrServerlessFunction.mjs.map +1 -1
- package/dist/esm/vercel/build/generate/createSsrServerlessFunction.native.js +1 -1
- package/dist/esm/vercel/build/generate/createSsrServerlessFunction.native.js.map +1 -1
- package/dist/esm/views/Navigator.js +1 -1
- package/dist/esm/views/Navigator.js.map +1 -1
- package/dist/esm/views/Navigator.mjs +1 -1
- package/dist/esm/views/Navigator.mjs.map +1 -1
- package/dist/esm/views/Navigator.native.js +1 -1
- package/dist/esm/views/Navigator.native.js.map +1 -1
- package/dist/esm/views/PreloadLinks.js +1 -1
- package/dist/esm/views/PreloadLinks.js.map +1 -1
- package/dist/esm/views/PreloadLinks.mjs +1 -1
- package/dist/esm/views/PreloadLinks.mjs.map +1 -1
- package/dist/esm/vite/findDepsToOptimize.js +2 -3
- package/dist/esm/vite/findDepsToOptimize.js.map +1 -1
- package/dist/esm/vite/findDepsToOptimize.mjs +3 -5
- package/dist/esm/vite/findDepsToOptimize.mjs.map +1 -1
- package/dist/esm/vite/findDepsToOptimize.native.js +3 -5
- package/dist/esm/vite/findDepsToOptimize.native.js.map +1 -1
- package/dist/esm/vite/one.js +4 -5
- package/dist/esm/vite/one.js.map +1 -1
- package/dist/esm/vite/one.mjs +4 -5
- package/dist/esm/vite/one.mjs.map +1 -1
- package/dist/esm/vite/one.native.js +4 -5
- package/dist/esm/vite/one.native.js.map +1 -1
- package/dist/esm/vite/plugins/clientTreeShakePlugin.js +1 -1
- package/dist/esm/vite/plugins/clientTreeShakePlugin.js.map +1 -1
- package/dist/esm/vite/plugins/clientTreeShakePlugin.mjs +1 -1
- package/dist/esm/vite/plugins/clientTreeShakePlugin.mjs.map +1 -1
- package/dist/esm/vite/plugins/clientTreeShakePlugin.native.js +1 -1
- package/dist/esm/vite/plugins/clientTreeShakePlugin.native.js.map +1 -1
- package/dist/esm/vite/plugins/fileSystemRouterPlugin.js +1 -1
- package/dist/esm/vite/plugins/fileSystemRouterPlugin.js.map +1 -1
- package/dist/esm/vite/plugins/fileSystemRouterPlugin.mjs +1 -1
- package/dist/esm/vite/plugins/fileSystemRouterPlugin.mjs.map +1 -1
- package/dist/esm/vite/plugins/fileSystemRouterPlugin.native.js +1 -1
- package/dist/esm/vite/plugins/fileSystemRouterPlugin.native.js.map +1 -1
- package/dist/esm/vite/plugins/generateFileSystemRouteTypesPlugin.js.map +1 -1
- package/dist/esm/vite/plugins/generateFileSystemRouteTypesPlugin.mjs.map +1 -1
- package/dist/esm/vite/plugins/generateFileSystemRouteTypesPlugin.native.js.map +1 -1
- package/dist/esm/vite/plugins/removeReactNativeWebAnimatedPlugin.js.map +1 -1
- package/dist/esm/vite/plugins/removeReactNativeWebAnimatedPlugin.mjs.map +1 -1
- package/dist/esm/vite/plugins/removeReactNativeWebAnimatedPlugin.native.js.map +1 -1
- package/dist/esm/vite/plugins/useDomPlugin.js +1 -1
- package/dist/esm/vite/plugins/useDomPlugin.js.map +1 -1
- package/dist/esm/vite/plugins/useDomPlugin.mjs +1 -1
- package/dist/esm/vite/plugins/useDomPlugin.mjs.map +1 -1
- package/dist/esm/vite/plugins/useDomPlugin.native.js +1 -1
- package/dist/esm/vite/plugins/useDomPlugin.native.js.map +1 -1
- package/dist/esm/vite/plugins/virtualEntryPlugin.js +6 -6
- package/dist/esm/vite/plugins/virtualEntryPlugin.js.map +1 -1
- package/dist/esm/vite/plugins/virtualEntryPlugin.mjs +1 -1
- package/dist/esm/vite/plugins/virtualEntryPlugin.mjs.map +1 -1
- package/dist/esm/vite/plugins/virtualEntryPlugin.native.js +1 -1
- package/dist/esm/vite/plugins/virtualEntryPlugin.native.js.map +1 -1
- package/dist/esm/vite/replaceLoader.js +1 -4
- package/dist/esm/vite/replaceLoader.js.map +1 -1
- package/dist/esm/vite/replaceLoader.mjs.map +1 -1
- package/dist/esm/vite/replaceLoader.native.js.map +1 -1
- package/dist/esm/vite.js +3 -3
- package/dist/esm/vite.js.map +1 -1
- package/dist/esm/vite.mjs +3 -3
- package/dist/esm/vite.mjs.map +1 -1
- package/dist/esm/vite.native.js +3 -3
- package/dist/esm/vite.native.js.map +1 -1
- package/dist/esm/zero/useQuery.js +2 -2
- package/dist/esm/zero/useQuery.js.map +1 -1
- package/dist/esm/zero/useQuery.mjs +2 -2
- package/dist/esm/zero/useQuery.mjs.map +1 -1
- package/dist/esm/zero/useQuery.native.js +2 -2
- package/dist/esm/zero/useQuery.native.js.map +1 -1
- package/dist/esm/zero/useQueryZero.js.map +1 -1
- package/dist/esm/zero/useQueryZero.mjs.map +1 -1
- package/dist/esm/zero/useQueryZero.native.js.map +1 -1
- package/dist/esm/zero.js +2 -2
- package/dist/esm/zero.js.map +1 -1
- package/dist/esm/zero.mjs +2 -2
- package/dist/esm/zero.mjs.map +1 -1
- package/dist/esm/zero.native.js +2 -2
- package/dist/esm/zero.native.js.map +1 -1
- package/package.json +36 -34
- package/src/Root.tsx +9 -9
- package/src/cli/build.ts +7 -8
- package/src/cli/buildPage.ts +1 -1
- package/src/cli.ts +2 -2
- package/src/constants.ts +3 -1
- package/src/createApp.tsx +4 -5
- package/src/fallbackViews/Sitemap.tsx +1 -0
- package/src/fork/NavigationContainer.tsx +7 -8
- package/src/fork/__tests__/getStateFromPath.test.tsx +3 -3
- package/src/fork/extractPathFromURL.ts +1 -1
- package/src/fork/getPathFromState-mods.ts +1 -1
- package/src/fork/getPathFromState.test.ts +1 -1
- package/src/fork/getPathFromState.ts +3 -3
- package/src/fork/getStateFromPath-mods.ts +2 -2
- package/src/fork/getStateFromPath.ts +4 -6
- package/src/fork/useBackButton.tsx +1 -1
- package/src/fork/useDocumentTitle.tsx +2 -3
- package/src/fork/useLinking.native.ts +1 -3
- package/src/fork/useLinking.ts +4 -5
- package/src/fork/validatePathConfig.ts +0 -1
- package/src/head/Head.android.tsx +1 -1
- package/src/head/Head.ios.tsx +25 -7
- package/src/head/Head.tsx +1 -1
- package/src/head/HeadModule.ts +1 -1
- package/src/head/url.tsx +1 -1
- package/src/hooks.tsx +3 -7
- package/src/index.ts +44 -53
- package/src/interfaces/router.ts +2 -2
- package/src/layouts/Drawer.tsx +1 -1
- package/src/layouts/Stack.tsx +1 -1
- package/src/layouts/Tabs.tsx +5 -5
- package/src/layouts/withLayoutContext.tsx +18 -7
- package/src/link/Link.tsx +1 -1
- package/src/link/linking.ts +1 -1
- package/src/link/useLinkTo.tsx +2 -2
- package/src/link/useLoadedNavigation.ts +1 -1
- package/src/metro-config/getViteMetroPluginOptions.ts +4 -2
- package/src/polyfills-mobile.ts +3 -3
- package/src/render.tsx +3 -2
- package/src/router/Route.tsx +1 -1
- package/src/router/RouteInfoContext.tsx +3 -3
- package/src/router/filterRootHTML.ts +21 -7
- package/src/router/getLinkingConfig.ts +1 -1
- package/src/router/getRouteInfo.ts +37 -0
- package/src/router/imperative-api.ts +1 -1
- package/src/router/isIndexPath.ts +33 -0
- package/src/router/linkingConfig.ts +38 -0
- package/src/router/matchers.test.ts +4 -4
- package/src/router/matchers.ts +2 -2
- package/src/router/router.ts +18 -90
- package/src/router/sortRoutes.ts +1 -1
- package/src/router/useInitializeOneRouter.ts +2 -2
- package/src/router/useScreens.tsx +4 -4
- package/src/router/useViteRoutes.tsx +1 -1
- package/src/router/utils/getNavigateAction.test.ts +1 -1
- package/src/router/utils/getNavigateAction.ts +2 -2
- package/src/server/ServerContextScript.tsx +2 -2
- package/src/server/createRoutesManifest.ts +2 -3
- package/src/server/getServerManifest.ts +2 -1
- package/src/server/oneServe.ts +4 -4
- package/src/server-render.tsx +0 -1
- package/src/setup.ts +3 -2
- package/src/testing-utils.ts +1 -2
- package/src/typed-routes/generateRouteTypes.ts +1 -1
- package/src/typed-routes/getTypedRoutesDeclarationFile.ts +1 -0
- package/src/utils/getPathnameFromFilePath.ts +1 -1
- package/src/utils/isRolldown.ts +1 -1
- package/src/utils/redirect.ts +1 -1
- package/src/utils/removeSearch.ts +1 -1
- package/src/utils/useConstant.ts +1 -1
- package/src/utils/withStaticProperties.ts +1 -1
- package/src/vercel/build/buildVercelOutputDirectory.ts +4 -6
- package/src/vercel/build/generate/createApiServerlessFunction.ts +4 -6
- package/src/vercel/build/generate/createSsrServerlessFunction.ts +2 -2
- package/src/views/Navigator.tsx +2 -2
- package/src/views/PreloadLinks.tsx +1 -2
- package/src/vite/findDepsToOptimize.ts +2 -4
- package/src/vite/one.ts +9 -12
- package/src/vite/plugins/clientTreeShakePlugin.ts +1 -1
- package/src/vite/plugins/fileSystemRouterPlugin.tsx +2 -2
- package/src/vite/plugins/generateFileSystemRouteTypesPlugin.tsx +1 -1
- package/src/vite/plugins/removeReactNativeWebAnimatedPlugin.ts +1 -3
- package/src/vite/plugins/useDomPlugin.ts +2 -2
- package/src/vite/plugins/virtualEntryPlugin.ts +6 -6
- package/src/vite/replaceLoader.ts +1 -7
- package/src/vite.ts +3 -5
- package/src/zero/useQuery.ts +2 -2
- package/src/zero/useQueryZero.ts +5 -5
- package/src/zero.ts +2 -2
- package/types/Root.d.ts.map +1 -1
- package/types/cli/build.d.ts.map +1 -1
- package/types/constants.d.ts.map +1 -1
- package/types/createApp.d.ts.map +1 -1
- package/types/fallbackViews/Sitemap.d.ts.map +1 -1
- package/types/fork/NavigationContainer.d.ts +1 -1
- package/types/fork/NavigationContainer.d.ts.map +1 -1
- package/types/fork/getPathFromState.d.ts.map +1 -1
- package/types/fork/getStateFromPath-mods.d.ts +1 -1
- package/types/fork/getStateFromPath-mods.d.ts.map +1 -1
- package/types/fork/getStateFromPath.d.ts.map +1 -1
- package/types/fork/useBackButton.d.ts +1 -1
- package/types/fork/useBackButton.d.ts.map +1 -1
- package/types/fork/useDocumentTitle.d.ts +2 -2
- package/types/fork/useDocumentTitle.d.ts.map +1 -1
- package/types/fork/useLinking.d.ts +2 -2
- package/types/fork/useLinking.d.ts.map +1 -1
- package/types/fork/useLinking.native.d.ts +1 -1
- package/types/fork/useLinking.native.d.ts.map +1 -1
- package/types/fork/validatePathConfig.d.ts.map +1 -1
- package/types/head/Head.ios.d.ts.map +1 -1
- package/types/hooks.d.ts +1 -1
- package/types/hooks.d.ts.map +1 -1
- package/types/index.d.ts +24 -25
- package/types/index.d.ts.map +1 -1
- package/types/interfaces/router.d.ts +2 -2
- package/types/interfaces/router.d.ts.map +1 -1
- package/types/layouts/Drawer.d.ts +7 -15
- package/types/layouts/Drawer.d.ts.map +1 -1
- package/types/layouts/Stack.d.ts +6 -14
- package/types/layouts/Stack.d.ts.map +1 -1
- package/types/layouts/Tabs.d.ts +6 -14
- package/types/layouts/Tabs.d.ts.map +1 -1
- package/types/layouts/withLayoutContext.d.ts +2 -2
- package/types/layouts/withLayoutContext.d.ts.map +1 -1
- package/types/link/useLinkTo.d.ts.map +1 -1
- package/types/link/useLoadedNavigation.d.ts.map +1 -1
- package/types/metro-config/getViteMetroPluginOptions.d.ts.map +1 -1
- package/types/polyfills-mobile.d.ts.map +1 -1
- package/types/render.d.ts.map +1 -1
- package/types/router/Route.d.ts.map +1 -1
- package/types/router/RouteInfoContext.d.ts.map +1 -1
- package/types/router/filterRootHTML.d.ts.map +1 -1
- package/types/router/getLinkingConfig.d.ts +1 -1
- package/types/router/getLinkingConfig.d.ts.map +1 -1
- package/types/router/getRouteInfo.d.ts +4 -0
- package/types/router/getRouteInfo.d.ts.map +1 -0
- package/types/router/imperative-api.d.ts.map +1 -1
- package/types/router/isIndexPath.d.ts +3 -0
- package/types/router/isIndexPath.d.ts.map +1 -0
- package/types/router/linkingConfig.d.ts +8 -0
- package/types/router/linkingConfig.d.ts.map +1 -0
- package/types/router/router.d.ts +8 -6
- package/types/router/router.d.ts.map +1 -1
- package/types/router/sortRoutes.d.ts.map +1 -1
- package/types/router/useInitializeOneRouter.d.ts +1 -1
- package/types/router/useInitializeOneRouter.d.ts.map +1 -1
- package/types/router/useScreens.d.ts +1 -1
- package/types/router/useScreens.d.ts.map +1 -1
- package/types/router/utils/getNavigateAction.d.ts.map +1 -1
- package/types/server/createRoutesManifest.d.ts.map +1 -1
- package/types/server/getServerManifest.d.ts.map +1 -1
- package/types/server/oneServe.d.ts.map +1 -1
- package/types/server-render.d.ts.map +1 -1
- package/types/setup.d.ts +0 -1
- package/types/setup.d.ts.map +1 -1
- package/types/testing-utils.d.ts.map +1 -1
- package/types/utils/redirect.d.ts.map +1 -1
- package/types/vercel/build/buildVercelOutputDirectory.d.ts.map +1 -1
- package/types/vercel/build/generate/createApiServerlessFunction.d.ts.map +1 -1
- package/types/vercel/build/generate/createSsrServerlessFunction.d.ts.map +1 -1
- package/types/views/Navigator.d.ts +1 -1
- package/types/views/Navigator.d.ts.map +1 -1
- package/types/views/PreloadLinks.d.ts.map +1 -1
- package/types/views/Try.d.ts +1 -1
- package/types/vite/one.d.ts.map +1 -1
- package/types/vite/plugins/fileSystemRouterPlugin.d.ts.map +1 -1
- package/types/vite/plugins/generateFileSystemRouteTypesPlugin.d.ts.map +1 -1
- package/types/vite/plugins/removeReactNativeWebAnimatedPlugin.d.ts.map +1 -1
- package/types/vite/plugins/useDomPlugin.d.ts.map +1 -1
- package/types/vite/plugins/virtualEntryPlugin.d.ts.map +1 -1
- package/types/vite/replaceLoader.d.ts +1 -1
- package/types/vite/replaceLoader.d.ts.map +1 -1
- package/types/vite.d.ts +3 -3
- package/types/vite.d.ts.map +1 -1
- package/types/zero/useQuery.d.ts.map +1 -1
- package/types/zero/useQueryZero.d.ts.map +1 -1
- package/types/zero.d.ts +2 -2
- package/types/zero.d.ts.map +1 -1
- package/vendor/react-dom/package.json +1 -1
- /package/types/vercel/build/generate/{createSsrServerlessFunction.d.ts → createSSRServerlessFunction.d.ts} +0 -0
package/src/head/url.tsx
CHANGED
|
@@ -63,7 +63,7 @@ function throwOrAlert(msg: string) {
|
|
|
63
63
|
console.warn(`TODO FIX: ${msg}`)
|
|
64
64
|
// // Production apps fatally crash which is often not helpful.
|
|
65
65
|
// if (
|
|
66
|
-
// // @ts-
|
|
66
|
+
// // @ts-expect-error: process is defined
|
|
67
67
|
// process.env.NODE_ENV === 'production'
|
|
68
68
|
// ) {
|
|
69
69
|
// console.error(msg)
|
package/src/hooks.tsx
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React, { createContext,
|
|
1
|
+
import React, { createContext, type ReactNode, useContext } from 'react'
|
|
2
2
|
import type { OneRouter } from './interfaces/router'
|
|
3
3
|
import { router } from './router/imperative-api'
|
|
4
4
|
import { RouteParamsContext, useRouteNode } from './router/Route'
|
|
5
|
-
import { navigationRef, useStoreRootState, useStoreRouteInfo } from './router/router'
|
|
6
5
|
import { RouteInfoContext } from './router/RouteInfoContext'
|
|
6
|
+
import { navigationRef, useStoreRootState, useStoreRouteInfo } from './router/router'
|
|
7
7
|
|
|
8
8
|
type SearchParams = OneRouter.SearchParams
|
|
9
9
|
|
|
@@ -55,11 +55,7 @@ export function Frozen({ on = false, children }: { on?: boolean; children: React
|
|
|
55
55
|
return (
|
|
56
56
|
<FrozeContext.Provider value={on}>
|
|
57
57
|
{/* <Freeze freeze={on}> */}
|
|
58
|
-
<div
|
|
59
|
-
// @ts-ignore
|
|
60
|
-
inert
|
|
61
|
-
style={{ display: 'contents' }}
|
|
62
|
-
>
|
|
58
|
+
<div {...(on && { inert: true })} style={{ display: 'contents' }}>
|
|
63
59
|
{children}
|
|
64
60
|
</div>
|
|
65
61
|
{/* </Freeze> */}
|
package/src/index.ts
CHANGED
|
@@ -1,75 +1,66 @@
|
|
|
1
1
|
export { createApp } from './createApp'
|
|
2
2
|
|
|
3
|
-
export type {
|
|
3
|
+
export type { One, OneRouter } from './interfaces/router'
|
|
4
|
+
|
|
4
5
|
import type { OneRouter } from './interfaces/router'
|
|
5
6
|
|
|
6
7
|
export type Href = OneRouter.Href
|
|
7
8
|
export type LinkProps<T extends string | object = string> = OneRouter.LinkProps<T>
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
//
|
|
12
|
-
export
|
|
13
|
-
export { createRoute, route } from './router/createRoute'
|
|
14
|
-
export { onClientLoaderResolve } from './clientLoaderResolver'
|
|
15
|
-
|
|
16
|
-
// middleware
|
|
17
|
-
export { createMiddleware, type Middleware } from './createMiddleware'
|
|
18
|
-
|
|
19
|
-
// internals
|
|
20
|
-
export { render } from './render'
|
|
21
|
-
export { Root } from './Root'
|
|
22
|
-
export * as routerStore from './router/router'
|
|
23
|
-
|
|
24
|
-
// components
|
|
25
|
-
export { Stack } from './layouts/Stack'
|
|
26
|
-
export { Tabs } from './layouts/Tabs'
|
|
10
|
+
// hooks
|
|
11
|
+
export { useIsFocused } from '@react-navigation/core'
|
|
12
|
+
// re-export
|
|
13
|
+
export * from '@vxrn/universal-color-scheme'
|
|
27
14
|
// TODO breaking due to react-native-gesture-handler
|
|
28
15
|
// export { Drawer } from './layouts/Drawer'
|
|
29
16
|
// export { Unmatched } from './fallbackViews/Unmatched'
|
|
30
17
|
export { SafeAreaView } from 'react-native-safe-area-context'
|
|
31
|
-
export {
|
|
32
|
-
export { ErrorBoundary } from './views/ErrorBoundary'
|
|
33
|
-
export { ScrollBehavior } from './views/ScrollBehavior'
|
|
34
|
-
export { LoadProgressBar } from './views/LoadProgressBar'
|
|
35
|
-
export { Link } from './link/Link'
|
|
36
|
-
export { Redirect } from './link/Redirect'
|
|
37
|
-
export { Head } from './head'
|
|
18
|
+
export { onClientLoaderResolve } from './clientLoaderResolver'
|
|
38
19
|
|
|
39
|
-
//
|
|
40
|
-
export {
|
|
41
|
-
export {
|
|
42
|
-
export {
|
|
20
|
+
// middleware
|
|
21
|
+
export { createMiddleware, type Middleware } from './createMiddleware'
|
|
22
|
+
export { getURL } from './getURL'
|
|
23
|
+
export { Head } from './head'
|
|
24
|
+
// for easier expo-router migration
|
|
43
25
|
export {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
26
|
+
useActiveParams,
|
|
27
|
+
useGlobalSearchParams,
|
|
28
|
+
useLocalSearchParams,
|
|
47
29
|
useNavigationContainerRef,
|
|
48
30
|
useParams,
|
|
49
|
-
|
|
50
|
-
useSegments,
|
|
31
|
+
usePathname,
|
|
51
32
|
useRootNavigationState,
|
|
33
|
+
useRouter,
|
|
34
|
+
useSegments,
|
|
35
|
+
useUnstableGlobalHref,
|
|
52
36
|
} from './hooks'
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
} from './hooks'
|
|
58
|
-
|
|
37
|
+
export { href } from './href'
|
|
38
|
+
// components
|
|
39
|
+
export { Stack } from './layouts/Stack'
|
|
40
|
+
export { Tabs } from './layouts/Tabs'
|
|
59
41
|
// utilities
|
|
60
42
|
export { withLayoutContext } from './layouts/withLayoutContext'
|
|
61
|
-
export {
|
|
62
|
-
export {
|
|
63
|
-
export {
|
|
64
|
-
export {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
export {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
export * from '
|
|
71
|
-
|
|
43
|
+
export { Link } from './link/Link'
|
|
44
|
+
export { Redirect } from './link/Redirect'
|
|
45
|
+
export { useLinkTo } from './link/useLinkTo'
|
|
46
|
+
export { Root } from './Root'
|
|
47
|
+
// internals
|
|
48
|
+
export { render } from './render'
|
|
49
|
+
export { createRoute, route } from './router/createRoute'
|
|
50
|
+
// base
|
|
51
|
+
export { router } from './router/imperative-api'
|
|
52
|
+
export * as routerStore from './router/router'
|
|
53
|
+
export { useNavigation } from './router/useNavigation'
|
|
54
|
+
export type { Endpoint, LoaderProps } from './types'
|
|
72
55
|
// React Navigation
|
|
73
56
|
export { useFocusEffect } from './useFocusEffect'
|
|
74
|
-
export { useNavigation } from './router/useNavigation'
|
|
75
57
|
export { useLoader } from './useLoader'
|
|
58
|
+
export { type ServerHeadInsertionCallback, useServerHeadInsertion } from './useServerHeadInsertion'
|
|
59
|
+
export { isResponse } from './utils/isResponse'
|
|
60
|
+
export { redirect } from './utils/redirect'
|
|
61
|
+
export { ErrorBoundary } from './views/ErrorBoundary'
|
|
62
|
+
export { LoadProgressBar } from './views/LoadProgressBar'
|
|
63
|
+
export { Navigator, Slot } from './views/Navigator'
|
|
64
|
+
export { ScrollBehavior } from './views/ScrollBehavior'
|
|
65
|
+
// server
|
|
66
|
+
export { getServerData, setResponseHeaders, setServerData } from './vite/one-server-only'
|
package/src/interfaces/router.ts
CHANGED
|
@@ -3,8 +3,8 @@ import type {
|
|
|
3
3
|
NavigationState,
|
|
4
4
|
PartialState,
|
|
5
5
|
} from '@react-navigation/core'
|
|
6
|
-
import type { ReactNode } from 'react'
|
|
7
|
-
import type {
|
|
6
|
+
import type { JSX, ReactNode } from 'react'
|
|
7
|
+
import type { GestureResponderEvent, PressableProps, TextProps } from 'react-native'
|
|
8
8
|
|
|
9
9
|
export namespace OneRouter {
|
|
10
10
|
export interface __routes<T extends string = string> extends Record<string, unknown> {}
|
package/src/layouts/Drawer.tsx
CHANGED
package/src/layouts/Stack.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ParamListBase, StackNavigationState } from '@react-navigation/native'
|
|
2
2
|
import {
|
|
3
|
+
createNativeStackNavigator,
|
|
3
4
|
type NativeStackNavigationEventMap,
|
|
4
5
|
type NativeStackNavigationOptions,
|
|
5
|
-
createNativeStackNavigator,
|
|
6
6
|
} from '@react-navigation/native-stack'
|
|
7
7
|
|
|
8
8
|
import { withLayoutContext } from './withLayoutContext'
|
package/src/layouts/Tabs.tsx
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
-
createBottomTabNavigator,
|
|
3
|
-
type BottomTabNavigationEventMap,
|
|
4
|
-
type BottomTabNavigationOptions,
|
|
5
2
|
BottomTabBar,
|
|
6
3
|
type BottomTabBarProps,
|
|
4
|
+
type BottomTabNavigationEventMap,
|
|
5
|
+
type BottomTabNavigationOptions,
|
|
6
|
+
createBottomTabNavigator,
|
|
7
7
|
} from '@react-navigation/bottom-tabs'
|
|
8
8
|
import type { ParamListBase, TabNavigationState } from '@react-navigation/native'
|
|
9
9
|
import { Platform, Pressable } from 'react-native'
|
|
@@ -68,11 +68,11 @@ export const Tabs = withLayoutContext<
|
|
|
68
68
|
Platform.OS === 'web' ? props.children : <Pressable>{props.children}</Pressable>
|
|
69
69
|
return (
|
|
70
70
|
<Link
|
|
71
|
-
{...props}
|
|
71
|
+
{...(props as any)}
|
|
72
72
|
style={[{ display: 'flex' }, props.style]}
|
|
73
73
|
href={href}
|
|
74
74
|
asChild={Platform.OS !== 'web'}
|
|
75
|
-
// biome-ignore lint/correctness/noChildrenProp:
|
|
75
|
+
// biome-ignore lint/correctness/noChildrenProp: children prop needed for asChild pattern
|
|
76
76
|
children={children}
|
|
77
77
|
/>
|
|
78
78
|
)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { EventMapBase, NavigationState } from '@react-navigation/native'
|
|
2
2
|
import React from 'react'
|
|
3
3
|
import { useContextKey } from '../router/Route'
|
|
4
|
+
import { type ScreenProps, useSortedScreens } from '../router/useScreens'
|
|
4
5
|
import type { PickPartial } from '../types'
|
|
5
|
-
import { useSortedScreens, type ScreenProps } from '../router/useScreens'
|
|
6
|
-
import { Screen } from '../views/Screen'
|
|
7
6
|
import { withStaticProperties } from '../utils/withStaticProperties'
|
|
7
|
+
import { Screen } from '../views/Screen'
|
|
8
8
|
|
|
9
9
|
export function useFilterScreenChildren(
|
|
10
10
|
children: React.ReactNode,
|
|
@@ -22,19 +22,28 @@ export function useFilterScreenChildren(
|
|
|
22
22
|
|
|
23
23
|
const screens = React.Children.map(children, (child) => {
|
|
24
24
|
if (React.isValidElement(child) && child && child.type === Screen) {
|
|
25
|
-
if (
|
|
25
|
+
if (
|
|
26
|
+
typeof child.props === 'object' &&
|
|
27
|
+
child.props &&
|
|
28
|
+
'name' in child.props &&
|
|
29
|
+
!child.props.name
|
|
30
|
+
) {
|
|
26
31
|
throw new Error(
|
|
27
32
|
`<Screen /> component in \`default export\` at \`app${contextKey}/_layout\` must have a \`name\` prop when used as a child of a Layout Route.`
|
|
28
33
|
)
|
|
29
34
|
}
|
|
30
35
|
if (process.env.NODE_ENV !== 'production') {
|
|
31
|
-
if (
|
|
36
|
+
if (
|
|
37
|
+
['children', 'component', 'getComponent'].some(
|
|
38
|
+
(key) => child.props && typeof child.props === 'object' && key in child.props
|
|
39
|
+
)
|
|
40
|
+
) {
|
|
32
41
|
throw new Error(
|
|
33
42
|
`<Screen /> component in \`default export\` at \`app${contextKey}/_layout\` must not have a \`children\`, \`component\`, or \`getComponent\` prop when used as a child of a Layout Route`
|
|
34
43
|
)
|
|
35
44
|
}
|
|
36
45
|
}
|
|
37
|
-
return child.props
|
|
46
|
+
return child.props as ScreenProps
|
|
38
47
|
}
|
|
39
48
|
|
|
40
49
|
if (isCustomNavigator) {
|
|
@@ -44,6 +53,8 @@ export function useFilterScreenChildren(
|
|
|
44
53
|
`Layout children must be of type Screen, all other children are ignored. To use custom children, create a custom <Layout />. Update Layout Route at: "app${contextKey}/_layout"`
|
|
45
54
|
)
|
|
46
55
|
}
|
|
56
|
+
|
|
57
|
+
return null
|
|
47
58
|
})?.filter(Boolean)
|
|
48
59
|
|
|
49
60
|
// Add an assertion for development
|
|
@@ -83,8 +94,8 @@ export function withLayoutContext<
|
|
|
83
94
|
contextKey,
|
|
84
95
|
})
|
|
85
96
|
|
|
86
|
-
const processed = processor ? processor(screens ?? []) : screens
|
|
87
|
-
const sorted = useSortedScreens(processed ?? [], {
|
|
97
|
+
const processed = processor ? processor(screens ?? ([] as any)) : screens
|
|
98
|
+
const sorted = useSortedScreens((processed ?? []) as any, {
|
|
88
99
|
onlyMatching: true,
|
|
89
100
|
})
|
|
90
101
|
|
package/src/link/Link.tsx
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// `to` / `action` support removed.
|
|
3
3
|
import { Slot } from '@radix-ui/react-slot'
|
|
4
4
|
import * as React from 'react'
|
|
5
|
-
import { Platform, Text, type
|
|
5
|
+
import { type GestureResponderEvent, Platform, Text, type TextProps } from 'react-native'
|
|
6
6
|
|
|
7
7
|
import type { OneRouter } from '../interfaces/router'
|
|
8
8
|
import { resolveHref } from './href'
|
package/src/link/linking.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { adjustPathname } from '../fork/extractPathFromURL'
|
|
|
5
5
|
import { getPathFromState } from '../fork/getPathFromState'
|
|
6
6
|
import { getStateFromPath } from '../fork/getStateFromPath'
|
|
7
7
|
|
|
8
|
-
// @ts-
|
|
8
|
+
// @ts-expect-error
|
|
9
9
|
const isExpoGo = typeof expo !== 'undefined' && globalThis.expo?.modules?.ExpoGo
|
|
10
10
|
|
|
11
11
|
// A custom getInitialURL is used on native to ensure the app always starts at
|
package/src/link/useLinkTo.tsx
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type * as React from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { type GestureResponderEvent, Platform } from 'react-native'
|
|
3
3
|
|
|
4
4
|
import { appendBaseUrl } from '../fork/getPathFromState-mods'
|
|
5
|
-
import { useOneRouter } from '../router/router'
|
|
6
5
|
import { stripGroupSegmentsFromPath } from '../router/matchers'
|
|
6
|
+
import { useOneRouter } from '../router/router'
|
|
7
7
|
|
|
8
8
|
function eventShouldPreventDefault(
|
|
9
9
|
e: React.MouseEvent<HTMLAnchorElement, MouseEvent> | GestureResponderEvent
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type NavigationProp, type NavigationState, useNavigation } from '@react-navigation/native'
|
|
2
2
|
import { useCallback, useEffect, useRef, useState } from 'react'
|
|
3
3
|
|
|
4
4
|
import { useOneRouter } from '../router/router'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { metroPlugin } from '@vxrn/vite-plugin-metro'
|
|
2
1
|
import module from 'node:module'
|
|
3
2
|
import path from 'node:path'
|
|
4
|
-
import
|
|
3
|
+
import type { metroPlugin } from '@vxrn/vite-plugin-metro'
|
|
5
4
|
import mm from 'micromatch'
|
|
5
|
+
import tsconfigPaths from 'tsconfig-paths'
|
|
6
6
|
import {
|
|
7
7
|
API_ROUTE_GLOB_PATTERN,
|
|
8
8
|
ROUTE_NATIVE_EXCLUSION_GLOB_PATTERNS,
|
|
@@ -44,6 +44,7 @@ export function getViteMetroPluginOptions({
|
|
|
44
44
|
]
|
|
45
45
|
|
|
46
46
|
const supportedRegexMustStartWith = String.raw`^(?:(?:^|\/|(?:(?:(?!(?:^|\/)\.).)*?)\/)(?!\.)(?=.)[^/]*?`
|
|
47
|
+
// biome-ignore lint/complexity/noUselessStringRaw: keep original code
|
|
47
48
|
const supportedRegexMustEndWith = String.raw`)$`
|
|
48
49
|
|
|
49
50
|
const negativeLookaheadGroups = excludeRes.map((re, i) => {
|
|
@@ -77,6 +78,7 @@ export function getViteMetroPluginOptions({
|
|
|
77
78
|
reSource.length - supportedRegexMustEndWith.length
|
|
78
79
|
)
|
|
79
80
|
|
|
81
|
+
// biome-ignore lint/complexity/noUselessStringRaw: keep original code
|
|
80
82
|
return String.raw`(?:.*${rePart})`
|
|
81
83
|
})
|
|
82
84
|
|
package/src/polyfills-mobile.ts
CHANGED
|
@@ -6,6 +6,7 @@ globalThis['global'] = globalThis
|
|
|
6
6
|
// --------------- structuredClone -------------------
|
|
7
7
|
|
|
8
8
|
import structuredClone from '@ungap/structured-clone'
|
|
9
|
+
|
|
9
10
|
globalThis['structuredClone'] ||= structuredClone
|
|
10
11
|
|
|
11
12
|
// --------------- structuredClone -------------------
|
|
@@ -31,6 +32,5 @@ import 'core-js/actual/url-search-params'
|
|
|
31
32
|
// --------------- Promise.withResolver -------------------
|
|
32
33
|
|
|
33
34
|
import { promiseWithResolvers } from './utils/promiseWithResolvers'
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
(Promise.withResolvers = promiseWithResolvers)
|
|
35
|
+
|
|
36
|
+
Promise.withResolvers || (Promise.withResolvers = promiseWithResolvers)
|
package/src/render.tsx
CHANGED
|
@@ -31,7 +31,6 @@ export function render(element: React.ReactNode) {
|
|
|
31
31
|
console.error(...args)
|
|
32
32
|
console.groupEnd()
|
|
33
33
|
},
|
|
34
|
-
// @ts-expect-error
|
|
35
34
|
onUncaughtError(...args) {
|
|
36
35
|
console.error(`[one] onUncaughtError`, ...args)
|
|
37
36
|
},
|
|
@@ -43,7 +42,9 @@ export function render(element: React.ReactNode) {
|
|
|
43
42
|
})
|
|
44
43
|
}
|
|
45
44
|
|
|
46
|
-
listeners.forEach((cb) =>
|
|
45
|
+
listeners.forEach((cb) => {
|
|
46
|
+
cb()
|
|
47
|
+
})
|
|
47
48
|
didRender = true
|
|
48
49
|
}
|
|
49
50
|
|
package/src/router/Route.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { createContext,
|
|
1
|
+
import React, { createContext, type ReactNode, useContext } from 'react'
|
|
2
2
|
import type { ErrorBoundaryProps } from '../views/Try'
|
|
3
3
|
import type { One } from '../vite/types'
|
|
4
4
|
import { getContextKey } from './matchers'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { useStateForPath } from '@react-navigation/core'
|
|
1
2
|
import type React from 'react'
|
|
2
3
|
import { createContext, useRef } from 'react'
|
|
3
4
|
import type { UrlObject } from './getNormalizedStatePath'
|
|
4
|
-
import {
|
|
5
|
-
import { getRouteInfo } from './router'
|
|
5
|
+
import { getRouteInfo } from './getRouteInfo'
|
|
6
6
|
|
|
7
7
|
export const RouteInfoContext = createContext<UrlObject | undefined>(undefined)
|
|
8
8
|
|
|
@@ -44,7 +44,7 @@ export function RouteInfoContextProvider({ children }: { children: React.ReactNo
|
|
|
44
44
|
const lastStateRef = useRef<typeof currentState>(undefined)
|
|
45
45
|
const cachedRouteInfoValueRef = useRef<UrlObject | undefined>(undefined)
|
|
46
46
|
|
|
47
|
-
const lazilyCalculatedRouteInfo = useRef<UrlObject | undefined>()
|
|
47
|
+
const lazilyCalculatedRouteInfo = useRef<UrlObject | undefined>(undefined)
|
|
48
48
|
|
|
49
49
|
if (currentState && currentStateRef.current !== currentState) {
|
|
50
50
|
lazilyCalculatedRouteInfo.current = makeLazilyCalculatedRouteInfo({
|
|
@@ -21,7 +21,7 @@ export type FoundRootHTML = {
|
|
|
21
21
|
|
|
22
22
|
export function filterRootHTML(el: React.ReactNode): FoundRootHTML {
|
|
23
23
|
let htmlProps: Props | undefined
|
|
24
|
-
let bodyProps:
|
|
24
|
+
let bodyProps: Props | undefined
|
|
25
25
|
let head: React.ReactElement | undefined
|
|
26
26
|
|
|
27
27
|
function traverse(element: React.ReactNode) {
|
|
@@ -36,9 +36,16 @@ export function filterRootHTML(el: React.ReactNode): FoundRootHTML {
|
|
|
36
36
|
const { type, props } = reactElement
|
|
37
37
|
|
|
38
38
|
if (type === 'html') {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
if (
|
|
40
|
+
reactElement.props &&
|
|
41
|
+
typeof reactElement.props === 'object' &&
|
|
42
|
+
'children' in reactElement.props
|
|
43
|
+
) {
|
|
44
|
+
const { children, ...restProps } = reactElement.props
|
|
45
|
+
htmlProps = restProps
|
|
46
|
+
return traverse(children as React.ReactNode)
|
|
47
|
+
}
|
|
48
|
+
return null
|
|
42
49
|
}
|
|
43
50
|
|
|
44
51
|
if (type === 'head') {
|
|
@@ -47,9 +54,16 @@ export function filterRootHTML(el: React.ReactNode): FoundRootHTML {
|
|
|
47
54
|
}
|
|
48
55
|
|
|
49
56
|
if (type === 'body') {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
57
|
+
if (
|
|
58
|
+
reactElement.props &&
|
|
59
|
+
typeof reactElement.props === 'object' &&
|
|
60
|
+
'children' in reactElement.props
|
|
61
|
+
) {
|
|
62
|
+
const { children, ...restProps } = reactElement.props
|
|
63
|
+
bodyProps = restProps
|
|
64
|
+
return children as React.ReactNode
|
|
65
|
+
}
|
|
66
|
+
return null
|
|
53
67
|
}
|
|
54
68
|
|
|
55
69
|
if (process.env.TAMAGUI_TARGET === 'native') {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { getActionFromState, type LinkingOptions } from '@react-navigation/native'
|
|
2
|
-
import type { RouteNode } from './Route'
|
|
3
2
|
import type { State } from '../fork/getPathFromState'
|
|
4
3
|
import { getReactNavigationConfig, type Screen } from '../getReactNavigationConfig'
|
|
5
4
|
import {
|
|
@@ -8,6 +7,7 @@ import {
|
|
|
8
7
|
getPathFromState,
|
|
9
8
|
getStateFromPath,
|
|
10
9
|
} from '../link/linking'
|
|
10
|
+
import type { RouteNode } from './Route'
|
|
11
11
|
|
|
12
12
|
export function getNavigationConfig(
|
|
13
13
|
routes: RouteNode,
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { getPathFromState as originalGetPathFromState } from '@react-navigation/core'
|
|
2
|
+
import { getPathDataFromState, type State } from '../fork/getPathFromState'
|
|
3
|
+
import { stripBaseUrl } from '../fork/getStateFromPath-mods'
|
|
4
|
+
import type { OneRouter } from '../interfaces/router'
|
|
5
|
+
import { getNormalizedStatePath, type UrlObject } from './getNormalizedStatePath'
|
|
6
|
+
import { isIndexPath } from './isIndexPath'
|
|
7
|
+
import { getLinking } from './linkingConfig'
|
|
8
|
+
|
|
9
|
+
export function getRouteInfo(state: OneRouter.ResultState) {
|
|
10
|
+
return getRouteInfoFromState(
|
|
11
|
+
(state: Parameters<typeof originalGetPathFromState>[0], asPath: boolean) => {
|
|
12
|
+
return getPathDataFromState(state, {
|
|
13
|
+
screens: [],
|
|
14
|
+
...getLinking()?.config,
|
|
15
|
+
preserveDynamicRoutes: asPath,
|
|
16
|
+
preserveGroups: asPath,
|
|
17
|
+
})
|
|
18
|
+
},
|
|
19
|
+
state
|
|
20
|
+
)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function getRouteInfoFromState(
|
|
24
|
+
getPathFromState: (state: State, asPath: boolean) => { path: string; params: any },
|
|
25
|
+
state: State,
|
|
26
|
+
baseUrl?: string
|
|
27
|
+
): UrlObject {
|
|
28
|
+
const { path } = getPathFromState(state, false)
|
|
29
|
+
const qualified = getPathFromState(state, true)
|
|
30
|
+
|
|
31
|
+
return {
|
|
32
|
+
unstable_globalHref: path,
|
|
33
|
+
pathname: stripBaseUrl(path, baseUrl).split('?')[0],
|
|
34
|
+
isIndex: isIndexPath(state),
|
|
35
|
+
...getNormalizedStatePath(qualified, baseUrl),
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { State } from '../fork/getPathFromState'
|
|
2
|
+
|
|
3
|
+
type RouteLikeTree = { name: string; state?: { routes?: RouteLikeTree[] } }
|
|
4
|
+
|
|
5
|
+
export function isIndexPath(state: State) {
|
|
6
|
+
const route = getActualLastRoute(state.routes[state.index ?? state.routes.length - 1])
|
|
7
|
+
|
|
8
|
+
if (route.state) {
|
|
9
|
+
return isIndexPath(route.state)
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
if (route.name === 'index') {
|
|
13
|
+
return true
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
if (route.params && 'screen' in route.params) {
|
|
17
|
+
return route.params.screen === 'index'
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if (route.name.match(/.+\/index$/)) {
|
|
21
|
+
return true
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return false
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function getActualLastRoute<A extends RouteLikeTree>(routeLike: A): A {
|
|
28
|
+
if (routeLike.name[0] === '(' && routeLike.state?.routes) {
|
|
29
|
+
const routes = routeLike.state.routes
|
|
30
|
+
return getActualLastRoute(routes[routes.length - 1]) as any
|
|
31
|
+
}
|
|
32
|
+
return routeLike
|
|
33
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { OneRouter } from '../interfaces/router'
|
|
2
|
+
import { getLinkingConfig as createLinkingConfig, type OneLinkingOptions } from './getLinkingConfig'
|
|
3
|
+
import type { RouteNode } from './Route'
|
|
4
|
+
|
|
5
|
+
let linkingConfig: OneLinkingOptions | undefined
|
|
6
|
+
|
|
7
|
+
export function getLinking() {
|
|
8
|
+
return linkingConfig
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function setLinking(_: OneLinkingOptions) {
|
|
12
|
+
linkingConfig = _
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function resetLinking() {
|
|
16
|
+
linkingConfig = undefined
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function setupLinking(
|
|
20
|
+
routeNode: RouteNode | null,
|
|
21
|
+
initialLocation?: URL
|
|
22
|
+
): OneRouter.ResultState | undefined {
|
|
23
|
+
let initialState: OneRouter.ResultState | undefined
|
|
24
|
+
|
|
25
|
+
if (routeNode) {
|
|
26
|
+
linkingConfig = createLinkingConfig(routeNode)
|
|
27
|
+
|
|
28
|
+
if (initialLocation) {
|
|
29
|
+
linkingConfig.getInitialURL = () => initialLocation.toString()
|
|
30
|
+
initialState = linkingConfig.getStateFromPath?.(
|
|
31
|
+
initialLocation.pathname + (initialLocation.search || ''),
|
|
32
|
+
linkingConfig.config
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return initialState
|
|
38
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { describe,
|
|
1
|
+
import { describe, expect, it } from 'vitest'
|
|
2
2
|
import {
|
|
3
|
-
matchDynamicName,
|
|
4
|
-
matchDeepDynamicRouteName,
|
|
5
3
|
getNameFromFilePath,
|
|
4
|
+
matchArrayGroupName,
|
|
5
|
+
matchDeepDynamicRouteName,
|
|
6
|
+
matchDynamicName,
|
|
6
7
|
matchGroupName,
|
|
7
8
|
stripGroupSegmentsFromPath,
|
|
8
|
-
matchArrayGroupName,
|
|
9
9
|
} from './matchers'
|
|
10
10
|
|
|
11
11
|
describe(stripGroupSegmentsFromPath, () => {
|
package/src/router/matchers.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export function matchDynamicName(name: string): string | undefined {
|
|
3
3
|
// Don't match `...` or `[` or `]` inside the brackets
|
|
4
4
|
// eslint-disable-next-line no-useless-escape
|
|
5
|
-
return name.match(/^\[([^[\](
|
|
5
|
+
return name.match(/^\[([^[\](?:...)]+?)\]$/)?.[1]
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
/** Match `[...page]` -> `page` */
|
|
@@ -22,7 +22,7 @@ export function matchGroupName(name: string): string | undefined {
|
|
|
22
22
|
|
|
23
23
|
/** Match the first array group name `(a,b,c)/(d,c)` -> `'a,b,c'` */
|
|
24
24
|
export function matchArrayGroupName(name: string) {
|
|
25
|
-
return name.match(/(?:[^\\(\\)])*?\(?([
|
|
25
|
+
return name.match(/(?:[^\\(\\)])*?\(?([^\\/()]+,[^\\/()]+)\)?.*?$/)?.[1]
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export function getNameFromFilePath(name: string): string {
|