@independo/capacitor-emoji-picker 1.3.7-dev.1 → 1.3.7-dev.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -82,7 +82,7 @@ public class EmojiPicker: CAPPlugin, CAPBridgedPlugin {
82
82
  service.present(options: options) { result in
83
83
  switch result {
84
84
  case .success(let pickerResult):
85
- call.resolve(["emoji": pickerResult.emoji as Any])
85
+ call.resolve(pickerResult.bridgePayload)
86
86
  case .failure(let error):
87
87
  call.reject(error.code, error.code)
88
88
  }
@@ -4,6 +4,12 @@ import Foundation
4
4
  struct EmojiPickerResult {
5
5
  /// The selected emoji, or `nil` when the picker was dismissed without a selection.
6
6
  let emoji: String?
7
+
8
+ /// The payload resolved to JS. A `nil` emoji must be `NSNull`: a boxed `Optional.none` is not a valid
9
+ /// JSON object value, so Capacitor's `JSONSerialization.isValidJSONObject` check would reject the result.
10
+ var bridgePayload: [String: Any] {
11
+ ["emoji": emoji.map { $0 as Any } ?? NSNull()]
12
+ }
7
13
  }
8
14
 
9
15
  /// A canonical error surfaced by the service/presenter layers.
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "url": "https://github.com/independo-gmbh/capacitor-emoji-picker.git"
14
14
  },
15
15
  "description": "Emoji picker plugin for Capacitor 8 with native Android support, iOS system emoji keyboard integration, and a web fallback.",
16
- "version": "1.3.7-dev.1",
16
+ "version": "1.3.7-dev.3",
17
17
  "packageManager": "pnpm@11.8.0",
18
18
  "devDependencies": {
19
19
  "@capacitor/android": "catalog:",
@@ -32,7 +32,7 @@
32
32
  "@types/node": "^26.6.6",
33
33
  "conventional-changelog-conventionalcommits": "^9.3.1",
34
34
  "eslint": "10.14.0",
35
- "globals": "17.13.0",
35
+ "globals": "17.14.0",
36
36
  "jest": "^30.5.2",
37
37
  "jest-environment-jsdom": "^30.5.2",
38
38
  "rollup": "^4.68.0",
@@ -43,6 +43,11 @@
43
43
  "typescript-eslint": "8.72.1"
44
44
  },
45
45
  "main": "dist/plugin.cjs.js",
46
+ "sideEffects": [
47
+ "./dist/esm/index.js",
48
+ "./dist/plugin.js",
49
+ "./dist/plugin.cjs.js"
50
+ ],
46
51
  "files": [
47
52
  "android/src/main/",
48
53
  "android/build.gradle",