@payloadcms/richtext-lexical 3.68.0-internal-debug.2eb12b9 → 3.68.0-internal-debug.dafc24d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cell/rscEntry.js +13 -5
- package/dist/cell/rscEntry.js.map +1 -1
- package/dist/features/blocks/client/component/BlockContent.js +29 -9
- package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
- package/dist/features/blocks/client/component/components/BlockCollapsible.js +7 -3
- package/dist/features/blocks/client/component/components/BlockCollapsible.js.map +1 -1
- package/dist/features/blocks/client/component/components/BlockEditButton.js +6 -2
- package/dist/features/blocks/client/component/components/BlockEditButton.js.map +1 -1
- package/dist/features/blocks/client/component/components/BlockRemoveButton.js +6 -2
- package/dist/features/blocks/client/component/components/BlockRemoveButton.js.map +1 -1
- package/dist/features/blocks/client/component/index.js +124 -43
- package/dist/features/blocks/client/component/index.js.map +1 -1
- package/dist/features/blocks/client/component/index.scss +188 -0
- package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.js +7 -3
- package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.js.map +1 -1
- package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js +6 -2
- package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js.map +1 -1
- package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js +6 -2
- package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js.map +1 -1
- package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js +6 -2
- package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js.map +1 -1
- package/dist/features/blocks/client/componentInline/index.js +118 -37
- package/dist/features/blocks/client/componentInline/index.js.map +1 -1
- package/dist/features/blocks/client/componentInline/index.scss +90 -0
- package/dist/features/blocks/client/getBlockImageComponent.js +7 -3
- package/dist/features/blocks/client/getBlockImageComponent.js.map +1 -1
- package/dist/features/blocks/client/markdown/markdownTransformer.js +1 -0
- package/dist/features/blocks/client/markdown/markdownTransformer.js.map +1 -1
- package/dist/features/blocks/client/nodes/BlocksNode.js +7 -3
- package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
- package/dist/features/blocks/client/nodes/InlineBlocksNode.js +7 -3
- package/dist/features/blocks/client/nodes/InlineBlocksNode.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Block.js +88 -27
- package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Code.js +7 -3
- package/dist/features/blocks/premade/CodeBlock/Component/Code.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js +13 -4
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.scss +6 -0
- package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js +19 -6
- package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.scss +29 -0
- package/dist/features/blocks/premade/CodeBlock/Component/index.scss +97 -0
- package/dist/features/blocks/server/markdown/markdownTransformer.js +1 -0
- package/dist/features/blocks/server/markdown/markdownTransformer.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/Component/index.js +9 -5
- package/dist/features/converters/lexicalToJSX/Component/index.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js +7 -3
- package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/heading.js +7 -3
- package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js +6 -2
- package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js +6 -2
- package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/link.js +13 -5
- package/dist/features/converters/lexicalToJSX/converter/converters/link.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/list.js +38 -14
- package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.js +18 -6
- package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/table.js +31 -11
- package/dist/features/converters/lexicalToJSX/converter/converters/table.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/text.js +43 -15
- package/dist/features/converters/lexicalToJSX/converter/converters/text.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/upload.js +31 -11
- package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/index.js +8 -4
- package/dist/features/converters/lexicalToJSX/converter/index.js.map +1 -1
- package/dist/features/debug/jsxConverter/client/plugin/index.js +14 -5
- package/dist/features/debug/jsxConverter/client/plugin/index.js.map +1 -1
- package/dist/features/debug/jsxConverter/client/plugin/style.scss +12 -0
- package/dist/features/debug/testRecorder/client/plugin/index.js +62 -21
- package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
- package/dist/features/debug/testRecorder/client/plugin/index.scss +53 -0
- package/dist/features/debug/treeView/client/plugin/index.js +8 -3
- package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
- package/dist/features/debug/treeView/client/plugin/index.scss +80 -0
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +225 -72
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.scss +87 -0
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +32 -11
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.scss +11 -0
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +21 -9
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +26 -9
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.scss +233 -0
- package/dist/features/horizontalRule/client/plugin/index.js +1 -0
- package/dist/features/horizontalRule/client/plugin/index.js.map +1 -1
- package/dist/features/horizontalRule/client/plugin/index.scss +23 -0
- package/dist/features/indent/client/IndentPlugin.js +6 -2
- package/dist/features/indent/client/IndentPlugin.js.map +1 -1
- package/dist/features/link/client/plugins/autoLink/index.js +3 -0
- package/dist/features/link/client/plugins/autoLink/index.js.map +1 -1
- package/dist/features/link/client/plugins/clickableLink/index.js +6 -2
- package/dist/features/link/client/plugins/clickableLink/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +76 -24
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/index.js +8 -3
- package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/index.scss +92 -0
- package/dist/features/link/server/baseFields.js +1 -0
- package/dist/features/link/server/baseFields.js.map +1 -1
- package/dist/features/lists/checklist/client/plugin/index.js +6 -2
- package/dist/features/lists/checklist/client/plugin/index.js.map +1 -1
- package/dist/features/lists/plugin/index.js +6 -2
- package/dist/features/lists/plugin/index.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +14 -5
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +7 -3
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.scss +16 -0
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +14 -5
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +7 -3
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.scss +16 -0
- package/dist/features/relationship/client/components/RelationshipComponent.js +56 -19
- package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
- package/dist/features/relationship/client/components/index.scss +95 -0
- package/dist/features/relationship/client/drawer/index.js +18 -6
- package/dist/features/relationship/client/drawer/index.js.map +1 -1
- package/dist/features/relationship/client/nodes/RelationshipNode.js +7 -3
- package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
- package/dist/features/relationship/client/plugins/index.js +7 -3
- package/dist/features/relationship/client/plugins/index.js.map +1 -1
- package/dist/features/textState/feature.client.js +18 -6
- package/dist/features/textState/feature.client.js.map +1 -1
- package/dist/features/toolbars/fixed/client/Toolbar/index.js +72 -23
- package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
- package/dist/features/toolbars/fixed/client/Toolbar/index.scss +113 -0
- package/dist/features/toolbars/inline/client/Toolbar/index.js +72 -23
- package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
- package/dist/features/toolbars/inline/client/Toolbar/index.scss +58 -0
- package/dist/features/toolbars/shared/ToolbarButton/index.js +8 -3
- package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarButton/index.scss +46 -0
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +60 -20
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js +37 -12
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.scss +129 -0
- package/dist/features/upload/client/component/index.js +92 -31
- package/dist/features/upload/client/component/index.js.map +1 -1
- package/dist/features/upload/client/component/index.scss +191 -0
- package/dist/features/upload/client/component/pending/index.js +14 -5
- package/dist/features/upload/client/component/pending/index.js.map +1 -1
- package/dist/features/upload/client/drawer/index.js +18 -6
- package/dist/features/upload/client/drawer/index.js.map +1 -1
- package/dist/features/upload/client/nodes/UploadNode.js +12 -4
- package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
- package/dist/features/upload/client/plugin/index.js +7 -3
- package/dist/features/upload/client/plugin/index.js.map +1 -1
- package/dist/field/Diff/converters/listitem/index.js +37 -12
- package/dist/field/Diff/converters/listitem/index.js.map +1 -1
- package/dist/field/Diff/converters/listitem/index.scss +47 -0
- package/dist/field/Diff/converters/relationship/index.js +37 -12
- package/dist/field/Diff/converters/relationship/index.js.map +1 -1
- package/dist/field/Diff/converters/relationship/index.scss +73 -0
- package/dist/field/Diff/converters/unknown/index.js +31 -10
- package/dist/field/Diff/converters/unknown/index.js.map +1 -1
- package/dist/field/Diff/converters/unknown/index.scss +40 -0
- package/dist/field/Diff/converters/upload/index.js +60 -19
- package/dist/field/Diff/converters/upload/index.js.map +1 -1
- package/dist/field/Diff/converters/upload/index.scss +115 -0
- package/dist/field/Diff/index.js +8 -3
- package/dist/field/Diff/index.js.map +1 -1
- package/dist/field/Diff/index.scss +102 -0
- package/dist/field/Field.js +81 -27
- package/dist/field/Field.js.map +1 -1
- package/dist/field/RenderLexical/index.js +36 -12
- package/dist/field/RenderLexical/index.js.map +1 -1
- package/dist/field/index.js +19 -7
- package/dist/field/index.js.map +1 -1
- package/dist/field/index.scss +41 -0
- package/dist/field/rscEntry.js +7 -3
- package/dist/field/rscEntry.js.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/lexical/EditorPlugin.js +13 -5
- package/dist/lexical/EditorPlugin.js.map +1 -1
- package/dist/lexical/LexicalEditor.js +163 -50
- package/dist/lexical/LexicalEditor.js.map +1 -1
- package/dist/lexical/LexicalEditor.scss +54 -0
- package/dist/lexical/LexicalProvider.js +49 -17
- package/dist/lexical/LexicalProvider.js.map +1 -1
- package/dist/lexical/config/client/EditorConfigProvider.js +7 -3
- package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
- package/dist/lexical/plugins/DecoratorPlugin/index.js +1 -0
- package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -1
- package/dist/lexical/plugins/DecoratorPlugin/index.scss +13 -0
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +20 -7
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.scss +54 -0
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +2 -0
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +7 -3
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/index.js +50 -16
- package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/index.scss +68 -0
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +20 -7
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.scss +35 -0
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +32 -11
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.scss +80 -0
- package/dist/lexical/theme/EditorTheme.scss +357 -0
- package/dist/lexical/ui/ContentEditable.js +14 -5
- package/dist/lexical/ui/ContentEditable.js.map +1 -1
- package/dist/lexical/ui/ContentEditable.scss +105 -0
- package/dist/lexical/ui/icons/AI/index.js +37 -13
- package/dist/lexical/ui/icons/AI/index.js.map +1 -1
- package/dist/lexical/ui/icons/Add/index.js +19 -7
- package/dist/lexical/ui/icons/Add/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignCenter/index.js +25 -9
- package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignJustify/index.js +25 -9
- package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignLeft/index.js +25 -9
- package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignRight/index.js +25 -9
- package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
- package/dist/lexical/ui/icons/Block/index.js +25 -9
- package/dist/lexical/ui/icons/Block/index.js.map +1 -1
- package/dist/lexical/ui/icons/Blockquote/index.js +13 -5
- package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
- package/dist/lexical/ui/icons/Bold/index.js +13 -5
- package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
- package/dist/lexical/ui/icons/Checklist/index.js +19 -7
- package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
- package/dist/lexical/ui/icons/Code/index.js +19 -7
- package/dist/lexical/ui/icons/Code/index.js.map +1 -1
- package/dist/lexical/ui/icons/CodeBlock/index.js +13 -5
- package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
- package/dist/lexical/ui/icons/Collapse/index.js +13 -5
- package/dist/lexical/ui/icons/Collapse/index.js.map +1 -1
- package/dist/lexical/ui/icons/H1/index.js +13 -5
- package/dist/lexical/ui/icons/H1/index.js.map +1 -1
- package/dist/lexical/ui/icons/H2/index.js +13 -5
- package/dist/lexical/ui/icons/H2/index.js.map +1 -1
- package/dist/lexical/ui/icons/H3/index.js +13 -5
- package/dist/lexical/ui/icons/H3/index.js.map +1 -1
- package/dist/lexical/ui/icons/H4/index.js +13 -5
- package/dist/lexical/ui/icons/H4/index.js.map +1 -1
- package/dist/lexical/ui/icons/H5/index.js +13 -5
- package/dist/lexical/ui/icons/H5/index.js.map +1 -1
- package/dist/lexical/ui/icons/H6/index.js +13 -5
- package/dist/lexical/ui/icons/H6/index.js.map +1 -1
- package/dist/lexical/ui/icons/HorizontalRule/index.js +13 -5
- package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
- package/dist/lexical/ui/icons/IndentDecrease/index.js +31 -11
- package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
- package/dist/lexical/ui/icons/IndentIncrease/index.js +31 -11
- package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
- package/dist/lexical/ui/icons/InlineBlocks/index.js +13 -5
- package/dist/lexical/ui/icons/InlineBlocks/index.js.map +1 -1
- package/dist/lexical/ui/icons/Italic/index.js +13 -5
- package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
- package/dist/lexical/ui/icons/Link/index.js +13 -5
- package/dist/lexical/ui/icons/Link/index.js.map +1 -1
- package/dist/lexical/ui/icons/Meatballs/index.js +25 -9
- package/dist/lexical/ui/icons/Meatballs/index.js.map +1 -1
- package/dist/lexical/ui/icons/OrderedList/index.js +37 -13
- package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
- package/dist/lexical/ui/icons/Relationship/index.js +37 -13
- package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
- package/dist/lexical/ui/icons/Strikethrough/index.js +19 -7
- package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
- package/dist/lexical/ui/icons/Subscript/index.js +13 -5
- package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
- package/dist/lexical/ui/icons/Superscript/index.js +13 -5
- package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
- package/dist/lexical/ui/icons/Table/index.js +13 -5
- package/dist/lexical/ui/icons/Table/index.js.map +1 -1
- package/dist/lexical/ui/icons/Text/index.js +13 -5
- package/dist/lexical/ui/icons/Text/index.js.map +1 -1
- package/dist/lexical/ui/icons/TextState/index.js +7 -3
- package/dist/lexical/ui/icons/TextState/index.js.map +1 -1
- package/dist/lexical/ui/icons/Underline/index.js +19 -7
- package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
- package/dist/lexical/ui/icons/UnorderedList/index.js +43 -15
- package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
- package/dist/lexical/ui/icons/Upload/index.js +25 -9
- package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
- package/dist/packages/@lexical/markdown/MarkdownShortcuts.js +2 -0
- package/dist/packages/@lexical/markdown/MarkdownShortcuts.js.map +1 -1
- package/dist/packages/@lexical/markdown/importTextFormatTransformer.js +2 -0
- package/dist/packages/@lexical/markdown/importTextFormatTransformer.js.map +1 -1
- package/dist/packages/@lexical/markdown/importTextMatchTransformer.js +2 -0
- package/dist/packages/@lexical/markdown/importTextMatchTransformer.js.map +1 -1
- package/dist/utilities/fieldsDrawer/Drawer.js +19 -7
- package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
- package/dist/utilities/fieldsDrawer/DrawerContent.js +19 -7
- package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js +7 -3
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -1
- package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js +7 -3
- package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js.map +1 -1
- package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js +2 -0
- package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js.map +1 -1
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js +2 -0
- package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -1
- package/package.json +8 -7
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
@import '~@payloadcms/ui/scss';
|
|
2
|
+
|
|
3
|
+
@layer payload-default {
|
|
4
|
+
.draggable-block-menu {
|
|
5
|
+
border: none;
|
|
6
|
+
border-radius: $style-radius-m;
|
|
7
|
+
padding: 0;
|
|
8
|
+
cursor: grab;
|
|
9
|
+
opacity: 0;
|
|
10
|
+
position: absolute;
|
|
11
|
+
left: 0;
|
|
12
|
+
top: 0;
|
|
13
|
+
will-change: transform;
|
|
14
|
+
background-color: var(--theme-bg);
|
|
15
|
+
|
|
16
|
+
&:active {
|
|
17
|
+
cursor: grabbing;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&:hover {
|
|
21
|
+
background-color: var(--theme-elevation-100);
|
|
22
|
+
.icon {
|
|
23
|
+
opacity: 1;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.icon {
|
|
28
|
+
background-color: transparent;
|
|
29
|
+
width: 18px;
|
|
30
|
+
height: 24px;
|
|
31
|
+
opacity: 0.3;
|
|
32
|
+
background-image: url(../../../ui/icons/DraggableBlock/index.svg);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
html[data-theme='dark'] & {
|
|
36
|
+
.icon {
|
|
37
|
+
background-image: url(../../../ui/icons/DraggableBlock/light.svg);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.rich-text-lexical--show-gutter
|
|
43
|
+
> .rich-text-lexical__wrap
|
|
44
|
+
> .editor-container
|
|
45
|
+
> .editor-scroller
|
|
46
|
+
> .editor {
|
|
47
|
+
> .draggable-block-target-line {
|
|
48
|
+
left: 3rem;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.draggable-block-target-line {
|
|
53
|
+
pointer-events: none;
|
|
54
|
+
background: var(--theme-success-400);
|
|
55
|
+
border-radius: 1px;
|
|
56
|
+
height: base(0.2);
|
|
57
|
+
position: absolute;
|
|
58
|
+
left: 0;
|
|
59
|
+
top: 0;
|
|
60
|
+
opacity: 0;
|
|
61
|
+
will-change: transform;
|
|
62
|
+
transition: transform 0.1s;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* This targets Firefox 57+. The transition looks ugly on firefox, thus we disable it here */
|
|
66
|
+
@-moz-document url-prefix() {
|
|
67
|
+
.draggable-block-target-line {
|
|
68
|
+
transition: none;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.rich-text-lexical {
|
|
73
|
+
.ContentEditable__root > * {
|
|
74
|
+
will-change: margin-top, margin-bottom;
|
|
75
|
+
transition:
|
|
76
|
+
margin-top 0.08s,
|
|
77
|
+
margin-bottom 0.08s;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
@import '~@payloadcms/ui/scss';
|
|
2
|
+
|
|
3
|
+
@layer payload-default {
|
|
4
|
+
.LexicalEditorTheme {
|
|
5
|
+
&__ltr {
|
|
6
|
+
text-align: left;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
&__rtl {
|
|
10
|
+
text-align: right;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&__paragraph {
|
|
14
|
+
font-size: base(0.8);
|
|
15
|
+
margin-bottom: 0.55em;
|
|
16
|
+
position: relative;
|
|
17
|
+
line-height: 1.5;
|
|
18
|
+
letter-spacing: normal;
|
|
19
|
+
color: var(--theme-text);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&__quote {
|
|
23
|
+
color: var(--theme-text);
|
|
24
|
+
font-size: base(0.8);
|
|
25
|
+
margin-block: base(0.8);
|
|
26
|
+
margin-inline: base(0.2);
|
|
27
|
+
border-inline-start-color: var(--theme-elevation-150);
|
|
28
|
+
border-inline-start-width: base(0.2);
|
|
29
|
+
border-inline-start-style: solid;
|
|
30
|
+
padding-inline-start: base(0.6);
|
|
31
|
+
padding-block: base(0.2);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&__h1,
|
|
35
|
+
&__h2,
|
|
36
|
+
&__h3,
|
|
37
|
+
&__h4,
|
|
38
|
+
&__h5,
|
|
39
|
+
&__h6 {
|
|
40
|
+
font-family: var(--font-body);
|
|
41
|
+
line-height: 1.125;
|
|
42
|
+
letter-spacing: 0;
|
|
43
|
+
color: var(--theme-text);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&__h1 {
|
|
47
|
+
font-size: base(1.4);
|
|
48
|
+
font-weight: 700;
|
|
49
|
+
margin-block: 0.5em 0.4em;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&__h2 {
|
|
53
|
+
font-size: base(1.25);
|
|
54
|
+
font-weight: 700;
|
|
55
|
+
margin-block: 0.55em 0.4em;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&__h3 {
|
|
59
|
+
font-size: base(1.1);
|
|
60
|
+
font-weight: 700;
|
|
61
|
+
margin-block: 0.6em 0.4em;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&__h4 {
|
|
65
|
+
font-size: base(1);
|
|
66
|
+
font-weight: 700;
|
|
67
|
+
margin-block: 0.65em 0.4em;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&__h5 {
|
|
71
|
+
font-size: base(0.9);
|
|
72
|
+
font-weight: 700;
|
|
73
|
+
margin-block: 0.7em 0.4em;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&__h6 {
|
|
77
|
+
font-size: base(0.8);
|
|
78
|
+
font-weight: 700;
|
|
79
|
+
margin-block: 0.75em 0.4em;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&__indent {
|
|
83
|
+
--lexical-indent-base-value: 40px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&__textBold {
|
|
87
|
+
font-weight: bold;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&__textItalic {
|
|
91
|
+
font-style: italic;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&__textUnderline {
|
|
95
|
+
text-decoration: underline;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&__textStrikethrough {
|
|
99
|
+
text-decoration: line-through;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&__textUnderlineStrikethrough {
|
|
103
|
+
text-decoration: underline line-through;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&__tabNode {
|
|
107
|
+
position: relative;
|
|
108
|
+
text-decoration: none;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&__tabNode.LexicalEditorTheme__textUnderline::after {
|
|
112
|
+
content: '';
|
|
113
|
+
position: absolute;
|
|
114
|
+
left: 0;
|
|
115
|
+
right: 0;
|
|
116
|
+
bottom: 0.15em;
|
|
117
|
+
border-bottom: 0.1em solid currentColor;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&__tabNode.LexicalEditorTheme__textStrikethrough::before {
|
|
121
|
+
content: '';
|
|
122
|
+
position: absolute;
|
|
123
|
+
left: 0;
|
|
124
|
+
right: 0;
|
|
125
|
+
top: 0.69em;
|
|
126
|
+
border-top: 0.1em solid currentColor;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&__tabNode.LexicalEditorTheme__textUnderlineStrikethrough::before,
|
|
130
|
+
&__tabNode.LexicalEditorTheme__textUnderlineStrikethrough::after {
|
|
131
|
+
content: '';
|
|
132
|
+
position: absolute;
|
|
133
|
+
left: 0;
|
|
134
|
+
right: 0;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
&__tabNode.LexicalEditorTheme__textUnderlineStrikethrough::before {
|
|
138
|
+
top: 0.69em;
|
|
139
|
+
border-top: 0.1em solid currentColor;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&__tabNode.LexicalEditorTheme__textUnderlineStrikethrough::after {
|
|
143
|
+
bottom: 0.05em;
|
|
144
|
+
border-bottom: 0.1em solid currentColor;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
&__textSubscript {
|
|
148
|
+
font-size: 0.8em;
|
|
149
|
+
vertical-align: sub !important;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
&__textSuperscript {
|
|
153
|
+
font-size: 0.8em;
|
|
154
|
+
vertical-align: super;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&__textCode {
|
|
158
|
+
background-color: var(--theme-elevation-50);
|
|
159
|
+
border: 1px solid var(--theme-elevation-150);
|
|
160
|
+
color: var(--theme-error-600);
|
|
161
|
+
padding: base(0.1) base(0.2);
|
|
162
|
+
font-family: 'SF Mono', Menlo, Consolas, Monaco, monospace;
|
|
163
|
+
font-size: 0.875em;
|
|
164
|
+
border-radius: var(--style-radius-s);
|
|
165
|
+
box-decoration-break: clone;
|
|
166
|
+
-webkit-box-decoration-break: clone;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
&__link {
|
|
170
|
+
color: var(--theme-success-750);
|
|
171
|
+
text-decoration: none;
|
|
172
|
+
border-bottom: 1px dotted;
|
|
173
|
+
pointer-events: none;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// Renders cursor when native browser does not. See https://github.com/facebook/lexical/issues/3417
|
|
177
|
+
&__blockCursor {
|
|
178
|
+
display: block;
|
|
179
|
+
pointer-events: none;
|
|
180
|
+
position: absolute;
|
|
181
|
+
|
|
182
|
+
&:after {
|
|
183
|
+
content: '';
|
|
184
|
+
display: block;
|
|
185
|
+
position: absolute;
|
|
186
|
+
top: -2px;
|
|
187
|
+
width: 20px;
|
|
188
|
+
border-top: 1px solid var(--theme-text);
|
|
189
|
+
animation: CursorBlink 1.1s steps(2, start) infinite;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
@keyframes CursorBlink {
|
|
194
|
+
to {
|
|
195
|
+
visibility: hidden;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
&__ol1 {
|
|
200
|
+
padding: 0;
|
|
201
|
+
list-style-position: outside;
|
|
202
|
+
margin: base(0.4) 0 base(0.8);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
&__ol2 {
|
|
206
|
+
padding: 0;
|
|
207
|
+
margin: 0;
|
|
208
|
+
list-style-type: upper-alpha;
|
|
209
|
+
list-style-position: outside;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
&__ol3 {
|
|
213
|
+
padding: 0;
|
|
214
|
+
margin: 0;
|
|
215
|
+
list-style-type: lower-alpha;
|
|
216
|
+
list-style-position: outside;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
&__ol4 {
|
|
220
|
+
padding: 0;
|
|
221
|
+
margin: 0;
|
|
222
|
+
list-style-type: upper-roman;
|
|
223
|
+
list-style-position: outside;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
&__ol5 {
|
|
227
|
+
padding: 0;
|
|
228
|
+
margin: 0;
|
|
229
|
+
list-style-type: lower-roman;
|
|
230
|
+
list-style-position: outside;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
&__ul {
|
|
234
|
+
padding: 0;
|
|
235
|
+
margin: base(0.4) 0 base(0.8);
|
|
236
|
+
list-style-position: outside;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
&__ul ul {
|
|
240
|
+
margin: 0;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
&__listItem {
|
|
244
|
+
font-size: base(0.8);
|
|
245
|
+
margin: 0 0 0.4em 40px;
|
|
246
|
+
color: var(--theme-text);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
&__listItem::marker {
|
|
250
|
+
// See https://github.com/facebook/lexical/pull/7325/files#diff-915a0be0588ee3ceb38aca4ae182f51291c8885e7af5f8dca2a91f8d92a95e0c
|
|
251
|
+
// These are applied by the ListItemNode
|
|
252
|
+
color: var(--listitem-marker-color);
|
|
253
|
+
background-color: var(--listitem-marker-background-color);
|
|
254
|
+
font-family: var(--listitem-marker-font-family);
|
|
255
|
+
font-size: var(--listitem-marker-font-size);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
&__listItem[dir='rtl'] {
|
|
259
|
+
margin: 0 40px 0.4em 0;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
&__listItemChecked,
|
|
263
|
+
&__listItemUnchecked {
|
|
264
|
+
position: relative;
|
|
265
|
+
// Instead of having margin-left: 40px like other list-items or indented paragraphs,
|
|
266
|
+
// we use padding-left: 25px + margin-left: 15px = 40px, so that the click position
|
|
267
|
+
// calculation in `CheckListPlugin` matches the checkbox
|
|
268
|
+
margin-left: 15px;
|
|
269
|
+
padding-left: 25px;
|
|
270
|
+
list-style-type: none;
|
|
271
|
+
outline: none;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
// See comment above for why we need this
|
|
275
|
+
&__listItemUnchecked[dir='rtl'],
|
|
276
|
+
&__listItemChecked[dir='rtl'] {
|
|
277
|
+
margin-left: 0;
|
|
278
|
+
padding-left: 0;
|
|
279
|
+
padding-right: 25px;
|
|
280
|
+
margin-right: 15px;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
&__listItemChecked {
|
|
284
|
+
text-decoration: line-through;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
&__listItemUnchecked:before,
|
|
288
|
+
&__listItemChecked:before {
|
|
289
|
+
content: '';
|
|
290
|
+
width: base(0.8);
|
|
291
|
+
height: base(0.8);
|
|
292
|
+
top: base(0.1);
|
|
293
|
+
left: 0;
|
|
294
|
+
cursor: pointer;
|
|
295
|
+
display: block;
|
|
296
|
+
background-size: cover;
|
|
297
|
+
position: absolute;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
&__listItemUnchecked[dir='rtl']:before,
|
|
301
|
+
&__listItemChecked[dir='rtl']:before {
|
|
302
|
+
left: auto;
|
|
303
|
+
right: 0;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
&__listItemUnchecked:focus:before,
|
|
307
|
+
&__listItemChecked:focus:before {
|
|
308
|
+
outline: 0;
|
|
309
|
+
box-shadow: 0 0 3px 3px var(--theme-success-400);
|
|
310
|
+
border: 1px solid var(--theme-elevation-250);
|
|
311
|
+
border-radius: var(--style-radius-s);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
&__listItemUnchecked:before {
|
|
315
|
+
border: 1px solid var(--theme-elevation-250);
|
|
316
|
+
border-radius: $style-radius-s;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
&__listItemChecked:before {
|
|
320
|
+
border: 1px solid var(--theme-elevation-500);
|
|
321
|
+
border-radius: $style-radius-s;
|
|
322
|
+
background-color: var(--theme-elevation-100);
|
|
323
|
+
background-repeat: no-repeat;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
&__listItemChecked:after {
|
|
327
|
+
content: '';
|
|
328
|
+
cursor: pointer;
|
|
329
|
+
border-color: var(--theme-text);
|
|
330
|
+
border-style: solid;
|
|
331
|
+
position: absolute;
|
|
332
|
+
display: block;
|
|
333
|
+
top: 6px;
|
|
334
|
+
width: 3px;
|
|
335
|
+
left: 7px;
|
|
336
|
+
right: 7px;
|
|
337
|
+
height: 6px;
|
|
338
|
+
transform: rotate(45deg);
|
|
339
|
+
border-width: 0 2px 2px 0;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
&__nestedListItem {
|
|
343
|
+
list-style-type: none;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
&__nestedListItem:before,
|
|
347
|
+
&__nestedListItem:after {
|
|
348
|
+
display: none;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
html[data-theme='dark'] {
|
|
353
|
+
.LexicalEditorTheme__textCode {
|
|
354
|
+
color: var(--theme-warning-600);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}
|
|
@@ -1,21 +1,30 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
2
|
+
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
|
|
3
3
|
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
4
4
|
import { ContentEditable } from '@lexical/react/LexicalContentEditable.js';
|
|
5
5
|
import { useTranslation } from '@payloadcms/ui';
|
|
6
|
+
import './ContentEditable.scss';
|
|
6
7
|
import * as React from 'react';
|
|
7
8
|
export function LexicalContentEditable({ className, editorConfig }) {
|
|
8
9
|
const { t } = useTranslation();
|
|
9
10
|
const [_, { getTheme }] = useLexicalComposerContext();
|
|
10
11
|
const theme = getTheme();
|
|
11
|
-
return /*#__PURE__*/
|
|
12
|
+
return /*#__PURE__*/ _jsxDEV(ContentEditable, {
|
|
12
13
|
"aria-placeholder": t('lexical:general:placeholder'),
|
|
13
14
|
className: className ?? 'ContentEditable__root',
|
|
14
|
-
placeholder: /*#__PURE__*/
|
|
15
|
+
placeholder: /*#__PURE__*/ _jsxDEV("p", {
|
|
15
16
|
className: theme?.placeholder,
|
|
16
17
|
children: editorConfig?.admin?.placeholder ?? t('lexical:general:placeholder')
|
|
17
|
-
}
|
|
18
|
-
|
|
18
|
+
}, void 0, false, {
|
|
19
|
+
fileName: "src/lexical/ui/ContentEditable.tsx",
|
|
20
|
+
lineNumber: 30,
|
|
21
|
+
columnNumber: 9
|
|
22
|
+
}, void 0)
|
|
23
|
+
}, void 0, false, {
|
|
24
|
+
fileName: "src/lexical/ui/ContentEditable.tsx",
|
|
25
|
+
lineNumber: 26,
|
|
26
|
+
columnNumber: 5
|
|
27
|
+
}, this);
|
|
19
28
|
}
|
|
20
29
|
|
|
21
30
|
//# sourceMappingURL=ContentEditable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lexical/ui/ContentEditable.tsx"],"sourcesContent":["'use client'\nimport type { JSX } from 'react'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { ContentEditable } from '@lexical/react/LexicalContentEditable.js'\nimport { useTranslation } from '@payloadcms/ui'\n\nimport './ContentEditable.scss'\n\nimport * as React from 'react'\n\nimport type { SanitizedClientEditorConfig } from '../config/types.js'\n\nexport function LexicalContentEditable({\n className,\n editorConfig,\n}: {\n className?: string\n editorConfig: SanitizedClientEditorConfig\n}): JSX.Element {\n const { t } = useTranslation<{}, string>()\n const [_, { getTheme }] = useLexicalComposerContext()\n const theme = getTheme()\n\n return (\n <ContentEditable\n aria-placeholder={t('lexical:general:placeholder')}\n className={className ?? 'ContentEditable__root'}\n placeholder={\n <p className={theme?.placeholder}>\n {editorConfig?.admin?.placeholder ?? t('lexical:general:placeholder')}\n </p>\n }\n />\n )\n}\n"],"names":["useLexicalComposerContext","ContentEditable","useTranslation","React","LexicalContentEditable","className","editorConfig","t","_","getTheme","theme","aria-placeholder","placeholder","p","admin"],"mappings":"AAAA;;AAGA,SAASA,yBAAyB,QAAQ,wCAAuC;AACjF,SAASC,eAAe,QAAQ,2CAA0C;AAC1E,SAASC,cAAc,QAAQ,iBAAgB;
|
|
1
|
+
{"version":3,"sources":["../../../src/lexical/ui/ContentEditable.tsx"],"sourcesContent":["'use client'\nimport type { JSX } from 'react'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { ContentEditable } from '@lexical/react/LexicalContentEditable.js'\nimport { useTranslation } from '@payloadcms/ui'\n\nimport './ContentEditable.scss'\n\nimport * as React from 'react'\n\nimport type { SanitizedClientEditorConfig } from '../config/types.js'\n\nexport function LexicalContentEditable({\n className,\n editorConfig,\n}: {\n className?: string\n editorConfig: SanitizedClientEditorConfig\n}): JSX.Element {\n const { t } = useTranslation<{}, string>()\n const [_, { getTheme }] = useLexicalComposerContext()\n const theme = getTheme()\n\n return (\n <ContentEditable\n aria-placeholder={t('lexical:general:placeholder')}\n className={className ?? 'ContentEditable__root'}\n placeholder={\n <p className={theme?.placeholder}>\n {editorConfig?.admin?.placeholder ?? t('lexical:general:placeholder')}\n </p>\n }\n />\n )\n}\n"],"names":["useLexicalComposerContext","ContentEditable","useTranslation","React","LexicalContentEditable","className","editorConfig","t","_","getTheme","theme","aria-placeholder","placeholder","p","admin"],"mappings":"AAAA;;AAGA,SAASA,yBAAyB,QAAQ,wCAAuC;AACjF,SAASC,eAAe,QAAQ,2CAA0C;AAC1E,SAASC,cAAc,QAAQ,iBAAgB;AAE/C,OAAO,yBAAwB;AAE/B,YAAYC,WAAW,QAAO;AAI9B,OAAO,SAASC,uBAAuB,EACrCC,SAAS,EACTC,YAAY,EAIb;IACC,MAAM,EAAEC,CAAC,EAAE,GAAGL;IACd,MAAM,CAACM,GAAG,EAAEC,QAAQ,EAAE,CAAC,GAAGT;IAC1B,MAAMU,QAAQD;IAEd,qBACE,QAACR;QACCU,oBAAkBJ,EAAE;QACpBF,WAAWA,aAAa;QACxBO,2BACE,QAACC;YAAER,WAAWK,OAAOE;sBAClBN,cAAcQ,OAAOF,eAAeL,EAAE;;;;;;;;;;;AAKjD"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
@import '~@payloadcms/ui/scss';
|
|
2
|
+
|
|
3
|
+
$lexical-contenteditable-top-padding: 8px;
|
|
4
|
+
$lexical-contenteditable-bottom-padding: 8px;
|
|
5
|
+
|
|
6
|
+
@layer payload-default {
|
|
7
|
+
.ContentEditable__root {
|
|
8
|
+
border: 0;
|
|
9
|
+
display: block;
|
|
10
|
+
position: relative;
|
|
11
|
+
tab-size: 1;
|
|
12
|
+
outline: 0;
|
|
13
|
+
padding-top: $lexical-contenteditable-top-padding;
|
|
14
|
+
padding-bottom: $lexical-contenteditable-bottom-padding;
|
|
15
|
+
padding-left: 0;
|
|
16
|
+
padding-right: 0;
|
|
17
|
+
|
|
18
|
+
&:focus-visible {
|
|
19
|
+
outline: none !important;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
& > * {
|
|
23
|
+
transition: transform 0.2s ease-in-out;
|
|
24
|
+
// will-change: transform; // breaks cursor rendering for empty paragraph blocks in safari, and creates other issues
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.rich-text-lexical--show-gutter
|
|
29
|
+
> .rich-text-lexical__wrap
|
|
30
|
+
> .editor-container
|
|
31
|
+
> .editor-scroller
|
|
32
|
+
> .editor {
|
|
33
|
+
> .ContentEditable__root {
|
|
34
|
+
padding-left: 3rem;
|
|
35
|
+
}
|
|
36
|
+
> .ContentEditable__root::before {
|
|
37
|
+
content: ' ';
|
|
38
|
+
position: absolute;
|
|
39
|
+
top: $lexical-contenteditable-top-padding;
|
|
40
|
+
left: 0;
|
|
41
|
+
height: calc(
|
|
42
|
+
100% - #{$lexical-contenteditable-top-padding} - #{$lexical-contenteditable-bottom-padding}
|
|
43
|
+
);
|
|
44
|
+
border-left: 1px solid var(--theme-elevation-100);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
html[data-theme='light'] {
|
|
49
|
+
.rich-text-lexical.rich-text-lexical--show-gutter {
|
|
50
|
+
&.error:not(:hover) {
|
|
51
|
+
> .rich-text-lexical__wrap
|
|
52
|
+
> .editor-container
|
|
53
|
+
> .editor-scroller
|
|
54
|
+
> .editor
|
|
55
|
+
> .ContentEditable__root::before {
|
|
56
|
+
border-left: 2px solid var(--theme-error-400);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&.error:hover {
|
|
61
|
+
> .rich-text-lexical__wrap
|
|
62
|
+
> .editor-container
|
|
63
|
+
> .editor-scroller
|
|
64
|
+
> .editor
|
|
65
|
+
> .ContentEditable__root::before {
|
|
66
|
+
border-left: 2px solid var(--theme-error-500);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@include small-break {
|
|
72
|
+
.rich-text-lexical {
|
|
73
|
+
&.error {
|
|
74
|
+
> .rich-text-lexical__wrap {
|
|
75
|
+
@include lightInputError;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
html[data-theme='dark'] {
|
|
83
|
+
.rich-text-lexical.rich-text-lexical--show-gutter {
|
|
84
|
+
&.error {
|
|
85
|
+
> .rich-text-lexical__wrap
|
|
86
|
+
> .editor-container
|
|
87
|
+
> .editor-scroller
|
|
88
|
+
> .editor
|
|
89
|
+
> .ContentEditable__root::before {
|
|
90
|
+
border-left: 2px solid var(--theme-error-500);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@include small-break {
|
|
96
|
+
.rich-text-lexical {
|
|
97
|
+
&.error {
|
|
98
|
+
> .rich-text-lexical__wrap {
|
|
99
|
+
@include darkInputError;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
2
|
+
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
|
|
3
3
|
import React from 'react';
|
|
4
|
-
export const AIIcon = ()=>/*#__PURE__*/
|
|
4
|
+
export const AIIcon = ()=>/*#__PURE__*/ _jsxDEV("svg", {
|
|
5
5
|
"aria-hidden": "true",
|
|
6
6
|
className: "icon",
|
|
7
7
|
fill: "none",
|
|
@@ -11,27 +11,51 @@ export const AIIcon = ()=>/*#__PURE__*/ _jsxs("svg", {
|
|
|
11
11
|
width: "20",
|
|
12
12
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13
13
|
children: [
|
|
14
|
-
/*#__PURE__*/
|
|
14
|
+
/*#__PURE__*/ _jsxDEV("g", {
|
|
15
15
|
clipPath: "url(#clip0_4393_10389)",
|
|
16
|
-
children: /*#__PURE__*/
|
|
16
|
+
children: /*#__PURE__*/ _jsxDEV("path", {
|
|
17
17
|
d: "M6.25 4.75V7M5.125 5.875L7.375 5.875M6.25 13V14.125M6.25 14.125V15.25M6.25 14.125H5.125M6.25 14.125H7.375M10.75 5.5L11.2171 6.66785C11.7399 7.97466 12.7753 9.01014 14.0822 9.53286L15.25 10L13.686 10.782C12.6191 11.3154 11.7708 12.2032 11.2864 13.2932L10.75 14.5L10.2136 13.2932C9.72919 12.2032 8.8809 11.3154 7.814 10.782L6.25 10L7.41785 9.53286C8.72466 9.01014 9.76014 7.97466 10.2829 6.66785L10.75 5.5Z",
|
|
18
18
|
stroke: "currentColor",
|
|
19
19
|
strokeLinecap: "round",
|
|
20
20
|
strokeLinejoin: "round"
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
}, void 0, false, {
|
|
22
|
+
fileName: "src/lexical/ui/icons/AI/index.tsx",
|
|
23
|
+
lineNumber: 16,
|
|
24
|
+
columnNumber: 7
|
|
25
|
+
}, this)
|
|
26
|
+
}, void 0, false, {
|
|
27
|
+
fileName: "src/lexical/ui/icons/AI/index.tsx",
|
|
28
|
+
lineNumber: 15,
|
|
29
|
+
columnNumber: 5
|
|
30
|
+
}, this),
|
|
31
|
+
/*#__PURE__*/ _jsxDEV("defs", {
|
|
32
|
+
children: /*#__PURE__*/ _jsxDEV("clipPath", {
|
|
25
33
|
id: "clip0_4393_10389",
|
|
26
|
-
children: /*#__PURE__*/
|
|
34
|
+
children: /*#__PURE__*/ _jsxDEV("rect", {
|
|
27
35
|
fill: "white",
|
|
28
36
|
height: "12",
|
|
29
37
|
transform: "translate(4 4)",
|
|
30
38
|
width: "12"
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
39
|
+
}, void 0, false, {
|
|
40
|
+
fileName: "src/lexical/ui/icons/AI/index.tsx",
|
|
41
|
+
lineNumber: 25,
|
|
42
|
+
columnNumber: 9
|
|
43
|
+
}, this)
|
|
44
|
+
}, void 0, false, {
|
|
45
|
+
fileName: "src/lexical/ui/icons/AI/index.tsx",
|
|
46
|
+
lineNumber: 24,
|
|
47
|
+
columnNumber: 7
|
|
48
|
+
}, this)
|
|
49
|
+
}, void 0, false, {
|
|
50
|
+
fileName: "src/lexical/ui/icons/AI/index.tsx",
|
|
51
|
+
lineNumber: 23,
|
|
52
|
+
columnNumber: 5
|
|
53
|
+
}, this)
|
|
34
54
|
]
|
|
35
|
-
}
|
|
55
|
+
}, void 0, true, {
|
|
56
|
+
fileName: "src/lexical/ui/icons/AI/index.tsx",
|
|
57
|
+
lineNumber: 5,
|
|
58
|
+
columnNumber: 3
|
|
59
|
+
}, this);
|
|
36
60
|
|
|
37
61
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/lexical/ui/icons/AI/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nexport const AIIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g clipPath=\"url(#clip0_4393_10389)\">\n <path\n d=\"M6.25 4.75V7M5.125 5.875L7.375 5.875M6.25 13V14.125M6.25 14.125V15.25M6.25 14.125H5.125M6.25 14.125H7.375M10.75 5.5L11.2171 6.66785C11.7399 7.97466 12.7753 9.01014 14.0822 9.53286L15.25 10L13.686 10.782C12.6191 11.3154 11.7708 12.2032 11.2864 13.2932L10.75 14.5L10.2136 13.2932C9.72919 12.2032 8.8809 11.3154 7.814 10.782L6.25 10L7.41785 9.53286C8.72466 9.01014 9.76014 7.97466 10.2829 6.66785L10.75 5.5Z\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_4393_10389\">\n <rect fill=\"white\" height=\"12\" transform=\"translate(4 4)\" width=\"12\" />\n </clipPath>\n </defs>\n </svg>\n)\n"],"names":["React","AIIcon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","g","clipPath","path","d","stroke","strokeLinecap","strokeLinejoin","defs","id","rect","transform"],"mappings":"AAAA;;AACA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,SAAmB,kBAC9B,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/lexical/ui/icons/AI/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nexport const AIIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g clipPath=\"url(#clip0_4393_10389)\">\n <path\n d=\"M6.25 4.75V7M5.125 5.875L7.375 5.875M6.25 13V14.125M6.25 14.125V15.25M6.25 14.125H5.125M6.25 14.125H7.375M10.75 5.5L11.2171 6.66785C11.7399 7.97466 12.7753 9.01014 14.0822 9.53286L15.25 10L13.686 10.782C12.6191 11.3154 11.7708 12.2032 11.2864 13.2932L10.75 14.5L10.2136 13.2932C9.72919 12.2032 8.8809 11.3154 7.814 10.782L6.25 10L7.41785 9.53286C8.72466 9.01014 9.76014 7.97466 10.2829 6.66785L10.75 5.5Z\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_4393_10389\">\n <rect fill=\"white\" height=\"12\" transform=\"translate(4 4)\" width=\"12\" />\n </clipPath>\n </defs>\n </svg>\n)\n"],"names":["React","AIIcon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","g","clipPath","path","d","stroke","strokeLinecap","strokeLinejoin","defs","id","rect","transform"],"mappings":"AAAA;;AACA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,SAAmB,kBAC9B,QAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,QAAO;QACPC,SAAQ;QACRC,OAAM;QACNC,OAAM;;0BAEN,QAACC;gBAAEC,UAAS;0BACV,cAAA,QAACC;oBACCC,GAAE;oBACFC,QAAO;oBACPC,eAAc;oBACdC,gBAAe;;;;;;;;;;;0BAGnB,QAACC;0BACC,cAAA,QAACN;oBAASO,IAAG;8BACX,cAAA,QAACC;wBAAKf,MAAK;wBAAQE,QAAO;wBAAKc,WAAU;wBAAiBZ,OAAM;;;;;;;;;;;;;;;;;;;;;aAIvE"}
|