@tanstack/query-devtools 5.0.0-alpha.86 → 5.0.0-alpha.88
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/Devtools/OYHFZDAP.jsx +6711 -0
- package/build/Devtools/QBS7PB6D.js +5885 -0
- package/build/Devtools/QPWQM7BG.js +6068 -0
- package/build/Devtools/RZF5MSB2.jsx +6637 -0
- package/build/chunk/DFC6JMPR.jsx +1280 -0
- package/build/chunk/LOJK4LQB.jsx +1280 -0
- package/{dist/esm/index-7b089165.js → build/chunk/MZOCHHZD.js} +648 -416
- package/{dist/cjs/index-94a2ab18.cjs → build/chunk/YHTPXJWR.js} +648 -446
- package/build/dev.cjs +8116 -0
- package/build/dev.js +99 -0
- package/build/dev.jsx +98 -0
- package/build/index.cjs +7940 -0
- package/build/index.d.cts +55 -0
- package/build/index.d.ts +55 -0
- package/build/index.js +99 -0
- package/build/index.jsx +98 -0
- package/package.json +27 -23
- package/dist/cjs/Devtools-5eee2153.cjs +0 -6764
- package/dist/cjs/Devtools-5eee2153.cjs.map +0 -1
- package/dist/cjs/index-94a2ab18.cjs.map +0 -1
- package/dist/cjs/index.cjs +0 -8
- package/dist/cjs/index.cjs.map +0 -1
- package/dist/esm/Devtools-74e35f67.js +0 -6756
- package/dist/esm/Devtools-74e35f67.js.map +0 -1
- package/dist/esm/index-7b089165.js.map +0 -1
- package/dist/esm/index.js +0 -2
- package/dist/esm/index.js.map +0 -1
- package/dist/source/Context.js +0 -10
- package/dist/source/Devtools.jsx +0 -1510
- package/dist/source/Explorer.jsx +0 -264
- package/dist/source/fonts.js +0 -7
- package/dist/source/icons/index.jsx +0 -344
- package/dist/source/index.jsx +0 -88
- package/dist/source/theme.js +0 -304
- package/dist/source/utils.jsx +0 -77
- package/dist/types/Context.d.ts +0 -28
- package/dist/types/Devtools.d.ts +0 -22
- package/dist/types/Explorer.d.ts +0 -21
- package/dist/types/fonts.d.ts +0 -1
- package/dist/types/icons/index.d.ts +0 -11
- package/dist/types/index.d.ts +0 -29
- package/dist/types/theme.d.ts +0 -296
- package/dist/types/utils.d.ts +0 -23
package/dist/source/index.jsx
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { render } from 'solid-js/web';
|
|
2
|
-
import { createSignal, lazy } from 'solid-js';
|
|
3
|
-
class TanstackQueryDevtools {
|
|
4
|
-
client;
|
|
5
|
-
onlineManager;
|
|
6
|
-
queryFlavor;
|
|
7
|
-
version;
|
|
8
|
-
isMounted = false;
|
|
9
|
-
buttonPosition;
|
|
10
|
-
position;
|
|
11
|
-
initialIsOpen;
|
|
12
|
-
errorTypes;
|
|
13
|
-
Component;
|
|
14
|
-
dispose;
|
|
15
|
-
constructor(config) {
|
|
16
|
-
const { client, queryFlavor, version, onlineManager, buttonPosition, position, initialIsOpen, errorTypes, } = config;
|
|
17
|
-
this.client = createSignal(client);
|
|
18
|
-
this.queryFlavor = queryFlavor;
|
|
19
|
-
this.version = version;
|
|
20
|
-
this.onlineManager = onlineManager;
|
|
21
|
-
this.buttonPosition = createSignal(buttonPosition);
|
|
22
|
-
this.position = createSignal(position);
|
|
23
|
-
this.initialIsOpen = createSignal(initialIsOpen);
|
|
24
|
-
this.errorTypes = createSignal(errorTypes);
|
|
25
|
-
}
|
|
26
|
-
setButtonPosition(position) {
|
|
27
|
-
this.buttonPosition[1](position);
|
|
28
|
-
}
|
|
29
|
-
setPosition(position) {
|
|
30
|
-
this.position[1](position);
|
|
31
|
-
}
|
|
32
|
-
setInitialIsOpen(isOpen) {
|
|
33
|
-
this.initialIsOpen[1](isOpen);
|
|
34
|
-
}
|
|
35
|
-
setErrorTypes(errorTypes) {
|
|
36
|
-
this.errorTypes[1](errorTypes);
|
|
37
|
-
}
|
|
38
|
-
setClient(client) {
|
|
39
|
-
this.client[1](client);
|
|
40
|
-
}
|
|
41
|
-
mount(el) {
|
|
42
|
-
if (this.isMounted) {
|
|
43
|
-
throw new Error('Devtools is already mounted');
|
|
44
|
-
}
|
|
45
|
-
const dispose = render(() => {
|
|
46
|
-
const [btnPosition] = this.buttonPosition;
|
|
47
|
-
const [pos] = this.position;
|
|
48
|
-
const [isOpen] = this.initialIsOpen;
|
|
49
|
-
const [errors] = this.errorTypes;
|
|
50
|
-
const [queryClient] = this.client;
|
|
51
|
-
let Devtools;
|
|
52
|
-
if (this.Component) {
|
|
53
|
-
Devtools = this.Component;
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
Devtools = lazy(() => import('./Devtools'));
|
|
57
|
-
this.Component = Devtools;
|
|
58
|
-
}
|
|
59
|
-
return (<Devtools queryFlavor={this.queryFlavor} version={this.version} onlineManager={this.onlineManager} {...{
|
|
60
|
-
get client() {
|
|
61
|
-
return queryClient();
|
|
62
|
-
},
|
|
63
|
-
get buttonPosition() {
|
|
64
|
-
return btnPosition();
|
|
65
|
-
},
|
|
66
|
-
get position() {
|
|
67
|
-
return pos();
|
|
68
|
-
},
|
|
69
|
-
get initialIsOpen() {
|
|
70
|
-
return isOpen();
|
|
71
|
-
},
|
|
72
|
-
get errorTypes() {
|
|
73
|
-
return errors();
|
|
74
|
-
},
|
|
75
|
-
}}/>);
|
|
76
|
-
}, el);
|
|
77
|
-
this.isMounted = true;
|
|
78
|
-
this.dispose = dispose;
|
|
79
|
-
}
|
|
80
|
-
unmount() {
|
|
81
|
-
if (!this.isMounted) {
|
|
82
|
-
throw new Error('Devtools is not mounted');
|
|
83
|
-
}
|
|
84
|
-
this.dispose?.();
|
|
85
|
-
this.isMounted = false;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
export { TanstackQueryDevtools };
|
package/dist/source/theme.js
DELETED
|
@@ -1,304 +0,0 @@
|
|
|
1
|
-
const ShadowVariants = {
|
|
2
|
-
xs: '0 1px 2px 0 rgb(0 0 0 / 0.05)',
|
|
3
|
-
sm: '0 1px 3px 0 color, 0 1px 2px -1px color',
|
|
4
|
-
md: '0 4px 6px -1px color, 0 2px 4px -2px color',
|
|
5
|
-
lg: '0 10px 15px -3px color, 0 4px 6px -4px color',
|
|
6
|
-
xl: '0 20px 25px -5px color, 0 8px 10px -6px color',
|
|
7
|
-
'2xl': '0 25px 50px -12px color',
|
|
8
|
-
inner: 'inset 0 2px 4px 0 color',
|
|
9
|
-
none: 'none',
|
|
10
|
-
};
|
|
11
|
-
const getShadow = (variant, color = '') => {
|
|
12
|
-
return ShadowVariants[variant].replace(/color/g, color);
|
|
13
|
-
};
|
|
14
|
-
const Shadow = {
|
|
15
|
-
xs: (color = 'rgb(0 0 0 / 0.1)') => getShadow('xs', color),
|
|
16
|
-
sm: (color = 'rgb(0 0 0 / 0.1)') => getShadow('sm', color),
|
|
17
|
-
md: (color = 'rgb(0 0 0 / 0.1)') => getShadow('md', color),
|
|
18
|
-
lg: (color = 'rgb(0 0 0 / 0.1)') => getShadow('lg', color),
|
|
19
|
-
xl: (color = 'rgb(0 0 0 / 0.1)') => getShadow('xl', color),
|
|
20
|
-
'2xl': (color = 'rgb(0 0 0 / 0.25)') => getShadow('2xl', color),
|
|
21
|
-
inner: (color = 'rgb(0 0 0 / 0.05)') => getShadow('inner', color),
|
|
22
|
-
none: () => getShadow('none'),
|
|
23
|
-
};
|
|
24
|
-
export const tokens = {
|
|
25
|
-
colors: {
|
|
26
|
-
inherit: 'inherit',
|
|
27
|
-
current: 'currentColor',
|
|
28
|
-
transparent: 'transparent',
|
|
29
|
-
black: '#000000',
|
|
30
|
-
white: '#ffffff',
|
|
31
|
-
neutral: {
|
|
32
|
-
50: '#f9fafb',
|
|
33
|
-
100: '#f2f4f7',
|
|
34
|
-
200: '#eaecf0',
|
|
35
|
-
300: '#d0d5dd',
|
|
36
|
-
400: '#98a2b3',
|
|
37
|
-
500: '#667085',
|
|
38
|
-
600: '#475467',
|
|
39
|
-
700: '#344054',
|
|
40
|
-
800: '#1d2939',
|
|
41
|
-
900: '#101828',
|
|
42
|
-
},
|
|
43
|
-
darkGray: {
|
|
44
|
-
50: '#525c7a',
|
|
45
|
-
100: '#49536e',
|
|
46
|
-
200: '#414962',
|
|
47
|
-
300: '#394056',
|
|
48
|
-
400: '#313749',
|
|
49
|
-
500: '#292e3d',
|
|
50
|
-
600: '#212530',
|
|
51
|
-
700: '#191c24',
|
|
52
|
-
800: '#111318',
|
|
53
|
-
900: '#0b0d10',
|
|
54
|
-
},
|
|
55
|
-
gray: {
|
|
56
|
-
50: '#f9fafb',
|
|
57
|
-
100: '#f2f4f7',
|
|
58
|
-
200: '#eaecf0',
|
|
59
|
-
300: '#d0d5dd',
|
|
60
|
-
400: '#98a2b3',
|
|
61
|
-
500: '#667085',
|
|
62
|
-
600: '#475467',
|
|
63
|
-
700: '#344054',
|
|
64
|
-
800: '#1d2939',
|
|
65
|
-
900: '#101828',
|
|
66
|
-
},
|
|
67
|
-
blue: {
|
|
68
|
-
25: '#F5FAFF',
|
|
69
|
-
50: '#EFF8FF',
|
|
70
|
-
100: '#D1E9FF',
|
|
71
|
-
200: '#B2DDFF',
|
|
72
|
-
300: '#84CAFF',
|
|
73
|
-
400: '#53B1FD',
|
|
74
|
-
500: '#2E90FA',
|
|
75
|
-
600: '#1570EF',
|
|
76
|
-
700: '#175CD3',
|
|
77
|
-
800: '#1849A9',
|
|
78
|
-
900: '#194185',
|
|
79
|
-
},
|
|
80
|
-
green: {
|
|
81
|
-
25: '#F6FEF9',
|
|
82
|
-
50: '#ECFDF3',
|
|
83
|
-
100: '#D1FADF',
|
|
84
|
-
200: '#A6F4C5',
|
|
85
|
-
300: '#6CE9A6',
|
|
86
|
-
400: '#32D583',
|
|
87
|
-
500: '#12B76A',
|
|
88
|
-
600: '#039855',
|
|
89
|
-
700: '#027A48',
|
|
90
|
-
800: '#05603A',
|
|
91
|
-
900: '#054F31',
|
|
92
|
-
},
|
|
93
|
-
red: {
|
|
94
|
-
25: '#FFFBFA',
|
|
95
|
-
50: '#FEF3F2',
|
|
96
|
-
100: '#FEE4E2',
|
|
97
|
-
200: '#FECDCA',
|
|
98
|
-
300: '#FDA29B',
|
|
99
|
-
400: '#F97066',
|
|
100
|
-
500: '#F04438',
|
|
101
|
-
600: '#D92D20',
|
|
102
|
-
700: '#B42318',
|
|
103
|
-
800: '#912018',
|
|
104
|
-
900: '#7A271A',
|
|
105
|
-
},
|
|
106
|
-
yellow: {
|
|
107
|
-
25: '#FFFCF5',
|
|
108
|
-
50: '#FFFAEB',
|
|
109
|
-
100: '#FEF0C7',
|
|
110
|
-
200: '#FEDF89',
|
|
111
|
-
300: '#FEC84B',
|
|
112
|
-
400: '#FDB022',
|
|
113
|
-
500: '#F79009',
|
|
114
|
-
600: '#DC6803',
|
|
115
|
-
700: '#B54708',
|
|
116
|
-
800: '#93370D',
|
|
117
|
-
900: '#7A2E0E',
|
|
118
|
-
},
|
|
119
|
-
purple: {
|
|
120
|
-
25: '#FAFAFF',
|
|
121
|
-
50: '#F4F3FF',
|
|
122
|
-
100: '#EBE9FE',
|
|
123
|
-
200: '#D9D6FE',
|
|
124
|
-
300: '#BDB4FE',
|
|
125
|
-
400: '#9B8AFB',
|
|
126
|
-
500: '#7A5AF8',
|
|
127
|
-
600: '#6938EF',
|
|
128
|
-
700: '#5925DC',
|
|
129
|
-
800: '#4A1FB8',
|
|
130
|
-
900: '#3E1C96',
|
|
131
|
-
},
|
|
132
|
-
teal: {
|
|
133
|
-
25: '#F6FEFC',
|
|
134
|
-
50: '#F0FDF9',
|
|
135
|
-
100: '#CCFBEF',
|
|
136
|
-
200: '#99F6E0',
|
|
137
|
-
300: '#5FE9D0',
|
|
138
|
-
400: '#2ED3B7',
|
|
139
|
-
500: '#15B79E',
|
|
140
|
-
600: '#0E9384',
|
|
141
|
-
700: '#107569',
|
|
142
|
-
800: '#125D56',
|
|
143
|
-
900: '#134E48',
|
|
144
|
-
},
|
|
145
|
-
pink: {
|
|
146
|
-
25: '#fdf2f8',
|
|
147
|
-
50: '#fce7f3',
|
|
148
|
-
100: '#fbcfe8',
|
|
149
|
-
200: '#f9a8d4',
|
|
150
|
-
300: '#f472b6',
|
|
151
|
-
400: '#ec4899',
|
|
152
|
-
500: '#db2777',
|
|
153
|
-
600: '#be185d',
|
|
154
|
-
700: '#9d174d',
|
|
155
|
-
800: '#831843',
|
|
156
|
-
900: '#500724',
|
|
157
|
-
},
|
|
158
|
-
cyan: {
|
|
159
|
-
25: '#ecfeff',
|
|
160
|
-
50: '#cffafe',
|
|
161
|
-
100: '#a5f3fc',
|
|
162
|
-
200: '#67e8f9',
|
|
163
|
-
300: '#22d3ee',
|
|
164
|
-
400: '#06b6d4',
|
|
165
|
-
500: '#0891b2',
|
|
166
|
-
600: '#0e7490',
|
|
167
|
-
700: '#155e75',
|
|
168
|
-
800: '#164e63',
|
|
169
|
-
900: '#083344',
|
|
170
|
-
},
|
|
171
|
-
},
|
|
172
|
-
alpha: {
|
|
173
|
-
100: 'ff',
|
|
174
|
-
90: 'e5',
|
|
175
|
-
80: 'cc',
|
|
176
|
-
70: 'b3',
|
|
177
|
-
60: '99',
|
|
178
|
-
50: '80',
|
|
179
|
-
40: '66',
|
|
180
|
-
30: '4d',
|
|
181
|
-
20: '33',
|
|
182
|
-
10: '1a',
|
|
183
|
-
0: '00',
|
|
184
|
-
},
|
|
185
|
-
font: {
|
|
186
|
-
size: {
|
|
187
|
-
'2xs': '0.625rem',
|
|
188
|
-
xs: '0.75rem',
|
|
189
|
-
sm: '0.875rem',
|
|
190
|
-
md: '1rem',
|
|
191
|
-
lg: '1.125rem',
|
|
192
|
-
xl: '1.25rem',
|
|
193
|
-
'2xl': '1.5rem',
|
|
194
|
-
'3xl': '1.875rem',
|
|
195
|
-
'4xl': '2.25rem',
|
|
196
|
-
'5xl': '3rem',
|
|
197
|
-
'6xl': '3.75rem',
|
|
198
|
-
'7xl': '4.5rem',
|
|
199
|
-
'8xl': '6rem',
|
|
200
|
-
'9xl': '8rem',
|
|
201
|
-
},
|
|
202
|
-
lineHeight: {
|
|
203
|
-
xs: '1rem',
|
|
204
|
-
sm: '1.25rem',
|
|
205
|
-
md: '1.5rem',
|
|
206
|
-
lg: '1.75rem',
|
|
207
|
-
xl: '1.75rem',
|
|
208
|
-
'2xl': '2rem',
|
|
209
|
-
'3xl': '2.25rem',
|
|
210
|
-
'4xl': '2.5rem',
|
|
211
|
-
'5xl': '1',
|
|
212
|
-
'6xl': '1',
|
|
213
|
-
'7xl': '1',
|
|
214
|
-
'8xl': '1',
|
|
215
|
-
'9xl': '1',
|
|
216
|
-
},
|
|
217
|
-
weight: {
|
|
218
|
-
thin: '100',
|
|
219
|
-
extralight: '200',
|
|
220
|
-
light: '300',
|
|
221
|
-
normal: '400',
|
|
222
|
-
medium: '500',
|
|
223
|
-
semibold: '600',
|
|
224
|
-
bold: '700',
|
|
225
|
-
extrabold: '800',
|
|
226
|
-
black: '900',
|
|
227
|
-
},
|
|
228
|
-
},
|
|
229
|
-
breakpoints: {
|
|
230
|
-
xs: '320px',
|
|
231
|
-
sm: '640px',
|
|
232
|
-
md: '768px',
|
|
233
|
-
lg: '1024px',
|
|
234
|
-
xl: '1280px',
|
|
235
|
-
'2xl': '1536px',
|
|
236
|
-
},
|
|
237
|
-
border: {
|
|
238
|
-
radius: {
|
|
239
|
-
none: '0px',
|
|
240
|
-
xs: '0.125rem',
|
|
241
|
-
sm: '0.25rem',
|
|
242
|
-
md: '0.375rem',
|
|
243
|
-
lg: '0.5rem',
|
|
244
|
-
xl: '0.75rem',
|
|
245
|
-
'2xl': '1rem',
|
|
246
|
-
'3xl': '1.5rem',
|
|
247
|
-
full: '9999px',
|
|
248
|
-
},
|
|
249
|
-
},
|
|
250
|
-
size: {
|
|
251
|
-
0: '0px',
|
|
252
|
-
0.25: '0.0625rem',
|
|
253
|
-
0.5: '0.125rem',
|
|
254
|
-
1: '0.25rem',
|
|
255
|
-
1.5: '0.375rem',
|
|
256
|
-
2: '0.5rem',
|
|
257
|
-
2.5: '0.625rem',
|
|
258
|
-
3: '0.75rem',
|
|
259
|
-
3.5: '0.875rem',
|
|
260
|
-
4: '1rem',
|
|
261
|
-
4.5: '1.125rem',
|
|
262
|
-
5: '1.25rem',
|
|
263
|
-
6: '1.5rem',
|
|
264
|
-
7: '1.75rem',
|
|
265
|
-
8: '2rem',
|
|
266
|
-
9: '2.25rem',
|
|
267
|
-
10: '2.5rem',
|
|
268
|
-
11: '2.75rem',
|
|
269
|
-
12: '3rem',
|
|
270
|
-
14: '3.5rem',
|
|
271
|
-
16: '4rem',
|
|
272
|
-
20: '5rem',
|
|
273
|
-
24: '6rem',
|
|
274
|
-
28: '7rem',
|
|
275
|
-
32: '8rem',
|
|
276
|
-
36: '9rem',
|
|
277
|
-
40: '10rem',
|
|
278
|
-
44: '11rem',
|
|
279
|
-
48: '12rem',
|
|
280
|
-
52: '13rem',
|
|
281
|
-
56: '14rem',
|
|
282
|
-
60: '15rem',
|
|
283
|
-
64: '16rem',
|
|
284
|
-
72: '18rem',
|
|
285
|
-
80: '20rem',
|
|
286
|
-
96: '24rem',
|
|
287
|
-
},
|
|
288
|
-
shadow: Shadow,
|
|
289
|
-
zIndices: {
|
|
290
|
-
hide: -1,
|
|
291
|
-
auto: 'auto',
|
|
292
|
-
base: 0,
|
|
293
|
-
docked: 10,
|
|
294
|
-
dropdown: 1000,
|
|
295
|
-
sticky: 1100,
|
|
296
|
-
banner: 1200,
|
|
297
|
-
overlay: 1300,
|
|
298
|
-
modal: 1400,
|
|
299
|
-
popover: 1500,
|
|
300
|
-
skipLink: 1600,
|
|
301
|
-
toast: 1700,
|
|
302
|
-
tooltip: 1800,
|
|
303
|
-
},
|
|
304
|
-
};
|
package/dist/source/utils.jsx
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { serialize } from 'superjson';
|
|
2
|
-
export function getQueryStatusLabel(query) {
|
|
3
|
-
return query.state.fetchStatus === 'fetching'
|
|
4
|
-
? 'fetching'
|
|
5
|
-
: !query.getObserversCount()
|
|
6
|
-
? 'inactive'
|
|
7
|
-
: query.state.fetchStatus === 'paused'
|
|
8
|
-
? 'paused'
|
|
9
|
-
: query.isStale()
|
|
10
|
-
? 'stale'
|
|
11
|
-
: 'fresh';
|
|
12
|
-
}
|
|
13
|
-
export const queryStatusLabels = [
|
|
14
|
-
'fresh',
|
|
15
|
-
'stale',
|
|
16
|
-
'paused',
|
|
17
|
-
'inactive',
|
|
18
|
-
'fetching',
|
|
19
|
-
];
|
|
20
|
-
export function getSidedProp(prop, side) {
|
|
21
|
-
return `${prop}${side.charAt(0).toUpperCase() + side.slice(1)}`;
|
|
22
|
-
}
|
|
23
|
-
export function getQueryStatusColor({ queryState, observerCount, isStale, }) {
|
|
24
|
-
return queryState.fetchStatus === 'fetching'
|
|
25
|
-
? 'blue'
|
|
26
|
-
: !observerCount
|
|
27
|
-
? 'gray'
|
|
28
|
-
: queryState.fetchStatus === 'paused'
|
|
29
|
-
? 'purple'
|
|
30
|
-
: isStale
|
|
31
|
-
? 'yellow'
|
|
32
|
-
: 'green';
|
|
33
|
-
}
|
|
34
|
-
export function getQueryStatusColorByLabel(label) {
|
|
35
|
-
return label === 'fresh'
|
|
36
|
-
? 'green'
|
|
37
|
-
: label === 'stale'
|
|
38
|
-
? 'yellow'
|
|
39
|
-
: label === 'paused'
|
|
40
|
-
? 'purple'
|
|
41
|
-
: label === 'inactive'
|
|
42
|
-
? 'gray'
|
|
43
|
-
: 'blue';
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Displays a string regardless the type of the data
|
|
47
|
-
* @param {unknown} value Value to be stringified
|
|
48
|
-
* @param {boolean} beautify Formats json to multiline
|
|
49
|
-
*/
|
|
50
|
-
export const displayValue = (value, beautify = false) => {
|
|
51
|
-
const { json } = serialize(value);
|
|
52
|
-
return JSON.stringify(json, null, beautify ? 2 : undefined);
|
|
53
|
-
};
|
|
54
|
-
const getStatusRank = (q) => q.state.fetchStatus !== 'idle'
|
|
55
|
-
? 0
|
|
56
|
-
: !q.getObserversCount()
|
|
57
|
-
? 3
|
|
58
|
-
: q.isStale()
|
|
59
|
-
? 2
|
|
60
|
-
: 1;
|
|
61
|
-
const queryHashSort = (a, b) => a.queryHash.localeCompare(b.queryHash);
|
|
62
|
-
const dateSort = (a, b) => a.state.dataUpdatedAt < b.state.dataUpdatedAt ? 1 : -1;
|
|
63
|
-
const statusAndDateSort = (a, b) => {
|
|
64
|
-
if (getStatusRank(a) === getStatusRank(b)) {
|
|
65
|
-
return dateSort(a, b);
|
|
66
|
-
}
|
|
67
|
-
return getStatusRank(a) > getStatusRank(b) ? 1 : -1;
|
|
68
|
-
};
|
|
69
|
-
export const sortFns = {
|
|
70
|
-
status: statusAndDateSort,
|
|
71
|
-
'query hash': queryHashSort,
|
|
72
|
-
'last updated': dateSort,
|
|
73
|
-
};
|
|
74
|
-
export const convertRemToPixels = (rem) => {
|
|
75
|
-
return rem * parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
76
|
-
};
|
|
77
|
-
export const convertPixelsToRem = (px) => px / convertRemToPixels(1);
|
package/dist/types/Context.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { Query, QueryClient, onlineManager } from '@tanstack/query-core';
|
|
2
|
-
type XPosition = 'left' | 'right';
|
|
3
|
-
type YPosition = 'top' | 'bottom';
|
|
4
|
-
export type DevtoolsPosition = XPosition | YPosition;
|
|
5
|
-
export type DevtoolsButtonPosition = `${YPosition}-${XPosition}`;
|
|
6
|
-
export interface DevToolsErrorType {
|
|
7
|
-
/**
|
|
8
|
-
* The name of the error.
|
|
9
|
-
*/
|
|
10
|
-
name: string;
|
|
11
|
-
/**
|
|
12
|
-
* How the error is initialized.
|
|
13
|
-
*/
|
|
14
|
-
initializer: (query: Query) => Error;
|
|
15
|
-
}
|
|
16
|
-
export interface QueryDevtoolsProps {
|
|
17
|
-
readonly client: QueryClient;
|
|
18
|
-
queryFlavor: string;
|
|
19
|
-
version: string;
|
|
20
|
-
onlineManager: typeof onlineManager;
|
|
21
|
-
buttonPosition?: DevtoolsButtonPosition;
|
|
22
|
-
position?: DevtoolsPosition;
|
|
23
|
-
initialIsOpen?: boolean;
|
|
24
|
-
errorTypes?: DevToolsErrorType[];
|
|
25
|
-
}
|
|
26
|
-
export declare const QueryDevtoolsContext: import("solid-js").Context<QueryDevtoolsProps>;
|
|
27
|
-
export declare function useQueryDevtoolsContext(): QueryDevtoolsProps;
|
|
28
|
-
export {};
|
package/dist/types/Devtools.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { QueryDevtoolsProps } from './Context';
|
|
2
|
-
import type { Query } from '@tanstack/query-core';
|
|
3
|
-
import type { StorageObject, StorageSetter } from '@solid-primitives/storage';
|
|
4
|
-
import type { Component, JSX } from 'solid-js';
|
|
5
|
-
interface DevtoolsPanelProps {
|
|
6
|
-
localStore: StorageObject<string>;
|
|
7
|
-
setLocalStore: StorageSetter<string, unknown>;
|
|
8
|
-
}
|
|
9
|
-
interface QueryStatusProps {
|
|
10
|
-
label: string;
|
|
11
|
-
color: 'green' | 'yellow' | 'gray' | 'blue' | 'purple';
|
|
12
|
-
count: number;
|
|
13
|
-
}
|
|
14
|
-
export declare const DevtoolsComponent: Component<QueryDevtoolsProps>;
|
|
15
|
-
export default DevtoolsComponent;
|
|
16
|
-
export declare const Devtools: () => JSX.Element;
|
|
17
|
-
export declare const DevtoolsPanel: Component<DevtoolsPanelProps>;
|
|
18
|
-
export declare const QueryRow: Component<{
|
|
19
|
-
query: Query;
|
|
20
|
-
}>;
|
|
21
|
-
export declare const QueryStatusCount: Component;
|
|
22
|
-
export declare const QueryStatus: Component<QueryStatusProps>;
|
package/dist/types/Explorer.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Chunk elements in the array by size
|
|
3
|
-
*
|
|
4
|
-
* when the array cannot be chunked evenly by size, the last chunk will be
|
|
5
|
-
* filled with the remaining elements
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* chunkArray(['a','b', 'c', 'd', 'e'], 2) // returns [['a','b'], ['c', 'd'], ['e']]
|
|
9
|
-
*/
|
|
10
|
-
export declare function chunkArray<T extends {
|
|
11
|
-
label: string;
|
|
12
|
-
value: unknown;
|
|
13
|
-
}>(array: T[], size: number): T[][];
|
|
14
|
-
type ExplorerProps = {
|
|
15
|
-
copyable?: boolean;
|
|
16
|
-
label: string;
|
|
17
|
-
value: unknown;
|
|
18
|
-
defaultExpanded?: string[];
|
|
19
|
-
};
|
|
20
|
-
export default function Explorer(props: ExplorerProps): import("solid-js").JSX.Element;
|
|
21
|
-
export {};
|
package/dist/types/fonts.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const loadFonts: () => void;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare function Search(): import("solid-js").JSX.Element;
|
|
2
|
-
export declare function ChevronDown(): import("solid-js").JSX.Element;
|
|
3
|
-
export declare function ArrowUp(): import("solid-js").JSX.Element;
|
|
4
|
-
export declare function ArrowDown(): import("solid-js").JSX.Element;
|
|
5
|
-
export declare function Wifi(): import("solid-js").JSX.Element;
|
|
6
|
-
export declare function Offline(): import("solid-js").JSX.Element;
|
|
7
|
-
export declare function Settings(): import("solid-js").JSX.Element;
|
|
8
|
-
export declare function Copier(): import("solid-js").JSX.Element;
|
|
9
|
-
export declare function CopiedCopier(): import("solid-js").JSX.Element;
|
|
10
|
-
export declare function ErrorCopier(): import("solid-js").JSX.Element;
|
|
11
|
-
export declare function TanstackLogo(): import("solid-js").JSX.Element;
|
package/dist/types/index.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { QueryClient, onlineManager as TonlineManager } from '@tanstack/query-core';
|
|
2
|
-
import type { DevtoolsComponent } from './Devtools';
|
|
3
|
-
import type { DevToolsErrorType, DevtoolsButtonPosition, DevtoolsPosition, QueryDevtoolsProps } from './Context';
|
|
4
|
-
import type { Signal } from 'solid-js';
|
|
5
|
-
export type { DevtoolsButtonPosition, DevtoolsPosition, DevToolsErrorType };
|
|
6
|
-
export interface TanstackQueryDevtoolsConfig extends QueryDevtoolsProps {
|
|
7
|
-
}
|
|
8
|
-
declare class TanstackQueryDevtools {
|
|
9
|
-
client: Signal<QueryClient>;
|
|
10
|
-
onlineManager: typeof TonlineManager;
|
|
11
|
-
queryFlavor: string;
|
|
12
|
-
version: string;
|
|
13
|
-
isMounted: boolean;
|
|
14
|
-
buttonPosition: Signal<DevtoolsButtonPosition | undefined>;
|
|
15
|
-
position: Signal<DevtoolsPosition | undefined>;
|
|
16
|
-
initialIsOpen: Signal<boolean | undefined>;
|
|
17
|
-
errorTypes: Signal<DevToolsErrorType[] | undefined>;
|
|
18
|
-
Component: typeof DevtoolsComponent | undefined;
|
|
19
|
-
dispose?: () => void;
|
|
20
|
-
constructor(config: TanstackQueryDevtoolsConfig);
|
|
21
|
-
setButtonPosition(position: DevtoolsButtonPosition): void;
|
|
22
|
-
setPosition(position: DevtoolsPosition): void;
|
|
23
|
-
setInitialIsOpen(isOpen: boolean): void;
|
|
24
|
-
setErrorTypes(errorTypes: DevToolsErrorType[]): void;
|
|
25
|
-
setClient(client: QueryClient): void;
|
|
26
|
-
mount<T extends HTMLElement>(el: T): void;
|
|
27
|
-
unmount(): void;
|
|
28
|
-
}
|
|
29
|
-
export { TanstackQueryDevtools };
|