/** * The panel docked in the page itself, for standalone hosts that serve the * panel from the page's own server (`createLitDevtools()`). * * A button in the corner opens a drawer along the bottom of the page with the * panel in an iframe. Framed by the page, the panel also reaches it over the * direct in-page channel (see `panel/in-page.ts`), so hovering the tree * highlights without a round trip to the server. * * Plain DOM in an open shadow root rather than a Lit element: the runtime * counts the page's Lit elements, and the dock is not one of the page's. * The iframe is only created on first open, so a dock nobody opens costs * the page nothing but the button. * * In a frame (a cloud IDE's preview) devframe cannot prompt for the one-time * code, so the dock asks for it: the button carries a dot, and the drawer * holds a field for the code instead of the panel until the server trusts the * page. The panel then loads with the token the page stored. * * A full page load takes the panel with it. The dock keeps what it can * across one: open or not, its height, and the panel's tab, read off the * panel's hash as the page goes. Not the selection: its ids name elements * of the page that is leaving, and on the next one could name others. */ import type { CodeRequest } from './rpc-transport.js'; export interface Dock { /** Open the drawer, on `href` when given (a hash change keeps the panel). */ show(href?: string): void; hide(): void; toggle(): void; /** Ask the reader for the one-time code, for a page that cannot prompt. */ askForCode(auth: CodeRequest): void; } /** * Adds the dock to the page. Call once `document.body` exists. * * @param panelUrl Where the panel answers, e.g. `http://localhost:3000/__lit-devtools/`. */ export declare const createDock: (panelUrl: string) => Dock; //# sourceMappingURL=dock.d.ts.map