@atlaskit/editor-tables 2.7.3 → 2.7.5

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 (83) hide show
  1. package/CHANGELOG.md +288 -278
  2. package/afm-jira/tsconfig.json +20 -0
  3. package/dist/cjs/utils/create-table.js +6 -2
  4. package/dist/es2019/utils/create-table.js +6 -2
  5. package/dist/esm/utils/create-table.js +6 -2
  6. package/dist/types/cell-bookmark.d.ts +3 -3
  7. package/dist/types/cell-selection.d.ts +4 -4
  8. package/dist/types/utils/analytics-helpers.d.ts +1 -1
  9. package/dist/types/utils/cells.d.ts +2 -2
  10. package/dist/types/utils/clone-tr.d.ts +1 -1
  11. package/dist/types/utils/colspan.d.ts +1 -1
  12. package/dist/types/utils/copy-paste.d.ts +1 -1
  13. package/dist/types/utils/create-table.d.ts +3 -2
  14. package/dist/types/utils/draw-cell-selection.d.ts +1 -1
  15. package/dist/types/utils/empty-cells.d.ts +3 -3
  16. package/dist/types/utils/find.d.ts +4 -4
  17. package/dist/types/utils/fix-tables.d.ts +2 -2
  18. package/dist/types/utils/for-each-cell.d.ts +2 -2
  19. package/dist/types/utils/get-cell-selection-ranges.d.ts +1 -1
  20. package/dist/types/utils/get-cells-in-column.d.ts +2 -2
  21. package/dist/types/utils/get-cells-in-row.d.ts +2 -2
  22. package/dist/types/utils/get-cells-in-table.d.ts +2 -2
  23. package/dist/types/utils/get-selection-rect.d.ts +2 -2
  24. package/dist/types/utils/go-to-next-cell.d.ts +1 -1
  25. package/dist/types/utils/handle-paste.d.ts +2 -2
  26. package/dist/types/utils/is-selected.d.ts +2 -2
  27. package/dist/types/utils/is-selection-type.d.ts +2 -2
  28. package/dist/types/utils/normalize-selection.d.ts +1 -1
  29. package/dist/types/utils/remove-column.d.ts +2 -2
  30. package/dist/types/utils/remove-row.d.ts +2 -2
  31. package/dist/types/utils/remove-table.d.ts +1 -1
  32. package/dist/types/utils/reorder-utils.d.ts +2 -2
  33. package/dist/types/utils/replace-table.d.ts +1 -1
  34. package/dist/types/utils/selection-cell.d.ts +2 -2
  35. package/dist/types/utils/selection-rect.d.ts +2 -2
  36. package/dist/types/utils/set-cell-attrs.d.ts +3 -3
  37. package/dist/types/utils/split-cell-with-type.d.ts +2 -2
  38. package/dist/types/utils/split-cell.d.ts +1 -1
  39. package/dist/types/utils/table-node-types.d.ts +1 -1
  40. package/dist/types/utils/tables.d.ts +2 -2
  41. package/dist/types/utils/test-utils.d.ts +1 -1
  42. package/dist/types/utils/toggle-header.d.ts +3 -3
  43. package/dist/types/utils.d.ts +2 -2
  44. package/dist/types-ts4.5/cell-bookmark.d.ts +3 -3
  45. package/dist/types-ts4.5/cell-selection.d.ts +4 -4
  46. package/dist/types-ts4.5/utils/analytics-helpers.d.ts +1 -1
  47. package/dist/types-ts4.5/utils/cells.d.ts +2 -2
  48. package/dist/types-ts4.5/utils/clone-tr.d.ts +1 -1
  49. package/dist/types-ts4.5/utils/colspan.d.ts +1 -1
  50. package/dist/types-ts4.5/utils/copy-paste.d.ts +1 -1
  51. package/dist/types-ts4.5/utils/create-table.d.ts +3 -2
  52. package/dist/types-ts4.5/utils/draw-cell-selection.d.ts +1 -1
  53. package/dist/types-ts4.5/utils/empty-cells.d.ts +3 -3
  54. package/dist/types-ts4.5/utils/find.d.ts +4 -4
  55. package/dist/types-ts4.5/utils/fix-tables.d.ts +2 -2
  56. package/dist/types-ts4.5/utils/for-each-cell.d.ts +2 -2
  57. package/dist/types-ts4.5/utils/get-cell-selection-ranges.d.ts +1 -1
  58. package/dist/types-ts4.5/utils/get-cells-in-column.d.ts +2 -2
  59. package/dist/types-ts4.5/utils/get-cells-in-row.d.ts +2 -2
  60. package/dist/types-ts4.5/utils/get-cells-in-table.d.ts +2 -2
  61. package/dist/types-ts4.5/utils/get-selection-rect.d.ts +2 -2
  62. package/dist/types-ts4.5/utils/go-to-next-cell.d.ts +1 -1
  63. package/dist/types-ts4.5/utils/handle-paste.d.ts +2 -2
  64. package/dist/types-ts4.5/utils/is-selected.d.ts +2 -2
  65. package/dist/types-ts4.5/utils/is-selection-type.d.ts +2 -2
  66. package/dist/types-ts4.5/utils/normalize-selection.d.ts +1 -1
  67. package/dist/types-ts4.5/utils/remove-column.d.ts +2 -2
  68. package/dist/types-ts4.5/utils/remove-row.d.ts +2 -2
  69. package/dist/types-ts4.5/utils/remove-table.d.ts +1 -1
  70. package/dist/types-ts4.5/utils/reorder-utils.d.ts +2 -2
  71. package/dist/types-ts4.5/utils/replace-table.d.ts +1 -1
  72. package/dist/types-ts4.5/utils/selection-cell.d.ts +2 -2
  73. package/dist/types-ts4.5/utils/selection-rect.d.ts +2 -2
  74. package/dist/types-ts4.5/utils/set-cell-attrs.d.ts +3 -3
  75. package/dist/types-ts4.5/utils/split-cell-with-type.d.ts +2 -2
  76. package/dist/types-ts4.5/utils/split-cell.d.ts +1 -1
  77. package/dist/types-ts4.5/utils/table-node-types.d.ts +1 -1
  78. package/dist/types-ts4.5/utils/tables.d.ts +2 -2
  79. package/dist/types-ts4.5/utils/test-utils.d.ts +1 -1
  80. package/dist/types-ts4.5/utils/toggle-header.d.ts +3 -3
  81. package/dist/types-ts4.5/utils.d.ts +2 -2
  82. package/package.json +62 -64
  83. package/report.api.md +118 -134
