@buoy-gg/zustand 7.0.16 → 7.0.18
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/index.js +1 -0
- package/lib/commonjs/zustand/components/ZustandModal.js +35 -4
- package/lib/commonjs/zustand/components/ZustandStateDetailContent.js +3 -2
- package/lib/commonjs/zustand/components/ZustandStoreBrowser.js +11 -3
- package/lib/commonjs/zustand/sync/zustandSyncAdapter.js +178 -6
- package/lib/commonjs/zustand/utils/snapshotProvider.js +279 -0
- package/lib/commonjs/zustand/utils/zustandStateStore.js +105 -14
- package/lib/module/index.js +3 -0
- package/lib/module/zustand/components/ZustandModal.js +36 -5
- package/lib/module/zustand/components/ZustandStateDetailContent.js +3 -2
- package/lib/module/zustand/components/ZustandStoreBrowser.js +11 -3
- package/lib/module/zustand/sync/zustandSyncAdapter.js +177 -5
- package/lib/module/zustand/utils/snapshotProvider.js +278 -0
- package/lib/module/zustand/utils/zustandStateStore.js +105 -14
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/zustand/components/ZustandModal.d.ts +1 -1
- package/lib/typescript/zustand/components/ZustandModal.d.ts.map +1 -1
- package/lib/typescript/zustand/components/ZustandStateDetailContent.d.ts +4 -1
- package/lib/typescript/zustand/components/ZustandStateDetailContent.d.ts.map +1 -1
- package/lib/typescript/zustand/components/ZustandStoreBrowser.d.ts +3 -1
- package/lib/typescript/zustand/components/ZustandStoreBrowser.d.ts.map +1 -1
- package/lib/typescript/zustand/sync/zustandSyncAdapter.d.ts +71 -3
- package/lib/typescript/zustand/sync/zustandSyncAdapter.d.ts.map +1 -1
- package/lib/typescript/zustand/types/index.d.ts +26 -0
- package/lib/typescript/zustand/types/index.d.ts.map +1 -1
- package/lib/typescript/zustand/utils/snapshotProvider.d.ts +2 -0
- package/lib/typescript/zustand/utils/snapshotProvider.d.ts.map +1 -0
- package/lib/typescript/zustand/utils/zustandStateStore.d.ts +18 -0
- package/lib/typescript/zustand/utils/zustandStateStore.d.ts.map +1 -1
- package/package.json +7 -4
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Time Machine snapshot provider for Zustand.
|
|
5
|
+
*
|
|
6
|
+
* Registered into @buoy-gg/shared-ui's stateSnapshotRegistry at module init;
|
|
7
|
+
* consumed by @buoy-gg/time-machine. Neither package imports the other.
|
|
8
|
+
*
|
|
9
|
+
* The Zustand-specific hazard: stores conventionally keep their action
|
|
10
|
+
* functions IN state (`increment: () => ...`). Functions don't survive
|
|
11
|
+
* serialization, and a full `setState(snapshot, true)` replace would wipe
|
|
12
|
+
* them, breaking every `useStore(s => s.increment)` call site. So capture
|
|
13
|
+
* strips functions (recording where they were), and restore re-grafts the
|
|
14
|
+
* LIVE store's functions onto the snapshot before replacing.
|
|
15
|
+
*/
|
|
16
|
+
import { registerStateSnapshotProvider } from "@buoy-gg/shared-ui";
|
|
17
|
+
import { boundedDeepEqual, jsonLikelyLargerThan } from "@buoy-gg/shared-ui/dataViewer";
|
|
18
|
+
import { zustandStateStore } from "./zustandStateStore";
|
|
19
|
+
const MAX_DEPTH = 8;
|
|
20
|
+
function isPlainObjectLike(v) {
|
|
21
|
+
return typeof v === "object" && v !== null && !Array.isArray(v);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** Clone `value` without functions, recording their paths. */
|
|
25
|
+
function stripFunctions(value, path, fnPaths, seen, depth) {
|
|
26
|
+
if (typeof value === "function") {
|
|
27
|
+
fnPaths.push(path);
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
if (typeof value !== "object" || value === null || depth >= MAX_DEPTH) {
|
|
31
|
+
return value;
|
|
32
|
+
}
|
|
33
|
+
if (seen.has(value)) return undefined; // cycle — drop the back-reference
|
|
34
|
+
seen.add(value);
|
|
35
|
+
if (Array.isArray(value)) {
|
|
36
|
+
return value.map((item, i) => typeof item === "function" ? (fnPaths.push(`${path}[${i}]`), null) : stripFunctions(item, `${path}[${i}]`, fnPaths, seen, depth + 1));
|
|
37
|
+
}
|
|
38
|
+
if (!isPlainObjectLike(value)) return value; // Date/Map/Set/etc. — superjson handles
|
|
39
|
+
const out = {};
|
|
40
|
+
for (const [k, v] of Object.entries(value)) {
|
|
41
|
+
if (typeof v === "function") {
|
|
42
|
+
fnPaths.push(path ? `${path}.${k}` : k);
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
out[k] = stripFunctions(v, path ? `${path}.${k}` : k, fnPaths, seen, depth + 1);
|
|
46
|
+
}
|
|
47
|
+
return out;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Copy every function-valued property from the LIVE state onto the restored
|
|
52
|
+
* snapshot (creating containers as needed), so store actions keep working
|
|
53
|
+
* after a full replace.
|
|
54
|
+
*/
|
|
55
|
+
function graftFunctions(target, live, seen, depth) {
|
|
56
|
+
if (!isPlainObjectLike(live) || !isPlainObjectLike(target)) return;
|
|
57
|
+
if (depth >= MAX_DEPTH || seen.has(live)) return;
|
|
58
|
+
seen.add(live);
|
|
59
|
+
for (const [k, v] of Object.entries(live)) {
|
|
60
|
+
if (typeof v === "function") {
|
|
61
|
+
target[k] = v;
|
|
62
|
+
} else if (isPlainObjectLike(v)) {
|
|
63
|
+
if (!isPlainObjectLike(target[k])) {
|
|
64
|
+
// Branch missing from the snapshot — only recreate it if it holds
|
|
65
|
+
// functions somewhere; otherwise the snapshot's absence wins.
|
|
66
|
+
if (!containsFunction(v, new WeakSet(), depth + 1)) continue;
|
|
67
|
+
target[k] = {};
|
|
68
|
+
}
|
|
69
|
+
graftFunctions(target[k], v, seen, depth + 1);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
function containsFunction(value, seen, depth) {
|
|
74
|
+
if (depth >= MAX_DEPTH || seen.has(value)) return false;
|
|
75
|
+
seen.add(value);
|
|
76
|
+
for (const v of Object.values(value)) {
|
|
77
|
+
if (typeof v === "function") return true;
|
|
78
|
+
if (isPlainObjectLike(v) && containsFunction(v, seen, depth + 1)) return true;
|
|
79
|
+
}
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
function status() {
|
|
83
|
+
const count = zustandStateStore.getStores().length;
|
|
84
|
+
if (count === 0) {
|
|
85
|
+
return {
|
|
86
|
+
canCapture: false,
|
|
87
|
+
canRestore: false,
|
|
88
|
+
detail: "No Zustand stores registered — pass `zustandStores` to FloatingDevTools or add the buoyDevTools middleware"
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
return {
|
|
92
|
+
canCapture: true,
|
|
93
|
+
canRestore: true
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
async function capture() {
|
|
97
|
+
const warnings = [];
|
|
98
|
+
const stores = {};
|
|
99
|
+
for (const info of zustandStateStore.getStores()) {
|
|
100
|
+
const fnPaths = [];
|
|
101
|
+
let state;
|
|
102
|
+
try {
|
|
103
|
+
state = stripFunctions(info.api.getState(), "", fnPaths, new WeakSet(), 0);
|
|
104
|
+
} catch (e) {
|
|
105
|
+
warnings.push(`store "${info.name}": capture failed (${String(e)})`);
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
stores[info.name] = {
|
|
109
|
+
state,
|
|
110
|
+
fnPaths
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
return {
|
|
114
|
+
data: {
|
|
115
|
+
stores
|
|
116
|
+
},
|
|
117
|
+
warnings
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
async function restore(data, options) {
|
|
121
|
+
const snapshot = data;
|
|
122
|
+
const excludedSet = new Set(options?.excludeKeys ?? []);
|
|
123
|
+
const includedSet = options?.includeKeys ? new Set(options.includeKeys) : null;
|
|
124
|
+
const touch = key => !excludedSet.has(key) && (!includedSet || includedSet.has(key));
|
|
125
|
+
let excludedHits = 0;
|
|
126
|
+
const result = {
|
|
127
|
+
ok: true,
|
|
128
|
+
applied: 0,
|
|
129
|
+
skipped: [],
|
|
130
|
+
warnings: []
|
|
131
|
+
};
|
|
132
|
+
if (!snapshot?.stores) {
|
|
133
|
+
return {
|
|
134
|
+
ok: false,
|
|
135
|
+
applied: 0,
|
|
136
|
+
skipped: [],
|
|
137
|
+
warnings: ["empty zustand snapshot"]
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
for (const [name, envelope] of Object.entries(snapshot.stores)) {
|
|
141
|
+
if (!touch(name)) {
|
|
142
|
+
excludedHits += 1;
|
|
143
|
+
continue;
|
|
144
|
+
}
|
|
145
|
+
const info = zustandStateStore.getStore(name);
|
|
146
|
+
if (!info) {
|
|
147
|
+
result.skipped.push({
|
|
148
|
+
id: name,
|
|
149
|
+
reason: "store not registered (renamed, or created after snapshot?)"
|
|
150
|
+
});
|
|
151
|
+
continue;
|
|
152
|
+
}
|
|
153
|
+
try {
|
|
154
|
+
const next = envelope.state;
|
|
155
|
+
graftFunctions(next, info.api.getState(), new WeakSet(), 0);
|
|
156
|
+
info.api.setState(next, true);
|
|
157
|
+
if (info.api.getState() === next) {
|
|
158
|
+
result.applied += 1;
|
|
159
|
+
} else {
|
|
160
|
+
result.warnings.push(`store "${name}": setState did not take effect`);
|
|
161
|
+
result.ok = false;
|
|
162
|
+
}
|
|
163
|
+
} catch (e) {
|
|
164
|
+
result.skipped.push({
|
|
165
|
+
id: name,
|
|
166
|
+
reason: String(e)
|
|
167
|
+
});
|
|
168
|
+
result.ok = false;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
if (excludedHits > 0) {
|
|
172
|
+
result.warnings.push(`${excludedHits} store(s) excluded by you`);
|
|
173
|
+
}
|
|
174
|
+
return result;
|
|
175
|
+
}
|
|
176
|
+
const ITEM_RENDER_BYTE_LIMIT = 256 * 1024;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Per-store restore preview. Both sides are function-stripped through the
|
|
180
|
+
* SAME depth-8 normalizer as capture — diffing snapshot-vs-RAW-live would
|
|
181
|
+
* report every stripped function and every beyond-depth subtree as removed.
|
|
182
|
+
*/
|
|
183
|
+
async function previewItems(target, base) {
|
|
184
|
+
const targetStores = target?.stores ?? {};
|
|
185
|
+
const liveMode = base === undefined;
|
|
186
|
+
const baseStores = {};
|
|
187
|
+
if (liveMode) {
|
|
188
|
+
for (const info of zustandStateStore.getStores()) {
|
|
189
|
+
const fnPaths = [];
|
|
190
|
+
try {
|
|
191
|
+
baseStores[info.name] = {
|
|
192
|
+
state: stripFunctions(info.api.getState(), "", fnPaths, new WeakSet(), 0),
|
|
193
|
+
fnPaths
|
|
194
|
+
};
|
|
195
|
+
} catch {
|
|
196
|
+
// unreadable live store — treated as absent
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
} else {
|
|
200
|
+
Object.assign(baseStores, base?.stores ?? {});
|
|
201
|
+
}
|
|
202
|
+
const items = [];
|
|
203
|
+
const notes = [];
|
|
204
|
+
let preservedFns = 0;
|
|
205
|
+
const names = new Set([...Object.keys(baseStores), ...Object.keys(targetStores)]);
|
|
206
|
+
for (const name of names) {
|
|
207
|
+
const inTarget = name in targetStores;
|
|
208
|
+
const inBase = name in baseStores;
|
|
209
|
+
if (!inTarget) {
|
|
210
|
+
// Restore never touches stores the snapshot doesn't know about.
|
|
211
|
+
if (liveMode) notes.push(`store "${name}" not in snapshot — untouched`);else items.push({
|
|
212
|
+
key: name,
|
|
213
|
+
label: name,
|
|
214
|
+
verdict: "removed",
|
|
215
|
+
oldValue: baseStores[name].state
|
|
216
|
+
});
|
|
217
|
+
continue;
|
|
218
|
+
}
|
|
219
|
+
preservedFns += targetStores[name].fnPaths?.length ?? 0;
|
|
220
|
+
if (liveMode && !zustandStateStore.getStore(name)) {
|
|
221
|
+
items.push({
|
|
222
|
+
key: name,
|
|
223
|
+
label: name,
|
|
224
|
+
verdict: "wont-apply",
|
|
225
|
+
reason: "store not registered (renamed, or created after snapshot?)"
|
|
226
|
+
});
|
|
227
|
+
continue;
|
|
228
|
+
}
|
|
229
|
+
if (!inBase) {
|
|
230
|
+
items.push({
|
|
231
|
+
key: name,
|
|
232
|
+
label: name,
|
|
233
|
+
verdict: "added",
|
|
234
|
+
newValue: targetStores[name].state
|
|
235
|
+
});
|
|
236
|
+
continue;
|
|
237
|
+
}
|
|
238
|
+
const oldState = baseStores[name].state;
|
|
239
|
+
const newState = targetStores[name].state;
|
|
240
|
+
if (boundedDeepEqual(oldState, newState)) {
|
|
241
|
+
items.push({
|
|
242
|
+
key: name,
|
|
243
|
+
label: name,
|
|
244
|
+
verdict: "unchanged"
|
|
245
|
+
});
|
|
246
|
+
} else if (jsonLikelyLargerThan(oldState, ITEM_RENDER_BYTE_LIMIT) || jsonLikelyLargerThan(newState, ITEM_RENDER_BYTE_LIMIT)) {
|
|
247
|
+
items.push({
|
|
248
|
+
key: name,
|
|
249
|
+
label: name,
|
|
250
|
+
verdict: "too-large",
|
|
251
|
+
reason: "store too large to render a diff — restore still applies it"
|
|
252
|
+
});
|
|
253
|
+
} else {
|
|
254
|
+
items.push({
|
|
255
|
+
key: name,
|
|
256
|
+
label: name,
|
|
257
|
+
verdict: "changed",
|
|
258
|
+
oldValue: oldState,
|
|
259
|
+
newValue: newState
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
if (preservedFns > 0) {
|
|
264
|
+
notes.push(`${preservedFns} store action function${preservedFns === 1 ? "" : "s"} preserved on restore (not diffed)`);
|
|
265
|
+
}
|
|
266
|
+
return {
|
|
267
|
+
items,
|
|
268
|
+
notes
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
registerStateSnapshotProvider({
|
|
272
|
+
id: "zustand",
|
|
273
|
+
label: "Zustand",
|
|
274
|
+
status,
|
|
275
|
+
capture,
|
|
276
|
+
restore,
|
|
277
|
+
previewItems
|
|
278
|
+
});
|
|
@@ -272,6 +272,27 @@ class ZustandStateStore {
|
|
|
272
272
|
|
|
273
273
|
// ---- Remote Mirror Mode ----
|
|
274
274
|
|
|
275
|
+
/**
|
|
276
|
+
* Replace the change log without touching the store registry. Used when a
|
|
277
|
+
* host keeps real registered stores (JUMP / RESET stay wired) but needs to
|
|
278
|
+
* reseed the event list — the docs live tour, or any mirror that already
|
|
279
|
+
* called `registerStore`. Does not fire `onClear`. Respects the enabled
|
|
280
|
+
* flag so the UI's pause button freezes the reseed.
|
|
281
|
+
*/
|
|
282
|
+
replaceStateChanges(changes) {
|
|
283
|
+
if (!this.isEnabled) return;
|
|
284
|
+
this.stateChanges = changes.slice(0, this.maxChanges);
|
|
285
|
+
for (const store of this.stores.values()) {
|
|
286
|
+
store.stateChangeCount = 0;
|
|
287
|
+
}
|
|
288
|
+
for (const change of this.stateChanges) {
|
|
289
|
+
const store = this.stores.get(change.storeName);
|
|
290
|
+
if (store) store.stateChangeCount++;
|
|
291
|
+
}
|
|
292
|
+
this.notifyListeners();
|
|
293
|
+
this.notifyStoreListeners();
|
|
294
|
+
}
|
|
295
|
+
|
|
275
296
|
/**
|
|
276
297
|
* Permanently suppress local capture. Use when this store acts as a mirror
|
|
277
298
|
* of a remote device's state changes (e.g. the desktop dashboard): data
|
|
@@ -326,22 +347,92 @@ class ZustandStateStore {
|
|
|
326
347
|
*/
|
|
327
348
|
replaceFromSnapshot(changes, storeSnapshots) {
|
|
328
349
|
if (!this.isEnabled) return;
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
350
|
+
|
|
351
|
+
// Preserve trees a remote mirror already hydrated — wire-form snapshots
|
|
352
|
+
// always carry markers, and a later snapshot must not blank the detail pane.
|
|
353
|
+
const hydrated = new Map();
|
|
354
|
+
for (const existing of this.stateChanges) {
|
|
355
|
+
const prev = existing.prevState;
|
|
356
|
+
if (!prev || prev.__buoyStateOnDevice !== true) {
|
|
357
|
+
hydrated.set(existing.id, existing);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
this.stateChanges = changes.slice(0, this.maxChanges).map(change => {
|
|
361
|
+
const kept = hydrated.get(change.id);
|
|
362
|
+
const incoming = change.prevState;
|
|
363
|
+
return kept && incoming?.__buoyStateOnDevice === true ? {
|
|
364
|
+
...change,
|
|
365
|
+
prevState: kept.prevState,
|
|
366
|
+
nextState: kept.nextState,
|
|
367
|
+
partial: kept.partial
|
|
368
|
+
} : change;
|
|
369
|
+
});
|
|
370
|
+
|
|
371
|
+
// Preserve currentState a remote mirror already hydrated — oversized
|
|
372
|
+
// stores arrive as STATE_ON_DEVICE markers on every snapshot.
|
|
373
|
+
const hydratedStores = new Map();
|
|
374
|
+
for (const [name, store] of this.stores) {
|
|
375
|
+
try {
|
|
376
|
+
const state = store.api.getState();
|
|
377
|
+
const marker = state;
|
|
378
|
+
if (!marker || marker.__buoyStateOnDevice !== true) {
|
|
379
|
+
hydratedStores.set(name, state);
|
|
380
|
+
}
|
|
381
|
+
} catch {
|
|
382
|
+
// ignore
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
this.stores = new Map(storeSnapshots.map(snapshot => {
|
|
386
|
+
const incoming = snapshot.currentState;
|
|
387
|
+
const kept = hydratedStores.get(snapshot.name);
|
|
388
|
+
const currentState = kept !== undefined && incoming?.__buoyStateOnDevice === true ? kept : snapshot.currentState;
|
|
389
|
+
return [snapshot.name, {
|
|
390
|
+
name: snapshot.name,
|
|
391
|
+
api: {
|
|
392
|
+
getState: () => currentState,
|
|
393
|
+
setState: (partial, replace) => {
|
|
394
|
+
this.remoteSetStateHandler?.(snapshot.name, partial, replace);
|
|
395
|
+
},
|
|
396
|
+
subscribe: () => () => {}
|
|
336
397
|
},
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
398
|
+
stateChangeCount: snapshot.stateChangeCount,
|
|
399
|
+
isPersisted: snapshot.isPersisted,
|
|
400
|
+
persistName: snapshot.persistName,
|
|
401
|
+
color: snapshot.color
|
|
402
|
+
}];
|
|
403
|
+
}));
|
|
404
|
+
this.notifyListeners();
|
|
405
|
+
this.notifyStoreListeners();
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* Hydrate one mirrored change with real trees fetched on demand from the
|
|
410
|
+
* device via the adapter's `getChangeDetail`. Remote-mirror (desktop) only.
|
|
411
|
+
*/
|
|
412
|
+
hydrateChange(id, patch) {
|
|
413
|
+
const index = this.stateChanges.findIndex(c => c.id === id);
|
|
414
|
+
if (index === -1) return;
|
|
415
|
+
this.stateChanges = [...this.stateChanges.slice(0, index), {
|
|
416
|
+
...this.stateChanges[index],
|
|
417
|
+
...patch
|
|
418
|
+
}, ...this.stateChanges.slice(index + 1)];
|
|
344
419
|
this.notifyListeners();
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* Hydrate one mirrored store's currentState fetched on demand from the
|
|
424
|
+
* device via the adapter's `getStoreState`. Remote-mirror (desktop) only.
|
|
425
|
+
*/
|
|
426
|
+
hydrateStoreState(storeName, currentState) {
|
|
427
|
+
const store = this.stores.get(storeName);
|
|
428
|
+
if (!store) return;
|
|
429
|
+
this.stores.set(storeName, {
|
|
430
|
+
...store,
|
|
431
|
+
api: {
|
|
432
|
+
...store.api,
|
|
433
|
+
getState: () => currentState
|
|
434
|
+
}
|
|
435
|
+
});
|
|
345
436
|
this.notifyStoreListeners();
|
|
346
437
|
}
|
|
347
438
|
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
* );
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
|
+
import "./zustand/utils/snapshotProvider";
|
|
37
38
|
export { zustandToolPreset, createZustandTool } from "./preset";
|
|
38
39
|
export { watchStores } from "./zustand/utils/buoyZustandMiddleware";
|
|
39
40
|
export { buoyDevTools } from "./zustand/utils/buoyZustandMiddleware";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAGH,OAAO,kCAAkC,CAAC;AAK1C,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAKhE,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAKpE,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAKrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAK5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAChF,YAAY,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AAO3F,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAClF,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AACrF,OAAO,EACL,yBAAyB,EACzB,wBAAwB,GACzB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAKnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAKvE,YAAY,EACV,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,EACb,mBAAmB,EACnB,4BAA4B,GAC7B,MAAM,iBAAiB,CAAC;AAKzB,gBAAgB;AAChB,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* - Events tab: Live state change monitoring with diffs
|
|
7
7
|
*/
|
|
8
8
|
import type { ZustandModalProps } from "../types";
|
|
9
|
-
export declare function ZustandModal({ visible, onClose, onBack, onMinimize, enableSharedModalDimensions, inline, storesLoading, }: ZustandModalProps): import("react").JSX.Element | null;
|
|
9
|
+
export declare function ZustandModal({ visible, onClose, onBack, onMinimize, enableSharedModalDimensions, inline, storesLoading, initialTab, initialSelectedChangeId, initialDetailView, onChangeSelect, onStoreExpand, }: ZustandModalProps): import("react").JSX.Element | null;
|
|
10
10
|
/**
|
|
11
11
|
* The same Zustand tool as `ZustandModal`, rendered INLINE for hosts that
|
|
12
12
|
* place tools in a panel rather than a modal. Exists so there is exactly one
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZustandModal.d.ts","sourceRoot":"","sources":["../../../../src/zustand/components/ZustandModal.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA2CH,OAAO,KAAK,EAAE,iBAAiB,EAAsB,MAAM,UAAU,CAAC;AAqBtE,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,OAAO,EACP,MAAM,EACN,UAAU,EACV,2BAAmC,EACnC,MAAc,EACd,aAAqB,
|
|
1
|
+
{"version":3,"file":"ZustandModal.d.ts","sourceRoot":"","sources":["../../../../src/zustand/components/ZustandModal.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA2CH,OAAO,KAAK,EAAE,iBAAiB,EAAsB,MAAM,UAAU,CAAC;AAqBtE,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,OAAO,EACP,MAAM,EACN,UAAU,EACV,2BAAmC,EACnC,MAAc,EACd,aAAqB,EACrB,UAAqB,EACrB,uBAAuB,EACvB,iBAAiB,EACjB,cAAc,EACd,aAAa,GACd,EAAE,iBAAiB,sCAklBnB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,KAAK,GAAE,IAAI,CAAC,iBAAiB,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAM,+BAGtE"}
|
|
@@ -9,14 +9,17 @@
|
|
|
9
9
|
* Mirrors ReduxActionDetailContent.tsx
|
|
10
10
|
*/
|
|
11
11
|
import type { ZustandStateChange } from "../types";
|
|
12
|
+
import { type ZustandDetailViewMode } from "./ZustandDetailViewToggle";
|
|
12
13
|
interface ZustandStateDetailContentProps {
|
|
13
14
|
change: ZustandStateChange;
|
|
14
15
|
changes: ZustandStateChange[];
|
|
15
16
|
selectedIndex: number;
|
|
16
17
|
onIndexChange: (index: number) => void;
|
|
17
18
|
disableInternalFooter?: boolean;
|
|
19
|
+
/** Seed the CHANGE / STATE / DIFF toggle once; taps own it afterwards. */
|
|
20
|
+
initialView?: ZustandDetailViewMode;
|
|
18
21
|
}
|
|
19
|
-
export declare function ZustandStateDetailContent({ change, changes, selectedIndex, onIndexChange, disableInternalFooter, }: ZustandStateDetailContentProps): import("react").JSX.Element;
|
|
22
|
+
export declare function ZustandStateDetailContent({ change, changes, selectedIndex, onIndexChange, disableInternalFooter, initialView, }: ZustandStateDetailContentProps): import("react").JSX.Element;
|
|
20
23
|
/**
|
|
21
24
|
* External footer component for modal use
|
|
22
25
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZustandStateDetailContent.d.ts","sourceRoot":"","sources":["../../../../src/zustand/components/ZustandStateDetailContent.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAiBH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"ZustandStateDetailContent.d.ts","sourceRoot":"","sources":["../../../../src/zustand/components/ZustandStateDetailContent.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAiBH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,2BAA2B,CAAC;AAKnC,UAAU,8BAA8B;IACtC,MAAM,EAAE,kBAAkB,CAAC;IAC3B,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAC9B,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,0EAA0E;IAC1E,WAAW,CAAC,EAAE,qBAAqB,CAAC;CACrC;AAyCD,wBAAgB,yBAAyB,CAAC,EACxC,MAAM,EACN,OAAO,EACP,aAAa,EACb,aAAa,EACb,qBAA6B,EAC7B,WAAsB,GACvB,EAAE,8BAA8B,+BA6LhC;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,MAAM,EACN,OAAO,EACP,aAAa,EACb,aAAa,GACd,EAAE;IACD,MAAM,EAAE,kBAAkB,CAAC;IAC3B,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAC9B,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC,sCAmBA"}
|
|
@@ -19,7 +19,9 @@ interface ZustandStoreBrowserProps {
|
|
|
19
19
|
* watch handshake).
|
|
20
20
|
*/
|
|
21
21
|
isLoading?: boolean;
|
|
22
|
+
/** Fired when a store row is expanded (not when collapsed). */
|
|
23
|
+
onStoreExpand?: (storeName: string) => void;
|
|
22
24
|
}
|
|
23
|
-
export declare function ZustandStoreBrowser({ stores, searchQuery, onViewHistory, isLoading, }: ZustandStoreBrowserProps): import("react").JSX.Element;
|
|
25
|
+
export declare function ZustandStoreBrowser({ stores, searchQuery, onViewHistory, isLoading, onStoreExpand, }: ZustandStoreBrowserProps): import("react").JSX.Element;
|
|
24
26
|
export {};
|
|
25
27
|
//# sourceMappingURL=ZustandStoreBrowser.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZustandStoreBrowser.d.ts","sourceRoot":"","sources":["../../../../src/zustand/components/ZustandStoreBrowser.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAsBH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAGjD,UAAU,wBAAwB;IAChC,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ZustandStoreBrowser.d.ts","sourceRoot":"","sources":["../../../../src/zustand/components/ZustandStoreBrowser.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAsBH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAGjD,UAAU,wBAAwB;IAChC,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,+DAA+D;IAC/D,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAyHD,wBAAgB,mBAAmB,CAAC,EAClC,MAAM,EACN,WAAW,EACX,aAAa,EACb,SAAiB,EACjB,aAAa,GACd,EAAE,wBAAwB,+BA8F1B"}
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
import type { ZustandStateChange } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Sentinel used in WIRE-FORM snapshots in place of raw prevState/nextState.
|
|
4
|
+
* Same hazard as redux: up to 200 changes × 2 full trees on every snapshot
|
|
5
|
+
* freeze/OOM-killed large apps. Dashboards fetch trees via `getChangeDetail`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const STATE_ON_DEVICE: Readonly<{
|
|
8
|
+
__buoyStateOnDevice: true;
|
|
9
|
+
note: "State trees stay on the device — fetched on demand via getChangeDetail / getStoreState.";
|
|
10
|
+
}>;
|
|
11
|
+
/** Wire-form sentinel for an oversized `partial` (replace can carry a whole tree). */
|
|
12
|
+
export declare const PAYLOAD_ON_DEVICE: Readonly<{
|
|
13
|
+
__buoyPayloadOnDevice: true;
|
|
14
|
+
note: "Partial stays on the device — fetched on demand via getChangeDetail.";
|
|
15
|
+
}>;
|
|
1
16
|
/**
|
|
2
17
|
* Sync adapter for the zustand tool, consumed by @buoy-gg/external-sync's
|
|
3
18
|
* `useExternalSync` (structurally matches its ToolSyncAdapter interface so
|
|
@@ -9,17 +24,64 @@
|
|
|
9
24
|
* change timeline and the store registry (with each store's current state)
|
|
10
25
|
* so the dashboard can render the store browser.
|
|
11
26
|
*
|
|
27
|
+
* v2: change-log prevState/nextState are replaced with on-device markers
|
|
28
|
+
* (see STATE_ON_DEVICE). Dashboards fetch trees via `getChangeDetail`.
|
|
29
|
+
* Oversized / unserializable `stores[].currentState` uses the same marker
|
|
30
|
+
* and is fetched via `getStoreState`.
|
|
31
|
+
*
|
|
12
32
|
* The `setState` action powers remote time-travel/reset from the dashboard.
|
|
13
33
|
*/
|
|
14
34
|
export declare const zustandSyncAdapter: {
|
|
15
35
|
version: number;
|
|
16
36
|
getSnapshot: () => {
|
|
17
|
-
changes:
|
|
18
|
-
stores:
|
|
37
|
+
changes: ZustandStateChange[];
|
|
38
|
+
stores: {
|
|
39
|
+
currentState: unknown;
|
|
40
|
+
name: string;
|
|
41
|
+
stateChangeCount: number;
|
|
42
|
+
isPersisted: boolean;
|
|
43
|
+
persistName?: string;
|
|
44
|
+
color: string;
|
|
45
|
+
}[];
|
|
19
46
|
};
|
|
20
47
|
subscribe: (onChange: () => void) => () => void;
|
|
21
48
|
actions: {
|
|
22
49
|
clearEvents: () => void;
|
|
50
|
+
/**
|
|
51
|
+
* On-demand detail: one change's real prevState/nextState/partial.
|
|
52
|
+
* The per-snapshot stream stays tree-free; this is the explicit,
|
|
53
|
+
* size-guarded channel for the detail pane.
|
|
54
|
+
*/
|
|
55
|
+
getChangeDetail: (params: unknown) => {
|
|
56
|
+
found: false;
|
|
57
|
+
reason: string;
|
|
58
|
+
id?: undefined;
|
|
59
|
+
prevState?: undefined;
|
|
60
|
+
nextState?: undefined;
|
|
61
|
+
partial?: undefined;
|
|
62
|
+
} | {
|
|
63
|
+
found: true;
|
|
64
|
+
id: string;
|
|
65
|
+
prevState: unknown;
|
|
66
|
+
nextState: unknown;
|
|
67
|
+
partial: unknown;
|
|
68
|
+
reason?: undefined;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* On-demand current state for one store. Wire-form snapshots replace
|
|
72
|
+
* oversized / unserializable `currentState` with STATE_ON_DEVICE.
|
|
73
|
+
*/
|
|
74
|
+
getStoreState: (params: unknown) => {
|
|
75
|
+
found: false;
|
|
76
|
+
reason: string;
|
|
77
|
+
storeName?: undefined;
|
|
78
|
+
currentState?: undefined;
|
|
79
|
+
} | {
|
|
80
|
+
found: true;
|
|
81
|
+
storeName: string;
|
|
82
|
+
currentState: unknown;
|
|
83
|
+
reason?: undefined;
|
|
84
|
+
};
|
|
23
85
|
/**
|
|
24
86
|
* Compact current-state reader for a remote driver (MCP/LLM): the registered
|
|
25
87
|
* stores with light metadata; each store's full `currentState` object stays
|
|
@@ -44,7 +106,13 @@ export declare const zustandSyncAdapter: {
|
|
|
44
106
|
returned: number;
|
|
45
107
|
includedValues: boolean;
|
|
46
108
|
};
|
|
47
|
-
setState: (params: unknown) =>
|
|
109
|
+
setState: (params: unknown) => {
|
|
110
|
+
ok: boolean;
|
|
111
|
+
error: string;
|
|
112
|
+
} | {
|
|
113
|
+
ok: boolean;
|
|
114
|
+
error?: undefined;
|
|
115
|
+
};
|
|
48
116
|
};
|
|
49
117
|
};
|
|
50
118
|
//# sourceMappingURL=zustandSyncAdapter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zustandSyncAdapter.d.ts","sourceRoot":"","sources":["../../../../src/zustand/sync/zustandSyncAdapter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"zustandSyncAdapter.d.ts","sourceRoot":"","sources":["../../../../src/zustand/sync/zustandSyncAdapter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD;;;;GAIG;AACH,eAAO,MAAM,eAAe;;;EAG1B,CAAC;AAEH,sFAAsF;AACtF,eAAO,MAAM,iBAAiB;;;EAG5B,CAAC;AAwFH;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;0BASP,MAAM,IAAI;;;QAY9B;;;;WAIG;kCACuB,OAAO;;;;;;;;;;;;;;;QA2BjC;;;WAGG;gCACqB,OAAO;;;;;;;;;;;QAiC/B;;;;;WAKG;6BACkB,OAAO;;;;;;;;;;;;;;;;;;2BAsBT,OAAO;;;;;;;;CAS7B,CAAC"}
|
|
@@ -81,6 +81,32 @@ export interface ZustandModalProps {
|
|
|
81
81
|
* that genuinely has stores reads as empty for the first second or two.
|
|
82
82
|
*/
|
|
83
83
|
storesLoading?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Open on this tab. Used by hosts that deep-link into the tool (docs live
|
|
86
|
+
* tour). Defaults to `"stores"`.
|
|
87
|
+
*/
|
|
88
|
+
initialTab?: "stores" | "events";
|
|
89
|
+
/**
|
|
90
|
+
* Open straight into this change's detail view, by change id. Applied once
|
|
91
|
+
* the id appears in the visible list, then left alone — Back closes the
|
|
92
|
+
* detail and it stays closed. Null/undefined means "don't touch selection".
|
|
93
|
+
*/
|
|
94
|
+
initialSelectedChangeId?: string | null;
|
|
95
|
+
/**
|
|
96
|
+
* Which detail view that deep-link opens on (`change` | `state` | `diff`).
|
|
97
|
+
*/
|
|
98
|
+
initialDetailView?: "change" | "state" | "diff";
|
|
99
|
+
/**
|
|
100
|
+
* Fired when the user selects a change (opens its detail view). Remote
|
|
101
|
+
* mirrors (Buoy Desktop) use this to fetch the change's real state trees
|
|
102
|
+
* on demand — wire-form snapshots carry markers instead of trees.
|
|
103
|
+
*/
|
|
104
|
+
onChangeSelect?: (change: ZustandStateChange) => void;
|
|
105
|
+
/**
|
|
106
|
+
* Fired when the user expands a store in the browser. Remote mirrors use
|
|
107
|
+
* this to fetch oversized `currentState` via `getStoreState`.
|
|
108
|
+
*/
|
|
109
|
+
onStoreExpand?: (storeName: string) => void;
|
|
84
110
|
visible: boolean;
|
|
85
111
|
onClose: () => void;
|
|
86
112
|
onBack?: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/zustand/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAC3B,UAAU,GACV,SAAS,GACT,SAAS,GACT,SAAS,CAAC;AAEd;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,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,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,OAAO,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;IAGjB,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE;QACH,QAAQ,EAAE,MAAM,OAAO,CAAC;QACxB,eAAe,CAAC,EAAE,MAAM,OAAO,CAAC;QAChC,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;QACxD,SAAS,EAAE,CAAC,QA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":3,"file":"snapshotProvider.d.ts","sourceRoot":"","sources":["../../../../src/zustand/utils/snapshotProvider.ts"],"names":[],"mappings":""}
|