@regulaforensics/face-sdk 8.5.1468-rc → 8.5.1470-rc

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/Package.swift CHANGED
@@ -10,7 +10,7 @@ let package = Package(
10
10
  .package(url: "https://github.com/apache/cordova-ios.git", branch: "master"),
11
11
  .package(
12
12
  url: "https://github.com/regulaforensics/FaceSDK-Swift-Package",
13
- exact: "8.5.5086-rc"
13
+ exact: "9.8.4815-rc"
14
14
  )
15
15
  ],
16
16
  targets: [
@@ -7,6 +7,7 @@ import android.graphics.Bitmap
7
7
  import android.graphics.Point
8
8
  import android.graphics.Rect
9
9
  import android.graphics.Typeface
10
+ import android.os.Build
10
11
  import android.util.Pair
11
12
  import android.util.Size
12
13
  import com.regula.facesdk.configuration.EnrollmentConfiguration
@@ -85,13 +86,19 @@ import java.lang.Float
85
86
 
86
87
  // Config ------------------------------
87
88
 
88
- fun typefaceFromJSON(it: JSONObject) = Pair(
89
- Typeface.create(
90
- it.getString("name"),
91
- it.optInt("style", Typeface.NORMAL)
92
- ),
93
- it.getIntOrNull("size")
94
- )
89
+ @SuppressLint("DiscouragedApi")
90
+ fun typefaceFromJSON(it: JSONObject): Pair<Typeface?, Int?> {
91
+ val name = it.getString("name")
92
+ val font = try {
93
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
94
+ context.resources.getFont(context.resources.getIdentifier(name, "font", context.packageName))
95
+ else null
96
+ } catch (_: Exception) { null }
97
+ return Pair(
98
+ font ?: Typeface.create(name, it.optInt("style", Typeface.NORMAL)),
99
+ it.getIntOrNull("size")
100
+ )
101
+ }
95
102
 
96
103
  fun faceCaptureConfigFromJSON(input: JSONObject) = input.let {
97
104
  val result = FaceCaptureConfiguration.Builder()
@@ -158,7 +158,7 @@ fun Any.setFont(customization: Customization, value: Any) {
158
158
  val uiConfig = customization.uiConfigurationLive.value!!
159
159
  val privateFonts = uiConfig.javaClass.getDeclaredField("f")
160
160
  privateFonts.isAccessible = true
161
- val fonts = privateFonts.get(uiConfig) as HashMap<CustomizationFont, Typeface>
161
+ val fonts = privateFonts.get(uiConfig) as HashMap<CustomizationFont, Typeface?>
162
162
  val privateSizes = uiConfig.javaClass.getDeclaredField("g")
163
163
  privateSizes.isAccessible = true
164
164
  val fontsSizes = privateSizes.get(uiConfig) as HashMap<CustomizationFont, Int>
@@ -2122,9 +2122,9 @@
2122
2122
  }
2123
2123
  },
2124
2124
  "node_modules/source-map-js": {
2125
- "version": "1.2.1",
2126
- "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
2127
- "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
2125
+ "version": "1.2.2",
2126
+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz",
2127
+ "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==",
2128
2128
  "license": "BSD-3-Clause",
2129
2129
  "engines": {
2130
2130
  "node": ">=0.10.0"
@@ -6,8 +6,8 @@
6
6
  "android": "scripts/android.sh"
7
7
  },
8
8
  "dependencies": {
9
- "@regulaforensics/face-sdk": "8.5.1468-rc",
10
- "@regulaforensics/face-core-basic": "8.5.897-rc",
9
+ "@regulaforensics/face-sdk": "8.5.1470-rc",
10
+ "@regulaforensics/face-core-basic": "8.5.900-rc",
11
11
  "@capacitor/dialog": "^8.0.0",
12
12
  "@capacitor/cli": "^8.5.2",
13
13
  "@capacitor/core": "^8.5.2",
@@ -19,7 +19,8 @@
19
19
  "overrides": {
20
20
  "xcode": {
21
21
  "uuid": "^11.1.1"
22
- }
22
+ },
23
+ "source-map-js": "^1.2.2"
23
24
  },
24
25
  "type": "module"
25
26
  }
@@ -12725,9 +12725,9 @@
12725
12725
  }
12726
12726
  },
