@buoy-gg/redux 7.0.33 → 7.0.34
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/preset.js +14 -22
- package/lib/commonjs/redux/components/ReduxActionInfoView.js +8 -60
- package/lib/commonjs/redux/components/ReduxActionItem.js +64 -118
- package/lib/commonjs/redux/components/ReduxDetailViewToggle.js +15 -109
- package/lib/commonjs/redux/components/ReduxModal.js +24 -69
- package/lib/commonjs/redux/hooks/useReduxActions.js +16 -33
- package/lib/commonjs/redux/sync/reduxSyncAdapter.js +11 -29
- package/lib/commonjs/redux/utils/reduxActionStore.js +24 -94
- package/lib/commonjs/redux/utils/snapshotProvider.js +17 -80
- package/lib/module/preset.js +13 -20
- package/lib/module/redux/components/ReduxActionInfoView.js +1 -53
- package/lib/module/redux/components/ReduxActionItem.js +65 -119
- package/lib/module/redux/components/ReduxDetailViewToggle.js +17 -111
- package/lib/module/redux/components/ReduxModal.js +26 -71
- package/lib/module/redux/hooks/useReduxActions.js +17 -34
- package/lib/module/redux/sync/reduxSyncAdapter.js +12 -30
- package/lib/module/redux/utils/reduxActionStore.js +25 -95
- package/lib/module/redux/utils/snapshotProvider.js +18 -81
- package/lib/typescript/preset.d.ts +3 -9
- package/lib/typescript/preset.d.ts.map +1 -1
- package/lib/typescript/redux/components/ReduxActionInfoView.d.ts.map +1 -1
- package/lib/typescript/redux/components/ReduxActionItem.d.ts.map +1 -1
- package/lib/typescript/redux/components/ReduxDetailViewToggle.d.ts +2 -1
- package/lib/typescript/redux/components/ReduxDetailViewToggle.d.ts.map +1 -1
- package/lib/typescript/redux/components/ReduxModal.d.ts.map +1 -1
- package/lib/typescript/redux/hooks/useReduxActions.d.ts +3 -0
- package/lib/typescript/redux/hooks/useReduxActions.d.ts.map +1 -1
- package/lib/typescript/redux/sync/reduxSyncAdapter.d.ts +68 -82
- package/lib/typescript/redux/sync/reduxSyncAdapter.d.ts.map +1 -1
- package/lib/typescript/redux/utils/reduxActionStore.d.ts +2 -29
- package/lib/typescript/redux/utils/reduxActionStore.d.ts.map +1 -1
- 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
|
-
|
|
18
|
+
export declare const reduxSyncAdapter: import("@buoy-gg/shared-ui").SyncAdapter<ReduxAction[], {
|
|
19
|
+
clearEvents: () => void;
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
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
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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;
|
|
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"],"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AC,GAAG,IAAI;IAI5D,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIhC,QAAQ;;;;;;;IAuBR,aAAa,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW,EAAE;IAmBjD,oBAAoB,IAAI,MAAM,EAAE;IAIhC;;OAEG;IACH,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,WAAW,EAAE;IAMnD;;OAEG;IACH,gBAAgB,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW,EAAE;IAKpD;;OAEG;IACH,qBAAqB,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM;IAOlD;;OAEG;IACH,yBAAyB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAe3D;;OAEG;IACH,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAWvC;;;OAGG;IACH,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;CAkBlD;AAED,eAAO,MAAM,gBAAgB,kBAAyB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buoy-gg/redux",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.34",
|
|
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.
|
|
35
|
-
"@buoy-gg/
|
|
36
|
-
"@buoy-gg/
|
|
34
|
+
"@buoy-gg/shared-ui": "^7.0.34",
|
|
35
|
+
"@buoy-gg/floating-tools-core": "^7.0.34",
|
|
36
|
+
"@buoy-gg/license": "^7.0.34"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@reduxjs/toolkit": ">=1.9.0",
|