You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@tanstack/virtual-core

Package Overview
Dependencies
Maintainers
2
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tanstack/virtual-core - npm Package Compare versions

Comparing version

to
3.10.9

8

dist/esm/index.d.ts

@@ -34,4 +34,5 @@ export * from './utils.js';

export declare const observeWindowRect: (instance: Virtualizer<Window, any>, cb: (rect: Rect) => void) => (() => void) | undefined;
export declare const observeElementOffset: <T extends Element>(instance: Virtualizer<T, any>, cb: (offset: number, isScrolling: boolean) => void) => (() => void) | undefined;
export declare const observeWindowOffset: (instance: Virtualizer<Window, any>, cb: (offset: number, isScrolling: boolean) => void) => (() => void) | undefined;
type ObserveOffsetCallBack = (offset: number, isScrolling: boolean) => void;
export declare const observeElementOffset: <T extends Element>(instance: Virtualizer<T, any>, cb: ObserveOffsetCallBack) => (() => void) | undefined;
export declare const observeWindowOffset: (instance: Virtualizer<Window, any>, cb: ObserveOffsetCallBack) => (() => void) | undefined;
export declare const measureElement: <TItemElement extends Element>(element: TItemElement, entry: ResizeObserverEntry | undefined, instance: Virtualizer<any, TItemElement>) => number;

@@ -55,3 +56,3 @@ export declare const windowScroll: <T extends Window>(offset: number, { adjustments, behavior, }: {

observeElementRect: (instance: Virtualizer<TScrollElement, TItemElement>, cb: (rect: Rect) => void) => void | (() => void);
observeElementOffset: (instance: Virtualizer<TScrollElement, TItemElement>, cb: (offset: number, isScrolling: boolean) => void) => void | (() => void);
observeElementOffset: (instance: Virtualizer<TScrollElement, TItemElement>, cb: ObserveOffsetCallBack) => void | (() => void);
debug?: boolean;

@@ -76,2 +77,3 @@ initialRect?: Rect;

isScrollingResetDelay?: number;
useScrollendEvent?: boolean;
enabled?: boolean;

@@ -78,0 +80,0 @@ isRtl?: boolean;

@@ -74,3 +74,3 @@ import { debounce, memo, notUndefined, approxEqual } from "./utils.js";

let offset = 0;
const fallback = supportsScrollend ? () => void 0 : debounce(
const fallback = instance.options.useScrollendEvent && supportsScrollend ? () => void 0 : debounce(
targetWindow,

@@ -108,3 +108,3 @@ () => {

let offset = 0;
const fallback = supportsScrollend ? () => void 0 : debounce(
const fallback = instance.options.useScrollendEvent && supportsScrollend ? () => void 0 : debounce(
targetWindow,

@@ -241,2 +241,3 @@ () => {

isRtl: false,
useScrollendEvent: true,
...opts2

@@ -243,0 +244,0 @@ };

{
"name": "@tanstack/virtual-core",
"version": "3.10.8",
"version": "3.10.9",
"description": "Headless UI for virtualizing scrollable elements in TS/JS + Frameworks",

@@ -5,0 +5,0 @@ "author": "Tanner Linsley",

@@ -133,5 +133,7 @@ import { approxEqual, debounce, memo, notUndefined } from './utils'

type ObserveOffsetCallBack = (offset: number, isScrolling: boolean) => void
export const observeElementOffset = <T extends Element>(
instance: Virtualizer<T, any>,
cb: (offset: number, isScrolling: boolean) => void,
cb: ObserveOffsetCallBack,
) => {

@@ -148,11 +150,12 @@ const element = instance.scrollElement

let offset = 0
const fallback = supportsScrollend
? () => undefined
: debounce(
targetWindow,
() => {
cb(offset, false)
},
instance.options.isScrollingResetDelay,
)
const fallback =
instance.options.useScrollendEvent && supportsScrollend
? () => undefined
: debounce(
targetWindow,
() => {
cb(offset, false)
},
instance.options.isScrollingResetDelay,
)

@@ -182,3 +185,3 @@ const createHandler = (isScrolling: boolean) => () => {

instance: Virtualizer<Window, any>,
cb: (offset: number, isScrolling: boolean) => void,
cb: ObserveOffsetCallBack,
) => {

@@ -195,11 +198,12 @@ const element = instance.scrollElement

let offset = 0
const fallback = supportsScrollend
? () => undefined
: debounce(
targetWindow,
() => {
cb(offset, false)
},
instance.options.isScrollingResetDelay,
)
const fallback =
instance.options.useScrollendEvent && supportsScrollend
? () => undefined
: debounce(
targetWindow,
() => {
cb(offset, false)
},
instance.options.isScrollingResetDelay,
)

@@ -298,5 +302,4 @@ const createHandler = (isScrolling: boolean) => () => {

instance: Virtualizer<TScrollElement, TItemElement>,
cb: (offset: number, isScrolling: boolean) => void,
cb: ObserveOffsetCallBack,
) => void | (() => void)
// Optional

@@ -329,2 +332,3 @@ debug?: boolean

isScrollingResetDelay?: number
useScrollendEvent?: boolean
enabled?: boolean

@@ -421,2 +425,3 @@ isRtl?: boolean

isRtl: false,
useScrollendEvent: true,
...opts,

@@ -423,0 +428,0 @@ }

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