@biela.dev/core 1.7.8 → 1.7.10

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