@payloadcms/richtext-lexical 3.0.0-alpha.61 → 3.0.0-beta.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.
- package/dist/field/features/converters/html/converter/index.d.ts.map +1 -1
- package/dist/field/features/converters/html/converter/index.js +22 -17
- package/dist/field/features/converters/html/converter/index.js.map +1 -1
- package/dist/field/features/upload/feature.server.d.ts.map +1 -1
- package/dist/field/features/upload/feature.server.js +11 -4
- package/dist/field/features/upload/feature.server.js.map +1 -1
- package/package.json +10 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/field/features/converters/html/converter/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAC3E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEtC,OAAO,KAAK,EAAE,aAAa,EAAE,+BAA+B,EAAE,MAAM,YAAY,CAAA;AAEhF,wBAAsB,oBAAoB,CAAC,EACzC,UAAU,EACV,IAAI,EACJ,OAAO,GACR,EAAE;IACD,UAAU,EAAE,aAAa,EAAE,CAAA;IAC3B,IAAI,EAAE,qBAAqB,CAAA;IAC3B;;OAEG;IACH,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;CACxB,GAAG,OAAO,CAAC,MAAM,CAAC,CAUlB;AAED,wBAAsB,yBAAyB,CAAC,EAC9C,UAAU,EACV,YAAY,EACZ,MAAM,EACN,OAAO,GACR,EAAE;IACD,UAAU,EAAE,aAAa,EAAE,CAAA;IAC3B,YAAY,EAAE,qBAAqB,EAAE,CAAA;IACrC,MAAM,EAAE,+BAA+B,CAAA;IACvC;;OAEG;IACH,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;CACxB,GAAG,OAAO,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/field/features/converters/html/converter/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAC3E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEtC,OAAO,KAAK,EAAE,aAAa,EAAE,+BAA+B,EAAE,MAAM,YAAY,CAAA;AAEhF,wBAAsB,oBAAoB,CAAC,EACzC,UAAU,EACV,IAAI,EACJ,OAAO,GACR,EAAE;IACD,UAAU,EAAE,aAAa,EAAE,CAAA;IAC3B,IAAI,EAAE,qBAAqB,CAAA;IAC3B;;OAEG;IACH,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;CACxB,GAAG,OAAO,CAAC,MAAM,CAAC,CAUlB;AAED,wBAAsB,yBAAyB,CAAC,EAC9C,UAAU,EACV,YAAY,EACZ,MAAM,EACN,OAAO,GACR,EAAE;IACD,UAAU,EAAE,aAAa,EAAE,CAAA;IAC3B,YAAY,EAAE,qBAAqB,EAAE,CAAA;IACrC,MAAM,EAAE,+BAA+B,CAAA;IACvC;;OAEG;IACH,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;CACxB,GAAG,OAAO,CAAC,MAAM,CAAC,CAoClB"}
|
|
@@ -13,25 +13,30 @@ export async function convertLexicalNodesToHTML({ converters, lexicalNodes, pare
|
|
|
13
13
|
const unknownConverter = converters.find((converter)=>converter.nodeTypes.includes('unknown'));
|
|
14
14
|
const htmlArray = await Promise.all(lexicalNodes.map(async (node, i)=>{
|
|
15
15
|
const converterForNode = converters.find((converter)=>converter.nodeTypes.includes(node.type));
|
|
16
|
-
|
|
17
|
-
if (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
try {
|
|
17
|
+
if (!converterForNode) {
|
|
18
|
+
if (unknownConverter) {
|
|
19
|
+
return await unknownConverter.converter({
|
|
20
|
+
childIndex: i,
|
|
21
|
+
converters,
|
|
22
|
+
node,
|
|
23
|
+
parent,
|
|
24
|
+
payload
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
return '<span>unknown node</span>';
|
|
25
28
|
}
|
|
26
|
-
return
|
|
29
|
+
return await converterForNode.converter({
|
|
30
|
+
childIndex: i,
|
|
31
|
+
converters,
|
|
32
|
+
node,
|
|
33
|
+
parent,
|
|
34
|
+
payload
|
|
35
|
+
});
|
|
36
|
+
} catch (error) {
|
|
37
|
+
console.error('Error converting lexical node to HTML:', error, 'node:', node);
|
|
38
|
+
return '';
|
|
27
39
|
}
|
|
28
|
-
return converterForNode.converter({
|
|
29
|
-
childIndex: i,
|
|
30
|
-
converters,
|
|
31
|
-
node,
|
|
32
|
-
parent,
|
|
33
|
-
payload
|
|
34
|
-
});
|
|
35
40
|
}));
|
|
36
41
|
return htmlArray.join('') || '';
|
|
37
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/field/features/converters/html/converter/index.ts"],"sourcesContent":["import type { SerializedEditorState, SerializedLexicalNode } from 'lexical'\nimport type { Payload } from 'payload'\n\nimport type { HTMLConverter, SerializedLexicalNodeWithParent } from './types.js'\n\nexport async function convertLexicalToHTML({\n converters,\n data,\n payload,\n}: {\n converters: HTMLConverter[]\n data: SerializedEditorState\n /**\n * When the converter is called, payload CAN be passed in depending on where it's run.\n */\n payload: Payload | null\n}): Promise<string> {\n if (data?.root?.children?.length) {\n return await convertLexicalNodesToHTML({\n converters,\n lexicalNodes: data?.root?.children,\n parent: data?.root,\n payload,\n })\n }\n return ''\n}\n\nexport async function convertLexicalNodesToHTML({\n converters,\n lexicalNodes,\n parent,\n payload,\n}: {\n converters: HTMLConverter[]\n lexicalNodes: SerializedLexicalNode[]\n parent: SerializedLexicalNodeWithParent\n /**\n * When the converter is called, payload CAN be passed in depending on where it's run.\n */\n payload: Payload | null\n}): Promise<string> {\n const unknownConverter = converters.find((converter) => converter.nodeTypes.includes('unknown'))\n\n const htmlArray = await Promise.all(\n lexicalNodes.map(async (node, i) => {\n const converterForNode = converters.find((converter) =>\n converter.nodeTypes.includes(node.type),\n )\n if (!converterForNode) {\n
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/field/features/converters/html/converter/index.ts"],"sourcesContent":["import type { SerializedEditorState, SerializedLexicalNode } from 'lexical'\nimport type { Payload } from 'payload'\n\nimport type { HTMLConverter, SerializedLexicalNodeWithParent } from './types.js'\n\nexport async function convertLexicalToHTML({\n converters,\n data,\n payload,\n}: {\n converters: HTMLConverter[]\n data: SerializedEditorState\n /**\n * When the converter is called, payload CAN be passed in depending on where it's run.\n */\n payload: Payload | null\n}): Promise<string> {\n if (data?.root?.children?.length) {\n return await convertLexicalNodesToHTML({\n converters,\n lexicalNodes: data?.root?.children,\n parent: data?.root,\n payload,\n })\n }\n return ''\n}\n\nexport async function convertLexicalNodesToHTML({\n converters,\n lexicalNodes,\n parent,\n payload,\n}: {\n converters: HTMLConverter[]\n lexicalNodes: SerializedLexicalNode[]\n parent: SerializedLexicalNodeWithParent\n /**\n * When the converter is called, payload CAN be passed in depending on where it's run.\n */\n payload: Payload | null\n}): Promise<string> {\n const unknownConverter = converters.find((converter) => converter.nodeTypes.includes('unknown'))\n\n const htmlArray = await Promise.all(\n lexicalNodes.map(async (node, i) => {\n const converterForNode = converters.find((converter) =>\n converter.nodeTypes.includes(node.type),\n )\n try {\n if (!converterForNode) {\n if (unknownConverter) {\n return await unknownConverter.converter({\n childIndex: i,\n converters,\n node,\n parent,\n payload,\n })\n }\n return '<span>unknown node</span>'\n }\n return await converterForNode.converter({\n childIndex: i,\n converters,\n node,\n parent,\n payload,\n })\n } catch (error) {\n console.error('Error converting lexical node to HTML:', error, 'node:', node)\n return ''\n }\n }),\n )\n\n return htmlArray.join('') || ''\n}\n"],"names":["convertLexicalToHTML","converters","data","payload","root","children","length","convertLexicalNodesToHTML","lexicalNodes","parent","unknownConverter","find","converter","nodeTypes","includes","htmlArray","Promise","all","map","node","i","converterForNode","type","childIndex","error","console","join"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAKA,OAAO,eAAeA,qBAAqB,EACzCC,UAAU,EACVC,IAAI,EACJC,OAAO,EAQR;IACC,IAAID,MAAME,MAAMC,UAAUC,QAAQ;QAChC,OAAO,MAAMC,0BAA0B;YACrCN;YACAO,cAAcN,MAAME,MAAMC;YAC1BI,QAAQP,MAAME;YACdD;QACF;IACF;IACA,OAAO;AACT;AAEA,OAAO,eAAeI,0BAA0B,EAC9CN,UAAU,EACVO,YAAY,EACZC,MAAM,EACNN,OAAO,EASR;IACC,MAAMO,mBAAmBT,WAAWU,IAAI,CAAC,CAACC,YAAcA,UAAUC,SAAS,CAACC,QAAQ,CAAC;IAErF,MAAMC,YAAY,MAAMC,QAAQC,GAAG,CACjCT,aAAaU,GAAG,CAAC,OAAOC,MAAMC;QAC5B,MAAMC,mBAAmBpB,WAAWU,IAAI,CAAC,CAACC,YACxCA,UAAUC,SAAS,CAACC,QAAQ,CAACK,KAAKG,IAAI;QAExC,IAAI;YACF,IAAI,CAACD,kBAAkB;gBACrB,IAAIX,kBAAkB;oBACpB,OAAO,MAAMA,iBAAiBE,SAAS,CAAC;wBACtCW,YAAYH;wBACZnB;wBACAkB;wBACAV;wBACAN;oBACF;gBACF;gBACA,OAAO;YACT;YACA,OAAO,MAAMkB,iBAAiBT,SAAS,CAAC;gBACtCW,YAAYH;gBACZnB;gBACAkB;gBACAV;gBACAN;YACF;QACF,EAAE,OAAOqB,OAAO;YACdC,QAAQD,KAAK,CAAC,0CAA0CA,OAAO,SAASL;YACxE,OAAO;QACT;IACF;IAGF,OAAOJ,UAAUW,IAAI,CAAC,OAAO;AAC/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/field/features/upload/feature.server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAS,+BAA+B,EAAW,MAAM,eAAe,CAAA;AAGpF,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAA;AAChE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAA;AAOnE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,WAAW,EAAE;QACX,CAAC,UAAU,EAAE,MAAM,GAAG;YACpB,MAAM,EAAE,+BAA+B,EAAE,CAAA;SAC1C,CAAA;KACF,CAAA;CACF,CAAA;AASD,eAAO,MAAM,aAAa,EAAE,6BAA6B,CACvD,kBAAkB,EAClB,wBAAwB,
|
|
1
|
+
{"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/field/features/upload/feature.server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAS,+BAA+B,EAAW,MAAM,eAAe,CAAA;AAGpF,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAA;AAChE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAA;AAOnE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,WAAW,EAAE;QACX,CAAC,UAAU,EAAE,MAAM,GAAG;YACpB,MAAM,EAAE,+BAA+B,EAAE,CAAA;SAC1C,CAAA;KACF,CAAA;CACF,CAAA;AASD,eAAO,MAAM,aAAa,EAAE,6BAA6B,CACvD,kBAAkB,EAClB,wBAAwB,CAuHzB,CAAA"}
|
|
@@ -42,10 +42,17 @@ export const UploadFeature = (props)=>{
|
|
|
42
42
|
html: {
|
|
43
43
|
converter: async ({ node, payload })=>{
|
|
44
44
|
if (payload) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
let uploadDocument;
|
|
46
|
+
try {
|
|
47
|
+
uploadDocument = await payload.findByID({
|
|
48
|
+
id: node.value.id,
|
|
49
|
+
collection: node.relationTo
|
|
50
|
+
});
|
|
51
|
+
} catch (ignored) {
|
|
52
|
+
// eslint-disable-next-line no-console
|
|
53
|
+
console.error('Lexical upload node HTML converter: error fetching upload file', ignored, 'Node:', node);
|
|
54
|
+
return `<img />`;
|
|
55
|
+
}
|
|
49
56
|
const url = getAbsoluteURL(uploadDocument?.url, payload);
|
|
50
57
|
/**
|
|
51
58
|
* If the upload is not an image, return a link to the upload
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/field/features/upload/feature.server.ts"],"sourcesContent":["import type { Field, FieldWithRichTextRequiredEditor, Payload } from 'payload/types'\n\nimport type { HTMLConverter } from '../converters/html/converter/types.js'\nimport type { FeatureProviderProviderServer } from '../types.js'\nimport type { UploadFeaturePropsClient } from './feature.client.js'\n\nimport { UploadFeatureClientComponent } from './feature.client.js'\nimport { type SerializedUploadNode, UploadNode } from './nodes/UploadNode.js'\nimport { uploadPopulationPromiseHOC } from './populationPromise.js'\nimport { uploadValidation } from './validate.js'\n\nexport type UploadFeatureProps = {\n collections: {\n [collection: string]: {\n fields: FieldWithRichTextRequiredEditor[]\n }\n }\n}\n\n/**\n * Get the absolute URL for an upload URL by potentially prepending the serverURL\n */\nfunction getAbsoluteURL(url: string, payload: Payload): string {\n return url?.startsWith('http') ? url : (payload?.config?.serverURL || '') + url\n}\n\nexport const UploadFeature: FeatureProviderProviderServer<\n UploadFeatureProps,\n UploadFeaturePropsClient\n> = (props) => {\n if (!props) {\n props = { collections: {} }\n }\n\n const clientProps: UploadFeaturePropsClient = { collections: {} }\n if (props.collections) {\n for (const collection in props.collections) {\n clientProps.collections[collection] = {\n hasExtraFields: props.collections[collection].fields.length >= 1,\n }\n }\n }\n\n return {\n feature: () => {\n return {\n ClientComponent: UploadFeatureClientComponent,\n clientFeatureProps: clientProps,\n generateSchemaMap: ({ props }) => {\n if (!props?.collections) return {}\n\n const map: {\n [key: string]: Field[]\n } = {}\n\n for (const collection in props.collections) {\n map[collection] = props.collections[collection].fields\n }\n\n return map\n },\n nodes: [\n {\n converters: {\n html: {\n converter: async ({ node, payload }) => {\n if (payload) {\n
|
|
1
|
+
{"version":3,"sources":["../../../../src/field/features/upload/feature.server.ts"],"sourcesContent":["import type { Field, FieldWithRichTextRequiredEditor, Payload } from 'payload/types'\n\nimport type { HTMLConverter } from '../converters/html/converter/types.js'\nimport type { FeatureProviderProviderServer } from '../types.js'\nimport type { UploadFeaturePropsClient } from './feature.client.js'\n\nimport { UploadFeatureClientComponent } from './feature.client.js'\nimport { type SerializedUploadNode, UploadNode } from './nodes/UploadNode.js'\nimport { uploadPopulationPromiseHOC } from './populationPromise.js'\nimport { uploadValidation } from './validate.js'\n\nexport type UploadFeatureProps = {\n collections: {\n [collection: string]: {\n fields: FieldWithRichTextRequiredEditor[]\n }\n }\n}\n\n/**\n * Get the absolute URL for an upload URL by potentially prepending the serverURL\n */\nfunction getAbsoluteURL(url: string, payload: Payload): string {\n return url?.startsWith('http') ? url : (payload?.config?.serverURL || '') + url\n}\n\nexport const UploadFeature: FeatureProviderProviderServer<\n UploadFeatureProps,\n UploadFeaturePropsClient\n> = (props) => {\n if (!props) {\n props = { collections: {} }\n }\n\n const clientProps: UploadFeaturePropsClient = { collections: {} }\n if (props.collections) {\n for (const collection in props.collections) {\n clientProps.collections[collection] = {\n hasExtraFields: props.collections[collection].fields.length >= 1,\n }\n }\n }\n\n return {\n feature: () => {\n return {\n ClientComponent: UploadFeatureClientComponent,\n clientFeatureProps: clientProps,\n generateSchemaMap: ({ props }) => {\n if (!props?.collections) return {}\n\n const map: {\n [key: string]: Field[]\n } = {}\n\n for (const collection in props.collections) {\n map[collection] = props.collections[collection].fields\n }\n\n return map\n },\n nodes: [\n {\n converters: {\n html: {\n converter: async ({ node, payload }) => {\n if (payload) {\n let uploadDocument: any\n try {\n uploadDocument = await payload.findByID({\n id: node.value.id,\n collection: node.relationTo,\n })\n } catch (ignored) {\n // eslint-disable-next-line no-console\n console.error(\n 'Lexical upload node HTML converter: error fetching upload file',\n ignored,\n 'Node:',\n node,\n )\n return `<img />`\n }\n\n const url: string = getAbsoluteURL(uploadDocument?.url as string, payload)\n\n /**\n * If the upload is not an image, return a link to the upload\n */\n if (!(uploadDocument?.mimeType as string)?.startsWith('image')) {\n return `<a href=\"${url}\" rel=\"noopener noreferrer\">${uploadDocument.filename}</a>`\n }\n\n /**\n * If the upload is a simple image with no different sizes, return a simple img tag\n */\n if (!uploadDocument?.sizes || !Object.keys(uploadDocument?.sizes).length) {\n return `<img src=\"${url}\" alt=\"${uploadDocument?.filename}\" width=\"${uploadDocument?.width}\" height=\"${uploadDocument?.height}\"/>`\n }\n\n /**\n * If the upload is an image with different sizes, return a picture element\n */\n let pictureHTML = '<picture>'\n\n // Iterate through each size in the data.sizes object\n for (const size in uploadDocument.sizes) {\n const imageSize = uploadDocument.sizes[size]\n\n // Skip if any property of the size object is null\n if (\n !imageSize.width ||\n !imageSize.height ||\n !imageSize.mimeType ||\n !imageSize.filesize ||\n !imageSize.filename ||\n !imageSize.url\n ) {\n continue\n }\n const imageSizeURL: string = getAbsoluteURL(imageSize?.url as string, payload)\n\n pictureHTML += `<source srcset=\"${imageSizeURL}\" media=\"(max-width: ${imageSize.width}px)\" type=\"${imageSize.mimeType}\">`\n }\n\n // Add the default img tag\n pictureHTML += `<img src=\"${url}\" alt=\"Image\" width=\"${uploadDocument.width}\" height=\"${uploadDocument.height}\">`\n pictureHTML += '</picture>'\n return pictureHTML\n } else {\n return `<img src=\"${node.value.id}\" />`\n }\n },\n nodeTypes: [UploadNode.getType()],\n } as HTMLConverter<SerializedUploadNode>,\n },\n node: UploadNode,\n populationPromises: [uploadPopulationPromiseHOC(props)],\n validations: [uploadValidation()],\n },\n ],\n serverFeatureProps: props,\n }\n },\n key: 'upload',\n serverFeatureProps: props,\n }\n}\n"],"names":["UploadFeatureClientComponent","UploadNode","uploadPopulationPromiseHOC","uploadValidation","getAbsoluteURL","url","payload","startsWith","config","serverURL","UploadFeature","props","collections","clientProps","collection","hasExtraFields","fields","length","feature","ClientComponent","clientFeatureProps","generateSchemaMap","map","nodes","converters","html","converter","node","uploadDocument","findByID","id","value","relationTo","ignored","console","error","mimeType","filename","sizes","Object","keys","width","height","pictureHTML","size","imageSize","filesize","imageSizeURL","nodeTypes","getType","populationPromises","validations","serverFeatureProps","key"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payloadcms/richtext-lexical",
|
|
3
|
-
"version": "3.0.0-
|
|
3
|
+
"version": "3.0.0-beta.0",
|
|
4
4
|
"description": "The officially supported Lexical richtext adapter for Payload",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -40,17 +40,17 @@
|
|
|
40
40
|
"@types/node": "20.12.5",
|
|
41
41
|
"@types/react": "18.2.74",
|
|
42
42
|
"@types/react-dom": "18.2.24",
|
|
43
|
-
"
|
|
44
|
-
"@payloadcms/
|
|
45
|
-
"@payloadcms/
|
|
46
|
-
"@payloadcms/
|
|
47
|
-
"
|
|
43
|
+
"payload": "3.0.0-beta.0",
|
|
44
|
+
"@payloadcms/translations": "3.0.0-beta.0",
|
|
45
|
+
"@payloadcms/next": "3.0.0-beta.0",
|
|
46
|
+
"@payloadcms/ui": "3.0.0-beta.0",
|
|
47
|
+
"@payloadcms/eslint-config": "1.1.1"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@payloadcms/translations": "3.0.0-
|
|
51
|
-
"@payloadcms/ui": "3.0.0-
|
|
52
|
-
"
|
|
53
|
-
"
|
|
50
|
+
"@payloadcms/translations": "3.0.0-beta.0",
|
|
51
|
+
"@payloadcms/ui": "3.0.0-beta.0",
|
|
52
|
+
"@payloadcms/next": "3.0.0-beta.0",
|
|
53
|
+
"payload": "3.0.0-beta.0"
|
|
54
54
|
},
|
|
55
55
|
"exports": {
|
|
56
56
|
".": {
|