@payloadcms/richtext-slate 3.0.0-canary.bda91d8 → 3.0.0-canary.be89809

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,3 +1,3 @@
1
1
  export { RscEntrySlateCell } from '../../cell/rscEntry.js';
2
2
  export { RscEntrySlateField } from '../../field/rscEntry.js';
3
- //# sourceMappingURL=rscs.d.ts.map
3
+ //# sourceMappingURL=rsc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rsc.d.ts","sourceRoot":"","sources":["../../../src/exports/server/rsc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA"}
@@ -1,4 +1,4 @@
1
1
  export { RscEntrySlateCell } from '../../cell/rscEntry.js';
2
2
  export { RscEntrySlateField } from '../../field/rscEntry.js';
3
3
 
4
- //# sourceMappingURL=rscs.js.map
4
+ //# sourceMappingURL=rsc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/exports/server/rsc.ts"],"sourcesContent":["export { RscEntrySlateCell } from '../../cell/rscEntry.js'\nexport { RscEntrySlateField } from '../../field/rscEntry.js'\n"],"names":["RscEntrySlateCell","RscEntrySlateField"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,yBAAwB;AAC1D,SAASC,kBAAkB,QAAQ,0BAAyB"}
package/dist/index.js CHANGED
@@ -36,16 +36,16 @@ export function slateEditor(args) {
36
36
  }
37
37
  }
