@payloadcms/richtext-lexical 4.0.0-internal.38b7f1d → 4.0.0-internal.3aa3d85
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/LICENSE.md +1 -1
- package/dist/cell/rscEntry.d.ts +1 -1
- package/dist/cell/rscEntry.d.ts.map +1 -1
- package/dist/cell/rscEntry.js +5 -5
- package/dist/cell/rscEntry.js.map +1 -1
- package/dist/exports/client/Field-XH5C4HFU.js +2 -0
- package/dist/exports/client/Field-XH5C4HFU.js.map +7 -0
- package/dist/exports/client/{RelationshipComponent-5RONAYJM.js → RelationshipComponent-YCPAKOL7.js} +2 -2
- package/dist/exports/client/RelationshipComponent-YCPAKOL7.js.map +7 -0
- package/dist/exports/client/bundled.css +1 -1
- package/dist/exports/client/chunk-5VIL27GI.js +2 -0
- package/dist/exports/client/chunk-5VIL27GI.js.map +7 -0
- package/dist/exports/client/chunk-ESITTE3C.js +2 -0
- package/dist/exports/client/chunk-ESITTE3C.js.map +7 -0
- package/dist/exports/client/{chunk-BZZVLW4U.js → chunk-RJ5MAOKZ.js} +1 -1
- package/dist/exports/client/chunk-RJ5MAOKZ.js.map +7 -0
- package/dist/exports/client/chunk-UD4DQ4AK.js +2 -0
- package/dist/exports/client/chunk-UD4DQ4AK.js.map +7 -0
- package/dist/exports/client/chunk-X3D4LZS7.js +2 -0
- package/dist/exports/client/chunk-X3D4LZS7.js.map +7 -0
- package/dist/exports/client/component-PHZQBOJE.js +2 -0
- package/dist/exports/client/component-PHZQBOJE.js.map +7 -0
- package/dist/exports/client/componentInline-H24N7GUG.js +2 -0
- package/dist/exports/client/index.d.ts +0 -1
- package/dist/exports/client/index.d.ts.map +1 -1
- package/dist/exports/client/index.js +20 -21
- package/dist/exports/client/index.js.map +4 -4
- package/dist/exports/react/index.d.ts +1 -1
- package/dist/exports/react/index.d.ts.map +1 -1
- package/dist/exports/react/index.js.map +1 -1
- package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
- package/dist/features/blockquote/client/index.js +2 -2
- package/dist/features/blockquote/client/index.js.map +1 -1
- package/dist/features/blockquote/server/index.d.ts +1 -4
- package/dist/features/blockquote/server/index.d.ts.map +1 -1
- package/dist/features/blockquote/server/index.js +4 -2
- package/dist/features/blockquote/server/index.js.map +1 -1
- package/dist/features/blockquote/server/schema.d.ts +8 -0
- package/dist/features/blockquote/server/schema.d.ts.map +1 -0
- package/dist/features/blockquote/server/schema.js +15 -0
- package/dist/features/blockquote/server/schema.js.map +1 -0
- package/dist/features/blocks/client/component/index.css +2 -2
- package/dist/features/blocks/client/component/index.d.ts +3 -2
- package/dist/features/blocks/client/component/index.d.ts.map +1 -1
- package/dist/features/blocks/client/component/index.js +18 -10
- package/dist/features/blocks/client/component/index.js.map +1 -1
- package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts.map +1 -1
- package/dist/features/blocks/client/componentInline/index.css +8 -8
- package/dist/features/blocks/client/componentInline/index.d.ts +3 -2
- package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
- package/dist/features/blocks/client/componentInline/index.js +17 -9
- package/dist/features/blocks/client/componentInline/index.js.map +1 -1
- package/dist/features/blocks/client/index.d.ts.map +1 -1
- package/dist/features/blocks/client/index.js +4 -2
- package/dist/features/blocks/client/index.js.map +1 -1
- package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts +1 -1
- package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts.map +1 -1
- package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js +1 -1
- package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js.map +1 -1
- package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts +1 -1
- package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts.map +1 -1
- package/dist/features/blocks/client/markdown/getMarkdownToLexical.js +5 -2
- package/dist/features/blocks/client/markdown/getMarkdownToLexical.js.map +1 -1
- package/dist/features/blocks/client/markdown/markdownTransformer.d.ts +1 -2
- package/dist/features/blocks/client/markdown/markdownTransformer.d.ts.map +1 -1
- package/dist/features/blocks/client/markdown/markdownTransformer.js +4 -4
- package/dist/features/blocks/client/markdown/markdownTransformer.js.map +1 -1
- package/dist/features/blocks/client/nodes/BlocksNode.d.ts +2 -2
- package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
- package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
- package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts +2 -2
- package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -1
- package/dist/features/blocks/client/nodes/InlineBlocksNode.js.map +1 -1
- package/dist/features/blocks/client/plugin/index.d.ts +1 -1
- package/dist/features/blocks/client/plugin/index.d.ts.map +1 -1
- package/dist/features/blocks/client/plugin/index.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Block.d.ts.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Block.js +1 -0
- package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.css +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.css +2 -4
- package/dist/features/blocks/premade/CodeBlock/Component/index.css +5 -5
- package/dist/features/blocks/server/graphQLPopulationPromise.d.ts +1 -2
- package/dist/features/blocks/server/graphQLPopulationPromise.d.ts.map +1 -1
- package/dist/features/blocks/server/graphQLPopulationPromise.js.map +1 -1
- package/dist/features/blocks/server/index.d.ts +1 -0
- package/dist/features/blocks/server/index.d.ts.map +1 -1
- package/dist/features/blocks/server/index.js +24 -72
- package/dist/features/blocks/server/index.js.map +1 -1
- package/dist/features/blocks/server/markdown/markdownTransformer.d.ts +1 -1
- package/dist/features/blocks/server/markdown/markdownTransformer.d.ts.map +1 -1
- package/dist/features/blocks/server/markdown/markdownTransformer.js +4 -4
- package/dist/features/blocks/server/markdown/markdownTransformer.js.map +1 -1
- package/dist/features/blocks/server/nodes/BlocksNode.d.ts +1 -18
- package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
- package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
- package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts +2 -10
- package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -1
- package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
- package/dist/features/blocks/server/schema.d.ts +45 -0
- package/dist/features/blocks/server/schema.d.ts.map +1 -0
- package/dist/features/blocks/server/schema.js +140 -0
- package/dist/features/blocks/server/schema.js.map +1 -0
- package/dist/features/blocks/server/validate.d.ts +1 -2
- package/dist/features/blocks/server/validate.d.ts.map +1 -1
- package/dist/features/blocks/server/validate.js.map +1 -1
- package/dist/features/converters/htmlToLexical/index.d.ts +1 -1
- package/dist/features/converters/htmlToLexical/index.d.ts.map +1 -1
- package/dist/features/converters/htmlToLexical/index.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/blockquote.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/blockquote.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/blockquote.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/heading.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/heading.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/heading.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/linebreak.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/linebreak.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/linebreak.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/link.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/link.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/link.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/list.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/paragraph.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/paragraph.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/paragraph.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/tab.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/tab.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/tab.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/table.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/table.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/table.js +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/table.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/text.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/text.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/text.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/upload.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/upload.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/converters/upload.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/defaultConverters.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/async/defaultConverters.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/defaultConverters.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/types.d.ts +15 -16
- package/dist/features/converters/lexicalToHtml/async/types.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/async/types.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/shared/cssColors.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/heading.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/heading.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/heading.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/link.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/link.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/link.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/list.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/tab.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/tab.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/tab.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/table.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/table.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/table.js +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/table.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/text.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/text.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/text.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/upload.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/upload.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/converters/upload.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/defaultConverters.d.ts +1 -1
- package/dist/features/converters/lexicalToHtml/sync/defaultConverters.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/defaultConverters.js.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/types.d.ts +15 -16
- package/dist/features/converters/lexicalToHtml/sync/types.d.ts.map +1 -1
- package/dist/features/converters/lexicalToHtml/sync/types.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/Component/index.d.ts +6 -4
- package/dist/features/converters/lexicalToJSX/Component/index.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/Component/index.js +5 -4
- package/dist/features/converters/lexicalToJSX/Component/index.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/link.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/link.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/link.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/tab.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/tab.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/tab.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/table.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/table.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/table.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/text.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/text.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/text.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/defaultConverters.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/defaultConverters.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/defaultConverters.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/index.d.ts +1 -1
- package/dist/features/converters/lexicalToJSX/converter/index.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/index.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/types.d.ts +13 -15
- package/dist/features/converters/lexicalToJSX/converter/types.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/types.js.map +1 -1
- package/dist/features/converters/lexicalToMarkdown/index.d.ts.map +1 -1
- package/dist/features/converters/lexicalToMarkdown/index.js +1 -1
- package/dist/features/converters/lexicalToMarkdown/index.js.map +1 -1
- package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js.map +1 -1
- package/dist/features/converters/lexicalToPlaintext/shared/findConverterForNode.js.map +1 -1
- package/dist/features/converters/lexicalToPlaintext/sync/types.d.ts +13 -15
- package/dist/features/converters/lexicalToPlaintext/sync/types.d.ts.map +1 -1
- package/dist/features/converters/lexicalToPlaintext/sync/types.js.map +1 -1
- package/dist/features/converters/markdownToLexical/index.d.ts +1 -1
- package/dist/features/converters/markdownToLexical/index.d.ts.map +1 -1
- package/dist/features/converters/markdownToLexical/index.js +5 -2
- package/dist/features/converters/markdownToLexical/index.js.map +1 -1
- package/dist/features/debug/jsxConverter/client/plugin/style.css +2 -2
- package/dist/features/experimental_table/client/index.js +2 -2
- package/dist/features/experimental_table/client/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.css +4 -4
- package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.css +1 -1
- package/dist/features/experimental_table/markdownTransformer.d.ts +2 -2
- package/dist/features/experimental_table/markdownTransformer.d.ts.map +1 -1
- package/dist/features/experimental_table/markdownTransformer.js +6 -3
- package/dist/features/experimental_table/markdownTransformer.js.map +1 -1
- package/dist/features/experimental_table/server/index.d.ts +1 -6
- package/dist/features/experimental_table/server/index.d.ts.map +1 -1
- package/dist/features/experimental_table/server/index.js +6 -2
- package/dist/features/experimental_table/server/index.js.map +1 -1
- package/dist/features/experimental_table/server/schema.d.ts +27 -0
- package/dist/features/experimental_table/server/schema.d.ts.map +1 -0
- package/dist/features/experimental_table/server/schema.js +107 -0
- package/dist/features/experimental_table/server/schema.js.map +1 -0
- package/dist/features/format/bold/feature.client.js +1 -1
- package/dist/features/format/bold/feature.client.js.map +1 -1
- package/dist/features/format/bold/feature.server.d.ts.map +1 -1
- package/dist/features/format/bold/feature.server.js +1 -1
- package/dist/features/format/bold/feature.server.js.map +1 -1
- package/dist/features/format/inlineCode/feature.client.js +1 -1
- package/dist/features/format/inlineCode/feature.client.js.map +1 -1
- package/dist/features/format/inlineCode/feature.server.d.ts.map +1 -1
- package/dist/features/format/inlineCode/feature.server.js +1 -1
- package/dist/features/format/inlineCode/feature.server.js.map +1 -1
- package/dist/features/format/italic/feature.client.js +1 -1
- package/dist/features/format/italic/feature.client.js.map +1 -1
- package/dist/features/format/italic/feature.server.d.ts.map +1 -1
- package/dist/features/format/italic/feature.server.js +1 -1
- package/dist/features/format/italic/feature.server.js.map +1 -1
- package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -1
- package/dist/features/format/strikethrough/feature.client.js +1 -1
- package/dist/features/format/strikethrough/feature.client.js.map +1 -1
- package/dist/features/format/strikethrough/feature.server.d.ts.map +1 -1
- package/dist/features/format/strikethrough/feature.server.js +1 -1
- package/dist/features/format/strikethrough/feature.server.js.map +1 -1
- package/dist/features/heading/client/index.js +2 -2
- package/dist/features/heading/client/index.js.map +1 -1
- package/dist/features/heading/markdownTransformer.d.ts +2 -2
- package/dist/features/heading/markdownTransformer.d.ts.map +1 -1
- package/dist/features/heading/markdownTransformer.js +6 -19
- package/dist/features/heading/markdownTransformer.js.map +1 -1
- package/dist/features/heading/server/index.d.ts +2 -4
- package/dist/features/heading/server/index.d.ts.map +1 -1
- package/dist/features/heading/server/index.js +4 -2
- package/dist/features/heading/server/index.js.map +1 -1
- package/dist/features/heading/server/schema.d.ts +10 -0
- package/dist/features/heading/server/schema.d.ts.map +1 -0
- package/dist/features/heading/server/schema.js +37 -0
- package/dist/features/heading/server/schema.js.map +1 -0
- package/dist/features/horizontalRule/client/index.js +2 -2
- package/dist/features/horizontalRule/client/index.js.map +1 -1
- package/dist/features/horizontalRule/client/markdownTransformer.d.ts +2 -2
- package/dist/features/horizontalRule/client/markdownTransformer.d.ts.map +1 -1
- package/dist/features/horizontalRule/client/markdownTransformer.js +1 -1
- package/dist/features/horizontalRule/client/markdownTransformer.js.map +1 -1
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +1 -1
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
- package/dist/features/horizontalRule/client/plugin/index.css +2 -2
- package/dist/features/horizontalRule/server/index.d.ts +1 -0
- package/dist/features/horizontalRule/server/index.d.ts.map +1 -1
- package/dist/features/horizontalRule/server/index.js +4 -2
- package/dist/features/horizontalRule/server/index.js.map +1 -1
- package/dist/features/horizontalRule/server/markdownTransformer.d.ts +2 -2
- package/dist/features/horizontalRule/server/markdownTransformer.d.ts.map +1 -1
- package/dist/features/horizontalRule/server/markdownTransformer.js +1 -1
- package/dist/features/horizontalRule/server/markdownTransformer.js.map +1 -1
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +1 -5
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
- package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
- package/dist/features/horizontalRule/server/schema.d.ts +7 -0
- package/dist/features/horizontalRule/server/schema.d.ts.map +1 -0
- package/dist/features/horizontalRule/server/schema.js +25 -0
- package/dist/features/horizontalRule/server/schema.js.map +1 -0
- package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -1
- package/dist/features/link/client/index.d.ts.map +1 -1
- package/dist/features/link/client/index.js +2 -2
- package/dist/features/link/client/index.js.map +1 -1
- package/dist/features/link/client/plugins/autoLink/index.d.ts +1 -1
- package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -1
- package/dist/features/link/client/plugins/autoLink/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +3 -3
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/index.css +7 -11
- package/dist/features/link/client/plugins/floatingLinkEditor/types.d.ts +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/types.d.ts.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/types.js.map +1 -1
- package/dist/features/link/client/plugins/link/index.js.map +1 -1
- package/dist/features/link/markdownTransformer.d.ts +5 -5
- package/dist/features/link/markdownTransformer.d.ts.map +1 -1
- package/dist/features/link/markdownTransformer.js +2 -2
- package/dist/features/link/markdownTransformer.js.map +1 -1
- package/dist/features/link/markdownTransformer.spec.js +10 -10
- package/dist/features/link/markdownTransformer.spec.js.map +1 -1
- package/dist/features/link/nodes/AutoLinkNode.d.ts +3 -3
- package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
- package/dist/features/link/nodes/AutoLinkNode.js +2 -1
- package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
- package/dist/features/link/nodes/LinkNode.d.ts +3 -3
- package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
- package/dist/features/link/nodes/LinkNode.js +2 -1
- package/dist/features/link/nodes/LinkNode.js.map +1 -1
- package/dist/features/link/server/baseFields.d.ts.map +1 -1
- package/dist/features/link/server/baseFields.js.map +1 -1
- package/dist/features/link/server/graphQLPopulationPromise.d.ts +1 -1
- package/dist/features/link/server/graphQLPopulationPromise.d.ts.map +1 -1
- package/dist/features/link/server/graphQLPopulationPromise.js.map +1 -1
- package/dist/features/link/server/index.d.ts +2 -1
- package/dist/features/link/server/index.d.ts.map +1 -1
- package/dist/features/link/server/index.js +5 -2
- package/dist/features/link/server/index.js.map +1 -1
- package/dist/features/link/server/schema.d.ts +32 -0
- package/dist/features/link/server/schema.d.ts.map +1 -0
- package/dist/features/link/server/schema.js +171 -0
- package/dist/features/link/server/schema.js.map +1 -0
- package/dist/features/link/server/validate.d.ts +1 -1
- package/dist/features/link/server/validate.d.ts.map +1 -1
- package/dist/features/link/server/validate.js.map +1 -1
- package/dist/features/lists/checklist/client/index.js +1 -1
- package/dist/features/lists/checklist/client/index.js.map +1 -1
- package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
- package/dist/features/lists/checklist/server/index.js +4 -1
- package/dist/features/lists/checklist/server/index.js.map +1 -1
- package/dist/features/lists/orderedList/client/index.js +1 -1
- package/dist/features/lists/orderedList/client/index.js.map +1 -1
- package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
- package/dist/features/lists/orderedList/server/index.js +4 -1
- package/dist/features/lists/orderedList/server/index.js.map +1 -1
- package/dist/features/lists/plugin/index.d.ts +0 -9
- package/dist/features/lists/plugin/index.d.ts.map +1 -1
- package/dist/features/lists/plugin/index.js.map +1 -1
- package/dist/features/lists/shared/schema.d.ts +18 -0
- package/dist/features/lists/shared/schema.d.ts.map +1 -0
- package/dist/features/lists/shared/schema.js +62 -0
- package/dist/features/lists/shared/schema.js.map +1 -0
- package/dist/features/lists/unorderedList/client/index.js +1 -1
- package/dist/features/lists/unorderedList/client/index.js.map +1 -1
- package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
- package/dist/features/lists/unorderedList/server/index.js +4 -1
- package/dist/features/lists/unorderedList/server/index.js.map +1 -1
- package/dist/features/relationship/client/components/RelationshipComponent.d.ts +1 -1
- package/dist/features/relationship/client/components/RelationshipComponent.d.ts.map +1 -1
- package/dist/features/relationship/client/components/RelationshipComponent.js +2 -2
- package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
- package/dist/features/relationship/client/components/index.css +2 -2
- package/dist/features/relationship/client/drawer/index.d.ts.map +1 -1
- package/dist/features/relationship/client/nodes/RelationshipNode.d.ts +1 -1
- package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
- package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
- package/dist/features/relationship/client/plugins/index.d.ts +1 -1
- package/dist/features/relationship/client/plugins/index.d.ts.map +1 -1
- package/dist/features/relationship/client/plugins/index.js.map +1 -1
- package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
- package/dist/features/relationship/client/utils/useEnabledRelationships.js +9 -40
- package/dist/features/relationship/client/utils/useEnabledRelationships.js.map +1 -1
- package/dist/features/relationship/server/graphQLPopulationPromise.d.ts +1 -1
- package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
- package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -1
- package/dist/features/relationship/server/index.d.ts +1 -0
- package/dist/features/relationship/server/index.d.ts.map +1 -1
- package/dist/features/relationship/server/index.js +2 -0
- package/dist/features/relationship/server/index.js.map +1 -1
- package/dist/features/relationship/server/nodes/RelationshipNode.d.ts +1 -10
- package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
- package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
- package/dist/features/relationship/server/schema.d.ts +28 -0
- package/dist/features/relationship/server/schema.d.ts.map +1 -0
- package/dist/features/relationship/server/schema.js +97 -0
- package/dist/features/relationship/server/schema.js.map +1 -0
- package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts +23 -0
- package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -0
- package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js +34 -0
- package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js.map +1 -0
- package/dist/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -1
- package/dist/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -1
- package/dist/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -1
- package/dist/features/textState/feature.client.js +1 -1
- package/dist/features/textState/feature.client.js.map +1 -1
- package/dist/features/toolbars/fixed/client/Toolbar/index.css +2 -2
- package/dist/features/toolbars/inline/client/Toolbar/index.css +2 -13
- package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +1 -2
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.css +8 -12
- package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
- package/dist/features/toolbars/shared/useToolbarStates.d.ts.map +1 -1
- package/dist/features/toolbars/shared/useToolbarStates.js +3 -1
- package/dist/features/toolbars/shared/useToolbarStates.js.map +1 -1
- package/dist/features/toolbars/types.d.ts +1 -1
- package/dist/features/toolbars/types.d.ts.map +1 -1
- package/dist/features/toolbars/types.js.map +1 -1
- package/dist/features/typesClient.d.ts +2 -2
- package/dist/features/typesClient.d.ts.map +1 -1
- package/dist/features/typesClient.js.map +1 -1
- package/dist/features/typesServer.d.ts +19 -42
- package/dist/features/typesServer.d.ts.map +1 -1
- package/dist/features/typesServer.js.map +1 -1
- package/dist/features/upload/client/component/index.css +22 -26
- package/dist/features/upload/client/component/index.d.ts +1 -1
- package/dist/features/upload/client/component/index.d.ts.map +1 -1
- package/dist/features/upload/client/component/index.js +4 -4
- package/dist/features/upload/client/component/index.js.map +1 -1
- package/dist/features/upload/client/drawer/index.d.ts.map +1 -1
- package/dist/features/upload/client/nodes/UploadNode.d.ts +1 -1
- package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
- package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
- package/dist/features/upload/client/plugin/index.d.ts +1 -1
- package/dist/features/upload/client/plugin/index.d.ts.map +1 -1
- package/dist/features/upload/client/plugin/index.js +5 -5
- package/dist/features/upload/client/plugin/index.js.map +1 -1
- package/dist/features/upload/server/graphQLPopulationPromise.d.ts +1 -1
- package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
- package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -1
- package/dist/features/upload/server/index.d.ts +1 -0
- package/dist/features/upload/server/index.d.ts.map +1 -1
- package/dist/features/upload/server/index.js +5 -4
- package/dist/features/upload/server/index.js.map +1 -1
- package/dist/features/upload/server/markdownTransformer.d.ts +2 -2
- package/dist/features/upload/server/markdownTransformer.d.ts.map +1 -1
- package/dist/features/upload/server/markdownTransformer.js +1 -1
- package/dist/features/upload/server/markdownTransformer.js.map +1 -1
- package/dist/features/upload/server/nodes/UploadNode.d.ts +1 -55
- package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
- package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
- package/dist/features/upload/server/nodes/conversions.d.ts.map +1 -1
- package/dist/features/upload/server/nodes/conversions.js.map +1 -1
- package/dist/features/upload/server/schema.d.ts +52 -0
- package/dist/features/upload/server/schema.d.ts.map +1 -0
- package/dist/features/upload/server/schema.js +149 -0
- package/dist/features/upload/server/schema.js.map +1 -0
- package/dist/features/upload/server/validate.d.ts +1 -1
- package/dist/features/upload/server/validate.d.ts.map +1 -1
- package/dist/features/upload/server/validate.js.map +1 -1
- package/dist/field/Diff/converters/link.d.ts +1 -1
- package/dist/field/Diff/converters/link.d.ts.map +1 -1
- package/dist/field/Diff/converters/link.js.map +1 -1
- package/dist/field/Diff/converters/listitem/index.css +44 -8
- package/dist/field/Diff/converters/listitem/index.d.ts +1 -1
- package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -1
- package/dist/field/Diff/converters/listitem/index.js.map +1 -1
- package/dist/field/Diff/converters/relationship/index.css +76 -36
- package/dist/field/Diff/converters/relationship/index.d.ts +1 -1
- package/dist/field/Diff/converters/relationship/index.d.ts.map +1 -1
- package/dist/field/Diff/converters/relationship/index.js +10 -28
- package/dist/field/Diff/converters/relationship/index.js.map +1 -1
- package/dist/field/Diff/converters/unknown/index.css +1 -1
- package/dist/field/Diff/converters/unknown/index.js.map +1 -1
- package/dist/field/Diff/converters/upload/index.css +106 -43
- package/dist/field/Diff/converters/upload/index.d.ts +1 -1
- package/dist/field/Diff/converters/upload/index.d.ts.map +1 -1
- package/dist/field/Diff/converters/upload/index.js +6 -2
- package/dist/field/Diff/converters/upload/index.js.map +1 -1
- package/dist/field/Diff/index.css +116 -61
- package/dist/field/Diff/index.js.map +1 -1
- package/dist/field/Field.d.ts +1 -1
- package/dist/field/Field.d.ts.map +1 -1
- package/dist/field/Field.js +4 -5
- package/dist/field/Field.js.map +1 -1
- package/dist/field/RenderLexical/index.d.ts +2 -2
- package/dist/field/RenderLexical/index.d.ts.map +1 -1
- package/dist/field/RenderLexical/index.js.map +1 -1
- package/dist/field/RichTextViewProvider.d.ts +1 -1
- package/dist/field/RichTextViewProvider.d.ts.map +1 -1
- package/dist/field/RichTextViewProvider.js.map +1 -1
- package/dist/field/ViewSelector.css +1 -1
- package/dist/field/bundled.css +1 -1
- package/dist/field/index.css +5 -5
- package/dist/field/index.d.ts +1 -1
- package/dist/field/index.d.ts.map +1 -1
- package/dist/field/index.js +1 -1
- package/dist/field/index.js.map +1 -1
- package/dist/field/rscEntry.d.ts +1 -1
- package/dist/field/rscEntry.d.ts.map +1 -1
- package/dist/field/rscEntry.js +2 -0
- package/dist/field/rscEntry.js.map +1 -1
- package/dist/hooks.d.ts +6 -0
- package/dist/hooks.d.ts.map +1 -0
- package/dist/hooks.js +548 -0
- package/dist/hooks.js.map +1 -0
- package/dist/index.d.ts +13 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -621
- package/dist/index.js.map +1 -1
- package/dist/lexical/LexicalEditor.css +2 -2
- package/dist/lexical/LexicalProvider.d.ts +1 -1
- package/dist/lexical/LexicalProvider.d.ts.map +1 -1
- package/dist/lexical/LexicalProvider.js.map +1 -1
- package/dist/lexical/config/client/EditorConfigProvider.d.ts +1 -1
- package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
- package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
- package/dist/lexical/config/client/loader.d.ts +1 -1
- package/dist/lexical/config/client/loader.d.ts.map +1 -1
- package/dist/lexical/config/client/loader.js +5 -1
- package/dist/lexical/config/client/loader.js.map +1 -1
- package/dist/lexical/config/client/sanitize.d.ts +1 -1
- package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
- package/dist/lexical/config/client/sanitize.js.map +1 -1
- package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
- package/dist/lexical/config/server/sanitize.js +9 -11
- package/dist/lexical/config/server/sanitize.js.map +1 -1
- package/dist/lexical/config/types.d.ts +1 -1
- package/dist/lexical/config/types.d.ts.map +1 -1
- package/dist/lexical/config/types.js.map +1 -1
- package/dist/lexical/nodes/index.d.ts +1 -1
- package/dist/lexical/nodes/index.d.ts.map +1 -1
- package/dist/lexical/nodes/index.js.map +1 -1
- package/dist/lexical/plugins/DecoratorPlugin/index.css +1 -1
- package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -1
- package/dist/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -1
- package/dist/lexical/plugins/MarkdownShortcut/index.js +1 -1
- package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/index.css +1 -5
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +3 -3
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
- package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -1
- package/dist/lexical/theme/EditorTheme.css +20 -21
- package/dist/lexical/ui/ContentEditable.css +5 -5
- package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts +17 -0
- package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts.map +1 -0
- package/dist/lexical/utils/markdown/convertFromMarkdownString.js +27 -0
- package/dist/lexical/utils/markdown/convertFromMarkdownString.js.map +1 -0
- package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js +88 -0
- package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js.map +1 -0
- package/dist/lexical/utils/markdown/createBlockNode.d.ts +1 -1
- package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
- package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -1
- package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts +25 -0
- package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts.map +1 -0
- package/dist/lexical/utils/markdown/normalizeMarkdown.js +91 -0
- package/dist/lexical/utils/markdown/normalizeMarkdown.js.map +1 -0
- package/dist/lexical-proxy/@lexical-markdown.d.ts +1 -1
- package/dist/lexical-proxy/@lexical-markdown.d.ts.map +1 -1
- package/dist/lexical-proxy/@lexical-markdown.js +1 -1
- package/dist/lexical-proxy/@lexical-markdown.js.map +1 -1
- package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts +1 -1
- package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
- package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -1
- package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
- package/dist/types/builtInNodes.d.ts +14 -0
- package/dist/types/builtInNodes.d.ts.map +1 -0
- package/dist/types/builtInNodes.js +203 -0
- package/dist/types/builtInNodes.js.map +1 -0
- package/dist/{types.d.ts → types/index.d.ts} +25 -26
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/jsonSchemaHelpers.d.ts +30 -0
- package/dist/types/jsonSchemaHelpers.d.ts.map +1 -0
- package/dist/types/jsonSchemaHelpers.js +58 -0
- package/dist/types/jsonSchemaHelpers.js.map +1 -0
- package/dist/types/nodeTypes.d.ts +128 -0
- package/dist/types/nodeTypes.d.ts.map +1 -0
- package/dist/types/nodeTypes.js +6 -0
- package/dist/types/nodeTypes.js.map +1 -0
- package/dist/types/schema.d.ts +6 -0
- package/dist/types/schema.d.ts.map +1 -0
- package/dist/types/schema.js +90 -0
- package/dist/types/schema.js.map +1 -0
- package/dist/utilities/applyBaseFilterToFields.d.ts.map +1 -1
- package/dist/utilities/applyBaseFilterToFields.js +1 -2
- package/dist/utilities/applyBaseFilterToFields.js.map +1 -1
- package/dist/utilities/buildEditorState.d.ts +18 -4
- package/dist/utilities/buildEditorState.d.ts.map +1 -1
- package/dist/utilities/buildEditorState.js +8 -0
- package/dist/utilities/buildEditorState.js.map +1 -1
- package/dist/utilities/buildInitialState.d.ts +2 -1
- package/dist/utilities/buildInitialState.d.ts.map +1 -1
- package/dist/utilities/buildInitialState.js.map +1 -1
- package/dist/utilities/createClientFeature.d.ts +1 -1
- package/dist/utilities/createClientFeature.d.ts.map +1 -1
- package/dist/utilities/createClientFeature.js.map +1 -1
- package/dist/utilities/editorConfigFactory.d.ts +1 -1
- package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
- package/dist/utilities/editorConfigFactory.js.map +1 -1
- package/dist/utilities/fieldsDrawer/Drawer.d.ts.map +1 -1
- package/dist/utilities/fieldsDrawer/Drawer.js +19 -10
- package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
- package/dist/utilities/fieldsDrawer/DrawerContent.d.ts +4 -1
- package/dist/utilities/fieldsDrawer/DrawerContent.d.ts.map +1 -1
- package/dist/utilities/fieldsDrawer/DrawerContent.js +8 -7
- package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
- package/dist/utilities/fieldsDrawer/index.css +12 -0
- package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts +29 -0
- package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts.map +1 -0
- package/dist/utilities/fieldsDrawer/useDrawerSubmit.js +97 -0
- package/dist/utilities/fieldsDrawer/useDrawerSubmit.js.map +1 -0
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -1
- package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts.map +1 -1
- package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts.map +1 -1
- package/dist/utilities/generateImportMap.d.ts +1 -1
- package/dist/utilities/generateImportMap.d.ts.map +1 -1
- package/dist/utilities/generateImportMap.js.map +1 -1
- package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
- package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
- package/dist/utilities/initLexicalFeatures.d.ts +1 -1
- package/dist/utilities/initLexicalFeatures.d.ts.map +1 -1
- package/dist/utilities/initLexicalFeatures.js.map +1 -1
- package/dist/utilities/recurseNodeTree.d.ts.map +1 -1
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -1
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js +1 -1
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -1
- package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
- package/dist/validate/index.d.ts.map +1 -1
- package/package.json +29 -33
- package/dist/exports/client/Field-PJW7KUJG.js +0 -2
- package/dist/exports/client/Field-PJW7KUJG.js.map +0 -7
- package/dist/exports/client/RelationshipComponent-5RONAYJM.js.map +0 -7
- package/dist/exports/client/chunk-44G3K3W7.js +0 -2
- package/dist/exports/client/chunk-44G3K3W7.js.map +0 -7
- package/dist/exports/client/chunk-BZZVLW4U.js.map +0 -7
- package/dist/exports/client/chunk-FTT5KJ6W.js +0 -12
- package/dist/exports/client/chunk-FTT5KJ6W.js.map +0 -7
- package/dist/exports/client/chunk-INBEEENE.js +0 -2
- package/dist/exports/client/chunk-INBEEENE.js.map +0 -7
- package/dist/exports/client/chunk-QJ5EETIB.js +0 -2
- package/dist/exports/client/chunk-QJ5EETIB.js.map +0 -7
- package/dist/exports/client/component-53Y3RYR5.js +0 -2
- package/dist/exports/client/component-53Y3RYR5.js.map +0 -7
- package/dist/exports/client/componentInline-PM4PLNUK.js +0 -2
- package/dist/features/blockquote/markdownTransformer.d.ts +0 -3
- package/dist/features/blockquote/markdownTransformer.d.ts.map +0 -1
- package/dist/features/blockquote/markdownTransformer.js +0 -33
- package/dist/features/blockquote/markdownTransformer.js.map +0 -1
- package/dist/features/format/bold/markdownTransformers.d.ts +0 -6
- package/dist/features/format/bold/markdownTransformers.d.ts.map +0 -1
- package/dist/features/format/bold/markdownTransformers.js +0 -23
- package/dist/features/format/bold/markdownTransformers.js.map +0 -1
- package/dist/features/format/inlineCode/markdownTransformers.d.ts +0 -3
- package/dist/features/format/inlineCode/markdownTransformers.d.ts.map +0 -1
- package/dist/features/format/inlineCode/markdownTransformers.js +0 -6
- package/dist/features/format/inlineCode/markdownTransformers.js.map +0 -1
- package/dist/features/format/italic/markdownTransformers.d.ts +0 -4
- package/dist/features/format/italic/markdownTransformers.d.ts.map +0 -1
- package/dist/features/format/italic/markdownTransformers.js +0 -12
- package/dist/features/format/italic/markdownTransformers.js.map +0 -1
- package/dist/features/format/strikethrough/markdownTransformers.d.ts +0 -3
- package/dist/features/format/strikethrough/markdownTransformers.d.ts.map +0 -1
- package/dist/features/format/strikethrough/markdownTransformers.js +0 -6
- package/dist/features/format/strikethrough/markdownTransformers.js.map +0 -1
- package/dist/features/link/nodes/types.d.ts +0 -27
- package/dist/features/link/nodes/types.d.ts.map +0 -1
- package/dist/features/link/nodes/types.js +0 -2
- package/dist/features/link/nodes/types.js.map +0 -1
- package/dist/features/lists/checklist/markdownTransformers.d.ts +0 -3
- package/dist/features/lists/checklist/markdownTransformers.d.ts.map +0 -1
- package/dist/features/lists/checklist/markdownTransformers.js +0 -12
- package/dist/features/lists/checklist/markdownTransformers.js.map +0 -1
- package/dist/features/lists/orderedList/markdownTransformer.d.ts +0 -3
- package/dist/features/lists/orderedList/markdownTransformer.d.ts.map +0 -1
- package/dist/features/lists/orderedList/markdownTransformer.js +0 -12
- package/dist/features/lists/orderedList/markdownTransformer.js.map +0 -1
- package/dist/features/lists/shared/markdown.d.ts +0 -6
- package/dist/features/lists/shared/markdown.d.ts.map +0 -1
- package/dist/features/lists/shared/markdown.js +0 -57
- package/dist/features/lists/shared/markdown.js.map +0 -1
- package/dist/features/lists/unorderedList/markdownTransformer.d.ts +0 -3
- package/dist/features/lists/unorderedList/markdownTransformer.d.ts.map +0 -1
- package/dist/features/lists/unorderedList/markdownTransformer.js +0 -12
- package/dist/features/lists/unorderedList/markdownTransformer.js.map +0 -1
- package/dist/lexical/utils/guard.d.ts +0 -5
- package/dist/lexical/utils/guard.d.ts.map +0 -1
- package/dist/lexical/utils/guard.js +0 -9
- package/dist/lexical/utils/guard.js.map +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts +0 -2
- package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts.map +0 -1
- package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js +0 -2
- package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js.map +0 -1
- package/dist/nodeTypes.d.ts +0 -74
- package/dist/nodeTypes.d.ts.map +0 -1
- package/dist/nodeTypes.js +0 -5
- package/dist/nodeTypes.js.map +0 -1
- package/dist/packages/@lexical/markdown/MarkdownExport.d.ts +0 -14
- package/dist/packages/@lexical/markdown/MarkdownExport.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/MarkdownExport.js +0 -213
- package/dist/packages/@lexical/markdown/MarkdownExport.js.map +0 -1
- package/dist/packages/@lexical/markdown/MarkdownImport.d.ts +0 -19
- package/dist/packages/@lexical/markdown/MarkdownImport.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/MarkdownImport.js +0 -198
- package/dist/packages/@lexical/markdown/MarkdownImport.js.map +0 -1
- package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts +0 -11
- package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/MarkdownShortcuts.js +0 -304
- package/dist/packages/@lexical/markdown/MarkdownShortcuts.js.map +0 -1
- package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts +0 -147
- package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/MarkdownTransformers.js +0 -268
- package/dist/packages/@lexical/markdown/MarkdownTransformers.js.map +0 -1
- package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts +0 -22
- package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/importTextFormatTransformer.js +0 -91
- package/dist/packages/@lexical/markdown/importTextFormatTransformer.js.map +0 -1
- package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts +0 -21
- package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/importTextMatchTransformer.js +0 -54
- package/dist/packages/@lexical/markdown/importTextMatchTransformer.js.map +0 -1
- package/dist/packages/@lexical/markdown/importTextTransformers.d.ts +0 -18
- package/dist/packages/@lexical/markdown/importTextTransformers.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/importTextTransformers.js +0 -54
- package/dist/packages/@lexical/markdown/importTextTransformers.js.map +0 -1
- package/dist/packages/@lexical/markdown/index.d.ts +0 -29
- package/dist/packages/@lexical/markdown/index.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/index.js +0 -39
- package/dist/packages/@lexical/markdown/index.js.map +0 -1
- package/dist/packages/@lexical/markdown/utils.d.ts +0 -34
- package/dist/packages/@lexical/markdown/utils.d.ts.map +0 -1
- package/dist/packages/@lexical/markdown/utils.js +0 -267
- package/dist/packages/@lexical/markdown/utils.js.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
- /package/dist/exports/client/{componentInline-PM4PLNUK.js.map → componentInline-H24N7GUG.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdownTransformer.js","names":["$createTableCellNode","$createTableNode","$createTableRowNode","$isTableCellNode","$isTableNode","$isTableRowNode","TableCellHeaderStates","TableCellNode","TableNode","TableRowNode","$isParagraphNode","$isTextNode","$convertFromMarkdownString","$convertToMarkdownString","TABLE_ROW_REG_EXP","TABLE_ROW_DIVIDER_REG_EXP","TableMarkdownTransformer","allTransformers","type","dependencies","export","node","output","row","getChildren","rowOutput","isHeaderRow","cell","push","replace","trim","__headerState","ROW","join","map","_","regExp","parentNode","_1","match","match0","test","table","getPreviousSibling","rows","lastRow","length","forEach","setHeaderStyles","remove","matchCells","mapToTableCells","sibling","maxCells","getChildrenSize","firstChild","getFirstChild","cells","getTextContent","Math","max","unshift","previousSibling","tableRow","append","i","$createTableCell","getTableColumnsSize","selectEnd","textContent","NO_STATUS","split","text"],"sources":["../../../src/features/experimental_table/markdownTransformer.ts"],"sourcesContent":["import type { LexicalNode } from 'lexical'\n\nimport {\n $createTableCellNode,\n $createTableNode,\n $createTableRowNode,\n $isTableCellNode,\n $isTableNode,\n $isTableRowNode,\n TableCellHeaderStates,\n TableCellNode,\n TableNode,\n TableRowNode,\n} from '@lexical/table'\nimport { $isParagraphNode, $isTextNode } from 'lexical'\n\nimport {\n $convertFromMarkdownString,\n $convertToMarkdownString,\n type ElementTransformer,\n type Transformer,\n} from '../../packages/@lexical/markdown/index.js'\n\n// Very primitive table setup\nconst TABLE_ROW_REG_EXP = /^\\|(.+)\\|\\s?$/\n// eslint-disable-next-line regexp/no-unused-capturing-group\nconst TABLE_ROW_DIVIDER_REG_EXP = /^(\\| ?:?-*:? ?)+\\|\\s?$/\n\nexport const TableMarkdownTransformer: (props: {\n allTransformers: Transformer[]\n}) => ElementTransformer = ({ allTransformers }) => ({\n type: 'element',\n dependencies: [TableNode, TableRowNode, TableCellNode],\n export: (node: LexicalNode) => {\n if (!$isTableNode(node)) {\n return null\n }\n\n const output: string[] = []\n\n for (const row of node.getChildren()) {\n const rowOutput: string[] = []\n if (!$isTableRowNode(row)) {\n continue\n }\n\n let isHeaderRow = false\n for (const cell of row.getChildren()) {\n // It's TableCellNode, so it's just to make flow happy\n if ($isTableCellNode(cell)) {\n rowOutput.push(\n $convertToMarkdownString(allTransformers, cell).replace(/\\n/g, '\\\\n').trim(),\n )\n\n if (cell.__headerState === TableCellHeaderStates.ROW) {\n isHeaderRow = true\n }\n }\n }\n\n output.push(`| ${rowOutput.join(' | ')} |`)\n if (isHeaderRow) {\n output.push(`| ${rowOutput.map((_) => '---').join(' | ')} |`)\n }\n }\n\n return output.join('\\n')\n },\n regExp: TABLE_ROW_REG_EXP,\n replace: (parentNode, _1, match) => {\n const match0 = match[0]\n if (!match0) {\n return\n }\n // Header row\n if (TABLE_ROW_DIVIDER_REG_EXP.test(match0)) {\n const table = parentNode.getPreviousSibling()\n if (!table || !$isTableNode(table)) {\n return\n }\n\n const rows = table.getChildren()\n const lastRow = rows[rows.length - 1]\n if (!lastRow || !$isTableRowNode(lastRow)) {\n return\n }\n\n // Add header state to row cells\n lastRow.getChildren().forEach((cell) => {\n if (!$isTableCellNode(cell)) {\n return\n }\n cell.setHeaderStyles(TableCellHeaderStates.ROW, TableCellHeaderStates.ROW)\n })\n\n // Remove line\n parentNode.remove()\n return\n }\n\n const matchCells = mapToTableCells(match0, allTransformers)\n\n if (matchCells == null) {\n return\n }\n\n const rows = [matchCells]\n let sibling = parentNode.getPreviousSibling()\n let maxCells = matchCells.length\n\n while (sibling) {\n if (!$isParagraphNode(sibling)) {\n break\n }\n\n if (sibling.getChildrenSize() !== 1) {\n break\n }\n\n const firstChild = sibling.getFirstChild()\n\n if (!$isTextNode(firstChild)) {\n break\n }\n\n const cells = mapToTableCells(firstChild.getTextContent(), allTransformers)\n\n if (cells == null) {\n break\n }\n\n maxCells = Math.max(maxCells, cells.length)\n rows.unshift(cells)\n const previousSibling = sibling.getPreviousSibling()\n sibling.remove()\n sibling = previousSibling\n }\n\n const table = $createTableNode()\n\n for (const cells of rows) {\n const tableRow = $createTableRowNode()\n table.append(tableRow)\n\n for (let i = 0; i < maxCells; i++) {\n tableRow.append(i < cells.length ? cells[i]! : $createTableCell('', allTransformers))\n }\n }\n\n const previousSibling = parentNode.getPreviousSibling()\n if ($isTableNode(previousSibling) && getTableColumnsSize(previousSibling) === maxCells) {\n previousSibling.append(...table.getChildren())\n parentNode.remove()\n } else {\n parentNode.replace(table)\n }\n\n table.selectEnd()\n },\n})\n\nfunction getTableColumnsSize(table: TableNode) {\n const row = table.getFirstChild()\n return $isTableRowNode(row) ? row.getChildrenSize() : 0\n}\n\nconst $createTableCell = (textContent: string, allTransformers: Transformer[]): TableCellNode => {\n textContent = textContent.replace(/\\\\n/g, '\\n')\n const cell = $createTableCellNode(TableCellHeaderStates.NO_STATUS)\n $convertFromMarkdownString(textContent, allTransformers, cell)\n return cell\n}\n\nconst mapToTableCells = (\n textContent: string,\n allTransformers: Transformer[],\n): Array<TableCellNode> | null => {\n const match = textContent.match(TABLE_ROW_REG_EXP)\n if (!match || !match[1]) {\n return null\n }\n return match[1].split('|').map((text) => $createTableCell(text, allTransformers))\n}\n"],"mappings":"AAEA,SACEA,oBAAoB,EACpBC,gBAAgB,EAChBC,mBAAmB,EACnBC,gBAAgB,EAChBC,YAAY,EACZC,eAAe,EACfC,qBAAq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eAAe,KAAK;AACxD;AAEA,MAAMY,gBAAA,GAAmBA,CAACG,WAAA,EAAqBpD,eAAA;EAC7CoD,WAAA,GAAcA,WAAA,CAAYxC,OAAO,CAAC,QAAQ;EAC1C,MAAMF,IAAA,GAAO3B,oBAAA,CAAqBM,qBAAA,CAAsBgE,SAAS;EACjE1D,0BAAA,CAA2ByD,WAAA,EAAapD,eAAA,EAAiBU,IAAA;EACzD,OAAOA,IAAA;AACT;AAEA,MAAMwB,eAAA,GAAkBA,CACtBkB,WAAA,EACApD,eAAA;EAEA,MAAMsB,KAAA,GAAQ8B,WAAA,CAAY9B,KAAK,CAACzB,iBAAA;EAChC,IAAI,CAACyB,KAAA,IAAS,CAACA,KAAK,CAAC,EAAE,EAAE;IACvB,OAAO;EACT;EACA,OAAOA,KAAK,CAAC,EAAE,CAACgC,KAAK,CAAC,KAAKrC,GAAG,CAAEsC,IAAA,IAASN,gBAAA,CAAiBM,IAAA,EAAMvD,eAAA;AAClE","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"markdownTransformer.js","names":["$convertToMarkdownString","$createTableCellNode","$createTableNode","$createTableRowNode","$isTableCellNode","$isTableNode","$isTableRowNode","TableCellHeaderStates","TableCellNode","TableNode","TableRowNode","$isParagraphNode","$isTextNode","$convertFromMarkdownString","TABLE_ROW_REG_EXP","TABLE_ROW_DIVIDER_REG_EXP","PAYLOAD_TABLE","allTransformers","type","dependencies","export","node","output","row","getChildren","rowOutput","isHeaderRow","cell","push","replace","trim","__headerState","ROW","join","map","_","regExp","parentNode","_1","match","match0","test","table","getPreviousSibling","rows","lastRow","length","forEach","setHeaderStyles","remove","matchCells","mapToTableCells","sibling","maxCells","getChildrenSize","firstChild","getFirstChild","cells","getTextContent","Math","max","unshift","previousSibling","tableRow","append","i","$createTableCell","getTableColumnsSize","selectEnd","textContent","NO_STATUS","split","text"],"sources":["../../../src/features/experimental_table/markdownTransformer.ts"],"sourcesContent":["import type { LexicalNode } from 'lexical'\n\nimport {\n $convertToMarkdownString,\n type ElementTransformer,\n type Transformer,\n} from '@lexical/markdown'\nimport {\n $createTableCellNode,\n $createTableNode,\n $createTableRowNode,\n $isTableCellNode,\n $isTableNode,\n $isTableRowNode,\n TableCellHeaderStates,\n TableCellNode,\n TableNode,\n TableRowNode,\n} from '@lexical/table'\nimport { $isParagraphNode, $isTextNode } from 'lexical'\n\nimport { $convertFromMarkdownString } from '../../lexical/utils/markdown/convertFromMarkdownString.js'\n\n// Very primitive table setup\nconst TABLE_ROW_REG_EXP = /^\\|(.+)\\|\\s?$/\n// eslint-disable-next-line regexp/no-unused-capturing-group\nconst TABLE_ROW_DIVIDER_REG_EXP = /^(\\| ?:?-*:? ?)+\\|\\s?$/\n\nexport const PAYLOAD_TABLE: (props: { allTransformers: Transformer[] }) => ElementTransformer = ({\n allTransformers,\n}) => ({\n type: 'element',\n dependencies: [TableNode, TableRowNode, TableCellNode],\n export: (node: LexicalNode) => {\n if (!$isTableNode(node)) {\n return null\n }\n\n const output: string[] = []\n\n for (const row of node.getChildren()) {\n const rowOutput: string[] = []\n if (!$isTableRowNode(row)) {\n continue\n }\n\n let isHeaderRow = false\n for (const cell of row.getChildren()) {\n // It's TableCellNode, so it's just to make flow happy\n if ($isTableCellNode(cell)) {\n rowOutput.push(\n $convertToMarkdownString(allTransformers, cell).replace(/\\n/g, '\\\\n').trim(),\n )\n\n if (cell.__headerState === TableCellHeaderStates.ROW) {\n isHeaderRow = true\n }\n }\n }\n\n output.push(`| ${rowOutput.join(' | ')} |`)\n if (isHeaderRow) {\n output.push(`| ${rowOutput.map((_) => '---').join(' | ')} |`)\n }\n }\n\n return output.join('\\n')\n },\n regExp: TABLE_ROW_REG_EXP,\n replace: (parentNode, _1, match) => {\n const match0 = match[0]\n if (!match0) {\n return\n }\n // Header row\n if (TABLE_ROW_DIVIDER_REG_EXP.test(match0)) {\n const table = parentNode.getPreviousSibling()\n if (!table || !$isTableNode(table)) {\n return\n }\n\n const rows = table.getChildren()\n const lastRow = rows[rows.length - 1]\n if (!lastRow || !$isTableRowNode(lastRow)) {\n return\n }\n\n // Add header state to row cells\n lastRow.getChildren().forEach((cell) => {\n if (!$isTableCellNode(cell)) {\n return\n }\n cell.setHeaderStyles(TableCellHeaderStates.ROW, TableCellHeaderStates.ROW)\n })\n\n // Remove line\n parentNode.remove()\n return\n }\n\n const matchCells = mapToTableCells(match0, allTransformers)\n\n if (matchCells == null) {\n return\n }\n\n const rows = [matchCells]\n let sibling = parentNode.getPreviousSibling()\n let maxCells = matchCells.length\n\n while (sibling) {\n if (!$isParagraphNode(sibling)) {\n break\n }\n\n if (sibling.getChildrenSize() !== 1) {\n break\n }\n\n const firstChild = sibling.getFirstChild()\n\n if (!$isTextNode(firstChild)) {\n break\n }\n\n const cells = mapToTableCells(firstChild.getTextContent(), allTransformers)\n\n if (cells == null) {\n break\n }\n\n maxCells = Math.max(maxCells, cells.length)\n rows.unshift(cells)\n const previousSibling = sibling.getPreviousSibling()\n sibling.remove()\n sibling = previousSibling\n }\n\n const table = $createTableNode()\n\n for (const cells of rows) {\n const tableRow = $createTableRowNode()\n table.append(tableRow)\n\n for (let i = 0; i < maxCells; i++) {\n tableRow.append(i < cells.length ? cells[i]! : $createTableCell('', allTransformers))\n }\n }\n\n const previousSibling = parentNode.getPreviousSibling()\n if ($isTableNode(previousSibling) && getTableColumnsSize(previousSibling) === maxCells) {\n previousSibling.append(...table.getChildren())\n parentNode.remove()\n } else {\n parentNode.replace(table)\n }\n\n table.selectEnd()\n },\n})\n\nfunction getTableColumnsSize(table: TableNode) {\n const row = table.getFirstChild()\n return $isTableRowNode(row) ? row.getChildrenSize() : 0\n}\n\nconst $createTableCell = (textContent: string, allTransformers: Transformer[]): TableCellNode => {\n textContent = textContent.replace(/\\\\n/g, '\\n')\n const cell = $createTableCellNode(TableCellHeaderStates.NO_STATUS)\n // shouldMergeAdjacentLines is true to preserve how cell content was parsed\n // before the exported $convertFromMarkdownString default changed to false.\n $convertFromMarkdownString(textContent, allTransformers, cell, false, true)\n return cell\n}\n\nconst mapToTableCells = (\n textContent: string,\n allTransformers: Transformer[],\n): Array<TableCellNode> | null => {\n const match = textContent.match(TABLE_ROW_REG_EXP)\n if (!match || !match[1]) {\n return null\n }\n return match[1].split('|').map((text) => $createTableCell(text, allTransformers))\n}\n"],"mappings":"AAEA,SACEA,wBAAwB,QAGnB;AACP,SACEC,oBAAoB,EACpBC,gBAAgB,EAChBC,mBAAmB,EACnBC,gBAAgB,EAChBC,YAAY,EACZC,eAAe,EACfC,qBAAqB,EACrBC,aAAa,EACbC,SAAS,EACTC,YAAY,QACP;AACP,SAASC,gBAAgB,EAAEC,WAAW,QAAQ;AAE9C,SAASC,0BAA0B,QAAQ;AAE3C;AACA,MAAMC,iBAAA,GAAoB;AAC1B;AACA,MAAMC,yBAAA,GAA4B;AAElC,OAAO,MAAMC,aAAA,GAAmFA,CAAC;EAC/FC;AAAe,CAChB,MAAM;EACLC,IAAA,EAAM;EACNC,YAAA,EAAc,CAACV,SAAA,EAAWC,YAAA,EAAcF,aAAA,CAAc;EACtDY,MAAA,EAASC,IAAA;IACP,IAAI,CAAChB,YAAA,CAAagB,IAAA,GAAO;MACvB,OAAO;IACT;IAEA,MAAMC,MAAA,GAAmB,EAAE;IAE3B,KAAK,MAAMC,GAAA,IAAOF,IAAA,CAAKG,WAAW,IAAI;MACpC,MAAMC,SAAA,GAAsB,EAAE;MAC9B,IAAI,CAACnB,eAAA,CAAgBiB,GAAA,GAAM;QACzB;MACF;MAEA,IAAIG,WAAA,GAAc;MAClB,KAAK,MAAMC,IAAA,IAAQJ,GAAA,CAAIC,WAAW,IAAI;QACpC;QACA,IAAIpB,gBAAA,CAAiBuB,IAAA,GAAO;UAC1BF,SAAA,CAAUG,IAAI,CACZ5B,wBAAA,CAAyBiB,eAAA,EAAiBU,IAAA,EAAME,OAAO,CAAC,OAAO,OAAOC,IAAI;UAG5E,IAAIH,IAAA,CAAKI,aAAa,KAAKxB,qBAAA,CAAsByB,GAAG,EAAE;YACpD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,MAAM,IAAItB,KAAA,CAAMlB,WAAW;MAC3Ca,UAAA,CAAWY,MAAM;IACnB,OAAO;MACLZ,UAAA,CAAWR,OAAO,CAACa,KAAA;IACrB;IAEAA,KAAA,CAAM0B,SAAS;EACjB;AACF;AAEA,SAASD,oBAAoBzB,KAAgB;EAC3C,MAAMnB,GAAA,GAAMmB,KAAA,CAAMc,aAAa;EAC/B,OAAOlD,eAAA,CAAgBiB,GAAA,IAAOA,GAAA,CAAI+B,eAAe,KAAK;AACxD;AAEA,MAAMY,gBAAA,GAAmBA,CAACG,WAAA,EAAqBpD,eAAA;EAC7CoD,WAAA,GAAcA,WAAA,CAAYxC,OAAO,CAAC,QAAQ;EAC1C,MAAMF,IAAA,GAAO1B,oBAAA,CAAqBM,qBAAA,CAAsB+D,SAAS;EACjE;EACA;EACAzD,0BAAA,CAA2BwD,WAAA,EAAapD,eAAA,EAAiBU,IAAA,EAAM,OAAO;EACtE,OAAOA,IAAA;AACT;AAEA,MAAMwB,eAAA,GAAkBA,CACtBkB,WAAA,EACApD,eAAA;EAEA,MAAMsB,KAAA,GAAQ8B,WAAA,CAAY9B,KAAK,CAACzB,iBAAA;EAChC,IAAI,CAACyB,KAAA,IAAS,CAACA,KAAK,CAAC,EAAE,EAAE;IACvB,OAAO;EACT;EACA,OAAOA,KAAK,CAAC,EAAE,CAACgC,KAAK,CAAC,KAAKrC,GAAG,CAAEsC,IAAA,IAASN,gBAAA,CAAiBM,IAAA,EAAMvD,eAAA;AAClE","ignoreList":[]}
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import type { SerializedLexicalNode } from 'lexical';
|
|
3
|
-
import type { StronglyTypedElementNode } from '../../../nodeTypes.js';
|
|
4
|
-
export type SerializedTableCellNode<T extends SerializedLexicalNode = SerializedLexicalNode> = StronglyTypedElementNode<_SerializedTableCellNode, 'tablecell', T>;
|
|
5
|
-
export type SerializedTableNode<T extends SerializedLexicalNode = SerializedLexicalNode> = StronglyTypedElementNode<_SerializedTableNode, 'table', T>;
|
|
6
|
-
export type SerializedTableRowNode<T extends SerializedLexicalNode = SerializedLexicalNode> = StronglyTypedElementNode<_SerializedTableRowNode, 'tablerow', T>;
|
|
1
|
+
export type { SerializedTableCellNode, SerializedTableNode, SerializedTableRowNode, } from './schema.js';
|
|
7
2
|
export declare const EXPERIMENTAL_TableFeature: import("../../typesServer.js").FeatureProviderProviderServer<undefined, undefined, undefined>;
|
|
8
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/experimental_table/server/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/experimental_table/server/index.ts"],"names":[],"mappings":"AAUA,YAAY,EACV,uBAAuB,EACvB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,aAAa,CAAA;AAiBpB,eAAO,MAAM,yBAAyB,+FAwCpC,CAAA"}
|
|
@@ -2,7 +2,8 @@ import { TableCellNode, TableNode, TableRowNode } from '@lexical/table';
|
|
|
2
2
|
import { sanitizeFields } from 'payload';
|
|
3
3
|
import { createServerFeature } from '../../../utilities/createServerFeature.js';
|
|
4
4
|
import { createNode } from '../../typeUtilities.js';
|
|
5
|
-
import {
|
|
5
|
+
import { PAYLOAD_TABLE } from '../markdownTransformer.js';
|
|
6
|
+
import { tableCellNodeJSONSchema, tableNodeJSONSchema, tableRowNodeJSONSchema } from './schema.js';
|
|
6
7
|
const fields = [{
|
|
7
8
|
name: 'rows',
|
|
8
9
|
type: 'number',
|
|
@@ -37,12 +38,15 @@ export const EXPERIMENTAL_TableFeature = createServerFeature({
|
|
|
37
38
|
});
|
|
38
39
|
return schemaMap;
|
|
39
40
|
},
|
|
40
|
-
markdownTransformers: [
|
|
41
|
+
markdownTransformers: [PAYLOAD_TABLE],
|
|
41
42
|
nodes: [createNode({
|
|
43
|
+
jsonSchema: tableNodeJSONSchema,
|
|
42
44
|
node: TableNode
|
|
43
45
|
}), createNode({
|
|
46
|
+
jsonSchema: tableCellNodeJSONSchema,
|
|
44
47
|
node: TableCellNode
|
|
45
48
|
}), createNode({
|
|
49
|
+
jsonSchema: tableRowNodeJSONSchema,
|
|
46
50
|
node: TableRowNode
|
|
47
51
|
})]
|
|
48
52
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["TableCellNode","TableNode","TableRowNode","sanitizeFields","createServerFeature","createNode","
|
|
1
|
+
{"version":3,"file":"index.js","names":["TableCellNode","TableNode","TableRowNode","sanitizeFields","createServerFeature","createNode","PAYLOAD_TABLE","tableCellNodeJSONSchema","tableNodeJSONSchema","tableRowNodeJSONSchema","fields","name","type","defaultValue","required","EXPERIMENTAL_TableFeature","feature","config","isRoot","parentIsLocalized","validRelationships","collections","map","c","slug","sanitizedFields","requireFieldLevelRichTextEditor","ClientFeature","generateSchemaMap","schemaMap","Map","set","markdownTransformers","nodes","jsonSchema","node","key"],"sources":["../../../../src/features/experimental_table/server/index.ts"],"sourcesContent":["import type { Config, Field, FieldSchemaMap } from 'payload'\n\nimport { TableCellNode, TableNode, TableRowNode } from '@lexical/table'\nimport { sanitizeFields } from 'payload'\n\nimport { createServerFeature } from '../../../utilities/createServerFeature.js'\nimport { createNode } from '../../typeUtilities.js'\nimport { PAYLOAD_TABLE } from '../markdownTransformer.js'\nimport { tableCellNodeJSONSchema, tableNodeJSONSchema, tableRowNodeJSONSchema } from './schema.js'\n\nexport type {\n SerializedTableCellNode,\n SerializedTableNode,\n SerializedTableRowNode,\n} from './schema.js'\n\nconst fields: Field[] = [\n {\n name: 'rows',\n type: 'number',\n defaultValue: 5,\n required: true,\n },\n {\n name: 'columns',\n type: 'number',\n defaultValue: 5,\n required: true,\n },\n]\n\nexport const EXPERIMENTAL_TableFeature = createServerFeature({\n feature: async ({ config, isRoot, parentIsLocalized }) => {\n const validRelationships = config.collections.map((c) => c.slug) || []\n\n const sanitizedFields = await sanitizeFields({\n config: config as unknown as Config,\n fields,\n parentIsLocalized,\n requireFieldLevelRichTextEditor: isRoot,\n validRelationships,\n })\n return {\n ClientFeature: '@payloadcms/richtext-lexical/client#TableFeatureClient',\n generateSchemaMap: () => {\n const schemaMap: FieldSchemaMap = new Map()\n\n schemaMap.set('fields', {\n fields: sanitizedFields,\n })\n\n return schemaMap\n },\n markdownTransformers: [PAYLOAD_TABLE],\n nodes: [\n createNode({\n jsonSchema: tableNodeJSONSchema,\n node: TableNode,\n }),\n createNode({\n jsonSchema: tableCellNodeJSONSchema,\n node: TableCellNode,\n }),\n createNode({\n jsonSchema: tableRowNodeJSONSchema,\n node: TableRowNode,\n }),\n ],\n }\n },\n key: 'experimental_table',\n})\n"],"mappings":"AAEA,SAASA,aAAa,EAAEC,SAAS,EAAEC,YAAY,QAAQ;AACvD,SAASC,cAAc,QAAQ;AAE/B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,UAAU,QAAQ;AAC3B,SAASC,aAAa,QAAQ;AAC9B,SAASC,uBAAuB,EAAEC,mBAAmB,EAAEC,sBAAsB,QAAQ;AAQrF,MAAMC,MAAA,GAAkB,CACtB;EACEC,IAAA,EAAM;EACNC,IAAA,EAAM;EACNC,YAAA,EAAc;EACdC,QAAA,EAAU;AACZ,GACA;EACEH,IAAA,EAAM;EACNC,IAAA,EAAM;EACNC,YAAA,EAAc;EACdC,QAAA,EAAU;AACZ,EACD;AAED,OAAO,MAAMC,yBAAA,GAA4BX,mBAAA,CAAoB;EAC3DY,OAAA,EAAS,MAAAA,CAAO;IAAEC,MAAM;IAAEC,MAAM;IAAEC;EAAiB,CAAE;IACnD,MAAMC,kBAAA,GAAqBH,MAAA,CAAOI,WAAW,CAACC,GAAG,CAAEC,CAAA,IAAMA,CAAA,CAAEC,IAAI,KAAK,EAAE;IAEtE,MAAMC,eAAA,GAAkB,MAAMtB,cAAA,CAAe;MAC3Cc,MAAA,EAAQA,MAAA;MACRP,MAAA;MACAS,iBAAA;MACAO,+BAAA,EAAiCR,MAAA;MACjCE;IACF;IACA,OAAO;MACLO,aAAA,EAAe;MACfC,iBAAA,EAAmBA,CAAA;QACjB,MAAMC,SAAA,GAA4B,IAAIC,GAAA;QAEtCD,SAAA,CAAUE,GAAG,CAAC,UAAU;UACtBrB,MAAA,EAAQe;QACV;QAEA,OAAOI,SAAA;MACT;MACAG,oBAAA,EAAsB,CAAC1B,aAAA,CAAc;MACrC2B,KAAA,EAAO,CACL5B,UAAA,CAAW;QACT6B,UAAA,EAAY1B,mBAAA;QACZ2B,IAAA,EAAMlC;MACR,IACAI,UAAA,CAAW;QACT6B,UAAA,EAAY3B,uBAAA;QACZ4B,IAAA,EAAMnC;MACR,IACAK,UAAA,CAAW;QACT6B,UAAA,EAAYzB,sBAAA;QACZ0B,IAAA,EAAMjC;MACR;IAEJ;EACF;EACAkC,GAAA,EAAK;AACP","ignoreList":[]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { SerializedLexicalNode } from 'lexical';
|
|
2
|
+
import type { SerializedLexicalElementBase } from '../../../types/nodeTypes.js';
|
|
3
|
+
import type { JSONSchemaFn } from '../../typesServer.js';
|
|
4
|
+
export interface SerializedTableCellNode<TChildren extends SerializedLexicalNode = SerializedLexicalNode> extends SerializedLexicalElementBase<TChildren> {
|
|
5
|
+
backgroundColor?: null | string;
|
|
6
|
+
colSpan?: number;
|
|
7
|
+
headerState: number;
|
|
8
|
+
rowSpan?: number;
|
|
9
|
+
type: 'tablecell';
|
|
10
|
+
verticalAlign?: string;
|
|
11
|
+
width?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface SerializedTableNode<TChildren extends SerializedLexicalNode = SerializedLexicalNode> extends SerializedLexicalElementBase<TChildren> {
|
|
14
|
+
colWidths?: number[];
|
|
15
|
+
frozenColumnCount?: number;
|
|
16
|
+
frozenRowCount?: number;
|
|
17
|
+
rowStriping?: boolean;
|
|
18
|
+
type: 'table';
|
|
19
|
+
}
|
|
20
|
+
export interface SerializedTableRowNode<TChildren extends SerializedLexicalNode = SerializedLexicalNode> extends SerializedLexicalElementBase<TChildren> {
|
|
21
|
+
height?: number;
|
|
22
|
+
type: 'tablerow';
|
|
23
|
+
}
|
|
24
|
+
export declare const tableNodeJSONSchema: JSONSchemaFn;
|
|
25
|
+
export declare const tableCellNodeJSONSchema: JSONSchemaFn;
|
|
26
|
+
export declare const tableRowNodeJSONSchema: JSONSchemaFn;
|
|
27
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/features/experimental_table/server/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAEpD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAExD,MAAM,WAAW,uBAAuB,CACtC,SAAS,SAAS,qBAAqB,GAAG,qBAAqB,CAC/D,SAAQ,4BAA4B,CAAC,SAAS,CAAC;IAC/C,eAAe,CAAC,EAAE,IAAI,GAAG,MAAM,CAAA;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,WAAW,CAAA;IACjB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,mBAAmB,CAClC,SAAS,SAAS,qBAAqB,GAAG,qBAAqB,CAC/D,SAAQ,4BAA4B,CAAC,SAAS,CAAC;IAC/C,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,IAAI,EAAE,OAAO,CAAA;CACd;AAED,MAAM,WAAW,sBAAsB,CACrC,SAAS,SAAS,qBAAqB,GAAG,qBAAqB,CAC/D,SAAQ,4BAA4B,CAAC,SAAS,CAAC;IAC/C,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,UAAU,CAAA;CACjB;AA2BD,eAAO,MAAM,mBAAmB,EAAE,YAgBjC,CAAA;AAED,eAAO,MAAM,uBAAuB,EAAE,YAuBrC,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAE,YAWpC,CAAA"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MUST stay byte-for-byte in sync with the runtime `SerializedTableNode`,
|
|
3
|
+
* `SerializedTableRowNode`, and `SerializedTableCellNode` declared above.
|
|
4
|
+
*/const TABLE_NODES_TS = `export interface SerializedTableNode<TChildren> extends SerializedLexicalElementBase<TChildren> {
|
|
5
|
+
type: 'table';
|
|
6
|
+
colWidths?: number[];
|
|
7
|
+
frozenColumnCount?: number;
|
|
8
|
+
frozenRowCount?: number;
|
|
9
|
+
rowStriping?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface SerializedTableRowNode<TChildren> extends SerializedLexicalElementBase<TChildren> {
|
|
12
|
+
type: 'tablerow';
|
|
13
|
+
height?: number;
|
|
14
|
+
}
|
|
15
|
+
export interface SerializedTableCellNode<TChildren> extends SerializedLexicalElementBase<TChildren> {
|
|
16
|
+
type: 'tablecell';
|
|
17
|
+
backgroundColor?: string | null;
|
|
18
|
+
colSpan?: number;
|
|
19
|
+
headerState: number;
|
|
20
|
+
rowSpan?: number;
|
|
21
|
+
verticalAlign?: string;
|
|
22
|
+
width?: number;
|
|
23
|
+
}`;
|
|
24
|
+
export const tableNodeJSONSchema = ({
|
|
25
|
+
elementNodeSchema,
|
|
26
|
+
nodeUnionName,
|
|
27
|
+
typeStringDefinitions
|
|
28
|
+
}) => {
|
|
29
|
+
typeStringDefinitions.add(TABLE_NODES_TS);
|
|
30
|
+
return elementNodeSchema({
|
|
31
|
+
nodeType: 'table',
|
|
32
|
+
properties: {
|
|
33
|
+
colWidths: {
|
|
34
|
+
type: 'array',
|
|
35
|
+
items: {
|
|
36
|
+
type: 'number'
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
frozenColumnCount: {
|
|
40
|
+
type: 'integer'
|
|
41
|
+
},
|
|
42
|
+
frozenRowCount: {
|
|
43
|
+
type: 'integer'
|
|
44
|
+
},
|
|
45
|
+
rowStriping: {
|
|
46
|
+
type: 'boolean'
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
tsType: `SerializedTableNode<${nodeUnionName}>`
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
export const tableCellNodeJSONSchema = ({
|
|
53
|
+
elementNodeSchema,
|
|
54
|
+
nodeUnionName,
|
|
55
|
+
typeStringDefinitions
|
|
56
|
+
}) => {
|
|
57
|
+
typeStringDefinitions.add(TABLE_NODES_TS);
|
|
58
|
+
return elementNodeSchema({
|
|
59
|
+
nodeType: 'tablecell',
|
|
60
|
+
properties: {
|
|
61
|
+
backgroundColor: {
|
|
62
|
+
oneOf: [{
|
|
63
|
+
type: 'string'
|
|
64
|
+
}, {
|
|
65
|
+
type: 'null'
|
|
66
|
+
}]
|
|
67
|
+
},
|
|
68
|
+
colSpan: {
|
|
69
|
+
type: 'integer',
|
|
70
|
+
description: 'How many columns this cell spans (default 1).'
|
|
71
|
+
},
|
|
72
|
+
headerState: {
|
|
73
|
+
type: 'integer',
|
|
74
|
+
description: 'Header bitmask: 0 = normal cell, 1 = row header, 2 = column header, 3 = both.'
|
|
75
|
+
},
|
|
76
|
+
rowSpan: {
|
|
77
|
+
type: 'integer',
|
|
78
|
+
description: 'How many rows this cell spans (default 1).'
|
|
79
|
+
},
|
|
80
|
+
verticalAlign: {
|
|
81
|
+
type: 'string'
|
|
82
|
+
},
|
|
83
|
+
width: {
|
|
84
|
+
type: 'integer'
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
required: ['headerState'],
|
|
88
|
+
tsType: `SerializedTableCellNode<${nodeUnionName}>`
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
export const tableRowNodeJSONSchema = ({
|
|
92
|
+
elementNodeSchema,
|
|
93
|
+
nodeUnionName,
|
|
94
|
+
typeStringDefinitions
|
|
95
|
+
}) => {
|
|
96
|
+
typeStringDefinitions.add(TABLE_NODES_TS);
|
|
97
|
+
return elementNodeSchema({
|
|
98
|
+
nodeType: 'tablerow',
|
|
99
|
+
properties: {
|
|
100
|
+
height: {
|
|
101
|
+
type: 'integer'
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
tsType: `SerializedTableRowNode<${nodeUnionName}>`
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","names":["TABLE_NODES_TS","tableNodeJSONSchema","elementNodeSchema","nodeUnionName","typeStringDefinitions","add","nodeType","properties","colWidths","type","items","frozenColumnCount","frozenRowCount","rowStriping","tsType","tableCellNodeJSONSchema","backgroundColor","oneOf","colSpan","description","headerState","rowSpan","verticalAlign","width","required","tableRowNodeJSONSchema","height"],"sources":["../../../../src/features/experimental_table/server/schema.ts"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\n\nimport type { SerializedLexicalElementBase } from '../../../types/nodeTypes.js'\nimport type { JSONSchemaFn } from '../../typesServer.js'\n\nexport interface SerializedTableCellNode<\n TChildren extends SerializedLexicalNode = SerializedLexicalNode,\n> extends SerializedLexicalElementBase<TChildren> {\n backgroundColor?: null | string\n colSpan?: number\n headerState: number\n rowSpan?: number\n type: 'tablecell'\n verticalAlign?: string\n width?: number\n}\n\nexport interface SerializedTableNode<\n TChildren extends SerializedLexicalNode = SerializedLexicalNode,\n> extends SerializedLexicalElementBase<TChildren> {\n colWidths?: number[]\n frozenColumnCount?: number\n frozenRowCount?: number\n rowStriping?: boolean\n type: 'table'\n}\n\nexport interface SerializedTableRowNode<\n TChildren extends SerializedLexicalNode = SerializedLexicalNode,\n> extends SerializedLexicalElementBase<TChildren> {\n height?: number\n type: 'tablerow'\n}\n\n/**\n * MUST stay byte-for-byte in sync with the runtime `SerializedTableNode`,\n * `SerializedTableRowNode`, and `SerializedTableCellNode` declared above.\n */\nconst TABLE_NODES_TS = `export interface SerializedTableNode<TChildren> extends SerializedLexicalElementBase<TChildren> {\n type: 'table';\n colWidths?: number[];\n frozenColumnCount?: number;\n frozenRowCount?: number;\n rowStriping?: boolean;\n}\nexport interface SerializedTableRowNode<TChildren> extends SerializedLexicalElementBase<TChildren> {\n type: 'tablerow';\n height?: number;\n}\nexport interface SerializedTableCellNode<TChildren> extends SerializedLexicalElementBase<TChildren> {\n type: 'tablecell';\n backgroundColor?: string | null;\n colSpan?: number;\n headerState: number;\n rowSpan?: number;\n verticalAlign?: string;\n width?: number;\n}`\n\nexport const tableNodeJSONSchema: JSONSchemaFn = ({\n elementNodeSchema,\n nodeUnionName,\n typeStringDefinitions,\n}) => {\n typeStringDefinitions.add(TABLE_NODES_TS)\n return elementNodeSchema({\n nodeType: 'table',\n properties: {\n colWidths: { type: 'array', items: { type: 'number' } },\n frozenColumnCount: { type: 'integer' },\n frozenRowCount: { type: 'integer' },\n rowStriping: { type: 'boolean' },\n },\n tsType: `SerializedTableNode<${nodeUnionName}>`,\n })\n}\n\nexport const tableCellNodeJSONSchema: JSONSchemaFn = ({\n elementNodeSchema,\n nodeUnionName,\n typeStringDefinitions,\n}) => {\n typeStringDefinitions.add(TABLE_NODES_TS)\n return elementNodeSchema({\n nodeType: 'tablecell',\n properties: {\n backgroundColor: { oneOf: [{ type: 'string' }, { type: 'null' }] },\n colSpan: { type: 'integer', description: 'How many columns this cell spans (default 1).' },\n headerState: {\n type: 'integer',\n description:\n 'Header bitmask: 0 = normal cell, 1 = row header, 2 = column header, 3 = both.',\n },\n rowSpan: { type: 'integer', description: 'How many rows this cell spans (default 1).' },\n verticalAlign: { type: 'string' },\n width: { type: 'integer' },\n },\n required: ['headerState'],\n tsType: `SerializedTableCellNode<${nodeUnionName}>`,\n })\n}\n\nexport const tableRowNodeJSONSchema: JSONSchemaFn = ({\n elementNodeSchema,\n nodeUnionName,\n typeStringDefinitions,\n}) => {\n typeStringDefinitions.add(TABLE_NODES_TS)\n return elementNodeSchema({\n nodeType: 'tablerow',\n properties: { height: { type: 'integer' } },\n tsType: `SerializedTableRowNode<${nodeUnionName}>`,\n })\n}\n"],"mappings":"AAkCA;;;GAIA,MAAMA,cAAA,GAAiB;;;;;;;;;;;;;;;;;;;EAmBrB;AAEF,OAAO,MAAMC,mBAAA,GAAoCA,CAAC;EAChDC,iBAAiB;EACjBC,aAAa;EACbC;AAAqB,CACtB;EACCA,qBAAA,CAAsBC,GAAG,CAACL,cAAA;EAC1B,OAAOE,iBAAA,CAAkB;IACvBI,QAAA,EAAU;IACVC,UAAA,EAAY;MACVC,SAAA,EAAW;QAAEC,IAAA,EAAM;QAASC,KAAA,EAAO;UAAED,IAAA,EAAM;QAAS;MAAE;MACtDE,iBAAA,EAAmB;QAAEF,IAAA,EAAM;MAAU;MACrCG,cAAA,EAAgB;QAAEH,IAAA,EAAM;MAAU;MAClCI,WAAA,EAAa;QAAEJ,IAAA,EAAM;MAAU;IACjC;IACAK,MAAA,EAAQ,uBAAuBX,aAAA;EACjC;AACF;AAEA,OAAO,MAAMY,uBAAA,GAAwCA,CAAC;EACpDb,iBAAiB;EACjBC,aAAa;EACbC;AAAqB,CACtB;EACCA,qBAAA,CAAsBC,GAAG,CAACL,cAAA;EAC1B,OAAOE,iBAAA,CAAkB;IACvBI,QAAA,EAAU;IACVC,UAAA,EAAY;MACVS,eAAA,EAAiB;QAAEC,KAAA,EAAO,CAAC;UAAER,IAAA,EAAM;QAAS,GAAG;UAAEA,IAAA,EAAM;QAAO;MAAG;MACjES,OAAA,EAAS;QAAET,IAAA,EAAM;QAAWU,WAAA,EAAa;MAAgD;MACzFC,WAAA,EAAa;QACXX,IAAA,EAAM;QACNU,WAAA,EACE;MACJ;MACAE,OAAA,EAAS;QAAEZ,IAAA,EAAM;QAAWU,WAAA,EAAa;MAA6C;MACtFG,aAAA,EAAe;QAAEb,IAAA,EAAM;MAAS;MAChCc,KAAA,EAAO;QAAEd,IAAA,EAAM;MAAU;IAC3B;IACAe,QAAA,EAAU,CAAC,cAAc;IACzBV,MAAA,EAAQ,2BAA2BX,aAAA;EACrC;AACF;AAEA,OAAO,MAAMsB,sBAAA,GAAuCA,CAAC;EACnDvB,iBAAiB;EACjBC,aAAa;EACbC;AAAqB,CACtB;EACCA,qBAAA,CAAsBC,GAAG,CAACL,cAAA;EAC1B,OAAOE,iBAAA,CAAkB;IACvBI,QAAA,EAAU;IACVC,UAAA,EAAY;MAAEmB,MAAA,EAAQ;QAAEjB,IAAA,EAAM;MAAU;IAAE;IAC1CK,MAAA,EAAQ,0BAA0BX,aAAA;EACpC;AACF","ignoreList":[]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
+
import { BOLD_ITALIC_STAR, BOLD_ITALIC_UNDERSCORE, BOLD_STAR, BOLD_UNDERSCORE } from '@lexical/markdown';
|
|
3
4
|
import { $isTableSelection } from '@lexical/table';
|
|
4
5
|
import { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical';
|
|
5
6
|
import { BoldIcon } from '../../../lexical/ui/icons/Bold/index.js';
|
|
6
7
|
import { createClientFeature } from '../../../utilities/createClientFeature.js';
|
|
7
8
|
import { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js';
|
|
8
|
-
import { BOLD_ITALIC_STAR, BOLD_ITALIC_UNDERSCORE, BOLD_STAR, BOLD_UNDERSCORE } from './markdownTransformers.js';
|
|
9
9
|
const toolbarGroups = [toolbarFormatGroupWithItems([{
|
|
10
10
|
ChildComponent: BoldIcon,
|
|
11
11
|
isActive: ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.client.js","names":["
|
|
1
|
+
{"version":3,"file":"feature.client.js","names":["BOLD_ITALIC_STAR","BOLD_ITALIC_UNDERSCORE","BOLD_STAR","BOLD_UNDERSCORE","$isTableSelection","$isRangeSelection","FORMAT_TEXT_COMMAND","BoldIcon","createClientFeature","toolbarFormatGroupWithItems","toolbarGroups","ChildComponent","isActive","selection","hasFormat","key","onSelect","editor","dispatchCommand","order","BoldFeatureClient","featureProviderMap","markdownTransformers","get","push","enableFormats","toolbarFixed","groups","toolbarInline"],"sources":["../../../../src/features/format/bold/feature.client.tsx"],"sourcesContent":["'use client'\nimport {\n BOLD_ITALIC_STAR,\n BOLD_ITALIC_UNDERSCORE,\n BOLD_STAR,\n BOLD_UNDERSCORE,\n} from '@lexical/markdown'\nimport { $isTableSelection } from '@lexical/table'\nimport { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\n\nimport { BoldIcon } from '../../../lexical/ui/icons/Bold/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarFormatGroupWithItems([\n {\n ChildComponent: BoldIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection) || $isTableSelection(selection)) {\n return selection.hasFormat('bold')\n }\n return false\n },\n key: 'bold',\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'bold')\n },\n order: 1,\n },\n ]),\n]\n\nexport const BoldFeatureClient = createClientFeature(({ featureProviderMap }) => {\n const markdownTransformers = [BOLD_STAR, BOLD_UNDERSCORE]\n if (featureProviderMap.get('italic')) {\n markdownTransformers.push(BOLD_ITALIC_UNDERSCORE, BOLD_ITALIC_STAR)\n }\n\n return {\n enableFormats: ['bold'],\n markdownTransformers,\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }\n})\n"],"mappings":"AAAA;;AACA,SACEA,gBAAgB,EAChBC,sBAAsB,EACtBC,SAAS,EACTC,eAAe,QACV;AACP,SAASC,iBAAiB,QAAQ;AAClC,SAASC,iBAAiB,EAAEC,mBAAmB,QAAQ;AAIvD,SAASC,QAAQ,QAAQ;AACzB,SAASC,mBAAmB,QAAQ;AACpC,SAASC,2BAA2B,QAAQ;AAE5C,MAAMC,aAAA,GAAgC,CACpCD,2BAAA,CAA4B,CAC1B;EACEE,cAAA,EAAgBJ,QAAA;EAChBK,QAAA,EAAUA,CAAC;IAAEC;EAAS,CAAE;IACtB,IAAIR,iBAAA,CAAkBQ,SAAA,KAAcT,iBAAA,CAAkBS,SAAA,GAAY;MAChE,OAAOA,SAAA,CAAUC,SAAS,CAAC;IAC7B;IACA,OAAO;EACT;EACAC,GAAA,EAAK;EACLC,QAAA,EAAUA,CAAC;IAAEC;EAAM,CAAE;IACnBA,MAAA,CAAOC,eAAe,CAACZ,mBAAA,EAAqB;EAC9C;EACAa,KAAA,EAAO;AACT,EACD,EACF;AAED,OAAO,MAAMC,iBAAA,GAAoBZ,mBAAA,CAAoB,CAAC;EAAEa;AAAkB,CAAE;EAC1E,MAAMC,oBAAA,GAAuB,CAACpB,SAAA,EAAWC,eAAA,CAAgB;EACzD,IAAIkB,kBAAA,CAAmBE,GAAG,CAAC,WAAW;IACpCD,oBAAA,CAAqBE,IAAI,CAACvB,sBAAA,EAAwBD,gBAAA;EACpD;EAEA,OAAO;IACLyB,aAAA,EAAe,CAAC,OAAO;IACvBH,oBAAA;IACAI,YAAA,EAAc;MACZC,MAAA,EAAQjB;IACV;IACAkB,aAAA,EAAe;MACbD,MAAA,EAAQjB;IACV;EACF;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/features/format/bold/feature.server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/features/format/bold/feature.server.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,WAAW,+FActB,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { BOLD_ITALIC_STAR, BOLD_ITALIC_UNDERSCORE, BOLD_STAR, BOLD_UNDERSCORE } from '@lexical/markdown';
|
|
1
2
|
import { createServerFeature } from '../../../utilities/createServerFeature.js';
|
|
2
|
-
import { BOLD_ITALIC_STAR, BOLD_ITALIC_UNDERSCORE, BOLD_STAR, BOLD_UNDERSCORE } from './markdownTransformers.js';
|
|
3
3
|
export const BoldFeature = createServerFeature({
|
|
4
4
|
dependenciesSoft: ['italic'],
|
|
5
5
|
feature: ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.server.js","names":["
|
|
1
|
+
{"version":3,"file":"feature.server.js","names":["BOLD_ITALIC_STAR","BOLD_ITALIC_UNDERSCORE","BOLD_STAR","BOLD_UNDERSCORE","createServerFeature","BoldFeature","dependenciesSoft","feature","featureProviderMap","markdownTransformers","get","push","ClientFeature","key"],"sources":["../../../../src/features/format/bold/feature.server.ts"],"sourcesContent":["import {\n BOLD_ITALIC_STAR,\n BOLD_ITALIC_UNDERSCORE,\n BOLD_STAR,\n BOLD_UNDERSCORE,\n} from '@lexical/markdown'\n\nimport { createServerFeature } from '../../../utilities/createServerFeature.js'\n\nexport const BoldFeature = createServerFeature({\n dependenciesSoft: ['italic'],\n feature: ({ featureProviderMap }) => {\n const markdownTransformers = [BOLD_STAR, BOLD_UNDERSCORE]\n if (featureProviderMap.get('italic')) {\n markdownTransformers.push(BOLD_ITALIC_UNDERSCORE, BOLD_ITALIC_STAR)\n }\n\n return {\n ClientFeature: '@payloadcms/richtext-lexical/client#BoldFeatureClient',\n markdownTransformers,\n }\n },\n key: 'bold',\n})\n"],"mappings":"AAAA,SACEA,gBAAgB,EAChBC,sBAAsB,EACtBC,SAAS,EACTC,eAAe,QACV;AAEP,SAASC,mBAAmB,QAAQ;AAEpC,OAAO,MAAMC,WAAA,GAAcD,mBAAA,CAAoB;EAC7CE,gBAAA,EAAkB,CAAC,SAAS;EAC5BC,OAAA,EAASA,CAAC;IAAEC;EAAkB,CAAE;IAC9B,MAAMC,oBAAA,GAAuB,CAACP,SAAA,EAAWC,eAAA,CAAgB;IACzD,IAAIK,kBAAA,CAAmBE,GAAG,CAAC,WAAW;MACpCD,oBAAA,CAAqBE,IAAI,CAACV,sBAAA,EAAwBD,gBAAA;IACpD;IAEA,OAAO;MACLY,aAAA,EAAe;MACfH;IACF;EACF;EACAI,GAAA,EAAK;AACP","ignoreList":[]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
+
import { INLINE_CODE } from '@lexical/markdown';
|
|
3
4
|
import { $isTableSelection } from '@lexical/table';
|
|
4
5
|
import { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical';
|
|
5
6
|
import { CodeIcon } from '../../../lexical/ui/icons/Code/index.js';
|
|
6
7
|
import { createClientFeature } from '../../../utilities/createClientFeature.js';
|
|
7
8
|
import { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js';
|
|
8
|
-
import { INLINE_CODE } from './markdownTransformers.js';
|
|
9
9
|
const toolbarGroups = [toolbarFormatGroupWithItems([{
|
|
10
10
|
ChildComponent: CodeIcon,
|
|
11
11
|
isActive: ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.client.js","names":["$isTableSelection","$isRangeSelection","FORMAT_TEXT_COMMAND","CodeIcon","createClientFeature","toolbarFormatGroupWithItems","
|
|
1
|
+
{"version":3,"file":"feature.client.js","names":["INLINE_CODE","$isTableSelection","$isRangeSelection","FORMAT_TEXT_COMMAND","CodeIcon","createClientFeature","toolbarFormatGroupWithItems","toolbarGroups","ChildComponent","isActive","selection","hasFormat","key","onSelect","editor","dispatchCommand","order","InlineCodeFeatureClient","enableFormats","markdownTransformers","toolbarFixed","groups","toolbarInline"],"sources":["../../../../src/features/format/inlineCode/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { INLINE_CODE } from '@lexical/markdown'\nimport { $isTableSelection } from '@lexical/table'\nimport { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\n\nimport { CodeIcon } from '../../../lexical/ui/icons/Code/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarFormatGroupWithItems([\n {\n ChildComponent: CodeIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection) || $isTableSelection(selection)) {\n return selection.hasFormat('code')\n }\n return false\n },\n key: 'inlineCode',\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'code')\n },\n order: 7,\n },\n ]),\n]\n\nexport const InlineCodeFeatureClient = createClientFeature({\n enableFormats: ['code'],\n markdownTransformers: [INLINE_CODE],\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n})\n"],"mappings":"AAAA;;AAEA,SAASA,WAAW,QAAQ;AAC5B,SAASC,iBAAiB,QAAQ;AAClC,SAASC,iBAAiB,EAAEC,mBAAmB,QAAQ;AAIvD,SAASC,QAAQ,QAAQ;AACzB,SAASC,mBAAmB,QAAQ;AACpC,SAASC,2BAA2B,QAAQ;AAE5C,MAAMC,aAAA,GAAgC,CACpCD,2BAAA,CAA4B,CAC1B;EACEE,cAAA,EAAgBJ,QAAA;EAChBK,QAAA,EAAUA,CAAC;IAAEC;EAAS,CAAE;IACtB,IAAIR,iBAAA,CAAkBQ,SAAA,KAAcT,iBAAA,CAAkBS,SAAA,GAAY;MAChE,OAAOA,SAAA,CAAUC,SAAS,CAAC;IAC7B;IACA,OAAO;EACT;EACAC,GAAA,EAAK;EACLC,QAAA,EAAUA,CAAC;IAAEC;EAAM,CAAE;IACnBA,MAAA,CAAOC,eAAe,CAACZ,mBAAA,EAAqB;EAC9C;EACAa,KAAA,EAAO;AACT,EACD,EACF;AAED,OAAO,MAAMC,uBAAA,GAA0BZ,mBAAA,CAAoB;EACzDa,aAAA,EAAe,CAAC,OAAO;EACvBC,oBAAA,EAAsB,CAACnB,WAAA,CAAY;EACnCoB,YAAA,EAAc;IACZC,MAAA,EAAQd;EACV;EACAe,aAAA,EAAe;IACbD,MAAA,EAAQd;EACV;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/features/format/inlineCode/feature.server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/features/format/inlineCode/feature.server.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB,+FAM5B,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { INLINE_CODE } from '@lexical/markdown';
|
|
1
2
|
import { createServerFeature } from '../../../utilities/createServerFeature.js';
|
|
2
|
-
import { INLINE_CODE } from './markdownTransformers.js';
|
|
3
3
|
export const InlineCodeFeature = createServerFeature({
|
|
4
4
|
feature: {
|
|
5
5
|
ClientFeature: '@payloadcms/richtext-lexical/client#InlineCodeFeatureClient',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.server.js","names":["
|
|
1
|
+
{"version":3,"file":"feature.server.js","names":["INLINE_CODE","createServerFeature","InlineCodeFeature","feature","ClientFeature","markdownTransformers","key"],"sources":["../../../../src/features/format/inlineCode/feature.server.ts"],"sourcesContent":["import { INLINE_CODE } from '@lexical/markdown'\n\nimport { createServerFeature } from '../../../utilities/createServerFeature.js'\n\nexport const InlineCodeFeature = createServerFeature({\n feature: {\n ClientFeature: '@payloadcms/richtext-lexical/client#InlineCodeFeatureClient',\n markdownTransformers: [INLINE_CODE],\n },\n key: 'inlineCode',\n})\n"],"mappings":"AAAA,SAASA,WAAW,QAAQ;AAE5B,SAASC,mBAAmB,QAAQ;AAEpC,OAAO,MAAMC,iBAAA,GAAoBD,mBAAA,CAAoB;EACnDE,OAAA,EAAS;IACPC,aAAA,EAAe;IACfC,oBAAA,EAAsB,CAACL,WAAA;EACzB;EACAM,GAAA,EAAK;AACP","ignoreList":[]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
+
import { ITALIC_STAR, ITALIC_UNDERSCORE } from '@lexical/markdown';
|
|
3
4
|
import { $isTableSelection } from '@lexical/table';
|
|
4
5
|
import { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical';
|
|
5
6
|
import { ItalicIcon } from '../../../lexical/ui/icons/Italic/index.js';
|
|
6
7
|
import { createClientFeature } from '../../../utilities/createClientFeature.js';
|
|
7
8
|
import { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js';
|
|
8
|
-
import { ITALIC_STAR, ITALIC_UNDERSCORE } from './markdownTransformers.js';
|
|
9
9
|
const toolbarGroups = [toolbarFormatGroupWithItems([{
|
|
10
10
|
ChildComponent: ItalicIcon,
|
|
11
11
|
isActive: ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.client.js","names":["$isTableSelection","$isRangeSelection","FORMAT_TEXT_COMMAND","ItalicIcon","createClientFeature","toolbarFormatGroupWithItems","
|
|
1
|
+
{"version":3,"file":"feature.client.js","names":["ITALIC_STAR","ITALIC_UNDERSCORE","$isTableSelection","$isRangeSelection","FORMAT_TEXT_COMMAND","ItalicIcon","createClientFeature","toolbarFormatGroupWithItems","toolbarGroups","ChildComponent","isActive","selection","hasFormat","key","onSelect","editor","dispatchCommand","order","ItalicFeatureClient","enableFormats","markdownTransformers","toolbarFixed","groups","toolbarInline"],"sources":["../../../../src/features/format/italic/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { ITALIC_STAR, ITALIC_UNDERSCORE } from '@lexical/markdown'\nimport { $isTableSelection } from '@lexical/table'\nimport { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\n\nimport { ItalicIcon } from '../../../lexical/ui/icons/Italic/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarFormatGroupWithItems([\n {\n ChildComponent: ItalicIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection) || $isTableSelection(selection)) {\n return selection.hasFormat('italic')\n }\n return false\n },\n key: 'italic',\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'italic')\n },\n order: 2,\n },\n ]),\n]\n\nexport const ItalicFeatureClient = createClientFeature({\n enableFormats: ['italic'],\n markdownTransformers: [ITALIC_STAR, ITALIC_UNDERSCORE],\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n})\n"],"mappings":"AAAA;;AAEA,SAASA,WAAW,EAAEC,iBAAiB,QAAQ;AAC/C,SAASC,iBAAiB,QAAQ;AAClC,SAASC,iBAAiB,EAAEC,mBAAmB,QAAQ;AAIvD,SAASC,UAAU,QAAQ;AAC3B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,2BAA2B,QAAQ;AAE5C,MAAMC,aAAA,GAAgC,CACpCD,2BAAA,CAA4B,CAC1B;EACEE,cAAA,EAAgBJ,UAAA;EAChBK,QAAA,EAAUA,CAAC;IAAEC;EAAS,CAAE;IACtB,IAAIR,iBAAA,CAAkBQ,SAAA,KAAcT,iBAAA,CAAkBS,SAAA,GAAY;MAChE,OAAOA,SAAA,CAAUC,SAAS,CAAC;IAC7B;IACA,OAAO;EACT;EACAC,GAAA,EAAK;EACLC,QAAA,EAAUA,CAAC;IAAEC;EAAM,CAAE;IACnBA,MAAA,CAAOC,eAAe,CAACZ,mBAAA,EAAqB;EAC9C;EACAa,KAAA,EAAO;AACT,EACD,EACF;AAED,OAAO,MAAMC,mBAAA,GAAsBZ,mBAAA,CAAoB;EACrDa,aAAA,EAAe,CAAC,SAAS;EACzBC,oBAAA,EAAsB,CAACpB,WAAA,EAAaC,iBAAA,CAAkB;EACtDoB,YAAA,EAAc;IACZC,MAAA,EAAQd;EACV;EACAe,aAAA,EAAe;IACbD,MAAA,EAAQd;EACV;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/features/format/italic/feature.server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/features/format/italic/feature.server.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa,+FAMxB,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { ITALIC_STAR, ITALIC_UNDERSCORE } from '@lexical/markdown';
|
|
1
2
|
import { createServerFeature } from '../../../utilities/createServerFeature.js';
|
|
2
|
-
import { ITALIC_STAR, ITALIC_UNDERSCORE } from './markdownTransformers.js';
|
|
3
3
|
export const ItalicFeature = createServerFeature({
|
|
4
4
|
feature: {
|
|
5
5
|
ClientFeature: '@payloadcms/richtext-lexical/client#ItalicFeatureClient',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.server.js","names":["
|
|
1
|
+
{"version":3,"file":"feature.server.js","names":["ITALIC_STAR","ITALIC_UNDERSCORE","createServerFeature","ItalicFeature","feature","ClientFeature","markdownTransformers","key"],"sources":["../../../../src/features/format/italic/feature.server.ts"],"sourcesContent":["import { ITALIC_STAR, ITALIC_UNDERSCORE } from '@lexical/markdown'\n\nimport { createServerFeature } from '../../../utilities/createServerFeature.js'\n\nexport const ItalicFeature = createServerFeature({\n feature: {\n ClientFeature: '@payloadcms/richtext-lexical/client#ItalicFeatureClient',\n markdownTransformers: [ITALIC_STAR, ITALIC_UNDERSCORE],\n },\n key: 'italic',\n})\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,iBAAiB,QAAQ;AAE/C,SAASC,mBAAmB,QAAQ;AAEpC,OAAO,MAAMC,aAAA,GAAgBD,mBAAA,CAAoB;EAC/CE,OAAA,EAAS;IACPC,aAAA,EAAe;IACfC,oBAAA,EAAsB,CAACN,WAAA,EAAaC,iBAAA;EACtC;EACAM,GAAA,EAAK;AACP","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolbarFormatGroup.d.ts","sourceRoot":"","sources":["../../../../src/features/format/shared/toolbarFormatGroup.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAE7E,eAAO,MAAM,2BAA2B,
|
|
1
|
+
{"version":3,"file":"toolbarFormatGroup.d.ts","sourceRoot":"","sources":["../../../../src/features/format/shared/toolbarFormatGroup.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAE7E,eAAO,MAAM,2BAA2B,GAAI,OAAO,gBAAgB,EAAE,KAAG,YAOvE,CAAA"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
+
import { STRIKETHROUGH } from '@lexical/markdown';
|
|
3
4
|
import { $isTableSelection } from '@lexical/table';
|
|
4
5
|
import { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical';
|
|
5
6
|
import { StrikethroughIcon } from '../../../lexical/ui/icons/Strikethrough/index.js';
|
|
6
7
|
import { createClientFeature } from '../../../utilities/createClientFeature.js';
|
|
7
8
|
import { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js';
|
|
8
|
-
import { STRIKETHROUGH } from './markdownTransformers.js';
|
|
9
9
|
const toolbarGroups = [toolbarFormatGroupWithItems([{
|
|
10
10
|
ChildComponent: StrikethroughIcon,
|
|
11
11
|
isActive: ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.client.js","names":["$isTableSelection","$isRangeSelection","FORMAT_TEXT_COMMAND","StrikethroughIcon","createClientFeature","toolbarFormatGroupWithItems","
|
|
1
|
+
{"version":3,"file":"feature.client.js","names":["STRIKETHROUGH","$isTableSelection","$isRangeSelection","FORMAT_TEXT_COMMAND","StrikethroughIcon","createClientFeature","toolbarFormatGroupWithItems","toolbarGroups","ChildComponent","isActive","selection","hasFormat","key","onSelect","editor","dispatchCommand","order","StrikethroughFeatureClient","enableFormats","markdownTransformers","toolbarFixed","groups","toolbarInline"],"sources":["../../../../src/features/format/strikethrough/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { STRIKETHROUGH } from '@lexical/markdown'\nimport { $isTableSelection } from '@lexical/table'\nimport { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical'\n\nimport { StrikethroughIcon } from '../../../lexical/ui/icons/Strikethrough/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js'\n\nconst toolbarGroups = [\n toolbarFormatGroupWithItems([\n {\n ChildComponent: StrikethroughIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection) || $isTableSelection(selection)) {\n return selection.hasFormat('strikethrough')\n }\n return false\n },\n key: 'strikethrough',\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'strikethrough')\n },\n order: 4,\n },\n ]),\n]\n\nexport const StrikethroughFeatureClient = createClientFeature({\n enableFormats: ['strikethrough'],\n markdownTransformers: [STRIKETHROUGH],\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n})\n"],"mappings":"AAAA;;AAEA,SAASA,aAAa,QAAQ;AAC9B,SAASC,iBAAiB,QAAQ;AAClC,SAASC,iBAAiB,EAAEC,mBAAmB,QAAQ;AAEvD,SAASC,iBAAiB,QAAQ;AAClC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,2BAA2B,QAAQ;AAE5C,MAAMC,aAAA,GAAgB,CACpBD,2BAAA,CAA4B,CAC1B;EACEE,cAAA,EAAgBJ,iBAAA;EAChBK,QAAA,EAAUA,CAAC;IAAEC;EAAS,CAAE;IACtB,IAAIR,iBAAA,CAAkBQ,SAAA,KAAcT,iBAAA,CAAkBS,SAAA,GAAY;MAChE,OAAOA,SAAA,CAAUC,SAAS,CAAC;IAC7B;IACA,OAAO;EACT;EACAC,GAAA,EAAK;EACLC,QAAA,EAAUA,CAAC;IAAEC;EAAM,CAAE;IACnBA,MAAA,CAAOC,eAAe,CAACZ,mBAAA,EAAqB;EAC9C;EACAa,KAAA,EAAO;AACT,EACD,EACF;AAED,OAAO,MAAMC,0BAAA,GAA6BZ,mBAAA,CAAoB;EAC5Da,aAAA,EAAe,CAAC,gBAAgB;EAChCC,oBAAA,EAAsB,CAACnB,aAAA,CAAc;EACrCoB,YAAA,EAAc;IACZC,MAAA,EAAQd;EACV;EACAe,aAAA,EAAe;IACbD,MAAA,EAAQd;EACV;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/features/format/strikethrough/feature.server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/features/format/strikethrough/feature.server.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,oBAAoB,+FAO/B,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { STRIKETHROUGH } from '@lexical/markdown';
|
|
1
2
|
import { createServerFeature } from '../../../utilities/createServerFeature.js';
|
|
2
|
-
import { STRIKETHROUGH } from './markdownTransformers.js';
|
|
3
3
|
export const StrikethroughFeature = createServerFeature({
|
|
4
4
|
feature: {
|
|
5
5
|
ClientFeature: '@payloadcms/richtext-lexical/client#StrikethroughFeatureClient',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.server.js","names":["
|
|
1
|
+
{"version":3,"file":"feature.server.js","names":["STRIKETHROUGH","createServerFeature","StrikethroughFeature","feature","ClientFeature","markdownTransformers","key"],"sources":["../../../../src/features/format/strikethrough/feature.server.ts"],"sourcesContent":["import { STRIKETHROUGH } from '@lexical/markdown'\n\nimport { createServerFeature } from '../../../utilities/createServerFeature.js'\n\nexport const StrikethroughFeature = createServerFeature({\n feature: {\n ClientFeature: '@payloadcms/richtext-lexical/client#StrikethroughFeatureClient',\n\n markdownTransformers: [STRIKETHROUGH],\n },\n key: 'strikethrough',\n})\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ;AAE9B,SAASC,mBAAmB,QAAQ;AAEpC,OAAO,MAAMC,oBAAA,GAAuBD,mBAAA,CAAoB;EACtDE,OAAA,EAAS;IACPC,aAAA,EAAe;IAEfC,oBAAA,EAAsB,CAACL,aAAA;EACzB;EACAM,GAAA,EAAK;AACP","ignoreList":[]}
|
|
@@ -15,7 +15,7 @@ import { H6Icon } from '../../../lexical/ui/icons/H6/index.js';
|
|
|
15
15
|
import { createClientFeature } from '../../../utilities/createClientFeature.js';
|
|
16
16
|
import { slashMenuBasicGroupWithItems } from '../../shared/slashMenu/basicGroup.js';
|
|
17
17
|
import { toolbarTextDropdownGroupWithItems } from '../../shared/toolbar/textDropdownGroup.js';
|
|
18
|
-
import {
|
|
18
|
+
import { PAYLOAD_HEADING } from '../markdownTransformer.js';
|
|
19
19
|
const $setHeading = headingSize => {
|
|
20
20
|
const selection = $getSelection();
|
|
21
21
|
$setBlocksType(selection, () => $createHeadingNode(headingSize));
|
|
@@ -74,7 +74,7 @@ export const HeadingFeatureClient = createClientFeature(({
|
|
|
74
74
|
};
|
|
75
75
|
}))];
|
|
76
76
|
return {
|
|
77
|
-
markdownTransformers: [
|
|
77
|
+
markdownTransformers: [PAYLOAD_HEADING(enabledHeadingSizes)],
|
|
78
78
|
nodes: [HeadingNode],
|
|
79
79
|
plugins: [{
|
|
80
80
|
Component: HeadingPlugin,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["c","_c","useLexicalComposerContext","$createHeadingNode","$isHeadingNode","HeadingNode","$setBlocksType","$getSelection","$isRangeSelection","useEffect","H1Icon","H2Icon","H3Icon","H4Icon","H5Icon","H6Icon","createClientFeature","slashMenuBasicGroupWithItems","toolbarTextDropdownGroupWithItems","
|
|
1
|
+
{"version":3,"file":"index.js","names":["c","_c","useLexicalComposerContext","$createHeadingNode","$isHeadingNode","HeadingNode","$setBlocksType","$getSelection","$isRangeSelection","useEffect","H1Icon","H2Icon","H3Icon","H4Icon","H5Icon","H6Icon","createClientFeature","slashMenuBasicGroupWithItems","toolbarTextDropdownGroupWithItems","PAYLOAD_HEADING","$setHeading","headingSize","selection","iconImports","h1","h2","h3","h4","h5","h6","HeadingFeatureClient","props","enabledHeadingSizes","toolbarGroups","map","i","ChildComponent","isActive","node","getNodes","getTag","parent","getParent","key","label","i18n","t","headingLevel","charAt","onSelect","editor","update","order","markdownTransformers","nodes","plugins","Component","HeadingPlugin","position","sanitizedClientFeatureProps","slashMenu","groups","length","Icon","keywords","toolbarFixed","toolbarInline","t0","$","clientProps","t1","t2","undefined","t3","at","lowestAllowed","t4","t5","registerNodeTransform","includes","setTag"],"sources":["../../../../src/features/heading/client/index.tsx"],"sourcesContent":["'use client'\n\nimport type { HeadingTagType } from '@lexical/rich-text'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { $createHeadingNode, $isHeadingNode, HeadingNode } from '@lexical/rich-text'\nimport { $setBlocksType } from '@lexical/selection'\nimport { $getSelection, $isRangeSelection } from 'lexical'\nimport { useEffect } from 'react'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\nimport type { PluginComponent } from '../../typesClient.js'\nimport type { HeadingFeatureProps } from '../server/index.js'\n\nimport { H1Icon } from '../../../lexical/ui/icons/H1/index.js'\nimport { H2Icon } from '../../../lexical/ui/icons/H2/index.js'\nimport { H3Icon } from '../../../lexical/ui/icons/H3/index.js'\nimport { H4Icon } from '../../../lexical/ui/icons/H4/index.js'\nimport { H5Icon } from '../../../lexical/ui/icons/H5/index.js'\nimport { H6Icon } from '../../../lexical/ui/icons/H6/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { slashMenuBasicGroupWithItems } from '../../shared/slashMenu/basicGroup.js'\nimport { toolbarTextDropdownGroupWithItems } from '../../shared/toolbar/textDropdownGroup.js'\nimport { PAYLOAD_HEADING } from '../markdownTransformer.js'\n\nconst $setHeading = (headingSize: HeadingTagType) => {\n const selection = $getSelection()\n $setBlocksType(selection, () => $createHeadingNode(headingSize))\n}\n\nconst iconImports = {\n h1: H1Icon,\n h2: H2Icon,\n h3: H3Icon,\n h4: H4Icon,\n h5: H5Icon,\n h6: H6Icon,\n}\n\nexport const HeadingFeatureClient = createClientFeature<HeadingFeatureProps>(({ props }) => {\n const { enabledHeadingSizes = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] } = props\n\n const toolbarGroups: ToolbarGroup[] = [\n toolbarTextDropdownGroupWithItems(\n enabledHeadingSizes.map((headingSize, i) => {\n return {\n ChildComponent: iconImports[headingSize],\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isHeadingNode(node) && node.getTag() === headingSize) {\n continue\n }\n\n const parent = node.getParent()\n if ($isHeadingNode(parent) && parent.getTag() === headingSize) {\n continue\n }\n\n return false\n }\n return true\n },\n key: headingSize,\n label: ({ i18n }) => {\n return i18n.t('lexical:heading:label', { headingLevel: headingSize.charAt(1) })\n },\n onSelect: ({ editor }) => {\n editor.update(() => {\n $setHeading(headingSize)\n })\n },\n order: i + 2,\n }\n }),\n ),\n ]\n\n return {\n markdownTransformers: [PAYLOAD_HEADING(enabledHeadingSizes)],\n nodes: [HeadingNode],\n plugins: [\n {\n Component: HeadingPlugin,\n position: 'normal',\n },\n ],\n sanitizedClientFeatureProps: props,\n slashMenu: {\n groups: enabledHeadingSizes?.length\n ? [\n slashMenuBasicGroupWithItems(\n enabledHeadingSizes.map((headingSize) => {\n return {\n Icon: iconImports[headingSize],\n key: `heading-${headingSize.charAt(1)}`,\n keywords: ['heading', headingSize],\n label: ({ i18n }) => {\n return i18n.t('lexical:heading:label', {\n headingLevel: headingSize.charAt(1),\n })\n },\n onSelect: ({ editor }) => {\n editor.update(() => {\n $setHeading(headingSize)\n })\n },\n }\n }),\n ),\n ]\n : [],\n },\n toolbarFixed: {\n groups: enabledHeadingSizes?.length ? toolbarGroups : [],\n },\n toolbarInline: {\n groups: enabledHeadingSizes?.length ? toolbarGroups : [],\n },\n }\n})\n\nconst HeadingPlugin: PluginComponent<HeadingFeatureProps> = ({ clientProps }) => {\n const { enabledHeadingSizes = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] } = clientProps\n const lowestAllowed = enabledHeadingSizes.at(-1)\n const [editor] = useLexicalComposerContext()\n\n useEffect(() => {\n if (!lowestAllowed || enabledHeadingSizes.length === 6) {\n return\n }\n return editor.registerNodeTransform(HeadingNode, (node) => {\n if (!enabledHeadingSizes.includes(node.getTag())) {\n node.setTag(lowestAllowed)\n }\n })\n }, [editor, enabledHeadingSizes, lowestAllowed])\n\n return null\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;AAIA,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,kBAAkB,EAAEC,cAAc,EAAEC,WAAW,QAAQ;AAChE,SAASC,cAAc,QAAQ;AAC/B,SAASC,aAAa,EAAEC,iBAAiB,QAAQ;AACjD,SAASC,SAAS,QAAQ;AAM1B,SAASC,MAAM,QAAQ;AACvB,SAASC,MAAM,QAAQ;AACvB,SAASC,MAAM,QAAQ;AACvB,SAASC,MAAM,QAAQ;AACvB,SAASC,MAAM,QAAQ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AA,EAAQlB,mBAAA,EAAqB2C,aAAA;IAAcP,CAAA,MAAAlB,MAAA;IAAAkB,CAAA,MAAApC,mBAAA;IAAAoC,CAAA,MAAAO,aAAA;IAAAP,CAAA,MAAAQ,EAAA;IAAAR,CAAA,MAAAS,EAAA;EAAA;IAAAD,EAAA,GAAAR,CAAA;IAAAS,EAAA,GAAAT,CAAA;EAAA;EAT/C3D,SAAA,CAAUmE,EASV,EAAGC,EAA4C;EAAA;AAAA,CAGjD","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
+
import type { ElementTransformer } from '@lexical/markdown';
|
|
1
2
|
import type { HeadingTagType } from '@lexical/rich-text';
|
|
2
|
-
|
|
3
|
-
export declare const MarkdownTransformer: (enabledHeadingSizes: HeadingTagType[]) => ElementTransformer;
|
|
3
|
+
export declare const PAYLOAD_HEADING: (enabledHeadingSizes: HeadingTagType[]) => ElementTransformer;
|
|
4
4
|
//# sourceMappingURL=markdownTransformer.d.ts.map
|