@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/index.cjs
CHANGED
|
@@ -12,7 +12,11 @@ function useContainerSize(ref) {
|
|
|
12
12
|
if (!el) return;
|
|
13
13
|
const observer = new ResizeObserver(([entry]) => {
|
|
14
14
|
if (!entry) return;
|
|
15
|
-
|
|
15
|
+
let { width, height } = entry.contentRect;
|
|
16
|
+
if (typeof window !== "undefined") {
|
|
17
|
+
width = Math.min(width, window.innerWidth);
|
|
18
|
+
height = Math.min(height, window.innerHeight);
|
|
19
|
+
}
|
|
16
20
|
setSize((prev) => {
|
|
17
21
|
if (prev.width === width && prev.height === height) return prev;
|
|
18
22
|
return { width, height };
|
|
@@ -488,7 +492,7 @@ function DeviceFrame({
|
|
|
488
492
|
scaleMode = "fit",
|
|
489
493
|
manualScale,
|
|
490
494
|
showSafeAreaOverlay = false,
|
|
491
|
-
showScaleBar =
|
|
495
|
+
showScaleBar = false,
|
|
492
496
|
colorScheme = "dark",
|
|
493
497
|
onContractReady,
|
|
494
498
|
onScaleChange,
|