@atlaskit/editor-tables 2.2.0 → 2.2.2

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 (68) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/pm-plugins/input.js +3 -2
  3. package/dist/cjs/utils/select-nodes.js +23 -2
  4. package/dist/cjs/version.json +1 -1
  5. package/dist/es2019/pm-plugins/input.js +3 -2
  6. package/dist/es2019/utils/select-nodes.js +20 -1
  7. package/dist/es2019/version.json +1 -1
  8. package/dist/esm/pm-plugins/input.js +3 -2
  9. package/dist/esm/utils/select-nodes.js +19 -1
  10. package/dist/esm/version.json +1 -1
  11. package/dist/types/utils/select-nodes.d.ts +2 -0
  12. package/package.json +6 -10
  13. package/report.api.md +120 -52
  14. package/dist/types-ts4.0/cell-bookmark.d.ts +0 -10
  15. package/dist/types-ts4.0/cell-selection.d.ts +0 -25
  16. package/dist/types-ts4.0/index.d.ts +0 -27
  17. package/dist/types-ts4.0/pm-plugins/input.d.ts +0 -4
  18. package/dist/types-ts4.0/pm-plugins/plugin-key.d.ts +0 -3
  19. package/dist/types-ts4.0/pm-plugins/table-editing.d.ts +0 -8
  20. package/dist/types-ts4.0/pm-plugins.d.ts +0 -2
  21. package/dist/types-ts4.0/table-map.d.ts +0 -62
  22. package/dist/types-ts4.0/types.d.ts +0 -36
  23. package/dist/types-ts4.0/utils/add-column-at.d.ts +0 -2
  24. package/dist/types-ts4.0/utils/add-column.d.ts +0 -5
  25. package/dist/types-ts4.0/utils/add-row-at.d.ts +0 -3
  26. package/dist/types-ts4.0/utils/add-row.d.ts +0 -3
  27. package/dist/types-ts4.0/utils/analytics-helpers.d.ts +0 -15
  28. package/dist/types-ts4.0/utils/cells.d.ts +0 -6
  29. package/dist/types-ts4.0/utils/clone-tr.d.ts +0 -2
  30. package/dist/types-ts4.0/utils/colspan.d.ts +0 -4
  31. package/dist/types-ts4.0/utils/copy-paste.d.ts +0 -8
  32. package/dist/types-ts4.0/utils/create-table.d.ts +0 -10
  33. package/dist/types-ts4.0/utils/draw-cell-selection.d.ts +0 -3
  34. package/dist/types-ts4.0/utils/empty-cells.d.ts +0 -4
  35. package/dist/types-ts4.0/utils/find.d.ts +0 -8
  36. package/dist/types-ts4.0/utils/fix-tables.d.ts +0 -9
  37. package/dist/types-ts4.0/utils/for-each-cell.d.ts +0 -4
  38. package/dist/types-ts4.0/utils/get-cell-selection-ranges.d.ts +0 -3
  39. package/dist/types-ts4.0/utils/get-cells-in-column.d.ts +0 -3
  40. package/dist/types-ts4.0/utils/get-cells-in-row.d.ts +0 -3
  41. package/dist/types-ts4.0/utils/get-cells-in-table.d.ts +0 -3
  42. package/dist/types-ts4.0/utils/get-selection-range-in-column.d.ts +0 -3
  43. package/dist/types-ts4.0/utils/get-selection-range-in-row.d.ts +0 -3
  44. package/dist/types-ts4.0/utils/get-selection-rect.d.ts +0 -3
  45. package/dist/types-ts4.0/utils/go-to-next-cell.d.ts +0 -2
  46. package/dist/types-ts4.0/utils/handle-paste.d.ts +0 -3
  47. package/dist/types-ts4.0/utils/is-selected.d.ts +0 -6
  48. package/dist/types-ts4.0/utils/is-selection-type.d.ts +0 -11
  49. package/dist/types-ts4.0/utils/move-column.d.ts +0 -5
  50. package/dist/types-ts4.0/utils/move-row.d.ts +0 -5
  51. package/dist/types-ts4.0/utils/normalize-selection.d.ts +0 -2
  52. package/dist/types-ts4.0/utils/remove-column.d.ts +0 -5
  53. package/dist/types-ts4.0/utils/remove-row.d.ts +0 -5
  54. package/dist/types-ts4.0/utils/remove-table.d.ts +0 -2
  55. package/dist/types-ts4.0/utils/reorder-utils.d.ts +0 -10
  56. package/dist/types-ts4.0/utils/replace-table.d.ts +0 -3
  57. package/dist/types-ts4.0/utils/select-nodes.d.ts +0 -4
  58. package/dist/types-ts4.0/utils/selection-cell.d.ts +0 -3
  59. package/dist/types-ts4.0/utils/selection-rect.d.ts +0 -4
  60. package/dist/types-ts4.0/utils/set-cell-attrs.d.ts +0 -4
  61. package/dist/types-ts4.0/utils/split-cell-with-type.d.ts +0 -11
  62. package/dist/types-ts4.0/utils/split-cell.d.ts +0 -2
  63. package/dist/types-ts4.0/utils/table-node-types.d.ts +0 -5
  64. package/dist/types-ts4.0/utils/tables.d.ts +0 -4
  65. package/dist/types-ts4.0/utils/test-utils.d.ts +0 -5
  66. package/dist/types-ts4.0/utils/toggle-header.d.ts +0 -3
  67. package/dist/types-ts4.0/utils/uuid.d.ts +0 -9
  68. package/dist/types-ts4.0/utils.d.ts +0 -43
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @atlaskit/editor-tables
2
2
 
