@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.js
CHANGED
|
@@ -76,7 +76,11 @@ function useContainerSize(ref) {
|
|
|
76
76
|
if (!el) return;
|
|
77
77
|
const observer = new ResizeObserver(([entry]) => {
|
|
78
78
|
if (!entry) return;
|
|
79
|
-
|
|
79
|
+
let { width, height } = entry.contentRect;
|
|
80
|
+
if (typeof window !== "undefined") {
|
|
81
|
+
width = Math.min(width, window.innerWidth);
|
|
82
|
+
height = Math.min(height, window.innerHeight);
|
|
83
|
+
}
|
|
80
84
|
setSize((prev) => {
|
|
81
85
|
if (prev.width === width && prev.height === height) return prev;
|
|
82
86
|
return { width, height };
|
|
@@ -576,7 +580,7 @@ function DeviceFrame({
|
|
|
576
580
|
scaleMode = "fit",
|
|
577
581
|
manualScale,
|
|
578
582
|
showSafeAreaOverlay = false,
|
|
579
|
-
showScaleBar =
|
|
583
|
+
showScaleBar = false,
|
|
580
584
|
colorScheme = "dark",
|
|
581
585
|
onContractReady,
|
|
582
586
|
onScaleChange,
|