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

react-pannable

Package Overview
Dependencies
Maintainers
1
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-pannable - npm Package Compare versions

Comparing version 5.0.0 to 5.0.1

6

lib/AutoResizing.js

@@ -10,3 +10,3 @@ import { useIsomorphicLayoutEffect } from './utils/hooks';

};
const AutoResizing = React.memo(props => {
const AutoResizing = React.memo((props) => {
const { width, height, onResize, children, ...divProps } = props;

@@ -42,3 +42,3 @@ const [size, setSize] = useState(null);

};
setSize(size => (isEqualToSize(size, nextSize) ? size : nextSize));
setSize((size) => (isEqualToSize(size, nextSize) ? size : nextSize));
}

@@ -58,3 +58,3 @@ calculateSize();

if (fixedSize) {
setSize(size => (isEqualToSize(size, fixedSize) ? size : fixedSize));
setSize((size) => (isEqualToSize(size, fixedSize) ? size : fixedSize));
}

@@ -61,0 +61,0 @@ }, [fixedSize]);

@@ -19,3 +19,3 @@ import PadContext from './PadContext';

};
const GridContent = React.memo(props => {
const GridContent = React.memo((props) => {
const context = useContext(PadContext);

@@ -94,3 +94,3 @@ const { direction, itemWidth, itemHeight, itemCount, renderItem, width, height, rowSpacing, columnSpacing, children, ...divProps } = props;

}
const items = layout.layoutList.map(attrs => buildItem({
const items = layout.layoutList.map((attrs) => buildItem({
...attrs,

@@ -97,0 +97,0 @@ visibleRect: getItemVisibleRect(attrs.rect, context.visibleRect),

@@ -17,3 +17,3 @@ import PadContext from './PadContext';

};
const ItemContent = React.memo(props => {
const ItemContent = React.memo((props) => {
const { width, height, autoResizing, children, ...divProps } = props;

@@ -63,3 +63,3 @@ const context = useContext(PadContext);

};
setSize(size => (isEqualToSize(size, nextSize) ? size : nextSize));
setSize((size) => (isEqualToSize(size, nextSize) ? size : nextSize));
}

@@ -81,3 +81,3 @@ calculateSize();

if (fixedSize) {
setSize(size => (isEqualToSize(size, fixedSize) ? size : fixedSize));
setSize((size) => (isEqualToSize(size, fixedSize) ? size : fixedSize));
}

@@ -84,0 +84,0 @@ }, [fixedSize]);

@@ -17,3 +17,3 @@ import PadContext from './PadContext';

};
const ListContent = React.memo(props => {
const ListContent = React.memo((props) => {
const context = useContext(PadContext);

@@ -102,4 +102,4 @@ const { direction, itemCount, renderItem, width, height, spacing, estimatedItemWidth, estimatedItemHeight, children, ...divProps } = props;

visibleRect,
onResize: itemSize => {
setItemSizeDict(itemSizeDict => ({
onResize: (itemSize) => {
setItemSizeDict((itemSizeDict) => ({
...itemSizeDict,

@@ -112,3 +112,3 @@ [hash]: itemSize,

}
const items = layout.layoutList.map(attrs => buildItem({
const items = layout.layoutList.map((attrs) => buildItem({
...attrs,

@@ -115,0 +115,0 @@ visibleRect: getItemVisibleRect(attrs.rect, context.visibleRect),

@@ -15,3 +15,3 @@ import reducer, { initialPannableState, } from './pannableReducer';

};
const Pannable = React.memo(props => {
const Pannable = React.memo((props) => {
const { enabled, shouldStart, onStart, onMove, onEnd, onCancel, children, ...divProps } = props;

@@ -18,0 +18,0 @@ const [state, dispatch] = useReducer(reducer, initialPannableState);

{
"name": "react-pannable",
"version": "5.0.0",
"version": "5.0.1",
"description": "Flexible and Customizable Layouts for Scrolling Content with React",

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

"peerDependencies": {
"react": "^16.8.4",
"react-dom": "^16.8.4"
"react": "^16.8.4 || ^17.0.0",
"react-dom": "^16.8.4 || ^17.0.0"
},

@@ -67,0 +67,0 @@ "dependencies": {

@@ -8,4 +8,4 @@ import { Size } from './interfaces';

}
declare const AutoResizing: React.FC<AutoResizingProps & React.HTMLAttributes<HTMLDivElement>>;
declare const AutoResizing: React.FC<AutoResizingProps & React.ComponentProps<'div'>>;
export default AutoResizing;
//# sourceMappingURL=AutoResizing.d.ts.map

@@ -16,4 +16,4 @@ import { CarouselScrollTo, CarouselEvent } from './carouselReducer';

}
declare const Carousel: React.FC<CarouselProps & Omit<React.HTMLAttributes<HTMLDivElement>, 'onScroll'>>;
declare const Carousel: React.FC<CarouselProps & Omit<React.ComponentProps<'div'>, 'onScroll'>>;
export default Carousel;
//# sourceMappingURL=Carousel.d.ts.map

@@ -7,4 +7,4 @@ import { XY } from '../interfaces';

}
declare const Loop: React.FC<LoopProps & Omit<React.HTMLAttributes<HTMLDivElement>, 'onScroll'>>;
declare const Loop: React.FC<LoopProps & Omit<React.ComponentProps<'div'>, 'onScroll'>>;
export default Loop;
//# sourceMappingURL=Loop.d.ts.map

@@ -17,4 +17,4 @@ import { InfiniteScrollTo } from './infiniteReducer';

}
declare const Infinite: React.FC<InfiniteProps & Omit<React.HTMLAttributes<HTMLDivElement>, 'onScroll'>>;
declare const Infinite: React.FC<InfiniteProps & Omit<React.ComponentProps<'div'>, 'onScroll'>>;
export default Infinite;
//# sourceMappingURL=Infinite.d.ts.map

@@ -33,4 +33,4 @@ import { XY, RC, Rect, Size } from '../interfaces';

}
declare const GridContent: React.FC<GridContentProps & React.HTMLAttributes<HTMLDivElement>>;
declare const GridContent: React.FC<GridContentProps & React.ComponentProps<'div'>>;
export default GridContent;
//# sourceMappingURL=GridContent.d.ts.map

@@ -7,4 +7,4 @@ import React from 'react';

}
declare const ItemContent: React.FC<ItemContentProps & React.HTMLAttributes<HTMLDivElement>>;
declare const ItemContent: React.FC<ItemContentProps & React.ComponentProps<'div'>>;
export default ItemContent;
//# sourceMappingURL=ItemContent.d.ts.map

@@ -33,4 +33,4 @@ import { XY, Rect, Size } from '../interfaces';

}
declare const ListContent: React.FC<ListContentProps & React.HTMLAttributes<HTMLDivElement>>;
declare const ListContent: React.FC<ListContentProps & React.ComponentProps<'div'>>;
export default ListContent;
//# sourceMappingURL=ListContent.d.ts.map

@@ -25,4 +25,4 @@ import { PadState, PadEvent, PadMethods, PadScrollTo } from './padReducer';

export declare const defaultPadProps: PadProps;
declare const Pad: React.FC<PadProps & Omit<React.HTMLAttributes<HTMLDivElement>, 'onScroll'>>;
declare const Pad: React.FC<PadProps & Omit<React.ComponentProps<'div'>, 'onScroll'>>;
export default Pad;
//# sourceMappingURL=Pad.d.ts.map

@@ -12,4 +12,4 @@ import { PannableEvent } from './pannableReducer';

export declare const defaultPannableProps: PannableProps;
declare const Pannable: React.FC<PannableProps & React.HTMLAttributes<HTMLDivElement>>;
declare const Pannable: React.FC<PannableProps & React.ComponentProps<'div'>>;
export default Pannable;
//# sourceMappingURL=Pannable.d.ts.map

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

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

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

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