react-native-neuroscan 0.1.2 → 0.1.5

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 (29) hide show
  1. package/android/src/main/java/com/neuroscan/NeuroscanPackage.kt +0 -1
  2. package/package.json +1 -1
  3. package/android/app/build/generated/source/codegen/RCTAppDependencyProvider.h +0 -25
  4. package/android/app/build/generated/source/codegen/RCTAppDependencyProvider.mm +0 -35
  5. package/android/app/build/generated/source/codegen/RCTModuleProviders.h +0 -16
  6. package/android/app/build/generated/source/codegen/RCTModuleProviders.mm +0 -51
  7. package/android/app/build/generated/source/codegen/RCTModulesConformingToProtocolsProvider.h +0 -18
  8. package/android/app/build/generated/source/codegen/RCTModulesConformingToProtocolsProvider.mm +0 -54
  9. package/android/app/build/generated/source/codegen/RCTThirdPartyComponentsProvider.h +0 -16
  10. package/android/app/build/generated/source/codegen/RCTThirdPartyComponentsProvider.mm +0 -30
  11. package/android/app/build/generated/source/codegen/ReactAppDependencyProvider.podspec +0 -34
  12. package/android/app/build/generated/source/codegen/java/com/facebook/fbreact/specs/NativeNeuroscanSpec.java +0 -67
  13. package/android/app/build/generated/source/codegen/java/com/facebook/react/viewmanagers/NeuroScanCameraViewManagerDelegate.java +0 -72
  14. package/android/app/build/generated/source/codegen/java/com/facebook/react/viewmanagers/NeuroScanCameraViewManagerInterface.java +0 -29
  15. package/android/app/build/generated/source/codegen/jni/CMakeLists.txt +0 -36
  16. package/android/app/build/generated/source/codegen/jni/RNNeuroScanSpec-generated.cpp +0 -74
  17. package/android/app/build/generated/source/codegen/jni/RNNeuroScanSpec.h +0 -31
  18. package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNNeuroScanSpec/ComponentDescriptors.cpp +0 -22
  19. package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNNeuroScanSpec/ComponentDescriptors.h +0 -24
  20. package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNNeuroScanSpec/EventEmitters.cpp +0 -62
  21. package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNNeuroScanSpec/EventEmitters.h +0 -54
  22. package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNNeuroScanSpec/Props.cpp +0 -32
  23. package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNNeuroScanSpec/Props.h +0 -34
  24. package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNNeuroScanSpec/RNNeuroScanSpecJSI-generated.cpp +0 -80
  25. package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNNeuroScanSpec/RNNeuroScanSpecJSI.h +0 -134
  26. package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNNeuroScanSpec/ShadowNodes.cpp +0 -17
  27. package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNNeuroScanSpec/ShadowNodes.h +0 -32
  28. package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNNeuroScanSpec/States.cpp +0 -16
  29. package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNNeuroScanSpec/States.h +0 -29
@@ -5,7 +5,6 @@ import com.facebook.react.bridge.NativeModule
5
5
  import com.facebook.react.bridge.ReactApplicationContext
6
6
  import com.facebook.react.module.model.ReactModuleInfo
7
7
  import com.facebook.react.module.model.ReactModuleInfoProvider
8
- @Suppress("unused")
9
8
  import com.facebook.react.uimanager.ViewManager
10
9
 
11
10
  class NeuroscanPackage : BaseReactPackage() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-neuroscan",
3
- "version": "0.1.2",
3
+ "version": "0.1.5",
4
4
  "description": "React Native native document scanner with edge detection, perspective correction, and advanced image processing",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -1,25 +0,0 @@
