import { ColumnConfig, DataGridElement, GridConfig } from '@toolbox-web/grid'; import { InjectionKey, Ref } from 'vue'; /** * Injection key for the grid element. * @since 0.1.0 */ export declare const GRID_ELEMENT_KEY: InjectionKey>; /** * Return type for useGrid composable. * @since 0.1.0 */ export interface UseGridReturn { /** The grid element reference */ element: Ref | null>; /** * The grid element reference. * @deprecated Use {@link UseGridReturn.element} instead, which matches the * React and Angular adapters. This alias points at the same `Ref` and will * be removed in a future major. */ gridElement: Ref | null>; /** Whether the grid is ready */ isReady: Ref; /** Current grid configuration (reactive) */ config: Ref | null>; /** Get the effective configuration */ getConfig: () => Promise | null>; /** Wait for the grid to finish its first render */ ready: () => Promise; /** Force a layout recalculation */ forceLayout: () => Promise; /** Get a plugin by its class */ getPlugin: (pluginClass: new (...args: unknown[]) => T) => T | undefined; /** * Get a plugin by its registered name (preferred). * Uses the type-safe PluginNameMap for auto-completion and return type narrowing. */ getPluginByName: DataGridElement['getPluginByName']; /** Toggle a group row */ toggleGroup: (key: string) => Promise; /** Register custom styles via `document.adoptedStyleSheets` */ registerStyles: (id: string, css: string) => void; /** Unregister previously registered custom styles */ unregisterStyles: (id: string) => void; /** Get currently visible columns (excluding hidden columns) */ getVisibleColumns: () => ColumnConfig[]; } /** * Composable for programmatic access to the grid. * * @example * ```vue * * ``` * @param selector - Optional CSS selector to target a specific grid element via * DOM query instead of using Vue's provide/inject. Use when the component * contains multiple grids, e.g. `'tbw-grid.primary'` or `'#my-grid'`. * @since 0.1.0 */ export declare function useGrid(selector?: string): UseGridReturn; //# sourceMappingURL=use-grid.d.ts.map