@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/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
- const { width, height } = entry.contentRect;
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 = true,
585
+ showScaleBar = false,
582
586
  colorScheme = "dark",
583
587
  onContractReady,
584
588
  onScaleChange,