react-native-screenshot-aware 0.0.1 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/ios/ScreenshotAware.h +1 -1
  2. package/lib/commonjs/codegenSpec/NativeScreenshotAware.js.map +1 -0
  3. package/lib/commonjs/index.js +1 -1
  4. package/lib/commonjs/index.js.map +1 -1
  5. package/lib/module/codegenSpec/NativeScreenshotAware.js.map +1 -0
  6. package/lib/module/index.js +1 -1
  7. package/lib/module/index.js.map +1 -1
  8. package/lib/typescript/codegenSpec/NativeScreenshotAware.d.ts.map +1 -0
  9. package/package.json +4 -5
  10. package/react-native-screenshot-aware.podspec +1 -1
  11. package/src/index.tsx +1 -1
  12. package/android/app/build/generated/source/codegen/java/com/facebook/fbreact/specs/NativeScreenshotAwareSpec.java +0 -38
  13. package/android/app/build/generated/source/codegen/jni/CMakeLists.txt +0 -49
  14. package/android/app/build/generated/source/codegen/jni/RNScreenshotAwareSpec-generated.cpp +0 -32
  15. package/android/app/build/generated/source/codegen/jni/RNScreenshotAwareSpec.h +0 -31
  16. package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNScreenshotAwareSpec/RNScreenshotAwareSpecJSI-generated.cpp +0 -28
  17. package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNScreenshotAwareSpec/RNScreenshotAwareSpecJSI.h +0 -67
  18. package/android/generated/java/com/screenshotaware/NativeScreenshotAwareSpec.java +0 -41
  19. package/android/generated/jni/CMakeLists.txt +0 -49
  20. package/android/generated/jni/RNScreenshotAwareSpec-generated.cpp +0 -38
  21. package/android/generated/jni/RNScreenshotAwareSpec.h +0 -31
  22. package/android/generated/jni/react/renderer/components/RNScreenshotAwareSpec/ComponentDescriptors.cpp +0 -22
  23. package/android/generated/jni/react/renderer/components/RNScreenshotAwareSpec/ComponentDescriptors.h +0 -24
  24. package/android/generated/jni/react/renderer/components/RNScreenshotAwareSpec/EventEmitters.cpp +0 -16
  25. package/android/generated/jni/react/renderer/components/RNScreenshotAwareSpec/EventEmitters.h +0 -17
  26. package/android/generated/jni/react/renderer/components/RNScreenshotAwareSpec/Props.cpp +0 -19
  27. package/android/generated/jni/react/renderer/components/RNScreenshotAwareSpec/Props.h +0 -18
  28. package/android/generated/jni/react/renderer/components/RNScreenshotAwareSpec/RNScreenshotAwareSpecJSI-generated.cpp +0 -36
  29. package/android/generated/jni/react/renderer/components/RNScreenshotAwareSpec/RNScreenshotAwareSpecJSI.h +0 -76
  30. package/android/generated/jni/react/renderer/components/RNScreenshotAwareSpec/ShadowNodes.cpp +0 -17
  31. package/android/generated/jni/react/renderer/components/RNScreenshotAwareSpec/ShadowNodes.h +0 -23
  32. package/android/generated/jni/react/renderer/components/RNScreenshotAwareSpec/States.cpp +0 -16
  33. package/android/generated/jni/react/renderer/components/RNScreenshotAwareSpec/States.h +0 -19
  34. package/android/src/main/AndroidManifestNew.xml +0 -2
  35. package/ios/generated/RNScreenshotAwareSpec/ComponentDescriptors.cpp +0 -22
  36. package/ios/generated/RNScreenshotAwareSpec/ComponentDescriptors.h +0 -24
  37. package/ios/generated/RNScreenshotAwareSpec/EventEmitters.cpp +0 -16
  38. package/ios/generated/RNScreenshotAwareSpec/EventEmitters.h +0 -17
  39. package/ios/generated/RNScreenshotAwareSpec/Props.cpp +0 -19
  40. package/ios/generated/RNScreenshotAwareSpec/Props.h +0 -18
  41. package/ios/generated/RNScreenshotAwareSpec/RCTComponentViewHelpers.h +0 -18
  42. package/ios/generated/RNScreenshotAwareSpec/RNScreenshotAwareSpec-generated.mm +0 -36
  43. package/ios/generated/RNScreenshotAwareSpec/RNScreenshotAwareSpec.h +0 -50
  44. package/ios/generated/RNScreenshotAwareSpec/ShadowNodes.cpp +0 -17
  45. package/ios/generated/RNScreenshotAwareSpec/ShadowNodes.h +0 -23
  46. package/ios/generated/RNScreenshotAwareSpec/States.cpp +0 -16
  47. package/ios/generated/RNScreenshotAwareSpec/States.h +0 -19
  48. package/ios/generated/RNScreenshotAwareSpecJSI-generated.cpp +0 -36
  49. package/ios/generated/RNScreenshotAwareSpecJSI.h +0 -76
  50. package/lib/commonjs/NativeScreenshotAware.js.map +0 -1
  51. package/lib/module/NativeScreenshotAware.js.map +0 -1
  52. package/lib/typescript/NativeScreenshotAware.d.ts.map +0 -1
  53. /package/android/src/newarch/{ScreenshotAwareSpec.kt → ScreenshotAware.kt} +0 -0
  54. /package/android/src/oldarch/{ScreenshotAwareSpec.kt → ScreenshotAware.kt} +0 -0
  55. /package/lib/commonjs/{NativeScreenshotAware.js → codegenSpec/NativeScreenshotAware.js} +0 -0
  56. /package/lib/module/{NativeScreenshotAware.js → codegenSpec/NativeScreenshotAware.js} +0 -0
  57. /package/lib/typescript/{NativeScreenshotAware.d.ts → codegenSpec/NativeScreenshotAware.d.ts} +0 -0
  58. /package/src/{NativeScreenshotAware.ts → codegenSpec/NativeScreenshotAware.ts} +0 -0