1
- /*
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
-
9
- #import <Foundation/Foundation.h>
10
-
11
- #if __has_include(<React-RCTAppDelegate/RCTDependencyProvider.h>)
12
- #import <React-RCTAppDelegate/RCTDependencyProvider.h>
13
- #elif __has_include(<React_RCTAppDelegate/RCTDependencyProvider.h>)
14
- #import <React_RCTAppDelegate/RCTDependencyProvider.h>
15
- #else
16
- #import "RCTDependencyProvider.h"
17
- #endif
18
-
19
- NS_ASSUME_NONNULL_BEGIN
20
-
21
- @interface RCTAppDependencyProvider : NSObject <RCTDependencyProvider>
22
-
23
- @end
24
-
25
- NS_ASSUME_NONNULL_END
@@ -1,35 +0,0 @@
1
- /*
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- #import "RCTAppDependencyProvider.h"
9
- #import <ReactCodegen/RCTModulesConformingToProtocolsProvider.h>
10
- #import <ReactCodegen/RCTThirdPartyComponentsProvider.h>
11
- #import <ReactCodegen/RCTModuleProviders.h>
12
-
13
- @implementation RCTAppDependencyProvider
14
-
15
- - (nonnull NSArray<NSString *> *)URLRequestHandlerClassNames {
16
- return RCTModulesConformingToProtocolsProvider.URLRequestHandlerClassNames;
17
- }
18
-
19
- - (nonnull NSArray<NSString *> *)imageDataDecoderClassNames {
20
- return RCTModulesConformingToProtocolsProvider.imageDataDecoderClassNames;
21
- }
22
-
23
- - (nonnull NSArray<NSString *> *)imageURLLoaderClassNames {
24
- return RCTModulesConformingToProtocolsProvider.imageURLLoaderClassNames;
25
- }
26
-
27
- - (nonnull NSDictionary<NSString *,Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents {
28
- return RCTThirdPartyComponentsProvider.thirdPartyFabricComponents;
29
- }
30
-
31
- - (nonnull NSDictionary<NSString *, id<RCTModuleProvider>> *)moduleProviders {
32
- return RCTModuleProviders.moduleProviders;
33
- }
34
-
35
- @end
@@ -1,16 +0,0 @@
1
- /*
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- #import <Foundation/Foundation.h>
9
-
10
- @protocol RCTModuleProvider;
11
-
12
- @interface RCTModuleProviders: NSObject
13
-
14
- + (NSDictionary<NSString *, id<RCTModuleProvider>> *)moduleProviders;
15
-
16
- @end
@@ -1,51 +0,0 @@
1
- /*
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- #import <Foundation/Foundation.h>
9
-
10
- #import "RCTModuleProviders.h"
11
- #import <ReactCommon/RCTTurboModule.h>
12
- #import <React/RCTLog.h>
13
-
14
- @implementation RCTModuleProviders
15
-
16
- + (NSDictionary<NSString *, id<RCTModuleProvider>> *)moduleProviders
17
- {
18
- static NSDictionary<NSString *, id<RCTModuleProvider>> *providers = nil;
19
- static dispatch_once_t onceToken;
20
-
21
- dispatch_once(&onceToken, ^{
22
- NSDictionary<NSString *, NSString *> * moduleMapping = @{
23
-
24
- };
25
-
26
- NSMutableDictionary *dict = [[NSMutableDictionary alloc] initWithCapacity:moduleMapping.count];
27
-
28
- for (NSString *key in moduleMapping) {
29
- NSString * moduleProviderName = moduleMapping[key];
30
- Class klass = NSClassFromString(moduleProviderName);
31
- if (!klass) {
32
- RCTLogError(@"Module provider %@ cannot be found in the runtime", moduleProviderName);
33
- continue;
34
- }
35
-
36
- id instance = [klass new];
37
- if (![instance respondsToSelector:@selector(getTurboModule:)]) {
38
- RCTLogError(@"Module provider %@ does not conform to RCTModuleProvider", moduleProviderName);
39
- continue;
40
- }
41
-
42
- [dict setObject:instance forKey:key];
43
- }
44
-
45
- providers = dict;
46
- });
47
-
48
- return providers;
49
- }
50
-
51
- @end
@@ -1,18 +0,0 @@
1
- /*
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- #import <Foundation/Foundation.h>
9
-
10
- @interface RCTModulesConformingToProtocolsProvider: NSObject
11
-
12
- +(NSArray<NSString *> *)imageURLLoaderClassNames;
13
-
14
- +(NSArray<NSString *> *)imageDataDecoderClassNames;
15
-
16
- +(NSArray<NSString *> *)URLRequestHandlerClassNames;
17
-
18
- @end
@@ -1,54 +0,0 @@
1
- /*
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- #import "RCTModulesConformingToProtocolsProvider.h"
9
-
10
- @implementation RCTModulesConformingToProtocolsProvider
11
-
12
- +(NSArray<NSString *> *)imageURLLoaderClassNames
13
- {
14
- static NSArray<NSString *> *classNames = nil;
15
- static dispatch_once_t onceToken;
16
-
17
- dispatch_once(&onceToken, ^{
18
- classNames = @[
19
-
20
- ];
21
- });
22
-
23
- return classNames;
24
- }
25
-
26
- +(NSArray<NSString *> *)imageDataDecoderClassNames
27
- {
28
- static NSArray<NSString *> *classNames = nil;
29
- static dispatch_once_t onceToken;
30
-
31
- dispatch_once(&onceToken, ^{
32
- classNames = @[
33
-
34
- ];
35
- });
36
-
37
- return classNames;
38
- }
39
-
40
- +(NSArray<NSString *> *)URLRequestHandlerClassNames
41
- {
42
- static NSArray<NSString *> *classNames = nil;
43
- static dispatch_once_t onceToken;
44
-
45
- dispatch_once(&onceToken, ^{
46
- classNames = @[
47
-
48
- ];
49
- });
50
-
51
- return classNames;
52
- }
53
-
54
- @end
@@ -1,16 +0,0 @@
1
- /*
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- #import <Foundation/Foundation.h>
9
-
10
- @protocol RCTComponentViewProtocol;
11
-
12
- @interface RCTThirdPartyComponentsProvider: NSObject
13
-
14
- + (NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents;
15
-
16
- @end
@@ -1,30 +0,0 @@
1
- /*
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
-
9
- #import <Foundation/Foundation.h>
10
-
11
- #import "RCTThirdPartyComponentsProvider.h"
12
- #import <React/RCTComponentViewProtocol.h>
13
-
14
- @implementation RCTThirdPartyComponentsProvider
15
-
16
- + (NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents
17
- {
18
- static NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *thirdPartyComponents = nil;
19
- static dispatch_once_t nativeComponentsToken;
20
-
21
- dispatch_once(&nativeComponentsToken, ^{
22
- thirdPartyComponents = @{
23
- @"NeuroScanCameraView": NSClassFromString(@"NeuroScanCameraViewComponentView"), // react-native-neuroscan
24
- };
25
- });
26
-
27
- return thirdPartyComponents;
28
- }
29
-
30
- @end
@@ -1,34 +0,0 @@
1
- # Copyright (c) Meta Platforms, Inc. and affiliates.
2
- #
3
- # This source code is licensed under the MIT license found in the
4
- # LICENSE file in the root directory of this source tree.
5
-
6
- version = "0.79.0"
7
- source = { :git => 'https://github.com/facebook/react-native.git' }
8
- if version == '1000.0.0'
9
- # This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
10
- source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
11
- else
12
- source[:tag] = "v#{version}"
13
- end
14
-
15
- Pod::Spec.new do |s|
16
- s.name = "ReactAppDependencyProvider"
17
- s.version = version
18
- s.summary = "The third party dependency provider for the app"
19
- s.homepage = "https://reactnative.dev/"
20
- s.documentation_url = "https://reactnative.dev/"
21
- s.license = "MIT"
22
- s.author = "Meta Platforms, Inc. and its affiliates"
23
- s.platforms = min_supported_versions
24
- s.source = source
25
- s.source_files = "**/RCTAppDependencyProvider.{h,mm}"
26
-
27
- # This guard prevent to install the dependencies when we run `pod install` in the old architecture.
28
- s.pod_target_xcconfig = {
29
- "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
30
- "DEFINES_MODULE" => "YES"
31
- }
32
-
33
- s.dependency "ReactCodegen"
34
- end
@@ -1,67 +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: GenerateModuleJavaSpec.js
9
- *
10
- * @nolint
11
- */
12
-
13
- package com.facebook.fbreact.specs;
14
-
15
- import com.facebook.proguard.annotations.DoNotStrip;
16
- import com.facebook.react.bridge.Promise;
17
- import com.facebook.react.bridge.ReactApplicationContext;
18
- import com.facebook.react.bridge.ReactContextBaseJavaModule;
19
- import com.facebook.react.bridge.ReactMethod;
20
- import com.facebook.react.bridge.ReadableMap;
21
- import com.facebook.react.turbomodule.core.interfaces.TurboModule;
22
- import javax.annotation.Nonnull;
23
-
24
- public abstract class NativeNeuroscanSpec extends ReactContextBaseJavaModule implements TurboModule {
25
- public static final String NAME = "Neuroscan";
26
-
27
- public NativeNeuroscanSpec(ReactApplicationContext reactContext) {
28
- super(reactContext);
29
- }
30
-
31
- @Override
32
- public @Nonnull String getName() {
33
- return NAME;
34
- }
35
-
36
- @ReactMethod
37
- @DoNotStrip
38
- public abstract void scanDocument(ReadableMap options, Promise promise);
39
-
40
- @ReactMethod
41
- @DoNotStrip
42
- public abstract void detectEdges(String imageUri, Promise promise);
43
-
44
- @ReactMethod
45
- @DoNotStrip
46
- public abstract void cropDocument(String imageUri, ReadableMap corners, Promise promise);
47
-
48
- @ReactMethod
49
- @DoNotStrip
50
- public abstract void processImage(String imageUri, ReadableMap options, Promise promise);
51
-
52
- @ReactMethod
53
- @DoNotStrip
54
- public abstract void scanAndProcess(String imageUri, ReadableMap processOptions, Promise promise);
55
-
56
- @ReactMethod
57
- @DoNotStrip
58
- public abstract void cleanupTempFiles(Promise promise);
59
-
60
- @ReactMethod
61
- @DoNotStrip
62
- public abstract void addListener(String eventType);
63
-
64
- @ReactMethod
65
- @DoNotStrip
66
- public abstract void removeListeners(double count);
67
- }
@@ -1,72 +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: GeneratePropsJavaDelegate.js
8
- */
9
-
10
- package com.facebook.react.viewmanagers;
11
-
12
- import android.view.View;
13
- import androidx.annotation.Nullable;
14
- import com.facebook.react.bridge.ReadableArray;
15
- import com.facebook.react.uimanager.BaseViewManager;
16
- import com.facebook.react.uimanager.BaseViewManagerDelegate;
17
- import com.facebook.react.uimanager.LayoutShadowNode;
18
-
19
- public class NeuroScanCameraViewManagerDelegate<T extends View, U extends BaseViewManager<T, ? extends LayoutShadowNode> & NeuroScanCameraViewManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
20
- public NeuroScanCameraViewManagerDelegate(U viewManager) {
21
- super(viewManager);
22
- }
23
- @Override
24
- public void setProperty(T view, String propName, @Nullable Object value) {
25
- switch (propName) {
26
- case "enableAutoCapture":
27
- mViewManager.setEnableAutoCapture(view, value == null ? false : (boolean) value);
28
- break;
29
- case "showOverlay":
30
- mViewManager.setShowOverlay(view, value == null ? false : (boolean) value);
31
- break;
32
- case "overlayColor":
33
- mViewManager.setOverlayColor(view, value == null ? null : (String) value);
34
- break;
35
- case "overlayStrokeWidth":
36
- mViewManager.setOverlayStrokeWidth(view, value == null ? 0f : ((Double) value).floatValue());
37
- break;
38
- case "autoCaptureDelay":
39
- mViewManager.setAutoCaptureDelay(view, value == null ? 0 : ((Double) value).intValue());
40
- break;
41
- case "cameraPosition":
42
- mViewManager.setCameraPosition(view, value == null ? null : (String) value);
43
- break;
44
- case "flashMode":
45
- mViewManager.setFlashMode(view, value == null ? null : (String) value);
46
- break;
47
- case "resolution":
48
- mViewManager.setResolution(view, value == null ? null : (String) value);
49
- break;
50
- default:
51
- super.setProperty(view, propName, value);
52
- }
53
- }
54
-
55
- @Override
56
- public void receiveCommand(T view, String commandName, @Nullable ReadableArray args) {
57
- switch (commandName) {
58
- case "capturePhoto":
59
- mViewManager.capturePhoto(view);
60
- break;
61
- case "startDetection":
62
- mViewManager.startDetection(view);
63
- break;
64
- case "stopDetection":
65
- mViewManager.stopDetection(view);
66
- break;
67
- case "setFlashMode":
68
- mViewManager.setFlashMode(view, args.getString(0));
69
- break;
70
- }
71
- }
72
- }
@@ -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: GeneratePropsJavaInterface.js
8
- */
9
-
10
- package com.facebook.react.viewmanagers;
11
-
12
- import android.view.View;
13
- import androidx.annotation.Nullable;
14
- import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
15
-
16
- public interface NeuroScanCameraViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
17
- void setEnableAutoCapture(T view, boolean value);
18
- void setShowOverlay(T view, boolean value);
19
- void setOverlayColor(T view, @Nullable String value);
20
- void setOverlayStrokeWidth(T view, float value);
21
- void setAutoCaptureDelay(T view, int value);
22
- void setCameraPosition(T view, @Nullable String value);
23
- void setFlashMode(T view, @Nullable String value);
24
- void setResolution(T view, @Nullable String value);
25
- void capturePhoto(T view);
26
- void startDetection(T view);
27
- void stopDetection(T view);
28
- void setFlashMode(T view, String mode);
29
- }
@@ -1,36 +0,0 @@
1
- # Copyright (c) Meta Platforms, Inc. and affiliates.
2
- #
3
- # This source code is licensed under the MIT license found in the
4
- # LICENSE file in the root directory of this source tree.
5
-
6
- cmake_minimum_required(VERSION 3.13)
7
- set(CMAKE_VERBOSE_MAKEFILE on)
8
-
9
- file(GLOB react_codegen_SRCS CONFIGURE_DEPENDS *.cpp react/renderer/components/RNNeuroScanSpec/*.cpp)
10
-
11
- add_library(
12
- react_codegen_RNNeuroScanSpec
13
- OBJECT
14
- ${react_codegen_SRCS}
15
- )
16
-
17
- target_include_directories(react_codegen_RNNeuroScanSpec PUBLIC . react/renderer/components/RNNeuroScanSpec)
18
-
19
- target_link_libraries(
20
- react_codegen_RNNeuroScanSpec
21
- fbjni
22
- jsi
23
- # We need to link different libraries based on whether we are building rncore or not, that's necessary
24
- # because we want to break a circular dependency between react_codegen_rncore and reactnative
25
- reactnative
26
- )
27
-
28
- target_compile_options(
29
- react_codegen_RNNeuroScanSpec
30
- PRIVATE
31
- -DLOG_TAG=\"ReactNative\"
32
- -fexceptions
33
- -frtti
34
- -std=c++20
35
- -Wall
36
- )
@@ -1,74 +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: GenerateModuleJniCpp.js
9
- */
10
-
11
- #include "RNNeuroScanSpec.h"
12
-
13
- namespace facebook::react {
14
-
15
- static facebook::jsi::Value __hostFunction_NativeNeuroscanSpecJSI_scanDocument(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
16
- static jmethodID cachedMethodId = nullptr;
17
- return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "scanDocument", "(Lcom/facebook/react/bridge/ReadableMap;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
18
- }
19
-
20
- static facebook::jsi::Value __hostFunction_NativeNeuroscanSpecJSI_detectEdges(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
21
- static jmethodID cachedMethodId = nullptr;
22
- return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "detectEdges", "(Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
23
- }
24
-
25
- static facebook::jsi::Value __hostFunction_NativeNeuroscanSpecJSI_cropDocument(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
26
- static jmethodID cachedMethodId = nullptr;
27
- return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "cropDocument", "(Ljava/lang/String;Lcom/facebook/react/bridge/ReadableMap;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
28
- }
29
-
30
- static facebook::jsi::Value __hostFunction_NativeNeuroscanSpecJSI_processImage(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
31
- static jmethodID cachedMethodId = nullptr;
32
- return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "processImage", "(Ljava/lang/String;Lcom/facebook/react/bridge/ReadableMap;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
33
- }
34
-
35
- static facebook::jsi::Value __hostFunction_NativeNeuroscanSpecJSI_scanAndProcess(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
36
- static jmethodID cachedMethodId = nullptr;
37
- return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "scanAndProcess", "(Ljava/lang/String;Lcom/facebook/react/bridge/ReadableMap;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
38
- }
39
-
40
- static facebook::jsi::Value __hostFunction_NativeNeuroscanSpecJSI_cleanupTempFiles(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
41
- static jmethodID cachedMethodId = nullptr;
42
- return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "cleanupTempFiles", "(Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
43
- }
44
-
45
- static facebook::jsi::Value __hostFunction_NativeNeuroscanSpecJSI_addListener(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
46
- static jmethodID cachedMethodId = nullptr;
47
- return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "addListener", "(Ljava/lang/String;)V", args, count, cachedMethodId);
48
- }
49
-
50
- static facebook::jsi::Value __hostFunction_NativeNeuroscanSpecJSI_removeListeners(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
51
- static jmethodID cachedMethodId = nullptr;
52
- return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "removeListeners", "(D)V", args, count, cachedMethodId);
53
- }
54
-
55
- NativeNeuroscanSpecJSI::NativeNeuroscanSpecJSI(const JavaTurboModule::InitParams &params)
56
- : JavaTurboModule(params) {
57
- methodMap_["scanDocument"] = MethodMetadata {1, __hostFunction_NativeNeuroscanSpecJSI_scanDocument};
58
- methodMap_["detectEdges"] = MethodMetadata {1, __hostFunction_NativeNeuroscanSpecJSI_detectEdges};
59
- methodMap_["cropDocument"] = MethodMetadata {2, __hostFunction_NativeNeuroscanSpecJSI_cropDocument};
60
- methodMap_["processImage"] = MethodMetadata {2, __hostFunction_NativeNeuroscanSpecJSI_processImage};
61
- methodMap_["scanAndProcess"] = MethodMetadata {2, __hostFunction_NativeNeuroscanSpecJSI_scanAndProcess};
62
- methodMap_["cleanupTempFiles"] = MethodMetadata {0, __hostFunction_NativeNeuroscanSpecJSI_cleanupTempFiles};
63
- methodMap_["addListener"] = MethodMetadata {1, __hostFunction_NativeNeuroscanSpecJSI_addListener};
64
- methodMap_["removeListeners"] = MethodMetadata {1, __hostFunction_NativeNeuroscanSpecJSI_removeListeners};
65
- }
66
-
67
- std::shared_ptr<TurboModule> RNNeuroScanSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams &params) {
68
- if (moduleName == "Neuroscan") {
69
- return std::make_shared<NativeNeuroscanSpecJSI>(params);
70
- }
71
- return nullptr;
72
- }
73
-
74
- } // namespace facebook::react
@@ -1,31 +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: GenerateModuleJniH.js
9
- */
10
-
11
- #pragma once
12
-
13
- #include <ReactCommon/JavaTurboModule.h>
14
- #include <ReactCommon/TurboModule.h>
15
- #include <jsi/jsi.h>
16
-
17
- namespace facebook::react {
18
-
19
- /**
20
- * JNI C++ class for module 'NativeNeuroscan'
21
- */
22
- class JSI_EXPORT NativeNeuroscanSpecJSI : public JavaTurboModule {
23
- public:
24
- NativeNeuroscanSpecJSI(const JavaTurboModule::InitParams &params);
25
- };
26
-
27
-
28
- JSI_EXPORT
29
- std::shared_ptr<TurboModule> RNNeuroScanSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams &params);
30
-
31
- } // namespace facebook::react
@@ -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 <react/renderer/components/RNNeuroScanSpec/ComponentDescriptors.h>
12
- #include <react/renderer/core/ConcreteComponentDescriptor.h>
13
- #include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
14
-
15
- namespace facebook::react {
16
-
17
- void RNNeuroScanSpec_registerComponentDescriptorsFromCodegen(
18
- std::shared_ptr<const ComponentDescriptorProviderRegistry> registry) {
19
- registry->add(concreteComponentDescriptorProvider<NeuroScanCameraViewComponentDescriptor>());
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 <react/renderer/components/RNNeuroScanSpec/ShadowNodes.h>
14
- #include <react/renderer/core/ConcreteComponentDescriptor.h>
15
- #include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
16
-
17
- namespace facebook::react {
18
-
19
- using NeuroScanCameraViewComponentDescriptor = ConcreteComponentDescriptor<NeuroScanCameraViewShadowNode>;
20
-
21
- void RNNeuroScanSpec_registerComponentDescriptorsFromCodegen(
22
- std::shared_ptr<const ComponentDescriptorProviderRegistry> registry);
23
-
24
- } // namespace facebook::react
@@ -1,62 +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 <react/renderer/components/RNNeuroScanSpec/EventEmitters.h>
12
-
13
-
14
- namespace facebook::react {
15
-
16
- void NeuroScanCameraViewEventEmitter::onDocumentDetected(OnDocumentDetected $event) const {
17
- dispatchEvent("documentDetected", [$event=std::move($event)](jsi::Runtime &runtime) {
18
- auto $payload = jsi::Object(runtime);
19
- $payload.setProperty(runtime, "topLeftX", $event.topLeftX);
20
- $payload.setProperty(runtime, "topLeftY", $event.topLeftY);
21
- $payload.setProperty(runtime, "topRightX", $event.topRightX);
22
- $payload.setProperty(runtime, "topRightY", $event.topRightY);
23
- $payload.setProperty(runtime, "bottomLeftX", $event.bottomLeftX);
24
- $payload.setProperty(runtime, "bottomLeftY", $event.bottomLeftY);
25
- $payload.setProperty(runtime, "bottomRightX", $event.bottomRightX);
26
- $payload.setProperty(runtime, "bottomRightY", $event.bottomRightY);
27
- $payload.setProperty(runtime, "confidence", $event.confidence);
28
- return $payload;
29
- });
30
- }
31
-
32
-
33
- void NeuroScanCameraViewEventEmitter::onPhotoCaptured(OnPhotoCaptured $event) const {
34
- dispatchEvent("photoCaptured", [$event=std::move($event)](jsi::Runtime &runtime) {
35
- auto $payload = jsi::Object(runtime);
36
- $payload.setProperty(runtime, "imageUrl", $event.imageUrl);
37
- $payload.setProperty(runtime, "width", $event.width);
38
- $payload.setProperty(runtime, "height", $event.height);
39
- return $payload;
40
- });
41
- }
42
-
43
-
44
- void NeuroScanCameraViewEventEmitter::onError(OnError $event) const {
45
- dispatchEvent("error", [$event=std::move($event)](jsi::Runtime &runtime) {
46
- auto $payload = jsi::Object(runtime);
47
- $payload.setProperty(runtime, "code", $event.code);
48
- $payload.setProperty(runtime, "message", $event.message);
49
- return $payload;
50
- });
51
- }
52
-
53
-
54
- void NeuroScanCameraViewEventEmitter::onCameraReady(OnCameraReady $event) const {
55
- dispatchEvent("cameraReady", [](jsi::Runtime &runtime) {
56
- auto $payload = jsi::Object(runtime);
57
-
58
- return $payload;
59
- });
60
- }
61
-
62
- } // namespace facebook::react
@@ -1,54 +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 NeuroScanCameraViewEventEmitter : public ViewEventEmitter {
17
- public:
18
- using ViewEventEmitter::ViewEventEmitter;
19
-
20
- struct OnDocumentDetected {
21
- Float topLeftX;
22
- Float topLeftY;
23
- Float topRightX;
24
- Float topRightY;
25
- Float bottomLeftX;
26
- Float bottomLeftY;
27
- Float bottomRightX;
28
- Float bottomRightY;
29
- Float confidence;
30
- };
31
-
32
- struct OnPhotoCaptured {
33
- std::string imageUrl;
34
- int width;
35
- int height;
36
- };
37
-
38
- struct OnError {
39
- std::string code;
40
- std::string message;
41
- };
42
-
43
- struct OnCameraReady {
44
-
45
- };
46
- void onDocumentDetected(OnDocumentDetected value) const;
47
-
48
- void onPhotoCaptured(OnPhotoCaptured value) const;
49
-
50
- void onError(OnError value) const;
51
-
52
- void onCameraReady(OnCameraReady value) const;
53
- };
54
- } // namespace facebook::react
@@ -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: GeneratePropsCpp.js
9
- */
10
-
11
- #include <react/renderer/components/RNNeuroScanSpec/Props.h>
12
- #include <react/renderer/core/PropsParserContext.h>
13
- #include <react/renderer/core/propsConversions.h>
14
-
15
- namespace facebook::react {
16
-
17
- NeuroScanCameraViewProps::NeuroScanCameraViewProps(
18
- const PropsParserContext &context,
19
- const NeuroScanCameraViewProps &sourceProps,
20
- const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
21
-
22
- enableAutoCapture(convertRawProp(context, rawProps, "enableAutoCapture", sourceProps.enableAutoCapture, {false})),
23
- showOverlay(convertRawProp(context, rawProps, "showOverlay", sourceProps.showOverlay, {false})),
24
- overlayColor(convertRawProp(context, rawProps, "overlayColor", sourceProps.overlayColor, {})),
25
- overlayStrokeWidth(convertRawProp(context, rawProps, "overlayStrokeWidth", sourceProps.overlayStrokeWidth, {0.0})),
26
- autoCaptureDelay(convertRawProp(context, rawProps, "autoCaptureDelay", sourceProps.autoCaptureDelay, {0})),
27
- cameraPosition(convertRawProp(context, rawProps, "cameraPosition", sourceProps.cameraPosition, {})),
28
- flashMode(convertRawProp(context, rawProps, "flashMode", sourceProps.flashMode, {})),
29
- resolution(convertRawProp(context, rawProps, "resolution", sourceProps.resolution, {}))
30
- {}
31
-
32
- } // namespace facebook::react
@@ -1,34 +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 NeuroScanCameraViewProps final : public ViewProps {
18
- public:
19
- NeuroScanCameraViewProps() = default;
20
- NeuroScanCameraViewProps(const PropsParserContext& context, const NeuroScanCameraViewProps &sourceProps, const RawProps &rawProps);
21
-
22
- #pragma mark - Props
23
-
24
- bool enableAutoCapture{false};
25
- bool showOverlay{false};
26
- std::string overlayColor{};
27
- Float overlayStrokeWidth{0.0};
28
- int autoCaptureDelay{0};
29
- std::string cameraPosition{};
30
- std::string flashMode{};
31
- std::string resolution{};
32
- };
33
-
34
- } // namespace facebook::react
@@ -1,80 +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 "RNNeuroScanSpecJSI.h"
11
-
12
- namespace facebook::react {
13
-
14
- static jsi::Value __hostFunction_NativeNeuroscanCxxSpecJSI_scanDocument(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
15
- return static_cast<NativeNeuroscanCxxSpecJSI *>(&turboModule)->scanDocument(
16
- rt,
17
- count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asObject(rt)
18
- );
19
- }
20
- static jsi::Value __hostFunction_NativeNeuroscanCxxSpecJSI_detectEdges(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
21
- return static_cast<NativeNeuroscanCxxSpecJSI *>(&turboModule)->detectEdges(
22
- rt,
23
- count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
24
- );
25
- }
26
- static jsi::Value __hostFunction_NativeNeuroscanCxxSpecJSI_cropDocument(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
27
- return static_cast<NativeNeuroscanCxxSpecJSI *>(&turboModule)->cropDocument(
28
- rt,
29
- count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
30
- count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt)
31
- );
32
- }
33
- static jsi::Value __hostFunction_NativeNeuroscanCxxSpecJSI_processImage(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
34
- return static_cast<NativeNeuroscanCxxSpecJSI *>(&turboModule)->processImage(
35
- rt,
36
- count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
37
- count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt)
38
- );
39
- }
40
- static jsi::Value __hostFunction_NativeNeuroscanCxxSpecJSI_scanAndProcess(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
41
- return static_cast<NativeNeuroscanCxxSpecJSI *>(&turboModule)->scanAndProcess(
42
- rt,
43
- count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
44
- count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt)
45
- );
46
- }
47
- static jsi::Value __hostFunction_NativeNeuroscanCxxSpecJSI_cleanupTempFiles(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
48
- return static_cast<NativeNeuroscanCxxSpecJSI *>(&turboModule)->cleanupTempFiles(
49
- rt
50
- );
51
- }
52
- static jsi::Value __hostFunction_NativeNeuroscanCxxSpecJSI_addListener(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
53
- static_cast<NativeNeuroscanCxxSpecJSI *>(&turboModule)->addListener(
54
- rt,
55
- count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
56
- );
57
- return jsi::Value::undefined();
58
- }
59
- static jsi::Value __hostFunction_NativeNeuroscanCxxSpecJSI_removeListeners(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
60
- static_cast<NativeNeuroscanCxxSpecJSI *>(&turboModule)->removeListeners(
61
- rt,
62
- count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber()
63
- );
64
- return jsi::Value::undefined();
65
- }
66
-
67
- NativeNeuroscanCxxSpecJSI::NativeNeuroscanCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
68
- : TurboModule("Neuroscan", jsInvoker) {
69
- methodMap_["scanDocument"] = MethodMetadata {1, __hostFunction_NativeNeuroscanCxxSpecJSI_scanDocument};
70
- methodMap_["detectEdges"] = MethodMetadata {1, __hostFunction_NativeNeuroscanCxxSpecJSI_detectEdges};
71
- methodMap_["cropDocument"] = MethodMetadata {2, __hostFunction_NativeNeuroscanCxxSpecJSI_cropDocument};
72
- methodMap_["processImage"] = MethodMetadata {2, __hostFunction_NativeNeuroscanCxxSpecJSI_processImage};
73
- methodMap_["scanAndProcess"] = MethodMetadata {2, __hostFunction_NativeNeuroscanCxxSpecJSI_scanAndProcess};
74
- methodMap_["cleanupTempFiles"] = MethodMetadata {0, __hostFunction_NativeNeuroscanCxxSpecJSI_cleanupTempFiles};
75
- methodMap_["addListener"] = MethodMetadata {1, __hostFunction_NativeNeuroscanCxxSpecJSI_addListener};
76
- methodMap_["removeListeners"] = MethodMetadata {1, __hostFunction_NativeNeuroscanCxxSpecJSI_removeListeners};
77
- }
78
-
79
-
80
- } // namespace facebook::react
@@ -1,134 +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 NativeNeuroscanCxxSpecJSI : public TurboModule {
19
- protected:
20
- NativeNeuroscanCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
21
-
22
- public:
23
- virtual jsi::Value scanDocument(jsi::Runtime &rt, jsi::Object options) = 0;
24
- virtual jsi::Value detectEdges(jsi::Runtime &rt, jsi::String imageUri) = 0;
25
- virtual jsi::Value cropDocument(jsi::Runtime &rt, jsi::String imageUri, jsi::Object corners) = 0;
26
- virtual jsi::Value processImage(jsi::Runtime &rt, jsi::String imageUri, jsi::Object options) = 0;
27
- virtual jsi::Value scanAndProcess(jsi::Runtime &rt, jsi::String imageUri, jsi::Object processOptions) = 0;
28
- virtual jsi::Value cleanupTempFiles(jsi::Runtime &rt) = 0;
29
- virtual void addListener(jsi::Runtime &rt, jsi::String eventType) = 0;
30
- virtual void removeListeners(jsi::Runtime &rt, double count) = 0;
31
-
32
- };
33
-
34
- template <typename T>
35
- class JSI_EXPORT NativeNeuroscanCxxSpec : public TurboModule {
36
- public:
37
- jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
38
- return delegate_.create(rt, propName);
39
- }
40
-
41
- std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime& runtime) override {
42
- return delegate_.getPropertyNames(runtime);
43
- }
44
-
45
- static constexpr std::string_view kModuleName = "Neuroscan";
46
-
47
- protected:
48
- NativeNeuroscanCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
49
- : TurboModule(std::string{NativeNeuroscanCxxSpec::kModuleName}, jsInvoker),
50
- delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
51
-
52
-
53
- private:
54
- class Delegate : public NativeNeuroscanCxxSpecJSI {
55
- public:
56
- Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
57
- NativeNeuroscanCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
58
-
59
- }
60
-
61
- jsi::Value scanDocument(jsi::Runtime &rt, jsi::Object options) override {
62
- static_assert(
63
- bridging::getParameterCount(&T::scanDocument) == 2,
64
- "Expected scanDocument(...) to have 2 parameters");
65
-
66
- return bridging::callFromJs<jsi::Value>(
67
- rt, &T::scanDocument, jsInvoker_, instance_, std::move(options));
68
- }
69
- jsi::Value detectEdges(jsi::Runtime &rt, jsi::String imageUri) override {
70
- static_assert(
71
- bridging::getParameterCount(&T::detectEdges) == 2,
72
- "Expected detectEdges(...) to have 2 parameters");
73
-
74
- return bridging::callFromJs<jsi::Value>(
75
- rt, &T::detectEdges, jsInvoker_, instance_, std::move(imageUri));
76
- }
77
- jsi::Value cropDocument(jsi::Runtime &rt, jsi::String imageUri, jsi::Object corners) override {
78
- static_assert(
79
- bridging::getParameterCount(&T::cropDocument) == 3,
80
- "Expected cropDocument(...) to have 3 parameters");
81
-
82
- return bridging::callFromJs<jsi::Value>(
83
- rt, &T::cropDocument, jsInvoker_, instance_, std::move(imageUri), std::move(corners));
84
- }
85
- jsi::Value processImage(jsi::Runtime &rt, jsi::String imageUri, jsi::Object options) override {
86
- static_assert(
87
- bridging::getParameterCount(&T::processImage) == 3,
88
- "Expected processImage(...) to have 3 parameters");
89
-
90
- return bridging::callFromJs<jsi::Value>(
91
- rt, &T::processImage, jsInvoker_, instance_, std::move(imageUri), std::move(options));
92
- }
93
- jsi::Value scanAndProcess(jsi::Runtime &rt, jsi::String imageUri, jsi::Object processOptions) override {
94
- static_assert(
95
- bridging::getParameterCount(&T::scanAndProcess) == 3,
96
- "Expected scanAndProcess(...) to have 3 parameters");
97
-
98
- return bridging::callFromJs<jsi::Value>(
99
- rt, &T::scanAndProcess, jsInvoker_, instance_, std::move(imageUri), std::move(processOptions));
100
- }
101
- jsi::Value cleanupTempFiles(jsi::Runtime &rt) override {
102
- static_assert(
103
- bridging::getParameterCount(&T::cleanupTempFiles) == 1,
104
- "Expected cleanupTempFiles(...) to have 1 parameters");
105
-
106
- return bridging::callFromJs<jsi::Value>(
107
- rt, &T::cleanupTempFiles, jsInvoker_, instance_);
108
- }
109
- void addListener(jsi::Runtime &rt, jsi::String eventType) override {
110
- static_assert(
111
- bridging::getParameterCount(&T::addListener) == 2,
112
- "Expected addListener(...) to have 2 parameters");
113
-
114
- return bridging::callFromJs<void>(
115
- rt, &T::addListener, jsInvoker_, instance_, std::move(eventType));
116
- }
117
- void removeListeners(jsi::Runtime &rt, double count) override {
118
- static_assert(
119
- bridging::getParameterCount(&T::removeListeners) == 2,
120
- "Expected removeListeners(...) to have 2 parameters");
121
-
122
- return bridging::callFromJs<void>(
123
- rt, &T::removeListeners, jsInvoker_, instance_, std::move(count));
124
- }
125
-
126
- private:
127
- friend class NativeNeuroscanCxxSpec;
128
- T *instance_;
129
- };
130
-
131
- Delegate delegate_;
132
- };
133
-
134
- } // 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 <react/renderer/components/RNNeuroScanSpec/ShadowNodes.h>
12
-
13
- namespace facebook::react {
14
-
15
- extern const char NeuroScanCameraViewComponentName[] = "NeuroScanCameraView";
16
-
17
- } // namespace facebook::react
@@ -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 <react/renderer/components/RNNeuroScanSpec/EventEmitters.h>
14
- #include <react/renderer/components/RNNeuroScanSpec/Props.h>
15
- #include <react/renderer/components/RNNeuroScanSpec/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 NeuroScanCameraViewComponentName[];
22
-
23
- /*
24
- * `ShadowNode` for <NeuroScanCameraView> component.
25
- */
26
- using NeuroScanCameraViewShadowNode = ConcreteViewShadowNode<
27
- NeuroScanCameraViewComponentName,
28
- NeuroScanCameraViewProps,
29
- NeuroScanCameraViewEventEmitter,
30
- NeuroScanCameraViewState>;
31
-
32
- } // 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 <react/renderer/components/RNNeuroScanSpec/States.h>
11
-
12
- namespace facebook::react {
13
-
14
-
15
-
16
- } // 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 NeuroScanCameraViewState {
18
- public:
19
- NeuroScanCameraViewState() = default;
20
-
21
- #ifdef ANDROID
22
- NeuroScanCameraViewState(NeuroScanCameraViewState const &previousState, folly::dynamic data){};
23
- folly::dynamic getDynamic() const {
24
- return {};
25
- };
26
- #endif
27
- };
28
-
29
- } // namespace facebook::react