@tanstack/query-devtools 5.14.5 → 5.14.7

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.
@@ -1,4 +1,4 @@
1
- import { createContext, delegateEvents, sortFns, mutationSortFns, createSignal, $PROXY, $TRACK, getListener, batch, getPreferredColorScheme, createMemo, createComponent, createEffect, onMount, onCleanup, use, insert, Show, createRenderEffect, className, on, setAttribute, getQueryStatusColor, getMutationStatusColor, getQueryStatusLabel, spread, mergeProps, getQueryStatusColorByLabel, displayValue, For, isServer, createUniqueId, useContext, Index, updateNestedDataByPath, template, convertRemToPixels, getSidedProp, untrack, useTransition, createRoot, splitProps, Portal, addEventListener, stringify, Switch, Match, deleteNestedDataByPath, Dynamic, children, createComputed, getOwner, DEV } from '../chunk/NCBN5K2V.js';
1
+ import { createContext, delegateEvents, sortFns, mutationSortFns, createSignal, $PROXY, $TRACK, getListener, batch, getPreferredColorScheme, createMemo, createComponent, createEffect, onMount, onCleanup, use, insert, Show, createRenderEffect, className, on, setAttribute, getQueryStatusColor, getMutationStatusColor, getQueryStatusLabel, spread, mergeProps, getQueryStatusColorByLabel, displayValue, For, isServer, createUniqueId, useContext, Index, updateNestedDataByPath, template, convertRemToPixels, getSidedProp, untrack, useTransition, createRoot, splitProps, Portal, addEventListener, stringify, Switch, Match, deleteNestedDataByPath, Dynamic, children, createComputed, getOwner, DEV } from '../chunk/3UQ4PA5F.js';
2
2
 
3
3
  // ../../node_modules/.pnpm/@tanstack+match-sorter-utils@8.8.4/node_modules/@tanstack/match-sorter-utils/build/lib/index.mjs
