@buoy-gg/image-overlay 7.0.41 → 7.0.43

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.
Files changed (42) hide show
  1. package/README.md +12 -76
  2. package/lib/commonjs/imageOverlay/components/ImageOverlayModal.js +1 -880
  3. package/lib/commonjs/imageOverlay/components/ImageOverlayStandalone.js +1 -463
  4. package/lib/commonjs/imageOverlay/components/OverlayControls.js +1 -253
  5. package/lib/commonjs/imageOverlay/components/TargetList.js +1 -181
  6. package/lib/commonjs/imageOverlay/types/index.js +1 -1
  7. package/lib/commonjs/imageOverlay/utils/ImageOverlayController.js +1 -426
  8. package/lib/commonjs/imageOverlay/utils/componentMeasurement.js +1 -106
  9. package/lib/commonjs/imageOverlay/utils/devtoolsHook.js +1 -36
  10. package/lib/commonjs/imageOverlay/utils/fiberScanner.js +1 -104
  11. package/lib/commonjs/imageOverlay/utils/imageClipboard.js +1 -22
  12. package/lib/commonjs/imageOverlay/utils/imageClipboard.web.js +1 -44
  13. package/lib/commonjs/index.js +1 -59
  14. package/lib/commonjs/preset.js +1 -42
  15. package/lib/module/imageOverlay/components/ImageOverlayModal.js +1 -875
  16. package/lib/module/imageOverlay/components/ImageOverlayStandalone.js +1 -459
  17. package/lib/module/imageOverlay/components/OverlayControls.js +1 -249
  18. package/lib/module/imageOverlay/components/TargetList.js +1 -177
  19. package/lib/module/imageOverlay/types/index.js +1 -1
  20. package/lib/module/imageOverlay/utils/ImageOverlayController.js +1 -422
  21. package/lib/module/imageOverlay/utils/componentMeasurement.js +1 -102
  22. package/lib/module/imageOverlay/utils/devtoolsHook.js +1 -31
  23. package/lib/module/imageOverlay/utils/fiberScanner.js +1 -100
  24. package/lib/module/imageOverlay/utils/imageClipboard.js +1 -17
  25. package/lib/module/imageOverlay/utils/imageClipboard.web.js +1 -39
  26. package/lib/module/index.js +1 -35
  27. package/lib/module/preset.js +1 -38
  28. package/lib/web/index.mjs +4 -5
  29. package/package.json +3 -6
  30. package/lib/typescript/imageOverlay/components/ImageOverlayModal.d.ts.map +0 -1
  31. package/lib/typescript/imageOverlay/components/ImageOverlayStandalone.d.ts.map +0 -1
  32. package/lib/typescript/imageOverlay/components/OverlayControls.d.ts.map +0 -1
  33. package/lib/typescript/imageOverlay/components/TargetList.d.ts.map +0 -1
  34. package/lib/typescript/imageOverlay/types/index.d.ts.map +0 -1
  35. package/lib/typescript/imageOverlay/utils/ImageOverlayController.d.ts.map +0 -1
  36. package/lib/typescript/imageOverlay/utils/componentMeasurement.d.ts.map +0 -1
  37. package/lib/typescript/imageOverlay/utils/devtoolsHook.d.ts.map +0 -1
  38. package/lib/typescript/imageOverlay/utils/fiberScanner.d.ts.map +0 -1
  39. package/lib/typescript/imageOverlay/utils/imageClipboard.d.ts.map +0 -1
  40. package/lib/typescript/imageOverlay/utils/imageClipboard.web.d.ts.map +0 -1
  41. package/lib/typescript/index.d.ts.map +0 -1
  42. package/lib/typescript/preset.d.ts.map +0 -1
package/README.md CHANGED
@@ -1,91 +1,27 @@
1
- # @buoy-gg/image-overlay
1
+ <div align="center">
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/@buoy-gg/image-overlay?style=flat-square&labelColor=1c1c1c&color=10B981)](https://www.npmjs.com/package/@buoy-gg/image-overlay) [![npm downloads](https://img.shields.io/npm/dm/@buoy-gg/image-overlay?style=flat-square&labelColor=1c1c1c&color=10B981)](https://www.npmjs.com/package/@buoy-gg/image-overlay)
3
+ # @buoy-gg/image-overlay
4
4
 
5
- Place a reference image over your app to compare spacing, alignment, and sizing on the device.
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). Install the package, complete account setup, and follow the integration steps below.
7
+ <a href="https://buoy.gg/buoy/latest/docs/tools/image-overlay"><b>Overlay guide</b></a> &nbsp;·&nbsp; <a href="https://buoy.gg">buoy.gg</a> &nbsp;·&nbsp; <a href="https://github.com/Buoy-gg/buoy">All tools</a>
8
8
 
9
- ## Install
9
+ [![npm version](https://img.shields.io/npm/v/@buoy-gg/image-overlay?style=flat-square&labelColor=10302a&color=2a9d78)](https://www.npmjs.com/package/@buoy-gg/image-overlay) [![npm downloads](https://img.shields.io/npm/dm/@buoy-gg/image-overlay?style=flat-square&labelColor=10302a&color=2a9d78&label=downloads%2Fmonth)](https://www.npmjs.com/package/@buoy-gg/image-overlay)
10
10
 
11
- ```bash
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
- ## Before you start
13
+ </div>
16
14
 
17
- Use a development build with `@buoy-gg/core` and a Free or Pro Buoy account key. From your app’s directory, sign in:
15
+ ## Install
18
16
 
19
17
  ```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
-
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
- 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.
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
-
65
- ## What you get
21
+ Copy a frame in Figma, paste it into the tool, and the mockup floats over your running UI.
66
22
 
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
- 📚 [Full docs](https://buoy.gg/buoy/latest/docs/tools/image-overlay) · [All Buoy tools](https://github.com/Buoy-gg/buoy)
86
-
87
- Proprietary software. © Buoy LLC. [Terms](https://buoy.gg/terms)
88
-
89
- ## Web support (unreleased)
90
-
91
- Tag browser targets with data-testid="image-target:Name" and import the browser registration before React DOM. The shared controls support target and free placement. The browser build is available in this checkout and has not been published yet. See the [web setup guide](https://buoy.gg/buoy/latest/docs/web-preview) for registration, dependencies, and browser boundaries.
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>