@tanstack/query-devtools 5.0.0-beta.36 → 5.0.0-rc.1

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/src/Explorer.tsx CHANGED
@@ -40,6 +40,12 @@ const Expander = (props: { expanded: boolean }) => {
40
40
  css`
41
41
  transform: rotate(${props.expanded ? 90 : 0}deg);
42
42
  `,
43
+ props.expanded &&
44
+ css`
45
+ & svg {
46
+ top: -1px;
47
+ }
48
+ `,
43
49
  )}
44
50
  >
45
51
  <svg
@@ -184,16 +190,21 @@ export default function Explorer(props: ExplorerProps) {
184
190
  return (
185
191
  <div class={styles.entry}>
186
192
  <Show when={subEntryPages().length}>
187
- <button class={styles.expanderButton} onClick={() => toggleExpanded()}>
188
- <Expander expanded={expanded()} /> <span>{props.label}</span>{' '}
189
- <span class={styles.info}>
190
- {String(type()).toLowerCase() === 'iterable' ? '(Iterable) ' : ''}
191
- {subEntries().length} {subEntries().length > 1 ? `items` : `item`}
192
- </span>
193
- </button>
194
- <Show when={props.copyable}>
195
- <CopyButton value={props.value} />
196
- </Show>
193
+ <div class={styles.expanderButtonContainer}>
194
+ <button
195
+ class={styles.expanderButton}
196
+ onClick={() => toggleExpanded()}
197
+ >
198
+ <Expander expanded={expanded()} /> <span>{props.label}</span>{' '}
199
+ <span class={styles.info}>
200
+ {String(type()).toLowerCase() === 'iterable' ? '(Iterable) ' : ''}
201
+ {subEntries().length} {subEntries().length > 1 ? `items` : `item`}
202
+ </span>
203
+ </button>
204
+ <Show when={props.copyable}>
205
+ <CopyButton value={props.value} />
206
+ </Show>
207
+ </div>
197
208
  <Show when={expanded()}>
198
209
  <Show when={subEntryPages().length === 1}>
199
210
  <div class={styles.subEntry}>
@@ -254,8 +265,14 @@ export default function Explorer(props: ExplorerProps) {
254
265
  </Show>
255
266
  </Show>
256
267
  <Show when={subEntryPages().length === 0}>
257
- <span class={styles.label}>{props.label}:</span>{' '}
258
- <span class={styles.value}>{displayValue(props.value)}</span>
268
+ <div
269
+ style={{
270
+ 'line-height': '1.125rem',
271
+ }}
272
+ >
273
+ <span class={styles.label}>{props.label}:</span>{' '}
274
+ <span class={styles.value}>{displayValue(props.value)}</span>
275
+ </div>
259
276
  </Show>
260
277
  </div>
261
278
  )
@@ -267,9 +284,8 @@ const getStyles = () => {
267
284
  return {
268
285
  entry: css`
269
286
  & * {
270
- font-size: ${font.size.sm};
287
+ font-size: ${font.size.xs};
271
288
  font-family: 'Menlo', 'Fira Code', monospace;
272
- line-height: 1.7;
273
289
  }
274
290
  position: relative;
275
291
  outline: none;
@@ -279,38 +295,57 @@ const getStyles = () => {
279
295
  margin: 0 0 0 0.5em;
280
296
  padding-left: 0.75em;
281
297
  border-left: 2px solid ${colors.darkGray[400]};
298
+ /* outline: 1px solid ${colors.teal[400]}; */
282
299
  `,
283
300
  expander: css`
284
301
  & path {
285
302
  stroke: ${colors.gray[400]};
286
303
  }
304
+ & svg {
305
+ width: ${size[3]};
306
+ height: ${size[3]};
307
+ }
287
308
  display: inline-flex;
288
309
  align-items: center;
289
310
  transition: all 0.1s ease;
311
+ /* outline: 1px solid ${colors.blue[400]}; */
312
+ `,
313
+ expanderButtonContainer: css`
314
+ display: flex;
315
+ align-items: center;
316
+ line-height: 1.125rem;
317
+ min-height: 1.125rem;
290
318
  `,
291
319
  expanderButton: css`
292
320
  cursor: pointer;
293
321
  color: inherit;
294
322
  font: inherit;
295
323
  outline: inherit;
296
- line-height: ${font.size.sm};
324
+ height: 1rem;
297
325
  background: transparent;
298
326
  border: none;
299
327
  padding: 0;
300
328
  display: inline-flex;
301
329
  align-items: center;
302
330
  gap: ${size[1]};
331
+ position: relative;
332
+ /* outline: 1px solid ${colors.green[400]}; */
303
333
 
304
334
  &:focus-visible {
305
335
  border-radius: ${border.radius.xs};
306
336
  outline: 2px solid ${colors.blue[800]};
307
337
  }
338
+
339
+ & svg {
340
+ position: relative;
341
+ left: 1px;
342
+ }
308
343
  `,
309
344
  info: css`
310
345
  color: ${colors.gray[500]};
311
346
  font-size: ${font.size.xs};
312
- line-height: ${font.size.xs};
313
347
  margin-left: ${size[1]};
348
+ /* outline: 1px solid ${colors.yellow[400]}; */
314
349
  `,
315
350
  label: css`
316
351
  color: ${colors.gray[300]};
@@ -326,10 +361,9 @@ const getStyles = () => {
326
361
  align-items: center;
327
362
  justify-content: center;
328
363
  cursor: pointer;
329
- width: ${size[3.5]};
330
- height: ${size[3.5]};
364
+ width: ${size[3]};
365
+ height: ${size[3]};
331
366
  position: relative;
332
- top: 4px;
333
367
  left: ${size[2]};
334
368
  z-index: 1;
335
369
 
@@ -31,7 +31,7 @@ export function Trash() {
31
31
  >
32
32
  <path
33
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"
34
+ stroke="#d0d5dd"
35
35
  stroke-width="1.66667"
36
36
  stroke-linecap="round"
37
37
  stroke-linejoin="round"
@@ -63,8 +63,8 @@ export function ChevronDown() {
63
63
  export function ArrowUp() {
64
64
  return (
65
65
  <svg
66
- width="16"
67
- height="16"
66
+ width="12"
67
+ height="12"
68
68
  viewBox="0 0 16 16"
69
69
  fill="none"
70
70
  xmlns="http://www.w3.org/2000/svg"
@@ -83,8 +83,8 @@ export function ArrowUp() {
83
83
  export function ArrowDown() {
84
84
  return (
85
85
  <svg
86
- width="16"
87
- height="16"
86
+ width="12"
87
+ height="12"
88
88
  viewBox="0 0 16 16"
89
89
  fill="none"
90
90
  xmlns="http://www.w3.org/2000/svg"
@@ -100,11 +100,57 @@ export function ArrowDown() {
100
100
  )
101
101
  }
102
102
 
103
+ export function ArrowLeft() {
104
+ return (
105
+ <svg
106
+ width="12"
107
+ height="12"
108
+ viewBox="0 0 16 16"
109
+ fill="none"
110
+ xmlns="http://www.w3.org/2000/svg"
111
+ style={{
112
+ transform: 'rotate(90deg)',
113
+ }}
114
+ >
115
+ <path
116
+ d="M8 2.66667V13.3333M8 13.3333L4 9.33333M8 13.3333L12 9.33333"
117
+ stroke="#98A2B3"
118
+ stroke-width="1.66667"
119
+ stroke-linecap="round"
120
+ stroke-linejoin="round"
121
+ />
122
+ </svg>
123
+ )
124
+ }
125
+
126
+ export function ArrowRight() {
127
+ return (
128
+ <svg
129
+ width="12"
130
+ height="12"
131
+ viewBox="0 0 16 16"
132
+ fill="none"
133
+ xmlns="http://www.w3.org/2000/svg"
134
+ style={{
135
+ transform: 'rotate(-90deg)',
136
+ }}
137
+ >
138
+ <path
139
+ d="M8 2.66667V13.3333M8 13.3333L4 9.33333M8 13.3333L12 9.33333"
140
+ stroke="#98A2B3"
141
+ stroke-width="1.66667"
142
+ stroke-linecap="round"
143
+ stroke-linejoin="round"
144
+ />
145
+ </svg>
146
+ )
147
+ }
148
+
103
149
  export function Wifi() {
104
150
  return (
105
151
  <svg
106
- stroke="#98A2B3"
107
- fill="#98A2B3"
152
+ stroke="#d0d5dd"
153
+ fill="#d0d5dd"
108
154
  stroke-width="0"
109
155
  viewBox="0 0 24 24"
110
156
  height="1em"
@@ -148,14 +194,14 @@ export function Settings() {
148
194
  >
149
195
  <path
150
196
  d="M9.3951 19.3711L9.97955 20.6856C10.1533 21.0768 10.4368 21.4093 10.7958 21.6426C11.1547 21.8759 11.5737 22.0001 12.0018 22C12.4299 22.0001 12.8488 21.8759 13.2078 21.6426C13.5667 21.4093 13.8503 21.0768 14.024 20.6856L14.6084 19.3711C14.8165 18.9047 15.1664 18.5159 15.6084 18.26C16.0532 18.0034 16.5678 17.8941 17.0784 17.9478L18.5084 18.1C18.9341 18.145 19.3637 18.0656 19.7451 17.8713C20.1265 17.6771 20.4434 17.3763 20.6573 17.0056C20.8715 16.635 20.9735 16.2103 20.9511 15.7829C20.9286 15.3555 20.7825 14.9438 20.5307 14.5978L19.684 13.4344C19.3825 13.0171 19.2214 12.5148 19.224 12C19.2239 11.4866 19.3865 10.9864 19.6884 10.5711L20.5351 9.40778C20.787 9.06175 20.933 8.65007 20.9555 8.22267C20.978 7.79528 20.8759 7.37054 20.6618 7C20.4479 6.62923 20.131 6.32849 19.7496 6.13423C19.3681 5.93997 18.9386 5.86053 18.5129 5.90556L17.0829 6.05778C16.5722 6.11141 16.0577 6.00212 15.6129 5.74556C15.17 5.48825 14.82 5.09736 14.6129 4.62889L14.024 3.31444C13.8503 2.92317 13.5667 2.59072 13.2078 2.3574C12.8488 2.12408 12.4299 1.99993 12.0018 2C11.5737 1.99993 11.1547 2.12408 10.7958 2.3574C10.4368 2.59072 10.1533 2.92317 9.97955 3.31444L9.3951 4.62889C9.18803 5.09736 8.83798 5.48825 8.3951 5.74556C7.95032 6.00212 7.43577 6.11141 6.9251 6.05778L5.49066 5.90556C5.06499 5.86053 4.6354 5.93997 4.25397 6.13423C3.87255 6.32849 3.55567 6.62923 3.34177 7C3.12759 7.37054 3.02555 7.79528 3.04804 8.22267C3.07052 8.65007 3.21656 9.06175 3.46844 9.40778L4.3151 10.5711C4.61704 10.9864 4.77964 11.4866 4.77955 12C4.77964 12.5134 4.61704 13.0137 4.3151 13.4289L3.46844 14.5922C3.21656 14.9382 3.07052 15.3499 3.04804 15.7773C3.02555 16.2047 3.12759 16.6295 3.34177 17C3.55589 17.3706 3.8728 17.6712 4.25417 17.8654C4.63554 18.0596 5.06502 18.1392 5.49066 18.0944L6.92066 17.9422C7.43133 17.8886 7.94587 17.9979 8.39066 18.2544C8.83519 18.511 9.18687 18.902 9.3951 19.3711Z"
151
- stroke="#98A2B3"
197
+ stroke="#d0d5dd"
152
198
  stroke-width="2"
153
199
  stroke-linecap="round"
154
200
  stroke-linejoin="round"
155
201
  />
156
202
  <path
157
203
  d="M12 15C13.6568 15 15 13.6569 15 12C15 10.3431 13.6568 9 12 9C10.3431 9 8.99998 10.3431 8.99998 12C8.99998 13.6569 10.3431 15 12 15Z"
158
- stroke="#98A2B3"
204
+ stroke="#d0d5dd"
159
205
  stroke-width="2"
160
206
  stroke-linecap="round"
161
207
  stroke-linejoin="round"
package/src/theme.ts CHANGED
@@ -265,7 +265,9 @@ export const tokens = {
265
265
  4: '1rem',
266
266
  4.5: '1.125rem',
267
267
  5: '1.25rem',
268
+ 5.5: '1.375rem',
268
269
  6: '1.5rem',
270
+ 6.5: '1.625rem',
269
271
  7: '1.75rem',
270
272
  8: '2rem',
271
273
  9: '2.25rem',