@tanstack/react-query-devtools 5.0.0-alpha.27 → 5.0.0-alpha.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lib/devtools.d.ts.map +1 -1
- package/build/lib/devtools.esm.js +5 -1
- package/build/lib/devtools.esm.js.map +1 -1
- package/build/lib/devtools.js +5 -1
- package/build/lib/devtools.js.map +1 -1
- package/build/lib/devtools.mjs +5 -1
- package/build/lib/devtools.mjs.map +1 -1
- package/build/lib/index.prod.esm.js +14 -6
- package/build/lib/index.prod.esm.js.map +1 -1
- package/build/lib/index.prod.js +14 -6
- package/build/lib/index.prod.js.map +1 -1
- package/build/lib/index.prod.mjs +14 -6
- package/build/lib/index.prod.mjs.map +1 -1
- package/build/umd/index.development.js +14 -6
- package/build/umd/index.development.js.map +1 -1
- package/package.json +2 -2
- package/src/devtools.tsx +6 -1
|
@@ -7819,7 +7819,7 @@
|
|
|
7819
7819
|
background-color: ${colors.darkGray[400]};
|
|
7820
7820
|
font-size: ${font.size.sm};
|
|
7821
7821
|
color: ${colors.gray[500]};
|
|
7822
|
-
z-index:
|
|
7822
|
+
z-index: 7;
|
|
7823
7823
|
`,
|
|
7824
7824
|
settingsMenuHeader: css`
|
|
7825
7825
|
padding: ${tokens.size[1.5]} ${tokens.size[2.5]};
|
|
@@ -7878,7 +7878,7 @@
|
|
|
7878
7878
|
initialIsOpen,
|
|
7879
7879
|
errorTypes
|
|
7880
7880
|
} = config;
|
|
7881
|
-
this.client = client;
|
|
7881
|
+
this.client = createSignal(client);
|
|
7882
7882
|
this.queryFlavor = queryFlavor;
|
|
7883
7883
|
this.version = version;
|
|
7884
7884
|
this.onlineManager = onlineManager;
|
|
@@ -7899,6 +7899,9 @@
|
|
|
7899
7899
|
setErrorTypes(errorTypes) {
|
|
7900
7900
|
this.errorTypes[1](errorTypes);
|
|
7901
7901
|
}
|
|
7902
|
+
setClient(client) {
|
|
7903
|
+
this.client[1](client);
|
|
7904
|
+
}
|
|
7902
7905
|
mount(el) {
|
|
7903
7906
|
if (this.isMounted) {
|
|
7904
7907
|
throw new Error('Devtools is already mounted');
|
|
@@ -7908,11 +7911,9 @@
|
|
|
7908
7911
|
const [pos] = this.position;
|
|
7909
7912
|
const [isOpen] = this.initialIsOpen;
|
|
7910
7913
|
const [errors] = this.errorTypes;
|
|
7914
|
+
const [queryClient] = this.client;
|
|
7911
7915
|
const _self$ = this;
|
|
7912
7916
|
return createComponent(DevtoolsComponent, mergeProps({
|
|
7913
|
-
get client() {
|
|
7914
|
-
return _self$.client;
|
|
7915
|
-
},
|
|
7916
7917
|
get queryFlavor() {
|
|
7917
7918
|
return _self$.queryFlavor;
|
|
7918
7919
|
},
|
|
@@ -7923,6 +7924,9 @@
|
|
|
7923
7924
|
return _self$.onlineManager;
|
|
7924
7925
|
}
|
|
7925
7926
|
}, {
|
|
7927
|
+
get client() {
|
|
7928
|
+
return queryClient();
|
|
7929
|
+
},
|
|
7926
7930
|
get buttonPosition() {
|
|
7927
7931
|
return btnPosition();
|
|
7928
7932
|
},
|
|
@@ -7951,6 +7955,7 @@
|
|
|
7951
7955
|
|
|
7952
7956
|
function ReactQueryDevtools$1(props) {
|
|
7953
7957
|
const queryClient = reactQuery.useQueryClient();
|
|
7958
|
+
const client = props.client || queryClient;
|
|
7954
7959
|
const ref = React.useRef(null);
|
|
7955
7960
|
const {
|
|
7956
7961
|
buttonPosition,
|
|
@@ -7959,7 +7964,7 @@
|
|
|
7959
7964
|
errorTypes
|
|
7960
7965
|
} = props;
|
|
7961
7966
|
const [devtools] = React.useState(new TanstackQueryDevtools({
|
|
7962
|
-
client:
|
|
7967
|
+
client: client,
|
|
7963
7968
|
queryFlavor: 'React Query',
|
|
7964
7969
|
version: '5',
|
|
7965
7970
|
onlineManager: reactQuery.onlineManager,
|
|
@@ -7968,6 +7973,9 @@
|
|
|
7968
7973
|
initialIsOpen,
|
|
7969
7974
|
errorTypes
|
|
7970
7975
|
}));
|
|
7976
|
+
React.useEffect(() => {
|
|
7977
|
+
devtools.setClient(client);
|
|
7978
|
+
}, [client, devtools]);
|
|
7971
7979
|
React.useEffect(() => {
|
|
7972
7980
|
if (buttonPosition) {
|
|
7973
7981
|
devtools.setButtonPosition(buttonPosition);
|