@payloadcms/tanstack-start 4.0.0-internal.293e026 → 4.0.0-internal.688c4d0
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/elements/RouterAdapter/index.d.ts.map +1 -1
- package/dist/elements/RouterAdapter/index.js +38 -15
- package/dist/elements/RouterAdapter/index.js.map +1 -1
- package/dist/exports/client.d.ts +1 -0
- package/dist/exports/client.d.ts.map +1 -1
- package/dist/exports/client.js +1 -0
- package/dist/exports/client.js.map +1 -1
- package/dist/layouts/Root/getLayoutData.d.ts.map +1 -1
- package/dist/layouts/Root/getLayoutData.js +36 -0
- package/dist/layouts/Root/getLayoutData.js.map +1 -1
- package/dist/layouts/Root/index.d.ts +7 -0
- package/dist/layouts/Root/index.d.ts.map +1 -1
- package/dist/layouts/Root/index.js.map +1 -1
- package/dist/layouts/Root/withPayloadRoot.d.ts +65 -0
- package/dist/layouts/Root/withPayloadRoot.d.ts.map +1 -0
- package/dist/layouts/Root/withPayloadRoot.js +92 -0
- package/dist/layouts/Root/withPayloadRoot.js.map +1 -0
- package/dist/vite/constants.d.ts.map +1 -1
- package/dist/vite/constants.js +29 -1
- package/dist/vite/constants.js.map +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/RouterAdapter/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAoB,sBAAsB,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/RouterAdapter/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAoB,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAuDvE,eAAO,MAAM,qBAAqB,EAAE,sBA+EnC,CAAA"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { RouterAdapterContext } from '@payloadcms/ui';
|
|
4
4
|
import { Link as TanStackLink, useLocation, useParams, useRouter } from '@tanstack/react-router';
|
|
5
|
+
import * as qs from 'qs-esm';
|
|
5
6
|
import React, { useCallback, useMemo } from 'react';
|
|
6
7
|
const normalizeNavigationTarget = ({ path, pathname, search })=>{
|
|
7
8
|
if (path.startsWith('http')) {
|
|
@@ -44,21 +45,47 @@ export const TanStackRouterAdapter = ({ children })=>{
|
|
|
44
45
|
}, [
|
|
45
46
|
params
|
|
46
47
|
]);
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
// Split a target into `to` (pathname) + a parsed `search` object, so the
|
|
49
|
+
// router serializes the query via its `stringifySearch` (qs, bracket-encoded)
|
|
50
|
+
// rather than embedding the raw string in `to`. Navigating with a string `to`
|
|
51
|
+
// leaves the search *unencoded* in `window.location.search`
|
|
52
|
+
// (e.g. `where[or][0]…`), which then never matches Payload's `qs.stringify`
|
|
53
|
+
// output (`where%5Bor%5D…`) — breaking the list-view `syncPropsToURL` guard,
|
|
54
|
+
// which compares the two and would otherwise clobber optimistic query state
|
|
55
|
+
// (e.g. an in-progress filter condition) on every navigation.
|
|
56
|
+
const toNavOptions = useCallback((path)=>{
|
|
51
57
|
const relativePath = normalizeNavigationTarget({
|
|
52
58
|
path,
|
|
53
59
|
pathname: window.location.pathname,
|
|
54
60
|
search: window.location.search
|
|
55
61
|
});
|
|
62
|
+
const queryIndex = relativePath.indexOf('?');
|
|
63
|
+
if (queryIndex === -1) {
|
|
64
|
+
return {
|
|
65
|
+
to: relativePath
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
const searchObject = qs.parse(relativePath.slice(queryIndex + 1), {
|
|
69
|
+
depth: 10,
|
|
70
|
+
ignoreQueryPrefix: true
|
|
71
|
+
});
|
|
72
|
+
// Function form replaces the search entirely (no merge with current search).
|
|
73
|
+
return {
|
|
74
|
+
search: ()=>searchObject,
|
|
75
|
+
to: relativePath.slice(0, queryIndex)
|
|
76
|
+
};
|
|
77
|
+
}, []);
|
|
78
|
+
const back = useCallback(()=>router.history.back(), [
|
|
79
|
+
router
|
|
80
|
+
]);
|
|
81
|
+
const push = useCallback((path, options)=>{
|
|
56
82
|
void router.navigate({
|
|
57
|
-
|
|
58
|
-
|
|
83
|
+
...toNavOptions(path),
|
|
84
|
+
resetScroll: options?.scroll
|
|
59
85
|
});
|
|
60
86
|
}, [
|
|
61
|
-
router
|
|
87
|
+
router,
|
|
88
|
+
toNavOptions
|
|
62
89
|
]);
|
|
63
90
|
const refresh = useCallback(()=>{
|
|
64
91
|
void router.invalidate();
|
|
@@ -66,18 +93,14 @@ export const TanStackRouterAdapter = ({ children })=>{
|
|
|
66
93
|
router
|
|
67
94
|
]);
|
|
68
95
|
const replace = useCallback((path, options)=>{
|
|
69
|
-
const relativePath = normalizeNavigationTarget({
|
|
70
|
-
path,
|
|
71
|
-
pathname: window.location.pathname,
|
|
72
|
-
search: window.location.search
|
|
73
|
-
});
|
|
74
96
|
void router.navigate({
|
|
97
|
+
...toNavOptions(path),
|
|
75
98
|
replace: true,
|
|
76
|
-
resetScroll: options?.scroll
|
|
77
|
-
to: relativePath
|
|
99
|
+
resetScroll: options?.scroll
|
|
78
100
|
});
|
|
79
101
|
}, [
|
|
80
|
-
router
|
|
102
|
+
router,
|
|
103
|
+
toNavOptions
|
|
81
104
|
]);
|
|
82
105
|
const adaptedRouter = useMemo(()=>({
|
|
83
106
|
back,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/elements/RouterAdapter/index.tsx"],"sourcesContent":["'use client'\n\nimport type { RouterAdapterContextValue } from '@payloadcms/ui'\nimport type { LinkAdapterProps, RouterAdapterComponent } from 'payload'\n\nimport { RouterAdapterContext } from '@payloadcms/ui'\nimport { Link as TanStackLink, useLocation, useParams, useRouter } from '@tanstack/react-router'\nimport React, { useCallback, useMemo } from 'react'\n\nconst normalizeNavigationTarget = ({\n path,\n pathname,\n search,\n}: {\n path: string\n pathname: string\n search: string\n}) => {\n if (path.startsWith('http')) {\n const url = new URL(path)\n return `${url.pathname}${url.search}${url.hash}`\n }\n\n if (path.startsWith('?')) {\n return `${pathname}${path}`\n }\n\n if (path.startsWith('#')) {\n return `${pathname}${search}${path}`\n }\n\n return path\n}\n\nconst TanStackLinkAdapter: React.FC<LinkAdapterProps> = ({\n children,\n href,\n prefetch,\n ref,\n replace,\n scroll,\n ...rest\n}) => {\n return (\n <TanStackLink\n preload={prefetch === false ? false : 'intent'}\n ref={ref}\n replace={replace}\n resetScroll={scroll}\n to={href}\n {...rest}\n >\n {children}\n </TanStackLink>\n )\n}\n\nexport const TanStackRouterAdapter: RouterAdapterComponent = ({ children }) => {\n const router = useRouter()\n const location = useLocation()\n const params = useParams({ strict: false })\n\n const adaptedParams = useMemo(() => {\n const adapted: Record<string, string | string[]> = { ...params }\n if ('_splat' in params && typeof params._splat === 'string') {\n adapted.segments = params._splat.split('/').filter(Boolean)\n }\n return adapted\n }, [params])\n\n
|
|
1
|
+
{"version":3,"sources":["../../../src/elements/RouterAdapter/index.tsx"],"sourcesContent":["'use client'\n\nimport type { RouterAdapterContextValue } from '@payloadcms/ui'\nimport type { LinkAdapterProps, RouterAdapterComponent } from 'payload'\n\nimport { RouterAdapterContext } from '@payloadcms/ui'\nimport { Link as TanStackLink, useLocation, useParams, useRouter } from '@tanstack/react-router'\nimport * as qs from 'qs-esm'\nimport React, { useCallback, useMemo } from 'react'\n\nconst normalizeNavigationTarget = ({\n path,\n pathname,\n search,\n}: {\n path: string\n pathname: string\n search: string\n}) => {\n if (path.startsWith('http')) {\n const url = new URL(path)\n return `${url.pathname}${url.search}${url.hash}`\n }\n\n if (path.startsWith('?')) {\n return `${pathname}${path}`\n }\n\n if (path.startsWith('#')) {\n return `${pathname}${search}${path}`\n }\n\n return path\n}\n\nconst TanStackLinkAdapter: React.FC<LinkAdapterProps> = ({\n children,\n href,\n prefetch,\n ref,\n replace,\n scroll,\n ...rest\n}) => {\n return (\n <TanStackLink\n preload={prefetch === false ? false : 'intent'}\n ref={ref}\n replace={replace}\n resetScroll={scroll}\n to={href}\n {...rest}\n >\n {children}\n </TanStackLink>\n )\n}\n\nexport const TanStackRouterAdapter: RouterAdapterComponent = ({ children }) => {\n const router = useRouter()\n const location = useLocation()\n const params = useParams({ strict: false })\n\n const adaptedParams = useMemo(() => {\n const adapted: Record<string, string | string[]> = { ...params }\n if ('_splat' in params && typeof params._splat === 'string') {\n adapted.segments = params._splat.split('/').filter(Boolean)\n }\n return adapted\n }, [params])\n\n // Split a target into `to` (pathname) + a parsed `search` object, so the\n // router serializes the query via its `stringifySearch` (qs, bracket-encoded)\n // rather than embedding the raw string in `to`. Navigating with a string `to`\n // leaves the search *unencoded* in `window.location.search`\n // (e.g. `where[or][0]…`), which then never matches Payload's `qs.stringify`\n // output (`where%5Bor%5D…`) — breaking the list-view `syncPropsToURL` guard,\n // which compares the two and would otherwise clobber optimistic query state\n // (e.g. an in-progress filter condition) on every navigation.\n const toNavOptions = useCallback((path: string) => {\n const relativePath = normalizeNavigationTarget({\n path,\n pathname: window.location.pathname,\n search: window.location.search,\n })\n const queryIndex = relativePath.indexOf('?')\n if (queryIndex === -1) {\n return { to: relativePath }\n }\n const searchObject = qs.parse(relativePath.slice(queryIndex + 1), {\n depth: 10,\n ignoreQueryPrefix: true,\n })\n // Function form replaces the search entirely (no merge with current search).\n return { search: () => searchObject, to: relativePath.slice(0, queryIndex) }\n }, [])\n\n const back = useCallback(() => router.history.back(), [router])\n const push = useCallback(\n (path: string, options?: { scroll?: boolean }) => {\n void router.navigate({ ...toNavOptions(path), resetScroll: options?.scroll })\n },\n [router, toNavOptions],\n )\n const refresh = useCallback(() => {\n void router.invalidate()\n }, [router])\n const replace = useCallback(\n (path: string, options?: { scroll?: boolean }) => {\n void router.navigate({ ...toNavOptions(path), replace: true, resetScroll: options?.scroll })\n },\n [router, toNavOptions],\n )\n\n const adaptedRouter = useMemo(\n () => ({ back, push, refresh, replace }),\n [back, push, refresh, replace],\n )\n\n // `location.searchStr` is the serialized query string; `location.search` is\n // the parsed object (a nested structure once the router uses `qs` for search\n // serialization), which `URLSearchParams` cannot consume. Build from the\n // string so Payload's `parseSearchParams` re-parses the bracket notation.\n const searchParams = useMemo(() => new URLSearchParams(location.searchStr), [location.searchStr])\n\n const value: RouterAdapterContextValue = useMemo(\n () => ({\n Link: TanStackLinkAdapter,\n params: adaptedParams,\n pathname: location.pathname,\n router: adaptedRouter,\n searchParams,\n }),\n [adaptedParams, location.pathname, adaptedRouter, searchParams],\n )\n\n return <RouterAdapterContext value={value}>{children}</RouterAdapterContext>\n}\n"],"names":["RouterAdapterContext","Link","TanStackLink","useLocation","useParams","useRouter","qs","React","useCallback","useMemo","normalizeNavigationTarget","path","pathname","search","startsWith","url","URL","hash","TanStackLinkAdapter","children","href","prefetch","ref","replace","scroll","rest","preload","resetScroll","to","TanStackRouterAdapter","router","location","params","strict","adaptedParams","adapted","_splat","segments","split","filter","Boolean","toNavOptions","relativePath","window","queryIndex","indexOf","searchObject","parse","slice","depth","ignoreQueryPrefix","back","history","push","options","navigate","refresh","invalidate","adaptedRouter","searchParams","URLSearchParams","searchStr","value"],"mappings":"AAAA;;AAKA,SAASA,oBAAoB,QAAQ,iBAAgB;AACrD,SAASC,QAAQC,YAAY,EAAEC,WAAW,EAAEC,SAAS,EAAEC,SAAS,QAAQ,yBAAwB;AAChG,YAAYC,QAAQ,SAAQ;AAC5B,OAAOC,SAASC,WAAW,EAAEC,OAAO,QAAQ,QAAO;AAEnD,MAAMC,4BAA4B,CAAC,EACjCC,IAAI,EACJC,QAAQ,EACRC,MAAM,EAKP;IACC,IAAIF,KAAKG,UAAU,CAAC,SAAS;QAC3B,MAAMC,MAAM,IAAIC,IAAIL;QACpB,OAAO,GAAGI,IAAIH,QAAQ,GAAGG,IAAIF,MAAM,GAAGE,IAAIE,IAAI,EAAE;IAClD;IAEA,IAAIN,KAAKG,UAAU,CAAC,MAAM;QACxB,OAAO,GAAGF,WAAWD,MAAM;IAC7B;IAEA,IAAIA,KAAKG,UAAU,CAAC,MAAM;QACxB,OAAO,GAAGF,WAAWC,SAASF,MAAM;IACtC;IAEA,OAAOA;AACT;AAEA,MAAMO,sBAAkD,CAAC,EACvDC,QAAQ,EACRC,IAAI,EACJC,QAAQ,EACRC,GAAG,EACHC,OAAO,EACPC,MAAM,EACN,GAAGC,MACJ;IACC,qBACE,KAACvB;QACCwB,SAASL,aAAa,QAAQ,QAAQ;QACtCC,KAAKA;QACLC,SAASA;QACTI,aAAaH;QACbI,IAAIR;QACH,GAAGK,IAAI;kBAEPN;;AAGP;AAEA,OAAO,MAAMU,wBAAgD,CAAC,EAAEV,QAAQ,EAAE;IACxE,MAAMW,SAASzB;IACf,MAAM0B,WAAW5B;IACjB,MAAM6B,SAAS5B,UAAU;QAAE6B,QAAQ;IAAM;IAEzC,MAAMC,gBAAgBzB,QAAQ;QAC5B,MAAM0B,UAA6C;YAAE,GAAGH,MAAM;QAAC;QAC/D,IAAI,YAAYA,UAAU,OAAOA,OAAOI,MAAM,KAAK,UAAU;YAC3DD,QAAQE,QAAQ,GAAGL,OAAOI,MAAM,CAACE,KAAK,CAAC,KAAKC,MAAM,CAACC;QACrD;QACA,OAAOL;IACT,GAAG;QAACH;KAAO;IAEX,yEAAyE;IACzE,8EAA8E;IAC9E,8EAA8E;IAC9E,4DAA4D;IAC5D,4EAA4E;IAC5E,6EAA6E;IAC7E,4EAA4E;IAC5E,8DAA8D;IAC9D,MAAMS,eAAejC,YAAY,CAACG;QAChC,MAAM+B,eAAehC,0BAA0B;YAC7CC;YACAC,UAAU+B,OAAOZ,QAAQ,CAACnB,QAAQ;YAClCC,QAAQ8B,OAAOZ,QAAQ,CAAClB,MAAM;QAChC;QACA,MAAM+B,aAAaF,aAAaG,OAAO,CAAC;QACxC,IAAID,eAAe,CAAC,GAAG;YACrB,OAAO;gBAAEhB,IAAIc;YAAa;QAC5B;QACA,MAAMI,eAAexC,GAAGyC,KAAK,CAACL,aAAaM,KAAK,CAACJ,aAAa,IAAI;YAChEK,OAAO;YACPC,mBAAmB;QACrB;QACA,6EAA6E;QAC7E,OAAO;YAAErC,QAAQ,IAAMiC;YAAclB,IAAIc,aAAaM,KAAK,CAAC,GAAGJ;QAAY;IAC7E,GAAG,EAAE;IAEL,MAAMO,OAAO3C,YAAY,IAAMsB,OAAOsB,OAAO,CAACD,IAAI,IAAI;QAACrB;KAAO;IAC9D,MAAMuB,OAAO7C,YACX,CAACG,MAAc2C;QACb,KAAKxB,OAAOyB,QAAQ,CAAC;YAAE,GAAGd,aAAa9B,KAAK;YAAEgB,aAAa2B,SAAS9B;QAAO;IAC7E,GACA;QAACM;QAAQW;KAAa;IAExB,MAAMe,UAAUhD,YAAY;QAC1B,KAAKsB,OAAO2B,UAAU;IACxB,GAAG;QAAC3B;KAAO;IACX,MAAMP,UAAUf,YACd,CAACG,MAAc2C;QACb,KAAKxB,OAAOyB,QAAQ,CAAC;YAAE,GAAGd,aAAa9B,KAAK;YAAEY,SAAS;YAAMI,aAAa2B,SAAS9B;QAAO;IAC5F,GACA;QAACM;QAAQW;KAAa;IAGxB,MAAMiB,gBAAgBjD,QACpB,IAAO,CAAA;YAAE0C;YAAME;YAAMG;YAASjC;QAAQ,CAAA,GACtC;QAAC4B;QAAME;QAAMG;QAASjC;KAAQ;IAGhC,4EAA4E;IAC5E,6EAA6E;IAC7E,yEAAyE;IACzE,0EAA0E;IAC1E,MAAMoC,eAAelD,QAAQ,IAAM,IAAImD,gBAAgB7B,SAAS8B,SAAS,GAAG;QAAC9B,SAAS8B,SAAS;KAAC;IAEhG,MAAMC,QAAmCrD,QACvC,IAAO,CAAA;YACLR,MAAMiB;YACNc,QAAQE;YACRtB,UAAUmB,SAASnB,QAAQ;YAC3BkB,QAAQ4B;YACRC;QACF,CAAA,GACA;QAACzB;QAAeH,SAASnB,QAAQ;QAAE8C;QAAeC;KAAa;IAGjE,qBAAO,KAAC3D;QAAqB8D,OAAOA;kBAAQ3C;;AAC9C,EAAC"}
|
package/dist/exports/client.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { TanStackComponentRenderer } from '../elements/RenderComponent/index.js';
|
|
2
2
|
export { TanStackRouterAdapter } from '../elements/RouterAdapter/index.js';
|
|
3
|
+
export { buildThemeInitScript, PayloadAdminShell, type PayloadAdminShellProps, THEME_INIT_SCRIPT, withPayloadRoot, type WithPayloadRootOptions, } from '../layouts/Root/withPayloadRoot.js';
|
|
3
4
|
export { viteDevReloadStrategy } from '../utilities/devReloadStrategy.js';
|
|
4
5
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/exports/client.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAA;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAA;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAA"}
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/exports/client.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAA;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAA;AAC1E,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,KAAK,sBAAsB,EAC3B,iBAAiB,EACjB,eAAe,EACf,KAAK,sBAAsB,GAC5B,MAAM,oCAAoC,CAAA;AAC3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAA"}
|
package/dist/exports/client.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
export { TanStackComponentRenderer } from '../elements/RenderComponent/index.js';
|
|
3
3
|
export { TanStackRouterAdapter } from '../elements/RouterAdapter/index.js';
|
|
4
|
+
export { buildThemeInitScript, PayloadAdminShell, THEME_INIT_SCRIPT, withPayloadRoot } from '../layouts/Root/withPayloadRoot.js';
|
|
4
5
|
export { viteDevReloadStrategy } from '../utilities/devReloadStrategy.js';
|
|
5
6
|
|
|
6
7
|
//# sourceMappingURL=client.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/exports/client.ts"],"sourcesContent":["'use client'\n\nexport { TanStackComponentRenderer } from '../elements/RenderComponent/index.js'\nexport { TanStackRouterAdapter } from '../elements/RouterAdapter/index.js'\nexport { viteDevReloadStrategy } from '../utilities/devReloadStrategy.js'\n"],"names":["TanStackComponentRenderer","TanStackRouterAdapter","viteDevReloadStrategy"],"mappings":"AAAA;AAEA,SAASA,yBAAyB,QAAQ,uCAAsC;AAChF,SAASC,qBAAqB,QAAQ,qCAAoC;AAC1E,SAASC,qBAAqB,QAAQ,oCAAmC"}
|
|
1
|
+
{"version":3,"sources":["../../src/exports/client.ts"],"sourcesContent":["'use client'\n\nexport { TanStackComponentRenderer } from '../elements/RenderComponent/index.js'\nexport { TanStackRouterAdapter } from '../elements/RouterAdapter/index.js'\nexport {\n buildThemeInitScript,\n PayloadAdminShell,\n type PayloadAdminShellProps,\n THEME_INIT_SCRIPT,\n withPayloadRoot,\n type WithPayloadRootOptions,\n} from '../layouts/Root/withPayloadRoot.js'\nexport { viteDevReloadStrategy } from '../utilities/devReloadStrategy.js'\n"],"names":["TanStackComponentRenderer","TanStackRouterAdapter","buildThemeInitScript","PayloadAdminShell","THEME_INIT_SCRIPT","withPayloadRoot","viteDevReloadStrategy"],"mappings":"AAAA;AAEA,SAASA,yBAAyB,QAAQ,uCAAsC;AAChF,SAASC,qBAAqB,QAAQ,qCAAoC;AAC1E,SACEC,oBAAoB,EACpBC,iBAAiB,EAEjBC,iBAAiB,EACjBC,eAAe,QAEV,qCAAoC;AAC3C,SAASC,qBAAqB,QAAQ,oCAAmC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getLayoutData.d.ts","sourceRoot":"","sources":["../../../src/layouts/Root/getLayoutData.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAmB,eAAe,
|
|
1
|
+
{"version":3,"file":"getLayoutData.d.ts","sourceRoot":"","sources":["../../../src/layouts/Root/getLayoutData.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAmB,eAAe,EAAe,MAAM,SAAS,CAAA;AASvF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAKhD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,aAAa,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,eAAe,CAAA;IACzD,SAAS,EAAE,SAAS,CAAA;CACrB,CAAA;AAED;;;GAGG;AACH,wBAAsB,aAAa,CAAC,EAClC,aAAa,EACb,SAAS,GACV,EAAE,iBAAiB,GAAG,OAAO,CAAC,cAAc,CAAC,CAsF7C"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { getNavPrefs } from '@payloadcms/ui/elements/Nav/getNavPrefs';
|
|
2
|
+
import { RenderServerComponent } from '@payloadcms/ui/elements/RenderServerComponent';
|
|
2
3
|
import { getClientConfig } from '@payloadcms/ui/utilities/getClientConfig';
|
|
4
|
+
import { Outlet } from '@tanstack/react-router';
|
|
3
5
|
import { applyLocaleFiltering } from 'payload/shared';
|
|
6
|
+
import { createElement } from 'react';
|
|
4
7
|
import { getRequestTheme } from '../../utilities/getRequestTheme.js';
|
|
5
8
|
import { initReq } from '../../utilities/initReq.server.js';
|
|
6
9
|
/**
|
|
@@ -37,6 +40,38 @@ import { initReq } from '../../utilities/initReq.server.js';
|
|
|
37
40
|
config,
|
|
38
41
|
req
|
|
39
42
|
});
|
|
43
|
+
// Build the custom admin provider tree (`config.admin.components.providers`)
|
|
44
|
+
// nested around the router `<Outlet />`, mirroring the Next adapter's
|
|
45
|
+
// `NestProviders`. Returned as an unrendered element; the caller's server
|
|
46
|
+
// function renders it to an RSC payload (so server-component providers run
|
|
47
|
+
// server-side and client providers wrap the live Outlet). `undefined` when
|
|
48
|
+
// no custom providers are configured — the caller falls back to `<Outlet />`.
|
|
49
|
+
const providerPaths = config.admin?.components?.providers;
|
|
50
|
+
let providers = undefined;
|
|
51
|
+
if (Array.isArray(providerPaths) && providerPaths.length > 0) {
|
|
52
|
+
const serverProps = {
|
|
53
|
+
i18n: req.i18n,
|
|
54
|
+
params: {},
|
|
55
|
+
payload: req.payload,
|
|
56
|
+
permissions,
|
|
57
|
+
searchParams: {},
|
|
58
|
+
server: req.server,
|
|
59
|
+
user: req.user ?? undefined
|
|
60
|
+
};
|
|
61
|
+
// Mirror the Next adapter's `NestProviders`: render each configured provider
|
|
62
|
+
// via `RenderServerComponent` so the entry's own `clientProps`/`serverProps`
|
|
63
|
+
// (e.g. plugin-multi-tenant's `userHasAccessToAllTenants`) are merged in, and
|
|
64
|
+
// server components receive `serverProps` while client components get only
|
|
65
|
+
// `clientProps`. Nested around the router `<Outlet />` instead of `children`.
|
|
66
|
+
providers = providerPaths.reduceRight((children, provider)=>RenderServerComponent({
|
|
67
|
+
clientProps: {
|
|
68
|
+
children
|
|
69
|
+
},
|
|
70
|
+
Component: provider,
|
|
71
|
+
importMap,
|
|
72
|
+
serverProps
|
|
73
|
+
}), createElement(Outlet));
|
|
74
|
+
}
|
|
40
75
|
return {
|
|
41
76
|
clientConfig,
|
|
42
77
|
dateFNSKey: req.i18n.dateFNSKey,
|
|
@@ -46,6 +81,7 @@ import { initReq } from '../../utilities/initReq.server.js';
|
|
|
46
81
|
languageOptions,
|
|
47
82
|
locale: req.locale ?? undefined,
|
|
48
83
|
permissions,
|
|
84
|
+
providers,
|
|
49
85
|
theme,
|
|
50
86
|
translations: req.i18n.translations,
|
|
51
87
|
user: req.user
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/layouts/Root/getLayoutData.ts"],"sourcesContent":["import type { AcceptedLanguages } from '@payloadcms/translations'\nimport type { ImportMap, LanguageOptions, SanitizedConfig } from 'payload'\n\nimport { getNavPrefs } from '@payloadcms/ui/elements/Nav/getNavPrefs'\nimport { getClientConfig } from '@payloadcms/ui/utilities/getClientConfig'\nimport { applyLocaleFiltering } from 'payload/shared'\n\nimport type { RootLayoutData } from './index.js'\n\nimport { getRequestTheme } from '../../utilities/getRequestTheme.js'\nimport { initReq } from '../../utilities/initReq.server.js'\n\nexport type GetLayoutDataArgs = {\n configPromise: Promise<SanitizedConfig> | SanitizedConfig\n importMap: ImportMap\n}\n\n/**\n * Fetches all data needed by the root admin layout.\n * Call this in your TanStack Start root route loader.\n */\nexport async function getLayoutData({\n configPromise,\n importMap,\n}: GetLayoutDataArgs): Promise<RootLayoutData> {\n const {\n cookies,\n headers,\n languageCode,\n permissions,\n req,\n req: {\n payload: { config },\n },\n } = await initReq({ configPromise, importMap })\n\n const theme = getRequestTheme({ config, cookies, headers })\n\n const languageOptions: LanguageOptions = Object.entries(\n config.i18n.supportedLanguages || {},\n ).reduce((acc, [language, languageConfig]) => {\n if (Object.keys(config.i18n.supportedLanguages).includes(language)) {\n acc.push({\n label: languageConfig.translations.general.thisLanguage,\n value: language as AcceptedLanguages,\n })\n }\n return acc\n }, [] as LanguageOptions)\n\n const navPrefs = await getNavPrefs(req)\n\n const clientConfig = getClientConfig({\n config,\n i18n: req.i18n,\n importMap,\n user: req.user ?? true,\n })\n\n await applyLocaleFiltering({ clientConfig, config, req })\n\n return {\n clientConfig,\n dateFNSKey: req.i18n.dateFNSKey,\n fallbackLang: config.i18n.fallbackLanguage,\n isNavOpen: navPrefs?.open ?? true,\n languageCode,\n languageOptions,\n locale: req.locale ?? undefined,\n permissions,\n theme,\n translations: req.i18n.translations,\n user: req.user,\n }\n}\n"],"names":["getNavPrefs","getClientConfig","applyLocaleFiltering","getRequestTheme","initReq","getLayoutData","configPromise","importMap","cookies","headers","languageCode","permissions","req","payload","config","theme","languageOptions","Object","entries","i18n","supportedLanguages","reduce","acc","language","languageConfig","keys","includes","push","label","translations","general","thisLanguage","value","navPrefs","clientConfig","user","dateFNSKey","fallbackLang","fallbackLanguage","isNavOpen","open","locale"
|
|
1
|
+
{"version":3,"sources":["../../../src/layouts/Root/getLayoutData.ts"],"sourcesContent":["import type { AcceptedLanguages } from '@payloadcms/translations'\nimport type { ImportMap, LanguageOptions, SanitizedConfig, ServerProps } from 'payload'\n\nimport { getNavPrefs } from '@payloadcms/ui/elements/Nav/getNavPrefs'\nimport { RenderServerComponent } from '@payloadcms/ui/elements/RenderServerComponent'\nimport { getClientConfig } from '@payloadcms/ui/utilities/getClientConfig'\nimport { Outlet } from '@tanstack/react-router'\nimport { applyLocaleFiltering } from 'payload/shared'\nimport { createElement } from 'react'\n\nimport type { RootLayoutData } from './index.js'\n\nimport { getRequestTheme } from '../../utilities/getRequestTheme.js'\nimport { initReq } from '../../utilities/initReq.server.js'\n\nexport type GetLayoutDataArgs = {\n configPromise: Promise<SanitizedConfig> | SanitizedConfig\n importMap: ImportMap\n}\n\n/**\n * Fetches all data needed by the root admin layout.\n * Call this in your TanStack Start root route loader.\n */\nexport async function getLayoutData({\n configPromise,\n importMap,\n}: GetLayoutDataArgs): Promise<RootLayoutData> {\n const {\n cookies,\n headers,\n languageCode,\n permissions,\n req,\n req: {\n payload: { config },\n },\n } = await initReq({ configPromise, importMap })\n\n const theme = getRequestTheme({ config, cookies, headers })\n\n const languageOptions: LanguageOptions = Object.entries(\n config.i18n.supportedLanguages || {},\n ).reduce((acc, [language, languageConfig]) => {\n if (Object.keys(config.i18n.supportedLanguages).includes(language)) {\n acc.push({\n label: languageConfig.translations.general.thisLanguage,\n value: language as AcceptedLanguages,\n })\n }\n return acc\n }, [] as LanguageOptions)\n\n const navPrefs = await getNavPrefs(req)\n\n const clientConfig = getClientConfig({\n config,\n i18n: req.i18n,\n importMap,\n user: req.user ?? true,\n })\n\n await applyLocaleFiltering({ clientConfig, config, req })\n\n // Build the custom admin provider tree (`config.admin.components.providers`)\n // nested around the router `<Outlet />`, mirroring the Next adapter's\n // `NestProviders`. Returned as an unrendered element; the caller's server\n // function renders it to an RSC payload (so server-component providers run\n // server-side and client providers wrap the live Outlet). `undefined` when\n // no custom providers are configured — the caller falls back to `<Outlet />`.\n const providerPaths = config.admin?.components?.providers\n let providers: React.ReactNode = undefined\n if (Array.isArray(providerPaths) && providerPaths.length > 0) {\n const serverProps: ServerProps = {\n i18n: req.i18n,\n params: {},\n payload: req.payload,\n permissions,\n searchParams: {},\n server: req.server,\n user: req.user ?? undefined,\n }\n // Mirror the Next adapter's `NestProviders`: render each configured provider\n // via `RenderServerComponent` so the entry's own `clientProps`/`serverProps`\n // (e.g. plugin-multi-tenant's `userHasAccessToAllTenants`) are merged in, and\n // server components receive `serverProps` while client components get only\n // `clientProps`. Nested around the router `<Outlet />` instead of `children`.\n providers = providerPaths.reduceRight<React.ReactNode>(\n (children, provider) =>\n RenderServerComponent({\n clientProps: { children },\n Component: provider,\n importMap,\n serverProps,\n }),\n createElement(Outlet),\n )\n }\n\n return {\n clientConfig,\n dateFNSKey: req.i18n.dateFNSKey,\n fallbackLang: config.i18n.fallbackLanguage,\n isNavOpen: navPrefs?.open ?? true,\n languageCode,\n languageOptions,\n locale: req.locale ?? undefined,\n permissions,\n providers,\n theme,\n translations: req.i18n.translations,\n user: req.user,\n }\n}\n"],"names":["getNavPrefs","RenderServerComponent","getClientConfig","Outlet","applyLocaleFiltering","createElement","getRequestTheme","initReq","getLayoutData","configPromise","importMap","cookies","headers","languageCode","permissions","req","payload","config","theme","languageOptions","Object","entries","i18n","supportedLanguages","reduce","acc","language","languageConfig","keys","includes","push","label","translations","general","thisLanguage","value","navPrefs","clientConfig","user","providerPaths","admin","components","providers","undefined","Array","isArray","length","serverProps","params","searchParams","server","reduceRight","children","provider","clientProps","Component","dateFNSKey","fallbackLang","fallbackLanguage","isNavOpen","open","locale"],"mappings":"AAGA,SAASA,WAAW,QAAQ,0CAAyC;AACrE,SAASC,qBAAqB,QAAQ,gDAA+C;AACrF,SAASC,eAAe,QAAQ,2CAA0C;AAC1E,SAASC,MAAM,QAAQ,yBAAwB;AAC/C,SAASC,oBAAoB,QAAQ,iBAAgB;AACrD,SAASC,aAAa,QAAQ,QAAO;AAIrC,SAASC,eAAe,QAAQ,qCAAoC;AACpE,SAASC,OAAO,QAAQ,oCAAmC;AAO3D;;;CAGC,GACD,OAAO,eAAeC,cAAc,EAClCC,aAAa,EACbC,SAAS,EACS;IAClB,MAAM,EACJC,OAAO,EACPC,OAAO,EACPC,YAAY,EACZC,WAAW,EACXC,GAAG,EACHA,KAAK,EACHC,SAAS,EAAEC,MAAM,EAAE,EACpB,EACF,GAAG,MAAMV,QAAQ;QAAEE;QAAeC;IAAU;IAE7C,MAAMQ,QAAQZ,gBAAgB;QAAEW;QAAQN;QAASC;IAAQ;IAEzD,MAAMO,kBAAmCC,OAAOC,OAAO,CACrDJ,OAAOK,IAAI,CAACC,kBAAkB,IAAI,CAAC,GACnCC,MAAM,CAAC,CAACC,KAAK,CAACC,UAAUC,eAAe;QACvC,IAAIP,OAAOQ,IAAI,CAACX,OAAOK,IAAI,CAACC,kBAAkB,EAAEM,QAAQ,CAACH,WAAW;YAClED,IAAIK,IAAI,CAAC;gBACPC,OAAOJ,eAAeK,YAAY,CAACC,OAAO,CAACC,YAAY;gBACvDC,OAAOT;YACT;QACF;QACA,OAAOD;IACT,GAAG,EAAE;IAEL,MAAMW,WAAW,MAAMpC,YAAYe;IAEnC,MAAMsB,eAAenC,gBAAgB;QACnCe;QACAK,MAAMP,IAAIO,IAAI;QACdZ;QACA4B,MAAMvB,IAAIuB,IAAI,IAAI;IACpB;IAEA,MAAMlC,qBAAqB;QAAEiC;QAAcpB;QAAQF;IAAI;IAEvD,6EAA6E;IAC7E,sEAAsE;IACtE,0EAA0E;IAC1E,2EAA2E;IAC3E,2EAA2E;IAC3E,8EAA8E;IAC9E,MAAMwB,gBAAgBtB,OAAOuB,KAAK,EAAEC,YAAYC;IAChD,IAAIA,YAA6BC;IACjC,IAAIC,MAAMC,OAAO,CAACN,kBAAkBA,cAAcO,MAAM,GAAG,GAAG;QAC5D,MAAMC,cAA2B;YAC/BzB,MAAMP,IAAIO,IAAI;YACd0B,QAAQ,CAAC;YACThC,SAASD,IAAIC,OAAO;YACpBF;YACAmC,cAAc,CAAC;YACfC,QAAQnC,IAAImC,MAAM;YAClBZ,MAAMvB,IAAIuB,IAAI,IAAIK;QACpB;QACA,6EAA6E;QAC7E,6EAA6E;QAC7E,8EAA8E;QAC9E,2EAA2E;QAC3E,8EAA8E;QAC9ED,YAAYH,cAAcY,WAAW,CACnC,CAACC,UAAUC,WACTpD,sBAAsB;gBACpBqD,aAAa;oBAAEF;gBAAS;gBACxBG,WAAWF;gBACX3C;gBACAqC;YACF,IACF1C,cAAcF;IAElB;IAEA,OAAO;QACLkC;QACAmB,YAAYzC,IAAIO,IAAI,CAACkC,UAAU;QAC/BC,cAAcxC,OAAOK,IAAI,CAACoC,gBAAgB;QAC1CC,WAAWvB,UAAUwB,QAAQ;QAC7B/C;QACAM;QACA0C,QAAQ9C,IAAI8C,MAAM,IAAIlB;QACtB7B;QACA4B;QACAxB;QACAc,cAAcjB,IAAIO,IAAI,CAACU,YAAY;QACnCM,MAAMvB,IAAIuB,IAAI;IAChB;AACF"}
|
|
@@ -12,6 +12,13 @@ export type RootLayoutData = {
|
|
|
12
12
|
languageOptions: LanguageOptions;
|
|
13
13
|
locale?: string;
|
|
14
14
|
permissions: SanitizedPermissions;
|
|
15
|
+
/**
|
|
16
|
+
* Custom admin provider tree (`config.admin.components.providers`) nested
|
|
17
|
+
* around the router `<Outlet />`. Built unrendered by `getLayoutData`; the
|
|
18
|
+
* layout server function renders it to an RSC payload before it reaches the
|
|
19
|
+
* client. `undefined` when no custom providers are configured.
|
|
20
|
+
*/
|
|
21
|
+
providers?: React.ReactNode;
|
|
15
22
|
theme: Theme;
|
|
16
23
|
translations: I18nClient['translations'];
|
|
17
24
|
user: null | TypedUser;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layouts/Root/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAqB,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAC7E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,oBAAoB,EACpB,oBAAoB,EACpB,SAAS,EACV,MAAM,SAAS,CAAA;AAIhB,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,8BAA8B,CAAA;AAIrC,MAAM,MAAM,cAAc,GAAG;IAC3B,YAAY,EAAE,YAAY,CAAA;IAC1B,UAAU,EAAE,UAAU,CAAC,YAAY,CAAC,CAAA;IACpC,YAAY,EAAE,MAAM,CAAA;IACpB,SAAS,EAAE,OAAO,CAAA;IAClB,YAAY,EAAE,MAAM,CAAA;IACpB,eAAe,EAAE,eAAe,CAAA;IAChC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,oBAAoB,CAAA;IACjC,KAAK,EAAE,KAAK,CAAA;IACZ,YAAY,EAAE,UAAU,CAAC,cAAc,CAAC,CAAA;IACxC,IAAI,EAAE,IAAI,GAAG,SAAS,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IAClC,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAA;IAC7B,QAAQ,CAAC,cAAc,EAAE,oBAAoB,CAAA;CAC9C,CAAA;AAED,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,cAAc,EAAE,EAAE,eAAe,qBAgC7E"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layouts/Root/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAqB,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAC7E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,oBAAoB,EACpB,oBAAoB,EACpB,SAAS,EACV,MAAM,SAAS,CAAA;AAIhB,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,8BAA8B,CAAA;AAIrC,MAAM,MAAM,cAAc,GAAG;IAC3B,YAAY,EAAE,YAAY,CAAA;IAC1B,UAAU,EAAE,UAAU,CAAC,YAAY,CAAC,CAAA;IACpC,YAAY,EAAE,MAAM,CAAA;IACpB,SAAS,EAAE,OAAO,CAAA;IAClB,YAAY,EAAE,MAAM,CAAA;IACpB,eAAe,EAAE,eAAe,CAAA;IAChC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,oBAAoB,CAAA;IACjC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC3B,KAAK,EAAE,KAAK,CAAA;IACZ,YAAY,EAAE,UAAU,CAAC,cAAc,CAAC,CAAA;IACxC,IAAI,EAAE,IAAI,GAAG,SAAS,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IAClC,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAA;IAC7B,QAAQ,CAAC,cAAc,EAAE,oBAAoB,CAAA;CAC9C,CAAA;AAED,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,cAAc,EAAE,EAAE,eAAe,qBAgC7E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/layouts/Root/index.tsx"],"sourcesContent":["import type { AcceptedLanguages, I18nClient } from '@payloadcms/translations'\nimport type { Theme } from '@payloadcms/ui'\nimport type {\n ClientConfig,\n LanguageOptions,\n SanitizedPermissions,\n ServerFunctionClient,\n TypedUser,\n} from 'payload'\n\nimport { rtlLanguages } from '@payloadcms/translations'\nimport { ProgressBar, RootProvider } from '@payloadcms/ui'\nimport React from 'react'\nimport '@payloadcms/ui/scss/app.scss'\n\nimport { TanStackRouterAdapter } from '../../elements/RouterAdapter/index.js'\n\nexport type RootLayoutData = {\n clientConfig: ClientConfig\n dateFNSKey: I18nClient['dateFNSKey']\n fallbackLang: string\n isNavOpen: boolean\n languageCode: string\n languageOptions: LanguageOptions\n locale?: string\n permissions: SanitizedPermissions\n theme: Theme\n translations: I18nClient['translations']\n user: null | TypedUser\n}\n\nexport type RootLayoutProps = {\n readonly children: React.ReactNode\n readonly data: RootLayoutData\n readonly serverFunction: ServerFunctionClient\n}\n\nexport function RootLayout({ children, data, serverFunction }: RootLayoutProps) {\n const dir = (rtlLanguages as unknown as string[]).includes(data.languageCode) ? 'RTL' : 'LTR'\n\n return (\n <html data-theme={data.theme} dir={dir} lang={data.languageCode} suppressHydrationWarning>\n <head>\n <style>{`@layer payload-default, payload;`}</style>\n </head>\n <body>\n <RootProvider\n config={data.clientConfig}\n dateFNSKey={data.dateFNSKey}\n fallbackLang={data.fallbackLang as AcceptedLanguages}\n highContrastMode={false}\n isNavOpen={data.isNavOpen}\n languageCode={data.languageCode}\n languageOptions={data.languageOptions}\n locale={data.locale}\n permissions={(data.user ? data.permissions : null) as unknown as SanitizedPermissions}\n RouterAdapter={TanStackRouterAdapter}\n serverFunction={serverFunction}\n theme={data.theme}\n translations={data.translations}\n user={data.user}\n >\n <ProgressBar />\n {children}\n </RootProvider>\n <div id=\"portal\" />\n </body>\n </html>\n )\n}\n"],"names":["rtlLanguages","ProgressBar","RootProvider","React","TanStackRouterAdapter","RootLayout","children","data","serverFunction","dir","includes","languageCode","html","data-theme","theme","lang","suppressHydrationWarning","head","style","body","config","clientConfig","dateFNSKey","fallbackLang","highContrastMode","isNavOpen","languageOptions","locale","permissions","user","RouterAdapter","translations","div","id"],"mappings":";AAUA,SAASA,YAAY,QAAQ,2BAA0B;AACvD,SAASC,WAAW,EAAEC,YAAY,QAAQ,iBAAgB;AAC1D,OAAOC,WAAW,QAAO;AACzB,OAAO,+BAA8B;AAErC,SAASC,qBAAqB,QAAQ,wCAAuC;
|
|
1
|
+
{"version":3,"sources":["../../../src/layouts/Root/index.tsx"],"sourcesContent":["import type { AcceptedLanguages, I18nClient } from '@payloadcms/translations'\nimport type { Theme } from '@payloadcms/ui'\nimport type {\n ClientConfig,\n LanguageOptions,\n SanitizedPermissions,\n ServerFunctionClient,\n TypedUser,\n} from 'payload'\n\nimport { rtlLanguages } from '@payloadcms/translations'\nimport { ProgressBar, RootProvider } from '@payloadcms/ui'\nimport React from 'react'\nimport '@payloadcms/ui/scss/app.scss'\n\nimport { TanStackRouterAdapter } from '../../elements/RouterAdapter/index.js'\n\nexport type RootLayoutData = {\n clientConfig: ClientConfig\n dateFNSKey: I18nClient['dateFNSKey']\n fallbackLang: string\n isNavOpen: boolean\n languageCode: string\n languageOptions: LanguageOptions\n locale?: string\n permissions: SanitizedPermissions\n /**\n * Custom admin provider tree (`config.admin.components.providers`) nested\n * around the router `<Outlet />`. Built unrendered by `getLayoutData`; the\n * layout server function renders it to an RSC payload before it reaches the\n * client. `undefined` when no custom providers are configured.\n */\n providers?: React.ReactNode\n theme: Theme\n translations: I18nClient['translations']\n user: null | TypedUser\n}\n\nexport type RootLayoutProps = {\n readonly children: React.ReactNode\n readonly data: RootLayoutData\n readonly serverFunction: ServerFunctionClient\n}\n\nexport function RootLayout({ children, data, serverFunction }: RootLayoutProps) {\n const dir = (rtlLanguages as unknown as string[]).includes(data.languageCode) ? 'RTL' : 'LTR'\n\n return (\n <html data-theme={data.theme} dir={dir} lang={data.languageCode} suppressHydrationWarning>\n <head>\n <style>{`@layer payload-default, payload;`}</style>\n </head>\n <body>\n <RootProvider\n config={data.clientConfig}\n dateFNSKey={data.dateFNSKey}\n fallbackLang={data.fallbackLang as AcceptedLanguages}\n highContrastMode={false}\n isNavOpen={data.isNavOpen}\n languageCode={data.languageCode}\n languageOptions={data.languageOptions}\n locale={data.locale}\n permissions={(data.user ? data.permissions : null) as unknown as SanitizedPermissions}\n RouterAdapter={TanStackRouterAdapter}\n serverFunction={serverFunction}\n theme={data.theme}\n translations={data.translations}\n user={data.user}\n >\n <ProgressBar />\n {children}\n </RootProvider>\n <div id=\"portal\" />\n </body>\n </html>\n )\n}\n"],"names":["rtlLanguages","ProgressBar","RootProvider","React","TanStackRouterAdapter","RootLayout","children","data","serverFunction","dir","includes","languageCode","html","data-theme","theme","lang","suppressHydrationWarning","head","style","body","config","clientConfig","dateFNSKey","fallbackLang","highContrastMode","isNavOpen","languageOptions","locale","permissions","user","RouterAdapter","translations","div","id"],"mappings":";AAUA,SAASA,YAAY,QAAQ,2BAA0B;AACvD,SAASC,WAAW,EAAEC,YAAY,QAAQ,iBAAgB;AAC1D,OAAOC,WAAW,QAAO;AACzB,OAAO,+BAA8B;AAErC,SAASC,qBAAqB,QAAQ,wCAAuC;AA6B7E,OAAO,SAASC,WAAW,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,cAAc,EAAmB;IAC5E,MAAMC,MAAM,AAACT,aAAqCU,QAAQ,CAACH,KAAKI,YAAY,IAAI,QAAQ;IAExF,qBACE,MAACC;QAAKC,cAAYN,KAAKO,KAAK;QAAEL,KAAKA;QAAKM,MAAMR,KAAKI,YAAY;QAAEK,wBAAwB;;0BACvF,KAACC;0BACC,cAAA,KAACC;8BAAO,CAAC,gCAAgC,CAAC;;;0BAE5C,MAACC;;kCACC,MAACjB;wBACCkB,QAAQb,KAAKc,YAAY;wBACzBC,YAAYf,KAAKe,UAAU;wBAC3BC,cAAchB,KAAKgB,YAAY;wBAC/BC,kBAAkB;wBAClBC,WAAWlB,KAAKkB,SAAS;wBACzBd,cAAcJ,KAAKI,YAAY;wBAC/Be,iBAAiBnB,KAAKmB,eAAe;wBACrCC,QAAQpB,KAAKoB,MAAM;wBACnBC,aAAcrB,KAAKsB,IAAI,GAAGtB,KAAKqB,WAAW,GAAG;wBAC7CE,eAAe1B;wBACfI,gBAAgBA;wBAChBM,OAAOP,KAAKO,KAAK;wBACjBiB,cAAcxB,KAAKwB,YAAY;wBAC/BF,MAAMtB,KAAKsB,IAAI;;0CAEf,KAAC5B;4BACAK;;;kCAEH,KAAC0B;wBAAIC,IAAG;;;;;;AAIhB"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Builds the blocking inline script that sets `data-theme`, `lang`, and `dir`
|
|
4
|
+
* on `<html>` synchronously, before first paint, from Payload's theme and
|
|
5
|
+
* language cookies. This is the no-flash equivalent of what `RootProvider`'s
|
|
6
|
+
* `ThemeProvider` does in a post-hydration effect, hoisted into the SSR'd
|
|
7
|
+
* document head so the admin panel never flashes light mode (or LTR for RTL
|
|
8
|
+
* locales) on the first render. Mirrors `detectTheme` in
|
|
9
|
+
* `@payloadcms/ui`'s `ThemeProvider`.
|
|
10
|
+
*/
|
|
11
|
+
export declare function buildThemeInitScript(cookiePrefix?: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* The no-flash theme bootstrap script for the default (`payload`) cookie
|
|
14
|
+
* prefix. Inline this in a `<script dangerouslySetInnerHTML>` inside the
|
|
15
|
+
* document `<head>` to set `data-theme`/`lang`/`dir` before first paint.
|
|
16
|
+
*/
|
|
17
|
+
export declare const THEME_INIT_SCRIPT: string;
|
|
18
|
+
export type PayloadAdminShellProps = {
|
|
19
|
+
readonly children: React.ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* The `config.cookiePrefix` used to read the theme/language cookies in the
|
|
22
|
+
* no-flash bootstrap script. Defaults to `'payload'`.
|
|
23
|
+
*/
|
|
24
|
+
readonly cookiePrefix?: string;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* The `<html>` document shell for Payload admin routes — the TanStack Start
|
|
28
|
+
* equivalent of `@payloadcms/next`'s root layout `<html>`. Owns the no-flash
|
|
29
|
+
* theme script, the `@layer` ordering style, `@payloadcms/ui` styles,
|
|
30
|
+
* `<HeadContent />`, and `<Scripts />`. Render `RootProvider` (and the rest of
|
|
31
|
+
* the admin tree) as `children`.
|
|
32
|
+
*/
|
|
33
|
+
export declare function PayloadAdminShell({ children, cookiePrefix }: PayloadAdminShellProps): React.JSX.Element;
|
|
34
|
+
export type WithPayloadRootOptions = {
|
|
35
|
+
/**
|
|
36
|
+
* Path prefix that mounts the Payload admin panel (`config.routes.admin`).
|
|
37
|
+
* Routes under it render the Payload admin document shell; everything else
|
|
38
|
+
* renders your own shell. Defaults to `'/admin'`.
|
|
39
|
+
*/
|
|
40
|
+
adminRoute?: string;
|
|
41
|
+
/**
|
|
42
|
+
* The `config.cookiePrefix` used by the no-flash theme bootstrap script.
|
|
43
|
+
* Defaults to `'payload'`.
|
|
44
|
+
*/
|
|
45
|
+
cookiePrefix?: string;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Wraps your application's root document shell so Payload owns its own
|
|
49
|
+
* `<html>` chrome on admin routes while your shell renders everywhere else.
|
|
50
|
+
*
|
|
51
|
+
* Attach the result to the root route's `shellComponent`; it is the single
|
|
52
|
+
* integration touch point — no root loader and no manual data threading:
|
|
53
|
+
*
|
|
54
|
+
* ```tsx
|
|
55
|
+
* export const Route = createRootRoute({
|
|
56
|
+
* shellComponent: withPayloadRoot(MarketingHtml),
|
|
57
|
+
* })
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
export declare function withPayloadRoot(RootShell: React.ComponentType<{
|
|
61
|
+
children: React.ReactNode;
|
|
62
|
+
}>, options?: WithPayloadRootOptions): ({ children }: {
|
|
63
|
+
children: React.ReactNode;
|
|
64
|
+
}) => React.JSX.Element;
|
|
65
|
+
//# sourceMappingURL=withPayloadRoot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withPayloadRoot.d.ts","sourceRoot":"","sources":["../../../src/layouts/Root/withPayloadRoot.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,YAAY,GAAE,MAAkB,GAAG,MAAM,CAG7E;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAA+B,CAAA;AAE/D,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IAClC;;;OAGG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAC/B,CAAA;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,sBAAsB,qBAmBnF;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAC7B,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CAAC,EAC7D,OAAO,GAAE,sBAA2B,IAIH,cAAc;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,uBAc7E"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { rtlLanguages } from '@payloadcms/translations';
|
|
4
|
+
import { HeadContent, Scripts, useRouterState } from '@tanstack/react-router';
|
|
5
|
+
import React from 'react';
|
|
6
|
+
/**
|
|
7
|
+
* Builds the blocking inline script that sets `data-theme`, `lang`, and `dir`
|
|
8
|
+
* on `<html>` synchronously, before first paint, from Payload's theme and
|
|
9
|
+
* language cookies. This is the no-flash equivalent of what `RootProvider`'s
|
|
10
|
+
* `ThemeProvider` does in a post-hydration effect, hoisted into the SSR'd
|
|
11
|
+
* document head so the admin panel never flashes light mode (or LTR for RTL
|
|
12
|
+
* locales) on the first render. Mirrors `detectTheme` in
|
|
13
|
+
* `@payloadcms/ui`'s `ThemeProvider`.
|
|
14
|
+
*/ export function buildThemeInitScript(cookiePrefix = 'payload') {
|
|
15
|
+
const rtl = JSON.stringify(rtlLanguages);
|
|
16
|
+
return `(function(){try{var d=document.documentElement;var c=document.cookie.split('; ');function r(n){var row=c.find(function(x){return x.indexOf(n+'=')===0});return row?row.split('=')[1]:null}var t=r('${cookiePrefix}-theme');if(t!=='light'&&t!=='dark'){t=window.matchMedia&&window.matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light'}d.setAttribute('data-theme',t);var l=r('${cookiePrefix}-lng');if(l){d.setAttribute('lang',l);d.setAttribute('dir',${rtl}.indexOf(l)!==-1?'rtl':'ltr')}}catch(e){}})()`;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The no-flash theme bootstrap script for the default (`payload`) cookie
|
|
20
|
+
* prefix. Inline this in a `<script dangerouslySetInnerHTML>` inside the
|
|
21
|
+
* document `<head>` to set `data-theme`/`lang`/`dir` before first paint.
|
|
22
|
+
*/ export const THEME_INIT_SCRIPT = buildThemeInitScript();
|
|
23
|
+
/**
|
|
24
|
+
* The `<html>` document shell for Payload admin routes — the TanStack Start
|
|
25
|
+
* equivalent of `@payloadcms/next`'s root layout `<html>`. Owns the no-flash
|
|
26
|
+
* theme script, the `@layer` ordering style, `@payloadcms/ui` styles,
|
|
27
|
+
* `<HeadContent />`, and `<Scripts />`. Render `RootProvider` (and the rest of
|
|
28
|
+
* the admin tree) as `children`.
|
|
29
|
+
*/ export function PayloadAdminShell({ children, cookiePrefix }) {
|
|
30
|
+
const themeInitScript = cookiePrefix ? buildThemeInitScript(cookiePrefix) : THEME_INIT_SCRIPT;
|
|
31
|
+
return(// `lang`/`dir` are set on `<html>` by `themeInitScript` before first paint
|
|
32
|
+
// from the `*-lng` cookie, so a static `lang` here would be incorrect.
|
|
33
|
+
// eslint-disable-next-line jsx-a11y/html-has-lang -- set dynamically by the inline bootstrap script
|
|
34
|
+
/*#__PURE__*/ _jsxs("html", {
|
|
35
|
+
suppressHydrationWarning: true,
|
|
36
|
+
children: [
|
|
37
|
+
/*#__PURE__*/ _jsxs("head", {
|
|
38
|
+
children: [
|
|
39
|
+
/*#__PURE__*/ _jsx("script", {
|
|
40
|
+
dangerouslySetInnerHTML: {
|
|
41
|
+
__html: themeInitScript
|
|
42
|
+
}
|
|
43
|
+
}),
|
|
44
|
+
/*#__PURE__*/ _jsx("style", {
|
|
45
|
+
children: `@layer payload-default, payload;`
|
|
46
|
+
}),
|
|
47
|
+
/*#__PURE__*/ _jsx(HeadContent, {})
|
|
48
|
+
]
|
|
49
|
+
}),
|
|
50
|
+
/*#__PURE__*/ _jsxs("body", {
|
|
51
|
+
children: [
|
|
52
|
+
children,
|
|
53
|
+
/*#__PURE__*/ _jsx(Scripts, {})
|
|
54
|
+
]
|
|
55
|
+
})
|
|
56
|
+
]
|
|
57
|
+
}));
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Wraps your application's root document shell so Payload owns its own
|
|
61
|
+
* `<html>` chrome on admin routes while your shell renders everywhere else.
|
|
62
|
+
*
|
|
63
|
+
* Attach the result to the root route's `shellComponent`; it is the single
|
|
64
|
+
* integration touch point — no root loader and no manual data threading:
|
|
65
|
+
*
|
|
66
|
+
* ```tsx
|
|
67
|
+
* export const Route = createRootRoute({
|
|
68
|
+
* shellComponent: withPayloadRoot(MarketingHtml),
|
|
69
|
+
* })
|
|
70
|
+
* ```
|
|
71
|
+
*/ export function withPayloadRoot(RootShell, options = {}) {
|
|
72
|
+
const { adminRoute = '/admin', cookiePrefix } = options;
|
|
73
|
+
return function PayloadRootShell({ children }) {
|
|
74
|
+
const isAdminRoute = useRouterState({
|
|
75
|
+
select: (s)=>{
|
|
76
|
+
const { pathname } = s.location;
|
|
77
|
+
return pathname === adminRoute || pathname.startsWith(`${adminRoute}/`);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
if (isAdminRoute) {
|
|
81
|
+
return /*#__PURE__*/ _jsx(PayloadAdminShell, {
|
|
82
|
+
cookiePrefix: cookiePrefix,
|
|
83
|
+
children: children
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
return /*#__PURE__*/ _jsx(RootShell, {
|
|
87
|
+
children: children
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
//# sourceMappingURL=withPayloadRoot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/layouts/Root/withPayloadRoot.tsx"],"sourcesContent":["'use client'\nimport { rtlLanguages } from '@payloadcms/translations'\nimport { HeadContent, Scripts, useRouterState } from '@tanstack/react-router'\nimport React from 'react'\n\n/**\n * Builds the blocking inline script that sets `data-theme`, `lang`, and `dir`\n * on `<html>` synchronously, before first paint, from Payload's theme and\n * language cookies. This is the no-flash equivalent of what `RootProvider`'s\n * `ThemeProvider` does in a post-hydration effect, hoisted into the SSR'd\n * document head so the admin panel never flashes light mode (or LTR for RTL\n * locales) on the first render. Mirrors `detectTheme` in\n * `@payloadcms/ui`'s `ThemeProvider`.\n */\nexport function buildThemeInitScript(cookiePrefix: string = 'payload'): string {\n const rtl = JSON.stringify(rtlLanguages)\n return `(function(){try{var d=document.documentElement;var c=document.cookie.split('; ');function r(n){var row=c.find(function(x){return x.indexOf(n+'=')===0});return row?row.split('=')[1]:null}var t=r('${cookiePrefix}-theme');if(t!=='light'&&t!=='dark'){t=window.matchMedia&&window.matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light'}d.setAttribute('data-theme',t);var l=r('${cookiePrefix}-lng');if(l){d.setAttribute('lang',l);d.setAttribute('dir',${rtl}.indexOf(l)!==-1?'rtl':'ltr')}}catch(e){}})()`\n}\n\n/**\n * The no-flash theme bootstrap script for the default (`payload`) cookie\n * prefix. Inline this in a `<script dangerouslySetInnerHTML>` inside the\n * document `<head>` to set `data-theme`/`lang`/`dir` before first paint.\n */\nexport const THEME_INIT_SCRIPT: string = buildThemeInitScript()\n\nexport type PayloadAdminShellProps = {\n readonly children: React.ReactNode\n /**\n * The `config.cookiePrefix` used to read the theme/language cookies in the\n * no-flash bootstrap script. Defaults to `'payload'`.\n */\n readonly cookiePrefix?: string\n}\n\n/**\n * The `<html>` document shell for Payload admin routes — the TanStack Start\n * equivalent of `@payloadcms/next`'s root layout `<html>`. Owns the no-flash\n * theme script, the `@layer` ordering style, `@payloadcms/ui` styles,\n * `<HeadContent />`, and `<Scripts />`. Render `RootProvider` (and the rest of\n * the admin tree) as `children`.\n */\nexport function PayloadAdminShell({ children, cookiePrefix }: PayloadAdminShellProps) {\n const themeInitScript = cookiePrefix ? buildThemeInitScript(cookiePrefix) : THEME_INIT_SCRIPT\n\n return (\n // `lang`/`dir` are set on `<html>` by `themeInitScript` before first paint\n // from the `*-lng` cookie, so a static `lang` here would be incorrect.\n // eslint-disable-next-line jsx-a11y/html-has-lang -- set dynamically by the inline bootstrap script\n <html suppressHydrationWarning>\n <head>\n <script dangerouslySetInnerHTML={{ __html: themeInitScript }} />\n <style>{`@layer payload-default, payload;`}</style>\n <HeadContent />\n </head>\n <body>\n {children}\n <Scripts />\n </body>\n </html>\n )\n}\n\nexport type WithPayloadRootOptions = {\n /**\n * Path prefix that mounts the Payload admin panel (`config.routes.admin`).\n * Routes under it render the Payload admin document shell; everything else\n * renders your own shell. Defaults to `'/admin'`.\n */\n adminRoute?: string\n /**\n * The `config.cookiePrefix` used by the no-flash theme bootstrap script.\n * Defaults to `'payload'`.\n */\n cookiePrefix?: string\n}\n\n/**\n * Wraps your application's root document shell so Payload owns its own\n * `<html>` chrome on admin routes while your shell renders everywhere else.\n *\n * Attach the result to the root route's `shellComponent`; it is the single\n * integration touch point — no root loader and no manual data threading:\n *\n * ```tsx\n * export const Route = createRootRoute({\n * shellComponent: withPayloadRoot(MarketingHtml),\n * })\n * ```\n */\nexport function withPayloadRoot(\n RootShell: React.ComponentType<{ children: React.ReactNode }>,\n options: WithPayloadRootOptions = {},\n) {\n const { adminRoute = '/admin', cookiePrefix } = options\n\n return function PayloadRootShell({ children }: { children: React.ReactNode }) {\n const isAdminRoute = useRouterState({\n select: (s) => {\n const { pathname } = s.location\n return pathname === adminRoute || pathname.startsWith(`${adminRoute}/`)\n },\n })\n\n if (isAdminRoute) {\n return <PayloadAdminShell cookiePrefix={cookiePrefix}>{children}</PayloadAdminShell>\n }\n\n return <RootShell>{children}</RootShell>\n }\n}\n"],"names":["rtlLanguages","HeadContent","Scripts","useRouterState","React","buildThemeInitScript","cookiePrefix","rtl","JSON","stringify","THEME_INIT_SCRIPT","PayloadAdminShell","children","themeInitScript","html","suppressHydrationWarning","head","script","dangerouslySetInnerHTML","__html","style","body","withPayloadRoot","RootShell","options","adminRoute","PayloadRootShell","isAdminRoute","select","s","pathname","location","startsWith"],"mappings":"AAAA;;AACA,SAASA,YAAY,QAAQ,2BAA0B;AACvD,SAASC,WAAW,EAAEC,OAAO,EAAEC,cAAc,QAAQ,yBAAwB;AAC7E,OAAOC,WAAW,QAAO;AAEzB;;;;;;;;CAQC,GACD,OAAO,SAASC,qBAAqBC,eAAuB,SAAS;IACnE,MAAMC,MAAMC,KAAKC,SAAS,CAACT;IAC3B,OAAO,CAAC,mMAAmM,EAAEM,aAAa,2KAA2K,EAAEA,aAAa,2DAA2D,EAAEC,IAAI,6CAA6C,CAAC;AACrgB;AAEA;;;;CAIC,GACD,OAAO,MAAMG,oBAA4BL,uBAAsB;AAW/D;;;;;;CAMC,GACD,OAAO,SAASM,kBAAkB,EAAEC,QAAQ,EAAEN,YAAY,EAA0B;IAClF,MAAMO,kBAAkBP,eAAeD,qBAAqBC,gBAAgBI;IAE5E,OACE,2EAA2E;IAC3E,uEAAuE;IACvE,oGAAoG;kBACpG,MAACI;QAAKC,wBAAwB;;0BAC5B,MAACC;;kCACC,KAACC;wBAAOC,yBAAyB;4BAAEC,QAAQN;wBAAgB;;kCAC3D,KAACO;kCAAO,CAAC,gCAAgC,CAAC;;kCAC1C,KAACnB;;;0BAEH,MAACoB;;oBACET;kCACD,KAACV;;;;;AAIT;AAgBA;;;;;;;;;;;;CAYC,GACD,OAAO,SAASoB,gBACdC,SAA6D,EAC7DC,UAAkC,CAAC,CAAC;IAEpC,MAAM,EAAEC,aAAa,QAAQ,EAAEnB,YAAY,EAAE,GAAGkB;IAEhD,OAAO,SAASE,iBAAiB,EAAEd,QAAQ,EAAiC;QAC1E,MAAMe,eAAexB,eAAe;YAClCyB,QAAQ,CAACC;gBACP,MAAM,EAAEC,QAAQ,EAAE,GAAGD,EAAEE,QAAQ;gBAC/B,OAAOD,aAAaL,cAAcK,SAASE,UAAU,CAAC,GAAGP,WAAW,CAAC,CAAC;YACxE;QACF;QAEA,IAAIE,cAAc;YAChB,qBAAO,KAAChB;gBAAkBL,cAAcA;0BAAeM;;QACzD;QAEA,qBAAO,KAACW;sBAAWX;;IACrB;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/vite/constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,EA0BvC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAO5D,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAK/D,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,EAAE,MAAM,EAsB/C,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/vite/constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,EA0BvC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAO5D,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAK/D,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,EAAE,MAAM,EAsB/C,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,EAAE,MAAM,EAiE/C,CAAA"}
|
package/dist/vite/constants.js
CHANGED
|
@@ -123,7 +123,35 @@
|
|
|
123
123
|
'@payloadcms/ui > react-select > @floating-ui/dom',
|
|
124
124
|
'@payloadcms/ui > react-select > @floating-ui/dom > @floating-ui/core',
|
|
125
125
|
'@payloadcms/ui > react-select > prop-types > react-is',
|
|
126
|
-
'@payloadcms/ui > date-fns/locale/en-US'
|
|
126
|
+
'@payloadcms/ui > date-fns/locale/en-US',
|
|
127
|
+
// Further late discoveries observed re-optimizing mid-run in CI cold starts
|
|
128
|
+
// (see CI logs: "✨ new dependencies optimized: @dnd-kit/modifiers / ajv /
|
|
129
|
+
// dequal/lite"). The modular dashboard pulls in `@dnd-kit/modifiers` on first
|
|
130
|
+
// render; form-state diffing reaches `dequal/lite` (a distinct entry point
|
|
131
|
+
// from the already-listed `dequal`); client-side field validation reaches
|
|
132
|
+
// `ajv` *through `payload`* — it is `ssrExternal` server-side but still
|
|
133
|
+
// bundled into the client, and must be pathed via `payload` so the optimizer
|
|
134
|
+
// pre-bundles the exact copy the runtime loads.
|
|
135
|
+
'@payloadcms/ui > @dnd-kit/modifiers',
|
|
136
|
+
'@payloadcms/ui > dequal/lite',
|
|
137
|
+
'payload > ajv',
|
|
138
|
+
// The storage client-upload suites (esp. vercel-blob) crawl part of the
|
|
139
|
+
// `payload` server runtime into the client bundle and discover these late,
|
|
140
|
+
// triggering several "optimized dependencies changed. reloading" waves that
|
|
141
|
+
// reload the page mid-test (the bulk-upload drawer's Create New button /
|
|
142
|
+
// dropzone vanish and the direct-to-bucket PUT never fires). Pre-bundle the
|
|
143
|
+
// whole observed set so the first pass is complete.
|
|
144
|
+
'payload > undici',
|
|
145
|
+
'payload > jose',
|
|
146
|
+
'payload > dataloader',
|
|
147
|
+
'payload > path-to-regexp',
|
|
148
|
+
'payload > console-table-printer',
|
|
149
|
+
'payload > ci-info',
|
|
150
|
+
'payload > image-size',
|
|
151
|
+
'payload > image-size/fromFile',
|
|
152
|
+
'payload > ipaddr.js',
|
|
153
|
+
'payload > range-parser',
|
|
154
|
+
'payload > sanitize-filename'
|
|
127
155
|
];
|
|
128
156
|
|
|
129
157
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/vite/constants.ts"],"sourcesContent":["/**\n * Vite-level configuration constants used by `payloadPlugin`. Kept separate so\n * `plugin.ts` stays focused on wiring.\n */\n\n/**\n * Server-only packages (Node-only or only ever used by the server bundle).\n * These are the Vite equivalent of Next.js's `serverExternalPackages`.\n */\nexport const ssrExternalPackages: string[] = [\n 'ajv',\n 'fast-uri',\n 'drizzle-kit',\n 'drizzle-kit/api',\n 'drizzle-orm',\n 'sharp',\n 'libsql',\n 'require-in-the-middle',\n 'json-schema-to-typescript',\n 'pino',\n 'pino-pretty',\n 'graphql',\n 'mongodb',\n 'mongoose',\n 'better-sqlite3',\n 'pg',\n 'pg-native',\n 'nodemailer',\n 'aws4',\n 'pluralize',\n 'console-table-printer',\n '@azure/storage-blob',\n '@aws-sdk/client-s3',\n '@aws-sdk/s3-request-presigner',\n '@google-cloud/storage',\n]\n\n/**\n * Payload packages whose source must be processed by Vite even on the server\n * (because they are workspace `.ts` files in dev). Server-only adapters\n * (`@payloadcms/db-*`, `@payloadcms/email-*`, `@payloadcms/next`, etc.) are\n * intentionally not included — those should stay external on the SSR side.\n */\nexport const payloadNoExternalPatterns: Array<RegExp | string> = [\n '@payloadcms/ui',\n '@payloadcms/translations',\n '@payloadcms/tanstack-start',\n /^@payloadcms\\/richtext-lexical/,\n /^@payloadcms\\/plugin-/,\n /^@payloadcms\\/storage-/,\n]\n\n/**\n * The subset of `payloadNoExternalPatterns` that needs to participate in the\n * RSC environment. The RSC graph is narrower — plugins and storage adapters\n * don't run in RSC, only the admin UI surface does.\n */\nexport const payloadRscNoExternalPatterns: Array<RegExp | string> = [\n '@payloadcms/ui',\n '@payloadcms/translations',\n '@payloadcms/tanstack-start',\n /^@payloadcms\\/richtext-lexical/,\n]\n\n/**\n * Packages we know contain Node-only code or top-level side effects requiring\n * Node APIs. Excluding them from the client optimizer prevents Vite from\n * walking into their main entries and trying to bundle server-only imports\n * for the browser.\n */\nexport const optimizeDepsExcludeDefaults: string[] = [\n 'sharp',\n '@payloadcms/ui',\n '@payloadcms/tanstack-start',\n 'payload',\n 'pino',\n 'pino-pretty',\n 'busboy',\n 'get-tsconfig',\n 'ws',\n 'croner',\n 'prompts',\n 'file-type',\n // Server-only SDKs used by `@payloadcms/storage-*` adapters. Vite\n // sometimes walks these from the main package entry while scanning\n // workspace deps, and the browser sub-bundles do not expose the\n // server-only APIs (e.g. `BlobSASPermissions`), which crashes the dev\n // server with a `MISSING_EXPORT` error before any test runs.\n '@azure/storage-blob',\n '@aws-sdk/client-s3',\n '@aws-sdk/s3-request-presigner',\n '@google-cloud/storage',\n]\n\n/**\n * Transitive dependencies of `@payloadcms/ui` and `payload` that need to be\n * pre-bundled for the client. Vite's auto-discovery doesn't reliably pick\n * these up because their parent packages are in `optimizeDeps.exclude`, so we\n * list them explicitly using the `parent > child` syntax.\n */\nexport const optimizeDepsIncludeDefaults: string[] = [\n '@payloadcms/ui > sonner',\n '@payloadcms/ui > @faceless-ui/modal',\n '@payloadcms/ui > @faceless-ui/window-info',\n '@payloadcms/ui > @faceless-ui/scroll-info',\n '@payloadcms/ui > @dnd-kit/core',\n '@payloadcms/ui > @dnd-kit/sortable',\n '@payloadcms/ui > @dnd-kit/utilities',\n '@payloadcms/ui > react-datepicker',\n '@payloadcms/ui > react-select',\n '@payloadcms/ui > react-select/creatable',\n '@payloadcms/ui > react-image-crop',\n '@payloadcms/ui > @monaco-editor/react',\n '@payloadcms/ui > date-fns',\n '@payloadcms/ui > date-fns/transpose',\n '@payloadcms/ui > @date-fns/tz/date/mini',\n '@payloadcms/ui > uuid',\n '@payloadcms/ui > use-context-selector',\n '@payloadcms/ui > bson-objectid',\n '@payloadcms/ui > dequal',\n '@payloadcms/ui > object-to-formdata',\n '@payloadcms/ui > md5',\n 'payload > deepmerge',\n 'payload > pluralize',\n 'scheduler',\n // Transitive deps that Vite otherwise discovers *after* the initial crawl\n // (react-select pulls in @floating-ui at runtime; react-is is reached via\n // react-transition-group/prop-types; the default date-fns locale is loaded\n // through a dynamic `date-fns/locale/${key}` import). A late discovery forces\n // a full dep re-optimization mid-session, which 404s every in-flight\n // `.vite/deps/*` chunk (\"Pre-transform error: file does not exist in the\n // optimize deps directory\") and breaks the admin UI in CI cold starts.\n // Pre-bundling them keeps the first optimization pass complete.\n '@payloadcms/ui > react-select > @floating-ui/dom',\n '@payloadcms/ui > react-select > @floating-ui/dom > @floating-ui/core',\n '@payloadcms/ui > react-select > prop-types > react-is',\n '@payloadcms/ui > date-fns/locale/en-US',\n]\n"],"names":["ssrExternalPackages","payloadNoExternalPatterns","payloadRscNoExternalPatterns","optimizeDepsExcludeDefaults","optimizeDepsIncludeDefaults"],"mappings":"AAAA;;;CAGC,GAED;;;CAGC,GACD,OAAO,MAAMA,sBAAgC;IAC3C;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD,CAAA;AAED;;;;;CAKC,GACD,OAAO,MAAMC,4BAAoD;IAC/D;IACA;IACA;IACA;IACA;IACA;CACD,CAAA;AAED;;;;CAIC,GACD,OAAO,MAAMC,+BAAuD;IAClE;IACA;IACA;IACA;CACD,CAAA;AAED;;;;;CAKC,GACD,OAAO,MAAMC,8BAAwC;IACnD;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,kEAAkE;IAClE,mEAAmE;IACnE,gEAAgE;IAChE,sEAAsE;IACtE,6DAA6D;IAC7D;IACA;IACA;IACA;CACD,CAAA;AAED;;;;;CAKC,GACD,OAAO,MAAMC,8BAAwC;IACnD;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,0EAA0E;IAC1E,0EAA0E;IAC1E,2EAA2E;IAC3E,8EAA8E;IAC9E,qEAAqE;IACrE,yEAAyE;IACzE,uEAAuE;IACvE,gEAAgE;IAChE;IACA;IACA;IACA;CACD,CAAA"}
|
|
1
|
+
{"version":3,"sources":["../../src/vite/constants.ts"],"sourcesContent":["/**\n * Vite-level configuration constants used by `payloadPlugin`. Kept separate so\n * `plugin.ts` stays focused on wiring.\n */\n\n/**\n * Server-only packages (Node-only or only ever used by the server bundle).\n * These are the Vite equivalent of Next.js's `serverExternalPackages`.\n */\nexport const ssrExternalPackages: string[] = [\n 'ajv',\n 'fast-uri',\n 'drizzle-kit',\n 'drizzle-kit/api',\n 'drizzle-orm',\n 'sharp',\n 'libsql',\n 'require-in-the-middle',\n 'json-schema-to-typescript',\n 'pino',\n 'pino-pretty',\n 'graphql',\n 'mongodb',\n 'mongoose',\n 'better-sqlite3',\n 'pg',\n 'pg-native',\n 'nodemailer',\n 'aws4',\n 'pluralize',\n 'console-table-printer',\n '@azure/storage-blob',\n '@aws-sdk/client-s3',\n '@aws-sdk/s3-request-presigner',\n '@google-cloud/storage',\n]\n\n/**\n * Payload packages whose source must be processed by Vite even on the server\n * (because they are workspace `.ts` files in dev). Server-only adapters\n * (`@payloadcms/db-*`, `@payloadcms/email-*`, `@payloadcms/next`, etc.) are\n * intentionally not included — those should stay external on the SSR side.\n */\nexport const payloadNoExternalPatterns: Array<RegExp | string> = [\n '@payloadcms/ui',\n '@payloadcms/translations',\n '@payloadcms/tanstack-start',\n /^@payloadcms\\/richtext-lexical/,\n /^@payloadcms\\/plugin-/,\n /^@payloadcms\\/storage-/,\n]\n\n/**\n * The subset of `payloadNoExternalPatterns` that needs to participate in the\n * RSC environment. The RSC graph is narrower — plugins and storage adapters\n * don't run in RSC, only the admin UI surface does.\n */\nexport const payloadRscNoExternalPatterns: Array<RegExp | string> = [\n '@payloadcms/ui',\n '@payloadcms/translations',\n '@payloadcms/tanstack-start',\n /^@payloadcms\\/richtext-lexical/,\n]\n\n/**\n * Packages we know contain Node-only code or top-level side effects requiring\n * Node APIs. Excluding them from the client optimizer prevents Vite from\n * walking into their main entries and trying to bundle server-only imports\n * for the browser.\n */\nexport const optimizeDepsExcludeDefaults: string[] = [\n 'sharp',\n '@payloadcms/ui',\n '@payloadcms/tanstack-start',\n 'payload',\n 'pino',\n 'pino-pretty',\n 'busboy',\n 'get-tsconfig',\n 'ws',\n 'croner',\n 'prompts',\n 'file-type',\n // Server-only SDKs used by `@payloadcms/storage-*` adapters. Vite\n // sometimes walks these from the main package entry while scanning\n // workspace deps, and the browser sub-bundles do not expose the\n // server-only APIs (e.g. `BlobSASPermissions`), which crashes the dev\n // server with a `MISSING_EXPORT` error before any test runs.\n '@azure/storage-blob',\n '@aws-sdk/client-s3',\n '@aws-sdk/s3-request-presigner',\n '@google-cloud/storage',\n]\n\n/**\n * Transitive dependencies of `@payloadcms/ui` and `payload` that need to be\n * pre-bundled for the client. Vite's auto-discovery doesn't reliably pick\n * these up because their parent packages are in `optimizeDeps.exclude`, so we\n * list them explicitly using the `parent > child` syntax.\n */\nexport const optimizeDepsIncludeDefaults: string[] = [\n '@payloadcms/ui > sonner',\n '@payloadcms/ui > @faceless-ui/modal',\n '@payloadcms/ui > @faceless-ui/window-info',\n '@payloadcms/ui > @faceless-ui/scroll-info',\n '@payloadcms/ui > @dnd-kit/core',\n '@payloadcms/ui > @dnd-kit/sortable',\n '@payloadcms/ui > @dnd-kit/utilities',\n '@payloadcms/ui > react-datepicker',\n '@payloadcms/ui > react-select',\n '@payloadcms/ui > react-select/creatable',\n '@payloadcms/ui > react-image-crop',\n '@payloadcms/ui > @monaco-editor/react',\n '@payloadcms/ui > date-fns',\n '@payloadcms/ui > date-fns/transpose',\n '@payloadcms/ui > @date-fns/tz/date/mini',\n '@payloadcms/ui > uuid',\n '@payloadcms/ui > use-context-selector',\n '@payloadcms/ui > bson-objectid',\n '@payloadcms/ui > dequal',\n '@payloadcms/ui > object-to-formdata',\n '@payloadcms/ui > md5',\n 'payload > deepmerge',\n 'payload > pluralize',\n 'scheduler',\n // Transitive deps that Vite otherwise discovers *after* the initial crawl\n // (react-select pulls in @floating-ui at runtime; react-is is reached via\n // react-transition-group/prop-types; the default date-fns locale is loaded\n // through a dynamic `date-fns/locale/${key}` import). A late discovery forces\n // a full dep re-optimization mid-session, which 404s every in-flight\n // `.vite/deps/*` chunk (\"Pre-transform error: file does not exist in the\n // optimize deps directory\") and breaks the admin UI in CI cold starts.\n // Pre-bundling them keeps the first optimization pass complete.\n '@payloadcms/ui > react-select > @floating-ui/dom',\n '@payloadcms/ui > react-select > @floating-ui/dom > @floating-ui/core',\n '@payloadcms/ui > react-select > prop-types > react-is',\n '@payloadcms/ui > date-fns/locale/en-US',\n // Further late discoveries observed re-optimizing mid-run in CI cold starts\n // (see CI logs: \"✨ new dependencies optimized: @dnd-kit/modifiers / ajv /\n // dequal/lite\"). The modular dashboard pulls in `@dnd-kit/modifiers` on first\n // render; form-state diffing reaches `dequal/lite` (a distinct entry point\n // from the already-listed `dequal`); client-side field validation reaches\n // `ajv` *through `payload`* — it is `ssrExternal` server-side but still\n // bundled into the client, and must be pathed via `payload` so the optimizer\n // pre-bundles the exact copy the runtime loads.\n '@payloadcms/ui > @dnd-kit/modifiers',\n '@payloadcms/ui > dequal/lite',\n 'payload > ajv',\n // The storage client-upload suites (esp. vercel-blob) crawl part of the\n // `payload` server runtime into the client bundle and discover these late,\n // triggering several \"optimized dependencies changed. reloading\" waves that\n // reload the page mid-test (the bulk-upload drawer's Create New button /\n // dropzone vanish and the direct-to-bucket PUT never fires). Pre-bundle the\n // whole observed set so the first pass is complete.\n 'payload > undici',\n 'payload > jose',\n 'payload > dataloader',\n 'payload > path-to-regexp',\n 'payload > console-table-printer',\n 'payload > ci-info',\n 'payload > image-size',\n 'payload > image-size/fromFile',\n 'payload > ipaddr.js',\n 'payload > range-parser',\n 'payload > sanitize-filename',\n]\n"],"names":["ssrExternalPackages","payloadNoExternalPatterns","payloadRscNoExternalPatterns","optimizeDepsExcludeDefaults","optimizeDepsIncludeDefaults"],"mappings":"AAAA;;;CAGC,GAED;;;CAGC,GACD,OAAO,MAAMA,sBAAgC;IAC3C;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD,CAAA;AAED;;;;;CAKC,GACD,OAAO,MAAMC,4BAAoD;IAC/D;IACA;IACA;IACA;IACA;IACA;CACD,CAAA;AAED;;;;CAIC,GACD,OAAO,MAAMC,+BAAuD;IAClE;IACA;IACA;IACA;CACD,CAAA;AAED;;;;;CAKC,GACD,OAAO,MAAMC,8BAAwC;IACnD;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,kEAAkE;IAClE,mEAAmE;IACnE,gEAAgE;IAChE,sEAAsE;IACtE,6DAA6D;IAC7D;IACA;IACA;IACA;CACD,CAAA;AAED;;;;;CAKC,GACD,OAAO,MAAMC,8BAAwC;IACnD;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,0EAA0E;IAC1E,0EAA0E;IAC1E,2EAA2E;IAC3E,8EAA8E;IAC9E,qEAAqE;IACrE,yEAAyE;IACzE,uEAAuE;IACvE,gEAAgE;IAChE;IACA;IACA;IACA;IACA,4EAA4E;IAC5E,0EAA0E;IAC1E,8EAA8E;IAC9E,2EAA2E;IAC3E,0EAA0E;IAC1E,wEAAwE;IACxE,6EAA6E;IAC7E,gDAAgD;IAChD;IACA;IACA;IACA,wEAAwE;IACxE,2EAA2E;IAC3E,4EAA4E;IAC5E,yEAAyE;IACzE,4EAA4E;IAC5E,oDAAoD;IACpD;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payloadcms/tanstack-start",
|
|
3
|
-
"version": "4.0.0-internal.
|
|
3
|
+
"version": "4.0.0-internal.688c4d0",
|
|
4
4
|
"description": "TanStack Start framework adapter for Payload",
|
|
5
5
|
"homepage": "https://payloadcms.com",
|
|
6
6
|
"repository": {
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
],
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"qs-esm": "^7.0.2",
|
|
61
|
-
"@payloadcms/
|
|
62
|
-
"@payloadcms/
|
|
61
|
+
"@payloadcms/translations": "4.0.0-internal.688c4d0",
|
|
62
|
+
"@payloadcms/ui": "4.0.0-internal.688c4d0"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@tanstack/react-router": "^1.120.0",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"react": "^19.0.0",
|
|
71
71
|
"react-dom": "^19.0.0",
|
|
72
72
|
"vite": ">=8.0.0",
|
|
73
|
-
"payload": "4.0.0-internal.
|
|
73
|
+
"payload": "4.0.0-internal.688c4d0"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
76
|
"@tanstack/react-router": "^1.120.0",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"react": "^19.0.0",
|
|
80
80
|
"react-dom": "^19.0.0",
|
|
81
81
|
"vite": ">=8.0.0",
|
|
82
|
-
"payload": "4.0.0-internal.
|
|
82
|
+
"payload": "4.0.0-internal.688c4d0"
|
|
83
83
|
},
|
|
84
84
|
"peerDependenciesMeta": {
|
|
85
85
|
"@vitejs/plugin-react": {
|