@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/index.cjs +21 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +21 -21
- package/dist/index.js.map +1 -1
- package/dist/lite.cjs +21 -21
- package/dist/lite.cjs.map +1 -1
- package/dist/lite.js +21 -21
- package/dist/lite.js.map +1 -1
- package/package.json +1 -1
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(
|
|
@@ -701,36 +715,22 @@ function DeviceFrame({
|
|
|
701
715
|
children: /* @__PURE__ */ jsx(DeviceErrorBoundary, { children })
|
|
702
716
|
}
|
|
703
717
|
),
|
|
704
|
-
DeviceSVGComponent && /* @__PURE__ */
|
|
705
|
-
|
|
718
|
+
DeviceSVGComponent && /* @__PURE__ */ jsx("div", { ref: frameOverlayRef, children: /* @__PURE__ */ jsx(
|
|
719
|
+
DeviceSVGComponent,
|
|
706
720
|
{
|
|
707
|
-
|
|
708
|
-
className: "bielaframe-svg-overlay",
|
|
721
|
+
colorScheme,
|
|
709
722
|
style: {
|
|
710
723
|
position: "absolute",
|
|
711
724
|
top: 0,
|
|
712
725
|
left: 0,
|
|
713
726
|
width: frameTotalW,
|
|
714
727
|
height: frameTotalH,
|
|
728
|
+
overflow: "hidden",
|
|
715
729
|
pointerEvents: "none",
|
|
716
|
-
zIndex: 10
|
|
717
|
-
|
|
718
|
-
},
|
|
719
|
-
children: [
|
|
720
|
-
/* @__PURE__ */ jsx("style", { dangerouslySetInnerHTML: { __html: `.bielaframe-svg-overlay svg { width: 100% !important; height: 100% !important; }` } }),
|
|
721
|
-
/* @__PURE__ */ jsx(
|
|
722
|
-
DeviceSVGComponent,
|
|
723
|
-
{
|
|
724
|
-
colorScheme,
|
|
725
|
-
style: {
|
|
726
|
-
width: "100%",
|
|
727
|
-
height: "100%"
|
|
728
|
-
}
|
|
729
|
-
}
|
|
730
|
-
)
|
|
731
|
-
]
|
|
730
|
+
zIndex: 10
|
|
731
|
+
}
|
|
732
732
|
}
|
|
733
|
-
),
|
|
733
|
+
) }),
|
|
734
734
|
showSafeAreaOverlay && /* @__PURE__ */ jsx(
|
|
735
735
|
"div",
|
|
736
736
|
{
|