"use client" import * as React from "react" import { getReflowViewportSnapshot, getServerReflowViewportSnapshot, subscribeReflowViewport, } from "../lib/reflow-viewport" /** * When true, the sidebar should **not** pin utilities + profile to the bottom — the whole * rail becomes one scroll surface (WCAG 1.4.10 reflow: ≤320px width, ≥200% zoom, or short viewport). * * Uses `visualViewport.scale` where available (pinch / browser zoom), viewport width ≤ 320px, * and short viewport height. */ export function useSidebarReflowZoom(): boolean { return React.useSyncExternalStore( subscribeReflowViewport, getReflowViewportSnapshot, getServerReflowViewportSnapshot, ) }