@buoy-gg/jotai 2.1.10 → 2.1.11

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/lib/commonjs/index.js +91 -1
  2. package/lib/commonjs/jotai/components/JotaiAtomBrowser.js +300 -1
  3. package/lib/commonjs/jotai/components/JotaiAtomChangeItem.js +113 -1
  4. package/lib/commonjs/jotai/components/JotaiAtomDetailContent.js +754 -1
  5. package/lib/commonjs/jotai/components/JotaiEventFilterView.js +305 -1
  6. package/lib/commonjs/jotai/components/JotaiIcon.js +35 -1
  7. package/lib/commonjs/jotai/components/JotaiModal.js +567 -1
  8. package/lib/commonjs/jotai/components/index.js +59 -1
  9. package/lib/commonjs/jotai/hooks/useJotaiAtomChanges.js +83 -1
  10. package/lib/commonjs/jotai/index.js +85 -1
  11. package/lib/commonjs/jotai/utils/jotaiStateStore.js +322 -1
  12. package/lib/commonjs/jotai/utils/watchAtoms.js +149 -1
  13. package/lib/commonjs/preset.js +98 -1
  14. package/lib/module/index.js +74 -1
  15. package/lib/module/jotai/components/JotaiAtomBrowser.js +296 -1
  16. package/lib/module/jotai/components/JotaiAtomChangeItem.js +109 -1
  17. package/lib/module/jotai/components/JotaiAtomDetailContent.js +748 -1
  18. package/lib/module/jotai/components/JotaiEventFilterView.js +301 -1
  19. package/lib/module/jotai/components/JotaiIcon.js +31 -1
  20. package/lib/module/jotai/components/JotaiModal.js +563 -1
  21. package/lib/module/jotai/components/index.js +8 -1
  22. package/lib/module/jotai/hooks/useJotaiAtomChanges.js +79 -1
  23. package/lib/module/jotai/index.js +10 -1
  24. package/lib/module/jotai/utils/jotaiStateStore.js +318 -1
  25. package/lib/module/jotai/utils/watchAtoms.js +144 -1
  26. package/lib/module/preset.js +94 -1
  27. package/lib/typescript/index.d.ts.map +1 -0
  28. package/lib/typescript/jotai/components/JotaiAtomBrowser.d.ts.map +1 -0
  29. package/lib/typescript/jotai/components/JotaiAtomChangeItem.d.ts.map +1 -0
  30. package/lib/typescript/jotai/components/JotaiAtomDetailContent.d.ts.map +1 -0
  31. package/lib/typescript/jotai/components/JotaiEventFilterView.d.ts.map +1 -0
  32. package/lib/typescript/jotai/components/JotaiIcon.d.ts.map +1 -0
  33. package/lib/typescript/jotai/components/JotaiModal.d.ts.map +1 -0
  34. package/lib/typescript/jotai/components/index.d.ts.map +1 -0
  35. package/lib/typescript/jotai/hooks/useJotaiAtomChanges.d.ts.map +1 -0
  36. package/lib/typescript/jotai/index.d.ts.map +1 -0
  37. package/lib/typescript/jotai/types/index.d.ts.map +1 -0
  38. package/lib/typescript/jotai/utils/jotaiStateStore.d.ts.map +1 -0
  39. package/lib/typescript/jotai/utils/watchAtoms.d.ts.map +1 -0
  40. package/lib/typescript/preset.d.ts.map +1 -0
  41. package/package.json +10 -10
  42. package/LICENSE +0 -58
