@azzapp/react-native-snapshot-view 0.1.2 → 0.1.3

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 (47) hide show
  1. package/android/{generated/java/com/azzapp/rnsnapshotview → app/build/generated/source/codegen/java/com/facebook/fbreact/specs}/NativeRNSnapshotViewSpec.java +1 -1
  2. package/{ios/generated → android/app/build/generated/source/codegen/jni/react/renderer/components}/RNSnapshotViewSpec/ComponentDescriptors.cpp +1 -1
  3. package/android/{generated → app/build/generated/source/codegen}/jni/react/renderer/components/RNSnapshotViewSpec/ComponentDescriptors.h +1 -1
  4. package/{ios/generated → android/app/build/generated/source/codegen/jni/react/renderer/components}/RNSnapshotViewSpec/EventEmitters.cpp +1 -1
  5. package/{ios/generated → android/app/build/generated/source/codegen/jni/react/renderer/components}/RNSnapshotViewSpec/Props.cpp +1 -1
  6. package/{ios/generated → android/app/build/generated/source/codegen/jni/react/renderer/components}/RNSnapshotViewSpec/ShadowNodes.cpp +1 -1
  7. package/android/{generated → app/build/generated/source/codegen}/jni/react/renderer/components/RNSnapshotViewSpec/ShadowNodes.h +3 -3
  8. package/{ios/generated → android/app/build/generated/source/codegen/jni/react/renderer/components}/RNSnapshotViewSpec/States.cpp +1 -1
  9. package/android/build.gradle +0 -3
  10. package/ios/RNSnapshotRenderer.mm +4 -4
  11. package/lib/commonjs/RNSnapshotRendererNativeComponent.js +2 -10
  12. package/lib/commonjs/RNSnapshotRendererNativeComponent.js.map +1 -1
  13. package/lib/commonjs/SnapshotRenderer.js +3 -3
  14. package/lib/commonjs/SnapshotRenderer.js.map +1 -1
  15. package/lib/commonjs/index.js +1 -1
  16. package/lib/module/RNSnapshotRendererNativeComponent.js +1 -9
  17. package/lib/module/RNSnapshotRendererNativeComponent.js.map +1 -1
  18. package/lib/module/SnapshotRenderer.js +2 -2
  19. package/lib/module/SnapshotRenderer.js.map +1 -1
  20. package/lib/module/index.js +1 -1
  21. package/lib/module/index.js.map +1 -1
  22. package/package.json +5 -11
  23. package/android/generated/jni/react/renderer/components/RNSnapshotViewSpec/ComponentDescriptors.cpp +0 -22
  24. package/android/generated/jni/react/renderer/components/RNSnapshotViewSpec/EventEmitters.cpp +0 -16
  25. package/android/generated/jni/react/renderer/components/RNSnapshotViewSpec/Props.cpp +0 -25
  26. package/android/generated/jni/react/renderer/components/RNSnapshotViewSpec/ShadowNodes.cpp +0 -17
  27. package/android/generated/jni/react/renderer/components/RNSnapshotViewSpec/States.cpp +0 -16
  28. package/ios/generated/RNSnapshotViewSpec/ComponentDescriptors.h +0 -24
  29. package/ios/generated/RNSnapshotViewSpec/EventEmitters.h +0 -23
  30. package/ios/generated/RNSnapshotViewSpec/Props.h +0 -27
  31. package/ios/generated/RNSnapshotViewSpec/RCTComponentViewHelpers.h +0 -20
  32. package/ios/generated/RNSnapshotViewSpec/RNSnapshotViewSpec-generated.mm +0 -36
  33. package/ios/generated/RNSnapshotViewSpec/RNSnapshotViewSpec.h +0 -54
  34. package/ios/generated/RNSnapshotViewSpec/ShadowNodes.h +0 -32
  35. package/ios/generated/RNSnapshotViewSpec/States.h +0 -29
  36. package/ios/generated/RNSnapshotViewSpecJSI-generated.cpp +0 -34
  37. package/ios/generated/RNSnapshotViewSpecJSI.h +0 -76
  38. /package/android/{generated → app/build/generated/source/codegen}/java/com/facebook/react/viewmanagers/RNSnapshotRendererManagerDelegate.java +0 -0
  39. /package/android/{generated → app/build/generated/source/codegen}/java/com/facebook/react/viewmanagers/RNSnapshotRendererManagerInterface.java +0 -0
  40. /package/android/{generated → app/build/generated/source/codegen}/jni/CMakeLists.txt +0 -0
  41. /package/android/{generated → app/build/generated/source/codegen}/jni/RNSnapshotViewSpec-generated.cpp +0 -0
  42. /package/android/{generated → app/build/generated/source/codegen}/jni/RNSnapshotViewSpec.h +0 -0
  43. /package/android/{generated → app/build/generated/source/codegen}/jni/react/renderer/components/RNSnapshotViewSpec/EventEmitters.h +0 -0
  44. /package/android/{generated → app/build/generated/source/codegen}/jni/react/renderer/components/RNSnapshotViewSpec/Props.h +0 -0
  45. /package/android/{generated → app/build/generated/source/codegen}/jni/react/renderer/components/RNSnapshotViewSpec/RNSnapshotViewSpecJSI-generated.cpp +0 -0
  46. /package/android/{generated → app/build/generated/source/codegen}/jni/react/renderer/components/RNSnapshotViewSpec/RNSnapshotViewSpecJSI.h +0 -0
  47. /package/android/{generated → app/build/generated/source/codegen}/jni/react/renderer/components/RNSnapshotViewSpec/States.h +0 -0
