@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/lite.js CHANGED
@@ -724,6 +724,20 @@ function DeviceFrame({
724
724
  useEffect(() => {
725
725
  onScaleChangeRef.current?.(activeScale);
726
726
  }, [activeScale]);
727
+ useEffect(() => {
728
+ const el = frameOverlayRef.current;
729
+ if (!el) return;
730
+ const svgs = el.querySelectorAll("svg");
731
+ svgs.forEach((svg) => {
732
+ if (!svg.getAttribute("viewBox")) {
733
+ const w = svg.getAttribute("width");
734
+ const h = svg.getAttribute("height");
735
+ if (w && h) svg.setAttribute("viewBox", `0 0 ${w} ${h}`);
736
+ }
737
+ svg.setAttribute("width", "100%");
738
+ svg.setAttribute("height", "100%");
739
+ });
740
+ });
727
741
  const DeviceSVGComponent = svgEntry?.component;
728
742
  const hasMeasured = containerW > 0 && containerH > 0;
729
743
  return /* @__PURE__ */ jsx(
@@ -801,6 +815,7 @@ function DeviceFrame({
801
815
  left: 0,
802
816
  width: frameTotalW,
803
817
  height: frameTotalH,
818
+ overflow: "hidden",
804
819
  pointerEvents: "none",
805
820
  zIndex: 10
806
821
  }