@payloadcms/richtext-slate 3.0.0-beta.29 → 3.0.0-beta.30

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":"ListItem.d.ts","sourceRoot":"","sources":["../../../../src/field/elements/li/ListItem.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAyB,MAAM,OAAO,CAAA;AAK7C,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAqBnC,CAAA"}
1
+ {"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../../../src/field/elements/li/ListItem.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAiBnC,CAAA"}
@@ -1,12 +1,9 @@
1
1
  'use client';
2
- import React, { isValidElement } from 'react';
2
+ import React from 'react';
3
3
  import { useElement } from '../../providers/ElementProvider.js';
4
4
  import { listTypes } from '../listTypes.js';
5
5
  export const ListItemElement = ()=>{
6
6
  const { attributes, children, element } = useElement();
7
- if (!/*#__PURE__*/ isValidElement(element)) {
8
- return null;
9
- }
10
7
  const listType = typeof element.children?.[0]?.type === 'string' ? element.children[0].type : '';
11
8
  const disableListStyle = element.children.length >= 1 && listTypes.includes(listType);
12
9
  return /*#__PURE__*/ React.createElement("li", {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/field/elements/li/ListItem.tsx"],"sourcesContent":["'use client'\n\nimport type { Element } from 'slate'\n\nimport React, { isValidElement } from 'react'\n\nimport { useElement } from '../../providers/ElementProvider.js'\nimport { listTypes } from '../listTypes.js'\n\nexport const ListItemElement: React.FC = () => {\n const { attributes, children, element } = useElement<Element>()\n\n if (!isValidElement(element)) {\n return null\n }\n\n const listType = typeof element.children?.[0]?.type === 'string' ? element.children[0].type : ''\n const disableListStyle = element.children.length >= 1 && listTypes.includes(listType)\n\n return (\n <li\n style={{\n listStyle: disableListStyle ? 'none' : undefined,\n listStylePosition: disableListStyle ? 'outside' : undefined,\n }}\n {...attributes}\n >\n {children}\n </li>\n )\n}\n"],"names":["React","isValidElement","useElement","listTypes","ListItemElement","attributes","children","element","listType","type","disableListStyle","length","includes","li","style","listStyle","undefined","listStylePosition"],"rangeMappings":";;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAIA,OAAOA,SAASC,cAAc,QAAQ,QAAO;AAE7C,SAASC,UAAU,QAAQ,qCAAoC;AAC/D,SAASC,SAAS,QAAQ,kBAAiB;AAE3C,OAAO,MAAMC,kBAA4B;IACvC,MAAM,EAAEC,UAAU,EAAEC,QAAQ,EAAEC,OAAO,EAAE,GAAGL;IAE1C,IAAI,eAACD,eAAeM,UAAU;QAC5B,OAAO;IACT;IAEA,MAAMC,WAAW,OAAOD,QAAQD,QAAQ,EAAE,CAAC,EAAE,EAAEG,SAAS,WAAWF,QAAQD,QAAQ,CAAC,EAAE,CAACG,IAAI,GAAG;IAC9F,MAAMC,mBAAmBH,QAAQD,QAAQ,CAACK,MAAM,IAAI,KAAKR,UAAUS,QAAQ,CAACJ;IAE5E,qBACE,oBAACK;QACCC,OAAO;YACLC,WAAWL,mBAAmB,SAASM;YACvCC,mBAAmBP,mBAAmB,YAAYM;QACpD;QACC,GAAGX,UAAU;OAEbC;AAGP,EAAC"}
1
+ {"version":3,"sources":["../../../../src/field/elements/li/ListItem.tsx"],"sourcesContent":["'use client'\n\nimport type { Element } from 'slate'\n\nimport React from 'react'\n\nimport { useElement } from '../../providers/ElementProvider.js'\nimport { listTypes } from '../listTypes.js'\n\nexport const ListItemElement: React.FC = () => {\n const { attributes, children, element } = useElement<Element>()\n\n const listType = typeof element.children?.[0]?.type === 'string' ? element.children[0].type : ''\n const disableListStyle = element.children.length >= 1 && listTypes.includes(listType)\n\n return (\n <li\n style={{\n listStyle: disableListStyle ? 'none' : undefined,\n listStylePosition: disableListStyle ? 'outside' : undefined,\n }}\n {...attributes}\n >\n {children}\n </li>\n )\n}\n"],"names":["React","useElement","listTypes","ListItemElement","attributes","children","element","listType","type","disableListStyle","length","includes","li","style","listStyle","undefined","listStylePosition"],"rangeMappings":";;;;;;;;;;;;;;;","mappings":"AAAA;AAIA,OAAOA,WAAW,QAAO;AAEzB,SAASC,UAAU,QAAQ,qCAAoC;AAC/D,SAASC,SAAS,QAAQ,kBAAiB;AAE3C,OAAO,MAAMC,kBAA4B;IACvC,MAAM,EAAEC,UAAU,EAAEC,QAAQ,EAAEC,OAAO,EAAE,GAAGL;IAE1C,MAAMM,WAAW,OAAOD,QAAQD,QAAQ,EAAE,CAAC,EAAE,EAAEG,SAAS,WAAWF,QAAQD,QAAQ,CAAC,EAAE,CAACG,IAAI,GAAG;IAC9F,MAAMC,mBAAmBH,QAAQD,QAAQ,CAACK,MAAM,IAAI,KAAKR,UAAUS,QAAQ,CAACJ;IAE5E,qBACE,oBAACK;QACCC,OAAO;YACLC,WAAWL,mBAAmB,SAASM;YACvCC,mBAAmBP,mBAAmB,YAAYM;QACpD;QACC,GAAGX,UAAU;OAEbC;AAGP,EAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/richtext-slate",
3
- "version": "3.0.0-beta.29",
3
+ "version": "3.0.0-beta.30",
4
4
  "description": "The officially supported Slate richtext adapter for Payload",
5
5
  "homepage": "https://payloadcms.com",
6
6
  "repository": {
@@ -35,14 +35,14 @@
35
35
  "@types/node": "20.12.5",
36
36
  "@types/react": "18.2.74",
37
37
  "@payloadcms/eslint-config": "1.1.1",
38
- "payload": "3.0.0-beta.29",
39
- "@payloadcms/ui": "3.0.0-beta.29"
38
+ "payload": "3.0.0-beta.30",
39
+ "@payloadcms/ui": "3.0.0-beta.30"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
43
- "@payloadcms/ui": "3.0.0-beta.29",
44
- "@payloadcms/translations": "3.0.0-beta.29",
45
- "payload": "3.0.0-beta.29"
43
+ "@payloadcms/ui": "3.0.0-beta.30",
44
+ "payload": "3.0.0-beta.30",
45
+ "@payloadcms/translations": "3.0.0-beta.30"
46
46
  },
47
47
  "engines": {
48
48
  "node": ">=18.20.2"