@@ -1,36 +0,0 @@
1
- /**
2
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
- *
4
- * Do not edit this file as changes may cause incorrect behavior and will be lost
5
- * once the code is regenerated.
6
- *
7
- * @generated by codegen project: GenerateModuleCpp.js
8
- */
9
-
10
- #include "RNScreenshotAwareSpecJSI.h"
11
-
12
- namespace facebook::react {
13
-
14
- static jsi::Value __hostFunction_NativeScreenshotAwareCxxSpecJSI_addListener(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
15
- static_cast<NativeScreenshotAwareCxxSpecJSI *>(&turboModule)->addListener(
16
- rt,
17
- count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
18
- );
19
- return jsi::Value::undefined();
20
- }
21
- static jsi::Value __hostFunction_NativeScreenshotAwareCxxSpecJSI_removeListeners(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
22
- static_cast<NativeScreenshotAwareCxxSpecJSI *>(&turboModule)->removeListeners(
23
- rt,
24
- count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber()
25
- );
26
- return jsi::Value::undefined();
27
- }
28
-
29
- NativeScreenshotAwareCxxSpecJSI::NativeScreenshotAwareCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
30
- : TurboModule("ScreenshotAware", jsInvoker) {
31
- methodMap_["addListener"] = MethodMetadata {1, __hostFunction_NativeScreenshotAwareCxxSpecJSI_addListener};
32
- methodMap_["removeListeners"] = MethodMetadata {1, __hostFunction_NativeScreenshotAwareCxxSpecJSI_removeListeners};
33
- }
34
-
35
-
36
- } // namespace facebook::react
@@ -1,76 +0,0 @@
1
- /**
2
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
- *
4
- * Do not edit this file as changes may cause incorrect behavior and will be lost
5
- * once the code is regenerated.
6
- *
7
- * @generated by codegen project: GenerateModuleH.js
8
- */
9
-
10
- #pragma once
11
-
12
- #include <ReactCommon/TurboModule.h>
13
- #include <react/bridging/Bridging.h>
14
-
15
- namespace facebook::react {
16
-
17
-
18
- class JSI_EXPORT NativeScreenshotAwareCxxSpecJSI : public TurboModule {
19
- protected:
20
- NativeScreenshotAwareCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
21
-
22
- public:
23
- virtual void addListener(jsi::Runtime &rt, jsi::String eventName) = 0;
24
- virtual void removeListeners(jsi::Runtime &rt, double count) = 0;
25
-
26
- };
27
-
28
- template <typename T>
29
- class JSI_EXPORT NativeScreenshotAwareCxxSpec : public TurboModule {
30
- public:
31
- jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
32
- return delegate_.get(rt, propName);
33
- }
34
-
35
- static constexpr std::string_view kModuleName = "ScreenshotAware";
36
-
37
- protected:
38
- NativeScreenshotAwareCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
39
- : TurboModule(std::string{NativeScreenshotAwareCxxSpec::kModuleName}, jsInvoker),
40
- delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
41
-
42
-
43
- private:
44
- class Delegate : public NativeScreenshotAwareCxxSpecJSI {
45
- public:
46
- Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
47
- NativeScreenshotAwareCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
48
-
49
- }
50
-
51
- void addListener(jsi::Runtime &rt, jsi::String eventName) override {
52
- static_assert(
53
- bridging::getParameterCount(&T::addListener) == 2,
54
- "Expected addListener(...) to have 2 parameters");
55
-
56
- return bridging::callFromJs<void>(
57
- rt, &T::addListener, jsInvoker_, instance_, std::move(eventName));
58
- }
59
- void removeListeners(jsi::Runtime &rt, double count) override {
60
- static_assert(
61
- bridging::getParameterCount(&T::removeListeners) == 2,
62
- "Expected removeListeners(...) to have 2 parameters");
63
-
64
- return bridging::callFromJs<void>(
65
- rt, &T::removeListeners, jsInvoker_, instance_, std::move(count));
66
- }
67
-
68
- private:
69
- friend class NativeScreenshotAwareCxxSpec;
70
- T *instance_;
71
- };
72
-
73
- Delegate delegate_;
74
- };
75
-
76
- } // namespace facebook::react
@@ -1,17 +0,0 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GenerateShadowNodeCpp.js
9
- */
10
-
11
- #include "ShadowNodes.h"
12
-
13
- namespace facebook::react {
14
-
15
-
16
-
17
- } // namespace facebook::react
@@ -1,23 +0,0 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GenerateShadowNodeH.js
9
- */
10
-
11
- #pragma once
12
-
13
- #include "EventEmitters.h"
14
- #include "Props.h"
15
- #include "States.h"
16
- #include <react/renderer/components/view/ConcreteViewShadowNode.h>
17
- #include <jsi/jsi.h>
18
-
19
- namespace facebook::react {
20
-
21
-
22
-
23
- } // namespace facebook::react
@@ -1,16 +0,0 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GenerateStateCpp.js
9
- */
10
- #include "States.h"
11
-
12
- namespace facebook::react {
13
-
14
-
15
-
16
- } // namespace facebook::react
@@ -1,19 +0,0 @@
1
- /**
2
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
- *
4
- * Do not edit this file as changes may cause incorrect behavior and will be lost
5
- * once the code is regenerated.
6
- *
7
- * @generated by codegen project: GenerateStateH.js
8
- */
9
- #pragma once
10
-
11
- #ifdef ANDROID
12
- #include <folly/dynamic.h>
13
- #endif
14
-
15
- namespace facebook::react {
16
-
17
-
18
-
19
- } // namespace facebook::react
@@ -1,2 +0,0 @@
1
- <manifest xmlns:android="http://schemas.android.com/apk/res/android">
2
- </manifest>
@@ -1,22 +0,0 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GenerateComponentDescriptorCpp.js
9
- */
10
-
11
- #include "ComponentDescriptors.h"
12
- #include <react/renderer/core/ConcreteComponentDescriptor.h>
13
- #include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
14
-
15
- namespace facebook::react {
16
-
17
- void RNScreenshotAwareSpec_registerComponentDescriptorsFromCodegen(
18
- std::shared_ptr<const ComponentDescriptorProviderRegistry> registry) {
19
-
20
- }
21
-
22
- } // namespace facebook::react
@@ -1,24 +0,0 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GenerateComponentDescriptorH.js
9
- */
10
-
11
- #pragma once
12
-
13
- #include "ShadowNodes.h"
14
- #include <react/renderer/core/ConcreteComponentDescriptor.h>
15
- #include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
16
-
17
- namespace facebook::react {
18
-
19
-
20
-
21
- void RNScreenshotAwareSpec_registerComponentDescriptorsFromCodegen(
22
- std::shared_ptr<const ComponentDescriptorProviderRegistry> registry);
23
-
24
- } // namespace facebook::react
@@ -1,16 +0,0 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GenerateEventEmitterCpp.js
9
- */
10
-
11
- #include "EventEmitters.h"
12
-
13
-
14
- namespace facebook::react {
15
-
16
- } // namespace facebook::react
@@ -1,17 +0,0 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GenerateEventEmitterH.js
9
- */
10
- #pragma once
11
-
12
- #include <react/renderer/components/view/ViewEventEmitter.h>
13
-
14
-
15
- namespace facebook::react {
16
-
17
- } // namespace facebook::react
@@ -1,19 +0,0 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GeneratePropsCpp.js
9
- */
10
-
11
- #include "Props.h"
12
- #include <react/renderer/core/PropsParserContext.h>
13
- #include <react/renderer/core/propsConversions.h>
14
-
15
- namespace facebook::react {
16
-
17
-
18
-
19
- } // namespace facebook::react
@@ -1,18 +0,0 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GeneratePropsH.js
9
- */
10
- #pragma once
11
-
12
-
13
-
14
- namespace facebook::react {
15
-
16
-
17
-
18
- } // namespace facebook::react
@@ -1,18 +0,0 @@
1
- /**
2
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
- *
4
- * Do not edit this file as changes may cause incorrect behavior and will be lost
5
- * once the code is regenerated.
6
- *
7
- * @generated by codegen project: GenerateComponentHObjCpp.js
8
- */
9
-
10
- #import <Foundation/Foundation.h>
11
- #import <React/RCTDefines.h>
12
- #import <React/RCTLog.h>
13
-
14
- NS_ASSUME_NONNULL_BEGIN
15
-
16
-
17
-
18
- NS_ASSUME_NONNULL_END
@@ -1,36 +0,0 @@
1
- /**
2
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
- *
4
- * Do not edit this file as changes may cause incorrect behavior and will be lost
5
- * once the code is regenerated.
6
- *
7
- * @generated by codegen project: GenerateModuleObjCpp
8
- *
9
- * We create an umbrella header (and corresponding implementation) here since
10
- * Cxx compilation in BUCK has a limitation: source-code producing genrule()s
11
- * must have a single output. More files => more genrule()s => slower builds.
12
- */
13
-
14
- #import "RNScreenshotAwareSpec.h"
15
-
16
-
17
- namespace facebook::react {
18
-
19
- static facebook::jsi::Value __hostFunction_NativeScreenshotAwareSpecJSI_addListener(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
20
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "addListener", @selector(addListener:), args, count);
21
- }
22
-
23
- static facebook::jsi::Value __hostFunction_NativeScreenshotAwareSpecJSI_removeListeners(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
24
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "removeListeners", @selector(removeListeners:), args, count);
25
- }
26
-
27
- NativeScreenshotAwareSpecJSI::NativeScreenshotAwareSpecJSI(const ObjCTurboModule::InitParams &params)
28
- : ObjCTurboModule(params) {
29
-
30
- methodMap_["addListener"] = MethodMetadata {1, __hostFunction_NativeScreenshotAwareSpecJSI_addListener};
31
-
32
-
33
- methodMap_["removeListeners"] = MethodMetadata {1, __hostFunction_NativeScreenshotAwareSpecJSI_removeListeners};
34
-
35
- }
36
- } // namespace facebook::react
@@ -1,50 +0,0 @@
1
- /**
2
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
- *
4
- * Do not edit this file as changes may cause incorrect behavior and will be lost
5
- * once the code is regenerated.
6
- *
7
- * @generated by codegen project: GenerateModuleObjCpp
8
- *
9
- * We create an umbrella header (and corresponding implementation) here since
10
- * Cxx compilation in BUCK has a limitation: source-code producing genrule()s
11
- * must have a single output. More files => more genrule()s => slower builds.
12
- */
13
-
14
- #ifndef __cplusplus
15
- #error This file must be compiled as Obj-C++. If you are importing it, you must change your file extension to .mm.
16
- #endif
17
-
18
- // Avoid multiple includes of RNScreenshotAwareSpec symbols
19
- #ifndef RNScreenshotAwareSpec_H
20
- #define RNScreenshotAwareSpec_H
21
-
22
- #import <Foundation/Foundation.h>
23
- #import <RCTRequired/RCTRequired.h>
24
- #import <RCTTypeSafety/RCTConvertHelpers.h>
25
- #import <RCTTypeSafety/RCTTypedModuleConstants.h>
26
- #import <React/RCTBridgeModule.h>
27
- #import <React/RCTCxxConvert.h>
28
- #import <React/RCTManagedPointer.h>
29
- #import <ReactCommon/RCTTurboModule.h>
30
- #import <optional>
31
- #import <vector>
32
-
33
-
34
- @protocol NativeScreenshotAwareSpec <RCTBridgeModule, RCTTurboModule>
35
-
36
- - (void)addListener:(NSString *)eventName;
37
- - (void)removeListeners:(double)count;
38
-
39
- @end
40
- namespace facebook::react {
41
- /**
42
- * ObjC++ class for module 'NativeScreenshotAware'
43
- */
44
- class JSI_EXPORT NativeScreenshotAwareSpecJSI : public ObjCTurboModule {
45
- public:
46
- NativeScreenshotAwareSpecJSI(const ObjCTurboModule::InitParams &params);
47
- };
48
- } // namespace facebook::react
49
-
50
- #endif // RNScreenshotAwareSpec_H
@@ -1,17 +0,0 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GenerateShadowNodeCpp.js
9
- */
10
-
11
- #include "ShadowNodes.h"
12
-
13
- namespace facebook::react {
14
-
15
-
16
-
17
- } // namespace facebook::react
@@ -1,23 +0,0 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GenerateShadowNodeH.js
9
- */
10
-
11
- #pragma once
12
-
13
- #include "EventEmitters.h"
14
- #include "Props.h"
15
- #include "States.h"
16
- #include <react/renderer/components/view/ConcreteViewShadowNode.h>
17
- #include <jsi/jsi.h>
18
-
19
- namespace facebook::react {
20
-
21
-
22
-
23
- } // namespace facebook::react
@@ -1,16 +0,0 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GenerateStateCpp.js
9
- */
10
- #include "States.h"
11
-
12
- namespace facebook::react {
13
-
14
-
15
-
16
- } // namespace facebook::react
@@ -1,19 +0,0 @@
1
- /**
2
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
- *
4
- * Do not edit this file as changes may cause incorrect behavior and will be lost
5
- * once the code is regenerated.
6
- *
7
- * @generated by codegen project: GenerateStateH.js
8
- */
9
- #pragma once
10
-
11
- #ifdef ANDROID
12
- #include <folly/dynamic.h>
13
- #endif
14
-
15
- namespace facebook::react {
16
-
17
-
18
-
19
- } // namespace facebook::react
@@ -1,36 +0,0 @@
1
- /**
2
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
- *
4
- * Do not edit this file as changes may cause incorrect behavior and will be lost
5
- * once the code is regenerated.
6
- *
7
- * @generated by codegen project: GenerateModuleCpp.js
8
- */
9
-
10
- #include "RNScreenshotAwareSpecJSI.h"
11
-
12
- namespace facebook::react {
13
-
14
- static jsi::Value __hostFunction_NativeScreenshotAwareCxxSpecJSI_addListener(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
15
- static_cast<NativeScreenshotAwareCxxSpecJSI *>(&turboModule)->addListener(
16
- rt,
17
- count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
18
- );
19
- return jsi::Value::undefined();
20
- }
21
- static jsi::Value __hostFunction_NativeScreenshotAwareCxxSpecJSI_removeListeners(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
22
- static_cast<NativeScreenshotAwareCxxSpecJSI *>(&turboModule)->removeListeners(
23
- rt,
24
- count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber()
25
- );
26
- return jsi::Value::undefined();
27
- }
28
-
29
- NativeScreenshotAwareCxxSpecJSI::NativeScreenshotAwareCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
30
- : TurboModule("ScreenshotAware", jsInvoker) {
31
- methodMap_["addListener"] = MethodMetadata {1, __hostFunction_NativeScreenshotAwareCxxSpecJSI_addListener};
32
- methodMap_["removeListeners"] = MethodMetadata {1, __hostFunction_NativeScreenshotAwareCxxSpecJSI_removeListeners};
33
- }
34
-
35
-
36
- } // namespace facebook::react
@@ -1,76 +0,0 @@
1
- /**
2
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
- *
4
- * Do not edit this file as changes may cause incorrect behavior and will be lost
5
- * once the code is regenerated.
6
- *
7
- * @generated by codegen project: GenerateModuleH.js
8
- */
9
-
10
- #pragma once
11
-
12
- #include <ReactCommon/TurboModule.h>
13
- #include <react/bridging/Bridging.h>
14
-
15
- namespace facebook::react {
16
-
17
-
18
- class JSI_EXPORT NativeScreenshotAwareCxxSpecJSI : public TurboModule {
19
- protected:
20
- NativeScreenshotAwareCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
21
-
22
- public:
23
- virtual void addListener(jsi::Runtime &rt, jsi::String eventName) = 0;
24
- virtual void removeListeners(jsi::Runtime &rt, double count) = 0;
25
-
26
- };
27
-
28
- template <typename T>
29
- class JSI_EXPORT NativeScreenshotAwareCxxSpec : public TurboModule {
30
- public:
31
- jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
32
- return delegate_.get(rt, propName);
33
- }
34
-
35
- static constexpr std::string_view kModuleName = "ScreenshotAware";
36
-
37
- protected:
38
- NativeScreenshotAwareCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
39
- : TurboModule(std::string{NativeScreenshotAwareCxxSpec::kModuleName}, jsInvoker),
40
- delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
41
-
42
-
43
- private:
44
- class Delegate : public NativeScreenshotAwareCxxSpecJSI {
45
- public:
46
- Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
47
- NativeScreenshotAwareCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
48
-
49
- }
50
-
51
- void addListener(jsi::Runtime &rt, jsi::String eventName) override {
52
- static_assert(
53
- bridging::getParameterCount(&T::addListener) == 2,
54
- "Expected addListener(...) to have 2 parameters");
55
-
56
- return bridging::callFromJs<void>(
57
- rt, &T::addListener, jsInvoker_, instance_, std::move(eventName));
58
- }
59
- void removeListeners(jsi::Runtime &rt, double count) override {
60
- static_assert(
61
- bridging::getParameterCount(&T::removeListeners) == 2,
62
- "Expected removeListeners(...) to have 2 parameters");
63
-
64
- return bridging::callFromJs<void>(
65
- rt, &T::removeListeners, jsInvoker_, instance_, std::move(count));
66
- }
67
-
68
- private:
69
- friend class NativeScreenshotAwareCxxSpec;
70
- T *instance_;
71
- };
72
-
73
- Delegate delegate_;
74
- };
75
-
76
- } // namespace facebook::react
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeScreenshotAware.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAAmD,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAOpCC,gCAAmB,CAACC,YAAY,CAAO,iBAAiB,CAAC","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeScreenshotAware.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,cAAc;AAOlD,eAAeA,mBAAmB,CAACC,YAAY,CAAO,iBAAiB,CAAC","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"NativeScreenshotAware.d.ts","sourceRoot":"","sources":["../../src/NativeScreenshotAware.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC;;AAED,wBAAyE"}