@m4l/graphics 0.1.42 → 0.1.43
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,13 +1,30 @@
|
|
|
1
|
-
import { useTheme as
|
|
1
|
+
import { useTheme as t } from "@mui/material/styles";
|
|
2
2
|
import { GlobalStyles as a } from "@mui/material";
|
|
3
|
-
import { globalRemSize as
|
|
4
|
-
import { jsx as
|
|
3
|
+
import { globalRemSize as r } from "@m4l/styles";
|
|
4
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
5
5
|
function s() {
|
|
6
|
-
const o =
|
|
7
|
-
return console.log("test spacing formula ", o.spacing(1)), /* @__PURE__ */
|
|
6
|
+
const o = t();
|
|
7
|
+
return console.log("test spacing formula ", o.spacing(1)), /* @__PURE__ */ e(a, {
|
|
8
8
|
styles: {
|
|
9
9
|
body: {
|
|
10
|
-
backgroundColor: `${o.palette.background.background}!important
|
|
10
|
+
backgroundColor: `${o.palette.background.background}!important`,
|
|
11
|
+
"*::-webkit-scrollbar": {
|
|
12
|
+
width: "7px",
|
|
13
|
+
height: "7px",
|
|
14
|
+
borderRadius: "3px",
|
|
15
|
+
backgroundColor: "transparent"
|
|
16
|
+
},
|
|
17
|
+
"*::-webkit-scrollbar-track": {
|
|
18
|
+
backgroundColor: "transparent",
|
|
19
|
+
border: "0px solid transparent"
|
|
20
|
+
},
|
|
21
|
+
"*::-webkit-scrollbar-corner": {
|
|
22
|
+
backgroundColor: "transparent"
|
|
23
|
+
},
|
|
24
|
+
"*::-webkit-scrollbar-thumb": {
|
|
25
|
+
background: o.palette.state.scrollBar,
|
|
26
|
+
borderRadius: "2px!important"
|
|
27
|
+
}
|
|
11
28
|
},
|
|
12
29
|
"#nprogress": {
|
|
13
30
|
pointerEvents: "none",
|
|
@@ -33,9 +50,9 @@ function s() {
|
|
|
33
50
|
}
|
|
34
51
|
},
|
|
35
52
|
"& html": {
|
|
36
|
-
fontSize:
|
|
53
|
+
fontSize: r.desktop,
|
|
37
54
|
[o.breakpoints.down("sm")]: {
|
|
38
|
-
fontSize:
|
|
55
|
+
fontSize: r.mobile
|
|
39
56
|
}
|
|
40
57
|
}
|
|
41
58
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createContext as H, useState as E, useMemo as v, useCallback as M, useEffect as c } from "react";
|
|
2
2
|
import { CssBaseline as C } from "@mui/material";
|
|
3
3
|
import { createTheme as O, StyledEngineProvider as N, ThemeProvider as S } from "@mui/material/styles";
|
|
4
|
-
import { useHostTools as x, EmitEvents as
|
|
4
|
+
import { useHostTools as x, EmitEvents as r } from "@m4l/core";
|
|
5
5
|
import { jsx as n, jsxs as F } from "react/jsx-runtime";
|
|
6
6
|
const I = H(null);
|
|
7
7
|
function b(l) {
|
|
@@ -10,27 +10,31 @@ function b(l) {
|
|
|
10
10
|
hostThemeOptions: t,
|
|
11
11
|
fnComponentsOverrides: i,
|
|
12
12
|
isMicroFrontEnd: s
|
|
13
|
-
} = l, [
|
|
13
|
+
} = l, [o, m] = E(t), {
|
|
14
14
|
events_add_listener: a,
|
|
15
|
-
events_remove_listener:
|
|
16
|
-
events_emit:
|
|
17
|
-
} = x(), [
|
|
18
|
-
const e = O(
|
|
15
|
+
events_remove_listener: u,
|
|
16
|
+
events_emit: _
|
|
17
|
+
} = x(), [f, d] = E(!0), p = v(() => {
|
|
18
|
+
const e = O(o);
|
|
19
19
|
return e.components = i(e), e;
|
|
20
|
-
}, [
|
|
21
|
-
|
|
20
|
+
}, [o]), T = M((e) => {
|
|
21
|
+
setTimeout(() => {
|
|
22
|
+
m(e);
|
|
23
|
+
}, 0);
|
|
22
24
|
}, []);
|
|
23
|
-
return c(() => (s && a(
|
|
24
|
-
s &&
|
|
25
|
+
return c(() => (s && a(r.EMMIT_EVENT_HOST_THEME_CHANGE, T), () => {
|
|
26
|
+
s && u(r.EMMIT_EVENT_HOST_THEME_CHANGE, T);
|
|
25
27
|
}), []), c(() => {
|
|
26
|
-
if (
|
|
27
|
-
|
|
28
|
+
if (f) {
|
|
29
|
+
d(!1);
|
|
28
30
|
return;
|
|
29
31
|
}
|
|
30
|
-
s || (
|
|
32
|
+
s || (setTimeout(() => {
|
|
33
|
+
m(t);
|
|
34
|
+
}, 0), _(r.EMMIT_EVENT_HOST_THEME_CHANGE, t));
|
|
31
35
|
}, [t]), /* @__PURE__ */ n(I.Provider, {
|
|
32
36
|
value: {
|
|
33
|
-
hostThemeOptions:
|
|
37
|
+
hostThemeOptions: o,
|
|
34
38
|
fnComponentsOverrides: i
|
|
35
39
|
},
|
|
36
40
|
children: /* @__PURE__ */ n(N, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useRef as n, useEffect as r, useState as f, useContext as c, useLayoutEffect as i } from "react";
|
|
2
|
-
import { H as l } from "../contexts/HostThemeContext/index.
|
|
2
|
+
import { H as l } from "../contexts/HostThemeContext/index.4291ba89.js";
|
|
3
3
|
function w() {
|
|
4
4
|
const e = n(!0);
|
|
5
5
|
return r(
|
package/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { G as x } from "./components/GlobalStyle/index.
|
|
1
|
+
import { G as x } from "./components/GlobalStyle/index.1de764ae.js";
|
|
2
2
|
import { L as n, a as c, g as d } from "./contexts/LocalesContext/index.53f0b702.js";
|
|
3
3
|
import { F as v, a as C } from "./contexts/FormatterContext/index.92336f4c.js";
|
|
4
|
-
import { H as g, a as h } from "./contexts/HostThemeContext/index.
|
|
4
|
+
import { H as g, a as h } from "./contexts/HostThemeContext/index.4291ba89.js";
|
|
5
5
|
import { u as P } from "./hooks/useFirstRender/index.1e9b02fb.js";
|
|
6
6
|
import { u as T } from "./hooks/useFormatter/index.57ac8cca.js";
|
|
7
|
-
import { b as k, u as w, a as z, c as G } from "./hooks/index.
|
|
7
|
+
import { b as k, u as w, a as z, c as G } from "./hooks/index.33d67709.js";
|
|
8
8
|
import { u as S } from "./hooks/useLocales/index.d5a80aff.js";
|
|
9
9
|
import { u as A } from "./hooks/useResponsive/index.1409e387.js";
|
|
10
10
|
import { C as E, g as I } from "./utils/index.6909c662.js";
|