@@ -10,7 +10,7 @@
10
10
  * @nolint
11
11
  */
12
12
 
13
- package com.azzapp.rnsnapshotview;
13
+ package com.facebook.fbreact.specs;
14
14
 
15
15
  import com.facebook.proguard.annotations.DoNotStrip;
16
16
  import com.facebook.react.bridge.Promise;
@@ -8,7 +8,7 @@
8
8
  * @generated by codegen project: GenerateComponentDescriptorCpp.js
9
9
  */
10
10
 
11
- #include "ComponentDescriptors.h"
11
+ #include <react/renderer/components/RNSnapshotViewSpec/ComponentDescriptors.h>
12
12
  #include <react/renderer/core/ConcreteComponentDescriptor.h>
13
13
  #include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
14
14
 
@@ -10,7 +10,7 @@
10
10
 
11
11
  #pragma once
12
12
 
13
- #include "ShadowNodes.h"
13
+ #include <react/renderer/components/RNSnapshotViewSpec/ShadowNodes.h>
14
14
  #include <react/renderer/core/ConcreteComponentDescriptor.h>
15
15
  #include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
16
16
 
@@ -8,7 +8,7 @@
8
8
  * @generated by codegen project: GenerateEventEmitterCpp.js
9
9
  */
10
10
 
11
- #include "EventEmitters.h"
11
+ #include <react/renderer/components/RNSnapshotViewSpec/EventEmitters.h>
12
12
 
13
13
 
