@atlaskit/editor-tables 2.10.21 → 2.10.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/cell-bookmark/package.json +1 -8
- package/cell-selection/package.json +1 -8
- package/package.json +2 -2
- package/pm-plugins/package.json +1 -8
- package/pm-plugins/plugin-key/package.json +1 -8
- package/pm-plugins/table-editing/package.json +1 -8
- package/table-map/package.json +1 -8
- package/types/package.json +1 -8
- package/utils/add-column/package.json +1 -8
- package/utils/add-column-at/package.json +1 -8
- package/utils/add-row/package.json +1 -8
- package/utils/add-row-at/package.json +1 -8
- package/utils/analytics-helpers/package.json +1 -8
- package/utils/cells/package.json +1 -8
- package/utils/clone-column/package.json +1 -8
- package/utils/clone-row/package.json +1 -8
- package/utils/clone-tr/package.json +1 -8
- package/utils/colspan/package.json +1 -8
- package/utils/create-table/package.json +1 -8
- package/utils/draw-cell-selection/package.json +1 -8
- package/utils/empty-cells/package.json +1 -8
- package/utils/find/package.json +1 -8
- package/utils/fix-tables/package.json +1 -8
- package/utils/for-each-cell/package.json +1 -8
- package/utils/get-cell-selection-ranges/package.json +1 -8
- package/utils/get-cells-in-column/package.json +1 -8
- package/utils/get-cells-in-row/package.json +1 -8
- package/utils/get-cells-in-table/package.json +1 -8
- package/utils/get-selection-range-in-column/package.json +1 -8
- package/utils/get-selection-range-in-row/package.json +1 -8
- package/utils/get-selection-rect/package.json +1 -8
- package/utils/go-to-next-cell/package.json +1 -8
- package/utils/handle-paste/package.json +1 -8
- package/utils/is-selected/package.json +1 -8
- package/utils/is-selection-type/package.json +1 -8
- package/utils/move-column/package.json +1 -8
- package/utils/move-row/package.json +1 -8
- package/utils/normalize-selection/package.json +1 -8
- package/utils/package.json +1 -8
- package/utils/remove-column/package.json +1 -8
- package/utils/remove-row/package.json +1 -8
- package/utils/remove-table/package.json +1 -8
- package/utils/reorder-utils/package.json +1 -8
- package/utils/replace-table/package.json +1 -8
- package/utils/select-nodes/package.json +1 -8
- package/utils/selection-cell/package.json +1 -8
- package/utils/selection-rect/package.json +1 -8
- package/utils/set-cell-attrs/package.json +1 -8
- package/utils/split-cell/package.json +1 -8
- package/utils/split-cell-with-type/package.json +1 -8
- package/utils/table-node-types/package.json +1 -8
- package/utils/tables/package.json +1 -8
- package/utils/toggle-header/package.json +1 -8
- package/utils/uuid/package.json +1 -8
- package/dist/types-ts4.5/cell-bookmark.d.ts +0 -11
- package/dist/types-ts4.5/cell-selection.d.ts +0 -27
- package/dist/types-ts4.5/entry-points/cell-bookmark.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/cell-selection.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/pm-plugins-plugin-key.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/pm-plugins-table-editing.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/table-map.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/types.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-add-column-at.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-add-column.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-add-row-at.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-add-row.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-analytics-helpers.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-cells.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-clone-column.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-clone-row.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-clone-tr.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-colspan.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-create-table.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-draw-cell-selection.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-empty-cells.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-find.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-fix-tables.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-for-each-cell.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-get-cell-selection-ranges.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-get-cells-in-column.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-get-cells-in-row.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-get-cells-in-table.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-get-selection-range-in-column.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-get-selection-range-in-row.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-get-selection-rect.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-go-to-next-cell.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-handle-paste.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-is-selected.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-is-selection-type.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-move-column.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-move-row.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-normalize-selection.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-remove-column.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-remove-row.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-remove-table.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-reorder-utils.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-replace-table.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-select-nodes.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-selection-cell.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-selection-rect.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/utils-set-cell-attrs.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-split-cell-with-type.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-split-cell.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-table-node-types.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-tables.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-toggle-header.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils-uuid.d.ts +0 -1
- package/dist/types-ts4.5/index.d.ts +0 -27
- package/dist/types-ts4.5/pm-plugins/input.d.ts +0 -4
- package/dist/types-ts4.5/pm-plugins/plugin-key.d.ts +0 -3
- package/dist/types-ts4.5/pm-plugins/table-editing.d.ts +0 -8
- package/dist/types-ts4.5/pm-plugins.d.ts +0 -2
- package/dist/types-ts4.5/table-map.d.ts +0 -71
- package/dist/types-ts4.5/types.d.ts +0 -49
- package/dist/types-ts4.5/utils/add-column-at.d.ts +0 -2
- package/dist/types-ts4.5/utils/add-column.d.ts +0 -5
- package/dist/types-ts4.5/utils/add-row-at.d.ts +0 -3
- package/dist/types-ts4.5/utils/add-row.d.ts +0 -3
- package/dist/types-ts4.5/utils/analyse-table.d.ts +0 -7
- package/dist/types-ts4.5/utils/analytics-helpers.d.ts +0 -16
- package/dist/types-ts4.5/utils/cells.d.ts +0 -7
- package/dist/types-ts4.5/utils/clone-column.d.ts +0 -3
- package/dist/types-ts4.5/utils/clone-row.d.ts +0 -3
- package/dist/types-ts4.5/utils/clone-tr.d.ts +0 -2
- package/dist/types-ts4.5/utils/colspan.d.ts +0 -4
- package/dist/types-ts4.5/utils/copy-paste.d.ts +0 -9
- package/dist/types-ts4.5/utils/create-table.d.ts +0 -12
- package/dist/types-ts4.5/utils/draw-cell-selection.d.ts +0 -3
- package/dist/types-ts4.5/utils/empty-cells.d.ts +0 -4
- package/dist/types-ts4.5/utils/find.d.ts +0 -8
- package/dist/types-ts4.5/utils/fix-tables.d.ts +0 -9
- package/dist/types-ts4.5/utils/for-each-cell.d.ts +0 -4
- package/dist/types-ts4.5/utils/get-cell-selection-ranges.d.ts +0 -3
- package/dist/types-ts4.5/utils/get-cells-in-column.d.ts +0 -3
- package/dist/types-ts4.5/utils/get-cells-in-row.d.ts +0 -3
- package/dist/types-ts4.5/utils/get-cells-in-table.d.ts +0 -3
- package/dist/types-ts4.5/utils/get-selection-range-in-column.d.ts +0 -3
- package/dist/types-ts4.5/utils/get-selection-range-in-row.d.ts +0 -3
- package/dist/types-ts4.5/utils/get-selection-rect.d.ts +0 -3
- package/dist/types-ts4.5/utils/go-to-next-cell.d.ts +0 -2
- package/dist/types-ts4.5/utils/handle-paste.d.ts +0 -7
- package/dist/types-ts4.5/utils/is-selected.d.ts +0 -6
- package/dist/types-ts4.5/utils/is-selection-type.d.ts +0 -11
- package/dist/types-ts4.5/utils/move-column.d.ts +0 -3
- package/dist/types-ts4.5/utils/move-row.d.ts +0 -3
- package/dist/types-ts4.5/utils/normalize-direction.d.ts +0 -2
- package/dist/types-ts4.5/utils/normalize-selection.d.ts +0 -2
- package/dist/types-ts4.5/utils/remove-column.d.ts +0 -5
- package/dist/types-ts4.5/utils/remove-row.d.ts +0 -5
- package/dist/types-ts4.5/utils/remove-table.d.ts +0 -2
- package/dist/types-ts4.5/utils/reorder-utils.d.ts +0 -10
- package/dist/types-ts4.5/utils/replace-table.d.ts +0 -3
- package/dist/types-ts4.5/utils/select-nodes.d.ts +0 -10
- package/dist/types-ts4.5/utils/selection-cell.d.ts +0 -3
- package/dist/types-ts4.5/utils/selection-rect.d.ts +0 -4
- package/dist/types-ts4.5/utils/set-cell-attrs.d.ts +0 -4
- package/dist/types-ts4.5/utils/split-cell-with-type.d.ts +0 -12
- package/dist/types-ts4.5/utils/split-cell.d.ts +0 -2
- package/dist/types-ts4.5/utils/table-node-types.d.ts +0 -5
- package/dist/types-ts4.5/utils/tables.d.ts +0 -4
- package/dist/types-ts4.5/utils/test-utils.d.ts +0 -5
- package/dist/types-ts4.5/utils/toggle-header.d.ts +0 -6
- package/dist/types-ts4.5/utils/uuid.d.ts +0 -9
- package/dist/types-ts4.5/utils.d.ts +0 -45
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import { TableMap } from '../table-map';
|
|
3
|
-
import { findTable } from './find';
|
|
4
|
-
export declare function getSelectedTableInfo(selection: Selection): {
|
|
5
|
-
map: TableMap | undefined;
|
|
6
|
-
table: ReturnType<typeof findTable> | undefined;
|
|
7
|
-
totalColumnCount: number;
|
|
8
|
-
totalRowCount: number;
|
|
9
|
-
};
|
|
10
|
-
export declare function getSelectedCellInfo(selection: Selection): {
|
|
11
|
-
totalRowCount: number;
|
|
12
|
-
totalColumnCount: number;
|
|
13
|
-
horizontalCells: number;
|
|
14
|
-
verticalCells: number;
|
|
15
|
-
totalCells: number;
|
|
16
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Node } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
import type { Axis } from '../types';
|
|
4
|
-
export declare function pointsAtCell($pos: ResolvedPos): false | Node | null;
|
|
5
|
-
export declare function cellNear($pos: ResolvedPos): ResolvedPos | null;
|
|
6
|
-
export declare function cellAround($pos: ResolvedPos): ResolvedPos | null;
|
|
7
|
-
export declare function nextCell($pos: ResolvedPos, axis: Axis, dir: number): ResolvedPos | null;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type { CloneOptions } from '../types';
|
|
3
|
-
export declare const cloneColumn: (state: EditorState, originColumnIndex: number | number[], targetColumnIndex: number, targetDirection: "start" | "end", options?: CloneOptions) => (tr: Transaction) => Transaction;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type { CloneOptions } from '../types';
|
|
3
|
-
export declare const cloneRow: (state: EditorState, originRowIndex: number | number[], targetRowIndex: number, targetDirection: "start" | "end", options?: CloneOptions) => (tr: Transaction) => Transaction;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { CellAttributes, CellAttributesWithColSpan } from '../types';
|
|
2
|
-
export declare function removeColSpan(attrs: CellAttributes, pos: number, n?: number): CellAttributes;
|
|
3
|
-
export declare function assertColspan(attrs: CellAttributes): void;
|
|
4
|
-
export declare function addColSpan<T extends CellAttributesWithColSpan>(attrs: T, pos: number, n?: number): T;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { NodeType, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import { Slice } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
import type { Rect } from '../table-map';
|
|
5
|
-
import type { CellSelectionRect, Dispatch } from '../types';
|
|
6
|
-
export declare function pastedCells(slice: Slice): CellSelectionRect | null;
|
|
7
|
-
export declare function fitSlice(nodeType: NodeType, slice: Slice): PMNode;
|
|
8
|
-
export declare function clipCells({ width: currentWidth, height: currentHeight, rows: currentRows }: CellSelectionRect, newWidth: number, newHeight: number): CellSelectionRect;
|
|
9
|
-
export declare function insertCells(state: EditorState, dispatch: Dispatch, tableStart: number, rect: Rect, cells: CellSelectionRect): void;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
type CreateTableProps = {
|
|
3
|
-
cellContent?: PMNode;
|
|
4
|
-
colsCount?: number;
|
|
5
|
-
layout?: string;
|
|
6
|
-
rowsCount?: number;
|
|
7
|
-
schema: Schema;
|
|
8
|
-
tableWidth?: number | 'inherit';
|
|
9
|
-
withHeaderRow?: boolean;
|
|
10
|
-
};
|
|
11
|
-
export declare const createTable: ({ schema, rowsCount, colsCount, withHeaderRow, cellContent, tableWidth, layout, }: CreateTableProps) => PMNode;
|
|
12
|
-
export {};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import type { NodeWithPos } from '@atlaskit/editor-prosemirror/utils';
|
|
4
|
-
export declare const emptyCell: (cell: NodeWithPos, schema: Schema) => (tr: Transaction) => Transaction;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import type { ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
|
|
4
|
-
import type { Rect } from '../table-map';
|
|
5
|
-
export declare const findTable: (selection: Selection) => ContentNodeWithPos | undefined;
|
|
6
|
-
export declare const findTableClosestToPos: ($pos: ResolvedPos) => ContentNodeWithPos | undefined;
|
|
7
|
-
export declare const findCellClosestToPos: ($pos: ResolvedPos) => ContentNodeWithPos | undefined;
|
|
8
|
-
export declare const findCellRectClosestToPos: ($pos: ResolvedPos) => Rect | undefined;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
export type ReportFixedTable = ({ state, tr, reason, }: {
|
|
4
|
-
reason: string;
|
|
5
|
-
state: EditorState;
|
|
6
|
-
tr: Transaction;
|
|
7
|
-
}) => void;
|
|
8
|
-
export declare function fixTables(state: EditorState, oldState?: EditorState, reportFixedTable?: ReportFixedTable): Transaction | undefined;
|
|
9
|
-
export declare function fixTable(state: EditorState, table: Node, tablePos: number, transaction?: Transaction, reportFixedTable?: ReportFixedTable): Transaction | undefined;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type { ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
|
|
3
|
-
export declare const forEachCellInColumn: (columnIndex: number, cellTransform: (cell: ContentNodeWithPos, tr: Transaction) => Transaction, setCursorToLastCell?: boolean) => (tr: Transaction) => Transaction;
|
|
4
|
-
export declare const forEachCellInRow: (rowIndex: number, cellTransform: (cell: ContentNodeWithPos, tr: Transaction) => Transaction, setCursorToLastCell: boolean) => (tr: Transaction) => Transaction;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type { ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
|
|
3
|
-
export declare const getCellsInColumn: (columnIndexes: number | number[]) => (selection: Selection) => ContentNodeWithPos[] | undefined;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type { ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
|
|
3
|
-
export declare const getCellsInRow: (rowIndex: number | number[]) => (selection: Selection) => ContentNodeWithPos[] | undefined;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Slice } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
type PasteOptions = {
|
|
4
|
-
pasteSource: string;
|
|
5
|
-
};
|
|
6
|
-
export declare function handlePaste(view: EditorView, _event: ClipboardEvent, slice: Slice, options?: PasteOptions): boolean;
|
|
7
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type { Rect } from '../table-map';
|
|
3
|
-
export declare const isRectSelected: (rect: Rect) => (selection: Selection) => boolean;
|
|
4
|
-
export declare const isColumnSelected: (columnIndex: number) => (selection: Selection) => boolean;
|
|
5
|
-
export declare const isRowSelected: (rowIndex: number) => (selection: Selection) => boolean;
|
|
6
|
-
export declare const isTableSelected: (selection: Selection) => boolean;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { NodeSelection, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
interface CellSelectionShape extends Selection {
|
|
4
|
-
$anchorCell: ResolvedPos;
|
|
5
|
-
$headCell: ResolvedPos;
|
|
6
|
-
visible: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare function isSelectionType(selection: Selection, type: 'cell'): selection is CellSelectionShape;
|
|
9
|
-
export declare function isSelectionType(selection: Selection, type: 'node'): selection is NodeSelection;
|
|
10
|
-
export declare function isSelectionType(selection: Selection, type: 'text'): selection is TextSelection;
|
|
11
|
-
export {};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type { MoveOptions } from '../types';
|
|
3
|
-
export declare const moveColumn: (state: EditorState, originColumnIndex: number | number[], targetColumnIndex: number, options?: MoveOptions) => (tr: Transaction) => Transaction;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type { MoveOptions } from '../types';
|
|
3
|
-
export declare const moveRow: (state: EditorState, originRowIndex: number | number[], targetRowIndex: number, options?: MoveOptions) => (tr: Transaction) => Transaction;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
export declare const removeColumnAt: (columnIndex: number) => (tr: Transaction) => Transaction;
|
|
4
|
-
export declare const removeSelectedColumns: (tr: Transaction) => Transaction;
|
|
5
|
-
export declare const removeColumnClosestToPos: ($pos: ResolvedPos) => (tr: Transaction) => Transaction;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
export declare const removeRowAt: (rowIndex: number) => (tr: Transaction) => Transaction;
|
|
4
|
-
export declare const removeSelectedRows: (tr: Transaction) => Transaction;
|
|
5
|
-
export declare const removeRowClosestToPos: ($pos: ResolvedPos) => (tr: Transaction) => Transaction;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { NodeWithPos } from '@atlaskit/editor-prosemirror/utils';
|
|
3
|
-
type ArrayOfRows = Array<PMNode | null>[];
|
|
4
|
-
export declare const transpose: (array: Array<any>) => Array<any>;
|
|
5
|
-
export declare const convertArrayOfRowsToTableNode: (tableNode: PMNode, arrayOfNodes: ArrayOfRows) => PMNode;
|
|
6
|
-
export declare const convertTableNodeToArrayOfRows: (tableNode: PMNode) => ArrayOfRows;
|
|
7
|
-
export declare const moveTableRow: (table: NodeWithPos, indexesOrigin: number[], indexesTarget: number[], direction: number) => PMNode;
|
|
8
|
-
export declare const moveTableColumn: (table: NodeWithPos, indexesOrigin: number[], indexesTarget: number[], direction: number) => PMNode;
|
|
9
|
-
export declare const isValidReorder: (originIndex: number, targetIndex: number, targets: number[], type: "row" | "column") => boolean;
|
|
10
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import { CellSelection } from '../cell-selection';
|
|
4
|
-
export declare const selectColumn: (index: number, expand?: boolean) => (tr: Transaction) => Transaction;
|
|
5
|
-
export declare const selectRow: (index: number, expand?: boolean) => (tr: Transaction) => Transaction;
|
|
6
|
-
export declare const selectRows: (indexes: number[]) => (tr: Transaction) => Transaction;
|
|
7
|
-
export declare const selectColumns: (indexes: number[]) => (tr: Transaction) => Transaction;
|
|
8
|
-
export declare const selectTable: (tr: Transaction) => Transaction;
|
|
9
|
-
export declare const getTableSelectionClosesToPos: ($pos: ResolvedPos) => CellSelection | undefined;
|
|
10
|
-
export declare const selectTableClosestToPos: (tr: Transaction, $pos: ResolvedPos) => Transaction;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type { NodeWithPos } from '@atlaskit/editor-prosemirror/utils';
|
|
3
|
-
import type { CellAttributes } from '../types';
|
|
4
|
-
export declare const setCellAttrs: (cell: NodeWithPos, attrs: CellAttributes) => (tr: Transaction) => Transaction;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { NodeType, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
import type { Command } from '../types';
|
|
4
|
-
export declare function cellWrapping($pos: ResolvedPos): PMNode | null;
|
|
5
|
-
export type GetCellTypeArgs = {
|
|
6
|
-
col: number;
|
|
7
|
-
node: PMNode;
|
|
8
|
-
row: number;
|
|
9
|
-
};
|
|
10
|
-
type GetCellTypeCallback = (option: GetCellTypeArgs) => NodeType;
|
|
11
|
-
export declare function splitCellWithType(getCellType: GetCellTypeCallback): Command;
|
|
12
|
-
export {};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
export declare function isInTable(state: EditorState): boolean;
|
|
4
|
-
export declare function inSameTable($a: ResolvedPos, $b: ResolvedPos): boolean;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { Command } from '../types';
|
|
2
|
-
import type { SelectionRect } from './selection-rect';
|
|
3
|
-
import type { TableNodeCache } from './table-node-types';
|
|
4
|
-
export type ToggleType = 'column' | 'row';
|
|
5
|
-
export declare function isHeaderEnabledByType(type: ToggleType, rect: SelectionRect, types: TableNodeCache): boolean;
|
|
6
|
-
export declare function toggleHeader(type: ToggleType): Command;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
export { addColumnAt } from './utils/add-column-at';
|
|
2
|
-
export { addColumn, columnIsHeader } from './utils/add-column';
|
|
3
|
-
export { addRowAt } from './utils/add-row-at';
|
|
4
|
-
export { addRow } from './utils/add-row';
|
|
5
|
-
export { pointsAtCell, cellNear, cellAround, nextCell } from './utils/cells';
|
|
6
|
-
export { cloneTr } from './utils/clone-tr';
|
|
7
|
-
export { removeColSpan, addColSpan } from './utils/colspan';
|
|
8
|
-
export { createTable } from './utils/create-table';
|
|
9
|
-
export { drawCellSelection } from './utils/draw-cell-selection';
|
|
10
|
-
export { emptyCell } from './utils/empty-cells';
|
|
11
|
-
export { findTable, findTableClosestToPos, findCellClosestToPos, findCellRectClosestToPos, } from './utils/find';
|
|
12
|
-
export { fixTables } from './utils/fix-tables';
|
|
13
|
-
export { forEachCellInColumn, forEachCellInRow } from './utils/for-each-cell';
|
|
14
|
-
export { getCellSelectionRanges } from './utils/get-cell-selection-ranges';
|
|
15
|
-
export { getCellsInColumn } from './utils/get-cells-in-column';
|
|
16
|
-
export { getCellsInRow } from './utils/get-cells-in-row';
|
|
17
|
-
export { getCellsInTable } from './utils/get-cells-in-table';
|
|
18
|
-
export { getSelectionRangeInColumn } from './utils/get-selection-range-in-column';
|
|
19
|
-
export { getSelectionRangeInRow } from './utils/get-selection-range-in-row';
|
|
20
|
-
export { getSelectionRect } from './utils/get-selection-rect';
|
|
21
|
-
export { goToNextCell } from './utils/go-to-next-cell';
|
|
22
|
-
export { isRectSelected, isColumnSelected, isRowSelected, isTableSelected, } from './utils/is-selected';
|
|
23
|
-
export { isSelectionType } from './utils/is-selection-type';
|
|
24
|
-
export { moveColumn } from './utils/move-column';
|
|
25
|
-
export { moveRow } from './utils/move-row';
|
|
26
|
-
export { cloneColumn } from './utils/clone-column';
|
|
27
|
-
export { cloneRow } from './utils/clone-row';
|
|
28
|
-
export { normalizeSelection } from './utils/normalize-selection';
|
|
29
|
-
export { removeColumnAt, removeSelectedColumns, removeColumnClosestToPos, } from './utils/remove-column';
|
|
30
|
-
export { removeRowAt, removeSelectedRows, removeRowClosestToPos } from './utils/remove-row';
|
|
31
|
-
export { removeTable } from './utils/remove-table';
|
|
32
|
-
export { getTableSelectionClosesToPos, selectColumn, selectColumns, selectRow, selectRows, selectTable, selectTableClosestToPos, } from './utils/select-nodes';
|
|
33
|
-
export { selectionCell } from './utils/selection-cell';
|
|
34
|
-
export { selectedRect } from './utils/selection-rect';
|
|
35
|
-
export type { SelectionRect } from './utils/selection-rect';
|
|
36
|
-
export { setCellAttrs } from './utils/set-cell-attrs';
|
|
37
|
-
export { cellWrapping, splitCellWithType } from './utils/split-cell-with-type';
|
|
38
|
-
export { splitCell } from './utils/split-cell';
|
|
39
|
-
export { tableNodeTypes } from './utils/table-node-types';
|
|
40
|
-
export { isInTable, inSameTable } from './utils/tables';
|
|
41
|
-
export { toggleHeader } from './utils/toggle-header';
|
|
42
|
-
export { convertArrayOfRowsToTableNode, convertTableNodeToArrayOfRows, } from './utils/reorder-utils';
|
|
43
|
-
export { handlePaste } from './utils/handle-paste';
|
|
44
|
-
export { replaceSelectedTable } from './utils/replace-table';
|
|
45
|
-
export { getSelectedTableInfo, getSelectedCellInfo } from './utils/analytics-helpers';
|