react-native-enriched-html 0.0.0 → 1.0.1
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/LICENSE +20 -0
- package/README.md +402 -0
- package/ReactNativeEnrichedHtml.podspec +31 -0
- package/android/build.gradle +106 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedTextInputViewManagerDelegate.java +203 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedTextInputViewManagerInterface.java +74 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedTextViewManagerDelegate.java +70 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedTextViewManagerInterface.java +31 -0
- package/android/generated/jni/react/renderer/components/ReactNativeEnrichedSpec/ComponentDescriptors.cpp +22 -0
- package/android/generated/jni/react/renderer/components/ReactNativeEnrichedSpec/ComponentDescriptors.h +24 -0
- package/android/generated/jni/react/renderer/components/ReactNativeEnrichedSpec/EventEmitters.cpp +456 -0
- package/android/generated/jni/react/renderer/components/ReactNativeEnrichedSpec/EventEmitters.h +410 -0
- package/android/generated/jni/react/renderer/components/ReactNativeEnrichedSpec/Props.cpp +272 -0
- package/android/generated/jni/react/renderer/components/ReactNativeEnrichedSpec/Props.h +1595 -0
- package/android/generated/jni/react/renderer/components/ReactNativeEnrichedSpec/ShadowNodes.cpp +17 -0
- package/android/generated/jni/react/renderer/components/ReactNativeEnrichedSpec/ShadowNodes.h +23 -0
- package/android/generated/jni/react/renderer/components/ReactNativeEnrichedSpec/States.cpp +16 -0
- package/android/generated/jni/react/renderer/components/ReactNativeEnrichedSpec/States.h +20 -0
- package/android/gradle.properties +5 -0
- package/android/lint.gradle +70 -0
- package/android/src/main/AndroidManifest.xml +3 -0
- package/android/src/main/AndroidManifestNew.xml +2 -0
- package/android/src/main/java/com/swmansion/enriched/ReactNativeEnrichedPackage.kt +22 -0
- package/android/src/main/java/com/swmansion/enriched/common/AllowFontScaling.kt +36 -0
- package/android/src/main/java/com/swmansion/enriched/common/AsyncDrawable.kt +126 -0
- package/android/src/main/java/com/swmansion/enriched/common/CheckboxDrawable.kt +81 -0
- package/android/src/main/java/com/swmansion/enriched/common/EnrichedConstants.kt +16 -0
- package/android/src/main/java/com/swmansion/enriched/common/EnrichedSpanFlags.kt +39 -0
- package/android/src/main/java/com/swmansion/enriched/common/EnrichedStyle.kt +57 -0
- package/android/src/main/java/com/swmansion/enriched/common/ForceRedrawSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/common/GumboNormalizer.kt +5 -0
- package/android/src/main/java/com/swmansion/enriched/common/MentionStyle.kt +9 -0
- package/android/src/main/java/com/swmansion/enriched/common/ResourceManager.kt +26 -0
- package/android/src/main/java/com/swmansion/enriched/common/parser/EnrichedParser.java +1057 -0
- package/android/src/main/java/com/swmansion/enriched/common/parser/EnrichedSpanFactory.kt +83 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedAlignmentSpan.kt +19 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedBlockQuoteSpan.kt +53 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedBoldSpan.kt +12 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedCheckboxListSpan.kt +92 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedCodeBlockSpan.kt +81 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedH1Span.kt +20 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedH2Span.kt +20 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedH3Span.kt +20 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedH4Span.kt +21 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedH5Span.kt +20 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedH6Span.kt +20 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedImageSpan.kt +185 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedInlineCodeSpan.kt +24 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedItalicSpan.kt +12 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedLinkSpan.kt +29 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedMentionSpan.kt +35 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedOrderedListSpan.kt +79 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedStrikeThroughSpan.kt +11 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedUnderlineSpan.kt +11 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedUnorderedListSpan.kt +62 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/interfaces/EnrichedBlockSpan.kt +5 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/interfaces/EnrichedHeadingSpan.kt +3 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/interfaces/EnrichedInlineSpan.kt +3 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/interfaces/EnrichedParagraphSpan.kt +5 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/interfaces/EnrichedSpan.kt +3 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/interfaces/EnrichedZeroWidthSpaceSpan.kt +4 -0
- package/android/src/main/java/com/swmansion/enriched/text/EnrichedTextMovementMethod.kt +75 -0
- package/android/src/main/java/com/swmansion/enriched/text/EnrichedTextSpanFactory.kt +84 -0
- package/android/src/main/java/com/swmansion/enriched/text/EnrichedTextStyle.kt +202 -0
- package/android/src/main/java/com/swmansion/enriched/text/EnrichedTextView.kt +362 -0
- package/android/src/main/java/com/swmansion/enriched/text/EnrichedTextViewManager.kt +157 -0
- package/android/src/main/java/com/swmansion/enriched/text/MeasurementStore.kt +170 -0
- package/android/src/main/java/com/swmansion/enriched/text/events/OnLinkPressEvent.kt +23 -0
- package/android/src/main/java/com/swmansion/enriched/text/events/OnMentionPressEvent.kt +32 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextAlignmentSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextBlockQuoteSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextBoldSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextCheckboxListSpan.kt +15 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextCodeBlockSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextH1Span.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextH2Span.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextH3Span.kt +15 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextH4Span.kt +15 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextH5Span.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextH6Span.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextImageSpan.kt +57 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextInlineCodeSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextItalicSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextLinkSpan.kt +41 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextMentionSpan.kt +63 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextOrderedListSpan.kt +16 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextStrikeThroughSpan.kt +15 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextUnderlineSpan.kt +15 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextUnorderedListSpan.kt +15 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/interfaces/EnrichedTextClickableSpan.kt +9 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/interfaces/EnrichedTextSpan.kt +10 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/EnrichedTextInputConnectionWrapper.kt +140 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/EnrichedTextInputSpannableFactory.kt +86 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/EnrichedTextInputView.kt +1144 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/EnrichedTextInputViewLayoutManager.kt +27 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/EnrichedTextInputViewManager.kt +500 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/MeasurementStore.kt +230 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/events/MentionHandler.kt +65 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnChangeHtmlEvent.kt +27 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnChangeSelectionEvent.kt +30 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnChangeStateEvent.kt +21 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnChangeTextEvent.kt +30 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnContextMenuItemPressEvent.kt +35 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnInputBlurEvent.kt +25 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnInputFocusEvent.kt +25 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnInputKeyPressEvent.kt +27 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnLinkDetectedEvent.kt +32 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnMentionDetectedEvent.kt +30 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnMentionEvent.kt +40 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnPasteImagesEvent.kt +47 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnRequestHtmlResultEvent.kt +32 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnSubmitEditingEvent.kt +29 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputAlignmentSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputBlockQuoteSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputBoldSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputCheckboxListSpan.kt +15 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputCodeBlockSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputH1Span.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputH2Span.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputH3Span.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputH4Span.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputH5Span.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputH6Span.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputImageSpan.kt +36 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputInlineCodeSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputItalicSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputLinkSpan.kt +16 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputMentionSpan.kt +18 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputOrderedListSpan.kt +21 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputStrikeThroughSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputUnderlineSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputUnorderedListSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedLineHeightSpan.kt +45 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedSpans.kt +240 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/interfaces/EnrichedInputSpan.kt +10 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/styles/AlignmentStyles.kt +366 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/styles/HtmlStyle.kt +371 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/styles/InlineStyles.kt +244 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/styles/ListStyles.kt +261 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/styles/ParagraphStyles.kt +440 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/styles/ParametrizedStyles.kt +435 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/utils/EnrichedEditableFactory.kt +17 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/utils/EnrichedSelection.kt +342 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/utils/EnrichedSpanState.kt +318 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/utils/EnrichedSpannable.kt +157 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/utils/EnrichedSpannableStringBuilder.kt +59 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/utils/RichContentReceiver.kt +127 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/utils/ShortcutsHandler.kt +150 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/utils/StyleUtils.kt +51 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/utils/Utils.kt +107 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/watchers/EnrichedSpanWatcher.kt +109 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/watchers/EnrichedTextWatcher.kt +106 -0
- package/android/src/main/new_arch/CMakeLists.txt +62 -0
- package/android/src/main/new_arch/GumboNormalizerJni.cpp +14 -0
- package/android/src/main/new_arch/ReactNativeEnrichedSpec.cpp +11 -0
- package/android/src/main/new_arch/ReactNativeEnrichedSpec.h +16 -0
- package/android/src/main/new_arch/react/renderer/components/ReactNativeEnrichedSpec/EnrichedTextComponentDescriptor.h +32 -0
- package/android/src/main/new_arch/react/renderer/components/ReactNativeEnrichedSpec/EnrichedTextInputComponentDescriptor.h +35 -0
- package/android/src/main/new_arch/react/renderer/components/ReactNativeEnrichedSpec/EnrichedTextInputMeasurementManager.cpp +53 -0
- package/android/src/main/new_arch/react/renderer/components/ReactNativeEnrichedSpec/EnrichedTextInputMeasurementManager.h +25 -0
- package/android/src/main/new_arch/react/renderer/components/ReactNativeEnrichedSpec/EnrichedTextInputShadowNode.cpp +35 -0
- package/android/src/main/new_arch/react/renderer/components/ReactNativeEnrichedSpec/EnrichedTextInputShadowNode.h +53 -0
- package/android/src/main/new_arch/react/renderer/components/ReactNativeEnrichedSpec/EnrichedTextInputState.cpp +9 -0
- package/android/src/main/new_arch/react/renderer/components/ReactNativeEnrichedSpec/EnrichedTextInputState.h +24 -0
- package/android/src/main/new_arch/react/renderer/components/ReactNativeEnrichedSpec/EnrichedTextMeasurementManager.cpp +45 -0
- package/android/src/main/new_arch/react/renderer/components/ReactNativeEnrichedSpec/EnrichedTextMeasurementManager.h +25 -0
- package/android/src/main/new_arch/react/renderer/components/ReactNativeEnrichedSpec/EnrichedTextShadowNode.cpp +21 -0
- package/android/src/main/new_arch/react/renderer/components/ReactNativeEnrichedSpec/EnrichedTextShadowNode.h +39 -0
- package/android/src/main/new_arch/react/renderer/components/ReactNativeEnrichedSpec/conversions.h +44 -0
- package/android/src/main/res/drawable/broken_image.xml +10 -0
- package/cpp/CMakeLists.txt +50 -0
- package/cpp/GumboParser/GumboParser.h +34043 -0
- package/cpp/README.md +59 -0
- package/cpp/parser/GumboNormalizer.c +973 -0
- package/cpp/parser/GumboParser.cpp +16 -0
- package/cpp/parser/GumboParser.hpp +23 -0
- package/cpp/tests/GumboParserTest.cpp +511 -0
- package/ios/EnrichedTextInputView.h +54 -0
- package/ios/EnrichedTextInputView.mm +2182 -0
- package/ios/EnrichedTextInputViewManager.mm +13 -0
- package/ios/EnrichedTextView.h +35 -0
- package/ios/EnrichedTextView.mm +806 -0
- package/ios/EnrichedTextViewManager.mm +13 -0
- package/ios/config/EnrichedConfig.h +114 -0
- package/ios/config/EnrichedConfig.mm +727 -0
- package/ios/enrichedInputTextView/EnrichedInputTextView.h +6 -0
- package/ios/enrichedInputTextView/EnrichedInputTextView.mm +334 -0
- package/ios/enrichedTextTextView/EnrichedTextTextView.h +16 -0
- package/ios/enrichedTextTextView/EnrichedTextTextView.mm +71 -0
- package/ios/extensions/ColorExtension.h +8 -0
- package/ios/extensions/ColorExtension.mm +48 -0
- package/ios/extensions/FontExtension.h +11 -0
- package/ios/extensions/FontExtension.mm +72 -0
- package/ios/extensions/ImageExtension.h +33 -0
- package/ios/extensions/ImageExtension.mm +176 -0
- package/ios/extensions/LayoutManagerExtension.h +6 -0
- package/ios/extensions/LayoutManagerExtension.mm +465 -0
- package/ios/extensions/StringExtension.h +15 -0
- package/ios/extensions/StringExtension.mm +144 -0
- package/ios/generated/ReactNativeEnrichedSpec/ComponentDescriptors.cpp +22 -0
- package/ios/generated/ReactNativeEnrichedSpec/ComponentDescriptors.h +24 -0
- package/ios/generated/ReactNativeEnrichedSpec/EventEmitters.cpp +456 -0
- package/ios/generated/ReactNativeEnrichedSpec/EventEmitters.h +410 -0
- package/ios/generated/ReactNativeEnrichedSpec/Props.cpp +272 -0
- package/ios/generated/ReactNativeEnrichedSpec/Props.h +1595 -0
- package/ios/generated/ReactNativeEnrichedSpec/RCTComponentViewHelpers.h +570 -0
- package/ios/generated/ReactNativeEnrichedSpec/ShadowNodes.cpp +17 -0
- package/ios/generated/ReactNativeEnrichedSpec/ShadowNodes.h +23 -0
- package/ios/generated/ReactNativeEnrichedSpec/States.cpp +16 -0
- package/ios/generated/ReactNativeEnrichedSpec/States.h +20 -0
- package/ios/htmlParser/HtmlParser.h +14 -0
- package/ios/htmlParser/HtmlParser.mm +1486 -0
- package/ios/inputAttributesManager/InputAttributesManager.h +18 -0
- package/ios/inputAttributesManager/InputAttributesManager.mm +222 -0
- package/ios/inputHtmlParser/InputHtmlParser.h +10 -0
- package/ios/inputHtmlParser/InputHtmlParser.mm +228 -0
- package/ios/interfaces/AlignmentEntry.h +9 -0
- package/ios/interfaces/AlignmentEntry.mm +4 -0
- package/ios/interfaces/AttributeEntry.h +9 -0
- package/ios/interfaces/AttributeEntry.mm +4 -0
- package/ios/interfaces/BaseStyleProtocol.h +17 -0
- package/ios/interfaces/EnrichedTextStyleHeaders.h +62 -0
- package/ios/interfaces/EnrichedViewHost.h +26 -0
- package/ios/interfaces/ImageAttachment.h +11 -0
- package/ios/interfaces/ImageAttachment.mm +107 -0
- package/ios/interfaces/ImageData.h +10 -0
- package/ios/interfaces/ImageData.mm +4 -0
- package/ios/interfaces/LinkData.h +11 -0
- package/ios/interfaces/LinkData.mm +43 -0
- package/ios/interfaces/LinkRegexConfig.h +19 -0
- package/ios/interfaces/LinkRegexConfig.mm +37 -0
- package/ios/interfaces/MediaAttachment.h +23 -0
- package/ios/interfaces/MediaAttachment.mm +31 -0
- package/ios/interfaces/MentionParams.h +8 -0
- package/ios/interfaces/MentionParams.mm +4 -0
- package/ios/interfaces/MentionStyleProps.h +17 -0
- package/ios/interfaces/MentionStyleProps.mm +80 -0
- package/ios/interfaces/StyleBase.h +38 -0
- package/ios/interfaces/StyleBase.mm +279 -0
- package/ios/interfaces/StyleHeaders.h +114 -0
- package/ios/interfaces/StylePair.h +9 -0
- package/ios/interfaces/StylePair.mm +4 -0
- package/ios/interfaces/StyleTypeEnum.h +27 -0
- package/ios/interfaces/TextDecorationLineEnum.h +6 -0
- package/ios/interfaces/TextDecorationLineEnum.mm +4 -0
- package/ios/internals/EnrichedTextComponentDescriptor.h +19 -0
- package/ios/internals/EnrichedTextInputViewComponentDescriptor.h +19 -0
- package/ios/internals/EnrichedTextInputViewShadowNode.h +44 -0
- package/ios/internals/EnrichedTextInputViewShadowNode.mm +103 -0
- package/ios/internals/EnrichedTextInputViewState.cpp +10 -0
- package/ios/internals/EnrichedTextInputViewState.h +22 -0
- package/ios/internals/EnrichedTextViewShadowNode.h +34 -0
- package/ios/internals/EnrichedTextViewShadowNode.mm +72 -0
- package/ios/internals/EnrichedTextViewState.cpp +7 -0
- package/ios/internals/EnrichedTextViewState.h +18 -0
- package/ios/styles/AlignmentStyle.mm +203 -0
- package/ios/styles/BlockQuoteStyle.mm +54 -0
- package/ios/styles/BoldStyle.mm +37 -0
- package/ios/styles/CheckboxListStyle.mm +154 -0
- package/ios/styles/CodeBlockStyle.mm +49 -0
- package/ios/styles/EnrichedTextStyles.mm +61 -0
- package/ios/styles/H1Style.mm +20 -0
- package/ios/styles/H2Style.mm +20 -0
- package/ios/styles/H3Style.mm +20 -0
- package/ios/styles/H4Style.mm +20 -0
- package/ios/styles/H5Style.mm +20 -0
- package/ios/styles/H6Style.mm +20 -0
- package/ios/styles/HeadingStyleBase.mm +96 -0
- package/ios/styles/ImageStyle.mm +150 -0
- package/ios/styles/InlineCodeStyle.mm +65 -0
- package/ios/styles/ItalicStyle.mm +37 -0
- package/ios/styles/LinkStyle.mm +518 -0
- package/ios/styles/MentionStyle.mm +592 -0
- package/ios/styles/OrderedListStyle.mm +48 -0
- package/ios/styles/StrikethroughStyle.mm +25 -0
- package/ios/styles/UnderlineStyle.mm +24 -0
- package/ios/styles/UnorderedListStyle.mm +48 -0
- package/ios/textHtmlParser/TextHtmlParser.h +10 -0
- package/ios/textHtmlParser/TextHtmlParser.mm +182 -0
- package/ios/utils/AlignmentUtils.h +20 -0
- package/ios/utils/AlignmentUtils.mm +111 -0
- package/ios/utils/AttachmentLayoutUtils.h +24 -0
- package/ios/utils/AttachmentLayoutUtils.mm +144 -0
- package/ios/utils/CheckboxHitTestUtils.h +10 -0
- package/ios/utils/CheckboxHitTestUtils.mm +122 -0
- package/ios/utils/DotReplacementUtils.h +10 -0
- package/ios/utils/DotReplacementUtils.mm +68 -0
- package/ios/utils/EnrichedTextTouchHandler.h +14 -0
- package/ios/utils/EnrichedTextTouchHandler.mm +152 -0
- package/ios/utils/KeyboardUtils.h +7 -0
- package/ios/utils/KeyboardUtils.mm +30 -0
- package/ios/utils/OccurenceUtils.h +44 -0
- package/ios/utils/OccurenceUtils.mm +185 -0
- package/ios/utils/ParagraphAttributesUtils.h +18 -0
- package/ios/utils/ParagraphAttributesUtils.mm +296 -0
- package/ios/utils/RangeUtils.h +12 -0
- package/ios/utils/RangeUtils.mm +183 -0
- package/ios/utils/ShortcutsUtils.h +21 -0
- package/ios/utils/ShortcutsUtils.mm +486 -0
- package/ios/utils/StyleUtils.h +33 -0
- package/ios/utils/StyleUtils.mm +290 -0
- package/ios/utils/TextBlockTapGestureRecognizer.h +17 -0
- package/ios/utils/TextBlockTapGestureRecognizer.mm +56 -0
- package/ios/utils/TextInsertionUtils.h +17 -0
- package/ios/utils/TextInsertionUtils.mm +60 -0
- package/ios/utils/TextListsUtils.h +40 -0
- package/ios/utils/TextListsUtils.mm +93 -0
- package/ios/utils/WeakBox.h +3 -0
- package/ios/utils/WeakBox.m +4 -0
- package/ios/utils/WordsUtils.h +7 -0
- package/ios/utils/WordsUtils.mm +98 -0
- package/ios/utils/ZeroWidthSpaceUtils.h +14 -0
- package/ios/utils/ZeroWidthSpaceUtils.mm +310 -0
- package/lib/module/index.js +5 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/index.native.js +7 -0
- package/lib/module/index.native.js.map +1 -0
- package/lib/module/native/EnrichedText.js +76 -0
- package/lib/module/native/EnrichedText.js.map +1 -0
- package/lib/module/native/EnrichedTextInput.js +306 -0
- package/lib/module/native/EnrichedTextInput.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/spec/EnrichedTextInputNativeComponent.ts +524 -0
- package/lib/module/spec/EnrichedTextNativeComponent.ts +110 -0
- package/lib/module/types.js +4 -0
- package/lib/module/types.js.map +1 -0
- package/lib/module/utils/EnrichedTextInputDefaultProps.js +20 -0
- package/lib/module/utils/EnrichedTextInputDefaultProps.js.map +1 -0
- package/lib/module/utils/defaultHtmlStyle.js +83 -0
- package/lib/module/utils/defaultHtmlStyle.js.map +1 -0
- package/lib/module/utils/expandMentionStylesForIndicators.js +14 -0
- package/lib/module/utils/expandMentionStylesForIndicators.js.map +1 -0
- package/lib/module/utils/isMentionStyleRecord.js +10 -0
- package/lib/module/utils/isMentionStyleRecord.js.map +1 -0
- package/lib/module/utils/normalizeHtmlStyle.js +126 -0
- package/lib/module/utils/normalizeHtmlStyle.js.map +1 -0
- package/lib/module/utils/nullthrows.js +9 -0
- package/lib/module/utils/nullthrows.js.map +1 -0
- package/lib/module/utils/regexParser.js +46 -0
- package/lib/module/utils/regexParser.js.map +1 -0
- package/lib/module/web/EnrichedText.css +343 -0
- package/lib/module/web/EnrichedText.js +55 -0
- package/lib/module/web/EnrichedText.js.map +1 -0
- package/lib/module/web/EnrichedTextInput.js +316 -0
- package/lib/module/web/EnrichedTextInput.js.map +1 -0
- package/lib/module/web/adaptWebToNativeEvent.js +34 -0
- package/lib/module/web/adaptWebToNativeEvent.js.map +1 -0
- package/lib/module/web/constants/brokenImageGlyph.js +9 -0
- package/lib/module/web/constants/brokenImageGlyph.js.map +1 -0
- package/lib/module/web/constants/classNames.js +5 -0
- package/lib/module/web/constants/classNames.js.map +1 -0
- package/lib/module/web/emitLinkDetected.js +12 -0
- package/lib/module/web/emitLinkDetected.js.map +1 -0
- package/lib/module/web/formats/EnrichedBlockquote.js +32 -0
- package/lib/module/web/formats/EnrichedBlockquote.js.map +1 -0
- package/lib/module/web/formats/EnrichedBold.js +22 -0
- package/lib/module/web/formats/EnrichedBold.js.map +1 -0
- package/lib/module/web/formats/EnrichedCheckboxItem.js +32 -0
- package/lib/module/web/formats/EnrichedCheckboxItem.js.map +1 -0
- package/lib/module/web/formats/EnrichedCheckboxList.js +35 -0
- package/lib/module/web/formats/EnrichedCheckboxList.js.map +1 -0
- package/lib/module/web/formats/EnrichedCode.js +15 -0
- package/lib/module/web/formats/EnrichedCode.js.map +1 -0
- package/lib/module/web/formats/EnrichedCodeBlock.js +43 -0
- package/lib/module/web/formats/EnrichedCodeBlock.js.map +1 -0
- package/lib/module/web/formats/EnrichedHeading.js +27 -0
- package/lib/module/web/formats/EnrichedHeading.js.map +1 -0
- package/lib/module/web/formats/EnrichedImage.js +57 -0
- package/lib/module/web/formats/EnrichedImage.js.map +1 -0
- package/lib/module/web/formats/EnrichedImageNodeView.js +90 -0
- package/lib/module/web/formats/EnrichedImageNodeView.js.map +1 -0
- package/lib/module/web/formats/EnrichedItalic.js +22 -0
- package/lib/module/web/formats/EnrichedItalic.js.map +1 -0
- package/lib/module/web/formats/EnrichedLink.js +180 -0
- package/lib/module/web/formats/EnrichedLink.js.map +1 -0
- package/lib/module/web/formats/EnrichedListItem.js +19 -0
- package/lib/module/web/formats/EnrichedListItem.js.map +1 -0
- package/lib/module/web/formats/EnrichedMention.js +50 -0
- package/lib/module/web/formats/EnrichedMention.js.map +1 -0
- package/lib/module/web/formats/EnrichedOrderedList.js +32 -0
- package/lib/module/web/formats/EnrichedOrderedList.js.map +1 -0
- package/lib/module/web/formats/EnrichedStrike.js +22 -0
- package/lib/module/web/formats/EnrichedStrike.js.map +1 -0
- package/lib/module/web/formats/EnrichedTextAlign.js +82 -0
- package/lib/module/web/formats/EnrichedTextAlign.js.map +1 -0
- package/lib/module/web/formats/EnrichedUnderline.js +22 -0
- package/lib/module/web/formats/EnrichedUnderline.js.map +1 -0
- package/lib/module/web/formats/EnrichedUnorderedList.js +33 -0
- package/lib/module/web/formats/EnrichedUnorderedList.js.map +1 -0
- package/lib/module/web/formats/applyWrappingListToSelection.js +64 -0
- package/lib/module/web/formats/applyWrappingListToSelection.js.map +1 -0
- package/lib/module/web/formats/formatRules.js +84 -0
- package/lib/module/web/formats/formatRules.js.map +1 -0
- package/lib/module/web/formats/listKeyboard.js +53 -0
- package/lib/module/web/formats/listKeyboard.js.map +1 -0
- package/lib/module/web/formats/wrappedBlockKeyboard.js +58 -0
- package/lib/module/web/formats/wrappedBlockKeyboard.js.map +1 -0
- package/lib/module/web/normalization/checkboxHtmlNormalizer.js +54 -0
- package/lib/module/web/normalization/checkboxHtmlNormalizer.js.map +1 -0
- package/lib/module/web/normalization/htmlNormalizer.js +514 -0
- package/lib/module/web/normalization/htmlNormalizer.js.map +1 -0
- package/lib/module/web/normalization/prepareHtmlForWeb.js +78 -0
- package/lib/module/web/normalization/prepareHtmlForWeb.js.map +1 -0
- package/lib/module/web/normalization/tiptapHtmlNormalizer.js +34 -0
- package/lib/module/web/normalization/tiptapHtmlNormalizer.js.map +1 -0
- package/lib/module/web/pasteImages.js +78 -0
- package/lib/module/web/pasteImages.js.map +1 -0
- package/lib/module/web/pastedImageDimensions.js +49 -0
- package/lib/module/web/pastedImageDimensions.js.map +1 -0
- package/lib/module/web/pmPlugins/AutolinkPlugin/autolinkRegex.js +27 -0
- package/lib/module/web/pmPlugins/AutolinkPlugin/autolinkRegex.js.map +1 -0
- package/lib/module/web/pmPlugins/AutolinkPlugin/index.js +178 -0
- package/lib/module/web/pmPlugins/AutolinkPlugin/index.js.map +1 -0
- package/lib/module/web/pmPlugins/MentionPlugin/index.js +36 -0
- package/lib/module/web/pmPlugins/MentionPlugin/index.js.map +1 -0
- package/lib/module/web/pmPlugins/MentionPlugin/isCaretInBlockedContext.js +11 -0
- package/lib/module/web/pmPlugins/MentionPlugin/isCaretInBlockedContext.js.map +1 -0
- package/lib/module/web/pmPlugins/MentionPlugin/makeMentionPluginState.js +86 -0
- package/lib/module/web/pmPlugins/MentionPlugin/makeMentionPluginState.js.map +1 -0
- package/lib/module/web/pmPlugins/MentionPlugin/mentionPluginKey.js +5 -0
- package/lib/module/web/pmPlugins/MentionPlugin/mentionPluginKey.js.map +1 -0
- package/lib/module/web/pmPlugins/MentionPlugin/removeMentionMarksIfSpansResized.js +56 -0
- package/lib/module/web/pmPlugins/MentionPlugin/removeMentionMarksIfSpansResized.js.map +1 -0
- package/lib/module/web/pmPlugins/MentionPlugin/setMention.js +57 -0
- package/lib/module/web/pmPlugins/MentionPlugin/setMention.js.map +1 -0
- package/lib/module/web/pmPlugins/MentionPlugin/startMention.js +9 -0
- package/lib/module/web/pmPlugins/MentionPlugin/startMention.js.map +1 -0
- package/lib/module/web/pmPlugins/MentionPlugin/stripPartialMentionMarks.js +9 -0
- package/lib/module/web/pmPlugins/MentionPlugin/stripPartialMentionMarks.js.map +1 -0
- package/lib/module/web/pmPlugins/MentionPlugin/types.js +4 -0
- package/lib/module/web/pmPlugins/MentionPlugin/types.js.map +1 -0
- package/lib/module/web/pmPlugins/MentionPlugin/useMentionEvents.js +105 -0
- package/lib/module/web/pmPlugins/MentionPlugin/useMentionEvents.js.map +1 -0
- package/lib/module/web/pmPlugins/MergeAdjacentSameKindBlocksPlugin.js +42 -0
- package/lib/module/web/pmPlugins/MergeAdjacentSameKindBlocksPlugin.js.map +1 -0
- package/lib/module/web/pmPlugins/ShortcutPlugin.js +134 -0
- package/lib/module/web/pmPlugins/ShortcutPlugin.js.map +1 -0
- package/lib/module/web/pmPlugins/StrictMarksPlugin.js +100 -0
- package/lib/module/web/pmPlugins/StrictMarksPlugin.js.map +1 -0
- package/lib/module/web/pmPlugins/StripBoldInStyledHeadingsPlugin.js +56 -0
- package/lib/module/web/pmPlugins/StripBoldInStyledHeadingsPlugin.js.map +1 -0
- package/lib/module/web/pmPlugins/StripMarksInCodeBlockPlugin.js +28 -0
- package/lib/module/web/pmPlugins/StripMarksInCodeBlockPlugin.js.map +1 -0
- package/lib/module/web/pmPlugins/StripMarksOnImagePlugin.js +29 -0
- package/lib/module/web/pmPlugins/StripMarksOnImagePlugin.js.map +1 -0
- package/lib/module/web/positionMapping.js +76 -0
- package/lib/module/web/positionMapping.js.map +1 -0
- package/lib/module/web/returnKeyTypeToEnterKeyHint.js +20 -0
- package/lib/module/web/returnKeyTypeToEnterKeyHint.js.map +1 -0
- package/lib/module/web/sanitization/htmlSanitizer.js +10 -0
- package/lib/module/web/sanitization/htmlSanitizer.js.map +1 -0
- package/lib/module/web/styleConversion/buildMentionRulesCSS.js +39 -0
- package/lib/module/web/styleConversion/buildMentionRulesCSS.js.map +1 -0
- package/lib/module/web/styleConversion/enrichedBaseStyleToCSSProperties.js +159 -0
- package/lib/module/web/styleConversion/enrichedBaseStyleToCSSProperties.js.map +1 -0
- package/lib/module/web/styleConversion/enrichedInputStyleToCSSProperties.js +7 -0
- package/lib/module/web/styleConversion/enrichedInputStyleToCSSProperties.js.map +1 -0
- package/lib/module/web/styleConversion/enrichedTextStyleToCSSProperties.js +44 -0
- package/lib/module/web/styleConversion/enrichedTextStyleToCSSProperties.js.map +1 -0
- package/lib/module/web/styleConversion/enrichedThemingToCSSProperties.js +18 -0
- package/lib/module/web/styleConversion/enrichedThemingToCSSProperties.js.map +1 -0
- package/lib/module/web/styleConversion/htmlStyleToCSSVariables.js +168 -0
- package/lib/module/web/styleConversion/htmlStyleToCSSVariables.js.map +1 -0
- package/lib/module/web/styleConversion/inlineImageCSSVariables.js +7 -0
- package/lib/module/web/styleConversion/inlineImageCSSVariables.js.map +1 -0
- package/lib/module/web/styleConversion/mentionIndicatorCssKey.js +15 -0
- package/lib/module/web/styleConversion/mentionIndicatorCssKey.js.map +1 -0
- package/lib/module/web/styleConversion/toColor.js +18 -0
- package/lib/module/web/styleConversion/toColor.js.map +1 -0
- package/lib/module/web/useImageErrorFallback.js +33 -0
- package/lib/module/web/useImageErrorFallback.js.map +1 -0
- package/lib/module/web/useOnChangeHtml.js +8 -0
- package/lib/module/web/useOnChangeHtml.js.map +1 -0
- package/lib/module/web/useOnChangeState.js +91 -0
- package/lib/module/web/useOnChangeState.js.map +1 -0
- package/lib/module/web/useOnChangeText.js +11 -0
- package/lib/module/web/useOnChangeText.js.map +1 -0
- package/lib/module/web/useOnEditorChange.js +25 -0
- package/lib/module/web/useOnEditorChange.js.map +1 -0
- package/lib/module/web/useOnLinkDetected.js +55 -0
- package/lib/module/web/useOnLinkDetected.js.map +1 -0
- package/lib/module/web/usePressInteractions.js +19 -0
- package/lib/module/web/usePressInteractions.js.map +1 -0
- package/lib/module/web/useStableRef.js +13 -0
- package/lib/module/web/useStableRef.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/index.d.ts +4 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/index.native.d.ts +5 -0
- package/lib/typescript/src/index.native.d.ts.map +1 -0
- package/lib/typescript/src/native/EnrichedText.d.ts +3 -0
- package/lib/typescript/src/native/EnrichedText.d.ts.map +1 -0
- package/lib/typescript/src/native/EnrichedTextInput.d.ts +3 -0
- package/lib/typescript/src/native/EnrichedTextInput.d.ts.map +1 -0
- package/lib/typescript/src/spec/EnrichedTextInputNativeComponent.d.ts +405 -0
- package/lib/typescript/src/spec/EnrichedTextInputNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/spec/EnrichedTextNativeComponent.d.ts +88 -0
- package/lib/typescript/src/spec/EnrichedTextNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/types.d.ts +721 -0
- package/lib/typescript/src/types.d.ts.map +1 -0
- package/lib/typescript/src/utils/EnrichedTextInputDefaultProps.d.ts +13 -0
- package/lib/typescript/src/utils/EnrichedTextInputDefaultProps.d.ts.map +1 -0
- package/lib/typescript/src/utils/defaultHtmlStyle.d.ts +4 -0
- package/lib/typescript/src/utils/defaultHtmlStyle.d.ts.map +1 -0
- package/lib/typescript/src/utils/expandMentionStylesForIndicators.d.ts +3 -0
- package/lib/typescript/src/utils/expandMentionStylesForIndicators.d.ts.map +1 -0
- package/lib/typescript/src/utils/isMentionStyleRecord.d.ts +3 -0
- package/lib/typescript/src/utils/isMentionStyleRecord.d.ts.map +1 -0
- package/lib/typescript/src/utils/normalizeHtmlStyle.d.ts +6 -0
- package/lib/typescript/src/utils/normalizeHtmlStyle.d.ts.map +1 -0
- package/lib/typescript/src/utils/nullthrows.d.ts +2 -0
- package/lib/typescript/src/utils/nullthrows.d.ts.map +1 -0
- package/lib/typescript/src/utils/regexParser.d.ts +3 -0
- package/lib/typescript/src/utils/regexParser.d.ts.map +1 -0
- package/lib/typescript/src/web/EnrichedText.d.ts +4 -0
- package/lib/typescript/src/web/EnrichedText.d.ts.map +1 -0
- package/lib/typescript/src/web/EnrichedTextInput.d.ts +4 -0
- package/lib/typescript/src/web/EnrichedTextInput.d.ts.map +1 -0
- package/lib/typescript/src/web/adaptWebToNativeEvent.d.ts +3 -0
- package/lib/typescript/src/web/adaptWebToNativeEvent.d.ts.map +1 -0
- package/lib/typescript/src/web/constants/brokenImageGlyph.d.ts +3 -0
- package/lib/typescript/src/web/constants/brokenImageGlyph.d.ts.map +1 -0
- package/lib/typescript/src/web/constants/classNames.d.ts +3 -0
- package/lib/typescript/src/web/constants/classNames.d.ts.map +1 -0
- package/lib/typescript/src/web/emitLinkDetected.d.ts +10 -0
- package/lib/typescript/src/web/emitLinkDetected.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/EnrichedBlockquote.d.ts +2 -0
- package/lib/typescript/src/web/formats/EnrichedBlockquote.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/EnrichedBold.d.ts +2 -0
- package/lib/typescript/src/web/formats/EnrichedBold.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/EnrichedCheckboxItem.d.ts +2 -0
- package/lib/typescript/src/web/formats/EnrichedCheckboxItem.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/EnrichedCheckboxList.d.ts +9 -0
- package/lib/typescript/src/web/formats/EnrichedCheckboxList.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/EnrichedCode.d.ts +2 -0
- package/lib/typescript/src/web/formats/EnrichedCode.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/EnrichedCodeBlock.d.ts +9 -0
- package/lib/typescript/src/web/formats/EnrichedCodeBlock.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/EnrichedHeading.d.ts +5 -0
- package/lib/typescript/src/web/formats/EnrichedHeading.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/EnrichedImage.d.ts +2 -0
- package/lib/typescript/src/web/formats/EnrichedImage.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/EnrichedImageNodeView.d.ts +3 -0
- package/lib/typescript/src/web/formats/EnrichedImageNodeView.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/EnrichedItalic.d.ts +2 -0
- package/lib/typescript/src/web/formats/EnrichedItalic.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/EnrichedLink.d.ts +8 -0
- package/lib/typescript/src/web/formats/EnrichedLink.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/EnrichedListItem.d.ts +2 -0
- package/lib/typescript/src/web/formats/EnrichedListItem.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/EnrichedMention.d.ts +4 -0
- package/lib/typescript/src/web/formats/EnrichedMention.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/EnrichedOrderedList.d.ts +2 -0
- package/lib/typescript/src/web/formats/EnrichedOrderedList.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/EnrichedStrike.d.ts +2 -0
- package/lib/typescript/src/web/formats/EnrichedStrike.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/EnrichedTextAlign.d.ts +2 -0
- package/lib/typescript/src/web/formats/EnrichedTextAlign.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/EnrichedUnderline.d.ts +2 -0
- package/lib/typescript/src/web/formats/EnrichedUnderline.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/EnrichedUnorderedList.d.ts +9 -0
- package/lib/typescript/src/web/formats/EnrichedUnorderedList.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/applyWrappingListToSelection.d.ts +18 -0
- package/lib/typescript/src/web/formats/applyWrappingListToSelection.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/formatRules.d.ts +12 -0
- package/lib/typescript/src/web/formats/formatRules.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/listKeyboard.d.ts +4 -0
- package/lib/typescript/src/web/formats/listKeyboard.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/wrappedBlockKeyboard.d.ts +12 -0
- package/lib/typescript/src/web/formats/wrappedBlockKeyboard.d.ts.map +1 -0
- package/lib/typescript/src/web/normalization/checkboxHtmlNormalizer.d.ts +3 -0
- package/lib/typescript/src/web/normalization/checkboxHtmlNormalizer.d.ts.map +1 -0
- package/lib/typescript/src/web/normalization/htmlNormalizer.d.ts +2 -0
- package/lib/typescript/src/web/normalization/htmlNormalizer.d.ts.map +1 -0
- package/lib/typescript/src/web/normalization/prepareHtmlForWeb.d.ts +2 -0
- package/lib/typescript/src/web/normalization/prepareHtmlForWeb.d.ts.map +1 -0
- package/lib/typescript/src/web/normalization/tiptapHtmlNormalizer.d.ts +3 -0
- package/lib/typescript/src/web/normalization/tiptapHtmlNormalizer.d.ts.map +1 -0
- package/lib/typescript/src/web/pasteImages.d.ts +10 -0
- package/lib/typescript/src/web/pasteImages.d.ts.map +1 -0
- package/lib/typescript/src/web/pastedImageDimensions.d.ts +9 -0
- package/lib/typescript/src/web/pastedImageDimensions.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/AutolinkPlugin/autolinkRegex.d.ts +7 -0
- package/lib/typescript/src/web/pmPlugins/AutolinkPlugin/autolinkRegex.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/AutolinkPlugin/index.d.ts +8 -0
- package/lib/typescript/src/web/pmPlugins/AutolinkPlugin/index.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/index.d.ts +9 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/index.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/isCaretInBlockedContext.d.ts +3 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/isCaretInBlockedContext.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/makeMentionPluginState.d.ts +4 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/makeMentionPluginState.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/mentionPluginKey.d.ts +4 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/mentionPluginKey.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/removeMentionMarksIfSpansResized.d.ts +9 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/removeMentionMarksIfSpansResized.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/setMention.d.ts +3 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/setMention.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/startMention.d.ts +3 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/startMention.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/stripPartialMentionMarks.d.ts +3 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/stripPartialMentionMarks.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/types.d.ts +20 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/types.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/useMentionEvents.d.ts +4 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/useMentionEvents.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/MergeAdjacentSameKindBlocksPlugin.d.ts +3 -0
- package/lib/typescript/src/web/pmPlugins/MergeAdjacentSameKindBlocksPlugin.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/ShortcutPlugin.d.ts +7 -0
- package/lib/typescript/src/web/pmPlugins/ShortcutPlugin.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/StrictMarksPlugin.d.ts +3 -0
- package/lib/typescript/src/web/pmPlugins/StrictMarksPlugin.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/StripBoldInStyledHeadingsPlugin.d.ts +15 -0
- package/lib/typescript/src/web/pmPlugins/StripBoldInStyledHeadingsPlugin.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/StripMarksInCodeBlockPlugin.d.ts +3 -0
- package/lib/typescript/src/web/pmPlugins/StripMarksInCodeBlockPlugin.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/StripMarksOnImagePlugin.d.ts +3 -0
- package/lib/typescript/src/web/pmPlugins/StripMarksOnImagePlugin.d.ts.map +1 -0
- package/lib/typescript/src/web/positionMapping.d.ts +39 -0
- package/lib/typescript/src/web/positionMapping.d.ts.map +1 -0
- package/lib/typescript/src/web/returnKeyTypeToEnterKeyHint.d.ts +4 -0
- package/lib/typescript/src/web/returnKeyTypeToEnterKeyHint.d.ts.map +1 -0
- package/lib/typescript/src/web/sanitization/htmlSanitizer.d.ts +2 -0
- package/lib/typescript/src/web/sanitization/htmlSanitizer.d.ts.map +1 -0
- package/lib/typescript/src/web/styleConversion/buildMentionRulesCSS.d.ts +3 -0
- package/lib/typescript/src/web/styleConversion/buildMentionRulesCSS.d.ts.map +1 -0
- package/lib/typescript/src/web/styleConversion/enrichedBaseStyleToCSSProperties.d.ts +8 -0
- package/lib/typescript/src/web/styleConversion/enrichedBaseStyleToCSSProperties.d.ts.map +1 -0
- package/lib/typescript/src/web/styleConversion/enrichedInputStyleToCSSProperties.d.ts +5 -0
- package/lib/typescript/src/web/styleConversion/enrichedInputStyleToCSSProperties.d.ts.map +1 -0
- package/lib/typescript/src/web/styleConversion/enrichedTextStyleToCSSProperties.d.ts +4 -0
- package/lib/typescript/src/web/styleConversion/enrichedTextStyleToCSSProperties.d.ts.map +1 -0
- package/lib/typescript/src/web/styleConversion/enrichedThemingToCSSProperties.d.ts +9 -0
- package/lib/typescript/src/web/styleConversion/enrichedThemingToCSSProperties.d.ts.map +1 -0
- package/lib/typescript/src/web/styleConversion/htmlStyleToCSSVariables.d.ts +11 -0
- package/lib/typescript/src/web/styleConversion/htmlStyleToCSSVariables.d.ts.map +1 -0
- package/lib/typescript/src/web/styleConversion/inlineImageCSSVariables.d.ts +3 -0
- package/lib/typescript/src/web/styleConversion/inlineImageCSSVariables.d.ts.map +1 -0
- package/lib/typescript/src/web/styleConversion/mentionIndicatorCssKey.d.ts +3 -0
- package/lib/typescript/src/web/styleConversion/mentionIndicatorCssKey.d.ts.map +1 -0
- package/lib/typescript/src/web/styleConversion/toColor.d.ts +3 -0
- package/lib/typescript/src/web/styleConversion/toColor.d.ts.map +1 -0
- package/lib/typescript/src/web/useImageErrorFallback.d.ts +3 -0
- package/lib/typescript/src/web/useImageErrorFallback.d.ts.map +1 -0
- package/lib/typescript/src/web/useOnChangeHtml.d.ts +5 -0
- package/lib/typescript/src/web/useOnChangeHtml.d.ts.map +1 -0
- package/lib/typescript/src/web/useOnChangeState.d.ts +6 -0
- package/lib/typescript/src/web/useOnChangeState.d.ts.map +1 -0
- package/lib/typescript/src/web/useOnChangeText.d.ts +5 -0
- package/lib/typescript/src/web/useOnChangeText.d.ts.map +1 -0
- package/lib/typescript/src/web/useOnEditorChange.d.ts +6 -0
- package/lib/typescript/src/web/useOnEditorChange.d.ts.map +1 -0
- package/lib/typescript/src/web/useOnLinkDetected.d.ts +4 -0
- package/lib/typescript/src/web/useOnLinkDetected.d.ts.map +1 -0
- package/lib/typescript/src/web/usePressInteractions.d.ts +2 -0
- package/lib/typescript/src/web/usePressInteractions.d.ts.map +1 -0
- package/lib/typescript/src/web/useStableRef.d.ts +3 -0
- package/lib/typescript/src/web/useStableRef.d.ts.map +1 -0
- package/package.json +258 -1
- package/react-native.config.js +16 -0
- package/src/index.native.tsx +34 -0
- package/src/index.tsx +25 -0
- package/src/native/EnrichedText.tsx +115 -0
- package/src/native/EnrichedTextInput.tsx +374 -0
- package/src/spec/EnrichedTextInputNativeComponent.ts +524 -0
- package/src/spec/EnrichedTextNativeComponent.ts +110 -0
- package/src/types.ts +866 -0
- package/src/utils/EnrichedTextInputDefaultProps.ts +16 -0
- package/src/utils/defaultHtmlStyle.ts +83 -0
- package/src/utils/expandMentionStylesForIndicators.ts +19 -0
- package/src/utils/isMentionStyleRecord.ts +22 -0
- package/src/utils/normalizeHtmlStyle.ts +182 -0
- package/src/utils/nullthrows.ts +7 -0
- package/src/utils/regexParser.ts +56 -0
- package/src/web/EnrichedText.css +343 -0
- package/src/web/EnrichedText.tsx +82 -0
- package/src/web/EnrichedTextInput.tsx +417 -0
- package/src/web/adaptWebToNativeEvent.ts +37 -0
- package/src/web/constants/brokenImageGlyph.ts +7 -0
- package/src/web/constants/classNames.ts +2 -0
- package/src/web/emitLinkDetected.ts +29 -0
- package/src/web/formats/EnrichedBlockquote.ts +37 -0
- package/src/web/formats/EnrichedBold.ts +16 -0
- package/src/web/formats/EnrichedCheckboxItem.ts +35 -0
- package/src/web/formats/EnrichedCheckboxList.ts +50 -0
- package/src/web/formats/EnrichedCode.ts +13 -0
- package/src/web/formats/EnrichedCodeBlock.ts +54 -0
- package/src/web/formats/EnrichedHeading.ts +37 -0
- package/src/web/formats/EnrichedImage.ts +59 -0
- package/src/web/formats/EnrichedImageNodeView.tsx +87 -0
- package/src/web/formats/EnrichedItalic.ts +16 -0
- package/src/web/formats/EnrichedLink.ts +204 -0
- package/src/web/formats/EnrichedListItem.ts +17 -0
- package/src/web/formats/EnrichedMention.ts +55 -0
- package/src/web/formats/EnrichedOrderedList.ts +43 -0
- package/src/web/formats/EnrichedStrike.ts +16 -0
- package/src/web/formats/EnrichedTextAlign.ts +88 -0
- package/src/web/formats/EnrichedUnderline.ts +16 -0
- package/src/web/formats/EnrichedUnorderedList.ts +53 -0
- package/src/web/formats/applyWrappingListToSelection.ts +76 -0
- package/src/web/formats/formatRules.ts +128 -0
- package/src/web/formats/listKeyboard.ts +63 -0
- package/src/web/formats/wrappedBlockKeyboard.ts +76 -0
- package/src/web/normalization/checkboxHtmlNormalizer.ts +62 -0
- package/src/web/normalization/htmlNormalizer.ts +656 -0
- package/src/web/normalization/prepareHtmlForWeb.ts +93 -0
- package/src/web/normalization/tiptapHtmlNormalizer.ts +43 -0
- package/src/web/pasteImages.ts +96 -0
- package/src/web/pastedImageDimensions.ts +40 -0
- package/src/web/pmPlugins/AutolinkPlugin/autolinkRegex.ts +43 -0
- package/src/web/pmPlugins/AutolinkPlugin/index.ts +274 -0
- package/src/web/pmPlugins/MentionPlugin/index.ts +45 -0
- package/src/web/pmPlugins/MentionPlugin/isCaretInBlockedContext.ts +17 -0
- package/src/web/pmPlugins/MentionPlugin/makeMentionPluginState.ts +102 -0
- package/src/web/pmPlugins/MentionPlugin/mentionPluginKey.ts +4 -0
- package/src/web/pmPlugins/MentionPlugin/removeMentionMarksIfSpansResized.ts +68 -0
- package/src/web/pmPlugins/MentionPlugin/setMention.ts +73 -0
- package/src/web/pmPlugins/MentionPlugin/startMention.ts +14 -0
- package/src/web/pmPlugins/MentionPlugin/stripPartialMentionMarks.ts +20 -0
- package/src/web/pmPlugins/MentionPlugin/types.ts +22 -0
- package/src/web/pmPlugins/MentionPlugin/useMentionEvents.ts +114 -0
- package/src/web/pmPlugins/MergeAdjacentSameKindBlocksPlugin.ts +57 -0
- package/src/web/pmPlugins/ShortcutPlugin.ts +105 -0
- package/src/web/pmPlugins/StrictMarksPlugin.ts +134 -0
- package/src/web/pmPlugins/StripBoldInStyledHeadingsPlugin.ts +84 -0
- package/src/web/pmPlugins/StripMarksInCodeBlockPlugin.ts +34 -0
- package/src/web/pmPlugins/StripMarksOnImagePlugin.ts +33 -0
- package/src/web/positionMapping.ts +81 -0
- package/src/web/returnKeyTypeToEnterKeyHint.ts +29 -0
- package/src/web/sanitization/htmlSanitizer.ts +8 -0
- package/src/web/styleConversion/buildMentionRulesCSS.ts +61 -0
- package/src/web/styleConversion/enrichedBaseStyleToCSSProperties.ts +228 -0
- package/src/web/styleConversion/enrichedInputStyleToCSSProperties.ts +13 -0
- package/src/web/styleConversion/enrichedTextStyleToCSSProperties.ts +53 -0
- package/src/web/styleConversion/enrichedThemingToCSSProperties.ts +34 -0
- package/src/web/styleConversion/htmlStyleToCSSVariables.ts +277 -0
- package/src/web/styleConversion/inlineImageCSSVariables.ts +6 -0
- package/src/web/styleConversion/mentionIndicatorCssKey.ts +14 -0
- package/src/web/styleConversion/toColor.ts +17 -0
- package/src/web/useImageErrorFallback.ts +37 -0
- package/src/web/useOnChangeHtml.ts +14 -0
- package/src/web/useOnChangeState.ts +127 -0
- package/src/web/useOnChangeText.ts +15 -0
- package/src/web/useOnEditorChange.ts +33 -0
- package/src/web/useOnLinkDetected.ts +70 -0
- package/src/web/usePressInteractions.tsx +22 -0
- package/src/web/useStableRef.ts +12 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { isTextSelection } from '@tiptap/core';
|
|
4
|
+
import { TextAlign } from '@tiptap/extension-text-align';
|
|
5
|
+
export const EnrichedTextAlign = TextAlign.extend({
|
|
6
|
+
addCommands() {
|
|
7
|
+
return {
|
|
8
|
+
...this.parent?.(),
|
|
9
|
+
setTextAlign: alignment => props => {
|
|
10
|
+
const {
|
|
11
|
+
state,
|
|
12
|
+
dispatch,
|
|
13
|
+
tr
|
|
14
|
+
} = props;
|
|
15
|
+
if (!this.options.alignments.includes(alignment)) {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
const {
|
|
19
|
+
$from
|
|
20
|
+
} = state.selection;
|
|
21
|
+
let listNode = null;
|
|
22
|
+
let listPos = -1;
|
|
23
|
+
|
|
24
|
+
// Walk up the tree to see if the cursor is inside a list wrapper
|
|
25
|
+
for (let depth = $from.depth; depth > 0; depth--) {
|
|
26
|
+
const node = $from.node(depth);
|
|
27
|
+
if (['orderedList', 'unorderedList', 'checkboxList'].includes(node.type.name)) {
|
|
28
|
+
listNode = node;
|
|
29
|
+
listPos = $from.before(depth);
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// If in a list, manually apply the alignment to the parent wrapper
|
|
35
|
+
if (listNode) {
|
|
36
|
+
if (dispatch) {
|
|
37
|
+
tr.setNodeMarkup(listPos, undefined, {
|
|
38
|
+
...listNode.attrs,
|
|
39
|
+
textAlign: alignment
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// If not in a list, fire the original Tiptap command
|
|
46
|
+
return this.parent?.().setTextAlign?.(alignment)(props) ?? false;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
},
|
|
50
|
+
addKeyboardShortcuts() {
|
|
51
|
+
return {
|
|
52
|
+
...this.parent?.(),
|
|
53
|
+
Backspace: () => {
|
|
54
|
+
const {
|
|
55
|
+
selection
|
|
56
|
+
} = this.editor.state;
|
|
57
|
+
if (!selection.empty || !isTextSelection(selection)) {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
const {
|
|
61
|
+
$cursor
|
|
62
|
+
} = selection;
|
|
63
|
+
if (!$cursor || !this.editor.isEmpty) {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
const currentAlignment = $cursor.parent.attrs.textAlign;
|
|
67
|
+
const hasAlignment = currentAlignment && currentAlignment !== 'auto';
|
|
68
|
+
|
|
69
|
+
// If the input is empty and has an alignment, clear the alignment
|
|
70
|
+
if (hasAlignment) {
|
|
71
|
+
return this.editor.commands.unsetTextAlign();
|
|
72
|
+
}
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
}).configure({
|
|
78
|
+
types: ['paragraph', 'heading', 'orderedList', 'unorderedList', 'checkboxList'],
|
|
79
|
+
defaultAlignment: null,
|
|
80
|
+
alignments: ['left', 'center', 'right', 'justify']
|
|
81
|
+
});
|
|
82
|
+
//# sourceMappingURL=EnrichedTextAlign.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["isTextSelection","TextAlign","EnrichedTextAlign","extend","addCommands","parent","setTextAlign","alignment","props","state","dispatch","tr","options","alignments","includes","$from","selection","listNode","listPos","depth","node","type","name","before","setNodeMarkup","undefined","attrs","textAlign","addKeyboardShortcuts","Backspace","editor","empty","$cursor","isEmpty","currentAlignment","hasAlignment","commands","unsetTextAlign","configure","types","defaultAlignment"],"sourceRoot":"../../../../src","sources":["web/formats/EnrichedTextAlign.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,cAAc;AAC9C,SAASC,SAAS,QAAQ,8BAA8B;AAExD,OAAO,MAAMC,iBAAiB,GAAGD,SAAS,CAACE,MAAM,CAAC;EAChDC,WAAWA,CAAA,EAAG;IACZ,OAAO;MACL,GAAG,IAAI,CAACC,MAAM,GAAG,CAAC;MAClBC,YAAY,EAAGC,SAAS,IAAMC,KAAK,IAAK;QACtC,MAAM;UAAEC,KAAK;UAAEC,QAAQ;UAAEC;QAAG,CAAC,GAAGH,KAAK;QAErC,IAAI,CAAC,IAAI,CAACI,OAAO,CAACC,UAAU,CAACC,QAAQ,CAACP,SAAS,CAAC,EAAE;UAChD,OAAO,KAAK;QACd;QAEA,MAAM;UAAEQ;QAAM,CAAC,GAAGN,KAAK,CAACO,SAAS;QACjC,IAAIC,QAAoC,GAAG,IAAI;QAC/C,IAAIC,OAAO,GAAG,CAAC,CAAC;;QAEhB;QACA,KAAK,IAAIC,KAAK,GAAGJ,KAAK,CAACI,KAAK,EAAEA,KAAK,GAAG,CAAC,EAAEA,KAAK,EAAE,EAAE;UAChD,MAAMC,IAAI,GAAGL,KAAK,CAACK,IAAI,CAACD,KAAK,CAAC;UAC9B,IACE,CAAC,aAAa,EAAE,eAAe,EAAE,cAAc,CAAC,CAACL,QAAQ,CACvDM,IAAI,CAACC,IAAI,CAACC,IACZ,CAAC,EACD;YACAL,QAAQ,GAAGG,IAAI;YACfF,OAAO,GAAGH,KA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ACf;EACDC,gBAAgB,EAAE,IAAI;EACtB3B,UAAU,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS;AACnD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import Underline from '@tiptap/extension-underline';
|
|
4
|
+
export const EnrichedUnderline = Underline.extend({
|
|
5
|
+
addInputRules() {
|
|
6
|
+
return [];
|
|
7
|
+
},
|
|
8
|
+
addKeyboardShortcuts() {
|
|
9
|
+
return {};
|
|
10
|
+
},
|
|
11
|
+
parseHTML() {
|
|
12
|
+
return [{
|
|
13
|
+
tag: 'u'
|
|
14
|
+
}];
|
|
15
|
+
},
|
|
16
|
+
renderHTML({
|
|
17
|
+
HTMLAttributes
|
|
18
|
+
}) {
|
|
19
|
+
return ['u', HTMLAttributes, 0];
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
//# sourceMappingURL=EnrichedUnderline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Underline","EnrichedUnderline","extend","addInputRules","addKeyboardShortcuts","parseHTML","tag","renderHTML","HTMLAttributes"],"sourceRoot":"../../../../src","sources":["web/formats/EnrichedUnderline.ts"],"mappings":";;AAAA,OAAOA,SAAS,MAAM,6BAA6B;AAEnD,OAAO,MAAMC,iBAAiB,GAAGD,SAAS,CAACE,MAAM,CAAC;EAChDC,aAAaA,CAAA,EAAG;IACd,OAAO,EAAE;EACX,CAAC;EACDC,oBAAoBA,CAAA,EAAG;IACrB,OAAO,CAAC,CAAC;EACX,CAAC;EACDC,SAASA,CAAA,EAAG;IACV,OAAO,CAAC;MAAEC,GAAG,EAAE;IAAI,CAAC,CAAC;EACvB,CAAC;EACDC,UAAUA,CAAC;IAAEC;EAAe,CAAC,EAAE;IAC7B,OAAO,CAAC,GAAG,EAAEA,cAAc,EAAE,CAAC,CAAC;EACjC;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { wrappingInputRule } from '@tiptap/core';
|
|
4
|
+
import { BulletList } from '@tiptap/extension-list';
|
|
5
|
+
import { applyWrappingListToSelection } from "./applyWrappingListToSelection.js";
|
|
6
|
+
import { withPreservedAlignment } from "./formatRules.js";
|
|
7
|
+
const BULLET_LIST_INPUT_REGEX = /^\s*-\s$/;
|
|
8
|
+
export const EnrichedUnorderedList = BulletList.extend({
|
|
9
|
+
name: 'unorderedList',
|
|
10
|
+
addInputRules() {
|
|
11
|
+
return [wrappingInputRule({
|
|
12
|
+
find: BULLET_LIST_INPUT_REGEX,
|
|
13
|
+
type: this.type
|
|
14
|
+
})];
|
|
15
|
+
},
|
|
16
|
+
addKeyboardShortcuts() {
|
|
17
|
+
return {};
|
|
18
|
+
},
|
|
19
|
+
addCommands() {
|
|
20
|
+
return {
|
|
21
|
+
toggleUnorderedList: () => ({
|
|
22
|
+
editor,
|
|
23
|
+
chain
|
|
24
|
+
}) => {
|
|
25
|
+
if (editor.isActive('unorderedList')) {
|
|
26
|
+
return withPreservedAlignment(editor, chain(), c => c.clearNodes().setParagraph());
|
|
27
|
+
}
|
|
28
|
+
return applyWrappingListToSelection(editor, chain, 'unorderedList', 'listItem');
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=EnrichedUnorderedList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["wrappingInputRule","BulletList","applyWrappingListToSelection","withPreservedAlignment","BULLET_LIST_INPUT_REGEX","EnrichedUnorderedList","extend","name","addInputRules","find","type","addKeyboardShortcuts","addCommands","toggleUnorderedList","editor","chain","isActive","c","clearNodes","setParagraph"],"sourceRoot":"../../../../src","sources":["web/formats/EnrichedUnorderedList.ts"],"mappings":";;AAAA,SAASA,iBAAiB,QAA2B,cAAc;AACnE,SAASC,UAAU,QAAQ,wBAAwB;AAEnD,SAASC,4BAA4B,QAAQ,mCAAgC;AAC7E,SAASC,sBAAsB,QAAQ,kBAAe;AAUtD,MAAMC,uBAAuB,GAAG,UAAU;AAE1C,OAAO,MAAMC,qBAAqB,GAAGJ,UAAU,CAACK,MAAM,CAAC;EACrDC,IAAI,EAAE,eAAe;EAErBC,aAAaA,CAAA,EAAG;IACd,OAAO,CACLR,iBAAiB,CAAC;MAChBS,IAAI,EAAEL,uBAAuB;MAC7BM,IAAI,EAAE,IAAI,CAACA;IACb,CAAC,CAAC,CACH;EACH,CAAC;EAEDC,oBAAoBA,CAAA,EAAG;IACrB,OAAO,CAAC,CAAC;EACX,CAAC;EAEDC,WAAWA,CAAA,EAAG;IACZ,OAAO;MACLC,mBAAmB,EACjBA,CAAA,KACA,CAAC;QAAEC,MAAM;QAAEC;MAAoB,CAAC,KAAK;QACnC,IAAID,MAAM,CAACE,QAAQ,CAAC,eAAe,CAAC,EAAE;UACpC,OAAOb,sBAAsB,CAACW,MAAM,EAAEC,KAAK,CAAC,CAAC,EAAGE,CAAC,IAC/CA,CAAC,CAACC,UAAU,CAAC,CAAC,CAACC,YAAY,CAAC,CAC9B,CAAC;QACH;QAEA,OAAOjB,4BAA4B,CACjCY,MAAM,EACNC,KAAK,EACL,eAAe,EACf,UACF,CAAC;MACH;IACJ,CAAC;EACH;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Fragment } from '@tiptap/pm/model';
|
|
4
|
+
import { TextSelection } from '@tiptap/pm/state';
|
|
5
|
+
import { nativePosToTiptapPos, tiptapPosToNativePos } from "../positionMapping.js";
|
|
6
|
+
import { withPreservedAlignment } from "./formatRules.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Clears block styling with `clearNodes`, then wraps the selection’s blocks in a flat
|
|
10
|
+
* `listTypeName` (one `itemTypeName` per block).
|
|
11
|
+
*
|
|
12
|
+
* We don't use toggleList because we've changed ListItem's content to
|
|
13
|
+
* 'paragraph', in order not to allow nested lists. This however caused the
|
|
14
|
+
* default toggle implementation to fail.
|
|
15
|
+
*
|
|
16
|
+
* SELECTION PRESERVATION: Modifying node boundaries here (destroying and
|
|
17
|
+
* recreating blocks) causes ProseMirror's built-in selection to be invalid. To
|
|
18
|
+
* fix this, we use our Android/iOS native coordinate system. Because the native
|
|
19
|
+
* selection only cares about raw content and ignores Tiptap's node boundary
|
|
20
|
+
* tokens, we store the cursor positions in the native format before the
|
|
21
|
+
* transaction, and map them back to the new Tiptap document afterward.
|
|
22
|
+
*/
|
|
23
|
+
export function applyWrappingListToSelection(editor, chain, listTypeName, itemTypeName, itemAttrs = null) {
|
|
24
|
+
const {
|
|
25
|
+
doc: docBefore,
|
|
26
|
+
selection: selBefore
|
|
27
|
+
} = editor.state;
|
|
28
|
+
const nativeAnchor = tiptapPosToNativePos(docBefore, selBefore.anchor);
|
|
29
|
+
const nativeHead = tiptapPosToNativePos(docBefore, selBefore.head);
|
|
30
|
+
return withPreservedAlignment(editor, chain(), c => c.clearNodes().command(({
|
|
31
|
+
tr,
|
|
32
|
+
state
|
|
33
|
+
}) => {
|
|
34
|
+
const listType = state.schema.nodes[listTypeName];
|
|
35
|
+
const itemType = state.schema.nodes[itemTypeName];
|
|
36
|
+
if (!listType || !itemType) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
const {
|
|
40
|
+
$from,
|
|
41
|
+
$to
|
|
42
|
+
} = state.selection;
|
|
43
|
+
const range = $from.blockRange($to);
|
|
44
|
+
if (!range) {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
const listItems = [];
|
|
48
|
+
for (let i = range.startIndex; i < range.endIndex; i++) {
|
|
49
|
+
const block = range.parent.child(i);
|
|
50
|
+
listItems.push(itemType.create(itemAttrs, Fragment.from(block.copy(block.content))));
|
|
51
|
+
}
|
|
52
|
+
if (listItems.length === 0) {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
const list = listType.create(null, Fragment.from(listItems));
|
|
56
|
+
tr.replaceWith(range.start, range.end, list);
|
|
57
|
+
const docAfter = tr.doc;
|
|
58
|
+
const pmAnchor = nativePosToTiptapPos(docAfter, nativeAnchor);
|
|
59
|
+
const pmHead = nativePosToTiptapPos(docAfter, nativeHead);
|
|
60
|
+
tr.setSelection(TextSelection.between(docAfter.resolve(pmAnchor), docAfter.resolve(pmHead)));
|
|
61
|
+
return true;
|
|
62
|
+
}));
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=applyWrappingListToSelection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Fragment","TextSelection","nativePosToTiptapPos","tiptapPosToNativePos","withPreservedAlignment","applyWrappingListToSelection","editor","chain","listTypeName","itemTypeName","itemAttrs","doc","docBefore","selection","selBefore","state","nativeAnchor","anchor","nativeHead","head","c","clearNodes","command","tr","listType","schema","nodes","itemType","$from","$to","range","blockRange","listItems","i","startIndex","endIndex","block","parent","child","push","create","from","copy","content","length","list","replaceWith","start","end","docAfter","pmAnchor","pmHead","setSelection","between","resolve"],"sourceRoot":"../../../../src","sources":["web/formats/applyWrappingListToSelection.ts"],"mappings":";;AAEA,SAASA,QAAQ,QAAQ,kBAAkB;AAC3C,SAASC,aAAa,QAAQ,kBAAkB;AAEhD,SAASC,oBAAoB,EAAEC,oBAAoB,QAAQ,uBAAoB;AAC/E,SAASC,sBAAsB,QAAQ,kBAAe;;AAEtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,4BAA4BA,CAC1CC,MAAc,EACdC,KAA4B,EAC5BC,YAAoB,EACpBC,YAAoB,EACpBC,SAAyC,GAAG,IAAI,EACvC;EACT,MAAM;IAAEC,GAAG,EAAEC,SAAS;IAAEC,SAAS,EAAEC;EAAU,CAAC,GAAGR,MAAM,CAACS,KAAK;EAC7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B,QAAQ,CAACgB,MAAM,CAAC,IAAI,EAAExC,QAAQ,CAACyC,IAAI,CAACT,SAAS,CAAC,CAAC;IAC5DT,EAAE,CAACuB,WAAW,CAAChB,KAAK,CAACiB,KAAK,EAAEjB,KAAK,CAACkB,GAAG,EAAEH,IAAI,CAAC;IAE5C,MAAMI,QAAQ,GAAG1B,EAAE,CAACZ,GAAG;IACvB,MAAMuC,QAAQ,GAAGhD,oBAAoB,CAAC+C,QAAQ,EAAEjC,YAAY,CAAC;IAC7D,MAAMmC,MAAM,GAAGjD,oBAAoB,CAAC+C,QAAQ,EAAE/B,UAAU,CAAC;IACzDK,EAAE,CAAC6B,YAAY,CACbnD,aAAa,CAACoD,OAAO,CACnBJ,QAAQ,CAACK,OAAO,CAACJ,QAAQ,CAAC,EAC1BD,QAAQ,CAACK,OAAO,CAACH,MAAM,CACzB,CACF,CAAC;IACD,OAAO,IAAI;EACb,CAAC,CACH,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { HEADING_LEVELS, HEADING_TAGS } from "./EnrichedHeading.js";
|
|
4
|
+
export function isAnyParagraphFormatActive(editor) {
|
|
5
|
+
return editor.isActive('blockquote') || editor.isActive('codeBlock') || HEADING_LEVELS.some(level => editor.isActive('heading', {
|
|
6
|
+
level
|
|
7
|
+
})) || editor.isActive('orderedList') || editor.isActive('unorderedList') || editor.isActive('checkboxList');
|
|
8
|
+
}
|
|
9
|
+
export function isLinkBlocked(editor) {
|
|
10
|
+
return editor.isActive('code') || editor.isActive('codeBlock') || editor.isActive('mention') || editor.isActive('image');
|
|
11
|
+
}
|
|
12
|
+
function isMentionBlocked(editor) {
|
|
13
|
+
return editor.isActive('code') || editor.isActive('codeBlock') || editor.isActive('link') || editor.isActive('image');
|
|
14
|
+
}
|
|
15
|
+
export function isImageBlocked(editor) {
|
|
16
|
+
return editor.isActive('code') || editor.isActive('link') || editor.isActive('mention');
|
|
17
|
+
}
|
|
18
|
+
export function isFormatBlocked(tiptapName, editor, htmlStyle) {
|
|
19
|
+
if (tiptapName === 'image') {
|
|
20
|
+
return isImageBlocked(editor);
|
|
21
|
+
}
|
|
22
|
+
if (tiptapName === 'link') {
|
|
23
|
+
return isLinkBlocked(editor);
|
|
24
|
+
}
|
|
25
|
+
if (tiptapName === 'code' && editor.isActive('image')) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
if (tiptapName === 'mention') {
|
|
29
|
+
return isMentionBlocked(editor);
|
|
30
|
+
}
|
|
31
|
+
if (editor.isActive('codeBlock')) {
|
|
32
|
+
return ['bold', 'italic', 'underline', 'strike', 'code'].includes(tiptapName);
|
|
33
|
+
}
|
|
34
|
+
for (const level of HEADING_LEVELS) {
|
|
35
|
+
if (editor.isActive('heading', {
|
|
36
|
+
level
|
|
37
|
+
})) {
|
|
38
|
+
const key = HEADING_TAGS[level - 1];
|
|
39
|
+
if (tiptapName === 'bold' && htmlStyle[key].bold) return true;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
export function toggleParagraphFormat(isActive, deactivate, activate, chain, editor) {
|
|
45
|
+
if (isActive()) {
|
|
46
|
+
return withPreservedAlignment(editor, chain(), c => {
|
|
47
|
+
deactivate();
|
|
48
|
+
return c;
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
return withPreservedAlignment(editor, chain(), c => activate(c.clearNodes()));
|
|
52
|
+
}
|
|
53
|
+
export function getCurrentAlignment(editor) {
|
|
54
|
+
const {
|
|
55
|
+
doc,
|
|
56
|
+
selection
|
|
57
|
+
} = editor.state;
|
|
58
|
+
let {
|
|
59
|
+
$from
|
|
60
|
+
} = selection;
|
|
61
|
+
|
|
62
|
+
// If the user presses Cmd+A, the selection anchors to the document root (depth 0).
|
|
63
|
+
// We resolve position '1' to step exactly inside the first paragraph node
|
|
64
|
+
// so the loop can correctly read its alignment.
|
|
65
|
+
if ($from.depth === 0 && doc.content.size > 0) {
|
|
66
|
+
$from = doc.resolve(1);
|
|
67
|
+
}
|
|
68
|
+
for (let depth = $from.depth; depth >= 0; depth--) {
|
|
69
|
+
const node = $from.node(depth);
|
|
70
|
+
if (node.attrs.textAlign) {
|
|
71
|
+
return node.attrs.textAlign;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
export function withPreservedAlignment(editor, chain, mutateChain) {
|
|
77
|
+
const currentAlignment = getCurrentAlignment(editor);
|
|
78
|
+
const c = mutateChain(chain);
|
|
79
|
+
if (currentAlignment && currentAlignment !== 'auto') {
|
|
80
|
+
c.setTextAlign(currentAlignment);
|
|
81
|
+
}
|
|
82
|
+
return c.run();
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=formatRules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["HEADING_LEVELS","HEADING_TAGS","isAnyParagraphFormatActive","editor","isActive","some","level","isLinkBlocked","isMentionBlocked","isImageBlocked","isFormatBlocked","tiptapName","htmlStyle","includes","key","bold","toggleParagraphFormat","deactivate","activate","chain","withPreservedAlignment","c","clearNodes","getCurrentAlignment","doc","selection","state","$from","depth","content","size","resolve","node","attrs","textAlign","mutateChain","currentAlignment","setTextAlign","run"],"sourceRoot":"../../../../src","sources":["web/formats/formatRules.ts"],"mappings":";;AAEA,SAASA,cAAc,EAAEC,YAAY,QAAQ,sBAAmB;AAGhE,OAAO,SAASC,0BAA0BA,CAACC,MAAc,EAAW;EAClE,OACEA,MAAM,CAACC,QAAQ,CAAC,YAAY,CAAC,IAC7BD,MAAM,CAACC,QAAQ,CAAC,WAAW,CAAC,IAC5BJ,cAAc,CAACK,IAAI,CAAEC,KAAK,IAAKH,MAAM,CAACC,QAAQ,CAAC,SAAS,EAAE;IAAEE;EAAM,CAAC,CAAC,CAAC,IACrEH,MAAM,CAACC,QAAQ,CAAC,aAAa,CAAC,IAC9BD,MAA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,GAAGD,KAAK,CAACC,KAAK,EAAEA,KAAK,IAAI,CAAC,EAAEA,KAAK,EAAE,EAAE;IACjD,MAAMI,IAAI,GAAGL,KAAK,CAACK,IAAI,CAACJ,KAAK,CAAC;IAC9B,IAAII,IAAI,CAACC,KAAK,CAACC,SAAS,EAAE;MACxB,OAAOF,IAAI,CAACC,KAAK,CAACC,SAAS;IAC7B;EACF;EACA,OAAO,IAAI;AACb;AAEA,OAAO,SAASd,sBAAsBA,CACpCjB,MAAc,EACdgB,KAAsB,EACtBgB,WAAoD,EAC3C;EACT,MAAMC,gBAAgB,GAAGb,mBAAmB,CAACpB,MAAM,CAAC;EAEpD,MAAMkB,CAAC,GAAGc,WAAW,CAAChB,KAAK,CAAC;EAE5B,IAAIiB,gBAAgB,IAAIA,gBAAgB,KAAK,MAAM,EAAE;IACnDf,CAAC,CAACgB,YAAY,CAACD,gBAAgB,CAAC;EAClC;EAEA,OAAOf,CAAC,CAACiB,GAAG,CAAC,CAAC;AAChB","ignoreList":[]}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { isTextSelection } from '@tiptap/core';
|
|
4
|
+
import { lineStartBackspace } from "./wrappedBlockKeyboard.js";
|
|
5
|
+
import { withPreservedAlignment } from "./formatRules.js";
|
|
6
|
+
function emptyListItemContent(itemName) {
|
|
7
|
+
return {
|
|
8
|
+
type: itemName,
|
|
9
|
+
content: [{
|
|
10
|
+
type: 'paragraph'
|
|
11
|
+
}]
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// Enter: always extend the list — splitListItem fails on an empty last item (see TipTap splitListItem).
|
|
16
|
+
export function listEnter(editor, itemName) {
|
|
17
|
+
if (!editor.isActive(itemName)) {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
if (editor.chain().focus().splitListItem(itemName).scrollIntoView().run()) {
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
const {
|
|
24
|
+
selection
|
|
25
|
+
} = editor.state;
|
|
26
|
+
if (!selection.empty || !isTextSelection(selection)) {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
const $from = selection.$from;
|
|
30
|
+
if ($from.parent.content.size > 0) {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Flat lists only: list item is always the parent block of the paragraph (depth − 1).
|
|
35
|
+
const itemDepth = $from.depth - 1;
|
|
36
|
+
if (itemDepth < 1) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
const insertPos = $from.after(itemDepth);
|
|
40
|
+
return editor.chain().focus().insertContentAt(insertPos, emptyListItemContent(itemName)).scrollIntoView().run();
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Backspace: first press at line start lifts the list item; second press (paragraph below list) joins backward.
|
|
44
|
+
export function listBackspace(editor, itemName, wrapperNames) {
|
|
45
|
+
return lineStartBackspace(editor, {
|
|
46
|
+
isActive: () => editor.isActive(itemName),
|
|
47
|
+
lift: () => {
|
|
48
|
+
return withPreservedAlignment(editor, editor.chain(), c => c.focus().liftListItem(itemName));
|
|
49
|
+
},
|
|
50
|
+
shouldJoinBefore: beforeName => beforeName != null && wrapperNames.includes(beforeName)
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=listKeyboard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["isTextSelection","lineStartBackspace","withPreservedAlignment","emptyListItemContent","itemName","type","content","listEnter","editor","isActive","chain","focus","splitListItem","scrollIntoView","run","selection","state","empty","$from","parent","size","itemDepth","depth","insertPos","after","insertContentAt","listBackspace","wrapperNames","lift","c","liftListItem","shouldJoinBefore","beforeName","includes"],"sourceRoot":"../../../../src","sources":["web/formats/listKeyboard.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAuC,cAAc;AAE7E,SAASC,kBAAkB,QAAQ,2BAAwB;AAC3D,SAASC,sBAAsB,Q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YAA+B,EACtB;EACT,OAAO1B,kBAAkB,CAACO,MAAM,EAAE;IAChCC,QAAQ,EAAEA,CAAA,KAAMD,MAAM,CAACC,QAAQ,CAACL,QAAQ,CAAC;IACzCwB,IAAI,EAAEA,CAAA,KAAM;MACV,OAAO1B,sBAAsB,CAACM,MAAM,EAAEA,MAAM,CAACE,KAAK,CAAC,CAAC,EAAGmB,CAAC,IACtDA,CAAC,CAAClB,KAAK,CAAC,CAAC,CAACmB,YAAY,CAAC1B,QAAQ,CACjC,CAAC;IACH,CAAC;IACD2B,gBAAgB,EAAGC,UAAU,IAC3BA,UAAU,IAAI,IAAI,IAAIL,YAAY,CAACM,QAAQ,CAACD,UAAU;EAC1D,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { isTextSelection } from '@tiptap/core';
|
|
4
|
+
// Same as prosemirror-commands `findCutBefore` (not exported from that package)
|
|
5
|
+
// Resolves to the gap between this block and the block above it.
|
|
6
|
+
export function findCutBefore($pos) {
|
|
7
|
+
if (!$pos.parent.type.spec.isolating) {
|
|
8
|
+
for (let i = $pos.depth - 1; i >= 0; i--) {
|
|
9
|
+
if ($pos.index(i) > 0) {
|
|
10
|
+
return $pos.doc.resolve($pos.before(i + 1));
|
|
11
|
+
}
|
|
12
|
+
if ($pos.node(i).type.spec.isolating) {
|
|
13
|
+
break;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** Line start → lift current block or join with the block above (wrapped blocks + lists). */
|
|
21
|
+
export function lineStartBackspace(editor, options) {
|
|
22
|
+
const {
|
|
23
|
+
selection
|
|
24
|
+
} = editor.state;
|
|
25
|
+
if (!isTextSelection(selection) || !selection.$cursor || selection.$cursor.parentOffset !== 0) {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
if (options.isActive()) {
|
|
29
|
+
return options.lift();
|
|
30
|
+
}
|
|
31
|
+
const $cut = findCutBefore(selection.$cursor);
|
|
32
|
+
const beforeName = $cut?.nodeBefore?.type.name;
|
|
33
|
+
if (options.shouldJoinBefore(beforeName)) {
|
|
34
|
+
return editor.chain().focus().joinTextblockBackward().run();
|
|
35
|
+
}
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Enter only splits inside the wrapper so the default handler does not exit the block.
|
|
40
|
+
export function wrappedBlockEnter(editor, wrapperNodeName) {
|
|
41
|
+
if (editor.isActive(wrapperNodeName)) {
|
|
42
|
+
return editor.commands.splitBlock();
|
|
43
|
+
}
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Backspace at line start inside the wrapper lifts the current paragraph out.
|
|
48
|
+
// Backspace at line start in a paragraph below the wrapper uses `joinTextblockBackward`
|
|
49
|
+
// so default `joinBackward` / `deleteBarrier` does not re-wrap the paragraph into the
|
|
50
|
+
// wrapper above.
|
|
51
|
+
export function wrappedBlockBackspace(editor, wrapperNodeName) {
|
|
52
|
+
return lineStartBackspace(editor, {
|
|
53
|
+
isActive: () => editor.isActive(wrapperNodeName),
|
|
54
|
+
lift: () => editor.chain().focus().lift(wrapperNodeName).run(),
|
|
55
|
+
shouldJoinBefore: beforeName => beforeName === wrapperNodeName
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=wrappedBlockKeyboard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["isTextSelection","findCutBefore","$pos","parent","type","spec","isolating","i","depth","index","doc","resolve","before","node","lineStartBackspace","editor","options","selection","state","$cursor","parentOffset","isActive","lift","$cut","beforeName","nodeBefore","name","shouldJoinBefore","chain","focus","joinTextblockBackward","run","wrappedBlockEnter","wrapperNodeName","commands","splitBlock","wrappedBlockBackspace"],"sourceRoot":"../../../../src","sources":["web/formats/wrappedBlockKeyboard.ts"],"mappings":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AACC,qBAAqB,CAAC,CAAC,CAACC,GAAG,CAAC,CAAC;EAC7D;EAEA,OAAO,KAAK;AACd;;AAEA;AACA,OAAO,SAASC,iBAAiBA,CAC/BjB,MAAc,EACdkB,eAAuB,EACd;EACT,IAAIlB,MAAM,CAACM,QAAQ,CAACY,eAAe,CAAC,EAAE;IACpC,OAAOlB,MAAM,CAACmB,QAAQ,CAACC,UAAU,CAAC,CAAC;EACrC;EACA,OAAO,KAAK;AACd;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,qBAAqBA,CACnCrB,MAAc,EACdkB,eAAuB,EACd;EACT,OAAOnB,kBAAkB,CAACC,MAAM,EAAE;IAChCM,QAAQ,EAAEA,CAAA,KAAMN,MAAM,CAACM,QAAQ,CAACY,eAAe,CAAC;IAChDX,IAAI,EAAEA,CAAA,KAAMP,MAAM,CAACa,KAAK,CAAC,CAAC,CAACC,KAAK,CAAC,CAAC,CAACP,IAAI,CAACW,eAAe,CAAC,CAACF,GAAG,CAAC,CAAC;IAC9DJ,gBAAgB,EAAGH,UAAU,IAAKA,UAAU,KAAKS;EACnD,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* TipTap format for checkboxes (TaskItem / Checkbox extension output):
|
|
5
|
+
* <ul data-type="checkboxList">
|
|
6
|
+
* <li data-checked="true|false" data-type="checkboxItem">
|
|
7
|
+
* <label><input type="checkbox" checked="checked"><span></span></label>
|
|
8
|
+
* <div><p>…</p></div>
|
|
9
|
+
* </li>
|
|
10
|
+
* </ul>
|
|
11
|
+
*
|
|
12
|
+
* Native format for checkboxes:
|
|
13
|
+
* <ul data-type="checkbox">
|
|
14
|
+
* <li>…</li>
|
|
15
|
+
* <li checked>…</li>
|
|
16
|
+
* </ul>
|
|
17
|
+
*/
|
|
18
|
+
export function checkboxHtmlForTiptap(html) {
|
|
19
|
+
const parser = new DOMParser();
|
|
20
|
+
const doc = parser.parseFromString(html, 'text/html');
|
|
21
|
+
doc.querySelectorAll('ul[data-type="checkbox"]').forEach(ul => {
|
|
22
|
+
ul.setAttribute('data-type', 'checkboxList');
|
|
23
|
+
ul.querySelectorAll('li').forEach(li => {
|
|
24
|
+
li.setAttribute('data-type', 'checkboxItem');
|
|
25
|
+
if (li.hasAttribute('checked')) {
|
|
26
|
+
li.setAttribute('data-checked', 'true');
|
|
27
|
+
li.removeAttribute('checked');
|
|
28
|
+
} else {
|
|
29
|
+
li.setAttribute('data-checked', 'false');
|
|
30
|
+
}
|
|
31
|
+
const innerContent = li.innerHTML;
|
|
32
|
+
li.innerHTML = `<p>${innerContent}</p>`;
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
return doc.body.innerHTML;
|
|
36
|
+
}
|
|
37
|
+
export function checkboxHtmlFromTiptap(html) {
|
|
38
|
+
const parser = new DOMParser();
|
|
39
|
+
const doc = parser.parseFromString(html, 'text/html');
|
|
40
|
+
doc.querySelectorAll('ul[data-type="checkboxList"]').forEach(ul => {
|
|
41
|
+
ul.setAttribute('data-type', 'checkbox');
|
|
42
|
+
ul.querySelectorAll('li[data-type="checkboxItem"]').forEach(li => {
|
|
43
|
+
if (li.getAttribute('data-checked') === 'true') {
|
|
44
|
+
li.setAttribute('checked', '');
|
|
45
|
+
}
|
|
46
|
+
li.removeAttribute('data-type');
|
|
47
|
+
li.removeAttribute('data-checked');
|
|
48
|
+
const pTag = li.querySelector('div > p');
|
|
49
|
+
li.innerHTML = pTag ? pTag.innerHTML : '';
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
return doc.body.innerHTML.replace(/checked=""/g, 'checked');
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=checkboxHtmlNormalizer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["checkboxHtmlForTiptap","html","parser","DOMParser","doc","parseFromString","querySelectorAll","forEach","ul","setAttribute","li","hasAttribute","removeAttribute","innerContent","innerHTML","body","checkboxHtmlFromTiptap","getAttribute","pTag","querySelector","replace"],"sourceRoot":"../../../../src","sources":["web/normalization/checkboxHtmlNormalizer.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,qBAAqBA,CAACC,IAAY,EAAU;EAC1D,MAAMC,MAAM,GAAG,IAAIC,SAAS,CAAC,CAAC;EAC9B,MAAMC,GAAG,GAAGF,MAAM,CAACG,eAAe,CAACJ,IAAI,EAAE,WAAW,CAAC;EAErDG,GAAG,CAACE,gBAAgB,CAAC,0BAA0B,CAAC,CAACC,OAAO,CAAEC,EAAE,IAAK;IAC/DA,EAAE,CAACC,YAAY,CAAC,WAAW,EAAE,cAAc,CAAC;IAE5CD,EAAE,CAACF,gBAAgB,CAAC,IAAI,CAAC,CAACC,OAAO,CAAEG,EAAE,IAAK;MACxCA,EAAE,CAACD,YAAY,CAAC,WAAW,EAAE,cAAc,CAAC;MAE5C,IAAIC,EAAE,CAACC,YAAY,CAAC,SAAS,CAAC,EAAE;QAC9BD,EAAE,CAACD,YAAY,CAAC,cAAc,EAAE,MAAM,CAAC;QACvCC,EAAE,CAACE,eAAe,CAAC,SAAS,CAAC;MAC/B,CAAC,MAAM;QACLF,EAAE,CAACD,YAAY,CAAC,cAAc,EAAE,OAAO,CAAC;MAC1C;MAEA,MAAMI,YAAY,GAAGH,EAAE,CAACI,SAAS;MACjCJ,EAAE,CAACI,SAAS,GAAG,MAAMD,YAAY,MAAM;IACzC,CAAC,CAAC;EACJ,CAAC,CAAC;EAEF,OAAOT,GAAG,CAACW,IAAI,CAACD,SAAS;AAC3B;AAEA,OAAO,SAASE,sBAAsBA,CAACf,IAAY,EAAU;EAC3D,MAAMC,MAAM,GAAG,IAAIC,SAAS,CAAC,CAAC;EAC9B,MAAMC,GAAG,GAAGF,MAAM,CAACG,eAAe,CAACJ,IAAI,EAAE,WAAW,CAAC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