@payloadcms/next 3.55.0 → 3.56.0-internal.299316b

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.
@@ -1 +1 @@
1
- {"version":3,"file":"SyncClientConfig.d.ts","sourceRoot":"","sources":["../../../src/views/Root/SyncClientConfig.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAK3C;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,qBAAsB;IAAE,YAAY,EAAE,YAAY,CAAA;CAAE,QAehF,CAAA"}
1
+ {"version":3,"file":"SyncClientConfig.d.ts","sourceRoot":"","sources":["../../../src/views/Root/SyncClientConfig.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAK3C;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,qBAAsB;IAAE,YAAY,EAAE,YAAY,CAAA;CAAE,QAQhF,CAAA"}
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { c as _c } from "react/compiler-runtime";
4
4
  import { useConfig } from '@payloadcms/ui';
5
- import { useEffect, useRef } from 'react';
5
+ import { useEffect } from 'react';
6
6
  /**
7
7
  * This component is required in order for the _page_ to be able to refresh the client config,
8
8
  * which may have been cached on the _layout_ level, where the ConfigProvider is managed.
@@ -17,15 +17,10 @@ export const SyncClientConfig = t0 => {
17
17
  const {
18
18
  setConfig
19
19
  } = useConfig();
20
- const initialRender = useRef(true);
21
20
  let t1;
22
21
  let t2;
23
22
  if ($[0] !== clientConfig || $[1] !== setConfig) {
24
23
  t1 = () => {
25
- if (initialRender.current) {
26
- initialRender.current = false;
27
- return;
28
- }
29
24
  setConfig(clientConfig);
30
25
  };
31
26
  t2 = [clientConfig, setConfig];
@@ -1 +1 @@
1
- {"version":3,"file":"SyncClientConfig.js","names":["c","_c","useConfig","useEffect","useRef","SyncClientConfig","t0","$","clientConfig","setConfig","initialRender","t1","t2","current"],"sources":["../../../src/views/Root/SyncClientConfig.tsx"],"sourcesContent":["'use client'\nimport type { ClientConfig } from 'payload'\n\nimport { useConfig } from '@payloadcms/ui'\nimport { useEffect, useRef } from 'react'\n\n/**\n * This component is required in order for the _page_ to be able to refresh the client config,\n * which may have been cached on the _layout_ level, where the ConfigProvider is managed.\n * Since the layout does not re-render on page navigation / authentication, we need to manually\n * update the config, as the user may have been authenticated in the process, which affects the client config.\n */\nexport const SyncClientConfig = ({ clientConfig }: { clientConfig: ClientConfig }) => {\n const { setConfig } = useConfig()\n const initialRender = useRef(true)\n\n useEffect(() => {\n // Can skip the initial render, as the config will already be set by the layout\n if (initialRender.current) {\n initialRender.current = false\n return\n }\n\n setConfig(clientConfig)\n }, [clientConfig, setConfig])\n\n return null\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;AAGA,SAASC,SAAS,QAAQ;AAC1B,SAASC,SAAS,EAAEC,MAAM,QAAQ;AAElC;;;;;;AAMA,OAAO,MAAMC,gBAAA,GAAmBC,EAAA;EAAA,MAAAC,CAAA,GAAAN,EAAA;EAAC;IAAAO;EAAA,IAAAF,EAAgD;EAC/E;IAAAG;EAAA,IAAsBP,SAAA;EACtB,MAAAQ,aAAA,GAAsBN,MAAA,KAAO;EAAA,IAAAO,EAAA;EAAA,IAAAC,EAAA;EAAA,IAAAL,CAAA,QAAAC,YAAA,IAAAD,CAAA,QAAAE,SAAA;IAEnBE,EAAA,GAAAA,CAAA;MAAA,IAEJD,aAAA,CAAAG,OAAA;QACFH,aAAA,CAAAG,OAAA;QAAA;MAAA;MAIFJ,SAAA,CAAUD,YAAA;IAAA;IACTI,EAAA,IAACJ,YAAA,EAAcC,SAAA;IAAUF,CAAA,MAAAC,YAAA;IAAAD,CAAA,MAAAE,SAAA;IAAAF,CAAA,MAAAI,EAAA;IAAAJ,CAAA,MAAAK,EAAA;EAAA;IAAAD,EAAA,GAAAJ,CAAA;IAAAK,EAAA,GAAAL,CAAA;EAAA;EAR5BJ,SAAA,CAAUQ,EAQV,EAAGC,EAAyB;EAAA;AAAA,CAG9B","ignoreList":[]}
1
+ {"version":3,"file":"SyncClientConfig.js","names":["c","_c","useConfig","useEffect","SyncClientConfig","t0","$","clientConfig","setConfig","t1","t2"],"sources":["../../../src/views/Root/SyncClientConfig.tsx"],"sourcesContent":["'use client'\nimport type { ClientConfig } from 'payload'\n\nimport { useConfig } from '@payloadcms/ui'\nimport { useEffect } from 'react'\n\n/**\n * This component is required in order for the _page_ to be able to refresh the client config,\n * which may have been cached on the _layout_ level, where the ConfigProvider is managed.\n * Since the layout does not re-render on page navigation / authentication, we need to manually\n * update the config, as the user may have been authenticated in the process, which affects the client config.\n */\nexport const SyncClientConfig = ({ clientConfig }: { clientConfig: ClientConfig }) => {\n const { setConfig } = useConfig()\n\n useEffect(() => {\n setConfig(clientConfig)\n }, [clientConfig, setConfig])\n\n return null\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;AAGA,SAASC,SAAS,QAAQ;AAC1B,SAASC,SAAS,QAAQ;AAE1B;;;;;;AAMA,OAAO,MAAMC,gBAAA,GAAmBC,EAAA;EAAA,MAAAC,CAAA,GAAAL,EAAA;EAAC;IAAAM;EAAA,IAAAF,EAAgD;EAC/E;IAAAG;EAAA,IAAsBN,SAAA;EAAA,IAAAO,EAAA;EAAA,IAAAC,EAAA;EAAA,IAAAJ,CAAA,QAAAC,YAAA,IAAAD,CAAA,QAAAE,SAAA;IAEZC,EAAA,GAAAA,CAAA;MACRD,SAAA,CAAUD,YAAA;IAAA;IACTG,EAAA,IAACH,YAAA,EAAcC,SAAA;IAAUF,CAAA,MAAAC,YAAA;IAAAD,CAAA,MAAAE,SAAA;IAAAF,CAAA,MAAAG,EAAA;IAAAH,CAAA,MAAAI,EAAA;EAAA;IAAAD,EAAA,GAAAH,CAAA;IAAAI,EAAA,GAAAJ,CAAA;EAAA;EAF5BH,SAAA,CAAUM,EAEV,EAAGC,EAAyB;EAAA;AAAA,CAG9B","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/next",
3
- "version": "3.55.0",
3
+ "version": "3.56.0-internal.299316b",
4
4
  "homepage": "https://payloadcms.com",
5
5
  "repository": {
6
6
  "type": "git",
@@ -87,9 +87,9 @@
87
87
  "qs-esm": "7.0.2",
88
88
  "sass": "1.77.4",
89
89
  "uuid": "10.0.0",
90
- "@payloadcms/graphql": "3.55.0",
91
- "@payloadcms/translations": "3.55.0",
92
- "@payloadcms/ui": "3.55.0"
90
+ "@payloadcms/graphql": "3.56.0-internal.299316b",
91
+ "@payloadcms/translations": "3.56.0-internal.299316b",
92
+ "@payloadcms/ui": "3.56.0-internal.299316b"
93
93
  },
94
94
  "devDependencies": {
95
95
  "@babel/cli": "7.27.2",
@@ -106,13 +106,13 @@
106
106
  "esbuild": "0.25.5",
107
107
  "esbuild-sass-plugin": "3.3.1",
108
108
  "swc-plugin-transform-remove-imports": "4.0.4",
109
- "payload": "3.55.0",
110
- "@payloadcms/eslint-config": "3.28.0"
109
+ "@payloadcms/eslint-config": "3.28.0",
110
+ "payload": "3.56.0-internal.299316b"
111
111
  },
112
112
  "peerDependencies": {
113
113
  "graphql": "^16.8.1",
114
114
  "next": "^15.2.3",
115
- "payload": "3.55.0"
115
+ "payload": "3.56.0-internal.299316b"
116
116
  },
117
117
  "engines": {
118
118
  "node": "^18.20.2 || >=20.9.0"