Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@remirror/extension-tables

Package Overview
Dependencies
Maintainers
1
Versions
247
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@remirror/extension-tables - npm Package Compare versions

Comparing version 0.0.0-pr877.5 to 0.0.0-pr877.6

4

dist/declarations/src/table-extensions.d.ts

@@ -102,4 +102,4 @@ import { ApplySchemaAttributes, CommandFunction, Helper, NodeExtension, NodeSpecOverride, NonChainableCommandFunction, OnSetOptionsProps, ProsemirrorPlugin, StateUpdateLifecycleProps } from '@remirror/core';

/**
* Update the table cell background by passing a color string to remove the
* background by passing a `null`.
* Update the background of one cell or multiple cells by passing a color
* string. You can also remove the color by passing a `null`.
*/

@@ -106,0 +106,0 @@ setTableCellBackground(background: string | null): CommandFunction;

@@ -482,4 +482,4 @@ 'use strict';

/**
* Update the table cell background by passing a color string to remove the
* background by passing a `null`.
* Update the background of one cell or multiple cells by passing a color
* string. You can also remove the color by passing a `null`.
*/

@@ -490,25 +490,24 @@

return props => {
var tr = props.tr,
dispatch = props.dispatch;
var selection = tr.selection;
var pos = 0;
var cell = null;
var tr = props.tr;
var dispatch = props.dispatch;
var _tr = tr,
selection = _tr.selection;
if (selection instanceof tables.CellSelection && selection.$anchorCell.pos) {
pos = selection.$anchorCell.pos;
cell = selection.$anchorCell.node();
} else {
var found = core.findParentNodeOfType({
selection,
types: 'tableCell'
if (selection instanceof tables.CellSelection) {
selection.forEachCell((cellNode, pos) => {
tr = tr.setNodeMarkup(pos, undefined, _objectSpread(_objectSpread({}, cellNode.attrs), {}, {
background
}));
});
if (found) {
pos = found.pos;
cell = found.node;
}
dispatch === null || dispatch === void 0 ? void 0 : dispatch(tr);
return true;
}
if (cell) {
dispatch === null || dispatch === void 0 ? void 0 : dispatch(tr.setNodeMarkup(pos, undefined, _objectSpread(_objectSpread({}, cell.attrs), {}, {
var found = core.findParentNodeOfType({
selection,
types: 'tableCell'
});
if (found) {
dispatch === null || dispatch === void 0 ? void 0 : dispatch(tr.setNodeMarkup(found.pos, undefined, _objectSpread(_objectSpread({}, found.node.attrs), {}, {
background

@@ -515,0 +514,0 @@ })));

@@ -478,4 +478,4 @@ import _objectSpread from '@babel/runtime/helpers/esm/objectSpread2';

/**
* Update the table cell background by passing a color string to remove the
* background by passing a `null`.
* Update the background of one cell or multiple cells by passing a color
* string. You can also remove the color by passing a `null`.
*/

@@ -486,25 +486,24 @@

return props => {
var tr = props.tr,
dispatch = props.dispatch;
var selection = tr.selection;
var pos = 0;
var cell = null;
var tr = props.tr;
var dispatch = props.dispatch;
var _tr = tr,
selection = _tr.selection;
if (selection instanceof CellSelection && selection.$anchorCell.pos) {
pos = selection.$anchorCell.pos;
cell = selection.$anchorCell.node();
} else {
var found = findParentNodeOfType({
selection,
types: 'tableCell'
if (selection instanceof CellSelection) {
selection.forEachCell((cellNode, pos) => {
tr = tr.setNodeMarkup(pos, undefined, _objectSpread(_objectSpread({}, cellNode.attrs), {}, {
background
}));
});
if (found) {
pos = found.pos;
cell = found.node;
}
dispatch === null || dispatch === void 0 ? void 0 : dispatch(tr);
return true;
}
if (cell) {
dispatch === null || dispatch === void 0 ? void 0 : dispatch(tr.setNodeMarkup(pos, undefined, _objectSpread(_objectSpread({}, cell.attrs), {}, {
var found = findParentNodeOfType({
selection,
types: 'tableCell'
});
if (found) {
dispatch === null || dispatch === void 0 ? void 0 : dispatch(tr.setNodeMarkup(found.pos, undefined, _objectSpread(_objectSpread({}, found.node.attrs), {}, {
background

@@ -511,0 +510,0 @@ })));

@@ -482,4 +482,4 @@ 'use strict';

/**
* Update the table cell background by passing a color string to remove the
* background by passing a `null`.
* Update the background of one cell or multiple cells by passing a color
* string. You can also remove the color by passing a `null`.
*/

@@ -490,25 +490,24 @@

return props => {
var tr = props.tr,
dispatch = props.dispatch;
var selection = tr.selection;
var pos = 0;
var cell = null;
var tr = props.tr;
var dispatch = props.dispatch;
var _tr = tr,
selection = _tr.selection;
if (selection instanceof tables.CellSelection && selection.$anchorCell.pos) {
pos = selection.$anchorCell.pos;
cell = selection.$anchorCell.node();
} else {
var found = core.findParentNodeOfType({
selection,
types: 'tableCell'
if (selection instanceof tables.CellSelection) {
selection.forEachCell((cellNode, pos) => {
tr = tr.setNodeMarkup(pos, undefined, _objectSpread(_objectSpread({}, cellNode.attrs), {}, {
background
}));
});
if (found) {
pos = found.pos;
cell = found.node;
}
dispatch === null || dispatch === void 0 ? void 0 : dispatch(tr);
return true;
}
if (cell) {
dispatch === null || dispatch === void 0 ? void 0 : dispatch(tr.setNodeMarkup(pos, undefined, _objectSpread(_objectSpread({}, cell.attrs), {}, {
var found = core.findParentNodeOfType({
selection,
types: 'tableCell'
});
if (found) {
dispatch === null || dispatch === void 0 ? void 0 : dispatch(tr.setNodeMarkup(found.pos, undefined, _objectSpread(_objectSpread({}, found.node.attrs), {}, {
background

@@ -515,0 +514,0 @@ })));

@@ -479,4 +479,4 @@ 'use strict';

/**
* Update the table cell background by passing a color string to remove the
* background by passing a `null`.
* Update the background of one cell or multiple cells by passing a color
* string. You can also remove the color by passing a `null`.
*/

@@ -487,25 +487,24 @@

return props => {
var tr = props.tr,
dispatch = props.dispatch;
var selection = tr.selection;
var pos = 0;
var cell = null;
var tr = props.tr;
var dispatch = props.dispatch;
var _tr = tr,
selection = _tr.selection;
if (selection instanceof tables.CellSelection && selection.$anchorCell.pos) {
pos = selection.$anchorCell.pos;
cell = selection.$anchorCell.node();
} else {
var found = core.findParentNodeOfType({
selection,
types: 'tableCell'
if (selection instanceof tables.CellSelection) {
selection.forEachCell((cellNode, pos) => {
tr = tr.setNodeMarkup(pos, undefined, _objectSpread(_objectSpread({}, cellNode.attrs), {}, {
background
}));
});
if (found) {
pos = found.pos;
cell = found.node;
}
dispatch === null || dispatch === void 0 ? void 0 : dispatch(tr);
return true;
}
if (cell) {
dispatch === null || dispatch === void 0 ? void 0 : dispatch(tr.setNodeMarkup(pos, undefined, _objectSpread(_objectSpread({}, cell.attrs), {}, {
var found = core.findParentNodeOfType({
selection,
types: 'tableCell'
});
if (found) {
dispatch === null || dispatch === void 0 ? void 0 : dispatch(tr.setNodeMarkup(found.pos, undefined, _objectSpread(_objectSpread({}, found.node.attrs), {}, {
background

@@ -512,0 +511,0 @@ })));

@@ -478,4 +478,4 @@ import _objectSpread from '@babel/runtime/helpers/esm/objectSpread2';

/**
* Update the table cell background by passing a color string to remove the
* background by passing a `null`.
* Update the background of one cell or multiple cells by passing a color
* string. You can also remove the color by passing a `null`.
*/

@@ -486,25 +486,24 @@

return props => {
var tr = props.tr,
dispatch = props.dispatch;
var selection = tr.selection;
var pos = 0;
var cell = null;
var tr = props.tr;
var dispatch = props.dispatch;
var _tr = tr,
selection = _tr.selection;
if (selection instanceof CellSelection && selection.$anchorCell.pos) {
pos = selection.$anchorCell.pos;
cell = selection.$anchorCell.node();
} else {
var found = findParentNodeOfType({
selection,
types: 'tableCell'
if (selection instanceof CellSelection) {
selection.forEachCell((cellNode, pos) => {
tr = tr.setNodeMarkup(pos, undefined, _objectSpread(_objectSpread({}, cellNode.attrs), {}, {
background
}));
});
if (found) {
pos = found.pos;
cell = found.node;
}
dispatch === null || dispatch === void 0 ? void 0 : dispatch(tr);
return true;
}
if (cell) {
dispatch === null || dispatch === void 0 ? void 0 : dispatch(tr.setNodeMarkup(pos, undefined, _objectSpread(_objectSpread({}, cell.attrs), {}, {
var found = findParentNodeOfType({
selection,
types: 'tableCell'
});
if (found) {
dispatch === null || dispatch === void 0 ? void 0 : dispatch(tr.setNodeMarkup(found.pos, undefined, _objectSpread(_objectSpread({}, found.node.attrs), {}, {
background

@@ -511,0 +510,0 @@ })));

{
"name": "@remirror/extension-tables",
"version": "0.0.0-pr877.5",
"version": "0.0.0-pr877.6",
"description": "A table a day keeps the doctor away. Remirror and play keeps the bad times at bay.",

@@ -43,13 +43,13 @@ "keywords": [

"dependencies": {
"@babel/runtime": "^7.13.7",
"@babel/runtime": "^7.13.10",
"@linaria/core": "^3.0.0-beta.1",
"@remirror/core": "0.0.0-pr877.5",
"@remirror/messages": "0.0.0-pr877.5",
"@remirror/theme": "0.0.0-pr877.5"
"@remirror/core": "0.0.0-pr877.6",
"@remirror/messages": "0.0.0-pr877.6",
"@remirror/theme": "0.0.0-pr877.6"
},
"devDependencies": {
"@remirror/pm": "0.0.0-pr877.5"
"@remirror/pm": "0.0.0-pr877.6"
},
"peerDependencies": {
"@remirror/pm": "0.0.0-pr877.5"
"@remirror/pm": "0.0.0-pr877.6"
},

@@ -56,0 +56,0 @@ "publishConfig": {

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc