@buoy-gg/image-overlay 7.0.40 → 7.0.42
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 +12 -72
- package/lib/commonjs/imageOverlay/components/ImageOverlayModal.js +1 -875
- package/lib/commonjs/imageOverlay/components/ImageOverlayStandalone.js +1 -456
- package/lib/commonjs/imageOverlay/components/OverlayControls.js +1 -253
- package/lib/commonjs/imageOverlay/components/TargetList.js +1 -181
- package/lib/commonjs/imageOverlay/types/index.js +1 -1
- package/lib/commonjs/imageOverlay/utils/ImageOverlayController.js +1 -393
- package/lib/commonjs/imageOverlay/utils/componentMeasurement.js +1 -106
- package/lib/commonjs/imageOverlay/utils/devtoolsHook.js +1 -36
- package/lib/commonjs/imageOverlay/utils/fiberScanner.js +1 -102
- package/lib/commonjs/imageOverlay/utils/imageClipboard.js +1 -0
- package/lib/commonjs/imageOverlay/utils/imageClipboard.web.js +1 -0
- package/lib/commonjs/index.js +1 -59
- package/lib/commonjs/preset.js +1 -42
- package/lib/module/imageOverlay/components/ImageOverlayModal.js +1 -870
- package/lib/module/imageOverlay/components/ImageOverlayStandalone.js +1 -452
- package/lib/module/imageOverlay/components/OverlayControls.js +1 -249
- package/lib/module/imageOverlay/components/TargetList.js +1 -177
- package/lib/module/imageOverlay/types/index.js +1 -1
- package/lib/module/imageOverlay/utils/ImageOverlayController.js +1 -389
- package/lib/module/imageOverlay/utils/componentMeasurement.js +1 -102
- package/lib/module/imageOverlay/utils/devtoolsHook.js +1 -31
- package/lib/module/imageOverlay/utils/fiberScanner.js +1 -98
- package/lib/module/imageOverlay/utils/imageClipboard.js +1 -0
- package/lib/module/imageOverlay/utils/imageClipboard.web.js +1 -0
- package/lib/module/index.js +1 -35
- package/lib/module/preset.js +1 -38
- package/lib/typescript/imageOverlay/utils/imageClipboard.d.ts +3 -0
- package/lib/typescript/imageOverlay/utils/imageClipboard.web.d.ts +9 -0
- package/lib/web/index.mjs +4 -0
- package/package.json +32 -10
- package/lib/typescript/imageOverlay/components/ImageOverlayModal.d.ts.map +0 -1
- package/lib/typescript/imageOverlay/components/ImageOverlayStandalone.d.ts.map +0 -1
- package/lib/typescript/imageOverlay/components/OverlayControls.d.ts.map +0 -1
- package/lib/typescript/imageOverlay/components/TargetList.d.ts.map +0 -1
- package/lib/typescript/imageOverlay/types/index.d.ts.map +0 -1
- package/lib/typescript/imageOverlay/utils/ImageOverlayController.d.ts.map +0 -1
- package/lib/typescript/imageOverlay/utils/componentMeasurement.d.ts.map +0 -1
- package/lib/typescript/imageOverlay/utils/devtoolsHook.d.ts.map +0 -1
- package/lib/typescript/imageOverlay/utils/fiberScanner.d.ts.map +0 -1
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/preset.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -1,87 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# @buoy-gg/image-overlay
|
|
4
4
|
|
|
5
|
-
Place a reference image over your app to compare spacing, alignment
|
|
5
|
+
Place a reference image over your app to compare spacing, alignment and sizing on the device.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
<a href="https://buoy.gg/buoy/latest/docs/tools/image-overlay"><b>Overlay guide</b></a> · <a href="https://buoy.gg">buoy.gg</a> · <a href="https://github.com/Buoy-gg/buoy">All tools</a>
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
[](https://www.npmjs.com/package/@buoy-gg/image-overlay) [](https://www.npmjs.com/package/@buoy-gg/image-overlay)
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
npm install @buoy-gg/core @buoy-gg/image-overlay
|
|
13
|
-
```
|
|
11
|
+
<a href="https://buoy.gg/buoy/latest/docs/tools/image-overlay"><img src="https://raw.githubusercontent.com/Buoy-gg/buoy/main/.github/readme/tools/image-overlay.png" alt="Watch the Overlay film on buoy.gg" width="640" /></a>
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
</div>
|
|
16
14
|
|
|
17
|
-
|
|
15
|
+
## Install
|
|
18
16
|
|
|
19
17
|
```bash
|
|
20
|
-
|
|
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
|
-
|
|
33
|
-
## Quick start
|
|
34
|
-
|
|
35
|
-
```tsx
|
|
36
|
-
import { FloatingDevTools } from "@buoy-gg/core";
|
|
37
|
-
|
|
38
|
-
export default function App() {
|
|
39
|
-
return (
|
|
40
|
-
<>
|
|
41
|
-
<YourApp />
|
|
42
|
-
<FloatingDevTools />
|
|
43
|
-
</>
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
```
|
|
47
|
-
|
|
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.
|
|
49
|
-
|
|
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:
|
|
51
|
-
|
|
52
|
-
```tsx
|
|
53
|
-
<View testID="image-target:LoginCard">
|
|
54
|
-
<TextInput placeholder="Email" />
|
|
55
|
-
<Button title="Sign In" onPress={handleSignIn} />
|
|
56
|
-
</View>
|
|
18
|
+
npm install @buoy-gg/core @buoy-gg/image-overlay
|
|
57
19
|
```
|
|
58
20
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
## Check the integration
|
|
21
|
+
Copy a frame in Figma, paste it into the tool, and the mockup floats over your running UI.
|
|
62
22
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
## What you get
|
|
66
|
-
|
|
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)
|
|
68
|
-
- **Component Mode** — scan the app for tagged targets, pick one, and the overlay pins to its exact measured position and size
|
|
69
|
-
- **Auto-track** — re-measures the target as the app changes. Check alignment during scrolling and animation on your target device
|
|
70
|
-
- **Free Mode** — drag and pinch the overlay anywhere for full-screen or multi-component comparisons
|
|
71
|
-
- **Opacity blending** — fade the mockup over your live UI to spot the differences instantly
|
|
72
|
-
- **Fine alignment** — scale, X/Y offset, horizontal/vertical flip, and an outline toggle for precise placement
|
|
73
|
-
- **Lock** — freeze position so you don't nudge it mid-comparison
|
|
74
|
-
|
|
75
|
-
## Desktop & AI
|
|
76
|
-
|
|
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.
|
|
78
|
-
|
|
79
|
-
## Account and plan requirements
|
|
80
|
-
|
|
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.
|
|
23
|
+
The [Overlay guide](https://buoy.gg/buoy/latest/docs/tools/image-overlay) covers setup, what it captures and its limits. New to Buoy? Start with the [Quick start](https://buoy.gg/buoy/latest/docs/quick-start).
|
|
82
24
|
|
|
83
25
|
---
|
|
84
26
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
Proprietary software. © Buoy LLC. [Terms](https://buoy.gg/terms)
|
|
27
|
+
<sub>Part of <a href="https://buoy.gg">Buoy</a>, developer tools that live inside your app. Proprietary software. © Buoy LLC. <a href="https://buoy.gg/terms">Terms</a></sub>
|