<!-- API Report Version: 2.3 -->

## API Report File for "@atlaskit/editor-tables"

> Do not edit this file. This report is auto-generated using
> [API Extractor](https://api-extractor.com/).
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)

### Table of contents

- [Main Entry Types](#main-entry-types)
- [Peer Dependencies](#peer-dependencies)

### Main Entry Types

<!--SECTION START: Main Entry Types-->

```ts
import { ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
import { Mappable } from '@atlaskit/editor-prosemirror/transform';
import { Mapping } from '@atlaskit/editor-prosemirror/transform';
import { Node as Node_2 } from '@atlaskit/editor-prosemirror/model';
import { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
import { Selection as Selection_2 } from '@atlaskit/editor-prosemirror/state';
import { SelectionBookmark } from '@atlaskit/editor-prosemirror/state';
import { Slice } from '@atlaskit/editor-prosemirror/model';
import { Transaction } from '@atlaskit/editor-prosemirror/state';

// @public (undocumented)
type Axis = 'horiz' | 'vert';

// @public (undocumented)
class CellBookmark implements SelectionBookmark {
	constructor(anchor: number, head: number);
	// (undocumented)
	readonly anchor: number;
	// (undocumented)
	readonly head: number;
	// (undocumented)
	map(mapping: Mappable): SelectionBookmark;
	// (undocumented)
	resolve(doc: Node_2): Selection_2;
}

// @public (undocumented)
export class CellSelection extends Selection_2 {
	// (undocumented)
	readonly $anchorCell: ResolvedPos;
	// (undocumented)
	readonly $headCell: ResolvedPos;
	constructor($anchorCell: ResolvedPos, $headCell?: ResolvedPos);
	// (undocumented)
	static colSelection($anchorCell: ResolvedPos, $headCell?: ResolvedPos): CellSelection;
	// (undocumented)
	content(): Slice;
	// (undocumented)
	static create(doc: Node_2, anchorCell: number, headCell?: number): CellSelection;
	// (undocumented)
	eq(other: CellSelection): boolean;
	// (undocumented)
	forEachCell(f: (node: Node_2, pos: number) => void): void;
	// (undocumented)
	static fromJSON(doc: Node_2, json: SerializedCellSelection): CellSelection;
	// (undocumented)
	getBookmark(): CellBookmark;
	// (undocumented)
	isColSelection(): boolean;
	// (undocumented)
	isRowSelection(): boolean;
	// (undocumented)
	map(doc: Node_2, mapping: Mapping): Selection_2;
	// (undocumented)
	replace(tr: Transaction, content?: Slice): void;
	// (undocumented)
	replaceWith(tr: Transaction, node: Node_2): void;
	// (undocumented)
	static rowSelection($anchorCell: ResolvedPos, $headCell?: ResolvedPos): CellSelection;
	// (undocumented)
	toJSON(): SerializedCellSelection;
	// (undocumented)
	readonly visible: boolean;
}

// @public (undocumented)
export const findTable: (selection: Selection_2) => ContentNodeWithPos | undefined;

// @public (undocumented)
export class Rect {
	constructor(left: number, top: number, right: number, bottom: number);
	// (undocumented)
	bottom: number;
	// (undocumented)
	left: number;
	// (undocumented)
	right: number;
	// (undocumented)
	top: number;
}

// @public (undocumented)
interface SerializedCellSelection {
	// (undocumented)
	anchor: number;
	// (undocumented)
	head: number;
	// (undocumented)
	type: 'cell';
}

// @public (undocumented)
export class TableMap {
	constructor(width: number, height: number, map: number[], problems?: TableProblem[] | null);
	// (undocumented)
	cellsInRect(rect: Rect): number[];
	// (undocumented)
	colCount(pos: number): number;
	// (undocumented)
	findCell(pos: number): Rect;
	// (undocumented)
	static get(table: Node_2): TableMap;
	// (undocumented)
	getMaxColInRow(pos: ResolvedPos): number | undefined;
	// (undocumented)
	height: number;
	// (undocumented)
	isPosMerged(pos: number): boolean;
	// (undocumented)
	map: number[];
	// (undocumented)
	nextCell(pos: number, axis: Axis, dir: number): null | number;
	// (undocumented)
	positionAt(row: number, col: number, table: Node_2): number;
	// (undocumented)
	problems?: TableProblem[] | null;
	// (undocumented)
	rectBetween(a: number, b: number): Rect;
	// (undocumented)
	rowCount(pos: number): number;
	// (undocumented)
	width: number;
}

// @public (undocumented)
type TableProblem =
	| TableProblemColWidthMismatch
	| TableProblemCollision
	| TableProblemLongRowspan
	| TableProblemMissing;

// @public (undocumented)
type TableProblemCollision = {
	type: TableProblemTypes.COLLISION;
	row: number;
	pos: number;
	n: number;
};

// @public (undocumented)
type TableProblemColWidthMismatch = {
	type: TableProblemTypes;
	pos: number;
	colwidth: number;
};

// @public (undocumented)
type TableProblemLongRowspan = {
	type: TableProblemTypes.OVERLONG_ROWSPAN;
	pos: number;
	n: number;
};

// @public (undocumented)
type TableProblemMissing = {
	type: TableProblemTypes.MISSING;
	row: number;
	n: number;
};

// @public (undocumented)
enum TableProblemTypes {
	// (undocumented)
	COLLISION = 'collision',
	// (undocumented)
	COLWIDTH_MISMATCH = 'colwidth mismatch',
	// (undocumented)
	MISSING = 'missing',
	// (undocumented)
	OVERLONG_ROWSPAN = 'overlong_rowspan',
}

// @public (undocumented)
export const uuid: {
	setStatic(value: false | string): void;
	generate(): string;
};

// (No @packageDocumentation comment for this package)
```

<!--SECTION END: Main Entry Types-->

### Peer Dependencies

<!--SECTION START: Peer Dependencies-->

```json
{}
```

<!--SECTION END: Peer Dependencies-->
