@buoy-gg/react-query 7.0.77 → 7.0.79

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.
Files changed (24) hide show
  1. package/lib/commonjs/preset.js +1 -1
  2. package/lib/commonjs/react-query/components/DataEditorMode.js +1 -1
  3. package/lib/commonjs/react-query/components/MutationEditorMode.js +1 -1
  4. package/lib/commonjs/react-query/components/QuerySelector.js +1 -1
  5. package/lib/commonjs/react-query/components/WifiToggle.js +1 -1
  6. package/lib/commonjs/react-query/components/query-browser/MutationInformation.js +1 -1
  7. package/lib/commonjs/react-query/components/query-browser/MutationsList.js +1 -1
  8. package/lib/commonjs/react-query/components/query-browser/QueryBrowser.js +1 -1
  9. package/lib/commonjs/react-query/components/query-browser/QueryInformation.js +1 -1
  10. package/lib/commonjs/react-query/sync/reactQuerySyncAdapter.js +1 -1
  11. package/lib/module/preset.js +1 -1
  12. package/lib/module/react-query/components/DataEditorMode.js +1 -1
  13. package/lib/module/react-query/components/MutationEditorMode.js +1 -1
  14. package/lib/module/react-query/components/QuerySelector.js +1 -1
  15. package/lib/module/react-query/components/WifiToggle.js +1 -1
  16. package/lib/module/react-query/components/query-browser/MutationInformation.js +1 -1
  17. package/lib/module/react-query/components/query-browser/MutationsList.js +1 -1
  18. package/lib/module/react-query/components/query-browser/QueryBrowser.js +1 -1
  19. package/lib/module/react-query/components/query-browser/QueryInformation.js +1 -1
  20. package/lib/module/react-query/sync/reactQuerySyncAdapter.js +1 -1
  21. package/lib/typescript/preset.d.ts +3 -0
  22. package/lib/typescript/react-query/sync/reactQuerySyncAdapter.d.ts +13 -2
  23. package/lib/web/index.mjs +3 -3
  24. package/package.json +3 -3
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.createReactQueryTool=createReactQueryTool;exports.createWifiToggleTool=createWifiToggleTool;exports.wifiTogglePreset=exports.reactQueryToolPreset=void 0;var _floatingToolsCore=require("@buoy-gg/floating-tools-core");var _sharedUi=require("@buoy-gg/shared-ui");var _ReactQueryDevToolsModal=require("./react-query/components/ReactQueryDevToolsModal");var _reactQuery=require("@tanstack/react-query");var _react=require("react");var _jsxRuntime=require("react/jsx-runtime");const EmptyComponent=()=>null;const saveWifiState=async e=>{try{await _sharedUi.persistentStorage.setItem(_sharedUi.devToolsStorageKeys.settings.wifiEnabled(),e.toString())}catch(o){}};const restoreWifiState=async()=>{try{const e=await _sharedUi.persistentStorage.getItem(_sharedUi.devToolsStorageKeys.settings.wifiEnabled());if(e!==null){_reactQuery.onlineManager.setOnline(e==="true")}}catch(e){}};restoreWifiState();function WifiIcon({size:e}){const[o,r]=(0,_react.useState)(()=>_reactQuery.onlineManager.isOnline());(0,_react.useEffect)(()=>{const n=_reactQuery.onlineManager.subscribe(s=>{r(s)});return n},[]);const t=o?"#10B981":"#DC2626";return(0,_jsxRuntime.jsx)(_sharedUi.Wifi,{size:e,color:t})}const reactQueryToolPreset=exports.reactQueryToolPreset={id:"query",name:"QUERY",description:"React Query inspector",slot:"both",icon:({size:e})=>(0,_jsxRuntime.jsx)(_floatingToolsCore.QueryIcon,{size:e}),component:_ReactQueryDevToolsModal.ReactQueryDevToolsModal,props:{enableSharedModalDimensions:false}};function createReactQueryTool(e){return{id:e?.id||"query",name:e?.name||"QUERY",description:e?.description||"React Query inspector",slot:"both",icon:({size:o})=>(0,_jsxRuntime.jsx)(_floatingToolsCore.QueryIcon,{size:o}),component:_ReactQueryDevToolsModal.ReactQueryDevToolsModal,props:{enableSharedModalDimensions:e?.enableSharedModalDimensions!==void 0?e.enableSharedModalDimensions:false}}}const wifiTogglePreset=exports.wifiTogglePreset={id:"query-wifi-toggle",name:"WIFI",description:"Toggle React Query online/offline state",slot:"row",icon:WifiIcon,component:EmptyComponent,props:{},launchMode:"toggle-only",onPress:()=>{const e=!_reactQuery.onlineManager.isOnline();_reactQuery.onlineManager.setOnline(e);saveWifiState(e)}};function createWifiToggleTool(e){const o=e?.onColor||"#10B981";const r=e?.offColor||"#DC2626";const t=({size:n})=>{const[s,i]=(0,_react.useState)(()=>_reactQuery.onlineManager.isOnline());(0,_react.useEffect)(()=>{const a=_reactQuery.onlineManager.subscribe(l=>{i(l)});return a},[]);return(0,_jsxRuntime.jsx)(_sharedUi.Wifi,{size:n,color:s?o:r})};return{id:e?.id||"query-wifi-toggle",name:e?.name||"WIFI",description:e?.description||"Toggle React Query online/offline state",slot:"row",icon:t,component:EmptyComponent,props:{},launchMode:"toggle-only",onPress:()=>{const n=!_reactQuery.onlineManager.isOnline();_reactQuery.onlineManager.setOnline(n);saveWifiState(n)}}}
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.createReactQueryTool=createReactQueryTool;exports.createWifiToggleTool=createWifiToggleTool;exports.wifiTogglePreset=exports.reactQueryToolPreset=void 0;var _floatingToolsCore=require("@buoy-gg/floating-tools-core");var _sharedUi=require("@buoy-gg/shared-ui");var _ReactQueryDevToolsModal=require("./react-query/components/ReactQueryDevToolsModal");var _reactQuery=require("@tanstack/react-query");var _react=require("react");var _jsxRuntime=require("react/jsx-runtime");const EmptyComponent=()=>null;const saveWifiState=async e=>{try{await _sharedUi.persistentStorage.setItem(_sharedUi.devToolsStorageKeys.settings.wifiEnabled(),e.toString())}catch(n){}};const restoreWifiState=async()=>{try{const e=await _sharedUi.persistentStorage.getItem(_sharedUi.devToolsStorageKeys.settings.wifiEnabled());if(e!==null){_reactQuery.onlineManager.setOnline(e==="true")}}catch(e){}};restoreWifiState();globalThis[Symbol.for("buoy.query.onlineManager")]=_reactQuery.onlineManager;function WifiIcon({size:e}){const[n,r]=(0,_react.useState)(()=>_reactQuery.onlineManager.isOnline());(0,_react.useEffect)(()=>{const o=_reactQuery.onlineManager.subscribe(i=>{r(i)});return o},[]);const t=n?"#10B981":"#DC2626";return(0,_jsxRuntime.jsx)(_sharedUi.Wifi,{size:e,color:t})}const reactQueryToolPreset=exports.reactQueryToolPreset={id:"query",name:"QUERY",description:"React Query inspector",slot:"both",icon:({size:e})=>(0,_jsxRuntime.jsx)(_floatingToolsCore.QueryIcon,{size:e}),component:_ReactQueryDevToolsModal.ReactQueryDevToolsModal,props:{enableSharedModalDimensions:false}};function createReactQueryTool(e){return{id:e?.id||"query",name:e?.name||"QUERY",description:e?.description||"React Query inspector",slot:"both",icon:({size:n})=>(0,_jsxRuntime.jsx)(_floatingToolsCore.QueryIcon,{size:n}),component:_ReactQueryDevToolsModal.ReactQueryDevToolsModal,props:{enableSharedModalDimensions:e?.enableSharedModalDimensions!==void 0?e.enableSharedModalDimensions:false}}}const wifiTogglePreset=exports.wifiTogglePreset={id:"query-wifi-toggle",name:"WIFI",description:"Toggle React Query online/offline state",slot:"row",icon:WifiIcon,component:EmptyComponent,props:{},launchMode:"toggle-only",isOn:()=>_reactQuery.onlineManager.isOnline(),onPress:()=>{const e=!_reactQuery.onlineManager.isOnline();_reactQuery.onlineManager.setOnline(e);saveWifiState(e)}};function createWifiToggleTool(e){const n=e?.onColor||"#10B981";const r=e?.offColor||"#DC2626";const t=({size:o})=>{const[i,s]=(0,_react.useState)(()=>_reactQuery.onlineManager.isOnline());(0,_react.useEffect)(()=>{const a=_reactQuery.onlineManager.subscribe(l=>{s(l)});return a},[]);return(0,_jsxRuntime.jsx)(_sharedUi.Wifi,{size:o,color:i?n:r})};return{id:e?.id||"query-wifi-toggle",name:e?.name||"WIFI",description:e?.description||"Toggle React Query online/offline state",slot:"row",icon:t,component:EmptyComponent,props:{},launchMode:"toggle-only",isOn:()=>_reactQuery.onlineManager.isOnline(),onPress:()=>{const o=!_reactQuery.onlineManager.isOnline();_reactQuery.onlineManager.setOnline(o);saveWifiState(o)}}}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.DataEditorActionsFooter=DataEditorActionsFooter;exports.DataEditorMode=DataEditorMode;var _reactNative=require("react-native");var _reactQuery=require("@tanstack/react-query");var _sharedUi=require("@buoy-gg/shared-ui");var _Explorer=_interopRequireDefault(require("./query-browser/Explorer"));var _QueryDetails=_interopRequireDefault(require("./query-browser/QueryDetails"));var _ActionButton=_interopRequireDefault(require("./query-browser/ActionButton"));var _getQueryStatusLabel=require("../utils/getQueryStatusLabel");var _useActionButtons=require("../hooks/useActionButtons");var _dataViewer=require("@buoy-gg/shared-ui/dataViewer");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function DataEditorMode({selectedQuery:t,isFloatingMode:e,disableInternalFooter:r=false,queryVersion:a}){const n=(0,_sharedUi.useSafeAreaInsets)({minBottom:16});const s=(0,_reactQuery.useQueryClient)();const o=(0,_useActionButtons.useActionButtons)(t,s,a);return(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsxs)(_reactNative.ScrollView,{testID:"buoy-rq-detail-scroll",accessibilityLabel:"Data editor mode",accessibilityHint:"View data editor mode","sentry-label":"ignore data editor mode",style:styles.explorerScrollContainer,contentContainerStyle:[styles.explorerScrollContent,!r&&{paddingBottom:72}],children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.section,children:[(0,_jsxRuntime.jsx)(DataExplorer,{visible:!!t.state.data,selectedQuery:t,queryVersion:a}),(0,_jsxRuntime.jsx)(DataEmptyState,{visible:!t.state.data,selectedQuery:t})]}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.section,children:(0,_jsxRuntime.jsx)(_QueryDetails.default,{query:t})}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.section,children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.queryExplorerContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{testID:"buoy-rq-query-explorer-header",style:styles.queryExplorerHeader,children:"Query Explorer"}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.queryExplorerContent,children:(0,_jsxRuntime.jsx)(_dataViewer.DataViewer,{title:"",data:t,maxDepth:10,rawMode:true,showTypeFilter:true,initialExpanded:false})})]})})]}),!r&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.actionFooter,{paddingBottom:e?0:n.bottom+8}],children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.actionsRow,children:o.map((i,l)=>(0,_jsxRuntime.jsx)(_ActionButton.default,{testID:`buoy-rq-action-${i.variant}`,onClick:i.onPress,text:i.label,variant:i.variant,disabled:i.disabled},l))})})]})}function DataEditorActionsFooter({selectedQuery:t,isFloatingMode:e,queryVersion:r}){const a=(0,_sharedUi.useSafeAreaInsets)({minBottom:16});const n=(0,_reactQuery.useQueryClient)();const s=(0,_useActionButtons.useActionButtons)(t,n,r);return(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.actionFooter,{paddingBottom:e?0:a.bottom+8}],children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.actionsRow,children:s.map((o,i)=>(0,_jsxRuntime.jsx)(_ActionButton.default,{testID:`buoy-rq-action-${o.variant}`,onClick:o.onPress,text:o.label,variant:o.variant,disabled:o.disabled},i))})})}function DataExplorer({visible:t,selectedQuery:e,queryVersion:r=0}){if(!t)return null;return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.dataContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{testID:"buoy-rq-data-header",style:styles.dataHeader,children:"Data Editor"}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.dataContent,children:(0,_jsxRuntime.jsx)(_Explorer.default,{editable:true,label:"Data",value:e.state.data,defaultExpanded:["Data"],activeQuery:e,dataVersion:r})})]})}function DataEmptyState({visible:t,selectedQuery:e}){if(!t)return null;const r=()=>{if(e.isDisabled()){return{title:"Query Disabled",description:"This query is disabled and won't automatically fetch. Enable the query or manually trigger a fetch to load data."}}if(e.state.status==="pending"||(0,_getQueryStatusLabel.getQueryStatusLabel)(e)==="fetching"){return{title:e.state.status==="pending"?"Loading...":"Refetching...",description:"Please wait while the query is being executed."}}if(e.state.status==="error"){return{title:"Query Error",description:e.state.error?.message||"An error occurred while fetching data."}}return{title:"No Data Available",description:"This query has no data to edit. Try refetching the query first."}};const{title:a,description:n}=r();return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.emptyState,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{testID:"buoy-rq-detail-empty-title",style:styles.emptyTitle,children:a}),(0,_jsxRuntime.jsx)(_reactNative.Text,{testID:"buoy-rq-detail-empty-description",style:styles.emptyDescription,children:n})]})}const styles=_reactNative.StyleSheet.create({explorerScrollContainer:{flex:1},explorerScrollContent:{paddingBottom:16,paddingHorizontal:8,flexGrow:1},section:{marginBottom:16},emptyState:{flex:1,justifyContent:"center",alignItems:"center",padding:32},emptyTitle:{color:_sharedUi.night.color.text,fontSize:18,fontWeight:"600",marginBottom:8,textAlign:"center"},emptyDescription:{color:_sharedUi.night.color.textSecondary,fontSize:14,textAlign:"center",lineHeight:20,maxWidth:280},actionFooter:{borderTopWidth:1,borderTopColor:_sharedUi.night.color.border,paddingTop:8,paddingHorizontal:12,backgroundColor:"transparent",borderBottomLeftRadius:14,borderBottomRightRadius:14},actionsRow:{flexDirection:"row",alignItems:"center",gap:8},queryExplorerContainer:{minWidth:200,backgroundColor:_sharedUi.night.color.surface,borderRadius:6,borderWidth:1,borderColor:_sharedUi.night.color.accent+"4D",overflow:"hidden",shadowColor:_sharedUi.night.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},queryExplorerHeader:{backgroundColor:_sharedUi.night.color.accent+"1A",paddingHorizontal:12,paddingVertical:10,fontWeight:"600",fontSize:12,color:_sharedUi.night.color.accent,borderBottomWidth:1,borderBottomColor:_sharedUi.night.color.accent+"33",letterSpacing:.5,textTransform:"uppercase",fontFamily:_sharedUi.monoFont},queryExplorerContent:{padding:8},dataContainer:{minWidth:200,backgroundColor:_sharedUi.night.color.surface,borderRadius:6,borderWidth:1,borderColor:_sharedUi.night.color.accent+"4D",overflow:"hidden",shadowColor:_sharedUi.night.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6,marginTop:8},dataHeader:{backgroundColor:_sharedUi.night.color.accent+"1A",paddingHorizontal:12,paddingVertical:10,fontWeight:"600",fontSize:12,color:_sharedUi.night.color.accent,borderBottomWidth:1,borderBottomColor:_sharedUi.night.color.accent+"33",letterSpacing:.5,textTransform:"uppercase",fontFamily:_sharedUi.monoFont},dataContent:{padding:8}});
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.DataEditorActionsFooter=DataEditorActionsFooter;exports.DataEditorMode=DataEditorMode;var _reactNative=require("react-native");var _reactQuery=require("@tanstack/react-query");var _sharedUi=require("@buoy-gg/shared-ui");var _Explorer=_interopRequireDefault(require("./query-browser/Explorer"));var _QueryDetails=_interopRequireDefault(require("./query-browser/QueryDetails"));var _ActionButton=_interopRequireDefault(require("./query-browser/ActionButton"));var _getQueryStatusLabel=require("../utils/getQueryStatusLabel");var _useActionButtons=require("../hooks/useActionButtons");var _dataViewer=require("@buoy-gg/shared-ui/dataViewer");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function DataEditorMode({selectedQuery:t,isFloatingMode:e,disableInternalFooter:r=false,queryVersion:a}){const n=(0,_sharedUi.useSafeAreaInsets)({minBottom:16});const s=(0,_reactQuery.useQueryClient)();const o=(0,_useActionButtons.useActionButtons)(t,s,a);return(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsxs)(_reactNative.ScrollView,{keyboardShouldPersistTaps:"handled",testID:"buoy-rq-detail-scroll",accessibilityLabel:"Data editor mode",accessibilityHint:"View data editor mode","sentry-label":"ignore data editor mode",style:styles.explorerScrollContainer,contentContainerStyle:[styles.explorerScrollContent,!r&&{paddingBottom:72}],children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.section,children:[(0,_jsxRuntime.jsx)(DataExplorer,{visible:!!t.state.data,selectedQuery:t,queryVersion:a}),(0,_jsxRuntime.jsx)(DataEmptyState,{visible:!t.state.data,selectedQuery:t})]}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.section,children:(0,_jsxRuntime.jsx)(_QueryDetails.default,{query:t})}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.section,children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.queryExplorerContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{testID:"buoy-rq-query-explorer-header",style:styles.queryExplorerHeader,children:"Query Explorer"}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.queryExplorerContent,children:(0,_jsxRuntime.jsx)(_dataViewer.DataViewer,{title:"",data:t,maxDepth:10,rawMode:true,showTypeFilter:true,initialExpanded:false})})]})})]}),!r&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.actionFooter,{paddingBottom:e?0:n.bottom+8}],children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.actionsRow,children:o.map((i,l)=>(0,_jsxRuntime.jsx)(_ActionButton.default,{testID:`buoy-rq-action-${i.variant}`,onClick:i.onPress,text:i.label,variant:i.variant,disabled:i.disabled},l))})})]})}function DataEditorActionsFooter({selectedQuery:t,isFloatingMode:e,queryVersion:r}){const a=(0,_sharedUi.useSafeAreaInsets)({minBottom:16});const n=(0,_reactQuery.useQueryClient)();const s=(0,_useActionButtons.useActionButtons)(t,n,r);return(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.actionFooter,{paddingBottom:e?0:a.bottom+8}],children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.actionsRow,children:s.map((o,i)=>(0,_jsxRuntime.jsx)(_ActionButton.default,{testID:`buoy-rq-action-${o.variant}`,onClick:o.onPress,text:o.label,variant:o.variant,disabled:o.disabled},i))})})}function DataExplorer({visible:t,selectedQuery:e,queryVersion:r=0}){if(!t)return null;return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.dataContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{testID:"buoy-rq-data-header",style:styles.dataHeader,children:"Data Editor"}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.dataContent,children:(0,_jsxRuntime.jsx)(_Explorer.default,{editable:true,label:"Data",value:e.state.data,defaultExpanded:["Data"],activeQuery:e,dataVersion:r})})]})}function DataEmptyState({visible:t,selectedQuery:e}){if(!t)return null;const r=()=>{if(e.isDisabled()){return{title:"Query Disabled",description:"This query is disabled and won't automatically fetch. Enable the query or manually trigger a fetch to load data."}}if(e.state.status==="pending"||(0,_getQueryStatusLabel.getQueryStatusLabel)(e)==="fetching"){return{title:e.state.status==="pending"?"Loading...":"Refetching...",description:"Please wait while the query is being executed."}}if(e.state.status==="error"){return{title:"Query Error",description:e.state.error?.message||"An error occurred while fetching data."}}return{title:"No Data Available",description:"This query has no data to edit. Try refetching the query first."}};const{title:a,description:n}=r();return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.emptyState,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{testID:"buoy-rq-detail-empty-title",style:styles.emptyTitle,children:a}),(0,_jsxRuntime.jsx)(_reactNative.Text,{testID:"buoy-rq-detail-empty-description",style:styles.emptyDescription,children:n})]})}const styles=_reactNative.StyleSheet.create({explorerScrollContainer:{flex:1},explorerScrollContent:{paddingBottom:16,paddingHorizontal:8,flexGrow:1},section:{marginBottom:16},emptyState:{flex:1,justifyContent:"center",alignItems:"center",padding:32},emptyTitle:{color:_sharedUi.night.color.text,fontSize:18,fontWeight:"600",marginBottom:8,textAlign:"center"},emptyDescription:{color:_sharedUi.night.color.textSecondary,fontSize:14,textAlign:"center",lineHeight:20,maxWidth:280},actionFooter:{borderTopWidth:1,borderTopColor:_sharedUi.night.color.border,paddingTop:8,paddingHorizontal:12,backgroundColor:"transparent",borderBottomLeftRadius:14,borderBottomRightRadius:14},actionsRow:{flexDirection:"row",alignItems:"center",gap:8},queryExplorerContainer:{minWidth:200,backgroundColor:_sharedUi.night.color.surface,borderRadius:6,borderWidth:1,borderColor:_sharedUi.night.color.accent+"4D",overflow:"hidden",shadowColor:_sharedUi.night.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},queryExplorerHeader:{backgroundColor:_sharedUi.night.color.accent+"1A",paddingHorizontal:12,paddingVertical:10,fontWeight:"600",fontSize:12,color:_sharedUi.night.color.accent,borderBottomWidth:1,borderBottomColor:_sharedUi.night.color.accent+"33",letterSpacing:.5,textTransform:"uppercase",fontFamily:_sharedUi.monoFont},queryExplorerContent:{padding:8},dataContainer:{minWidth:200,backgroundColor:_sharedUi.night.color.surface,borderRadius:6,borderWidth:1,borderColor:_sharedUi.night.color.accent+"4D",overflow:"hidden",shadowColor:_sharedUi.night.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6,marginTop:8},dataHeader:{backgroundColor:_sharedUi.night.color.accent+"1A",paddingHorizontal:12,paddingVertical:10,fontWeight:"600",fontSize:12,color:_sharedUi.night.color.accent,borderBottomWidth:1,borderBottomColor:_sharedUi.night.color.accent+"33",letterSpacing:.5,textTransform:"uppercase",fontFamily:_sharedUi.monoFont},dataContent:{padding:8}});
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.MutationEditorActionsFooter=MutationEditorActionsFooter;exports.MutationEditorMode=MutationEditorMode;var _reactNative=require("react-native");var _sharedUi=require("@buoy-gg/shared-ui");var _Explorer=_interopRequireDefault(require("./query-browser/Explorer"));var _MutationDetails=_interopRequireDefault(require("./query-browser/MutationDetails"));var _ActionButton=_interopRequireDefault(require("./query-browser/ActionButton"));var _useMutationActionButtons=require("../hooks/useMutationActionButtons");var _dataViewer=require("@buoy-gg/shared-ui/dataViewer");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function MutationEditorMode({selectedMutation:t,isFloatingMode:e,disableInternalFooter:r=false}){return(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsxs)(_reactNative.ScrollView,{testID:"buoy-rq-mutation-detail-scroll",accessibilityLabel:"Mutation editor mode",accessibilityHint:"View mutation editor mode","sentry-label":"ignore mutation editor mode",style:styles.explorerScrollContainer,contentContainerStyle:styles.explorerScrollContent,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.section,children:[(0,_jsxRuntime.jsx)(DataExplorer,{visible:!!t.state.data,selectedMutation:t}),(0,_jsxRuntime.jsx)(DataEmptyState,{visible:!t.state.data,selectedMutation:t})]}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.section,children:(0,_jsxRuntime.jsx)(_MutationDetails.default,{selectedMutation:t})}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.section,children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.mutationExplorerContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.mutationExplorerHeader,children:"Mutation Explorer"}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.mutationExplorerContent,children:(0,_jsxRuntime.jsx)(_dataViewer.DataViewer,{title:"",data:t,maxDepth:10,rawMode:true,showTypeFilter:true,initialExpanded:false})})]})})]}),!r&&(0,_jsxRuntime.jsx)(MutationEditorActionsFooter,{selectedMutation:t,isFloatingMode:e})]})}function MutationEditorActionsFooter({selectedMutation:t,isFloatingMode:e}){const r=(0,_sharedUi.useSafeAreaInsets)({minBottom:16});const i=(0,_useMutationActionButtons.useMutationActionButtons)(t);return(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.actionFooter,{paddingBottom:e?0:r.bottom+8}],children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.actionsGrid,children:i.map((o,n)=>(0,_jsxRuntime.jsx)(_ActionButton.default,{testID:`buoy-rq-action-${o.variant}`,onClick:o.onPress,text:o.label,variant:o.variant,disabled:o.disabled},n))})})}function DataExplorer({visible:t,selectedMutation:e}){if(!t)return null;return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.dataContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.dataHeader,children:"Data Editor"}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.dataContent,children:(0,_jsxRuntime.jsx)(_Explorer.default,{editable:true,label:"Data",value:e.state.data,defaultExpanded:["Data"]},e.mutationId)})]})}function DataEmptyState({visible:t,selectedMutation:e}){if(!t)return null;const r=()=>{if(e.state.status==="pending"){return{title:"Pending...",description:"The mutation is in progress."}}if(e.state.status==="error"){return{title:"Mutation Error",description:e.state.error?.message||"An error occurred."}}return{title:"No Data Available",description:"This mutation has no data."}};const{title:i,description:o}=r();return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.emptyState,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{testID:"buoy-rq-mutation-detail-empty-title",style:styles.emptyTitle,children:i}),(0,_jsxRuntime.jsx)(_reactNative.Text,{testID:"buoy-rq-mutation-detail-empty-description",style:styles.emptyDescription,children:o})]})}const styles=_reactNative.StyleSheet.create({explorerScrollContainer:{flex:1},explorerScrollContent:{paddingBottom:16,paddingHorizontal:8,flexGrow:1},section:{marginBottom:16},emptyState:{flex:1,justifyContent:"center",alignItems:"center",padding:32},emptyTitle:{color:_sharedUi.night.color.text,fontSize:18,fontWeight:"600",marginBottom:8,textAlign:"center"},emptyDescription:{color:_sharedUi.night.color.textSecondary,fontSize:14,textAlign:"center",lineHeight:20,maxWidth:280},actionFooter:{borderTopWidth:1,borderTopColor:_sharedUi.night.color.border,paddingVertical:8,paddingHorizontal:12,backgroundColor:"transparent",borderBottomLeftRadius:14,borderBottomRightRadius:14},actionsGrid:{flexDirection:"row",flexWrap:"wrap",gap:6,justifyContent:"space-between"},mutationExplorerContainer:{minWidth:200,backgroundColor:_sharedUi.night.color.surface,borderRadius:6,borderWidth:1,borderColor:_sharedUi.night.color.accent+"4D",overflow:"hidden",shadowColor:_sharedUi.night.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},mutationExplorerHeader:{backgroundColor:_sharedUi.night.color.accent+"1A",paddingHorizontal:12,paddingVertical:10,fontWeight:"600",fontSize:12,color:_sharedUi.night.color.accent,borderBottomWidth:1,borderBottomColor:_sharedUi.night.color.accent+"33",letterSpacing:.5,textTransform:"uppercase",fontFamily:_sharedUi.monoFont},mutationExplorerContent:{padding:8},dataContainer:{minWidth:200,backgroundColor:_sharedUi.night.color.surface,borderRadius:6,borderWidth:1,borderColor:_sharedUi.night.color.accent+"4D",overflow:"hidden",shadowColor:_sharedUi.night.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},dataHeader:{backgroundColor:_sharedUi.night.color.accent+"1A",paddingHorizontal:12,paddingVertical:10,fontWeight:"600",fontSize:12,color:_sharedUi.night.color.accent,borderBottomWidth:1,borderBottomColor:_sharedUi.night.color.accent+"33",letterSpacing:.5,textTransform:"uppercase",fontFamily:_sharedUi.monoFont},dataContent:{padding:8}});
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.MutationEditorActionsFooter=MutationEditorActionsFooter;exports.MutationEditorMode=MutationEditorMode;var _reactNative=require("react-native");var _sharedUi=require("@buoy-gg/shared-ui");var _Explorer=_interopRequireDefault(require("./query-browser/Explorer"));var _MutationDetails=_interopRequireDefault(require("./query-browser/MutationDetails"));var _ActionButton=_interopRequireDefault(require("./query-browser/ActionButton"));var _useMutationActionButtons=require("../hooks/useMutationActionButtons");var _dataViewer=require("@buoy-gg/shared-ui/dataViewer");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function MutationEditorMode({selectedMutation:t,isFloatingMode:e,disableInternalFooter:r=false}){return(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsxs)(_reactNative.ScrollView,{keyboardShouldPersistTaps:"handled",testID:"buoy-rq-mutation-detail-scroll",accessibilityLabel:"Mutation editor mode",accessibilityHint:"View mutation editor mode","sentry-label":"ignore mutation editor mode",style:styles.explorerScrollContainer,contentContainerStyle:styles.explorerScrollContent,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.section,children:[(0,_jsxRuntime.jsx)(DataExplorer,{visible:!!t.state.data,selectedMutation:t}),(0,_jsxRuntime.jsx)(DataEmptyState,{visible:!t.state.data,selectedMutation:t})]}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.section,children:(0,_jsxRuntime.jsx)(_MutationDetails.default,{selectedMutation:t})}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.section,children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.mutationExplorerContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.mutationExplorerHeader,children:"Mutation Explorer"}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.mutationExplorerContent,children:(0,_jsxRuntime.jsx)(_dataViewer.DataViewer,{title:"",data:t,maxDepth:10,rawMode:true,showTypeFilter:true,initialExpanded:false})})]})})]}),!r&&(0,_jsxRuntime.jsx)(MutationEditorActionsFooter,{selectedMutation:t,isFloatingMode:e})]})}function MutationEditorActionsFooter({selectedMutation:t,isFloatingMode:e}){const r=(0,_sharedUi.useSafeAreaInsets)({minBottom:16});const i=(0,_useMutationActionButtons.useMutationActionButtons)(t);return(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.actionFooter,{paddingBottom:e?0:r.bottom+8}],children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.actionsGrid,children:i.map((o,n)=>(0,_jsxRuntime.jsx)(_ActionButton.default,{testID:`buoy-rq-action-${o.variant}`,onClick:o.onPress,text:o.label,variant:o.variant,disabled:o.disabled},n))})})}function DataExplorer({visible:t,selectedMutation:e}){if(!t)return null;return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.dataContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.dataHeader,children:"Data Editor"}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.dataContent,children:(0,_jsxRuntime.jsx)(_Explorer.default,{editable:true,label:"Data",value:e.state.data,defaultExpanded:["Data"]},e.mutationId)})]})}function DataEmptyState({visible:t,selectedMutation:e}){if(!t)return null;const r=()=>{if(e.state.status==="pending"){return{title:"Pending...",description:"The mutation is in progress."}}if(e.state.status==="error"){return{title:"Mutation Error",description:e.state.error?.message||"An error occurred."}}return{title:"No Data Available",description:"This mutation has no data."}};const{title:i,description:o}=r();return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.emptyState,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{testID:"buoy-rq-mutation-detail-empty-title",style:styles.emptyTitle,children:i}),(0,_jsxRuntime.jsx)(_reactNative.Text,{testID:"buoy-rq-mutation-detail-empty-description",style:styles.emptyDescription,children:o})]})}const styles=_reactNative.StyleSheet.create({explorerScrollContainer:{flex:1},explorerScrollContent:{paddingBottom:16,paddingHorizontal:8,flexGrow:1},section:{marginBottom:16},emptyState:{flex:1,justifyContent:"center",alignItems:"center",padding:32},emptyTitle:{color:_sharedUi.night.color.text,fontSize:18,fontWeight:"600",marginBottom:8,textAlign:"center"},emptyDescription:{color:_sharedUi.night.color.textSecondary,fontSize:14,textAlign:"center",lineHeight:20,maxWidth:280},actionFooter:{borderTopWidth:1,borderTopColor:_sharedUi.night.color.border,paddingVertical:8,paddingHorizontal:12,backgroundColor:"transparent",borderBottomLeftRadius:14,borderBottomRightRadius:14},actionsGrid:{flexDirection:"row",flexWrap:"wrap",gap:6,justifyContent:"space-between"},mutationExplorerContainer:{minWidth:200,backgroundColor:_sharedUi.night.color.surface,borderRadius:6,borderWidth:1,borderColor:_sharedUi.night.color.accent+"4D",overflow:"hidden",shadowColor:_sharedUi.night.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},mutationExplorerHeader:{backgroundColor:_sharedUi.night.color.accent+"1A",paddingHorizontal:12,paddingVertical:10,fontWeight:"600",fontSize:12,color:_sharedUi.night.color.accent,borderBottomWidth:1,borderBottomColor:_sharedUi.night.color.accent+"33",letterSpacing:.5,textTransform:"uppercase",fontFamily:_sharedUi.monoFont},mutationExplorerContent:{padding:8},dataContainer:{minWidth:200,backgroundColor:_sharedUi.night.color.surface,borderRadius:6,borderWidth:1,borderColor:_sharedUi.night.color.accent+"4D",overflow:"hidden",shadowColor:_sharedUi.night.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},dataHeader:{backgroundColor:_sharedUi.night.color.accent+"1A",paddingHorizontal:12,paddingVertical:10,fontWeight:"600",fontSize:12,color:_sharedUi.night.color.accent,borderBottomWidth:1,borderBottomColor:_sharedUi.night.color.accent+"33",letterSpacing:.5,textTransform:"uppercase",fontFamily:_sharedUi.monoFont},dataContent:{padding:8}});
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.QuerySelector=QuerySelector;var _reactNative=require("react-native");var _getQueryStatusColor=require("../utils/getQueryStatusColor");var _QueryDebugInfo=require("./QueryDebugInfo");var _jsxRuntime=require("react/jsx-runtime");function QuerySelector({queries:t,selectedQuery:i,isOpen:s,onClose:l,onSelect:n}){const a=e=>{return Array.isArray(e.queryKey)?e.queryKey.join(" - "):String(e.queryKey)};return(0,_jsxRuntime.jsx)(_reactNative.Modal,{accessibilityLabel:"Query selector",accessibilityHint:"View query selector","sentry-label":"ignore query selector",visible:s,transparent:true,animationType:"fade",onRequestClose:l,children:(0,_jsxRuntime.jsx)(_reactNative.Pressable,{accessibilityLabel:"Query selector overlay",accessibilityHint:"View query selector overlay","sentry-label":"ignore query selector overlay",style:styles.modalOverlay,onPress:l,children:(0,_jsxRuntime.jsxs)(_reactNative.View,{accessibilityLabel:"Query selector content",accessibilityHint:"View query selector content","sentry-label":"ignore query selector content",style:styles.modalContent,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.modalHeader,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.modalTitle,children:"Select Query"}),(0,_jsxRuntime.jsxs)(_reactNative.Text,{style:styles.modalSubtitle,children:[t.length," ",t.length===1?"query":"queries"," ","available"]})]}),(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{accessibilityLabel:"Query selector scroll view",accessibilityHint:"View query selector scroll view","sentry-label":"ignore query selector scroll view",style:styles.scrollView,contentContainerStyle:styles.scrollViewContent,showsVerticalScrollIndicator:true,children:t.length===0?(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.emptyState,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.emptyTitle,children:"No Queries Found"}),(0,_jsxRuntime.jsxs)(_reactNative.Text,{style:styles.emptyDescription,children:["No React Query queries are currently active.","\n\n","To see queries here:","\n","\u2022 Make API calls using useQuery","\n","\u2022 Ensure queries are within QueryClientProvider","\n","\u2022 Check console for debugging info"]}),(0,_jsxRuntime.jsx)(_QueryDebugInfo.QueryDebugInfo,{})]}):t.map((e,c)=>{const r=a(e);const u=(0,_getQueryStatusColor.getQueryStatusColor)({queryState:e.state,observerCount:e.getObserversCount(),isStale:e.isStale()});const y={blue:"#3B82F6",gray:"#6B7280",purple:"#8B5CF6",yellow:"#F59E0B",green:"#10B981",red:"#EF4444"};const d=y[u]||"#6B7280";const o=e===i;return(0,_jsxRuntime.jsxs)(_reactNative.TouchableOpacity,{accessibilityLabel:`Query ${r}`,accessibilityHint:`View query ${r}`,"sentry-label":`ignore query ${r}`,style:[styles.queryItem,o&&styles.selectedQueryItem],onPress:()=>n(e),children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.statusDot,{backgroundColor:d}]}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.queryText,o&&styles.selectedQueryText],numberOfLines:1,children:r})]},`${e.queryHash}-${c}`)})})]})})})}const styles=_reactNative.StyleSheet.create({modalOverlay:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.5)",justifyContent:"center",alignItems:"center"},modalContent:{backgroundColor:"#1F1F1F",borderRadius:8,width:"80%",maxHeight:"80%",minHeight:"50%",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.1)",flex:0},modalHeader:{padding:16,borderBottomWidth:1,borderBottomColor:"rgba(255, 255, 255, 0.1)"},modalTitle:{color:"#FFFFFF",fontSize:16,fontWeight:"600",marginBottom:4},modalSubtitle:{color:"#9CA3AF",fontSize:12},scrollView:{flex:1},scrollViewContent:{padding:8,flexGrow:1},emptyState:{padding:32,alignItems:"center",justifyContent:"center"},emptyTitle:{color:"#E5E7EB",fontSize:16,fontWeight:"500",marginBottom:8,textAlign:"center"},emptyDescription:{color:"#9CA3AF",fontSize:14,textAlign:"center",lineHeight:20},queryItem:{flexDirection:"row",alignItems:"center",padding:8,borderRadius:4},selectedQueryItem:{backgroundColor:"rgba(255, 255, 255, 0.1)"},statusDot:{width:8,height:8,borderRadius:4,marginRight:8},queryText:{color:"#E5E7EB",fontSize:14,flex:1},selectedQueryText:{color:"#FFFFFF",fontWeight:"500"},trigger:{flexDirection:"row",alignItems:"center",backgroundColor:"rgba(255, 255, 255, 0.05)",borderRadius:4,paddingHorizontal:8,paddingVertical:6,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.1)",minWidth:120,maxWidth:200},triggerText:{color:"#E5E7EB",fontSize:12,flex:1,marginHorizontal:6}});
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.QuerySelector=QuerySelector;var _reactNative=require("react-native");var _getQueryStatusColor=require("../utils/getQueryStatusColor");var _QueryDebugInfo=require("./QueryDebugInfo");var _jsxRuntime=require("react/jsx-runtime");function QuerySelector({queries:t,selectedQuery:i,isOpen:s,onClose:l,onSelect:n}){const a=e=>{return Array.isArray(e.queryKey)?e.queryKey.join(" - "):String(e.queryKey)};return(0,_jsxRuntime.jsx)(_reactNative.Modal,{accessibilityLabel:"Query selector",accessibilityHint:"View query selector","sentry-label":"ignore query selector",visible:s,transparent:true,animationType:"fade",onRequestClose:l,children:(0,_jsxRuntime.jsx)(_reactNative.Pressable,{accessibilityLabel:"Query selector overlay",accessibilityHint:"View query selector overlay","sentry-label":"ignore query selector overlay",style:styles.modalOverlay,onPress:l,children:(0,_jsxRuntime.jsxs)(_reactNative.View,{accessibilityLabel:"Query selector content",accessibilityHint:"View query selector content","sentry-label":"ignore query selector content",style:styles.modalContent,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.modalHeader,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.modalTitle,children:"Select Query"}),(0,_jsxRuntime.jsxs)(_reactNative.Text,{style:styles.modalSubtitle,children:[t.length," ",t.length===1?"query":"queries"," ","available"]})]}),(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{keyboardShouldPersistTaps:"handled",accessibilityLabel:"Query selector scroll view",accessibilityHint:"View query selector scroll view","sentry-label":"ignore query selector scroll view",style:styles.scrollView,contentContainerStyle:styles.scrollViewContent,showsVerticalScrollIndicator:true,children:t.length===0?(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.emptyState,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.emptyTitle,children:"No Queries Found"}),(0,_jsxRuntime.jsxs)(_reactNative.Text,{style:styles.emptyDescription,children:["No React Query queries are currently active.","\n\n","To see queries here:","\n","\u2022 Make API calls using useQuery","\n","\u2022 Ensure queries are within QueryClientProvider","\n","\u2022 Check console for debugging info"]}),(0,_jsxRuntime.jsx)(_QueryDebugInfo.QueryDebugInfo,{})]}):t.map((e,c)=>{const r=a(e);const u=(0,_getQueryStatusColor.getQueryStatusColor)({queryState:e.state,observerCount:e.getObserversCount(),isStale:e.isStale()});const y={blue:"#3B82F6",gray:"#6B7280",purple:"#8B5CF6",yellow:"#F59E0B",green:"#10B981",red:"#EF4444"};const d=y[u]||"#6B7280";const o=e===i;return(0,_jsxRuntime.jsxs)(_reactNative.TouchableOpacity,{accessibilityLabel:`Query ${r}`,accessibilityHint:`View query ${r}`,"sentry-label":`ignore query ${r}`,style:[styles.queryItem,o&&styles.selectedQueryItem],onPress:()=>n(e),children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.statusDot,{backgroundColor:d}]}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.queryText,o&&styles.selectedQueryText],numberOfLines:1,children:r})]},`${e.queryHash}-${c}`)})})]})})})}const styles=_reactNative.StyleSheet.create({modalOverlay:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.5)",justifyContent:"center",alignItems:"center"},modalContent:{backgroundColor:"#1F1F1F",borderRadius:8,width:"80%",maxHeight:"80%",minHeight:"50%",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.1)",flex:0},modalHeader:{padding:16,borderBottomWidth:1,borderBottomColor:"rgba(255, 255, 255, 0.1)"},modalTitle:{color:"#FFFFFF",fontSize:16,fontWeight:"600",marginBottom:4},modalSubtitle:{color:"#9CA3AF",fontSize:12},scrollView:{flex:1},scrollViewContent:{padding:8,flexGrow:1},emptyState:{padding:32,alignItems:"center",justifyContent:"center"},emptyTitle:{color:"#E5E7EB",fontSize:16,fontWeight:"500",marginBottom:8,textAlign:"center"},emptyDescription:{color:"#9CA3AF",fontSize:14,textAlign:"center",lineHeight:20},queryItem:{flexDirection:"row",alignItems:"center",padding:8,borderRadius:4},selectedQueryItem:{backgroundColor:"rgba(255, 255, 255, 0.1)"},statusDot:{width:8,height:8,borderRadius:4,marginRight:8},queryText:{color:"#E5E7EB",fontSize:14,flex:1},selectedQueryText:{color:"#FFFFFF",fontWeight:"500"},trigger:{flexDirection:"row",alignItems:"center",backgroundColor:"rgba(255, 255, 255, 0.05)",borderRadius:4,paddingHorizontal:8,paddingVertical:6,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.1)",minWidth:120,maxWidth:200},triggerText:{color:"#E5E7EB",fontSize:12,flex:1,marginHorizontal:6}});
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.WifiToggle=WifiToggle;var _reactNative=require("react-native");var _sharedUi=require("@buoy-gg/shared-ui");var _useWifiState=require("../hooks/useWifiState");var _jsxRuntime=require("react/jsx-runtime");function WifiToggle({size:i=16,testID:t}){const{isOnline:e,handleWifiToggle:r}=(0,_useWifiState.useWifiState)();return(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{"sentry-label":`ignore toggle WiFi ${e?"On":"Off"}`,testID:t,accessibilityRole:"button",accessibilityLabel:`WiFi ${e?"On":"Off"}`,accessibilityHint:`Tap to turn WiFi ${e?"off":"on"} for React Query`,onPress:r,hitSlop:{top:10,bottom:10,left:10,right:10},activeOpacity:.7,style:{alignItems:"center",justifyContent:"center",width:14,flexShrink:0},children:e?(0,_jsxRuntime.jsx)(_sharedUi.Wifi,{size:i,color:"#10B981"}):(0,_jsxRuntime.jsx)(_sharedUi.Wifi,{size:i,color:"#DC2626"})})}
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.WifiToggle=WifiToggle;var _reactNative=require("react-native");var _sharedUi=require("@buoy-gg/shared-ui");var _useWifiState=require("../hooks/useWifiState");var _jsxRuntime=require("react/jsx-runtime");function WifiToggle({size:i=16,testID:t}){const{isOnline:e,handleWifiToggle:r}=(0,_useWifiState.useWifiState)();return(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{"sentry-label":`ignore toggle WiFi ${e?"On":"Off"}`,testID:t,accessibilityRole:"switch",accessibilityLabel:"WiFi",accessibilityState:{checked:e},accessibilityHint:e?"Turn off to test offline mode":"Turn on to go back online",onPress:r,hitSlop:{top:10,bottom:10,left:10,right:10},activeOpacity:.7,style:{alignItems:"center",justifyContent:"center",width:14,flexShrink:0},children:e?(0,_jsxRuntime.jsx)(_sharedUi.Wifi,{size:i,color:"#10B981"}):(0,_jsxRuntime.jsx)(_sharedUi.Wifi,{size:i,color:"#DC2626"})})}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=MutationInformation;var _Explorer=_interopRequireDefault(require("./Explorer"));var _reactNative=require("react-native");var _MutationDetails=_interopRequireDefault(require("./MutationDetails"));var _sharedUi=require("@buoy-gg/shared-ui");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function MutationInformation({selectedMutation:e}){return(0,_jsxRuntime.jsxs)(_reactNative.ScrollView,{"sentry-label":"ignore devtools mutation information scroll",style:styles.flex1,contentContainerStyle:styles.scrollContent,children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.section,children:(0,_jsxRuntime.jsx)(_MutationDetails.default,{selectedMutation:e})}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.section,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.textHeader,children:"Variables Details"}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.padding,children:(0,_jsxRuntime.jsx)(_Explorer.default,{label:"Variables",value:e?.state.variables,defaultExpanded:["Variables"]})})]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.section,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.textHeader,children:"Context Details"}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.padding,children:(0,_jsxRuntime.jsx)(_Explorer.default,{label:"Context",value:e?.state.context,defaultExpanded:["Context"]})})]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.section,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.textHeader,children:"Data Explorer"}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.padding,children:(0,_jsxRuntime.jsx)(_Explorer.default,{label:"Data",defaultExpanded:["Data"],value:e?.state.data})})]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.section,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.textHeader,children:"Mutations Explorer"}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.padding,children:(0,_jsxRuntime.jsx)(_Explorer.default,{label:"Mutation",defaultExpanded:["Mutation"],value:e})})]})]})}const styles=_reactNative.StyleSheet.create({flex1:{flex:1,backgroundColor:"transparent"},scrollContent:{paddingBottom:16,paddingHorizontal:8},section:{marginBottom:16},textHeader:{textAlign:"left",backgroundColor:_sharedUi.night.color.accent+"15",padding:12,fontSize:12,fontWeight:"700",color:_sharedUi.night.color.accent,borderTopLeftRadius:8,borderTopRightRadius:8,borderBottomWidth:1,borderBottomColor:_sharedUi.night.color.accent+"33",fontFamily:_sharedUi.monoFont,letterSpacing:1,textTransform:"uppercase"},padding:{padding:12,backgroundColor:_sharedUi.night.color.surface,borderBottomLeftRadius:8,borderBottomRightRadius:8,borderWidth:1,borderColor:_sharedUi.night.color.border,borderTopWidth:0}});
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=MutationInformation;var _Explorer=_interopRequireDefault(require("./Explorer"));var _reactNative=require("react-native");var _MutationDetails=_interopRequireDefault(require("./MutationDetails"));var _sharedUi=require("@buoy-gg/shared-ui");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function MutationInformation({selectedMutation:e}){return(0,_jsxRuntime.jsxs)(_reactNative.ScrollView,{keyboardShouldPersistTaps:"handled","sentry-label":"ignore devtools mutation information scroll",style:styles.flex1,contentContainerStyle:styles.scrollContent,children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.section,children:(0,_jsxRuntime.jsx)(_MutationDetails.default,{selectedMutation:e})}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.section,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.textHeader,children:"Variables Details"}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.padding,children:(0,_jsxRuntime.jsx)(_Explorer.default,{label:"Variables",value:e?.state.variables,defaultExpanded:["Variables"]})})]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.section,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.textHeader,children:"Context Details"}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.padding,children:(0,_jsxRuntime.jsx)(_Explorer.default,{label:"Context",value:e?.state.context,defaultExpanded:["Context"]})})]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.section,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.textHeader,children:"Data Explorer"}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.padding,children:(0,_jsxRuntime.jsx)(_Explorer.default,{label:"Data",defaultExpanded:["Data"],value:e?.state.data})})]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.section,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.textHeader,children:"Mutations Explorer"}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.padding,children:(0,_jsxRuntime.jsx)(_Explorer.default,{label:"Mutation",defaultExpanded:["Mutation"],value:e})})]})]})}const styles=_reactNative.StyleSheet.create({flex1:{flex:1,backgroundColor:"transparent"},scrollContent:{paddingBottom:16,paddingHorizontal:8},section:{marginBottom:16},textHeader:{textAlign:"left",backgroundColor:_sharedUi.night.color.accent+"15",padding:12,fontSize:12,fontWeight:"700",color:_sharedUi.night.color.accent,borderTopLeftRadius:8,borderTopRightRadius:8,borderBottomWidth:1,borderBottomColor:_sharedUi.night.color.accent+"33",fontFamily:_sharedUi.monoFont,letterSpacing:1,textTransform:"uppercase"},padding:{padding:12,backgroundColor:_sharedUi.night.color.surface,borderBottomLeftRadius:8,borderBottomRightRadius:8,borderWidth:1,borderColor:_sharedUi.night.color.border,borderTopWidth:0}});
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=MutationsList;var _react=require("react");var _reactNative=require("react-native");var _MutationButton=_interopRequireDefault(require("./MutationButton"));var _MutationInformation=_interopRequireDefault(require("./MutationInformation"));var _useAllMutations=_interopRequireDefault(require("../../hooks/useAllMutations"));var _sharedUi=require("@buoy-gg/shared-ui");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}function MutationsList({selectedMutation:r,setSelectedMutation:f,activeFilter:o,hideInfoPanel:b=false,contentContainerStyle:x,searchText:u=""}){const{mutations:h}=(0,_useAllMutations.default)();const C=t=>{if(t.state.isPaused)return"paused";const e=t.state.status;return e};const g=(0,_react.useMemo)(()=>{let t=h;if(o){t=t.filter(e=>{const n=C(e);return n===o})}if(u){const e=u.toLowerCase();t=t.filter(n=>{const s=n.options.mutationKey;if(!s)return false;const w=Array.isArray(s)?s:[s];const R=w.filter(c=>c!=null).map(c=>String(c)).join(" ").toLowerCase();return R.includes(e)})}return t},[h,o,u]);const m=_reactNative.Dimensions.get("window").height;const l=m*.4;const p=150;const y=m*.7;const a=(0,_react.useRef)(new _reactNative.Animated.Value(l)).current;const[,d]=(0,_react.useState)(l);const i=(0,_react.useRef)(l);const M=(0,_react.useRef)(_reactNative.PanResponder.create({onMoveShouldSetPanResponder:(t,e)=>{return Math.abs(e.dy)>Math.abs(e.dx)&&Math.abs(e.dy)>10},onPanResponderGrant:()=>{a.stopAnimation(t=>{d(t);i.current=t;a.setValue(t)})},onPanResponderMove:(t,e)=>{const n=i.current-e.dy;const s=Math.max(p,Math.min(y,n));a.setValue(s)},onPanResponderRelease:(t,e)=>{const n=Math.max(p,Math.min(y,i.current-e.dy));d(n);i.current=n;_reactNative.Animated.timing(a,{toValue:n,duration:200,useNativeDriver:false}).start(()=>{a.setValue(n);d(n);i.current=n})}})).current;const I=(0,_react.useCallback)(({item:t})=>(0,_jsxRuntime.jsx)(_MutationButton.default,{selected:r,setSelectedMutation:f,mutation:t}),[r,f]);return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.container,children:[g.length>0?(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.listWrapper,children:(0,_jsxRuntime.jsx)(_reactNative.FlatList,{"sentry-label":"ignore devtools mutations list",testID:"buoy-rq-mutation-list",data:g,renderItem:I,keyExtractor:(t,e)=>`${t.mutationId}-${t.state.submittedAt}-${t.state.status}-${e}`,inverted:true,showsVerticalScrollIndicator:true,removeClippedSubviews:!(typeof process!=="undefined"&&process.env?.EXPO_PUBLIC_E2E),contentContainerStyle:x||styles.listContent,initialNumToRender:10,maxToRenderPerBatch:10,windowSize:10,scrollEnabled:false})}):(0,_jsxRuntime.jsx)(_sharedUi.ToolEmptyState,{testID:"buoy-rq-mutations-empty",otto:o?"filtering":"scanning",title:"No mutations found",message:o?`No ${o} mutations. Pick another status to see the rest.`:"Mutations run through useMutation will appear here."}),r&&!b&&(0,_jsxRuntime.jsxs)(_reactNative.Animated.View,{style:[styles.mutationInfo,{height:a}],children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.dragHandle,...M.panHandlers,children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.dragIndicator})}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.mutationInfoContent,children:(0,_jsxRuntime.jsx)(_MutationInformation.default,{selectedMutation:r})})]})]})}const styles=_reactNative.StyleSheet.create({container:{flex:1,backgroundColor:"transparent"},listWrapper:{flex:1},listContent:{backgroundColor:"transparent",paddingHorizontal:8,paddingTop:8},mutationInfo:{borderTopWidth:1,borderTopColor:_sharedUi.night.color.border,backgroundColor:"transparent"},dragHandle:{height:20,justifyContent:"center",alignItems:"center",backgroundColor:_sharedUi.night.color.surface,borderBottomWidth:1,borderBottomColor:_sharedUi.night.color.border},dragIndicator:{width:40,height:4,backgroundColor:_sharedUi.night.color.placeholder,borderRadius:2},mutationInfoContent:{flex:1,backgroundColor:"transparent"},emptyContainer:{flex:1,justifyContent:"center",alignItems:"center",padding:32,backgroundColor:_sharedUi.night.color.surface,margin:16,borderRadius:8,borderWidth:1,borderColor:_sharedUi.night.color.border},emptyText:{color:_sharedUi.night.color.textTertiary,fontSize:14,textAlign:"center",fontFamily:_sharedUi.monoFont,letterSpacing:.5}});
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=MutationsList;var _react=require("react");var _reactNative=require("react-native");var _MutationButton=_interopRequireDefault(require("./MutationButton"));var _MutationInformation=_interopRequireDefault(require("./MutationInformation"));var _useAllMutations=_interopRequireDefault(require("../../hooks/useAllMutations"));var _sharedUi=require("@buoy-gg/shared-ui");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}function MutationsList({selectedMutation:r,setSelectedMutation:h,activeFilter:o,hideInfoPanel:b=false,contentContainerStyle:x,searchText:u=""}){const{mutations:f}=(0,_useAllMutations.default)();const C=t=>{if(t.state.isPaused)return"paused";const e=t.state.status;return e};const g=(0,_react.useMemo)(()=>{let t=f;if(o){t=t.filter(e=>{const n=C(e);return n===o})}if(u){const e=u.toLowerCase();t=t.filter(n=>{const s=n.options.mutationKey;if(!s)return false;const w=Array.isArray(s)?s:[s];const R=w.filter(c=>c!=null).map(c=>String(c)).join(" ").toLowerCase();return R.includes(e)})}return t},[f,o,u]);const m=_reactNative.Dimensions.get("window").height;const l=m*.4;const p=150;const y=m*.7;const a=(0,_react.useRef)(new _reactNative.Animated.Value(l)).current;const[,d]=(0,_react.useState)(l);const i=(0,_react.useRef)(l);const M=(0,_react.useRef)(_reactNative.PanResponder.create({onMoveShouldSetPanResponder:(t,e)=>{return Math.abs(e.dy)>Math.abs(e.dx)&&Math.abs(e.dy)>10},onPanResponderGrant:()=>{a.stopAnimation(t=>{d(t);i.current=t;a.setValue(t)})},onPanResponderMove:(t,e)=>{const n=i.current-e.dy;const s=Math.max(p,Math.min(y,n));a.setValue(s)},onPanResponderRelease:(t,e)=>{const n=Math.max(p,Math.min(y,i.current-e.dy));d(n);i.current=n;_reactNative.Animated.timing(a,{toValue:n,duration:200,useNativeDriver:false}).start(()=>{a.setValue(n);d(n);i.current=n})}})).current;const I=(0,_react.useCallback)(({item:t})=>(0,_jsxRuntime.jsx)(_MutationButton.default,{selected:r,setSelectedMutation:h,mutation:t}),[r,h]);return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.container,children:[g.length>0?(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.listWrapper,children:(0,_jsxRuntime.jsx)(_reactNative.FlatList,{keyboardShouldPersistTaps:"handled","sentry-label":"ignore devtools mutations list",testID:"buoy-rq-mutation-list",data:g,renderItem:I,keyExtractor:(t,e)=>`${t.mutationId}-${t.state.submittedAt}-${t.state.status}-${e}`,inverted:true,showsVerticalScrollIndicator:true,removeClippedSubviews:!(typeof process!=="undefined"&&process.env?.EXPO_PUBLIC_E2E),contentContainerStyle:x||styles.listContent,initialNumToRender:10,maxToRenderPerBatch:10,windowSize:10,scrollEnabled:false})}):(0,_jsxRuntime.jsx)(_sharedUi.ToolEmptyState,{testID:"buoy-rq-mutations-empty",otto:o?"filtering":"scanning",title:"No mutations found",message:o?`No ${o} mutations. Pick another status to see the rest.`:"Mutations run through useMutation will appear here."}),r&&!b&&(0,_jsxRuntime.jsxs)(_reactNative.Animated.View,{style:[styles.mutationInfo,{height:a}],children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.dragHandle,...M.panHandlers,children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.dragIndicator})}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.mutationInfoContent,children:(0,_jsxRuntime.jsx)(_MutationInformation.default,{selectedMutation:r})})]})]})}const styles=_reactNative.StyleSheet.create({container:{flex:1,backgroundColor:"transparent"},listWrapper:{flex:1},listContent:{backgroundColor:"transparent",paddingHorizontal:8,paddingTop:8},mutationInfo:{borderTopWidth:1,borderTopColor:_sharedUi.night.color.border,backgroundColor:"transparent"},dragHandle:{height:20,justifyContent:"center",alignItems:"center",backgroundColor:_sharedUi.night.color.surface,borderBottomWidth:1,borderBottomColor:_sharedUi.night.color.border},dragIndicator:{width:40,height:4,backgroundColor:_sharedUi.night.color.placeholder,borderRadius:2},mutationInfoContent:{flex:1,backgroundColor:"transparent"},emptyContainer:{flex:1,justifyContent:"center",alignItems:"center",padding:32,backgroundColor:_sharedUi.night.color.surface,margin:16,borderRadius:8,borderWidth:1,borderColor:_sharedUi.night.color.border},emptyText:{color:_sharedUi.night.color.textTertiary,fontSize:14,textAlign:"center",fontFamily:_sharedUi.monoFont,letterSpacing:.5}});
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=QueryBrowser;var _react=require("react");var _reactNative=require("react-native");var _QueryRow=_interopRequireDefault(require("./QueryRow"));var _useAllQueries=_interopRequireDefault(require("../../hooks/useAllQueries"));var _getQueryStatusLabel=require("../../utils/getQueryStatusLabel");var _sharedUi=require("@buoy-gg/shared-ui");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}function QueryBrowser({selectedQuery:r,onQuerySelect:u,activeFilter:a,emptyStateMessage:S,emptyState:m,contentContainerStyle:g,queries:p,searchText:i="",ignoredPatterns:l=new Set,includedPatterns:y=new Set}){const q=(0,_useAllQueries.default)();const f=p??q;const d=(0,_react.useMemo)(()=>{let e=f;if(a){e=e.filter(t=>{const o=(0,_getQueryStatusLabel.getQueryStatusLabel)(t);return o===a})}if(i){const t=i.toLowerCase();e=e.filter(o=>{if(!o?.queryKey)return false;const n=Array.isArray(o.queryKey)?o.queryKey:[o.queryKey];const s=n.filter(c=>c!=null).map(c=>String(c)).join(" ").toLowerCase();return s.includes(t)})}if(y.size>0){e=e.filter(t=>{if(!t?.queryKey)return false;const o=Array.isArray(t.queryKey)?t.queryKey:[t.queryKey];const n=o.filter(s=>s!=null).map(s=>String(s)).join(" ").toLowerCase();return Array.from(y).some(s=>n.includes(s.toLowerCase()))})}if(l.size>0){e=e.filter(t=>{if(!t?.queryKey)return true;const o=Array.isArray(t.queryKey)?t.queryKey:[t.queryKey];const n=o.filter(s=>s!=null).map(s=>String(s)).join(" ").toLowerCase();return!Array.from(l).some(s=>n.includes(s.toLowerCase()))})}e.sort((t,o)=>{const n=t.state.dataUpdatedAt||0;const s=o.state.dataUpdatedAt||0;return s-n});return e},[f,a,i,y,l]);const h=(0,_react.useCallback)(e=>{const t=r?.queryHash===e.queryHash;if(t){u(void 0);return}u(e)},[r?.queryHash,u]);if(d.length===0){return(0,_jsxRuntime.jsx)(_sharedUi.ToolEmptyState,{testID:"buoy-rq-empty",...m??{otto:"empty",title:"No queries found",message:S||(a?`No ${a} queries found`:"No queries found")}})}return(0,_jsxRuntime.jsx)(_reactNative.FlatList,{testID:"buoy-rq-query-list",style:styles.listWrapper,contentContainerStyle:g||styles.listContent,data:d,keyExtractor:queryKeyExtractor,renderItem:({item:e})=>(0,_jsxRuntime.jsx)(_QueryRow.default,{query:e,stateSig:computeQueryStateSig(e),isSelected:r?.queryHash===e.queryHash,onSelect:h}),showsVerticalScrollIndicator:true,..._sharedUi.EVENT_LIST_PRESET})}const queryKeyExtractor=r=>r.queryHash;function computeQueryStateSig(r){let u=0;let a=false;try{u=r.getObserversCount();a=r.isStale()}catch{}return`${r.state.dataUpdatedAt}|${r.state.fetchStatus}|${r.state.status}|${u}|${a}`}const styles=_reactNative.StyleSheet.create({listWrapper:{flexGrow:1},listContent:{paddingBottom:16,backgroundColor:"transparent"},emptyContainer:{flex:1,justifyContent:"center",alignItems:"center",padding:32,backgroundColor:_sharedUi.night.color.surface,margin:16,borderRadius:8,borderWidth:1,borderColor:_sharedUi.night.color.border},emptyText:{color:_sharedUi.night.color.textTertiary,fontSize:14,textAlign:"center",fontFamily:_sharedUi.monoFont,letterSpacing:.5}});
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=QueryBrowser;var _react=require("react");var _reactNative=require("react-native");var _QueryRow=_interopRequireDefault(require("./QueryRow"));var _useAllQueries=_interopRequireDefault(require("../../hooks/useAllQueries"));var _getQueryStatusLabel=require("../../utils/getQueryStatusLabel");var _sharedUi=require("@buoy-gg/shared-ui");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}function QueryBrowser({selectedQuery:r,onQuerySelect:u,activeFilter:a,emptyStateMessage:S,emptyState:m,contentContainerStyle:g,queries:p,searchText:i="",ignoredPatterns:l=new Set,includedPatterns:y=new Set}){const h=(0,_useAllQueries.default)();const f=p??h;const d=(0,_react.useMemo)(()=>{let e=f;if(a){e=e.filter(t=>{const o=(0,_getQueryStatusLabel.getQueryStatusLabel)(t);return o===a})}if(i){const t=i.toLowerCase();e=e.filter(o=>{if(!o?.queryKey)return false;const n=Array.isArray(o.queryKey)?o.queryKey:[o.queryKey];const s=n.filter(c=>c!=null).map(c=>String(c)).join(" ").toLowerCase();return s.includes(t)})}if(y.size>0){e=e.filter(t=>{if(!t?.queryKey)return false;const o=Array.isArray(t.queryKey)?t.queryKey:[t.queryKey];const n=o.filter(s=>s!=null).map(s=>String(s)).join(" ").toLowerCase();return Array.from(y).some(s=>n.includes(s.toLowerCase()))})}if(l.size>0){e=e.filter(t=>{if(!t?.queryKey)return true;const o=Array.isArray(t.queryKey)?t.queryKey:[t.queryKey];const n=o.filter(s=>s!=null).map(s=>String(s)).join(" ").toLowerCase();return!Array.from(l).some(s=>n.includes(s.toLowerCase()))})}e.sort((t,o)=>{const n=t.state.dataUpdatedAt||0;const s=o.state.dataUpdatedAt||0;return s-n});return e},[f,a,i,y,l]);const q=(0,_react.useCallback)(e=>{const t=r?.queryHash===e.queryHash;if(t){u(void 0);return}u(e)},[r?.queryHash,u]);if(d.length===0){return(0,_jsxRuntime.jsx)(_sharedUi.ToolEmptyState,{testID:"buoy-rq-empty",...m??{otto:"empty",title:"No queries found",message:S||(a?`No ${a} queries found`:"No queries found")}})}return(0,_jsxRuntime.jsx)(_reactNative.FlatList,{keyboardShouldPersistTaps:"handled",testID:"buoy-rq-query-list",style:styles.listWrapper,contentContainerStyle:g||styles.listContent,data:d,keyExtractor:queryKeyExtractor,renderItem:({item:e})=>(0,_jsxRuntime.jsx)(_QueryRow.default,{query:e,stateSig:computeQueryStateSig(e),isSelected:r?.queryHash===e.queryHash,onSelect:q}),showsVerticalScrollIndicator:true,..._sharedUi.EVENT_LIST_PRESET})}const queryKeyExtractor=r=>r.queryHash;function computeQueryStateSig(r){let u=0;let a=false;try{u=r.getObserversCount();a=r.isStale()}catch{}return`${r.state.dataUpdatedAt}|${r.state.fetchStatus}|${r.state.status}|${u}|${a}`}const styles=_reactNative.StyleSheet.create({listWrapper:{flexGrow:1},listContent:{paddingBottom:16,backgroundColor:"transparent"},emptyContainer:{flex:1,justifyContent:"center",alignItems:"center",padding:32,backgroundColor:_sharedUi.night.color.surface,margin:16,borderRadius:8,borderWidth:1,borderColor:_sharedUi.night.color.border},emptyText:{color:_sharedUi.night.color.textTertiary,fontSize:14,textAlign:"center",fontFamily:_sharedUi.monoFont,letterSpacing:.5}});
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=QueryInformation;var _QueryDetails=_interopRequireDefault(require("./QueryDetails"));var _QueryActions=_interopRequireDefault(require("./QueryActions"));var _Explorer=_interopRequireDefault(require("./Explorer"));var _reactNative=require("react-native");var _sharedUi=require("@buoy-gg/shared-ui");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function QueryInformation({selectedQuery:e,setSelectedQuery:t}){return(0,_jsxRuntime.jsxs)(_reactNative.ScrollView,{"sentry-label":"ignore devtools query info scroll",style:styles.flexOne,contentContainerStyle:styles.scrollContent,children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.section,children:(0,_jsxRuntime.jsx)(_QueryDetails.default,{query:e})}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.section,children:(0,_jsxRuntime.jsx)(_QueryActions.default,{query:e,setSelectedQuery:t})}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.section,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.headerText,children:"Data Explorer"}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.contentView,children:(0,_jsxRuntime.jsx)(_Explorer.default,{editable:true,label:"Data",value:e?.state.data,defaultExpanded:["Data"],activeQuery:e})})]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.section,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.headerText,children:"Query Explorer"}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.contentView,children:(0,_jsxRuntime.jsx)(_Explorer.default,{label:"Query",value:e,defaultExpanded:["Query","queryKey"],activeQuery:e})})]})]})}const styles=_reactNative.StyleSheet.create({flexOne:{flex:1,backgroundColor:"transparent"},scrollContent:{paddingBottom:16,paddingHorizontal:8},section:{marginBottom:16},headerText:{fontSize:16,fontWeight:"600",color:_sharedUi.night.color.text,marginBottom:8,textAlign:"left"},contentView:{backgroundColor:_sharedUi.night.color.surface,borderRadius:12,borderWidth:1,borderColor:_sharedUi.night.color.border,padding:16}});
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=QueryInformation;var _QueryDetails=_interopRequireDefault(require("./QueryDetails"));var _QueryActions=_interopRequireDefault(require("./QueryActions"));var _Explorer=_interopRequireDefault(require("./Explorer"));var _reactNative=require("react-native");var _sharedUi=require("@buoy-gg/shared-ui");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function QueryInformation({selectedQuery:e,setSelectedQuery:t}){return(0,_jsxRuntime.jsxs)(_reactNative.ScrollView,{keyboardShouldPersistTaps:"handled","sentry-label":"ignore devtools query info scroll",style:styles.flexOne,contentContainerStyle:styles.scrollContent,children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.section,children:(0,_jsxRuntime.jsx)(_QueryDetails.default,{query:e})}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.section,children:(0,_jsxRuntime.jsx)(_QueryActions.default,{query:e,setSelectedQuery:t})}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.section,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.headerText,children:"Data Explorer"}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.contentView,children:(0,_jsxRuntime.jsx)(_Explorer.default,{editable:true,label:"Data",value:e?.state.data,defaultExpanded:["Data"],activeQuery:e})})]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.section,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.headerText,children:"Query Explorer"}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.contentView,children:(0,_jsxRuntime.jsx)(_Explorer.default,{label:"Query",value:e,defaultExpanded:["Query","queryKey"],activeQuery:e})})]})]})}const styles=_reactNative.StyleSheet.create({flexOne:{flex:1,backgroundColor:"transparent"},scrollContent:{paddingBottom:16,paddingHorizontal:8},section:{marginBottom:16},headerText:{fontSize:16,fontWeight:"600",color:_sharedUi.night.color.text,marginBottom:8,textAlign:"left"},contentView:{backgroundColor:_sharedUi.night.color.surface,borderRadius:12,borderWidth:1,borderColor:_sharedUi.night.color.border,padding:16}});
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.createReactQuerySyncAdapter=createReactQuerySyncAdapter;var _sharedUi=require("@buoy-gg/shared-ui");var _reactQuery=require("@tanstack/react-query");var _dehydrate=require("./dehydrate");var _getQueryStatusLabel=require("../utils/getQueryStatusLabel");function touchesList(r,s){let t=r;for(const e of s.split(".")){if(!t||typeof t!=="object"||Array.isArray(t))return false;if(!(e in t))return false;t=t[e]}return Array.isArray(t)?t.length>0:!!t&&typeof t==="object"}const isPlainObject=r=>!!r&&typeof r==="object"&&!Array.isArray(r);function shapeKind(r){if(Array.isArray(r))return"array";if(r===null)return"null";if(typeof r==="object")return"object";return typeof r}function deepMerge(r,s,t="",e={shrunk:[],breaks:[]}){if(Array.isArray(r)&&Array.isArray(s)){if(s.length>0&&s.length<r.length){e.shrunk.push({path:t||"(root)",have:r.length,sent:s.length})}return s}if(!isPlainObject(r)||!isPlainObject(s))return s;const a={...r};for(const[n,u]of Object.entries(s)){const c=t?`${t}.${n}`:n;if(n in r){const d=shapeKind(r[n]);const h=shapeKind(u);if((d==="array"||d==="object")&&d!==h){e.breaks.push({path:c,from:d,to:h})}a[n]=deepMerge(r[n],u,c,e)}else{a[n]=u}}return a}function looseKeyParts(r){const s=r.trim();try{const t=JSON.parse(s);if(Array.isArray(t)){return t.map(e=>typeof e==="object"&&e!==null?JSON.stringify(e):String(e))}}catch{}if(s.includes(",")&&!s.startsWith("[")){return s.split(",").map(t=>t.trim().replace(/^["']|["']$/g,""))}return null}function refetchIntervalOf(r){let s;for(const t of r.observers??[]){const e=t.options?.refetchInterval;let a=e;if(typeof e==="function"){try{a=e(r)}catch{a=void 0}}if(typeof a==="number"&&a>0)s=s===void 0?a:Math.min(s,a)}return s}function createReactQuerySyncAdapter(r){const s=t=>{const{queryHash:e}=t;const a=r.getQueryCache();let n=e?a.get(e):void 0;if(!n&&typeof e==="string"){const u=looseKeyParts(e);if(u){n=a.getAll().find(c=>{const d=c.queryKey.map(h=>typeof h==="object"?JSON.stringify(h):String(h));return d.length===u.length&&d.every((h,f)=>h===u[f])})}}if(!n){throw new Error(`Query with hash "${e}" not found`)}return n};return{version:2,getSnapshot:()=>({dehydratedState:(0,_dehydrate.dehydrateQueryClient)(r),isOnlineManagerOnline:_reactQuery.onlineManager.isOnline()}),subscribe:t=>{const e=r.getQueryCache().subscribe(t);const a=r.getMutationCache().subscribe(t);const n=_reactQuery.onlineManager.subscribe(t);return()=>{e();a();n()}},actions:{getQueryData:t=>{const{queryHash:e,path:a}=t??{};if(!e)return{found:false,reason:"missing queryHash"};const n=r.getQueryCache().get(e);if(!n)return{found:false,reason:"unknown queryHash"};if(a){const c=(0,_sharedUi.readPath)(n.state.data,a);if(!c.ok)return{found:false,reason:c.error};return{found:true,queryHash:e,path:a,shape:(0,_sharedUi.shapeSummary)(c.value),data:c.value}}if(n.state.data===void 0){const c=n.state.status;const d=n.state.error;return{found:true,queryHash:e,hasData:false,status:c,fetchStatus:n.state.fetchStatus,...d?{error:d instanceof Error?d.message:String(d)}:{},reason:c==="error"?"This query has no data because it FAILED. Report the error, not an empty result.":n.state.fetchStatus==="fetching"?"No data yet \u2014 this query is still fetching.":"This query has never resolved (it may be disabled, or never enabled). It is not empty \u2014 it has nothing."}}const u=(0,_sharedUi.shapeSummary)(n.state.data);return{found:true,queryHash:e,hasData:true,...u?{shape:u}:{},data:(0,_dehydrate.capQueryDetail)(n.state.data)}},listQueries:t=>{const{includeData:e=false,staleOnly:a=false,limit:n}=t??{};const u=r.getQueryCache().getAll();const c=a?u.filter(o=>o.isStale()):u;const d=[...c].sort((o,y)=>{const g=Number(y.getObserversCount()>0)-Number(o.getObserversCount()>0);return g!==0?g:(y.state.dataUpdatedAt??0)-(o.state.dataUpdatedAt??0)});const h=typeof n==="number"&&n>0?d.slice(0,n):d;const f=h.map(o=>{const y=o.state.error;const g=refetchIntervalOf(o);return{queryHash:o.queryHash,queryKey:o.queryKey,status:(0,_getQueryStatusLabel.getQueryStatusLabel)(o),fetchStatus:o.state.fetchStatus,isStale:o.isStale(),observers:o.getObserversCount(),updatedAt:o.state.dataUpdatedAt,...g?{refetchEveryMs:g}:{},error:y?y.message??String(y):void 0,...e?{data:o.state.data}:{},...(0,_sharedUi.shapeSummary)(o.state.data)?{shape:(0,_sharedUi.shapeSummary)(o.state.data)}:{}}});return{queries:f,total:u.length,returned:f.length,includedData:e}},refetch:t=>{const e=s(t);return e.fetch().catch(()=>void 0)},invalidate:t=>r.invalidateQueries(s(t)),reset:t=>r.resetQueries(s(t)),remove:t=>{const e=s(t);const a=r.getQueryCache().findAll(e).some(n=>n.getObserversCount()>0);r.removeQueries(e);return{ok:true,...a?{note:"Removed \u2014 but a screen is still watching this query, and React Query leaves that screen rendering its LAST value (including anything written into the cache before this) until something refetches. Nothing on screen will change on its own. Use `reset` instead when you want the screen to go back to loading and fetch again."}:{}}},setQueryData:t=>{const{data:e,merge:a,force:n,path:u,value:c}=t;const{queryKey:d,queryHash:h}=t;let f=d;if(f===void 0&&typeof h==="string"){const i=r.getQueryCache().get(h);if(!i){return{ok:false,error:`Refused: no query with hash ${h} is in the cache. Read listQueries for the current hashes \u2014 a query that has been removed or whose key includes changing params (a search term, a cart payload) will not match an older hash.`}}f=i.queryKey}if(f===void 0){return{ok:false,error:`Refused: no query was named. Send \`queryKey\` (the array from listQueries) or \`queryHash\` (its string form).`}}const o=r.getQueryData(f);const y=r.getQueryCache().find({queryKey:f,exact:true});if(o===void 0&&y&&(e!==void 0||u!==void 0)){const i=y;const l=i?.state.status;const m=l==="error"?`it FAILED${i?.state.error?` (${i.state.error instanceof Error?i.state.error.message:String(i.state.error)})`:""}`:l==="pending"?"it has never resolved (it may be disabled, or still loading)":"it holds no data";return{ok:false,error:`Refused: this query has no data to edit \u2014 ${m}. There is nothing to merge into. Fix the cause first (restoreError, or let it fetch), or send force:true with the COMPLETE value if you mean to seed the cache from nothing.`,status:l}}if(e===void 0&&u===void 0){return{ok:false,error:`Refused: no change was described. Send \`data\` (with merge:true for a partial edit), or \`path\` and \`value\` to set one value.`}}let g=e;if(u!==void 0){if(c===void 0){return{ok:false,error:`Refused: sent \`path\` without \`value\`. Say what to set "${u}" to; if you mean to clear it, send value:null and the field must already be nullable.`}}const i=(0,_sharedUi.patchFromPath)(o,u,c);if(!i.ok)return{ok:false,error:`Refused: ${i.error}`};g=i.patch}if(a||u!==void 0){const i=n?{patch:g,notes:[],error:void 0}:(0,_sharedUi.expandKeyedArrays)(o,g);if(i.error){return{ok:false,error:`Refused: ${i.error}`}}const l=i.patch;if(!n){const p=(0,_sharedUi.typedEditViolations)(o,l,{noun:"data"});if(p.length>0){const b=(0,_sharedUi.suggestedPatch)(l,p);return{ok:false,error:(0,_sharedUi.refusalText)(p,"data",b),violations:p,...b?{suggestedData:b}:{}}}}const m=deepMerge(o,l);const v=(0,_sharedUi.unshapedLists)(o).filter(p=>touchesList(l,p));r.setQueryData(f,m,{updatedAt:Date.now()});return{ok:true,mode:"merge",...u!==void 0?{path:u}:{},changedKeys:isPlainObject(l)?Object.keys(l):void 0,...i.notes.length?{keyed:i.notes}:{},...v.length?{unchecked:v.map(p=>`\`${p}\` was empty, so nothing in the app knows what its items look like and the shape of what you added was NOT checked. If the screen renders a field you left out, it will render undefined \u2014 read the query back and compare against how the screen uses it.`)}:{}}}if(!n&&isPlainObject(o)&&isPlainObject(e)){const i=Object.keys(o).filter(l=>!(l in e));if(i.length>0){return{ok:false,error:`Refused: the new value drops ${i.length} top-level field(s) the cached value has (${i.slice(0,8).join(", ")}${i.length>8?", \u2026":""}). A screen rendering those fields would crash. To change some fields, send merge:true with ONLY the fields that change. To really replace the whole value, send force:true.`,missingKeys:i}}}r.setQueryData(f,e,{updatedAt:Date.now()});return{ok:true,mode:"replace"}},triggerError:t=>{const e=s(t);const a=e.options;e.setState({status:"error",error:new Error("Unknown error from devtools"),fetchMeta:{...e.state.fetchMeta,__previousQueryOptions:a}})},restoreError:t=>{void r.resetQueries(s(t)).catch(()=>void 0);return{restored:true}},triggerLoading:t=>{const e=s(t);const a=e.options;e.fetch({...a,queryFn:()=>new Promise(()=>{}),gcTime:-1}).catch(()=>void 0);e.setState({data:void 0,status:"pending",fetchMeta:{...e.state.fetchMeta,__previousQueryOptions:a}})},restoreLoading:t=>{const e=s(t);const a=e.state;const n=e.state.fetchMeta?e.state.fetchMeta.__previousQueryOptions:null;e.cancel({silent:true});e.setState({...a,fetchStatus:"idle",fetchMeta:null});if(n){e.fetch(n).catch(()=>void 0)}},clearQueryCache:()=>{const t=r.getQueryCache().getAll().filter(e=>e.getObserversCount()>0).length;r.getQueryCache().clear();return{ok:true,cleared:true,...t?{note:`Cleared \u2014 but ${t} quer${t===1?"y is":"ies are"} still being watched by a screen, and React Query leaves those screens rendering their LAST value until something refetches. The cache is empty; the app on screen is not. Use \`reset\` on a query when you want its screen to reload.`}:{}}},clearMutationCache:()=>{r.getMutationCache().clear()},setOnline:t=>{const{online:e}=t;_reactQuery.onlineManager.setOnline(e)}}}}
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.createReactQuerySyncAdapter=createReactQuerySyncAdapter;exports.queryErrorText=queryErrorText;var _sharedUi=require("@buoy-gg/shared-ui");var _reactQuery=require("@tanstack/react-query");var _dehydrate=require("./dehydrate");var _getQueryStatusLabel=require("../utils/getQueryStatusLabel");function touchesList(r,s){let t=r;for(const e of s.split(".")){if(!t||typeof t!=="object"||Array.isArray(t))return false;if(!(e in t))return false;t=t[e]}return Array.isArray(t)?t.length>0:!!t&&typeof t==="object"}const isPlainObject=r=>!!r&&typeof r==="object"&&!Array.isArray(r);function shapeKind(r){if(Array.isArray(r))return"array";if(r===null)return"null";if(typeof r==="object")return"object";return typeof r}function deepMerge(r,s,t="",e={shrunk:[],breaks:[]}){if(Array.isArray(r)&&Array.isArray(s)){if(s.length>0&&s.length<r.length){e.shrunk.push({path:t||"(root)",have:r.length,sent:s.length})}return s}if(!isPlainObject(r)||!isPlainObject(s))return s;const a={...r};for(const[n,i]of Object.entries(s)){const c=t?`${t}.${n}`:n;if(n in r){const d=shapeKind(r[n]);const h=shapeKind(i);if((d==="array"||d==="object")&&d!==h){e.breaks.push({path:c,from:d,to:h})}a[n]=deepMerge(r[n],i,c,e)}else{a[n]=i}}return a}function looseKeyParts(r){const s=r.trim();try{const t=JSON.parse(s);if(Array.isArray(t)){return t.map(e=>typeof e==="object"&&e!==null?JSON.stringify(e):String(e))}}catch{}if(s.includes(",")&&!s.startsWith("[")){return s.split(",").map(t=>t.trim().replace(/^["']|["']$/g,""))}return null}function queryErrorText(r){if(r instanceof Error)return r.message;if(r&&typeof r==="object"){const{message:s,code:t,status:e}=r;const a=[e,t,s].filter(n=>typeof n==="string"||typeof n==="number");if(a.length)return[...new Set(a.map(String))].join(" ");try{return JSON.stringify(r)}catch{return String(r)}}return String(r)}function refetchIntervalOf(r){let s;for(const t of r.observers??[]){const e=t.options?.refetchInterval;let a=e;if(typeof e==="function"){try{a=e(r)}catch{a=void 0}}if(typeof a==="number"&&a>0)s=s===void 0?a:Math.min(s,a)}return s}function createReactQuerySyncAdapter(r){const s=t=>{const{queryHash:e}=t;const a=r.getQueryCache();let n=e?a.get(e):void 0;if(!n&&typeof e==="string"){const i=looseKeyParts(e);if(i){n=a.getAll().find(c=>{const d=c.queryKey.map(h=>typeof h==="object"?JSON.stringify(h):String(h));return d.length===i.length&&d.every((h,f)=>h===i[f])})}}if(!n){throw new Error(`Query with hash "${e}" not found`)}return n};return{version:2,getSnapshot:()=>({dehydratedState:(0,_dehydrate.dehydrateQueryClient)(r),isOnlineManagerOnline:_reactQuery.onlineManager.isOnline()}),subscribe:t=>{const e=r.getQueryCache().subscribe(t);const a=r.getMutationCache().subscribe(t);const n=_reactQuery.onlineManager.subscribe(t);return()=>{e();a();n()}},actions:{getQueryData:t=>{const{queryHash:e,path:a}=t??{};if(!e)return{found:false,reason:"missing queryHash"};const n=r.getQueryCache().get(e);if(!n)return{found:false,reason:"unknown queryHash"};if(a){const c=(0,_sharedUi.readPath)(n.state.data,a);if(!c.ok)return{found:false,reason:c.error};return{found:true,queryHash:e,path:a,shape:(0,_sharedUi.shapeSummary)(c.value),data:c.value}}if(n.state.data===void 0){const c=n.state.status;const d=n.state.error;return{found:true,queryHash:e,hasData:false,status:c,fetchStatus:n.state.fetchStatus,...d?{error:queryErrorText(d)}:{},reason:c==="error"?"This query has no data because it FAILED. Report the error, not an empty result.":n.state.fetchStatus==="fetching"?"No data yet \u2014 this query is still fetching.":"This query has never resolved (it may be disabled, or never enabled). It is not empty \u2014 it has nothing."}}const i=(0,_sharedUi.shapeSummary)(n.state.data);return{found:true,queryHash:e,hasData:true,...i?{shape:i}:{},data:(0,_dehydrate.capQueryDetail)(n.state.data)}},listQueries:t=>{const{includeData:e=false,staleOnly:a=false,limit:n}=t??{};const i=r.getQueryCache().getAll();const c=a?i.filter(o=>o.isStale()):i;const d=[...c].sort((o,y)=>{const g=Number(y.getObserversCount()>0)-Number(o.getObserversCount()>0);return g!==0?g:(y.state.dataUpdatedAt??0)-(o.state.dataUpdatedAt??0)});const h=typeof n==="number"&&n>0?d.slice(0,n):d;const f=h.map(o=>{const y=o.state.error;const g=refetchIntervalOf(o);return{queryHash:o.queryHash,queryKey:o.queryKey,status:(0,_getQueryStatusLabel.getQueryStatusLabel)(o),fetchStatus:o.state.fetchStatus,isStale:o.isStale(),observers:o.getObserversCount(),updatedAt:o.state.dataUpdatedAt,...g?{refetchEveryMs:g}:{},error:y?queryErrorText(y):void 0,...e?{data:o.state.data}:{},...(0,_sharedUi.shapeSummary)(o.state.data)?{shape:(0,_sharedUi.shapeSummary)(o.state.data)}:{}}});return{queries:f,total:i.length,returned:f.length,includedData:e}},refetch:t=>{const e=s(t);const a=e.fetch().catch(()=>void 0);return t?.wait===false?void 0:a},invalidate:t=>{const e=r.invalidateQueries(s(t));return t?.wait===false?void 0:e},reset:t=>r.resetQueries(s(t)),remove:t=>{const e=s(t);const a=r.getQueryCache().findAll(e).some(n=>n.getObserversCount()>0);r.removeQueries(e);return{ok:true,...a?{note:"Removed \u2014 but a screen is still watching this query, and React Query leaves that screen rendering its LAST value (including anything written into the cache before this) until something refetches. Nothing on screen will change on its own. Use `reset` instead when you want the screen to go back to loading and fetch again."}:{}}},setQueryData:t=>{const{data:e,merge:a,force:n,path:i,value:c}=t;const{queryKey:d,queryHash:h}=t;let f=d;if(f===void 0&&typeof h==="string"){const u=r.getQueryCache().get(h);if(!u){return{ok:false,error:`Refused: no query with hash ${h} is in the cache. Read listQueries for the current hashes \u2014 a query that has been removed or whose key includes changing params (a search term, a cart payload) will not match an older hash.`}}f=u.queryKey}if(f===void 0){return{ok:false,error:`Refused: no query was named. Send \`queryKey\` (the array from listQueries) or \`queryHash\` (its string form).`}}const o=r.getQueryData(f);const y=r.getQueryCache().find({queryKey:f,exact:true});if(o===void 0&&y&&(e!==void 0||i!==void 0)){const u=y;const l=u?.state.status;const m=l==="error"?`it FAILED${u?.state.error?` (${queryErrorText(u.state.error)})`:""}`:l==="pending"?"it has never resolved (it may be disabled, or still loading)":"it holds no data";return{ok:false,error:`Refused: this query has no data to edit \u2014 ${m}. There is nothing to merge into. Fix the cause first (restoreError, or let it fetch), or send force:true with the COMPLETE value if you mean to seed the cache from nothing.`,status:l}}if(e===void 0&&i===void 0){return{ok:false,error:`Refused: no change was described. Send \`data\` (with merge:true for a partial edit), or \`path\` and \`value\` to set one value.`}}let g=e;if(i!==void 0){if(c===void 0){return{ok:false,error:`Refused: sent \`path\` without \`value\`. Say what to set "${i}" to; if you mean to clear it, send value:null and the field must already be nullable.`}}const u=(0,_sharedUi.patchFromPath)(o,i,c);if(!u.ok)return{ok:false,error:`Refused: ${u.error}`};g=u.patch}if(a||i!==void 0){const u=(0,_sharedUi.expandKeyedArrays)(o,g);if(u.error){return{ok:false,error:`Refused: ${u.error}`}}const l=u.patch;if(!n){const p=(0,_sharedUi.typedEditViolations)(o,l,{noun:"data"});if(p.length>0){const b=(0,_sharedUi.suggestedPatch)(l,p);return{ok:false,error:(0,_sharedUi.refusalText)(p,"data",b),violations:p,...b?{suggestedData:b}:{}}}}const m=deepMerge(o,l);const v=(0,_sharedUi.unshapedLists)(o).filter(p=>touchesList(l,p));r.setQueryData(f,m,{updatedAt:Date.now()});return{ok:true,mode:"merge",...i!==void 0?{path:i}:{},changedKeys:isPlainObject(l)?Object.keys(l):void 0,...u.notes.length?{keyed:u.notes}:{},...v.length?{unchecked:v.map(p=>`\`${p}\` was empty, so nothing in the app knows what its items look like and the shape of what you added was NOT checked. If the screen renders a field you left out, it will render undefined \u2014 read the query back and compare against how the screen uses it.`)}:{}}}if(!n&&isPlainObject(o)&&isPlainObject(e)){const u=Object.keys(o).filter(l=>!(l in e));if(u.length>0){return{ok:false,error:`Refused: the new value drops ${u.length} top-level field(s) the cached value has (${u.slice(0,8).join(", ")}${u.length>8?", \u2026":""}). A screen rendering those fields would crash. To change some fields, send merge:true with ONLY the fields that change. To really replace the whole value, send force:true.`,missingKeys:u}}}r.setQueryData(f,e,{updatedAt:Date.now()});return{ok:true,mode:"replace"}},triggerError:t=>{const e=s(t);const a=e.options;e.setState({status:"error",error:new Error("Unknown error from devtools"),fetchMeta:{...e.state.fetchMeta,__previousQueryOptions:a}})},restoreError:t=>{void r.resetQueries(s(t)).catch(()=>void 0);return{restored:true}},triggerLoading:t=>{const e=s(t);const a=e.options;e.fetch({...a,queryFn:()=>new Promise(()=>{}),gcTime:-1}).catch(()=>void 0);e.setState({data:void 0,status:"pending",fetchMeta:{...e.state.fetchMeta,__previousQueryOptions:a}})},restoreLoading:t=>{const e=s(t);const a=e.state;const n=e.state.fetchMeta?e.state.fetchMeta.__previousQueryOptions:null;e.cancel({silent:true});e.setState({...a,fetchStatus:"idle",fetchMeta:null});if(n){e.fetch(n).catch(()=>void 0)}},clearQueryCache:()=>{const t=r.getQueryCache().getAll().filter(e=>e.getObserversCount()>0).length;r.getQueryCache().clear();return{ok:true,cleared:true,...t?{note:`Cleared \u2014 but ${t} quer${t===1?"y is":"ies are"} still being watched by a screen, and React Query leaves those screens rendering their LAST value until something refetches. The cache is empty; the app on screen is not. Use \`reset\` on a query when you want its screen to reload.`}:{}}},clearMutationCache:()=>{r.getMutationCache().clear()},setOnline:t=>{const{online:e}=t;_reactQuery.onlineManager.setOnline(e)}}}}
@@ -1 +1 @@
1
- "use strict";import{QueryIcon as l}from"@buoy-gg/floating-tools-core";import{Wifi as a}from"@buoy-gg/shared-ui";import{ReactQueryDevToolsModal as u}from"./react-query/components/ReactQueryDevToolsModal";import{onlineManager as o}from"@tanstack/react-query";import{devToolsStorageKeys as f,persistentStorage as m}from"@buoy-gg/shared-ui";const d=()=>null;const p=async e=>{try{await m.setItem(f.settings.wifiEnabled(),e.toString())}catch(n){}};const I=async()=>{try{const e=await m.getItem(f.settings.wifiEnabled());if(e!==null){o.setOnline(e==="true")}}catch(e){}};I();import{useState as g,useEffect as y}from"react";import{jsx as i}from"react/jsx-runtime";function O({size:e}){const[n,r]=g(()=>o.isOnline());y(()=>{const t=o.subscribe(c=>{r(c)});return t},[]);const s=n?"#10B981":"#DC2626";return i(a,{size:e,color:s})}export const reactQueryToolPreset={id:"query",name:"QUERY",description:"React Query inspector",slot:"both",icon:({size:e})=>i(l,{size:e}),component:u,props:{enableSharedModalDimensions:false}};export function createReactQueryTool(e){return{id:e?.id||"query",name:e?.name||"QUERY",description:e?.description||"React Query inspector",slot:"both",icon:({size:n})=>i(l,{size:n}),component:u,props:{enableSharedModalDimensions:e?.enableSharedModalDimensions!==void 0?e.enableSharedModalDimensions:false}}}export const wifiTogglePreset={id:"query-wifi-toggle",name:"WIFI",description:"Toggle React Query online/offline state",slot:"row",icon:O,component:d,props:{},launchMode:"toggle-only",onPress:()=>{const e=!o.isOnline();o.setOnline(e);p(e)}};export function createWifiToggleTool(e){const n=e?.onColor||"#10B981";const r=e?.offColor||"#DC2626";const s=({size:t})=>{const[c,b]=g(()=>o.isOnline());y(()=>{const S=o.subscribe(w=>{b(w)});return S},[]);return i(a,{size:t,color:c?n:r})};return{id:e?.id||"query-wifi-toggle",name:e?.name||"WIFI",description:e?.description||"Toggle React Query online/offline state",slot:"row",icon:s,component:d,props:{},launchMode:"toggle-only",onPress:()=>{const t=!o.isOnline();o.setOnline(t);p(t)}}}
1
+ "use strict";import{QueryIcon as c}from"@buoy-gg/floating-tools-core";import{Wifi as a}from"@buoy-gg/shared-ui";import{ReactQueryDevToolsModal as u}from"./react-query/components/ReactQueryDevToolsModal";import{onlineManager as n}from"@tanstack/react-query";import{devToolsStorageKeys as f,persistentStorage as m}from"@buoy-gg/shared-ui";const d=()=>null;const p=async e=>{try{await m.setItem(f.settings.wifiEnabled(),e.toString())}catch(o){}};const h=async()=>{try{const e=await m.getItem(f.settings.wifiEnabled());if(e!==null){n.setOnline(e==="true")}}catch(e){}};h();globalThis[Symbol.for("buoy.query.onlineManager")]=n;import{useState as g,useEffect as y}from"react";import{jsx as i}from"react/jsx-runtime";function w({size:e}){const[o,r]=g(()=>n.isOnline());y(()=>{const t=n.subscribe(l=>{r(l)});return t},[]);const s=o?"#10B981":"#DC2626";return i(a,{size:e,color:s})}export const reactQueryToolPreset={id:"query",name:"QUERY",description:"React Query inspector",slot:"both",icon:({size:e})=>i(c,{size:e}),component:u,props:{enableSharedModalDimensions:false}};export function createReactQueryTool(e){return{id:e?.id||"query",name:e?.name||"QUERY",description:e?.description||"React Query inspector",slot:"both",icon:({size:o})=>i(c,{size:o}),component:u,props:{enableSharedModalDimensions:e?.enableSharedModalDimensions!==void 0?e.enableSharedModalDimensions:false}}}export const wifiTogglePreset={id:"query-wifi-toggle",name:"WIFI",description:"Toggle React Query online/offline state",slot:"row",icon:w,component:d,props:{},launchMode:"toggle-only",isOn:()=>n.isOnline(),onPress:()=>{const e=!n.isOnline();n.setOnline(e);p(e)}};export function createWifiToggleTool(e){const o=e?.onColor||"#10B981";const r=e?.offColor||"#DC2626";const s=({size:t})=>{const[l,b]=g(()=>n.isOnline());y(()=>{const O=n.subscribe(S=>{b(S)});return O},[]);return i(a,{size:t,color:l?o:r})};return{id:e?.id||"query-wifi-toggle",name:e?.name||"WIFI",description:e?.description||"Toggle React Query online/offline state",slot:"row",icon:s,component:d,props:{},launchMode:"toggle-only",isOn:()=>n.isOnline(),onPress:()=>{const t=!n.isOnline();n.setOnline(t);p(t)}}}
@@ -1 +1 @@
1
- "use strict";import{View as a,Text as m,StyleSheet as C,ScrollView as w}from"react-native";import{useQueryClient as h}from"@tanstack/react-query";import{useSafeAreaInsets as y,night as o,monoFont as f}from"@buoy-gg/shared-ui";import D from"./query-browser/Explorer";import q from"./query-browser/QueryDetails";import g from"./query-browser/ActionButton";import{getQueryStatusLabel as S}from"../utils/getQueryStatusLabel";import{useActionButtons as b}from"../hooks/useActionButtons";import{DataViewer as B}from"@buoy-gg/shared-ui/dataViewer";import{jsx as t,jsxs as c,Fragment as E}from"react/jsx-runtime";export function DataEditorMode({selectedQuery:r,isFloatingMode:i,disableInternalFooter:n=false,queryVersion:s}){const p=y({minBottom:16});const u=h();const l=b(r,u,s);return c(E,{children:[c(w,{testID:"buoy-rq-detail-scroll",accessibilityLabel:"Data editor mode",accessibilityHint:"View data editor mode","sentry-label":"ignore data editor mode",style:e.explorerScrollContainer,contentContainerStyle:[e.explorerScrollContent,!n&&{paddingBottom:72}],children:[c(a,{style:e.section,children:[t(v,{visible:!!r.state.data,selectedQuery:r,queryVersion:s}),t(T,{visible:!r.state.data,selectedQuery:r})]}),t(a,{style:e.section,children:t(q,{query:r})}),t(a,{style:e.section,children:c(a,{style:e.queryExplorerContainer,children:[t(m,{testID:"buoy-rq-query-explorer-header",style:e.queryExplorerHeader,children:"Query Explorer"}),t(a,{style:e.queryExplorerContent,children:t(B,{title:"",data:r,maxDepth:10,rawMode:true,showTypeFilter:true,initialExpanded:false})})]})})]}),!n&&t(a,{style:[e.actionFooter,{paddingBottom:i?0:p.bottom+8}],children:t(a,{style:e.actionsRow,children:l.map((d,x)=>t(g,{testID:`buoy-rq-action-${d.variant}`,onClick:d.onPress,text:d.label,variant:d.variant,disabled:d.disabled},x))})})]})}export function DataEditorActionsFooter({selectedQuery:r,isFloatingMode:i,queryVersion:n}){const s=y({minBottom:16});const p=h();const u=b(r,p,n);return t(a,{style:[e.actionFooter,{paddingBottom:i?0:s.bottom+8}],children:t(a,{style:e.actionsRow,children:u.map((l,d)=>t(g,{testID:`buoy-rq-action-${l.variant}`,onClick:l.onPress,text:l.label,variant:l.variant,disabled:l.disabled},d))})})}function v({visible:r,selectedQuery:i,queryVersion:n=0}){if(!r)return null;return c(a,{style:e.dataContainer,children:[t(m,{testID:"buoy-rq-data-header",style:e.dataHeader,children:"Data Editor"}),t(a,{style:e.dataContent,children:t(D,{editable:true,label:"Data",value:i.state.data,defaultExpanded:["Data"],activeQuery:i,dataVersion:n})})]})}function T({visible:r,selectedQuery:i}){if(!r)return null;const n=()=>{if(i.isDisabled()){return{title:"Query Disabled",description:"This query is disabled and won't automatically fetch. Enable the query or manually trigger a fetch to load data."}}if(i.state.status==="pending"||S(i)==="fetching"){return{title:i.state.status==="pending"?"Loading...":"Refetching...",description:"Please wait while the query is being executed."}}if(i.state.status==="error"){return{title:"Query Error",description:i.state.error?.message||"An error occurred while fetching data."}}return{title:"No Data Available",description:"This query has no data to edit. Try refetching the query first."}};const{title:s,description:p}=n();return c(a,{style:e.emptyState,children:[t(m,{testID:"buoy-rq-detail-empty-title",style:e.emptyTitle,children:s}),t(m,{testID:"buoy-rq-detail-empty-description",style:e.emptyDescription,children:p})]})}const e=C.create({explorerScrollContainer:{flex:1},explorerScrollContent:{paddingBottom:16,paddingHorizontal:8,flexGrow:1},section:{marginBottom:16},emptyState:{flex:1,justifyContent:"center",alignItems:"center",padding:32},emptyTitle:{color:o.color.text,fontSize:18,fontWeight:"600",marginBottom:8,textAlign:"center"},emptyDescription:{color:o.color.textSecondary,fontSize:14,textAlign:"center",lineHeight:20,maxWidth:280},actionFooter:{borderTopWidth:1,borderTopColor:o.color.border,paddingTop:8,paddingHorizontal:12,backgroundColor:"transparent",borderBottomLeftRadius:14,borderBottomRightRadius:14},actionsRow:{flexDirection:"row",alignItems:"center",gap:8},queryExplorerContainer:{minWidth:200,backgroundColor:o.color.surface,borderRadius:6,borderWidth:1,borderColor:o.color.accent+"4D",overflow:"hidden",shadowColor:o.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},queryExplorerHeader:{backgroundColor:o.color.accent+"1A",paddingHorizontal:12,paddingVertical:10,fontWeight:"600",fontSize:12,color:o.color.accent,borderBottomWidth:1,borderBottomColor:o.color.accent+"33",letterSpacing:.5,textTransform:"uppercase",fontFamily:f},queryExplorerContent:{padding:8},dataContainer:{minWidth:200,backgroundColor:o.color.surface,borderRadius:6,borderWidth:1,borderColor:o.color.accent+"4D",overflow:"hidden",shadowColor:o.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6,marginTop:8},dataHeader:{backgroundColor:o.color.accent+"1A",paddingHorizontal:12,paddingVertical:10,fontWeight:"600",fontSize:12,color:o.color.accent,borderBottomWidth:1,borderBottomColor:o.color.accent+"33",letterSpacing:.5,textTransform:"uppercase",fontFamily:f},dataContent:{padding:8}});
1
+ "use strict";import{View as i,Text as u,StyleSheet as C,ScrollView as w}from"react-native";import{useQueryClient as h}from"@tanstack/react-query";import{useSafeAreaInsets as y,night as o,monoFont as f}from"@buoy-gg/shared-ui";import D from"./query-browser/Explorer";import q from"./query-browser/QueryDetails";import g from"./query-browser/ActionButton";import{getQueryStatusLabel as S}from"../utils/getQueryStatusLabel";import{useActionButtons as b}from"../hooks/useActionButtons";import{DataViewer as B}from"@buoy-gg/shared-ui/dataViewer";import{jsx as t,jsxs as c,Fragment as E}from"react/jsx-runtime";export function DataEditorMode({selectedQuery:r,isFloatingMode:a,disableInternalFooter:n=false,queryVersion:s}){const p=y({minBottom:16});const m=h();const l=b(r,m,s);return c(E,{children:[c(w,{keyboardShouldPersistTaps:"handled",testID:"buoy-rq-detail-scroll",accessibilityLabel:"Data editor mode",accessibilityHint:"View data editor mode","sentry-label":"ignore data editor mode",style:e.explorerScrollContainer,contentContainerStyle:[e.explorerScrollContent,!n&&{paddingBottom:72}],children:[c(i,{style:e.section,children:[t(T,{visible:!!r.state.data,selectedQuery:r,queryVersion:s}),t(v,{visible:!r.state.data,selectedQuery:r})]}),t(i,{style:e.section,children:t(q,{query:r})}),t(i,{style:e.section,children:c(i,{style:e.queryExplorerContainer,children:[t(u,{testID:"buoy-rq-query-explorer-header",style:e.queryExplorerHeader,children:"Query Explorer"}),t(i,{style:e.queryExplorerContent,children:t(B,{title:"",data:r,maxDepth:10,rawMode:true,showTypeFilter:true,initialExpanded:false})})]})})]}),!n&&t(i,{style:[e.actionFooter,{paddingBottom:a?0:p.bottom+8}],children:t(i,{style:e.actionsRow,children:l.map((d,x)=>t(g,{testID:`buoy-rq-action-${d.variant}`,onClick:d.onPress,text:d.label,variant:d.variant,disabled:d.disabled},x))})})]})}export function DataEditorActionsFooter({selectedQuery:r,isFloatingMode:a,queryVersion:n}){const s=y({minBottom:16});const p=h();const m=b(r,p,n);return t(i,{style:[e.actionFooter,{paddingBottom:a?0:s.bottom+8}],children:t(i,{style:e.actionsRow,children:m.map((l,d)=>t(g,{testID:`buoy-rq-action-${l.variant}`,onClick:l.onPress,text:l.label,variant:l.variant,disabled:l.disabled},d))})})}function T({visible:r,selectedQuery:a,queryVersion:n=0}){if(!r)return null;return c(i,{style:e.dataContainer,children:[t(u,{testID:"buoy-rq-data-header",style:e.dataHeader,children:"Data Editor"}),t(i,{style:e.dataContent,children:t(D,{editable:true,label:"Data",value:a.state.data,defaultExpanded:["Data"],activeQuery:a,dataVersion:n})})]})}function v({visible:r,selectedQuery:a}){if(!r)return null;const n=()=>{if(a.isDisabled()){return{title:"Query Disabled",description:"This query is disabled and won't automatically fetch. Enable the query or manually trigger a fetch to load data."}}if(a.state.status==="pending"||S(a)==="fetching"){return{title:a.state.status==="pending"?"Loading...":"Refetching...",description:"Please wait while the query is being executed."}}if(a.state.status==="error"){return{title:"Query Error",description:a.state.error?.message||"An error occurred while fetching data."}}return{title:"No Data Available",description:"This query has no data to edit. Try refetching the query first."}};const{title:s,description:p}=n();return c(i,{style:e.emptyState,children:[t(u,{testID:"buoy-rq-detail-empty-title",style:e.emptyTitle,children:s}),t(u,{testID:"buoy-rq-detail-empty-description",style:e.emptyDescription,children:p})]})}const e=C.create({explorerScrollContainer:{flex:1},explorerScrollContent:{paddingBottom:16,paddingHorizontal:8,flexGrow:1},section:{marginBottom:16},emptyState:{flex:1,justifyContent:"center",alignItems:"center",padding:32},emptyTitle:{color:o.color.text,fontSize:18,fontWeight:"600",marginBottom:8,textAlign:"center"},emptyDescription:{color:o.color.textSecondary,fontSize:14,textAlign:"center",lineHeight:20,maxWidth:280},actionFooter:{borderTopWidth:1,borderTopColor:o.color.border,paddingTop:8,paddingHorizontal:12,backgroundColor:"transparent",borderBottomLeftRadius:14,borderBottomRightRadius:14},actionsRow:{flexDirection:"row",alignItems:"center",gap:8},queryExplorerContainer:{minWidth:200,backgroundColor:o.color.surface,borderRadius:6,borderWidth:1,borderColor:o.color.accent+"4D",overflow:"hidden",shadowColor:o.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},queryExplorerHeader:{backgroundColor:o.color.accent+"1A",paddingHorizontal:12,paddingVertical:10,fontWeight:"600",fontSize:12,color:o.color.accent,borderBottomWidth:1,borderBottomColor:o.color.accent+"33",letterSpacing:.5,textTransform:"uppercase",fontFamily:f},queryExplorerContent:{padding:8},dataContainer:{minWidth:200,backgroundColor:o.color.surface,borderRadius:6,borderWidth:1,borderColor:o.color.accent+"4D",overflow:"hidden",shadowColor:o.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6,marginTop:8},dataHeader:{backgroundColor:o.color.accent+"1A",paddingHorizontal:12,paddingVertical:10,fontWeight:"600",fontSize:12,color:o.color.accent,borderBottomWidth:1,borderBottomColor:o.color.accent+"33",letterSpacing:.5,textTransform:"uppercase",fontFamily:f},dataContent:{padding:8}});
@@ -1 +1 @@
1
- "use strict";import{View as n,Text as s,StyleSheet as u,ScrollView as h}from"react-native";import{useSafeAreaInsets as f,night as e,monoFont as p}from"@buoy-gg/shared-ui";import y from"./query-browser/Explorer";import g from"./query-browser/MutationDetails";import b from"./query-browser/ActionButton";import{useMutationActionButtons as x}from"../hooks/useMutationActionButtons";import{DataViewer as C}from"@buoy-gg/shared-ui/dataViewer";import{jsx as t,jsxs as l,Fragment as w}from"react/jsx-runtime";export function MutationEditorMode({selectedMutation:r,isFloatingMode:i,disableInternalFooter:d=false}){return l(w,{children:[l(h,{testID:"buoy-rq-mutation-detail-scroll",accessibilityLabel:"Mutation editor mode",accessibilityHint:"View mutation editor mode","sentry-label":"ignore mutation editor mode",style:o.explorerScrollContainer,contentContainerStyle:o.explorerScrollContent,children:[l(n,{style:o.section,children:[t(S,{visible:!!r.state.data,selectedMutation:r}),t(D,{visible:!r.state.data,selectedMutation:r})]}),t(n,{style:o.section,children:t(g,{selectedMutation:r})}),t(n,{style:o.section,children:l(n,{style:o.mutationExplorerContainer,children:[t(s,{style:o.mutationExplorerHeader,children:"Mutation Explorer"}),t(n,{style:o.mutationExplorerContent,children:t(C,{title:"",data:r,maxDepth:10,rawMode:true,showTypeFilter:true,initialExpanded:false})})]})})]}),!d&&t(MutationEditorActionsFooter,{selectedMutation:r,isFloatingMode:i})]})}export function MutationEditorActionsFooter({selectedMutation:r,isFloatingMode:i}){const d=f({minBottom:16});const c=x(r);return t(n,{style:[o.actionFooter,{paddingBottom:i?0:d.bottom+8}],children:t(n,{style:o.actionsGrid,children:c.map((a,m)=>t(b,{testID:`buoy-rq-action-${a.variant}`,onClick:a.onPress,text:a.label,variant:a.variant,disabled:a.disabled},m))})})}function S({visible:r,selectedMutation:i}){if(!r)return null;return l(n,{style:o.dataContainer,children:[t(s,{style:o.dataHeader,children:"Data Editor"}),t(n,{style:o.dataContent,children:t(y,{editable:true,label:"Data",value:i.state.data,defaultExpanded:["Data"]},i.mutationId)})]})}function D({visible:r,selectedMutation:i}){if(!r)return null;const d=()=>{if(i.state.status==="pending"){return{title:"Pending...",description:"The mutation is in progress."}}if(i.state.status==="error"){return{title:"Mutation Error",description:i.state.error?.message||"An error occurred."}}return{title:"No Data Available",description:"This mutation has no data."}};const{title:c,description:a}=d();return l(n,{style:o.emptyState,children:[t(s,{testID:"buoy-rq-mutation-detail-empty-title",style:o.emptyTitle,children:c}),t(s,{testID:"buoy-rq-mutation-detail-empty-description",style:o.emptyDescription,children:a})]})}const o=u.create({explorerScrollContainer:{flex:1},explorerScrollContent:{paddingBottom:16,paddingHorizontal:8,flexGrow:1},section:{marginBottom:16},emptyState:{flex:1,justifyContent:"center",alignItems:"center",padding:32},emptyTitle:{color:e.color.text,fontSize:18,fontWeight:"600",marginBottom:8,textAlign:"center"},emptyDescription:{color:e.color.textSecondary,fontSize:14,textAlign:"center",lineHeight:20,maxWidth:280},actionFooter:{borderTopWidth:1,borderTopColor:e.color.border,paddingVertical:8,paddingHorizontal:12,backgroundColor:"transparent",borderBottomLeftRadius:14,borderBottomRightRadius:14},actionsGrid:{flexDirection:"row",flexWrap:"wrap",gap:6,justifyContent:"space-between"},mutationExplorerContainer:{minWidth:200,backgroundColor:e.color.surface,borderRadius:6,borderWidth:1,borderColor:e.color.accent+"4D",overflow:"hidden",shadowColor:e.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},mutationExplorerHeader:{backgroundColor:e.color.accent+"1A",paddingHorizontal:12,paddingVertical:10,fontWeight:"600",fontSize:12,color:e.color.accent,borderBottomWidth:1,borderBottomColor:e.color.accent+"33",letterSpacing:.5,textTransform:"uppercase",fontFamily:p},mutationExplorerContent:{padding:8},dataContainer:{minWidth:200,backgroundColor:e.color.surface,borderRadius:6,borderWidth:1,borderColor:e.color.accent+"4D",overflow:"hidden",shadowColor:e.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},dataHeader:{backgroundColor:e.color.accent+"1A",paddingHorizontal:12,paddingVertical:10,fontWeight:"600",fontSize:12,color:e.color.accent,borderBottomWidth:1,borderBottomColor:e.color.accent+"33",letterSpacing:.5,textTransform:"uppercase",fontFamily:p},dataContent:{padding:8}});
1
+ "use strict";import{View as n,Text as s,StyleSheet as u,ScrollView as h}from"react-native";import{useSafeAreaInsets as f,night as e,monoFont as p}from"@buoy-gg/shared-ui";import y from"./query-browser/Explorer";import g from"./query-browser/MutationDetails";import b from"./query-browser/ActionButton";import{useMutationActionButtons as x}from"../hooks/useMutationActionButtons";import{DataViewer as C}from"@buoy-gg/shared-ui/dataViewer";import{jsx as t,jsxs as l,Fragment as w}from"react/jsx-runtime";export function MutationEditorMode({selectedMutation:r,isFloatingMode:i,disableInternalFooter:d=false}){return l(w,{children:[l(h,{keyboardShouldPersistTaps:"handled",testID:"buoy-rq-mutation-detail-scroll",accessibilityLabel:"Mutation editor mode",accessibilityHint:"View mutation editor mode","sentry-label":"ignore mutation editor mode",style:o.explorerScrollContainer,contentContainerStyle:o.explorerScrollContent,children:[l(n,{style:o.section,children:[t(S,{visible:!!r.state.data,selectedMutation:r}),t(D,{visible:!r.state.data,selectedMutation:r})]}),t(n,{style:o.section,children:t(g,{selectedMutation:r})}),t(n,{style:o.section,children:l(n,{style:o.mutationExplorerContainer,children:[t(s,{style:o.mutationExplorerHeader,children:"Mutation Explorer"}),t(n,{style:o.mutationExplorerContent,children:t(C,{title:"",data:r,maxDepth:10,rawMode:true,showTypeFilter:true,initialExpanded:false})})]})})]}),!d&&t(MutationEditorActionsFooter,{selectedMutation:r,isFloatingMode:i})]})}export function MutationEditorActionsFooter({selectedMutation:r,isFloatingMode:i}){const d=f({minBottom:16});const c=x(r);return t(n,{style:[o.actionFooter,{paddingBottom:i?0:d.bottom+8}],children:t(n,{style:o.actionsGrid,children:c.map((a,m)=>t(b,{testID:`buoy-rq-action-${a.variant}`,onClick:a.onPress,text:a.label,variant:a.variant,disabled:a.disabled},m))})})}function S({visible:r,selectedMutation:i}){if(!r)return null;return l(n,{style:o.dataContainer,children:[t(s,{style:o.dataHeader,children:"Data Editor"}),t(n,{style:o.dataContent,children:t(y,{editable:true,label:"Data",value:i.state.data,defaultExpanded:["Data"]},i.mutationId)})]})}function D({visible:r,selectedMutation:i}){if(!r)return null;const d=()=>{if(i.state.status==="pending"){return{title:"Pending...",description:"The mutation is in progress."}}if(i.state.status==="error"){return{title:"Mutation Error",description:i.state.error?.message||"An error occurred."}}return{title:"No Data Available",description:"This mutation has no data."}};const{title:c,description:a}=d();return l(n,{style:o.emptyState,children:[t(s,{testID:"buoy-rq-mutation-detail-empty-title",style:o.emptyTitle,children:c}),t(s,{testID:"buoy-rq-mutation-detail-empty-description",style:o.emptyDescription,children:a})]})}const o=u.create({explorerScrollContainer:{flex:1},explorerScrollContent:{paddingBottom:16,paddingHorizontal:8,flexGrow:1},section:{marginBottom:16},emptyState:{flex:1,justifyContent:"center",alignItems:"center",padding:32},emptyTitle:{color:e.color.text,fontSize:18,fontWeight:"600",marginBottom:8,textAlign:"center"},emptyDescription:{color:e.color.textSecondary,fontSize:14,textAlign:"center",lineHeight:20,maxWidth:280},actionFooter:{borderTopWidth:1,borderTopColor:e.color.border,paddingVertical:8,paddingHorizontal:12,backgroundColor:"transparent",borderBottomLeftRadius:14,borderBottomRightRadius:14},actionsGrid:{flexDirection:"row",flexWrap:"wrap",gap:6,justifyContent:"space-between"},mutationExplorerContainer:{minWidth:200,backgroundColor:e.color.surface,borderRadius:6,borderWidth:1,borderColor:e.color.accent+"4D",overflow:"hidden",shadowColor:e.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},mutationExplorerHeader:{backgroundColor:e.color.accent+"1A",paddingHorizontal:12,paddingVertical:10,fontWeight:"600",fontSize:12,color:e.color.accent,borderBottomWidth:1,borderBottomColor:e.color.accent+"33",letterSpacing:.5,textTransform:"uppercase",fontFamily:p},mutationExplorerContent:{padding:8},dataContainer:{minWidth:200,backgroundColor:e.color.surface,borderRadius:6,borderWidth:1,borderColor:e.color.accent+"4D",overflow:"hidden",shadowColor:e.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},dataHeader:{backgroundColor:e.color.accent+"1A",paddingHorizontal:12,paddingVertical:10,fontWeight:"600",fontSize:12,color:e.color.accent,borderBottomWidth:1,borderBottomColor:e.color.accent+"33",letterSpacing:.5,textTransform:"uppercase",fontFamily:p},dataContent:{padding:8}});
@@ -1 +1 @@
1
- "use strict";import{View as s,Text as l,StyleSheet as p,TouchableOpacity as C,Modal as x,ScrollView as S,Pressable as w}from"react-native";import{getQueryStatusColor as F}from"../utils/getQueryStatusColor";import{QueryDebugInfo as Q}from"./QueryDebugInfo";import{jsx as r,jsxs as o}from"react/jsx-runtime";export function QuerySelector({queries:i,selectedQuery:y,isOpen:d,onClose:a,onSelect:u}){const g=t=>{return Array.isArray(t.queryKey)?t.queryKey.join(" - "):String(t.queryKey)};return r(x,{accessibilityLabel:"Query selector",accessibilityHint:"View query selector","sentry-label":"ignore query selector",visible:d,transparent:true,animationType:"fade",onRequestClose:a,children:r(w,{accessibilityLabel:"Query selector overlay",accessibilityHint:"View query selector overlay","sentry-label":"ignore query selector overlay",style:e.modalOverlay,onPress:a,children:o(s,{accessibilityLabel:"Query selector content",accessibilityHint:"View query selector content","sentry-label":"ignore query selector content",style:e.modalContent,children:[o(s,{style:e.modalHeader,children:[r(l,{style:e.modalTitle,children:"Select Query"}),o(l,{style:e.modalSubtitle,children:[i.length," ",i.length===1?"query":"queries"," ","available"]})]}),r(S,{accessibilityLabel:"Query selector scroll view",accessibilityHint:"View query selector scroll view","sentry-label":"ignore query selector scroll view",style:e.scrollView,contentContainerStyle:e.scrollViewContent,showsVerticalScrollIndicator:true,children:i.length===0?o(s,{style:e.emptyState,children:[r(l,{style:e.emptyTitle,children:"No Queries Found"}),o(l,{style:e.emptyDescription,children:["No React Query queries are currently active.","\n\n","To see queries here:","\n","\u2022 Make API calls using useQuery","\n","\u2022 Ensure queries are within QueryClientProvider","\n","\u2022 Check console for debugging info"]}),r(Q,{})]}):i.map((t,b)=>{const n=g(t);const m=F({queryState:t.state,observerCount:t.getObserversCount(),isStale:t.isStale()});const h={blue:"#3B82F6",gray:"#6B7280",purple:"#8B5CF6",yellow:"#F59E0B",green:"#10B981",red:"#EF4444"};const f=h[m]||"#6B7280";const c=t===y;return o(C,{accessibilityLabel:`Query ${n}`,accessibilityHint:`View query ${n}`,"sentry-label":`ignore query ${n}`,style:[e.queryItem,c&&e.selectedQueryItem],onPress:()=>u(t),children:[r(s,{style:[e.statusDot,{backgroundColor:f}]}),r(l,{style:[e.queryText,c&&e.selectedQueryText],numberOfLines:1,children:n})]},`${t.queryHash}-${b}`)})})]})})})}const e=p.create({modalOverlay:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.5)",justifyContent:"center",alignItems:"center"},modalContent:{backgroundColor:"#1F1F1F",borderRadius:8,width:"80%",maxHeight:"80%",minHeight:"50%",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.1)",flex:0},modalHeader:{padding:16,borderBottomWidth:1,borderBottomColor:"rgba(255, 255, 255, 0.1)"},modalTitle:{color:"#FFFFFF",fontSize:16,fontWeight:"600",marginBottom:4},modalSubtitle:{color:"#9CA3AF",fontSize:12},scrollView:{flex:1},scrollViewContent:{padding:8,flexGrow:1},emptyState:{padding:32,alignItems:"center",justifyContent:"center"},emptyTitle:{color:"#E5E7EB",fontSize:16,fontWeight:"500",marginBottom:8,textAlign:"center"},emptyDescription:{color:"#9CA3AF",fontSize:14,textAlign:"center",lineHeight:20},queryItem:{flexDirection:"row",alignItems:"center",padding:8,borderRadius:4},selectedQueryItem:{backgroundColor:"rgba(255, 255, 255, 0.1)"},statusDot:{width:8,height:8,borderRadius:4,marginRight:8},queryText:{color:"#E5E7EB",fontSize:14,flex:1},selectedQueryText:{color:"#FFFFFF",fontWeight:"500"},trigger:{flexDirection:"row",alignItems:"center",backgroundColor:"rgba(255, 255, 255, 0.05)",borderRadius:4,paddingHorizontal:8,paddingVertical:6,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.1)",minWidth:120,maxWidth:200},triggerText:{color:"#E5E7EB",fontSize:12,flex:1,marginHorizontal:6}});
1
+ "use strict";import{View as s,Text as l,StyleSheet as p,TouchableOpacity as C,Modal as S,ScrollView as x,Pressable as w}from"react-native";import{getQueryStatusColor as F}from"../utils/getQueryStatusColor";import{QueryDebugInfo as Q}from"./QueryDebugInfo";import{jsx as r,jsxs as o}from"react/jsx-runtime";export function QuerySelector({queries:i,selectedQuery:y,isOpen:d,onClose:a,onSelect:u}){const g=t=>{return Array.isArray(t.queryKey)?t.queryKey.join(" - "):String(t.queryKey)};return r(S,{accessibilityLabel:"Query selector",accessibilityHint:"View query selector","sentry-label":"ignore query selector",visible:d,transparent:true,animationType:"fade",onRequestClose:a,children:r(w,{accessibilityLabel:"Query selector overlay",accessibilityHint:"View query selector overlay","sentry-label":"ignore query selector overlay",style:e.modalOverlay,onPress:a,children:o(s,{accessibilityLabel:"Query selector content",accessibilityHint:"View query selector content","sentry-label":"ignore query selector content",style:e.modalContent,children:[o(s,{style:e.modalHeader,children:[r(l,{style:e.modalTitle,children:"Select Query"}),o(l,{style:e.modalSubtitle,children:[i.length," ",i.length===1?"query":"queries"," ","available"]})]}),r(x,{keyboardShouldPersistTaps:"handled",accessibilityLabel:"Query selector scroll view",accessibilityHint:"View query selector scroll view","sentry-label":"ignore query selector scroll view",style:e.scrollView,contentContainerStyle:e.scrollViewContent,showsVerticalScrollIndicator:true,children:i.length===0?o(s,{style:e.emptyState,children:[r(l,{style:e.emptyTitle,children:"No Queries Found"}),o(l,{style:e.emptyDescription,children:["No React Query queries are currently active.","\n\n","To see queries here:","\n","\u2022 Make API calls using useQuery","\n","\u2022 Ensure queries are within QueryClientProvider","\n","\u2022 Check console for debugging info"]}),r(Q,{})]}):i.map((t,b)=>{const n=g(t);const m=F({queryState:t.state,observerCount:t.getObserversCount(),isStale:t.isStale()});const h={blue:"#3B82F6",gray:"#6B7280",purple:"#8B5CF6",yellow:"#F59E0B",green:"#10B981",red:"#EF4444"};const f=h[m]||"#6B7280";const c=t===y;return o(C,{accessibilityLabel:`Query ${n}`,accessibilityHint:`View query ${n}`,"sentry-label":`ignore query ${n}`,style:[e.queryItem,c&&e.selectedQueryItem],onPress:()=>u(t),children:[r(s,{style:[e.statusDot,{backgroundColor:f}]}),r(l,{style:[e.queryText,c&&e.selectedQueryText],numberOfLines:1,children:n})]},`${t.queryHash}-${b}`)})})]})})})}const e=p.create({modalOverlay:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.5)",justifyContent:"center",alignItems:"center"},modalContent:{backgroundColor:"#1F1F1F",borderRadius:8,width:"80%",maxHeight:"80%",minHeight:"50%",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.1)",flex:0},modalHeader:{padding:16,borderBottomWidth:1,borderBottomColor:"rgba(255, 255, 255, 0.1)"},modalTitle:{color:"#FFFFFF",fontSize:16,fontWeight:"600",marginBottom:4},modalSubtitle:{color:"#9CA3AF",fontSize:12},scrollView:{flex:1},scrollViewContent:{padding:8,flexGrow:1},emptyState:{padding:32,alignItems:"center",justifyContent:"center"},emptyTitle:{color:"#E5E7EB",fontSize:16,fontWeight:"500",marginBottom:8,textAlign:"center"},emptyDescription:{color:"#9CA3AF",fontSize:14,textAlign:"center",lineHeight:20},queryItem:{flexDirection:"row",alignItems:"center",padding:8,borderRadius:4},selectedQueryItem:{backgroundColor:"rgba(255, 255, 255, 0.1)"},statusDot:{width:8,height:8,borderRadius:4,marginRight:8},queryText:{color:"#E5E7EB",fontSize:14,flex:1},selectedQueryText:{color:"#FFFFFF",fontWeight:"500"},trigger:{flexDirection:"row",alignItems:"center",backgroundColor:"rgba(255, 255, 255, 0.05)",borderRadius:4,paddingHorizontal:8,paddingVertical:6,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.1)",minWidth:120,maxWidth:200},triggerText:{color:"#E5E7EB",fontSize:12,flex:1,marginHorizontal:6}});
@@ -1 +1 @@
1
- "use strict";import{TouchableOpacity as s}from"react-native";import{Wifi as o}from"@buoy-gg/shared-ui";import{useWifiState as l}from"../hooks/useWifiState";import{jsx as t}from"react/jsx-runtime";export function WifiToggle({size:e=16,testID:r}){const{isOnline:i,handleWifiToggle:n}=l();return t(s,{"sentry-label":`ignore toggle WiFi ${i?"On":"Off"}`,testID:r,accessibilityRole:"button",accessibilityLabel:`WiFi ${i?"On":"Off"}`,accessibilityHint:`Tap to turn WiFi ${i?"off":"on"} for React Query`,onPress:n,hitSlop:{top:10,bottom:10,left:10,right:10},activeOpacity:.7,style:{alignItems:"center",justifyContent:"center",width:14,flexShrink:0},children:i?t(o,{size:e,color:"#10B981"}):t(o,{size:e,color:"#DC2626"})})}
1
+ "use strict";import{TouchableOpacity as c}from"react-native";import{Wifi as o}from"@buoy-gg/shared-ui";import{useWifiState as l}from"../hooks/useWifiState";import{jsx as t}from"react/jsx-runtime";export function WifiToggle({size:e=16,testID:s}){const{isOnline:i,handleWifiToggle:n}=l();return t(c,{"sentry-label":`ignore toggle WiFi ${i?"On":"Off"}`,testID:s,accessibilityRole:"switch",accessibilityLabel:"WiFi",accessibilityState:{checked:i},accessibilityHint:i?"Turn off to test offline mode":"Turn on to go back online",onPress:n,hitSlop:{top:10,bottom:10,left:10,right:10},activeOpacity:.7,style:{alignItems:"center",justifyContent:"center",width:14,flexShrink:0},children:i?t(o,{size:e,color:"#10B981"}):t(o,{size:e,color:"#DC2626"})})}
@@ -1 +1 @@
1
- "use strict";import n from"./Explorer";import{ScrollView as d,Text as i,View as o,StyleSheet as s}from"react-native";import c from"./MutationDetails";import{night as l,monoFont as p}from"@buoy-gg/shared-ui";import{jsx as e,jsxs as a}from"react/jsx-runtime";export default function x({selectedMutation:r}){return a(d,{"sentry-label":"ignore devtools mutation information scroll",style:t.flex1,contentContainerStyle:t.scrollContent,children:[e(o,{style:t.section,children:e(c,{selectedMutation:r})}),a(o,{style:t.section,children:[e(i,{style:t.textHeader,children:"Variables Details"}),e(o,{style:t.padding,children:e(n,{label:"Variables",value:r?.state.variables,defaultExpanded:["Variables"]})})]}),a(o,{style:t.section,children:[e(i,{style:t.textHeader,children:"Context Details"}),e(o,{style:t.padding,children:e(n,{label:"Context",value:r?.state.context,defaultExpanded:["Context"]})})]}),a(o,{style:t.section,children:[e(i,{style:t.textHeader,children:"Data Explorer"}),e(o,{style:t.padding,children:e(n,{label:"Data",defaultExpanded:["Data"],value:r?.state.data})})]}),a(o,{style:t.section,children:[e(i,{style:t.textHeader,children:"Mutations Explorer"}),e(o,{style:t.padding,children:e(n,{label:"Mutation",defaultExpanded:["Mutation"],value:r})})]})]})}const t=s.create({flex1:{flex:1,backgroundColor:"transparent"},scrollContent:{paddingBottom:16,paddingHorizontal:8},section:{marginBottom:16},textHeader:{textAlign:"left",backgroundColor:l.color.accent+"15",padding:12,fontSize:12,fontWeight:"700",color:l.color.accent,borderTopLeftRadius:8,borderTopRightRadius:8,borderBottomWidth:1,borderBottomColor:l.color.accent+"33",fontFamily:p,letterSpacing:1,textTransform:"uppercase"},padding:{padding:12,backgroundColor:l.color.surface,borderBottomLeftRadius:8,borderBottomRightRadius:8,borderWidth:1,borderColor:l.color.border,borderTopWidth:0}});
1
+ "use strict";import n from"./Explorer";import{ScrollView as i,Text as d,View as o,StyleSheet as s}from"react-native";import c from"./MutationDetails";import{night as a,monoFont as p}from"@buoy-gg/shared-ui";import{jsx as t,jsxs as l}from"react/jsx-runtime";export default function x({selectedMutation:r}){return l(i,{keyboardShouldPersistTaps:"handled","sentry-label":"ignore devtools mutation information scroll",style:e.flex1,contentContainerStyle:e.scrollContent,children:[t(o,{style:e.section,children:t(c,{selectedMutation:r})}),l(o,{style:e.section,children:[t(d,{style:e.textHeader,children:"Variables Details"}),t(o,{style:e.padding,children:t(n,{label:"Variables",value:r?.state.variables,defaultExpanded:["Variables"]})})]}),l(o,{style:e.section,children:[t(d,{style:e.textHeader,children:"Context Details"}),t(o,{style:e.padding,children:t(n,{label:"Context",value:r?.state.context,defaultExpanded:["Context"]})})]}),l(o,{style:e.section,children:[t(d,{style:e.textHeader,children:"Data Explorer"}),t(o,{style:e.padding,children:t(n,{label:"Data",defaultExpanded:["Data"],value:r?.state.data})})]}),l(o,{style:e.section,children:[t(d,{style:e.textHeader,children:"Mutations Explorer"}),t(o,{style:e.padding,children:t(n,{label:"Mutation",defaultExpanded:["Mutation"],value:r})})]})]})}const e=s.create({flex1:{flex:1,backgroundColor:"transparent"},scrollContent:{paddingBottom:16,paddingHorizontal:8},section:{marginBottom:16},textHeader:{textAlign:"left",backgroundColor:a.color.accent+"15",padding:12,fontSize:12,fontWeight:"700",color:a.color.accent,borderTopLeftRadius:8,borderTopRightRadius:8,borderBottomWidth:1,borderBottomColor:a.color.accent+"33",fontFamily:p,letterSpacing:1,textTransform:"uppercase"},padding:{padding:12,backgroundColor:a.color.surface,borderBottomLeftRadius:8,borderBottomRightRadius:8,borderWidth:1,borderColor:a.color.border,borderTopWidth:0}});
@@ -1 +1 @@
1
- "use strict";import{useState as E,useRef as g,useMemo as L,useCallback as T}from"react";import{View as d,StyleSheet as v,PanResponder as B,Animated as y,Dimensions as W,FlatList as $}from"react-native";import D from"./MutationButton";import N from"./MutationInformation";import _ from"../../hooks/useAllMutations";import{night as r,ToolEmptyState as z,monoFont as q}from"@buoy-gg/shared-ui";import{jsx as n,jsxs as H}from"react/jsx-runtime";export default function K({selectedMutation:c,setSelectedMutation:b,activeFilter:s,hideInfoPanel:R=false,contentContainerStyle:S,searchText:m=""}){const{mutations:C}=_();const k=t=>{if(t.state.isPaused)return"paused";const e=t.state.status;return e};const I=L(()=>{let t=C;if(s){t=t.filter(e=>{const o=k(e);return o===s})}if(m){const e=m.toLowerCase();t=t.filter(o=>{const l=o.options.mutationKey;if(!l)return false;const V=Array.isArray(l)?l:[l];const j=V.filter(h=>h!=null).map(h=>String(h)).join(" ").toLowerCase();return j.includes(e)})}return t},[C,s,m]);const M=W.get("window").height;const f=M*.4;const x=150;const w=M*.7;const i=g(new y.Value(f)).current;const[,p]=E(f);const u=g(f);const P=g(B.create({onMoveShouldSetPanResponder:(t,e)=>{return Math.abs(e.dy)>Math.abs(e.dx)&&Math.abs(e.dy)>10},onPanResponderGrant:()=>{i.stopAnimation(t=>{p(t);u.current=t;i.setValue(t)})},onPanResponderMove:(t,e)=>{const o=u.current-e.dy;const l=Math.max(x,Math.min(w,o));i.setValue(l)},onPanResponderRelease:(t,e)=>{const o=Math.max(x,Math.min(w,u.current-e.dy));p(o);u.current=o;y.timing(i,{toValue:o,duration:200,useNativeDriver:false}).start(()=>{i.setValue(o);p(o);u.current=o})}})).current;const A=T(({item:t})=>n(D,{selected:c,setSelectedMutation:b,mutation:t}),[c,b]);return H(d,{style:a.container,children:[I.length>0?n(d,{style:a.listWrapper,children:n($,{"sentry-label":"ignore devtools mutations list",testID:"buoy-rq-mutation-list",data:I,renderItem:A,keyExtractor:(t,e)=>`${t.mutationId}-${t.state.submittedAt}-${t.state.status}-${e}`,inverted:true,showsVerticalScrollIndicator:true,removeClippedSubviews:!(typeof process!=="undefined"&&process.env?.EXPO_PUBLIC_E2E),contentContainerStyle:S||a.listContent,initialNumToRender:10,maxToRenderPerBatch:10,windowSize:10,scrollEnabled:false})}):n(z,{testID:"buoy-rq-mutations-empty",otto:s?"filtering":"scanning",title:"No mutations found",message:s?`No ${s} mutations. Pick another status to see the rest.`:"Mutations run through useMutation will appear here."}),c&&!R&&H(y.View,{style:[a.mutationInfo,{height:i}],children:[n(d,{style:a.dragHandle,...P.panHandlers,children:n(d,{style:a.dragIndicator})}),n(d,{style:a.mutationInfoContent,children:n(N,{selectedMutation:c})})]})]})}const a=v.create({container:{flex:1,backgroundColor:"transparent"},listWrapper:{flex:1},listContent:{backgroundColor:"transparent",paddingHorizontal:8,paddingTop:8},mutationInfo:{borderTopWidth:1,borderTopColor:r.color.border,backgroundColor:"transparent"},dragHandle:{height:20,justifyContent:"center",alignItems:"center",backgroundColor:r.color.surface,borderBottomWidth:1,borderBottomColor:r.color.border},dragIndicator:{width:40,height:4,backgroundColor:r.color.placeholder,borderRadius:2},mutationInfoContent:{flex:1,backgroundColor:"transparent"},emptyContainer:{flex:1,justifyContent:"center",alignItems:"center",padding:32,backgroundColor:r.color.surface,margin:16,borderRadius:8,borderWidth:1,borderColor:r.color.border},emptyText:{color:r.color.textTertiary,fontSize:14,textAlign:"center",fontFamily:q,letterSpacing:.5}});
1
+ "use strict";import{useState as T,useRef as g,useMemo as E,useCallback as L}from"react";import{View as d,StyleSheet as v,PanResponder as B,Animated as y,Dimensions as W,FlatList as $}from"react-native";import D from"./MutationButton";import N from"./MutationInformation";import _ from"../../hooks/useAllMutations";import{night as r,ToolEmptyState as z,monoFont as q}from"@buoy-gg/shared-ui";import{jsx as n,jsxs as H}from"react/jsx-runtime";export default function K({selectedMutation:c,setSelectedMutation:b,activeFilter:s,hideInfoPanel:S=false,contentContainerStyle:k,searchText:m=""}){const{mutations:C}=_();const R=t=>{if(t.state.isPaused)return"paused";const e=t.state.status;return e};const I=E(()=>{let t=C;if(s){t=t.filter(e=>{const o=R(e);return o===s})}if(m){const e=m.toLowerCase();t=t.filter(o=>{const l=o.options.mutationKey;if(!l)return false;const V=Array.isArray(l)?l:[l];const j=V.filter(h=>h!=null).map(h=>String(h)).join(" ").toLowerCase();return j.includes(e)})}return t},[C,s,m]);const M=W.get("window").height;const f=M*.4;const x=150;const w=M*.7;const i=g(new y.Value(f)).current;const[,p]=T(f);const u=g(f);const P=g(B.create({onMoveShouldSetPanResponder:(t,e)=>{return Math.abs(e.dy)>Math.abs(e.dx)&&Math.abs(e.dy)>10},onPanResponderGrant:()=>{i.stopAnimation(t=>{p(t);u.current=t;i.setValue(t)})},onPanResponderMove:(t,e)=>{const o=u.current-e.dy;const l=Math.max(x,Math.min(w,o));i.setValue(l)},onPanResponderRelease:(t,e)=>{const o=Math.max(x,Math.min(w,u.current-e.dy));p(o);u.current=o;y.timing(i,{toValue:o,duration:200,useNativeDriver:false}).start(()=>{i.setValue(o);p(o);u.current=o})}})).current;const A=L(({item:t})=>n(D,{selected:c,setSelectedMutation:b,mutation:t}),[c,b]);return H(d,{style:a.container,children:[I.length>0?n(d,{style:a.listWrapper,children:n($,{keyboardShouldPersistTaps:"handled","sentry-label":"ignore devtools mutations list",testID:"buoy-rq-mutation-list",data:I,renderItem:A,keyExtractor:(t,e)=>`${t.mutationId}-${t.state.submittedAt}-${t.state.status}-${e}`,inverted:true,showsVerticalScrollIndicator:true,removeClippedSubviews:!(typeof process!=="undefined"&&process.env?.EXPO_PUBLIC_E2E),contentContainerStyle:k||a.listContent,initialNumToRender:10,maxToRenderPerBatch:10,windowSize:10,scrollEnabled:false})}):n(z,{testID:"buoy-rq-mutations-empty",otto:s?"filtering":"scanning",title:"No mutations found",message:s?`No ${s} mutations. Pick another status to see the rest.`:"Mutations run through useMutation will appear here."}),c&&!S&&H(y.View,{style:[a.mutationInfo,{height:i}],children:[n(d,{style:a.dragHandle,...P.panHandlers,children:n(d,{style:a.dragIndicator})}),n(d,{style:a.mutationInfoContent,children:n(N,{selectedMutation:c})})]})]})}const a=v.create({container:{flex:1,backgroundColor:"transparent"},listWrapper:{flex:1},listContent:{backgroundColor:"transparent",paddingHorizontal:8,paddingTop:8},mutationInfo:{borderTopWidth:1,borderTopColor:r.color.border,backgroundColor:"transparent"},dragHandle:{height:20,justifyContent:"center",alignItems:"center",backgroundColor:r.color.surface,borderBottomWidth:1,borderBottomColor:r.color.border},dragIndicator:{width:40,height:4,backgroundColor:r.color.placeholder,borderRadius:2},mutationInfoContent:{flex:1,backgroundColor:"transparent"},emptyContainer:{flex:1,justifyContent:"center",alignItems:"center",padding:32,backgroundColor:r.color.surface,margin:16,borderRadius:8,borderWidth:1,borderColor:r.color.border},emptyText:{color:r.color.textTertiary,fontSize:14,textAlign:"center",fontFamily:q,letterSpacing:.5}});
@@ -1 +1 @@
1
- "use strict";import{useMemo as K,useCallback as q}from"react";import{StyleSheet as k,FlatList as L}from"react-native";import x from"./QueryRow";import E from"../../hooks/useAllQueries";import{getQueryStatusLabel as j}from"../../utils/getQueryStatusLabel";import{night as c,ToolEmptyState as H,EVENT_LIST_PRESET as I,monoFont as T}from"@buoy-gg/shared-ui";import{jsx as m}from"react/jsx-runtime";export default function $({selectedQuery:s,onQuerySelect:i,activeFilter:n,emptyStateMessage:g,emptyState:C,contentContainerStyle:b,queries:h,searchText:u="",ignoredPatterns:l=new Set,includedPatterns:y=new Set}){const w=E();const d=h??w;const p=K(()=>{let e=d;if(n){e=e.filter(t=>{const o=j(t);return o===n})}if(u){const t=u.toLowerCase();e=e.filter(o=>{if(!o?.queryKey)return false;const a=Array.isArray(o.queryKey)?o.queryKey:[o.queryKey];const r=a.filter(f=>f!=null).map(f=>String(f)).join(" ").toLowerCase();return r.includes(t)})}if(y.size>0){e=e.filter(t=>{if(!t?.queryKey)return false;const o=Array.isArray(t.queryKey)?t.queryKey:[t.queryKey];const a=o.filter(r=>r!=null).map(r=>String(r)).join(" ").toLowerCase();return Array.from(y).some(r=>a.includes(r.toLowerCase()))})}if(l.size>0){e=e.filter(t=>{if(!t?.queryKey)return true;const o=Array.isArray(t.queryKey)?t.queryKey:[t.queryKey];const a=o.filter(r=>r!=null).map(r=>String(r)).join(" ").toLowerCase();return!Array.from(l).some(r=>a.includes(r.toLowerCase()))})}e.sort((t,o)=>{const a=t.state.dataUpdatedAt||0;const r=o.state.dataUpdatedAt||0;return r-a});return e},[d,n,u,y,l]);const A=q(e=>{const t=s?.queryHash===e.queryHash;if(t){i(void 0);return}i(e)},[s?.queryHash,i]);if(p.length===0){return m(H,{testID:"buoy-rq-empty",...C??{otto:"empty",title:"No queries found",message:g||(n?`No ${n} queries found`:"No queries found")}})}return m(L,{testID:"buoy-rq-query-list",style:S.listWrapper,contentContainerStyle:b||S.listContent,data:p,keyExtractor:Q,renderItem:({item:e})=>m(x,{query:e,stateSig:N(e),isSelected:s?.queryHash===e.queryHash,onSelect:A}),showsVerticalScrollIndicator:true,...I})}const Q=s=>s.queryHash;function N(s){let i=0;let n=false;try{i=s.getObserversCount();n=s.isStale()}catch{}return`${s.state.dataUpdatedAt}|${s.state.fetchStatus}|${s.state.status}|${i}|${n}`}const S=k.create({listWrapper:{flexGrow:1},listContent:{paddingBottom:16,backgroundColor:"transparent"},emptyContainer:{flex:1,justifyContent:"center",alignItems:"center",padding:32,backgroundColor:c.color.surface,margin:16,borderRadius:8,borderWidth:1,borderColor:c.color.border},emptyText:{color:c.color.textTertiary,fontSize:14,textAlign:"center",fontFamily:T,letterSpacing:.5}});
1
+ "use strict";import{useMemo as K,useCallback as k}from"react";import{StyleSheet as q,FlatList as L}from"react-native";import x from"./QueryRow";import E from"../../hooks/useAllQueries";import{getQueryStatusLabel as T}from"../../utils/getQueryStatusLabel";import{night as c,ToolEmptyState as j,EVENT_LIST_PRESET as H,monoFont as I}from"@buoy-gg/shared-ui";import{jsx as m}from"react/jsx-runtime";export default function $({selectedQuery:s,onQuerySelect:i,activeFilter:n,emptyStateMessage:g,emptyState:C,contentContainerStyle:h,queries:b,searchText:u="",ignoredPatterns:l=new Set,includedPatterns:y=new Set}){const w=E();const d=b??w;const p=K(()=>{let e=d;if(n){e=e.filter(t=>{const o=T(t);return o===n})}if(u){const t=u.toLowerCase();e=e.filter(o=>{if(!o?.queryKey)return false;const a=Array.isArray(o.queryKey)?o.queryKey:[o.queryKey];const r=a.filter(f=>f!=null).map(f=>String(f)).join(" ").toLowerCase();return r.includes(t)})}if(y.size>0){e=e.filter(t=>{if(!t?.queryKey)return false;const o=Array.isArray(t.queryKey)?t.queryKey:[t.queryKey];const a=o.filter(r=>r!=null).map(r=>String(r)).join(" ").toLowerCase();return Array.from(y).some(r=>a.includes(r.toLowerCase()))})}if(l.size>0){e=e.filter(t=>{if(!t?.queryKey)return true;const o=Array.isArray(t.queryKey)?t.queryKey:[t.queryKey];const a=o.filter(r=>r!=null).map(r=>String(r)).join(" ").toLowerCase();return!Array.from(l).some(r=>a.includes(r.toLowerCase()))})}e.sort((t,o)=>{const a=t.state.dataUpdatedAt||0;const r=o.state.dataUpdatedAt||0;return r-a});return e},[d,n,u,y,l]);const A=k(e=>{const t=s?.queryHash===e.queryHash;if(t){i(void 0);return}i(e)},[s?.queryHash,i]);if(p.length===0){return m(j,{testID:"buoy-rq-empty",...C??{otto:"empty",title:"No queries found",message:g||(n?`No ${n} queries found`:"No queries found")}})}return m(L,{keyboardShouldPersistTaps:"handled",testID:"buoy-rq-query-list",style:S.listWrapper,contentContainerStyle:h||S.listContent,data:p,keyExtractor:Q,renderItem:({item:e})=>m(x,{query:e,stateSig:N(e),isSelected:s?.queryHash===e.queryHash,onSelect:A}),showsVerticalScrollIndicator:true,...H})}const Q=s=>s.queryHash;function N(s){let i=0;let n=false;try{i=s.getObserversCount();n=s.isStale()}catch{}return`${s.state.dataUpdatedAt}|${s.state.fetchStatus}|${s.state.status}|${i}|${n}`}const S=q.create({listWrapper:{flexGrow:1},listContent:{paddingBottom:16,backgroundColor:"transparent"},emptyContainer:{flex:1,justifyContent:"center",alignItems:"center",padding:32,backgroundColor:c.color.surface,margin:16,borderRadius:8,borderWidth:1,borderColor:c.color.border},emptyText:{color:c.color.textTertiary,fontSize:14,textAlign:"center",fontFamily:I,letterSpacing:.5}});
@@ -1 +1 @@
1
- "use strict";import c from"./QueryDetails";import d from"./QueryActions";import i from"./Explorer";import{View as o,Text as a,ScrollView as y,StyleSheet as u}from"react-native";import{night as n}from"@buoy-gg/shared-ui";import{jsx as e,jsxs as l}from"react/jsx-runtime";export default function f({selectedQuery:r,setSelectedQuery:s}){return l(y,{"sentry-label":"ignore devtools query info scroll",style:t.flexOne,contentContainerStyle:t.scrollContent,children:[e(o,{style:t.section,children:e(c,{query:r})}),e(o,{style:t.section,children:e(d,{query:r,setSelectedQuery:s})}),l(o,{style:t.section,children:[e(a,{style:t.headerText,children:"Data Explorer"}),e(o,{style:t.contentView,children:e(i,{editable:true,label:"Data",value:r?.state.data,defaultExpanded:["Data"],activeQuery:r})})]}),l(o,{style:t.section,children:[e(a,{style:t.headerText,children:"Query Explorer"}),e(o,{style:t.contentView,children:e(i,{label:"Query",value:r,defaultExpanded:["Query","queryKey"],activeQuery:r})})]})]})}const t=u.create({flexOne:{flex:1,backgroundColor:"transparent"},scrollContent:{paddingBottom:16,paddingHorizontal:8},section:{marginBottom:16},headerText:{fontSize:16,fontWeight:"600",color:n.color.text,marginBottom:8,textAlign:"left"},contentView:{backgroundColor:n.color.surface,borderRadius:12,borderWidth:1,borderColor:n.color.border,padding:16}});
1
+ "use strict";import d from"./QueryDetails";import c from"./QueryActions";import i from"./Explorer";import{View as o,Text as a,ScrollView as y,StyleSheet as u}from"react-native";import{night as l}from"@buoy-gg/shared-ui";import{jsx as e,jsxs as n}from"react/jsx-runtime";export default function f({selectedQuery:r,setSelectedQuery:s}){return n(y,{keyboardShouldPersistTaps:"handled","sentry-label":"ignore devtools query info scroll",style:t.flexOne,contentContainerStyle:t.scrollContent,children:[e(o,{style:t.section,children:e(d,{query:r})}),e(o,{style:t.section,children:e(c,{query:r,setSelectedQuery:s})}),n(o,{style:t.section,children:[e(a,{style:t.headerText,children:"Data Explorer"}),e(o,{style:t.contentView,children:e(i,{editable:true,label:"Data",value:r?.state.data,defaultExpanded:["Data"],activeQuery:r})})]}),n(o,{style:t.section,children:[e(a,{style:t.headerText,children:"Query Explorer"}),e(o,{style:t.contentView,children:e(i,{label:"Query",value:r,defaultExpanded:["Query","queryKey"],activeQuery:r})})]})]})}const t=u.create({flexOne:{flex:1,backgroundColor:"transparent"},scrollContent:{paddingBottom:16,paddingHorizontal:8},section:{marginBottom:16},headerText:{fontSize:16,fontWeight:"600",color:l.color.text,marginBottom:8,textAlign:"left"},contentView:{backgroundColor:l.color.surface,borderRadius:12,borderWidth:1,borderColor:l.color.border,padding:16}});
@@ -1 +1 @@
1
- "use strict";import{expandKeyedArrays as O,patchFromPath as M,readPath as $,refusalText as D,shapeSummary as b,suggestedPatch as K,typedEditViolations as R,unshapedLists as j}from"@buoy-gg/shared-ui";import{onlineManager as Q}from"@tanstack/react-query";import{capQueryDetail as E,dehydrateQueryClient as T}from"./dehydrate";import{getQueryStatusLabel as L}from"../utils/getQueryStatusLabel";function N(r,a){let t=r;for(const e of a.split(".")){if(!t||typeof t!=="object"||Array.isArray(t))return false;if(!(e in t))return false;t=t[e]}return Array.isArray(t)?t.length>0:!!t&&typeof t==="object"}const m=r=>!!r&&typeof r==="object"&&!Array.isArray(r);function S(r){if(Array.isArray(r))return"array";if(r===null)return"null";if(typeof r==="object")return"object";return typeof r}function k(r,a,t="",e={shrunk:[],breaks:[]}){if(Array.isArray(r)&&Array.isArray(a)){if(a.length>0&&a.length<r.length){e.shrunk.push({path:t||"(root)",have:r.length,sent:a.length})}return a}if(!m(r)||!m(a))return a;const s={...r};for(const[n,u]of Object.entries(a)){const c=t?`${t}.${n}`:n;if(n in r){const d=S(r[n]);const f=S(u);if((d==="array"||d==="object")&&d!==f){e.breaks.push({path:c,from:d,to:f})}s[n]=k(r[n],u,c,e)}else{s[n]=u}}return s}function x(r){const a=r.trim();try{const t=JSON.parse(a);if(Array.isArray(t)){return t.map(e=>typeof e==="object"&&e!==null?JSON.stringify(e):String(e))}}catch{}if(a.includes(",")&&!a.startsWith("[")){return a.split(",").map(t=>t.trim().replace(/^["']|["']$/g,""))}return null}function H(r){let a;for(const t of r.observers??[]){const e=t.options?.refetchInterval;let s=e;if(typeof e==="function"){try{s=e(r)}catch{s=void 0}}if(typeof s==="number"&&s>0)a=a===void 0?s:Math.min(a,s)}return a}export function createReactQuerySyncAdapter(r){const a=t=>{const{queryHash:e}=t;const s=r.getQueryCache();let n=e?s.get(e):void 0;if(!n&&typeof e==="string"){const u=x(e);if(u){n=s.getAll().find(c=>{const d=c.queryKey.map(f=>typeof f==="object"?JSON.stringify(f):String(f));return d.length===u.length&&d.every((f,h)=>f===u[h])})}}if(!n){throw new Error(`Query with hash "${e}" not found`)}return n};return{version:2,getSnapshot:()=>({dehydratedState:T(r),isOnlineManagerOnline:Q.isOnline()}),subscribe:t=>{const e=r.getQueryCache().subscribe(t);const s=r.getMutationCache().subscribe(t);const n=Q.subscribe(t);return()=>{e();s();n()}},actions:{getQueryData:t=>{const{queryHash:e,path:s}=t??{};if(!e)return{found:false,reason:"missing queryHash"};const n=r.getQueryCache().get(e);if(!n)return{found:false,reason:"unknown queryHash"};if(s){const c=$(n.state.data,s);if(!c.ok)return{found:false,reason:c.error};return{found:true,queryHash:e,path:s,shape:b(c.value),data:c.value}}if(n.state.data===void 0){const c=n.state.status;const d=n.state.error;return{found:true,queryHash:e,hasData:false,status:c,fetchStatus:n.state.fetchStatus,...d?{error:d instanceof Error?d.message:String(d)}:{},reason:c==="error"?"This query has no data because it FAILED. Report the error, not an empty result.":n.state.fetchStatus==="fetching"?"No data yet \u2014 this query is still fetching.":"This query has never resolved (it may be disabled, or never enabled). It is not empty \u2014 it has nothing."}}const u=b(n.state.data);return{found:true,queryHash:e,hasData:true,...u?{shape:u}:{},data:E(n.state.data)}},listQueries:t=>{const{includeData:e=false,staleOnly:s=false,limit:n}=t??{};const u=r.getQueryCache().getAll();const c=s?u.filter(o=>o.isStale()):u;const d=[...c].sort((o,y)=>{const g=Number(y.getObserversCount()>0)-Number(o.getObserversCount()>0);return g!==0?g:(y.state.dataUpdatedAt??0)-(o.state.dataUpdatedAt??0)});const f=typeof n==="number"&&n>0?d.slice(0,n):d;const h=f.map(o=>{const y=o.state.error;const g=H(o);return{queryHash:o.queryHash,queryKey:o.queryKey,status:L(o),fetchStatus:o.state.fetchStatus,isStale:o.isStale(),observers:o.getObserversCount(),updatedAt:o.state.dataUpdatedAt,...g?{refetchEveryMs:g}:{},error:y?y.message??String(y):void 0,...e?{data:o.state.data}:{},...b(o.state.data)?{shape:b(o.state.data)}:{}}});return{queries:h,total:u.length,returned:h.length,includedData:e}},refetch:t=>{const e=a(t);return e.fetch().catch(()=>void 0)},invalidate:t=>r.invalidateQueries(a(t)),reset:t=>r.resetQueries(a(t)),remove:t=>{const e=a(t);const s=r.getQueryCache().findAll(e).some(n=>n.getObserversCount()>0);r.removeQueries(e);return{ok:true,...s?{note:"Removed \u2014 but a screen is still watching this query, and React Query leaves that screen rendering its LAST value (including anything written into the cache before this) until something refetches. Nothing on screen will change on its own. Use `reset` instead when you want the screen to go back to loading and fetch again."}:{}}},setQueryData:t=>{const{data:e,merge:s,force:n,path:u,value:c}=t;const{queryKey:d,queryHash:f}=t;let h=d;if(h===void 0&&typeof f==="string"){const i=r.getQueryCache().get(f);if(!i){return{ok:false,error:`Refused: no query with hash ${f} is in the cache. Read listQueries for the current hashes \u2014 a query that has been removed or whose key includes changing params (a search term, a cart payload) will not match an older hash.`}}h=i.queryKey}if(h===void 0){return{ok:false,error:`Refused: no query was named. Send \`queryKey\` (the array from listQueries) or \`queryHash\` (its string form).`}}const o=r.getQueryData(h);const y=r.getQueryCache().find({queryKey:h,exact:true});if(o===void 0&&y&&(e!==void 0||u!==void 0)){const i=y;const l=i?.state.status;const v=l==="error"?`it FAILED${i?.state.error?` (${i.state.error instanceof Error?i.state.error.message:String(i.state.error)})`:""}`:l==="pending"?"it has never resolved (it may be disabled, or still loading)":"it holds no data";return{ok:false,error:`Refused: this query has no data to edit \u2014 ${v}. There is nothing to merge into. Fix the cause first (restoreError, or let it fetch), or send force:true with the COMPLETE value if you mean to seed the cache from nothing.`,status:l}}if(e===void 0&&u===void 0){return{ok:false,error:`Refused: no change was described. Send \`data\` (with merge:true for a partial edit), or \`path\` and \`value\` to set one value.`}}let g=e;if(u!==void 0){if(c===void 0){return{ok:false,error:`Refused: sent \`path\` without \`value\`. Say what to set "${u}" to; if you mean to clear it, send value:null and the field must already be nullable.`}}const i=M(o,u,c);if(!i.ok)return{ok:false,error:`Refused: ${i.error}`};g=i.patch}if(s||u!==void 0){const i=n?{patch:g,notes:[],error:void 0}:O(o,g);if(i.error){return{ok:false,error:`Refused: ${i.error}`}}const l=i.patch;if(!n){const p=R(o,l,{noun:"data"});if(p.length>0){const w=K(l,p);return{ok:false,error:D(p,"data",w),violations:p,...w?{suggestedData:w}:{}}}}const v=k(o,l);const A=j(o).filter(p=>N(l,p));r.setQueryData(h,v,{updatedAt:Date.now()});return{ok:true,mode:"merge",...u!==void 0?{path:u}:{},changedKeys:m(l)?Object.keys(l):void 0,...i.notes.length?{keyed:i.notes}:{},...A.length?{unchecked:A.map(p=>`\`${p}\` was empty, so nothing in the app knows what its items look like and the shape of what you added was NOT checked. If the screen renders a field you left out, it will render undefined \u2014 read the query back and compare against how the screen uses it.`)}:{}}}if(!n&&m(o)&&m(e)){const i=Object.keys(o).filter(l=>!(l in e));if(i.length>0){return{ok:false,error:`Refused: the new value drops ${i.length} top-level field(s) the cached value has (${i.slice(0,8).join(", ")}${i.length>8?", \u2026":""}). A screen rendering those fields would crash. To change some fields, send merge:true with ONLY the fields that change. To really replace the whole value, send force:true.`,missingKeys:i}}}r.setQueryData(h,e,{updatedAt:Date.now()});return{ok:true,mode:"replace"}},triggerError:t=>{const e=a(t);const s=e.options;e.setState({status:"error",error:new Error("Unknown error from devtools"),fetchMeta:{...e.state.fetchMeta,__previousQueryOptions:s}})},restoreError:t=>{void r.resetQueries(a(t)).catch(()=>void 0);return{restored:true}},triggerLoading:t=>{const e=a(t);const s=e.options;e.fetch({...s,queryFn:()=>new Promise(()=>{}),gcTime:-1}).catch(()=>void 0);e.setState({data:void 0,status:"pending",fetchMeta:{...e.state.fetchMeta,__previousQueryOptions:s}})},restoreLoading:t=>{const e=a(t);const s=e.state;const n=e.state.fetchMeta?e.state.fetchMeta.__previousQueryOptions:null;e.cancel({silent:true});e.setState({...s,fetchStatus:"idle",fetchMeta:null});if(n){e.fetch(n).catch(()=>void 0)}},clearQueryCache:()=>{const t=r.getQueryCache().getAll().filter(e=>e.getObserversCount()>0).length;r.getQueryCache().clear();return{ok:true,cleared:true,...t?{note:`Cleared \u2014 but ${t} quer${t===1?"y is":"ies are"} still being watched by a screen, and React Query leaves those screens rendering their LAST value until something refetches. The cache is empty; the app on screen is not. Use \`reset\` on a query when you want its screen to reload.`}:{}}},clearMutationCache:()=>{r.getMutationCache().clear()},setOnline:t=>{const{online:e}=t;Q.setOnline(e)}}}}
1
+ "use strict";import{expandKeyedArrays as O,patchFromPath as M,readPath as $,refusalText as j,shapeSummary as b,suggestedPatch as D,typedEditViolations as K,unshapedLists as R}from"@buoy-gg/shared-ui";import{onlineManager as Q}from"@tanstack/react-query";import{capQueryDetail as E,dehydrateQueryClient as T}from"./dehydrate";import{getQueryStatusLabel as L}from"../utils/getQueryStatusLabel";function x(r,a){let t=r;for(const e of a.split(".")){if(!t||typeof t!=="object"||Array.isArray(t))return false;if(!(e in t))return false;t=t[e]}return Array.isArray(t)?t.length>0:!!t&&typeof t==="object"}const m=r=>!!r&&typeof r==="object"&&!Array.isArray(r);function A(r){if(Array.isArray(r))return"array";if(r===null)return"null";if(typeof r==="object")return"object";return typeof r}function k(r,a,t="",e={shrunk:[],breaks:[]}){if(Array.isArray(r)&&Array.isArray(a)){if(a.length>0&&a.length<r.length){e.shrunk.push({path:t||"(root)",have:r.length,sent:a.length})}return a}if(!m(r)||!m(a))return a;const s={...r};for(const[n,i]of Object.entries(a)){const c=t?`${t}.${n}`:n;if(n in r){const d=A(r[n]);const f=A(i);if((d==="array"||d==="object")&&d!==f){e.breaks.push({path:c,from:d,to:f})}s[n]=k(r[n],i,c,e)}else{s[n]=i}}return s}function N(r){const a=r.trim();try{const t=JSON.parse(a);if(Array.isArray(t)){return t.map(e=>typeof e==="object"&&e!==null?JSON.stringify(e):String(e))}}catch{}if(a.includes(",")&&!a.startsWith("[")){return a.split(",").map(t=>t.trim().replace(/^["']|["']$/g,""))}return null}export function queryErrorText(r){if(r instanceof Error)return r.message;if(r&&typeof r==="object"){const{message:a,code:t,status:e}=r;const s=[e,t,a].filter(n=>typeof n==="string"||typeof n==="number");if(s.length)return[...new Set(s.map(String))].join(" ");try{return JSON.stringify(r)}catch{return String(r)}}return String(r)}function H(r){let a;for(const t of r.observers??[]){const e=t.options?.refetchInterval;let s=e;if(typeof e==="function"){try{s=e(r)}catch{s=void 0}}if(typeof s==="number"&&s>0)a=a===void 0?s:Math.min(a,s)}return a}export function createReactQuerySyncAdapter(r){const a=t=>{const{queryHash:e}=t;const s=r.getQueryCache();let n=e?s.get(e):void 0;if(!n&&typeof e==="string"){const i=N(e);if(i){n=s.getAll().find(c=>{const d=c.queryKey.map(f=>typeof f==="object"?JSON.stringify(f):String(f));return d.length===i.length&&d.every((f,h)=>f===i[h])})}}if(!n){throw new Error(`Query with hash "${e}" not found`)}return n};return{version:2,getSnapshot:()=>({dehydratedState:T(r),isOnlineManagerOnline:Q.isOnline()}),subscribe:t=>{const e=r.getQueryCache().subscribe(t);const s=r.getMutationCache().subscribe(t);const n=Q.subscribe(t);return()=>{e();s();n()}},actions:{getQueryData:t=>{const{queryHash:e,path:s}=t??{};if(!e)return{found:false,reason:"missing queryHash"};const n=r.getQueryCache().get(e);if(!n)return{found:false,reason:"unknown queryHash"};if(s){const c=$(n.state.data,s);if(!c.ok)return{found:false,reason:c.error};return{found:true,queryHash:e,path:s,shape:b(c.value),data:c.value}}if(n.state.data===void 0){const c=n.state.status;const d=n.state.error;return{found:true,queryHash:e,hasData:false,status:c,fetchStatus:n.state.fetchStatus,...d?{error:queryErrorText(d)}:{},reason:c==="error"?"This query has no data because it FAILED. Report the error, not an empty result.":n.state.fetchStatus==="fetching"?"No data yet \u2014 this query is still fetching.":"This query has never resolved (it may be disabled, or never enabled). It is not empty \u2014 it has nothing."}}const i=b(n.state.data);return{found:true,queryHash:e,hasData:true,...i?{shape:i}:{},data:E(n.state.data)}},listQueries:t=>{const{includeData:e=false,staleOnly:s=false,limit:n}=t??{};const i=r.getQueryCache().getAll();const c=s?i.filter(o=>o.isStale()):i;const d=[...c].sort((o,y)=>{const g=Number(y.getObserversCount()>0)-Number(o.getObserversCount()>0);return g!==0?g:(y.state.dataUpdatedAt??0)-(o.state.dataUpdatedAt??0)});const f=typeof n==="number"&&n>0?d.slice(0,n):d;const h=f.map(o=>{const y=o.state.error;const g=H(o);return{queryHash:o.queryHash,queryKey:o.queryKey,status:L(o),fetchStatus:o.state.fetchStatus,isStale:o.isStale(),observers:o.getObserversCount(),updatedAt:o.state.dataUpdatedAt,...g?{refetchEveryMs:g}:{},error:y?queryErrorText(y):void 0,...e?{data:o.state.data}:{},...b(o.state.data)?{shape:b(o.state.data)}:{}}});return{queries:h,total:i.length,returned:h.length,includedData:e}},refetch:t=>{const e=a(t);const s=e.fetch().catch(()=>void 0);return t?.wait===false?void 0:s},invalidate:t=>{const e=r.invalidateQueries(a(t));return t?.wait===false?void 0:e},reset:t=>r.resetQueries(a(t)),remove:t=>{const e=a(t);const s=r.getQueryCache().findAll(e).some(n=>n.getObserversCount()>0);r.removeQueries(e);return{ok:true,...s?{note:"Removed \u2014 but a screen is still watching this query, and React Query leaves that screen rendering its LAST value (including anything written into the cache before this) until something refetches. Nothing on screen will change on its own. Use `reset` instead when you want the screen to go back to loading and fetch again."}:{}}},setQueryData:t=>{const{data:e,merge:s,force:n,path:i,value:c}=t;const{queryKey:d,queryHash:f}=t;let h=d;if(h===void 0&&typeof f==="string"){const u=r.getQueryCache().get(f);if(!u){return{ok:false,error:`Refused: no query with hash ${f} is in the cache. Read listQueries for the current hashes \u2014 a query that has been removed or whose key includes changing params (a search term, a cart payload) will not match an older hash.`}}h=u.queryKey}if(h===void 0){return{ok:false,error:`Refused: no query was named. Send \`queryKey\` (the array from listQueries) or \`queryHash\` (its string form).`}}const o=r.getQueryData(h);const y=r.getQueryCache().find({queryKey:h,exact:true});if(o===void 0&&y&&(e!==void 0||i!==void 0)){const u=y;const l=u?.state.status;const w=l==="error"?`it FAILED${u?.state.error?` (${queryErrorText(u.state.error)})`:""}`:l==="pending"?"it has never resolved (it may be disabled, or still loading)":"it holds no data";return{ok:false,error:`Refused: this query has no data to edit \u2014 ${w}. There is nothing to merge into. Fix the cause first (restoreError, or let it fetch), or send force:true with the COMPLETE value if you mean to seed the cache from nothing.`,status:l}}if(e===void 0&&i===void 0){return{ok:false,error:`Refused: no change was described. Send \`data\` (with merge:true for a partial edit), or \`path\` and \`value\` to set one value.`}}let g=e;if(i!==void 0){if(c===void 0){return{ok:false,error:`Refused: sent \`path\` without \`value\`. Say what to set "${i}" to; if you mean to clear it, send value:null and the field must already be nullable.`}}const u=M(o,i,c);if(!u.ok)return{ok:false,error:`Refused: ${u.error}`};g=u.patch}if(s||i!==void 0){const u=O(o,g);if(u.error){return{ok:false,error:`Refused: ${u.error}`}}const l=u.patch;if(!n){const p=K(o,l,{noun:"data"});if(p.length>0){const v=D(l,p);return{ok:false,error:j(p,"data",v),violations:p,...v?{suggestedData:v}:{}}}}const w=k(o,l);const S=R(o).filter(p=>x(l,p));r.setQueryData(h,w,{updatedAt:Date.now()});return{ok:true,mode:"merge",...i!==void 0?{path:i}:{},changedKeys:m(l)?Object.keys(l):void 0,...u.notes.length?{keyed:u.notes}:{},...S.length?{unchecked:S.map(p=>`\`${p}\` was empty, so nothing in the app knows what its items look like and the shape of what you added was NOT checked. If the screen renders a field you left out, it will render undefined \u2014 read the query back and compare against how the screen uses it.`)}:{}}}if(!n&&m(o)&&m(e)){const u=Object.keys(o).filter(l=>!(l in e));if(u.length>0){return{ok:false,error:`Refused: the new value drops ${u.length} top-level field(s) the cached value has (${u.slice(0,8).join(", ")}${u.length>8?", \u2026":""}). A screen rendering those fields would crash. To change some fields, send merge:true with ONLY the fields that change. To really replace the whole value, send force:true.`,missingKeys:u}}}r.setQueryData(h,e,{updatedAt:Date.now()});return{ok:true,mode:"replace"}},triggerError:t=>{const e=a(t);const s=e.options;e.setState({status:"error",error:new Error("Unknown error from devtools"),fetchMeta:{...e.state.fetchMeta,__previousQueryOptions:s}})},restoreError:t=>{void r.resetQueries(a(t)).catch(()=>void 0);return{restored:true}},triggerLoading:t=>{const e=a(t);const s=e.options;e.fetch({...s,queryFn:()=>new Promise(()=>{}),gcTime:-1}).catch(()=>void 0);e.setState({data:void 0,status:"pending",fetchMeta:{...e.state.fetchMeta,__previousQueryOptions:s}})},restoreLoading:t=>{const e=a(t);const s=e.state;const n=e.state.fetchMeta?e.state.fetchMeta.__previousQueryOptions:null;e.cancel({silent:true});e.setState({...s,fetchStatus:"idle",fetchMeta:null});if(n){e.fetch(n).catch(()=>void 0)}},clearQueryCache:()=>{const t=r.getQueryCache().getAll().filter(e=>e.getObserversCount()>0).length;r.getQueryCache().clear();return{ok:true,cleared:true,...t?{note:`Cleared \u2014 but ${t} quer${t===1?"y is":"ies are"} still being watched by a screen, and React Query leaves those screens rendering their LAST value until something refetches. The cache is empty; the app on screen is not. Use \`reset\` on a query when you want its screen to reload.`}:{}}},clearMutationCache:()=>{r.getMutationCache().clear()},setOnline:t=>{const{online:e}=t;Q.setOnline(e)}}}}
@@ -115,6 +115,8 @@ export declare const wifiTogglePreset: {
115
115
  component: () => null;
116
116
  props: {};
117
117
  launchMode: "toggle-only";
118
+ /** On while React Query is online; Buoy shows this to screen readers. */
119
+ isOn: () => boolean;
118
120
  onPress: () => void;
119
121
  };
120
122
  /**
@@ -154,6 +156,7 @@ export declare function createWifiToggleTool(options?: {
154
156
  component: () => null;
155
157
  props: {};
156
158
  launchMode: "toggle-only";
159
+ isOn: () => boolean;
157
160
  onPress: () => void;
158
161
  };
159
162
  export {};
@@ -1,4 +1,15 @@
1
1
  import { type QueryClient } from "@tanstack/react-query";
2
+ /**
3
+ * The shortest refetch timer any mounted observer has on this query, in ms.
4
+ * `refetchInterval` may be a function of the query; a function that throws or
5
+ * returns false counts as no timer.
6
+ */
7
+ /**
8
+ * A query error as readable text. Apps often throw plain objects (an API's
9
+ * JSON error body) instead of Error instances, and String() turns those into
10
+ * "[object Object]".
11
+ */
12
+ export declare function queryErrorText(err: unknown): string;
2
13
  export declare function createReactQuerySyncAdapter(queryClient: QueryClient): {
3
14
  version: number;
4
15
  getSnapshot: () => {
@@ -80,8 +91,8 @@ export declare function createReactQuerySyncAdapter(queryClient: QueryClient): {
80
91
  returned: number;
81
92
  includedData: boolean;
82
93
  };
83
- refetch: (params: unknown) => Promise<unknown>;
84
- invalidate: (params: unknown) => Promise<void>;
94
+ refetch: (params: unknown) => Promise<unknown> | undefined;
95
+ invalidate: (params: unknown) => Promise<void> | undefined;
85
96
  reset: (params: unknown) => Promise<void>;
86
97
  /**
87
98
  * Dropping a query does NOT re-drive the screen watching it.