@buoy-gg/jotai 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 CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/@buoy-gg/jotai?style=flat-square&labelColor=1c1c1c&color=10B981)](https://www.npmjs.com/package/@buoy-gg/jotai) [![npm downloads](https://img.shields.io/npm/dm/@buoy-gg/jotai?style=flat-square&labelColor=1c1c1c&color=10B981)](https://www.npmjs.com/package/@buoy-gg/jotai)
4
4
 
5
- **Jotai devtools on the device — every atom write shows `prev → next`, with per-atom history and live values.**
5
+ Inspect registered Jotai atoms and their captured changes, with live values and per-atom history.
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
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/jotai
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
  One `watchAtoms(store, atoms)` call at module scope — pass your Jotai store and a named map of atoms. No wrappers, no `atomWithDevTools`, no changes to existing atoms; observation is subscribe-only.
@@ -33,12 +51,21 @@ watchAtoms(getDefaultStore(), {
33
51
  Using a `<Provider>` with a custom store? Pass it instead:
34
52
 
35
53
  ```tsx
54
+ import { createStore, Provider } from "jotai";
55
+
36
56
  const myStore = createStore();
37
57
  watchAtoms(myStore, { countAtom, authAtom });
58
+
59
+ // Use this same store in the provider around your app and Buoy menu.
60
+ <Provider store={myStore}>{/* Existing app and FloatingDevTools */}</Provider>;
38
61
  ```
39
62
 
40
63
  Registered atoms appear in the Jotai tool inside the floating menu.
41
64
 
65
+ ## Check the integration
66
+
67
+ Change a registered atom through your app and inspect its history. Use the same store as your Jotai provider. Whether an atom can be edited depends on whether it is writable; a derived atom can also be writable.
68
+
42
69
  ## What you get
43
70
 
44
71
  - **`prev → next` on every event** — see `0 → 5` or `null → {name, email}` at a glance, no tapping in for simple updates
@@ -52,11 +79,11 @@ Registered atoms appear in the Jotai tool inside the floating menu.
52
79
 
53
80
  ## Desktop & AI
54
81
 
55
- 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).
82
+ 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
83
 
57
- ## Free vs Pro
84
+ ## Account and plan requirements
58
85
 
59
- 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`).
86
+ 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
87
 
61
88
  ---
62
89
 
@@ -58,7 +58,9 @@ function useJotaiAtomChanges() {
58
58
  setFilter: log.setFilter,
59
59
  stats,
60
60
  atoms,
61
- clearChanges: log.clear,
61
+ // Not the shared log.clear: the store also owns each atom's change
62
+ // count, and only clearAtomChanges resets those with the list.
63
+ clearChanges: _jotaiStateStore.jotaiStateStore.clearAtomChanges.bind(_jotaiStateStore.jotaiStateStore),
62
64
  isEnabled: log.isEnabled,
63
65
  toggleCapture: log.toggleCapture,
64
66
  atomLabels,
@@ -54,7 +54,9 @@ export function useJotaiAtomChanges() {
54
54
  setFilter: log.setFilter,
55
55
  stats,
56
56
  atoms,
57
- clearChanges: log.clear,
57
+ // Not the shared log.clear: the store also owns each atom's change
58
+ // count, and only clearAtomChanges resets those with the list.
59
+ clearChanges: jotaiStateStore.clearAtomChanges.bind(jotaiStateStore),
58
60
  isEnabled: log.isEnabled,
59
61
  toggleCapture: log.toggleCapture,
60
62
  atomLabels,
@@ -1 +1 @@
1
- {"version":3,"file":"useJotaiAtomChanges.d.ts","sourceRoot":"","sources":["../../../../src/jotai/hooks/useJotaiAtomChanges.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAG5E,MAAM,WAAW,yBAAyB;IACxC,gCAAgC;IAChC,WAAW,EAAE,eAAe,EAAE,CAAC;IAC/B,+CAA+C;IAC/C,eAAe,EAAE,eAAe,EAAE,CAAC;IACnC,8BAA8B;IAC9B,MAAM,EAAE,WAAW,CAAC;IACpB,6BAA6B;IAC7B,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,CAAC;IAC7D,wCAAwC;IACxC,KAAK,EAAE;QACL,YAAY,EA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C;IACjC,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,iCAAiC;IACjC,SAAS,EAAE,OAAO,CAAC;IACnB,4BAA4B;IAC5B,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,6BAA6B;IAC7B,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,uBAAuB;IACvB,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,eAAe,GAAG,SAAS,CAAC;CAC5D;AA8BD,wBAAgB,mBAAmB,IAAI,yBAAyB,CAwC/D"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@buoy-gg/jotai",
3
- "version": "7.0.36",
4
- "description": "Jotai devtools inside your React Native app — every atom write shows prev → next, with per-atom history & live values. Part of Buoy devtools.",
3
+ "version": "7.0.39",
4
+ "description": "Inspect registered Jotai atoms, observed writes, retained history and current values in a React Native app.",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
7
7
  "types": "lib/typescript/index.d.ts",
@@ -29,8 +29,8 @@
29
29
  "**/snapshotProvider.ts"
30
30
  ],
31
31
  "dependencies": {
32
- "@buoy-gg/license": "^7.0.36",
33
- "@buoy-gg/shared-ui": "^7.0.36"
32
+ "@buoy-gg/shared-ui": "^7.0.39",
33
+ "@buoy-gg/license": "^7.0.39"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "jotai": ">=2.0.0",