/** * useToolsDock - read the {@link ToolsDockApi} from Svelte context. * * Tools and arbitrary descendants of `` use this to obtain the * dock instance that owns them — open/close themselves, push events through * the typed bus, react to the current `context`, etc. * * Throws a clear error if called outside a `` provider tree so * misuse fails loudly during development rather than producing silent nulls. * * The returned `dock.context` is the default {@link ToolsDockContext} shape. * For typed access from within a tool body, the recommended pattern is to * type the component's own `context` prop locally — see the JSDoc on * {@link ToolDef.component} for an example. (`ToolDef` deliberately erases * its context generic at registration time so the dock can store tools as * a single homogeneous `ToolDef[]`.) * * @example * ```svelte * * * * ``` */ import type { ToolsDockApi } from '../types.js'; /** * Retrieve the {@link ToolsDockApi} from Svelte context. * * @throws Error when called outside a `` provider tree */ export declare function useToolsDock(): ToolsDockApi; /** * Non-throwing variant — returns `null` outside a provider. Useful for * optional integrations where a tool should degrade gracefully if not * embedded inside a ``. */ export declare function tryUseToolsDock(): ToolsDockApi | null; //# sourceMappingURL=use-tools-dock.d.ts.map