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

@remirror/react-utils

Package Overview
Dependencies
Maintainers
1
Versions
275
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@remirror/react-utils - npm Package Compare versions

Comparing version 1.0.0-next.60 to 1.0.0-pr706

dist/remirror-react-utils.browser.cjs.js

3

dist/declarations/src/index.d.ts

@@ -1,2 +0,1 @@

export type { RemirrorComponentStaticProperties, RemirrorComponentType, RemirrorElement, } from './react-utils';
export { RemirrorType, addKeyToElement, asDefaultProps, getElementProps, isReactDOMElement, isReactFragment, isRemirrorElement, isRemirrorProvider, isValidElement, oneChildOnly, propIsFunction, } from './react-utils';
export { addKeyToElement, getElementProps, isReactDOMElement, isReactFragment, isValidElement, propIsFunction, } from './react-utils';

@@ -1,33 +0,4 @@

import { ComponentType, Fragment, ReactElement, ReactNode } from 'react';
import { Fragment, ReactElement, ReactNode } from 'react';
import type { AnyFunction, UnknownShape } from '@remirror/core-types';
export interface RemirrorComponentStaticProperties {
/**
* Identifies this as a remirror specific component
*/
$$remirrorType: RemirrorType;
}
export declare type RemirrorComponentType<Props extends object = object> = ComponentType<Props> & RemirrorComponentStaticProperties;
export declare type RemirrorElement<Options extends object = any> = ReactElement & {
type: RemirrorComponentType<Options>;
};
/**
* These are the constants used to determine whether an element is a remirror constant.
*/
export declare enum RemirrorType {
SSR = "ssr",
Editor = "editor",
/**
* The `RemirrorProvider` component.
*/
Provider = "provider",
/**
* Marks the provider for i18n.
*/
I18nProvider = "i18n-provider",
/**
* Marks this as a provider for the remirror theme.
*/
ThemeProvider = "theme-provider"
}
/**
* A drop in replacement for built in React.isValidElement which accepts a test value of any type

@@ -63,24 +34,2 @@ *

/**
* Utility for properly typechecking static defaultProps for a class component in react.
*
* ```ts
* static defaultProps = asDefaultProps<RemirrorProps>()({
* initialContent: EMPTY_PARAGRAPH_NODE,
* });
* ```
*/
export declare const asDefaultProps: <Props extends object>() => <DefaultProps extends Partial<Props>>(props: DefaultProps) => DefaultProps;
/**
* Checks if this element has a type of any RemirrorComponent
*
* @param value - the value to check
*/
export declare const isRemirrorElement: <Options extends object = any>(value: unknown) => value is RemirrorElement<Options>;
/**
* Finds if this is a RemirrorProvider (which provides the RemirrorInjectedProps into the context);
*
* @param value - the value to check
*/
export declare const isRemirrorProvider: <Options extends object = any>(value: unknown) => value is RemirrorElement<Options>;
/**
* Will throw an error if the child provided is not a function.

@@ -96,7 +45,2 @@ *

/**
* A drop in replacement for React.Children.only which provides more readable errors
* when the child is not a react element or undefined.
*/
export declare function oneChildOnly<Props extends object = any>(value: unknown): ReactElement<Props>;
/**
* Add the specified key to an element when it is a valid react element.

@@ -103,0 +47,0 @@ *

{
"name": "@remirror/react-utils",
"version": "1.0.0-next.60",
"version": "1.0.0-pr706",
"description": "A small set of utilities for react components in remirror.",

@@ -11,4 +11,4 @@ "keywords": [

],
"homepage": "https://github.com/remirror/remirror/tree/HEAD/packages/@remirror/react-utils",
"repository": "https://github.com/remirror/remirror/tree/HEAD/packages/@remirror/react-utils",
"homepage": "https://github.com/remirror/remirror/tree/HEAD/packages/remirror__react-utils",
"repository": "https://github.com/remirror/remirror/tree/HEAD/packages/remirror__react-utils",
"license": "MIT",

@@ -19,9 +19,20 @@ "contributors": [

"sideEffects": false,
"main": "dist/react-utils.cjs.js",
"module": "dist/react-utils.esm.js",
"exports": {
".": {
"import": "./dist/remirror-react-utils.esm.js",
"require": "./dist/remirror-react-utils.cjs.js",
"browser": "./dist/remirror-react-utils.browser.esm.js",
"types": "./dist/remirror-react-utils.cjs.d.ts",
"default": "./dist/remirror-react-utils.esm.js"
},
"./package.json": "./package.json",
"./types/*": "./dist/declarations/src/*.d.ts"
},
"main": "dist/remirror-react-utils.cjs.js",
"module": "dist/remirror-react-utils.esm.js",
"browser": {
"./dist/react-utils.cjs.js": "./dist/react-utils.browser.cjs.js",
"./dist/react-utils.esm.js": "./dist/react-utils.browser.esm.js"
"./dist/remirror-react-utils.cjs.js": "./dist/remirror-react-utils.browser.cjs.js",
"./dist/remirror-react-utils.esm.js": "./dist/remirror-react-utils.browser.esm.js"
},
"types": "dist/react-utils.cjs.d.ts",
"types": "dist/remirror-react-utils.cjs.d.ts",
"files": [

@@ -31,21 +42,27 @@ "dist"

"dependencies": {
"@babel/runtime": "^7.12.0",
"@remirror/core-constants": "1.0.0-next.60",
"@remirror/core-helpers": "1.0.0-next.60",
"@remirror/core-types": "1.0.0-next.60"
"@babel/runtime": "^7.12.13",
"@remirror/core-constants": "1.0.0-pr706",
"@remirror/core-helpers": "1.0.0-pr706",
"@remirror/core-types": "1.0.0-pr706"
},
"devDependencies": {
"@types/react": "^16.9.53",
"@types/react": "^17.0.1",
"react": "^17.0.1"
},
"peerDependencies": {
"@types/react": "^16.8.0",
"react": "^16.8.0 || ^17"
"@types/react": "^16.14.0 || ^17",
"react": "^16.14.0 || ^17"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
},
"publishConfig": {
"access": "public"
},
"meta": {
"@remirror": {
"sizeLimit": "5 KB"
}
},
"rn:dev": "src/index.ts"
}

@@ -10,4 +10,4 @@ # @remirror/react-utils

[license]: https://flat.badgen.net/badge/license/MIT/purple
[size]: https://bundlephobia.com/result?p=@remirror/react-utils@next
[size-badge]: https://flat.badgen.net/bundlephobia/minzip/@remirror/react-utils@next
[size]: https://bundlephobia.com/result?p=@remirror/react-utils
[size-badge]: https://flat.badgen.net/bundlephobia/minzip/@remirror/react-utils
[typescript]: https://flat.badgen.net/badge/icon/TypeScript?icon=typescript&label

@@ -26,4 +26,4 @@ [downloads-badge]: https://badgen.net/npm/dw/@remirror/react-utils/red?icon=npm

This is included by default when you install the recommended `remirror` package. All exports are also available via the entry-point, `remirror/react/utils`.
This is included by default when you install the recommended `remirror` package. All exports are also available via the entry-point, `remirror/react`.
<br />

Sorry, the diff of this file is not supported yet

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