@buoy-gg/jotai 7.0.33 → 7.0.35
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/lib/commonjs/jotai/components/JotaiAtomBrowser.js +2 -2
- package/lib/commonjs/jotai/components/JotaiAtomChangeItem.js +7 -52
- package/lib/commonjs/jotai/components/JotaiAtomDetailContent.js +18 -97
- package/lib/commonjs/jotai/components/JotaiAtomValueDetailContent.js +5 -5
- package/lib/commonjs/jotai/components/JotaiEventFilterView.js +21 -299
- package/lib/commonjs/jotai/components/JotaiModal.js +20 -85
- package/lib/commonjs/jotai/hooks/useJotaiAtomChanges.js +33 -49
- package/lib/commonjs/jotai/sync/jotaiSyncAdapter.js +19 -66
- package/lib/commonjs/jotai/utils/jotaiStateStore.js +23 -188
- package/lib/commonjs/jotai/utils/snapshotProvider.js +7 -25
- package/lib/commonjs/preset.js +14 -22
- package/lib/module/jotai/components/JotaiAtomBrowser.js +3 -3
- package/lib/module/jotai/components/JotaiAtomChangeItem.js +9 -54
- package/lib/module/jotai/components/JotaiAtomDetailContent.js +19 -98
- package/lib/module/jotai/components/JotaiAtomValueDetailContent.js +6 -6
- package/lib/module/jotai/components/JotaiEventFilterView.js +24 -302
- package/lib/module/jotai/components/JotaiModal.js +22 -87
- package/lib/module/jotai/hooks/useJotaiAtomChanges.js +34 -50
- package/lib/module/jotai/sync/jotaiSyncAdapter.js +20 -67
- package/lib/module/jotai/utils/jotaiStateStore.js +23 -188
- package/lib/module/jotai/utils/snapshotProvider.js +8 -26
- package/lib/module/preset.js +13 -20
- package/lib/typescript/jotai/components/JotaiAtomBrowser.d.ts.map +1 -1
- package/lib/typescript/jotai/components/JotaiAtomChangeItem.d.ts.map +1 -1
- package/lib/typescript/jotai/components/JotaiAtomDetailContent.d.ts.map +1 -1
- package/lib/typescript/jotai/components/JotaiAtomValueDetailContent.d.ts.map +1 -1
- package/lib/typescript/jotai/components/JotaiEventFilterView.d.ts +2 -2
- package/lib/typescript/jotai/components/JotaiEventFilterView.d.ts.map +1 -1
- package/lib/typescript/jotai/components/JotaiModal.d.ts.map +1 -1
- package/lib/typescript/jotai/hooks/useJotaiAtomChanges.d.ts +2 -1
- package/lib/typescript/jotai/hooks/useJotaiAtomChanges.d.ts.map +1 -1
- package/lib/typescript/jotai/sync/jotaiSyncAdapter.d.ts +54 -68
- package/lib/typescript/jotai/sync/jotaiSyncAdapter.d.ts.map +1 -1
- package/lib/typescript/jotai/utils/jotaiStateStore.d.ts +2 -25
- package/lib/typescript/jotai/utils/jotaiStateStore.d.ts.map +1 -1
- package/lib/typescript/preset.d.ts +2 -8
- package/lib/typescript/preset.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -3,17 +3,11 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Mirrors the architecture of zustandStateStore.ts from @buoy-gg/zustand
|
|
5
5
|
*/
|
|
6
|
+
import { ChangeLog } from "@buoy-gg/shared-ui";
|
|
6
7
|
import type { JotaiAtomChange, JotaiAtomInfo, JotaiAtomSnapshot, JotaiFilter, AtomChangeCategory } from "../types";
|
|
7
|
-
declare class JotaiStateStore {
|
|
8
|
-
private atomChanges;
|
|
8
|
+
declare class JotaiStateStore extends ChangeLog<JotaiAtomChange> {
|
|
9
9
|
private atoms;
|
|
10
|
-
private listeners;
|
|
11
10
|
private atomListeners;
|
|
12
|
-
private clearListeners;
|
|
13
|
-
private maxChanges;
|
|
14
|
-
private idCounter;
|
|
15
|
-
private isEnabled;
|
|
16
|
-
private captureSuppressed;
|
|
17
11
|
addAtomChange(params: {
|
|
18
12
|
atomLabel: string;
|
|
19
13
|
prevValue: unknown;
|
|
@@ -23,19 +17,6 @@ declare class JotaiStateStore {
|
|
|
23
17
|
getAtomChanges(): JotaiAtomChange[];
|
|
24
18
|
getAtomChangeById(id: string): JotaiAtomChange | undefined;
|
|
25
19
|
clearAtomChanges(): void;
|
|
26
|
-
/**
|
|
27
|
-
* Listen for clearAtomChanges() calls. Used in remote mirror mode to
|
|
28
|
-
* forward a clear performed in the dashboard UI to the synced device.
|
|
29
|
-
*/
|
|
30
|
-
onClear(listener: () => void): () => void;
|
|
31
|
-
/**
|
|
32
|
-
* Permanently suppress local capture. Use when this store acts as a mirror
|
|
33
|
-
* of a remote device's atom changes (e.g. the desktop dashboard): data
|
|
34
|
-
* arrives via replaceFromSnapshot() and local watchers must never record.
|
|
35
|
-
*/
|
|
36
|
-
disableCapture(): void;
|
|
37
|
-
/** Whether the store is in remote mirror mode (capture suppressed). */
|
|
38
|
-
isCaptureSuppressed(): boolean;
|
|
39
20
|
/**
|
|
40
21
|
* Serializable snapshot of the tracked atoms (registry metadata plus each
|
|
41
22
|
* atom's current value). Used by the sync adapter on the device side —
|
|
@@ -77,12 +58,8 @@ declare class JotaiStateStore {
|
|
|
77
58
|
atomCount: number;
|
|
78
59
|
};
|
|
79
60
|
getUniqueAtomLabels(): string[];
|
|
80
|
-
setEnabled(enabled: boolean): void;
|
|
81
|
-
getEnabled(): boolean;
|
|
82
61
|
setMaxChanges(max: number): void;
|
|
83
|
-
subscribe(listener: (changes: JotaiAtomChange[]) => void): () => void;
|
|
84
62
|
subscribeToAtoms(listener: (atoms: JotaiAtomInfo[]) => void): () => void;
|
|
85
|
-
private notifyListeners;
|
|
86
63
|
private notifyAtomListeners;
|
|
87
64
|
}
|
|
88
65
|
export declare const jotaiStateStore: JotaiStateStore;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jotaiStateStore.d.ts","sourceRoot":"","sources":["../../../../src/jotai/utils/jotaiStateStore.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,WAAW,EACX,kBAAkB,EACnB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"jotaiStateStore.d.ts","sourceRoot":"","sources":["../../../../src/jotai/utils/jotaiStateStore.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,E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nC,QAAQ,IAAI,aAAa,EAAE;IAI3B,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS;IAIjD,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAMnC,iBAAiB,CAAC,MAAM,EAAE,WAAW,GAAG,eAAe,EAAE;IA4BzD,QAAQ;;;;;;IAYR,mBAAmB,IAAI,MAAM,EAAE;IAM/B,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAMhC,gBAAgB,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,EAAE,KAAK,IAAI,GAAG,MAAM,IAAI;IAKxE,OAAO,CAAC,mBAAmB;CAI5B;AAED,eAAO,MAAM,eAAe,iBAAwB,CAAC"}
|
|
@@ -65,18 +65,12 @@ export declare const jotaiToolPreset: {
|
|
|
65
65
|
* });
|
|
66
66
|
* ```
|
|
67
67
|
*/
|
|
68
|
-
export declare
|
|
69
|
-
/** Tool name (default: "JOTAI") */
|
|
70
|
-
name?: string;
|
|
71
|
-
/** Tool description */
|
|
72
|
-
description?: string;
|
|
73
|
-
/** Custom tool ID (default: "jotai") */
|
|
74
|
-
id?: string;
|
|
68
|
+
export declare const createJotaiTool: (options?: ({
|
|
75
69
|
/** Icon color */
|
|
76
70
|
iconColor?: string;
|
|
77
71
|
/** Enable shared modal dimensions */
|
|
78
72
|
enableSharedModalDimensions?: boolean;
|
|
79
|
-
})
|
|
73
|
+
} & import("@buoy-gg/shared-ui").ToolPresetOverrides) | undefined) => {
|
|
80
74
|
id: string;
|
|
81
75
|
name: string;
|
|
82
76
|
description: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../../src/preset.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../../src/preset.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAI3D;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe;;;;;qBAKT;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;;;;;CAKjC,CAAC;AAEH;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,eAAe;IAGxB,iBAAiB;gBACL,MAAM;IAClB,qCAAqC;kCACP,OAAO;;;;;;qBA3BtB;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;;;;;CAoClC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buoy-gg/jotai",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.35",
|
|
4
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.",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"**/snapshotProvider.ts"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@buoy-gg/shared-ui": "^7.0.
|
|
33
|
-
"@buoy-gg/license": "^7.0.
|
|
32
|
+
"@buoy-gg/shared-ui": "^7.0.35",
|
|
33
|
+
"@buoy-gg/license": "^7.0.35"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"jotai": ">=2.0.0",
|