@tiptap/extension-table 3.0.0 → 3.0.1

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 (230) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +5 -1
  3. package/dist/cell/index.cjs +68 -0
  4. package/dist/cell/index.cjs.map +1 -0
  5. package/dist/cell/index.d.cts +33 -0
  6. package/dist/cell/index.d.ts +33 -0
  7. package/dist/cell/index.js +41 -0
  8. package/dist/cell/index.js.map +1 -0
  9. package/dist/header/index.cjs +68 -0
  10. package/dist/header/index.cjs.map +1 -0
  11. package/dist/header/index.d.cts +33 -0
  12. package/dist/header/index.d.ts +33 -0
  13. package/dist/header/index.js +41 -0
  14. package/dist/header/index.js.map +1 -0
  15. package/dist/index.cjs +480 -321
  16. package/dist/index.cjs.map +1 -1
  17. package/dist/index.d.cts +305 -0
  18. package/dist/index.d.ts +305 -0
  19. package/dist/index.js +465 -316
  20. package/dist/index.js.map +1 -1
  21. package/dist/kit/index.cjs +497 -0
  22. package/dist/kit/index.cjs.map +1 -0
  23. package/dist/kit/index.d.cts +252 -0
  24. package/dist/kit/index.d.ts +252 -0
  25. package/dist/kit/index.js +490 -0
  26. package/dist/kit/index.js.map +1 -0
  27. package/dist/row/index.cjs +49 -0
  28. package/dist/row/index.cjs.map +1 -0
  29. package/dist/row/index.d.cts +33 -0
  30. package/dist/row/index.d.ts +33 -0
  31. package/dist/row/index.js +22 -0
  32. package/dist/row/index.js.map +1 -0
  33. package/dist/table/index.cjs +384 -0
  34. package/dist/table/index.cjs.map +1 -0
  35. package/dist/{packages/extension-table/src/table.d.ts → table/index.d.cts} +45 -19
  36. package/dist/table/index.d.ts +220 -0
  37. package/dist/table/index.js +373 -0
  38. package/dist/table/index.js.map +1 -0
  39. package/package.json +53 -11
  40. package/src/cell/index.ts +1 -0
  41. package/src/cell/table-cell.ts +60 -0
  42. package/src/header/index.ts +1 -0
  43. package/src/header/table-header.ts +60 -0
  44. package/src/index.ts +6 -7
  45. package/src/kit/index.ts +64 -0
  46. package/src/row/index.ts +1 -0
  47. package/src/row/table-row.ts +38 -0
  48. package/src/table/TableView.ts +108 -0
  49. package/src/table/index.ts +3 -0
  50. package/src/{table.ts → table/table.ts} +56 -64
  51. package/src/table/utilities/colStyle.ts +9 -0
  52. package/src/{utilities → table/utilities}/createCell.ts +1 -1
  53. package/src/{utilities → table/utilities}/createColGroup.ts +24 -6
  54. package/src/{utilities → table/utilities}/createTable.ts +1 -1
  55. package/src/{utilities → table/utilities}/deleteTableWhenAllCellsSelected.ts +2 -1
  56. package/src/{utilities → table/utilities}/getTableNodeTypes.ts +1 -1
  57. package/src/types.ts +19 -0
  58. package/dist/index.umd.js +0 -358
  59. package/dist/index.umd.js.map +0 -1
  60. package/dist/packages/core/src/CommandManager.d.ts +0 -20
  61. package/dist/packages/core/src/Editor.d.ts +0 -161
  62. package/dist/packages/core/src/EventEmitter.d.ts +0 -11
  63. package/dist/packages/core/src/Extension.d.ts +0 -343
  64. package/dist/packages/core/src/ExtensionManager.d.ts +0 -55
  65. package/dist/packages/core/src/InputRule.d.ts +0 -42
  66. package/dist/packages/core/src/Mark.d.ts +0 -451
  67. package/dist/packages/core/src/Node.d.ts +0 -611
  68. package/dist/packages/core/src/NodePos.d.ts +0 -44
  69. package/dist/packages/core/src/NodeView.d.ts +0 -31
  70. package/dist/packages/core/src/PasteRule.d.ts +0 -50
  71. package/dist/packages/core/src/Tracker.d.ts +0 -11
  72. package/dist/packages/core/src/commands/blur.d.ts +0 -13
  73. package/dist/packages/core/src/commands/clearContent.d.ts +0 -14
  74. package/dist/packages/core/src/commands/clearNodes.d.ts +0 -13
  75. package/dist/packages/core/src/commands/command.d.ts +0 -18
  76. package/dist/packages/core/src/commands/createParagraphNear.d.ts +0 -13
  77. package/dist/packages/core/src/commands/cut.d.ts +0 -20
  78. package/dist/packages/core/src/commands/deleteCurrentNode.d.ts +0 -13
  79. package/dist/packages/core/src/commands/deleteNode.d.ts +0 -15
  80. package/dist/packages/core/src/commands/deleteRange.d.ts +0 -14
  81. package/dist/packages/core/src/commands/deleteSelection.d.ts +0 -13
  82. package/dist/packages/core/src/commands/enter.d.ts +0 -13
  83. package/dist/packages/core/src/commands/exitCode.d.ts +0 -13
  84. package/dist/packages/core/src/commands/extendMarkRange.d.ts +0 -25
  85. package/dist/packages/core/src/commands/first.d.ts +0 -14
  86. package/dist/packages/core/src/commands/focus.d.ts +0 -27
  87. package/dist/packages/core/src/commands/forEach.d.ts +0 -14
  88. package/dist/packages/core/src/commands/index.d.ts +0 -55
  89. package/dist/packages/core/src/commands/insertContent.d.ts +0 -34
  90. package/dist/packages/core/src/commands/insertContentAt.d.ts +0 -47
  91. package/dist/packages/core/src/commands/join.d.ts +0 -41
  92. package/dist/packages/core/src/commands/joinItemBackward.d.ts +0 -13
  93. package/dist/packages/core/src/commands/joinItemForward.d.ts +0 -13
  94. package/dist/packages/core/src/commands/joinTextblockBackward.d.ts +0 -12
  95. package/dist/packages/core/src/commands/joinTextblockForward.d.ts +0 -12
  96. package/dist/packages/core/src/commands/keyboardShortcut.d.ts +0 -14
  97. package/dist/packages/core/src/commands/lift.d.ts +0 -17
  98. package/dist/packages/core/src/commands/liftEmptyBlock.d.ts +0 -13
  99. package/dist/packages/core/src/commands/liftListItem.d.ts +0 -15
  100. package/dist/packages/core/src/commands/newlineInCode.d.ts +0 -13
  101. package/dist/packages/core/src/commands/resetAttributes.d.ts +0 -16
  102. package/dist/packages/core/src/commands/scrollIntoView.d.ts +0 -13
  103. package/dist/packages/core/src/commands/selectAll.d.ts +0 -13
  104. package/dist/packages/core/src/commands/selectNodeBackward.d.ts +0 -13
  105. package/dist/packages/core/src/commands/selectNodeForward.d.ts +0 -13
  106. package/dist/packages/core/src/commands/selectParentNode.d.ts +0 -13
  107. package/dist/packages/core/src/commands/selectTextblockEnd.d.ts +0 -13
  108. package/dist/packages/core/src/commands/selectTextblockStart.d.ts +0 -13
  109. package/dist/packages/core/src/commands/setContent.d.ts +0 -40
  110. package/dist/packages/core/src/commands/setMark.d.ts +0 -15
  111. package/dist/packages/core/src/commands/setMeta.d.ts +0 -15
  112. package/dist/packages/core/src/commands/setNode.d.ts +0 -16
  113. package/dist/packages/core/src/commands/setNodeSelection.d.ts +0 -14
  114. package/dist/packages/core/src/commands/setTextSelection.d.ts +0 -14
  115. package/dist/packages/core/src/commands/sinkListItem.d.ts +0 -15
  116. package/dist/packages/core/src/commands/splitBlock.d.ts +0 -17
  117. package/dist/packages/core/src/commands/splitListItem.d.ts +0 -15
  118. package/dist/packages/core/src/commands/toggleList.d.ts +0 -18
  119. package/dist/packages/core/src/commands/toggleMark.d.ts +0 -30
  120. package/dist/packages/core/src/commands/toggleNode.d.ts +0 -17
  121. package/dist/packages/core/src/commands/toggleWrap.d.ts +0 -16
  122. package/dist/packages/core/src/commands/undoInputRule.d.ts +0 -13
  123. package/dist/packages/core/src/commands/unsetAllMarks.d.ts +0 -13
  124. package/dist/packages/core/src/commands/unsetMark.d.ts +0 -25
  125. package/dist/packages/core/src/commands/updateAttributes.d.ts +0 -24
  126. package/dist/packages/core/src/commands/wrapIn.d.ts +0 -16
  127. package/dist/packages/core/src/commands/wrapInList.d.ts +0 -16
  128. package/dist/packages/core/src/extensions/clipboardTextSerializer.d.ts +0 -5
  129. package/dist/packages/core/src/extensions/commands.d.ts +0 -3
  130. package/dist/packages/core/src/extensions/editable.d.ts +0 -2
  131. package/dist/packages/core/src/extensions/focusEvents.d.ts +0 -2
  132. package/dist/packages/core/src/extensions/index.d.ts +0 -6
  133. package/dist/packages/core/src/extensions/keymap.d.ts +0 -2
  134. package/dist/packages/core/src/extensions/tabindex.d.ts +0 -2
  135. package/dist/packages/core/src/helpers/combineTransactionSteps.d.ts +0 -10
  136. package/dist/packages/core/src/helpers/createChainableState.d.ts +0 -10
  137. package/dist/packages/core/src/helpers/createDocument.d.ts +0 -12
  138. package/dist/packages/core/src/helpers/createNodeFromContent.d.ts +0 -15
  139. package/dist/packages/core/src/helpers/defaultBlockAt.d.ts +0 -7
  140. package/dist/packages/core/src/helpers/findChildren.d.ts +0 -9
  141. package/dist/packages/core/src/helpers/findChildrenInRange.d.ts +0 -10
  142. package/dist/packages/core/src/helpers/findParentNode.d.ts +0 -16
  143. package/dist/packages/core/src/helpers/findParentNodeClosestToPos.d.ts +0 -17
  144. package/dist/packages/core/src/helpers/generateHTML.d.ts +0 -8
  145. package/dist/packages/core/src/helpers/generateJSON.d.ts +0 -8
  146. package/dist/packages/core/src/helpers/generateText.d.ts +0 -12
  147. package/dist/packages/core/src/helpers/getAttributes.d.ts +0 -9
  148. package/dist/packages/core/src/helpers/getAttributesFromExtensions.d.ts +0 -6
  149. package/dist/packages/core/src/helpers/getChangedRanges.d.ts +0 -11
  150. package/dist/packages/core/src/helpers/getDebugJSON.d.ts +0 -8
  151. package/dist/packages/core/src/helpers/getExtensionField.d.ts +0 -9
  152. package/dist/packages/core/src/helpers/getHTMLFromFragment.d.ts +0 -2
  153. package/dist/packages/core/src/helpers/getMarkAttributes.d.ts +0 -3
  154. package/dist/packages/core/src/helpers/getMarkRange.d.ts +0 -3
  155. package/dist/packages/core/src/helpers/getMarkType.d.ts +0 -2
  156. package/dist/packages/core/src/helpers/getMarksBetween.d.ts +0 -3
  157. package/dist/packages/core/src/helpers/getNodeAtPosition.d.ts +0 -11
  158. package/dist/packages/core/src/helpers/getNodeAttributes.d.ts +0 -3
  159. package/dist/packages/core/src/helpers/getNodeType.d.ts +0 -2
  160. package/dist/packages/core/src/helpers/getRenderedAttributes.d.ts +0 -3
  161. package/dist/packages/core/src/helpers/getSchema.d.ts +0 -4
  162. package/dist/packages/core/src/helpers/getSchemaByResolvedExtensions.d.ts +0 -10
  163. package/dist/packages/core/src/helpers/getSchemaTypeByName.d.ts +0 -8
  164. package/dist/packages/core/src/helpers/getSchemaTypeNameByName.d.ts +0 -8
  165. package/dist/packages/core/src/helpers/getSplittedAttributes.d.ts +0 -9
  166. package/dist/packages/core/src/helpers/getText.d.ts +0 -15
  167. package/dist/packages/core/src/helpers/getTextBetween.d.ts +0 -14
  168. package/dist/packages/core/src/helpers/getTextContentFromNodes.d.ts +0 -8
  169. package/dist/packages/core/src/helpers/getTextSerializersFromSchema.d.ts +0 -8
  170. package/dist/packages/core/src/helpers/index.d.ts +0 -50
  171. package/dist/packages/core/src/helpers/injectExtensionAttributesToParseRule.d.ts +0 -9
  172. package/dist/packages/core/src/helpers/isActive.d.ts +0 -2
  173. package/dist/packages/core/src/helpers/isAtEndOfNode.d.ts +0 -2
  174. package/dist/packages/core/src/helpers/isAtStartOfNode.d.ts +0 -2
  175. package/dist/packages/core/src/helpers/isExtensionRulesEnabled.d.ts +0 -2
  176. package/dist/packages/core/src/helpers/isList.d.ts +0 -2
  177. package/dist/packages/core/src/helpers/isMarkActive.d.ts +0 -3
  178. package/dist/packages/core/src/helpers/isNodeActive.d.ts +0 -3
  179. package/dist/packages/core/src/helpers/isNodeEmpty.d.ts +0 -2
  180. package/dist/packages/core/src/helpers/isNodeSelection.d.ts +0 -2
  181. package/dist/packages/core/src/helpers/isTextSelection.d.ts +0 -2
  182. package/dist/packages/core/src/helpers/posToDOMRect.d.ts +0 -2
  183. package/dist/packages/core/src/helpers/resolveFocusPosition.d.ts +0 -4
  184. package/dist/packages/core/src/helpers/selectionToInsertionEnd.d.ts +0 -2
  185. package/dist/packages/core/src/helpers/splitExtensions.d.ts +0 -9
  186. package/dist/packages/core/src/index.d.ts +0 -24
  187. package/dist/packages/core/src/inputRules/index.d.ts +0 -5
  188. package/dist/packages/core/src/inputRules/markInputRule.d.ts +0 -13
  189. package/dist/packages/core/src/inputRules/nodeInputRule.d.ts +0 -23
  190. package/dist/packages/core/src/inputRules/textInputRule.d.ts +0 -10
  191. package/dist/packages/core/src/inputRules/textblockTypeInputRule.d.ts +0 -15
  192. package/dist/packages/core/src/inputRules/wrappingInputRule.d.ts +0 -28
  193. package/dist/packages/core/src/pasteRules/index.d.ts +0 -3
  194. package/dist/packages/core/src/pasteRules/markPasteRule.d.ts +0 -13
  195. package/dist/packages/core/src/pasteRules/nodePasteRule.d.ts +0 -13
  196. package/dist/packages/core/src/pasteRules/textPasteRule.d.ts +0 -10
  197. package/dist/packages/core/src/style.d.ts +0 -1
  198. package/dist/packages/core/src/types.d.ts +0 -255
  199. package/dist/packages/core/src/utilities/callOrReturn.d.ts +0 -9
  200. package/dist/packages/core/src/utilities/createStyleTag.d.ts +0 -1
  201. package/dist/packages/core/src/utilities/deleteProps.d.ts +0 -6
  202. package/dist/packages/core/src/utilities/elementFromString.d.ts +0 -1
  203. package/dist/packages/core/src/utilities/escapeForRegEx.d.ts +0 -1
  204. package/dist/packages/core/src/utilities/findDuplicates.d.ts +0 -1
  205. package/dist/packages/core/src/utilities/fromString.d.ts +0 -1
  206. package/dist/packages/core/src/utilities/index.d.ts +0 -20
  207. package/dist/packages/core/src/utilities/isAndroid.d.ts +0 -1
  208. package/dist/packages/core/src/utilities/isEmptyObject.d.ts +0 -1
  209. package/dist/packages/core/src/utilities/isFunction.d.ts +0 -1
  210. package/dist/packages/core/src/utilities/isMacOS.d.ts +0 -1
  211. package/dist/packages/core/src/utilities/isNumber.d.ts +0 -1
  212. package/dist/packages/core/src/utilities/isPlainObject.d.ts +0 -1
  213. package/dist/packages/core/src/utilities/isRegExp.d.ts +0 -1
  214. package/dist/packages/core/src/utilities/isString.d.ts +0 -1
  215. package/dist/packages/core/src/utilities/isiOS.d.ts +0 -1
  216. package/dist/packages/core/src/utilities/mergeAttributes.d.ts +0 -1
  217. package/dist/packages/core/src/utilities/mergeDeep.d.ts +0 -1
  218. package/dist/packages/core/src/utilities/minMax.d.ts +0 -1
  219. package/dist/packages/core/src/utilities/objectIncludes.d.ts +0 -8
  220. package/dist/packages/core/src/utilities/removeDuplicates.d.ts +0 -8
  221. package/dist/packages/extension-table/src/TableView.d.ts +0 -17
  222. package/dist/packages/extension-table/src/index.d.ts +0 -5
  223. package/dist/packages/extension-table/src/utilities/createCell.d.ts +0 -2
  224. package/dist/packages/extension-table/src/utilities/createColGroup.d.ts +0 -19
  225. package/dist/packages/extension-table/src/utilities/createTable.d.ts +0 -2
  226. package/dist/packages/extension-table/src/utilities/deleteTableWhenAllCellsSelected.d.ts +0 -2
  227. package/dist/packages/extension-table/src/utilities/getTableNodeTypes.d.ts +0 -4
  228. package/dist/packages/extension-table/src/utilities/isCellSelection.d.ts +0 -2
  229. package/src/TableView.ts +0 -100
  230. /package/src/{utilities → table/utilities}/isCellSelection.ts +0 -0
