import { CustomEventTarget } from "simple-custom-elements"; import { TableEvents } from "./events.js"; type GridColumn = [start: number, end: number]; declare namespace GridColumn { const toString: ([start, end]: GridColumn) => string; /** * unsafe */ const fromString: (string: string) => GridColumn; const eq: (a: GridColumn, b: GridColumn) => boolean; /** * checks whether a contains b */ const contains: ([aStart, aEnd]: GridColumn, [bStart, bEnd]: GridColumn) => boolean; } type Breakpoint = { width: number | undefined; isHidden: boolean; pinned: "left" | "right" | undefined; }; type ColumnIndex = number; type Meta = { visibility: IntersectionObserver; /** * associates a DOM based start index to a Grid based start index */ startIndices: ColumnIndex[]; pinningInfo: { top: UwcTrElement[]; bottom: UwcTrElement[]; /** * the order of DOM based start indices that should be rendered on the left edge * * @internal not implemented yet */ left: ColumnIndex[]; /** * the order of DOM based start indices that should be rendered on the right edge * * @internal not implemented yet */ right: ColumnIndex[]; }; }; declare namespace Meta { const byTable: Map; } export declare class UwcTableElement extends HTMLElement { #private; get breakpoints(): Breakpoint[]; set breakpoints(next: Breakpoint[]); get defaultWidth(): number; /** * @internal */ connectedCallback(): void; move: (gridColumn: GridColumn, nextStart: number) => void; getWidth: ([start, end]: GridColumn) => number; setWidth: ([start, end]: GridColumn, width: number) => void; setHidden: ([start, end]: GridColumn, isHidden: boolean) => void; } export declare class UwcTrElement extends HTMLElement { #private; pinned?: "top" | "bottom"; /** * @internal */ get cells(): UwcCellElement[]; /** * @internal */ get isVisible(): boolean; /** * @internal */ set isVisible(next: boolean); /** * @internal */ connectedCallback(): void; /** * @internal */ disconnectedCallback(): void; /** * @internal */ updateGridColumns: () => void; } declare abstract class UwcCellElement extends HTMLElement { start: number; colspan: number; width?: number; minwidth: number; get gridColumn(): GridColumn; protected get table(): global.UwcTableElement; protected get meta(): Meta; /** * @internal */ updateGridColumn: () => void; } export declare class UwcThElement extends UwcCellElement { #private; draggable: boolean; resizable: boolean; connectedCallback(): void; } export declare class UwcTdElement extends UwcCellElement { } declare global { const UwcTableElement: typeof import("./uwc-table2.ts").UwcTableElement; type UwcTableElement = import("./uwc-table2.ts").UwcTableElement & CustomEventTarget; const UwcTrElement: typeof import("./uwc-table2.ts").UwcTrElement; type UwcTrElement = import("./uwc-table2.ts").UwcTrElement; const UwcThElement: typeof import("./uwc-table2.ts").UwcThElement; type UwcThElement = import("./uwc-table2.ts").UwcThElement; const UwcTdElement: typeof import("./uwc-table2.ts").UwcTdElement; type UwcTdElement = import("./uwc-table2.ts").UwcTdElement; interface HTMLElementTagNameMap { "uwc-table": UwcTableElement; "uwc-tr": UwcTrElement; "uwc-th": UwcThElement; "uwc-td": UwcTdElement; } interface HTMLElementEventMap extends TableEvents { } } export {};