@buoy-gg/images 7.0.36 → 7.0.39

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 (3) hide show
  1. package/README.md +31 -9
  2. package/package.json +3 -3
  3. package/register.js +6 -6
package/README.md CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/@buoy-gg/images?style=flat-square&labelColor=1c1c1c&color=10B981)](https://www.npmjs.com/package/@buoy-gg/images) [![npm downloads](https://img.shields.io/npm/dm/@buoy-gg/images?style=flat-square&labelColor=1c1c1c&color=10B981)](https://www.npmjs.com/package/@buoy-gg/images)
4
4
 
5
- **See every image your app loads — where it came from, how long it took, what it cost, and why it failed.**
5
+ Inspect image loads observed by Buoy’s supported image hooks, including timing, dimensions, and estimated decoded memory.
6
6
 
7
- Part of [Buoy](https://github.com/Buoy-gg/buoy) — devtools that live inside your React Native app. Install it and it auto-appears in the floating menu from [`@buoy-gg/core`](https://www.npmjs.com/package/@buoy-gg/core).
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
- Image HTTP requests never touch the JS network stack — network devtools are permanently blind to them. This tool is the visibility layer: a live registry of every RN `<Image>` and [`expo-image`](https://docs.expo.dev/versions/latest/sdk/image/) load, with cache verdicts, timings, and size auditing. Pure JS — works in Expo Go and release builds.
9
+ Native image loading can bypass JavaScript network capture. This package instruments supported React Native `Image` and `expo-image` paths to provide image-specific details.
10
10
 
11
11
  ## Install
12
12
 
@@ -22,6 +22,24 @@ import "@buoy-gg/images/register";
22
22
 
23
23
  > Why first? RN core's `<Image>` instrumentation uses React Native's official component-decorator hook, which must be installed before the Image module first evaluates. expo-image capture has no such constraint — it works no matter when the tool loads. If you skip the import, the tool tells you what it's missing instead of sitting silently empty.
24
24
 
25
+ ## Before you start
26
+
27
+ Use a development build with `@buoy-gg/core` and a Free or Pro Buoy account key. From your app’s directory, sign in:
28
+
29
+ ```bash
30
+ npx --package=@buoy-gg/core buoy login
31
+ ```
32
+
33
+ For Expo, initialize Buoy before rendering the menu:
34
+
35
+ ```tsx
36
+ import { Buoy } from "@buoy-gg/core";
37
+
38
+ Buoy.init({ licenseKey: process.env.EXPO_PUBLIC_BUOY_KEY });
39
+ ```
40
+
41
+ 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.
42
+
25
43
  ## Quick start
26
44
 
27
45
  ```tsx
@@ -37,22 +55,26 @@ export default function App() {
37
55
  }
38
56
  ```
39
57
 
40
- The IMAGES tool appears in the menu. Open it and browse every image the session has loaded.
58
+ The IMAGES tool appears in the menu. Open it and browse image loads observed during the session.
59
+
60
+ ## Check the integration
61
+
62
+ Load a supported image after the capture hook is installed and inspect the entry. Treat cache results according to the image library’s available signals and decoded memory as an estimate. Native image paths outside those hooks may not appear.
41
63
 
42
64
  ## What you get
43
65
 
44
- - **Live image registry** — every RN `<Image>` and expo-image load: thumbnail, source, status, load time, decoded dimensions
66
+ - **Live image registry** — observed RN `<Image>` and expo-image loads: thumbnail, source, status, load time, decoded dimensions
45
67
  - **Cache verdicts** — memory / disk / network per load (expo-image reports it directly; RN core is classified via `Image.queryCache`)
46
68
  - **Oversize auditing** — decoded size vs displayed size × device pixel ratio, Lighthouse-style: green within 10%, red beyond 50%, with estimated wasted decoded memory and the exact size you should serve
47
69
  - **Memory accounting** — estimated decoded-bitmap bytes per image and totals across the session (catch ballooning before the OOM)
48
- - **Failure log** — every `onError` with the message, and on iOS the HTTP status code + response headers
70
+ - **Failure log** — captured `onError` events with the message, and on iOS the HTTP status code + response headers
49
71
  - **Cache actions** — clear expo-image memory/disk caches from the detail view
50
72
  - **Upscale detection** — tiny sources stretched into big boxes (blurry images) get flagged too
51
73
 
52
74
  ## Desktop & AI
53
75
 
54
- The same live session streams to [Buoy Desktop](https://github.com/Buoy-gg/Buoy-Desktop) (free, macOS/Windows/Linux) and to Claude Code or Cursor via the [Buoy MCP server](https://buoy.gg/buoy/latest/docs/mcp).
76
+ 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.
55
77
 
56
- ## Free vs Pro
78
+ ## Account and plan requirements
57
79
 
58
- Every tool is free. [Pro](https://buoy.gg/pricing) unlocks production builds, the MCP server, and unlimited capture. Every weekend, Pro features unlock free for anyone holding a key — including a free one (`npx buoy login`).
80
+ 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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@buoy-gg/images",
3
- "version": "7.0.36",
4
- "description": "Debug every image in your React Native app — live load registry, cache verdicts (memory/disk/network), timings, oversize + wasted-memory checks, and failure diagnosis for RN <Image> and expo-image. Part of Buoy devtools.",
3
+ "version": "7.0.39",
4
+ "description": "Inspect instrumented React Native Image and expo-image loads, available cache and timing data, failures, and image-size estimates.",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
7
7
  "types": "lib/typescript/index.d.ts",
@@ -17,7 +17,7 @@
17
17
  "**/index.*"
18
18
  ],
19
19
  "dependencies": {
20
- "@buoy-gg/shared-ui": "^7.0.36"
20
+ "@buoy-gg/shared-ui": "^7.0.39"
21
21
  },
22
22
  "peerDependencies": {
23
23
  "expo-image": "*",
package/register.js CHANGED
@@ -6,10 +6,10 @@
6
6
  * module evaluates. Works with and without package `exports` resolution
7
7
  * (e.g. Metro `unstable_enablePackageExports: false`).
8
8
  *
9
- * Resolves to src (Metro transpiles TS in node_modules) so it shares ONE
10
- * module instance with the package root import, which also resolves to src
11
- * via the "react-native" main field — a lib-pointing shim would create a
12
- * second copy of the capture layer and split the decorator from the store.
13
- * Capture state is additionally globalThis-keyed as a second line of defense.
9
+ * Resolves to lib/module, the same tree the package root resolves to through
10
+ * the "react-native" field, so it shares ONE module instance with the root
11
+ * import. (`src/` is not published; a src-pointing shim would fail to resolve
12
+ * in an installed app.) Capture state is additionally globalThis-keyed as a
13
+ * second line of defense.
14
14
  */
15
- module.exports = require("./src/register");
15
+ module.exports = require("./lib/module/register");