package/dist/index.js CHANGED
@@ -1,349 +1,498 @@
1
- import { findParentNodeClosestToPos, Node, mergeAttributes, callOrReturn, getExtensionField } from '@tiptap/core';
2
- import { TextSelection } from '@tiptap/pm/state';
3
- import { CellSelection, addColumnBefore, addColumnAfter, deleteColumn, addRowBefore, addRowAfter, deleteRow, deleteTable, mergeCells, splitCell, toggleHeader, toggleHeaderCell, setCellAttr, goToNextCell, fixTables, columnResizing, tableEditing } from '@tiptap/pm/tables';
1
+ // src/cell/table-cell.ts
2
+ import { mergeAttributes, Node } from "@tiptap/core";
3
+ var TableCell = Node.create({
4
+ name: "tableCell",
5
+ addOptions() {
6
+ return {
7
+ HTMLAttributes: {}
8
+ };
9
+ },
10
+ content: "block+",
11
+ addAttributes() {
12
+ return {
13
+ colspan: {
14
+ default: 1
15
+ },
16
+ rowspan: {
17
+ default: 1
18
+ },
19
+ colwidth: {
20
+ default: null,
21
+ parseHTML: (element) => {
22
+ const colwidth = element.getAttribute("colwidth");
23
+ const value = colwidth ? colwidth.split(",").map((width) => parseInt(width, 10)) : null;
24
+ return value;
25
+ }
26
+ }
27
+ };
28
+ },
29
+ tableRole: "cell",
30
+ isolating: true,
31
+ parseHTML() {
32
+ return [{ tag: "td" }];
33
+ },
34
+ renderHTML({ HTMLAttributes }) {
35
+ return ["td", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
36
+ }
37
+ });
38
+
39
+ // src/header/table-header.ts
40
+ import { mergeAttributes as mergeAttributes2, Node as Node2 } from "@tiptap/core";
41
+ var TableHeader = Node2.create({
42
+ name: "tableHeader",
43
+ addOptions() {
44
+ return {
45
+ HTMLAttributes: {}
46
+ };
47
+ },
48
+ content: "block+",
49
+ addAttributes() {
50
+ return {
51
+ colspan: {
52
+ default: 1
53
+ },
54
+ rowspan: {
55
+ default: 1
56
+ },
57
+ colwidth: {
58
+ default: null,
59
+ parseHTML: (element) => {
60
+ const colwidth = element.getAttribute("colwidth");
61
+ const value = colwidth ? colwidth.split(",").map((width) => parseInt(width, 10)) : null;
62
+ return value;
63
+ }
64
+ }
65
+ };
66
+ },
67
+ tableRole: "header_cell",
68
+ isolating: true,
69
+ parseHTML() {
70
+ return [{ tag: "th" }];
71
+ },
72
+ renderHTML({ HTMLAttributes }) {
73
+ return ["th", mergeAttributes2(this.options.HTMLAttributes, HTMLAttributes), 0];
74
+ }
75
+ });
76
+
77
+ // src/kit/index.ts
78
+ import { Extension } from "@tiptap/core";
4
79
 
80
+ // src/row/table-row.ts
81
+ import { mergeAttributes as mergeAttributes3, Node as Node3 } from "@tiptap/core";
82
+ var TableRow = Node3.create({
83
+ name: "tableRow",
84
+ addOptions() {
85
+ return {
86
+ HTMLAttributes: {}
87
+ };
88
+ },
89
+ content: "(tableCell | tableHeader)*",
90
+ tableRole: "row",
91
+ parseHTML() {
92
+ return [{ tag: "tr" }];
93
+ },
94
+ renderHTML({ HTMLAttributes }) {
95
+ return ["tr", mergeAttributes3(this.options.HTMLAttributes, HTMLAttributes), 0];
96
+ }
97
+ });
98
+
99
+ // src/table/table.ts
100
+ import { callOrReturn, getExtensionField, mergeAttributes as mergeAttributes4, Node as Node4 } from "@tiptap/core";
101
+ import { TextSelection } from "@tiptap/pm/state";
102
+ import {
103
+ addColumnAfter,
104
+ addColumnBefore,
105
+ addRowAfter,
106
+ addRowBefore,
107
+ CellSelection as CellSelection2,
108
+ columnResizing,
109
+ deleteColumn,
110
+ deleteRow,
111
+ deleteTable,
112
+ fixTables,
113
+ goToNextCell,
114
+ mergeCells,
115
+ setCellAttr,
116
+ splitCell,
117
+ tableEditing,
118
+ toggleHeader,
119
+ toggleHeaderCell
120
+ } from "@tiptap/pm/tables";
121
+
122
+ // src/table/utilities/colStyle.ts
123
+ function getColStyleDeclaration(minWidth, width) {
124
+ if (width) {
125
+ return ["width", `${Math.max(width, minWidth)}px`];
126
+ }
127
+ return ["min-width", `${minWidth}px`];
128
+ }
129
+
130
+ // src/table/TableView.ts
5
131
  function updateColumns(node, colgroup, table, cellMinWidth, overrideCol, overrideValue) {
6
- let totalWidth = 0;
7
- let fixedWidth = true;
8
- let nextDOM = colgroup.firstChild;
9
- const row = node.firstChild;
132
+ var _a;
133
+ let totalWidth = 0;
134
+ let fixedWidth = true;
135
+ let nextDOM = colgroup.firstChild;
136
+ const row = node.firstChild;
137
+ if (row !== null) {
10
138
  for (let i = 0, col = 0; i < row.childCount; i += 1) {
11
- const { colspan, colwidth } = row.child(i).attrs;
12
- for (let j = 0; j < colspan; j += 1, col += 1) {
13
- const hasWidth = overrideCol === col ? overrideValue : colwidth && colwidth[j];
14
- const cssWidth = hasWidth ? `${hasWidth}px` : '';
15
- totalWidth += hasWidth || cellMinWidth;
16
- if (!hasWidth) {
17
- fixedWidth = false;
18
- }
19
- if (!nextDOM) {
20
- colgroup.appendChild(document.createElement('col')).style.width = cssWidth;
21
- }
22
- else {
23
- if (nextDOM.style.width !== cssWidth) {
24
- nextDOM.style.width = cssWidth;
25
- }
26
- nextDOM = nextDOM.nextSibling;
27
- }
139
+ const { colspan, colwidth } = row.child(i).attrs;
140
+ for (let j = 0; j < colspan; j += 1, col += 1) {
141
+ const hasWidth = overrideCol === col ? overrideValue : colwidth && colwidth[j];
142
+ const cssWidth = hasWidth ? `${hasWidth}px` : "";
143
+ totalWidth += hasWidth || cellMinWidth;
144
+ if (!hasWidth) {
145
+ fixedWidth = false;
28
146
  }
29
- }
30
- while (nextDOM) {
31
- const after = nextDOM.nextSibling;
32
- nextDOM.parentNode.removeChild(nextDOM);
33
- nextDOM = after;
34
- }
35
- if (fixedWidth) {
36
- table.style.width = `${totalWidth}px`;
37
- table.style.minWidth = '';
38
- }
39
- else {
40
- table.style.width = '';
41
- table.style.minWidth = `${totalWidth}px`;
42
- }
43
- }
44
- class TableView {
45
- constructor(node, cellMinWidth) {
46
- this.node = node;
47
- this.cellMinWidth = cellMinWidth;
48
- this.dom = document.createElement('div');
49
- this.dom.className = 'tableWrapper';
50
- this.table = this.dom.appendChild(document.createElement('table'));
51
- this.colgroup = this.table.appendChild(document.createElement('colgroup'));
52
- updateColumns(node, this.colgroup, this.table, cellMinWidth);
53
- this.contentDOM = this.table.appendChild(document.createElement('tbody'));
54
- }
55
- update(node) {
56
- if (node.type !== this.node.type) {
57
- return false;
147
+ if (!nextDOM) {
148
+ const colElement = document.createElement("col");
149
+ const [propertyKey, propertyValue] = getColStyleDeclaration(cellMinWidth, hasWidth);
150
+ colElement.style.setProperty(propertyKey, propertyValue);
151
+ colgroup.appendChild(colElement);
152
+ } else {
153
+ if (nextDOM.style.width !== cssWidth) {
154
+ const [propertyKey, propertyValue] = getColStyleDeclaration(cellMinWidth, hasWidth);
155
+ nextDOM.style.setProperty(propertyKey, propertyValue);
156
+ }
157
+ nextDOM = nextDOM.nextSibling;
58
158
  }
59
- this.node = node;
60
- updateColumns(node, this.colgroup, this.table, this.cellMinWidth);
61
- return true;
62
- }
63
- ignoreMutation(mutation) {
64
- return (mutation.type === 'attributes'
65
- && (mutation.target === this.table || this.colgroup.contains(mutation.target)));
159
+ }
66
160
  }
161
+ }
162
+ while (nextDOM) {
163
+ const after = nextDOM.nextSibling;
164
+ (_a = nextDOM.parentNode) == null ? void 0 : _a.removeChild(nextDOM);
165
+ nextDOM = after;
166
+ }
167
+ if (fixedWidth) {
168
+ table.style.width = `${totalWidth}px`;
169
+ table.style.minWidth = "";
170
+ } else {
171
+ table.style.width = "";
172
+ table.style.minWidth = `${totalWidth}px`;
173
+ }
67
174
  }
175
+ var TableView = class {
176
+ constructor(node, cellMinWidth) {
177
+ this.node = node;
178
+ this.cellMinWidth = cellMinWidth;
179
+ this.dom = document.createElement("div");
180
+ this.dom.className = "tableWrapper";
181
+ this.table = this.dom.appendChild(document.createElement("table"));
182
+ this.colgroup = this.table.appendChild(document.createElement("colgroup"));
183
+ updateColumns(node, this.colgroup, this.table, cellMinWidth);
184
+ this.contentDOM = this.table.appendChild(document.createElement("tbody"));
185
+ }
186
+ update(node) {
187
+ if (node.type !== this.node.type) {
188
+ return false;
189
+ }
190
+ this.node = node;
191
+ updateColumns(node, this.colgroup, this.table, this.cellMinWidth);
192
+ return true;
193
+ }
194
+ ignoreMutation(mutation) {
195
+ return mutation.type === "attributes" && (mutation.target === this.table || this.colgroup.contains(mutation.target));
196
+ }
197
+ };
68
198
 
69
- /**
70
- * Creates a colgroup element for a table node in ProseMirror.
71
- *
72
- * @param node - The ProseMirror node representing the table.
73
- * @param cellMinWidth - The minimum width of a cell in the table.
74
- * @param overrideCol - (Optional) The index of the column to override the width of.
75
- * @param overrideValue - (Optional) The width value to use for the overridden column.
76
- * @returns An object containing the colgroup element, the total width of the table, and the minimum width of the table.
77
- */
199
+ // src/table/utilities/createColGroup.ts
78
200
  function createColGroup(node, cellMinWidth, overrideCol, overrideValue) {
79
- let totalWidth = 0;
80
- let fixedWidth = true;
81
- const cols = [];
82
- const row = node.firstChild;
83
- if (!row) {
84
- return {};
85
- }
86
- for (let i = 0, col = 0; i < row.childCount; i += 1) {
87
- const { colspan, colwidth } = row.child(i).attrs;
88
- for (let j = 0; j < colspan; j += 1, col += 1) {
89
- const hasWidth = overrideCol === col ? overrideValue : colwidth && colwidth[j];
90
- const cssWidth = hasWidth ? `${hasWidth}px` : '';
91
- totalWidth += hasWidth || cellMinWidth;
92
- if (!hasWidth) {
93
- fixedWidth = false;
94
- }
95
- cols.push(['col', cssWidth ? { style: `width: ${cssWidth}` } : {}]);
96
- }
201
+ let totalWidth = 0;
202
+ let fixedWidth = true;
203
+ const cols = [];
204
+ const row = node.firstChild;
205
+ if (!row) {
206
+ return {};
207
+ }
208
+ for (let i = 0, col = 0; i < row.childCount; i += 1) {
209
+ const { colspan, colwidth } = row.child(i).attrs;
210
+ for (let j = 0; j < colspan; j += 1, col += 1) {
211
+ const hasWidth = overrideCol === col ? overrideValue : colwidth && colwidth[j];
212
+ totalWidth += hasWidth || cellMinWidth;
213
+ if (!hasWidth) {
214
+ fixedWidth = false;
215
+ }
216
+ const [property, value] = getColStyleDeclaration(cellMinWidth, hasWidth);
217
+ cols.push(["col", { style: `${property}: ${value}` }]);
97
218
  }
98
- const tableWidth = fixedWidth ? `${totalWidth}px` : '';
99
- const tableMinWidth = fixedWidth ? '' : `${totalWidth}px`;
100
- const colgroup = ['colgroup', {}, ...cols];
101
- return { colgroup, tableWidth, tableMinWidth };
219
+ }
220
+ const tableWidth = fixedWidth ? `${totalWidth}px` : "";
221
+ const tableMinWidth = fixedWidth ? "" : `${totalWidth}px`;
222
+ const colgroup = ["colgroup", {}, ...cols];
223
+ return { colgroup, tableWidth, tableMinWidth };
102
224
  }
103
225
 
226
+ // src/table/utilities/createCell.ts
104
227
  function createCell(cellType, cellContent) {
105
- if (cellContent) {
106
- return cellType.createChecked(null, cellContent);
107
- }
108
- return cellType.createAndFill();
228
+ if (cellContent) {
229
+ return cellType.createChecked(null, cellContent);
230
+ }
231
+ return cellType.createAndFill();
109
232
  }
110
233
 
234
+ // src/table/utilities/getTableNodeTypes.ts
111
235
  function getTableNodeTypes(schema) {
112
- if (schema.cached.tableNodeTypes) {
113
- return schema.cached.tableNodeTypes;
236
+ if (schema.cached.tableNodeTypes) {
237
+ return schema.cached.tableNodeTypes;
238
+ }
239
+ const roles = {};
240
+ Object.keys(schema.nodes).forEach((type) => {
241
+ const nodeType = schema.nodes[type];
242
+ if (nodeType.spec.tableRole) {
243
+ roles[nodeType.spec.tableRole] = nodeType;
114
244
  }
115
- const roles = {};
116
- Object.keys(schema.nodes).forEach(type => {
117
- const nodeType = schema.nodes[type];
118
- if (nodeType.spec.tableRole) {
119
- roles[nodeType.spec.tableRole] = nodeType;
120
- }
121
- });
122
- schema.cached.tableNodeTypes = roles;
123
- return roles;
245
+ });
246
+ schema.cached.tableNodeTypes = roles;
247
+ return roles;
124
248
  }
125
249
 
250
+ // src/table/utilities/createTable.ts
126
251
  function createTable(schema, rowsCount, colsCount, withHeaderRow, cellContent) {
127
- const types = getTableNodeTypes(schema);
128
- const headerCells = [];
129
- const cells = [];
130
- for (let index = 0; index < colsCount; index += 1) {
131
- const cell = createCell(types.cell, cellContent);
132
- if (cell) {
133
- cells.push(cell);
134
- }
135
- if (withHeaderRow) {
136
- const headerCell = createCell(types.header_cell, cellContent);
137
- if (headerCell) {
138
- headerCells.push(headerCell);
139
- }
140
- }
252
+ const types = getTableNodeTypes(schema);
253
+ const headerCells = [];
254
+ const cells = [];
255
+ for (let index = 0; index < colsCount; index += 1) {
256
+ const cell = createCell(types.cell, cellContent);
257
+ if (cell) {
258
+ cells.push(cell);
141
259
  }
142
- const rows = [];
143
- for (let index = 0; index < rowsCount; index += 1) {
144
- rows.push(types.row.createChecked(null, withHeaderRow && index === 0 ? headerCells : cells));
260
+ if (withHeaderRow) {
261
+ const headerCell = createCell(types.header_cell, cellContent);
262
+ if (headerCell) {
263
+ headerCells.push(headerCell);
264
+ }
145
265
  }
146
- return types.table.createChecked(null, rows);
266
+ }
267
+ const rows = [];
268
+ for (let index = 0; index < rowsCount; index += 1) {
269
+ rows.push(types.row.createChecked(null, withHeaderRow && index === 0 ? headerCells : cells));
270
+ }
271
+ return types.table.createChecked(null, rows);
147
272
  }
148
273
 
274
+ // src/table/utilities/deleteTableWhenAllCellsSelected.ts
275
+ import { findParentNodeClosestToPos } from "@tiptap/core";
276
+
277
+ // src/table/utilities/isCellSelection.ts
278
+ import { CellSelection } from "@tiptap/pm/tables";
149
279
  function isCellSelection(value) {
150
- return value instanceof CellSelection;
280
+ return value instanceof CellSelection;
151
281
  }
152
282
 
153
- const deleteTableWhenAllCellsSelected = ({ editor }) => {
154
- const { selection } = editor.state;
155
- if (!isCellSelection(selection)) {
156
- return false;
283
+ // src/table/utilities/deleteTableWhenAllCellsSelected.ts
284
+ var deleteTableWhenAllCellsSelected = ({ editor }) => {
285
+ const { selection } = editor.state;
286
+ if (!isCellSelection(selection)) {
287
+ return false;
288
+ }
289
+ let cellCount = 0;
290
+ const table = findParentNodeClosestToPos(selection.ranges[0].$from, (node) => {
291
+ return node.type.name === "table";
292
+ });
293
+ table == null ? void 0 : table.node.descendants((node) => {
294
+ if (node.type.name === "table") {
295
+ return false;
157
296
  }
158
- let cellCount = 0;
159
- const table = findParentNodeClosestToPos(selection.ranges[0].$from, node => {
160
- return node.type.name === 'table';
161
- });
162
- table === null || table === void 0 ? void 0 : table.node.descendants(node => {
163
- if (node.type.name === 'table') {
164
- return false;
165
- }
166
- if (['tableCell', 'tableHeader'].includes(node.type.name)) {
167
- cellCount += 1;
168
- }
169
- });
170
- const allCellsSelected = cellCount === selection.ranges.length;
171
- if (!allCellsSelected) {
172
- return false;
297
+ if (["tableCell", "tableHeader"].includes(node.type.name)) {
298
+ cellCount += 1;
173
299
  }
174
- editor.commands.deleteTable();
175
- return true;
300
+ });
301
+ const allCellsSelected = cellCount === selection.ranges.length;
302
+ if (!allCellsSelected) {
303
+ return false;
304
+ }
305
+ editor.commands.deleteTable();
306
+ return true;
176
307
  };
177
308
 
178
- /**
179
- * This extension allows you to create tables.
180
- * @see https://www.tiptap.dev/api/nodes/table
181
- */
182
- const Table = Node.create({
183
- name: 'table',
184
- // @ts-ignore
185
- addOptions() {
186
- return {
187
- HTMLAttributes: {},
188
- resizable: false,
189
- handleWidth: 5,
190
- cellMinWidth: 25,
191
- // TODO: fix
192
- View: TableView,
193
- lastColumnResizable: true,
194
- allowTableNodeSelection: false,
195
- };
196
- },
197
- content: 'tableRow+',
198
- tableRole: 'table',
199
- isolating: true,
200
- group: 'block',
201
- parseHTML() {
202
- return [{ tag: 'table' }];
203
- },
204
- renderHTML({ node, HTMLAttributes }) {
205
- const { colgroup, tableWidth, tableMinWidth } = createColGroup(node, this.options.cellMinWidth);
206
- const table = [
207
- 'table',
208
- mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, {
209
- style: tableWidth
210
- ? `width: ${tableWidth}`
211
- : `minWidth: ${tableMinWidth}`,
212
- }),
213
- colgroup,
214
- ['tbody', 0],
215
- ];
216
- return table;
217
- },
218
- addCommands() {
219
- return {
220
- insertTable: ({ rows = 3, cols = 3, withHeaderRow = true } = {}) => ({ tr, dispatch, editor }) => {
221
- const node = createTable(editor.schema, rows, cols, withHeaderRow);
222
- if (dispatch) {
223
- const offset = tr.selection.from + 1;
224
- tr.replaceSelectionWith(node)
225
- .scrollIntoView()
226
- .setSelection(TextSelection.near(tr.doc.resolve(offset)));
227
- }
228
- return true;
229
- },
230
- addColumnBefore: () => ({ state, dispatch }) => {
231
- return addColumnBefore(state, dispatch);
232
- },
233
- addColumnAfter: () => ({ state, dispatch }) => {
234
- return addColumnAfter(state, dispatch);
235
- },
236
- deleteColumn: () => ({ state, dispatch }) => {
237
- return deleteColumn(state, dispatch);
238
- },
239
- addRowBefore: () => ({ state, dispatch }) => {
240
- return addRowBefore(state, dispatch);
241
- },
242
- addRowAfter: () => ({ state, dispatch }) => {
243
- return addRowAfter(state, dispatch);
244
- },
245
- deleteRow: () => ({ state, dispatch }) => {
246
- return deleteRow(state, dispatch);
247
- },
248
- deleteTable: () => ({ state, dispatch }) => {
249
- return deleteTable(state, dispatch);
250
- },
251
- mergeCells: () => ({ state, dispatch }) => {
252
- return mergeCells(state, dispatch);
253
- },
254
- splitCell: () => ({ state, dispatch }) => {
255
- return splitCell(state, dispatch);
256
- },
257
- toggleHeaderColumn: () => ({ state, dispatch }) => {
258
- return toggleHeader('column')(state, dispatch);
259
- },
260
- toggleHeaderRow: () => ({ state, dispatch }) => {
261
- return toggleHeader('row')(state, dispatch);
262
- },
263
- toggleHeaderCell: () => ({ state, dispatch }) => {
264
- return toggleHeaderCell(state, dispatch);
265
- },
266
- mergeOrSplit: () => ({ state, dispatch }) => {
267
- if (mergeCells(state, dispatch)) {
268
- return true;
269
- }
270
- return splitCell(state, dispatch);
271
- },
272
- setCellAttribute: (name, value) => ({ state, dispatch }) => {
273
- return setCellAttr(name, value)(state, dispatch);
274
- },
275
- goToNextCell: () => ({ state, dispatch }) => {
276
- return goToNextCell(1)(state, dispatch);
277
- },
278
- goToPreviousCell: () => ({ state, dispatch }) => {
279
- return goToNextCell(-1)(state, dispatch);
280
- },
281
- fixTables: () => ({ state, dispatch }) => {
282
- if (dispatch) {
283
- fixTables(state);
284
- }
285
- return true;
286
- },
287
- setCellSelection: position => ({ tr, dispatch }) => {
288
- if (dispatch) {
289
- const selection = CellSelection.create(tr.doc, position.anchorCell, position.headCell);
290
- // @ts-ignore
291
- tr.setSelection(selection);
292
- }
293
- return true;
294
- },
295
- };
296
- },
297
- addKeyboardShortcuts() {
298
- return {
299
- Tab: () => {
300
- if (this.editor.commands.goToNextCell()) {
301
- return true;
302
- }
303
- if (!this.editor.can().addRowAfter()) {
304
- return false;
305
- }
306
- return this.editor.chain().addRowAfter().goToNextCell().run();
307
- },
308
- 'Shift-Tab': () => this.editor.commands.goToPreviousCell(),
309
- Backspace: deleteTableWhenAllCellsSelected,
310
- 'Mod-Backspace': deleteTableWhenAllCellsSelected,
311
- Delete: deleteTableWhenAllCellsSelected,
312
- 'Mod-Delete': deleteTableWhenAllCellsSelected,
313
- };
314
- },
315
- addProseMirrorPlugins() {
316
- const isResizable = this.options.resizable && this.editor.isEditable;
317
- return [
318
- ...(isResizable
319
- ? [
320
- columnResizing({
321
- handleWidth: this.options.handleWidth,
322
- cellMinWidth: this.options.cellMinWidth,
323
- // @ts-ignore (incorrect type)
324
- View: this.options.View,
325
- // TODO: PR for @types/prosemirror-tables
326
- // @ts-ignore (incorrect type)
327
- lastColumnResizable: this.options.lastColumnResizable,
328
- }),
329
- ]
330
- : []),
331
- tableEditing({
332
- allowTableNodeSelection: this.options.allowTableNodeSelection,
333
- }),
334
- ];
335
- },
336
- extendNodeSchema(extension) {
337
- const context = {
338
- name: extension.name,
339
- options: extension.options,
340
- storage: extension.storage,
341
- };
342
- return {
343
- tableRole: callOrReturn(getExtensionField(extension, 'tableRole', context)),
344
- };
345
- },
309
+ // src/table/table.ts
310
+ var Table = Node4.create({
311
+ name: "table",
312
+ // @ts-ignore
313
+ addOptions() {
314
+ return {
315
+ HTMLAttributes: {},
316
+ resizable: false,
317
+ handleWidth: 5,
318
+ cellMinWidth: 25,
319
+ // TODO: fix
320
+ View: TableView,
321
+ lastColumnResizable: true,
322
+ allowTableNodeSelection: false
323
+ };
324
+ },
325
+ content: "tableRow+",
326
+ tableRole: "table",
327
+ isolating: true,
328
+ group: "block",
329
+ parseHTML() {
330
+ return [{ tag: "table" }];
331
+ },
332
+ renderHTML({ node, HTMLAttributes }) {
333
+ const { colgroup, tableWidth, tableMinWidth } = createColGroup(node, this.options.cellMinWidth);
334
+ const table = [
335
+ "table",
336
+ mergeAttributes4(this.options.HTMLAttributes, HTMLAttributes, {
337
+ style: tableWidth ? `width: ${tableWidth}` : `min-width: ${tableMinWidth}`
338
+ }),
339
+ colgroup,
340
+ ["tbody", 0]
341
+ ];
342
+ return table;
343
+ },
344
+ addCommands() {
345
+ return {
346
+ insertTable: ({ rows = 3, cols = 3, withHeaderRow = true } = {}) => ({ tr, dispatch, editor }) => {
347
+ const node = createTable(editor.schema, rows, cols, withHeaderRow);
348
+ if (dispatch) {
349
+ const offset = tr.selection.from + 1;
350
+ tr.replaceSelectionWith(node).scrollIntoView().setSelection(TextSelection.near(tr.doc.resolve(offset)));
351
+ }
352
+ return true;
353
+ },
354
+ addColumnBefore: () => ({ state, dispatch }) => {
355
+ return addColumnBefore(state, dispatch);
356
+ },
357
+ addColumnAfter: () => ({ state, dispatch }) => {
358
+ return addColumnAfter(state, dispatch);
359
+ },
360
+ deleteColumn: () => ({ state, dispatch }) => {
361
+ return deleteColumn(state, dispatch);
362
+ },
363
+ addRowBefore: () => ({ state, dispatch }) => {
364
+ return addRowBefore(state, dispatch);
365
+ },
366
+ addRowAfter: () => ({ state, dispatch }) => {
367
+ return addRowAfter(state, dispatch);
368
+ },
369
+ deleteRow: () => ({ state, dispatch }) => {
370
+ return deleteRow(state, dispatch);
371
+ },
372
+ deleteTable: () => ({ state, dispatch }) => {
373
+ return deleteTable(state, dispatch);
374
+ },
375
+ mergeCells: () => ({ state, dispatch }) => {
376
+ return mergeCells(state, dispatch);
377
+ },
378
+ splitCell: () => ({ state, dispatch }) => {
379
+ return splitCell(state, dispatch);
380
+ },
381
+ toggleHeaderColumn: () => ({ state, dispatch }) => {
382
+ return toggleHeader("column")(state, dispatch);
383
+ },
384
+ toggleHeaderRow: () => ({ state, dispatch }) => {
385
+ return toggleHeader("row")(state, dispatch);
386
+ },
387
+ toggleHeaderCell: () => ({ state, dispatch }) => {
388
+ return toggleHeaderCell(state, dispatch);
389
+ },
390
+ mergeOrSplit: () => ({ state, dispatch }) => {
391
+ if (mergeCells(state, dispatch)) {
392
+ return true;
393
+ }
394
+ return splitCell(state, dispatch);
395
+ },
396
+ setCellAttribute: (name, value) => ({ state, dispatch }) => {
397
+ return setCellAttr(name, value)(state, dispatch);
398
+ },
399
+ goToNextCell: () => ({ state, dispatch }) => {
400
+ return goToNextCell(1)(state, dispatch);
401
+ },
402
+ goToPreviousCell: () => ({ state, dispatch }) => {
403
+ return goToNextCell(-1)(state, dispatch);
404
+ },
405
+ fixTables: () => ({ state, dispatch }) => {
406
+ if (dispatch) {
407
+ fixTables(state);
408
+ }
409
+ return true;
410
+ },
411
+ setCellSelection: (position) => ({ tr, dispatch }) => {
412
+ if (dispatch) {
413
+ const selection = CellSelection2.create(tr.doc, position.anchorCell, position.headCell);
414
+ tr.setSelection(selection);
415
+ }
416
+ return true;
417
+ }
418
+ };
419
+ },
420
+ addKeyboardShortcuts() {
421
+ return {
422
+ Tab: () => {
423
+ if (this.editor.commands.goToNextCell()) {
424
+ return true;
425
+ }
426
+ if (!this.editor.can().addRowAfter()) {
427
+ return false;
428
+ }
429
+ return this.editor.chain().addRowAfter().goToNextCell().run();
430
+ },
431
+ "Shift-Tab": () => this.editor.commands.goToPreviousCell(),
432
+ Backspace: deleteTableWhenAllCellsSelected,
433
+ "Mod-Backspace": deleteTableWhenAllCellsSelected,
434
+ Delete: deleteTableWhenAllCellsSelected,
435
+ "Mod-Delete": deleteTableWhenAllCellsSelected
436
+ };
437
+ },
438
+ addProseMirrorPlugins() {
439
+ const isResizable = this.options.resizable && this.editor.isEditable;
440
+ return [
441
+ ...isResizable ? [
442
+ columnResizing({
443
+ handleWidth: this.options.handleWidth,
444
+ cellMinWidth: this.options.cellMinWidth,
445
+ defaultCellMinWidth: this.options.cellMinWidth,
446
+ View: this.options.View,
447
+ lastColumnResizable: this.options.lastColumnResizable
448
+ })
449
+ ] : [],
450
+ tableEditing({
451
+ allowTableNodeSelection: this.options.allowTableNodeSelection
452
+ })
453
+ ];
454
+ },
455
+ extendNodeSchema(extension) {
456
+ const context = {
457
+ name: extension.name,
458
+ options: extension.options,
459
+ storage: extension.storage
460
+ };
461
+ return {
462
+ tableRole: callOrReturn(getExtensionField(extension, "tableRole", context))
463
+ };
464
+ }
346
465
  });
347
466
 
348
- export { Table, createColGroup, createTable, Table as default };
349
- //# sourceMappingURL=index.js.map
467
+ // src/kit/index.ts
468
+ var TableKit = Extension.create({
469
+ name: "tableKit",
470
+ addExtensions() {
471
+ const extensions = [];
472
+ if (this.options.table !== false) {
473
+ extensions.push(Table.configure(this.options.table));
474
+ }
475
+ if (this.options.tableCell !== false) {
476
+ extensions.push(TableCell.configure(this.options.tableCell));
477
+ }
478
+ if (this.options.tableHeader !== false) {
479
+ extensions.push(TableHeader.configure(this.options.tableHeader));
480
+ }
481
+ if (this.options.tableRow !== false) {
482
+ extensions.push(TableRow.configure(this.options.tableRow));
483
+ }
484
+ return extensions;
485
+ }
486
+ });
487
+ export {
488
+ Table,
489
+ TableCell,
490
+ TableHeader,
491
+ TableKit,
492
+ TableRow,
493
+ TableView,
494
+ createColGroup,
495
+ createTable,
496
+ updateColumns
497
+ };
498
+ //# sourceMappingURL=index.js.map