@biela.dev/core 1.7.8 → 1.7.9

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.
package/dist/index.cjs CHANGED
@@ -636,6 +636,20 @@ function DeviceFrame({
636
636
  react.useEffect(() => {
637
637
  onScaleChangeRef.current?.(activeScale);
638
638
  }, [activeScale]);
639
+ react.useEffect(() => {
640
+ const el = frameOverlayRef.current;
641
+ if (!el) return;
642
+ const svgs = el.querySelectorAll("svg");
643
+ svgs.forEach((svg) => {
644
+ if (!svg.getAttribute("viewBox")) {
645
+ const w = svg.getAttribute("width");
646
+ const h = svg.getAttribute("height");
647
+ if (w && h) svg.setAttribute("viewBox", `0 0 ${w} ${h}`);
648
+ }
649
+ svg.setAttribute("width", "100%");
650
+ svg.setAttribute("height", "100%");
651
+ });
652
+ });
639
653
  const DeviceSVGComponent = svgEntry?.component;
640
654
  const hasMeasured = containerW > 0 && containerH > 0;
641
655
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -713,6 +727,7 @@ function DeviceFrame({
713
727
  left: 0,
714
728
  width: frameTotalW,
715
729
  height: frameTotalH,
730
+ overflow: "hidden",
716
731
  pointerEvents: "none",
717
732
  zIndex: 10
718
733
  }