@payloadcms/richtext-slate 3.0.0-beta.46 → 3.0.0-beta.47

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,5 +1,4 @@
1
- import type { PayloadRequestWithData } from 'payload/types';
2
- import type { Collection, Field, RichTextField } from 'payload/types';
1
+ import type { Collection, Field, PayloadRequestWithData, RichTextField } from 'payload/types';
3
2
  import type { AdapterArguments } from '../types.js';
4
3
  type Arguments = {
5
4
  currentDepth?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"populate.d.ts","sourceRoot":"","sources":["../../src/data/populate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAIrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAEnD,KAAK,SAAS,GAAG;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,OAAO,CAAA;IACd,KAAK,EAAE,aAAa,CAAC,GAAG,EAAE,EAAE,gBAAgB,EAAE,gBAAgB,CAAC,CAAA;IAC/D,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;IACpB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,GAAG,EAAE,sBAAsB,CAAA;IAC3B,gBAAgB,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,QAAQ,sGAWlB,KAAK,SAAS,EAAE,OAAO,CAAC,GAAG;IAC5B,UAAU,EAAE,UAAU,CAAA;IACtB,KAAK,EAAE,KAAK,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;CACX,KAAG,QAAQ,IAAI,CAuBf,CAAA"}
1
+ {"version":3,"file":"populate.d.ts","sourceRoot":"","sources":["../../src/data/populate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAI7F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAEnD,KAAK,SAAS,GAAG;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,OAAO,CAAA;IACd,KAAK,EAAE,aAAa,CAAC,GAAG,EAAE,EAAE,gBAAgB,EAAE,gBAAgB,CAAC,CAAA;IAC/D,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;IACpB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,GAAG,EAAE,sBAAsB,CAAA;IAC3B,gBAAgB,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,QAAQ,sGAWlB,KAAK,SAAS,EAAE,OAAO,CAAC,GAAG;IAC5B,UAAU,EAAE,UAAU,CAAA;IACtB,KAAK,EAAE,KAAK,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;CACX,KAAG,QAAQ,IAAI,CAuBf,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/data/populate.ts"],"sourcesContent":["import type { PayloadRequestWithData } from 'payload/types'\nimport type { Collection, Field, RichTextField } from 'payload/types'\n\nimport { createDataloaderCacheKey } from 'payload/utilities'\n\nimport type { AdapterArguments } from '../types.js'\n\ntype Arguments = {\n currentDepth?: number\n data: unknown\n depth: number\n draft: boolean\n field: RichTextField<any[], AdapterArguments, AdapterArguments>\n key: number | string\n overrideAccess?: boolean\n req: PayloadRequestWithData\n showHiddenFields: boolean\n}\n\nexport const populate = async ({\n id,\n collection,\n currentDepth,\n data,\n depth,\n draft,\n key,\n overrideAccess,\n req,\n showHiddenFields,\n}: Omit<Arguments, 'field'> & {\n collection: Collection\n field: Field\n id: string\n}): Promise<void> => {\n const dataRef = data as Record<string, unknown>\n\n const doc = await req.payloadDataLoader.load(\n createDataloaderCacheKey({\n collectionSlug: collection.config.slug,\n currentDepth: currentDepth + 1,\n depth,\n docID: id,\n draft,\n fallbackLocale: req.locale,\n locale: req.fallbackLocale,\n overrideAccess: typeof overrideAccess === 'undefined' ? false : overrideAccess,\n showHiddenFields,\n transactionID: req.transactionID,\n }),\n )\n\n if (doc) {\n dataRef[key] = doc\n } else {\n dataRef[key] = null\n }\n}\n"],"names":["createDataloaderCacheKey","populate","id","collection","currentDepth","data","depth","draft","key","overrideAccess","req","showHiddenFields","dataRef","doc","payloadDataLoader","load","collectionSlug","config","slug","docID","fallbackLocale","locale","transactionID"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":"AAGA,SAASA,wBAAwB,QAAQ,oBAAmB;AAgB5D,OAAO,MAAMC,WAAW,OAAO,EAC7BC,EAAE,EACFC,UAAU,EACVC,YAAY,EACZC,IAAI,EACJC,KAAK,EACLC,KAAK,EACLC,GAAG,EACHC,cAAc,EACdC,GAAG,EACHC,gBAAgB,EAKjB;IACC,MAAMC,UAAUP;IAEhB,MAAMQ,MAAM,MAAMH,IAAII,iBAAiB,CAACC,IAAI,CAC1Cf,yBAAyB;QACvBgB,gBAAgBb,WAAWc,MAAM,CAACC,IAAI;QACtCd,cAAcA,eAAe;QAC7BE;QACAa,OAAOjB;QACPK;QACAa,gBAAgBV,IAAIW,MAAM;QAC1BA,QAAQX,IAAIU,cAAc;QAC1BX,gBAAgB,OAAOA,mBAAmB,cAAc,QAAQA;QAChEE;QACAW,eAAeZ,IAAIY,aAAa;IAClC;IAGF,IAAIT,KAAK;QACPD,OAAO,CAACJ,IAAI,GAAGK;IACjB,OAAO;QACLD,OAAO,CAACJ,IAAI,GAAG;IACjB;AACF,EAAC"}
1
+ {"version":3,"sources":["../../src/data/populate.ts"],"sourcesContent":["import type { Collection, Field, PayloadRequestWithData, RichTextField } from 'payload/types'\n\nimport { createDataloaderCacheKey } from 'payload/utilities'\n\nimport type { AdapterArguments } from '../types.js'\n\ntype Arguments = {\n currentDepth?: number\n data: unknown\n depth: number\n draft: boolean\n field: RichTextField<any[], AdapterArguments, AdapterArguments>\n key: number | string\n overrideAccess?: boolean\n req: PayloadRequestWithData\n showHiddenFields: boolean\n}\n\nexport const populate = async ({\n id,\n collection,\n currentDepth,\n data,\n depth,\n draft,\n key,\n overrideAccess,\n req,\n showHiddenFields,\n}: Omit<Arguments, 'field'> & {\n collection: Collection\n field: Field\n id: string\n}): Promise<void> => {\n const dataRef = data as Record<string, unknown>\n\n const doc = await req.payloadDataLoader.load(\n createDataloaderCacheKey({\n collectionSlug: collection.config.slug,\n currentDepth: currentDepth + 1,\n depth,\n docID: id,\n draft,\n fallbackLocale: req.locale,\n locale: req.fallbackLocale,\n overrideAccess: typeof overrideAccess === 'undefined' ? false : overrideAccess,\n showHiddenFields,\n transactionID: req.transactionID,\n }),\n )\n\n if (doc) {\n dataRef[key] = doc\n } else {\n dataRef[key] = null\n }\n}\n"],"names":["createDataloaderCacheKey","populate","id","collection","currentDepth","data","depth","draft","key","overrideAccess","req","showHiddenFields","dataRef","doc","payloadDataLoader","load","collectionSlug","config","slug","docID","fallbackLocale","locale","transactionID"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,SAASA,wBAAwB,QAAQ,oBAAmB;AAgB5D,OAAO,MAAMC,WAAW,OAAO,EAC7BC,EAAE,EACFC,UAAU,EACVC,YAAY,EACZC,IAAI,EACJC,KAAK,EACLC,KAAK,EACLC,GAAG,EACHC,cAAc,EACdC,GAAG,EACHC,gBAAgB,EAKjB;IACC,MAAMC,UAAUP;IAEhB,MAAMQ,MAAM,MAAMH,IAAII,iBAAiB,CAACC,IAAI,CAC1Cf,yBAAyB;QACvBgB,gBAAgBb,WAAWc,MAAM,CAACC,IAAI;QACtCd,cAAcA,eAAe;QAC7BE;QACAa,OAAOjB;QACPK;QACAa,gBAAgBV,IAAIW,MAAM;QAC1BA,QAAQX,IAAIU,cAAc;QAC1BX,gBAAgB,OAAOA,mBAAmB,cAAc,QAAQA;QAChEE;QACAW,eAAeZ,IAAIY,aAAa;IAClC;IAGF,IAAIT,KAAK;QACPD,OAAO,CAACJ,IAAI,GAAGK;IACjB,OAAO;QACLD,OAAO,CAACJ,IAAI,GAAG;IACjB;AACF,EAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/richtext-slate",
3
- "version": "3.0.0-beta.46",
3
+ "version": "3.0.0-beta.47",
4
4
  "description": "The officially supported Slate richtext adapter for Payload",
5
5
  "homepage": "https://payloadcms.com",
6
6
  "repository": {
@@ -36,15 +36,15 @@
36
36
  "@types/node": "20.12.5",
37
37
  "@types/react": "npm:types-react@19.0.0-beta.2",
38
38
  "@types/react-dom": "npm:types-react-dom@19.0.0-beta.2",
39
+ "payload": "3.0.0-beta.47",
39
40
  "@payloadcms/eslint-config": "1.1.1",
40
- "@payloadcms/ui": "3.0.0-beta.46",
41
- "payload": "3.0.0-beta.46"
41
+ "@payloadcms/ui": "3.0.0-beta.47"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "react": "^19.0.0 || ^19.0.0-rc-f994737d14-20240522",
45
- "@payloadcms/translations": "3.0.0-beta.46",
46
- "@payloadcms/ui": "3.0.0-beta.46",
47
- "payload": "3.0.0-beta.46"
45
+ "@payloadcms/translations": "3.0.0-beta.47",
46
+ "@payloadcms/ui": "3.0.0-beta.47",
47
+ "payload": "3.0.0-beta.47"
48
48
  },
49
49
  "engines": {
50
50
  "node": "^18.20.2 || >=20.9.0"