import * as React from "react"; import type { AdminHost, AdminSurface } from "./hooks.js"; /** What a slot's component receives: the default's props, and `renderDefault` to render what it replaces. */ export type SlotProps

= P & { /** * The next layer: the built-in component, or the plugin below this one. Pass the props you received (spread them to * change some); Admin keeps some state of its own in them. */ readonly renderDefault: (props: P) => React.ReactNode; }; /** A component for a slot; `X` is what Admin adds for the surface (`surface`, in the slots that render in both). */ export type SlotComponent = (props: SlotProps

& X) => React.ReactNode; /** The components registered for each slot name, innermost (nearest the built-in) first. */ export type AdminLayers = { readonly [name: string]: readonly SlotComponent[]; }; interface SurfaceValue { readonly surface: AdminSurface; readonly host: AdminHost | null; readonly layers: AdminLayers; } /** Internal: where Admin renders and which components replace the built-in ones. `` and the MCP App provide it. */ export declare function SurfaceProvider(props: React.PropsWithChildren): React.ReactElement; /** The slots that render in both surfaces get `surface` in their props. */ export declare const isBothSlot: (name: string) => boolean; /** * Render a built-in component through its slot: the registered layers wrap `Default`, the last one outermost. Several * names stack in order, the first nearest `Default`. Without a provider, or without a layer for any name, it is `Default` * itself. `Default` must be a stable component. */ export declare function Slot

({ name, Default, props }: { name: string | readonly string[]; Default: React.ComponentType

; props: P; }): React.ReactElement; /** The built-in component of a slot that has none: it renders nothing, so an application's component adds to the page. */ export declare function Empty(): null; /** The admin MCP tool of a View or Procedure: its name lowercased, kebab to snake (`mcpToolNameSegment` in @aotter/mantle's compiler). */ export declare const toolName: (name: string) => string; /** * The slots for one column of a View an MCP App shows. The App knows a View by its tool, and a slot names the View, so the * registered `cell:view:` names are matched by their tool name. */ export declare function useViewCellNames(tool: string, column: string): readonly string[]; /** Where this component renders. Branching on it is allowed; both branches must render. */ export declare function useSurface(): AdminSurface; /** * Open an http(s) URL outside Admin: a new tab in the browser, `ui/open-link` in an MCP host (which blocks navigation * from its sandbox, so never `window.open` or `target="_blank"` in a component that renders there). Resolves false when * the URL is not http(s), or an MCP host cannot or refuses to open it (the browser cannot tell, so it resolves true). * * Surface: both. */ export declare function useOpenLink(): (url: string) => Promise; /** * A link that works in both surfaces. In the browser it is an `` (Admin's router takes same-origin `/admin` paths). In an * MCP host an http(s) link opens through the host; any other href, such as an `/admin/...` path, has no origin there, so it * renders as plain text. * * Surface: both. */ export declare function AdminLink({ href, children, onClick, ...rest }: React.AnchorHTMLAttributes & { href: string; }): React.ReactElement; export {};