solution-plugin 1.3.1 → 1.4.0-alpha.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/android/build.gradle +45 -81
- package/android/src/main/java/com/solutionplugin/SolutionPluginModule.kt +17 -8
- package/ios/SolutionPlugin.m +1 -1
- package/ios/SolutionPlugin.swift +13 -13
- package/lib/commonjs/NativeSolutionPlugin.js +15 -0
- package/lib/commonjs/NativeSolutionPlugin.js.map +1 -0
- package/lib/commonjs/index.js +60 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/module/NativeSolutionPlugin.ts +10 -7
- package/lib/module/index.js +12 -22
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/NativeSolutionPlugin.d.ts +23 -0
- package/lib/typescript/NativeSolutionPlugin.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +9 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/package.json +8 -11
- package/solution-plugin.podspec +19 -0
- package/src/NativeSolutionPlugin.ts +10 -7
- package/src/index.tsx +13 -39
- package/LICENSE +0 -20
- package/README.md +0 -52
- package/SolutionPlugin.podspec +0 -27
- package/lib/typescript/src/NativeSolutionPlugin.d.ts +0 -16
- package/lib/typescript/src/NativeSolutionPlugin.d.ts.map +0 -1
- package/lib/typescript/src/index.d.ts +0 -14
- package/lib/typescript/src/index.d.ts.map +0 -1
package/android/build.gradle
CHANGED
|
@@ -1,103 +1,67 @@
|
|
|
1
1
|
buildscript {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
ext {
|
|
3
|
+
kotlin_version = "1.8.0"
|
|
4
|
+
}
|
|
5
|
+
repositories {
|
|
6
|
+
google()
|
|
7
|
+
mavenCentral()
|
|
8
|
+
}
|
|
9
|
+
dependencies {
|
|
10
|
+
classpath "com.android.tools.build:gradle:7.3.1"
|
|
11
|
+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
12
12
|
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
rootProject.allprojects {
|
|
16
|
-
repositories {
|
|
17
|
-
google()
|
|
18
|
-
jcenter()
|
|
19
|
-
repositories {
|
|
20
|
-
maven {
|
|
21
|
-
url 'https://public-n3.advai.net/repository/maven-releases/'
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
dependencies {
|
|
28
|
-
classpath "com.android.tools.build:gradle:8.7.2"
|
|
29
|
-
// noinspection DifferentKotlinGradleVersion
|
|
30
|
-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${getExtOrDefault('kotlinVersion')}"
|
|
31
|
-
}
|
|
32
13
|
}
|
|
33
14
|
|
|
15
|
+
apply plugin: 'com.android.library'
|
|
16
|
+
apply plugin: 'kotlin-android'
|
|
17
|
+
apply plugin: 'com.facebook.react'
|
|
34
18
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
apply plugin: "com.facebook.react"
|
|
39
|
-
|
|
40
|
-
def getExtOrIntegerDefault(name) {
|
|
41
|
-
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["SolutionPlugin_" + name]).toInteger()
|
|
19
|
+
def safeExtGet(prop, fallback) {
|
|
20
|
+
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
42
21
|
}
|
|
43
22
|
|
|
44
23
|
android {
|
|
45
|
-
|
|
24
|
+
compileSdkVersion safeExtGet('compileSdkVersion', 33)
|
|
25
|
+
namespace "com.solutionplugin"
|
|
46
26
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
buildFeatures {
|
|
55
|
-
buildConfig true
|
|
56
|
-
}
|
|
27
|
+
defaultConfig {
|
|
28
|
+
minSdkVersion 21
|
|
29
|
+
targetSdkVersion safeExtGet('targetSdkVersion', 33)
|
|
30
|
+
}
|
|
57
31
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
32
|
+
buildTypes {
|
|
33
|
+
release {
|
|
34
|
+
minifyEnabled false
|
|
35
|
+
}
|
|
61
36
|
}
|
|
62
|
-
}
|
|
63
37
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
38
|
+
lintOptions {
|
|
39
|
+
disable 'GradleCompatible'
|
|
40
|
+
}
|
|
67
41
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
42
|
+
compileOptions {
|
|
43
|
+
sourceCompatibility JavaVersion.VERSION_17
|
|
44
|
+
targetCompatibility JavaVersion.VERSION_17
|
|
45
|
+
}
|
|
72
46
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
java.srcDirs += [
|
|
76
|
-
"generated/java",
|
|
77
|
-
"generated/jni"
|
|
78
|
-
]
|
|
47
|
+
kotlinOptions {
|
|
48
|
+
jvmTarget = '17'
|
|
79
49
|
}
|
|
80
|
-
}
|
|
81
50
|
}
|
|
82
51
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
url 'https://public-n3.advai.net/repository/maven-releases/'
|
|
88
|
-
}
|
|
52
|
+
react {
|
|
53
|
+
jsRootDir = file("../src/")
|
|
54
|
+
libraryName = "SolutionPlugin"
|
|
55
|
+
codegenJavaPackageName = "com.solutionplugin"
|
|
89
56
|
}
|
|
90
57
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
implementation "com.facebook.react:react-android"
|
|
95
|
-
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
96
|
-
implementation "ai.advance.mobile-sdk.android:solution-lib:1.3.0"
|
|
58
|
+
repositories {
|
|
59
|
+
mavenCentral()
|
|
60
|
+
google()
|
|
97
61
|
}
|
|
98
62
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
63
|
+
dependencies {
|
|
64
|
+
implementation 'com.facebook.react:react-native:+'
|
|
65
|
+
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
66
|
+
implementation "ai.advance.mobile-sdk.android:solution-lib:1.4.0"
|
|
103
67
|
}
|
|
@@ -36,34 +36,43 @@ class SolutionPluginModule(private val reactContext: ReactApplicationContext) :
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
@ReactMethod
|
|
39
|
-
override fun setDarkThemeType(type: String?, promise: Promise
|
|
39
|
+
override fun setDarkThemeType(type: String?, promise: Promise) {
|
|
40
40
|
try {
|
|
41
41
|
val themeType = ThemeType.valueOf(type ?: ThemeType.LIGHT.name)
|
|
42
42
|
GuardianSolutionSDK.setThemeType(themeType)
|
|
43
43
|
} catch (e: Exception) {
|
|
44
|
-
promise
|
|
44
|
+
promise.reject("SET_DARK_THEME_TYPE_ERROR", e.message, e)
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
@ReactMethod
|
|
49
|
+
override fun getSDKVersion(promise: Promise) {
|
|
49
50
|
Log.d("SolutionPluginModule", "getVersion")
|
|
50
51
|
try {
|
|
51
52
|
val version = GuardianSolutionSDK.getSDKVersion()
|
|
52
|
-
promise
|
|
53
|
+
promise.resolve(version)
|
|
53
54
|
} catch (e: Exception) {
|
|
54
|
-
promise
|
|
55
|
+
promise.reject("GET_VERSION_ERROR", e.message, e)
|
|
55
56
|
}
|
|
56
57
|
}
|
|
57
58
|
|
|
58
|
-
|
|
59
|
+
@ReactMethod
|
|
60
|
+
override fun start(url: String?, promise: Promise) {
|
|
59
61
|
GuardianSolutionSDK.init(application)
|
|
60
62
|
GuardianSolutionSDK.setPluginPlatform(PluginPlatform.ReactNative)
|
|
61
|
-
GuardianSolutionSDK.start(
|
|
62
|
-
promise
|
|
63
|
+
GuardianSolutionSDK.start(getCurrentActivity(), url) { result ->
|
|
64
|
+
promise.resolve(
|
|
63
65
|
Arguments.createMap().apply {
|
|
64
66
|
putString("code", result.code)
|
|
65
67
|
putString("signatureId", result.signatureId)
|
|
66
68
|
putString("finishRedirectUrl", result.finishRedirectUrl)
|
|
69
|
+
if (result.extraInfo != null) {
|
|
70
|
+
val extraInfoMap = Arguments.createMap()
|
|
71
|
+
for ((key, value) in result.extraInfo) {
|
|
72
|
+
extraInfoMap.putString(key, value as? String ?: "")
|
|
73
|
+
}
|
|
74
|
+
putMap("extraInfo", extraInfoMap)
|
|
75
|
+
}
|
|
67
76
|
})
|
|
68
77
|
}
|
|
69
78
|
}
|
package/ios/SolutionPlugin.m
CHANGED
|
@@ -15,7 +15,7 @@ RCT_EXTERN_METHOD(start:(nonnull NSString *)url
|
|
|
15
15
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
16
16
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
17
17
|
|
|
18
|
-
RCT_EXTERN_METHOD(
|
|
18
|
+
RCT_EXTERN_METHOD(getVersion:(RCTPromiseResolveBlock)resolve
|
|
19
19
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
20
20
|
|
|
21
21
|
@end
|
package/ios/SolutionPlugin.swift
CHANGED
|
@@ -29,25 +29,25 @@ class SolutionPlugin: NSObject {
|
|
|
29
29
|
@objc
|
|
30
30
|
func start(_ url: String, resolver: @escaping RCTPromiseResolveBlock, rejecter: @escaping RCTPromiseRejectBlock) {
|
|
31
31
|
DispatchQueue.main.async {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
32
|
+
SolutionCenter.shared.register(listener: .init(end: { result in
|
|
33
|
+
var resultDict: [String: Any] = [
|
|
34
|
+
"code": result.code
|
|
35
|
+
]
|
|
36
|
+
resultDict["signatureId"] = result.signatureId
|
|
37
|
+
resultDict["finishRedirectUrl"] = result.finishRedirectUrl
|
|
38
|
+
// Use compactMapValues to remove nil values
|
|
39
|
+
resultDict["extraInfo"] = result.extraInfo
|
|
40
|
+
resolver(resultDict)
|
|
41
|
+
}))
|
|
42
|
+
SolutionCenter.shared.pluginPlatform = "react-native"
|
|
43
|
+
SolutionCenter.shared.start(with: url)
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
// MARK: - Legacy Methods
|
|
48
48
|
|
|
49
49
|
@objc
|
|
50
|
-
func
|
|
50
|
+
func getVersion(_ resolver: @escaping RCTPromiseResolveBlock, rejecter: @escaping RCTPromiseRejectBlock) {
|
|
51
51
|
|
|
52
52
|
resolver(SolutionCenter.shared.sdkVersion)
|
|
53
53
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.ThemeType = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
let ThemeType = exports.ThemeType = /*#__PURE__*/function (ThemeType) {
|
|
9
|
+
ThemeType["LIGHT"] = "LIGHT";
|
|
10
|
+
ThemeType["DARK"] = "DARK";
|
|
11
|
+
ThemeType["FOLLOW_SYSTEM"] = "FOLLOW_SYSTEM";
|
|
12
|
+
return ThemeType;
|
|
13
|
+
}({});
|
|
14
|
+
var _default = exports.default = _reactNative.TurboModuleRegistry.get('SolutionPlugin');
|
|
15
|
+
//# sourceMappingURL=NativeSolutionPlugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","ThemeType","exports","_default","default","TurboModuleRegistry","get"],"sourceRoot":"../../src","sources":["NativeSolutionPlugin.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAAmD,IAEvCC,SAAS,GAAAC,OAAA,CAAAD,SAAA,0BAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAAA,OAATA,SAAS;AAAA;AAAA,IAAAE,QAAA,GAAAD,OAAA,CAAAE,OAAA,GAmBNC,gCAAmB,CAACC,GAAG,CAAO,gBAAgB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _exportNames = {
|
|
7
|
+
setThemeARGBColor: true,
|
|
8
|
+
setDarkThemeType: true,
|
|
9
|
+
getSolutionVersion: true,
|
|
10
|
+
getPluginVersion: true,
|
|
11
|
+
start: true
|
|
12
|
+
};
|
|
13
|
+
exports.getPluginVersion = getPluginVersion;
|
|
14
|
+
exports.getSolutionVersion = getSolutionVersion;
|
|
15
|
+
exports.setDarkThemeType = setDarkThemeType;
|
|
16
|
+
exports.setThemeARGBColor = setThemeARGBColor;
|
|
17
|
+
exports.start = start;
|
|
18
|
+
var _reactNative = require("react-native");
|
|
19
|
+
var _NativeSolutionPlugin = require("./NativeSolutionPlugin");
|
|
20
|
+
Object.keys(_NativeSolutionPlugin).forEach(function (key) {
|
|
21
|
+
if (key === "default" || key === "__esModule") return;
|
|
22
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
23
|
+
if (key in exports && exports[key] === _NativeSolutionPlugin[key]) return;
|
|
24
|
+
Object.defineProperty(exports, key, {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _NativeSolutionPlugin[key];
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
// We re-export all named exports from the native spec, which includes the ThemeType object and types.
|
|
32
|
+
|
|
33
|
+
// We still need to import the types for use within this file's function signatures.
|
|
34
|
+
|
|
35
|
+
const LINKING_ERROR = `The package 'solution-plugin' doesn't seem to be linked. Make sure: \n\n` + _reactNative.Platform.select({
|
|
36
|
+
ios: "- You have run 'pod install'\n",
|
|
37
|
+
default: ''
|
|
38
|
+
}) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n';
|
|
39
|
+
const SolutionPlugin = _reactNative.NativeModules.SolutionPlugin ? _reactNative.NativeModules.SolutionPlugin : new Proxy({}, {
|
|
40
|
+
get() {
|
|
41
|
+
throw new Error(LINKING_ERROR);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
function setThemeARGBColor(light, dark) {
|
|
45
|
+
return SolutionPlugin.setThemeARGBColor(light, dark);
|
|
46
|
+
}
|
|
47
|
+
function setDarkThemeType(type) {
|
|
48
|
+
return SolutionPlugin.setDarkThemeType(type);
|
|
49
|
+
}
|
|
50
|
+
function getSolutionVersion() {
|
|
51
|
+
return SolutionPlugin.getVersion();
|
|
52
|
+
}
|
|
53
|
+
function getPluginVersion() {
|
|
54
|
+
// This is a hardcoded value. Remember to update it manually on release.
|
|
55
|
+
return Promise.resolve("1.3.1.deta");
|
|
56
|
+
}
|
|
57
|
+
function start(url) {
|
|
58
|
+
return SolutionPlugin.start(url);
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_NativeSolutionPlugin","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","LINKING_ERROR","Platform","select","ios","default","SolutionPlugin","NativeModules","Proxy","Error","setThemeARGBColor","light","dark","setDarkThemeType","type","getSolutionVersion","getVersion","getPluginVersion","Promise","resolve","start","url"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,qBAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,qBAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,qBAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,qBAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AADA;;AAEA;;AAIA,MAAMS,aAAa,GACjB,0EAA0E,GAC1EC,qBAAQ,CAACC,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMC,cAAc,GAAGC,0BAAa,CAACD,cAAc,GAC/CC,0BAAa,CAACD,cAAc,GAC5B,IAAIE,KAAK,CACP,CAAC,CAAC,EACF;EACER,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIS,KAAK,CAACR,aAAa,CAAC;EAChC;AACF,CACF,CAAC;AAEE,SAASS,iBAAiBA,CAACC,KAAa,EAAEC,IAAY,EAAiB;EAC5E,OAAON,cAAc,CAACI,iBAAiB,CAACC,KAAK,EAAEC,IAAI,CAAC;AACtD;AAEO,SAASC,gBAAgBA,CAACC,IAAe,EAAiB;EAC/D,OAAOR,cAAc,CAACO,gBAAgB,CAACC,IAAI,CAAC;AAC9C;AAEO,SAASC,kBAAkBA,CAAA,EAAoB;EACpD,OAAOT,cAAc,CAACU,UAAU,CAAC,CAAC;AACpC;AAEO,SAASC,gBAAgBA,CAAA,EAAoB;EAClD;EACA,OAAOC,OAAO,CAACC,OAAO,CAAC,YAAY,CAAC;AACtC;AAEO,SAASC,KAAKA,CAACC,GAAW,EAAsB;EACrD,OAAOf,cAAc,CAACc,KAAK,CAACC,GAAG,CAAC;AAClC","ignoreList":[]}
|
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
import type { TurboModule } from 'react-native';
|
|
2
2
|
import { TurboModuleRegistry } from 'react-native';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
export enum ThemeType {
|
|
5
|
+
LIGHT = 'LIGHT',
|
|
6
|
+
DARK = 'DARK',
|
|
7
|
+
FOLLOW_SYSTEM = 'FOLLOW_SYSTEM',
|
|
8
|
+
}
|
|
6
9
|
|
|
7
10
|
export interface EndResult {
|
|
8
11
|
code: string;
|
|
9
|
-
signatureId
|
|
10
|
-
finishRedirectUrl
|
|
12
|
+
signatureId?: string;
|
|
13
|
+
finishRedirectUrl?: string;
|
|
14
|
+
extraInfo?: { [key: string]: string };
|
|
11
15
|
}
|
|
12
|
-
// --- End inlined types ---
|
|
13
16
|
|
|
14
17
|
export interface Spec extends TurboModule {
|
|
15
18
|
setThemeARGBColor(light: string, dark: string): Promise<void>;
|
|
16
|
-
setDarkThemeType(type:
|
|
19
|
+
setDarkThemeType(type: ThemeType): Promise<void>;
|
|
17
20
|
getSDKVersion(): Promise<string>;
|
|
18
21
|
start(url: string): Promise<EndResult>;
|
|
19
22
|
}
|
|
20
23
|
|
|
21
|
-
export default TurboModuleRegistry.
|
|
24
|
+
export default TurboModuleRegistry.getEnforcing<Spec>('SolutionPlugin');
|
package/lib/module/index.js
CHANGED
|
@@ -1,34 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
FOLLOW_SYSTEM: 'FOLLOW_SYSTEM'
|
|
9
|
-
};
|
|
10
|
-
const LINKING_ERROR = `The package 'solution-plugin' doesn't seem to be linked. Make sure: \n\n` + Platform.select({
|
|
11
|
-
ios: "- You have run 'pod install'\n",
|
|
12
|
-
default: ''
|
|
13
|
-
}) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n';
|
|
14
|
-
const SolutionPlugin = SolutionPluginSpec ? SolutionPluginSpec : new Proxy({}, {
|
|
15
|
-
get() {
|
|
16
|
-
throw new Error(LINKING_ERROR);
|
|
17
|
-
}
|
|
18
|
-
});
|
|
3
|
+
// We re-export all named exports from the native spec, which includes the ThemeType object and types.
|
|
4
|
+
export * from './NativeSolutionPlugin';
|
|
5
|
+
// We still need to import the types for use within this file's function signatures.
|
|
6
|
+
|
|
7
|
+
import NativeSolutionPlugin from './NativeSolutionPlugin';
|
|
19
8
|
export function setThemeARGBColor(light, dark) {
|
|
20
|
-
return
|
|
9
|
+
return NativeSolutionPlugin?.setThemeARGBColor(light, dark) ?? Promise.reject(new Error('SolutionPlugin not available'));
|
|
21
10
|
}
|
|
22
11
|
export function setDarkThemeType(type) {
|
|
23
|
-
return
|
|
12
|
+
return NativeSolutionPlugin?.setDarkThemeType(type) ?? Promise.reject(new Error('SolutionPlugin not available'));
|
|
24
13
|
}
|
|
25
|
-
export function
|
|
26
|
-
return
|
|
14
|
+
export function getSolutionVersion() {
|
|
15
|
+
return NativeSolutionPlugin?.getSDKVersion() ?? Promise.reject(new Error('SolutionPlugin not available'));
|
|
27
16
|
}
|
|
28
17
|
export function getPluginVersion() {
|
|
29
|
-
|
|
18
|
+
// This is a hardcoded value. Remember to update it manually on release.
|
|
19
|
+
return Promise.resolve("1.4.0.deta");
|
|
30
20
|
}
|
|
31
21
|
export function start(url) {
|
|
32
|
-
return
|
|
22
|
+
return NativeSolutionPlugin?.start(url) ?? Promise.reject(new Error('SolutionPlugin not available'));
|
|
33
23
|
}
|
|
34
24
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["NativeSolutionPlugin","setThemeARGBColor","light","dark","Promise","reject","Error","setDarkThemeType","type","getSolutionVersion","getSDKVersion","getPluginVersion","resolve","start","url"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA;AACA,cAAc,wBAAwB;AACtC;;AAGA,OAAOA,oBAAoB,MAAM,wBAAwB;AAEzD,OAAO,SAASC,iBAAiBA,CAACC,KAAa,EAAEC,IAAY,EAAiB;EAC5E,OAAOH,oBAAoB,EAAEC,iBAAiB,CAACC,KAAK,EAAEC,IAAI,CAAC,IAAIC,OAAO,CAACC,MAAM,CAAC,IAAIC,KAAK,CAAC,8BAA8B,CAAC,CAAC;AAC1H;AAEA,OAAO,SAASC,gBAAgBA,CAACC,IAAe,EAAiB;EAC/D,OAAOR,oBAAoB,EAAEO,gBAAgB,CAACC,IAAI,CAAC,IAAIJ,OAAO,CAACC,MAAM,CAAC,IAAIC,KAAK,CAAC,8BAA8B,CAAC,CAAC;AAClH;AAEA,OAAO,SAASG,kBAAkBA,CAAA,EAAoB;EACpD,OAAOT,oBAAoB,EAAEU,aAAa,CAAC,CAAC,IAAIN,OAAO,CAACC,MAAM,CAAC,IAAIC,KAAK,CAAC,8BAA8B,CAAC,CAAC;AAC3G;AAEA,OAAO,SAASK,gBAAgBA,CAAA,EAAoB;EAClD;EACA,OAAOP,OAAO,CAACQ,OAAO,CAAC,YAAY,CAAC;AACtC;AAEA,OAAO,SAASC,KAAKA,CAACC,GAAW,EAAsB;EACrD,OAAOd,oBAAoB,EAAEa,KAAK,CAACC,GAAG,CAAC,IAAIV,OAAO,CAACC,MAAM,CAAC,IAAIC,KAAK,CAAC,8BAA8B,CAAC,CAAC;AACtG","ignoreList":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { TurboModule } from 'react-native';
|
|
2
|
+
export declare enum ThemeType {
|
|
3
|
+
LIGHT = "LIGHT",
|
|
4
|
+
DARK = "DARK",
|
|
5
|
+
FOLLOW_SYSTEM = "FOLLOW_SYSTEM"
|
|
6
|
+
}
|
|
7
|
+
export interface EndResult {
|
|
8
|
+
code: string;
|
|
9
|
+
signatureId?: string;
|
|
10
|
+
finishRedirectUrl?: string;
|
|
11
|
+
extraInfo?: {
|
|
12
|
+
[key: string]: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export interface Spec extends TurboModule {
|
|
16
|
+
setThemeARGBColor(light: string, dark: string): Promise<void>;
|
|
17
|
+
setDarkThemeType(type: ThemeType): Promise<void>;
|
|
18
|
+
getSDKVersion(): Promise<string>;
|
|
19
|
+
start(url: string): Promise<EndResult>;
|
|
20
|
+
}
|
|
21
|
+
declare const _default: Spec;
|
|
22
|
+
export default _default;
|
|
23
|
+
//# sourceMappingURL=NativeSolutionPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeSolutionPlugin.d.ts","sourceRoot":"","sources":["../../src/NativeSolutionPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,oBAAY,SAAS;IACnB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,aAAa,kBAAkB;CAChC;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CACvC;AAED,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9D,gBAAgB,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACjC,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;CACxC;;AAED,wBAAwE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './NativeSolutionPlugin';
|
|
2
|
+
import type { EndResult } from './NativeSolutionPlugin';
|
|
3
|
+
import { ThemeType } from './NativeSolutionPlugin';
|
|
4
|
+
export declare function setThemeARGBColor(light: string, dark: string): Promise<void>;
|
|
5
|
+
export declare function setDarkThemeType(type: ThemeType): Promise<void>;
|
|
6
|
+
export declare function getSolutionVersion(): Promise<string>;
|
|
7
|
+
export declare function getPluginVersion(): Promise<string>;
|
|
8
|
+
export declare function start(url: string): Promise<EndResult>;
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AACA,cAAc,wBAAwB,CAAC;AAEvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAGnD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE5E;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAE/D;AAED,wBAAgB,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC,CAEpD;AAED,wBAAgB,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC,CAGlD;AAED,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAErD"}
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "solution-plugin",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.4.0-alpha.1",
|
|
4
|
+
"description": "A plugin to add two numbers using native code.",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"source": "src/index.tsx",
|
|
7
7
|
"react-native": "src/index.tsx",
|
|
8
|
-
"types": "
|
|
8
|
+
"types": "lib/typescript/index.d.ts",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
11
|
"source": "./src/index.tsx",
|
|
12
|
-
"types": "./lib/typescript/
|
|
12
|
+
"types": "./lib/typescript/index.d.ts",
|
|
13
13
|
"default": "./lib/module/index.js"
|
|
14
14
|
},
|
|
15
15
|
"./package.json": "./package.json"
|
|
@@ -47,16 +47,13 @@
|
|
|
47
47
|
"ios",
|
|
48
48
|
"android"
|
|
49
49
|
],
|
|
50
|
-
"repository":
|
|
51
|
-
|
|
52
|
-
"url": "git+https://repo.advai.net/guardian/mobile-center/mobile-plugins/guardian-liveness-detection-react-natiive-plugin.git.git"
|
|
53
|
-
},
|
|
54
|
-
"author": "Advance AI <advance.ai.mobile@gmail.com> (https://www.advance.ai)",
|
|
50
|
+
"repository": "https://github.com/your-repo/solution-plugin",
|
|
51
|
+
"author": "Your Name",
|
|
55
52
|
"license": "MIT",
|
|
56
53
|
"bugs": {
|
|
57
|
-
"url": "https://
|
|
54
|
+
"url": "https://github.com/your-repo/solution-plugin/issues"
|
|
58
55
|
},
|
|
59
|
-
"homepage": "https://
|
|
56
|
+
"homepage": "https://github.com/your-repo/solution-plugin#readme",
|
|
60
57
|
"publishConfig": {
|
|
61
58
|
"registry": "https://registry.npmjs.org/"
|
|
62
59
|
},
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
require 'json'
|
|
2
|
+
|
|
3
|
+
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
4
|
+
|
|
5
|
+
Pod::Spec.new do |s|
|
|
6
|
+
s.name = "solution-plugin"
|
|
7
|
+
s.version = package['version']
|
|
8
|
+
s.summary = package['description']
|
|
9
|
+
s.homepage = package['homepage']
|
|
10
|
+
s.license = package['license']
|
|
11
|
+
s.authors = package['author']
|
|
12
|
+
s.platforms = { :ios => "11.0" }
|
|
13
|
+
s.source = { :git => "https://github.com/your-repo/solution-plugin.git", :tag => "#{s.version}" }
|
|
14
|
+
|
|
15
|
+
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
|
16
|
+
s.dependency "SolutionH5"
|
|
17
|
+
s.dependency "AAICore"
|
|
18
|
+
s.dependency "React-Core"
|
|
19
|
+
end
|
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
import type { TurboModule } from 'react-native';
|
|
2
2
|
import { TurboModuleRegistry } from 'react-native';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
export enum ThemeType {
|
|
5
|
+
LIGHT = 'LIGHT',
|
|
6
|
+
DARK = 'DARK',
|
|
7
|
+
FOLLOW_SYSTEM = 'FOLLOW_SYSTEM',
|
|
8
|
+
}
|
|
6
9
|
|
|
7
10
|
export interface EndResult {
|
|
8
11
|
code: string;
|
|
9
|
-
signatureId
|
|
10
|
-
finishRedirectUrl
|
|
12
|
+
signatureId?: string;
|
|
13
|
+
finishRedirectUrl?: string;
|
|
14
|
+
extraInfo?: { [key: string]: string };
|
|
11
15
|
}
|
|
12
|
-
// --- End inlined types ---
|
|
13
16
|
|
|
14
17
|
export interface Spec extends TurboModule {
|
|
15
18
|
setThemeARGBColor(light: string, dark: string): Promise<void>;
|
|
16
|
-
setDarkThemeType(type:
|
|
19
|
+
setDarkThemeType(type: ThemeType): Promise<void>;
|
|
17
20
|
getSDKVersion(): Promise<string>;
|
|
18
21
|
start(url: string): Promise<EndResult>;
|
|
19
22
|
}
|
|
20
23
|
|
|
21
|
-
export default TurboModuleRegistry.
|
|
24
|
+
export default TurboModuleRegistry.getEnforcing<Spec>('SolutionPlugin');
|
package/src/index.tsx
CHANGED
|
@@ -1,53 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} from './NativeSolutionPlugin';
|
|
6
|
-
|
|
7
|
-
export const ThemeType = {
|
|
8
|
-
LIGHT: 'LIGHT',
|
|
9
|
-
DARK: 'DARK',
|
|
10
|
-
FOLLOW_SYSTEM: 'FOLLOW_SYSTEM',
|
|
11
|
-
} as const;
|
|
12
|
-
export type ThemeType = (typeof ThemeType)[keyof typeof ThemeType];
|
|
13
|
-
|
|
14
|
-
export type { EndResult };
|
|
15
|
-
|
|
16
|
-
const LINKING_ERROR =
|
|
17
|
-
`The package 'solution-plugin' doesn't seem to be linked. Make sure: \n\n` +
|
|
18
|
-
Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
|
|
19
|
-
'- You rebuilt the app after installing the package\n' +
|
|
20
|
-
'- You are not using Expo Go\n';
|
|
21
|
-
|
|
22
|
-
const SolutionPlugin = (
|
|
23
|
-
SolutionPluginSpec
|
|
24
|
-
? SolutionPluginSpec
|
|
25
|
-
: new Proxy(
|
|
26
|
-
{},
|
|
27
|
-
{
|
|
28
|
-
get() {
|
|
29
|
-
throw new Error(LINKING_ERROR);
|
|
30
|
-
},
|
|
31
|
-
}
|
|
32
|
-
)
|
|
33
|
-
) as Spec;
|
|
1
|
+
// We re-export all named exports from the native spec, which includes the ThemeType object and types.
|
|
2
|
+
export * from './NativeSolutionPlugin';
|
|
3
|
+
// We still need to import the types for use within this file's function signatures.
|
|
4
|
+
import type { EndResult } from './NativeSolutionPlugin';
|
|
5
|
+
import { ThemeType } from './NativeSolutionPlugin';
|
|
6
|
+
import NativeSolutionPlugin from './NativeSolutionPlugin';
|
|
34
7
|
|
|
35
8
|
export function setThemeARGBColor(light: string, dark: string): Promise<void> {
|
|
36
|
-
return
|
|
9
|
+
return NativeSolutionPlugin?.setThemeARGBColor(light, dark) ?? Promise.reject(new Error('SolutionPlugin not available'));
|
|
37
10
|
}
|
|
38
11
|
|
|
39
12
|
export function setDarkThemeType(type: ThemeType): Promise<void> {
|
|
40
|
-
return
|
|
13
|
+
return NativeSolutionPlugin?.setDarkThemeType(type) ?? Promise.reject(new Error('SolutionPlugin not available'));
|
|
41
14
|
}
|
|
42
15
|
|
|
43
|
-
export function
|
|
44
|
-
return
|
|
16
|
+
export function getSolutionVersion(): Promise<string> {
|
|
17
|
+
return NativeSolutionPlugin?.getSDKVersion() ?? Promise.reject(new Error('SolutionPlugin not available'));
|
|
45
18
|
}
|
|
46
19
|
|
|
47
20
|
export function getPluginVersion(): Promise<string> {
|
|
48
|
-
|
|
21
|
+
// This is a hardcoded value. Remember to update it manually on release.
|
|
22
|
+
return Promise.resolve("1.4.0.deta");
|
|
49
23
|
}
|
|
50
24
|
|
|
51
25
|
export function start(url: string): Promise<EndResult> {
|
|
52
|
-
return
|
|
26
|
+
return NativeSolutionPlugin?.start(url) ?? Promise.reject(new Error('SolutionPlugin not available'));
|
|
53
27
|
}
|
package/LICENSE
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Advance AI
|
|
4
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
6
|
-
in the Software without restriction, including without limitation the rights
|
|
7
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
9
|
-
furnished to do so, subject to the following conditions:
|
|
10
|
-
|
|
11
|
-
The above copyright notice and this permission notice shall be included in all
|
|
12
|
-
copies or substantial portions of the Software.
|
|
13
|
-
|
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
-
SOFTWARE.
|
package/README.md
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# liveness-plugin
|
|
2
|
-
|
|
3
|
-
Guardian Solution SDK React Native plugin.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```sh
|
|
8
|
-
npm install solution-plugin
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Usage
|
|
12
|
-
|
|
13
|
-
```js
|
|
14
|
-
import {
|
|
15
|
-
getSDKVersion,
|
|
16
|
-
setThemeARGBColor,
|
|
17
|
-
setDarkThemeType,
|
|
18
|
-
start,
|
|
19
|
-
type EndResult,
|
|
20
|
-
ThemeType,
|
|
21
|
-
} from 'solution-plugin';
|
|
22
|
-
|
|
23
|
-
// ...
|
|
24
|
-
|
|
25
|
-
// Get the SDK version
|
|
26
|
-
const version = await getSDKVersion();
|
|
27
|
-
|
|
28
|
-
// Sets the appearance mode.
|
|
29
|
-
// Options: LIGHT, DARK, FOLLOW_SYSTEM. Default: LIGHT.
|
|
30
|
-
setDarkThemeType(ThemeType.FOLLOW_SYSTEM);
|
|
31
|
-
|
|
32
|
-
// Sets the loading color of the page for both light and dark appearance modes.The provided color value must be in ARGB or RGB format.
|
|
33
|
-
// This can be specified as an ARGB hex string:
|
|
34
|
-
setThemeARGBColor('#FF000000', '#FFFFFFFF');
|
|
35
|
-
|
|
36
|
-
// Starts the Solution flow. Call the start method, pass a url parameter, and receive an asynchronous return value.
|
|
37
|
-
const result = (await start('Your own url',)) as EndResult;
|
|
38
|
-
console.log('Solution result:', result);
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
## Contributing
|
|
43
|
-
|
|
44
|
-
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
|
|
45
|
-
|
|
46
|
-
## License
|
|
47
|
-
|
|
48
|
-
MIT
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
|
|
52
|
-
Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
|
package/SolutionPlugin.podspec
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
require "json"
|
|
2
|
-
|
|
3
|
-
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
4
|
-
|
|
5
|
-
Pod::Spec.new do |s|
|
|
6
|
-
s.name = "SolutionPlugin"
|
|
7
|
-
s.version = package["version"]
|
|
8
|
-
s.summary = package["description"]
|
|
9
|
-
s.homepage = package["homepage"]
|
|
10
|
-
s.license = package["license"]
|
|
11
|
-
s.authors = package["author"]
|
|
12
|
-
|
|
13
|
-
s.platforms = { :ios => min_ios_version_supported }
|
|
14
|
-
s.source = { :git => "https://repo.advai.net/guardian/mobile-center/mobile-plugins/guardian-liveness-detection-react-natiive-plugin.git", :tag => "#{s.version}" }
|
|
15
|
-
|
|
16
|
-
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
|
17
|
-
s.private_header_files = "ios/**/*.h"
|
|
18
|
-
|
|
19
|
-
# Swift 支持
|
|
20
|
-
s.swift_version = "5.0"
|
|
21
|
-
s.requires_arc = true
|
|
22
|
-
|
|
23
|
-
s.dependency "SolutionH5"
|
|
24
|
-
s.static_framework = true
|
|
25
|
-
|
|
26
|
-
install_modules_dependencies(s)
|
|
27
|
-
end
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { TurboModule } from 'react-native';
|
|
2
|
-
export type ThemeType = 'LIGHT' | 'DARK' | 'FOLLOW_SYSTEM';
|
|
3
|
-
export interface EndResult {
|
|
4
|
-
code: string;
|
|
5
|
-
signatureId: string;
|
|
6
|
-
finishRedirectUrl: string;
|
|
7
|
-
}
|
|
8
|
-
export interface Spec extends TurboModule {
|
|
9
|
-
setThemeARGBColor(light: string, dark: string): Promise<void>;
|
|
10
|
-
setDarkThemeType(type: string): Promise<void>;
|
|
11
|
-
getSDKVersion(): Promise<string>;
|
|
12
|
-
start(url: string): Promise<EndResult>;
|
|
13
|
-
}
|
|
14
|
-
declare const _default: Spec | null;
|
|
15
|
-
export default _default;
|
|
16
|
-
//# sourceMappingURL=NativeSolutionPlugin.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NativeSolutionPlugin.d.ts","sourceRoot":"","sources":["../../../src/NativeSolutionPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAIhD,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,eAAe,CAAC;AAE3D,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAGD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9D,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACjC,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;CACxC;;AAED,wBAA+D"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type EndResult } from './NativeSolutionPlugin';
|
|
2
|
-
export declare const ThemeType: {
|
|
3
|
-
readonly LIGHT: "LIGHT";
|
|
4
|
-
readonly DARK: "DARK";
|
|
5
|
-
readonly FOLLOW_SYSTEM: "FOLLOW_SYSTEM";
|
|
6
|
-
};
|
|
7
|
-
export type ThemeType = (typeof ThemeType)[keyof typeof ThemeType];
|
|
8
|
-
export type { EndResult };
|
|
9
|
-
export declare function setThemeARGBColor(light: string, dark: string): Promise<void>;
|
|
10
|
-
export declare function setDarkThemeType(type: ThemeType): Promise<void>;
|
|
11
|
-
export declare function getSDKVersion(): Promise<string>;
|
|
12
|
-
export declare function getPluginVersion(): Promise<string>;
|
|
13
|
-
export declare function start(url: string): Promise<EndResult>;
|
|
14
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AACA,OAA2B,EACzB,KAAK,SAAS,EAEf,MAAM,wBAAwB,CAAC;AAEhC,eAAO,MAAM,SAAS;;;;CAIZ,CAAC;AACX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;AAEnE,YAAY,EAAE,SAAS,EAAE,CAAC;AAqB1B,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE5E;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAE/D;AAED,wBAAgB,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC,CAE/C;AAED,wBAAgB,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC,CAElD;AAED,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAErD"}
|