@m4l/graphics 0.1.53 → 1.0.0
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.c11ef3f3.js} +22 -16
- package/contexts/HostThemeContext/index.86691e12.js +43 -0
- package/contexts/HostThemeContext/types.d.ts +3 -3
- package/contexts/{index.921576cc.js → index.d28ab716.js} +2 -2
- package/hooks/{index.66afb19b.js → index.73785922.js} +11 -10
- package/hooks/index.d.ts +1 -0
- package/hooks/useIsMobile/index.3de7c47a.js +16 -0
- package/hooks/useIsMobile/index.d.ts +1 -0
- package/hooks/useResponsive/{index.c9515afc.js → index.2b01d764.js} +2 -2
- package/index.js +21 -19
- package/node_modules.9eeccca4.js +4558 -0
- package/package.json +1 -1
- package/contexts/HostThemeContext/index.4291ba89.js +0 -54
- package/node_modules.dbab0abd.js +0 -4438
package/package.json
CHANGED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { createContext as H, useState as E, useMemo as v, useCallback as M, useEffect as c } from "react";
|
|
2
|
-
import { CssBaseline as C } from "@mui/material";
|
|
3
|
-
import { createTheme as O, StyledEngineProvider as N, ThemeProvider as S } from "@mui/material/styles";
|
|
4
|
-
import { useHostTools as x, EmitEvents as r } from "@m4l/core";
|
|
5
|
-
import { jsx as n, jsxs as F } from "react/jsx-runtime";
|
|
6
|
-
const I = H(null);
|
|
7
|
-
function b(l) {
|
|
8
|
-
const {
|
|
9
|
-
children: h,
|
|
10
|
-
hostThemeOptions: t,
|
|
11
|
-
fnComponentsOverrides: i,
|
|
12
|
-
isMicroFrontEnd: s
|
|
13
|
-
} = l, [o, m] = E(t), {
|
|
14
|
-
events_add_listener: a,
|
|
15
|
-
events_remove_listener: u,
|
|
16
|
-
events_emit: _
|
|
17
|
-
} = x(), [f, d] = E(!0), p = v(() => {
|
|
18
|
-
const e = O(o);
|
|
19
|
-
return e.components = i(e), e;
|
|
20
|
-
}, [o]), T = M((e) => {
|
|
21
|
-
setTimeout(() => {
|
|
22
|
-
m(e);
|
|
23
|
-
}, 0);
|
|
24
|
-
}, []);
|
|
25
|
-
return c(() => (s && a(r.EMMIT_EVENT_HOST_THEME_CHANGE, T), () => {
|
|
26
|
-
s && u(r.EMMIT_EVENT_HOST_THEME_CHANGE, T);
|
|
27
|
-
}), []), c(() => {
|
|
28
|
-
if (f) {
|
|
29
|
-
d(!1);
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
s || (setTimeout(() => {
|
|
33
|
-
m(t);
|
|
34
|
-
}, 0), _(r.EMMIT_EVENT_HOST_THEME_CHANGE, t));
|
|
35
|
-
}, [t]), /* @__PURE__ */ n(I.Provider, {
|
|
36
|
-
value: {
|
|
37
|
-
hostThemeOptions: o,
|
|
38
|
-
fnComponentsOverrides: i
|
|
39
|
-
},
|
|
40
|
-
children: /* @__PURE__ */ n(N, {
|
|
41
|
-
injectFirst: !0,
|
|
42
|
-
children: /* @__PURE__ */ F(S, {
|
|
43
|
-
theme: p,
|
|
44
|
-
children: [/* @__PURE__ */ n(C, {
|
|
45
|
-
enableColorScheme: !0
|
|
46
|
-
}), h]
|
|
47
|
-
})
|
|
48
|
-
})
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
export {
|
|
52
|
-
I as H,
|
|
53
|
-
b as a
|
|
54
|
-
};
|