@tanstack/query-devtools 5.0.0-alpha.47 → 5.0.0-alpha.49

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.
@@ -1106,35 +1106,6 @@ function cleanChildren(parent, current, marker, replacement) {
1106
1106
  return [node];
1107
1107
  }
1108
1108
 
1109
- function _defineProperty(obj, key, value) {
1110
- key = _toPropertyKey(key);
1111
- if (key in obj) {
1112
- Object.defineProperty(obj, key, {
1113
- value: value,
1114
- enumerable: true,
1115
- configurable: true,
1116
- writable: true
1117
- });
1118
- } else {
1119
- obj[key] = value;
1120
- }
1121
- return obj;
1122
- }
1123
- function _toPrimitive(input, hint) {
1124
- if (typeof input !== "object" || input === null) return input;
1125
- var prim = input[Symbol.toPrimitive];
1126
- if (prim !== undefined) {
1127
- var res = prim.call(input, hint || "default");
1128
- if (typeof res !== "object") return res;
1129
- throw new TypeError("@@toPrimitive must return a primitive value.");
1130
- }
1131
- return (hint === "string" ? String : Number)(input);
1132
- }
1133
- function _toPropertyKey(arg) {
1134
- var key = _toPrimitive(arg, "string");
1135
- return typeof key === "symbol" ? key : String(key);
1136
- }
1137
-
1138
1109
  /**
1139
1110
  * match-sorter-utils
1140
1111
  *
@@ -2501,7 +2472,7 @@ function declaration(value, root, parent, length) {
2501
2472
  * @param {function} callback
2502
2473
  * @return {string}
2503
2474
  */
