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

@types/scrollbooster

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/scrollbooster

TypeScript definitions for scrollbooster

3.0.3
ts4.5
ts4.6
ts4.7
ts4.8
ts4.9
ts5.0
ts5.1
ts5.2
ts5.3
ts5.4
ts5.5
ts5.6
ts5.7
ts5.8
ts5.9
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

Installation

npm install --save @types/scrollbooster

Summary

This package contains type definitions for scrollbooster (https://github.com/ilyashubin/scrollbooster).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/scrollbooster.

index.d.ts

export interface Position {
    x?: number | undefined;
    y?: number | undefined;
}

export interface ScrollingState {
    isMoving: boolean;
    isDragging: boolean;
    isScrolling: boolean;
    position: Required<Position>;
    dragOffset: Required<Position>;
    dragAngle: number;
    borderCollision: {
        left: boolean;
        right: boolean;
        top: boolean;
        bottom: boolean;
    };
}

export interface ScrollBoosterOptions {
    viewport: Element;
    content: Element;
    direction?: "all" | "vertical" | "horizontal";
    pointerMode?: "all" | "touch" | "mouse";
    scrollMode?: "transform" | "native" | undefined;
    bounce?: boolean;
    bounceForce?: number;
    friction?: number;
    textSelection?: boolean;
    inputsFocus?: boolean;
    emulateScroll?: boolean;
    preventDefaultOnEmulateScroll?: "vertical" | "horizontal";
    lockScrollOnDragDirection?: "all" | "vertical" | "horizontal";
    dragDirectionTolerance?: number;
    onClick?: (state: ScrollingState, event: MouseEvent, isTouch: boolean) => void;
    onUpdate?: (state: ScrollingState) => void;
    onWheel?: (state: ScrollingState, event: Event) => void;
    shouldScroll?: (state: ScrollingState, event: Event) => boolean;
    onPointerDown?: (state: ScrollingState, event: MouseEvent, isTouch: boolean) => void;
    onPointerUp?: (state: ScrollingState, event: MouseEvent, isTouch: boolean) => void;
    onPointerMove?: (state: ScrollingState, event: MouseEvent, isTouch: boolean) => void;
}

export default class ScrollBooster {
    constructor(options: ScrollBoosterOptions);
    destroy(): void;
    setPosition(position: Position): void;
    getState(): ScrollingState;
    scrollTo(position: Position): void;
    updateMetrics(): void;
    updateOptions(options: Partial<ScrollBoosterOptions>): void;
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: none

Credits

These definitions were written by Chris, and Chris Frewin.

FAQs

Package last updated on 07 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts