@buoy-gg/image-overlay 2.1.15 → 3.0.0

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.
@@ -77,12 +77,16 @@ function ImageOverlayModal({
77
77
  expoClipboard = require("expo-clipboard");
78
78
  } catch {/* not installed */}
79
79
 
80
- // Try @react-native-clipboard/clipboard (text only)
80
+ // Only fall back to @react-native-clipboard/clipboard when expo-clipboard
81
+ // isn't present. Requiring it runs TurboModuleRegistry.getEnforcing('RNCClipboard'),
82
+ // which crashes in Expo Go where that native module isn't in the binary.
81
83
  let rnClipboard = null;
82
- try {
83
- const mod = require("@react-native-clipboard/clipboard");
84
- rnClipboard = mod.default || mod;
85
- } catch {/* not installed */}
84
+ if (!expoClipboard) {
85
+ try {
86
+ const mod = require("@react-native-clipboard/clipboard");
87
+ rnClipboard = mod.default || mod;
88
+ } catch {/* not installed */}
89
+ }
86
90
 
87
91
  // No clipboard library at all
88
92
  if (!expoClipboard && !rnClipboard) {
@@ -73,12 +73,16 @@ export function ImageOverlayModal({
73
73
  expoClipboard = require("expo-clipboard");
74
74
  } catch {/* not installed */}
75
75
 
76
- // Try @react-native-clipboard/clipboard (text only)
76
+ // Only fall back to @react-native-clipboard/clipboard when expo-clipboard
77
+ // isn't present. Requiring it runs TurboModuleRegistry.getEnforcing('RNCClipboard'),
78
+ // which crashes in Expo Go where that native module isn't in the binary.
77
79
  let rnClipboard = null;
78
- try {
79
- const mod = require("@react-native-clipboard/clipboard");
80
- rnClipboard = mod.default || mod;
81
- } catch {/* not installed */}
80
+ if (!expoClipboard) {
81
+ try {
82
+ const mod = require("@react-native-clipboard/clipboard");
83
+ rnClipboard = mod.default || mod;
84
+ } catch {/* not installed */}
85
+ }
82
86
 
83
87
  // No clipboard library at all
84
88
  if (!expoClipboard && !rnClipboard) {
@@ -1 +1 @@
1
- {"version":3,"file":"ImageOverlayModal.d.ts","sourceRoot":"","sources":["../../../../src/imageOverlay/components/ImageOverlayModal.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,sBAAsB,EAAkC,MAAM,UAAU,CAAC;AAWvF,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,OAAO,EACP,MAAM,EACN,UAAU,EACV,2BAAmC,EACnC,iBAAiB,EACjB,sBAAsB,GACvB,EAAE,sBAAsB,+BAkhBxB"}
1
+ {"version":3,"file":"ImageOverlayModal.d.ts","sourceRoot":"","sources":["../../../../src/imageOverlay/components/ImageOverlayModal.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,sBAAsB,EAAkC,MAAM,UAAU,CAAC;AAWvF,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,OAAO,EACP,MAAM,EACN,UAAU,EACV,2BAAmC,EACnC,iBAAiB,EACjB,sBAAsB,GACvB,EAAE,sBAAsB,+BAshBxB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buoy-gg/image-overlay",
3
- "version": "2.1.15",
3
+ "version": "3.0.0",
4
4
  "description": "Image overlay tool for matching design mockups",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -26,7 +26,7 @@
26
26
  ],
27
27
  "sideEffects": false,
28
28
  "dependencies": {
29
- "@buoy-gg/shared-ui": "2.1.15"
29
+ "@buoy-gg/shared-ui": "3.0.0"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "react": "*",