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  
     | 
| 
       2 
     | 
    
         
            -
            import {  
     | 
| 
       3 
     | 
    
         
            -
            const  
     | 
| 
       4 
     | 
    
         
            -
              ( 
     | 
| 
      
 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:  
     | 
| 
       8 
     | 
    
         
            -
                  className:  
     | 
| 
      
 7 
     | 
    
         
            +
                  alt: l = "image",
         
     | 
| 
      
 8 
     | 
    
         
            +
                  className: n,
         
     | 
| 
       9 
9 
     | 
    
         
             
                  isDownloadingImage: e = !1,
         
     | 
| 
       10 
10 
     | 
    
         
             
                  loadImage: r,
         
     | 
| 
       11 
     | 
    
         
            -
                  ... 
     | 
| 
       12 
     | 
    
         
            -
                } =  
     | 
| 
       13 
     | 
    
         
            -
                return  
     | 
| 
       14 
     | 
    
         
            -
                  o && !e &&  
     | 
| 
       15 
     | 
    
         
            -
                }, [o, e]),  
     | 
| 
       16 
     | 
    
         
            -
                  e && r && r().then(( 
     | 
| 
       17 
     | 
    
         
            -
                     
     | 
| 
      
 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 
     | 
| 
      
 21 
     | 
    
         
            +
                }, [e, r]), t ? /* @__PURE__ */ g(
         
     | 
| 
       22 
22 
     | 
    
         
             
                  "img",
         
     | 
| 
       23 
23 
     | 
    
         
             
                  {
         
     | 
| 
       24 
     | 
    
         
            -
                    ref:  
     | 
| 
       25 
     | 
    
         
            -
                    src:  
     | 
| 
       26 
     | 
    
         
            -
                    alt:  
     | 
| 
       27 
     | 
    
         
            -
                    className:  
     | 
| 
       28 
     | 
    
         
            -
                    ... 
     | 
| 
      
 24 
     | 
    
         
            +
                    ref: m,
         
     | 
| 
      
 25 
     | 
    
         
            +
                    src: t,
         
     | 
| 
      
 26 
     | 
    
         
            +
                    alt: l,
         
     | 
| 
      
 27 
     | 
    
         
            +
                    className: n,
         
     | 
| 
      
 28 
     | 
    
         
            +
                    ...c
         
     | 
| 
       29 
29 
     | 
    
         
             
                  }
         
     | 
| 
       30 
     | 
    
         
            -
                );
         
     | 
| 
       31 
     | 
    
         
            -
              }
         
     | 
| 
      
 30 
     | 
    
         
            +
                ) : null;
         
     | 
| 
      
 31 
     | 
    
         
            +
              })
         
     | 
| 
       32 
32 
     | 
    
         
             
            );
         
     | 
| 
       33 
     | 
    
         
            -
             
     | 
| 
      
 33 
     | 
    
         
            +
            u.displayName = "ListPhoto";
         
     | 
| 
       34 
34 
     | 
    
         
             
            export {
         
     | 
| 
       35 
     | 
    
         
            -
               
     | 
| 
      
 35 
     | 
    
         
            +
              u as ListPhoto
         
     | 
| 
       36 
36 
     | 
    
         
             
            };
         
     |