4
4
  var characterMap = {
@@ -834,37 +834,37 @@ function resolveElements(fn, predicate = defaultElementPredicate, serverPredicat
834
834
  return memo;
835
835
  }
836
836
 
837
- // ../../node_modules/.pnpm/solid-transition-group@0.2.2_solid-js@1.8.1/node_modules/solid-transition-group/dist/index.js
837
+ // ../../node_modules/.pnpm/solid-transition-group@0.2.3_solid-js@1.8.1/node_modules/solid-transition-group/dist/index.js
838
838
  function createClassnames(props) {
839
839
  return createMemo(() => {
840
840
  const name = props.name || "s";
841
841
  return {
842
- enterActiveClasses: (props.enterActiveClass || name + "-enter-active").split(" "),
843
- enterClasses: (props.enterClass || name + "-enter").split(" "),
844
- enterToClasses: (props.enterToClass || name + "-enter-to").split(" "),
845
- exitActiveClasses: (props.exitActiveClass || name + "-exit-active").split(" "),
846
- exitClasses: (props.exitClass || name + "-exit").split(" "),
847
- exitToClasses: (props.exitToClass || name + "-exit-to").split(" "),
848
- moveClasses: (props.moveClass || name + "-move").split(" ")
842
+ enterActive: (props.enterActiveClass || name + "-enter-active").split(" "),
843
+ enter: (props.enterClass || name + "-enter").split(" "),
844
+ enterTo: (props.enterToClass || name + "-enter-to").split(" "),
845
+ exitActive: (props.exitActiveClass || name + "-exit-active").split(" "),
846
+ exit: (props.exitClass || name + "-exit").split(" "),
847
+ exitTo: (props.exitToClass || name + "-exit-to").split(" "),
848
+ move: (props.moveClass || name + "-move").split(" ")
849
849
  };
850
850
  });
851
851
  }
852
852
  function nextFrame(fn) {
853
853
  requestAnimationFrame(() => requestAnimationFrame(fn));
854
854
  }
855
- function enterTransition(classnames, events, el, done) {
856
- const { enterClasses, enterActiveClasses, enterToClasses } = classnames, { onBeforeEnter, onEnter, onAfterEnter } = events;
855
+ function enterTransition(classes, events, el, done) {
856
+ const { onBeforeEnter, onEnter, onAfterEnter } = events;
857
857
  onBeforeEnter?.(el);
858
- el.classList.add(...enterClasses);
859
- el.classList.add(...enterActiveClasses);
858
+ el.classList.add(...classes.enter);
859
+ el.classList.add(...classes.enterActive);
860
860
  queueMicrotask(() => {
861
861
  if (!el.parentNode)
862
862
  return done?.();
863
863
  onEnter?.(el, () => endTransition());
864
864
  });
865
865
  nextFrame(() => {
866
- el.classList.remove(...enterClasses);
867
- el.classList.add(...enterToClasses);
866
+ el.classList.remove(...classes.enter);
867
+ el.classList.add(...classes.enterTo);
868
868
  if (!onEnter || onEnter.length < 2) {
869
869
  el.addEventListener("transitionend", endTransition);
870
870
  el.addEventListener("animationend", endTransition);
@@ -875,23 +875,23 @@ function enterTransition(classnames, events, el, done) {
875
875
  done?.();
876
876
  el.removeEventListener("transitionend", endTransition);
877
877
  el.removeEventListener("animationend", endTransition);
878
- el.classList.remove(...enterActiveClasses);
879
- el.classList.remove(...enterToClasses);
878
+ el.classList.remove(...classes.enterActive);
879
+ el.classList.remove(...classes.enterTo);
880
880
  onAfterEnter?.(el);
881
881
  }
882
882
  }
883
883
  }
884
- function exitTransition(classnames, events, el, done) {
885
- const { exitClasses, exitActiveClasses, exitToClasses } = classnames, { onBeforeExit, onExit, onAfterExit } = events;
884
+ function exitTransition(classes, events, el, done) {
885
+ const { onBeforeExit, onExit, onAfterExit } = events;
886
886
  if (!el.parentNode)
887
887
  return done?.();
888
888
  onBeforeExit?.(el);
889
- el.classList.add(...exitClasses);
890
- el.classList.add(...exitActiveClasses);
889
+ el.classList.add(...classes.exit);
890
+ el.classList.add(...classes.exitActive);
891
891
  onExit?.(el, () => endTransition());
892
892
  nextFrame(() => {
893
- el.classList.remove(...exitClasses);
894
- el.classList.add(...exitToClasses);
893
+ el.classList.remove(...classes.exit);
894
+ el.classList.add(...classes.exitTo);
895
895
  if (!onExit || onExit.length < 2) {
896
896
  el.addEventListener("transitionend", endTransition);
897
897
  el.addEventListener("animationend", endTransition);
@@ -902,8 +902,8 @@ function exitTransition(classnames, events, el, done) {
902
902
  done?.();
903
903
  el.removeEventListener("transitionend", endTransition);
904
904
  el.removeEventListener("animationend", endTransition);
905
- el.classList.remove(...exitActiveClasses);
906
- el.classList.remove(...exitToClasses);
905
+ el.classList.remove(...classes.exitActive);
906
+ el.classList.remove(...classes.exitTo);
907
907
  onAfterExit?.(el);
908
908
  }
909
909
  }
@@ -941,10 +941,10 @@ var TransitionGroup = (props) => {
941
941
  let endTransition2 = function(e2) {
942
942
  if (e2.target === el || /transform$/.test(e2.propertyName)) {
943
943
  el.removeEventListener("transitionend", endTransition2);
944
- el.classList.remove(...classes.moveClasses);
944
+ el.classList.remove(...classes.move);
945
945
  }
946
946
  };
947
- el.classList.add(...classes.moveClasses);
947
+ el.classList.add(...classes.move);
948
948
  el.style.transform = el.style.transitionDuration = "";
949
949
  el.addEventListener("transitionend", endTransition2);
950
950
  }
@@ -1293,7 +1293,7 @@ function createEventListener(targets, type, handler, options) {
1293
1293
  createRenderEffect(attachListeners);
1294
1294
  }
1295
1295
 
1296
- // ../../node_modules/.pnpm/@solid-primitives+resize-observer@2.0.18_solid-js@1.8.1/node_modules/@solid-primitives/resize-observer/dist/index.js
1296
+ // ../../node_modules/.pnpm/@solid-primitives+resize-observer@2.0.22_solid-js@1.8.1/node_modules/@solid-primitives/resize-observer/dist/index.js
1297
1297
  function makeResizeObserver(callback, options) {
1298
1298
  if (isServer) {
1299
1299
  return { observe: noop2, unobserve: noop2 };
@@ -3524,7 +3524,7 @@ var computePosition2 = (reference, floating, options) => {
3524
3524
  });
3525
3525
  };
3526
3526
 
3527
- // ../../node_modules/.pnpm/@kobalte+core@0.11.0_solid-js@1.8.1/node_modules/@kobalte/core/dist/esm/index.js
3527
+ // ../../node_modules/.pnpm/@kobalte+core@0.11.2_solid-js@1.8.1/node_modules/@kobalte/core/dist/esm/index.js
3528
3528
  createContext();
3529
3529
  function buildNodes(params) {
3530
3530
  let index = params.startIndex ?? 0;
@@ -6127,7 +6127,7 @@ function usePopperContext() {
6127
6127
  }
6128
6128
  return context;
6129
6129
  }
6130
- var _tmpl$$e = /* @__PURE__ */ template(`<svg display="block" viewBox="0 0 30 30"><g><path fill="none" d="M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z"></path><path stroke="none" d="M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z">`);
6130
+ var _tmpl$$f = /* @__PURE__ */ template(`<svg display="block" viewBox="0 0 30 30"><g><path fill="none" d="M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z"></path><path stroke="none" d="M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z">`);
6131
6131
  var DEFAULT_SIZE = 30;
6132
6132
  var HALF_DEFAULT_SIZE = DEFAULT_SIZE / 2;
6133
6133
  var ROTATION_DEG = {
@@ -6176,7 +6176,7 @@ function PopperArrow(props) {
6176
6176
  }
6177
6177
  }, others, {
6178
6178
  get children() {
6179
- const _el$ = _tmpl$$e(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
6179
+ const _el$ = _tmpl$$f(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
6180
6180
  _el$3.nextSibling;
6181
6181
  createRenderEffect(() => setAttribute(_el$2, "transform", rotate()));
6182
6182
  return _el$;
@@ -7960,7 +7960,7 @@ function DropdownMenuRoot(props) {
7960
7960
  }, props);
7961
7961
  return createComponent(MenuRoot, props);
7962
7962
  }
7963
- var index$d = /* @__PURE__ */ Object.freeze({
7963
+ var index$f = /* @__PURE__ */ Object.freeze({
7964
7964
  __proto__: null,
7965
7965
  Arrow: PopperArrow,
7966
7966
  CheckboxItem: MenuCheckboxItem,
@@ -8117,7 +8117,7 @@ function RadioGroupItemIndicator(props) {
8117
8117
  }
8118
8118
  });
8119
8119
  }
8120
- var _tmpl$$6 = /* @__PURE__ */ template(`<input type="radio">`);
8120
+ var _tmpl$$7 = /* @__PURE__ */ template(`<input type="radio">`);
8121
8121
  function RadioGroupItemInput(props) {
8122
8122
  const formControlContext = useFormControlContext();
8123
8123
  const radioGroupContext = useRadioGroupContext();
@@ -8154,7 +8154,7 @@ function RadioGroupItemInput(props) {
8154
8154
  };
8155
8155
  createEffect(() => onCleanup(radioContext.registerInput(others.id)));
8156
8156
  return (() => {
8157
- const _el$ = _tmpl$$6();
8157
+ const _el$ = _tmpl$$7();
8158
8158
  _el$.addEventListener("blur", onBlur);
8159
8159
  _el$.addEventListener("focus", onFocus);
8160
8160
  _el$.addEventListener("change", onChange);
@@ -8195,7 +8195,7 @@ function RadioGroupItemInput(props) {
8195
8195
  return _el$;
8196
8196
  })();
8197
8197
  }
8198
- var _tmpl$$5 = /* @__PURE__ */ template(`<label>`);
8198
+ var _tmpl$$6 = /* @__PURE__ */ template(`<label>`);
8199
8199
  function RadioGroupItemLabel(props) {
8200
8200
  const context = useRadioGroupItemContext();
8201
8201
  props = mergeDefaultProps({
@@ -8203,7 +8203,7 @@ function RadioGroupItemLabel(props) {
8203
8203
  }, props);
8204
8204
  createEffect(() => onCleanup(context.registerLabel(props.id)));
8205
8205
  return (() => {
8206
- const _el$ = _tmpl$$5();
8206
+ const _el$ = _tmpl$$6();
8207
8207
  spread(_el$, mergeProps({
8208
8208
  get ["for"]() {
8209
8209
  return context.inputId();
@@ -8300,7 +8300,7 @@ function RadioGroupRoot(props) {
8300
8300
  }
8301
8301
  });
8302
8302
  }
8303
- var index$7 = /* @__PURE__ */ Object.freeze({
8303
+ var index$9 = /* @__PURE__ */ Object.freeze({
8304
8304
  __proto__: null,
8305
8305
  Description: FormControlDescription,
8306
8306
  ErrorMessage: FormControlErrorMessage,
@@ -8319,6 +8319,8 @@ createContext();
8319
8319
  createContext();
8320
8320
  createContext();
8321
8321
  createContext();
8322
+ createContext();
8323
+ createContext();
8322
8324
  delegateEvents(["focusin", "focusout", "pointermove"]);
8323
8325
  delegateEvents(["keydown", "pointerdown", "pointermove", "pointerup"]);
8324
8326
  createContext();
@@ -9874,7 +9876,7 @@ var ContentView = (props) => {
9874
9876
  _el$11.$$click = () => props.setLocalStore("open", "false");
9875
9877
  insert(_el$13, () => useQueryDevtoolsContext().queryFlavor, _el$14);
9876
9878
  insert(_el$13, () => useQueryDevtoolsContext().version, null);
9877
- insert(_el$10, createComponent(index$7.Root, {
9879
+ insert(_el$10, createComponent(index$9.Root, {
9878
9880
  get ["class"]() {
9879
9881
  return clsx(styles().viewToggle);
9880
9882
  },
@@ -9887,28 +9889,28 @@ var ContentView = (props) => {
9887
9889
  setSelectedMutationId(null);
9888
9890
  },
9889
9891
  get children() {
9890
- return [createComponent(index$7.Item, {
9892
+ return [createComponent(index$9.Item, {
9891
9893
  value: "queries",
9892
9894
  "class": "tsqd-radio-toggle",
9893
9895
  get children() {
9894
- return [createComponent(index$7.ItemInput, {}), createComponent(index$7.ItemControl, {
9896
+ return [createComponent(index$9.ItemInput, {}), createComponent(index$9.ItemControl, {
9895
9897
  get children() {
9896
- return createComponent(index$7.ItemIndicator, {});
9898
+ return createComponent(index$9.ItemIndicator, {});
9897
9899
  }
9898
- }), createComponent(index$7.ItemLabel, {
9900
+ }), createComponent(index$9.ItemLabel, {
9899
9901
  title: "Toggle Queries View",
9900
9902
  children: "Queries"
9901
9903
  })];
9902
9904
  }
9903
- }), createComponent(index$7.Item, {
9905
+ }), createComponent(index$9.Item, {
9904
9906
  value: "mutations",
9905
9907
  "class": "tsqd-radio-toggle",
9906
9908
  get children() {
9907
- return [createComponent(index$7.ItemInput, {}), createComponent(index$7.ItemControl, {
9909
+ return [createComponent(index$9.ItemInput, {}), createComponent(index$9.ItemControl, {
9908
9910
  get children() {
9909
- return createComponent(index$7.ItemIndicator, {});
9911
+ return createComponent(index$9.ItemIndicator, {});
9910
9912
  }
9911
- }), createComponent(index$7.ItemLabel, {
9913
+ }), createComponent(index$9.ItemLabel, {
9912
9914
  title: "Toggle Mutations View",
9913
9915
  children: "Mutations"
9914
9916
  })];
@@ -10023,20 +10025,20 @@ var ContentView = (props) => {
10023
10025
  const _c$ = createMemo(() => !!offline());
10024
10026
  return () => _c$() ? createComponent(Offline, {}) : createComponent(Wifi, {});
10025
10027
  })());
10026
- insert(_el$25, createComponent(index$d.Root, {
10028
+ insert(_el$25, createComponent(index$f.Root, {
10027
10029
  gutter: 4,
10028
10030
  get children() {
10029
- return [createComponent(index$d.Trigger, {
10031
+ return [createComponent(index$f.Trigger, {
10030
10032
  get ["class"]() {
10031
10033
  return clsx(styles().actionsBtn, "tsqd-actions-btn", "tsqd-action-settings");
10032
10034
  },
10033
10035
  get children() {
10034
10036
  return createComponent(Settings, {});
10035
10037
  }
10036
- }), createComponent(index$d.Portal, {
10038
+ }), createComponent(index$f.Portal, {
10037
10039
  ref: (el) => setComputedVariables(el),
10038
10040
  get children() {
10039
- return createComponent(index$d.Content, {
10041
+ return createComponent(index$f.Content, {
10040
10042
  get ["class"]() {
10041
10043
  return clsx(styles().settingsMenu, "tsqd-settings-menu");
10042
10044
  },
@@ -10045,27 +10047,27 @@ var ContentView = (props) => {
10045
10047
  const _el$28 = _tmpl$73();
10046
10048
  createRenderEffect(() => className(_el$28, clsx(styles().settingsMenuHeader, "tsqd-settings-menu-header")));
10047
10049
  return _el$28;
10048
- })(), createComponent(index$d.Sub, {
10050
+ })(), createComponent(index$f.Sub, {
10049
10051
  overlap: true,
10050
10052
  gutter: 8,
10051
10053
  shift: -4,
10052
10054
  get children() {
10053
- return [createComponent(index$d.SubTrigger, {
10055
+ return [createComponent(index$f.SubTrigger, {
10054
10056
  get ["class"]() {
10055
10057
  return clsx(styles().settingsSubTrigger, "tsqd-settings-menu-sub-trigger", "tsqd-settings-menu-sub-trigger-position");
10056
10058
  },
10057
10059
  get children() {
10058
10060
  return [_tmpl$83(), createComponent(ChevronDown, {})];
10059
10061
  }
10060
- }), createComponent(index$d.Portal, {
10062
+ }), createComponent(index$f.Portal, {
10061
10063
  ref: (el) => setComputedVariables(el),
10062
10064
  get children() {
10063
- return createComponent(index$d.SubContent, {
10065
+ return createComponent(index$f.SubContent, {
10064
10066
  get ["class"]() {
10065
10067
  return clsx(styles().settingsMenu, "tsqd-settings-submenu");
10066
10068
  },
10067
10069
  get children() {
10068
- return [createComponent(index$d.Item, {
10070
+ return [createComponent(index$f.Item, {
10069
10071
  onSelect: () => {
10070
10072
  setDevtoolsPosition("top");
10071
10073
  },
@@ -10076,7 +10078,7 @@ var ContentView = (props) => {
10076
10078
  get children() {
10077
10079
  return [_tmpl$93(), createComponent(ArrowUp, {})];
10078
10080
  }
10079
- }), createComponent(index$d.Item, {
10081
+ }), createComponent(index$f.Item, {
10080
10082
  onSelect: () => {
10081
10083
  setDevtoolsPosition("bottom");
10082
10084
  },
@@ -10087,7 +10089,7 @@ var ContentView = (props) => {
10087
10089
  get children() {
10088
10090
  return [_tmpl$103(), createComponent(ArrowDown, {})];
10089
10091
  }
10090
- }), createComponent(index$d.Item, {
10092
+ }), createComponent(index$f.Item, {
10091
10093
  onSelect: () => {
10092
10094
  setDevtoolsPosition("left");
10093
10095
  },
@@ -10098,7 +10100,7 @@ var ContentView = (props) => {
10098
10100
  get children() {
10099
10101
  return [_tmpl$113(), createComponent(ArrowLeft, {})];
10100
10102
  }
10101
- }), createComponent(index$d.Item, {
10103
+ }), createComponent(index$f.Item, {
10102
10104
  onSelect: () => {
10103
10105
  setDevtoolsPosition("right");
10104
10106
  },
@@ -10115,27 +10117,27 @@ var ContentView = (props) => {
10115
10117
  }
10116
10118
  })];
10117
10119
  }
10118
- }), createComponent(index$d.Sub, {
10120
+ }), createComponent(index$f.Sub, {
10119
10121
  overlap: true,
10120
10122
  gutter: 8,
10121
10123
  shift: -4,
10122
10124
  get children() {
10123
- return [createComponent(index$d.SubTrigger, {
10125
+ return [createComponent(index$f.SubTrigger, {
10124
10126
  get ["class"]() {
10125
10127
  return clsx(styles().settingsSubTrigger, "tsqd-settings-menu-sub-trigger", "tsqd-settings-menu-sub-trigger-position");
10126
10128
  },
10127
10129
  get children() {
10128
10130
  return [_tmpl$132(), createComponent(ChevronDown, {})];
10129
10131
  }
10130
- }), createComponent(index$d.Portal, {
10132
+ }), createComponent(index$f.Portal, {
10131
10133
  ref: (el) => setComputedVariables(el),
10132
10134
  get children() {
10133
- return createComponent(index$d.SubContent, {
10135
+ return createComponent(index$f.SubContent, {
10134
10136
  get ["class"]() {
10135
10137
  return clsx(styles().settingsMenu, "tsqd-settings-submenu");
10136
10138
  },
10137
10139
  get children() {
10138
- return [createComponent(index$d.Item, {
10140
+ return [createComponent(index$f.Item, {
10139
10141
  onSelect: () => {
10140
10142
  props.setLocalStore("theme_preference", "light");
10141
10143
  },
@@ -10146,7 +10148,7 @@ var ContentView = (props) => {
10146
10148
  get children() {
10147
10149
  return [_tmpl$142(), createComponent(Sun, {})];
10148
10150
  }
10149
- }), createComponent(index$d.Item, {
10151
+ }), createComponent(index$f.Item, {
10150
10152
  onSelect: () => {
10151
10153
  props.setLocalStore("theme_preference", "dark");
10152
10154
  },
@@ -10157,7 +10159,7 @@ var ContentView = (props) => {
10157
10159
  get children() {
10158
10160
  return [_tmpl$152(), createComponent(Moon, {})];
10159
10161
  }
10160
- }), createComponent(index$d.Item, {
10162
+ }), createComponent(index$f.Item, {
10161
10163
  onSelect: () => {
10162
10164
  props.setLocalStore("theme_preference", "system");
10163
10165
  },
@@ -12632,6 +12634,15 @@ delegateEvents(["click", "mousedown", "input"]);
12632
12634
  * https://github.com/ariakit/ariakit/blob/f2a96973de523d67e41eec983263936c489ef3e2/packages/ariakit/src/hovercard/__utils/debug-polygon.ts
12633
12635
  *)
12634
12636
 
12637
+ @kobalte/core/dist/esm/index.js:
12638
+ (*!
12639
+ * Portions of this file are based on code from react-spectrum.
12640
+ * Apache License Version 2.0, Copyright 2020 Adobe.
12641
+ *
12642
+ * Credits to the React Spectrum team:
12643
+ * https://github.com/adobe/react-spectrum/blob/1ddcde7b4fef9af7f08e11bb78d71fe60bbcc64b/packages/@react-stately/slider/src/useSliderState.ts
12644
+ *)
12645
+
12635
12646
  @kobalte/core/dist/esm/index.js:
12636
12647
  (*!
12637
12648
  * Portions of this file are based on code from react-spectrum.
@@ -2030,7 +2030,7 @@ function Dynamic(props) {
2030
2030
  });
2031
2031
  }
2032
2032
 
2033
- // ../../node_modules/.pnpm/superjson@1.12.4/node_modules/superjson/dist/esm/double-indexed-kv.js
2033
+ // ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/double-indexed-kv.js
2034
2034
  var DoubleIndexedKV = (
2035
2035
  /** @class */
2036
2036
  function() {
@@ -2056,7 +2056,7 @@ var DoubleIndexedKV = (
2056
2056
  }()
2057
2057
  );
2058
2058
 
2059
- // ../../node_modules/.pnpm/superjson@1.12.4/node_modules/superjson/dist/esm/registry.js
2059
+ // ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/registry.js
2060
2060
  var Registry = (
2061
2061
  /** @class */
2062
2062
  function() {
@@ -2086,7 +2086,7 @@ var Registry = (
2086
2086
  }()
2087
2087
  );
2088
2088
 
2089
- // ../../node_modules/.pnpm/superjson@1.12.4/node_modules/superjson/dist/esm/class-registry.js
2089
+ // ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/class-registry.js
2090
2090
  var __extends = function() {
2091
2091
  var extendStatics = function(d, b) {
2092
2092
  extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
@@ -2136,7 +2136,7 @@ var ClassRegistry = (
2136
2136
  }(Registry)
2137
2137
  );
2138
2138
 
2139
- // ../../node_modules/.pnpm/superjson@1.12.4/node_modules/superjson/dist/esm/util.js
2139
+ // ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/util.js
2140
2140
  var __read = function(o, n) {
2141
2141
  var m = typeof Symbol === "function" && o[Symbol.iterator];
2142
2142
  if (!m)
@@ -2203,7 +2203,7 @@ function findArr(record, predicate) {
2203
2203
  return void 0;
2204
2204
  }
2205
2205
 
2206
- // ../../node_modules/.pnpm/superjson@1.12.4/node_modules/superjson/dist/esm/custom-transformer-registry.js
2206
+ // ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/custom-transformer-registry.js
2207
2207
  var CustomTransformerRegistry = (
2208
2208
  /** @class */
2209
2209
  function() {
@@ -2225,7 +2225,7 @@ var CustomTransformerRegistry = (
2225
2225
  }()
2226
2226
  );
2227
2227
 
2228
- // ../../node_modules/.pnpm/superjson@1.12.4/node_modules/superjson/dist/esm/is.js
2228
+ // ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/is.js
2229
2229
  var getType = function(payload) {
2230
2230
  return Object.prototype.toString.call(payload).slice(8, -1);
2231
2231
  };
@@ -2296,7 +2296,7 @@ var isURL = function(payload) {
2296
2296
  return payload instanceof URL;
2297
2297
  };
2298
2298
 
2299
- // ../../node_modules/.pnpm/superjson@1.12.4/node_modules/superjson/dist/esm/pathstringifier.js
2299
+ // ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/pathstringifier.js
2300
2300
  var escapeKey = function(key) {
2301
2301
  return key.replace(/\./g, "\\.");
2302
2302
  };
@@ -2327,7 +2327,7 @@ var parsePath = function(string) {
2327
2327
  return result;
2328
2328
  };
2329
2329
 
2330
- // ../../node_modules/.pnpm/superjson@1.12.4/node_modules/superjson/dist/esm/transformer.js
2330
+ // ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/transformer.js
2331
2331
  var __assign = function() {
2332
2332
  __assign = Object.assign || function(t) {
2333
2333
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -2601,7 +2601,7 @@ var untransformValue = function(json, type, superJson) {
2601
2601
  }
2602
2602
  };
2603
2603
 
2604
- // ../../node_modules/.pnpm/superjson@1.12.4/node_modules/superjson/dist/esm/accessDeep.js
2604
+ // ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/accessDeep.js
2605
2605
  var getNthKey = function(value, n) {
2606
2606
  var keys = value.keys();
2607
2607
  while (n > 0) {
@@ -2715,7 +2715,7 @@ var setDeep = function(object, path, mapper) {
2715
2715
  return object;
2716
2716
  };
2717
2717
 
2718
- // ../../node_modules/.pnpm/superjson@1.12.4/node_modules/superjson/dist/esm/plainer.js
2718
+ // ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/plainer.js
2719
2719
  var __read3 = function(o, n) {
2720
2720
  var m = typeof Symbol === "function" && o[Symbol.iterator];
2721
2721
  if (!m)
@@ -2806,22 +2806,25 @@ function addIdentity(object, path, identities) {
2806
2806
  identities.set(object, [path]);
2807
2807
  }
2808
2808
  }
2809
- function generateReferentialEqualityAnnotations(identitites) {
2809
+ function generateReferentialEqualityAnnotations(identitites, dedupe) {
2810
2810
  var result = {};
2811
2811
  var rootEqualityPaths = void 0;
2812
2812
  identitites.forEach(function(paths) {
2813
2813
  if (paths.length <= 1) {
2814
2814
  return;
2815
2815
  }
2816
- var _a = __read3(paths.map(function(path) {
2817
- return path.map(String);
2818
- }).sort(function(a, b) {
2819
- return a.length - b.length;
2820
- })), shortestPath = _a[0], identicalPaths = _a.slice(1);
2821
- if (shortestPath.length === 0) {
2816
+ if (!dedupe) {
2817
+ paths = paths.map(function(path) {
2818
+ return path.map(String);
2819
+ }).sort(function(a, b) {
2820
+ return a.length - b.length;
2821
+ });
2822
+ }
2823
+ var _a = __read3(paths), representativePath = _a[0], identicalPaths = _a.slice(1);
2824
+ if (representativePath.length === 0) {
2822
2825
  rootEqualityPaths = identicalPaths.map(stringifyPath);
2823
2826
  } else {
2824
- result[stringifyPath(shortestPath)] = identicalPaths.map(stringifyPath);
2827
+ result[stringifyPath(representativePath)] = identicalPaths.map(stringifyPath);
2825
2828
  }
2826
2829
  });
2827
2830
  if (rootEqualityPaths) {
@@ -2834,7 +2837,7 @@ function generateReferentialEqualityAnnotations(identitites) {
2834
2837
  return isEmptyObject(result) ? void 0 : result;
2835
2838
  }
2836
2839
  }
2837
- var walker = function(object, identities, superJson, path, objectsInThisPath) {
2840
+ var walker = function(object, identities, superJson, dedupe, path, objectsInThisPath, seenObjects) {
2838
2841
  var _a;
2839
2842
  if (path === void 0) {
2840
2843
  path = [];
@@ -2842,21 +2845,31 @@ var walker = function(object, identities, superJson, path, objectsInThisPath) {
2842
2845
  if (objectsInThisPath === void 0) {
2843
2846
  objectsInThisPath = [];
2844
2847
  }
2845
- if (!isPrimitive(object)) {
2848
+ if (seenObjects === void 0) {
2849
+ seenObjects = /* @__PURE__ */ new Map();
2850
+ }
2851
+ var primitive = isPrimitive(object);
2852
+ if (!primitive) {
2846
2853
  addIdentity(object, path, identities);
2854
+ var seen = seenObjects.get(object);
2855
+ if (seen) {
2856
+ return dedupe ? {
2857
+ transformedValue: null
2858
+ } : seen;
2859
+ }
2847
2860
  }
2848
2861
  if (!isDeep(object, superJson)) {
2849
2862
  var transformed_1 = transformValue(object, superJson);
2850
- if (transformed_1) {
2851
- return {
2852
- transformedValue: transformed_1.value,
2853
- annotations: [transformed_1.type]
2854
- };
2855
- } else {
2856
- return {
2857
- transformedValue: object
2858
- };
2863
+ var result_1 = transformed_1 ? {
2864
+ transformedValue: transformed_1.value,
2865
+ annotations: [transformed_1.type]
2866
+ } : {
2867
+ transformedValue: object
2868
+ };
2869
+ if (!primitive) {
2870
+ seenObjects.set(object, result_1);
2859
2871
  }
2872
+ return result_1;
2860
2873
  }
2861
2874
  if (includes(objectsInThisPath, object)) {
2862
2875
  return {
@@ -2865,13 +2878,10 @@ var walker = function(object, identities, superJson, path, objectsInThisPath) {
2865
2878
  }
2866
2879
  var transformationResult = transformValue(object, superJson);
2867
2880
  var transformed = (_a = transformationResult === null || transformationResult === void 0 ? void 0 : transformationResult.value) !== null && _a !== void 0 ? _a : object;
2868
- if (!isPrimitive(object)) {
2869
- objectsInThisPath = __spreadArray2(__spreadArray2([], __read3(objectsInThisPath)), [object]);
2870
- }
2871
2881
  var transformedValue = isArray(transformed) ? [] : {};
2872
2882
  var innerAnnotations = {};
2873
2883
  forEach(transformed, function(value, index) {
2874
- var recursiveResult = walker(value, identities, superJson, __spreadArray2(__spreadArray2([], __read3(path)), [index]), objectsInThisPath);
2884
+ var recursiveResult = walker(value, identities, superJson, dedupe, __spreadArray2(__spreadArray2([], __read3(path)), [index]), __spreadArray2(__spreadArray2([], __read3(objectsInThisPath)), [object]), seenObjects);
2875
2885
  transformedValue[index] = recursiveResult.transformedValue;
2876
2886
  if (isArray(recursiveResult.annotations)) {
2877
2887
  innerAnnotations[index] = recursiveResult.annotations;
@@ -2881,17 +2891,17 @@ var walker = function(object, identities, superJson, path, objectsInThisPath) {
2881
2891
  });
2882
2892
  }
2883
2893
  });
2884
- if (isEmptyObject(innerAnnotations)) {
2885
- return {
2886
- transformedValue,
2887
- annotations: !!transformationResult ? [transformationResult.type] : void 0
2888
- };
2889
- } else {
2890
- return {
2891
- transformedValue,
2892
- annotations: !!transformationResult ? [transformationResult.type, innerAnnotations] : innerAnnotations
2893
- };
2894
+ var result = isEmptyObject(innerAnnotations) ? {
2895
+ transformedValue,
2896
+ annotations: !!transformationResult ? [transformationResult.type] : void 0
2897
+ } : {
2898
+ transformedValue,
2899
+ annotations: !!transformationResult ? [transformationResult.type, innerAnnotations] : innerAnnotations
2900
+ };
2901
+ if (!primitive) {
2902
+ seenObjects.set(object, result);
2894
2903
  }
2904
+ return result;
2895
2905
  };
2896
2906
 
2897
2907
  // ../../node_modules/.pnpm/is-what@4.1.15/node_modules/is-what/dist/index.js
@@ -2942,7 +2952,7 @@ function copy(target, options = {}) {
2942
2952
  }, {});
2943
2953
  }
2944
2954
 
2945
- // ../../node_modules/.pnpm/superjson@1.12.4/node_modules/superjson/dist/esm/index.js
2955
+ // ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/index.js
2946
2956
  var __assign2 = function() {
2947
2957
  __assign2 = Object.assign || function(t) {
2948
2958
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -2984,25 +2994,27 @@ var __spreadArray3 = function(to, from) {
2984
2994
  var SuperJSON = (
2985
2995
  /** @class */
2986
2996
  function() {
2987
- function SuperJSON2() {
2997
+ function SuperJSON2(_a) {
2998
+ var _b = _a === void 0 ? {} : _a, _c = _b.dedupe, dedupe = _c === void 0 ? false : _c;
2988
2999
  this.classRegistry = new ClassRegistry();
2989
3000
  this.symbolRegistry = new Registry(function(s) {
2990
- var _a;
2991
- return (_a = s.description) !== null && _a !== void 0 ? _a : "";
3001
+ var _a2;
3002
+ return (_a2 = s.description) !== null && _a2 !== void 0 ? _a2 : "";
2992
3003
  });
2993
3004
  this.customTransformerRegistry = new CustomTransformerRegistry();
2994
3005
  this.allowedErrorProps = [];
3006
+ this.dedupe = dedupe;
2995
3007
  }
2996
3008
  SuperJSON2.prototype.serialize = function(object) {
2997
3009
  var identities = /* @__PURE__ */ new Map();
2998
- var output = walker(object, identities, this);
3010
+ var output = walker(object, identities, this, this.dedupe);
2999
3011
  var res = {
3000
3012
  json: output.transformedValue
3001
3013
  };
3002
3014
  if (output.annotations) {
3003
3015
  res.meta = __assign2(__assign2({}, res.meta), { values: output.annotations });
3004
3016
  }
3005
- var equalityAnnotations = generateReferentialEqualityAnnotations(identities);
3017
+ var equalityAnnotations = generateReferentialEqualityAnnotations(identities, this.dedupe);
3006
3018
  if (equalityAnnotations) {
3007
3019
  res.meta = __assign2(__assign2({}, res.meta), { referentialEqualities: equalityAnnotations });
3008
3020
  }