Socket
Socket
Sign inDemoInstall

roosterjs-content-model-api

Package Overview
Dependencies
6
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.21.2 to 0.22.0

3

lib-amd/index.d.ts

@@ -24,5 +24,2 @@ export { default as insertTable } from './publicApi/table/insertTable';

export { default as setListStartNumber } from './publicApi/list/setListStartNumber';
export { default as hasSelectionInBlock } from './publicApi/selection/hasSelectionInBlock';
export { default as hasSelectionInSegment } from './publicApi/selection/hasSelectionInSegment';
export { default as hasSelectionInBlockGroup } from './publicApi/selection/hasSelectionInBlockGroup';
export { default as setIndentation } from './publicApi/block/setIndentation';

@@ -29,0 +26,0 @@ export { default as setAlignment } from './publicApi/block/setAlignment';

7

lib-amd/index.js

@@ -1,5 +0,5 @@

define(["require", "exports", "./publicApi/table/insertTable", "./publicApi/table/formatTable", "./publicApi/table/setTableCellShade", "./publicApi/table/editTable", "./publicApi/table/applyTableBorderFormat", "./publicApi/list/toggleBullet", "./publicApi/list/toggleNumbering", "./publicApi/segment/toggleBold", "./publicApi/segment/toggleItalic", "./publicApi/segment/toggleUnderline", "./publicApi/segment/toggleStrikethrough", "./publicApi/segment/toggleSubscript", "./publicApi/segment/toggleSuperscript", "./publicApi/segment/setBackgroundColor", "./publicApi/segment/setFontName", "./publicApi/segment/setFontSize", "./publicApi/segment/setTextColor", "./publicApi/segment/changeFontSize", "./publicApi/segment/applySegmentFormat", "./publicApi/segment/changeCapitalization", "./publicApi/image/insertImage", "./publicApi/list/setListStyle", "./publicApi/list/setListStartNumber", "./publicApi/selection/hasSelectionInBlock", "./publicApi/selection/hasSelectionInSegment", "./publicApi/selection/hasSelectionInBlockGroup", "./publicApi/block/setIndentation", "./publicApi/block/setAlignment", "./publicApi/block/setDirection", "./publicApi/block/setHeadingLevel", "./publicApi/block/toggleBlockQuote", "./publicApi/block/setSpacing", "./publicApi/image/setImageBorder", "./publicApi/image/setImageBoxShadow", "./publicApi/image/changeImage", "./publicApi/format/getFormatState", "./publicApi/format/clearFormat", "./publicApi/link/insertLink", "./publicApi/link/removeLink", "./publicApi/link/adjustLinkSelection", "./publicApi/image/setImageAltText", "./publicApi/image/adjustImageSelection", "./publicApi/block/setParagraphMargin", "./publicApi/segment/toggleCode", "./publicApi/entity/insertEntity"], function (require, exports, insertTable_1, formatTable_1, setTableCellShade_1, editTable_1, applyTableBorderFormat_1, toggleBullet_1, toggleNumbering_1, toggleBold_1, toggleItalic_1, toggleUnderline_1, toggleStrikethrough_1, toggleSubscript_1, toggleSuperscript_1, setBackgroundColor_1, setFontName_1, setFontSize_1, setTextColor_1, changeFontSize_1, applySegmentFormat_1, changeCapitalization_1, insertImage_1, setListStyle_1, setListStartNumber_1, hasSelectionInBlock_1, hasSelectionInSegment_1, hasSelectionInBlockGroup_1, setIndentation_1, setAlignment_1, setDirection_1, setHeadingLevel_1, toggleBlockQuote_1, setSpacing_1, setImageBorder_1, setImageBoxShadow_1, changeImage_1, getFormatState_1, clearFormat_1, insertLink_1, removeLink_1, adjustLinkSelection_1, setImageAltText_1, adjustImageSelection_1, setParagraphMargin_1, toggleCode_1, insertEntity_1) {
define(["require", "exports", "./publicApi/table/insertTable", "./publicApi/table/formatTable", "./publicApi/table/setTableCellShade", "./publicApi/table/editTable", "./publicApi/table/applyTableBorderFormat", "./publicApi/list/toggleBullet", "./publicApi/list/toggleNumbering", "./publicApi/segment/toggleBold", "./publicApi/segment/toggleItalic", "./publicApi/segment/toggleUnderline", "./publicApi/segment/toggleStrikethrough", "./publicApi/segment/toggleSubscript", "./publicApi/segment/toggleSuperscript", "./publicApi/segment/setBackgroundColor", "./publicApi/segment/setFontName", "./publicApi/segment/setFontSize", "./publicApi/segment/setTextColor", "./publicApi/segment/changeFontSize", "./publicApi/segment/applySegmentFormat", "./publicApi/segment/changeCapitalization", "./publicApi/image/insertImage", "./publicApi/list/setListStyle", "./publicApi/list/setListStartNumber", "./publicApi/block/setIndentation", "./publicApi/block/setAlignment", "./publicApi/block/setDirection", "./publicApi/block/setHeadingLevel", "./publicApi/block/toggleBlockQuote", "./publicApi/block/setSpacing", "./publicApi/image/setImageBorder", "./publicApi/image/setImageBoxShadow", "./publicApi/image/changeImage", "./publicApi/format/getFormatState", "./publicApi/format/clearFormat", "./publicApi/link/insertLink", "./publicApi/link/removeLink", "./publicApi/link/adjustLinkSelection", "./publicApi/image/setImageAltText", "./publicApi/image/adjustImageSelection", "./publicApi/block/setParagraphMargin", "./publicApi/segment/toggleCode", "./publicApi/entity/insertEntity"], function (require, exports, insertTable_1, formatTable_1, setTableCellShade_1, editTable_1, applyTableBorderFormat_1, toggleBullet_1, toggleNumbering_1, toggleBold_1, toggleItalic_1, toggleUnderline_1, toggleStrikethrough_1, toggleSubscript_1, toggleSuperscript_1, setBackgroundColor_1, setFontName_1, setFontSize_1, setTextColor_1, changeFontSize_1, applySegmentFormat_1, changeCapitalization_1, insertImage_1, setListStyle_1, setListStartNumber_1, setIndentation_1, setAlignment_1, setDirection_1, setHeadingLevel_1, toggleBlockQuote_1, setSpacing_1, setImageBorder_1, setImageBoxShadow_1, changeImage_1, getFormatState_1, clearFormat_1, insertLink_1, removeLink_1, adjustLinkSelection_1, setImageAltText_1, adjustImageSelection_1, setParagraphMargin_1, toggleCode_1, insertEntity_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.insertEntity = exports.toggleCode = exports.setParagraphMargin = exports.adjustImageSelection = exports.setImageAltText = exports.adjustLinkSelection = exports.removeLink = exports.insertLink = exports.clearFormat = exports.getFormatState = exports.changeImage = exports.setImageBoxShadow = exports.setImageBorder = exports.setSpacing = exports.toggleBlockQuote = exports.setHeadingLevel = exports.setDirection = exports.setAlignment = exports.setIndentation = exports.hasSelectionInBlockGroup = exports.hasSelectionInSegment = exports.hasSelectionInBlock = exports.setListStartNumber = exports.setListStyle = exports.insertImage = exports.changeCapitalization = exports.applySegmentFormat = exports.changeFontSize = exports.setTextColor = exports.setFontSize = exports.setFontName = exports.setBackgroundColor = exports.toggleSuperscript = exports.toggleSubscript = exports.toggleStrikethrough = exports.toggleUnderline = exports.toggleItalic = exports.toggleBold = exports.toggleNumbering = exports.toggleBullet = exports.applyTableBorderFormat = exports.editTable = exports.setTableCellShade = exports.formatTable = exports.insertTable = void 0;
exports.insertEntity = exports.toggleCode = exports.setParagraphMargin = exports.adjustImageSelection = exports.setImageAltText = exports.adjustLinkSelection = exports.removeLink = exports.insertLink = exports.clearFormat = exports.getFormatState = exports.changeImage = exports.setImageBoxShadow = exports.setImageBorder = exports.setSpacing = exports.toggleBlockQuote = exports.setHeadingLevel = exports.setDirection = exports.setAlignment = exports.setIndentation = exports.setListStartNumber = exports.setListStyle = exports.insertImage = exports.changeCapitalization = exports.applySegmentFormat = exports.changeFontSize = exports.setTextColor = exports.setFontSize = exports.setFontName = exports.setBackgroundColor = exports.toggleSuperscript = exports.toggleSubscript = exports.toggleStrikethrough = exports.toggleUnderline = exports.toggleItalic = exports.toggleBold = exports.toggleNumbering = exports.toggleBullet = exports.applyTableBorderFormat = exports.editTable = exports.setTableCellShade = exports.formatTable = exports.insertTable = void 0;
Object.defineProperty(exports, "insertTable", { enumerable: true, get: function () { return insertTable_1.default; } });

@@ -28,5 +28,2 @@ Object.defineProperty(exports, "formatTable", { enumerable: true, get: function () { return formatTable_1.default; } });

Object.defineProperty(exports, "setListStartNumber", { enumerable: true, get: function () { return setListStartNumber_1.default; } });
Object.defineProperty(exports, "hasSelectionInBlock", { enumerable: true, get: function () { return hasSelectionInBlock_1.default; } });
Object.defineProperty(exports, "hasSelectionInSegment", { enumerable: true, get: function () { return hasSelectionInSegment_1.default; } });
Object.defineProperty(exports, "hasSelectionInBlockGroup", { enumerable: true, get: function () { return hasSelectionInBlockGroup_1.default; } });
Object.defineProperty(exports, "setIndentation", { enumerable: true, get: function () { return setIndentation_1.default; } });

@@ -33,0 +30,0 @@ Object.defineProperty(exports, "setAlignment", { enumerable: true, get: function () { return setAlignment_1.default; } });

@@ -32,2 +32,16 @@ define(["require", "exports", "roosterjs-content-model-core", "roosterjs-content-model-dom"], function (require, exports, roosterjs_content_model_core_1, roosterjs_content_model_dom_1) {

}
if (alreadyInExpectedType) {
//if the list item has margins or textAlign, we need to apply them to the block to preserve the indention and alignment
block.blocks.forEach(function (x) {
if (block.format.marginLeft) {
x.format.marginLeft = block.format.marginLeft;
}
if (block.format.marginRight) {
x.format.marginRight = block.format.marginRight;
}
if (block.format.textAlign) {
x.format.textAlign = block.format.textAlign;
}
});
}
}

@@ -67,2 +81,13 @@ else {

newListItem.blocks.push(block);
if (block.format.marginRight) {
newListItem.format.marginRight = block.format.marginRight;
block.format.marginRight = undefined;
}
if (block.format.marginLeft) {
newListItem.format.marginLeft = block.format.marginLeft;
block.format.marginLeft = undefined;
}
if (block.format.textAlign) {
newListItem.format.textAlign = block.format.textAlign;
}
parent.blocks.splice(index, 1, newListItem);

@@ -69,0 +94,0 @@ existingListItems.push(newListItem);

@@ -1,3 +0,2 @@

import type { ContentModelTableRow } from 'roosterjs-content-model-types';
import type { TableSelectionCoordinates } from '../table/getSelectedCells';
import type { ContentModelTableRow, TableSelectionCoordinates } from 'roosterjs-content-model-types';
/**

@@ -4,0 +3,0 @@ * @internal

@@ -10,4 +10,4 @@ define(["require", "exports", "roosterjs-content-model-dom"], function (require, exports, roosterjs_content_model_dom_1) {

var _a;
var firstCol = selection.firstCol, firstRow = selection.firstRow;
var cell = (_a = rows[firstRow]) === null || _a === void 0 ? void 0 : _a.cells[firstCol];
var firstColumn = selection.firstColumn, firstRow = selection.firstRow;
var cell = (_a = rows[firstRow]) === null || _a === void 0 ? void 0 : _a.cells[firstColumn];
if (cell) {

@@ -14,0 +14,0 @@ (0, roosterjs_content_model_dom_1.addSegment)(cell, (0, roosterjs_content_model_dom_1.createSelectionMarker)());

@@ -1,2 +0,2 @@

define(["require", "exports", "./getSelectedCells", "roosterjs-content-model-core"], function (require, exports, getSelectedCells_1, roosterjs_content_model_core_1) {
define(["require", "exports", "roosterjs-content-model-core"], function (require, exports, roosterjs_content_model_core_1) {
"use strict";

@@ -40,6 +40,6 @@ Object.defineProperty(exports, "__esModule", { value: true });

var _a;
var sel = (0, getSelectedCells_1.getSelectedCells)(table);
var sel = (0, roosterjs_content_model_core_1.getSelectedCells)(table);
if (sel) {
for (var rowIndex = sel.firstRow; rowIndex <= sel.lastRow; rowIndex++) {
for (var colIndex = sel.firstCol; colIndex <= sel.lastCol; colIndex++) {
for (var colIndex = sel.firstColumn; colIndex <= sel.lastColumn; colIndex++) {
var cell = (_a = table.rows[rowIndex]) === null || _a === void 0 ? void 0 : _a.cells[colIndex];

@@ -46,0 +46,0 @@ var format = cell === null || cell === void 0 ? void 0 : cell.format;

@@ -1,2 +0,2 @@

define(["require", "exports", "../selection/collapseTableSelection", "./getSelectedCells"], function (require, exports, collapseTableSelection_1, getSelectedCells_1) {
define(["require", "exports", "../selection/collapseTableSelection", "roosterjs-content-model-core"], function (require, exports, collapseTableSelection_1, roosterjs_content_model_core_1) {
"use strict";

@@ -9,13 +9,13 @@ Object.defineProperty(exports, "__esModule", { value: true });

function deleteTableColumn(table) {
var sel = (0, getSelectedCells_1.getSelectedCells)(table);
var sel = (0, roosterjs_content_model_core_1.getSelectedCells)(table);
if (sel) {
for (var rowIndex = 0; rowIndex < table.rows.length; rowIndex++) {
var cellInNextCol = table.rows[rowIndex].cells[sel.lastCol + 1];
var cellInNextCol = table.rows[rowIndex].cells[sel.lastColumn + 1];
if (cellInNextCol) {
cellInNextCol.spanLeft =
cellInNextCol.spanLeft && table.rows[rowIndex].cells[sel.firstCol].spanLeft;
cellInNextCol.spanLeft && table.rows[rowIndex].cells[sel.firstColumn].spanLeft;
}
table.rows[rowIndex].cells.splice(sel.firstCol, sel.lastCol - sel.firstCol + 1);
table.rows[rowIndex].cells.splice(sel.firstColumn, sel.lastColumn - sel.firstColumn + 1);
}
table.widths.splice(sel.firstCol, sel.lastCol - sel.firstCol + 1);
table.widths.splice(sel.firstColumn, sel.lastColumn - sel.firstColumn + 1);
(0, collapseTableSelection_1.collapseTableSelection)(table.rows, sel);

@@ -22,0 +22,0 @@ }

@@ -1,2 +0,2 @@

define(["require", "exports", "../selection/collapseTableSelection", "./getSelectedCells"], function (require, exports, collapseTableSelection_1, getSelectedCells_1) {
define(["require", "exports", "../selection/collapseTableSelection", "roosterjs-content-model-core"], function (require, exports, collapseTableSelection_1, roosterjs_content_model_core_1) {
"use strict";

@@ -9,3 +9,3 @@ Object.defineProperty(exports, "__esModule", { value: true });

function deleteTableRow(table) {
var sel = (0, getSelectedCells_1.getSelectedCells)(table);
var sel = (0, roosterjs_content_model_core_1.getSelectedCells)(table);
if (sel) {

@@ -12,0 +12,0 @@ table.rows[sel.firstRow].cells.forEach(function (cell, colIndex) {

@@ -1,2 +0,2 @@

define(["require", "exports", "roosterjs-content-model-dom", "./getSelectedCells"], function (require, exports, roosterjs_content_model_dom_1, getSelectedCells_1) {
define(["require", "exports", "roosterjs-content-model-dom", "roosterjs-content-model-core"], function (require, exports, roosterjs_content_model_dom_1, roosterjs_content_model_core_1) {
"use strict";

@@ -9,11 +9,11 @@ Object.defineProperty(exports, "__esModule", { value: true });

function insertTableColumn(table, operation) {
var sel = (0, getSelectedCells_1.getSelectedCells)(table);
var sel = (0, roosterjs_content_model_core_1.getSelectedCells)(table);
var insertLeft = operation == 'insertLeft';
if (sel) {
for (var i = sel === null || sel === void 0 ? void 0 : sel.firstCol; i <= sel.lastCol; i++) {
for (var i = sel === null || sel === void 0 ? void 0 : sel.firstColumn; i <= sel.lastColumn; i++) {
table.rows.forEach(function (row) {
var cell = row.cells[insertLeft ? sel.firstCol : sel.lastCol];
row.cells.splice(insertLeft ? sel.firstCol : sel.lastCol + 1, 0, (0, roosterjs_content_model_dom_1.createTableCell)(cell.spanLeft, cell.spanAbove, cell.isHeader, cell.format));
var cell = row.cells[insertLeft ? sel.firstColumn : sel.lastColumn];
row.cells.splice(insertLeft ? sel.firstColumn : sel.lastColumn + 1, 0, (0, roosterjs_content_model_dom_1.createTableCell)(cell.spanLeft, cell.spanAbove, cell.isHeader, cell.format, cell.dataset));
});
table.widths.splice(insertLeft ? sel.firstCol : sel.lastCol + 1, 0, table.widths[insertLeft ? sel.firstCol : sel.lastCol]);
table.widths.splice(insertLeft ? sel.firstColumn : sel.lastColumn + 1, 0, table.widths[insertLeft ? sel.firstColumn : sel.lastColumn]);
}

@@ -20,0 +20,0 @@ }

@@ -1,2 +0,2 @@

define(["require", "exports", "tslib", "roosterjs-content-model-dom", "./getSelectedCells"], function (require, exports, tslib_1, roosterjs_content_model_dom_1, getSelectedCells_1) {
define(["require", "exports", "tslib", "roosterjs-content-model-dom", "roosterjs-content-model-core"], function (require, exports, tslib_1, roosterjs_content_model_dom_1, roosterjs_content_model_core_1) {
"use strict";

@@ -9,3 +9,3 @@ Object.defineProperty(exports, "__esModule", { value: true });

function insertTableRow(table, operation) {
var sel = (0, getSelectedCells_1.getSelectedCells)(table);
var sel = (0, roosterjs_content_model_core_1.getSelectedCells)(table);
var insertAbove = operation == 'insertAbove';

@@ -18,3 +18,3 @@ if (sel) {

cells: sourceRow.cells.map(function (cell) {
return (0, roosterjs_content_model_dom_1.createTableCell)(cell.spanLeft, cell.spanAbove, cell.isHeader, cell.format);
return (0, roosterjs_content_model_dom_1.createTableCell)(cell.spanLeft, cell.spanAbove, cell.isHeader, cell.format, cell.dataset);
}),

@@ -21,0 +21,0 @@ height: sourceRow.height,

@@ -1,2 +0,2 @@

define(["require", "exports", "./canMergeCells", "./getSelectedCells"], function (require, exports, canMergeCells_1, getSelectedCells_1) {
define(["require", "exports", "./canMergeCells", "roosterjs-content-model-core"], function (require, exports, canMergeCells_1, roosterjs_content_model_core_1) {
"use strict";

@@ -9,9 +9,10 @@ Object.defineProperty(exports, "__esModule", { value: true });

function mergeTableCells(table) {
var sel = (0, getSelectedCells_1.getSelectedCells)(table);
if (sel && (0, canMergeCells_1.canMergeCells)(table.rows, sel.firstRow, sel.firstCol, sel.lastRow, sel.lastCol)) {
var sel = (0, roosterjs_content_model_core_1.getSelectedCells)(table);
if (sel &&
(0, canMergeCells_1.canMergeCells)(table.rows, sel.firstRow, sel.firstColumn, sel.lastRow, sel.lastColumn)) {
for (var rowIndex = sel.firstRow; rowIndex <= sel.lastRow; rowIndex++) {
for (var colIndex = sel.firstCol; colIndex <= sel.lastCol; colIndex++) {
for (var colIndex = sel.firstColumn; colIndex <= sel.lastColumn; colIndex++) {
var cell = table.rows[rowIndex].cells[colIndex];
if (cell) {
cell.spanLeft = colIndex > sel.firstCol;
cell.spanLeft = colIndex > sel.firstColumn;
cell.spanAbove = rowIndex > sel.firstRow;

@@ -18,0 +19,0 @@ delete cell.cachedElement;

@@ -1,2 +0,2 @@

define(["require", "exports", "./canMergeCells", "./getSelectedCells"], function (require, exports, canMergeCells_1, getSelectedCells_1) {
define(["require", "exports", "./canMergeCells", "roosterjs-content-model-core"], function (require, exports, canMergeCells_1, roosterjs_content_model_core_1) {
"use strict";

@@ -10,6 +10,6 @@ Object.defineProperty(exports, "__esModule", { value: true });

var _a, _b, _c, _d;
var sel = (0, getSelectedCells_1.getSelectedCells)(table);
var sel = (0, roosterjs_content_model_core_1.getSelectedCells)(table);
var mergeLeft = operation == 'mergeLeft';
if (sel) {
var mergingColIndex = mergeLeft ? sel.firstCol : sel.lastCol + 1;
var mergingColIndex = mergeLeft ? sel.firstColumn : sel.lastColumn + 1;
if (mergingColIndex > 0 && mergingColIndex < table.rows[0].cells.length) {

@@ -16,0 +16,0 @@ for (var rowIndex = sel.firstRow; rowIndex <= sel.lastRow; rowIndex++) {

@@ -1,2 +0,2 @@

define(["require", "exports", "./canMergeCells", "./getSelectedCells"], function (require, exports, canMergeCells_1, getSelectedCells_1) {
define(["require", "exports", "./canMergeCells", "roosterjs-content-model-core"], function (require, exports, canMergeCells_1, roosterjs_content_model_core_1) {
"use strict";

@@ -10,3 +10,3 @@ Object.defineProperty(exports, "__esModule", { value: true });

var _a, _b, _c;
var sel = (0, getSelectedCells_1.getSelectedCells)(table);
var sel = (0, roosterjs_content_model_core_1.getSelectedCells)(table);
var mergeAbove = operation == 'mergeAbove';

@@ -16,3 +16,3 @@ if (sel) {

if (mergingRowIndex > 0 && mergingRowIndex < table.rows.length) {
for (var colIndex = sel.firstCol; colIndex <= sel.lastCol; colIndex++) {
for (var colIndex = sel.firstColumn; colIndex <= sel.lastColumn; colIndex++) {
var cell = table.rows[mergingRowIndex].cells[colIndex];

@@ -19,0 +19,0 @@ if (cell &&

@@ -1,2 +0,2 @@

define(["require", "exports", "tslib", "roosterjs-content-model-dom", "./getSelectedCells"], function (require, exports, tslib_1, roosterjs_content_model_dom_1, getSelectedCells_1) {
define(["require", "exports", "tslib", "roosterjs-content-model-dom", "roosterjs-content-model-core"], function (require, exports, tslib_1, roosterjs_content_model_dom_1, roosterjs_content_model_core_1) {
"use strict";

@@ -10,3 +10,3 @@ Object.defineProperty(exports, "__esModule", { value: true });

function splitTableCellHorizontally(table) {
var sel = (0, getSelectedCells_1.getSelectedCells)(table);
var sel = (0, roosterjs_content_model_core_1.getSelectedCells)(table);
if (sel) {

@@ -48,3 +48,3 @@ var _loop_1 = function (colIndex) {

};
for (var colIndex = sel.lastCol; colIndex >= sel.firstCol; colIndex--) {
for (var colIndex = sel.lastColumn; colIndex >= sel.firstColumn; colIndex--) {
_loop_1(colIndex);

@@ -51,0 +51,0 @@ }

@@ -1,2 +0,2 @@

define(["require", "exports", "tslib", "roosterjs-content-model-dom", "./getSelectedCells"], function (require, exports, tslib_1, roosterjs_content_model_dom_1, getSelectedCells_1) {
define(["require", "exports", "tslib", "roosterjs-content-model-dom", "roosterjs-content-model-core"], function (require, exports, tslib_1, roosterjs_content_model_dom_1, roosterjs_content_model_core_1) {
"use strict";

@@ -10,3 +10,3 @@ Object.defineProperty(exports, "__esModule", { value: true });

function splitTableCellVertically(table) {
var sel = (0, getSelectedCells_1.getSelectedCells)(table);
var sel = (0, roosterjs_content_model_core_1.getSelectedCells)(table);
if (sel) {

@@ -21,6 +21,8 @@ for (var rowIndex = sel.lastRow; rowIndex >= sel.firstRow; rowIndex--) {

if (belowRow === null || belowRow === void 0 ? void 0 : belowRow.cells.every(function (belowCell, colIndex) {
return colIndex < sel.firstCol || colIndex > sel.lastCol || belowCell.spanAbove;
return colIndex < sel.firstColumn ||
colIndex > sel.lastColumn ||
belowCell.spanAbove;
})) {
belowRow.cells.forEach(function (belowCell, colIndex) {
if (colIndex >= sel.firstCol && colIndex <= sel.lastCol) {
if (colIndex >= sel.firstColumn && colIndex <= sel.lastColumn) {
belowCell.spanAbove = false;

@@ -40,3 +42,3 @@ delete belowCell.cachedElement;

newCell.dataset = (0, tslib_1.__assign)({}, cell.dataset);
if (colIndex < sel.firstCol || colIndex > sel.lastCol) {
if (colIndex < sel.firstColumn || colIndex > sel.lastColumn) {
newCell.spanAbove = true;

@@ -43,0 +45,0 @@ }

@@ -16,3 +16,9 @@ define(["require", "exports", "tslib", "roosterjs-content-model-core", "../../modelApi/common/retrieveModelFormatState", "roosterjs-content-model-dom"], function (require, exports, tslib_1, roosterjs_content_model_core_1, retrieveModelFormatState_1, roosterjs_content_model_dom_1) {

});
var result = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, editor.getUndoState()), { isDarkMode: editor.isDarkMode(), zoomScale: editor.getZoomScale() });
var manager = editor.getSnapshotsManager();
var result = {
canUndo: manager.hasNewContent || manager.canMove(-1),
canRedo: manager.canMove(1),
isDarkMode: editor.isDarkMode(),
zoomScale: editor.getZoomScale(),
};
(0, retrieveModelFormatState_1.retrieveModelFormatState)(model, pendingFormat, result);

@@ -19,0 +25,0 @@ return result;

@@ -1,2 +0,2 @@

define(["require", "exports", "../utils/formatImageWithContentModel", "../../modelApi/domUtils/readFile", "roosterjs-content-model-core"], function (require, exports, formatImageWithContentModel_1, readFile_1, roosterjs_content_model_core_1) {
define(["require", "exports", "../utils/formatImageWithContentModel", "roosterjs-content-model-core"], function (require, exports, formatImageWithContentModel_1, roosterjs_content_model_core_1) {
"use strict";

@@ -12,3 +12,3 @@ Object.defineProperty(exports, "__esModule", { value: true });

var selection = editor.getDOMSelection();
(0, readFile_1.readFile)(file, function (dataUrl) {
(0, roosterjs_content_model_core_1.readFile)(file, function (dataUrl) {
if (dataUrl && !editor.isDisposed() && (selection === null || selection === void 0 ? void 0 : selection.type) === 'image') {

@@ -15,0 +15,0 @@ (0, formatImageWithContentModel_1.default)(editor, 'changeImage', function (image) {

@@ -1,2 +0,2 @@

define(["require", "exports", "roosterjs-content-model-dom", "roosterjs-content-model-core", "../../modelApi/domUtils/readFile"], function (require, exports, roosterjs_content_model_dom_1, roosterjs_content_model_core_1, readFile_1) {
define(["require", "exports", "roosterjs-content-model-dom", "roosterjs-content-model-core"], function (require, exports, roosterjs_content_model_dom_1, roosterjs_content_model_core_1) {
"use strict";

@@ -15,3 +15,3 @@ Object.defineProperty(exports, "__esModule", { value: true });

else {
(0, readFile_1.readFile)(imageFileOrSrc, function (dataUrl) {
(0, roosterjs_content_model_core_1.readFile)(imageFileOrSrc, function (dataUrl) {
if (dataUrl && !editor.isDisposed()) {

@@ -18,0 +18,0 @@ insertImageWithSrc(editor, dataUrl);

@@ -1,2 +0,2 @@

define(["require", "exports", "tslib", "../../modelApi/table/getSelectedCells", "roosterjs-content-model-dom", "roosterjs-content-model-core"], function (require, exports, tslib_1, getSelectedCells_1, roosterjs_content_model_dom_1, roosterjs_content_model_core_1) {
define(["require", "exports", "tslib", "roosterjs-content-model-dom", "roosterjs-content-model-core"], function (require, exports, tslib_1, roosterjs_content_model_dom_1, roosterjs_content_model_core_1) {
"use strict";

@@ -14,3 +14,3 @@ Object.defineProperty(exports, "__esModule", { value: true });

if (tableModel) {
var sel = (0, getSelectedCells_1.getSelectedCells)(tableModel);
var sel = (0, roosterjs_content_model_core_1.getSelectedCells)(tableModel);
var perimeter = {

@@ -71,3 +71,3 @@ Top: false,

for (var rowIndex = sel.firstRow; rowIndex <= sel.lastRow; rowIndex++) {
for (var colIndex = sel.firstCol; colIndex <= sel.lastCol; colIndex++) {
for (var colIndex = sel.firstColumn; colIndex <= sel.lastColumn; colIndex++) {
var cell = tableModel.rows[rowIndex].cells[colIndex];

@@ -87,3 +87,3 @@ // Format cells - All borders

for (var rowIndex = sel.firstRow; rowIndex <= sel.lastRow; rowIndex++) {
var cell = tableModel.rows[rowIndex].cells[sel.firstCol];
var cell = tableModel.rows[rowIndex].cells[sel.firstColumn];
// Format cells - Left border

@@ -98,3 +98,3 @@ applyBorderFormat(cell, borderFormat, leftBorder);

for (var rowIndex = sel.firstRow; rowIndex <= sel.lastRow; rowIndex++) {
var cell = tableModel.rows[rowIndex].cells[sel.lastCol];
var cell = tableModel.rows[rowIndex].cells[sel.lastColumn];
// Format cells - Right border

@@ -108,3 +108,3 @@ applyBorderFormat(cell, borderFormat, rightBorder);

var topBorder = ['borderTop'];
for (var colIndex = sel.firstCol; colIndex <= sel.lastCol; colIndex++) {
for (var colIndex = sel.firstColumn; colIndex <= sel.lastColumn; colIndex++) {
var cell = tableModel.rows[sel.firstRow].cells[colIndex];

@@ -119,3 +119,3 @@ // Format cells - Top border

var bottomBorder = ['borderBottom'];
for (var colIndex = sel.firstCol; colIndex <= sel.lastCol; colIndex++) {
for (var colIndex = sel.firstColumn; colIndex <= sel.lastColumn; colIndex++) {
var cell = tableModel.rows[sel.lastRow].cells[colIndex];

@@ -130,3 +130,3 @@ // Format cells - Bottom border

// Format cells - Inside borders
var singleCol = sel.lastCol == sel.firstCol;
var singleCol = sel.lastColumn == sel.firstColumn;
var singleRow = sel.lastRow == sel.firstRow;

@@ -139,5 +139,5 @@ // Single cell selection

if (singleCol) {
applyBorderFormat(tableModel.rows[sel.firstRow].cells[sel.firstCol], borderFormat, ['borderBottom']);
applyBorderFormat(tableModel.rows[sel.firstRow].cells[sel.firstColumn], borderFormat, ['borderBottom']);
for (var rowIndex = sel.firstRow + 1; rowIndex <= sel.lastRow - 1; rowIndex++) {
var cell = tableModel.rows[rowIndex].cells[sel.firstCol];
var cell = tableModel.rows[rowIndex].cells[sel.firstColumn];
applyBorderFormat(cell, borderFormat, [

@@ -148,3 +148,3 @@ 'borderTop',

}
applyBorderFormat(tableModel.rows[sel.lastRow].cells[sel.firstCol], borderFormat, ['borderTop']);
applyBorderFormat(tableModel.rows[sel.lastRow].cells[sel.firstColumn], borderFormat, ['borderTop']);
break;

@@ -154,4 +154,4 @@ }

if (singleRow) {
applyBorderFormat(tableModel.rows[sel.firstRow].cells[sel.firstCol], borderFormat, ['borderRight']);
for (var colIndex = sel.firstCol + 1; colIndex <= sel.lastCol - 1; colIndex++) {
applyBorderFormat(tableModel.rows[sel.firstRow].cells[sel.firstColumn], borderFormat, ['borderRight']);
for (var colIndex = sel.firstColumn + 1; colIndex <= sel.lastColumn - 1; colIndex++) {
var cell = tableModel.rows[sel.firstRow].cells[colIndex];

@@ -163,3 +163,3 @@ applyBorderFormat(cell, borderFormat, [

}
applyBorderFormat(tableModel.rows[sel.firstRow].cells[sel.lastCol], borderFormat, ['borderLeft']);
applyBorderFormat(tableModel.rows[sel.firstRow].cells[sel.lastColumn], borderFormat, ['borderLeft']);
break;

@@ -169,11 +169,11 @@ }

// Top left cell
applyBorderFormat(tableModel.rows[sel.firstRow].cells[sel.firstCol], borderFormat, ['borderBottom', 'borderRight']);
applyBorderFormat(tableModel.rows[sel.firstRow].cells[sel.firstColumn], borderFormat, ['borderBottom', 'borderRight']);
// Top right cell
applyBorderFormat(tableModel.rows[sel.firstRow].cells[sel.lastCol], borderFormat, ['borderBottom', 'borderLeft']);
applyBorderFormat(tableModel.rows[sel.firstRow].cells[sel.lastColumn], borderFormat, ['borderBottom', 'borderLeft']);
// Bottom left cell
applyBorderFormat(tableModel.rows[sel.lastRow].cells[sel.firstCol], borderFormat, ['borderTop', 'borderRight']);
applyBorderFormat(tableModel.rows[sel.lastRow].cells[sel.firstColumn], borderFormat, ['borderTop', 'borderRight']);
// Bottom right cell
applyBorderFormat(tableModel.rows[sel.lastRow].cells[sel.lastCol], borderFormat, ['borderTop', 'borderLeft']);
applyBorderFormat(tableModel.rows[sel.lastRow].cells[sel.lastColumn], borderFormat, ['borderTop', 'borderLeft']);
// First row
for (var colIndex = sel.firstCol + 1; colIndex < sel.lastCol; colIndex++) {
for (var colIndex = sel.firstColumn + 1; colIndex < sel.lastColumn; colIndex++) {
var cell = tableModel.rows[sel.firstRow].cells[colIndex];

@@ -187,3 +187,3 @@ applyBorderFormat(cell, borderFormat, [

// Last row
for (var colIndex = sel.firstCol + 1; colIndex < sel.lastCol; colIndex++) {
for (var colIndex = sel.firstColumn + 1; colIndex < sel.lastColumn; colIndex++) {
var cell = tableModel.rows[sel.lastRow].cells[colIndex];

@@ -198,3 +198,3 @@ applyBorderFormat(cell, borderFormat, [

for (var rowIndex = sel.firstRow + 1; rowIndex < sel.lastRow; rowIndex++) {
var cell = tableModel.rows[rowIndex].cells[sel.firstCol];
var cell = tableModel.rows[rowIndex].cells[sel.firstColumn];
applyBorderFormat(cell, borderFormat, [

@@ -208,3 +208,3 @@ 'borderTop',

for (var rowIndex = sel.firstRow + 1; rowIndex < sel.lastRow; rowIndex++) {
var cell = tableModel.rows[rowIndex].cells[sel.lastCol];
var cell = tableModel.rows[rowIndex].cells[sel.lastColumn];
applyBorderFormat(cell, borderFormat, [

@@ -217,5 +217,5 @@ 'borderTop',

// Inner cells
sel.firstCol++;
sel.firstColumn++;
sel.firstRow++;
sel.lastCol--;
sel.lastColumn--;
sel.lastRow--;

@@ -279,3 +279,3 @@ operations.push('allBorders');

if (perimeter.Top && sel.firstRow - 1 >= 0) {
for (var colIndex = sel.firstCol; colIndex <= sel.lastCol; colIndex++) {
for (var colIndex = sel.firstColumn; colIndex <= sel.lastColumn; colIndex++) {
var cell = tableModel.rows[sel.firstRow - 1].cells[colIndex];

@@ -287,3 +287,3 @@ applyBorderFormat(cell, borderFormat, ['borderBottom']);

if (perimeter.Bottom && sel.lastRow + 1 < tableModel.rows.length) {
for (var colIndex = sel.firstCol; colIndex <= sel.lastCol; colIndex++) {
for (var colIndex = sel.firstColumn; colIndex <= sel.lastColumn; colIndex++) {
var cell = tableModel.rows[sel.lastRow + 1].cells[colIndex];

@@ -294,5 +294,5 @@ applyBorderFormat(cell, borderFormat, ['borderTop']);

// Left of selection
if (perimeter.Left && sel.firstCol - 1 >= 0) {
if (perimeter.Left && sel.firstColumn - 1 >= 0) {
for (var rowIndex = sel.firstRow; rowIndex <= sel.lastRow; rowIndex++) {
var cell = tableModel.rows[rowIndex].cells[sel.firstCol - 1];
var cell = tableModel.rows[rowIndex].cells[sel.firstColumn - 1];
applyBorderFormat(cell, borderFormat, ['borderRight']);

@@ -302,5 +302,5 @@ }

// Right of selection
if (perimeter.Right && sel.lastCol + 1 < tableModel.rows[0].cells.length) {
if (perimeter.Right && sel.lastColumn + 1 < tableModel.rows[0].cells.length) {
for (var rowIndex = sel.firstRow; rowIndex <= sel.lastRow; rowIndex++) {
var cell = tableModel.rows[rowIndex].cells[sel.lastCol + 1];
var cell = tableModel.rows[rowIndex].cells[sel.lastColumn + 1];
applyBorderFormat(cell, borderFormat, ['borderLeft']);

@@ -307,0 +307,0 @@ }

@@ -1,2 +0,2 @@

define(["require", "exports", "tslib", "../selection/hasSelectionInBlock", "../../modelApi/table/alignTable", "../../modelApi/table/deleteTable", "../../modelApi/table/deleteTableColumn", "../../modelApi/table/deleteTableRow", "../../modelApi/table/ensureFocusableParagraphForTable", "../../modelApi/table/insertTableColumn", "../../modelApi/table/insertTableRow", "../../modelApi/table/mergeTableCells", "../../modelApi/table/mergeTableColumn", "../../modelApi/table/mergeTableRow", "../../modelApi/table/splitTableCellHorizontally", "../../modelApi/table/splitTableCellVertically", "roosterjs-content-model-core", "../../modelApi/table/alignTableCell", "roosterjs-content-model-dom"], function (require, exports, tslib_1, hasSelectionInBlock_1, alignTable_1, deleteTable_1, deleteTableColumn_1, deleteTableRow_1, ensureFocusableParagraphForTable_1, insertTableColumn_1, insertTableRow_1, mergeTableCells_1, mergeTableColumn_1, mergeTableRow_1, splitTableCellHorizontally_1, splitTableCellVertically_1, roosterjs_content_model_core_1, alignTableCell_1, roosterjs_content_model_dom_1) {
define(["require", "exports", "tslib", "../../modelApi/table/alignTable", "../../modelApi/table/deleteTable", "../../modelApi/table/deleteTableColumn", "../../modelApi/table/deleteTableRow", "../../modelApi/table/ensureFocusableParagraphForTable", "../../modelApi/table/insertTableColumn", "../../modelApi/table/insertTableRow", "../../modelApi/table/mergeTableCells", "../../modelApi/table/mergeTableColumn", "../../modelApi/table/mergeTableRow", "../../modelApi/table/splitTableCellHorizontally", "../../modelApi/table/splitTableCellVertically", "roosterjs-content-model-core", "../../modelApi/table/alignTableCell", "roosterjs-content-model-dom"], function (require, exports, tslib_1, alignTable_1, deleteTable_1, deleteTableColumn_1, deleteTableRow_1, ensureFocusableParagraphForTable_1, insertTableColumn_1, insertTableRow_1, mergeTableCells_1, mergeTableColumn_1, mergeTableRow_1, splitTableCellHorizontally_1, splitTableCellVertically_1, roosterjs_content_model_core_1, alignTableCell_1, roosterjs_content_model_dom_1) {
"use strict";

@@ -65,3 +65,3 @@ Object.defineProperty(exports, "__esModule", { value: true });

}
if (!(0, hasSelectionInBlock_1.default)(tableModel)) {
if (!(0, roosterjs_content_model_core_1.hasSelectionInBlock)(tableModel)) {
var paragraph = (0, ensureFocusableParagraphForTable_1.ensureFocusableParagraphForTable)(model, path, tableModel);

@@ -68,0 +68,0 @@ if (paragraph) {

@@ -1,2 +0,2 @@

define(["require", "exports", "tslib", "../selection/hasSelectionInBlockGroup", "roosterjs-content-model-core"], function (require, exports, tslib_1, hasSelectionInBlockGroup_1, roosterjs_content_model_core_1) {
define(["require", "exports", "tslib", "roosterjs-content-model-core"], function (require, exports, tslib_1, roosterjs_content_model_core_1) {
"use strict";

@@ -17,3 +17,3 @@ Object.defineProperty(exports, "__esModule", { value: true });

return row.cells.forEach(function (cell) {
if ((0, hasSelectionInBlockGroup_1.default)(cell)) {
if ((0, roosterjs_content_model_core_1.hasSelectionInBlockGroup)(cell)) {
(0, roosterjs_content_model_core_1.setTableCellBackgroundColor)(cell, color, true /*isColorOverride*/);

@@ -20,0 +20,0 @@ }

@@ -24,5 +24,2 @@ export { default as insertTable } from './publicApi/table/insertTable';

export { default as setListStartNumber } from './publicApi/list/setListStartNumber';
export { default as hasSelectionInBlock } from './publicApi/selection/hasSelectionInBlock';
export { default as hasSelectionInSegment } from './publicApi/selection/hasSelectionInSegment';
export { default as hasSelectionInBlockGroup } from './publicApi/selection/hasSelectionInBlockGroup';
export { default as setIndentation } from './publicApi/block/setIndentation';

@@ -29,0 +26,0 @@ export { default as setAlignment } from './publicApi/block/setAlignment';

@@ -24,5 +24,2 @@ export { default as insertTable } from './publicApi/table/insertTable';

export { default as setListStartNumber } from './publicApi/list/setListStartNumber';
export { default as hasSelectionInBlock } from './publicApi/selection/hasSelectionInBlock';
export { default as hasSelectionInSegment } from './publicApi/selection/hasSelectionInSegment';
export { default as hasSelectionInBlockGroup } from './publicApi/selection/hasSelectionInBlockGroup';
export { default as setIndentation } from './publicApi/block/setIndentation';

@@ -29,0 +26,0 @@ export { default as setAlignment } from './publicApi/block/setAlignment';

@@ -30,2 +30,16 @@ import { getOperationalBlocks, isBlockGroupOfType } from 'roosterjs-content-model-core';

}
if (alreadyInExpectedType) {
//if the list item has margins or textAlign, we need to apply them to the block to preserve the indention and alignment
block.blocks.forEach(function (x) {
if (block.format.marginLeft) {
x.format.marginLeft = block.format.marginLeft;
}
if (block.format.marginRight) {
x.format.marginRight = block.format.marginRight;
}
if (block.format.textAlign) {
x.format.textAlign = block.format.textAlign;
}
});
}
}

@@ -65,2 +79,13 @@ else {

newListItem.blocks.push(block);
if (block.format.marginRight) {
newListItem.format.marginRight = block.format.marginRight;
block.format.marginRight = undefined;
}
if (block.format.marginLeft) {
newListItem.format.marginLeft = block.format.marginLeft;
block.format.marginLeft = undefined;
}
if (block.format.textAlign) {
newListItem.format.textAlign = block.format.textAlign;
}
parent.blocks.splice(index, 1, newListItem);

@@ -67,0 +92,0 @@ existingListItems.push(newListItem);

@@ -1,3 +0,2 @@

import type { ContentModelTableRow } from 'roosterjs-content-model-types';
import type { TableSelectionCoordinates } from '../table/getSelectedCells';
import type { ContentModelTableRow, TableSelectionCoordinates } from 'roosterjs-content-model-types';
/**

@@ -4,0 +3,0 @@ * @internal

@@ -7,4 +7,4 @@ import { addSegment, createSelectionMarker } from 'roosterjs-content-model-dom';

var _a;
var firstCol = selection.firstCol, firstRow = selection.firstRow;
var cell = (_a = rows[firstRow]) === null || _a === void 0 ? void 0 : _a.cells[firstCol];
var firstColumn = selection.firstColumn, firstRow = selection.firstRow;
var cell = (_a = rows[firstRow]) === null || _a === void 0 ? void 0 : _a.cells[firstColumn];
if (cell) {

@@ -11,0 +11,0 @@ addSegment(cell, createSelectionMarker());

@@ -1,3 +0,2 @@

import { getSelectedCells } from './getSelectedCells';
import { updateTableCellMetadata } from 'roosterjs-content-model-core';
import { getSelectedCells, updateTableCellMetadata } from 'roosterjs-content-model-core';
var TextAlignValueMap = {

@@ -39,3 +38,3 @@ alignCellLeft: 'start',

for (var rowIndex = sel.firstRow; rowIndex <= sel.lastRow; rowIndex++) {
for (var colIndex = sel.firstCol; colIndex <= sel.lastCol; colIndex++) {
for (var colIndex = sel.firstColumn; colIndex <= sel.lastColumn; colIndex++) {
var cell = (_a = table.rows[rowIndex]) === null || _a === void 0 ? void 0 : _a.cells[colIndex];

@@ -42,0 +41,0 @@ var format = cell === null || cell === void 0 ? void 0 : cell.format;

import { collapseTableSelection } from '../selection/collapseTableSelection';
import { getSelectedCells } from './getSelectedCells';
import { getSelectedCells } from 'roosterjs-content-model-core';
/**

@@ -10,10 +10,10 @@ * @internal

for (var rowIndex = 0; rowIndex < table.rows.length; rowIndex++) {
var cellInNextCol = table.rows[rowIndex].cells[sel.lastCol + 1];
var cellInNextCol = table.rows[rowIndex].cells[sel.lastColumn + 1];
if (cellInNextCol) {
cellInNextCol.spanLeft =
cellInNextCol.spanLeft && table.rows[rowIndex].cells[sel.firstCol].spanLeft;
cellInNextCol.spanLeft && table.rows[rowIndex].cells[sel.firstColumn].spanLeft;
}
table.rows[rowIndex].cells.splice(sel.firstCol, sel.lastCol - sel.firstCol + 1);
table.rows[rowIndex].cells.splice(sel.firstColumn, sel.lastColumn - sel.firstColumn + 1);
}
table.widths.splice(sel.firstCol, sel.lastCol - sel.firstCol + 1);
table.widths.splice(sel.firstColumn, sel.lastColumn - sel.firstColumn + 1);
collapseTableSelection(table.rows, sel);

@@ -20,0 +20,0 @@ }

import { collapseTableSelection } from '../selection/collapseTableSelection';
import { getSelectedCells } from './getSelectedCells';
import { getSelectedCells } from 'roosterjs-content-model-core';
/**

@@ -4,0 +4,0 @@ * @internal

import { createTableCell } from 'roosterjs-content-model-dom';
import { getSelectedCells } from './getSelectedCells';
import { getSelectedCells } from 'roosterjs-content-model-core';
/**

@@ -10,8 +10,8 @@ * @internal

if (sel) {
for (var i = sel === null || sel === void 0 ? void 0 : sel.firstCol; i <= sel.lastCol; i++) {
for (var i = sel === null || sel === void 0 ? void 0 : sel.firstColumn; i <= sel.lastColumn; i++) {
table.rows.forEach(function (row) {
var cell = row.cells[insertLeft ? sel.firstCol : sel.lastCol];
row.cells.splice(insertLeft ? sel.firstCol : sel.lastCol + 1, 0, createTableCell(cell.spanLeft, cell.spanAbove, cell.isHeader, cell.format));
var cell = row.cells[insertLeft ? sel.firstColumn : sel.lastColumn];
row.cells.splice(insertLeft ? sel.firstColumn : sel.lastColumn + 1, 0, createTableCell(cell.spanLeft, cell.spanAbove, cell.isHeader, cell.format, cell.dataset));
});
table.widths.splice(insertLeft ? sel.firstCol : sel.lastCol + 1, 0, table.widths[insertLeft ? sel.firstCol : sel.lastCol]);
table.widths.splice(insertLeft ? sel.firstColumn : sel.lastColumn + 1, 0, table.widths[insertLeft ? sel.firstColumn : sel.lastColumn]);
}

@@ -18,0 +18,0 @@ }

import { __assign } from "tslib";
import { createTableCell } from 'roosterjs-content-model-dom';
import { getSelectedCells } from './getSelectedCells';
import { getSelectedCells } from 'roosterjs-content-model-core';
/**

@@ -16,3 +16,3 @@ * @internal

cells: sourceRow.cells.map(function (cell) {
return createTableCell(cell.spanLeft, cell.spanAbove, cell.isHeader, cell.format);
return createTableCell(cell.spanLeft, cell.spanAbove, cell.isHeader, cell.format, cell.dataset);
}),

@@ -19,0 +19,0 @@ height: sourceRow.height,

import { canMergeCells } from './canMergeCells';
import { getSelectedCells } from './getSelectedCells';
import { getSelectedCells } from 'roosterjs-content-model-core';
/**

@@ -8,8 +8,9 @@ * @internal

var sel = getSelectedCells(table);
if (sel && canMergeCells(table.rows, sel.firstRow, sel.firstCol, sel.lastRow, sel.lastCol)) {
if (sel &&
canMergeCells(table.rows, sel.firstRow, sel.firstColumn, sel.lastRow, sel.lastColumn)) {
for (var rowIndex = sel.firstRow; rowIndex <= sel.lastRow; rowIndex++) {
for (var colIndex = sel.firstCol; colIndex <= sel.lastCol; colIndex++) {
for (var colIndex = sel.firstColumn; colIndex <= sel.lastColumn; colIndex++) {
var cell = table.rows[rowIndex].cells[colIndex];
if (cell) {
cell.spanLeft = colIndex > sel.firstCol;
cell.spanLeft = colIndex > sel.firstColumn;
cell.spanAbove = rowIndex > sel.firstRow;

@@ -16,0 +17,0 @@ delete cell.cachedElement;

import { canMergeCells } from './canMergeCells';
import { getSelectedCells } from './getSelectedCells';
import { getSelectedCells } from 'roosterjs-content-model-core';
/**

@@ -11,3 +11,3 @@ * @internal

if (sel) {
var mergingColIndex = mergeLeft ? sel.firstCol : sel.lastCol + 1;
var mergingColIndex = mergeLeft ? sel.firstColumn : sel.lastColumn + 1;
if (mergingColIndex > 0 && mergingColIndex < table.rows[0].cells.length) {

@@ -14,0 +14,0 @@ for (var rowIndex = sel.firstRow; rowIndex <= sel.lastRow; rowIndex++) {

import { canMergeCells } from './canMergeCells';
import { getSelectedCells } from './getSelectedCells';
import { getSelectedCells } from 'roosterjs-content-model-core';
/**

@@ -13,3 +13,3 @@ * @internal

if (mergingRowIndex > 0 && mergingRowIndex < table.rows.length) {
for (var colIndex = sel.firstCol; colIndex <= sel.lastCol; colIndex++) {
for (var colIndex = sel.firstColumn; colIndex <= sel.lastColumn; colIndex++) {
var cell = table.rows[mergingRowIndex].cells[colIndex];

@@ -16,0 +16,0 @@ if (cell &&

import { __assign } from "tslib";
import { createTableCell } from 'roosterjs-content-model-dom';
import { getSelectedCells } from './getSelectedCells';
import { getSelectedCells } from 'roosterjs-content-model-core';
var MIN_WIDTH = 30;

@@ -46,3 +46,3 @@ /**

};
for (var colIndex = sel.lastCol; colIndex >= sel.firstCol; colIndex--) {
for (var colIndex = sel.lastColumn; colIndex >= sel.firstColumn; colIndex--) {
_loop_1(colIndex);

@@ -49,0 +49,0 @@ }

import { __assign } from "tslib";
import { createTableCell } from 'roosterjs-content-model-dom';
import { getSelectedCells } from './getSelectedCells';
import { getSelectedCells } from 'roosterjs-content-model-core';
var MIN_HEIGHT = 22;

@@ -19,6 +19,8 @@ /**

if (belowRow === null || belowRow === void 0 ? void 0 : belowRow.cells.every(function (belowCell, colIndex) {
return colIndex < sel.firstCol || colIndex > sel.lastCol || belowCell.spanAbove;
return colIndex < sel.firstColumn ||
colIndex > sel.lastColumn ||
belowCell.spanAbove;
})) {
belowRow.cells.forEach(function (belowCell, colIndex) {
if (colIndex >= sel.firstCol && colIndex <= sel.lastCol) {
if (colIndex >= sel.firstColumn && colIndex <= sel.lastColumn) {
belowCell.spanAbove = false;

@@ -38,3 +40,3 @@ delete belowCell.cachedElement;

newCell.dataset = __assign({}, cell.dataset);
if (colIndex < sel.firstCol || colIndex > sel.lastCol) {
if (colIndex < sel.firstColumn || colIndex > sel.lastColumn) {
newCell.spanAbove = true;

@@ -41,0 +43,0 @@ }

@@ -1,2 +0,2 @@

import { __assign, __read } from "tslib";
import { __read } from "tslib";
import { getSelectionRootNode } from 'roosterjs-content-model-core';

@@ -16,3 +16,9 @@ import { retrieveModelFormatState } from '../../modelApi/common/retrieveModelFormatState';

});
var result = __assign(__assign({}, editor.getUndoState()), { isDarkMode: editor.isDarkMode(), zoomScale: editor.getZoomScale() });
var manager = editor.getSnapshotsManager();
var result = {
canUndo: manager.hasNewContent || manager.canMove(-1),
canRedo: manager.canMove(1),
isDarkMode: editor.isDarkMode(),
zoomScale: editor.getZoomScale(),
};
retrieveModelFormatState(model, pendingFormat, result);

@@ -19,0 +25,0 @@ return result;

import formatImageWithContentModel from '../utils/formatImageWithContentModel';
import { readFile } from '../../modelApi/domUtils/readFile';
import { updateImageMetadata } from 'roosterjs-content-model-core';
import { readFile, updateImageMetadata } from 'roosterjs-content-model-core';
/**

@@ -5,0 +4,0 @@ * Change the selected image src

import { addSegment, createContentModelDocument, createImage } from 'roosterjs-content-model-dom';
import { mergeModel } from 'roosterjs-content-model-core';
import { readFile } from '../../modelApi/domUtils/readFile';
import { mergeModel, readFile } from 'roosterjs-content-model-core';
/**

@@ -5,0 +4,0 @@ * Insert an image into current selected position

import { __read } from "tslib";
import { getSelectedCells } from '../../modelApi/table/getSelectedCells';
import { parseValueWithUnit } from 'roosterjs-content-model-dom';
import { extractBorderValues, getFirstSelectedTable, updateTableCellMetadata, } from 'roosterjs-content-model-core';
import { extractBorderValues, getFirstSelectedTable, getSelectedCells, updateTableCellMetadata, } from 'roosterjs-content-model-core';
/**

@@ -71,3 +70,3 @@ * Operations to apply border

for (var rowIndex = sel.firstRow; rowIndex <= sel.lastRow; rowIndex++) {
for (var colIndex = sel.firstCol; colIndex <= sel.lastCol; colIndex++) {
for (var colIndex = sel.firstColumn; colIndex <= sel.lastColumn; colIndex++) {
var cell = tableModel.rows[rowIndex].cells[colIndex];

@@ -87,3 +86,3 @@ // Format cells - All borders

for (var rowIndex = sel.firstRow; rowIndex <= sel.lastRow; rowIndex++) {
var cell = tableModel.rows[rowIndex].cells[sel.firstCol];
var cell = tableModel.rows[rowIndex].cells[sel.firstColumn];
// Format cells - Left border

@@ -98,3 +97,3 @@ applyBorderFormat(cell, borderFormat, leftBorder);

for (var rowIndex = sel.firstRow; rowIndex <= sel.lastRow; rowIndex++) {
var cell = tableModel.rows[rowIndex].cells[sel.lastCol];
var cell = tableModel.rows[rowIndex].cells[sel.lastColumn];
// Format cells - Right border

@@ -108,3 +107,3 @@ applyBorderFormat(cell, borderFormat, rightBorder);

var topBorder = ['borderTop'];
for (var colIndex = sel.firstCol; colIndex <= sel.lastCol; colIndex++) {
for (var colIndex = sel.firstColumn; colIndex <= sel.lastColumn; colIndex++) {
var cell = tableModel.rows[sel.firstRow].cells[colIndex];

@@ -119,3 +118,3 @@ // Format cells - Top border

var bottomBorder = ['borderBottom'];
for (var colIndex = sel.firstCol; colIndex <= sel.lastCol; colIndex++) {
for (var colIndex = sel.firstColumn; colIndex <= sel.lastColumn; colIndex++) {
var cell = tableModel.rows[sel.lastRow].cells[colIndex];

@@ -130,3 +129,3 @@ // Format cells - Bottom border

// Format cells - Inside borders
var singleCol = sel.lastCol == sel.firstCol;
var singleCol = sel.lastColumn == sel.firstColumn;
var singleRow = sel.lastRow == sel.firstRow;

@@ -139,5 +138,5 @@ // Single cell selection

if (singleCol) {
applyBorderFormat(tableModel.rows[sel.firstRow].cells[sel.firstCol], borderFormat, ['borderBottom']);
applyBorderFormat(tableModel.rows[sel.firstRow].cells[sel.firstColumn], borderFormat, ['borderBottom']);
for (var rowIndex = sel.firstRow + 1; rowIndex <= sel.lastRow - 1; rowIndex++) {
var cell = tableModel.rows[rowIndex].cells[sel.firstCol];
var cell = tableModel.rows[rowIndex].cells[sel.firstColumn];
applyBorderFormat(cell, borderFormat, [

@@ -148,3 +147,3 @@ 'borderTop',

}
applyBorderFormat(tableModel.rows[sel.lastRow].cells[sel.firstCol], borderFormat, ['borderTop']);
applyBorderFormat(tableModel.rows[sel.lastRow].cells[sel.firstColumn], borderFormat, ['borderTop']);
break;

@@ -154,4 +153,4 @@ }

if (singleRow) {
applyBorderFormat(tableModel.rows[sel.firstRow].cells[sel.firstCol], borderFormat, ['borderRight']);
for (var colIndex = sel.firstCol + 1; colIndex <= sel.lastCol - 1; colIndex++) {
applyBorderFormat(tableModel.rows[sel.firstRow].cells[sel.firstColumn], borderFormat, ['borderRight']);
for (var colIndex = sel.firstColumn + 1; colIndex <= sel.lastColumn - 1; colIndex++) {
var cell = tableModel.rows[sel.firstRow].cells[colIndex];

@@ -163,3 +162,3 @@ applyBorderFormat(cell, borderFormat, [

}
applyBorderFormat(tableModel.rows[sel.firstRow].cells[sel.lastCol], borderFormat, ['borderLeft']);
applyBorderFormat(tableModel.rows[sel.firstRow].cells[sel.lastColumn], borderFormat, ['borderLeft']);
break;

@@ -169,11 +168,11 @@ }

// Top left cell
applyBorderFormat(tableModel.rows[sel.firstRow].cells[sel.firstCol], borderFormat, ['borderBottom', 'borderRight']);
applyBorderFormat(tableModel.rows[sel.firstRow].cells[sel.firstColumn], borderFormat, ['borderBottom', 'borderRight']);
// Top right cell
applyBorderFormat(tableModel.rows[sel.firstRow].cells[sel.lastCol], borderFormat, ['borderBottom', 'borderLeft']);
applyBorderFormat(tableModel.rows[sel.firstRow].cells[sel.lastColumn], borderFormat, ['borderBottom', 'borderLeft']);
// Bottom left cell
applyBorderFormat(tableModel.rows[sel.lastRow].cells[sel.firstCol], borderFormat, ['borderTop', 'borderRight']);
applyBorderFormat(tableModel.rows[sel.lastRow].cells[sel.firstColumn], borderFormat, ['borderTop', 'borderRight']);
// Bottom right cell
applyBorderFormat(tableModel.rows[sel.lastRow].cells[sel.lastCol], borderFormat, ['borderTop', 'borderLeft']);
applyBorderFormat(tableModel.rows[sel.lastRow].cells[sel.lastColumn], borderFormat, ['borderTop', 'borderLeft']);
// First row
for (var colIndex = sel.firstCol + 1; colIndex < sel.lastCol; colIndex++) {
for (var colIndex = sel.firstColumn + 1; colIndex < sel.lastColumn; colIndex++) {
var cell = tableModel.rows[sel.firstRow].cells[colIndex];

@@ -187,3 +186,3 @@ applyBorderFormat(cell, borderFormat, [

// Last row
for (var colIndex = sel.firstCol + 1; colIndex < sel.lastCol; colIndex++) {
for (var colIndex = sel.firstColumn + 1; colIndex < sel.lastColumn; colIndex++) {
var cell = tableModel.rows[sel.lastRow].cells[colIndex];

@@ -198,3 +197,3 @@ applyBorderFormat(cell, borderFormat, [

for (var rowIndex = sel.firstRow + 1; rowIndex < sel.lastRow; rowIndex++) {
var cell = tableModel.rows[rowIndex].cells[sel.firstCol];
var cell = tableModel.rows[rowIndex].cells[sel.firstColumn];
applyBorderFormat(cell, borderFormat, [

@@ -208,3 +207,3 @@ 'borderTop',

for (var rowIndex = sel.firstRow + 1; rowIndex < sel.lastRow; rowIndex++) {
var cell = tableModel.rows[rowIndex].cells[sel.lastCol];
var cell = tableModel.rows[rowIndex].cells[sel.lastColumn];
applyBorderFormat(cell, borderFormat, [

@@ -217,5 +216,5 @@ 'borderTop',

// Inner cells
sel.firstCol++;
sel.firstColumn++;
sel.firstRow++;
sel.lastCol--;
sel.lastColumn--;
sel.lastRow--;

@@ -278,3 +277,3 @@ operations.push('allBorders');

if (perimeter.Top && sel.firstRow - 1 >= 0) {
for (var colIndex = sel.firstCol; colIndex <= sel.lastCol; colIndex++) {
for (var colIndex = sel.firstColumn; colIndex <= sel.lastColumn; colIndex++) {
var cell = tableModel.rows[sel.firstRow - 1].cells[colIndex];

@@ -286,3 +285,3 @@ applyBorderFormat(cell, borderFormat, ['borderBottom']);

if (perimeter.Bottom && sel.lastRow + 1 < tableModel.rows.length) {
for (var colIndex = sel.firstCol; colIndex <= sel.lastCol; colIndex++) {
for (var colIndex = sel.firstColumn; colIndex <= sel.lastColumn; colIndex++) {
var cell = tableModel.rows[sel.lastRow + 1].cells[colIndex];

@@ -293,5 +292,5 @@ applyBorderFormat(cell, borderFormat, ['borderTop']);

// Left of selection
if (perimeter.Left && sel.firstCol - 1 >= 0) {
if (perimeter.Left && sel.firstColumn - 1 >= 0) {
for (var rowIndex = sel.firstRow; rowIndex <= sel.lastRow; rowIndex++) {
var cell = tableModel.rows[rowIndex].cells[sel.firstCol - 1];
var cell = tableModel.rows[rowIndex].cells[sel.firstColumn - 1];
applyBorderFormat(cell, borderFormat, ['borderRight']);

@@ -301,5 +300,5 @@ }

// Right of selection
if (perimeter.Right && sel.lastCol + 1 < tableModel.rows[0].cells.length) {
if (perimeter.Right && sel.lastColumn + 1 < tableModel.rows[0].cells.length) {
for (var rowIndex = sel.firstRow; rowIndex <= sel.lastRow; rowIndex++) {
var cell = tableModel.rows[rowIndex].cells[sel.lastCol + 1];
var cell = tableModel.rows[rowIndex].cells[sel.lastColumn + 1];
applyBorderFormat(cell, borderFormat, ['borderLeft']);

@@ -306,0 +305,0 @@ }

import { __read } from "tslib";
import hasSelectionInBlock from '../selection/hasSelectionInBlock';
import { alignTable } from '../../modelApi/table/alignTable';

@@ -15,3 +14,3 @@ import { deleteTable } from '../../modelApi/table/deleteTable';

import { splitTableCellVertically } from '../../modelApi/table/splitTableCellVertically';
import { applyTableFormat, getFirstSelectedTable, normalizeTable, setSelection, } from 'roosterjs-content-model-core';
import { hasSelectionInBlock, applyTableFormat, getFirstSelectedTable, normalizeTable, setSelection, } from 'roosterjs-content-model-core';
import { alignTableCellHorizontally, alignTableCellVertically, } from '../../modelApi/table/alignTableCell';

@@ -18,0 +17,0 @@ import { createSelectionMarker, hasMetadata, setParagraphNotImplicit, } from 'roosterjs-content-model-dom';

import { __read } from "tslib";
import hasSelectionInBlockGroup from '../selection/hasSelectionInBlockGroup';
import { getFirstSelectedTable, normalizeTable, setTableCellBackgroundColor, } from 'roosterjs-content-model-core';
import { hasSelectionInBlockGroup, getFirstSelectedTable, normalizeTable, setTableCellBackgroundColor, } from 'roosterjs-content-model-core';
/**

@@ -5,0 +4,0 @@ * Set table cell shade color

@@ -24,5 +24,2 @@ export { default as insertTable } from './publicApi/table/insertTable';

export { default as setListStartNumber } from './publicApi/list/setListStartNumber';
export { default as hasSelectionInBlock } from './publicApi/selection/hasSelectionInBlock';
export { default as hasSelectionInSegment } from './publicApi/selection/hasSelectionInSegment';
export { default as hasSelectionInBlockGroup } from './publicApi/selection/hasSelectionInBlockGroup';
export { default as setIndentation } from './publicApi/block/setIndentation';

@@ -29,0 +26,0 @@ export { default as setAlignment } from './publicApi/block/setAlignment';

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.insertEntity = exports.toggleCode = exports.setParagraphMargin = exports.adjustImageSelection = exports.setImageAltText = exports.adjustLinkSelection = exports.removeLink = exports.insertLink = exports.clearFormat = exports.getFormatState = exports.changeImage = exports.setImageBoxShadow = exports.setImageBorder = exports.setSpacing = exports.toggleBlockQuote = exports.setHeadingLevel = exports.setDirection = exports.setAlignment = exports.setIndentation = exports.hasSelectionInBlockGroup = exports.hasSelectionInSegment = exports.hasSelectionInBlock = exports.setListStartNumber = exports.setListStyle = exports.insertImage = exports.changeCapitalization = exports.applySegmentFormat = exports.changeFontSize = exports.setTextColor = exports.setFontSize = exports.setFontName = exports.setBackgroundColor = exports.toggleSuperscript = exports.toggleSubscript = exports.toggleStrikethrough = exports.toggleUnderline = exports.toggleItalic = exports.toggleBold = exports.toggleNumbering = exports.toggleBullet = exports.applyTableBorderFormat = exports.editTable = exports.setTableCellShade = exports.formatTable = exports.insertTable = void 0;
exports.insertEntity = exports.toggleCode = exports.setParagraphMargin = exports.adjustImageSelection = exports.setImageAltText = exports.adjustLinkSelection = exports.removeLink = exports.insertLink = exports.clearFormat = exports.getFormatState = exports.changeImage = exports.setImageBoxShadow = exports.setImageBorder = exports.setSpacing = exports.toggleBlockQuote = exports.setHeadingLevel = exports.setDirection = exports.setAlignment = exports.setIndentation = exports.setListStartNumber = exports.setListStyle = exports.insertImage = exports.changeCapitalization = exports.applySegmentFormat = exports.changeFontSize = exports.setTextColor = exports.setFontSize = exports.setFontName = exports.setBackgroundColor = exports.toggleSuperscript = exports.toggleSubscript = exports.toggleStrikethrough = exports.toggleUnderline = exports.toggleItalic = exports.toggleBold = exports.toggleNumbering = exports.toggleBullet = exports.applyTableBorderFormat = exports.editTable = exports.setTableCellShade = exports.formatTable = exports.insertTable = void 0;
var insertTable_1 = require("./publicApi/table/insertTable");

@@ -50,8 +50,2 @@ Object.defineProperty(exports, "insertTable", { enumerable: true, get: function () { return insertTable_1.default; } });

Object.defineProperty(exports, "setListStartNumber", { enumerable: true, get: function () { return setListStartNumber_1.default; } });
var hasSelectionInBlock_1 = require("./publicApi/selection/hasSelectionInBlock");
Object.defineProperty(exports, "hasSelectionInBlock", { enumerable: true, get: function () { return hasSelectionInBlock_1.default; } });
var hasSelectionInSegment_1 = require("./publicApi/selection/hasSelectionInSegment");
Object.defineProperty(exports, "hasSelectionInSegment", { enumerable: true, get: function () { return hasSelectionInSegment_1.default; } });
var hasSelectionInBlockGroup_1 = require("./publicApi/selection/hasSelectionInBlockGroup");
Object.defineProperty(exports, "hasSelectionInBlockGroup", { enumerable: true, get: function () { return hasSelectionInBlockGroup_1.default; } });
var setIndentation_1 = require("./publicApi/block/setIndentation");

@@ -58,0 +52,0 @@ Object.defineProperty(exports, "setIndentation", { enumerable: true, get: function () { return setIndentation_1.default; } });

@@ -33,2 +33,16 @@ "use strict";

}
if (alreadyInExpectedType) {
//if the list item has margins or textAlign, we need to apply them to the block to preserve the indention and alignment
block.blocks.forEach(function (x) {
if (block.format.marginLeft) {
x.format.marginLeft = block.format.marginLeft;
}
if (block.format.marginRight) {
x.format.marginRight = block.format.marginRight;
}
if (block.format.textAlign) {
x.format.textAlign = block.format.textAlign;
}
});
}
}

@@ -68,2 +82,13 @@ else {

newListItem.blocks.push(block);
if (block.format.marginRight) {
newListItem.format.marginRight = block.format.marginRight;
block.format.marginRight = undefined;
}
if (block.format.marginLeft) {
newListItem.format.marginLeft = block.format.marginLeft;
block.format.marginLeft = undefined;
}
if (block.format.textAlign) {
newListItem.format.textAlign = block.format.textAlign;
}
parent.blocks.splice(index, 1, newListItem);

@@ -70,0 +95,0 @@ existingListItems.push(newListItem);

@@ -1,3 +0,2 @@

import type { ContentModelTableRow } from 'roosterjs-content-model-types';
import type { TableSelectionCoordinates } from '../table/getSelectedCells';
import type { ContentModelTableRow, TableSelectionCoordinates } from 'roosterjs-content-model-types';
/**

@@ -4,0 +3,0 @@ * @internal

@@ -10,4 +10,4 @@ "use strict";

var _a;
var firstCol = selection.firstCol, firstRow = selection.firstRow;
var cell = (_a = rows[firstRow]) === null || _a === void 0 ? void 0 : _a.cells[firstCol];
var firstColumn = selection.firstColumn, firstRow = selection.firstRow;
var cell = (_a = rows[firstRow]) === null || _a === void 0 ? void 0 : _a.cells[firstColumn];
if (cell) {

@@ -14,0 +14,0 @@ (0, roosterjs_content_model_dom_1.addSegment)(cell, (0, roosterjs_content_model_dom_1.createSelectionMarker)());

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.alignTableCellVertically = exports.alignTableCellHorizontally = void 0;
var getSelectedCells_1 = require("./getSelectedCells");
var roosterjs_content_model_core_1 = require("roosterjs-content-model-core");

@@ -41,6 +40,6 @@ var TextAlignValueMap = {

var _a;
var sel = (0, getSelectedCells_1.getSelectedCells)(table);
var sel = (0, roosterjs_content_model_core_1.getSelectedCells)(table);
if (sel) {
for (var rowIndex = sel.firstRow; rowIndex <= sel.lastRow; rowIndex++) {
for (var colIndex = sel.firstCol; colIndex <= sel.lastCol; colIndex++) {
for (var colIndex = sel.firstColumn; colIndex <= sel.lastColumn; colIndex++) {
var cell = (_a = table.rows[rowIndex]) === null || _a === void 0 ? void 0 : _a.cells[colIndex];

@@ -47,0 +46,0 @@ var format = cell === null || cell === void 0 ? void 0 : cell.format;

@@ -5,3 +5,3 @@ "use strict";

var collapseTableSelection_1 = require("../selection/collapseTableSelection");
var getSelectedCells_1 = require("./getSelectedCells");
var roosterjs_content_model_core_1 = require("roosterjs-content-model-core");
/**

@@ -11,13 +11,13 @@ * @internal

function deleteTableColumn(table) {
var sel = (0, getSelectedCells_1.getSelectedCells)(table);
var sel = (0, roosterjs_content_model_core_1.getSelectedCells)(table);
if (sel) {
for (var rowIndex = 0; rowIndex < table.rows.length; rowIndex++) {
var cellInNextCol = table.rows[rowIndex].cells[sel.lastCol + 1];
var cellInNextCol = table.rows[rowIndex].cells[sel.lastColumn + 1];
if (cellInNextCol) {
cellInNextCol.spanLeft =
cellInNextCol.spanLeft && table.rows[rowIndex].cells[sel.firstCol].spanLeft;
cellInNextCol.spanLeft && table.rows[rowIndex].cells[sel.firstColumn].spanLeft;
}
table.rows[rowIndex].cells.splice(sel.firstCol, sel.lastCol - sel.firstCol + 1);
table.rows[rowIndex].cells.splice(sel.firstColumn, sel.lastColumn - sel.firstColumn + 1);
}
table.widths.splice(sel.firstCol, sel.lastCol - sel.firstCol + 1);
table.widths.splice(sel.firstColumn, sel.lastColumn - sel.firstColumn + 1);
(0, collapseTableSelection_1.collapseTableSelection)(table.rows, sel);

@@ -24,0 +24,0 @@ }

@@ -5,3 +5,3 @@ "use strict";

var collapseTableSelection_1 = require("../selection/collapseTableSelection");
var getSelectedCells_1 = require("./getSelectedCells");
var roosterjs_content_model_core_1 = require("roosterjs-content-model-core");
/**

@@ -11,3 +11,3 @@ * @internal

function deleteTableRow(table) {
var sel = (0, getSelectedCells_1.getSelectedCells)(table);
var sel = (0, roosterjs_content_model_core_1.getSelectedCells)(table);
if (sel) {

@@ -14,0 +14,0 @@ table.rows[sel.firstRow].cells.forEach(function (cell, colIndex) {

@@ -5,3 +5,3 @@ "use strict";

var roosterjs_content_model_dom_1 = require("roosterjs-content-model-dom");
var getSelectedCells_1 = require("./getSelectedCells");
var roosterjs_content_model_core_1 = require("roosterjs-content-model-core");
/**

@@ -11,11 +11,11 @@ * @internal

function insertTableColumn(table, operation) {
var sel = (0, getSelectedCells_1.getSelectedCells)(table);
var sel = (0, roosterjs_content_model_core_1.getSelectedCells)(table);
var insertLeft = operation == 'insertLeft';
if (sel) {
for (var i = sel === null || sel === void 0 ? void 0 : sel.firstCol; i <= sel.lastCol; i++) {
for (var i = sel === null || sel === void 0 ? void 0 : sel.firstColumn; i <= sel.lastColumn; i++) {
table.rows.forEach(function (row) {
var cell = row.cells[insertLeft ? sel.firstCol : sel.lastCol];
row.cells.splice(insertLeft ? sel.firstCol : sel.lastCol + 1, 0, (0, roosterjs_content_model_dom_1.createTableCell)(cell.spanLeft, cell.spanAbove, cell.isHeader, cell.format));
var cell = row.cells[insertLeft ? sel.firstColumn : sel.lastColumn];
row.cells.splice(insertLeft ? sel.firstColumn : sel.lastColumn + 1, 0, (0, roosterjs_content_model_dom_1.createTableCell)(cell.spanLeft, cell.spanAbove, cell.isHeader, cell.format, cell.dataset));
});
table.widths.splice(insertLeft ? sel.firstCol : sel.lastCol + 1, 0, table.widths[insertLeft ? sel.firstCol : sel.lastCol]);
table.widths.splice(insertLeft ? sel.firstColumn : sel.lastColumn + 1, 0, table.widths[insertLeft ? sel.firstColumn : sel.lastColumn]);
}

@@ -22,0 +22,0 @@ }

@@ -6,3 +6,3 @@ "use strict";

var roosterjs_content_model_dom_1 = require("roosterjs-content-model-dom");
var getSelectedCells_1 = require("./getSelectedCells");
var roosterjs_content_model_core_1 = require("roosterjs-content-model-core");
/**

@@ -12,3 +12,3 @@ * @internal

function insertTableRow(table, operation) {
var sel = (0, getSelectedCells_1.getSelectedCells)(table);
var sel = (0, roosterjs_content_model_core_1.getSelectedCells)(table);
var insertAbove = operation == 'insertAbove';

@@ -21,3 +21,3 @@ if (sel) {

cells: sourceRow.cells.map(function (cell) {
return (0, roosterjs_content_model_dom_1.createTableCell)(cell.spanLeft, cell.spanAbove, cell.isHeader, cell.format);
return (0, roosterjs_content_model_dom_1.createTableCell)(cell.spanLeft, cell.spanAbove, cell.isHeader, cell.format, cell.dataset);
}),

@@ -24,0 +24,0 @@ height: sourceRow.height,

@@ -5,3 +5,3 @@ "use strict";

var canMergeCells_1 = require("./canMergeCells");
var getSelectedCells_1 = require("./getSelectedCells");
var roosterjs_content_model_core_1 = require("roosterjs-content-model-core");
/**

@@ -11,9 +11,10 @@ * @internal

function mergeTableCells(table) {
var sel = (0, getSelectedCells_1.getSelectedCells)(table);
if (sel && (0, canMergeCells_1.canMergeCells)(table.rows, sel.firstRow, sel.firstCol, sel.lastRow, sel.lastCol)) {
var sel = (0, roosterjs_content_model_core_1.getSelectedCells)(table);
if (sel &&
(0, canMergeCells_1.canMergeCells)(table.rows, sel.firstRow, sel.firstColumn, sel.lastRow, sel.lastColumn)) {
for (var rowIndex = sel.firstRow; rowIndex <= sel.lastRow; rowIndex++) {
for (var colIndex = sel.firstCol; colIndex <= sel.lastCol; colIndex++) {
for (var colIndex = sel.firstColumn; colIndex <= sel.lastColumn; colIndex++) {
var cell = table.rows[rowIndex].cells[colIndex];
if (cell) {
cell.spanLeft = colIndex > sel.firstCol;
cell.spanLeft = colIndex > sel.firstColumn;
cell.spanAbove = rowIndex > sel.firstRow;

@@ -20,0 +21,0 @@ delete cell.cachedElement;

@@ -5,3 +5,3 @@ "use strict";

var canMergeCells_1 = require("./canMergeCells");
var getSelectedCells_1 = require("./getSelectedCells");
var roosterjs_content_model_core_1 = require("roosterjs-content-model-core");
/**

@@ -12,6 +12,6 @@ * @internal

var _a, _b, _c, _d;
var sel = (0, getSelectedCells_1.getSelectedCells)(table);
var sel = (0, roosterjs_content_model_core_1.getSelectedCells)(table);
var mergeLeft = operation == 'mergeLeft';
if (sel) {
var mergingColIndex = mergeLeft ? sel.firstCol : sel.lastCol + 1;
var mergingColIndex = mergeLeft ? sel.firstColumn : sel.lastColumn + 1;
if (mergingColIndex > 0 && mergingColIndex < table.rows[0].cells.length) {

@@ -18,0 +18,0 @@ for (var rowIndex = sel.firstRow; rowIndex <= sel.lastRow; rowIndex++) {

@@ -5,3 +5,3 @@ "use strict";

var canMergeCells_1 = require("./canMergeCells");
var getSelectedCells_1 = require("./getSelectedCells");
var roosterjs_content_model_core_1 = require("roosterjs-content-model-core");
/**

@@ -12,3 +12,3 @@ * @internal

var _a, _b, _c;
var sel = (0, getSelectedCells_1.getSelectedCells)(table);
var sel = (0, roosterjs_content_model_core_1.getSelectedCells)(table);
var mergeAbove = operation == 'mergeAbove';

@@ -18,3 +18,3 @@ if (sel) {

if (mergingRowIndex > 0 && mergingRowIndex < table.rows.length) {
for (var colIndex = sel.firstCol; colIndex <= sel.lastCol; colIndex++) {
for (var colIndex = sel.firstColumn; colIndex <= sel.lastColumn; colIndex++) {
var cell = table.rows[mergingRowIndex].cells[colIndex];

@@ -21,0 +21,0 @@ if (cell &&

@@ -6,3 +6,3 @@ "use strict";

var roosterjs_content_model_dom_1 = require("roosterjs-content-model-dom");
var getSelectedCells_1 = require("./getSelectedCells");
var roosterjs_content_model_core_1 = require("roosterjs-content-model-core");
var MIN_WIDTH = 30;

@@ -13,3 +13,3 @@ /**

function splitTableCellHorizontally(table) {
var sel = (0, getSelectedCells_1.getSelectedCells)(table);
var sel = (0, roosterjs_content_model_core_1.getSelectedCells)(table);
if (sel) {

@@ -51,3 +51,3 @@ var _loop_1 = function (colIndex) {

};
for (var colIndex = sel.lastCol; colIndex >= sel.firstCol; colIndex--) {
for (var colIndex = sel.lastColumn; colIndex >= sel.firstColumn; colIndex--) {
_loop_1(colIndex);

@@ -54,0 +54,0 @@ }

@@ -6,3 +6,3 @@ "use strict";

var roosterjs_content_model_dom_1 = require("roosterjs-content-model-dom");
var getSelectedCells_1 = require("./getSelectedCells");
var roosterjs_content_model_core_1 = require("roosterjs-content-model-core");
var MIN_HEIGHT = 22;

@@ -13,3 +13,3 @@ /**

function splitTableCellVertically(table) {
var sel = (0, getSelectedCells_1.getSelectedCells)(table);
var sel = (0, roosterjs_content_model_core_1.getSelectedCells)(table);
if (sel) {

@@ -24,6 +24,8 @@ for (var rowIndex = sel.lastRow; rowIndex >= sel.firstRow; rowIndex--) {

if (belowRow === null || belowRow === void 0 ? void 0 : belowRow.cells.every(function (belowCell, colIndex) {
return colIndex < sel.firstCol || colIndex > sel.lastCol || belowCell.spanAbove;
return colIndex < sel.firstColumn ||
colIndex > sel.lastColumn ||
belowCell.spanAbove;
})) {
belowRow.cells.forEach(function (belowCell, colIndex) {
if (colIndex >= sel.firstCol && colIndex <= sel.lastCol) {
if (colIndex >= sel.firstColumn && colIndex <= sel.lastColumn) {
belowCell.spanAbove = false;

@@ -43,3 +45,3 @@ delete belowCell.cachedElement;

newCell.dataset = (0, tslib_1.__assign)({}, cell.dataset);
if (colIndex < sel.firstCol || colIndex > sel.lastCol) {
if (colIndex < sel.firstColumn || colIndex > sel.lastColumn) {
newCell.spanAbove = true;

@@ -46,0 +48,0 @@ }

@@ -19,3 +19,9 @@ "use strict";

});
var result = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, editor.getUndoState()), { isDarkMode: editor.isDarkMode(), zoomScale: editor.getZoomScale() });
var manager = editor.getSnapshotsManager();
var result = {
canUndo: manager.hasNewContent || manager.canMove(-1),
canRedo: manager.canMove(1),
isDarkMode: editor.isDarkMode(),
zoomScale: editor.getZoomScale(),
};
(0, retrieveModelFormatState_1.retrieveModelFormatState)(model, pendingFormat, result);

@@ -22,0 +28,0 @@ return result;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var formatImageWithContentModel_1 = require("../utils/formatImageWithContentModel");
var readFile_1 = require("../../modelApi/domUtils/readFile");
var roosterjs_content_model_core_1 = require("roosterjs-content-model-core");

@@ -14,3 +13,3 @@ /**

var selection = editor.getDOMSelection();
(0, readFile_1.readFile)(file, function (dataUrl) {
(0, roosterjs_content_model_core_1.readFile)(file, function (dataUrl) {
if (dataUrl && !editor.isDisposed() && (selection === null || selection === void 0 ? void 0 : selection.type) === 'image') {

@@ -17,0 +16,0 @@ (0, formatImageWithContentModel_1.default)(editor, 'changeImage', function (image) {

@@ -5,3 +5,2 @@ "use strict";

var roosterjs_content_model_core_1 = require("roosterjs-content-model-core");
var readFile_1 = require("../../modelApi/domUtils/readFile");
/**

@@ -18,3 +17,3 @@ * Insert an image into current selected position

else {
(0, readFile_1.readFile)(imageFileOrSrc, function (dataUrl) {
(0, roosterjs_content_model_core_1.readFile)(imageFileOrSrc, function (dataUrl) {
if (dataUrl && !editor.isDisposed()) {

@@ -21,0 +20,0 @@ insertImageWithSrc(editor, dataUrl);

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var getSelectedCells_1 = require("../../modelApi/table/getSelectedCells");
var roosterjs_content_model_dom_1 = require("roosterjs-content-model-dom");

@@ -17,3 +16,3 @@ var roosterjs_content_model_core_1 = require("roosterjs-content-model-core");

if (tableModel) {
var sel = (0, getSelectedCells_1.getSelectedCells)(tableModel);
var sel = (0, roosterjs_content_model_core_1.getSelectedCells)(tableModel);
var perimeter = {

@@ -74,3 +73,3 @@ Top: false,

for (var rowIndex = sel.firstRow; rowIndex <= sel.lastRow; rowIndex++) {
for (var colIndex = sel.firstCol; colIndex <= sel.lastCol; colIndex++) {
for (var colIndex = sel.firstColumn; colIndex <= sel.lastColumn; colIndex++) {
var cell = tableModel.rows[rowIndex].cells[colIndex];

@@ -90,3 +89,3 @@ // Format cells - All borders

for (var rowIndex = sel.firstRow; rowIndex <= sel.lastRow; rowIndex++) {
var cell = tableModel.rows[rowIndex].cells[sel.firstCol];
var cell = tableModel.rows[rowIndex].cells[sel.firstColumn];
// Format cells - Left border

@@ -101,3 +100,3 @@ applyBorderFormat(cell, borderFormat, leftBorder);

for (var rowIndex = sel.firstRow; rowIndex <= sel.lastRow; rowIndex++) {
var cell = tableModel.rows[rowIndex].cells[sel.lastCol];
var cell = tableModel.rows[rowIndex].cells[sel.lastColumn];
// Format cells - Right border

@@ -111,3 +110,3 @@ applyBorderFormat(cell, borderFormat, rightBorder);

var topBorder = ['borderTop'];
for (var colIndex = sel.firstCol; colIndex <= sel.lastCol; colIndex++) {
for (var colIndex = sel.firstColumn; colIndex <= sel.lastColumn; colIndex++) {
var cell = tableModel.rows[sel.firstRow].cells[colIndex];

@@ -122,3 +121,3 @@ // Format cells - Top border

var bottomBorder = ['borderBottom'];
for (var colIndex = sel.firstCol; colIndex <= sel.lastCol; colIndex++) {
for (var colIndex = sel.firstColumn; colIndex <= sel.lastColumn; colIndex++) {
var cell = tableModel.rows[sel.lastRow].cells[colIndex];

@@ -133,3 +132,3 @@ // Format cells - Bottom border

// Format cells - Inside borders
var singleCol = sel.lastCol == sel.firstCol;
var singleCol = sel.lastColumn == sel.firstColumn;
var singleRow = sel.lastRow == sel.firstRow;

@@ -142,5 +141,5 @@ // Single cell selection

if (singleCol) {
applyBorderFormat(tableModel.rows[sel.firstRow].cells[sel.firstCol], borderFormat, ['borderBottom']);
applyBorderFormat(tableModel.rows[sel.firstRow].cells[sel.firstColumn], borderFormat, ['borderBottom']);
for (var rowIndex = sel.firstRow + 1; rowIndex <= sel.lastRow - 1; rowIndex++) {
var cell = tableModel.rows[rowIndex].cells[sel.firstCol];
var cell = tableModel.rows[rowIndex].cells[sel.firstColumn];
applyBorderFormat(cell, borderFormat, [

@@ -151,3 +150,3 @@ 'borderTop',

}
applyBorderFormat(tableModel.rows[sel.lastRow].cells[sel.firstCol], borderFormat, ['borderTop']);
applyBorderFormat(tableModel.rows[sel.lastRow].cells[sel.firstColumn], borderFormat, ['borderTop']);
break;

@@ -157,4 +156,4 @@ }

if (singleRow) {
applyBorderFormat(tableModel.rows[sel.firstRow].cells[sel.firstCol], borderFormat, ['borderRight']);
for (var colIndex = sel.firstCol + 1; colIndex <= sel.lastCol - 1; colIndex++) {
applyBorderFormat(tableModel.rows[sel.firstRow].cells[sel.firstColumn], borderFormat, ['borderRight']);
for (var colIndex = sel.firstColumn + 1; colIndex <= sel.lastColumn - 1; colIndex++) {
var cell = tableModel.rows[sel.firstRow].cells[colIndex];

@@ -166,3 +165,3 @@ applyBorderFormat(cell, borderFormat, [

}
applyBorderFormat(tableModel.rows[sel.firstRow].cells[sel.lastCol], borderFormat, ['borderLeft']);
applyBorderFormat(tableModel.rows[sel.firstRow].cells[sel.lastColumn], borderFormat, ['borderLeft']);
break;

@@ -172,11 +171,11 @@ }

// Top left cell
applyBorderFormat(tableModel.rows[sel.firstRow].cells[sel.firstCol], borderFormat, ['borderBottom', 'borderRight']);
applyBorderFormat(tableModel.rows[sel.firstRow].cells[sel.firstColumn], borderFormat, ['borderBottom', 'borderRight']);
// Top right cell
applyBorderFormat(tableModel.rows[sel.firstRow].cells[sel.lastCol], borderFormat, ['borderBottom', 'borderLeft']);
applyBorderFormat(tableModel.rows[sel.firstRow].cells[sel.lastColumn], borderFormat, ['borderBottom', 'borderLeft']);
// Bottom left cell
applyBorderFormat(tableModel.rows[sel.lastRow].cells[sel.firstCol], borderFormat, ['borderTop', 'borderRight']);
applyBorderFormat(tableModel.rows[sel.lastRow].cells[sel.firstColumn], borderFormat, ['borderTop', 'borderRight']);
// Bottom right cell
applyBorderFormat(tableModel.rows[sel.lastRow].cells[sel.lastCol], borderFormat, ['borderTop', 'borderLeft']);
applyBorderFormat(tableModel.rows[sel.lastRow].cells[sel.lastColumn], borderFormat, ['borderTop', 'borderLeft']);
// First row
for (var colIndex = sel.firstCol + 1; colIndex < sel.lastCol; colIndex++) {
for (var colIndex = sel.firstColumn + 1; colIndex < sel.lastColumn; colIndex++) {
var cell = tableModel.rows[sel.firstRow].cells[colIndex];

@@ -190,3 +189,3 @@ applyBorderFormat(cell, borderFormat, [

// Last row
for (var colIndex = sel.firstCol + 1; colIndex < sel.lastCol; colIndex++) {
for (var colIndex = sel.firstColumn + 1; colIndex < sel.lastColumn; colIndex++) {
var cell = tableModel.rows[sel.lastRow].cells[colIndex];

@@ -201,3 +200,3 @@ applyBorderFormat(cell, borderFormat, [

for (var rowIndex = sel.firstRow + 1; rowIndex < sel.lastRow; rowIndex++) {
var cell = tableModel.rows[rowIndex].cells[sel.firstCol];
var cell = tableModel.rows[rowIndex].cells[sel.firstColumn];
applyBorderFormat(cell, borderFormat, [

@@ -211,3 +210,3 @@ 'borderTop',

for (var rowIndex = sel.firstRow + 1; rowIndex < sel.lastRow; rowIndex++) {
var cell = tableModel.rows[rowIndex].cells[sel.lastCol];
var cell = tableModel.rows[rowIndex].cells[sel.lastColumn];
applyBorderFormat(cell, borderFormat, [

@@ -220,5 +219,5 @@ 'borderTop',

// Inner cells
sel.firstCol++;
sel.firstColumn++;
sel.firstRow++;
sel.lastCol--;
sel.lastColumn--;
sel.lastRow--;

@@ -282,3 +281,3 @@ operations.push('allBorders');

if (perimeter.Top && sel.firstRow - 1 >= 0) {
for (var colIndex = sel.firstCol; colIndex <= sel.lastCol; colIndex++) {
for (var colIndex = sel.firstColumn; colIndex <= sel.lastColumn; colIndex++) {
var cell = tableModel.rows[sel.firstRow - 1].cells[colIndex];

@@ -290,3 +289,3 @@ applyBorderFormat(cell, borderFormat, ['borderBottom']);

if (perimeter.Bottom && sel.lastRow + 1 < tableModel.rows.length) {
for (var colIndex = sel.firstCol; colIndex <= sel.lastCol; colIndex++) {
for (var colIndex = sel.firstColumn; colIndex <= sel.lastColumn; colIndex++) {
var cell = tableModel.rows[sel.lastRow + 1].cells[colIndex];

@@ -297,5 +296,5 @@ applyBorderFormat(cell, borderFormat, ['borderTop']);

// Left of selection
if (perimeter.Left && sel.firstCol - 1 >= 0) {
if (perimeter.Left && sel.firstColumn - 1 >= 0) {
for (var rowIndex = sel.firstRow; rowIndex <= sel.lastRow; rowIndex++) {
var cell = tableModel.rows[rowIndex].cells[sel.firstCol - 1];
var cell = tableModel.rows[rowIndex].cells[sel.firstColumn - 1];
applyBorderFormat(cell, borderFormat, ['borderRight']);

@@ -305,5 +304,5 @@ }

// Right of selection
if (perimeter.Right && sel.lastCol + 1 < tableModel.rows[0].cells.length) {
if (perimeter.Right && sel.lastColumn + 1 < tableModel.rows[0].cells.length) {
for (var rowIndex = sel.firstRow; rowIndex <= sel.lastRow; rowIndex++) {
var cell = tableModel.rows[rowIndex].cells[sel.lastCol + 1];
var cell = tableModel.rows[rowIndex].cells[sel.lastColumn + 1];
applyBorderFormat(cell, borderFormat, ['borderLeft']);

@@ -310,0 +309,0 @@ }

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var hasSelectionInBlock_1 = require("../selection/hasSelectionInBlock");
var alignTable_1 = require("../../modelApi/table/alignTable");

@@ -81,3 +80,3 @@ var deleteTable_1 = require("../../modelApi/table/deleteTable");

}
if (!(0, hasSelectionInBlock_1.default)(tableModel)) {
if (!(0, roosterjs_content_model_core_1.hasSelectionInBlock)(tableModel)) {
var paragraph = (0, ensureFocusableParagraphForTable_1.ensureFocusableParagraphForTable)(model, path, tableModel);

@@ -84,0 +83,0 @@ if (paragraph) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var hasSelectionInBlockGroup_1 = require("../selection/hasSelectionInBlockGroup");
var roosterjs_content_model_core_1 = require("roosterjs-content-model-core");

@@ -19,3 +18,3 @@ /**

return row.cells.forEach(function (cell) {
if ((0, hasSelectionInBlockGroup_1.default)(cell)) {
if ((0, roosterjs_content_model_core_1.hasSelectionInBlockGroup)(cell)) {
(0, roosterjs_content_model_core_1.setTableCellBackgroundColor)(cell, color, true /*isColorOverride*/);

@@ -22,0 +21,0 @@ }

@@ -8,7 +8,7 @@ {

"roosterjs-editor-dom": "^8.59.0",
"roosterjs-content-model-core": "^0.21.2",
"roosterjs-content-model-dom": "^0.21.2",
"roosterjs-content-model-types": "^0.21.2"
"roosterjs-content-model-core": "^0.22.0",
"roosterjs-content-model-dom": "^0.22.0",
"roosterjs-content-model-types": "^0.22.0"
},
"version": "0.21.2",
"version": "0.22.0",
"main": "./lib/index.js",

@@ -15,0 +15,0 @@ "typings": "./lib/index.d.ts",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc