react-native-enriched 0.0.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +875 -0
  3. package/ReactNativeEnriched.podspec +27 -0
  4. package/android/build.gradle +101 -0
  5. package/android/generated/java/com/facebook/react/viewmanagers/EnrichedTextInputViewManagerDelegate.java +146 -0
  6. package/android/generated/java/com/facebook/react/viewmanagers/EnrichedTextInputViewManagerInterface.java +55 -0
  7. package/android/generated/jni/react/renderer/components/RNEnrichedTextInputViewSpec/ComponentDescriptors.cpp +22 -0
  8. package/android/generated/jni/react/renderer/components/RNEnrichedTextInputViewSpec/ComponentDescriptors.h +24 -0
  9. package/android/generated/jni/react/renderer/components/RNEnrichedTextInputViewSpec/EventEmitters.cpp +118 -0
  10. package/android/generated/jni/react/renderer/components/RNEnrichedTextInputViewSpec/EventEmitters.h +95 -0
  11. package/android/generated/jni/react/renderer/components/RNEnrichedTextInputViewSpec/Props.cpp +128 -0
  12. package/android/generated/jni/react/renderer/components/RNEnrichedTextInputViewSpec/Props.h +577 -0
  13. package/android/generated/jni/react/renderer/components/RNEnrichedTextInputViewSpec/ShadowNodes.cpp +17 -0
  14. package/android/generated/jni/react/renderer/components/RNEnrichedTextInputViewSpec/ShadowNodes.h +23 -0
  15. package/android/generated/jni/react/renderer/components/RNEnrichedTextInputViewSpec/States.cpp +16 -0
  16. package/android/generated/jni/react/renderer/components/RNEnrichedTextInputViewSpec/States.h +20 -0
  17. package/android/gradle.properties +5 -0
  18. package/android/src/main/AndroidManifest.xml +3 -0
  19. package/android/src/main/AndroidManifestNew.xml +2 -0
  20. package/android/src/main/java/com/swmansion/enriched/EnrichedTextInputView.kt +535 -0
  21. package/android/src/main/java/com/swmansion/enriched/EnrichedTextInputViewLayoutManager.kt +64 -0
  22. package/android/src/main/java/com/swmansion/enriched/EnrichedTextInputViewManager.kt +292 -0
  23. package/android/src/main/java/com/swmansion/enriched/EnrichedTextInputViewPackage.kt +19 -0
  24. package/android/src/main/java/com/swmansion/enriched/events/MentionHandler.kt +40 -0
  25. package/android/src/main/java/com/swmansion/enriched/events/OnChangeHtmlEvent.kt +28 -0
  26. package/android/src/main/java/com/swmansion/enriched/events/OnChangeSelectionEvent.kt +29 -0
  27. package/android/src/main/java/com/swmansion/enriched/events/OnChangeStateEvent.kt +24 -0
  28. package/android/src/main/java/com/swmansion/enriched/events/OnChangeTextEvent.kt +30 -0
  29. package/android/src/main/java/com/swmansion/enriched/events/OnInputBlurEvent.kt +27 -0
  30. package/android/src/main/java/com/swmansion/enriched/events/OnInputFocusEvent.kt +27 -0
  31. package/android/src/main/java/com/swmansion/enriched/events/OnLinkDetectedEvent.kt +30 -0
  32. package/android/src/main/java/com/swmansion/enriched/events/OnMentionDetectedEvent.kt +29 -0
  33. package/android/src/main/java/com/swmansion/enriched/events/OnMentionEvent.kt +33 -0
  34. package/android/src/main/java/com/swmansion/enriched/spans/EnrichedBlockQuoteSpan.kt +34 -0
  35. package/android/src/main/java/com/swmansion/enriched/spans/EnrichedBoldSpan.kt +10 -0
  36. package/android/src/main/java/com/swmansion/enriched/spans/EnrichedCodeBlockSpan.kt +38 -0
  37. package/android/src/main/java/com/swmansion/enriched/spans/EnrichedH1Span.kt +17 -0
  38. package/android/src/main/java/com/swmansion/enriched/spans/EnrichedH2Span.kt +17 -0
  39. package/android/src/main/java/com/swmansion/enriched/spans/EnrichedH3Span.kt +17 -0
  40. package/android/src/main/java/com/swmansion/enriched/spans/EnrichedImageSpan.kt +41 -0
  41. package/android/src/main/java/com/swmansion/enriched/spans/EnrichedInlineCodeSpan.kt +16 -0
  42. package/android/src/main/java/com/swmansion/enriched/spans/EnrichedItalicSpan.kt +10 -0
  43. package/android/src/main/java/com/swmansion/enriched/spans/EnrichedLinkSpan.kt +24 -0
  44. package/android/src/main/java/com/swmansion/enriched/spans/EnrichedMentionSpan.kt +36 -0
  45. package/android/src/main/java/com/swmansion/enriched/spans/EnrichedOrderedListSpan.kt +71 -0
  46. package/android/src/main/java/com/swmansion/enriched/spans/EnrichedSpans.kt +111 -0
  47. package/android/src/main/java/com/swmansion/enriched/spans/EnrichedStrikeThroughSpan.kt +9 -0
  48. package/android/src/main/java/com/swmansion/enriched/spans/EnrichedUnderlineSpan.kt +9 -0
  49. package/android/src/main/java/com/swmansion/enriched/spans/EnrichedUnorderedListSpan.kt +49 -0
  50. package/android/src/main/java/com/swmansion/enriched/spans/interfaces/EnrichedBlockSpan.kt +4 -0
  51. package/android/src/main/java/com/swmansion/enriched/spans/interfaces/EnrichedHeadingSpan.kt +4 -0
  52. package/android/src/main/java/com/swmansion/enriched/spans/interfaces/EnrichedInlineSpan.kt +4 -0
  53. package/android/src/main/java/com/swmansion/enriched/spans/interfaces/EnrichedParagraphSpan.kt +4 -0
  54. package/android/src/main/java/com/swmansion/enriched/spans/interfaces/EnrichedSpan.kt +4 -0
  55. package/android/src/main/java/com/swmansion/enriched/spans/interfaces/EnrichedZeroWidthSpaceSpan.kt +5 -0
  56. package/android/src/main/java/com/swmansion/enriched/styles/HtmlStyle.kt +227 -0
  57. package/android/src/main/java/com/swmansion/enriched/styles/InlineStyles.kt +146 -0
  58. package/android/src/main/java/com/swmansion/enriched/styles/ListStyles.kt +173 -0
  59. package/android/src/main/java/com/swmansion/enriched/styles/ParagraphStyles.kt +186 -0
  60. package/android/src/main/java/com/swmansion/enriched/styles/ParametrizedStyles.kt +223 -0
  61. package/android/src/main/java/com/swmansion/enriched/utils/EnrichedParser.java +857 -0
  62. package/android/src/main/java/com/swmansion/enriched/utils/EnrichedSelection.kt +285 -0
  63. package/android/src/main/java/com/swmansion/enriched/utils/EnrichedSpanState.kt +204 -0
  64. package/android/src/main/java/com/swmansion/enriched/utils/Utils.kt +91 -0
  65. package/android/src/main/java/com/swmansion/enriched/watchers/EnrichedSpanWatcher.kt +73 -0
  66. package/android/src/main/java/com/swmansion/enriched/watchers/EnrichedTextWatcher.kt +51 -0
  67. package/android/src/main/new_arch/CMakeLists.txt +56 -0
  68. package/android/src/main/new_arch/RNEnrichedTextInputViewSpec.cpp +22 -0
  69. package/android/src/main/new_arch/RNEnrichedTextInputViewSpec.h +26 -0
  70. package/android/src/main/new_arch/react/renderer/components/RNEnrichedTextInputViewSpec/EnrichedTextInputComponentDescriptor.h +35 -0
  71. package/android/src/main/new_arch/react/renderer/components/RNEnrichedTextInputViewSpec/EnrichedTextInputMeasurementManager.cpp +51 -0
  72. package/android/src/main/new_arch/react/renderer/components/RNEnrichedTextInputViewSpec/EnrichedTextInputMeasurementManager.h +26 -0
  73. package/android/src/main/new_arch/react/renderer/components/RNEnrichedTextInputViewSpec/EnrichedTextInputShadowNode.cpp +34 -0
  74. package/android/src/main/new_arch/react/renderer/components/RNEnrichedTextInputViewSpec/EnrichedTextInputShadowNode.h +54 -0
  75. package/android/src/main/new_arch/react/renderer/components/RNEnrichedTextInputViewSpec/EnrichedTextInputState.cpp +9 -0
  76. package/android/src/main/new_arch/react/renderer/components/RNEnrichedTextInputViewSpec/EnrichedTextInputState.h +25 -0
  77. package/ios/EnrichedTextInputView.h +33 -0
  78. package/ios/EnrichedTextInputView.mm +1190 -0
  79. package/ios/EnrichedTextInputViewManager.mm +13 -0
  80. package/ios/config/InputConfig.h +67 -0
  81. package/ios/config/InputConfig.mm +382 -0
  82. package/ios/generated/RNEnrichedTextInputViewSpec/ComponentDescriptors.cpp +22 -0
  83. package/ios/generated/RNEnrichedTextInputViewSpec/ComponentDescriptors.h +24 -0
  84. package/ios/generated/RNEnrichedTextInputViewSpec/EventEmitters.cpp +118 -0
  85. package/ios/generated/RNEnrichedTextInputViewSpec/EventEmitters.h +95 -0
  86. package/ios/generated/RNEnrichedTextInputViewSpec/Props.cpp +128 -0
  87. package/ios/generated/RNEnrichedTextInputViewSpec/Props.h +577 -0
  88. package/ios/generated/RNEnrichedTextInputViewSpec/RCTComponentViewHelpers.h +384 -0
  89. package/ios/generated/RNEnrichedTextInputViewSpec/ShadowNodes.cpp +17 -0
  90. package/ios/generated/RNEnrichedTextInputViewSpec/ShadowNodes.h +23 -0
  91. package/ios/generated/RNEnrichedTextInputViewSpec/States.cpp +16 -0
  92. package/ios/generated/RNEnrichedTextInputViewSpec/States.h +20 -0
  93. package/ios/inputParser/InputParser.h +11 -0
  94. package/ios/inputParser/InputParser.mm +659 -0
  95. package/ios/inputTextView/InputTextView.h +6 -0
  96. package/ios/inputTextView/InputTextView.mm +115 -0
  97. package/ios/internals/EnrichedTextInputViewComponentDescriptor.h +17 -0
  98. package/ios/internals/EnrichedTextInputViewShadowNode.h +40 -0
  99. package/ios/internals/EnrichedTextInputViewShadowNode.mm +83 -0
  100. package/ios/internals/EnrichedTextInputViewState.cpp +10 -0
  101. package/ios/internals/EnrichedTextInputViewState.h +20 -0
  102. package/ios/styles/BlockQuoteStyle.mm +248 -0
  103. package/ios/styles/BoldStyle.mm +122 -0
  104. package/ios/styles/H1Style.mm +10 -0
  105. package/ios/styles/H2Style.mm +10 -0
  106. package/ios/styles/H3Style.mm +10 -0
  107. package/ios/styles/HeadingStyleBase.mm +144 -0
  108. package/ios/styles/InlineCodeStyle.mm +163 -0
  109. package/ios/styles/ItalicStyle.mm +110 -0
  110. package/ios/styles/LinkStyle.mm +463 -0
  111. package/ios/styles/MentionStyle.mm +476 -0
  112. package/ios/styles/OrderedListStyle.mm +225 -0
  113. package/ios/styles/StrikethroughStyle.mm +80 -0
  114. package/ios/styles/UnderlineStyle.mm +112 -0
  115. package/ios/styles/UnorderedListStyle.mm +225 -0
  116. package/ios/utils/BaseStyleProtocol.h +16 -0
  117. package/ios/utils/ColorExtension.h +6 -0
  118. package/ios/utils/ColorExtension.mm +27 -0
  119. package/ios/utils/FontExtension.h +13 -0
  120. package/ios/utils/FontExtension.mm +91 -0
  121. package/ios/utils/LayoutManagerExtension.h +6 -0
  122. package/ios/utils/LayoutManagerExtension.mm +171 -0
  123. package/ios/utils/LinkData.h +9 -0
  124. package/ios/utils/LinkData.mm +4 -0
  125. package/ios/utils/MentionParams.h +9 -0
  126. package/ios/utils/MentionParams.mm +4 -0
  127. package/ios/utils/MentionStyleProps.h +13 -0
  128. package/ios/utils/MentionStyleProps.mm +56 -0
  129. package/ios/utils/OccurenceUtils.h +37 -0
  130. package/ios/utils/OccurenceUtils.mm +124 -0
  131. package/ios/utils/ParagraphsUtils.h +7 -0
  132. package/ios/utils/ParagraphsUtils.mm +54 -0
  133. package/ios/utils/StringExtension.h +15 -0
  134. package/ios/utils/StringExtension.mm +57 -0
  135. package/ios/utils/StyleHeaders.h +74 -0
  136. package/ios/utils/StylePair.h +9 -0
  137. package/ios/utils/StylePair.mm +4 -0
  138. package/ios/utils/StyleTypeEnum.h +22 -0
  139. package/ios/utils/TextDecorationLineEnum.h +6 -0
  140. package/ios/utils/TextDecorationLineEnum.mm +4 -0
  141. package/ios/utils/TextInsertionUtils.h +6 -0
  142. package/ios/utils/TextInsertionUtils.mm +48 -0
  143. package/ios/utils/WordsUtils.h +6 -0
  144. package/ios/utils/WordsUtils.mm +88 -0
  145. package/ios/utils/ZeroWidthSpaceUtils.h +7 -0
  146. package/ios/utils/ZeroWidthSpaceUtils.mm +164 -0
  147. package/lib/module/EnrichedTextInput.js +191 -0
  148. package/lib/module/EnrichedTextInput.js.map +1 -0
  149. package/lib/module/EnrichedTextInputNativeComponent.ts +235 -0
  150. package/lib/module/index.js +4 -0
  151. package/lib/module/index.js.map +1 -0
  152. package/lib/module/normalizeHtmlStyle.js +141 -0
  153. package/lib/module/normalizeHtmlStyle.js.map +1 -0
  154. package/lib/module/package.json +1 -0
  155. package/lib/typescript/package.json +1 -0
  156. package/lib/typescript/src/EnrichedTextInput.d.ts +113 -0
  157. package/lib/typescript/src/EnrichedTextInput.d.ts.map +1 -0
  158. package/lib/typescript/src/EnrichedTextInputNativeComponent.d.ts +160 -0
  159. package/lib/typescript/src/EnrichedTextInputNativeComponent.d.ts.map +1 -0
  160. package/lib/typescript/src/index.d.ts +3 -0
  161. package/lib/typescript/src/index.d.ts.map +1 -0
  162. package/lib/typescript/src/normalizeHtmlStyle.d.ts +4 -0
  163. package/lib/typescript/src/normalizeHtmlStyle.d.ts.map +1 -0
  164. package/package.json +172 -1
  165. package/react-native.config.js +13 -0
  166. package/src/EnrichedTextInput.tsx +358 -0
  167. package/src/EnrichedTextInputNativeComponent.ts +235 -0
  168. package/src/index.tsx +9 -0
  169. package/src/normalizeHtmlStyle.ts +188 -0
