npm.io
3.8.3 • Published 2 years ago

@types/justifiedgallery

Licence
MIT
Version
3.8.3
Deps
1
Size
6 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/justifiedgallery

Summary

This package contains type definitions for justifiedgallery (https://github.com/miromannino/Justified-Gallery).

Details

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

index.d.ts

/// <reference types="jquery"/>

declare namespace JustifiedGallery {
    interface Settings {
        sizeRangeSuffixes?: { [size: number]: string };
        thumbnailPath?: ((imageSrc: string, imgWidth: number, imgHeight: number, image: JQuery) => string) | undefined;
        rowHeight?: number;
        maxRowHeight?: false | number | string;
        maxRowsCount?: number;
        margins?: number;
        border?: number;
        lastRow?: "justify" | "nojustify" | "left" | "right" | "center" | "hide";
        justifyThreshold?: number;
        waitThumbnailsLoad?: boolean;
        captions?: boolean;
        cssAnimation?: boolean;
        imagesAnimationDuration?: number;
        captionSettings?: CaptionSettings;
        rel?: string | null;
        target?: string | null;
        extension?: RegExp;
        refreshTime?: number;
        refreshSensitivity?: number;
        randomize?: boolean;
        rtl?: boolean;
        sort?: false | ((a: any, b: any) => number);
        filter?: false | string | ((value: HTMLElement, index: number, array: HTMLElement[]) => boolean);
        selector?: string;
        imgSelector?: string;
        triggerEvent?: (event: string | JQuery.Event) => void;
    }

    interface CaptionSettings {
        animationDuration?: number;
        visibleOpacity?: number;
        nonVisibleOpacity?: number;
    }
}

declare function justifiedGallery(root: Window, jQuery?: JQueryStatic): JQueryStatic | JQuery | HTMLElement;

declare global {
    interface JQuery<TElement = HTMLElement> {
        justifiedGallery(settings?: JustifiedGallery.Settings): JQuery;
    }
}

export = justifiedGallery;

Additional Details

  • Last updated: Tue, 07 Nov 2023 0337 GMT
  • Dependencies: @types/jquery

Credits

These definitions were written by Matt Smith.