12727
12727
  "node_modules/shell-quote": {
12728
- "version": "1.10.0",
12729
- "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.10.0.tgz",
12730
- "integrity": "sha512-w1aiOKwKuRgtwAReIIj89puqg+I7GvX4IbLrvmhXbzQsj1+Zwi4VO3+fa6ZF91TWSjIxoEkKnMeHcLEODK5ZXA==",
12728
+ "version": "1.11.0",
12729
+ "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.11.0.tgz",
12730
+ "integrity": "sha512-JdxDPD0DBTyu08pq0kPC0xSNet/qsU07qT6IsX1AS8oO2ICNRY4ldNa8OAI6PuwAH8tG3lxEhbqmyp4Dw4036g==",
12731
12731
  "license": "MIT",
12732
12732
  "engines": {
12733
12733
  "node": ">= 0.4"
@@ -12908,9 +12908,9 @@
12908
12908
  }
12909
12909
  },
12910
12910
  "node_modules/source-map-js": {
12911
- "version": "1.2.1",
12912
- "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
12913
- "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
12911
+ "version": "1.2.2",
12912
+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz",
12913
+ "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==",
12914
12914
  "license": "BSD-3-Clause",
12915
12915
  "engines": {
12916
12916
  "node": ">=0.10.0"
@@ -20,8 +20,8 @@
20
20
  "@awesome-cordova-plugins/camera": "^9.6.0",
21
21
  "@awesome-cordova-plugins/dialogs": "^9.6.0",
22
22
  "@awesome-cordova-plugins/file": "^9.6.0",
23
- "@regulaforensics/face-sdk": "8.5.1468-rc",
24
- "@regulaforensics/face-core-basic": "8.5.897-rc",
23
+ "@regulaforensics/face-sdk": "8.5.1470-rc",
24
+ "@regulaforensics/face-core-basic": "8.5.900-rc",
25
25
  "cordova-android": "^15.1.0",
26
26
  "cordova-ios": "^8.1.1",
27
27
  "cordova-plugin-camera": "^8.0.0",
@@ -36,7 +36,9 @@
36
36
  },
37
37
  "overrides": {
38
38
  "serialize-javascript": "^7.1.1",
39
- "uuid": "^11.1.1"
39
+ "uuid": "^11.1.1",
40
+ "source-map-js": "^1.2.2",
41
+ "shell-quote": "^1.11.0"
40
42
  },
41
43
  "cordova": {
42
44
  "plugins": {
@@ -1341,9 +1341,9 @@
1341
1341
  }
1342
1342
  },
1343
1343
  "node_modules/@expo/metro-file-map": {
1344
- "version": "58.0.1",
1345
- "resolved": "https://registry.npmjs.org/@expo/metro-file-map/-/metro-file-map-58.0.1.tgz",
1346
- "integrity": "sha512-jR4NeNY7DLSQMwuaF+Y+H9AoSMhghk06UA7OEzKN/QvEd6m4AzXafaDOLY2tky0Tz7zDFmS1NQ1XcYfWRTRm8w==",
1344
+ "version": "58.0.4",
1345
+ "resolved": "https://registry.npmjs.org/@expo/metro-file-map/-/metro-file-map-58.0.4.tgz",
1346
+ "integrity": "sha512-PkrYQ6FiUzRTmYSrO0o1YNYz0gx+z4oij61aXX26Kn5ehudujom9GMvZiC5xexUVEyJdoZN+mNLWXUunlqb5Rg==",
1347
1347
  "license": "MIT",
1348
1348
  "dependencies": {
1349
1349
  "2g": "^0.4.3",
@@ -1351,7 +1351,6 @@
1351
1351
  "fb-watchman": "^2.0.2",
1352
1352
  "invariant": "^2.2.4",
1353
1353
  "jest-worker": "^29.7.0",
1354
- "micromatch": "^4.0.4",
1355
1354
  "walker": "^1.0.8"
1356
1355
  }
1357
1356
  },
@@ -6538,9 +6537,9 @@
6538
6537
  }
6539
6538
  },
6540
6539
  "node_modules/shell-quote": {
6541
- "version": "1.10.0",
6542
- "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.10.0.tgz",
6543
- "integrity": "sha512-w1aiOKwKuRgtwAReIIj89puqg+I7GvX4IbLrvmhXbzQsj1+Zwi4VO3+fa6ZF91TWSjIxoEkKnMeHcLEODK5ZXA==",
6540
+ "version": "1.11.0",
6541
+ "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.11.0.tgz",
6542
+ "integrity": "sha512-JdxDPD0DBTyu08pq0kPC0xSNet/qsU07qT6IsX1AS8oO2ICNRY4ldNa8OAI6PuwAH8tG3lxEhbqmyp4Dw4036g==",
6544
6543
  "license": "MIT",
6545
6544
  "engines": {
6546
6545
  "node": ">= 0.4"
@@ -6606,9 +6605,9 @@
6606
6605
  }
6607
6606
  },
