one 1.1.434 → 1.1.435
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 +23 -24
- package/dist/cjs/Root.js +21 -24
- package/dist/cjs/Root.js.map +1 -1
- package/dist/cjs/Root.native.js +3 -4
- package/dist/cjs/Root.native.js.map +2 -2
- package/dist/cjs/createApp.cjs +5 -2
- package/dist/cjs/createApp.js +4 -2
- package/dist/cjs/createApp.js.map +1 -1
- package/dist/cjs/render.js.map +1 -1
- package/dist/cjs/router/router.cjs +19 -13
- package/dist/cjs/router/router.js +14 -9
- package/dist/cjs/router/router.js.map +1 -1
- package/dist/cjs/router/router.native.js +44 -40
- package/dist/cjs/router/router.native.js.map +2 -2
- package/dist/cjs/router/useScreens.cjs +63 -78
- package/dist/cjs/router/useScreens.js +41 -50
- package/dist/cjs/router/useScreens.js.map +1 -1
- package/dist/cjs/router/useScreens.native.js +32 -36
- package/dist/cjs/router/useScreens.native.js.map +2 -2
- package/dist/cjs/vite/one.cjs +10 -4
- package/dist/cjs/vite/one.js +9 -4
- package/dist/cjs/vite/one.js.map +1 -1
- package/dist/cjs/vite/one.native.js +10 -5
- package/dist/cjs/vite/one.native.js.map +2 -2
- package/dist/cjs/vite/types.native.js.map +1 -1
- package/dist/esm/Root.js +22 -24
- package/dist/esm/Root.js.map +1 -1
- package/dist/esm/Root.mjs +24 -25
- package/dist/esm/Root.mjs.map +1 -1
- package/dist/esm/Root.native.js +4 -5
- package/dist/esm/Root.native.js.map +2 -2
- package/dist/esm/createApp.js +5 -2
- package/dist/esm/createApp.js.map +1 -1
- package/dist/esm/createApp.mjs +5 -2
- package/dist/esm/createApp.mjs.map +1 -1
- package/dist/esm/render.js.map +1 -1
- package/dist/esm/render.mjs.map +1 -1
- package/dist/esm/router/router.js +19 -14
- package/dist/esm/router/router.js.map +1 -1
- package/dist/esm/router/router.mjs +18 -12
- package/dist/esm/router/router.mjs.map +1 -1
- package/dist/esm/router/router.native.js +49 -45
- package/dist/esm/router/router.native.js.map +2 -2
- package/dist/esm/router/useScreens.js +41 -51
- package/dist/esm/router/useScreens.js.map +1 -1
- package/dist/esm/router/useScreens.mjs +64 -79
- package/dist/esm/router/useScreens.mjs.map +1 -1
- package/dist/esm/router/useScreens.native.js +32 -37
- package/dist/esm/router/useScreens.native.js.map +2 -2
- package/dist/esm/vite/one.js +9 -4
- package/dist/esm/vite/one.js.map +1 -1
- package/dist/esm/vite/one.mjs +10 -4
- package/dist/esm/vite/one.mjs.map +1 -1
- package/dist/esm/vite/one.native.js +10 -5
- package/dist/esm/vite/one.native.js.map +2 -2
- package/package.json +9 -9
- package/src/Root.tsx +41 -40
- package/src/createApp.tsx +5 -2
- package/src/render.tsx +1 -0
- package/src/router/router.ts +26 -21
- package/src/router/useScreens.tsx +48 -49
- package/src/vite/one.ts +11 -5
- package/src/vite/types.ts +11 -17
- package/types/Root.d.ts.map +1 -1
- package/types/createApp.d.ts.map +1 -1
- package/types/layouts/Drawer.d.ts +2 -2
- package/types/layouts/Stack.d.ts +2 -2
- package/types/layouts/Tabs.d.ts +2 -2
- package/types/render.d.ts.map +1 -1
- package/types/router/router.d.ts +2 -2
- package/types/router/router.d.ts.map +1 -1
- package/types/router/useScreens.d.ts +1 -1
- package/types/router/useScreens.d.ts.map +1 -1
- package/types/vite/one.d.ts.map +1 -1
- package/types/vite/types.d.ts +10 -17
- package/types/vite/types.d.ts.map +1 -1
@@ -19,7 +19,7 @@ import { createVirtualEntry } from "./plugins/virtualEntryPlugin";
|
|
19
19
|
events.setMaxListeners(1e3);
|
20
20
|
globalThis.__vxrnEnableNativeEnv = !0;
|
21
21
|
function one() {
|
22
|
-
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _options_config, _options_optimization, _options_react, _options_ssr,
|
22
|
+
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _options_config, _options_optimization, _options_react, _options_ssr, _options_react1;
|
23
23
|
if (!globalThis.__oneOptions)
|
24
24
|
return setOneOptions(options), globalThis.__vxrnPluginConfig__ = options, [];
|
25
25
|
clearCompilerCache(), ((_options_config = options.config) === null || _options_config === void 0 ? void 0 : _options_config.ensureTSConfig) !== !1 && ensureTSConfig();
|
@@ -39,7 +39,7 @@ function one() {
|
|
39
39
|
"client"
|
40
40
|
] : !0
|
41
41
|
});
|
42
|
-
var devAndProdPlugins = [
|
42
|
+
var autoDepsOptions = (_options_ssr = options.ssr) === null || _options_ssr === void 0 ? void 0 : _options_ssr.autoDepsOptimization, devAndProdPlugins = [
|
43
43
|
{
|
44
44
|
name: "one:config",
|
45
45
|
// @ts-ignore
|
@@ -59,7 +59,7 @@ function one() {
|
|
59
59
|
};
|
60
60
|
}
|
61
61
|
},
|
62
|
-
...
|
62
|
+
...autoDepsOptions === !1 ? [] : [
|
63
63
|
autoDepOptimizePlugin({
|
64
64
|
onScannedDeps(param) {
|
65
65
|
var { hasReanimated, hasNativewind } = param, _options_native, _options_native_css;
|
@@ -70,7 +70,8 @@ function one() {
|
|
70
70
|
});
|
71
71
|
},
|
72
72
|
root,
|
73
|
-
|
73
|
+
include: /node_modules/,
|
74
|
+
...autoDepsOptions === !0 ? {} : autoDepsOptions
|
74
75
|
})
|
75
76
|
],
|
76
77
|
// proxy because you cant add a plugin inside a plugin
|
@@ -95,7 +96,7 @@ function one() {
|
|
95
96
|
}
|
96
97
|
}),
|
97
98
|
{
|
98
|
-
name: "one-
|
99
|
+
name: "one-aliases",
|
99
100
|
enforce: "pre",
|
100
101
|
config() {
|
101
102
|
var tslibLitePath = "";
|
@@ -107,6 +108,10 @@ function one() {
|
|
107
108
|
return {
|
108
109
|
resolve: {
|
109
110
|
alias: {
|
111
|
+
// testing getting transition between routes working
|
112
|
+
// 'use-sync-external-store/with-selector': resolvePath(
|
113
|
+
// 'use-sync-external-store/shim/with-selector'
|
114
|
+
// ),
|
110
115
|
...tslibLitePath && {
|
111
116
|
tslib: tslibLitePath
|
112
117
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../src/vite/Users/n8/one/packages/one/src/vite/one.ts"],
|
4
|
-
"mappings": "AAAA,SAASA,6BAA6BC,0BAA0B;AAChE,SAASC,mBAAmB;AAC5B,OAAOC,YAAY;AACnB,OAAOC,UAAU;AAEjB,SAASC,cAAc;AACvB,OAAOC,mBAAmB;AAC1B,SAASC,uBAAuBC,iBAAiBC,kBAAkBC,eAAe;AAClF,SAASC,iBAAiB;AAC1B,OAAO;AACP,SAASC,sBAAsB;AAC/B,SAASC,qBAAqB;AAC9B,SAASC,6BAA6B;AACtC,SAASC,oCAAoC;AAC7C,SAASC,6BAA6B;AACtC,SAASC,0CAA0C;AACnD,SAASC,oBAAoB;AAC7B,SAASC,sBAAsB;AAC/B,SAASC,0BAA0B;AAUnCjB,OAAOkB,gBAAgB,GAAA;AAGvBC,WAAWC,wBAAwB;AAM5B,SAASC,MAAAA;MAAIC,UAAAA,UAAAA,SAAAA,KAAAA,UAAAA,CAAAA,MAAAA,SAAAA,UAAAA,CAAAA,IAA6B,CAAC,GAY5CA,iBAiBiBA,uBAEJA,
|
5
|
-
"names": ["configureVXRNCompilerPlugin", "clearCompilerCache", "resolvePath", "events", "path", "barrel", "tsconfigPaths", "autoDepOptimizePlugin", "getOptimizeDeps", "getOptionsFilled", "loadEnv", "CACHE_KEY", "ensureTSConfig", "setOneOptions", "clientTreeShakePlugin", "createFileSystemRouterPlugin", "fixDependenciesPlugin", "generateFileSystemRouteTypesPlugin", "SSRCSSPlugin", "virtualEntryId", "createVirtualEntry", "setMaxListeners", "globalThis", "__vxrnEnableNativeEnv", "one", "options", "__oneOptions", "config", "optimizeDeps", "optimizeIds", "include", "optimizeIdRegex", "RegExp", "map", "id", "replace", "join", "tsConfigPathsPlugin", "vxrnOptions", "root", "process", "cwd", "barrelOption", "optimization", "compiler", "react", "enableCompiler", "devAndProdPlugins", "name", "__get", "packages", "Array", "isArray", "client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7C,GAAGoC;YACH,GAAGC;UACL,CAAA;QACF;MACF;IACF;AAEA,WAAO;MACLhC,cAAc;QACZC,QAAQ4B,aAAa,QAAA;QACrB3B,KAAK2B,aAAa,KAAA;QAClB1B,SAAS0B,aAAa,SAAA;MACxB;IACF;EACF,EAAA,GAGMI,6BAAuC;IAACxH,sBAAAA;IAAyB2G;;AAGvEnG,oBAAWiH,yBAAyBD,4BACpChH,WAAWkH,0BAA0BtF,mBAE9B;OACFA;OACAoF;;;;IAKHvH,6BAA6BU,OAAAA;IAE7BR,mCAAmCQ,OAAAA;IAEnCT,sBAAsBS,QAAQgH,IAAI;IAElCrH,mBAAmB;MACjB,GAAGK;MACHc,MAAM;IACR,CAAA;IAEA;MACEY,MAAM;MACNxB,SAAAA;YAGUF;AAFR,eAAO;UACLiC,QAAQ;YACN,KAAIjC,kBAAAA,QAAQuC,YAAM,QAAdvC,oBAAAA,SAAAA,SAAAA,gBAAgBsD,QAAO;cACzB,4BAA4BgB,KAAKC,UAAUvE,QAAQuC,OAAOe,GAAG;cAC7D,gCAAgCgB,KAAKC,UAAUvE,QAAQuC,OAAOe,GAAG;YACnE;YAEA,6BAA6BgB,KAAKC,UAAUrF,SAAAA;YAC5C,iCAAiCoF,KAAKC,UAAUrF,SAAAA;UAClD;QACF;MACF;IACF;IAEAO,aAAa;MACXwH,SAAS;QAACvH;;IACZ,CAAA;;AAEJ;",
|
5
|
+
"names": ["configureVXRNCompilerPlugin", "clearCompilerCache", "resolvePath", "events", "path", "barrel", "tsconfigPaths", "autoDepOptimizePlugin", "getOptimizeDeps", "getOptionsFilled", "loadEnv", "CACHE_KEY", "ensureTSConfig", "setOneOptions", "clientTreeShakePlugin", "createFileSystemRouterPlugin", "fixDependenciesPlugin", "generateFileSystemRouteTypesPlugin", "SSRCSSPlugin", "virtualEntryId", "createVirtualEntry", "setMaxListeners", "globalThis", "__vxrnEnableNativeEnv", "one", "options", "__oneOptions", "config", "optimizeDeps", "optimizeIds", "include", "optimizeIdRegex", "RegExp", "map", "id", "replace", "join", "tsConfigPathsPlugin", "vxrnOptions", "root", "process", "cwd", "barrelOption", "optimization", "compiler", "react", "enableCompiler", "autoDepsOptions", "ssr", "autoDepsOptimization", "devAndProdPlugins", "name", "__get", "packages", "Array", "isArray", "clientEnvDefine", "mode", "define", "onScannedDeps", "hasReanimated", "hasNativewind", "enableReanimated", "enableNativeCSS", "native", "css", "enableNativewind", "Proxy", "configIncoming", "pathsConfig", "tsConfigPaths", "plugins", "flat", "some", "p", "configResolved", "resolveId", "get", "target", "key", "thisArg", "Reflect", "enforce", "tslibLitePath", "err", "console", "info", "env", "DEBUG", "error", "resolve", "alias", "tslib", "web", "defaultRenderMode", "JSON", "stringify", "setupFile", "NODE_ENV", "server", "url", "environments", "client", "ios", "android", "hotUpdate", "modules", "m", "relativePath", "relative", "rootDir", "split", "sep", "acceptedHmrExports", "Set", "_", "transform", "code", "environment", "includes", "scan", "reactScanPlugin", "reactScanConfig", "push", "obj", "configs", "disabled", "enabled", "animationSpeed", "showToolbar", "getConfigFor", "platform", "defaultConfig", "perPlatformConfig", "nativeWebDevAndProdPlugsin", "__vxrnAddNativePlugins", "__vxrnAddWebPluginsProd", "deps", "entries"]
|
6
6
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "one",
|
3
|
-
"version": "1.1.
|
3
|
+
"version": "1.1.435",
|
4
4
|
"license": "BSD-3-Clause",
|
5
5
|
"sideEffects": [
|
6
6
|
"setup.mjs",
|
@@ -94,15 +94,15 @@
|
|
94
94
|
"@react-navigation/routers": "~7",
|
95
95
|
"@swc/core": "^1.10.4",
|
96
96
|
"@ungap/structured-clone": "^1.2.0",
|
97
|
-
"@vxrn/compiler": "1.1.
|
98
|
-
"@vxrn/resolve": "1.1.
|
99
|
-
"@vxrn/tslib-lite": "1.1.
|
100
|
-
"@vxrn/universal-color-scheme": "1.1.
|
101
|
-
"@vxrn/use-isomorphic-layout-effect": "1.1.
|
97
|
+
"@vxrn/compiler": "1.1.435",
|
98
|
+
"@vxrn/resolve": "1.1.435",
|
99
|
+
"@vxrn/tslib-lite": "1.1.435",
|
100
|
+
"@vxrn/universal-color-scheme": "1.1.435",
|
101
|
+
"@vxrn/use-isomorphic-layout-effect": "1.1.435",
|
102
102
|
"babel-dead-code-elimination": "^1.0.6",
|
103
103
|
"citty": "^0.1.6",
|
104
104
|
"core-js": "^3.38.1",
|
105
|
-
"create-vxrn": "1.1.
|
105
|
+
"create-vxrn": "1.1.435",
|
106
106
|
"escape-string-regexp": "^5.0.0",
|
107
107
|
"expo-linking": "~6.3.1",
|
108
108
|
"expo-modules-core": "2.1.2",
|
@@ -126,10 +126,10 @@
|
|
126
126
|
"react-scan": "^0.1.3",
|
127
127
|
"rollup-plugin-node-externals": "^7.1.2",
|
128
128
|
"use-latest-callback": "^0.2.3",
|
129
|
-
"vite": "^6.0
|
129
|
+
"vite": "^6.1.0",
|
130
130
|
"vite-plugin-barrel": "^0.4.1",
|
131
131
|
"vite-tsconfig-paths": "^5.0.1",
|
132
|
-
"vxrn": "1.1.
|
132
|
+
"vxrn": "1.1.435",
|
133
133
|
"ws": "^8.18.0",
|
134
134
|
"xxhashjs": "^0.2.2"
|
135
135
|
},
|
package/src/Root.tsx
CHANGED
@@ -7,6 +7,7 @@ import {
|
|
7
7
|
import { useColorScheme } from '@vxrn/universal-color-scheme'
|
8
8
|
import {
|
9
9
|
createContext,
|
10
|
+
StrictMode,
|
10
11
|
useContext,
|
11
12
|
useEffect,
|
12
13
|
useId,
|
@@ -62,7 +63,6 @@ globalThis['__vxrnGetContextFromReactContext'] = () => useContext(ServerAsyncLoc
|
|
62
63
|
export function Root(props: RootProps) {
|
63
64
|
const { path, routes, routeOptions, isClient, navigationContainerProps, onRenderId } = props
|
64
65
|
|
65
|
-
// ⚠️ <StrictMode> breaks routing!
|
66
66
|
const context = useViteRoutes(routes, routeOptions, globalThis['__vxrnVersion'])
|
67
67
|
const location =
|
68
68
|
typeof window !== 'undefined' && window.location
|
@@ -87,45 +87,46 @@ export function Root(props: RootProps) {
|
|
87
87
|
const value = globalThis['__vxrnrequestAsyncLocalStore']?.getStore() || null
|
88
88
|
|
89
89
|
const contents = (
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
90
|
+
<StrictMode>
|
91
|
+
<ServerAsyncLocalIDContext.Provider value={value}>
|
92
|
+
<ServerRenderID.Provider value={id}>
|
93
|
+
<RootErrorBoundary>
|
94
|
+
{/* for some reason warning if no key here */}
|
95
|
+
<UpstreamNavigationContainer
|
96
|
+
ref={store.navigationRef}
|
97
|
+
initialState={store.initialState}
|
98
|
+
linking={store.linking}
|
99
|
+
onUnhandledAction={onUnhandledAction}
|
100
|
+
theme={colorScheme === 'dark' ? DarkTheme : DefaultTheme}
|
101
|
+
documentTitle={{
|
102
|
+
enabled: false,
|
103
|
+
}}
|
104
|
+
{...navigationContainerProps}
|
105
|
+
>
|
106
|
+
<ServerLocationContext.Provider value={location}>
|
107
|
+
{/* <GestureHandlerRootView> */}
|
108
|
+
{/*
|
109
|
+
* Due to static rendering we need to wrap these top level views in second wrapper
|
110
|
+
* View's like <GestureHandlerRootView /> generate a <div> so if the parent wrapper
|
111
|
+
* is a HTML document, we need to ensure its inside the <body>
|
112
|
+
*/}
|
113
|
+
<>
|
114
|
+
{/* default scroll restoration to on, but users can configure it by importing and using themselves */}
|
115
|
+
<ScrollBehavior />
|
116
|
+
|
117
|
+
<Component />
|
118
|
+
|
119
|
+
{/* Users can override this by adding another StatusBar element anywhere higher in the component tree. */}
|
120
|
+
</>
|
121
|
+
{/* {!hasViewControllerBasedStatusBarAppearance && <StatusBar style="auto" />} */}
|
122
|
+
{/* </GestureHandlerRootView> */}
|
123
|
+
</ServerLocationContext.Provider>
|
124
|
+
</UpstreamNavigationContainer>
|
125
|
+
<PreloadLinks key="preload-links" />
|
126
|
+
</RootErrorBoundary>
|
127
|
+
</ServerRenderID.Provider>
|
128
|
+
</ServerAsyncLocalIDContext.Provider>
|
129
|
+
</StrictMode>
|
129
130
|
)
|
130
131
|
|
131
132
|
if (isClient) {
|
package/src/createApp.tsx
CHANGED
@@ -10,8 +10,9 @@ import type { RenderAppProps } from './types'
|
|
10
10
|
import ReactDOMServer from 'react-dom/server.browser'
|
11
11
|
import { getServerHeadInsertions } from './useServerHeadInsertion'
|
12
12
|
import { ensureExists } from './utils/ensureExists'
|
13
|
-
import { getServerContext, setServerContext } from './vite/one-server-only'
|
14
13
|
import { SERVER_CONTEXT_POST_RENDER_STRING } from './vite/constants'
|
14
|
+
import { getServerContext, setServerContext } from './vite/one-server-only'
|
15
|
+
import { cloneElement } from 'react'
|
15
16
|
|
16
17
|
export type CreateAppProps = { routes: Record<string, () => Promise<unknown>> }
|
17
18
|
|
@@ -76,7 +77,9 @@ export function createApp(options: CreateAppProps) {
|
|
76
77
|
}
|
77
78
|
|
78
79
|
if (extraHeadElements.length) {
|
79
|
-
const extraHeadHTML = ReactDOMServer.renderToStaticMarkup(
|
80
|
+
const extraHeadHTML = ReactDOMServer.renderToStaticMarkup(
|
81
|
+
<>{extraHeadElements.map((x, i) => cloneElement(x, { key: i }))}</>
|
82
|
+
)
|
80
83
|
|
81
84
|
if (extraHeadHTML) {
|
82
85
|
html = html.replace(`</head>`, `${extraHeadHTML}</head>`)
|
package/src/render.tsx
CHANGED
package/src/router/router.ts
CHANGED
@@ -6,28 +6,27 @@ import {
|
|
6
6
|
} from '@react-navigation/native'
|
7
7
|
import * as Linking from 'expo-linking'
|
8
8
|
import { nanoid } from 'nanoid/non-secure'
|
9
|
-
import {
|
9
|
+
import { Fragment, startTransition, type ComponentType, useSyncExternalStore } from 'react'
|
10
10
|
import { Platform } from 'react-native'
|
11
|
-
import type { RouteNode } from './Route'
|
12
|
-
import { getLoaderPath, getPreloadPath } from '../utils/cleanUrl'
|
13
11
|
import type { State } from '../fork/getPathFromState'
|
14
12
|
import { getPathDataFromState } from '../fork/getPathFromState'
|
15
13
|
import { stripBaseUrl } from '../fork/getStateFromPath-mods'
|
16
|
-
import { getLinkingConfig, type OneLinkingOptions } from './getLinkingConfig'
|
17
|
-
import { getRoutes } from './getRoutes'
|
18
14
|
import type { OneRouter } from '../interfaces/router'
|
19
15
|
import { resolveHref } from '../link/href'
|
20
16
|
import { resolve } from '../link/path'
|
21
|
-
import { matchDynamicName } from './matchers'
|
22
|
-
import { sortRoutes } from './sortRoutes'
|
23
|
-
import { getQualifiedRouteComponent } from './useScreens'
|
24
17
|
import { assertIsReady } from '../utils/assertIsReady'
|
18
|
+
import { getLoaderPath, getPreloadPath } from '../utils/cleanUrl'
|
25
19
|
import { dynamicImport } from '../utils/dynamicImport'
|
26
|
-
import { removeSearch } from '../utils/removeSearch'
|
27
20
|
import { shouldLinkExternally } from '../utils/url'
|
28
21
|
import type { One } from '../vite/types'
|
22
|
+
import { getLinkingConfig, type OneLinkingOptions } from './getLinkingConfig'
|
29
23
|
import { getNormalizedStatePath, type UrlObject } from './getNormalizedStatePath'
|
24
|
+
import { getRoutes } from './getRoutes'
|
30
25
|
import { setLastAction } from './lastAction'
|
26
|
+
import { matchDynamicName } from './matchers'
|
27
|
+
import type { RouteNode } from './Route'
|
28
|
+
import { sortRoutes } from './sortRoutes'
|
29
|
+
import { getQualifiedRouteComponent } from './useScreens'
|
31
30
|
|
32
31
|
// Module-scoped variables
|
33
32
|
export let routeNode: RouteNode | null = null
|
@@ -144,16 +143,20 @@ function subscribeToNavigationChanges() {
|
|
144
143
|
}
|
145
144
|
|
146
145
|
if (shouldUpdateSubscribers) {
|
147
|
-
|
148
|
-
subscriber
|
149
|
-
|
146
|
+
startTransition(() => {
|
147
|
+
for (const subscriber of rootStateSubscribers) {
|
148
|
+
subscriber(state)
|
149
|
+
}
|
150
|
+
})
|
150
151
|
}
|
151
152
|
})
|
152
153
|
|
153
|
-
|
154
|
-
|
155
|
-
subscriber
|
156
|
-
|
154
|
+
startTransition(() => {
|
155
|
+
updateSnapshot()
|
156
|
+
for (const subscriber of storeSubscribers) {
|
157
|
+
subscriber()
|
158
|
+
}
|
159
|
+
})
|
157
160
|
}
|
158
161
|
|
159
162
|
// Navigation functions
|
@@ -285,9 +288,11 @@ export function subscribeToLoadingState(subscriber: OneRouter.LoadingStateListen
|
|
285
288
|
}
|
286
289
|
|
287
290
|
export function setLoadingState(state: OneRouter.LoadingState) {
|
288
|
-
|
289
|
-
listener
|
290
|
-
|
291
|
+
startTransition(() => {
|
292
|
+
for (const listener of loadingStateSubscribers) {
|
293
|
+
listener(state)
|
294
|
+
}
|
295
|
+
})
|
291
296
|
}
|
292
297
|
|
293
298
|
// Snapshot function
|
@@ -505,7 +510,6 @@ export async function linkTo(href: string, event?: string, options?: OneRouter.L
|
|
505
510
|
preloadRoute(href)
|
506
511
|
|
507
512
|
const rootState = navigationRef.getRootState()
|
508
|
-
const action = getNavigateAction(state, rootState, event)
|
509
513
|
|
510
514
|
const hash = href.indexOf('#')
|
511
515
|
if (rootState.key && hash > 0) {
|
@@ -516,9 +520,10 @@ export async function linkTo(href: string, event?: string, options?: OneRouter.L
|
|
516
520
|
nextOptions = options ?? null
|
517
521
|
|
518
522
|
startTransition(() => {
|
523
|
+
const action = getNavigateAction(state, rootState, event)
|
519
524
|
const current = navigationRef.getCurrentRoute()
|
520
|
-
|
521
525
|
navigationRef.dispatch(action)
|
526
|
+
|
522
527
|
let warningTm
|
523
528
|
const interval = setInterval(() => {
|
524
529
|
const next = navigationRef.getCurrentRoute()
|
@@ -7,10 +7,9 @@ import type {
|
|
7
7
|
RouteProp,
|
8
8
|
ScreenListeners,
|
9
9
|
} from '@react-navigation/native'
|
10
|
-
import React, { forwardRef,
|
10
|
+
import React, { forwardRef, memo, Suspense } from 'react'
|
11
11
|
import { ServerContextScript } from '../server/ServerContextScript'
|
12
12
|
import { getPageExport } from '../utils/getPageExport'
|
13
|
-
import { useConstant } from '../utils/useConstant'
|
14
13
|
import { EmptyRoute } from '../views/EmptyRoute'
|
15
14
|
import { RootErrorBoundary } from '../views/RootErrorBoundary'
|
16
15
|
import { Try } from '../views/Try'
|
@@ -171,9 +170,11 @@ export function getQualifiedRouteComponent(value: RouteNode) {
|
|
171
170
|
|
172
171
|
let ScreenComponent: React.ForwardRefExoticComponent<{ segment: string; key?: string }>
|
173
172
|
|
173
|
+
let Component
|
174
|
+
|
174
175
|
ScreenComponent = React.forwardRef((props, ref) => {
|
175
|
-
|
176
|
-
|
176
|
+
Component ||= (() => {
|
177
|
+
const res = value.loadRoute()
|
177
178
|
const BaseComponent = getPageExport(fromImport(res)) as React.ComponentType<any>
|
178
179
|
|
179
180
|
// root layout do special html handling only
|
@@ -185,12 +186,15 @@ export function getQualifiedRouteComponent(value: RouteNode) {
|
|
185
186
|
const { children: headChildren, ...headProps } = head?.props || {}
|
186
187
|
const serverContext = useServerContext()
|
187
188
|
|
189
|
+
// let finalChildren = <Suspense fallback={null}>{children}</Suspense>
|
190
|
+
let finalChildren = children
|
191
|
+
|
188
192
|
if (process.env.TAMAGUI_TARGET === 'native') {
|
189
193
|
// on native we just ignore all html/body/head
|
190
|
-
return
|
194
|
+
return finalChildren
|
191
195
|
}
|
192
196
|
|
193
|
-
|
197
|
+
finalChildren = (
|
194
198
|
<>
|
195
199
|
<head key="head" {...headProps}>
|
196
200
|
<DevHead />
|
@@ -206,7 +210,7 @@ export function getQualifiedRouteComponent(value: RouteNode) {
|
|
206
210
|
{headChildren}
|
207
211
|
</head>
|
208
212
|
<body key="body" suppressHydrationWarning {...bodyProps}>
|
209
|
-
<SafeAreaProviderCompat>{
|
213
|
+
<SafeAreaProviderCompat>{finalChildren}</SafeAreaProviderCompat>
|
210
214
|
</body>
|
211
215
|
</>
|
212
216
|
)
|
@@ -215,67 +219,37 @@ export function getQualifiedRouteComponent(value: RouteNode) {
|
|
215
219
|
// tamagui and libraries can add className on hydration to have ssr safe styling
|
216
220
|
// so supress hydration warnings here
|
217
221
|
<html suppressHydrationWarning lang="en-US" {...htmlProps}>
|
218
|
-
{
|
222
|
+
{finalChildren}
|
219
223
|
</html>
|
220
224
|
)
|
221
225
|
})
|
222
226
|
}
|
223
227
|
|
224
228
|
return BaseComponent
|
225
|
-
})
|
229
|
+
})()
|
226
230
|
|
227
231
|
if (process.env.NODE_ENV === 'development' && process.env.DEBUG === 'one') {
|
228
232
|
console.groupCollapsed(`Render ${props.key} ${props.segment}`)
|
229
|
-
console.info(`res`, res)
|
230
233
|
console.info(`value`, value)
|
231
|
-
console.info(`fromImport`, fromImport(res))
|
232
234
|
console.info(`Component`, Component)
|
233
235
|
console.groupEnd()
|
234
236
|
}
|
235
237
|
|
236
|
-
return
|
237
|
-
// <Suspense fallback={null}>
|
238
|
-
<Component {...props} ref={ref} />
|
239
|
-
// </Suspense>
|
240
|
-
)
|
238
|
+
return <Component {...props} ref={ref} />
|
241
239
|
})
|
242
240
|
|
243
241
|
const wrapSuspense = (children: any) => {
|
242
|
+
// so as far as i understand, adding suspense causes flickers on web during nav because
|
243
|
+
// we can't seem to get react navigation to properly respect startTransition(() => {})
|
244
|
+
// i tried a lot of things, but didn't find the root cause, but native needs suspense or
|
245
|
+
// else it hits an error about no suspense boundary being set
|
246
|
+
|
244
247
|
if (process.env.TAMAGUI_TARGET === 'native') {
|
245
|
-
return <Suspense fallback={
|
248
|
+
return <Suspense fallback={null}>{children}</Suspense>
|
246
249
|
}
|
247
|
-
// on web avoiding suspense for now
|
248
|
-
// its causing page flickers, we need to make sure we wrap loaders + page nav
|
249
|
-
// in startTransition
|
250
250
|
return children
|
251
251
|
}
|
252
252
|
|
253
|
-
const getLoadable = (props: any, ref: any) => {
|
254
|
-
return (
|
255
|
-
<RootErrorBoundary>
|
256
|
-
{wrapSuspense(
|
257
|
-
<ScreenComponent
|
258
|
-
{...{
|
259
|
-
...props,
|
260
|
-
ref,
|
261
|
-
// Expose the template segment path, e.g. `(home)`, `[foo]`, `index`
|
262
|
-
// the intention is to make it possible to deduce shared routes.
|
263
|
-
segment: value.route,
|
264
|
-
}}
|
265
|
-
/>
|
266
|
-
)}
|
267
|
-
</RootErrorBoundary>
|
268
|
-
)
|
269
|
-
}
|
270
|
-
|
271
|
-
const SuspenseFallback = ({ route }: { route: RouteNode }) => {
|
272
|
-
useEffect(() => {
|
273
|
-
// console.info(`⚠️ Suspended:`, route)
|
274
|
-
}, [route])
|
275
|
-
|
276
|
-
return null
|
277
|
-
}
|
278
|
-
|
279
253
|
const QualifiedRoute = React.forwardRef(
|
280
254
|
(
|
281
255
|
{
|
@@ -289,10 +263,21 @@ export function getQualifiedRouteComponent(value: RouteNode) {
|
|
289
263
|
}: any,
|
290
264
|
ref: any
|
291
265
|
) => {
|
292
|
-
const loadable = getLoadable(props, ref)
|
293
266
|
return (
|
294
267
|
<Route route={route} node={value}>
|
295
|
-
|
268
|
+
<RootErrorBoundary>
|
269
|
+
{wrapSuspense(
|
270
|
+
<ScreenComponent
|
271
|
+
{...{
|
272
|
+
...props,
|
273
|
+
ref,
|
274
|
+
// Expose the template segment path, e.g. `(home)`, `[foo]`, `index`
|
275
|
+
// the intention is to make it possible to deduce shared routes.
|
276
|
+
segment: value.route,
|
277
|
+
}}
|
278
|
+
/>
|
279
|
+
)}
|
280
|
+
</RootErrorBoundary>
|
296
281
|
</Route>
|
297
282
|
)
|
298
283
|
}
|
@@ -301,7 +286,7 @@ export function getQualifiedRouteComponent(value: RouteNode) {
|
|
301
286
|
QualifiedRoute.displayName = `Route(${value.route})`
|
302
287
|
|
303
288
|
qualifiedStore.set(value, QualifiedRoute)
|
304
|
-
return QualifiedRoute
|
289
|
+
return memo(QualifiedRoute)
|
305
290
|
}
|
306
291
|
|
307
292
|
/** @returns a function which provides a screen id that matches the dynamic route name in params. */
|
@@ -366,6 +351,20 @@ function routeToScreen(route: RouteNode, { options, ...props }: Partial<ScreenPr
|
|
366
351
|
|
367
352
|
return output
|
368
353
|
}}
|
354
|
+
// this doesn't work, also probably better to wrap suspense only on root layout in useScreens
|
355
|
+
// but it doesnt seem to pick up our startTransitions which i wrapped in a few places.
|
356
|
+
// now i thought this was due to our use of useSyncExternalStore, but i replaced that with
|
357
|
+
// `use-sync-external-store/shim` and i also replaced the one in react-navigation that does
|
358
|
+
// `use-sync-external-store/with-selector` to `use-sync-external-store/shim/with-selector`
|
359
|
+
// but still it seems something else must be updating state outside a transition.
|
360
|
+
|
361
|
+
// layout={({ children }) => {
|
362
|
+
// console.log('route.contextKey', route.contextKey)
|
363
|
+
// if (route.contextKey === '') {
|
364
|
+
// return <Suspense fallback={null}>{children}</Suspense>
|
365
|
+
// }
|
366
|
+
// return children
|
367
|
+
// }}
|
369
368
|
getComponent={() => {
|
370
369
|
// log here to see which route is rendered
|
371
370
|
// console.log('getting', route, getQualifiedRouteComponent(route))
|
package/src/vite/one.ts
CHANGED
@@ -74,6 +74,8 @@ export function one(options: One.PluginOptions = {}): PluginOption {
|
|
74
74
|
})
|
75
75
|
}
|
76
76
|
|
77
|
+
const autoDepsOptions = options.ssr?.autoDepsOptimization
|
78
|
+
|
77
79
|
const devAndProdPlugins: Plugin[] = [
|
78
80
|
{
|
79
81
|
name: 'one:config',
|
@@ -97,7 +99,7 @@ export function one(options: One.PluginOptions = {}): PluginOption {
|
|
97
99
|
},
|
98
100
|
},
|
99
101
|
|
100
|
-
...(
|
102
|
+
...(autoDepsOptions === false
|
101
103
|
? []
|
102
104
|
: [
|
103
105
|
autoDepOptimizePlugin({
|
@@ -109,9 +111,8 @@ export function one(options: One.PluginOptions = {}): PluginOption {
|
|
109
111
|
})
|
110
112
|
},
|
111
113
|
root,
|
112
|
-
|
113
|
-
|
114
|
-
: undefined,
|
114
|
+
include: /node_modules/,
|
115
|
+
...(autoDepsOptions === true ? {} : autoDepsOptions),
|
115
116
|
}),
|
116
117
|
]),
|
117
118
|
|
@@ -155,7 +156,7 @@ export function one(options: One.PluginOptions = {}): PluginOption {
|
|
155
156
|
),
|
156
157
|
|
157
158
|
{
|
158
|
-
name: 'one-
|
159
|
+
name: 'one-aliases',
|
159
160
|
enforce: 'pre',
|
160
161
|
|
161
162
|
config() {
|
@@ -177,6 +178,11 @@ export function one(options: One.PluginOptions = {}): PluginOption {
|
|
177
178
|
return {
|
178
179
|
resolve: {
|
179
180
|
alias: {
|
181
|
+
// testing getting transition between routes working
|
182
|
+
// 'use-sync-external-store/with-selector': resolvePath(
|
183
|
+
// 'use-sync-external-store/shim/with-selector'
|
184
|
+
// ),
|
185
|
+
|
180
186
|
...(tslibLitePath && {
|
181
187
|
tslib: tslibLitePath,
|
182
188
|
}),
|