@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.
- package/README.md +31 -9
- package/package.json +3 -3
- package/register.js +6 -6
package/README.md
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@buoy-gg/images) [](https://www.npmjs.com/package/@buoy-gg/images)
|
|
4
4
|
|
|
5
|
-
|
|
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)
|
|
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
|
+
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
|
|
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** —
|
|
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** —
|
|
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
|
-
|
|
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
|
-
##
|
|
78
|
+
## Account and plan requirements
|
|
57
79
|
|
|
58
|
-
|
|
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.
|
|
4
|
-
"description": "
|
|
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.
|
|
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
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
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("./
|
|
15
|
+
module.exports = require("./lib/module/register");
|