@buoy-gg/zustand 7.0.30 → 7.0.32

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 (60) hide show
  1. package/lib/commonjs/zustand/components/ZustandActionButton.js +3 -1
  2. package/lib/commonjs/zustand/components/ZustandDetailViewToggle.js +7 -0
  3. package/lib/commonjs/zustand/components/ZustandEventFilterView.js +19 -4
  4. package/lib/commonjs/zustand/components/ZustandModal.js +174 -32
  5. package/lib/commonjs/zustand/components/ZustandStateChangeItem.js +36 -37
  6. package/lib/commonjs/zustand/components/ZustandStateDetailContent.js +22 -5
  7. package/lib/commonjs/zustand/components/ZustandStateInfoView.js +30 -7
  8. package/lib/commonjs/zustand/components/ZustandStoreBrowser.js +23 -126
  9. package/lib/commonjs/zustand/components/ZustandStoreDetailContent.js +471 -0
  10. package/lib/commonjs/zustand/components/ZustandStoreEditorScreen.js +393 -0
  11. package/lib/commonjs/zustand/sync/zustandSyncAdapter.js +54 -0
  12. package/lib/commonjs/zustand/utils/buoyZustandMiddleware.js +71 -7
  13. package/lib/commonjs/zustand/utils/editableState.js +139 -0
  14. package/lib/commonjs/zustand/utils/snapshotProvider.js +10 -37
  15. package/lib/commonjs/zustand/utils/testIDs.js +82 -0
  16. package/lib/commonjs/zustand/utils/zustandStateStore.js +16 -3
  17. package/lib/module/zustand/components/ZustandActionButton.js +3 -1
  18. package/lib/module/zustand/components/ZustandDetailViewToggle.js +7 -0
  19. package/lib/module/zustand/components/ZustandEventFilterView.js +19 -4
  20. package/lib/module/zustand/components/ZustandModal.js +175 -33
  21. package/lib/module/zustand/components/ZustandStateChangeItem.js +36 -37
  22. package/lib/module/zustand/components/ZustandStateDetailContent.js +22 -5
  23. package/lib/module/zustand/components/ZustandStateInfoView.js +30 -7
  24. package/lib/module/zustand/components/ZustandStoreBrowser.js +26 -129
  25. package/lib/module/zustand/components/ZustandStoreDetailContent.js +469 -0
  26. package/lib/module/zustand/components/ZustandStoreEditorScreen.js +389 -0
  27. package/lib/module/zustand/sync/zustandSyncAdapter.js +54 -0
  28. package/lib/module/zustand/utils/buoyZustandMiddleware.js +71 -7
  29. package/lib/module/zustand/utils/editableState.js +131 -0
  30. package/lib/module/zustand/utils/snapshotProvider.js +4 -30
  31. package/lib/module/zustand/utils/testIDs.js +74 -0
  32. package/lib/module/zustand/utils/zustandStateStore.js +16 -3
  33. package/lib/typescript/zustand/components/ZustandActionButton.d.ts +2 -1
  34. package/lib/typescript/zustand/components/ZustandActionButton.d.ts.map +1 -1
  35. package/lib/typescript/zustand/components/ZustandDetailViewToggle.d.ts.map +1 -1
  36. package/lib/typescript/zustand/components/ZustandEventFilterView.d.ts.map +1 -1
  37. package/lib/typescript/zustand/components/ZustandModal.d.ts.map +1 -1
  38. package/lib/typescript/zustand/components/ZustandStateChangeItem.d.ts +6 -0
  39. package/lib/typescript/zustand/components/ZustandStateChangeItem.d.ts.map +1 -1
  40. package/lib/typescript/zustand/components/ZustandStateDetailContent.d.ts.map +1 -1
  41. package/lib/typescript/zustand/components/ZustandStateInfoView.d.ts.map +1 -1
  42. package/lib/typescript/zustand/components/ZustandStoreBrowser.d.ts +7 -9
  43. package/lib/typescript/zustand/components/ZustandStoreBrowser.d.ts.map +1 -1
  44. package/lib/typescript/zustand/components/ZustandStoreDetailContent.d.ts +40 -0
  45. package/lib/typescript/zustand/components/ZustandStoreDetailContent.d.ts.map +1 -0
  46. package/lib/typescript/zustand/components/ZustandStoreEditorScreen.d.ts +42 -0
  47. package/lib/typescript/zustand/components/ZustandStoreEditorScreen.d.ts.map +1 -0
  48. package/lib/typescript/zustand/sync/zustandSyncAdapter.d.ts +35 -0
  49. package/lib/typescript/zustand/sync/zustandSyncAdapter.d.ts.map +1 -1
  50. package/lib/typescript/zustand/types/index.d.ts +13 -0
  51. package/lib/typescript/zustand/types/index.d.ts.map +1 -1
  52. package/lib/typescript/zustand/utils/buoyZustandMiddleware.d.ts +31 -3
  53. package/lib/typescript/zustand/utils/buoyZustandMiddleware.d.ts.map +1 -1
  54. package/lib/typescript/zustand/utils/editableState.d.ts +65 -0
  55. package/lib/typescript/zustand/utils/editableState.d.ts.map +1 -0
  56. package/lib/typescript/zustand/utils/testIDs.d.ts +54 -0
  57. package/lib/typescript/zustand/utils/testIDs.d.ts.map +1 -0
  58. package/lib/typescript/zustand/utils/zustandStateStore.d.ts +1 -0
  59. package/lib/typescript/zustand/utils/zustandStateStore.d.ts.map +1 -1
  60. package/package.json +3 -3
