@docusaurus/plugin-ideal-image 3.6.3 → 3.7.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.
@@ -4,5 +4,6 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
+ import { type ReactNode } from 'react';
7
8
  import type { Props } from '@theme/IdealImage';
8
- export default function IdealImage(props: Props): JSX.Element;
9
+ export default function IdealImage(props: Props): ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/plugin-ideal-image",
3
- "version": "3.6.3",
3
+ "version": "3.7.0",
4
4
  "description": "Docusaurus Plugin to generate an almost ideal image (responsive, lazy-loading, and low quality placeholder).",
5
5
  "main": "lib/index.js",
6
6
  "types": "src/plugin-ideal-image.d.ts",
@@ -20,26 +20,26 @@
20
20
  },
21
21
  "license": "MIT",
22
22
  "dependencies": {
23
- "@docusaurus/core": "3.6.3",
24
- "@docusaurus/lqip-loader": "3.6.3",
23
+ "@docusaurus/core": "3.7.0",
24
+ "@docusaurus/lqip-loader": "3.7.0",
25
25
  "@docusaurus/responsive-loader": "^1.7.0",
26
- "@docusaurus/theme-translations": "3.6.3",
27
- "@docusaurus/types": "3.6.3",
28
- "@docusaurus/utils-validation": "3.6.3",
29
- "@slorber/react-ideal-image": "^0.0.12",
26
+ "@docusaurus/theme-translations": "3.7.0",
27
+ "@docusaurus/types": "3.7.0",
28
+ "@docusaurus/utils-validation": "3.7.0",
29
+ "@slorber/react-ideal-image": "^0.0.14",
30
30
  "react-waypoint": "^10.3.0",
31
31
  "sharp": "^0.32.3",
32
32
  "tslib": "^2.6.0",
33
33
  "webpack": "^5.88.1"
34
34
  },
35
35
  "devDependencies": {
36
- "@docusaurus/module-type-aliases": "3.6.3",
36
+ "@docusaurus/module-type-aliases": "3.7.0",
37
37
  "fs-extra": "^11.1.0"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "jimp": "*",
41
- "react": "^18.0.0",
42
- "react-dom": "^18.0.0"
41
+ "react": "^18.0.0 || ^19.0.0",
42
+ "react-dom": "^18.0.0 || ^19.0.0"
43
43
  },
44
44
  "peerDependenciesMeta": {
45
45
  "jimp": {
@@ -49,5 +49,5 @@
49
49
  "engines": {
50
50
  "node": ">=18.0"
51
51
  },
52
- "gitHead": "9c0e19c669ffcbc0972bfd8527e8b93f1f74e7d8"
52
+ "gitHead": "dd59750c16fe6908a26f18806a54d4c3dbe6db43"
53
53
  }
package/src/deps.d.ts CHANGED
@@ -13,7 +13,12 @@
13
13
  * full state object.
14
14
  */
15
15
  declare module '@slorber/react-ideal-image' {
16
- import type {ComponentProps, ComponentType, CSSProperties} from 'react';
16
+ import type {
17
+ ComponentProps,
18
+ ComponentType,
19
+ CSSProperties,
20
+ ReactNode,
21
+ } from 'react';
17
22
 
18
23
  export type LoadingState = 'initial' | 'loading' | 'loaded' | 'error';
19
24
 
@@ -115,5 +120,5 @@ declare module '@slorber/react-ideal-image' {
115
120
  width: number;
116
121
  }
117
122
 
118
- export default function IdealImage(props: ImageProps): JSX.Element;
123
+ export default function IdealImage(props: ImageProps): ReactNode;
119
124
  }
@@ -52,7 +52,7 @@ declare module '@docusaurus/plugin-ideal-image' {
52
52
  }
53
53
 
54
54
  declare module '@theme/IdealImage' {
55
- import type {ComponentProps} from 'react';
55
+ import type {ComponentProps, ReactNode} from 'react';
56
56
 
57
57
  export type SrcType = {
58
58
  width: number;
@@ -72,5 +72,5 @@ declare module '@theme/IdealImage' {
72
72
  export interface Props extends ComponentProps<'img'> {
73
73
  readonly img: {default: string} | {src: SrcImage; preSrc: string} | string;
74
74
  }
75
- export default function IdealImage(props: Props): JSX.Element;
75
+ export default function IdealImage(props: Props): ReactNode;
76
76
  }
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import React from 'react';
8
+ import React, {type ReactNode} from 'react';
9
9
  import ReactIdealImage, {
10
10
  type IconKey,
11
11
  type State,
@@ -80,7 +80,7 @@ function getMessage(icon: IconKey, state: State) {
80
80
  }
81
81
  }
82
82
 
83
- export default function IdealImage(props: Props): JSX.Element {
83
+ export default function IdealImage(props: Props): ReactNode {
84
84
  const {img, ...propsRest} = props;
85
85
 
86
86
  // In dev env just use regular img with original file