@atlaskit/editor-tables 2.9.54 → 2.9.56

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 (74) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/es2019/utils/find.js +0 -1
  3. package/dist/esm/utils/find.js +0 -1
  4. package/dist/types/cell-bookmark.d.ts +4 -3
  5. package/dist/types/cell-selection.d.ts +6 -4
  6. package/dist/types/utils/analytics-helpers.d.ts +1 -1
  7. package/dist/types/utils/cells.d.ts +3 -2
  8. package/dist/types/utils/clone-tr.d.ts +1 -1
  9. package/dist/types/utils/colspan.d.ts +1 -1
  10. package/dist/types/utils/draw-cell-selection.d.ts +1 -1
  11. package/dist/types/utils/empty-cells.d.ts +3 -3
  12. package/dist/types/utils/find.d.ts +4 -4
  13. package/dist/types/utils/fix-tables.d.ts +2 -2
  14. package/dist/types/utils/for-each-cell.d.ts +2 -2
  15. package/dist/types/utils/get-cell-selection-ranges.d.ts +1 -1
  16. package/dist/types/utils/get-cells-in-column.d.ts +2 -2
  17. package/dist/types/utils/get-cells-in-row.d.ts +2 -2
  18. package/dist/types/utils/get-cells-in-table.d.ts +2 -2
  19. package/dist/types/utils/get-selection-rect.d.ts +2 -2
  20. package/dist/types/utils/go-to-next-cell.d.ts +1 -1
  21. package/dist/types/utils/handle-paste.d.ts +2 -2
  22. package/dist/types/utils/is-selected.d.ts +2 -2
  23. package/dist/types/utils/is-selection-type.d.ts +2 -2
  24. package/dist/types/utils/normalize-selection.d.ts +1 -1
  25. package/dist/types/utils/remove-column.d.ts +2 -2
  26. package/dist/types/utils/remove-row.d.ts +2 -2
  27. package/dist/types/utils/remove-table.d.ts +1 -1
  28. package/dist/types/utils/reorder-utils.d.ts +2 -2
  29. package/dist/types/utils/replace-table.d.ts +1 -1
  30. package/dist/types/utils/selection-cell.d.ts +2 -2
  31. package/dist/types/utils/selection-rect.d.ts +2 -2
  32. package/dist/types/utils/set-cell-attrs.d.ts +3 -3
  33. package/dist/types/utils/split-cell-with-type.d.ts +3 -2
  34. package/dist/types/utils/split-cell.d.ts +1 -1
  35. package/dist/types/utils/table-node-types.d.ts +1 -1
  36. package/dist/types/utils/tables.d.ts +2 -2
  37. package/dist/types/utils/test-utils.d.ts +1 -1
  38. package/dist/types/utils/toggle-header.d.ts +3 -3
  39. package/dist/types-ts4.5/cell-bookmark.d.ts +4 -3
  40. package/dist/types-ts4.5/cell-selection.d.ts +6 -4
  41. package/dist/types-ts4.5/utils/analytics-helpers.d.ts +1 -1
  42. package/dist/types-ts4.5/utils/cells.d.ts +3 -2
  43. package/dist/types-ts4.5/utils/clone-tr.d.ts +1 -1
  44. package/dist/types-ts4.5/utils/colspan.d.ts +1 -1
  45. package/dist/types-ts4.5/utils/draw-cell-selection.d.ts +1 -1
  46. package/dist/types-ts4.5/utils/empty-cells.d.ts +3 -3
  47. package/dist/types-ts4.5/utils/find.d.ts +4 -4
  48. package/dist/types-ts4.5/utils/fix-tables.d.ts +2 -2
  49. package/dist/types-ts4.5/utils/for-each-cell.d.ts +2 -2
  50. package/dist/types-ts4.5/utils/get-cell-selection-ranges.d.ts +1 -1
  51. package/dist/types-ts4.5/utils/get-cells-in-column.d.ts +2 -2
  52. package/dist/types-ts4.5/utils/get-cells-in-row.d.ts +2 -2
  53. package/dist/types-ts4.5/utils/get-cells-in-table.d.ts +2 -2
  54. package/dist/types-ts4.5/utils/get-selection-rect.d.ts +2 -2
  55. package/dist/types-ts4.5/utils/go-to-next-cell.d.ts +1 -1
  56. package/dist/types-ts4.5/utils/handle-paste.d.ts +2 -2
  57. package/dist/types-ts4.5/utils/is-selected.d.ts +2 -2
  58. package/dist/types-ts4.5/utils/is-selection-type.d.ts +2 -2
  59. package/dist/types-ts4.5/utils/normalize-selection.d.ts +1 -1
  60. package/dist/types-ts4.5/utils/remove-column.d.ts +2 -2
  61. package/dist/types-ts4.5/utils/remove-row.d.ts +2 -2
  62. package/dist/types-ts4.5/utils/remove-table.d.ts +1 -1
  63. package/dist/types-ts4.5/utils/reorder-utils.d.ts +2 -2
  64. package/dist/types-ts4.5/utils/replace-table.d.ts +1 -1
  65. package/dist/types-ts4.5/utils/selection-cell.d.ts +2 -2
  66. package/dist/types-ts4.5/utils/selection-rect.d.ts +2 -2
  67. package/dist/types-ts4.5/utils/set-cell-attrs.d.ts +3 -3
  68. package/dist/types-ts4.5/utils/split-cell-with-type.d.ts +3 -2
  69. package/dist/types-ts4.5/utils/split-cell.d.ts +1 -1
  70. package/dist/types-ts4.5/utils/table-node-types.d.ts +1 -1
  71. package/dist/types-ts4.5/utils/tables.d.ts +2 -2
  72. package/dist/types-ts4.5/utils/test-utils.d.ts +1 -1
  73. package/dist/types-ts4.5/utils/toggle-header.d.ts +3 -3
  74. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @atlaskit/editor-tables
