@expensify/react-native-live-markdown 0.1.136 → 0.1.137

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.
@@ -2,6 +2,9 @@
2
2
 
3
3
  #include "MarkdownShadowFamilyRegistry.h"
4
4
 
5
+ namespace expensify {
6
+ namespace livemarkdown {
7
+
5
8
  std::set<facebook::react::ShadowNodeFamily::Shared>
6
9
  MarkdownShadowFamilyRegistry::familiesToUpdate_;
7
10
  std::set<facebook::react::Tag> MarkdownShadowFamilyRegistry::forcedUpdates_;
@@ -55,4 +58,7 @@ bool MarkdownShadowFamilyRegistry::shouldForceUpdate(facebook::react::Tag tag) {
55
58
  return false;
56
59
  }
57
60
 
61
+ } // namespace livemarkdown
62
+ } // namespace expensify
63
+
58
64
  #endif
@@ -6,6 +6,9 @@
6
6
  #include <mutex>
7
7
  #include <set>
8
8
 
9
+ namespace expensify {
10
+ namespace livemarkdown {
11
+
9
12
  // A registry to store pointers to the ShadowNodeFamilies of markdown
10
13
  // decorators. The only place we can _legally_ access the family of shadow node
11
14
  // is in the constructor and we need it inside commit hook. To achieve it, we
@@ -32,4 +35,7 @@ private:
32
35
  static std::mutex mutex_;
33
36
  };
34
37
 
38
+ } // namespace livemarkdown
39
+ } // namespace expensify
40
+
35
41
  #endif
@@ -5,6 +5,8 @@
5
5
  #include "MarkdownShadowFamilyRegistry.h"
6
6
  #include "MarkdownTextInputDecoratorShadowNode.h"
7
7
 
8
+ using namespace expensify::livemarkdown;
9
+
8
10
  namespace facebook {
9
11
  namespace react {
10
12
 
@@ -8,6 +8,8 @@
8
8
  #include <react/renderer/components/RNLiveMarkdownSpec/Props.h>
9
9
  #include <react/renderer/components/view/ConcreteViewShadowNode.h>
10
10
 
11
+ using namespace expensify::livemarkdown;
12
+
11
13
  namespace facebook {
12
14
  namespace react {
13
15
 
@@ -11,6 +11,7 @@
11
11
 
12
12
  using namespace facebook::react;
13
13
 
14
+ namespace expensify {
14
15
  namespace livemarkdown {
15
16
 
16
17
  struct MarkdownTextInputDecoratorPair {
@@ -38,5 +39,6 @@ private:
38
39
  };
39
40
 
40
41
  } // namespace livemarkdown
42
+ } // namespace expensify
41
43
 
42
44
  #endif // RCT_NEW_ARCH_ENABLED
@@ -11,6 +11,7 @@
11
11
 
12
12
  using namespace facebook::react;
13
13
 
14
+ namespace expensify {
14
15
  namespace livemarkdown {
15
16
 
16
17
  MarkdownCommitHook::MarkdownCommitHook(
@@ -192,5 +193,6 @@ RootShadowNode::Unshared MarkdownCommitHook::shadowTreeWillCommit(
192
193
  }
193
194
 
194
195
  } // namespace livemarkdown
196
+ } // namespace expensify
195
197
 
196
198
  #endif // RCT_NEW_ARCH_ENABLED
@@ -7,13 +7,15 @@
7
7
  #import "MarkdownShadowFamilyRegistry.h"
8
8
  #import "RCTLiveMarkdownModule.h"
9
9
 
10
+ using namespace expensify::livemarkdown;
11
+
10
12
  // A turbomodule used to register the commit hook
11
13
  // I think this is the easiest way to access the UIManager, which we need to
12
14
  // actually register the hook
13
15
 
14
16
  @implementation RCTLiveMarkdownModule {
15
17
  BOOL installed_;
16
- std::shared_ptr<livemarkdown::MarkdownCommitHook> commitHook_;
18
+ std::shared_ptr<MarkdownCommitHook> commitHook_;
17
19
  __weak RCTSurfacePresenter *surfacePresenter_;
18
20
  }
19
21
 
@@ -23,8 +25,7 @@ RCT_EXPORT_MODULE(@"LiveMarkdownModule")
23
25
  if (!installed_ && surfacePresenter_ != nil) {
24
26
  RCTScheduler *scheduler = [surfacePresenter_ scheduler];
25
27
 
26
- commitHook_ =
27
- std::make_shared<livemarkdown::MarkdownCommitHook>(scheduler.uiManager);
28
+ commitHook_ = std::make_shared<MarkdownCommitHook>(scheduler.uiManager);
28
29
  installed_ = YES;
29
30
  }
30
31
  return @1;
@@ -8,6 +8,8 @@
8
8
 
9
9
  #import "MarkdownShadowFamilyRegistry.h"
10
10
 
11
+ using namespace expensify::livemarkdown;
12
+
11
13
  @implementation RCTTextInputComponentView (Markdown)
12
14
 
13
15
  - (void)setMarkdownUtils:(RCTMarkdownUtils *)markdownUtils {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expensify/react-native-live-markdown",
3
- "version": "0.1.136",
3
+ "version": "0.1.137",
4
4
  "description": "Drop-in replacement for React Native's TextInput component with Markdown formatting.",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",