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

react-virtualized-auto-sizer

Package Overview
Dependencies
Maintainers
2
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-virtualized-auto-sizer - npm Package Compare versions

Comparing version 1.0.17 to 1.0.18

51

dist/react-virtualized-auto-sizer.d.ts

@@ -1,18 +0,39 @@

import { Component, HTMLAttributes, ReactElement, ReactNode } from "react";
export type Size = {
height?: number;
width?: number;
scaledHeight?: number;
scaledWidth?: number;
import { HTMLAttributes, ReactNode, Component, ReactElement } from "react";
export type HorizontalSize = {
width: number;
scaledWidth: number;
};
export type Props = {
export type VerticalSize = {
height: number;
scaledHeight: number;
};
export type Size = HorizontalSize & VerticalSize;
type BaseProps = {
nonce?: string;
tagName?: string;
} & Omit<HTMLAttributes<HTMLDivElement>, "children" | "onResize">;
export type HeightOnlyProps = BaseProps & {
children: (size: VerticalSize) => ReactNode;
defaultHeight?: number;
disableWidth: true;
onResize?: (size: VerticalSize) => void;
};
export type WidthOnlyProps = BaseProps & {
children: (size: HorizontalSize) => ReactNode;
defaultWidth?: number;
disableHeight: true;
onResize?: (size: HorizontalSize) => void;
};
export type HeightAndWidthProps = BaseProps & {
children: (size: Size) => ReactNode;
defaultHeight?: number;
defaultWidth?: number;
disableHeight?: boolean;
disableWidth?: boolean;
nonce?: string;
disableHeight?: false;
disableWidth?: false;
onResize?: (size: Size) => void;
tagName?: string;
} & Omit<HTMLAttributes<HTMLDivElement>, "children" | "onResize">;
};
export type Props = HeightOnlyProps | WidthOnlyProps | HeightAndWidthProps;
export function isHeightAndWidthProps(props: any): props is HeightAndWidthProps;
export function isHeightOnlyProps(props: any): props is HeightOnlyProps;
export function isWidthOnlyProps(props: any): props is WidthOnlyProps;
type State = {

@@ -30,8 +51,2 @@ height: number;

declare class AutoSizer extends Component<Props, State> {
static defaultProps: {
onResize: () => void;
disableHeight: boolean;
disableWidth: boolean;
style: {};
};
state: {

@@ -38,0 +53,0 @@ height: number;

@@ -6,2 +6,18 @@ var $8zHUo$react = require("react");

}
function $parcel$exportWildcard(dest, source) {
Object.keys(source).forEach(function(key) {
if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
return;
}
Object.defineProperty(dest, key, {
enumerable: true,
get: function get() {
return source[key];
}
});
});
return dest;
}
function $parcel$export(e, n, v, s) {

@@ -322,3 +338,3 @@ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});

render() {
const { children: children , defaultHeight: defaultHeight , defaultWidth: defaultWidth , disableHeight: disableHeight , disableWidth: disableWidth , nonce: nonce , onResize: onResize , style: style , tagName: tagName = "div" , ...rest } = this.props;
const { children: children , defaultHeight: defaultHeight , defaultWidth: defaultWidth , disableHeight: disableHeight = false , disableWidth: disableWidth = false , nonce: nonce , onResize: onResize , style: style = {} , tagName: tagName = "div" , ...rest } = this.props;
const { height: height , scaledHeight: scaledHeight , scaledWidth: scaledWidth , width: width } = this.state;

@@ -357,13 +373,24 @@ // Outer div should not force width/height since that may prevent containers from shrinking.

}
$4fd1a97a17b80f9f$var$_defineProperty($4fd1a97a17b80f9f$export$9d94f4ee1d930ff, "defaultProps", {
onResize: ()=>{},
disableHeight: false,
disableWidth: false,
style: {}
});
var $faefaad95e5fcca0$exports = {};
$parcel$export($faefaad95e5fcca0$exports, "isHeightAndWidthProps", () => $faefaad95e5fcca0$export$6a9e233b3261c1f);
$parcel$export($faefaad95e5fcca0$exports, "isHeightOnlyProps", () => $faefaad95e5fcca0$export$232069b3e05ce32a);
$parcel$export($faefaad95e5fcca0$exports, "isWidthOnlyProps", () => $faefaad95e5fcca0$export$10ec32941a097f36);
function $faefaad95e5fcca0$export$6a9e233b3261c1f(props) {
return props && props.disableHeight !== true && props.disableWidth !== true;
}
function $faefaad95e5fcca0$export$232069b3e05ce32a(props) {
return props && props.disableHeight !== true && props.disableWidth === true;
}
function $faefaad95e5fcca0$export$10ec32941a097f36(props) {
return props && props.disableHeight === true && props.disableWidth !== true;
}
var $882b6d93070905b3$export$2e2bcd8739ae039 = (0, $4fd1a97a17b80f9f$export$9d94f4ee1d930ff);
$parcel$exportWildcard(module.exports, $faefaad95e5fcca0$exports);
//# sourceMappingURL=react-virtualized-auto-sizer.js.map

@@ -13,2 +13,5 @@ import {createElement as $hgUW1$createElement, Component as $hgUW1$Component} from "react";

: {};
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}

