@doorstepai/dropoff-sdk 2.2.5 → 2.2.7

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.
@@ -498,7 +498,7 @@ class DoorstepAIModule(private val reactContext: ReactApplicationContext) :
498
498
  * signal a refusal reports as the re-askable DENIED instead of
499
499
  * PERMANENTLY_DENIED.
500
500
  */
501
- private fun permissionContext() = currentActivity ?: reactContext
501
+ private fun permissionContext() = reactContext.currentActivity ?: reactContext
502
502
 
503
503
  @ReactMethod
504
504
  fun checkPermissions(permissions: ReadableArray?, promise: Promise) {
@@ -567,7 +567,7 @@ class DoorstepAIModule(private val reactContext: ReactApplicationContext) :
567
567
  PERMISSION_ANSWER_TIMEOUT_MS
568
568
  }
569
569
 
570
- val activity = currentActivity
570
+ val activity = reactContext.currentActivity
571
571
  if (activity == null) {
572
572
  promise.reject("NO_ACTIVITY", "requestPermissions needs a resumed Activity to prompt from")
573
573
  return
@@ -773,7 +773,7 @@ class DoorstepAIModule(private val reactContext: ReactApplicationContext) :
773
773
 
774
774
  @ReactMethod
775
775
  fun requestBackgroundLocationPermission(promise: Promise) {
776
- val activity = currentActivity
776
+ val activity = reactContext.currentActivity
777
777
  if (activity == null) {
778
778
  promise.reject("NO_ACTIVITY", "requestBackgroundLocationPermission needs a resumed Activity to prompt from")
779
779
  return
@@ -50,9 +50,9 @@ class DoorstepEmbedViewManager : SimpleViewManager<DoorstepEmbedView>() {
50
50
  putString("mode", mode.value)
51
51
  })
52
52
  }
53
- view.onError = { message ->
53
+ view.onError = { error ->
54
54
  emit(view, ERROR_EVENT, Arguments.createMap().apply {
55
- putString("message", message)
55
+ putString("message", error.message)
56
56
  })
57
57
  }
58
58
  return view
@@ -151,7 +151,7 @@ class DoorstepEmbedViewManager : SimpleViewManager<DoorstepEmbedView>() {
151
151
  super.onDropViewInstance(view)
152
152
  }
153
153
 
154
- override fun getExportedCustomDirectEventTypeConstants(): MutableMap<String, Any> =
154
+ override fun getExportedCustomDirectEventTypeConstants(): Map<String, Any> =
155
155
  MapBuilder.builder<String, Any>()
156
156
  .put(MODE_CHANGED_EVENT, MapBuilder.of("registrationName", "onModeChanged"))
157
157
  .put(ERROR_EVENT, MapBuilder.of("registrationName", "onError"))
@@ -176,4 +176,3 @@ class DoorstepEmbedViewManager : SimpleViewManager<DoorstepEmbedView>() {
176
176
  const val DEFAULT_EXPANDED_HEIGHT = 600f
177
177
  }
178
178
  }
179
-
@@ -1,4 +1,5 @@
1
1
  import SwiftUI
2
+ import React
2
3
  import DoorstepDropoffSDK
3
4
 
4
5
  @objc(RootDoorstepAIViewManager)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doorstepai/dropoff-sdk",
3
- "version": "2.2.5",
3
+ "version": "2.2.7",
4
4
  "description": "doorstep.ai dropoff sdk for React Native",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/module/index.js",
@@ -60,10 +60,11 @@
60
60
  "@eslint/eslintrc": "^3.3.0",
61
61
  "@eslint/js": "^9.22.0",
62
62
  "@evilmartians/lefthook": "^1.5.0",
63
- "@react-native/eslint-config": "^0.78.0",
63
+ "@react-native/eslint-config": "0.85.3",
64
+ "@react-native/jest-preset": "0.85.3",
64
65
  "@release-it/conventional-changelog": "^9.0.2",
65
66
  "@types/jest": "^29.5.5",
66
- "@types/react": "^19.0.0",
67
+ "@types/react": "^19.2.0",
67
68
  "commitlint": "^19.6.1",
68
69
  "del-cli": "^5.1.0",
69
70
  "eslint": "^9.22.0",
@@ -74,8 +75,8 @@
74
75
  "patch-package": "^8.0.0",
75
76
  "postinstall-postinstall": "^2.1.0",
76
77
  "prettier": "^3.0.3",
77
- "react": "19.0.0",
78
- "react-native": "0.79.1",
78
+ "react": "19.2.3",
79
+ "react-native": "0.85.3",
79
80
  "react-native-builder-bob": "0.39.1",
80
81
  "release-it": "^17.10.0",
81
82
  "turbo": "^1.10.7",
@@ -90,7 +91,7 @@
90
91
  ],
91
92
  "packageManager": "yarn@3.6.1",
92
93
  "jest": {
93
- "preset": "react-native",
94
+ "preset": "@react-native/jest-preset",
94
95
  "modulePathIgnorePatterns": [
95
96
  "<rootDir>/example/node_modules",
96
97
  "<rootDir>/lib/"
@@ -152,5 +153,8 @@
152
153
  },
153
154
  "dependencies": {
154
155
  "react-native-dotenv": "^3.4.11"
156
+ },
157
+ "engines": {
158
+ "node": ">=22.11.0"
155
159
  }
156
160
  }