@contember/react-slate-editor-base 2.0.0-alpha.2 → 2.0.0-alpha.21
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 +93 -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 +1 -1
- 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 +1 -2
- package/dist/types/types/plugins.d.ts.map +1 -1
- package/package.json +11 -19
- package/src/components/RichTextEditor.tsx +6 -6
- package/src/editor/createEditor.ts +2 -2
- 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/tsconfig.json +0 -1
- package/src/types/editor.ts +1 -1
- package/src/types/htmlDeserializer.ts +14 -14
- package/src/types/plugins.ts +8 -9
- 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 +0 -93
- 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/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,134 +0,0 @@
|
|
|
1
|
-
import { Editor, Transforms } from "slate";
|
|
2
|
-
import { ReactEditor } from "slate-react";
|
|
3
|
-
import { getTableElementColumnCount, getTableElementRowCount } from "./TableElement.js";
|
|
4
|
-
import { createEmptyTableRowElement, tableRowElementType, isTableRowElement } from "./TableRowElement.js";
|
|
5
|
-
import { ContemberEditor } from "../../../editor/index.js";
|
|
6
|
-
import { createEmptyTableCellElement, tableCellElementType, isTableCellElement } from "./TableCellElement.js";
|
|
7
|
-
class TableModifications {
|
|
8
|
-
static deleteTableColumn(editor, element, index) {
|
|
9
|
-
const tablePath = ReactEditor.findPath(editor, element);
|
|
10
|
-
const rowCount = element.children.length;
|
|
11
|
-
Editor.withoutNormalizing(editor, () => {
|
|
12
|
-
for (let rowIndex = 0; rowIndex < rowCount; rowIndex++) {
|
|
13
|
-
Transforms.removeNodes(editor, {
|
|
14
|
-
at: [...tablePath, rowIndex, index]
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
static addTableRow(editor, element, index) {
|
|
20
|
-
const tablePath = ReactEditor.findPath(editor, element);
|
|
21
|
-
const columnCount = getTableElementColumnCount(element);
|
|
22
|
-
const rowIndex = index ?? element.children.length;
|
|
23
|
-
let tableRow;
|
|
24
|
-
if (element.children.length === 0) {
|
|
25
|
-
tableRow = createEmptyTableRowElement(columnCount);
|
|
26
|
-
} else {
|
|
27
|
-
const blueprintRow = element.children[rowIndex === 0 ? 0 : rowIndex - 1];
|
|
28
|
-
tableRow = {
|
|
29
|
-
...ContemberEditor.elementToSpecifics(blueprintRow),
|
|
30
|
-
type: tableRowElementType,
|
|
31
|
-
children: Array.from(
|
|
32
|
-
{ length: columnCount },
|
|
33
|
-
(_, columnIndex) => copyTableCell(blueprintRow.children[columnIndex])
|
|
34
|
-
)
|
|
35
|
-
};
|
|
36
|
-
if (rowIndex === 0) {
|
|
37
|
-
const firstRow = element.children[0];
|
|
38
|
-
if (firstRow.headerScope) {
|
|
39
|
-
Transforms.setNodes(editor, { headerScope: null }, { at: [...tablePath, 0] });
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
Transforms.insertNodes(editor, tableRow, {
|
|
44
|
-
at: [...tablePath, rowIndex]
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
static addTableColumn(editor, element, index) {
|
|
48
|
-
const tablePath = ReactEditor.findPath(editor, element);
|
|
49
|
-
const columnCount = getTableElementColumnCount(element);
|
|
50
|
-
const rowCount = getTableElementRowCount(element);
|
|
51
|
-
const columnIndex = index ?? columnCount ?? 0;
|
|
52
|
-
Editor.withoutNormalizing(editor, () => {
|
|
53
|
-
for (let rowIndex = 0; rowIndex < rowCount; rowIndex++) {
|
|
54
|
-
const tableRow = element.children[rowIndex];
|
|
55
|
-
let tableCell;
|
|
56
|
-
if (tableRow.children.length === 0) {
|
|
57
|
-
tableCell = createEmptyTableCellElement();
|
|
58
|
-
} else {
|
|
59
|
-
tableCell = copyTableCell(tableRow.children[columnIndex === 0 ? 0 : columnIndex - 1]);
|
|
60
|
-
if (columnIndex === 0) {
|
|
61
|
-
const firstCell = tableRow.children[0];
|
|
62
|
-
if (firstCell.headerScope) {
|
|
63
|
-
Transforms.setNodes(editor, { headerScope: null }, { at: [...tablePath, rowIndex, 0] });
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
Transforms.insertNodes(editor, tableCell, {
|
|
68
|
-
at: [...tablePath, rowIndex, columnIndex]
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
static justifyTableColumn(editor, element, columnIndex, direction) {
|
|
74
|
-
forEachCellInColumn(editor, element, columnIndex, ([, cellPath]) => {
|
|
75
|
-
Transforms.setNodes(
|
|
76
|
-
editor,
|
|
77
|
-
{ justify: direction ?? null },
|
|
78
|
-
{ match: (node) => isTableCellElement(node), at: cellPath }
|
|
79
|
-
);
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
static toggleTableRowHeaderScope(editor, element, rowIndex, scope) {
|
|
83
|
-
const rowCount = element.children.length;
|
|
84
|
-
if (rowIndex !== 0 || rowCount < 1) {
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
const tablePath = ReactEditor.findPath(editor, element);
|
|
88
|
-
const firstRow = element.children[0];
|
|
89
|
-
Transforms.setNodes(
|
|
90
|
-
editor,
|
|
91
|
-
{ headerScope: firstRow.headerScope === scope ? null : scope },
|
|
92
|
-
{ match: (node) => isTableRowElement(node), at: [...tablePath, 0] }
|
|
93
|
-
);
|
|
94
|
-
}
|
|
95
|
-
static toggleTableColumnHeaderScope(editor, element, columnIndex, scope) {
|
|
96
|
-
let currentStatusScore = 0;
|
|
97
|
-
const rowCount = element.children.length;
|
|
98
|
-
forEachCellInColumn(editor, element, columnIndex, ([cell]) => {
|
|
99
|
-
currentStatusScore += cell.headerScope === scope ? 1 : -1;
|
|
100
|
-
});
|
|
101
|
-
const shouldSetScope = -currentStatusScore === rowCount || currentStatusScore > 0 && currentStatusScore !== rowCount;
|
|
102
|
-
forEachCellInColumn(editor, element, columnIndex, ([, cellPath]) => {
|
|
103
|
-
Transforms.setNodes(
|
|
104
|
-
editor,
|
|
105
|
-
{ headerScope: shouldSetScope ? scope : null },
|
|
106
|
-
{ match: (node) => isTableCellElement(node), at: cellPath }
|
|
107
|
-
);
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
static deleteTableRow(editor, element, index) {
|
|
111
|
-
const tablePath = ReactEditor.findPath(editor, element);
|
|
112
|
-
Transforms.removeNodes(editor, {
|
|
113
|
-
at: [...tablePath, index]
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
const forEachCellInColumn = (editor, element, columnIndex, callback) => {
|
|
118
|
-
const tablePath = ReactEditor.findPath(editor, element);
|
|
119
|
-
const rowCount = getTableElementRowCount(element);
|
|
120
|
-
Editor.withoutNormalizing(editor, () => {
|
|
121
|
-
for (let rowIndex = 0; rowIndex < rowCount; rowIndex++) {
|
|
122
|
-
callback(Editor.node(editor, [...tablePath, rowIndex, columnIndex]));
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
};
|
|
126
|
-
const copyTableCell = (tableCellElement) => ({
|
|
127
|
-
...ContemberEditor.elementToSpecifics(tableCellElement),
|
|
128
|
-
type: tableCellElementType,
|
|
129
|
-
children: [{ text: "" }]
|
|
130
|
-
});
|
|
131
|
-
export {
|
|
132
|
-
TableModifications
|
|
133
|
-
};
|
|
134
|
-
//# sourceMappingURL=TableModifications.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TableModifications.js","sources":["../../../../../src/plugins/element/tables/TableModifications.ts"],"sourcesContent":["import { Editor, NodeEntry, Transforms } from 'slate'\nimport { ReactEditor } from 'slate-react'\nimport { getTableElementColumnCount, getTableElementRowCount, TableElement } from './TableElement'\nimport { createEmptyTableRowElement, isTableRowElement, TableRowElement, tableRowElementType } from './TableRowElement'\nimport { ContemberEditor } from '../../../editor'\nimport {\n\tcreateEmptyTableCellElement,\n\tisTableCellElement,\n\tTableCellElement,\n\ttableCellElementType,\n} from './TableCellElement'\n\nexport class TableModifications {\n\tpublic static deleteTableColumn(editor: Editor, element: TableElement, index: number) {\n\t\tconst tablePath = ReactEditor.findPath(editor, element)\n\t\tconst rowCount = element.children.length\n\n\t\tEditor.withoutNormalizing(editor, () => {\n\t\t\tfor (let rowIndex = 0; rowIndex < rowCount; rowIndex++) {\n\t\t\t\tTransforms.removeNodes(editor, {\n\t\t\t\t\tat: [...tablePath, rowIndex, index],\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\t}\n\n\tpublic static addTableRow(editor: Editor, element: TableElement, index?: number) {\n\t\tconst tablePath = ReactEditor.findPath(editor, element)\n\t\tconst columnCount = getTableElementColumnCount(element)\n\t\tconst rowIndex = index ?? element.children.length\n\n\t\tlet tableRow: TableRowElement\n\t\tif (element.children.length === 0) {\n\t\t\ttableRow = createEmptyTableRowElement(columnCount)\n\t\t} else {\n\t\t\tconst blueprintRow = element.children[rowIndex === 0 ? 0 : rowIndex - 1] as TableRowElement\n\n\t\t\ttableRow = {\n\t\t\t\t...ContemberEditor.elementToSpecifics(blueprintRow),\n\t\t\t\ttype: tableRowElementType,\n\t\t\t\tchildren: Array.from(\n\t\t\t\t\t{ length: columnCount },\n\t\t\t\t\t(_, columnIndex): TableCellElement => copyTableCell(blueprintRow.children[columnIndex] as TableCellElement),\n\t\t\t\t),\n\t\t\t}\n\n\t\t\tif (rowIndex === 0) {\n\t\t\t\tconst firstRow = element.children[0] as TableRowElement\n\t\t\t\tif (firstRow.headerScope) {\n\t\t\t\t\tTransforms.setNodes(editor, { headerScope: null }, { at: [...tablePath, 0] })\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tTransforms.insertNodes(editor, tableRow, {\n\t\t\tat: [...tablePath, rowIndex],\n\t\t})\n\t}\n\n\tpublic static addTableColumn(editor: Editor, element: TableElement, index?: number) {\n\t\tconst tablePath = ReactEditor.findPath(editor, element)\n\t\tconst columnCount = getTableElementColumnCount(element)\n\t\tconst rowCount = getTableElementRowCount(element)\n\t\tconst columnIndex = index ?? columnCount ?? 0\n\n\t\tEditor.withoutNormalizing(editor, () => {\n\t\t\tfor (let rowIndex = 0; rowIndex < rowCount; rowIndex++) {\n\t\t\t\tconst tableRow = element.children[rowIndex] as TableRowElement\n\n\t\t\t\tlet tableCell: TableCellElement\n\t\t\t\tif (tableRow.children.length === 0) {\n\t\t\t\t\ttableCell = createEmptyTableCellElement()\n\t\t\t\t} else {\n\t\t\t\t\ttableCell = copyTableCell(tableRow.children[columnIndex === 0 ? 0 : columnIndex - 1] as TableCellElement)\n\n\t\t\t\t\tif (columnIndex === 0) {\n\t\t\t\t\t\tconst firstCell = tableRow.children[0] as TableCellElement\n\t\t\t\t\t\tif (firstCell.headerScope) {\n\t\t\t\t\t\t\tTransforms.setNodes(editor, { headerScope: null }, { at: [...tablePath, rowIndex, 0] })\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tTransforms.insertNodes(editor, tableCell, {\n\t\t\t\t\tat: [...tablePath, rowIndex, columnIndex],\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\t}\n\n\tpublic static justifyTableColumn(editor: Editor, element: TableElement, columnIndex: number, direction: TableCellElement['justify']) {\n\t\tforEachCellInColumn(editor, element, columnIndex, ([, cellPath]) => {\n\t\t\tTransforms.setNodes(\n\t\t\t\teditor,\n\t\t\t\t{ justify: direction ?? null },\n\t\t\t\t{ match: node => isTableCellElement(node), at: cellPath },\n\t\t\t)\n\t\t})\n\t}\n\n\tpublic static toggleTableRowHeaderScope(editor: Editor, element: TableElement, rowIndex: number, scope: TableRowElement['headerScope']) {\n\t\tconst rowCount = element.children.length\n\t\tif (rowIndex !== 0 || rowCount < 1) {\n\t\t\treturn\n\t\t}\n\t\tconst tablePath = ReactEditor.findPath(editor, element)\n\t\tconst firstRow = element.children[0] as TableRowElement\n\n\t\tTransforms.setNodes(\n\t\t\teditor,\n\t\t\t{ headerScope: firstRow.headerScope === scope ? null : scope },\n\t\t\t{ match: node => isTableRowElement(node), at: [...tablePath, 0] },\n\t\t)\n\t}\n\n\tpublic static toggleTableColumnHeaderScope(editor: Editor, element: TableElement, columnIndex: number, scope: TableCellElement['headerScope']) {\n\t\tlet currentStatusScore = 0\n\t\tconst rowCount = element.children.length\n\n\t\tforEachCellInColumn(editor, element, columnIndex, ([cell]) => {\n\t\t\tcurrentStatusScore += cell.headerScope === scope ? 1 : -1\n\t\t})\n\n\t\t// If none have it or the majority does but not all.\n\t\tconst shouldSetScope =\n\t\t\t-currentStatusScore === rowCount || (currentStatusScore > 0 && currentStatusScore !== rowCount)\n\n\t\tforEachCellInColumn(editor, element, columnIndex, ([, cellPath]) => {\n\t\t\tTransforms.setNodes(\n\t\t\t\teditor,\n\t\t\t\t{ headerScope: shouldSetScope ? scope : null },\n\t\t\t\t{ match: node => isTableCellElement(node), at: cellPath },\n\t\t\t)\n\t\t})\n\t}\n\n\tpublic static deleteTableRow(editor: Editor, element: TableElement, index: number) {\n\t\tconst tablePath = ReactEditor.findPath(editor, element)\n\t\tTransforms.removeNodes(editor, {\n\t\t\tat: [...tablePath, index],\n\t\t})\n\t}\n}\n\nconst forEachCellInColumn = (\n\teditor: Editor,\n\telement: TableElement,\n\tcolumnIndex: number,\n\tcallback: (cellEntry: NodeEntry<TableCellElement>) => void,\n) => {\n\tconst tablePath = ReactEditor.findPath(editor, element)\n\tconst rowCount = getTableElementRowCount(element)\n\n\tEditor.withoutNormalizing(editor, () => {\n\t\tfor (let rowIndex = 0; rowIndex < rowCount; rowIndex++) {\n\t\t\tcallback(Editor.node(editor, [...tablePath, rowIndex, columnIndex]) as NodeEntry<TableCellElement>)\n\t\t}\n\t})\n}\nconst copyTableCell = (tableCellElement: TableCellElement): TableCellElement => ({\n\t...ContemberEditor.elementToSpecifics(tableCellElement),\n\ttype: tableCellElementType,\n\tchildren: [{ text: '' }],\n})\n\n"],"names":[],"mappings":";;;;;;AAYO,MAAM,mBAAmB;AAAA,EAC/B,OAAc,kBAAkB,QAAgB,SAAuB,OAAe;AACrF,UAAM,YAAY,YAAY,SAAS,QAAQ,OAAO;AAChD,UAAA,WAAW,QAAQ,SAAS;AAE3B,WAAA,mBAAmB,QAAQ,MAAM;AACvC,eAAS,WAAW,GAAG,WAAW,UAAU,YAAY;AACvD,mBAAW,YAAY,QAAQ;AAAA,UAC9B,IAAI,CAAC,GAAG,WAAW,UAAU,KAAK;AAAA,QAAA,CAClC;AAAA,MACF;AAAA,IAAA,CACA;AAAA,EACF;AAAA,EAEA,OAAc,YAAY,QAAgB,SAAuB,OAAgB;AAChF,UAAM,YAAY,YAAY,SAAS,QAAQ,OAAO;AAChD,UAAA,cAAc,2BAA2B,OAAO;AAChD,UAAA,WAAW,SAAS,QAAQ,SAAS;AAEvC,QAAA;AACA,QAAA,QAAQ,SAAS,WAAW,GAAG;AAClC,iBAAW,2BAA2B,WAAW;AAAA,IAAA,OAC3C;AACN,YAAM,eAAe,QAAQ,SAAS,aAAa,IAAI,IAAI,WAAW,CAAC;AAE5D,iBAAA;AAAA,QACV,GAAG,gBAAgB,mB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AE,OAAO,CAAA,SAAQ,mBAAmB,IAAI,GAAG,IAAI,SAAS;AAAA,MAAA;AAAA,IACzD,CACA;AAAA,EACF;AAAA,EAEA,OAAc,eAAe,QAAgB,SAAuB,OAAe;AAClF,UAAM,YAAY,YAAY,SAAS,QAAQ,OAAO;AACtD,eAAW,YAAY,QAAQ;AAAA,MAC9B,IAAI,CAAC,GAAG,WAAW,KAAK;AAAA,IAAA,CACxB;AAAA,EACF;AACD;AAEA,MAAM,sBAAsB,CAC3B,QACA,SACA,aACA,aACI;AACJ,QAAM,YAAY,YAAY,SAAS,QAAQ,OAAO;AAChD,QAAA,WAAW,wBAAwB,OAAO;AAEzC,SAAA,mBAAmB,QAAQ,MAAM;AACvC,aAAS,WAAW,GAAG,WAAW,UAAU,YAAY;AAC9C,eAAA,OAAO,KAAK,QAAQ,CAAC,GAAG,WAAW,UAAU,WAAW,CAAC,CAAgC;AAAA,IACnG;AAAA,EAAA,CACA;AACF;AACA,MAAM,gBAAgB,CAAC,sBAA0D;AAAA,EAChF,GAAG,gBAAgB,mBAAmB,gBAAgB;AAAA,EACtD,MAAM;AAAA,EACN,UAAU,CAAC,EAAE,MAAM,IAAI;AACxB;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TableRowElement.cjs","sources":["../../../../../src/plugins/element/tables/TableRowElement.ts"],"sourcesContent":["import { Editor as SlateEditor, Element as SlateElement, Element, Node, Node as SlateNode, Transforms } from 'slate'\nimport { createEmptyTableCellElement, isTableCellElement, tableCellElementType } from './TableCellElement'\nimport { ContemberEditor } from '../../../editor'\nimport { tableElementType } from './TableElement'\nimport { EditorElementPlugin, ElementRenderer } from '../../../types'\n\nexport const tableRowElementType = 'tableRow' as const\n\nexport interface TableRowElement extends SlateElement {\n\ttype: typeof tableRowElementType\n\tchildren: SlateEditor['children']\n\theaderScope?: 'table'\n}\n\nexport const isTableRowElement = (element: Node): element is TableRowElement => Element.isElement(element) && element.type === tableRowElementType\n\nexport const createEmptyTableRowElement = (columnCount = 2) => ({\n\ttype: tableRowElementType,\n\tchildren: Array.from({ length: columnCount }, () => createEmptyTableCellElement()),\n})\n\nexport const tableRowElementPlugin = ({ render }: {render: ElementRenderer<TableRowElement>}): EditorElementPlugin<TableRowElement> => ({\n\ttype: tableRowElementType,\n\trender,\n\tnormalizeNode: ({ editor, path, element, preventDefault }) => {\n\t\tfor (const [child, childPath] of SlateNode.children(editor, path)) {\n\t\t\tif (SlateElement.isElement(child)) {\n\t\t\t\tif (!isTableCellElement(child)) {\n\t\t\t\t\tContemberEditor.ejectElement(editor, childPath)\n\t\t\t\t\tTransforms.setNodes(editor, { type: tableCellElementType }, { at: childPath })\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tTransforms.removeNodes(editor, { at: path })\n\t\t\t\treturn preventDefault()\n\t\t\t}\n\t\t}\n\t\tif (!ContemberEditor.hasParentOfType(editor, [element, path], tableElementType)) {\n\t\t\tTransforms.unwrapNodes(editor, { at: path })\n\t\t\treturn preventDefault()\n\t\t}\n\t\tif (path[path.length - 1] > 0 && element.headerScope) {\n\t\t\tTransforms.setNodes(editor, { headerScope: null }, { at: path })\n\t\t\treturn preventDefault()\n\t\t}\n\t},\n\tcanContainAnyBlocks: false,\n})\n"],"names":["Element","createEmptyTableCellElement","SlateNode","SlateElement","isTableCellElement","ContemberEditor","Transforms","tableCellElementType","tableElementType"],"mappings":";;;;;;AAMO,MAAM,sBAAsB;AAQtB,MAAA,oBAAoB,CAAC,YAA8CA,cAAQ,UAAU,OAAO,KAAK,QAAQ,SAAS;AAElH,MAAA,6BAA6B,CAAC,cAAc,OAAO;AAAA,EAC/D,MAAM;AAAA,EACN,UAAU,MAAM,KAAK,EAAE,QAAQ,YAAY,GAAG,MAAMC,iBAAAA,6BAA6B;AAClF;AAEO,MAAM,wBAAwB,CAAC,EAAE,cAAgG;AAAA,EACvI,MAAM;AAAA,EACN;AAAA,EACA,eAAe,CAAC,EAAE,QAAQ,MAAM,SAAS,qBAAqB;AAClD,eAAA,CAAC,OAAO,SAAS,KAAKC,WAAU,SAAS,QAAQ,IAAI,GAAG;AAC9D,UAAAC,MAAA,QAAa,UAAU,KAAK,GAAG;AAC9B,YAAA,CAACC,iBAAAA,mBAAmB,KAAK,GAAG;AACfC,gBAAAA,gBAAA,aAAa,QAAQ,SAAS;AACnCC,2BAAA,SAAS,QAAQ,EAAE,MAAMC,yCAAwB,EAAE,IAAI,UAAA,CAAW;AAAA,QAC9E;AAAA,MAAA,OACM;AACND,cAAA,WAAW,YAAY,QAAQ,EAAE,IAAI,KAAM,CAAA;AAC3C,eAAO,eAAe;AAAA,MACvB;AAAA,IACD;AACI,QAAA,CAACD,MAAAA,gBAAgB,gBAAgB,QAAQ,CAAC,SAAS,IAAI,GAAGG,aAAAA,gBAAgB,GAAG;AAChFF,YAAA,WAAW,YAAY,QAAQ,EAAE,IAAI,KAAM,CAAA;AAC3C,aAAO,eAAe;AAAA,IACvB;AACA,QAAI,KAAK,KAAK,SAAS,CAAC,IAAI,KAAK,QAAQ,aAAa;AAC1CA,uBAAA,SAAS,QAAQ,EAAE,aAAa,QAAQ,EAAE,IAAI,KAAA,CAAM;AAC/D,aAAO,eAAe;AAAA,IACvB;AAAA,EACD;AAAA,EACA,qBAAqB;AACtB;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TableRowElement.js","sources":["../../../../../src/plugins/element/tables/TableRowElement.ts"],"sourcesContent":["import { Editor as SlateEditor, Element as SlateElement, Element, Node, Node as SlateNode, Transforms } from 'slate'\nimport { createEmptyTableCellElement, isTableCellElement, tableCellElementType } from './TableCellElement'\nimport { ContemberEditor } from '../../../editor'\nimport { tableElementType } from './TableElement'\nimport { EditorElementPlugin, ElementRenderer } from '../../../types'\n\nexport const tableRowElementType = 'tableRow' as const\n\nexport interface TableRowElement extends SlateElement {\n\ttype: typeof tableRowElementType\n\tchildren: SlateEditor['children']\n\theaderScope?: 'table'\n}\n\nexport const isTableRowElement = (element: Node): element is TableRowElement => Element.isElement(element) && element.type === tableRowElementType\n\nexport const createEmptyTableRowElement = (columnCount = 2) => ({\n\ttype: tableRowElementType,\n\tchildren: Array.from({ length: columnCount }, () => createEmptyTableCellElement()),\n})\n\nexport const tableRowElementPlugin = ({ render }: {render: ElementRenderer<TableRowElement>}): EditorElementPlugin<TableRowElement> => ({\n\ttype: tableRowElementType,\n\trender,\n\tnormalizeNode: ({ editor, path, element, preventDefault }) => {\n\t\tfor (const [child, childPath] of SlateNode.children(editor, path)) {\n\t\t\tif (SlateElement.isElement(child)) {\n\t\t\t\tif (!isTableCellElement(child)) {\n\t\t\t\t\tContemberEditor.ejectElement(editor, childPath)\n\t\t\t\t\tTransforms.setNodes(editor, { type: tableCellElementType }, { at: childPath })\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tTransforms.removeNodes(editor, { at: path })\n\t\t\t\treturn preventDefault()\n\t\t\t}\n\t\t}\n\t\tif (!ContemberEditor.hasParentOfType(editor, [element, path], tableElementType)) {\n\t\t\tTransforms.unwrapNodes(editor, { at: path })\n\t\t\treturn preventDefault()\n\t\t}\n\t\tif (path[path.length - 1] > 0 && element.headerScope) {\n\t\t\tTransforms.setNodes(editor, { headerScope: null }, { at: path })\n\t\t\treturn preventDefault()\n\t\t}\n\t},\n\tcanContainAnyBlocks: false,\n})\n"],"names":["SlateNode","SlateElement"],"mappings":";;;;AAMO,MAAM,sBAAsB;AAQtB,MAAA,oBAAoB,CAAC,YAA8C,QAAQ,UAAU,OAAO,KAAK,QAAQ,SAAS;AAElH,MAAA,6BAA6B,CAAC,cAAc,OAAO;AAAA,EAC/D,MAAM;AAAA,EACN,UAAU,MAAM,KAAK,EAAE,QAAQ,YAAY,GAAG,MAAM,6BAA6B;AAClF;AAEO,MAAM,wBAAwB,CAAC,EAAE,cAAgG;AAAA,EACvI,MAAM;AAAA,EACN;AAAA,EACA,eAAe,CAAC,EAAE,QAAQ,MAAM,SAAS,qBAAqB;AAClD,eAAA,CAAC,OAAO,SAAS,KAAKA,KAAU,SAAS,QAAQ,IAAI,GAAG;AAC9D,UAAAC,QAAa,UAAU,KAAK,GAAG;AAC9B,YAAA,CAAC,mBAAmB,KAAK,GAAG;AACf,0BAAA,aAAa,QAAQ,SAAS;AACnC,qBAAA,SAAS,QAAQ,EAAE,MAAM,wBAAwB,EAAE,IAAI,UAAA,CAAW;AAAA,QAC9E;AAAA,MAAA,OACM;AACN,mBAAW,YAAY,QAAQ,EAAE,IAAI,KAAM,CAAA;AAC3C,eAAO,eAAe;AAAA,MACvB;AAAA,IACD;AACI,QAAA,CAAC,gBAAgB,gBAAgB,QAAQ,CAAC,SAAS,IAAI,GAAG,gBAAgB,GAAG;AAChF,iBAAW,YAAY,QAAQ,EAAE,IAAI,KAAM,CAAA;AAC3C,aAAO,eAAe;AAAA,IACvB;AACA,QAAI,KAAK,KAAK,SAAS,CAAC,IAAI,KAAK,QAAQ,aAAa;AAC1C,iBAAA,SAAS,QAAQ,EAAE,aAAa,QAAQ,EAAE,IAAI,KAAA,CAAM;AAC/D,aAAO,eAAe;AAAA,IACvB;AAAA,EACD;AAAA,EACA,qBAAqB;AACtB;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gaugeTableColumnCount.cjs","sources":["../../../../../src/plugins/element/tables/gaugeTableColumnCount.ts"],"sourcesContent":["import type { TableElement } from './TableElement'\nimport type { TableRowElement } from './TableRowElement'\n\nexport const gaugeTableColumnCount = (table: TableElement): number => {\n\t// This whole function is obviously very heuristic. It's intended to be called during normalizations (i.e. often),\n\t// and so it aims to be reasonably fast. We want to use this return value to repair corrupted tables.\n\n\tif (table.children.length === 0) {\n\t\treturn 0\n\t}\n\n\tconst rowSampleStart = table.children[0] as TableRowElement\n\tconst rowSampleMiddle = table.children[Math.floor(table.children.length / 2)] as TableRowElement\n\tconst rowSampleEnd = table.children[table.children.length - 1] as TableRowElement\n\n\tconst columnSampleStart = rowSampleStart.children.length\n\tconst columnSampleMiddle = rowSampleMiddle.children.length\n\tconst columnSampleEnd = rowSampleEnd.children.length\n\n\t// Tables most often get corrupted either at the beginning or at the end. Thus we assume that out of these three\n\t// values, two will likely be the same.\n\tif (columnSampleStart === columnSampleEnd) {\n\t\treturn columnSampleStart\n\t}\n\tif (columnSampleStart === columnSampleMiddle) {\n\t\treturn columnSampleStart\n\t}\n\tif (columnSampleMiddle === columnSampleEnd) {\n\t\treturn columnSampleMiddle\n\t}\n\n\t// If we make it here, then all three are different and the table is completely broken. We could consult more rows\n\t// but really, odds are that it wouldn't really help.\n\treturn columnSampleStart\n}\n"],"names":[],"mappings":";;AAGa,MAAA,wBAAwB,CAAC,UAAgC;AAIjE,MAAA,MAAM,SAAS,WAAW,GAAG;AACzB,WAAA;AAAA,EACR;AAEM,QAAA,iBAAiB,MAAM,SAAS,CAAC;AACjC,QAAA,kBAAkB,MAAM,SAAS,KAAK,MAAM,MAAM,SAAS,SAAS,CAAC,CAAC;AAC5E,QAAM,eAAe,MAAM,SAAS,MAAM,SAAS,SAAS,CAAC;AAEvD,QAAA,oBAAoB,eAAe,SAAS;AAC5C,QAAA,qBAAqB,gBAAgB,SAAS;AAC9C,QAAA,kBAAkB,aAAa,SAAS;AAI9C,MAAI,sBAAsB,iBAAiB;AACnC,WAAA;AAAA,EACR;AACA,MAAI,sBAAsB,oBAAoB;AACtC,WAAA;AAAA,EACR;AACA,MAAI,uBAAuB,iBAAiB;AACpC,WAAA;AAAA,EACR;AAIO,SAAA;AACR;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gaugeTableColumnCount.js","sources":["../../../../../src/plugins/element/tables/gaugeTableColumnCount.ts"],"sourcesContent":["import type { TableElement } from './TableElement'\nimport type { TableRowElement } from './TableRowElement'\n\nexport const gaugeTableColumnCount = (table: TableElement): number => {\n\t// This whole function is obviously very heuristic. It's intended to be called during normalizations (i.e. often),\n\t// and so it aims to be reasonably fast. We want to use this return value to repair corrupted tables.\n\n\tif (table.children.length === 0) {\n\t\treturn 0\n\t}\n\n\tconst rowSampleStart = table.children[0] as TableRowElement\n\tconst rowSampleMiddle = table.children[Math.floor(table.children.length / 2)] as TableRowElement\n\tconst rowSampleEnd = table.children[table.children.length - 1] as TableRowElement\n\n\tconst columnSampleStart = rowSampleStart.children.length\n\tconst columnSampleMiddle = rowSampleMiddle.children.length\n\tconst columnSampleEnd = rowSampleEnd.children.length\n\n\t// Tables most often get corrupted either at the beginning or at the end. Thus we assume that out of these three\n\t// values, two will likely be the same.\n\tif (columnSampleStart === columnSampleEnd) {\n\t\treturn columnSampleStart\n\t}\n\tif (columnSampleStart === columnSampleMiddle) {\n\t\treturn columnSampleStart\n\t}\n\tif (columnSampleMiddle === columnSampleEnd) {\n\t\treturn columnSampleMiddle\n\t}\n\n\t// If we make it here, then all three are different and the table is completely broken. We could consult more rows\n\t// but really, odds are that it wouldn't really help.\n\treturn columnSampleStart\n}\n"],"names":[],"mappings":"AAGa,MAAA,wBAAwB,CAAC,UAAgC;AAIjE,MAAA,MAAM,SAAS,WAAW,GAAG;AACzB,WAAA;AAAA,EACR;AAEM,QAAA,iBAAiB,MAAM,SAAS,CAAC;AACjC,QAAA,kBAAkB,MAAM,SAAS,KAAK,MAAM,MAAM,SAAS,SAAS,CAAC,CAAC;AAC5E,QAAM,eAAe,MAAM,SAAS,MAAM,SAAS,SAAS,CAAC;AAEvD,QAAA,oBAAoB,eAAe,SAAS;AAC5C,QAAA,qBAAqB,gBAAgB,SAAS;AAC9C,QAAA,kBAAkB,aAAa,SAAS;AAI9C,MAAI,sBAAsB,iBAAiB;AACnC,WAAA;AAAA,EACR;AACA,MAAI,sBAAsB,oBAAoB;AACtC,WAAA;AAAA,EACR;AACA,MAAI,uBAAuB,iBAAiB;AACpC,WAAA;AAAA,EACR;AAIO,SAAA;AACR;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"withTables.cjs","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":["tableElementPlugin","tableCellElementPlugin","tableRowElementPlugin","ContemberEditor","isTableCellElement","Editor","Transforms","Text","Element","SlatePath","SlateRange","Point","isTableElement","isTableRowElement","SlateNode","getTableCellCoordinates","getTableElementRowCount","getTableElementColumnCount","selectTableCellContents","TableModifications"],"mappings":";;;;;;;;;AASa,MAAA,aAAa,CAAC,EAAE,aAAa,iBAAiB,eAAe,MAIpE,CAAmB,WAAiB;AACnC,QAAA;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACG,IAAA;AAEJ,SAA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,CAAC,GAAG,WAAW,KAAK,IAAI,GAAG,QAAQ,GAAG,WAAW,CAAC;AAEjF,qBAAAC,iBAAW,OAAO,QAAQ,QAAQ;AAAA,YAAA,OACnC;AACNa,iCAAA,mBAAmB,YAAY,QAAQ,cAAc,WAAW,CAAC;AAC3D,oBAAA,eAAed,MAAAA,OAAO,MAAM,QAAQ,CAAC,GAAG,WAAW,WAAW,GAAG,WAAW,CAAC;AAE5E,qBAAAC,iBAAW,OAAO,QAAQ,YAAY;AAAA,YAC9C;AAAA,UACD;AAAA,QACD;AAAA,MACD;AACA,gBAAU,KAAK;AAAA,IAChB;AAAA,EAAA,CAEA;AAEM,SAAA;AACR;;"}
|
|
@@ -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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WAAW,CAAC;AAC3D,oBAAA,eAAe,OAAO,MAAM,QAAQ,CAAC,GAAG,WAAW,WAAW,GAAG,WAAW,CAAC;AAE5E,qBAAA,WAAW,OAAO,QAAQ,YAAY;AAAA,YAC9C;AAAA,UACD;AAAA,QACD;AAAA,MACD;AACA,gBAAU,KAAK;AAAA,IAChB;AAAA,EAAA,CAEA;AAEM,SAAA;AACR;"}
|
|
@@ -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;"}
|