2504
- function serialize(children, callback) {
2475
+ function serialize$1(children, callback) {
2505
2476
  var output = '';
2506
2477
  var length = sizeof(children);
2507
2478
  for (var i = 0; i < length; i++) output += callback(children[i], i, children, callback) || '';
@@ -2515,7 +2486,7 @@ function serialize(children, callback) {
2515
2486
  * @param {function} callback
2516
2487
  * @return {string}
2517
2488
  */
2518
- function stringify(element, index, children, callback) {
2489
+ function stringify$1(element, index, children, callback) {
2519
2490
  switch (element.type) {
2520
2491
  case LAYER:
2521
2492
  if (element.children.length) break;
@@ -2525,11 +2496,11 @@ function stringify(element, index, children, callback) {
2525
2496
  case COMMENT:
2526
2497
  return '';
2527
2498
  case KEYFRAMES:
2528
- return element.return = element.value + '{' + serialize(element.children, callback) + '}';
2499
+ return element.return = element.value + '{' + serialize$1(element.children, callback) + '}';
2529
2500
  case RULESET:
2530
2501
  element.value = element.props.join(',');
2531
2502
  }
2532
- return strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : '';
2503
+ return strlen(children = serialize$1(element.children, callback)) ? element.return = element.value + '{' + children + '}' : '';
2533
2504
  }
2534
2505
 
2535
2506
  /**
@@ -2957,7 +2928,7 @@ var prefixer = function prefixer(element, index, children, callback) {
2957
2928
  element["return"] = prefix(element.value, element.length);
2958
2929
  break;
2959
2930
  case KEYFRAMES:
2960
- return serialize([copy$1(element, {
2931
+ return serialize$1([copy$1(element, {
2961
2932
  value: replace(element.value, '@', '@' + WEBKIT)
2962
2933
  })], callback);
2963
2934
  case RULESET:
@@ -2966,13 +2937,13 @@ var prefixer = function prefixer(element, index, children, callback) {
2966
2937
  // :read-(only|write)
2967
2938
  case ':read-only':
2968
2939
  case ':read-write':
2969
- return serialize([copy$1(element, {
2940
+ return serialize$1([copy$1(element, {
2970
2941
  props: [replace(value, /:(read-\w+)/, ':' + MOZ + '$1')]
2971
2942
  })], callback);
2972
2943
  // :placeholder
2973
2944
 
2974
2945
  case '::placeholder':
2975
- return serialize([copy$1(element, {
2946
+ return serialize$1([copy$1(element, {
2976
2947
  props: [replace(value, /:(plac\w+)/, ':' + WEBKIT + 'input-$1')]
2977
2948
  }), copy$1(element, {
2978
2949
  props: [replace(value, /:(plac\w+)/, ':' + MOZ + '$1')]
@@ -3055,7 +3026,7 @@ var createCache = function createCache(options) {
3055
3026
  }
3056
3027
  if (isBrowser$1) {
3057
3028
  var currentSheet;
3058
- var finalizingPlugins = [stringify, process.env.NODE_ENV !== 'production' ? function (element) {
3029
+ var finalizingPlugins = [stringify$1, process.env.NODE_ENV !== 'production' ? function (element) {
3059
3030
  if (!element.root) {
3060
3031
  if (element["return"]) {
3061
3032
  currentSheet.insert(element["return"]);
@@ -3070,7 +3041,7 @@ var createCache = function createCache(options) {
3070
3041
  })];
3071
3042
  var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));
3072
3043
  var stylis = function stylis(styles) {
3073
- return serialize(compile(styles), serializer);
3044
+ return serialize$1(compile(styles), serializer);
3074
3045
  };
3075
3046
  _insert = function insert(selector, serialized, sheet, shouldCache) {
3076
3047
  currentSheet = sheet;
@@ -3087,10 +3058,10 @@ var createCache = function createCache(options) {
3087
3058
  }
3088
3059
  };
3089
3060
  } else {
3090
- var _finalizingPlugins = [stringify];
3061
+ var _finalizingPlugins = [stringify$1];
3091
3062
  var _serializer = middleware(omnipresentPlugins.concat(stylisPlugins, _finalizingPlugins));
3092
3063
  var _stylis = function _stylis(styles) {
3093
- return serialize(compile(styles), _serializer);
3064
+ return serialize$1(compile(styles), _serializer);
3094
3065
  }; // $FlowFixMe
3095
3066
 
3096
3067
  var serverStylisCache = getServerStylisCache(stylisPlugins)(key);
@@ -4989,6 +4960,8 @@ var SuperJSON = /** @class */function () {
4989
4960
  SuperJSON.allowErrorProps = SuperJSON.defaultInstance.allowErrorProps.bind(SuperJSON.defaultInstance);
4990
4961
  return SuperJSON;
4991
4962
  }();
4963
+ var serialize = SuperJSON.serialize;
4964
+ var stringify = SuperJSON.stringify;
4992
4965
 
4993
4966
  function getQueryStatusLabel(query) {
4994
4967
  return query.state.fetchStatus === 'fetching' ? 'fetching' : !query.getObserversCount() ? 'inactive' : query.state.fetchStatus === 'paused' ? 'paused' : query.isStale() ? 'stale' : 'fresh';
@@ -5012,7 +4985,7 @@ function getQueryStatusColorByLabel(label) {
5012
4985
  const displayValue = (value, beautify = false) => {
5013
4986
  const {
5014
4987
  json
5015
- } = SuperJSON.serialize(value);
4988
+ } = serialize(value);
5016
4989
  return JSON.stringify(json, null, beautify ? 2 : undefined);
5017
4990
  };
5018
4991
 
@@ -5218,7 +5191,7 @@ const CopyButton = props => {
5218
5191
  return (() => {
5219
5192
  const _el$2 = _tmpl$2$1.cloneNode(true);
5220
5193
  addEventListener(_el$2, "click", copyState() === 'NoCopy' ? () => {
5221
- navigator.clipboard.writeText(SuperJSON.stringify(props.value)).then(() => {
5194
+ navigator.clipboard.writeText(stringify(props.value)).then(() => {
5222
5195
  setCopyState('SuccessCopy');
5223
5196
  setTimeout(() => {
5224
5197
  setCopyState('NoCopy');
@@ -7874,17 +7847,8 @@ const getStyles = () => {
7874
7847
  delegateEvents(["click", "mousedown", "input"]);
7875
7848
 
7876
7849
  class TanstackQueryDevtools {
7850
+ isMounted = false;
7877
7851
  constructor(config) {
7878
- _defineProperty(this, "client", void 0);
7879
- _defineProperty(this, "onlineManager", void 0);
7880
- _defineProperty(this, "queryFlavor", void 0);
7881
- _defineProperty(this, "version", void 0);
7882
- _defineProperty(this, "isMounted", false);
7883
- _defineProperty(this, "buttonPosition", void 0);
7884
- _defineProperty(this, "position", void 0);
7885
- _defineProperty(this, "initialIsOpen", void 0);
7886
- _defineProperty(this, "errorTypes", void 0);
7887
- _defineProperty(this, "dispose", void 0);
7888
7852
  const {
7889
7853
  client,
7890
7854
  queryFlavor,