@contember/react-slate-editor-base 2.0.0-alpha.6 → 2.0.0-alpha.8
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/api-extractor.json +3 -0
- package/dist/development/index.cjs +47 -47
- package/dist/development/index.js +47 -47
- package/dist/development/src/components/RichTextEditor.cjs +105 -0
- package/dist/development/src/components/RichTextEditor.cjs.map +1 -0
- package/dist/development/src/components/RichTextEditor.js +105 -0
- package/dist/development/src/components/RichTextEditor.js.map +1 -0
- package/dist/development/src/components/triggers/EditorElementTrigger.cjs +20 -0
- package/dist/development/src/components/triggers/EditorElementTrigger.cjs.map +1 -0
- package/dist/development/src/components/triggers/EditorElementTrigger.js +20 -0
- package/dist/development/src/components/triggers/EditorElementTrigger.js.map +1 -0
- package/dist/development/src/components/triggers/EditorGenericTrigger.cjs +24 -0
- package/dist/development/src/components/triggers/EditorGenericTrigger.cjs.map +1 -0
- package/dist/development/src/components/triggers/EditorGenericTrigger.js +24 -0
- package/dist/development/src/components/triggers/EditorGenericTrigger.js.map +1 -0
- package/dist/development/src/components/triggers/EditorMarkTrigger.cjs +20 -0
- package/dist/development/src/components/triggers/EditorMarkTrigger.cjs.map +1 -0
- package/dist/development/src/components/triggers/EditorMarkTrigger.js +20 -0
- package/dist/development/src/components/triggers/EditorMarkTrigger.js.map +1 -0
- package/dist/development/src/components/triggers/EditorWrapNodeTrigger.cjs +32 -0
- package/dist/development/src/components/triggers/EditorWrapNodeTrigger.cjs.map +1 -0
- package/dist/development/src/components/triggers/EditorWrapNodeTrigger.js +32 -0
- package/dist/development/src/components/triggers/EditorWrapNodeTrigger.js.map +1 -0
- package/dist/development/src/editor/createEditor.cjs +35 -0
- package/dist/development/src/editor/createEditor.cjs.map +1 -0
- package/dist/development/src/editor/createEditor.js.map +1 -0
- package/dist/development/src/editor/createEditorWithEssentials.cjs +227 -0
- package/dist/development/src/editor/createEditorWithEssentials.cjs.map +1 -0
- package/dist/development/src/editor/createEditorWithEssentials.js.map +1 -0
- package/dist/development/src/editor/index.cjs.map +1 -0
- package/dist/development/src/editor/index.js.map +1 -0
- package/dist/development/src/editor/methods/addMarks.cjs.map +1 -0
- package/dist/development/src/editor/methods/addMarks.js.map +1 -0
- package/dist/development/src/editor/methods/canToggleMark.cjs.map +1 -0
- package/dist/development/src/editor/methods/canToggleMark.js.map +1 -0
- package/dist/development/src/editor/methods/closest.cjs.map +1 -0
- package/dist/development/src/editor/methods/closest.js.map +1 -0
- package/dist/development/src/editor/methods/closestBlockEntry.cjs.map +1 -0
- package/dist/development/src/editor/methods/closestBlockEntry.js.map +1 -0
- package/dist/development/src/editor/methods/closestViableBlockContainerEntry.cjs.map +1 -0
- package/dist/development/src/editor/methods/closestViableBlockContainerEntry.js.map +1 -0
- package/dist/development/src/editor/methods/ejectElement.cjs.map +1 -0
- package/dist/development/src/editor/methods/ejectElement.js.map +1 -0
- package/dist/development/src/editor/methods/elementToSpecifics.cjs.map +1 -0
- package/dist/development/src/editor/methods/elementToSpecifics.js.map +1 -0
- package/dist/development/src/editor/methods/getElementDataAttributes.cjs.map +1 -0
- package/dist/development/src/editor/methods/getElementDataAttributes.js.map +1 -0
- package/dist/development/src/editor/methods/getPreviousSibling.cjs.map +1 -0
- package/dist/development/src/editor/methods/getPreviousSibling.js.map +1 -0
- package/dist/development/src/editor/methods/hasMarks.cjs.map +1 -0
- package/dist/development/src/editor/methods/hasMarks.js.map +1 -0
- package/dist/development/src/editor/methods/hasParentOfType.cjs.map +1 -0
- package/dist/development/src/editor/methods/hasParentOfType.js.map +1 -0
- package/dist/development/src/editor/methods/isElementType.cjs.map +1 -0
- package/dist/development/src/editor/methods/isElementType.js.map +1 -0
- package/dist/development/src/editor/methods/permissivelyDeserializeNodes.cjs.map +1 -0
- package/dist/development/src/editor/methods/permissivelyDeserializeNodes.js.map +1 -0
- package/dist/development/src/editor/methods/removeMarks.cjs.map +1 -0
- package/dist/development/src/editor/methods/removeMarks.js.map +1 -0
- package/dist/development/src/editor/methods/serializeNodes.cjs.map +1 -0
- package/dist/development/src/editor/methods/serializeNodes.js.map +1 -0
- package/dist/development/src/editor/methods/strictlyDeserializeNodes.cjs.map +1 -0
- package/dist/development/src/editor/methods/strictlyDeserializeNodes.js.map +1 -0
- package/dist/development/src/editor/methods/textToSpecifics.cjs.map +1 -0
- package/dist/development/src/editor/methods/textToSpecifics.js.map +1 -0
- package/dist/development/src/editor/methods/toLatestFormat.cjs.map +1 -0
- package/dist/development/src/editor/methods/toLatestFormat.js.map +1 -0
- package/dist/development/src/editor/methods/topLevelNodes.cjs.map +1 -0
- package/dist/development/src/editor/methods/topLevelNodes.js.map +1 -0
- package/dist/development/src/internal/components/DefaultElement.cjs +11 -0
- package/dist/development/src/internal/components/DefaultElement.cjs.map +1 -0
- package/dist/development/src/internal/components/DefaultElement.js.map +1 -0
- package/dist/development/src/internal/hooks/useRichTextFieldNodes.cjs.map +1 -0
- package/dist/development/src/internal/hooks/useRichTextFieldNodes.js.map +1 -0
- package/dist/development/src/internal/utils/EditorPasteUtils.cjs.map +1 -0
- package/dist/development/src/internal/utils/EditorPasteUtils.js.map +1 -0
- package/dist/development/src/internal/utils/parseUrl.cjs.map +1 -0
- package/dist/development/src/internal/utils/parseUrl.js.map +1 -0
- package/dist/development/src/plugins/attributes/alignment/alignButton.cjs.map +1 -0
- package/dist/development/src/plugins/attributes/alignment/alignButton.js.map +1 -0
- package/dist/development/src/plugins/behaviour/paste/HtmlDeserializer.cjs.map +1 -0
- package/dist/development/src/plugins/behaviour/paste/HtmlDeserializer.js.map +1 -0
- package/dist/development/src/plugins/behaviour/paste/createMarkHtmlDeserializer.cjs.map +1 -0
- package/dist/development/src/plugins/behaviour/paste/createMarkHtmlDeserializer.js.map +1 -0
- package/dist/development/src/plugins/behaviour/paste/withPaste.cjs.map +1 -0
- package/dist/development/src/plugins/behaviour/paste/withPaste.js.map +1 -0
- package/dist/development/src/plugins/element/anchors/AnchorElement.cjs.map +1 -0
- package/dist/development/src/plugins/element/anchors/AnchorElement.js.map +1 -0
- package/dist/development/src/plugins/element/anchors/AnchorHtmlDeserializer.cjs.map +1 -0
- package/dist/development/src/plugins/element/anchors/AnchorHtmlDeserializer.js.map +1 -0
- package/dist/development/src/plugins/element/anchors/AnchorModifications.cjs.map +1 -0
- package/dist/development/src/plugins/element/anchors/AnchorModifications.js.map +1 -0
- package/dist/development/src/plugins/element/anchors/withAnchors.cjs.map +1 -0
- package/dist/development/src/plugins/element/anchors/withAnchors.js.map +1 -0
- package/dist/development/src/plugins/element/headings/HeadingElement.cjs.map +1 -0
- package/dist/development/src/plugins/element/headings/HeadingElement.js.map +1 -0
- package/dist/development/src/plugins/element/headings/HeadingHtmlDeserializer.cjs.map +1 -0
- package/dist/development/src/plugins/element/headings/HeadingHtmlDeserializer.js.map +1 -0
- package/dist/development/src/plugins/element/headings/withHeadings.cjs.map +1 -0
- package/dist/development/src/plugins/element/headings/withHeadings.js.map +1 -0
- package/dist/development/src/plugins/element/horizonalRules/HorizontalRuleElement.cjs.map +1 -0
- package/dist/development/src/plugins/element/horizonalRules/HorizontalRuleElement.js.map +1 -0
- package/dist/development/src/plugins/element/horizonalRules/withHorizontalRules.cjs.map +1 -0
- package/dist/development/src/plugins/element/horizonalRules/withHorizontalRules.js.map +1 -0
- package/dist/development/src/plugins/element/lists/ListElement.cjs.map +1 -0
- package/dist/development/src/plugins/element/lists/ListElement.js.map +1 -0
- package/dist/development/src/plugins/element/lists/ListHtmlDeserializer.cjs.map +1 -0
- package/dist/development/src/plugins/element/lists/ListHtmlDeserializer.js.map +1 -0
- package/dist/development/src/plugins/element/lists/ListItemElement.cjs.map +1 -0
- package/dist/development/src/plugins/element/lists/ListItemElement.js.map +1 -0
- package/dist/development/src/plugins/element/lists/OrderedListElement.cjs.map +1 -0
- package/dist/development/src/plugins/element/lists/OrderedListElement.js.map +1 -0
- package/dist/development/src/plugins/element/lists/UnorderedListElement.cjs.map +1 -0
- package/dist/development/src/plugins/element/lists/UnorderedListElement.js.map +1 -0
- package/dist/development/src/plugins/element/lists/transforms/dedentListItem.cjs.map +1 -0
- package/dist/development/src/plugins/element/lists/transforms/dedentListItem.js.map +1 -0
- package/dist/development/src/plugins/element/lists/transforms/indentListItem.cjs.map +1 -0
- package/dist/development/src/plugins/element/lists/transforms/indentListItem.js.map +1 -0
- package/dist/development/src/plugins/element/lists/transforms/normalizeListElement.cjs.map +1 -0
- package/dist/development/src/plugins/element/lists/transforms/normalizeListElement.js.map +1 -0
- package/dist/development/src/plugins/element/lists/transforms/toggleListElement.cjs.map +1 -0
- package/dist/development/src/plugins/element/lists/transforms/toggleListElement.js.map +1 -0
- package/dist/development/src/plugins/element/lists/withLists.cjs.map +1 -0
- package/dist/development/src/plugins/element/lists/withLists.js.map +1 -0
- package/dist/development/src/plugins/element/paragraphs/ParagraphElement.cjs.map +1 -0
- package/dist/development/src/plugins/element/paragraphs/ParagraphElement.js.map +1 -0
- package/dist/development/src/plugins/element/paragraphs/ParagraphHtmlDeserializer.cjs.map +1 -0
- package/dist/development/src/plugins/element/paragraphs/ParagraphHtmlDeserializer.js.map +1 -0
- package/dist/development/src/plugins/element/paragraphs/withParagraphs.cjs.map +1 -0
- package/dist/development/src/plugins/element/paragraphs/withParagraphs.js.map +1 -0
- package/dist/development/src/plugins/element/scrollTargets/ScrollTargetElement.cjs.map +1 -0
- package/dist/development/src/plugins/element/scrollTargets/ScrollTargetElement.js.map +1 -0
- package/dist/development/src/plugins/element/scrollTargets/withScrollTargets.cjs.map +1 -0
- package/dist/development/src/plugins/element/scrollTargets/withScrollTargets.js.map +1 -0
- package/dist/development/src/plugins/element/tables/TableCellElement.cjs.map +1 -0
- package/dist/development/src/plugins/element/tables/TableCellElement.js.map +1 -0
- package/dist/development/src/plugins/element/tables/TableElement.cjs.map +1 -0
- package/dist/development/src/plugins/element/tables/TableElement.js.map +1 -0
- package/dist/development/src/plugins/element/tables/TableElementSelection.cjs.map +1 -0
- package/dist/development/src/plugins/element/tables/TableElementSelection.js.map +1 -0
- package/dist/development/src/plugins/element/tables/TableModifications.cjs +134 -0
- package/dist/development/src/plugins/element/tables/TableModifications.cjs.map +1 -0
- package/dist/development/src/plugins/element/tables/TableModifications.js +134 -0
- package/dist/development/src/plugins/element/tables/TableModifications.js.map +1 -0
- package/dist/development/src/plugins/element/tables/TableRowElement.cjs.map +1 -0
- package/dist/development/src/plugins/element/tables/TableRowElement.js.map +1 -0
- package/dist/development/src/plugins/element/tables/gaugeTableColumnCount.cjs.map +1 -0
- package/dist/development/src/plugins/element/tables/gaugeTableColumnCount.js.map +1 -0
- package/dist/development/src/plugins/element/tables/withTables.cjs.map +1 -0
- package/dist/development/src/plugins/element/tables/withTables.js.map +1 -0
- package/dist/development/src/plugins/text/bold/boldMark.cjs +13 -0
- package/dist/development/src/plugins/text/bold/boldMark.cjs.map +1 -0
- package/dist/development/src/plugins/text/bold/boldMark.js.map +1 -0
- package/dist/development/src/plugins/text/bold/withBold.cjs.map +1 -0
- package/dist/development/src/plugins/text/bold/withBold.js.map +1 -0
- package/dist/development/src/plugins/text/code/codeMark.cjs +13 -0
- package/dist/development/src/plugins/text/code/codeMark.cjs.map +1 -0
- package/dist/development/src/plugins/text/code/codeMark.js.map +1 -0
- package/dist/development/src/plugins/text/code/withCode.cjs.map +1 -0
- package/dist/development/src/plugins/text/code/withCode.js.map +1 -0
- package/dist/development/src/plugins/text/highlight/highlightMark.cjs +13 -0
- package/dist/development/src/plugins/text/highlight/highlightMark.cjs.map +1 -0
- package/dist/development/src/plugins/text/highlight/highlightMark.js.map +1 -0
- package/dist/development/src/plugins/text/highlight/withHighlight.cjs.map +1 -0
- package/dist/development/src/plugins/text/highlight/withHighlight.js.map +1 -0
- package/dist/development/src/plugins/text/italic/italicMark.cjs +13 -0
- package/dist/development/src/plugins/text/italic/italicMark.cjs.map +1 -0
- package/dist/development/src/plugins/text/italic/italicMark.js.map +1 -0
- package/dist/development/src/plugins/text/italic/withItalic.cjs.map +1 -0
- package/dist/development/src/plugins/text/italic/withItalic.js.map +1 -0
- package/dist/development/src/plugins/text/newline/withNewline.cjs.map +1 -0
- package/dist/development/src/plugins/text/newline/withNewline.js.map +1 -0
- package/dist/development/src/plugins/text/strikeThrough/strikeThroughMark.cjs +13 -0
- package/dist/development/src/plugins/text/strikeThrough/strikeThroughMark.cjs.map +1 -0
- package/dist/development/src/plugins/text/strikeThrough/strikeThroughMark.js.map +1 -0
- package/dist/development/src/plugins/text/strikeThrough/withStrikeThrough.cjs.map +1 -0
- package/dist/development/src/plugins/text/strikeThrough/withStrikeThrough.js.map +1 -0
- package/dist/development/src/plugins/text/underline/underlineMark.cjs +13 -0
- package/dist/development/src/plugins/text/underline/underlineMark.cjs.map +1 -0
- package/dist/development/src/plugins/text/underline/underlineMark.js.map +1 -0
- package/dist/development/src/plugins/text/underline/withUnderline.cjs.map +1 -0
- package/dist/development/src/plugins/text/underline/withUnderline.js.map +1 -0
- package/dist/development/src/slate-reexport.cjs.map +1 -0
- package/dist/development/src/slate-reexport.js.map +1 -0
- package/dist/production/index.cjs +47 -47
- package/dist/production/index.js +47 -47
- package/dist/production/src/components/RichTextEditor.cjs +93 -0
- package/dist/production/src/components/RichTextEditor.cjs.map +1 -0
- package/dist/production/src/components/RichTextEditor.js.map +1 -0
- package/dist/production/src/components/triggers/EditorElementTrigger.cjs.map +1 -0
- package/dist/production/src/components/triggers/EditorElementTrigger.js.map +1 -0
- package/dist/production/src/components/triggers/EditorGenericTrigger.cjs.map +1 -0
- package/dist/production/src/components/triggers/EditorGenericTrigger.js.map +1 -0
- package/dist/production/src/components/triggers/EditorMarkTrigger.cjs.map +1 -0
- package/dist/production/src/components/triggers/EditorMarkTrigger.js.map +1 -0
- package/dist/production/src/components/triggers/EditorWrapNodeTrigger.cjs.map +1 -0
- package/dist/production/src/components/triggers/EditorWrapNodeTrigger.js.map +1 -0
- package/dist/production/src/editor/createEditor.cjs +35 -0
- package/dist/production/src/editor/createEditor.cjs.map +1 -0
- package/dist/production/src/editor/createEditor.js.map +1 -0
- package/dist/production/src/editor/createEditorWithEssentials.cjs +227 -0
- package/dist/production/src/editor/createEditorWithEssentials.cjs.map +1 -0
- package/dist/production/src/editor/createEditorWithEssentials.js.map +1 -0
- package/dist/production/src/editor/index.cjs.map +1 -0
- package/dist/production/src/editor/index.js.map +1 -0
- package/dist/production/src/editor/methods/addMarks.cjs.map +1 -0
- package/dist/production/src/editor/methods/addMarks.js.map +1 -0
- package/dist/production/src/editor/methods/canToggleMark.cjs.map +1 -0
- package/dist/production/src/editor/methods/canToggleMark.js.map +1 -0
- package/dist/production/src/editor/methods/closest.cjs.map +1 -0
- package/dist/production/src/editor/methods/closest.js.map +1 -0
- package/dist/production/src/editor/methods/closestBlockEntry.cjs.map +1 -0
- package/dist/production/src/editor/methods/closestBlockEntry.js.map +1 -0
- package/dist/production/src/editor/methods/closestViableBlockContainerEntry.cjs.map +1 -0
- package/dist/production/src/editor/methods/closestViableBlockContainerEntry.js.map +1 -0
- package/dist/production/src/editor/methods/ejectElement.cjs.map +1 -0
- package/dist/production/src/editor/methods/ejectElement.js.map +1 -0
- package/dist/production/src/editor/methods/elementToSpecifics.cjs.map +1 -0
- package/dist/production/src/editor/methods/elementToSpecifics.js.map +1 -0
- package/dist/production/src/editor/methods/getElementDataAttributes.cjs.map +1 -0
- package/dist/production/src/editor/methods/getElementDataAttributes.js.map +1 -0
- package/dist/production/src/editor/methods/getPreviousSibling.cjs.map +1 -0
- package/dist/production/src/editor/methods/getPreviousSibling.js.map +1 -0
- package/dist/production/src/editor/methods/hasMarks.cjs.map +1 -0
- package/dist/production/src/editor/methods/hasMarks.js.map +1 -0
- package/dist/production/src/editor/methods/hasParentOfType.cjs.map +1 -0
- package/dist/production/src/editor/methods/hasParentOfType.js.map +1 -0
- package/dist/production/src/editor/methods/isElementType.cjs.map +1 -0
- package/dist/production/src/editor/methods/isElementType.js.map +1 -0
- package/dist/production/src/editor/methods/permissivelyDeserializeNodes.cjs.map +1 -0
- package/dist/production/src/editor/methods/permissivelyDeserializeNodes.js.map +1 -0
- package/dist/production/src/editor/methods/removeMarks.cjs.map +1 -0
- package/dist/production/src/editor/methods/removeMarks.js.map +1 -0
- package/dist/production/src/editor/methods/serializeNodes.cjs.map +1 -0
- package/dist/production/src/editor/methods/serializeNodes.js.map +1 -0
- package/dist/production/src/editor/methods/strictlyDeserializeNodes.cjs.map +1 -0
- package/dist/production/src/editor/methods/strictlyDeserializeNodes.js.map +1 -0
- package/dist/production/src/editor/methods/textToSpecifics.cjs.map +1 -0
- package/dist/production/src/editor/methods/textToSpecifics.js.map +1 -0
- package/dist/production/src/editor/methods/toLatestFormat.cjs.map +1 -0
- package/dist/production/src/editor/methods/toLatestFormat.js.map +1 -0
- package/dist/production/src/editor/methods/topLevelNodes.cjs.map +1 -0
- package/dist/production/src/editor/methods/topLevelNodes.js.map +1 -0
- package/dist/production/src/internal/components/DefaultElement.cjs +11 -0
- package/dist/production/src/internal/components/DefaultElement.cjs.map +1 -0
- package/dist/production/src/internal/components/DefaultElement.js.map +1 -0
- package/dist/production/src/internal/hooks/useRichTextFieldNodes.cjs.map +1 -0
- package/dist/production/src/internal/hooks/useRichTextFieldNodes.js.map +1 -0
- package/dist/production/src/internal/utils/EditorPasteUtils.cjs.map +1 -0
- package/dist/production/src/internal/utils/EditorPasteUtils.js.map +1 -0
- package/dist/production/src/internal/utils/parseUrl.cjs.map +1 -0
- package/dist/production/src/internal/utils/parseUrl.js.map +1 -0
- package/dist/production/src/plugins/attributes/alignment/alignButton.cjs.map +1 -0
- package/dist/production/src/plugins/attributes/alignment/alignButton.js.map +1 -0
- package/dist/production/src/plugins/behaviour/paste/HtmlDeserializer.cjs.map +1 -0
- package/dist/production/src/plugins/behaviour/paste/HtmlDeserializer.js.map +1 -0
- package/dist/production/src/plugins/behaviour/paste/createMarkHtmlDeserializer.cjs.map +1 -0
- package/dist/production/src/plugins/behaviour/paste/createMarkHtmlDeserializer.js.map +1 -0
- package/dist/production/src/plugins/behaviour/paste/withPaste.cjs.map +1 -0
- package/dist/production/src/plugins/behaviour/paste/withPaste.js.map +1 -0
- package/dist/production/src/plugins/element/anchors/AnchorElement.cjs.map +1 -0
- package/dist/production/src/plugins/element/anchors/AnchorElement.js.map +1 -0
- package/dist/production/src/plugins/element/anchors/AnchorHtmlDeserializer.cjs.map +1 -0
- package/dist/production/src/plugins/element/anchors/AnchorHtmlDeserializer.js.map +1 -0
- package/dist/production/src/plugins/element/anchors/AnchorModifications.cjs.map +1 -0
- package/dist/production/src/plugins/element/anchors/AnchorModifications.js.map +1 -0
- package/dist/production/src/plugins/element/anchors/withAnchors.cjs.map +1 -0
- package/dist/production/src/plugins/element/anchors/withAnchors.js.map +1 -0
- package/dist/production/src/plugins/element/headings/HeadingElement.cjs.map +1 -0
- package/dist/production/src/plugins/element/headings/HeadingElement.js.map +1 -0
- package/dist/production/src/plugins/element/headings/HeadingHtmlDeserializer.cjs.map +1 -0
- package/dist/production/src/plugins/element/headings/HeadingHtmlDeserializer.js.map +1 -0
- package/dist/production/src/plugins/element/headings/withHeadings.cjs.map +1 -0
- package/dist/production/src/plugins/element/headings/withHeadings.js.map +1 -0
- package/dist/production/src/plugins/element/horizonalRules/HorizontalRuleElement.cjs.map +1 -0
- package/dist/production/src/plugins/element/horizonalRules/HorizontalRuleElement.js.map +1 -0
- package/dist/production/src/plugins/element/horizonalRules/withHorizontalRules.cjs.map +1 -0
- package/dist/production/src/plugins/element/horizonalRules/withHorizontalRules.js.map +1 -0
- package/dist/production/src/plugins/element/lists/ListElement.cjs.map +1 -0
- package/dist/production/src/plugins/element/lists/ListElement.js.map +1 -0
- package/dist/production/src/plugins/element/lists/ListHtmlDeserializer.cjs.map +1 -0
- package/dist/production/src/plugins/element/lists/ListHtmlDeserializer.js.map +1 -0
- package/dist/production/src/plugins/element/lists/ListItemElement.cjs.map +1 -0
- package/dist/production/src/plugins/element/lists/ListItemElement.js.map +1 -0
- package/dist/production/src/plugins/element/lists/OrderedListElement.cjs.map +1 -0
- package/dist/production/src/plugins/element/lists/OrderedListElement.js.map +1 -0
- package/dist/production/src/plugins/element/lists/UnorderedListElement.cjs.map +1 -0
- package/dist/production/src/plugins/element/lists/UnorderedListElement.js.map +1 -0
- package/dist/production/src/plugins/element/lists/transforms/dedentListItem.cjs.map +1 -0
- package/dist/production/src/plugins/element/lists/transforms/dedentListItem.js.map +1 -0
- package/dist/production/src/plugins/element/lists/transforms/indentListItem.cjs.map +1 -0
- package/dist/production/src/plugins/element/lists/transforms/indentListItem.js.map +1 -0
- package/dist/production/src/plugins/element/lists/transforms/normalizeListElement.cjs.map +1 -0
- package/dist/production/src/plugins/element/lists/transforms/normalizeListElement.js.map +1 -0
- package/dist/production/src/plugins/element/lists/transforms/toggleListElement.cjs.map +1 -0
- package/dist/production/src/plugins/element/lists/transforms/toggleListElement.js.map +1 -0
- package/dist/production/src/plugins/element/lists/withLists.cjs.map +1 -0
- package/dist/production/src/plugins/element/lists/withLists.js.map +1 -0
- package/dist/production/src/plugins/element/paragraphs/ParagraphElement.cjs.map +1 -0
- package/dist/production/src/plugins/element/paragraphs/ParagraphElement.js.map +1 -0
- package/dist/production/src/plugins/element/paragraphs/ParagraphHtmlDeserializer.cjs.map +1 -0
- package/dist/production/src/plugins/element/paragraphs/ParagraphHtmlDeserializer.js.map +1 -0
- package/dist/production/src/plugins/element/paragraphs/withParagraphs.cjs.map +1 -0
- package/dist/production/src/plugins/element/paragraphs/withParagraphs.js.map +1 -0
- package/dist/production/src/plugins/element/scrollTargets/ScrollTargetElement.cjs.map +1 -0
- package/dist/production/src/plugins/element/scrollTargets/ScrollTargetElement.js.map +1 -0
- package/dist/production/src/plugins/element/scrollTargets/withScrollTargets.cjs.map +1 -0
- package/dist/production/src/plugins/element/scrollTargets/withScrollTargets.js.map +1 -0
- package/dist/production/src/plugins/element/tables/TableCellElement.cjs.map +1 -0
- package/dist/production/src/plugins/element/tables/TableCellElement.js.map +1 -0
- package/dist/production/src/plugins/element/tables/TableElement.cjs.map +1 -0
- package/dist/production/src/plugins/element/tables/TableElement.js.map +1 -0
- package/dist/production/src/plugins/element/tables/TableElementSelection.cjs.map +1 -0
- package/dist/production/src/plugins/element/tables/TableElementSelection.js.map +1 -0
- package/dist/production/src/plugins/element/tables/TableModifications.cjs +134 -0
- package/dist/production/src/plugins/element/tables/TableModifications.cjs.map +1 -0
- package/dist/production/src/plugins/element/tables/TableModifications.js +134 -0
- package/dist/production/src/plugins/element/tables/TableModifications.js.map +1 -0
- package/dist/production/src/plugins/element/tables/TableRowElement.cjs.map +1 -0
- package/dist/production/src/plugins/element/tables/TableRowElement.js.map +1 -0
- package/dist/production/src/plugins/element/tables/gaugeTableColumnCount.cjs.map +1 -0
- package/dist/production/src/plugins/element/tables/gaugeTableColumnCount.js.map +1 -0
- package/dist/production/src/plugins/element/tables/withTables.cjs.map +1 -0
- package/dist/production/src/plugins/element/tables/withTables.js.map +1 -0
- package/dist/production/src/plugins/text/bold/boldMark.cjs +13 -0
- package/dist/production/src/plugins/text/bold/boldMark.cjs.map +1 -0
- package/dist/production/src/plugins/text/bold/boldMark.js.map +1 -0
- package/dist/production/src/plugins/text/bold/withBold.cjs.map +1 -0
- package/dist/production/src/plugins/text/bold/withBold.js.map +1 -0
- package/dist/production/src/plugins/text/code/codeMark.cjs +13 -0
- package/dist/production/src/plugins/text/code/codeMark.cjs.map +1 -0
- package/dist/production/src/plugins/text/code/codeMark.js.map +1 -0
- package/dist/production/src/plugins/text/code/withCode.cjs.map +1 -0
- package/dist/production/src/plugins/text/code/withCode.js.map +1 -0
- package/dist/production/src/plugins/text/highlight/highlightMark.cjs +13 -0
- package/dist/production/src/plugins/text/highlight/highlightMark.cjs.map +1 -0
- package/dist/production/src/plugins/text/highlight/highlightMark.js.map +1 -0
- package/dist/production/src/plugins/text/highlight/withHighlight.cjs.map +1 -0
- package/dist/production/src/plugins/text/highlight/withHighlight.js.map +1 -0
- package/dist/production/src/plugins/text/italic/italicMark.cjs +13 -0
- package/dist/production/src/plugins/text/italic/italicMark.cjs.map +1 -0
- package/dist/production/src/plugins/text/italic/italicMark.js.map +1 -0
- package/dist/production/src/plugins/text/italic/withItalic.cjs.map +1 -0
- package/dist/production/src/plugins/text/italic/withItalic.js.map +1 -0
- package/dist/production/src/plugins/text/newline/withNewline.cjs.map +1 -0
- package/dist/production/src/plugins/text/newline/withNewline.js.map +1 -0
- package/dist/production/src/plugins/text/strikeThrough/strikeThroughMark.cjs +13 -0
- package/dist/production/src/plugins/text/strikeThrough/strikeThroughMark.cjs.map +1 -0
- package/dist/production/src/plugins/text/strikeThrough/strikeThroughMark.js.map +1 -0
- package/dist/production/src/plugins/text/strikeThrough/withStrikeThrough.cjs.map +1 -0
- package/dist/production/src/plugins/text/strikeThrough/withStrikeThrough.js.map +1 -0
- package/dist/production/src/plugins/text/underline/underlineMark.cjs +13 -0
- package/dist/production/src/plugins/text/underline/underlineMark.cjs.map +1 -0
- package/dist/production/src/plugins/text/underline/underlineMark.js.map +1 -0
- package/dist/production/src/plugins/text/underline/withUnderline.cjs.map +1 -0
- package/dist/production/src/plugins/text/underline/withUnderline.js.map +1 -0
- package/dist/production/src/slate-reexport.cjs.map +1 -0
- package/dist/production/src/slate-reexport.js.map +1 -0
- package/dist/types/editor/createEditor.d.ts.map +1 -1
- package/dist/types/editor/index.d.ts +28 -28
- package/dist/types/editor/index.d.ts.map +1 -1
- package/dist/types/editor/methods/addMarks.d.ts +2 -1
- package/dist/types/editor/methods/addMarks.d.ts.map +1 -1
- package/dist/types/editor/methods/canToggleMark.d.ts +2 -1
- package/dist/types/editor/methods/canToggleMark.d.ts.map +1 -1
- package/dist/types/editor/methods/closest.d.ts +2 -2
- package/dist/types/editor/methods/closest.d.ts.map +1 -1
- package/dist/types/editor/methods/closestBlockEntry.d.ts +2 -2
- package/dist/types/editor/methods/closestBlockEntry.d.ts.map +1 -1
- package/dist/types/editor/methods/closestViableBlockContainerEntry.d.ts +1 -1
- package/dist/types/editor/methods/closestViableBlockContainerEntry.d.ts.map +1 -1
- package/dist/types/editor/methods/ejectElement.d.ts +2 -2
- package/dist/types/editor/methods/ejectElement.d.ts.map +1 -1
- package/dist/types/editor/methods/elementToSpecifics.d.ts +2 -1
- package/dist/types/editor/methods/elementToSpecifics.d.ts.map +1 -1
- package/dist/types/editor/methods/getElementDataAttributes.d.ts +2 -1
- package/dist/types/editor/methods/getElementDataAttributes.d.ts.map +1 -1
- package/dist/types/editor/methods/getPreviousSibling.d.ts +2 -2
- package/dist/types/editor/methods/getPreviousSibling.d.ts.map +1 -1
- package/dist/types/editor/methods/hasMarks.d.ts +2 -2
- package/dist/types/editor/methods/hasMarks.d.ts.map +1 -1
- package/dist/types/editor/methods/hasParentOfType.d.ts +2 -2
- package/dist/types/editor/methods/hasParentOfType.d.ts.map +1 -1
- package/dist/types/editor/methods/isElementType.d.ts +2 -2
- package/dist/types/editor/methods/isElementType.d.ts.map +1 -1
- package/dist/types/editor/methods/permissivelyDeserializeNodes.d.ts +2 -2
- package/dist/types/editor/methods/permissivelyDeserializeNodes.d.ts.map +1 -1
- package/dist/types/editor/methods/removeMarks.d.ts +2 -1
- package/dist/types/editor/methods/removeMarks.d.ts.map +1 -1
- package/dist/types/editor/methods/serializeNodes.d.ts +2 -2
- package/dist/types/editor/methods/serializeNodes.d.ts.map +1 -1
- package/dist/types/editor/methods/strictlyDeserializeNodes.d.ts +2 -2
- package/dist/types/editor/methods/strictlyDeserializeNodes.d.ts.map +1 -1
- package/dist/types/editor/methods/textToSpecifics.d.ts +2 -1
- package/dist/types/editor/methods/textToSpecifics.d.ts.map +1 -1
- package/dist/types/editor/methods/toLatestFormat.d.ts +2 -1
- package/dist/types/editor/methods/toLatestFormat.d.ts.map +1 -1
- package/dist/types/editor/methods/topLevelNodes.d.ts +2 -1
- package/dist/types/editor/methods/topLevelNodes.d.ts.map +1 -1
- package/dist/types/internal/utils/EditorPasteUtils.d.ts.map +1 -1
- package/dist/types/plugins/behaviour/paste/HtmlDeserializer.d.ts +1 -1
- package/dist/types/plugins/element/anchors/AnchorElement.d.ts.map +1 -1
- package/dist/types/plugins/element/anchors/withAnchors.d.ts +2 -1
- package/dist/types/plugins/element/anchors/withAnchors.d.ts.map +1 -1
- package/dist/types/plugins/element/headings/HeadingElement.d.ts.map +1 -1
- package/dist/types/plugins/element/headings/withHeadings.d.ts +2 -1
- package/dist/types/plugins/element/headings/withHeadings.d.ts.map +1 -1
- package/dist/types/plugins/element/horizonalRules/HorizontalRuleElement.d.ts.map +1 -1
- package/dist/types/plugins/element/horizonalRules/withHorizontalRules.d.ts +2 -1
- package/dist/types/plugins/element/horizonalRules/withHorizontalRules.d.ts.map +1 -1
- package/dist/types/plugins/element/lists/ListElement.d.ts +1 -1
- package/dist/types/plugins/element/lists/ListElement.d.ts.map +1 -1
- package/dist/types/plugins/element/lists/ListItemElement.d.ts.map +1 -1
- package/dist/types/plugins/element/lists/OrderedListElement.d.ts.map +1 -1
- package/dist/types/plugins/element/lists/UnorderedListElement.d.ts.map +1 -1
- package/dist/types/plugins/element/lists/transforms/dedentListItem.d.ts.map +1 -1
- package/dist/types/plugins/element/lists/transforms/indentListItem.d.ts.map +1 -1
- package/dist/types/plugins/element/lists/transforms/toggleListElement.d.ts +1 -1
- package/dist/types/plugins/element/lists/transforms/toggleListElement.d.ts.map +1 -1
- package/dist/types/plugins/element/lists/withLists.d.ts +2 -1
- package/dist/types/plugins/element/lists/withLists.d.ts.map +1 -1
- package/dist/types/plugins/element/paragraphs/ParagraphElement.d.ts.map +1 -1
- package/dist/types/plugins/element/paragraphs/withParagraphs.d.ts +2 -1
- package/dist/types/plugins/element/paragraphs/withParagraphs.d.ts.map +1 -1
- package/dist/types/plugins/element/scrollTargets/ScrollTargetElement.d.ts.map +1 -1
- package/dist/types/plugins/element/scrollTargets/withScrollTargets.d.ts +2 -1
- package/dist/types/plugins/element/scrollTargets/withScrollTargets.d.ts.map +1 -1
- package/dist/types/plugins/element/tables/TableCellElement.d.ts.map +1 -1
- package/dist/types/plugins/element/tables/TableElement.d.ts.map +1 -1
- package/dist/types/plugins/element/tables/TableElementSelection.d.ts.map +1 -1
- package/dist/types/plugins/element/tables/TableRowElement.d.ts.map +1 -1
- package/dist/types/plugins/element/tables/withTables.d.ts +2 -1
- package/dist/types/plugins/element/tables/withTables.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dist/types/types/editor.d.ts.map +1 -1
- package/dist/types/types/htmlDeserializer.d.ts.map +1 -1
- package/dist/types/types/plugins.d.ts.map +1 -1
- package/package.json +7 -15
- package/src/components/RichTextEditor.tsx +3 -3
- package/src/editor/createEditor.ts +1 -1
- package/src/editor/createEditorWithEssentials.tsx +2 -2
- package/src/internal/hooks/useRichTextFieldNodes.ts +6 -6
- package/src/internal/utils/EditorPasteUtils.ts +36 -36
- package/src/plugins/behaviour/paste/HtmlDeserializer.ts +1 -1
- package/src/plugins/element/lists/transforms/normalizeListElement.ts +1 -1
- package/src/plugins/element/tables/TableModifications.ts +3 -3
- package/src/types/editor.ts +1 -1
- package/src/types/htmlDeserializer.ts +14 -14
- package/src/types/plugins.ts +7 -7
- package/tsconfig.json +7 -0
- package/tsdoc.json +6 -0
- package/dist/development/components/RichTextEditor.cjs +0 -93
- package/dist/development/components/RichTextEditor.cjs.map +0 -1
- package/dist/development/components/RichTextEditor.js.map +0 -1
- package/dist/development/components/triggers/EditorElementTrigger.cjs.map +0 -1
- package/dist/development/components/triggers/EditorElementTrigger.js.map +0 -1
- package/dist/development/components/triggers/EditorGenericTrigger.cjs.map +0 -1
- package/dist/development/components/triggers/EditorGenericTrigger.js.map +0 -1
- package/dist/development/components/triggers/EditorMarkTrigger.cjs.map +0 -1
- package/dist/development/components/triggers/EditorMarkTrigger.js.map +0 -1
- package/dist/development/components/triggers/EditorWrapNodeTrigger.cjs.map +0 -1
- package/dist/development/components/triggers/EditorWrapNodeTrigger.js.map +0 -1
- package/dist/development/editor/createEditor.cjs +0 -35
- package/dist/development/editor/createEditor.cjs.map +0 -1
- package/dist/development/editor/createEditor.js.map +0 -1
- package/dist/development/editor/createEditorWithEssentials.cjs +0 -227
- package/dist/development/editor/createEditorWithEssentials.cjs.map +0 -1
- package/dist/development/editor/createEditorWithEssentials.js.map +0 -1
- package/dist/development/editor/index.cjs.map +0 -1
- package/dist/development/editor/index.js.map +0 -1
- package/dist/development/editor/methods/addMarks.cjs.map +0 -1
- package/dist/development/editor/methods/addMarks.js.map +0 -1
- package/dist/development/editor/methods/canToggleMark.cjs.map +0 -1
- package/dist/development/editor/methods/canToggleMark.js.map +0 -1
- package/dist/development/editor/methods/closest.cjs.map +0 -1
- package/dist/development/editor/methods/closest.js.map +0 -1
- package/dist/development/editor/methods/closestBlockEntry.cjs.map +0 -1
- package/dist/development/editor/methods/closestBlockEntry.js.map +0 -1
- package/dist/development/editor/methods/closestViableBlockContainerEntry.cjs.map +0 -1
- package/dist/development/editor/methods/closestViableBlockContainerEntry.js.map +0 -1
- package/dist/development/editor/methods/ejectElement.cjs.map +0 -1
- package/dist/development/editor/methods/ejectElement.js.map +0 -1
- package/dist/development/editor/methods/elementToSpecifics.cjs.map +0 -1
- package/dist/development/editor/methods/elementToSpecifics.js.map +0 -1
- package/dist/development/editor/methods/getElementDataAttributes.cjs.map +0 -1
- package/dist/development/editor/methods/getElementDataAttributes.js.map +0 -1
- package/dist/development/editor/methods/getPreviousSibling.cjs.map +0 -1
- package/dist/development/editor/methods/getPreviousSibling.js.map +0 -1
- package/dist/development/editor/methods/hasMarks.cjs.map +0 -1
- package/dist/development/editor/methods/hasMarks.js.map +0 -1
- package/dist/development/editor/methods/hasParentOfType.cjs.map +0 -1
- package/dist/development/editor/methods/hasParentOfType.js.map +0 -1
- package/dist/development/editor/methods/isElementType.cjs.map +0 -1
- package/dist/development/editor/methods/isElementType.js.map +0 -1
- package/dist/development/editor/methods/permissivelyDeserializeNodes.cjs.map +0 -1
- package/dist/development/editor/methods/permissivelyDeserializeNodes.js.map +0 -1
- package/dist/development/editor/methods/removeMarks.cjs.map +0 -1
- package/dist/development/editor/methods/removeMarks.js.map +0 -1
- package/dist/development/editor/methods/serializeNodes.cjs.map +0 -1
- package/dist/development/editor/methods/serializeNodes.js.map +0 -1
- package/dist/development/editor/methods/strictlyDeserializeNodes.cjs.map +0 -1
- package/dist/development/editor/methods/strictlyDeserializeNodes.js.map +0 -1
- package/dist/development/editor/methods/textToSpecifics.cjs.map +0 -1
- package/dist/development/editor/methods/textToSpecifics.js.map +0 -1
- package/dist/development/editor/methods/toLatestFormat.cjs.map +0 -1
- package/dist/development/editor/methods/toLatestFormat.js.map +0 -1
- package/dist/development/editor/methods/topLevelNodes.cjs.map +0 -1
- package/dist/development/editor/methods/topLevelNodes.js.map +0 -1
- package/dist/development/internal/components/DefaultElement.cjs +0 -11
- package/dist/development/internal/components/DefaultElement.cjs.map +0 -1
- package/dist/development/internal/components/DefaultElement.js.map +0 -1
- package/dist/development/internal/hooks/useRichTextFieldNodes.cjs.map +0 -1
- package/dist/development/internal/hooks/useRichTextFieldNodes.js.map +0 -1
- package/dist/development/internal/utils/EditorPasteUtils.cjs.map +0 -1
- package/dist/development/internal/utils/EditorPasteUtils.js.map +0 -1
- package/dist/development/internal/utils/parseUrl.cjs.map +0 -1
- package/dist/development/internal/utils/parseUrl.js.map +0 -1
- package/dist/development/plugins/attributes/alignment/alignButton.cjs.map +0 -1
- package/dist/development/plugins/attributes/alignment/alignButton.js.map +0 -1
- package/dist/development/plugins/behaviour/paste/HtmlDeserializer.cjs.map +0 -1
- package/dist/development/plugins/behaviour/paste/HtmlDeserializer.js.map +0 -1
- package/dist/development/plugins/behaviour/paste/createMarkHtmlDeserializer.cjs.map +0 -1
- package/dist/development/plugins/behaviour/paste/createMarkHtmlDeserializer.js.map +0 -1
- package/dist/development/plugins/behaviour/paste/withPaste.cjs.map +0 -1
- package/dist/development/plugins/behaviour/paste/withPaste.js.map +0 -1
- package/dist/development/plugins/element/anchors/AnchorElement.cjs.map +0 -1
- package/dist/development/plugins/element/anchors/AnchorElement.js.map +0 -1
- package/dist/development/plugins/element/anchors/AnchorHtmlDeserializer.cjs.map +0 -1
- package/dist/development/plugins/element/anchors/AnchorHtmlDeserializer.js.map +0 -1
- package/dist/development/plugins/element/anchors/AnchorModifications.cjs.map +0 -1
- package/dist/development/plugins/element/anchors/AnchorModifications.js.map +0 -1
- package/dist/development/plugins/element/anchors/withAnchors.cjs.map +0 -1
- package/dist/development/plugins/element/anchors/withAnchors.js.map +0 -1
- package/dist/development/plugins/element/headings/HeadingElement.cjs.map +0 -1
- package/dist/development/plugins/element/headings/HeadingElement.js.map +0 -1
- package/dist/development/plugins/element/headings/HeadingHtmlDeserializer.cjs.map +0 -1
- package/dist/development/plugins/element/headings/HeadingHtmlDeserializer.js.map +0 -1
- package/dist/development/plugins/element/headings/withHeadings.cjs.map +0 -1
- package/dist/development/plugins/element/headings/withHeadings.js.map +0 -1
- package/dist/development/plugins/element/horizonalRules/HorizontalRuleElement.cjs.map +0 -1
- package/dist/development/plugins/element/horizonalRules/HorizontalRuleElement.js.map +0 -1
- package/dist/development/plugins/element/horizonalRules/withHorizontalRules.cjs.map +0 -1
- package/dist/development/plugins/element/horizonalRules/withHorizontalRules.js.map +0 -1
- package/dist/development/plugins/element/lists/ListElement.cjs.map +0 -1
- package/dist/development/plugins/element/lists/ListElement.js.map +0 -1
- package/dist/development/plugins/element/lists/ListHtmlDeserializer.cjs.map +0 -1
- package/dist/development/plugins/element/lists/ListHtmlDeserializer.js.map +0 -1
- package/dist/development/plugins/element/lists/ListItemElement.cjs.map +0 -1
- package/dist/development/plugins/element/lists/ListItemElement.js.map +0 -1
- package/dist/development/plugins/element/lists/OrderedListElement.cjs.map +0 -1
- package/dist/development/plugins/element/lists/OrderedListElement.js.map +0 -1
- package/dist/development/plugins/element/lists/UnorderedListElement.cjs.map +0 -1
- package/dist/development/plugins/element/lists/UnorderedListElement.js.map +0 -1
- package/dist/development/plugins/element/lists/transforms/dedentListItem.cjs.map +0 -1
- package/dist/development/plugins/element/lists/transforms/dedentListItem.js.map +0 -1
- package/dist/development/plugins/element/lists/transforms/indentListItem.cjs.map +0 -1
- package/dist/development/plugins/element/lists/transforms/indentListItem.js.map +0 -1
- package/dist/development/plugins/element/lists/transforms/normalizeListElement.cjs.map +0 -1
- package/dist/development/plugins/element/lists/transforms/normalizeListElement.js.map +0 -1
- package/dist/development/plugins/element/lists/transforms/toggleListElement.cjs.map +0 -1
- package/dist/development/plugins/element/lists/transforms/toggleListElement.js.map +0 -1
- package/dist/development/plugins/element/lists/withLists.cjs.map +0 -1
- package/dist/development/plugins/element/lists/withLists.js.map +0 -1
- package/dist/development/plugins/element/paragraphs/ParagraphElement.cjs.map +0 -1
- package/dist/development/plugins/element/paragraphs/ParagraphElement.js.map +0 -1
- package/dist/development/plugins/element/paragraphs/ParagraphHtmlDeserializer.cjs.map +0 -1
- package/dist/development/plugins/element/paragraphs/ParagraphHtmlDeserializer.js.map +0 -1
- package/dist/development/plugins/element/paragraphs/withParagraphs.cjs.map +0 -1
- package/dist/development/plugins/element/paragraphs/withParagraphs.js.map +0 -1
- package/dist/development/plugins/element/scrollTargets/ScrollTargetElement.cjs.map +0 -1
- package/dist/development/plugins/element/scrollTargets/ScrollTargetElement.js.map +0 -1
- package/dist/development/plugins/element/scrollTargets/withScrollTargets.cjs.map +0 -1
- package/dist/development/plugins/element/scrollTargets/withScrollTargets.js.map +0 -1
- package/dist/development/plugins/element/tables/TableCellElement.cjs.map +0 -1
- package/dist/development/plugins/element/tables/TableCellElement.js.map +0 -1
- package/dist/development/plugins/element/tables/TableElement.cjs.map +0 -1
- package/dist/development/plugins/element/tables/TableElement.js.map +0 -1
- package/dist/development/plugins/element/tables/TableElementSelection.cjs.map +0 -1
- package/dist/development/plugins/element/tables/TableElementSelection.js.map +0 -1
- package/dist/development/plugins/element/tables/TableModifications.cjs +0 -134
- package/dist/development/plugins/element/tables/TableModifications.cjs.map +0 -1
- package/dist/development/plugins/element/tables/TableModifications.js +0 -134
- package/dist/development/plugins/element/tables/TableModifications.js.map +0 -1
- package/dist/development/plugins/element/tables/TableRowElement.cjs.map +0 -1
- package/dist/development/plugins/element/tables/TableRowElement.js.map +0 -1
- package/dist/development/plugins/element/tables/gaugeTableColumnCount.cjs.map +0 -1
- package/dist/development/plugins/element/tables/gaugeTableColumnCount.js.map +0 -1
- package/dist/development/plugins/element/tables/withTables.cjs.map +0 -1
- package/dist/development/plugins/element/tables/withTables.js.map +0 -1
- package/dist/development/plugins/text/bold/boldMark.cjs +0 -13
- package/dist/development/plugins/text/bold/boldMark.cjs.map +0 -1
- package/dist/development/plugins/text/bold/boldMark.js.map +0 -1
- package/dist/development/plugins/text/bold/withBold.cjs.map +0 -1
- package/dist/development/plugins/text/bold/withBold.js.map +0 -1
- package/dist/development/plugins/text/code/codeMark.cjs +0 -13
- package/dist/development/plugins/text/code/codeMark.cjs.map +0 -1
- package/dist/development/plugins/text/code/codeMark.js.map +0 -1
- package/dist/development/plugins/text/code/withCode.cjs.map +0 -1
- package/dist/development/plugins/text/code/withCode.js.map +0 -1
- package/dist/development/plugins/text/highlight/highlightMark.cjs +0 -13
- package/dist/development/plugins/text/highlight/highlightMark.cjs.map +0 -1
- package/dist/development/plugins/text/highlight/highlightMark.js.map +0 -1
- package/dist/development/plugins/text/highlight/withHighlight.cjs.map +0 -1
- package/dist/development/plugins/text/highlight/withHighlight.js.map +0 -1
- package/dist/development/plugins/text/italic/italicMark.cjs +0 -13
- package/dist/development/plugins/text/italic/italicMark.cjs.map +0 -1
- package/dist/development/plugins/text/italic/italicMark.js.map +0 -1
- package/dist/development/plugins/text/italic/withItalic.cjs.map +0 -1
- package/dist/development/plugins/text/italic/withItalic.js.map +0 -1
- package/dist/development/plugins/text/newline/withNewline.cjs.map +0 -1
- package/dist/development/plugins/text/newline/withNewline.js.map +0 -1
- package/dist/development/plugins/text/strikeThrough/strikeThroughMark.cjs +0 -13
- package/dist/development/plugins/text/strikeThrough/strikeThroughMark.cjs.map +0 -1
- package/dist/development/plugins/text/strikeThrough/strikeThroughMark.js.map +0 -1
- package/dist/development/plugins/text/strikeThrough/withStrikeThrough.cjs.map +0 -1
- package/dist/development/plugins/text/strikeThrough/withStrikeThrough.js.map +0 -1
- package/dist/development/plugins/text/underline/underlineMark.cjs +0 -13
- package/dist/development/plugins/text/underline/underlineMark.cjs.map +0 -1
- package/dist/development/plugins/text/underline/underlineMark.js.map +0 -1
- package/dist/development/plugins/text/underline/withUnderline.cjs.map +0 -1
- package/dist/development/plugins/text/underline/withUnderline.js.map +0 -1
- package/dist/development/slate-reexport.cjs.map +0 -1
- package/dist/development/slate-reexport.js.map +0 -1
- package/dist/production/components/RichTextEditor.cjs +0 -93
- package/dist/production/components/RichTextEditor.cjs.map +0 -1
- package/dist/production/components/RichTextEditor.js +0 -93
- package/dist/production/components/RichTextEditor.js.map +0 -1
- package/dist/production/components/triggers/EditorElementTrigger.cjs +0 -16
- package/dist/production/components/triggers/EditorElementTrigger.cjs.map +0 -1
- package/dist/production/components/triggers/EditorElementTrigger.js +0 -16
- package/dist/production/components/triggers/EditorElementTrigger.js.map +0 -1
- package/dist/production/components/triggers/EditorGenericTrigger.cjs +0 -20
- package/dist/production/components/triggers/EditorGenericTrigger.cjs.map +0 -1
- package/dist/production/components/triggers/EditorGenericTrigger.js +0 -20
- package/dist/production/components/triggers/EditorGenericTrigger.js.map +0 -1
- package/dist/production/components/triggers/EditorMarkTrigger.cjs +0 -16
- package/dist/production/components/triggers/EditorMarkTrigger.cjs.map +0 -1
- package/dist/production/components/triggers/EditorMarkTrigger.js +0 -16
- package/dist/production/components/triggers/EditorMarkTrigger.js.map +0 -1
- package/dist/production/components/triggers/EditorWrapNodeTrigger.cjs +0 -28
- package/dist/production/components/triggers/EditorWrapNodeTrigger.cjs.map +0 -1
- package/dist/production/components/triggers/EditorWrapNodeTrigger.js +0 -28
- package/dist/production/components/triggers/EditorWrapNodeTrigger.js.map +0 -1
- package/dist/production/editor/createEditor.cjs +0 -35
- package/dist/production/editor/createEditor.cjs.map +0 -1
- package/dist/production/editor/createEditor.js.map +0 -1
- package/dist/production/editor/createEditorWithEssentials.cjs +0 -227
- package/dist/production/editor/createEditorWithEssentials.cjs.map +0 -1
- package/dist/production/editor/createEditorWithEssentials.js.map +0 -1
- package/dist/production/editor/index.cjs.map +0 -1
- package/dist/production/editor/index.js.map +0 -1
- package/dist/production/editor/methods/addMarks.cjs.map +0 -1
- package/dist/production/editor/methods/addMarks.js.map +0 -1
- package/dist/production/editor/methods/canToggleMark.cjs.map +0 -1
- package/dist/production/editor/methods/canToggleMark.js.map +0 -1
- package/dist/production/editor/methods/closest.cjs.map +0 -1
- package/dist/production/editor/methods/closest.js.map +0 -1
- package/dist/production/editor/methods/closestBlockEntry.cjs.map +0 -1
- package/dist/production/editor/methods/closestBlockEntry.js.map +0 -1
- package/dist/production/editor/methods/closestViableBlockContainerEntry.cjs.map +0 -1
- package/dist/production/editor/methods/closestViableBlockContainerEntry.js.map +0 -1
- package/dist/production/editor/methods/ejectElement.cjs.map +0 -1
- package/dist/production/editor/methods/ejectElement.js.map +0 -1
- package/dist/production/editor/methods/elementToSpecifics.cjs.map +0 -1
- package/dist/production/editor/methods/elementToSpecifics.js.map +0 -1
- package/dist/production/editor/methods/getElementDataAttributes.cjs.map +0 -1
- package/dist/production/editor/methods/getElementDataAttributes.js.map +0 -1
- package/dist/production/editor/methods/getPreviousSibling.cjs.map +0 -1
- package/dist/production/editor/methods/getPreviousSibling.js.map +0 -1
- package/dist/production/editor/methods/hasMarks.cjs.map +0 -1
- package/dist/production/editor/methods/hasMarks.js.map +0 -1
- package/dist/production/editor/methods/hasParentOfType.cjs.map +0 -1
- package/dist/production/editor/methods/hasParentOfType.js.map +0 -1
- package/dist/production/editor/methods/isElementType.cjs.map +0 -1
- package/dist/production/editor/methods/isElementType.js.map +0 -1
- package/dist/production/editor/methods/permissivelyDeserializeNodes.cjs.map +0 -1
- package/dist/production/editor/methods/permissivelyDeserializeNodes.js.map +0 -1
- package/dist/production/editor/methods/removeMarks.cjs.map +0 -1
- package/dist/production/editor/methods/removeMarks.js.map +0 -1
- package/dist/production/editor/methods/serializeNodes.cjs.map +0 -1
- package/dist/production/editor/methods/serializeNodes.js.map +0 -1
- package/dist/production/editor/methods/strictlyDeserializeNodes.cjs.map +0 -1
- package/dist/production/editor/methods/strictlyDeserializeNodes.js.map +0 -1
- package/dist/production/editor/methods/textToSpecifics.cjs.map +0 -1
- package/dist/production/editor/methods/textToSpecifics.js.map +0 -1
- package/dist/production/editor/methods/toLatestFormat.cjs.map +0 -1
- package/dist/production/editor/methods/toLatestFormat.js.map +0 -1
- package/dist/production/editor/methods/topLevelNodes.cjs.map +0 -1
- package/dist/production/editor/methods/topLevelNodes.js.map +0 -1
- package/dist/production/internal/components/DefaultElement.cjs +0 -11
- package/dist/production/internal/components/DefaultElement.cjs.map +0 -1
- package/dist/production/internal/components/DefaultElement.js.map +0 -1
- package/dist/production/internal/hooks/useRichTextFieldNodes.cjs.map +0 -1
- package/dist/production/internal/hooks/useRichTextFieldNodes.js.map +0 -1
- package/dist/production/internal/utils/EditorPasteUtils.cjs.map +0 -1
- package/dist/production/internal/utils/EditorPasteUtils.js.map +0 -1
- package/dist/production/internal/utils/parseUrl.cjs.map +0 -1
- package/dist/production/internal/utils/parseUrl.js.map +0 -1
- package/dist/production/plugins/attributes/alignment/alignButton.cjs.map +0 -1
- package/dist/production/plugins/attributes/alignment/alignButton.js.map +0 -1
- package/dist/production/plugins/behaviour/paste/HtmlDeserializer.cjs.map +0 -1
- package/dist/production/plugins/behaviour/paste/HtmlDeserializer.js.map +0 -1
- package/dist/production/plugins/behaviour/paste/createMarkHtmlDeserializer.cjs.map +0 -1
- package/dist/production/plugins/behaviour/paste/createMarkHtmlDeserializer.js.map +0 -1
- package/dist/production/plugins/behaviour/paste/withPaste.cjs.map +0 -1
- package/dist/production/plugins/behaviour/paste/withPaste.js.map +0 -1
- package/dist/production/plugins/element/anchors/AnchorElement.cjs.map +0 -1
- package/dist/production/plugins/element/anchors/AnchorElement.js.map +0 -1
- package/dist/production/plugins/element/anchors/AnchorHtmlDeserializer.cjs.map +0 -1
- package/dist/production/plugins/element/anchors/AnchorHtmlDeserializer.js.map +0 -1
- package/dist/production/plugins/element/anchors/AnchorModifications.cjs.map +0 -1
- package/dist/production/plugins/element/anchors/AnchorModifications.js.map +0 -1
- package/dist/production/plugins/element/anchors/withAnchors.cjs.map +0 -1
- package/dist/production/plugins/element/anchors/withAnchors.js.map +0 -1
- package/dist/production/plugins/element/headings/HeadingElement.cjs.map +0 -1
- package/dist/production/plugins/element/headings/HeadingElement.js.map +0 -1
- package/dist/production/plugins/element/headings/HeadingHtmlDeserializer.cjs.map +0 -1
- package/dist/production/plugins/element/headings/HeadingHtmlDeserializer.js.map +0 -1
- package/dist/production/plugins/element/headings/withHeadings.cjs.map +0 -1
- package/dist/production/plugins/element/headings/withHeadings.js.map +0 -1
- package/dist/production/plugins/element/horizonalRules/HorizontalRuleElement.cjs.map +0 -1
- package/dist/production/plugins/element/horizonalRules/HorizontalRuleElement.js.map +0 -1
- package/dist/production/plugins/element/horizonalRules/withHorizontalRules.cjs.map +0 -1
- package/dist/production/plugins/element/horizonalRules/withHorizontalRules.js.map +0 -1
- package/dist/production/plugins/element/lists/ListElement.cjs.map +0 -1
- package/dist/production/plugins/element/lists/ListElement.js.map +0 -1
- package/dist/production/plugins/element/lists/ListHtmlDeserializer.cjs.map +0 -1
- package/dist/production/plugins/element/lists/ListHtmlDeserializer.js.map +0 -1
- package/dist/production/plugins/element/lists/ListItemElement.cjs.map +0 -1
- package/dist/production/plugins/element/lists/ListItemElement.js.map +0 -1
- package/dist/production/plugins/element/lists/OrderedListElement.cjs.map +0 -1
- package/dist/production/plugins/element/lists/OrderedListElement.js.map +0 -1
- package/dist/production/plugins/element/lists/UnorderedListElement.cjs.map +0 -1
- package/dist/production/plugins/element/lists/UnorderedListElement.js.map +0 -1
- package/dist/production/plugins/element/lists/transforms/dedentListItem.cjs.map +0 -1
- package/dist/production/plugins/element/lists/transforms/dedentListItem.js.map +0 -1
- package/dist/production/plugins/element/lists/transforms/indentListItem.cjs.map +0 -1
- package/dist/production/plugins/element/lists/transforms/indentListItem.js.map +0 -1
- package/dist/production/plugins/element/lists/transforms/normalizeListElement.cjs.map +0 -1
- package/dist/production/plugins/element/lists/transforms/normalizeListElement.js.map +0 -1
- package/dist/production/plugins/element/lists/transforms/toggleListElement.cjs.map +0 -1
- package/dist/production/plugins/element/lists/transforms/toggleListElement.js.map +0 -1
- package/dist/production/plugins/element/lists/withLists.cjs.map +0 -1
- package/dist/production/plugins/element/lists/withLists.js.map +0 -1
- package/dist/production/plugins/element/paragraphs/ParagraphElement.cjs.map +0 -1
- package/dist/production/plugins/element/paragraphs/ParagraphElement.js.map +0 -1
- package/dist/production/plugins/element/paragraphs/ParagraphHtmlDeserializer.cjs.map +0 -1
- package/dist/production/plugins/element/paragraphs/ParagraphHtmlDeserializer.js.map +0 -1
- package/dist/production/plugins/element/paragraphs/withParagraphs.cjs.map +0 -1
- package/dist/production/plugins/element/paragraphs/withParagraphs.js.map +0 -1
- package/dist/production/plugins/element/scrollTargets/ScrollTargetElement.cjs.map +0 -1
- package/dist/production/plugins/element/scrollTargets/ScrollTargetElement.js.map +0 -1
- package/dist/production/plugins/element/scrollTargets/withScrollTargets.cjs.map +0 -1
- package/dist/production/plugins/element/scrollTargets/withScrollTargets.js.map +0 -1
- package/dist/production/plugins/element/tables/TableCellElement.cjs.map +0 -1
- package/dist/production/plugins/element/tables/TableCellElement.js.map +0 -1
- package/dist/production/plugins/element/tables/TableElement.cjs.map +0 -1
- package/dist/production/plugins/element/tables/TableElement.js.map +0 -1
- package/dist/production/plugins/element/tables/TableElementSelection.cjs.map +0 -1
- package/dist/production/plugins/element/tables/TableElementSelection.js.map +0 -1
- package/dist/production/plugins/element/tables/TableModifications.cjs +0 -134
- package/dist/production/plugins/element/tables/TableModifications.cjs.map +0 -1
- package/dist/production/plugins/element/tables/TableModifications.js +0 -134
- package/dist/production/plugins/element/tables/TableModifications.js.map +0 -1
- package/dist/production/plugins/element/tables/TableRowElement.cjs.map +0 -1
- package/dist/production/plugins/element/tables/TableRowElement.js.map +0 -1
- package/dist/production/plugins/element/tables/gaugeTableColumnCount.cjs.map +0 -1
- package/dist/production/plugins/element/tables/gaugeTableColumnCount.js.map +0 -1
- package/dist/production/plugins/element/tables/withTables.cjs.map +0 -1
- package/dist/production/plugins/element/tables/withTables.js.map +0 -1
- package/dist/production/plugins/text/bold/boldMark.cjs +0 -13
- package/dist/production/plugins/text/bold/boldMark.cjs.map +0 -1
- package/dist/production/plugins/text/bold/boldMark.js.map +0 -1
- package/dist/production/plugins/text/bold/withBold.cjs.map +0 -1
- package/dist/production/plugins/text/bold/withBold.js.map +0 -1
- package/dist/production/plugins/text/code/codeMark.cjs +0 -13
- package/dist/production/plugins/text/code/codeMark.cjs.map +0 -1
- package/dist/production/plugins/text/code/codeMark.js.map +0 -1
- package/dist/production/plugins/text/code/withCode.cjs.map +0 -1
- package/dist/production/plugins/text/code/withCode.js.map +0 -1
- package/dist/production/plugins/text/highlight/highlightMark.cjs +0 -13
- package/dist/production/plugins/text/highlight/highlightMark.cjs.map +0 -1
- package/dist/production/plugins/text/highlight/highlightMark.js.map +0 -1
- package/dist/production/plugins/text/highlight/withHighlight.cjs.map +0 -1
- package/dist/production/plugins/text/highlight/withHighlight.js.map +0 -1
- package/dist/production/plugins/text/italic/italicMark.cjs +0 -13
- package/dist/production/plugins/text/italic/italicMark.cjs.map +0 -1
- package/dist/production/plugins/text/italic/italicMark.js.map +0 -1
- package/dist/production/plugins/text/italic/withItalic.cjs.map +0 -1
- package/dist/production/plugins/text/italic/withItalic.js.map +0 -1
- package/dist/production/plugins/text/newline/withNewline.cjs.map +0 -1
- package/dist/production/plugins/text/newline/withNewline.js.map +0 -1
- package/dist/production/plugins/text/strikeThrough/strikeThroughMark.cjs +0 -13
- package/dist/production/plugins/text/strikeThrough/strikeThroughMark.cjs.map +0 -1
- package/dist/production/plugins/text/strikeThrough/strikeThroughMark.js.map +0 -1
- package/dist/production/plugins/text/strikeThrough/withStrikeThrough.cjs.map +0 -1
- package/dist/production/plugins/text/strikeThrough/withStrikeThrough.js.map +0 -1
- package/dist/production/plugins/text/underline/underlineMark.cjs +0 -13
- package/dist/production/plugins/text/underline/underlineMark.cjs.map +0 -1
- package/dist/production/plugins/text/underline/underlineMark.js.map +0 -1
- package/dist/production/plugins/text/underline/withUnderline.cjs.map +0 -1
- package/dist/production/plugins/text/underline/withUnderline.js.map +0 -1
- package/dist/production/slate-reexport.cjs.map +0 -1
- package/dist/production/slate-reexport.js.map +0 -1
- /package/dist/development/{editor → src/editor}/createEditor.js +0 -0
- /package/dist/development/{editor → src/editor}/createEditorWithEssentials.js +0 -0
- /package/dist/development/{editor → src/editor}/index.cjs +0 -0
- /package/dist/development/{editor → src/editor}/index.js +0 -0
- /package/dist/development/{editor → src/editor}/methods/addMarks.cjs +0 -0
- /package/dist/development/{editor → src/editor}/methods/addMarks.js +0 -0
- /package/dist/development/{editor → src/editor}/methods/canToggleMark.cjs +0 -0
- /package/dist/development/{editor → src/editor}/methods/canToggleMark.js +0 -0
- /package/dist/development/{editor → src/editor}/methods/closest.cjs +0 -0
- /package/dist/development/{editor → src/editor}/methods/closest.js +0 -0
- /package/dist/development/{editor → src/editor}/methods/closestBlockEntry.cjs +0 -0
- /package/dist/development/{editor → src/editor}/methods/closestBlockEntry.js +0 -0
- /package/dist/development/{editor → src/editor}/methods/closestViableBlockContainerEntry.cjs +0 -0
- /package/dist/development/{editor → src/editor}/methods/closestViableBlockContainerEntry.js +0 -0
- /package/dist/development/{editor → src/editor}/methods/ejectElement.cjs +0 -0
- /package/dist/development/{editor → src/editor}/methods/ejectElement.js +0 -0
- /package/dist/development/{editor → src/editor}/methods/elementToSpecifics.cjs +0 -0
- /package/dist/development/{editor → src/editor}/methods/elementToSpecifics.js +0 -0
- /package/dist/development/{editor → src/editor}/methods/getElementDataAttributes.cjs +0 -0
- /package/dist/development/{editor → src/editor}/methods/getElementDataAttributes.js +0 -0
- /package/dist/development/{editor → src/editor}/methods/getPreviousSibling.cjs +0 -0
- /package/dist/development/{editor → src/editor}/methods/getPreviousSibling.js +0 -0
- /package/dist/development/{editor → src/editor}/methods/hasMarks.cjs +0 -0
- /package/dist/development/{editor → src/editor}/methods/hasMarks.js +0 -0
- /package/dist/development/{editor → src/editor}/methods/hasParentOfType.cjs +0 -0
- /package/dist/development/{editor → src/editor}/methods/hasParentOfType.js +0 -0
- /package/dist/development/{editor → src/editor}/methods/isElementType.cjs +0 -0
- /package/dist/development/{editor → src/editor}/methods/isElementType.js +0 -0
- /package/dist/development/{editor → src/editor}/methods/permissivelyDeserializeNodes.cjs +0 -0
- /package/dist/development/{editor → src/editor}/methods/permissivelyDeserializeNodes.js +0 -0
- /package/dist/development/{editor → src/editor}/methods/removeMarks.cjs +0 -0
- /package/dist/development/{editor → src/editor}/methods/removeMarks.js +0 -0
- /package/dist/development/{editor → src/editor}/methods/serializeNodes.cjs +0 -0
- /package/dist/development/{editor → src/editor}/methods/serializeNodes.js +0 -0
- /package/dist/development/{editor → src/editor}/methods/strictlyDeserializeNodes.cjs +0 -0
- /package/dist/development/{editor → src/editor}/methods/strictlyDeserializeNodes.js +0 -0
- /package/dist/development/{editor → src/editor}/methods/textToSpecifics.cjs +0 -0
- /package/dist/development/{editor → src/editor}/methods/textToSpecifics.js +0 -0
- /package/dist/development/{editor → src/editor}/methods/toLatestFormat.cjs +0 -0
- /package/dist/development/{editor → src/editor}/methods/toLatestFormat.js +0 -0
- /package/dist/development/{editor → src/editor}/methods/topLevelNodes.cjs +0 -0
- /package/dist/development/{editor → src/editor}/methods/topLevelNodes.js +0 -0
- /package/dist/development/{internal → src/internal}/components/DefaultElement.js +0 -0
- /package/dist/development/{internal → src/internal}/hooks/useRichTextFieldNodes.cjs +0 -0
- /package/dist/development/{internal → src/internal}/hooks/useRichTextFieldNodes.js +0 -0
- /package/dist/development/{internal → src/internal}/utils/EditorPasteUtils.cjs +0 -0
- /package/dist/development/{internal → src/internal}/utils/EditorPasteUtils.js +0 -0
- /package/dist/development/{internal → src/internal}/utils/parseUrl.cjs +0 -0
- /package/dist/development/{internal → src/internal}/utils/parseUrl.js +0 -0
- /package/dist/development/{plugins → src/plugins}/attributes/alignment/alignButton.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/attributes/alignment/alignButton.js +0 -0
- /package/dist/development/{plugins → src/plugins}/behaviour/paste/HtmlDeserializer.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/behaviour/paste/HtmlDeserializer.js +0 -0
- /package/dist/development/{plugins → src/plugins}/behaviour/paste/createMarkHtmlDeserializer.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/behaviour/paste/createMarkHtmlDeserializer.js +0 -0
- /package/dist/development/{plugins → src/plugins}/behaviour/paste/withPaste.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/behaviour/paste/withPaste.js +0 -0
- /package/dist/development/{plugins → src/plugins}/element/anchors/AnchorElement.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/element/anchors/AnchorElement.js +0 -0
- /package/dist/development/{plugins → src/plugins}/element/anchors/AnchorHtmlDeserializer.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/element/anchors/AnchorHtmlDeserializer.js +0 -0
- /package/dist/development/{plugins → src/plugins}/element/anchors/AnchorModifications.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/element/anchors/AnchorModifications.js +0 -0
- /package/dist/development/{plugins → src/plugins}/element/anchors/withAnchors.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/element/anchors/withAnchors.js +0 -0
- /package/dist/development/{plugins → src/plugins}/element/headings/HeadingElement.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/element/headings/HeadingElement.js +0 -0
- /package/dist/development/{plugins → src/plugins}/element/headings/HeadingHtmlDeserializer.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/element/headings/HeadingHtmlDeserializer.js +0 -0
- /package/dist/development/{plugins → src/plugins}/element/headings/withHeadings.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/element/headings/withHeadings.js +0 -0
- /package/dist/development/{plugins → src/plugins}/element/horizonalRules/HorizontalRuleElement.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/element/horizonalRules/HorizontalRuleElement.js +0 -0
- /package/dist/development/{plugins → src/plugins}/element/horizonalRules/withHorizontalRules.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/element/horizonalRules/withHorizontalRules.js +0 -0
- /package/dist/development/{plugins → src/plugins}/element/lists/ListElement.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/element/lists/ListElement.js +0 -0
- /package/dist/development/{plugins → src/plugins}/element/lists/ListHtmlDeserializer.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/element/lists/ListHtmlDeserializer.js +0 -0
- /package/dist/development/{plugins → src/plugins}/element/lists/ListItemElement.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/element/lists/ListItemElement.js +0 -0
- /package/dist/development/{plugins → src/plugins}/element/lists/OrderedListElement.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/element/lists/OrderedListElement.js +0 -0
- /package/dist/development/{plugins → src/plugins}/element/lists/UnorderedListElement.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/element/lists/UnorderedListElement.js +0 -0
- /package/dist/development/{plugins → src/plugins}/element/lists/transforms/dedentListItem.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/element/lists/transforms/dedentListItem.js +0 -0
- /package/dist/development/{plugins → src/plugins}/element/lists/transforms/indentListItem.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/element/lists/transforms/indentListItem.js +0 -0
- /package/dist/development/{plugins → src/plugins}/element/lists/transforms/normalizeListElement.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/element/lists/transforms/normalizeListElement.js +0 -0
- /package/dist/development/{plugins → src/plugins}/element/lists/transforms/toggleListElement.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/element/lists/transforms/toggleListElement.js +0 -0
- /package/dist/development/{plugins → src/plugins}/element/lists/withLists.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/element/lists/withLists.js +0 -0
- /package/dist/development/{plugins → src/plugins}/element/paragraphs/ParagraphElement.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/element/paragraphs/ParagraphElement.js +0 -0
- /package/dist/development/{plugins → src/plugins}/element/paragraphs/ParagraphHtmlDeserializer.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/element/paragraphs/ParagraphHtmlDeserializer.js +0 -0
- /package/dist/development/{plugins → src/plugins}/element/paragraphs/withParagraphs.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/element/paragraphs/withParagraphs.js +0 -0
- /package/dist/development/{plugins → src/plugins}/element/scrollTargets/ScrollTargetElement.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/element/scrollTargets/ScrollTargetElement.js +0 -0
- /package/dist/development/{plugins → src/plugins}/element/scrollTargets/withScrollTargets.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/element/scrollTargets/withScrollTargets.js +0 -0
- /package/dist/development/{plugins → src/plugins}/element/tables/TableCellElement.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/element/tables/TableCellElement.js +0 -0
- /package/dist/development/{plugins → src/plugins}/element/tables/TableElement.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/element/tables/TableElement.js +0 -0
- /package/dist/development/{plugins → src/plugins}/element/tables/TableElementSelection.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/element/tables/TableElementSelection.js +0 -0
- /package/dist/development/{plugins → src/plugins}/element/tables/TableRowElement.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/element/tables/TableRowElement.js +0 -0
- /package/dist/development/{plugins → src/plugins}/element/tables/gaugeTableColumnCount.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/element/tables/gaugeTableColumnCount.js +0 -0
- /package/dist/development/{plugins → src/plugins}/element/tables/withTables.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/element/tables/withTables.js +0 -0
- /package/dist/development/{plugins → src/plugins}/text/bold/boldMark.js +0 -0
- /package/dist/development/{plugins → src/plugins}/text/bold/withBold.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/text/bold/withBold.js +0 -0
- /package/dist/development/{plugins → src/plugins}/text/code/codeMark.js +0 -0
- /package/dist/development/{plugins → src/plugins}/text/code/withCode.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/text/code/withCode.js +0 -0
- /package/dist/development/{plugins → src/plugins}/text/highlight/highlightMark.js +0 -0
- /package/dist/development/{plugins → src/plugins}/text/highlight/withHighlight.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/text/highlight/withHighlight.js +0 -0
- /package/dist/development/{plugins → src/plugins}/text/italic/italicMark.js +0 -0
- /package/dist/development/{plugins → src/plugins}/text/italic/withItalic.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/text/italic/withItalic.js +0 -0
- /package/dist/development/{plugins → src/plugins}/text/newline/withNewline.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/text/newline/withNewline.js +0 -0
- /package/dist/development/{plugins → src/plugins}/text/strikeThrough/strikeThroughMark.js +0 -0
- /package/dist/development/{plugins → src/plugins}/text/strikeThrough/withStrikeThrough.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/text/strikeThrough/withStrikeThrough.js +0 -0
- /package/dist/development/{plugins → src/plugins}/text/underline/underlineMark.js +0 -0
- /package/dist/development/{plugins → src/plugins}/text/underline/withUnderline.cjs +0 -0
- /package/dist/development/{plugins → src/plugins}/text/underline/withUnderline.js +0 -0
- /package/dist/development/{slate-reexport.cjs → src/slate-reexport.cjs} +0 -0
- /package/dist/development/{slate-reexport.js → src/slate-reexport.js} +0 -0
- /package/dist/{development → production/src}/components/RichTextEditor.js +0 -0
- /package/dist/{development → production/src}/components/triggers/EditorElementTrigger.cjs +0 -0
- /package/dist/{development → production/src}/components/triggers/EditorElementTrigger.js +0 -0
- /package/dist/{development → production/src}/components/triggers/EditorGenericTrigger.cjs +0 -0
- /package/dist/{development → production/src}/components/triggers/EditorGenericTrigger.js +0 -0
- /package/dist/{development → production/src}/components/triggers/EditorMarkTrigger.cjs +0 -0
- /package/dist/{development → production/src}/components/triggers/EditorMarkTrigger.js +0 -0
- /package/dist/{development → production/src}/components/triggers/EditorWrapNodeTrigger.cjs +0 -0
- /package/dist/{development → production/src}/components/triggers/EditorWrapNodeTrigger.js +0 -0
- /package/dist/production/{editor → src/editor}/createEditor.js +0 -0
- /package/dist/production/{editor → src/editor}/createEditorWithEssentials.js +0 -0
- /package/dist/production/{editor → src/editor}/index.cjs +0 -0
- /package/dist/production/{editor → src/editor}/index.js +0 -0
- /package/dist/production/{editor → src/editor}/methods/addMarks.cjs +0 -0
- /package/dist/production/{editor → src/editor}/methods/addMarks.js +0 -0
- /package/dist/production/{editor → src/editor}/methods/canToggleMark.cjs +0 -0
- /package/dist/production/{editor → src/editor}/methods/canToggleMark.js +0 -0
- /package/dist/production/{editor → src/editor}/methods/closest.cjs +0 -0
- /package/dist/production/{editor → src/editor}/methods/closest.js +0 -0
- /package/dist/production/{editor → src/editor}/methods/closestBlockEntry.cjs +0 -0
- /package/dist/production/{editor → src/editor}/methods/closestBlockEntry.js +0 -0
- /package/dist/production/{editor → src/editor}/methods/closestViableBlockContainerEntry.cjs +0 -0
- /package/dist/production/{editor → src/editor}/methods/closestViableBlockContainerEntry.js +0 -0
- /package/dist/production/{editor → src/editor}/methods/ejectElement.cjs +0 -0
- /package/dist/production/{editor → src/editor}/methods/ejectElement.js +0 -0
- /package/dist/production/{editor → src/editor}/methods/elementToSpecifics.cjs +0 -0
- /package/dist/production/{editor → src/editor}/methods/elementToSpecifics.js +0 -0
- /package/dist/production/{editor → src/editor}/methods/getElementDataAttributes.cjs +0 -0
- /package/dist/production/{editor → src/editor}/methods/getElementDataAttributes.js +0 -0
- /package/dist/production/{editor → src/editor}/methods/getPreviousSibling.cjs +0 -0
- /package/dist/production/{editor → src/editor}/methods/getPreviousSibling.js +0 -0
- /package/dist/production/{editor → src/editor}/methods/hasMarks.cjs +0 -0
- /package/dist/production/{editor → src/editor}/methods/hasMarks.js +0 -0
- /package/dist/production/{editor → src/editor}/methods/hasParentOfType.cjs +0 -0
- /package/dist/production/{editor → src/editor}/methods/hasParentOfType.js +0 -0
- /package/dist/production/{editor → src/editor}/methods/isElementType.cjs +0 -0
- /package/dist/production/{editor → src/editor}/methods/isElementType.js +0 -0
- /package/dist/production/{editor → src/editor}/methods/permissivelyDeserializeNodes.cjs +0 -0
- /package/dist/production/{editor → src/editor}/methods/permissivelyDeserializeNodes.js +0 -0
- /package/dist/production/{editor → src/editor}/methods/removeMarks.cjs +0 -0
- /package/dist/production/{editor → src/editor}/methods/removeMarks.js +0 -0
- /package/dist/production/{editor → src/editor}/methods/serializeNodes.cjs +0 -0
- /package/dist/production/{editor → src/editor}/methods/serializeNodes.js +0 -0
- /package/dist/production/{editor → src/editor}/methods/strictlyDeserializeNodes.cjs +0 -0
- /package/dist/production/{editor → src/editor}/methods/strictlyDeserializeNodes.js +0 -0
- /package/dist/production/{editor → src/editor}/methods/textToSpecifics.cjs +0 -0
- /package/dist/production/{editor → src/editor}/methods/textToSpecifics.js +0 -0
- /package/dist/production/{editor → src/editor}/methods/toLatestFormat.cjs +0 -0
- /package/dist/production/{editor → src/editor}/methods/toLatestFormat.js +0 -0
- /package/dist/production/{editor → src/editor}/methods/topLevelNodes.cjs +0 -0
- /package/dist/production/{editor → src/editor}/methods/topLevelNodes.js +0 -0
- /package/dist/production/{internal → src/internal}/components/DefaultElement.js +0 -0
- /package/dist/production/{internal → src/internal}/hooks/useRichTextFieldNodes.cjs +0 -0
- /package/dist/production/{internal → src/internal}/hooks/useRichTextFieldNodes.js +0 -0
- /package/dist/production/{internal → src/internal}/utils/EditorPasteUtils.cjs +0 -0
- /package/dist/production/{internal → src/internal}/utils/EditorPasteUtils.js +0 -0
- /package/dist/production/{internal → src/internal}/utils/parseUrl.cjs +0 -0
- /package/dist/production/{internal → src/internal}/utils/parseUrl.js +0 -0
- /package/dist/production/{plugins → src/plugins}/attributes/alignment/alignButton.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/attributes/alignment/alignButton.js +0 -0
- /package/dist/production/{plugins → src/plugins}/behaviour/paste/HtmlDeserializer.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/behaviour/paste/HtmlDeserializer.js +0 -0
- /package/dist/production/{plugins → src/plugins}/behaviour/paste/createMarkHtmlDeserializer.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/behaviour/paste/createMarkHtmlDeserializer.js +0 -0
- /package/dist/production/{plugins → src/plugins}/behaviour/paste/withPaste.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/behaviour/paste/withPaste.js +0 -0
- /package/dist/production/{plugins → src/plugins}/element/anchors/AnchorElement.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/element/anchors/AnchorElement.js +0 -0
- /package/dist/production/{plugins → src/plugins}/element/anchors/AnchorHtmlDeserializer.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/element/anchors/AnchorHtmlDeserializer.js +0 -0
- /package/dist/production/{plugins → src/plugins}/element/anchors/AnchorModifications.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/element/anchors/AnchorModifications.js +0 -0
- /package/dist/production/{plugins → src/plugins}/element/anchors/withAnchors.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/element/anchors/withAnchors.js +0 -0
- /package/dist/production/{plugins → src/plugins}/element/headings/HeadingElement.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/element/headings/HeadingElement.js +0 -0
- /package/dist/production/{plugins → src/plugins}/element/headings/HeadingHtmlDeserializer.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/element/headings/HeadingHtmlDeserializer.js +0 -0
- /package/dist/production/{plugins → src/plugins}/element/headings/withHeadings.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/element/headings/withHeadings.js +0 -0
- /package/dist/production/{plugins → src/plugins}/element/horizonalRules/HorizontalRuleElement.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/element/horizonalRules/HorizontalRuleElement.js +0 -0
- /package/dist/production/{plugins → src/plugins}/element/horizonalRules/withHorizontalRules.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/element/horizonalRules/withHorizontalRules.js +0 -0
- /package/dist/production/{plugins → src/plugins}/element/lists/ListElement.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/element/lists/ListElement.js +0 -0
- /package/dist/production/{plugins → src/plugins}/element/lists/ListHtmlDeserializer.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/element/lists/ListHtmlDeserializer.js +0 -0
- /package/dist/production/{plugins → src/plugins}/element/lists/ListItemElement.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/element/lists/ListItemElement.js +0 -0
- /package/dist/production/{plugins → src/plugins}/element/lists/OrderedListElement.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/element/lists/OrderedListElement.js +0 -0
- /package/dist/production/{plugins → src/plugins}/element/lists/UnorderedListElement.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/element/lists/UnorderedListElement.js +0 -0
- /package/dist/production/{plugins → src/plugins}/element/lists/transforms/dedentListItem.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/element/lists/transforms/dedentListItem.js +0 -0
- /package/dist/production/{plugins → src/plugins}/element/lists/transforms/indentListItem.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/element/lists/transforms/indentListItem.js +0 -0
- /package/dist/production/{plugins → src/plugins}/element/lists/transforms/normalizeListElement.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/element/lists/transforms/normalizeListElement.js +0 -0
- /package/dist/production/{plugins → src/plugins}/element/lists/transforms/toggleListElement.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/element/lists/transforms/toggleListElement.js +0 -0
- /package/dist/production/{plugins → src/plugins}/element/lists/withLists.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/element/lists/withLists.js +0 -0
- /package/dist/production/{plugins → src/plugins}/element/paragraphs/ParagraphElement.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/element/paragraphs/ParagraphElement.js +0 -0
- /package/dist/production/{plugins → src/plugins}/element/paragraphs/ParagraphHtmlDeserializer.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/element/paragraphs/ParagraphHtmlDeserializer.js +0 -0
- /package/dist/production/{plugins → src/plugins}/element/paragraphs/withParagraphs.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/element/paragraphs/withParagraphs.js +0 -0
- /package/dist/production/{plugins → src/plugins}/element/scrollTargets/ScrollTargetElement.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/element/scrollTargets/ScrollTargetElement.js +0 -0
- /package/dist/production/{plugins → src/plugins}/element/scrollTargets/withScrollTargets.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/element/scrollTargets/withScrollTargets.js +0 -0
- /package/dist/production/{plugins → src/plugins}/element/tables/TableCellElement.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/element/tables/TableCellElement.js +0 -0
- /package/dist/production/{plugins → src/plugins}/element/tables/TableElement.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/element/tables/TableElement.js +0 -0
- /package/dist/production/{plugins → src/plugins}/element/tables/TableElementSelection.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/element/tables/TableElementSelection.js +0 -0
- /package/dist/production/{plugins → src/plugins}/element/tables/TableRowElement.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/element/tables/TableRowElement.js +0 -0
- /package/dist/production/{plugins → src/plugins}/element/tables/gaugeTableColumnCount.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/element/tables/gaugeTableColumnCount.js +0 -0
- /package/dist/production/{plugins → src/plugins}/element/tables/withTables.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/element/tables/withTables.js +0 -0
- /package/dist/production/{plugins → src/plugins}/text/bold/boldMark.js +0 -0
- /package/dist/production/{plugins → src/plugins}/text/bold/withBold.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/text/bold/withBold.js +0 -0
- /package/dist/production/{plugins → src/plugins}/text/code/codeMark.js +0 -0
- /package/dist/production/{plugins → src/plugins}/text/code/withCode.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/text/code/withCode.js +0 -0
- /package/dist/production/{plugins → src/plugins}/text/highlight/highlightMark.js +0 -0
- /package/dist/production/{plugins → src/plugins}/text/highlight/withHighlight.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/text/highlight/withHighlight.js +0 -0
- /package/dist/production/{plugins → src/plugins}/text/italic/italicMark.js +0 -0
- /package/dist/production/{plugins → src/plugins}/text/italic/withItalic.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/text/italic/withItalic.js +0 -0
- /package/dist/production/{plugins → src/plugins}/text/newline/withNewline.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/text/newline/withNewline.js +0 -0
- /package/dist/production/{plugins → src/plugins}/text/strikeThrough/strikeThroughMark.js +0 -0
- /package/dist/production/{plugins → src/plugins}/text/strikeThrough/withStrikeThrough.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/text/strikeThrough/withStrikeThrough.js +0 -0
- /package/dist/production/{plugins → src/plugins}/text/underline/underlineMark.js +0 -0
- /package/dist/production/{plugins → src/plugins}/text/underline/withUnderline.cjs +0 -0
- /package/dist/production/{plugins → src/plugins}/text/underline/withUnderline.js +0 -0
- /package/dist/production/{slate-reexport.cjs → src/slate-reexport.cjs} +0 -0
- /package/dist/production/{slate-reexport.js → src/slate-reexport.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"withTables.js","sources":["../../../../../src/plugins/element/tables/withTables.ts"],"sourcesContent":["import { Editor, Element, Node as SlateNode, NodeEntry, Path as SlatePath, Point, Range as SlateRange, Text, Transforms } from 'slate'\nimport { ContemberEditor } from '../../../editor'\nimport { isTableCellElement, TableCellElement, tableCellElementPlugin } from './TableCellElement'\nimport { getTableElementColumnCount, getTableElementRowCount, isTableElement, TableElement, tableElementPlugin } from './TableElement'\nimport { getTableCellCoordinates, selectTableCellContents } from './TableElementSelection'\nimport { TableModifications } from './TableModifications'\nimport { isTableRowElement, TableRowElement, tableRowElementPlugin } from './TableRowElement'\nimport { ElementRenderer } from '../../../types'\n\nexport const withTables = ({ renderTable, renderTableCell, renderTableRow }: {\n\trenderTable: ElementRenderer<TableElement>\n\trenderTableCell: ElementRenderer<TableCellElement>\n\trenderTableRow: ElementRenderer<TableRowElement>\n}) => <E extends Editor>(editor: E): E => {\n\tconst {\n\t\tdeleteForward,\n\t\tdeleteBackward,\n\t\tdeleteFragment,\n\t\tinsertBreak,\n\t\tonKeyDown,\n\t} = editor\n\n\teditor.registerElement(tableElementPlugin({ render: renderTable }))\n\teditor.registerElement(tableCellElementPlugin({ render: renderTableCell }))\n\teditor.registerElement(tableRowElementPlugin({ render: renderTableRow }))\n\n\tObject.assign<Editor, Partial<Editor>>(editor, {\n\t\tinsertBreak: () => {\n\t\t\tconst closestBlockEntry = ContemberEditor.closestBlockEntry(editor)\n\t\t\tif (closestBlockEntry && isTableCellElement(closestBlockEntry[0])) {\n\t\t\t\tconst selection = editor.selection\n\t\t\t\tconst [, closestBlockPath] = closestBlockEntry\n\t\t\t\tconst [cellStart, cellEnd] = Editor.edges(editor, closestBlockPath)\n\n\t\t\t\tif (!selection) {\n\t\t\t\t\treturn insertBreak()\n\t\t\t\t}\n\n\t\t\t\treturn Editor.withoutNormalizing(editor, () => {\n\t\t\t\t\tTransforms.wrapNodes(editor, editor.createDefaultElement([]), {\n\t\t\t\t\t\tat: {\n\t\t\t\t\t\t\tanchor: cellStart,\n\t\t\t\t\t\t\tfocus: cellEnd,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tmatch: node => Text.isText(node) || (Element.isElement(node) && editor.isInline(node)),\n\t\t\t\t\t})\n\n\t\t\t\t\tconst relative = SlatePath.relative(selection.focus.path, closestBlockPath)\n\t\t\t\t\tTransforms.splitNodes(editor, {\n\t\t\t\t\t\t// The zero should be the newly created default element.\n\t\t\t\t\t\tat: {\n\t\t\t\t\t\t\tpath: [...closestBlockPath, 0, ...relative],\n\t\t\t\t\t\t\toffset: selection.focus.offset,\n\t\t\t\t\t\t},\n\t\t\t\t\t\talways: true,\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t}\n\t\t\tinsertBreak()\n\t\t},\n\t\tdeleteBackward: unit => {\n\t\t\tconst selection = editor.selection\n\t\t\tif (selection && SlateRange.isCollapsed(selection)) {\n\t\t\t\tconst closestBlockEntry = ContemberEditor.closestBlockEntry(editor)\n\t\t\t\tif (\n\t\t\t\t\tclosestBlockEntry &&\n\t\t\t\t\tisTableCellElement(closestBlockEntry[0]) &&\n\t\t\t\t\tPoint.equals(selection.focus, Editor.start(editor, closestBlockEntry[1]))\n\t\t\t\t) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\t\t\tdeleteBackward(unit)\n\t\t},\n\t\tdeleteForward: unit => {\n\t\t\tconst selection = editor.selection\n\t\t\tif (selection && SlateRange.isCollapsed(selection)) {\n\t\t\t\tconst closestBlockEntry = ContemberEditor.closestBlockEntry(editor)\n\t\t\t\tif (\n\t\t\t\t\tclosestBlockEntry &&\n\t\t\t\t\tisTableCellElement(closestBlockEntry[0]) &&\n\t\t\t\t\tPoint.equals(selection.focus, Editor.end(editor, closestBlockEntry[1]))\n\t\t\t\t) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\t\t\tdeleteForward(unit)\n\t\t},\n\t\tdeleteFragment: () => {\n\t\t\tconst selection = editor.selection\n\t\t\tif (!selection || SlateRange.isCollapsed(selection)) {\n\t\t\t\treturn deleteFragment()\n\t\t\t}\n\t\t\tconst lowestCommonAncestorPath = SlatePath.common(selection.anchor.path, selection.focus.path)\n\t\t\tconst [lowestCommonAncestor] = Editor.node(editor, lowestCommonAncestorPath)\n\n\t\t\tif (isTableElement(lowestCommonAncestor) || isTableRowElement(lowestCommonAncestor)) {\n\t\t\t\treturn // TODO nope for now\n\t\t\t}\n\t\t\tdeleteFragment()\n\t\t},\n\t\tonKeyDown: event => {\n\t\t\tconst selection = editor.selection\n\t\t\tif (\n\t\t\t\t!selection ||\n\t\t\t\t!(\n\t\t\t\t\tevent.key === 'Tab' ||\n\t\t\t\t\tevent.key === 'ArrowUp' ||\n\t\t\t\t\tevent.key === 'ArrowRight' ||\n\t\t\t\t\tevent.key === 'ArrowDown' ||\n\t\t\t\t\tevent.key === 'ArrowLeft' ||\n\t\t\t\t\tevent.key === 'Enter' ||\n\t\t\t\t\tevent.key === 'Backspace'\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\treturn onKeyDown(event)\n\t\t\t}\n\t\t\tconst closestBlockEntry = ContemberEditor.closestBlockEntry(editor, { at: selection })\n\n\t\t\tif (!closestBlockEntry) {\n\t\t\t\treturn onKeyDown(event)\n\t\t\t}\n\t\t\tlet cellElement: TableCellElement\n\t\t\tlet cellPath: SlatePath\n\n\t\t\tif (!isTableCellElement(closestBlockEntry[0])) {\n\t\t\t\tconst parent = SlateNode.parent(editor, closestBlockEntry[1])\n\t\t\t\tif (Element.isElement(closestBlockEntry[0]) && editor.isDefaultElement(closestBlockEntry[0]) && isTableCellElement(parent)) {\n\t\t\t\t\tcellElement = parent\n\t\t\t\t\tcellPath = SlatePath.parent(closestBlockEntry[1])\n\t\t\t\t} else {\n\t\t\t\t\treturn onKeyDown(event)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t[cellElement, cellPath] = closestBlockEntry\n\t\t\t}\n\t\t\tif (cellPath.length < 3) {\n\t\t\t\treturn onKeyDown(event)\n\t\t\t}\n\t\t\tconst [rowIndex, columnIndex] = getTableCellCoordinates(editor, cellElement)\n\t\t\tconst tablePath = cellPath.slice(0, -2)\n\t\t\tconst tableElement = SlateNode.get(editor, tablePath) as TableElement\n\t\t\tconst rowCount = getTableElementRowCount(tableElement)\n\t\t\tconst columnCount = getTableElementColumnCount(tableElement)\n\n\t\t\tif (rowCount === 0 || columnCount === 0) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst moveSelectionBeforeTable = () => {\n\t\t\t\tconst pointBeforeTable = Editor.before(editor, tablePath)\n\t\t\t\tif (!pointBeforeTable) {\n\t\t\t\t\treturn onKeyDown(event)\n\t\t\t\t}\n\t\t\t\tevent.preventDefault()\n\t\t\t\treturn Transforms.select(editor, pointBeforeTable)\n\t\t\t}\n\t\t\tconst moveSelectionAfterTable = () => {\n\t\t\t\tconst pointAfterTable = Editor.after(editor, tablePath)\n\t\t\t\tif (!pointAfterTable) {\n\t\t\t\t\treturn onKeyDown(event)\n\t\t\t\t}\n\t\t\t\tevent.preventDefault()\n\t\t\t\treturn Transforms.select(editor, pointAfterTable)\n\t\t\t}\n\n\t\t\tif (event.key === 'Tab') {\n\t\t\t\tif (event.shiftKey) {\n\t\t\t\t\t// Moving backwards\n\t\t\t\t\tif (columnIndex > 0) {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\treturn selectTableCellContents(editor, tablePath, rowIndex, columnIndex - 1)\n\t\t\t\t\t} else if (columnIndex === 0) {\n\t\t\t\t\t\tif (rowIndex > 0) {\n\t\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\t\treturn selectTableCellContents(editor, tablePath, rowIndex - 1, columnCount - 1)\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn moveSelectionBeforeTable()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Moving forwards\n\t\t\t\t\tif (columnIndex < columnCount - 1) {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\treturn selectTableCellContents(editor, tablePath, rowIndex, columnIndex + 1)\n\t\t\t\t\t} else if (columnIndex === columnCount - 1) {\n\t\t\t\t\t\t// We're at the right edge of the table\n\t\t\t\t\t\tif (rowIndex < rowCount - 1) {\n\t\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\t\treturn selectTableCellContents(editor, tablePath, rowIndex + 1, 0)\n\t\t\t\t\t\t} else if (rowIndex === rowCount - 1) {\n\t\t\t\t\t\t\treturn moveSelectionAfterTable()\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (event.key === 'ArrowLeft') {\n\t\t\t\tif (!SlateRange.isCollapsed(selection)) {\n\t\t\t\t\treturn onKeyDown(event)\n\t\t\t\t}\n\t\t\t\tif (Point.equals(selection.focus, Editor.start(editor, cellPath))) {\n\t\t\t\t\tif (columnIndex > 0) {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\treturn Transforms.select(editor, Editor.end(editor, [...tablePath, rowIndex, columnIndex - 1]))\n\t\t\t\t\t} else if (columnIndex === 0) {\n\t\t\t\t\t\tif (rowIndex > 0) {\n\t\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\t\treturn Transforms.select(editor, Editor.end(editor, [...tablePath, rowIndex - 1, columnCount - 1]))\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn moveSelectionBeforeTable()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (event.key === 'ArrowRight') {\n\t\t\t\tif (!SlateRange.isCollapsed(selection)) {\n\t\t\t\t\treturn onKeyDown(event)\n\t\t\t\t}\n\t\t\t\tif (Point.equals(selection.focus, Editor.end(editor, cellPath))) {\n\t\t\t\t\tif (columnIndex < columnCount - 1) {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\treturn Transforms.select(editor, Editor.start(editor, [...tablePath, rowIndex, columnIndex + 1]))\n\t\t\t\t\t} else if (columnIndex === columnCount - 1) {\n\t\t\t\t\t\tif (rowIndex < rowCount - 1) {\n\t\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\t\treturn Transforms.select(editor, Editor.start(editor, [...tablePath, rowIndex + 1, 0]))\n\t\t\t\t\t\t} else if (rowIndex === rowCount - 1) {\n\t\t\t\t\t\t\treturn moveSelectionAfterTable()\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {\n\t\t\t\tconst withinDefault = editor.isDefaultElement(closestBlockEntry[0])\n\t\t\t\tif (withinDefault) {\n\t\t\t\t\tconst relative = SlatePath.relative(closestBlockEntry[1], cellPath)\n\t\t\t\t\tconst defaultIndex = relative[0]\n\t\t\t\t\tif (\n\t\t\t\t\t\t(event.key === 'ArrowUp' && defaultIndex !== 0) ||\n\t\t\t\t\t\t(event.key === 'ArrowDown' && defaultIndex !== cellElement.children.length - 1)\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn onKeyDown(event)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (event.key === 'ArrowUp') {\n\t\t\t\t\tif (rowIndex > 0) {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\tconst rowAboveEndPoint = Editor.end(editor, [...tablePath, rowIndex - 1, columnIndex])\n\n\t\t\t\t\t\tif (!SlateRange.isCollapsed(selection)) {\n\t\t\t\t\t\t\treturn Transforms.select(editor, rowAboveEndPoint)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst minOffset = Math.min(selection.focus.offset, rowAboveEndPoint.offset)\n\t\t\t\t\t\treturn Transforms.select(editor, {\n\t\t\t\t\t\t\tpath: rowAboveEndPoint.path,\n\t\t\t\t\t\t\toffset: minOffset,\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t\treturn moveSelectionBeforeTable()\n\t\t\t\t} else if (event.key === 'ArrowDown') {\n\t\t\t\t\tif (rowIndex < rowCount - 1) {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\tconst rowBelowStatPoint = Editor.start(editor, [...tablePath, rowIndex + 1, columnIndex])\n\n\t\t\t\t\t\tif (!SlateRange.isCollapsed(selection)) {\n\t\t\t\t\t\t\treturn Transforms.select(editor, rowBelowStatPoint)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst [rowBelowStatPointNode] = Editor.node(editor, rowBelowStatPoint) as NodeEntry<Text>\n\n\t\t\t\t\t\treturn Transforms.select(editor, {\n\t\t\t\t\t\t\tpath: rowBelowStatPoint.path,\n\t\t\t\t\t\t\toffset: Math.min(selection.focus.offset, rowBelowStatPointNode.text.length),\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t\treturn moveSelectionAfterTable()\n\t\t\t\t}\n\t\t\t} else if (event.ctrlKey || event.metaKey) {\n\t\t\t\tif (event.key === 'Backspace') {\n\t\t\t\t\tevent.preventDefault()\n\n\t\t\t\t\tif (event.altKey) {\n\t\t\t\t\t\tTableModifications.deleteTableColumn(editor, tableElement, columnIndex)\n\n\t\t\t\t\t\tif (columnCount > 1) {\n\t\t\t\t\t\t\tconst columnBefore = Editor.start(editor, [...tablePath, rowIndex, Math.max(0, columnIndex - 1)])\n\n\t\t\t\t\t\t\treturn Transforms.select(editor, columnBefore)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn moveSelectionBeforeTable()\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tTableModifications.deleteTableRow(editor, tableElement, rowIndex)\n\n\t\t\t\t\t\tif (rowCount > 1) {\n\t\t\t\t\t\t\tconst rowAbove = Editor.start(editor, [...tablePath, Math.max(0, rowIndex - 1), columnIndex])\n\n\t\t\t\t\t\t\treturn Transforms.select(editor, rowAbove)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn moveSelectionBeforeTable()\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (event.key === 'Enter') {\n\t\t\t\t\tevent.preventDefault()\n\n\t\t\t\t\tif (event.altKey) {\n\t\t\t\t\t\tif (event.shiftKey) {\n\t\t\t\t\t\t\tTableModifications.addTableColumn(editor, tableElement, columnIndex)\n\t\t\t\t\t\t\tconst columnBefore = Editor.start(editor, [...tablePath, rowIndex, Math.max(0, columnIndex)])\n\n\t\t\t\t\t\t\treturn Transforms.select(editor, columnBefore)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tTableModifications.addTableColumn(editor, tableElement, columnIndex + 1)\n\t\t\t\t\t\t\tconst columnAfter = Editor.start(editor, [...tablePath, rowIndex, columnIndex + 1])\n\n\t\t\t\t\t\t\treturn Transforms.select(editor, columnAfter)\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (event.shiftKey) {\n\t\t\t\t\t\t\tTableModifications.addTableRow(editor, tableElement, rowIndex)\n\t\t\t\t\t\t\tconst rowAbove = Editor.start(editor, [...tablePath, Math.max(0, rowIndex), columnIndex])\n\n\t\t\t\t\t\t\treturn Transforms.select(editor, rowAbove)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tTableModifications.addTableRow(editor, tableElement, rowIndex + 1)\n\t\t\t\t\t\t\tconst rowBelowStat = Editor.start(editor, [...tablePath, rowIndex + 1, columnIndex])\n\n\t\t\t\t\t\t\treturn Transforms.select(editor, rowBelowStat)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tonKeyDown(event)\n\t\t},\n\n\t})\n\n\treturn editor\n}\n"],"names":["SlatePath","SlateRange","SlateNode"],"mappings":"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"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const react = require("react");
|
|
4
|
-
const isHotkey = require("is-hotkey");
|
|
5
|
-
const boldMark = "isBold";
|
|
6
|
-
const boldMarkPlugin = {
|
|
7
|
-
type: boldMark,
|
|
8
|
-
isHotKey: isHotkey.isHotkey("mod+b"),
|
|
9
|
-
render: ({ children }) => react.createElement("b", void 0, children)
|
|
10
|
-
};
|
|
11
|
-
exports.boldMark = boldMark;
|
|
12
|
-
exports.boldMarkPlugin = boldMarkPlugin;
|
|
13
|
-
//# sourceMappingURL=boldMark.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"boldMark.cjs","sources":["../../../../../src/plugins/text/bold/boldMark.ts"],"sourcesContent":["import { createElement } from 'react'\nimport { isHotkey } from 'is-hotkey'\nimport { EditorMarkPlugin } from '../../../types'\n\nexport const boldMark = 'isBold'\n\nexport const boldMarkPlugin: EditorMarkPlugin = {\n\ttype: boldMark,\n\tisHotKey: isHotkey('mod+b'),\n\trender: ({ children }) => createElement('b', undefined, children),\n}\n"],"names":["isHotkey","createElement"],"mappings":";;;;AAIO,MAAM,WAAW;AAEjB,MAAM,iBAAmC;AAAA,EAC/C,MAAM;AAAA,EACN,UAAUA,kBAAS,OAAO;AAAA,EAC1B,QAAQ,CAAC,EAAE,eAAeC,MAAc,cAAA,KAAK,QAAW,QAAQ;AACjE;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"boldMark.js","sources":["../../../../../src/plugins/text/bold/boldMark.ts"],"sourcesContent":["import { createElement } from 'react'\nimport { isHotkey } from 'is-hotkey'\nimport { EditorMarkPlugin } from '../../../types'\n\nexport const boldMark = 'isBold'\n\nexport const boldMarkPlugin: EditorMarkPlugin = {\n\ttype: boldMark,\n\tisHotKey: isHotkey('mod+b'),\n\trender: ({ children }) => createElement('b', undefined, children),\n}\n"],"names":[],"mappings":";;AAIO,MAAM,WAAW;AAEjB,MAAM,iBAAmC;AAAA,EAC/C,MAAM;AAAA,EACN,UAAU,SAAS,OAAO;AAAA,EAC1B,QAAQ,CAAC,EAAE,eAAe,cAAc,KAAK,QAAW,QAAQ;AACjE;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"withBold.cjs","sources":["../../../../../src/plugins/text/bold/withBold.ts"],"sourcesContent":["import { boldMark, boldMarkPlugin } from './boldMark'\nimport { EditorPlugin } from '../../../types'\nimport { createMarkHtmlDeserializer } from '../../behaviour'\n\n\nexport const withBold = (): EditorPlugin => editor => {\n\teditor.registerMark(boldMarkPlugin)\n\teditor.htmlDeserializer.registerPlugin(\n\t\tcreateMarkHtmlDeserializer(\n\t\t\tboldMark,\n\t\t\tel => el.nodeName === 'STRONG' || (el.nodeName === 'B' && !el.id.startsWith('docs-internal-guid')),\n\t\t\tel => ['italic', 'oblique'].includes(el.style.fontWeight),\n\t\t),\n\t)\n}\n"],"names":["boldMarkPlugin","createMarkHtmlDeserializer","boldMark"],"mappings":";;;;AAKa,MAAA,WAAW,MAAoB,CAAU,WAAA;AACrD,SAAO,aAAaA,SAAAA,cAAc;AAClC,SAAO,iBAAiB;AAAA,IACvBC,2BAAA;AAAA,MACCC,SAAA;AAAA,MACA,CAAA,OAAM,GAAG,aAAa,YAAa,GAAG,aAAa,OAAO,CAAC,GAAG,GAAG,WAAW,oBAAoB;AAAA,MAChG,CAAA,OAAM,CAAC,UAAU,SAAS,EAAE,SAAS,GAAG,MAAM,UAAU;AAAA,IACzD;AAAA,EAAA;AAEF;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"withBold.js","sources":["../../../../../src/plugins/text/bold/withBold.ts"],"sourcesContent":["import { boldMark, boldMarkPlugin } from './boldMark'\nimport { EditorPlugin } from '../../../types'\nimport { createMarkHtmlDeserializer } from '../../behaviour'\n\n\nexport const withBold = (): EditorPlugin => editor => {\n\teditor.registerMark(boldMarkPlugin)\n\teditor.htmlDeserializer.registerPlugin(\n\t\tcreateMarkHtmlDeserializer(\n\t\t\tboldMark,\n\t\t\tel => el.nodeName === 'STRONG' || (el.nodeName === 'B' && !el.id.startsWith('docs-internal-guid')),\n\t\t\tel => ['italic', 'oblique'].includes(el.style.fontWeight),\n\t\t),\n\t)\n}\n"],"names":[],"mappings":";;AAKa,MAAA,WAAW,MAAoB,CAAU,WAAA;AACrD,SAAO,aAAa,cAAc;AAClC,SAAO,iBAAiB;AAAA,IACvB;AAAA,MACC;AAAA,MACA,CAAA,OAAM,GAAG,aAAa,YAAa,GAAG,aAAa,OAAO,CAAC,GAAG,GAAG,WAAW,oBAAoB;AAAA,MAChG,CAAA,OAAM,CAAC,UAAU,SAAS,EAAE,SAAS,GAAG,MAAM,UAAU;AAAA,IACzD;AAAA,EAAA;AAEF;"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const isHotkey = require("is-hotkey");
|
|
4
|
-
const react = require("react");
|
|
5
|
-
const codeMark = "isCode";
|
|
6
|
-
const codeMarkPlugin = {
|
|
7
|
-
type: codeMark,
|
|
8
|
-
isHotKey: isHotkey.isHotkey("mod+`"),
|
|
9
|
-
render: ({ children }) => react.createElement("code", void 0, children)
|
|
10
|
-
};
|
|
11
|
-
exports.codeMark = codeMark;
|
|
12
|
-
exports.codeMarkPlugin = codeMarkPlugin;
|
|
13
|
-
//# sourceMappingURL=codeMark.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codeMark.cjs","sources":["../../../../../src/plugins/text/code/codeMark.ts"],"sourcesContent":["import { isHotkey } from 'is-hotkey'\nimport { createElement } from 'react'\nimport { EditorMarkPlugin } from '../../../types'\n\nexport const codeMark = 'isCode'\n\nexport const codeMarkPlugin: EditorMarkPlugin = {\n\ttype: codeMark,\n\tisHotKey: isHotkey('mod+`'),\n\trender: ({ children }) => createElement('code', undefined, children),\n}\n"],"names":["isHotkey","createElement"],"mappings":";;;;AAIO,MAAM,WAAW;AAEjB,MAAM,iBAAmC;AAAA,EAC/C,MAAM;AAAA,EACN,UAAUA,kBAAS,OAAO;AAAA,EAC1B,QAAQ,CAAC,EAAE,eAAeC,MAAc,cAAA,QAAQ,QAAW,QAAQ;AACpE;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codeMark.js","sources":["../../../../../src/plugins/text/code/codeMark.ts"],"sourcesContent":["import { isHotkey } from 'is-hotkey'\nimport { createElement } from 'react'\nimport { EditorMarkPlugin } from '../../../types'\n\nexport const codeMark = 'isCode'\n\nexport const codeMarkPlugin: EditorMarkPlugin = {\n\ttype: codeMark,\n\tisHotKey: isHotkey('mod+`'),\n\trender: ({ children }) => createElement('code', undefined, children),\n}\n"],"names":[],"mappings":";;AAIO,MAAM,WAAW;AAEjB,MAAM,iBAAmC;AAAA,EAC/C,MAAM;AAAA,EACN,UAAU,SAAS,OAAO;AAAA,EAC1B,QAAQ,CAAC,EAAE,eAAe,cAAc,QAAQ,QAAW,QAAQ;AACpE;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"withCode.cjs","sources":["../../../../../src/plugins/text/code/withCode.ts"],"sourcesContent":["import { Editor as SlateEditor } from 'slate'\nimport { codeMarkPlugin } from './codeMark'\nimport { EditorPlugin } from '../../../types'\n\n\nexport const withCode = (): EditorPlugin => editor => {\n\teditor.registerMark(codeMarkPlugin)\n\n\treturn editor\n}\n"],"names":["codeMarkPlugin"],"mappings":";;;AAKa,MAAA,WAAW,MAAoB,CAAU,WAAA;AACrD,SAAO,aAAaA,SAAAA,cAAc;AAE3B,SAAA;AACR;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"withCode.js","sources":["../../../../../src/plugins/text/code/withCode.ts"],"sourcesContent":["import { Editor as SlateEditor } from 'slate'\nimport { codeMarkPlugin } from './codeMark'\nimport { EditorPlugin } from '../../../types'\n\n\nexport const withCode = (): EditorPlugin => editor => {\n\teditor.registerMark(codeMarkPlugin)\n\n\treturn editor\n}\n"],"names":[],"mappings":";AAKa,MAAA,WAAW,MAAoB,CAAU,WAAA;AACrD,SAAO,aAAa,cAAc;AAE3B,SAAA;AACR;"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const isHotkey = require("is-hotkey");
|
|
4
|
-
const react = require("react");
|
|
5
|
-
const highlightMark = "isHighlighted";
|
|
6
|
-
const highlightMarkPlugin = {
|
|
7
|
-
type: highlightMark,
|
|
8
|
-
isHotKey: isHotkey.isHotkey("mod+e"),
|
|
9
|
-
render: ({ children }) => react.createElement("em", void 0, children)
|
|
10
|
-
};
|
|
11
|
-
exports.highlightMark = highlightMark;
|
|
12
|
-
exports.highlightMarkPlugin = highlightMarkPlugin;
|
|
13
|
-
//# sourceMappingURL=highlightMark.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"highlightMark.cjs","sources":["../../../../../src/plugins/text/highlight/highlightMark.ts"],"sourcesContent":["import { isHotkey } from 'is-hotkey'\nimport { createElement } from 'react'\nimport { EditorMarkPlugin } from '../../../types'\n\nexport const highlightMark = 'isHighlighted'\n\nexport const highlightMarkPlugin: EditorMarkPlugin = {\n\ttype: highlightMark,\n\tisHotKey: isHotkey('mod+e'),\n\trender: ({ children }) => createElement('em', undefined, children),\n}\n"],"names":["isHotkey","createElement"],"mappings":";;;;AAIO,MAAM,gBAAgB;AAEtB,MAAM,sBAAwC;AAAA,EACpD,MAAM;AAAA,EACN,UAAUA,kBAAS,OAAO;AAAA,EAC1B,QAAQ,CAAC,EAAE,eAAeC,MAAc,cAAA,MAAM,QAAW,QAAQ;AAClE;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"highlightMark.js","sources":["../../../../../src/plugins/text/highlight/highlightMark.ts"],"sourcesContent":["import { isHotkey } from 'is-hotkey'\nimport { createElement } from 'react'\nimport { EditorMarkPlugin } from '../../../types'\n\nexport const highlightMark = 'isHighlighted'\n\nexport const highlightMarkPlugin: EditorMarkPlugin = {\n\ttype: highlightMark,\n\tisHotKey: isHotkey('mod+e'),\n\trender: ({ children }) => createElement('em', undefined, children),\n}\n"],"names":[],"mappings":";;AAIO,MAAM,gBAAgB;AAEtB,MAAM,sBAAwC;AAAA,EACpD,MAAM;AAAA,EACN,UAAU,SAAS,OAAO;AAAA,EAC1B,QAAQ,CAAC,EAAE,eAAe,cAAc,MAAM,QAAW,QAAQ;AAClE;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"withHighlight.cjs","sources":["../../../../../src/plugins/text/highlight/withHighlight.ts"],"sourcesContent":["import { Editor as SlateEditor } from 'slate'\nimport { highlightMarkPlugin } from './highlightMark'\nimport { EditorPlugin } from '../../../types'\n\n\nexport const withHighlight = (): EditorPlugin => editor => {\n\teditor.registerMark(highlightMarkPlugin)\n\n\treturn editor\n}\n"],"names":["highlightMarkPlugin"],"mappings":";;;AAKa,MAAA,gBAAgB,MAAoB,CAAU,WAAA;AAC1D,SAAO,aAAaA,cAAAA,mBAAmB;AAEhC,SAAA;AACR;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"withHighlight.js","sources":["../../../../../src/plugins/text/highlight/withHighlight.ts"],"sourcesContent":["import { Editor as SlateEditor } from 'slate'\nimport { highlightMarkPlugin } from './highlightMark'\nimport { EditorPlugin } from '../../../types'\n\n\nexport const withHighlight = (): EditorPlugin => editor => {\n\teditor.registerMark(highlightMarkPlugin)\n\n\treturn editor\n}\n"],"names":[],"mappings":";AAKa,MAAA,gBAAgB,MAAoB,CAAU,WAAA;AAC1D,SAAO,aAAa,mBAAmB;AAEhC,SAAA;AACR;"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const isHotkey = require("is-hotkey");
|
|
4
|
-
const react = require("react");
|
|
5
|
-
const italicMark = "isItalic";
|
|
6
|
-
const italicMarkPlugin = {
|
|
7
|
-
type: italicMark,
|
|
8
|
-
isHotKey: isHotkey.isHotkey("mod+i"),
|
|
9
|
-
render: ({ children }) => react.createElement("i", void 0, children)
|
|
10
|
-
};
|
|
11
|
-
exports.italicMark = italicMark;
|
|
12
|
-
exports.italicMarkPlugin = italicMarkPlugin;
|
|
13
|
-
//# sourceMappingURL=italicMark.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"italicMark.cjs","sources":["../../../../../src/plugins/text/italic/italicMark.ts"],"sourcesContent":["import { isHotkey } from 'is-hotkey'\nimport { createElement } from 'react'\nimport { EditorMarkPlugin } from '../../../types'\n\nexport const italicMark = 'isItalic'\n\nexport const italicMarkPlugin: EditorMarkPlugin = {\n\ttype: italicMark,\n\tisHotKey: isHotkey('mod+i'),\n\trender: ({ children }) => createElement('i', undefined, children),\n}\n"],"names":["isHotkey","createElement"],"mappings":";;;;AAIO,MAAM,aAAa;AAEnB,MAAM,mBAAqC;AAAA,EACjD,MAAM;AAAA,EACN,UAAUA,kBAAS,OAAO;AAAA,EAC1B,QAAQ,CAAC,EAAE,eAAeC,MAAc,cAAA,KAAK,QAAW,QAAQ;AACjE;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"italicMark.js","sources":["../../../../../src/plugins/text/italic/italicMark.ts"],"sourcesContent":["import { isHotkey } from 'is-hotkey'\nimport { createElement } from 'react'\nimport { EditorMarkPlugin } from '../../../types'\n\nexport const italicMark = 'isItalic'\n\nexport const italicMarkPlugin: EditorMarkPlugin = {\n\ttype: italicMark,\n\tisHotKey: isHotkey('mod+i'),\n\trender: ({ children }) => createElement('i', undefined, children),\n}\n"],"names":[],"mappings":";;AAIO,MAAM,aAAa;AAEnB,MAAM,mBAAqC;AAAA,EACjD,MAAM;AAAA,EACN,UAAU,SAAS,OAAO;AAAA,EAC1B,QAAQ,CAAC,EAAE,eAAe,cAAc,KAAK,QAAW,QAAQ;AACjE;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"withItalic.cjs","sources":["../../../../../src/plugins/text/italic/withItalic.ts"],"sourcesContent":["import { italicMark, italicMarkPlugin } from './italicMark'\nimport { EditorPlugin } from '../../../types'\nimport { createMarkHtmlDeserializer } from '../../behaviour'\n\n\nexport const withItalic = (): EditorPlugin => editor => {\n\teditor.registerMark(italicMarkPlugin)\n\teditor.htmlDeserializer.registerPlugin(\n\t\tcreateMarkHtmlDeserializer(\n\t\t\titalicMark,\n\t\t\tel => ['I', 'EM'].includes(el.nodeName),\n\t\t\tel => ['italic', 'oblique'].includes(el.style.fontWeight),\n\t\t),\n\t)\n}\n"],"names":["italicMarkPlugin","createMarkHtmlDeserializer","italicMark"],"mappings":";;;;AAKa,MAAA,aAAa,MAAoB,CAAU,WAAA;AACvD,SAAO,aAAaA,WAAAA,gBAAgB;AACpC,SAAO,iBAAiB;AAAA,IACvBC,2BAAA;AAAA,MACCC,WAAA;AAAA,MACA,QAAM,CAAC,KAAK,IAAI,EAAE,SAAS,GAAG,QAAQ;AAAA,MACtC,CAAA,OAAM,CAAC,UAAU,SAAS,EAAE,SAAS,GAAG,MAAM,UAAU;AAAA,IACzD;AAAA,EAAA;AAEF;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"withItalic.js","sources":["../../../../../src/plugins/text/italic/withItalic.ts"],"sourcesContent":["import { italicMark, italicMarkPlugin } from './italicMark'\nimport { EditorPlugin } from '../../../types'\nimport { createMarkHtmlDeserializer } from '../../behaviour'\n\n\nexport const withItalic = (): EditorPlugin => editor => {\n\teditor.registerMark(italicMarkPlugin)\n\teditor.htmlDeserializer.registerPlugin(\n\t\tcreateMarkHtmlDeserializer(\n\t\t\titalicMark,\n\t\t\tel => ['I', 'EM'].includes(el.nodeName),\n\t\t\tel => ['italic', 'oblique'].includes(el.style.fontWeight),\n\t\t),\n\t)\n}\n"],"names":[],"mappings":";;AAKa,MAAA,aAAa,MAAoB,CAAU,WAAA;AACvD,SAAO,aAAa,gBAAgB;AACpC,SAAO,iBAAiB;AAAA,IACvB;AAAA,MACC;AAAA,MACA,QAAM,CAAC,KAAK,IAAI,EAAE,SAAS,GAAG,QAAQ;AAAA,MACtC,CAAA,OAAM,CAAC,UAAU,SAAS,EAAE,SAAS,GAAG,MAAM,UAAU;AAAA,IACzD;AAAA,EAAA;AAEF;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"withNewline.cjs","sources":["../../../../../src/plugins/text/newline/withNewline.ts"],"sourcesContent":["import { Transforms } from 'slate'\nimport { EditorPlugin } from '../../../types'\n\nexport const withNewline = (): EditorPlugin => editor => {\n\tconst { onKeyDown } = editor\n\teditor.onKeyDown = e => {\n\t\tif (e.key !== 'Enter' || !e.shiftKey) {\n\t\t\treturn onKeyDown(e)\n\t\t}\n\t\te.preventDefault()\n\t\tTransforms.insertText(editor, '\\n')\n\t}\n}\n"],"names":["Transforms"],"mappings":";;;AAGa,MAAA,cAAc,MAAoB,CAAU,WAAA;AAClD,QAAA,EAAE,UAAc,IAAA;AACtB,SAAO,YAAY,CAAK,MAAA;AACvB,QAAI,EAAE,QAAQ,WAAW,CAAC,EAAE,UAAU;AACrC,aAAO,UAAU,CAAC;AAAA,IACnB;AACA,MAAE,eAAe;AACNA,UAAAA,WAAA,WAAW,QAAQ,IAAI;AAAA,EAAA;AAEpC;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"withNewline.js","sources":["../../../../../src/plugins/text/newline/withNewline.ts"],"sourcesContent":["import { Transforms } from 'slate'\nimport { EditorPlugin } from '../../../types'\n\nexport const withNewline = (): EditorPlugin => editor => {\n\tconst { onKeyDown } = editor\n\teditor.onKeyDown = e => {\n\t\tif (e.key !== 'Enter' || !e.shiftKey) {\n\t\t\treturn onKeyDown(e)\n\t\t}\n\t\te.preventDefault()\n\t\tTransforms.insertText(editor, '\\n')\n\t}\n}\n"],"names":[],"mappings":";AAGa,MAAA,cAAc,MAAoB,CAAU,WAAA;AAClD,QAAA,EAAE,UAAc,IAAA;AACtB,SAAO,YAAY,CAAK,MAAA;AACvB,QAAI,EAAE,QAAQ,WAAW,CAAC,EAAE,UAAU;AACrC,aAAO,UAAU,CAAC;AAAA,IACnB;AACA,MAAE,eAAe;AACN,eAAA,WAAW,QAAQ,IAAI;AAAA,EAAA;AAEpC;"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const react = require("react");
|
|
4
|
-
const isHotkey = require("is-hotkey");
|
|
5
|
-
const strikeThroughMark = "isStruckThrough";
|
|
6
|
-
const strikeThroughPlugin = {
|
|
7
|
-
type: strikeThroughMark,
|
|
8
|
-
render: ({ children }) => react.createElement("s", void 0, children),
|
|
9
|
-
isHotKey: isHotkey.isHotkey("mod+opt+s")
|
|
10
|
-
};
|
|
11
|
-
exports.strikeThroughMark = strikeThroughMark;
|
|
12
|
-
exports.strikeThroughPlugin = strikeThroughPlugin;
|
|
13
|
-
//# sourceMappingURL=strikeThroughMark.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"strikeThroughMark.cjs","sources":["../../../../../src/plugins/text/strikeThrough/strikeThroughMark.ts"],"sourcesContent":["import { createElement } from 'react'\nimport { isHotkey } from 'is-hotkey'\nimport { EditorMarkPlugin } from '../../../types'\n\nexport const strikeThroughMark = 'isStruckThrough'\nexport const strikeThroughPlugin: EditorMarkPlugin = {\n\ttype: strikeThroughMark,\n\trender: ({ children }) => createElement('s', undefined, children),\n\tisHotKey: isHotkey('mod+opt+s'),\n}\n"],"names":["createElement","isHotkey"],"mappings":";;;;AAIO,MAAM,oBAAoB;AAC1B,MAAM,sBAAwC;AAAA,EACpD,MAAM;AAAA,EACN,QAAQ,CAAC,EAAE,eAAeA,MAAc,cAAA,KAAK,QAAW,QAAQ;AAAA,EAChE,UAAUC,kBAAS,WAAW;AAC/B;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"strikeThroughMark.js","sources":["../../../../../src/plugins/text/strikeThrough/strikeThroughMark.ts"],"sourcesContent":["import { createElement } from 'react'\nimport { isHotkey } from 'is-hotkey'\nimport { EditorMarkPlugin } from '../../../types'\n\nexport const strikeThroughMark = 'isStruckThrough'\nexport const strikeThroughPlugin: EditorMarkPlugin = {\n\ttype: strikeThroughMark,\n\trender: ({ children }) => createElement('s', undefined, children),\n\tisHotKey: isHotkey('mod+opt+s'),\n}\n"],"names":[],"mappings":";;AAIO,MAAM,oBAAoB;AAC1B,MAAM,sBAAwC;AAAA,EACpD,MAAM;AAAA,EACN,QAAQ,CAAC,EAAE,eAAe,cAAc,KAAK,QAAW,QAAQ;AAAA,EAChE,UAAU,SAAS,WAAW;AAC/B;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"withStrikeThrough.cjs","sources":["../../../../../src/plugins/text/strikeThrough/withStrikeThrough.ts"],"sourcesContent":["import { Editor as SlateEditor } from 'slate'\nimport { strikeThroughMark, strikeThroughPlugin } from './strikeThroughMark'\nimport { EditorPlugin } from '../../../types'\nimport { createMarkHtmlDeserializer } from '../../behaviour'\n\n\nexport const withStrikeThrough = (): EditorPlugin => editor => {\n\teditor.registerMark(strikeThroughPlugin)\n\teditor.htmlDeserializer.registerPlugin(\n\t\tcreateMarkHtmlDeserializer(\n\t\t\tstrikeThroughMark,\n\t\t\tel => el.nodeName === 'S',\n\t\t\tel => el.style.textDecoration === 'line-through',\n\t\t),\n\t)\n\n\treturn editor\n}\n"],"names":["strikeThroughPlugin","createMarkHtmlDeserializer","strikeThroughMark"],"mappings":";;;;AAMa,MAAA,oBAAoB,MAAoB,CAAU,WAAA;AAC9D,SAAO,aAAaA,kBAAAA,mBAAmB;AACvC,SAAO,iBAAiB;AAAA,IACvBC,2BAAA;AAAA,MACCC,kBAAA;AAAA,MACA,CAAA,OAAM,GAAG,aAAa;AAAA,MACtB,CAAA,OAAM,GAAG,MAAM,mBAAmB;AAAA,IACnC;AAAA,EAAA;AAGM,SAAA;AACR;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"withStrikeThrough.js","sources":["../../../../../src/plugins/text/strikeThrough/withStrikeThrough.ts"],"sourcesContent":["import { Editor as SlateEditor } from 'slate'\nimport { strikeThroughMark, strikeThroughPlugin } from './strikeThroughMark'\nimport { EditorPlugin } from '../../../types'\nimport { createMarkHtmlDeserializer } from '../../behaviour'\n\n\nexport const withStrikeThrough = (): EditorPlugin => editor => {\n\teditor.registerMark(strikeThroughPlugin)\n\teditor.htmlDeserializer.registerPlugin(\n\t\tcreateMarkHtmlDeserializer(\n\t\t\tstrikeThroughMark,\n\t\t\tel => el.nodeName === 'S',\n\t\t\tel => el.style.textDecoration === 'line-through',\n\t\t),\n\t)\n\n\treturn editor\n}\n"],"names":[],"mappings":";;AAMa,MAAA,oBAAoB,MAAoB,CAAU,WAAA;AAC9D,SAAO,aAAa,mBAAmB;AACvC,SAAO,iBAAiB;AAAA,IACvB;AAAA,MACC;AAAA,MACA,CAAA,OAAM,GAAG,aAAa;AAAA,MACtB,CAAA,OAAM,GAAG,MAAM,mBAAmB;AAAA,IACnC;AAAA,EAAA;AAGM,SAAA;AACR;"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const isHotkey = require("is-hotkey");
|
|
4
|
-
const react = require("react");
|
|
5
|
-
const underlineMark = "isUnderlined";
|
|
6
|
-
const underlineMarkPlugin = {
|
|
7
|
-
type: underlineMark,
|
|
8
|
-
isHotKey: isHotkey.isHotkey("mod+u"),
|
|
9
|
-
render: ({ children }) => react.createElement("u", void 0, children)
|
|
10
|
-
};
|
|
11
|
-
exports.underlineMark = underlineMark;
|
|
12
|
-
exports.underlineMarkPlugin = underlineMarkPlugin;
|
|
13
|
-
//# sourceMappingURL=underlineMark.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"underlineMark.cjs","sources":["../../../../../src/plugins/text/underline/underlineMark.ts"],"sourcesContent":["import { isHotkey } from 'is-hotkey'\nimport { createElement } from 'react'\nimport { EditorMarkPlugin } from '../../../types'\n\nexport const underlineMark = 'isUnderlined'\n\nexport const underlineMarkPlugin: EditorMarkPlugin = {\n\ttype: underlineMark,\n\tisHotKey: isHotkey('mod+u'),\n\trender: ({ children }) => createElement('u', undefined, children),\n}\n"],"names":["isHotkey","createElement"],"mappings":";;;;AAIO,MAAM,gBAAgB;AAEtB,MAAM,sBAAwC;AAAA,EACpD,MAAM;AAAA,EACN,UAAUA,kBAAS,OAAO;AAAA,EAC1B,QAAQ,CAAC,EAAE,eAAeC,MAAc,cAAA,KAAK,QAAW,QAAQ;AACjE;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"underlineMark.js","sources":["../../../../../src/plugins/text/underline/underlineMark.ts"],"sourcesContent":["import { isHotkey } from 'is-hotkey'\nimport { createElement } from 'react'\nimport { EditorMarkPlugin } from '../../../types'\n\nexport const underlineMark = 'isUnderlined'\n\nexport const underlineMarkPlugin: EditorMarkPlugin = {\n\ttype: underlineMark,\n\tisHotKey: isHotkey('mod+u'),\n\trender: ({ children }) => createElement('u', undefined, children),\n}\n"],"names":[],"mappings":";;AAIO,MAAM,gBAAgB;AAEtB,MAAM,sBAAwC;AAAA,EACpD,MAAM;AAAA,EACN,UAAU,SAAS,OAAO;AAAA,EAC1B,QAAQ,CAAC,EAAE,eAAe,cAAc,KAAK,QAAW,QAAQ;AACjE;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"withUnderline.cjs","sources":["../../../../../src/plugins/text/underline/withUnderline.ts"],"sourcesContent":["import { underlineMark, underlineMarkPlugin } from './underlineMark'\nimport { createMarkHtmlDeserializer } from '../../behaviour'\nimport { EditorPlugin } from '../../../types'\n\n\nexport const withUnderline = (): EditorPlugin => editor => {\n\teditor.registerMark(underlineMarkPlugin)\n\teditor.htmlDeserializer.registerPlugin(\n\t\tcreateMarkHtmlDeserializer(\n\t\t\tunderlineMark,\n\t\t\tel => el.nodeName === 'U',\n\t\t\tel => el.style.textDecoration === 'underline',\n\t\t),\n\t)\n\n\treturn editor\n}\n"],"names":["underlineMarkPlugin","createMarkHtmlDeserializer","underlineMark"],"mappings":";;;;AAKa,MAAA,gBAAgB,MAAoB,CAAU,WAAA;AAC1D,SAAO,aAAaA,cAAAA,mBAAmB;AACvC,SAAO,iBAAiB;AAAA,IACvBC,2BAAA;AAAA,MACCC,cAAA;AAAA,MACA,CAAA,OAAM,GAAG,aAAa;AAAA,MACtB,CAAA,OAAM,GAAG,MAAM,mBAAmB;AAAA,IACnC;AAAA,EAAA;AAGM,SAAA;AACR;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"withUnderline.js","sources":["../../../../../src/plugins/text/underline/withUnderline.ts"],"sourcesContent":["import { underlineMark, underlineMarkPlugin } from './underlineMark'\nimport { createMarkHtmlDeserializer } from '../../behaviour'\nimport { EditorPlugin } from '../../../types'\n\n\nexport const withUnderline = (): EditorPlugin => editor => {\n\teditor.registerMark(underlineMarkPlugin)\n\teditor.htmlDeserializer.registerPlugin(\n\t\tcreateMarkHtmlDeserializer(\n\t\t\tunderlineMark,\n\t\t\tel => el.nodeName === 'U',\n\t\t\tel => el.style.textDecoration === 'underline',\n\t\t),\n\t)\n\n\treturn editor\n}\n"],"names":[],"mappings":";;AAKa,MAAA,gBAAgB,MAAoB,CAAU,WAAA;AAC1D,SAAO,aAAa,mBAAmB;AACvC,SAAO,iBAAiB;AAAA,IACvB;AAAA,MACC;AAAA,MACA,CAAA,OAAM,GAAG,aAAa;AAAA,MACtB,CAAA,OAAM,GAAG,MAAM,mBAAmB;AAAA,IACnC;AAAA,EAAA;AAGM,SAAA;AACR;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"slate-reexport.cjs","sources":["../../src/slate-reexport.ts"],"sourcesContent":["import { Editor } from 'slate'\n\nexport { Transforms as EditorTransforms } from 'slate'\nexport const EditorUtils = Editor\n"],"names":["Editor"],"mappings":";;;AAGO,MAAM,cAAcA,MAAAA;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"slate-reexport.js","sources":["../../src/slate-reexport.ts"],"sourcesContent":["import { Editor } from 'slate'\n\nexport { Transforms as EditorTransforms } from 'slate'\nexport const EditorUtils = Editor\n"],"names":[],"mappings":";;AAGO,MAAM,cAAc;"}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const reactBinding = require("@contember/react-binding");
|
|
5
|
-
const react = require("react");
|
|
6
|
-
const Slate = require("slate");
|
|
7
|
-
const slateReact = require("slate-react");
|
|
8
|
-
const useRichTextFieldNodes = require("../internal/hooks/useRichTextFieldNodes.cjs");
|
|
9
|
-
const createEditor = require("../editor/createEditor.cjs");
|
|
10
|
-
const ParagraphElement = require("../plugins/element/paragraphs/ParagraphElement.cjs");
|
|
11
|
-
const RichTextEditor = reactBinding.Component(
|
|
12
|
-
(props) => {
|
|
13
|
-
const entity = reactBinding.useEntity();
|
|
14
|
-
const environment = entity.environment;
|
|
15
|
-
const getParent = entity.getAccessor;
|
|
16
|
-
const desugaredField = react.useMemo(
|
|
17
|
-
() => reactBinding.QueryLanguage.desugarRelativeSingleField(props, environment),
|
|
18
|
-
[environment, props]
|
|
19
|
-
);
|
|
20
|
-
const fieldAccessor = react.useMemo(() => entity.getRelativeSingleField(desugaredField), [entity, desugaredField]);
|
|
21
|
-
const [contemberFieldElementCache] = react.useState(() => /* @__PURE__ */ new WeakMap());
|
|
22
|
-
const [editor] = react.useState(() => {
|
|
23
|
-
const { editor: editor2 } = createEditor.createEditor({
|
|
24
|
-
plugins: props.plugins,
|
|
25
|
-
defaultElementType: ParagraphElement.paragraphElementType,
|
|
26
|
-
entity,
|
|
27
|
-
environment,
|
|
28
|
-
children: props.children
|
|
29
|
-
});
|
|
30
|
-
const { normalizeNode } = editor2;
|
|
31
|
-
Object.assign(editor2, {
|
|
32
|
-
insertBreak: () => {
|
|
33
|
-
Slate.Transforms.insertText(editor2, "\n");
|
|
34
|
-
},
|
|
35
|
-
normalizeNode: (nodeEntry) => {
|
|
36
|
-
const [node, path] = nodeEntry;
|
|
37
|
-
if (path.length === 0 && Slate.Element.isAncestor(node)) {
|
|
38
|
-
if (node.children.length > 1) {
|
|
39
|
-
return Slate.Editor.withoutNormalizing(editor2, () => {
|
|
40
|
-
const targetPath = [0, editor2.children[0].children.length];
|
|
41
|
-
Slate.Transforms.moveNodes(editor2, {
|
|
42
|
-
at: [1],
|
|
43
|
-
to: targetPath
|
|
44
|
-
});
|
|
45
|
-
Slate.Transforms.unwrapNodes(editor2, { at: targetPath });
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
if (Slate.Element.isElement(node.children[0]) && !editor2.isDefaultElement(node.children[0])) {
|
|
49
|
-
return Slate.Editor.withoutNormalizing(editor2, () => {
|
|
50
|
-
Slate.Transforms.wrapNodes(editor2, editor2.createDefaultElement([{ text: "" }]), {
|
|
51
|
-
at: path
|
|
52
|
-
});
|
|
53
|
-
Slate.Transforms.unwrapNodes(editor2, { at: [0, 0] });
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
if (Slate.Element.isElement(node) && Slate.Editor.isBlock(editor2, node) && path.length > 1) {
|
|
58
|
-
return Slate.Transforms.unwrapNodes(editor2, { at: path });
|
|
59
|
-
}
|
|
60
|
-
normalizeNode(nodeEntry);
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
return editor2;
|
|
64
|
-
});
|
|
65
|
-
const valueNodes = useRichTextFieldNodes.useRichTextFieldNodes({
|
|
66
|
-
editor,
|
|
67
|
-
fieldAccessor,
|
|
68
|
-
contemberFieldElementCache
|
|
69
|
-
});
|
|
70
|
-
const serialize = editor.serializeNodes;
|
|
71
|
-
const onChange = react.useCallback(
|
|
72
|
-
(value) => {
|
|
73
|
-
getParent().batchUpdates((getAccessor) => {
|
|
74
|
-
const fieldAccessor2 = getAccessor().getRelativeSingleField(desugaredField);
|
|
75
|
-
if (Slate.Node.string({ type: "dummy", children: value }) === "" && fieldAccessor2.valueOnServer === null) {
|
|
76
|
-
fieldAccessor2.updateValue(null);
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
if (Slate.Element.isElement(value[0])) {
|
|
80
|
-
fieldAccessor2.updateValue(serialize(value[0].children));
|
|
81
|
-
contemberFieldElementCache.set(getAccessor().getRelativeSingleField(desugaredField), value);
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
},
|
|
85
|
-
[getParent, contemberFieldElementCache, desugaredField, serialize]
|
|
86
|
-
);
|
|
87
|
-
return /* @__PURE__ */ jsxRuntime.jsx(slateReact.Slate, { editor, initialValue: valueNodes, onChange, children: props.children });
|
|
88
|
-
},
|
|
89
|
-
(props) => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(reactBinding.Field, { defaultValue: props.defaultValue, field: props.field, isNonbearing: props.isNonbearing }) }),
|
|
90
|
-
"RichTextEditor"
|
|
91
|
-
);
|
|
92
|
-
exports.RichTextEditor = RichTextEditor;
|
|
93
|
-
//# sourceMappingURL=RichTextEditor.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RichTextEditor.cjs","sources":["../../../src/components/RichTextEditor.tsx"],"sourcesContent":["import { Component, Field, FieldAccessor, FieldBasicProps, QueryLanguage, useEntity } from '@contember/react-binding'\nimport { FunctionComponent, useCallback, useMemo, useState } from 'react'\nimport { Descendant, Editor, Element as SlateElement, Node as SlateNode, NodeEntry, Transforms } from 'slate'\nimport { Slate } from 'slate-react'\nimport { createEditor, CreateEditorPublicOptions } from '../editor'\nimport { paragraphElementType } from '../plugins'\nimport { useRichTextFieldNodes } from '../internal/hooks/useRichTextFieldNodes'\n\nexport type RichTextEditorProps =\n\t& FieldBasicProps\n\t& CreateEditorPublicOptions\n\t& {\n\t\tchildren: React.ReactNode\n\t}\n\n/**\n * Rich text field supports more advanced formatting capabilities. Output of this field is a JSON.\n *\n * @group Form Fields\n */\nexport const RichTextEditor: FunctionComponent<RichTextEditorProps> = Component(\n\tprops => {\n\t\tconst entity = useEntity()\n\t\tconst environment = entity.environment\n\t\tconst getParent = entity.getAccessor\n\n\t\tconst desugaredField = useMemo(\n\t\t\t() => QueryLanguage.desugarRelativeSingleField(props, environment),\n\t\t\t[environment, props],\n\t\t)\n\t\tconst fieldAccessor = useMemo(() => entity.getRelativeSingleField<string>(desugaredField), [entity, desugaredField])\n\n\t\t// The cache is questionable, really.\n\t\tconst [contemberFieldElementCache] = useState(() => new WeakMap<FieldAccessor<string>, SlateElement[]>())\n\n\n\t\tconst [editor] = useState(() => {\n\t\t\tconst { editor } = createEditor({\n\t\t\t\tplugins: props.plugins,\n\t\t\t\tdefaultElementType: paragraphElementType,\n\t\t\t\tentity,\n\t\t\t\tenvironment,\n\t\t\t\tchildren: props.children,\n\t\t\t})\n\n\t\t\tconst { normalizeNode } = editor\n\t\t\tObject.assign(editor, {\n\t\t\t\tinsertBreak: () => {\n\t\t\t\t\tTransforms.insertText(editor, '\\n')\n\t\t\t\t},\n\t\t\t\tnormalizeNode: (nodeEntry: NodeEntry) => {\n\t\t\t\t\tconst [node, path] = nodeEntry\n\t\t\t\t\tif (path.length === 0 && SlateElement.isAncestor(node)) {\n\t\t\t\t\t\t// Enforce that there's exactly one child and that it's\n\t\t\t\t\t\tif (node.children.length > 1) {\n\t\t\t\t\t\t\treturn Editor.withoutNormalizing(editor, () => {\n\t\t\t\t\t\t\t\tconst targetPath = [0, (editor.children[0] as SlateElement).children.length]\n\t\t\t\t\t\t\t\tTransforms.moveNodes(editor, {\n\t\t\t\t\t\t\t\t\tat: [1],\n\t\t\t\t\t\t\t\t\tto: targetPath,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\tTransforms.unwrapNodes(editor, { at: targetPath })\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (SlateElement.isElement(node.children[0]) && !editor.isDefaultElement(node.children[0])) {\n\t\t\t\t\t\t\treturn Editor.withoutNormalizing(editor, () => {\n\t\t\t\t\t\t\t\tTransforms.wrapNodes(editor, editor.createDefaultElement([{ text: '' }]), {\n\t\t\t\t\t\t\t\t\tat: path,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\tTransforms.unwrapNodes(editor, { at: [0, 0] })\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (SlateElement.isElement(node) && Editor.isBlock(editor, node) && path.length > 1) {\n\t\t\t\t\t\treturn Transforms.unwrapNodes(editor, { at: path })\n\t\t\t\t\t}\n\t\t\t\t\tnormalizeNode(nodeEntry)\n\t\t\t\t},\n\t\t\t})\n\n\t\t\treturn editor\n\t\t})\n\n\t\tconst valueNodes = useRichTextFieldNodes({\n\t\t\teditor,\n\t\t\tfieldAccessor,\n\t\t\tcontemberFieldElementCache,\n\t\t})\n\n\t\tconst serialize = editor.serializeNodes\n\t\tconst onChange = useCallback(\n\t\t\t(value: Descendant[]) => {\n\t\t\t\tgetParent().batchUpdates(getAccessor => {\n\t\t\t\t\tconst fieldAccessor = getAccessor().getRelativeSingleField(desugaredField)\n\n\t\t\t\t\tif (SlateNode.string({ type: 'dummy', children: value }) === '' && fieldAccessor.valueOnServer === null) {\n\t\t\t\t\t\tfieldAccessor.updateValue(null)\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\n\t\t\t\t\tif (SlateElement.isElement(value[0])) {\n\t\t\t\t\t\tfieldAccessor.updateValue(serialize(value[0].children))\n\t\t\t\t\t\tcontemberFieldElementCache.set(getAccessor().getRelativeSingleField(desugaredField), value as SlateElement[])\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\t\t\t[getParent, contemberFieldElementCache, desugaredField, serialize],\n\t\t)\n\n\t\treturn (\n\t\t\t\t<Slate editor={editor} initialValue={valueNodes} onChange={onChange}>\n\t\t\t\t\t{props.children}\n\t\t\t\t</Slate>\n\t\t)\n\t},\n\tprops => (\n\t\t<>\n\t\t\t<Field defaultValue={props.defaultValue} field={props.field} isNonbearing={props.isNonbearing} />\n\t\t</>\n\t),\n\t'RichTextEditor',\n)\n\n"],"names":["Component","useEntity","useMemo","QueryLanguage","useState","editor","createEditor","paragraphElementType","Transforms","SlateElement","Editor","useRichTextFieldNodes","useCallback","fieldAccessor","SlateNode","Slate","jsx","Fragment","Field"],"mappings":"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"}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { Component, useEntity, QueryLanguage, Field } from "@contember/react-binding";
|
|
3
|
-
import { useMemo, useState, useCallback } from "react";
|
|
4
|
-
import { Transforms, Element, Editor, Node } from "slate";
|
|
5
|
-
import { Slate } from "slate-react";
|
|
6
|
-
import { useRichTextFieldNodes } from "../internal/hooks/useRichTextFieldNodes.js";
|
|
7
|
-
import { createEditor } from "../editor/createEditor.js";
|
|
8
|
-
import { paragraphElementType } from "../plugins/element/paragraphs/ParagraphElement.js";
|
|
9
|
-
const RichTextEditor = Component(
|
|
10
|
-
(props) => {
|
|
11
|
-
const entity = useEntity();
|
|
12
|
-
const environment = entity.environment;
|
|
13
|
-
const getParent = entity.getAccessor;
|
|
14
|
-
const desugaredField = useMemo(
|
|
15
|
-
() => QueryLanguage.desugarRelativeSingleField(props, environment),
|
|
16
|
-
[environment, props]
|
|
17
|
-
);
|
|
18
|
-
const fieldAccessor = useMemo(() => entity.getRelativeSingleField(desugaredField), [entity, desugaredField]);
|
|
19
|
-
const [contemberFieldElementCache] = useState(() => /* @__PURE__ */ new WeakMap());
|
|
20
|
-
const [editor] = useState(() => {
|
|
21
|
-
const { editor: editor2 } = createEditor({
|
|
22
|
-
plugins: props.plugins,
|
|
23
|
-
defaultElementType: paragraphElementType,
|
|
24
|
-
entity,
|
|
25
|
-
environment,
|
|
26
|
-
children: props.children
|
|
27
|
-
});
|
|
28
|
-
const { normalizeNode } = editor2;
|
|
29
|
-
Object.assign(editor2, {
|
|
30
|
-
insertBreak: () => {
|
|
31
|
-
Transforms.insertText(editor2, "\n");
|
|
32
|
-
},
|
|
33
|
-
normalizeNode: (nodeEntry) => {
|
|
34
|
-
const [node, path] = nodeEntry;
|
|
35
|
-
if (path.length === 0 && Element.isAncestor(node)) {
|
|
36
|
-
if (node.children.length > 1) {
|
|
37
|
-
return Editor.withoutNormalizing(editor2, () => {
|
|
38
|
-
const targetPath = [0, editor2.children[0].children.length];
|
|
39
|
-
Transforms.moveNodes(editor2, {
|
|
40
|
-
at: [1],
|
|
41
|
-
to: targetPath
|
|
42
|
-
});
|
|
43
|
-
Transforms.unwrapNodes(editor2, { at: targetPath });
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
if (Element.isElement(node.children[0]) && !editor2.isDefaultElement(node.children[0])) {
|
|
47
|
-
return Editor.withoutNormalizing(editor2, () => {
|
|
48
|
-
Transforms.wrapNodes(editor2, editor2.createDefaultElement([{ text: "" }]), {
|
|
49
|
-
at: path
|
|
50
|
-
});
|
|
51
|
-
Transforms.unwrapNodes(editor2, { at: [0, 0] });
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
if (Element.isElement(node) && Editor.isBlock(editor2, node) && path.length > 1) {
|
|
56
|
-
return Transforms.unwrapNodes(editor2, { at: path });
|
|
57
|
-
}
|
|
58
|
-
normalizeNode(nodeEntry);
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
return editor2;
|
|
62
|
-
});
|
|
63
|
-
const valueNodes = useRichTextFieldNodes({
|
|
64
|
-
editor,
|
|
65
|
-
fieldAccessor,
|
|
66
|
-
contemberFieldElementCache
|
|
67
|
-
});
|
|
68
|
-
const serialize = editor.serializeNodes;
|
|
69
|
-
const onChange = useCallback(
|
|
70
|
-
(value) => {
|
|
71
|
-
getParent().batchUpdates((getAccessor) => {
|
|
72
|
-
const fieldAccessor2 = getAccessor().getRelativeSingleField(desugaredField);
|
|
73
|
-
if (Node.string({ type: "dummy", children: value }) === "" && fieldAccessor2.valueOnServer === null) {
|
|
74
|
-
fieldAccessor2.updateValue(null);
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
if (Element.isElement(value[0])) {
|
|
78
|
-
fieldAccessor2.updateValue(serialize(value[0].children));
|
|
79
|
-
contemberFieldElementCache.set(getAccessor().getRelativeSingleField(desugaredField), value);
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
},
|
|
83
|
-
[getParent, contemberFieldElementCache, desugaredField, serialize]
|
|
84
|
-
);
|
|
85
|
-
return /* @__PURE__ */ jsx(Slate, { editor, initialValue: valueNodes, onChange, children: props.children });
|
|
86
|
-
},
|
|
87
|
-
(props) => /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Field, { defaultValue: props.defaultValue, field: props.field, isNonbearing: props.isNonbearing }) }),
|
|
88
|
-
"RichTextEditor"
|
|
89
|
-
);
|
|
90
|
-
export {
|
|
91
|
-
RichTextEditor
|
|
92
|
-
};
|
|
93
|
-
//# sourceMappingURL=RichTextEditor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RichTextEditor.js","sources":["../../../src/components/RichTextEditor.tsx"],"sourcesContent":["import { Component, Field, FieldAccessor, FieldBasicProps, QueryLanguage, useEntity } from '@contember/react-binding'\nimport { FunctionComponent, useCallback, useMemo, useState } from 'react'\nimport { Descendant, Editor, Element as SlateElement, Node as SlateNode, NodeEntry, Transforms } from 'slate'\nimport { Slate } from 'slate-react'\nimport { createEditor, CreateEditorPublicOptions } from '../editor'\nimport { paragraphElementType } from '../plugins'\nimport { useRichTextFieldNodes } from '../internal/hooks/useRichTextFieldNodes'\n\nexport type RichTextEditorProps =\n\t& FieldBasicProps\n\t& CreateEditorPublicOptions\n\t& {\n\t\tchildren: React.ReactNode\n\t}\n\n/**\n * Rich text field supports more advanced formatting capabilities. Output of this field is a JSON.\n *\n * @group Form Fields\n */\nexport const RichTextEditor: FunctionComponent<RichTextEditorProps> = Component(\n\tprops => {\n\t\tconst entity = useEntity()\n\t\tconst environment = entity.environment\n\t\tconst getParent = entity.getAccessor\n\n\t\tconst desugaredField = useMemo(\n\t\t\t() => QueryLanguage.desugarRelativeSingleField(props, environment),\n\t\t\t[environment, props],\n\t\t)\n\t\tconst fieldAccessor = useMemo(() => entity.getRelativeSingleField<string>(desugaredField), [entity, desugaredField])\n\n\t\t// The cache is questionable, really.\n\t\tconst [contemberFieldElementCache] = useState(() => new WeakMap<FieldAccessor<string>, SlateElement[]>())\n\n\n\t\tconst [editor] = useState(() => {\n\t\t\tconst { editor } = createEditor({\n\t\t\t\tplugins: props.plugins,\n\t\t\t\tdefaultElementType: paragraphElementType,\n\t\t\t\tentity,\n\t\t\t\tenvironment,\n\t\t\t\tchildren: props.children,\n\t\t\t})\n\n\t\t\tconst { normalizeNode } = editor\n\t\t\tObject.assign(editor, {\n\t\t\t\tinsertBreak: () => {\n\t\t\t\t\tTransforms.insertText(editor, '\\n')\n\t\t\t\t},\n\t\t\t\tnormalizeNode: (nodeEntry: NodeEntry) => {\n\t\t\t\t\tconst [node, path] = nodeEntry\n\t\t\t\t\tif (path.length === 0 && SlateElement.isAncestor(node)) {\n\t\t\t\t\t\t// Enforce that there's exactly one child and that it's\n\t\t\t\t\t\tif (node.children.length > 1) {\n\t\t\t\t\t\t\treturn Editor.withoutNormalizing(editor, () => {\n\t\t\t\t\t\t\t\tconst targetPath = [0, (editor.children[0] as SlateElement).children.length]\n\t\t\t\t\t\t\t\tTransforms.moveNodes(editor, {\n\t\t\t\t\t\t\t\t\tat: [1],\n\t\t\t\t\t\t\t\t\tto: targetPath,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\tTransforms.unwrapNodes(editor, { at: targetPath })\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (SlateElement.isElement(node.children[0]) && !editor.isDefaultElement(node.children[0])) {\n\t\t\t\t\t\t\treturn Editor.withoutNormalizing(editor, () => {\n\t\t\t\t\t\t\t\tTransforms.wrapNodes(editor, editor.createDefaultElement([{ text: '' }]), {\n\t\t\t\t\t\t\t\t\tat: path,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\tTransforms.unwrapNodes(editor, { at: [0, 0] })\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (SlateElement.isElement(node) && Editor.isBlock(editor, node) && path.length > 1) {\n\t\t\t\t\t\treturn Transforms.unwrapNodes(editor, { at: path })\n\t\t\t\t\t}\n\t\t\t\t\tnormalizeNode(nodeEntry)\n\t\t\t\t},\n\t\t\t})\n\n\t\t\treturn editor\n\t\t})\n\n\t\tconst valueNodes = useRichTextFieldNodes({\n\t\t\teditor,\n\t\t\tfieldAccessor,\n\t\t\tcontemberFieldElementCache,\n\t\t})\n\n\t\tconst serialize = editor.serializeNodes\n\t\tconst onChange = useCallback(\n\t\t\t(value: Descendant[]) => {\n\t\t\t\tgetParent().batchUpdates(getAccessor => {\n\t\t\t\t\tconst fieldAccessor = getAccessor().getRelativeSingleField(desugaredField)\n\n\t\t\t\t\tif (SlateNode.string({ type: 'dummy', children: value }) === '' && fieldAccessor.valueOnServer === null) {\n\t\t\t\t\t\tfieldAccessor.updateValue(null)\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\n\t\t\t\t\tif (SlateElement.isElement(value[0])) {\n\t\t\t\t\t\tfieldAccessor.updateValue(serialize(value[0].children))\n\t\t\t\t\t\tcontemberFieldElementCache.set(getAccessor().getRelativeSingleField(desugaredField), value as SlateElement[])\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\t\t\t[getParent, contemberFieldElementCache, desugaredField, serialize],\n\t\t)\n\n\t\treturn (\n\t\t\t\t<Slate editor={editor} initialValue={valueNodes} onChange={onChange}>\n\t\t\t\t\t{props.children}\n\t\t\t\t</Slate>\n\t\t)\n\t},\n\tprops => (\n\t\t<>\n\t\t\t<Field defaultValue={props.defaultValue} field={props.field} isNonbearing={props.isNonbearing} />\n\t\t</>\n\t),\n\t'RichTextEditor',\n)\n\n"],"names":["editor","SlateElement","fieldAccessor","SlateNode"],"mappings":"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"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const slateReact = require("slate-react");
|
|
5
|
-
const reactSlot = require("@radix-ui/react-slot");
|
|
6
|
-
const utilities = require("@contember/utilities");
|
|
7
|
-
const EditorElementTrigger = ({ elementType, suchThat, ...props }) => {
|
|
8
|
-
const editor = slateReact.useSlate();
|
|
9
|
-
const isActive = editor.isElementActive(elementType, suchThat);
|
|
10
|
-
const onClick = () => {
|
|
11
|
-
editor.toggleElement(elementType, suchThat);
|
|
12
|
-
};
|
|
13
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactSlot.Slot, { onClick, "data-active": utilities.dataAttribute(isActive), ...props });
|
|
14
|
-
};
|
|
15
|
-
exports.EditorElementTrigger = EditorElementTrigger;
|
|
16
|
-
//# sourceMappingURL=EditorElementTrigger.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EditorElementTrigger.cjs","sources":["../../../../src/components/triggers/EditorElementTrigger.tsx"],"sourcesContent":["import * as React from 'react'\nimport { ReactElement } from 'react'\nimport { useSlate } from 'slate-react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { dataAttribute } from '@contember/utilities'\n\nexport interface EditorElementTriggerProps {\n\telementType: string\n\tsuchThat?: Record<string, unknown>\n\tchildren: ReactElement\n}\n\nexport const EditorElementTrigger = ({ elementType, suchThat, ...props }: EditorElementTriggerProps) => {\n\tconst editor = useSlate()\n\n\tconst isActive = editor.isElementActive(elementType, suchThat)\n\tconst onClick = () => {\n\t\teditor.toggleElement(elementType, suchThat)\n\t}\n\n\treturn <Slot onClick={onClick} data-active={dataAttribute(isActive)} {...props} />\n}\n"],"names":["useSlate","jsx","Slot","dataAttribute"],"mappings":";;;;;;AAYO,MAAM,uBAAuB,CAAC,EAAE,aAAa,UAAU,GAAG,YAAuC;AACvG,QAAM,SAASA,WAAAA;AAEf,QAAM,WAAW,OAAO,gBAAgB,aAAa,QAAQ;AAC7D,QAAM,UAAU,MAAM;AACd,WAAA,cAAc,aAAa,QAAQ;AAAA,EAAA;AAGpC,SAAAC,2BAAA,IAACC,kBAAK,SAAkB,eAAaC,wBAAc,QAAQ,GAAI,GAAG,MAAO,CAAA;AACjF;;"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useSlate } from "slate-react";
|
|
3
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
4
|
-
import { dataAttribute } from "@contember/utilities";
|
|
5
|
-
const EditorElementTrigger = ({ elementType, suchThat, ...props }) => {
|
|
6
|
-
const editor = useSlate();
|
|
7
|
-
const isActive = editor.isElementActive(elementType, suchThat);
|
|
8
|
-
const onClick = () => {
|
|
9
|
-
editor.toggleElement(elementType, suchThat);
|
|
10
|
-
};
|
|
11
|
-
return /* @__PURE__ */ jsx(Slot, { onClick, "data-active": dataAttribute(isActive), ...props });
|
|
12
|
-
};
|
|
13
|
-
export {
|
|
14
|
-
EditorElementTrigger
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=EditorElementTrigger.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EditorElementTrigger.js","sources":["../../../../src/components/triggers/EditorElementTrigger.tsx"],"sourcesContent":["import * as React from 'react'\nimport { ReactElement } from 'react'\nimport { useSlate } from 'slate-react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { dataAttribute } from '@contember/utilities'\n\nexport interface EditorElementTriggerProps {\n\telementType: string\n\tsuchThat?: Record<string, unknown>\n\tchildren: ReactElement\n}\n\nexport const EditorElementTrigger = ({ elementType, suchThat, ...props }: EditorElementTriggerProps) => {\n\tconst editor = useSlate()\n\n\tconst isActive = editor.isElementActive(elementType, suchThat)\n\tconst onClick = () => {\n\t\teditor.toggleElement(elementType, suchThat)\n\t}\n\n\treturn <Slot onClick={onClick} data-active={dataAttribute(isActive)} {...props} />\n}\n"],"names":[],"mappings":";;;;AAYO,MAAM,uBAAuB,CAAC,EAAE,aAAa,UAAU,GAAG,YAAuC;AACvG,QAAM,SAAS;AAEf,QAAM,WAAW,OAAO,gBAAgB,aAAa,QAAQ;AAC7D,QAAM,UAAU,MAAM;AACd,WAAA,cAAc,aAAa,QAAQ;AAAA,EAAA;AAGpC,SAAA,oBAAC,QAAK,SAAkB,eAAa,cAAc,QAAQ,GAAI,GAAG,MAAO,CAAA;AACjF;"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const reactSlot = require("@radix-ui/react-slot");
|
|
5
|
-
const utilities = require("@contember/utilities");
|
|
6
|
-
const slateReact = require("slate-react");
|
|
7
|
-
const EditorGenericTrigger = ({ toggle, isActive, shouldDisplay, ...props }) => {
|
|
8
|
-
const editor = slateReact.useSlate();
|
|
9
|
-
const onClick = () => {
|
|
10
|
-
toggle({ editor });
|
|
11
|
-
};
|
|
12
|
-
const active = isActive?.({ editor }) ?? false;
|
|
13
|
-
const display = shouldDisplay?.({ editor }) ?? true;
|
|
14
|
-
if (!display) {
|
|
15
|
-
return null;
|
|
16
|
-
}
|
|
17
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactSlot.Slot, { onClick, "data-active": utilities.dataAttribute(active), ...props });
|
|
18
|
-
};
|
|
19
|
-
exports.EditorGenericTrigger = EditorGenericTrigger;
|
|
20
|
-
//# sourceMappingURL=EditorGenericTrigger.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EditorGenericTrigger.cjs","sources":["../../../../src/components/triggers/EditorGenericTrigger.tsx"],"sourcesContent":["import * as React from 'react'\nimport { ReactElement } from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { Editor } from 'slate'\nimport { dataAttribute } from '@contember/utilities'\nimport { useSlate } from 'slate-react'\n\nexport interface EditorGenericTriggerProps {\n\tisActive?: (args: { editor: Editor }) => boolean\n\tshouldDisplay?: (args: { editor: Editor }) => boolean\n\ttoggle: (args: { editor: Editor }) => void\n\tchildren: ReactElement\n}\n\nexport const EditorGenericTrigger = ({ toggle, isActive, shouldDisplay, ...props }: EditorGenericTriggerProps) => {\n\n\tconst editor = useSlate()\n\tconst onClick = () => {\n\t\ttoggle({ editor })\n\t}\n\tconst active = isActive?.({ editor }) ?? false\n\tconst display = shouldDisplay?.({ editor }) ?? true\n\tif (!display) {\n\t\treturn null\n\t}\n\treturn <Slot onClick={onClick} data-active={dataAttribute(active)} {...props} />\n}\n"],"names":["useSlate","jsx","Slot","dataAttribute"],"mappings":";;;;;;AAca,MAAA,uBAAuB,CAAC,EAAE,QAAQ,UAAU,eAAe,GAAG,YAAuC;AAEjH,QAAM,SAASA,WAAAA;AACf,QAAM,UAAU,MAAM;AACd,WAAA,EAAE,QAAQ;AAAA,EAAA;AAElB,QAAM,SAAS,WAAW,EAAE,OAAQ,CAAA,KAAK;AACzC,QAAM,UAAU,gBAAgB,EAAE,OAAQ,CAAA,KAAK;AAC/C,MAAI,CAAC,SAAS;AACN,WAAA;AAAA,EACR;AACO,SAAAC,2BAAA,IAACC,kBAAK,SAAkB,eAAaC,wBAAc,MAAM,GAAI,GAAG,MAAO,CAAA;AAC/E;;"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
3
|
-
import { dataAttribute } from "@contember/utilities";
|
|
4
|
-
import { useSlate } from "slate-react";
|
|
5
|
-
const EditorGenericTrigger = ({ toggle, isActive, shouldDisplay, ...props }) => {
|
|
6
|
-
const editor = useSlate();
|
|
7
|
-
const onClick = () => {
|
|
8
|
-
toggle({ editor });
|
|
9
|
-
};
|
|
10
|
-
const active = isActive?.({ editor }) ?? false;
|
|
11
|
-
const display = shouldDisplay?.({ editor }) ?? true;
|
|
12
|
-
if (!display) {
|
|
13
|
-
return null;
|
|
14
|
-
}
|
|
15
|
-
return /* @__PURE__ */ jsx(Slot, { onClick, "data-active": dataAttribute(active), ...props });
|
|
16
|
-
};
|
|
17
|
-
export {
|
|
18
|
-
EditorGenericTrigger
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=EditorGenericTrigger.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EditorGenericTrigger.js","sources":["../../../../src/components/triggers/EditorGenericTrigger.tsx"],"sourcesContent":["import * as React from 'react'\nimport { ReactElement } from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { Editor } from 'slate'\nimport { dataAttribute } from '@contember/utilities'\nimport { useSlate } from 'slate-react'\n\nexport interface EditorGenericTriggerProps {\n\tisActive?: (args: { editor: Editor }) => boolean\n\tshouldDisplay?: (args: { editor: Editor }) => boolean\n\ttoggle: (args: { editor: Editor }) => void\n\tchildren: ReactElement\n}\n\nexport const EditorGenericTrigger = ({ toggle, isActive, shouldDisplay, ...props }: EditorGenericTriggerProps) => {\n\n\tconst editor = useSlate()\n\tconst onClick = () => {\n\t\ttoggle({ editor })\n\t}\n\tconst active = isActive?.({ editor }) ?? false\n\tconst display = shouldDisplay?.({ editor }) ?? true\n\tif (!display) {\n\t\treturn null\n\t}\n\treturn <Slot onClick={onClick} data-active={dataAttribute(active)} {...props} />\n}\n"],"names":[],"mappings":";;;;AAca,MAAA,uBAAuB,CAAC,EAAE,QAAQ,UAAU,eAAe,GAAG,YAAuC;AAEjH,QAAM,SAAS;AACf,QAAM,UAAU,MAAM;AACd,WAAA,EAAE,QAAQ;AAAA,EAAA;AAElB,QAAM,SAAS,WAAW,EAAE,OAAQ,CAAA,KAAK;AACzC,QAAM,UAAU,gBAAgB,EAAE,OAAQ,CAAA,KAAK;AAC/C,MAAI,CAAC,SAAS;AACN,WAAA;AAAA,EACR;AACO,SAAA,oBAAC,QAAK,SAAkB,eAAa,cAAc,MAAM,GAAI,GAAG,MAAO,CAAA;AAC/E;"}
|