@atlaskit/editor-tables 2.10.22 → 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.
Files changed (165) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/cell-bookmark/package.json +1 -8
  3. package/cell-selection/package.json +1 -8
  4. package/package.json +2 -2
  5. package/pm-plugins/package.json +1 -8
  6. package/pm-plugins/plugin-key/package.json +1 -8
  7. package/pm-plugins/table-editing/package.json +1 -8
  8. package/table-map/package.json +1 -8
  9. package/types/package.json +1 -8
  10. package/utils/add-column/package.json +1 -8
  11. package/utils/add-column-at/package.json +1 -8
  12. package/utils/add-row/package.json +1 -8
  13. package/utils/add-row-at/package.json +1 -8
  14. package/utils/analytics-helpers/package.json +1 -8
  15. package/utils/cells/package.json +1 -8
  16. package/utils/clone-column/package.json +1 -8
  17. package/utils/clone-row/package.json +1 -8
  18. package/utils/clone-tr/package.json +1 -8
  19. package/utils/colspan/package.json +1 -8
  20. package/utils/create-table/package.json +1 -8
  21. package/utils/draw-cell-selection/package.json +1 -8
  22. package/utils/empty-cells/package.json +1 -8
  23. package/utils/find/package.json +1 -8
  24. package/utils/fix-tables/package.json +1 -8
  25. package/utils/for-each-cell/package.json +1 -8
  26. package/utils/get-cell-selection-ranges/package.json +1 -8
  27. package/utils/get-cells-in-column/package.json +1 -8
  28. package/utils/get-cells-in-row/package.json +1 -8
  29. package/utils/get-cells-in-table/package.json +1 -8
  30. package/utils/get-selection-range-in-column/package.json +1 -8
  31. package/utils/get-selection-range-in-row/package.json +1 -8
  32. package/utils/get-selection-rect/package.json +1 -8
  33. package/utils/go-to-next-cell/package.json +1 -8
  34. package/utils/handle-paste/package.json +1 -8
  35. package/utils/is-selected/package.json +1 -8
  36. package/utils/is-selection-type/package.json +1 -8
  37. package/utils/move-column/package.json +1 -8
  38. package/utils/move-row/package.json +1 -8
  39. package/utils/normalize-selection/package.json +1 -8
  40. package/utils/package.json +1 -8
  41. package/utils/remove-column/package.json +1 -8
  42. package/utils/remove-row/package.json +1 -8
  43. package/utils/remove-table/package.json +1 -8
  44. package/utils/reorder-utils/package.json +1 -8
  45. package/utils/replace-table/package.json +1 -8
  46. package/utils/select-nodes/package.json +1 -8
  47. package/utils/selection-cell/package.json +1 -8
  48. package/utils/selection-rect/package.json +1 -8
  49. package/utils/set-cell-attrs/package.json +1 -8
  50. package/utils/split-cell/package.json +1 -8
  51. package/utils/split-cell-with-type/package.json +1 -8
  52. package/utils/table-node-types/package.json +1 -8
  53. package/utils/tables/package.json +1 -8
  54. package/utils/toggle-header/package.json +1 -8
  55. package/utils/uuid/package.json +1 -8
  56. package/dist/types-ts4.5/cell-bookmark.d.ts +0 -11
  57. package/dist/types-ts4.5/cell-selection.d.ts +0 -27
  58. package/dist/types-ts4.5/entry-points/cell-bookmark.d.ts +0 -1
  59. package/dist/types-ts4.5/entry-points/cell-selection.d.ts +0 -1
  60. package/dist/types-ts4.5/entry-points/pm-plugins-plugin-key.d.ts +0 -1
  61. package/dist/types-ts4.5/entry-points/pm-plugins-table-editing.d.ts +0 -1
  62. package/dist/types-ts4.5/entry-points/table-map.d.ts +0 -2
  63. package/dist/types-ts4.5/entry-points/types.d.ts +0 -1
  64. package/dist/types-ts4.5/entry-points/utils-add-column-at.d.ts +0 -1
  65. package/dist/types-ts4.5/entry-points/utils-add-column.d.ts +0 -1
  66. package/dist/types-ts4.5/entry-points/utils-add-row-at.d.ts +0 -1
  67. package/dist/types-ts4.5/entry-points/utils-add-row.d.ts +0 -1
  68. package/dist/types-ts4.5/entry-points/utils-analytics-helpers.d.ts +0 -1
  69. package/dist/types-ts4.5/entry-points/utils-cells.d.ts +0 -1
  70. package/dist/types-ts4.5/entry-points/utils-clone-column.d.ts +0 -1
  71. package/dist/types-ts4.5/entry-points/utils-clone-row.d.ts +0 -1
  72. package/dist/types-ts4.5/entry-points/utils-clone-tr.d.ts +0 -1
  73. package/dist/types-ts4.5/entry-points/utils-colspan.d.ts +0 -1
  74. package/dist/types-ts4.5/entry-points/utils-create-table.d.ts +0 -1
  75. package/dist/types-ts4.5/entry-points/utils-draw-cell-selection.d.ts +0 -1
  76. package/dist/types-ts4.5/entry-points/utils-empty-cells.d.ts +0 -1
  77. package/dist/types-ts4.5/entry-points/utils-find.d.ts +0 -1
  78. package/dist/types-ts4.5/entry-points/utils-fix-tables.d.ts +0 -1
  79. package/dist/types-ts4.5/entry-points/utils-for-each-cell.d.ts +0 -1
  80. package/dist/types-ts4.5/entry-points/utils-get-cell-selection-ranges.d.ts +0 -1
  81. package/dist/types-ts4.5/entry-points/utils-get-cells-in-column.d.ts +0 -1
  82. package/dist/types-ts4.5/entry-points/utils-get-cells-in-row.d.ts +0 -1
  83. package/dist/types-ts4.5/entry-points/utils-get-cells-in-table.d.ts +0 -1
  84. package/dist/types-ts4.5/entry-points/utils-get-selection-range-in-column.d.ts +0 -1
  85. package/dist/types-ts4.5/entry-points/utils-get-selection-range-in-row.d.ts +0 -1
  86. package/dist/types-ts4.5/entry-points/utils-get-selection-rect.d.ts +0 -1
  87. package/dist/types-ts4.5/entry-points/utils-go-to-next-cell.d.ts +0 -1
  88. package/dist/types-ts4.5/entry-points/utils-handle-paste.d.ts +0 -1
  89. package/dist/types-ts4.5/entry-points/utils-is-selected.d.ts +0 -1
  90. package/dist/types-ts4.5/entry-points/utils-is-selection-type.d.ts +0 -1
  91. package/dist/types-ts4.5/entry-points/utils-move-column.d.ts +0 -1
  92. package/dist/types-ts4.5/entry-points/utils-move-row.d.ts +0 -1
  93. package/dist/types-ts4.5/entry-points/utils-normalize-selection.d.ts +0 -1
  94. package/dist/types-ts4.5/entry-points/utils-remove-column.d.ts +0 -1
  95. package/dist/types-ts4.5/entry-points/utils-remove-row.d.ts +0 -1
  96. package/dist/types-ts4.5/entry-points/utils-remove-table.d.ts +0 -1
  97. package/dist/types-ts4.5/entry-points/utils-reorder-utils.d.ts +0 -1
  98. package/dist/types-ts4.5/entry-points/utils-replace-table.d.ts +0 -1
  99. package/dist/types-ts4.5/entry-points/utils-select-nodes.d.ts +0 -1
  100. package/dist/types-ts4.5/entry-points/utils-selection-cell.d.ts +0 -1
  101. package/dist/types-ts4.5/entry-points/utils-selection-rect.d.ts +0 -2
  102. package/dist/types-ts4.5/entry-points/utils-set-cell-attrs.d.ts +0 -1
  103. package/dist/types-ts4.5/entry-points/utils-split-cell-with-type.d.ts +0 -1
  104. package/dist/types-ts4.5/entry-points/utils-split-cell.d.ts +0 -1
  105. package/dist/types-ts4.5/entry-points/utils-table-node-types.d.ts +0 -1
  106. package/dist/types-ts4.5/entry-points/utils-tables.d.ts +0 -1
  107. package/dist/types-ts4.5/entry-points/utils-toggle-header.d.ts +0 -1
  108. package/dist/types-ts4.5/entry-points/utils-uuid.d.ts +0 -1
  109. package/dist/types-ts4.5/index.d.ts +0 -27
  110. package/dist/types-ts4.5/pm-plugins/input.d.ts +0 -4
  111. package/dist/types-ts4.5/pm-plugins/plugin-key.d.ts +0 -3
  112. package/dist/types-ts4.5/pm-plugins/table-editing.d.ts +0 -8
  113. package/dist/types-ts4.5/pm-plugins.d.ts +0 -2
  114. package/dist/types-ts4.5/table-map.d.ts +0 -71
  115. package/dist/types-ts4.5/types.d.ts +0 -49
  116. package/dist/types-ts4.5/utils/add-column-at.d.ts +0 -2
  117. package/dist/types-ts4.5/utils/add-column.d.ts +0 -5
  118. package/dist/types-ts4.5/utils/add-row-at.d.ts +0 -3
  119. package/dist/types-ts4.5/utils/add-row.d.ts +0 -3
  120. package/dist/types-ts4.5/utils/analyse-table.d.ts +0 -7
  121. package/dist/types-ts4.5/utils/analytics-helpers.d.ts +0 -16
  122. package/dist/types-ts4.5/utils/cells.d.ts +0 -7
  123. package/dist/types-ts4.5/utils/clone-column.d.ts +0 -3
  124. package/dist/types-ts4.5/utils/clone-row.d.ts +0 -3
  125. package/dist/types-ts4.5/utils/clone-tr.d.ts +0 -2
  126. package/dist/types-ts4.5/utils/colspan.d.ts +0 -4
  127. package/dist/types-ts4.5/utils/copy-paste.d.ts +0 -9
  128. package/dist/types-ts4.5/utils/create-table.d.ts +0 -12
  129. package/dist/types-ts4.5/utils/draw-cell-selection.d.ts +0 -3
  130. package/dist/types-ts4.5/utils/empty-cells.d.ts +0 -4
  131. package/dist/types-ts4.5/utils/find.d.ts +0 -8
  132. package/dist/types-ts4.5/utils/fix-tables.d.ts +0 -9
  133. package/dist/types-ts4.5/utils/for-each-cell.d.ts +0 -4
  134. package/dist/types-ts4.5/utils/get-cell-selection-ranges.d.ts +0 -3
  135. package/dist/types-ts4.5/utils/get-cells-in-column.d.ts +0 -3
  136. package/dist/types-ts4.5/utils/get-cells-in-row.d.ts +0 -3
  137. package/dist/types-ts4.5/utils/get-cells-in-table.d.ts +0 -3
  138. package/dist/types-ts4.5/utils/get-selection-range-in-column.d.ts +0 -3
  139. package/dist/types-ts4.5/utils/get-selection-range-in-row.d.ts +0 -3
  140. package/dist/types-ts4.5/utils/get-selection-rect.d.ts +0 -3
  141. package/dist/types-ts4.5/utils/go-to-next-cell.d.ts +0 -2
  142. package/dist/types-ts4.5/utils/handle-paste.d.ts +0 -7
  143. package/dist/types-ts4.5/utils/is-selected.d.ts +0 -6
  144. package/dist/types-ts4.5/utils/is-selection-type.d.ts +0 -11
  145. package/dist/types-ts4.5/utils/move-column.d.ts +0 -3
  146. package/dist/types-ts4.5/utils/move-row.d.ts +0 -3
  147. package/dist/types-ts4.5/utils/normalize-direction.d.ts +0 -2
  148. package/dist/types-ts4.5/utils/normalize-selection.d.ts +0 -2
  149. package/dist/types-ts4.5/utils/remove-column.d.ts +0 -5
  150. package/dist/types-ts4.5/utils/remove-row.d.ts +0 -5
  151. package/dist/types-ts4.5/utils/remove-table.d.ts +0 -2
  152. package/dist/types-ts4.5/utils/reorder-utils.d.ts +0 -10
  153. package/dist/types-ts4.5/utils/replace-table.d.ts +0 -3
  154. package/dist/types-ts4.5/utils/select-nodes.d.ts +0 -10
  155. package/dist/types-ts4.5/utils/selection-cell.d.ts +0 -3
  156. package/dist/types-ts4.5/utils/selection-rect.d.ts +0 -4
  157. package/dist/types-ts4.5/utils/set-cell-attrs.d.ts +0 -4
  158. package/dist/types-ts4.5/utils/split-cell-with-type.d.ts +0 -12
  159. package/dist/types-ts4.5/utils/split-cell.d.ts +0 -2
  160. package/dist/types-ts4.5/utils/table-node-types.d.ts +0 -5
  161. package/dist/types-ts4.5/utils/tables.d.ts +0 -4
  162. package/dist/types-ts4.5/utils/test-utils.d.ts +0 -5
  163. package/dist/types-ts4.5/utils/toggle-header.d.ts +0 -6
  164. package/dist/types-ts4.5/utils/uuid.d.ts +0 -9
  165. 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,2 +0,0 @@
