@remirror/react-utils
Advanced tools
Comparing version 1.0.0-next.39 to 1.0.0-next.40
# @remirror/react-utils | ||
## 1.0.0-next.40 | ||
> 2020-09-24 | ||
### Patch Changes | ||
- Updated dependencies [[`4b1d99a6`](https://github.com/remirror/remirror/commit/4b1d99a60c9cf7c652b69967179be39ae5db3ff4)]: | ||
- @remirror/core-types@1.0.0-next.40 | ||
- @remirror/core-helpers@1.0.0-next.40 | ||
## 1.0.0-next.39 | ||
@@ -4,0 +14,0 @@ |
@@ -100,6 +100,6 @@ 'use strict'; | ||
var propIsFunction = value => { | ||
coreHelpers.invariant(coreHelpers.isFunction(value), { | ||
!coreHelpers.isFunction(value) ? process.env.NODE_ENV !== "production" ? coreHelpers.invariant(false, { | ||
code: coreConstants.ErrorConstant.INTERNAL, | ||
message: 'The child argument to the Remirror component must be a function.' | ||
}); | ||
}) : coreHelpers.invariant(false) : void 0; | ||
return true; | ||
@@ -106,0 +106,0 @@ }; |
import _objectSpread from '@babel/runtime/helpers/esm/objectSpread2'; | ||
import React, { isValidElement as isValidElement$1, Fragment, Children } from 'react'; | ||
import { ErrorConstant } from '@remirror/core-constants'; | ||
import { isObject, isString, bool, invariant, isFunction } from '@remirror/core-helpers'; | ||
import { isObject, isString, bool, isFunction, invariant } from '@remirror/core-helpers'; | ||
@@ -95,6 +95,6 @@ /** | ||
var propIsFunction = value => { | ||
invariant(isFunction(value), { | ||
!isFunction(value) ? process.env.NODE_ENV !== "production" ? invariant(false, { | ||
code: ErrorConstant.INTERNAL, | ||
message: 'The child argument to the Remirror component must be a function.' | ||
}); | ||
}) : invariant(false) : void 0; | ||
return true; | ||
@@ -101,0 +101,0 @@ }; |
@@ -100,6 +100,6 @@ 'use strict'; | ||
var propIsFunction = value => { | ||
coreHelpers.invariant(coreHelpers.isFunction(value), { | ||
!coreHelpers.isFunction(value) ? process.env.NODE_ENV !== "production" ? coreHelpers.invariant(false, { | ||
code: coreConstants.ErrorConstant.INTERNAL, | ||
message: 'The child argument to the Remirror component must be a function.' | ||
}); | ||
}) : coreHelpers.invariant(false) : void 0; | ||
return true; | ||
@@ -106,0 +106,0 @@ }; |
@@ -7,4 +7,8 @@ "use strict"; | ||
var _objectSpread = require("@babel/runtime/helpers/objectSpread2"), React = require("react"), coreConstants = require("@remirror/core-constants"), coreHelpers = require("@remirror/core-helpers"); | ||
var _objectSpread = require("@babel/runtime/helpers/objectSpread2"), React = require("react"); | ||
require("@remirror/core-constants"); | ||
var coreHelpers = require("@remirror/core-helpers"); | ||
function _interopDefault(e) { | ||
@@ -39,6 +43,4 @@ return e && e.__esModule ? e : { | ||
var asDefaultProps = () => props => props, isRemirrorElement = value => coreHelpers.bool(coreHelpers.isObject(value) && isValidElement(value) && value.type.$$remirrorType), isRemirrorElementOfType = type => value => isRemirrorElement(value) && value.type.$$remirrorType === type, isRemirrorProvider = isRemirrorElementOfType(exports.RemirrorType.Provider), propIsFunction = value => (coreHelpers.invariant(coreHelpers.isFunction(value), { | ||
code: coreConstants.ErrorConstant.INTERNAL, | ||
message: "The child argument to the Remirror component must be a function." | ||
}), !0), oneChildOnly = value => { | ||
var asDefaultProps = () => props => props, isRemirrorElement = value => coreHelpers.bool(coreHelpers.isObject(value) && isValidElement(value) && value.type.$$remirrorType), isRemirrorElementOfType = type => value => isRemirrorElement(value) && value.type.$$remirrorType === type, isRemirrorProvider = isRemirrorElementOfType(exports.RemirrorType.Provider), propIsFunction = value => (coreHelpers.isFunction(value) || coreHelpers.invariant(!1), | ||
!0), oneChildOnly = value => { | ||
if (!value) throw new Error("This component requires ONE child component - Nothing was provided"); | ||
@@ -45,0 +47,0 @@ if (!isValidElement(value)) throw new Error("This component requires ONE child component - An invalid element was provided"); |
import _objectSpread from '@babel/runtime/helpers/esm/objectSpread2'; | ||
import React, { isValidElement as isValidElement$1, Fragment, Children } from 'react'; | ||
import { ErrorConstant } from '@remirror/core-constants'; | ||
import { isObject, isString, bool, invariant, isFunction } from '@remirror/core-helpers'; | ||
import { isObject, isString, bool, isFunction, invariant } from '@remirror/core-helpers'; | ||
@@ -95,6 +95,6 @@ /** | ||
var propIsFunction = value => { | ||
invariant(isFunction(value), { | ||
!isFunction(value) ? process.env.NODE_ENV !== "production" ? invariant(false, { | ||
code: ErrorConstant.INTERNAL, | ||
message: 'The child argument to the Remirror component must be a function.' | ||
}); | ||
}) : invariant(false) : void 0; | ||
return true; | ||
@@ -101,0 +101,0 @@ }; |
{ | ||
"name": "@remirror/react-utils", | ||
"version": "1.0.0-next.39", | ||
"version": "1.0.0-next.40", | ||
"description": "A small set of utilities for react components in remirror.", | ||
@@ -31,7 +31,7 @@ "keywords": [ | ||
"@remirror/core-constants": "1.0.0-next.35", | ||
"@remirror/core-helpers": "1.0.0-next.39", | ||
"@remirror/core-types": "1.0.0-next.39" | ||
"@remirror/core-helpers": "1.0.0-next.40", | ||
"@remirror/core-types": "1.0.0-next.40" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "^16.9.47", | ||
"@types/react": "^16.9.49", | ||
"react": "^16.13.1" | ||
@@ -38,0 +38,0 @@ }, |
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
36317
6
+ Added@remirror/core-helpers@1.0.0-next.40(transitive)
+ Added@remirror/core-types@1.0.0-next.40(transitive)
+ Added@remirror/pm@1.0.0-next.40(transitive)
- Removed@remirror/core-helpers@1.0.0-next.39(transitive)
- Removed@remirror/core-types@1.0.0-next.39(transitive)
- Removed@remirror/pm@1.0.0-next.39(transitive)