@m4l/graphics 0.1.52 → 0.1.54
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/components/GlobalStyle/{index.fff91e86.js → index.94f31f63.js} +4 -3
- package/contexts/{index.921576cc.js → index.2d1e9989.js} +1 -1
- package/hooks/{index.66afb19b.js → index.2e0ca338.js} +10 -9
- package/hooks/index.d.ts +1 -0
- package/hooks/useIsMobile/index.c710a8a7.js +16 -0
- package/hooks/useIsMobile/index.d.ts +1 -0
- package/hooks/useResponsive/{index.c9515afc.js → index.70446acb.js} +2 -2
- package/index.js +21 -19
- package/node_modules.9690bbee.js +4558 -0
- package/package.json +8 -3
- package/node_modules.dbab0abd.js +0 -4438
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { useTheme as o } from "@mui/material/styles";
|
|
2
|
-
import { GlobalStyles as
|
|
2
|
+
import { GlobalStyles as e } from "@mui/material";
|
|
3
3
|
import { globalRemSize as t } from "@m4l/styles";
|
|
4
|
-
import { jsx as
|
|
4
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
5
5
|
function s() {
|
|
6
6
|
const r = o();
|
|
7
|
-
return /* @__PURE__ */ e
|
|
7
|
+
return /* @__PURE__ */ a(e, {
|
|
8
8
|
styles: {
|
|
9
9
|
body: {
|
|
10
10
|
backgroundColor: `${r.palette.background.background}!important`,
|
|
11
|
+
textRendering: "geometricPrecision",
|
|
11
12
|
"*::-webkit-scrollbar": {
|
|
12
13
|
width: "7px",
|
|
13
14
|
height: "7px",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./FormatterContext/index.92336f4c.js";
|
|
2
2
|
import "./LocalesContext/index.53f0b702.js";
|
|
3
3
|
import { createContext as d, useRef as p, useMemo as v, useLayoutEffect as f } from "react";
|
|
4
|
-
import { c as u, d as R, i as g, l as h } from "../node_modules.
|
|
4
|
+
import { c as u, d as R, i as g, l as h } from "../node_modules.9690bbee.js";
|
|
5
5
|
import { jsx as x } from "react/jsx-runtime";
|
|
6
6
|
import "date-fns/locale/en-US";
|
|
7
7
|
import "./HostThemeContext/index.4291ba89.js";
|
|
@@ -2,9 +2,10 @@ import { useRef as r, useEffect as n, useState as f, useContext as i, useLayoutE
|
|
|
2
2
|
import { H as m } from "../contexts/HostThemeContext/index.4291ba89.js";
|
|
3
3
|
import "../contexts/FormatterContext/index.92336f4c.js";
|
|
4
4
|
import "../contexts/LocalesContext/index.53f0b702.js";
|
|
5
|
-
import "../contexts/index.
|
|
5
|
+
import "../contexts/index.2d1e9989.js";
|
|
6
|
+
import "../node_modules.9690bbee.js";
|
|
6
7
|
import "@m4l/styles";
|
|
7
|
-
function
|
|
8
|
+
function h() {
|
|
8
9
|
const e = r(!0);
|
|
9
10
|
return n(
|
|
10
11
|
() => () => {
|
|
@@ -13,7 +14,7 @@ function b() {
|
|
|
13
14
|
[]
|
|
14
15
|
), e;
|
|
15
16
|
}
|
|
16
|
-
function
|
|
17
|
+
function v(e) {
|
|
17
18
|
const [o, t] = f(!1), s = e || 100;
|
|
18
19
|
return n(() => (window.onscroll = () => {
|
|
19
20
|
window.pageYOffset > s ? t(!0) : t(!1);
|
|
@@ -21,13 +22,13 @@ function h(e) {
|
|
|
21
22
|
window.onscroll = null;
|
|
22
23
|
}), [s]), o;
|
|
23
24
|
}
|
|
24
|
-
const
|
|
25
|
+
const x = () => {
|
|
25
26
|
const e = i(m);
|
|
26
27
|
if (!e)
|
|
27
28
|
throw new Error("useHostTheme context must be use inside HostThemeProvider");
|
|
28
29
|
return e;
|
|
29
30
|
};
|
|
30
|
-
function
|
|
31
|
+
function H(e) {
|
|
31
32
|
const o = r(null);
|
|
32
33
|
return c(() => {
|
|
33
34
|
const t = o?.current;
|
|
@@ -42,8 +43,8 @@ function x(e) {
|
|
|
42
43
|
}, [e, o.current]), o;
|
|
43
44
|
}
|
|
44
45
|
export {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
v as a,
|
|
47
|
+
x as b,
|
|
48
|
+
H as c,
|
|
49
|
+
h as u
|
|
49
50
|
};
|
package/hooks/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export { useFormatter } from './useFormatter';
|
|
|
3
3
|
export { useIsMountedRef } from './useIsMountedRef';
|
|
4
4
|
export { useLocales } from './useLocales';
|
|
5
5
|
export { useResponsiveContainerStore } from './useResponsiveContainer';
|
|
6
|
+
export { useIsMobile } from './useIsMobile';
|
|
6
7
|
export { useOffSetTop } from './useOffSetTop';
|
|
7
8
|
export { useHostTheme } from './useHostTheme';
|
|
8
9
|
export { useResizeObserver } from './useResizeObserver';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useState as n, useEffect as o } from "react";
|
|
2
|
+
import { t as s } from "../../node_modules.9690bbee.js";
|
|
3
|
+
const t = () => typeof navigator > "u" ? !1 : /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), l = () => {
|
|
4
|
+
const [i, r] = n(t());
|
|
5
|
+
return o(() => {
|
|
6
|
+
const e = s(() => {
|
|
7
|
+
r(t());
|
|
8
|
+
}, 200);
|
|
9
|
+
return window.addEventListener("resize", e), e(), () => {
|
|
10
|
+
window.removeEventListener("resize", e), e.cancel();
|
|
11
|
+
};
|
|
12
|
+
}, []), i;
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
l as u
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useIsMobile: () => boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useContext as t } from "react";
|
|
2
|
-
import { u as r } from "../../node_modules.
|
|
3
|
-
import { R as n } from "../../contexts/index.
|
|
2
|
+
import { u as r } from "../../node_modules.9690bbee.js";
|
|
3
|
+
import { R as n } from "../../contexts/index.2d1e9989.js";
|
|
4
4
|
import { useResponsive as i } from "@m4l/styles";
|
|
5
5
|
function f(e, s) {
|
|
6
6
|
const o = t(n);
|
package/index.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { G as l } from "./components/GlobalStyle/index.
|
|
1
|
+
import { G as l } from "./components/GlobalStyle/index.94f31f63.js";
|
|
2
2
|
import { F as C, a as R } from "./contexts/FormatterContext/index.92336f4c.js";
|
|
3
3
|
import { L as c, a as F, g as L } from "./contexts/LocalesContext/index.53f0b702.js";
|
|
4
|
-
import { R as
|
|
5
|
-
import { H
|
|
4
|
+
import { R as b, a as g } from "./contexts/index.2d1e9989.js";
|
|
5
|
+
import { H, a as T } from "./contexts/HostThemeContext/index.4291ba89.js";
|
|
6
6
|
import { u as k } from "./hooks/useFirstRender/index.1e9b02fb.js";
|
|
7
7
|
import { u as z } from "./hooks/useFormatter/index.57ac8cca.js";
|
|
8
|
-
import { b as
|
|
9
|
-
import { u as
|
|
10
|
-
import { u as N, a as W } from "./hooks/useResponsive/index.
|
|
11
|
-
import {
|
|
8
|
+
import { b as I, u as M, a as O, c as y } from "./hooks/index.2e0ca338.js";
|
|
9
|
+
import { u as D } from "./hooks/useLocales/index.d5a80aff.js";
|
|
10
|
+
import { u as N, a as W } from "./hooks/useResponsive/index.70446acb.js";
|
|
11
|
+
import { u as q } from "./hooks/useIsMobile/index.c710a8a7.js";
|
|
12
|
+
import { C as J, g as K } from "./utils/index.6909c662.js";
|
|
12
13
|
import "@mui/material/styles";
|
|
13
14
|
import "@mui/material";
|
|
14
15
|
import "@m4l/styles";
|
|
@@ -18,28 +19,29 @@ import "@m4l/core";
|
|
|
18
19
|
import "@mui/x-date-pickers/AdapterDateFns";
|
|
19
20
|
import "@mui/x-date-pickers";
|
|
20
21
|
import "date-fns/locale/en-US";
|
|
21
|
-
import "./node_modules.
|
|
22
|
+
import "./node_modules.9690bbee.js";
|
|
22
23
|
import "./commonjs.e3daa2e5.js";
|
|
23
24
|
export {
|
|
24
|
-
|
|
25
|
+
J as Capitalize,
|
|
25
26
|
C as FormatterContext,
|
|
26
27
|
R as FormatterProvider,
|
|
27
28
|
l as GlobalStyles,
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
H as HostThemeContext,
|
|
30
|
+
T as HostThemeProvider,
|
|
30
31
|
c as LocalesContext,
|
|
31
32
|
F as LocalesProvider,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
b as ResponsiveContainerContext,
|
|
34
|
+
g as ResponsiveContainerProvider,
|
|
35
|
+
K as getAnchorElPositionWindow,
|
|
35
36
|
L as getLocaleFromNetwork,
|
|
36
37
|
k as useFirstRender,
|
|
37
38
|
z as useFormatter,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
I as useHostTheme,
|
|
40
|
+
q as useIsMobile,
|
|
41
|
+
M as useIsMountedRef,
|
|
42
|
+
D as useLocales,
|
|
43
|
+
O as useOffSetTop,
|
|
44
|
+
y as useResizeObserver,
|
|
43
45
|
N as useResponsiveContainerStore,
|
|
44
46
|
W as useResponsiveDesktop
|
|
45
47
|
};
|