react-native-enriched-html 0.0.0 → 1.1.0-nightly-20260617-3dfd09072
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/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 +1034 -0
- package/android/src/main/java/com/swmansion/enriched/common/parser/EnrichedSpanFactory.kt +82 -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 +83 -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 +361 -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 +85 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/EnrichedTextInputView.kt +1141 -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 +55 -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 +34 -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 +367 -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 +232 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/styles/ListStyles.kt +260 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/styles/ParagraphStyles.kt +439 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/styles/ParametrizedStyles.kt +408 -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 +340 -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 +156 -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 +106 -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 +915 -0
- package/cpp/parser/GumboParser.cpp +16 -0
- package/cpp/parser/GumboParser.hpp +23 -0
- package/cpp/tests/GumboParserTest.cpp +457 -0
- package/ios/EnrichedTextInputView.h +54 -0
- package/ios/EnrichedTextInputView.mm +2170 -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 +454 -0
- package/ios/extensions/StringExtension.h +15 -0
- package/ios/extensions/StringExtension.mm +69 -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 +11 -0
- package/ios/htmlParser/HtmlParser.mm +1468 -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 +225 -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 +110 -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 +532 -0
- package/ios/styles/MentionStyle.mm +541 -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 +181 -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 +289 -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 +4 -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 +15 -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/EnrichedTextInput.css +201 -0
- package/lib/module/web/EnrichedTextInput.js +314 -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/checkboxHtmlNormalizer.js +54 -0
- package/lib/module/web/checkboxHtmlNormalizer.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 +140 -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/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 +63 -0
- package/lib/module/web/formats/applyWrappingListToSelection.js.map +1 -0
- package/lib/module/web/formats/formatRules.js +48 -0
- package/lib/module/web/formats/formatRules.js.map +1 -0
- package/lib/module/web/formats/listKeyboard.js +50 -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/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/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 +67 -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 +58 -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/subscribeMentionEvents.js +100 -0
- package/lib/module/web/pmPlugins/MentionPlugin/subscribeMentionEvents.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/MergeAdjacentSameKindBlocksPlugin.js +42 -0
- package/lib/module/web/pmPlugins/MergeAdjacentSameKindBlocksPlugin.js.map +1 -0
- package/lib/module/web/pmPlugins/ShortcutPlugin.js +123 -0
- package/lib/module/web/pmPlugins/ShortcutPlugin.js.map +1 -0
- package/lib/module/web/pmPlugins/StrictMarksPlugin.js +98 -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/styleConversion/buildMentionRulesCSS.js +33 -0
- package/lib/module/web/styleConversion/buildMentionRulesCSS.js.map +1 -0
- package/lib/module/web/styleConversion/enrichedInputStyleToCSSProperties.js +159 -0
- package/lib/module/web/styleConversion/enrichedInputStyleToCSSProperties.js.map +1 -0
- package/lib/module/web/styleConversion/enrichedInputThemingToCSSProperties.js +18 -0
- package/lib/module/web/styleConversion/enrichedInputThemingToCSSProperties.js.map +1 -0
- package/lib/module/web/styleConversion/htmlStyleToCSSVariables.js +145 -0
- package/lib/module/web/styleConversion/htmlStyleToCSSVariables.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/tiptapHtmlNormalizer.js +30 -0
- package/lib/module/web/tiptapHtmlNormalizer.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 +88 -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 +68 -0
- package/lib/module/web/useOnLinkDetected.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/index.d.ts +3 -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/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/checkboxHtmlNormalizer.d.ts +3 -0
- package/lib/typescript/src/web/checkboxHtmlNormalizer.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 +5 -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/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 +10 -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/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/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/subscribeMentionEvents.d.ts +4 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/subscribeMentionEvents.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/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 +10 -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/styleConversion/buildMentionRulesCSS.d.ts +3 -0
- package/lib/typescript/src/web/styleConversion/buildMentionRulesCSS.d.ts.map +1 -0
- package/lib/typescript/src/web/styleConversion/enrichedInputStyleToCSSProperties.d.ts +8 -0
- package/lib/typescript/src/web/styleConversion/enrichedInputStyleToCSSProperties.d.ts.map +1 -0
- package/lib/typescript/src/web/styleConversion/enrichedInputThemingToCSSProperties.d.ts +9 -0
- package/lib/typescript/src/web/styleConversion/enrichedInputThemingToCSSProperties.d.ts.map +1 -0
- package/lib/typescript/src/web/styleConversion/htmlStyleToCSSVariables.d.ts +10 -0
- package/lib/typescript/src/web/styleConversion/htmlStyleToCSSVariables.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/tiptapHtmlNormalizer.d.ts +3 -0
- package/lib/typescript/src/web/tiptapHtmlNormalizer.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/package.json +232 -1
- package/react-native.config.js +16 -0
- package/src/index.native.tsx +34 -0
- package/src/index.tsx +24 -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 +864 -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 +181 -0
- package/src/utils/nullthrows.ts +7 -0
- package/src/utils/regexParser.ts +56 -0
- package/src/web/EnrichedTextInput.css +201 -0
- package/src/web/EnrichedTextInput.tsx +403 -0
- package/src/web/adaptWebToNativeEvent.ts +37 -0
- package/src/web/checkboxHtmlNormalizer.ts +62 -0
- package/src/web/formats/EnrichedBlockquote.ts +36 -0
- package/src/web/formats/EnrichedBold.ts +16 -0
- package/src/web/formats/EnrichedCheckboxItem.ts +35 -0
- package/src/web/formats/EnrichedCheckboxList.ts +47 -0
- package/src/web/formats/EnrichedCode.ts +13 -0
- package/src/web/formats/EnrichedCodeBlock.ts +53 -0
- package/src/web/formats/EnrichedHeading.ts +36 -0
- package/src/web/formats/EnrichedImage.ts +59 -0
- package/src/web/formats/EnrichedImageNodeView.tsx +89 -0
- package/src/web/formats/EnrichedItalic.ts +16 -0
- package/src/web/formats/EnrichedLink.ts +149 -0
- package/src/web/formats/EnrichedListItem.ts +17 -0
- package/src/web/formats/EnrichedMention.ts +55 -0
- package/src/web/formats/EnrichedOrderedList.ts +40 -0
- package/src/web/formats/EnrichedStrike.ts +16 -0
- package/src/web/formats/EnrichedUnderline.ts +16 -0
- package/src/web/formats/EnrichedUnorderedList.ts +50 -0
- package/src/web/formats/applyWrappingListToSelection.ts +76 -0
- package/src/web/formats/formatRules.ts +84 -0
- package/src/web/formats/listKeyboard.ts +58 -0
- package/src/web/formats/wrappedBlockKeyboard.ts +76 -0
- package/src/web/pasteImages.ts +96 -0
- package/src/web/pastedImageDimensions.ts +40 -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 +75 -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 +83 -0
- package/src/web/pmPlugins/MentionPlugin/startMention.ts +14 -0
- package/src/web/pmPlugins/MentionPlugin/stripPartialMentionMarks.ts +20 -0
- package/src/web/pmPlugins/MentionPlugin/subscribeMentionEvents.ts +105 -0
- package/src/web/pmPlugins/MentionPlugin/types.ts +22 -0
- package/src/web/pmPlugins/MergeAdjacentSameKindBlocksPlugin.ts +57 -0
- package/src/web/pmPlugins/ShortcutPlugin.ts +98 -0
- package/src/web/pmPlugins/StrictMarksPlugin.ts +131 -0
- package/src/web/pmPlugins/StripBoldInStyledHeadingsPlugin.ts +79 -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/styleConversion/buildMentionRulesCSS.ts +42 -0
- package/src/web/styleConversion/enrichedInputStyleToCSSProperties.ts +224 -0
- package/src/web/styleConversion/enrichedInputThemingToCSSProperties.ts +34 -0
- package/src/web/styleConversion/htmlStyleToCSSVariables.ts +226 -0
- package/src/web/styleConversion/mentionIndicatorCssKey.ts +14 -0
- package/src/web/styleConversion/toColor.ts +17 -0
- package/src/web/tiptapHtmlNormalizer.ts +33 -0
- package/src/web/useOnChangeHtml.ts +14 -0
- package/src/web/useOnChangeState.ts +125 -0
- package/src/web/useOnChangeText.ts +15 -0
- package/src/web/useOnEditorChange.ts +33 -0
- package/src/web/useOnLinkDetected.ts +82 -0
|
@@ -0,0 +1,721 @@
|
|
|
1
|
+
import type { RefObject } from 'react';
|
|
2
|
+
import type { ColorValue, DimensionValue, NativeMethods, NativeSyntheticEvent, ReturnKeyTypeOptions, TargetedEvent, TextStyle, ViewProps } from 'react-native';
|
|
3
|
+
/**
|
|
4
|
+
* Allowed container styles for `<EnrichedTextInput />`'s `style` prop.
|
|
5
|
+
*
|
|
6
|
+
* Represents the supported subset of React Native
|
|
7
|
+
* [`TextStyle`](https://reactnative.dev/docs/text-style-props).
|
|
8
|
+
* Some properties are not supported on all platforms. In such cases a property
|
|
9
|
+
* is annotated with a `@platform` directive.
|
|
10
|
+
*/
|
|
11
|
+
export interface EnrichedInputStyle {
|
|
12
|
+
alignSelf?: TextStyle['alignSelf'];
|
|
13
|
+
aspectRatio?: number | string;
|
|
14
|
+
borderBottomWidth?: number;
|
|
15
|
+
borderEndWidth?: number;
|
|
16
|
+
borderLeftWidth?: number;
|
|
17
|
+
borderRightWidth?: number;
|
|
18
|
+
borderStartWidth?: number;
|
|
19
|
+
borderTopWidth?: number;
|
|
20
|
+
borderWidth?: number;
|
|
21
|
+
bottom?: DimensionValue;
|
|
22
|
+
boxSizing?: TextStyle['boxSizing'];
|
|
23
|
+
display?: TextStyle['display'];
|
|
24
|
+
end?: DimensionValue;
|
|
25
|
+
flex?: number;
|
|
26
|
+
flexBasis?: DimensionValue;
|
|
27
|
+
flexGrow?: number;
|
|
28
|
+
flexShrink?: number;
|
|
29
|
+
height?: DimensionValue;
|
|
30
|
+
inset?: DimensionValue;
|
|
31
|
+
insetBlock?: DimensionValue;
|
|
32
|
+
insetBlockEnd?: DimensionValue;
|
|
33
|
+
insetBlockStart?: DimensionValue;
|
|
34
|
+
insetInline?: DimensionValue;
|
|
35
|
+
insetInlineEnd?: DimensionValue;
|
|
36
|
+
insetInlineStart?: DimensionValue;
|
|
37
|
+
left?: DimensionValue;
|
|
38
|
+
margin?: DimensionValue;
|
|
39
|
+
marginBlock?: DimensionValue;
|
|
40
|
+
marginBlockEnd?: DimensionValue;
|
|
41
|
+
marginBlockStart?: DimensionValue;
|
|
42
|
+
marginBottom?: DimensionValue;
|
|
43
|
+
marginEnd?: DimensionValue;
|
|
44
|
+
marginHorizontal?: DimensionValue;
|
|
45
|
+
marginInline?: DimensionValue;
|
|
46
|
+
marginInlineEnd?: DimensionValue;
|
|
47
|
+
marginInlineStart?: DimensionValue;
|
|
48
|
+
marginLeft?: DimensionValue;
|
|
49
|
+
marginRight?: DimensionValue;
|
|
50
|
+
marginStart?: DimensionValue;
|
|
51
|
+
marginTop?: DimensionValue;
|
|
52
|
+
marginVertical?: DimensionValue;
|
|
53
|
+
maxHeight?: DimensionValue;
|
|
54
|
+
maxWidth?: DimensionValue;
|
|
55
|
+
minHeight?: DimensionValue;
|
|
56
|
+
minWidth?: DimensionValue;
|
|
57
|
+
padding?: DimensionValue;
|
|
58
|
+
paddingBlock?: DimensionValue;
|
|
59
|
+
paddingBlockEnd?: DimensionValue;
|
|
60
|
+
paddingBlockStart?: DimensionValue;
|
|
61
|
+
paddingBottom?: DimensionValue;
|
|
62
|
+
paddingEnd?: DimensionValue;
|
|
63
|
+
paddingHorizontal?: DimensionValue;
|
|
64
|
+
paddingInline?: DimensionValue;
|
|
65
|
+
paddingInlineEnd?: DimensionValue;
|
|
66
|
+
paddingInlineStart?: DimensionValue;
|
|
67
|
+
paddingLeft?: DimensionValue;
|
|
68
|
+
paddingRight?: DimensionValue;
|
|
69
|
+
paddingStart?: DimensionValue;
|
|
70
|
+
paddingTop?: DimensionValue;
|
|
71
|
+
paddingVertical?: DimensionValue;
|
|
72
|
+
position?: TextStyle['position'];
|
|
73
|
+
right?: DimensionValue;
|
|
74
|
+
start?: DimensionValue;
|
|
75
|
+
top?: DimensionValue;
|
|
76
|
+
width?: DimensionValue;
|
|
77
|
+
zIndex?: number;
|
|
78
|
+
/** @platform ios */
|
|
79
|
+
shadowColor?: ColorValue;
|
|
80
|
+
/** @platform ios */
|
|
81
|
+
shadowOffset?: TextStyle['shadowOffset'];
|
|
82
|
+
/** @platform ios */
|
|
83
|
+
shadowOpacity?: TextStyle['shadowOpacity'];
|
|
84
|
+
/** @platform ios */
|
|
85
|
+
shadowRadius?: number;
|
|
86
|
+
transform?: TextStyle['transform'];
|
|
87
|
+
transformOrigin?: TextStyle['transformOrigin'];
|
|
88
|
+
/** @platform ios web */
|
|
89
|
+
backfaceVisibility?: TextStyle['backfaceVisibility'];
|
|
90
|
+
backgroundColor?: ColorValue;
|
|
91
|
+
/** @platform ios web */
|
|
92
|
+
borderBlockColor?: ColorValue;
|
|
93
|
+
/** @platform ios web */
|
|
94
|
+
borderBlockEndColor?: ColorValue;
|
|
95
|
+
/** @platform ios web */
|
|
96
|
+
borderBlockStartColor?: ColorValue;
|
|
97
|
+
/** @platform ios web */
|
|
98
|
+
borderBottomColor?: ColorValue;
|
|
99
|
+
/** @platform ios web */
|
|
100
|
+
borderBottomEndRadius?: TextStyle['borderBottomEndRadius'];
|
|
101
|
+
/** @platform ios web */
|
|
102
|
+
borderBottomLeftRadius?: TextStyle['borderBottomLeftRadius'];
|
|
103
|
+
/** @platform ios web */
|
|
104
|
+
borderBottomRightRadius?: TextStyle['borderBottomRightRadius'];
|
|
105
|
+
/** @platform ios web */
|
|
106
|
+
borderBottomStartRadius?: TextStyle['borderBottomStartRadius'];
|
|
107
|
+
/** @platform ios web */
|
|
108
|
+
borderColor?: ColorValue;
|
|
109
|
+
/** @platform ios web */
|
|
110
|
+
borderEndColor?: ColorValue;
|
|
111
|
+
/** @platform ios web */
|
|
112
|
+
borderEndEndRadius?: TextStyle['borderEndEndRadius'];
|
|
113
|
+
/** @platform ios web */
|
|
114
|
+
borderEndStartRadius?: TextStyle['borderEndStartRadius'];
|
|
115
|
+
/** @platform ios web */
|
|
116
|
+
borderLeftColor?: ColorValue;
|
|
117
|
+
/** @platform ios web */
|
|
118
|
+
borderRadius?: TextStyle['borderRadius'];
|
|
119
|
+
/** @platform ios web */
|
|
120
|
+
borderRightColor?: ColorValue;
|
|
121
|
+
/** @platform ios web */
|
|
122
|
+
borderStartColor?: ColorValue;
|
|
123
|
+
/** @platform ios web */
|
|
124
|
+
borderStartEndRadius?: TextStyle['borderStartEndRadius'];
|
|
125
|
+
/** @platform ios web */
|
|
126
|
+
borderStartStartRadius?: TextStyle['borderStartStartRadius'];
|
|
127
|
+
/** @platform ios web */
|
|
128
|
+
borderStyle?: TextStyle['borderStyle'];
|
|
129
|
+
/** @platform ios web */
|
|
130
|
+
borderTopColor?: ColorValue;
|
|
131
|
+
/** @platform ios web */
|
|
132
|
+
borderTopEndRadius?: TextStyle['borderTopEndRadius'];
|
|
133
|
+
/** @platform ios web */
|
|
134
|
+
borderTopLeftRadius?: TextStyle['borderTopLeftRadius'];
|
|
135
|
+
/** @platform ios web */
|
|
136
|
+
borderTopRightRadius?: TextStyle['borderTopRightRadius'];
|
|
137
|
+
/** @platform ios web */
|
|
138
|
+
borderTopStartRadius?: TextStyle['borderTopStartRadius'];
|
|
139
|
+
boxShadow?: TextStyle['boxShadow'];
|
|
140
|
+
/** @platform web */
|
|
141
|
+
cursor?: TextStyle['cursor'];
|
|
142
|
+
/** @platform android */
|
|
143
|
+
elevation?: number;
|
|
144
|
+
/** @platform android web */
|
|
145
|
+
filter?: TextStyle['filter'];
|
|
146
|
+
/** @platform android web */
|
|
147
|
+
mixBlendMode?: TextStyle['mixBlendMode'];
|
|
148
|
+
opacity?: TextStyle['opacity'];
|
|
149
|
+
/** @platform ios web */
|
|
150
|
+
outlineColor?: ColorValue;
|
|
151
|
+
outlineOffset?: TextStyle['outlineOffset'];
|
|
152
|
+
/** @platform android web */
|
|
153
|
+
outlineStyle?: TextStyle['outlineStyle'];
|
|
154
|
+
outlineWidth?: TextStyle['outlineWidth'];
|
|
155
|
+
/** @platform ios web */
|
|
156
|
+
pointerEvents?: TextStyle['pointerEvents'];
|
|
157
|
+
color?: ColorValue;
|
|
158
|
+
fontFamily?: string;
|
|
159
|
+
fontSize?: number;
|
|
160
|
+
fontStyle?: TextStyle['fontStyle'];
|
|
161
|
+
fontWeight?: TextStyle['fontWeight'];
|
|
162
|
+
lineHeight?: number;
|
|
163
|
+
/** @platform web */
|
|
164
|
+
letterSpacing?: number;
|
|
165
|
+
}
|
|
166
|
+
interface HeadingStyle {
|
|
167
|
+
fontSize?: number;
|
|
168
|
+
bold?: boolean;
|
|
169
|
+
}
|
|
170
|
+
export interface MentionStyleProperties {
|
|
171
|
+
color?: ColorValue;
|
|
172
|
+
backgroundColor?: ColorValue;
|
|
173
|
+
textDecorationLine?: 'underline' | 'none';
|
|
174
|
+
}
|
|
175
|
+
export interface HtmlStyle {
|
|
176
|
+
h1?: HeadingStyle;
|
|
177
|
+
h2?: HeadingStyle;
|
|
178
|
+
h3?: HeadingStyle;
|
|
179
|
+
h4?: HeadingStyle;
|
|
180
|
+
h5?: HeadingStyle;
|
|
181
|
+
h6?: HeadingStyle;
|
|
182
|
+
blockquote?: {
|
|
183
|
+
borderColor?: ColorValue;
|
|
184
|
+
borderWidth?: number;
|
|
185
|
+
gapWidth?: number;
|
|
186
|
+
color?: ColorValue;
|
|
187
|
+
};
|
|
188
|
+
codeblock?: {
|
|
189
|
+
color?: ColorValue;
|
|
190
|
+
borderRadius?: number;
|
|
191
|
+
backgroundColor?: ColorValue;
|
|
192
|
+
};
|
|
193
|
+
code?: {
|
|
194
|
+
color?: ColorValue;
|
|
195
|
+
backgroundColor?: ColorValue;
|
|
196
|
+
};
|
|
197
|
+
a?: {
|
|
198
|
+
color?: ColorValue;
|
|
199
|
+
textDecorationLine?: 'underline' | 'none';
|
|
200
|
+
};
|
|
201
|
+
mention?: Record<string, MentionStyleProperties> | MentionStyleProperties;
|
|
202
|
+
ol?: {
|
|
203
|
+
gapWidth?: number;
|
|
204
|
+
marginLeft?: number;
|
|
205
|
+
markerFontWeight?: TextStyle['fontWeight'];
|
|
206
|
+
markerColor?: ColorValue;
|
|
207
|
+
};
|
|
208
|
+
ul?: {
|
|
209
|
+
bulletColor?: ColorValue;
|
|
210
|
+
bulletSize?: number;
|
|
211
|
+
marginLeft?: number;
|
|
212
|
+
gapWidth?: number;
|
|
213
|
+
};
|
|
214
|
+
ulCheckbox?: {
|
|
215
|
+
boxSize?: number;
|
|
216
|
+
gapWidth?: number;
|
|
217
|
+
marginLeft?: number;
|
|
218
|
+
boxColor?: ColorValue;
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
export type TextShortcutStyle = 'bold' | 'italic' | 'underline' | 'strikethrough' | 'inline_code' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'blockquote' | 'codeblock' | 'unordered_list' | 'ordered_list' | 'checkbox_list';
|
|
222
|
+
/**
|
|
223
|
+
* Defines a single text shortcut: a character sequence that, when typed is replaced by the corresponding paragraph or inline style.
|
|
224
|
+
*
|
|
225
|
+
* @example
|
|
226
|
+
* // Typing "- " at the start of a line converts it to an unordered list item.
|
|
227
|
+
* { trigger: '- ', style: 'unordered_list' }
|
|
228
|
+
*/
|
|
229
|
+
export interface TextShortcut {
|
|
230
|
+
/** The character sequence that activates the shortcut (e.g. `'- '`, `'1. '`). */
|
|
231
|
+
trigger: string;
|
|
232
|
+
/** The formatting style applied when the trigger is matched. */
|
|
233
|
+
style: TextShortcutStyle;
|
|
234
|
+
}
|
|
235
|
+
export interface OnChangeTextEvent {
|
|
236
|
+
value: string;
|
|
237
|
+
}
|
|
238
|
+
export interface OnChangeHtmlEvent {
|
|
239
|
+
value: string;
|
|
240
|
+
}
|
|
241
|
+
export interface OnChangeStateEvent {
|
|
242
|
+
bold: {
|
|
243
|
+
isActive: boolean;
|
|
244
|
+
isConflicting: boolean;
|
|
245
|
+
isBlocking: boolean;
|
|
246
|
+
};
|
|
247
|
+
italic: {
|
|
248
|
+
isActive: boolean;
|
|
249
|
+
isConflicting: boolean;
|
|
250
|
+
isBlocking: boolean;
|
|
251
|
+
};
|
|
252
|
+
underline: {
|
|
253
|
+
isActive: boolean;
|
|
254
|
+
isConflicting: boolean;
|
|
255
|
+
isBlocking: boolean;
|
|
256
|
+
};
|
|
257
|
+
strikeThrough: {
|
|
258
|
+
isActive: boolean;
|
|
259
|
+
isConflicting: boolean;
|
|
260
|
+
isBlocking: boolean;
|
|
261
|
+
};
|
|
262
|
+
inlineCode: {
|
|
263
|
+
isActive: boolean;
|
|
264
|
+
isConflicting: boolean;
|
|
265
|
+
isBlocking: boolean;
|
|
266
|
+
};
|
|
267
|
+
h1: {
|
|
268
|
+
isActive: boolean;
|
|
269
|
+
isConflicting: boolean;
|
|
270
|
+
isBlocking: boolean;
|
|
271
|
+
};
|
|
272
|
+
h2: {
|
|
273
|
+
isActive: boolean;
|
|
274
|
+
isConflicting: boolean;
|
|
275
|
+
isBlocking: boolean;
|
|
276
|
+
};
|
|
277
|
+
h3: {
|
|
278
|
+
isActive: boolean;
|
|
279
|
+
isConflicting: boolean;
|
|
280
|
+
isBlocking: boolean;
|
|
281
|
+
};
|
|
282
|
+
h4: {
|
|
283
|
+
isActive: boolean;
|
|
284
|
+
isConflicting: boolean;
|
|
285
|
+
isBlocking: boolean;
|
|
286
|
+
};
|
|
287
|
+
h5: {
|
|
288
|
+
isActive: boolean;
|
|
289
|
+
isConflicting: boolean;
|
|
290
|
+
isBlocking: boolean;
|
|
291
|
+
};
|
|
292
|
+
h6: {
|
|
293
|
+
isActive: boolean;
|
|
294
|
+
isConflicting: boolean;
|
|
295
|
+
isBlocking: boolean;
|
|
296
|
+
};
|
|
297
|
+
codeBlock: {
|
|
298
|
+
isActive: boolean;
|
|
299
|
+
isConflicting: boolean;
|
|
300
|
+
isBlocking: boolean;
|
|
301
|
+
};
|
|
302
|
+
blockQuote: {
|
|
303
|
+
isActive: boolean;
|
|
304
|
+
isConflicting: boolean;
|
|
305
|
+
isBlocking: boolean;
|
|
306
|
+
};
|
|
307
|
+
orderedList: {
|
|
308
|
+
isActive: boolean;
|
|
309
|
+
isConflicting: boolean;
|
|
310
|
+
isBlocking: boolean;
|
|
311
|
+
};
|
|
312
|
+
unorderedList: {
|
|
313
|
+
isActive: boolean;
|
|
314
|
+
isConflicting: boolean;
|
|
315
|
+
isBlocking: boolean;
|
|
316
|
+
};
|
|
317
|
+
link: {
|
|
318
|
+
isActive: boolean;
|
|
319
|
+
isConflicting: boolean;
|
|
320
|
+
isBlocking: boolean;
|
|
321
|
+
};
|
|
322
|
+
image: {
|
|
323
|
+
isActive: boolean;
|
|
324
|
+
isConflicting: boolean;
|
|
325
|
+
isBlocking: boolean;
|
|
326
|
+
};
|
|
327
|
+
mention: {
|
|
328
|
+
isActive: boolean;
|
|
329
|
+
isConflicting: boolean;
|
|
330
|
+
isBlocking: boolean;
|
|
331
|
+
};
|
|
332
|
+
checkboxList: {
|
|
333
|
+
isActive: boolean;
|
|
334
|
+
isConflicting: boolean;
|
|
335
|
+
isBlocking: boolean;
|
|
336
|
+
};
|
|
337
|
+
alignment: string;
|
|
338
|
+
}
|
|
339
|
+
export interface OnLinkDetected {
|
|
340
|
+
text: string;
|
|
341
|
+
url: string;
|
|
342
|
+
start: number;
|
|
343
|
+
end: number;
|
|
344
|
+
}
|
|
345
|
+
export interface OnMentionDetected {
|
|
346
|
+
text: string;
|
|
347
|
+
indicator: string;
|
|
348
|
+
attributes: Record<string, string>;
|
|
349
|
+
}
|
|
350
|
+
export interface OnChangeSelectionEvent {
|
|
351
|
+
start: number;
|
|
352
|
+
end: number;
|
|
353
|
+
text: string;
|
|
354
|
+
}
|
|
355
|
+
export interface OnKeyPressEvent {
|
|
356
|
+
key: string;
|
|
357
|
+
}
|
|
358
|
+
export interface OnPasteImagesEvent {
|
|
359
|
+
images: {
|
|
360
|
+
uri: string;
|
|
361
|
+
type: string;
|
|
362
|
+
width: number;
|
|
363
|
+
height: number;
|
|
364
|
+
}[];
|
|
365
|
+
}
|
|
366
|
+
export interface OnSubmitEditing {
|
|
367
|
+
text: string;
|
|
368
|
+
}
|
|
369
|
+
export type FocusEvent = NativeSyntheticEvent<TargetedEvent>;
|
|
370
|
+
export type BlurEvent = NativeSyntheticEvent<TargetedEvent>;
|
|
371
|
+
/**
|
|
372
|
+
* Imperative handle exposed via `ref` on `<EnrichedTextInput />`.
|
|
373
|
+
*
|
|
374
|
+
* Obtain a reference with `useRef<EnrichedTextInputInstance>(null)` and pass it
|
|
375
|
+
* to the component's `ref` prop. All methods are safe to call after the
|
|
376
|
+
* component has mounted.
|
|
377
|
+
*/
|
|
378
|
+
export interface EnrichedTextInputInstance extends NativeMethods {
|
|
379
|
+
/** Focuses the editor, opening the software keyboard on mobile. */
|
|
380
|
+
focus: () => void;
|
|
381
|
+
/** Removes focus from the editor and dismisses the software keyboard. */
|
|
382
|
+
blur: () => void;
|
|
383
|
+
/** Replaces the entire editor content with the supplied HTML/plain-text `value`. */
|
|
384
|
+
setValue: (value: string) => void;
|
|
385
|
+
/** Moves the text cursor (or extends the selection) to the range `[start, end)`. */
|
|
386
|
+
setSelection: (start: number, end: number) => void;
|
|
387
|
+
/**
|
|
388
|
+
* Returns the current editor content as an HTML string.
|
|
389
|
+
* The promise resolves once the native layer has completed HTML parsing.
|
|
390
|
+
*/
|
|
391
|
+
getHTML: () => Promise<string>;
|
|
392
|
+
/** Toggles bold on the current selection (or toggles it for future typing if nothing is selected). */
|
|
393
|
+
toggleBold: () => void;
|
|
394
|
+
/** Toggles italic on the current selection (or toggles it for future typing if nothing is selected). */
|
|
395
|
+
toggleItalic: () => void;
|
|
396
|
+
/** Toggles underline on the current selection (or toggles it for future typing if nothing is selected). */
|
|
397
|
+
toggleUnderline: () => void;
|
|
398
|
+
/** Toggles strikethrough on the current selection (or toggles it for future typing if nothing is selected). */
|
|
399
|
+
toggleStrikeThrough: () => void;
|
|
400
|
+
/** Toggles inline code on the current selection (or toggles it for future typing if nothing is selected). */
|
|
401
|
+
toggleInlineCode: () => void;
|
|
402
|
+
/** Toggles an H1 heading for the paragraph(s) at the current selection. */
|
|
403
|
+
toggleH1: () => void;
|
|
404
|
+
/** Toggles an H2 heading for the paragraph(s) at the current selection. */
|
|
405
|
+
toggleH2: () => void;
|
|
406
|
+
/** Toggles an H3 heading for the paragraph(s) at the current selection. */
|
|
407
|
+
toggleH3: () => void;
|
|
408
|
+
/** Toggles an H4 heading for the paragraph(s) at the current selection. */
|
|
409
|
+
toggleH4: () => void;
|
|
410
|
+
/** Toggles an H5 heading for the paragraph(s) at the current selection. */
|
|
411
|
+
toggleH5: () => void;
|
|
412
|
+
/** Toggles an H6 heading for the paragraph(s) at the current selection. */
|
|
413
|
+
toggleH6: () => void;
|
|
414
|
+
/** Toggles a code block for the paragraph(s) at the current selection. */
|
|
415
|
+
toggleCodeBlock: () => void;
|
|
416
|
+
/** Toggles a block-quote for the paragraph(s) at the current selection. */
|
|
417
|
+
toggleBlockQuote: () => void;
|
|
418
|
+
/**
|
|
419
|
+
* Toggles an ordered (numbered) list on the current selection or the
|
|
420
|
+
* focused paragraph.
|
|
421
|
+
*/
|
|
422
|
+
toggleOrderedList: () => void;
|
|
423
|
+
/**
|
|
424
|
+
* Toggles an unordered (bullet) list on the current selection or the
|
|
425
|
+
* focused paragraph.
|
|
426
|
+
*/
|
|
427
|
+
toggleUnorderedList: () => void;
|
|
428
|
+
/**
|
|
429
|
+
* Toggles a checkbox (task) list on the current selection or the focused
|
|
430
|
+
* paragraph. Pass `checked` as `true` to pre-check the inserted items.
|
|
431
|
+
*/
|
|
432
|
+
toggleCheckboxList: (checked: boolean) => void;
|
|
433
|
+
/**
|
|
434
|
+
* Inserts or updates a hyperlink over the character range `[start, end)`.
|
|
435
|
+
*
|
|
436
|
+
* @param start - Start offset of the linked text (inclusive).
|
|
437
|
+
* @param end - End offset of the linked text (exclusive).
|
|
438
|
+
* @param text - Display text for the link.
|
|
439
|
+
* @param url - URL the link should navigate to.
|
|
440
|
+
*/
|
|
441
|
+
setLink: (start: number, end: number, text: string, url: string) => void;
|
|
442
|
+
/**
|
|
443
|
+
* Removes any hyperlink from the `[start, end)` range while
|
|
444
|
+
* preserving the underlying text.
|
|
445
|
+
*
|
|
446
|
+
* @param start - Start offset (inclusive).
|
|
447
|
+
* @param end - End offset (exclusive).
|
|
448
|
+
*/
|
|
449
|
+
removeLink: (start: number, end: number) => void;
|
|
450
|
+
/**
|
|
451
|
+
* Inserts an image at the current cursor position.
|
|
452
|
+
*
|
|
453
|
+
* @param src - URI of the image (remote URL or local asset path).
|
|
454
|
+
* @param width - Width of the image.
|
|
455
|
+
* @param height - Height of the image.
|
|
456
|
+
*/
|
|
457
|
+
setImage: (src: string, width: number, height: number) => void;
|
|
458
|
+
/**
|
|
459
|
+
* Opens a mention flow by inserting the given `indicator` character (e.g.
|
|
460
|
+
* `"@"` or `"#"`) at the current cursor position and firing
|
|
461
|
+
* `onStartMention`.
|
|
462
|
+
*/
|
|
463
|
+
startMention: (indicator: string) => void;
|
|
464
|
+
/**
|
|
465
|
+
* Finalizes an in-progress mention by replacing the typed text with a
|
|
466
|
+
* specified mention value.
|
|
467
|
+
*
|
|
468
|
+
* @param indicator - The trigger character (e.g. `"@"`).
|
|
469
|
+
* @param text - Display text for the mention (e.g. the user's name).
|
|
470
|
+
* @param attributes - Optional key/value pairs attached to the mention tag (e.g. `{ id: "42" }`).
|
|
471
|
+
*/
|
|
472
|
+
setMention: (indicator: string, text: string, attributes?: Record<string, string>) => void;
|
|
473
|
+
/**
|
|
474
|
+
* Sets the horizontal text alignment for the paragraph(s) at the current
|
|
475
|
+
* selection.
|
|
476
|
+
*
|
|
477
|
+
* @param alignment - One of `"left"`, `"center"`, `"right"`, `"justify"`, or `"auto"`.
|
|
478
|
+
*/
|
|
479
|
+
setTextAlignment: (alignment: 'left' | 'center' | 'right' | 'justify' | 'auto') => void;
|
|
480
|
+
}
|
|
481
|
+
export interface ContextMenuItem {
|
|
482
|
+
text: string;
|
|
483
|
+
onPress: ({ text, selection, styleState, }: {
|
|
484
|
+
text: string;
|
|
485
|
+
selection: {
|
|
486
|
+
start: number;
|
|
487
|
+
end: number;
|
|
488
|
+
};
|
|
489
|
+
styleState: OnChangeStateEvent;
|
|
490
|
+
}) => void;
|
|
491
|
+
visible?: boolean;
|
|
492
|
+
}
|
|
493
|
+
export interface OnChangeMentionEvent {
|
|
494
|
+
indicator: string;
|
|
495
|
+
text: string;
|
|
496
|
+
}
|
|
497
|
+
/**
|
|
498
|
+
* Props for the `<EnrichedTextInput />` rich-text editor component.
|
|
499
|
+
*/
|
|
500
|
+
export interface EnrichedTextInputProps extends Omit<ViewProps, 'children'> {
|
|
501
|
+
/**
|
|
502
|
+
* Ref to the imperative handle that exposes editor commands.
|
|
503
|
+
* Create with `useRef<EnrichedTextInputInstance>(null)`.
|
|
504
|
+
*/
|
|
505
|
+
ref?: RefObject<EnrichedTextInputInstance | null>;
|
|
506
|
+
/** If `true`, the editor is focused automatically when it mounts. */
|
|
507
|
+
autoFocus?: boolean;
|
|
508
|
+
/**
|
|
509
|
+
* If `false`, the editor becomes read-only and the keyboard will not appear.
|
|
510
|
+
* Defaults to `true`.
|
|
511
|
+
*/
|
|
512
|
+
editable?: boolean;
|
|
513
|
+
/**
|
|
514
|
+
* List of single-character strings that trigger the mention flow (e.g.
|
|
515
|
+
* `["@", "#"]`). When the user types one of these characters the
|
|
516
|
+
* `onStartMention` callback is fired.
|
|
517
|
+
*/
|
|
518
|
+
mentionIndicators?: string[];
|
|
519
|
+
/**
|
|
520
|
+
* Initial content rendered when the component mounts.
|
|
521
|
+
* Use `ref.setValue()` to update the content imperatively.
|
|
522
|
+
*/
|
|
523
|
+
defaultValue?: string;
|
|
524
|
+
/** Placeholder text shown when the editor is empty. */
|
|
525
|
+
placeholder?: string;
|
|
526
|
+
/** Color of the placeholder text. */
|
|
527
|
+
placeholderTextColor?: ColorValue;
|
|
528
|
+
/** Color of the cursor. */
|
|
529
|
+
cursorColor?: ColorValue;
|
|
530
|
+
/** Highlight color for selected text. */
|
|
531
|
+
selectionColor?: ColorValue;
|
|
532
|
+
/** Controls automatic capitalization of typed text. Defaults to `"sentences"`. */
|
|
533
|
+
autoCapitalize?: 'none' | 'sentences' | 'words' | 'characters';
|
|
534
|
+
/** Style overrides applied to the rendered HTML content inside the editor. */
|
|
535
|
+
htmlStyle?: HtmlStyle;
|
|
536
|
+
/** Style applied to the outer container view of the editor. */
|
|
537
|
+
style?: EnrichedInputStyle;
|
|
538
|
+
/**
|
|
539
|
+
* If `false`, the editor's internal scroll view is disabled and the component
|
|
540
|
+
* expands to fit all content. Defaults to `true`.
|
|
541
|
+
*/
|
|
542
|
+
scrollEnabled?: boolean;
|
|
543
|
+
/**
|
|
544
|
+
* Regular expression used to auto-detect links as the user types. Set to
|
|
545
|
+
* `null` to disable automatic link detection. Defaults to a built-in URL
|
|
546
|
+
* pattern.
|
|
547
|
+
*/
|
|
548
|
+
linkRegex?: RegExp | null;
|
|
549
|
+
/** The label shown on the return key of the software keyboard. */
|
|
550
|
+
returnKeyType?: ReturnKeyTypeOptions;
|
|
551
|
+
/** Custom text label for the return key (Android only). */
|
|
552
|
+
returnKeyLabel?: string;
|
|
553
|
+
/**
|
|
554
|
+
* Controls what happens when the user presses the return key.
|
|
555
|
+
* - `"submit"` — fires `onSubmitEditing` without inserting a newline.
|
|
556
|
+
* - `"blurAndSubmit"` — blurs the editor and fires `onSubmitEditing`.
|
|
557
|
+
* - `"newline"` — inserts a newline (default).
|
|
558
|
+
*/
|
|
559
|
+
submitBehavior?: 'submit' | 'blurAndSubmit' | 'newline';
|
|
560
|
+
/** Called when the editor receives focus. */
|
|
561
|
+
onFocus?: (e: FocusEvent) => void;
|
|
562
|
+
/** Called when the editor loses focus. */
|
|
563
|
+
onBlur?: (e: BlurEvent) => void;
|
|
564
|
+
/** Called whenever the plain-text content of the editor changes. */
|
|
565
|
+
onChangeText?: (e: NativeSyntheticEvent<OnChangeTextEvent>) => void;
|
|
566
|
+
/**
|
|
567
|
+
* Called whenever the HTML representation of the editor content changes.
|
|
568
|
+
*
|
|
569
|
+
* Note: parsing HTML on every keystroke is expensive and may cause
|
|
570
|
+
* performance issues. Consider calling `ref.getHTML()` on demand (e.g. on
|
|
571
|
+
* submit) instead.
|
|
572
|
+
*/
|
|
573
|
+
onChangeHtml?: (e: NativeSyntheticEvent<OnChangeHtmlEvent>) => void;
|
|
574
|
+
/**
|
|
575
|
+
* Called whenever the active formatting state changes (e.g. the cursor
|
|
576
|
+
* moves into a bold region). Use this to update toolbar toggle states.
|
|
577
|
+
*/
|
|
578
|
+
onChangeState?: (e: NativeSyntheticEvent<OnChangeStateEvent>) => void;
|
|
579
|
+
/** Called when the editor auto-detects a URL matching `linkRegex`. */
|
|
580
|
+
onLinkDetected?: (e: OnLinkDetected) => void;
|
|
581
|
+
/** Called when the editor resolves a mention node. */
|
|
582
|
+
onMentionDetected?: (e: OnMentionDetected) => void;
|
|
583
|
+
/**
|
|
584
|
+
* Called when a mention trigger character is typed. Use this to show a
|
|
585
|
+
* mention picker UI. `indicator` is the trigger character (e.g. `"@"`).
|
|
586
|
+
*/
|
|
587
|
+
onStartMention?: (indicator: string) => void;
|
|
588
|
+
/**
|
|
589
|
+
* Called as the user continues typing after the mention trigger. Use the
|
|
590
|
+
* `text` field to filter the mention picker list.
|
|
591
|
+
*/
|
|
592
|
+
onChangeMention?: (e: OnChangeMentionEvent) => void;
|
|
593
|
+
/**
|
|
594
|
+
* Called when the mention flow ends (e.g. the user presses Escape or the
|
|
595
|
+
* cursor leaves the mention token). `indicator` is the trigger character.
|
|
596
|
+
*/
|
|
597
|
+
onEndMention?: (indicator: string) => void;
|
|
598
|
+
/** Called when the text selection range changes. */
|
|
599
|
+
onChangeSelection?: (e: NativeSyntheticEvent<OnChangeSelectionEvent>) => void;
|
|
600
|
+
/** Called when a key is pressed while the editor is focused. */
|
|
601
|
+
onKeyPress?: (e: NativeSyntheticEvent<OnKeyPressEvent>) => void;
|
|
602
|
+
/** Called when the user presses the return key and `submitBehavior` triggers a submit. */
|
|
603
|
+
onSubmitEditing?: (e: NativeSyntheticEvent<OnSubmitEditing>) => void;
|
|
604
|
+
/** Called when the user pastes one or more images into the editor.
|
|
605
|
+
* Web: each `images[].uri` is a `blob:` URL from `URL.createObjectURL`. If you keep
|
|
606
|
+
* URIs around (or replace them after upload), call `URL.revokeObjectURL(uri)` when done
|
|
607
|
+
* to avoid retaining blob memory. Native uses non-blob URIs; revoke does not apply.
|
|
608
|
+
*/
|
|
609
|
+
onPasteImages?: (e: NativeSyntheticEvent<OnPasteImagesEvent>) => void;
|
|
610
|
+
/**
|
|
611
|
+
* Additional items to inject into the native text-selection context menu
|
|
612
|
+
* (the popover that appears when the user long-presses selected text).
|
|
613
|
+
*/
|
|
614
|
+
contextMenuItems?: ContextMenuItem[];
|
|
615
|
+
/**
|
|
616
|
+
* List of text shortcuts that automatically apply a formatting style when
|
|
617
|
+
* the user types the trigger sequence.
|
|
618
|
+
*
|
|
619
|
+
* Defaults to `[{ trigger: '- ', style: 'unordered_list' }, { trigger: '1. ', style: 'ordered_list' }]`.
|
|
620
|
+
* Pass an empty array to disable all shortcuts.
|
|
621
|
+
*/
|
|
622
|
+
textShortcuts?: TextShortcut[];
|
|
623
|
+
/**
|
|
624
|
+
* If true, Android will use experimental synchronous events.
|
|
625
|
+
* This will prevent from input flickering when updating component size.
|
|
626
|
+
* However, this is an experimental feature, which has not been thoroughly tested.
|
|
627
|
+
* We may decide to enable it by default in a future release.
|
|
628
|
+
* Disabled by default.
|
|
629
|
+
*/
|
|
630
|
+
androidExperimentalSynchronousEvents?: boolean;
|
|
631
|
+
/**
|
|
632
|
+
* If true, external HTML (e.g. from Google Docs, Word, web pages) will be
|
|
633
|
+
* normalized through the HTML normalizer before being applied.
|
|
634
|
+
* This converts arbitrary HTML into the canonical tag subset that the enriched
|
|
635
|
+
* parser understands.
|
|
636
|
+
* Disabled by default.
|
|
637
|
+
*/
|
|
638
|
+
useHtmlNormalizer?: boolean;
|
|
639
|
+
/**
|
|
640
|
+
* If true, fonts will scale to respect the system's accessibility text size.
|
|
641
|
+
* Enabled by default.
|
|
642
|
+
*/
|
|
643
|
+
allowFontScaling?: boolean;
|
|
644
|
+
}
|
|
645
|
+
/**
|
|
646
|
+
* Imperative handle exposed via `ref` on `<EnrichedText />`.
|
|
647
|
+
*
|
|
648
|
+
* Inherits the full React Native `NativeMethods` surface (`measure`,
|
|
649
|
+
* `measureInWindow`, `measureLayout`, `setNativeProps`, `focus`, `blur`).
|
|
650
|
+
* Obtain a reference with `useRef<EnrichedTextInstance>(null)`.
|
|
651
|
+
*/
|
|
652
|
+
export interface EnrichedTextInstance extends NativeMethods {
|
|
653
|
+
}
|
|
654
|
+
/**
|
|
655
|
+
* Props for the `<EnrichedText />` read-only rich-text rendering component.
|
|
656
|
+
*/
|
|
657
|
+
export interface EnrichedTextProps extends ViewProps {
|
|
658
|
+
/**
|
|
659
|
+
* Ref to the imperative handle that exposes native measurement and focus
|
|
660
|
+
* methods inherited from `NativeMethods`.
|
|
661
|
+
* Create with `useRef<EnrichedTextInstance>(null)`.
|
|
662
|
+
*/
|
|
663
|
+
ref?: RefObject<EnrichedTextInstance | null>;
|
|
664
|
+
/** HTML/plain-text string to render as rich text. */
|
|
665
|
+
children: string;
|
|
666
|
+
/** Style applied to the container view. */
|
|
667
|
+
style?: TextStyle;
|
|
668
|
+
/** Style overrides applied to the rendered HTML content. */
|
|
669
|
+
htmlStyle?: EnrichedTextHtmlStyle;
|
|
670
|
+
/**
|
|
671
|
+
* If true, external HTML will be normalized through the HTML normalizer
|
|
672
|
+
* before being rendered. Disabled by default.
|
|
673
|
+
*/
|
|
674
|
+
useHtmlNormalizer?: boolean;
|
|
675
|
+
/**
|
|
676
|
+
* How to truncate text when it overflows `numberOfLines`.
|
|
677
|
+
* - `"head"` — truncates the beginning.
|
|
678
|
+
* - `"middle"` — truncates the middle.
|
|
679
|
+
* - `"tail"` — truncates the end (default).
|
|
680
|
+
* - `"clip"` — clips at the boundary without an ellipsis.
|
|
681
|
+
*/
|
|
682
|
+
ellipsizeMode?: 'head' | 'middle' | 'tail' | 'clip';
|
|
683
|
+
/**
|
|
684
|
+
* Maximum number of lines to display. Text that exceeds this limit is
|
|
685
|
+
* truncated according to `ellipsizeMode`.
|
|
686
|
+
*/
|
|
687
|
+
numberOfLines?: number;
|
|
688
|
+
/** If `true`, the rendered text can be selected and copied by the user. */
|
|
689
|
+
selectable?: boolean;
|
|
690
|
+
/** Highlight color for selected text. */
|
|
691
|
+
selectionColor?: ColorValue;
|
|
692
|
+
/**
|
|
693
|
+
* If true, fonts will scale to respect the system's accessibility text size.
|
|
694
|
+
* Enabled by default.
|
|
695
|
+
*/
|
|
696
|
+
allowFontScaling?: boolean;
|
|
697
|
+
/** Called when the user taps a hyperlink inside the rendered content. */
|
|
698
|
+
onLinkPress?: (event: OnLinkPressEvent) => void;
|
|
699
|
+
/** Called when the user taps a mention node inside the rendered content. */
|
|
700
|
+
onMentionPress?: (event: OnMentionPressEvent) => void;
|
|
701
|
+
}
|
|
702
|
+
interface EnrichedTextMentionStyleProperties extends MentionStyleProperties {
|
|
703
|
+
pressColor?: ColorValue;
|
|
704
|
+
pressBackgroundColor?: ColorValue;
|
|
705
|
+
}
|
|
706
|
+
export interface EnrichedTextHtmlStyle extends Omit<HtmlStyle, 'a' | 'mention'> {
|
|
707
|
+
a?: HtmlStyle['a'] & {
|
|
708
|
+
pressColor?: ColorValue;
|
|
709
|
+
};
|
|
710
|
+
mention?: Record<string, EnrichedTextMentionStyleProperties> | EnrichedTextMentionStyleProperties;
|
|
711
|
+
}
|
|
712
|
+
export interface OnLinkPressEvent {
|
|
713
|
+
url: string;
|
|
714
|
+
}
|
|
715
|
+
export interface OnMentionPressEvent {
|
|
716
|
+
text: string;
|
|
717
|
+
indicator: string;
|
|
718
|
+
attributes: Record<string, string>;
|
|
719
|
+
}
|
|
720
|
+
export {};
|
|
721
|
+
//# sourceMappingURL=types.d.ts.map
|