@@ -16,9 +16,14 @@ import type { BuoyZustandMiddlewareOptions } from "../types";
16
16
  interface ZustandStoreHook {
17
17
  getState: () => unknown;
18
18
  getInitialState?: () => unknown;
19
- setState: (partial: unknown, replace?: boolean) => void;
19
+ /**
20
+ * Method syntax on purpose: methods are checked bivariantly, so zustand v5's
21
+ * overloaded `setState` (where `replace: true` demands a full state, not a
22
+ * partial) stays assignable under strictFunctionTypes — as a property arrow
23
+ * every real `UseBoundStore` fails to typecheck against `watchStores()`.
24
+ */
25
+ setState(partial: unknown, replace?: boolean): void;
20
26
  subscribe: (listener: (state: unknown, prevState: unknown) => void) => () => void;
21
- [key: string]: unknown;
22
27
  }
23
28
  /**
24
29
  * Watch multiple Zustand stores for state changes.
@@ -75,7 +80,30 @@ export declare function watchStores(stores: Record<string, ZustandStoreHook>): (
75
80
  * );
76
81
  * ```
77
82
  */
78
- export declare function buoyDevTools<T>(config: (set: (partial: T | Partial<T> | ((state: T) => T | Partial<T>), replace?: boolean) => void, get: () => T, api: Record<string, unknown>) => T, options?: BuoyZustandMiddlewareOptions): (set: (partial: T | Partial<T> | ((state: T) => T | Partial<T>), replace?: boolean) => void, get: () => T, api: Record<string, unknown>) => T;
83
+ /**
84
+ * Zustand's own `set` shape (v5 types): with `replace: true` the argument must
85
+ * be a FULL state, so a single `(partial, replace?: boolean)` signature is
86
+ * incompatible in both directions — zustand's set is not assignable to it,
87
+ * which made `create(buoyDevTools(...))` fail to typecheck for every strict-TS
88
+ * user. Mirroring the overloads keeps buoyDevTools a drop-in for `create()`.
89
+ */
90
+ type ZustandSet<T> = {
91
+ (partial: T | Partial<T> | ((state: T) => T | Partial<T>), replace?: false): void;
92
+ (state: T | ((state: T) => T), replace: true): void;
93
+ };
94
+ /**
95
+ * The store api object zustand hands a middleware, described structurally so
96
+ * this package never has to import zustand's own types (which differ between
97
+ * v4 and v5). `Record<string, unknown>` was wrong here: `StoreApi<T>` has no
98
+ * index signature, so `create(buoyDevTools(...))` failed to typecheck.
99
+ */
100
+ interface ZustandStoreApiLike<T> {
101
+ getState: () => T;
102
+ getInitialState?: () => T;
103
+ setState?(partial: unknown, replace?: boolean): void;
104
+ subscribe: (listener: (state: T, prevState: T) => void) => () => void;
105
+ }
106
+ export declare function buoyDevTools<T>(config: (set: ZustandSet<T>, get: () => T, api: ZustandStoreApiLike<T>) => T, options?: BuoyZustandMiddlewareOptions): (set: ZustandSet<T>, get: () => T, api: ZustandStoreApiLike<T>) => T;
79
107
  /**
80
108
  * Check if a store is being watched/instrumented
81
109
  */
