@buoy-gg/redux 7.0.35 → 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 +37 -9
- package/lib/commonjs/index.js +1 -256
- package/lib/commonjs/preset.js +1 -90
- package/lib/commonjs/redux/components/ReduxActionButton.js +1 -131
- package/lib/commonjs/redux/components/ReduxActionDetailContent.js +1 -437
- package/lib/commonjs/redux/components/ReduxActionDetailView.js +1 -401
- package/lib/commonjs/redux/components/ReduxActionInfoView.js +1 -836
- package/lib/commonjs/redux/components/ReduxActionItem.js +1 -334
- package/lib/commonjs/redux/components/ReduxAutoInstrument.js +1 -20
- package/lib/commonjs/redux/components/ReduxDetailViewToggle.js +1 -50
- package/lib/commonjs/redux/components/ReduxIcon.js +1 -18
- package/lib/commonjs/redux/components/ReduxModal.js +1 -703
- package/lib/commonjs/redux/hooks/useAutoInstrumentRedux.js +1 -187
- package/lib/commonjs/redux/hooks/useReduxActions.js +1 -58
- package/lib/commonjs/redux/sync/reduxSyncAdapter.js +1 -191
- package/lib/commonjs/redux/utils/activeStoreRegistry.js +1 -104
- package/lib/commonjs/redux/utils/autoInstrument.js +1 -231
- package/lib/commonjs/redux/utils/buoyReduxMiddleware.js +1 -202
- package/lib/commonjs/redux/utils/createReduxHistoryAdapter.js +1 -146
- package/lib/commonjs/redux/utils/devtoolsHook.js +1 -152
- package/lib/commonjs/redux/utils/reduxActionStore.js +1 -473
- package/lib/commonjs/redux/utils/snapshotProvider.js +1 -158
- package/lib/commonjs/redux/utils/testIDs.js +1 -75
- package/lib/module/index.js +1 -125
- package/lib/module/preset.js +1 -87
- package/lib/module/redux/components/ReduxActionButton.js +1 -128
- package/lib/module/redux/components/ReduxActionDetailContent.js +1 -433
- package/lib/module/redux/components/ReduxActionDetailView.js +1 -397
- package/lib/module/redux/components/ReduxActionInfoView.js +1 -831
- package/lib/module/redux/components/ReduxActionItem.js +1 -330
- package/lib/module/redux/components/ReduxAutoInstrument.js +1 -17
- package/lib/module/redux/components/ReduxDetailViewToggle.js +1 -45
- package/lib/module/redux/components/ReduxIcon.js +1 -8
- package/lib/module/redux/components/ReduxModal.js +1 -698
- package/lib/module/redux/hooks/useAutoInstrumentRedux.js +1 -183
- package/lib/module/redux/hooks/useReduxActions.js +1 -54
- package/lib/module/redux/sync/reduxSyncAdapter.js +1 -188
- package/lib/module/redux/utils/activeStoreRegistry.js +1 -92
- package/lib/module/redux/utils/autoInstrument.js +1 -201
- package/lib/module/redux/utils/buoyReduxMiddleware.js +1 -188
- package/lib/module/redux/utils/createReduxHistoryAdapter.js +1 -142
- package/lib/module/redux/utils/devtoolsHook.js +1 -145
- package/lib/module/redux/utils/reduxActionStore.js +1 -465
- package/lib/module/redux/utils/snapshotProvider.js +1 -157
- package/lib/module/redux/utils/testIDs.js +1 -68
- package/package.json +5 -5
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/preset.d.ts.map +0 -1
- package/lib/typescript/redux/components/ReduxActionButton.d.ts.map +0 -1
- package/lib/typescript/redux/components/ReduxActionDetailContent.d.ts.map +0 -1
- package/lib/typescript/redux/components/ReduxActionDetailView.d.ts.map +0 -1
- package/lib/typescript/redux/components/ReduxActionInfoView.d.ts.map +0 -1
- package/lib/typescript/redux/components/ReduxActionItem.d.ts.map +0 -1
- package/lib/typescript/redux/components/ReduxAutoInstrument.d.ts.map +0 -1
- package/lib/typescript/redux/components/ReduxDetailViewToggle.d.ts.map +0 -1
- package/lib/typescript/redux/components/ReduxIcon.d.ts.map +0 -1
- package/lib/typescript/redux/components/ReduxModal.d.ts.map +0 -1
- package/lib/typescript/redux/hooks/useAutoInstrumentRedux.d.ts.map +0 -1
- package/lib/typescript/redux/hooks/useReduxActions.d.ts.map +0 -1
- package/lib/typescript/redux/sync/reduxSyncAdapter.d.ts.map +0 -1
- package/lib/typescript/redux/types/index.d.ts.map +0 -1
- package/lib/typescript/redux/utils/activeStoreRegistry.d.ts.map +0 -1
- package/lib/typescript/redux/utils/autoInstrument.d.ts.map +0 -1
- package/lib/typescript/redux/utils/buoyReduxMiddleware.d.ts.map +0 -1
- package/lib/typescript/redux/utils/createReduxHistoryAdapter.d.ts.map +0 -1
- package/lib/typescript/redux/utils/devtoolsHook.d.ts.map +0 -1
- package/lib/typescript/redux/utils/reduxActionStore.d.ts.map +0 -1
- package/lib/typescript/redux/utils/snapshotProvider.d.ts.map +0 -1
- package/lib/typescript/redux/utils/testIDs.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@buoy-gg/redux) [](https://www.npmjs.com/package/@buoy-gg/redux)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Inspect your connected Redux store, review captured actions and state changes, and dispatch actions from your device.
|
|
6
6
|
|
|
7
|
-
Part of [Buoy](https://github.com/Buoy-gg/buoy)
|
|
7
|
+
Part of [Buoy](https://github.com/Buoy-gg/buoy). Install the package, complete account setup, and follow the integration steps below.
|
|
8
8
|
|
|
9
9
|
## Install
|
|
10
10
|
|
|
@@ -12,11 +12,30 @@ Part of [Buoy](https://github.com/Buoy-gg/buoy) — devtools that live inside yo
|
|
|
12
12
|
npm install @buoy-gg/core @buoy-gg/redux
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
+
## Before you start
|
|
16
|
+
|
|
17
|
+
Use a development build with `@buoy-gg/core` and a Free or Pro Buoy account key. From your app’s directory, sign in:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npx --package=@buoy-gg/core buoy login
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
For Expo, initialize Buoy before rendering the menu:
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
import { Buoy } from "@buoy-gg/core";
|
|
27
|
+
|
|
28
|
+
Buoy.init({ licenseKey: process.env.EXPO_PUBLIC_BUOY_KEY });
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
The login command writes the Expo key to `.env.local`. For React Native CLI, pass the key from your app’s environment configuration; React Native does not load `.env.local` automatically. Mount `FloatingDevTools` inside the same providers as your screens and restart the development server after installation. The [Quick Start](https://buoy.gg/buoy/latest/docs/quick-start) shows the complete root component setup.
|
|
32
|
+
|
|
15
33
|
## Quick start
|
|
16
34
|
|
|
17
|
-
|
|
35
|
+
Load the Buoy Redux integration before creating your store and keep Redux DevTools integration enabled. The example uses your existing `rootReducer` and app component; do not create a second store for Buoy.
|
|
18
36
|
|
|
19
37
|
```tsx
|
|
38
|
+
import '@buoy-gg/redux'; // Load before the module that creates your store.
|
|
20
39
|
import { configureStore } from '@reduxjs/toolkit';
|
|
21
40
|
import { Provider } from 'react-redux';
|
|
22
41
|
import { FloatingDevTools } from '@buoy-gg/core';
|
|
@@ -33,11 +52,11 @@ export default function App() {
|
|
|
33
52
|
}
|
|
34
53
|
```
|
|
35
54
|
|
|
36
|
-
###
|
|
55
|
+
### Capture modes
|
|
37
56
|
|
|
38
57
|
Buoy binds to your store the earliest way available, in this order:
|
|
39
58
|
|
|
40
|
-
1. **Store-creation hook (default, full capture)** — importing `@buoy-gg/redux` claims the Redux DevTools global that RTK checks by default. If the package loads before your store module, Buoy is inside the store from creation: every action (thunk-internal, RTK Query) is captured and time travel is real. To
|
|
59
|
+
1. **Store-creation hook (default, full capture)** — importing `@buoy-gg/redux` claims the Redux DevTools global that RTK checks by default. If the package loads before your store module, Buoy is inside the store from creation: every action (thunk-internal, RTK Query) is captured and time travel is real. To establish this ordering, make it the first import of your app entry:
|
|
41
60
|
|
|
42
61
|
```tsx
|
|
43
62
|
// index.js — first line
|
|
@@ -47,7 +66,12 @@ Buoy binds to your store the earliest way available, in this order:
|
|
|
47
66
|
2. **Middleware (explicit full capture)** — one line if you prefer being explicit:
|
|
48
67
|
|
|
49
68
|
```tsx
|
|
50
|
-
|
|
69
|
+
import { buoyReduxMiddleware } from "@buoy-gg/redux";
|
|
70
|
+
|
|
71
|
+
const store = configureStore({
|
|
72
|
+
reducer: rootReducer,
|
|
73
|
+
middleware: (getDefault) => getDefault().concat(buoyReduxMiddleware),
|
|
74
|
+
});
|
|
51
75
|
```
|
|
52
76
|
|
|
53
77
|
3. **Startup fallback** — if your store was created before Buoy loaded, `FloatingDevTools` binds it automatically at app mount. Top-level dispatches are captured from startup; actions dispatched *inside* thunks/middleware aren't visible to this mode (the tool tells you when it's in it).
|
|
@@ -64,6 +88,10 @@ const store = configureStore({
|
|
|
64
88
|
});
|
|
65
89
|
```
|
|
66
90
|
|
|
91
|
+
## Check the integration
|
|
92
|
+
|
|
93
|
+
Dispatch an existing app action and confirm that its action and state change appear. Keep the Redux devtools connection enabled and initialize Buoy’s Redux integration before creating the store. Jumping to a retained state does not reverse backend requests or other side effects.
|
|
94
|
+
|
|
67
95
|
## What you get
|
|
68
96
|
|
|
69
97
|
- **Every action, captured** — type, payload, timestamp, and a diff summary (`+added -removed ~modified`) per dispatch
|
|
@@ -77,11 +105,11 @@ const store = configureStore({
|
|
|
77
105
|
|
|
78
106
|
## Desktop & AI
|
|
79
107
|
|
|
80
|
-
|
|
108
|
+
To connect a React Native app to [Buoy Desktop](https://github.com/Buoy-gg/Buoy-Desktop) or MCP, install `@buoy-gg/external-sync` and follow the [Desktop connection guide](https://buoy.gg/buoy/latest/docs/desktop). Sign in to Desktop separately. [MCP setup](https://buoy.gg/buoy/latest/docs/mcp) also requires a process account and Pro access. Available remote actions depend on the tool and app integration.
|
|
81
109
|
|
|
82
|
-
##
|
|
110
|
+
## Account and plan requirements
|
|
83
111
|
|
|
84
|
-
|
|
112
|
+
Use a Free or Pro Buoy account. History limits and paid features vary by tool; see [pricing](https://buoy.gg/pricing). Production access requires Pro where supported. Development-only hooks and actions remain unavailable in release builds.
|
|
85
113
|
|
|
86
114
|
---
|
|
87
115
|
|
package/lib/commonjs/index.js
CHANGED
|
@@ -1,256 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "BUOY_JUMP_TO_STATE", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _buoyReduxMiddleware.BUOY_JUMP_TO_STATE;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "BUOY_REPLAY_ACTION", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _buoyReduxMiddleware.BUOY_REPLAY_ACTION;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "FREE_TIER_ACTION_LIMIT", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return _ReduxModal.FREE_TIER_ACTION_LIMIT;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "REDUX_TEST_ID", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function () {
|
|
27
|
-
return _testIDs.REDUX_TEST_ID;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(exports, "ReduxActionDetailContent", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function () {
|
|
33
|
-
return _ReduxActionDetailContent.ReduxActionDetailContent;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(exports, "ReduxActionDetailFooter", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function () {
|
|
39
|
-
return _ReduxActionDetailContent.ReduxActionDetailFooter;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
Object.defineProperty(exports, "ReduxActionDetailView", {
|
|
43
|
-
enumerable: true,
|
|
44
|
-
get: function () {
|
|
45
|
-
return _ReduxActionDetailView.ReduxActionDetailView;
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
Object.defineProperty(exports, "ReduxActionItem", {
|
|
49
|
-
enumerable: true,
|
|
50
|
-
get: function () {
|
|
51
|
-
return _ReduxActionItem.ReduxActionItem;
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
Object.defineProperty(exports, "ReduxAutoInstrument", {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function () {
|
|
57
|
-
return _ReduxAutoInstrument.ReduxAutoInstrument;
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
Object.defineProperty(exports, "ReduxIcon", {
|
|
61
|
-
enumerable: true,
|
|
62
|
-
get: function () {
|
|
63
|
-
return _ReduxIcon.ReduxIcon;
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
Object.defineProperty(exports, "ReduxModal", {
|
|
67
|
-
enumerable: true,
|
|
68
|
-
get: function () {
|
|
69
|
-
return _ReduxModal.ReduxModal;
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
Object.defineProperty(exports, "ReduxToolView", {
|
|
73
|
-
enumerable: true,
|
|
74
|
-
get: function () {
|
|
75
|
-
return _ReduxModal.ReduxToolView;
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
Object.defineProperty(exports, "actionRowTestID", {
|
|
79
|
-
enumerable: true,
|
|
80
|
-
get: function () {
|
|
81
|
-
return _testIDs.actionRowTestID;
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
Object.defineProperty(exports, "buildActionRowTestIDs", {
|
|
85
|
-
enumerable: true,
|
|
86
|
-
get: function () {
|
|
87
|
-
return _testIDs.buildActionRowTestIDs;
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
Object.defineProperty(exports, "buoyDevtoolsEnhancer", {
|
|
91
|
-
enumerable: true,
|
|
92
|
-
get: function () {
|
|
93
|
-
return _devtoolsHook.buoyDevtoolsEnhancer;
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
Object.defineProperty(exports, "buoyReduxMiddleware", {
|
|
97
|
-
enumerable: true,
|
|
98
|
-
get: function () {
|
|
99
|
-
return _buoyReduxMiddleware.buoyReduxMiddleware;
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
Object.defineProperty(exports, "claimDevtoolsHook", {
|
|
103
|
-
enumerable: true,
|
|
104
|
-
get: function () {
|
|
105
|
-
return _devtoolsHook.claimDevtoolsHook;
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
Object.defineProperty(exports, "createBuoyReduxMiddleware", {
|
|
109
|
-
enumerable: true,
|
|
110
|
-
get: function () {
|
|
111
|
-
return _buoyReduxMiddleware.createBuoyReduxMiddleware;
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
Object.defineProperty(exports, "createReduxHistoryAdapter", {
|
|
115
|
-
enumerable: true,
|
|
116
|
-
get: function () {
|
|
117
|
-
return _createReduxHistoryAdapter.createReduxHistoryAdapter;
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
Object.defineProperty(exports, "createReduxTool", {
|
|
121
|
-
enumerable: true,
|
|
122
|
-
get: function () {
|
|
123
|
-
return _preset.createReduxTool;
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
Object.defineProperty(exports, "getActiveStore", {
|
|
127
|
-
enumerable: true,
|
|
128
|
-
get: function () {
|
|
129
|
-
return _autoInstrument.getActiveStore;
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
Object.defineProperty(exports, "getInstrumentationStatus", {
|
|
133
|
-
enumerable: true,
|
|
134
|
-
get: function () {
|
|
135
|
-
return _autoInstrument.getInstrumentationStatus;
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
Object.defineProperty(exports, "instrumentStore", {
|
|
139
|
-
enumerable: true,
|
|
140
|
-
get: function () {
|
|
141
|
-
return _autoInstrument.instrumentStore;
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
Object.defineProperty(exports, "isAutoInstrumentActive", {
|
|
145
|
-
enumerable: true,
|
|
146
|
-
get: function () {
|
|
147
|
-
return _autoInstrument.isAutoInstrumentActive;
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
Object.defineProperty(exports, "isDevtoolsHookClaimed", {
|
|
151
|
-
enumerable: true,
|
|
152
|
-
get: function () {
|
|
153
|
-
return _devtoolsHook.isDevtoolsHookClaimed;
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
Object.defineProperty(exports, "isStoreInstrumented", {
|
|
157
|
-
enumerable: true,
|
|
158
|
-
get: function () {
|
|
159
|
-
return _autoInstrument.isStoreInstrumented;
|
|
160
|
-
}
|
|
161
|
-
});
|
|
162
|
-
Object.defineProperty(exports, "jumpToState", {
|
|
163
|
-
enumerable: true,
|
|
164
|
-
get: function () {
|
|
165
|
-
return _buoyReduxMiddleware.jumpToState;
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
|
-
Object.defineProperty(exports, "reduxActionStore", {
|
|
169
|
-
enumerable: true,
|
|
170
|
-
get: function () {
|
|
171
|
-
return _reduxActionStore.reduxActionStore;
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
|
-
Object.defineProperty(exports, "reduxHistoryAdapter", {
|
|
175
|
-
enumerable: true,
|
|
176
|
-
get: function () {
|
|
177
|
-
return _createReduxHistoryAdapter.reduxHistoryAdapter;
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
|
-
Object.defineProperty(exports, "reduxSyncAdapter", {
|
|
181
|
-
enumerable: true,
|
|
182
|
-
get: function () {
|
|
183
|
-
return _reduxSyncAdapter.reduxSyncAdapter;
|
|
184
|
-
}
|
|
185
|
-
});
|
|
186
|
-
Object.defineProperty(exports, "reduxToolPreset", {
|
|
187
|
-
enumerable: true,
|
|
188
|
-
get: function () {
|
|
189
|
-
return _preset.reduxToolPreset;
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
Object.defineProperty(exports, "registerReduxStore", {
|
|
193
|
-
enumerable: true,
|
|
194
|
-
get: function () {
|
|
195
|
-
return _autoInstrument.registerReduxStore;
|
|
196
|
-
}
|
|
197
|
-
});
|
|
198
|
-
Object.defineProperty(exports, "replayAction", {
|
|
199
|
-
enumerable: true,
|
|
200
|
-
get: function () {
|
|
201
|
-
return _buoyReduxMiddleware.replayAction;
|
|
202
|
-
}
|
|
203
|
-
});
|
|
204
|
-
Object.defineProperty(exports, "slugForTestID", {
|
|
205
|
-
enumerable: true,
|
|
206
|
-
get: function () {
|
|
207
|
-
return _testIDs.slugForTestID;
|
|
208
|
-
}
|
|
209
|
-
});
|
|
210
|
-
Object.defineProperty(exports, "uninstrumentStore", {
|
|
211
|
-
enumerable: true,
|
|
212
|
-
get: function () {
|
|
213
|
-
return _autoInstrument.uninstrumentStore;
|
|
214
|
-
}
|
|
215
|
-
});
|
|
216
|
-
Object.defineProperty(exports, "useAutoInstrumentRedux", {
|
|
217
|
-
enumerable: true,
|
|
218
|
-
get: function () {
|
|
219
|
-
return _useAutoInstrumentRedux.useAutoInstrumentRedux;
|
|
220
|
-
}
|
|
221
|
-
});
|
|
222
|
-
Object.defineProperty(exports, "useReduxActions", {
|
|
223
|
-
enumerable: true,
|
|
224
|
-
get: function () {
|
|
225
|
-
return _useReduxActions.useReduxActions;
|
|
226
|
-
}
|
|
227
|
-
});
|
|
228
|
-
Object.defineProperty(exports, "useReduxAvailability", {
|
|
229
|
-
enumerable: true,
|
|
230
|
-
get: function () {
|
|
231
|
-
return _useAutoInstrumentRedux.useReduxAvailability;
|
|
232
|
-
}
|
|
233
|
-
});
|
|
234
|
-
Object.defineProperty(exports, "withBuoyDevTools", {
|
|
235
|
-
enumerable: true,
|
|
236
|
-
get: function () {
|
|
237
|
-
return _buoyReduxMiddleware.withBuoyDevTools;
|
|
238
|
-
}
|
|
239
|
-
});
|
|
240
|
-
require("./redux/utils/snapshotProvider");
|
|
241
|
-
var _devtoolsHook = require("./redux/utils/devtoolsHook");
|
|
242
|
-
var _preset = require("./preset");
|
|
243
|
-
var _buoyReduxMiddleware = require("./redux/utils/buoyReduxMiddleware");
|
|
244
|
-
var _autoInstrument = require("./redux/utils/autoInstrument");
|
|
245
|
-
var _createReduxHistoryAdapter = require("./redux/utils/createReduxHistoryAdapter");
|
|
246
|
-
var _reduxSyncAdapter = require("./redux/sync/reduxSyncAdapter");
|
|
247
|
-
var _useReduxActions = require("./redux/hooks/useReduxActions");
|
|
248
|
-
var _useAutoInstrumentRedux = require("./redux/hooks/useAutoInstrumentRedux");
|
|
249
|
-
var _ReduxModal = require("./redux/components/ReduxModal");
|
|
250
|
-
var _ReduxActionItem = require("./redux/components/ReduxActionItem");
|
|
251
|
-
var _ReduxActionDetailView = require("./redux/components/ReduxActionDetailView");
|
|
252
|
-
var _ReduxActionDetailContent = require("./redux/components/ReduxActionDetailContent");
|
|
253
|
-
var _ReduxIcon = require("./redux/components/ReduxIcon");
|
|
254
|
-
var _ReduxAutoInstrument = require("./redux/components/ReduxAutoInstrument");
|
|
255
|
-
var _testIDs = require("./redux/utils/testIDs");
|
|
256
|
-
var _reduxActionStore = require("./redux/utils/reduxActionStore");
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"BUOY_JUMP_TO_STATE",{enumerable:!0,get:function(){return _buoyReduxMiddleware.BUOY_JUMP_TO_STATE}}),Object.defineProperty(exports,"BUOY_REPLAY_ACTION",{enumerable:!0,get:function(){return _buoyReduxMiddleware.BUOY_REPLAY_ACTION}}),Object.defineProperty(exports,"FREE_TIER_ACTION_LIMIT",{enumerable:!0,get:function(){return _ReduxModal.FREE_TIER_ACTION_LIMIT}}),Object.defineProperty(exports,"REDUX_TEST_ID",{enumerable:!0,get:function(){return _testIDs.REDUX_TEST_ID}}),Object.defineProperty(exports,"ReduxActionDetailContent",{enumerable:!0,get:function(){return _ReduxActionDetailContent.ReduxActionDetailContent}}),Object.defineProperty(exports,"ReduxActionDetailFooter",{enumerable:!0,get:function(){return _ReduxActionDetailContent.ReduxActionDetailFooter}}),Object.defineProperty(exports,"ReduxActionDetailView",{enumerable:!0,get:function(){return _ReduxActionDetailView.ReduxActionDetailView}}),Object.defineProperty(exports,"ReduxActionItem",{enumerable:!0,get:function(){return _ReduxActionItem.ReduxActionItem}}),Object.defineProperty(exports,"ReduxAutoInstrument",{enumerable:!0,get:function(){return _ReduxAutoInstrument.ReduxAutoInstrument}}),Object.defineProperty(exports,"ReduxIcon",{enumerable:!0,get:function(){return _ReduxIcon.ReduxIcon}}),Object.defineProperty(exports,"ReduxModal",{enumerable:!0,get:function(){return _ReduxModal.ReduxModal}}),Object.defineProperty(exports,"ReduxToolView",{enumerable:!0,get:function(){return _ReduxModal.ReduxToolView}}),Object.defineProperty(exports,"actionRowTestID",{enumerable:!0,get:function(){return _testIDs.actionRowTestID}}),Object.defineProperty(exports,"buildActionRowTestIDs",{enumerable:!0,get:function(){return _testIDs.buildActionRowTestIDs}}),Object.defineProperty(exports,"buoyDevtoolsEnhancer",{enumerable:!0,get:function(){return _devtoolsHook.buoyDevtoolsEnhancer}}),Object.defineProperty(exports,"buoyReduxMiddleware",{enumerable:!0,get:function(){return _buoyReduxMiddleware.buoyReduxMiddleware}}),Object.defineProperty(exports,"claimDevtoolsHook",{enumerable:!0,get:function(){return _devtoolsHook.claimDevtoolsHook}}),Object.defineProperty(exports,"createBuoyReduxMiddleware",{enumerable:!0,get:function(){return _buoyReduxMiddleware.createBuoyReduxMiddleware}}),Object.defineProperty(exports,"createReduxHistoryAdapter",{enumerable:!0,get:function(){return _createReduxHistoryAdapter.createReduxHistoryAdapter}}),Object.defineProperty(exports,"createReduxTool",{enumerable:!0,get:function(){return _preset.createReduxTool}}),Object.defineProperty(exports,"getActiveStore",{enumerable:!0,get:function(){return _autoInstrument.getActiveStore}}),Object.defineProperty(exports,"getInstrumentationStatus",{enumerable:!0,get:function(){return _autoInstrument.getInstrumentationStatus}}),Object.defineProperty(exports,"instrumentStore",{enumerable:!0,get:function(){return _autoInstrument.instrumentStore}}),Object.defineProperty(exports,"isAutoInstrumentActive",{enumerable:!0,get:function(){return _autoInstrument.isAutoInstrumentActive}}),Object.defineProperty(exports,"isDevtoolsHookClaimed",{enumerable:!0,get:function(){return _devtoolsHook.isDevtoolsHookClaimed}}),Object.defineProperty(exports,"isStoreInstrumented",{enumerable:!0,get:function(){return _autoInstrument.isStoreInstrumented}}),Object.defineProperty(exports,"jumpToState",{enumerable:!0,get:function(){return _buoyReduxMiddleware.jumpToState}}),Object.defineProperty(exports,"reduxActionStore",{enumerable:!0,get:function(){return _reduxActionStore.reduxActionStore}}),Object.defineProperty(exports,"reduxHistoryAdapter",{enumerable:!0,get:function(){return _createReduxHistoryAdapter.reduxHistoryAdapter}}),Object.defineProperty(exports,"reduxSyncAdapter",{enumerable:!0,get:function(){return _reduxSyncAdapter.reduxSyncAdapter}}),Object.defineProperty(exports,"reduxToolPreset",{enumerable:!0,get:function(){return _preset.reduxToolPreset}}),Object.defineProperty(exports,"registerReduxStore",{enumerable:!0,get:function(){return _autoInstrument.registerReduxStore}}),Object.defineProperty(exports,"replayAction",{enumerable:!0,get:function(){return _buoyReduxMiddleware.replayAction}}),Object.defineProperty(exports,"slugForTestID",{enumerable:!0,get:function(){return _testIDs.slugForTestID}}),Object.defineProperty(exports,"uninstrumentStore",{enumerable:!0,get:function(){return _autoInstrument.uninstrumentStore}}),Object.defineProperty(exports,"useAutoInstrumentRedux",{enumerable:!0,get:function(){return _useAutoInstrumentRedux.useAutoInstrumentRedux}}),Object.defineProperty(exports,"useReduxActions",{enumerable:!0,get:function(){return _useReduxActions.useReduxActions}}),Object.defineProperty(exports,"useReduxAvailability",{enumerable:!0,get:function(){return _useAutoInstrumentRedux.useReduxAvailability}}),Object.defineProperty(exports,"withBuoyDevTools",{enumerable:!0,get:function(){return _buoyReduxMiddleware.withBuoyDevTools}}),require("./redux/utils/snapshotProvider");var _devtoolsHook=require("./redux/utils/devtoolsHook"),_preset=require("./preset"),_buoyReduxMiddleware=require("./redux/utils/buoyReduxMiddleware"),_autoInstrument=require("./redux/utils/autoInstrument"),_createReduxHistoryAdapter=require("./redux/utils/createReduxHistoryAdapter"),_reduxSyncAdapter=require("./redux/sync/reduxSyncAdapter"),_useReduxActions=require("./redux/hooks/useReduxActions"),_useAutoInstrumentRedux=require("./redux/hooks/useAutoInstrumentRedux"),_ReduxModal=require("./redux/components/ReduxModal"),_ReduxActionItem=require("./redux/components/ReduxActionItem"),_ReduxActionDetailView=require("./redux/components/ReduxActionDetailView"),_ReduxActionDetailContent=require("./redux/components/ReduxActionDetailContent"),_ReduxIcon=require("./redux/components/ReduxIcon"),_ReduxAutoInstrument=require("./redux/components/ReduxAutoInstrument"),_testIDs=require("./redux/utils/testIDs"),_reduxActionStore=require("./redux/utils/reduxActionStore");
|
package/lib/commonjs/preset.js
CHANGED
|
@@ -1,90 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.reduxToolPreset = exports.createReduxTool = void 0;
|
|
7
|
-
var _ReduxModal = require("./redux/components/ReduxModal");
|
|
8
|
-
var _ReduxIcon = require("./redux/components/ReduxIcon");
|
|
9
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
10
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
/**
|
|
12
|
-
* Pre-configured Redux DevTools preset for FloatingDevTools
|
|
13
|
-
*
|
|
14
|
-
* ZERO-CONFIG: This preset is auto-discovered by FloatingDevTools!
|
|
15
|
-
* You do NOT need to import or configure anything - just install @buoy-gg/redux
|
|
16
|
-
* and the Redux tool will appear automatically in your FloatingDevTools.
|
|
17
|
-
*
|
|
18
|
-
* @example Automatic (recommended - no code needed!)
|
|
19
|
-
* ```tsx
|
|
20
|
-
* // Just install: npm install @buoy-gg/redux
|
|
21
|
-
* // The Redux tool appears automatically in FloatingDevTools!
|
|
22
|
-
*
|
|
23
|
-
* <Provider store={store}>
|
|
24
|
-
* <App />
|
|
25
|
-
* <FloatingDevTools /> // Redux tool is auto-detected
|
|
26
|
-
* </Provider>
|
|
27
|
-
* ```
|
|
28
|
-
*
|
|
29
|
-
* @example Manual (only for custom configuration)
|
|
30
|
-
* ```tsx
|
|
31
|
-
* import { createReduxTool } from '@buoy-gg/redux';
|
|
32
|
-
*
|
|
33
|
-
* // Only use this if you need to customize the tool
|
|
34
|
-
* const customReduxTool = createReduxTool({
|
|
35
|
-
* name: "STATE",
|
|
36
|
-
* iconColor: "#9945FF",
|
|
37
|
-
* });
|
|
38
|
-
*
|
|
39
|
-
* <FloatingDevTools apps={[customReduxTool]} />
|
|
40
|
-
* ```
|
|
41
|
-
*/
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Pre-configured Redux DevTools preset for FloatingDevTools.
|
|
45
|
-
* Includes:
|
|
46
|
-
* - Live action monitoring
|
|
47
|
-
* - Action/state inspection
|
|
48
|
-
* - State diff visualization
|
|
49
|
-
* - Filter by action type
|
|
50
|
-
*/
|
|
51
|
-
const reduxToolPreset = exports.reduxToolPreset = (0, _sharedUi.defineToolPreset)({
|
|
52
|
-
id: "redux",
|
|
53
|
-
name: "REDUX",
|
|
54
|
-
description: "Redux action & state inspector",
|
|
55
|
-
slot: "both",
|
|
56
|
-
icon: ({
|
|
57
|
-
size
|
|
58
|
-
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_ReduxIcon.ReduxIcon, {
|
|
59
|
-
size: size
|
|
60
|
-
}),
|
|
61
|
-
component: _ReduxModal.ReduxModal,
|
|
62
|
-
props: {
|
|
63
|
-
enableSharedModalDimensions: false
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Create a custom Redux DevTools configuration.
|
|
69
|
-
* Use this if you want to override default settings.
|
|
70
|
-
*
|
|
71
|
-
* @example
|
|
72
|
-
* ```tsx
|
|
73
|
-
* import { createReduxTool } from '@buoy-gg/redux';
|
|
74
|
-
*
|
|
75
|
-
* const myReduxTool = createReduxTool({
|
|
76
|
-
* name: "STATE",
|
|
77
|
-
* iconColor: "#9945FF", // Purple color
|
|
78
|
-
* });
|
|
79
|
-
* ```
|
|
80
|
-
*/
|
|
81
|
-
const createReduxTool = exports.createReduxTool = (0, _sharedUi.createToolFactory)(reduxToolPreset, options => ({
|
|
82
|
-
enableSharedModalDimensions: options.enableSharedModalDimensions ?? false
|
|
83
|
-
}), options => ({
|
|
84
|
-
icon: ({
|
|
85
|
-
size
|
|
86
|
-
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_ReduxIcon.ReduxIcon, {
|
|
87
|
-
size: size,
|
|
88
|
-
color: options.iconColor
|
|
89
|
-
})
|
|
90
|
-
}));
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.reduxToolPreset=exports.createReduxTool=void 0;var _ReduxModal=require("./redux/components/ReduxModal"),_ReduxIcon=require("./redux/components/ReduxIcon"),_sharedUi=require("@buoy-gg/shared-ui"),_jsxRuntime=require("react/jsx-runtime");const reduxToolPreset=exports.reduxToolPreset=(0,_sharedUi.defineToolPreset)({id:"redux",name:"REDUX",description:"Redux action & state inspector",slot:"both",icon:({size:e})=>(0,_jsxRuntime.jsx)(_ReduxIcon.ReduxIcon,{size:e}),component:_ReduxModal.ReduxModal,props:{enableSharedModalDimensions:!1}}),createReduxTool=exports.createReduxTool=(0,_sharedUi.createToolFactory)(reduxToolPreset,e=>({enableSharedModalDimensions:e.enableSharedModalDimensions??!1}),e=>({icon:({size:o})=>(0,_jsxRuntime.jsx)(_ReduxIcon.ReduxIcon,{size:o,color:e.iconColor})}));
|
|
@@ -1,131 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.ReduxActionButton = ReduxActionButton;
|
|
7
|
-
var _reactNative = require("react-native");
|
|
8
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
9
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
-
/**
|
|
11
|
-
* ReduxActionButton
|
|
12
|
-
*
|
|
13
|
-
* Generic action button for Redux DevTools footer
|
|
14
|
-
* Matches React Query DevTools ActionButton styling
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
// Button color configurations matching React Query pattern
|
|
18
|
-
const buttonConfigs = {
|
|
19
|
-
replay: {
|
|
20
|
-
color: _sharedUi.night.color.accent,
|
|
21
|
-
backgroundColor: _sharedUi.night.color.accent + "15",
|
|
22
|
-
borderColor: _sharedUi.night.color.accent + "40",
|
|
23
|
-
textColor: _sharedUi.night.color.accent
|
|
24
|
-
},
|
|
25
|
-
copy: {
|
|
26
|
-
color: _sharedUi.night.color.accent,
|
|
27
|
-
backgroundColor: _sharedUi.night.color.accent + "15",
|
|
28
|
-
borderColor: _sharedUi.night.color.accent + "40",
|
|
29
|
-
textColor: _sharedUi.night.color.accent
|
|
30
|
-
},
|
|
31
|
-
jump: {
|
|
32
|
-
color: _sharedUi.night.color.warning,
|
|
33
|
-
backgroundColor: _sharedUi.night.color.warning + "15",
|
|
34
|
-
borderColor: _sharedUi.night.color.warning + "40",
|
|
35
|
-
textColor: _sharedUi.night.color.warning
|
|
36
|
-
},
|
|
37
|
-
skip: {
|
|
38
|
-
color: _sharedUi.night.color.textSecondary,
|
|
39
|
-
backgroundColor: _sharedUi.night.color.textSecondary + "26",
|
|
40
|
-
borderColor: _sharedUi.night.color.textSecondary + "59",
|
|
41
|
-
textColor: _sharedUi.night.color.textSecondary
|
|
42
|
-
},
|
|
43
|
-
clear: {
|
|
44
|
-
color: _sharedUi.night.color.danger,
|
|
45
|
-
backgroundColor: _sharedUi.night.color.danger + "15",
|
|
46
|
-
borderColor: _sharedUi.night.color.danger + "40",
|
|
47
|
-
textColor: _sharedUi.night.color.danger
|
|
48
|
-
},
|
|
49
|
-
diff: {
|
|
50
|
-
color: _sharedUi.night.color.info,
|
|
51
|
-
backgroundColor: _sharedUi.night.color.info + "15",
|
|
52
|
-
borderColor: _sharedUi.night.color.info + "40",
|
|
53
|
-
textColor: _sharedUi.night.color.info
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
function ReduxActionButton({
|
|
57
|
-
onPress,
|
|
58
|
-
text,
|
|
59
|
-
type,
|
|
60
|
-
disabled = false,
|
|
61
|
-
testID
|
|
62
|
-
}) {
|
|
63
|
-
const config = buttonConfigs[type];
|
|
64
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
65
|
-
testID: testID,
|
|
66
|
-
disabled: disabled,
|
|
67
|
-
onPress: onPress,
|
|
68
|
-
style: [styles.button, {
|
|
69
|
-
backgroundColor: disabled ? _sharedUi.night.color.textTertiary + "1A" : config.backgroundColor,
|
|
70
|
-
borderColor: disabled ? _sharedUi.night.color.textTertiary + "33" : config.borderColor,
|
|
71
|
-
opacity: disabled ? 0.5 : 1
|
|
72
|
-
}],
|
|
73
|
-
activeOpacity: 0.7,
|
|
74
|
-
accessibilityRole: "button",
|
|
75
|
-
accessibilityLabel: text,
|
|
76
|
-
accessibilityState: {
|
|
77
|
-
disabled
|
|
78
|
-
},
|
|
79
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
80
|
-
style: [styles.dot, {
|
|
81
|
-
backgroundColor: disabled ? _sharedUi.night.color.textTertiary : config.color
|
|
82
|
-
}]
|
|
83
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
84
|
-
style: [styles.text, {
|
|
85
|
-
color: disabled ? _sharedUi.night.color.textTertiary : config.textColor
|
|
86
|
-
}],
|
|
87
|
-
children: text
|
|
88
|
-
})]
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
const styles = _reactNative.StyleSheet.create({
|
|
92
|
-
button: {
|
|
93
|
-
flexDirection: "row",
|
|
94
|
-
alignItems: "center",
|
|
95
|
-
justifyContent: "center",
|
|
96
|
-
borderRadius: 6,
|
|
97
|
-
borderWidth: 1,
|
|
98
|
-
paddingHorizontal: 12,
|
|
99
|
-
paddingVertical: 6,
|
|
100
|
-
height: 25,
|
|
101
|
-
minWidth: 80,
|
|
102
|
-
shadowOffset: {
|
|
103
|
-
width: 0,
|
|
104
|
-
height: 1
|
|
105
|
-
},
|
|
106
|
-
shadowOpacity: 0.2,
|
|
107
|
-
shadowRadius: 2,
|
|
108
|
-
elevation: 2
|
|
109
|
-
},
|
|
110
|
-
dot: {
|
|
111
|
-
width: 5,
|
|
112
|
-
height: 5,
|
|
113
|
-
borderRadius: 3,
|
|
114
|
-
marginRight: 6,
|
|
115
|
-
shadowColor: _sharedUi.night.color.text,
|
|
116
|
-
shadowOffset: {
|
|
117
|
-
width: 0,
|
|
118
|
-
height: 0
|
|
119
|
-
},
|
|
120
|
-
shadowOpacity: 0.6,
|
|
121
|
-
shadowRadius: 2
|
|
122
|
-
},
|
|
123
|
-
text: {
|
|
124
|
-
fontSize: 10,
|
|
125
|
-
fontWeight: "600",
|
|
126
|
-
letterSpacing: 0.5,
|
|
127
|
-
textTransform: "uppercase",
|
|
128
|
-
fontFamily: _sharedUi.monoFont,
|
|
129
|
-
height: 12
|
|
130
|
-
}
|
|
131
|
-
});
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ReduxActionButton=ReduxActionButton;var _reactNative=require("react-native"),_sharedUi=require("@buoy-gg/shared-ui"),_jsxRuntime=require("react/jsx-runtime");const buttonConfigs={replay:{color:_sharedUi.night.color.accent,backgroundColor:_sharedUi.night.color.accent+"15",borderColor:_sharedUi.night.color.accent+"40",textColor:_sharedUi.night.color.accent},copy:{color:_sharedUi.night.color.accent,backgroundColor:_sharedUi.night.color.accent+"15",borderColor:_sharedUi.night.color.accent+"40",textColor:_sharedUi.night.color.accent},jump:{color:_sharedUi.night.color.warning,backgroundColor:_sharedUi.night.color.warning+"15",borderColor:_sharedUi.night.color.warning+"40",textColor:_sharedUi.night.color.warning},skip:{color:_sharedUi.night.color.textSecondary,backgroundColor:_sharedUi.night.color.textSecondary+"26",borderColor:_sharedUi.night.color.textSecondary+"59",textColor:_sharedUi.night.color.textSecondary},clear:{color:_sharedUi.night.color.danger,backgroundColor:_sharedUi.night.color.danger+"15",borderColor:_sharedUi.night.color.danger+"40",textColor:_sharedUi.night.color.danger},diff:{color:_sharedUi.night.color.info,backgroundColor:_sharedUi.night.color.info+"15",borderColor:_sharedUi.night.color.info+"40",textColor:_sharedUi.night.color.info}};function ReduxActionButton({onPress:o,text:t,type:r,disabled:e=!1,testID:i}){const a=buttonConfigs[r];return(0,_jsxRuntime.jsxs)(_reactNative.TouchableOpacity,{testID:i,disabled:e,onPress:o,style:[styles.button,{backgroundColor:e?_sharedUi.night.color.textTertiary+"1A":a.backgroundColor,borderColor:e?_sharedUi.night.color.textTertiary+"33":a.borderColor,opacity:e?.5:1}],activeOpacity:.7,accessibilityRole:"button",accessibilityLabel:t,accessibilityState:{disabled:e},children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.dot,{backgroundColor:e?_sharedUi.night.color.textTertiary:a.color}]}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.text,{color:e?_sharedUi.night.color.textTertiary:a.textColor}],children:t})]})}const styles=_reactNative.StyleSheet.create({button:{flexDirection:"row",alignItems:"center",justifyContent:"center",borderRadius:6,borderWidth:1,paddingHorizontal:12,paddingVertical:6,height:25,minWidth:80,shadowOffset:{width:0,height:1},shadowOpacity:.2,shadowRadius:2,elevation:2},dot:{width:5,height:5,borderRadius:3,marginRight:6,shadowColor:_sharedUi.night.color.text,shadowOffset:{width:0,height:0},shadowOpacity:.6,shadowRadius:2},text:{fontSize:10,fontWeight:"600",letterSpacing:.5,textTransform:"uppercase",fontFamily:_sharedUi.monoFont,height:12}});
|