@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 * as React from "react";
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 React.Component<P> {
9
+ export declare class Image<P extends IImageOptions> extends Component<P> {
10
10
  static isShowDiagnostic: boolean;
11
11
  static controlPoints: number[];
12
12
  /**
@@ -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 * as React from "react";
15
+ import { Component } from "react";
14
16
  import { getFormatFeatures } from "../helpers/get-format-features.js";
15
- export class Image extends React.Component {
17
+ export class Image extends Component {
16
18
  constructor(props) {
17
19
  super(props);
18
20
  this.resultUrl = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mts-pjsc/image-optimize",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "React component for image optimizer",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",