import { useVendoProvider } from "../context.js"; /** * Open the sign-in window for a connect, SYNCHRONOUSLY inside the click. * * Safari and Firefox judge a popup by call-stack provenance, not by intent: a * `window.open` that runs after an `await` is no longer "during a click" and is * refused outright. The old flow awaited `initiate()` first so it could open the * window with the real URL in hand — which is precisely the shape those browsers * block. So the window opens BLANK on the click and is navigated once the * redirect URL arrives (see {@link completeConnection}). * * `noopener` is deliberately absent: it forces `window.open` to return null, and * the handle is what lets us navigate the window and close it from here when the * account goes active. The page we send it to is the broker's own consent page. * * Returns `null` when the browser blocked it anyway — the caller keeps going and * offers the same URL as a plain link. * * @param key Identifies THIS connect, and must be the same key the caller keys * its own per-row connect state by. It becomes the window's name, and a name is * what makes `window.open` return a window that is ALREADY OPEN: every connect * surface here permits concurrent connects, so one shared name meant the second * connect inherited the first's window, replaced a sign-in page still in flight, * and had it closed underneath by whichever connect settled first. */ export declare function openConnectPopup(key: string): Window | null; /** Initiate a broker connection and poll it to `active` (the ConnectCard flow, shared). */ export declare function completeConnection(client: ReturnType["client"], input: { toolkit: string; connector?: string; }, isCancelled: () => boolean, /** The window {@link openConnectPopup} returned for THIS click. `null` means the browser blocked it: the poll still runs, because the user can finish through the fallback link the surface offers. `undefined` means the caller opened nothing, so a background tab is opened here instead. */ popup?: Window | null, /** Called once the broker's redirect URL exists — the fallback link's href, needed WHILE the poll runs, long before this resolves. */ onRedirect?: (redirectUrl: string) => void): Promise; /** * The consumer's half of a failed connect (spec §16 law 3, the consumer-voice * law), living beside the throws it answers. The keyless (default OSS) * deployment refuses with a sentence written for the HOST DEVELOPER — "pass a * Composio connector (composioConnector) to createVendo({ connectors }) or set * VENDO_API_KEY" — and every connect surface rendered `reason.message`, so that * TypeScript call and that environment variable reached whoever was trying to * connect their Slack. The developer sentence keeps its home (the server's own * error, the dev-mode console); the person is told what it means for THEM. * `refusalCopy` in grant-set-card is the pattern. */ export declare function connectRefusalCopy(reason: unknown, name: string): string; /** The dock button in the composer row. Hidden only when the host explicitly passed `connectors={[]}` ("no connectors, ever") or while the auto catalog is still in flight (no flash). An auto catalog that FAILED or resolved to nothing keeps the button (2026-07 demo feedback — the dock used to vanish whenever /connections wasn't configured): the tray owns the honest error/empty state instead. The inner component owns the /connections fetch, so a hidden dock never polls accounts; auto mode costs one shared /connections/catalog read (useConnectorCatalog). */ export declare const ConnectDockButton: import("react").ForwardRefExoticComponent<{ open: boolean; onToggle(): void; } & import("react").RefAttributes>; /** The liquid tray: rendered by VendoThread inside `.fl-dock-anchor`, above the composer it docks onto. `anchorRef` is the dock button that opened it — an outside-press on THAT button must not close (the button's own click toggles; closing here first would let the toggle reopen it, Devin/Greptile review). */ export declare function ConnectTray({ onClose, anchorRef, closing }: { onClose(): void; anchorRef?: React.RefObject; /** Exit phase: the composer keeps the tray mounted while the close animation runs; `data-closing` drives it and disables pointer events. */ closing?: boolean; }): import("react").JSX.Element;