@remirror/core-utils
Advanced tools
Comparing version 1.0.0-next.8 to 1.0.0-next.12
# @remirror/core-utils | ||
## 1.0.0-next.12 | ||
> 2020-07-28 | ||
### Minor Changes | ||
- 19b3595f: `isNodeActive` now matches partial attribute objects. Fixes #385. | ||
### Patch Changes | ||
- Updated dependencies [d8aa2432] | ||
- @remirror/core-helpers@1.0.0-next.12 | ||
## 1.0.0-next.8 | ||
@@ -4,0 +17,0 @@ |
@@ -11,3 +11,3 @@ "use strict"; | ||
var coreHelpers = require("@remirror/core-helpers"), commands = require("@remirror/pm/commands"), schemaList = require("@remirror/pm/schema-list"), state = require("@remirror/pm/state"), minDocument = _interopDefault(require("min-document")), coreConstants = require("@remirror/core-constants"), model = require("@remirror/pm/model"), _defineProperty = _interopDefault(require("@babel/runtime/helpers/defineProperty")), _objectWithoutProperties = _interopDefault(require("@babel/runtime/helpers/objectWithoutProperties")), _slicedToArray = _interopDefault(require("@babel/runtime/helpers/slicedToArray")), inputrules = require("@remirror/pm/inputrules"), environment = { | ||
var coreHelpers = require("@remirror/core-helpers"), commands = require("@remirror/pm/commands"), schemaList = require("@remirror/pm/schema-list"), state = require("@remirror/pm/state"), minDocument = _interopDefault(require("min-document")), coreConstants = require("@remirror/core-constants"), model = require("@remirror/pm/model"), _objectWithoutProperties = _interopDefault(require("@babel/runtime/helpers/objectWithoutProperties")), _slicedToArray = _interopDefault(require("@babel/runtime/helpers/slicedToArray")), _defineProperty = _interopDefault(require("@babel/runtime/helpers/defineProperty")), inputrules = require("@remirror/pm/inputrules"), environment = { | ||
get isBrowser() { | ||
@@ -671,3 +671,3 @@ return coreHelpers.bool("undefined" != typeof window && void 0 !== window.document && window.navigator && window.navigator.userAgent); | ||
function isNodeActive(parameter) { | ||
var _findSelectedNodeOfTy, state = parameter.state, type = parameter.type, attrs = parameter.attrs, selection = state.selection, parent = null !== (_findSelectedNodeOfTy = findSelectedNodeOfType({ | ||
var _findSelectedNodeOfTy, state = parameter.state, type = parameter.type, _parameter$attrs = parameter.attrs, attrs = void 0 === _parameter$attrs ? {} : _parameter$attrs, selection = state.selection, parent = null !== (_findSelectedNodeOfTy = findSelectedNodeOfType({ | ||
selection: selection, | ||
@@ -679,3 +679,3 @@ types: type | ||
}); | ||
return attrs && !coreHelpers.isEmptyObject(attrs) && parent ? parent.node.hasMarkup(type, attrs) : coreHelpers.bool(parent); | ||
return attrs && !coreHelpers.isEmptyObject(attrs) && parent ? parent.node.hasMarkup(type, _objectSpread(_objectSpread({}, parent.node.attrs), attrs)) : coreHelpers.bool(parent); | ||
} | ||
@@ -682,0 +682,0 @@ |
@@ -230,3 +230,3 @@ import { AttributesParameter, Brand, CommandFunction, EditorSchema, EditorState, EditorStateParameter, EditorView, EmptyShape, Fragment, KeyBindingCommandFunction, KeyBindings, MarkTypesParameter, NodeTypeParameter, NodeTypesParameter, OptionalMarkParameter, OptionalProsemirrorNodeParameter, PosParameter, PredicateParameter, ProsemirrorCommandFunction, ProsemirrorKeyBindings, ProsemirrorNode, ProsemirrorNodeParameter, ResolvedPos, Selection, SelectionParameter, Shape, Transaction, TransactionParameter } from '@remirror/core-types'; | ||
* Checks whether the node type passed in is active within the region. Used by | ||
* extensions to implement the `#active` method. | ||
* extensions to implement the `active` method. | ||
* | ||
@@ -233,0 +233,0 @@ * To ignore `attrs` just leave the attrs object empty or undefined. |
{ | ||
"name": "@remirror/core-utils", | ||
"version": "1.0.0-next.8", | ||
"version": "1.0.0-next.12", | ||
"description": "Core utilities for dealing with the dom and prosemirror within remirror", | ||
@@ -21,3 +21,3 @@ "homepage": "https://github.com/remirror/remirror/tree/HEAD/packages/@remirror/core-utils", | ||
"@remirror/core-constants": "^1.0.0-next.6", | ||
"@remirror/core-helpers": "^1.0.0-next.6", | ||
"@remirror/core-helpers": "^1.0.0-next.12", | ||
"@remirror/core-types": "^1.0.0-next.6", | ||
@@ -24,0 +24,0 @@ "@types/min-document": "^2.19.0", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
237496
6654