@zydon/common 2.1.9 → 2.1.10
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.
- package/dist/chunk-2WHCF74H.js +7 -0
- package/dist/{chunk-SDIPSDXD.js → chunk-J5J6L6A4.js} +1 -1
- package/dist/components/form/UploadAvatarWithCrop/index.js +2 -2
- package/dist/components/form/UploadWithCrop/index.js +1 -1
- package/dist/components/upload/index.js +2 -2
- package/dist/hooks/useUploadImage.js +1 -1
- package/dist/theme/styles/index.d.ts +1 -1
- package/package.json +2 -1
- package/dist/chunk-QZZWTR7W.js +0 -6
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { a } from './chunk-W3MYAMTH.js';
|
|
2
|
+
import { useId, useState } from 'react';
|
|
3
|
+
import C from 'browser-image-compression';
|
|
4
|
+
|
|
5
|
+
var w=5242880,I=({onFileCropped:n,onImageUploaded:c,onCancel:i})=>{let g=useId(),[e,m]=useState(),[l,o,a$1]=a(),[f,t]=useState();return {id:g,setCropModalOpen:a$1,handleRemove:()=>{n(void 0),c(void 0),a$1(!1);},toggleCropModalOpen:o,cropModalOpen:l,cancelChanges:()=>{i&&i(),a$1(!1);},saveChanges:()=>{e!==void 0&&e.getCroppedCanvas().toBlob(async r=>{if(!r)return;let s=new File([r],"imagem");if(s.size>w){let u=await C(s,{maxSizeMB:5});n(u),o();return}n(s),o();},"image/png",1);},previewImage:()=>{e!==void 0&&t(e.getCroppedCanvas().toDataURL());},setCropper:m,preview:f,closePreviewImage:()=>t(void 0)}},U=I;
|
|
6
|
+
|
|
7
|
+
export { U as a };
|
|
@@ -2,7 +2,7 @@ import { c, f } from './chunk-FYJCXJN6.js';
|
|
|
2
2
|
import { a as a$2 } from './chunk-UXRJ6YK5.js';
|
|
3
3
|
import { a } from './chunk-W3IZQQL6.js';
|
|
4
4
|
import { i } from './chunk-D27ND54J.js';
|
|
5
|
-
import { a as a$1 } from './chunk-
|
|
5
|
+
import { a as a$1 } from './chunk-2WHCF74H.js';
|
|
6
6
|
import { useState, useEffect } from 'react';
|
|
7
7
|
import { useDropzone } from 'react-dropzone';
|
|
8
8
|
import P from '@mui/material/Box';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b } from '../../../chunk-
|
|
1
|
+
import { b } from '../../../chunk-J5J6L6A4.js';
|
|
2
2
|
import '../../../chunk-FYJCXJN6.js';
|
|
3
3
|
import '../../../chunk-UXRJ6YK5.js';
|
|
4
4
|
import '../../../chunk-AWHFEAGA.js';
|
|
@@ -8,7 +8,7 @@ import '../../../chunk-W3IZQQL6.js';
|
|
|
8
8
|
import '../../../chunk-B7TRCCLA.js';
|
|
9
9
|
import '../../../chunk-D27ND54J.js';
|
|
10
10
|
import { a } from '../../../chunk-GA4A5P3S.js';
|
|
11
|
-
import '../../../chunk-
|
|
11
|
+
import '../../../chunk-2WHCF74H.js';
|
|
12
12
|
import '../../../chunk-W3MYAMTH.js';
|
|
13
13
|
import { useFormContext, Controller } from 'react-hook-form';
|
|
14
14
|
import W from '@mui/material/FormHelperText';
|
|
@@ -9,7 +9,7 @@ import { a as a$3 } from '../../../chunk-W3IZQQL6.js';
|
|
|
9
9
|
import '../../../chunk-B7TRCCLA.js';
|
|
10
10
|
import '../../../chunk-D27ND54J.js';
|
|
11
11
|
import { a } from '../../../chunk-GA4A5P3S.js';
|
|
12
|
-
import { a as a$1 } from '../../../chunk-
|
|
12
|
+
import { a as a$1 } from '../../../chunk-2WHCF74H.js';
|
|
13
13
|
import '../../../chunk-W3MYAMTH.js';
|
|
14
14
|
import '../../../chunk-2D6XUBFQ.js';
|
|
15
15
|
import '../../../chunk-ILHUUK4X.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a as UploadAvatar, b as UploadAvatarWithCrop, b as UploadWithCrop } from '../../chunk-
|
|
1
|
+
export { a as UploadAvatar, b as UploadAvatarWithCrop, b as UploadWithCrop } from '../../chunk-J5J6L6A4.js';
|
|
2
2
|
export { c as DeleteButton, a as MultiFilePreview, b as SingleFilePreview, d as Upload } from '../../chunk-TXLER7US.js';
|
|
3
3
|
export { c as RejectionFiles } from '../../chunk-FYJCXJN6.js';
|
|
4
4
|
import '../../chunk-UXRJ6YK5.js';
|
|
@@ -8,7 +8,7 @@ import '../../chunk-SKUW6ZCP.js';
|
|
|
8
8
|
import '../../chunk-W3IZQQL6.js';
|
|
9
9
|
import '../../chunk-B7TRCCLA.js';
|
|
10
10
|
import { i } from '../../chunk-D27ND54J.js';
|
|
11
|
-
import '../../chunk-
|
|
11
|
+
import '../../chunk-2WHCF74H.js';
|
|
12
12
|
import '../../chunk-W3MYAMTH.js';
|
|
13
13
|
import '../../chunk-2D6XUBFQ.js';
|
|
14
14
|
import '../../chunk-ILHUUK4X.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { a as default } from '../chunk-
|
|
1
|
+
export { a as default } from '../chunk-2WHCF74H.js';
|
|
2
2
|
import '../chunk-W3MYAMTH.js';
|
|
@@ -443,7 +443,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
443
443
|
wordWrap?: csstype.Property.WordWrap | readonly NonNullable<csstype.Property.WordWrap | undefined>[] | readonly csstype.Property.WordWrap[] | undefined;
|
|
444
444
|
writingMode?: csstype.Property.WritingMode | readonly NonNullable<csstype.Property.WritingMode | undefined>[] | readonly csstype.Property.WritingMode[] | undefined;
|
|
445
445
|
zIndex?: csstype.Property.ZIndex | readonly NonNullable<csstype.Property.ZIndex | undefined>[] | readonly ((string & {}) | csstype.Globals | "auto")[] | undefined;
|
|
446
|
-
zoom?: csstype.Property.Zoom | readonly NonNullable<csstype.Property.Zoom | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal"
|
|
446
|
+
zoom?: csstype.Property.Zoom | readonly NonNullable<csstype.Property.Zoom | undefined>[] | readonly ("reset" | (string & {}) | csstype.Globals | "normal")[] | undefined;
|
|
447
447
|
all?: csstype.Globals | readonly NonNullable<csstype.Globals | undefined>[] | readonly csstype.Globals[] | undefined;
|
|
448
448
|
animation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reverse" | "linear" | "none" | "auto" | "both" | "alternate" | "alternate-reverse" | "backwards" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start")[] | undefined;
|
|
449
449
|
animationRange?: csstype.Property.AnimationRange<string | number> | readonly NonNullable<csstype.Property.AnimationRange<string | number> | undefined>[] | readonly (string | (string & {}))[] | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zydon/common",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.10",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"typescript": "5.3.3"
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
|
+
"browser-image-compression": "^2.0.2",
|
|
90
91
|
"color": "^4.2.3",
|
|
91
92
|
"dayjs": "^1.11.13",
|
|
92
93
|
"embla-carousel": "^8.2.0",
|
package/dist/chunk-QZZWTR7W.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { a } from './chunk-W3MYAMTH.js';
|
|
2
|
-
import { useId, useState } from 'react';
|
|
3
|
-
|
|
4
|
-
var v=({onFileCropped:o,onImageUploaded:p,onCancel:a$1})=>{let g=useId(),[e,c]=useState(),[l,s,n]=a(),[f,t]=useState();return {id:g,setCropModalOpen:n,handleRemove:()=>{o(void 0),p(void 0),n(!1);},toggleCropModalOpen:s,cropModalOpen:l,cancelChanges:()=>{a$1&&a$1(),n(!1);},saveChanges:()=>{e!==void 0&&e.getCroppedCanvas().toBlob(r=>{if(!r)return;let m=new File([r],"imagem");o(m),s();},"image/png",1);},previewImage:()=>{e!==void 0&&t(e.getCroppedCanvas().toDataURL());},setCropper:c,preview:f,closePreviewImage:()=>t(void 0)}},O=v;
|
|
5
|
-
|
|
6
|
-
export { O as a };
|