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

@remirror/core-utils

Package Overview
Dependencies
Maintainers
1
Versions
287
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@remirror/core-utils - npm Package Compare versions

Comparing version 1.0.0-next.43 to 1.0.0-next.44

11

CHANGELOG.md
# @remirror/core-utils
## 1.0.0-next.44
> 2020-09-30
### Patch Changes
- Updated dependencies [[`bcf3b2c4`](https://github.com/remirror/remirror/commit/bcf3b2c4c0eabc90e1690593d4a9dfb2a9d39c68)]:
- @remirror/pm@1.0.0-next.44
- @remirror/core-types@1.0.0-next.44
- @remirror/core-helpers@1.0.0-next.44
## 1.0.0-next.43

@@ -4,0 +15,0 @@

56

dist/core-utils.cjs.prod.js

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

var _trState$selection = trState.selection, from = _trState$selection.from, to = _trState$selection.to, marks = [];
trState.doc.nodesBetween(from, to, node => {
trState.doc.nodesBetween(from, to, (node => {
marks.push(...node.marks);
});
var mark = marks.find(markItem => markItem.type.name === type.name);
}));
var mark = marks.find((markItem => markItem.type.name === type.name));
return !!mark && mark.attrs;

@@ -135,3 +135,3 @@ }

if (start.node) {
var mark = start.node.marks.find(_ref => _ref.type === type);
var mark = start.node.marks.find((_ref => _ref.type === type));
if (mark) {

@@ -153,3 +153,3 @@ for (var startIndex = $pos.index(), startPos = $pos.start() + start.offset; startIndex > 0 && mark.isInSet($pos.parent.child(startIndex - 1).marks); ) startIndex -= 1,

function isValidStep(step, StepTypes) {
return 0 === StepTypes.length || StepTypes.some(Constructor => step instanceof Constructor);
return 0 === StepTypes.length || StepTypes.some((Constructor => step instanceof Constructor));
}

@@ -162,3 +162,3 @@

var step = _step.value;
isValidStep(step, StepTypes) && step.getMap().forEach((_, __, from, to) => {
isValidStep(step, StepTypes) && step.getMap().forEach(((_, __, from, to) => {
rawRanges.push({

@@ -168,3 +168,3 @@ from: from,

});
});
}));
}

@@ -176,3 +176,3 @@ } catch (err) {

}
var _step2, sortedRanges = coreHelpers.sort(rawRanges, (a, z) => a.from - z.from), _iterator2 = _createForOfIteratorHelper__default.default(sortedRanges);
var _step2, sortedRanges = coreHelpers.sort(rawRanges, ((a, z) => a.from - z.from)), _iterator2 = _createForOfIteratorHelper__default.default(sortedRanges);
try {

@@ -502,3 +502,3 @@ for (_iterator2.s(); !(_step2 = _iterator2.n()).done; ) {

function diff(primary, other) {
return primary.filter((item, index) => item !== other[index]);
return primary.filter(((item, index) => item !== other[index]));
}

@@ -748,7 +748,7 @@

function mergeKeyBindings(extensionKeymaps) {
return mergeKeyBindingCreator(extensionKeymaps, command => command);
return mergeKeyBindingCreator(extensionKeymaps, (command => command));
}
function mergeProsemirrorKeyBindings(extensionKeymaps) {
return mergeKeyBindingCreator(extensionKeymaps, command => (state, dispatch, view) => command({
return mergeKeyBindingCreator(extensionKeymaps, (command => (state, dispatch, view) => command({
state: state,

@@ -759,3 +759,3 @@ dispatch: dispatch,

next: () => !1
}));
})));
}

@@ -796,3 +796,3 @@

var tr = _ref5.tr, dispatch = _ref5.dispatch, _tr$selection3 = tr.selection, from = _tr$selection3.from, to = _tr$selection3.to, applicable = !1;
return tr.doc.nodesBetween(from, to, (node, pos) => {
return tr.doc.nodesBetween(from, to, ((node, pos) => {
if (applicable) return !1;

@@ -803,3 +803,3 @@ if (node.isTextblock && !node.hasMarkup(type, attrs)) if (node.type !== type) {

} else applicable = !0;
}), !!applicable && (dispatch && dispatch(tr.setBlockType(from, to, type, attrs).scrollIntoView()),
})), !!applicable && (dispatch && dispatch(tr.setBlockType(from, to, type, attrs).scrollIntoView()),
!0);

@@ -918,3 +918,3 @@ };

var result = [];
return node.descendants((child, pos) => {
return node.descendants(((child, pos) => {
var nodeWithPosition = {

@@ -926,3 +926,3 @@ node: child,

descend) : descend;
}), result;
})), result;
}

@@ -996,3 +996,3 @@

var range = _step2.value, start = range.start, end = range.end;
tr.doc.nodesBetween(start, end, (node, pos) => {
tr.doc.nodesBetween(start, end, ((node, pos) => {
var _predicate;

@@ -1003,3 +1003,3 @@ return (null === (_predicate = null == predicate ? void 0 : predicate(node, pos, range)) || void 0 === _predicate || _predicate) && nodes.push({

}), descend;
});
}));
};

@@ -1018,6 +1018,6 @@ for (_iterator2.s(); !(_step2 = _iterator2.n()).done; ) _loop();

var nodes = [];
return fragment.forEach(child => {
return fragment.forEach((child => {
if (child.isText) {
var _child$text, text = null !== (_child$text = child.text) && void 0 !== _child$text ? _child$text : "", pos = 0;
coreHelpers.findMatches(text, regexp).forEach(match => {
coreHelpers.findMatches(text, regexp).forEach((match => {
if (match[1]) {

@@ -1028,5 +1028,5 @@ var start = match.index, end = start + match[0].length, attributes = coreHelpers.isFunction(getAttributes) ? getAttributes(match) : getAttributes;

}
}), text && pos < text.length && nodes.push(child.cut(pos));
})), text && pos < text.length && nodes.push(child.cut(pos));
} else nodes.push(child.copy(handler(child.content)));
}), model.Fragment.fromArray(nodes);
})), model.Fragment.fromArray(nodes);
};

