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