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