@tanstack/react-query-devtools 5.0.0-alpha.9 → 5.0.0-alpha.90

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 (145) hide show
  1. package/build/legacy/devtools-d8b99e07.d.ts +42 -0
  2. package/build/legacy/devtools.cjs +91 -0
  3. package/build/legacy/devtools.cjs.map +1 -0
  4. package/build/legacy/devtools.d.cts +4 -0
  5. package/build/legacy/devtools.d.ts +4 -0
  6. package/build/legacy/devtools.js +57 -0
  7. package/build/legacy/devtools.js.map +1 -0
  8. package/build/legacy/index.cjs +45 -0
  9. package/build/legacy/index.cjs.map +1 -0
  10. package/build/legacy/index.d.cts +8 -0
  11. package/build/legacy/index.d.ts +8 -0
  12. package/build/legacy/index.js +11 -0
  13. package/build/legacy/index.js.map +1 -0
  14. package/build/legacy/production.cjs +43 -0
  15. package/build/legacy/production.cjs.map +1 -0
  16. package/build/legacy/production.d.cts +8 -0
  17. package/build/legacy/production.d.ts +8 -0
  18. package/build/legacy/production.js +9 -0
  19. package/build/legacy/production.js.map +1 -0
  20. package/build/modern/devtools-d8b99e07.d.ts +42 -0
  21. package/build/modern/devtools.cjs +91 -0
  22. package/build/modern/devtools.cjs.map +1 -0
  23. package/build/modern/devtools.d.cts +4 -0
  24. package/build/modern/devtools.d.ts +4 -0
  25. package/build/modern/devtools.js +57 -0
  26. package/build/modern/devtools.js.map +1 -0
  27. package/build/modern/index.cjs +45 -0
  28. package/build/modern/index.cjs.map +1 -0
  29. package/build/modern/index.d.cts +8 -0
  30. package/build/modern/index.d.ts +8 -0
  31. package/build/modern/index.js +11 -0
  32. package/build/modern/index.js.map +1 -0
  33. package/build/modern/production.cjs +43 -0
  34. package/build/modern/production.cjs.map +1 -0
  35. package/build/modern/production.d.cts +8 -0
  36. package/build/modern/production.d.ts +8 -0
  37. package/build/modern/production.js +9 -0
  38. package/build/modern/production.js.map +1 -0
  39. package/package.json +32 -27
  40. package/src/__tests__/devtools.test.tsx +1 -1009
  41. package/src/__tests__/utils.tsx +4 -4
  42. package/src/devtools.tsx +59 -1309
  43. package/src/index.ts +0 -7
  44. package/src/production.ts +5 -0
  45. package/build/lib/Explorer.d.ts +0 -50
  46. package/build/lib/Explorer.esm.js +0 -254
  47. package/build/lib/Explorer.esm.js.map +0 -1
  48. package/build/lib/Explorer.js +0 -288
  49. package/build/lib/Explorer.js.map +0 -1
  50. package/build/lib/Explorer.mjs +0 -254
  51. package/build/lib/Explorer.mjs.map +0 -1
  52. package/build/lib/Logo.d.ts +0 -1
  53. package/build/lib/Logo.esm.js +0 -32
  54. package/build/lib/Logo.esm.js.map +0 -1
  55. package/build/lib/Logo.js +0 -55
  56. package/build/lib/Logo.js.map +0 -1
  57. package/build/lib/Logo.mjs +0 -32
  58. package/build/lib/Logo.mjs.map +0 -1
  59. package/build/lib/__tests__/Explorer.test.d.ts +0 -1
  60. package/build/lib/__tests__/devtools.test.d.ts +0 -1
  61. package/build/lib/__tests__/utils.d.ts +0 -22
  62. package/build/lib/_virtual/_rollupPluginBabelHelpers.esm.js +0 -17
  63. package/build/lib/_virtual/_rollupPluginBabelHelpers.esm.js.map +0 -1
  64. package/build/lib/_virtual/_rollupPluginBabelHelpers.js +0 -19
  65. package/build/lib/_virtual/_rollupPluginBabelHelpers.js.map +0 -1
  66. package/build/lib/_virtual/_rollupPluginBabelHelpers.mjs +0 -17
  67. package/build/lib/_virtual/_rollupPluginBabelHelpers.mjs.map +0 -1
  68. package/build/lib/devtools.d.ts +0 -113
  69. package/build/lib/devtools.esm.js +0 -900
  70. package/build/lib/devtools.esm.js.map +0 -1
  71. package/build/lib/devtools.js +0 -921
  72. package/build/lib/devtools.js.map +0 -1
  73. package/build/lib/devtools.mjs +0 -869
  74. package/build/lib/devtools.mjs.map +0 -1
  75. package/build/lib/index.d.ts +0 -3
  76. package/build/lib/index.esm.js +0 -12
  77. package/build/lib/index.esm.js.map +0 -1
  78. package/build/lib/index.js +0 -15
  79. package/build/lib/index.js.map +0 -1
  80. package/build/lib/index.mjs +0 -12
  81. package/build/lib/index.mjs.map +0 -1
  82. package/build/lib/index.prod.d.ts +0 -3
  83. package/build/lib/index.prod.esm.js +0 -1559
  84. package/build/lib/index.prod.esm.js.map +0 -1
  85. package/build/lib/index.prod.js +0 -1580
  86. package/build/lib/index.prod.js.map +0 -1
  87. package/build/lib/index.prod.mjs +0 -1528
  88. package/build/lib/index.prod.mjs.map +0 -1
  89. package/build/lib/noop.d.ts +0 -2
  90. package/build/lib/screenreader.d.ts +0 -3
  91. package/build/lib/screenreader.esm.js +0 -17
  92. package/build/lib/screenreader.esm.js.map +0 -1
  93. package/build/lib/screenreader.js +0 -40
  94. package/build/lib/screenreader.js.map +0 -1
  95. package/build/lib/screenreader.mjs +0 -17
  96. package/build/lib/screenreader.mjs.map +0 -1
  97. package/build/lib/styledComponents.d.ts +0 -8
  98. package/build/lib/styledComponents.esm.js +0 -95
  99. package/build/lib/styledComponents.esm.js.map +0 -1
  100. package/build/lib/styledComponents.js +0 -104
  101. package/build/lib/styledComponents.js.map +0 -1
  102. package/build/lib/styledComponents.mjs +0 -95
  103. package/build/lib/styledComponents.mjs.map +0 -1
  104. package/build/lib/theme.d.ts +0 -36
  105. package/build/lib/theme.esm.js +0 -33
  106. package/build/lib/theme.esm.js.map +0 -1
  107. package/build/lib/theme.js +0 -56
  108. package/build/lib/theme.js.map +0 -1
  109. package/build/lib/theme.mjs +0 -33
  110. package/build/lib/theme.mjs.map +0 -1
  111. package/build/lib/useLocalStorage.d.ts +0 -1
  112. package/build/lib/useLocalStorage.esm.js +0 -40
  113. package/build/lib/useLocalStorage.esm.js.map +0 -1
  114. package/build/lib/useLocalStorage.js +0 -63
  115. package/build/lib/useLocalStorage.js.map +0 -1
  116. package/build/lib/useLocalStorage.mjs +0 -40
  117. package/build/lib/useLocalStorage.mjs.map +0 -1
  118. package/build/lib/useMediaQuery.d.ts +0 -1
  119. package/build/lib/useMediaQuery.esm.js +0 -36
  120. package/build/lib/useMediaQuery.esm.js.map +0 -1
  121. package/build/lib/useMediaQuery.js +0 -59
  122. package/build/lib/useMediaQuery.js.map +0 -1
  123. package/build/lib/useMediaQuery.mjs +0 -36
  124. package/build/lib/useMediaQuery.mjs.map +0 -1
  125. package/build/lib/utils.d.ts +0 -79
  126. package/build/lib/utils.esm.js +0 -184
  127. package/build/lib/utils.esm.js.map +0 -1
  128. package/build/lib/utils.js +0 -218
  129. package/build/lib/utils.js.map +0 -1
  130. package/build/lib/utils.mjs +0 -184
  131. package/build/lib/utils.mjs.map +0 -1
  132. package/build/umd/index.development.js +0 -3195
  133. package/build/umd/index.development.js.map +0 -1
  134. package/build/umd/index.production.js +0 -2
  135. package/build/umd/index.production.js.map +0 -1
  136. package/src/Explorer.tsx +0 -385
  137. package/src/Logo.tsx +0 -32
  138. package/src/__tests__/Explorer.test.tsx +0 -150
  139. package/src/noop.ts +0 -7
  140. package/src/screenreader.tsx +0 -16
  141. package/src/styledComponents.ts +0 -110
  142. package/src/theme.tsx +0 -33
  143. package/src/useLocalStorage.ts +0 -52
  144. package/src/useMediaQuery.ts +0 -34
  145. package/src/utils.ts +0 -319
