yet-another-react-lightbox 1.2.3 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -8,11 +8,9 @@ Modern lightbox component for React.
8
8
  [![Bundle Size](https://img.shields.io/bundlephobia/minzip/yet-another-react-lightbox?color=blue)](https://bundlephobia.com/package/yet-another-react-lightbox)
9
9
  [![License MIT](https://img.shields.io/npm/l/yet-another-react-lightbox?color=blue)](LICENSE)
10
10
 
11
- Coming soon...
12
-
13
11
  ## Documentation
14
12
 
15
- Coming soon...
13
+ [https://yet-another-react-lightbox.vercel.app/](https://yet-another-react-lightbox.vercel.app/)
16
14
 
17
15
  ## Installation
18
16
 
@@ -30,10 +28,10 @@ yarn add yet-another-react-lightbox
30
28
 
31
29
  ```javascript
32
30
  import * as React from "react";
33
- import { Lightbox } from "yet-another-react-lightbox";
31
+ import Lightbox from "yet-another-react-lightbox";
34
32
  import "yet-another-react-lightbox/styles.css";
35
33
 
36
- const Page = () => {
34
+ const App = () => {
37
35
  const [open, setOpen] = React.useState(false);
38
36
 
39
37
  return (
@@ -55,7 +53,7 @@ const Page = () => {
55
53
  );
56
54
  };
57
55
 
58
- export default Page;
56
+ export default App;
59
57
  ```
60
58
 
61
59
  ## License
@@ -1,9 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { LightboxProps } from "./types.js";
3
- declare type MakePartial<T> = T extends object ? Partial<T> : T;
4
- declare type NestedPartial<T extends object> = {
5
- [P in keyof T]?: MakePartial<T[P]>;
3
+ declare type DeepPartial<T, K extends keyof T> = Omit<T, K> & {
4
+ [P in keyof Pick<T, K>]?: Partial<Pick<T, K>[P]>;
6
5
  };
7
- declare type NestedOptional<T, K extends keyof T> = Omit<T, K> & NestedPartial<Pick<T, K>>;
8
- export declare const Lightbox: (props: NestedOptional<Partial<LightboxProps>, "carousel" | "animation" | "render" | "toolbar" | "on">) => JSX.Element;
6
+ export declare const Lightbox: (props: DeepPartial<Partial<LightboxProps>, "carousel" | "animation" | "render" | "toolbar" | "on">) => JSX.Element;
9
7
  export {};
package/dist/index.d.ts CHANGED
@@ -1,2 +1,4 @@
1
+ import { Lightbox } from "./Lightbox.js";
1
2
  export * from "./types.js";
2
3
  export * from "./Lightbox.js";
4
+ export default Lightbox;
package/dist/index.js CHANGED
@@ -1,2 +1,4 @@
1
+ import { Lightbox } from "./Lightbox.js";
1
2
  export * from "./types.js";
2
3
  export * from "./Lightbox.js";
4
+ export default Lightbox;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "yet-another-react-lightbox",
3
- "version": "1.2.3",
4
- "description": "Modern lightbox component for React",
3
+ "version": "1.3.0",
4
+ "description": "Modern React lightbox component",
5
5
  "author": "Igor Danchenko",
6
6
  "license": "MIT",
7
7
  "type": "module",
@@ -82,8 +82,8 @@
82
82
  "@types/jest": "^27.5.1",
83
83
  "@types/react": "^18.0.9",
84
84
  "@types/react-dom": "^18.0.5",
85
- "@typescript-eslint/eslint-plugin": "^5.26.0",
86
- "@typescript-eslint/parser": "^5.26.0",
85
+ "@typescript-eslint/eslint-plugin": "^5.27.0",
86
+ "@typescript-eslint/parser": "^5.27.0",
87
87
  "autoprefixer": "^10.4.7",
88
88
  "eslint": "^8.16.0",
89
89
  "eslint-config-airbnb": "^19.0.4",
@@ -97,7 +97,7 @@
97
97
  "husky": "^8.0.1",
98
98
  "jest": "^28.1.0",
99
99
  "jest-environment-jsdom": "^28.1.0",
100
- "lint-staged": "^12.4.2",
100
+ "lint-staged": "^12.4.3",
101
101
  "npm-run-all": "^4.1.5",
102
102
  "postcss": "^8.4.14",
103
103
  "postcss-cli": "^9.1.0",