MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / resolveWidgetDemoLayout

Function resolveWidgetDemoLayout

scripts/hsr/widget-layout.mjs:23–29  ·  view source on GitHub ↗
(viewport)

Source from the content-addressed store, hash-verified

21}
22
23export function resolveWidgetDemoLayout(viewport) {
24 const normalized = normalizeViewport(viewport);
25 const { cols, rows } = normalized;
26 if (cols <= TINY_MAX_COLS || rows <= TINY_MAX_ROWS) return "tiny";
27 if (cols < FULL_MIN_COLS || rows < FULL_MIN_ROWS) return "compact";
28 return "full";
29}

Callers 2

renderWidgetScreenFunction · 0.90

Calls 1

normalizeViewportFunction · 0.70

Tested by

no test coverage detected