one 1.1.298 → 1.1.300
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/cleanUrl.js +1 -1
- package/dist/cjs/cleanUrl.js.map +1 -1
- package/dist/cjs/cleanUrl.native.js +1 -1
- package/dist/cjs/cleanUrl.native.js.map +1 -1
- package/dist/cjs/cli/runAndroid.js +34 -0
- package/dist/cjs/cli/runAndroid.js.map +6 -0
- package/dist/cjs/cli/runAndroid.native.js +39 -0
- package/dist/cjs/cli/runAndroid.native.js.map +6 -0
- package/dist/cjs/cli/runIos.js +34 -0
- package/dist/cjs/cli/runIos.js.map +6 -0
- package/dist/cjs/cli/runIos.native.js +39 -0
- package/dist/cjs/cli/runIos.native.js.map +6 -0
- package/dist/cjs/cli.js +23 -1
- package/dist/cjs/cli.js.map +1 -1
- package/dist/cjs/cli.native.js +25 -1
- package/dist/cjs/cli.native.js.map +2 -2
- package/dist/cjs/createHandleRequest.js +2 -2
- package/dist/cjs/createHandleRequest.js.map +1 -1
- package/dist/cjs/createHandleRequest.native.js +2 -2
- package/dist/cjs/createHandleRequest.native.js.map +2 -2
- package/dist/cjs/vite/createFileSystemRouter.js +1 -1
- package/dist/cjs/vite/createFileSystemRouter.js.map +1 -1
- package/dist/cjs/vite/createFileSystemRouter.native.js +1 -1
- package/dist/cjs/vite/createFileSystemRouter.native.js.map +1 -1
- package/dist/cjs/vite/replaceLoader.js +7 -1
- package/dist/cjs/vite/replaceLoader.js.map +1 -1
- package/dist/cjs/vite/replaceLoader.native.js +7 -1
- package/dist/cjs/vite/replaceLoader.native.js.map +1 -1
- package/dist/esm/Root.native.js +110 -104
- package/dist/esm/Root.native.js.map +6 -1
- package/dist/esm/Route.native.js +12 -10
- package/dist/esm/Route.native.js.map +6 -1
- package/dist/esm/cleanUrl.js +1 -1
- package/dist/esm/cleanUrl.js.map +1 -1
- package/dist/esm/cleanUrl.mjs +1 -1
- package/dist/esm/cleanUrl.mjs.map +1 -1
- package/dist/esm/cleanUrl.native.js +13 -14
- package/dist/esm/cleanUrl.native.js.map +6 -1
- package/dist/esm/cli/label-process.native.js +5 -4
- package/dist/esm/cli/label-process.native.js.map +6 -1
- package/dist/esm/cli/main.native.js +8 -13
- package/dist/esm/cli/main.native.js.map +6 -1
- package/dist/esm/cli/prebuild.native.js +5 -5
- package/dist/esm/cli/prebuild.native.js.map +6 -1
- package/dist/esm/cli/run.native.js +21 -28
- package/dist/esm/cli/run.native.js.map +6 -1
- package/dist/esm/cli/runAndroid.js +10 -0
- package/dist/esm/cli/runAndroid.js.map +6 -0
- package/dist/esm/cli/runAndroid.mjs +10 -0
- package/dist/esm/cli/runAndroid.mjs.map +1 -0
- package/dist/esm/cli/runAndroid.native.js +10 -0
- package/dist/esm/cli/runAndroid.native.js.map +6 -0
- package/dist/esm/cli/runIos.js +10 -0
- package/dist/esm/cli/runIos.js.map +6 -0
- package/dist/esm/cli/runIos.mjs +10 -0
- package/dist/esm/cli/runIos.mjs.map +1 -0
- package/dist/esm/cli/runIos.native.js +10 -0
- package/dist/esm/cli/runIos.native.js.map +6 -0
- package/dist/esm/cli.js +23 -1
- package/dist/esm/cli.js.map +1 -1
- package/dist/esm/cli.mjs +33 -1
- package/dist/esm/cli.mjs.map +1 -1
- package/dist/esm/cli.native.js +143 -148
- package/dist/esm/cli.native.js.map +6 -1
- package/dist/esm/clientLoaderResolver.native.js +9 -6
- package/dist/esm/clientLoaderResolver.native.js.map +6 -1
- package/dist/esm/config.native.js +12 -11
- package/dist/esm/config.native.js.map +6 -1
- package/dist/esm/constants.native.js +7 -5
- package/dist/esm/constants.native.js.map +6 -1
- package/dist/esm/createApp.native.js +13 -9
- package/dist/esm/createApp.native.js.map +6 -1
- package/dist/esm/createHandleRequest.js +2 -2
- package/dist/esm/createHandleRequest.js.map +1 -1
- package/dist/esm/createHandleRequest.mjs +2 -2
- package/dist/esm/createHandleRequest.mjs.map +1 -1
- package/dist/esm/createHandleRequest.native.js +57 -66
- package/dist/esm/createHandleRequest.native.js.map +6 -1
- package/dist/esm/createRoute.native.js +16 -16
- package/dist/esm/createRoute.native.js.map +6 -1
- package/dist/esm/fallbackViews/Sitemap.native.js +6 -3
- package/dist/esm/fallbackViews/Sitemap.native.js.map +6 -1
- package/dist/esm/fallbackViews/Unmatched.native.js +5 -3
- package/dist/esm/fallbackViews/Unmatched.native.js.map +6 -1
- package/dist/esm/fork/NavigationContainer.native.js +24 -31
- package/dist/esm/fork/NavigationContainer.native.js.map +6 -1
- package/dist/esm/fork/createMemoryHistory.native.js +99 -115
- package/dist/esm/fork/createMemoryHistory.native.js.map +6 -1
- package/dist/esm/fork/extractPathFromURL.native.js +16 -15
- package/dist/esm/fork/extractPathFromURL.native.js.map +6 -1
- package/dist/esm/fork/findFocusedRoute.native.js +6 -5
- package/dist/esm/fork/findFocusedRoute.native.js.map +6 -1
- package/dist/esm/fork/getPathFromState.native.js +127 -140
- package/dist/esm/fork/getPathFromState.native.js.map +6 -1
- package/dist/esm/fork/getStateFromPath.native.js +292 -288
- package/dist/esm/fork/getStateFromPath.native.js.map +6 -1
- package/dist/esm/fork/useLinking.native.js +70 -61
- package/dist/esm/fork/useLinking.native.js.map +6 -1
- package/dist/esm/fork/validatePathConfig.native.js +15 -9
- package/dist/esm/fork/validatePathConfig.native.js.map +6 -1
- package/dist/esm/getLinkingConfig.native.js +11 -6
- package/dist/esm/getLinkingConfig.native.js.map +6 -1
- package/dist/esm/getReactNavigationConfig.native.js +28 -20
- package/dist/esm/getReactNavigationConfig.native.js.map +6 -1
- package/dist/esm/getRoutes.native.js +249 -229
- package/dist/esm/getRoutes.native.js.map +6 -1
- package/dist/esm/getURL.native.js +4 -4
- package/dist/esm/getURL.native.js.map +6 -1
- package/dist/esm/head/Head.android.js +5 -3
- package/dist/esm/head/Head.android.js.map +6 -1
- package/dist/esm/head/Head.ios.js +144 -132
- package/dist/esm/head/Head.ios.js.map +6 -1
- package/dist/esm/head/Head.native.js +7 -7
- package/dist/esm/head/Head.native.js.map +6 -1
- package/dist/esm/head/HeadModule.native.js +6 -6
- package/dist/esm/head/HeadModule.native.js.map +6 -1
- package/dist/esm/head/index.native.js +2 -2
- package/dist/esm/head/index.native.js.map +6 -1
- package/dist/esm/head/types.native.js +1 -2
- package/dist/esm/head/types.native.js.map +6 -1
- package/dist/esm/head/url.native.js +10 -8
- package/dist/esm/head/url.native.js.map +6 -1
- package/dist/esm/hooks.native.js +53 -34
- package/dist/esm/hooks.native.js.map +6 -1
- package/dist/esm/imperative-api.native.js +9 -6
- package/dist/esm/imperative-api.native.js.map +6 -1
- package/dist/esm/import-mode/index.android.js +4 -3
- package/dist/esm/import-mode/index.android.js.map +6 -1
- package/dist/esm/import-mode/index.ios.js +4 -3
- package/dist/esm/import-mode/index.ios.js.map +6 -1
- package/dist/esm/import-mode/index.native.js +3 -1
- package/dist/esm/import-mode/index.native.js.map +6 -1
- package/dist/esm/index.native.js +65 -27
- package/dist/esm/index.native.js.map +6 -1
- package/dist/esm/interfaces/router.native.js +4 -2
- package/dist/esm/interfaces/router.native.js.map +6 -1
- package/dist/esm/layouts/Drawer.native.js +7 -6
- package/dist/esm/layouts/Drawer.native.js.map +6 -1
- package/dist/esm/layouts/Stack.native.js +7 -6
- package/dist/esm/layouts/Stack.native.js.map +6 -1
- package/dist/esm/layouts/Tabs.native.js +42 -39
- package/dist/esm/layouts/Tabs.native.js.map +6 -1
- package/dist/esm/layouts/withLayoutContext.native.js +51 -48
- package/dist/esm/layouts/withLayoutContext.native.js.map +6 -1
- package/dist/esm/link/Link.native.js +62 -53
- package/dist/esm/link/Link.native.js.map +6 -1
- package/dist/esm/link/Redirect.native.js +8 -9
- package/dist/esm/link/Redirect.native.js.map +6 -1
- package/dist/esm/link/href.native.js +28 -27
- package/dist/esm/link/href.native.js.map +6 -1
- package/dist/esm/link/linking.native.js +51 -40
- package/dist/esm/link/linking.native.js.map +6 -1
- package/dist/esm/link/path.native.js +28 -19
- package/dist/esm/link/path.native.js.map +6 -1
- package/dist/esm/link/useLinkTo.native.js +22 -20
- package/dist/esm/link/useLinkTo.native.js.map +6 -1
- package/dist/esm/link/useLoadedNavigation.native.js +30 -23
- package/dist/esm/link/useLoadedNavigation.native.js.map +6 -1
- package/dist/esm/matchers.native.js +16 -3
- package/dist/esm/matchers.native.js.map +6 -1
- package/dist/esm/platform.native.js +4 -2
- package/dist/esm/platform.native.js.map +6 -1
- package/dist/esm/polyfills-mobile.native.js +4 -5
- package/dist/esm/polyfills-mobile.native.js.map +6 -1
- package/dist/esm/polyfills-server.native.js +1 -1
- package/dist/esm/polyfills-server.native.js.map +6 -1
- package/dist/esm/render.native.js +3 -1
- package/dist/esm/render.native.js.map +6 -1
- package/dist/esm/router/RouterStore.native.js +1 -2
- package/dist/esm/router/RouterStore.native.js.map +6 -1
- package/dist/esm/router/constants.native.js +4 -2
- package/dist/esm/router/constants.native.js.map +6 -1
- package/dist/esm/router/getNormalizedStatePath.native.js +18 -17
- package/dist/esm/router/getNormalizedStatePath.native.js.map +6 -1
- package/dist/esm/router/lastAction.native.js +10 -9
- package/dist/esm/router/lastAction.native.js.map +6 -1
- package/dist/esm/router/router.native.js +135 -114
- package/dist/esm/router/router.native.js.map +6 -1
- package/dist/esm/router/serverLocationContext.native.js +4 -2
- package/dist/esm/router/serverLocationContext.native.js.map +6 -1
- package/dist/esm/router/useInitializeOneRouter.native.js +8 -5
- package/dist/esm/router/useInitializeOneRouter.native.js.map +6 -1
- package/dist/esm/serve.native.js +77 -104
- package/dist/esm/serve.native.js.map +6 -1
- package/dist/esm/server/createRoutesManifest.native.js +14 -11
- package/dist/esm/server/createRoutesManifest.native.js.map +6 -1
- package/dist/esm/server/getServerManifest.native.js +61 -67
- package/dist/esm/server/getServerManifest.native.js.map +6 -1
- package/dist/esm/server-render.native.js +9 -10
- package/dist/esm/server-render.native.js.map +6 -1
- package/dist/esm/sortRoutes.native.js +27 -17
- package/dist/esm/sortRoutes.native.js.map +6 -1
- package/dist/esm/typed-routes/generateRouteTypes.native.js +10 -11
- package/dist/esm/typed-routes/generateRouteTypes.native.js.map +6 -1
- package/dist/esm/typed-routes/getTypedRoutesDeclarationFile.native.js +38 -37
- package/dist/esm/typed-routes/getTypedRoutesDeclarationFile.native.js.map +6 -1
- package/dist/esm/types.native.js +1 -2
- package/dist/esm/types.native.js.map +6 -1
- package/dist/esm/useFocusEffect.native.js +25 -22
- package/dist/esm/useFocusEffect.native.js.map +6 -1
- package/dist/esm/useLoader.native.js +50 -50
- package/dist/esm/useLoader.native.js.map +6 -1
- package/dist/esm/useNavigation.native.js +23 -19
- package/dist/esm/useNavigation.native.js.map +6 -1
- package/dist/esm/useScreens.native.js +143 -160
- package/dist/esm/useScreens.native.js.map +6 -1
- package/dist/esm/useViteRoutes.native.js +25 -28
- package/dist/esm/useViteRoutes.native.js.map +6 -1
- package/dist/esm/utils/assertIsReady.native.js +6 -3
- package/dist/esm/utils/assertIsReady.native.js.map +6 -1
- package/dist/esm/utils/dynamicImport.native.js +5 -3
- package/dist/esm/utils/dynamicImport.native.js.map +6 -1
- package/dist/esm/utils/existsAsync.native.js +6 -4
- package/dist/esm/utils/existsAsync.native.js.map +6 -1
- package/dist/esm/utils/getPageExport.native.js +12 -11
- package/dist/esm/utils/getPageExport.native.js.map +6 -1
- package/dist/esm/utils/globDir.native.js +5 -3
- package/dist/esm/utils/globDir.native.js.map +6 -1
- package/dist/esm/utils/hashString.native.js +4 -2
- package/dist/esm/utils/hashString.native.js.map +6 -1
- package/dist/esm/utils/isResponse.native.js +4 -2
- package/dist/esm/utils/isResponse.native.js.map +6 -1
- package/dist/esm/utils/isStatus.native.js +4 -2
- package/dist/esm/utils/isStatus.native.js.map +6 -1
- package/dist/esm/utils/promiseWithResolvers.native.js +7 -7
- package/dist/esm/utils/promiseWithResolvers.native.js.map +6 -1
- package/dist/esm/utils/rand.native.js +5 -3
- package/dist/esm/utils/rand.native.js.map +6 -1
- package/dist/esm/utils/redirect.native.js +7 -5
- package/dist/esm/utils/redirect.native.js.map +6 -1
- package/dist/esm/utils/removeSearch.native.js +4 -2
- package/dist/esm/utils/removeSearch.native.js.map +6 -1
- package/dist/esm/utils/removeUndefined.native.js +6 -3
- package/dist/esm/utils/removeUndefined.native.js.map +6 -1
- package/dist/esm/utils/requireResolve.native.js +4 -2
- package/dist/esm/utils/requireResolve.native.js.map +6 -1
- package/dist/esm/utils/url.native.js +6 -2
- package/dist/esm/utils/url.native.js.map +6 -1
- package/dist/esm/utils/weakKey.native.js +11 -10
- package/dist/esm/utils/weakKey.native.js.map +6 -1
- package/dist/esm/utils/weakMemo.native.js +8 -8
- package/dist/esm/utils/weakMemo.native.js.map +6 -1
- package/dist/esm/views/EmptyRoute.native.js +5 -3
- package/dist/esm/views/EmptyRoute.native.js.map +6 -1
- package/dist/esm/views/ErrorBoundary.native.js +5 -8
- package/dist/esm/views/ErrorBoundary.native.js.map +6 -1
- package/dist/esm/views/LoadProgressBar.native.js +58 -57
- package/dist/esm/views/LoadProgressBar.native.js.map +6 -1
- package/dist/esm/views/Navigator.native.js +54 -71
- package/dist/esm/views/Navigator.native.js.map +6 -1
- package/dist/esm/views/PreloadLinks.native.js +3 -1
- package/dist/esm/views/PreloadLinks.native.js.map +6 -1
- package/dist/esm/views/RootErrorBoundary.native.js +39 -29
- package/dist/esm/views/RootErrorBoundary.native.js.map +6 -1
- package/dist/esm/views/Screen.native.js +12 -12
- package/dist/esm/views/Screen.native.js.map +6 -1
- package/dist/esm/views/ScrollRestoration.native.js +27 -27
- package/dist/esm/views/ScrollRestoration.native.js.map +6 -1
- package/dist/esm/views/Try.native.js +40 -37
- package/dist/esm/views/Try.native.js.map +6 -1
- package/dist/esm/vite/build.native.js +260 -295
- package/dist/esm/vite/build.native.js.map +6 -1
- package/dist/esm/vite/clientTreeShakePlugin.native.js +34 -33
- package/dist/esm/vite/clientTreeShakePlugin.native.js.map +6 -1
- package/dist/esm/vite/constants.native.js +6 -4
- package/dist/esm/vite/constants.native.js.map +6 -1
- package/dist/esm/vite/createFileSystemRouter.js +1 -1
- package/dist/esm/vite/createFileSystemRouter.js.map +1 -1
- package/dist/esm/vite/createFileSystemRouter.mjs +1 -1
- package/dist/esm/vite/createFileSystemRouter.mjs.map +1 -1
- package/dist/esm/vite/createFileSystemRouter.native.js +100 -131
- package/dist/esm/vite/createFileSystemRouter.native.js.map +6 -1
- package/dist/esm/vite/customNodeExternals.native.js +9 -10
- package/dist/esm/vite/customNodeExternals.native.js.map +6 -1
- package/dist/esm/vite/ensureTsConfig.native.js +7 -5
- package/dist/esm/vite/ensureTsConfig.native.js.map +6 -1
- package/dist/esm/vite/findDepsToOptimize.native.js +27 -19
- package/dist/esm/vite/findDepsToOptimize.native.js.map +6 -1
- package/dist/esm/vite/fixDependenciesPlugin.native.js +5 -3
- package/dist/esm/vite/fixDependenciesPlugin.native.js.map +6 -1
- package/dist/esm/vite/generateTypesForRoutes.native.js +9 -9
- package/dist/esm/vite/generateTypesForRoutes.native.js.map +6 -1
- package/dist/esm/vite/getManifest.native.js +6 -4
- package/dist/esm/vite/getManifest.native.js.map +6 -1
- package/dist/esm/vite/headers.native.js +11 -5
- package/dist/esm/vite/headers.native.js.map +6 -1
- package/dist/esm/vite/loadEnv.native.js +7 -6
- package/dist/esm/vite/loadEnv.native.js.map +6 -1
- package/dist/esm/vite/makePluginWebOnly.native.js +9 -5
- package/dist/esm/vite/makePluginWebOnly.native.js.map +6 -1
- package/dist/esm/vite/one.native.js +142 -127
- package/dist/esm/vite/one.native.js.map +6 -1
- package/dist/esm/vite/removeReactNativeWebAnimatedPlugin.native.js +14 -11
- package/dist/esm/vite/removeReactNativeWebAnimatedPlugin.native.js.map +6 -1
- package/dist/esm/vite/replaceLoader.js +7 -1
- package/dist/esm/vite/replaceLoader.js.map +1 -1
- package/dist/esm/vite/replaceLoader.mjs +5 -1
- package/dist/esm/vite/replaceLoader.mjs.map +1 -1
- package/dist/esm/vite/replaceLoader.native.js +13 -10
- package/dist/esm/vite/replaceLoader.native.js.map +6 -1
- package/dist/esm/vite/resolveAPIRequest.native.js +44 -47
- package/dist/esm/vite/resolveAPIRequest.native.js.map +6 -1
- package/dist/esm/vite/server.native.js +5 -4
- package/dist/esm/vite/server.native.js.map +6 -1
- package/dist/esm/vite/types.native.js +1 -2
- package/dist/esm/vite/types.native.js.map +6 -1
- package/dist/esm/vite/virtualEntryPlugin.native.js +21 -16
- package/dist/esm/vite/virtualEntryPlugin.native.js.map +6 -1
- package/dist/esm/vite/vitePluginSsrCss.native.js +61 -50
- package/dist/esm/vite/vitePluginSsrCss.native.js.map +6 -1
- package/dist/esm/vite.native.js +19 -10
- package/dist/esm/vite.native.js.map +6 -1
- package/dist/esm/zero/getQueryKey.native.js +5 -3
- package/dist/esm/zero/getQueryKey.native.js.map +6 -1
- package/dist/esm/zero/isZeroQuery.native.js +4 -2
- package/dist/esm/zero/isZeroQuery.native.js.map +6 -1
- package/dist/esm/zero/resolveQuery.native.js +9 -8
- package/dist/esm/zero/resolveQuery.native.js.map +6 -1
- package/dist/esm/zero/subscribeToQuery.native.js +5 -3
- package/dist/esm/zero/subscribeToQuery.native.js.map +6 -1
- package/dist/esm/zero/types.native.js +1 -2
- package/dist/esm/zero/types.native.js.map +6 -1
- package/dist/esm/zero/useQuery.native.js +12 -12
- package/dist/esm/zero/useQuery.native.js.map +6 -1
- package/dist/esm/zero/useQueryZero.native.js +24 -20
- package/dist/esm/zero/useQueryZero.native.js.map +6 -1
- package/dist/esm/zero.native.js +9 -5
- package/dist/esm/zero.native.js.map +6 -1
- package/package.json +7 -7
- package/src/cleanUrl.ts +1 -1
- package/src/cli/runAndroid.ts +6 -0
- package/src/cli/runIos.ts +6 -0
- package/src/cli.ts +27 -1
- package/src/createHandleRequest.ts +7 -0
- package/src/vite/createFileSystemRouter.tsx +1 -2
- package/src/vite/replaceLoader.ts +7 -1
- package/types/cli/runAndroid.d.ts +2 -0
- package/types/cli/runAndroid.d.ts.map +1 -0
- package/types/cli/runIos.d.ts +2 -0
- package/types/cli/runIos.d.ts.map +1 -0
- package/types/createHandleRequest.d.ts.map +1 -1
- package/types/vite/createFileSystemRouter.d.ts.map +1 -1
- package/types/vite/replaceLoader.d.ts.map +1 -1
@@ -2,9 +2,11 @@ function subscribeToZeroQuery(query, onUpdate) {
|
|
2
2
|
var view = query.materialize();
|
3
3
|
view.hydrate();
|
4
4
|
var unsubscribe = view.addListener(onUpdate);
|
5
|
-
return function
|
5
|
+
return function() {
|
6
6
|
unsubscribe(), view.destroy();
|
7
7
|
};
|
8
8
|
}
|
9
|
-
export {
|
10
|
-
|
9
|
+
export {
|
10
|
+
subscribeToZeroQuery
|
11
|
+
};
|
12
|
+
//# sourceMappingURL=subscribeToQuery.js.map
|
@@ -1 +1,6 @@
|
|
1
|
-
{
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"sources": ["../../../src/zero/Users/n8/one/packages/one/src/zero/subscribeToQuery.ts"],
|
4
|
+
"mappings": "AAGO,SAASA,qBAAqBC,OAAcC,UAA4B;AAC7E,MAAMC,OAAOF,MAAMG,YAAW;AAC9BD,OAAKE,QAAO;AACZ,MAAMC,cAAcH,KAAKI,YAAYL,QAAAA;AACrC,SAAO,WAAA;AACLI,gBAAAA,GACAH,KAAKK,QAAO;EACd;AACF;",
|
5
|
+
"names": ["subscribeToZeroQuery", "query", "onUpdate", "view", "materialize", "hydrate", "unsubscribe", "addListener", "destroy"]
|
6
|
+
}
|
@@ -1,2 +1 @@
|
|
1
|
-
|
2
|
-
//# sourceMappingURL=types.native.js.map
|
1
|
+
//# sourceMappingURL=types.js.map
|
@@ -1,21 +1,21 @@
|
|
1
1
|
import { useRef } from "react";
|
2
|
-
import { getQueryKey } from "./getQueryKey
|
3
|
-
import "./resolveQuery
|
4
|
-
import { useQuery as useQueryZero } from "./useQueryZero
|
5
|
-
var clientInitialData = globalThis.__vxrnPostRenderData__,
|
6
|
-
serverQueryData = {};
|
2
|
+
import { getQueryKey } from "./getQueryKey";
|
3
|
+
import "./resolveQuery";
|
4
|
+
import { useQuery as useQueryZero } from "./useQueryZero";
|
5
|
+
var clientInitialData = globalThis.__vxrnPostRenderData__, serverQueryData = {};
|
7
6
|
globalThis.__vxrnServerData__ = serverQueryData;
|
8
|
-
var useQuery = function
|
9
|
-
var enable = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0,
|
10
|
-
snapshot = useQueryZero(query, enable),
|
11
|
-
queryIdRef = useRef();
|
7
|
+
var useQuery = function(query) {
|
8
|
+
var enable = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, snapshot = useQueryZero(query, enable), queryIdRef = useRef();
|
12
9
|
query && !queryIdRef.current && (queryIdRef.current = getQueryKey(query));
|
13
10
|
var queryId = queryIdRef.current || "";
|
14
11
|
if (0) {
|
15
12
|
var promise, value;
|
16
|
-
if (!promise)
|
13
|
+
if (!promise)
|
14
|
+
var promise1;
|
17
15
|
}
|
18
16
|
return clientInitialData && !snapshot ? clientInitialData[queryId] || [] : snapshot || [];
|
19
17
|
};
|
20
|
-
export {
|
21
|
-
|
18
|
+
export {
|
19
|
+
useQuery
|
20
|
+
};
|
21
|
+
//# sourceMappingURL=useQuery.js.map
|
@@ -1 +1,6 @@
|
|
1
|
-
{
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"sources": ["../../../src/zero/Users/n8/one/packages/one/src/zero/useQuery.ts"],
|
4
|
+
"mappings": "AAAA,SAASA,cAAc;AACvB,SAASC,mBAAmB;AAC5B,OAAiC;AACjC,SAASC,YAAYC,oBAAoB;AAEzC,IAAIC,oBAAmCC,WAAW,wBAG5CC,kBAAkB,CAAC;AAGzBD,WAAW,qBAAwBC;AAQ5B,IAAMC,WAAY,SAACC,OAAAA;MAAYC,SAAAA,UAAAA,SAAAA,KAAAA,UAAAA,CAAAA,MAAAA,SAAAA,UAAAA,CAAAA,IAAS,IACvCC,WAAWC,aAAaH,OAAOC,MAAAA,GAE/BG,aAAaC,OAAAA;AACnB,EAAIL,SAAS,CAACI,WAAWE,YACvBF,WAAWE,UAAUC,YAAYP,KAAAA;AAEnC,MAAMQ,UAAUJ,WAAWE,WAAW;AAKtC,MAAIG,GAA0E;AAE5E,QAAMC,SACAC;AAGN,QAAI,CAACD;AACH,UAAMA;EAkBV;AAEA,SAAIE,qBAAqB,CAACV,WACjBU,kBAAkBJ,OAAAA,KAAY,CAAA,IAGhCN,YAAY,CAAA;AACrB;",
|
5
|
+
"names": ["useRef", "getQueryKey", "useQuery", "useQueryZero", "clientInitialData", "globalThis", "serverQueryData", "useQuery", "query", "enable", "snapshot", "useQueryZero", "queryIdRef", "useRef", "current", "getQueryKey", "queryId", "process", "promise", "value", "clientInitialData"]
|
6
|
+
}
|
@@ -1,24 +1,28 @@
|
|
1
1
|
import { useLayoutEffect, useState } from "react";
|
2
2
|
function useQuery(q) {
|
3
|
-
var enable = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0,
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
3
|
+
var enable = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, queryImpl = q, [snapshot, setSnapshot] = useState(void 0), [, setView] = useState(void 0);
|
4
|
+
return useLayoutEffect(
|
5
|
+
function() {
|
6
|
+
if (enable) {
|
7
|
+
var view = q.materialize();
|
8
|
+
setView(view);
|
9
|
+
var unsubscribe = view.addListener(function(snapshot2) {
|
10
|
+
setSnapshot(structuredClone(snapshot2));
|
11
|
+
});
|
12
|
+
return view.hydrate(), function() {
|
13
|
+
unsubscribe(), view.destroy();
|
14
|
+
};
|
15
|
+
}
|
16
|
+
return setSnapshot(queryImpl.singular ? void 0 : []), setView(void 0), function() {
|
16
17
|
};
|
17
|
-
}
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
},
|
19
|
+
//
|
20
|
+
[
|
21
|
+
JSON.stringify(enable ? q.ast : null)
|
22
|
+
]
|
23
|
+
), snapshot;
|
22
24
|
}
|
23
|
-
export {
|
24
|
-
|
25
|
+
export {
|
26
|
+
useQuery
|
27
|
+
};
|
28
|
+
//# sourceMappingURL=useQueryZero.js.map
|
@@ -1 +1,6 @@
|
|
1
|
-
{
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"sources": ["../../../src/zero/Users/n8/one/packages/one/src/zero/useQueryZero.ts"],
|
4
|
+
"mappings": "AAAA,SAASA,iBAAiBC,gBAAgB;AASnC,SAASC,SACdC,GAA0B;MAC1BC,SAAAA,UAAAA,SAAAA,KAAAA,UAAAA,CAAAA,MAAAA,SAAAA,UAAAA,CAAAA,IAAS,IAEHC,YAAYF,GAEZ,CAACG,UAAUC,WAAAA,IAAeN,SAAyBO,MAAAA,GACnD,CAAA,EAAGC,OAAAA,IAAWR,SAAgDO,MAAAA;AAEpER;IAAgB,WAAA;AACd,UAAII,QAAQ;AACV,YAAMM,OAAOP,EAAEQ,YAAW;AAC1BF,gBAAQC,IAAAA;AACR,YAAME,cAAcF,KAAKG,YAAY,SAACP,WAAAA;AACpCC,sBAAYO,gBAAgBR,SAAAA,CAAAA;QAC9B,CAAA;AACAI,oBAAKK,QAAO,GACL,WAAA;AACLH,sBAAAA,GACAF,KAAKM,QAAO;QACd;MACF;AACAT,yBAAaF,UAAUY,WAAWT,SAAY,CAAA,CAAE,GAChDC,QAAQD,MAAAA,GACD,WAAA;MAEP;IACF;;IAAG;MAACU,KAAKC,UAAUf,SAAUD,EAA8BiB,MAAM,IAAA;;EAAM,GAEhEd;AACT;",
|
5
|
+
"names": ["useLayoutEffect", "useState", "useQuery", "q", "enable", "queryImpl", "snapshot", "setSnapshot", "undefined", "setView", "view", "materialize", "unsubscribe", "addListener", "structuredClone", "hydrate", "destroy", "singular", "JSON", "stringify", "ast"]
|
6
|
+
}
|
package/dist/esm/zero.native.js
CHANGED
@@ -1,5 +1,9 @@
|
|
1
|
-
import { useQuery } from "./zero/useQuery
|
2
|
-
import { resolveZeroQuery } from "./zero/resolveQuery
|
3
|
-
import { isZeroQuery } from "./zero/isZeroQuery
|
4
|
-
export {
|
5
|
-
|
1
|
+
import { useQuery } from "./zero/useQuery";
|
2
|
+
import { resolveZeroQuery } from "./zero/resolveQuery";
|
3
|
+
import { isZeroQuery } from "./zero/isZeroQuery";
|
4
|
+
export {
|
5
|
+
isZeroQuery,
|
6
|
+
resolveZeroQuery,
|
7
|
+
useQuery
|
8
|
+
};
|
9
|
+
//# sourceMappingURL=zero.js.map
|
@@ -1 +1,6 @@
|
|
1
|
-
{
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"sources": ["../../src/Users/n8/one/packages/one/src/zero.ts"],
|
4
|
+
"mappings": "AAAA,SAASA,gBAAgB;AACzB,SAASC,wBAAwB;AACjC,SAASC,mBAAmB;",
|
5
|
+
"names": ["useQuery", "resolveZeroQuery", "isZeroQuery"]
|
6
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "one",
|
3
|
-
"version": "1.1.
|
3
|
+
"version": "1.1.300",
|
4
4
|
"source": "src/index.ts",
|
5
5
|
"types": "./types/index.d.ts",
|
6
6
|
"sideEffects": false,
|
@@ -89,13 +89,13 @@
|
|
89
89
|
"@react-navigation/native-stack": "~6.9.13",
|
90
90
|
"@react-navigation/routers": "~6.1.9",
|
91
91
|
"@ungap/structured-clone": "^1.2.0",
|
92
|
-
"@vxrn/tslib-lite": "1.1.
|
93
|
-
"@vxrn/universal-color-scheme": "1.1.
|
94
|
-
"@vxrn/use-isomorphic-layout-effect": "1.1.
|
92
|
+
"@vxrn/tslib-lite": "1.1.300",
|
93
|
+
"@vxrn/universal-color-scheme": "1.1.300",
|
94
|
+
"@vxrn/use-isomorphic-layout-effect": "1.1.300",
|
95
95
|
"babel-dead-code-elimination": "^1.0.6",
|
96
96
|
"citty": "^0.1.6",
|
97
97
|
"core-js": "^3.38.1",
|
98
|
-
"create-vxrn": "1.1.
|
98
|
+
"create-vxrn": "1.1.300",
|
99
99
|
"dotenv": "^16.4.5",
|
100
100
|
"escape-string-regexp": "^5.0.0",
|
101
101
|
"expo-linking": "~6.3.1",
|
@@ -117,7 +117,7 @@
|
|
117
117
|
"url-parse": "^1.5.10",
|
118
118
|
"vite": "6.0.0-beta.1",
|
119
119
|
"vite-tsconfig-paths": "^5.0.1",
|
120
|
-
"vxrn": "1.1.
|
120
|
+
"vxrn": "1.1.300",
|
121
121
|
"ws": "^8.18.0",
|
122
122
|
"xxhashjs": "^0.2.2"
|
123
123
|
},
|
@@ -125,7 +125,7 @@
|
|
125
125
|
"react-native": "*"
|
126
126
|
},
|
127
127
|
"devDependencies": {
|
128
|
-
"@tamagui/build": "^1.113.
|
128
|
+
"@tamagui/build": "^1.113.2",
|
129
129
|
"@types/node": "^22.1.0",
|
130
130
|
"@types/react-dom": "^18.2.25",
|
131
131
|
"@types/url-parse": "^1.4.11",
|
package/src/cleanUrl.ts
CHANGED
package/src/cli.ts
CHANGED
@@ -121,6 +121,30 @@ const prebuild = defineCommand({
|
|
121
121
|
},
|
122
122
|
})
|
123
123
|
|
124
|
+
const runIos = defineCommand({
|
125
|
+
meta: {
|
126
|
+
name: 'run:ios',
|
127
|
+
version: version,
|
128
|
+
},
|
129
|
+
args: {},
|
130
|
+
async run({ args }) {
|
131
|
+
const { run } = await import('./cli/runIos')
|
132
|
+
await run(args)
|
133
|
+
},
|
134
|
+
})
|
135
|
+
|
136
|
+
const runAndroid = defineCommand({
|
137
|
+
meta: {
|
138
|
+
name: 'run:ios',
|
139
|
+
version: version,
|
140
|
+
},
|
141
|
+
args: {},
|
142
|
+
async run({ args }) {
|
143
|
+
const { run } = await import('./cli/runAndroid')
|
144
|
+
await run(args)
|
145
|
+
},
|
146
|
+
})
|
147
|
+
|
124
148
|
const clean = defineCommand({
|
125
149
|
meta: {
|
126
150
|
name: 'clean',
|
@@ -144,7 +168,7 @@ const main = defineCommand({
|
|
144
168
|
},
|
145
169
|
args: {},
|
146
170
|
async run({ args }) {
|
147
|
-
if (['clean', 'prebuild'].includes(args._[0])) {
|
171
|
+
if (['clean', 'prebuild', 'run:ios', 'run:android'].includes(args._[0])) {
|
148
172
|
// IDK why we're getting into here after a subcommand has been run
|
149
173
|
return
|
150
174
|
}
|
@@ -157,6 +181,8 @@ const main = defineCommand({
|
|
157
181
|
clean,
|
158
182
|
build: buildCommand,
|
159
183
|
prebuild,
|
184
|
+
'run:ios': runIos,
|
185
|
+
'run:android': runAndroid,
|
160
186
|
serve: serveCommand,
|
161
187
|
},
|
162
188
|
})
|
@@ -110,6 +110,11 @@ export function createHandleRequest(
|
|
110
110
|
const finalUrl = new URL(originalUrl, url.origin)
|
111
111
|
|
112
112
|
for (const route of pageRoutes) {
|
113
|
+
if (route.file === '') {
|
114
|
+
// ignore not found route
|
115
|
+
// TODO improve/remove when not found is fixed
|
116
|
+
continue
|
117
|
+
}
|
113
118
|
if (!route.workingRegex.test(finalUrl.pathname)) {
|
114
119
|
continue
|
115
120
|
}
|
@@ -137,6 +142,8 @@ export function createHandleRequest(
|
|
137
142
|
return err
|
138
143
|
}
|
139
144
|
|
145
|
+
console.error(`Error running loader: ${err}`)
|
146
|
+
|
140
147
|
throw err
|
141
148
|
}
|
142
149
|
}
|
@@ -18,8 +18,6 @@ import { virtalEntryIdClient, virtualEntryId } from './virtualEntryPlugin'
|
|
18
18
|
const USE_SERVER_ENV = false //!!process.env.USE_SERVER_ENV
|
19
19
|
|
20
20
|
export function createFileSystemRouter(options: One.PluginOptions): Plugin {
|
21
|
-
// const { optimizeDeps } = getOptimizeDeps('serve')
|
22
|
-
|
23
21
|
const preloads = ['/@vite/client', virtalEntryIdClient]
|
24
22
|
|
25
23
|
let runner: ModuleRunner
|
@@ -364,6 +362,7 @@ export function createFileSystemRouter(options: One.PluginOptions): Plugin {
|
|
364
362
|
res.end()
|
365
363
|
return
|
366
364
|
} catch (error) {
|
365
|
+
console.error(`One routing error: ${error}`)
|
367
366
|
// Forward the error to Vite
|
368
367
|
next(error)
|
369
368
|
}
|
@@ -11,7 +11,13 @@ export function replaceLoader({
|
|
11
11
|
if (!code.includes('__vxrn__loader__')) {
|
12
12
|
return code + `\nexport const loader = () => (${stringifiedData})`
|
13
13
|
}
|
14
|
-
return code.replace(
|
14
|
+
return code.replace(
|
15
|
+
/["']__vxrn__loader__['"]/,
|
16
|
+
// make sure this ' ' is added in front,
|
17
|
+
// minifiers will do `return"something"
|
18
|
+
// but if its null then it becomes returnnull
|
19
|
+
' ' + stringifiedData.replace(/\$/g, '$$$$')
|
20
|
+
)
|
15
21
|
})()
|
16
22
|
|
17
23
|
return out
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"runAndroid.d.ts","sourceRoot":"","sources":["../../src/cli/runAndroid.ts"],"names":[],"mappings":"AAAA,wBAAsB,GAAG,CAAC,IAAI,EAAE,EAAE,iBAKjC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"runIos.d.ts","sourceRoot":"","sources":["../../src/cli/runIos.ts"],"names":[],"mappings":"AAAA,wBAAsB,GAAG,CAAC,IAAI,EAAE,EAAE,iBAKjC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"createHandleRequest.d.ts","sourceRoot":"","sources":["../src/createHandleRequest.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAA;AAI9D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAEvC,KAAK,mBAAmB,CAAC,eAAe,SAAS,MAAM,GAAG,EAAE,IAAI;IAC9D,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,GAAG,eAAe,CAAA;IAC1C,GAAG,EAAE,GAAG,CAAA;IACR,WAAW,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;KAAE,CAAA;CAC5D,CAAA;AAED,KAAK,sBAAsB,GAAG,IAAI,GAAG,MAAM,GAAG,QAAQ,CAAA;AAEtD,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,GAAG,CAAC,aAAa,EAC1B,QAAQ,EAAE;IACR,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IACxD,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IAC3D,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;CACzD;;uBAgCgD,OAAO,KAAG,OAAO,CAAC,sBAAsB,CAAC;
|
1
|
+
{"version":3,"file":"createHandleRequest.d.ts","sourceRoot":"","sources":["../src/createHandleRequest.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAA;AAI9D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAEvC,KAAK,mBAAmB,CAAC,eAAe,SAAS,MAAM,GAAG,EAAE,IAAI;IAC9D,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,GAAG,eAAe,CAAA;IAC1C,GAAG,EAAE,GAAG,CAAA;IACR,WAAW,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;KAAE,CAAA;CAC5D,CAAA;AAED,KAAK,sBAAsB,GAAG,IAAI,GAAG,MAAM,GAAG,QAAQ,CAAA;AAEtD,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,GAAG,CAAC,aAAa,EAC1B,QAAQ,EAAE;IACR,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IACxD,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IAC3D,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;CACzD;;uBAgCgD,OAAO,KAAG,OAAO,CAAC,sBAAsB,CAAC;EAiJ3F"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"createFileSystemRouter.d.ts","sourceRoot":"","sources":["../../src/vite/createFileSystemRouter.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAW,MAAM,EAAiB,MAAM,MAAM,CAAA;AAW1D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AAMlC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,GAAG,CAAC,aAAa,GAAG,MAAM,
|
1
|
+
{"version":3,"file":"createFileSystemRouter.d.ts","sourceRoot":"","sources":["../../src/vite/createFileSystemRouter.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAW,MAAM,EAAiB,MAAM,MAAM,CAAA;AAW1D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AAMlC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,GAAG,CAAC,aAAa,GAAG,MAAM,CAuWzE"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"replaceLoader.d.ts","sourceRoot":"","sources":["../../src/vite/replaceLoader.ts"],"names":[],"mappings":"AAAA,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,UAAU,GACX,EAAE;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;CACnB,
|
1
|
+
{"version":3,"file":"replaceLoader.d.ts","sourceRoot":"","sources":["../../src/vite/replaceLoader.ts"],"names":[],"mappings":"AAAA,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,UAAU,GACX,EAAE;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;CACnB,UAiBA"}
|