@payloadcms/next 4.0.0-canary.36 → 4.0.0-canary.37
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/adapters/handleServerFunctions.d.ts.map +1 -1
- package/dist/adapters/handleServerFunctions.js +2 -4
- package/dist/adapters/handleServerFunctions.js.map +1 -1
- package/dist/adapters/layout.d.ts +1 -1
- package/dist/adapters/layout.d.ts.map +1 -1
- package/dist/adapters/layout.js +3 -3
- package/dist/adapters/layout.js.map +1 -1
- package/dist/adapters/views.d.ts.map +1 -1
- package/dist/adapters/views.js +3 -8
- package/dist/adapters/views.js.map +1 -1
- package/dist/prod/styles.css +1 -1
- package/dist/utilities/initReq.d.ts +8 -0
- package/dist/utilities/initReq.d.ts.map +1 -0
- package/dist/utilities/initReq.js +26 -0
- package/dist/utilities/initReq.js.map +1 -0
- package/dist/utilities/selectiveCache.d.ts +18 -0
- package/dist/utilities/selectiveCache.d.ts.map +1 -0
- package/dist/utilities/selectiveCache.js +36 -0
- package/dist/utilities/selectiveCache.js.map +1 -0
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handleServerFunctions.d.ts","sourceRoot":"","sources":["../../src/adapters/handleServerFunctions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"handleServerFunctions.d.ts","sourceRoot":"","sources":["../../src/adapters/handleServerFunctions.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,qBAAqB,yCAGhC,CAAA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { createServerFunctionHandler } from '@payloadcms/ui/utilities/handleServerFunctions';
|
|
2
|
-
import { initReq } from '
|
|
3
|
-
import { nextServerAdapter } from './server.js';
|
|
2
|
+
import { initReq } from '../utilities/initReq.js';
|
|
4
3
|
export const handleServerFunctions = createServerFunctionHandler({
|
|
5
4
|
initReq: ({
|
|
6
5
|
configPromise,
|
|
@@ -8,8 +7,7 @@ export const handleServerFunctions = createServerFunctionHandler({
|
|
|
8
7
|
}) => initReq({
|
|
9
8
|
configPromise,
|
|
10
9
|
importMap,
|
|
11
|
-
key: 'RootLayout'
|
|
12
|
-
serverAdapter: nextServerAdapter
|
|
10
|
+
key: 'RootLayout'
|
|
13
11
|
})
|
|
14
12
|
});
|
|
15
13
|
//# sourceMappingURL=handleServerFunctions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handleServerFunctions.js","names":["createServerFunctionHandler","initReq","
|
|
1
|
+
{"version":3,"file":"handleServerFunctions.js","names":["createServerFunctionHandler","initReq","handleServerFunctions","configPromise","importMap","key"],"sources":["../../src/adapters/handleServerFunctions.ts"],"sourcesContent":["import { createServerFunctionHandler } from '@payloadcms/ui/utilities/handleServerFunctions'\n\nimport { initReq } from '../utilities/initReq.js'\n\nexport const handleServerFunctions = createServerFunctionHandler({\n initReq: ({ configPromise, importMap }) =>\n initReq({ configPromise, importMap, key: 'RootLayout' }),\n})\n"],"mappings":"AAAA,SAASA,2BAA2B,QAAQ;AAE5C,SAASC,OAAO,QAAQ;AAExB,OAAO,MAAMC,qBAAA,GAAwBF,2BAAA,CAA4B;EAC/DC,OAAA,EAASA,CAAC;IAAEE,aAAa;IAAEC;EAAS,CAAE,KACpCH,OAAA,CAAQ;IAAEE,aAAA;IAAeC,SAAA;IAAWC,GAAA,EAAK;EAAa;AAC1D","ignoreList":[]}
|
|
@@ -2,6 +2,6 @@ import { RootLayout as UIRootLayout } from '@payloadcms/ui/layouts';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import '@payloadcms/ui/css/app.css';
|
|
4
4
|
export { metadata } from '@payloadcms/ui/layouts';
|
|
5
|
-
type Props = Omit<React.ComponentProps<typeof UIRootLayout>, 'additionalDependencyChecks' | 'fonts' | '
|
|
5
|
+
type Props = Omit<React.ComponentProps<typeof UIRootLayout>, 'additionalDependencyChecks' | 'fonts' | 'initReq' | 'RouterAdapter'>;
|
|
6
6
|
export declare const RootLayout: (props: Props) => React.JSX.Element;
|
|
7
7
|
//# sourceMappingURL=layout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/adapters/layout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAGnE,OAAO,KAAK,MAAM,OAAO,CAAA;AAQzB,OAAO,4BAA4B,CAAA;AAqBnC,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAEjD,KAAK,KAAK,GAAG,IAAI,CACf,KAAK,CAAC,cAAc,CAAC,OAAO,YAAY,CAAC,EACzC,4BAA4B,GAAG,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/adapters/layout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAGnE,OAAO,KAAK,MAAM,OAAO,CAAA;AAQzB,OAAO,4BAA4B,CAAA;AAqBnC,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAEjD,KAAK,KAAK,GAAG,IAAI,CACf,KAAK,CAAC,cAAc,CAAC,OAAO,YAAY,CAAC,EACzC,4BAA4B,GAAG,OAAO,GAAG,SAAS,GAAG,eAAe,CACrE,CAAA;AAED,eAAO,MAAM,UAAU,UAAW,KAAK,sBAWtC,CAAA"}
|
package/dist/adapters/layout.js
CHANGED
|
@@ -3,8 +3,8 @@ import { RootLayout as UIRootLayout } from '@payloadcms/ui/layouts';
|
|
|
3
3
|
// @ts-expect-error - TS6 NodeNext rejects deep imports into `next` (no `exports` field), but Next.js compiler requires this exact specifier
|
|
4
4
|
import { Inter, Roboto_Mono } from 'next/font/google';
|
|
5
5
|
import React from 'react';
|
|
6
|
+
import { initReq } from '../utilities/initReq.js';
|
|
6
7
|
import { NextRouterAdapter } from './router.js';
|
|
7
|
-
import { nextServerAdapter } from './server.js';
|
|
8
8
|
const inter = Inter({
|
|
9
9
|
subsets: ['latin'],
|
|
10
10
|
variable: '--font-family-sans'
|
|
@@ -32,7 +32,7 @@ export const RootLayout = props => /*#__PURE__*/_jsx(UIRootLayout, {
|
|
|
32
32
|
className: robotoMono.className,
|
|
33
33
|
variable: robotoMono.variable
|
|
34
34
|
}],
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
initReq: initReq,
|
|
36
|
+
RouterAdapter: NextRouterAdapter
|
|
37
37
|
});
|
|
38
38
|
//# sourceMappingURL=layout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.js","names":["RootLayout","UIRootLayout","Inter","Roboto_Mono","React","
|
|
1
|
+
{"version":3,"file":"layout.js","names":["RootLayout","UIRootLayout","Inter","Roboto_Mono","React","initReq","NextRouterAdapter","inter","subsets","variable","robotoMono","nextDependencyChecks","dependencyVersions","next","required","version","metadata","props","_jsx","additionalDependencyChecks","fonts","className","RouterAdapter"],"sources":["../../src/adapters/layout.tsx"],"sourcesContent":["import { RootLayout as UIRootLayout } from '@payloadcms/ui/layouts'\n// @ts-expect-error - TS6 NodeNext rejects deep imports into `next` (no `exports` field), but Next.js compiler requires this exact specifier\nimport { Inter, Roboto_Mono } from 'next/font/google'\nimport React from 'react'\n\nimport { initReq } from '../utilities/initReq.js'\nimport { NextRouterAdapter } from './router.js'\n// CSS import lives here (not in `@payloadcms/ui`) so the esbuild bundle that produces\n// `@payloadcms/next/css` (`dist/prod/styles.css`) can follow the CSS chain. esbuild\n// treats `@payloadcms/ui` as external; any CSS import inside that package is invisible\n// to it, so the import must be reachable from within `packages/next/src/`.\nimport '@payloadcms/ui/css/app.css'\n\nconst inter = Inter({\n subsets: ['latin'],\n variable: '--font-family-sans',\n})\n\nconst robotoMono = Roboto_Mono({\n subsets: ['latin'],\n variable: '--font-family-mono',\n})\n\nconst nextDependencyChecks = {\n dependencyVersions: {\n next: {\n required: false,\n version: '>=15.0.0',\n },\n },\n}\n\nexport { metadata } from '@payloadcms/ui/layouts'\n\ntype Props = Omit<\n React.ComponentProps<typeof UIRootLayout>,\n 'additionalDependencyChecks' | 'fonts' | 'initReq' | 'RouterAdapter'\n>\n\nexport const RootLayout = (props: Props) => (\n <UIRootLayout\n {...props}\n additionalDependencyChecks={nextDependencyChecks}\n fonts={[\n { className: inter.className, variable: inter.variable },\n { className: robotoMono.className, variable: robotoMono.variable },\n ]}\n initReq={initReq}\n RouterAdapter={NextRouterAdapter}\n />\n)\n"],"mappings":";AAAA,SAASA,UAAA,IAAcC,YAAY,QAAQ;AAC3C;AACA,SAASC,KAAK,EAAEC,WAAW,QAAQ;AACnC,OAAOC,KAAA,MAAW;AAElB,SAASC,OAAO,QAAQ;AACxB,SAASC,iBAAiB,QAAQ;AAOlC,MAAMC,KAAA,GAAQL,KAAA,CAAM;EAClBM,OAAA,EAAS,CAAC,QAAQ;EAClBC,QAAA,EAAU;AACZ;AAEA,MAAMC,UAAA,GAAaP,WAAA,CAAY;EAC7BK,OAAA,EAAS,CAAC,QAAQ;EAClBC,QAAA,EAAU;AACZ;AAEA,MAAME,oBAAA,GAAuB;EAC3BC,kBAAA,EAAoB;IAClBC,IAAA,EAAM;MACJC,QAAA,EAAU;MACVC,OAAA,EAAS;IACX;EACF;AACF;AAEA,SAASC,QAAQ,QAAQ;AAOzB,OAAO,MAAMhB,UAAA,GAAciB,KAAA,iBACzBC,IAAA,CAACjB,YAAA;EACE,GAAGgB,KAAK;EACTE,0BAAA,EAA4BR,oBAAA;EAC5BS,KAAA,EAAO,CACL;IAAEC,SAAA,EAAWd,KAAA,CAAMc,SAAS;IAAEZ,QAAA,EAAUF,KAAA,CAAME;EAAS,GACvD;IAAEY,SAAA,EAAWX,UAAA,CAAWW,SAAS;IAAEZ,QAAA,EAAUC,UAAA,CAAWD;EAAS,EAClE;EACDJ,OAAA,EAASA,OAAA;EACTiB,aAAA,EAAehB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"views.d.ts","sourceRoot":"","sources":["../../src/adapters/views.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,oBAAoB,EACpB,SAAS,EACT,UAAU,EACV,eAAe,EAChB,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"views.d.ts","sourceRoot":"","sources":["../../src/adapters/views.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,oBAAoB,EACpB,SAAS,EACT,UAAU,EACV,eAAe,EAChB,MAAM,SAAS,CAAA;AAShB,eAAO,MAAM,UAAU,EAAE,gBAAgB,CAAC,oBAAoB,EAAE,UAAU,CAAqB,CAAA;AAE/F,KAAK,SAAS,GAAG;IACf,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,CAAA;IACzC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAA;IAC7B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;QACvB,QAAQ,EAAE,MAAM,EAAE,CAAA;KACnB,CAAC,CAAA;IACF,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;QAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAAA;KACjC,CAAC,CAAA;CACH,CAAA;AAED,eAAO,MAAM,QAAQ,UAAW,SAAS,yCAC0B,CAAA;AAEnE,eAAO,MAAM,YAAY,UAAW,SAAS,yCAA8C,CAAA"}
|
package/dist/adapters/views.js
CHANGED
|
@@ -1,23 +1,18 @@
|
|
|
1
|
-
import { initReq } from '@payloadcms/ui/utilities/initReq';
|
|
2
1
|
import { renderNotFoundPage } from '@payloadcms/ui/views/NotFound/page';
|
|
3
2
|
import { renderRoot } from '@payloadcms/ui/views/Root';
|
|
4
3
|
import { defaultAdminViews } from '@payloadcms/ui/views/Root/adminViews';
|
|
5
4
|
import { notFound, redirect } from 'next/navigation.js';
|
|
6
|
-
import {
|
|
7
|
-
const boundInitReq = args => initReq({
|
|
8
|
-
...args,
|
|
9
|
-
serverAdapter: nextServerAdapter
|
|
10
|
-
});
|
|
5
|
+
import { initReq } from '../utilities/initReq.js';
|
|
11
6
|
export const adminViews = defaultAdminViews;
|
|
12
7
|
export const RootPage = props => renderRoot({
|
|
13
8
|
...props,
|
|
14
9
|
adminViews,
|
|
15
|
-
initReq
|
|
10
|
+
initReq,
|
|
16
11
|
notFound,
|
|
17
12
|
redirect
|
|
18
13
|
});
|
|
19
14
|
export const NotFoundPage = props => renderNotFoundPage({
|
|
20
15
|
...props,
|
|
21
|
-
initReq
|
|
16
|
+
initReq
|
|
22
17
|
});
|
|
23
18
|
//# sourceMappingURL=views.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"views.js","names":["
|
|
1
|
+
{"version":3,"file":"views.js","names":["renderNotFoundPage","renderRoot","defaultAdminViews","notFound","redirect","initReq","adminViews","RootPage","props","NotFoundPage"],"sources":["../../src/adapters/views.tsx"],"sourcesContent":["import type {\n AdminViewAdapter,\n AdminViewServerProps,\n ImportMap,\n MetaConfig,\n SanitizedConfig,\n} from 'payload'\n\nimport { renderNotFoundPage } from '@payloadcms/ui/views/NotFound/page'\nimport { renderRoot } from '@payloadcms/ui/views/Root'\nimport { defaultAdminViews } from '@payloadcms/ui/views/Root/adminViews'\nimport { notFound, redirect } from 'next/navigation.js'\n\nimport { initReq } from '../utilities/initReq.js'\n\nexport const adminViews: AdminViewAdapter<AdminViewServerProps, MetaConfig> = defaultAdminViews\n\ntype PageProps = {\n readonly config: Promise<SanitizedConfig>\n readonly importMap: ImportMap\n readonly params: Promise<{\n segments: string[]\n }>\n readonly searchParams: Promise<{\n [key: string]: string | string[]\n }>\n}\n\nexport const RootPage = (props: PageProps) =>\n renderRoot({ ...props, adminViews, initReq, notFound, redirect })\n\nexport const NotFoundPage = (props: PageProps) => renderNotFoundPage({ ...props, initReq })\n"],"mappings":"AAQA,SAASA,kBAAkB,QAAQ;AACnC,SAASC,UAAU,QAAQ;AAC3B,SAASC,iBAAiB,QAAQ;AAClC,SAASC,QAAQ,EAAEC,QAAQ,QAAQ;AAEnC,SAASC,OAAO,QAAQ;AAExB,OAAO,MAAMC,UAAA,GAAiEJ,iBAAA;AAa9E,OAAO,MAAMK,QAAA,GAAYC,KAAA,IACvBP,UAAA,CAAW;EAAE,GAAGO,KAAK;EAAEF,UAAA;EAAYD,OAAA;EAASF,QAAA;EAAUC;AAAS;AAEjE,OAAO,MAAMK,YAAA,GAAgBD,KAAA,IAAqBR,kBAAA,CAAmB;EAAE,GAAGQ,KAAK;EAAEH;AAAQ","ignoreList":[]}
|