@payloadcms/richtext-slate 3.0.0-beta.4 → 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.
- package/dist/cell/index.d.ts.map +1 -1
- package/dist/cell/index.js +7 -2
- package/dist/cell/index.js.map +1 -1
- package/dist/data/populate.d.ts +4 -3
- package/dist/data/populate.d.ts.map +1 -1
- package/dist/data/populate.js +13 -11
- package/dist/data/populate.js.map +1 -1
- package/dist/data/recurseNestedFields.d.ts +5 -4
- package/dist/data/recurseNestedFields.d.ts.map +1 -1
- package/dist/data/recurseNestedFields.js +21 -11
- package/dist/data/recurseNestedFields.js.map +1 -1
- package/dist/data/richTextRelationshipPromise.d.ts +7 -6
- package/dist/data/richTextRelationshipPromise.d.ts.map +1 -1
- package/dist/data/richTextRelationshipPromise.js +14 -10
- package/dist/data/richTextRelationshipPromise.js.map +1 -1
- package/dist/data/validation.js +3 -3
- package/dist/data/validation.js.map +1 -1
- package/dist/field/RichText.d.ts +0 -2
- package/dist/field/RichText.d.ts.map +1 -1
- package/dist/field/RichText.js +178 -140
- package/dist/field/RichText.js.map +1 -1
- package/dist/field/elements/Button.d.ts.map +1 -1
- package/dist/field/elements/Button.js +17 -7
- package/dist/field/elements/Button.js.map +1 -1
- package/dist/field/elements/ListButton.js +5 -3
- package/dist/field/elements/ListButton.js.map +1 -1
- package/dist/field/elements/blockquote/Blockquote.d.ts +1 -2
- package/dist/field/elements/blockquote/Blockquote.d.ts.map +1 -1
- package/dist/field/elements/blockquote/Blockquote.js +5 -3
- package/dist/field/elements/blockquote/Blockquote.js.map +1 -1
- package/dist/field/elements/blockquote/index.js +5 -3
- package/dist/field/elements/blockquote/index.js.map +1 -1
- package/dist/field/elements/h1/Heading1.d.ts +1 -2
- package/dist/field/elements/h1/Heading1.d.ts.map +1 -1
- package/dist/field/elements/h1/Heading1.js +5 -1
- package/dist/field/elements/h1/Heading1.js.map +1 -1
- package/dist/field/elements/h1/index.js +5 -3
- package/dist/field/elements/h1/index.js.map +1 -1
- package/dist/field/elements/h2/Heading2.d.ts +1 -2
- package/dist/field/elements/h2/Heading2.d.ts.map +1 -1
- package/dist/field/elements/h2/Heading2.js +5 -1
- package/dist/field/elements/h2/Heading2.js.map +1 -1
- package/dist/field/elements/h2/index.js +5 -3
- package/dist/field/elements/h2/index.js.map +1 -1
- package/dist/field/elements/h3/Heading3.d.ts +1 -2
- package/dist/field/elements/h3/Heading3.d.ts.map +1 -1
- package/dist/field/elements/h3/Heading3.js +5 -1
- package/dist/field/elements/h3/Heading3.js.map +1 -1
- package/dist/field/elements/h3/index.js +5 -3
- package/dist/field/elements/h3/index.js.map +1 -1
- package/dist/field/elements/h4/Heading4.d.ts +1 -2
- package/dist/field/elements/h4/Heading4.d.ts.map +1 -1
- package/dist/field/elements/h4/Heading4.js +5 -1
- package/dist/field/elements/h4/Heading4.js.map +1 -1
- package/dist/field/elements/h4/index.js +5 -3
- package/dist/field/elements/h4/index.js.map +1 -1
- package/dist/field/elements/h5/Heading5.d.ts +1 -2
- package/dist/field/elements/h5/Heading5.d.ts.map +1 -1
- package/dist/field/elements/h5/Heading5.js +5 -1
- package/dist/field/elements/h5/Heading5.js.map +1 -1
- package/dist/field/elements/h5/index.js +5 -3
- package/dist/field/elements/h5/index.js.map +1 -1
- package/dist/field/elements/h6/Heading6.d.ts +1 -2
- package/dist/field/elements/h6/Heading6.d.ts.map +1 -1
- package/dist/field/elements/h6/Heading6.js +5 -1
- package/dist/field/elements/h6/Heading6.js.map +1 -1
- package/dist/field/elements/h6/index.js +5 -3
- package/dist/field/elements/h6/index.js.map +1 -1
- package/dist/field/elements/indent/Button.js +20 -12
- package/dist/field/elements/indent/Button.js.map +1 -1
- package/dist/field/elements/indent/Element.js +5 -3
- package/dist/field/elements/indent/Element.js.map +1 -1
- package/dist/field/elements/li/ListItem.d.ts.map +1 -1
- package/dist/field/elements/li/ListItem.js +6 -7
- package/dist/field/elements/li/ListItem.js.map +1 -1
- package/dist/field/elements/link/Button/index.js +46 -39
- package/dist/field/elements/link/Button/index.js.map +1 -1
- package/dist/field/elements/link/Element/index.d.ts +1 -2
- package/dist/field/elements/link/Element/index.d.ts.map +1 -1
- package/dist/field/elements/link/Element/index.js +101 -83
- package/dist/field/elements/link/Element/index.js.map +1 -1
- package/dist/field/elements/link/LinkDrawer/baseFields.d.ts +2 -2
- package/dist/field/elements/link/LinkDrawer/baseFields.d.ts.map +1 -1
- package/dist/field/elements/link/LinkDrawer/baseFields.js.map +1 -1
- package/dist/field/elements/link/LinkDrawer/index.js +29 -22
- package/dist/field/elements/link/LinkDrawer/index.js.map +1 -1
- package/dist/field/elements/link/utilities.d.ts +1 -3
- package/dist/field/elements/link/utilities.d.ts.map +1 -1
- package/dist/field/elements/link/utilities.js +3 -4
- package/dist/field/elements/link/utilities.js.map +1 -1
- package/dist/field/elements/ol/OrderedList.js +5 -3
- package/dist/field/elements/ol/OrderedList.js.map +1 -1
- package/dist/field/elements/ol/index.js +5 -3
- package/dist/field/elements/ol/index.js.map +1 -1
- package/dist/field/elements/relationship/Button/index.js +26 -12
- package/dist/field/elements/relationship/Button/index.js.map +1 -1
- package/dist/field/elements/relationship/Element/index.js +69 -44
- package/dist/field/elements/relationship/Element/index.js.map +1 -1
- package/dist/field/elements/textAlign/index.js +20 -10
- package/dist/field/elements/textAlign/index.js.map +1 -1
- package/dist/field/elements/types.d.ts +1 -0
- package/dist/field/elements/types.d.ts.map +1 -1
- package/dist/field/elements/types.js.map +1 -1
- package/dist/field/elements/ul/UnorderedList.js +5 -3
- package/dist/field/elements/ul/UnorderedList.js.map +1 -1
- package/dist/field/elements/ul/index.js +5 -3
- package/dist/field/elements/ul/index.js.map +1 -1
- package/dist/field/elements/upload/Button/index.js +26 -14
- package/dist/field/elements/upload/Button/index.js.map +1 -1
- package/dist/field/elements/upload/Element/UploadDrawer/index.js +25 -17
- package/dist/field/elements/upload/Element/UploadDrawer/index.js.map +1 -1
- package/dist/field/elements/upload/Element/index.js +108 -72
- package/dist/field/elements/upload/Element/index.js.map +1 -1
- package/dist/field/icons/AlignCenter/index.js +7 -5
- package/dist/field/icons/AlignCenter/index.js.map +1 -1
- package/dist/field/icons/AlignLeft/index.js +7 -5
- package/dist/field/icons/AlignLeft/index.js.map +1 -1
- package/dist/field/icons/AlignRight/index.js +7 -5
- package/dist/field/icons/AlignRight/index.js.map +1 -1
- package/dist/field/icons/Blockquote/index.js +14 -9
- package/dist/field/icons/Blockquote/index.js.map +1 -1
- package/dist/field/icons/Bold/index.js +14 -9
- package/dist/field/icons/Bold/index.js.map +1 -1
- package/dist/field/icons/Code/index.js +8 -6
- package/dist/field/icons/Code/index.js.map +1 -1
- package/dist/field/icons/IndentLeft/index.js +31 -24
- package/dist/field/icons/IndentLeft/index.js.map +1 -1
- package/dist/field/icons/IndentRight/index.js +31 -24
- package/dist/field/icons/IndentRight/index.js.map +1 -1
- package/dist/field/icons/Italic/index.js +14 -9
- package/dist/field/icons/Italic/index.js.map +1 -1
- package/dist/field/icons/Link/index.js +14 -9
- package/dist/field/icons/Link/index.js.map +1 -1
- package/dist/field/icons/OrderedList/index.js +14 -9
- package/dist/field/icons/OrderedList/index.js.map +1 -1
- package/dist/field/icons/Relationship/index.js +24 -18
- package/dist/field/icons/Relationship/index.js.map +1 -1
- package/dist/field/icons/Strikethrough/index.js +14 -9
- package/dist/field/icons/Strikethrough/index.js.map +1 -1
- package/dist/field/icons/Underline/index.js +14 -9
- package/dist/field/icons/Underline/index.js.map +1 -1
- package/dist/field/icons/UnorderedList/index.js +14 -9
- package/dist/field/icons/UnorderedList/index.js.map +1 -1
- package/dist/field/icons/Upload/index.js +16 -11
- package/dist/field/icons/Upload/index.js.map +1 -1
- package/dist/field/icons/headings/H1/index.js +14 -9
- package/dist/field/icons/headings/H1/index.js.map +1 -1
- package/dist/field/icons/headings/H2/index.js +14 -9
- package/dist/field/icons/headings/H2/index.js.map +1 -1
- package/dist/field/icons/headings/H3/index.js +14 -9
- package/dist/field/icons/headings/H3/index.js.map +1 -1
- package/dist/field/icons/headings/H4/index.js +14 -9
- package/dist/field/icons/headings/H4/index.js.map +1 -1
- package/dist/field/icons/headings/H5/index.js +14 -9
- package/dist/field/icons/headings/H5/index.js.map +1 -1
- package/dist/field/icons/headings/H6/index.js +14 -9
- package/dist/field/icons/headings/H6/index.js.map +1 -1
- package/dist/field/index.js +17 -13
- package/dist/field/index.js.map +1 -1
- package/dist/field/index.scss +1 -0
- package/dist/field/leaves/Button.d.ts +1 -2
- package/dist/field/leaves/Button.d.ts.map +1 -1
- package/dist/field/leaves/Button.js +5 -3
- package/dist/field/leaves/Button.js.map +1 -1
- package/dist/field/leaves/bold/Bold/index.d.ts +1 -2
- package/dist/field/leaves/bold/Bold/index.d.ts.map +1 -1
- package/dist/field/leaves/bold/Bold/index.js +5 -1
- package/dist/field/leaves/bold/Bold/index.js.map +1 -1
- package/dist/field/leaves/bold/index.js +5 -3
- package/dist/field/leaves/bold/index.js.map +1 -1
- package/dist/field/leaves/code/Code/index.d.ts +1 -2
- package/dist/field/leaves/code/Code/index.d.ts.map +1 -1
- package/dist/field/leaves/code/Code/index.js +5 -1
- package/dist/field/leaves/code/Code/index.js.map +1 -1
- package/dist/field/leaves/code/index.js +5 -3
- package/dist/field/leaves/code/index.js.map +1 -1
- package/dist/field/leaves/italic/Italic/index.d.ts +1 -2
- package/dist/field/leaves/italic/Italic/index.d.ts.map +1 -1
- package/dist/field/leaves/italic/Italic/index.js +5 -1
- package/dist/field/leaves/italic/Italic/index.js.map +1 -1
- package/dist/field/leaves/italic/index.js +5 -3
- package/dist/field/leaves/italic/index.js.map +1 -1
- package/dist/field/leaves/strikethrough/Strikethrough/index.d.ts +1 -2
- package/dist/field/leaves/strikethrough/Strikethrough/index.d.ts.map +1 -1
- package/dist/field/leaves/strikethrough/Strikethrough/index.js +5 -1
- package/dist/field/leaves/strikethrough/Strikethrough/index.js.map +1 -1
- package/dist/field/leaves/strikethrough/index.js +5 -3
- package/dist/field/leaves/strikethrough/index.js.map +1 -1
- package/dist/field/leaves/underline/Underline/index.d.ts +1 -2
- package/dist/field/leaves/underline/Underline/index.d.ts.map +1 -1
- package/dist/field/leaves/underline/Underline/index.js +5 -1
- package/dist/field/leaves/underline/Underline/index.js.map +1 -1
- package/dist/field/leaves/underline/index.js +5 -3
- package/dist/field/leaves/underline/index.js.map +1 -1
- package/dist/field/providers/ElementButtonProvider.d.ts +1 -0
- package/dist/field/providers/ElementButtonProvider.d.ts.map +1 -1
- package/dist/field/providers/ElementButtonProvider.js +5 -3
- package/dist/field/providers/ElementButtonProvider.js.map +1 -1
- package/dist/field/providers/ElementProvider.js +5 -3
- package/dist/field/providers/ElementProvider.js.map +1 -1
- package/dist/field/providers/LeafButtonProvider.js +5 -3
- package/dist/field/providers/LeafButtonProvider.js.map +1 -1
- package/dist/field/providers/LeafProvider.js +5 -3
- package/dist/field/providers/LeafProvider.js.map +1 -1
- package/dist/generateComponentMap.d.ts.map +1 -1
- package/dist/generateComponentMap.js +9 -21
- package/dist/generateComponentMap.js.map +1 -1
- package/dist/generateSchemaMap.d.ts.map +1 -1
- package/dist/generateSchemaMap.js +3 -16
- package/dist/generateSchemaMap.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +61 -30
- package/dist/index.js.map +1 -1
- package/dist/scss/app.scss +2 -3
- package/dist/scss/vars.scss +0 -7
- package/dist/types.d.ts +0 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +30 -18
- package/dist/scss/fonts.scss +0 -75
- package/src/index.tsx +0 -82
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { ItalicIcon } from '../../icons/Italic/index.js';
|
|
3
4
|
import { LeafButton } from '../Button.js';
|
|
4
5
|
import { Italic } from './Italic/index.js';
|
|
5
6
|
export const italic = {
|
|
6
7
|
name: 'italic',
|
|
7
|
-
Button: ()=>/*#__PURE__*/
|
|
8
|
-
format: "italic"
|
|
9
|
-
|
|
8
|
+
Button: ()=>/*#__PURE__*/ _jsx(LeafButton, {
|
|
9
|
+
format: "italic",
|
|
10
|
+
children: /*#__PURE__*/ _jsx(ItalicIcon, {})
|
|
11
|
+
}),
|
|
10
12
|
Leaf: Italic
|
|
11
13
|
};
|
|
12
14
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/field/leaves/italic/index.tsx"],"sourcesContent":["import React from 'react'\n\nimport type { RichTextCustomLeaf } from '../../../types.js'\n\nimport { ItalicIcon } from '../../icons/Italic/index.js'\nimport { LeafButton } from '../Button.js'\nimport { Italic } from './Italic/index.js'\n\nexport const italic: RichTextCustomLeaf = {\n name: 'italic',\n Button: () => (\n <LeafButton format=\"italic\">\n <ItalicIcon />\n </LeafButton>\n ),\n Leaf: Italic,\n}\n"],"names":["React","ItalicIcon","LeafButton","Italic","italic","name","Button","format","Leaf"],"rangeMappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/field/leaves/italic/index.tsx"],"sourcesContent":["import React from 'react'\n\nimport type { RichTextCustomLeaf } from '../../../types.js'\n\nimport { ItalicIcon } from '../../icons/Italic/index.js'\nimport { LeafButton } from '../Button.js'\nimport { Italic } from './Italic/index.js'\n\nexport const italic: RichTextCustomLeaf = {\n name: 'italic',\n Button: () => (\n <LeafButton format=\"italic\">\n <ItalicIcon />\n </LeafButton>\n ),\n Leaf: Italic,\n}\n"],"names":["React","ItalicIcon","LeafButton","Italic","italic","name","Button","format","Leaf"],"rangeMappings":";;;;;;;;;;;;","mappings":";AAAA,OAAOA,WAAW,QAAO;AAIzB,SAASC,UAAU,QAAQ,8BAA6B;AACxD,SAASC,UAAU,QAAQ,eAAc;AACzC,SAASC,MAAM,QAAQ,oBAAmB;AAE1C,OAAO,MAAMC,SAA6B;IACxCC,MAAM;IACNC,QAAQ,kBACN,KAACJ;YAAWK,QAAO;sBACjB,cAAA,KAACN;;IAGLO,MAAML;AACR,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/field/leaves/strikethrough/Strikethrough/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/field/leaves/strikethrough/Strikethrough/index.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,aAAa,+CAGzB,CAAA"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import { useLeaf } from '../../../providers/LeafProvider.js';
|
|
4
5
|
export const Strikethrough = ()=>{
|
|
5
6
|
const { attributes, children } = useLeaf();
|
|
6
|
-
return /*#__PURE__*/
|
|
7
|
+
return /*#__PURE__*/ _jsx("del", {
|
|
8
|
+
...attributes,
|
|
9
|
+
children: children
|
|
10
|
+
});
|
|
7
11
|
};
|
|
8
12
|
|
|
9
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/field/leaves/strikethrough/Strikethrough/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nimport { useLeaf } from '../../../providers/LeafProvider.js'\n\nexport const Strikethrough = () => {\n const { attributes, children } = useLeaf()\n return <del {...attributes}>{children}</del>\n}\n"],"names":["React","useLeaf","Strikethrough","attributes","children","del"],"rangeMappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/field/leaves/strikethrough/Strikethrough/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nimport { useLeaf } from '../../../providers/LeafProvider.js'\n\nexport const Strikethrough = () => {\n const { attributes, children } = useLeaf()\n return <del {...attributes}>{children}</del>\n}\n"],"names":["React","useLeaf","Strikethrough","attributes","children","del"],"rangeMappings":";;;;;;;;;;","mappings":"AAAA;;AACA,OAAOA,WAAW,QAAO;AAEzB,SAASC,OAAO,QAAQ,qCAAoC;AAE5D,OAAO,MAAMC,gBAAgB;IAC3B,MAAM,EAAEC,UAAU,EAAEC,QAAQ,EAAE,GAAGH;IACjC,qBAAO,KAACI;QAAK,GAAGF,UAAU;kBAAGC;;AAC/B,EAAC"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { StrikethroughIcon } from '../../icons/Strikethrough/index.js';
|
|
3
4
|
import { LeafButton } from '../Button.js';
|
|
4
5
|
import { Strikethrough } from './Strikethrough/index.js';
|
|
5
6
|
export const strikethrough = {
|
|
6
7
|
name: 'strikethrough',
|
|
7
|
-
Button: ()=>/*#__PURE__*/
|
|
8
|
-
format: "strikethrough"
|
|
9
|
-
|
|
8
|
+
Button: ()=>/*#__PURE__*/ _jsx(LeafButton, {
|
|
9
|
+
format: "strikethrough",
|
|
10
|
+
children: /*#__PURE__*/ _jsx(StrikethroughIcon, {})
|
|
11
|
+
}),
|
|
10
12
|
Leaf: Strikethrough
|
|
11
13
|
};
|
|
12
14
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/field/leaves/strikethrough/index.tsx"],"sourcesContent":["import React from 'react'\n\nimport type { RichTextCustomLeaf } from '../../../types.js'\n\nimport { StrikethroughIcon } from '../../icons/Strikethrough/index.js'\nimport { LeafButton } from '../Button.js'\nimport { Strikethrough } from './Strikethrough/index.js'\n\nexport const strikethrough: RichTextCustomLeaf = {\n name: 'strikethrough',\n Button: () => (\n <LeafButton format=\"strikethrough\">\n <StrikethroughIcon />\n </LeafButton>\n ),\n Leaf: Strikethrough,\n}\n"],"names":["React","StrikethroughIcon","LeafButton","Strikethrough","strikethrough","name","Button","format","Leaf"],"rangeMappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/field/leaves/strikethrough/index.tsx"],"sourcesContent":["import React from 'react'\n\nimport type { RichTextCustomLeaf } from '../../../types.js'\n\nimport { StrikethroughIcon } from '../../icons/Strikethrough/index.js'\nimport { LeafButton } from '../Button.js'\nimport { Strikethrough } from './Strikethrough/index.js'\n\nexport const strikethrough: RichTextCustomLeaf = {\n name: 'strikethrough',\n Button: () => (\n <LeafButton format=\"strikethrough\">\n <StrikethroughIcon />\n </LeafButton>\n ),\n Leaf: Strikethrough,\n}\n"],"names":["React","StrikethroughIcon","LeafButton","Strikethrough","strikethrough","name","Button","format","Leaf"],"rangeMappings":";;;;;;;;;;;;","mappings":";AAAA,OAAOA,WAAW,QAAO;AAIzB,SAASC,iBAAiB,QAAQ,qCAAoC;AACtE,SAASC,UAAU,QAAQ,eAAc;AACzC,SAASC,aAAa,QAAQ,2BAA0B;AAExD,OAAO,MAAMC,gBAAoC;IAC/CC,MAAM;IACNC,QAAQ,kBACN,KAACJ;YAAWK,QAAO;sBACjB,cAAA,KAACN;;IAGLO,MAAML;AACR,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/field/leaves/underline/Underline/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/field/leaves/underline/Underline/index.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS,+CAGrB,CAAA"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import { useLeaf } from '../../../providers/LeafProvider.js';
|
|
4
5
|
export const Underline = ()=>{
|
|
5
6
|
const { attributes, children } = useLeaf();
|
|
6
|
-
return /*#__PURE__*/
|
|
7
|
+
return /*#__PURE__*/ _jsx("u", {
|
|
8
|
+
...attributes,
|
|
9
|
+
children: children
|
|
10
|
+
});
|
|
7
11
|
};
|
|
8
12
|
|
|
9
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/field/leaves/underline/Underline/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nimport { useLeaf } from '../../../providers/LeafProvider.js'\n\nexport const Underline = () => {\n const { attributes, children } = useLeaf()\n return <u {...attributes}>{children}</u>\n}\n"],"names":["React","useLeaf","Underline","attributes","children","u"],"rangeMappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/field/leaves/underline/Underline/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nimport { useLeaf } from '../../../providers/LeafProvider.js'\n\nexport const Underline = () => {\n const { attributes, children } = useLeaf()\n return <u {...attributes}>{children}</u>\n}\n"],"names":["React","useLeaf","Underline","attributes","children","u"],"rangeMappings":";;;;;;;;;;","mappings":"AAAA;;AACA,OAAOA,WAAW,QAAO;AAEzB,SAASC,OAAO,QAAQ,qCAAoC;AAE5D,OAAO,MAAMC,YAAY;IACvB,MAAM,EAAEC,UAAU,EAAEC,QAAQ,EAAE,GAAGH;IACjC,qBAAO,KAACI;QAAG,GAAGF,UAAU;kBAAGC;;AAC7B,EAAC"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { UnderlineIcon } from '../../icons/Underline/index.js';
|
|
3
4
|
import { LeafButton } from '../Button.js';
|
|
4
5
|
import { Underline } from './Underline/index.js';
|
|
5
6
|
export const underline = {
|
|
6
7
|
name: 'underline',
|
|
7
|
-
Button: ()=>/*#__PURE__*/
|
|
8
|
-
format: "underline"
|
|
9
|
-
|
|
8
|
+
Button: ()=>/*#__PURE__*/ _jsx(LeafButton, {
|
|
9
|
+
format: "underline",
|
|
10
|
+
children: /*#__PURE__*/ _jsx(UnderlineIcon, {})
|
|
11
|
+
}),
|
|
10
12
|
Leaf: Underline
|
|
11
13
|
};
|
|
12
14
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/field/leaves/underline/index.tsx"],"sourcesContent":["import React from 'react'\n\nimport type { RichTextCustomLeaf } from '../../../types.js'\n\nimport { UnderlineIcon } from '../../icons/Underline/index.js'\nimport { LeafButton } from '../Button.js'\nimport { Underline } from './Underline/index.js'\n\nexport const underline: RichTextCustomLeaf = {\n name: 'underline',\n Button: () => (\n <LeafButton format=\"underline\">\n <UnderlineIcon />\n </LeafButton>\n ),\n Leaf: Underline,\n}\n"],"names":["React","UnderlineIcon","LeafButton","Underline","underline","name","Button","format","Leaf"],"rangeMappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/field/leaves/underline/index.tsx"],"sourcesContent":["import React from 'react'\n\nimport type { RichTextCustomLeaf } from '../../../types.js'\n\nimport { UnderlineIcon } from '../../icons/Underline/index.js'\nimport { LeafButton } from '../Button.js'\nimport { Underline } from './Underline/index.js'\n\nexport const underline: RichTextCustomLeaf = {\n name: 'underline',\n Button: () => (\n <LeafButton format=\"underline\">\n <UnderlineIcon />\n </LeafButton>\n ),\n Leaf: Underline,\n}\n"],"names":["React","UnderlineIcon","LeafButton","Underline","underline","name","Button","format","Leaf"],"rangeMappings":";;;;;;;;;;;;","mappings":";AAAA,OAAOA,WAAW,QAAO;AAIzB,SAASC,aAAa,QAAQ,iCAAgC;AAC9D,SAASC,UAAU,QAAQ,eAAc;AACzC,SAASC,SAAS,QAAQ,uBAAsB;AAEhD,OAAO,MAAMC,YAAgC;IAC3CC,MAAM;IACNC,QAAQ,kBACN,KAACJ;YAAWK,QAAO;sBACjB,cAAA,KAACN;;IAGLO,MAAML;AACR,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ElementButtonProvider.d.ts","sourceRoot":"","sources":["../../../src/field/providers/ElementButtonProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAEjE,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,KAAK,wBAAwB,GAAG;IAC9B,UAAU,EAAE,aAAa,GAAG;QAC1B,IAAI,EAAE,MAAM,CAAA;QACZ,oBAAoB,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAAA;KACnD,CAAA;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAQD,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAC1C,wBAAwB,GAAG;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,CAaF,CAAA;AAED,eAAO,MAAM,gBAAgB,gCAG5B,CAAA"}
|
|
1
|
+
{"version":3,"file":"ElementButtonProvider.d.ts","sourceRoot":"","sources":["../../../src/field/providers/ElementButtonProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAEjE,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,KAAK,wBAAwB,GAAG;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,aAAa,GAAG;QAC1B,IAAI,EAAE,MAAM,CAAA;QACZ,oBAAoB,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAAA;KACnD,CAAA;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAQD,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAC1C,wBAAwB,GAAG;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,CAaF,CAAA;AAED,eAAO,MAAM,gBAAgB,gCAG5B,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
import React from 'react';
|
|
3
4
|
const ElementButtonContext = /*#__PURE__*/ React.createContext({
|
|
4
5
|
fieldProps: {},
|
|
@@ -7,11 +8,12 @@ const ElementButtonContext = /*#__PURE__*/ React.createContext({
|
|
|
7
8
|
});
|
|
8
9
|
export const ElementButtonProvider = (props)=>{
|
|
9
10
|
const { children, ...rest } = props;
|
|
10
|
-
return /*#__PURE__*/
|
|
11
|
+
return /*#__PURE__*/ _jsx(ElementButtonContext.Provider, {
|
|
11
12
|
value: {
|
|
12
13
|
...rest
|
|
13
|
-
}
|
|
14
|
-
|
|
14
|
+
},
|
|
15
|
+
children: children
|
|
16
|
+
});
|
|
15
17
|
};
|
|
16
18
|
export const useElementButton = ()=>{
|
|
17
19
|
const path = React.useContext(ElementButtonContext);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/field/providers/ElementButtonProvider.tsx"],"sourcesContent":["'use client'\n\nimport type { FormFieldBase } from '@payloadcms/ui/fields/shared'\n\nimport React from 'react'\n\ntype ElementButtonContextType = {\n fieldProps: FormFieldBase & {\n name: string\n richTextComponentMap: Map<string, React.ReactNode>\n }\n path: string\n schemaPath: string\n}\n\nconst ElementButtonContext = React.createContext<ElementButtonContextType>({\n fieldProps: {} as any,\n path: '',\n schemaPath: '',\n})\n\nexport const ElementButtonProvider: React.FC<\n ElementButtonContextType & {\n children: React.ReactNode\n }\n> = (props) => {\n const { children, ...rest } = props\n\n return (\n <ElementButtonContext.Provider\n value={{\n ...rest,\n }}\n >\n {children}\n </ElementButtonContext.Provider>\n )\n}\n\nexport const useElementButton = () => {\n const path = React.useContext(ElementButtonContext)\n return path\n}\n"],"names":["React","ElementButtonContext","createContext","fieldProps","path","schemaPath","ElementButtonProvider","props","children","rest","Provider","value","useElementButton","useContext"],"rangeMappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/field/providers/ElementButtonProvider.tsx"],"sourcesContent":["'use client'\n\nimport type { FormFieldBase } from '@payloadcms/ui/fields/shared'\n\nimport React from 'react'\n\ntype ElementButtonContextType = {\n disabled?: boolean\n fieldProps: FormFieldBase & {\n name: string\n richTextComponentMap: Map<string, React.ReactNode>\n }\n path: string\n schemaPath: string\n}\n\nconst ElementButtonContext = React.createContext<ElementButtonContextType>({\n fieldProps: {} as any,\n path: '',\n schemaPath: '',\n})\n\nexport const ElementButtonProvider: React.FC<\n ElementButtonContextType & {\n children: React.ReactNode\n }\n> = (props) => {\n const { children, ...rest } = props\n\n return (\n <ElementButtonContext.Provider\n value={{\n ...rest,\n }}\n >\n {children}\n </ElementButtonContext.Provider>\n )\n}\n\nexport const useElementButton = () => {\n const path = React.useContext(ElementButtonContext)\n return path\n}\n"],"names":["React","ElementButtonContext","createContext","fieldProps","path","schemaPath","ElementButtonProvider","props","children","rest","Provider","value","useElementButton","useContext"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;AAIA,OAAOA,WAAW,QAAO;AAYzB,MAAMC,qCAAuBD,MAAME,aAAa,CAA2B;IACzEC,YAAY,CAAC;IACbC,MAAM;IACNC,YAAY;AACd;AAEA,OAAO,MAAMC,wBAIT,CAACC;IACH,MAAM,EAAEC,QAAQ,EAAE,GAAGC,MAAM,GAAGF;IAE9B,qBACE,KAACN,qBAAqBS,QAAQ;QAC5BC,OAAO;YACL,GAAGF,IAAI;QACT;kBAECD;;AAGP,EAAC;AAED,OAAO,MAAMI,mBAAmB;IAC9B,MAAMR,OAAOJ,MAAMa,UAAU,CAACZ;IAC9B,OAAOG;AACT,EAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
import React from 'react';
|
|
3
4
|
const ElementContext = /*#__PURE__*/ React.createContext({
|
|
4
5
|
attributes: {},
|
|
@@ -11,12 +12,13 @@ const ElementContext = /*#__PURE__*/ React.createContext({
|
|
|
11
12
|
});
|
|
12
13
|
export const ElementProvider = (props)=>{
|
|
13
14
|
const { childNodes, children, ...rest } = props;
|
|
14
|
-
return /*#__PURE__*/
|
|
15
|
+
return /*#__PURE__*/ _jsx(ElementContext.Provider, {
|
|
15
16
|
value: {
|
|
16
17
|
...rest,
|
|
17
18
|
children: childNodes
|
|
18
|
-
}
|
|
19
|
-
|
|
19
|
+
},
|
|
20
|
+
children: children
|
|
21
|
+
});
|
|
20
22
|
};
|
|
21
23
|
export const useElement = ()=>{
|
|
22
24
|
return React.useContext(ElementContext);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/field/providers/ElementProvider.tsx"],"sourcesContent":["'use client'\nimport type { FormFieldBase } from '@payloadcms/ui/fields/shared'\nimport type { Element } from 'slate'\n\nimport React from 'react'\n\ntype ElementContextType<T> = {\n attributes: Record<string, unknown>\n children: React.ReactNode\n editorRef: React.MutableRefObject<HTMLDivElement>\n element: T\n fieldProps: FormFieldBase & {\n name: string\n richTextComponentMap: Map<string, React.ReactNode>\n }\n path: string\n schemaPath: string\n}\n\nconst ElementContext = React.createContext<ElementContextType<Element>>({\n attributes: {},\n children: null,\n editorRef: null,\n element: {} as Element,\n fieldProps: {} as any,\n path: '',\n schemaPath: '',\n})\n\nexport const ElementProvider: React.FC<\n ElementContextType<Element> & {\n childNodes: React.ReactNode\n }\n> = (props) => {\n const { childNodes, children, ...rest } = props\n\n return (\n <ElementContext.Provider\n value={{\n ...rest,\n children: childNodes,\n }}\n >\n {children}\n </ElementContext.Provider>\n )\n}\n\nexport const useElement = <T,>(): ElementContextType<T> => {\n return React.useContext(ElementContext) as ElementContextType<T>\n}\n"],"names":["React","ElementContext","createContext","attributes","children","editorRef","element","fieldProps","path","schemaPath","ElementProvider","props","childNodes","rest","Provider","value","useElement","useContext"],"rangeMappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/field/providers/ElementProvider.tsx"],"sourcesContent":["'use client'\nimport type { FormFieldBase } from '@payloadcms/ui/fields/shared'\nimport type { Element } from 'slate'\n\nimport React from 'react'\n\ntype ElementContextType<T> = {\n attributes: Record<string, unknown>\n children: React.ReactNode\n editorRef: React.MutableRefObject<HTMLDivElement>\n element: T\n fieldProps: FormFieldBase & {\n name: string\n richTextComponentMap: Map<string, React.ReactNode>\n }\n path: string\n schemaPath: string\n}\n\nconst ElementContext = React.createContext<ElementContextType<Element>>({\n attributes: {},\n children: null,\n editorRef: null,\n element: {} as Element,\n fieldProps: {} as any,\n path: '',\n schemaPath: '',\n})\n\nexport const ElementProvider: React.FC<\n ElementContextType<Element> & {\n childNodes: React.ReactNode\n }\n> = (props) => {\n const { childNodes, children, ...rest } = props\n\n return (\n <ElementContext.Provider\n value={{\n ...rest,\n children: childNodes,\n }}\n >\n {children}\n </ElementContext.Provider>\n )\n}\n\nexport const useElement = <T,>(): ElementContextType<T> => {\n return React.useContext(ElementContext) as ElementContextType<T>\n}\n"],"names":["React","ElementContext","createContext","attributes","children","editorRef","element","fieldProps","path","schemaPath","ElementProvider","props","childNodes","rest","Provider","value","useElement","useContext"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;AAIA,OAAOA,WAAW,QAAO;AAezB,MAAMC,+BAAiBD,MAAME,aAAa,CAA8B;IACtEC,YAAY,CAAC;IACbC,UAAU;IACVC,WAAW;IACXC,SAAS,CAAC;IACVC,YAAY,CAAC;IACbC,MAAM;IACNC,YAAY;AACd;AAEA,OAAO,MAAMC,kBAIT,CAACC;IACH,MAAM,EAAEC,UAAU,EAAER,QAAQ,EAAE,GAAGS,MAAM,GAAGF;IAE1C,qBACE,KAACV,eAAea,QAAQ;QACtBC,OAAO;YACL,GAAGF,IAAI;YACPT,UAAUQ;QACZ;kBAECR;;AAGP,EAAC;AAED,OAAO,MAAMY,aAAa;IACxB,OAAOhB,MAAMiB,UAAU,CAAChB;AAC1B,EAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
import React from 'react';
|
|
3
4
|
const LeafButtonContext = /*#__PURE__*/ React.createContext({
|
|
4
5
|
fieldProps: {},
|
|
@@ -7,11 +8,12 @@ const LeafButtonContext = /*#__PURE__*/ React.createContext({
|
|
|
7
8
|
});
|
|
8
9
|
export const LeafButtonProvider = (props)=>{
|
|
9
10
|
const { children, ...rest } = props;
|
|
10
|
-
return /*#__PURE__*/
|
|
11
|
+
return /*#__PURE__*/ _jsx(LeafButtonContext.Provider, {
|
|
11
12
|
value: {
|
|
12
13
|
...rest
|
|
13
|
-
}
|
|
14
|
-
|
|
14
|
+
},
|
|
15
|
+
children: children
|
|
16
|
+
});
|
|
15
17
|
};
|
|
16
18
|
export const useLeafButton = ()=>{
|
|
17
19
|
const path = React.useContext(LeafButtonContext);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/field/providers/LeafButtonProvider.tsx"],"sourcesContent":["'use client'\n\nimport type { FormFieldBase } from '@payloadcms/ui/fields/shared'\n\nimport React from 'react'\n\ntype LeafButtonContextType = {\n fieldProps: FormFieldBase & {\n name: string\n }\n path: string\n schemaPath: string\n}\n\nconst LeafButtonContext = React.createContext<LeafButtonContextType>({\n fieldProps: {} as any,\n path: '',\n schemaPath: '',\n})\n\nexport const LeafButtonProvider: React.FC<\n LeafButtonContextType & {\n children: React.ReactNode\n }\n> = (props) => {\n const { children, ...rest } = props\n\n return (\n <LeafButtonContext.Provider\n value={{\n ...rest,\n }}\n >\n {children}\n </LeafButtonContext.Provider>\n )\n}\n\nexport const useLeafButton = () => {\n const path = React.useContext(LeafButtonContext)\n return path\n}\n"],"names":["React","LeafButtonContext","createContext","fieldProps","path","schemaPath","LeafButtonProvider","props","children","rest","Provider","value","useLeafButton","useContext"],"rangeMappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/field/providers/LeafButtonProvider.tsx"],"sourcesContent":["'use client'\n\nimport type { FormFieldBase } from '@payloadcms/ui/fields/shared'\n\nimport React from 'react'\n\ntype LeafButtonContextType = {\n fieldProps: FormFieldBase & {\n name: string\n }\n path: string\n schemaPath: string\n}\n\nconst LeafButtonContext = React.createContext<LeafButtonContextType>({\n fieldProps: {} as any,\n path: '',\n schemaPath: '',\n})\n\nexport const LeafButtonProvider: React.FC<\n LeafButtonContextType & {\n children: React.ReactNode\n }\n> = (props) => {\n const { children, ...rest } = props\n\n return (\n <LeafButtonContext.Provider\n value={{\n ...rest,\n }}\n >\n {children}\n </LeafButtonContext.Provider>\n )\n}\n\nexport const useLeafButton = () => {\n const path = React.useContext(LeafButtonContext)\n return path\n}\n"],"names":["React","LeafButtonContext","createContext","fieldProps","path","schemaPath","LeafButtonProvider","props","children","rest","Provider","value","useLeafButton","useContext"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;AAIA,OAAOA,WAAW,QAAO;AAUzB,MAAMC,kCAAoBD,MAAME,aAAa,CAAwB;IACnEC,YAAY,CAAC;IACbC,MAAM;IACNC,YAAY;AACd;AAEA,OAAO,MAAMC,qBAIT,CAACC;IACH,MAAM,EAAEC,QAAQ,EAAE,GAAGC,MAAM,GAAGF;IAE9B,qBACE,KAACN,kBAAkBS,QAAQ;QACzBC,OAAO;YACL,GAAGF,IAAI;QACT;kBAECD;;AAGP,EAAC;AAED,OAAO,MAAMI,gBAAgB;IAC3B,MAAMR,OAAOJ,MAAMa,UAAU,CAACZ;IAC9B,OAAOG;AACT,EAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
import React from 'react';
|
|
3
4
|
const LeafContext = /*#__PURE__*/ React.createContext({
|
|
4
5
|
attributes: {},
|
|
@@ -11,12 +12,13 @@ const LeafContext = /*#__PURE__*/ React.createContext({
|
|
|
11
12
|
});
|
|
12
13
|
export const LeafProvider = (props)=>{
|
|
13
14
|
const { children, result, ...rest } = props;
|
|
14
|
-
return /*#__PURE__*/
|
|
15
|
+
return /*#__PURE__*/ _jsx(LeafContext.Provider, {
|
|
15
16
|
value: {
|
|
16
17
|
...rest,
|
|
17
18
|
children: result
|
|
18
|
-
}
|
|
19
|
-
|
|
19
|
+
},
|
|
20
|
+
children: children
|
|
21
|
+
});
|
|
20
22
|
};
|
|
21
23
|
export const useLeaf = ()=>{
|
|
22
24
|
const path = React.useContext(LeafContext);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/field/providers/LeafProvider.tsx"],"sourcesContent":["'use client'\n\nimport type { FormFieldBase } from '@payloadcms/ui/fields/shared'\n\nimport React from 'react'\n\ntype LeafContextType = {\n attributes: Record<string, unknown>\n children: React.ReactNode\n editorRef: React.MutableRefObject<HTMLDivElement>\n fieldProps: FormFieldBase & {\n name: string\n }\n leaf: string\n path: string\n schemaPath: string\n}\n\nconst LeafContext = React.createContext<LeafContextType>({\n attributes: {},\n children: null,\n editorRef: null,\n fieldProps: {} as any,\n leaf: '',\n path: '',\n schemaPath: '',\n})\n\nexport const LeafProvider: React.FC<\n LeafContextType & {\n result: React.ReactNode\n }\n> = (props) => {\n const { children, result, ...rest } = props\n\n return (\n <LeafContext.Provider\n value={{\n ...rest,\n children: result,\n }}\n >\n {children}\n </LeafContext.Provider>\n )\n}\n\nexport const useLeaf = () => {\n const path = React.useContext(LeafContext)\n return path\n}\n"],"names":["React","LeafContext","createContext","attributes","children","editorRef","fieldProps","leaf","path","schemaPath","LeafProvider","props","result","rest","Provider","value","useLeaf","useContext"],"rangeMappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/field/providers/LeafProvider.tsx"],"sourcesContent":["'use client'\n\nimport type { FormFieldBase } from '@payloadcms/ui/fields/shared'\n\nimport React from 'react'\n\ntype LeafContextType = {\n attributes: Record<string, unknown>\n children: React.ReactNode\n editorRef: React.MutableRefObject<HTMLDivElement>\n fieldProps: FormFieldBase & {\n name: string\n }\n leaf: string\n path: string\n schemaPath: string\n}\n\nconst LeafContext = React.createContext<LeafContextType>({\n attributes: {},\n children: null,\n editorRef: null,\n fieldProps: {} as any,\n leaf: '',\n path: '',\n schemaPath: '',\n})\n\nexport const LeafProvider: React.FC<\n LeafContextType & {\n result: React.ReactNode\n }\n> = (props) => {\n const { children, result, ...rest } = props\n\n return (\n <LeafContext.Provider\n value={{\n ...rest,\n children: result,\n }}\n >\n {children}\n </LeafContext.Provider>\n )\n}\n\nexport const useLeaf = () => {\n const path = React.useContext(LeafContext)\n return path\n}\n"],"names":["React","LeafContext","createContext","attributes","children","editorRef","fieldProps","leaf","path","schemaPath","LeafProvider","props","result","rest","Provider","value","useLeaf","useContext"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;AAIA,OAAOA,WAAW,QAAO;AAczB,MAAMC,4BAAcD,MAAME,aAAa,CAAkB;IACvDC,YAAY,CAAC;IACbC,UAAU;IACVC,WAAW;IACXC,YAAY,CAAC;IACbC,MAAM;IACNC,MAAM;IACNC,YAAY;AACd;AAEA,OAAO,MAAMC,eAIT,CAACC;IACH,MAAM,EAAEP,QAAQ,EAAEQ,MAAM,EAAE,GAAGC,MAAM,GAAGF;IAEtC,qBACE,KAACV,YAAYa,QAAQ;QACnBC,OAAO;YACL,GAAGF,IAAI;YACPT,UAAUQ;QACZ;kBAECR;;AAGP,EAAC;AAED,OAAO,MAAMY,UAAU;IACrB,MAAMR,OAAOR,MAAMiB,UAAU,CAAChB;IAC9B,OAAOO;AACT,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateComponentMap.d.ts","sourceRoot":"","sources":["../src/generateComponentMap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"generateComponentMap.d.ts","sourceRoot":"","sources":["../src/generateComponentMap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAS,eAAe,EAAE,MAAM,eAAe,CAAA;AAK3D,OAAO,KAAK,EAAE,gBAAgB,EAA6C,MAAM,YAAY,CAAA;AAO7F,eAAO,MAAM,uBAAuB,SAC3B,gBAAgB,KAAG,eAAe,CAAC,sBAAsB,CAmG/D,CAAA"}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { mapFields } from '@payloadcms/ui/utilities/buildComponentMap';
|
|
2
|
-
import { sanitizeFields } from 'payload/config';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { elements as elementTypes } from './field/elements/index.js';
|
|
5
5
|
import { linkFieldsSchemaPath } from './field/elements/link/shared.js';
|
|
6
|
-
import { transformExtraFields } from './field/elements/link/utilities.js';
|
|
7
6
|
import { uploadFieldsSchemaPath } from './field/elements/upload/shared.js';
|
|
8
7
|
import { defaultLeaves as leafTypes } from './field/leaves/index.js';
|
|
9
8
|
export const getGenerateComponentMap = (args)=>({ WithServerSideProps, config, i18n })=>{
|
|
10
9
|
const componentMap = new Map();
|
|
11
|
-
const validRelationships = config.collections.map((c)=>c.slug) || [];
|
|
12
10
|
(args?.admin?.leaves || Object.values(leafTypes)).forEach((leaf)=>{
|
|
13
11
|
let leafObject;
|
|
14
12
|
if (typeof leaf === 'object' && leaf !== null) {
|
|
@@ -19,11 +17,11 @@ export const getGenerateComponentMap = (args)=>({ WithServerSideProps, config, i
|
|
|
19
17
|
if (leafObject) {
|
|
20
18
|
const LeafButton = leafObject.Button;
|
|
21
19
|
const LeafComponent = leafObject.Leaf;
|
|
22
|
-
componentMap.set(`leaf.button.${leafObject.name}`, /*#__PURE__*/
|
|
23
|
-
componentMap.set(`leaf.component.${leafObject.name}`, /*#__PURE__*/
|
|
20
|
+
componentMap.set(`leaf.button.${leafObject.name}`, /*#__PURE__*/ _jsx(LeafButton, {}));
|
|
21
|
+
componentMap.set(`leaf.component.${leafObject.name}`, /*#__PURE__*/ _jsx(LeafComponent, {}));
|
|
24
22
|
if (Array.isArray(leafObject.plugins)) {
|
|
25
23
|
leafObject.plugins.forEach((Plugin, i)=>{
|
|
26
|
-
componentMap.set(`leaf.plugin.${leafObject.name}.${i}`, /*#__PURE__*/
|
|
24
|
+
componentMap.set(`leaf.plugin.${leafObject.name}.${i}`, /*#__PURE__*/ _jsx(Plugin, {}));
|
|
27
25
|
});
|
|
28
26
|
}
|
|
29
27
|
}
|
|
@@ -38,25 +36,20 @@ export const getGenerateComponentMap = (args)=>({ WithServerSideProps, config, i
|
|
|
38
36
|
if (element) {
|
|
39
37
|
const ElementButton = element.Button;
|
|
40
38
|
const ElementComponent = element.Element;
|
|
41
|
-
if (ElementButton) componentMap.set(`element.button.${element.name}`, /*#__PURE__*/
|
|
42
|
-
componentMap.set(`element.component.${element.name}`, /*#__PURE__*/
|
|
39
|
+
if (ElementButton) componentMap.set(`element.button.${element.name}`, /*#__PURE__*/ _jsx(ElementButton, {}));
|
|
40
|
+
componentMap.set(`element.component.${element.name}`, /*#__PURE__*/ _jsx(ElementComponent, {}));
|
|
43
41
|
if (Array.isArray(element.plugins)) {
|
|
44
42
|
element.plugins.forEach((Plugin, i)=>{
|
|
45
|
-
componentMap.set(`element.plugin.${element.name}.${i}`, /*#__PURE__*/
|
|
43
|
+
componentMap.set(`element.plugin.${element.name}.${i}`, /*#__PURE__*/ _jsx(Plugin, {}));
|
|
46
44
|
});
|
|
47
45
|
}
|
|
48
46
|
switch(element.name){
|
|
49
47
|
case 'link':
|
|
50
48
|
{
|
|
51
|
-
const linkFields = sanitizeFields({
|
|
52
|
-
config,
|
|
53
|
-
fields: transformExtraFields(args.admin?.link?.fields, config, i18n),
|
|
54
|
-
validRelationships
|
|
55
|
-
});
|
|
56
49
|
const mappedFields = mapFields({
|
|
57
50
|
WithServerSideProps,
|
|
58
51
|
config,
|
|
59
|
-
fieldSchema:
|
|
52
|
+
fieldSchema: args.admin?.link?.fields,
|
|
60
53
|
i18n,
|
|
61
54
|
readOnly: false
|
|
62
55
|
});
|
|
@@ -73,15 +66,10 @@ export const getGenerateComponentMap = (args)=>({ WithServerSideProps, config, i
|
|
|
73
66
|
});
|
|
74
67
|
uploadEnabledCollections.forEach((collection)=>{
|
|
75
68
|
if (args?.admin?.upload?.collections[collection.slug]?.fields) {
|
|
76
|
-
const uploadFields = sanitizeFields({
|
|
77
|
-
config,
|
|
78
|
-
fields: args?.admin?.upload?.collections[collection.slug]?.fields,
|
|
79
|
-
validRelationships
|
|
80
|
-
});
|
|
81
69
|
const mappedFields = mapFields({
|
|
82
70
|
WithServerSideProps,
|
|
83
71
|
config,
|
|
84
|
-
fieldSchema:
|
|
72
|
+
fieldSchema: args?.admin?.upload?.collections[collection.slug]?.fields,
|
|
85
73
|
i18n,
|
|
86
74
|
readOnly: false
|
|
87
75
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/generateComponentMap.tsx"],"sourcesContent":["import type { RichTextAdapter } from 'payload/types'\n\nimport { mapFields } from '@payloadcms/ui/utilities/buildComponentMap'\nimport
|
|
1
|
+
{"version":3,"sources":["../src/generateComponentMap.tsx"],"sourcesContent":["import type { Field, RichTextAdapter } from 'payload/types'\n\nimport { mapFields } from '@payloadcms/ui/utilities/buildComponentMap'\nimport React from 'react'\n\nimport type { AdapterArguments, RichTextCustomElement, RichTextCustomLeaf } from './types.js'\n\nimport { elements as elementTypes } from './field/elements/index.js'\nimport { linkFieldsSchemaPath } from './field/elements/link/shared.js'\nimport { uploadFieldsSchemaPath } from './field/elements/upload/shared.js'\nimport { defaultLeaves as leafTypes } from './field/leaves/index.js'\n\nexport const getGenerateComponentMap =\n (args: AdapterArguments): RichTextAdapter['generateComponentMap'] =>\n ({ WithServerSideProps, config, i18n }) => {\n const componentMap = new Map()\n\n ;(args?.admin?.leaves || Object.values(leafTypes)).forEach((leaf) => {\n let leafObject: RichTextCustomLeaf\n\n if (typeof leaf === 'object' && leaf !== null) {\n leafObject = leaf\n } else if (typeof leaf === 'string' && leafTypes[leaf]) {\n leafObject = leafTypes[leaf]\n }\n\n if (leafObject) {\n const LeafButton = leafObject.Button\n const LeafComponent = leafObject.Leaf\n\n componentMap.set(`leaf.button.${leafObject.name}`, <LeafButton />)\n componentMap.set(`leaf.component.${leafObject.name}`, <LeafComponent />)\n\n if (Array.isArray(leafObject.plugins)) {\n leafObject.plugins.forEach((Plugin, i) => {\n componentMap.set(`leaf.plugin.${leafObject.name}.${i}`, <Plugin />)\n })\n }\n }\n })\n ;(args?.admin?.elements || Object.values(elementTypes)).forEach((el) => {\n let element: RichTextCustomElement\n\n if (typeof el === 'object' && el !== null) {\n element = el\n } else if (typeof el === 'string' && elementTypes[el]) {\n element = elementTypes[el]\n }\n\n if (element) {\n const ElementButton = element.Button\n const ElementComponent = element.Element\n\n if (ElementButton) componentMap.set(`element.button.${element.name}`, <ElementButton />)\n componentMap.set(`element.component.${element.name}`, <ElementComponent />)\n\n if (Array.isArray(element.plugins)) {\n element.plugins.forEach((Plugin, i) => {\n componentMap.set(`element.plugin.${element.name}.${i}`, <Plugin />)\n })\n }\n\n switch (element.name) {\n case 'link': {\n const mappedFields = mapFields({\n WithServerSideProps,\n config,\n fieldSchema: args.admin?.link?.fields as Field[],\n i18n,\n readOnly: false,\n })\n\n componentMap.set(linkFieldsSchemaPath, mappedFields)\n\n break\n }\n\n case 'upload': {\n const uploadEnabledCollections = config.collections.filter(\n ({ admin: { enableRichTextRelationship, hidden }, upload }) => {\n if (hidden === true) {\n return false\n }\n\n return enableRichTextRelationship && Boolean(upload) === true\n },\n )\n\n uploadEnabledCollections.forEach((collection) => {\n if (args?.admin?.upload?.collections[collection.slug]?.fields) {\n const mappedFields = mapFields({\n WithServerSideProps,\n config,\n fieldSchema: args?.admin?.upload?.collections[collection.slug]?.fields,\n i18n,\n readOnly: false,\n })\n\n componentMap.set(`${uploadFieldsSchemaPath}.${collection.slug}`, mappedFields)\n }\n })\n\n break\n }\n\n case 'relationship':\n break\n }\n }\n })\n\n return componentMap\n }\n"],"names":["mapFields","React","elements","elementTypes","linkFieldsSchemaPath","uploadFieldsSchemaPath","defaultLeaves","leafTypes","getGenerateComponentMap","args","WithServerSideProps","config","i18n","componentMap","Map","admin","leaves","Object","values","forEach","leaf","leafObject","LeafButton","Button","LeafComponent","Leaf","set","name","Array","isArray","plugins","Plugin","i","el","element","ElementButton","ElementComponent","Element","mappedFields","fieldSchema","link","fields","readOnly","uploadEnabledCollections","collections","filter","enableRichTextRelationship","hidden","upload","Boolean","collection","slug"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateSchemaMap.d.ts","sourceRoot":"","sources":["../src/generateSchemaMap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"generateSchemaMap.d.ts","sourceRoot":"","sources":["../src/generateSchemaMap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAS,eAAe,EAAE,MAAM,eAAe,CAAA;AAE3D,OAAO,KAAK,EAAE,gBAAgB,EAAyB,MAAM,YAAY,CAAA;AAMzE,eAAO,MAAM,oBAAoB,SACxB,gBAAgB,KAAG,eAAe,CAAC,mBAAmB,CAoD5D,CAAA"}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import { sanitizeFields } from 'payload/config';
|
|
2
1
|
import { elements as elementTypes } from './field/elements/index.js';
|
|
3
2
|
import { linkFieldsSchemaPath } from './field/elements/link/shared.js';
|
|
4
|
-
import { transformExtraFields } from './field/elements/link/utilities.js';
|
|
5
3
|
import { uploadFieldsSchemaPath } from './field/elements/upload/shared.js';
|
|
6
|
-
export const getGenerateSchemaMap = (args)=>({ config,
|
|
7
|
-
const validRelationships = config.collections.map((c)=>c.slug) || [];
|
|
4
|
+
export const getGenerateSchemaMap = (args)=>({ config, schemaMap, schemaPath })=>{
|
|
8
5
|
(args?.admin?.elements || Object.values(elementTypes)).forEach((el)=>{
|
|
9
6
|
let element;
|
|
10
7
|
if (typeof el === 'object' && el !== null) {
|
|
@@ -16,12 +13,7 @@ export const getGenerateSchemaMap = (args)=>({ config, i18n, schemaMap, schemaPa
|
|
|
16
13
|
switch(element.name){
|
|
17
14
|
case 'link':
|
|
18
15
|
{
|
|
19
|
-
|
|
20
|
-
config,
|
|
21
|
-
fields: transformExtraFields(args.admin?.link?.fields, config, i18n),
|
|
22
|
-
validRelationships
|
|
23
|
-
});
|
|
24
|
-
schemaMap.set(`${schemaPath}.${linkFieldsSchemaPath}`, linkFields);
|
|
16
|
+
schemaMap.set(`${schemaPath}.${linkFieldsSchemaPath}`, args.admin?.link?.fields);
|
|
25
17
|
break;
|
|
26
18
|
}
|
|
27
19
|
case 'upload':
|
|
@@ -34,12 +26,7 @@ export const getGenerateSchemaMap = (args)=>({ config, i18n, schemaMap, schemaPa
|
|
|
34
26
|
});
|
|
35
27
|
uploadEnabledCollections.forEach((collection)=>{
|
|
36
28
|
if (args?.admin?.upload?.collections[collection.slug]?.fields) {
|
|
37
|
-
|
|
38
|
-
config,
|
|
39
|
-
fields: args?.admin?.upload?.collections[collection.slug]?.fields,
|
|
40
|
-
validRelationships
|
|
41
|
-
});
|
|
42
|
-
schemaMap.set(`${schemaPath}.${uploadFieldsSchemaPath}.${collection.slug}`, uploadFields);
|
|
29
|
+
schemaMap.set(`${schemaPath}.${uploadFieldsSchemaPath}.${collection.slug}`, args?.admin?.upload?.collections[collection.slug]?.fields);
|
|
43
30
|
}
|
|
44
31
|
});
|
|
45
32
|
break;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/generateSchemaMap.ts"],"sourcesContent":["import type { RichTextAdapter } from 'payload/types'\n\nimport
|
|
1
|
+
{"version":3,"sources":["../src/generateSchemaMap.ts"],"sourcesContent":["import type { Field, RichTextAdapter } from 'payload/types'\n\nimport type { AdapterArguments, RichTextCustomElement } from './types.js'\n\nimport { elements as elementTypes } from './field/elements/index.js'\nimport { linkFieldsSchemaPath } from './field/elements/link/shared.js'\nimport { uploadFieldsSchemaPath } from './field/elements/upload/shared.js'\n\nexport const getGenerateSchemaMap =\n (args: AdapterArguments): RichTextAdapter['generateSchemaMap'] =>\n ({ config, schemaMap, schemaPath }) => {\n ;(args?.admin?.elements || Object.values(elementTypes)).forEach((el) => {\n let element: RichTextCustomElement\n\n if (typeof el === 'object' && el !== null) {\n element = el\n } else if (typeof el === 'string' && elementTypes[el]) {\n element = elementTypes[el]\n }\n\n if (element) {\n switch (element.name) {\n case 'link': {\n schemaMap.set(\n `${schemaPath}.${linkFieldsSchemaPath}`,\n args.admin?.link?.fields as Field[],\n )\n\n break\n }\n\n case 'upload': {\n const uploadEnabledCollections = config.collections.filter(\n ({ admin: { enableRichTextRelationship, hidden }, upload }) => {\n if (hidden === true) {\n return false\n }\n\n return enableRichTextRelationship && Boolean(upload) === true\n },\n )\n\n uploadEnabledCollections.forEach((collection) => {\n if (args?.admin?.upload?.collections[collection.slug]?.fields) {\n schemaMap.set(\n `${schemaPath}.${uploadFieldsSchemaPath}.${collection.slug}`,\n args?.admin?.upload?.collections[collection.slug]?.fields,\n )\n }\n })\n\n break\n }\n\n case 'relationship':\n break\n }\n }\n })\n\n return schemaMap\n }\n"],"names":["elements","elementTypes","linkFieldsSchemaPath","uploadFieldsSchemaPath","getGenerateSchemaMap","args","config","schemaMap","schemaPath","admin","Object","values","forEach","el","element","name","set","link","fields","uploadEnabledCollections","collections","filter","enableRichTextRelationship","hidden","upload","Boolean","collection","slug"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAIA,SAASA,YAAYC,YAAY,QAAQ,4BAA2B;AACpE,SAASC,oBAAoB,QAAQ,kCAAiC;AACtE,SAASC,sBAAsB,QAAQ,oCAAmC;AAE1E,OAAO,MAAMC,uBACX,CAACC,OACD,CAAC,EAAEC,MAAM,EAAEC,SAAS,EAAEC,UAAU,EAAE;QAC9BH,CAAAA,MAAMI,OAAOT,YAAYU,OAAOC,MAAM,CAACV,aAAY,EAAGW,OAAO,CAAC,CAACC;YAC/D,IAAIC;YAEJ,IAAI,OAAOD,OAAO,YAAYA,OAAO,MAAM;gBACzCC,UAAUD;YACZ,OAAO,IAAI,OAAOA,OAAO,YAAYZ,YAAY,CAACY,GAAG,EAAE;gBACrDC,UAAUb,YAAY,CAACY,GAAG;YAC5B;YAEA,IAAIC,SAAS;gBACX,OAAQA,QAAQC,IAAI;oBAClB,KAAK;wBAAQ;4BACXR,UAAUS,GAAG,CACX,CAAC,EAAER,WAAW,CAAC,EAAEN,qBAAqB,CAAC,EACvCG,KAAKI,KAAK,EAAEQ,MAAMC;4BAGpB;wBACF;oBAEA,KAAK;wBAAU;4BACb,MAAMC,2BAA2Bb,OAAOc,WAAW,CAACC,MAAM,CACxD,CAAC,EAAEZ,OAAO,EAAEa,0BAA0B,EAAEC,MAAM,EAAE,EAAEC,MAAM,EAAE;gCACxD,IAAID,WAAW,MAAM;oCACnB,OAAO;gCACT;gCAEA,OAAOD,8BAA8BG,QAAQD,YAAY;4BAC3D;4BAGFL,yBAAyBP,OAAO,CAAC,CAACc;gCAChC,IAAIrB,MAAMI,OAAOe,QAAQJ,WAAW,CAACM,WAAWC,IAAI,CAAC,EAAET,QAAQ;oCAC7DX,UAAUS,GAAG,CACX,CAAC,EAAER,WAAW,CAAC,EAAEL,uBAAuB,CAAC,EAAEuB,WAAWC,IAAI,CAAC,CAAC,EAC5DtB,MAAMI,OAAOe,QAAQJ,WAAW,CAACM,WAAWC,IAAI,CAAC,EAAET;gCAEvD;4BACF;4BAEA;wBACF;oBAEA,KAAK;wBACH;gBACJ;YACF;QACF;QAEA,OAAOX;IACT,EAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RichTextAdapterProvider } from 'payload/types';
|
|
2
2
|
import type { AdapterArguments } from './types.js';
|
|
3
|
-
export declare function slateEditor(args: AdapterArguments):
|
|
3
|
+
export declare function slateEditor(args: AdapterArguments): RichTextAdapterProvider<any[], AdapterArguments, any>;
|
|
4
4
|
export { ElementButton } from './field/elements/Button.js';
|
|
5
5
|
export { toggleElement } from './field/elements/toggle.js';
|
|
6
6
|
export { LeafButton } from './field/leaves/Button.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAA;AAK5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAUlD,wBAAgB,WAAW,CACzB,IAAI,EAAE,gBAAgB,GACrB,uBAAuB,CAAC,GAAG,EAAE,EAAE,gBAAgB,EAAE,GAAG,CAAC,CAqFvD;AAED,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAE1D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,YAAY,EACV,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,QAAQ,GACT,MAAM,YAAY,CAAA;AAEnB,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA"}
|