From 0abec5a4aad532b8bada2c5f0677611d74c5b3d2 Mon Sep 17 00:00:00 2001 From: Tomek Zawadzki Date: Fri, 1 Dec 2023 12:08:25 +0100 Subject: [PATCH] Android works --- .../MarkdownTextInputView.java | 73 + .../project.pbxproj | 23 +- .../contents.xcworkspacedata | 10 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + example/ios/Podfile.lock | 720 + example/package.json | 2 +- example/src/App.tsx | 40 +- src/MarkdownTextInput.tsx | 28 + src/index.tsx | 4 +- yarn.lock | 13350 ++++++++++++++++ 10 files changed, 14245 insertions(+), 13 deletions(-) create mode 100644 example/ios/MarkdownTextInputExample.xcworkspace/contents.xcworkspacedata create mode 100644 example/ios/MarkdownTextInputExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 example/ios/Podfile.lock create mode 100644 src/MarkdownTextInput.tsx create mode 100644 yarn.lock diff --git a/android/src/main/java/com/markdowntextinput/MarkdownTextInputView.java b/android/src/main/java/com/markdowntextinput/MarkdownTextInputView.java index 718bc41c..acd9a060 100644 --- a/android/src/main/java/com/markdowntextinput/MarkdownTextInputView.java +++ b/android/src/main/java/com/markdowntextinput/MarkdownTextInputView.java @@ -3,9 +3,19 @@ import androidx.annotation.Nullable; import android.content.Context; +import android.graphics.Typeface; +import android.text.Editable; +import android.text.SpannableStringBuilder; +import android.text.Spanned; +import android.text.TextWatcher; +import android.text.style.StyleSpan; import android.util.AttributeSet; import android.view.View; +import android.view.ViewGroup; +import android.view.ViewParent; + +import com.facebook.react.views.textinput.ReactEditText; public class MarkdownTextInputView extends View { @@ -21,4 +31,67 @@ public MarkdownTextInputView(Context context, @Nullable AttributeSet attrs, int super(context, attrs, defStyleAttr); } + private ReactEditText mReactEditText; + + private TextWatcher mTextWatcher; + + @Override + protected void onAttachedToWindow() { + super.onAttachedToWindow(); + + View previousSibling = null; + final ViewParent parent = this.getParent(); + if (parent instanceof ViewGroup) { + final ViewGroup viewGroup = (ViewGroup) parent; + for (int i = 1; i < viewGroup.getChildCount(); i++) { + if (viewGroup.getChildAt(i) == this) { + previousSibling = viewGroup.getChildAt(i - 1); + break; + } + } + } + if (previousSibling instanceof ReactEditText) { + mReactEditText = (ReactEditText) previousSibling; + mTextWatcher = new TextWatcher() { + @Override + public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) { + + } + + @Override + public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) { + + } + + private boolean mIsFormatting = false; + + @Override + public void afterTextChanged(Editable editable) { + if (!mIsFormatting) { + mIsFormatting = true; + if (editable instanceof SpannableStringBuilder) { + SpannableStringBuilder ssb = (SpannableStringBuilder) editable; + int selectionStart = mReactEditText.getSelectionStart(); + int selectionEnd = mReactEditText.getSelectionEnd(); + String text = ssb.toString(); + int length = text.length(); + ssb.clear(); + ssb.append(text); + mReactEditText.setSelection(Math.min(selectionStart, length), Math.min(selectionEnd, length)); + int flag = Spanned.SPAN_EXCLUSIVE_EXCLUSIVE; + ssb.setSpan(new StyleSpan(Typeface.BOLD), 0, Math.min(3, ssb.length()), flag); + } + mIsFormatting = false; + } + } + }; + mReactEditText.addTextChangedListener(mTextWatcher); + } + } + + @Override + protected void onDetachedFromWindow() { + super.onDetachedFromWindow(); + mReactEditText.removeTextChangedListener(mTextWatcher); + } } diff --git a/example/ios/MarkdownTextInputExample.xcodeproj/project.pbxproj b/example/ios/MarkdownTextInputExample.xcodeproj/project.pbxproj index 50b8dc3e..e4bec5ec 100644 --- a/example/ios/MarkdownTextInputExample.xcodeproj/project.pbxproj +++ b/example/ios/MarkdownTextInputExample.xcodeproj/project.pbxproj @@ -564,7 +564,7 @@ COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; - "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = ""; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -572,6 +572,7 @@ GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", + _LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION, ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -592,12 +593,19 @@ ); MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; + OTHER_CFLAGS = "$(inherited)"; OTHER_CPLUSPLUSFLAGS = ( "$(OTHER_CFLAGS)", "-DFOLLY_NO_CONFIG", "-DFOLLY_MOBILE=1", "-DFOLLY_USE_LIBCPP=1", ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-Wl", + "-ld_classic", + ); + REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; }; name = Debug; @@ -635,9 +643,13 @@ COPY_PHASE_STRIP = YES; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; - "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = ""; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + _LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION, + ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; @@ -655,12 +667,19 @@ "\"$(inherited)\"", ); MTL_ENABLE_DEBUG_INFO = NO; + OTHER_CFLAGS = "$(inherited)"; OTHER_CPLUSPLUSFLAGS = ( "$(OTHER_CFLAGS)", "-DFOLLY_NO_CONFIG", "-DFOLLY_MOBILE=1", "-DFOLLY_USE_LIBCPP=1", ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-Wl", + "-ld_classic", + ); + REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; }; diff --git a/example/ios/MarkdownTextInputExample.xcworkspace/contents.xcworkspacedata b/example/ios/MarkdownTextInputExample.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..3639464b --- /dev/null +++ b/example/ios/MarkdownTextInputExample.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/example/ios/MarkdownTextInputExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/ios/MarkdownTextInputExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/example/ios/MarkdownTextInputExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock new file mode 100644 index 00000000..7d8e1375 --- /dev/null +++ b/example/ios/Podfile.lock @@ -0,0 +1,720 @@ +PODS: + - boost (1.76.0) + - CocoaAsyncSocket (7.6.5) + - DoubleConversion (1.1.6) + - FBLazyVector (0.72.7) + - FBReactNativeSpec (0.72.7): + - RCT-Folly (= 2021.07.22.00) + - RCTRequired (= 0.72.7) + - RCTTypeSafety (= 0.72.7) + - React-Core (= 0.72.7) + - React-jsi (= 0.72.7) + - ReactCommon/turbomodule/core (= 0.72.7) + - Flipper (0.182.0): + - Flipper-Folly (~> 2.6) + - Flipper-Boost-iOSX (1.76.0.1.11) + - Flipper-DoubleConversion (3.2.0.1) + - Flipper-Fmt (7.1.7) + - Flipper-Folly (2.6.10): + - Flipper-Boost-iOSX + - Flipper-DoubleConversion + - Flipper-Fmt (= 7.1.7) + - Flipper-Glog + - libevent (~> 2.1.12) + - OpenSSL-Universal (= 1.1.1100) + - Flipper-Glog (0.5.0.5) + - Flipper-PeerTalk (0.0.4) + - FlipperKit (0.182.0): + - FlipperKit/Core (= 0.182.0) + - FlipperKit/Core (0.182.0): + - Flipper (~> 0.182.0) + - FlipperKit/CppBridge + - FlipperKit/FBCxxFollyDynamicConvert + - FlipperKit/FBDefines + - FlipperKit/FKPortForwarding + - SocketRocket (~> 0.6.0) + - FlipperKit/CppBridge (0.182.0): + - Flipper (~> 0.182.0) + - FlipperKit/FBCxxFollyDynamicConvert (0.182.0): + - Flipper-Folly (~> 2.6) + - FlipperKit/FBDefines (0.182.0) + - FlipperKit/FKPortForwarding (0.182.0): + - CocoaAsyncSocket (~> 7.6) + - Flipper-PeerTalk (~> 0.0.4) + - FlipperKit/FlipperKitHighlightOverlay (0.182.0) + - FlipperKit/FlipperKitLayoutHelpers (0.182.0): + - FlipperKit/Core + - FlipperKit/FlipperKitHighlightOverlay + - FlipperKit/FlipperKitLayoutTextSearchable + - FlipperKit/FlipperKitLayoutIOSDescriptors (0.182.0): + - FlipperKit/Core + - FlipperKit/FlipperKitHighlightOverlay + - FlipperKit/FlipperKitLayoutHelpers + - YogaKit (~> 1.18) + - FlipperKit/FlipperKitLayoutPlugin (0.182.0): + - FlipperKit/Core + - FlipperKit/FlipperKitHighlightOverlay + - FlipperKit/FlipperKitLayoutHelpers + - FlipperKit/FlipperKitLayoutIOSDescriptors + - FlipperKit/FlipperKitLayoutTextSearchable + - YogaKit (~> 1.18) + - FlipperKit/FlipperKitLayoutTextSearchable (0.182.0) + - FlipperKit/FlipperKitNetworkPlugin (0.182.0): + - FlipperKit/Core + - FlipperKit/FlipperKitReactPlugin (0.182.0): + - FlipperKit/Core + - FlipperKit/FlipperKitUserDefaultsPlugin (0.182.0): + - FlipperKit/Core + - FlipperKit/SKIOSNetworkPlugin (0.182.0): + - FlipperKit/Core + - FlipperKit/FlipperKitNetworkPlugin + - fmt (6.2.1) + - glog (0.3.5) + - hermes-engine (0.72.7): + - hermes-engine/Pre-built (= 0.72.7) + - hermes-engine/Pre-built (0.72.7) + - libevent (2.1.12) + - OpenSSL-Universal (1.1.1100) + - RCT-Folly (2021.07.22.00): + - boost + - DoubleConversion + - fmt (~> 6.2.1) + - glog + - RCT-Folly/Default (= 2021.07.22.00) + - RCT-Folly/Default (2021.07.22.00): + - boost + - DoubleConversion + - fmt (~> 6.2.1) + - glog + - RCT-Folly/Futures (2021.07.22.00): + - boost + - DoubleConversion + - fmt (~> 6.2.1) + - glog + - libevent + - RCTRequired (0.72.7) + - RCTTypeSafety (0.72.7): + - FBLazyVector (= 0.72.7) + - RCTRequired (= 0.72.7) + - React-Core (= 0.72.7) + - React (0.72.7): + - React-Core (= 0.72.7) + - React-Core/DevSupport (= 0.72.7) + - React-Core/RCTWebSocket (= 0.72.7) + - React-RCTActionSheet (= 0.72.7) + - React-RCTAnimation (= 0.72.7) + - React-RCTBlob (= 0.72.7) + - React-RCTImage (= 0.72.7) + - React-RCTLinking (= 0.72.7) + - React-RCTNetwork (= 0.72.7) + - React-RCTSettings (= 0.72.7) + - React-RCTText (= 0.72.7) + - React-RCTVibration (= 0.72.7) + - React-callinvoker (0.72.7) + - React-Codegen (0.72.7): + - DoubleConversion + - FBReactNativeSpec + - glog + - hermes-engine + - RCT-Folly + - RCTRequired + - RCTTypeSafety + - React-Core + - React-jsi + - React-jsiexecutor + - React-NativeModulesApple + - React-rncore + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - React-Core (0.72.7): + - glog + - hermes-engine + - RCT-Folly (= 2021.07.22.00) + - React-Core/Default (= 0.72.7) + - React-cxxreact + - React-hermes + - React-jsi + - React-jsiexecutor + - React-perflogger + - React-runtimeexecutor + - React-utils + - SocketRocket (= 0.6.1) + - Yoga + - React-Core/CoreModulesHeaders (0.72.7): + - glog + - hermes-engine + - RCT-Folly (= 2021.07.22.00) + - React-Core/Default + - React-cxxreact + - React-hermes + - React-jsi + - React-jsiexecutor + - React-perflogger + - React-runtimeexecutor + - React-utils + - SocketRocket (= 0.6.1) + - Yoga + - React-Core/Default (0.72.7): + - glog + - hermes-engine + - RCT-Folly (= 2021.07.22.00) + - React-cxxreact + - React-hermes + - React-jsi + - React-jsiexecutor + - React-perflogger + - React-runtimeexecutor + - React-utils + - SocketRocket (= 0.6.1) + - Yoga + - React-Core/DevSupport (0.72.7): + - glog + - hermes-engine + - RCT-Folly (= 2021.07.22.00) + - React-Core/Default (= 0.72.7) + - React-Core/RCTWebSocket (= 0.72.7) + - React-cxxreact + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector (= 0.72.7) + - React-perflogger + - React-runtimeexecutor + - React-utils + - SocketRocket (= 0.6.1) + - Yoga + - React-Core/RCTActionSheetHeaders (0.72.7): + - glog + - hermes-engine + - RCT-Folly (= 2021.07.22.00) + - React-Core/Default + - React-cxxreact + - React-hermes + - React-jsi + - React-jsiexecutor + - React-perflogger + - React-runtimeexecutor + - React-utils + - SocketRocket (= 0.6.1) + - Yoga + - React-Core/RCTAnimationHeaders (0.72.7): + - glog + - hermes-engine + - RCT-Folly (= 2021.07.22.00) + - React-Core/Default + - React-cxxreact + - React-hermes + - React-jsi + - React-jsiexecutor + - React-perflogger + - React-runtimeexecutor + - React-utils + - SocketRocket (= 0.6.1) + - Yoga + - React-Core/RCTBlobHeaders (0.72.7): + - glog + - hermes-engine + - RCT-Folly (= 2021.07.22.00) + - React-Core/Default + - React-cxxreact + - React-hermes + - React-jsi + - React-jsiexecutor + - React-perflogger + - React-runtimeexecutor + - React-utils + - SocketRocket (= 0.6.1) + - Yoga + - React-Core/RCTImageHeaders (0.72.7): + - glog + - hermes-engine + - RCT-Folly (= 2021.07.22.00) + - React-Core/Default + - React-cxxreact + - React-hermes + - React-jsi + - React-jsiexecutor + - React-perflogger + - React-runtimeexecutor + - React-utils + - SocketRocket (= 0.6.1) + - Yoga + - React-Core/RCTLinkingHeaders (0.72.7): + - glog + - hermes-engine + - RCT-Folly (= 2021.07.22.00) + - React-Core/Default + - React-cxxreact + - React-hermes + - React-jsi + - React-jsiexecutor + - React-perflogger + - React-runtimeexecutor + - React-utils + - SocketRocket (= 0.6.1) + - Yoga + - React-Core/RCTNetworkHeaders (0.72.7): + - glog + - hermes-engine + - RCT-Folly (= 2021.07.22.00) + - React-Core/Default + - React-cxxreact + - React-hermes + - React-jsi + - React-jsiexecutor + - React-perflogger + - React-runtimeexecutor + - React-utils + - SocketRocket (= 0.6.1) + - Yoga + - React-Core/RCTSettingsHeaders (0.72.7): + - glog + - hermes-engine + - RCT-Folly (= 2021.07.22.00) + - React-Core/Default + - React-cxxreact + - React-hermes + - React-jsi + - React-jsiexecutor + - React-perflogger + - React-runtimeexecutor + - React-utils + - SocketRocket (= 0.6.1) + - Yoga + - React-Core/RCTTextHeaders (0.72.7): + - glog + - hermes-engine + - RCT-Folly (= 2021.07.22.00) + - React-Core/Default + - React-cxxreact + - React-hermes + - React-jsi + - React-jsiexecutor + - React-perflogger + - React-runtimeexecutor + - React-utils + - SocketRocket (= 0.6.1) + - Yoga + - React-Core/RCTVibrationHeaders (0.72.7): + - glog + - hermes-engine + - RCT-Folly (= 2021.07.22.00) + - React-Core/Default + - React-cxxreact + - React-hermes + - React-jsi + - React-jsiexecutor + - React-perflogger + - React-runtimeexecutor + - React-utils + - SocketRocket (= 0.6.1) + - Yoga + - React-Core/RCTWebSocket (0.72.7): + - glog + - hermes-engine + - RCT-Folly (= 2021.07.22.00) + - React-Core/Default (= 0.72.7) + - React-cxxreact + - React-hermes + - React-jsi + - React-jsiexecutor + - React-perflogger + - React-runtimeexecutor + - React-utils + - SocketRocket (= 0.6.1) + - Yoga + - React-CoreModules (0.72.7): + - RCT-Folly (= 2021.07.22.00) + - RCTTypeSafety (= 0.72.7) + - React-Codegen (= 0.72.7) + - React-Core/CoreModulesHeaders (= 0.72.7) + - React-jsi (= 0.72.7) + - React-RCTBlob + - React-RCTImage (= 0.72.7) + - ReactCommon/turbomodule/core (= 0.72.7) + - SocketRocket (= 0.6.1) + - React-cxxreact (0.72.7): + - boost (= 1.76.0) + - DoubleConversion + - glog + - hermes-engine + - RCT-Folly (= 2021.07.22.00) + - React-callinvoker (= 0.72.7) + - React-debug (= 0.72.7) + - React-jsi (= 0.72.7) + - React-jsinspector (= 0.72.7) + - React-logger (= 0.72.7) + - React-perflogger (= 0.72.7) + - React-runtimeexecutor (= 0.72.7) + - React-debug (0.72.7) + - React-hermes (0.72.7): + - DoubleConversion + - glog + - hermes-engine + - RCT-Folly (= 2021.07.22.00) + - RCT-Folly/Futures (= 2021.07.22.00) + - React-cxxreact (= 0.72.7) + - React-jsi + - React-jsiexecutor (= 0.72.7) + - React-jsinspector (= 0.72.7) + - React-perflogger (= 0.72.7) + - React-jsi (0.72.7): + - boost (= 1.76.0) + - DoubleConversion + - glog + - hermes-engine + - RCT-Folly (= 2021.07.22.00) + - React-jsiexecutor (0.72.7): + - DoubleConversion + - glog + - hermes-engine + - RCT-Folly (= 2021.07.22.00) + - React-cxxreact (= 0.72.7) + - React-jsi (= 0.72.7) + - React-perflogger (= 0.72.7) + - React-jsinspector (0.72.7) + - React-logger (0.72.7): + - glog + - react-native-markdown-text-input (0.1.0): + - RCT-Folly (= 2021.07.22.00) + - React-Core + - React-NativeModulesApple (0.72.7): + - hermes-engine + - React-callinvoker + - React-Core + - React-cxxreact + - React-jsi + - React-runtimeexecutor + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - React-perflogger (0.72.7) + - React-RCTActionSheet (0.72.7): + - React-Core/RCTActionSheetHeaders (= 0.72.7) + - React-RCTAnimation (0.72.7): + - RCT-Folly (= 2021.07.22.00) + - RCTTypeSafety (= 0.72.7) + - React-Codegen (= 0.72.7) + - React-Core/RCTAnimationHeaders (= 0.72.7) + - React-jsi (= 0.72.7) + - ReactCommon/turbomodule/core (= 0.72.7) + - React-RCTAppDelegate (0.72.7): + - RCT-Folly + - RCTRequired + - RCTTypeSafety + - React-Core + - React-CoreModules + - React-hermes + - React-NativeModulesApple + - React-RCTImage + - React-RCTNetwork + - React-runtimescheduler + - ReactCommon/turbomodule/core + - React-RCTBlob (0.72.7): + - hermes-engine + - RCT-Folly (= 2021.07.22.00) + - React-Codegen (= 0.72.7) + - React-Core/RCTBlobHeaders (= 0.72.7) + - React-Core/RCTWebSocket (= 0.72.7) + - React-jsi (= 0.72.7) + - React-RCTNetwork (= 0.72.7) + - ReactCommon/turbomodule/core (= 0.72.7) + - React-RCTImage (0.72.7): + - RCT-Folly (= 2021.07.22.00) + - RCTTypeSafety (= 0.72.7) + - React-Codegen (= 0.72.7) + - React-Core/RCTImageHeaders (= 0.72.7) + - React-jsi (= 0.72.7) + - React-RCTNetwork (= 0.72.7) + - ReactCommon/turbomodule/core (= 0.72.7) + - React-RCTLinking (0.72.7): + - React-Codegen (= 0.72.7) + - React-Core/RCTLinkingHeaders (= 0.72.7) + - React-jsi (= 0.72.7) + - ReactCommon/turbomodule/core (= 0.72.7) + - React-RCTNetwork (0.72.7): + - RCT-Folly (= 2021.07.22.00) + - RCTTypeSafety (= 0.72.7) + - React-Codegen (= 0.72.7) + - React-Core/RCTNetworkHeaders (= 0.72.7) + - React-jsi (= 0.72.7) + - ReactCommon/turbomodule/core (= 0.72.7) + - React-RCTSettings (0.72.7): + - RCT-Folly (= 2021.07.22.00) + - RCTTypeSafety (= 0.72.7) + - React-Codegen (= 0.72.7) + - React-Core/RCTSettingsHeaders (= 0.72.7) + - React-jsi (= 0.72.7) + - ReactCommon/turbomodule/core (= 0.72.7) + - React-RCTText (0.72.7): + - React-Core/RCTTextHeaders (= 0.72.7) + - React-RCTVibration (0.72.7): + - RCT-Folly (= 2021.07.22.00) + - React-Codegen (= 0.72.7) + - React-Core/RCTVibrationHeaders (= 0.72.7) + - React-jsi (= 0.72.7) + - ReactCommon/turbomodule/core (= 0.72.7) + - React-rncore (0.72.7) + - React-runtimeexecutor (0.72.7): + - React-jsi (= 0.72.7) + - React-runtimescheduler (0.72.7): + - glog + - hermes-engine + - RCT-Folly (= 2021.07.22.00) + - React-callinvoker + - React-debug + - React-jsi + - React-runtimeexecutor + - React-utils (0.72.7): + - glog + - RCT-Folly (= 2021.07.22.00) + - React-debug + - ReactCommon/turbomodule/bridging (0.72.7): + - DoubleConversion + - glog + - hermes-engine + - RCT-Folly (= 2021.07.22.00) + - React-callinvoker (= 0.72.7) + - React-cxxreact (= 0.72.7) + - React-jsi (= 0.72.7) + - React-logger (= 0.72.7) + - React-perflogger (= 0.72.7) + - ReactCommon/turbomodule/core (0.72.7): + - DoubleConversion + - glog + - hermes-engine + - RCT-Folly (= 2021.07.22.00) + - React-callinvoker (= 0.72.7) + - React-cxxreact (= 0.72.7) + - React-jsi (= 0.72.7) + - React-logger (= 0.72.7) + - React-perflogger (= 0.72.7) + - SocketRocket (0.6.1) + - Yoga (1.14.0) + - YogaKit (1.18.1): + - Yoga (~> 1.14) + +DEPENDENCIES: + - boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`) + - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) + - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) + - FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`) + - Flipper (= 0.182.0) + - Flipper-Boost-iOSX (= 1.76.0.1.11) + - Flipper-DoubleConversion (= 3.2.0.1) + - Flipper-Fmt (= 7.1.7) + - Flipper-Folly (= 2.6.10) + - Flipper-Glog (= 0.5.0.5) + - Flipper-PeerTalk (= 0.0.4) + - FlipperKit (= 0.182.0) + - FlipperKit/Core (= 0.182.0) + - FlipperKit/CppBridge (= 0.182.0) + - FlipperKit/FBCxxFollyDynamicConvert (= 0.182.0) + - FlipperKit/FBDefines (= 0.182.0) + - FlipperKit/FKPortForwarding (= 0.182.0) + - FlipperKit/FlipperKitHighlightOverlay (= 0.182.0) + - FlipperKit/FlipperKitLayoutPlugin (= 0.182.0) + - FlipperKit/FlipperKitLayoutTextSearchable (= 0.182.0) + - FlipperKit/FlipperKitNetworkPlugin (= 0.182.0) + - FlipperKit/FlipperKitReactPlugin (= 0.182.0) + - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.182.0) + - FlipperKit/SKIOSNetworkPlugin (= 0.182.0) + - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) + - hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`) + - libevent (~> 2.1.12) + - OpenSSL-Universal (= 1.1.1100) + - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) + - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) + - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) + - React (from `../node_modules/react-native/`) + - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`) + - React-Codegen (from `build/generated/ios`) + - React-Core (from `../node_modules/react-native/`) + - React-Core/DevSupport (from `../node_modules/react-native/`) + - React-Core/RCTWebSocket (from `../node_modules/react-native/`) + - React-CoreModules (from `../node_modules/react-native/React/CoreModules`) + - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`) + - React-debug (from `../node_modules/react-native/ReactCommon/react/debug`) + - React-hermes (from `../node_modules/react-native/ReactCommon/hermes`) + - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`) + - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`) + - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`) + - React-logger (from `../node_modules/react-native/ReactCommon/logger`) + - react-native-markdown-text-input (from `../..`) + - React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`) + - React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`) + - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`) + - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`) + - React-RCTAppDelegate (from `../node_modules/react-native/Libraries/AppDelegate`) + - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`) + - React-RCTImage (from `../node_modules/react-native/Libraries/Image`) + - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`) + - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`) + - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`) + - React-RCTText (from `../node_modules/react-native/Libraries/Text`) + - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) + - React-rncore (from `../node_modules/react-native/ReactCommon`) + - React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`) + - React-runtimescheduler (from `../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler`) + - React-utils (from `../node_modules/react-native/ReactCommon/react/utils`) + - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) + - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) + +SPEC REPOS: + trunk: + - CocoaAsyncSocket + - Flipper + - Flipper-Boost-iOSX + - Flipper-DoubleConversion + - Flipper-Fmt + - Flipper-Folly + - Flipper-Glog + - Flipper-PeerTalk + - FlipperKit + - fmt + - libevent + - OpenSSL-Universal + - SocketRocket + - YogaKit + +EXTERNAL SOURCES: + boost: + :podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec" + DoubleConversion: + :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" + FBLazyVector: + :path: "../node_modules/react-native/Libraries/FBLazyVector" + FBReactNativeSpec: + :path: "../node_modules/react-native/React/FBReactNativeSpec" + glog: + :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec" + hermes-engine: + :podspec: "../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec" + :tag: hermes-2023-08-07-RNv0.72.4-813b2def12bc9df02654b3e3653ae4a68d0572e0 + RCT-Folly: + :podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec" + RCTRequired: + :path: "../node_modules/react-native/Libraries/RCTRequired" + RCTTypeSafety: + :path: "../node_modules/react-native/Libraries/TypeSafety" + React: + :path: "../node_modules/react-native/" + React-callinvoker: + :path: "../node_modules/react-native/ReactCommon/callinvoker" + React-Codegen: + :path: build/generated/ios + React-Core: + :path: "../node_modules/react-native/" + React-CoreModules: + :path: "../node_modules/react-native/React/CoreModules" + React-cxxreact: + :path: "../node_modules/react-native/ReactCommon/cxxreact" + React-debug: + :path: "../node_modules/react-native/ReactCommon/react/debug" + React-hermes: + :path: "../node_modules/react-native/ReactCommon/hermes" + React-jsi: + :path: "../node_modules/react-native/ReactCommon/jsi" + React-jsiexecutor: + :path: "../node_modules/react-native/ReactCommon/jsiexecutor" + React-jsinspector: + :path: "../node_modules/react-native/ReactCommon/jsinspector" + React-logger: + :path: "../node_modules/react-native/ReactCommon/logger" + react-native-markdown-text-input: + :path: "../.." + React-NativeModulesApple: + :path: "../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios" + React-perflogger: + :path: "../node_modules/react-native/ReactCommon/reactperflogger" + React-RCTActionSheet: + :path: "../node_modules/react-native/Libraries/ActionSheetIOS" + React-RCTAnimation: + :path: "../node_modules/react-native/Libraries/NativeAnimation" + React-RCTAppDelegate: + :path: "../node_modules/react-native/Libraries/AppDelegate" + React-RCTBlob: + :path: "../node_modules/react-native/Libraries/Blob" + React-RCTImage: + :path: "../node_modules/react-native/Libraries/Image" + React-RCTLinking: + :path: "../node_modules/react-native/Libraries/LinkingIOS" + React-RCTNetwork: + :path: "../node_modules/react-native/Libraries/Network" + React-RCTSettings: + :path: "../node_modules/react-native/Libraries/Settings" + React-RCTText: + :path: "../node_modules/react-native/Libraries/Text" + React-RCTVibration: + :path: "../node_modules/react-native/Libraries/Vibration" + React-rncore: + :path: "../node_modules/react-native/ReactCommon" + React-runtimeexecutor: + :path: "../node_modules/react-native/ReactCommon/runtimeexecutor" + React-runtimescheduler: + :path: "../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler" + React-utils: + :path: "../node_modules/react-native/ReactCommon/react/utils" + ReactCommon: + :path: "../node_modules/react-native/ReactCommon" + Yoga: + :path: "../node_modules/react-native/ReactCommon/yoga" + +SPEC CHECKSUMS: + boost: 57d2868c099736d80fcd648bf211b4431e51a558 + CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 + DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 + FBLazyVector: 5fbbff1d7734827299274638deb8ba3024f6c597 + FBReactNativeSpec: 638095fe8a01506634d77b260ef8a322019ac671 + Flipper: 6edb735e6c3e332975d1b17956bcc584eccf5818 + Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c + Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30 + Flipper-Fmt: 60cbdd92fc254826e61d669a5d87ef7015396a9b + Flipper-Folly: 584845625005ff068a6ebf41f857f468decd26b3 + Flipper-Glog: 70c50ce58ddaf67dc35180db05f191692570f446 + Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 + FlipperKit: 2efad7007d6745a3f95e4034d547be637f89d3f6 + fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 + glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b + hermes-engine: 9180d43df05c1ed658a87cc733dc3044cf90c00a + libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 + OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c + RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 + RCTRequired: 83bca1c184feb4d2e51c72c8369b83d641443f95 + RCTTypeSafety: 13c4a87a16d7db6cd66006ce9759f073402ef85b + React: e67aa9f99957c7611c392b5e49355d877d6525e2 + React-callinvoker: 2790c09d964c2e5404b5410cde91b152e3746b7b + React-Codegen: e6e05e105ca7cdb990f4d609985a2a689d8d0653 + React-Core: 9283f1e7d0d5e3d33ad298547547b1b43912534c + React-CoreModules: 6312c9b2fec4329d9ae6a2b8c350032d1664c51b + React-cxxreact: 7da72565656c8ac7f97c9a031d0b199bbdec0640 + React-debug: 4accb2b9dc09b575206d2c42f4082990a52ae436 + React-hermes: 1299a94f255f59a72d5baa54a2ca2e1eee104947 + React-jsi: 2208de64c3a41714ac04e86975386fc49116ea13 + React-jsiexecutor: c49502e5d02112247ee4526bc3ccfc891ae3eb9b + React-jsinspector: 8baadae51f01d867c3921213a25ab78ab4fbcd91 + React-logger: 8edc785c47c8686c7962199a307015e2ce9a0e4f + react-native-markdown-text-input: a3cb99c7c696c22d1359ffb1adb70312594baecf + React-NativeModulesApple: b6868ee904013a7923128892ee4a032498a1024a + React-perflogger: 31ea61077185eb1428baf60c0db6e2886f141a5a + React-RCTActionSheet: 392090a3abc8992eb269ef0eaa561750588fc39d + React-RCTAnimation: 4b3cc6a29474bc0d78c4f04b52ab59bf760e8a9b + React-RCTAppDelegate: 89b015b29885109addcabecdf3b2e833905437c7 + React-RCTBlob: 3e23dcbe6638897b5605e46d0d62955d78e8d27b + React-RCTImage: 8a5d339d614a90a183fc1b8b6a7eb44e2e703943 + React-RCTLinking: b37dfbf646d77c326f9eae094b1fcd575b1c24c7 + React-RCTNetwork: 8bed9b2461c7d8a7d14e63df9b16181c448beebc + React-RCTSettings: 506a5f09a455123a8873801b70aa7b4010b76b01 + React-RCTText: 3c71ecaad8ee010b79632ea2590f86c02f5cce17 + React-RCTVibration: d1b78ca38f61ea4b3e9ebb2ddbd0b5662631d99b + React-rncore: bfc2f6568b6fecbae6f2f774e95c60c3c9e95bf2 + React-runtimeexecutor: 47b0a2d5bbb416db65ef881a6f7bdcfefa0001ab + React-runtimescheduler: 7649c3b46c8dee1853691ecf60146a16ae59253c + React-utils: 56838edeaaf651220d1e53cd0b8934fb8ce68415 + ReactCommon: 5f704096ccf7733b390f59043b6fa9cc180ee4f6 + SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 + Yoga: 4c3aa327e4a6a23eeacd71f61c81df1bcdf677d5 + YogaKit: f782866e155069a2cca2517aafea43200b01fd5a + +PODFILE CHECKSUM: 06ce56e7f3f4d1290d4bfa0931021afac246266d + +COCOAPODS: 1.14.2 diff --git a/example/package.json b/example/package.json index 605e6769..3345924e 100644 --- a/example/package.json +++ b/example/package.json @@ -18,8 +18,8 @@ "@babel/preset-env": "^7.20.0", "@babel/runtime": "^7.20.0", "@react-native/metro-config": "^0.72.11", - "metro-react-native-babel-preset": "0.76.8", "babel-plugin-module-resolver": "^5.0.0", + "metro-react-native-babel-preset": "0.76.8", "pod-install": "^0.1.0" }, "engines": { diff --git a/example/src/App.tsx b/example/src/App.tsx index 0a3df1b3..0a2ab12d 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -1,12 +1,28 @@ import * as React from 'react'; -import { StyleSheet, View } from 'react-native'; -import { MarkdownTextInputView } from 'react-native-markdown-text-input'; +import { Button, StyleSheet, Text, TextInput, View } from 'react-native'; + +import { MarkdownTextInput } from 'react-native-markdown-text-input'; export default function App() { + const [value, setValue] = React.useState('Hello, *world*!'); + + // TODO: use MarkdownTextInput ref instead of TextInput ref + const ref = React.useRef(null); + return ( - + + {JSON.stringify(value)} +