@ksp-gonogo/ui-kit 1.0.0-rc.40 → 1.0.0-rc.44

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.
@@ -7403,15 +7403,30 @@ function useScrollerMetric(el, compute, isEqual, initial) {
7403
7403
  const ro = new ResizeObserver(update);
7404
7404
  ro.observe(el);
7405
7405
  for (const child of Array.from(el.children)) ro.observe(child);
7406
- const mo = new MutationObserver(() => {
7407
- for (const child of Array.from(el.children)) ro.observe(child);
7408
- update();
7406
+ let frame;
7407
+ const mo = new MutationObserver((records) => {
7408
+ if (records.some((r) => r.type === "childList")) {
7409
+ for (const child of Array.from(el.children)) ro.observe(child);
7410
+ update();
7411
+ return;
7412
+ }
7413
+ if (frame === void 0)
7414
+ frame = requestAnimationFrame(() => {
7415
+ frame = void 0;
7416
+ update();
7417
+ });
7418
+ });
7419
+ mo.observe(el, {
7420
+ childList: true,
7421
+ subtree: true,
7422
+ attributes: true,
7423
+ attributeFilter: ["style"]
7409
7424
  });
7410
- mo.observe(el, { childList: true, subtree: true });
7411
7425
  return () => {
7412
7426
  el.removeEventListener("scroll", update);
7413
7427
  ro.disconnect();
7414
7428
  mo.disconnect();
7429
+ if (frame !== void 0) cancelAnimationFrame(frame);
7415
7430
  };
7416
7431
  }, [el]);
7417
7432
  return value3;
@@ -9547,4 +9562,4 @@ lucide-react/dist/esm/lucide-react.mjs:
9547
9562
  * See the LICENSE file in the root directory of this source tree.
9548
9563
  *)
9549
9564
  */
9550
- //# sourceMappingURL=chunk-HTFRRLIQ.js.map
9565
+ //# sourceMappingURL=chunk-Z2JTH2MG.js.map