mimir-ui-kit 1.48.0 → 1.48.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.
@@ -26,4 +26,4 @@ export type TListPhoto = ComponentProps<'img'> & {
26
26
  /**
27
27
  * Компонент для отображения изображения с возможностью загрузки через callback
28
28
  */
29
- export declare const ListPhoto: import('react').ForwardRefExoticComponent<Omit<TListPhoto, "ref"> & import('react').RefAttributes<HTMLImageElement>>;
29
+ export declare const ListPhoto: import('react').MemoExoticComponent<import('react').ForwardRefExoticComponent<Omit<TListPhoto, "ref"> & import('react').RefAttributes<HTMLImageElement>>>;
@@ -1,36 +1,36 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import { forwardRef as d, useState as h, useEffect as a } from "react";
3
- const p = d(
4
- (s, i) => {
1
+ import { jsx as g } from "react/jsx-runtime";
2
+ import { memo as d, forwardRef as h, useState as p, useEffect as s } from "react";
3
+ const u = d(
4
+ h((i, m) => {
5
5
  const {
6
6
  src: o,
7
- alt: m = "image",
8
- className: c,
7
+ alt: l = "image",
8
+ className: n,
9
9
  isDownloadingImage: e = !1,
10
10
  loadImage: r,
11
- ...l
12
- } = s, [f, t] = h(o);
13
- return a(() => {
14
- o && !e && t(o);
15
- }, [o, e]), a(() => {
16
- e && r && r().then((g) => {
17
- t(g);
11
+ ...c
12
+ } = i, [t, a] = p(o);
13
+ return s(() => {
14
+ o && !e && a(o);
15
+ }, [o, e]), s(() => {
16
+ e && r && r().then((f) => {
17
+ a(f);
18
18
  }).catch(() => {
19
19
  console.error("Error loading image");
20
20
  });
21
- }, [e, r, o]), /* @__PURE__ */ n(
21
+ }, [e, r]), t ? /* @__PURE__ */ g(
22
22
  "img",
23
23
  {
24
- ref: i,
25
- src: f,
26
- alt: m,
27
- className: c,
28
- ...l
24
+ ref: m,
25
+ src: t,
26
+ alt: l,
27
+ className: n,
28
+ ...c
29
29
  }
30
- );
31
- }
30
+ ) : null;
31
+ })
32
32
  );
33
- p.displayName = "ListPhoto";
33
+ u.displayName = "ListPhoto";
34
34
  export {
35
- p as ListPhoto
35
+ u as ListPhoto
36
36
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mimir-ui-kit",
3
3
  "private": false,
4
- "version": "1.48.0",
4
+ "version": "1.48.1",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {