@biela.dev/core 1.7.0 → 1.7.2
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 +6 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/lite.cjs +6 -2
- package/dist/lite.cjs.map +1 -1
- package/dist/lite.js +6 -2
- package/dist/lite.js.map +1 -1
- package/package.json +1 -1
package/dist/lite.cjs
CHANGED
|
@@ -78,7 +78,11 @@ function useContainerSize(ref) {
|
|
|
78
78
|
if (!el) return;
|
|
79
79
|
const observer = new ResizeObserver(([entry]) => {
|
|
80
80
|
if (!entry) return;
|
|
81
|
-
|
|
81
|
+
let { width, height } = entry.contentRect;
|
|
82
|
+
if (typeof window !== "undefined") {
|
|
83
|
+
width = Math.min(width, window.innerWidth);
|
|
84
|
+
height = Math.min(height, window.innerHeight);
|
|
85
|
+
}
|
|
82
86
|
setSize((prev) => {
|
|
83
87
|
if (prev.width === width && prev.height === height) return prev;
|
|
84
88
|
return { width, height };
|
|
@@ -578,7 +582,7 @@ function DeviceFrame({
|
|
|
578
582
|
scaleMode = "fit",
|
|
579
583
|
manualScale,
|
|
580
584
|
showSafeAreaOverlay = false,
|
|
581
|
-
showScaleBar =
|
|
585
|
+
showScaleBar = false,
|
|
582
586
|
colorScheme = "dark",
|
|
583
587
|
onContractReady,
|
|
584
588
|
onScaleChange,
|