@sanity/ui 3.0.14 → 3.1.0

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.
@@ -2200,18 +2200,18 @@ function useElementSize(element) {
2200
2200
  return _elementSizeObserver.subscribe(element, setSize);
2201
2201
  }, t1 = [element], $[0] = element, $[1] = t0, $[2] = t1) : (t0 = $[1], t1 = $[2]), useEffect(t0, t1), size2;
2202
2202
  }
2203
- function useGlobalKeyDown(onKeyDown) {
2204
- const $ = c(5);
2203
+ function useGlobalKeyDown(onKeyDown, options) {
2204
+ const $ = c(7);
2205
2205
  let t0;
2206
2206
  $[0] !== onKeyDown ? (t0 = (event) => onKeyDown(event), $[0] = onKeyDown, $[1] = t0) : t0 = $[1];
2207
2207
  const handleKeyDown = useEffectEvent(t0);
2208
2208
  let t1;
2209
- $[2] !== handleKeyDown ? (t1 = () => {
2209
+ $[2] !== handleKeyDown || $[3] !== options ? (t1 = () => {
2210
2210
  const handler = (event_0) => handleKeyDown(event_0);
2211
- return window.addEventListener("keydown", handler), () => window.removeEventListener("keydown", handler);
2212
- }, $[2] = handleKeyDown, $[3] = t1) : t1 = $[3];
2211
+ return window.addEventListener("keydown", handler, options), () => window.removeEventListener("keydown", handler, options);
2212
+ }, $[2] = handleKeyDown, $[3] = options, $[4] = t1) : t1 = $[4];
2213
2213
  let t2;
2214
- $[4] === Symbol.for("react.memo_cache_sentinel") ? (t2 = [], $[4] = t2) : t2 = $[4], useEffect(t1, t2);
2214
+ $[5] !== options ? (t2 = [options], $[5] = options, $[6] = t2) : t2 = $[6], useEffect(t1, t2);
2215
2215
  }
2216
2216
  function useMatchMedia(mediaQueryString, getServerSnapshot2) {
2217
2217
  const $ = c(4);