14
14
  namespace facebook::react {
@@ -8,7 +8,7 @@
8
8
  * @generated by codegen project: GeneratePropsCpp.js
9
9
  */
10
10
 
11
- #include "Props.h"
11
+ #include <react/renderer/components/RNSnapshotViewSpec/Props.h>
12
12
  #include <react/renderer/core/PropsParserContext.h>
13
13
  #include <react/renderer/core/propsConversions.h>
14
14
 
@@ -8,7 +8,7 @@
8
8
  * @generated by codegen project: GenerateShadowNodeCpp.js
9
9
  */
10
10
 
11
- #include "ShadowNodes.h"
11
+ #include <react/renderer/components/RNSnapshotViewSpec/ShadowNodes.h>
12
12
 
13
13
  namespace facebook::react {
14
14
 
@@ -10,9 +10,9 @@
10
10
 
11
11
  #pragma once
12
12
 
13
- #include "EventEmitters.h"
14
- #include "Props.h"
15
- #include "States.h"
13
+ #include <react/renderer/components/RNSnapshotViewSpec/EventEmitters.h>
14
+ #include <react/renderer/components/RNSnapshotViewSpec/Props.h>
15
+ #include <react/renderer/components/RNSnapshotViewSpec/States.h>
16
16
  #include <react/renderer/components/view/ConcreteViewShadowNode.h>
17
17
  #include <jsi/jsi.h>
18
18
 
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * @generated by codegen project: GenerateStateCpp.js
9
9
  */
10
- #include "States.h"
10
+ #include <react/renderer/components/RNSnapshotViewSpec/States.h>
11
11
 
12
12
  namespace facebook::react {
13
13
 
@@ -91,9 +91,6 @@ android {
91
91
  if (isNewArchitectureEnabled()) {
92
92
  java.srcDirs += [
93
93
  "src/newarch",
94
- // Codegen specs
95
- "generated/java",
96
- "generated/jni"
97
94
  ]
98
95
  } else {
99
96
  java.srcDirs += ["src/oldarch"]
@@ -1,10 +1,10 @@
1
1
  #ifdef RCT_NEW_ARCH_ENABLED
2
2
  #import "RNSnapshotRenderer.h"
3
3
 
4
- #import "generated/RNSnapshotViewSpec/ComponentDescriptors.h"
5
- #import "generated/RNSnapshotViewSpec/EventEmitters.h"
6
- #import "generated/RNSnapshotViewSpec/Props.h"
7
- #import "generated/RNSnapshotViewSpec/RCTComponentViewHelpers.h"
4
+ #import <react/renderer/components/RNSnapshotViewSpec/ComponentDescriptors.h>
5
+ #import <react/renderer/components/RNSnapshotViewSpec/EventEmitters.h>
6
+ #import <react/renderer/components/RNSnapshotViewSpec/Props.h>
7
+ #import <react/renderer/components/RNSnapshotViewSpec/RCTComponentViewHelpers.h>
8
8
 
9
9
  #import "RCTFabricComponentsPlugins.h"
10
10
  #import "RNSnapshotView.h"
@@ -3,16 +3,8 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.default = exports.__INTERNAL_VIEW_CONFIG = void 0;
6
+ exports.default = void 0;
7
7
  var _codegenNativeComponent = _interopRequireDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));
8
8
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
- const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
10
- let nativeComponentName = 'RNSnapshotRenderer';
11
- const __INTERNAL_VIEW_CONFIG = exports.__INTERNAL_VIEW_CONFIG = {
12
- uiViewClassName: 'RNSnapshotRenderer',
13
- validAttributes: {
14
- snapshotID: true
15
- }
16
- };
17
- var _default = exports.default = NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
9
+ var _default = exports.default = (0, _codegenNativeComponent.default)('RNSnapshotRenderer');
18
10
  //# sourceMappingURL=RNSnapshotRendererNativeComponent.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_codegenNativeComponent","_interopRequireDefault","require","e","__esModule","default","NativeComponentRegistry","nativeComponentName","__INTERNAL_VIEW_CONFIG","exports","uiViewClassName","validAttributes","snapshotID","_default","get"],"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;AAc7F,MAAMG,uBAAuB,GAAGJ,OAAO,CAAC,gEAAgE,CAAC;AAEzG,IAAIK,mBAAmB,GAAG,oBAAoB;AAGvC,MAAMC,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,GAAG;EACpCE,eAAe,EAAE,oBAAoB;EAErCC,eAAe,EAAE;IACfC,UAAU,EAAE;EACd;AACF,CAAC;AAAC,IAAAC,QAAA,GAAAJ,OAAA,CAAAJ,OAAA,GAEaC,uBAAuB,CAACQ,GAAG,CAACP,mBAAmB,EAAE,MAAMC,sBAAsB,CAAC","ignoreList":[]}
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":[]}
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var _react = require("react");
8
- var _RNSnapshotRendererNativeComponent = _interopRequireDefault(require("./RNSnapshotRendererNativeComponent"));
9
- var _ = require(".");
8
+ var _RNSnapshotRendererNativeComponent = _interopRequireDefault(require("./RNSnapshotRendererNativeComponent.js"));
9
+ var _index = require("./index.js");
10
10
  var _jsxRuntime = require("react/jsx-runtime");
11
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
12
  /**
@@ -23,7 +23,7 @@ const SnapshotRenderer = ({
23
23
  }, [autoReleaseSnapshot]);
24
24
  (0, _react.useEffect)(() => () => {
25
25
  if (autoReleaseSnapshotRef.current && snapshotID) {
26
- (0, _.releaseSnapshot)(snapshotID).catch(() => {});
26
+ (0, _index.releaseSnapshot)(snapshotID).catch(() => {});
27
27
  }
28
28
  }, [snapshotID]);
29
29
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_RNSnapshotRendererNativeComponent.default, {
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_RNSnapshotRendererNativeComponent","_interopRequireDefault","_","_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,CAAA,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,iBAAe,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":[]}
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":[]}
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "SnapshotRenderer", {
12
12
  exports.captureSnapshot = captureSnapshot;
13
13
  exports.releaseSnapshot = releaseSnapshot;
14
14
  var _reactNative = require("react-native");
15
- var _SnapshotRenderer = _interopRequireDefault(require("./SnapshotRenderer"));
15
+ var _SnapshotRenderer = _interopRequireDefault(require("./SnapshotRenderer.js"));
16
16
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
17
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
18
  ios: "- You have run 'pod install'\n",
@@ -1,13 +1,5 @@
1
1
  "use strict";
2
2
 
3
3
  import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
4
- const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
5
- let nativeComponentName = 'RNSnapshotRenderer';
6
- export const __INTERNAL_VIEW_CONFIG = {
7
- uiViewClassName: 'RNSnapshotRenderer',
8
- validAttributes: {
9
- snapshotID: true
10
- }
11
- };
12
- export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
4
+ export default codegenNativeComponent('RNSnapshotRenderer');
13
5
  //# sourceMappingURL=RNSnapshotRendererNativeComponent.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["codegenNativeComponent","NativeComponentRegistry","require","nativeComponentName","__INTERNAL_VIEW_CONFIG","uiViewClassName","validAttributes","snapshotID","get"],"sourceRoot":"../../src","sources":["RNSnapshotRendererNativeComponent.ts"],"mappings":";;AAAA,OAAOA,sBAAsB,MAAM,yDAAyD;AAc5F,MAAMC,uBAAuB,GAAGC,OAAO,CAAC,gEAAgE,CAAC;AAEzG,IAAIC,mBAAmB,GAAG,oBAAoB;AAG9C,OAAO,MAAMC,sBAAsB,GAAG;EACpCC,eAAe,EAAE,oBAAoB;EAErCC,eAAe,EAAE;IACfC,UAAU,EAAE;EACd;AACF,CAAC;AAED,eAAeN,uBAAuB,CAACO,GAAG,CAACL,mBAAmB,EAAE,MAAMC,sBAAsB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["codegenNativeComponent"],"sourceRoot":"../../src","sources":["RNSnapshotRendererNativeComponent.ts"],"mappings":";;AAAA,OAAOA,sBAAsB,MAAM,yDAAyD;AAO5F,eAAeA,sBAAsB,CAAc,oBAAoB,CAAC","ignoreList":[]}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
 
3
3
  import { forwardRef, useEffect, useRef } from 'react';
4
- import RNSnapshotRenderer from './RNSnapshotRendererNativeComponent';
5
- import { releaseSnapshot } from '.';
4
+ import RNSnapshotRenderer from "./RNSnapshotRendererNativeComponent.js";
5
+ import { releaseSnapshot } from "./index.js";
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
7
  /**
8
8
  * A view that renders a snapshot of a view.
@@ -1 +1 @@
1
- {"version":3,"names":["forwardRef","useEffect","useRef","RNSnapshotRenderer","releaseSnapshot","jsx","_jsx","SnapshotRenderer","snapshotID","autoReleaseSnapshot","props","forwardedRef","autoReleaseSnapshotRef","current","catch","ref"],"sourceRoot":"../../src","sources":["SnapshotRenderer.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,SAAS,EAAEC,MAAM,QAA2B,OAAO;AAExE,OAAOC,kBAAkB,MAAM,qCAAqC;AACpE,SAASC,eAAe,QAAQ,GAAG;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAepC;AACA;AACA;AACA,MAAMC,gBAAgB,GAAGA,CACvB;EAAEC,UAAU;EAAEC,mBAAmB,GAAG,IAAI;EAAE,GAAGC;AAA6B,CAAC,EAC3EC,YAAgC,KAC7B;EACH,MAAMC,sBAAsB,GAAGV,MAAM,CAACO,mBAAmB,CAAC;EAC1DR,SAAS,CAAC,MAAM;IACdW,sBAAsB,CAACC,OAAO,GAAGJ,mBAAmB;EACtD,CAAC,EAAE,CAACA,mBAAmB,CAAC,CAAC;EAEzBR,SAAS,CACP,MAAM,MAAM;IACV,IAAIW,sBAAsB,CAACC,OAAO,IAAIL,UAAU,EAAE;MAChDJ,eAAe,CAACI,UAAU,CAAC,CAACM,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7C;EACF,CAAC,EACD,CAACN,UAAU,CACb,CAAC;EACD,oBACEF,IAAA,CAACH,kBAAkB;IAACY,GAAG,EAAEJ,YAAa;IAACH,UAAU,EAAEA,UAAW;IAAA,GAAKE;EAAK,CAAG,CAAC;AAEhF,CAAC;AAED,4BAAeV,UAAU,CAACO,gBAAgB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["forwardRef","useEffect","useRef","RNSnapshotRenderer","releaseSnapshot","jsx","_jsx","SnapshotRenderer","snapshotID","autoReleaseSnapshot","props","forwardedRef","autoReleaseSnapshotRef","current","catch","ref"],"sourceRoot":"../../src","sources":["SnapshotRenderer.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,SAAS,EAAEC,MAAM,QAA2B,OAAO;AAExE,OAAOC,kBAAkB,MAAM,wCAAqC;AACpE,SAASC,eAAe,QAAQ,YAAG;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAepC;AACA;AACA;AACA,MAAMC,gBAAgB,GAAGA,CACvB;EAAEC,UAAU;EAAEC,mBAAmB,GAAG,IAAI;EAAE,GAAGC;AAA6B,CAAC,EAC3EC,YAAgC,KAC7B;EACH,MAAMC,sBAAsB,GAAGV,MAAM,CAACO,mBAAmB,CAAC;EAC1DR,SAAS,CAAC,MAAM;IACdW,sBAAsB,CAACC,OAAO,GAAGJ,mBAAmB;EACtD,CAAC,EAAE,CAACA,mBAAmB,CAAC,CAAC;EAEzBR,SAAS,CACP,MAAM,MAAM;IACV,IAAIW,sBAAsB,CAACC,OAAO,IAAIL,UAAU,EAAE;MAChDJ,eAAe,CAACI,UAAU,CAAC,CAACM,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7C;EACF,CAAC,EACD,CAACN,UAAU,CACb,CAAC;EACD,oBACEF,IAAA,CAACH,kBAAkB;IAACY,GAAG,EAAEJ,YAAa;IAACH,UAAU,EAAEA,UAAW;IAAA,GAAKE;EAAK,CAAG,CAAC;AAEhF,CAAC;AAED,4BAAeV,UAAU,CAACO,gBAAgB,CAAC","ignoreList":[]}
@@ -38,5 +38,5 @@ export function captureSnapshot(componentOrHandle) {
38
38
  export function releaseSnapshot(snapshotID) {
39
39
  return RNSnapshotView.releaseSnapshot(snapshotID);
40
40
  }
41
- export { default as SnapshotRenderer } from './SnapshotRenderer';
41
+ export { default as SnapshotRenderer } from "./SnapshotRenderer.js";
42
42
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["findNodeHandle","NativeModules","Platform","LINKING_ERROR","select","ios","default","isTurboModuleEnabled","global","__turboModuleProxy","RNSnapshotViewModule","require","RNSnapshotView","Proxy","get","Error","captureSnapshot","componentOrHandle","handle","Promise","reject","releaseSnapshot","snapshotID","SnapshotRenderer"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,cAAc,EAAEC,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AAEtE,MAAMC,aAAa,GACjB,6FAA6F,GAC7FD,QAAQ,CAACE,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;;AAEjC;AACA,MAAMC,oBAAoB,GAAGC,MAAM,CAACC,kBAAkB,IAAI,IAAI;AAE9D,MAAMC,oBAAoB,GAAGH,oBAAoB,GAC7CI,OAAO,CAAC,wBAAwB,CAAC,CAACL,OAAO,GACzCL,aAAa,CAACW,cAAc;AAEhC,MAAMA,cAAc,GAAGF,oBAAoB,GACvCA,oBAAoB,GACpB,IAAIG,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACZ,aAAa,CAAC;EAChC;AACF,CACF,CAAC;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASa,eAAeA,CAC7BC,iBAI6B,EACZ;EACjB,MAAMC,MAAM,GAAGlB,cAAc,CAACiB,iBAAiB,CAAC;EAChD,IAAIC,MAAM,IAAI,IAAI,EAAE;IAClB,OAAOC,OAAO,CAACC,MAAM,CAAC,IAAIL,KAAK,CAAC,qBAAqB,CAAC,CAAC;EACzD;EACA,OAAOH,cAAc,CAACI,eAAe,CAACE,MAAM,CAAC;AAC/C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,eAAeA,CAACC,UAAkB,EAAiB;EACjE,OAAOV,cAAc,CAACS,eAAe,CAACC,UAAU,CAAC;AACnD;AAEA,SAAShB,OAAO,IAAIiB,gBAAgB,QAAQ,oBAAoB","ignoreList":[]}
1
+ {"version":3,"names":["findNodeHandle","NativeModules","Platform","LINKING_ERROR","select","ios","default","isTurboModuleEnabled","global","__turboModuleProxy","RNSnapshotViewModule","require","RNSnapshotView","Proxy","get","Error","captureSnapshot","componentOrHandle","handle","Promise","reject","releaseSnapshot","snapshotID","SnapshotRenderer"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,cAAc,EAAEC,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AAEtE,MAAMC,aAAa,GACjB,6FAA6F,GAC7FD,QAAQ,CAACE,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;;AAEjC;AACA,MAAMC,oBAAoB,GAAGC,MAAM,CAACC,kBAAkB,IAAI,IAAI;AAE9D,MAAMC,oBAAoB,GAAGH,oBAAoB,GAC7CI,OAAO,CAAC,wBAAwB,CAAC,CAACL,OAAO,GACzCL,aAAa,CAACW,cAAc;AAEhC,MAAMA,cAAc,GAAGF,oBAAoB,GACvCA,oBAAoB,GACpB,IAAIG,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACZ,aAAa,CAAC;EAChC;AACF,CACF,CAAC;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASa,eAAeA,CAC7BC,iBAI6B,EACZ;EACjB,MAAMC,MAAM,GAAGlB,cAAc,CAACiB,iBAAiB,CAAC;EAChD,IAAIC,MAAM,IAAI,IAAI,EAAE;IAClB,OAAOC,OAAO,CAACC,MAAM,CAAC,IAAIL,KAAK,CAAC,qBAAqB,CAAC,CAAC;EACzD;EACA,OAAOH,cAAc,CAACI,eAAe,CAACE,MAAM,CAAC;AAC/C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,eAAeA,CAACC,UAAkB,EAAiB;EACjE,OAAOV,cAAc,CAACS,eAAe,CAACC,UAAU,CAAC;AACnD;AAEA,SAAShB,OAAO,IAAIiB,gBAAgB,QAAQ,uBAAoB","ignoreList":[]}
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@azzapp/react-native-snapshot-view",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Snapshot view for react-native",
5
5
  "source": "./src/index.tsx",
6
+ "react-native": "src/index",
6
7
  "main": "./lib/commonjs/index.js",
7
8
  "module": "./lib/module/index.js",
8
9
  "exports": {
@@ -164,15 +165,13 @@
164
165
  [
165
166
  "commonjs",
166
167
  {
167
- "esm": true,
168
- "configFile": "./babel.config.js"
168
+ "esm": true
169
169
  }
170
170
  ],
171
171
  [
172
172
  "module",
173
173
  {
174
- "esm": true,
175
- "configFile": "./babel.config.module.js"
174
+ "esm": true
176
175
  }
177
176
  ],
178
177
  [
@@ -188,14 +187,9 @@
188
187
  "name": "RNSnapshotViewSpec",
189
188
  "type": "all",
190
189
  "jsSrcsDir": "src",
191
- "outputDir": {
192
- "ios": "ios/generated",
193
- "android": "android/generated"
194
- },
195
190
  "android": {
196
191
  "javaPackageName": "com.azzapp.rnsnapshotview"
197
- },
198
- "includesGeneratedCode": true
192
+ }
199
193
  },
200
194
  "create-react-native-library": {
201
195
  "type": "view-mixed",
@@ -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 RNSnapshotViewSpec_registerComponentDescriptorsFromCodegen(
18
- std::shared_ptr<const ComponentDescriptorProviderRegistry> registry) {
19
- registry->add(concreteComponentDescriptorProvider<RNSnapshotRendererComponentDescriptor>());
20
- }
21
-
22
- } // 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,25 +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
- 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
@@ -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
- extern const char RNSnapshotRendererComponentName[] = "RNSnapshotRenderer";
16
-
17
- } // 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,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
- using RNSnapshotRendererComponentDescriptor = ConcreteComponentDescriptor<RNSnapshotRendererShadowNode>;
20
-
21
- void RNSnapshotViewSpec_registerComponentDescriptorsFromCodegen(
22
- std::shared_ptr<const ComponentDescriptorProviderRegistry> registry);
23
-
24
- } // 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: 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
@@ -1,27 +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
- #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
@@ -1,20 +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
- @protocol RCTRNSnapshotRendererViewProtocol <NSObject>
17
-
18
- @end
19
-
20
- 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 "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 &params)
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
@@ -1,54 +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 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 &params);
51
- };
52
- } // namespace facebook::react
53
-
54
- #endif // RNSnapshotViewSpec_H
@@ -1,32 +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
- 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
@@ -1,29 +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
- 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
@@ -1,34 +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 "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
@@ -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 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