@buoy-gg/image-overlay 7.0.35 → 7.0.38
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/README.md +30 -8
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@buoy-gg/image-overlay) [](https://www.npmjs.com/package/@buoy-gg/image-overlay)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Place a reference image over your app to compare spacing, alignment, and sizing on the device.
|
|
6
6
|
|
|
7
|
-
Part of [Buoy](https://github.com/Buoy-gg/buoy)
|
|
7
|
+
Part of [Buoy](https://github.com/Buoy-gg/buoy). Install the package, complete account setup, and follow the integration steps below.
|
|
8
8
|
|
|
9
9
|
## Install
|
|
10
10
|
|
|
@@ -12,6 +12,24 @@ Part of [Buoy](https://github.com/Buoy-gg/buoy) — devtools that live inside yo
|
|
|
12
12
|
npm install @buoy-gg/core @buoy-gg/image-overlay
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
+
## Before you start
|
|
16
|
+
|
|
17
|
+
Use a development build with `@buoy-gg/core` and a Free or Pro Buoy account key. From your app’s directory, sign in:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npx --package=@buoy-gg/core buoy login
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
For Expo, initialize Buoy before rendering the menu:
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
import { Buoy } from "@buoy-gg/core";
|
|
27
|
+
|
|
28
|
+
Buoy.init({ licenseKey: process.env.EXPO_PUBLIC_BUOY_KEY });
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
The login command writes the Expo key to `.env.local`. For React Native CLI, pass the key from your app’s environment configuration; React Native does not load `.env.local` automatically. Mount `FloatingDevTools` inside the same providers as your screens and restart the development server after installation. The [Quick Start](https://buoy.gg/buoy/latest/docs/quick-start) shows the complete root component setup.
|
|
32
|
+
|
|
15
33
|
## Quick start
|
|
16
34
|
|
|
17
35
|
```tsx
|
|
@@ -29,22 +47,26 @@ export default function App() {
|
|
|
29
47
|
|
|
30
48
|
The IMG tool appears in the menu. Copy a frame in Figma, tap "Paste from Clipboard" (or paste an image URL), and the mockup floats over your live UI.
|
|
31
49
|
|
|
32
|
-
To pin the overlay to a specific component in **Component Mode**, tag it with an `image-target:` testID:
|
|
50
|
+
To pin the overlay to a specific component in **Component Mode**, tag it with an `image-target:` testID. This example uses your existing `handleSignIn` handler and React Native components:
|
|
33
51
|
|
|
34
52
|
```tsx
|
|
35
53
|
<View testID="image-target:LoginCard">
|
|
36
54
|
<TextInput placeholder="Email" />
|
|
37
|
-
<Button title="Sign In" />
|
|
55
|
+
<Button title="Sign In" onPress={handleSignIn} />
|
|
38
56
|
</View>
|
|
39
57
|
```
|
|
40
58
|
|
|
41
59
|
The text after `image-target:` becomes the label in the target list. Your existing testIDs (like `testID="login-button"`) are ignored — only the `image-target:` prefix is scanned.
|
|
42
60
|
|
|
61
|
+
## Check the integration
|
|
62
|
+
|
|
63
|
+
Load a reference image from a direct image URL, adjust its opacity, and align it with a known screen. Clipboard import requires the clipboard dependency described in the full setup guide.
|
|
64
|
+
|
|
43
65
|
## What you get
|
|
44
66
|
|
|
45
67
|
- **Two image sources** — paste straight from the clipboard (Figma copy → paste; requires `expo-clipboard`) or load any image URL (works in bare React Native too)
|
|
46
68
|
- **Component Mode** — scan the app for tagged targets, pick one, and the overlay pins to its exact measured position and size
|
|
47
|
-
- **Auto-track** —
|
|
69
|
+
- **Auto-track** — re-measures the target as the app changes. Check alignment during scrolling and animation on your target device
|
|
48
70
|
- **Free Mode** — drag and pinch the overlay anywhere for full-screen or multi-component comparisons
|
|
49
71
|
- **Opacity blending** — fade the mockup over your live UI to spot the differences instantly
|
|
50
72
|
- **Fine alignment** — scale, X/Y offset, horizontal/vertical flip, and an outline toggle for precise placement
|
|
@@ -52,11 +74,11 @@ The text after `image-target:` becomes the label in the target list. Your existi
|
|
|
52
74
|
|
|
53
75
|
## Desktop & AI
|
|
54
76
|
|
|
55
|
-
|
|
77
|
+
To connect a React Native app to [Buoy Desktop](https://github.com/Buoy-gg/Buoy-Desktop) or MCP, install `@buoy-gg/external-sync` and follow the [Desktop connection guide](https://buoy.gg/buoy/latest/docs/desktop). Sign in to Desktop separately. [MCP setup](https://buoy.gg/buoy/latest/docs/mcp) also requires a process account and Pro access. Available remote actions depend on the tool and app integration.
|
|
56
78
|
|
|
57
|
-
##
|
|
79
|
+
## Account and plan requirements
|
|
58
80
|
|
|
59
|
-
|
|
81
|
+
Use a Free or Pro Buoy account. History limits and paid features vary by tool; see [pricing](https://buoy.gg/pricing). Production access requires Pro where supported. Development-only hooks and actions remain unavailable in release builds.
|
|
60
82
|
|
|
61
83
|
---
|
|
62
84
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buoy-gg/image-overlay",
|
|
3
|
-
"version": "7.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "7.0.38",
|
|
4
|
+
"description": "Overlay a design mockup on a running React Native app and adjust opacity to compare spacing and alignment.",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
7
7
|
"types": "lib/typescript/index.d.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
],
|
|
27
27
|
"sideEffects": false,
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@buoy-gg/shared-ui": "^7.0.
|
|
29
|
+
"@buoy-gg/shared-ui": "^7.0.38"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"react": "*",
|