payload 3.58.0-canary.0 → 3.58.0-internal.df9fce5
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":"isReactComponent.d.ts","sourceRoot":"","sources":["../../src/utilities/isReactComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,wBAAgB,gCAAgC,CAAC,CAAC,SAAS,GAAG,EAC5D,SAAS,EAAE,GAAG,GAAG,KAAK,CAAC,aAAa,GACnC,SAAS,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"isReactComponent.d.ts","sourceRoot":"","sources":["../../src/utilities/isReactComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,wBAAgB,gCAAgC,CAAC,CAAC,SAAS,GAAG,EAC5D,SAAS,EAAE,GAAG,GAAG,KAAK,CAAC,aAAa,GACnC,SAAS,IAAI,CAAC,CAahB;AAED,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,GAAG,EAClD,SAAS,EAAE,GAAG,GAAG,KAAK,CAAC,aAAa,GACnC,SAAS,IAAI,CAAC,CAKhB;AAED,wBAAgB,0BAA0B,CAAC,CAAC,SAAS,GAAG,EACtD,SAAS,EAAE,GAAG,GAAG,KAAK,CAAC,aAAa,GACnC,SAAS,IAAI,CAAC,CAEhB"}
|
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
const clientRefSymbol = Symbol.for('react.client.reference');
|
|
2
2
|
export function isReactServerComponentOrFunction(component) {
|
|
3
|
-
|
|
3
|
+
if (component === null || component === undefined) {
|
|
4
|
+
return false;
|
|
5
|
+
}
|
|
6
|
+
const hasClientComponentSymbol = component.$$typeof == clientRefSymbol;
|
|
7
|
+
const isFunctionalComponent = typeof component === 'function';
|
|
8
|
+
// Anonymous functions are Client Components in Turbopack. RSCs should have a name
|
|
9
|
+
const isAnonymousFunction = typeof component === 'function' && component.name === '';
|
|
10
|
+
const isRSC = isFunctionalComponent && !isAnonymousFunction && !hasClientComponentSymbol;
|
|
11
|
+
return isRSC;
|
|
4
12
|
}
|
|
5
13
|
export function isReactClientComponent(component) {
|
|
6
|
-
|
|
14
|
+
if (component === null || component === undefined) {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
return !isReactServerComponentOrFunction(component) && component.$$typeof == clientRefSymbol;
|
|
7
18
|
}
|
|
8
19
|
export function isReactComponentOrFunction(component) {
|
|
9
|
-
return
|
|
20
|
+
return isReactServerComponentOrFunction(component) || isReactClientComponent(component);
|
|
10
21
|
}
|
|
11
22
|
|
|
12
23
|
//# sourceMappingURL=isReactComponent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utilities/isReactComponent.ts"],"sourcesContent":["import type React from 'react'\n\nconst clientRefSymbol = Symbol.for('react.client.reference')\n\nexport function isReactServerComponentOrFunction<T extends any>(\n component: any | React.ComponentType,\n): component is T {\n return typeof component === 'function' && component
|
|
1
|
+
{"version":3,"sources":["../../src/utilities/isReactComponent.ts"],"sourcesContent":["import type React from 'react'\n\nconst clientRefSymbol = Symbol.for('react.client.reference')\n\nexport function isReactServerComponentOrFunction<T extends any>(\n component: any | React.ComponentType,\n): component is T {\n if (component === null || component === undefined) {\n return false\n }\n const hasClientComponentSymbol = component.$$typeof == clientRefSymbol\n\n const isFunctionalComponent = typeof component === 'function'\n // Anonymous functions are Client Components in Turbopack. RSCs should have a name\n const isAnonymousFunction = typeof component === 'function' && component.name === ''\n\n const isRSC = isFunctionalComponent && !isAnonymousFunction && !hasClientComponentSymbol\n\n return isRSC\n}\n\nexport function isReactClientComponent<T extends any>(\n component: any | React.ComponentType,\n): component is T {\n if (component === null || component === undefined) {\n return false\n }\n return !isReactServerComponentOrFunction(component) && component.$$typeof == clientRefSymbol\n}\n\nexport function isReactComponentOrFunction<T extends any>(\n component: any | React.ComponentType,\n): component is T {\n return isReactServerComponentOrFunction(component) || isReactClientComponent(component)\n}\n"],"names":["clientRefSymbol","Symbol","for","isReactServerComponentOrFunction","component","undefined","hasClientComponentSymbol","$$typeof","isFunctionalComponent","isAnonymousFunction","name","isRSC","isReactClientComponent","isReactComponentOrFunction"],"mappings":"AAEA,MAAMA,kBAAkBC,OAAOC,GAAG,CAAC;AAEnC,OAAO,SAASC,iCACdC,SAAoC;IAEpC,IAAIA,cAAc,QAAQA,cAAcC,WAAW;QACjD,OAAO;IACT;IACA,MAAMC,2BAA2BF,UAAUG,QAAQ,IAAIP;IAEvD,MAAMQ,wBAAwB,OAAOJ,cAAc;IACnD,kFAAkF;IAClF,MAAMK,sBAAsB,OAAOL,cAAc,cAAcA,UAAUM,IAAI,KAAK;IAElF,MAAMC,QAAQH,yBAAyB,CAACC,uBAAuB,CAACH;IAEhE,OAAOK;AACT;AAEA,OAAO,SAASC,uBACdR,SAAoC;IAEpC,IAAIA,cAAc,QAAQA,cAAcC,WAAW;QACjD,OAAO;IACT;IACA,OAAO,CAACF,iCAAiCC,cAAcA,UAAUG,QAAQ,IAAIP;AAC/E;AAEA,OAAO,SAASa,2BACdT,SAAoC;IAEpC,OAAOD,iCAAiCC,cAAcQ,uBAAuBR;AAC/E"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "payload",
|
|
3
|
-
"version": "3.58.0-
|
|
3
|
+
"version": "3.58.0-internal.df9fce5",
|
|
4
4
|
"description": "Node, React, Headless CMS and Application Framework built on Next.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"admin panel",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"undici": "7.10.0",
|
|
102
102
|
"uuid": "10.0.0",
|
|
103
103
|
"ws": "^8.16.0",
|
|
104
|
-
"@payloadcms/translations": "3.58.0-
|
|
104
|
+
"@payloadcms/translations": "3.58.0-internal.df9fce5"
|
|
105
105
|
},
|
|
106
106
|
"devDependencies": {
|
|
107
107
|
"@hyrious/esbuild-plugin-commonjs": "0.2.6",
|