one 1.1.393 → 1.1.394
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/cli/build.cjs +11 -6
- package/dist/cjs/cli/build.js +6 -6
- package/dist/cjs/cli/build.js.map +1 -1
- package/dist/cjs/cli/build.native.js +11 -6
- package/dist/cjs/cli/build.native.js.map +2 -2
- package/dist/cjs/constants.cjs +5 -3
- package/dist/cjs/constants.js +5 -3
- package/dist/cjs/constants.js.map +1 -1
- package/dist/cjs/constants.native.js +7 -4
- package/dist/cjs/constants.native.js.map +2 -2
- package/dist/cjs/createHandleRequest.cjs +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 +1 -1
- package/dist/cjs/router/router.cjs +5 -2
- package/dist/cjs/router/router.js +2 -2
- package/dist/cjs/router/router.js.map +1 -1
- package/dist/cjs/router/router.native.js +4 -1
- package/dist/cjs/router/router.native.js.map +1 -1
- package/dist/cjs/useLoader.cjs +10 -5
- package/dist/cjs/useLoader.js +6 -5
- package/dist/cjs/useLoader.js.map +1 -1
- package/dist/cjs/useLoader.native.js +6 -5
- package/dist/cjs/useLoader.native.js.map +2 -2
- package/dist/cjs/vite/plugins/fileSystemRouterPlugin.cjs +5 -1
- 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 +5 -1
- package/dist/cjs/vite/plugins/fileSystemRouterPlugin.native.js.map +2 -2
- package/dist/esm/cli/build.js +6 -6
- package/dist/esm/cli/build.js.map +1 -1
- package/dist/esm/cli/build.mjs +11 -6
- package/dist/esm/cli/build.mjs.map +1 -1
- package/dist/esm/cli/build.native.js +11 -6
- package/dist/esm/cli/build.native.js.map +2 -2
- package/dist/esm/constants.js +5 -3
- package/dist/esm/constants.js.map +1 -1
- package/dist/esm/constants.mjs +5 -3
- package/dist/esm/constants.mjs.map +1 -1
- package/dist/esm/constants.native.js +6 -3
- package/dist/esm/constants.native.js.map +2 -2
- 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 +2 -2
- package/dist/esm/createHandleRequest.native.js.map +1 -1
- package/dist/esm/router/router.js +2 -2
- package/dist/esm/router/router.js.map +1 -1
- package/dist/esm/router/router.mjs +5 -2
- package/dist/esm/router/router.mjs.map +1 -1
- package/dist/esm/router/router.native.js +4 -1
- package/dist/esm/router/router.native.js.map +1 -1
- package/dist/esm/useLoader.js +7 -5
- package/dist/esm/useLoader.js.map +1 -1
- package/dist/esm/useLoader.mjs +10 -5
- package/dist/esm/useLoader.mjs.map +1 -1
- package/dist/esm/useLoader.native.js +7 -5
- package/dist/esm/useLoader.native.js.map +2 -2
- package/dist/esm/vite/plugins/fileSystemRouterPlugin.js +2 -2
- package/dist/esm/vite/plugins/fileSystemRouterPlugin.js.map +1 -1
- package/dist/esm/vite/plugins/fileSystemRouterPlugin.mjs +6 -2
- package/dist/esm/vite/plugins/fileSystemRouterPlugin.mjs.map +1 -1
- package/dist/esm/vite/plugins/fileSystemRouterPlugin.native.js +6 -2
- package/dist/esm/vite/plugins/fileSystemRouterPlugin.native.js.map +2 -2
- package/package.json +7 -7
- package/src/cli/build.ts +14 -14
- package/src/constants.ts +6 -2
- package/src/createHandleRequest.ts +2 -1
- package/src/router/router.ts +2 -2
- package/src/useLoader.ts +7 -5
- package/src/utils/serverContext.tsx +2 -2
- package/src/vite/plugins/fileSystemRouterPlugin.tsx +2 -2
- package/types/constants.d.ts +4 -1
- package/types/constants.d.ts.map +1 -1
- package/types/createHandleRequest.d.ts.map +1 -1
- package/types/useLoader.d.ts.map +1 -1
- package/types/utils/serverContext.d.ts +2 -3
- package/types/utils/serverContext.d.ts.map +1 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "one",
|
3
|
-
"version": "1.1.
|
3
|
+
"version": "1.1.394",
|
4
4
|
"license": "BSD-3-Clause",
|
5
5
|
"sideEffects": [
|
6
6
|
"setup.mjs",
|
@@ -109,15 +109,15 @@
|
|
109
109
|
"@react-navigation/routers": "~7",
|
110
110
|
"@swc/core": "^1.10.4",
|
111
111
|
"@ungap/structured-clone": "^1.2.0",
|
112
|
-
"@vxrn/resolve": "1.1.
|
113
|
-
"@vxrn/tslib-lite": "1.1.
|
114
|
-
"@vxrn/universal-color-scheme": "1.1.
|
115
|
-
"@vxrn/use-isomorphic-layout-effect": "1.1.
|
112
|
+
"@vxrn/resolve": "1.1.394",
|
113
|
+
"@vxrn/tslib-lite": "1.1.394",
|
114
|
+
"@vxrn/universal-color-scheme": "1.1.394",
|
115
|
+
"@vxrn/use-isomorphic-layout-effect": "1.1.394",
|
116
116
|
"babel-dead-code-elimination": "^1.0.6",
|
117
117
|
"babel-plugin-react-compiler": "^19.0.0-beta-201e55d-20241215",
|
118
118
|
"citty": "^0.1.6",
|
119
119
|
"core-js": "^3.38.1",
|
120
|
-
"create-vxrn": "1.1.
|
120
|
+
"create-vxrn": "1.1.394",
|
121
121
|
"escape-string-regexp": "^5.0.0",
|
122
122
|
"expo-linking": "~6.3.1",
|
123
123
|
"expo-modules-core": "2.1.2",
|
@@ -143,7 +143,7 @@
|
|
143
143
|
"vite": "^6.0.6",
|
144
144
|
"vite-plugin-barrel": "^0.4.1",
|
145
145
|
"vite-tsconfig-paths": "^5.0.1",
|
146
|
-
"vxrn": "1.1.
|
146
|
+
"vxrn": "1.1.394",
|
147
147
|
"ws": "^8.18.0",
|
148
148
|
"xxhashjs": "^0.2.2"
|
149
149
|
},
|
package/src/cli/build.ts
CHANGED
@@ -465,22 +465,22 @@ export async function build(args: {
|
|
465
465
|
if (exported.loader) {
|
466
466
|
loaderData = (await exported.loader?.({ path, params })) ?? null
|
467
467
|
const code = await readFile(clientJsPath, 'utf-8')
|
468
|
-
const withLoader =
|
469
|
-
|
470
|
-
|
468
|
+
const withLoader =
|
469
|
+
// super dirty to quickly make ssr loaders work until we have better
|
470
|
+
`
|
471
471
|
if (typeof document === 'undefined') globalThis.document = {}
|
472
|
-
` +
|
473
|
-
|
474
|
-
|
475
|
-
|
472
|
+
` +
|
473
|
+
replaceLoader({
|
474
|
+
code,
|
475
|
+
loaderData,
|
476
|
+
})
|
476
477
|
const loaderPartialPath = join(clientDir, getLoaderPath(path))
|
477
478
|
await outputFile(loaderPartialPath, withLoader)
|
478
479
|
}
|
479
|
-
|
480
|
+
|
480
481
|
// ssr, we basically skip at build-time and just compile it the js we need
|
481
482
|
if (foundRoute.type !== 'ssr') {
|
482
483
|
const loaderProps: LoaderProps = { path, params }
|
483
|
-
globalThis['__vxrnLoaderProps__'] = loaderProps
|
484
484
|
// importing resetState causes issues :/
|
485
485
|
globalThis['__vxrnresetState']?.()
|
486
486
|
|
@@ -501,7 +501,7 @@ if (typeof document === 'undefined') globalThis.document = {}
|
|
501
501
|
await outputFile(
|
502
502
|
htmlOutPath,
|
503
503
|
`<html><head>
|
504
|
-
${constants.
|
504
|
+
${constants.getSpaHeaderElements({ serverContext: { loaderProps, loaderData } })}
|
505
505
|
${preloads
|
506
506
|
.map((preload) => ` <script type="module" src="${preload}"></script>`)
|
507
507
|
.join('\n')}
|
@@ -519,10 +519,10 @@ if (typeof document === 'undefined') globalThis.document = {}
|
|
519
519
|
${errMsg}
|
520
520
|
|
521
521
|
loaderData:
|
522
|
-
|
522
|
+
|
523
523
|
${JSON.stringify(loaderData || null, null, 2)}
|
524
524
|
params:
|
525
|
-
|
525
|
+
|
526
526
|
${JSON.stringify(params || null, null, 2)}`
|
527
527
|
)
|
528
528
|
console.error(err)
|
@@ -655,8 +655,8 @@ function getPathnameFromFilePath(path: string, params = {}, strict = false) {
|
|
655
655
|
function paramsError(part: string) {
|
656
656
|
throw new Error(
|
657
657
|
`[one] Params doesn't fit route:
|
658
|
-
|
659
|
-
- path: ${path}
|
658
|
+
|
659
|
+
- path: ${path}
|
660
660
|
- part: ${part}
|
661
661
|
- fileName: ${fileName}
|
662
662
|
- params:
|
package/src/constants.ts
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
import type { ServerContext } from './utils/serverContext'
|
2
|
+
|
1
3
|
export const isWebClient = process.env.TAMAGUI_TARGET !== 'native' && typeof window !== 'undefined'
|
2
4
|
export const isWebServer = process.env.TAMAGUI_TARGET !== 'native' && typeof window === 'undefined'
|
3
5
|
export const isNative = process.env.TAMAGUI_TARGET === 'native'
|
@@ -17,8 +19,10 @@ export const VIRTUAL_SSR_CSS_HREF = `/@id/__x00__${VIRTUAL_SSR_CSS_ENTRY}`
|
|
17
19
|
|
18
20
|
export const SERVER_CONTEXT_KEY = '__one_server_context__'
|
19
21
|
|
20
|
-
export const
|
22
|
+
export const getSpaHeaderElements = ({
|
23
|
+
serverContext = {},
|
24
|
+
}: { serverContext?: ServerContext } = {}) => `
|
21
25
|
<script>globalThis['global'] = globalThis</script>
|
22
26
|
<script>globalThis['__vxrnIsSPA'] = true</script>
|
23
|
-
<script>globalThis["${SERVER_CONTEXT_KEY}"] = {}</script>
|
27
|
+
<script>globalThis["${SERVER_CONTEXT_KEY}"] = ${JSON.stringify(serverContext)}</script>
|
24
28
|
`
|
@@ -109,7 +109,7 @@ export async function resolveAPIRoute(
|
|
109
109
|
console.error(`\n [one] Error importing API route at ${pathname}:
|
110
110
|
|
111
111
|
${err}
|
112
|
-
|
112
|
+
|
113
113
|
If this is an import error, you can likely fix this by adding this dependency to
|
114
114
|
the "optimizeDeps.include" array in your vite.config.ts.
|
115
115
|
`)
|
@@ -253,6 +253,7 @@ export function createHandleRequest(handlers: RequestHandlers) {
|
|
253
253
|
}
|
254
254
|
|
255
255
|
const finalUrl = new URL(originalUrl, url.origin)
|
256
|
+
finalUrl.search = url.search
|
256
257
|
|
257
258
|
if (!route.compiledRegex.test(finalUrl.pathname)) {
|
258
259
|
continue
|
package/src/router/router.ts
CHANGED
@@ -114,7 +114,7 @@ function setupLinking(initialLocation?: URL) {
|
|
114
114
|
|
115
115
|
function subscribeToNavigationChanges() {
|
116
116
|
navigationRefSubscription = navigationRef.addListener('state', (data) => {
|
117
|
-
|
117
|
+
let state = data.data.state as OneRouter.ResultState
|
118
118
|
|
119
119
|
if (!hasAttemptedToHideSplash) {
|
120
120
|
hasAttemptedToHideSplash = true
|
@@ -124,7 +124,7 @@ function subscribeToNavigationChanges() {
|
|
124
124
|
}
|
125
125
|
|
126
126
|
if (nextOptions) {
|
127
|
-
state
|
127
|
+
state = { ...state, linkOptions: nextOptions }
|
128
128
|
nextOptions = null
|
129
129
|
}
|
130
130
|
|
package/src/useLoader.ts
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
/* eslint-disable react-hooks/rules-of-hooks */
|
2
2
|
import { useEffect, useRef } from 'react'
|
3
3
|
import { getLoaderPath } from './utils/cleanUrl'
|
4
|
-
import { useActiveParams, useParams } from './hooks'
|
4
|
+
import { useActiveParams, useParams, usePathname } from './hooks'
|
5
5
|
import { resolveHref } from './link/href'
|
6
6
|
import { useRouteNode } from './router/Route'
|
7
7
|
import { preloadingLoader } from './router/router'
|
8
8
|
import type { LoaderProps } from './types'
|
9
9
|
import { dynamicImport } from './utils/dynamicImport'
|
10
10
|
import { weakKey } from './utils/weakKey'
|
11
|
+
import { getServerContext } from './utils/serverContext'
|
11
12
|
|
12
13
|
const promises: Record<string, undefined | Promise<void>> = {}
|
13
14
|
const errors = {}
|
@@ -17,13 +18,15 @@ export function useLoader<
|
|
17
18
|
Loader extends Function,
|
18
19
|
Returned = Loader extends (p: any) => any ? ReturnType<Loader> : unknown,
|
19
20
|
>(loader: Loader): Returned extends Promise<any> ? Awaited<Returned> : Returned {
|
20
|
-
const
|
21
|
+
const { loaderProps: loaderPropsFromServerContext, loaderData: loaderDataFromServerContext } =
|
22
|
+
getServerContext() || {}
|
21
23
|
|
22
24
|
// server side we just run the loader directly
|
23
25
|
if (typeof window === 'undefined') {
|
24
26
|
return useAsyncFn(
|
25
27
|
loader,
|
26
|
-
|
28
|
+
loaderPropsFromServerContext || {
|
29
|
+
path: usePathname(),
|
27
30
|
params: useActiveParams(),
|
28
31
|
}
|
29
32
|
)
|
@@ -45,14 +48,13 @@ export function useLoader<
|
|
45
48
|
|
46
49
|
// only if it matches current route
|
47
50
|
const preloadedData =
|
48
|
-
|
51
|
+
loaderPropsFromServerContext?.path === currentPath ? loaderDataFromServerContext : undefined
|
49
52
|
|
50
53
|
const currentData = useRef(preloadedData)
|
51
54
|
|
52
55
|
useEffect(() => {
|
53
56
|
if (preloadedData) {
|
54
57
|
loadedData[currentPath] = preloadedData
|
55
|
-
delete globalThis['__vxrnLoaderData__']
|
56
58
|
}
|
57
59
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
58
60
|
}, [preloadedData])
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { SERVER_CONTEXT_KEY } from '../constants'
|
2
2
|
|
3
|
-
type ServerContext = {
|
3
|
+
export type ServerContext = {
|
4
4
|
css?: string[]
|
5
5
|
postRenderData?: any
|
6
6
|
loaderData?: any
|
@@ -8,7 +8,7 @@ type ServerContext = {
|
|
8
8
|
mode?: 'spa' | 'ssg' | 'ssr'
|
9
9
|
}
|
10
10
|
|
11
|
-
type MaybeServerContext = null | ServerContext
|
11
|
+
export type MaybeServerContext = null | ServerContext
|
12
12
|
|
13
13
|
export const SERVER_CONTEXT_POST_RENDER_STRING = `_one_post_render_data_`
|
14
14
|
|
@@ -3,7 +3,7 @@ import { debounce } from 'perfect-debounce'
|
|
3
3
|
import type { Connect, Plugin, ViteDevServer } from 'vite'
|
4
4
|
import { createServerModuleRunner } from 'vite'
|
5
5
|
import type { ModuleRunner } from 'vite/module-runner'
|
6
|
-
import {
|
6
|
+
import { getSpaHeaderElements } from '../../constants'
|
7
7
|
import { createHandleRequest } from '../../createHandleRequest'
|
8
8
|
import type { RenderAppProps } from '../../types'
|
9
9
|
import { isResponse } from '../../utils/isResponse'
|
@@ -38,7 +38,7 @@ export function createFileSystemRouterPlugin(options: One.PluginOptions): Plugin
|
|
38
38
|
if (route.type === 'spa') {
|
39
39
|
// render just the layouts? route.layouts
|
40
40
|
return `<html><head>
|
41
|
-
${
|
41
|
+
${getSpaHeaderElements({ serverContext: { mode: 'spa' } })}
|
42
42
|
<script type="module">
|
43
43
|
import { injectIntoGlobalHook } from "/@react-refresh";
|
44
44
|
injectIntoGlobalHook(window);
|
package/types/constants.d.ts
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import type { ServerContext } from './utils/serverContext';
|
1
2
|
export declare const isWebClient: boolean;
|
2
3
|
export declare const isWebServer: boolean;
|
3
4
|
export declare const isNative: boolean;
|
@@ -10,5 +11,7 @@ export declare const PRELOAD_JS_POSTFIX: string;
|
|
10
11
|
export declare const VIRTUAL_SSR_CSS_ENTRY = "virtual:ssr-css.css";
|
11
12
|
export declare const VIRTUAL_SSR_CSS_HREF = "/@id/__x00__virtual:ssr-css.css";
|
12
13
|
export declare const SERVER_CONTEXT_KEY = "__one_server_context__";
|
13
|
-
export declare const
|
14
|
+
export declare const getSpaHeaderElements: ({ serverContext, }?: {
|
15
|
+
serverContext?: ServerContext;
|
16
|
+
}) => string;
|
14
17
|
//# sourceMappingURL=constants.d.ts.map
|
package/types/constants.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,SAA2E,CAAA;AACnG,eAAO,MAAM,WAAW,SAA2E,CAAA;AACnG,eAAO,MAAM,QAAQ,SAA0C,CAAA;AAE/D,eAAO,MAAM,SAAS,QAA4E,CAAA;AAElG,eAAO,MAAM,0BAA0B,oBAAoB,CAAA;AAC3D,eAAO,MAAM,8BAA8B,0BAAwC,CAAA;AACnF,eAAO,MAAM,uBAAuB,QAA6C,CAAA;AACjF,eAAO,MAAM,iBAAiB,QAA+C,CAAA;AAE7E,eAAO,MAAM,kBAAkB,QAA6B,CAAA;AAG5D,eAAO,MAAM,qBAAqB,wBAAwB,CAAA;AAC1D,eAAO,MAAM,oBAAoB,oCAAyC,CAAA;AAE1E,eAAO,MAAM,kBAAkB,2BAA2B,CAAA;AAE1D,eAAO,MAAM,
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAE1D,eAAO,MAAM,WAAW,SAA2E,CAAA;AACnG,eAAO,MAAM,WAAW,SAA2E,CAAA;AACnG,eAAO,MAAM,QAAQ,SAA0C,CAAA;AAE/D,eAAO,MAAM,SAAS,QAA4E,CAAA;AAElG,eAAO,MAAM,0BAA0B,oBAAoB,CAAA;AAC3D,eAAO,MAAM,8BAA8B,0BAAwC,CAAA;AACnF,eAAO,MAAM,uBAAuB,QAA6C,CAAA;AACjF,eAAO,MAAM,iBAAiB,QAA+C,CAAA;AAE7E,eAAO,MAAM,kBAAkB,QAA6B,CAAA;AAG5D,eAAO,MAAM,qBAAqB,wBAAwB,CAAA;AAC1D,eAAO,MAAM,oBAAoB,oCAAyC,CAAA;AAE1E,eAAO,MAAM,kBAAkB,2BAA2B,CAAA;AAE1D,eAAO,MAAM,oBAAoB,wBAE9B;IAAE,aAAa,CAAC,EAAE,aAAa,CAAA;CAAE,WAInC,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"createHandleRequest.d.ts","sourceRoot":"","sources":["../src/createHandleRequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AACj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,CACnC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,iBAAiB,qBAqCzB;AAED,wBAAsB,kBAAkB,CACtC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,iBAAiB,qBAkCzB;AAED,wBAAsB,gBAAgB,CACpC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,iBAAiB,qBAkBzB;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,OAMpD;AAUD,wBAAgB,eAAe,CAAC,QAAQ,EAAE;IAAE,UAAU,EAAE,SAAS,EAAE,CAAC;IAAC,SAAS,EAAE,SAAS,EAAE,CAAA;CAAE,GAAG;IAC9F,UAAU,EAAE,iBAAiB,EAAE,CAAA;IAC/B,SAAS,EAAE,iBAAiB,EAAE,CAAA;CAC/B,CAKA;AAGD,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,eAAe;;uBASV,OAAO,KAAG,OAAO,CAAC,sBAAsB,CAAC;EAoE3F"}
|
package/types/useLoader.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useLoader.d.ts","sourceRoot":"","sources":["../src/useLoader.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"useLoader.d.ts","sourceRoot":"","sources":["../src/useLoader.ts"],"names":[],"mappings":"AAgBA,wBAAgB,SAAS,CACvB,MAAM,SAAS,QAAQ,EACvB,QAAQ,GAAG,MAAM,SAAS,CAAC,CAAC,EAAE,GAAG,KAAK,GAAG,GAAG,UAAU,CAAC,MAAM,CAAC,GAAG,OAAO,EACxE,MAAM,EAAE,MAAM,GAAG,QAAQ,SAAS,OAAO,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAyH9E"}
|
@@ -1,14 +1,13 @@
|
|
1
|
-
type ServerContext = {
|
1
|
+
export type ServerContext = {
|
2
2
|
css?: string[];
|
3
3
|
postRenderData?: any;
|
4
4
|
loaderData?: any;
|
5
5
|
loaderProps?: any;
|
6
6
|
mode?: 'spa' | 'ssg' | 'ssr';
|
7
7
|
};
|
8
|
-
type MaybeServerContext = null | ServerContext;
|
8
|
+
export type MaybeServerContext = null | ServerContext;
|
9
9
|
export declare const SERVER_CONTEXT_POST_RENDER_STRING = "_one_post_render_data_";
|
10
10
|
export declare function setServerContext(c: ServerContext): void;
|
11
11
|
export declare function getServerContext(): MaybeServerContext;
|
12
12
|
export declare function ServerContextScript(): import("react/jsx-runtime").JSX.Element;
|
13
|
-
export {};
|
14
13
|
//# sourceMappingURL=serverContext.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"serverContext.d.ts","sourceRoot":"","sources":["../../src/utils/serverContext.tsx"],"names":[],"mappings":"AAEA,
|
1
|
+
{"version":3,"file":"serverContext.d.ts","sourceRoot":"","sources":["../../src/utils/serverContext.tsx"],"names":[],"mappings":"AAEA,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,CAAC,EAAE,MAAM,EAAE,CAAA;IACd,cAAc,CAAC,EAAE,GAAG,CAAA;IACpB,UAAU,CAAC,EAAE,GAAG,CAAA;IAChB,WAAW,CAAC,EAAE,GAAG,CAAA;IACjB,IAAI,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,CAAA;CAC7B,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG,aAAa,CAAA;AAErD,eAAO,MAAM,iCAAiC,2BAA2B,CAAA;AAMzE,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,aAAa,QAShD;AAED,wBAAgB,gBAAgB,uBAK/B;AAED,wBAAgB,mBAAmB,4CAiBlC"}
|