payload 3.57.0 → 3.58.0-canary.0
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,CAEhB;AAED,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,GAAG,EAClD,SAAS,EAAE,GAAG,GAAG,KAAK,CAAC,aAAa,GACnC,SAAS,IAAI,CAAC,CAEhB;AAED,wBAAgB,0BAA0B,CAAC,CAAC,SAAS,GAAG,EACtD,SAAS,EAAE,GAAG,GAAG,KAAK,CAAC,aAAa,GACnC,SAAS,IAAI,CAAC,CAEhB"}
|
|
@@ -1,23 +1,12 @@
|
|
|
1
1
|
const clientRefSymbol = Symbol.for('react.client.reference');
|
|
2
2
|
export function isReactServerComponentOrFunction(component) {
|
|
3
|
-
|
|
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;
|
|
3
|
+
return typeof component === 'function' && component.$$typeof !== clientRefSymbol;
|
|
12
4
|
}
|
|
13
5
|
export function isReactClientComponent(component) {
|
|
14
|
-
|
|
15
|
-
return false;
|
|
16
|
-
}
|
|
17
|
-
return !isReactServerComponentOrFunction(component) && component.$$typeof == clientRefSymbol;
|
|
6
|
+
return typeof component === 'function' && component.$$typeof === clientRefSymbol;
|
|
18
7
|
}
|
|
19
8
|
export function isReactComponentOrFunction(component) {
|
|
20
|
-
return
|
|
9
|
+
return typeof component === 'function';
|
|
21
10
|
}
|
|
22
11
|
|
|
23
12
|
//# 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
|
|
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.$$typeof !== clientRefSymbol\n}\n\nexport function isReactClientComponent<T extends any>(\n component: any | React.ComponentType,\n): component is T {\n return typeof component === 'function' && component.$$typeof === clientRefSymbol\n}\n\nexport function isReactComponentOrFunction<T extends any>(\n component: any | React.ComponentType,\n): component is T {\n return typeof component === 'function'\n}\n"],"names":["clientRefSymbol","Symbol","for","isReactServerComponentOrFunction","component","$$typeof","isReactClientComponent","isReactComponentOrFunction"],"mappings":"AAEA,MAAMA,kBAAkBC,OAAOC,GAAG,CAAC;AAEnC,OAAO,SAASC,iCACdC,SAAoC;IAEpC,OAAO,OAAOA,cAAc,cAAcA,UAAUC,QAAQ,KAAKL;AACnE;AAEA,OAAO,SAASM,uBACdF,SAAoC;IAEpC,OAAO,OAAOA,cAAc,cAAcA,UAAUC,QAAQ,KAAKL;AACnE;AAEA,OAAO,SAASO,2BACdH,SAAoC;IAEpC,OAAO,OAAOA,cAAc;AAC9B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "payload",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.58.0-canary.0",
|
|
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.
|
|
104
|
+
"@payloadcms/translations": "3.58.0-canary.0"
|
|
105
105
|
},
|
|
106
106
|
"devDependencies": {
|
|
107
107
|
"@hyrious/esbuild-plugin-commonjs": "0.2.6",
|