@@ -1 +1 @@
1
- {"version":3,"file":"buoyZustandMiddleware.d.ts","sourceRoot":"","sources":["../../../../src/zustand/utils/buoyZustandMiddleware.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AA6B7D,4DAA4D;AAC5D,UAAU,gBAAgB;IACxB,QAAQ,EAAE,MAAM,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,OAAO,CAAC;IAChC,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACxD,SAAS,EAAE,CACT,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,KAAK,IAAI,KACnD,MAAM,IAAI,CAAC;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;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AAE,UAAU,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,GAAG,EAAE,mBAAmB,CAAC,CAAC,CAAC,KAAK,CAAC,EAC5E,OAAO,CAAC,EAAE,4BAA4B,GACrC,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,GAAG,EAAE,mBAAmB,CAAC,CAAC,CAAC,KAAK,CAAC,CA8FtE;AAMD;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,OAAO,CAAC,GACtC,OAAO,CAET"}
@@ -0,0 +1,65 @@
1
+ /**
2
+ * What of a zustand store's state can be EDITED, and how an edit is written.
3
+ *
4
+ * The two zustand facts every rule here follows from:
5
+ *
6
+ * 1. Stores conventionally keep their action functions IN state
7
+ * (`increment: () => …`). Functions can't be typed into a tree editor and
8
+ * don't survive serialization, so the editor works on a function-free view
9
+ * of state.
10
+ * 2. `setState` is either a TOP-LEVEL SHALLOW MERGE (`Object.assign({}, state,
11
+ * partial)`) or a full replace that deletes every key not present — actions
12
+ * included. So the editor writes merge-only, always: every edit, however
13
+ * deep, is expressed as "replace the top-level key(s) that contain it"
14
+ * ({@link computeMergePartial}), and the two edits a merge cannot express —
15
+ * removing or renaming a top-level key — are refused rather than silently
16
+ * not happening.
17
+ *
18
+ * `stripFunctions` lives here (the Time Machine snapshot provider imports it)
19
+ * because capture and editing need the identical answer to "what is this
20
+ * store's data".
21
+ */
22
+ /** Bounds every recursive walk over store state. */
23
+ export declare const STRIP_MAX_DEPTH = 8;
24
+ export declare function isPlainObjectLike(v: unknown): v is Record<string, unknown>;
25
+ /** Clone `value` without functions, recording their paths. */
26
+ export declare function stripFunctions(value: unknown, path: string, fnPaths: string[], seen: WeakSet<object>, depth: number): unknown;
27
+ export interface EditableStoreState {
28
+ /** Function-free view of the state, or null when the store isn't editable. */
29
+ data: Record<string, unknown> | null;
30
+ /** Dot-paths where functions were stripped (top-level = the store's actions). */
31
+ fnPaths: string[];
32
+ /** Why the store can't be edited, or null when it can. */
33
+ blockedReason: string | null;
34
+ }
35
+ /**
36
+ * The editor's view of one store's state, with the reasons it may refuse.
37
+ *
38
+ * - A remote mirror that hasn't hydrated yet holds a marker, not state — the
39
+ * real value is one `getStoreState` round trip away, so "wait" rather than
40
+ * "can't".
41
+ * - Non-object state (`create(() => 5)`) has no top-level keys, so a merge
42
+ * write cannot address any part of it. Editing it would require a replace,
43
+ * which is the destructive path this editor exists to avoid.
44
+ * - A function nested BELOW the top level (rare — the convention keeps actions
45
+ * at the top) sits inside the very key an edit would rewrite, and a merge
46
+ * write of that key would silently drop it. Refusing the whole store is
47
+ * blunt but honest; per-key locks can come later if this ever bites.
48
+ */
49
+ export declare function editableStateOf(state: unknown): EditableStoreState;
50
+ /**
51
+ * Diff an edited draft against the state it was seeded from, as a `setState`
52
+ * MERGE partial: only the top-level keys whose contents changed.
53
+ *
54
+ * Diffed against the SEED, not the live state at save time, on purpose — the
55
+ * partial then carries exactly what the user changed, so a key the app wrote
56
+ * while the editor was open and the user never touched keeps the app's value
57
+ * (per-key last-write-wins, the same contract the draft's own dirtiness uses).
58
+ *
59
+ * Throws on the two edits a merge cannot express, naming the key: a draft
60
+ * that dropped a top-level key (which is also what a raw-JSON rename produces
61
+ * — the old key dropped, a new one added), because `setState(partial, false)`
62
+ * would leave it exactly as it was while the editor showed it gone.
63
+ */
64
+ export declare function computeMergePartial(seed: Record<string, unknown>, draft: unknown): Record<string, unknown>;
65
+ //# sourceMappingURL=editableState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editableState.d.ts","sourceRoot":"","sources":["../../../../src/zustand/utils/editableState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,oDAAoD;AACpD,eAAO,MAAM,eAAe,IAAI,CAAC;AAEjC,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAE1E;AAED,8DAA8D;AAC9D,wBAAgB,cAAc,CAC5B,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EAAE,EACjB,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,EACrB,KAAK,EAAE,MAAM,GACZ,OAAO,CA2BT;AAED,MAAM,WAAW,kBAAkB;IACjC,8EAA8E;IAC9E,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACrC,iFAAiF;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"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Zustand tool test handles.
3
+ *
4
+ * Every tappable and every value the e2e suite reads back is addressed
5
+ * `buoy-zustand-<thing>`. Two rules in here need explaining.
6
+ *
7
+ * **A change row's handle carries an ORDINAL, and it counts per STORE.** The
8
+ * Events tool can address a row by what it is about, because an event is a
9
+ * thing that happened to a named subject — one key, one URL, one atom. A
10
+ * zustand state change is not: a store that a screen writes to fifty times
11
+ * produces fifty separate, equally real rows. Addressing them by store name
12
+ * alone would give fifty views one handle, and Detox fails a *matcher* that
13
+ * hits more than one element — so a suite would break on `toExist()`, before
14
+ * any assertion, with an error that says nothing about duplicate changes.
15
+ *
16
+ * So the handle is `buoy-zustand-row-<slug(storeName)>-<n>`, where n counts
17
+ * back from the newest row of that store (1 = newest). Deliberately relative:
18
+ * a state change has no identity a host could know in advance — `id` is a
19
+ * timestamp plus a per-process counter whose value depends on how many
20
+ * changes the app happened to make before the test looked. What a test CAN
21
+ * know is "the set I just fired is the newest change to that store". Read and
22
+ * tap in one beat: a row's ordinal moves the instant another change lands.
23
+ *
24
+ * **A store row's handle does NOT.** A store is registered once under a name
25
+ * that is unique by construction (`zustandStateStore.registerStore` returns
26
+ * early on a name it already holds), so `buoy-zustand-store-<slug(name)>` is
27
+ * as stable as the store itself — and unlike a change, it is a thing the host
28
+ * knows the name of before the app has booted.
29
+ *
30
+ * The suite mirrors these rules in CommonJS (`example-dev-build/utils/
31
+ * zustandBench.js`) and asserts the two agree — Detox runs in Node on the host
32
+ * and cannot import TypeScript.
33
+ */
34
+ import type { ZustandStateChange } from "../types";
35
+ /** Prefix every handle in this tool shares. */
36
+ export declare const ZUSTAND_TEST_ID = "buoy-zustand";
37
+ /** `zbenchWatch` → `zbenchwatch`. Shared with every Buoy tool. */
38
+ export declare function slugForTestID(value: unknown): string;
39
+ /**
40
+ * Handle for one change row: `buoy-zustand-row-zbenchwatch-1`.
41
+ *
42
+ * `ordinal` is 1-based and counts back from the newest row of this store.
43
+ */
44
+ export declare function changeRowTestID(storeName: string, ordinal: number): string;
45
+ /** Handle for one store row in the browser: `buoy-zustand-store-zbenchwatch`. */
46
+ export declare function storeRowTestID(storeName: string): string;
47
+ /**
48
+ * Row handle per change id for one rendered list, newest-first.
49
+ *
50
+ * Built once for the whole list rather than per row, because an ordinal is a
51
+ * fact about the list and a row cannot compute its own.
52
+ */
53
+ export declare function buildChangeRowTestIDs(changes: ZustandStateChange[]): Map<string, string>;
54
+ //# sourceMappingURL=testIDs.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -80,6 +80,7 @@ declare class ZustandStateStore {
80
80
  registerStore(name: string, api: ZustandStoreInfo["api"], options?: {
81
81
  isPersisted?: boolean;
82
82
  persistName?: string;
83
+ rehydrate?: () => Promise<void> | void;
83
84
  }): void;
84
85
  unregisterStore(name: string): void;
85
86
  getStores(): ZustandStoreInfo[];
@@ -1 +1 @@
1
- {"version":3,"file":"zustandStateStore.d.ts","sourceRoot":"","sources":["../../../../src/zustand/utils/zustandStateStore.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,EACb,mBAAmB,EACpB,MAAM,UAAU,CAAC;AA6KlB,cAAM,iBAAiB;IACrB,OAAO,CAAC,YAAY,CAA4B;IAChD,OAAO,CAAC,MAAM,CAA4C;IAC1D,OAAO,CAAC,SAAS,CAA2D;IAC5E,OAAO,CAAC,cAAc,CACV;IACZ,OAAO,CAAC,cAAc,CAA8B;IACpD,OAAO,CAAC,UAAU,CAAO;IACzB,OAAO,CAAC,SAAS,CAAK;IACtB,OAAO,CAAC,SAAS,CAAQ;IACzB,OAAO,CAAC,iBAAiB,CAAS;IAClC,OAAO,CAAC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
  {
2
2
  "name": "@buoy-gg/zustand",
3
- "version": "7.0.30",
3
+ "version": "7.0.32",
4
4
  "description": "Zustand devtools inside your React Native app — state diffs, jump-to-state & one-tap store reset, no middleware. 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.30",
33
- "@buoy-gg/license": "^7.0.30"
32
+ "@buoy-gg/license": "^7.0.32",
33
+ "@buoy-gg/shared-ui": "^7.0.32"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "react": "*",