From b5310dbd3b413d9c1d4aa9b68a2cb9b83ef542f3 Mon Sep 17 00:00:00 2001 From: wxik Date: Thu, 20 Apr 2023 19:13:17 +0800 Subject: [PATCH] feat: CHANGELOG.md & code format --- CHANGELOG.md | 1 + examples/ios/Podfile.lock | 442 +++++++++++++------------- examples/package.json | 13 +- examples/src/App.tsx | 6 +- examples/src/emoji.tsx | 416 ++++++++++++------------- examples/src/example.tsx | 17 +- examples/src/preview.tsx | 2 +- examples/tsconfig.json | 3 +- examples/yarn.lock | 239 +++++++++----- index.d.ts | 635 +++++++++++++++++++++----------------- src/RichToolbar.js | 489 ++++++++++++++--------------- src/const.js | 142 ++++----- 12 files changed, 1285 insertions(+), 1120 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f53203..bc22b86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - [Fix nested tags when using p separator](https://github.com/wxik/react-native-rich-editor/pull/244) - [feat: Add injectJavascript method](https://github.com/wxik/react-native-rich-editor/pull/307) - [feat(toolbar): get current color, font size and background color from editor](https://github.com/wxik/react-native-rich-editor/pull/260) +- [Link click handler](https://github.com/wxik/react-native-rich-editor/pull/240) # 1.8.9 ### Fix diff --git a/examples/ios/Podfile.lock b/examples/ios/Podfile.lock index 5154227..c9b31e1 100644 --- a/examples/ios/Podfile.lock +++ b/examples/ios/Podfile.lock @@ -2,14 +2,14 @@ PODS: - boost (1.76.0) - CocoaAsyncSocket (7.6.5) - DoubleConversion (1.1.6) - - FBLazyVector (0.71.5) - - FBReactNativeSpec (0.71.5): + - FBLazyVector (0.71.7) + - FBReactNativeSpec (0.71.7): - RCT-Folly (= 2021.07.22.00) - - RCTRequired (= 0.71.5) - - RCTTypeSafety (= 0.71.5) - - React-Core (= 0.71.5) - - React-jsi (= 0.71.5) - - ReactCommon/turbomodule/core (= 0.71.5) + - RCTRequired (= 0.71.7) + - RCTTypeSafety (= 0.71.7) + - React-Core (= 0.71.7) + - React-jsi (= 0.71.7) + - ReactCommon/turbomodule/core (= 0.71.7) - Flipper (0.125.0): - Flipper-Folly (~> 2.6) - Flipper-RSocket (~> 1.4) @@ -95,26 +95,26 @@ PODS: - fmt (~> 6.2.1) - glog - libevent - - RCTRequired (0.71.5) - - RCTTypeSafety (0.71.5): - - FBLazyVector (= 0.71.5) - - RCTRequired (= 0.71.5) - - React-Core (= 0.71.5) - - React (0.71.5): - - React-Core (= 0.71.5) - - React-Core/DevSupport (= 0.71.5) - - React-Core/RCTWebSocket (= 0.71.5) - - React-RCTActionSheet (= 0.71.5) - - React-RCTAnimation (= 0.71.5) - - React-RCTBlob (= 0.71.5) - - React-RCTImage (= 0.71.5) - - React-RCTLinking (= 0.71.5) - - React-RCTNetwork (= 0.71.5) - - React-RCTSettings (= 0.71.5) - - React-RCTText (= 0.71.5) - - React-RCTVibration (= 0.71.5) - - React-callinvoker (0.71.5) - - React-Codegen (0.71.5): + - RCTRequired (0.71.7) + - RCTTypeSafety (0.71.7): + - FBLazyVector (= 0.71.7) + - RCTRequired (= 0.71.7) + - React-Core (= 0.71.7) + - React (0.71.7): + - React-Core (= 0.71.7) + - React-Core/DevSupport (= 0.71.7) + - React-Core/RCTWebSocket (= 0.71.7) + - React-RCTActionSheet (= 0.71.7) + - React-RCTAnimation (= 0.71.7) + - React-RCTBlob (= 0.71.7) + - React-RCTImage (= 0.71.7) + - React-RCTLinking (= 0.71.7) + - React-RCTNetwork (= 0.71.7) + - React-RCTSettings (= 0.71.7) + - React-RCTText (= 0.71.7) + - React-RCTVibration (= 0.71.7) + - React-callinvoker (0.71.7) + - React-Codegen (0.71.7): - FBReactNativeSpec - hermes-engine - RCT-Folly @@ -125,296 +125,296 @@ PODS: - React-jsiexecutor - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - React-Core (0.71.5): + - React-Core (0.71.7): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-Core/Default (= 0.71.5) - - React-cxxreact (= 0.71.5) + - React-Core/Default (= 0.71.7) + - React-cxxreact (= 0.71.7) - React-hermes - - React-jsi (= 0.71.5) - - React-jsiexecutor (= 0.71.5) - - React-perflogger (= 0.71.5) + - React-jsi (= 0.71.7) + - React-jsiexecutor (= 0.71.7) + - React-perflogger (= 0.71.7) - Yoga - - React-Core/CoreModulesHeaders (0.71.5): + - React-Core/CoreModulesHeaders (0.71.7): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.5) + - React-cxxreact (= 0.71.7) - React-hermes - - React-jsi (= 0.71.5) - - React-jsiexecutor (= 0.71.5) - - React-perflogger (= 0.71.5) + - React-jsi (= 0.71.7) + - React-jsiexecutor (= 0.71.7) + - React-perflogger (= 0.71.7) - Yoga - - React-Core/Default (0.71.5): + - React-Core/Default (0.71.7): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-cxxreact (= 0.71.5) + - React-cxxreact (= 0.71.7) - React-hermes - - React-jsi (= 0.71.5) - - React-jsiexecutor (= 0.71.5) - - React-perflogger (= 0.71.5) + - React-jsi (= 0.71.7) + - React-jsiexecutor (= 0.71.7) + - React-perflogger (= 0.71.7) - Yoga - - React-Core/DevSupport (0.71.5): + - React-Core/DevSupport (0.71.7): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-Core/Default (= 0.71.5) - - React-Core/RCTWebSocket (= 0.71.5) - - React-cxxreact (= 0.71.5) + - React-Core/Default (= 0.71.7) + - React-Core/RCTWebSocket (= 0.71.7) + - React-cxxreact (= 0.71.7) - React-hermes - - React-jsi (= 0.71.5) - - React-jsiexecutor (= 0.71.5) - - React-jsinspector (= 0.71.5) - - React-perflogger (= 0.71.5) + - React-jsi (= 0.71.7) + - React-jsiexecutor (= 0.71.7) + - React-jsinspector (= 0.71.7) + - React-perflogger (= 0.71.7) - Yoga - - React-Core/RCTActionSheetHeaders (0.71.5): + - React-Core/RCTActionSheetHeaders (0.71.7): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.5) + - React-cxxreact (= 0.71.7) - React-hermes - - React-jsi (= 0.71.5) - - React-jsiexecutor (= 0.71.5) - - React-perflogger (= 0.71.5) + - React-jsi (= 0.71.7) + - React-jsiexecutor (= 0.71.7) + - React-perflogger (= 0.71.7) - Yoga - - React-Core/RCTAnimationHeaders (0.71.5): + - React-Core/RCTAnimationHeaders (0.71.7): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.5) + - React-cxxreact (= 0.71.7) - React-hermes - - React-jsi (= 0.71.5) - - React-jsiexecutor (= 0.71.5) - - React-perflogger (= 0.71.5) + - React-jsi (= 0.71.7) + - React-jsiexecutor (= 0.71.7) + - React-perflogger (= 0.71.7) - Yoga - - React-Core/RCTBlobHeaders (0.71.5): + - React-Core/RCTBlobHeaders (0.71.7): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.5) + - React-cxxreact (= 0.71.7) - React-hermes - - React-jsi (= 0.71.5) - - React-jsiexecutor (= 0.71.5) - - React-perflogger (= 0.71.5) + - React-jsi (= 0.71.7) + - React-jsiexecutor (= 0.71.7) + - React-perflogger (= 0.71.7) - Yoga - - React-Core/RCTImageHeaders (0.71.5): + - React-Core/RCTImageHeaders (0.71.7): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.5) + - React-cxxreact (= 0.71.7) - React-hermes - - React-jsi (= 0.71.5) - - React-jsiexecutor (= 0.71.5) - - React-perflogger (= 0.71.5) + - React-jsi (= 0.71.7) + - React-jsiexecutor (= 0.71.7) + - React-perflogger (= 0.71.7) - Yoga - - React-Core/RCTLinkingHeaders (0.71.5): + - React-Core/RCTLinkingHeaders (0.71.7): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.5) + - React-cxxreact (= 0.71.7) - React-hermes - - React-jsi (= 0.71.5) - - React-jsiexecutor (= 0.71.5) - - React-perflogger (= 0.71.5) + - React-jsi (= 0.71.7) + - React-jsiexecutor (= 0.71.7) + - React-perflogger (= 0.71.7) - Yoga - - React-Core/RCTNetworkHeaders (0.71.5): + - React-Core/RCTNetworkHeaders (0.71.7): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.5) + - React-cxxreact (= 0.71.7) - React-hermes - - React-jsi (= 0.71.5) - - React-jsiexecutor (= 0.71.5) - - React-perflogger (= 0.71.5) + - React-jsi (= 0.71.7) + - React-jsiexecutor (= 0.71.7) + - React-perflogger (= 0.71.7) - Yoga - - React-Core/RCTSettingsHeaders (0.71.5): + - React-Core/RCTSettingsHeaders (0.71.7): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.5) + - React-cxxreact (= 0.71.7) - React-hermes - - React-jsi (= 0.71.5) - - React-jsiexecutor (= 0.71.5) - - React-perflogger (= 0.71.5) + - React-jsi (= 0.71.7) + - React-jsiexecutor (= 0.71.7) + - React-perflogger (= 0.71.7) - Yoga - - React-Core/RCTTextHeaders (0.71.5): + - React-Core/RCTTextHeaders (0.71.7): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.5) + - React-cxxreact (= 0.71.7) - React-hermes - - React-jsi (= 0.71.5) - - React-jsiexecutor (= 0.71.5) - - React-perflogger (= 0.71.5) + - React-jsi (= 0.71.7) + - React-jsiexecutor (= 0.71.7) + - React-perflogger (= 0.71.7) - Yoga - - React-Core/RCTVibrationHeaders (0.71.5): + - React-Core/RCTVibrationHeaders (0.71.7): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.5) + - React-cxxreact (= 0.71.7) - React-hermes - - React-jsi (= 0.71.5) - - React-jsiexecutor (= 0.71.5) - - React-perflogger (= 0.71.5) + - React-jsi (= 0.71.7) + - React-jsiexecutor (= 0.71.7) + - React-perflogger (= 0.71.7) - Yoga - - React-Core/RCTWebSocket (0.71.5): + - React-Core/RCTWebSocket (0.71.7): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-Core/Default (= 0.71.5) - - React-cxxreact (= 0.71.5) + - React-Core/Default (= 0.71.7) + - React-cxxreact (= 0.71.7) - React-hermes - - React-jsi (= 0.71.5) - - React-jsiexecutor (= 0.71.5) - - React-perflogger (= 0.71.5) + - React-jsi (= 0.71.7) + - React-jsiexecutor (= 0.71.7) + - React-perflogger (= 0.71.7) - Yoga - - React-CoreModules (0.71.5): + - React-CoreModules (0.71.7): - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.71.5) - - React-Codegen (= 0.71.5) - - React-Core/CoreModulesHeaders (= 0.71.5) - - React-jsi (= 0.71.5) + - RCTTypeSafety (= 0.71.7) + - React-Codegen (= 0.71.7) + - React-Core/CoreModulesHeaders (= 0.71.7) + - React-jsi (= 0.71.7) - React-RCTBlob - - React-RCTImage (= 0.71.5) - - ReactCommon/turbomodule/core (= 0.71.5) - - React-cxxreact (0.71.5): + - React-RCTImage (= 0.71.7) + - ReactCommon/turbomodule/core (= 0.71.7) + - React-cxxreact (0.71.7): - boost (= 1.76.0) - DoubleConversion - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-callinvoker (= 0.71.5) - - React-jsi (= 0.71.5) - - React-jsinspector (= 0.71.5) - - React-logger (= 0.71.5) - - React-perflogger (= 0.71.5) - - React-runtimeexecutor (= 0.71.5) - - React-hermes (0.71.5): + - React-callinvoker (= 0.71.7) + - React-jsi (= 0.71.7) + - React-jsinspector (= 0.71.7) + - React-logger (= 0.71.7) + - React-perflogger (= 0.71.7) + - React-runtimeexecutor (= 0.71.7) + - React-hermes (0.71.7): - DoubleConversion - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - RCT-Folly/Futures (= 2021.07.22.00) - - React-cxxreact (= 0.71.5) + - React-cxxreact (= 0.71.7) - React-jsi - - React-jsiexecutor (= 0.71.5) - - React-jsinspector (= 0.71.5) - - React-perflogger (= 0.71.5) - - React-jsi (0.71.5): + - React-jsiexecutor (= 0.71.7) + - React-jsinspector (= 0.71.7) + - React-perflogger (= 0.71.7) + - React-jsi (0.71.7): - boost (= 1.76.0) - DoubleConversion - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-jsiexecutor (0.71.5): + - React-jsiexecutor (0.71.7): - DoubleConversion - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-cxxreact (= 0.71.5) - - React-jsi (= 0.71.5) - - React-perflogger (= 0.71.5) - - React-jsinspector (0.71.5) - - React-logger (0.71.5): + - React-cxxreact (= 0.71.7) + - React-jsi (= 0.71.7) + - React-perflogger (= 0.71.7) + - React-jsinspector (0.71.7) + - React-logger (0.71.7): - glog - react-native-webview (11.26.1): - React-Core - - React-perflogger (0.71.5) - - React-RCTActionSheet (0.71.5): - - React-Core/RCTActionSheetHeaders (= 0.71.5) - - React-RCTAnimation (0.71.5): + - React-perflogger (0.71.7) + - React-RCTActionSheet (0.71.7): + - React-Core/RCTActionSheetHeaders (= 0.71.7) + - React-RCTAnimation (0.71.7): - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.71.5) - - React-Codegen (= 0.71.5) - - React-Core/RCTAnimationHeaders (= 0.71.5) - - React-jsi (= 0.71.5) - - ReactCommon/turbomodule/core (= 0.71.5) - - React-RCTAppDelegate (0.71.5): + - RCTTypeSafety (= 0.71.7) + - React-Codegen (= 0.71.7) + - React-Core/RCTAnimationHeaders (= 0.71.7) + - React-jsi (= 0.71.7) + - ReactCommon/turbomodule/core (= 0.71.7) + - React-RCTAppDelegate (0.71.7): - RCT-Folly - RCTRequired - RCTTypeSafety - React-Core - ReactCommon/turbomodule/core - - React-RCTBlob (0.71.5): + - React-RCTBlob (0.71.7): - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-Codegen (= 0.71.5) - - React-Core/RCTBlobHeaders (= 0.71.5) - - React-Core/RCTWebSocket (= 0.71.5) - - React-jsi (= 0.71.5) - - React-RCTNetwork (= 0.71.5) - - ReactCommon/turbomodule/core (= 0.71.5) - - React-RCTImage (0.71.5): + - React-Codegen (= 0.71.7) + - React-Core/RCTBlobHeaders (= 0.71.7) + - React-Core/RCTWebSocket (= 0.71.7) + - React-jsi (= 0.71.7) + - React-RCTNetwork (= 0.71.7) + - ReactCommon/turbomodule/core (= 0.71.7) + - React-RCTImage (0.71.7): - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.71.5) - - React-Codegen (= 0.71.5) - - React-Core/RCTImageHeaders (= 0.71.5) - - React-jsi (= 0.71.5) - - React-RCTNetwork (= 0.71.5) - - ReactCommon/turbomodule/core (= 0.71.5) - - React-RCTLinking (0.71.5): - - React-Codegen (= 0.71.5) - - React-Core/RCTLinkingHeaders (= 0.71.5) - - React-jsi (= 0.71.5) - - ReactCommon/turbomodule/core (= 0.71.5) - - React-RCTNetwork (0.71.5): + - RCTTypeSafety (= 0.71.7) + - React-Codegen (= 0.71.7) + - React-Core/RCTImageHeaders (= 0.71.7) + - React-jsi (= 0.71.7) + - React-RCTNetwork (= 0.71.7) + - ReactCommon/turbomodule/core (= 0.71.7) + - React-RCTLinking (0.71.7): + - React-Codegen (= 0.71.7) + - React-Core/RCTLinkingHeaders (= 0.71.7) + - React-jsi (= 0.71.7) + - ReactCommon/turbomodule/core (= 0.71.7) + - React-RCTNetwork (0.71.7): - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.71.5) - - React-Codegen (= 0.71.5) - - React-Core/RCTNetworkHeaders (= 0.71.5) - - React-jsi (= 0.71.5) - - ReactCommon/turbomodule/core (= 0.71.5) - - React-RCTSettings (0.71.5): + - RCTTypeSafety (= 0.71.7) + - React-Codegen (= 0.71.7) + - React-Core/RCTNetworkHeaders (= 0.71.7) + - React-jsi (= 0.71.7) + - ReactCommon/turbomodule/core (= 0.71.7) + - React-RCTSettings (0.71.7): - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.71.5) - - React-Codegen (= 0.71.5) - - React-Core/RCTSettingsHeaders (= 0.71.5) - - React-jsi (= 0.71.5) - - ReactCommon/turbomodule/core (= 0.71.5) - - React-RCTText (0.71.5): - - React-Core/RCTTextHeaders (= 0.71.5) - - React-RCTVibration (0.71.5): + - RCTTypeSafety (= 0.71.7) + - React-Codegen (= 0.71.7) + - React-Core/RCTSettingsHeaders (= 0.71.7) + - React-jsi (= 0.71.7) + - ReactCommon/turbomodule/core (= 0.71.7) + - React-RCTText (0.71.7): + - React-Core/RCTTextHeaders (= 0.71.7) + - React-RCTVibration (0.71.7): - RCT-Folly (= 2021.07.22.00) - - React-Codegen (= 0.71.5) - - React-Core/RCTVibrationHeaders (= 0.71.5) - - React-jsi (= 0.71.5) - - ReactCommon/turbomodule/core (= 0.71.5) - - React-runtimeexecutor (0.71.5): - - React-jsi (= 0.71.5) - - ReactCommon/turbomodule/bridging (0.71.5): + - React-Codegen (= 0.71.7) + - React-Core/RCTVibrationHeaders (= 0.71.7) + - React-jsi (= 0.71.7) + - ReactCommon/turbomodule/core (= 0.71.7) + - React-runtimeexecutor (0.71.7): + - React-jsi (= 0.71.7) + - ReactCommon/turbomodule/bridging (0.71.7): - DoubleConversion - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-callinvoker (= 0.71.5) - - React-Core (= 0.71.5) - - React-cxxreact (= 0.71.5) - - React-jsi (= 0.71.5) - - React-logger (= 0.71.5) - - React-perflogger (= 0.71.5) - - ReactCommon/turbomodule/core (0.71.5): + - React-callinvoker (= 0.71.7) + - React-Core (= 0.71.7) + - React-cxxreact (= 0.71.7) + - React-jsi (= 0.71.7) + - React-logger (= 0.71.7) + - React-perflogger (= 0.71.7) + - ReactCommon/turbomodule/core (0.71.7): - DoubleConversion - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-callinvoker (= 0.71.5) - - React-Core (= 0.71.5) - - React-cxxreact (= 0.71.5) - - React-jsi (= 0.71.5) - - React-logger (= 0.71.5) - - React-perflogger (= 0.71.5) + - React-callinvoker (= 0.71.7) + - React-Core (= 0.71.7) + - React-cxxreact (= 0.71.7) + - React-jsi (= 0.71.7) + - React-logger (= 0.71.7) + - React-perflogger (= 0.71.7) - SocketRocket (0.6.0) - Yoga (1.14.0) - YogaKit (1.18.1): @@ -576,8 +576,8 @@ SPEC CHECKSUMS: boost: 57d2868c099736d80fcd648bf211b4431e51a558 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 - FBLazyVector: f1897022b53abf1469d6ad692ee2c69f57d967f3 - FBReactNativeSpec: 627fd07f1b9d498c9fa572e76d7f1a6b1ee9a444 + FBLazyVector: a89a0525bc7ca174675045c2b492b5280d5a2470 + FBReactNativeSpec: 7714e6bc1e9ea23df6c4cb42f0b2fd9c6a3a559c Flipper: 26fc4b7382499f1281eb8cb921e5c3ad6de91fe0 Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30 @@ -593,35 +593,35 @@ SPEC CHECKSUMS: libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 - RCTRequired: bd6045fbd511da5efe6db89eecb21e4e36bd7cbf - RCTTypeSafety: c06d9f906faa69dd1c88223204c3a24767725fd8 - React: b9ea33557ef1372af247f95d110fbdea114ed3b2 - React-callinvoker: 112f941fcb98722c72736b8e229edcb3c1d84b45 - React-Codegen: df704c74e2563b0f73fa44f533b6bfef6534ae81 - React-Core: c40d8ec76944536e6d4f8306cbda17a7c254585c - React-CoreModules: 7dec7d883bf29bd0d753a93f37326e3031f8f546 - React-cxxreact: 63154d7b113bd6e74ae221c1091e10591d7ae651 - React-hermes: 187e42638c92a54ad7d270079dda4d59cf8c7229 - React-jsi: 6a633d20f5bb094d8f43c3f23c03f724acab005e - React-jsiexecutor: 1579bf3207afadc72ac3638a66a102d1bf5263e3 - React-jsinspector: 14a342151ab810862998dfc99e2720746734e9b3 - React-logger: 94ec392ae471683635e4bf874d4e82f675399d2d + RCTRequired: 5a4a30ac20c86eeadd6844a9328f78d4168cf9b2 + RCTTypeSafety: 279fc5861a89f0f37db3a585f27f971485b4b734 + React: 88307a9be3bd0e71a6822271cf28b84a587fb97f + React-callinvoker: 35fb980c454104ebe82f0afb9826830089248e08 + React-Codegen: a8dbde3b7476d5c19437d2adb9e8ea1b426b9595 + React-Core: 385cb6fa78762c6409ff39faeb0dd9ad664b6e84 + React-CoreModules: c2b7db313b04d9b71954ffd55d0c2e46bc40e9fb + React-cxxreact: 845fefb889132e5d004ff818f7a599e32c52e7d6 + React-hermes: 86135f35e1dd2dfccfb97afe96d0c06f6a3970c4 + React-jsi: 39c116aa6c3d6f3d9874eff6998a670b47882a28 + React-jsiexecutor: eaa5f71eb8f6861cf0e57f1a0f52aeb020d9e18e + React-jsinspector: 9885f6f94d231b95a739ef7bb50536fb87ce7539 + React-logger: 3f8ebad1be1bf3299d1ab6d7f971802d7395c7ef react-native-webview: 9f111dfbcfc826084d6c507f569e5e03342ee1c1 - React-perflogger: 883a55a9a899535eaf06d0029108ef9ef22cce92 - React-RCTActionSheet: 1a3b8416688a3d291367be645022886f71d6842a - React-RCTAnimation: e5560cb72d91ba35151d51e2eb0d467b42763f43 - React-RCTAppDelegate: 07a38817f7b30447eb4416384f430812e7c30551 - React-RCTBlob: 1ef41cdcc5bf8761b0a11a5c3be588f4787f8845 - React-RCTImage: 944297be6fcc0bac7cfe1afb7d2f4f346c2592cd - React-RCTLinking: 0dd37faa7222e8f840edb83cbdd2a68f130ebdf1 - React-RCTNetwork: 481afbec12d5a60aac319593797c590464234fcd - React-RCTSettings: f308db1e99737d776cce43732b5bd38c973cfa2c - React-RCTText: 402f609ee727f2dbbf5af8ce1692c64d8c1c17cc - React-RCTVibration: f0f5ad6417803de42e022d99247a6b1ddaf46c13 - React-runtimeexecutor: 511f4301d85daf85abface9afb8d2df2d49f87d3 - ReactCommon: 4f43b72066f27bfe1f63838c61763f59e7112536 + React-perflogger: 2d505bbe298e3b7bacdd9e542b15535be07220f6 + React-RCTActionSheet: 0e96e4560bd733c9b37efbf68f5b1a47615892fb + React-RCTAnimation: fd138e26f120371c87e406745a27535e2c8a04ef + React-RCTAppDelegate: 4a9fd1230a98dc3d4382f8a934dc9f50834d8335 + React-RCTBlob: 38a7185f06a0ce8153a023e63b406a28d67b955d + React-RCTImage: 92b0966e7c1cadda889e961c474397ad5180e194 + React-RCTLinking: b80f8d0c6e94c54294b0048def51f57eaa9a27af + React-RCTNetwork: 491b0c65ac22edbd6695d12d084b4943103b009b + React-RCTSettings: 97af3e8abe0023349ec015910df3bda1a0380117 + React-RCTText: 33c85753bd714d527d2ae538dc56ec24c6783d84 + React-RCTVibration: 08f132cad9896458776f37c112e71d60aef1c6ae + React-runtimeexecutor: c5c89f8f543842dd864b63ded1b0bbb9c9445328 + ReactCommon: dbfbe2f7f3c5ce4ce44f43f2fd0d5950d1eb67c5 SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608 - Yoga: cd7d7f509dbfac14ee7f31a6c750acb957cd5022 + Yoga: d56980c8914db0b51692f55533409e844b66133c YogaKit: f782866e155069a2cca2517aafea43200b01fd5a PODFILE CHECKSUM: 03c918bb558f905021dccf53ce93aa666d4cf21d diff --git a/examples/package.json b/examples/package.json index 3cf8ab3..ff012d9 100644 --- a/examples/package.json +++ b/examples/package.json @@ -11,23 +11,24 @@ }, "dependencies": { "@wxik/core": "^0.5.5", + "react-native-pell-rich-editor": "link:../", "react": "18.2.0", - "react-native": "0.71.5", + "react-native": "0.71.7", "react-native-iphone-x-helper": "^1.3.1", "react-native-modal": "^13.0.1", "react-native-webview": "11.26.1" }, "devDependencies": { - "@babel/core": "^7.21.3", + "@babel/core": "^7.21.4", "@babel/plugin-proposal-function-bind": "^7.18.9", - "@babel/preset-env": "^7.20.2", + "@babel/preset-env": "^7.21.4", "@babel/runtime": "^7.21.0", "@react-native-community/eslint-config": "^3.2.0", "@tsconfig/react-native": "^2.0.3", - "@types/react": "^18.0.31", - "@types/react-native": "^0.71.5", + "@types/react": "^18.0.37", + "@types/react-native": "^0.71.6", "babel-plugin-module-resolver": "^5.0.0", - "eslint": "^8.37.0", + "eslint": "^8.38.0", "metro-react-native-babel-preset": "0.73.9", "prettier": "^2.8.7", "typescript": "4.9.5" diff --git a/examples/src/App.tsx b/examples/src/App.tsx index 3e3f544..f4620e2 100644 --- a/examples/src/App.tsx +++ b/examples/src/App.tsx @@ -3,7 +3,7 @@ * https://github.com/facebook/react-native */ -import {FC, useMemo, useState} from 'react'; +import React, {FC, useMemo, useState} from 'react'; import {Example} from './example'; import {Welcome} from './welcome'; import {Preview} from './preview'; @@ -21,7 +21,7 @@ const App: FC = () => { const [routeKey, setRouteKey] = useState('index'); const [args, setArgs] = useState>({}); - const handleFuc = useMemo(() => { + const handleFuc = useMemo(() => { return { push: (key: RouteKeyType, params: Record) => { if (Routes[key]) { @@ -29,7 +29,7 @@ const App: FC = () => { setArgs(params); } }, - }; + } as INavigation; }, []); const Comp = Routes[routeKey]; return ; diff --git a/examples/src/emoji.tsx b/examples/src/emoji.tsx index ba9278a..405293f 100644 --- a/examples/src/emoji.tsx +++ b/examples/src/emoji.tsx @@ -6,218 +6,218 @@ import React from 'react'; import {View, Text, StyleSheet, Dimensions} from 'react-native'; interface IProps { - onSelect: (value: string) => void; + onSelect: (value: string) => void; } export function EmojiView(props: IProps) { - const {onSelect} = props; - return ( - - onSelect('๐Ÿ˜ƒ')}> - ๐Ÿ˜ƒ - - onSelect('๐Ÿ˜„')}> - ๐Ÿ˜„ - - onSelect('๐Ÿ˜')}> - ๐Ÿ˜ - - onSelect('๐Ÿ˜†')}> - ๐Ÿ˜† - - onSelect('๐Ÿ˜…')}> - ๐Ÿ˜… - - onSelect('๐Ÿ˜‚')}> - ๐Ÿ˜‚ - - onSelect('๐Ÿคฃ')}> - ๐Ÿคฃ - - onSelect('๐Ÿ˜Š')}> - ๐Ÿ˜Š - - onSelect('๐Ÿ˜‡')}> - ๐Ÿ˜‡ - - onSelect('๐Ÿ™‚')}> - ๐Ÿ™‚ - - onSelect('๐Ÿ™ƒ')}> - ๐Ÿ™ƒ - - onSelect('๐Ÿ˜‰')}> - ๐Ÿ˜‰ - - onSelect('๐Ÿ˜Œ')}> - ๐Ÿ˜Œ - - onSelect('๐Ÿ˜')}> - ๐Ÿ˜ - - onSelect('๐Ÿฅฐ')}> - ๐Ÿฅฐ - - onSelect('๐Ÿ˜˜')}> - ๐Ÿ˜˜ - - onSelect('๐Ÿ˜—')}> - ๐Ÿ˜— - - onSelect('๐Ÿ˜™')}> - ๐Ÿ˜™ - - onSelect('๐Ÿ˜š')}> - ๐Ÿ˜š - - onSelect('๐Ÿ˜‹')}> - ๐Ÿ˜‹ - - onSelect('๐Ÿ˜›')}> - ๐Ÿ˜› - - onSelect('๐Ÿ˜')}> - ๐Ÿ˜ - - onSelect('๐Ÿ˜œ')}> - ๐Ÿ˜œ - - onSelect('๐Ÿคช')}> - ๐Ÿคช - - onSelect('๐Ÿคจ')}> - ๐Ÿคจ - - onSelect('๐Ÿง')}> - ๐Ÿง - - onSelect('๐Ÿค“')}> - ๐Ÿค“ - - onSelect('๐Ÿ˜Ž')}> - ๐Ÿ˜Ž - - onSelect('๐Ÿคฉ')}> - ๐Ÿคฉ - - onSelect('๐Ÿฅณ')}> - ๐Ÿฅณ - - onSelect('๐Ÿ˜')}> - ๐Ÿ˜ - - onSelect('๐Ÿ˜’')}> - ๐Ÿ˜’ - - onSelect('๐Ÿ˜ž')}> - ๐Ÿ˜ž - - onSelect('๐Ÿ˜”')}> - ๐Ÿ˜” - - onSelect('๐Ÿ˜Ÿ')}> - ๐Ÿ˜Ÿ - - onSelect('๐Ÿ˜•')}> - ๐Ÿ˜• - - onSelect('๐Ÿ™')}> - ๐Ÿ™ - - onSelect('๐Ÿ˜ฃ')}> - ๐Ÿ˜ฃ - - onSelect('๐Ÿ˜–')}> - ๐Ÿ˜– - - onSelect('๐Ÿ˜ซ')}> - ๐Ÿ˜ซ - - onSelect('๐Ÿ˜ฉ')}> - ๐Ÿ˜ฉ - - onSelect('๐Ÿฅบ')}> - ๐Ÿฅบ - - onSelect('๐Ÿ˜ข')}> - ๐Ÿ˜ข - - onSelect('๐Ÿ˜ญ')}> - ๐Ÿ˜ญ - - onSelect('๐Ÿ˜ค')}> - ๐Ÿ˜ค - - onSelect('๐Ÿ˜ ')}> - ๐Ÿ˜  - - onSelect('๐Ÿ˜ก')}> - ๐Ÿ˜ก - - onSelect('๐Ÿคฌ')}> - ๐Ÿคฌ - - onSelect('๐Ÿคฏ')}> - ๐Ÿคฏ - - onSelect('๐Ÿ˜ณ')}> - ๐Ÿ˜ณ - - onSelect('๐Ÿฅต')}> - ๐Ÿฅต - - onSelect('๐Ÿฅถ')}> - ๐Ÿฅถ - - onSelect('๐Ÿ˜ฑ')}> - ๐Ÿ˜ฑ - - onSelect('๐Ÿ˜จ')}> - ๐Ÿ˜จ - - onSelect('๐Ÿ˜ฐ')}> - ๐Ÿ˜ฐ - - onSelect('๐Ÿ˜ฅ')}> - ๐Ÿ˜ฅ - - onSelect('๐Ÿ˜“')}> - ๐Ÿ˜“ - - onSelect('๐Ÿค—')}> - ๐Ÿค— - - onSelect('๐Ÿค”')}> - ๐Ÿค” - - onSelect('๐Ÿคญ')}> - ๐Ÿคญ - - onSelect('๐Ÿคซ')}> - ๐Ÿคซ - - onSelect('๐Ÿคฅ')}> - ๐Ÿคฅ - - onSelect('๐Ÿ˜ถ')}> - ๐Ÿ˜ถ - - - ); + const {onSelect} = props; + return ( + + onSelect('๐Ÿ˜ƒ')}> + ๐Ÿ˜ƒ + + onSelect('๐Ÿ˜„')}> + ๐Ÿ˜„ + + onSelect('๐Ÿ˜')}> + ๐Ÿ˜ + + onSelect('๐Ÿ˜†')}> + ๐Ÿ˜† + + onSelect('๐Ÿ˜…')}> + ๐Ÿ˜… + + onSelect('๐Ÿ˜‚')}> + ๐Ÿ˜‚ + + onSelect('๐Ÿคฃ')}> + ๐Ÿคฃ + + onSelect('๐Ÿ˜Š')}> + ๐Ÿ˜Š + + onSelect('๐Ÿ˜‡')}> + ๐Ÿ˜‡ + + onSelect('๐Ÿ™‚')}> + ๐Ÿ™‚ + + onSelect('๐Ÿ™ƒ')}> + ๐Ÿ™ƒ + + onSelect('๐Ÿ˜‰')}> + ๐Ÿ˜‰ + + onSelect('๐Ÿ˜Œ')}> + ๐Ÿ˜Œ + + onSelect('๐Ÿ˜')}> + ๐Ÿ˜ + + onSelect('๐Ÿฅฐ')}> + ๐Ÿฅฐ + + onSelect('๐Ÿ˜˜')}> + ๐Ÿ˜˜ + + onSelect('๐Ÿ˜—')}> + ๐Ÿ˜— + + onSelect('๐Ÿ˜™')}> + ๐Ÿ˜™ + + onSelect('๐Ÿ˜š')}> + ๐Ÿ˜š + + onSelect('๐Ÿ˜‹')}> + ๐Ÿ˜‹ + + onSelect('๐Ÿ˜›')}> + ๐Ÿ˜› + + onSelect('๐Ÿ˜')}> + ๐Ÿ˜ + + onSelect('๐Ÿ˜œ')}> + ๐Ÿ˜œ + + onSelect('๐Ÿคช')}> + ๐Ÿคช + + onSelect('๐Ÿคจ')}> + ๐Ÿคจ + + onSelect('๐Ÿง')}> + ๐Ÿง + + onSelect('๐Ÿค“')}> + ๐Ÿค“ + + onSelect('๐Ÿ˜Ž')}> + ๐Ÿ˜Ž + + onSelect('๐Ÿคฉ')}> + ๐Ÿคฉ + + onSelect('๐Ÿฅณ')}> + ๐Ÿฅณ + + onSelect('๐Ÿ˜')}> + ๐Ÿ˜ + + onSelect('๐Ÿ˜’')}> + ๐Ÿ˜’ + + onSelect('๐Ÿ˜ž')}> + ๐Ÿ˜ž + + onSelect('๐Ÿ˜”')}> + ๐Ÿ˜” + + onSelect('๐Ÿ˜Ÿ')}> + ๐Ÿ˜Ÿ + + onSelect('๐Ÿ˜•')}> + ๐Ÿ˜• + + onSelect('๐Ÿ™')}> + ๐Ÿ™ + + onSelect('๐Ÿ˜ฃ')}> + ๐Ÿ˜ฃ + + onSelect('๐Ÿ˜–')}> + ๐Ÿ˜– + + onSelect('๐Ÿ˜ซ')}> + ๐Ÿ˜ซ + + onSelect('๐Ÿ˜ฉ')}> + ๐Ÿ˜ฉ + + onSelect('๐Ÿฅบ')}> + ๐Ÿฅบ + + onSelect('๐Ÿ˜ข')}> + ๐Ÿ˜ข + + onSelect('๐Ÿ˜ญ')}> + ๐Ÿ˜ญ + + onSelect('๐Ÿ˜ค')}> + ๐Ÿ˜ค + + onSelect('๐Ÿ˜ ')}> + ๐Ÿ˜  + + onSelect('๐Ÿ˜ก')}> + ๐Ÿ˜ก + + onSelect('๐Ÿคฌ')}> + ๐Ÿคฌ + + onSelect('๐Ÿคฏ')}> + ๐Ÿคฏ + + onSelect('๐Ÿ˜ณ')}> + ๐Ÿ˜ณ + + onSelect('๐Ÿฅต')}> + ๐Ÿฅต + + onSelect('๐Ÿฅถ')}> + ๐Ÿฅถ + + onSelect('๐Ÿ˜ฑ')}> + ๐Ÿ˜ฑ + + onSelect('๐Ÿ˜จ')}> + ๐Ÿ˜จ + + onSelect('๐Ÿ˜ฐ')}> + ๐Ÿ˜ฐ + + onSelect('๐Ÿ˜ฅ')}> + ๐Ÿ˜ฅ + + onSelect('๐Ÿ˜“')}> + ๐Ÿ˜“ + + onSelect('๐Ÿค—')}> + ๐Ÿค— + + onSelect('๐Ÿค”')}> + ๐Ÿค” + + onSelect('๐Ÿคญ')}> + ๐Ÿคญ + + onSelect('๐Ÿคซ')}> + ๐Ÿคซ + + onSelect('๐Ÿคฅ')}> + ๐Ÿคฅ + + onSelect('๐Ÿ˜ถ')}> + ๐Ÿ˜ถ + + + ); } const styles = StyleSheet.create({ - view: { - alignSelf: 'center', - flexWrap: 'wrap', - flexDirection: 'row', - width: Math.min(Dimensions.get('window').width, 32 * 12), - }, - item: { - // height: 25, - // width: 25, - fontSize: 20, - paddingHorizontal: 3, - paddingVertical: 5, - }, + view: { + alignSelf: 'center', + flexWrap: 'wrap', + flexDirection: 'row', + width: Math.min(Dimensions.get('window').width, 32 * 12), + }, + item: { + // height: 25, + // width: 25, + fontSize: 20, + paddingHorizontal: 3, + paddingVertical: 5, + }, }); diff --git a/examples/src/example.tsx b/examples/src/example.tsx index e09db2a..690e381 100644 --- a/examples/src/example.tsx +++ b/examples/src/example.tsx @@ -1,10 +1,11 @@ +/* eslint-disable react/no-unstable-nested-components,react-native/no-inline-styles*/ /** * Rich Editor Example * @deprecated Please refer to example.hooks.js * @author wxik * @since 2019-06-24 14:52 */ -import {useCallback, useEffect, useMemo, useRef, useState} from 'react'; +import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'; import { Appearance, Button, @@ -20,7 +21,7 @@ import { TextInput, View, } from 'react-native'; -import {actions, getContentCSS, RichEditor, RichToolbar} from 'react-native-pell-rich-editor'; +import {actions, FONT_SIZE, getContentCSS, RichEditor, RichToolbar} from 'react-native-pell-rich-editor'; import {XMath} from '@wxik/core'; import {InsertLinkModal} from './insertLink'; import {EmojiView} from './emoji'; @@ -74,9 +75,9 @@ function createContentStyle(theme: ColorSchemeName) { export function Example(props: IProps) { const {theme: initTheme = Appearance.getColorScheme(), navigation} = props; - const richText = useRef(); + const richText = useRef(null); const linkModal = useRef(); - const scrollRef = useRef(); + const scrollRef = useRef(null); // save on html const contentRef = useRef(initHTML); @@ -175,13 +176,15 @@ export function Example(props: IProps) { }, []); const onLinkDone = useCallback(({title, url}: {title?: string; url?: string}) => { - richText.current?.insertLink(title, url); + if (title && url) { + richText.current?.insertLink(title, url); + } }, []); const handleFontSize = useCallback(() => { // 1= 10px, 2 = 13px, 3 = 16px, 4 = 18px, 5 = 24px, 6 = 32px, 7 = 48px; let size = [1, 2, 3, 4, 5, 6, 7]; - richText.current?.setFontSize(size[XMath.random(size.length - 1)]); + richText.current?.setFontSize(size[XMath.random(size.length - 1)] as FONT_SIZE); }, []); const handleForeColor = useCallback(() => { @@ -210,7 +213,7 @@ export function Example(props: IProps) { // console.log(inputType, data) }, []); - const handleMessage = useCallback(({type, id, data}) => { + const handleMessage = useCallback(({type, id, data}: {type: string; id: string; data?: any}) => { switch (type) { case 'ImgClick': richText.current?.commandDOM(`$('#${id}').src="${imageList[XMath.random(imageList.length - 1)]}"`); diff --git a/examples/src/preview.tsx b/examples/src/preview.tsx index 6db25be..7f89bc0 100644 --- a/examples/src/preview.tsx +++ b/examples/src/preview.tsx @@ -1,4 +1,4 @@ -import {FC} from 'react'; +import React, {FC} from 'react'; import {Button, SafeAreaView, StyleSheet, View} from 'react-native'; import {WebView} from 'react-native-webview'; import {INavigation} from './interface'; diff --git a/examples/tsconfig.json b/examples/tsconfig.json index d778e1a..45a6c70 100644 --- a/examples/tsconfig.json +++ b/examples/tsconfig.json @@ -1,4 +1,3 @@ { - "extends": "@tsconfig/react-native/tsconfig.json", - "include": ["../index.d.ts"] + "extends": "@tsconfig/react-native/tsconfig.json" } diff --git a/examples/yarn.lock b/examples/yarn.lock index 82994f6..1338592 100644 --- a/examples/yarn.lock +++ b/examples/yarn.lock @@ -17,12 +17,24 @@ dependencies: "@babel/highlight" "^7.18.6" -"@babel/compat-data@^7.17.7", "@babel/compat-data@^7.20.1", "@babel/compat-data@^7.20.5": +"@babel/code-frame@^7.21.4": + version "7.21.4" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.21.4.tgz#d0fa9e4413aca81f2b23b9442797bda1826edb39" + integrity sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g== + dependencies: + "@babel/highlight" "^7.18.6" + +"@babel/compat-data@^7.17.7", "@babel/compat-data@^7.20.5": version "7.21.0" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.21.0.tgz#c241dc454e5b5917e40d37e525e2f4530c399298" integrity sha512-gMuZsmsgxk/ENC3O/fRw5QY8A9/uxQbbCEypnLIiYYc/qVJtEV7ouxC3EllIIwNzMqAQee5tanFabWsUOutS7g== -"@babel/core@^7.13.16", "@babel/core@^7.14.0", "@babel/core@^7.20.0", "@babel/core@^7.21.3": +"@babel/compat-data@^7.21.4": + version "7.21.4" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.21.4.tgz#457ffe647c480dff59c2be092fc3acf71195c87f" + integrity sha512-/DYyDpeCfaVinT40FPGdkkb+lYSKvsVuMjDAG7jPOWWiM1ibOaB9CXJAlc4d1QpP/U2q2P9jbrSlClKSErd55g== + +"@babel/core@^7.13.16", "@babel/core@^7.14.0", "@babel/core@^7.20.0": version "7.21.3" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.21.3.tgz#cf1c877284a469da5d1ce1d1e53665253fae712e" integrity sha512-qIJONzoa/qiHghnm0l1n4i/6IIziDpzqc36FBs4pzMhDUraHqponwJLiAKm1hGLP3OSB/TVNz6rMwVGpwxxySw== @@ -43,6 +55,27 @@ json5 "^2.2.2" semver "^6.3.0" +"@babel/core@^7.21.4": + version "7.21.4" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.21.4.tgz#c6dc73242507b8e2a27fd13a9c1814f9fa34a659" + integrity sha512-qt/YV149Jman/6AfmlxJ04LMIu8bMoyl3RB91yTFrxQmgbrSvQMy7cI8Q62FHx1t8wJ8B5fu0UDoLwHAhUo1QA== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.21.4" + "@babel/generator" "^7.21.4" + "@babel/helper-compilation-targets" "^7.21.4" + "@babel/helper-module-transforms" "^7.21.2" + "@babel/helpers" "^7.21.0" + "@babel/parser" "^7.21.4" + "@babel/template" "^7.20.7" + "@babel/traverse" "^7.21.4" + "@babel/types" "^7.21.4" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.2" + semver "^6.3.0" + "@babel/eslint-parser@^7.18.2": version "7.21.3" resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.21.3.tgz#d79e822050f2de65d7f368a076846e7184234af7" @@ -62,6 +95,16 @@ "@jridgewell/trace-mapping" "^0.3.17" jsesc "^2.5.1" +"@babel/generator@^7.21.4": + version "7.21.4" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.21.4.tgz#64a94b7448989f421f919d5239ef553b37bb26bc" + integrity sha512-NieM3pVIYW2SwGzKoqfPrQsf4xGs9M9AIG3ThppsSRmO+m7eQhmI6amajKMUeIO37wFfsvnvcxQFx6x6iqxDnA== + dependencies: + "@babel/types" "^7.21.4" + "@jridgewell/gen-mapping" "^0.3.2" + "@jridgewell/trace-mapping" "^0.3.17" + jsesc "^2.5.1" + "@babel/helper-annotate-as-pure@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz#eaa49f6f80d5a33f9a5dd2276e6d6e451be0a6bb" @@ -77,7 +120,7 @@ "@babel/helper-explode-assignable-expression" "^7.18.6" "@babel/types" "^7.18.9" -"@babel/helper-compilation-targets@^7.17.7", "@babel/helper-compilation-targets@^7.18.9", "@babel/helper-compilation-targets@^7.20.0", "@babel/helper-compilation-targets@^7.20.7": +"@babel/helper-compilation-targets@^7.17.7", "@babel/helper-compilation-targets@^7.18.9", "@babel/helper-compilation-targets@^7.20.7": version "7.20.7" resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz#a6cd33e93629f5eb473b021aac05df62c4cd09bb" integrity sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ== @@ -88,6 +131,17 @@ lru-cache "^5.1.1" semver "^6.3.0" +"@babel/helper-compilation-targets@^7.21.4": + version "7.21.4" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.21.4.tgz#770cd1ce0889097ceacb99418ee6934ef0572656" + integrity sha512-Fa0tTuOXZ1iL8IeDFUWCzjZcn+sJGd9RZdH9esYVjEejGmzf+FFYQpMi/kZUk2kPy/q1H3/GPw7np8qar/stfg== + dependencies: + "@babel/compat-data" "^7.21.4" + "@babel/helper-validator-option" "^7.21.0" + browserslist "^4.21.3" + lru-cache "^5.1.1" + semver "^6.3.0" + "@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.21.0": version "7.21.0" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.21.0.tgz#64f49ecb0020532f19b1d014b03bccaa1ab85fb9" @@ -280,6 +334,11 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.21.3.tgz#1d285d67a19162ff9daa358d4cb41d50c06220b3" integrity sha512-lobG0d7aOfQRXh8AyklEAgZGvA4FShxo6xQbUrrT/cNBPUdIDojlokwJsQyCC/eKia7ifqM0yP+2DRZ4WKw2RQ== +"@babel/parser@^7.21.4": + version "7.21.4" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.21.4.tgz#94003fdfc520bbe2875d4ae557b43ddb6d880f17" + integrity sha512-alVJj7k7zIxqBZ7BTRhz0IqJFxW1VJbm6N8JbcYhQ186df9ZBPbZBmWSqAMXwHGsCJdYks7z/voa3ibiS5bCIw== + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz#da5b8f9a580acdfbe53494dba45ea389fb09a4d2" @@ -287,7 +346,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.18.9": +"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.20.7": version "7.20.7" resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.20.7.tgz#d9c85589258539a22a901033853101a6198d4ef1" integrity sha512-sbr9+wNE5aXMBBFBICk01tt7sBf2Oc9ikRFEcem/ZORup9IMUdNhW7/wVLEbbtlWOsEubJet46mHAL2C8+2jKQ== @@ -296,7 +355,7 @@ "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" "@babel/plugin-proposal-optional-chaining" "^7.20.7" -"@babel/plugin-proposal-async-generator-functions@^7.0.0", "@babel/plugin-proposal-async-generator-functions@^7.20.1": +"@babel/plugin-proposal-async-generator-functions@^7.0.0", "@babel/plugin-proposal-async-generator-functions@^7.20.7": version "7.20.7" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.20.7.tgz#bfb7276d2d573cb67ba379984a2334e262ba5326" integrity sha512-xMbiLsn/8RK7Wq7VeVytytS2L6qE69bXPB10YCmMdDZbKF4okCqY74pI/jJQ/8U0b/F6NrT2+14b8/P9/3AMGA== @@ -314,7 +373,7 @@ "@babel/helper-create-class-features-plugin" "^7.18.6" "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-proposal-class-static-block@^7.18.6": +"@babel/plugin-proposal-class-static-block@^7.21.0": version "7.21.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.21.0.tgz#77bdd66fb7b605f3a61302d224bdfacf5547977d" integrity sha512-XP5G9MWNUskFuP30IfFSEFB0Z6HzLIUcjYM4bYOPHXl7eiJ9HFv8tWj6TXTN5QODiEhDZAeI4hLok2iHFFV4hw== @@ -363,7 +422,7 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-syntax-json-strings" "^7.8.3" -"@babel/plugin-proposal-logical-assignment-operators@^7.18.9": +"@babel/plugin-proposal-logical-assignment-operators@^7.20.7": version "7.20.7" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.20.7.tgz#dfbcaa8f7b4d37b51e8bfb46d94a5aea2bb89d83" integrity sha512-y7C7cZgpMIjWlKE5T7eJwp+tnRYM89HmRvWM5EQuB5BoHEONjmQ8lSNmBUwOyy/GFRsohJED51YBF79hE1djug== @@ -387,7 +446,7 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-syntax-numeric-separator" "^7.10.4" -"@babel/plugin-proposal-object-rest-spread@^7.0.0", "@babel/plugin-proposal-object-rest-spread@^7.20.2": +"@babel/plugin-proposal-object-rest-spread@^7.0.0", "@babel/plugin-proposal-object-rest-spread@^7.20.7": version "7.20.7" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz#aa662940ef425779c75534a5c41e9d936edc390a" integrity sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg== @@ -406,7 +465,7 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" -"@babel/plugin-proposal-optional-chaining@^7.0.0", "@babel/plugin-proposal-optional-chaining@^7.13.12", "@babel/plugin-proposal-optional-chaining@^7.18.9", "@babel/plugin-proposal-optional-chaining@^7.20.7": +"@babel/plugin-proposal-optional-chaining@^7.0.0", "@babel/plugin-proposal-optional-chaining@^7.13.12", "@babel/plugin-proposal-optional-chaining@^7.20.7", "@babel/plugin-proposal-optional-chaining@^7.21.0": version "7.21.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.21.0.tgz#886f5c8978deb7d30f678b2e24346b287234d3ea" integrity sha512-p4zeefM72gpmEe2fkUr/OnOXpWEf8nAgk7ZYVqqfFiyIG7oFfVZcCrU64hWn5xp4tQ9LkV4bTIa5rD0KANpKNA== @@ -423,7 +482,7 @@ "@babel/helper-create-class-features-plugin" "^7.18.6" "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-proposal-private-property-in-object@^7.18.6": +"@babel/plugin-proposal-private-property-in-object@^7.21.0": version "7.21.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0.tgz#19496bd9883dd83c23c7d7fc45dcd9ad02dfa1dc" integrity sha512-ha4zfehbJjc5MmXBlHec1igel5TJXXLDDRbuJ4+XT2TJcyD9/V1919BA8gMvsdHcNMBy4WBUBiRb3nw/EQUtBw== @@ -581,14 +640,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.19.0" -"@babel/plugin-transform-arrow-functions@^7.0.0", "@babel/plugin-transform-arrow-functions@^7.18.6": +"@babel/plugin-transform-arrow-functions@^7.0.0", "@babel/plugin-transform-arrow-functions@^7.20.7": version "7.20.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.20.7.tgz#bea332b0e8b2dab3dafe55a163d8227531ab0551" integrity sha512-3poA5E7dzDomxj9WXWwuD6A5F3kc7VXwIJO+E+J8qtDtS+pXPAhrgEyh+9GBwBgPq1Z+bB+/JD60lp5jsN7JPQ== dependencies: "@babel/helper-plugin-utils" "^7.20.2" -"@babel/plugin-transform-async-to-generator@^7.0.0", "@babel/plugin-transform-async-to-generator@^7.18.6": +"@babel/plugin-transform-async-to-generator@^7.0.0", "@babel/plugin-transform-async-to-generator@^7.20.7": version "7.20.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.20.7.tgz#dfee18623c8cb31deb796aa3ca84dda9cea94354" integrity sha512-Uo5gwHPT9vgnSXQxqGtpdufUiWp96gk7yiP4Mp5bm1QMkEmLXBO7PAGYbKoJ6DhAwiNkcHFBol/x5zZZkL/t0Q== @@ -604,14 +663,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-block-scoping@^7.0.0", "@babel/plugin-transform-block-scoping@^7.20.2": +"@babel/plugin-transform-block-scoping@^7.0.0", "@babel/plugin-transform-block-scoping@^7.21.0": version "7.21.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.21.0.tgz#e737b91037e5186ee16b76e7ae093358a5634f02" integrity sha512-Mdrbunoh9SxwFZapeHVrwFmri16+oYotcZysSzhNIVDwIAb1UV+kvnxULSYq9J3/q5MDG+4X6w8QVgD1zhBXNQ== dependencies: "@babel/helper-plugin-utils" "^7.20.2" -"@babel/plugin-transform-classes@^7.0.0", "@babel/plugin-transform-classes@^7.20.2": +"@babel/plugin-transform-classes@^7.0.0", "@babel/plugin-transform-classes@^7.21.0": version "7.21.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.21.0.tgz#f469d0b07a4c5a7dbb21afad9e27e57b47031665" integrity sha512-RZhbYTCEUAe6ntPehC4hlslPWosNHDox+vAs4On/mCLRLfoDVHf6hVEd7kuxr1RnHwJmxFfUM3cZiZRmPxJPXQ== @@ -626,7 +685,7 @@ "@babel/helper-split-export-declaration" "^7.18.6" globals "^11.1.0" -"@babel/plugin-transform-computed-properties@^7.0.0", "@babel/plugin-transform-computed-properties@^7.18.9": +"@babel/plugin-transform-computed-properties@^7.0.0", "@babel/plugin-transform-computed-properties@^7.20.7": version "7.20.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.20.7.tgz#704cc2fd155d1c996551db8276d55b9d46e4d0aa" integrity sha512-Lz7MvBK6DTjElHAmfu6bfANzKcxpyNPeYBGEafyA6E5HtRpjpZwU+u7Qrgz/2OR0z+5TvKYbPdphfSaAcZBrYQ== @@ -634,7 +693,7 @@ "@babel/helper-plugin-utils" "^7.20.2" "@babel/template" "^7.20.7" -"@babel/plugin-transform-destructuring@^7.0.0", "@babel/plugin-transform-destructuring@^7.20.2": +"@babel/plugin-transform-destructuring@^7.0.0", "@babel/plugin-transform-destructuring@^7.21.3": version "7.21.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.21.3.tgz#73b46d0fd11cd6ef57dea8a381b1215f4959d401" integrity sha512-bp6hwMFzuiE4HqYEyoGJ/V2LeIWn+hLVKc4pnj++E5XQptwhtcGmSayM029d/j2X1bPKGTlsyPwAubuU22KhMA== @@ -672,7 +731,7 @@ "@babel/helper-plugin-utils" "^7.20.2" "@babel/plugin-syntax-flow" "^7.18.6" -"@babel/plugin-transform-for-of@^7.0.0", "@babel/plugin-transform-for-of@^7.18.8": +"@babel/plugin-transform-for-of@^7.0.0", "@babel/plugin-transform-for-of@^7.21.0": version "7.21.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.21.0.tgz#964108c9988de1a60b4be2354a7d7e245f36e86e" integrity sha512-LlUYlydgDkKpIY7mcBWvyPPmMcOphEyYA27Ef4xpbh1IiDNLr0kZsos2nf92vz3IccvJI25QUwp86Eo5s6HmBQ== @@ -702,7 +761,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-modules-amd@^7.19.6": +"@babel/plugin-transform-modules-amd@^7.20.11": version "7.20.11" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.20.11.tgz#3daccca8e4cc309f03c3a0c4b41dc4b26f55214a" integrity sha512-NuzCt5IIYOW0O30UvqktzHYR2ud5bOWbY0yaxWZ6G+aFzOMJvrs5YHNikrbdaT15+KNO31nPOy5Fim3ku6Zb5g== @@ -710,7 +769,7 @@ "@babel/helper-module-transforms" "^7.20.11" "@babel/helper-plugin-utils" "^7.20.2" -"@babel/plugin-transform-modules-commonjs@^7.0.0", "@babel/plugin-transform-modules-commonjs@^7.13.8", "@babel/plugin-transform-modules-commonjs@^7.19.6": +"@babel/plugin-transform-modules-commonjs@^7.0.0", "@babel/plugin-transform-modules-commonjs@^7.13.8", "@babel/plugin-transform-modules-commonjs@^7.21.2": version "7.21.2" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.21.2.tgz#6ff5070e71e3192ef2b7e39820a06fb78e3058e7" integrity sha512-Cln+Yy04Gxua7iPdj6nOV96smLGjpElir5YwzF0LBPKoPlLDNJePNlrGGaybAJkd0zKRnOVXOgizSqPYMNYkzA== @@ -719,7 +778,7 @@ "@babel/helper-plugin-utils" "^7.20.2" "@babel/helper-simple-access" "^7.20.2" -"@babel/plugin-transform-modules-systemjs@^7.19.6": +"@babel/plugin-transform-modules-systemjs@^7.20.11": version "7.20.11" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.20.11.tgz#467ec6bba6b6a50634eea61c9c232654d8a4696e" integrity sha512-vVu5g9BPQKSFEmvt2TA4Da5N+QVS66EX21d8uoOihC+OCpUoGvzVsXeqFdtAEfVa5BILAeFt+U7yVmLbQnAJmw== @@ -737,7 +796,7 @@ "@babel/helper-module-transforms" "^7.18.6" "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-named-capturing-groups-regex@^7.0.0", "@babel/plugin-transform-named-capturing-groups-regex@^7.19.1": +"@babel/plugin-transform-named-capturing-groups-regex@^7.0.0", "@babel/plugin-transform-named-capturing-groups-regex@^7.20.5": version "7.20.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.20.5.tgz#626298dd62ea51d452c3be58b285d23195ba69a8" integrity sha512-mOW4tTzi5iTLnw+78iEq3gr8Aoq4WNRGpmSlrogqaiCBoR1HFhpU4JkpQFOHfeYx3ReVIFWOQJS4aZBRvuZ6mA== @@ -760,7 +819,7 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/helper-replace-supers" "^7.18.6" -"@babel/plugin-transform-parameters@^7.0.0", "@babel/plugin-transform-parameters@^7.20.1", "@babel/plugin-transform-parameters@^7.20.7": +"@babel/plugin-transform-parameters@^7.0.0", "@babel/plugin-transform-parameters@^7.20.7", "@babel/plugin-transform-parameters@^7.21.3": version "7.21.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.21.3.tgz#18fc4e797cf6d6d972cb8c411dbe8a809fa157db" integrity sha512-Wxc+TvppQG9xWFYatvCGPvZ6+SIUxQ2ZdiBP+PHYMIjnPXD+uThCshaz4NZOnODAtBjjcVQQ/3OKs9LW28purQ== @@ -806,7 +865,7 @@ "@babel/plugin-syntax-jsx" "^7.18.6" "@babel/types" "^7.21.0" -"@babel/plugin-transform-regenerator@^7.18.6": +"@babel/plugin-transform-regenerator@^7.20.5": version "7.20.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.20.5.tgz#57cda588c7ffb7f4f8483cc83bdcea02a907f04d" integrity sha512-kW/oO7HPBtntbsahzQ0qSE3tFvkFwnbozz3NWFhLGqH75vLEg+sCGngLlhVkePlCs3Jv0dBBHDzCHxNiFAQKCQ== @@ -840,7 +899,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-spread@^7.0.0", "@babel/plugin-transform-spread@^7.19.0": +"@babel/plugin-transform-spread@^7.0.0", "@babel/plugin-transform-spread@^7.20.7": version "7.20.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.20.7.tgz#c2d83e0b99d3bf83e07b11995ee24bf7ca09401e" integrity sha512-ewBbHQ+1U/VnH1fxltbJqDeWBU1oNLG8Dj11uIv3xVf7nrQu0bPGe5Rf716r7K5Qz+SqtAOVswoVunoiBtGhxw== @@ -894,31 +953,31 @@ "@babel/helper-create-regexp-features-plugin" "^7.18.6" "@babel/helper-plugin-utils" "^7.18.6" -"@babel/preset-env@^7.20.2": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.20.2.tgz#9b1642aa47bb9f43a86f9630011780dab7f86506" - integrity sha512-1G0efQEWR1EHkKvKHqbG+IN/QdgwfByUpM5V5QroDzGV2t3S/WXNQd693cHiHTlCFMpr9B6FkPFXDA2lQcKoDg== +"@babel/preset-env@^7.21.4": + version "7.21.4" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.21.4.tgz#a952482e634a8dd8271a3fe5459a16eb10739c58" + integrity sha512-2W57zHs2yDLm6GD5ZpvNn71lZ0B/iypSdIeq25OurDKji6AdzV07qp4s3n1/x5BqtiGaTrPN3nerlSCaC5qNTw== dependencies: - "@babel/compat-data" "^7.20.1" - "@babel/helper-compilation-targets" "^7.20.0" + "@babel/compat-data" "^7.21.4" + "@babel/helper-compilation-targets" "^7.21.4" "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-validator-option" "^7.18.6" + "@babel/helper-validator-option" "^7.21.0" "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.18.6" - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.18.9" - "@babel/plugin-proposal-async-generator-functions" "^7.20.1" + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.20.7" + "@babel/plugin-proposal-async-generator-functions" "^7.20.7" "@babel/plugin-proposal-class-properties" "^7.18.6" - "@babel/plugin-proposal-class-static-block" "^7.18.6" + "@babel/plugin-proposal-class-static-block" "^7.21.0" "@babel/plugin-proposal-dynamic-import" "^7.18.6" "@babel/plugin-proposal-export-namespace-from" "^7.18.9" "@babel/plugin-proposal-json-strings" "^7.18.6" - "@babel/plugin-proposal-logical-assignment-operators" "^7.18.9" + "@babel/plugin-proposal-logical-assignment-operators" "^7.20.7" "@babel/plugin-proposal-nullish-coalescing-operator" "^7.18.6" "@babel/plugin-proposal-numeric-separator" "^7.18.6" - "@babel/plugin-proposal-object-rest-spread" "^7.20.2" + "@babel/plugin-proposal-object-rest-spread" "^7.20.7" "@babel/plugin-proposal-optional-catch-binding" "^7.18.6" - "@babel/plugin-proposal-optional-chaining" "^7.18.9" + "@babel/plugin-proposal-optional-chaining" "^7.21.0" "@babel/plugin-proposal-private-methods" "^7.18.6" - "@babel/plugin-proposal-private-property-in-object" "^7.18.6" + "@babel/plugin-proposal-private-property-in-object" "^7.21.0" "@babel/plugin-proposal-unicode-property-regex" "^7.18.6" "@babel/plugin-syntax-async-generators" "^7.8.4" "@babel/plugin-syntax-class-properties" "^7.12.13" @@ -935,40 +994,40 @@ "@babel/plugin-syntax-optional-chaining" "^7.8.3" "@babel/plugin-syntax-private-property-in-object" "^7.14.5" "@babel/plugin-syntax-top-level-await" "^7.14.5" - "@babel/plugin-transform-arrow-functions" "^7.18.6" - "@babel/plugin-transform-async-to-generator" "^7.18.6" + "@babel/plugin-transform-arrow-functions" "^7.20.7" + "@babel/plugin-transform-async-to-generator" "^7.20.7" "@babel/plugin-transform-block-scoped-functions" "^7.18.6" - "@babel/plugin-transform-block-scoping" "^7.20.2" - "@babel/plugin-transform-classes" "^7.20.2" - "@babel/plugin-transform-computed-properties" "^7.18.9" - "@babel/plugin-transform-destructuring" "^7.20.2" + "@babel/plugin-transform-block-scoping" "^7.21.0" + "@babel/plugin-transform-classes" "^7.21.0" + "@babel/plugin-transform-computed-properties" "^7.20.7" + "@babel/plugin-transform-destructuring" "^7.21.3" "@babel/plugin-transform-dotall-regex" "^7.18.6" "@babel/plugin-transform-duplicate-keys" "^7.18.9" "@babel/plugin-transform-exponentiation-operator" "^7.18.6" - "@babel/plugin-transform-for-of" "^7.18.8" + "@babel/plugin-transform-for-of" "^7.21.0" "@babel/plugin-transform-function-name" "^7.18.9" "@babel/plugin-transform-literals" "^7.18.9" "@babel/plugin-transform-member-expression-literals" "^7.18.6" - "@babel/plugin-transform-modules-amd" "^7.19.6" - "@babel/plugin-transform-modules-commonjs" "^7.19.6" - "@babel/plugin-transform-modules-systemjs" "^7.19.6" + "@babel/plugin-transform-modules-amd" "^7.20.11" + "@babel/plugin-transform-modules-commonjs" "^7.21.2" + "@babel/plugin-transform-modules-systemjs" "^7.20.11" "@babel/plugin-transform-modules-umd" "^7.18.6" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.19.1" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.20.5" "@babel/plugin-transform-new-target" "^7.18.6" "@babel/plugin-transform-object-super" "^7.18.6" - "@babel/plugin-transform-parameters" "^7.20.1" + "@babel/plugin-transform-parameters" "^7.21.3" "@babel/plugin-transform-property-literals" "^7.18.6" - "@babel/plugin-transform-regenerator" "^7.18.6" + "@babel/plugin-transform-regenerator" "^7.20.5" "@babel/plugin-transform-reserved-words" "^7.18.6" "@babel/plugin-transform-shorthand-properties" "^7.18.6" - "@babel/plugin-transform-spread" "^7.19.0" + "@babel/plugin-transform-spread" "^7.20.7" "@babel/plugin-transform-sticky-regex" "^7.18.6" "@babel/plugin-transform-template-literals" "^7.18.9" "@babel/plugin-transform-typeof-symbol" "^7.18.9" "@babel/plugin-transform-unicode-escapes" "^7.18.10" "@babel/plugin-transform-unicode-regex" "^7.18.6" "@babel/preset-modules" "^0.1.5" - "@babel/types" "^7.20.2" + "@babel/types" "^7.21.4" babel-plugin-polyfill-corejs2 "^0.3.3" babel-plugin-polyfill-corejs3 "^0.6.0" babel-plugin-polyfill-regenerator "^0.4.1" @@ -1052,6 +1111,22 @@ debug "^4.1.0" globals "^11.1.0" +"@babel/traverse@^7.21.4": + version "7.21.4" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.21.4.tgz#a836aca7b116634e97a6ed99976236b3282c9d36" + integrity sha512-eyKrRHKdyZxqDm+fV1iqL9UAHMoIg0nDaGqfIOd8rKH17m5snv7Gn4qgjBoFfLz9APvjFU/ICT00NVCv1Epp8Q== + dependencies: + "@babel/code-frame" "^7.21.4" + "@babel/generator" "^7.21.4" + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-function-name" "^7.21.0" + "@babel/helper-hoist-variables" "^7.18.6" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/parser" "^7.21.4" + "@babel/types" "^7.21.4" + debug "^4.1.0" + globals "^11.1.0" + "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.20.0", "@babel/types@^7.20.2", "@babel/types@^7.20.5", "@babel/types@^7.20.7", "@babel/types@^7.21.0", "@babel/types@^7.21.2", "@babel/types@^7.21.3", "@babel/types@^7.4.4": version "7.21.3" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.21.3.tgz#4865a5357ce40f64e3400b0f3b737dc6d4f64d05" @@ -1061,6 +1136,15 @@ "@babel/helper-validator-identifier" "^7.19.1" to-fast-properties "^2.0.0" +"@babel/types@^7.21.4": + version "7.21.4" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.21.4.tgz#2d5d6bb7908699b3b416409ffd3b5daa25b030d4" + integrity sha512-rU2oY501qDxE8Pyo7i/Orqma4ziCOrby0/9mvbDUGEfvZjb279Nk9k19e2fiCxHbRRpY2ZyrgW1eq22mvmOIzA== + dependencies: + "@babel/helper-string-parser" "^7.19.4" + "@babel/helper-validator-identifier" "^7.19.1" + to-fast-properties "^2.0.0" + "@eslint-community/eslint-utils@^4.2.0": version "4.4.0" resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" @@ -1088,10 +1172,10 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@8.37.0": - version "8.37.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.37.0.tgz#cf1b5fa24217fe007f6487a26d765274925efa7d" - integrity sha512-x5vzdtOOGgFVDCUs81QRB2+liax8rFg3+7hqM+QhBG0/G3F1ZsoYl97UrqgHgQ9KKT7G6c4V+aTUCgu/n22v1A== +"@eslint/js@8.38.0": + version "8.38.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.38.0.tgz#73a8a0d8aa8a8e6fe270431c5e72ae91b5337892" + integrity sha512-IoD2MfUnOV58ghIHCiil01PcohxjbYR/qCxsoC+xNgUwh1EY8jOOrYmu3d3a71+tJJ23uscEV4X2HJWMsPJu4g== "@hapi/hoek@^9.0.0": version "9.3.0" @@ -1546,14 +1630,14 @@ resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf" integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w== -"@types/react-native@^0.71.5": - version "0.71.5" - resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.71.5.tgz#229bc670433f97fe1e03d62758d4fccf34a07714" - integrity sha512-Tp5druh7DGwNDvWYH09PCE++hbH4zYz0OOvGFb3/QFIFKXgfezaT/txJeKlBkbiqs45QJzllp9S0qo0WpWyijA== +"@types/react-native@^0.71.6": + version "0.71.6" + resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.71.6.tgz#bf0fc6a69bf0c2933c089dfb19fc182b09cb7790" + integrity sha512-eCqEZ+GhW9L9o6yVoPqCCAq8Sbd6liaKlh6WviD0X7O035NEe7VQ+q9KXYL+mhyZrLI5sbX7f3G973gG6fuiyQ== dependencies: "@types/react" "*" -"@types/react@*", "@types/react@^18.0.31": +"@types/react@*": version "18.0.31" resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.31.tgz#a69ef8dd7bfa849734d258c793a8fe343a338205" integrity sha512-EEG67of7DsvRDU6BLLI0p+k1GojDLz9+lZsnCpCRTa/lOokvyPBvp8S5x+A24hME3yyQuIipcP70KJ6H7Qupww== @@ -1562,6 +1646,15 @@ "@types/scheduler" "*" csstype "^3.0.2" +"@types/react@^18.0.37": + version "18.0.37" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.37.tgz#7a784e2a8b8f83abb04dc6b9ed9c9b4c0aee9be7" + integrity sha512-4yaZZtkRN3ZIQD3KSEwkfcik8s0SWV+82dlJot1AbGYHCzJkWP3ENBY6wYeDRmKZ6HkrgoGAmR2HqdwYGp6OEw== + dependencies: + "@types/prop-types" "*" + "@types/scheduler" "*" + csstype "^3.0.2" + "@types/scheduler@*": version "0.16.3" resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.3.tgz#cef09e3ec9af1d63d2a6cc5b383a737e24e6dcf5" @@ -2757,15 +2850,15 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz#c7f0f956124ce677047ddbc192a68f999454dedc" integrity sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ== -eslint@^8.37.0: - version "8.37.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.37.0.tgz#1f660ef2ce49a0bfdec0b0d698e0b8b627287412" - integrity sha512-NU3Ps9nI05GUoVMxcZx1J8CNR6xOvUT4jAUMH5+z8lpp3aEdPVCImKw6PWG4PY+Vfkpr+jvMpxs/qoE7wq0sPw== +eslint@^8.38.0: + version "8.38.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.38.0.tgz#a62c6f36e548a5574dd35728ac3c6209bd1e2f1a" + integrity sha512-pIdsD2jwlUGf/U38Jv97t8lq6HpaU/G9NKbYmpWpZGw3LdTNhZLbJePqxOXGB5+JEKfOPU/XLxYxFh03nr1KTg== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/regexpp" "^4.4.0" "@eslint/eslintrc" "^2.0.2" - "@eslint/js" "8.37.0" + "@eslint/js" "8.38.0" "@humanwhocodes/config-array" "^0.11.8" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" @@ -4992,6 +5085,10 @@ react-native-modal@^13.0.1: prop-types "^15.6.2" react-native-animatable "1.3.3" +"react-native-pell-rich-editor@link:..": + version "0.0.0" + uid "" + react-native-webview@11.26.1: version "11.26.1" resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-11.26.1.tgz#658c09ed5162dc170b361e48c2dd26c9712879da" @@ -5000,10 +5097,10 @@ react-native-webview@11.26.1: escape-string-regexp "2.0.0" invariant "2.2.4" -react-native@0.71.5: - version "0.71.5" - resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.71.5.tgz#599a5a674ae5ebecaff9dc027c514e7428480194" - integrity sha512-fMptnHXoIPotg7gPYAvjMRnfC6gUSkTJzgaIDQJTY/f5F+g6qph5J1xT9LCuWuNguyQ9dh8b0MZTK5ROvTTV9w== +react-native@0.71.7: + version "0.71.7" + resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.71.7.tgz#d0ae409f6ee4fc7e7a876b4ca9d8d28934133228" + integrity sha512-Id6iRLS581fJMFGbBl1jP5uSmjExtGOvw5Gvh7694zISXjsRAsFMmU+izs0pyCLqDBoHK7y4BT7WGPGw693nYw== dependencies: "@jest/create-cache-key-function" "^29.2.1" "@react-native-community/cli" "10.2.2" diff --git a/index.d.ts b/index.d.ts index 772e9be..870f2ba 100644 --- a/index.d.ts +++ b/index.d.ts @@ -4,325 +4,388 @@ import React from 'react'; /** The RichTextEditor accepts all props from Webview */ export interface RichEditorProps extends WebViewProps { - /** - * Used for placement of editor - */ - contentInset?: {top: number; bottom: number}; - - /** - * Wrap the editor webview inside a container. - * Default is true - */ - useContainer?: boolean; - - /** - * useContainer is false by inline view of initial height - */ - initialHeight?: number | string; - /** - * Wrap the editor content placeholder - * Default is empty string - */ - placeholder?: string; - /** - * Styling for container or for Webview depending on useContainer prop - */ - style?: StyleProp; - - /** - * Initial content to be rendered inside WebView - */ - initialContentHTML?: string; - - /** - * Boolean value to Initial content request focus. The default value is false. - */ - initialFocus?: boolean; - - /** - * Boolean value to disable editor. The default value is false. - */ - disabled?: boolean; - - /** - * Boolean value to enable auto-correct. The default value is false. - */ - autoCorrect?: boolean; - - /** - * String value to set text auto capitalization. - * See: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autocapitalize - */ - autoCapitalize?: 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters'; - - /** - * String value to set return key type - * See: https://reactnative.dev/docs/textinput#returnkeytype - */ - enterKeyHint?: 'done' | 'go' | 'next' | 'search' | 'send'; - - /** - * Boolean value to enable paste as plain text. The default value is false. - */ - pasteAsPlainText?: boolean; - - /** - * HTML element used to insert when the user presses enter. The default value is div. - */ - defaultParagraphSeparator?: string; - - /** - * Callback called after the editor has been initialized - */ - editorInitializedCallback?: () => void; - - /** - * Callback after editor data modification - */ - onChange?: (text: string) => void; - - /** - * Callback when the user pastes some content - * @param {string} data pastes values - */ - onPaste?: (data: string) => void; - - /** - * Callback when the user keyup some content - */ - onKeyUp?: ({keyCode: number, key: string}) => void; - - /** - * Callback when the user keydown some content - */ - onKeyDown?: ({keyCode: number, key: string}) => void; - - /** - * Callback input chat - * Android and iOS inputType are not the same - */ - onInput?: ({data: string, inputType: string}) => void; - - /** - * Callback when the link clicked - */ - onLink?: (url: string) => void; - - /** - * Callback when the editor focus some content - */ - onFocus?: () => void; - - /** - * Callback when the editor blur some content - */ - onBlur?: () => void; - - /** - * Callback Enter the position of the cursor - */ - onCursorPosition?: (offsetY: number) => void; - - /** - * Callback after height change - */ - onHeightChange?: (height: number) => void; - - onMessage?: (message: {type: string; id: string; data?: any}) => void; - - /** Custom action sent to editor */ - sendAction(type: string, action: string, data?: any, options?: any): void; - - /** - * When first gaining focus, the cursor moves to the end of the text - * Default is true - */ - firstFocusEnd?: boolean; - - /** - * Styling for container or for Rich Editor more dark or light settings - */ - editorStyle?: { - backgroundColor?: string; // editor background color - color?: string; // editor text color - caretColor?: string; // cursor/selection color - placeholderColor?: string; // editor placeholder text color - contentCSSText?: string; // editor content css text - initialCSSText?: string; // editor global css initial text - cssText?: string; // editor global css text - }; - - /** - * Use style instead of dedicated tags - */ - styleWithCSS?: boolean; + /** + * Used for placement of editor + */ + contentInset?: {top: number; bottom: number}; + + /** + * Wrap the editor webview inside a container. + * Default is true + */ + useContainer?: boolean; + + /** + * useContainer is false by inline view of initial height + */ + initialHeight?: number | string; + /** + * Wrap the editor content placeholder + * Default is empty string + */ + placeholder?: string; + /** + * Styling for container or for Webview depending on useContainer prop + */ + style?: StyleProp; + + /** + * Initial content to be rendered inside WebView + */ + initialContentHTML?: string; + + /** + * Boolean value to Initial content request focus. The default value is false. + */ + initialFocus?: boolean; + + /** + * Boolean value to disable editor. The default value is false. + */ + disabled?: boolean; + + /** + * Boolean value to enable auto-correct. The default value is false. + */ + autoCorrect?: boolean; + + /** + * String value to set text auto capitalization. + * See: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autocapitalize + */ + autoCapitalize?: 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters'; + + /** + * String value to set return key type + * See: https://reactnative.dev/docs/textinput#returnkeytype + */ + enterKeyHint?: 'done' | 'go' | 'next' | 'search' | 'send'; + + /** + * Boolean value to enable paste as plain text. The default value is false. + */ + pasteAsPlainText?: boolean; + + /** + * HTML element used to insert when the user presses enter. The default value is div. + */ + defaultParagraphSeparator?: string; + + /** + * Callback called after the editor has been initialized + */ + editorInitializedCallback?: () => void; + + /** + * Callback after editor data modification + */ + onChange?: (text: string) => void; + + /** + * Callback when the user pastes some content + * @param {string} data pastes values + */ + onPaste?: (data: string) => void; + + /** + * Callback when the user keyup some content + */ + onKeyUp?: ({keyCode: number, key: string}) => void; + + /** + * Callback when the user keydown some content + */ + onKeyDown?: ({keyCode: number, key: string}) => void; + + /** + * Callback input chat + * Android and iOS inputType are not the same + */ + onInput?: ({data: string, inputType: string}) => void; + + /** + * Callback when the link clicked + */ + onLink?: (url: string) => void; + + /** + * Callback when the editor focus some content + */ + onFocus?: () => void; + + /** + * Callback when the editor blur some content + */ + onBlur?: () => void; + + /** + * Callback Enter the position of the cursor + */ + onCursorPosition?: (offsetY: number) => void; + + /** + * Callback after height change + */ + onHeightChange?: (height: number) => void; + + onMessage?: (message: {type: string; id: string; data?: any}) => void; + + /** + * When first gaining focus, the cursor moves to the end of the text + * Default is true + */ + firstFocusEnd?: boolean; + + /** + * Styling for container or for Rich Editor more dark or light settings + */ + editorStyle?: { + backgroundColor?: string; // editor background color + color?: string; // editor text color + caretColor?: string; // cursor/selection color + placeholderColor?: string; // editor placeholder text color + contentCSSText?: string; // editor content css text + initialCSSText?: string; // editor global css initial text + cssText?: string; // editor global css text + }; + + /** + * Use style instead of dedicated tags + */ + styleWithCSS?: boolean; } export type SelectionChangeListener = (items: (string | {type: string; value: string})[]) => void; -export const actions: {[key: string]: string}; +export enum actions { + content = 'content', + updateHeight = 'UPDATE_HEIGHT', + setBold = 'bold', + setItalic = 'italic', + setUnderline = 'underline', + heading1 = 'heading1', + heading2 = 'heading2', + heading3 = 'heading3', + heading4 = 'heading4', + heading5 = 'heading5', + heading6 = 'heading6', + insertLine = 'line', + setParagraph = 'paragraph', + removeFormat = 'removeFormat', + alignLeft = 'justifyLeft', + alignCenter = 'justifyCenter', + alignRight = 'justifyRight', + alignFull = 'justifyFull', + insertBulletsList = 'unorderedList', + insertOrderedList = 'orderedList', + checkboxList = 'checkboxList', + insertLink = 'link', + insertText = 'text', + insertHTML = 'html', + insertImage = 'image', + insertVideo = 'video', + fontSize = 'fontSize', + fontName = 'fontName', + setSubscript = 'subscript', + setSuperscript = 'superscript', + setStrikethrough = 'strikeThrough', + setHR = 'horizontalRule', + indent = 'indent', + outdent = 'outdent', + undo = 'undo', + redo = 'redo', + code = 'code', + table = 'table', + line = 'line', + foreColor = 'foreColor', + hiliteColor = 'hiliteColor', + blockquote = 'quote', + keyboard = 'keyboard', + setTitlePlaceholder = 'SET_TITLE_PLACEHOLDER', + setContentPlaceholder = 'SET_CONTENT_PLACEHOLDER', + setTitleFocusHandler = 'SET_TITLE_FOCUS_HANDLER', + setContentFocusHandler = 'SET_CONTENT_FOCUS_HANDLER', + prepareInsert = 'PREPARE_INSERT', + restoreSelection = 'RESTORE_SELECTION', + setCustomCSS = 'SET_CUSTOM_CSS', + setTextColor = 'SET_TEXT_COLOR', + setBackgroundColor = 'SET_BACKGROUND_COLOR', + init = 'init', + setEditorHeight = 'SET_EDITOR_HEIGHT', + setFooterHeight = 'SET_FOOTER_HEIGHT', + setPlatform = 'SET_PLATFORM', +} + +export type FONT_SIZE = 1 | 2 | 3 | 4 | 5 | 6 | 7; export type defaultActions = ['image', 'bold', 'italic', 'unorderedList', 'orderedList', 'link']; -export type createHTML = (options?: Object) => string; +export const createHTML = (options?: Object) => string; -export type getContentCSS = () => string; +export const getContentCSS = () => string; export type IconRecord = { - selected: boolean; - disabled: boolean; - tintColor: any; - iconSize: number; + selected: boolean; + disabled: boolean; + tintColor: any; + iconSize: number; }; -export class RichEditor extends React.Component { - // Public API +export declare class RichEditor extends React.Component { + // Public API + + /** + * @deprecated please use onChange + */ + getContentHtml: () => Promise; - /** - * @deprecated please use onChange - */ - getContentHtml: () => Promise; + registerToolbar: (listener: SelectionChangeListener) => void; - registerToolbar: (listener: SelectionChangeListener) => void; + /** + * @deprecated please use onFocus + */ + setContentFocusHandler: (listener: () => void) => void; - /** - * @deprecated please use onFocus - */ - setContentFocusHandler: (listener: () => void) => void; + /** + * Set current HTML to be rendered + */ + setContentHTML: (html: string) => void; - /** - * Set current HTML to be rendered - */ - setContentHTML: (html: string) => void; + blurContentEditor: () => void; - blurContentEditor: () => void; + focusContentEditor: () => void; - focusContentEditor: () => void; + insertImage: (attributes: any, style?: string) => void; - insertImage: (attributes: any, style?: string) => void; + insertVideo: (attributes: any, style?: string) => void; - insertVideo: (attributes: any, style?: string) => void; + insertLink: (title: string, url: string) => void; - insertLink: (title: string, url: string) => void; + insertText: (text: string) => void; - insertText: (text: string) => void; + insertHTML: (html: string) => void; - insertHTML: (html: string) => void; + injectJavascript: (type: string) => void; - injectJavascript: (type: string) => void; + preCode: (type: string) => void; - preCode: (type: string) => void; + /** + * 1 = 10px, 2 = 13px, 3 = 16px, 4 = 18px, 5 = 24px, 6 = 32px, 7 = 48px; + */ + setFontSize: (size: FONT_SIZE) => void; - /** - * 1 = 10px, 2 = 13px, 3 = 16px, 4 = 18px, 5 = 24px, 6 = 32px, 7 = 48px; - */ - setFontSize: (size: 1 | 2 | 3 | 4 | 5 | 6 | 7) => void; + /** + * The background color of the selected text + * @param color + */ + setHiliteColor: (color: string) => void; - /** - * The background color of the selected text - * @param color - */ - setHiliteColor: (color: string) => void; + /** + * The color of the selected text + * @param color + */ + setForeColor: (color: string) => void; - /** - * The color of the selected text - * @param color - */ - setForeColor: (color: string) => void; + /** Custom action sent to editor */ + sendAction(type: string, action: string, data?: any, options?: any): void; - /** - * $ = document.querySelector - * this.richText.current?.commandDOM(`$('#title').style.color='${color}'`); - */ - commandDOM: (command: string) => void; + /** + * $ = document.querySelector + * this.richText.current?.commandDOM(`$('#title').style.color='${color}'`); + */ + commandDOM: (command: string) => void; - /** - * Execute JS in the editor - * $ = document - * this.richText.current?.commandDOM('$.execCommand('insertHTML', false, "
")'); - */ - command: (command: string) => void; + /** + * Execute JS in the editor + * $ = document + * this.richText.current?.commandDOM('$.execCommand('insertHTML', false, "
")'); + */ + command: (command: string) => void; - /** - * Returns whether the keyboard is on - */ - isKeyboardOpen: boolean; + /** + * Returns whether the keyboard is on + */ + isKeyboardOpen: boolean; - /** - * Dismisses the active keyboard and removes focus. - */ - dismissKeyboard: () => void; + /** + * Dismisses the active keyboard and removes focus. + */ + dismissKeyboard: () => void; + + render(): JSX.Element; } -export interface RichToolbarProps { - /** - * Function that returns a reference to the RichEditor instance - * Optional editor props - */ - getEditor?: () => RichEditor; - - /** - * React.createRef reference to the RichEditor instance - * Optional getEditor props - */ - editor?: React.createRef; - - unselectedButtonStyle?: StyleProp; - selectedButtonStyle?: StyleProp; - disabledButtonStyle?: StyleProp; - - /** - * Color for selected button Icon - */ - selectedIconTint?: string; - /** - * Color for unselected button Icon - */ - iconTint?: string; - /** - * Color for disabled button Icon - */ - disabledIconTint?: string; - - /** - * Boolean value to disable editor. The default value is false. - */ - disabled?: boolean; - /** - * Custom renderer for toolbar actions - */ - renderAction?: (action: string, selected: boolean) => React.Element; - - /** - * Custom style prop for the toolbar - */ - style?: StyleProp; - - /** - * Flat container style prop for the toolbar - */ - flatContainerStyle?: StyleProp; - - /** - * Your own set if images for the toolbar - */ - iconMap?: Record React.Element | ImageSourcePropType>; - - /** - * Logic for what happens when you press on the add image button - */ - onPressAddImage?: () => void; - - /** - * Logic for what happens when you press on the add insert link button - */ - onInsertLink?: () => void; - - /** - * Custom actions you want the toolbar to permit. - * By default the toolbar permits an Action set of type DefaultActions - */ - actions?: Partial | string[]; +export interface RichToolbarProps { + /** + * Function that returns a reference to the RichEditor instance + * Optional editor props + */ + getEditor?: () => RichEditor; + + /** + * React.createRef reference to the RichEditor instance + * Optional getEditor props + */ + editor?: React.createRef; + + unselectedButtonStyle?: StyleProp; + selectedButtonStyle?: StyleProp; + disabledButtonStyle?: StyleProp; + + /** + * Color for selected button Icon + */ + selectedIconTint?: string; + /** + * Color for unselected button Icon + */ + iconTint?: string; + /** + * Color for disabled button Icon + */ + disabledIconTint?: string; + + /** + * Boolean value to disable editor. The default value is false. + */ + disabled?: boolean; + /** + * Custom renderer for toolbar actions + */ + renderAction?: (action: string, selected: boolean) => React.Element; + + /** + * Custom style prop for the toolbar + */ + style?: StyleProp; + + /** + * Flat container style prop for the toolbar + */ + flatContainerStyle?: StyleProp; + + /** + * Your own set if images for the toolbar + */ + iconMap?: Record React.Element | ImageSourcePropType>; + + /** + * Logic for what happens when you press on the add image button + */ + onPressAddImage?: () => void; + + /** + * Logic for what happens when you press on the add insert link button + */ + onInsertLink?: () => void; + + /** + * Custom actions you want the toolbar to permit. + * By default, the toolbar permits an Action set of type DefaultActions + */ + actions?: A[]; } -export class RichToolbar extends React.Component {} +export declare class RichToolbar extends React.Component { + render(): JSX.Element; +} diff --git a/src/RichToolbar.js b/src/RichToolbar.js index d5bd31e..d2d4ac1 100755 --- a/src/RichToolbar.js +++ b/src/RichToolbar.js @@ -3,284 +3,285 @@ import {FlatList, Image, StyleSheet, TouchableOpacity, View} from 'react-native' import {actions} from './const'; export const defaultActions = [ - actions.keyboard, - actions.setBold, - actions.setItalic, - actions.setUnderline, - actions.removeFormat, - actions.insertBulletsList, - actions.indent, - actions.outdent, - actions.insertLink, + actions.keyboard, + actions.setBold, + actions.setItalic, + actions.setUnderline, + actions.removeFormat, + actions.insertBulletsList, + actions.indent, + actions.outdent, + actions.insertLink, ]; function getDefaultIcon() { - const texts = {}; - // new icon styles of experiment - texts[actions.insertImage] = require('../img/image.png'); - texts[actions.keyboard] = require('../img/keyboard.png'); - texts[actions.setBold] = require('../img/bold.png'); - texts[actions.setItalic] = require('../img/italic.png'); - texts[actions.setSubscript] = require('../img/subscript.png'); - texts[actions.setSuperscript] = require('../img/superscript.png'); - texts[actions.insertBulletsList] = require('../img/ul.png'); - texts[actions.insertOrderedList] = require('../img/ol.png'); - texts[actions.insertLink] = require('../img/link.png'); - texts[actions.setStrikethrough] = require('../img/strikethrough.png'); - texts[actions.setUnderline] = require('../img/underline.png'); - texts[actions.insertVideo] = require('../img/video.png'); - texts[actions.removeFormat] = require('../img/remove_format.png'); - texts[actions.undo] = require('../img/undo.png'); - texts[actions.redo] = require('../img/redo.png'); - texts[actions.checkboxList] = require('../img/checkbox.png'); - texts[actions.table] = require('../img/table.png'); - texts[actions.code] = require('../img/code.png'); - texts[actions.outdent] = require('../img/outdent.png'); - texts[actions.indent] = require('../img/indent.png'); - texts[actions.alignLeft] = require('../img/justify_left.png'); - texts[actions.alignCenter] = require('../img/justify_center.png'); - texts[actions.alignRight] = require('../img/justify_right.png'); - texts[actions.alignFull] = require('../img/justify_full.png'); - texts[actions.blockquote] = require('../img/blockquote.png'); - texts[actions.line] = require('../img/line.png'); - texts[actions.fontSize] = require('../img/fontSize.png'); - return texts; + const texts = {}; + // new icon styles of experiment + texts[actions.insertImage] = require('../img/image.png'); + texts[actions.keyboard] = require('../img/keyboard.png'); + texts[actions.setBold] = require('../img/bold.png'); + texts[actions.setItalic] = require('../img/italic.png'); + texts[actions.setSubscript] = require('../img/subscript.png'); + texts[actions.setSuperscript] = require('../img/superscript.png'); + texts[actions.insertBulletsList] = require('../img/ul.png'); + texts[actions.insertOrderedList] = require('../img/ol.png'); + texts[actions.insertLink] = require('../img/link.png'); + texts[actions.setStrikethrough] = require('../img/strikethrough.png'); + texts[actions.setUnderline] = require('../img/underline.png'); + texts[actions.insertVideo] = require('../img/video.png'); + texts[actions.removeFormat] = require('../img/remove_format.png'); + texts[actions.undo] = require('../img/undo.png'); + texts[actions.redo] = require('../img/redo.png'); + texts[actions.checkboxList] = require('../img/checkbox.png'); + texts[actions.table] = require('../img/table.png'); + texts[actions.code] = require('../img/code.png'); + texts[actions.outdent] = require('../img/outdent.png'); + texts[actions.indent] = require('../img/indent.png'); + texts[actions.alignLeft] = require('../img/justify_left.png'); + texts[actions.alignCenter] = require('../img/justify_center.png'); + texts[actions.alignRight] = require('../img/justify_right.png'); + texts[actions.alignFull] = require('../img/justify_full.png'); + texts[actions.blockquote] = require('../img/blockquote.png'); + texts[actions.line] = require('../img/line.png'); + texts[actions.fontSize] = require('../img/fontSize.png'); + return texts; } // noinspection FallThroughInSwitchStatementJS export default class RichToolbar extends Component { + static defaultProps = { + actions: defaultActions, + disabled: false, + iconTint: '#71787F', + iconSize: 20, + iconGap: 16, + }; - static defaultProps = { - actions: defaultActions, - disabled: false, - iconTint: '#71787F', - iconSize: 20, - iconGap: 16, + constructor(props) { + super(props); + this.editor = null; + this.state = { + items: [], }; + } - constructor(props) { - super(props); - this.editor = null; - this.state = { - items: [], - }; + shouldComponentUpdate(nextProps, nextState) { + let that = this; + return ( + nextState.items !== that.state.items || + nextState.actions !== that.state.actions || + nextState.data !== that.state.data || + nextProps.style !== that.props.style + ); + } + + static getDerivedStateFromProps(nextProps, prevState) { + const {actions} = nextProps; + if (actions !== prevState.actions) { + let {items = []} = prevState; + return { + actions, + data: actions.map(action => ({action, selected: items.includes(action)})), + }; } + return null; + } + + componentDidMount() { + setTimeout(this._mount); + } - shouldComponentUpdate(nextProps, nextState) { - let that = this; - return ( - nextState.items !== that.state.items || - nextState.actions !== that.state.actions || - nextState.data !== that.state.data || - nextProps.style !== that.props.style + _mount = () => { + const {editor: {current: editor} = {current: this.props.getEditor?.()}} = this.props; + if (!editor) { + // No longer throw an error, just try to re-load it when needed. + // This is because the webview may go away during long periods of inactivity, + // and the ref will be lost, causing the entire app to crash in this throw new error. + //throw new Error('Toolbar has no editor!'); + if (__DEV__) { + console.warn( + 'Toolbar has no editor. Please make sure the prop getEditor returns a ref to the editor component.', ); + } + } else { + editor.registerToolbar(selectedItems => this.setSelectedItems(selectedItems)); + this.editor = editor; } + }; - static getDerivedStateFromProps(nextProps, prevState) { - const {actions} = nextProps; - if (actions !== prevState.actions) { - let {items = []} = prevState; - return { - actions, - data: actions.map((action) => ({action, selected: items.includes(action)})), - }; - } - return null; + setSelectedItems(items) { + const {items: selectedItems} = this.state; + if (this.editor && items !== selectedItems) { + this.setState({ + items, + data: this.state.actions.map(action => ({action, selected: items.includes(action)})), + }); } + } - componentDidMount() { - setTimeout(this._mount); - } + _getButtonSelectedStyle() { + return this.props.selectedButtonStyle && this.props.selectedButtonStyle; + } - _mount = () => { - const {editor: {current: editor} = {current: this.props.getEditor?.()}} = this.props; - if (!editor) { - // No longer throw an error, just try to re-load it when needed. - // This is because the webview may go away during long periods of inactivity, - // and the ref will be lost, causing the entire app to crash in this throw new error. - //throw new Error('Toolbar has no editor!'); - if (__DEV__) { - console.warn("Toolbar has no editor. Please make sure the prop getEditor returns a ref to the editor component."); - } - } else { - editor.registerToolbar((selectedItems) => this.setSelectedItems(selectedItems)); - this.editor = editor; - } - }; + _getButtonUnselectedStyle() { + return this.props.unselectedButtonStyle && this.props.unselectedButtonStyle; + } - setSelectedItems(items) { - const {items: selectedItems} = this.state; - if (this.editor && items !== selectedItems) { - this.setState({ - items, - data: this.state.actions.map((action) => ({action, selected: items.includes(action)})), - }); - } - } + _getButtonDisabledStyle() { + return this.props.disabledButtonStyle && this.props.disabledButtonStyle; + } - _getButtonSelectedStyle() { - return this.props.selectedButtonStyle && this.props.selectedButtonStyle; + _getButtonIcon(action) { + const {iconMap} = this.props; + if (iconMap && iconMap[action]) { + return iconMap[action]; + } else { + return getDefaultIcon()[action]; } + } - _getButtonUnselectedStyle() { - return this.props.unselectedButtonStyle && this.props.unselectedButtonStyle; + handleKeyboard() { + const editor = this.editor; + if (!editor) { + this._mount(); + return; } - - _getButtonDisabledStyle() { - return this.props.disabledButtonStyle && this.props.disabledButtonStyle; + if (editor.isKeyboardOpen) { + editor.dismissKeyboard(); + } else { + editor.focusContentEditor(); } + } - _getButtonIcon(action) { - const {iconMap} = this.props; - if (iconMap && iconMap[action]) { - return iconMap[action]; - } else { - return getDefaultIcon()[action]; - } - } + _onPress(action) { + const {onPressAddImage, onInsertLink, insertVideo} = this.props; + const editor = this.editor; - handleKeyboard() { - const editor = this.editor; - if (!editor) { - this._mount(); - return; - } - if (editor.isKeyboardOpen) { - editor.dismissKeyboard(); - } else { - editor.focusContentEditor(); - } + if (!editor) { + this._mount(); + return; } - _onPress(action) { - const {onPressAddImage, onInsertLink, insertVideo} = this.props; - const editor = this.editor; - - if (!editor) { - this._mount(); - return; - } - - switch (action) { - case actions.insertLink: - if (onInsertLink) return onInsertLink(); - case actions.setBold: - case actions.setItalic: - case actions.undo: - case actions.redo: - case actions.insertBulletsList: - case actions.insertOrderedList: - case actions.checkboxList: - case actions.setUnderline: - case actions.heading1: - case actions.heading2: - case actions.heading3: - case actions.heading4: - case actions.heading5: - case actions.heading6: - case actions.code: - case actions.blockquote: - case actions.line: - case actions.setParagraph: - case actions.removeFormat: - case actions.alignLeft: - case actions.alignCenter: - case actions.alignRight: - case actions.alignFull: - case actions.setSubscript: - case actions.setSuperscript: - case actions.setStrikethrough: - case actions.setHR: - case actions.indent: - case actions.outdent: - editor.showAndroidKeyboard(); - editor.sendAction(action, 'result'); - break; - case actions.insertImage: - onPressAddImage && onPressAddImage(); - break; - case actions.insertVideo: - insertVideo && insertVideo(); - break; - case actions.keyboard: - this.handleKeyboard(); - break; - default: - this.props[action] && this.props[action](); - break; - } + switch (action) { + case actions.insertLink: + if (onInsertLink) return onInsertLink(); + case actions.setBold: + case actions.setItalic: + case actions.undo: + case actions.redo: + case actions.insertBulletsList: + case actions.insertOrderedList: + case actions.checkboxList: + case actions.setUnderline: + case actions.heading1: + case actions.heading2: + case actions.heading3: + case actions.heading4: + case actions.heading5: + case actions.heading6: + case actions.code: + case actions.blockquote: + case actions.line: + case actions.setParagraph: + case actions.removeFormat: + case actions.alignLeft: + case actions.alignCenter: + case actions.alignRight: + case actions.alignFull: + case actions.setSubscript: + case actions.setSuperscript: + case actions.setStrikethrough: + case actions.setHR: + case actions.indent: + case actions.outdent: + editor.showAndroidKeyboard(); + editor.sendAction(action, 'result'); + break; + case actions.insertImage: + onPressAddImage?.(); + break; + case actions.insertVideo: + insertVideo?.(); + break; + case actions.keyboard: + this.handleKeyboard(); + break; + default: + this.props[action]?.(); + break; } + } - _defaultRenderAction(action, selected) { - let that = this; - const icon = that._getButtonIcon(action); - const {iconSize, iconGap, disabled, itemStyle} = that.props; - const style = selected ? that._getButtonSelectedStyle() : that._getButtonUnselectedStyle(); - const tintColor = disabled - ? that.props.disabledIconTint - : selected - ? that.props.selectedIconTint - : that.props.iconTint; - return ( - that._onPress(action)}> - {icon ? ( - typeof icon === 'function' ? ( - icon({selected, disabled, tintColor, iconSize, iconGap}) - ) : ( - - ) - ) : null} - - ); - } + _defaultRenderAction(action, selected) { + let that = this; + const icon = that._getButtonIcon(action); + const {iconSize, iconGap, disabled, itemStyle} = that.props; + const style = selected ? that._getButtonSelectedStyle() : that._getButtonUnselectedStyle(); + const tintColor = disabled + ? that.props.disabledIconTint + : selected + ? that.props.selectedIconTint + : that.props.iconTint; + return ( + that._onPress(action)}> + {icon ? ( + typeof icon === 'function' ? ( + icon({selected, disabled, tintColor, iconSize, iconGap}) + ) : ( + + ) + ) : null} + + ); + } - _renderAction(action, selected) { - return this.props.renderAction - ? this.props.renderAction(action, selected) - : this._defaultRenderAction(action, selected); - } + _renderAction(action, selected) { + return this.props.renderAction + ? this.props.renderAction(action, selected) + : this._defaultRenderAction(action, selected); + } - render() { - const {style, disabled, children, flatContainerStyle} = this.props; - const vStyle = [styles.barContainer, style, disabled && this._getButtonDisabledStyle()]; - return ( - - item.action + '-' + index} - data={this.state.data} - alwaysBounceHorizontal={false} - showsHorizontalScrollIndicator={false} - renderItem={({item}) => this._renderAction(item.action, item.selected)} - contentContainerStyle={flatContainerStyle} - /> - {children} - - ); - } + render() { + const {style, disabled, children, flatContainerStyle} = this.props; + const vStyle = [styles.barContainer, style, disabled && this._getButtonDisabledStyle()]; + return ( + + item.action + '-' + index} + data={this.state.data} + alwaysBounceHorizontal={false} + showsHorizontalScrollIndicator={false} + renderItem={({item}) => this._renderAction(item.action, item.selected)} + contentContainerStyle={flatContainerStyle} + /> + {children} + + ); + } } const styles = StyleSheet.create({ - barContainer: { - height: 44, - backgroundColor: '#efefef', - alignItems: 'center', - }, + barContainer: { + height: 44, + backgroundColor: '#efefef', + alignItems: 'center', + }, - item: { - justifyContent: 'center', - alignItems: 'center', - }, + item: { + justifyContent: 'center', + alignItems: 'center', + }, }); diff --git a/src/const.js b/src/const.js index 35abf5c..7e6fe56 100755 --- a/src/const.js +++ b/src/const.js @@ -1,78 +1,78 @@ export const actions = { - content: 'content', + content: 'content', - updateHeight: 'UPDATE_HEIGHT', + updateHeight: 'UPDATE_HEIGHT', - setBold: 'bold', - setItalic: 'italic', - setUnderline: 'underline', - heading1: 'heading1', - heading2: 'heading2', - heading3: 'heading3', - heading4: 'heading4', - heading5: 'heading5', - heading6: 'heading6', - insertLine: 'line', - setParagraph: 'paragraph', - removeFormat: 'removeFormat', - alignLeft: 'justifyLeft', - alignCenter: 'justifyCenter', - alignRight: 'justifyRight', - alignFull: 'justifyFull', - insertBulletsList: 'unorderedList', - insertOrderedList: 'orderedList', - checkboxList: 'checkboxList', - insertLink: 'link', - insertText: 'text', - insertHTML: 'html', - insertImage: 'image', - insertVideo: 'video', - fontSize: 'fontSize', - fontName: 'fontName', - setSubscript: 'subscript', - setSuperscript: 'superscript', - setStrikethrough: 'strikeThrough', - setHR: 'horizontalRule', - indent: 'indent', - outdent: 'outdent', - undo: 'undo', - redo: 'redo', - code: 'code', - table: 'table', - line: 'line', - foreColor: 'foreColor', - hiliteColor: 'hiliteColor', - blockquote: 'quote', - keyboard: 'keyboard', - setTitlePlaceholder: 'SET_TITLE_PLACEHOLDER', - setContentPlaceholder: 'SET_CONTENT_PLACEHOLDER', - setTitleFocusHandler: 'SET_TITLE_FOCUS_HANDLER', - setContentFocusHandler: 'SET_CONTENT_FOCUS_HANDLER', - prepareInsert: 'PREPARE_INSERT', - restoreSelection: 'RESTORE_SELECTION', - setCustomCSS: 'SET_CUSTOM_CSS', - setTextColor: 'SET_TEXT_COLOR', - setBackgroundColor: 'SET_BACKGROUND_COLOR', - init: 'init', - setEditorHeight: 'SET_EDITOR_HEIGHT', - setFooterHeight: 'SET_FOOTER_HEIGHT', - setPlatform: 'SET_PLATFORM', + setBold: 'bold', + setItalic: 'italic', + setUnderline: 'underline', + heading1: 'heading1', + heading2: 'heading2', + heading3: 'heading3', + heading4: 'heading4', + heading5: 'heading5', + heading6: 'heading6', + insertLine: 'line', + setParagraph: 'paragraph', + removeFormat: 'removeFormat', + alignLeft: 'justifyLeft', + alignCenter: 'justifyCenter', + alignRight: 'justifyRight', + alignFull: 'justifyFull', + insertBulletsList: 'unorderedList', + insertOrderedList: 'orderedList', + checkboxList: 'checkboxList', + insertLink: 'link', + insertText: 'text', + insertHTML: 'html', + insertImage: 'image', + insertVideo: 'video', + fontSize: 'fontSize', + fontName: 'fontName', + setSubscript: 'subscript', + setSuperscript: 'superscript', + setStrikethrough: 'strikeThrough', + setHR: 'horizontalRule', + indent: 'indent', + outdent: 'outdent', + undo: 'undo', + redo: 'redo', + code: 'code', + table: 'table', + line: 'line', + foreColor: 'foreColor', + hiliteColor: 'hiliteColor', + blockquote: 'quote', + keyboard: 'keyboard', + setTitlePlaceholder: 'SET_TITLE_PLACEHOLDER', + setContentPlaceholder: 'SET_CONTENT_PLACEHOLDER', + setTitleFocusHandler: 'SET_TITLE_FOCUS_HANDLER', + setContentFocusHandler: 'SET_CONTENT_FOCUS_HANDLER', + prepareInsert: 'PREPARE_INSERT', + restoreSelection: 'RESTORE_SELECTION', + setCustomCSS: 'SET_CUSTOM_CSS', + setTextColor: 'SET_TEXT_COLOR', + setBackgroundColor: 'SET_BACKGROUND_COLOR', + init: 'init', + setEditorHeight: 'SET_EDITOR_HEIGHT', + setFooterHeight: 'SET_FOOTER_HEIGHT', + setPlatform: 'SET_PLATFORM', }; export const messages = { - CONTENT_HTML_RESPONSE: 'CONTENT_HTML_RESPONSE', - LOG: 'LOG', - CONTENT_FOCUSED: 'CONTENT_FOCUSED', - CONTENT_BLUR: 'CONTENT_BLUR', - SELECTION_CHANGE: 'SELECTION_CHANGE', - CONTENT_CHANGE: 'CONTENT_CHANGE', - CONTENT_PASTED: 'CONTENT_PASTED', - CONTENT_KEYUP: 'CONTENT_KEYUP', - CONTENT_KEYDOWN: 'CONTENT_KEYDOWN', - SELECTED_TEXT_RESPONSE: 'SELECTED_TEXT_RESPONSE', - LINK_TOUCHED: 'LINK_TOUCHED', - SELECTED_TEXT_CHANGED: 'SELECTED_TEXT_CHANGED', - OFFSET_HEIGHT: 'OFFSET_HEIGHT', - OFFSET_Y: 'OFFSET_Y', - ON_INPUT: 'ON_INPUT', + CONTENT_HTML_RESPONSE: 'CONTENT_HTML_RESPONSE', + LOG: 'LOG', + CONTENT_FOCUSED: 'CONTENT_FOCUSED', + CONTENT_BLUR: 'CONTENT_BLUR', + SELECTION_CHANGE: 'SELECTION_CHANGE', + CONTENT_CHANGE: 'CONTENT_CHANGE', + CONTENT_PASTED: 'CONTENT_PASTED', + CONTENT_KEYUP: 'CONTENT_KEYUP', + CONTENT_KEYDOWN: 'CONTENT_KEYDOWN', + SELECTED_TEXT_RESPONSE: 'SELECTED_TEXT_RESPONSE', + LINK_TOUCHED: 'LINK_TOUCHED', + SELECTED_TEXT_CHANGED: 'SELECTED_TEXT_CHANGED', + OFFSET_HEIGHT: 'OFFSET_HEIGHT', + OFFSET_Y: 'OFFSET_Y', + ON_INPUT: 'ON_INPUT', };