import { GridCore } from './grid-core'; import type { GridOptions } from '../types/grid.types'; /** * Accepted container reference for {@link createGrid} / {@link renderGrid}: * either a live DOM element or a CSS selector string resolved against * `document` at call time. */ export type GridContainer = HTMLElement | string; /** * Creates and mounts a Photon Grid, returning the live {@link GridCore} * instance. This is the recommended, framework-agnostic entry point — it reads * more declaratively than `new GridCore(...)`, accepts a CSS selector as well * as an element, and fails fast with a clear message when the container is * missing. * * The returned instance exposes the full public surface via its `api` * ({@link GridCore.api}) and is torn down with `grid.destroy()`. * * @param container - Target host: an `HTMLElement`, or a CSS selector (e.g. * `'#grid'`) resolved via `document.querySelector`. * @param options - Grid configuration (columns, data, sizing, features…). * @returns The mounted {@link GridCore} instance. * @throws If `container` is a selector that matches no element, or a nullish * element reference is passed. * * @example Using an element * ```ts * const grid = PhotonGrid.createGrid(document.getElementById('grid'), { * columns, * data: rowData, * headerRowHeight: 48, * rowHeight: 42, * }); * grid.api.sizeColumnsToFit(); * ``` * * @example Using a selector * ```ts * const grid = PhotonGrid.createGrid('#grid', { columns, data: rowData }); * // …later * grid.destroy(); * ``` */ export declare function createGrid(container: GridContainer, options: GridOptions): GridCore; /** * Alias of {@link createGrid} for callers who prefer render-oriented naming. * Identical behavior and return value. * * @param container - Target host element or CSS selector. * @param options - Grid configuration. * @returns The mounted {@link GridCore} instance. */ export declare function renderGrid(container: GridContainer, options: GridOptions): GridCore; //# sourceMappingURL=create-grid.d.ts.map