@buoy-gg/redux 7.0.41 → 7.0.43
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 +11 -106
- 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 -337
- 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/reduxPeer.js +1 -17
- package/lib/commonjs/redux/hooks/reduxPeer.web.js +1 -10
- package/lib/commonjs/redux/hooks/useAutoInstrumentRedux.js +1 -177
- package/lib/commonjs/redux/hooks/useReduxActions.js +1 -58
- package/lib/commonjs/redux/sync/reduxSyncAdapter.js +1 -191
- package/lib/commonjs/redux/types/index.js +1 -1
- 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 -333
- 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/reduxPeer.js +1 -13
- package/lib/module/redux/hooks/reduxPeer.web.js +1 -6
- package/lib/module/redux/hooks/useAutoInstrumentRedux.js +1 -173
- package/lib/module/redux/hooks/useReduxActions.js +1 -54
- package/lib/module/redux/sync/reduxSyncAdapter.js +1 -188
- package/lib/module/redux/types/index.js +1 -1
- 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/lib/web/index.mjs +1 -2
- package/package.json +5 -8
- 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/reduxPeer.d.ts.map +0 -1
- package/lib/typescript/redux/hooks/reduxPeer.web.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
|
@@ -1,122 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# @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
|
-
|
|
7
|
+
<a href="https://buoy.gg/buoy/latest/docs/tools/redux"><b>Redux guide</b></a> · <a href="https://buoy.gg">buoy.gg</a> · <a href="https://github.com/Buoy-gg/buoy">All tools</a>
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
[](https://www.npmjs.com/package/@buoy-gg/redux) [](https://www.npmjs.com/package/@buoy-gg/redux)
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
npm install @buoy-gg/core @buoy-gg/redux
|
|
13
|
-
```
|
|
11
|
+
<a href="https://buoy.gg/buoy/latest/docs/tools/redux"><img src="https://raw.githubusercontent.com/Buoy-gg/buoy/main/.github/readme/tools/redux.png" alt="Watch the Redux film on buoy.gg" width="640" /></a>
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
</div>
|
|
16
14
|
|
|
17
|
-
|
|
15
|
+
## Install
|
|
18
16
|
|
|
19
17
|
```bash
|
|
20
|
-
|
|
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
|
-
|
|
33
|
-
## Quick start
|
|
34
|
-
|
|
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.
|
|
36
|
-
|
|
37
|
-
```tsx
|
|
38
|
-
import '@buoy-gg/redux'; // Load before the module that creates your store.
|
|
39
|
-
import { configureStore } from '@reduxjs/toolkit';
|
|
40
|
-
import { Provider } from 'react-redux';
|
|
41
|
-
import { FloatingDevTools } from '@buoy-gg/core';
|
|
42
|
-
|
|
43
|
-
const store = configureStore({ reducer: rootReducer }); // unchanged
|
|
44
|
-
|
|
45
|
-
export default function App() {
|
|
46
|
-
return (
|
|
47
|
-
<Provider store={store}>
|
|
48
|
-
<YourApp />
|
|
49
|
-
<FloatingDevTools />
|
|
50
|
-
</Provider>
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### Capture modes
|
|
56
|
-
|
|
57
|
-
Buoy binds to your store the earliest way available, in this order:
|
|
58
|
-
|
|
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:
|
|
60
|
-
|
|
61
|
-
```tsx
|
|
62
|
-
// index.js — first line
|
|
63
|
-
import '@buoy-gg/redux';
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
2. **Middleware (explicit full capture)** — one line if you prefer being explicit:
|
|
67
|
-
|
|
68
|
-
```tsx
|
|
69
|
-
import { buoyReduxMiddleware } from "@buoy-gg/redux";
|
|
70
|
-
|
|
71
|
-
const store = configureStore({
|
|
72
|
-
reducer: rootReducer,
|
|
73
|
-
middleware: (getDefault) => getDefault().concat(buoyReduxMiddleware),
|
|
74
|
-
});
|
|
75
|
-
```
|
|
76
|
-
|
|
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).
|
|
78
|
-
|
|
79
|
-
### Optional: full time travel
|
|
80
|
-
|
|
81
|
-
Time travel works out of the box on path 1. On the middleware path, wrap your reducer:
|
|
82
|
-
|
|
83
|
-
```tsx
|
|
84
|
-
import { withBuoyDevTools } from '@buoy-gg/redux';
|
|
85
|
-
|
|
86
|
-
const store = configureStore({
|
|
87
|
-
reducer: withBuoyDevTools(rootReducer),
|
|
88
|
-
});
|
|
18
|
+
npm install @buoy-gg/core @buoy-gg/redux
|
|
89
19
|
```
|
|
90
20
|
|
|
91
|
-
|
|
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
|
-
|
|
95
|
-
## What you get
|
|
96
|
-
|
|
97
|
-
- **Every action, captured** — type, payload, timestamp, and a diff summary (`+added -removed ~modified`) per dispatch
|
|
98
|
-
- **Frame-budget warnings** — actions taking longer than 16ms are flagged so slow reducers can't hide
|
|
99
|
-
- **RTK async thunk linking** — pending → fulfilled/rejected automatically connected by Request ID, with a visual timeline and per-request durations
|
|
100
|
-
- **Time travel** — jump to the state after any action, or replay an action to re-test your reducers
|
|
101
|
-
- **Three-tab detail view** — full action payload, full state tree, and a side-by-side diff (tree or split view)
|
|
102
|
-
- **Search & filter** — find actions by type, or show only actions that actually changed state
|
|
103
|
-
- **Export & copy** — dump action history as JSON for bug reports or test fixtures
|
|
104
|
-
- **Recording toggle** — pause capture when you need to focus, resume when ready
|
|
105
|
-
|
|
106
|
-
## Desktop & AI
|
|
21
|
+
Import `@buoy-gg/redux` before the module that creates your store, and keep Redux DevTools integration enabled. Don't create a second store for Buoy.
|
|
107
22
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
## Account and plan requirements
|
|
111
|
-
|
|
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.
|
|
23
|
+
The [Redux guide](https://buoy.gg/buoy/latest/docs/tools/redux) covers setup, what it captures and its limits. New to Buoy? Start with the [Quick start](https://buoy.gg/buoy/latest/docs/quick-start).
|
|
113
24
|
|
|
114
25
|
---
|
|
115
26
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
Proprietary software. © Buoy LLC. [Terms](https://buoy.gg/terms)
|
|
119
|
-
|
|
120
|
-
## Web support (unreleased)
|
|
121
|
-
|
|
122
|
-
Use the app’s existing Redux provider. The browser host mounts capture and exposes the shared state and action panels. The browser build is available in this checkout and has not been published yet. See the [web setup guide](https://buoy.gg/buoy/latest/docs/web-preview) for registration, dependencies, and browser boundaries.
|
|
27
|
+
<sub>Part of <a href="https://buoy.gg">Buoy</a>, developer tools that live inside your app. Proprietary software. © Buoy LLC. <a href="https://buoy.gg/terms">Terms</a></sub>
|
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:true});Object.defineProperty(exports,"BUOY_JUMP_TO_STATE",{enumerable:true,get:function(){return _buoyReduxMiddleware.BUOY_JUMP_TO_STATE}});Object.defineProperty(exports,"BUOY_REPLAY_ACTION",{enumerable:true,get:function(){return _buoyReduxMiddleware.BUOY_REPLAY_ACTION}});Object.defineProperty(exports,"FREE_TIER_ACTION_LIMIT",{enumerable:true,get:function(){return _ReduxModal.FREE_TIER_ACTION_LIMIT}});Object.defineProperty(exports,"REDUX_TEST_ID",{enumerable:true,get:function(){return _testIDs.REDUX_TEST_ID}});Object.defineProperty(exports,"ReduxActionDetailContent",{enumerable:true,get:function(){return _ReduxActionDetailContent.ReduxActionDetailContent}});Object.defineProperty(exports,"ReduxActionDetailFooter",{enumerable:true,get:function(){return _ReduxActionDetailContent.ReduxActionDetailFooter}});Object.defineProperty(exports,"ReduxActionDetailView",{enumerable:true,get:function(){return _ReduxActionDetailView.ReduxActionDetailView}});Object.defineProperty(exports,"ReduxActionItem",{enumerable:true,get:function(){return _ReduxActionItem.ReduxActionItem}});Object.defineProperty(exports,"ReduxAutoInstrument",{enumerable:true,get:function(){return _ReduxAutoInstrument.ReduxAutoInstrument}});Object.defineProperty(exports,"ReduxIcon",{enumerable:true,get:function(){return _ReduxIcon.ReduxIcon}});Object.defineProperty(exports,"ReduxModal",{enumerable:true,get:function(){return _ReduxModal.ReduxModal}});Object.defineProperty(exports,"ReduxToolView",{enumerable:true,get:function(){return _ReduxModal.ReduxToolView}});Object.defineProperty(exports,"actionRowTestID",{enumerable:true,get:function(){return _testIDs.actionRowTestID}});Object.defineProperty(exports,"buildActionRowTestIDs",{enumerable:true,get:function(){return _testIDs.buildActionRowTestIDs}});Object.defineProperty(exports,"buoyDevtoolsEnhancer",{enumerable:true,get:function(){return _devtoolsHook.buoyDevtoolsEnhancer}});Object.defineProperty(exports,"buoyReduxMiddleware",{enumerable:true,get:function(){return _buoyReduxMiddleware.buoyReduxMiddleware}});Object.defineProperty(exports,"claimDevtoolsHook",{enumerable:true,get:function(){return _devtoolsHook.claimDevtoolsHook}});Object.defineProperty(exports,"createBuoyReduxMiddleware",{enumerable:true,get:function(){return _buoyReduxMiddleware.createBuoyReduxMiddleware}});Object.defineProperty(exports,"createReduxHistoryAdapter",{enumerable:true,get:function(){return _createReduxHistoryAdapter.createReduxHistoryAdapter}});Object.defineProperty(exports,"createReduxTool",{enumerable:true,get:function(){return _preset.createReduxTool}});Object.defineProperty(exports,"getActiveStore",{enumerable:true,get:function(){return _autoInstrument.getActiveStore}});Object.defineProperty(exports,"getInstrumentationStatus",{enumerable:true,get:function(){return _autoInstrument.getInstrumentationStatus}});Object.defineProperty(exports,"instrumentStore",{enumerable:true,get:function(){return _autoInstrument.instrumentStore}});Object.defineProperty(exports,"isAutoInstrumentActive",{enumerable:true,get:function(){return _autoInstrument.isAutoInstrumentActive}});Object.defineProperty(exports,"isDevtoolsHookClaimed",{enumerable:true,get:function(){return _devtoolsHook.isDevtoolsHookClaimed}});Object.defineProperty(exports,"isStoreInstrumented",{enumerable:true,get:function(){return _autoInstrument.isStoreInstrumented}});Object.defineProperty(exports,"jumpToState",{enumerable:true,get:function(){return _buoyReduxMiddleware.jumpToState}});Object.defineProperty(exports,"reduxActionStore",{enumerable:true,get:function(){return _reduxActionStore.reduxActionStore}});Object.defineProperty(exports,"reduxHistoryAdapter",{enumerable:true,get:function(){return _createReduxHistoryAdapter.reduxHistoryAdapter}});Object.defineProperty(exports,"reduxSyncAdapter",{enumerable:true,get:function(){return _reduxSyncAdapter.reduxSyncAdapter}});Object.defineProperty(exports,"reduxToolPreset",{enumerable:true,get:function(){return _preset.reduxToolPreset}});Object.defineProperty(exports,"registerReduxStore",{enumerable:true,get:function(){return _autoInstrument.registerReduxStore}});Object.defineProperty(exports,"replayAction",{enumerable:true,get:function(){return _buoyReduxMiddleware.replayAction}});Object.defineProperty(exports,"slugForTestID",{enumerable:true,get:function(){return _testIDs.slugForTestID}});Object.defineProperty(exports,"uninstrumentStore",{enumerable:true,get:function(){return _autoInstrument.uninstrumentStore}});Object.defineProperty(exports,"useAutoInstrumentRedux",{enumerable:true,get:function(){return _useAutoInstrumentRedux.useAutoInstrumentRedux}});Object.defineProperty(exports,"useReduxActions",{enumerable:true,get:function(){return _useReduxActions.useReduxActions}});Object.defineProperty(exports,"useReduxAvailability",{enumerable:true,get:function(){return _useAutoInstrumentRedux.useReduxAvailability}});Object.defineProperty(exports,"withBuoyDevTools",{enumerable:true,get:function(){return _buoyReduxMiddleware.withBuoyDevTools}});require("./redux/utils/snapshotProvider");var _devtoolsHook=require("./redux/utils/devtoolsHook");var _preset=require("./preset");var _buoyReduxMiddleware=require("./redux/utils/buoyReduxMiddleware");var _autoInstrument=require("./redux/utils/autoInstrument");var _createReduxHistoryAdapter=require("./redux/utils/createReduxHistoryAdapter");var _reduxSyncAdapter=require("./redux/sync/reduxSyncAdapter");var _useReduxActions=require("./redux/hooks/useReduxActions");var _useAutoInstrumentRedux=require("./redux/hooks/useAutoInstrumentRedux");var _ReduxModal=require("./redux/components/ReduxModal");var _ReduxActionItem=require("./redux/components/ReduxActionItem");var _ReduxActionDetailView=require("./redux/components/ReduxActionDetailView");var _ReduxActionDetailContent=require("./redux/components/ReduxActionDetailContent");var _ReduxIcon=require("./redux/components/ReduxIcon");var _ReduxAutoInstrument=require("./redux/components/ReduxAutoInstrument");var _testIDs=require("./redux/utils/testIDs");var _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:true});exports.reduxToolPreset=exports.createReduxTool=void 0;var _ReduxModal=require("./redux/components/ReduxModal");var _ReduxIcon=require("./redux/components/ReduxIcon");var _sharedUi=require("@buoy-gg/shared-ui");var _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:false}});const createReduxTool=exports.createReduxTool=(0,_sharedUi.createToolFactory)(reduxToolPreset,e=>({enableSharedModalDimensions:e.enableSharedModalDimensions??false}),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:true});exports.ReduxActionButton=ReduxActionButton;var _reactNative=require("react-native");var _sharedUi=require("@buoy-gg/shared-ui");var _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:e,text:r,type:n,disabled:o=false,testID:c}){const t=buttonConfigs[n];return(0,_jsxRuntime.jsxs)(_reactNative.TouchableOpacity,{testID:c,disabled:o,onPress:e,style:[styles.button,{backgroundColor:o?_sharedUi.night.color.textTertiary+"1A":t.backgroundColor,borderColor:o?_sharedUi.night.color.textTertiary+"33":t.borderColor,opacity:o?.5:1}],activeOpacity:.7,accessibilityRole:"button",accessibilityLabel:r,accessibilityState:{disabled:o},children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.dot,{backgroundColor:o?_sharedUi.night.color.textTertiary:t.color}]}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.text,{color:o?_sharedUi.night.color.textTertiary:t.textColor}],children:r})]})}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}});
|