@tangle-network/agent-app 4.0.39 → 4.0.40

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,7 +1,8 @@
1
1
  import {
2
2
  HubPreviewFeedback,
3
- ReviewFeedbackForm
4
- } from "../chunk-23FH5TF5.js";
3
+ ReviewFeedbackForm,
4
+ useMediaQuery
5
+ } from "../chunk-M2NKUZYV.js";
5
6
  import {
6
7
  HUB_APPROVAL_ACTIVE_PHASES,
7
8
  HUB_APPROVAL_OPEN_PHASES,
@@ -251,17 +252,6 @@ function previewMediaSource(value, kind) {
251
252
  return void 0;
252
253
  }
253
254
  }
254
- function useReducedMotion() {
255
- const [reduced, setReduced] = useState3(true);
256
- useEffect2(() => {
257
- const preference = window.matchMedia("(prefers-reduced-motion: reduce)");
258
- const update = () => setReduced(preference.matches);
259
- update();
260
- preference.addEventListener("change", update);
261
- return () => preference.removeEventListener("change", update);
262
- }, []);
263
- return reduced;
264
- }
265
255
  function MediaAsset({ media, active = true, fit = "cover" }) {
266
256
  const source = previewMediaSource(media.src, media.kind);
267
257
  const video = useRef(null);
@@ -327,7 +317,7 @@ function Carousel({ media, square = false }) {
327
317
  const id = useId();
328
318
  const viewport = useRef(null);
329
319
  const [index, setIndex] = useState3(0);
330
- const reduced = useReducedMotion();
320
+ const reduced = useMediaQuery("(prefers-reduced-motion: reduce)");
331
321
  const go = (next) => {
332
322
  const element = viewport.current;
333
323
  if (element) element.scrollTo({ left: element.clientWidth * next, behavior: reduced ? "auto" : "smooth" });