@@ -1 +1,318 @@
1
- "use strict";const ATOM_COLORS={count:"#10B981",auth:"#8B5CF6",user:"#3B82F6",cart:"#EC4899",app:"#6366F1",ui:"#F59E0B",settings:"#14B8A6",theme:"#06B6D4",nav:"#F97316",form:"#EF4444",modal:"#A855F7",filter:"#84CC16"};function getAtomColor(t){const e=t.toLowerCase();if(ATOM_COLORS[e])return ATOM_COLORS[e];for(const[t,s]of Object.entries(ATOM_COLORS))if(e.includes(t))return s;const s=137*t.split("").reduce((t,e)=>t+e.charCodeAt(0),0)%360,n=.7*(1-Math.abs(1.2-1)),a=n*(1-Math.abs(s/60%2-1)),o=.6-n/2;let r=0,i=0,h=0;s<60?(r=n,i=a):s<120?(r=a,i=n):s<180?(i=n,h=a):s<240?(i=a,h=n):s<300?(r=a,h=n):(r=n,h=a);const l=t=>Math.round(255*(t+o)).toString(16).padStart(2,"0");return`#${l(r)}${l(i)}${l(h)}`}function formatValuePreview(t,e=40){if(void 0===t)return"undefined";if(null===t)return"null";try{if("function"==typeof t)return"(fn)";if("string"==typeof t)return t.length>e?`"${t.slice(0,e-3)}..."`:`"${t}"`;if("number"==typeof t||"boolean"==typeof t)return String(t);if(Array.isArray(t)){if(0===t.length)return"[]";const s=JSON.stringify(t);return s.length>e?`[${t.length} items]`:s}if("object"==typeof t){const s=Object.keys(t);if(0===s.length)return"{}";const n=JSON.stringify(t);return n.length<=e?n:`{ ${s.length} keys }`}return String(t).slice(0,e)}catch{return"[complex]"}}function getValueDiffSummary(t,e){if(t===e)return{summary:"no change",changedKeys:[],changedCount:0};if("object"!=typeof t||"object"!=typeof e||null===t||null===e)return{summary:"changed",changedKeys:[],changedCount:0};const s=Object.keys(t),n=Object.keys(e),a=n.filter(t=>!s.includes(t)),o=s.filter(t=>!n.includes(t)),r=[];for(const a of s)n.includes(a)&&t[a]!==e[a]&&r.push(a);const i=[...a,...o,...r],h=[];a.length>0&&h.push(`+${a.length}`),o.length>0&&h.push(`-${o.length}`),r.length>0&&h.push(`~${r.length}`);const l=i.length;return 0===h.length?{summary:"nested change",changedKeys:[],changedCount:0}:{summary:`${h.join(" ")} ${1===l?"key":"keys"}`,changedKeys:i,changedCount:l}}class JotaiStateStore{atomChanges=[];atoms=new Map;listeners=new Set;atomListeners=new Set;maxChanges=200;idCounter=0;isEnabled=!0;addAtomChange(t){if(!this.isEnabled)return;const{atomLabel:e,prevValue:s,nextValue:n,category:a="write"}=t,o=s!==n,{summary:r,changedKeys:i,changedCount:h}=getValueDiffSummary(s,n),l=formatValuePreview(n),u={id:`${Date.now()}-${++this.idCounter}`,atomLabel:e,timestamp:Date.now(),prevValue:s,nextValue:n,hasValueChange:o,category:a,changedKeys:i,changedKeysCount:h,diffSummary:r,valuePreview:l,isSlowUpdate:!1};this.atomChanges=[u,...this.atomChanges].slice(0,this.maxChanges);const g=this.atoms.get(e);g&&g.changeCount++,this.notifyListeners(),this.notifyAtomListeners()}getAtomChanges(){return[...this.atomChanges]}getAtomChangeById(t){return this.atomChanges.find(e=>e.id===t)}clearAtomChanges(){this.atomChanges=[];for(const t of this.atoms.values())t.changeCount=0;this.notifyListeners(),this.notifyAtomListeners()}registerAtom(t,e){if(this.atoms.has(t))return;const s={label:t,changeCount:0,color:getAtomColor(t),getValue:e};this.atoms.set(t,s),this.notifyAtomListeners()}unregisterAtom(t){this.atoms.delete(t),this.notifyAtomListeners()}getAtoms(){return Array.from(this.atoms.values())}getAtom(t){return this.atoms.get(t)}getAtomColor(t){return this.atoms.get(t)?.color??getAtomColor(t)}filterAtomChanges(t){let e=[...this.atomChanges];if(t.searchText){const s=t.searchText.toLowerCase();e=e.filter(t=>t.atomLabel.toLowerCase().includes(s)||t.valuePreview.toLowerCase().includes(s)||t.changedKeys.some(t=>t.toLowerCase().includes(s)))}return t.atomLabels&&t.atomLabels.length>0&&(e=e.filter(e=>t.atomLabels.includes(e.atomLabel))),t.onlyWithChanges&&(e=e.filter(t=>t.hasValueChange)),e}getStats(){const t=this.atomChanges.length,e=this.atomChanges.filter(t=>t.hasValueChange).length;return{totalChanges:t,changesWithValueChange:e,changesWithoutValueChange:t-e,atomCount:this.atoms.size}}getUniqueAtomLabels(){return Array.from(this.atoms.keys()).sort()}setEnabled(t){this.isEnabled=t}getEnabled(){return this.isEnabled}setMaxChanges(t){this.maxChanges=t,this.atomChanges.length>t&&(this.atomChanges=this.atomChanges.slice(0,t),this.notifyListeners())}subscribe(t){return this.listeners.add(t),()=>this.listeners.delete(t)}subscribeToAtoms(t){return this.atomListeners.add(t),()=>this.atomListeners.delete(t)}notifyListeners(){const t=this.getAtomChanges();this.listeners.forEach(e=>e(t))}notifyAtomListeners(){const t=this.getAtoms();this.atomListeners.forEach(e=>e(t))}}export const jotaiStateStore=new JotaiStateStore;
1
+ "use strict";
2
+
3
+ /**
4
+ * Jotai state store — captures and stores Jotai atom changes
5
+ *
6
+ * Mirrors the architecture of zustandStateStore.ts from @buoy-gg/zustand
7
+ */
8
+
9
+ // ============================================
10
+ // Atom Color Palette
11
+ // ============================================
12
+
13
+ const ATOM_COLORS = {
14
+ count: "#10B981",
15
+ // emerald
16
+ auth: "#8B5CF6",
17
+ // purple
18
+ user: "#3B82F6",
19
+ // blue
20
+ cart: "#EC4899",
21
+ // pink
22
+ app: "#6366F1",
23
+ // indigo
24
+ ui: "#F59E0B",
25
+ // amber
26
+ settings: "#14B8A6",
27
+ // teal
28
+ theme: "#06B6D4",
29
+ // cyan
30
+ nav: "#F97316",
31
+ // orange
32
+ form: "#EF4444",
33
+ // red
34
+ modal: "#A855F7",
35
+ // violet
36
+ filter: "#84CC16" // lime
37
+ };
38
+ function getAtomColor(label) {
39
+ const lower = label.toLowerCase();
40
+ if (ATOM_COLORS[lower]) return ATOM_COLORS[lower];
41
+ for (const [key, color] of Object.entries(ATOM_COLORS)) {
42
+ if (lower.includes(key)) return color;
43
+ }
44
+
45
+ // Generate consistent hex from name hash
46
+ const hash = label.split("").reduce((acc, char) => acc + char.charCodeAt(0), 0);
47
+ const hue = hash * 137 % 360;
48
+ const s = 0.7;
49
+ const l = 0.6;
50
+ const c = (1 - Math.abs(2 * l - 1)) * s;
51
+ const x = c * (1 - Math.abs(hue / 60 % 2 - 1));
52
+ const m = l - c / 2;
53
+ let r = 0,
54
+ g = 0,
55
+ b = 0;
56
+ if (hue < 60) {
57
+ r = c;
58
+ g = x;
59
+ } else if (hue < 120) {
60
+ r = x;
61
+ g = c;
62
+ } else if (hue < 180) {
63
+ g = c;
64
+ b = x;
65
+ } else if (hue < 240) {
66
+ g = x;
67
+ b = c;
68
+ } else if (hue < 300) {
69
+ r = x;
70
+ b = c;
71
+ } else {
72
+ r = c;
73
+ b = x;
74
+ }
75
+ const toHex = v => Math.round((v + m) * 255).toString(16).padStart(2, "0");
76
+ return `#${toHex(r)}${toHex(g)}${toHex(b)}`;
77
+ }
78
+
79
+ // ============================================
80
+ // Helper Functions
81
+ // ============================================
82
+
83
+ function formatValuePreview(value, maxLength = 40) {
84
+ if (value === undefined) return "undefined";
85
+ if (value === null) return "null";
86
+ try {
87
+ if (typeof value === "function") return "(fn)";
88
+ if (typeof value === "string") {
89
+ return value.length > maxLength ? `"${value.slice(0, maxLength - 3)}..."` : `"${value}"`;
90
+ }
91
+ if (typeof value === "number" || typeof value === "boolean") {
92
+ return String(value);
93
+ }
94
+ if (Array.isArray(value)) {
95
+ if (value.length === 0) return "[]";
96
+ const preview = JSON.stringify(value);
97
+ return preview.length > maxLength ? `[${value.length} items]` : preview;
98
+ }
99
+ if (typeof value === "object") {
100
+ const keys = Object.keys(value);
101
+ if (keys.length === 0) return "{}";
102
+ const preview = JSON.stringify(value);
103
+ if (preview.length <= maxLength) return preview;
104
+ return `{ ${keys.length} keys }`;
105
+ }
106
+ return String(value).slice(0, maxLength);
107
+ } catch {
108
+ return "[complex]";
109
+ }
110
+ }
111
+ function getValueDiffSummary(prevValue, nextValue) {
112
+ if (prevValue === nextValue) {
113
+ return {
114
+ summary: "no change",
115
+ changedKeys: [],
116
+ changedCount: 0
117
+ };
118
+ }
119
+ if (typeof prevValue !== "object" || typeof nextValue !== "object" || prevValue === null || nextValue === null) {
120
+ return {
121
+ summary: "changed",
122
+ changedKeys: [],
123
+ changedCount: 0
124
+ };
125
+ }
126
+ const prevKeys = Object.keys(prevValue);
127
+ const nextKeys = Object.keys(nextValue);
128
+ const added = nextKeys.filter(k => !prevKeys.includes(k));
129
+ const removed = prevKeys.filter(k => !nextKeys.includes(k));
130
+ const changed = [];
131
+ for (const key of prevKeys) {
132
+ if (nextKeys.includes(key) && prevValue[key] !== nextValue[key]) {
133
+ changed.push(key);
134
+ }
135
+ }
136
+ const allChangedKeys = [...added, ...removed, ...changed];
137
+ const parts = [];
138
+ if (added.length > 0) parts.push(`+${added.length}`);
139
+ if (removed.length > 0) parts.push(`-${removed.length}`);
140
+ if (changed.length > 0) parts.push(`~${changed.length}`);
141
+ const total = allChangedKeys.length;
142
+ if (parts.length === 0) {
143
+ return {
144
+ summary: "nested change",
145
+ changedKeys: [],
146
+ changedCount: 0
147
+ };
148
+ }
149
+ return {
150
+ summary: `${parts.join(" ")} ${total === 1 ? "key" : "keys"}`,
151
+ changedKeys: allChangedKeys,
152
+ changedCount: total
153
+ };
154
+ }
155
+
156
+ // ============================================
157
+ // Jotai State Store
158
+ // ============================================
159
+
160
+ class JotaiStateStore {
161
+ atomChanges = [];
162
+ atoms = new Map();
163
+ listeners = new Set();
164
+ atomListeners = new Set();
165
+ maxChanges = 200;
166
+ idCounter = 0;
167
+ isEnabled = true;
168
+
169
+ // ---- Change Tracking ----
170
+
171
+ addAtomChange(params) {
172
+ if (!this.isEnabled) return;
173
+ const {
174
+ atomLabel,
175
+ prevValue,
176
+ nextValue,
177
+ category = "write"
178
+ } = params;
179
+ const hasValueChange = prevValue !== nextValue;
180
+ const {
181
+ summary,
182
+ changedKeys,
183
+ changedCount
184
+ } = getValueDiffSummary(prevValue, nextValue);
185
+ const valuePreview = formatValuePreview(nextValue);
186
+ const change = {
187
+ id: `${Date.now()}-${++this.idCounter}`,
188
+ atomLabel,
189
+ timestamp: Date.now(),
190
+ prevValue,
191
+ nextValue,
192
+ hasValueChange,
193
+ category,
194
+ changedKeys,
195
+ changedKeysCount: changedCount,
196
+ diffSummary: summary,
197
+ valuePreview,
198
+ isSlowUpdate: false
199
+ };
200
+ this.atomChanges = [change, ...this.atomChanges].slice(0, this.maxChanges);
201
+ const atomInfo = this.atoms.get(atomLabel);
202
+ if (atomInfo) {
203
+ atomInfo.changeCount++;
204
+ }
205
+ this.notifyListeners();
206
+ this.notifyAtomListeners();
207
+ }
208
+ getAtomChanges() {
209
+ return [...this.atomChanges];
210
+ }
211
+ getAtomChangeById(id) {
212
+ return this.atomChanges.find(c => c.id === id);
213
+ }
214
+ clearAtomChanges() {
215
+ this.atomChanges = [];
216
+ for (const atom of this.atoms.values()) {
217
+ atom.changeCount = 0;
218
+ }
219
+ this.notifyListeners();
220
+ this.notifyAtomListeners();
221
+ }
222
+
223
+ // ---- Atom Registry ----
224
+
225
+ registerAtom(label, getValue) {
226
+ if (this.atoms.has(label)) return;
227
+ const atomInfo = {
228
+ label,
229
+ changeCount: 0,
230
+ color: getAtomColor(label),
231
+ getValue
232
+ };
233
+ this.atoms.set(label, atomInfo);
234
+ this.notifyAtomListeners();
235
+ }
236
+ unregisterAtom(label) {
237
+ this.atoms.delete(label);
238
+ this.notifyAtomListeners();
239
+ }
240
+ getAtoms() {
241
+ return Array.from(this.atoms.values());
242
+ }
243
+ getAtom(label) {
244
+ return this.atoms.get(label);
245
+ }
246
+ getAtomColor(label) {
247
+ return this.atoms.get(label)?.color ?? getAtomColor(label);
248
+ }
249
+
250
+ // ---- Filtering ----
251
+
252
+ filterAtomChanges(filter) {
253
+ let filtered = [...this.atomChanges];
254
+ if (filter.searchText) {
255
+ const search = filter.searchText.toLowerCase();
256
+ filtered = filtered.filter(c => c.atomLabel.toLowerCase().includes(search) || c.valuePreview.toLowerCase().includes(search) || c.changedKeys.some(k => k.toLowerCase().includes(search)));
257
+ }
258
+ if (filter.atomLabels && filter.atomLabels.length > 0) {
259
+ filtered = filtered.filter(c => filter.atomLabels.includes(c.atomLabel));
260
+ }
261
+ if (filter.onlyWithChanges) {
262
+ filtered = filtered.filter(c => c.hasValueChange);
263
+ }
264
+ return filtered;
265
+ }
266
+
267
+ // ---- Stats ----
268
+
269
+ getStats() {
270
+ const total = this.atomChanges.length;
271
+ const withChanges = this.atomChanges.filter(c => c.hasValueChange).length;
272
+ return {
273
+ totalChanges: total,
274
+ changesWithValueChange: withChanges,
275
+ changesWithoutValueChange: total - withChanges,
276
+ atomCount: this.atoms.size
277
+ };
278
+ }
279
+ getUniqueAtomLabels() {
280
+ return Array.from(this.atoms.keys()).sort();
281
+ }
282
+
283
+ // ---- Enable / Disable ----
284
+
285
+ setEnabled(enabled) {
286
+ this.isEnabled = enabled;
287
+ }
288
+ getEnabled() {
289
+ return this.isEnabled;
290
+ }
291
+ setMaxChanges(max) {
292
+ this.maxChanges = max;
293
+ if (this.atomChanges.length > max) {
294
+ this.atomChanges = this.atomChanges.slice(0, max);
295
+ this.notifyListeners();
296
+ }
297
+ }
298
+
299
+ // ---- Subscriptions ----
300
+
301
+ subscribe(listener) {
302
+ this.listeners.add(listener);
303
+ return () => this.listeners.delete(listener);
304
+ }
305
+ subscribeToAtoms(listener) {
306
+ this.atomListeners.add(listener);
307
+ return () => this.atomListeners.delete(listener);
308
+ }
309
+ notifyListeners() {
310
+ const changes = this.getAtomChanges();
311
+ this.listeners.forEach(listener => listener(changes));
312
+ }
313
+ notifyAtomListeners() {
314
+ const atoms = this.getAtoms();
315
+ this.atomListeners.forEach(listener => listener(atoms));
316
+ }
317
+ }
318
+ export const jotaiStateStore = new JotaiStateStore();
@@ -1 +1,144 @@
1
- "use strict";import{jotaiStateStore}from"./jotaiStateStore";export function watchAtoms(t,e,o){const a=!1!==o?.enabled,r=[];for(const[o,i]of Object.entries(e)){const e=i,n=Symbol.for(`@@buoy-jotai/watched/${o}`);if(e[n])continue;let c;e[n]=!0;try{c=t.get(i)}catch{c=void 0}jotaiStateStore.registerAtom(o,()=>{try{return t.get(i)}catch{return}}),a&&jotaiStateStore.addAtomChange({atomLabel:o,prevValue:void 0,nextValue:c,category:"initial"});const u=t.sub(i,()=>{try{const e=t.get(i);jotaiStateStore.addAtomChange({atomLabel:o,prevValue:c,nextValue:e,category:"write"}),c=e}catch{}});r.push(()=>{u(),delete e[n],jotaiStateStore.unregisterAtom(o)})}return()=>r.forEach(t=>t())}export function watchDefaultStoreAtoms(t,e){let o;try{const{getDefaultStore:t}=require("jotai/vanilla");o=t()}catch{try{const{getDefaultStore:t}=require("jotai");o=t()}catch{return console.warn("[@buoy-gg/jotai] Could not find getDefaultStore from jotai. Pass the store explicitly via watchAtoms(store, atoms) instead."),()=>{}}}return watchAtoms(o,t,e)}export function isAtomWatched(t){return void 0!==jotaiStateStore.getAtom(t)}
1
+ "use strict";
2
+
3
+ /**
4
+ * Buoy Jotai DevTools — Atom instrumentation
5
+ *
6
+ * watchAtoms() — RECOMMENDED. Pass a Jotai store and a named atom map.
7
+ * Uses store.sub() to observe each atom externally. Never touches atom internals.
8
+ *
9
+ * watchDefaultStoreAtoms() — Convenience wrapper that uses getDefaultStore().
10
+ */
11
+
12
+ import { jotaiStateStore } from "./jotaiStateStore";
13
+
14
+ /** Any Jotai atom — alias for Atom<unknown> for readability */
15
+
16
+ /** Minimal store shape — what Jotai's createStore() / getDefaultStore() returns */
17
+
18
+ /**
19
+ * Watch a set of Jotai atoms for value changes.
20
+ *
21
+ * Pass a Jotai store and an object mapping display names to atoms.
22
+ * Uses store.sub() to observe each atom — never modifies atom internals.
23
+ *
24
+ * @example
25
+ * ```tsx
26
+ * import { getDefaultStore } from 'jotai';
27
+ * import { watchAtoms } from '@buoy-gg/jotai';
28
+ * import { countAtom } from './atoms/count';
29
+ * import { authAtom } from './atoms/auth';
30
+ *
31
+ * watchAtoms(getDefaultStore(), {
32
+ * countAtom,
33
+ * authAtom,
34
+ * });
35
+ * ```
36
+ *
37
+ * @param store - Jotai store (from createStore() or getDefaultStore())
38
+ * @param atoms - Object mapping display labels to Jotai atoms
39
+ * @param options - Optional configuration
40
+ * @returns Cleanup function that removes all subscriptions
41
+ */
42
+ export function watchAtoms(store, atoms, options) {
43
+ const enabled = options?.enabled !== false;
44
+ const cleanups = [];
45
+ for (const [label, atom] of Object.entries(atoms)) {
46
+ // Skip if already watched under this label
47
+ const atomAny = atom;
48
+ const watchedKey = Symbol.for(`@@buoy-jotai/watched/${label}`);
49
+ if (atomAny[watchedKey]) continue;
50
+ atomAny[watchedKey] = true;
51
+ let prevValue;
52
+ try {
53
+ prevValue = store.get(atom);
54
+ } catch {
55
+ prevValue = undefined;
56
+ }
57
+
58
+ // Register the atom for the browser view
59
+ jotaiStateStore.registerAtom(label, () => {
60
+ try {
61
+ return store.get(atom);
62
+ } catch {
63
+ return undefined;
64
+ }
65
+ });
66
+
67
+ // Record initial value
68
+ if (enabled) {
69
+ jotaiStateStore.addAtomChange({
70
+ atomLabel: label,
71
+ prevValue: undefined,
72
+ nextValue: prevValue,
73
+ category: "initial"
74
+ });
75
+ }
76
+
77
+ // Subscribe to future changes
78
+ const unsubscribe = store.sub(atom, () => {
79
+ try {
80
+ const nextValue = store.get(atom);
81
+ jotaiStateStore.addAtomChange({
82
+ atomLabel: label,
83
+ prevValue,
84
+ nextValue,
85
+ category: "write"
86
+ });
87
+ prevValue = nextValue;
88
+ } catch {
89
+ // Silently catch — our bug must never propagate into the store
90
+ }
91
+ });
92
+ cleanups.push(() => {
93
+ unsubscribe();
94
+ delete atomAny[watchedKey];
95
+ jotaiStateStore.unregisterAtom(label);
96
+ });
97
+ }
98
+ return () => cleanups.forEach(fn => fn());
99
+ }
100
+
101
+ /**
102
+ * Watch atoms using Jotai's default store (no Provider setup required).
103
+ *
104
+ * Convenience wrapper around watchAtoms() — auto-imports getDefaultStore.
105
+ *
106
+ * @example
107
+ * ```tsx
108
+ * import { watchDefaultStoreAtoms } from '@buoy-gg/jotai';
109
+ * import { countAtom, authAtom } from './atoms';
110
+ *
111
+ * watchDefaultStoreAtoms({ countAtom, authAtom });
112
+ * ```
113
+ */
114
+ export function watchDefaultStoreAtoms(atoms, options) {
115
+ // Dynamic import to avoid bundling jotai internals when not needed
116
+ let store;
117
+ try {
118
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
119
+ const {
120
+ getDefaultStore
121
+ } = require("jotai/vanilla");
122
+ store = getDefaultStore();
123
+ } catch {
124
+ // Try the main jotai entry (React Native)
125
+ try {
126
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
127
+ const {
128
+ getDefaultStore
129
+ } = require("jotai");
130
+ store = getDefaultStore();
131
+ } catch {
132
+ console.warn("[@buoy-gg/jotai] Could not find getDefaultStore from jotai. " + "Pass the store explicitly via watchAtoms(store, atoms) instead.");
133
+ return () => {};
134
+ }
135
+ }
136
+ return watchAtoms(store, atoms, options);
137
+ }
138
+
139
+ /**
140
+ * Check if an atom label is currently being watched
141
+ */
142
+ export function isAtomWatched(label) {
143
+ return jotaiStateStore.getAtom(label) !== undefined;
144
+ }
@@ -1 +1,94 @@
1
- "use strict";import{JotaiModal}from"./jotai/components/JotaiModal";import{JotaiIcon}from"./jotai/components/JotaiIcon";import{jsx as _jsx}from"react/jsx-runtime";export const jotaiToolPreset={id:"jotai",name:"JOTAI",description:"Jotai atom & state inspector",slot:"both",icon:({size:o})=>_jsx(JotaiIcon,{size:o}),component:JotaiModal,props:{enableSharedModalDimensions:!1}};export function createJotaiTool(o){return{id:o?.id||"jotai",name:o?.name||"JOTAI",description:o?.description||"Jotai atom & state inspector",slot:"both",icon:({size:i})=>_jsx(JotaiIcon,{size:i,color:o?.iconColor}),component:JotaiModal,props:{enableSharedModalDimensions:void 0!==o?.enableSharedModalDimensions&&o.enableSharedModalDimensions}}}
1
+ "use strict";
2
+
3
+ /**
4
+ * Pre-configured Jotai DevTools preset for FloatingDevTools
5
+ *
6
+ * ZERO-CONFIG: This preset is auto-discovered by FloatingDevTools!
7
+ * Just install @buoy-gg/jotai and call watchAtoms() with your atoms.
8
+ *
9
+ * @example Automatic (recommended)
10
+ * ```tsx
11
+ * import { getDefaultStore } from 'jotai';
12
+ * import { watchAtoms } from '@buoy-gg/jotai';
13
+ * import { countAtom, authAtom } from './atoms';
14
+ *
15
+ * watchAtoms(getDefaultStore(), { countAtom, authAtom });
16
+ *
17
+ * // The Jotai tool appears automatically in FloatingDevTools!
18
+ * <FloatingDevTools />
19
+ * ```
20
+ *
21
+ * @example Manual (only for custom configuration)
22
+ * ```tsx
23
+ * import { createJotaiTool } from '@buoy-gg/jotai';
24
+ *
25
+ * const customJotaiTool = createJotaiTool({
26
+ * name: "ATOMS",
27
+ * iconColor: "#6C47FF",
28
+ * });
29
+ *
30
+ * <FloatingDevTools apps={[customJotaiTool]} />
31
+ * ```
32
+ */
33
+
34
+ import { JotaiModal } from "./jotai/components/JotaiModal";
35
+ import { JotaiIcon } from "./jotai/components/JotaiIcon";
36
+
37
+ /**
38
+ * Pre-configured Jotai DevTools preset for FloatingDevTools.
39
+ * Includes:
40
+ * - Live atom change monitoring
41
+ * - Atom value inspection (JSON viewer)
42
+ * - Value diff visualization (tree + split)
43
+ * - Filter by atom label
44
+ * - Changed keys tracking for object atoms
45
+ */
46
+ import { jsx as _jsx } from "react/jsx-runtime";
47
+ export const jotaiToolPreset = {
48
+ id: "jotai",
49
+ name: "JOTAI",
50
+ description: "Jotai atom & state inspector",
51
+ slot: "both",
52
+ icon: ({
53
+ size
54
+ }) => /*#__PURE__*/_jsx(JotaiIcon, {
55
+ size: size
56
+ }),
57
+ component: JotaiModal,
58
+ props: {
59
+ enableSharedModalDimensions: false
60
+ }
61
+ };
62
+
63
+ /**
64
+ * Create a custom Jotai DevTools configuration.
65
+ * Use this if you want to override default settings.
66
+ *
67
+ * @example
68
+ * ```tsx
69
+ * import { createJotaiTool } from '@buoy-gg/jotai';
70
+ *
71
+ * const myJotaiTool = createJotaiTool({
72
+ * name: "ATOMS",
73
+ * iconColor: "#6C47FF",
74
+ * });
75
+ * ```
76
+ */
77
+ export function createJotaiTool(options) {
78
+ return {
79
+ id: options?.id || "jotai",
80
+ name: options?.name || "JOTAI",
81
+ description: options?.description || "Jotai atom & state inspector",
82
+ slot: "both",
83
+ icon: ({
84
+ size
85
+ }) => /*#__PURE__*/_jsx(JotaiIcon, {
86
+ size: size,
87
+ color: options?.iconColor
88
+ }),
89
+ component: JotaiModal,
90
+ props: {
91
+ enableSharedModalDimensions: options?.enableSharedModalDimensions !== undefined ? options.enableSharedModalDimensions : false
92
+ }
93
+ };
94
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAKH,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAK5D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAKtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAKlE,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAK9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,YAAY,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAKnF,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EACL,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAK3E,YAAY,EACV,eAAe,EACf,eAAe,EACf,aAAa,EACb,WAAW,EACX,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,eAAe,CAAC;AAKvB,gBAAgB;AAChB,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JotaiAtomBrowser.d.ts","sourceRoot":"","sources":["../../../../src/jotai/components/JotaiAtomBrowser.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAoBH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG9C,UAAU,qBAAqB;IAC7B,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C;AAyGD,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,WAAW,EACX,aAAa,GACd,EAAE,qBAAqB,+BAiFvB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JotaiAtomChangeItem.d.ts","sourceRoot":"","sources":["../../../../src/jotai/components/JotaiAtomChangeItem.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAsB,MAAM,UAAU,CAAC;AAGpE,UAAU,wBAAwB;IAChC,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;CAC5C;AAoDD,wBAAgB,mBAAmB,CAAC,EAClC,MAAM,EACN,OAAO,GACR,EAAE,wBAAwB,+BA+B1B"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JotaiAtomDetailContent.d.ts","sourceRoot":"","sources":["../../../../src/jotai/components/JotaiAtomDetailContent.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAA+C,MAAM,OAAO,CAAC;AA0BpE,OAAO,KAAK,EAAE,eAAe,EAAsB,MAAM,UAAU,CAAC;AAmQpE,UAAU,2BAA2B;IACnC,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,wBAAgB,sBAAsB,CAAC,EACrC,MAAM,EACN,OAAO,EACP,aAAa,EACb,aAAa,EACb,qBAA6B,GAC9B,EAAE,2BAA2B,qBAyJ7B;AAED,wBAAgB,qBAAqB,CAAC,EACpC,MAAM,EACN,OAAO,EACP,aAAa,EACb,aAAa,GACd,EAAE;IACD,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC,4BAcA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JotaiEventFilterView.d.ts","sourceRoot":"","sources":["../../../../src/jotai/components/JotaiEventFilterView.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAkBH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG9C,UAAU,yBAAyB;IACjC,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7B,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,KAAK,EAAE,aAAa,EAAE,CAAC;CACxB;AAYD,wBAAgB,oBAAoB,CAAC,EACnC,eAAe,EACf,eAAe,EACf,YAAY,EACZ,KAAK,GACN,EAAE,yBAAyB,+BAwJ3B"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JotaiIcon.d.ts","sourceRoot":"","sources":["../../../../src/jotai/components/JotaiIcon.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAIH,QAAA,MAAM,gBAAgB,YAAY,CAAC;AAEnC,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,KAAK,GACN,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,+BAqBA;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JotaiModal.d.ts","sourceRoot":"","sources":["../../../../src/jotai/components/JotaiModal.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAwCH,OAAO,KAAK,EAAE,eAAe,EAAmB,MAAM,UAAU,CAAC;AAoBjE,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,OAAO,EACP,MAAM,EACN,UAAU,EACV,2BAAmC,GACpC,EAAE,eAAe,sCA+ejB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/jotai/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useJotaiAtomChanges.d.ts","sourceRoot":"","sources":["../../../../src/jotai/hooks/useJotaiAtomChanges.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,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,EAAE,MAAM,CAAC;QACrB,sBAAsB,EAAE,MAAM,CAAC;QAC/B,yBAAyB,EAAE,MAAM,CAAC;QAClC,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,2BAA2B;IAC3B,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,iCAAiC;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;AAED,wBAAgB,mBAAmB,IAAI,yBAAyB,CA6F/D"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jotai/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EACL,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EACL,UAAU,EACV,sBAAsB,EACtB,aAAa,GACd,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAElE,YAAY,EACV,eAAe,EACf,eAAe,EACf,aAAa,EACb,WAAW,EACX,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,SAAS,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/jotai/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAC1B,OAAO,GACP,SAAS,CAAC;AAEd;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,cAAc,EAAE,OAAO,CAAC;IAGxB,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB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B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wCAAwC;IACxC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,iBAAiB;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qCAAqC;IACrC,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACvC;;;;;qBAMoB;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;;;;;EAWpC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buoy-gg/jotai",
3
- "version": "2.1.10",
3
+ "version": "2.1.11",
4
4
  "description": "Jotai atom DevTools for React Native",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -25,9 +25,15 @@
25
25
  "lib"
26
26
  ],
27
27
  "sideEffects": false,
28
+ "scripts": {
29
+ "build": "bob build",
30
+ "typecheck": "tsc --noEmit",
31
+ "clean": "rimraf lib",
32
+ "test": "pnpm run typecheck"
33
+ },
28
34
  "dependencies": {
29
- "@buoy-gg/license": "2.1.10",
30
- "@buoy-gg/shared-ui": "2.1.10"
35
+ "@buoy-gg/shared-ui": "workspace:*",
36
+ "@buoy-gg/license": "workspace:*"
31
37
  },
32
38
  "peerDependencies": {
33
39
  "jotai": ">=2.0.0",
@@ -71,11 +77,5 @@
71
77
  "publishConfig": {
72
78
  "access": "public",
73
79
  "tag": "latest"
74
- },
75
- "scripts": {
76
- "build": "bob build",
77
- "typecheck": "tsc --noEmit",
78
- "clean": "rimraf lib",
79
- "test": "pnpm run typecheck"
80
80
  }
81
- }
81
+ }