@buoy-gg/redux 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.
Files changed (40) hide show
  1. package/lib/commonjs/preset.js +14 -22
  2. package/lib/commonjs/redux/components/ReduxActionButton.js +1 -1
  3. package/lib/commonjs/redux/components/ReduxActionDetailContent.js +5 -5
  4. package/lib/commonjs/redux/components/ReduxActionDetailView.js +3 -3
  5. package/lib/commonjs/redux/components/ReduxActionInfoView.js +16 -68
  6. package/lib/commonjs/redux/components/ReduxActionItem.js +65 -119
  7. package/lib/commonjs/redux/components/ReduxDetailViewToggle.js +15 -109
  8. package/lib/commonjs/redux/components/ReduxModal.js +25 -70
  9. package/lib/commonjs/redux/hooks/useReduxActions.js +16 -33
  10. package/lib/commonjs/redux/sync/reduxSyncAdapter.js +11 -29
  11. package/lib/commonjs/redux/utils/reduxActionStore.js +24 -94
  12. package/lib/commonjs/redux/utils/snapshotProvider.js +17 -80
  13. package/lib/module/preset.js +13 -20
  14. package/lib/module/redux/components/ReduxActionButton.js +2 -2
  15. package/lib/module/redux/components/ReduxActionDetailContent.js +6 -6
  16. package/lib/module/redux/components/ReduxActionDetailView.js +4 -4
  17. package/lib/module/redux/components/ReduxActionInfoView.js +9 -61
  18. package/lib/module/redux/components/ReduxActionItem.js +66 -120
  19. package/lib/module/redux/components/ReduxDetailViewToggle.js +17 -111
  20. package/lib/module/redux/components/ReduxModal.js +27 -72
  21. package/lib/module/redux/hooks/useReduxActions.js +17 -34
  22. package/lib/module/redux/sync/reduxSyncAdapter.js +12 -30
  23. package/lib/module/redux/utils/reduxActionStore.js +25 -95
  24. package/lib/module/redux/utils/snapshotProvider.js +18 -81
  25. package/lib/typescript/preset.d.ts +3 -9
  26. package/lib/typescript/preset.d.ts.map +1 -1
  27. package/lib/typescript/redux/components/ReduxActionDetailContent.d.ts.map +1 -1
  28. package/lib/typescript/redux/components/ReduxActionDetailView.d.ts.map +1 -1
  29. package/lib/typescript/redux/components/ReduxActionInfoView.d.ts.map +1 -1
  30. package/lib/typescript/redux/components/ReduxActionItem.d.ts.map +1 -1
  31. package/lib/typescript/redux/components/ReduxDetailViewToggle.d.ts +2 -1
  32. package/lib/typescript/redux/components/ReduxDetailViewToggle.d.ts.map +1 -1
  33. package/lib/typescript/redux/components/ReduxModal.d.ts.map +1 -1
  34. package/lib/typescript/redux/hooks/useReduxActions.d.ts +3 -0
  35. package/lib/typescript/redux/hooks/useReduxActions.d.ts.map +1 -1
  36. package/lib/typescript/redux/sync/reduxSyncAdapter.d.ts +68 -82
  37. package/lib/typescript/redux/sync/reduxSyncAdapter.d.ts.map +1 -1
  38. package/lib/typescript/redux/utils/reduxActionStore.d.ts +2 -29
  39. package/lib/typescript/redux/utils/reduxActionStore.d.ts.map +1 -1
  40. package/package.json +4 -4
@@ -15,89 +15,75 @@ import type { ActionMeta, ReduxAction } from "../types";
15
15
  * dispatch actions — redux is action-based, so the *current state* isn't in the
16
16
  * action-log snapshot.
17
17
  */
