@buoy-gg/redux 7.0.32 → 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 +46 -103
- 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 +48 -105
- 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
|
@@ -14,8 +14,7 @@
|
|
|
14
14
|
* object itself).
|
|
15
15
|
* - patch path: never handled; restore is reported as unavailable up front.
|
|
16
16
|
*/
|
|
17
|
-
import { registerStateSnapshotProvider } from "@buoy-gg/shared-ui";
|
|
18
|
-
import { boundedDeepEqual, jsonLikelyLargerThan } from "@buoy-gg/shared-ui/dataViewer";
|
|
17
|
+
import { classifyPreviewItem, createRestoreScope, registerStateSnapshotProvider, skippedRestore, unionKeys, wontApply } from "@buoy-gg/shared-ui";
|
|
19
18
|
import { getActiveStore, getInstrumentationStatus } from "./activeStoreRegistry";
|
|
20
19
|
import { BUOY_JUMP_TO_STATE } from "./buoyReduxMiddleware";
|
|
21
20
|
const ENABLE_HINT = "enable restore by using the Buoy enhancer or wrapping your root reducer in withBuoyDevTools()";
|
|
@@ -64,36 +63,19 @@ async function restore(data, options) {
|
|
|
64
63
|
const snapshot = data;
|
|
65
64
|
const store = getActiveStore();
|
|
66
65
|
if (!store || snapshot === undefined || snapshot === null) {
|
|
67
|
-
return
|
|
68
|
-
ok: false,
|
|
69
|
-
applied: 0,
|
|
70
|
-
skipped: [{
|
|
71
|
-
id: "redux",
|
|
72
|
-
reason: store ? "empty redux snapshot" : "no Redux store instrumented"
|
|
73
|
-
}],
|
|
74
|
-
warnings: []
|
|
75
|
-
};
|
|
66
|
+
return skippedRestore("redux", store ? "empty redux snapshot" : "no Redux store instrumented");
|
|
76
67
|
}
|
|
77
68
|
const {
|
|
78
69
|
mechanism
|
|
79
70
|
} = getInstrumentationStatus();
|
|
80
71
|
if (mechanism === "patch") {
|
|
81
|
-
return {
|
|
82
|
-
ok: false,
|
|
83
|
-
applied: 0,
|
|
84
|
-
skipped: [{
|
|
85
|
-
id: "redux",
|
|
86
|
-
reason: `restore unavailable on auto-instrumented stores — ${ENABLE_HINT}`
|
|
87
|
-
}],
|
|
88
|
-
warnings: []
|
|
89
|
-
};
|
|
72
|
+
return skippedRestore("redux", `restore unavailable on auto-instrumented stores — ${ENABLE_HINT}`);
|
|
90
73
|
}
|
|
91
74
|
// Untouched slices keep their LIVE values inside the jump payload, so the
|
|
92
75
|
// full-state replace leaves them alone. A slice is untouched when it's
|
|
93
76
|
// explicitly excluded OR outside the includeKeys scope.
|
|
94
|
-
const
|
|
95
|
-
const
|
|
96
|
-
const excluded = Object.keys(snapshot.state ?? {}).filter(k => excludedSet.has(k) || includedSet && !includedSet.has(k));
|
|
77
|
+
const scope = createRestoreScope(options);
|
|
78
|
+
const excluded = Object.keys(snapshot.state ?? {}).filter(k => !scope.touch(k));
|
|
97
79
|
let payload = snapshot.state;
|
|
98
80
|
if (excluded.length > 0) {
|
|
99
81
|
const live = store.getState();
|
|
@@ -119,17 +101,8 @@ async function restore(data, options) {
|
|
|
119
101
|
warnings
|
|
120
102
|
};
|
|
121
103
|
}
|
|
122
|
-
return {
|
|
123
|
-
ok: false,
|
|
124
|
-
applied: 0,
|
|
125
|
-
skipped: [{
|
|
126
|
-
id: "redux",
|
|
127
|
-
reason: `store ignored the state jump — ${ENABLE_HINT}`
|
|
128
|
-
}],
|
|
129
|
-
warnings: []
|
|
130
|
-
};
|
|
104
|
+
return skippedRestore("redux", `store ignored the state jump — ${ENABLE_HINT}`);
|
|
131
105
|
}
|
|
132
|
-
const ITEM_RENDER_BYTE_LIMIT = 256 * 1024;
|
|
133
106
|
|
|
134
107
|
/** Per-slice restore preview. `base` omitted = compare against the live store. */
|
|
135
108
|
async function previewItems(target, base) {
|
|
@@ -154,54 +127,18 @@ async function previewItems(target, base) {
|
|
|
154
127
|
}
|
|
155
128
|
const oldObj = baseState ?? {};
|
|
156
129
|
const newObj = targetState ?? {};
|
|
157
|
-
const
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
} else if (!inOld) {
|
|
170
|
-
item = {
|
|
171
|
-
key,
|
|
172
|
-
label: key,
|
|
173
|
-
verdict: "added",
|
|
174
|
-
newValue: newObj[key]
|
|
175
|
-
};
|
|
176
|
-
} else if (boundedDeepEqual(oldObj[key], newObj[key])) {
|
|
177
|
-
item = {
|
|
178
|
-
key,
|
|
179
|
-
label: key,
|
|
180
|
-
verdict: "unchanged"
|
|
181
|
-
};
|
|
182
|
-
} else if (jsonLikelyLargerThan(oldObj[key], ITEM_RENDER_BYTE_LIMIT) || jsonLikelyLargerThan(newObj[key], ITEM_RENDER_BYTE_LIMIT)) {
|
|
183
|
-
item = {
|
|
184
|
-
key,
|
|
185
|
-
label: key,
|
|
186
|
-
verdict: "too-large",
|
|
187
|
-
reason: "slice too large to render a diff — restore still applies it"
|
|
188
|
-
};
|
|
189
|
-
} else {
|
|
190
|
-
item = {
|
|
191
|
-
key,
|
|
192
|
-
label: key,
|
|
193
|
-
verdict: "changed",
|
|
194
|
-
oldValue: oldObj[key],
|
|
195
|
-
newValue: newObj[key]
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
if (wontApplyReason && item.verdict !== "unchanged") {
|
|
199
|
-
item = {
|
|
200
|
-
...item,
|
|
201
|
-
verdict: "wont-apply",
|
|
202
|
-
reason: wontApplyReason
|
|
203
|
-
};
|
|
204
|
-
}
|
|
130
|
+
for (const key of unionKeys(oldObj, newObj)) {
|
|
131
|
+
let item = classifyPreviewItem({
|
|
132
|
+
key,
|
|
133
|
+
label: key,
|
|
134
|
+
oldValue: oldObj[key],
|
|
135
|
+
newValue: newObj[key],
|
|
136
|
+
inOld: Object.prototype.hasOwnProperty.call(oldObj, key),
|
|
137
|
+
inNew: Object.prototype.hasOwnProperty.call(newObj, key)
|
|
138
|
+
}, {
|
|
139
|
+
tooLargeReason: "slice too large to render a diff — restore still applies it"
|
|
140
|
+
});
|
|
141
|
+
if (wontApplyReason) item = wontApply(item, wontApplyReason);
|
|
205
142
|
items.push(item);
|
|
206
143
|
}
|
|
207
144
|
if (wontApplyReason) notes.push(`Redux restore unavailable: ${wontApplyReason}`);
|
|
@@ -65,18 +65,12 @@ export declare const reduxToolPreset: {
|
|
|
65
65
|
* });
|
|
66
66
|
* ```
|
|
67
67
|
*/
|
|
68
|
-
export declare
|
|
69
|
-
/**
|
|
70
|
-
name?: string;
|
|
71
|
-
/** Tool description */
|
|
72
|
-
description?: string;
|
|
73
|
-
/** Custom tool ID (default: "redux") */
|
|
74
|
-
id?: string;
|
|
75
|
-
/** Icon color (default: Redux purple #764ABC) */
|
|
68
|
+
export declare const createReduxTool: (options?: ({
|
|
69
|
+
/** Icon color */
|
|
76
70
|
iconColor?: string;
|
|
77
71
|
/** Enable shared modal dimensions */
|
|
78
72
|
enableSharedModalDimensions?: boolean;
|
|
79
|
-
})
|
|
73
|
+
} & import("@buoy-gg/shared-ui").ToolPresetOverrides) | undefined) => {
|
|
80
74
|
id: string;
|
|
81
75
|
name: string;
|
|
82
76
|
description: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../../src/preset.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../../src/preset.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAI3D;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe;;;;;qBAKT;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;;;;;CAKjC,CAAC;AAEH;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,eAAe;IAGxB,iBAAiB;gBACL,MAAM;IAClB,qCAAqC;kCACP,OAAO;;;;;;qBA3BtB;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;;;;;CAoClC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReduxActionInfoView.d.ts","sourceRoot":"","sources":["../../../../src/redux/components/ReduxActionInfoView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAA0D,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ReduxActionInfoView.d.ts","sourceRoot":"","sources":["../../../../src/redux/components/ReduxActionInfoView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAA0D,MAAM,OAAO,CAAC;AAoB/E,OAAO,KAAK,EAAE,WAAW,EAAkB,MAAM,UAAU,CAAC;AAU5D,UAAU,wBAAwB;IAChC,MAAM,EAAE,WAAW,CAAC;IACpB,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;CACpD;AAsGD,eAAO,MAAM,mBAAmB,sDAsgB9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReduxActionItem.d.ts","sourceRoot":"","sources":["../../../../src/redux/components/ReduxActionItem.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,WAAW,EAAkB,MAAM,UAAU,CAAC;AAG5D,UAAU,oBAAoB;IAC5B,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IACvC;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAmKD,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"ReduxActionItem.d.ts","sourceRoot":"","sources":["../../../../src/redux/components/ReduxActionItem.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,WAAW,EAAkB,MAAM,UAAU,CAAC;AAG5D,UAAU,oBAAoB;IAC5B,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IACvC;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAmKD,eAAO,MAAM,eAAe,4DAqF1B,CAAC"}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* ReduxDetailViewToggle
|
|
3
3
|
*
|
|
4
4
|
* Three-card toggle for switching between Action, State, and Diff views.
|
|
5
|
-
*
|
|
5
|
+
* The cards themselves are the shared `DetailViewToggle`; this file owns
|
|
6
|
+
* the redux view list and testID prefix.
|
|
6
7
|
*/
|
|
7
8
|
import React from "react";
|
|
8
9
|
export type ReduxDetailViewMode = "action" | "state" | "diff";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReduxDetailViewToggle.d.ts","sourceRoot":"","sources":["../../../../src/redux/components/ReduxDetailViewToggle.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ReduxDetailViewToggle.d.ts","sourceRoot":"","sources":["../../../../src/redux/components/ReduxDetailViewToggle.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAe,MAAM,OAAO,CAAC;AASpC,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAE9D,UAAU,0BAA0B;IAClC,UAAU,EAAE,mBAAmB,CAAC;IAChC,YAAY,EAAE,CAAC,IAAI,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAClD,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAYD,eAAO,MAAM,qBAAqB,wDAchC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReduxModal.d.ts","sourceRoot":"","sources":["../../../../src/redux/components/ReduxModal.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"ReduxModal.d.ts","sourceRoot":"","sources":["../../../../src/redux/components/ReduxModal.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAgDH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAG5C;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,QAAoC,CAAC;AAExE,UAAU,eAAe;IACvB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC;;;;OAIG;IACH,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC/C;;;;;;;OAOG;IACH,uBAAuB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,+EAA+E;IAC/E,iBAAiB,CAAC,EAAE,mBAAmB,CAAC;CACzC;AAoCD,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,OAAO,EACP,MAAM,EACN,UAAU,EACV,2BAAmC,EACnC,MAAc,EACd,cAAc,EACd,uBAAuB,EACvB,iBAAiB,GAClB,EAAE,eAAe,sCAokBjB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,KAAK,GAAE,IAAI,CAAC,eAAe,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAM,+BAGpE"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hook for consuming Redux actions from the store
|
|
3
|
+
*
|
|
4
|
+
* The subscribe / filter / pause / clear plumbing is shared `useChangeLog`;
|
|
5
|
+
* this file owns the redux-specific stats, action types and selection.
|
|
3
6
|
*/
|
|
4
7
|
import type { ReduxAction, ReduxFilter } from "../types";
|
|
5
8
|
export interface UseReduxActionsResult {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useReduxActions.d.ts","sourceRoot":"","sources":["../../../../src/redux/hooks/useReduxActions.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"useReduxActions.d.ts","sourceRoot":"","sources":["../../../../src/redux/hooks/useReduxActions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAGzD,MAAM,WAAW,qBAAqB;IACpC,2BAA2B;IAC3B,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,+CAA+C;IAC/C,eAAe,EAAE,WAAW,EAAE,CAAC;IAC/B,8BAA8B;IAC9B,MAAM,EAAE,WAAW,CAAC;IACpB,6BAA6B;IAC7B,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,CAAC;IAC7D,wCAAwC;IACxC,KAAK,EAAE;QACL,YAAY,EAAE,MAAM,CAAC;QACrB,kBAAkB,EAAE,MAAM,CAAC;QAC3B,qBAAqB,EAAE,MAAM,CAAC;QAC9B,iBAAiB,EAAE,MAAM,CAAC;QAC1B,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,iCAAiC;IACjC,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,wCAAwC;IACxC,SAAS,EAAE,OAAO,CAAC;IACnB,mCAAmC;IACnC,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,4CAA4C;IAC5C,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,uBAAuB;IACvB,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,WAAW,GAAG,SAAS,CAAC;IACvD,gDAAgD;IAChD,cAAc,EAAE,WAAW,GAAG,IAAI,CAAC;IACnC,0BAA0B;IAC1B,iBAAiB,EAAE,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;CACzD;AAKD,wBAAgB,eAAe,IAAI,qBAAqB,CA2CvD"}
|
|
@@ -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"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"reduxActionStore.d.ts","sourceRoot":"","sources":["../../../../src/redux/utils/reduxActionStore.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAkB,MAAM,oBAAoB,CAAC;AAC/D,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,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAItD;AAwDD;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAErE;AA8HD,cAAM,gBAAiB,SAAQ,SAAS,CAAC,WAAW,CAAC;IAEnD,SAAS,CACP,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,SAAS,EAAE,OAAO,EAClB,SAAS,EAAE,OAAO,EAClB,QAAQ,CAAC,EAAE,MAAM,GAChB,IAAI;IAyEP,UAAU,IAAI,WAAW,EAAE;IAI3B,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS;IAIlD,YAAY,IAAI,IAAI;IAQpB;;;;OAIG;IACH,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,IAAI;IA8B5C;;;;OAIG;IACH,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,WAAW,CAAC,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",
|