@biela.dev/core 1.7.7 → 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/lite.cjs CHANGED
@@ -726,6 +726,20 @@ function DeviceFrame({
726
726
  react.useEffect(() => {
727
727
  onScaleChangeRef.current?.(activeScale);
728
728
  }, [activeScale]);
729
+ react.useEffect(() => {
730
+ const el = frameOverlayRef.current;
731
+ if (!el) return;
732
+ const svgs = el.querySelectorAll("svg");
733
+ svgs.forEach((svg) => {
734
+ if (!svg.getAttribute("viewBox")) {
735
+ const w = svg.getAttribute("width");
736
+ const h = svg.getAttribute("height");
737
+ if (w && h) svg.setAttribute("viewBox", `0 0 ${w} ${h}`);
738
+ }
739
+ svg.setAttribute("width", "100%");
740
+ svg.setAttribute("height", "100%");
741
+ });
742
+ });
729
743
  const DeviceSVGComponent = svgEntry?.component;
730
744
  const hasMeasured = containerW > 0 && containerH > 0;
731
745
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -793,36 +807,22 @@ function DeviceFrame({
793
807
  children: /* @__PURE__ */ jsxRuntime.jsx(DeviceErrorBoundary, { children })
794
808
  }
795
809
  ),
796
- DeviceSVGComponent && /* @__PURE__ */ jsxRuntime.jsxs(
797
- "div",
810
+ DeviceSVGComponent && /* @__PURE__ */ jsxRuntime.jsx("div", { ref: frameOverlayRef, children: /* @__PURE__ */ jsxRuntime.jsx(
811
+ DeviceSVGComponent,
798
812
  {
799
- ref: frameOverlayRef,
800
- className: "bielaframe-svg-overlay",
813
+ colorScheme,
801
814
  style: {
802
815
  position: "absolute",
803
816
  top: 0,
804
817
  left: 0,
805
818
  width: frameTotalW,
806
819
  height: frameTotalH,
820
+ overflow: "hidden",
807
821
  pointerEvents: "none",
808
- zIndex: 10,
809
- overflow: "hidden"
810
- },
811
- children: [
812
- /* @__PURE__ */ jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: `.bielaframe-svg-overlay svg { width: 100% !important; height: 100% !important; }` } }),
813
- /* @__PURE__ */ jsxRuntime.jsx(
814
- DeviceSVGComponent,
815
- {
816
- colorScheme,
817
- style: {
818
- width: "100%",
819
- height: "100%"
820
- }
821
- }
822
- )
823
- ]
822
+ zIndex: 10
823
+ }
824
824
  }
825
- ),
825
+ ) }),
826
826
  showSafeAreaOverlay && /* @__PURE__ */ jsxRuntime.jsx(
827
827
  "div",
828
828
  {