3
+ ## 2.2.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`47f1f76cb80`](https://bitbucket.org/atlassian/atlassian-frontend/commits/47f1f76cb80) - Add selectTableClosestToPos function
8
+ - [`755d7bf5c2a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/755d7bf5c2a) - [ux] ED-12527 Prevents editor-tables handleMouseDown() from creating a cell selection when right clicking in a table cell.
9
+
10
+ ## 2.2.1
11
+
12
+ ### Patch Changes
13
+
14
+ - [`403e0d2d291`](https://bitbucket.org/atlassian/atlassian-frontend/commits/403e0d2d291) - ED-16246 fix prevent @types/prosemirror-commands @types/prosemirror-keymap updating to incompatible version.
15
+
3
16
  ## 2.2.0
4
17
 
5
18
  ### Minor Changes
@@ -160,9 +160,10 @@ function handleTripleClick(view, pos) {
160
160
  }
161
161
 
162
162
  function handleMouseDown(view, event) {
163
- var startEvent = event;
163
+ var startEvent = event; // Prevent right clicks from making a cell selection https://product-fabric.atlassian.net/browse/ED-12527
164
164
 
165
- if (startEvent.ctrlKey || startEvent.metaKey) {
165
+ if (startEvent.ctrlKey || startEvent.metaKey || startEvent.button === 2 // right mouse click
166
+ ) {
166
167
  return false;
167
168
  }
168
169
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.selectTable = exports.selectRow = exports.selectColumn = void 0;
6
+ exports.selectTableClosestToPos = exports.selectTable = exports.selectRow = exports.selectColumn = void 0;
7
7
 
8
8
  var _cellSelection = require("../cell-selection");
9
9
 
@@ -101,4 +101,25 @@ var selectTable = function selectTable(tr) {
101
101
  return tr;
102
102
  };
103
103
 
104
- exports.selectTable = selectTable;
104
+ exports.selectTable = selectTable;
105
+
106
+ var selectTableClosestToPos = function selectTableClosestToPos(tr, $pos) {
107
+ var table = (0, _find.findTableClosestToPos)($pos);
108
+
109
+ if (table) {
110
+ var _TableMap$get2 = _tableMap.TableMap.get(table.node),
111
+ map = _TableMap$get2.map;
112
+
113
+ if (map && map.length) {
114
+ var head = table.start + map[0];
115
+ var anchor = table.start + map[map.length - 1];
116
+ var $head = tr.doc.resolve(head);
117
+ var $anchor = tr.doc.resolve(anchor);
118
+ return (0, _cloneTr.cloneTr)(tr.setSelection(new _cellSelection.CellSelection($anchor, $head)));
119
+ }
120
+ }
121
+
122
+ return tr;
123
+ };
124
+
125
+ exports.selectTableClosestToPos = selectTableClosestToPos;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-tables",
3
- "version": "2.2.0",
3
+ "version": "2.2.2",
4
4
  "sideEffects": false
5
5
  }
@@ -145,9 +145,10 @@ export function handleTripleClick(view, pos) {
145
145
  return true;
146
146
  }
147
147
  export function handleMouseDown(view, event) {
148
- const startEvent = event;
148
+ const startEvent = event; // Prevent right clicks from making a cell selection https://product-fabric.atlassian.net/browse/ED-12527
149
149
 
150
- if (startEvent.ctrlKey || startEvent.metaKey) {
150
+ if (startEvent.ctrlKey || startEvent.metaKey || startEvent.button === 2 // right mouse click
151
+ ) {
151
152
  return false;
152
153
  }
153
154
 
@@ -1,7 +1,7 @@
1
1
  import { CellSelection } from '../cell-selection';
2
2
  import { TableMap } from '../table-map';
3
3
  import { cloneTr } from './clone-tr';
4
- import { findCellClosestToPos, findTable } from './find';
4
+ import { findCellClosestToPos, findTable, findTableClosestToPos } from './find';
5
5
 
6
6
  const select = type => (index, expand) => tr => {
7
7
  const table = findTable(tr.selection);
@@ -81,5 +81,24 @@ export const selectTable = tr => {
81
81
  }
82
82
  }
83
83
 
84
+ return tr;
85
+ };
86
+ export const selectTableClosestToPos = (tr, $pos) => {
87
+ const table = findTableClosestToPos($pos);
88
+
89
+ if (table) {
90
+ const {
91
+ map
92
+ } = TableMap.get(table.node);
93
+
94
+ if (map && map.length) {
95
+ const head = table.start + map[0];
96
+ const anchor = table.start + map[map.length - 1];
97
+ const $head = tr.doc.resolve(head);
98
+ const $anchor = tr.doc.resolve(anchor);
99
+ return cloneTr(tr.setSelection(new CellSelection($anchor, $head)));
100
+ }
101
+ }
102
+
84
103
  return tr;
85
104
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-tables",
3
- "version": "2.2.0",
3
+ "version": "2.2.2",
4
4
  "sideEffects": false
5
5
  }
@@ -141,9 +141,10 @@ export function handleTripleClick(view, pos) {
141
141
  return true;
142
142
  }
143
143
  export function handleMouseDown(view, event) {
144
- var startEvent = event;
144
+ var startEvent = event; // Prevent right clicks from making a cell selection https://product-fabric.atlassian.net/browse/ED-12527
145
145
 
146
- if (startEvent.ctrlKey || startEvent.metaKey) {
146
+ if (startEvent.ctrlKey || startEvent.metaKey || startEvent.button === 2 // right mouse click
147
+ ) {
147
148
  return false;
148
149
  }
149
150
 
@@ -1,7 +1,7 @@
1
1
  import { CellSelection } from '../cell-selection';
2
2
  import { TableMap } from '../table-map';
3
3
  import { cloneTr } from './clone-tr';
4
- import { findCellClosestToPos, findTable } from './find';
4
+ import { findCellClosestToPos, findTable, findTableClosestToPos } from './find';
5
5
 
6
6
  var select = function select(type) {
7
7
  return function (index, expand) {
@@ -84,5 +84,23 @@ export var selectTable = function selectTable(tr) {
84
84
  }
85
85
  }
86
86
 
87
+ return tr;
88
+ };
89
+ export var selectTableClosestToPos = function selectTableClosestToPos(tr, $pos) {
90
+ var table = findTableClosestToPos($pos);
91
+
92
+ if (table) {
93
+ var _TableMap$get2 = TableMap.get(table.node),
94
+ map = _TableMap$get2.map;
95
+
96
+ if (map && map.length) {
97
+ var head = table.start + map[0];
98
+ var anchor = table.start + map[map.length - 1];
99
+ var $head = tr.doc.resolve(head);
100
+ var $anchor = tr.doc.resolve(anchor);
101
+ return cloneTr(tr.setSelection(new CellSelection($anchor, $head)));
102
+ }
103
+ }
104
+
87
105
  return tr;
88
106
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-tables",
3
- "version": "2.2.0",
3
+ "version": "2.2.2",
4
4
  "sideEffects": false
5
5
  }
@@ -1,4 +1,6 @@
1
+ import { ResolvedPos } from 'prosemirror-model';
1
2
  import { Transaction } from 'prosemirror-state';
2
3
  export declare const selectColumn: (index: number, expand?: boolean | undefined) => (tr: Transaction) => Transaction;
3
4
  export declare const selectRow: (index: number, expand?: boolean | undefined) => (tr: Transaction) => Transaction;
4
5
  export declare const selectTable: (tr: Transaction) => Transaction;
6
+ export declare const selectTableClosestToPos: (tr: Transaction, $pos: ResolvedPos) => Transaction;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-tables",
3
- "version": "2.2.0",
3
+ "version": "2.2.2",
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/"
@@ -12,13 +12,6 @@
12
12
  "module": "dist/esm/index.js",
13
13
  "module:es2019": "dist/es2019/index.js",
14
14
  "types": "dist/types/index.d.ts",
15
- "typesVersions": {
16
- ">=4.0 <4.5": {
17
- "*": [
18
- "dist/types-ts4.0/*"
19
- ]
20
- }
21
- },
22
15
  "sideEffects": false,
23
16
  "atlaskit:src": "src/index.ts",
24
17
  "atlassian": {
@@ -49,8 +42,11 @@
49
42
  },
50
43
  "@repo/internal": {
51
44
  "deprecation": "no-deprecated-imports",
52
- "theming": "tokens"
45
+ "theming": "tokens",
46
+ "styling": [
47
+ "emotion"
48
+ ]
53
49
  }
54
50
  },
55
51
  "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
56
- }
52
+ }
package/report.api.md CHANGED
@@ -1,8 +1,17 @@
1
- ## API Report File for "@atlaskit/editor-tables".
1
+ <!-- API Report Version: 2.2 -->
2
2
 
3
- > Do not edit this file. This report is auto-generated by [API Extractor](https://api-extractor.com/).
3
+ ## API Report File for "@atlaskit/editor-tables"
4
4
 
5
- [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
5
+ > Do not edit this file. This report is auto-generated using [API Extractor](https://api-extractor.com/).
6
+ > [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
7
+
8
+ ### Table of contents
9
+
10
+ - [Main Entry Types](#main-entry-types)
11
+
12
+ ### Main Entry Types
13
+
14
+ <!--SECTION START: Main Entry Types-->
6
15
 
7
16
  ```ts
8
17
  import { ContentNodeWithPos } from 'prosemirror-utils';
@@ -13,127 +22,186 @@ import { Selection as Selection_2 } from 'prosemirror-state';
13
22
  import { Slice } from 'prosemirror-model';
14
23
  import { Transaction } from 'prosemirror-state';
15
24
 
16
- declare type Axis = 'horiz' | 'vert';
25
+ // @public (undocumented)
26
+ type Axis = 'horiz' | 'vert';
17
27
 
18
- declare class CellBookmark {
28
+ // @public (undocumented)
29
+ class CellBookmark {
30
+ constructor(anchor: number, head: number);
31
+ // (undocumented)
19
32
  readonly anchor: number;
33
+ // (undocumented)
20
34
  readonly head: number;
21
- constructor(anchor: number, head: number);
35
+ // (undocumented)
22
36
  map(mapping: Mapping): CellBookmark;
37
+ // (undocumented)
23
38
  resolve(doc: Node_2): Selection_2;
24
39
  }
25
40
 
26
- export declare class CellSelection extends Selection_2 {
41
+ // @public (undocumented)
42
+ export class CellSelection extends Selection_2 {
43
+ // (undocumented)
27
44
  readonly $anchorCell: ResolvedPos;
45
+ // (undocumented)
28
46
  readonly $headCell: ResolvedPos;
29
- readonly visible: boolean;
30
47
  constructor($anchorCell: ResolvedPos, $headCell?: ResolvedPos);
31
- map(doc: Node_2, mapping: Mapping): Selection_2;
32
- content(): Slice;
33
- replace(tr: Transaction, content?: Slice<any>): void;
34
- replaceWith(tr: Transaction, node: Node_2): void;
35
- forEachCell(f: (node: Node_2, pos: number) => void): void;
36
- isColSelection(): boolean;
48
+ // (undocumented)
37
49
  static colSelection(
38
50
  $anchorCell: ResolvedPos,
39
51
  $headCell?: ResolvedPos,
40
52
  ): CellSelection;
41
- isRowSelection(): boolean;
42
- eq(other: CellSelection): boolean;
43
- static rowSelection(
44
- $anchorCell: ResolvedPos,
45
- $headCell?: ResolvedPos,
46
- ): CellSelection;
47
- toJSON(): SerializedCellSelection;
48
- static fromJSON(doc: Node_2, json: SerializedCellSelection): CellSelection;
53
+ // (undocumented)
54
+ content(): Slice;
55
+ // (undocumented)
49
56
  static create(
50
57
  doc: Node_2,
51
58
  anchorCell: number,
52
59
  headCell?: number,
53
60
  ): CellSelection;
61
+ // (undocumented)
62
+ eq(other: CellSelection): boolean;
63
+ // (undocumented)
64
+ forEachCell(f: (node: Node_2, pos: number) => void): void;
65
+ // (undocumented)
66
+ static fromJSON(doc: Node_2, json: SerializedCellSelection): CellSelection;
67
+ // (undocumented)
54
68
  getBookmark(): CellBookmark;
69
+ // (undocumented)
70
+ isColSelection(): boolean;
71
+ // (undocumented)
72
+ isRowSelection(): boolean;
73
+ // (undocumented)
74
+ map(doc: Node_2, mapping: Mapping): Selection_2;
75
+ // (undocumented)
76
+ replace(tr: Transaction, content?: Slice<any>): void;
77
+ // (undocumented)
78
+ replaceWith(tr: Transaction, node: Node_2): void;
79
+ // (undocumented)
80
+ static rowSelection(
81
+ $anchorCell: ResolvedPos,
82
+ $headCell?: ResolvedPos,
83
+ ): CellSelection;
84
+ // (undocumented)
85
+ toJSON(): SerializedCellSelection;
86
+ // (undocumented)
87
+ readonly visible: boolean;
55
88
  }
56
89
 
57
- export declare const findTable: (
90
+ // @public (undocumented)
91
+ export const findTable: (
58
92
  selection: Selection_2,
59
93
  ) => ContentNodeWithPos | undefined;
60
94
 
61
- export declare class Rect {
95
+ // @public (undocumented)
96
+ export class Rect {
97
+ constructor(left: number, top: number, right: number, bottom: number);
98
+ // (undocumented)
99
+ bottom: number;
100
+ // (undocumented)
62
101
  left: number;
63
- top: number;
102
+ // (undocumented)
64
103
  right: number;
65
- bottom: number;
66
- constructor(left: number, top: number, right: number, bottom: number);
104
+ // (undocumented)
105
+ top: number;
67
106
  }
68
107
 
69
- declare interface SerializedCellSelection {
70
- type: 'cell';
108
+ // @public (undocumented)
109
+ interface SerializedCellSelection {
110
+ // (undocumented)
71
111
  anchor: number;
112
+ // (undocumented)
72
113
  head: number;
114
+ // (undocumented)
115
+ type: 'cell';
73
116
  }
74
117
 
75
- export declare class TableMap {
76
- width: number;
77
- height: number;
78
- map: number[];
79
- problems?: TableProblem[] | null;
118
+ // @public (undocumented)
119
+ export class TableMap {
80
120
  constructor(
81
121
  width: number,
82
122
  height: number,
83
123
  map: number[],
84
124
  problems?: TableProblem[] | null,
85
125
  );
86
- findCell(pos: number): Rect;
87
- colCount(pos: number): number;
88
- nextCell(pos: number, axis: Axis, dir: number): number | null;
89
- rectBetween(a: number, b: number): Rect;
126
+ // (undocumented)
90
127
  cellsInRect(rect: Rect): number[];
91
- positionAt(row: number, col: number, table: Node_2): number;
128
+ // (undocumented)
129
+ colCount(pos: number): number;
130
+ // (undocumented)
131
+ findCell(pos: number): Rect;
132
+ // (undocumented)
92
133
  static get(table: Node_2): TableMap;
134
+ // (undocumented)
135
+ height: number;
136
+ // (undocumented)
137
+ map: number[];
138
+ // (undocumented)
139
+ nextCell(pos: number, axis: Axis, dir: number): null | number;
140
+ // (undocumented)
141
+ positionAt(row: number, col: number, table: Node_2): number;
142
+ // (undocumented)
143
+ problems?: TableProblem[] | null;
144
+ // (undocumented)
145
+ rectBetween(a: number, b: number): Rect;
146
+ // (undocumented)
147
+ width: number;
93
148
  }
94
149
 
95
- declare type TableProblem =
150
+ // @public (undocumented)
151
+ type TableProblem =
152
+ | TableProblemColWidthMismatch
96
153
  | TableProblemCollision
97
154
  | TableProblemLongRowspan
98
- | TableProblemMissing
99
- | TableProblemColWidthMismatch;
155
+ | TableProblemMissing;
100
156
 
101
- declare type TableProblemCollision = {
157
+ // @public (undocumented)
158
+ type TableProblemCollision = {
102
159
  type: TableProblemTypes.COLLISION;
103
160
  row: number;
104
161
  pos: number;
105
162
  n: number;
106
163
  };
107
164
 
108
- declare type TableProblemColWidthMismatch = {
165
+ // @public (undocumented)
166
+ type TableProblemColWidthMismatch = {
109
167
  type: TableProblemTypes;
110
168
  pos: number;
111
169
  colwidth: number;
112
170
  };
113
171
 
114
- declare type TableProblemLongRowspan = {
172
+ // @public (undocumented)
173
+ type TableProblemLongRowspan = {
115
174
  type: TableProblemTypes.OVERLONG_ROWSPAN;
116
175
  pos: number;
117
176
  n: number;
118
177
  };
119
178
 
120
- declare type TableProblemMissing = {
179
+ // @public (undocumented)
180
+ type TableProblemMissing = {
121
181
  type: TableProblemTypes.MISSING;
122
182
  row: number;
123
183
  n: number;
124
184
  };
125
185
 
126
- declare enum TableProblemTypes {
186
+ // @public (undocumented)
187
+ enum TableProblemTypes {
188
+ // (undocumented)
127
189
  COLLISION = 'collision',
128
- OVERLONG_ROWSPAN = 'overlong_rowspan',
129
- MISSING = 'missing',
190
+ // (undocumented)
130
191
  COLWIDTH_MISMATCH = 'colwidth mismatch',
192
+ // (undocumented)
193
+ MISSING = 'missing',
194
+ // (undocumented)
195
+ OVERLONG_ROWSPAN = 'overlong_rowspan',
131
196
  }
132
197
 
133
- export declare const uuid: {
134
- setStatic(value: string | false): void;
198
+ // @public (undocumented)
199
+ export const uuid: {
200
+ setStatic(value: false | string): void;
135
201
  generate(): string;
136
202
  };
137
203
 
138
- export {};
204
+ // (No @packageDocumentation comment for this package)
139
205
  ```
206
+
207
+ <!--SECTION END: Main Entry Types-->
@@ -1,10 +0,0 @@
1
- import { Node as PMNode } from 'prosemirror-model';
2
- import { Selection } from 'prosemirror-state';
3
- import { Mapping } from 'prosemirror-transform';
4
- export declare class CellBookmark {
5
- readonly anchor: number;
6
- readonly head: number;
7
- constructor(anchor: number, head: number);
8
- map(mapping: Mapping): CellBookmark;
9
- resolve(doc: PMNode): Selection;
10
- }
@@ -1,25 +0,0 @@
1
- import { Node as PMNode, ResolvedPos, Slice } from 'prosemirror-model';
2
- import { Selection, Transaction } from 'prosemirror-state';
3
- import { Mapping } from 'prosemirror-transform';
4
- import { CellBookmark } from './cell-bookmark';
5
- import { SerializedCellSelection } from './types';
6
- export declare class CellSelection extends Selection {
7
- readonly $anchorCell: ResolvedPos;
8
- readonly $headCell: ResolvedPos;
9
- readonly visible: boolean;
10
- constructor($anchorCell: ResolvedPos, $headCell?: ResolvedPos);
11
- map(doc: PMNode, mapping: Mapping): Selection;
12
- content(): Slice;
13
- replace(tr: Transaction, content?: Slice<any>): void;
14
- replaceWith(tr: Transaction, node: PMNode): void;
15
- forEachCell(f: (node: PMNode, pos: number) => void): void;
16
- isColSelection(): boolean;
17
- static colSelection($anchorCell: ResolvedPos, $headCell?: ResolvedPos): CellSelection;
18
- isRowSelection(): boolean;
19
- eq(other: CellSelection): boolean;
20
- static rowSelection($anchorCell: ResolvedPos, $headCell?: ResolvedPos): CellSelection;
21
- toJSON(): SerializedCellSelection;
22
- static fromJSON(doc: PMNode, json: SerializedCellSelection): CellSelection;
23
- static create(doc: PMNode, anchorCell: number, headCell?: number): CellSelection;
24
- getBookmark(): CellBookmark;
25
- }
@@ -1,27 +0,0 @@
1
- /**
2
- This package is based on prosemirror-tables, https://github.com/ProseMirror/prosemirror-tables
3
-
4
- Copyright (C) 2015-2016 by Marijn Haverbeke <marijnh@gmail.com> and others
5
-
6
- Permission is hereby granted, free of charge, to any person obtaining a copy
7
- of this software and associated documentation files (the "Software"), to deal
8
- in the Software without restriction, including without limitation the rights
9
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- copies of the Software, and to permit persons to whom the Software is
11
- furnished to do so, subject to the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be included in
14
- all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
- THE SOFTWARE.
23
- */
24
- export { TableMap, Rect } from './table-map';
25
- export { CellSelection } from './cell-selection';
26
- export { findTable } from './utils/find';
27
- export { uuid } from './utils/uuid';
@@ -1,4 +0,0 @@
1
- import { EditorView } from 'prosemirror-view';
2
- export declare const handleKeyDown: (view: EditorView<any>, event: Event) => boolean;
3
- export declare function handleTripleClick(view: EditorView, pos: number): boolean;
4
- export declare function handleMouseDown(view: EditorView, event: Event): boolean;
@@ -1,3 +0,0 @@
1
- import { PluginKey } from 'prosemirror-state';
2
- export declare const tableEditingKey: PluginKey<any, any>;
3
- export declare const fixTablesKey: PluginKey<any, any>;
@@ -1,8 +0,0 @@
1
- import { Plugin } from 'prosemirror-state';
2
- import { ReportFixedTable } from '../utils/fix-tables';
3
- declare type PluginState = number | null;
4
- export declare function tableEditing({ allowTableNodeSelection, reportFixedTable, }?: {
5
- allowTableNodeSelection?: boolean;
6
- reportFixedTable?: ReportFixedTable;
7
- }): Plugin<PluginState>;
8
- export {};
@@ -1,2 +0,0 @@
1
- export { tableEditing } from './pm-plugins/table-editing';
2
- export { tableEditingKey } from './pm-plugins/plugin-key';
@@ -1,62 +0,0 @@
1
- import { Node as PMNode } from 'prosemirror-model';
2
- import { Axis } from './types';
3
- export declare class Rect {
4
- left: number;
5
- top: number;
6
- right: number;
7
- bottom: number;
8
- constructor(left: number, top: number, right: number, bottom: number);
9
- }
10
- export interface TableRect extends Rect {
11
- map: TableMap;
12
- tableStart: number;
13
- table: PMNode;
14
- }
15
- export declare type TableContext = {
16
- map: TableMap;
17
- tableStart: number;
18
- table: PMNode;
19
- };
20
- export declare enum TableProblemTypes {
21
- COLLISION = "collision",
22
- OVERLONG_ROWSPAN = "overlong_rowspan",
23
- MISSING = "missing",
24
- COLWIDTH_MISMATCH = "colwidth mismatch"
25
- }
26
- export declare type TableProblemCollision = {
27
- type: TableProblemTypes.COLLISION;
28
- row: number;
29
- pos: number;
30
- n: number;
31
- };
32
- export declare type TableProblemLongRowspan = {
33
- type: TableProblemTypes.OVERLONG_ROWSPAN;
34
- pos: number;
35
- n: number;
36
- };
37
- export declare type TableProblemMissing = {
38
- type: TableProblemTypes.MISSING;
39
- row: number;
40
- n: number;
41
- };
42
- export declare type TableProblemColWidthMismatch = {
43
- type: TableProblemTypes;
44
- pos: number;
45
- colwidth: number;
46
- };
47
- export declare type TableProblem = TableProblemCollision | TableProblemLongRowspan | TableProblemMissing | TableProblemColWidthMismatch;
48
- export declare const tableNewColumnMinWidth = 140;
49
- export declare class TableMap {
50
- width: number;
51
- height: number;
52
- map: number[];
53
- problems?: TableProblem[] | null;
54
- constructor(width: number, height: number, map: number[], problems?: TableProblem[] | null);
55
- findCell(pos: number): Rect;
56
- colCount(pos: number): number;
57
- nextCell(pos: number, axis: Axis, dir: number): number | null;
58
- rectBetween(a: number, b: number): Rect;
59
- cellsInRect(rect: Rect): number[];
60
- positionAt(row: number, col: number, table: PMNode): number;
61
- static get(table: PMNode): TableMap;
62
- }
@@ -1,36 +0,0 @@
1
- import { Fragment, ResolvedPos } from 'prosemirror-model';
2
- import { EditorState, Transaction } from 'prosemirror-state';
3
- import { EditorView } from 'prosemirror-view';
4
- export interface CellAttributes {
5
- colspan?: number;
6
- rowspan?: number;
7
- colwidth?: number[];
8
- background?: string;
9
- }
10
- export interface SelectionBounds {
11
- $from: ResolvedPos;
12
- $to: ResolvedPos;
13
- }
14
- export interface SerializedCellSelection {
15
- type: 'cell';
16
- anchor: number;
17
- head: number;
18
- }
19
- export interface CellSelectionRect {
20
- height: number;
21
- width: number;
22
- rows: Fragment[];
23
- }
24
- export declare type Axis = 'horiz' | 'vert';
25
- export declare type Direction = -1 | 1;
26
- export declare type Dispatch = (tr: Transaction) => void;
27
- export declare type Command = (state: EditorState, dispatch?: Dispatch) => boolean;
28
- export declare type CommandWithView = (state: EditorState, dispatch?: Dispatch, view?: EditorView) => boolean;
29
- export declare type SelectionRange = {
30
- $anchor: ResolvedPos;
31
- $head: ResolvedPos;
32
- indexes: number[];
33
- };
34
- export declare type CellAttributesWithColSpan = CellAttributes & {
35
- colspan: number;
36
- };
@@ -1,2 +0,0 @@
1
- import { Transaction } from 'prosemirror-state';
2
- export declare const addColumnAt: (columnIndex: number) => (tr: Transaction) => Transaction;
@@ -1,5 +0,0 @@
1
- import { Node as PMNode } from 'prosemirror-model';
2
- import { Transaction } from 'prosemirror-state';
3
- import { TableContext, TableMap } from '../table-map';
4
- export declare function columnIsHeader(map: TableMap, table: PMNode, col: number): boolean;
5
- export declare function addColumn(tr: Transaction, { map, tableStart, table }: TableContext, col: number): Transaction;
@@ -1,3 +0,0 @@
1
- import { Transaction } from 'prosemirror-state';
2
- export declare const cloneRowAt: (rowIndex: number) => (tr: Transaction) => Transaction;
3
- export declare const addRowAt: (rowIndex: number, clonePreviousRow?: boolean | undefined) => (tr: Transaction) => Transaction;
@@ -1,3 +0,0 @@
1
- import { Transaction } from 'prosemirror-state';
2
- import { TableContext } from '../table-map';
3
- export declare function addRow(tr: Transaction, { map, tableStart, table }: TableContext, row: number): Transaction;
@@ -1,15 +0,0 @@
1
- import { Selection } from 'prosemirror-state';
2
- import { TableMap } from '../table-map';
3
- export declare function getSelectedTableInfo(selection: Selection): {
4
- table: import("prosemirror-utils").ContentNodeWithPos | undefined;
5
- map: TableMap | undefined;
6
- totalRowCount: number;
7
- totalColumnCount: number;
8
- };
9
- export declare function getSelectedCellInfo(selection: Selection): {
10
- totalRowCount: number;
11
- totalColumnCount: number;
12
- horizontalCells: number;
13
- verticalCells: number;
14
- totalCells: number;
15
- };
@@ -1,6 +0,0 @@
1
- import { ResolvedPos } from 'prosemirror-model';
2
- import { Axis } from '../types';
3
- export declare function pointsAtCell($pos: ResolvedPos): false | import("prosemirror-model").Node<any> | null | undefined;
4
- export declare function cellNear($pos: ResolvedPos): ResolvedPos | null;
5
- export declare function cellAround($pos: ResolvedPos): ResolvedPos | null;
6
- export declare function nextCell($pos: ResolvedPos, axis: Axis, dir: number): ResolvedPos | null;
@@ -1,2 +0,0 @@
1
- import { Transaction } from 'prosemirror-state';
2
- export declare const cloneTr: (tr: Transaction) => Transaction;
@@ -1,4 +0,0 @@
1
- import { 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,8 +0,0 @@
1
- import { NodeType, Node as PMNode, Slice } from 'prosemirror-model';
2
- import { EditorState } from 'prosemirror-state';
3
- import { Rect } from '../table-map';
4
- import { CellSelectionRect, Dispatch } from '../types';
5
- export declare function pastedCells(slice: Slice): CellSelectionRect | null;
6
- export declare function fitSlice(nodeType: NodeType, slice: Slice): PMNode;
7
- export declare function clipCells({ width: currentWidth, height: currentHeight, rows: currentRows, }: CellSelectionRect, newWidth: number, newHeight: number): CellSelectionRect;
8
- export declare function insertCells(state: EditorState, dispatch: Dispatch, tableStart: number, rect: Rect, cells: CellSelectionRect): void;
@@ -1,10 +0,0 @@
1
- import { Node as PMNode, Schema } from 'prosemirror-model';
2
- declare type CreateTableProps = {
3
- schema: Schema;
4
- rowsCount?: number;
5
- colsCount?: number;
6
- withHeaderRow?: boolean;
7
- cellContent?: PMNode;
8
- };
9
- export declare const createTable: ({ schema, rowsCount, colsCount, withHeaderRow, cellContent, }: CreateTableProps) => PMNode;
10
- export {};
@@ -1,3 +0,0 @@
1
- import { EditorState } from 'prosemirror-state';
2
- import { DecorationSet } from 'prosemirror-view';
3
- export declare function drawCellSelection(state: EditorState): DecorationSet | null;
@@ -1,4 +0,0 @@
1
- import { Schema } from 'prosemirror-model';
2
- import { Transaction } from 'prosemirror-state';
3
- import { NodeWithPos } from 'prosemirror-utils';
4
- export declare const emptyCell: (cell: NodeWithPos, schema: Schema) => (tr: Transaction) => Transaction;
@@ -1,8 +0,0 @@
1
- import { ResolvedPos } from 'prosemirror-model';
2
- import { Selection } from 'prosemirror-state';
3
- import { ContentNodeWithPos } from 'prosemirror-utils';
4
- import { 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 { Node } from 'prosemirror-model';
2
- import { EditorState, Transaction } from 'prosemirror-state';
3
- export declare type ReportFixedTable = ({ state, tr, reason, }: {
4
- state: EditorState;
5
- tr: Transaction;
6
- reason: string;
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 { Transaction } from 'prosemirror-state';
2
- import { ContentNodeWithPos } from 'prosemirror-utils';
3
- export declare const forEachCellInColumn: (columnIndex: number, cellTransform: (cell: ContentNodeWithPos, tr: Transaction) => Transaction, setCursorToLastCell?: boolean | undefined) => (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 { ResolvedPos } from 'prosemirror-model';
2
- import { SelectionRange } from 'prosemirror-state';
3
- export declare function getCellSelectionRanges($anchorCell: ResolvedPos, $headCell: ResolvedPos): SelectionRange[];
@@ -1,3 +0,0 @@
1
- import { Selection } from 'prosemirror-state';
2
- import { ContentNodeWithPos } from 'prosemirror-utils';
3
- export declare const getCellsInColumn: (columnIndexes: number | number[]) => (selection: Selection) => ContentNodeWithPos[] | undefined;
@@ -1,3 +0,0 @@
1
- import { Selection } from 'prosemirror-state';
2
- import { ContentNodeWithPos } from 'prosemirror-utils';
3
- export declare const getCellsInRow: (rowIndex: number | number[]) => (selection: Selection) => ContentNodeWithPos[] | undefined;
@@ -1,3 +0,0 @@
1
- import { Selection } from 'prosemirror-state';
2
- import { ContentNodeWithPos } from 'prosemirror-utils';
3
- export declare const getCellsInTable: (selection: Selection) => ContentNodeWithPos[] | undefined;
@@ -1,3 +0,0 @@
1
- import { Transaction } from 'prosemirror-state';
2
- import { SelectionRange } from '../types';
3
- export declare const getSelectionRangeInColumn: (columnIndex: number) => (tr: Transaction) => SelectionRange | undefined;
@@ -1,3 +0,0 @@
1
- import { Transaction } from 'prosemirror-state';
2
- import { SelectionRange } from '../types';
3
- export declare const getSelectionRangeInRow: (rowIndex: number) => (tr: Transaction) => SelectionRange | undefined;
@@ -1,3 +0,0 @@
1
- import { Selection } from 'prosemirror-state';
2
- import { Rect } from '../table-map';
3
- export declare const getSelectionRect: (selection: Selection) => Rect | undefined;
@@ -1,2 +0,0 @@
1
- import { Command, Direction } from '../types';
2
- export declare function goToNextCell(direction: Direction): Command;
@@ -1,3 +0,0 @@
1
- import { Slice } from 'prosemirror-model';
2
- import { EditorView } from 'prosemirror-view';
3
- export declare function handlePaste(view: EditorView, event: Event | null, slice: Slice): boolean;
@@ -1,6 +0,0 @@
1
- import { Selection } from 'prosemirror-state';
2
- import { 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 { ResolvedPos } from 'prosemirror-model';
2
- import { NodeSelection, Selection, TextSelection } from '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,5 +0,0 @@
1
- import { Transaction } from 'prosemirror-state';
2
- export declare const moveColumn: (originColumnIndex: number, targetColumnIndex: number, options?: {
3
- tryToFit: boolean;
4
- direction: number;
5
- }) => (tr: Transaction) => Transaction;
@@ -1,5 +0,0 @@
1
- import { Transaction } from 'prosemirror-state';
2
- export declare const moveRow: (originRowIndex: number, targetRowIndex: number, options?: {
3
- tryToFit: boolean;
4
- direction: number;
5
- }) => (tr: Transaction) => Transaction;
@@ -1,2 +0,0 @@
1
- import { EditorState, Transaction } from 'prosemirror-state';
2
- export declare function normalizeSelection(state: EditorState, transaction?: Transaction, allowTableNodeSelection?: boolean): Transaction | undefined;
@@ -1,5 +0,0 @@
1
- import { ResolvedPos } from 'prosemirror-model';
2
- import { Transaction } from '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 { ResolvedPos } from 'prosemirror-model';
2
- import { Transaction } from '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 { Transaction } from 'prosemirror-state';
2
- export declare const removeTable: (tr: Transaction) => Transaction;
@@ -1,10 +0,0 @@
1
- import { Node as PMNode } from 'prosemirror-model';
2
- import { NodeWithPos } from 'prosemirror-utils';
3
- declare 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 'prosemirror-model';
2
- import { EditorState, Transaction } from 'prosemirror-state';
3
- export declare const replaceSelectedTable: (state: EditorState, content: string | Slice) => Transaction;
@@ -1,4 +0,0 @@
1
- import { Transaction } from 'prosemirror-state';
2
- export declare const selectColumn: (index: number, expand?: boolean | undefined) => (tr: Transaction) => Transaction;
3
- export declare const selectRow: (index: number, expand?: boolean | undefined) => (tr: Transaction) => Transaction;
4
- export declare const selectTable: (tr: Transaction) => Transaction;
@@ -1,3 +0,0 @@
1
- import { ResolvedPos } from 'prosemirror-model';
2
- import { Selection } from 'prosemirror-state';
3
- export declare function selectionCell(selection: Selection): ResolvedPos | null;
@@ -1,4 +0,0 @@
1
- import { EditorState } from 'prosemirror-state';
2
- import { Rect, TableContext } from '../table-map';
3
- export declare type SelectionRect = Rect & TableContext;
4
- export declare function selectedRect(state: EditorState): SelectionRect;
@@ -1,4 +0,0 @@
1
- import { Transaction } from 'prosemirror-state';
2
- import { NodeWithPos } from 'prosemirror-utils';
3
- import { CellAttributes } from '../types';
4
- export declare const setCellAttrs: (cell: NodeWithPos, attrs: CellAttributes) => (tr: Transaction) => Transaction;
@@ -1,11 +0,0 @@
1
- import { NodeType, Node as PMNode, ResolvedPos } from 'prosemirror-model';
2
- import { Command } from '../types';
3
- export declare function cellWrapping($pos: ResolvedPos): PMNode | null;
4
- export declare type GetCellTypeArgs = {
5
- row: number;
6
- col: number;
7
- node: PMNode;
8
- };
9
- declare type GetCellTypeCallback = (option: GetCellTypeArgs) => NodeType;
10
- export declare function splitCellWithType(getCellType: GetCellTypeCallback): Command;
11
- export {};
@@ -1,2 +0,0 @@
1
- import { Command } from '../types';
2
- export declare const splitCell: Command;
@@ -1,5 +0,0 @@
1
- import { NodeType, Schema } from 'prosemirror-model';
2
- export declare type TableNodeCache = {
3
- [key: string]: NodeType;
4
- };
5
- export declare function tableNodeTypes(schema: Schema): TableNodeCache;
@@ -1,4 +0,0 @@
1
- import { ResolvedPos } from 'prosemirror-model';
2
- import { EditorState } from '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 { 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,3 +0,0 @@
1
- import { Command } from '../types';
2
- export declare type ToggleType = 'column' | 'row';
3
- 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,43 +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 { normalizeSelection } from './utils/normalize-selection';
27
- export { removeColumnAt, removeSelectedColumns, removeColumnClosestToPos, } from './utils/remove-column';
28
- export { removeRowAt, removeSelectedRows, removeRowClosestToPos, } from './utils/remove-row';
29
- export { removeTable } from './utils/remove-table';
30
- export { selectColumn, selectRow, selectTable } from './utils/select-nodes';
31
- export { selectionCell } from './utils/selection-cell';
32
- export { selectedRect } from './utils/selection-rect';
33
- export type { SelectionRect } from './utils/selection-rect';
34
- export { setCellAttrs } from './utils/set-cell-attrs';
35
- export { cellWrapping, splitCellWithType } from './utils/split-cell-with-type';
36
- export { splitCell } from './utils/split-cell';
37
- export { tableNodeTypes } from './utils/table-node-types';
38
- export { isInTable, inSameTable } from './utils/tables';
39
- export { toggleHeader } from './utils/toggle-header';
40
- export { convertArrayOfRowsToTableNode, convertTableNodeToArrayOfRows, } from './utils/reorder-utils';
41
- export { handlePaste } from './utils/handle-paste';
42
- export { replaceSelectedTable } from './utils/replace-table';
43
- export { getSelectedTableInfo, getSelectedCellInfo, } from './utils/analytics-helpers';