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