6608
6607
  "node_modules/source-map-js": {
6609
- "version": "1.2.1",
6610
- "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
6611
- "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
6608
+ "version": "1.2.2",
6609
+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz",
6610
+ "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==",
6612
6611
  "license": "BSD-3-Clause",
6613
6612
  "engines": {
6614
6613
  "node": ">=0.10.0"
@@ -8,8 +8,8 @@
8
8
  "start": "expo start --port \"$npm_package_config_metroPort\""
9
9
  },
10
10
  "dependencies": {
11
- "@regulaforensics/face-sdk": "8.5.1468-rc",
12
- "@regulaforensics/face-core-basic": "8.5.897-rc",
11
+ "@regulaforensics/face-sdk": "8.5.1470-rc",
12
+ "@regulaforensics/face-core-basic": "8.5.900-rc",
13
13
  "react-native": "0.88.0-rc.0",
14
14
  "react-native-fs": "^2.20.0",
15
15
  "react-native-image-picker": "^8.2.1",
@@ -27,7 +27,10 @@
27
27
  "uuid": "^14.0.0",
28
28
  "expo-custom-assets": {
29
29
  "expo": "$expo"
30
- }
30
+ },
31
+ "source-map-js": "^1.2.2",
32
+ "shell-quote": "^1.11.0",
33
+ "@expo/metro-file-map": "^58.0.4"
31
34
  },
