@types/photoswipe
Advanced tools
@@ -1,2 +0,2 @@ | ||
| import * as PhotoSwipe from '../../index'; | ||
| import * as PhotoSwipe from "../../index"; | ||
@@ -71,3 +71,2 @@ /** | ||
| * } | ||
| * | ||
| */ | ||
@@ -182,3 +181,2 @@ addCaptionHTMLFn?: ((item: Item, captionEl: HTMLElement, isFake: boolean) => boolean) | undefined; | ||
| * ] | ||
| * | ||
| */ | ||
@@ -201,3 +199,2 @@ shareButtons?: ShareButtonData[] | undefined; | ||
| * } | ||
| * | ||
| */ | ||
@@ -216,3 +213,2 @@ getImageURLForShare?: ((shareButtonData: ShareButtonData) => string) | undefined; | ||
| * } | ||
| * | ||
| */ | ||
@@ -230,3 +226,2 @@ getPageURLForShare?: ((shareButtonData: ShareButtonData) => string) | undefined; | ||
| * } | ||
| * | ||
| */ | ||
@@ -244,3 +239,2 @@ getTextForShare?: ((shareButtonData: ShareButtonData) => string) | undefined; | ||
| * } | ||
| * | ||
| */ | ||
@@ -247,0 +241,0 @@ parseShareButtonOut?: ((shareButtonData: ShareButtonData, shareButtonOut: string) => string) | undefined; |
+34
-29
@@ -43,3 +43,3 @@ // Type definitions for PhotoSwipe 4.1.3 | ||
| */ | ||
| vGap?: {top: number; bottom: number} | undefined; | ||
| vGap?: { top: number; bottom: number } | undefined; | ||
@@ -388,6 +388,8 @@ /** | ||
| */ | ||
| constructor(pswpElement: HTMLElement, | ||
| uiConstructor: (new (pswp: PhotoSwipe<T>, framework: PhotoSwipe.UIFramework) => PhotoSwipe.UI<T>) | boolean, | ||
| items: PhotoSwipe.Item[], | ||
| options: T); | ||
| constructor( | ||
| pswpElement: HTMLElement, | ||
| uiConstructor: (new(pswp: PhotoSwipe<T>, framework: PhotoSwipe.UIFramework) => PhotoSwipe.UI<T>) | boolean, | ||
| items: PhotoSwipe.Item[], | ||
| options: T, | ||
| ); | ||
@@ -431,4 +433,4 @@ /** | ||
| viewportSize: { | ||
| x: number; | ||
| y: number; | ||
| x: number; | ||
| y: number; | ||
| }; | ||
@@ -538,9 +540,10 @@ | ||
| * pswp.zoomTo(2, {x:pswp.viewportSize.x/2,y:pswp.viewportSize.y/2}, 2000, false, function(now) {}); | ||
| * | ||
| */ | ||
| zoomTo(destZoomLevel: number, | ||
| centerPoint: {x: number; y: number}, | ||
| speed: number, | ||
| easingFn?: (k: number) => number, | ||
| updateFn?: (now: number) => void): void; | ||
| zoomTo( | ||
| destZoomLevel: number, | ||
| centerPoint: { x: number; y: number }, | ||
| speed: number, | ||
| easingFn?: (k: number) => number, | ||
| updateFn?: (now: number) => void, | ||
| ): void; | ||
@@ -557,3 +560,2 @@ /** | ||
| * and will place it on top left corner. | ||
| * | ||
| */ | ||
@@ -577,15 +579,15 @@ applyZoomPan(zoomLevel: number, panX: number, panY: number): void; | ||
| */ | ||
| listen(eventName: 'beforeChange', callback: () => void): void; | ||
| listen(eventName: "beforeChange", callback: () => void): void; | ||
| /** | ||
| * Called after slides change (after content has changed). | ||
| */ | ||
| listen(eventName: 'afterChange', callback: () => void): void; | ||
| listen(eventName: "afterChange", callback: () => void): void; | ||
| /** | ||
| * Called when an image is loaded. | ||
| */ | ||
| listen(eventName: 'imageLoadComplete', callback: (index: number, item: PhotoSwipe.Item) => void): void; | ||
| listen(eventName: "imageLoadComplete", callback: (index: number, item: PhotoSwipe.Item) => void): void; | ||
| /** | ||
| * Called when the viewport size changes. | ||
| */ | ||
| listen(eventName: 'resize', callback: () => void): void; | ||
| listen(eventName: "resize", callback: () => void): void; | ||
| /** | ||
@@ -595,23 +597,23 @@ * Triggers when PhotoSwipe reads slide object data, which happens before content is set, or before lazy-loading is initiated. | ||
| */ | ||
| listen(eventName: 'gettingData', callback: (index: number, item: PhotoSwipe.Item) => void): void; | ||
| listen(eventName: "gettingData", callback: (index: number, item: PhotoSwipe.Item) => void): void; | ||
| /** | ||
| * Called when mouse is first used (triggers only once). | ||
| */ | ||
| listen(eventName: 'mouseUsed', callback: () => void): void; | ||
| listen(eventName: "mouseUsed", callback: () => void): void; | ||
| /** | ||
| * Called when opening zoom in animation starting. | ||
| */ | ||
| listen(eventName: 'initialZoomIn', callback: () => void): void; | ||
| listen(eventName: "initialZoomIn", callback: () => void): void; | ||
| /** | ||
| * Called when opening zoom in animation finished. | ||
| */ | ||
| listen(eventName: 'initialZoomInEnd', callback: () => void): void; | ||
| listen(eventName: "initialZoomInEnd", callback: () => void): void; | ||
| /** | ||
| * Called when closing zoom out animation started. | ||
| */ | ||
| listen(eventName: 'initialZoomOut', callback: () => void): void; | ||
| listen(eventName: "initialZoomOut", callback: () => void): void; | ||
| /** | ||
| * Called when closing zoom out animation finished. | ||
| */ | ||
| listen(eventName: 'initialZoomOutEnd', callback: () => void): void; | ||
| listen(eventName: "initialZoomOutEnd", callback: () => void): void; | ||
| /** | ||
@@ -629,11 +631,11 @@ * Allows overriding vertical margin for individual items. | ||
| */ | ||
| listen(eventName: 'parseVerticalMargin', callback: (item: PhotoSwipe.Item) => void): void; | ||
| listen(eventName: "parseVerticalMargin", callback: (item: PhotoSwipe.Item) => void): void; | ||
| /** | ||
| * Called when the gallery starts closing. | ||
| */ | ||
| listen(eventName: 'close', callback: () => void): void; | ||
| listen(eventName: "close", callback: () => void): void; | ||
| /** | ||
| * Gallery unbinds events (triggers before closing animation). | ||
| */ | ||
| listen(eventName: 'unbindEvents', callback: () => void): void; | ||
| listen(eventName: "unbindEvents", callback: () => void): void; | ||
| /** | ||
@@ -643,7 +645,10 @@ * Called after the gallery is closed and the closing animation finishes. | ||
| */ | ||
| listen(eventName: 'destroy', callback: () => void): void; | ||
| listen(eventName: "destroy", callback: () => void): void; | ||
| /** | ||
| * Allow to call preventDefault on down and up events. | ||
| */ | ||
| listen(eventName: 'preventDragEvent', callback: (e: MouseEvent, isDown: boolean, preventObj: {prevent: boolean}) => void): void; | ||
| listen( | ||
| eventName: "preventDragEvent", | ||
| callback: (e: MouseEvent, isDown: boolean, preventObj: { prevent: boolean }) => void, | ||
| ): void; | ||
@@ -650,0 +655,0 @@ /** |
| { | ||
| "name": "@types/photoswipe", | ||
| "version": "4.1.2", | ||
| "version": "4.1.3", | ||
| "description": "TypeScript definitions for PhotoSwipe", | ||
@@ -33,4 +33,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/photoswipe", | ||
| "dependencies": {}, | ||
| "typesPublisherContentHash": "05d30e0f65de42d9f18944938eb6fbd3202c5cd48298b487a29b46c03a40be6b", | ||
| "typeScriptVersion": "3.6" | ||
| "typesPublisherContentHash": "7150605cca4ebdbbc6b81cedfb41b26e8f0dd439f60c1d49bef045a3bcb6a546", | ||
| "typeScriptVersion": "4.5" | ||
| } |
@@ -11,3 +11,3 @@ # Installation | ||
| ### Additional Details | ||
| * Last updated: Thu, 08 Jul 2021 20:19:36 GMT | ||
| * Last updated: Sun, 24 Sep 2023 06:37:28 GMT | ||
| * Dependencies: none | ||
@@ -14,0 +14,0 @@ * Global values: `PhotoSwipe`, `PhotoSwipeUI_Default` |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
35576
-0.17%838
-0.12%