@m4l/graphics 7.0.5 → 7.0.7
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,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook para obtener el valor del userAgent
|
|
3
|
+
*/
|
|
4
|
+
export declare const useUserAgent: () => string;
|
|
1
5
|
/**
|
|
2
6
|
* Hook to check if the device is a mobile device
|
|
3
7
|
* @author Juan Escobar - automatic
|
|
@@ -5,4 +9,7 @@
|
|
|
5
9
|
* @updatedAt 2024-10-08 19:28:36 - automatic
|
|
6
10
|
* @updatedUser Juan Escobar - automatic
|
|
7
11
|
*/
|
|
12
|
+
/**
|
|
13
|
+
* Hook de verificación de dispositivo móvil
|
|
14
|
+
*/
|
|
8
15
|
export declare const useIsMobile: (isMobileForced?: boolean) => boolean;
|
|
@@ -1,24 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
);
|
|
17
|
-
return window.addEventListener("resize", e), e(), () => {
|
|
18
|
-
window.removeEventListener("resize", e), e.cancel();
|
|
19
|
-
};
|
|
20
|
-
}, [t]), r;
|
|
1
|
+
import { useSyncExternalStore as r } from "react";
|
|
2
|
+
const t = () => navigator.userAgent, s = (e) => {
|
|
3
|
+
const n = () => e(navigator.userAgent);
|
|
4
|
+
return window.addEventListener("userAgentChange", n), () => window.removeEventListener("userAgentChange", n);
|
|
5
|
+
}, o = () => r(
|
|
6
|
+
s,
|
|
7
|
+
// Función de suscripción
|
|
8
|
+
t,
|
|
9
|
+
// Función para obtener el estado actual
|
|
10
|
+
t
|
|
11
|
+
// (Opcional) Función para obtener el valor en SSR
|
|
12
|
+
), i = (e) => typeof e > "u" ? !1 : /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e), c = (e) => {
|
|
13
|
+
const n = o();
|
|
14
|
+
return e || i(n);
|
|
21
15
|
};
|
|
22
16
|
export {
|
|
23
|
-
|
|
17
|
+
c as u
|
|
24
18
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/graphics",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.7",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"author": "M4L Team*",
|
|
6
6
|
"type": "module",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"@m4l/core": "^2.0.12",
|
|
21
|
-
"@m4l/styles": "^7.
|
|
21
|
+
"@m4l/styles": "^7.1.18",
|
|
22
22
|
"@mui/material": "5.16.7",
|
|
23
23
|
"@mui/x-date-pickers": "6.20.2",
|
|
24
24
|
"@types/react": "^18.0.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"*"
|
|
53
53
|
],
|
|
54
54
|
"source": "./index.js",
|
|
55
|
-
"main": "
|
|
55
|
+
"main": "src/index.ts",
|
|
56
56
|
"module": "./index.js",
|
|
57
57
|
"types": "./index.d.ts",
|
|
58
58
|
"sideEffects": false,
|
|
@@ -60,5 +60,10 @@
|
|
|
60
60
|
"node": ">=12.0.0"
|
|
61
61
|
},
|
|
62
62
|
"packageManager": "yarn@4.5.0",
|
|
63
|
-
"private": false
|
|
63
|
+
"private": false,
|
|
64
|
+
"exports": {
|
|
65
|
+
".": {
|
|
66
|
+
"import": "./index.js"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
64
69
|
}
|