import { createContext } from "react"; // The floating header's slot (see PageHeader in PageShell): the node a page portals its header // controls into, whether a page has claimed it, and how a page claims it. The value is null with no // shell and the target null in a shell without a header (the channel page): a page renders its header // nowhere there. Its own // module so PageShell exports only components (Fast Refresh). export type PageHeaderSlotValue = { target: HTMLElement | null; claimed: boolean; /** Claim the header for this page's controls; the returned function releases it. */ claim: () => () => void; /** The default (PageHeaderDefault) reports whether it is in the header, so PageShell re-measures. */ showDefault: (shown: boolean) => void; }; export const PageHeaderSlot = createContext(null);