@payloadcms/richtext-slate 3.0.0-beta.39 → 3.0.0-beta.40

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":"index.d.ts","sourceRoot":"","sources":["../../src/cell/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAE9D,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAAC,GAAG,EAAE,CAAC,CAKnE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cell/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAG9D,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAAC,GAAG,EAAE,CAAC,CAMnE,CAAA"}
@@ -1,7 +1,9 @@
1
1
  'use client';
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { useTableCell } from '@payloadcms/ui/elements/Table';
3
4
  import React from 'react';
4
- export const RichTextCell = ({ cellData })=>{
5
+ export const RichTextCell = ()=>{
6
+ const { cellData } = useTableCell();
5
7
  const flattenedText = cellData?.map((i)=>i?.children?.map((c)=>c.text)).join(' ');
6
8
  // Limiting the number of characters shown is done in a CSS rule
7
9
  return /*#__PURE__*/ _jsx("span", {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/cell/index.tsx"],"sourcesContent":["'use client'\nimport type { DefaultCellComponentProps } from 'payload/types'\n\nimport React from 'react'\n\nexport const RichTextCell: React.FC<DefaultCellComponentProps<any[]>> = ({ cellData }) => {\n const flattenedText = cellData?.map((i) => i?.children?.map((c) => c.text)).join(' ')\n\n // Limiting the number of characters shown is done in a CSS rule\n return <span>{flattenedText}</span>\n}\n"],"names":["React","RichTextCell","cellData","flattenedText","map","i","children","c","text","join","span"],"rangeMappings":";;;;;;;;;","mappings":"AAAA;;AAGA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,eAA2D,CAAC,EAAEC,QAAQ,EAAE;IACnF,MAAMC,gBAAgBD,UAAUE,IAAI,CAACC,IAAMA,GAAGC,UAAUF,IAAI,CAACG,IAAMA,EAAEC,IAAI,GAAGC,KAAK;IAEjF,gEAAgE;IAChE,qBAAO,KAACC;kBAAMP;;AAChB,EAAC"}
1
+ {"version":3,"sources":["../../src/cell/index.tsx"],"sourcesContent":["'use client'\nimport type { DefaultCellComponentProps } from 'payload/types'\n\nimport { useTableCell } from '@payloadcms/ui/elements/Table'\nimport React from 'react'\n\nexport const RichTextCell: React.FC<DefaultCellComponentProps<any[]>> = () => {\n const { cellData } = useTableCell()\n const flattenedText = cellData?.map((i) => i?.children?.map((c) => c.text)).join(' ')\n\n // Limiting the number of characters shown is done in a CSS rule\n return <span>{flattenedText}</span>\n}\n"],"names":["useTableCell","React","RichTextCell","cellData","flattenedText","map","i","children","c","text","join","span"],"rangeMappings":";;;;;;;;;;;","mappings":"AAAA;;AAGA,SAASA,YAAY,QAAQ,gCAA+B;AAC5D,OAAOC,WAAW,QAAO;AAEzB,OAAO,MAAMC,eAA2D;IACtE,MAAM,EAAEC,QAAQ,EAAE,GAAGH;IACrB,MAAMI,gBAAgBD,UAAUE,IAAI,CAACC,IAAMA,GAAGC,UAAUF,IAAI,CAACG,IAAMA,EAAEC,IAAI,GAAGC,KAAK;IAEjF,gEAAgE;IAChE,qBAAO,KAACC;kBAAMP;;AAChB,EAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/richtext-slate",
3
- "version": "3.0.0-beta.39",
3
+ "version": "3.0.0-beta.40",
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.39",
40
- "@payloadcms/ui": "3.0.0-beta.39",
41
- "@payloadcms/eslint-config": "1.1.1"
39
+ "@payloadcms/eslint-config": "1.1.1",
40
+ "@payloadcms/ui": "3.0.0-beta.40",
41
+ "payload": "3.0.0-beta.40"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "react": "^19.0.0 || ^19.0.0-rc-f994737d14-20240522",
45
- "@payloadcms/translations": "3.0.0-beta.39",
46
- "@payloadcms/ui": "3.0.0-beta.39",
47
- "payload": "3.0.0-beta.39"
45
+ "@payloadcms/ui": "3.0.0-beta.40",
46
+ "@payloadcms/translations": "3.0.0-beta.40",
47
+ "payload": "3.0.0-beta.40"
48
48
  },
49
49
  "engines": {
50
50
  "node": ">=18.20.2"