32
35
  "config": {
33
36
  "metroPort": 8082
package/ios/Config.swift CHANGED
@@ -11,7 +11,7 @@ func setCustomization(_ it: [String: [String: Any]]) {
11
11
  for (k, v) in value {
12
12
  switch key {
13
13
  case("colors"): dict[Int(k)!] = UIColor.decode(v)
14
- case("fonts"): dict[Int(k)!] = UIFont.decode(v)
14
+ case("fonts"): dict[CustomizationFont.fromDartKey(k)] = UIFont.decode(v)
15
15
  case("images"): dict[k] = UIImage.decode(v)
16
16
  default: break
17
17
  }
@@ -19,6 +19,24 @@ func setCustomization(_ it: [String: [String: Any]]) {
19
19
  }
20
20
  }
21
21
 
22
+ extension CustomizationFont {
23
+ static func fromDartKey(_ key: String) -> CustomizationFont? {
24
+ switch key {
25
+ case "100": return .onboardingScreenStartButton
26
+ case "101": return .onboardingScreenTitleLabel
27
+ case "102": return .onboardingScreenSubtitleLabel
28
+ case "103": return .onboardingScreenMessageLabels
29
+ case "200": return .cameraScreenHintLabel
30
+ case "300": return .retryScreenRetryButton
31
+ case "301": return .retryScreenTitleLabel
32
+ case "302": return .retryScreenSubtitleLabel
33
+ case "303": return .retryScreenHintLabels
34
+ case "400": return .processingScreenLabel
35
+ default: return nil
36
+ }
37
+ }
38
+ }
39
+
22
40
  public extension FaceCaptureConfiguration {
23
41
  static func decode(_ it: Any?) -> Self? {
24
42
  guard let it = it as? [String: Any] else { return nil }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@regulaforensics/face-sdk",
3
- "version": "8.5.1468-rc",
3
+ "version": "8.5.1470-rc",
4
4
  "description": "This is an npm module for Regula Face SDK. It allows you to easily compaire faces using your phone's camera.",
5
5
  "main": "www/react-native/index.js",
6
6
  "module": "www/capacitor/index.js",
package/plugin.xml CHANGED
@@ -1,5 +1,5 @@
1
1
  <?xml version='1.0' encoding='utf-8'?>
2
- <plugin id="@regulaforensics/face-sdk" version="8.5.1468-rc" xmlns="http://apache.org/cordova/ns/plugins/1.0">
2
+ <plugin id="@regulaforensics/face-sdk" version="8.5.1470-rc" xmlns="http://apache.org/cordova/ns/plugins/1.0">
3
3
  <name>FaceSDK</name>
4
4
  <description>Cordova plugin for Regula Face SDK</description>
5
5
  <license>commercial</license>
@@ -27,7 +27,7 @@
27
27
  <source url="https://github.com/regulaforensics/podspecs.git" />
28
28
  </config>
29
29
  <pods>
30
- <pod name="FaceSDKStage" spec="8.5.5086" nospm="true" />
30
+ <pod name="FaceSDKStage" spec="9.8.4815" nospm="true" />
31
31
  </pods>
32
32
  </podspec>
33
33
  </platform>
@@ -1,6 +1,6 @@
1
1
  Pod::Spec.new do |s|
2
2
  s.name = 'react-native-face-sdk'
3
- s.version = '8.5.1468-rc'
3
+ s.version = '8.5.1470-rc'
4
4
  s.summary = 'Regula React Native plugin.'
5
5
  s.license = 'commercial'
6
6
  s.authors = { 'RegulaForensics' => 'support@regulaforensics.com' }
@@ -9,6 +9,6 @@ Pod::Spec.new do |s|
9
9
  s.ios.deployment_target = '15.0'
10
10
  s.source_files = [ 'ios/*.swift', 'ios/RN*.m' ]
11
11
  s.exclude_files = [ 'ios/CDVFaceSDK.swift' ]
12
- s.dependency 'FaceSDKStage', '8.5.5086'
12
+ s.dependency 'FaceSDKStage', '9.8.4815'
13
13
  s.dependency 'React'
14
14
  end
@@ -13,7 +13,7 @@
13
13
  },
14
14
  "..": {
15
15
  "name": "@regulaforensics/face-sdk",
16
- "version": "8.5.1468-rc",
16
+ "version": "8.5.1470-rc",
17
17
  "dev": true,
18
18
  "license": "commercial",
19
19
  "dependencies": {
@@ -11,7 +11,7 @@ import { CustomizationColors } from './customization/customization_colors'
11
11
  import { CustomizationFonts } from './customization/customization_fonts'
12
12
  import { CustomizationImages } from './customization/customization_images'
13
13
  import { Customization } from './customization/customization'
14
- import { Font } from './customization/font'
14
+ import { Font, FontStyle } from './customization/font'
15
15
  import { ScreenOrientation } from './customization/screen_orientation'
16
16
  export {
17
17
  CameraPosition,
@@ -20,6 +20,7 @@ export {
20
20
  CustomizationImages,
21
21
  Customization,
22
22
  Font,
23
+ FontStyle,
23
24
  ScreenOrientation,
24
25
  }
25
26
 
package/www/cordova.js CHANGED
@@ -2285,6 +2285,7 @@ __webpack_require__.r(__webpack_exports__);
2285
2285
  /* harmony export */ FaceSDK: () => (/* binding */ FaceSDK),
2286
2286
  /* harmony export */ FaceSDKVersion: () => (/* reexport safe */ _init_face_sdk_version__WEBPACK_IMPORTED_MODULE_8__.FaceSDKVersion),
2287
2287
  /* harmony export */ Font: () => (/* reexport safe */ _customization_font__WEBPACK_IMPORTED_MODULE_6__.Font),
2288
+ /* harmony export */ FontStyle: () => (/* reexport safe */ _customization_font__WEBPACK_IMPORTED_MODULE_6__.FontStyle),
2288
2289
  /* harmony export */ ImageQualityCharacteristic: () => (/* reexport safe */ _image_quality_image_quality_characteristic__WEBPACK_IMPORTED_MODULE_31__.ImageQualityCharacteristic),
2289
2290
  /* harmony export */ ImageQualityCharacteristicName: () => (/* reexport safe */ _image_quality_image_quality_characteristic_name__WEBPACK_IMPORTED_MODULE_30__.ImageQualityCharacteristicName),
2290
2291
  /* harmony export */ ImageQualityGroup: () => (/* reexport safe */ _image_quality_image_quality_group__WEBPACK_IMPORTED_MODULE_32__.ImageQualityGroup),
@@ -11,7 +11,7 @@ import { CustomizationColors } from './customization/customization_colors'
11
11
  import { CustomizationFonts } from './customization/customization_fonts'
12
12
  import { CustomizationImages } from './customization/customization_images'
13
13
  import { Customization } from './customization/customization'
14
- import { Font } from './customization/font'
14
+ import { Font, FontStyle } from './customization/font'
15
15
  import { ScreenOrientation } from './customization/screen_orientation'
16
16
  export {
17
17
  CameraPosition,
@@ -20,6 +20,7 @@ export {
20
20
  CustomizationImages,
21
21
  Customization,
22
22
  Font,
23
+ FontStyle,
23
24
  ScreenOrientation,
24
25
  }
25
26
 
@@ -3,7 +3,7 @@ import { CustomizationColors } from './customization/customization_colors'
3
3
  import { CustomizationFonts } from './customization/customization_fonts'
4
4
  import { CustomizationImages } from './customization/customization_images'
5
5
  import { Customization, CustomButtonTappedCompletion } from './customization/customization'
6
- import { Font } from './customization/font'
6
+ import { Font, FontStyle } from './customization/font'
7
7
  import { ScreenOrientation } from './customization/screen_orientation'
8
8
  export {
9
9
  CameraPosition,
@@ -13,6 +13,7 @@ export {
13
13
  Customization,
14
14
  CustomButtonTappedCompletion,
15
15
  Font,
16
+ FontStyle,
16
17
  ScreenOrientation,
17
18
  }
18
19