18
- export declare const reduxSyncAdapter: {
19
- version: number;
18
+ export declare const reduxSyncAdapter: import("@buoy-gg/shared-ui").SyncAdapter<ReduxAction[], {
19
+ clearEvents: () => void;
20
20
  /**
21
- * WIRE-FORM snapshot: actions WITHOUT raw prevState/nextState trees.
22
- * Shipping the trees serialized up to 25×2 full state trees through
23
- * socket.emit per action — no guard on that path — which froze and
24
- * native-OOM-crashed enterprise-scale apps whenever a dashboard was
25
- * connected (root cause confirmed by patch-and-retest). Dashboards fetch
26
- * trees on demand via `getActionDetail`; already-evicted entries keep the
27
- * eviction sentinel so consumers can distinguish "fetchable" from "gone".
21
+ * On-demand detail: one action's real prevState/nextState trees.
22
+ * The per-snapshot stream stays tree-free; this is the explicit,
23
+ * size-guarded channel for the detail pane.
28
24
  */
29
- getSnapshot: () => ReduxAction[];
30
- subscribe: (onChange: () => void) => () => void;
31
- actions: {
32
- clearEvents: () => void;
33
- /**
34
- * On-demand detail: one action's real prevState/nextState trees.
35
- * The per-snapshot stream stays tree-free; this is the explicit,
36
- * size-guarded channel for the detail pane.
37
- */
38
- getActionDetail: (params?: unknown) => {
39
- found: false;
40
- reason: string;
41
- id?: undefined;
42
- evicted?: undefined;
43
- prevState?: undefined;
44
- nextState?: undefined;
45
- payload?: undefined;
46
- action?: undefined;
47
- meta?: undefined;
48
- error?: undefined;
49
- } | {
50
- found: true;
51
- id: string;
52
- evicted: true;
53
- reason: string;
54
- prevState?: undefined;
55
- nextState?: undefined;
56
- payload?: undefined;
57
- action?: undefined;
58
- meta?: undefined;
59
- error?: undefined;
60
- } | {
61
- found: true;
62
- id: string;
63
- prevState: unknown;
64
- nextState: unknown;
65
- payload: unknown;
66
- action: unknown;
67
- meta: ActionMeta | undefined;
68
- error: unknown;
69
- reason?: undefined;
70
- evicted?: undefined;
71
- };
72
- /**
73
- * Compact current-state reader: the instrumented store's slice names, and
74
- * the full state tree only when `includeValues` is set (heavy).
75
- */
76
- getState: (params?: unknown) => {
77
- available: false;
78
- slices: string[];
79
- /** 'no-react-redux' | 'no-provider' | 'not-instrumented' */
80
- reason: string;
81
- } | {
82
- state?: unknown;
83
- available: boolean;
84
- slices: string[];
85
- /** 'full' | 'top-level-only' — what the live capture mechanism sees. */
86
- capture: "full" | "top-level-only" | "none";
87
- mechanism: import("../..").CaptureMechanism | null;
88
- };
89
- /** Dispatch a plain action object to the instrumented store. */
90
- dispatch: (params?: unknown) => {
91
- available: false;
92
- slices: string[];
93
- /** 'no-react-redux' | 'no-provider' | 'not-instrumented' */
94
- reason: string;
95
- dispatched: boolean;
96
- type?: undefined;
97
- } | {
98
- dispatched: boolean;
99
- type: string;
100
- };
25
+ getActionDetail: (params?: unknown) => {
26
+ found: false;
27
+ reason: string;
28
+ id?: undefined;
29
+ evicted?: undefined;
30
+ prevState?: undefined;
31
+ nextState?: undefined;
32
+ payload?: undefined;
33
+ action?: undefined;
34
+ meta?: undefined;
35
+ error?: undefined;
36
+ } | {
37
+ found: true;
38
+ id: string;
39
+ evicted: true;
40
+ reason: string;
41
+ prevState?: undefined;
42
+ nextState?: undefined;
43
+ payload?: undefined;
44
+ action?: undefined;
45
+ meta?: undefined;
46
+ error?: undefined;
47
+ } | {
48
+ found: true;
49
+ id: string;
50
+ prevState: unknown;
51
+ nextState: unknown;
52
+ payload: unknown;
53
+ action: unknown;
54
+ meta: ActionMeta | undefined;
55
+ error: unknown;
56
+ reason?: undefined;
57
+ evicted?: undefined;
101
58
  };
102
- };
59
+ /**
60
+ * Compact current-state reader: the instrumented store's slice names, and
61
+ * the full state tree only when `includeValues` is set (heavy).
62
+ */
63
+ getState: (params?: unknown) => {
64
+ available: false;
65
+ slices: string[];
66
+ /** 'no-react-redux' | 'no-provider' | 'not-instrumented' */
67
+ reason: string;
68
+ } | {
69
+ state?: unknown;
70
+ available: boolean;
71
+ slices: string[];
72
+ /** 'full' | 'top-level-only' — what the live capture mechanism sees. */
73
+ capture: "full" | "top-level-only" | "none";
74
+ mechanism: import("../..").CaptureMechanism | null;
75
+ };
76
+ /** Dispatch a plain action object to the instrumented store. */
77
+ dispatch: (params?: unknown) => {
78
+ available: false;
79
+ slices: string[];
80
+ /** 'no-react-redux' | 'no-provider' | 'not-instrumented' */
81
+ reason: string;
82
+ dispatched: boolean;
83
+ type?: undefined;
84
+ } | {
85
+ dispatched: boolean;
86
+ type: string;
87
+ };
88
+ }>;
103
89
  //# sourceMappingURL=reduxSyncAdapter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reduxSyncAdapter.d.ts","sourceRoot":"","sources":["../../../../src/redux/sync/reduxSyncAdapter.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAwFxD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,gBAAgB;;IAE3B;;;;;;;;OAQG;;0BAEmB,MAAM,IAAI;;;QAK9B;;;;WAIG;mCACwB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAqClC;;;WAGG;4BACiB,OAAO;;oBArFb,MAAM,EAAE;YACtB,4DAA4D;;;;;;YAgGxD,wEAAwE;;;;QAM5E,gEAAgE;4BAC5C,OAAO;;oBAxGb,MAAM,EAAE;YACtB,4DAA4D;;;;;;;;;CAiH/D,CAAC"}
1
+ {"version":3,"file":"reduxSyncAdapter.d.ts","sourceRoot":"","sources":["../../../../src/redux/sync/reduxSyncAdapter.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AA4ExD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,gBAAgB;;IAiBzB;;;;OAIG;+BACwB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgClC;;;OAGG;wBACiB,OAAO;;gBAhFb,MAAM,EAAE;QACtB,4DAA4D;;;;;;QA0FxD,wEAAwE;;;;IAM5E,gEAAgE;wBAC5C,OAAO;;gBAlGb,MAAM,EAAE;QACtB,4DAA4D;;;;;;;;EA4GpC,CAAC"}
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * Redux action store - captures and stores Redux Toolkit actions
3
3
  */
4
+ import { ChangeLog } from "@buoy-gg/shared-ui";
4
5
  import type { ReduxAction, ReduxFilter } from "../types";
5
6
  /**
6
7
  * How many of the most-recent actions keep their raw prevState/nextState
@@ -55,35 +56,11 @@ export declare function isEvictedState(value: unknown): boolean;
55
56
  * JS thread at enterprise state sizes.
56
57
  */
57
58
  export declare function jsonLongerThan(value: unknown, limit: number): boolean;
58
- declare class ReduxActionStore {
59
- private actions;
60
- private listeners;
61
- private clearListeners;
62
- private maxActions;
63
- private idCounter;
64
- private isEnabled;
65
- private captureSuppressed;
59
+ declare class ReduxActionStore extends ChangeLog<ReduxAction> {
66
60
  addAction(action: Record<string, unknown>, prevState: unknown, nextState: unknown, duration?: number): void;
67
61
  getActions(): ReduxAction[];
68
62
  getActionById(id: string): ReduxAction | undefined;
69
63
  clearActions(): void;
70
- /**
71
- * Listen for clearActions() calls. Used in remote mirror mode to forward a
72
- * clear performed in the dashboard UI to the synced device.
73
- */
74
- onClear(listener: () => void): () => void;
75
- /**
76
- * Permanently suppress local capture. Use when this store acts as a mirror
77
- * of a remote device's actions (e.g. the desktop dashboard): actions arrive
78
- * via replaceActions() and local instrumentation must never record.
79
- */
80
- disableCapture(): void;
81
- /**
82
- * Whether the store is in remote mirror mode (capture suppressed). The UI
83
- * uses this to skip local-instrumentation affordances like the
84
- * "react-redux not installed" banner.
85
- */
86
- isCaptureSuppressed(): boolean;
87
64
  /**
88
65
  * Replace the entire action list and notify listeners. Used in remote
89
66
  * mirror mode where full snapshots arrive from a synced device. Respects
@@ -96,10 +73,6 @@ declare class ReduxActionStore {
96
73
  * `getActionDetail` action. Remote-mirror (desktop) use only.
97
74
  */
98
75
  hydrateAction(id: string, patch: Partial<ReduxAction>): void;
99
- setEnabled(enabled: boolean): void;
100
- getEnabled(): boolean;
101
- subscribe(listener: (actions: ReduxAction[]) => void): () => void;
102
- private notifyListeners;
103
76
  setMaxActions(max: number): void;
104
77
  getStats(): {
105
78
  totalActions: number;
@@ -1 +1 @@
1
- {"version":3,"file":"reduxActionStore.d.ts","sourceRoot":"","sources":["../../../../src/redux/utils/reduxActionStore.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAA8B,MAAM,UAAU,CAAC;AAErF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAExC;;;GAGG;AACH,eAAO,MAAM,aAAa;;;EAGxB,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe;;;EAG1B,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB;;;EAG5B,CAAC;AAEH,qEAAqE;AACrE,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAMzD;AAED;;;GAGG;AACH,wBAAgB,cAAc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buoy-gg/redux",
3
- "version": "7.0.33",
3
+ "version": "7.0.35",
4
4
  "description": "Redux DevTools inside your React Native app — action log, state diffs & time travel with zero store changes. Part of Buoy devtools.",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -31,9 +31,9 @@
31
31
  "**/snapshotProvider.ts"
32
32
  ],
33
33
  "dependencies": {
34
- "@buoy-gg/shared-ui": "^7.0.33",
35
- "@buoy-gg/license": "^7.0.33",
36
- "@buoy-gg/floating-tools-core": "^7.0.33"
34
+ "@buoy-gg/shared-ui": "^7.0.35",
35
+ "@buoy-gg/floating-tools-core": "^7.0.35",
36
+ "@buoy-gg/license": "^7.0.35"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "@reduxjs/toolkit": ">=1.9.0",