38
38
  return {
39
- CellComponent: '@payloadcms/richtext-slate/rscs#RscEntrySlateCell',
39
+ CellComponent: '@payloadcms/richtext-slate/rsc#RscEntrySlateCell',
40
40
  FieldComponent: {
41
- path: '@payloadcms/richtext-slate/rscs#RscEntrySlateField',
41
+ path: '@payloadcms/richtext-slate/rsc#RscEntrySlateField',
42
42
  serverProps: {
43
43
  args
44
44
  }
45
45
  },
46
46
  generateImportMap: ({ addToImportMap })=>{
47
- addToImportMap('@payloadcms/richtext-slate/rscs#RscEntrySlateCell');
48
- addToImportMap('@payloadcms/richtext-slate/rscs#RscEntrySlateField');
47
+ addToImportMap('@payloadcms/richtext-slate/rsc#RscEntrySlateCell');
48
+ addToImportMap('@payloadcms/richtext-slate/rsc#RscEntrySlateField');
49
49
  Object.values(leafTypes).forEach((leaf)=>{
50
50
  if (leaf.Button) {
51
51
  addToImportMap(leaf.Button);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.tsx"],"sourcesContent":["import type { Config, RichTextAdapterProvider } from 'payload'\n\nimport { sanitizeFields, withNullableJSONSchemaType } from 'payload'\n\nimport type { AdapterArguments } from './types.js'\n\nimport { richTextRelationshipPromise } from './data/richTextRelationshipPromise.js'\nimport { richTextValidate } from './data/validation.js'\nimport { elements as elementTypes } from './field/elements/index.js'\nimport { transformExtraFields } from './field/elements/link/utilities.js'\nimport { defaultLeaves as leafTypes } from './field/leaves/index.js'\nimport { getGenerateSchemaMap } from './generateSchemaMap.js'\n\nexport function slateEditor(\n args: AdapterArguments,\n): RichTextAdapterProvider<any[], AdapterArguments, any> {\n return async ({ config }) => {\n const validRelationships = config.collections.map((c) => c.slug) || []\n\n if (!args.admin) {\n args.admin = {}\n }\n if (!args.admin.link) {\n args.admin.link = {}\n }\n if (!args.admin.link.fields) {\n args.admin.link.fields = []\n }\n args.admin.link.fields = await sanitizeFields({\n config: config as unknown as Config,\n fields: transformExtraFields(args.admin?.link?.fields, config),\n parentIsLocalized: false,\n validRelationships,\n })\n\n if (args?.admin?.upload?.collections) {\n for (const collection of Object.keys(args.admin.upload.collections)) {\n if (args?.admin?.upload?.collections[collection]?.fields) {\n args.admin.upload.collections[collection].fields = await sanitizeFields({\n config: config as unknown as Config,\n fields: args.admin?.upload?.collections[collection]?.fields,\n parentIsLocalized: false,\n validRelationships,\n })\n }\n }\n }\n\n return {\n CellComponent: '@payloadcms/richtext-slate/rscs#RscEntrySlateCell',\n FieldComponent: {\n path: '@payloadcms/richtext-slate/rscs#RscEntrySlateField',\n serverProps: {\n args,\n },\n },\n generateImportMap: ({ addToImportMap }) => {\n addToImportMap('@payloadcms/richtext-slate/rscs#RscEntrySlateCell')\n addToImportMap('@payloadcms/richtext-slate/rscs#RscEntrySlateField')\n Object.values(leafTypes).forEach((leaf) => {\n if (leaf.Button) {\n addToImportMap(leaf.Button)\n }\n if (leaf.Leaf) {\n addToImportMap(leaf.Leaf)\n }\n if (Array.isArray(leaf.plugins) && leaf.plugins?.length) {\n addToImportMap(leaf.plugins)\n }\n })\n args?.admin?.leaves?.forEach((leaf) => {\n if (typeof leaf === 'object') {\n if (leaf.Button) {\n addToImportMap(leaf.Button)\n }\n if (leaf.Leaf) {\n addToImportMap(leaf.Leaf)\n }\n if (Array.isArray(leaf.plugins) && leaf.plugins?.length) {\n addToImportMap(leaf.plugins)\n }\n }\n })\n\n Object.values(elementTypes).forEach((element) => {\n if (element.Button) {\n addToImportMap(element.Button)\n }\n if (element.Element) {\n addToImportMap(element.Element)\n }\n if (Array.isArray(element.plugins) && element.plugins?.length) {\n addToImportMap(element.plugins)\n }\n })\n\n args?.admin?.elements?.forEach((element) => {\n if (typeof element === 'object') {\n if (element.Button) {\n addToImportMap(element.Button)\n }\n if (element.Element) {\n addToImportMap(element.Element)\n }\n if (Array.isArray(element.plugins) && element.plugins?.length) {\n addToImportMap(element.plugins)\n }\n }\n })\n },\n generateSchemaMap: getGenerateSchemaMap(args),\n graphQLPopulationPromises({\n context,\n currentDepth,\n depth,\n draft,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n }) {\n if (\n field.admin?.elements?.includes('relationship') ||\n field.admin?.elements?.includes('upload') ||\n field.admin?.elements?.includes('link') ||\n !field?.admin?.elements\n ) {\n richTextRelationshipPromise({\n context,\n currentDepth,\n depth,\n draft,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n })\n }\n },\n hooks: {\n afterRead: [\n ({\n context: _context,\n currentDepth,\n depth,\n draft,\n field: _field,\n fieldPromises,\n findMany,\n flattenLocales,\n overrideAccess,\n populate,\n populationPromises,\n req,\n showHiddenFields,\n siblingData,\n }) => {\n const context: any = _context\n const field = _field as any\n if (\n field.admin?.elements?.includes('relationship') ||\n field.admin?.elements?.includes('upload') ||\n field.admin?.elements?.includes('link') ||\n !field?.admin?.elements\n ) {\n richTextRelationshipPromise({\n context,\n currentDepth,\n depth,\n draft,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n overrideAccess,\n populateArg: populate,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc: siblingData,\n })\n }\n },\n ],\n },\n outputSchema: ({ isRequired }) => {\n return {\n type: withNullableJSONSchemaType('array', isRequired),\n items: {\n type: 'object',\n },\n }\n },\n validate: richTextValidate,\n }\n }\n}\n\nexport type {\n AdapterArguments,\n ElementNode,\n RichTextCustomElement,\n RichTextCustomLeaf,\n RichTextElement,\n RichTextLeaf,\n RichTextPlugin,\n RichTextPluginComponent,\n SlateFieldProps,\n TextNode,\n} from './types.js'\n\nexport { nodeIsTextNode } from './types.js'\n"],"names":["sanitizeFields","withNullableJSONSchemaType","richTextRelationshipPromise","richTextValidate","elements","elementTypes","transformExtraFields","defaultLeaves","leafTypes","getGenerateSchemaMap","slateEditor","args","config","validRelationships","collections","map","c","slug","admin","link","fields","parentIsLocalized","upload","collection","Object","keys","CellComponent","FieldComponent","path","serverProps","generateImportMap","addToImportMap","values","forEach","leaf","Button","Leaf","Array","isArray","plugins","length","leaves","element","Element","generateSchemaMap","graphQLPopulationPromises","context","currentDepth","depth","draft","field","fieldPromises","findMany","flattenLocales","overrideAccess","populationPromises","req","showHiddenFields","siblingDoc","includes","hooks","afterRead","_context","_field","populate","siblingData","populateArg","outputSchema","isRequired","type","items","validate","nodeIsTextNode"],"mappings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,EAAEd,UAAUuD,SAAS,aAChCT,MAAMhC,KAAK,EAAEd,UAAUuD,SAAS,WAChC,CAACT,OAAOhC,OAAOd,UACf;4BACAF,4BAA4B;gCAC1B4C;gCACAC;gCACAC;gCACAC;gCACAC;gCACAC;gCACAC;gCACAC;gCACAC;gCACAY,aAAaF;gCACbT;gCACAC;gCACAC;gCACAC,YAAYO;4BACd;wBACF;oBACF;iBACD;YACH;YACAE,cAAc,CAAC,EAAEC,UAAU,EAAE;gBAC3B,OAAO;oBACLC,MAAMpE,2BAA2B,SAASmE;oBAC1CE,OAAO;wBACLD,MAAM;oBACR;gBACF;YACF;YACAE,UAAUpE;QACZ;IACF;AACF;AAeA,SAASqE,cAAc,QAAQ,aAAY"}
1
+ {"version":3,"sources":["../src/index.tsx"],"sourcesContent":["import type { Config, RichTextAdapterProvider } from 'payload'\n\nimport { sanitizeFields, withNullableJSONSchemaType } from 'payload'\n\nimport type { AdapterArguments } from './types.js'\n\nimport { richTextRelationshipPromise } from './data/richTextRelationshipPromise.js'\nimport { richTextValidate } from './data/validation.js'\nimport { elements as elementTypes } from './field/elements/index.js'\nimport { transformExtraFields } from './field/elements/link/utilities.js'\nimport { defaultLeaves as leafTypes } from './field/leaves/index.js'\nimport { getGenerateSchemaMap } from './generateSchemaMap.js'\n\nexport function slateEditor(\n args: AdapterArguments,\n): RichTextAdapterProvider<any[], AdapterArguments, any> {\n return async ({ config }) => {\n const validRelationships = config.collections.map((c) => c.slug) || []\n\n if (!args.admin) {\n args.admin = {}\n }\n if (!args.admin.link) {\n args.admin.link = {}\n }\n if (!args.admin.link.fields) {\n args.admin.link.fields = []\n }\n args.admin.link.fields = await sanitizeFields({\n config: config as unknown as Config,\n fields: transformExtraFields(args.admin?.link?.fields, config),\n parentIsLocalized: false,\n validRelationships,\n })\n\n if (args?.admin?.upload?.collections) {\n for (const collection of Object.keys(args.admin.upload.collections)) {\n if (args?.admin?.upload?.collections[collection]?.fields) {\n args.admin.upload.collections[collection].fields = await sanitizeFields({\n config: config as unknown as Config,\n fields: args.admin?.upload?.collections[collection]?.fields,\n parentIsLocalized: false,\n validRelationships,\n })\n }\n }\n }\n\n return {\n CellComponent: '@payloadcms/richtext-slate/rsc#RscEntrySlateCell',\n FieldComponent: {\n path: '@payloadcms/richtext-slate/rsc#RscEntrySlateField',\n serverProps: {\n args,\n },\n },\n generateImportMap: ({ addToImportMap }) => {\n addToImportMap('@payloadcms/richtext-slate/rsc#RscEntrySlateCell')\n addToImportMap('@payloadcms/richtext-slate/rsc#RscEntrySlateField')\n Object.values(leafTypes).forEach((leaf) => {\n if (leaf.Button) {\n addToImportMap(leaf.Button)\n }\n if (leaf.Leaf) {\n addToImportMap(leaf.Leaf)\n }\n if (Array.isArray(leaf.plugins) && leaf.plugins?.length) {\n addToImportMap(leaf.plugins)\n }\n })\n args?.admin?.leaves?.forEach((leaf) => {\n if (typeof leaf === 'object') {\n if (leaf.Button) {\n addToImportMap(leaf.Button)\n }\n if (leaf.Leaf) {\n addToImportMap(leaf.Leaf)\n }\n if (Array.isArray(leaf.plugins) && leaf.plugins?.length) {\n addToImportMap(leaf.plugins)\n }\n }\n })\n\n Object.values(elementTypes).forEach((element) => {\n if (element.Button) {\n addToImportMap(element.Button)\n }\n if (element.Element) {\n addToImportMap(element.Element)\n }\n if (Array.isArray(element.plugins) && element.plugins?.length) {\n addToImportMap(element.plugins)\n }\n })\n\n args?.admin?.elements?.forEach((element) => {\n if (typeof element === 'object') {\n if (element.Button) {\n addToImportMap(element.Button)\n }\n if (element.Element) {\n addToImportMap(element.Element)\n }\n if (Array.isArray(element.plugins) && element.plugins?.length) {\n addToImportMap(element.plugins)\n }\n }\n })\n },\n generateSchemaMap: getGenerateSchemaMap(args),\n graphQLPopulationPromises({\n context,\n currentDepth,\n depth,\n draft,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n }) {\n if (\n field.admin?.elements?.includes('relationship') ||\n field.admin?.elements?.includes('upload') ||\n field.admin?.elements?.includes('link') ||\n !field?.admin?.elements\n ) {\n richTextRelationshipPromise({\n context,\n currentDepth,\n depth,\n draft,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n })\n }\n },\n hooks: {\n afterRead: [\n ({\n context: _context,\n currentDepth,\n depth,\n draft,\n field: _field,\n fieldPromises,\n findMany,\n flattenLocales,\n overrideAccess,\n populate,\n populationPromises,\n req,\n showHiddenFields,\n siblingData,\n }) => {\n const context: any = _context\n const field = _field as any\n if (\n field.admin?.elements?.includes('relationship') ||\n field.admin?.elements?.includes('upload') ||\n field.admin?.elements?.includes('link') ||\n !field?.admin?.elements\n ) {\n richTextRelationshipPromise({\n context,\n currentDepth,\n depth,\n draft,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n overrideAccess,\n populateArg: populate,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc: siblingData,\n })\n }\n },\n ],\n },\n outputSchema: ({ isRequired }) => {\n return {\n type: withNullableJSONSchemaType('array', isRequired),\n items: {\n type: 'object',\n },\n }\n },\n validate: richTextValidate,\n }\n }\n}\n\nexport type {\n AdapterArguments,\n ElementNode,\n RichTextCustomElement,\n RichTextCustomLeaf,\n RichTextElement,\n RichTextLeaf,\n RichTextPlugin,\n RichTextPluginComponent,\n SlateFieldProps,\n TextNode,\n} from './types.js'\n\nexport { nodeIsTextNode } from './types.js'\n"],"names":["sanitizeFields","withNullableJSONSchemaType","richTextRelationshipPromise","richTextValidate","elements","elementTypes","transformExtraFields","defaultLeaves","leafTypes","getGenerateSchemaMap","slateEditor","args","config","validRelationships","collections","map","c","slug","admin","link","fields","parentIsLocalized","upload","collection","Object","keys","CellComponent","FieldComponent","path","serverProps","generateImportMap","addToImportMap","values","forEach","leaf","Button","Leaf","Array","isArray","plugins","length","leaves","element","Element","generateSchemaMap","graphQLPopulationPromises","context","currentDepth","depth","draft","field","fieldPromises","findMany","flattenLocales","overrideAccess","populationPromises","req","showHiddenFields","siblingDoc","includes","hooks","afterRead","_context","_field","populate","siblingData","populateArg","outputSchema","isRequired","type","items","validate","nodeIsTextNode"],"mappings":"AAEA,SAASA,cAAc,EAAEC,0BAA0B,QAAQ,UAAS;AAIpE,SAASC,2BAA2B,QAAQ,wCAAuC;AACnF,SAASC,gBAAgB,QAAQ,uBAAsB;AACvD,SAASC,YAAYC,YAAY,QAAQ,4BAA2B;AACpE,SAASC,oBAAoB,QAAQ,qCAAoC;AACzE,SAASC,iBAAiBC,SAAS,QAAQ,0BAAyB;AACpE,SAASC,oBAAoB,QAAQ,yBAAwB;AAE7D,OAAO,SAASC,YACdC,IAAsB;IAEtB,OAAO,OAAO,EAAEC,MAAM,EAAE;QACtB,MAAMC,qBAAqBD,OAAOE,WAAW,CAACC,GAAG,CAAC,CAACC,IAAMA,EAAEC,IAAI,KAAK,EAAE;QAEtE,IAAI,CAACN,KAAKO,KAAK,EAAE;YACfP,KAAKO,KAAK,GAAG,CAAC;QAChB;QACA,IAAI,CAACP,KAAKO,KAAK,CAACC,IAAI,EAAE;YACpBR,KAAKO,KAAK,CAACC,IAAI,GAAG,CAAC;QACrB;QACA,IAAI,CAACR,KAAKO,KAAK,CAACC,IAAI,CAACC,MAAM,EAAE;YAC3BT,KAAKO,KAAK,CAACC,IAAI,CAACC,MAAM,GAAG,EAAE;QAC7B;QACAT,KAAKO,KAAK,CAACC,IAAI,CAACC,MAAM,GAAG,MAAMpB,eAAe;YAC5CY,QAAQA;YACRQ,QAAQd,qBAAqBK,KAAKO,KAAK,EAAEC,MAAMC,QAAQR;YACvDS,mBAAmB;YACnBR;QACF;QAEA,IAAIF,MAAMO,OAAOI,QAAQR,aAAa;YACpC,KAAK,MAAMS,cAAcC,OAAOC,IAAI,CAACd,KAAKO,KAAK,CAACI,MAAM,CAACR,WAAW,EAAG;gBACnE,IAAIH,MAAMO,OAAOI,QAAQR,WAAW,CAACS,WAAW,EAAEH,QAAQ;oB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W,EACZ;wBACC,MAAMnB,UAAegB;wBACrB,MAAMZ,QAAQa;wBACd,IACEb,MAAMhC,KAAK,EAAEd,UAAUuD,SAAS,mBAChCT,MAAMhC,KAAK,EAAEd,UAAUuD,SAAS,aAChCT,MAAMhC,KAAK,EAAEd,UAAUuD,SAAS,WAChC,CAACT,OAAOhC,OAAOd,UACf;4BACAF,4BAA4B;gCAC1B4C;gCACAC;gCACAC;gCACAC;gCACAC;gCACAC;gCACAC;gCACAC;gCACAC;gCACAY,aAAaF;gCACbT;gCACAC;gCACAC;gCACAC,YAAYO;4BACd;wBACF;oBACF;iBACD;YACH;YACAE,cAAc,CAAC,EAAEC,UAAU,EAAE;gBAC3B,OAAO;oBACLC,MAAMpE,2BAA2B,SAASmE;oBAC1CE,OAAO;wBACLD,MAAM;oBACR;gBACF;YACF;YACAE,UAAUpE;QACZ;IACF;AACF;AAeA,SAASqE,cAAc,QAAQ,aAAY"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/richtext-slate",
3
- "version": "3.0.0-canary.bda91d8",
3
+ "version": "3.0.0-canary.be89809",
4
4
  "description": "The officially supported Slate richtext adapter for Payload",
5
5
  "homepage": "https://payloadcms.com",
6
6
  "repository": {
@@ -17,10 +17,10 @@
17
17
  "types": "./dist/index.d.ts",
18
18
  "default": "./dist/index.js"
19
19
  },
20
- "./rscs": {
21
- "import": "./dist/exports/server/rscs.js",
22
- "types": "./dist/exports/server/rscs.d.ts",
23
- "default": "./dist/exports/server/rscs.js"
20
+ "./rsc": {
21
+ "import": "./dist/exports/server/rsc.js",
22
+ "types": "./dist/exports/server/rsc.d.ts",
23
+ "default": "./dist/exports/server/rsc.js"
24
24
  },
25
25
  "./client": {
26
26
  "import": "./dist/exports/client/index.js",
@@ -39,20 +39,20 @@
39
39
  "slate-history": "0.86.0",
40
40
  "slate-hyperscript": "0.81.3",
41
41
  "slate-react": "0.92.0",
42
- "@payloadcms/translations": "3.0.0-canary.bda91d8",
43
- "@payloadcms/ui": "3.0.0-canary.bda91d8"
42
+ "@payloadcms/translations": "3.0.0-canary.be89809",
43
+ "@payloadcms/ui": "3.0.0-canary.be89809"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/is-hotkey": "^0.1.10",
47
47
  "@types/node": "22.5.4",
48
48
  "@types/react": "npm:types-react@19.0.0-rc.1",
49
49
  "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
50
- "payload": "3.0.0-canary.bda91d8",
50
+ "payload": "3.0.0-canary.be89809",
51
51
  "@payloadcms/eslint-config": "3.0.0-beta.112"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "react": "^19.0.0 || ^19.0.0-rc-65a56d0e-20241020",
55
- "payload": "3.0.0-canary.bda91d8"
55
+ "payload": "3.0.0-canary.be89809"
56
56
  },
57
57
  "engines": {
58
58
  "node": "^18.20.2 || >=20.9.0"
@@ -1 +0,0 @@
1
- {"version":3,"file":"rscs.d.ts","sourceRoot":"","sources":["../../../src/exports/server/rscs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/exports/server/rscs.ts"],"sourcesContent":["export { RscEntrySlateCell } from '../../cell/rscEntry.js'\nexport { RscEntrySlateField } from '../../field/rscEntry.js'\n"],"names":["RscEntrySlateCell","RscEntrySlateField"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,yBAAwB;AAC1D,SAASC,kBAAkB,QAAQ,0BAAyB"}