sanity 3.94.3-next.5.c0b5a0c3a2 → 3.94.3-next.7.5c48abba76

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
1
  "use strict";
2
- const SANITY_VERSION = "3.94.3-next.5.c0b5a0c3a2";
2
+ const SANITY_VERSION = "3.94.3-next.7.5c48abba76";
3
3
  exports.SANITY_VERSION = SANITY_VERSION;
4
4
  //# sourceMappingURL=version.js.map
@@ -5763,20 +5763,34 @@ function useChipScrollPosition(containerRef) {
5763
5763
  const container_0 = containerRef.current;
5764
5764
  if (!container_0)
5765
5765
  return {
5766
- observer: null
5766
+ intersectionObserver: null,
5767
+ mutationObserver: null
5767
5768
  };
5768
- const observer = new IntersectionObserver((entries) => {
5769
+ const intersectionObserver = new IntersectionObserver((entries) => {
5769
5770
  const entry = entries[0];
5770
- entry && setShowGradient(entry.isIntersecting);
5771
- }), lastChip = container_0.children[container_0.children.length - 1];
5772
- return observer.observe(lastChip), {
5773
- observer
5771
+ entry && setShowGradient(!entry.isIntersecting);
5772
+ }), updateLastChipObserver = () => {
5773
+ intersectionObserver.disconnect();
5774
+ const lastChip = container_0.children[container_0.children.length - 1];
5775
+ intersectionObserver.observe(lastChip);
5776
+ };
5777
+ updateLastChipObserver();
5778
+ const mutationObserver = new MutationObserver(() => {
5779
+ updateLastChipObserver(), checkOverflow();
5780
+ });
5781
+ return mutationObserver.observe(container_0, {
5782
+ childList: !0,
5783
+ subtree: !1
5784
+ }), {
5785
+ intersectionObserver,
5786
+ mutationObserver
5774
5787
  };
5775
5788
  }, {
5776
- observer: observer_0
5789
+ intersectionObserver: intersectionObserver_0,
5790
+ mutationObserver: mutationObserver_0
5777
5791
  } = setupObservers();
5778
5792
  return () => {
5779
- observer_0?.disconnect();
5793
+ intersectionObserver_0?.disconnect(), mutationObserver_0?.disconnect();
5780
5794
  };
5781
5795
  }, $[0] = containerRef.current, $[1] = t0) : t0 = $[1];
5782
5796
  let t1;