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

@chakra-ui/react-utils

Package Overview
Dependencies
Maintainers
3
Versions
111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chakra-ui/react-utils - npm Package Compare versions

Comparing version 0.0.0-dev-20221222051548 to 0.0.0-dev-20221223180742

dist/children.d.ts

69

dist/index.d.ts

@@ -1,63 +0,6 @@

import { Merge, EventKeys } from '@chakra-ui/utils';
import * as react from 'react';
declare type ReactRef<T> = React.Ref<T> | React.RefObject<T> | React.MutableRefObject<T>;
/**
* Assigns a value to a ref function or object
*
* @param ref the ref to assign to
* @param value the value
*/
declare function assignRef<T = any>(ref: ReactRef<T> | undefined, value: T): void;
/**
* Combine multiple React refs into a single ref function.
* This is used mostly when you need to allow consumers forward refs to
* internal components
*
* @param refs refs to assign to value to
*/
declare function mergeRefs<T>(...refs: (ReactRef<T> | undefined)[]): (node: T | null) => void;
interface CreateContextOptions {
/**
* If `true`, React will throw if context is `null` or `undefined`
* In some cases, you might want to support nested context, so you can set it to `false`
*/
strict?: boolean;
/**
* Error message to throw if the context is `undefined`
*/
errorMessage?: string;
/**
* The display name of the context
*/
name?: string;
}
declare type CreateContextReturn<T> = [
React.Provider<T>,
() => T,
React.Context<T>
];
/**
* Creates a named context, provider, and hook.
*
* @param options create context options
*/
declare function createContext<ContextType>(options?: CreateContextOptions): CreateContextReturn<ContextType>;
declare type MaybeRenderProp<P> = React.ReactNode | ((props: P) => React.ReactNode);
declare type WithoutStyleAttr<T> = Omit<T, "color" | "width" | "height">;
declare type HTMLProps<T = any> = WithoutStyleAttr<React.HTMLAttributes<T>> & React.RefAttributes<T>;
declare type PropGetter<T extends HTMLElement = any, P = {}> = (props?: Merge<HTMLProps<T>, P>, ref?: React.Ref<any> | React.RefObject<any>) => Merge<HTMLProps<T>, P>;
declare type PropGetterV2<T extends React.ElementType, P = {}> = (props?: WithoutStyleAttr<React.ComponentPropsWithoutRef<T>> & P, ref?: React.Ref<any> | React.RefObject<any>) => WithoutStyleAttr<React.ComponentPropsWithRef<T>>;
declare type EventKeyMap = Partial<Record<EventKeys, React.KeyboardEventHandler>>;
/**
* Gets only the valid children of a component,
* and ignores any nullish or falsy child.
*
* @param children the children
*/
declare function getValidChildren(children: React.ReactNode): react.ReactElement<any, string | react.JSXElementConstructor<any>>[];
export { CreateContextOptions, CreateContextReturn, EventKeyMap, HTMLProps, MaybeRenderProp, PropGetter, PropGetterV2, ReactRef, assignRef, createContext, getValidChildren, mergeRefs };
export { ReactRef, assignRef, mergeRefs } from './refs.js';
export { CreateContextOptions, CreateContextReturn, createContext } from './context.js';
export { EventKeyMap, HTMLProps, MaybeRenderProp, PropGetter, PropGetterV2 } from './types.js';
export { getValidChildren } from './children.js';
import '@chakra-ui/utils';
import 'react';
{
"name": "@chakra-ui/react-utils",
"version": "0.0.0-dev-20221222051548",
"version": "0.0.0-dev-20221223180742",
"description": "React utilities and helpers for Chakra UI",

@@ -14,3 +14,3 @@ "keywords": [

"license": "MIT",
"main": "dist/index.cjs.js",
"main": "dist/index.js",
"sideEffects": false,

@@ -32,3 +32,3 @@ "files": [

"dependencies": {
"@chakra-ui/utils": "0.0.0-dev-20221222051548"
"@chakra-ui/utils": "0.0.0-dev-20221223180742"
},

@@ -42,9 +42,18 @@ "peerDependencies": {

},
"module": "dist/index.esm.js",
"clean-package": "../../../clean-package.config.json",
"tsup": {
"clean": true,
"target": "es2019",
"format": [
"cjs",
"esm"
]
},
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js",
"types": "./dist/index.d.ts"
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},

@@ -54,8 +63,8 @@ "./package.json": "./package.json"

"scripts": {
"build": "tsup src/index.ts --dts",
"build": "tsup src --dts",
"dev": "pnpm build:fast -- --watch",
"clean": "rimraf dist .turbo",
"typecheck": "tsc --noEmit",
"build:fast": "tsup src/index.ts"
"build:fast": "tsup src"
}
}
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