@tanstack/query-devtools 5.0.0-beta.34 → 5.0.0-beta.36

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/index.js CHANGED
@@ -52,7 +52,7 @@ var TanstackQueryDevtools = class {
52
52
  if (this.Component) {
53
53
  Devtools = this.Component;
54
54
  } else {
55
- Devtools = lazy(() => import('./Devtools/26QOLXHC.js'));
55
+ Devtools = lazy(() => import('./Devtools/OXAQM7EL.js'));
56
56
  this.Component = Devtools;
57
57
  }
58
58
  const _self$ = this;
package/build/index.jsx CHANGED
@@ -56,7 +56,7 @@ var TanstackQueryDevtools = class {
56
56
  if (this.Component) {
57
57
  Devtools = this.Component;
58
58
  } else {
59
- Devtools = lazy(() => import("./Devtools/DK6B4TZH.jsx"));
59
+ Devtools = lazy(() => import("./Devtools/FASZSC6H.jsx"));
60
60
  this.Component = Devtools;
61
61
  }
62
62
  return <Devtools
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/query-devtools",
3
- "version": "5.0.0-beta.34",
3
+ "version": "5.0.0-beta.36",
4
4
  "description": "Developer tools to interact with and visualize the TanStack Query cache",
5
5
  "author": "tannerlinsley",
6
6
  "license": "MIT",
@@ -49,7 +49,7 @@
49
49
  "superjson": "^1.12.4",
50
50
  "tsup-preset-solid": "^2.0.1",
51
51
  "vite-plugin-solid": "^2.7.0",
52
- "@tanstack/query-core": "5.0.0-beta.31"
52
+ "@tanstack/query-core": "5.0.0-beta.35"
53
53
  },
54
54
  "scripts": {
55
55
  "clean": "rimraf ./build && rimraf ./coverage",
package/src/Devtools.tsx CHANGED
@@ -33,6 +33,7 @@ import {
33
33
  Search,
34
34
  Settings,
35
35
  TanstackLogo,
36
+ Trash,
36
37
  Wifi,
37
38
  } from './icons'
38
39
  import Explorer from './Explorer'
@@ -519,6 +520,19 @@ export const DevtoolsPanel: Component<DevtoolsPanelProps> = (props) => {
519
520
  </div>
520
521
 
521
522
  <div class={cx(styles.actionsContainer, 'tsqd-actions-container')}>
523
+ <button
524
+ onClick={() => {
525
+ cache().clear()
526
+ }}
527
+ class={cx(
528
+ styles.actionsBtn,
529
+ 'tsqd-actions-btn',
530
+ 'tsqd-action-clear-cache',
531
+ )}
532
+ aria-label="Clear query cache"
533
+ >
534
+ <Trash />
535
+ </button>
522
536
  <button
523
537
  onClick={() => {
524
538
  if (offline()) {
@@ -1088,6 +1102,27 @@ const QueryDetails = () => {
1088
1102
  ></span>
1089
1103
  Reset
1090
1104
  </button>
1105
+ <button
1106
+ class={cx(
1107
+ css`
1108
+ color: ${tokens.colors.pink[400]};
1109
+ `,
1110
+ 'tsqd-query-details-actions-btn',
1111
+ 'tsqd-query-details-action-remove',
1112
+ )}
1113
+ onClick={() => {
1114
+ queryClient.removeQueries(activeQuery())
1115
+ setSelectedQueryHash(null)
1116
+ }}
1117
+ disabled={statusLabel() === 'fetching'}
1118
+ >
1119
+ <span
1120
+ class={css`
1121
+ background-color: ${tokens.colors.pink[400]};
1122
+ `}
1123
+ ></span>
1124
+ Remove
1125
+ </button>
1091
1126
  <button
1092
1127
  class={cx(
1093
1128
  css`
@@ -1614,9 +1649,6 @@ const getStyles = () => {
1614
1649
  outline-offset: 2px;
1615
1650
  outline: 2px solid ${colors.blue[800]};
1616
1651
  }
1617
- & span:nth-child(2) {
1618
- color: ${colors.gray[300]}${alpha[80]};
1619
- }
1620
1652
  `,
1621
1653
  statusTooltip: css`
1622
1654
  position: absolute;
@@ -20,6 +20,26 @@ export function Search() {
20
20
  )
21
21
  }
22
22
 
23
+ export function Trash() {
24
+ return (
25
+ <svg
26
+ width="24"
27
+ height="24"
28
+ viewBox="0 0 24 24"
29
+ fill="none"
30
+ xmlns="http://www.w3.org/2000/svg"
31
+ >
32
+ <path
33
+ d="M9 3H15M3 6H21M19 6L18.2987 16.5193C18.1935 18.0975 18.1409 18.8867 17.8 19.485C17.4999 20.0118 17.0472 20.4353 16.5017 20.6997C15.882 21 15.0911 21 13.5093 21H10.4907C8.90891 21 8.11803 21 7.49834 20.6997C6.95276 20.4353 6.50009 20.0118 6.19998 19.485C5.85911 18.8867 5.8065 18.0975 5.70129 16.5193L5 6M10 10.5V15.5M14 10.5V15.5"
34
+ stroke="#98A2B3"
35
+ stroke-width="1.66667"
36
+ stroke-linecap="round"
37
+ stroke-linejoin="round"
38
+ />
39
+ </svg>
40
+ )
41
+ }
42
+
23
43
  export function ChevronDown() {
24
44
  return (
25
45
  <svg