@@ -312,3 +315,3 @@ var $3e40d2fd7fdb47d2$exports = {};

render() {
const { children: children , defaultHeight: defaultHeight , defaultWidth: defaultWidth , disableHeight: disableHeight , disableWidth: disableWidth , nonce: nonce , onResize: onResize , style: style , tagName: tagName = "div" , ...rest } = this.props;
const { children: children , defaultHeight: defaultHeight , defaultWidth: defaultWidth , disableHeight: disableHeight = false , disableWidth: disableWidth = false , nonce: nonce , onResize: onResize , style: style = {} , tagName: tagName = "div" , ...rest } = this.props;
const { height: height , scaledHeight: scaledHeight , scaledWidth: scaledWidth , width: width } = this.state;

@@ -347,14 +350,24 @@ // Outer div should not force width/height since that may prevent containers from shrinking.

}
$6e2bb92d9db3b0c8$var$_defineProperty($6e2bb92d9db3b0c8$export$9d94f4ee1d930ff, "defaultProps", {
onResize: ()=>{},
disableHeight: false,
disableWidth: false,
style: {}
});
var $81c1b644006d48ec$exports = {};
$parcel$export($81c1b644006d48ec$exports, "isHeightAndWidthProps", () => $81c1b644006d48ec$export$6a9e233b3261c1f);
$parcel$export($81c1b644006d48ec$exports, "isHeightOnlyProps", () => $81c1b644006d48ec$export$232069b3e05ce32a);
$parcel$export($81c1b644006d48ec$exports, "isWidthOnlyProps", () => $81c1b644006d48ec$export$10ec32941a097f36);
function $81c1b644006d48ec$export$6a9e233b3261c1f(props) {
return props && props.disableHeight !== true && props.disableWidth !== true;
}
function $81c1b644006d48ec$export$232069b3e05ce32a(props) {
return props && props.disableHeight !== true && props.disableWidth === true;
}
function $81c1b644006d48ec$export$10ec32941a097f36(props) {
return props && props.disableHeight === true && props.disableWidth !== true;
}
var $149c1bd638913645$export$2e2bcd8739ae039 = (0, $6e2bb92d9db3b0c8$export$9d94f4ee1d930ff);
export {$149c1bd638913645$export$2e2bcd8739ae039 as default};
export {$149c1bd638913645$export$2e2bcd8739ae039 as default, $81c1b644006d48ec$export$6a9e233b3261c1f as isHeightAndWidthProps, $81c1b644006d48ec$export$232069b3e05ce32a as isHeightOnlyProps, $81c1b644006d48ec$export$10ec32941a097f36 as isWidthOnlyProps};
//# sourceMappingURL=react-virtualized-auto-sizer.module.js.map
{
"name": "react-virtualized-auto-sizer",
"version": "1.0.17",
"version": "1.0.18",
"description": "Standalone version of the AutoSizer component from react-virtualized",

@@ -60,5 +60,5 @@ "author": "Brian Vaughn <brian.david.vaughn@gmail.com> (https://github.com/bvaughn/)",

"@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
"@parcel/core": "^2.8.3",
"@parcel/packager-ts": "^2.8.3",
"@parcel/transformer-typescript-types": "^2.8.3",
"@parcel/core": "^2.9.0",
"@parcel/packager-ts": "^2.9.0",
"@parcel/transformer-typescript-types": "^2.9.0",
"@types/jest": "^26.0.15",

@@ -69,3 +69,3 @@ "@types/react": "^18",

"jest-environment-jsdom": "^29.4.3",
"parcel": "^2.8.3",
"parcel": "^2.9.0",
"prettier": "^2.8.6",

@@ -72,0 +72,0 @@ "react": "^18",

@@ -18,3 +18,3 @@ # react-virtualized-auto-sizer

| :------------ | :------- | :-------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| children | Function | ✓ | Function responsible for rendering children. This function should implement the following signature: `({ height: number, width: number }) => PropTypes.element` |
| children | Function | ✓ | Function responsible for rendering children. This function should implement the following signature: `({ height?: number | undefined, width?: number | undefined }) => PropTypes.element` |
| className | String | | Optional custom CSS class name to attach to root `AutoSizer` element. This is an advanced property and is not typically necessary. |

@@ -21,0 +21,0 @@ | defaultHeight | Number | | Height passed to child for initial render; useful for server-side rendering. This value will be overridden with an accurate height after mounting. |

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

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