@tanstack/react-query-devtools 5.0.0-alpha.47 → 5.0.0-alpha.48

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.
@@ -1109,35 +1109,6 @@ function cleanChildren(parent, current, marker, replacement) {
1109
1109
  return [node];
1110
1110
  }
1111
1111
 
1112
- function _defineProperty(obj, key, value) {
1113
- key = _toPropertyKey(key);
1114
- if (key in obj) {
1115
- Object.defineProperty(obj, key, {
1116
- value: value,
1117
- enumerable: true,
1118
- configurable: true,
1119
- writable: true
1120
- });
1121
- } else {
1122
- obj[key] = value;
1123
- }
1124
- return obj;
1125
- }
1126
- function _toPrimitive(input, hint) {
1127
- if (typeof input !== "object" || input === null) return input;
1128
- var prim = input[Symbol.toPrimitive];
1129
- if (prim !== undefined) {
1130
- var res = prim.call(input, hint || "default");
1131
- if (typeof res !== "object") return res;
1132
- throw new TypeError("@@toPrimitive must return a primitive value.");
1133
- }
1134
- return (hint === "string" ? String : Number)(input);
1135
- }
1136
- function _toPropertyKey(arg) {
1137
- var key = _toPrimitive(arg, "string");
1138
- return typeof key === "symbol" ? key : String(key);
1139
- }
1140
-
1141
1112
  /**
1142
1113
  * match-sorter-utils
1143
1114
  *
@@ -2504,7 +2475,7 @@ function declaration(value, root, parent, length) {
2504
2475
  * @param {function} callback
2505
2476
  * @return {string}
2506
2477
  */
