@tanstack/react-query-devtools 4.13.6 → 4.14.0

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.
@@ -165,13 +165,14 @@ function useIsMounted() {
165
165
  /**
166
166
  * Displays a string regardless the type of the data
167
167
  * @param {unknown} value Value to be stringified
168
+ * @param {boolean} beautify Formats json to multiline
168
169
  */
169
170
 
170
- const displayValue = value => {
171
+ const displayValue = (value, beautify = false) => {
171
172
  const {
172
173
  json
173
174
  } = SuperJSON.serialize(value);
174
- return JSON.stringify(json);
175
+ return JSON.stringify(json, null, beautify ? 2 : undefined);
175
176
  }; // Sorting functions
176
177
 
177
178
  const getStatusRank = q => q.state.fetchStatus !== 'idle' ? 0 : !q.getObserversCount() ? 3 : q.isStale() ? 2 : 1;
@@ -1134,7 +1135,7 @@ const ActiveQuery = ({
1134
1135
  padding: 0,
1135
1136
  overflow: 'auto'
1136
1137
  }
1137
- }, JSON.stringify(activeQuery.queryKey, null, 2))), /*#__PURE__*/React.createElement("span", {
1138
+ }, displayValue(activeQuery.queryKey, true))), /*#__PURE__*/React.createElement("span", {
1138
1139
  style: {
1139
1140
  padding: '0.3em .6em',
1140
1141
  borderRadius: '0.4em',