@@ -1,5 +1,5 @@
1
- import { Selection } from '@atlaskit/editor-prosemirror/state';
2
- import { 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 { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
- import { NodeSelection, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
1
+ import { type ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
+ import { type NodeSelection, type Selection, type 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 { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
1
+ import { type EditorState, type 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 { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
- import { 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 { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
- import { 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 { 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 { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
- import { 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 { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
2
+ import { type EditorState, type Transaction } from '@atlaskit/editor-prosemirror/state';
3
3
  export declare const replaceSelectedTable: (state: EditorState, content: string | Slice) => Transaction;
@@ -1,3 +1,3 @@
1
- import { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
- import { 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 { EditorState } from '@atlaskit/editor-prosemirror/state';
2
- import { Rect, TableContext } from '../table-map';
1
+ import { type EditorState } from '@atlaskit/editor-prosemirror/state';
2
+ import { type Rect, type 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 { Transaction } from '@atlaskit/editor-prosemirror/state';
2
- import { NodeWithPos } from '@atlaskit/editor-prosemirror/utils';
3
- import { 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,5 @@
1
- import { NodeType, Node as PMNode, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
- import { Command } from '../types';
1
+ import { type NodeType, type Node as PMNode, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
+ import { type Command } from '../types';
3
3
  export declare function cellWrapping($pos: ResolvedPos): PMNode | null;
4
4
  export type GetCellTypeArgs = {
5
5
  row: number;
@@ -1,2 +1,2 @@
1
- import { Command } from '../types';
1
+ import { type Command } from '../types';
2
2
  export declare const splitCell: Command;
@@ -1,4 +1,4 @@
1
- import { NodeType, Schema } from '@atlaskit/editor-prosemirror/model';
1
+ import { type NodeType, type Schema } from '@atlaskit/editor-prosemirror/model';
2
2
  export type TableNodeCache = {
3
3
  [key: string]: NodeType;
4
4
  };
@@ -1,4 +1,4 @@
1
- import { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
- import { 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 { 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 { Command } from '../types';
2
- import { SelectionRect } from './selection-rect';
3
- import { 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;
@@ -27,7 +27,7 @@ export { cloneColumn } from './utils/clone-column';
27
27
  export { cloneRow } from './utils/clone-row';
28
28
  export { normalizeSelection } from './utils/normalize-selection';
29
29
  export { removeColumnAt, removeSelectedColumns, removeColumnClosestToPos, } from './utils/remove-column';
30
- export { removeRowAt, removeSelectedRows, removeRowClosestToPos, } from './utils/remove-row';
30
+ export { removeRowAt, removeSelectedRows, removeRowClosestToPos } from './utils/remove-row';
31
31
  export { removeTable } from './utils/remove-table';
32
32
  export { selectColumn, selectColumns, selectRow, selectRows, selectTable, selectTableClosestToPos, } from './utils/select-nodes';
33
33
  export { selectionCell } from './utils/selection-cell';
@@ -42,4 +42,4 @@ export { toggleHeader } from './utils/toggle-header';
42
42
  export { convertArrayOfRowsToTableNode, convertTableNodeToArrayOfRows, } from './utils/reorder-utils';
43
43
  export { handlePaste } from './utils/handle-paste';
44
44
  export { replaceSelectedTable } from './utils/replace-table';
45
- export { getSelectedTableInfo, getSelectedCellInfo, } from './utils/analytics-helpers';
45
+ export { getSelectedTableInfo, getSelectedCellInfo } from './utils/analytics-helpers';
package/package.json CHANGED
@@ -1,65 +1,63 @@
1
1
  {
2
- "name": "@atlaskit/editor-tables",
3
- "version": "2.7.3",
4
- "description": "A package that contains common classes and utility functions for editor tables",
5
- "publishConfig": {
6
- "registry": "https://registry.npmjs.org/"
7
- },
8
- "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
9
- "author": "Atlassian Pty Ltd",
10
- "license": "Apache-2.0",
11
- "main": "dist/cjs/index.js",
12
- "module": "dist/esm/index.js",
13
- "module:es2019": "dist/es2019/index.js",
14
- "types": "dist/types/index.d.ts",
15
- "typesVersions": {
16
- ">=4.5 <4.9": {
17
- "*": [
18
- "dist/types-ts4.5/*",
19
- "dist/types-ts4.5/index.d.ts"
20
- ]
21
- }
22
- },
23
- "sideEffects": false,
24
- "atlaskit:src": "src/index.ts",
25
- "atlassian": {
26
- "team": "Editor: Jenga",
27
- "singleton": true,
28
- "releaseModel": "continuous"
29
- },
30
- "dependencies": {
31
- "@atlaskit/editor-prosemirror": "4.0.1",
32
- "@babel/runtime": "^7.0.0"
33
- },
34
- "devDependencies": {
35
- "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
36
- "@atlassian/feature-flags-test-utils": "^0.2.0"
37
- },
38
- "techstack": {
39
- "@atlassian/frontend": {
40
- "circular-dependencies": [
41
- "file-level"
42
- ],
43
- "import-structure": "atlassian-conventions"
44
- },
45
- "@repo/internal": {
46
- "deprecation": "no-deprecated-imports",
47
- "design-tokens": [
48
- "color"
49
- ],
50
- "styling": [
51
- "emotion"
52
- ]
53
- }
54
- },
55
- "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1",
56
- "af:exports": {
57
- ".": "./src/index.ts",
58
- "./cell-bookmark": "./src/cell-bookmark.ts",
59
- "./cell-selection": "./src/cell-selection.ts",
60
- "./pm-plugins": "./src/pm-plugins.ts",
61
- "./table-map": "./src/table-map.ts",
62
- "./types": "./src/types.ts",
63
- "./utils": "./src/utils.ts"
64
- }
65
- }
2
+ "name": "@atlaskit/editor-tables",
3
+ "version": "2.7.5",
4
+ "description": "A package that contains common classes and utility functions for editor tables",
5
+ "publishConfig": {
6
+ "registry": "https://registry.npmjs.org/"
7
+ },
8
+ "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
9
+ "author": "Atlassian Pty Ltd",
10
+ "license": "Apache-2.0",
11
+ "main": "dist/cjs/index.js",
12
+ "module": "dist/esm/index.js",
13
+ "module:es2019": "dist/es2019/index.js",
14
+ "types": "dist/types/index.d.ts",
15
+ "typesVersions": {
16
+ ">=4.5 <4.9": {
17
+ "*": [
18
+ "dist/types-ts4.5/*",
19
+ "dist/types-ts4.5/index.d.ts"
20
+ ]
21
+ }
22
+ },
23
+ "sideEffects": false,
24
+ "atlaskit:src": "src/index.ts",
25
+ "atlassian": {
26
+ "team": "Editor: Jenga",
27
+ "singleton": true,
28
+ "releaseModel": "continuous"
29
+ },
30
+ "dependencies": {
31
+ "@atlaskit/editor-prosemirror": "4.0.1",
32
+ "@babel/runtime": "^7.0.0"
33
+ },
34
+ "devDependencies": {
35
+ "@atlassian/feature-flags-test-utils": "^0.2.0"
36
+ },
37
+ "techstack": {
38
+ "@atlassian/frontend": {
39
+ "circular-dependencies": [
40
+ "file-level"
41
+ ],
42
+ "import-structure": "atlassian-conventions"
43
+ },
44
+ "@repo/internal": {
45
+ "deprecation": "no-deprecated-imports",
46
+ "design-tokens": [
47
+ "color"
48
+ ],
49
+ "styling": [
50
+ "emotion"
51
+ ]
52
+ }
53
+ },
54
+ "af:exports": {
55
+ ".": "./src/index.ts",
56
+ "./cell-bookmark": "./src/cell-bookmark.ts",
57
+ "./cell-selection": "./src/cell-selection.ts",
58
+ "./pm-plugins": "./src/pm-plugins.ts",
59
+ "./table-map": "./src/table-map.ts",
60
+ "./types": "./src/types.ts",
61
+ "./utils": "./src/utils.ts"
62
+ }
63
+ }
package/report.api.md CHANGED
@@ -2,7 +2,8 @@
2
2
 
3
3
  ## API Report File for "@atlaskit/editor-tables"
4
4
 
5
- > Do not edit this file. This report is auto-generated using [API Extractor](https://api-extractor.com/).
5
+ > Do not edit this file. This report is auto-generated using
6
+ > [API Extractor](https://api-extractor.com/).
6
7
  > [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
7
8
 
8
9
  ### Table of contents
@@ -30,184 +31,167 @@ type Axis = 'horiz' | 'vert';
30
31
 
31
32
  // @public (undocumented)
32
33
  class CellBookmark implements SelectionBookmark {
33
- constructor(anchor: number, head: number);
34
- // (undocumented)
35
- readonly anchor: number;
36
- // (undocumented)
37
- readonly head: number;
38
- // (undocumented)
39
- map(mapping: Mappable): SelectionBookmark;
40
- // (undocumented)
41
- resolve(doc: Node_2): Selection_2;
34
+ constructor(anchor: number, head: number);
35
+ // (undocumented)
36
+ readonly anchor: number;
37
+ // (undocumented)
38
+ readonly head: number;
39
+ // (undocumented)
40
+ map(mapping: Mappable): SelectionBookmark;
41
+ // (undocumented)
42
+ resolve(doc: Node_2): Selection_2;
42
43
  }
43
44
 
44
45
  // @public (undocumented)
45
46
  export class CellSelection extends Selection_2 {
46
- // (undocumented)
47
- readonly $anchorCell: ResolvedPos;
48
- // (undocumented)
49
- readonly $headCell: ResolvedPos;
50
- constructor($anchorCell: ResolvedPos, $headCell?: ResolvedPos);
51
- // (undocumented)
52
- static colSelection(
53
- $anchorCell: ResolvedPos,
54
- $headCell?: ResolvedPos,
55
- ): CellSelection;
56
- // (undocumented)
57
- content(): Slice;
58
- // (undocumented)
59
- static create(
60
- doc: Node_2,
61
- anchorCell: number,
62
- headCell?: number,
63
- ): CellSelection;
64
- // (undocumented)
65
- eq(other: CellSelection): boolean;
66
- // (undocumented)
67
- forEachCell(f: (node: Node_2, pos: number) => void): void;
68
- // (undocumented)
69
- static fromJSON(doc: Node_2, json: SerializedCellSelection): CellSelection;
70
- // (undocumented)
71
- getBookmark(): CellBookmark;
72
- // (undocumented)
73
- isColSelection(): boolean;
74
- // (undocumented)
75
- isRowSelection(): boolean;
76
- // (undocumented)
77
- map(doc: Node_2, mapping: Mapping): Selection_2;
78
- // (undocumented)
79
- replace(tr: Transaction, content?: Slice): void;
80
- // (undocumented)
81
- replaceWith(tr: Transaction, node: Node_2): void;
82
- // (undocumented)
83
- static rowSelection(
84
- $anchorCell: ResolvedPos,
85
- $headCell?: ResolvedPos,
86
- ): CellSelection;
87
- // (undocumented)
88
- toJSON(): SerializedCellSelection;
89
- // (undocumented)
90
- readonly visible: boolean;
47
+ // (undocumented)
48
+ readonly $anchorCell: ResolvedPos;
49
+ // (undocumented)
50
+ readonly $headCell: ResolvedPos;
51
+ constructor($anchorCell: ResolvedPos, $headCell?: ResolvedPos);
52
+ // (undocumented)
53
+ static colSelection($anchorCell: ResolvedPos, $headCell?: ResolvedPos): CellSelection;
54
+ // (undocumented)
55
+ content(): Slice;
56
+ // (undocumented)
57
+ static create(doc: Node_2, anchorCell: number, headCell?: number): CellSelection;
58
+ // (undocumented)
59
+ eq(other: CellSelection): boolean;
60
+ // (undocumented)
61
+ forEachCell(f: (node: Node_2, pos: number) => void): void;
62
+ // (undocumented)
63
+ static fromJSON(doc: Node_2, json: SerializedCellSelection): CellSelection;
64
+ // (undocumented)
65
+ getBookmark(): CellBookmark;
66
+ // (undocumented)
67
+ isColSelection(): boolean;
68
+ // (undocumented)
69
+ isRowSelection(): boolean;
70
+ // (undocumented)
71
+ map(doc: Node_2, mapping: Mapping): Selection_2;
72
+ // (undocumented)
73
+ replace(tr: Transaction, content?: Slice): void;
74
+ // (undocumented)
75
+ replaceWith(tr: Transaction, node: Node_2): void;
76
+ // (undocumented)
77
+ static rowSelection($anchorCell: ResolvedPos, $headCell?: ResolvedPos): CellSelection;
78
+ // (undocumented)
79
+ toJSON(): SerializedCellSelection;
80
+ // (undocumented)
81
+ readonly visible: boolean;
91
82
  }
92
83
 
93
84
  // @public (undocumented)
94
- export const findTable: (
95
- selection: Selection_2,
96
- ) => ContentNodeWithPos | undefined;
85
+ export const findTable: (selection: Selection_2) => ContentNodeWithPos | undefined;
97
86
 
98
87
  // @public (undocumented)
99
88
  export class Rect {
100
- constructor(left: number, top: number, right: number, bottom: number);
101
- // (undocumented)
102
- bottom: number;
103
- // (undocumented)
104
- left: number;
105
- // (undocumented)
106
- right: number;
107
- // (undocumented)
108
- top: number;
89
+ constructor(left: number, top: number, right: number, bottom: number);
90
+ // (undocumented)
91
+ bottom: number;
92
+ // (undocumented)
93
+ left: number;
94
+ // (undocumented)
95
+ right: number;
96
+ // (undocumented)
97
+ top: number;
109
98
  }
110
99
 
111
100
  // @public (undocumented)
112
101
  interface SerializedCellSelection {
113
- // (undocumented)
114
- anchor: number;
115
- // (undocumented)
116
- head: number;
117
- // (undocumented)
118
- type: 'cell';
102
+ // (undocumented)
103
+ anchor: number;
104
+ // (undocumented)
105
+ head: number;
106
+ // (undocumented)
107
+ type: 'cell';
119
108
  }
120
109
 
121
110
  // @public (undocumented)
122
111
  export class TableMap {
123
- constructor(
124
- width: number,
125
- height: number,
126
- map: number[],
127
- problems?: TableProblem[] | null,
128
- );
129
- // (undocumented)
130
- cellsInRect(rect: Rect): number[];
131
- // (undocumented)
132
- colCount(pos: number): number;
133
- // (undocumented)
134
- findCell(pos: number): Rect;
135
- // (undocumented)
136
- static get(table: Node_2): TableMap;
137
- // (undocumented)
138
- getMaxColInRow(pos: ResolvedPos): number | undefined;
139
- // (undocumented)
140
- height: number;
141
- // (undocumented)
142
- isPosMerged(pos: number): boolean;
143
- // (undocumented)
144
- map: number[];
145
- // (undocumented)
146
- nextCell(pos: number, axis: Axis, dir: number): null | number;
147
- // (undocumented)
148
- positionAt(row: number, col: number, table: Node_2): number;
149
- // (undocumented)
150
- problems?: TableProblem[] | null;
151
- // (undocumented)
152
- rectBetween(a: number, b: number): Rect;
153
- // (undocumented)
154
- rowCount(pos: number): number;
155
- // (undocumented)
156
- width: number;
112
+ constructor(width: number, height: number, map: number[], problems?: TableProblem[] | null);
113
+ // (undocumented)
114
+ cellsInRect(rect: Rect): number[];
115
+ // (undocumented)
116
+ colCount(pos: number): number;
117
+ // (undocumented)
118
+ findCell(pos: number): Rect;
119
+ // (undocumented)
120
+ static get(table: Node_2): TableMap;
121
+ // (undocumented)
122
+ getMaxColInRow(pos: ResolvedPos): number | undefined;
123
+ // (undocumented)
124
+ height: number;
125
+ // (undocumented)
126
+ isPosMerged(pos: number): boolean;
127
+ // (undocumented)
128
+ map: number[];
129
+ // (undocumented)
130
+ nextCell(pos: number, axis: Axis, dir: number): null | number;
131
+ // (undocumented)
132
+ positionAt(row: number, col: number, table: Node_2): number;
133
+ // (undocumented)
134
+ problems?: TableProblem[] | null;
135
+ // (undocumented)
136
+ rectBetween(a: number, b: number): Rect;
137
+ // (undocumented)
138
+ rowCount(pos: number): number;
139
+ // (undocumented)
140
+ width: number;
157
141
  }
158
142
 
159
143
  // @public (undocumented)
160
144
  type TableProblem =
161
- | TableProblemColWidthMismatch
162
- | TableProblemCollision
163
- | TableProblemLongRowspan
164
- | TableProblemMissing;
145
+ | TableProblemColWidthMismatch
146
+ | TableProblemCollision
147
+ | TableProblemLongRowspan
148
+ | TableProblemMissing;
165
149
 
166
150
  // @public (undocumented)
167
151
  type TableProblemCollision = {
168
- type: TableProblemTypes.COLLISION;
169
- row: number;
170
- pos: number;
171
- n: number;
152
+ type: TableProblemTypes.COLLISION;
153
+ row: number;
154
+ pos: number;
155
+ n: number;
172
156
  };
173
157
 
174
158
  // @public (undocumented)
175
159
  type TableProblemColWidthMismatch = {
176
- type: TableProblemTypes;
177
- pos: number;
178
- colwidth: number;
160
+ type: TableProblemTypes;
161
+ pos: number;
162
+ colwidth: number;
179
163
  };
180
164
 
181
165
  // @public (undocumented)
182
166
  type TableProblemLongRowspan = {
183
- type: TableProblemTypes.OVERLONG_ROWSPAN;
184
- pos: number;
185
- n: number;
167
+ type: TableProblemTypes.OVERLONG_ROWSPAN;
168
+ pos: number;
169
+ n: number;
186
170
  };
187
171
 
188
172
  // @public (undocumented)
189
173
  type TableProblemMissing = {
190
- type: TableProblemTypes.MISSING;
191
- row: number;
192
- n: number;
174
+ type: TableProblemTypes.MISSING;
175
+ row: number;
176
+ n: number;
193
177
  };
194
178
 
195
179
  // @public (undocumented)
196
180
  enum TableProblemTypes {
197
- // (undocumented)
198
- COLLISION = 'collision',
199
- // (undocumented)
200
- COLWIDTH_MISMATCH = 'colwidth mismatch',
201
- // (undocumented)
202
- MISSING = 'missing',
203
- // (undocumented)
204
- OVERLONG_ROWSPAN = 'overlong_rowspan',
181
+ // (undocumented)
182
+ COLLISION = 'collision',
183
+ // (undocumented)
184
+ COLWIDTH_MISMATCH = 'colwidth mismatch',
185
+ // (undocumented)
186
+ MISSING = 'missing',
187
+ // (undocumented)
188
+ OVERLONG_ROWSPAN = 'overlong_rowspan',
205
189
  }
206
190
 
207
191
  // @public (undocumented)
208
192
  export const uuid: {
209
- setStatic(value: false | string): void;
210
- generate(): string;
193
+ setStatic(value: false | string): void;
194
+ generate(): string;
211
195
  };
212
196
 
213
197
  // (No @packageDocumentation comment for this package)