@m4l/graphics 2.0.0 → 2.0.1
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.b7393a44.js → index-DHBkshRk.js} +8 -0
- package/contexts/FormatterContext/{index.92336f4c.js → index-BHG3bJJo.js} +2 -2
- package/contexts/HostThemeContext/{index.89c85eb6.js → index-C5Z07fH1.js} +1 -1
- package/contexts/LocalesContext/{index.53f0b702.js → index--VwMF60R.js} +1 -1
- package/contexts/{index.43eb2431.js → index-BB_hmi4E.js} +9 -5
- package/hooks/{index.a56c80bc.js → index-c14LV1FI.js} +5 -7
- package/hooks/useFormatter/index-DfdAcbzw.js +10 -0
- package/hooks/useIsMobile/{index.a6493a85.js → index-Bro0dV28.js} +1 -1
- package/hooks/useLocales/index-mTHn9nqY.js +10 -0
- package/hooks/useResponsive/{index.24a3087b.js → index-DOGfC2H7.js} +3 -4
- package/index.js +38 -50
- package/{node_modules.f4ae204b.js → node_modules-BHhXVwYT.js} +1603 -1592
- package/package.json +1 -1
- package/vite-env.d.ts +1 -1
- package/hooks/useFormatter/index.57ac8cca.js +0 -11
- package/hooks/useLocales/index.d5a80aff.js +0 -11
- /package/{commonjs.e3daa2e5.js → commonjs-BCz0-aDl.js} +0 -0
- /package/components/{index.d8d41b1b.js → index-l0sNRNKZ.js} +0 -0
- /package/hooks/useFirstRender/{index.1e9b02fb.js → index-B-Q0TTn0.js} +0 -0
- /package/utils/{index.6909c662.js → index-DZG6QXjf.js} +0 -0
|
@@ -7,6 +7,7 @@ function s() {
|
|
|
7
7
|
return /* @__PURE__ */ a(e, {
|
|
8
8
|
styles: {
|
|
9
9
|
body: {
|
|
10
|
+
/* backgroundColor: `${theme.vars.palette.background.background}!important`, */
|
|
10
11
|
textRendering: "geometricPrecision",
|
|
11
12
|
width: "100%",
|
|
12
13
|
height: "100vh",
|
|
@@ -14,19 +15,26 @@ function s() {
|
|
|
14
15
|
color: t.vars.palette.text.primary
|
|
15
16
|
},
|
|
16
17
|
"*::-webkit-scrollbar": {
|
|
18
|
+
// camino de la barra con radio
|
|
17
19
|
width: "7px",
|
|
18
20
|
height: "7px",
|
|
19
21
|
borderRadius: "3px",
|
|
20
22
|
backgroundColor: "transparent"
|
|
21
23
|
},
|
|
22
24
|
"*::-webkit-scrollbar-track": {
|
|
25
|
+
// Camino de la barrra sin radio
|
|
23
26
|
backgroundColor: "transparent",
|
|
24
27
|
border: "0px solid transparent"
|
|
25
28
|
},
|
|
26
29
|
"*::-webkit-scrollbar-corner": {
|
|
27
30
|
backgroundColor: "transparent"
|
|
28
31
|
},
|
|
32
|
+
// FireFox
|
|
33
|
+
// scrollbarColor: `${theme.vars.palette.primary.main} white`,
|
|
34
|
+
// scrollbarWidth: 'thin',
|
|
35
|
+
// Chrome
|
|
29
36
|
"*::-webkit-scrollbar-thumb": {
|
|
37
|
+
// barra que se mueve
|
|
30
38
|
background: t.vars.palette.state.scrollBar,
|
|
31
39
|
borderRadius: "2px!important"
|
|
32
40
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createContext as D, useState as C, useCallback as k, useEffect as p } from "react";
|
|
2
2
|
import { useHostTools as v, usePropageteMF as R, EmitEvents as f } from "@m4l/core";
|
|
3
|
-
import { u as h } from "../../hooks/useFirstRender/index.
|
|
3
|
+
import { u as h } from "../../hooks/useFirstRender/index-B-Q0TTn0.js";
|
|
4
4
|
import { jsx as V } from "react/jsx-runtime";
|
|
5
5
|
const x = D(null);
|
|
6
6
|
function I(T) {
|
|
@@ -10,7 +10,7 @@ function I(T) {
|
|
|
10
10
|
currencyFormatter: l,
|
|
11
11
|
numberFormatter: M,
|
|
12
12
|
dateFormatter: t
|
|
13
|
-
} = T, r = l?.decimalDigits || 0, o = l?.code || "USD", a = M?.decimalSymbol || 0.1
|
|
13
|
+
} = T, r = l?.decimalDigits || 0, o = l?.code || "USD", a = M?.decimalSymbol || 0.1.toLocaleString().substring(1, 2), s = M?.thousandsSymbol || 1e3.toLocaleString().substring(1, 2), m = t?.dateFormat || "yyyy-MM-dd", n = t?.dateMask || "____-__-__", c = t?.datetimeFormat || "yyyy-MM-dd HH:mm:ss", i = t?.datetimeMask || "____-__-__ __:__:__", _ = t?.timeFormat || "HH:mm:ss", d = t?.timeMask || "__:__:__", u = t?.formatDate || (() => {
|
|
14
14
|
throw new Error("Incorrect use of formatDate");
|
|
15
15
|
}), y = h(), {
|
|
16
16
|
events_emit: g
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createContext as c, useMemo as a } from "react";
|
|
2
2
|
import { CssBaseline as h } from "@mui/material";
|
|
3
|
-
import { G as d } from "../../components/GlobalStyle/index.
|
|
3
|
+
import { G as d } from "../../components/GlobalStyle/index-DHBkshRk.js";
|
|
4
4
|
import { createTheme as p, experimental_extendTheme as x, Experimental_CssVarsProvider as f, StyledEngineProvider as u } from "@mui/material/styles";
|
|
5
5
|
import { jsxs as s, jsx as t } from "react/jsx-runtime";
|
|
6
6
|
const T = c(null);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createContext as f, useRef as T, useMemo as k, useLayoutEffect as y, useEffect as b } from "react";
|
|
2
|
-
import { c as v, d as R, i as P, l as E } from "../node_modules.
|
|
2
|
+
import { c as v, d as R, i as P, l as E } from "../node_modules-BHhXVwYT.js";
|
|
3
3
|
import { jsx as x } from "react/jsx-runtime";
|
|
4
4
|
import { useNetwork as M, useLocalStorageWithListener as w } from "@m4l/core";
|
|
5
5
|
import { getColorPresets as m, getColorState as d, typography as L, palette as S, SECONDARY as A, COMMON as N, ERROR as D, WARNING as z, INFO as B, SUCCESS as $, shadows as p, createCustomShadows as j, defaultThemeOptions as W, defaultPreset as _, colorPresets as F } from "@m4l/styles";
|
|
6
6
|
import { alpha as I } from "@mui/system";
|
|
7
|
-
import { u as U } from "../hooks/useFirstRender/index.
|
|
7
|
+
import { u as U } from "../hooks/useFirstRender/index-B-Q0TTn0.js";
|
|
8
8
|
const C = { xs: 600, sm: 900, md: 1200, lg: 1536, xl: 1920 }, K = (r) => {
|
|
9
9
|
const t = {
|
|
10
10
|
...r
|
|
@@ -46,7 +46,7 @@ const C = { xs: 600, sm: 900, md: 1200, lg: 1536, xl: 1920 }, K = (r) => {
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
}, i = k(() => E.
|
|
49
|
+
}, i = k(() => E.throttle(e, 200, {
|
|
50
50
|
leading: !1,
|
|
51
51
|
trailing: !0
|
|
52
52
|
}), [e]);
|
|
@@ -84,8 +84,7 @@ function O(r, t = "m4l") {
|
|
|
84
84
|
if (typeof e == "string" || typeof e == "number") {
|
|
85
85
|
const i = `--${t}-${n}`;
|
|
86
86
|
o.style.setProperty(i, e.toString());
|
|
87
|
-
} else
|
|
88
|
-
typeof e == "object" && e !== null && O(e, `${t}-${n}`);
|
|
87
|
+
} else typeof e == "object" && e !== null && O(e, `${t}-${n}`);
|
|
89
88
|
});
|
|
90
89
|
}
|
|
91
90
|
const c = (r) => {
|
|
@@ -178,6 +177,11 @@ const c = (r) => {
|
|
|
178
177
|
c(n);
|
|
179
178
|
});
|
|
180
179
|
},
|
|
180
|
+
// setThemeOptions: newObj => {
|
|
181
|
+
// set(state => {
|
|
182
|
+
// state.themeOptions = { ...state.themeOptions, ...newObj };
|
|
183
|
+
// });
|
|
184
|
+
// },
|
|
181
185
|
setThemeSettings: (n) => {
|
|
182
186
|
t((e) => {
|
|
183
187
|
e.currentThemeSettings = { ...e.currentThemeSettings, ...n }, h(e), c(e);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useRef as n, useEffect as r, useState as i, useContext as u, useLayoutEffect as c } from "react";
|
|
2
|
-
import { H as m } from "../contexts/HostThemeContext/index.
|
|
3
|
-
import { u as a } from "../node_modules.
|
|
4
|
-
import { T as l } from "../contexts/index.
|
|
2
|
+
import { H as m } from "../contexts/HostThemeContext/index-C5Z07fH1.js";
|
|
3
|
+
import { u as a } from "../node_modules-BHhXVwYT.js";
|
|
4
|
+
import { T as l } from "../contexts/index-BB_hmi4E.js";
|
|
5
5
|
function S() {
|
|
6
6
|
const e = n(!0);
|
|
7
7
|
return r(
|
|
@@ -21,8 +21,7 @@ function x(e) {
|
|
|
21
21
|
}
|
|
22
22
|
const h = () => {
|
|
23
23
|
const e = u(m);
|
|
24
|
-
if (!e)
|
|
25
|
-
throw new Error("useHostTheme context must be use inside HostThemeProvider");
|
|
24
|
+
if (!e) throw new Error("useHostTheme context must be use inside HostThemeProvider");
|
|
26
25
|
return e;
|
|
27
26
|
};
|
|
28
27
|
function b(e) {
|
|
@@ -41,8 +40,7 @@ function b(e) {
|
|
|
41
40
|
}
|
|
42
41
|
function g(e, s) {
|
|
43
42
|
const t = u(l);
|
|
44
|
-
if (!t)
|
|
45
|
-
throw new Error("useSettingsStore context must be use inside SettignsContext");
|
|
43
|
+
if (!t) throw new Error("useSettingsStore context must be use inside SettignsContext");
|
|
46
44
|
return a(t, e, s);
|
|
47
45
|
}
|
|
48
46
|
export {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useContext as r } from "react";
|
|
2
|
+
import { F as e } from "../../contexts/FormatterContext/index-BHG3bJJo.js";
|
|
3
|
+
const m = () => {
|
|
4
|
+
const t = r(e);
|
|
5
|
+
if (!t) throw new Error("useFormatter context must be use inside FormatterProvider");
|
|
6
|
+
return t;
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
m as u
|
|
10
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState as n, useEffect as o } from "react";
|
|
2
|
-
import { t as s } from "../../node_modules.
|
|
2
|
+
import { t as s } from "../../node_modules-BHhXVwYT.js";
|
|
3
3
|
const t = () => typeof navigator > "u" ? !1 : /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), l = () => {
|
|
4
4
|
const [i, r] = n(t());
|
|
5
5
|
return o(() => {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useContext as o } from "react";
|
|
2
|
+
import { L as t } from "../../contexts/LocalesContext/index--VwMF60R.js";
|
|
3
|
+
const n = () => {
|
|
4
|
+
const e = o(t);
|
|
5
|
+
if (!e) throw new Error("useLocales context must be use inside LocalesProvider");
|
|
6
|
+
return e;
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
n as u
|
|
10
|
+
};
|
|
@@ -1,11 +1,10 @@
|
|
|
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-BHhXVwYT.js";
|
|
3
|
+
import { R as n } from "../../contexts/index-BB_hmi4E.js";
|
|
4
4
|
import { useResponsive as i } from "@m4l/styles";
|
|
5
5
|
function f(e, s) {
|
|
6
6
|
const o = t(n);
|
|
7
|
-
if (!o)
|
|
8
|
-
throw new Error("useAreasStore context must be use inside AreasContext");
|
|
7
|
+
if (!o) throw new Error("useAreasStore context must be use inside AreasContext");
|
|
9
8
|
return r(o, e, s);
|
|
10
9
|
}
|
|
11
10
|
function c() {
|
package/index.js
CHANGED
|
@@ -1,52 +1,40 @@
|
|
|
1
|
-
import { G as
|
|
2
|
-
import { L as
|
|
3
|
-
import { F as
|
|
4
|
-
import { R as
|
|
5
|
-
import { H as
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
8
|
-
import { b as
|
|
9
|
-
import { u as
|
|
10
|
-
import { u as
|
|
11
|
-
import { u as
|
|
12
|
-
import { C as
|
|
13
|
-
import "@mui/material/styles";
|
|
14
|
-
import "@mui/material";
|
|
15
|
-
import "@m4l/styles";
|
|
16
|
-
import "react/jsx-runtime";
|
|
17
|
-
import "react";
|
|
18
|
-
import "@mui/x-date-pickers/AdapterDateFns";
|
|
19
|
-
import "@mui/x-date-pickers";
|
|
20
|
-
import "@m4l/core";
|
|
21
|
-
import "date-fns/locale/en-US";
|
|
22
|
-
import "./node_modules.f4ae204b.js";
|
|
23
|
-
import "./commonjs.e3daa2e5.js";
|
|
24
|
-
import "@mui/system";
|
|
1
|
+
import { G as s } from "./components/GlobalStyle/index-DHBkshRk.js";
|
|
2
|
+
import { L as r, a, g as i } from "./contexts/LocalesContext/index--VwMF60R.js";
|
|
3
|
+
import { F as m, a as p } from "./contexts/FormatterContext/index-BHG3bJJo.js";
|
|
4
|
+
import { R as x, a as f, T as d, b as l, d as v } from "./contexts/index-BB_hmi4E.js";
|
|
5
|
+
import { H as T, a as g } from "./contexts/HostThemeContext/index-C5Z07fH1.js";
|
|
6
|
+
import { u as R } from "./hooks/useFirstRender/index-B-Q0TTn0.js";
|
|
7
|
+
import { u as c } from "./hooks/useFormatter/index-DfdAcbzw.js";
|
|
8
|
+
import { b as P, u as b, a as L, c as H, d as k } from "./hooks/index-c14LV1FI.js";
|
|
9
|
+
import { u as z } from "./hooks/useLocales/index-mTHn9nqY.js";
|
|
10
|
+
import { u as I, a as M } from "./hooks/useResponsive/index-DOGfC2H7.js";
|
|
11
|
+
import { u as y } from "./hooks/useIsMobile/index-Bro0dV28.js";
|
|
12
|
+
import { C as D, g as E } from "./utils/index-DZG6QXjf.js";
|
|
25
13
|
export {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
14
|
+
D as Capitalize,
|
|
15
|
+
m as FormatterContext,
|
|
16
|
+
p as FormatterProvider,
|
|
17
|
+
s as GlobalStyles,
|
|
18
|
+
T as HostThemeContext,
|
|
19
|
+
g as HostThemeProvider,
|
|
20
|
+
r as LocalesContext,
|
|
21
|
+
a as LocalesProvider,
|
|
22
|
+
x as ResponsiveContainerContext,
|
|
23
|
+
f as ResponsiveContainerProvider,
|
|
24
|
+
d as ThemeSettingsContext,
|
|
25
|
+
l as ThemeSettingsProvider,
|
|
26
|
+
v as defaultThemeSettings,
|
|
27
|
+
E as getAnchorElPositionWindow,
|
|
28
|
+
i as getLocaleFromNetwork,
|
|
29
|
+
R as useFirstRender,
|
|
30
|
+
c as useFormatter,
|
|
31
|
+
P as useHostTheme,
|
|
32
|
+
y as useIsMobile,
|
|
33
|
+
b as useIsMountedRef,
|
|
34
|
+
z as useLocales,
|
|
35
|
+
L as useOffSetTop,
|
|
36
|
+
H as useResizeObserver,
|
|
37
|
+
I as useResponsiveContainerStore,
|
|
38
|
+
M as useResponsiveDesktop,
|
|
39
|
+
k as useThemeSettingsStore
|
|
52
40
|
};
|