type PopupCloser = () => void; type PopupRegistrar = (close: PopupCloser) => () => void; /** * Modal / Drawer 用它给自己圈一个浮层作用域:挂在里面的 Popup(下拉、气泡、子菜单……) * 把关闭方法登记进来,宿主窗口关的时候一起关掉——否则窗口都没了,teleported 的下拉还悬在 body 上。 * Vue 侧是同名 API 的 provide/inject 版(components/config/popup-host.ts)。 */ export declare const PopupHostContext: import('react').Context; /** 宿主窗口(Modal / Drawer)用:拿到 register 传给 Provider,关窗时调 closeAll。 */ export declare function usePopupHostScope(): { register: PopupRegistrar; closeAll: () => void; }; /** 浮层用:把自己的关闭方法登记给最近的宿主窗口;外面没有宿主时什么都不做。 */ export declare function usePopupHost(close: PopupCloser): void; export {};