@azzapp/react-native-snapshot-view 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.
- package/LICENSE +20 -0
- package/README.md +39 -0
- package/android/build.gradle +126 -0
- package/android/generated/java/com/azzapp/rnsnapshotview/NativeRNSnapshotViewSpec.java +42 -0
- package/android/generated/java/com/facebook/react/viewmanagers/RNSnapshotRendererManagerDelegate.java +31 -0
- package/android/generated/java/com/facebook/react/viewmanagers/RNSnapshotRendererManagerInterface.java +17 -0
- package/android/generated/jni/CMakeLists.txt +49 -0
- package/android/generated/jni/RNSnapshotViewSpec-generated.cpp +38 -0
- package/android/generated/jni/RNSnapshotViewSpec.h +31 -0
- package/android/generated/jni/react/renderer/components/RNSnapshotViewSpec/ComponentDescriptors.cpp +22 -0
- package/android/generated/jni/react/renderer/components/RNSnapshotViewSpec/ComponentDescriptors.h +24 -0
- package/android/generated/jni/react/renderer/components/RNSnapshotViewSpec/EventEmitters.cpp +16 -0
- package/android/generated/jni/react/renderer/components/RNSnapshotViewSpec/EventEmitters.h +23 -0
- package/android/generated/jni/react/renderer/components/RNSnapshotViewSpec/Props.cpp +25 -0
- package/android/generated/jni/react/renderer/components/RNSnapshotViewSpec/Props.h +27 -0
- package/android/generated/jni/react/renderer/components/RNSnapshotViewSpec/RNSnapshotViewSpecJSI-generated.cpp +34 -0
- package/android/generated/jni/react/renderer/components/RNSnapshotViewSpec/RNSnapshotViewSpecJSI.h +76 -0
- package/android/generated/jni/react/renderer/components/RNSnapshotViewSpec/ShadowNodes.cpp +17 -0
- package/android/generated/jni/react/renderer/components/RNSnapshotViewSpec/ShadowNodes.h +32 -0
- package/android/generated/jni/react/renderer/components/RNSnapshotViewSpec/States.cpp +16 -0
- package/android/generated/jni/react/renderer/components/RNSnapshotViewSpec/States.h +29 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +3 -0
- package/android/src/main/AndroidManifestNew.xml +2 -0
- package/android/src/main/java/com/azzapp/rnsnapshotview/RNSnapshotRenderer.kt +27 -0
- package/android/src/main/java/com/azzapp/rnsnapshotview/RNSnapshotRendererManager.kt +28 -0
- package/android/src/main/java/com/azzapp/rnsnapshotview/ReactNativeSnapshotViewModule.kt +222 -0
- package/android/src/main/java/com/azzapp/rnsnapshotview/ReactNativeSnapshotViewPackage.kt +42 -0
- package/android/src/newarch/RNSnapshotRendererManagerSpec.kt +21 -0
- package/android/src/newarch/RNSnapshotViewSpec.kt +7 -0
- package/android/src/oldarch/RNSnapshotRendererManagerSpec.kt +9 -0
- package/android/src/oldarch/RNSnapshotViewSpec.kt +12 -0
- package/azzapp-react-native-snapshot-view.podspec +42 -0
- package/ios/RNSnapshotRenderer.h +17 -0
- package/ios/RNSnapshotRenderer.mm +61 -0
- package/ios/RNSnapshotRendererManager.mm +62 -0
- package/ios/RNSnapshotView.h +15 -0
- package/ios/RNSnapshotView.mm +71 -0
- package/ios/generated/RNSnapshotViewSpec/ComponentDescriptors.cpp +22 -0
- package/ios/generated/RNSnapshotViewSpec/ComponentDescriptors.h +24 -0
- package/ios/generated/RNSnapshotViewSpec/EventEmitters.cpp +16 -0
- package/ios/generated/RNSnapshotViewSpec/EventEmitters.h +23 -0
- package/ios/generated/RNSnapshotViewSpec/Props.cpp +25 -0
- package/ios/generated/RNSnapshotViewSpec/Props.h +27 -0
- package/ios/generated/RNSnapshotViewSpec/RCTComponentViewHelpers.h +20 -0
- package/ios/generated/RNSnapshotViewSpec/RNSnapshotViewSpec-generated.mm +36 -0
- package/ios/generated/RNSnapshotViewSpec/RNSnapshotViewSpec.h +54 -0
- package/ios/generated/RNSnapshotViewSpec/ShadowNodes.cpp +17 -0
- package/ios/generated/RNSnapshotViewSpec/ShadowNodes.h +32 -0
- package/ios/generated/RNSnapshotViewSpec/States.cpp +16 -0
- package/ios/generated/RNSnapshotViewSpec/States.h +29 -0
- package/ios/generated/RNSnapshotViewSpecJSI-generated.cpp +34 -0
- package/ios/generated/RNSnapshotViewSpecJSI.h +76 -0
- package/lib/commonjs/NativeRNSnapshotView.js +9 -0
- package/lib/commonjs/NativeRNSnapshotView.js.map +1 -0
- package/lib/commonjs/RNSnapshotRendererNativeComponent.js +10 -0
- package/lib/commonjs/RNSnapshotRendererNativeComponent.js.map +1 -0
- package/lib/commonjs/SnapshotRenderer.js +36 -0
- package/lib/commonjs/SnapshotRenderer.js.map +1 -0
- package/lib/commonjs/index.js +54 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/module/NativeRNSnapshotView.js +5 -0
- package/lib/module/NativeRNSnapshotView.js.map +1 -0
- package/lib/module/RNSnapshotRendererNativeComponent.js +5 -0
- package/lib/module/RNSnapshotRendererNativeComponent.js.map +1 -0
- package/lib/module/SnapshotRenderer.js +31 -0
- package/lib/module/SnapshotRenderer.js.map +1 -0
- package/lib/module/index.js +42 -0
- package/lib/module/index.js.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/src/NativeRNSnapshotView.d.ts +8 -0
- package/lib/typescript/commonjs/src/NativeRNSnapshotView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/RNSnapshotRendererNativeComponent.d.ts +7 -0
- package/lib/typescript/commonjs/src/RNSnapshotRendererNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/SnapshotRenderer.d.ts +27 -0
- package/lib/typescript/commonjs/src/SnapshotRenderer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +16 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/src/NativeRNSnapshotView.d.ts +8 -0
- package/lib/typescript/module/src/NativeRNSnapshotView.d.ts.map +1 -0
- package/lib/typescript/module/src/RNSnapshotRendererNativeComponent.d.ts +7 -0
- package/lib/typescript/module/src/RNSnapshotRendererNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/src/SnapshotRenderer.d.ts +27 -0
- package/lib/typescript/module/src/SnapshotRenderer.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +16 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/package.json +202 -0
- package/src/NativeRNSnapshotView.ts +9 -0
- package/src/RNSnapshotRendererNativeComponent.ts +8 -0
- package/src/SnapshotRenderer.tsx +44 -0
- package/src/index.tsx +57 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
#import "RNSnapshotView.h"
|
|
2
|
+
#import <React/RCTUIManager.h>
|
|
3
|
+
#if __has_include(<React/RCTUIManagerUtils.h>)
|
|
4
|
+
#import <React/RCTUIManagerUtils.h>
|
|
5
|
+
#endif
|
|
6
|
+
#import <React/RCTBridge.h>
|
|
7
|
+
|
|
8
|
+
@implementation RNSnapshotView
|
|
9
|
+
RCT_EXPORT_MODULE()
|
|
10
|
+
|
|
11
|
+
@synthesize bridge = _bridge;
|
|
12
|
+
|
|
13
|
+
- (dispatch_queue_t)methodQueue
|
|
14
|
+
{
|
|
15
|
+
return RCTGetUIManagerQueue();
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
static NSMutableDictionary<NSString*, UIView *> *snapshotMap;
|
|
19
|
+
|
|
20
|
+
+(NSDictionary<NSString *,UIView *> *)getSnapShotMap {
|
|
21
|
+
if (snapshotMap == nil) {
|
|
22
|
+
snapshotMap = [[NSMutableDictionary alloc] init];
|
|
23
|
+
}
|
|
24
|
+
return snapshotMap;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
RCT_EXPORT_METHOD(
|
|
28
|
+
captureSnapshot: (double)viewTag
|
|
29
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
30
|
+
reject:(RCTPromiseRejectBlock)reject) {
|
|
31
|
+
[self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber *, UIView *> *viewRegistry) {
|
|
32
|
+
UIView *view = viewRegistry[[NSNumber numberWithDouble:viewTag]];
|
|
33
|
+
if (view != nil) {
|
|
34
|
+
UIView *snapshot = [view snapshotViewAfterScreenUpdates:NO];
|
|
35
|
+
if (snapshotMap == nil) {
|
|
36
|
+
snapshotMap = [[NSMutableDictionary alloc] init];
|
|
37
|
+
}
|
|
38
|
+
NSUUID *uuid = [NSUUID UUID];
|
|
39
|
+
NSString *str = [uuid UUIDString];
|
|
40
|
+
[snapshotMap setValue:snapshot forKey:str];
|
|
41
|
+
resolve(str);
|
|
42
|
+
} else {
|
|
43
|
+
reject(@"not_found", @"View not found", nil);
|
|
44
|
+
}
|
|
45
|
+
}];
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
RCT_EXPORT_METHOD(
|
|
49
|
+
releaseSnapshot: (NSString *)uuid
|
|
50
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
51
|
+
reject:(RCTPromiseRejectBlock)reject) {
|
|
52
|
+
if (uuid != nil) {
|
|
53
|
+
if (snapshotMap == nil) {
|
|
54
|
+
snapshotMap = [[NSMutableDictionary alloc] init];
|
|
55
|
+
}
|
|
56
|
+
[snapshotMap removeObjectForKey:uuid];
|
|
57
|
+
}
|
|
58
|
+
resolve(nil);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Don't compile this code when we build for the old architecture.
|
|
62
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
63
|
+
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
|
|
64
|
+
(const facebook::react::ObjCTurboModule::InitParams &)params
|
|
65
|
+
{
|
|
66
|
+
return std::make_shared<facebook::react::NativeRNSnapshotViewSpecJSI>(params);
|
|
67
|
+
}
|
|
68
|
+
#endif
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
@end
|
|
@@ -0,0 +1,22 @@
|
|
|
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 RNSnapshotViewSpec_registerComponentDescriptorsFromCodegen(
|
|
18
|
+
std::shared_ptr<const ComponentDescriptorProviderRegistry> registry) {
|
|
19
|
+
registry->add(concreteComponentDescriptorProvider<RNSnapshotRendererComponentDescriptor>());
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
using RNSnapshotRendererComponentDescriptor = ConcreteComponentDescriptor<RNSnapshotRendererShadowNode>;
|
|
20
|
+
|
|
21
|
+
void RNSnapshotViewSpec_registerComponentDescriptorsFromCodegen(
|
|
22
|
+
std::shared_ptr<const ComponentDescriptorProviderRegistry> registry);
|
|
23
|
+
|
|
24
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
class RNSnapshotRendererEventEmitter : public ViewEventEmitter {
|
|
17
|
+
public:
|
|
18
|
+
using ViewEventEmitter::ViewEventEmitter;
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
};
|
|
23
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
RNSnapshotRendererProps::RNSnapshotRendererProps(
|
|
18
|
+
const PropsParserContext &context,
|
|
19
|
+
const RNSnapshotRendererProps &sourceProps,
|
|
20
|
+
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
|
|
21
|
+
|
|
22
|
+
snapshotID(convertRawProp(context, rawProps, "snapshotID", sourceProps.snapshotID, {}))
|
|
23
|
+
{}
|
|
24
|
+
|
|
25
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
#include <react/renderer/components/view/ViewProps.h>
|
|
13
|
+
#include <react/renderer/core/PropsParserContext.h>
|
|
14
|
+
|
|
15
|
+
namespace facebook::react {
|
|
16
|
+
|
|
17
|
+
class RNSnapshotRendererProps final : public ViewProps {
|
|
18
|
+
public:
|
|
19
|
+
RNSnapshotRendererProps() = default;
|
|
20
|
+
RNSnapshotRendererProps(const PropsParserContext& context, const RNSnapshotRendererProps &sourceProps, const RawProps &rawProps);
|
|
21
|
+
|
|
22
|
+
#pragma mark - Props
|
|
23
|
+
|
|
24
|
+
std::string snapshotID{};
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
@protocol RCTRNSnapshotRendererViewProtocol <NSObject>
|
|
17
|
+
|
|
18
|
+
@end
|
|
19
|
+
|
|
20
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,36 @@
|
|
|
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 "RNSnapshotViewSpec.h"
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
namespace facebook::react {
|
|
18
|
+
|
|
19
|
+
static facebook::jsi::Value __hostFunction_NativeRNSnapshotViewSpecJSI_captureSnapshot(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
20
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "captureSnapshot", @selector(captureSnapshot:resolve:reject:), args, count);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
static facebook::jsi::Value __hostFunction_NativeRNSnapshotViewSpecJSI_releaseSnapshot(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
24
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "releaseSnapshot", @selector(releaseSnapshot:resolve:reject:), args, count);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
NativeRNSnapshotViewSpecJSI::NativeRNSnapshotViewSpecJSI(const ObjCTurboModule::InitParams ¶ms)
|
|
28
|
+
: ObjCTurboModule(params) {
|
|
29
|
+
|
|
30
|
+
methodMap_["captureSnapshot"] = MethodMetadata {1, __hostFunction_NativeRNSnapshotViewSpecJSI_captureSnapshot};
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
methodMap_["releaseSnapshot"] = MethodMetadata {1, __hostFunction_NativeRNSnapshotViewSpecJSI_releaseSnapshot};
|
|
34
|
+
|
|
35
|
+
}
|
|
36
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,54 @@
|
|
|
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 RNSnapshotViewSpec symbols
|
|
19
|
+
#ifndef RNSnapshotViewSpec_H
|
|
20
|
+
#define RNSnapshotViewSpec_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 NativeRNSnapshotViewSpec <RCTBridgeModule, RCTTurboModule>
|
|
35
|
+
|
|
36
|
+
- (void)captureSnapshot:(double)target
|
|
37
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
38
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
39
|
+
- (void)releaseSnapshot:(NSString *)a
|
|
40
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
41
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
42
|
+
|
|
43
|
+
@end
|
|
44
|
+
namespace facebook::react {
|
|
45
|
+
/**
|
|
46
|
+
* ObjC++ class for module 'NativeRNSnapshotView'
|
|
47
|
+
*/
|
|
48
|
+
class JSI_EXPORT NativeRNSnapshotViewSpecJSI : public ObjCTurboModule {
|
|
49
|
+
public:
|
|
50
|
+
NativeRNSnapshotViewSpecJSI(const ObjCTurboModule::InitParams ¶ms);
|
|
51
|
+
};
|
|
52
|
+
} // namespace facebook::react
|
|
53
|
+
|
|
54
|
+
#endif // RNSnapshotViewSpec_H
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
extern const char RNSnapshotRendererComponentName[] = "RNSnapshotRenderer";
|
|
16
|
+
|
|
17
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
JSI_EXPORT extern const char RNSnapshotRendererComponentName[];
|
|
22
|
+
|
|
23
|
+
/*
|
|
24
|
+
* `ShadowNode` for <RNSnapshotRenderer> component.
|
|
25
|
+
*/
|
|
26
|
+
using RNSnapshotRendererShadowNode = ConcreteViewShadowNode<
|
|
27
|
+
RNSnapshotRendererComponentName,
|
|
28
|
+
RNSnapshotRendererProps,
|
|
29
|
+
RNSnapshotRendererEventEmitter,
|
|
30
|
+
RNSnapshotRendererState>;
|
|
31
|
+
|
|
32
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
class RNSnapshotRendererState {
|
|
18
|
+
public:
|
|
19
|
+
RNSnapshotRendererState() = default;
|
|
20
|
+
|
|
21
|
+
#ifdef ANDROID
|
|
22
|
+
RNSnapshotRendererState(RNSnapshotRendererState const &previousState, folly::dynamic data){};
|
|
23
|
+
folly::dynamic getDynamic() const {
|
|
24
|
+
return {};
|
|
25
|
+
};
|
|
26
|
+
#endif
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,34 @@
|
|
|
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 "RNSnapshotViewSpecJSI.h"
|
|
11
|
+
|
|
12
|
+
namespace facebook::react {
|
|
13
|
+
|
|
14
|
+
static jsi::Value __hostFunction_NativeRNSnapshotViewCxxSpecJSI_captureSnapshot(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
15
|
+
return static_cast<NativeRNSnapshotViewCxxSpecJSI *>(&turboModule)->captureSnapshot(
|
|
16
|
+
rt,
|
|
17
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber()
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
static jsi::Value __hostFunction_NativeRNSnapshotViewCxxSpecJSI_releaseSnapshot(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
21
|
+
return static_cast<NativeRNSnapshotViewCxxSpecJSI *>(&turboModule)->releaseSnapshot(
|
|
22
|
+
rt,
|
|
23
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
NativeRNSnapshotViewCxxSpecJSI::NativeRNSnapshotViewCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
|
|
28
|
+
: TurboModule("RNSnapshotView", jsInvoker) {
|
|
29
|
+
methodMap_["captureSnapshot"] = MethodMetadata {1, __hostFunction_NativeRNSnapshotViewCxxSpecJSI_captureSnapshot};
|
|
30
|
+
methodMap_["releaseSnapshot"] = MethodMetadata {1, __hostFunction_NativeRNSnapshotViewCxxSpecJSI_releaseSnapshot};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,76 @@
|
|
|
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 NativeRNSnapshotViewCxxSpecJSI : public TurboModule {
|
|
19
|
+
protected:
|
|
20
|
+
NativeRNSnapshotViewCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
21
|
+
|
|
22
|
+
public:
|
|
23
|
+
virtual jsi::Value captureSnapshot(jsi::Runtime &rt, double target) = 0;
|
|
24
|
+
virtual jsi::Value releaseSnapshot(jsi::Runtime &rt, jsi::String a) = 0;
|
|
25
|
+
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
template <typename T>
|
|
29
|
+
class JSI_EXPORT NativeRNSnapshotViewCxxSpec : 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 = "RNSnapshotView";
|
|
36
|
+
|
|
37
|
+
protected:
|
|
38
|
+
NativeRNSnapshotViewCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
39
|
+
: TurboModule(std::string{NativeRNSnapshotViewCxxSpec::kModuleName}, jsInvoker),
|
|
40
|
+
delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
private:
|
|
44
|
+
class Delegate : public NativeRNSnapshotViewCxxSpecJSI {
|
|
45
|
+
public:
|
|
46
|
+
Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
|
|
47
|
+
NativeRNSnapshotViewCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
|
|
48
|
+
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
jsi::Value captureSnapshot(jsi::Runtime &rt, double target) override {
|
|
52
|
+
static_assert(
|
|
53
|
+
bridging::getParameterCount(&T::captureSnapshot) == 2,
|
|
54
|
+
"Expected captureSnapshot(...) to have 2 parameters");
|
|
55
|
+
|
|
56
|
+
return bridging::callFromJs<jsi::Value>(
|
|
57
|
+
rt, &T::captureSnapshot, jsInvoker_, instance_, std::move(target));
|
|
58
|
+
}
|
|
59
|
+
jsi::Value releaseSnapshot(jsi::Runtime &rt, jsi::String a) override {
|
|
60
|
+
static_assert(
|
|
61
|
+
bridging::getParameterCount(&T::releaseSnapshot) == 2,
|
|
62
|
+
"Expected releaseSnapshot(...) to have 2 parameters");
|
|
63
|
+
|
|
64
|
+
return bridging::callFromJs<jsi::Value>(
|
|
65
|
+
rt, &T::releaseSnapshot, jsInvoker_, instance_, std::move(a));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
private:
|
|
69
|
+
friend class NativeRNSnapshotViewCxxSpec;
|
|
70
|
+
T *instance_;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
Delegate delegate_;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _default = exports.default = _reactNative.TurboModuleRegistry.getEnforcing('RNSnapshotView');
|
|
9
|
+
//# sourceMappingURL=NativeRNSnapshotView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeRNSnapshotView.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAAmD,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAOpCC,gCAAmB,CAACC,YAAY,CAAO,gBAAgB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _codegenNativeComponent = _interopRequireDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
var _default = exports.default = (0, _codegenNativeComponent.default)('RNSnapshotRenderer');
|
|
10
|
+
//# sourceMappingURL=RNSnapshotRendererNativeComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_codegenNativeComponent","_interopRequireDefault","require","e","__esModule","default","_default","exports","codegenNativeComponent"],"sourceRoot":"../../src","sources":["RNSnapshotRendererNativeComponent.ts"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA6F,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,GAO9E,IAAAG,+BAAsB,EAAc,oBAAoB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _RNSnapshotRendererNativeComponent = _interopRequireDefault(require("./RNSnapshotRendererNativeComponent.js"));
|
|
9
|
+
var _index = require("./index.js");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
/**
|
|
13
|
+
* A view that renders a snapshot of a view.
|
|
14
|
+
*/
|
|
15
|
+
const SnapshotRenderer = ({
|
|
16
|
+
snapshotID,
|
|
17
|
+
autoReleaseSnapshot = true,
|
|
18
|
+
...props
|
|
19
|
+
}, forwardedRef) => {
|
|
20
|
+
const autoReleaseSnapshotRef = (0, _react.useRef)(autoReleaseSnapshot);
|
|
21
|
+
(0, _react.useEffect)(() => {
|
|
22
|
+
autoReleaseSnapshotRef.current = autoReleaseSnapshot;
|
|
23
|
+
}, [autoReleaseSnapshot]);
|
|
24
|
+
(0, _react.useEffect)(() => () => {
|
|
25
|
+
if (autoReleaseSnapshotRef.current && snapshotID) {
|
|
26
|
+
(0, _index.releaseSnapshot)(snapshotID).catch(() => {});
|
|
27
|
+
}
|
|
28
|
+
}, [snapshotID]);
|
|
29
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_RNSnapshotRendererNativeComponent.default, {
|
|
30
|
+
ref: forwardedRef,
|
|
31
|
+
snapshotID: snapshotID,
|
|
32
|
+
...props
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
var _default = exports.default = /*#__PURE__*/(0, _react.forwardRef)(SnapshotRenderer);
|
|
36
|
+
//# sourceMappingURL=SnapshotRenderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_RNSnapshotRendererNativeComponent","_interopRequireDefault","_index","_jsxRuntime","e","__esModule","default","SnapshotRenderer","snapshotID","autoReleaseSnapshot","props","forwardedRef","autoReleaseSnapshotRef","useRef","useEffect","current","releaseSnapshot","catch","jsx","ref","_default","exports","forwardRef"],"sourceRoot":"../../src","sources":["SnapshotRenderer.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,kCAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAAoC,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAE,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAepC;AACA;AACA;AACA,MAAMG,gBAAgB,GAAGA,CACvB;EAAEC,UAAU;EAAEC,mBAAmB,GAAG,IAAI;EAAE,GAAGC;AAA6B,CAAC,EAC3EC,YAAgC,KAC7B;EACH,MAAMC,sBAAsB,GAAG,IAAAC,aAAM,EAACJ,mBAAmB,CAAC;EAC1D,IAAAK,gBAAS,EAAC,MAAM;IACdF,sBAAsB,CAACG,OAAO,GAAGN,mBAAmB;EACtD,CAAC,EAAE,CAACA,mBAAmB,CAAC,CAAC;EAEzB,IAAAK,gBAAS,EACP,MAAM,MAAM;IACV,IAAIF,sBAAsB,CAACG,OAAO,IAAIP,UAAU,EAAE;MAChD,IAAAQ,sBAAe,EAACR,UAAU,CAAC,CAACS,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7C;EACF,CAAC,EACD,CAACT,UAAU,CACb,CAAC;EACD,oBACE,IAAAL,WAAA,CAAAe,GAAA,EAAClB,kCAAA,CAAAM,OAAkB;IAACa,GAAG,EAAER,YAAa;IAACH,UAAU,EAAEA,UAAW;IAAA,GAAKE;EAAK,CAAG,CAAC;AAEhF,CAAC;AAAC,IAAAU,QAAA,GAAAC,OAAA,CAAAf,OAAA,gBAEa,IAAAgB,iBAAU,EAACf,gBAAgB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "SnapshotRenderer", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _SnapshotRenderer.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
exports.captureSnapshot = captureSnapshot;
|
|
13
|
+
exports.releaseSnapshot = releaseSnapshot;
|
|
14
|
+
var _reactNative = require("react-native");
|
|
15
|
+
var _SnapshotRenderer = _interopRequireDefault(require("./SnapshotRenderer.js"));
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
+
const LINKING_ERROR = `The package '@azzapp/react-native-snapshot-view' doesn't seem to be linked. Make sure: \n\n` + _reactNative.Platform.select({
|
|
18
|
+
ios: "- You have run 'pod install'\n",
|
|
19
|
+
default: ''
|
|
20
|
+
}) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n';
|
|
21
|
+
|
|
22
|
+
// @ts-expect-error
|
|
23
|
+
const isTurboModuleEnabled = global.__turboModuleProxy != null;
|
|
24
|
+
const RNSnapshotViewModule = isTurboModuleEnabled ? require('./NativeRNSnapshotView').default : _reactNative.NativeModules.RNSnapshotView;
|
|
25
|
+
const RNSnapshotView = RNSnapshotViewModule ? RNSnapshotViewModule : new Proxy({}, {
|
|
26
|
+
get() {
|
|
27
|
+
throw new Error(LINKING_ERROR);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Captures a snapshot of a view. The snapshot can be rendered using the `SnapshotRenderer` component.
|
|
33
|
+
*
|
|
34
|
+
* @param componentOrHandle The view to capture. Can be a view ref or a native component handle.
|
|
35
|
+
* @returns A promise that resolves to the ID of the snapshot. The snapshot should be released when no longer needed.
|
|
36
|
+
*/
|
|
37
|
+
function captureSnapshot(componentOrHandle) {
|
|
38
|
+
const handle = (0, _reactNative.findNodeHandle)(componentOrHandle);
|
|
39
|
+
if (handle == null) {
|
|
40
|
+
return Promise.reject(new Error('Invalid node handle'));
|
|
41
|
+
}
|
|
42
|
+
return RNSnapshotView.captureSnapshot(handle);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Releases a snapshot.
|
|
47
|
+
*
|
|
48
|
+
* @param snapshotID The ID of the snapshot to release.
|
|
49
|
+
* @returns A promise that resolves when the snapshot is released.
|
|
50
|
+
*/
|
|
51
|
+
function releaseSnapshot(snapshotID) {
|
|
52
|
+
return RNSnapshotView.releaseSnapshot(snapshotID);
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=index.js.map
|