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

react-responsive-pagination

Package Overview
Dependencies
Maintainers
1
Versions
129
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-responsive-pagination - npm Package Compare versions

Comparing version 2.4.3 to 2.4.4-beta.1

7

CHANGELOG.md
# React Responsive Pagination Changelog
## [2.4.4-beta.1](https://github.com/jonelantha/react-responsive-pagination/compare/v2.4.3...v2.4.4-beta.1) (2024-04-25)
### Bug Fixes
* Package updates ([a715af8](https://github.com/jonelantha/react-responsive-pagination/commit/a715af88ae6ca7cb1a83d58ab39d08dc135aee27))
## [2.4.3](https://github.com/jonelantha/react-responsive-pagination/compare/v2.4.2...v2.4.3) (2024-04-05)

@@ -4,0 +11,0 @@

8

dist/helpers/style.d.ts

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

export declare function getElementWidth(element: HTMLElement): number;
export declare function getContentWidth(element: HTMLElement): number;
export declare function getNonContentWidth(element: HTMLElement): number;
export declare function getWidth(element: HTMLElement): number;
export declare function getElementWidth(element: Element): number;
export declare function getContentWidth(element: Element): number;
export declare function getNonContentWidth(element: Element): number;
export declare function getWidth(element: Element): number;

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

export declare function useAvailableWidth(element: HTMLElement | null): number | undefined;
export declare function useAvailableWidth(element: Element | null): number | undefined;

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

export declare function useContentWidth(element: HTMLElement | undefined): number | undefined;
export declare function useContentWidth(element: Element | undefined): number | undefined;

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

export declare function useFoutDetector(getElements: () => HTMLElement[] | null, handleFout: () => void): void;
export declare function useFoutDetector(getElements: () => Element[] | null, handleFout: () => void): void;

@@ -31,3 +31,3 @@ import { useLayoutEffect } from 'react';

const resizeObserver = new ResizeObserver((entries) => {
const elements = entries.map(getTargetElement);
const elements = entries.map(entry => entry.target);
handleElementsResized(elements);

@@ -38,7 +38,4 @@ });

}
function getTargetElement(entry) {
return entry.target;
}
function isSignificantDifference(width1, width2) {
return Math.abs(width1 - width2) > 0.5;
}

@@ -12,4 +12,4 @@ import { ReactNode } from 'react';

items: import("../paginationItem.js").PaginationItem[];
ref: (element: HTMLElement | null) => void;
ref: (element: Element | null) => void;
clearCache: () => void;
};

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

export declare function useResizeNotifier(element: HTMLElement | undefined, callback: () => void): void;
export declare function useResizeNotifier(element: Element | undefined, callback: () => void): void;
import { CompositionItem } from '../compositionItem.js';
export declare function useWidestComposition(narrowToWideCompositionsProvider: () => IterableIterator<CompositionItem[]>, maxWidth?: number): {
items: CompositionItem[];
ref: (element: HTMLElement | null) => void;
ref: (element: Element | null) => void;
clearCache: () => void;
};

@@ -5,4 +5,4 @@ import { ForwardedRef } from 'react';

items: CompositionItem[];
ref: ForwardedRef<HTMLElement | null>;
ref: ForwardedRef<Element | null>;
clearCache: () => void;
};

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

export declare function getViewMetricsFromContainer<ItemKey extends string>(containerElement: HTMLElement, itemKeys: ItemKey[]): ViewMetrics<ItemKey>;
export declare function getViewMetricsFromContainer<ItemKey extends string>(containerElement: Element, itemKeys: ItemKey[]): ViewMetrics<ItemKey>;
export type ViewMetrics<ItemKey extends string> = {

@@ -3,0 +3,0 @@ outerFrameWidth: number;

@@ -7,3 +7,3 @@ import { WidthCalculator } from '../../widthCalculator/index.js';

items: CompositionItem[];
ref: (element: HTMLElement | null) => void;
ref: (element: Element | null) => void;
};

@@ -10,0 +10,0 @@ clearCache: () => void;

@@ -34,1 +34,3 @@ import React, { ReactNode } from 'react';

};
export declare function getRenderCount(): number;
export declare function resetRenderCount(): void;

@@ -18,2 +18,3 @@ import React, { memo, useEffect } from 'react';

function ResponsivePagination({ current, total, onPageChange: handlePageChange, maxWidth, narrowBehaviour, className, extraClassName = 'justify-content-center', pageItemClassName = 'page-item', pageLinkClassName = 'page-link', activeItemClassName = 'active', disabledItemClassName = 'disabled', navClassName, previousClassName, nextClassName, previousLabel, nextLabel, ariaPreviousLabel, ariaNextLabel, renderNav = true, ariaCurrentAttr = true, linkHref = 'hash', labelBehaviour: getLabel = defaultLabelBehaviour, }) {
renderCount++;
const { items, ref, clearCache } = usePaginationItems(current, total, maxWidth, {

@@ -113,1 +114,8 @@ narrowBehaviour,

}
let renderCount = 0;
export function getRenderCount() {
return renderCount;
}
export function resetRenderCount() {
renderCount = 0;
}
{
"name": "react-responsive-pagination",
"version": "2.4.3",
"version": "2.4.4-beta.1",
"description": "React component for responsive pagination",

@@ -5,0 +5,0 @@ "author": "jonelantha",

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