@@ -1,113 +0,0 @@
1
- import * as React from 'react';
2
- import type { QueryClient, Query, DefaultError } from '@tanstack/react-query';
3
- import type { Corner, Side } from './utils';
4
- export interface DevToolsErrorType {
5
- /**
6
- * The name of the error.
7
- */
8
- name: string;
9
- /**
10
- * How the error is initialized.
11
- */
12
- initializer: (query: Query) => DefaultError;
13
- }
14
- export interface DevtoolsOptions {
15
- /**
16
- * Set this true if you want the dev tools to default to being open
17
- */
18
- initialIsOpen?: boolean;
19
- /**
20
- * Use this to add props to the panel. For example, you can add className, style (merge and override default style), etc.
21
- */
22
- panelProps?: React.ComponentPropsWithoutRef<'div'>;
23
- /**
24
- * Use this to add props to the close button. For example, you can add className, style (merge and override default style), onClick (extend default handler), etc.
25
- */
26
- closeButtonProps?: React.ComponentPropsWithoutRef<'button'>;
27
- /**
28
- * Use this to add props to the toggle button. For example, you can add className, style (merge and override default style), onClick (extend default handler), etc.
29
- */
30
- toggleButtonProps?: React.ComponentPropsWithoutRef<'button'>;
31
- /**
32
- * The position of the React Query logo to open and close the devtools panel.
33
- * Defaults to 'bottom-left'.
34
- */
35
- position?: Corner;
36
- /**
37
- * The position of the React Query devtools panel.
38
- * Defaults to 'bottom'.
39
- */
40
- panelPosition?: Side;
41
- /**
42
- * Use this to render the devtools inside a different type of container element for a11y purposes.
43
- * Any string which corresponds to a valid intrinsic JSX element is allowed.
44
- * Defaults to 'aside'.
45
- */
46
- containerElement?: string | any;
47
- /**
48
- * nonce for style element for CSP
49
- */
50
- styleNonce?: string;
51
- /**
52
- * Custom instance of QueryClient
53
- */
54
- queryClient?: QueryClient;
55
- /**
56
- * Use this so you can define custom errors that can be shown in the devtools.
57
- */
58
- errorTypes?: DevToolsErrorType[];
59
- }
60
- interface DevtoolsPanelOptions {
61
- /**
62
- * The standard React style object used to style a component with inline styles
63
- */
64
- style?: React.CSSProperties;
65
- /**
66
- * The standard React className property used to style a component with classes
67
- */
68
- className?: string;
69
- /**
70
- * A boolean variable indicating whether the panel is open or closed
71
- */
72
- isOpen?: boolean;
73
- /**
74
- * nonce for style element for CSP
75
- */
76
- styleNonce?: string;
77
- /**
78
- * A function that toggles the open and close state of the panel
79
- */
80
- setIsOpen: (isOpen: boolean) => void;
81
- /**
82
- * Handles the opening and closing the devtools panel
83
- */
84
- onDragStart: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
85
- /**
86
- * The position of the React Query devtools panel.
87
- * Defaults to 'bottom'.
88
- */
89
- position?: Side;
90
- /**
91
- * Handles the panel position select change
92
- */
93
- onPositionChange?: (side: Side) => void;
94
- /**
95
- * Show a close button inside the panel
96
- */
97
- showCloseButton?: boolean;
98
- /**
99
- * Use this to add props to the close button. For example, you can add className, style (merge and override default style), onClick (extend default handler), etc.
100
- */
101
- closeButtonProps?: React.ComponentPropsWithoutRef<'button'>;
102
- /**
103
- * Custom instance of QueryClient
104
- */
105
- queryClient?: QueryClient;
106
- /**
107
- * Use this so you can define custom errors that can be shown in the devtools.
108
- */
109
- errorTypes?: DevToolsErrorType[];
110
- }
111
- export declare function ReactQueryDevtools({ initialIsOpen, panelProps, closeButtonProps, toggleButtonProps, position, containerElement: Container, queryClient, styleNonce, panelPosition: initialPanelPosition, errorTypes, }: DevtoolsOptions): React.ReactElement | null;
112
- export declare const ReactQueryDevtoolsPanel: React.ForwardRefExoticComponent<DevtoolsPanelOptions & React.RefAttributes<HTMLDivElement>>;
113
- export {};