@payloadcms/richtext-lexical 3.28.0-canary.8f6d2e7 → 3.28.0-internal.b3cf0a3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/exports/client/index.d.ts +1 -0
- package/dist/exports/client/index.d.ts.map +1 -1
- package/dist/exports/client/index.js +9 -9
- package/dist/exports/client/index.js.map +4 -4
- package/dist/exports/html/index.d.ts +16 -0
- package/dist/exports/html/index.d.ts.map +1 -0
- package/dist/exports/html/index.js +14 -0
- package/dist/exports/html/index.js.map +1 -0
- package/dist/exports/html-async/index.d.ts +16 -0
- package/dist/exports/html-async/index.d.ts.map +1 -0
- package/dist/exports/html-async/index.js +14 -0
- package/dist/exports/html-async/index.js.map +1 -0
- package/dist/exports/react/index.d.ts +15 -15
- package/dist/exports/react/index.d.ts.map +1 -1
- package/dist/exports/react/index.js +14 -14
- package/dist/exports/react/index.js.map +1 -1
- package/dist/features/blockquote/server/index.js +1 -1
- package/dist/features/blockquote/server/index.js.map +1 -1
- package/dist/features/converters/html/async/converters/blockquote.d.ts +4 -0
- package/dist/features/converters/html/async/converters/blockquote.d.ts.map +1 -0
- package/dist/features/converters/html/async/converters/blockquote.js +13 -0
- package/dist/features/converters/html/async/converters/blockquote.js.map +1 -0
- package/dist/features/converters/html/async/converters/heading.d.ts +4 -0
- package/dist/features/converters/html/async/converters/heading.d.ts.map +1 -0
- package/dist/features/converters/html/async/converters/heading.js +13 -0
- package/dist/features/converters/html/async/converters/heading.js.map +1 -0
- package/dist/features/converters/html/async/converters/horizontalRule.d.ts +4 -0
- package/dist/features/converters/html/async/converters/horizontalRule.d.ts.map +1 -0
- package/dist/features/converters/html/async/converters/horizontalRule.js +4 -0
- package/dist/features/converters/html/async/converters/horizontalRule.js.map +1 -0
- package/dist/features/converters/html/async/converters/linebreak.d.ts +4 -0
- package/dist/features/converters/html/async/converters/linebreak.d.ts.map +1 -0
- package/dist/features/converters/html/async/converters/linebreak.js +4 -0
- package/dist/features/converters/html/async/converters/linebreak.js.map +1 -0
- package/dist/features/converters/html/async/converters/link.d.ts +9 -0
- package/dist/features/converters/html/async/converters/link.d.ts.map +1 -0
- package/dist/features/converters/html/async/converters/link.js +51 -0
- package/dist/features/converters/html/async/converters/link.js.map +1 -0
- package/dist/features/converters/html/async/converters/list.d.ts +4 -0
- package/dist/features/converters/html/async/converters/list.d.ts.map +1 -0
- package/dist/features/converters/html/async/converters/list.js +46 -0
- package/dist/features/converters/html/async/converters/list.js.map +1 -0
- package/dist/features/converters/html/async/converters/paragraph.d.ts +4 -0
- package/dist/features/converters/html/async/converters/paragraph.d.ts.map +1 -0
- package/dist/features/converters/html/async/converters/paragraph.js +16 -0
- package/dist/features/converters/html/async/converters/paragraph.js.map +1 -0
- package/dist/features/converters/html/async/converters/tab.d.ts +4 -0
- package/dist/features/converters/html/async/converters/tab.d.ts.map +1 -0
- package/dist/features/converters/html/async/converters/tab.js +4 -0
- package/dist/features/converters/html/async/converters/tab.js.map +1 -0
- package/dist/features/converters/html/async/converters/table.d.ts +4 -0
- package/dist/features/converters/html/async/converters/table.d.ts.map +1 -0
- package/dist/features/converters/html/async/converters/table.js +55 -0
- package/dist/features/converters/html/async/converters/table.js.map +1 -0
- package/dist/features/converters/html/async/converters/text.d.ts +4 -0
- package/dist/features/converters/html/async/converters/text.d.ts.map +1 -0
- package/dist/features/converters/html/async/converters/text.js +31 -0
- package/dist/features/converters/html/async/converters/text.js.map +1 -0
- package/dist/features/converters/html/async/converters/upload.d.ts +4 -0
- package/dist/features/converters/html/async/converters/upload.d.ts.map +1 -0
- package/dist/features/converters/html/async/converters/upload.js +66 -0
- package/dist/features/converters/html/async/converters/upload.js.map +1 -0
- package/dist/features/converters/html/async/defaultConverters.d.ts +4 -0
- package/dist/features/converters/html/async/defaultConverters.d.ts.map +1 -0
- package/dist/features/converters/html/async/defaultConverters.js +25 -0
- package/dist/features/converters/html/async/defaultConverters.js.map +1 -0
- package/dist/features/converters/html/async/field/index.d.ts +33 -0
- package/dist/features/converters/html/async/field/index.d.ts.map +1 -0
- package/dist/features/converters/html/async/field/index.js +67 -0
- package/dist/features/converters/html/async/field/index.js.map +1 -0
- package/dist/features/converters/html/async/index.d.ts +34 -0
- package/dist/features/converters/html/async/index.d.ts.map +1 -0
- package/dist/features/converters/html/async/index.js +107 -0
- package/dist/features/converters/html/async/index.js.map +1 -0
- package/dist/features/converters/html/async/types.d.ts +82 -0
- package/dist/features/converters/html/async/types.d.ts.map +1 -0
- package/dist/features/converters/html/async/types.js.map +1 -0
- package/dist/features/converters/html/shared/findConverterForNode.d.ts +15 -0
- package/dist/features/converters/html/shared/findConverterForNode.d.ts.map +1 -0
- package/dist/features/converters/html/shared/findConverterForNode.js +64 -0
- package/dist/features/converters/html/shared/findConverterForNode.js.map +1 -0
- package/dist/features/converters/html/shared/types.d.ts +9 -0
- package/dist/features/converters/html/shared/types.d.ts.map +1 -0
- package/dist/features/converters/html/shared/types.js.map +1 -0
- package/dist/features/converters/html/sync/converters/blockquote.d.ts +4 -0
- package/dist/features/converters/html/sync/converters/blockquote.d.ts.map +1 -0
- package/dist/features/converters/html/sync/converters/blockquote.js +13 -0
- package/dist/features/converters/html/sync/converters/blockquote.js.map +1 -0
- package/dist/features/converters/html/sync/converters/heading.d.ts +4 -0
- package/dist/features/converters/html/sync/converters/heading.d.ts.map +1 -0
- package/dist/features/converters/html/sync/converters/heading.js +13 -0
- package/dist/features/converters/html/sync/converters/heading.js.map +1 -0
- package/dist/features/converters/html/sync/converters/horizontalRule.d.ts +4 -0
- package/dist/features/converters/html/sync/converters/horizontalRule.d.ts.map +1 -0
- package/dist/features/converters/html/sync/converters/horizontalRule.js +4 -0
- package/dist/features/converters/html/sync/converters/horizontalRule.js.map +1 -0
- package/dist/features/converters/html/sync/converters/linebreak.d.ts +4 -0
- package/dist/features/converters/html/sync/converters/linebreak.d.ts.map +1 -0
- package/dist/features/converters/html/sync/converters/linebreak.js +4 -0
- package/dist/features/converters/html/sync/converters/linebreak.js.map +1 -0
- package/dist/features/converters/html/sync/converters/link.d.ts +8 -0
- package/dist/features/converters/html/sync/converters/link.d.ts.map +1 -0
- package/dist/features/converters/html/sync/converters/link.js +49 -0
- package/dist/features/converters/html/sync/converters/link.js.map +1 -0
- package/dist/features/converters/html/sync/converters/list.d.ts +4 -0
- package/dist/features/converters/html/sync/converters/list.d.ts.map +1 -0
- package/dist/features/converters/html/sync/converters/list.js +46 -0
- package/dist/features/converters/html/sync/converters/list.js.map +1 -0
- package/dist/features/converters/html/sync/converters/paragraph.d.ts +4 -0
- package/dist/features/converters/html/sync/converters/paragraph.d.ts.map +1 -0
- package/dist/features/converters/html/sync/converters/paragraph.js +16 -0
- package/dist/features/converters/html/sync/converters/paragraph.js.map +1 -0
- package/dist/features/converters/html/sync/converters/tab.d.ts +4 -0
- package/dist/features/converters/html/sync/converters/tab.d.ts.map +1 -0
- package/dist/features/converters/html/sync/converters/tab.js +4 -0
- package/dist/features/converters/html/sync/converters/tab.js.map +1 -0
- package/dist/features/converters/html/sync/converters/table.d.ts +4 -0
- package/dist/features/converters/html/sync/converters/table.d.ts.map +1 -0
- package/dist/features/converters/html/sync/converters/table.js +55 -0
- package/dist/features/converters/html/sync/converters/table.js.map +1 -0
- package/dist/features/converters/html/sync/converters/text.d.ts +4 -0
- package/dist/features/converters/html/sync/converters/text.d.ts.map +1 -0
- package/dist/features/converters/html/sync/converters/text.js +31 -0
- package/dist/features/converters/html/sync/converters/text.js.map +1 -0
- package/dist/features/converters/html/sync/converters/upload.d.ts +4 -0
- package/dist/features/converters/html/sync/converters/upload.d.ts.map +1 -0
- package/dist/features/converters/html/sync/converters/upload.js +59 -0
- package/dist/features/converters/html/sync/converters/upload.js.map +1 -0
- package/dist/features/converters/html/sync/defaultConverters.d.ts +4 -0
- package/dist/features/converters/html/sync/defaultConverters.d.ts.map +1 -0
- package/dist/features/converters/html/sync/defaultConverters.js +25 -0
- package/dist/features/converters/html/sync/defaultConverters.js.map +1 -0
- package/dist/features/converters/html/sync/index.d.ts +32 -0
- package/dist/features/converters/html/sync/index.d.ts.map +1 -0
- package/dist/features/converters/html/sync/index.js +102 -0
- package/dist/features/converters/html/sync/index.js.map +1 -0
- package/dist/features/converters/html/sync/types.d.ts +74 -0
- package/dist/features/converters/html/sync/types.d.ts.map +1 -0
- package/dist/features/converters/html/sync/types.js +2 -0
- package/dist/features/converters/html/sync/types.js.map +1 -0
- package/dist/features/converters/html_deprecated/converter/converters/linebreak.d.ts.map +1 -0
- package/dist/features/converters/html_deprecated/converter/converters/linebreak.js.map +1 -0
- package/dist/features/converters/html_deprecated/converter/converters/paragraph.d.ts.map +1 -0
- package/dist/features/converters/html_deprecated/converter/converters/paragraph.js.map +1 -0
- package/dist/features/converters/html_deprecated/converter/converters/tab.d.ts.map +1 -0
- package/dist/features/converters/html_deprecated/converter/converters/tab.js.map +1 -0
- package/dist/features/converters/html_deprecated/converter/converters/text.d.ts.map +1 -0
- package/dist/features/converters/html_deprecated/converter/converters/text.js.map +1 -0
- package/dist/features/converters/{html → html_deprecated}/converter/defaultConverters.d.ts +3 -0
- package/dist/features/converters/html_deprecated/converter/defaultConverters.d.ts.map +1 -0
- package/dist/features/converters/{html → html_deprecated}/converter/defaultConverters.js +3 -0
- package/dist/features/converters/html_deprecated/converter/defaultConverters.js.map +1 -0
- package/dist/features/converters/{html → html_deprecated}/converter/index.d.ts +9 -0
- package/dist/features/converters/html_deprecated/converter/index.d.ts.map +1 -0
- package/dist/features/converters/{html → html_deprecated}/converter/index.js +6 -0
- package/dist/features/converters/html_deprecated/converter/index.js.map +1 -0
- package/dist/features/converters/{html → html_deprecated}/converter/types.d.ts +3 -0
- package/dist/features/converters/html_deprecated/converter/types.d.ts.map +1 -0
- package/dist/features/converters/html_deprecated/converter/types.js +2 -0
- package/dist/features/converters/html_deprecated/converter/types.js.map +1 -0
- package/dist/features/converters/{html → html_deprecated}/field/index.d.ts +7 -3
- package/dist/features/converters/html_deprecated/field/index.d.ts.map +1 -0
- package/dist/features/converters/{html → html_deprecated}/field/index.js +6 -2
- package/dist/features/converters/html_deprecated/field/index.js.map +1 -0
- package/dist/features/converters/{html → html_deprecated}/index.d.ts +3 -0
- package/dist/features/converters/html_deprecated/index.d.ts.map +1 -0
- package/dist/features/converters/{html → html_deprecated}/index.js +3 -0
- package/dist/features/converters/html_deprecated/index.js.map +1 -0
- package/dist/{exports/react/components/RichText → features/converters/jsx/Component}/index.d.ts +2 -2
- package/dist/{exports/react/components/RichText → features/converters/jsx/Component}/index.d.ts.map +1 -1
- package/dist/{exports/react/components/RichText → features/converters/jsx/Component}/index.js +2 -2
- package/dist/features/converters/jsx/Component/index.js.map +1 -0
- package/dist/{exports/react/components/RichText → features/converters/jsx}/converter/converters/blockquote.d.ts +1 -1
- package/dist/features/converters/jsx/converter/converters/blockquote.d.ts.map +1 -0
- package/dist/features/converters/jsx/converter/converters/blockquote.js.map +1 -0
- package/dist/{exports/react/components/RichText → features/converters/jsx}/converter/converters/heading.d.ts +1 -1
- package/dist/features/converters/jsx/converter/converters/heading.d.ts.map +1 -0
- package/dist/features/converters/jsx/converter/converters/heading.js.map +1 -0
- package/dist/{exports/react/components/RichText → features/converters/jsx}/converter/converters/horizontalRule.d.ts +1 -1
- package/dist/features/converters/jsx/converter/converters/horizontalRule.d.ts.map +1 -0
- package/dist/features/converters/jsx/converter/converters/horizontalRule.js +5 -0
- package/dist/features/converters/jsx/converter/converters/horizontalRule.js.map +1 -0
- package/dist/{exports/react/components/RichText → features/converters/jsx}/converter/converters/linebreak.d.ts +1 -1
- package/dist/features/converters/jsx/converter/converters/linebreak.d.ts.map +1 -0
- package/dist/features/converters/jsx/converter/converters/linebreak.js +5 -0
- package/dist/features/converters/jsx/converter/converters/linebreak.js.map +1 -0
- package/dist/{exports/react/components/RichText → features/converters/jsx}/converter/converters/link.d.ts +1 -1
- package/dist/features/converters/jsx/converter/converters/link.d.ts.map +1 -0
- package/dist/features/converters/jsx/converter/converters/link.js.map +1 -0
- package/dist/{exports/react/components/RichText → features/converters/jsx}/converter/converters/list.d.ts +1 -1
- package/dist/features/converters/jsx/converter/converters/list.d.ts.map +1 -0
- package/dist/features/converters/jsx/converter/converters/list.js.map +1 -0
- package/dist/{exports/react/components/RichText → features/converters/jsx}/converter/converters/paragraph.d.ts +1 -1
- package/dist/features/converters/jsx/converter/converters/paragraph.d.ts.map +1 -0
- package/dist/features/converters/jsx/converter/converters/paragraph.js.map +1 -0
- package/dist/{exports/react/components/RichText → features/converters/jsx}/converter/converters/tab.d.ts +1 -1
- package/dist/features/converters/jsx/converter/converters/tab.d.ts.map +1 -0
- package/dist/features/converters/jsx/converter/converters/tab.js +4 -0
- package/dist/features/converters/jsx/converter/converters/tab.js.map +1 -0
- package/dist/{exports/react/components/RichText → features/converters/jsx}/converter/converters/table.d.ts +1 -1
- package/dist/features/converters/jsx/converter/converters/table.d.ts.map +1 -0
- package/dist/features/converters/jsx/converter/converters/table.js.map +1 -0
- package/dist/{exports/react/components/RichText → features/converters/jsx}/converter/converters/text.d.ts +1 -1
- package/dist/features/converters/jsx/converter/converters/text.d.ts.map +1 -0
- package/dist/{exports/react/components/RichText → features/converters/jsx}/converter/converters/text.js +1 -1
- package/dist/features/converters/jsx/converter/converters/text.js.map +1 -0
- package/dist/{exports/react/components/RichText → features/converters/jsx}/converter/converters/upload.d.ts +1 -1
- package/dist/features/converters/jsx/converter/converters/upload.d.ts.map +1 -0
- package/dist/{exports/react/components/RichText → features/converters/jsx}/converter/converters/upload.js +2 -1
- package/dist/features/converters/jsx/converter/converters/upload.js.map +1 -0
- package/dist/{exports/react/components/RichText → features/converters/jsx}/converter/defaultConverters.d.ts +1 -1
- package/dist/features/converters/jsx/converter/defaultConverters.d.ts.map +1 -0
- package/dist/features/converters/jsx/converter/defaultConverters.js.map +1 -0
- package/dist/{exports/react/components/RichText → features/converters/jsx}/converter/index.d.ts +2 -2
- package/dist/features/converters/jsx/converter/index.d.ts.map +1 -0
- package/dist/{exports/react/components/RichText → features/converters/jsx}/converter/index.js +29 -43
- package/dist/features/converters/jsx/converter/index.js.map +1 -0
- package/dist/{exports/react/components/RichText → features/converters/jsx}/converter/types.d.ts +3 -3
- package/dist/features/converters/jsx/converter/types.d.ts.map +1 -0
- package/dist/features/converters/jsx/converter/types.js +2 -0
- package/dist/features/converters/jsx/converter/types.js.map +1 -0
- package/dist/features/converters/utilities/payloadPopulateFn.d.ts +31 -0
- package/dist/features/converters/utilities/payloadPopulateFn.d.ts.map +1 -0
- package/dist/features/converters/utilities/payloadPopulateFn.js +42 -0
- package/dist/features/converters/utilities/payloadPopulateFn.js.map +1 -0
- package/dist/features/converters/utilities/restPopulateFn.d.ts +11 -0
- package/dist/features/converters/utilities/restPopulateFn.d.ts.map +1 -0
- package/dist/features/converters/utilities/restPopulateFn.js +33 -0
- package/dist/features/converters/utilities/restPopulateFn.js.map +1 -0
- package/dist/features/experimental_table/server/index.js +1 -1
- package/dist/features/experimental_table/server/index.js.map +1 -1
- package/dist/features/heading/server/index.js +1 -1
- package/dist/features/heading/server/index.js.map +1 -1
- package/dist/features/link/client/index.d.ts +2 -1
- package/dist/features/link/client/index.d.ts.map +1 -1
- package/dist/features/link/client/index.js +8 -5
- package/dist/features/link/client/index.js.map +1 -1
- package/dist/features/link/server/index.d.ts +10 -0
- package/dist/features/link/server/index.d.ts.map +1 -1
- package/dist/features/link/server/index.js +4 -3
- package/dist/features/link/server/index.js.map +1 -1
- package/dist/features/lists/htmlConverter.d.ts +1 -1
- package/dist/features/lists/htmlConverter.d.ts.map +1 -1
- package/dist/features/lists/htmlConverter.js +1 -1
- package/dist/features/lists/htmlConverter.js.map +1 -1
- package/dist/features/typesServer.d.ts +6 -1
- package/dist/features/typesServer.d.ts.map +1 -1
- package/dist/features/typesServer.js.map +1 -1
- package/dist/index.d.ts +12 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -8
- package/dist/index.js.map +1 -1
- package/dist/populateGraphQL/populate.d.ts +5 -5
- package/dist/populateGraphQL/populate.d.ts.map +1 -1
- package/dist/populateGraphQL/populate.js.map +1 -1
- package/package.json +17 -6
- package/dist/exports/react/components/RichText/converter/converters/blockquote.d.ts.map +0 -1
- package/dist/exports/react/components/RichText/converter/converters/blockquote.js.map +0 -1
- package/dist/exports/react/components/RichText/converter/converters/heading.d.ts.map +0 -1
- package/dist/exports/react/components/RichText/converter/converters/heading.js.map +0 -1
- package/dist/exports/react/components/RichText/converter/converters/horizontalRule.d.ts.map +0 -1
- package/dist/exports/react/components/RichText/converter/converters/horizontalRule.js +0 -7
- package/dist/exports/react/components/RichText/converter/converters/horizontalRule.js.map +0 -1
- package/dist/exports/react/components/RichText/converter/converters/linebreak.d.ts.map +0 -1
- package/dist/exports/react/components/RichText/converter/converters/linebreak.js +0 -7
- package/dist/exports/react/components/RichText/converter/converters/linebreak.js.map +0 -1
- package/dist/exports/react/components/RichText/converter/converters/link.d.ts.map +0 -1
- package/dist/exports/react/components/RichText/converter/converters/link.js.map +0 -1
- package/dist/exports/react/components/RichText/converter/converters/list.d.ts.map +0 -1
- package/dist/exports/react/components/RichText/converter/converters/list.js.map +0 -1
- package/dist/exports/react/components/RichText/converter/converters/paragraph.d.ts.map +0 -1
- package/dist/exports/react/components/RichText/converter/converters/paragraph.js.map +0 -1
- package/dist/exports/react/components/RichText/converter/converters/tab.d.ts.map +0 -1
- package/dist/exports/react/components/RichText/converter/converters/tab.js +0 -9
- package/dist/exports/react/components/RichText/converter/converters/tab.js.map +0 -1
- package/dist/exports/react/components/RichText/converter/converters/table.d.ts.map +0 -1
- package/dist/exports/react/components/RichText/converter/converters/table.js.map +0 -1
- package/dist/exports/react/components/RichText/converter/converters/text.d.ts.map +0 -1
- package/dist/exports/react/components/RichText/converter/converters/text.js.map +0 -1
- package/dist/exports/react/components/RichText/converter/converters/upload.d.ts.map +0 -1
- package/dist/exports/react/components/RichText/converter/converters/upload.js.map +0 -1
- package/dist/exports/react/components/RichText/converter/defaultConverters.d.ts.map +0 -1
- package/dist/exports/react/components/RichText/converter/defaultConverters.js.map +0 -1
- package/dist/exports/react/components/RichText/converter/index.d.ts.map +0 -1
- package/dist/exports/react/components/RichText/converter/index.js.map +0 -1
- package/dist/exports/react/components/RichText/converter/types.d.ts.map +0 -1
- package/dist/exports/react/components/RichText/converter/types.js.map +0 -1
- package/dist/exports/react/components/RichText/index.js.map +0 -1
- package/dist/features/converters/html/converter/converters/linebreak.d.ts.map +0 -1
- package/dist/features/converters/html/converter/converters/linebreak.js.map +0 -1
- package/dist/features/converters/html/converter/converters/paragraph.d.ts.map +0 -1
- package/dist/features/converters/html/converter/converters/paragraph.js.map +0 -1
- package/dist/features/converters/html/converter/converters/tab.d.ts.map +0 -1
- package/dist/features/converters/html/converter/converters/tab.js.map +0 -1
- package/dist/features/converters/html/converter/converters/text.d.ts.map +0 -1
- package/dist/features/converters/html/converter/converters/text.js.map +0 -1
- package/dist/features/converters/html/converter/defaultConverters.d.ts.map +0 -1
- package/dist/features/converters/html/converter/defaultConverters.js.map +0 -1
- package/dist/features/converters/html/converter/index.d.ts.map +0 -1
- package/dist/features/converters/html/converter/index.js.map +0 -1
- package/dist/features/converters/html/converter/types.d.ts.map +0 -1
- package/dist/features/converters/html/converter/types.js.map +0 -1
- package/dist/features/converters/html/field/index.d.ts.map +0 -1
- package/dist/features/converters/html/field/index.js.map +0 -1
- package/dist/features/converters/html/index.d.ts.map +0 -1
- package/dist/features/converters/html/index.js.map +0 -1
- /package/dist/{exports/react/components/RichText/converter → features/converters/html/async}/types.js +0 -0
- /package/dist/features/converters/html/{converter → shared}/types.js +0 -0
- /package/dist/features/converters/{html → html_deprecated}/converter/converters/linebreak.d.ts +0 -0
- /package/dist/features/converters/{html → html_deprecated}/converter/converters/linebreak.js +0 -0
- /package/dist/features/converters/{html → html_deprecated}/converter/converters/paragraph.d.ts +0 -0
- /package/dist/features/converters/{html → html_deprecated}/converter/converters/paragraph.js +0 -0
- /package/dist/features/converters/{html → html_deprecated}/converter/converters/tab.d.ts +0 -0
- /package/dist/features/converters/{html → html_deprecated}/converter/converters/tab.js +0 -0
- /package/dist/features/converters/{html → html_deprecated}/converter/converters/text.d.ts +0 -0
- /package/dist/features/converters/{html → html_deprecated}/converter/converters/text.js +0 -0
- /package/dist/{exports/react/components/RichText → features/converters/jsx}/converter/converters/blockquote.js +0 -0
- /package/dist/{exports/react/components/RichText → features/converters/jsx}/converter/converters/heading.js +0 -0
- /package/dist/{exports/react/components/RichText → features/converters/jsx}/converter/converters/link.js +0 -0
- /package/dist/{exports/react/components/RichText → features/converters/jsx}/converter/converters/list.js +0 -0
- /package/dist/{exports/react/components/RichText → features/converters/jsx}/converter/converters/paragraph.js +0 -0
- /package/dist/{exports/react/components/RichText → features/converters/jsx}/converter/converters/table.js +0 -0
- /package/dist/{exports/react/components/RichText → features/converters/jsx}/converter/defaultConverters.js +0 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { createLocalReq } from 'payload';
|
|
2
|
+
import { populate } from '../../../populateGraphQL/populate.js';
|
|
3
|
+
export const getPayloadPopulateFn = async ({
|
|
4
|
+
currentDepth,
|
|
5
|
+
depth,
|
|
6
|
+
draft,
|
|
7
|
+
overrideAccess,
|
|
8
|
+
payload,
|
|
9
|
+
req,
|
|
10
|
+
showHiddenFields
|
|
11
|
+
}) => {
|
|
12
|
+
let reqToUse = req;
|
|
13
|
+
if (req === undefined && payload) {
|
|
14
|
+
reqToUse = await createLocalReq({}, payload);
|
|
15
|
+
}
|
|
16
|
+
if (!reqToUse) {
|
|
17
|
+
throw new Error('No req or payload provided');
|
|
18
|
+
}
|
|
19
|
+
const populateFn = async ({
|
|
20
|
+
id,
|
|
21
|
+
collectionSlug,
|
|
22
|
+
select
|
|
23
|
+
}) => {
|
|
24
|
+
const dataContainer = {};
|
|
25
|
+
await populate({
|
|
26
|
+
id,
|
|
27
|
+
collectionSlug,
|
|
28
|
+
currentDepth,
|
|
29
|
+
data: dataContainer,
|
|
30
|
+
depth,
|
|
31
|
+
draft: draft ?? false,
|
|
32
|
+
key: 'value',
|
|
33
|
+
overrideAccess: overrideAccess ?? true,
|
|
34
|
+
req: reqToUse,
|
|
35
|
+
select,
|
|
36
|
+
showHiddenFields: showHiddenFields ?? false
|
|
37
|
+
});
|
|
38
|
+
return dataContainer.value;
|
|
39
|
+
};
|
|
40
|
+
return populateFn;
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=payloadPopulateFn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payloadPopulateFn.js","names":["createLocalReq","populate","getPayloadPopulateFn","currentDepth","depth","draft","overrideAccess","payload","req","showHiddenFields","reqToUse","undefined","Error","populateFn","id","collectionSlug","select","dataContainer","data","key","value"],"sources":["../../../../src/features/converters/utilities/payloadPopulateFn.ts"],"sourcesContent":["import { createLocalReq, type Payload, type PayloadRequest, type TypedLocale } from 'payload'\n\nimport type { HTMLPopulateFn } from '../html/async/types.js'\n\nimport { populate } from '../../../populateGraphQL/populate.js'\n\nexport const getPayloadPopulateFn: (\n args: {\n currentDepth: number\n depth: number\n draft?: boolean\n locale?: TypedLocale\n\n overrideAccess?: boolean\n showHiddenFields?: boolean\n } & (\n | {\n /**\n * This payload property will only be used if req is undefined. If localization is enabled, you must pass `req` instead.\n */\n payload: Payload\n /**\n * When the converter is called, req CAN be passed in depending on where it's run.\n * If this is undefined and config is passed through, lexical will create a new req object for you.\n */\n req?: never\n }\n | {\n /**\n * This payload property will only be used if req is undefined. If localization is enabled, you must pass `req` instead.\n */\n payload?: never\n /**\n * When the converter is called, req CAN be passed in depending on where it's run.\n * If this is undefined and config is passed through, lexical will create a new req object for you.\n */\n req: PayloadRequest\n }\n ),\n) => Promise<HTMLPopulateFn> = async ({\n currentDepth,\n depth,\n draft,\n overrideAccess,\n payload,\n req,\n showHiddenFields,\n}) => {\n let reqToUse: PayloadRequest | undefined = req\n if (req === undefined && payload) {\n reqToUse = await createLocalReq({}, payload)\n }\n\n if (!reqToUse) {\n throw new Error('No req or payload provided')\n }\n\n const populateFn: HTMLPopulateFn = async ({ id, collectionSlug, select }) => {\n const dataContainer: {\n value?: any\n } = {}\n\n await populate({\n id,\n collectionSlug,\n currentDepth,\n data: dataContainer,\n depth,\n draft: draft ?? false,\n key: 'value',\n overrideAccess: overrideAccess ?? true,\n req: reqToUse,\n select,\n showHiddenFields: showHiddenFields ?? false,\n })\n\n return dataContainer.value\n }\n\n return populateFn\n}\n"],"mappings":"AAAA,SAASA,cAAc,QAA6D;AAIpF,SAASC,QAAQ,QAAQ;AAEzB,OAAO,MAAMC,oBAAA,GAiCkB,MAAAA,CAAO;EACpCC,YAAY;EACZC,KAAK;EACLC,KAAK;EACLC,cAAc;EACdC,OAAO;EACPC,GAAG;EACHC;AAAgB,CACjB;EACC,IAAIC,QAAA,GAAuCF,GAAA;EAC3C,IAAIA,GAAA,KAAQG,SAAA,IAAaJ,OAAA,EAAS;IAChCG,QAAA,GAAW,MAAMV,cAAA,CAAe,CAAC,GAAGO,OAAA;EACtC;EAEA,IAAI,CAACG,QAAA,EAAU;IACb,MAAM,IAAIE,KAAA,CAAM;EAClB;EAEA,MAAMC,UAAA,GAA6B,MAAAA,CAAO;IAAEC,EAAE;IAAEC,cAAc;IAAEC;EAAM,CAAE;IACtE,MAAMC,aAAA,GAEF,CAAC;IAEL,MAAMhB,QAAA,CAAS;MACba,EAAA;MACAC,cAAA;MACAZ,YAAA;MACAe,IAAA,EAAMD,aAAA;MACNb,KAAA;MACAC,KAAA,EAAOA,KAAA,IAAS;MAChBc,GAAA,EAAK;MACLb,cAAA,EAAgBA,cAAA,IAAkB;MAClCE,GAAA,EAAKE,QAAA;MACLM,MAAA;MACAP,gBAAA,EAAkBA,gBAAA,IAAoB;IACxC;IAEA,OAAOQ,aAAA,CAAcG,KAAK;EAC5B;EAEA,OAAOP,UAAA;AACT","ignoreList":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { HTMLPopulateFn } from '../html/async/types.js';
|
|
2
|
+
export declare const getRestPopulateFn: (args: {
|
|
3
|
+
/**
|
|
4
|
+
* E.g. `http://localhost:3000/api`
|
|
5
|
+
*/
|
|
6
|
+
apiURL: string;
|
|
7
|
+
depth?: number;
|
|
8
|
+
draft?: boolean;
|
|
9
|
+
locale?: string;
|
|
10
|
+
}) => HTMLPopulateFn;
|
|
11
|
+
//# sourceMappingURL=restPopulateFn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"restPopulateFn.d.ts","sourceRoot":"","sources":["../../../../src/features/converters/utilities/restPopulateFn.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAE5D,eAAO,MAAM,iBAAiB,EAAE,CAAC,IAAI,EAAE;IACrC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,KAAK,cAoBL,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { stringify } from 'qs-esm';
|
|
2
|
+
export const getRestPopulateFn = ({
|
|
3
|
+
apiURL,
|
|
4
|
+
depth,
|
|
5
|
+
draft,
|
|
6
|
+
locale
|
|
7
|
+
}) => {
|
|
8
|
+
const populateFn = async ({
|
|
9
|
+
id,
|
|
10
|
+
collectionSlug,
|
|
11
|
+
select
|
|
12
|
+
}) => {
|
|
13
|
+
const query = stringify({
|
|
14
|
+
depth: depth ?? 0,
|
|
15
|
+
draft: draft ?? false,
|
|
16
|
+
locale,
|
|
17
|
+
select
|
|
18
|
+
}, {
|
|
19
|
+
addQueryPrefix: true
|
|
20
|
+
});
|
|
21
|
+
const res = await fetch(`${apiURL}/${collectionSlug}/${id}${query}`, {
|
|
22
|
+
credentials: 'include',
|
|
23
|
+
headers: {
|
|
24
|
+
Accept: 'application/json',
|
|
25
|
+
'Content-Type': 'application/json'
|
|
26
|
+
},
|
|
27
|
+
method: 'GET'
|
|
28
|
+
}).then(res => res.json());
|
|
29
|
+
return res;
|
|
30
|
+
};
|
|
31
|
+
return populateFn;
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=restPopulateFn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"restPopulateFn.js","names":["stringify","getRestPopulateFn","apiURL","depth","draft","locale","populateFn","id","collectionSlug","select","query","addQueryPrefix","res","fetch","credentials","headers","Accept","method","then","json"],"sources":["../../../../src/features/converters/utilities/restPopulateFn.ts"],"sourcesContent":["import { stringify } from 'qs-esm'\n\nimport type { HTMLPopulateFn } from '../html/async/types.js'\n\nexport const getRestPopulateFn: (args: {\n /**\n * E.g. `http://localhost:3000/api`\n */\n apiURL: string\n depth?: number\n draft?: boolean\n locale?: string\n}) => HTMLPopulateFn = ({ apiURL, depth, draft, locale }) => {\n const populateFn: HTMLPopulateFn = async ({ id, collectionSlug, select }) => {\n const query = stringify(\n { depth: depth ?? 0, draft: draft ?? false, locale, select },\n { addQueryPrefix: true },\n )\n\n const res = await fetch(`${apiURL}/${collectionSlug}/${id}${query}`, {\n credentials: 'include',\n headers: {\n Accept: 'application/json',\n 'Content-Type': 'application/json',\n },\n method: 'GET',\n }).then((res) => res.json())\n\n return res\n }\n\n return populateFn\n}\n"],"mappings":"AAAA,SAASA,SAAS,QAAQ;AAI1B,OAAO,MAAMC,iBAAA,GAQUA,CAAC;EAAEC,MAAM;EAAEC,KAAK;EAAEC,KAAK;EAAEC;AAAM,CAAE;EACtD,MAAMC,UAAA,GAA6B,MAAAA,CAAO;IAAEC,EAAE;IAAEC,cAAc;IAAEC;EAAM,CAAE;IACtE,MAAMC,KAAA,GAAQV,SAAA,CACZ;MAAEG,KAAA,EAAOA,KAAA,IAAS;MAAGC,KAAA,EAAOA,KAAA,IAAS;MAAOC,MAAA;MAAQI;IAAO,GAC3D;MAAEE,cAAA,EAAgB;IAAK;IAGzB,MAAMC,GAAA,GAAM,MAAMC,KAAA,CAAM,GAAGX,MAAA,IAAUM,cAAA,IAAkBD,EAAA,GAAKG,KAAA,EAAO,EAAE;MACnEI,WAAA,EAAa;MACbC,OAAA,EAAS;QACPC,MAAA,EAAQ;QACR,gBAAgB;MAClB;MACAC,MAAA,EAAQ;IACV,GAAGC,IAAI,CAAEN,GAAA,IAAQA,GAAA,CAAIO,IAAI;IAEzB,OAAOP,GAAA;EACT;EAEA,OAAON,UAAA;AACT","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TableCellNode, TableNode, TableRowNode } from '@lexical/table';
|
|
2
2
|
import { sanitizeFields } from 'payload';
|
|
3
3
|
import { createServerFeature } from '../../../utilities/createServerFeature.js';
|
|
4
|
-
import { convertLexicalNodesToHTML } from '../../converters/
|
|
4
|
+
import { convertLexicalNodesToHTML } from '../../converters/html_deprecated/converter/index.js';
|
|
5
5
|
import { createNode } from '../../typeUtilities.js';
|
|
6
6
|
import { TableMarkdownTransformer } from '../markdownTransformer.js';
|
|
7
7
|
const fields = [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["TableCellNode","TableNode","TableRowNode","sanitizeFields","createServerFeature","convertLexicalNodesToHTML","createNode","TableMarkdownTransformer","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","converters","html","converter","currentDepth","depth","draft","node","overrideAccess","parent","req","showHiddenFields","childrenText","lexicalNodes","children","nodeTypes","getType","tagName","headerState","headerStateClass","backgroundColor","colSpan","rowSpan","key"],"sources":["../../../../src/features/experimental_table/server/index.ts"],"sourcesContent":["import type {\n SerializedTableCellNode as _SerializedTableCellNode,\n SerializedTableNode as _SerializedTableNode,\n SerializedTableRowNode as _SerializedTableRowNode,\n} from '@lexical/table'\nimport type { Spread } from 'lexical'\nimport 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 { convertLexicalNodesToHTML } from '../../converters/
|
|
1
|
+
{"version":3,"file":"index.js","names":["TableCellNode","TableNode","TableRowNode","sanitizeFields","createServerFeature","convertLexicalNodesToHTML","createNode","TableMarkdownTransformer","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","converters","html","converter","currentDepth","depth","draft","node","overrideAccess","parent","req","showHiddenFields","childrenText","lexicalNodes","children","nodeTypes","getType","tagName","headerState","headerStateClass","backgroundColor","colSpan","rowSpan","key"],"sources":["../../../../src/features/experimental_table/server/index.ts"],"sourcesContent":["import type {\n SerializedTableCellNode as _SerializedTableCellNode,\n SerializedTableNode as _SerializedTableNode,\n SerializedTableRowNode as _SerializedTableRowNode,\n} from '@lexical/table'\nimport type { Spread } from 'lexical'\nimport 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 { convertLexicalNodesToHTML } from '../../converters/html_deprecated/converter/index.js'\nimport { createNode } from '../../typeUtilities.js'\nimport { TableMarkdownTransformer } from '../markdownTransformer.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 type SerializedTableCellNode = Spread<\n {\n type: 'tablecell'\n },\n _SerializedTableCellNode\n>\n\nexport type SerializedTableNode = Spread<\n {\n type: 'table'\n },\n _SerializedTableNode\n>\n\nexport type SerializedTableRowNode = Spread<\n {\n type: 'tablerow'\n },\n _SerializedTableRowNode\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: [TableMarkdownTransformer],\n nodes: [\n createNode({\n converters: {\n html: {\n converter: async ({\n converters,\n currentDepth,\n depth,\n draft,\n node,\n overrideAccess,\n parent,\n req,\n showHiddenFields,\n }) => {\n const childrenText = await convertLexicalNodesToHTML({\n converters,\n currentDepth,\n depth,\n draft,\n lexicalNodes: node.children,\n overrideAccess,\n parent: {\n ...node,\n parent,\n },\n req,\n showHiddenFields,\n })\n return `<div class=\"lexical-table-container\"><table class=\"lexical-table\" style=\"border-collapse: collapse;\">${childrenText}</table></div>`\n },\n nodeTypes: [TableNode.getType()],\n },\n },\n node: TableNode,\n }),\n createNode({\n converters: {\n html: {\n converter: async ({\n converters,\n currentDepth,\n depth,\n draft,\n node,\n overrideAccess,\n parent,\n req,\n showHiddenFields,\n }) => {\n const childrenText = await convertLexicalNodesToHTML({\n converters,\n currentDepth,\n depth,\n draft,\n lexicalNodes: node.children,\n overrideAccess,\n parent: {\n ...node,\n parent,\n },\n req,\n showHiddenFields,\n })\n\n const tagName = node.headerState > 0 ? 'th' : 'td'\n const headerStateClass = `lexical-table-cell-header-${node.headerState}`\n const backgroundColor = node.backgroundColor\n ? `background-color: ${node.backgroundColor};`\n : ''\n const colSpan = node.colSpan && node.colSpan > 1 ? `colspan=\"${node.colSpan}\"` : ''\n const rowSpan = node.rowSpan && node.rowSpan > 1 ? `rowspan=\"${node.rowSpan}\"` : ''\n\n return `<${tagName} class=\"lexical-table-cell ${headerStateClass}\" style=\"border: 1px solid #ccc; padding: 8px; ${backgroundColor}\" ${colSpan} ${rowSpan}>${childrenText}</${tagName}>`\n },\n nodeTypes: [TableCellNode.getType()],\n },\n },\n node: TableCellNode,\n }),\n createNode({\n converters: {\n html: {\n converter: async ({\n converters,\n currentDepth,\n depth,\n draft,\n node,\n overrideAccess,\n parent,\n req,\n showHiddenFields,\n }) => {\n const childrenText = await convertLexicalNodesToHTML({\n converters,\n currentDepth,\n depth,\n draft,\n lexicalNodes: node.children,\n overrideAccess,\n parent: {\n ...node,\n parent,\n },\n req,\n showHiddenFields,\n })\n return `<tr class=\"lexical-table-row\">${childrenText}</tr>`\n },\n nodeTypes: [TableRowNode.getType()],\n },\n },\n node: TableRowNode,\n }),\n ],\n }\n },\n key: 'experimental_table',\n})\n"],"mappings":"AAQA,SAASA,aAAa,EAAEC,SAAS,EAAEC,YAAY,QAAQ;AACvD,SAASC,cAAc,QAAQ;AAE/B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,UAAU,QAAQ;AAC3B,SAASC,wBAAwB,QAAQ;AAEzC,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;AAsBD,OAAO,MAAMC,yBAAA,GAA4BT,mBAAA,CAAoB;EAC3DU,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,MAAMpB,cAAA,CAA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cACF;cACA,OAAO,iCAAiCC,YAAA,OAAmB;YAC7D;YACAG,SAAA,EAAW,CAAC5C,YAAA,CAAa6C,OAAO;UAClC;QACF;QACAT,IAAA,EAAMpC;MACR;IAEJ;EACF;EACAoD,GAAA,EAAK;AACP","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HeadingNode } from '@lexical/rich-text';
|
|
2
2
|
import { createServerFeature } from '../../../utilities/createServerFeature.js';
|
|
3
|
-
import { convertLexicalNodesToHTML } from '../../converters/
|
|
3
|
+
import { convertLexicalNodesToHTML } from '../../converters/html_deprecated/converter/index.js';
|
|
4
4
|
import { createNode } from '../../typeUtilities.js';
|
|
5
5
|
import { MarkdownTransformer } from '../markdownTransformer.js';
|
|
6
6
|
import { i18n } from './i18n.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["HeadingNode","createServerFeature","convertLexicalNodesToHTML","createNode","MarkdownTransformer","i18n","HeadingFeature","feature","props","enabledHeadingSizes","ClientFeature","clientFeatureProps","markdownTransformers","nodes","converters","html","converter","currentDepth","depth","draft","node","overrideAccess","parent","req","showHiddenFields","childrenText","lexicalNodes","children","style","format","indent","filter","Boolean","join","tag","nodeTypes","getType","sanitizedServerFeatureProps","key"],"sources":["../../../../src/features/heading/server/index.ts"],"sourcesContent":["import type {\n SerializedHeadingNode as _SerializedHeadingNode,\n HeadingTagType,\n} from '@lexical/rich-text'\nimport type { Spread } from 'lexical'\n\nimport { HeadingNode } from '@lexical/rich-text'\n\nimport { createServerFeature } from '../../../utilities/createServerFeature.js'\nimport { convertLexicalNodesToHTML } from '../../converters/
|
|
1
|
+
{"version":3,"file":"index.js","names":["HeadingNode","createServerFeature","convertLexicalNodesToHTML","createNode","MarkdownTransformer","i18n","HeadingFeature","feature","props","enabledHeadingSizes","ClientFeature","clientFeatureProps","markdownTransformers","nodes","converters","html","converter","currentDepth","depth","draft","node","overrideAccess","parent","req","showHiddenFields","childrenText","lexicalNodes","children","style","format","indent","filter","Boolean","join","tag","nodeTypes","getType","sanitizedServerFeatureProps","key"],"sources":["../../../../src/features/heading/server/index.ts"],"sourcesContent":["import type {\n SerializedHeadingNode as _SerializedHeadingNode,\n HeadingTagType,\n} from '@lexical/rich-text'\nimport type { Spread } from 'lexical'\n\nimport { HeadingNode } from '@lexical/rich-text'\n\nimport { createServerFeature } from '../../../utilities/createServerFeature.js'\nimport { convertLexicalNodesToHTML } from '../../converters/html_deprecated/converter/index.js'\nimport { createNode } from '../../typeUtilities.js'\nimport { MarkdownTransformer } from '../markdownTransformer.js'\nimport { i18n } from './i18n.js'\n\nexport type SerializedHeadingNode = Spread<\n {\n type: 'heading'\n },\n _SerializedHeadingNode\n>\n\nexport type HeadingFeatureProps = {\n enabledHeadingSizes?: HeadingTagType[]\n}\n\nexport const HeadingFeature = createServerFeature<\n HeadingFeatureProps,\n HeadingFeatureProps,\n HeadingFeatureProps\n>({\n feature: ({ props }) => {\n if (!props) {\n props = {}\n }\n\n const { enabledHeadingSizes = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] } = props\n\n return {\n ClientFeature: '@payloadcms/richtext-lexical/client#HeadingFeatureClient',\n clientFeatureProps: props,\n i18n,\n markdownTransformers: [MarkdownTransformer(enabledHeadingSizes)],\n nodes: [\n createNode({\n converters: {\n html: {\n converter: async ({\n converters,\n currentDepth,\n depth,\n draft,\n node,\n overrideAccess,\n parent,\n req,\n showHiddenFields,\n }) => {\n const childrenText = await convertLexicalNodesToHTML({\n converters,\n currentDepth,\n depth,\n draft,\n lexicalNodes: node.children,\n overrideAccess,\n parent: {\n ...node,\n parent,\n },\n req,\n showHiddenFields,\n })\n const style = [\n node.format ? `text-align: ${node.format};` : '',\n node.indent > 0 ? `padding-inline-start: ${node.indent * 40}px;` : '',\n ]\n .filter(Boolean)\n .join(' ')\n return `<${node?.tag}${style ? ` style='${style}'` : ''}>${childrenText}</${node?.tag}>`\n },\n nodeTypes: [HeadingNode.getType()],\n },\n },\n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M,GAAG,OAAO,GAAG,GACpE,CACEC,MAAM,CAACC,OAAA,EACPC,IAAI,CAAC;cACR,OAAO,IAAIb,IAAA,EAAMc,GAAA,GAAMN,KAAA,GAAQ,WAAWA,KAAA,GAAQ,GAAG,MAAMH,YAAA,KAAiBL,IAAA,EAAMc,GAAA,GAAM;YAC1F;YACAC,SAAA,EAAW,CAACnC,WAAA,CAAYoC,OAAO;UACjC;QACF;QACAhB,IAAA,EAAMpB;MACR,GACD;MACDqC,2BAAA,EAA6B7B;IAC/B;EACF;EACA8B,GAAA,EAAK;AACP","ignoreList":[]}
|
|
@@ -2,6 +2,7 @@ import type { ExclusiveLinkCollectionsProps } from '../server/index.js';
|
|
|
2
2
|
export type ClientProps = {
|
|
3
3
|
defaultLinkType?: string;
|
|
4
4
|
defaultLinkURL?: string;
|
|
5
|
+
disableAutoLinks?: 'creationOnly' | true;
|
|
5
6
|
} & ExclusiveLinkCollectionsProps;
|
|
6
|
-
export declare const LinkFeatureClient: import("../../typesClient.js").FeatureProviderProviderClient<
|
|
7
|
+
export declare const LinkFeatureClient: import("../../typesClient.js").FeatureProviderProviderClient<ClientProps, ClientProps>;
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/link/client/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/link/client/index.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAA;AAevE,MAAM,MAAM,WAAW,GAAG;IACxB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,gBAAgB,CAAC,EAAE,cAAc,GAAG,IAAI,CAAA;CACzC,GAAG,6BAA6B,CAAA;AAuDjC,eAAO,MAAM,iBAAiB,wFAgC3B,CAAA"}
|
|
@@ -68,13 +68,15 @@ const toolbarGroups = [toolbarFeatureButtonsGroupWithItems([{
|
|
|
68
68
|
},
|
|
69
69
|
order: 1
|
|
70
70
|
}])];
|
|
71
|
-
export const LinkFeatureClient = createClientFeature({
|
|
71
|
+
export const LinkFeatureClient = createClientFeature(({
|
|
72
|
+
props
|
|
73
|
+
}) => ({
|
|
72
74
|
markdownTransformers: [LinkMarkdownTransformer],
|
|
73
|
-
nodes: [LinkNode, AutoLinkNode],
|
|
75
|
+
nodes: [LinkNode, props?.disableAutoLinks === true ? null : AutoLinkNode].filter(Boolean),
|
|
74
76
|
plugins: [{
|
|
75
77
|
Component: LinkPlugin,
|
|
76
78
|
position: 'normal'
|
|
77
|
-
}, {
|
|
79
|
+
}, props?.disableAutoLinks === true || props?.disableAutoLinks === 'creationOnly' ? null : {
|
|
78
80
|
Component: AutoLinkPlugin,
|
|
79
81
|
position: 'normal'
|
|
80
82
|
}, {
|
|
@@ -83,12 +85,13 @@ export const LinkFeatureClient = createClientFeature({
|
|
|
83
85
|
}, {
|
|
84
86
|
Component: FloatingLinkEditorPlugin,
|
|
85
87
|
position: 'floatingAnchorElem'
|
|
86
|
-
}],
|
|
88
|
+
}].filter(Boolean),
|
|
89
|
+
sanitizedClientFeatureProps: props,
|
|
87
90
|
toolbarFixed: {
|
|
88
91
|
groups: toolbarGroups
|
|
89
92
|
},
|
|
90
93
|
toolbarInline: {
|
|
91
94
|
groups: toolbarGroups
|
|
92
95
|
}
|
|
93
|
-
});
|
|
96
|
+
}));
|
|
94
97
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["$findMatchingParent","$getSelection","$isRangeSelection","LinkIcon","getSelectedNode","createClientFeature","toolbarFeatureButtonsGroupWithItems","LinkMarkdownTransformer","AutoLinkNode","$isLinkNode","LinkNode","TOGGLE_LINK_COMMAND","AutoLinkPlugin","ClickableLinkPlugin","FloatingLinkEditorPlugin","TOGGLE_LINK_WITH_MODAL_COMMAND","LinkPlugin","toolbarGroups","ChildComponent","isActive","selection","selectedNode","linkParent","isEnabled","getTextContent","length","key","label","i18n","t","onSelect","editor","selectedText","selectedNodes","getEditorState","read","getNodes","linkFields","doc","newTab","dispatchCommand","fields","text","order","LinkFeatureClient","markdownTransformers","nodes","plugins","Component","position","toolbarFixed","groups","toolbarInline"],"sources":["../../../../src/features/link/client/index.tsx"],"sourcesContent":["'use client'\n\nimport type { LexicalNode } from 'lexical'\n\nimport { $findMatchingParent } from '@lexical/utils'\nimport { $getSelection, $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\nimport type { LinkFields } from '../nodes/types.js'\nimport type { ExclusiveLinkCollectionsProps } from '../server/index.js'\n\nimport { LinkIcon } from '../../../lexical/ui/icons/Link/index.js'\nimport { getSelectedNode } from '../../../lexical/utils/getSelectedNode.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { toolbarFeatureButtonsGroupWithItems } from '../../shared/toolbar/featureButtonsGroup.js'\nimport { LinkMarkdownTransformer } from '../markdownTransformer.js'\nimport { AutoLinkNode } from '../nodes/AutoLinkNode.js'\nimport { $isLinkNode, LinkNode, TOGGLE_LINK_COMMAND } from '../nodes/LinkNode.js'\nimport { AutoLinkPlugin } from './plugins/autoLink/index.js'\nimport { ClickableLinkPlugin } from './plugins/clickableLink/index.js'\nimport { FloatingLinkEditorPlugin } from './plugins/floatingLinkEditor/index.js'\nimport { TOGGLE_LINK_WITH_MODAL_COMMAND } from './plugins/floatingLinkEditor/LinkEditor/commands.js'\nimport { LinkPlugin } from './plugins/link/index.js'\n\nexport type ClientProps = {\n defaultLinkType?: string\n defaultLinkURL?: string\n} & ExclusiveLinkCollectionsProps\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarFeatureButtonsGroupWithItems([\n {\n ChildComponent: LinkIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection)) {\n const selectedNode = getSelectedNode(selection)\n const linkParent = $findMatchingParent(selectedNode, $isLinkNode)\n return linkParent != null\n }\n return false\n },\n isEnabled: ({ selection }) => {\n return !!($isRangeSelection(selection) && $getSelection()?.getTextContent()?.length)\n },\n key: 'link',\n label: ({ i18n }) => {\n return i18n.t('lexical:link:label')\n },\n onSelect: ({ editor, isActive }) => {\n if (!isActive) {\n let selectedText: string | undefined\n let selectedNodes: LexicalNode[] = []\n editor.getEditorState().read(() => {\n selectedText = $getSelection()?.getTextContent()\n // We need to selected nodes here before the drawer opens, as clicking around in the drawer may change the original selection\n selectedNodes = $getSelection()?.getNodes() ?? []\n })\n\n if (!selectedText?.length) {\n return\n }\n\n const linkFields: Partial<LinkFields> = {\n doc: null,\n newTab: false,\n }\n\n editor.dispatchCommand(TOGGLE_LINK_WITH_MODAL_COMMAND, {\n fields: linkFields,\n selectedNodes,\n text: selectedText,\n })\n } else {\n // remove link\n editor.dispatchCommand(TOGGLE_LINK_COMMAND, null)\n }\n },\n order: 1,\n },\n ]),\n]\n\nexport const LinkFeatureClient = createClientFeature({\n markdownTransformers: [LinkMarkdownTransformer],\n nodes: [LinkNode, AutoLinkNode],\n plugins: [\n {\n Component: LinkPlugin,\n position: 'normal',\n },\n {\n
|
|
1
|
+
{"version":3,"file":"index.js","names":["$findMatchingParent","$getSelection","$isRangeSelection","LinkIcon","getSelectedNode","createClientFeature","toolbarFeatureButtonsGroupWithItems","LinkMarkdownTransformer","AutoLinkNode","$isLinkNode","LinkNode","TOGGLE_LINK_COMMAND","AutoLinkPlugin","ClickableLinkPlugin","FloatingLinkEditorPlugin","TOGGLE_LINK_WITH_MODAL_COMMAND","LinkPlugin","toolbarGroups","ChildComponent","isActive","selection","selectedNode","linkParent","isEnabled","getTextContent","length","key","label","i18n","t","onSelect","editor","selectedText","selectedNodes","getEditorState","read","getNodes","linkFields","doc","newTab","dispatchCommand","fields","text","order","LinkFeatureClient","props","markdownTransformers","nodes","disableAutoLinks","filter","Boolean","plugins","Component","position","sanitizedClientFeatureProps","toolbarFixed","groups","toolbarInline"],"sources":["../../../../src/features/link/client/index.tsx"],"sourcesContent":["'use client'\n\nimport type { Klass, LexicalNode } from 'lexical'\n\nimport { $findMatchingParent } from '@lexical/utils'\nimport { $getSelection, $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\nimport type { ClientFeature } from '../../typesClient.js'\nimport type { LinkFields } from '../nodes/types.js'\nimport type { ExclusiveLinkCollectionsProps } from '../server/index.js'\n\nimport { LinkIcon } from '../../../lexical/ui/icons/Link/index.js'\nimport { getSelectedNode } from '../../../lexical/utils/getSelectedNode.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { toolbarFeatureButtonsGroupWithItems } from '../../shared/toolbar/featureButtonsGroup.js'\nimport { LinkMarkdownTransformer } from '../markdownTransformer.js'\nimport { AutoLinkNode } from '../nodes/AutoLinkNode.js'\nimport { $isLinkNode, LinkNode, TOGGLE_LINK_COMMAND } from '../nodes/LinkNode.js'\nimport { AutoLinkPlugin } from './plugins/autoLink/index.js'\nimport { ClickableLinkPlugin } from './plugins/clickableLink/index.js'\nimport { FloatingLinkEditorPlugin } from './plugins/floatingLinkEditor/index.js'\nimport { TOGGLE_LINK_WITH_MODAL_COMMAND } from './plugins/floatingLinkEditor/LinkEditor/commands.js'\nimport { LinkPlugin } from './plugins/link/index.js'\n\nexport type ClientProps = {\n defaultLinkType?: string\n defaultLinkURL?: string\n disableAutoLinks?: 'creationOnly' | true\n} & ExclusiveLinkCollectionsProps\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarFeatureButtonsGroupWithItems([\n {\n ChildComponent: LinkIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection)) {\n const selectedNode = getSelectedNode(selection)\n const linkParent = $findMatchingParent(selectedNode, $isLinkNode)\n return linkParent != null\n }\n return false\n },\n isEnabled: ({ selection }) => {\n return !!($isRangeSelection(selection) && $getSelection()?.getTextContent()?.length)\n },\n key: 'link',\n label: ({ i18n }) => {\n return i18n.t('lexical:link:label')\n },\n onSelect: ({ editor, isActive }) => {\n if (!isActive) {\n let selectedText: string | undefined\n let selectedNodes: LexicalNode[] = []\n editor.getEditorState().read(() => {\n selectedText = $getSelection()?.getTextContent()\n // We need to selected nodes here before the drawer opens, as clicking around in the drawer may change the original selection\n selectedNodes = $getSelection()?.getNodes() ?? []\n })\n\n if (!selectedText?.length) {\n return\n }\n\n const linkFields: Partial<LinkFields> = {\n doc: null,\n newTab: false,\n }\n\n editor.dispatchCommand(TOGGLE_LINK_WITH_MODAL_COMMAND, {\n fields: linkFields,\n selectedNodes,\n text: selectedText,\n })\n } else {\n // remove link\n editor.dispatchCommand(TOGGLE_LINK_COMMAND, null)\n }\n },\n order: 1,\n },\n ]),\n]\n\nexport const LinkFeatureClient = createClientFeature<ClientProps>(({ props }) => ({\n markdownTransformers: [LinkMarkdownTransformer],\n nodes: [LinkNode, props?.disableAutoLinks === true ? null : AutoLinkNode].filter(\n Boolean,\n ) as Array<Klass<LexicalNode>>,\n plugins: [\n {\n Component: LinkPlugin,\n position: 'normal',\n },\n props?.disableAutoLinks === true || props?.disableAutoLinks === 'creationOnly'\n ? null\n : {\n Component: AutoLinkPlugin,\n position: 'normal',\n },\n {\n Component: ClickableLinkPlugin,\n position: 'normal',\n },\n {\n Component: FloatingLinkEditorPlugin,\n position: 'floatingAnchorElem',\n },\n ].filter(Boolean) as ClientFeature<ClientProps>['plugins'],\n sanitizedClientFeatureProps: props,\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n}))\n"],"mappings":"AAAA;;AAIA,SAASA,mBAAmB,QAAQ;AACpC,SAASC,aAAa,EAAEC,iBAAiB,QAAQ;AAOjD,SAASC,QAAQ,QAAQ;AACzB,SAASC,eAAe,QAAQ;AAChC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,mCAAmC,QAAQ;AACpD,SAASC,uBAAuB,QAAQ;AACxC,SAASC,YAAY,QAAQ;AAC7B,SAASC,WAA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ACrD0B,MAAA,EAAQJ,UAAA;QACRJ,aAAA;QACAS,IAAA,EAAMV;MACR;IACF,OAAO;MACL;MACAD,MAAA,CAAOS,eAAe,CAAC7B,mBAAA,EAAqB;IAC9C;EACF;EACAgC,KAAA,EAAO;AACT,EACD,EACF;AAED,OAAO,MAAMC,iBAAA,GAAoBvC,mBAAA,CAAiC,CAAC;EAAEwC;AAAK,CAAE,MAAM;EAChFC,oBAAA,EAAsB,CAACvC,uBAAA,CAAwB;EAC/CwC,KAAA,EAAO,CAACrC,QAAA,EAAUmC,KAAA,EAAOG,gBAAA,KAAqB,OAAO,OAAOxC,YAAA,CAAa,CAACyC,MAAM,CAC9EC,OAAA;EAEFC,OAAA,EAAS,CACP;IACEC,SAAA,EAAWpC,UAAA;IACXqC,QAAA,EAAU;EACZ,GACAR,KAAA,EAAOG,gBAAA,KAAqB,QAAQH,KAAA,EAAOG,gBAAA,KAAqB,iBAC5D,OACA;IACEI,SAAA,EAAWxC,cAAA;IACXyC,QAAA,EAAU;EACZ,GACJ;IACED,SAAA,EAAWvC,mBAAA;IACXwC,QAAA,EAAU;EACZ,GACA;IACED,SAAA,EAAWtC,wBAAA;IACXuC,QAAA,EAAU;EACZ,EACD,CAACJ,MAAM,CAACC,OAAA;EACTI,2BAAA,EAA6BT,KAAA;EAC7BU,YAAA,EAAc;IACZC,MAAA,EAAQvC;EACV;EACAwC,aAAA,EAAe;IACbD,MAAA,EAAQvC;EACV;AACF","ignoreList":[]}
|
|
@@ -16,6 +16,16 @@ export type ExclusiveLinkCollectionsProps = {
|
|
|
16
16
|
enabledCollections?: CollectionSlug[];
|
|
17
17
|
};
|
|
18
18
|
export type LinkFeatureServerProps = {
|
|
19
|
+
/**
|
|
20
|
+
* Disables the automatic creation of links from URLs pasted into the editor, as well
|
|
21
|
+
* as auto link nodes.
|
|
22
|
+
*
|
|
23
|
+
* If set to 'creationOnly', only the creation of new auto link nodes will be disabled.
|
|
24
|
+
* Existing auto link nodes will still be editable.
|
|
25
|
+
*
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
disableAutoLinks?: 'creationOnly' | true;
|
|
19
29
|
/**
|
|
20
30
|
* A function or array defining additional fields for the link feature. These will be
|
|
21
31
|
* displayed in the link editor drawer.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/link/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EAEd,KAAK,EACL,kBAAkB,EAElB,eAAe,EAChB,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/link/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EAEd,KAAK,EACL,kBAAkB,EAElB,eAAe,EAChB,MAAM,SAAS,CAAA;AAMhB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAarD,MAAM,MAAM,6BAA6B,GACrC;IACE;;;QAGI;IACJ,mBAAmB,CAAC,EAAE,cAAc,EAAE,CAAA;IAGtC,kBAAkB,CAAC,EAAE,KAAK,CAAA;CAC3B,GACD;IAEE,mBAAmB,CAAC,EAAE,KAAK,CAAA;IAE3B;;;QAGI;IACJ,kBAAkB,CAAC,EAAE,cAAc,EAAE,CAAA;CACtC,CAAA;AAEL,MAAM,MAAM,sBAAsB,GAAG;IACnC;;;;;;;;OAQG;IACH,gBAAgB,CAAC,EAAE,cAAc,GAAG,IAAI,CAAA;IACxC;;;OAGG;IACH,MAAM,CAAC,EACH,CAAC,CAAC,IAAI,EAAE;QACN,MAAM,EAAE,eAAe,CAAA;QACvB,aAAa,EAAE,kBAAkB,EAAE,CAAA;KACpC,KAAK,CAAC,KAAK,GAAG,kBAAkB,CAAC,EAAE,CAAC,GACrC,KAAK,EAAE,CAAA;IACX;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,GAAG,6BAA6B,CAAA;AAEjC,eAAO,MAAM,WAAW,2HAgMtB,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import escapeHTML from 'escape-html';
|
|
2
2
|
import { sanitizeFields } from 'payload';
|
|
3
3
|
import { createServerFeature } from '../../../utilities/createServerFeature.js';
|
|
4
|
-
import { convertLexicalNodesToHTML } from '../../converters/
|
|
4
|
+
import { convertLexicalNodesToHTML } from '../../converters/html_deprecated/converter/index.js';
|
|
5
5
|
import { createNode } from '../../typeUtilities.js';
|
|
6
6
|
import { LinkMarkdownTransformer } from '../markdownTransformer.js';
|
|
7
7
|
import { AutoLinkNode } from '../nodes/AutoLinkNode.js';
|
|
@@ -51,6 +51,7 @@ export const LinkFeature = createServerFeature({
|
|
|
51
51
|
clientFeatureProps: {
|
|
52
52
|
defaultLinkType,
|
|
53
53
|
defaultLinkURL,
|
|
54
|
+
disableAutoLinks: props.disableAutoLinks,
|
|
54
55
|
disabledCollections: props.disabledCollections,
|
|
55
56
|
enabledCollections: props.enabledCollections
|
|
56
57
|
},
|
|
@@ -66,7 +67,7 @@ export const LinkFeature = createServerFeature({
|
|
|
66
67
|
},
|
|
67
68
|
i18n,
|
|
68
69
|
markdownTransformers: [LinkMarkdownTransformer],
|
|
69
|
-
nodes: [createNode({
|
|
70
|
+
nodes: [props?.disableAutoLinks === true ? null : createNode({
|
|
70
71
|
converters: {
|
|
71
72
|
html: {
|
|
72
73
|
converter: async ({
|
|
@@ -155,7 +156,7 @@ export const LinkFeature = createServerFeature({
|
|
|
155
156
|
graphQLPopulationPromises: [linkPopulationPromiseHOC(props)],
|
|
156
157
|
node: LinkNode,
|
|
157
158
|
validations: [linkValidation(props, sanitizedFieldsWithoutText)]
|
|
158
|
-
})],
|
|
159
|
+
})].filter(Boolean),
|
|
159
160
|
sanitizedServerFeatureProps: props
|
|
160
161
|
};
|
|
161
162
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["escapeHTML","sanitizeFields","createServerFeature","convertLexicalNodesToHTML","createNode","LinkMarkdownTransformer","AutoLinkNode","LinkNode","linkPopulationPromiseHOC","i18n","transformExtraFields","linkValidation","LinkFeature","feature","config","_config","isRoot","parentIsLocalized","props","validRelationships","collections","map","c","slug","_transformedFields","fields","enabledCollections","disabledCollections","maxDepth","sanitizedFields","requireFieldLevelRichTextEditor","sanitizedFieldsWithoutText","filter","field","name","linkTypeField","linkURLField","defaultLinkType","defaultValue","undefined","defaultLinkURL","ClientFeature","clientFeatureProps","generateSchemaMap","Array","isArray","length","schemaMap","Map","set","markdownTransformers","nodes","converters","html","converter","currentDepth","depth","draft","node","overrideAccess","parent","req","showHiddenFields","childrenText","lexicalNodes","children","rel","newTab","target","href","url","linkType","doc","value","String","id","nodeTypes","getType","validations","getSubFields","getSubFieldsData","graphQLPopulationPromises","sanitizedServerFeatureProps","key"],"sources":["../../../../src/features/link/server/index.ts"],"sourcesContent":["import type {\n CollectionSlug,\n Config,\n Field,\n FieldAffectingData,\n FieldSchemaMap,\n SanitizedConfig,\n} from 'payload'\n\nimport escapeHTML from 'escape-html'\nimport { sanitizeFields } from 'payload'\n\nimport type { ClientProps } from '../client/index.js'\n\nimport { createServerFeature } from '../../../utilities/createServerFeature.js'\nimport { convertLexicalNodesToHTML } from '../../converters/html/converter/index.js'\nimport { createNode } from '../../typeUtilities.js'\nimport { LinkMarkdownTransformer } from '../markdownTransformer.js'\nimport { AutoLinkNode } from '../nodes/AutoLinkNode.js'\nimport { LinkNode } from '../nodes/LinkNode.js'\nimport { linkPopulationPromiseHOC } from './graphQLPopulationPromise.js'\nimport { i18n } from './i18n.js'\nimport { transformExtraFields } from './transformExtraFields.js'\nimport { linkValidation } from './validate.js'\n\nexport type ExclusiveLinkCollectionsProps =\n | {\n /**\n * The collections that should be disabled for internal linking. Overrides the `enableRichTextLink` property in the collection config.\n * When this property is set, `enabledCollections` will not be available.\n **/\n disabledCollections?: CollectionSlug[]\n\n // Ensures that enabledCollections is not available when disabledCollections is set\n enabledCollections?: never\n }\n | {\n // Ensures that disabledCollections is not available when enabledCollections is set\n disabledCollections?: never\n\n /**\n * The collections that should be enabled for internal linking. Overrides the `enableRichTextLink` property in the collection config\n * When this property is set, `disabledCollections` will not be available.\n **/\n enabledCollections?: CollectionSlug[]\n }\n\nexport type LinkFeatureServerProps = {\n /**\n * A function or array defining additional fields for the link feature. These will be\n * displayed in the link editor drawer.\n */\n fields?:\n | ((args: {\n config: SanitizedConfig\n defaultFields: FieldAffectingData[]\n }) => (Field | FieldAffectingData)[])\n | Field[]\n /**\n * Sets a maximum population depth for the internal doc default field of link, regardless of the remaining depth when the field is reached.\n * This behaves exactly like the maxDepth properties of relationship and upload fields.\n *\n * {@link https://payloadcms.com/docs/getting-started/concepts#field-level-max-depth}\n */\n maxDepth?: number\n} & ExclusiveLinkCollectionsProps\n\nexport const LinkFeature = createServerFeature<\n LinkFeatureServerProps,\n LinkFeatureServerProps,\n ClientProps\n>({\n feature: async ({ config: _config, isRoot, parentIsLocalized, props }) => {\n if (!props) {\n props = {}\n }\n const validRelationships = _config.collections.map((c) => c.slug) || []\n\n const _transformedFields = transformExtraFields(\n props.fields ? props.fields : null,\n _config,\n props.enabledCollections,\n props.disabledCollections,\n props.maxDepth,\n )\n\n const sanitizedFields = await sanitizeFields({\n config: _config as unknown as Config,\n fields: _transformedFields,\n parentIsLocalized,\n requireFieldLevelRichTextEditor: isRoot,\n validRelationships,\n })\n props.fields = sanitizedFields\n\n // the text field is not included in the node data.\n // Thus, for tasks like validation, we do not want to pass it a text field in the schema which will never have data.\n // Otherwise, it will cause a validation error (field is required).\n const sanitizedFieldsWithoutText = sanitizedFields.filter(\n (field) => !('name' in field) || field.name !== 'text',\n )\n\n let linkTypeField: Field | null = null\n let linkURLField: Field | null = null\n\n for (const field of sanitizedFields) {\n if ('name' in field && field.name === 'linkType') {\n linkTypeField = field\n }\n\n if ('name' in field && field.name === 'url') {\n linkURLField = field\n }\n }\n\n const defaultLinkType = linkTypeField\n ? 'defaultValue' in linkTypeField && typeof linkTypeField.defaultValue === 'string'\n ? linkTypeField.defaultValue\n : 'custom'\n : undefined\n\n const defaultLinkURL = linkURLField\n ? 'defaultValue' in linkURLField && typeof linkURLField.defaultValue === 'string'\n ? linkURLField.defaultValue\n : 'https://'\n : undefined\n\n return {\n ClientFeature: '@payloadcms/richtext-lexical/client#LinkFeatureClient',\n clientFeatureProps: {\n defaultLinkType,\n defaultLinkURL,\n disabledCollections: props.disabledCollections,\n enabledCollections: props.enabledCollections,\n } as ClientProps,\n generateSchemaMap: () => {\n if (!sanitizedFields || !Array.isArray(sanitizedFields) || sanitizedFields.length === 0) {\n return null\n }\n\n const schemaMap: FieldSchemaMap = new Map()\n schemaMap.set('fields', {\n fields: sanitizedFields,\n })\n\n return schemaMap\n },\n i18n,\n markdownTransformers: [LinkMarkdownTransformer],\n nodes: [\n createNode({\n converters: {\n html: {\n converter: async ({\n converters,\n currentDepth,\n depth,\n draft,\n node,\n overrideAccess,\n parent,\n req,\n showHiddenFields,\n }) => {\n const childrenText = await convertLexicalNodesToHTML({\n converters,\n currentDepth,\n depth,\n draft,\n lexicalNodes: node.children,\n overrideAccess,\n parent: {\n ...node,\n parent,\n },\n req,\n showHiddenFields,\n })\n\n const rel: string = node.fields.newTab ? ' rel=\"noopener noreferrer\"' : ''\n const target: string = node.fields.newTab ? ' target=\"_blank\"' : ''\n\n let href: string = node.fields.url ?? ''\n if (node.fields.linkType === 'internal') {\n href =\n typeof node.fields.doc?.value !== 'object'\n ? String(node.fields.doc?.value)\n : String(node.fields.doc?.value?.id)\n }\n\n return `<a href=\"${href}\"${target}${rel}>${childrenText}</a>`\n },\n nodeTypes: [AutoLinkNode.getType()],\n },\n },\n node: AutoLinkNode,\n // Since AutoLinkNodes are just internal links, they need no hooks or graphQL population promises\n validations: [linkValidation(props, sanitizedFieldsWithoutText)],\n }),\n createNode({\n converters: {\n html: {\n converter: async ({\n converters,\n currentDepth,\n depth,\n draft,\n node,\n overrideAccess,\n parent,\n req,\n showHiddenFields,\n }) => {\n const childrenText = await convertLexicalNodesToHTML({\n converters,\n currentDepth,\n depth,\n draft,\n lexicalNodes: node.children,\n overrideAccess,\n parent: {\n ...node,\n parent,\n },\n req,\n showHiddenFields,\n })\n\n const rel: string = node.fields.newTab ? ' rel=\"noopener noreferrer\"' : ''\n const target: string = node.fields.newTab ? ' target=\"_blank\"' : ''\n\n const href: string =\n node.fields.linkType === 'custom'\n ? escapeHTML(node.fields.url)\n : (node.fields.doc?.value as string)\n\n return `<a href=\"${href}\"${target}${rel}>${childrenText}</a>`\n },\n nodeTypes: [LinkNode.getType()],\n },\n },\n getSubFields: () => {\n return sanitizedFieldsWithoutText\n },\n getSubFieldsData: ({ node }) => {\n return node?.fields\n },\n graphQLPopulationPromises: [linkPopulationPromiseHOC(props)],\n node: LinkNode,\n validations: [linkValidation(props, sanitizedFieldsWithoutText)],\n }),\n ],\n sanitizedServerFeatureProps: props,\n }\n },\n key: 'link',\n})\n"],"mappings":"AASA,OAAOA,UAAA,MAAgB;AACvB,SAASC,cAAc,QAAQ;AAI/B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,UAAU,QAAQ;AAC3B,SAASC,uBAAuB,QAAQ;AACxC,SAASC,YAAY,QAAQ;AAC7B,SAASC,QAAQ,QAAQ;AACzB,SAASC,wBAAwB,QAAQ;AACzC,SAASC,IAAI,QAAQ;AACrB,SAASC,oBAAoB,QAAQ;AACrC,SAASC,cAAc,QAAQ;AA4C/B,OAAO,MAAMC,WAAA,GAAcV,mBAAA,CAIzB;EACAW,OAAA,EAAS,MAAAA,CAAO;IAAEC,MAAA,EAAQC,OAAO;IAAEC,MAAM;IAAEC,iBAAiB;IAAEC;EAAK,CAAE;IACnE,IAAI,CAACA,KAAA,EAAO;MACVA,KAAA,GAAQ,CAAC;IACX;IACA,MAAMC,kBAAA,GAAqBJ,OAAA,CAAQK,WAAW,CAACC,GAAG,CAAEC,CAAA,IAAMA,CAAA,CAAEC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A,MAAkB;YAC/D;YACAa,SAAA,EAAW,CAACrE,QAAA,CAASsE,OAAO;UAC9B;QACF;QACAE,YAAA,EAAcA,CAAA;UACZ,OAAOhD,0BAAA;QACT;QACAiD,gBAAA,EAAkBA,CAAC;UAAEtB;QAAI,CAAE;UACzB,OAAOA,IAAA,EAAMjC,MAAA;QACf;QACAwD,yBAAA,EAA2B,CAACzE,wBAAA,CAAyBU,KAAA,EAAO;QAC5DwC,IAAA,EAAMnD,QAAA;QACNuE,WAAA,EAAa,CAACnE,cAAA,CAAeO,KAAA,EAAOa,0BAAA;MACtC,GACD;MACDmD,2BAAA,EAA6BhE;IAC/B;EACF;EACAiE,GAAA,EAAK;AACP","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["escapeHTML","sanitizeFields","createServerFeature","convertLexicalNodesToHTML","createNode","LinkMarkdownTransformer","AutoLinkNode","LinkNode","linkPopulationPromiseHOC","i18n","transformExtraFields","linkValidation","LinkFeature","feature","config","_config","isRoot","parentIsLocalized","props","validRelationships","collections","map","c","slug","_transformedFields","fields","enabledCollections","disabledCollections","maxDepth","sanitizedFields","requireFieldLevelRichTextEditor","sanitizedFieldsWithoutText","filter","field","name","linkTypeField","linkURLField","defaultLinkType","defaultValue","undefined","defaultLinkURL","ClientFeature","clientFeatureProps","disableAutoLinks","generateSchemaMap","Array","isArray","length","schemaMap","Map","set","markdownTransformers","nodes","converters","html","converter","currentDepth","depth","draft","node","overrideAccess","parent","req","showHiddenFields","childrenText","lexicalNodes","children","rel","newTab","target","href","url","linkType","doc","value","String","id","nodeTypes","getType","validations","getSubFields","getSubFieldsData","graphQLPopulationPromises","Boolean","sanitizedServerFeatureProps","key"],"sources":["../../../../src/features/link/server/index.ts"],"sourcesContent":["import type {\n CollectionSlug,\n Config,\n Field,\n FieldAffectingData,\n FieldSchemaMap,\n SanitizedConfig,\n} from 'payload'\n\nimport escapeHTML from 'escape-html'\nimport { sanitizeFields } from 'payload'\n\nimport type { NodeWithHooks } from '../../typesServer.js'\nimport type { ClientProps } from '../client/index.js'\n\nimport { createServerFeature } from '../../../utilities/createServerFeature.js'\nimport { convertLexicalNodesToHTML } from '../../converters/html_deprecated/converter/index.js'\nimport { createNode } from '../../typeUtilities.js'\nimport { LinkMarkdownTransformer } from '../markdownTransformer.js'\nimport { AutoLinkNode } from '../nodes/AutoLinkNode.js'\nimport { LinkNode } from '../nodes/LinkNode.js'\nimport { linkPopulationPromiseHOC } from './graphQLPopulationPromise.js'\nimport { i18n } from './i18n.js'\nimport { transformExtraFields } from './transformExtraFields.js'\nimport { linkValidation } from './validate.js'\n\nexport type ExclusiveLinkCollectionsProps =\n | {\n /**\n * The collections that should be disabled for internal linking. Overrides the `enableRichTextLink` property in the collection config.\n * When this property is set, `enabledCollections` will not be available.\n **/\n disabledCollections?: CollectionSlug[]\n\n // Ensures that enabledCollections is not available when disabledCollections is set\n enabledCollections?: never\n }\n | {\n // Ensures that disabledCollections is not available when enabledCollections is set\n disabledCollections?: never\n\n /**\n * The collections that should be enabled for internal linking. Overrides the `enableRichTextLink` property in the collection config\n * When this property is set, `disabledCollections` will not be available.\n **/\n enabledCollections?: CollectionSlug[]\n }\n\nexport type LinkFeatureServerProps = {\n /**\n * Disables the automatic creation of links from URLs pasted into the editor, as well\n * as auto link nodes.\n *\n * If set to 'creationOnly', only the creation of new auto link nodes will be disabled.\n * Existing auto link nodes will still be editable.\n *\n * @default false\n */\n disableAutoLinks?: 'creationOnly' | true\n /**\n * A function or array defining additional fields for the link feature. These will be\n * displayed in the link editor drawer.\n */\n fields?:\n | ((args: {\n config: SanitizedConfig\n defaultFields: FieldAffectingData[]\n }) => (Field | FieldAffectingData)[])\n | Field[]\n /**\n * Sets a maximum population depth for the internal doc default field of link, regardless of the remaining depth when the field is reached.\n * This behaves exactly like the maxDepth properties of relationship and upload fields.\n *\n * {@link https://payloadcms.com/docs/getting-started/concepts#field-level-max-depth}\n */\n maxDepth?: number\n} & ExclusiveLinkCollectionsProps\n\nexport const LinkFeature = createServerFeature<\n LinkFeatureServerProps,\n LinkFeatureServerProps,\n ClientProps\n>({\n feature: async ({ config: _config, isRoot, parentIsLocalized, props }) => {\n if (!props) {\n props = {}\n }\n const validRelationships = _config.collections.map((c) => c.slug) || []\n\n const _transformedFields = transformExtraFields(\n props.fields ? props.fields : null,\n _config,\n props.enabledCollections,\n props.disabledCollections,\n props.maxDepth,\n )\n\n const sanitizedFields = await sanitizeFields({\n config: _config as unknown as Config,\n fields: _transformedFields,\n parentIsLocalized,\n requireFieldLevelRichTextEditor: isRoot,\n validRelationships,\n })\n props.fields = sanitizedFields\n\n // the text field is not included in the node data.\n // Thus, for tasks like validation, we do not want to pass it a text field in the schema which will never have data.\n // Otherwise, it will cause a validation error (field is required).\n const sanitizedFieldsWithoutText = sanitizedFields.filter(\n (field) => !('name' in field) || field.name !== 'text',\n )\n\n let linkTypeField: Field | null = null\n let linkURLField: Field | null = null\n\n for (const field of sanitizedFields) {\n if ('name' in field && field.name === 'linkType') {\n linkTypeField = field\n }\n\n if ('name' in field && field.name === 'url') {\n linkURLField = field\n }\n }\n\n const defaultLinkType = linkTypeField\n ? 'defaultValue' in linkTypeField && typeof linkTypeField.defaultValue === 'string'\n ? linkTypeField.defaultValue\n : 'custom'\n : undefined\n\n const defaultLinkURL = linkURLField\n ? 'defaultValue' in linkURLField && typeof linkURLField.defaultValue === 'string'\n ? linkURLField.defaultValue\n : 'https://'\n : undefined\n\n return {\n ClientFeature: '@payloadcms/richtext-lexical/client#LinkFeatureClient',\n clientFeatureProps: {\n defaultLinkType,\n defaultLinkURL,\n disableAutoLinks: props.disableAutoLinks,\n disabledCollections: props.disabledCollections,\n enabledCollections: props.enabledCollections,\n } as ClientProps,\n generateSchemaMap: () => {\n if (!sanitizedFields || !Array.isArray(sanitizedFields) || sanitizedFields.length === 0) {\n return null\n }\n\n const schemaMap: FieldSchemaMap = new Map()\n schemaMap.set('fields', {\n fields: sanitizedFields,\n })\n\n return schemaMap\n },\n i18n,\n markdownTransformers: [LinkMarkdownTransformer],\n nodes: [\n props?.disableAutoLinks === true\n ? null\n : createNode({\n converters: {\n html: {\n converter: async ({\n converters,\n currentDepth,\n depth,\n draft,\n node,\n overrideAccess,\n parent,\n req,\n showHiddenFields,\n }) => {\n const childrenText = await convertLexicalNodesToHTML({\n converters,\n currentDepth,\n depth,\n draft,\n lexicalNodes: node.children,\n overrideAccess,\n parent: {\n ...node,\n parent,\n },\n req,\n showHiddenFields,\n })\n\n const rel: string = node.fields.newTab ? ' rel=\"noopener noreferrer\"' : ''\n const target: string = node.fields.newTab ? ' target=\"_blank\"' : ''\n\n let href: string = node.fields.url ?? ''\n if (node.fields.linkType === 'internal') {\n href =\n typeof node.fields.doc?.value !== 'object'\n ? String(node.fields.doc?.value)\n : String(node.fields.doc?.value?.id)\n }\n\n return `<a href=\"${href}\"${target}${rel}>${childrenText}</a>`\n },\n nodeTypes: [AutoLinkNode.getType()],\n },\n },\n node: AutoLinkNode,\n // Since AutoLinkNodes are just internal links, they need no hooks or graphQL population promises\n validations: [linkValidation(props, sanitizedFieldsWithoutText)],\n }),\n createNode({\n converters: {\n html: {\n converter: async ({\n converters,\n currentDepth,\n depth,\n draft,\n node,\n overrideAccess,\n parent,\n req,\n showHiddenFields,\n }) => {\n const childrenText = await convertLexicalNodesToHTML({\n converters,\n currentDepth,\n depth,\n draft,\n lexicalNodes: node.children,\n overrideAccess,\n parent: {\n ...node,\n parent,\n },\n req,\n showHiddenFields,\n })\n\n const rel: string = node.fields.newTab ? ' rel=\"noopener noreferrer\"' : ''\n const target: string = node.fields.newTab ? ' target=\"_blank\"' : ''\n\n const href: string =\n node.fields.linkType === 'custom'\n ? escapeHTML(node.fields.url)\n : (node.fields.doc?.value as string)\n\n return `<a href=\"${href}\"${target}${rel}>${childrenText}</a>`\n },\n nodeTypes: [LinkNode.getType()],\n },\n },\n getSubFields: () => {\n return sanitizedFieldsWithoutText\n },\n getSubFieldsData: ({ node }) => {\n return node?.fields\n },\n graphQLPopulationPromises: [linkPopulationPromiseHOC(props)],\n node: LinkNode,\n validations: [linkValidation(props, sanitizedFieldsWithoutText)],\n }),\n ].filter(Boolean) as Array<NodeWithHooks>,\n sanitizedServerFeatureProps: props,\n }\n },\n key: 'link',\n})\n"],"mappings":"AASA,OAAOA,UAAA,MAAgB;AACvB,SAASC,cAAc,QAAQ;AAK/B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,UAAU,QAAQ;AAC3B,SAASC,uBAAuB,QAAQ;AACxC,SAASC,YAAY,QAAQ;AAC7B,SAASC,QAAQ,QAAQ;AACzB,SAASC,wBAAwB,QAAQ;AACzC,SAASC,IAAI,QAAQ;AACrB,SAASC,oBAAoB,QAAQ;AACrC,SAASC,cAAc,QAAQ;AAsD/B,OAAO,MAAMC,WAAA,GAAcV,mBAAA,CAIzB;EACAW,OAAA,EAAS,MAAAA,CAAO;IAAEC,MAAA,EAAQC,OAAO;IAAEC,MAAM;IAAEC,iBAAiB;IAAEC;EAAK,CAAE;IACnE,IAAI,CAACA,KAAA,EAAO;MACVA,KAAA,GAAQ,CAAC;IACX;IACA,MAAMC,kBAAA,GAAqBJ,OAAA,CAAQK,WAAW,CAACC,GAAG,CAAEC,CAAA,IAAMA,CAAA,CAAEC,IAAI,KAAK,EAAE;IAEvE,MAAMC,kBAAA,GAAqBd,oBAAA,CACzBQ,KAAA,CAAMO,MAAM,GAAGP,KAAA,CAAMO,MAAM,GAAG,MAC9BV,OAAA,EACAG,KAAA,CAAMQ,kBAAkB,EACxBR,KAAA,CAAMS,mBAAmB,EACzBT,KAAA,CAAMU,QAAQ;IAGhB,MAAMC,eAAA,GAAkB,MAAM5B,cAAA,CAAe;MAC3Ca,MAAA,EAAQC,OAAA;MACRU,MAAA,EAAQD,kBAAA;MACRP,iBAAA;MACAa,+BAAA,EAAiCd,MAAA;MACjCG;IACF;IACAD,KAAA,CAAMO,MAAM,GAAGI,eAAA;IAEf;IACA;IACA;IACA,MAAME,0BA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BAAA;MACtC,GACD,CAACC,MAAM,CAACmD,OAAA;MACTC,2BAAA,EAA6BlE;IAC/B;EACF;EACAmE,GAAA,EAAK;AACP","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { HTMLConverter } from '../converters/
|
|
1
|
+
import type { HTMLConverter } from '../converters/html_deprecated/converter/types.js';
|
|
2
2
|
import type { SerializedListItemNode, SerializedListNode } from './plugin/index.js';
|
|
3
3
|
export declare const ListHTMLConverter: HTMLConverter<SerializedListNode>;
|
|
4
4
|
export declare const ListItemHTMLConverter: HTMLConverter<SerializedListItemNode>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"htmlConverter.d.ts","sourceRoot":"","sources":["../../../src/features/lists/htmlConverter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"htmlConverter.d.ts","sourceRoot":"","sources":["../../../src/features/lists/htmlConverter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kDAAkD,CAAA;AACrF,OAAO,KAAK,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAInF,eAAO,MAAM,iBAAiB,EAAE,aAAa,CAAC,kBAAkB,CA8B/D,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,sBAAsB,CAyDvE,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ListItemNode, ListNode } from '@lexical/list';
|
|
2
2
|
import { v4 as uuidv4 } from 'uuid';
|
|
3
|
-
import { convertLexicalNodesToHTML } from '../converters/
|
|
3
|
+
import { convertLexicalNodesToHTML } from '../converters/html_deprecated/converter/index.js';
|
|
4
4
|
export const ListHTMLConverter = {
|
|
5
5
|
converter: async ({
|
|
6
6
|
converters,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"htmlConverter.js","names":["ListItemNode","ListNode","v4","uuidv4","convertLexicalNodesToHTML","ListHTMLConverter","converter","converters","currentDepth","depth","draft","node","overrideAccess","parent","req","showHiddenFields","childrenText","lexicalNodes","children","tag","listType","nodeTypes","getType","ListItemHTMLConverter","hasSubLists","some","child","type","uuid","checked","value"],"sources":["../../../src/features/lists/htmlConverter.ts"],"sourcesContent":["import { ListItemNode, ListNode } from '@lexical/list'\nimport { v4 as uuidv4 } from 'uuid'\n\nimport type { HTMLConverter } from '../converters/
|
|
1
|
+
{"version":3,"file":"htmlConverter.js","names":["ListItemNode","ListNode","v4","uuidv4","convertLexicalNodesToHTML","ListHTMLConverter","converter","converters","currentDepth","depth","draft","node","overrideAccess","parent","req","showHiddenFields","childrenText","lexicalNodes","children","tag","listType","nodeTypes","getType","ListItemHTMLConverter","hasSubLists","some","child","type","uuid","checked","value"],"sources":["../../../src/features/lists/htmlConverter.ts"],"sourcesContent":["import { ListItemNode, ListNode } from '@lexical/list'\nimport { v4 as uuidv4 } from 'uuid'\n\nimport type { HTMLConverter } from '../converters/html_deprecated/converter/types.js'\nimport type { SerializedListItemNode, SerializedListNode } from './plugin/index.js'\n\nimport { convertLexicalNodesToHTML } from '../converters/html_deprecated/converter/index.js'\n\nexport const ListHTMLConverter: HTMLConverter<SerializedListNode> = {\n converter: async ({\n converters,\n currentDepth,\n depth,\n draft,\n node,\n overrideAccess,\n parent,\n req,\n showHiddenFields,\n }) => {\n const childrenText = await convertLexicalNodesToHTML({\n converters,\n currentDepth,\n depth,\n draft,\n lexicalNodes: node.children,\n overrideAccess,\n parent: {\n ...node,\n parent,\n },\n req,\n showHiddenFields,\n })\n\n return `<${node?.tag} class=\"list-${node?.listType}\">${childrenText}</${node?.tag}>`\n },\n nodeTypes: [ListNode.getType()],\n}\n\nexport const ListItemHTMLConverter: HTMLConverter<SerializedListItemNode> = {\n converter: async ({\n converters,\n currentDepth,\n depth,\n draft,\n node,\n overrideAccess,\n parent,\n req,\n showHiddenFields,\n }) => {\n const hasSubLists = node.children.some((child) => child.type === 'list')\n\n const childrenText = await convertLexicalNodesToHTML({\n converters,\n currentDepth,\n depth,\n draft,\n lexicalNodes: node.children,\n overrideAccess,\n parent: {\n ...node,\n parent,\n },\n req,\n showHiddenFields,\n })\n\n if ('listType' in parent && parent?.listType === 'check') {\n const uuid = uuidv4()\n\n return `<li aria-checked=${node.checked ? 'true' : 'false'} class=\"${\n 'list-item-checkbox' +\n (node.checked ? ' list-item-checkbox-checked' : ' list-item-checkbox-unchecked') +\n (hasSubLists ? ' nestedListItem' : '')\n }\"\n role=\"checkbox\"\n tabIndex=${-1}\n value=${node?.value}\n >\n ${\n hasSubLists\n ? childrenText\n : `\n <input type=\"checkbox\" id=\"${uuid}\"${node.checked ? ' checked' : ''}>\n <label for=\"${uuid}\">${childrenText}</label><br>\n `\n }\n\n\n </li>`\n } else {\n return `<li ${hasSubLists ? `class=\"nestedListItem\" ` : ''}value=${node?.value}>${childrenText}</li>`\n }\n },\n nodeTypes: [ListItemNode.getType()],\n}\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,QAAQ,QAAQ;AACvC,SAASC,EAAA,IAAMC,MAAM,QAAQ;AAK7B,SAASC,yBAAyB,QAAQ;AAE1C,OAAO,MAAMC,iBAAA,GAAuD;EAClEC,SAAA,EAAW,MAAAA,CAAO;IAChBC,UAAU;IACVC,YAAY;IACZC,KAAK;IACLC,KAAK;IACLC,IAAI;IACJC,cAAc;IACdC,MAAM;IACNC,GAAG;IACHC;EAAgB,CACjB;IACC,MAAMC,YAAA,GAAe,MAAMZ,yBAAA,CAA0B;MACnDG,UAAA;MACAC,YAAA;MACAC,KAAA;MACAC,KAAA;MACAO,YAAA,EAAcN,IAAA,CAAKO,QAAQ;MAC3BN,cAAA;MACAC,MAAA,EAAQ;QACN,GAAGF,IAAI;QACPE;MACF;MACAC,GAAA;MACAC;IACF;IAEA,OAAO,IAAIJ,IAAA,EAAMQ,GAAA,gBAAmBR,IAAA,EAAMS,QAAA,KAAaJ,YAAA,KAAi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field, FieldSchemaMap, JsonObject, PayloadComponent, Paylo
|
|
|
5
5
|
import type { ServerEditorConfig } from '../lexical/config/types.js';
|
|
6
6
|
import type { Transformer } from '../packages/@lexical/markdown/index.js';
|
|
7
7
|
import type { AdapterProps } from '../types.js';
|
|
8
|
-
import type { HTMLConverter } from './converters/
|
|
8
|
+
import type { HTMLConverter } from './converters/html_deprecated/converter/types.js';
|
|
9
9
|
import type { BaseClientFeatureProps } from './typesClient.js';
|
|
10
10
|
export type PopulationPromise<T extends SerializedLexicalNode = SerializedLexicalNode> = (args: {
|
|
11
11
|
context: RequestContext;
|
|
@@ -155,8 +155,13 @@ export type NodeWithHooks<T extends LexicalNode = any> = {
|
|
|
155
155
|
/**
|
|
156
156
|
* Allows you to define how a node can be serialized into different formats. Currently, only supports html.
|
|
157
157
|
* Markdown converters are defined in `markdownTransformers` and not here.
|
|
158
|
+
*
|
|
159
|
+
* @deprecated - will be removed in 4.0
|
|
158
160
|
*/
|
|
159
161
|
converters?: {
|
|
162
|
+
/**
|
|
163
|
+
* @deprecated - will be removed in 4.0
|
|
164
|
+
*/
|
|
160
165
|
html?: HTMLConverter<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>;
|
|
161
166
|
};
|
|
162
167
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typesServer.d.ts","sourceRoot":"","sources":["../../src/features/typesServer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAClF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,KAAK,EACV,KAAK,EACL,WAAW,EACX,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,SAAS,CAAA;AAChB,OAAO,KAAK,EACV,MAAM,EACN,KAAK,EACL,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,UA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