@payloadcms/richtext-lexical 3.37.0-internal.906d0f3 → 3.37.0-internal.ed5ddac
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/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js +96 -1
- package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js.map +1 -1
- package/dist/features/converters/lexicalToPlaintext/sync/index.d.ts.map +1 -1
- package/dist/features/converters/lexicalToPlaintext/sync/index.js +10 -1
- package/dist/features/converters/lexicalToPlaintext/sync/index.js.map +1 -1
- package/package.json +7 -7
|
@@ -38,6 +38,74 @@ function paragraphNode(children) {
|
|
|
38
38
|
version: 1
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
+
function headingNode(children) {
|
|
42
|
+
return {
|
|
43
|
+
type: 'heading',
|
|
44
|
+
children,
|
|
45
|
+
direction: 'ltr',
|
|
46
|
+
format: '',
|
|
47
|
+
indent: 0,
|
|
48
|
+
textFormat: 0,
|
|
49
|
+
tag: 'h1',
|
|
50
|
+
version: 1
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function listItemNode(children) {
|
|
54
|
+
return {
|
|
55
|
+
type: 'listitem',
|
|
56
|
+
children,
|
|
57
|
+
checked: false,
|
|
58
|
+
direction: 'ltr',
|
|
59
|
+
format: '',
|
|
60
|
+
indent: 0,
|
|
61
|
+
value: 0,
|
|
62
|
+
version: 1
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
function listNode(children) {
|
|
66
|
+
return {
|
|
67
|
+
type: 'list',
|
|
68
|
+
children,
|
|
69
|
+
direction: 'ltr',
|
|
70
|
+
format: '',
|
|
71
|
+
indent: 0,
|
|
72
|
+
listType: 'bullet',
|
|
73
|
+
start: 0,
|
|
74
|
+
tag: 'ul',
|
|
75
|
+
version: 1
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
function tableNode(children) {
|
|
79
|
+
return {
|
|
80
|
+
type: 'table',
|
|
81
|
+
children,
|
|
82
|
+
direction: 'ltr',
|
|
83
|
+
format: '',
|
|
84
|
+
indent: 0,
|
|
85
|
+
version: 1
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
function tableRowNode(children) {
|
|
89
|
+
return {
|
|
90
|
+
type: 'tablerow',
|
|
91
|
+
children,
|
|
92
|
+
direction: 'ltr',
|
|
93
|
+
format: '',
|
|
94
|
+
indent: 0,
|
|
95
|
+
version: 1
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
function tableCellNode(children) {
|
|
99
|
+
return {
|
|
100
|
+
type: 'tablecell',
|
|
101
|
+
children,
|
|
102
|
+
direction: 'ltr',
|
|
103
|
+
format: '',
|
|
104
|
+
indent: 0,
|
|
105
|
+
headerState: 0,
|
|
106
|
+
version: 1
|
|
107
|
+
};
|
|
108
|
+
}
|
|
41
109
|
function rootNode(nodes) {
|
|
42
110
|
return {
|
|
43
111
|
root: {
|
|
@@ -56,7 +124,6 @@ describe('convertLexicalToPlaintext', () => {
|
|
|
56
124
|
const plaintext = convertLexicalToPlaintext({
|
|
57
125
|
data
|
|
58
126
|
});
|
|
59
|
-
console.log('plaintext', plaintext);
|
|
60
127
|
expect(plaintext).toBe('Basic Text');
|
|
61
128
|
});
|
|
62
129
|
it('ensure paragraph with multiple text nodes is correctly converted', () => {
|
|
@@ -80,5 +147,33 @@ describe('convertLexicalToPlaintext', () => {
|
|
|
80
147
|
});
|
|
81
148
|
expect(plaintext).toBe('Basic Text\tNext Line');
|
|
82
149
|
});
|
|
150
|
+
it('ensure new lines are added between paragraphs', () => {
|
|
151
|
+
const data = rootNode([paragraphNode([textNode('Basic text')]), paragraphNode([textNode('Next block-node')])]);
|
|
152
|
+
const plaintext = convertLexicalToPlaintext({
|
|
153
|
+
data
|
|
154
|
+
});
|
|
155
|
+
expect(plaintext).toBe('Basic text\n\nNext block-node');
|
|
156
|
+
});
|
|
157
|
+
it('ensure new lines are added between heading nodes', () => {
|
|
158
|
+
const data = rootNode([headingNode([textNode('Basic text')]), headingNode([textNode('Next block-node')])]);
|
|
159
|
+
const plaintext = convertLexicalToPlaintext({
|
|
160
|
+
data
|
|
161
|
+
});
|
|
162
|
+
expect(plaintext).toBe('Basic text\n\nNext block-node');
|
|
163
|
+
});
|
|
164
|
+
it('ensure new lines are added between list items and lists', () => {
|
|
165
|
+
const data = rootNode([listNode([listItemNode([textNode('First item')]), listItemNode([textNode('Second item')])]), listNode([listItemNode([textNode('Next list')])])]);
|
|
166
|
+
const plaintext = convertLexicalToPlaintext({
|
|
167
|
+
data
|
|
168
|
+
});
|
|
169
|
+
expect(plaintext).toBe('First item\nSecond item\n\nNext list');
|
|
170
|
+
});
|
|
171
|
+
it('ensure new lines are added between tables, table rows, and table cells', () => {
|
|
172
|
+
const data = rootNode([tableNode([tableRowNode([tableCellNode([textNode('Cell 1, Row 1')]), tableCellNode([textNode('Cell 2, Row 1')])]), tableRowNode([tableCellNode([textNode('Cell 1, Row 2')]), tableCellNode([textNode('Cell 2, Row 2')])])]), tableNode([tableRowNode([tableCellNode([textNode('Cell in Table 2')])])])]);
|
|
173
|
+
const plaintext = convertLexicalToPlaintext({
|
|
174
|
+
data
|
|
175
|
+
});
|
|
176
|
+
expect(plaintext).toBe('Cell 1, Row 1 | Cell 2, Row 1\nCell 1, Row 2 | Cell 2, Row 2\n\nCell in Table 2');
|
|
177
|
+
});
|
|
83
178
|
});
|
|
84
179
|
//# sourceMappingURL=convertLexicalToPlaintext.spec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convertLexicalToPlaintext.spec.js","names":["convertLexicalToPlaintext","textNode","text","bold","type","detail","format","mode","style","version","linebreakNode","tabNode","paragraphNode","children","direction","indent","textFormat","rootNode","nodes","root","describe","it","data","plaintext","console","log","expect","toBe"],"sources":["../../../../src/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.ts"],"sourcesContent":["import type {\n DefaultNodeTypes,\n DefaultTypedEditorState,\n SerializedTabNode,\n SerializedParagraphNode,\n SerializedTextNode,\n SerializedLineBreakNode,\n} from '../../../nodeTypes.js'\nimport { convertLexicalToPlaintext } from './sync/index.js'\n\nfunction textNode(text: string, bold?: boolean): SerializedTextNode {\n return {\n type: 'text',\n detail: 0,\n format: bold ? 1 : 0,\n mode: 'normal',\n style: '',\n text,\n version: 1,\n }\n}\n\nfunction linebreakNode(): SerializedLineBreakNode {\n return {\n type: 'linebreak',\n version: 1,\n }\n}\n\nfunction tabNode(): SerializedTabNode {\n return {\n type: 'tab',\n detail: 0,\n format: 0,\n mode: 'normal',\n style: '',\n text: '',\n version: 1,\n }\n}\n\nfunction paragraphNode(children: DefaultNodeTypes[]): SerializedParagraphNode {\n return {\n type: 'paragraph',\n children,\n direction: 'ltr',\n format: '',\n indent: 0,\n textFormat: 0,\n version: 1,\n }\n}\n\nfunction rootNode(nodes: DefaultNodeTypes[]): DefaultTypedEditorState {\n return {\n root: {\n type: 'root',\n children: nodes,\n direction: 'ltr',\n format: '',\n indent: 0,\n version: 1,\n },\n }\n}\n\ndescribe('convertLexicalToPlaintext', () => {\n it('ensure paragraph with text is correctly converted', () => {\n const data: DefaultTypedEditorState = rootNode([paragraphNode([textNode('Basic Text')])])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n console.log('plaintext', plaintext)\n expect(plaintext).toBe('Basic Text')\n })\n\n it('ensure paragraph with multiple text nodes is correctly converted', () => {\n const data: DefaultTypedEditorState = rootNode([\n paragraphNode([textNode('Basic Text'), textNode(' Bold', true), textNode(' Text')]),\n ])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n expect(plaintext).toBe('Basic Text Bold Text')\n })\n\n it('ensure linebreaks are converted correctly', () => {\n const data: DefaultTypedEditorState = rootNode([\n paragraphNode([textNode('Basic Text'), linebreakNode(), textNode('Next Line')]),\n ])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n expect(plaintext).toBe('Basic Text\\nNext Line')\n })\n\n it('ensure tabs are converted correctly', () => {\n const data: DefaultTypedEditorState = rootNode([\n paragraphNode([textNode('Basic Text'), tabNode(), textNode('Next Line')]),\n ])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n expect(plaintext).toBe('Basic Text\\tNext Line')\n })\n})\n"],"mappings":"AAQA,SAASA,yBAAyB,QAAQ;AAE1C,SAASC,SAASC,IAAY,EAAEC,IAAc;EAC5C,OAAO;IACLC,IAAA,EAAM;IACNC,MAAA,EAAQ;IACRC,MAAA,EAAQH,IAAA,GAAO,IAAI;IACnBI,IAAA,EAAM;IACNC,KAAA,EAAO;IACPN,IAAA;IACAO,OAAA,EAAS;EACX;AACF;AAEA,SAASC,cAAA;EACP,OAAO;IACLN,IAAA,EAAM;IACNK,OAAA,EAAS;EACX;AACF;AAEA,SAASE,QAAA;EACP,OAAO;IACLP,IAAA,EAAM;IACNC,MAAA,EAAQ;IACRC,MAAA,EAAQ;IACRC,IAAA,EAAM;IACNC,KAAA,EAAO;IACPN,IAAA,EAAM;IACNO,OAAA,EAAS;EACX;AACF;AAEA,SAASG,cAAcC,QAA4B;EACjD,OAAO;IACLT,IAAA,EAAM;IACNS,QAAA;IACAC,SAAA,EAAW;IACXR,MAAA,EAAQ;IACRS,MAAA,EAAQ;IACRC,UAAA,EAAY;IACZP,OAAA,EAAS;EACX;AACF;AAEA,SAASQ,SAASC,KAAyB;EACzC,OAAO;IACLC,IAAA,EAAM;MACJf,IAAA,EAAM;MACNS,QAAA,EAAUK,KAAA;MACVJ,SAAA,EAAW;MACXR,MAAA,EAAQ;MACRS,MAAA,EAAQ;MACRN,OAAA,EAAS;IACX;EACF;AACF;AAEAW,QAAA,CAAS,6BAA6B;EACpCC,EAAA,CAAG,qDAAqD;IACtD,MAAMC,IAAA,GAAgCL,QAAA,CAAS,CAACL,aAAA,CAAc,CAACX,QAAA,CAAS,cAAc,EAAE;IAExF,MAAMsB,SAAA,GAAYvB,yBAAA,CAA0B;MAC1CsB;IACF;IAEAE,OAAA,CAAQC,GAAG,CAAC,aAAaF,SAAA;IACzBG,MAAA,CAAOH,SAAA,EAAWI,IAAI,CAAC;EACzB;EAEAN,EAAA,CAAG,oEAAoE;IACrE,MAAMC,IAAA,GAAgCL,QAAA,CAAS,CAC7CL,aAAA,CAAc,CAACX,QAAA,CAAS,eAAeA,QAAA,CAAS,SAAS,OAAOA,QAAA,CAAS,SAAS,EACnF;IAED,MAAMsB,SAAA,GAAYvB,yBAAA,CAA0B;MAC1CsB;IACF;IAEAI,MAAA,CAAOH,SAAA,EAAWI,IAAI,CAAC;EACzB;EAEAN,EAAA,CAAG,6CAA6C;IAC9C,MAAMC,IAAA,GAAgCL,QAAA,CAAS,CAC7CL,aAAA,CAAc,CAACX,QAAA,CAAS,eAAeS,aAAA,IAAiBT,QAAA,CAAS,aAAa,EAC/E;IAED,MAAMsB,SAAA,GAAYvB,yBAAA,CAA0B;MAC1CsB;IACF;IAEAI,MAAA,CAAOH,SAAA,EAAWI,IAAI,CAAC;EACzB;EAEAN,EAAA,CAAG,uCAAuC;IACxC,MAAMC,IAAA,GAAgCL,QAAA,CAAS,CAC7CL,aAAA,CAAc,CAACX,QAAA,CAAS,eAAeU,OAAA,IAAWV,QAAA,CAAS,aAAa,EACzE;IAED,MAAMsB,SAAA,GAAYvB,yBAAA,CAA0B;MAC1CsB;IACF;IAEAI,MAAA,CAAOH,SAAA,EAAWI,IAAI,CAAC;EACzB;AACF","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"convertLexicalToPlaintext.spec.js","names":["convertLexicalToPlaintext","textNode","text","bold","type","detail","format","mode","style","version","linebreakNode","tabNode","paragraphNode","children","direction","indent","textFormat","headingNode","tag","listItemNode","checked","value","listNode","listType","start","tableNode","tableRowNode","tableCellNode","headerState","rootNode","nodes","root","describe","it","data","plaintext","expect","toBe"],"sources":["../../../../src/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.ts"],"sourcesContent":["import type {\n DefaultNodeTypes,\n DefaultTypedEditorState,\n SerializedTabNode,\n SerializedParagraphNode,\n SerializedTextNode,\n SerializedLineBreakNode,\n SerializedHeadingNode,\n SerializedListItemNode,\n SerializedListNode,\n SerializedTableRowNode,\n SerializedTableNode,\n SerializedTableCellNode,\n} from '../../../nodeTypes.js'\nimport { convertLexicalToPlaintext } from './sync/index.js'\n\nfunction textNode(text: string, bold?: boolean): SerializedTextNode {\n return {\n type: 'text',\n detail: 0,\n format: bold ? 1 : 0,\n mode: 'normal',\n style: '',\n text,\n version: 1,\n }\n}\n\nfunction linebreakNode(): SerializedLineBreakNode {\n return {\n type: 'linebreak',\n version: 1,\n }\n}\n\nfunction tabNode(): SerializedTabNode {\n return {\n type: 'tab',\n detail: 0,\n format: 0,\n mode: 'normal',\n style: '',\n text: '',\n version: 1,\n }\n}\n\nfunction paragraphNode(children: DefaultNodeTypes[]): SerializedParagraphNode {\n return {\n type: 'paragraph',\n children,\n direction: 'ltr',\n format: '',\n indent: 0,\n textFormat: 0,\n version: 1,\n }\n}\n\nfunction headingNode(children: DefaultNodeTypes[]): SerializedHeadingNode {\n return {\n type: 'heading',\n children,\n direction: 'ltr',\n format: '',\n indent: 0,\n textFormat: 0,\n tag: 'h1',\n version: 1,\n }\n}\n\nfunction listItemNode(children: DefaultNodeTypes[]): SerializedListItemNode {\n return {\n type: 'listitem',\n children,\n checked: false,\n direction: 'ltr',\n format: '',\n indent: 0,\n value: 0,\n version: 1,\n }\n}\n\nfunction listNode(children: DefaultNodeTypes[]): SerializedListNode {\n return {\n type: 'list',\n children,\n direction: 'ltr',\n format: '',\n indent: 0,\n listType: 'bullet',\n start: 0,\n tag: 'ul',\n version: 1,\n }\n}\n\nfunction tableNode(children: (DefaultNodeTypes | SerializedTableRowNode)[]): SerializedTableNode {\n return {\n type: 'table',\n children,\n direction: 'ltr',\n format: '',\n indent: 0,\n version: 1,\n }\n}\n\nfunction tableRowNode(\n children: (DefaultNodeTypes | SerializedTableCellNode)[],\n): SerializedTableRowNode {\n return {\n type: 'tablerow',\n children,\n direction: 'ltr',\n format: '',\n indent: 0,\n version: 1,\n }\n}\n\nfunction tableCellNode(children: DefaultNodeTypes[]): SerializedTableCellNode {\n return {\n type: 'tablecell',\n children,\n direction: 'ltr',\n format: '',\n indent: 0,\n headerState: 0,\n version: 1,\n }\n}\n\nfunction rootNode(nodes: (DefaultNodeTypes | SerializedTableNode)[]): DefaultTypedEditorState {\n return {\n root: {\n type: 'root',\n children: nodes,\n direction: 'ltr',\n format: '',\n indent: 0,\n version: 1,\n },\n }\n}\n\ndescribe('convertLexicalToPlaintext', () => {\n it('ensure paragraph with text is correctly converted', () => {\n const data: DefaultTypedEditorState = rootNode([paragraphNode([textNode('Basic Text')])])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n expect(plaintext).toBe('Basic Text')\n })\n\n it('ensure paragraph with multiple text nodes is correctly converted', () => {\n const data: DefaultTypedEditorState = rootNode([\n paragraphNode([textNode('Basic Text'), textNode(' Bold', true), textNode(' Text')]),\n ])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n expect(plaintext).toBe('Basic Text Bold Text')\n })\n\n it('ensure linebreaks are converted correctly', () => {\n const data: DefaultTypedEditorState = rootNode([\n paragraphNode([textNode('Basic Text'), linebreakNode(), textNode('Next Line')]),\n ])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n expect(plaintext).toBe('Basic Text\\nNext Line')\n })\n\n it('ensure tabs are converted correctly', () => {\n const data: DefaultTypedEditorState = rootNode([\n paragraphNode([textNode('Basic Text'), tabNode(), textNode('Next Line')]),\n ])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n expect(plaintext).toBe('Basic Text\\tNext Line')\n })\n\n it('ensure new lines are added between paragraphs', () => {\n const data: DefaultTypedEditorState = rootNode([\n paragraphNode([textNode('Basic text')]),\n paragraphNode([textNode('Next block-node')]),\n ])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n expect(plaintext).toBe('Basic text\\n\\nNext block-node')\n })\n\n it('ensure new lines are added between heading nodes', () => {\n const data: DefaultTypedEditorState = rootNode([\n headingNode([textNode('Basic text')]),\n headingNode([textNode('Next block-node')]),\n ])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n expect(plaintext).toBe('Basic text\\n\\nNext block-node')\n })\n\n it('ensure new lines are added between list items and lists', () => {\n const data: DefaultTypedEditorState = rootNode([\n listNode([listItemNode([textNode('First item')]), listItemNode([textNode('Second item')])]),\n listNode([listItemNode([textNode('Next list')])]),\n ])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n expect(plaintext).toBe('First item\\nSecond item\\n\\nNext list')\n })\n\n it('ensure new lines are added between tables, table rows, and table cells', () => {\n const data: DefaultTypedEditorState = rootNode([\n tableNode([\n tableRowNode([\n tableCellNode([textNode('Cell 1, Row 1')]),\n tableCellNode([textNode('Cell 2, Row 1')]),\n ]),\n tableRowNode([\n tableCellNode([textNode('Cell 1, Row 2')]),\n tableCellNode([textNode('Cell 2, Row 2')]),\n ]),\n ]),\n tableNode([tableRowNode([tableCellNode([textNode('Cell in Table 2')])])]),\n ])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n expect(plaintext).toBe(\n 'Cell 1, Row 1 | Cell 2, Row 1\\nCell 1, Row 2 | Cell 2, Row 2\\n\\nCell in Table 2',\n )\n })\n})\n"],"mappings":"AAcA,SAASA,yBAAyB,QAAQ;AAE1C,SAASC,SAASC,IAAY,EAAEC,IAAc;EAC5C,OAAO;IACLC,IAAA,EAAM;IACNC,MAAA,EAAQ;IACRC,MAAA,EAAQH,IAAA,GAAO,IAAI;IACnBI,IAAA,EAAM;IACNC,KAAA,EAAO;IACPN,IAAA;IACAO,OAAA,EAAS;EACX;AACF;AAEA,SAASC,cAAA;EACP,OAAO;IACLN,IAAA,EAAM;IACNK,OAAA,EAAS;EACX;AACF;AAEA,SAASE,QAAA;EACP,OAAO;IACLP,IAAA,EAAM;IACNC,MAAA,EAAQ;IACRC,MAAA,EAAQ;I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AAiB,EAC1C,GACDyB,YAAA,CAAa,CACXC,aAAA,CAAc,CAAC1B,QAAA,CAAS,iBAAiB,GACzC0B,aAAA,CAAc,CAAC1B,QAAA,CAAS,iBAAiB,EAC1C,EACF,GACDwB,SAAA,CAAU,CAACC,YAAA,CAAa,CAACC,aAAA,CAAc,CAAC1B,QAAA,CAAS,mBAAmB,EAAE,EAAE,EACzE;IAED,MAAMkC,SAAA,GAAYnC,yBAAA,CAA0B;MAC1CkC;IACF;IAEAE,MAAA,CAAOD,SAAA,EAAWE,IAAI,CACpB;EAEJ;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/converters/lexicalToPlaintext/sync/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAE3E,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAA;AACzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAKrD,MAAM,MAAM,6BAA6B,GAAG;IAC1C;;;;;;;QAOI;IACJ,UAAU,CAAC,EAAE,mBAAmB,CAAA;IAChC,IAAI,EAAE,qBAAqB,CAAA;CAC5B,CAAA;AAED,wBAAgB,yBAAyB,CAAC,EACxC,UAAU,EACV,IAAI,GACL,EAAE,6BAA6B,GAAG,MAAM,CAWxC;AAED,wBAAgB,8BAA8B,CAAC,EAC7C,UAAU,EACV,KAAK,EACL,MAAM,GACP,EAAE;IACD,UAAU,EAAE,mBAAmB,CAAA;IAC/B,KAAK,EAAE,qBAAqB,EAAE,CAAA;IAC9B,MAAM,EAAE,+BAA+B,CAAA;CACxC,GAAG,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/converters/lexicalToPlaintext/sync/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAE3E,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAA;AACzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAKrD,MAAM,MAAM,6BAA6B,GAAG;IAC1C;;;;;;;QAOI;IACJ,UAAU,CAAC,EAAE,mBAAmB,CAAA;IAChC,IAAI,EAAE,qBAAqB,CAAA;CAC5B,CAAA;AAED,wBAAgB,yBAAyB,CAAC,EACxC,UAAU,EACV,IAAI,GACL,EAAE,6BAA6B,GAAG,MAAM,CAWxC;AAED,wBAAgB,8BAA8B,CAAC,EAC7C,UAAU,EACV,KAAK,EACL,MAAM,GACP,EAAE;IACD,UAAU,EAAE,mBAAmB,CAAA;IAC/B,KAAK,EAAE,qBAAqB,EAAE,CAAA;IAC9B,MAAM,EAAE,+BAA+B,CAAA;CACxC,GAAG,MAAM,EAAE,CAkFX"}
|
|
@@ -53,11 +53,20 @@ export function convertLexicalNodesToPlaintext({
|
|
|
53
53
|
}
|
|
54
54
|
} else {
|
|
55
55
|
// Default plaintext converter heuristic
|
|
56
|
-
if (node.type === 'paragraph') {
|
|
56
|
+
if (node.type === 'paragraph' || node.type === 'heading' || node.type === 'list' || node.type === 'table') {
|
|
57
57
|
if (plainTextArray?.length) {
|
|
58
58
|
// Only add a new line if there is already text in the array
|
|
59
59
|
plainTextArray.push('\n\n');
|
|
60
60
|
}
|
|
61
|
+
} else if (node.type === 'listitem' || node.type === 'tablerow') {
|
|
62
|
+
if (plainTextArray?.length) {
|
|
63
|
+
// Only add a new line if there is already text in the array
|
|
64
|
+
plainTextArray.push('\n');
|
|
65
|
+
}
|
|
66
|
+
} else if (node.type === 'tablecell') {
|
|
67
|
+
if (plainTextArray?.length) {
|
|
68
|
+
plainTextArray.push(' | ');
|
|
69
|
+
}
|
|
61
70
|
} else if (node.type === 'linebreak') {
|
|
62
71
|
plainTextArray.push('\n');
|
|
63
72
|
} else if (node.type === 'tab') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["hasText","findConverterForNode","convertLexicalToPlaintext","converters","data","plaintext","convertLexicalNodesToPlaintext","nodes","root","children","parent","join","plainTextArray","i","node","converter","converted","childIndex","nodesToPlaintext","args","push","error","console","type","length","text","filter","Boolean"],"sources":["../../../../../src/features/converters/lexicalToPlaintext/sync/index.ts"],"sourcesContent":["/* eslint-disable no-console */\nimport type { SerializedEditorState, SerializedLexicalNode } from 'lexical'\n\nimport type { SerializedLexicalNodeWithParent } from '../shared/types.js'\nimport type { PlaintextConverters } from './types.js'\n\nimport { hasText } from '../../../../validate/hasText.js'\nimport { findConverterForNode } from '../shared/findConverterForNode.js'\n\nexport type ConvertLexicalToPlaintextArgs = {\n /**\n * A map of node types to their corresponding plaintext converter functions.\n * This is optional - if not provided, the following heuristic will be used:\n *\n * - If the node has a `text` property, it will be used as the plaintext.\n * - If the node has a `children` property, the children will be recursively converted to plaintext.\n * - If the node has neither, it will be ignored.\n **/\n converters?: PlaintextConverters\n data: SerializedEditorState\n}\n\nexport function convertLexicalToPlaintext({\n converters,\n data,\n}: ConvertLexicalToPlaintextArgs): string {\n if (hasText(data)) {\n const plaintext = convertLexicalNodesToPlaintext({\n converters: converters ?? {},\n nodes: data?.root?.children,\n parent: data?.root,\n }).join('')\n\n return plaintext\n }\n return ''\n}\n\nexport function convertLexicalNodesToPlaintext({\n converters,\n nodes,\n parent,\n}: {\n converters: PlaintextConverters\n nodes: SerializedLexicalNode[]\n parent: SerializedLexicalNodeWithParent\n}): string[] {\n const plainTextArray: string[] = []\n\n let i = -1\n for (const node of nodes) {\n i++\n\n const converter = findConverterForNode({\n converters,\n node,\n })\n\n if (converter) {\n try {\n const converted =\n typeof converter === 'function'\n ? converter({\n childIndex: i,\n converters,\n node,\n nodesToPlaintext: (args) => {\n return convertLexicalNodesToPlaintext({\n converters: args.converters ?? converters,\n nodes: args.nodes,\n parent: args.parent ?? {\n ...node,\n parent,\n },\n })\n },\n parent,\n })\n : converter\n\n if (converted && typeof converted === 'string') {\n plainTextArray.push(converted)\n }\n } catch (error) {\n console.error('Error converting lexical node to plaintext:', error, 'node:', node)\n }\n } else {\n // Default plaintext converter heuristic\n if (node.type === 'paragraph') {\n if (plainTextArray?.length) {\n // Only add a new line if there is already text in the array\n plainTextArray.push('\\n\\n')\n }\n } else if (node.type === 'linebreak') {\n plainTextArray.push('\\n')\n } else if (node.type === 'tab') {\n plainTextArray.push('\\t')\n } else if ('text' in node && node.text) {\n plainTextArray.push(node.text as string)\n }\n\n if ('children' in node && node.children) {\n plainTextArray.push(\n ...convertLexicalNodesToPlaintext({\n converters,\n nodes: node.children as SerializedLexicalNode[],\n parent: node,\n }),\n )\n }\n }\n }\n\n return plainTextArray.filter(Boolean)\n}\n"],"mappings":"AAAA,+BAMA,SAASA,OAAO,QAAQ;AACxB,SAASC,oBAAoB,QAAQ;AAerC,OAAO,SAASC,0BAA0B;EACxCC,UAAU;EACVC;AAAI,CAC0B;EAC9B,IAAIJ,OAAA,CAAQI,IAAA,GAAO;IACjB,MAAMC,SAAA,GAAYC,8BAAA,CAA+B;MAC/CH,UAAA,EAAYA,UAAA,IAAc,CAAC;MAC3BI,KAAA,EAAOH,IAAA,EAAMI,IAAA,EAAMC,QAAA;MACnBC,MAAA,EAAQN,IAAA,EAAMI;IAChB,GAAGG,IAAI,CAAC;IAER,OAAON,SAAA;EACT;EACA,OAAO;AACT;AAEA,OAAO,SAASC,+BAA+B;EAC7CH,UAAU;EACVI,KAAK;EACLG;AAAM,CAKP;EACC,MAAME,cAAA,GAA2B,EAAE;EAEnC,IAAIC,CAAA,GAAI,CAAC;EACT,KAAK,MAAMC,IAAA,IAAQP,KAAA,EAAO;IACxBM,CAAA;IAEA,MAAME,SAAA,GAAYd,oBAAA,CAAqB;MACrCE,UAAA;MACAW;IACF;IAEA,IAAIC,SAAA,EAAW;MACb,IAAI;QACF,MAAMC,SAAA,GACJ,OAAOD,SAAA,KAAc,aACjBA,SAAA,CAAU;UACRE,UAAA,EAAYJ,CAAA;UACZV,UAAA;UACAW,IAAA;UACAI,gBAAA,EAAmBC,IAAA;YACjB,OAAOb,8BAAA,CAA+B;cACpCH,UAAA,EAAYgB,IAAA,CAAKhB,UAAU,IAAIA,UAAA;cAC/BI,KAAA,EAAOY,IAAA,CAAKZ,KAAK;cACjBG,MAAA,EAAQS,IAAA,CAAKT,MAAM,IAAI;gBACrB,GAAGI,IAAI;gBACPJ;cACF;YACF;UACF;UACAA;QACF,KACAK,SAAA;QAEN,IAAIC,SAAA,IAAa,OAAOA,SAAA,KAAc,UAAU;UAC9CJ,cAAA,CAAeQ,IAAI,CAACJ,SAAA;QACtB;MACF,EAAE,OAAOK,KAAA,EAAO;QACdC,OAAA,CAAQD,KAAK,CAAC,+CAA+CA,KAAA,EAAO,SAASP,IAAA;MAC/E;IACF,OAAO;MACL;MACA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["hasText","findConverterForNode","convertLexicalToPlaintext","converters","data","plaintext","convertLexicalNodesToPlaintext","nodes","root","children","parent","join","plainTextArray","i","node","converter","converted","childIndex","nodesToPlaintext","args","push","error","console","type","length","text","filter","Boolean"],"sources":["../../../../../src/features/converters/lexicalToPlaintext/sync/index.ts"],"sourcesContent":["/* eslint-disable no-console */\nimport type { SerializedEditorState, SerializedLexicalNode } from 'lexical'\n\nimport type { SerializedLexicalNodeWithParent } from '../shared/types.js'\nimport type { PlaintextConverters } from './types.js'\n\nimport { hasText } from '../../../../validate/hasText.js'\nimport { findConverterForNode } from '../shared/findConverterForNode.js'\n\nexport type ConvertLexicalToPlaintextArgs = {\n /**\n * A map of node types to their corresponding plaintext converter functions.\n * This is optional - if not provided, the following heuristic will be used:\n *\n * - If the node has a `text` property, it will be used as the plaintext.\n * - If the node has a `children` property, the children will be recursively converted to plaintext.\n * - If the node has neither, it will be ignored.\n **/\n converters?: PlaintextConverters\n data: SerializedEditorState\n}\n\nexport function convertLexicalToPlaintext({\n converters,\n data,\n}: ConvertLexicalToPlaintextArgs): string {\n if (hasText(data)) {\n const plaintext = convertLexicalNodesToPlaintext({\n converters: converters ?? {},\n nodes: data?.root?.children,\n parent: data?.root,\n }).join('')\n\n return plaintext\n }\n return ''\n}\n\nexport function convertLexicalNodesToPlaintext({\n converters,\n nodes,\n parent,\n}: {\n converters: PlaintextConverters\n nodes: SerializedLexicalNode[]\n parent: SerializedLexicalNodeWithParent\n}): string[] {\n const plainTextArray: string[] = []\n\n let i = -1\n for (const node of nodes) {\n i++\n\n const converter = findConverterForNode({\n converters,\n node,\n })\n\n if (converter) {\n try {\n const converted =\n typeof converter === 'function'\n ? converter({\n childIndex: i,\n converters,\n node,\n nodesToPlaintext: (args) => {\n return convertLexicalNodesToPlaintext({\n converters: args.converters ?? converters,\n nodes: args.nodes,\n parent: args.parent ?? {\n ...node,\n parent,\n },\n })\n },\n parent,\n })\n : converter\n\n if (converted && typeof converted === 'string') {\n plainTextArray.push(converted)\n }\n } catch (error) {\n console.error('Error converting lexical node to plaintext:', error, 'node:', node)\n }\n } else {\n // Default plaintext converter heuristic\n if (\n node.type === 'paragraph' ||\n node.type === 'heading' ||\n node.type === 'list' ||\n node.type === 'table'\n ) {\n if (plainTextArray?.length) {\n // Only add a new line if there is already text in the array\n plainTextArray.push('\\n\\n')\n }\n } else if (node.type === 'listitem' || node.type === 'tablerow') {\n if (plainTextArray?.length) {\n // Only add a new line if there is already text in the array\n plainTextArray.push('\\n')\n }\n } else if (node.type === 'tablecell') {\n if (plainTextArray?.length) {\n plainTextArray.push(' | ')\n }\n } else if (node.type === 'linebreak') {\n plainTextArray.push('\\n')\n } else if (node.type === 'tab') {\n plainTextArray.push('\\t')\n } else if ('text' in node && node.text) {\n plainTextArray.push(node.text as string)\n }\n\n if ('children' in node && node.children) {\n plainTextArray.push(\n ...convertLexicalNodesToPlaintext({\n converters,\n nodes: node.children as SerializedLexicalNode[],\n parent: node,\n }),\n )\n }\n }\n }\n\n return plainTextArray.filter(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-lexical",
|
|
3
|
-
"version": "3.37.0-internal.
|
|
3
|
+
"version": "3.37.0-internal.ed5ddac",
|
|
4
4
|
"description": "The officially supported Lexical richtext adapter for Payload",
|
|
5
5
|
"homepage": "https://payloadcms.com",
|
|
6
6
|
"repository": {
|
|
@@ -364,8 +364,8 @@
|
|
|
364
364
|
"react-error-boundary": "4.1.2",
|
|
365
365
|
"ts-essentials": "10.0.3",
|
|
366
366
|
"uuid": "10.0.0",
|
|
367
|
-
"@payloadcms/translations": "3.37.0-internal.
|
|
368
|
-
"@payloadcms/ui": "3.37.0-internal.
|
|
367
|
+
"@payloadcms/translations": "3.37.0-internal.ed5ddac",
|
|
368
|
+
"@payloadcms/ui": "3.37.0-internal.ed5ddac"
|
|
369
369
|
},
|
|
370
370
|
"devDependencies": {
|
|
371
371
|
"@babel/cli": "7.26.4",
|
|
@@ -385,16 +385,16 @@
|
|
|
385
385
|
"esbuild-sass-plugin": "3.3.1",
|
|
386
386
|
"eslint-plugin-react-compiler": "19.0.0-beta-e993439-20250405",
|
|
387
387
|
"swc-plugin-transform-remove-imports": "3.1.0",
|
|
388
|
-
"
|
|
389
|
-
"
|
|
388
|
+
"payload": "3.37.0-internal.ed5ddac",
|
|
389
|
+
"@payloadcms/eslint-config": "3.28.0"
|
|
390
390
|
},
|
|
391
391
|
"peerDependencies": {
|
|
392
392
|
"@faceless-ui/modal": "3.0.0-beta.2",
|
|
393
393
|
"@faceless-ui/scroll-info": "2.0.0",
|
|
394
394
|
"react": "^19.0.0 || ^19.0.0-rc-65a56d0e-20241020",
|
|
395
395
|
"react-dom": "^19.0.0 || ^19.0.0-rc-65a56d0e-20241020",
|
|
396
|
-
"
|
|
397
|
-
"
|
|
396
|
+
"@payloadcms/next": "3.37.0-internal.ed5ddac",
|
|
397
|
+
"payload": "3.37.0-internal.ed5ddac"
|
|
398
398
|
},
|
|
399
399
|
"engines": {
|
|
400
400
|
"node": "^18.20.2 || >=20.9.0"
|