2
2
 
3
+ ## 2.9.56
4
+
5
+ ### Patch Changes
6
+
7
+ - [`5221db0d676ef`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5221db0d676ef) -
8
+ Mechanical type-import autofix for tables, collab, and synchrony packages.
9
+
10
+ ## 2.9.55
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
3
16
  ## 2.9.54
4
17
 
5
18
  ### Patch Changes
@@ -1,6 +1,5 @@
1
1
  import { findParentNode, findParentNodeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
2
2
  import { TableMap } from '../table-map';
3
-
4
3
  // Iterates over parent nodes, returning the closest table node.
5
4
  export const findTable = selection => findParentNode(node => node.type.spec.tableRole && node.type.spec.tableRole === 'table')(selection);
6
5
 
@@ -1,6 +1,5 @@
1
1
  import { findParentNode, findParentNodeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
2
2
  import { TableMap } from '../table-map';
3
-
4
3
  // Iterates over parent nodes, returning the closest table node.
5
4
  export var findTable = function findTable(selection) {
6
5
  return findParentNode(function (node) {
@@ -1,6 +1,7 @@
1
- import { type Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
- import { Selection, type SelectionBookmark } from '@atlaskit/editor-prosemirror/state';
3
- import { type Mappable } from '@atlaskit/editor-prosemirror/transform';
1
+ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
+ import { Selection } from '@atlaskit/editor-prosemirror/state';
3
+ import type { SelectionBookmark } from '@atlaskit/editor-prosemirror/state';
4
+ import type { Mappable } from '@atlaskit/editor-prosemirror/transform';
4
5
  export declare class CellBookmark implements SelectionBookmark {
5
6
  readonly anchor: number;
6
7
  readonly head: number;
@@ -1,8 +1,10 @@
1
- import { type Node as PMNode, type ResolvedPos, Slice } from '@atlaskit/editor-prosemirror/model';
2
- import { Selection, type Transaction } from '@atlaskit/editor-prosemirror/state';
3
- import { type Mapping } from '@atlaskit/editor-prosemirror/transform';
1
+ import { Slice } from '@atlaskit/editor-prosemirror/model';
2
+ import type { Node as PMNode, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
3
+ import { Selection } from '@atlaskit/editor-prosemirror/state';
4
+ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
5
+ import type { Mapping } from '@atlaskit/editor-prosemirror/transform';
4
6
  import { CellBookmark } from './cell-bookmark';
5
- import { type SerializedCellSelection } from './types';
7
+ import type { SerializedCellSelection } from './types';
6
8
  export declare class CellSelection extends Selection {
7
9
  readonly $anchorCell: ResolvedPos;
8
10
  readonly $headCell: ResolvedPos;
@@ -1,4 +1,4 @@
1
- import { type Selection } from '@atlaskit/editor-prosemirror/state';
1
+ import type { Selection } from '@atlaskit/editor-prosemirror/state';
2
2
  import { TableMap } from '../table-map';
3
3
  import { findTable } from './find';
4
4
  export declare function getSelectedTableInfo(selection: Selection): {
@@ -1,5 +1,6 @@
1
- import { Node, type ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
- import { type Axis } from '../types';
1
+ import { Node } from '@atlaskit/editor-prosemirror/model';
2
+ import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
3
+ import type { Axis } from '../types';
3
4
  export declare function pointsAtCell($pos: ResolvedPos): false | Node | null;
4
5
  export declare function cellNear($pos: ResolvedPos): ResolvedPos | null;
5
6
  export declare function cellAround($pos: ResolvedPos): ResolvedPos | null;
@@ -1,2 +1,2 @@
1
- import { type Transaction } from '@atlaskit/editor-prosemirror/state';
1
+ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
2
2
  export declare const cloneTr: (tr: Transaction) => Transaction;
@@ -1,4 +1,4 @@
1
- import { type CellAttributes, type CellAttributesWithColSpan } from '../types';
1
+ import type { CellAttributes, CellAttributesWithColSpan } from '../types';
2
2
  export declare function removeColSpan(attrs: CellAttributes, pos: number, n?: number): CellAttributes;
3
3
  export declare function assertColspan(attrs: CellAttributes): void;
4
4
  export declare function addColSpan<T extends CellAttributesWithColSpan>(attrs: T, pos: number, n?: number): T;
@@ -1,3 +1,3 @@
1
- import { type EditorState } from '@atlaskit/editor-prosemirror/state';
1
+ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
2
2
  import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
3
3
  export declare function drawCellSelection(state: EditorState): DecorationSet | null;
@@ -1,4 +1,4 @@
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';
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
4
  export declare const emptyCell: (cell: NodeWithPos, schema: Schema) => (tr: Transaction) => Transaction;
@@ -1,7 +1,7 @@
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';
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
5
  export declare const findTable: (selection: Selection) => ContentNodeWithPos | undefined;
6
6
  export declare const findTableClosestToPos: ($pos: ResolvedPos) => ContentNodeWithPos | undefined;
7
7
  export declare const findCellClosestToPos: ($pos: ResolvedPos) => ContentNodeWithPos | undefined;
@@ -1,5 +1,5 @@
1
- import { type Node } from '@atlaskit/editor-prosemirror/model';
2
- import { type EditorState, type Transaction } from '@atlaskit/editor-prosemirror/state';
1
+ import type { Node } from '@atlaskit/editor-prosemirror/model';
2
+ import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
3
3
  export type ReportFixedTable = ({ state, tr, reason, }: {
4
4
  reason: string;
5
5
  state: EditorState;
@@ -1,4 +1,4 @@
1
- import { type Transaction } from '@atlaskit/editor-prosemirror/state';
2
- import { type ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
1
+ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
2
+ import type { ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
3
3
  export declare const forEachCellInColumn: (columnIndex: number, cellTransform: (cell: ContentNodeWithPos, tr: Transaction) => Transaction, setCursorToLastCell?: boolean) => (tr: Transaction) => Transaction;
4
4
  export declare const forEachCellInRow: (rowIndex: number, cellTransform: (cell: ContentNodeWithPos, tr: Transaction) => Transaction, setCursorToLastCell: boolean) => (tr: Transaction) => Transaction;
@@ -1,3 +1,3 @@
1
- import { type ResolvedPos } from '@atlaskit/editor-prosemirror/model';
1
+ import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
2
  import { SelectionRange } from '@atlaskit/editor-prosemirror/state';
3
3
  export declare function getCellSelectionRanges($anchorCell: ResolvedPos, $headCell: ResolvedPos): SelectionRange[];
@@ -1,3 +1,3 @@
1
- import { type Selection } from '@atlaskit/editor-prosemirror/state';
2
- import { type ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
1
+ import type { Selection } from '@atlaskit/editor-prosemirror/state';
2
+ import type { ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
3
3
  export declare const getCellsInColumn: (columnIndexes: number | number[]) => (selection: Selection) => ContentNodeWithPos[] | undefined;
@@ -1,3 +1,3 @@
1
- import { type Selection } from '@atlaskit/editor-prosemirror/state';
2
- import { type ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
1
+ import type { Selection } from '@atlaskit/editor-prosemirror/state';
2
+ import type { ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
3
3
  export declare const getCellsInRow: (rowIndex: number | number[]) => (selection: Selection) => ContentNodeWithPos[] | undefined;
@@ -1,3 +1,3 @@
1
- import { type Selection } from '@atlaskit/editor-prosemirror/state';
2
- import { type ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
1
+ import type { Selection } from '@atlaskit/editor-prosemirror/state';
2
+ import type { ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
3
3
  export declare const getCellsInTable: (selection: Selection) => ContentNodeWithPos[] | undefined;
@@ -1,3 +1,3 @@
1
- import { type Selection } from '@atlaskit/editor-prosemirror/state';
2
- import { type Rect } from '../table-map';
1
+ import type { Selection } from '@atlaskit/editor-prosemirror/state';
2
+ import type { Rect } from '../table-map';
3
3
  export declare const getSelectionRect: (selection: Selection) => Rect | undefined;
@@ -1,2 +1,2 @@
1
- import { type Command, type Direction } from '../types';
1
+ import type { Command, Direction } from '../types';
2
2
  export declare function goToNextCell(direction: Direction): Command;
@@ -1,5 +1,5 @@
1
- import { type Slice } from '@atlaskit/editor-prosemirror/model';
2
- import { type EditorView } from '@atlaskit/editor-prosemirror/view';
1
+ import type { Slice } from '@atlaskit/editor-prosemirror/model';
2
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
3
  type PasteOptions = {
4
4
  pasteSource: string;
5
5
  };
@@ -1,5 +1,5 @@
1
- import { type Selection } from '@atlaskit/editor-prosemirror/state';
2
- import { type Rect } from '../table-map';
1
+ import type { Selection } from '@atlaskit/editor-prosemirror/state';
2
+ import type { Rect } from '../table-map';
3
3
  export declare const isRectSelected: (rect: Rect) => (selection: Selection) => boolean;
4
4
  export declare const isColumnSelected: (columnIndex: number) => (selection: Selection) => boolean;
5
5
  export declare const isRowSelected: (rowIndex: number) => (selection: Selection) => boolean;
@@ -1,5 +1,5 @@
1
- import { type ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
- import { type NodeSelection, type Selection, type TextSelection } from '@atlaskit/editor-prosemirror/state';
1
+ import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
+ import type { NodeSelection, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
3
3
  interface CellSelectionShape extends Selection {
4
4
  $anchorCell: ResolvedPos;
5
5
  $headCell: ResolvedPos;
@@ -1,2 +1,2 @@
1
- import { type EditorState, type Transaction } from '@atlaskit/editor-prosemirror/state';
1
+ import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
2
2
  export declare function normalizeSelection(state: EditorState, transaction?: Transaction, allowTableNodeSelection?: boolean): Transaction | undefined;
@@ -1,5 +1,5 @@
1
- import { type ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
- import { type Transaction } from '@atlaskit/editor-prosemirror/state';
1
+ import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
+ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
3
3
  export declare const removeColumnAt: (columnIndex: number) => (tr: Transaction) => Transaction;
4
4
  export declare const removeSelectedColumns: (tr: Transaction) => Transaction;
5
5
  export declare const removeColumnClosestToPos: ($pos: ResolvedPos) => (tr: Transaction) => Transaction;
@@ -1,5 +1,5 @@
1
- import { type ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
- import { type Transaction } from '@atlaskit/editor-prosemirror/state';
1
+ import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
+ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
3
3
  export declare const removeRowAt: (rowIndex: number) => (tr: Transaction) => Transaction;
4
4
  export declare const removeSelectedRows: (tr: Transaction) => Transaction;
5
5
  export declare const removeRowClosestToPos: ($pos: ResolvedPos) => (tr: Transaction) => Transaction;
@@ -1,2 +1,2 @@
1
- import { type Transaction } from '@atlaskit/editor-prosemirror/state';
1
+ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
2
2
  export declare const removeTable: (tr: Transaction) => Transaction;
@@ -1,5 +1,5 @@
1
- import { type Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
- import { type NodeWithPos } from '@atlaskit/editor-prosemirror/utils';
1
+ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
+ import type { NodeWithPos } from '@atlaskit/editor-prosemirror/utils';
3
3
  type ArrayOfRows = Array<PMNode | null>[];
4
4
  export declare const transpose: (array: Array<any>) => Array<any>;
5
5
  export declare const convertArrayOfRowsToTableNode: (tableNode: PMNode, arrayOfNodes: ArrayOfRows) => PMNode;
@@ -1,3 +1,3 @@
1
1
  import { Slice } from '@atlaskit/editor-prosemirror/model';
2
- import { type EditorState, type Transaction } from '@atlaskit/editor-prosemirror/state';
2
+ import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
3
3
  export declare const replaceSelectedTable: (state: EditorState, content: string | Slice) => Transaction;
@@ -1,3 +1,3 @@
1
- import { type ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
- import { type Selection } from '@atlaskit/editor-prosemirror/state';
1
+ import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
+ import type { Selection } from '@atlaskit/editor-prosemirror/state';
3
3
  export declare function selectionCell(selection: Selection): ResolvedPos | null;
@@ -1,4 +1,4 @@
1
- import { type EditorState } from '@atlaskit/editor-prosemirror/state';
2
- import { type Rect, type TableContext } from '../table-map';
1
+ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
2
+ import type { Rect, TableContext } from '../table-map';
3
3
  export type SelectionRect = Rect & TableContext;
4
4
  export declare function selectedRect(state: EditorState): SelectionRect;
@@ -1,4 +1,4 @@
1
- import { type Transaction } from '@atlaskit/editor-prosemirror/state';
2
- import { type NodeWithPos } from '@atlaskit/editor-prosemirror/utils';
3
- import { type CellAttributes } from '../types';
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
4
  export declare const setCellAttrs: (cell: NodeWithPos, attrs: CellAttributes) => (tr: Transaction) => Transaction;
@@ -1,5 +1,6 @@
1
- import { type NodeType, type Node as PMNode, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
- import { type Command } from '../types';
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';
3
4
  export declare function cellWrapping($pos: ResolvedPos): PMNode | null;
4
5
  export type GetCellTypeArgs = {
5
6
  col: number;
@@ -1,2 +1,2 @@
1
- import { type Command } from '../types';
1
+ import type { Command } from '../types';
2
2
  export declare const splitCell: Command;
@@ -1,4 +1,4 @@
1
- import { type NodeType, type Schema } from '@atlaskit/editor-prosemirror/model';
1
+ import type { NodeType, Schema } from '@atlaskit/editor-prosemirror/model';
2
2
  export type TableNodeCache = {
3
3
  [key: string]: NodeType;
4
4
  };
@@ -1,4 +1,4 @@
1
- import { type ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
- import { type EditorState } from '@atlaskit/editor-prosemirror/state';
1
+ import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
+ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
3
3
  export declare function isInTable(state: EditorState): boolean;
4
4
  export declare function inSameTable($a: ResolvedPos, $b: ResolvedPos): boolean;
@@ -1,4 +1,4 @@
1
- import { type Command } from '../types';
1
+ import type { Command } from '../types';
2
2
  export declare const addRowBefore: Command;
3
3
  export declare const addRowAfter: Command;
4
4
  export declare const addColumnBefore: Command;
@@ -1,6 +1,6 @@
1
- import { type Command } from '../types';
2
- import { type SelectionRect } from './selection-rect';
3
- import { type TableNodeCache } from './table-node-types';
1
+ import type { Command } from '../types';
2
+ import type { SelectionRect } from './selection-rect';
3
+ import type { TableNodeCache } from './table-node-types';
4
4
  export type ToggleType = 'column' | 'row';
5
5
  export declare function isHeaderEnabledByType(type: ToggleType, rect: SelectionRect, types: TableNodeCache): boolean;
6
6
  export declare function toggleHeader(type: ToggleType): Command;
@@ -1,6 +1,7 @@
1
- import { type Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
- import { Selection, type SelectionBookmark } from '@atlaskit/editor-prosemirror/state';
3
- import { type Mappable } from '@atlaskit/editor-prosemirror/transform';
1
+ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
+ import { Selection } from '@atlaskit/editor-prosemirror/state';
3
+ import type { SelectionBookmark } from '@atlaskit/editor-prosemirror/state';
4
+ import type { Mappable } from '@atlaskit/editor-prosemirror/transform';
4
5
  export declare class CellBookmark implements SelectionBookmark {
5
6
  readonly anchor: number;
6
7
  readonly head: number;
@@ -1,8 +1,10 @@
1
- import { type Node as PMNode, type ResolvedPos, Slice } from '@atlaskit/editor-prosemirror/model';
2
- import { Selection, type Transaction } from '@atlaskit/editor-prosemirror/state';
3
- import { type Mapping } from '@atlaskit/editor-prosemirror/transform';
1
+ import { Slice } from '@atlaskit/editor-prosemirror/model';
2
+ import type { Node as PMNode, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
3
+ import { Selection } from '@atlaskit/editor-prosemirror/state';
4
+ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
5
+ import type { Mapping } from '@atlaskit/editor-prosemirror/transform';
4
6
  import { CellBookmark } from './cell-bookmark';
5
- import { type SerializedCellSelection } from './types';
7
+ import type { SerializedCellSelection } from './types';
6
8
  export declare class CellSelection extends Selection {
7
9
  readonly $anchorCell: ResolvedPos;
8
10
  readonly $headCell: ResolvedPos;
@@ -1,4 +1,4 @@
1
- import { type Selection } from '@atlaskit/editor-prosemirror/state';
1
+ import type { Selection } from '@atlaskit/editor-prosemirror/state';
2
2
  import { TableMap } from '../table-map';
3
3
  import { findTable } from './find';
4
4
  export declare function getSelectedTableInfo(selection: Selection): {
@@ -1,5 +1,6 @@
1
- import { Node, type ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
- import { type Axis } from '../types';
1
+ import { Node } from '@atlaskit/editor-prosemirror/model';
2
+ import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
3
+ import type { Axis } from '../types';
3
4
  export declare function pointsAtCell($pos: ResolvedPos): false | Node | null;
4
5
  export declare function cellNear($pos: ResolvedPos): ResolvedPos | null;
5
6
  export declare function cellAround($pos: ResolvedPos): ResolvedPos | null;
@@ -1,2 +1,2 @@
1
- import { type Transaction } from '@atlaskit/editor-prosemirror/state';
1
+ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
2
2
  export declare const cloneTr: (tr: Transaction) => Transaction;
@@ -1,4 +1,4 @@
1
- import { type CellAttributes, type CellAttributesWithColSpan } from '../types';
1
+ import type { CellAttributes, CellAttributesWithColSpan } from '../types';
2
2
  export declare function removeColSpan(attrs: CellAttributes, pos: number, n?: number): CellAttributes;
3
3
  export declare function assertColspan(attrs: CellAttributes): void;
4
4
  export declare function addColSpan<T extends CellAttributesWithColSpan>(attrs: T, pos: number, n?: number): T;
@@ -1,3 +1,3 @@
1
- import { type EditorState } from '@atlaskit/editor-prosemirror/state';
1
+ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
2
2
  import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
3
3
  export declare function drawCellSelection(state: EditorState): DecorationSet | null;
@@ -1,4 +1,4 @@
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';
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
4
  export declare const emptyCell: (cell: NodeWithPos, schema: Schema) => (tr: Transaction) => Transaction;
@@ -1,7 +1,7 @@
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';
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
5
  export declare const findTable: (selection: Selection) => ContentNodeWithPos | undefined;
6
6
  export declare const findTableClosestToPos: ($pos: ResolvedPos) => ContentNodeWithPos | undefined;
7
7
  export declare const findCellClosestToPos: ($pos: ResolvedPos) => ContentNodeWithPos | undefined;
@@ -1,5 +1,5 @@
1
- import { type Node } from '@atlaskit/editor-prosemirror/model';
2
- import { type EditorState, type Transaction } from '@atlaskit/editor-prosemirror/state';
1
+ import type { Node } from '@atlaskit/editor-prosemirror/model';
2
+ import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
3
3
  export type ReportFixedTable = ({ state, tr, reason, }: {
4
4
  reason: string;
5
5
  state: EditorState;
@@ -1,4 +1,4 @@
1
- import { type Transaction } from '@atlaskit/editor-prosemirror/state';
2
- import { type ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
1
+ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
2
+ import type { ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
3
3
  export declare const forEachCellInColumn: (columnIndex: number, cellTransform: (cell: ContentNodeWithPos, tr: Transaction) => Transaction, setCursorToLastCell?: boolean) => (tr: Transaction) => Transaction;
4
4
  export declare const forEachCellInRow: (rowIndex: number, cellTransform: (cell: ContentNodeWithPos, tr: Transaction) => Transaction, setCursorToLastCell: boolean) => (tr: Transaction) => Transaction;
@@ -1,3 +1,3 @@
1
- import { type ResolvedPos } from '@atlaskit/editor-prosemirror/model';
1
+ import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
2
  import { SelectionRange } from '@atlaskit/editor-prosemirror/state';
3
3
  export declare function getCellSelectionRanges($anchorCell: ResolvedPos, $headCell: ResolvedPos): SelectionRange[];
@@ -1,3 +1,3 @@
1
- import { type Selection } from '@atlaskit/editor-prosemirror/state';
2
- import { type ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
1
+ import type { Selection } from '@atlaskit/editor-prosemirror/state';
2
+ import type { ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
3
3
  export declare const getCellsInColumn: (columnIndexes: number | number[]) => (selection: Selection) => ContentNodeWithPos[] | undefined;
@@ -1,3 +1,3 @@
1
- import { type Selection } from '@atlaskit/editor-prosemirror/state';
2
- import { type ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
1
+ import type { Selection } from '@atlaskit/editor-prosemirror/state';
2
+ import type { ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
3
3
  export declare const getCellsInRow: (rowIndex: number | number[]) => (selection: Selection) => ContentNodeWithPos[] | undefined;
@@ -1,3 +1,3 @@
1
- import { type Selection } from '@atlaskit/editor-prosemirror/state';
2
- import { type ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
1
+ import type { Selection } from '@atlaskit/editor-prosemirror/state';
2
+ import type { ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
3
3
  export declare const getCellsInTable: (selection: Selection) => ContentNodeWithPos[] | undefined;
@@ -1,3 +1,3 @@
1
- import { type Selection } from '@atlaskit/editor-prosemirror/state';
2
- import { type Rect } from '../table-map';
1
+ import type { Selection } from '@atlaskit/editor-prosemirror/state';
2
+ import type { Rect } from '../table-map';
3
3
  export declare const getSelectionRect: (selection: Selection) => Rect | undefined;
@@ -1,2 +1,2 @@
1
- import { type Command, type Direction } from '../types';
1
+ import type { Command, Direction } from '../types';
2
2
  export declare function goToNextCell(direction: Direction): Command;
@@ -1,5 +1,5 @@
1
- import { type Slice } from '@atlaskit/editor-prosemirror/model';
2
- import { type EditorView } from '@atlaskit/editor-prosemirror/view';
1
+ import type { Slice } from '@atlaskit/editor-prosemirror/model';
2
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
3
  type PasteOptions = {
4
4
  pasteSource: string;
5
5
  };
@@ -1,5 +1,5 @@
1
- import { type Selection } from '@atlaskit/editor-prosemirror/state';
2
- import { type Rect } from '../table-map';
1
+ import type { Selection } from '@atlaskit/editor-prosemirror/state';
2
+ import type { Rect } from '../table-map';
3
3
  export declare const isRectSelected: (rect: Rect) => (selection: Selection) => boolean;
4
4
  export declare const isColumnSelected: (columnIndex: number) => (selection: Selection) => boolean;
5
5
  export declare const isRowSelected: (rowIndex: number) => (selection: Selection) => boolean;
@@ -1,5 +1,5 @@
1
- import { type ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
- import { type NodeSelection, type Selection, type TextSelection } from '@atlaskit/editor-prosemirror/state';
1
+ import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
+ import type { NodeSelection, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
3
3
  interface CellSelectionShape extends Selection {
4
4
  $anchorCell: ResolvedPos;
5
5
  $headCell: ResolvedPos;
@@ -1,2 +1,2 @@
1
- import { type EditorState, type Transaction } from '@atlaskit/editor-prosemirror/state';
1
+ import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
2
2
  export declare function normalizeSelection(state: EditorState, transaction?: Transaction, allowTableNodeSelection?: boolean): Transaction | undefined;
@@ -1,5 +1,5 @@
1
- import { type ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
- import { type Transaction } from '@atlaskit/editor-prosemirror/state';
1
+ import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
+ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
3
3
  export declare const removeColumnAt: (columnIndex: number) => (tr: Transaction) => Transaction;
4
4
  export declare const removeSelectedColumns: (tr: Transaction) => Transaction;
5
5
  export declare const removeColumnClosestToPos: ($pos: ResolvedPos) => (tr: Transaction) => Transaction;
@@ -1,5 +1,5 @@
1
- import { type ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
- import { type Transaction } from '@atlaskit/editor-prosemirror/state';
1
+ import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
+ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
3
3
  export declare const removeRowAt: (rowIndex: number) => (tr: Transaction) => Transaction;
4
4
  export declare const removeSelectedRows: (tr: Transaction) => Transaction;
5
5
  export declare const removeRowClosestToPos: ($pos: ResolvedPos) => (tr: Transaction) => Transaction;
@@ -1,2 +1,2 @@
1
- import { type Transaction } from '@atlaskit/editor-prosemirror/state';
1
+ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
2
2
  export declare const removeTable: (tr: Transaction) => Transaction;
@@ -1,5 +1,5 @@
1
- import { type Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
- import { type NodeWithPos } from '@atlaskit/editor-prosemirror/utils';
1
+ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
+ import type { NodeWithPos } from '@atlaskit/editor-prosemirror/utils';
3
3
  type ArrayOfRows = Array<PMNode | null>[];
4
4
  export declare const transpose: (array: Array<any>) => Array<any>;
5
5
  export declare const convertArrayOfRowsToTableNode: (tableNode: PMNode, arrayOfNodes: ArrayOfRows) => PMNode;
@@ -1,3 +1,3 @@
1
1
  import { Slice } from '@atlaskit/editor-prosemirror/model';
2
- import { type EditorState, type Transaction } from '@atlaskit/editor-prosemirror/state';
2
+ import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
3
3
  export declare const replaceSelectedTable: (state: EditorState, content: string | Slice) => Transaction;
@@ -1,3 +1,3 @@
1
- import { type ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
- import { type Selection } from '@atlaskit/editor-prosemirror/state';
1
+ import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
+ import type { Selection } from '@atlaskit/editor-prosemirror/state';
3
3
  export declare function selectionCell(selection: Selection): ResolvedPos | null;
@@ -1,4 +1,4 @@
1
- import { type EditorState } from '@atlaskit/editor-prosemirror/state';
2
- import { type Rect, type TableContext } from '../table-map';
1
+ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
2
+ import type { Rect, TableContext } from '../table-map';
3
3
  export type SelectionRect = Rect & TableContext;
4
4
  export declare function selectedRect(state: EditorState): SelectionRect;
@@ -1,4 +1,4 @@
1
- import { type Transaction } from '@atlaskit/editor-prosemirror/state';
2
- import { type NodeWithPos } from '@atlaskit/editor-prosemirror/utils';
3
- import { type CellAttributes } from '../types';
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
4
  export declare const setCellAttrs: (cell: NodeWithPos, attrs: CellAttributes) => (tr: Transaction) => Transaction;
@@ -1,5 +1,6 @@
1
- import { type NodeType, type Node as PMNode, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
- import { type Command } from '../types';
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';
3
4
  export declare function cellWrapping($pos: ResolvedPos): PMNode | null;
4
5
  export type GetCellTypeArgs = {
5
6
  col: number;
@@ -1,2 +1,2 @@
1
- import { type Command } from '../types';
1
+ import type { Command } from '../types';
2
2
  export declare const splitCell: Command;
@@ -1,4 +1,4 @@
1
- import { type NodeType, type Schema } from '@atlaskit/editor-prosemirror/model';
1
+ import type { NodeType, Schema } from '@atlaskit/editor-prosemirror/model';
2
2
  export type TableNodeCache = {
3
3
  [key: string]: NodeType;
4
4
  };
@@ -1,4 +1,4 @@
1
- import { type ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
- import { type EditorState } from '@atlaskit/editor-prosemirror/state';
1
+ import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
+ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
3
3
  export declare function isInTable(state: EditorState): boolean;
4
4
  export declare function inSameTable($a: ResolvedPos, $b: ResolvedPos): boolean;
@@ -1,4 +1,4 @@
1
- import { type Command } from '../types';
1
+ import type { Command } from '../types';
2
2
  export declare const addRowBefore: Command;
3
3
  export declare const addRowAfter: Command;
4
4
  export declare const addColumnBefore: Command;
@@ -1,6 +1,6 @@
1
- import { type Command } from '../types';
2
- import { type SelectionRect } from './selection-rect';
3
- import { type TableNodeCache } from './table-node-types';
1
+ import type { Command } from '../types';
2
+ import type { SelectionRect } from './selection-rect';
3
+ import type { TableNodeCache } from './table-node-types';
4
4
  export type ToggleType = 'column' | 'row';
5
5
  export declare function isHeaderEnabledByType(type: ToggleType, rect: SelectionRect, types: TableNodeCache): boolean;
6
6
  export declare function toggleHeader(type: ToggleType): Command;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-tables",
3
- "version": "2.9.54",
3
+ "version": "2.9.56",
4
4
  "description": "A package that contains common classes and utility functions for editor tables",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -29,7 +29,7 @@
29
29
  "dependencies": {
30
30
  "@atlaskit/editor-prosemirror": "^7.3.0",
31
31
  "@atlaskit/platform-feature-flags": "^1.1.0",
32
- "@atlaskit/tmp-editor-statsig": "^45.0.0",
32
+ "@atlaskit/tmp-editor-statsig": "^46.2.0",
33
33
  "@babel/runtime": "^7.0.0"
34
34
  },
35
35
  "devDependencies": {