@buoy-gg/zustand 7.0.36 → 7.0.38
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 +27 -5
- package/lib/commonjs/index.js +1 -105
- package/lib/commonjs/preset.js +1 -102
- package/lib/commonjs/zustand/components/ZustandActionButton.js +1 -118
- package/lib/commonjs/zustand/components/ZustandDetailViewToggle.js +1 -48
- package/lib/commonjs/zustand/components/ZustandEventFilterView.js +1 -43
- package/lib/commonjs/zustand/components/ZustandIcon.js +1 -18
- package/lib/commonjs/zustand/components/ZustandModal.js +1 -772
- package/lib/commonjs/zustand/components/ZustandStateChangeItem.js +1 -117
- package/lib/commonjs/zustand/components/ZustandStateDetailContent.js +1 -372
- package/lib/commonjs/zustand/components/ZustandStateInfoView.js +1 -488
- package/lib/commonjs/zustand/components/ZustandStoreBrowser.js +1 -204
- package/lib/commonjs/zustand/components/ZustandStoreDetailContent.js +1 -471
- package/lib/commonjs/zustand/components/ZustandStoreEditorScreen.js +1 -393
- package/lib/commonjs/zustand/hooks/useZustandStateChanges.js +1 -72
- package/lib/commonjs/zustand/sync/zustandSyncAdapter.js +1 -382
- package/lib/commonjs/zustand/utils/buoyZustandMiddleware.js +1 -284
- package/lib/commonjs/zustand/utils/editableState.js +1 -139
- package/lib/commonjs/zustand/utils/snapshotProvider.js +1 -209
- package/lib/commonjs/zustand/utils/testIDs.js +1 -82
- package/lib/commonjs/zustand/utils/zustandStateStore.js +1 -375
- package/lib/module/index.js +1 -90
- package/lib/module/preset.js +1 -98
- package/lib/module/zustand/components/ZustandActionButton.js +1 -114
- package/lib/module/zustand/components/ZustandDetailViewToggle.js +1 -43
- package/lib/module/zustand/components/ZustandEventFilterView.js +1 -39
- package/lib/module/zustand/components/ZustandIcon.js +1 -11
- package/lib/module/zustand/components/ZustandModal.js +1 -767
- package/lib/module/zustand/components/ZustandStateChangeItem.js +1 -113
- package/lib/module/zustand/components/ZustandStateDetailContent.js +1 -368
- package/lib/module/zustand/components/ZustandStateInfoView.js +1 -483
- package/lib/module/zustand/components/ZustandStoreBrowser.js +1 -200
- package/lib/module/zustand/components/ZustandStoreDetailContent.js +1 -469
- package/lib/module/zustand/components/ZustandStoreEditorScreen.js +1 -389
- package/lib/module/zustand/hooks/useZustandStateChanges.js +1 -68
- package/lib/module/zustand/sync/zustandSyncAdapter.js +1 -380
- package/lib/module/zustand/utils/buoyZustandMiddleware.js +1 -278
- package/lib/module/zustand/utils/editableState.js +1 -131
- package/lib/module/zustand/utils/snapshotProvider.js +1 -209
- package/lib/module/zustand/utils/testIDs.js +1 -74
- package/lib/module/zustand/utils/zustandStateStore.js +1 -371
- package/package.json +4 -4
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/preset.d.ts.map +0 -1
- package/lib/typescript/zustand/components/ZustandActionButton.d.ts.map +0 -1
- package/lib/typescript/zustand/components/ZustandDetailViewToggle.d.ts.map +0 -1
- package/lib/typescript/zustand/components/ZustandEventFilterView.d.ts.map +0 -1
- package/lib/typescript/zustand/components/ZustandIcon.d.ts.map +0 -1
- package/lib/typescript/zustand/components/ZustandModal.d.ts.map +0 -1
- package/lib/typescript/zustand/components/ZustandStateChangeItem.d.ts.map +0 -1
- package/lib/typescript/zustand/components/ZustandStateDetailContent.d.ts.map +0 -1
- package/lib/typescript/zustand/components/ZustandStateInfoView.d.ts.map +0 -1
- package/lib/typescript/zustand/components/ZustandStoreBrowser.d.ts.map +0 -1
- package/lib/typescript/zustand/components/ZustandStoreDetailContent.d.ts.map +0 -1
- package/lib/typescript/zustand/components/ZustandStoreEditorScreen.d.ts.map +0 -1
- package/lib/typescript/zustand/hooks/useZustandStateChanges.d.ts.map +0 -1
- package/lib/typescript/zustand/sync/zustandSyncAdapter.d.ts.map +0 -1
- package/lib/typescript/zustand/types/index.d.ts.map +0 -1
- package/lib/typescript/zustand/utils/buoyZustandMiddleware.d.ts.map +0 -1
- package/lib/typescript/zustand/utils/editableState.d.ts.map +0 -1
- package/lib/typescript/zustand/utils/snapshotProvider.d.ts.map +0 -1
- package/lib/typescript/zustand/utils/testIDs.d.ts.map +0 -1
- package/lib/typescript/zustand/utils/zustandStateStore.d.ts.map +0 -1
|
@@ -1,371 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Zustand state store - captures and stores Zustand state changes
|
|
5
|
-
*
|
|
6
|
-
* The generic event-log half (ring buffer, listeners, clear-forwarding for
|
|
7
|
-
* the desktop mirror, pause/suppress flags, hydrate-by-id) is the shared
|
|
8
|
-
* `ChangeLog`; this file owns the zustand-specific half — the store registry,
|
|
9
|
-
* snapshots, mirror rebuild, filters and stats.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
import { ChangeLog, entityColor, formatValuePreview, shallowDiffSummary } from "@buoy-gg/shared-ui";
|
|
13
|
-
// ============================================
|
|
14
|
-
// Store Color Palette
|
|
15
|
-
// ============================================
|
|
16
|
-
|
|
17
|
-
const STORE_COLORS = {
|
|
18
|
-
counter: "#10B981",
|
|
19
|
-
// emerald
|
|
20
|
-
auth: "#8B5CF6",
|
|
21
|
-
// purple
|
|
22
|
-
user: "#3B82F6",
|
|
23
|
-
// blue
|
|
24
|
-
cart: "#EC4899",
|
|
25
|
-
// pink
|
|
26
|
-
app: "#6366F1",
|
|
27
|
-
// indigo
|
|
28
|
-
ui: "#F59E0B",
|
|
29
|
-
// amber
|
|
30
|
-
settings: "#14B8A6",
|
|
31
|
-
// teal
|
|
32
|
-
theme: "#06B6D4",
|
|
33
|
-
// cyan
|
|
34
|
-
navigation: "#F97316",
|
|
35
|
-
// orange
|
|
36
|
-
form: "#EF4444" // red
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Get consistent color for a store based on its name
|
|
41
|
-
*/
|
|
42
|
-
function getStoreColor(storeName) {
|
|
43
|
-
return entityColor(storeName, STORE_COLORS);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Format payload preview for display
|
|
48
|
-
*/
|
|
49
|
-
function formatPartialPreview(partial, maxLength = 40) {
|
|
50
|
-
return formatValuePreview(partial, {
|
|
51
|
-
maxLength,
|
|
52
|
-
undefinedLabel: "",
|
|
53
|
-
functionLabel: "(updater fn)"
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// ============================================
|
|
58
|
-
// Zustand State Store
|
|
59
|
-
// ============================================
|
|
60
|
-
|
|
61
|
-
class ZustandStateStore extends ChangeLog {
|
|
62
|
-
stores = new Map();
|
|
63
|
-
storeListeners = new Set();
|
|
64
|
-
remoteSetStateHandler = null;
|
|
65
|
-
|
|
66
|
-
// ---- State Change Tracking ----
|
|
67
|
-
|
|
68
|
-
addStateChange(params) {
|
|
69
|
-
if (!this.canRecord()) return;
|
|
70
|
-
const {
|
|
71
|
-
storeName,
|
|
72
|
-
partial,
|
|
73
|
-
replace,
|
|
74
|
-
prevState,
|
|
75
|
-
nextState,
|
|
76
|
-
duration,
|
|
77
|
-
category,
|
|
78
|
-
isPersisted = false
|
|
79
|
-
} = params;
|
|
80
|
-
const hasStateChange = prevState !== nextState;
|
|
81
|
-
// `changedCount` counts the keys in `changedKeys` and nothing else, so the
|
|
82
|
-
// row's "N keys changed" and the detail page's CHANGED KEYS card agree —
|
|
83
|
-
// including the persist-rehydrate case where the object is replaced
|
|
84
|
-
// without any top-level value moving.
|
|
85
|
-
const {
|
|
86
|
-
summary,
|
|
87
|
-
changedKeys,
|
|
88
|
-
changedCount
|
|
89
|
-
} = shallowDiffSummary(prevState, nextState);
|
|
90
|
-
const partialPreview = formatPartialPreview(partial);
|
|
91
|
-
const isSlowUpdate = (duration ?? 0) > 16;
|
|
92
|
-
const resolvedCategory = category ?? (replace ? "replace" : "setState");
|
|
93
|
-
const stateChange = {
|
|
94
|
-
id: this.nextId(),
|
|
95
|
-
storeName,
|
|
96
|
-
timestamp: Date.now(),
|
|
97
|
-
prevState,
|
|
98
|
-
nextState,
|
|
99
|
-
partial,
|
|
100
|
-
duration,
|
|
101
|
-
hasStateChange,
|
|
102
|
-
replace,
|
|
103
|
-
category: resolvedCategory,
|
|
104
|
-
changedKeys,
|
|
105
|
-
changedKeysCount: changedCount,
|
|
106
|
-
diffSummary: summary,
|
|
107
|
-
partialPreview,
|
|
108
|
-
isSlowUpdate,
|
|
109
|
-
isPersisted
|
|
110
|
-
};
|
|
111
|
-
this.push(stateChange);
|
|
112
|
-
|
|
113
|
-
// Update store change count
|
|
114
|
-
const storeInfo = this.stores.get(storeName);
|
|
115
|
-
if (storeInfo) {
|
|
116
|
-
storeInfo.stateChangeCount++;
|
|
117
|
-
}
|
|
118
|
-
this.notifyListeners();
|
|
119
|
-
}
|
|
120
|
-
getStateChanges() {
|
|
121
|
-
return this.getAll();
|
|
122
|
-
}
|
|
123
|
-
getStateChangeById(id) {
|
|
124
|
-
return this.getById(id);
|
|
125
|
-
}
|
|
126
|
-
clearStateChanges() {
|
|
127
|
-
// Reset counts
|
|
128
|
-
for (const store of this.stores.values()) {
|
|
129
|
-
store.stateChangeCount = 0;
|
|
130
|
-
}
|
|
131
|
-
this.clear();
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
// ---- Remote Mirror Mode ----
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Replace the change log without touching the store registry. Used when a
|
|
138
|
-
* host keeps real registered stores (JUMP / RESET stay wired) but needs to
|
|
139
|
-
* reseed the event list — the docs live tour, or any mirror that already
|
|
140
|
-
* called `registerStore`. Does not fire `onClear`. Respects the enabled
|
|
141
|
-
* flag so the UI's pause button freezes the reseed.
|
|
142
|
-
*/
|
|
143
|
-
replaceStateChanges(changes) {
|
|
144
|
-
if (!this.getEnabled()) return;
|
|
145
|
-
for (const store of this.stores.values()) {
|
|
146
|
-
store.stateChangeCount = 0;
|
|
147
|
-
}
|
|
148
|
-
const kept = changes.slice(0, this.max);
|
|
149
|
-
for (const change of kept) {
|
|
150
|
-
const store = this.stores.get(change.storeName);
|
|
151
|
-
if (store) store.stateChangeCount++;
|
|
152
|
-
}
|
|
153
|
-
this.setItems(kept);
|
|
154
|
-
this.notifyStoreListeners();
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* Serializable snapshot of the tracked stores (registry metadata plus each
|
|
159
|
-
* store's current state). Used by the sync adapter on the device side —
|
|
160
|
-
* the live `api` handles can't go over the wire.
|
|
161
|
-
*/
|
|
162
|
-
getStoreSnapshots() {
|
|
163
|
-
return Array.from(this.stores.values()).map(store => {
|
|
164
|
-
let currentState;
|
|
165
|
-
try {
|
|
166
|
-
currentState = store.api.getState();
|
|
167
|
-
} catch {
|
|
168
|
-
currentState = undefined;
|
|
169
|
-
}
|
|
170
|
-
return {
|
|
171
|
-
name: store.name,
|
|
172
|
-
stateChangeCount: store.stateChangeCount,
|
|
173
|
-
isPersisted: store.isPersisted,
|
|
174
|
-
persistName: store.persistName,
|
|
175
|
-
// Persisted is not the same as re-readable: a store registered before
|
|
176
|
-
// its persist middleware attached has a name but no handle. The
|
|
177
|
-
// Storage tool needs the difference to decide between offering "apply"
|
|
178
|
-
// and telling the user to restart.
|
|
179
|
-
canRehydrate: typeof store.rehydrate === "function",
|
|
180
|
-
color: store.color,
|
|
181
|
-
currentState
|
|
182
|
-
};
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* Handler invoked when the UI calls setState on a mirrored store (e.g.
|
|
188
|
-
* time-travel from the dashboard). Forward it to the synced device.
|
|
189
|
-
*/
|
|
190
|
-
setRemoteSetStateHandler(handler) {
|
|
191
|
-
this.remoteSetStateHandler = handler;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* Replace the entire mirror contents from a synced device snapshot. The
|
|
196
|
-
* rebuilt registry entries get stub `api` handles: getState() serves the
|
|
197
|
-
* snapshotted state, setState() forwards to the remote handler. Respects
|
|
198
|
-
* the enabled flag so the UI's pause button freezes the mirror.
|
|
199
|
-
*/
|
|
200
|
-
replaceFromSnapshot(changes, storeSnapshots) {
|
|
201
|
-
if (!this.getEnabled()) return;
|
|
202
|
-
|
|
203
|
-
// Preserve trees a remote mirror already hydrated — wire-form snapshots
|
|
204
|
-
// always carry markers, and a later snapshot must not blank the detail pane.
|
|
205
|
-
const hydrated = new Map();
|
|
206
|
-
for (const existing of this.items) {
|
|
207
|
-
const prev = existing.prevState;
|
|
208
|
-
if (!prev || prev.__buoyStateOnDevice !== true) {
|
|
209
|
-
hydrated.set(existing.id, existing);
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
const merged = changes.slice(0, this.max).map(change => {
|
|
213
|
-
const kept = hydrated.get(change.id);
|
|
214
|
-
const incoming = change.prevState;
|
|
215
|
-
return kept && incoming?.__buoyStateOnDevice === true ? {
|
|
216
|
-
...change,
|
|
217
|
-
prevState: kept.prevState,
|
|
218
|
-
nextState: kept.nextState,
|
|
219
|
-
partial: kept.partial
|
|
220
|
-
} : change;
|
|
221
|
-
});
|
|
222
|
-
|
|
223
|
-
// Preserve currentState a remote mirror already hydrated — oversized
|
|
224
|
-
// stores arrive as STATE_ON_DEVICE markers on every snapshot.
|
|
225
|
-
const hydratedStores = new Map();
|
|
226
|
-
for (const [name, store] of this.stores) {
|
|
227
|
-
try {
|
|
228
|
-
const state = store.api.getState();
|
|
229
|
-
const marker = state;
|
|
230
|
-
if (!marker || marker.__buoyStateOnDevice !== true) {
|
|
231
|
-
hydratedStores.set(name, state);
|
|
232
|
-
}
|
|
233
|
-
} catch {
|
|
234
|
-
// ignore
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
this.stores = new Map(storeSnapshots.map(snapshot => {
|
|
238
|
-
const incoming = snapshot.currentState;
|
|
239
|
-
const kept = hydratedStores.get(snapshot.name);
|
|
240
|
-
const currentState = kept !== undefined && incoming?.__buoyStateOnDevice === true ? kept : snapshot.currentState;
|
|
241
|
-
return [snapshot.name, {
|
|
242
|
-
name: snapshot.name,
|
|
243
|
-
api: {
|
|
244
|
-
getState: () => currentState,
|
|
245
|
-
setState: (partial, replace) => {
|
|
246
|
-
this.remoteSetStateHandler?.(snapshot.name, partial, replace);
|
|
247
|
-
},
|
|
248
|
-
subscribe: () => () => {}
|
|
249
|
-
},
|
|
250
|
-
stateChangeCount: snapshot.stateChangeCount,
|
|
251
|
-
isPersisted: snapshot.isPersisted,
|
|
252
|
-
persistName: snapshot.persistName,
|
|
253
|
-
color: snapshot.color
|
|
254
|
-
}];
|
|
255
|
-
}));
|
|
256
|
-
this.setItems(merged);
|
|
257
|
-
this.notifyStoreListeners();
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
/**
|
|
261
|
-
* Hydrate one mirrored change with real trees fetched on demand from the
|
|
262
|
-
* device via the adapter's `getChangeDetail`. Remote-mirror (desktop) only.
|
|
263
|
-
*/
|
|
264
|
-
hydrateChange(id, patch) {
|
|
265
|
-
this.hydrateById(id, patch);
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
/**
|
|
269
|
-
* Hydrate one mirrored store's currentState fetched on demand from the
|
|
270
|
-
* device via the adapter's `getStoreState`. Remote-mirror (desktop) only.
|
|
271
|
-
*/
|
|
272
|
-
hydrateStoreState(storeName, currentState) {
|
|
273
|
-
const store = this.stores.get(storeName);
|
|
274
|
-
if (!store) return;
|
|
275
|
-
this.stores.set(storeName, {
|
|
276
|
-
...store,
|
|
277
|
-
api: {
|
|
278
|
-
...store.api,
|
|
279
|
-
getState: () => currentState
|
|
280
|
-
}
|
|
281
|
-
});
|
|
282
|
-
this.notifyStoreListeners();
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
// ---- Store Registry ----
|
|
286
|
-
|
|
287
|
-
registerStore(name, api, options) {
|
|
288
|
-
if (this.stores.has(name)) return;
|
|
289
|
-
const storeInfo = {
|
|
290
|
-
name,
|
|
291
|
-
api,
|
|
292
|
-
stateChangeCount: 0,
|
|
293
|
-
isPersisted: options?.isPersisted ?? false,
|
|
294
|
-
persistName: options?.persistName,
|
|
295
|
-
rehydrate: options?.rehydrate,
|
|
296
|
-
color: getStoreColor(name)
|
|
297
|
-
};
|
|
298
|
-
this.stores.set(name, storeInfo);
|
|
299
|
-
this.notifyStoreListeners();
|
|
300
|
-
}
|
|
301
|
-
unregisterStore(name) {
|
|
302
|
-
this.stores.delete(name);
|
|
303
|
-
this.notifyStoreListeners();
|
|
304
|
-
}
|
|
305
|
-
getStores() {
|
|
306
|
-
return Array.from(this.stores.values());
|
|
307
|
-
}
|
|
308
|
-
getStore(name) {
|
|
309
|
-
return this.stores.get(name);
|
|
310
|
-
}
|
|
311
|
-
getStoreColor(name) {
|
|
312
|
-
return this.stores.get(name)?.color ?? getStoreColor(name);
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
// ---- Filtering ----
|
|
316
|
-
|
|
317
|
-
filterStateChanges(filter) {
|
|
318
|
-
let filtered = this.getAll();
|
|
319
|
-
if (filter.searchText) {
|
|
320
|
-
const search = filter.searchText.toLowerCase();
|
|
321
|
-
filtered = filtered.filter(c => c.storeName.toLowerCase().includes(search) || c.partialPreview.toLowerCase().includes(search) || c.changedKeys.some(k => k.toLowerCase().includes(search)));
|
|
322
|
-
}
|
|
323
|
-
if (filter.storeNames && filter.storeNames.length > 0) {
|
|
324
|
-
filtered = filtered.filter(c => filter.storeNames.includes(c.storeName));
|
|
325
|
-
}
|
|
326
|
-
if (filter.onlyWithChanges) {
|
|
327
|
-
filtered = filtered.filter(c => c.hasStateChange);
|
|
328
|
-
}
|
|
329
|
-
return filtered;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
// ---- Stats ----
|
|
333
|
-
|
|
334
|
-
getStats() {
|
|
335
|
-
const total = this.items.length;
|
|
336
|
-
const withChanges = this.items.filter(c => c.hasStateChange).length;
|
|
337
|
-
const storeCount = this.stores.size;
|
|
338
|
-
const durations = this.items.filter(c => c.duration !== undefined).map(c => c.duration);
|
|
339
|
-
const avgDuration = durations.length > 0 ? durations.reduce((sum, d) => sum + d, 0) / durations.length : 0;
|
|
340
|
-
return {
|
|
341
|
-
totalChanges: total,
|
|
342
|
-
changesWithStateChange: withChanges,
|
|
343
|
-
changesWithoutStateChange: total - withChanges,
|
|
344
|
-
storeCount,
|
|
345
|
-
averageDuration: Math.round(avgDuration * 100) / 100
|
|
346
|
-
};
|
|
347
|
-
}
|
|
348
|
-
getUniqueStoreNames() {
|
|
349
|
-
return Array.from(this.stores.keys()).sort();
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
// ---- Enable / Disable ----
|
|
353
|
-
|
|
354
|
-
setMaxChanges(max) {
|
|
355
|
-
this.setMax(max);
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
// ---- Subscriptions ----
|
|
359
|
-
|
|
360
|
-
subscribeToStores(listener) {
|
|
361
|
-
this.storeListeners.add(listener);
|
|
362
|
-
return () => {
|
|
363
|
-
this.storeListeners.delete(listener);
|
|
364
|
-
};
|
|
365
|
-
}
|
|
366
|
-
notifyStoreListeners() {
|
|
367
|
-
const stores = this.getStores();
|
|
368
|
-
this.storeListeners.forEach(listener => listener(stores));
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
export const zustandStateStore = new ZustandStateStore();
|
|
1
|
+
"use strict";import{ChangeLog,entityColor,formatValuePreview,shallowDiffSummary}from"@buoy-gg/shared-ui";const STORE_COLORS={counter:"#10B981",auth:"#8B5CF6",user:"#3B82F6",cart:"#EC4899",app:"#6366F1",ui:"#F59E0B",settings:"#14B8A6",theme:"#06B6D4",navigation:"#F97316",form:"#EF4444"};function getStoreColor(t){return entityColor(t,STORE_COLORS)}function formatPartialPreview(t,e=40){return formatValuePreview(t,{maxLength:e,undefinedLabel:"",functionLabel:"(updater fn)"})}class ZustandStateStore extends ChangeLog{stores=new Map;storeListeners=new Set;remoteSetStateHandler=null;addStateChange(t){if(!this.canRecord())return;const{storeName:e,partial:s,replace:r,prevState:a,nextState:o,duration:n,category:i,isPersisted:h=!1}=t,u=a!==o,{summary:S,changedKeys:c,changedCount:g}=shallowDiffSummary(a,o),l=formatPartialPreview(s),d=(n??0)>16,m=i??(r?"replace":"setState"),f={id:this.nextId(),storeName:e,timestamp:Date.now(),prevState:a,nextState:o,partial:s,duration:n,hasStateChange:u,replace:r,category:m,changedKeys:c,changedKeysCount:g,diffSummary:S,partialPreview:l,isSlowUpdate:d,isPersisted:h};this.push(f);const C=this.stores.get(e);C&&C.stateChangeCount++,this.notifyListeners()}getStateChanges(){return this.getAll()}getStateChangeById(t){return this.getById(t)}clearStateChanges(){for(const t of this.stores.values())t.stateChangeCount=0;this.clear(),this.notifyStoreListeners()}replaceStateChanges(t){if(!this.getEnabled())return;for(const t of this.stores.values())t.stateChangeCount=0;const e=t.slice(0,this.max);for(const t of e){const e=this.stores.get(t.storeName);e&&e.stateChangeCount++}this.setItems(e),this.notifyStoreListeners()}getStoreSnapshots(){return Array.from(this.stores.values()).map(t=>{let e;try{e=t.api.getState()}catch{e=void 0}return{name:t.name,stateChangeCount:t.stateChangeCount,isPersisted:t.isPersisted,persistName:t.persistName,canRehydrate:"function"==typeof t.rehydrate,color:t.color,currentState:e}})}setRemoteSetStateHandler(t){this.remoteSetStateHandler=t}replaceFromSnapshot(t,e){if(!this.getEnabled())return;const s=new Map;for(const t of this.items){const e=t.prevState;e&&!0===e.__buoyStateOnDevice||s.set(t.id,t)}const r=t.slice(0,this.max).map(t=>{const e=s.get(t.id),r=t.prevState;return e&&!0===r?.__buoyStateOnDevice?{...t,prevState:e.prevState,nextState:e.nextState,partial:e.partial}:t}),a=new Map;for(const[t,e]of this.stores)try{const s=e.api.getState();s&&!0===s.__buoyStateOnDevice||a.set(t,s)}catch{}this.stores=new Map(e.map(t=>{const e=t.currentState,s=a.get(t.name),r=void 0!==s&&!0===e?.__buoyStateOnDevice?s:t.currentState;return[t.name,{name:t.name,api:{getState:()=>r,setState:(e,s)=>{this.remoteSetStateHandler?.(t.name,e,s)},subscribe:()=>()=>{}},stateChangeCount:t.stateChangeCount,isPersisted:t.isPersisted,persistName:t.persistName,color:t.color}]})),this.setItems(r),this.notifyStoreListeners()}hydrateChange(t,e){this.hydrateById(t,e)}hydrateStoreState(t,e){const s=this.stores.get(t);s&&(this.stores.set(t,{...s,api:{...s.api,getState:()=>e}}),this.notifyStoreListeners())}registerStore(t,e,s){if(this.stores.has(t))return;const r={name:t,api:e,stateChangeCount:0,isPersisted:s?.isPersisted??!1,persistName:s?.persistName,rehydrate:s?.rehydrate,color:getStoreColor(t)};this.stores.set(t,r),this.notifyStoreListeners()}unregisterStore(t){this.stores.delete(t),this.notifyStoreListeners()}getStores(){return Array.from(this.stores.values())}getStore(t){return this.stores.get(t)}getStoreColor(t){return this.stores.get(t)?.color??getStoreColor(t)}filterStateChanges(t){let e=this.getAll();if(t.searchText){const s=t.searchText.toLowerCase();e=e.filter(t=>t.storeName.toLowerCase().includes(s)||t.partialPreview.toLowerCase().includes(s)||t.changedKeys.some(t=>t.toLowerCase().includes(s)))}return t.storeNames&&t.storeNames.length>0&&(e=e.filter(e=>t.storeNames.includes(e.storeName))),t.onlyWithChanges&&(e=e.filter(t=>t.hasStateChange)),e}getStats(){const t=this.items.length,e=this.items.filter(t=>t.hasStateChange).length,s=this.stores.size,r=this.items.filter(t=>void 0!==t.duration).map(t=>t.duration),a=r.length>0?r.reduce((t,e)=>t+e,0)/r.length:0;return{totalChanges:t,changesWithStateChange:e,changesWithoutStateChange:t-e,storeCount:s,averageDuration:Math.round(100*a)/100}}getUniqueStoreNames(){return Array.from(this.stores.keys()).sort()}setMaxChanges(t){this.setMax(t)}subscribeToStores(t){return this.storeListeners.add(t),()=>{this.storeListeners.delete(t)}}notifyStoreListeners(){const t=this.getStores();this.storeListeners.forEach(e=>e(t))}}export const zustandStateStore=new ZustandStateStore;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buoy-gg/zustand",
|
|
3
|
-
"version": "7.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "7.0.38",
|
|
4
|
+
"description": "Inspect registered Zustand stores, compare captured state changes and use supported reset or state-update actions.",
|
|
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/
|
|
33
|
-
"@buoy-gg/
|
|
32
|
+
"@buoy-gg/license": "^7.0.38",
|
|
33
|
+
"@buoy-gg/shared-ui": "^7.0.38"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"react": "*",
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../../src/preset.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAGjE;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB;;;;;qBAKX;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;;;;;CAKlC,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,CAAC,EAAE;IAC1C,qCAAqC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uBAAuB;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ZustandActionButton.d.ts","sourceRoot":"","sources":["../../../../src/zustand/components/ZustandActionButton.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;CAyBlB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,aAAa,CAAC;AAEpD,UAAU,wBAAwB;IAChC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,mBAAmB,CAAC,EAClC,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,QAAgB,EAChB,MAAM,GACP,EAAE,wBAAwB,+BA2C1B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ZustandDetailViewToggle.d.ts","sourceRoot":"","sources":["../../../../src/zustand/components/ZustandDetailViewToggle.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAe,MAAM,OAAO,CAAC;AASpC,MAAM,MAAM,qBAAqB,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAEhE,UAAU,4BAA4B;IACpC,UAAU,EAAE,qBAAqB,CAAC;IAClC,YAAY,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,IAAI,CAAC;IACpD,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAUD,eAAO,MAAM,uBAAuB,0DAclC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ZustandEventFilterView.d.ts","sourceRoot":"","sources":["../../../../src/zustand/components/ZustandEventFilterView.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAIjD,UAAU,2BAA2B;IACnC,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,MAAM,EAAE,gBAAgB,EAAE,CAAC;CAC5B;AAQD,wBAAgB,sBAAsB,CAAC,EACrC,eAAe,EACf,eAAe,EACf,YAAY,EACZ,MAAM,GACP,EAAE,2BAA2B,+BAwB7B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ZustandIcon.d.ts","sourceRoot":"","sources":["../../../../src/zustand/components/ZustandIcon.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ZustandModal.d.ts","sourceRoot":"","sources":["../../../../src/zustand/components/ZustandModal.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAkDH,OAAO,KAAK,EAAE,iBAAiB,EAAsB,MAAM,UAAU,CAAC;AAsCtE,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,sCA8tBnB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,KAAK,GAAE,IAAI,CAAC,iBAAiB,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAM,+BAGtE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ZustandStateChangeItem.d.ts","sourceRoot":"","sources":["../../../../src/zustand/components/ZustandStateChangeItem.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,kBAAkB,EAAuB,MAAM,UAAU,CAAC;AAGxE,UAAU,2BAA2B;IACnC,MAAM,EAAE,kBAAkB,CAAC;IAC3B,OAAO,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC9C;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AA2FD,eAAO,MAAM,sBAAsB,mEAyBjC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ZustandStateDetailContent.d.ts","sourceRoot":"","sources":["../../../../src/zustand/components/ZustandStateDetailContent.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAkBH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,2BAA2B,CAAC;AAMnC,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,+BAmNhC;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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ZustandStateInfoView.d.ts","sourceRoot":"","sources":["../../../../src/zustand/components/ZustandStateInfoView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAiD,MAAM,OAAO,CAAC;AAmBtE,OAAO,KAAK,EAAE,kBAAkB,EAAuB,MAAM,UAAU,CAAC;AAKxE,UAAU,yBAAyB;IACjC,MAAM,EAAE,kBAAkB,CAAC;CAC5B;AAwED,eAAO,MAAM,oBAAoB,uDAuQ/B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ZustandStoreBrowser.d.ts","sourceRoot":"","sources":["../../../../src/zustand/components/ZustandStoreBrowser.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAUH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAIjD,UAAU,wBAAwB;IAChC,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,8DAA8D;IAC9D,WAAW,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C;AA4DD,wBAAgB,mBAAmB,CAAC,EAClC,MAAM,EACN,WAAW,EACX,SAAiB,EACjB,WAAW,GACZ,EAAE,wBAAwB,+BAgG1B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ZustandStoreDetailContent.d.ts","sourceRoot":"","sources":["../../../../src/zustand/components/ZustandStoreDetailContent.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AA4BH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAyBjD,UAAU,8BAA8B;IACtC,KAAK,EAAE,gBAAgB,CAAC;IACxB,mEAAmE;IACnE,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C;AAED,wBAAgB,yBAAyB,CAAC,EACxC,KAAK,EACL,aAAa,GACd,EAAE,8BAA8B,+BAsQhC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ZustandStoreEditorScreen.d.ts","sourceRoot":"","sources":["../../../../src/zustand/components/ZustandStoreEditorScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AA6BH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAMjD,UAAU,6BAA6B;IACrC,KAAK,EAAE,gBAAgB,CAAC;IACxB,uEAAuE;IACvE,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,wBAAgB,wBAAwB,CAAC,EACvC,KAAK,EACL,OAAO,EACP,kBAAkB,GACnB,EAAE,6BAA6B,+BAsO/B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useZustandStateChanges.d.ts","sourceRoot":"","sources":["../../../../src/zustand/hooks/useZustandStateChanges.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EACV,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACd,MAAM,UAAU,CAAC;AAGlB,MAAM,WAAW,4BAA4B;IAC3C,iCAAiC;IACjC,YAAY,EAAE,kBAAkB,EAAE,CAAC;IACnC,qDAAqD;IACrD,eAAe,EAAE,kBAAkB,EAAE,CAAC;IACtC,8BAA8B;IAC9B,MAAM,EAAE,aAAa,CAAC;IACtB,6BAA6B;IAC7B,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC,CAAC;IAC/D,wCAAwC;IACxC,KAAK,EAAE;QACL,YAAY,EAAE,MAAM,CAAC;QACrB,sBAAsB,EAAE,MAAM,CAAC;QAC/B,yBAAyB,EAAE,MAAM,CAAC;QAClC,UAAU,EAAE,MAAM,CAAC;QACnB,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,4BAA4B;IAC5B,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B,uCAAuC;IACvC,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,6BAA6B;IAC7B,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,kBAAkB,GAAG,SAAS,CAAC;CAC/D;AAiCD,wBAAgB,sBAAsB,IAAI,4BAA4B,CA0CrE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"zustandSyncAdapter.d.ts","sourceRoot":"","sources":["../../../../src/zustand/sync/zustandSyncAdapter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAenD;;;;GAIG;AACH,eAAO,MAAM,eAAe;;;;EAG3B,CAAC;AAEF,sFAAsF;AACtF,eAAO,MAAM,iBAAiB;;;;EAG7B,CAAC;AAuEF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;IAiB3B;;;;OAIG;;;;;;IASH;;;OAGG;6BACsB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAsChC;;;;;OAKG;0BACmB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA0BT,OAAO;;;;;;;;;;;;;;;IAwG3B;;;;;;;;;;;;;;;;;;;;OAoBG;yBACwB,OAAO;;;;;;;;;;;EAqBV,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
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,SA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IACjF,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,0DAA0D;IAC1D,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,CAsClE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,KAAK,EAAE,OAAO,GACb,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAsBzB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"snapshotProvider.d.ts","sourceRoot":"","sources":["../../../../src/zustand/utils/snapshotProvider.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testIDs.d.ts","sourceRoot":"","sources":["../../../../src/zustand/utils/testIDs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,+CAA+C;AAC/C,eAAO,MAAM,eAAe,iBAAiB,CAAC;AAE9C,kEAAkE;AAClE,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAOpD;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAE1E;AAED,iFAAiF;AACjF,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAExD;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,kBAAkB,EAAE,GAC5B,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CASrB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"zustandStateStore.d.ts","sourceRoot":"","sources":["../../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