yet-another-react-lightbox
Advanced tools
Comparing version 1.1.2 to 1.2.0
import { Augmentation, Component, Module, Node, Plugin } from "../types.js"; | ||
export declare const createModule: (name: string, component: Component) => Module; | ||
export declare const createNode: (module: Module, children?: Node[] | undefined) => Node; | ||
export declare const withPlugins: (root: Node[], plugins?: Plugin[] | undefined) => { | ||
export declare const createNode: (module: Module, children?: Node[]) => Node; | ||
export declare const withPlugins: (root: Node[], plugins?: Plugin[]) => { | ||
config: Node[]; | ||
augmentation: Augmentation; | ||
}; |
@@ -7,3 +7,3 @@ import * as React from "react"; | ||
export declare type SupportedEventType = PointerEventType | TouchEventType | KeyboardEventType | WheelEventType; | ||
export declare type ReactEventType<T, K extends SupportedEventType> = K extends TouchEventType ? React.TouchEvent<T> : K extends KeyboardEventType ? React.KeyboardEvent<T> : K extends WheelEventType ? React.WheelEvent<T> : K extends PointerEventType ? React.PointerEvent<T> : never; | ||
export declare type ReactEventType<T, K> = K extends TouchEventType ? React.TouchEvent<T> : K extends KeyboardEventType ? React.KeyboardEvent<T> : K extends WheelEventType ? React.WheelEvent<T> : K extends PointerEventType ? React.PointerEvent<T> : never; | ||
export declare type EventCallback<T, P extends React.PointerEvent<T> | React.TouchEvent<T> | React.KeyboardEvent<T> | React.WheelEvent<T>> = (event: P) => void; | ||
@@ -10,0 +10,0 @@ export declare type SubscribeSensors<T> = <ET extends SupportedEventType>(type: ET, callback: EventCallback<T, ReactEventType<T, ET>>) => () => void; |
@@ -25,7 +25,6 @@ import * as React from "react"; | ||
subscribeSensors: (type, callback) => { | ||
var _a; | ||
if (!subscribers[type]) { | ||
subscribers[type] = []; | ||
} | ||
(_a = subscribers[type]) === null || _a === void 0 ? void 0 : _a.push(callback); | ||
subscribers[type].push(callback); | ||
return () => { | ||
@@ -32,0 +31,0 @@ const listeners = subscribers[type]; |
@@ -13,2 +13,3 @@ import * as React from "react"; | ||
}, | ||
inline: { style: { width: "100%", height: "100%" } }, | ||
...restProps, | ||
@@ -15,0 +16,0 @@ })); |
{ | ||
"name": "yet-another-react-lightbox", | ||
"version": "1.1.2", | ||
"version": "1.2.0", | ||
"description": "Modern lightbox component for React", | ||
@@ -8,10 +8,12 @@ "author": "Igor Danchenko", | ||
"type": "module", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"exports": { | ||
".": "./dist/index.js", | ||
"./styles.css": "./dist/styles.css", | ||
"./core": "./dist/core/index.js", | ||
"./plugins": "./dist/plugins/index.js" | ||
"./plugins": "./dist/plugins/index.js", | ||
"./plugins/fullscreen": "./dist/plugins/Fullscreen.js", | ||
"./plugins/inline": "./dist/plugins/Inline.js", | ||
"./plugins/video": "./dist/plugins/Video.js", | ||
"./styles.css": "./dist/styles.css" | ||
}, | ||
"types": "dist/index.d.ts", | ||
"typesVersions": { | ||
@@ -27,2 +29,11 @@ "*": { | ||
"dist/plugins/index.d.ts" | ||
], | ||
"plugins/fullscreen": [ | ||
"dist/plugins/Fullscreen.d.ts" | ||
], | ||
"plugins/inline": [ | ||
"dist/plugins/Inline.d.ts" | ||
], | ||
"plugins/video": [ | ||
"dist/plugins/Video.d.ts" | ||
] | ||
@@ -65,3 +76,3 @@ } | ||
"devDependencies": { | ||
"@commitlint/cli": "^17.0.0", | ||
"@commitlint/cli": "^17.0.1", | ||
"@commitlint/config-conventional": "^17.0.0", | ||
@@ -75,7 +86,7 @@ "@semantic-release/changelog": "^6.0.1", | ||
"@types/react": "^18.0.9", | ||
"@types/react-dom": "^18.0.4", | ||
"@typescript-eslint/eslint-plugin": "^5.25.0", | ||
"@typescript-eslint/parser": "^5.25.0", | ||
"@types/react-dom": "^18.0.5", | ||
"@typescript-eslint/eslint-plugin": "^5.26.0", | ||
"@typescript-eslint/parser": "^5.26.0", | ||
"autoprefixer": "^10.4.7", | ||
"eslint": "^8.15.0", | ||
"eslint": "^8.16.0", | ||
"eslint-config-airbnb": "^19.0.4", | ||
@@ -92,3 +103,3 @@ "eslint-config-airbnb-typescript": "^17.0.0", | ||
"jest-environment-jsdom": "^28.1.0", | ||
"lint-staged": "^12.4.1", | ||
"lint-staged": "^12.4.2", | ||
"npm-run-all": "^4.1.5", | ||
@@ -101,5 +112,5 @@ "postcss": "^8.4.14", | ||
"rimraf": "^3.0.2", | ||
"sass": "^1.52.0", | ||
"ts-jest": "^28.0.2", | ||
"typescript": "^4.6.4" | ||
"sass": "^1.52.1", | ||
"ts-jest": "^28.0.3", | ||
"typescript": "^4.7.2" | ||
}, | ||
@@ -106,0 +117,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
77144