@contember/react-slate-editor-base 2.1.0-alpha.37 → 2.1.0-alpha.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/development/index.cjs +139 -0
- package/dist/development/index.cjs.map +1 -0
- package/dist/development/index.js +136 -0
- package/dist/development/index.js.map +1 -0
- package/dist/development/src/components/RichTextEditor.cjs +106 -0
- package/dist/development/src/components/RichTextEditor.cjs.map +1 -0
- package/dist/development/src/components/RichTextEditor.js +106 -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 +35 -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 +211 -0
- package/dist/development/src/editor/createEditorWithEssentials.js.map +1 -0
- package/dist/development/src/editor/index.cjs +44 -0
- package/dist/development/src/editor/index.cjs.map +1 -0
- package/dist/development/src/editor/index.js +44 -0
- package/dist/development/src/editor/index.js.map +1 -0
- package/dist/development/src/editor/methods/addMarks.cjs +12 -0
- package/dist/development/src/editor/methods/addMarks.cjs.map +1 -0
- package/dist/development/src/editor/methods/addMarks.js +12 -0
- package/dist/development/src/editor/methods/addMarks.js.map +1 -0
- package/dist/development/src/editor/methods/canToggleMark.cjs +7 -0
- package/dist/development/src/editor/methods/canToggleMark.cjs.map +1 -0
- package/dist/development/src/editor/methods/canToggleMark.js +7 -0
- package/dist/development/src/editor/methods/canToggleMark.js.map +1 -0
- package/dist/development/src/editor/methods/closest.cjs +18 -0
- package/dist/development/src/editor/methods/closest.cjs.map +1 -0
- package/dist/development/src/editor/methods/closest.js +18 -0
- package/dist/development/src/editor/methods/closest.js.map +1 -0
- package/dist/development/src/editor/methods/closestBlockEntry.cjs +10 -0
- package/dist/development/src/editor/methods/closestBlockEntry.cjs.map +1 -0
- package/dist/development/src/editor/methods/closestBlockEntry.js +10 -0
- package/dist/development/src/editor/methods/closestBlockEntry.js.map +1 -0
- package/dist/development/src/editor/methods/closestViableBlockContainerEntry.cjs +9 -0
- package/dist/development/src/editor/methods/closestViableBlockContainerEntry.cjs.map +1 -0
- package/dist/development/src/editor/methods/closestViableBlockContainerEntry.js +9 -0
- package/dist/development/src/editor/methods/closestViableBlockContainerEntry.js.map +1 -0
- package/dist/development/src/editor/methods/ejectElement.cjs +15 -0
- package/dist/development/src/editor/methods/ejectElement.cjs.map +1 -0
- package/dist/development/src/editor/methods/ejectElement.js +15 -0
- package/dist/development/src/editor/methods/ejectElement.js.map +1 -0
- package/dist/development/src/editor/methods/elementToSpecifics.cjs +8 -0
- package/dist/development/src/editor/methods/elementToSpecifics.cjs.map +1 -0
- package/dist/development/src/editor/methods/elementToSpecifics.js +8 -0
- package/dist/development/src/editor/methods/elementToSpecifics.js.map +1 -0
- package/dist/development/src/editor/methods/getElementDataAttributes.cjs +13 -0
- package/dist/development/src/editor/methods/getElementDataAttributes.cjs.map +1 -0
- package/dist/development/src/editor/methods/getElementDataAttributes.js +13 -0
- package/dist/development/src/editor/methods/getElementDataAttributes.js.map +1 -0
- package/dist/development/src/editor/methods/getPreviousSibling.cjs +13 -0
- package/dist/development/src/editor/methods/getPreviousSibling.cjs.map +1 -0
- package/dist/development/src/editor/methods/getPreviousSibling.js +13 -0
- package/dist/development/src/editor/methods/getPreviousSibling.js.map +1 -0
- package/dist/development/src/editor/methods/hasMarks.cjs +23 -0
- package/dist/development/src/editor/methods/hasMarks.cjs.map +1 -0
- package/dist/development/src/editor/methods/hasMarks.js +23 -0
- package/dist/development/src/editor/methods/hasMarks.js.map +1 -0
- package/dist/development/src/editor/methods/hasParentOfType.cjs +15 -0
- package/dist/development/src/editor/methods/hasParentOfType.cjs.map +1 -0
- package/dist/development/src/editor/methods/hasParentOfType.js +15 -0
- package/dist/development/src/editor/methods/hasParentOfType.js.map +1 -0
- package/dist/development/src/editor/methods/isElementType.cjs +24 -0
- package/dist/development/src/editor/methods/isElementType.cjs.map +1 -0
- package/dist/development/src/editor/methods/isElementType.js +24 -0
- package/dist/development/src/editor/methods/isElementType.js.map +1 -0
- package/dist/development/src/editor/methods/permissivelyDeserializeNodes.cjs +22 -0
- package/dist/development/src/editor/methods/permissivelyDeserializeNodes.cjs.map +1 -0
- package/dist/development/src/editor/methods/permissivelyDeserializeNodes.js +22 -0
- package/dist/development/src/editor/methods/permissivelyDeserializeNodes.js.map +1 -0
- package/dist/development/src/editor/methods/removeMarks.cjs +12 -0
- package/dist/development/src/editor/methods/removeMarks.cjs.map +1 -0
- package/dist/development/src/editor/methods/removeMarks.js +12 -0
- package/dist/development/src/editor/methods/removeMarks.js.map +1 -0
- package/dist/development/src/editor/methods/serializeNodes.cjs +15 -0
- package/dist/development/src/editor/methods/serializeNodes.cjs.map +1 -0
- package/dist/development/src/editor/methods/serializeNodes.js +15 -0
- package/dist/development/src/editor/methods/serializeNodes.js.map +1 -0
- package/dist/development/src/editor/methods/strictlyDeserializeNodes.cjs +14 -0
- package/dist/development/src/editor/methods/strictlyDeserializeNodes.cjs.map +1 -0
- package/dist/development/src/editor/methods/strictlyDeserializeNodes.js +14 -0
- package/dist/development/src/editor/methods/strictlyDeserializeNodes.js.map +1 -0
- package/dist/development/src/editor/methods/textToSpecifics.cjs +8 -0
- package/dist/development/src/editor/methods/textToSpecifics.cjs.map +1 -0
- package/dist/development/src/editor/methods/textToSpecifics.js +8 -0
- package/dist/development/src/editor/methods/textToSpecifics.js.map +1 -0
- package/dist/development/src/editor/methods/toLatestFormat.cjs +32 -0
- package/dist/development/src/editor/methods/toLatestFormat.cjs.map +1 -0
- package/dist/development/src/editor/methods/toLatestFormat.js +32 -0
- package/dist/development/src/editor/methods/toLatestFormat.js.map +1 -0
- package/dist/development/src/editor/methods/topLevelNodes.cjs +12 -0
- package/dist/development/src/editor/methods/topLevelNodes.cjs.map +1 -0
- package/dist/development/src/editor/methods/topLevelNodes.js +12 -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 +11 -0
- package/dist/development/src/internal/components/DefaultElement.js.map +1 -0
- package/dist/development/src/internal/hooks/useRichTextFieldNodes.cjs +28 -0
- package/dist/development/src/internal/hooks/useRichTextFieldNodes.cjs.map +1 -0
- package/dist/development/src/internal/hooks/useRichTextFieldNodes.js +28 -0
- package/dist/development/src/internal/hooks/useRichTextFieldNodes.js.map +1 -0
- package/dist/development/src/internal/utils/EditorPasteUtils.cjs +47 -0
- package/dist/development/src/internal/utils/EditorPasteUtils.cjs.map +1 -0
- package/dist/development/src/internal/utils/EditorPasteUtils.js +47 -0
- package/dist/development/src/internal/utils/EditorPasteUtils.js.map +1 -0
- package/dist/development/src/internal/utils/parseUrl.cjs +14 -0
- package/dist/development/src/internal/utils/parseUrl.cjs.map +1 -0
- package/dist/development/src/internal/utils/parseUrl.js +14 -0
- package/dist/development/src/internal/utils/parseUrl.js.map +1 -0
- package/dist/development/src/plugins/attributes/alignment/alignButton.cjs +21 -0
- package/dist/development/src/plugins/attributes/alignment/alignButton.cjs.map +1 -0
- package/dist/development/src/plugins/attributes/alignment/alignButton.js +21 -0
- package/dist/development/src/plugins/attributes/alignment/alignButton.js.map +1 -0
- package/dist/development/src/plugins/behaviour/paste/HtmlDeserializer.cjs +136 -0
- package/dist/development/src/plugins/behaviour/paste/HtmlDeserializer.cjs.map +1 -0
- package/dist/development/src/plugins/behaviour/paste/HtmlDeserializer.js +136 -0
- package/dist/development/src/plugins/behaviour/paste/HtmlDeserializer.js.map +1 -0
- package/dist/development/src/plugins/behaviour/paste/createMarkHtmlDeserializer.cjs +15 -0
- package/dist/development/src/plugins/behaviour/paste/createMarkHtmlDeserializer.cjs.map +1 -0
- package/dist/development/src/plugins/behaviour/paste/createMarkHtmlDeserializer.js +15 -0
- package/dist/development/src/plugins/behaviour/paste/createMarkHtmlDeserializer.js.map +1 -0
- package/dist/development/src/plugins/behaviour/paste/withPaste.cjs +24 -0
- package/dist/development/src/plugins/behaviour/paste/withPaste.cjs.map +1 -0
- package/dist/development/src/plugins/behaviour/paste/withPaste.js +24 -0
- package/dist/development/src/plugins/behaviour/paste/withPaste.js.map +1 -0
- package/dist/development/src/plugins/element/anchors/AnchorElement.cjs +44 -0
- package/dist/development/src/plugins/element/anchors/AnchorElement.cjs.map +1 -0
- package/dist/development/src/plugins/element/anchors/AnchorElement.js +44 -0
- package/dist/development/src/plugins/element/anchors/AnchorElement.js.map +1 -0
- package/dist/development/src/plugins/element/anchors/AnchorHtmlDeserializer.cjs +19 -0
- package/dist/development/src/plugins/element/anchors/AnchorHtmlDeserializer.cjs.map +1 -0
- package/dist/development/src/plugins/element/anchors/AnchorHtmlDeserializer.js +19 -0
- package/dist/development/src/plugins/element/anchors/AnchorHtmlDeserializer.js.map +1 -0
- package/dist/development/src/plugins/element/anchors/AnchorModifications.cjs +29 -0
- package/dist/development/src/plugins/element/anchors/AnchorModifications.cjs.map +1 -0
- package/dist/development/src/plugins/element/anchors/AnchorModifications.js +29 -0
- package/dist/development/src/plugins/element/anchors/AnchorModifications.js.map +1 -0
- package/dist/development/src/plugins/element/anchors/withAnchors.cjs +21 -0
- package/dist/development/src/plugins/element/anchors/withAnchors.cjs.map +1 -0
- package/dist/development/src/plugins/element/anchors/withAnchors.js +21 -0
- package/dist/development/src/plugins/element/anchors/withAnchors.js.map +1 -0
- package/dist/development/src/plugins/element/headings/HeadingElement.cjs +41 -0
- package/dist/development/src/plugins/element/headings/HeadingElement.cjs.map +1 -0
- package/dist/development/src/plugins/element/headings/HeadingElement.js +41 -0
- package/dist/development/src/plugins/element/headings/HeadingElement.js.map +1 -0
- package/dist/development/src/plugins/element/headings/HeadingHtmlDeserializer.cjs +22 -0
- package/dist/development/src/plugins/element/headings/HeadingHtmlDeserializer.cjs.map +1 -0
- package/dist/development/src/plugins/element/headings/HeadingHtmlDeserializer.js +22 -0
- package/dist/development/src/plugins/element/headings/HeadingHtmlDeserializer.js.map +1 -0
- package/dist/development/src/plugins/element/headings/withHeadings.cjs +70 -0
- package/dist/development/src/plugins/element/headings/withHeadings.cjs.map +1 -0
- package/dist/development/src/plugins/element/headings/withHeadings.js +70 -0
- package/dist/development/src/plugins/element/headings/withHeadings.js.map +1 -0
- package/dist/development/src/plugins/element/horizonalRules/HorizontalRuleElement.cjs +41 -0
- package/dist/development/src/plugins/element/horizonalRules/HorizontalRuleElement.cjs.map +1 -0
- package/dist/development/src/plugins/element/horizonalRules/HorizontalRuleElement.js +41 -0
- package/dist/development/src/plugins/element/horizonalRules/HorizontalRuleElement.js.map +1 -0
- package/dist/development/src/plugins/element/horizonalRules/withHorizontalRules.cjs +75 -0
- package/dist/development/src/plugins/element/horizonalRules/withHorizontalRules.cjs.map +1 -0
- package/dist/development/src/plugins/element/horizonalRules/withHorizontalRules.js +75 -0
- package/dist/development/src/plugins/element/horizonalRules/withHorizontalRules.js.map +1 -0
- package/dist/development/src/plugins/element/lists/ListElement.cjs +26 -0
- package/dist/development/src/plugins/element/lists/ListElement.cjs.map +1 -0
- package/dist/development/src/plugins/element/lists/ListElement.js +26 -0
- package/dist/development/src/plugins/element/lists/ListElement.js.map +1 -0
- package/dist/development/src/plugins/element/lists/ListHtmlDeserializer.cjs +98 -0
- package/dist/development/src/plugins/element/lists/ListHtmlDeserializer.cjs.map +1 -0
- package/dist/development/src/plugins/element/lists/ListHtmlDeserializer.js +98 -0
- package/dist/development/src/plugins/element/lists/ListHtmlDeserializer.js.map +1 -0
- package/dist/development/src/plugins/element/lists/ListItemElement.cjs +53 -0
- package/dist/development/src/plugins/element/lists/ListItemElement.cjs.map +1 -0
- package/dist/development/src/plugins/element/lists/ListItemElement.js +53 -0
- package/dist/development/src/plugins/element/lists/ListItemElement.js.map +1 -0
- package/dist/development/src/plugins/element/lists/OrderedListElement.cjs +25 -0
- package/dist/development/src/plugins/element/lists/OrderedListElement.cjs.map +1 -0
- package/dist/development/src/plugins/element/lists/OrderedListElement.js +25 -0
- package/dist/development/src/plugins/element/lists/OrderedListElement.js.map +1 -0
- package/dist/development/src/plugins/element/lists/UnorderedListElement.cjs +25 -0
- package/dist/development/src/plugins/element/lists/UnorderedListElement.cjs.map +1 -0
- package/dist/development/src/plugins/element/lists/UnorderedListElement.js +25 -0
- package/dist/development/src/plugins/element/lists/UnorderedListElement.js.map +1 -0
- package/dist/development/src/plugins/element/lists/transforms/dedentListItem.cjs +57 -0
- package/dist/development/src/plugins/element/lists/transforms/dedentListItem.cjs.map +1 -0
- package/dist/development/src/plugins/element/lists/transforms/dedentListItem.js +57 -0
- package/dist/development/src/plugins/element/lists/transforms/dedentListItem.js.map +1 -0
- package/dist/development/src/plugins/element/lists/transforms/indentListItem.cjs +57 -0
- package/dist/development/src/plugins/element/lists/transforms/indentListItem.cjs.map +1 -0
- package/dist/development/src/plugins/element/lists/transforms/indentListItem.js +57 -0
- package/dist/development/src/plugins/element/lists/transforms/indentListItem.js.map +1 -0
- package/dist/development/src/plugins/element/lists/transforms/normalizeListElement.cjs +22 -0
- package/dist/development/src/plugins/element/lists/transforms/normalizeListElement.cjs.map +1 -0
- package/dist/development/src/plugins/element/lists/transforms/normalizeListElement.js +22 -0
- package/dist/development/src/plugins/element/lists/transforms/normalizeListElement.js.map +1 -0
- package/dist/development/src/plugins/element/lists/transforms/toggleListElement.cjs +93 -0
- package/dist/development/src/plugins/element/lists/transforms/toggleListElement.cjs.map +1 -0
- package/dist/development/src/plugins/element/lists/transforms/toggleListElement.js +93 -0
- package/dist/development/src/plugins/element/lists/transforms/toggleListElement.js.map +1 -0
- package/dist/development/src/plugins/element/lists/withLists.cjs +153 -0
- package/dist/development/src/plugins/element/lists/withLists.cjs.map +1 -0
- package/dist/development/src/plugins/element/lists/withLists.js +153 -0
- package/dist/development/src/plugins/element/lists/withLists.js.map +1 -0
- package/dist/development/src/plugins/element/paragraphs/ParagraphElement.cjs +49 -0
- package/dist/development/src/plugins/element/paragraphs/ParagraphElement.cjs.map +1 -0
- package/dist/development/src/plugins/element/paragraphs/ParagraphElement.js +49 -0
- package/dist/development/src/plugins/element/paragraphs/ParagraphElement.js.map +1 -0
- package/dist/development/src/plugins/element/paragraphs/ParagraphHtmlDeserializer.cjs +11 -0
- package/dist/development/src/plugins/element/paragraphs/ParagraphHtmlDeserializer.cjs.map +1 -0
- package/dist/development/src/plugins/element/paragraphs/ParagraphHtmlDeserializer.js +11 -0
- package/dist/development/src/plugins/element/paragraphs/ParagraphHtmlDeserializer.js.map +1 -0
- package/dist/development/src/plugins/element/paragraphs/withParagraphs.cjs +58 -0
- package/dist/development/src/plugins/element/paragraphs/withParagraphs.cjs.map +1 -0
- package/dist/development/src/plugins/element/paragraphs/withParagraphs.js +58 -0
- package/dist/development/src/plugins/element/paragraphs/withParagraphs.js.map +1 -0
- package/dist/development/src/plugins/element/scrollTargets/ScrollTargetElement.cjs +51 -0
- package/dist/development/src/plugins/element/scrollTargets/ScrollTargetElement.cjs.map +1 -0
- package/dist/development/src/plugins/element/scrollTargets/ScrollTargetElement.js +51 -0
- package/dist/development/src/plugins/element/scrollTargets/ScrollTargetElement.js.map +1 -0
- package/dist/development/src/plugins/element/scrollTargets/withScrollTargets.cjs +9 -0
- package/dist/development/src/plugins/element/scrollTargets/withScrollTargets.cjs.map +1 -0
- package/dist/development/src/plugins/element/scrollTargets/withScrollTargets.js +9 -0
- package/dist/development/src/plugins/element/scrollTargets/withScrollTargets.js.map +1 -0
- package/dist/development/src/plugins/element/tables/TableCellElement.cjs +39 -0
- package/dist/development/src/plugins/element/tables/TableCellElement.cjs.map +1 -0
- package/dist/development/src/plugins/element/tables/TableCellElement.js +39 -0
- package/dist/development/src/plugins/element/tables/TableCellElement.js.map +1 -0
- package/dist/development/src/plugins/element/tables/TableElement.cjs +114 -0
- package/dist/development/src/plugins/element/tables/TableElement.cjs.map +1 -0
- package/dist/development/src/plugins/element/tables/TableElement.js +114 -0
- package/dist/development/src/plugins/element/tables/TableElement.js.map +1 -0
- package/dist/development/src/plugins/element/tables/TableElementSelection.cjs +20 -0
- package/dist/development/src/plugins/element/tables/TableElementSelection.cjs.map +1 -0
- package/dist/development/src/plugins/element/tables/TableElementSelection.js +20 -0
- package/dist/development/src/plugins/element/tables/TableElementSelection.js.map +1 -0
- package/dist/development/src/plugins/element/tables/TableHtmlDeserializer.cjs +36 -0
- package/dist/development/src/plugins/element/tables/TableHtmlDeserializer.cjs.map +1 -0
- package/dist/development/src/plugins/element/tables/TableHtmlDeserializer.js +36 -0
- package/dist/development/src/plugins/element/tables/TableHtmlDeserializer.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 +43 -0
- package/dist/development/src/plugins/element/tables/TableRowElement.cjs.map +1 -0
- package/dist/development/src/plugins/element/tables/TableRowElement.js +43 -0
- package/dist/development/src/plugins/element/tables/TableRowElement.js.map +1 -0
- package/dist/development/src/plugins/element/tables/gaugeTableColumnCount.cjs +25 -0
- package/dist/development/src/plugins/element/tables/gaugeTableColumnCount.cjs.map +1 -0
- package/dist/development/src/plugins/element/tables/gaugeTableColumnCount.js +25 -0
- package/dist/development/src/plugins/element/tables/gaugeTableColumnCount.js.map +1 -0
- package/dist/development/src/plugins/element/tables/withTables.cjs +283 -0
- package/dist/development/src/plugins/element/tables/withTables.cjs.map +1 -0
- package/dist/development/src/plugins/element/tables/withTables.js +283 -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 +13 -0
- package/dist/development/src/plugins/text/bold/boldMark.js.map +1 -0
- package/dist/development/src/plugins/text/bold/withBold.cjs +16 -0
- package/dist/development/src/plugins/text/bold/withBold.cjs.map +1 -0
- package/dist/development/src/plugins/text/bold/withBold.js +16 -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 +13 -0
- package/dist/development/src/plugins/text/code/codeMark.js.map +1 -0
- package/dist/development/src/plugins/text/code/withCode.cjs +9 -0
- package/dist/development/src/plugins/text/code/withCode.cjs.map +1 -0
- package/dist/development/src/plugins/text/code/withCode.js +9 -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 +13 -0
- package/dist/development/src/plugins/text/highlight/highlightMark.js.map +1 -0
- package/dist/development/src/plugins/text/highlight/withHighlight.cjs +9 -0
- package/dist/development/src/plugins/text/highlight/withHighlight.cjs.map +1 -0
- package/dist/development/src/plugins/text/highlight/withHighlight.js +9 -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 +13 -0
- package/dist/development/src/plugins/text/italic/italicMark.js.map +1 -0
- package/dist/development/src/plugins/text/italic/withItalic.cjs +16 -0
- package/dist/development/src/plugins/text/italic/withItalic.cjs.map +1 -0
- package/dist/development/src/plugins/text/italic/withItalic.js +16 -0
- package/dist/development/src/plugins/text/italic/withItalic.js.map +1 -0
- package/dist/development/src/plugins/text/newline/withNewline.cjs +15 -0
- package/dist/development/src/plugins/text/newline/withNewline.cjs.map +1 -0
- package/dist/development/src/plugins/text/newline/withNewline.js +15 -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 +13 -0
- package/dist/development/src/plugins/text/strikeThrough/strikeThroughMark.js.map +1 -0
- package/dist/development/src/plugins/text/strikeThrough/withStrikeThrough.cjs +17 -0
- package/dist/development/src/plugins/text/strikeThrough/withStrikeThrough.cjs.map +1 -0
- package/dist/development/src/plugins/text/strikeThrough/withStrikeThrough.js +17 -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 +13 -0
- package/dist/development/src/plugins/text/underline/underlineMark.js.map +1 -0
- package/dist/development/src/plugins/text/underline/withUnderline.cjs +17 -0
- package/dist/development/src/plugins/text/underline/withUnderline.cjs.map +1 -0
- package/dist/development/src/plugins/text/underline/withUnderline.js +17 -0
- package/dist/development/src/plugins/text/underline/withUnderline.js.map +1 -0
- package/dist/development/src/slate-reexport.cjs +10 -0
- package/dist/development/src/slate-reexport.cjs.map +1 -0
- package/dist/development/src/slate-reexport.js +8 -0
- package/dist/development/src/slate-reexport.js.map +1 -0
- package/dist/production/index.cjs +139 -0
- package/dist/production/index.cjs.map +1 -0
- package/dist/production/index.js +136 -0
- package/dist/production/index.js.map +1 -0
- package/dist/production/src/components/RichTextEditor.cjs +94 -0
- package/dist/production/src/components/RichTextEditor.cjs.map +1 -0
- package/dist/production/src/components/RichTextEditor.js +94 -0
- package/dist/production/src/components/RichTextEditor.js.map +1 -0
- package/dist/production/src/components/triggers/EditorElementTrigger.cjs +16 -0
- package/dist/production/src/components/triggers/EditorElementTrigger.cjs.map +1 -0
- package/dist/production/src/components/triggers/EditorElementTrigger.js +16 -0
- package/dist/production/src/components/triggers/EditorElementTrigger.js.map +1 -0
- package/dist/production/src/components/triggers/EditorGenericTrigger.cjs +20 -0
- package/dist/production/src/components/triggers/EditorGenericTrigger.cjs.map +1 -0
- package/dist/production/src/components/triggers/EditorGenericTrigger.js +20 -0
- package/dist/production/src/components/triggers/EditorGenericTrigger.js.map +1 -0
- package/dist/production/src/components/triggers/EditorMarkTrigger.cjs +16 -0
- package/dist/production/src/components/triggers/EditorMarkTrigger.cjs.map +1 -0
- package/dist/production/src/components/triggers/EditorMarkTrigger.js +16 -0
- package/dist/production/src/components/triggers/EditorMarkTrigger.js.map +1 -0
- package/dist/production/src/components/triggers/EditorWrapNodeTrigger.cjs +28 -0
- package/dist/production/src/components/triggers/EditorWrapNodeTrigger.cjs.map +1 -0
- package/dist/production/src/components/triggers/EditorWrapNodeTrigger.js +28 -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 +35 -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 +211 -0
- package/dist/production/src/editor/createEditorWithEssentials.js.map +1 -0
- package/dist/production/src/editor/index.cjs +44 -0
- package/dist/production/src/editor/index.cjs.map +1 -0
- package/dist/production/src/editor/index.js +44 -0
- package/dist/production/src/editor/index.js.map +1 -0
- package/dist/production/src/editor/methods/addMarks.cjs +12 -0
- package/dist/production/src/editor/methods/addMarks.cjs.map +1 -0
- package/dist/production/src/editor/methods/addMarks.js +12 -0
- package/dist/production/src/editor/methods/addMarks.js.map +1 -0
- package/dist/production/src/editor/methods/canToggleMark.cjs +7 -0
- package/dist/production/src/editor/methods/canToggleMark.cjs.map +1 -0
- package/dist/production/src/editor/methods/canToggleMark.js +7 -0
- package/dist/production/src/editor/methods/canToggleMark.js.map +1 -0
- package/dist/production/src/editor/methods/closest.cjs +18 -0
- package/dist/production/src/editor/methods/closest.cjs.map +1 -0
- package/dist/production/src/editor/methods/closest.js +18 -0
- package/dist/production/src/editor/methods/closest.js.map +1 -0
- package/dist/production/src/editor/methods/closestBlockEntry.cjs +10 -0
- package/dist/production/src/editor/methods/closestBlockEntry.cjs.map +1 -0
- package/dist/production/src/editor/methods/closestBlockEntry.js +10 -0
- package/dist/production/src/editor/methods/closestBlockEntry.js.map +1 -0
- package/dist/production/src/editor/methods/closestViableBlockContainerEntry.cjs +9 -0
- package/dist/production/src/editor/methods/closestViableBlockContainerEntry.cjs.map +1 -0
- package/dist/production/src/editor/methods/closestViableBlockContainerEntry.js +9 -0
- package/dist/production/src/editor/methods/closestViableBlockContainerEntry.js.map +1 -0
- package/dist/production/src/editor/methods/ejectElement.cjs +15 -0
- package/dist/production/src/editor/methods/ejectElement.cjs.map +1 -0
- package/dist/production/src/editor/methods/ejectElement.js +15 -0
- package/dist/production/src/editor/methods/ejectElement.js.map +1 -0
- package/dist/production/src/editor/methods/elementToSpecifics.cjs +8 -0
- package/dist/production/src/editor/methods/elementToSpecifics.cjs.map +1 -0
- package/dist/production/src/editor/methods/elementToSpecifics.js +8 -0
- package/dist/production/src/editor/methods/elementToSpecifics.js.map +1 -0
- package/dist/production/src/editor/methods/getElementDataAttributes.cjs +13 -0
- package/dist/production/src/editor/methods/getElementDataAttributes.cjs.map +1 -0
- package/dist/production/src/editor/methods/getElementDataAttributes.js +13 -0
- package/dist/production/src/editor/methods/getElementDataAttributes.js.map +1 -0
- package/dist/production/src/editor/methods/getPreviousSibling.cjs +13 -0
- package/dist/production/src/editor/methods/getPreviousSibling.cjs.map +1 -0
- package/dist/production/src/editor/methods/getPreviousSibling.js +13 -0
- package/dist/production/src/editor/methods/getPreviousSibling.js.map +1 -0
- package/dist/production/src/editor/methods/hasMarks.cjs +23 -0
- package/dist/production/src/editor/methods/hasMarks.cjs.map +1 -0
- package/dist/production/src/editor/methods/hasMarks.js +23 -0
- package/dist/production/src/editor/methods/hasMarks.js.map +1 -0
- package/dist/production/src/editor/methods/hasParentOfType.cjs +15 -0
- package/dist/production/src/editor/methods/hasParentOfType.cjs.map +1 -0
- package/dist/production/src/editor/methods/hasParentOfType.js +15 -0
- package/dist/production/src/editor/methods/hasParentOfType.js.map +1 -0
- package/dist/production/src/editor/methods/isElementType.cjs +24 -0
- package/dist/production/src/editor/methods/isElementType.cjs.map +1 -0
- package/dist/production/src/editor/methods/isElementType.js +24 -0
- package/dist/production/src/editor/methods/isElementType.js.map +1 -0
- package/dist/production/src/editor/methods/permissivelyDeserializeNodes.cjs +22 -0
- package/dist/production/src/editor/methods/permissivelyDeserializeNodes.cjs.map +1 -0
- package/dist/production/src/editor/methods/permissivelyDeserializeNodes.js +22 -0
- package/dist/production/src/editor/methods/permissivelyDeserializeNodes.js.map +1 -0
- package/dist/production/src/editor/methods/removeMarks.cjs +12 -0
- package/dist/production/src/editor/methods/removeMarks.cjs.map +1 -0
- package/dist/production/src/editor/methods/removeMarks.js +12 -0
- package/dist/production/src/editor/methods/removeMarks.js.map +1 -0
- package/dist/production/src/editor/methods/serializeNodes.cjs +15 -0
- package/dist/production/src/editor/methods/serializeNodes.cjs.map +1 -0
- package/dist/production/src/editor/methods/serializeNodes.js +15 -0
- package/dist/production/src/editor/methods/serializeNodes.js.map +1 -0
- package/dist/production/src/editor/methods/strictlyDeserializeNodes.cjs +14 -0
- package/dist/production/src/editor/methods/strictlyDeserializeNodes.cjs.map +1 -0
- package/dist/production/src/editor/methods/strictlyDeserializeNodes.js +14 -0
- package/dist/production/src/editor/methods/strictlyDeserializeNodes.js.map +1 -0
- package/dist/production/src/editor/methods/textToSpecifics.cjs +8 -0
- package/dist/production/src/editor/methods/textToSpecifics.cjs.map +1 -0
- package/dist/production/src/editor/methods/textToSpecifics.js +8 -0
- package/dist/production/src/editor/methods/textToSpecifics.js.map +1 -0
- package/dist/production/src/editor/methods/toLatestFormat.cjs +32 -0
- package/dist/production/src/editor/methods/toLatestFormat.cjs.map +1 -0
- package/dist/production/src/editor/methods/toLatestFormat.js +32 -0
- package/dist/production/src/editor/methods/toLatestFormat.js.map +1 -0
- package/dist/production/src/editor/methods/topLevelNodes.cjs +12 -0
- package/dist/production/src/editor/methods/topLevelNodes.cjs.map +1 -0
- package/dist/production/src/editor/methods/topLevelNodes.js +12 -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 +11 -0
- package/dist/production/src/internal/components/DefaultElement.js.map +1 -0
- package/dist/production/src/internal/hooks/useRichTextFieldNodes.cjs +28 -0
- package/dist/production/src/internal/hooks/useRichTextFieldNodes.cjs.map +1 -0
- package/dist/production/src/internal/hooks/useRichTextFieldNodes.js +28 -0
- package/dist/production/src/internal/hooks/useRichTextFieldNodes.js.map +1 -0
- package/dist/production/src/internal/utils/EditorPasteUtils.cjs +47 -0
- package/dist/production/src/internal/utils/EditorPasteUtils.cjs.map +1 -0
- package/dist/production/src/internal/utils/EditorPasteUtils.js +47 -0
- package/dist/production/src/internal/utils/EditorPasteUtils.js.map +1 -0
- package/dist/production/src/internal/utils/parseUrl.cjs +14 -0
- package/dist/production/src/internal/utils/parseUrl.cjs.map +1 -0
- package/dist/production/src/internal/utils/parseUrl.js +14 -0
- package/dist/production/src/internal/utils/parseUrl.js.map +1 -0
- package/dist/production/src/plugins/attributes/alignment/alignButton.cjs +21 -0
- package/dist/production/src/plugins/attributes/alignment/alignButton.cjs.map +1 -0
- package/dist/production/src/plugins/attributes/alignment/alignButton.js +21 -0
- package/dist/production/src/plugins/attributes/alignment/alignButton.js.map +1 -0
- package/dist/production/src/plugins/behaviour/paste/HtmlDeserializer.cjs +136 -0
- package/dist/production/src/plugins/behaviour/paste/HtmlDeserializer.cjs.map +1 -0
- package/dist/production/src/plugins/behaviour/paste/HtmlDeserializer.js +136 -0
- package/dist/production/src/plugins/behaviour/paste/HtmlDeserializer.js.map +1 -0
- package/dist/production/src/plugins/behaviour/paste/createMarkHtmlDeserializer.cjs +15 -0
- package/dist/production/src/plugins/behaviour/paste/createMarkHtmlDeserializer.cjs.map +1 -0
- package/dist/production/src/plugins/behaviour/paste/createMarkHtmlDeserializer.js +15 -0
- package/dist/production/src/plugins/behaviour/paste/createMarkHtmlDeserializer.js.map +1 -0
- package/dist/production/src/plugins/behaviour/paste/withPaste.cjs +24 -0
- package/dist/production/src/plugins/behaviour/paste/withPaste.cjs.map +1 -0
- package/dist/production/src/plugins/behaviour/paste/withPaste.js +24 -0
- package/dist/production/src/plugins/behaviour/paste/withPaste.js.map +1 -0
- package/dist/production/src/plugins/element/anchors/AnchorElement.cjs +44 -0
- package/dist/production/src/plugins/element/anchors/AnchorElement.cjs.map +1 -0
- package/dist/production/src/plugins/element/anchors/AnchorElement.js +44 -0
- package/dist/production/src/plugins/element/anchors/AnchorElement.js.map +1 -0
- package/dist/production/src/plugins/element/anchors/AnchorHtmlDeserializer.cjs +19 -0
- package/dist/production/src/plugins/element/anchors/AnchorHtmlDeserializer.cjs.map +1 -0
- package/dist/production/src/plugins/element/anchors/AnchorHtmlDeserializer.js +19 -0
- package/dist/production/src/plugins/element/anchors/AnchorHtmlDeserializer.js.map +1 -0
- package/dist/production/src/plugins/element/anchors/AnchorModifications.cjs +29 -0
- package/dist/production/src/plugins/element/anchors/AnchorModifications.cjs.map +1 -0
- package/dist/production/src/plugins/element/anchors/AnchorModifications.js +29 -0
- package/dist/production/src/plugins/element/anchors/AnchorModifications.js.map +1 -0
- package/dist/production/src/plugins/element/anchors/withAnchors.cjs +21 -0
- package/dist/production/src/plugins/element/anchors/withAnchors.cjs.map +1 -0
- package/dist/production/src/plugins/element/anchors/withAnchors.js +21 -0
- package/dist/production/src/plugins/element/anchors/withAnchors.js.map +1 -0
- package/dist/production/src/plugins/element/headings/HeadingElement.cjs +41 -0
- package/dist/production/src/plugins/element/headings/HeadingElement.cjs.map +1 -0
- package/dist/production/src/plugins/element/headings/HeadingElement.js +41 -0
- package/dist/production/src/plugins/element/headings/HeadingElement.js.map +1 -0
- package/dist/production/src/plugins/element/headings/HeadingHtmlDeserializer.cjs +22 -0
- package/dist/production/src/plugins/element/headings/HeadingHtmlDeserializer.cjs.map +1 -0
- package/dist/production/src/plugins/element/headings/HeadingHtmlDeserializer.js +22 -0
- package/dist/production/src/plugins/element/headings/HeadingHtmlDeserializer.js.map +1 -0
- package/dist/production/src/plugins/element/headings/withHeadings.cjs +70 -0
- package/dist/production/src/plugins/element/headings/withHeadings.cjs.map +1 -0
- package/dist/production/src/plugins/element/headings/withHeadings.js +70 -0
- package/dist/production/src/plugins/element/headings/withHeadings.js.map +1 -0
- package/dist/production/src/plugins/element/horizonalRules/HorizontalRuleElement.cjs +41 -0
- package/dist/production/src/plugins/element/horizonalRules/HorizontalRuleElement.cjs.map +1 -0
- package/dist/production/src/plugins/element/horizonalRules/HorizontalRuleElement.js +41 -0
- package/dist/production/src/plugins/element/horizonalRules/HorizontalRuleElement.js.map +1 -0
- package/dist/production/src/plugins/element/horizonalRules/withHorizontalRules.cjs +75 -0
- package/dist/production/src/plugins/element/horizonalRules/withHorizontalRules.cjs.map +1 -0
- package/dist/production/src/plugins/element/horizonalRules/withHorizontalRules.js +75 -0
- package/dist/production/src/plugins/element/horizonalRules/withHorizontalRules.js.map +1 -0
- package/dist/production/src/plugins/element/lists/ListElement.cjs +26 -0
- package/dist/production/src/plugins/element/lists/ListElement.cjs.map +1 -0
- package/dist/production/src/plugins/element/lists/ListElement.js +26 -0
- package/dist/production/src/plugins/element/lists/ListElement.js.map +1 -0
- package/dist/production/src/plugins/element/lists/ListHtmlDeserializer.cjs +98 -0
- package/dist/production/src/plugins/element/lists/ListHtmlDeserializer.cjs.map +1 -0
- package/dist/production/src/plugins/element/lists/ListHtmlDeserializer.js +98 -0
- package/dist/production/src/plugins/element/lists/ListHtmlDeserializer.js.map +1 -0
- package/dist/production/src/plugins/element/lists/ListItemElement.cjs +53 -0
- package/dist/production/src/plugins/element/lists/ListItemElement.cjs.map +1 -0
- package/dist/production/src/plugins/element/lists/ListItemElement.js +53 -0
- package/dist/production/src/plugins/element/lists/ListItemElement.js.map +1 -0
- package/dist/production/src/plugins/element/lists/OrderedListElement.cjs +25 -0
- package/dist/production/src/plugins/element/lists/OrderedListElement.cjs.map +1 -0
- package/dist/production/src/plugins/element/lists/OrderedListElement.js +25 -0
- package/dist/production/src/plugins/element/lists/OrderedListElement.js.map +1 -0
- package/dist/production/src/plugins/element/lists/UnorderedListElement.cjs +25 -0
- package/dist/production/src/plugins/element/lists/UnorderedListElement.cjs.map +1 -0
- package/dist/production/src/plugins/element/lists/UnorderedListElement.js +25 -0
- package/dist/production/src/plugins/element/lists/UnorderedListElement.js.map +1 -0
- package/dist/production/src/plugins/element/lists/transforms/dedentListItem.cjs +57 -0
- package/dist/production/src/plugins/element/lists/transforms/dedentListItem.cjs.map +1 -0
- package/dist/production/src/plugins/element/lists/transforms/dedentListItem.js +57 -0
- package/dist/production/src/plugins/element/lists/transforms/dedentListItem.js.map +1 -0
- package/dist/production/src/plugins/element/lists/transforms/indentListItem.cjs +57 -0
- package/dist/production/src/plugins/element/lists/transforms/indentListItem.cjs.map +1 -0
- package/dist/production/src/plugins/element/lists/transforms/indentListItem.js +57 -0
- package/dist/production/src/plugins/element/lists/transforms/indentListItem.js.map +1 -0
- package/dist/production/src/plugins/element/lists/transforms/normalizeListElement.cjs +22 -0
- package/dist/production/src/plugins/element/lists/transforms/normalizeListElement.cjs.map +1 -0
- package/dist/production/src/plugins/element/lists/transforms/normalizeListElement.js +22 -0
- package/dist/production/src/plugins/element/lists/transforms/normalizeListElement.js.map +1 -0
- package/dist/production/src/plugins/element/lists/transforms/toggleListElement.cjs +93 -0
- package/dist/production/src/plugins/element/lists/transforms/toggleListElement.cjs.map +1 -0
- package/dist/production/src/plugins/element/lists/transforms/toggleListElement.js +93 -0
- package/dist/production/src/plugins/element/lists/transforms/toggleListElement.js.map +1 -0
- package/dist/production/src/plugins/element/lists/withLists.cjs +153 -0
- package/dist/production/src/plugins/element/lists/withLists.cjs.map +1 -0
- package/dist/production/src/plugins/element/lists/withLists.js +153 -0
- package/dist/production/src/plugins/element/lists/withLists.js.map +1 -0
- package/dist/production/src/plugins/element/paragraphs/ParagraphElement.cjs +49 -0
- package/dist/production/src/plugins/element/paragraphs/ParagraphElement.cjs.map +1 -0
- package/dist/production/src/plugins/element/paragraphs/ParagraphElement.js +49 -0
- package/dist/production/src/plugins/element/paragraphs/ParagraphElement.js.map +1 -0
- package/dist/production/src/plugins/element/paragraphs/ParagraphHtmlDeserializer.cjs +11 -0
- package/dist/production/src/plugins/element/paragraphs/ParagraphHtmlDeserializer.cjs.map +1 -0
- package/dist/production/src/plugins/element/paragraphs/ParagraphHtmlDeserializer.js +11 -0
- package/dist/production/src/plugins/element/paragraphs/ParagraphHtmlDeserializer.js.map +1 -0
- package/dist/production/src/plugins/element/paragraphs/withParagraphs.cjs +58 -0
- package/dist/production/src/plugins/element/paragraphs/withParagraphs.cjs.map +1 -0
- package/dist/production/src/plugins/element/paragraphs/withParagraphs.js +58 -0
- package/dist/production/src/plugins/element/paragraphs/withParagraphs.js.map +1 -0
- package/dist/production/src/plugins/element/scrollTargets/ScrollTargetElement.cjs +51 -0
- package/dist/production/src/plugins/element/scrollTargets/ScrollTargetElement.cjs.map +1 -0
- package/dist/production/src/plugins/element/scrollTargets/ScrollTargetElement.js +51 -0
- package/dist/production/src/plugins/element/scrollTargets/ScrollTargetElement.js.map +1 -0
- package/dist/production/src/plugins/element/scrollTargets/withScrollTargets.cjs +9 -0
- package/dist/production/src/plugins/element/scrollTargets/withScrollTargets.cjs.map +1 -0
- package/dist/production/src/plugins/element/scrollTargets/withScrollTargets.js +9 -0
- package/dist/production/src/plugins/element/scrollTargets/withScrollTargets.js.map +1 -0
- package/dist/production/src/plugins/element/tables/TableCellElement.cjs +39 -0
- package/dist/production/src/plugins/element/tables/TableCellElement.cjs.map +1 -0
- package/dist/production/src/plugins/element/tables/TableCellElement.js +39 -0
- package/dist/production/src/plugins/element/tables/TableCellElement.js.map +1 -0
- package/dist/production/src/plugins/element/tables/TableElement.cjs +114 -0
- package/dist/production/src/plugins/element/tables/TableElement.cjs.map +1 -0
- package/dist/production/src/plugins/element/tables/TableElement.js +114 -0
- package/dist/production/src/plugins/element/tables/TableElement.js.map +1 -0
- package/dist/production/src/plugins/element/tables/TableElementSelection.cjs +20 -0
- package/dist/production/src/plugins/element/tables/TableElementSelection.cjs.map +1 -0
- package/dist/production/src/plugins/element/tables/TableElementSelection.js +20 -0
- package/dist/production/src/plugins/element/tables/TableElementSelection.js.map +1 -0
- package/dist/production/src/plugins/element/tables/TableHtmlDeserializer.cjs +36 -0
- package/dist/production/src/plugins/element/tables/TableHtmlDeserializer.cjs.map +1 -0
- package/dist/production/src/plugins/element/tables/TableHtmlDeserializer.js +36 -0
- package/dist/production/src/plugins/element/tables/TableHtmlDeserializer.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 +43 -0
- package/dist/production/src/plugins/element/tables/TableRowElement.cjs.map +1 -0
- package/dist/production/src/plugins/element/tables/TableRowElement.js +43 -0
- package/dist/production/src/plugins/element/tables/TableRowElement.js.map +1 -0
- package/dist/production/src/plugins/element/tables/gaugeTableColumnCount.cjs +25 -0
- package/dist/production/src/plugins/element/tables/gaugeTableColumnCount.cjs.map +1 -0
- package/dist/production/src/plugins/element/tables/gaugeTableColumnCount.js +25 -0
- package/dist/production/src/plugins/element/tables/gaugeTableColumnCount.js.map +1 -0
- package/dist/production/src/plugins/element/tables/withTables.cjs +283 -0
- package/dist/production/src/plugins/element/tables/withTables.cjs.map +1 -0
- package/dist/production/src/plugins/element/tables/withTables.js +283 -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 +13 -0
- package/dist/production/src/plugins/text/bold/boldMark.js.map +1 -0
- package/dist/production/src/plugins/text/bold/withBold.cjs +16 -0
- package/dist/production/src/plugins/text/bold/withBold.cjs.map +1 -0
- package/dist/production/src/plugins/text/bold/withBold.js +16 -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 +13 -0
- package/dist/production/src/plugins/text/code/codeMark.js.map +1 -0
- package/dist/production/src/plugins/text/code/withCode.cjs +9 -0
- package/dist/production/src/plugins/text/code/withCode.cjs.map +1 -0
- package/dist/production/src/plugins/text/code/withCode.js +9 -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 +13 -0
- package/dist/production/src/plugins/text/highlight/highlightMark.js.map +1 -0
- package/dist/production/src/plugins/text/highlight/withHighlight.cjs +9 -0
- package/dist/production/src/plugins/text/highlight/withHighlight.cjs.map +1 -0
- package/dist/production/src/plugins/text/highlight/withHighlight.js +9 -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 +13 -0
- package/dist/production/src/plugins/text/italic/italicMark.js.map +1 -0
- package/dist/production/src/plugins/text/italic/withItalic.cjs +16 -0
- package/dist/production/src/plugins/text/italic/withItalic.cjs.map +1 -0
- package/dist/production/src/plugins/text/italic/withItalic.js +16 -0
- package/dist/production/src/plugins/text/italic/withItalic.js.map +1 -0
- package/dist/production/src/plugins/text/newline/withNewline.cjs +15 -0
- package/dist/production/src/plugins/text/newline/withNewline.cjs.map +1 -0
- package/dist/production/src/plugins/text/newline/withNewline.js +15 -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 +13 -0
- package/dist/production/src/plugins/text/strikeThrough/strikeThroughMark.js.map +1 -0
- package/dist/production/src/plugins/text/strikeThrough/withStrikeThrough.cjs +17 -0
- package/dist/production/src/plugins/text/strikeThrough/withStrikeThrough.cjs.map +1 -0
- package/dist/production/src/plugins/text/strikeThrough/withStrikeThrough.js +17 -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 +13 -0
- package/dist/production/src/plugins/text/underline/underlineMark.js.map +1 -0
- package/dist/production/src/plugins/text/underline/withUnderline.cjs +17 -0
- package/dist/production/src/plugins/text/underline/withUnderline.cjs.map +1 -0
- package/dist/production/src/plugins/text/underline/withUnderline.js +17 -0
- package/dist/production/src/plugins/text/underline/withUnderline.js.map +1 -0
- package/dist/production/src/slate-reexport.cjs +10 -0
- package/dist/production/src/slate-reexport.cjs.map +1 -0
- package/dist/production/src/slate-reexport.js +8 -0
- package/dist/production/src/slate-reexport.js.map +1 -0
- package/dist/types/components/RichTextEditor.d.ts +13 -0
- package/dist/types/components/RichTextEditor.d.ts.map +1 -0
- package/dist/types/components/index.d.ts +3 -0
- package/dist/types/components/index.d.ts.map +1 -0
- package/dist/types/components/triggers/EditorElementTrigger.d.ts +8 -0
- package/dist/types/components/triggers/EditorElementTrigger.d.ts.map +1 -0
- package/dist/types/components/triggers/EditorGenericTrigger.d.ts +16 -0
- package/dist/types/components/triggers/EditorGenericTrigger.d.ts.map +1 -0
- package/dist/types/components/triggers/EditorMarkTrigger.d.ts +7 -0
- package/dist/types/components/triggers/EditorMarkTrigger.d.ts.map +1 -0
- package/dist/types/components/triggers/EditorWrapNodeTrigger.d.ts +11 -0
- package/dist/types/components/triggers/EditorWrapNodeTrigger.d.ts.map +1 -0
- package/dist/types/components/triggers/index.d.ts +5 -0
- package/dist/types/components/triggers/index.d.ts.map +1 -0
- package/dist/types/editor/createEditor.d.ts +24 -0
- package/dist/types/editor/createEditor.d.ts.map +1 -0
- package/dist/types/editor/createEditorWithEssentials.d.ts +5 -0
- package/dist/types/editor/createEditorWithEssentials.d.ts.map +1 -0
- package/dist/types/editor/index.d.ts +35 -0
- package/dist/types/editor/index.d.ts.map +1 -0
- package/dist/types/editor/methods/addMarks.d.ts +4 -0
- package/dist/types/editor/methods/addMarks.d.ts.map +1 -0
- package/dist/types/editor/methods/canToggleMark.d.ts +3 -0
- package/dist/types/editor/methods/canToggleMark.d.ts.map +1 -0
- package/dist/types/editor/methods/closest.d.ts +6 -0
- package/dist/types/editor/methods/closest.d.ts.map +1 -0
- package/dist/types/editor/methods/closestBlockEntry.d.ts +6 -0
- package/dist/types/editor/methods/closestBlockEntry.d.ts.map +1 -0
- package/dist/types/editor/methods/closestViableBlockContainerEntry.d.ts +6 -0
- package/dist/types/editor/methods/closestViableBlockContainerEntry.d.ts.map +1 -0
- package/dist/types/editor/methods/ejectElement.d.ts +3 -0
- package/dist/types/editor/methods/ejectElement.d.ts.map +1 -0
- package/dist/types/editor/methods/elementToSpecifics.d.ts +3 -0
- package/dist/types/editor/methods/elementToSpecifics.d.ts.map +1 -0
- package/dist/types/editor/methods/getElementDataAttributes.d.ts +7 -0
- package/dist/types/editor/methods/getElementDataAttributes.d.ts.map +1 -0
- package/dist/types/editor/methods/getPreviousSibling.d.ts +3 -0
- package/dist/types/editor/methods/getPreviousSibling.d.ts.map +1 -0
- package/dist/types/editor/methods/hasMarks.d.ts +7 -0
- package/dist/types/editor/methods/hasMarks.d.ts.map +1 -0
- package/dist/types/editor/methods/hasParentOfType.d.ts +3 -0
- package/dist/types/editor/methods/hasParentOfType.d.ts.map +1 -0
- package/dist/types/editor/methods/index.d.ts +20 -0
- package/dist/types/editor/methods/index.d.ts.map +1 -0
- package/dist/types/editor/methods/isElementType.d.ts +3 -0
- package/dist/types/editor/methods/isElementType.d.ts.map +1 -0
- package/dist/types/editor/methods/permissivelyDeserializeNodes.d.ts +3 -0
- package/dist/types/editor/methods/permissivelyDeserializeNodes.d.ts.map +1 -0
- package/dist/types/editor/methods/removeMarks.d.ts +4 -0
- package/dist/types/editor/methods/removeMarks.d.ts.map +1 -0
- package/dist/types/editor/methods/serializeNodes.d.ts +3 -0
- package/dist/types/editor/methods/serializeNodes.d.ts.map +1 -0
- package/dist/types/editor/methods/strictlyDeserializeNodes.d.ts +3 -0
- package/dist/types/editor/methods/strictlyDeserializeNodes.d.ts.map +1 -0
- package/dist/types/editor/methods/textToSpecifics.d.ts +4 -0
- package/dist/types/editor/methods/textToSpecifics.d.ts.map +1 -0
- package/dist/types/editor/methods/toLatestFormat.d.ts +4 -0
- package/dist/types/editor/methods/toLatestFormat.d.ts.map +1 -0
- package/dist/types/editor/methods/topLevelNodes.d.ts +3 -0
- package/dist/types/editor/methods/topLevelNodes.d.ts.map +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/internal/components/DefaultElement.d.ts +6 -0
- package/dist/types/internal/components/DefaultElement.d.ts.map +1 -0
- package/dist/types/internal/hooks/useRichTextFieldNodes.d.ts +9 -0
- package/dist/types/internal/hooks/useRichTextFieldNodes.d.ts.map +1 -0
- package/dist/types/internal/utils/EditorPasteUtils.d.ts +7 -0
- package/dist/types/internal/utils/EditorPasteUtils.d.ts.map +1 -0
- package/dist/types/internal/utils/index.d.ts +3 -0
- package/dist/types/internal/utils/index.d.ts.map +1 -0
- package/dist/types/internal/utils/parseIframeSrc.d.ts +2 -0
- package/dist/types/internal/utils/parseIframeSrc.d.ts.map +1 -0
- package/dist/types/internal/utils/parseUrl.d.ts +2 -0
- package/dist/types/internal/utils/parseUrl.d.ts.map +1 -0
- package/dist/types/plugins/attributes/alignment/alignButton.d.ts +14 -0
- package/dist/types/plugins/attributes/alignment/alignButton.d.ts.map +1 -0
- package/dist/types/plugins/attributes/alignment/index.d.ts +2 -0
- package/dist/types/plugins/attributes/alignment/index.d.ts.map +1 -0
- package/dist/types/plugins/attributes/index.d.ts +2 -0
- package/dist/types/plugins/attributes/index.d.ts.map +1 -0
- package/dist/types/plugins/behaviour/index.d.ts +2 -0
- package/dist/types/plugins/behaviour/index.d.ts.map +1 -0
- package/dist/types/plugins/behaviour/paste/HtmlDeserializer.d.ts +34 -0
- package/dist/types/plugins/behaviour/paste/HtmlDeserializer.d.ts.map +1 -0
- package/dist/types/plugins/behaviour/paste/createMarkHtmlDeserializer.d.ts +3 -0
- package/dist/types/plugins/behaviour/paste/createMarkHtmlDeserializer.d.ts.map +1 -0
- package/dist/types/plugins/behaviour/paste/index.d.ts +3 -0
- package/dist/types/plugins/behaviour/paste/index.d.ts.map +1 -0
- package/dist/types/plugins/behaviour/paste/withPaste.d.ts +3 -0
- package/dist/types/plugins/behaviour/paste/withPaste.d.ts.map +1 -0
- package/dist/types/plugins/element/anchors/AnchorElement.d.ts +14 -0
- package/dist/types/plugins/element/anchors/AnchorElement.d.ts.map +1 -0
- package/dist/types/plugins/element/anchors/AnchorHtmlDeserializer.d.ts +3 -0
- package/dist/types/plugins/element/anchors/AnchorHtmlDeserializer.d.ts.map +1 -0
- package/dist/types/plugins/element/anchors/AnchorModifications.d.ts +6 -0
- package/dist/types/plugins/element/anchors/AnchorModifications.d.ts.map +1 -0
- package/dist/types/plugins/element/anchors/index.d.ts +4 -0
- package/dist/types/plugins/element/anchors/index.d.ts.map +1 -0
- package/dist/types/plugins/element/anchors/withAnchors.d.ts +7 -0
- package/dist/types/plugins/element/anchors/withAnchors.d.ts.map +1 -0
- package/dist/types/plugins/element/headings/HeadingElement.d.ts +17 -0
- package/dist/types/plugins/element/headings/HeadingElement.d.ts.map +1 -0
- package/dist/types/plugins/element/headings/HeadingHtmlDeserializer.d.ts +3 -0
- package/dist/types/plugins/element/headings/HeadingHtmlDeserializer.d.ts.map +1 -0
- package/dist/types/plugins/element/headings/index.d.ts +4 -0
- package/dist/types/plugins/element/headings/index.d.ts.map +1 -0
- package/dist/types/plugins/element/headings/withHeadings.d.ts +7 -0
- package/dist/types/plugins/element/headings/withHeadings.d.ts.map +1 -0
- package/dist/types/plugins/element/horizonalRules/HorizontalRuleElement.d.ts +13 -0
- package/dist/types/plugins/element/horizonalRules/HorizontalRuleElement.d.ts.map +1 -0
- package/dist/types/plugins/element/horizonalRules/index.d.ts +3 -0
- package/dist/types/plugins/element/horizonalRules/index.d.ts.map +1 -0
- package/dist/types/plugins/element/horizonalRules/withHorizontalRules.d.ts +7 -0
- package/dist/types/plugins/element/horizonalRules/withHorizontalRules.d.ts.map +1 -0
- package/dist/types/plugins/element/index.d.ts +8 -0
- package/dist/types/plugins/element/index.d.ts.map +1 -0
- package/dist/types/plugins/element/lists/ListElement.d.ts +6 -0
- package/dist/types/plugins/element/lists/ListElement.d.ts.map +1 -0
- package/dist/types/plugins/element/lists/ListHtmlDeserializer.d.ts +10 -0
- package/dist/types/plugins/element/lists/ListHtmlDeserializer.d.ts.map +1 -0
- package/dist/types/plugins/element/lists/ListItemElement.d.ts +12 -0
- package/dist/types/plugins/element/lists/ListItemElement.d.ts.map +1 -0
- package/dist/types/plugins/element/lists/OrderedListElement.d.ts +12 -0
- package/dist/types/plugins/element/lists/OrderedListElement.d.ts.map +1 -0
- package/dist/types/plugins/element/lists/UnorderedListElement.d.ts +12 -0
- package/dist/types/plugins/element/lists/UnorderedListElement.d.ts.map +1 -0
- package/dist/types/plugins/element/lists/index.d.ts +6 -0
- package/dist/types/plugins/element/lists/index.d.ts.map +1 -0
- package/dist/types/plugins/element/lists/transforms/dedentListItem.d.ts +4 -0
- package/dist/types/plugins/element/lists/transforms/dedentListItem.d.ts.map +1 -0
- package/dist/types/plugins/element/lists/transforms/indentListItem.d.ts +4 -0
- package/dist/types/plugins/element/lists/transforms/indentListItem.d.ts.map +1 -0
- package/dist/types/plugins/element/lists/transforms/index.d.ts +5 -0
- package/dist/types/plugins/element/lists/transforms/index.d.ts.map +1 -0
- package/dist/types/plugins/element/lists/transforms/normalizeListElement.d.ts +7 -0
- package/dist/types/plugins/element/lists/transforms/normalizeListElement.d.ts.map +1 -0
- package/dist/types/plugins/element/lists/transforms/toggleListElement.d.ts +5 -0
- package/dist/types/plugins/element/lists/transforms/toggleListElement.d.ts.map +1 -0
- package/dist/types/plugins/element/lists/withLists.d.ts +11 -0
- package/dist/types/plugins/element/lists/withLists.d.ts.map +1 -0
- package/dist/types/plugins/element/paragraphs/ParagraphElement.d.ts +15 -0
- package/dist/types/plugins/element/paragraphs/ParagraphElement.d.ts.map +1 -0
- package/dist/types/plugins/element/paragraphs/ParagraphHtmlDeserializer.d.ts +3 -0
- package/dist/types/plugins/element/paragraphs/ParagraphHtmlDeserializer.d.ts.map +1 -0
- package/dist/types/plugins/element/paragraphs/index.d.ts +4 -0
- package/dist/types/plugins/element/paragraphs/index.d.ts.map +1 -0
- package/dist/types/plugins/element/paragraphs/withParagraphs.d.ts +7 -0
- package/dist/types/plugins/element/paragraphs/withParagraphs.d.ts.map +1 -0
- package/dist/types/plugins/element/scrollTargets/ScrollTargetElement.d.ts +14 -0
- package/dist/types/plugins/element/scrollTargets/ScrollTargetElement.d.ts.map +1 -0
- package/dist/types/plugins/element/scrollTargets/index.d.ts +3 -0
- package/dist/types/plugins/element/scrollTargets/index.d.ts.map +1 -0
- package/dist/types/plugins/element/scrollTargets/withScrollTargets.d.ts +7 -0
- package/dist/types/plugins/element/scrollTargets/withScrollTargets.d.ts.map +1 -0
- package/dist/types/plugins/element/tables/TableCellElement.d.ts +20 -0
- package/dist/types/plugins/element/tables/TableCellElement.d.ts.map +1 -0
- package/dist/types/plugins/element/tables/TableElement.d.ts +26 -0
- package/dist/types/plugins/element/tables/TableElement.d.ts.map +1 -0
- package/dist/types/plugins/element/tables/TableElementSelection.d.ts +6 -0
- package/dist/types/plugins/element/tables/TableElementSelection.d.ts.map +1 -0
- package/dist/types/plugins/element/tables/TableHtmlDeserializer.d.ts +3 -0
- package/dist/types/plugins/element/tables/TableHtmlDeserializer.d.ts.map +1 -0
- package/dist/types/plugins/element/tables/TableModifications.d.ts +14 -0
- package/dist/types/plugins/element/tables/TableModifications.d.ts.map +1 -0
- package/dist/types/plugins/element/tables/TableRowElement.d.ts +22 -0
- package/dist/types/plugins/element/tables/TableRowElement.d.ts.map +1 -0
- package/dist/types/plugins/element/tables/gaugeTableColumnCount.d.ts +3 -0
- package/dist/types/plugins/element/tables/gaugeTableColumnCount.d.ts.map +1 -0
- package/dist/types/plugins/element/tables/index.d.ts +6 -0
- package/dist/types/plugins/element/tables/index.d.ts.map +1 -0
- package/dist/types/plugins/element/tables/withTables.d.ts +11 -0
- package/dist/types/plugins/element/tables/withTables.d.ts.map +1 -0
- package/dist/types/plugins/index.d.ts +5 -0
- package/dist/types/plugins/index.d.ts.map +1 -0
- package/dist/types/plugins/text/bold/boldMark.d.ts +4 -0
- package/dist/types/plugins/text/bold/boldMark.d.ts.map +1 -0
- package/dist/types/plugins/text/bold/index.d.ts +3 -0
- package/dist/types/plugins/text/bold/index.d.ts.map +1 -0
- package/dist/types/plugins/text/bold/withBold.d.ts +3 -0
- package/dist/types/plugins/text/bold/withBold.d.ts.map +1 -0
- package/dist/types/plugins/text/code/codeMark.d.ts +4 -0
- package/dist/types/plugins/text/code/codeMark.d.ts.map +1 -0
- package/dist/types/plugins/text/code/index.d.ts +3 -0
- package/dist/types/plugins/text/code/index.d.ts.map +1 -0
- package/dist/types/plugins/text/code/withCode.d.ts +3 -0
- package/dist/types/plugins/text/code/withCode.d.ts.map +1 -0
- package/dist/types/plugins/text/highlight/highlightMark.d.ts +4 -0
- package/dist/types/plugins/text/highlight/highlightMark.d.ts.map +1 -0
- package/dist/types/plugins/text/highlight/index.d.ts +3 -0
- package/dist/types/plugins/text/highlight/index.d.ts.map +1 -0
- package/dist/types/plugins/text/highlight/withHighlight.d.ts +3 -0
- package/dist/types/plugins/text/highlight/withHighlight.d.ts.map +1 -0
- package/dist/types/plugins/text/index.d.ts +8 -0
- package/dist/types/plugins/text/index.d.ts.map +1 -0
- package/dist/types/plugins/text/italic/index.d.ts +3 -0
- package/dist/types/plugins/text/italic/index.d.ts.map +1 -0
- package/dist/types/plugins/text/italic/italicMark.d.ts +4 -0
- package/dist/types/plugins/text/italic/italicMark.d.ts.map +1 -0
- package/dist/types/plugins/text/italic/withItalic.d.ts +3 -0
- package/dist/types/plugins/text/italic/withItalic.d.ts.map +1 -0
- package/dist/types/plugins/text/newline/index.d.ts +2 -0
- package/dist/types/plugins/text/newline/index.d.ts.map +1 -0
- package/dist/types/plugins/text/newline/withNewline.d.ts +3 -0
- package/dist/types/plugins/text/newline/withNewline.d.ts.map +1 -0
- package/dist/types/plugins/text/strikeThrough/index.d.ts +3 -0
- package/dist/types/plugins/text/strikeThrough/index.d.ts.map +1 -0
- package/dist/types/plugins/text/strikeThrough/strikeThroughMark.d.ts +4 -0
- package/dist/types/plugins/text/strikeThrough/strikeThroughMark.d.ts.map +1 -0
- package/dist/types/plugins/text/strikeThrough/withStrikeThrough.d.ts +3 -0
- package/dist/types/plugins/text/strikeThrough/withStrikeThrough.d.ts.map +1 -0
- package/dist/types/plugins/text/underline/index.d.ts +3 -0
- package/dist/types/plugins/text/underline/index.d.ts.map +1 -0
- package/dist/types/plugins/text/underline/underlineMark.d.ts +4 -0
- package/dist/types/plugins/text/underline/underlineMark.d.ts.map +1 -0
- package/dist/types/plugins/text/underline/withUnderline.d.ts +3 -0
- package/dist/types/plugins/text/underline/withUnderline.d.ts.map +1 -0
- package/dist/types/slate-reexport.d.ts +3 -0
- package/dist/types/slate-reexport.d.ts.map +1 -0
- package/dist/types/slate-types.d.ts +31 -0
- package/dist/types/slate-types.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/dist/types/types/editor.d.ts +43 -0
- package/dist/types/types/editor.d.ts.map +1 -0
- package/dist/types/types/htmlDeserializer.d.ts +38 -0
- package/dist/types/types/htmlDeserializer.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +4 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/dist/types/types/plugins.d.ts +58 -0
- package/dist/types/types/plugins.d.ts.map +1 -0
- package/package.json +14 -14
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Transforms } from "slate";
|
|
2
|
+
import { HtmlDeserializer } from "./HtmlDeserializer.js";
|
|
3
|
+
const withPaste = (editor) => {
|
|
4
|
+
const { insertData } = editor;
|
|
5
|
+
const htmlDeserializer = new HtmlDeserializer(editor.createDefaultElement, []);
|
|
6
|
+
editor.insertData = (data) => {
|
|
7
|
+
if (data.getData("application/x-slate-fragment")) {
|
|
8
|
+
return insertData(data);
|
|
9
|
+
}
|
|
10
|
+
const html = data.getData("text/html");
|
|
11
|
+
if (!html) {
|
|
12
|
+
return insertData(data);
|
|
13
|
+
}
|
|
14
|
+
const document = new DOMParser().parseFromString(html, "text/html");
|
|
15
|
+
const nodes = Array.from(document.body.childNodes);
|
|
16
|
+
const result = htmlDeserializer.deserializeBlocks(nodes, {});
|
|
17
|
+
Transforms.insertFragment(editor, result);
|
|
18
|
+
};
|
|
19
|
+
editor.htmlDeserializer = htmlDeserializer;
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
withPaste
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=withPaste.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withPaste.js","sources":["../../../../../../../packages/react-slate-editor-base/src/plugins/behaviour/paste/withPaste.ts"],"sourcesContent":["import { Editor, Transforms } from 'slate'\nimport { EditorPlugin } from '../../../types/plugins'\nimport { HtmlDeserializer } from './HtmlDeserializer'\nimport { HtmlDeserializerPlugin } from '../../../types/htmlDeserializer'\n\nexport const withPaste = (editor: Editor) => {\n\tconst { insertData } = editor\n\tconst htmlDeserializer = new HtmlDeserializer(editor.createDefaultElement, [])\n\teditor.insertData = data => {\n\t\tif (data.getData('application/x-slate-fragment')) {\n\t\t\treturn insertData(data)\n\t\t}\n\t\tconst html = data.getData('text/html')\n\t\tif (!html) {\n\t\t\treturn insertData(data)\n\t\t}\n\t\tconst document = new DOMParser().parseFromString(html, 'text/html')\n\t\tconst nodes = Array.from(document.body.childNodes)\n\t\tconst result = htmlDeserializer.deserializeBlocks(nodes, {})\n\t\tTransforms.insertFragment(editor, result)\n\t}\n\teditor.htmlDeserializer = htmlDeserializer\n}\n"],"names":[],"mappings":";;AAKO,MAAM,YAAY,CAAC,WAAmB;AAC5C,QAAM,EAAE,eAAe;AACvB,QAAM,mBAAmB,IAAI,iBAAiB,OAAO,sBAAsB,CAAA,CAAE;AAC7E,SAAO,aAAa,CAAA,SAAQ;AAC3B,QAAI,KAAK,QAAQ,8BAA8B,GAAG;AACjD,aAAO,WAAW,IAAI;AAAA,IACvB;AACA,UAAM,OAAO,KAAK,QAAQ,WAAW;AACrC,QAAI,CAAC,MAAM;AACV,aAAO,WAAW,IAAI;AAAA,IACvB;AACA,UAAM,WAAW,IAAI,UAAA,EAAY,gBAAgB,MAAM,WAAW;AAClE,UAAM,QAAQ,MAAM,KAAK,SAAS,KAAK,UAAU;AACjD,UAAM,SAAS,iBAAiB,kBAAkB,OAAO,CAAA,CAAE;AAC3D,eAAW,eAAe,QAAQ,MAAM;AAAA,EACzC;AACA,SAAO,mBAAmB;AAC3B;"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const Slate = require("slate");
|
|
4
|
+
const AnchorModifications = require("./AnchorModifications.cjs");
|
|
5
|
+
const anchorElementType = "anchor";
|
|
6
|
+
const isAnchorElement = (element) => Slate.Element.isElement(element) && element.type === anchorElementType;
|
|
7
|
+
const isAnchorElementActive = (editor) => {
|
|
8
|
+
const [link] = Slate.Editor.nodes(editor, { match: isAnchorElement });
|
|
9
|
+
return !!link;
|
|
10
|
+
};
|
|
11
|
+
const anchorElementPlugin = ({ render }) => ({
|
|
12
|
+
type: anchorElementType,
|
|
13
|
+
isInline: true,
|
|
14
|
+
render,
|
|
15
|
+
isActive: ({ editor }) => isAnchorElementActive(editor),
|
|
16
|
+
toggleElement: ({ editor, suchThat }) => {
|
|
17
|
+
if (isAnchorElementActive(editor)) {
|
|
18
|
+
AnchorModifications.AnchorModifications.unwrapAnchor(editor);
|
|
19
|
+
} else {
|
|
20
|
+
const href = suchThat?.href ?? prompt("Insert the URL:");
|
|
21
|
+
if (!href) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
AnchorModifications.AnchorModifications.wrapAnchor(editor, href);
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
normalizeNode: ({ element, path, editor, preventDefault }) => {
|
|
28
|
+
if (Slate.Node.string(element) === "") {
|
|
29
|
+
const selection = editor.selection;
|
|
30
|
+
Slate.Transforms.removeNodes(editor, {
|
|
31
|
+
at: path
|
|
32
|
+
});
|
|
33
|
+
if (selection && Slate.Range.isCollapsed(selection) && Slate.Path.isCommon(path, selection.focus.path)) {
|
|
34
|
+
Slate.Transforms.select(editor, Slate.Path.parent(path));
|
|
35
|
+
}
|
|
36
|
+
return preventDefault();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
exports.anchorElementPlugin = anchorElementPlugin;
|
|
41
|
+
exports.anchorElementType = anchorElementType;
|
|
42
|
+
exports.isAnchorElement = isAnchorElement;
|
|
43
|
+
exports.isAnchorElementActive = isAnchorElementActive;
|
|
44
|
+
//# sourceMappingURL=AnchorElement.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnchorElement.cjs","sources":["../../../../../../../packages/react-slate-editor-base/src/plugins/element/anchors/AnchorElement.ts"],"sourcesContent":["import { Editor, Editor as SlateEditor, Element as SlateElement, Node as SlateNode, Path, Range as SlateRange, Transforms } from 'slate'\nimport { AnchorModifications } from './AnchorModifications'\nimport { EditorElementPlugin, ElementRenderer } from '../../../types'\n\nexport const anchorElementType = 'anchor' as const\n\nexport interface AnchorElement extends SlateElement {\n\ttype: typeof anchorElementType\n\thref: string\n\tchildren: SlateEditor['children']\n}\n\nexport const isAnchorElement = (element: SlateNode): element is AnchorElement => SlateElement.isElement(element) && element.type === anchorElementType\n\nexport const isAnchorElementActive = (editor: Editor) => {\n\tconst [link] = Editor.nodes(editor, { match: isAnchorElement })\n\treturn !!link\n}\n\nexport const anchorElementPlugin = ({ render }: { render: ElementRenderer<AnchorElement> }): EditorElementPlugin<AnchorElement> => ({\n\ttype: anchorElementType,\n\tisInline: true,\n\trender,\n\tisActive: ({ editor }) => isAnchorElementActive(editor),\n\ttoggleElement: ({ editor, suchThat }) => {\n\t\tif (isAnchorElementActive(editor)) {\n\t\t\tAnchorModifications.unwrapAnchor(editor)\n\t\t} else {\n\t\t\tconst href = suchThat?.href ?? prompt('Insert the URL:')\n\t\t\tif (!href) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tAnchorModifications.wrapAnchor(editor, href)\n\t\t}\n\t},\n\tnormalizeNode: ({ element, path, editor, preventDefault }) => {\n\t\tif (SlateNode.string(element) === '') {\n\t\t\tconst selection = editor.selection\n\t\t\tTransforms.removeNodes(editor, {\n\t\t\t\tat: path,\n\t\t\t})\n\t\t\tif (selection && SlateRange.isCollapsed(selection) && Path.isCommon(path, selection.focus.path)) {\n\t\t\t\tTransforms.select(editor, Path.parent(path))\n\t\t\t}\n\t\t\treturn preventDefault()\n\t\t}\n\t},\n})\n"],"names":["SlateElement","Editor","AnchorModifications","SlateNode","Transforms","SlateRange","Path"],"mappings":";;;;AAIO,MAAM,oBAAoB;AAQ1B,MAAM,kBAAkB,CAAC,YAAiDA,MAAAA,QAAa,UAAU,OAAO,KAAK,QAAQ,SAAS;AAE9H,MAAM,wBAAwB,CAAC,WAAmB;AACxD,QAAM,CAAC,IAAI,IAAIC,aAAO,MAAM,QAAQ,EAAE,OAAO,iBAAiB;AAC9D,SAAO,CAAC,CAAC;AACV;AAEO,MAAM,sBAAsB,CAAC,EAAE,cAA8F;AAAA,EACnI,MAAM;AAAA,EACN,UAAU;AAAA,EACV;AAAA,EACA,UAAU,CAAC,EAAE,aAAa,sBAAsB,MAAM;AAAA,EACtD,eAAe,CAAC,EAAE,QAAQ,eAAe;AACxC,QAAI,sBAAsB,MAAM,GAAG;AAClCC,0BAAAA,oBAAoB,aAAa,MAAM;AAAA,IACxC,OAAO;AACN,YAAM,OAAO,UAAU,QAAQ,OAAO,iBAAiB;AACvD,UAAI,CAAC,MAAM;AACV;AAAA,MACD;AACAA,8CAAoB,WAAW,QAAQ,IAAI;AAAA,IAC5C;AAAA,EACD;AAAA,EACA,eAAe,CAAC,EAAE,SAAS,MAAM,QAAQ,qBAAqB;AAC7D,QAAIC,WAAU,OAAO,OAAO,MAAM,IAAI;AACrC,YAAM,YAAY,OAAO;AACzBC,YAAAA,WAAW,YAAY,QAAQ;AAAA,QAC9B,IAAI;AAAA,MAAA,CACJ;AACD,UAAI,aAAaC,MAAAA,MAAW,YAAY,SAAS,KAAKC,MAAAA,KAAK,SAAS,MAAM,UAAU,MAAM,IAAI,GAAG;AAChGF,cAAAA,WAAW,OAAO,QAAQE,MAAAA,KAAK,OAAO,IAAI,CAAC;AAAA,MAC5C;AACA,aAAO,eAAA;AAAA,IACR;AAAA,EACD;AACD;;;;;"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Node, Transforms, Range, Path, Element, Editor } from "slate";
|
|
2
|
+
import { AnchorModifications } from "./AnchorModifications.js";
|
|
3
|
+
const anchorElementType = "anchor";
|
|
4
|
+
const isAnchorElement = (element) => Element.isElement(element) && element.type === anchorElementType;
|
|
5
|
+
const isAnchorElementActive = (editor) => {
|
|
6
|
+
const [link] = Editor.nodes(editor, { match: isAnchorElement });
|
|
7
|
+
return !!link;
|
|
8
|
+
};
|
|
9
|
+
const anchorElementPlugin = ({ render }) => ({
|
|
10
|
+
type: anchorElementType,
|
|
11
|
+
isInline: true,
|
|
12
|
+
render,
|
|
13
|
+
isActive: ({ editor }) => isAnchorElementActive(editor),
|
|
14
|
+
toggleElement: ({ editor, suchThat }) => {
|
|
15
|
+
if (isAnchorElementActive(editor)) {
|
|
16
|
+
AnchorModifications.unwrapAnchor(editor);
|
|
17
|
+
} else {
|
|
18
|
+
const href = suchThat?.href ?? prompt("Insert the URL:");
|
|
19
|
+
if (!href) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
AnchorModifications.wrapAnchor(editor, href);
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
normalizeNode: ({ element, path, editor, preventDefault }) => {
|
|
26
|
+
if (Node.string(element) === "") {
|
|
27
|
+
const selection = editor.selection;
|
|
28
|
+
Transforms.removeNodes(editor, {
|
|
29
|
+
at: path
|
|
30
|
+
});
|
|
31
|
+
if (selection && Range.isCollapsed(selection) && Path.isCommon(path, selection.focus.path)) {
|
|
32
|
+
Transforms.select(editor, Path.parent(path));
|
|
33
|
+
}
|
|
34
|
+
return preventDefault();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
export {
|
|
39
|
+
anchorElementPlugin,
|
|
40
|
+
anchorElementType,
|
|
41
|
+
isAnchorElement,
|
|
42
|
+
isAnchorElementActive
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=AnchorElement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnchorElement.js","sources":["../../../../../../../packages/react-slate-editor-base/src/plugins/element/anchors/AnchorElement.ts"],"sourcesContent":["import { Editor, Editor as SlateEditor, Element as SlateElement, Node as SlateNode, Path, Range as SlateRange, Transforms } from 'slate'\nimport { AnchorModifications } from './AnchorModifications'\nimport { EditorElementPlugin, ElementRenderer } from '../../../types'\n\nexport const anchorElementType = 'anchor' as const\n\nexport interface AnchorElement extends SlateElement {\n\ttype: typeof anchorElementType\n\thref: string\n\tchildren: SlateEditor['children']\n}\n\nexport const isAnchorElement = (element: SlateNode): element is AnchorElement => SlateElement.isElement(element) && element.type === anchorElementType\n\nexport const isAnchorElementActive = (editor: Editor) => {\n\tconst [link] = Editor.nodes(editor, { match: isAnchorElement })\n\treturn !!link\n}\n\nexport const anchorElementPlugin = ({ render }: { render: ElementRenderer<AnchorElement> }): EditorElementPlugin<AnchorElement> => ({\n\ttype: anchorElementType,\n\tisInline: true,\n\trender,\n\tisActive: ({ editor }) => isAnchorElementActive(editor),\n\ttoggleElement: ({ editor, suchThat }) => {\n\t\tif (isAnchorElementActive(editor)) {\n\t\t\tAnchorModifications.unwrapAnchor(editor)\n\t\t} else {\n\t\t\tconst href = suchThat?.href ?? prompt('Insert the URL:')\n\t\t\tif (!href) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tAnchorModifications.wrapAnchor(editor, href)\n\t\t}\n\t},\n\tnormalizeNode: ({ element, path, editor, preventDefault }) => {\n\t\tif (SlateNode.string(element) === '') {\n\t\t\tconst selection = editor.selection\n\t\t\tTransforms.removeNodes(editor, {\n\t\t\t\tat: path,\n\t\t\t})\n\t\t\tif (selection && SlateRange.isCollapsed(selection) && Path.isCommon(path, selection.focus.path)) {\n\t\t\t\tTransforms.select(editor, Path.parent(path))\n\t\t\t}\n\t\t\treturn preventDefault()\n\t\t}\n\t},\n})\n"],"names":["SlateElement","SlateNode","SlateRange"],"mappings":";;AAIO,MAAM,oBAAoB;AAQ1B,MAAM,kBAAkB,CAAC,YAAiDA,QAAa,UAAU,OAAO,KAAK,QAAQ,SAAS;AAE9H,MAAM,wBAAwB,CAAC,WAAmB;AACxD,QAAM,CAAC,IAAI,IAAI,OAAO,MAAM,QAAQ,EAAE,OAAO,iBAAiB;AAC9D,SAAO,CAAC,CAAC;AACV;AAEO,MAAM,sBAAsB,CAAC,EAAE,cAA8F;AAAA,EACnI,MAAM;AAAA,EACN,UAAU;AAAA,EACV;AAAA,EACA,UAAU,CAAC,EAAE,aAAa,sBAAsB,MAAM;AAAA,EACtD,eAAe,CAAC,EAAE,QAAQ,eAAe;AACxC,QAAI,sBAAsB,MAAM,GAAG;AAClC,0BAAoB,aAAa,MAAM;AAAA,IACxC,OAAO;AACN,YAAM,OAAO,UAAU,QAAQ,OAAO,iBAAiB;AACvD,UAAI,CAAC,MAAM;AACV;AAAA,MACD;AACA,0BAAoB,WAAW,QAAQ,IAAI;AAAA,IAC5C;AAAA,EACD;AAAA,EACA,eAAe,CAAC,EAAE,SAAS,MAAM,QAAQ,qBAAqB;AAC7D,QAAIC,KAAU,OAAO,OAAO,MAAM,IAAI;AACrC,YAAM,YAAY,OAAO;AACzB,iBAAW,YAAY,QAAQ;AAAA,QAC9B,IAAI;AAAA,MAAA,CACJ;AACD,UAAI,aAAaC,MAAW,YAAY,SAAS,KAAK,KAAK,SAAS,MAAM,UAAU,MAAM,IAAI,GAAG;AAChG,mBAAW,OAAO,QAAQ,KAAK,OAAO,IAAI,CAAC;AAAA,MAC5C;AACA,aAAO,eAAA;AAAA,IACR;AAAA,EACD;AACD;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const anchorHtmlDeserializer = {
|
|
4
|
+
processInlinePaste: ({ element, next, cumulativeTextAttrs }) => {
|
|
5
|
+
if (element.tagName === "A" && element.getAttribute("href")) {
|
|
6
|
+
const href = element.getAttribute("href");
|
|
7
|
+
return [
|
|
8
|
+
{
|
|
9
|
+
type: "anchor",
|
|
10
|
+
href,
|
|
11
|
+
children: next(element.childNodes, cumulativeTextAttrs)
|
|
12
|
+
}
|
|
13
|
+
];
|
|
14
|
+
}
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
exports.anchorHtmlDeserializer = anchorHtmlDeserializer;
|
|
19
|
+
//# sourceMappingURL=AnchorHtmlDeserializer.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnchorHtmlDeserializer.cjs","sources":["../../../../../../../packages/react-slate-editor-base/src/plugins/element/anchors/AnchorHtmlDeserializer.ts"],"sourcesContent":["import { HtmlDeserializerPlugin } from '../../../types'\n\nexport const anchorHtmlDeserializer: HtmlDeserializerPlugin = {\n\tprocessInlinePaste: ({ element, next, cumulativeTextAttrs }) => {\n\t\tif (element.tagName === 'A' && element.getAttribute('href')) {\n\t\t\tconst href = element.getAttribute('href')\n\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\ttype: 'anchor',\n\t\t\t\t\thref,\n\t\t\t\t\tchildren: next(element.childNodes, cumulativeTextAttrs),\n\t\t\t\t},\n\t\t\t]\n\t\t}\n\t\treturn null\n\t},\n}\n"],"names":[],"mappings":";;AAEO,MAAM,yBAAiD;AAAA,EAC7D,oBAAoB,CAAC,EAAE,SAAS,MAAM,0BAA0B;AAC/D,QAAI,QAAQ,YAAY,OAAO,QAAQ,aAAa,MAAM,GAAG;AAC5D,YAAM,OAAO,QAAQ,aAAa,MAAM;AAExC,aAAO;AAAA,QACN;AAAA,UACC,MAAM;AAAA,UACN;AAAA,UACA,UAAU,KAAK,QAAQ,YAAY,mBAAmB;AAAA,QAAA;AAAA,MACvD;AAAA,IAEF;AACA,WAAO;AAAA,EACR;AACD;;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const anchorHtmlDeserializer = {
|
|
2
|
+
processInlinePaste: ({ element, next, cumulativeTextAttrs }) => {
|
|
3
|
+
if (element.tagName === "A" && element.getAttribute("href")) {
|
|
4
|
+
const href = element.getAttribute("href");
|
|
5
|
+
return [
|
|
6
|
+
{
|
|
7
|
+
type: "anchor",
|
|
8
|
+
href,
|
|
9
|
+
children: next(element.childNodes, cumulativeTextAttrs)
|
|
10
|
+
}
|
|
11
|
+
];
|
|
12
|
+
}
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
anchorHtmlDeserializer
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=AnchorHtmlDeserializer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnchorHtmlDeserializer.js","sources":["../../../../../../../packages/react-slate-editor-base/src/plugins/element/anchors/AnchorHtmlDeserializer.ts"],"sourcesContent":["import { HtmlDeserializerPlugin } from '../../../types'\n\nexport const anchorHtmlDeserializer: HtmlDeserializerPlugin = {\n\tprocessInlinePaste: ({ element, next, cumulativeTextAttrs }) => {\n\t\tif (element.tagName === 'A' && element.getAttribute('href')) {\n\t\t\tconst href = element.getAttribute('href')\n\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\ttype: 'anchor',\n\t\t\t\t\thref,\n\t\t\t\t\tchildren: next(element.childNodes, cumulativeTextAttrs),\n\t\t\t\t},\n\t\t\t]\n\t\t}\n\t\treturn null\n\t},\n}\n"],"names":[],"mappings":"AAEO,MAAM,yBAAiD;AAAA,EAC7D,oBAAoB,CAAC,EAAE,SAAS,MAAM,0BAA0B;AAC/D,QAAI,QAAQ,YAAY,OAAO,QAAQ,aAAa,MAAM,GAAG;AAC5D,YAAM,OAAO,QAAQ,aAAa,MAAM;AAExC,aAAO;AAAA,QACN;AAAA,UACC,MAAM;AAAA,UACN;AAAA,UACA,UAAU,KAAK,QAAQ,YAAY,mBAAmB;AAAA,QAAA;AAAA,MACvD;AAAA,IAEF;AACA,WAAO;AAAA,EACR;AACD;"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const Slate = require("slate");
|
|
4
|
+
const AnchorElement = require("./AnchorElement.cjs");
|
|
5
|
+
class AnchorModifications {
|
|
6
|
+
static unwrapAnchor(editor) {
|
|
7
|
+
Slate.Transforms.unwrapNodes(editor, { match: AnchorElement.isAnchorElement });
|
|
8
|
+
}
|
|
9
|
+
static wrapAnchor(editor, url) {
|
|
10
|
+
if (AnchorElement.isAnchorElementActive(editor)) {
|
|
11
|
+
AnchorModifications.unwrapAnchor(editor);
|
|
12
|
+
}
|
|
13
|
+
const selection = editor.selection;
|
|
14
|
+
const isCollapsed = selection ? Slate.Range.isCollapsed(selection) : false;
|
|
15
|
+
const anchor = {
|
|
16
|
+
type: "anchor",
|
|
17
|
+
href: url,
|
|
18
|
+
children: isCollapsed ? [{ text: url }] : [{ text: "" }]
|
|
19
|
+
};
|
|
20
|
+
if (isCollapsed) {
|
|
21
|
+
Slate.Transforms.insertNodes(editor, anchor);
|
|
22
|
+
} else {
|
|
23
|
+
Slate.Transforms.wrapNodes(editor, anchor, { split: true });
|
|
24
|
+
Slate.Transforms.collapse(editor, { edge: "end" });
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.AnchorModifications = AnchorModifications;
|
|
29
|
+
//# sourceMappingURL=AnchorModifications.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnchorModifications.cjs","sources":["../../../../../../../packages/react-slate-editor-base/src/plugins/element/anchors/AnchorModifications.ts"],"sourcesContent":["import { Editor, Range, Transforms } from 'slate'\nimport { AnchorElement, isAnchorElement, isAnchorElementActive } from './AnchorElement'\n\nexport class AnchorModifications {\n\tpublic static unwrapAnchor(editor: Editor) {\n\t\tTransforms.unwrapNodes(editor, { match: isAnchorElement })\n\t}\n\n\tpublic static wrapAnchor(editor: Editor, url: string) {\n\t\tif (isAnchorElementActive(editor)) {\n\t\t\tAnchorModifications.unwrapAnchor(editor)\n\t\t}\n\n\t\tconst selection = editor.selection\n\t\tconst isCollapsed = selection ? Range.isCollapsed(selection!) : false\n\t\tconst anchor: AnchorElement = {\n\t\t\ttype: 'anchor',\n\t\t\thref: url,\n\t\t\tchildren: isCollapsed ? [{ text: url }] : [{ text: '' }],\n\t\t}\n\n\t\tif (isCollapsed) {\n\t\t\tTransforms.insertNodes(editor, anchor)\n\t\t} else {\n\t\t\tTransforms.wrapNodes(editor, anchor, { split: true })\n\t\t\tTransforms.collapse(editor, { edge: 'end' })\n\t\t}\n\t}\n}\n"],"names":["Transforms","isAnchorElement","isAnchorElementActive","Range"],"mappings":";;;;AAGO,MAAM,oBAAoB;AAAA,EAChC,OAAc,aAAa,QAAgB;AAC1CA,UAAAA,WAAW,YAAY,QAAQ,EAAE,OAAOC,cAAAA,iBAAiB;AAAA,EAC1D;AAAA,EAEA,OAAc,WAAW,QAAgB,KAAa;AACrD,QAAIC,cAAAA,sBAAsB,MAAM,GAAG;AAClC,0BAAoB,aAAa,MAAM;AAAA,IACxC;AAEA,UAAM,YAAY,OAAO;AACzB,UAAM,cAAc,YAAYC,MAAAA,MAAM,YAAY,SAAU,IAAI;AAChE,UAAM,SAAwB;AAAA,MAC7B,MAAM;AAAA,MACN,MAAM;AAAA,MACN,UAAU,cAAc,CAAC,EAAE,MAAM,IAAA,CAAK,IAAI,CAAC,EAAE,MAAM,GAAA,CAAI;AAAA,IAAA;AAGxD,QAAI,aAAa;AAChBH,uBAAW,YAAY,QAAQ,MAAM;AAAA,IACtC,OAAO;AACNA,YAAAA,WAAW,UAAU,QAAQ,QAAQ,EAAE,OAAO,MAAM;AACpDA,YAAAA,WAAW,SAAS,QAAQ,EAAE,MAAM,OAAO;AAAA,IAC5C;AAAA,EACD;AACD;;"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Transforms, Range } from "slate";
|
|
2
|
+
import { isAnchorElement, isAnchorElementActive } from "./AnchorElement.js";
|
|
3
|
+
class AnchorModifications {
|
|
4
|
+
static unwrapAnchor(editor) {
|
|
5
|
+
Transforms.unwrapNodes(editor, { match: isAnchorElement });
|
|
6
|
+
}
|
|
7
|
+
static wrapAnchor(editor, url) {
|
|
8
|
+
if (isAnchorElementActive(editor)) {
|
|
9
|
+
AnchorModifications.unwrapAnchor(editor);
|
|
10
|
+
}
|
|
11
|
+
const selection = editor.selection;
|
|
12
|
+
const isCollapsed = selection ? Range.isCollapsed(selection) : false;
|
|
13
|
+
const anchor = {
|
|
14
|
+
type: "anchor",
|
|
15
|
+
href: url,
|
|
16
|
+
children: isCollapsed ? [{ text: url }] : [{ text: "" }]
|
|
17
|
+
};
|
|
18
|
+
if (isCollapsed) {
|
|
19
|
+
Transforms.insertNodes(editor, anchor);
|
|
20
|
+
} else {
|
|
21
|
+
Transforms.wrapNodes(editor, anchor, { split: true });
|
|
22
|
+
Transforms.collapse(editor, { edge: "end" });
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
AnchorModifications
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=AnchorModifications.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnchorModifications.js","sources":["../../../../../../../packages/react-slate-editor-base/src/plugins/element/anchors/AnchorModifications.ts"],"sourcesContent":["import { Editor, Range, Transforms } from 'slate'\nimport { AnchorElement, isAnchorElement, isAnchorElementActive } from './AnchorElement'\n\nexport class AnchorModifications {\n\tpublic static unwrapAnchor(editor: Editor) {\n\t\tTransforms.unwrapNodes(editor, { match: isAnchorElement })\n\t}\n\n\tpublic static wrapAnchor(editor: Editor, url: string) {\n\t\tif (isAnchorElementActive(editor)) {\n\t\t\tAnchorModifications.unwrapAnchor(editor)\n\t\t}\n\n\t\tconst selection = editor.selection\n\t\tconst isCollapsed = selection ? Range.isCollapsed(selection!) : false\n\t\tconst anchor: AnchorElement = {\n\t\t\ttype: 'anchor',\n\t\t\thref: url,\n\t\t\tchildren: isCollapsed ? [{ text: url }] : [{ text: '' }],\n\t\t}\n\n\t\tif (isCollapsed) {\n\t\t\tTransforms.insertNodes(editor, anchor)\n\t\t} else {\n\t\t\tTransforms.wrapNodes(editor, anchor, { split: true })\n\t\t\tTransforms.collapse(editor, { edge: 'end' })\n\t\t}\n\t}\n}\n"],"names":[],"mappings":";;AAGO,MAAM,oBAAoB;AAAA,EAChC,OAAc,aAAa,QAAgB;AAC1C,eAAW,YAAY,QAAQ,EAAE,OAAO,iBAAiB;AAAA,EAC1D;AAAA,EAEA,OAAc,WAAW,QAAgB,KAAa;AACrD,QAAI,sBAAsB,MAAM,GAAG;AAClC,0BAAoB,aAAa,MAAM;AAAA,IACxC;AAEA,UAAM,YAAY,OAAO;AACzB,UAAM,cAAc,YAAY,MAAM,YAAY,SAAU,IAAI;AAChE,UAAM,SAAwB;AAAA,MAC7B,MAAM;AAAA,MACN,MAAM;AAAA,MACN,UAAU,cAAc,CAAC,EAAE,MAAM,IAAA,CAAK,IAAI,CAAC,EAAE,MAAM,GAAA,CAAI;AAAA,IAAA;AAGxD,QAAI,aAAa;AAChB,iBAAW,YAAY,QAAQ,MAAM;AAAA,IACtC,OAAO;AACN,iBAAW,UAAU,QAAQ,QAAQ,EAAE,OAAO,MAAM;AACpD,iBAAW,SAAS,QAAQ,EAAE,MAAM,OAAO;AAAA,IAC5C;AAAA,EACD;AACD;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const AnchorModifications = require("./AnchorModifications.cjs");
|
|
4
|
+
const AnchorElement = require("./AnchorElement.cjs");
|
|
5
|
+
const AnchorHtmlDeserializer = require("./AnchorHtmlDeserializer.cjs");
|
|
6
|
+
const parseUrl = require("../../../internal/utils/parseUrl.cjs");
|
|
7
|
+
const withAnchors = ({ render }) => (editor) => {
|
|
8
|
+
const { insertText } = editor;
|
|
9
|
+
editor.registerElement(AnchorElement.anchorElementPlugin({ render }));
|
|
10
|
+
editor.htmlDeserializer.registerPlugin(AnchorHtmlDeserializer.anchorHtmlDeserializer);
|
|
11
|
+
editor.insertText = (text) => {
|
|
12
|
+
if (text && parseUrl.parseUrl(text) !== void 0) {
|
|
13
|
+
AnchorModifications.AnchorModifications.wrapAnchor(editor, text);
|
|
14
|
+
} else {
|
|
15
|
+
insertText(text);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
return editor;
|
|
19
|
+
};
|
|
20
|
+
exports.withAnchors = withAnchors;
|
|
21
|
+
//# sourceMappingURL=withAnchors.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withAnchors.cjs","sources":["../../../../../../../packages/react-slate-editor-base/src/plugins/element/anchors/withAnchors.ts"],"sourcesContent":["import { Editor } from 'slate'\nimport { AnchorModifications } from './AnchorModifications'\nimport { AnchorElement, anchorElementPlugin } from './AnchorElement'\nimport { anchorHtmlDeserializer } from './AnchorHtmlDeserializer'\nimport { ElementRenderer } from '../../../types'\nimport { parseUrl } from '../../../internal/utils'\n\nexport const withAnchors = ({ render }: { render: ElementRenderer<AnchorElement> }) => <E extends Editor>(editor: E): E => {\n\tconst { insertText } = editor\n\n\teditor.registerElement(anchorElementPlugin({ render }))\n\teditor.htmlDeserializer.registerPlugin(anchorHtmlDeserializer)\n\n\teditor.insertText = text => {\n\t\tif (text && parseUrl(text) !== undefined) {\n\t\t\tAnchorModifications.wrapAnchor(editor, text)\n\t\t} else {\n\t\t\tinsertText(text)\n\t\t}\n\t}\n\n\treturn editor\n}\n"],"names":["anchorElementPlugin","anchorHtmlDeserializer","parseUrl","AnchorModifications"],"mappings":";;;;;;AAOO,MAAM,cAAc,CAAC,EAAE,OAAA,MAAyD,CAAmB,WAAiB;AAC1H,QAAM,EAAE,eAAe;AAEvB,SAAO,gBAAgBA,cAAAA,oBAAoB,EAAE,OAAA,CAAQ,CAAC;AACtD,SAAO,iBAAiB,eAAeC,6CAAsB;AAE7D,SAAO,aAAa,CAAA,SAAQ;AAC3B,QAAI,QAAQC,SAAAA,SAAS,IAAI,MAAM,QAAW;AACzCC,8CAAoB,WAAW,QAAQ,IAAI;AAAA,IAC5C,OAAO;AACN,iBAAW,IAAI;AAAA,IAChB;AAAA,EACD;AAEA,SAAO;AACR;;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AnchorModifications } from "./AnchorModifications.js";
|
|
2
|
+
import { anchorElementPlugin } from "./AnchorElement.js";
|
|
3
|
+
import { anchorHtmlDeserializer } from "./AnchorHtmlDeserializer.js";
|
|
4
|
+
import { parseUrl } from "../../../internal/utils/parseUrl.js";
|
|
5
|
+
const withAnchors = ({ render }) => (editor) => {
|
|
6
|
+
const { insertText } = editor;
|
|
7
|
+
editor.registerElement(anchorElementPlugin({ render }));
|
|
8
|
+
editor.htmlDeserializer.registerPlugin(anchorHtmlDeserializer);
|
|
9
|
+
editor.insertText = (text) => {
|
|
10
|
+
if (text && parseUrl(text) !== void 0) {
|
|
11
|
+
AnchorModifications.wrapAnchor(editor, text);
|
|
12
|
+
} else {
|
|
13
|
+
insertText(text);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
return editor;
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
withAnchors
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=withAnchors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withAnchors.js","sources":["../../../../../../../packages/react-slate-editor-base/src/plugins/element/anchors/withAnchors.ts"],"sourcesContent":["import { Editor } from 'slate'\nimport { AnchorModifications } from './AnchorModifications'\nimport { AnchorElement, anchorElementPlugin } from './AnchorElement'\nimport { anchorHtmlDeserializer } from './AnchorHtmlDeserializer'\nimport { ElementRenderer } from '../../../types'\nimport { parseUrl } from '../../../internal/utils'\n\nexport const withAnchors = ({ render }: { render: ElementRenderer<AnchorElement> }) => <E extends Editor>(editor: E): E => {\n\tconst { insertText } = editor\n\n\teditor.registerElement(anchorElementPlugin({ render }))\n\teditor.htmlDeserializer.registerPlugin(anchorHtmlDeserializer)\n\n\teditor.insertText = text => {\n\t\tif (text && parseUrl(text) !== undefined) {\n\t\t\tAnchorModifications.wrapAnchor(editor, text)\n\t\t} else {\n\t\t\tinsertText(text)\n\t\t}\n\t}\n\n\treturn editor\n}\n"],"names":[],"mappings":";;;;AAOO,MAAM,cAAc,CAAC,EAAE,OAAA,MAAyD,CAAmB,WAAiB;AAC1H,QAAM,EAAE,eAAe;AAEvB,SAAO,gBAAgB,oBAAoB,EAAE,OAAA,CAAQ,CAAC;AACtD,SAAO,iBAAiB,eAAe,sBAAsB;AAE7D,SAAO,aAAa,CAAA,SAAQ;AAC3B,QAAI,QAAQ,SAAS,IAAI,MAAM,QAAW;AACzC,0BAAoB,WAAW,QAAQ,IAAI;AAAA,IAC5C,OAAO;AACN,iBAAW,IAAI;AAAA,IAChB;AAAA,EACD;AAEA,SAAO;AACR;"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const Slate = require("slate");
|
|
4
|
+
const index = require("../../../editor/index.cjs");
|
|
5
|
+
const headingElementType = "heading";
|
|
6
|
+
const isHeadingElement = (element, suchThat) => index.ContemberEditor.isElementType(element, headingElementType, suchThat);
|
|
7
|
+
const ejectHeadingElement = (editor, elementPath) => {
|
|
8
|
+
index.ContemberEditor.ejectElement(editor, elementPath);
|
|
9
|
+
Slate.Transforms.setNodes(editor, { type: editor.defaultElementType }, { at: elementPath });
|
|
10
|
+
};
|
|
11
|
+
const headingElementPlugin = ({ render }) => ({
|
|
12
|
+
type: headingElementType,
|
|
13
|
+
render,
|
|
14
|
+
canContainAnyBlocks: false,
|
|
15
|
+
acceptsAttributes: ({ editor, suchThat }) => {
|
|
16
|
+
return "align" in suchThat;
|
|
17
|
+
},
|
|
18
|
+
// TODO in the following function, we need to conditionally trim the selection so that it doesn't potentially
|
|
19
|
+
// include empty strings at the edges of top-level elements.
|
|
20
|
+
toggleElement: ({ editor, suchThat }) => {
|
|
21
|
+
Slate.Editor.withoutNormalizing(editor, () => {
|
|
22
|
+
const headings = Array.from(Slate.Editor.nodes(editor, { match: (it) => isHeadingElement(it, suchThat) }));
|
|
23
|
+
if (headings.length) {
|
|
24
|
+
for (const heading of headings) {
|
|
25
|
+
ejectHeadingElement(editor, heading[1]);
|
|
26
|
+
}
|
|
27
|
+
} else {
|
|
28
|
+
Slate.Transforms.setNodes(editor, {
|
|
29
|
+
...suchThat,
|
|
30
|
+
children: [],
|
|
31
|
+
type: headingElementType
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
exports.ejectHeadingElement = ejectHeadingElement;
|
|
38
|
+
exports.headingElementPlugin = headingElementPlugin;
|
|
39
|
+
exports.headingElementType = headingElementType;
|
|
40
|
+
exports.isHeadingElement = isHeadingElement;
|
|
41
|
+
//# sourceMappingURL=HeadingElement.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeadingElement.cjs","sources":["../../../../../../../packages/react-slate-editor-base/src/plugins/element/headings/HeadingElement.ts"],"sourcesContent":["import { Editor, Editor as SlateEditor, Element, Node as SlateNode, Path as SlatePath, Transforms } from 'slate'\nimport { ContemberEditor } from '../../../editor'\nimport { AlignDirection } from '../../attributes'\nimport { EditorElementPlugin, ElementRenderer } from '../../../types'\n\nexport const headingElementType = 'heading' as const\n\nexport interface HeadingElement extends Element {\n\ttype: typeof headingElementType\n\tlevel: 1 | 2 | 3 | 4 | 5 | 6\n\tisNumbered?: boolean\n\talign?: AlignDirection\n\tchildren: SlateEditor['children']\n}\n\nexport const isHeadingElement = (\n\telement: SlateNode,\n\tsuchThat?: Partial<HeadingElement>,\n): element is HeadingElement => ContemberEditor.isElementType(element, headingElementType, suchThat)\n\nexport const ejectHeadingElement = (editor: Editor, elementPath: SlatePath) => {\n\tContemberEditor.ejectElement(editor, elementPath)\n\tTransforms.setNodes(editor, { type: editor.defaultElementType }, { at: elementPath })\n}\n\nexport const headingElementPlugin = ({ render }: { render: ElementRenderer<HeadingElement> }): EditorElementPlugin<HeadingElement> => ({\n\ttype: headingElementType,\n\trender,\n\tcanContainAnyBlocks: false,\n\tacceptsAttributes: ({ editor, suchThat }) => {\n\t\treturn 'align' in suchThat\n\t},\n\t// TODO in the following function, we need to conditionally trim the selection so that it doesn't potentially\n\t// \tinclude empty strings at the edges of top-level elements.\n\ttoggleElement: ({ editor, suchThat }) => {\n\t\tSlateEditor.withoutNormalizing(editor, () => {\n\t\t\tconst headings = Array.from(Editor.nodes(editor, { match: it => isHeadingElement(it, suchThat) }))\n\t\t\tif (headings.length) {\n\t\t\t\tfor (const heading of headings) {\n\t\t\t\t\tejectHeadingElement(editor, heading[1])\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tTransforms.setNodes(editor, {\n\t\t\t\t\t...suchThat,\n\t\t\t\t\tchildren: [],\n\t\t\t\t\ttype: headingElementType,\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\t},\n})\n"],"names":["ContemberEditor","Transforms","SlateEditor","Editor"],"mappings":";;;;AAKO,MAAM,qBAAqB;AAU3B,MAAM,mBAAmB,CAC/B,SACA,aAC+BA,MAAAA,gBAAgB,cAAc,SAAS,oBAAoB,QAAQ;AAE5F,MAAM,sBAAsB,CAAC,QAAgB,gBAA2B;AAC9EA,wBAAgB,aAAa,QAAQ,WAAW;AAChDC,mBAAW,SAAS,QAAQ,EAAE,MAAM,OAAO,sBAAsB,EAAE,IAAI,aAAa;AACrF;AAEO,MAAM,uBAAuB,CAAC,EAAE,cAAgG;AAAA,EACtI,MAAM;AAAA,EACN;AAAA,EACA,qBAAqB;AAAA,EACrB,mBAAmB,CAAC,EAAE,QAAQ,eAAe;AAC5C,WAAO,WAAW;AAAA,EACnB;AAAA;AAAA;AAAA,EAGA,eAAe,CAAC,EAAE,QAAQ,eAAe;AACxCC,iBAAY,mBAAmB,QAAQ,MAAM;AAC5C,YAAM,WAAW,MAAM,KAAKC,MAAAA,OAAO,MAAM,QAAQ,EAAE,OAAO,CAAA,OAAM,iBAAiB,IAAI,QAAQ,EAAA,CAAG,CAAC;AACjG,UAAI,SAAS,QAAQ;AACpB,mBAAW,WAAW,UAAU;AAC/B,8BAAoB,QAAQ,QAAQ,CAAC,CAAC;AAAA,QACvC;AAAA,MACD,OAAO;AACNF,cAAAA,WAAW,SAAS,QAAQ;AAAA,UAC3B,GAAG;AAAA,UACH,UAAU,CAAA;AAAA,UACV,MAAM;AAAA,QAAA,CACN;AAAA,MACF;AAAA,IACD,CAAC;AAAA,EACF;AACD;;;;;"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Transforms, Editor } from "slate";
|
|
2
|
+
import { ContemberEditor } from "../../../editor/index.js";
|
|
3
|
+
const headingElementType = "heading";
|
|
4
|
+
const isHeadingElement = (element, suchThat) => ContemberEditor.isElementType(element, headingElementType, suchThat);
|
|
5
|
+
const ejectHeadingElement = (editor, elementPath) => {
|
|
6
|
+
ContemberEditor.ejectElement(editor, elementPath);
|
|
7
|
+
Transforms.setNodes(editor, { type: editor.defaultElementType }, { at: elementPath });
|
|
8
|
+
};
|
|
9
|
+
const headingElementPlugin = ({ render }) => ({
|
|
10
|
+
type: headingElementType,
|
|
11
|
+
render,
|
|
12
|
+
canContainAnyBlocks: false,
|
|
13
|
+
acceptsAttributes: ({ editor, suchThat }) => {
|
|
14
|
+
return "align" in suchThat;
|
|
15
|
+
},
|
|
16
|
+
// TODO in the following function, we need to conditionally trim the selection so that it doesn't potentially
|
|
17
|
+
// include empty strings at the edges of top-level elements.
|
|
18
|
+
toggleElement: ({ editor, suchThat }) => {
|
|
19
|
+
Editor.withoutNormalizing(editor, () => {
|
|
20
|
+
const headings = Array.from(Editor.nodes(editor, { match: (it) => isHeadingElement(it, suchThat) }));
|
|
21
|
+
if (headings.length) {
|
|
22
|
+
for (const heading of headings) {
|
|
23
|
+
ejectHeadingElement(editor, heading[1]);
|
|
24
|
+
}
|
|
25
|
+
} else {
|
|
26
|
+
Transforms.setNodes(editor, {
|
|
27
|
+
...suchThat,
|
|
28
|
+
children: [],
|
|
29
|
+
type: headingElementType
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
export {
|
|
36
|
+
ejectHeadingElement,
|
|
37
|
+
headingElementPlugin,
|
|
38
|
+
headingElementType,
|
|
39
|
+
isHeadingElement
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=HeadingElement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeadingElement.js","sources":["../../../../../../../packages/react-slate-editor-base/src/plugins/element/headings/HeadingElement.ts"],"sourcesContent":["import { Editor, Editor as SlateEditor, Element, Node as SlateNode, Path as SlatePath, Transforms } from 'slate'\nimport { ContemberEditor } from '../../../editor'\nimport { AlignDirection } from '../../attributes'\nimport { EditorElementPlugin, ElementRenderer } from '../../../types'\n\nexport const headingElementType = 'heading' as const\n\nexport interface HeadingElement extends Element {\n\ttype: typeof headingElementType\n\tlevel: 1 | 2 | 3 | 4 | 5 | 6\n\tisNumbered?: boolean\n\talign?: AlignDirection\n\tchildren: SlateEditor['children']\n}\n\nexport const isHeadingElement = (\n\telement: SlateNode,\n\tsuchThat?: Partial<HeadingElement>,\n): element is HeadingElement => ContemberEditor.isElementType(element, headingElementType, suchThat)\n\nexport const ejectHeadingElement = (editor: Editor, elementPath: SlatePath) => {\n\tContemberEditor.ejectElement(editor, elementPath)\n\tTransforms.setNodes(editor, { type: editor.defaultElementType }, { at: elementPath })\n}\n\nexport const headingElementPlugin = ({ render }: { render: ElementRenderer<HeadingElement> }): EditorElementPlugin<HeadingElement> => ({\n\ttype: headingElementType,\n\trender,\n\tcanContainAnyBlocks: false,\n\tacceptsAttributes: ({ editor, suchThat }) => {\n\t\treturn 'align' in suchThat\n\t},\n\t// TODO in the following function, we need to conditionally trim the selection so that it doesn't potentially\n\t// \tinclude empty strings at the edges of top-level elements.\n\ttoggleElement: ({ editor, suchThat }) => {\n\t\tSlateEditor.withoutNormalizing(editor, () => {\n\t\t\tconst headings = Array.from(Editor.nodes(editor, { match: it => isHeadingElement(it, suchThat) }))\n\t\t\tif (headings.length) {\n\t\t\t\tfor (const heading of headings) {\n\t\t\t\t\tejectHeadingElement(editor, heading[1])\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tTransforms.setNodes(editor, {\n\t\t\t\t\t...suchThat,\n\t\t\t\t\tchildren: [],\n\t\t\t\t\ttype: headingElementType,\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\t},\n})\n"],"names":["SlateEditor"],"mappings":";;AAKO,MAAM,qBAAqB;AAU3B,MAAM,mBAAmB,CAC/B,SACA,aAC+B,gBAAgB,cAAc,SAAS,oBAAoB,QAAQ;AAE5F,MAAM,sBAAsB,CAAC,QAAgB,gBAA2B;AAC9E,kBAAgB,aAAa,QAAQ,WAAW;AAChD,aAAW,SAAS,QAAQ,EAAE,MAAM,OAAO,sBAAsB,EAAE,IAAI,aAAa;AACrF;AAEO,MAAM,uBAAuB,CAAC,EAAE,cAAgG;AAAA,EACtI,MAAM;AAAA,EACN;AAAA,EACA,qBAAqB;AAAA,EACrB,mBAAmB,CAAC,EAAE,QAAQ,eAAe;AAC5C,WAAO,WAAW;AAAA,EACnB;AAAA;AAAA;AAAA,EAGA,eAAe,CAAC,EAAE,QAAQ,eAAe;AACxCA,WAAY,mBAAmB,QAAQ,MAAM;AAC5C,YAAM,WAAW,MAAM,KAAK,OAAO,MAAM,QAAQ,EAAE,OAAO,CAAA,OAAM,iBAAiB,IAAI,QAAQ,EAAA,CAAG,CAAC;AACjG,UAAI,SAAS,QAAQ;AACpB,mBAAW,WAAW,UAAU;AAC/B,8BAAoB,QAAQ,QAAQ,CAAC,CAAC;AAAA,QACvC;AAAA,MACD,OAAO;AACN,mBAAW,SAAS,QAAQ;AAAA,UAC3B,GAAG;AAAA,UACH,UAAU,CAAA;AAAA,UACV,MAAM;AAAA,QAAA,CACN;AAAA,MACF;AAAA,IACD,CAAC;AAAA,EACF;AACD;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const HeadingElement = require("./HeadingElement.cjs");
|
|
4
|
+
const EditorPasteUtils = require("../../../internal/utils/EditorPasteUtils.cjs");
|
|
5
|
+
const headingHtmlDeserializer = {
|
|
6
|
+
processBlockPaste: ({ element, next, cumulativeTextAttrs }) => {
|
|
7
|
+
const match = element.nodeName.match(/^H(?<level>[1-6])$/);
|
|
8
|
+
if (match !== null) {
|
|
9
|
+
const isNumbered = (element.getAttribute("style")?.match(/mso-list:\w+ level\d+ \w+/) ?? null) !== null;
|
|
10
|
+
const children = isNumbered ? EditorPasteUtils.EditorPasteUtils.wordPasteListItemContent(element.childNodes) : element.childNodes;
|
|
11
|
+
return {
|
|
12
|
+
type: HeadingElement.headingElementType,
|
|
13
|
+
level: parseInt(match.groups.level),
|
|
14
|
+
children: next(children, cumulativeTextAttrs),
|
|
15
|
+
isNumbered
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
exports.headingHtmlDeserializer = headingHtmlDeserializer;
|
|
22
|
+
//# sourceMappingURL=HeadingHtmlDeserializer.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeadingHtmlDeserializer.cjs","sources":["../../../../../../../packages/react-slate-editor-base/src/plugins/element/headings/HeadingHtmlDeserializer.ts"],"sourcesContent":["import { headingElementType } from './HeadingElement'\nimport { HtmlDeserializerPlugin } from '../../../types'\nimport { EditorPasteUtils } from '../../../internal/utils/EditorPasteUtils'\n\nexport const headingHtmlDeserializer: HtmlDeserializerPlugin = {\n\tprocessBlockPaste: ({ element, next, cumulativeTextAttrs }) => {\n\t\tconst match = element.nodeName.match(/^H(?<level>[1-6])$/)\n\t\tif (match !== null) {\n\t\t\tconst isNumbered = (element.getAttribute('style')?.match(/mso-list:\\w+ level\\d+ \\w+/) ?? null) !== null\n\t\t\tconst children = isNumbered ? EditorPasteUtils.wordPasteListItemContent(element.childNodes) : element.childNodes\n\t\t\treturn {\n\t\t\t\ttype: headingElementType,\n\t\t\t\tlevel: parseInt(match.groups!.level),\n\t\t\t\tchildren: next(children, cumulativeTextAttrs),\n\t\t\t\tisNumbered,\n\t\t\t}\n\t\t}\n\t\treturn null\n\t},\n}\n"],"names":["EditorPasteUtils","headingElementType"],"mappings":";;;;AAIO,MAAM,0BAAkD;AAAA,EAC9D,mBAAmB,CAAC,EAAE,SAAS,MAAM,0BAA0B;AAC9D,UAAM,QAAQ,QAAQ,SAAS,MAAM,oBAAoB;AACzD,QAAI,UAAU,MAAM;AACnB,YAAM,cAAc,QAAQ,aAAa,OAAO,GAAG,MAAM,2BAA2B,KAAK,UAAU;AACnG,YAAM,WAAW,aAAaA,kCAAiB,yBAAyB,QAAQ,UAAU,IAAI,QAAQ;AACtG,aAAO;AAAA,QACN,MAAMC,eAAAA;AAAAA,QACN,OAAO,SAAS,MAAM,OAAQ,KAAK;AAAA,QACnC,UAAU,KAAK,UAAU,mBAAmB;AAAA,QAC5C;AAAA,MAAA;AAAA,IAEF;AACA,WAAO;AAAA,EACR;AACD;;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { headingElementType } from "./HeadingElement.js";
|
|
2
|
+
import { EditorPasteUtils } from "../../../internal/utils/EditorPasteUtils.js";
|
|
3
|
+
const headingHtmlDeserializer = {
|
|
4
|
+
processBlockPaste: ({ element, next, cumulativeTextAttrs }) => {
|
|
5
|
+
const match = element.nodeName.match(/^H(?<level>[1-6])$/);
|
|
6
|
+
if (match !== null) {
|
|
7
|
+
const isNumbered = (element.getAttribute("style")?.match(/mso-list:\w+ level\d+ \w+/) ?? null) !== null;
|
|
8
|
+
const children = isNumbered ? EditorPasteUtils.wordPasteListItemContent(element.childNodes) : element.childNodes;
|
|
9
|
+
return {
|
|
10
|
+
type: headingElementType,
|
|
11
|
+
level: parseInt(match.groups.level),
|
|
12
|
+
children: next(children, cumulativeTextAttrs),
|
|
13
|
+
isNumbered
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
headingHtmlDeserializer
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=HeadingHtmlDeserializer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeadingHtmlDeserializer.js","sources":["../../../../../../../packages/react-slate-editor-base/src/plugins/element/headings/HeadingHtmlDeserializer.ts"],"sourcesContent":["import { headingElementType } from './HeadingElement'\nimport { HtmlDeserializerPlugin } from '../../../types'\nimport { EditorPasteUtils } from '../../../internal/utils/EditorPasteUtils'\n\nexport const headingHtmlDeserializer: HtmlDeserializerPlugin = {\n\tprocessBlockPaste: ({ element, next, cumulativeTextAttrs }) => {\n\t\tconst match = element.nodeName.match(/^H(?<level>[1-6])$/)\n\t\tif (match !== null) {\n\t\t\tconst isNumbered = (element.getAttribute('style')?.match(/mso-list:\\w+ level\\d+ \\w+/) ?? null) !== null\n\t\t\tconst children = isNumbered ? EditorPasteUtils.wordPasteListItemContent(element.childNodes) : element.childNodes\n\t\t\treturn {\n\t\t\t\ttype: headingElementType,\n\t\t\t\tlevel: parseInt(match.groups!.level),\n\t\t\t\tchildren: next(children, cumulativeTextAttrs),\n\t\t\t\tisNumbered,\n\t\t\t}\n\t\t}\n\t\treturn null\n\t},\n}\n"],"names":[],"mappings":";;AAIO,MAAM,0BAAkD;AAAA,EAC9D,mBAAmB,CAAC,EAAE,SAAS,MAAM,0BAA0B;AAC9D,UAAM,QAAQ,QAAQ,SAAS,MAAM,oBAAoB;AACzD,QAAI,UAAU,MAAM;AACnB,YAAM,cAAc,QAAQ,aAAa,OAAO,GAAG,MAAM,2BAA2B,KAAK,UAAU;AACnG,YAAM,WAAW,aAAa,iBAAiB,yBAAyB,QAAQ,UAAU,IAAI,QAAQ;AACtG,aAAO;AAAA,QACN,MAAM;AAAA,QACN,OAAO,SAAS,MAAM,OAAQ,KAAK;AAAA,QACnC,UAAU,KAAK,UAAU,mBAAmB;AAAA,QAC5C;AAAA,MAAA;AAAA,IAEF;AACA,WAAO;AAAA,EACR;AACD;"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const Slate = require("slate");
|
|
4
|
+
const index = require("../../../editor/index.cjs");
|
|
5
|
+
const HeadingElement = require("./HeadingElement.cjs");
|
|
6
|
+
const HeadingHtmlDeserializer = require("./HeadingHtmlDeserializer.cjs");
|
|
7
|
+
const withHeadings = ({ render }) => (editor) => {
|
|
8
|
+
const {
|
|
9
|
+
canToggleElement,
|
|
10
|
+
insertBreak,
|
|
11
|
+
deleteBackward
|
|
12
|
+
} = editor;
|
|
13
|
+
editor.registerElement(HeadingElement.headingElementPlugin({ render }));
|
|
14
|
+
editor.htmlDeserializer.registerPlugin(HeadingHtmlDeserializer.headingHtmlDeserializer);
|
|
15
|
+
editor.canToggleElement = (elementType, suchThat) => {
|
|
16
|
+
if (elementType !== HeadingElement.headingElementType) {
|
|
17
|
+
return canToggleElement(elementType, suchThat);
|
|
18
|
+
}
|
|
19
|
+
if (!editor.selection) {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
const closestBlockEntry = index.ContemberEditor.closestBlockEntry(editor);
|
|
23
|
+
if (closestBlockEntry === void 0) {
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
const [closestBlockElement] = closestBlockEntry;
|
|
27
|
+
return Slate.Element.isElement(closestBlockElement) && (editor.isDefaultElement(closestBlockElement) || HeadingElement.isHeadingElement(closestBlockElement));
|
|
28
|
+
};
|
|
29
|
+
editor.insertBreak = () => {
|
|
30
|
+
Slate.Editor.withoutNormalizing(editor, () => {
|
|
31
|
+
insertBreak();
|
|
32
|
+
const { selection } = editor;
|
|
33
|
+
if (selection === null || Slate.Range.isExpanded(selection)) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const [topLevelElement, path] = Slate.Editor.node(editor, selection, {
|
|
37
|
+
depth: 1
|
|
38
|
+
});
|
|
39
|
+
if (HeadingElement.isHeadingElement(topLevelElement) && Slate.Editor.isEmpty(editor, topLevelElement)) {
|
|
40
|
+
HeadingElement.ejectHeadingElement(editor, path);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
editor.deleteBackward = (unit) => {
|
|
45
|
+
const selection = editor.selection;
|
|
46
|
+
if (unit !== "character" || !selection || !Slate.Range.isCollapsed(selection) || selection.focus.offset !== 0) {
|
|
47
|
+
return deleteBackward(unit);
|
|
48
|
+
}
|
|
49
|
+
const closestNumberedEntry = Slate.Editor.above(editor, {
|
|
50
|
+
match: (node) => Slate.Element.isElement(node) && HeadingElement.isHeadingElement(node, { isNumbered: true })
|
|
51
|
+
});
|
|
52
|
+
if (closestNumberedEntry === void 0) {
|
|
53
|
+
return deleteBackward(unit);
|
|
54
|
+
}
|
|
55
|
+
const [, headingPath] = closestNumberedEntry;
|
|
56
|
+
const headingStartPoint = Slate.Editor.start(editor, headingPath);
|
|
57
|
+
if (!Slate.Point.equals(headingStartPoint, selection.focus)) {
|
|
58
|
+
return deleteBackward(unit);
|
|
59
|
+
}
|
|
60
|
+
Slate.Transforms.setNodes(
|
|
61
|
+
editor,
|
|
62
|
+
{ isNumbered: null },
|
|
63
|
+
// null removes the key altogether
|
|
64
|
+
{ at: headingPath }
|
|
65
|
+
);
|
|
66
|
+
};
|
|
67
|
+
return editor;
|
|
68
|
+
};
|
|
69
|
+
exports.withHeadings = withHeadings;
|
|
70
|
+
//# sourceMappingURL=withHeadings.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withHeadings.cjs","sources":["../../../../../../../packages/react-slate-editor-base/src/plugins/element/headings/withHeadings.ts"],"sourcesContent":["import { Editor, Editor as SlateEditor, Element as SlateElement, Point, Range as SlateRange, Transforms } from 'slate'\nimport { ContemberEditor } from '../../../editor'\nimport { ejectHeadingElement, HeadingElement, headingElementPlugin, headingElementType, isHeadingElement } from './HeadingElement'\nimport { headingHtmlDeserializer } from './HeadingHtmlDeserializer'\nimport { ElementRenderer } from '../../../types'\n\nexport const withHeadings = ({ render }: { render: ElementRenderer<HeadingElement> }) => <E extends Editor>(editor: E): E => {\n\tconst {\n\t\tcanToggleElement,\n\t\tinsertBreak,\n\t\tdeleteBackward,\n\t} = editor\n\n\teditor.registerElement(headingElementPlugin({ render }))\n\teditor.htmlDeserializer.registerPlugin(headingHtmlDeserializer)\n\n\t// T O D O cache this\n\t// e.getNumberedHeadingSection = function recurse(element): number[] {\n\t// \tconst [topLevelIndex] = ReactEditor.findPath(e, element)\n\t// \tlet previousNumberedHeadingIndex: number = topLevelIndex - 1\n\t//\n\t// \tlet previousNumberedHeading: SlateNode\n\t// \tdo {\n\t// \t\tpreviousNumberedHeading = e.children[previousNumberedHeadingIndex--]\n\t// \t} while (\n\t// \t\tpreviousNumberedHeadingIndex >= 0 &&\n\t// \t\t!(isHeading(previousNumberedHeading) && previousNumberedHeading.isNumbered)\n\t// \t)\n\t//\n\t// \tif (previousNumberedHeadingIndex < 0) {\n\t// \t\treturn Array(element.level).fill(1)\n\t// \t}\n\t// \tconst previousHeadingSection = recurse(previousNumberedHeading as HeadingElement)\n\t//\n\t// \t// Ensures the correct length - this is essentially padRight with zeros\n\t// \tconst normalizedPrevious = previousHeadingSection.concat(Array(element.level).fill(0)).slice(0, element.level)\n\t//\n\t// \tnormalizedPrevious[normalizedPrevious.length - 1]++\n\t//\n\t// \t// The map isn't really necessary for now but would be if we introduced deeper levels\n\t// \treturn normalizedPrevious.map(level => Math.max(level, 1))\n\t// }\n\n\teditor.canToggleElement = (elementType, suchThat) => {\n\t\tif (elementType !== headingElementType) {\n\t\t\treturn canToggleElement(elementType, suchThat)\n\t\t}\n\t\tif (!editor.selection) {\n\t\t\treturn false\n\t\t}\n\t\tconst closestBlockEntry = ContemberEditor.closestBlockEntry(editor)\n\t\tif (closestBlockEntry === undefined) {\n\t\t\treturn true\n\t\t}\n\t\tconst [closestBlockElement] = closestBlockEntry\n\n\t\treturn (\n\t\t\tSlateElement.isElement(closestBlockElement) && (\n\t\t\t\teditor.isDefaultElement(closestBlockElement)\n\t\t\t\t|| isHeadingElement(closestBlockElement)\n\t\t\t)\n\t\t)\n\t}\n\n\teditor.insertBreak = () => {\n\t\tSlateEditor.withoutNormalizing(editor, () => {\n\t\t\tinsertBreak()\n\n\t\t\tconst { selection } = editor\n\n\t\t\tif (selection === null || SlateRange.isExpanded(selection)) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst [topLevelElement, path] = SlateEditor.node(editor, selection, {\n\t\t\t\tdepth: 1,\n\t\t\t})\n\t\t\tif (isHeadingElement(topLevelElement) && SlateEditor.isEmpty(editor, topLevelElement)) {\n\t\t\t\tejectHeadingElement(editor, path)\n\t\t\t}\n\t\t})\n\t}\n\n\teditor.deleteBackward = unit => {\n\t\tconst selection = editor.selection\n\t\tif (unit !== 'character' || !selection || !SlateRange.isCollapsed(selection) || selection.focus.offset !== 0) {\n\t\t\treturn deleteBackward(unit)\n\t\t}\n\t\t// The offset being zero doesn't necessarily imply that selection refers to the start of a heading.\n\t\t// It's just a way to early-exit.\n\n\t\tconst closestNumberedEntry = Editor.above<HeadingElement>(editor, {\n\t\t\tmatch: node => SlateElement.isElement(node) && isHeadingElement(node, { isNumbered: true }),\n\t\t})\n\t\tif (closestNumberedEntry === undefined) {\n\t\t\treturn deleteBackward(unit)\n\t\t}\n\t\tconst [, headingPath] = closestNumberedEntry\n\t\tconst headingStartPoint = Editor.start(editor, headingPath)\n\n\t\tif (!Point.equals(headingStartPoint, selection.focus)) {\n\t\t\treturn deleteBackward(unit)\n\t\t}\n\t\tTransforms.setNodes(\n\t\t\teditor,\n\t\t\t{ isNumbered: null }, // null removes the key altogether\n\t\t\t{ at: headingPath },\n\t\t)\n\t}\n\n\treturn editor\n}\n"],"names":["headingElementPlugin","headingHtmlDeserializer","headingElementType","ContemberEditor","SlateElement","isHeadingElement","SlateEditor","SlateRange","ejectHeadingElement","Editor","Point","Transforms"],"mappings":";;;;;;AAMO,MAAM,eAAe,CAAC,EAAE,OAAA,MAA0D,CAAmB,WAAiB;AAC5H,QAAM;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACG;AAEJ,SAAO,gBAAgBA,eAAAA,qBAAqB,EAAE,OAAA,CAAQ,CAAC;AACvD,SAAO,iBAAiB,eAAeC,+CAAuB;AA6B9D,SAAO,mBAAmB,CAAC,aAAa,aAAa;AACpD,QAAI,gBAAgBC,eAAAA,oBAAoB;AACvC,aAAO,iBAAiB,aAAa,QAAQ;AAAA,IAC9C;AACA,QAAI,CAAC,OAAO,WAAW;AACtB,aAAO;AAAA,IACR;AACA,UAAM,oBAAoBC,MAAAA,gBAAgB,kBAAkB,MAAM;AAClE,QAAI,sBAAsB,QAAW;AACpC,aAAO;AAAA,IACR;AACA,UAAM,CAAC,mBAAmB,IAAI;AAE9B,WACCC,MAAAA,QAAa,UAAU,mBAAmB,MACzC,OAAO,iBAAiB,mBAAmB,KACxCC,gCAAiB,mBAAmB;AAAA,EAG1C;AAEA,SAAO,cAAc,MAAM;AAC1BC,iBAAY,mBAAmB,QAAQ,MAAM;AAC5C,kBAAA;AAEA,YAAM,EAAE,cAAc;AAEtB,UAAI,cAAc,QAAQC,MAAAA,MAAW,WAAW,SAAS,GAAG;AAC3D;AAAA,MACD;AACA,YAAM,CAAC,iBAAiB,IAAI,IAAID,MAAAA,OAAY,KAAK,QAAQ,WAAW;AAAA,QACnE,OAAO;AAAA,MAAA,CACP;AACD,UAAID,eAAAA,iBAAiB,eAAe,KAAKC,MAAAA,OAAY,QAAQ,QAAQ,eAAe,GAAG;AACtFE,uBAAAA,oBAAoB,QAAQ,IAAI;AAAA,MACjC;AAAA,IACD,CAAC;AAAA,EACF;AAEA,SAAO,iBAAiB,CAAA,SAAQ;AAC/B,UAAM,YAAY,OAAO;AACzB,QAAI,SAAS,eAAe,CAAC,aAAa,CAACD,MAAAA,MAAW,YAAY,SAAS,KAAK,UAAU,MAAM,WAAW,GAAG;AAC7G,aAAO,eAAe,IAAI;AAAA,IAC3B;AAIA,UAAM,uBAAuBE,MAAAA,OAAO,MAAsB,QAAQ;AAAA,MACjE,OAAO,CAAA,SAAQL,MAAAA,QAAa,UAAU,IAAI,KAAKC,eAAAA,iBAAiB,MAAM,EAAE,YAAY,KAAA,CAAM;AAAA,IAAA,CAC1F;AACD,QAAI,yBAAyB,QAAW;AACvC,aAAO,eAAe,IAAI;AAAA,IAC3B;AACA,UAAM,CAAA,EAAG,WAAW,IAAI;AACxB,UAAM,oBAAoBI,MAAAA,OAAO,MAAM,QAAQ,WAAW;AAE1D,QAAI,CAACC,MAAAA,MAAM,OAAO,mBAAmB,UAAU,KAAK,GAAG;AACtD,aAAO,eAAe,IAAI;AAAA,IAC3B;AACAC,UAAAA,WAAW;AAAA,MACV;AAAA,MACA,EAAE,YAAY,KAAA;AAAA;AAAA,MACd,EAAE,IAAI,YAAA;AAAA,IAAY;AAAA,EAEpB;AAEA,SAAO;AACR;;"}
|