react-native-enriched 0.2.1 → 0.4.0
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/README.md +21 -16
- package/android/build.gradle +77 -72
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedTextInputViewManagerDelegate.java +21 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedTextInputViewManagerInterface.java +7 -0
- package/android/generated/jni/react/renderer/components/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/ComponentDescriptors.cpp +1 -1
- package/android/generated/jni/react/renderer/components/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/ComponentDescriptors.h +1 -1
- package/android/generated/jni/react/renderer/components/ReactNativeEnrichedSpec/EventEmitters.cpp +276 -0
- package/android/generated/jni/react/renderer/components/ReactNativeEnrichedSpec/EventEmitters.h +239 -0
- package/android/generated/jni/react/renderer/components/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/Props.cpp +10 -0
- package/android/generated/jni/react/renderer/components/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/Props.h +251 -0
- package/android/gradle.properties +5 -5
- package/android/lint.gradle +70 -0
- package/android/src/main/java/com/swmansion/enriched/{EnrichedTextInputViewPackage.kt → ReactNativeEnrichedPackage.kt} +4 -5
- package/android/src/main/java/com/swmansion/enriched/{utils → common}/AsyncDrawable.kt +50 -15
- package/android/src/main/java/com/swmansion/enriched/common/CheckboxDrawable.kt +81 -0
- package/android/src/main/java/com/swmansion/enriched/common/EnrichedConstants.kt +11 -0
- package/android/src/main/java/com/swmansion/enriched/common/EnrichedStyle.kt +57 -0
- package/android/src/main/java/com/swmansion/enriched/{spans/utils → common}/ForceRedrawSpan.kt +3 -2
- package/android/src/main/java/com/swmansion/enriched/common/MentionStyle.kt +7 -0
- package/android/src/main/java/com/swmansion/enriched/{utils → common}/ResourceManager.kt +1 -1
- package/android/src/main/java/com/swmansion/enriched/{utils → common/parser}/EnrichedParser.java +228 -160
- package/android/src/main/java/com/swmansion/enriched/common/parser/EnrichedSpanFactory.kt +79 -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 +91 -0
- package/android/src/main/java/com/swmansion/enriched/{spans → common/spans}/EnrichedCodeBlockSpan.kt +12 -14
- 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/{spans → common/spans}/EnrichedImageSpan.kt +68 -51
- 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 +26 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedMentionSpan.kt +35 -0
- package/android/src/main/java/com/swmansion/enriched/{spans → common/spans}/EnrichedOrderedListSpan.kt +21 -29
- 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/{spans → common/spans}/EnrichedUnorderedListSpan.kt +13 -17
- 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/{spans → common/spans}/interfaces/EnrichedZeroWidthSpaceSpan.kt +2 -3
- package/android/src/main/java/com/swmansion/enriched/textinput/EnrichedTextInputConnectionWrapper.kt +140 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/EnrichedTextInputSpannableFactory.kt +83 -0
- package/android/src/main/java/com/swmansion/enriched/{EnrichedTextInputView.kt → textinput/EnrichedTextInputView.kt} +322 -157
- package/android/src/main/java/com/swmansion/enriched/{EnrichedTextInputViewLayoutManager.kt → textinput/EnrichedTextInputViewLayoutManager.kt} +4 -2
- package/android/src/main/java/com/swmansion/enriched/{EnrichedTextInputViewManager.kt → textinput/EnrichedTextInputViewManager.kt} +182 -66
- package/android/src/main/java/com/swmansion/enriched/{MeasurementStore.kt → textinput/MeasurementStore.kt} +75 -25
- package/android/src/main/java/com/swmansion/enriched/{events → textinput/events}/MentionHandler.kt +22 -12
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnChangeHtmlEvent.kt +27 -0
- package/android/src/main/java/com/swmansion/enriched/{events → textinput/events}/OnChangeSelectionEvent.kt +11 -10
- 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/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/{events → textinput/events}/OnMentionDetectedEvent.kt +11 -10
- package/android/src/main/java/com/swmansion/enriched/{events → textinput/events}/OnMentionEvent.kt +10 -9
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnPasteImagesEvent.kt +47 -0
- package/android/src/main/java/com/swmansion/enriched/{events → textinput/events}/OnRequestHtmlResultEvent.kt +2 -3
- 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 +15 -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/EnrichedSpans.kt +241 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/interfaces/EnrichedInputSpan.kt +10 -0
- package/android/src/main/java/com/swmansion/enriched/{styles → textinput/styles}/HtmlStyle.kt +129 -57
- package/android/src/main/java/com/swmansion/enriched/{styles → textinput/styles}/InlineStyles.kt +30 -13
- package/android/src/main/java/com/swmansion/enriched/textinput/styles/ListStyles.kt +263 -0
- package/android/src/main/java/com/swmansion/enriched/{styles → textinput/styles}/ParagraphStyles.kt +94 -34
- package/android/src/main/java/com/swmansion/enriched/{styles → textinput/styles}/ParametrizedStyles.kt +143 -67
- package/android/src/main/java/com/swmansion/enriched/textinput/utils/EnrichedEditableFactory.kt +17 -0
- package/android/src/main/java/com/swmansion/enriched/{utils → textinput/utils}/EnrichedSelection.kt +84 -54
- package/android/src/main/java/com/swmansion/enriched/textinput/utils/EnrichedSpanState.kt +304 -0
- package/android/src/main/java/com/swmansion/enriched/{utils/Utils.kt → textinput/utils/EnrichedSpannable.kt} +22 -31
- package/android/src/main/java/com/swmansion/enriched/textinput/utils/EnrichedSpannableStringBuilder.kt +16 -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/Utils.kt +106 -0
- package/android/src/main/java/com/swmansion/enriched/{watchers → textinput/watchers}/EnrichedSpanWatcher.kt +56 -24
- package/android/src/main/java/com/swmansion/enriched/{watchers → textinput/watchers}/EnrichedTextWatcher.kt +37 -14
- package/android/src/main/new_arch/CMakeLists.txt +7 -1
- package/android/src/main/new_arch/ReactNativeEnrichedSpec.cpp +11 -0
- package/android/src/main/new_arch/ReactNativeEnrichedSpec.h +15 -0
- package/android/src/main/new_arch/react/renderer/components/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/EnrichedTextInputMeasurementManager.h +1 -1
- package/android/src/main/new_arch/react/renderer/components/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/EnrichedTextInputShadowNode.h +2 -2
- package/android/src/main/new_arch/react/renderer/components/ReactNativeEnrichedSpec/conversions.h +46 -0
- package/ios/EnrichedTextInputView.h +2 -1
- package/ios/EnrichedTextInputView.mm +603 -60
- package/ios/config/InputConfig.h +28 -0
- package/ios/config/InputConfig.mm +237 -8
- package/ios/extensions/ImageExtension.h +35 -0
- package/ios/extensions/ImageExtension.mm +156 -0
- package/ios/{utils → extensions}/LayoutManagerExtension.mm +115 -95
- package/ios/generated/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/ComponentDescriptors.cpp +1 -1
- package/ios/generated/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/ComponentDescriptors.h +1 -1
- package/ios/generated/ReactNativeEnrichedSpec/EventEmitters.cpp +276 -0
- package/ios/generated/ReactNativeEnrichedSpec/EventEmitters.h +239 -0
- package/ios/generated/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/Props.cpp +10 -0
- package/ios/generated/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/Props.h +251 -0
- package/ios/generated/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/RCTComponentViewHelpers.h +95 -0
- package/ios/inputParser/InputParser.mm +218 -18
- package/ios/inputTextView/InputTextView.mm +118 -0
- package/ios/{attachments → interfaces}/ImageAttachment.h +1 -0
- package/ios/interfaces/ImageAttachment.mm +46 -0
- package/ios/interfaces/LinkRegexConfig.h +19 -0
- package/ios/interfaces/LinkRegexConfig.mm +37 -0
- package/ios/{utils → interfaces}/MentionStyleProps.mm +2 -2
- package/ios/{utils → interfaces}/StyleHeaders.h +22 -1
- package/ios/{utils → interfaces}/StyleTypeEnum.h +4 -0
- package/ios/internals/EnrichedTextInputViewState.cpp +6 -6
- package/ios/styles/BlockQuoteStyle.mm +5 -5
- package/ios/styles/BoldStyle.mm +21 -6
- package/ios/styles/CheckboxListStyle.mm +321 -0
- package/ios/styles/CodeBlockStyle.mm +5 -5
- package/ios/styles/H1Style.mm +3 -0
- package/ios/styles/H2Style.mm +3 -0
- package/ios/styles/H3Style.mm +3 -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 +161 -72
- package/ios/styles/ImageStyle.mm +5 -5
- package/ios/styles/InlineCodeStyle.mm +30 -19
- package/ios/styles/ItalicStyle.mm +5 -5
- package/ios/styles/LinkStyle.mm +98 -40
- package/ios/styles/MentionStyle.mm +4 -4
- package/ios/styles/OrderedListStyle.mm +5 -5
- package/ios/styles/StrikethroughStyle.mm +5 -5
- package/ios/styles/UnderlineStyle.mm +5 -5
- package/ios/styles/UnorderedListStyle.mm +5 -5
- package/ios/utils/CheckboxHitTestUtils.h +10 -0
- package/ios/utils/CheckboxHitTestUtils.mm +123 -0
- package/ios/utils/ParagraphAttributesUtils.h +4 -0
- package/ios/utils/ParagraphAttributesUtils.mm +142 -45
- package/ios/utils/ParagraphsUtils.mm +4 -4
- package/ios/utils/TextBlockTapGestureRecognizer.h +17 -0
- package/ios/utils/TextBlockTapGestureRecognizer.mm +56 -0
- package/ios/utils/ZeroWidthSpaceUtils.mm +14 -3
- package/lib/module/EnrichedTextInput.js +57 -11
- package/lib/module/EnrichedTextInput.js.map +1 -1
- package/lib/module/{EnrichedTextInputNativeComponent.ts → spec/EnrichedTextInputNativeComponent.ts} +175 -18
- package/lib/module/types.js +4 -0
- package/lib/module/types.js.map +1 -0
- package/lib/module/{normalizeHtmlStyle.js → utils/normalizeHtmlStyle.js} +18 -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/typescript/src/EnrichedTextInput.d.ts +20 -51
- package/lib/typescript/src/EnrichedTextInput.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +2 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/{EnrichedTextInputNativeComponent.d.ts → spec/EnrichedTextInputNativeComponent.d.ts} +154 -18
- package/lib/typescript/src/spec/EnrichedTextInputNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/types.d.ts +58 -0
- package/lib/typescript/src/types.d.ts.map +1 -0
- package/lib/typescript/src/utils/normalizeHtmlStyle.d.ts +4 -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/package.json +13 -9
- package/src/EnrichedTextInput.tsx +88 -63
- package/src/index.tsx +5 -1
- package/src/{EnrichedTextInputNativeComponent.ts → spec/EnrichedTextInputNativeComponent.ts} +175 -18
- package/src/types.ts +59 -0
- package/src/{normalizeHtmlStyle.ts → utils/normalizeHtmlStyle.ts} +20 -5
- package/src/utils/nullthrows.ts +7 -0
- package/src/utils/regexParser.ts +56 -0
- package/android/generated/jni/react/renderer/components/RNEnrichedTextInputViewSpec/EventEmitters.cpp +0 -128
- package/android/generated/jni/react/renderer/components/RNEnrichedTextInputViewSpec/EventEmitters.h +0 -102
- package/android/src/main/java/com/swmansion/enriched/events/OnChangeHtmlEvent.kt +0 -28
- package/android/src/main/java/com/swmansion/enriched/events/OnChangeStateEvent.kt +0 -24
- package/android/src/main/java/com/swmansion/enriched/events/OnChangeTextEvent.kt +0 -30
- package/android/src/main/java/com/swmansion/enriched/events/OnInputBlurEvent.kt +0 -27
- package/android/src/main/java/com/swmansion/enriched/events/OnInputFocusEvent.kt +0 -27
- package/android/src/main/java/com/swmansion/enriched/events/OnLinkDetectedEvent.kt +0 -30
- package/android/src/main/java/com/swmansion/enriched/spans/EnrichedBlockQuoteSpan.kt +0 -44
- package/android/src/main/java/com/swmansion/enriched/spans/EnrichedBoldSpan.kt +0 -16
- package/android/src/main/java/com/swmansion/enriched/spans/EnrichedH1Span.kt +0 -23
- package/android/src/main/java/com/swmansion/enriched/spans/EnrichedH2Span.kt +0 -23
- package/android/src/main/java/com/swmansion/enriched/spans/EnrichedH3Span.kt +0 -23
- package/android/src/main/java/com/swmansion/enriched/spans/EnrichedInlineCodeSpan.kt +0 -27
- package/android/src/main/java/com/swmansion/enriched/spans/EnrichedItalicSpan.kt +0 -15
- package/android/src/main/java/com/swmansion/enriched/spans/EnrichedLinkSpan.kt +0 -30
- package/android/src/main/java/com/swmansion/enriched/spans/EnrichedMentionSpan.kt +0 -42
- package/android/src/main/java/com/swmansion/enriched/spans/EnrichedSpans.kt +0 -136
- package/android/src/main/java/com/swmansion/enriched/spans/EnrichedStrikeThroughSpan.kt +0 -14
- package/android/src/main/java/com/swmansion/enriched/spans/EnrichedUnderlineSpan.kt +0 -14
- package/android/src/main/java/com/swmansion/enriched/spans/interfaces/EnrichedBlockSpan.kt +0 -4
- package/android/src/main/java/com/swmansion/enriched/spans/interfaces/EnrichedHeadingSpan.kt +0 -4
- package/android/src/main/java/com/swmansion/enriched/spans/interfaces/EnrichedInlineSpan.kt +0 -4
- package/android/src/main/java/com/swmansion/enriched/spans/interfaces/EnrichedParagraphSpan.kt +0 -4
- package/android/src/main/java/com/swmansion/enriched/spans/interfaces/EnrichedSpan.kt +0 -8
- package/android/src/main/java/com/swmansion/enriched/styles/ListStyles.kt +0 -172
- package/android/src/main/java/com/swmansion/enriched/utils/EnrichedSpanState.kt +0 -204
- package/android/src/main/new_arch/RNEnrichedTextInputViewSpec.cpp +0 -22
- package/android/src/main/new_arch/RNEnrichedTextInputViewSpec.h +0 -26
- package/android/src/main/new_arch/react/renderer/components/RNEnrichedTextInputViewSpec/conversions.h +0 -26
- package/ios/attachments/ImageAttachment.mm +0 -34
- package/ios/generated/RNEnrichedTextInputViewSpec/EventEmitters.cpp +0 -128
- package/ios/generated/RNEnrichedTextInputViewSpec/EventEmitters.h +0 -102
- package/lib/module/normalizeHtmlStyle.js.map +0 -1
- package/lib/typescript/src/EnrichedTextInputNativeComponent.d.ts.map +0 -1
- package/lib/typescript/src/normalizeHtmlStyle.d.ts +0 -4
- package/lib/typescript/src/normalizeHtmlStyle.d.ts.map +0 -1
- /package/android/generated/jni/react/renderer/components/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/ShadowNodes.cpp +0 -0
- /package/android/generated/jni/react/renderer/components/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/ShadowNodes.h +0 -0
- /package/android/generated/jni/react/renderer/components/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/States.cpp +0 -0
- /package/android/generated/jni/react/renderer/components/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/States.h +0 -0
- /package/android/src/main/new_arch/react/renderer/components/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/EnrichedTextInputComponentDescriptor.h +0 -0
- /package/android/src/main/new_arch/react/renderer/components/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/EnrichedTextInputMeasurementManager.cpp +0 -0
- /package/android/src/main/new_arch/react/renderer/components/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/EnrichedTextInputShadowNode.cpp +0 -0
- /package/android/src/main/new_arch/react/renderer/components/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/EnrichedTextInputState.cpp +0 -0
- /package/android/src/main/new_arch/react/renderer/components/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/EnrichedTextInputState.h +0 -0
- /package/ios/{utils → extensions}/ColorExtension.h +0 -0
- /package/ios/{utils → extensions}/ColorExtension.mm +0 -0
- /package/ios/{utils → extensions}/FontExtension.h +0 -0
- /package/ios/{utils → extensions}/FontExtension.mm +0 -0
- /package/ios/{utils → extensions}/LayoutManagerExtension.h +0 -0
- /package/ios/{utils → extensions}/StringExtension.h +0 -0
- /package/ios/{utils → extensions}/StringExtension.mm +0 -0
- /package/ios/generated/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/ShadowNodes.cpp +0 -0
- /package/ios/generated/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/ShadowNodes.h +0 -0
- /package/ios/generated/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/States.cpp +0 -0
- /package/ios/generated/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/States.h +0 -0
- /package/ios/{utils → interfaces}/BaseStyleProtocol.h +0 -0
- /package/ios/{utils → interfaces}/ImageData.h +0 -0
- /package/ios/{utils → interfaces}/ImageData.mm +0 -0
- /package/ios/{utils → interfaces}/LinkData.h +0 -0
- /package/ios/{utils → interfaces}/LinkData.mm +0 -0
- /package/ios/{attachments → interfaces}/MediaAttachment.h +0 -0
- /package/ios/{attachments → interfaces}/MediaAttachment.mm +0 -0
- /package/ios/{utils → interfaces}/MentionParams.h +0 -0
- /package/ios/{utils → interfaces}/MentionParams.mm +0 -0
- /package/ios/{utils → interfaces}/MentionStyleProps.h +0 -0
- /package/ios/{utils → interfaces}/StylePair.h +0 -0
- /package/ios/{utils → interfaces}/StylePair.mm +0 -0
- /package/ios/{utils → interfaces}/TextDecorationLineEnum.h +0 -0
- /package/ios/{utils → interfaces}/TextDecorationLineEnum.mm +0 -0
package/android/generated/jni/react/renderer/components/ReactNativeEnrichedSpec/EventEmitters.cpp
ADDED
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateEventEmitterCpp.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#include "EventEmitters.h"
|
|
12
|
+
#include <jsi/JSIDynamic.h>
|
|
13
|
+
|
|
14
|
+
namespace facebook::react {
|
|
15
|
+
|
|
16
|
+
void EnrichedTextInputViewEventEmitter::onInputFocus(OnInputFocus event) const {
|
|
17
|
+
dispatchEvent("inputFocus", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
18
|
+
auto payload = jsi::Object(runtime);
|
|
19
|
+
payload.setProperty(runtime, "target", event.target);
|
|
20
|
+
return payload;
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
void EnrichedTextInputViewEventEmitter::onInputBlur(OnInputBlur event) const {
|
|
26
|
+
dispatchEvent("inputBlur", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
27
|
+
auto payload = jsi::Object(runtime);
|
|
28
|
+
payload.setProperty(runtime, "target", event.target);
|
|
29
|
+
return payload;
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
void EnrichedTextInputViewEventEmitter::onChangeText(OnChangeText event) const {
|
|
35
|
+
dispatchEvent("changeText", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
36
|
+
auto payload = jsi::Object(runtime);
|
|
37
|
+
payload.setProperty(runtime, "value", event.value);
|
|
38
|
+
return payload;
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
void EnrichedTextInputViewEventEmitter::onChangeHtml(OnChangeHtml event) const {
|
|
44
|
+
dispatchEvent("changeHtml", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
45
|
+
auto payload = jsi::Object(runtime);
|
|
46
|
+
payload.setProperty(runtime, "value", event.value);
|
|
47
|
+
return payload;
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
void EnrichedTextInputViewEventEmitter::onChangeState(OnChangeState event) const {
|
|
53
|
+
dispatchEvent("changeState", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
54
|
+
auto payload = jsi::Object(runtime);
|
|
55
|
+
{
|
|
56
|
+
auto bold = jsi::Object(runtime);
|
|
57
|
+
bold.setProperty(runtime, "isActive", event.bold.isActive);
|
|
58
|
+
bold.setProperty(runtime, "isConflicting", event.bold.isConflicting);
|
|
59
|
+
bold.setProperty(runtime, "isBlocking", event.bold.isBlocking);
|
|
60
|
+
payload.setProperty(runtime, "bold", bold);
|
|
61
|
+
}
|
|
62
|
+
{
|
|
63
|
+
auto italic = jsi::Object(runtime);
|
|
64
|
+
italic.setProperty(runtime, "isActive", event.italic.isActive);
|
|
65
|
+
italic.setProperty(runtime, "isConflicting", event.italic.isConflicting);
|
|
66
|
+
italic.setProperty(runtime, "isBlocking", event.italic.isBlocking);
|
|
67
|
+
payload.setProperty(runtime, "italic", italic);
|
|
68
|
+
}
|
|
69
|
+
{
|
|
70
|
+
auto underline = jsi::Object(runtime);
|
|
71
|
+
underline.setProperty(runtime, "isActive", event.underline.isActive);
|
|
72
|
+
underline.setProperty(runtime, "isConflicting", event.underline.isConflicting);
|
|
73
|
+
underline.setProperty(runtime, "isBlocking", event.underline.isBlocking);
|
|
74
|
+
payload.setProperty(runtime, "underline", underline);
|
|
75
|
+
}
|
|
76
|
+
{
|
|
77
|
+
auto strikeThrough = jsi::Object(runtime);
|
|
78
|
+
strikeThrough.setProperty(runtime, "isActive", event.strikeThrough.isActive);
|
|
79
|
+
strikeThrough.setProperty(runtime, "isConflicting", event.strikeThrough.isConflicting);
|
|
80
|
+
strikeThrough.setProperty(runtime, "isBlocking", event.strikeThrough.isBlocking);
|
|
81
|
+
payload.setProperty(runtime, "strikeThrough", strikeThrough);
|
|
82
|
+
}
|
|
83
|
+
{
|
|
84
|
+
auto inlineCode = jsi::Object(runtime);
|
|
85
|
+
inlineCode.setProperty(runtime, "isActive", event.inlineCode.isActive);
|
|
86
|
+
inlineCode.setProperty(runtime, "isConflicting", event.inlineCode.isConflicting);
|
|
87
|
+
inlineCode.setProperty(runtime, "isBlocking", event.inlineCode.isBlocking);
|
|
88
|
+
payload.setProperty(runtime, "inlineCode", inlineCode);
|
|
89
|
+
}
|
|
90
|
+
{
|
|
91
|
+
auto h1 = jsi::Object(runtime);
|
|
92
|
+
h1.setProperty(runtime, "isActive", event.h1.isActive);
|
|
93
|
+
h1.setProperty(runtime, "isConflicting", event.h1.isConflicting);
|
|
94
|
+
h1.setProperty(runtime, "isBlocking", event.h1.isBlocking);
|
|
95
|
+
payload.setProperty(runtime, "h1", h1);
|
|
96
|
+
}
|
|
97
|
+
{
|
|
98
|
+
auto h2 = jsi::Object(runtime);
|
|
99
|
+
h2.setProperty(runtime, "isActive", event.h2.isActive);
|
|
100
|
+
h2.setProperty(runtime, "isConflicting", event.h2.isConflicting);
|
|
101
|
+
h2.setProperty(runtime, "isBlocking", event.h2.isBlocking);
|
|
102
|
+
payload.setProperty(runtime, "h2", h2);
|
|
103
|
+
}
|
|
104
|
+
{
|
|
105
|
+
auto h3 = jsi::Object(runtime);
|
|
106
|
+
h3.setProperty(runtime, "isActive", event.h3.isActive);
|
|
107
|
+
h3.setProperty(runtime, "isConflicting", event.h3.isConflicting);
|
|
108
|
+
h3.setProperty(runtime, "isBlocking", event.h3.isBlocking);
|
|
109
|
+
payload.setProperty(runtime, "h3", h3);
|
|
110
|
+
}
|
|
111
|
+
{
|
|
112
|
+
auto h4 = jsi::Object(runtime);
|
|
113
|
+
h4.setProperty(runtime, "isActive", event.h4.isActive);
|
|
114
|
+
h4.setProperty(runtime, "isConflicting", event.h4.isConflicting);
|
|
115
|
+
h4.setProperty(runtime, "isBlocking", event.h4.isBlocking);
|
|
116
|
+
payload.setProperty(runtime, "h4", h4);
|
|
117
|
+
}
|
|
118
|
+
{
|
|
119
|
+
auto h5 = jsi::Object(runtime);
|
|
120
|
+
h5.setProperty(runtime, "isActive", event.h5.isActive);
|
|
121
|
+
h5.setProperty(runtime, "isConflicting", event.h5.isConflicting);
|
|
122
|
+
h5.setProperty(runtime, "isBlocking", event.h5.isBlocking);
|
|
123
|
+
payload.setProperty(runtime, "h5", h5);
|
|
124
|
+
}
|
|
125
|
+
{
|
|
126
|
+
auto h6 = jsi::Object(runtime);
|
|
127
|
+
h6.setProperty(runtime, "isActive", event.h6.isActive);
|
|
128
|
+
h6.setProperty(runtime, "isConflicting", event.h6.isConflicting);
|
|
129
|
+
h6.setProperty(runtime, "isBlocking", event.h6.isBlocking);
|
|
130
|
+
payload.setProperty(runtime, "h6", h6);
|
|
131
|
+
}
|
|
132
|
+
{
|
|
133
|
+
auto codeBlock = jsi::Object(runtime);
|
|
134
|
+
codeBlock.setProperty(runtime, "isActive", event.codeBlock.isActive);
|
|
135
|
+
codeBlock.setProperty(runtime, "isConflicting", event.codeBlock.isConflicting);
|
|
136
|
+
codeBlock.setProperty(runtime, "isBlocking", event.codeBlock.isBlocking);
|
|
137
|
+
payload.setProperty(runtime, "codeBlock", codeBlock);
|
|
138
|
+
}
|
|
139
|
+
{
|
|
140
|
+
auto blockQuote = jsi::Object(runtime);
|
|
141
|
+
blockQuote.setProperty(runtime, "isActive", event.blockQuote.isActive);
|
|
142
|
+
blockQuote.setProperty(runtime, "isConflicting", event.blockQuote.isConflicting);
|
|
143
|
+
blockQuote.setProperty(runtime, "isBlocking", event.blockQuote.isBlocking);
|
|
144
|
+
payload.setProperty(runtime, "blockQuote", blockQuote);
|
|
145
|
+
}
|
|
146
|
+
{
|
|
147
|
+
auto orderedList = jsi::Object(runtime);
|
|
148
|
+
orderedList.setProperty(runtime, "isActive", event.orderedList.isActive);
|
|
149
|
+
orderedList.setProperty(runtime, "isConflicting", event.orderedList.isConflicting);
|
|
150
|
+
orderedList.setProperty(runtime, "isBlocking", event.orderedList.isBlocking);
|
|
151
|
+
payload.setProperty(runtime, "orderedList", orderedList);
|
|
152
|
+
}
|
|
153
|
+
{
|
|
154
|
+
auto unorderedList = jsi::Object(runtime);
|
|
155
|
+
unorderedList.setProperty(runtime, "isActive", event.unorderedList.isActive);
|
|
156
|
+
unorderedList.setProperty(runtime, "isConflicting", event.unorderedList.isConflicting);
|
|
157
|
+
unorderedList.setProperty(runtime, "isBlocking", event.unorderedList.isBlocking);
|
|
158
|
+
payload.setProperty(runtime, "unorderedList", unorderedList);
|
|
159
|
+
}
|
|
160
|
+
{
|
|
161
|
+
auto link = jsi::Object(runtime);
|
|
162
|
+
link.setProperty(runtime, "isActive", event.link.isActive);
|
|
163
|
+
link.setProperty(runtime, "isConflicting", event.link.isConflicting);
|
|
164
|
+
link.setProperty(runtime, "isBlocking", event.link.isBlocking);
|
|
165
|
+
payload.setProperty(runtime, "link", link);
|
|
166
|
+
}
|
|
167
|
+
{
|
|
168
|
+
auto image = jsi::Object(runtime);
|
|
169
|
+
image.setProperty(runtime, "isActive", event.image.isActive);
|
|
170
|
+
image.setProperty(runtime, "isConflicting", event.image.isConflicting);
|
|
171
|
+
image.setProperty(runtime, "isBlocking", event.image.isBlocking);
|
|
172
|
+
payload.setProperty(runtime, "image", image);
|
|
173
|
+
}
|
|
174
|
+
{
|
|
175
|
+
auto mention = jsi::Object(runtime);
|
|
176
|
+
mention.setProperty(runtime, "isActive", event.mention.isActive);
|
|
177
|
+
mention.setProperty(runtime, "isConflicting", event.mention.isConflicting);
|
|
178
|
+
mention.setProperty(runtime, "isBlocking", event.mention.isBlocking);
|
|
179
|
+
payload.setProperty(runtime, "mention", mention);
|
|
180
|
+
}
|
|
181
|
+
{
|
|
182
|
+
auto checkboxList = jsi::Object(runtime);
|
|
183
|
+
checkboxList.setProperty(runtime, "isActive", event.checkboxList.isActive);
|
|
184
|
+
checkboxList.setProperty(runtime, "isConflicting", event.checkboxList.isConflicting);
|
|
185
|
+
checkboxList.setProperty(runtime, "isBlocking", event.checkboxList.isBlocking);
|
|
186
|
+
payload.setProperty(runtime, "checkboxList", checkboxList);
|
|
187
|
+
}
|
|
188
|
+
return payload;
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
void EnrichedTextInputViewEventEmitter::onLinkDetected(OnLinkDetected event) const {
|
|
194
|
+
dispatchEvent("linkDetected", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
195
|
+
auto payload = jsi::Object(runtime);
|
|
196
|
+
payload.setProperty(runtime, "text", event.text);
|
|
197
|
+
payload.setProperty(runtime, "url", event.url);
|
|
198
|
+
payload.setProperty(runtime, "start", event.start);
|
|
199
|
+
payload.setProperty(runtime, "end", event.end);
|
|
200
|
+
return payload;
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
void EnrichedTextInputViewEventEmitter::onMentionDetected(OnMentionDetected event) const {
|
|
206
|
+
dispatchEvent("mentionDetected", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
207
|
+
auto payload = jsi::Object(runtime);
|
|
208
|
+
payload.setProperty(runtime, "text", event.text);
|
|
209
|
+
payload.setProperty(runtime, "indicator", event.indicator);
|
|
210
|
+
payload.setProperty(runtime, "payload", event.payload);
|
|
211
|
+
return payload;
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
void EnrichedTextInputViewEventEmitter::onMention(OnMention event) const {
|
|
217
|
+
dispatchEvent("mention", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
218
|
+
auto payload = jsi::Object(runtime);
|
|
219
|
+
payload.setProperty(runtime, "indicator", event.indicator);
|
|
220
|
+
payload.setProperty(runtime, "text", jsi::valueFromDynamic(runtime, event.text));
|
|
221
|
+
return payload;
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
void EnrichedTextInputViewEventEmitter::onChangeSelection(OnChangeSelection event) const {
|
|
227
|
+
dispatchEvent("changeSelection", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
228
|
+
auto payload = jsi::Object(runtime);
|
|
229
|
+
payload.setProperty(runtime, "start", event.start);
|
|
230
|
+
payload.setProperty(runtime, "end", event.end);
|
|
231
|
+
payload.setProperty(runtime, "text", event.text);
|
|
232
|
+
return payload;
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
void EnrichedTextInputViewEventEmitter::onRequestHtmlResult(OnRequestHtmlResult event) const {
|
|
238
|
+
dispatchEvent("requestHtmlResult", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
239
|
+
auto payload = jsi::Object(runtime);
|
|
240
|
+
payload.setProperty(runtime, "requestId", event.requestId);
|
|
241
|
+
payload.setProperty(runtime, "html", jsi::valueFromDynamic(runtime, event.html));
|
|
242
|
+
return payload;
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
void EnrichedTextInputViewEventEmitter::onInputKeyPress(OnInputKeyPress event) const {
|
|
248
|
+
dispatchEvent("inputKeyPress", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
249
|
+
auto payload = jsi::Object(runtime);
|
|
250
|
+
payload.setProperty(runtime, "key", event.key);
|
|
251
|
+
return payload;
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
void EnrichedTextInputViewEventEmitter::onPasteImages(OnPasteImages event) const {
|
|
257
|
+
dispatchEvent("pasteImages", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
258
|
+
auto payload = jsi::Object(runtime);
|
|
259
|
+
|
|
260
|
+
auto images = jsi::Array(runtime, event.images.size());
|
|
261
|
+
size_t imagesIndex = 0;
|
|
262
|
+
for (auto imagesValue : event.images) {
|
|
263
|
+
auto imagesObject = jsi::Object(runtime);
|
|
264
|
+
imagesObject.setProperty(runtime, "uri", imagesValue.uri);
|
|
265
|
+
imagesObject.setProperty(runtime, "type", imagesValue.type);
|
|
266
|
+
imagesObject.setProperty(runtime, "width", imagesValue.width);
|
|
267
|
+
imagesObject.setProperty(runtime, "height", imagesValue.height);
|
|
268
|
+
images.setValueAtIndex(runtime, imagesIndex++, imagesObject);
|
|
269
|
+
}
|
|
270
|
+
payload.setProperty(runtime, "images", images);
|
|
271
|
+
|
|
272
|
+
return payload;
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
} // namespace facebook::react
|
package/android/generated/jni/react/renderer/components/ReactNativeEnrichedSpec/EventEmitters.h
ADDED
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateEventEmitterH.js
|
|
9
|
+
*/
|
|
10
|
+
#pragma once
|
|
11
|
+
|
|
12
|
+
#include <react/renderer/components/view/ViewEventEmitter.h>
|
|
13
|
+
#include <folly/dynamic.h>
|
|
14
|
+
|
|
15
|
+
namespace facebook::react {
|
|
16
|
+
class EnrichedTextInputViewEventEmitter : public ViewEventEmitter {
|
|
17
|
+
public:
|
|
18
|
+
using ViewEventEmitter::ViewEventEmitter;
|
|
19
|
+
|
|
20
|
+
struct OnInputFocus {
|
|
21
|
+
int target;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
struct OnInputBlur {
|
|
25
|
+
int target;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
struct OnChangeText {
|
|
29
|
+
std::string value;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
struct OnChangeHtml {
|
|
33
|
+
std::string value;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
struct OnChangeStateBold {
|
|
37
|
+
bool isActive;
|
|
38
|
+
bool isConflicting;
|
|
39
|
+
bool isBlocking;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
struct OnChangeStateItalic {
|
|
43
|
+
bool isActive;
|
|
44
|
+
bool isConflicting;
|
|
45
|
+
bool isBlocking;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
struct OnChangeStateUnderline {
|
|
49
|
+
bool isActive;
|
|
50
|
+
bool isConflicting;
|
|
51
|
+
bool isBlocking;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
struct OnChangeStateStrikeThrough {
|
|
55
|
+
bool isActive;
|
|
56
|
+
bool isConflicting;
|
|
57
|
+
bool isBlocking;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
struct OnChangeStateInlineCode {
|
|
61
|
+
bool isActive;
|
|
62
|
+
bool isConflicting;
|
|
63
|
+
bool isBlocking;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
struct OnChangeStateH1 {
|
|
67
|
+
bool isActive;
|
|
68
|
+
bool isConflicting;
|
|
69
|
+
bool isBlocking;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
struct OnChangeStateH2 {
|
|
73
|
+
bool isActive;
|
|
74
|
+
bool isConflicting;
|
|
75
|
+
bool isBlocking;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
struct OnChangeStateH3 {
|
|
79
|
+
bool isActive;
|
|
80
|
+
bool isConflicting;
|
|
81
|
+
bool isBlocking;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
struct OnChangeStateH4 {
|
|
85
|
+
bool isActive;
|
|
86
|
+
bool isConflicting;
|
|
87
|
+
bool isBlocking;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
struct OnChangeStateH5 {
|
|
91
|
+
bool isActive;
|
|
92
|
+
bool isConflicting;
|
|
93
|
+
bool isBlocking;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
struct OnChangeStateH6 {
|
|
97
|
+
bool isActive;
|
|
98
|
+
bool isConflicting;
|
|
99
|
+
bool isBlocking;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
struct OnChangeStateCodeBlock {
|
|
103
|
+
bool isActive;
|
|
104
|
+
bool isConflicting;
|
|
105
|
+
bool isBlocking;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
struct OnChangeStateBlockQuote {
|
|
109
|
+
bool isActive;
|
|
110
|
+
bool isConflicting;
|
|
111
|
+
bool isBlocking;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
struct OnChangeStateOrderedList {
|
|
115
|
+
bool isActive;
|
|
116
|
+
bool isConflicting;
|
|
117
|
+
bool isBlocking;
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
struct OnChangeStateUnorderedList {
|
|
121
|
+
bool isActive;
|
|
122
|
+
bool isConflicting;
|
|
123
|
+
bool isBlocking;
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
struct OnChangeStateLink {
|
|
127
|
+
bool isActive;
|
|
128
|
+
bool isConflicting;
|
|
129
|
+
bool isBlocking;
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
struct OnChangeStateImage {
|
|
133
|
+
bool isActive;
|
|
134
|
+
bool isConflicting;
|
|
135
|
+
bool isBlocking;
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
struct OnChangeStateMention {
|
|
139
|
+
bool isActive;
|
|
140
|
+
bool isConflicting;
|
|
141
|
+
bool isBlocking;
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
struct OnChangeStateCheckboxList {
|
|
145
|
+
bool isActive;
|
|
146
|
+
bool isConflicting;
|
|
147
|
+
bool isBlocking;
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
struct OnChangeState {
|
|
151
|
+
OnChangeStateBold bold;
|
|
152
|
+
OnChangeStateItalic italic;
|
|
153
|
+
OnChangeStateUnderline underline;
|
|
154
|
+
OnChangeStateStrikeThrough strikeThrough;
|
|
155
|
+
OnChangeStateInlineCode inlineCode;
|
|
156
|
+
OnChangeStateH1 h1;
|
|
157
|
+
OnChangeStateH2 h2;
|
|
158
|
+
OnChangeStateH3 h3;
|
|
159
|
+
OnChangeStateH4 h4;
|
|
160
|
+
OnChangeStateH5 h5;
|
|
161
|
+
OnChangeStateH6 h6;
|
|
162
|
+
OnChangeStateCodeBlock codeBlock;
|
|
163
|
+
OnChangeStateBlockQuote blockQuote;
|
|
164
|
+
OnChangeStateOrderedList orderedList;
|
|
165
|
+
OnChangeStateUnorderedList unorderedList;
|
|
166
|
+
OnChangeStateLink link;
|
|
167
|
+
OnChangeStateImage image;
|
|
168
|
+
OnChangeStateMention mention;
|
|
169
|
+
OnChangeStateCheckboxList checkboxList;
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
struct OnLinkDetected {
|
|
173
|
+
std::string text;
|
|
174
|
+
std::string url;
|
|
175
|
+
int start;
|
|
176
|
+
int end;
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
struct OnMentionDetected {
|
|
180
|
+
std::string text;
|
|
181
|
+
std::string indicator;
|
|
182
|
+
std::string payload;
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
struct OnMention {
|
|
186
|
+
std::string indicator;
|
|
187
|
+
folly::dynamic text;
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
struct OnChangeSelection {
|
|
191
|
+
int start;
|
|
192
|
+
int end;
|
|
193
|
+
std::string text;
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
struct OnRequestHtmlResult {
|
|
197
|
+
int requestId;
|
|
198
|
+
folly::dynamic html;
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
struct OnInputKeyPress {
|
|
202
|
+
std::string key;
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
struct OnPasteImagesImages {
|
|
206
|
+
std::string uri;
|
|
207
|
+
std::string type;
|
|
208
|
+
Float width;
|
|
209
|
+
Float height;
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
struct OnPasteImages {
|
|
213
|
+
std::vector<OnPasteImagesImages> images;
|
|
214
|
+
};
|
|
215
|
+
void onInputFocus(OnInputFocus value) const;
|
|
216
|
+
|
|
217
|
+
void onInputBlur(OnInputBlur value) const;
|
|
218
|
+
|
|
219
|
+
void onChangeText(OnChangeText value) const;
|
|
220
|
+
|
|
221
|
+
void onChangeHtml(OnChangeHtml value) const;
|
|
222
|
+
|
|
223
|
+
void onChangeState(OnChangeState value) const;
|
|
224
|
+
|
|
225
|
+
void onLinkDetected(OnLinkDetected value) const;
|
|
226
|
+
|
|
227
|
+
void onMentionDetected(OnMentionDetected value) const;
|
|
228
|
+
|
|
229
|
+
void onMention(OnMention value) const;
|
|
230
|
+
|
|
231
|
+
void onChangeSelection(OnChangeSelection value) const;
|
|
232
|
+
|
|
233
|
+
void onRequestHtmlResult(OnRequestHtmlResult value) const;
|
|
234
|
+
|
|
235
|
+
void onInputKeyPress(OnInputKeyPress value) const;
|
|
236
|
+
|
|
237
|
+
void onPasteImages(OnPasteImages value) const;
|
|
238
|
+
};
|
|
239
|
+
} // namespace facebook::react
|
|
@@ -31,12 +31,14 @@ EnrichedTextInputViewProps::EnrichedTextInputViewProps(
|
|
|
31
31
|
autoCapitalize(convertRawProp(context, rawProps, "autoCapitalize", sourceProps.autoCapitalize, {})),
|
|
32
32
|
htmlStyle(convertRawProp(context, rawProps, "htmlStyle", sourceProps.htmlStyle, {})),
|
|
33
33
|
scrollEnabled(convertRawProp(context, rawProps, "scrollEnabled", sourceProps.scrollEnabled, {false})),
|
|
34
|
+
linkRegex(convertRawProp(context, rawProps, "linkRegex", sourceProps.linkRegex, {})),
|
|
34
35
|
color(convertRawProp(context, rawProps, "color", sourceProps.color, {})),
|
|
35
36
|
fontSize(convertRawProp(context, rawProps, "fontSize", sourceProps.fontSize, {0.0})),
|
|
36
37
|
fontFamily(convertRawProp(context, rawProps, "fontFamily", sourceProps.fontFamily, {})),
|
|
37
38
|
fontWeight(convertRawProp(context, rawProps, "fontWeight", sourceProps.fontWeight, {})),
|
|
38
39
|
fontStyle(convertRawProp(context, rawProps, "fontStyle", sourceProps.fontStyle, {})),
|
|
39
40
|
isOnChangeHtmlSet(convertRawProp(context, rawProps, "isOnChangeHtmlSet", sourceProps.isOnChangeHtmlSet, {false})),
|
|
41
|
+
isOnChangeTextSet(convertRawProp(context, rawProps, "isOnChangeTextSet", sourceProps.isOnChangeTextSet, {false})),
|
|
40
42
|
androidExperimentalSynchronousEvents(convertRawProp(context, rawProps, "androidExperimentalSynchronousEvents", sourceProps.androidExperimentalSynchronousEvents, {false})) {}
|
|
41
43
|
|
|
42
44
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -99,6 +101,10 @@ folly::dynamic EnrichedTextInputViewProps::getDiffProps(
|
|
|
99
101
|
result["scrollEnabled"] = scrollEnabled;
|
|
100
102
|
}
|
|
101
103
|
|
|
104
|
+
if (linkRegex != oldProps->linkRegex) {
|
|
105
|
+
result["linkRegex"] = toDynamic(linkRegex);
|
|
106
|
+
}
|
|
107
|
+
|
|
102
108
|
if (color != oldProps->color) {
|
|
103
109
|
result["color"] = *color;
|
|
104
110
|
}
|
|
@@ -123,6 +129,10 @@ folly::dynamic EnrichedTextInputViewProps::getDiffProps(
|
|
|
123
129
|
result["isOnChangeHtmlSet"] = isOnChangeHtmlSet;
|
|
124
130
|
}
|
|
125
131
|
|
|
132
|
+
if (isOnChangeTextSet != oldProps->isOnChangeTextSet) {
|
|
133
|
+
result["isOnChangeTextSet"] = isOnChangeTextSet;
|
|
134
|
+
}
|
|
135
|
+
|
|
126
136
|
if (androidExperimentalSynchronousEvents != oldProps->androidExperimentalSynchronousEvents) {
|
|
127
137
|
result["androidExperimentalSynchronousEvents"] = androidExperimentalSynchronousEvents;
|
|
128
138
|
}
|