@remirror/react-utils
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -25,2 +25,3 @@ 'use strict'; | ||
RemirrorElementType["ManagerProvider"] = "manager-provider"; | ||
RemirrorElementType["ContextProvider"] = "context-provider"; | ||
})(exports.RemirrorElementType || (exports.RemirrorElementType = {})); | ||
@@ -31,9 +32,18 @@ | ||
* | ||
* @param element | ||
* @param value - the value to check | ||
*/ | ||
var isReactDOMElement = function isReactDOMElement(element) { | ||
return react.isValidElement(element) && core$1.isString(element.type); | ||
var isReactDOMElement = function isReactDOMElement(value) { | ||
return core$1.isObject(value) && react.isValidElement(value) && core$1.isString(value.type); | ||
}; | ||
/** | ||
* Checks whether the element is a react fragment | ||
* | ||
* @param value - the value to check | ||
*/ | ||
var isReactFragment = function isReactFragment(value) { | ||
return core$1.isObject(value) && react.isValidElement(value) && value.type === react.Fragment; | ||
}; | ||
/** | ||
* Retrieve the element props for JSX Element | ||
@@ -73,36 +83,2 @@ * | ||
/** | ||
* Searches the react tree for a child node with the requested key and updates | ||
* it using the updater function once found | ||
* | ||
* @param children | ||
* @param key | ||
* @param updateFunction | ||
*/ | ||
var updateChildWithKey = function updateChildWithKey(children, key, updateFunction) { | ||
var keyFound = false; | ||
return react.Children.map(children, function (child) { | ||
if (keyFound) { | ||
return child; | ||
} | ||
if (!react.isValidElement(child)) { | ||
return child; | ||
} | ||
if (child.key === key) { | ||
keyFound = true; | ||
return updateFunction(child); | ||
} | ||
var subChildren = child.props && core$1.Cast(child.props).children; | ||
if (subChildren) { | ||
return updateChildWithKey(subChildren, key, updateFunction); | ||
} | ||
return child; | ||
}); | ||
}; | ||
/** | ||
* Checks if this element has a type of any RemirrorComponent | ||
@@ -123,2 +99,13 @@ * | ||
/** | ||
* Checks to see if this is the wrapper we've created around the RemirrorContent.Provider component. | ||
* | ||
* This is used to help determine how the Remirror component will be rendered. `getRootProps` is the main reason | ||
* for this, and I'm not even sure the effort is worth it. | ||
* | ||
* @param value - the value to check | ||
*/ | ||
var isRemirrorContextProvider = isRemirrorElementOfType(exports.RemirrorElementType.ContextProvider); | ||
/** | ||
* Checks if this is a RemirrorExtension type. These are used to configure the extensions that determine | ||
@@ -130,6 +117,5 @@ * the underlying behaviour of the editor. | ||
var isRemirrorExtension = isRemirrorElementOfType(exports.RemirrorElementType.Extension); | ||
/** | ||
* Finds if this is a RemirrorEditor (which provides the RemirrorInjectedProps into the context); | ||
* Finds if this is a RemirrorProvider (which provides the RemirrorInjectedProps into the context); | ||
* | ||
@@ -139,6 +125,6 @@ * @param value - the value to check | ||
var isRemirrorEditorProvider = isRemirrorElementOfType(exports.RemirrorElementType.EditorProvider); | ||
var isRemirrorProvider = isRemirrorElementOfType(exports.RemirrorElementType.EditorProvider); | ||
/** | ||
* Checks if this is a ManagedRemirrorEditor which pulls in the manager from the context and places it's children | ||
* inside the RemirrorEditor | ||
* Checks if this is a ManagedRemirrorProvider which pulls in the manager from the context and places it's children | ||
* inside the RemirrorProvider | ||
* | ||
@@ -148,6 +134,6 @@ * @param value - the value to check | ||
var isManagedRemirrorEditor = isRemirrorElementOfType(exports.RemirrorElementType.ManagedEditorProvider); | ||
var isManagedRemirrorProvider = isRemirrorElementOfType(exports.RemirrorElementType.ManagedEditorProvider); | ||
/** | ||
* Clones an element while also enabling the css prop on jsx elements at the same time. | ||
* This is used for emotion which needs to inject the css property which React.cloneElement doesn't do. | ||
* This is used for emotion which needs to inject the css property which React.cloneElement doesn't support. | ||
* | ||
@@ -169,16 +155,27 @@ * @param element - the element to clone | ||
key: element.key, | ||
ref: element.ref | ||
ref: element.props.ref | ||
}, element.props, props)].concat(_toConsumableArray(children))); | ||
}; | ||
/** | ||
* Will throw an error if the child provided is not a function. | ||
*/ | ||
var childIsFunction = function childIsFunction(children) { | ||
if (!core$1.isFunction(children)) { | ||
throw new Error('The child argument to the Remirror component must be a function.'); | ||
} | ||
}; | ||
exports.asDefaultProps = asDefaultProps; | ||
exports.childIsFunction = childIsFunction; | ||
exports.cloneElement = cloneElement; | ||
exports.getElementProps = getElementProps; | ||
exports.isManagedRemirrorEditor = isManagedRemirrorEditor; | ||
exports.isManagedRemirrorProvider = isManagedRemirrorProvider; | ||
exports.isReactDOMElement = isReactDOMElement; | ||
exports.isRemirrorEditorProvider = isRemirrorEditorProvider; | ||
exports.isReactFragment = isReactFragment; | ||
exports.isRemirrorContextProvider = isRemirrorContextProvider; | ||
exports.isRemirrorElement = isRemirrorElement; | ||
exports.isRemirrorExtension = isRemirrorExtension; | ||
exports.isRemirrorProvider = isRemirrorProvider; | ||
exports.uniqueClass = uniqueClass; | ||
exports.updateChildWithKey = updateChildWithKey; | ||
//# sourceMappingURL=react-utils.cjs.js.map |
import _objectSpread from '@babel/runtime/helpers/objectSpread'; | ||
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray'; | ||
import { jsx } from '@emotion/core'; | ||
import { isString, Cast, bool, isObject, uniqueArray, isArray } from '@remirror/core'; | ||
import { isValidElement, Children } from 'react'; | ||
import { isObject, isString, bool, uniqueArray, isArray, isFunction } from '@remirror/core'; | ||
import { isValidElement, Fragment } from 'react'; | ||
@@ -12,2 +12,8 @@ /** | ||
/** | ||
* A function that takes the injected remirror params and returns JSX to render. | ||
* | ||
* @param - injected remirror params | ||
*/ | ||
/** | ||
* Used to mark a remirror specific component to determine it's behaviour. | ||
@@ -25,2 +31,3 @@ */ | ||
RemirrorElementType["ManagerProvider"] = "manager-provider"; | ||
RemirrorElementType["ContextProvider"] = "context-provider"; | ||
})(RemirrorElementType || (RemirrorElementType = {})); | ||
@@ -31,9 +38,18 @@ | ||
* | ||
* @param element | ||
* @param value - the value to check | ||
*/ | ||
var isReactDOMElement = function isReactDOMElement(element) { | ||
return isValidElement(element) && isString(element.type); | ||
var isReactDOMElement = function isReactDOMElement(value) { | ||
return isObject(value) && isValidElement(value) && isString(value.type); | ||
}; | ||
/** | ||
* Checks whether the element is a react fragment | ||
* | ||
* @param value - the value to check | ||
*/ | ||
var isReactFragment = function isReactFragment(value) { | ||
return isObject(value) && isValidElement(value) && value.type === Fragment; | ||
}; | ||
/** | ||
* Retrieve the element props for JSX Element | ||
@@ -73,36 +89,2 @@ * | ||
/** | ||
* Searches the react tree for a child node with the requested key and updates | ||
* it using the updater function once found | ||
* | ||
* @param children | ||
* @param key | ||
* @param updateFunction | ||
*/ | ||
var updateChildWithKey = function updateChildWithKey(children, key, updateFunction) { | ||
var keyFound = false; | ||
return Children.map(children, function (child) { | ||
if (keyFound) { | ||
return child; | ||
} | ||
if (!isValidElement(child)) { | ||
return child; | ||
} | ||
if (child.key === key) { | ||
keyFound = true; | ||
return updateFunction(child); | ||
} | ||
var subChildren = child.props && Cast(child.props).children; | ||
if (subChildren) { | ||
return updateChildWithKey(subChildren, key, updateFunction); | ||
} | ||
return child; | ||
}); | ||
}; | ||
/** | ||
* Checks if this element has a type of any RemirrorComponent | ||
@@ -123,2 +105,13 @@ * | ||
/** | ||
* Checks to see if this is the wrapper we've created around the RemirrorContent.Provider component. | ||
* | ||
* This is used to help determine how the Remirror component will be rendered. `getRootProps` is the main reason | ||
* for this, and I'm not even sure the effort is worth it. | ||
* | ||
* @param value - the value to check | ||
*/ | ||
var isRemirrorContextProvider = isRemirrorElementOfType(RemirrorElementType.ContextProvider); | ||
/** | ||
* Checks if this is a RemirrorExtension type. These are used to configure the extensions that determine | ||
@@ -130,6 +123,5 @@ * the underlying behaviour of the editor. | ||
var isRemirrorExtension = isRemirrorElementOfType(RemirrorElementType.Extension); | ||
/** | ||
* Finds if this is a RemirrorEditor (which provides the RemirrorInjectedProps into the context); | ||
* Finds if this is a RemirrorProvider (which provides the RemirrorInjectedProps into the context); | ||
* | ||
@@ -139,6 +131,6 @@ * @param value - the value to check | ||
var isRemirrorEditorProvider = isRemirrorElementOfType(RemirrorElementType.EditorProvider); | ||
var isRemirrorProvider = isRemirrorElementOfType(RemirrorElementType.EditorProvider); | ||
/** | ||
* Checks if this is a ManagedRemirrorEditor which pulls in the manager from the context and places it's children | ||
* inside the RemirrorEditor | ||
* Checks if this is a ManagedRemirrorProvider which pulls in the manager from the context and places it's children | ||
* inside the RemirrorProvider | ||
* | ||
@@ -148,6 +140,6 @@ * @param value - the value to check | ||
var isManagedRemirrorEditor = isRemirrorElementOfType(RemirrorElementType.ManagedEditorProvider); | ||
var isManagedRemirrorProvider = isRemirrorElementOfType(RemirrorElementType.ManagedEditorProvider); | ||
/** | ||
* Clones an element while also enabling the css prop on jsx elements at the same time. | ||
* This is used for emotion which needs to inject the css property which React.cloneElement doesn't do. | ||
* This is used for emotion which needs to inject the css property which React.cloneElement doesn't support. | ||
* | ||
@@ -169,7 +161,16 @@ * @param element - the element to clone | ||
key: element.key, | ||
ref: element.ref | ||
ref: element.props.ref | ||
}, element.props, props)].concat(_toConsumableArray(children))); | ||
}; | ||
/** | ||
* Will throw an error if the child provided is not a function. | ||
*/ | ||
export { RemirrorElementType, asDefaultProps, cloneElement, getElementProps, isManagedRemirrorEditor, isReactDOMElement, isRemirrorEditorProvider, isRemirrorElement, isRemirrorExtension, uniqueClass, updateChildWithKey }; | ||
var childIsFunction = function childIsFunction(children) { | ||
if (!isFunction(children)) { | ||
throw new Error('The child argument to the Remirror component must be a function.'); | ||
} | ||
}; | ||
export { RemirrorElementType, asDefaultProps, childIsFunction, cloneElement, getElementProps, isManagedRemirrorProvider, isReactDOMElement, isReactFragment, isRemirrorContextProvider, isRemirrorElement, isRemirrorExtension, isRemirrorProvider, uniqueClass }; | ||
//# sourceMappingURL=react-utils.esm.js.map |
import { PlainObject } from '@remirror/core'; | ||
import { ReactNode } from 'react'; | ||
import { PropsWithChildren, ReactElement, ReactNode } from 'react'; | ||
import { RemirrorElement } from './types'; | ||
@@ -7,6 +7,18 @@ /** | ||
* | ||
* @param element | ||
* @param value - the value to check | ||
*/ | ||
export declare const isReactDOMElement: (element: ReactNode) => boolean; | ||
export declare const isReactDOMElement: <GProps extends {} = any>(value: unknown) => value is ReactElement<GProps, string | ((props: any) => ReactElement<any, string | any | (new (props: any) => import("react").Component<any, any, any>)> | null) | (new (props: any) => import("react").Component<any, any, any>)> & { | ||
type: string; | ||
}; | ||
/** | ||
* Checks whether the element is a react fragment | ||
* | ||
* @param value - the value to check | ||
*/ | ||
export declare const isReactFragment: <GProps extends {} = any>(value: unknown) => value is ReactElement<GProps, string | ((props: any) => ReactElement<any, string | any | (new (props: any) => import("react").Component<any, any, any>)> | null) | (new (props: any) => import("react").Component<any, any, any>)> & { | ||
type: import("react").ExoticComponent<{ | ||
children?: ReactNode; | ||
}>; | ||
}; | ||
/** | ||
* Retrieve the element props for JSX Element | ||
@@ -37,16 +49,16 @@ * | ||
/** | ||
* Searches the react tree for a child node with the requested key and updates | ||
* it using the updater function once found | ||
* Checks if this element has a type of any RemirrorComponent | ||
* | ||
* @param children | ||
* @param key | ||
* @param updateFunction | ||
* @param value - the value to check | ||
*/ | ||
export declare const updateChildWithKey: (children: ReactNode, key: string, updateFunction: (child: JSX.Element) => JSX.Element) => ReactNode[]; | ||
export declare const isRemirrorElement: <GOptions extends {} = any>(value: unknown) => value is RemirrorElement<GOptions>; | ||
/** | ||
* Checks if this element has a type of any RemirrorComponent | ||
* Checks to see if this is the wrapper we've created around the RemirrorContent.Provider component. | ||
* | ||
* This is used to help determine how the Remirror component will be rendered. `getRootProps` is the main reason | ||
* for this, and I'm not even sure the effort is worth it. | ||
* | ||
* @param value - the value to check | ||
*/ | ||
export declare const isRemirrorElement: <GOptions extends {} = any>(value: unknown) => value is RemirrorElement<GOptions>; | ||
export declare const isRemirrorContextProvider: <GOptions extends {} = any>(value: unknown) => value is RemirrorElement<GOptions>; | ||
/** | ||
@@ -60,17 +72,17 @@ * Checks if this is a RemirrorExtension type. These are used to configure the extensions that determine | ||
/** | ||
* Finds if this is a RemirrorEditor (which provides the RemirrorInjectedProps into the context); | ||
* Finds if this is a RemirrorProvider (which provides the RemirrorInjectedProps into the context); | ||
* | ||
* @param value - the value to check | ||
*/ | ||
export declare const isRemirrorEditorProvider: <GOptions extends {} = any>(value: unknown) => value is RemirrorElement<GOptions>; | ||
export declare const isRemirrorProvider: <GOptions extends {} = any>(value: unknown) => value is RemirrorElement<GOptions>; | ||
/** | ||
* Checks if this is a ManagedRemirrorEditor which pulls in the manager from the context and places it's children | ||
* inside the RemirrorEditor | ||
* Checks if this is a ManagedRemirrorProvider which pulls in the manager from the context and places it's children | ||
* inside the RemirrorProvider | ||
* | ||
* @param value - the value to check | ||
*/ | ||
export declare const isManagedRemirrorEditor: <GOptions extends {} = any>(value: unknown) => value is RemirrorElement<GOptions>; | ||
export declare const isManagedRemirrorProvider: <GOptions extends {} = any>(value: unknown) => value is RemirrorElement<GOptions>; | ||
/** | ||
* Clones an element while also enabling the css prop on jsx elements at the same time. | ||
* This is used for emotion which needs to inject the css property which React.cloneElement doesn't do. | ||
* This is used for emotion which needs to inject the css property which React.cloneElement doesn't support. | ||
* | ||
@@ -83,3 +95,9 @@ * @param element - the element to clone | ||
*/ | ||
export declare const cloneElement: (element: any, props: any, ...rest: ReactNode[]) => import("react").DetailedReactHTMLElement<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>; | ||
export declare const cloneElement: <GProps extends PropsWithChildren<{ | ||
ref?: string | ((instance: any) => void) | import("react").RefObject<any> | null | undefined; | ||
}> = any>(element: ReactElement<GProps, string | ((props: any) => ReactElement<any, string | any | (new (props: any) => import("react").Component<any, any, any>)> | null) | (new (props: any) => import("react").Component<any, any, any>)>, props: GProps, ...rest: ReactNode[]) => ReactElement<any, string | ((props: any) => ReactElement<any, string | any | (new (props: any) => import("react").Component<any, any, any>)> | null) | (new (props: any) => import("react").Component<any, any, any>)>; | ||
/** | ||
* Will throw an error if the child provided is not a function. | ||
*/ | ||
export declare const childIsFunction: (children: unknown) => void; | ||
//# sourceMappingURL=helpers.d.ts.map |
@@ -8,3 +8,3 @@ "use strict"; | ||
}); | ||
exports.cloneElement = exports.isManagedRemirrorEditor = exports.isRemirrorEditorProvider = exports.isRemirrorExtension = exports.isRemirrorElement = exports.updateChildWithKey = exports.asDefaultProps = exports.uniqueClass = exports.getElementProps = exports.isReactDOMElement = void 0; | ||
exports.childIsFunction = exports.cloneElement = exports.isManagedRemirrorProvider = exports.isRemirrorProvider = exports.isRemirrorExtension = exports.isRemirrorContextProvider = exports.isRemirrorElement = exports.asDefaultProps = exports.uniqueClass = exports.getElementProps = exports.isReactFragment = exports.isReactDOMElement = void 0; | ||
@@ -26,8 +26,20 @@ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread")); | ||
* | ||
* @param element | ||
* @param value - the value to check | ||
*/ | ||
var isReactDOMElement = function isReactDOMElement(element) { | ||
return (0, _react.isValidElement)(element) && (0, _core2.isString)(element.type); | ||
var isReactDOMElement = function isReactDOMElement(value) { | ||
return (0, _core2.isObject)(value) && (0, _react.isValidElement)(value) && (0, _core2.isString)(value.type); | ||
}; | ||
/** | ||
* Checks whether the element is a react fragment | ||
* | ||
* @param value - the value to check | ||
*/ | ||
exports.isReactDOMElement = isReactDOMElement; | ||
var isReactFragment = function isReactFragment(value) { | ||
return (0, _core2.isObject)(value) && (0, _react.isValidElement)(value) && value.type === _react.Fragment; | ||
}; | ||
/** | ||
* Retrieve the element props for JSX Element | ||
@@ -39,3 +51,3 @@ * | ||
exports.isReactDOMElement = isReactDOMElement; | ||
exports.isReactFragment = isReactFragment; | ||
@@ -77,39 +89,2 @@ var getElementProps = function getElementProps(element) { | ||
/** | ||
* Searches the react tree for a child node with the requested key and updates | ||
* it using the updater function once found | ||
* | ||
* @param children | ||
* @param key | ||
* @param updateFunction | ||
*/ | ||
exports.asDefaultProps = asDefaultProps; | ||
var updateChildWithKey = function updateChildWithKey(children, key, updateFunction) { | ||
var keyFound = false; | ||
return _react.Children.map(children, function (child) { | ||
if (keyFound) { | ||
return child; | ||
} | ||
if (!(0, _react.isValidElement)(child)) { | ||
return child; | ||
} | ||
if (child.key === key) { | ||
keyFound = true; | ||
return updateFunction(child); | ||
} | ||
var subChildren = child.props && (0, _core2.Cast)(child.props).children; | ||
if (subChildren) { | ||
return updateChildWithKey(subChildren, key, updateFunction); | ||
} | ||
return child; | ||
}); | ||
}; | ||
/** | ||
* Checks if this element has a type of any RemirrorComponent | ||
@@ -121,3 +96,3 @@ * | ||
exports.updateChildWithKey = updateChildWithKey; | ||
exports.asDefaultProps = asDefaultProps; | ||
@@ -136,2 +111,13 @@ var isRemirrorElement = function isRemirrorElement(value) { | ||
/** | ||
* Checks to see if this is the wrapper we've created around the RemirrorContent.Provider component. | ||
* | ||
* This is used to help determine how the Remirror component will be rendered. `getRootProps` is the main reason | ||
* for this, and I'm not even sure the effort is worth it. | ||
* | ||
* @param value - the value to check | ||
*/ | ||
var isRemirrorContextProvider = isRemirrorElementOfType(_types.RemirrorElementType.ContextProvider); | ||
/** | ||
* Checks if this is a RemirrorExtension type. These are used to configure the extensions that determine | ||
@@ -143,6 +129,6 @@ * the underlying behaviour of the editor. | ||
exports.isRemirrorContextProvider = isRemirrorContextProvider; | ||
var isRemirrorExtension = isRemirrorElementOfType(_types.RemirrorElementType.Extension); | ||
/** | ||
* Finds if this is a RemirrorEditor (which provides the RemirrorInjectedProps into the context); | ||
* Finds if this is a RemirrorProvider (which provides the RemirrorInjectedProps into the context); | ||
* | ||
@@ -153,6 +139,6 @@ * @param value - the value to check | ||
exports.isRemirrorExtension = isRemirrorExtension; | ||
var isRemirrorEditorProvider = isRemirrorElementOfType(_types.RemirrorElementType.EditorProvider); | ||
var isRemirrorProvider = isRemirrorElementOfType(_types.RemirrorElementType.EditorProvider); | ||
/** | ||
* Checks if this is a ManagedRemirrorEditor which pulls in the manager from the context and places it's children | ||
* inside the RemirrorEditor | ||
* Checks if this is a ManagedRemirrorProvider which pulls in the manager from the context and places it's children | ||
* inside the RemirrorProvider | ||
* | ||
@@ -162,7 +148,7 @@ * @param value - the value to check | ||
exports.isRemirrorEditorProvider = isRemirrorEditorProvider; | ||
var isManagedRemirrorEditor = isRemirrorElementOfType(_types.RemirrorElementType.ManagedEditorProvider); | ||
exports.isRemirrorProvider = isRemirrorProvider; | ||
var isManagedRemirrorProvider = isRemirrorElementOfType(_types.RemirrorElementType.ManagedEditorProvider); | ||
/** | ||
* Clones an element while also enabling the css prop on jsx elements at the same time. | ||
* This is used for emotion which needs to inject the css property which React.cloneElement doesn't do. | ||
* This is used for emotion which needs to inject the css property which React.cloneElement doesn't support. | ||
* | ||
@@ -176,3 +162,3 @@ * @param element - the element to clone | ||
exports.isManagedRemirrorEditor = isManagedRemirrorEditor; | ||
exports.isManagedRemirrorProvider = isManagedRemirrorProvider; | ||
@@ -187,7 +173,19 @@ var cloneElement = function cloneElement(element, props) { | ||
key: element.key, | ||
ref: element.ref | ||
ref: element.props.ref | ||
}, element.props, props)].concat((0, _toConsumableArray2.default)(children))); | ||
}; | ||
/** | ||
* Will throw an error if the child provided is not a function. | ||
*/ | ||
exports.cloneElement = cloneElement; | ||
var childIsFunction = function childIsFunction(children) { | ||
if (!(0, _core2.isFunction)(children)) { | ||
throw new Error('The child argument to the Remirror component must be a function.'); | ||
} | ||
}; | ||
exports.childIsFunction = childIsFunction; | ||
//# sourceMappingURL=helpers.js.map |
@@ -1,6 +0,4 @@ | ||
import { CompareStateParams, EditorSchema, EditorState, EditorStateParams, EditorViewParams, ElementParams, Extension, ExtensionConstructor, ExtensionManager, ObjectNode, PlainObject, Position, PositionParams, RemirrorActions, RemirrorContentType, StringHandlerParams, Transaction } from '@remirror/core'; | ||
import { RenderEnvironment } from '@remirror/react-ssr'; | ||
import { Interpolation, ObjectInterpolation } from 'emotion'; | ||
import { EditorView } from 'prosemirror-view'; | ||
import { ComponentClass, ComponentType, FC, ReactElement } from 'react'; | ||
import { Interpolation, ObjectInterpolation } from '@emotion/core'; | ||
import { CompareStateParams, EditorState, EditorStateParams, EditorView, EditorViewParams, ElementParams, Extension, ExtensionConstructor, ExtensionManager, ObjectNode, PlainObject, Position, PositionParams, RemirrorActions, RemirrorContentType, RenderEnvironment, StringHandlerParams, Transaction } from '@remirror/core'; | ||
import { ComponentClass, ComponentType, FC, ReactElement, ReactNode, Ref } from 'react'; | ||
export interface Positioner { | ||
@@ -42,9 +40,10 @@ /** | ||
export declare type RefKeyRootProps<GRefKey extends string = 'ref'> = { | ||
[P in Exclude<GRefKey, 'children' | 'key'>]: React.Ref<any>; | ||
[P in Exclude<GRefKey, 'key'>]: Ref<any>; | ||
} & { | ||
css: Interpolation; | ||
key: string; | ||
children: ReactNode; | ||
} & PlainObject; | ||
export declare type GetPositionerReturn<GRefKey extends string = 'ref'> = PositionerProps & { | ||
[P in GRefKey]: React.Ref<any>; | ||
[P in GRefKey]: Ref<any>; | ||
}; | ||
@@ -62,3 +61,3 @@ /** | ||
*/ | ||
view: EditorView<EditorSchema>; | ||
view: EditorView; | ||
/** | ||
@@ -69,7 +68,43 @@ * A map of actions available the | ||
/** | ||
* A unique id for the editor instance. Useful for styling with the format `.remirror-{NUM}` | ||
* The unique id for the editor instance | ||
*/ | ||
uid: string; | ||
/** | ||
* Clears all editor content | ||
* | ||
* @param triggerOnChange - whether onChange handlers should be triggered by the update | ||
*/ | ||
clearContent(triggerOnChange?: boolean): void; | ||
/** | ||
* Replace all editor content with the new content. | ||
* | ||
* @remarks | ||
* | ||
* Allows for the editor content to be overridden by force. | ||
* | ||
* @param triggerOnChange - whether onChange handlers should be triggered by the update | ||
*/ | ||
setContent(content: RemirrorContentType, triggerOnChange?: boolean): void; | ||
/** | ||
* The function returns props when called to spread on an element and make it the editor root. | ||
* | ||
* @remarks | ||
* | ||
* In order to support SSR this should only be spread on a component with NO children. | ||
* | ||
* **Example with nested components** | ||
* ```tsx | ||
* import { ManagedRemirrorProvider, RemirrorManager } from '@remirror/react'; | ||
* | ||
* const Editor = () => { | ||
* return ( | ||
* <RemirrorManager> | ||
* <ManagedRemirrorProvider> | ||
* <div {...getRootProps()} /> | ||
* </ManagedRemirrorProvider> | ||
* </RemirrorManager> | ||
* ); | ||
* } | ||
* ``` | ||
*/ | ||
getRootProps<GRefKey extends string = 'ref'>(options?: GetRootPropsConfig<GRefKey>): RefKeyRootProps<GRefKey>; | ||
@@ -88,2 +123,7 @@ /** | ||
} | ||
/** | ||
* A function that takes the injected remirror params and returns JSX to render. | ||
* | ||
* @param - injected remirror params | ||
*/ | ||
export declare type RenderPropFunction = (params: InjectedRemirrorProps) => JSX.Element; | ||
@@ -106,5 +146,6 @@ export interface RemirrorGetterParams { | ||
/** | ||
* Get the full JSON of the root node. This should be used when storing the JSON data in a database. | ||
* Get a representation of the editor content as an ObjectNode which can be used to set content for | ||
* and editor. | ||
*/ | ||
getDocJSON(): ObjectNode; | ||
getObjectNode(): ObjectNode; | ||
} | ||
@@ -115,3 +156,3 @@ export interface BaseListenerParams extends EditorViewParams, RemirrorGetterParams { | ||
} | ||
export interface RemirrorEditorStateListenerParams extends CompareStateParams, BaseListenerParams { | ||
export interface RemirrorStateListenerParams extends CompareStateParams, BaseListenerParams { | ||
/** | ||
@@ -141,2 +182,15 @@ * Allows for the creation of a new state object with the desired content | ||
/** | ||
* If this exists the editor becomes a controlled component. Nothing will be updated unless you explicitly | ||
* set the value prop to the updated state. | ||
* | ||
* Without a deep understanding of Prosemirror this is not recommended. | ||
* | ||
* @default undefined | ||
*/ | ||
onStateChange?(params: RemirrorStateListenerParams): void; | ||
/** | ||
* When onStateChange is defined this prop is used to set the next state value of the remirror editor. | ||
*/ | ||
value?: EditorState | null; | ||
/** | ||
* Adds attributes directly to the prosemirror html element. | ||
@@ -160,37 +214,28 @@ * | ||
/** | ||
* Called on every change in the Prosemirror state | ||
* Event listener called whenever the editor gains focus | ||
*/ | ||
onChange?: RemirrorEventListener; | ||
onFocus?: (params: RemirrorEventListenerParams, event: Event) => void; | ||
/** | ||
* If this exists the editor becomes a controlled component. Nothing will be updated unless you explicitly | ||
* set the value prop to the updated state. | ||
* | ||
* Without a deep understanding of Prosemirror this is not recommended. | ||
* | ||
* @default undefined | ||
* Event listener called whenever the editor is blurred | ||
*/ | ||
onStateChange?(params: RemirrorEditorStateListenerParams): void; | ||
onBlur?: (params: RemirrorEventListenerParams, event: Event) => void; | ||
/** | ||
* When onStateChange is defined this prop is used to set the next state value of the remirror editor. | ||
* Called on the first render when the prosemirror instance first becomes available | ||
*/ | ||
value?: EditorState | null; | ||
onFirstRender?: RemirrorEventListener; | ||
/** | ||
* Method called onFocus | ||
* Called on every change to the Prosemirror state | ||
*/ | ||
onFocus?: RemirrorEventListener; | ||
onChange?: RemirrorEventListener; | ||
/** | ||
* Method called onBlur | ||
* The render prop that takes the injected remirror params an returns an element to render. The editor view is automatically | ||
* attached to the DOM. | ||
*/ | ||
onBlur?: RemirrorEventListener; | ||
/** | ||
* Called on the first render when the prosemirror instance first becomes available | ||
*/ | ||
onFirstRender?: RemirrorEventListener; | ||
/** | ||
* Render function. | ||
*/ | ||
children: RenderPropFunction; | ||
/** | ||
* Hook called when the editor is dispatching an actions. Use this to attach additional actions or to update outside state | ||
* based on what's changed within the editor component. | ||
* A method called when the editor is dispatching actions. | ||
* | ||
* @remarks | ||
* Use this to attach additional actions or to update outside state based on what's changed | ||
* within the editor component. | ||
*/ | ||
@@ -303,3 +348,7 @@ dispatchTransaction?: ((tr: Transaction) => void) | null; | ||
Manager = "manager", | ||
ManagerProvider = "manager-provider" | ||
ManagerProvider = "manager-provider", | ||
/** | ||
* Used to identify the ContextProviderWrapper | ||
*/ | ||
ContextProvider = "context-provider" | ||
} | ||
@@ -306,0 +355,0 @@ export declare type RemirrorExtensionProps<GOptions extends {}, GExtension extends Extension<GOptions, any> = Extension<GOptions, any>, GConstructor = ExtensionConstructor<GOptions, GExtension>> = GOptions & BaseExtensionProps & ExtensionConstructorProps<GOptions, GExtension, GConstructor>; |
@@ -13,2 +13,8 @@ "use strict"; | ||
/** | ||
* A function that takes the injected remirror params and returns JSX to render. | ||
* | ||
* @param - injected remirror params | ||
*/ | ||
/** | ||
* Used to mark a remirror specific component to determine it's behaviour. | ||
@@ -27,3 +33,4 @@ */ | ||
RemirrorElementType["ManagerProvider"] = "manager-provider"; | ||
RemirrorElementType["ContextProvider"] = "context-provider"; | ||
})(RemirrorElementType || (exports.RemirrorElementType = RemirrorElementType = {})); | ||
//# sourceMappingURL=types.js.map |
@@ -12,3 +12,3 @@ { | ||
}, | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"main": "lib/index.js", | ||
@@ -27,3 +27,3 @@ "module": "lib/dist/react-utils.esm.js", | ||
"dev:declaration": "tsc -p ./tsconfig.prod.json --emitDeclarationOnly --declarationMap --watch", | ||
"lint": "tslint --project tsconfig.json --config ../../tslint.json", | ||
"lint": "tslint --project tsconfig.lint.json --config ../../tslint.json", | ||
"typecheck": "tsc -p ./tsconfig.json --noEmit" | ||
@@ -35,23 +35,7 @@ }, | ||
"@emotion/core": "^10.0.7", | ||
"@remirror/core": "0.1.0", | ||
"@remirror/core-extensions": "0.1.0", | ||
"@remirror/react-ssr": "0.1.0", | ||
"@remirror/renderer-react": "0.1.0", | ||
"@types/hoist-non-react-statics": "^3.3.0", | ||
"@types/prosemirror-commands": "^1.0.1", | ||
"@types/prosemirror-model": "^1.7.1", | ||
"@types/prosemirror-state": "^1.2.3", | ||
"@types/prosemirror-view": "^1.3.2", | ||
"emotion": "^10.0.7", | ||
"hoist-non-react-statics": "^3.3.0", | ||
"prosemirror-commands": "^1.0.8", | ||
"prosemirror-model": "^1.7.1", | ||
"prosemirror-state": "^1.2.3", | ||
"prosemirror-view": "^1.9.9" | ||
"@remirror/core": "0.2.0" | ||
}, | ||
"peerDependencies": { | ||
"@types/react": "^16.8.0", | ||
"@types/react-dom": "^16.8.0", | ||
"react": "^16.8.0", | ||
"react-dom": "^16.8.0" | ||
"react": "^16.8.0" | ||
}, | ||
@@ -62,10 +46,4 @@ "publishConfig": { | ||
"cjs": "lib/dist/react-utils.cjs.js", | ||
"umdGlobals": { | ||
"react": "React", | ||
"react-dom": "ReactDOM", | ||
"@remirror/core": "RemirrorCore", | ||
"@remirror/core-extensions": "RemirrorCoreExtensions", | ||
"@remirror/react-utils": "RemirrorReactUtils" | ||
}, | ||
"gitHead": "a5eee1e46e1d62944436635c2426353f461539ce" | ||
"sideEffects": false, | ||
"gitHead": "a33d4c3898b48a9c5d8d398323d1c34a44169fe7" | ||
} |
import { jsx } from '@emotion/core'; | ||
import { bool, Cast, isArray, isObject, isString, PlainObject, uniqueArray } from '@remirror/core'; | ||
import { Children, isValidElement, ReactNode } from 'react'; | ||
import { bool, isArray, isFunction, isObject, isString, PlainObject, uniqueArray } from '@remirror/core'; | ||
import { Fragment, isValidElement, LegacyRef, PropsWithChildren, ReactElement, ReactNode } from 'react'; | ||
import { RemirrorComponentType, RemirrorElement, RemirrorElementType } from './types'; | ||
@@ -9,9 +9,21 @@ | ||
* | ||
* @param element | ||
* @param value - the value to check | ||
*/ | ||
export const isReactDOMElement = (element: ReactNode) => { | ||
return isValidElement(element) && isString(element.type); | ||
export const isReactDOMElement = <GProps extends {} = any>( | ||
value: unknown, | ||
): value is ReactElement<GProps> & { type: string } => { | ||
return isObject(value) && isValidElement(value) && isString(value.type); | ||
}; | ||
/** | ||
* Checks whether the element is a react fragment | ||
* | ||
* @param value - the value to check | ||
*/ | ||
export const isReactFragment = <GProps extends {} = any>( | ||
value: unknown, | ||
): value is ReactElement<GProps> & { type: typeof Fragment } => | ||
isObject(value) && isValidElement(value) && value.type === Fragment; | ||
/** | ||
* Retrieve the element props for JSX Element | ||
@@ -47,39 +59,2 @@ * | ||
/** | ||
* Searches the react tree for a child node with the requested key and updates | ||
* it using the updater function once found | ||
* | ||
* @param children | ||
* @param key | ||
* @param updateFunction | ||
*/ | ||
export const updateChildWithKey = ( | ||
children: ReactNode, | ||
key: string, | ||
updateFunction: (child: JSX.Element) => JSX.Element, | ||
): ReactNode[] => { | ||
let keyFound = false; | ||
return Children.map(children, child => { | ||
if (keyFound) { | ||
return child; | ||
} | ||
if (!isValidElement(child)) { | ||
return child; | ||
} | ||
if (child.key === key) { | ||
keyFound = true; | ||
return updateFunction(child); | ||
} | ||
const subChildren = child.props && Cast(child.props).children; | ||
if (subChildren) { | ||
return updateChildWithKey(subChildren, key, updateFunction); | ||
} | ||
return child; | ||
}); | ||
}; | ||
/** | ||
* Checks if this element has a type of any RemirrorComponent | ||
@@ -104,2 +79,12 @@ * | ||
/** | ||
* Checks to see if this is the wrapper we've created around the RemirrorContent.Provider component. | ||
* | ||
* This is used to help determine how the Remirror component will be rendered. `getRootProps` is the main reason | ||
* for this, and I'm not even sure the effort is worth it. | ||
* | ||
* @param value - the value to check | ||
*/ | ||
export const isRemirrorContextProvider = isRemirrorElementOfType(RemirrorElementType.ContextProvider); | ||
/** | ||
* Checks if this is a RemirrorExtension type. These are used to configure the extensions that determine | ||
@@ -113,19 +98,19 @@ * the underlying behaviour of the editor. | ||
/** | ||
* Finds if this is a RemirrorEditor (which provides the RemirrorInjectedProps into the context); | ||
* Finds if this is a RemirrorProvider (which provides the RemirrorInjectedProps into the context); | ||
* | ||
* @param value - the value to check | ||
*/ | ||
export const isRemirrorEditorProvider = isRemirrorElementOfType(RemirrorElementType.EditorProvider); | ||
export const isRemirrorProvider = isRemirrorElementOfType(RemirrorElementType.EditorProvider); | ||
/** | ||
* Checks if this is a ManagedRemirrorEditor which pulls in the manager from the context and places it's children | ||
* inside the RemirrorEditor | ||
* Checks if this is a ManagedRemirrorProvider which pulls in the manager from the context and places it's children | ||
* inside the RemirrorProvider | ||
* | ||
* @param value - the value to check | ||
*/ | ||
export const isManagedRemirrorEditor = isRemirrorElementOfType(RemirrorElementType.ManagedEditorProvider); | ||
export const isManagedRemirrorProvider = isRemirrorElementOfType(RemirrorElementType.ManagedEditorProvider); | ||
/** | ||
* Clones an element while also enabling the css prop on jsx elements at the same time. | ||
* This is used for emotion which needs to inject the css property which React.cloneElement doesn't do. | ||
* This is used for emotion which needs to inject the css property which React.cloneElement doesn't support. | ||
* | ||
@@ -138,3 +123,7 @@ * @param element - the element to clone | ||
*/ | ||
export const cloneElement = (element: any, props: any, ...rest: ReactNode[]) => { | ||
export const cloneElement = <GProps extends PropsWithChildren<{ ref?: LegacyRef<any> }> = any>( | ||
element: ReactElement<GProps>, | ||
props: GProps, | ||
...rest: ReactNode[] | ||
) => { | ||
const children = uniqueArray([ | ||
@@ -149,3 +138,3 @@ ...(isArray(props.children) ? props.children : props.children ? [props.children] : []), | ||
key: element.key, | ||
ref: element.ref, | ||
ref: element.props.ref, | ||
...element.props, | ||
@@ -157,1 +146,10 @@ ...props, | ||
}; | ||
/** | ||
* Will throw an error if the child provided is not a function. | ||
*/ | ||
export const childIsFunction = (children: unknown) => { | ||
if (!isFunction(children)) { | ||
throw new Error('The child argument to the Remirror component must be a function.'); | ||
} | ||
}; |
133
src/types.ts
@@ -0,6 +1,7 @@ | ||
import { Interpolation, ObjectInterpolation } from '@emotion/core'; | ||
import { | ||
CompareStateParams, | ||
EditorSchema, | ||
EditorState, | ||
EditorStateParams, | ||
EditorView, | ||
EditorViewParams, | ||
@@ -17,9 +18,7 @@ ElementParams, | ||
RemirrorContentType, | ||
RenderEnvironment, | ||
StringHandlerParams, | ||
Transaction, | ||
} from '@remirror/core'; | ||
import { RenderEnvironment } from '@remirror/react-ssr'; | ||
import { Interpolation, ObjectInterpolation } from 'emotion'; | ||
import { EditorView } from 'prosemirror-view'; | ||
import { ComponentClass, ComponentType, FC, ReactElement } from 'react'; | ||
import { ComponentClass, ComponentType, FC, ReactElement, ReactNode, Ref } from 'react'; | ||
@@ -73,7 +72,7 @@ export interface Positioner { | ||
export type RefKeyRootProps<GRefKey extends string = 'ref'> = { | ||
[P in Exclude<GRefKey, 'children' | 'key'>]: React.Ref<any>; | ||
} & { css: Interpolation; key: string } & PlainObject; | ||
[P in Exclude<GRefKey, 'key'>]: Ref<any>; | ||
} & { css: Interpolation; key: string; children: ReactNode } & PlainObject; | ||
export type GetPositionerReturn<GRefKey extends string = 'ref'> = PositionerProps & | ||
{ [P in GRefKey]: React.Ref<any> }; | ||
{ [P in GRefKey]: Ref<any> }; | ||
@@ -91,3 +90,3 @@ /** | ||
*/ | ||
view: EditorView<EditorSchema>; | ||
view: EditorView; | ||
@@ -100,7 +99,46 @@ /** | ||
/** | ||
* A unique id for the editor instance. Useful for styling with the format `.remirror-{NUM}` | ||
* The unique id for the editor instance | ||
*/ | ||
uid: string; | ||
/** | ||
* Clears all editor content | ||
* | ||
* @param triggerOnChange - whether onChange handlers should be triggered by the update | ||
*/ | ||
clearContent(triggerOnChange?: boolean): void; | ||
/** | ||
* Replace all editor content with the new content. | ||
* | ||
* @remarks | ||
* | ||
* Allows for the editor content to be overridden by force. | ||
* | ||
* @param triggerOnChange - whether onChange handlers should be triggered by the update | ||
*/ | ||
setContent(content: RemirrorContentType, triggerOnChange?: boolean): void; | ||
/** | ||
* The function returns props when called to spread on an element and make it the editor root. | ||
* | ||
* @remarks | ||
* | ||
* In order to support SSR this should only be spread on a component with NO children. | ||
* | ||
* **Example with nested components** | ||
* ```tsx | ||
* import { ManagedRemirrorProvider, RemirrorManager } from '@remirror/react'; | ||
* | ||
* const Editor = () => { | ||
* return ( | ||
* <RemirrorManager> | ||
* <ManagedRemirrorProvider> | ||
* <div {...getRootProps()} /> | ||
* </ManagedRemirrorProvider> | ||
* </RemirrorManager> | ||
* ); | ||
* } | ||
* ``` | ||
*/ | ||
getRootProps<GRefKey extends string = 'ref'>( | ||
@@ -126,2 +164,7 @@ options?: GetRootPropsConfig<GRefKey>, | ||
/** | ||
* A function that takes the injected remirror params and returns JSX to render. | ||
* | ||
* @param - injected remirror params | ||
*/ | ||
export type RenderPropFunction = (params: InjectedRemirrorProps) => JSX.Element; | ||
@@ -148,5 +191,6 @@ | ||
/** | ||
* Get the full JSON of the root node. This should be used when storing the JSON data in a database. | ||
* Get a representation of the editor content as an ObjectNode which can be used to set content for | ||
* and editor. | ||
*/ | ||
getDocJSON(): ObjectNode; | ||
getObjectNode(): ObjectNode; | ||
} | ||
@@ -158,3 +202,3 @@ | ||
export interface RemirrorEditorStateListenerParams extends CompareStateParams, BaseListenerParams { | ||
export interface RemirrorStateListenerParams extends CompareStateParams, BaseListenerParams { | ||
/** | ||
@@ -189,2 +233,17 @@ * Allows for the creation of a new state object with the desired content | ||
/** | ||
* If this exists the editor becomes a controlled component. Nothing will be updated unless you explicitly | ||
* set the value prop to the updated state. | ||
* | ||
* Without a deep understanding of Prosemirror this is not recommended. | ||
* | ||
* @default undefined | ||
*/ | ||
onStateChange?(params: RemirrorStateListenerParams): void; | ||
/** | ||
* When onStateChange is defined this prop is used to set the next state value of the remirror editor. | ||
*/ | ||
value?: EditorState | null; | ||
/** | ||
* Adds attributes directly to the prosemirror html element. | ||
@@ -211,46 +270,34 @@ * | ||
/** | ||
* Called on every change in the Prosemirror state | ||
* Event listener called whenever the editor gains focus | ||
*/ | ||
onChange?: RemirrorEventListener; | ||
onFocus?: (params: RemirrorEventListenerParams, event: Event) => void; | ||
// Controlled Remirror Components | ||
/** | ||
* If this exists the editor becomes a controlled component. Nothing will be updated unless you explicitly | ||
* set the value prop to the updated state. | ||
* | ||
* Without a deep understanding of Prosemirror this is not recommended. | ||
* | ||
* @default undefined | ||
* Event listener called whenever the editor is blurred | ||
*/ | ||
onStateChange?(params: RemirrorEditorStateListenerParams): void; | ||
onBlur?: (params: RemirrorEventListenerParams, event: Event) => void; | ||
/** | ||
* When onStateChange is defined this prop is used to set the next state value of the remirror editor. | ||
* Called on the first render when the prosemirror instance first becomes available | ||
*/ | ||
value?: EditorState | null; | ||
onFirstRender?: RemirrorEventListener; | ||
/** | ||
* Method called onFocus | ||
* Called on every change to the Prosemirror state | ||
*/ | ||
onFocus?: RemirrorEventListener; | ||
onChange?: RemirrorEventListener; | ||
/** | ||
* Method called onBlur | ||
* The render prop that takes the injected remirror params an returns an element to render. The editor view is automatically | ||
* attached to the DOM. | ||
*/ | ||
onBlur?: RemirrorEventListener; | ||
children: RenderPropFunction; | ||
/** | ||
* Called on the first render when the prosemirror instance first becomes available | ||
* A method called when the editor is dispatching actions. | ||
* | ||
* @remarks | ||
* Use this to attach additional actions or to update outside state based on what's changed | ||
* within the editor component. | ||
*/ | ||
onFirstRender?: RemirrorEventListener; | ||
/** | ||
* Render function. | ||
*/ | ||
children: RenderPropFunction; | ||
/** | ||
* Hook called when the editor is dispatching an actions. Use this to attach additional actions or to update outside state | ||
* based on what's changed within the editor component. | ||
*/ | ||
dispatchTransaction?: ((tr: Transaction) => void) | null; | ||
@@ -378,2 +425,6 @@ | ||
ManagerProvider = 'manager-provider', | ||
/** | ||
* Used to identify the ContextProviderWrapper | ||
*/ | ||
ContextProvider = 'context-provider', | ||
} | ||
@@ -380,0 +431,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
5
2
0
143807
24
1738
1
+ Added@remirror/core@0.2.0(transitive)
- Removed@remirror/core-extensions@0.1.0
- Removed@remirror/react-ssr@0.1.0
- Removed@remirror/renderer-react@0.1.0
- Removed@types/prosemirror-commands@^1.0.1
- Removed@types/prosemirror-model@^1.7.1
- Removed@types/prosemirror-state@^1.2.3
- Removed@types/prosemirror-view@^1.3.2
- Removedemotion@^10.0.7
- Removedhoist-non-react-statics@^3.3.0
- Removedprosemirror-commands@^1.0.8
- Removedprosemirror-model@^1.7.1
- Removedprosemirror-state@^1.2.3
- Removedprosemirror-view@^1.9.9
- Removed@remirror/core@0.1.0(transitive)
- Removed@remirror/core-extensions@0.1.0(transitive)
- Removed@remirror/react-ssr@0.1.0(transitive)
- Removed@remirror/renderer-react@0.1.0(transitive)
- Removed@types/hoist-non-react-statics@3.3.6(transitive)
- Removed@types/prosemirror-history@1.3.0(transitive)
- Removed@types/prosemirror-view@1.24.01.3.2(transitive)
- Removed@types/react-dom@16.9.25(transitive)
- Removedhoist-non-react-statics@3.3.2(transitive)
- Removedprosemirror-history@1.4.1(transitive)
- Removedreact-dom@16.14.0(transitive)
- Removedrope-sequence@1.3.4(transitive)
- Removedscheduler@0.19.1(transitive)
Updated@remirror/core@0.2.0