import type { InjectionKey, Ref } from 'vue' /** What the fullscreen frame tells the page drawn on it: where the menu bar ends. */ export interface Stage { /** px from the top of the window to the bottom of the menu bar. */ menuBottom: Ref } const STAGE: InjectionKey = Symbol('stage') export const provideStage = (stage: Stage) => provide(STAGE, stage) /** The fullscreen frame around the page, or null where a page stands without one. */ export const useStage = () => inject(STAGE, null)