import { LinkOpenOptions, LinkOpenResult } from '@napplet/core'; /** * Napplet NAP link shim entrypoint. * * @module */ /** * Handle link.* messages from the shell via the central message listener. */ declare function handleLinkMessage(msg: { type: string; [key: string]: unknown; }): void; /** * Request that the shell open an external URL for the user. The shell validates * the URL, applies policy, chooses the browser context, and replies with * `status: "opened"` or `status: "denied"`. * * @param url Absolute URL to open. * @param options Optional prompt/display hints. * @returns Promise resolving to the shell's open/deny status. * * @example * ```ts * const result = await open('https://example.com/post/123', { label: 'Read post' }); * if (result.status === 'denied') showInlineFallback(); * ``` */ declare function open(url: string, options?: LinkOpenOptions): Promise; /** * Install the link shim. Registration-only -- links are opened on demand, not * at install time. * * @returns cleanup function that rejects pending requests and clears state. */ declare function installLinkShim(): () => void; export { handleLinkMessage, installLinkShim, open };