2507
- function serialize(children, callback) {
2478
+ function serialize$1(children, callback) {
2508
2479
  var output = '';
2509
2480
  var length = sizeof(children);
2510
2481
  for (var i = 0; i < length; i++) output += callback(children[i], i, children, callback) || '';
@@ -2518,7 +2489,7 @@ function serialize(children, callback) {
2518
2489
  * @param {function} callback
2519
2490
  * @return {string}
2520
2491
  */
2521
- function stringify(element, index, children, callback) {
2492
+ function stringify$1(element, index, children, callback) {
2522
2493
  switch (element.type) {
2523
2494
  case LAYER:
2524
2495
  if (element.children.length) break;
@@ -2528,11 +2499,11 @@ function stringify(element, index, children, callback) {
2528
2499
  case COMMENT:
2529
2500
  return '';
2530
2501
  case KEYFRAMES:
2531
- return element.return = element.value + '{' + serialize(element.children, callback) + '}';
2502
+ return element.return = element.value + '{' + serialize$1(element.children, callback) + '}';
2532
2503
  case RULESET:
2533
2504
  element.value = element.props.join(',');
2534
2505
  }
2535
- return strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : '';
2506
+ return strlen(children = serialize$1(element.children, callback)) ? element.return = element.value + '{' + children + '}' : '';
2536
2507
  }
2537
2508
 
2538
2509
  /**
@@ -2950,7 +2921,7 @@ var prefixer = function prefixer(element, index, children, callback) {
2950
2921
  element["return"] = prefix(element.value, element.length);
2951
2922
  break;
2952
2923
  case KEYFRAMES:
2953
- return serialize([copy$1(element, {
2924
+ return serialize$1([copy$1(element, {
2954
2925
  value: replace(element.value, '@', '@' + WEBKIT)
2955
2926
  })], callback);
2956
2927
  case RULESET:
@@ -2959,13 +2930,13 @@ var prefixer = function prefixer(element, index, children, callback) {
2959
2930
  // :read-(only|write)
2960
2931
  case ':read-only':
2961
2932
  case ':read-write':
2962
- return serialize([copy$1(element, {
2933
+ return serialize$1([copy$1(element, {
2963
2934
  props: [replace(value, /:(read-\w+)/, ':' + MOZ + '$1')]
2964
2935
  })], callback);
2965
2936
  // :placeholder
2966
2937
 
2967
2938
  case '::placeholder':
2968
- return serialize([copy$1(element, {
2939
+ return serialize$1([copy$1(element, {
2969
2940
  props: [replace(value, /:(plac\w+)/, ':' + WEBKIT + 'input-$1')]
2970
2941
  }), copy$1(element, {
2971
2942
  props: [replace(value, /:(plac\w+)/, ':' + MOZ + '$1')]
@@ -3048,7 +3019,7 @@ var createCache = function createCache(options) {
3048
3019
  }
3049
3020
  if (isBrowser$1) {
3050
3021
  var currentSheet;
3051
- var finalizingPlugins = [stringify, function (element) {
3022
+ var finalizingPlugins = [stringify$1, function (element) {
3052
3023
  if (!element.root) {
3053
3024
  if (element["return"]) {
3054
3025
  currentSheet.insert(element["return"]);
@@ -3061,7 +3032,7 @@ var createCache = function createCache(options) {
3061
3032
  } ];
3062
3033
  var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));
3063
3034
  var stylis = function stylis(styles) {
3064
- return serialize(compile(styles), serializer);
3035
+ return serialize$1(compile(styles), serializer);
3065
3036
  };
3066
3037
  _insert = function insert(selector, serialized, sheet, shouldCache) {
3067
3038
  currentSheet = sheet;
@@ -3078,10 +3049,10 @@ var createCache = function createCache(options) {
3078
3049
  }
3079
3050
  };
3080
3051
  } else {
3081
- var _finalizingPlugins = [stringify];
3052
+ var _finalizingPlugins = [stringify$1];
3082
3053
  var _serializer = middleware(omnipresentPlugins.concat(stylisPlugins, _finalizingPlugins));
3083
3054
  var _stylis = function _stylis(styles) {
3084
- return serialize(compile(styles), _serializer);
3055
+ return serialize$1(compile(styles), _serializer);
3085
3056
  }; // $FlowFixMe
3086
3057
 
3087
3058
  var serverStylisCache = getServerStylisCache(stylisPlugins)(key);
@@ -4975,6 +4946,8 @@ var SuperJSON = /** @class */function () {
4975
4946
  SuperJSON.allowErrorProps = SuperJSON.defaultInstance.allowErrorProps.bind(SuperJSON.defaultInstance);
4976
4947
  return SuperJSON;
4977
4948
  }();
4949
+ var serialize = SuperJSON.serialize;
4950
+ var stringify = SuperJSON.stringify;
4978
4951
 
4979
4952
  function getQueryStatusLabel(query) {
4980
4953
  return query.state.fetchStatus === 'fetching' ? 'fetching' : !query.getObserversCount() ? 'inactive' : query.state.fetchStatus === 'paused' ? 'paused' : query.isStale() ? 'stale' : 'fresh';
@@ -4998,7 +4971,7 @@ function getQueryStatusColorByLabel(label) {
4998
4971
  const displayValue = (value, beautify = false) => {
4999
4972
  const {
5000
4973
  json
5001
- } = SuperJSON.serialize(value);
4974
+ } = serialize(value);
5002
4975
  return JSON.stringify(json, null, beautify ? 2 : undefined);
5003
4976
  };
5004
4977
 
@@ -5204,7 +5177,7 @@ const CopyButton = props => {
5204
5177
  return (() => {
5205
5178
  const _el$2 = _tmpl$2$1.cloneNode(true);
5206
5179
  addEventListener(_el$2, "click", copyState() === 'NoCopy' ? () => {
5207
- navigator.clipboard.writeText(SuperJSON.stringify(props.value)).then(() => {
5180
+ navigator.clipboard.writeText(stringify(props.value)).then(() => {
5208
5181
  setCopyState('SuccessCopy');
5209
5182
  setTimeout(() => {
5210
5183
  setCopyState('NoCopy');
@@ -7860,17 +7833,8 @@ const getStyles = () => {
7860
7833
  delegateEvents(["click", "mousedown", "input"]);
7861
7834
 
7862
7835
  class TanstackQueryDevtools {
7836
+ isMounted = false;
7863
7837
  constructor(config) {
7864
- _defineProperty(this, "client", void 0);
7865
- _defineProperty(this, "onlineManager", void 0);
7866
- _defineProperty(this, "queryFlavor", void 0);
7867
- _defineProperty(this, "version", void 0);
7868
- _defineProperty(this, "isMounted", false);
7869
- _defineProperty(this, "buttonPosition", void 0);
7870
- _defineProperty(this, "position", void 0);
7871
- _defineProperty(this, "initialIsOpen", void 0);
7872
- _defineProperty(this, "errorTypes", void 0);
7873
- _defineProperty(this, "dispose", void 0);
7874
7838
  const {
7875
7839
  client,
7876
7840
  queryFlavor,