1
- import type { Transaction } from '@atlaskit/editor-prosemirror/state';
2
- export declare const cloneTr: (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,3 +0,0 @@
1
- import type { EditorState } from '@atlaskit/editor-prosemirror/state';
2
- import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
3
- export declare function drawCellSelection(state: EditorState): DecorationSet | null;
@@ -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 { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
- import { SelectionRange } from '@atlaskit/editor-prosemirror/state';
3
- export declare function getCellSelectionRanges($anchorCell: ResolvedPos, $headCell: ResolvedPos): SelectionRange[];
@@ -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,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 getCellsInTable: (selection: Selection) => ContentNodeWithPos[] | undefined;
@@ -1,3 +0,0 @@
1
- import type { Transaction } from '@atlaskit/editor-prosemirror/state';
2
- import type { SelectionRange } from '../types';
3
- export declare const getSelectionRangeInColumn: (startColIndex: number, endColIndex?: number) => (tr: Transaction) => SelectionRange | undefined;
@@ -1,3 +0,0 @@
1
- import type { Transaction } from '@atlaskit/editor-prosemirror/state';
2
- import type { SelectionRange } from '../types';
3
- export declare const getSelectionRangeInRow: (startRowIndex: number, endRowIndex?: number) => (tr: Transaction) => SelectionRange | undefined;
@@ -1,3 +0,0 @@
1
- import type { Selection } from '@atlaskit/editor-prosemirror/state';
2
- import type { Rect } from '../table-map';
3
- export declare const getSelectionRect: (selection: Selection) => Rect | undefined;
@@ -1,2 +0,0 @@
1
- import type { Command, Direction } from '../types';
2
- export declare function goToNextCell(direction: Direction): Command;
@@ -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,2 +0,0 @@
1
- import type { MoveOptions } from '../types';
2
- export declare function normalizeDirection(origin: number, target: number, options?: MoveOptions): 'start' | 'end';
@@ -1,2 +0,0 @@
1
- import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
2
- export declare function normalizeSelection(state: EditorState, transaction?: Transaction, allowTableNodeSelection?: boolean): Transaction | undefined;
@@ -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,2 +0,0 @@
1
- import type { Transaction } from '@atlaskit/editor-prosemirror/state';
2
- export declare const removeTable: (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,3 +0,0 @@
1
- import { Slice } from '@atlaskit/editor-prosemirror/model';
2
- import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
3
- export declare const replaceSelectedTable: (state: EditorState, content: string | Slice) => Transaction;
@@ -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,3 +0,0 @@
1
- import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
- import type { Selection } from '@atlaskit/editor-prosemirror/state';
3
- export declare function selectionCell(selection: Selection): ResolvedPos | null;
@@ -1,4 +0,0 @@
1
- import type { EditorState } from '@atlaskit/editor-prosemirror/state';
2
- import type { Rect, TableContext } from '../table-map';
3
- export type SelectionRect = Rect & TableContext;
4
- export declare function selectedRect(state: EditorState): SelectionRect;
@@ -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,2 +0,0 @@
1
- import type { Command } from '../types';
2
- export declare const splitCell: Command;
@@ -1,5 +0,0 @@
1
- import type { NodeType, Schema } from '@atlaskit/editor-prosemirror/model';
2
- export type TableNodeCache = {
3
- [key: string]: NodeType;
4
- };
5
- export declare function tableNodeTypes(schema: Schema): TableNodeCache;
@@ -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,5 +0,0 @@
1
- import type { Command } from '../types';
2
- export declare const addRowBefore: Command;
3
- export declare const addRowAfter: Command;
4
- export declare const addColumnBefore: Command;
5
- export declare const addColumnAfter: Command;
@@ -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,9 +0,0 @@
1
- /**
2
- * Direct copy from adf-schema to kill circular dependency without pulling into
3
- * a new package
4
- */
5
- export declare const generateUuid: () => string;
6
- export declare const uuid: {
7
- setStatic(value: string | false): void;
8
- generate(): string;
9
- };
@@ -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';