@payloadcms/next 3.0.0-beta.0 → 3.0.0-beta.10
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/withPayload.cjs +95 -0
- package/dist/cjs/withPayload.cjs.map +1 -0
- package/dist/exports/utilities.d.ts +1 -1
- package/dist/exports/utilities.d.ts.map +1 -1
- package/dist/exports/utilities.js +1 -1
- package/dist/exports/utilities.js.map +1 -1
- package/dist/layouts/Root/index.d.ts.map +1 -1
- package/dist/layouts/Root/index.js +23 -1
- package/dist/layouts/Root/index.js.map +1 -1
- package/dist/prod/styles.css +1 -1
- package/dist/routes/rest/auth/logout.js +1 -1
- package/dist/routes/rest/auth/logout.js.map +1 -1
- package/dist/routes/rest/buildFormState.js +1 -1
- package/dist/routes/rest/buildFormState.js.map +1 -1
- package/dist/routes/rest/collections/deleteByID.d.ts.map +1 -1
- package/dist/routes/rest/collections/deleteByID.js +7 -1
- package/dist/routes/rest/collections/deleteByID.js.map +1 -1
- package/dist/routes/rest/collections/duplicate.d.ts.map +1 -1
- package/dist/routes/rest/collections/duplicate.js +7 -1
- package/dist/routes/rest/collections/duplicate.js.map +1 -1
- package/dist/routes/rest/collections/findByID.d.ts.map +1 -1
- package/dist/routes/rest/collections/findByID.js +7 -1
- package/dist/routes/rest/collections/findByID.js.map +1 -1
- package/dist/routes/rest/collections/findVersionByID.d.ts.map +1 -1
- package/dist/routes/rest/collections/findVersionByID.js +7 -1
- package/dist/routes/rest/collections/findVersionByID.js.map +1 -1
- package/dist/routes/rest/collections/preview.d.ts.map +1 -1
- package/dist/routes/rest/collections/preview.js +4 -1
- package/dist/routes/rest/collections/preview.js.map +1 -1
- package/dist/routes/rest/collections/restoreVersion.d.ts.map +1 -1
- package/dist/routes/rest/collections/restoreVersion.js +7 -1
- package/dist/routes/rest/collections/restoreVersion.js.map +1 -1
- package/dist/routes/rest/collections/updateByID.d.ts.map +1 -1
- package/dist/routes/rest/collections/updateByID.js +7 -1
- package/dist/routes/rest/collections/updateByID.js.map +1 -1
- package/dist/routes/rest/globals/preview.d.ts.map +1 -1
- package/dist/routes/rest/globals/preview.js +4 -1
- package/dist/routes/rest/globals/preview.js.map +1 -1
- package/dist/routes/rest/routeError.d.ts.map +1 -1
- package/dist/routes/rest/routeError.js.map +1 -1
- package/dist/routes/rest/utilities/sanitizeCollectionID.d.ts +9 -0
- package/dist/routes/rest/utilities/sanitizeCollectionID.d.ts.map +1 -0
- package/dist/routes/rest/utilities/sanitizeCollectionID.js +13 -0
- package/dist/routes/rest/utilities/sanitizeCollectionID.js.map +1 -0
- package/dist/scss/app.scss +2 -3
- package/dist/scss/vars.scss +0 -7
- package/dist/utilities/getDataAndFile.d.ts.map +1 -1
- package/dist/utilities/getDataAndFile.js +5 -1
- package/dist/utilities/getDataAndFile.js.map +1 -1
- package/dist/utilities/getNextRequestI18n.d.ts +11 -0
- package/dist/utilities/getNextRequestI18n.d.ts.map +1 -0
- package/dist/utilities/getNextRequestI18n.js +18 -0
- package/dist/utilities/getNextRequestI18n.js.map +1 -0
- package/dist/utilities/getPayloadHMR.d.ts.map +1 -1
- package/dist/utilities/getPayloadHMR.js +2 -1
- package/dist/utilities/getPayloadHMR.js.map +1 -1
- package/dist/utilities/getRequestLanguage.d.ts.map +1 -1
- package/dist/utilities/getRequestLanguage.js +13 -5
- package/dist/utilities/getRequestLanguage.js.map +1 -1
- package/dist/views/CreateFirstUser/index.d.ts.map +1 -1
- package/dist/views/CreateFirstUser/index.js +10 -1
- package/dist/views/CreateFirstUser/index.js.map +1 -1
- package/dist/views/Document/getMetaBySegment.js +2 -2
- package/dist/views/Document/getMetaBySegment.js.map +1 -1
- package/dist/views/NotFound/index.js +2 -2
- package/dist/views/NotFound/index.js.map +1 -1
- package/dist/views/Root/meta.js +2 -2
- package/dist/views/Root/meta.js.map +1 -1
- package/dist/withPayload.d.ts +1 -2
- package/dist/withPayload.d.ts.map +1 -1
- package/dist/withPayload.js +5 -1
- package/dist/withPayload.js.map +1 -1
- package/package.json +14 -13
- package/dist/prod/payload/SuisseIntl-Bold.woff +0 -0
- package/dist/prod/payload/SuisseIntl-Bold.woff2 +0 -0
- package/dist/prod/payload/SuisseIntl-Medium.woff +0 -0
- package/dist/prod/payload/SuisseIntl-Medium.woff2 +0 -0
- package/dist/prod/payload/SuisseIntl-SemiBold.woff +0 -0
- package/dist/prod/payload/SuisseIntl-SemiBold.woff2 +0 -0
- package/dist/prod/payload/SuisseIntl.woff +0 -0
- package/dist/prod/payload/SuisseIntl.woff2 +0 -0
- package/dist/prod/payload/merriweather-v30-latin-900.woff +0 -0
- package/dist/prod/payload/merriweather-v30-latin-900.woff2 +0 -0
- package/dist/prod/payload/merriweather-v30-latin-900italic.woff +0 -0
- package/dist/prod/payload/merriweather-v30-latin-900italic.woff2 +0 -0
- package/dist/prod/payload/merriweather-v30-latin-italic.woff +0 -0
- package/dist/prod/payload/merriweather-v30-latin-italic.woff2 +0 -0
- package/dist/prod/payload/merriweather-v30-latin-regular.woff +0 -0
- package/dist/prod/payload/merriweather-v30-latin-regular.woff2 +0 -0
- package/dist/scss/fonts.scss +0 -75
- package/dist/utilities/getNextI18n.d.ts +0 -7
- package/dist/utilities/getNextI18n.d.ts.map +0 -1
- package/dist/utilities/getNextI18n.js +0 -14
- package/dist/utilities/getNextI18n.js.map +0 -1
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { initI18n } from '@payloadcms/translations';
|
|
2
|
-
import { cookies, headers } from 'next/headers.js';
|
|
3
|
-
import { getRequestLanguage } from './getRequestLanguage.js';
|
|
4
|
-
export const getNextI18n = async ({ config, language })=>initI18n({
|
|
5
|
-
config: config.i18n,
|
|
6
|
-
context: 'client',
|
|
7
|
-
language: language || getRequestLanguage({
|
|
8
|
-
config,
|
|
9
|
-
cookies: cookies(),
|
|
10
|
-
headers: headers()
|
|
11
|
-
})
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
//# sourceMappingURL=getNextI18n.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utilities/getNextI18n.ts"],"sourcesContent":["import type { AcceptedLanguages, I18n } from '@payloadcms/translations'\nimport type { SanitizedConfig } from 'payload/types'\n\nimport { initI18n } from '@payloadcms/translations'\nimport { cookies, headers } from 'next/headers.js'\n\nimport { getRequestLanguage } from './getRequestLanguage.js'\n\nexport const getNextI18n = async ({\n config,\n language,\n}: {\n config: SanitizedConfig\n language?: AcceptedLanguages\n}): Promise<I18n> =>\n initI18n({\n config: config.i18n,\n context: 'client',\n language: language || getRequestLanguage({ config, cookies: cookies(), headers: headers() }),\n })\n"],"names":["initI18n","cookies","headers","getRequestLanguage","getNextI18n","config","language","i18n","context"],"rangeMappings":";;;;;;;;;;;","mappings":"AAGA,SAASA,QAAQ,QAAQ,2BAA0B;AACnD,SAASC,OAAO,EAAEC,OAAO,QAAQ,kBAAiB;AAElD,SAASC,kBAAkB,QAAQ,0BAAyB;AAE5D,OAAO,MAAMC,cAAc,OAAO,EAChCC,MAAM,EACNC,QAAQ,EAIT,GACCN,SAAS;QACPK,QAAQA,OAAOE,IAAI;QACnBC,SAAS;QACTF,UAAUA,YAAYH,mBAAmB;YAAEE;YAAQJ,SAASA;YAAWC,SAASA;QAAU;IAC5F,GAAE"}
|