@remirror/extension-tables
Advanced tools
Comparing version 0.0.0-pr877.5 to 0.0.0-pr877.6
@@ -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": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
123917
2809
+ Added@remirror/core@0.0.0-pr877.6(transitive)
+ Added@remirror/core-constants@0.0.0-pr877.6(transitive)
+ Added@remirror/core-helpers@0.0.0-pr877.6(transitive)
+ Added@remirror/core-types@0.0.0-pr877.6(transitive)
+ Added@remirror/core-utils@0.0.0-pr877.6(transitive)
+ Added@remirror/i18n@0.0.0-pr877.6(transitive)
+ Added@remirror/icons@0.0.0-pr877.6(transitive)
+ Added@remirror/messages@0.0.0-pr877.6(transitive)
+ Added@remirror/pm@0.0.0-pr877.6(transitive)
+ Added@remirror/theme@0.0.0-pr877.6(transitive)
+ Added@remirror/types@0.0.0-pr877.6(transitive)
+ Addedprosemirror-paste-rules@0.0.0-pr877.6(transitive)
+ Addedprosemirror-suggest@0.0.0-pr877.6(transitive)
+ Addedprosemirror-trailing-node@0.0.0-pr877.6(transitive)
- Removed@remirror/core@0.0.0-pr877.5(transitive)
- Removed@remirror/core-constants@0.0.0-pr877.5(transitive)
- Removed@remirror/core-helpers@0.0.0-pr877.5(transitive)
- Removed@remirror/core-types@0.0.0-pr877.5(transitive)
- Removed@remirror/core-utils@0.0.0-pr877.5(transitive)
- Removed@remirror/i18n@0.0.0-pr877.5(transitive)
- Removed@remirror/icons@0.0.0-pr877.5(transitive)
- Removed@remirror/messages@0.0.0-pr877.5(transitive)
- Removed@remirror/pm@0.0.0-pr877.5(transitive)
- Removed@remirror/theme@0.0.0-pr877.5(transitive)
- Removed@remirror/types@0.0.0-pr877.5(transitive)
- Removedprosemirror-paste-rules@0.0.0-pr877.5(transitive)
- Removedprosemirror-suggest@0.0.0-pr877.5(transitive)
- Removedprosemirror-trailing-node@0.0.0-pr877.5(transitive)
Updated@babel/runtime@^7.13.10
Updated@remirror/core@0.0.0-pr877.6