@contember/react-slate-editor-base 2.1.0-alpha.36 → 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,14 @@
|
|
|
1
|
+
import { toLatestFormat } from "./toLatestFormat.js";
|
|
2
|
+
const strictlyDeserializeNodes = (editor, serializedElement, errorMessage) => {
|
|
3
|
+
let deserialized;
|
|
4
|
+
try {
|
|
5
|
+
deserialized = JSON.parse(serializedElement);
|
|
6
|
+
} catch (e) {
|
|
7
|
+
throw new Error(errorMessage || `Editor: deserialization error`);
|
|
8
|
+
}
|
|
9
|
+
return toLatestFormat(editor, deserialized).children;
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
strictlyDeserializeNodes
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=strictlyDeserializeNodes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strictlyDeserializeNodes.js","sources":["../../../../../../packages/react-slate-editor-base/src/editor/methods/strictlyDeserializeNodes.ts"],"sourcesContent":["import { toLatestFormat } from './toLatestFormat'\nimport { Editor as SlateEditor, Element as SlateElement, Text as SlateText } from 'slate'\nimport { SerializableEditorNode } from '../../types/editor'\n\nexport const strictlyDeserializeNodes = <E extends SlateEditor>(\n\teditor: E,\n\tserializedElement: string,\n\terrorMessage?: string,\n): Array<SlateElement | SlateText> => {\n\tlet deserialized: SerializableEditorNode\n\ttry {\n\t\t// It is important that only the JSON.parse call is inside the try block.\n\t\t// We don't want to catch other exceptions from here.\n\t\tdeserialized = JSON.parse(serializedElement)\n\t} catch (e) {\n\t\tthrow new Error(errorMessage || `Editor: deserialization error`)\n\t}\n\treturn toLatestFormat(editor, deserialized).children\n}\n"],"names":[],"mappings":";AAIO,MAAM,2BAA2B,CACvC,QACA,mBACA,iBACqC;AACrC,MAAI;AACJ,MAAI;AAGH,mBAAe,KAAK,MAAM,iBAAiB;AAAA,EAC5C,SAAS,GAAG;AACX,UAAM,IAAI,MAAM,gBAAgB,+BAA+B;AAAA,EAChE;AACA,SAAO,eAAe,QAAQ,YAAY,EAAE;AAC7C;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const textToSpecifics = (textNode) => {
|
|
4
|
+
const { text, ...specifics } = textNode;
|
|
5
|
+
return specifics;
|
|
6
|
+
};
|
|
7
|
+
exports.textToSpecifics = textToSpecifics;
|
|
8
|
+
//# sourceMappingURL=textToSpecifics.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textToSpecifics.cjs","sources":["../../../../../../packages/react-slate-editor-base/src/editor/methods/textToSpecifics.ts"],"sourcesContent":["import { Text as SlateText } from 'slate'\nimport { TextSpecifics } from '../../types/editor'\n\nexport const textToSpecifics = <Text extends SlateText = SlateText>(textNode: Text): TextSpecifics<Text> => {\n\tconst { text, ...specifics } = textNode\n\treturn specifics\n}\n"],"names":[],"mappings":";;AAGO,MAAM,kBAAkB,CAAqC,aAAwC;AAC3G,QAAM,EAAE,MAAM,GAAG,UAAA,IAAc;AAC/B,SAAO;AACR;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textToSpecifics.js","sources":["../../../../../../packages/react-slate-editor-base/src/editor/methods/textToSpecifics.ts"],"sourcesContent":["import { Text as SlateText } from 'slate'\nimport { TextSpecifics } from '../../types/editor'\n\nexport const textToSpecifics = <Text extends SlateText = SlateText>(textNode: Text): TextSpecifics<Text> => {\n\tconst { text, ...specifics } = textNode\n\treturn specifics\n}\n"],"names":[],"mappings":"AAGO,MAAM,kBAAkB,CAAqC,aAAwC;AAC3G,QAAM,EAAE,MAAM,GAAG,UAAA,IAAc;AAC/B,SAAO;AACR;"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const reactBinding = require("@contember/react-binding");
|
|
4
|
+
const toLatestFormat = (editor, potentiallyOldNode) => {
|
|
5
|
+
if (potentiallyOldNode.formatVersion === editor.formatVersion) {
|
|
6
|
+
return potentiallyOldNode;
|
|
7
|
+
}
|
|
8
|
+
if (potentiallyOldNode.formatVersion > editor.formatVersion) {
|
|
9
|
+
return potentiallyOldNode;
|
|
10
|
+
}
|
|
11
|
+
let formatNumber = potentiallyOldNode.formatVersion;
|
|
12
|
+
try {
|
|
13
|
+
for (; formatNumber < editor.formatVersion; formatNumber++) {
|
|
14
|
+
potentiallyOldNode = {
|
|
15
|
+
formatVersion: formatNumber + 1,
|
|
16
|
+
children: potentiallyOldNode.children.map((oldChild) => editor.upgradeFormatBySingleVersion(oldChild, formatNumber))
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
return potentiallyOldNode;
|
|
20
|
+
} catch (e) {
|
|
21
|
+
const genericMessage = `Failed to upgrade editor format from version ${formatNumber}.`;
|
|
22
|
+
if (e instanceof RangeError) {
|
|
23
|
+
throw new reactBinding.BindingError(
|
|
24
|
+
`${genericMessage}
|
|
25
|
+
Detected a stack overflow. Perhaps you incorrectly implemented 'upgradeFormatBySingleVersion'?`
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
throw new reactBinding.BindingError(genericMessage);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
exports.toLatestFormat = toLatestFormat;
|
|
32
|
+
//# sourceMappingURL=toLatestFormat.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toLatestFormat.cjs","sources":["../../../../../../packages/react-slate-editor-base/src/editor/methods/toLatestFormat.ts"],"sourcesContent":["import { BindingError } from '@contember/react-binding'\nimport { Editor as SlateEditor, Element as SlateElement } from 'slate'\nimport { SerializableEditorNode } from '../../types/editor'\n\nexport const toLatestFormat = <E extends SlateEditor>(\n\teditor: E,\n\tpotentiallyOldNode: SerializableEditorNode,\n): SerializableEditorNode => {\n\tif (potentiallyOldNode.formatVersion === editor.formatVersion) {\n\t\treturn potentiallyOldNode\n\t}\n\tif (potentiallyOldNode.formatVersion > editor.formatVersion) {\n\t\t// Boy oh boy, do we have a situation…\n\t\treturn potentiallyOldNode // Just hope it's at least somewhat backwards compatible.\n\t}\n\tlet formatNumber = potentiallyOldNode.formatVersion\n\ttry {\n\t\tfor (; formatNumber < editor.formatVersion; formatNumber++) {\n\t\t\tpotentiallyOldNode = {\n\t\t\t\tformatVersion: formatNumber + 1,\n\t\t\t\tchildren: potentiallyOldNode.children.map(oldChild => editor.upgradeFormatBySingleVersion(oldChild, formatNumber)) as SlateElement[],\n\t\t\t}\n\t\t}\n\t\treturn potentiallyOldNode\n\t} catch (e) {\n\t\tconst genericMessage = `Failed to upgrade editor format from version ${formatNumber}.`\n\t\tif (e instanceof RangeError) {\n\t\t\tthrow new BindingError(\n\t\t\t\t`${genericMessage}\\nDetected a stack overflow. `\n\t\t\t\t\t+ `Perhaps you incorrectly implemented 'upgradeFormatBySingleVersion'?`,\n\t\t\t)\n\t\t}\n\t\tthrow new BindingError(genericMessage)\n\t}\n}\n"],"names":["BindingError"],"mappings":";;;AAIO,MAAM,iBAAiB,CAC7B,QACA,uBAC4B;AAC5B,MAAI,mBAAmB,kBAAkB,OAAO,eAAe;AAC9D,WAAO;AAAA,EACR;AACA,MAAI,mBAAmB,gBAAgB,OAAO,eAAe;AAE5D,WAAO;AAAA,EACR;AACA,MAAI,eAAe,mBAAmB;AACtC,MAAI;AACH,WAAO,eAAe,OAAO,eAAe,gBAAgB;AAC3D,2BAAqB;AAAA,QACpB,eAAe,eAAe;AAAA,QAC9B,UAAU,mBAAmB,SAAS,IAAI,cAAY,OAAO,6BAA6B,UAAU,YAAY,CAAC;AAAA,MAAA;AAAA,IAEnH;AACA,WAAO;AAAA,EACR,SAAS,GAAG;AACX,UAAM,iBAAiB,gDAAgD,YAAY;AACnF,QAAI,aAAa,YAAY;AAC5B,YAAM,IAAIA,aAAAA;AAAAA,QACT,GAAG,cAAc;AAAA;AAAA,MAAA;AAAA,IAGnB;AACA,UAAM,IAAIA,aAAAA,aAAa,cAAc;AAAA,EACtC;AACD;;"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { BindingError } from "@contember/react-binding";
|
|
2
|
+
const toLatestFormat = (editor, potentiallyOldNode) => {
|
|
3
|
+
if (potentiallyOldNode.formatVersion === editor.formatVersion) {
|
|
4
|
+
return potentiallyOldNode;
|
|
5
|
+
}
|
|
6
|
+
if (potentiallyOldNode.formatVersion > editor.formatVersion) {
|
|
7
|
+
return potentiallyOldNode;
|
|
8
|
+
}
|
|
9
|
+
let formatNumber = potentiallyOldNode.formatVersion;
|
|
10
|
+
try {
|
|
11
|
+
for (; formatNumber < editor.formatVersion; formatNumber++) {
|
|
12
|
+
potentiallyOldNode = {
|
|
13
|
+
formatVersion: formatNumber + 1,
|
|
14
|
+
children: potentiallyOldNode.children.map((oldChild) => editor.upgradeFormatBySingleVersion(oldChild, formatNumber))
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
return potentiallyOldNode;
|
|
18
|
+
} catch (e) {
|
|
19
|
+
const genericMessage = `Failed to upgrade editor format from version ${formatNumber}.`;
|
|
20
|
+
if (e instanceof RangeError) {
|
|
21
|
+
throw new BindingError(
|
|
22
|
+
`${genericMessage}
|
|
23
|
+
Detected a stack overflow. Perhaps you incorrectly implemented 'upgradeFormatBySingleVersion'?`
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
throw new BindingError(genericMessage);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
toLatestFormat
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=toLatestFormat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toLatestFormat.js","sources":["../../../../../../packages/react-slate-editor-base/src/editor/methods/toLatestFormat.ts"],"sourcesContent":["import { BindingError } from '@contember/react-binding'\nimport { Editor as SlateEditor, Element as SlateElement } from 'slate'\nimport { SerializableEditorNode } from '../../types/editor'\n\nexport const toLatestFormat = <E extends SlateEditor>(\n\teditor: E,\n\tpotentiallyOldNode: SerializableEditorNode,\n): SerializableEditorNode => {\n\tif (potentiallyOldNode.formatVersion === editor.formatVersion) {\n\t\treturn potentiallyOldNode\n\t}\n\tif (potentiallyOldNode.formatVersion > editor.formatVersion) {\n\t\t// Boy oh boy, do we have a situation…\n\t\treturn potentiallyOldNode // Just hope it's at least somewhat backwards compatible.\n\t}\n\tlet formatNumber = potentiallyOldNode.formatVersion\n\ttry {\n\t\tfor (; formatNumber < editor.formatVersion; formatNumber++) {\n\t\t\tpotentiallyOldNode = {\n\t\t\t\tformatVersion: formatNumber + 1,\n\t\t\t\tchildren: potentiallyOldNode.children.map(oldChild => editor.upgradeFormatBySingleVersion(oldChild, formatNumber)) as SlateElement[],\n\t\t\t}\n\t\t}\n\t\treturn potentiallyOldNode\n\t} catch (e) {\n\t\tconst genericMessage = `Failed to upgrade editor format from version ${formatNumber}.`\n\t\tif (e instanceof RangeError) {\n\t\t\tthrow new BindingError(\n\t\t\t\t`${genericMessage}\\nDetected a stack overflow. `\n\t\t\t\t\t+ `Perhaps you incorrectly implemented 'upgradeFormatBySingleVersion'?`,\n\t\t\t)\n\t\t}\n\t\tthrow new BindingError(genericMessage)\n\t}\n}\n"],"names":[],"mappings":";AAIO,MAAM,iBAAiB,CAC7B,QACA,uBAC4B;AAC5B,MAAI,mBAAmB,kBAAkB,OAAO,eAAe;AAC9D,WAAO;AAAA,EACR;AACA,MAAI,mBAAmB,gBAAgB,OAAO,eAAe;AAE5D,WAAO;AAAA,EACR;AACA,MAAI,eAAe,mBAAmB;AACtC,MAAI;AACH,WAAO,eAAe,OAAO,eAAe,gBAAgB;AAC3D,2BAAqB;AAAA,QACpB,eAAe,eAAe;AAAA,QAC9B,UAAU,mBAAmB,SAAS,IAAI,cAAY,OAAO,6BAA6B,UAAU,YAAY,CAAC;AAAA,MAAA;AAAA,IAEnH;AACA,WAAO;AAAA,EACR,SAAS,GAAG;AACX,UAAM,iBAAiB,gDAAgD,YAAY;AACnF,QAAI,aAAa,YAAY;AAC5B,YAAM,IAAI;AAAA,QACT,GAAG,cAAc;AAAA;AAAA,MAAA;AAAA,IAGnB;AACA,UAAM,IAAI,aAAa,cAAc;AAAA,EACtC;AACD;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const Slate = require("slate");
|
|
4
|
+
const topLevelNodes = (editor) => {
|
|
5
|
+
return Slate.Editor.nodes(editor, {
|
|
6
|
+
match: (node) => Slate.Element.isElement(node) && !editor.isVoid(node),
|
|
7
|
+
mode: "highest",
|
|
8
|
+
voids: false
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
exports.topLevelNodes = topLevelNodes;
|
|
12
|
+
//# sourceMappingURL=topLevelNodes.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"topLevelNodes.cjs","sources":["../../../../../../packages/react-slate-editor-base/src/editor/methods/topLevelNodes.ts"],"sourcesContent":["import { Editor as SlateEditor, Element as SlateElement } from 'slate'\n\nexport const topLevelNodes = <E extends SlateEditor>(editor: E) => {\n\t// We manually filter out void nodes because it appears that Slate doesn't respect the voids setting from here.\n\t// The combination of isElement and mode: 'highest' is really just a roundabout way of excluding the Editor.\n\treturn SlateEditor.nodes(editor, {\n\t\tmatch: node => SlateElement.isElement(node) && !editor.isVoid(node),\n\t\tmode: 'highest',\n\t\tvoids: false,\n\t})\n}\n"],"names":["SlateEditor","SlateElement"],"mappings":";;;AAEO,MAAM,gBAAgB,CAAwB,WAAc;AAGlE,SAAOA,MAAAA,OAAY,MAAM,QAAQ;AAAA,IAChC,OAAO,UAAQC,MAAAA,QAAa,UAAU,IAAI,KAAK,CAAC,OAAO,OAAO,IAAI;AAAA,IAClE,MAAM;AAAA,IACN,OAAO;AAAA,EAAA,CACP;AACF;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Editor, Element } from "slate";
|
|
2
|
+
const topLevelNodes = (editor) => {
|
|
3
|
+
return Editor.nodes(editor, {
|
|
4
|
+
match: (node) => Element.isElement(node) && !editor.isVoid(node),
|
|
5
|
+
mode: "highest",
|
|
6
|
+
voids: false
|
|
7
|
+
});
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
topLevelNodes
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=topLevelNodes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"topLevelNodes.js","sources":["../../../../../../packages/react-slate-editor-base/src/editor/methods/topLevelNodes.ts"],"sourcesContent":["import { Editor as SlateEditor, Element as SlateElement } from 'slate'\n\nexport const topLevelNodes = <E extends SlateEditor>(editor: E) => {\n\t// We manually filter out void nodes because it appears that Slate doesn't respect the voids setting from here.\n\t// The combination of isElement and mode: 'highest' is really just a roundabout way of excluding the Editor.\n\treturn SlateEditor.nodes(editor, {\n\t\tmatch: node => SlateElement.isElement(node) && !editor.isVoid(node),\n\t\tmode: 'highest',\n\t\tvoids: false,\n\t})\n}\n"],"names":["SlateEditor","SlateElement"],"mappings":";AAEO,MAAM,gBAAgB,CAAwB,WAAc;AAGlE,SAAOA,OAAY,MAAM,QAAQ;AAAA,IAChC,OAAO,UAAQC,QAAa,UAAU,IAAI,KAAK,CAAC,OAAO,OAAO,IAAI;AAAA,IAClE,MAAM;AAAA,IACN,OAAO;AAAA,EAAA,CACP;AACF;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const React = require("react");
|
|
4
|
+
const slateReact = require("slate-react");
|
|
5
|
+
const DefaultElement = ({ attributes, children, element }) => {
|
|
6
|
+
const editor = slateReact.useSlateStatic();
|
|
7
|
+
return React.createElement(editor.isInline(element) ? "span" : "div", attributes, children);
|
|
8
|
+
};
|
|
9
|
+
DefaultElement.displayName = "DefaultElement";
|
|
10
|
+
exports.DefaultElement = DefaultElement;
|
|
11
|
+
//# sourceMappingURL=DefaultElement.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultElement.cjs","sources":["../../../../../../packages/react-slate-editor-base/src/internal/components/DefaultElement.tsx"],"sourcesContent":["import { createElement, FunctionComponent } from 'react'\nimport { RenderElementProps, useSlateStatic } from 'slate-react'\n\nexport interface DefaultElementProps extends RenderElementProps {}\n\nexport const DefaultElement: FunctionComponent<DefaultElementProps> = ({ attributes, children, element }) => {\n\tconst editor = useSlateStatic()\n\n\treturn createElement(editor.isInline(element) ? 'span' : 'div', attributes, children)\n}\nDefaultElement.displayName = 'DefaultElement'\n"],"names":["useSlateStatic","createElement"],"mappings":";;;;AAKO,MAAM,iBAAyD,CAAC,EAAE,YAAY,UAAU,cAAc;AAC5G,QAAM,SAASA,WAAAA,eAAA;AAEf,SAAOC,MAAAA,cAAc,OAAO,SAAS,OAAO,IAAI,SAAS,OAAO,YAAY,QAAQ;AACrF;AACA,eAAe,cAAc;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createElement } from "react";
|
|
2
|
+
import { useSlateStatic } from "slate-react";
|
|
3
|
+
const DefaultElement = ({ attributes, children, element }) => {
|
|
4
|
+
const editor = useSlateStatic();
|
|
5
|
+
return createElement(editor.isInline(element) ? "span" : "div", attributes, children);
|
|
6
|
+
};
|
|
7
|
+
DefaultElement.displayName = "DefaultElement";
|
|
8
|
+
export {
|
|
9
|
+
DefaultElement
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=DefaultElement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultElement.js","sources":["../../../../../../packages/react-slate-editor-base/src/internal/components/DefaultElement.tsx"],"sourcesContent":["import { createElement, FunctionComponent } from 'react'\nimport { RenderElementProps, useSlateStatic } from 'slate-react'\n\nexport interface DefaultElementProps extends RenderElementProps {}\n\nexport const DefaultElement: FunctionComponent<DefaultElementProps> = ({ attributes, children, element }) => {\n\tconst editor = useSlateStatic()\n\n\treturn createElement(editor.isInline(element) ? 'span' : 'div', attributes, children)\n}\nDefaultElement.displayName = 'DefaultElement'\n"],"names":[],"mappings":";;AAKO,MAAM,iBAAyD,CAAC,EAAE,YAAY,UAAU,cAAc;AAC5G,QAAM,SAAS,eAAA;AAEf,SAAO,cAAc,OAAO,SAAS,OAAO,IAAI,SAAS,OAAO,YAAY,QAAQ;AACrF;AACA,eAAe,cAAc;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const reactBinding = require("@contember/react-binding");
|
|
4
|
+
const useRichTextFieldNodes = ({
|
|
5
|
+
editor,
|
|
6
|
+
fieldAccessor,
|
|
7
|
+
contemberFieldElementCache
|
|
8
|
+
}) => {
|
|
9
|
+
if (contemberFieldElementCache.has(fieldAccessor)) {
|
|
10
|
+
return contemberFieldElementCache.get(fieldAccessor);
|
|
11
|
+
}
|
|
12
|
+
const fieldValue = fieldAccessor.value;
|
|
13
|
+
if (typeof fieldValue !== "string" && fieldValue !== null) {
|
|
14
|
+
throw new reactBinding.BindingError(`RichTextField: the underlying field does not contain a string value.`);
|
|
15
|
+
}
|
|
16
|
+
const elements = fieldValue === null || fieldValue === "" ? [editor.createDefaultElement([{ text: "" }])] : [
|
|
17
|
+
editor.createDefaultElement(
|
|
18
|
+
editor.deserializeNodes(
|
|
19
|
+
fieldValue,
|
|
20
|
+
`RichTextField: the underlying field contains invalid JSON.`
|
|
21
|
+
)
|
|
22
|
+
)
|
|
23
|
+
];
|
|
24
|
+
contemberFieldElementCache.set(fieldAccessor, elements);
|
|
25
|
+
return elements;
|
|
26
|
+
};
|
|
27
|
+
exports.useRichTextFieldNodes = useRichTextFieldNodes;
|
|
28
|
+
//# sourceMappingURL=useRichTextFieldNodes.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRichTextFieldNodes.cjs","sources":["../../../../../../packages/react-slate-editor-base/src/internal/hooks/useRichTextFieldNodes.ts"],"sourcesContent":["import { BindingError, FieldAccessor } from '@contember/react-binding'\nimport { Descendant, Editor } from 'slate'\n\nexport interface UseRichTextFieldEditorNodeOptions {\n\teditor: Editor\n\tfieldAccessor: FieldAccessor<string>\n\tcontemberFieldElementCache: WeakMap<FieldAccessor<string>, Descendant[]>\n}\n\nexport const useRichTextFieldNodes = ({\n\teditor,\n\tfieldAccessor,\n\tcontemberFieldElementCache,\n}: UseRichTextFieldEditorNodeOptions): Descendant[] => {\n\tif (contemberFieldElementCache.has(fieldAccessor)) {\n\t\treturn contemberFieldElementCache.get(fieldAccessor)!\n\t}\n\n\tconst fieldValue = fieldAccessor.value\n\tif (typeof fieldValue !== 'string' && fieldValue !== null) {\n\t\tthrow new BindingError(`RichTextField: the underlying field does not contain a string value.`)\n\t}\n\n\tconst elements: Descendant[] = fieldValue === null || fieldValue === ''\n\t\t? [editor.createDefaultElement([{ text: '' }])]\n\t\t: [\n\t\t\teditor.createDefaultElement(\n\t\t\t\teditor.deserializeNodes(\n\t\t\t\t\tfieldValue,\n\t\t\t\t\t`RichTextField: the underlying field contains invalid JSON.`,\n\t\t\t\t) as Descendant[],\n\t\t\t),\n\t\t]\n\tcontemberFieldElementCache.set(fieldAccessor, elements)\n\n\treturn elements\n}\n"],"names":["BindingError"],"mappings":";;;AASO,MAAM,wBAAwB,CAAC;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AACD,MAAuD;AACtD,MAAI,2BAA2B,IAAI,aAAa,GAAG;AAClD,WAAO,2BAA2B,IAAI,aAAa;AAAA,EACpD;AAEA,QAAM,aAAa,cAAc;AACjC,MAAI,OAAO,eAAe,YAAY,eAAe,MAAM;AAC1D,UAAM,IAAIA,aAAAA,aAAa,sEAAsE;AAAA,EAC9F;AAEA,QAAM,WAAyB,eAAe,QAAQ,eAAe,KAClE,CAAC,OAAO,qBAAqB,CAAC,EAAE,MAAM,GAAA,CAAI,CAAC,CAAC,IAC5C;AAAA,IACD,OAAO;AAAA,MACN,OAAO;AAAA,QACN;AAAA,QACA;AAAA,MAAA;AAAA,IACD;AAAA,EACD;AAEF,6BAA2B,IAAI,eAAe,QAAQ;AAEtD,SAAO;AACR;;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BindingError } from "@contember/react-binding";
|
|
2
|
+
const useRichTextFieldNodes = ({
|
|
3
|
+
editor,
|
|
4
|
+
fieldAccessor,
|
|
5
|
+
contemberFieldElementCache
|
|
6
|
+
}) => {
|
|
7
|
+
if (contemberFieldElementCache.has(fieldAccessor)) {
|
|
8
|
+
return contemberFieldElementCache.get(fieldAccessor);
|
|
9
|
+
}
|
|
10
|
+
const fieldValue = fieldAccessor.value;
|
|
11
|
+
if (typeof fieldValue !== "string" && fieldValue !== null) {
|
|
12
|
+
throw new BindingError(`RichTextField: the underlying field does not contain a string value.`);
|
|
13
|
+
}
|
|
14
|
+
const elements = fieldValue === null || fieldValue === "" ? [editor.createDefaultElement([{ text: "" }])] : [
|
|
15
|
+
editor.createDefaultElement(
|
|
16
|
+
editor.deserializeNodes(
|
|
17
|
+
fieldValue,
|
|
18
|
+
`RichTextField: the underlying field contains invalid JSON.`
|
|
19
|
+
)
|
|
20
|
+
)
|
|
21
|
+
];
|
|
22
|
+
contemberFieldElementCache.set(fieldAccessor, elements);
|
|
23
|
+
return elements;
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
useRichTextFieldNodes
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=useRichTextFieldNodes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRichTextFieldNodes.js","sources":["../../../../../../packages/react-slate-editor-base/src/internal/hooks/useRichTextFieldNodes.ts"],"sourcesContent":["import { BindingError, FieldAccessor } from '@contember/react-binding'\nimport { Descendant, Editor } from 'slate'\n\nexport interface UseRichTextFieldEditorNodeOptions {\n\teditor: Editor\n\tfieldAccessor: FieldAccessor<string>\n\tcontemberFieldElementCache: WeakMap<FieldAccessor<string>, Descendant[]>\n}\n\nexport const useRichTextFieldNodes = ({\n\teditor,\n\tfieldAccessor,\n\tcontemberFieldElementCache,\n}: UseRichTextFieldEditorNodeOptions): Descendant[] => {\n\tif (contemberFieldElementCache.has(fieldAccessor)) {\n\t\treturn contemberFieldElementCache.get(fieldAccessor)!\n\t}\n\n\tconst fieldValue = fieldAccessor.value\n\tif (typeof fieldValue !== 'string' && fieldValue !== null) {\n\t\tthrow new BindingError(`RichTextField: the underlying field does not contain a string value.`)\n\t}\n\n\tconst elements: Descendant[] = fieldValue === null || fieldValue === ''\n\t\t? [editor.createDefaultElement([{ text: '' }])]\n\t\t: [\n\t\t\teditor.createDefaultElement(\n\t\t\t\teditor.deserializeNodes(\n\t\t\t\t\tfieldValue,\n\t\t\t\t\t`RichTextField: the underlying field contains invalid JSON.`,\n\t\t\t\t) as Descendant[],\n\t\t\t),\n\t\t]\n\tcontemberFieldElementCache.set(fieldAccessor, elements)\n\n\treturn elements\n}\n"],"names":[],"mappings":";AASO,MAAM,wBAAwB,CAAC;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AACD,MAAuD;AACtD,MAAI,2BAA2B,IAAI,aAAa,GAAG;AAClD,WAAO,2BAA2B,IAAI,aAAa;AAAA,EACpD;AAEA,QAAM,aAAa,cAAc;AACjC,MAAI,OAAO,eAAe,YAAY,eAAe,MAAM;AAC1D,UAAM,IAAI,aAAa,sEAAsE;AAAA,EAC9F;AAEA,QAAM,WAAyB,eAAe,QAAQ,eAAe,KAClE,CAAC,OAAO,qBAAqB,CAAC,EAAE,MAAM,GAAA,CAAI,CAAC,CAAC,IAC5C;AAAA,IACD,OAAO;AAAA,MACN,OAAO;AAAA,QACN;AAAA,QACA;AAAA,MAAA;AAAA,IACD;AAAA,EACD;AAEF,6BAA2B,IAAI,eAAe,QAAQ;AAEtD,SAAO;AACR;"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
class EditorPasteUtils {
|
|
4
|
+
static wordPasteListItemContent(allNodes) {
|
|
5
|
+
const nodes = [];
|
|
6
|
+
let ignoring = false;
|
|
7
|
+
let forProcessing = Array.from(allNodes);
|
|
8
|
+
if (forProcessing.length === 1 && forProcessing[0].nodeName === "SPAN" || forProcessing.length === 2 && forProcessing[0].nodeName === "SPAN" && forProcessing[1].nodeName === "O:P") {
|
|
9
|
+
forProcessing = Array.from(forProcessing[0].childNodes);
|
|
10
|
+
}
|
|
11
|
+
for (const node of forProcessing) {
|
|
12
|
+
const isStartIgnore = node.nodeType === Node.COMMENT_NODE && node.nodeValue === "[if !supportLists]";
|
|
13
|
+
if (isStartIgnore) {
|
|
14
|
+
ignoring = true;
|
|
15
|
+
} else {
|
|
16
|
+
const isEndIgnore = node.nodeType === Node.COMMENT_NODE && node.nodeValue === "[endif]";
|
|
17
|
+
if (isEndIgnore) {
|
|
18
|
+
ignoring = false;
|
|
19
|
+
} else {
|
|
20
|
+
if (!ignoring) {
|
|
21
|
+
nodes.push(node);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return nodes;
|
|
27
|
+
}
|
|
28
|
+
static flattenNodesWithType(withType, defaultElementFactory) {
|
|
29
|
+
const withTypeFiltered = withType.filter((item) => item !== null);
|
|
30
|
+
const containsBlock = withTypeFiltered.find(({ elements }) => elements !== void 0) !== void 0;
|
|
31
|
+
if (containsBlock) {
|
|
32
|
+
return {
|
|
33
|
+
elements: withTypeFiltered.flatMap((item) => {
|
|
34
|
+
if (item.elements === void 0) {
|
|
35
|
+
return [defaultElementFactory(item.texts)];
|
|
36
|
+
} else {
|
|
37
|
+
return item.elements;
|
|
38
|
+
}
|
|
39
|
+
})
|
|
40
|
+
};
|
|
41
|
+
} else {
|
|
42
|
+
return { texts: withTypeFiltered.flatMap((item) => item.texts) };
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.EditorPasteUtils = EditorPasteUtils;
|
|
47
|
+
//# sourceMappingURL=EditorPasteUtils.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditorPasteUtils.cjs","sources":["../../../../../../packages/react-slate-editor-base/src/internal/utils/EditorPasteUtils.ts"],"sourcesContent":["import { Element } from 'slate'\nimport { NodesWithType } from '../../plugins/behaviour/paste/HtmlDeserializer'\nimport { EditorDefaultElementFactory } from '../../types/editor'\n\nexport class EditorPasteUtils {\n\tpublic static wordPasteListItemContent(allNodes: Iterable<Node> | ArrayLike<Node>): Node[] {\n\t\tconst nodes: Node[] = []\n\t\tlet ignoring = false\n\t\tlet forProcessing = Array.from(allNodes)\n\t\tif (\n\t\t\t(forProcessing.length === 1 && forProcessing[0].nodeName === 'SPAN')\n\t\t\t|| (forProcessing.length === 2 && forProcessing[0].nodeName === 'SPAN' && forProcessing[1].nodeName === 'O:P')\n\t\t) {\n\t\t\tforProcessing = Array.from(forProcessing[0].childNodes)\n\t\t}\n\n\t\tfor (const node of forProcessing) {\n\t\t\tconst isStartIgnore = node.nodeType === Node.COMMENT_NODE && node.nodeValue === '[if !supportLists]'\n\t\t\tif (isStartIgnore) {\n\t\t\t\tignoring = true\n\t\t\t} else {\n\t\t\t\tconst isEndIgnore = node.nodeType === Node.COMMENT_NODE && node.nodeValue === '[endif]'\n\t\t\t\tif (isEndIgnore) {\n\t\t\t\t\tignoring = false\n\t\t\t\t} else {\n\t\t\t\t\tif (!ignoring) {\n\t\t\t\t\t\tnodes.push(node)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn nodes\n\t}\n\n\tpublic static flattenNodesWithType(withType: NodesWithType[], defaultElementFactory: EditorDefaultElementFactory): NodesWithType {\n\t\tconst withTypeFiltered = withType.filter((item): item is Exclude<NodesWithType, null> => item !== null)\n\t\tconst containsBlock = withTypeFiltered.find(({ elements }) => elements !== undefined) !== undefined\n\n\t\tif (containsBlock) {\n\t\t\treturn {\n\t\t\t\telements: withTypeFiltered.flatMap<Element>(item => {\n\t\t\t\t\tif (item.elements === undefined) {\n\t\t\t\t\t\treturn [defaultElementFactory(item.texts)]\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn item.elements\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t}\n\t\t} else {\n\t\t\treturn { texts: withTypeFiltered.flatMap(item => item.texts!) }\n\t\t}\n\t}\n}\n"],"names":[],"mappings":";;AAIO,MAAM,iBAAiB;AAAA,EAC7B,OAAc,yBAAyB,UAAoD;AAC1F,UAAM,QAAgB,CAAA;AACtB,QAAI,WAAW;AACf,QAAI,gBAAgB,MAAM,KAAK,QAAQ;AACvC,QACE,cAAc,WAAW,KAAK,cAAc,CAAC,EAAE,aAAa,UACzD,cAAc,WAAW,KAAK,cAAc,CAAC,EAAE,aAAa,UAAU,cAAc,CAAC,EAAE,aAAa,OACvG;AACD,sBAAgB,MAAM,KAAK,cAAc,CAAC,EAAE,UAAU;AAAA,IACvD;AAEA,eAAW,QAAQ,eAAe;AACjC,YAAM,gBAAgB,KAAK,aAAa,KAAK,gBAAgB,KAAK,cAAc;AAChF,UAAI,eAAe;AAClB,mBAAW;AAAA,MACZ,OAAO;AACN,cAAM,cAAc,KAAK,aAAa,KAAK,gBAAgB,KAAK,cAAc;AAC9E,YAAI,aAAa;AAChB,qBAAW;AAAA,QACZ,OAAO;AACN,cAAI,CAAC,UAAU;AACd,kBAAM,KAAK,IAAI;AAAA,UAChB;AAAA,QACD;AAAA,MACD;AAAA,IACD;AACA,WAAO;AAAA,EACR;AAAA,EAEA,OAAc,qBAAqB,UAA2B,uBAAmE;AAChI,UAAM,mBAAmB,SAAS,OAAO,CAAC,SAA+C,SAAS,IAAI;AACtG,UAAM,gBAAgB,iBAAiB,KAAK,CAAC,EAAE,eAAe,aAAa,MAAS,MAAM;AAE1F,QAAI,eAAe;AAClB,aAAO;AAAA,QACN,UAAU,iBAAiB,QAAiB,CAAA,SAAQ;AACnD,cAAI,KAAK,aAAa,QAAW;AAChC,mBAAO,CAAC,sBAAsB,KAAK,KAAK,CAAC;AAAA,UAC1C,OAAO;AACN,mBAAO,KAAK;AAAA,UACb;AAAA,QACD,CAAC;AAAA,MAAA;AAAA,IAEH,OAAO;AACN,aAAO,EAAE,OAAO,iBAAiB,QAAQ,CAAA,SAAQ,KAAK,KAAM,EAAA;AAAA,IAC7D;AAAA,EACD;AACD;;"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
class EditorPasteUtils {
|
|
2
|
+
static wordPasteListItemContent(allNodes) {
|
|
3
|
+
const nodes = [];
|
|
4
|
+
let ignoring = false;
|
|
5
|
+
let forProcessing = Array.from(allNodes);
|
|
6
|
+
if (forProcessing.length === 1 && forProcessing[0].nodeName === "SPAN" || forProcessing.length === 2 && forProcessing[0].nodeName === "SPAN" && forProcessing[1].nodeName === "O:P") {
|
|
7
|
+
forProcessing = Array.from(forProcessing[0].childNodes);
|
|
8
|
+
}
|
|
9
|
+
for (const node of forProcessing) {
|
|
10
|
+
const isStartIgnore = node.nodeType === Node.COMMENT_NODE && node.nodeValue === "[if !supportLists]";
|
|
11
|
+
if (isStartIgnore) {
|
|
12
|
+
ignoring = true;
|
|
13
|
+
} else {
|
|
14
|
+
const isEndIgnore = node.nodeType === Node.COMMENT_NODE && node.nodeValue === "[endif]";
|
|
15
|
+
if (isEndIgnore) {
|
|
16
|
+
ignoring = false;
|
|
17
|
+
} else {
|
|
18
|
+
if (!ignoring) {
|
|
19
|
+
nodes.push(node);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return nodes;
|
|
25
|
+
}
|
|
26
|
+
static flattenNodesWithType(withType, defaultElementFactory) {
|
|
27
|
+
const withTypeFiltered = withType.filter((item) => item !== null);
|
|
28
|
+
const containsBlock = withTypeFiltered.find(({ elements }) => elements !== void 0) !== void 0;
|
|
29
|
+
if (containsBlock) {
|
|
30
|
+
return {
|
|
31
|
+
elements: withTypeFiltered.flatMap((item) => {
|
|
32
|
+
if (item.elements === void 0) {
|
|
33
|
+
return [defaultElementFactory(item.texts)];
|
|
34
|
+
} else {
|
|
35
|
+
return item.elements;
|
|
36
|
+
}
|
|
37
|
+
})
|
|
38
|
+
};
|
|
39
|
+
} else {
|
|
40
|
+
return { texts: withTypeFiltered.flatMap((item) => item.texts) };
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
EditorPasteUtils
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=EditorPasteUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditorPasteUtils.js","sources":["../../../../../../packages/react-slate-editor-base/src/internal/utils/EditorPasteUtils.ts"],"sourcesContent":["import { Element } from 'slate'\nimport { NodesWithType } from '../../plugins/behaviour/paste/HtmlDeserializer'\nimport { EditorDefaultElementFactory } from '../../types/editor'\n\nexport class EditorPasteUtils {\n\tpublic static wordPasteListItemContent(allNodes: Iterable<Node> | ArrayLike<Node>): Node[] {\n\t\tconst nodes: Node[] = []\n\t\tlet ignoring = false\n\t\tlet forProcessing = Array.from(allNodes)\n\t\tif (\n\t\t\t(forProcessing.length === 1 && forProcessing[0].nodeName === 'SPAN')\n\t\t\t|| (forProcessing.length === 2 && forProcessing[0].nodeName === 'SPAN' && forProcessing[1].nodeName === 'O:P')\n\t\t) {\n\t\t\tforProcessing = Array.from(forProcessing[0].childNodes)\n\t\t}\n\n\t\tfor (const node of forProcessing) {\n\t\t\tconst isStartIgnore = node.nodeType === Node.COMMENT_NODE && node.nodeValue === '[if !supportLists]'\n\t\t\tif (isStartIgnore) {\n\t\t\t\tignoring = true\n\t\t\t} else {\n\t\t\t\tconst isEndIgnore = node.nodeType === Node.COMMENT_NODE && node.nodeValue === '[endif]'\n\t\t\t\tif (isEndIgnore) {\n\t\t\t\t\tignoring = false\n\t\t\t\t} else {\n\t\t\t\t\tif (!ignoring) {\n\t\t\t\t\t\tnodes.push(node)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn nodes\n\t}\n\n\tpublic static flattenNodesWithType(withType: NodesWithType[], defaultElementFactory: EditorDefaultElementFactory): NodesWithType {\n\t\tconst withTypeFiltered = withType.filter((item): item is Exclude<NodesWithType, null> => item !== null)\n\t\tconst containsBlock = withTypeFiltered.find(({ elements }) => elements !== undefined) !== undefined\n\n\t\tif (containsBlock) {\n\t\t\treturn {\n\t\t\t\telements: withTypeFiltered.flatMap<Element>(item => {\n\t\t\t\t\tif (item.elements === undefined) {\n\t\t\t\t\t\treturn [defaultElementFactory(item.texts)]\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn item.elements\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t}\n\t\t} else {\n\t\t\treturn { texts: withTypeFiltered.flatMap(item => item.texts!) }\n\t\t}\n\t}\n}\n"],"names":[],"mappings":"AAIO,MAAM,iBAAiB;AAAA,EAC7B,OAAc,yBAAyB,UAAoD;AAC1F,UAAM,QAAgB,CAAA;AACtB,QAAI,WAAW;AACf,QAAI,gBAAgB,MAAM,KAAK,QAAQ;AACvC,QACE,cAAc,WAAW,KAAK,cAAc,CAAC,EAAE,aAAa,UACzD,cAAc,WAAW,KAAK,cAAc,CAAC,EAAE,aAAa,UAAU,cAAc,CAAC,EAAE,aAAa,OACvG;AACD,sBAAgB,MAAM,KAAK,cAAc,CAAC,EAAE,UAAU;AAAA,IACvD;AAEA,eAAW,QAAQ,eAAe;AACjC,YAAM,gBAAgB,KAAK,aAAa,KAAK,gBAAgB,KAAK,cAAc;AAChF,UAAI,eAAe;AAClB,mBAAW;AAAA,MACZ,OAAO;AACN,cAAM,cAAc,KAAK,aAAa,KAAK,gBAAgB,KAAK,cAAc;AAC9E,YAAI,aAAa;AAChB,qBAAW;AAAA,QACZ,OAAO;AACN,cAAI,CAAC,UAAU;AACd,kBAAM,KAAK,IAAI;AAAA,UAChB;AAAA,QACD;AAAA,MACD;AAAA,IACD;AACA,WAAO;AAAA,EACR;AAAA,EAEA,OAAc,qBAAqB,UAA2B,uBAAmE;AAChI,UAAM,mBAAmB,SAAS,OAAO,CAAC,SAA+C,SAAS,IAAI;AACtG,UAAM,gBAAgB,iBAAiB,KAAK,CAAC,EAAE,eAAe,aAAa,MAAS,MAAM;AAE1F,QAAI,eAAe;AAClB,aAAO;AAAA,QACN,UAAU,iBAAiB,QAAiB,CAAA,SAAQ;AACnD,cAAI,KAAK,aAAa,QAAW;AAChC,mBAAO,CAAC,sBAAsB,KAAK,KAAK,CAAC;AAAA,UAC1C,OAAO;AACN,mBAAO,KAAK;AAAA,UACb;AAAA,QACD,CAAC;AAAA,MAAA;AAAA,IAEH,OAAO;AACN,aAAO,EAAE,OAAO,iBAAiB,QAAQ,CAAA,SAAQ,KAAK,KAAM,EAAA;AAAA,IAC7D;AAAA,EACD;AACD;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const parseUrl = (url) => {
|
|
4
|
+
if (url.length < 4 || url.includes(" ")) {
|
|
5
|
+
return void 0;
|
|
6
|
+
}
|
|
7
|
+
try {
|
|
8
|
+
return new URL(url);
|
|
9
|
+
} catch {
|
|
10
|
+
return void 0;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
exports.parseUrl = parseUrl;
|
|
14
|
+
//# sourceMappingURL=parseUrl.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseUrl.cjs","sources":["../../../../../../packages/react-slate-editor-base/src/internal/utils/parseUrl.ts"],"sourcesContent":["export const parseUrl = (url: string): URL | undefined => {\n\tif (url.length < 4 || url.includes(' ')) {\n\t\t// This is almost definitely not an url anyway.\n\t\t// By returning early, we avoid the relatively costly URL constructor and can speed up the most common case of\n\t\t// just inserting a single character which better be as fast as possible.\n\t\treturn undefined\n\t}\n\ttry {\n\t\treturn new URL(url)\n\t} catch {\n\t\treturn undefined\n\t}\n}\n"],"names":[],"mappings":";;AAAO,MAAM,WAAW,CAAC,QAAiC;AACzD,MAAI,IAAI,SAAS,KAAK,IAAI,SAAS,GAAG,GAAG;AAIxC,WAAO;AAAA,EACR;AACA,MAAI;AACH,WAAO,IAAI,IAAI,GAAG;AAAA,EACnB,QAAQ;AACP,WAAO;AAAA,EACR;AACD;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseUrl.js","sources":["../../../../../../packages/react-slate-editor-base/src/internal/utils/parseUrl.ts"],"sourcesContent":["export const parseUrl = (url: string): URL | undefined => {\n\tif (url.length < 4 || url.includes(' ')) {\n\t\t// This is almost definitely not an url anyway.\n\t\t// By returning early, we avoid the relatively costly URL constructor and can speed up the most common case of\n\t\t// just inserting a single character which better be as fast as possible.\n\t\treturn undefined\n\t}\n\ttry {\n\t\treturn new URL(url)\n\t} catch {\n\t\treturn undefined\n\t}\n}\n"],"names":[],"mappings":"AAAO,MAAM,WAAW,CAAC,QAAiC;AACzD,MAAI,IAAI,SAAS,KAAK,IAAI,SAAS,GAAG,GAAG;AAIxC,WAAO;AAAA,EACR;AACA,MAAI;AACH,WAAO,IAAI,IAAI,GAAG;AAAA,EACnB,QAAQ;AACP,WAAO;AAAA,EACR;AACD;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const Slate = require("slate");
|
|
4
|
+
const isAlignTarget = (editor, it, direction) => Slate.Element.isElement(it) && editor.acceptsAttributes(it.type, { align: direction });
|
|
5
|
+
const createAlignHandler = (direction) => ({
|
|
6
|
+
shouldDisplay: ({ editor }) => {
|
|
7
|
+
return Array.from(Slate.Editor.nodes(editor, { match: (it) => isAlignTarget(editor, it, direction) })).length > 0;
|
|
8
|
+
},
|
|
9
|
+
isActive: ({ editor }) => {
|
|
10
|
+
return Array.from(Slate.Editor.nodes(editor, { match: (it) => isAlignTarget(editor, it, direction) && it.align === direction })).length > 0;
|
|
11
|
+
},
|
|
12
|
+
toggle: ({ editor }) => {
|
|
13
|
+
Slate.Transforms.setNodes(editor, {
|
|
14
|
+
align: direction
|
|
15
|
+
}, {
|
|
16
|
+
match: (it) => isAlignTarget(editor, it, direction)
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
exports.createAlignHandler = createAlignHandler;
|
|
21
|
+
//# sourceMappingURL=alignButton.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alignButton.cjs","sources":["../../../../../../../packages/react-slate-editor-base/src/plugins/attributes/alignment/alignButton.ts"],"sourcesContent":["import { Editor, Element as SlateElement, Node, Transforms } from 'slate'\n\nexport type AlignDirection = 'start' | 'center' | 'end' | 'justify' | undefined\n\nconst isAlignTarget = (editor: Editor, it: Node, direction: AlignDirection) =>\n\tSlateElement.isElement(it)\n\t&& editor.acceptsAttributes(it.type, { align: direction })\n\nexport const createAlignHandler = (direction: AlignDirection): {\n\tisActive?: (args: { editor: Editor }) => boolean\n\tshouldDisplay?: (args: { editor: Editor }) => boolean\n\ttoggle: (args: { editor: Editor }) => void\n} => ({\n\tshouldDisplay: ({ editor }) => {\n\t\treturn Array.from(Editor.nodes(editor, { match: it => isAlignTarget(editor, it, direction) })).length > 0\n\t},\n\tisActive: ({ editor }) => {\n\t\treturn Array.from(Editor.nodes(editor, { match: it => isAlignTarget(editor, it, direction) && (it as any).align === direction })).length > 0\n\t},\n\ttoggle: ({ editor }) => {\n\t\tTransforms.setNodes(editor, {\n\t\t\talign: direction,\n\t\t}, {\n\t\t\tmatch: it => isAlignTarget(editor, it, direction),\n\t\t})\n\t},\n})\n"],"names":["SlateElement","Editor","Transforms"],"mappings":";;;AAIA,MAAM,gBAAgB,CAAC,QAAgB,IAAU,cAChDA,MAAAA,QAAa,UAAU,EAAE,KACtB,OAAO,kBAAkB,GAAG,MAAM,EAAE,OAAO,WAAW;AAEnD,MAAM,qBAAqB,CAAC,eAI7B;AAAA,EACL,eAAe,CAAC,EAAE,aAAa;AAC9B,WAAO,MAAM,KAAKC,MAAAA,OAAO,MAAM,QAAQ,EAAE,OAAO,CAAA,OAAM,cAAc,QAAQ,IAAI,SAAS,EAAA,CAAG,CAAC,EAAE,SAAS;AAAA,EACzG;AAAA,EACA,UAAU,CAAC,EAAE,aAAa;AACzB,WAAO,MAAM,KAAKA,aAAO,MAAM,QAAQ,EAAE,OAAO,CAAA,OAAM,cAAc,QAAQ,IAAI,SAAS,KAAM,GAAW,UAAU,WAAW,CAAC,EAAE,SAAS;AAAA,EAC5I;AAAA,EACA,QAAQ,CAAC,EAAE,aAAa;AACvBC,UAAAA,WAAW,SAAS,QAAQ;AAAA,MAC3B,OAAO;AAAA,IAAA,GACL;AAAA,MACF,OAAO,CAAA,OAAM,cAAc,QAAQ,IAAI,SAAS;AAAA,IAAA,CAChD;AAAA,EACF;AACD;;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Transforms, Editor, Element } from "slate";
|
|
2
|
+
const isAlignTarget = (editor, it, direction) => Element.isElement(it) && editor.acceptsAttributes(it.type, { align: direction });
|
|
3
|
+
const createAlignHandler = (direction) => ({
|
|
4
|
+
shouldDisplay: ({ editor }) => {
|
|
5
|
+
return Array.from(Editor.nodes(editor, { match: (it) => isAlignTarget(editor, it, direction) })).length > 0;
|
|
6
|
+
},
|
|
7
|
+
isActive: ({ editor }) => {
|
|
8
|
+
return Array.from(Editor.nodes(editor, { match: (it) => isAlignTarget(editor, it, direction) && it.align === direction })).length > 0;
|
|
9
|
+
},
|
|
10
|
+
toggle: ({ editor }) => {
|
|
11
|
+
Transforms.setNodes(editor, {
|
|
12
|
+
align: direction
|
|
13
|
+
}, {
|
|
14
|
+
match: (it) => isAlignTarget(editor, it, direction)
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
export {
|
|
19
|
+
createAlignHandler
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=alignButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alignButton.js","sources":["../../../../../../../packages/react-slate-editor-base/src/plugins/attributes/alignment/alignButton.ts"],"sourcesContent":["import { Editor, Element as SlateElement, Node, Transforms } from 'slate'\n\nexport type AlignDirection = 'start' | 'center' | 'end' | 'justify' | undefined\n\nconst isAlignTarget = (editor: Editor, it: Node, direction: AlignDirection) =>\n\tSlateElement.isElement(it)\n\t&& editor.acceptsAttributes(it.type, { align: direction })\n\nexport const createAlignHandler = (direction: AlignDirection): {\n\tisActive?: (args: { editor: Editor }) => boolean\n\tshouldDisplay?: (args: { editor: Editor }) => boolean\n\ttoggle: (args: { editor: Editor }) => void\n} => ({\n\tshouldDisplay: ({ editor }) => {\n\t\treturn Array.from(Editor.nodes(editor, { match: it => isAlignTarget(editor, it, direction) })).length > 0\n\t},\n\tisActive: ({ editor }) => {\n\t\treturn Array.from(Editor.nodes(editor, { match: it => isAlignTarget(editor, it, direction) && (it as any).align === direction })).length > 0\n\t},\n\ttoggle: ({ editor }) => {\n\t\tTransforms.setNodes(editor, {\n\t\t\talign: direction,\n\t\t}, {\n\t\t\tmatch: it => isAlignTarget(editor, it, direction),\n\t\t})\n\t},\n})\n"],"names":["SlateElement"],"mappings":";AAIA,MAAM,gBAAgB,CAAC,QAAgB,IAAU,cAChDA,QAAa,UAAU,EAAE,KACtB,OAAO,kBAAkB,GAAG,MAAM,EAAE,OAAO,WAAW;AAEnD,MAAM,qBAAqB,CAAC,eAI7B;AAAA,EACL,eAAe,CAAC,EAAE,aAAa;AAC9B,WAAO,MAAM,KAAK,OAAO,MAAM,QAAQ,EAAE,OAAO,CAAA,OAAM,cAAc,QAAQ,IAAI,SAAS,EAAA,CAAG,CAAC,EAAE,SAAS;AAAA,EACzG;AAAA,EACA,UAAU,CAAC,EAAE,aAAa;AACzB,WAAO,MAAM,KAAK,OAAO,MAAM,QAAQ,EAAE,OAAO,CAAA,OAAM,cAAc,QAAQ,IAAI,SAAS,KAAM,GAAW,UAAU,WAAW,CAAC,EAAE,SAAS;AAAA,EAC5I;AAAA,EACA,QAAQ,CAAC,EAAE,aAAa;AACvB,eAAW,SAAS,QAAQ;AAAA,MAC3B,OAAO;AAAA,IAAA,GACL;AAAA,MACF,OAAO,CAAA,OAAM,cAAc,QAAQ,IAAI,SAAS;AAAA,IAAA,CAChD;AAAA,EACF;AACD;"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const ignoredElements = ["SCRIPT", "STYLE", "TEMPLATE"];
|
|
4
|
+
class HtmlDeserializer {
|
|
5
|
+
constructor(createDefaultElement, plugins) {
|
|
6
|
+
this.createDefaultElement = createDefaultElement;
|
|
7
|
+
this.plugins = plugins;
|
|
8
|
+
}
|
|
9
|
+
registerPlugin(plugin, prepend = true) {
|
|
10
|
+
prepend ? this.plugins.unshift(plugin) : this.plugins.push(plugin);
|
|
11
|
+
}
|
|
12
|
+
processNodeListPaste(nodeList, cumulativeTextAttrs) {
|
|
13
|
+
for (const plugin of this.plugins) {
|
|
14
|
+
const result = plugin.processNodeListPaste?.({ nodeList, cumulativeTextAttrs, deserializer: this }) ?? null;
|
|
15
|
+
if (result !== null) {
|
|
16
|
+
return result;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
const processed = [];
|
|
20
|
+
for (const childNode of nodeList) {
|
|
21
|
+
const isWhiteSpace = childNode.nodeType === Node.TEXT_NODE && childNode.textContent?.match(/^\s*$/) !== null;
|
|
22
|
+
const attrs = this.processWithAttributeProcessor(childNode, cumulativeTextAttrs);
|
|
23
|
+
const result = childNode instanceof HTMLElement ? this.processBlockPaste(
|
|
24
|
+
childNode,
|
|
25
|
+
cumulativeTextAttrs
|
|
26
|
+
) : null;
|
|
27
|
+
if (result !== null) {
|
|
28
|
+
processed.push(...(Array.isArray(result) ? result : [result]).map((element) => ({ element })));
|
|
29
|
+
} else {
|
|
30
|
+
const result2 = this.deserializeTextNode(childNode, cumulativeTextAttrs);
|
|
31
|
+
if (result2 !== null) {
|
|
32
|
+
processed.push(...result2.map((text) => ({ text, isWhiteSpace })));
|
|
33
|
+
} else {
|
|
34
|
+
const deserializedChildren = this.processNodeListPaste(
|
|
35
|
+
Array.from(childNode.childNodes),
|
|
36
|
+
attrs
|
|
37
|
+
);
|
|
38
|
+
processed.push(
|
|
39
|
+
...deserializedChildren === null ? [] : deserializedChildren.texts !== void 0 ? deserializedChildren.texts.map((text) => ({ text, isWhiteSpace })) : deserializedChildren.elements.map((element) => ({ element }))
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (processed.length === 0) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
const containsBlock = processed.find(({ element }) => element !== void 0) !== void 0;
|
|
48
|
+
if (containsBlock) {
|
|
49
|
+
return {
|
|
50
|
+
elements: processed.flatMap((item) => {
|
|
51
|
+
if (item.text !== void 0) {
|
|
52
|
+
return item.isWhiteSpace ? [] : [this.createDefaultElement([item.text])];
|
|
53
|
+
} else if (item.element !== void 0) {
|
|
54
|
+
return [item.element];
|
|
55
|
+
}
|
|
56
|
+
return [];
|
|
57
|
+
})
|
|
58
|
+
};
|
|
59
|
+
} else {
|
|
60
|
+
return { texts: processed.map((item) => item.text) };
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
deserializeInline(list, cumulativeTextAttrs) {
|
|
64
|
+
return Array.from(list).flatMap((childNode) => {
|
|
65
|
+
const result = this.deserializeTextNode(childNode, cumulativeTextAttrs);
|
|
66
|
+
if (result !== null) {
|
|
67
|
+
return result;
|
|
68
|
+
} else {
|
|
69
|
+
const attrs = this.processWithAttributeProcessor(childNode, cumulativeTextAttrs);
|
|
70
|
+
return this.deserializeInline(childNode.childNodes, attrs);
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
deserializeBlocks(list, cumulativeTextAttrs) {
|
|
75
|
+
const result = this.processNodeListPaste(list, cumulativeTextAttrs);
|
|
76
|
+
return result?.texts ?? result?.elements ?? [];
|
|
77
|
+
}
|
|
78
|
+
deserializeTextNode(node, cumulativeTextAttrs) {
|
|
79
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
80
|
+
const text = node.textContent ?? "";
|
|
81
|
+
return [{ ...cumulativeTextAttrs, text: text.replace(/[ \t]*(?:\r?\n[ \t]*)+/g, " ") }];
|
|
82
|
+
} else if (node instanceof HTMLElement) {
|
|
83
|
+
const result = this.processInlinePaste(
|
|
84
|
+
node,
|
|
85
|
+
cumulativeTextAttrs
|
|
86
|
+
);
|
|
87
|
+
if (result !== null) {
|
|
88
|
+
return Array.isArray(result) ? result : [result];
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
processInlinePaste(element, cumulativeTextAttrs) {
|
|
94
|
+
if (ignoredElements.includes(element.tagName)) {
|
|
95
|
+
return [];
|
|
96
|
+
}
|
|
97
|
+
if (element.tagName === "BR") {
|
|
98
|
+
return { ...cumulativeTextAttrs, text: " " };
|
|
99
|
+
}
|
|
100
|
+
const next = (list, cta) => {
|
|
101
|
+
const attrs = this.processWithAttributeProcessor(element, cta);
|
|
102
|
+
return this.deserializeInline(list, attrs);
|
|
103
|
+
};
|
|
104
|
+
for (const plugin of this.plugins) {
|
|
105
|
+
const result = plugin.processInlinePaste?.({ element, next, cumulativeTextAttrs, deserializer: this }) ?? null;
|
|
106
|
+
if (result !== null) {
|
|
107
|
+
return result;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
processWithAttributeProcessor(element, cumulativeTextAttrs) {
|
|
113
|
+
if (!(element instanceof HTMLElement)) {
|
|
114
|
+
return {};
|
|
115
|
+
}
|
|
116
|
+
return this.plugins.reduce(
|
|
117
|
+
(cta, plugin) => plugin.processAttributesPaste?.({ element, cumulativeTextAttrs, deserializer: this }) ?? cta,
|
|
118
|
+
cumulativeTextAttrs
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
processBlockPaste(element, cumulativeTextAttrs) {
|
|
122
|
+
if (ignoredElements.includes(element.tagName)) {
|
|
123
|
+
return [];
|
|
124
|
+
}
|
|
125
|
+
const next = (list, cta) => this.deserializeBlocks(Array.from(list), { ...cumulativeTextAttrs, ...cta });
|
|
126
|
+
for (const plugin of this.plugins) {
|
|
127
|
+
const result = plugin.processBlockPaste?.({ element, next, cumulativeTextAttrs, deserializer: this }) ?? null;
|
|
128
|
+
if (result !== null) {
|
|
129
|
+
return result;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return null;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
exports.HtmlDeserializer = HtmlDeserializer;
|
|
136
|
+
//# sourceMappingURL=HtmlDeserializer.cjs.map
|