@manuscripts/body-editor 2.0.8 → 2.0.9-LEAN-3724.0
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.
- package/dist/cjs/commands.js +79 -2
- package/dist/cjs/components/views/TableCellContextMenu.js +11 -4
- package/dist/cjs/versions.js +1 -1
- package/dist/cjs/views/table_cell.js +5 -1
- package/dist/es/commands.js +78 -2
- package/dist/es/components/views/TableCellContextMenu.js +13 -6
- package/dist/es/versions.js +1 -1
- package/dist/es/views/table_cell.js +5 -1
- package/dist/types/commands.d.ts +1 -0
- package/dist/types/versions.d.ts +1 -1
- package/package.json +1 -1
package/dist/cjs/commands.js
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.addColumns = exports.addRows = exports.insertTableFootnote = exports.addInlineComment = exports.addNodeComment = exports.createAndFillTableElement = exports.selectAllIsolating = exports.ignoreAtomBlockNodeForward = exports.isAtEndOfTextBlock = exports.ignoreMetaNodeBackspaceCommand = exports.ignoreAtomBlockNodeBackward = exports.isTextSelection = exports.isAtStartOfTextBlock = exports.insertTOCSection = exports.insertBibliographySection = exports.insertList = exports.insertKeywords = exports.insertContributors = exports.insertAbstract = exports.insertBackMatterSection = exports.insertSection = exports.insertGraphicalAbstract = exports.insertInlineFootnote = exports.insertFootnote = exports.createFootnote = exports.insertInlineEquation = exports.insertCrossReference = exports.insertInlineCitation = exports.insertLink = exports.insertSectionLabel = exports.insertBreak = exports.deleteBlock = exports.insertBlock = exports.insertSupplement = exports.insertFigure = exports.insertGeneralFootnote = exports.createBlock = exports.createSelection = exports.canInsert = exports.blockActive = exports.isNodeSelection = exports.markActive = void 0;
|
|
18
|
+
exports.mergeCellsWithSpace = exports.addColumns = exports.addRows = exports.insertTableFootnote = exports.addInlineComment = exports.addNodeComment = exports.createAndFillTableElement = exports.selectAllIsolating = exports.ignoreAtomBlockNodeForward = exports.isAtEndOfTextBlock = exports.ignoreMetaNodeBackspaceCommand = exports.ignoreAtomBlockNodeBackward = exports.isTextSelection = exports.isAtStartOfTextBlock = exports.insertTOCSection = exports.insertBibliographySection = exports.insertList = exports.insertKeywords = exports.insertContributors = exports.insertAbstract = exports.insertBackMatterSection = exports.insertSection = exports.insertGraphicalAbstract = exports.insertInlineFootnote = exports.insertFootnote = exports.createFootnote = exports.insertInlineEquation = exports.insertCrossReference = exports.insertInlineCitation = exports.insertLink = exports.insertSectionLabel = exports.insertBreak = exports.deleteBlock = exports.insertBlock = exports.insertSupplement = exports.insertFigure = exports.insertGeneralFootnote = exports.createBlock = exports.createSelection = exports.canInsert = exports.blockActive = exports.isNodeSelection = exports.markActive = void 0;
|
|
19
19
|
const json_schema_1 = require("@manuscripts/json-schema");
|
|
20
20
|
const track_changes_plugin_1 = require("@manuscripts/track-changes-plugin");
|
|
21
21
|
const transform_1 = require("@manuscripts/transform");
|
|
@@ -799,7 +799,7 @@ const createAndFillTableElement = (state, tableConfig) => {
|
|
|
799
799
|
const { nodes } = state.schema;
|
|
800
800
|
const { numberOfColumns, numberOfRows, includeHeader } = tableConfig;
|
|
801
801
|
const createRow = (cellType) => {
|
|
802
|
-
const cells = Array.from({ length: numberOfColumns }, () => nodes[cellType].create());
|
|
802
|
+
const cells = Array.from({ length: numberOfColumns }, () => nodes[cellType].create({}, state.schema.nodes.paragraph.create()));
|
|
803
803
|
return nodes.table_row.create({}, cells);
|
|
804
804
|
};
|
|
805
805
|
const tableRows = includeHeader ? [createRow('table_header')] : [];
|
|
@@ -1024,3 +1024,80 @@ const addColumns = (direction) => (state, dispatch) => {
|
|
|
1024
1024
|
return true;
|
|
1025
1025
|
};
|
|
1026
1026
|
exports.addColumns = addColumns;
|
|
1027
|
+
function isEmpty(cell) {
|
|
1028
|
+
const c = cell.content;
|
|
1029
|
+
return (c.childCount == 1 && c.child(0).isTextblock && c.child(0).childCount == 0);
|
|
1030
|
+
}
|
|
1031
|
+
function cellsOverlapRectangle({ width, height, map }, rect) {
|
|
1032
|
+
let indexTop = rect.top * width + rect.left, indexLeft = indexTop;
|
|
1033
|
+
let indexBottom = (rect.bottom - 1) * width + rect.left, indexRight = indexTop + (rect.right - rect.left - 1);
|
|
1034
|
+
for (let i = rect.top; i < rect.bottom; i++) {
|
|
1035
|
+
if ((rect.left > 0 && map[indexLeft] == map[indexLeft - 1]) ||
|
|
1036
|
+
(rect.right < width && map[indexRight] == map[indexRight + 1])) {
|
|
1037
|
+
return true;
|
|
1038
|
+
}
|
|
1039
|
+
indexLeft += width;
|
|
1040
|
+
indexRight += width;
|
|
1041
|
+
}
|
|
1042
|
+
for (let i = rect.left; i < rect.right; i++) {
|
|
1043
|
+
if ((rect.top > 0 && map[indexTop] == map[indexTop - width]) ||
|
|
1044
|
+
(rect.bottom < height && map[indexBottom] == map[indexBottom + width])) {
|
|
1045
|
+
return true;
|
|
1046
|
+
}
|
|
1047
|
+
indexTop++;
|
|
1048
|
+
indexBottom++;
|
|
1049
|
+
}
|
|
1050
|
+
return false;
|
|
1051
|
+
}
|
|
1052
|
+
function mergeCellsWithSpace(state, dispatch) {
|
|
1053
|
+
const sel = state.selection;
|
|
1054
|
+
if (!(sel instanceof prosemirror_tables_1.CellSelection) ||
|
|
1055
|
+
sel.$anchorCell.pos == sel.$headCell.pos) {
|
|
1056
|
+
return false;
|
|
1057
|
+
}
|
|
1058
|
+
const rect = (0, prosemirror_tables_1.selectedRect)(state), { map } = rect;
|
|
1059
|
+
if (cellsOverlapRectangle(map, rect)) {
|
|
1060
|
+
return false;
|
|
1061
|
+
}
|
|
1062
|
+
if (dispatch) {
|
|
1063
|
+
const tr = state.tr;
|
|
1064
|
+
const seen = {};
|
|
1065
|
+
let content = prosemirror_model_1.Fragment.empty;
|
|
1066
|
+
let mergedPos;
|
|
1067
|
+
let mergedCell;
|
|
1068
|
+
for (let row = rect.top; row < rect.bottom; row++) {
|
|
1069
|
+
for (let col = rect.left; col < rect.right; col++) {
|
|
1070
|
+
const cellPos = map.map[row * map.width + col];
|
|
1071
|
+
const cell = rect.table.nodeAt(cellPos);
|
|
1072
|
+
if (seen[cellPos] || !cell) {
|
|
1073
|
+
continue;
|
|
1074
|
+
}
|
|
1075
|
+
seen[cellPos] = true;
|
|
1076
|
+
if (mergedPos == null) {
|
|
1077
|
+
mergedPos = cellPos;
|
|
1078
|
+
mergedCell = cell;
|
|
1079
|
+
}
|
|
1080
|
+
else {
|
|
1081
|
+
if (!isEmpty(cell)) {
|
|
1082
|
+
content = content.append(cell.content.addToStart(cell.type.schema.text(' ')));
|
|
1083
|
+
}
|
|
1084
|
+
const mapped = tr.mapping.map(cellPos + rect.tableStart);
|
|
1085
|
+
tr.delete(mapped, mapped + cell.nodeSize);
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
if (mergedPos == null || mergedCell == null) {
|
|
1090
|
+
return true;
|
|
1091
|
+
}
|
|
1092
|
+
tr.setNodeMarkup(mergedPos + rect.tableStart, null, Object.assign(Object.assign({}, (0, prosemirror_tables_1.addColSpan)(mergedCell.attrs, mergedCell.attrs.colspan, rect.right - rect.left - mergedCell.attrs.colspan)), { rowspan: rect.bottom - rect.top }));
|
|
1093
|
+
if (content.size) {
|
|
1094
|
+
const end = mergedPos + 1 + mergedCell.content.size;
|
|
1095
|
+
const start = isEmpty(mergedCell) ? mergedPos + 1 : end;
|
|
1096
|
+
tr.replaceWith(start + rect.tableStart, end + rect.tableStart, content);
|
|
1097
|
+
}
|
|
1098
|
+
tr.setSelection(new prosemirror_tables_1.CellSelection(tr.doc.resolve(mergedPos + rect.tableStart)));
|
|
1099
|
+
dispatch(tr);
|
|
1100
|
+
}
|
|
1101
|
+
return true;
|
|
1102
|
+
}
|
|
1103
|
+
exports.mergeCellsWithSpace = mergeCellsWithSpace;
|
|
@@ -53,16 +53,20 @@ const ContextMenu = ({ view, close, }) => {
|
|
|
53
53
|
close();
|
|
54
54
|
};
|
|
55
55
|
const [columnAction, setColumnAction] = (0, react_1.useState)(undefined);
|
|
56
|
+
const isCellSelectionMerged = (0, prosemirror_tables_1.mergeCells)(view.state);
|
|
57
|
+
const isCellSelectionSplittable = (0, prosemirror_tables_1.splitCell)(view.state);
|
|
56
58
|
const { rows, columns } = getSelectedCellsCount(view.state);
|
|
57
59
|
return (react_1.default.createElement(MenuDropdownList, null,
|
|
58
60
|
react_1.default.createElement(ActionButton, { onClick: () => runCommand((0, commands_1.addRows)('top')) },
|
|
59
61
|
react_1.default.createElement(style_guide_1.PlusIcon, null),
|
|
60
|
-
" Insert
|
|
61
|
-
rows
|
|
62
|
+
" Insert ",
|
|
63
|
+
rows,
|
|
64
|
+
" above"),
|
|
62
65
|
react_1.default.createElement(ActionButton, { onClick: () => runCommand((0, commands_1.addRows)('bottom')) },
|
|
63
66
|
react_1.default.createElement(style_guide_1.PlusIcon, null),
|
|
64
|
-
" Insert
|
|
65
|
-
rows
|
|
67
|
+
" Insert ",
|
|
68
|
+
rows,
|
|
69
|
+
" below"),
|
|
66
70
|
react_1.default.createElement(ActionButton, { onClick: () => setColumnAction(() => (0, commands_1.addColumns)('left')) },
|
|
67
71
|
react_1.default.createElement(style_guide_1.PlusIcon, null),
|
|
68
72
|
" Insert ",
|
|
@@ -82,6 +86,9 @@ const ContextMenu = ({ view, close, }) => {
|
|
|
82
86
|
react_1.default.createElement(GrayDeleteIcon, null),
|
|
83
87
|
" Delete ",
|
|
84
88
|
columns),
|
|
89
|
+
(isCellSelectionMerged || isCellSelectionSplittable) && react_1.default.createElement(Separator, null),
|
|
90
|
+
isCellSelectionMerged && (react_1.default.createElement(ActionButton, { onClick: () => runCommand(commands_1.mergeCellsWithSpace, true) }, "Merge cells")),
|
|
91
|
+
isCellSelectionSplittable && (react_1.default.createElement(ActionButton, { onClick: () => runCommand(prosemirror_tables_1.splitCell, true) }, "Split cells")),
|
|
85
92
|
react_1.default.createElement(style_guide_1.ColumnChangeWarningDialog, { isOpen: !!columnAction, primaryAction: () => {
|
|
86
93
|
if (columnAction) {
|
|
87
94
|
runCommand(columnAction, true);
|
package/dist/cjs/versions.js
CHANGED
|
@@ -41,7 +41,11 @@ class TableCellView extends block_view_1.default {
|
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
this.updateContents = () => {
|
|
44
|
-
this.dom.getAttributeNames().map((attr) =>
|
|
44
|
+
this.dom.getAttributeNames().map((attr) => {
|
|
45
|
+
if (attr !== 'class') {
|
|
46
|
+
this.dom.removeAttribute(attr);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
45
49
|
Array.from(this.toDom().attributes).map((attr) => attr.nodeValue && this.dom.setAttribute(attr.nodeName, attr.nodeValue));
|
|
46
50
|
};
|
|
47
51
|
}
|
package/dist/es/commands.js
CHANGED
|
@@ -19,7 +19,7 @@ import { generateID, generateNodeID, isElementNodeType, isFootnoteNode, isInBibl
|
|
|
19
19
|
import { Fragment, NodeRange, } from 'prosemirror-model';
|
|
20
20
|
import { wrapInList } from 'prosemirror-schema-list';
|
|
21
21
|
import { NodeSelection, TextSelection, } from 'prosemirror-state';
|
|
22
|
-
import { addColumnAfter, addColumnBefore, addRow, selectedRect, } from 'prosemirror-tables';
|
|
22
|
+
import { addColSpan, addColumnAfter, addColumnBefore, addRow, CellSelection, selectedRect, } from 'prosemirror-tables';
|
|
23
23
|
import { findWrapping, liftTarget, ReplaceAroundStep, } from 'prosemirror-transform';
|
|
24
24
|
import { findChildrenByType, findParentNodeOfType, findParentNodeOfTypeClosestToPos, } from 'prosemirror-utils';
|
|
25
25
|
import { getCommentKey, getCommentRange } from './lib/comments';
|
|
@@ -760,7 +760,7 @@ export const createAndFillTableElement = (state, tableConfig) => {
|
|
|
760
760
|
const { nodes } = state.schema;
|
|
761
761
|
const { numberOfColumns, numberOfRows, includeHeader } = tableConfig;
|
|
762
762
|
const createRow = (cellType) => {
|
|
763
|
-
const cells = Array.from({ length: numberOfColumns }, () => nodes[cellType].create());
|
|
763
|
+
const cells = Array.from({ length: numberOfColumns }, () => nodes[cellType].create({}, state.schema.nodes.paragraph.create()));
|
|
764
764
|
return nodes.table_row.create({}, cells);
|
|
765
765
|
};
|
|
766
766
|
const tableRows = includeHeader ? [createRow('table_header')] : [];
|
|
@@ -979,3 +979,79 @@ export const addColumns = (direction) => (state, dispatch) => {
|
|
|
979
979
|
}
|
|
980
980
|
return true;
|
|
981
981
|
};
|
|
982
|
+
function isEmpty(cell) {
|
|
983
|
+
const c = cell.content;
|
|
984
|
+
return (c.childCount == 1 && c.child(0).isTextblock && c.child(0).childCount == 0);
|
|
985
|
+
}
|
|
986
|
+
function cellsOverlapRectangle({ width, height, map }, rect) {
|
|
987
|
+
let indexTop = rect.top * width + rect.left, indexLeft = indexTop;
|
|
988
|
+
let indexBottom = (rect.bottom - 1) * width + rect.left, indexRight = indexTop + (rect.right - rect.left - 1);
|
|
989
|
+
for (let i = rect.top; i < rect.bottom; i++) {
|
|
990
|
+
if ((rect.left > 0 && map[indexLeft] == map[indexLeft - 1]) ||
|
|
991
|
+
(rect.right < width && map[indexRight] == map[indexRight + 1])) {
|
|
992
|
+
return true;
|
|
993
|
+
}
|
|
994
|
+
indexLeft += width;
|
|
995
|
+
indexRight += width;
|
|
996
|
+
}
|
|
997
|
+
for (let i = rect.left; i < rect.right; i++) {
|
|
998
|
+
if ((rect.top > 0 && map[indexTop] == map[indexTop - width]) ||
|
|
999
|
+
(rect.bottom < height && map[indexBottom] == map[indexBottom + width])) {
|
|
1000
|
+
return true;
|
|
1001
|
+
}
|
|
1002
|
+
indexTop++;
|
|
1003
|
+
indexBottom++;
|
|
1004
|
+
}
|
|
1005
|
+
return false;
|
|
1006
|
+
}
|
|
1007
|
+
export function mergeCellsWithSpace(state, dispatch) {
|
|
1008
|
+
const sel = state.selection;
|
|
1009
|
+
if (!(sel instanceof CellSelection) ||
|
|
1010
|
+
sel.$anchorCell.pos == sel.$headCell.pos) {
|
|
1011
|
+
return false;
|
|
1012
|
+
}
|
|
1013
|
+
const rect = selectedRect(state), { map } = rect;
|
|
1014
|
+
if (cellsOverlapRectangle(map, rect)) {
|
|
1015
|
+
return false;
|
|
1016
|
+
}
|
|
1017
|
+
if (dispatch) {
|
|
1018
|
+
const tr = state.tr;
|
|
1019
|
+
const seen = {};
|
|
1020
|
+
let content = Fragment.empty;
|
|
1021
|
+
let mergedPos;
|
|
1022
|
+
let mergedCell;
|
|
1023
|
+
for (let row = rect.top; row < rect.bottom; row++) {
|
|
1024
|
+
for (let col = rect.left; col < rect.right; col++) {
|
|
1025
|
+
const cellPos = map.map[row * map.width + col];
|
|
1026
|
+
const cell = rect.table.nodeAt(cellPos);
|
|
1027
|
+
if (seen[cellPos] || !cell) {
|
|
1028
|
+
continue;
|
|
1029
|
+
}
|
|
1030
|
+
seen[cellPos] = true;
|
|
1031
|
+
if (mergedPos == null) {
|
|
1032
|
+
mergedPos = cellPos;
|
|
1033
|
+
mergedCell = cell;
|
|
1034
|
+
}
|
|
1035
|
+
else {
|
|
1036
|
+
if (!isEmpty(cell)) {
|
|
1037
|
+
content = content.append(cell.content.addToStart(cell.type.schema.text(' ')));
|
|
1038
|
+
}
|
|
1039
|
+
const mapped = tr.mapping.map(cellPos + rect.tableStart);
|
|
1040
|
+
tr.delete(mapped, mapped + cell.nodeSize);
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
if (mergedPos == null || mergedCell == null) {
|
|
1045
|
+
return true;
|
|
1046
|
+
}
|
|
1047
|
+
tr.setNodeMarkup(mergedPos + rect.tableStart, null, Object.assign(Object.assign({}, addColSpan(mergedCell.attrs, mergedCell.attrs.colspan, rect.right - rect.left - mergedCell.attrs.colspan)), { rowspan: rect.bottom - rect.top }));
|
|
1048
|
+
if (content.size) {
|
|
1049
|
+
const end = mergedPos + 1 + mergedCell.content.size;
|
|
1050
|
+
const start = isEmpty(mergedCell) ? mergedPos + 1 : end;
|
|
1051
|
+
tr.replaceWith(start + rect.tableStart, end + rect.tableStart, content);
|
|
1052
|
+
}
|
|
1053
|
+
tr.setSelection(new CellSelection(tr.doc.resolve(mergedPos + rect.tableStart)));
|
|
1054
|
+
dispatch(tr);
|
|
1055
|
+
}
|
|
1056
|
+
return true;
|
|
1057
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ColumnChangeWarningDialog, DeleteIcon, IconTextButton, PlusIcon, } from '@manuscripts/style-guide';
|
|
2
2
|
import { skipTracking } from '@manuscripts/track-changes-plugin';
|
|
3
|
-
import { CellSelection, deleteColumn, deleteRow, selectedRect, } from 'prosemirror-tables';
|
|
3
|
+
import { CellSelection, deleteColumn, deleteRow, mergeCells, selectedRect, splitCell, } from 'prosemirror-tables';
|
|
4
4
|
import React, { useState } from 'react';
|
|
5
5
|
import styled from 'styled-components';
|
|
6
|
-
import { addColumns, addRows } from '../../commands';
|
|
6
|
+
import { addColumns, addRows, mergeCellsWithSpace } from '../../commands';
|
|
7
7
|
const getSelectedCellsCount = (state) => {
|
|
8
8
|
const { selection } = state;
|
|
9
9
|
const selectedCells = { rows: 1, columns: 1 };
|
|
@@ -24,16 +24,20 @@ export const ContextMenu = ({ view, close, }) => {
|
|
|
24
24
|
close();
|
|
25
25
|
};
|
|
26
26
|
const [columnAction, setColumnAction] = useState(undefined);
|
|
27
|
+
const isCellSelectionMerged = mergeCells(view.state);
|
|
28
|
+
const isCellSelectionSplittable = splitCell(view.state);
|
|
27
29
|
const { rows, columns } = getSelectedCellsCount(view.state);
|
|
28
30
|
return (React.createElement(MenuDropdownList, null,
|
|
29
31
|
React.createElement(ActionButton, { onClick: () => runCommand(addRows('top')) },
|
|
30
32
|
React.createElement(PlusIcon, null),
|
|
31
|
-
" Insert
|
|
32
|
-
rows
|
|
33
|
+
" Insert ",
|
|
34
|
+
rows,
|
|
35
|
+
" above"),
|
|
33
36
|
React.createElement(ActionButton, { onClick: () => runCommand(addRows('bottom')) },
|
|
34
37
|
React.createElement(PlusIcon, null),
|
|
35
|
-
" Insert
|
|
36
|
-
rows
|
|
38
|
+
" Insert ",
|
|
39
|
+
rows,
|
|
40
|
+
" below"),
|
|
37
41
|
React.createElement(ActionButton, { onClick: () => setColumnAction(() => addColumns('left')) },
|
|
38
42
|
React.createElement(PlusIcon, null),
|
|
39
43
|
" Insert ",
|
|
@@ -53,6 +57,9 @@ export const ContextMenu = ({ view, close, }) => {
|
|
|
53
57
|
React.createElement(GrayDeleteIcon, null),
|
|
54
58
|
" Delete ",
|
|
55
59
|
columns),
|
|
60
|
+
(isCellSelectionMerged || isCellSelectionSplittable) && React.createElement(Separator, null),
|
|
61
|
+
isCellSelectionMerged && (React.createElement(ActionButton, { onClick: () => runCommand(mergeCellsWithSpace, true) }, "Merge cells")),
|
|
62
|
+
isCellSelectionSplittable && (React.createElement(ActionButton, { onClick: () => runCommand(splitCell, true) }, "Split cells")),
|
|
56
63
|
React.createElement(ColumnChangeWarningDialog, { isOpen: !!columnAction, primaryAction: () => {
|
|
57
64
|
if (columnAction) {
|
|
58
65
|
runCommand(columnAction, true);
|
package/dist/es/versions.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '2.0.
|
|
1
|
+
export const VERSION = '2.0.9-LEAN-3724.0';
|
|
2
2
|
export const MATHJAX_VERSION = '3.2.2';
|
|
@@ -35,7 +35,11 @@ export class TableCellView extends BlockView {
|
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
this.updateContents = () => {
|
|
38
|
-
this.dom.getAttributeNames().map((attr) =>
|
|
38
|
+
this.dom.getAttributeNames().map((attr) => {
|
|
39
|
+
if (attr !== 'class') {
|
|
40
|
+
this.dom.removeAttribute(attr);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
39
43
|
Array.from(this.toDom().attributes).map((attr) => attr.nodeValue && this.dom.setAttribute(attr.nodeName, attr.nodeValue));
|
|
40
44
|
};
|
|
41
45
|
}
|
package/dist/types/commands.d.ts
CHANGED
|
@@ -68,4 +68,5 @@ interface NodeWithPosition {
|
|
|
68
68
|
export declare const insertTableFootnote: (node: ManuscriptNode, position: number, view: EditorView, inlineFootnote?: NodeWithPosition) => void;
|
|
69
69
|
export declare const addRows: (direction: 'top' | 'bottom') => (state: EditorState, dispatch?: ((tr: Transaction) => void) | undefined) => boolean;
|
|
70
70
|
export declare const addColumns: (direction: 'right' | 'left') => (state: EditorState, dispatch?: ((tr: Transaction) => void) | undefined) => boolean;
|
|
71
|
+
export declare function mergeCellsWithSpace(state: EditorState, dispatch?: (tr: Transaction) => void): boolean;
|
|
71
72
|
export {};
|
package/dist/types/versions.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "2.0.
|
|
1
|
+
export declare const VERSION = "2.0.9-LEAN-3724.0";
|
|
2
2
|
export declare const MATHJAX_VERSION = "3.2.2";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manuscripts/body-editor",
|
|
3
3
|
"description": "Prosemirror components for editing and viewing manuscripts",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.9-LEAN-3724.0",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-body-editor",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|