@mts-pjsc/image-optimize 1.2.0 → 1.2.1
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Component } from "react";
|
|
2
2
|
export interface IImageOptions extends React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement> {
|
|
3
3
|
src: string;
|
|
4
4
|
alt: string;
|
|
@@ -6,7 +6,7 @@ export interface IImageOptions extends React.DetailedHTMLProps<React.ImgHTMLAttr
|
|
|
6
6
|
quality?: number;
|
|
7
7
|
setRef?: (elem: HTMLImageElement | null) => void;
|
|
8
8
|
}
|
|
9
|
-
export declare class Image<P extends IImageOptions> extends
|
|
9
|
+
export declare class Image<P extends IImageOptions> extends Component<P> {
|
|
10
10
|
static isShowDiagnostic: boolean;
|
|
11
11
|
static controlPoints: number[];
|
|
12
12
|
/**
|
package/dist/components/Image.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// For Next.js 13 and react 18. Switch component for support server components later.
|
|
2
|
+
"use client";
|
|
1
3
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
4
|
var t = {};
|
|
3
5
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -10,9 +12,9 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
12
|
return t;
|
|
11
13
|
};
|
|
12
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import
|
|
15
|
+
import { Component } from "react";
|
|
14
16
|
import { getFormatFeatures } from "../helpers/get-format-features.js";
|
|
15
|
-
export class Image extends
|
|
17
|
+
export class Image extends Component {
|
|
16
18
|
constructor(props) {
|
|
17
19
|
super(props);
|
|
18
20
|
this.resultUrl = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";
|