@buoy-gg/redux 7.0.40 → 7.0.41
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 +4 -0
- package/lib/commonjs/redux/components/ReduxActionItem.js +6 -3
- package/lib/commonjs/redux/hooks/reduxPeer.js +17 -0
- package/lib/commonjs/redux/hooks/reduxPeer.web.js +10 -0
- package/lib/commonjs/redux/hooks/useAutoInstrumentRedux.js +3 -13
- package/lib/module/redux/components/ReduxActionItem.js +6 -3
- package/lib/module/redux/hooks/reduxPeer.js +13 -0
- package/lib/module/redux/hooks/reduxPeer.web.js +6 -0
- package/lib/module/redux/hooks/useAutoInstrumentRedux.js +1 -11
- package/lib/typescript/redux/components/ReduxActionItem.d.ts.map +1 -1
- package/lib/typescript/redux/hooks/reduxPeer.d.ts +3 -0
- package/lib/typescript/redux/hooks/reduxPeer.d.ts.map +1 -0
- package/lib/typescript/redux/hooks/reduxPeer.web.d.ts +2 -0
- package/lib/typescript/redux/hooks/reduxPeer.web.d.ts.map +1 -0
- package/lib/typescript/redux/hooks/useAutoInstrumentRedux.d.ts +3 -15
- package/lib/typescript/redux/hooks/useAutoInstrumentRedux.d.ts.map +1 -1
- package/lib/web/index.mjs +2 -0
- package/package.json +36 -13
package/README.md
CHANGED
|
@@ -116,3 +116,7 @@ Use a Free or Pro Buoy account. History limits and paid features vary by tool; s
|
|
|
116
116
|
📚 [Full docs](https://buoy.gg/buoy/latest/docs/tools/redux) · [All Buoy tools](https://github.com/Buoy-gg/buoy)
|
|
117
117
|
|
|
118
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.
|
|
@@ -201,9 +201,12 @@ function getPrimaryText(action) {
|
|
|
201
201
|
return action.type;
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
-
//
|
|
205
|
-
|
|
206
|
-
|
|
204
|
+
// The real type, minus a thunk's status suffix (the status has its own
|
|
205
|
+
// label). It used to be rebuilt from the uppercased actionName and then
|
|
206
|
+
// lowercased, so `offers/dismissError` read as `offers/dismisserror`.
|
|
207
|
+
const parts = action.type.split("/");
|
|
208
|
+
if (parts.length >= 3 && ["pending", "fulfilled", "rejected"].includes(parts[parts.length - 1])) {
|
|
209
|
+
return parts.slice(0, -1).join("/");
|
|
207
210
|
}
|
|
208
211
|
return action.type;
|
|
209
212
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getReactReduxUseStore = getReactReduxUseStore;
|
|
7
|
+
function getReactReduxUseStore() {
|
|
8
|
+
try {
|
|
9
|
+
// Dynamic require to handle cases where react-redux isn't installed
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
11
|
+
const reactRedux = require("react-redux");
|
|
12
|
+
return reactRedux.useStore;
|
|
13
|
+
} catch {
|
|
14
|
+
// react-redux not available
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useAutoInstrumentRedux = useAutoInstrumentRedux;
|
|
7
7
|
exports.useReduxAvailability = useReduxAvailability;
|
|
8
|
+
var _reduxPeer = require("./reduxPeer");
|
|
8
9
|
var _react = require("react");
|
|
9
10
|
var _autoInstrument = require("../utils/autoInstrument");
|
|
10
11
|
var _activeStoreRegistry = require("../utils/activeStoreRegistry");
|
|
@@ -31,17 +32,6 @@ var _activeStoreRegistry = require("../utils/activeStoreRegistry");
|
|
|
31
32
|
/**
|
|
32
33
|
* Safely attempt to load react-redux and get useStore hook
|
|
33
34
|
*/
|
|
34
|
-
function getReactReduxUseStore() {
|
|
35
|
-
try {
|
|
36
|
-
// Dynamic require to handle cases where react-redux isn't installed
|
|
37
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
38
|
-
const reactRedux = require("react-redux");
|
|
39
|
-
return reactRedux.useStore;
|
|
40
|
-
} catch {
|
|
41
|
-
// react-redux not available
|
|
42
|
-
return null;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
35
|
|
|
46
36
|
// ============================================
|
|
47
37
|
// Hook Types
|
|
@@ -68,7 +58,7 @@ function useAutoInstrumentRedux(options = {}) {
|
|
|
68
58
|
const cleanupRef = (0, _react.useRef)(null);
|
|
69
59
|
|
|
70
60
|
// Check if react-redux is available
|
|
71
|
-
const useStoreHook = getReactReduxUseStore();
|
|
61
|
+
const useStoreHook = (0, _reduxPeer.getReactReduxUseStore)();
|
|
72
62
|
const isReactReduxAvailable = useStoreHook !== null;
|
|
73
63
|
|
|
74
64
|
// Try to get the store using react-redux's useStore
|
|
@@ -164,7 +154,7 @@ function useAutoInstrumentRedux(options = {}) {
|
|
|
164
154
|
* without auto-instrumenting
|
|
165
155
|
*/
|
|
166
156
|
function useReduxAvailability() {
|
|
167
|
-
const useStoreHook = getReactReduxUseStore();
|
|
157
|
+
const useStoreHook = (0, _reduxPeer.getReactReduxUseStore)();
|
|
168
158
|
if (!useStoreHook) {
|
|
169
159
|
return {
|
|
170
160
|
isAvailable: false,
|
|
@@ -197,9 +197,12 @@ function getPrimaryText(action) {
|
|
|
197
197
|
return action.type;
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
-
//
|
|
201
|
-
|
|
202
|
-
|
|
200
|
+
// The real type, minus a thunk's status suffix (the status has its own
|
|
201
|
+
// label). It used to be rebuilt from the uppercased actionName and then
|
|
202
|
+
// lowercased, so `offers/dismissError` read as `offers/dismisserror`.
|
|
203
|
+
const parts = action.type.split("/");
|
|
204
|
+
if (parts.length >= 3 && ["pending", "fulfilled", "rejected"].includes(parts[parts.length - 1])) {
|
|
205
|
+
return parts.slice(0, -1).join("/");
|
|
203
206
|
}
|
|
204
207
|
return action.type;
|
|
205
208
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export function getReactReduxUseStore() {
|
|
4
|
+
try {
|
|
5
|
+
// Dynamic require to handle cases where react-redux isn't installed
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
7
|
+
const reactRedux = require("react-redux");
|
|
8
|
+
return reactRedux.useStore;
|
|
9
|
+
} catch {
|
|
10
|
+
// react-redux not available
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import { getReactReduxUseStore } from './reduxPeer';
|
|
3
4
|
/**
|
|
4
5
|
* React hook for auto-instrumenting Redux stores
|
|
5
6
|
*
|
|
@@ -27,17 +28,6 @@ import { setReduxDiagnostic } from "../utils/activeStoreRegistry";
|
|
|
27
28
|
/**
|
|
28
29
|
* Safely attempt to load react-redux and get useStore hook
|
|
29
30
|
*/
|
|
30
|
-
function getReactReduxUseStore() {
|
|
31
|
-
try {
|
|
32
|
-
// Dynamic require to handle cases where react-redux isn't installed
|
|
33
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
34
|
-
const reactRedux = require("react-redux");
|
|
35
|
-
return reactRedux.useStore;
|
|
36
|
-
} catch {
|
|
37
|
-
// react-redux not available
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
31
|
|
|
42
32
|
// ============================================
|
|
43
33
|
// Hook Types
|
|
@@ -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;
|
|
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;AAqKD,eAAO,MAAM,eAAe,4DAqF1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reduxPeer.d.ts","sourceRoot":"","sources":["../../../../src/redux/hooks/reduxPeer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,wBAAgB,qBAAqB,IAAI,CAAC,MAAM,KAAK,CAAC,GAAG,IAAI,CAU5D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reduxPeer.web.d.ts","sourceRoot":"","sources":["../../../../src/redux/hooks/reduxPeer.web.ts"],"names":[],"mappings":"AACA,wBAAgB,qBAAqB,oGAAuB"}
|
|
@@ -1,20 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* React hook for auto-instrumenting Redux stores
|
|
3
|
-
*
|
|
4
|
-
* Mounted for the app's lifetime by FloatingDevTools (via ReduxAutoInstrument)
|
|
5
|
-
* and also called by the Redux modal. Binds Buoy to the store from react-redux
|
|
6
|
-
* context:
|
|
7
|
-
* - If the store was created through the devtools-hook enhancer, capture is
|
|
8
|
-
* already live — this just keeps the registry pointed at it.
|
|
9
|
-
* - Otherwise it applies the dispatch-patch fallback (top-level-only capture).
|
|
10
|
-
* - If react-redux is missing or there's no Provider above, it fails
|
|
11
|
-
* gracefully and records WHY (surfaced by the sync adapter / MCP).
|
|
12
|
-
*
|
|
13
|
-
* Re-instruments when the store INSTANCE changes (hosts that rebuild their
|
|
14
|
-
* store at runtime), so the registry never pins a dead store.
|
|
15
|
-
*/
|
|
16
1
|
import type { Store } from "@reduxjs/toolkit";
|
|
17
2
|
import { type AutoInstrumentOptions, type CaptureMechanism } from "../utils/autoInstrument";
|
|
3
|
+
/**
|
|
4
|
+
* Safely attempt to load react-redux and get useStore hook
|
|
5
|
+
*/
|
|
18
6
|
export interface UseAutoInstrumentReduxOptions extends AutoInstrumentOptions {
|
|
19
7
|
/** Whether to auto-start instrumentation (default: true) */
|
|
20
8
|
autoStart?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAutoInstrumentRedux.d.ts","sourceRoot":"","sources":["../../../../src/redux/hooks/useAutoInstrumentRedux.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useAutoInstrumentRedux.d.ts","sourceRoot":"","sources":["../../../../src/redux/hooks/useAutoInstrumentRedux.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAIL,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACtB,MAAM,yBAAyB,CAAC;AAOjC;;GAEG;AAOH,MAAM,WAAW,6BAA8B,SAAQ,qBAAqB;IAC1E,4DAA4D;IAC5D,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,4BAA4B;IAC3C,kDAAkD;IAClD,cAAc,EAAE,OAAO,CAAC;IACxB,6CAA6C;IAC7C,SAAS,EAAE,OAAO,CAAC;IACnB,8CAA8C;IAC9C,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,uCAAuC;IACvC,qBAAqB,EAAE,OAAO,CAAC;IAC/B;;;OAGG;IACH,gBAAgB,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC1C,qCAAqC;IACrC,oBAAoB,EAAE,MAAM,IAAI,CAAC;IACjC,oCAAoC;IACpC,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,0CAA0C;IAC1C,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB;AAMD,wBAAgB,sBAAsB,CACpC,OAAO,GAAE,6BAAkC,GAC1C,4BAA4B,CAkH9B;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI;IACtC,WAAW,EAAE,OAAO,CAAC;IACrB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB,CA0BA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var jt=Object.defineProperty;var No=Object.getOwnPropertyDescriptor;var Lo=Object.getOwnPropertyNames;var Fo=Object.prototype.hasOwnProperty;var $o=(t,e)=>{for(var o in e)jt(t,o,{get:e[o],enumerable:!0})},Ht=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Lo(e))!Fo.call(t,r)&&r!==o&&jt(t,r,{get:()=>e[r],enumerable:!(n=No(e,r))||n.enumerable});return t},_=(t,e,o)=>(Ht(t,e,"default"),o&&Ht(o,e,"default"));var E=process.env.NODE_ENV!=="production";typeof window<"u"&&typeof globalThis.global>"u"&&(globalThis.global=globalThis);import{classifyPreviewItem as Zo,createRestoreScope as en,registerStateSnapshotProvider as tn,skippedRestore as mt,unionKeys as on,wontApply as nn}from"@buoy-gg/shared-ui/web";var Ve=Symbol.for("@@buoy/enhancerInstrumented"),Ce=null,Te=null,lt=null,Ut=!1;function te(t,e){Ce=t,Te=e,lt=null}function qt(t){Ce===t&&(Ce=null,Te=null)}function oe(){return Ce}function Ne(){Ut=!0}function Re(){return Ut&&Ce!==null}function Yt(t){lt=t}function Z(){return{mechanism:Te,capture:Te==="enhancer"||Te==="middleware"?"full":Te==="patch"?"top-level-only":"none",hasStore:Ce!==null,timeTravel:Re(),diagnostic:lt}}import{ChangeLog as zo,approxJsonSize as Ho}from"@buoy-gg/shared-ui/web";var Fe=25,ct=Object.freeze({__buoyStateEvicted:!0,note:`Raw state retained for the ${Fe} most recent actions only.`}),ut=Object.freeze({__buoyStateOnDevice:!0,note:"State trees stay on the device \u2014 fetched on demand via getActionDetail."}),Kt=Object.freeze({__buoyPayloadOnDevice:!0,note:"Payload stays on the device \u2014 fetched on demand via getActionDetail."});function Le(t){return typeof t=="object"&&t!==null&&t.__buoyPayloadOnDevice===!0}function J(t){if(typeof t!="object"||t===null)return!1;let e=t;return e.__buoyStateEvicted===!0||e.__buoyStateOnDevice===!0}function jo(t){return t.startsWith("@@")?"internal":t.includes("/pending")?"pending":t.includes("/fulfilled")?"fulfilled":t.includes("/rejected")?"rejected":t.includes("/executeQuery")?"query":t.includes("/executeMutation")?"mutation":"action"}function Uo(t){if(t.startsWith("@@")){let o=t.split("/");return{sliceName:null,actionName:o[o.length-1]||t}}let e=t.split("/");if(e.length>=2){let o=e[0],n=e[1];return e.length>=3&&["pending","fulfilled","rejected"].includes(e[e.length-1])&&(n=e.slice(1,-1).join("/")),{sliceName:o,actionName:n.toUpperCase()}}return{sliceName:null,actionName:t.toUpperCase()}}function Jt(t,e){return Ho(t,e).bytes>e}function qo(t,e=40){if(t===void 0)return"";if(t===null)return"null";try{if(typeof t=="string")return t.length>e?`"${t.slice(0,e-3)}..."`:`"${t}"`;if(typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t)){if(t.length===0)return"[]";if(Jt(t,e))return`[${t.length} items]`;let o=JSON.stringify(t);return o.length>e?`[${t.length} items]`:o}if(typeof t=="object"){let o=Object.keys(t);if(o.length===0)return"{}";if(Jt(t,e))return`{ ${o.length} keys }`;let n=JSON.stringify(t);return n.length<=e?n:`{ ${o.length} keys }`}return String(t).slice(0,e)}catch{return"[complex]"}}function Yo(t,e){if(t===e)return{summary:"no change",changedCount:0};if(typeof t!="object"||typeof e!="object"||t===null||e===null)return{summary:"changed",changedCount:1};let o=Object.keys(t),n=Object.keys(e),r=n.filter(p=>!o.includes(p)).length,i=o.filter(p=>!n.includes(p)).length,a=0;for(let p of o)n.includes(p)&&t[p]!==e[p]&&a++;let l=[];r>0&&l.push(`+${r}`),i>0&&l.push(`-${i}`),a>0&&l.push(`~${a}`);let d=r+i+a;return l.length===0?{summary:"nested change",changedCount:1}:{summary:`${l.join(" ")} ${d===1?"key":"keys"}`,changedCount:d}}function Jo(t){let e=t.meta;if(e)return{requestId:e.requestId,requestStatus:e.requestStatus,arg:e.arg,rejectedWithValue:e.rejectedWithValue,aborted:e.aborted,condition:e.condition}}var dt=class extends zo{addAction(e,o,n,r){if(!this.canRecord())return;let i=e.type||"";if(!i)return;let a=o!==n,l=jo(i),{sliceName:d,actionName:p}=Uo(i),m=Jo(e),S=qo(e.payload),{summary:C,changedCount:N}=Yo(o,n),F=(r??0)>16,$={id:this.nextId(),type:i,payload:e.payload,action:e,timestamp:Date.now(),prevState:o,nextState:n,duration:r,hasStateChange:a,category:l,sliceName:d,actionName:p,meta:m,error:e.error,payloadPreview:S,diffSummary:C,changedKeysCount:N,isSlowAction:F};this.push($);for(let L=Fe;L<this.items.length;L++){let P=this.items[L];if(P.prevState!==ct)P.prevState=ct,P.nextState=ct;else break}this.notifyListeners()}getActions(){return this.getAll()}getActionById(e){return this.getById(e)}clearActions(){this.clear()}replaceActions(e){if(!this.getEnabled())return;let o=new Map;for(let r of this.items)r.prevState!==void 0&&!J(r.prevState)&&o.set(r.id,r);let n=e.slice(0,this.max).map(r=>{let i=o.get(r.id);return!i||!J(r.prevState)?r:{...r,prevState:i.prevState,nextState:i.nextState,payload:Le(r.payload)?i.payload:r.payload,action:Le(r.action)?i.action:r.action,meta:Le(r.meta?.arg)?i.meta:r.meta,error:Le(r.error)?i.error:r.error}});this.setItems(n)}hydrateAction(e,o){this.hydrateById(e,o)}setMaxActions(e){this.setMax(e)}getStats(){let e=this.items.length,o=this.items.filter(a=>a.hasStateChange).length,n=new Set(this.items.map(a=>a.type)),r=this.items.filter(a=>a.duration!==void 0).map(a=>a.duration),i=r.length>0?r.reduce((a,l)=>a+l,0)/r.length:0;return{totalActions:e,actionsWithChanges:o,actionsWithoutChanges:e-o,uniqueActionTypes:n.size,averageDuration:Math.round(i*100)/100}}filterActions(e){let o=[...this.items];if(e.searchText){let n=e.searchText.toLowerCase();o=o.filter(r=>r.type.toLowerCase().includes(n))}return e.actionTypes&&e.actionTypes.length>0&&(o=o.filter(n=>e.actionTypes.includes(n.type))),e.onlyWithChanges&&(o=o.filter(n=>n.hasStateChange)),o}getUniqueActionTypes(){return Array.from(new Set(this.items.map(e=>e.type))).sort()}getRelatedActions(e){return this.items.filter(o=>o.meta?.requestId===e).sort((o,n)=>o.timestamp-n.timestamp)}getLinkedActions(e){return e.meta?.requestId?this.getRelatedActions(e.meta.requestId):[]}getLinkedActionsCount(e){return e.meta?.requestId?this.items.filter(o=>o.meta?.requestId===e.meta?.requestId).length:0}getAsyncOperationDuration(e){let o=this.getRelatedActions(e);if(o.length<2)return null;let n=o.find(i=>i.category==="pending"),r=o.find(i=>i.category==="fulfilled"||i.category==="rejected");return n&&r?r.timestamp-n.timestamp:null}getBaseActionType(e){let o=e.split("/");if(o.length>=2){let n=o[o.length-1];if(["pending","fulfilled","rejected"].includes(n))return o.slice(0,-1).join("/")}return e}getAsyncOperationIndex(e){let o=new Map;for(let i of this.items)i.meta?.requestId&&!o.has(i.meta.requestId)&&o.set(i.meta.requestId,i.timestamp);let r=Array.from(o.entries()).sort((i,a)=>i[1]-a[1]).map(([i])=>i).indexOf(e);return r>=0?r+1:0}},y=new dt;var pt=!1;function $e(){return pt}var he="@@buoy/JUMP_TO_STATE",Ko="@@buoy/REPLAY_ACTION";function ft(t){if(J(t)){console.warn("[BuoyRedux] Cannot jump - this action's state was evicted (raw state is retained for recent actions only)");return}let e=oe();if(!e){console.warn("[BuoyRedux] Cannot jump to state - no store instrumented");return}if(!Re()){console.warn("[BuoyRedux] Cannot jump to state - the root reducer cannot serve a state jump. Capture and time travel are wired separately: either put `import '@buoy-gg/redux';` first in your app entry (so Buoy is the store enhancer), or wrap your root reducer with withBuoyDevTools().");return}e.dispatch({type:he,payload:t})}function gt(t){let e=oe();e?e.dispatch(t):console.warn("[BuoyRedux] Cannot replay action - no store instrumented")}function Xo(t){return Ne(),(e,o)=>o.type===he?o.payload:t(e,o)}var Go=t=>(pt=!0,te(t,"middleware"),e=>o=>{let n=o;if(n.type?.startsWith("@@buoy/"))return e(o);let i=performance.now(),a=t.getState(),l=e(o),d=t.getState(),p=performance.now()-i;return y.addAction(n,a,d,p),l});function Qo(t={}){let{maxActions:e=200,ignoreActions:o=[]}=t;return y.setMaxActions(e),n=>(pt=!0,te(n,"middleware"),r=>i=>{let a=i,l=a.type||"";if(l?.startsWith("@@buoy/")||o.includes(l))return r(i);let d=performance.now(),p=n.getState(),m=r(i),S=n.getState(),C=performance.now()-d;return y.addAction(a,p,S,C),m})}var ze="enable restore by using the Buoy enhancer or wrapping your root reducer in withBuoyDevTools()";function rn(){let{mechanism:t,hasStore:e,diagnostic:o}=Z();return e?t==="patch"?{canCapture:!0,canRestore:!1,detail:`Auto-instrumented store cannot be restored \u2014 ${ze}`}:{canCapture:!0,canRestore:!0,detail:t==="middleware"?"Restore requires withBuoyDevTools(rootReducer) \u2014 verified at restore time":void 0}:{canCapture:!1,canRestore:!1,detail:o==="no-react-redux"?"react-redux not installed":o==="no-provider"?"No Redux <Provider> found":"No Redux store instrumented"}}async function an(){let t=oe();return t?{data:{state:t.getState()},warnings:[]}:{data:null,warnings:["no Redux store instrumented"]}}async function sn(t,e){let o=t,n=oe();if(!n||o===void 0||o===null)return mt("redux",n?"empty redux snapshot":"no Redux store instrumented");let{mechanism:r}=Z();if(r==="patch")return mt("redux",`restore unavailable on auto-instrumented stores \u2014 ${ze}`);let i=en(e),a=Object.keys(o.state??{}).filter(d=>!i.touch(d)),l=o.state;if(a.length>0){let d=n.getState(),p={...o.state};for(let m of a)p[m]=d?.[m];l=p}if(n.dispatch({type:he,payload:l}),n.getState()===l){let d=a.length>0?[`${a.length} slice(s) excluded by you`]:[];return{ok:!0,applied:1,skipped:[],warnings:d}}return mt("redux",`store ignored the state jump \u2014 ${ze}`)}async function ln(t,e){let o=t?.state,n=e===void 0,r=oe(),i=n?r?.getState():e?.state,a=[],l=[],d;if(n){let{mechanism:S,hasStore:C}=Z();C?S==="patch"&&(d=`auto-instrumented store cannot be restored \u2014 ${ze}`):d="no Redux store instrumented"}let p=i??{},m=o??{};for(let S of on(p,m)){let C=Zo({key:S,label:S,oldValue:p[S],newValue:m[S],inOld:Object.prototype.hasOwnProperty.call(p,S),inNew:Object.prototype.hasOwnProperty.call(m,S)},{tooLargeReason:"slice too large to render a diff \u2014 restore still applies it"});d&&(C=nn(C,d)),a.push(C)}return d&&l.push(`Redux restore unavailable: ${d}`),{items:a,notes:l}}tn({id:"redux",label:"Redux",status:rn,capture:an,restore:sn,previewItems:ln});function yt(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,o)=>(...n)=>e(o(...n)))}function Xt(t){return Ne(),(e,o)=>o&&o.type===he?o.payload:t(e,o)}function cn(t){if(typeof t!="object"||t===null)return!1;let e=t.type;return typeof e!="string"?!1:!e.startsWith("@@buoy/")&&!e.startsWith("@@redux/")}var He=t=>(e,o)=>{let n=t(Xt(e),o),i={...n,dispatch:a=>{if(!cn(a)||$e())return n.dispatch(a);let l=performance.now(),d=n.getState(),p=n.dispatch(a);return y.addAction(a,d,n.getState(),performance.now()-l),p},replaceReducer:a=>n.replaceReducer(Xt(a)),[Ve]:!0};return te(i,"enhancer"),i};function dn(...t){return t.length===0?yt(He):t.length===1&&typeof t[0]=="object"&&t[0]!==null?(...e)=>yt(...e,He):yt(...t,He)}var ht=!1;function Gt(){if(!(typeof E<"u"&&E))return!1;let e=globalThis;return e.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||(e.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__=dn,ht=!0),ht}function un(){return ht}Gt();import{useState as tt,useMemo as We,useRef as ot,useCallback as pe,useEffect as xo}from"react";var V={};$o(V,{AccessibilityInfo:()=>vn,ActivityIndicator:()=>Sn,Alert:()=>Tn,Animated:()=>In,AppRegistry:()=>Vn,AppState:()=>kn,Appearance:()=>Dn,BackHandler:()=>En,Button:()=>wn,CheckBox:()=>Yn,Clipboard:()=>Bn,DeviceEventEmitter:()=>lr,Dimensions:()=>On,Easing:()=>Mn,FlatList:()=>xt,I18nManager:()=>Pn,Image:()=>Jn,ImageBackground:()=>Kn,InteractionManager:()=>_n,Keyboard:()=>Wn,KeyboardAvoidingView:()=>Xn,LayoutAnimation:()=>Nn,Linking:()=>Ln,LogBox:()=>sr,Modal:()=>xn,NativeEventEmitter:()=>Fn,NativeModules:()=>Rn,PanResponder:()=>$n,Picker:()=>Gn,PixelRatio:()=>zn,Platform:()=>Hn,Pressable:()=>hn,ProgressBar:()=>Qn,RefreshControl:()=>Zn,SafeAreaView:()=>er,ScrollView:()=>xe,SectionList:()=>tr,Share:()=>jn,StatusBar:()=>or,StyleSheet:()=>q,Switch:()=>bn,Text:()=>g,TextInput:()=>gn,Touchable:()=>nr,TouchableHighlight:()=>mn,TouchableNativeFeedback:()=>rr,TouchableOpacity:()=>X,TouchableWithoutFeedback:()=>yn,UIManager:()=>Un,Vibration:()=>qn,View:()=>s,VirtualizedList:()=>ir,YellowBox:()=>ar,findNodeHandle:()=>An,unstable_createElement:()=>Cn,useColorScheme:()=>cr,useLocaleContext:()=>dr,useWindowDimensions:()=>ur});_(V,Ra);import*as Ra from"react-native-web";import{unstable_createElement as Cn,NativeModules as Rn,AccessibilityInfo as vn,Animated as In,Appearance as Dn,AppRegistry as Vn,AppState as kn,BackHandler as En,Clipboard as Bn,Dimensions as On,Easing as Mn,I18nManager as Pn,Keyboard as Wn,InteractionManager as _n,LayoutAnimation as Nn,Linking as Ln,NativeEventEmitter as Fn,PanResponder as $n,PixelRatio as zn,Platform as Hn,Share as jn,StyleSheet as q,UIManager as Un,Vibration as qn,CheckBox as Yn,FlatList as xt,Image as Jn,ImageBackground as Kn,KeyboardAvoidingView as Xn,Picker as Gn,ProgressBar as Qn,RefreshControl as Zn,SafeAreaView as er,SectionList as tr,StatusBar as or,Touchable as nr,TouchableNativeFeedback as rr,VirtualizedList as ir,YellowBox as ar,LogBox as sr,DeviceEventEmitter as lr,useColorScheme as cr,useLocaleContext as dr,useWindowDimensions as ur}from"react-native-web";import*as B from"react-native-web";import{createElement as pn,forwardRef as fn}from"react";function K(t){let e=fn((n,r)=>{let{accessibilityState:i,accessibilityValue:a,...l}=n;for(let d of["busy","checked","disabled","expanded","selected"])i?.[d]!==void 0&&l[`aria-${d}`]===void 0&&(l[`aria-${d}`]=i[d]);for(let[d,p]of Object.entries({min:"valuemin",max:"valuemax",now:"valuenow",text:"valuetext"}))a?.[d]!==void 0&&l[`aria-${p}`]===void 0&&(l[`aria-${p}`]=a[d]);return pn(t,{...l,ref:r})}),o=t.State;return o&&Object.assign(e,{State:o}),e.displayName=t.displayName??t.name??"NativeWebView",e}var s=K(B.View),g=K(B.Text),gn=K(B.TextInput),X=K(B.TouchableOpacity),mn=K(B.TouchableHighlight),yn=K(B.TouchableWithoutFeedback),hn=K(B.Pressable),xe=K(B.ScrollView),xn=K(B.Modal),bn=K(B.Switch),Sn=K(B.ActivityIndicator),wn=K(B.Button),An=B.findNodeHandle,Tn={alert(t,e,o,n){if(typeof document>"u")return;let r=document.createElement("dialog");r.dataset.buoyRoot="",r.setAttribute("aria-label",t),r.style.cssText="position:fixed;inset:0;margin:auto;width:min(440px,90vw);padding:24px;border:1px solid #475569;border-radius:14px;background:#17212e;color:#f1f5f9;font:14px system-ui;box-shadow:0 20px 80px #0008;z-index:2147483647";let i=document.createElement("h2");if(i.textContent=t,i.style.cssText="font-size:18px;margin:0 0 12px",r.appendChild(i),e){let p=document.createElement("p");p.textContent=e,p.style.cssText="line-height:1.5;white-space:pre-wrap;margin:0 0 20px",r.appendChild(p)}let a=document.createElement("div");a.style.cssText="display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px";let l=o?.length?o:[{text:"OK"}],d=()=>{r.close?.(),r.remove()};for(let p of l){let m=document.createElement("button");m.type="button",m.textContent=p.text??"OK",m.style.cssText=`padding:9px 14px;border:1px solid #64748b;border-radius:7px;color:white;background:${p.style==="destructive"?"#a52b38":"#283a4d"};cursor:pointer;font:inherit`,m.onclick=()=>{d(),p.onPress?.()},a.appendChild(m)}r.addEventListener("cancel",p=>{p.preventDefault(),n?.cancelable!==!1&&(d(),n?.onDismiss?.())}),r.appendChild(a),document.body.appendChild(r),r.showModal?r.showModal():r.setAttribute("open","")}};import{JsModal as ui,ModalHeader as fe,macOSColors as ie,night as A,Search as pi,Trash2 as fi,Power as gi,Zap as mi,CheckCircle as yi,Copy as hi,Lock as xi,AlertTriangle as bo,devToolsStorageKeys as bi,copyToClipboard as Si,ProUpgradeModal as wi,PowerToggleButton as Ai,TickProvider as So,useLimit as Ti,TIER_LIMITS as Ci,windowDragProps as Ri,ToolEmptyState as vi,resolveListEmptyState as Ii,EVENT_LIST_PRESET as Di,monoFont as Vi}from"@buoy-gg/shared-ui/web";import{useIsPro as ki}from"@buoy-gg/license/web";import{useState as pr,useMemo as Qt,useCallback as Zt}from"react";import{useChangeLog as fr}from"@buoy-gg/shared-ui/web";var gr=(t,e)=>y.filterActions(e);function bt(){let t=fr(y,{filterItems:gr}),[e,o]=pr(null),n=Qt(()=>y.getStats(),[t.items]),r=Qt(()=>y.getUniqueActionTypes(),[t.items]),i=Zt(()=>{y.clearActions(),o(null)},[]),a=Zt(l=>y.getActionById(l),[]);return{actions:t.items,filteredActions:t.filteredItems,filter:t.filter,setFilter:t.setFilter,stats:n,clearActions:i,isEnabled:t.isEnabled,toggleCapture:t.toggleCapture,actionTypes:r,getActionById:a,selectedAction:e,setSelectedAction:o}}import{useStore as mr}from"react-redux";function St(){return mr}import{useEffect as br,useState as Ye,useRef as eo,useCallback as to}from"react";var ke=Symbol.for("@@buoy/instrumented"),wt=Symbol.for("@@buoy/originalDispatch");function yr(t){let e=t;return e[ke]===!0||e[Ve]===!0}function je(t,e={}){let o=t;if(o[Ve])return te(t,"enhancer"),()=>{};if($e())return te(t,"middleware"),()=>{};if(o[ke])return te(t,"patch"),()=>{};let{maxActions:n=200,ignoreActions:r=[]}=e;y.setMaxActions(n);let i=t.dispatch.bind(t);o[wt]=i;let a=(l=>{if(typeof l!="object"||l===null||typeof l.type!="string")return i(l);let d=l.type;if(d.startsWith("@@buoy/")||d.startsWith("@@redux/")||r.includes(d))return i(l);let p=performance.now(),m=t.getState(),S=i(l),C=t.getState(),N=performance.now()-p;return y.addAction(l,m,C,N),S});return t.dispatch=a,o[ke]=!0,te(t,"patch"),()=>{Ue(t)}}function Ue(t){let e=t;if(e[ke]){let o=e[wt];o&&(t.dispatch=o),delete e[ke],delete e[wt]}qt(t)}function hr(t,e={}){return je(t,e)}function qe(){return oe()}function xr(){return oe()!==null}function Ee(t={}){let{autoStart:e=!0}=t,o=eo(t);o.current=t;let[n,r]=Ye(!1),[i,a]=Ye(!0),[l,d]=Ye(null),[p,m]=Ye(null),S=eo(null),C=St(),N=C!==null,F=null,$=null,L=null;if(C)try{F=C()}catch(z){L="no-provider",$=z instanceof Error?z.message:"Failed to access Redux store. Make sure your app is wrapped in a Redux Provider."}else L="no-react-redux",$="react-redux is not installed or not available";let P=to(()=>{if(!F){Yt(L),d($||"No Redux store available"),a(!1);return}try{let z=je(F,o.current);S.current=z,r(!0),m(F),d(null)}catch(z){d(z instanceof Error?z.message:"Failed to instrument Redux store"),r(!1)}finally{a(!1)}},[F]),R=to(()=>{S.current&&(S.current(),S.current=null),p&&Ue(p),r(!1),m(null)},[p]);return br(()=>(e?P():a(!1),()=>{}),[e,P]),{isInstrumented:n,isLoading:i,error:l,isReactReduxAvailable:N,captureMechanism:Z().mechanism,startInstrumentation:P,stopInstrumentation:R,store:p}}function Sr(){let t=St();if(!t)return{isAvailable:!1,error:"react-redux is not installed"};try{let e=t();return{isAvailable:e!=null,error:null}}catch(e){return{isAvailable:!1,error:e instanceof Error?e.message:"Not inside a Redux Provider"}}}import{memo as wr}from"react";import{ChangeRow as Be,buoyColors as ce,AlertCircle as Ar,monoFont as Tr}from"@buoy-gg/shared-ui/web";import{jsx as le,jsxs as no}from"react/jsx-runtime";var oo=[{bg:"rgba(99, 102, 241, 0.25)",text:"#818CF8"},{bg:"rgba(236, 72, 153, 0.25)",text:"#F472B6"},{bg:"rgba(14, 165, 233, 0.25)",text:"#38BDF8"},{bg:"rgba(245, 158, 11, 0.25)",text:"#FBBF24"},{bg:"rgba(16, 185, 129, 0.25)",text:"#34D399"},{bg:"rgba(168, 85, 247, 0.25)",text:"#C084FC"},{bg:"rgba(239, 68, 68, 0.25)",text:"#F87171"},{bg:"rgba(20, 184, 166, 0.25)",text:"#2DD4BF"}];function Cr(t){return t<=0?{bg:"rgba(142, 142, 147, 0.2)",text:ce.textSecondary}:oo[(t-1)%oo.length]}var At={cart:"#10B981",user:"#3B82F6",auth:"#8B5CF6",app:"#6366F1",ui:"#EC4899",settings:"#F59E0B",api:"#14B8A6",data:"#06B6D4"};function Rr(t){if(!t)return"#6B7280";let e=t.toLowerCase();if(At[e])return At[e];for(let[r,i]of Object.entries(At))if(e.includes(r))return i;return`hsl(${t.split("").reduce((r,i)=>r+i.charCodeAt(0),0)*137%360}, 70%, 60%)`}function vr(t,e){switch(t){case"pending":return"Pending";case"fulfilled":return"Success";case"rejected":return"Error";case"internal":return"Internal";case"query":return"Query";case"mutation":return"Mutation";default:return e?e.charAt(0).toUpperCase()+e.slice(1):"Action"}}function Ir(t,e,o){switch(t){case"pending":return ce.warning;case"fulfilled":return ce.success;case"rejected":return ce.error;case"internal":return ce.textMuted;case"query":return ce.info;case"mutation":return ce.info;default:return Rr(o)}}function Dr(t){let e=[];return t.duration!==void 0&&t.duration>=.1&&e.push(`${t.duration.toFixed(1)}ms`),t.hasStateChange?t.changedKeysCount&&t.changedKeysCount>0?e.push(`${t.changedKeysCount} key${t.changedKeysCount>1?"s":""} changed`):e.push(t.diffSummary||"state changed"):e.push("no state change"),e.join(" \xB7 ")}function Vr(t){return t.actionName?.toUpperCase()||t.type.split("/").pop()?.toUpperCase()||""}function kr(t){if(t.category==="internal")return t.type;let e=t.type.split("/");return e.length>=3&&["pending","fulfilled","rejected"].includes(e[e.length-1])?e.slice(0,-1).join("/"):t.type}var Tt=wr(function({action:e,onPress:o,linkedCount:n,testID:r}){let i=e.sliceName??void 0,a=Ir(e.category,e.hasStateChange,i),l=vr(e.category,i),d=Dr(e),p=kr(e),m=Vr(e),S=(n??0)>1,C=S?y.getLinkedActions(e):[],N=S?C.findIndex(R=>R.id===e.id)+1:0,F=S&&e.meta?.requestId?y.getAsyncOperationIndex(e.meta.requestId):0,$=Cr(F),L=S?le(s,{style:[Je.asyncSequenceBadge,{backgroundColor:$.bg}],children:no(g,{style:[Je.asyncSequenceText,{color:$.text}],testID:r?`${r}-seq`:void 0,children:[N,"/",n," #",F]})}):void 0,P={statusColor:a,statusLabel:l,sublabel:d,primaryText:p,timestamp:e.timestamp,onPress:()=>o(e),testID:r,accessibilityLabel:`${p}, ${l}, ${d}`};return e.isSlowAction?le(Be,{...P,badgePrefix:L,slow:!0}):e.category==="rejected"?le(Be,{...P,customBadge:no(s,{style:Je.badgeContainer,children:[L,le(s,{style:Je.errorBadge,testID:r?`${r}-error`:void 0,children:le(Ar,{size:12,color:ce.error})})]})}):S?le(Be,{...P,badgePrefix:L,changed:e.hasStateChange}):e.hasStateChange?le(Be,{...P,badgeText:m,changed:!0}):le(Be,{...P,plainBadgeText:m})}),Je=q.create({badgeContainer:{flexDirection:"row",alignItems:"center",gap:4},errorBadge:{paddingHorizontal:4},asyncSequenceBadge:{paddingHorizontal:6,paddingVertical:2,borderRadius:4},asyncSequenceText:{fontSize:10,fontWeight:"600",fontFamily:Tr}});import{useState as fo,useCallback as Qe,useMemo as go}from"react";import{macOSColors as Me,night as re,EventStepperFooter as ho,formatRelativeTime as et,parseValue as Ze,monoFont as Pe}from"@buoy-gg/shared-ui/web";import{DataViewer as ni,SplitDiffViewer as ri,TreeDiffViewer as ii,diffThemes as ai}from"@buoy-gg/shared-ui/web/dataViewer";import{memo as Er}from"react";import{DetailViewToggle as Br,FileText as Or,Database as Mr,GitBranch as Pr}from"@buoy-gg/shared-ui/web";import{jsx as Nr}from"react/jsx-runtime";var Wr=[{key:"action",label:"ACTION",description:"View action details",icon:Or},{key:"state",label:"STATE",description:"View current state",icon:Mr},{key:"diff",label:"DIFF",description:"Compare changes",icon:Pr}],_r=["diff"],ro=Er(function({activeView:e,onViewChange:o,diffDisabled:n=!1}){return Nr(Br,{views:Wr,activeView:e,onViewChange:o,disabledKeys:n?_r:void 0,testIDPrefix:"buoy-redux"})});import{memo as zr,useMemo as Hr,useCallback as Ke,useState as jr,useEffect as Ur}from"react";import{buoyColors as D,night as x,Clock as qr,AlertTriangle as Yr,Zap as Jr,Hash as lo,Info as Kr,Box as Xr,AlertCircle as Gr,FileText as Qr,parseValue as Xe,ProUpgradeModal as Zr,copyToClipboard as co,InfoRow as de,monoFont as ue}from"@buoy-gg/shared-ui/web";import{useIsPro as ei}from"@buoy-gg/license/web";import{DataViewer as Ge}from"@buoy-gg/shared-ui/web/dataViewer";import{night as I,monoFont as Lr}from"@buoy-gg/shared-ui/web";import{jsx as io,jsxs as $r}from"react/jsx-runtime";var Fr={replay:{color:I.color.accent,backgroundColor:I.color.accent+"15",borderColor:I.color.accent+"40",textColor:I.color.accent},copy:{color:I.color.accent,backgroundColor:I.color.accent+"15",borderColor:I.color.accent+"40",textColor:I.color.accent},jump:{color:I.color.warning,backgroundColor:I.color.warning+"15",borderColor:I.color.warning+"40",textColor:I.color.warning},skip:{color:I.color.textSecondary,backgroundColor:I.color.textSecondary+"26",borderColor:I.color.textSecondary+"59",textColor:I.color.textSecondary},clear:{color:I.color.danger,backgroundColor:I.color.danger+"15",borderColor:I.color.danger+"40",textColor:I.color.danger},diff:{color:I.color.info,backgroundColor:I.color.info+"15",borderColor:I.color.info+"40",textColor:I.color.info}};function Oe({onPress:t,text:e,type:o,disabled:n=!1,testID:r}){let i=Fr[o];return $r(X,{testID:r,disabled:n,onPress:t,style:[Ct.button,{backgroundColor:n?I.color.textTertiary+"1A":i.backgroundColor,borderColor:n?I.color.textTertiary+"33":i.borderColor,opacity:n?.5:1}],activeOpacity:.7,accessibilityRole:"button",accessibilityLabel:e,accessibilityState:{disabled:n},children:[io(s,{style:[Ct.dot,{backgroundColor:n?I.color.textTertiary:i.color}]}),io(g,{style:[Ct.text,{color:n?I.color.textTertiary:i.textColor}],children:e})]})}var Ct=q.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:I.color.text,shadowOffset:{width:0,height:0},shadowOpacity:.6,shadowRadius:2},text:{fontSize:10,fontWeight:"600",letterSpacing:.5,textTransform:"uppercase",fontFamily:Lr,height:12}});var f="buoy-redux";function ao(t){return String(t??"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"unknown"}function so(t,e){return`${f}-row-${ao(t)}-${e}`}function Rt(t){let e=new Map,o=new Map;for(let n of t){let r=(e.get(n.type)??0)+1;e.set(n.type,r),o.set(n.id,so(n.type,r))}return o}import{jsx as u,jsxs as k}from"react/jsx-runtime";function uo(t){switch(t){case"pending":return{label:"PENDING",color:D.warning,bgColor:D.warning+"26"};case"fulfilled":return{label:"FULFILLED",color:D.success,bgColor:D.success+"26"};case"rejected":return{label:"REJECTED",color:D.error,bgColor:D.error+"26"};case"internal":return{label:"INTERNAL",color:D.textMuted,bgColor:D.textMuted+"26"};case"query":return{label:"QUERY",color:D.info,bgColor:D.info+"26"};case"mutation":return{label:"MUTATION",color:D.info,bgColor:D.info+"26"};default:return{label:"ACTION",color:D.info,bgColor:D.info+"26"}}}function ti(t){return t===void 0?"N/A":t<1?"<1ms":`${t.toFixed(1)}ms`}function ve({icon:t,title:e,badge:o,testID:n}){return k(s,{style:c.sectionHeader,testID:n,children:[k(s,{style:c.sectionHeaderLeft,children:[u(t,{size:14,color:x.color.accent}),u(g,{style:c.sectionTitle,children:e})]}),o]})}function oi(t){let e=new Date(t),o=e.getHours().toString().padStart(2,"0"),n=e.getMinutes().toString().padStart(2,"0"),r=e.getSeconds().toString().padStart(2,"0"),i=e.getMilliseconds().toString().padStart(3,"0");return`${o}:${n}:${r}.${i}`}var po=zr(function({action:e,onNavigateToAction:o}){let n=ei(),[r,i]=jr(!1);Ur(()=>{r&&n&&i(!1)},[r,n]);let a=uo(e.category),l=J(e.nextState),d=Re(),p=l||!d,m=e.payload!==void 0,S=e.meta&&Object.keys(e.meta).length>0,C=e.error!==void 0,N=Hr(()=>y.getLinkedActions(e),[e]),F=N.length>1,$=F?y.getBaseActionType(e.type):null,L=e.meta?.requestId?y.getAsyncOperationDuration(e.meta.requestId):null,P=Ke(async()=>{if(!n){i(!0);return}await co(e.action)},[e,n]),R=Ke(async()=>{if(!n){i(!0);return}await co(e.payload)},[e.payload,n]),z=Ke(()=>{e.action&&typeof e.action=="object"&&"type"in e.action&>(e.action)},[e]),ne=Ke(()=>{e.nextState!==void 0&&ft(e.nextState)},[e]);return k(xe,{testID:`${f}-detail-scroll`,style:c.container,contentContainerStyle:c.contentContainer,showsVerticalScrollIndicator:!1,children:[k(s,{style:c.card,testID:`${f}-info-card`,children:[u(ve,{icon:Kr,title:"ACTION INFO"}),k(s,{style:c.cardContent,children:[u(de,{label:"Type",value:e.type,mono:!0,testID:`${f}-info-type`}),e.sliceName&&u(de,{label:"Slice",value:e.sliceName,mono:!0,testID:`${f}-info-slice`}),u(de,{label:"Action",value:e.actionName,mono:!0,testID:`${f}-info-action`}),k(s,{style:c.badgeRow,children:[u(s,{style:[c.categoryBadge,{backgroundColor:a.bgColor}],children:u(g,{style:[c.categoryText,{color:a.color}],testID:`${f}-info-category`,children:a.label})}),k(s,{style:[c.durationBadge,e.isSlowAction&&c.durationBadgeSlow],children:[u(qr,{size:10,color:e.isSlowAction?D.error:x.color.textSecondary}),u(g,{style:[c.durationText,e.isSlowAction&&c.durationTextSlow],testID:`${f}-info-duration`,children:ti(e.duration)}),e.isSlowAction&&u(Yr,{size:10,color:D.error})]}),e.hasStateChange?k(s,{style:c.changesBadge,children:[u(Jr,{size:10,color:D.success}),u(g,{style:c.changesText,testID:`${f}-info-changes`,children:e.diffSummary||"changed"})]}):u(s,{style:c.noChangesBadge,children:u(g,{style:c.noChangesText,testID:`${f}-info-no-changes`,children:"no change"})})]})]})]}),F&&k(s,{style:c.card,testID:`${f}-async-card`,children:[u(ve,{icon:lo,title:"ASYNC FLOW",badge:u(s,{style:c.asyncBadge,children:k(g,{style:c.asyncBadgeText,testID:`${f}-async-count`,children:[N.length," ACTIONS"]})})}),k(s,{style:c.cardContent,children:[u(g,{style:c.baseActionType,testID:`${f}-async-base`,children:$}),L!==null&&k(s,{style:c.totalDurationRow,children:[u(g,{style:c.totalDurationLabel,children:"Total Duration"}),k(g,{style:c.totalDurationValue,testID:`${f}-async-total`,children:[L,"ms"]})]}),u(s,{style:c.timeline,children:N.map((U,ae)=>{let ee=uo(U.category),ye=U.id===e.id;return k(X,{style:[c.timelineItem,ye&&c.timelineItemCurrent],onPress:()=>o?.(U),disabled:ye||!o,activeOpacity:.7,testID:`${f}-async-step-${ae}`,children:[ae<N.length-1&&u(s,{style:c.timelineConnector}),u(s,{style:[c.timelineDot,{backgroundColor:ee.color}]}),k(s,{style:c.timelineContent,children:[k(s,{style:c.timelineHeader,children:[u(s,{style:[c.timelineStatusBadge,{backgroundColor:ee.bgColor}],children:u(g,{style:[c.timelineStatusText,{color:ee.color}],testID:`${f}-async-step-${ae}-status`,children:ee.label})}),ye&&u(s,{style:c.currentBadge,testID:`${f}-async-step-${ae}-current`,children:u(g,{style:c.currentBadgeText,children:"CURRENT"})})]}),u(g,{style:c.timelineTime,children:oi(U.timestamp)})]})]},U.id)})})]})]}),m&&k(s,{style:c.card,testID:`${f}-payload-card`,children:[u(ve,{icon:Xr,title:"PAYLOAD",badge:u(s,{style:c.typeBadge,children:u(g,{style:c.typeText,children:Array.isArray(e.payload)?"ARRAY":typeof e.payload=="object"?"OBJECT":typeof e.payload?.toString().toUpperCase()})})}),u(s,{style:c.dataViewerContainer,children:u(Ge,{title:"",data:Xe(e.payload),showTypeFilter:!0,rawMode:!0,initialExpanded:!0})})]}),S&&k(s,{style:c.card,testID:`${f}-meta-card`,children:[u(ve,{icon:lo,title:"ASYNC METADATA",badge:u(s,{style:[c.categoryBadge,{backgroundColor:a.bgColor}],children:u(g,{style:[c.categoryText,{color:a.color}],children:"RTK THUNK"})})}),k(s,{style:c.cardContent,children:[e.meta?.requestId&&u(de,{label:"Request ID",value:e.meta.requestId,mono:!0}),e.meta?.requestStatus&&u(de,{label:"Status",value:e.meta.requestStatus.toUpperCase(),valueColor:a.color,testID:`${f}-meta-status`}),e.meta?.arg!==void 0&&k(s,{style:c.argSection,children:[u(g,{style:c.argLabel,children:"Original Argument"}),u(s,{style:c.argValueContainer,children:typeof e.meta.arg=="object"?u(Ge,{title:"",data:Xe(e.meta.arg),showTypeFilter:!0,rawMode:!0,initialExpanded:!0}):u(g,{style:c.argValue,children:JSON.stringify(e.meta.arg)})})]}),e.meta?.rejectedWithValue&&u(de,{label:"Rejected With Value",value:"true",valueColor:D.error}),e.meta?.aborted&&u(de,{label:"Aborted",value:"true",valueColor:D.warning}),e.meta?.condition&&u(de,{label:"Condition",value:"true",valueColor:x.color.textTertiary})]})]}),C&&k(s,{style:[c.card,c.errorCard],testID:`${f}-error-card`,children:[u(ve,{icon:Gr,title:"ERROR",badge:u(s,{style:c.errorBadge,children:u(g,{style:c.errorBadgeText,testID:`${f}-error-badge`,children:"REJECTED"})})}),u(s,{style:c.dataViewerContainer,children:typeof e.error=="object"?u(Ge,{title:"",data:Xe(e.error),showTypeFilter:!0,rawMode:!0,initialExpanded:!0}):u(g,{style:c.errorText,children:String(e.error)})})]}),k(s,{style:c.card,testID:`${f}-full-action-card`,children:[u(ve,{icon:Qr,title:"FULL ACTION OBJECT"}),u(s,{style:c.dataViewerContainer,children:u(Ge,{title:"",data:Xe(e.action),showTypeFilter:!0,rawMode:!0,initialExpanded:!0})})]}),u(s,{style:c.actionFooter,children:k(s,{style:c.actionsGrid,children:[k(s,{style:c.actionButtonWrapper,children:[u(Oe,{type:"replay",text:"REPLAY",onPress:z,testID:`${f}-replay`}),u(g,{style:c.actionDescription,children:"Dispatch again"})]}),k(s,{style:c.actionButtonWrapper,children:[u(Oe,{type:"jump",text:"JUMP",onPress:ne,disabled:p,testID:`${f}-jump`}),u(g,{style:c.actionDescription,testID:`${f}-jump-description`,children:l?"State not retained":d?"Restore this state":"Time travel not wired"})]}),k(s,{style:c.actionButtonWrapper,children:[u(Oe,{type:"copy",text:"COPY ACTION",onPress:P,testID:`${f}-copy-action`}),u(g,{style:c.actionDescription,children:n?"Copy to clipboard":"Pro feature"})]}),m&&k(s,{style:c.actionButtonWrapper,children:[u(Oe,{type:"copy",text:"COPY PAYLOAD",onPress:R,testID:`${f}-copy-payload`}),u(g,{style:c.actionDescription,children:n?"Copy payload only":"Pro feature"})]})]})}),u(Zr,{visible:r,onClose:()=>i(!1),featureName:"Copy"})]})}),c=q.create({container:{flex:1},contentContainer:{padding:8,paddingBottom:100,gap:16},card:{backgroundColor:x.color.surface,borderRadius:6,borderWidth:1,borderColor:x.color.accent+"4D",overflow:"hidden",shadowColor:x.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},errorCard:{borderColor:D.error+"4D",shadowColor:D.error},sectionHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:10,borderBottomWidth:1,borderBottomColor:x.color.accent+"33",backgroundColor:x.color.accent+"15"},sectionHeaderLeft:{flexDirection:"row",alignItems:"center",gap:6},sectionTitle:{fontSize:12,fontWeight:"600",letterSpacing:.5,color:x.color.accent,fontFamily:ue},cardContent:{padding:14,gap:10},badgeRow:{flexDirection:"row",flexWrap:"wrap",gap:8,marginTop:6},categoryBadge:{paddingHorizontal:8,paddingVertical:3,borderRadius:4},categoryText:{fontSize:9,fontWeight:"700",letterSpacing:.3},durationBadge:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:8,paddingVertical:3,borderRadius:4,backgroundColor:x.color.surfaceElevated},durationBadgeSlow:{backgroundColor:D.error+"26"},durationText:{fontSize:9,fontWeight:"600",color:x.color.textSecondary,fontFamily:ue},durationTextSlow:{color:D.error},changesBadge:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:8,paddingVertical:3,borderRadius:4,backgroundColor:D.success+"26"},changesText:{fontSize:9,fontWeight:"600",color:D.success},noChangesBadge:{paddingHorizontal:8,paddingVertical:3,borderRadius:4,backgroundColor:x.color.surfaceElevated},noChangesText:{fontSize:9,fontWeight:"600",color:x.color.textTertiary},typeBadge:{paddingHorizontal:6,paddingVertical:2,borderRadius:3,backgroundColor:x.color.surfaceElevated},typeText:{fontSize:8,fontWeight:"600",color:x.color.textTertiary,fontFamily:ue},dataViewerContainer:{backgroundColor:x.color.bg,minHeight:60},argSection:{marginTop:4},argLabel:{fontSize:11,color:x.color.textTertiary,fontWeight:"500",marginBottom:6},argValueContainer:{backgroundColor:x.color.bg,borderRadius:6,borderWidth:1,borderColor:x.color.border,overflow:"hidden"},argValue:{fontSize:11,color:x.color.text,fontFamily:ue,padding:10},errorBadge:{paddingHorizontal:8,paddingVertical:3,borderRadius:4,backgroundColor:D.error+"26"},errorBadgeText:{fontSize:9,fontWeight:"700",color:D.error,letterSpacing:.3},errorText:{fontSize:12,color:D.error,fontFamily:ue,padding:14},asyncBadge:{paddingHorizontal:8,paddingVertical:3,borderRadius:4,backgroundColor:x.color.accent+"26"},asyncBadgeText:{fontSize:9,fontWeight:"700",color:x.color.accent,letterSpacing:.3},baseActionType:{fontSize:12,fontWeight:"600",color:x.color.text,fontFamily:ue,marginBottom:8},totalDurationRow:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:12,paddingBottom:12,borderBottomWidth:1,borderBottomColor:x.color.border},totalDurationLabel:{fontSize:11,color:x.color.textTertiary,fontWeight:"500"},totalDurationValue:{fontSize:14,fontWeight:"700",color:D.success,fontFamily:ue},timeline:{gap:0},timelineItem:{flexDirection:"row",alignItems:"flex-start",paddingVertical:8,paddingHorizontal:8,borderRadius:8,position:"relative"},timelineItemCurrent:{backgroundColor:x.color.accentSoft},timelineConnector:{position:"absolute",left:13,top:24,bottom:-8,width:2,backgroundColor:x.color.border},timelineDot:{width:12,height:12,borderRadius:6,marginRight:10,marginTop:2},timelineContent:{flex:1},timelineHeader:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:2},timelineStatusBadge:{paddingHorizontal:6,paddingVertical:2,borderRadius:4},timelineStatusText:{fontSize:9,fontWeight:"700",letterSpacing:.3},currentBadge:{paddingHorizontal:6,paddingVertical:2,borderRadius:4,backgroundColor:x.color.accent},currentBadgeText:{fontSize:8,fontWeight:"700",color:x.color.onAccent,letterSpacing:.3},timelineTime:{fontSize:10,color:x.color.textTertiary,fontFamily:ue},actionFooter:{backgroundColor:x.color.surface,borderRadius:6,borderWidth:1,borderColor:x.color.accent+"4D",paddingVertical:12,paddingHorizontal:12,shadowColor:x.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},actionsGrid:{flexDirection:"row",flexWrap:"wrap",gap:12,justifyContent:"flex-start"},actionButtonWrapper:{alignItems:"center",gap:4},actionDescription:{fontSize:9,color:x.color.textTertiary,textAlign:"center"}});import{DiffModeTabs as si,CompareBar as li}from"@buoy-gg/shared-ui/web";import{jsx as O,jsxs as be}from"react/jsx-runtime";function vt(t){return t.includes("/pending")?Me.semantic.warning:t.includes("/fulfilled")?Me.semantic.success:t.includes("/rejected")?Me.semantic.error:t.startsWith("@@")?Me.text.muted:Me.semantic.info}function mo(t){if(t.includes("/pending"))return"PENDING";if(t.includes("/fulfilled"))return"FULFILLED";if(t.includes("/rejected"))return"REJECTED";if(t.startsWith("@@"))return"INTERNAL";let e=t.split("/");return e[e.length-1]?.toUpperCase()||"ACTION"}function ci(t){return t===null?"null":t===void 0?"undefined":Array.isArray(t)?"array":typeof t}function yo(t){return new Date(t).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})}var di=[{key:"tree",label:"TREE VIEW"},{key:"split",label:"SPLIT VIEW"}];function It({action:t,actions:e,selectedIndex:o,onIndexChange:n,disableInternalFooter:r=!1,initialView:i="action"}){let[a,l]=fo(i),[d,p]=fo("tree"),m=e.length,S=J(t.nextState),C=vt(t.type),N=mo(t.type),F=ci(Ze(t.nextState)),$=m-o,L=$-1,P=o<m-1?o+1:null,R=P!==null?e[P]:null,z=go(()=>({index:P??0,label:L>0?`#${L}`:"Initial",timestamp:R?yo(R.timestamp):"",relativeTime:R?et(new Date(R.timestamp)):"state",badge:R?O(s,{style:[M.actionBadgeSmall,{backgroundColor:`${vt(R.type)}20`}],children:O(g,{style:[M.actionTextSmall,{color:vt(R.type)}],children:mo(R.type)})}):void 0}),[P,R,L]),ne=go(()=>({index:o,label:`#${$}`,timestamp:yo(t.timestamp),relativeTime:et(new Date(t.timestamp)),badge:O(s,{style:[M.actionBadgeSmall,{backgroundColor:`${C}20`}],children:O(g,{style:[M.actionTextSmall,{color:C}],children:N})})}),[o,t.timestamp,C,N,$]),U=Qe(()=>{if(S)return be(s,{style:M.contentCard,testID:`${f}-state-evicted`,children:[O(s,{style:M.valueHeader,children:O(g,{style:M.valueLabel,children:"STATE AFTER ACTION"})}),O(g,{style:M.evictedText,children:`Not retained. Raw state is kept for the ${Fe} most recent actions, so this action's before/after trees have been released.`})]});let Se=Ze(t.nextState);return be(s,{style:M.contentCard,testID:`${f}-state-card`,children:[be(s,{style:M.valueHeader,children:[O(g,{style:M.valueLabel,children:"STATE AFTER ACTION"}),be(s,{style:M.valueHeaderBadges,children:[O(s,{style:[M.actionBadge,{backgroundColor:`${C}20`}],children:O(g,{style:[M.actionText,{color:C}],children:N})}),O(s,{style:M.typeBadge,children:O(g,{style:M.typeText,testID:`${f}-state-type`,children:F.toUpperCase()})})]})]}),O(s,{style:M.dataViewerContainer,children:O(ni,{title:"",data:Se,showTypeFilter:!0,rawMode:!0,initialExpanded:!0})})]})},[t.nextState,C,N,F,S]),ae=Qe(()=>{let Se=Ze(t.prevState),we=Ze(t.nextState);return d==="split"?O(xe,{style:{flex:1},showsVerticalScrollIndicator:!0,children:O(ri,{oldValue:Se,newValue:we,theme:ai.devToolsDefault,options:{hideLineNumbers:!1,disableWordDiff:!1,showDiffOnly:!1,compareMethod:"words",contextLines:3},showThemeName:!1})}):O(ii,{oldValue:Se,newValue:we})},[t.prevState,t.nextState,d]),ee=Qe(()=>{n(Math.min(m-1,o+1))},[o,m,n]),ye=Qe(()=>{n(Math.max(0,o-1))},[o,n]),H=S||J(t.prevState)||t.prevState===void 0,se=!r&&m>1;return be(s,{style:M.container,children:[O(ro,{activeView:a,onViewChange:l,diffDisabled:H}),be(s,{style:[M.contentArea,se&&M.contentAreaFooterPad],children:[a==="action"&&O(po,{action:t}),a==="state"&&O(s,{style:M.stateContainer,children:U()}),a==="diff"&&be(s,{style:M.diffContainer,testID:`${f}-diff`,children:[O(si,{tabs:di,activeTab:d,onTabChange:p,testIDPrefix:`${f}-diff-tab`}),O(li,{leftEvent:z,rightEvent:ne}),O(s,{style:M.diffContent,testID:`${f}-diff-content`,children:ae()})]})]}),se&&O(ho,{currentIndex:$-1,totalItems:m,onPrevious:ee,onNext:ye,itemLabel:"Action",subtitle:et(new Date(t.timestamp)),absolute:!0})]})}function Dt({action:t,actions:e,selectedIndex:o,onIndexChange:n}){let r=e.length;if(r<=1)return null;let i=r-o;return O(ho,{currentIndex:i-1,totalItems:r,onPrevious:()=>n(Math.min(r-1,o+1)),onNext:()=>n(Math.max(0,o-1)),itemLabel:"Action",subtitle:et(new Date(t.timestamp))})}var M=q.create({container:{flex:1,backgroundColor:"transparent"},contentArea:{flex:1},contentAreaFooterPad:{paddingBottom:96},stateContainer:{flex:1,padding:14},contentCard:{backgroundColor:re.color.surface,borderRadius:14,padding:14,borderWidth:1,borderColor:re.color.border},valueHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:8},valueLabel:{fontSize:10,color:re.color.textSecondary,fontFamily:Pe,letterSpacing:.5,fontWeight:"600"},valueHeaderBadges:{flexDirection:"row",alignItems:"center",gap:6},actionBadge:{paddingHorizontal:8,paddingVertical:2,borderRadius:4},actionText:{fontSize:9,fontWeight:"700",fontFamily:Pe,letterSpacing:.3},typeBadge:{paddingHorizontal:8,paddingVertical:2,borderRadius:4,backgroundColor:re.color.surfaceElevated},typeText:{fontSize:9,fontWeight:"600",color:re.color.textTertiary,fontFamily:Pe},valueBox:{backgroundColor:re.color.bg,borderRadius:6,borderWidth:1,borderColor:re.color.border,padding:8},evictedText:{fontSize:12,color:re.color.textSecondary,lineHeight:18},valueText:{fontSize:12,color:re.color.text,fontFamily:Pe,lineHeight:18},diffContainer:{flex:1},diffContent:{flex:1,paddingHorizontal:14},actionBadgeSmall:{paddingHorizontal:6,paddingVertical:1,borderRadius:3},actionTextSmall:{fontSize:8,fontWeight:"700",fontFamily:Pe},dataViewerContainer:{marginTop:-12,marginHorizontal:-12,marginBottom:-12}});import{Fragment as Mi,jsx as h,jsxs as j}from"react/jsx-runtime";var Ei=Ci["redux.actions"].free;function Bi({isEnabled:t,query:e,totalActions:o}){let n=Ii({subject:"actions",search:e,total:o,capturing:t,waiting:{otto:"waiting",title:"No Redux actions",message:"Actions will appear here as they are dispatched"},paused:{title:"No Redux actions",message:"Enable capture to start recording actions"}});return h(vi,{...n,testID:`${f}-empty`})}function nt({visible:t,onClose:e,onBack:o,onMinimize:n,enableSharedModalDimensions:r=!1,inline:i=!1,onActionSelect:a,initialSelectedActionId:l,initialDetailView:d}){let p=ki(),m=Ti("redux.actions"),[S,C]=tt(!1),{isInstrumented:N,isLoading:F,error:$,isReactReduxAvailable:L,captureMechanism:P}=Ee(),{filteredActions:R,filter:z,setFilter:ne,stats:U,clearActions:ae,isEnabled:ee,toggleCapture:ye}=bt(),H=We(()=>R.slice(0,m),[R,m]),se=We(()=>Math.max(0,R.length-m),[R.length,m]),Se=se>0,[we,_e]=tt(null),Ae=We(()=>{if(we===null)return null;let w=H.findIndex(W=>W.id===we);return w>=0?w:null},[we,H]),Q=Ae!==null?H[Ae]:null,Et=ot(null);xo(()=>{if(!a)return;let w=Q?.id??null;w===null||w===Et.current||(Et.current=w,a(Q))},[Q,a]);let Bt=ot(null);xo(()=>{!l||Bt.current===l||H.findIndex(W=>W.id===l)<0||(Bt.current=l,_e(l))},[l,H]);let[De,Ot]=tt(""),[Mt,at]=tt(!1),ta=ot(null),vo=ot(null),Io=pe(w=>{},[]),Do=w=>{Ot(w),ne(W=>({...W,searchText:w}))},Vo=pe(()=>{Ot(""),ne(w=>({...w,searchText:""})),at(!1)},[ne]),Pt=pe(w=>{_e(w.id)},[]),ko=pe(()=>{C(!0)},[]),Eo=pe(()=>{_e(null)},[]),Wt=pe(w=>{let W=H[w];W&&_e(W.id)},[H]),Bo=async()=>{if(!p){C(!0);return}let w=R.map(W=>({id:W.id,type:W.type,...W.payload!==void 0&&{payload:W.payload},timestamp:W.timestamp,prevState:W.prevState,nextState:W.nextState,hasStateChange:W.hasStateChange}));await Si(w)},Oo=pe(w=>w.id,[]),_t=We(()=>Rt(H),[H]),Nt=We(()=>{let w=new Map;for(let W of y.getActions()){let st=W.meta?.requestId;st&&w.set(st,(w.get(st)??0)+1)}return w},[R]),Mo=pe(({item:w})=>{let W=w.meta?.requestId;return h(Tt,{action:w,onPress:Pt,linkedCount:W?Nt.get(W)??0:0,testID:_t.get(w.id)})},[Pt,_t,Nt]),Lt=()=>Q?j(fe,{children:[h(fe.Navigation,{onBack:Eo}),h(fe.Content,{title:Q.type,centered:!0,testID:`${f}-detail-title`})]}):j(fe,{children:[o&&h(fe.Navigation,{onBack:o}),h(fe.Content,{title:"",children:Mt?h(fe.Search,{value:De,onChangeText:Do,onCancel:Vo,placeholder:"Search action types...",accessibilityLabel:"Search action types",iconSize:14,testID:`${f}-search-field`,containerTestID:`${f}-search`,clearTestID:`${f}-search-clear`,onBlur:()=>{De.length===0&&at(!1)}}):j(s,{style:v.headerChipRow,children:[j(X,{style:[v.headerChip,!z.onlyWithChanges&&v.headerChipActive],onPress:()=>ne(w=>({...w,onlyWithChanges:!1})),testID:`${f}-chip-all`,accessibilityRole:"button",accessibilityLabel:`Show all actions, ${U.totalActions} captured`,accessibilityState:{selected:!z.onlyWithChanges},children:[h(g,{style:v.headerChipLabel,children:"ALL"}),h(g,{style:[v.headerChipValue,{color:A.color.text}],testID:`${f}-chip-all-value`,children:U.totalActions})]}),j(X,{style:[v.headerChip,z.onlyWithChanges&&v.headerChipActive],onPress:()=>ne(w=>({...w,onlyWithChanges:!0})),testID:`${f}-chip-changed`,accessibilityRole:"button",accessibilityLabel:`Show only actions that changed state, ${U.actionsWithChanges} of them`,accessibilityState:{selected:!!z.onlyWithChanges},children:[h(mi,{size:12,color:ie.semantic.warning}),h(g,{style:[v.headerChipValue,{color:ie.semantic.warning}],testID:`${f}-chip-changed-value`,children:U.actionsWithChanges})]}),j(s,{style:v.headerChip,testID:`${f}-chip-types`,accessibilityLabel:`${U.uniqueActionTypes} distinct action types`,children:[h(yi,{size:12,color:ie.semantic.success}),h(g,{style:[v.headerChipValue,{color:ie.semantic.success}],testID:`${f}-chip-types-value`,children:U.uniqueActionTypes})]})]})}),j(fe.Actions,{children:[!Mt&&h(X,{onPress:()=>at(!0),style:[v.headerActionButton,De.length>0&&v.headerActionButtonActive],testID:`${f}-search-open`,accessibilityRole:"button",accessibilityLabel:"Search action types",children:h(pi,{size:14,color:De.length>0?A.color.accent:A.color.textSecondary})}),h(X,{onPress:Bo,style:[v.headerActionButton,R.length===0&&v.headerActionButtonDisabled],disabled:R.length===0,testID:`${f}-copy`,accessibilityRole:"button",accessibilityLabel:"Copy all actions",accessibilityState:{disabled:R.length===0},children:h(hi,{size:14,color:R.length>0?A.color.textSecondary:A.color.textTertiary})}),h(Ai,{isEnabled:ee,onToggle:ye,accessibilityLabel:"Toggle Redux action capture",testID:`${f}-power`}),h(X,{onPress:ae,style:[v.headerActionButton,R.length===0&&v.headerActionButtonDisabled],disabled:R.length===0,testID:`${f}-clear`,accessibilityRole:"button",accessibilityLabel:"Clear actions",accessibilityState:{disabled:R.length===0},children:h(fi,{size:14,color:R.length>0?A.color.textTertiary:A.color.textTertiary})})]})]}),Po=r?bi.modal.root():"buoy-redux-modal";if(!t)return null;let Ft=Q&&Ae!==null?h(Dt,{action:Q,actions:H,selectedIndex:Ae,onIndexChange:Wt}):null,Wo=Q&&H.length>1?68:0,_o=Q==null,$t=h(s,{style:v.container,children:Q&&Ae!==null?h(It,{action:Q,actions:H,selectedIndex:Ae,onIndexChange:Wt,disableInternalFooter:!0,initialView:d}):j(Mi,{children:[$&&!N&&!y.isCaptureSuppressed()&&j(s,{style:v.errorBanner,testID:`${f}-banner-error`,children:[h(bo,{size:14,color:A.color.danger}),h(g,{style:v.errorText,children:L?"Not inside a Redux Provider. Wrap your app with <Provider store={store}>.":"react-redux not installed. Run: npm install react-redux"})]}),!ee&&N&&j(s,{style:v.disabledBanner,testID:`${f}-banner-disabled`,children:[h(gi,{size:14,color:A.color.warning}),h(g,{style:v.disabledText,children:"Action capture is disabled"})]}),P==="patch"&&!y.isCaptureSuppressed()&&j(s,{style:v.disabledBanner,testID:`${f}-banner-patch`,children:[h(bo,{size:14,color:A.color.warning}),h(g,{style:v.disabledText,children:"Top-level capture only \u2014 thunk/RTK Query internals aren't visible. Put import '@buoy-gg/redux' first in your app entry (or add buoyReduxMiddleware) for full capture."})]}),Se&&j(X,{style:v.lockedBanner,onPress:ko,activeOpacity:.8,testID:`${f}-locked`,accessibilityRole:"button",accessibilityLabel:`${se} older ${se===1?"action":"actions"} locked. Upgrade to see them.`,children:[h(xi,{size:14,color:A.color.accent}),j(g,{style:v.lockedText,testID:`${f}-locked-text`,children:[se," older ",se===1?"action":"actions"," locked"]}),h(s,{style:v.upgradeBadge,children:h(g,{style:v.upgradeBadgeText,children:"UPGRADE"})})]}),H.length>0?h(xt,{ref:vo,testID:`${f}-list`,data:H,renderItem:Mo,keyExtractor:Oo,contentContainerStyle:v.listContent,showsVerticalScrollIndicator:!0,...Di}):h(Bi,{isEnabled:ee,query:De,totalActions:U.totalActions})]})}),zt=h(wi,{visible:S,onClose:()=>C(!1),featureName:"Full Action History"});return i?j(So,{children:[j(s,{style:v.inlineRoot,children:[h(s,{style:v.inlineHeader,...Ri,children:Lt()}),$t,Ft]}),zt]}):j(So,{children:[h(ui,{visible:t,onClose:e,onMinimize:n,persistenceKey:Po,header:{showToggleButton:!0,customContent:Lt()},onModeChange:Io,enablePersistence:!0,initialMode:"bottomSheet",enableGlitchEffects:!0,disableScrollWrapper:_o,styles:{},footer:Ft,footerHeight:Wo,children:$t}),zt]})}function Oi(t={}){return h(nt,{...t,inline:!0,visible:!0,onClose:()=>{}})}var v=q.create({inlineRoot:{flex:1,minHeight:0,backgroundColor:"transparent"},inlineHeader:{paddingHorizontal:12,paddingVertical:8,borderBottomWidth:1,borderBottomColor:ie.border.default,backgroundColor:"transparent"},container:{flex:1,backgroundColor:"transparent"},headerChipRow:{flexDirection:"row",alignItems:"center",gap:8},headerChip:{flexDirection:"row",alignItems:"center",gap:4,backgroundColor:A.color.surfaceElevated,paddingHorizontal:10,paddingVertical:5,borderRadius:12,borderWidth:1,borderColor:A.color.border},headerChipActive:{backgroundColor:A.color.accentSoft,borderColor:A.color.accentBorderStrong},headerChipLabel:{fontSize:10,fontWeight:"700",color:A.color.textTertiary},headerChipValue:{fontSize:12,fontWeight:"600",fontFamily:Vi},headerActionButton:{width:32,height:32,borderRadius:8,backgroundColor:A.color.surfaceElevated,borderWidth:1,borderColor:A.color.border,alignItems:"center",justifyContent:"center"},headerActionButtonDisabled:{opacity:.55},headerActionButtonActive:{backgroundColor:A.color.accentSoft,borderColor:A.color.accentBorderStrong},startButton:{backgroundColor:ie.semantic.successBackground,borderColor:ie.semantic.success+"40"},stopButton:{backgroundColor:ie.semantic.errorBackground,borderColor:ie.semantic.error+"40"},errorBanner:{flexDirection:"row",alignItems:"center",gap:8,padding:10,marginHorizontal:12,marginTop:8,backgroundColor:A.color.dangerSoft,borderRadius:8,borderWidth:1,borderColor:A.color.danger+"20"},errorText:{color:A.color.danger,fontSize:11,flex:1},disabledBanner:{flexDirection:"row",alignItems:"center",gap:8,padding:10,marginHorizontal:12,marginTop:8,backgroundColor:A.color.warningSoft,borderRadius:8,borderWidth:1,borderColor:A.color.warning+"20"},disabledText:{color:A.color.warning,fontSize:11,flex:1},listContent:{paddingTop:8,paddingBottom:20},lockedBanner:{flexDirection:"row",alignItems:"center",gap:8,padding:10,marginHorizontal:12,marginTop:8,backgroundColor:A.color.accentSoft,borderRadius:8,borderWidth:1,borderColor:A.color.accentBorder},lockedText:{color:A.color.accent,fontSize:11,fontWeight:"500",flex:1},upgradeBadge:{backgroundColor:A.color.accent,paddingHorizontal:8,paddingVertical:3,borderRadius:4},upgradeBadgeText:{color:A.color.onAccent,fontSize:9,fontWeight:"700",letterSpacing:.5}});import{ReduxIcon as Ie,REDUX_ICON_COLOR as ol}from"@buoy-gg/floating-tools-core/web";import{createToolFactory as Pi,defineToolPreset as Wi}from"@buoy-gg/shared-ui/web";import{jsx as Ao}from"react/jsx-runtime";var wo=Wi({id:"redux",name:"REDUX",description:"Redux action & state inspector",slot:"both",icon:({size:t})=>Ao(Ie,{size:t}),component:nt,props:{enableSharedModalDimensions:!1}}),_i=Pi(wo,t=>({enableSharedModalDimensions:t.enableSharedModalDimensions??!1}),t=>({icon:({size:e})=>Ao(Ie,{size:e,color:t.iconColor})}));var Ni={timeTravel:!1,toggle:!1,edit:!1,diff:!0,export:!0,import:!1,reset:!0,recording:!0};function Li(t,e,o){return{id:t.id,label:t.type,timestamp:t.timestamp,data:t.payload??t.action,prevState:t.prevState,nextState:t.nextState,hasStateChange:t.hasStateChange,duration:t.duration,source:"redux",isCurrent:e===0,isInFuture:!1,isSkipped:!1,meta:{fullAction:t.action}}}function To(t){let{icon:e=Ie,color:o="#764ABC",name:n="Redux"}=t??{},r=0;return{id:"redux",name:n,icon:e,color:o,capabilities:Ni,subscribe:a=>y.subscribe(()=>{a()}),getEntries:()=>{let a=y.getActions();return a.map((l,d)=>Li(l,d,a.length))},getEntryCount:()=>y.getActions().length,getCurrentState:()=>{let a=y.getActions();if(a.length!==0)return a[0].nextState},getStateAtEntry:a=>y.getActionById(String(a))?.nextState,get currentIndex(){return r},jumpTo:a=>{let d=y.getActions().findIndex(p=>p.id===String(a));d!==-1&&(r=d)},get isRecording(){return y.getEnabled()},setRecording:a=>{y.setEnabled(a)},reset:()=>{y.clearActions(),r=0},exportHistory:()=>{let a=y.getActions();return JSON.stringify(a,null,2)}}}var Fi=To();import{WIRE_DETAIL_LIMIT_BYTES as $i,capDetail as zi,createSyncAdapter as Hi,memoByIdentity as ji,readParams as Vt,toWire as Ui}from"@buoy-gg/shared-ui/web";var rt=t=>Ui(t,Kt),qi=ji(t=>{let e=J(t.prevState)?{...t}:{...t,prevState:ut,nextState:ut};if(e.payload=rt(e.payload),e.action=rt(e.action),e.error=rt(e.error),e.meta){let o=rt(e.meta.arg);o!==e.meta.arg&&(e.meta={...e.meta,arg:o})}return e});function Yi(t){return t&&typeof t=="object"&&!Array.isArray(t)?Object.keys(t):[]}function Co(){let e=Z().diagnostic??"not-instrumented";return{available:!1,slices:[],reason:e}}var Ji=Hi({version:2,getSnapshot:()=>y.getActions().map(qi),subscribe:t=>y.subscribe(t),actions:{clearEvents:()=>{y.clearActions()},getActionDetail:t=>{let{id:e}=Vt(t);if(!e)return{found:!1,reason:"missing id"};let o=y.getActionById(e);if(!o)return{found:!1,reason:"unknown id"};if(J(o.prevState))return{found:!0,id:e,evicted:!0,reason:"Raw state was evicted (retained for recent actions only)."};let n=i=>zi(i,$i),r=i=>{if(!i)return i;let a=n(i.arg);return a===i.arg?i:{...i,arg:a}};return{found:!0,id:e,prevState:n(o.prevState),nextState:n(o.nextState),payload:n(o.payload),action:n(o.action),meta:r(o.meta),error:n(o.error)}},getState:t=>{let{includeValues:e=!1}=Vt(t),o=qe();if(!o)return Co();let n=o.getState(),r=Z();return{available:!0,slices:Yi(n),capture:r.capture,mechanism:r.mechanism,...e?{state:n}:{}}},dispatch:t=>{let{action:e}=Vt(t),o=qe();if(!o)return{dispatched:!1,...Co()};if(!e)throw new Error("dispatch requires an `action`");return o.dispatch(e),{dispatched:!0,type:e.type}}}});import{useState as Ki}from"react";import{macOSColors as ge,night as G,TabSelector as Xi,DataInspector as me,CollapsibleSection as it,CopyButton as Gi,monoFont as kt}from"@buoy-gg/shared-ui/web";import{jsx as b,jsxs as Y}from"react/jsx-runtime";function Qi({action:t}){let[e,o]=Ki("action"),n=[{key:"action",label:"Action"},{key:"state",label:"State"},{key:"diff",label:"Diff"}],r=new Date(t.timestamp).toLocaleTimeString(),i=()=>JSON.stringify({type:t.type,payload:t.payload,timestamp:t.timestamp,duration:t.duration,hasStateChange:t.hasStateChange},null,2);return Y(s,{style:T.container,children:[Y(s,{style:T.header,children:[Y(s,{style:T.headerContent,children:[b(g,{style:T.actionType,numberOfLines:2,children:t.type}),Y(s,{style:T.headerMeta,children:[b(g,{style:T.metaText,children:r}),t.duration!==void 0&&Y(g,{style:T.durationText,children:[t.duration.toFixed(2),"ms"]}),t.hasStateChange&&b(s,{style:T.changeBadge,children:b(g,{style:T.changeBadgeText,children:"State Changed"})})]})]}),b(Gi,{value:i(),size:16})]}),b(s,{style:T.tabContainer,children:b(Xi,{tabs:n,activeTab:e,onTabChange:a=>o(a)})}),Y(xe,{style:T.content,showsVerticalScrollIndicator:!0,children:[e==="action"&&Y(s,{style:T.section,children:[b(it,{title:"Payload",defaultOpen:!0,children:t.payload!==void 0?b(me,{data:t.payload}):b(g,{style:T.emptyText,children:"No payload"})}),b(it,{title:"Full Action",defaultOpen:!1,children:b(me,{data:t.action})})]}),e==="state"&&Y(s,{style:T.section,children:[b(it,{title:"Previous State",defaultOpen:!1,children:b(me,{data:t.prevState})}),b(it,{title:"Next State",defaultOpen:!0,children:b(me,{data:t.nextState})})]}),e==="diff"&&b(s,{style:T.section,children:t.hasStateChange?b(Zi,{prevState:t.prevState,nextState:t.nextState}):b(s,{style:T.noChangeContainer,children:b(g,{style:T.noChangeText,children:"No state changes from this action"})})})]})]})}function Zi({prevState:t,nextState:e}){let o=Ro(t,e);return o.length===0?b(s,{style:T.noChangeContainer,children:b(g,{style:T.noChangeText,children:"No differences detected"})}):b(s,{children:o.map((n,r)=>Y(s,{style:T.diffItem,children:[Y(s,{style:T.diffHeader,children:[b(s,{style:[T.diffTypeBadge,{backgroundColor:n.type==="added"?ge.semantic.successBackground:n.type==="removed"?ge.semantic.errorBackground:ge.semantic.warningBackground}],children:b(g,{style:[T.diffTypeText,{color:n.type==="added"?ge.semantic.success:n.type==="removed"?ge.semantic.error:ge.semantic.warning}],children:n.type.toUpperCase()})}),b(g,{style:T.diffPath,children:n.path})]}),n.type==="modified"&&Y(s,{style:T.diffValues,children:[Y(s,{style:T.diffValue,children:[b(g,{style:T.diffLabel,children:"Before:"}),b(me,{data:n.oldValue})]}),Y(s,{style:T.diffValue,children:[b(g,{style:T.diffLabel,children:"After:"}),b(me,{data:n.newValue})]})]}),n.type==="added"&&b(s,{style:T.diffValue,children:b(me,{data:n.newValue})}),n.type==="removed"&&b(s,{style:T.diffValue,children:b(me,{data:n.oldValue})})]},r))})}function Ro(t,e,o=""){let n=[];if(typeof t!="object"||typeof e!="object")return t!==e&&n.push({type:"modified",path:o||"root",oldValue:t,newValue:e}),n;if(t===null||e===null)return t!==e&&n.push({type:"modified",path:o||"root",oldValue:t,newValue:e}),n;let r=t,i=e,a=new Set([...Object.keys(r),...Object.keys(i)]);for(let l of a){let d=o?`${o}.${l}`:l,p=r[l],m=i[l];l in r?l in i?p!==m&&(typeof p=="object"&&typeof m=="object"&&p!==null&&m!==null&&!Array.isArray(p)&&!Array.isArray(m)?d.split(".").length<3?n.push(...Ro(p,m,d)):n.push({type:"modified",path:d,oldValue:p,newValue:m}):n.push({type:"modified",path:d,oldValue:p,newValue:m})):n.push({type:"removed",path:d,oldValue:p}):n.push({type:"added",path:d,newValue:m})}return n}var T=q.create({container:{flex:1},header:{flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:12,backgroundColor:G.color.surface,borderBottomWidth:1,borderBottomColor:G.color.border},headerContent:{flex:1,marginRight:12},actionType:{fontSize:14,fontWeight:"600",color:G.color.text,fontFamily:kt,marginBottom:6},headerMeta:{flexDirection:"row",alignItems:"center",gap:12},metaText:{fontSize:11,color:G.color.textTertiary},durationText:{fontSize:11,color:G.color.textTertiary,fontFamily:kt},changeBadge:{backgroundColor:ge.semantic.warningBackground,paddingHorizontal:6,paddingVertical:2,borderRadius:4},changeBadgeText:{fontSize:10,color:ge.semantic.warning,fontWeight:"600"},tabContainer:{paddingHorizontal:12,paddingVertical:8},content:{flex:1},section:{paddingHorizontal:12,paddingBottom:20},emptyText:{fontSize:12,color:G.color.textTertiary,fontStyle:"italic",padding:8},noChangeContainer:{padding:20,alignItems:"center"},noChangeText:{fontSize:13,color:G.color.textTertiary},diffItem:{marginBottom:12,backgroundColor:G.color.surface,borderRadius:8,borderWidth:1,borderColor:G.color.border,overflow:"hidden"},diffHeader:{flexDirection:"row",alignItems:"center",gap:8,padding:8,borderBottomWidth:1,borderBottomColor:G.color.border},diffTypeBadge:{paddingHorizontal:6,paddingVertical:2,borderRadius:4},diffTypeText:{fontSize:10,fontWeight:"700"},diffPath:{fontSize:12,color:G.color.text,fontFamily:kt},diffValues:{padding:8,gap:8},diffValue:{padding:8},diffLabel:{fontSize:11,color:G.color.textTertiary,marginBottom:4,fontWeight:"600"}});function ea(){return Ee(),null}export{he as BUOY_JUMP_TO_STATE,Ko as BUOY_REPLAY_ACTION,Ei as FREE_TIER_ACTION_LIMIT,f as REDUX_TEST_ID,It as ReduxActionDetailContent,Dt as ReduxActionDetailFooter,Qi as ReduxActionDetailView,Tt as ReduxActionItem,ea as ReduxAutoInstrument,Ie as ReduxIcon,nt as ReduxModal,Oi as ReduxToolView,so as actionRowTestID,Rt as buildActionRowTestIDs,He as buoyDevtoolsEnhancer,Go as buoyReduxMiddleware,Gt as claimDevtoolsHook,Qo as createBuoyReduxMiddleware,To as createReduxHistoryAdapter,_i as createReduxTool,qe as getActiveStore,Z as getInstrumentationStatus,je as instrumentStore,xr as isAutoInstrumentActive,un as isDevtoolsHookClaimed,yr as isStoreInstrumented,ft as jumpToState,y as reduxActionStore,Fi as reduxHistoryAdapter,Ji as reduxSyncAdapter,wo as reduxToolPreset,hr as registerReduxStore,gt as replayAction,ao as slugForTestID,Ue as uninstrumentStore,Ee as useAutoInstrumentRedux,bt as useReduxActions,Sr as useReduxAvailability,Xo as withBuoyDevTools};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buoy-gg/redux",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.41",
|
|
4
4
|
"description": "Inspect a connected Redux store, captured actions and state changes, and dispatch supported actions from Buoy tools.",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -10,16 +10,24 @@
|
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
12
|
"react-native": "./lib/module/index.js",
|
|
13
|
+
"browser": {
|
|
14
|
+
"types": "./lib/typescript/index.d.ts",
|
|
15
|
+
"default": "./lib/web/index.mjs"
|
|
16
|
+
},
|
|
13
17
|
"import": {
|
|
14
|
-
"
|
|
15
|
-
"
|
|
18
|
+
"types": "./lib/typescript/index.d.ts",
|
|
19
|
+
"default": "./lib/module/index.js"
|
|
16
20
|
},
|
|
17
21
|
"require": {
|
|
18
|
-
"
|
|
19
|
-
"
|
|
22
|
+
"types": "./lib/typescript/index.d.ts",
|
|
23
|
+
"default": "./lib/commonjs/index.js"
|
|
20
24
|
}
|
|
21
25
|
},
|
|
22
|
-
"./package.json": "./package.json"
|
|
26
|
+
"./package.json": "./package.json",
|
|
27
|
+
"./web": {
|
|
28
|
+
"types": "./lib/typescript/index.d.ts",
|
|
29
|
+
"default": "./lib/web/index.mjs"
|
|
30
|
+
}
|
|
23
31
|
},
|
|
24
32
|
"files": [
|
|
25
33
|
"lib"
|
|
@@ -28,18 +36,21 @@
|
|
|
28
36
|
"**/devtoolsHook.js",
|
|
29
37
|
"**/devtoolsHook.ts",
|
|
30
38
|
"**/snapshotProvider.js",
|
|
31
|
-
"**/snapshotProvider.ts"
|
|
39
|
+
"**/snapshotProvider.ts",
|
|
40
|
+
"./lib/web/**/*.mjs"
|
|
32
41
|
],
|
|
33
42
|
"dependencies": {
|
|
34
|
-
"@buoy-gg/floating-tools-core": "^7.0.
|
|
35
|
-
"@buoy-gg/shared-ui": "^7.0.
|
|
36
|
-
"@buoy-gg/license": "^7.0.
|
|
43
|
+
"@buoy-gg/floating-tools-core": "^7.0.41",
|
|
44
|
+
"@buoy-gg/shared-ui": "^7.0.41",
|
|
45
|
+
"@buoy-gg/license": "^7.0.41"
|
|
37
46
|
},
|
|
38
47
|
"peerDependencies": {
|
|
39
48
|
"@reduxjs/toolkit": ">=1.9.0",
|
|
40
49
|
"react": "*",
|
|
41
50
|
"react-native": "*",
|
|
42
|
-
"react-redux": ">=8.0.0"
|
|
51
|
+
"react-redux": ">=8.0.0",
|
|
52
|
+
"react-native-web": "^0.21.0",
|
|
53
|
+
"react-dom": ">=18"
|
|
43
54
|
},
|
|
44
55
|
"devDependencies": {
|
|
45
56
|
"@reduxjs/toolkit": "^2.11.2",
|
|
@@ -96,11 +107,23 @@
|
|
|
96
107
|
"state-management",
|
|
97
108
|
"actions"
|
|
98
109
|
],
|
|
110
|
+
"peerDependenciesMeta": {
|
|
111
|
+
"react-native": {
|
|
112
|
+
"optional": true
|
|
113
|
+
},
|
|
114
|
+
"react-native-web": {
|
|
115
|
+
"optional": true
|
|
116
|
+
},
|
|
117
|
+
"react-dom": {
|
|
118
|
+
"optional": true
|
|
119
|
+
}
|
|
120
|
+
},
|
|
99
121
|
"scripts": {
|
|
100
|
-
"build": "bob build",
|
|
122
|
+
"build": "bob build && pnpm run build:web",
|
|
101
123
|
"typecheck": "tsc --noEmit",
|
|
102
124
|
"clean": "rimraf lib",
|
|
103
125
|
"test": "pnpm run typecheck && node scripts/test-devtools-hook.cjs",
|
|
104
|
-
"postinstall": "echo \"Run pnpm build to compile this package\""
|
|
126
|
+
"postinstall": "echo \"Run pnpm build to compile this package\"",
|
|
127
|
+
"build:web": "node ../../scripts/build-web.mjs redux"
|
|
105
128
|
}
|
|
106
129
|
}
|