@@ -1042,3 +1042,3 @@ return new state.Plugin({

function markInputRule(parameter) {
var regexp = parameter.regexp, type = parameter.type, getAttributes = parameter.getAttributes, _parameter$ignoreWhit = parameter.ignoreWhitespace, ignoreWhitespace = void 0 !== _parameter$ignoreWhit && _parameter$ignoreWhit, beforeDispatch = parameter.beforeDispatch, updateCaptured = parameter.updateCaptured, rule = new inputrules.InputRule(regexp, (state, match, start, end) => {
var regexp = parameter.regexp, type = parameter.type, getAttributes = parameter.getAttributes, _parameter$ignoreWhit = parameter.ignoreWhitespace, ignoreWhitespace = void 0 !== _parameter$ignoreWhit && _parameter$ignoreWhit, beforeDispatch = parameter.beforeDispatch, updateCaptured = parameter.updateCaptured, rule = new inputrules.InputRule(regexp, ((state, match, start, end) => {
var _updateCaptured, _details$captureGroup, _details$fullMatch, _details$start, _details$end, _rule$shouldSkip, tr = state.tr, attributes = coreHelpers.isFunction(getAttributes) ? getAttributes(match) : getAttributes, $from = state.doc.resolve(start), $to = state.doc.resolve(end);

@@ -1079,3 +1079,3 @@ if (rule.invalidMarks && suggest.markActiveInRange({

}), tr;
});
}));
return rule;

@@ -1085,3 +1085,3 @@ }

function nodeInputRule(parameter) {
var regexp = parameter.regexp, type = parameter.type, getAttributes = parameter.getAttributes, beforeDispatch = parameter.beforeDispatch, rule = new inputrules.InputRule(regexp, (state, match, start, end) => {
var regexp = parameter.regexp, type = parameter.type, getAttributes = parameter.getAttributes, beforeDispatch = parameter.beforeDispatch, rule = new inputrules.InputRule(regexp, ((state, match, start, end) => {
var _rule$shouldSkip2, attributes = coreHelpers.isFunction(getAttributes) ? getAttributes(match) : getAttributes, tr = state.tr, captureGroup = match[1], fullMatch = match[0];

@@ -1101,3 +1101,3 @@ return (null === (_rule$shouldSkip2 = rule.shouldSkip) || void 0 === _rule$shouldSkip2 ? void 0 : _rule$shouldSkip2.call(rule, {

}), tr);
});
}));
return rule;

@@ -1107,3 +1107,3 @@ }

function plainInputRule(parameter) {
var regexp = parameter.regexp, transformMatch = parameter.transformMatch, beforeDispatch = parameter.beforeDispatch, rule = new inputrules.InputRule(regexp, (state, match, start, end) => {
var regexp = parameter.regexp, transformMatch = parameter.transformMatch, beforeDispatch = parameter.beforeDispatch, rule = new inputrules.InputRule(regexp, ((state, match, start, end) => {
var _rule$shouldSkip3, value = transformMatch(match);

@@ -1126,3 +1126,3 @@ if (coreHelpers.isNullOrUndefined(value)) return null;

}), tr);
});
}));
return rule;

@@ -1129,0 +1129,0 @@ }

{
"name": "@remirror/core-utils",
"version": "1.0.0-next.43",
"version": "1.0.0-next.44",
"description": "Core utilities for dealing with the dom and prosemirror within remirror",

@@ -25,4 +25,4 @@ "homepage": "https://github.com/remirror/remirror/tree/HEAD/packages/@remirror/core-utils",

"@remirror/core-constants": "1.0.0-next.35",
"@remirror/core-helpers": "1.0.0-next.40",
"@remirror/core-types": "1.0.0-next.40",
"@remirror/core-helpers": "1.0.0-next.44",
"@remirror/core-types": "1.0.0-next.44",
"@types/min-document": "^2.19.0",

@@ -33,3 +33,3 @@ "min-document": "^2.19.0",

"devDependencies": {
"@remirror/pm": "1.0.0-next.40",
"@remirror/pm": "1.0.0-next.44",
"@types/node": "^14.11.2",

@@ -39,3 +39,3 @@ "domino": "^2.1.6"

"peerDependencies": {
"@remirror/pm": "1.0.0-next.40",
"@remirror/pm": "1.0.0-next.44",
"@types/node": "*"

@@ -42,0 +42,0 @@ },

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