package/README.md ADDED
@@ -0,0 +1,875 @@
1
+ # react-native-enriched
2
+
3
+ `react-native-enriched` is a powerful React Native library that exposes a rich text editor component:
4
+
5
+ - ⚡ Fully native text input component
6
+ - 🕹️ Synchronous text styling
7
+ - 🔍 Live styling detection and HTML parsing
8
+ - 🎨 Customizable styles
9
+ - 📱 Mobile platforms support
10
+ - 🏛 Supports only the New Architecture
11
+
12
+ `EnrichedTextInput`, the rich text editor component is an uncontrolled input. This means that it doesn't use any state or props to store its value, but instead directly interacts with the underlying platform-specific components. Thanks to this, the component is really performant and simple to use while offering complex and advanced features no other solution has.
13
+
14
+ Built by [Software Mansion](https://swmansion.com/) and sponsored by [Filament](https://filament.dm/).
15
+
16
+ <img width="128" height="69" alt="Software Mansion Logo" src="https://github.com/user-attachments/assets/f0e18471-a7aa-4e80-86ac-87686a86fe56" />
17
+ &nbsp;&nbsp;&nbsp;
18
+ <img width="48" height="48" alt="" src="https://github.com/user-attachments/assets/46c6bf1f-2685-497e-b699-d5a94b2582a3" />
19
+ &nbsp;&nbsp;&nbsp;
20
+ <img width="80" height="80" alt="Filament Logo" src="https://github.com/user-attachments/assets/4103ab79-da34-4164-aa5f-dcf08815bf65" />
21
+
22
+ ## Table of Contents
23
+
24
+ - [Prerequisites](#prerequisites)
25
+ - [Installation](#installation)
26
+ - [Usage](#usage)
27
+ - [Non Parametrized Styles](#non-parametrized-styles)
28
+ - [Links](#links)
29
+ - [Mentions](#mentions)
30
+ - [Inline Images](#inline-images)
31
+ - [Style Detection](#style-detection)
32
+ - [Other Events](#other-events)
33
+ - [Customizing \<EnrichedTextInput /> styles](#customizing-enrichedtextinput--styles)
34
+ - [API Reference](#api-reference)
35
+ - [Future Plans](#future-plans)
36
+ - [Contributing](#contributing)
37
+ - [License](#license)
38
+
39
+ ## Prerequisites
40
+
41
+ - `react-native-enriched` currently supports only Android and iOS platforms
42
+ - It works only with [the React Native New Architecture (Fabric)](https://reactnative.dev/architecture/landing-page) and supports the 3 latest stable React Native releases, currently `0.79`, `0.80` and `0.81`
43
+
44
+ ## Installation
45
+
46
+ ### Bare react native app
47
+
48
+ #### 1. Install the library
49
+
50
+ ```sh
51
+ yarn add react-native-enriched
52
+ ```
53
+
54
+ #### 2. Install iOS dependencies
55
+
56
+ The library includes native code so you will need to re-build the native app to use it.
57
+
58
+ ```sh
59
+ cd ios && bundler install && bundler exec pod install
60
+ ```
61
+
62
+ ### Expo app
63
+
64
+ #### 1. Install the library
65
+
66
+ ```sh
67
+ npx expo install react-native-enriched
68
+ ```
69
+
70
+ #### 2. Run prebuild
71
+
72
+ The library includes native code so you will need to re-build the native app to use it.
73
+
74
+ ```sh
75
+ npx expo prebuild
76
+ ```
77
+
78
+ > [!NOTE]
79
+ > The library won't work in Expo Go as it needs native changes.
80
+
81
+ ## Usage
82
+
83
+ Here's a simple example of an input that lets you toggle bold on its text and shows whether bold is currently active via the button color.
84
+
85
+ ```tsx
86
+ import { EnrichedTextInput } from 'react-native-enriched';
87
+ import type {
88
+ EnrichedTextInputInstance,
89
+ OnChangeStateEvent,
90
+ } from 'react-native-enriched';
91
+ import { useState, useRef } from 'react';
92
+ import { View, Button, StyleSheet } from 'react-native';
93
+
94
+ export default function App() {
95
+ const ref = useRef<EnrichedTextInputInstance>(null);
96
+
97
+ const [stylesState, setStylesState] = useState<OnChangeStateEvent | null>();
98
+
99
+ return (
100
+ <View style={styles.container}>
101
+ <EnrichedTextInput
102
+ ref={ref}
103
+ onChangeState={(e) => setStylesState(e.nativeEvent)}
104
+ style={styles.input}
105
+ />
106
+ <Button
107
+ title="Toggle bold"
108
+ color={stylesState?.isBold ? 'green' : 'gray'}
109
+ onPress={() => ref.current?.toggleBold()}
110
+ />
111
+ </View>
112
+ );
113
+ }
114
+
115
+ const styles = StyleSheet.create({
116
+ container: {
117
+ flex: 1,
118
+ justifyContent: 'center',
119
+ alignItems: 'center',
120
+ },
121
+ input: {
122
+ fontSize: 20,
123
+ padding: 10,
124
+ maxHeight: 200,
125
+ backgroundColor: 'lightgray',
126
+ },
127
+ });
128
+
129
+ ```
130
+
131
+ Summary of what happens here:
132
+
133
+ 1. Any methods imperatively called on the input to e.g. toggle some style must be used through a `ref` of `EnrichedTextInputInstance` type. Here, `toggleBold` method that is called on the button press calls `ref.current?.toggleBold()`, which toggles the bold styling within the current selection.
134
+ 2. All the active styles info is emitted by `onChangeState` event. Set up a proper callback that accepts a `NativeSyntheticEvent<OnChangeStateEvent>` argument and you can access an object with boolean properties indicating which styles are active, such as `isBold` in the example. Here, this info is stored in a react state and used to change colors on the button.
135
+
136
+ ## Non Parametrized Styles
137
+
138
+ Supported styles:
139
+
140
+ - **bold**
141
+ - *italic*
142
+ - <ins>underline</ins>
143
+ - ~~strikethrough~~
144
+ - `inline code`
145
+ - H1 heading
146
+ - H2 heading
147
+ - H3 heading
148
+ - `codeblock`
149
+ - > blockquote
150
+ - ordered list
151
+ - unordered list
152
+
153
+ > [!NOTE]
154
+ > The iOS doesn't support codeblocks just yet but it's planned in the near future!
155
+
156
+ Each of the styles can be toggled the same way as in the example from [usage section](#usage); call a proper `toggle` function on the component ref.
157
+
158
+ Each call toggles the style within the current text selection. We can still divide styles into two categories based on how they treat the selection:
159
+
160
+ - Inline styles (bold, italic, underline, strikethrough, inline code). They are being toggled on exactly the character range that is currently selected. When toggling the style with just the cursor in place (no selection), the style is ready to be used and will be applied to the next characters that the user inputs.
161
+
162
+ - Paragraph styles (headings, codeblock, blockquote, lists). They are being toggled on the entire paragraph that the selection is in. By paragraph we mean a part of the text between two newlines (enters) or the text's beginning/ending.
163
+ If the selection spans more than one paragraph, logically more of them will be affected by the toggle. Toggling these styles with the cursor in place (no selection) makes changes to the very paragraph the cursor is in.
164
+
165
+ ## Links
166
+
167
+ The links are here, just like in any other editor, a piece of text with a URL attributed to it. They can be added in two ways: automatically or manually.
168
+
169
+ ### Automatic links detection
170
+
171
+ `react-native-enriched` automatically detects words that appear to be some URLs and makes them links. Currently we are using pretty naive approach to detect whether text can be treated as a link or not. On iOS it's a pretty simple regex, on Android we are using URL regex provided by the system.
172
+
173
+ ### Applying links manually
174
+
175
+ Links can also be added by calling [setLink](#setlink) method on the input ref:
176
+
177
+ The `start`, `end` and `text` arguments for the method can be easily taken from [onChangeSelection](#onchangeselection) event payload as it returns exact `start` and `end` of the selection and the `text` it spans. This way, you just set the underlying URL to whatever is selected in there.
178
+
179
+ Passing a different `text` than the one in the selection will properly replace it before applying the link.
180
+
181
+ A complete example of a setup that supports both setting links on the selected text, as well as putting them in the place of cursor and editing existing links can be found in the example app code.
182
+
183
+ ## Mentions
184
+
185
+ Mentions are meant to be a customisable style that lets you put mentioning phrases in the input, e.g. `@someone` or `#some_channel` or `[any_character_you_like]something`.
186
+
187
+ ### Mention Indicators
188
+
189
+ There is a [mentionIndicators](#mentionindicators) prop that lets you define what characters can start a mention. By default it is set to `[ @ ]`, meaning that typing a `@` character in the input will start the creation of a mention.
190
+
191
+ ### Starting a mention
192
+
193
+ There are two ways in which a mention can be started; either by typing one of the `mentionIndicators` set or by calling a [startMention](#startmention) method on the input ref.
194
+
195
+ ### Mention related events
196
+
197
+ `react-native-enriched` emits 3 different events that help handling mentions' editing:
198
+
199
+ - [onStartMention](#onstartmention) is emitted whenever mention is started in one of the ways from the [previous section](#starting-a-mention) or the user has come back (moved selection) to some unfinished mention they have started. It can be used for opening proper tools you use in the app to edit a mention (e.g. a list for choosing from users or channels that the mention will affect).
200
+ - [onChangeMention](#onchangemention) is emitted whenever user put or removed some characters after a mention indicator. This way you can react to active mention editing by, for example, filtering users in your displayed list based on the typed text.
201
+ - [onEndMention](#onendmention) is emitted whenever user is no longer editing a mention: they might have put a space or changed the cursor position to be no longer near the indicator. You can use it to hide appropriate tools that were used for mention editing.
202
+
203
+ ### Setting a mention
204
+
205
+ Whenever you feel ready with the currently edited mention (so most likely user chooses something from your additional mention editor), you can complete it by calling [setMention](#setmention) ref method.
206
+
207
+ ## Inline images
208
+
209
+ You can insert an image into the input using [setImage](#setimage) ref method.
210
+
211
+ The image will be put into a single line in the input and will affects the line's height as well as input's height. Keep in mind, that image will replace currently selected text or insert into the cursor position if there is no text selection.
212
+
213
+ > [!NOTE]
214
+ > The iOS doesn't support inline images just yet but it's planned in the near future!
215
+
216
+ ## Style Detection
217
+
218
+ All of the above styles can be detected with the use of [onChangeState](#onchangestate) event payload.
219
+
220
+ You can find some examples in the [usage section](#usage) or in the example app.
221
+
222
+ ## Other Events
223
+
224
+ `react-native-enriched` emits a few more events that may be of use:
225
+
226
+ - [onFocus](#onfocus) - emits whenever input focuses.
227
+ - [onBlur](#onblur) - emits whenever input blurs.
228
+ - [onChangeText](#onchangetext) - returns the input's text anytime it changes.
229
+ - [onChangeHtml](#onchangehtml) - returns HTML string parsed from current input text and styles anytime it would change. As parsing the HTML on each input change is a pretty expensive operation, not assigning the event's callback will speed up iOS input a bit. We are considering adding some API to improve it, see [future plans](#future-plans).
230
+ - [onChangeSelection](#onchangeselection) - returns all the data needed for working with selections (as of now it's mainly useful for [links](#links)).
231
+ - [onLinkDetected](#onlinkdetected) - returns link's detailed info whenever user selection is near one.
232
+ - [onMentionDetected](#onmentiondetected) - returns mention's detailed info whenever user selection is near one.
233
+
234
+ ## Customizing \<EnrichedTextInput /> styles
235
+
236
+ `react-native-enriched` allows customizing styles of the `<EnrichedTextInput />` component. See [htmlStyle](#htmlstyle) prop.
237
+
238
+ ## API Reference
239
+
240
+ ### Props
241
+
242
+ #### `autoFocus`
243
+
244
+ If `true`, focuses the input.
245
+
246
+ | Type | Default Value | Platform |
247
+ |--------|---------------|----------|
248
+ | `bool` | `false` | Both |
249
+
250
+ #### `autoCapitalize`
251
+
252
+ Tells input to automatically capitalize certain characters.
253
+
254
+ - `characters`: all characters.
255
+ - `words`: first letter of each word.
256
+ - `sentences`: first letter of each sentence.
257
+ - `none`: don't auto capitalize anything.
258
+
259
+ | Type | Default Value | Platform |
260
+ |----------------------------------------------------|---------------|----------|
261
+ | `'none' \| 'sentences' \| 'words' \| 'characters'` | `'sentences'` | Both |
262
+
263
+ #### `cursorColor`
264
+
265
+ When provided it will set the color of the cursor (or "caret") in the component.
266
+
267
+ | Type | Default Value | Platform |
268
+ |------------------------------------------------|----------------|----------|
269
+ | [`color`](https://reactnative.dev/docs/colors) | system default | Android |
270
+
271
+ #### `defaultValue`
272
+
273
+ Provides an initial value for the input. If the string is a valid HTML output of the `EnrichedTextInput` component (or other HTML that the parser will accept), proper styles will be applied.
274
+
275
+ | Type | Default Value | Platform |
276
+ |----------|---------------|----------|
277
+ | `string` | - | Both |
278
+
279
+ #### `editable`
280
+
281
+ If `false`, text is not editable.
282
+
283
+ | Type | Default Value | Platform |
284
+ |--------|---------------|----------|
285
+ | `bool` | `true` | Both |
286
+
287
+ #### `htmlStyle`
288
+
289
+ A prop for customizing styles' appearances.
290
+
291
+ | Type | Default Value | Platform |
292
+ |--------------------------------|----------------------------------------------------|----------|
293
+ | [`HtmlStyle`](#htmlstyle-type) | default values from [`HtmlStyle`](#htmlstyle-type) | Both |
294
+
295
+ #### `mentionIndicators`
296
+
297
+ The recognized mention indicators. Each item needs to be a 1 character long string.
298
+
299
+ | Type | Default Value | Platform |
300
+ |-------------------|---------------|----------|
301
+ | array of `string` | `['@']` | Both |
302
+
303
+ #### `onBlur`
304
+
305
+ Callback that's called whenever the input loses focused (is blurred).
306
+
307
+ | Type | Default Value | Platform |
308
+ |--------------|---------------|----------|
309
+ | `() => void` | - | Both |
310
+
311
+ #### `onChangeHtml`
312
+
313
+ Callback that is called when input's HTML changes.
314
+
315
+ Payload interface:
316
+
317
+ ```ts
318
+ interface OnChangeHtmlEvent {
319
+ value: string;
320
+ }
321
+ ```
322
+
323
+ - `value` is the new HTML.
324
+
325
+ | Type | Default Value | Platform |
326
+ |------------------------------------------------------|---------------|----------|
327
+ | `(NativeSyntheticEvent\<OnChangeHtmlEvent>) => void` | - | Both |
328
+
329
+ #### `onChangeMention`
330
+
331
+ Callback that gets called anytime user makes some changes to a mention that is being edited.
332
+
333
+ Payload interface:
334
+
335
+ ```ts
336
+ interface OnChangeMentionEvent {
337
+ indicator: string;
338
+ text: string;
339
+ }
340
+ ```
341
+
342
+ - `indicator` is the indicator of the currently edited mention.
343
+ - `text` contains whole text that has been typed after the indicator.
344
+
345
+ | Type | Default Value | Platform |
346
+ |----------------------------------|---------------|----------|
347
+ | `(OnChangeMentionEvent) => void` | - | Both |
348
+
349
+ #### `onChangeSelection`
350
+
351
+ Callback that is called each time user changes selection or moves the cursor in the input.
352
+
353
+ Payload interface:
354
+
355
+ ```ts
356
+ OnChangeSelectionEvent {
357
+ start: Int32;
358
+ end: Int32;
359
+ text: string;
360
+ }
361
+ ```
362
+
363
+ - `start` is the index of the selection's beginning.
364
+ - `end` is the first index after the selection's ending. For just a cursor in place (no selection), `start` equals `end`.
365
+ - `text` is the input's text in the current selection.
366
+
367
+ | Type | Default Value | Platform |
368
+ |-----------------------------------------------------------|---------------|----------|
369
+ | `(NativeSyntheticEvent\<OnChangeSelectionEvent>) => void` | - | Both |
370
+
371
+ #### `onChangeState`
372
+
373
+ Callback that gets called when any of the styles within the selection changes.
374
+
375
+ Payload has a bool flag for each style:
376
+
377
+ ```ts
378
+ interface OnChangeStateEvent {
379
+ isBold: boolean;
380
+ isItalic: boolean;
381
+ isUnderline: boolean;
382
+ isStrikeThrough: boolean;
383
+ isInlineCode: boolean;
384
+ isH1: boolean;
385
+ isH2: boolean;
386
+ isH3: boolean;
387
+ isCodeBlock: boolean;
388
+ isBlockQuote: boolean;
389
+ isOrderedList: boolean;
390
+ isUnorderedList: boolean;
391
+ isLink: boolean;
392
+ isImage: boolean;
393
+ isMention: boolean;
394
+ }
395
+ ```
396
+
397
+ | Type | Default Value | Platform |
398
+ |-------------------------------------------------------|---------------|----------|
399
+ | `(NativeSyntheticEvent\<OnChangeStateEvent>) => void` | - | Both |
400
+
401
+ #### `onChangeText`
402
+
403
+ Callback called when any text changes occur in the input.
404
+
405
+ Payload interface:
406
+
407
+ ```ts
408
+ interface OnChangeTextEvent {
409
+ value: string;
410
+ }
411
+ ```
412
+
413
+ - `value` is the new text value of the input.
414
+
415
+ | Type | Default Value | Platform |
416
+ |------------------------------------------------------|---------------|----------|
417
+ | `(NativeSyntheticEvent\<OnChangeTextEvent>) => void` | - | Both |
418
+
419
+ #### `onEndMention`
420
+
421
+ Callback that is called when the user no longer edits a mention actively - has moved the cursor somewhere else or put a space and the cursor isn't within the edited mention.
422
+
423
+ - `indicator` is the indicator of the mention that was being edited.
424
+
425
+ | Type | Default Value | Platform |
426
+ |-------------------------------|---------------|----------|
427
+ | `(indicator: string) => void` | - | Both |
428
+
429
+ #### `onFocus`
430
+
431
+ Callback that's called whenever the input is focused.
432
+
433
+ | Type | Default Value | Platform |
434
+ |--------------|---------------|----------|
435
+ | `() => void` | - | Both |
436
+
437
+ #### `onLinkDetected`
438
+
439
+ Callback that gets called when either a new link has been added or the user has moved the cursor/selection to some link.
440
+
441
+ Payload interface contains all the useful link data:
442
+
443
+ ```ts
444
+ interface OnLinkDetected {
445
+ text: string;
446
+ url: string;
447
+ start: Int32;
448
+ end: Int32;
449
+ }
450
+ ```
451
+
452
+ - `text` is the link's displayed text.
453
+ - `url` is the underlying link's URL.
454
+ - `start` is the starting index of the link.
455
+ - `end` is the first index after the ending index of the link.
456
+
457
+ | Type | Default Value | Platform |
458
+ |----------------------------|---------------|----------|
459
+ | `(OnLinkDetected) => void` | - | Both |
460
+
461
+ #### `onMentionDetected`
462
+
463
+ Callback called when mention has been detected - either a new mention has been added or the user has moved the cursor/selection to some mention.
464
+
465
+ Payload interface contains all the useful mention data:
466
+
467
+ ```ts
468
+ OnMentionDetected {
469
+ text: string;
470
+ indicator: string;
471
+ attributes: Record<string, string>;
472
+ }
473
+ ```
474
+
475
+ - `text` is the mention's displayed text.
476
+ - `indicator` is the indicator of the mention.
477
+ - `attributes` are the additional user-defined attributes that are being stored with the mention.
478
+
479
+ | Type | Default Value | Platform |
480
+ |-------------------------------|---------------|----------|
481
+ | `(OnMentionDetected) => void` | - | Both |
482
+
483
+ #### `onStartMention`
484
+
485
+ Callback that gets called whenever a mention editing starts (after placing the indicator).
486
+
487
+ - `indicator` is the indicator of the mention that begins editing.
488
+
489
+ | Type | Default Value | Platform |
490
+ |-------------------------------|---------------|----------|
491
+ | `(indicator: string) => void` | - | Both |
492
+
493
+ #### `placeholder`
494
+
495
+ The placeholder text that is displayed in the input if nothing has been typed yet. Disappears when something is typed.
496
+
497
+ | Type | Default Value | Platform |
498
+ |----------|---------------|----------|
499
+ | `string` | `''` | Both |
500
+
501
+ #### `placeholderTextColor`
502
+
503
+ Input placeholder's text color.
504
+
505
+ | Type | Default Value | Platform |
506
+ |------------------------------------------------|-------------------------|----------|
507
+ | [`color`](https://reactnative.dev/docs/colors) | input's [color](#style) | Both |
508
+
509
+ #### `ref`
510
+
511
+ A React ref that lets you call any ref methods on the input.
512
+
513
+ | Type | Default Value | Platform |
514
+ |------------------------------------------------|---------------|----------|
515
+ | `RefObject<EnrichedTextInputInstance \| null>` | - | Both |
516
+
517
+ #### `selectionColor`
518
+
519
+ Color of the selection rectangle that gets drawn over the selected text. On iOS, the cursor (caret) also gets set to this color.
520
+
521
+ | Type | Default Value | Platform |
522
+ |------------------------------------------------|----------------|----------|
523
+ | [`color`](https://reactnative.dev/docs/colors) | system default | Both |
524
+
525
+ #### `style`
526
+
527
+ Accepts most [ViewStyle](https://reactnative.dev/docs/view#style) props, but keep in mind that some of them might not be supported.
528
+
529
+ Additionally following [TextStyle](https://reactnative.dev/docs/text#style) props are supported
530
+
531
+ - color
532
+ - fontFamily
533
+ - fontSize
534
+ - fontWeight
535
+ - fontStyle only on Android
536
+
537
+ | Type | Default Value | Platform |
538
+ |--------------------------------------------------------------------------------------------------------------------|---------------|----------|
539
+ | [`View Style`](https://reactnative.dev/docs/view#style) \| [`Text Style`](https://reactnative.dev/docs/text#style) | - | Both |
540
+
541
+ #### `ViewProps`
542
+
543
+ The input inherits [ViewProps](https://reactnative.dev/docs/view#props), but keep in mind that some of the props may not be supported.
544
+
545
+ #### `androidExperimentalSynchronousEvents` - EXPERIMENTAL
546
+
547
+ If true, Android will use experimental synchronous events. This will prevent from input flickering when updating component size. However, this is an experimental feature, which has not been thoroughly tested. We may decide to enable it by default in a future release.
548
+
549
+ | Type | Default Value | Platform |
550
+ |--------|---------------|----------|
551
+ | `bool` | `false` | Android |
552
+
553
+ ### Ref Methods
554
+
555
+ All of the methods should be called on the input's [ref](#ref).
556
+
557
+ #### `.blur()`
558
+
559
+ ```ts
560
+ blur: () => void
561
+ ```
562
+
563
+ Blurs the input.
564
+
565
+ #### `.focus()`
566
+
567
+ ```ts
568
+ focus: () => void;
569
+ ```
570
+
571
+ Focuses the input.
572
+
573
+ #### `.setImage()`
574
+
575
+ > [!NOTE]
576
+ > This function is Android only as iOS doesn't support inline images just yet.
577
+
578
+ ```ts
579
+ setImage: (src: string) => void;
580
+ ```
581
+
582
+ Sets the [inline image](#inline-images) at the current selection.
583
+
584
+ - `src: string` - the absolute path to the image.
585
+
586
+ #### `.setLink()`
587
+
588
+ ```ts
589
+ setLink: (
590
+ start: number,
591
+ end: number,
592
+ text: string,
593
+ url: string
594
+ ) => void;
595
+ ```
596
+
597
+ Sets the link at the given place with a given displayed text and URL. Link will replace any text if there was some between `start` and `end` indexes. Setting a link with `start` equal to `end` will just insert it in place.
598
+
599
+ - `start: number` - the starting index where the link should be.
600
+ - `end: number` - first index behind the new link's ending index.
601
+ - `text: string` - displayed text of the link.
602
+ - `url: string` - URL of the link.
603
+
604
+ #### `.setMention()`
605
+
606
+ ```ts
607
+ setMention: (
608
+ indicator: string,
609
+ text: string,
610
+ attributes?: Record<string, string>
611
+ ) => void;
612
+ ```
613
+
614
+ Sets the currently edited mention with a given indicator, displayed text and custom attributes.
615
+
616
+ - `indicator: string` - the indicator of the set mention.
617
+ - `text: string` - the text that should be displayed for the mention. Anything the user typed gets replaced by that text. The mention indicator isn't added to that text.
618
+ - `attributes?: Record<string, string>` - additional, custom attributes for the mention that can be passed as a typescript record. They are properly preserved through parsing from and to the HTML format.
619
+
620
+ #### `.setValue()`
621
+
622
+ ```ts
623
+ setValue: (value: string) => void;
624
+ ```
625
+
626
+ Sets the input's value.
627
+
628
+ - `value: string` - value to set, it can either be `react-native-enriched` supported HTML string or raw text.
629
+
630
+ #### `.startMention()`
631
+
632
+ ```ts
633
+ startMention: (indicator: string) => void;
634
+ ```
635
+
636
+ Starts a mention with the given indicator. It gets put at the cursor/selection.
637
+
638
+ - `indicator: string` - the indicator that starts the new mention.
639
+
640
+ #### `.toggleBlockQuote()`
641
+
642
+ ```ts
643
+ toggleBlockQuote: () => void;
644
+ ```
645
+
646
+ Toggles blockquote style at the current selection.
647
+
648
+ #### `.toggleBold()`
649
+
650
+ ```ts
651
+ toggleBold: () => void;
652
+ ```
653
+
654
+ Toggles bold formatting at the current selection.
655
+
656
+ #### `.toggleCodeBlock()`
657
+
658
+ > [!NOTE]
659
+ > This function is Android only as iOS doesn't support codeblocks just yet.
660
+
661
+ ```ts
662
+ toggleCodeBlock: () => void;
663
+ ```
664
+
665
+ Toggles codeblock formatting at the current selection.
666
+
667
+ #### `.toggleH1()`
668
+
669
+ ```ts
670
+ toggleH1: () => void;
671
+ ```
672
+
673
+ Toggles heading 1 (h1) style at the current selection.
674
+
675
+ #### `.toggleH2()`
676
+
677
+ ```ts
678
+ toggleH2: () => void;
679
+ ```
680
+
681
+ Toggles heading 2 (h2) style at the current selection.
682
+
683
+ #### `.toggleH3()`
684
+
685
+ ```ts
686
+ toggleH3: () => void;
687
+ ```
688
+
689
+ Toggles heading 3 (h3) style at the current selection.
690
+
691
+ #### `.toggleInlineCode()`
692
+
693
+ ```ts
694
+ toggleInlineCode: () => void;
695
+ ```
696
+
697
+ Applies inline code formatting to the current selection.
698
+
699
+ #### `.toggleItalic()`
700
+
701
+ ```ts
702
+ toggleItalic: () => void;
703
+ ```
704
+
705
+ Toggles italic formatting at the current selection.
706
+
707
+ #### `.toggleOrderedList()`
708
+
709
+ ```ts
710
+ toggleOrderedList: () => void;
711
+ ```
712
+
713
+ Converts current selection into an ordered list.
714
+
715
+ #### `.toggleStrikeThrough()`
716
+
717
+ ```ts
718
+ toggleStrikeThrough: () => void;
719
+ ```
720
+
721
+ Applies strikethrough formatting to the current selection.
722
+
723
+ #### `.toggleUnderline()`
724
+
725
+ ```ts
726
+ toggleUnderline: () => void;
727
+ ```
728
+
729
+ Applies underline formatting to the current selection.
730
+
731
+ #### `.toggleUnorderedList()`
732
+
733
+ ```ts
734
+ toggleUnorderedList: () => void;
735
+ ```
736
+
737
+ Converts current selection into an unordered list.
738
+
739
+ ### HtmlStyle type
740
+
741
+ Allows customizing HTML styles.
742
+
743
+ ```ts
744
+ interface HtmlStyle {
745
+ h1?: {
746
+ fontSize?: number;
747
+ bold?: boolean;
748
+ };
749
+ h2?: {
750
+ fontSize?: number;
751
+ bold?: boolean;
752
+ };
753
+ h3?: {
754
+ fontSize?: number;
755
+ bold?: boolean;
756
+ };
757
+ blockquote?: {
758
+ borderColor?: ColorValue;
759
+ borderWidth?: number;
760
+ gapWidth?: number;
761
+ color?: ColorValue;
762
+ };
763
+ codeblock?: {
764
+ color?: ColorValue;
765
+ borderRadius?: number;
766
+ backgroundColor?: ColorValue;
767
+ };
768
+ code?: {
769
+ color?: ColorValue;
770
+ backgroundColor?: ColorValue;
771
+ };
772
+ a?: {
773
+ color?: ColorValue;
774
+ textDecorationLine?: 'underline' | 'none';
775
+ };
776
+ mention?: Record<string, MentionStyleProperties> | MentionStyleProperties;
777
+ img?: {
778
+ width?: number;
779
+ height?: number;
780
+ };
781
+ ol?: {
782
+ gapWidth?: number;
783
+ marginLeft?: number;
784
+ markerFontWeight?: TextStyle['fontWeight'];
785
+ markerColor?: ColorValue;
786
+ };
787
+ ul?: {
788
+ bulletColor?: ColorValue;
789
+ bulletSize?: number;
790
+ marginLeft?: number;
791
+ gapWidth?: number;
792
+ };
793
+ }
794
+
795
+ interface MentionStyleProperties {
796
+ color?: ColorValue;
797
+ backgroundColor?: ColorValue;
798
+ textDecorationLine?: 'underline' | 'none';
799
+ }
800
+ ```
801
+
802
+ #### h1/h2/h3 (headings)
803
+
804
+ - `fontSize` is the size of the heading's font, defaults to `32`/`24`/`20` for h1/h2/h3.
805
+ - `bold` defines whether the heading should be bolded, defaults to `false`.
806
+
807
+ #### blockquote
808
+
809
+ - `borderColor` defines the color of the rectangular border drawn to the left of blockquote text. Takes [color](https://reactnative.dev/docs/colors) value, defaults to `darkgray`.
810
+ - `borderWidth` sets the width of the said border, defaults to `4`.
811
+ - `gapWidth` sets the width of the gap between the border and the blockquote text, defaults to `16`.
812
+ - `color` defines the color of blockquote's text. Takes [color](https://reactnative.dev/docs/colors) value, if not set makes the blockquote text the same color as the input's [color prop](#style).
813
+
814
+ #### codeblock
815
+
816
+ - `color` defines the color of codeblock text, takes [color](https://reactnative.dev/docs/colors) value and defaults to `black`.
817
+ - `borderRadius` sets the radius of codeblock's border, defaults to 8.
818
+ - `backgroundColor` is the codeblock's background color, takes [color](https://reactnative.dev/docs/colors) value and defaults to `darkgray`.
819
+
820
+ #### code (inline code)
821
+
822
+ - `color` defines the color of inline code's text, takes [color](https://reactnative.dev/docs/colors) value and defaults to `red`.
823
+ - `backgroundColor` is the inline code's background color, takes [color](https://reactnative.dev/docs/colors) value and defaults to `darkgray`.
824
+
825
+ #### a (link)
826
+
827
+ - `color` defines the color of link's text, takes [color](https://reactnative.dev/docs/colors) value and defaults to `blue`.
828
+ - `textDecorationLine` decides if the links are underlined or not, takes either `underline` or `none` and defaults to `underline`
829
+
830
+ #### mention
831
+
832
+ If only a single config is given, the style applies to all mention types. You can also set a different config for each mentionIndicator that has been defined, then the prop should be a record with indicators as a keys and configs as their values.
833
+
834
+ - `color` defines the color of mention's text, takes [color](https://reactnative.dev/docs/colors) value and defaults to `blue`.
835
+ - `backgroundColor` is the mention's background color, takes [color](https://reactnative.dev/docs/colors) value and defaults to `yellow`.
836
+ - `textDecorationLine` decides if the mentions are underlined or not, takes either `underline` or `none` and defaults to `underline`.
837
+
838
+ #### img (inline image)
839
+
840
+ - `width` is the width of the inline image, defaults to `80`.
841
+ - `height` is the height of the inline image, defaults to `80`.
842
+
843
+ #### ol (ordered list)
844
+
845
+ By marker we mean the number that denotes next lines of the list.
846
+
847
+ - `gapWidth` sets the gap between the marker and the list item's text, defaults to `16`.
848
+ - `marginLeft` sets the margin to the left of the marker (between the marker and input's left edge), defaults to `16`.
849
+ - `markerFontWeight` defines the font weight of the marker, takes a [fontWeight](https://reactnative.dev/docs/text-style-props#fontweight) value and if not set, defaults to the same font weight as input's [fontWeight prop](#style).
850
+ - `markerColor` sets the text color of the marker, takes [color](https://reactnative.dev/docs/colors) value and if not set, defaults to the same color as input's [color prop](#style).
851
+
852
+ #### ul (unordered list)
853
+
854
+ By bullet we mean the dot that begins each line of the list.
855
+
856
+ - `bulletColor` defines the color of the bullet, takes [color](https://reactnative.dev/docs/colors) value and defaults to `black`.
857
+ - `bulletSize` sets both the height and the width of the bullet, defaults to `8`.
858
+ - `marginLeft` is the margin to the left of the bullet (between the bullet and input's left edge), defaults to `16`.
859
+ - `gapWidth` sets the gap between the bullet and the list item's text, defaults to `16`.
860
+
861
+ ## Future Plans
862
+
863
+ - Adding Codeblocks and Inline Images to iOS input.
864
+ - Making some optimizations around `onChangeHtml` event, maybe some imperative API to get the HTML output.
865
+ - Creating `EnrichedText` text component that supports our HTML output format with all additional interactions like pressing links or mentions.
866
+ - Adding API for custom link detection regex.
867
+ - Web library implementation via `react-native-web`.
868
+
869
+ ## Contributing
870
+
871
+ See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
872
+
873
+ ## License
874
+
875
+ `react-native-enriched` library is licensed under [The MIT License](./LICENSE).