@m4l/graphics 0.0.15 → 0.0.19
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/dist/commonjs.js +1 -0
- package/dist/components/Page/index.js +31 -0
- package/dist/components/ProgressBarStyle/index.js +34 -0
- package/dist/components/index.js +4 -1318
- package/dist/contexts/HostThemeContext/index.js +71 -0
- package/dist/contexts/LocalesContext/index.js +46 -0
- package/dist/contexts/index.js +3 -174
- package/dist/hooks/index.js +6 -40
- package/dist/hooks/useHostTheme/index.js +9 -0
- package/dist/hooks/useLocales/index.js +9 -0
- package/dist/hooks/useResponsive/index.js +26 -0
- package/dist/index.js +19 -1654
- package/dist/lib/components/Page/index.d.ts +3 -9
- package/dist/lib/components/Page/types.d.ts +7 -0
- package/dist/lib/components/{ProgressBar → ProgressBarStyle}/index.d.ts +0 -1
- package/dist/lib/components/index.d.ts +1 -6
- package/dist/lib/hooks/useHostTheme/index.d.ts +1 -0
- package/dist/lib/hooks/useLocales/index.d.ts +1 -0
- package/dist/lib/hooks/{useResponsive.d.ts → useResponsive/index.d.ts} +0 -0
- package/dist/lib/index.d.ts +0 -1
- package/dist/lib/theme/palette.d.ts +1 -2
- package/dist/react-helmet-async-invariant.js +19 -0
- package/dist/react-helmet-async-react-fast-compare.js +90 -0
- package/dist/react-helmet-async-shallowequal.js +32 -0
- package/dist/react-helmet-async.js +363 -0
- package/dist/theme/index.js +1553 -0
- package/dist/utils/index.js +91 -0
- package/package.json +3 -9
- package/dist/components/mui_extended/index.js +0 -53
- package/dist/layouts/index.js +0 -39
- package/dist/lib/components/CompanyLogo/index.d.ts +0 -3
- package/dist/lib/components/CompanyLogo/styles.d.ts +0 -5
- package/dist/lib/components/CompanyLogo/types.d.ts +0 -6
- package/dist/lib/components/Image/index.d.ts +0 -3
- package/dist/lib/components/Image/styles.d.ts +0 -5
- package/dist/lib/components/Image/types.d.ts +0 -19
- package/dist/lib/components/LanguagePopover/index.d.ts +0 -3
- package/dist/lib/components/LanguagePopover/types.d.ts +0 -3
- package/dist/lib/components/LinkWithRoute/index.d.ts +0 -3
- package/dist/lib/components/LinkWithRoute/types.d.ts +0 -7
- package/dist/lib/components/Loadable/index.d.ts +0 -2
- package/dist/lib/components/Typography/index.d.ts +0 -3
- package/dist/lib/components/Typography/types.d.ts +0 -5
- package/dist/lib/components/animate/DialogAnimate.d.ts +0 -7
- package/dist/lib/components/animate/FabButtonAnimate.d.ts +0 -8
- package/dist/lib/components/animate/IconButtonAnimate/index.d.ts +0 -4
- package/dist/lib/components/animate/MotionContainer.d.ts +0 -10
- package/dist/lib/components/animate/MotionInView.d.ts +0 -9
- package/dist/lib/components/animate/MotionLazyContainer.d.ts +0 -6
- package/dist/lib/components/animate/TextAnimate.d.ts +0 -9
- package/dist/lib/components/animate/index.d.ts +0 -8
- package/dist/lib/components/animate/type.d.ts +0 -26
- package/dist/lib/components/animate/variants/actions.d.ts +0 -5
- package/dist/lib/components/animate/variants/background.d.ts +0 -104
- package/dist/lib/components/animate/variants/bounce.d.ts +0 -136
- package/dist/lib/components/animate/variants/container.d.ts +0 -19
- package/dist/lib/components/animate/variants/fade.d.ts +0 -217
- package/dist/lib/components/animate/variants/flip.d.ts +0 -75
- package/dist/lib/components/animate/variants/index.d.ts +0 -12
- package/dist/lib/components/animate/variants/path.d.ts +0 -14
- package/dist/lib/components/animate/variants/rotate.d.ts +0 -39
- package/dist/lib/components/animate/variants/scale.d.ts +0 -75
- package/dist/lib/components/animate/variants/slide.d.ts +0 -155
- package/dist/lib/components/animate/variants/transition.d.ts +0 -13
- package/dist/lib/components/animate/variants/zoom.d.ts +0 -199
- package/dist/lib/components/mui_extended/LoadingButton/index.d.ts +0 -3
- package/dist/lib/components/mui_extended/LoadingButton/skeleton.d.ts +0 -2
- package/dist/lib/components/mui_extended/LoadingButton/styles.d.ts +0 -2
- package/dist/lib/components/mui_extended/LoadingButton/types.d.ts +0 -5
- package/dist/lib/components/mui_extended/Typography/index.d.ts +0 -3
- package/dist/lib/components/mui_extended/Typography/types.d.ts +0 -5
- package/dist/lib/components/mui_extended/index.d.ts +0 -37
- package/dist/lib/hooks/useHostTheme.d.ts +0 -1
- package/dist/lib/hooks/useLocales.d.ts +0 -1
- package/dist/lib/layouts/NoAuthModuleLayout/components/ModuleWrapper/index.d.ts +0 -3
- package/dist/lib/layouts/NoAuthModuleLayout/components/ModuleWrapper/styles.d.ts +0 -13
- package/dist/lib/layouts/NoAuthModuleLayout/components/ModuleWrapper/types.d.ts +0 -4
- package/dist/lib/layouts/NoAuthModuleLayout/contexts/NoAuthModuleContext/index.d.ts +0 -5
- package/dist/lib/layouts/NoAuthModuleLayout/contexts/NoAuthModuleContext/types.d.ts +0 -12
- package/dist/lib/layouts/NoAuthModuleLayout/index.d.ts +0 -3
- package/dist/lib/layouts/NoAuthModuleLayout/types.d.ts +0 -11
- package/dist/lib/layouts/index.d.ts +0 -1
- package/dist/node_modules.js +0 -150
package/dist/node_modules.js
DELETED
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
var observerMap = /* @__PURE__ */ new Map();
|
|
3
|
-
var RootIds = /* @__PURE__ */ new WeakMap();
|
|
4
|
-
var rootId = 0;
|
|
5
|
-
var unsupportedValue = void 0;
|
|
6
|
-
function getRootId(root) {
|
|
7
|
-
if (!root)
|
|
8
|
-
return "0";
|
|
9
|
-
if (RootIds.has(root))
|
|
10
|
-
return RootIds.get(root);
|
|
11
|
-
rootId += 1;
|
|
12
|
-
RootIds.set(root, rootId.toString());
|
|
13
|
-
return RootIds.get(root);
|
|
14
|
-
}
|
|
15
|
-
function optionsToId(options) {
|
|
16
|
-
return Object.keys(options).sort().filter(function(key) {
|
|
17
|
-
return options[key] !== void 0;
|
|
18
|
-
}).map(function(key) {
|
|
19
|
-
return key + "_" + (key === "root" ? getRootId(options.root) : options[key]);
|
|
20
|
-
}).toString();
|
|
21
|
-
}
|
|
22
|
-
function createObserver(options) {
|
|
23
|
-
var id = optionsToId(options);
|
|
24
|
-
var instance = observerMap.get(id);
|
|
25
|
-
if (!instance) {
|
|
26
|
-
var elements = /* @__PURE__ */ new Map();
|
|
27
|
-
var thresholds;
|
|
28
|
-
var observer = new IntersectionObserver(function(entries) {
|
|
29
|
-
entries.forEach(function(entry) {
|
|
30
|
-
var _elements$get;
|
|
31
|
-
var inView = entry.isIntersecting && thresholds.some(function(threshold) {
|
|
32
|
-
return entry.intersectionRatio >= threshold;
|
|
33
|
-
});
|
|
34
|
-
if (options.trackVisibility && typeof entry.isVisible === "undefined") {
|
|
35
|
-
entry.isVisible = inView;
|
|
36
|
-
}
|
|
37
|
-
(_elements$get = elements.get(entry.target)) == null ? void 0 : _elements$get.forEach(function(callback) {
|
|
38
|
-
callback(inView, entry);
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
}, options);
|
|
42
|
-
thresholds = observer.thresholds || (Array.isArray(options.threshold) ? options.threshold : [options.threshold || 0]);
|
|
43
|
-
instance = {
|
|
44
|
-
id,
|
|
45
|
-
observer,
|
|
46
|
-
elements
|
|
47
|
-
};
|
|
48
|
-
observerMap.set(id, instance);
|
|
49
|
-
}
|
|
50
|
-
return instance;
|
|
51
|
-
}
|
|
52
|
-
function observe(element, callback, options, fallbackInView) {
|
|
53
|
-
if (options === void 0) {
|
|
54
|
-
options = {};
|
|
55
|
-
}
|
|
56
|
-
if (fallbackInView === void 0) {
|
|
57
|
-
fallbackInView = unsupportedValue;
|
|
58
|
-
}
|
|
59
|
-
if (typeof window.IntersectionObserver === "undefined" && fallbackInView !== void 0) {
|
|
60
|
-
var bounds = element.getBoundingClientRect();
|
|
61
|
-
callback(fallbackInView, {
|
|
62
|
-
isIntersecting: fallbackInView,
|
|
63
|
-
target: element,
|
|
64
|
-
intersectionRatio: typeof options.threshold === "number" ? options.threshold : 0,
|
|
65
|
-
time: 0,
|
|
66
|
-
boundingClientRect: bounds,
|
|
67
|
-
intersectionRect: bounds,
|
|
68
|
-
rootBounds: bounds
|
|
69
|
-
});
|
|
70
|
-
return function() {
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
var _createObserver = createObserver(options), id = _createObserver.id, observer = _createObserver.observer, elements = _createObserver.elements;
|
|
74
|
-
var callbacks = elements.get(element) || [];
|
|
75
|
-
if (!elements.has(element)) {
|
|
76
|
-
elements.set(element, callbacks);
|
|
77
|
-
}
|
|
78
|
-
callbacks.push(callback);
|
|
79
|
-
observer.observe(element);
|
|
80
|
-
return function unobserve() {
|
|
81
|
-
callbacks.splice(callbacks.indexOf(callback), 1);
|
|
82
|
-
if (callbacks.length === 0) {
|
|
83
|
-
elements["delete"](element);
|
|
84
|
-
observer.unobserve(element);
|
|
85
|
-
}
|
|
86
|
-
if (elements.size === 0) {
|
|
87
|
-
observer.disconnect();
|
|
88
|
-
observerMap["delete"](id);
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
function useInView(_temp) {
|
|
93
|
-
var _ref = _temp === void 0 ? {} : _temp, threshold = _ref.threshold, delay = _ref.delay, trackVisibility = _ref.trackVisibility, rootMargin = _ref.rootMargin, root = _ref.root, triggerOnce = _ref.triggerOnce, skip = _ref.skip, initialInView = _ref.initialInView, fallbackInView = _ref.fallbackInView, onChange = _ref.onChange;
|
|
94
|
-
var unobserve = React.useRef();
|
|
95
|
-
var callback = React.useRef();
|
|
96
|
-
var _React$useState = React.useState({
|
|
97
|
-
inView: !!initialInView
|
|
98
|
-
}), state = _React$useState[0], setState = _React$useState[1];
|
|
99
|
-
callback.current = onChange;
|
|
100
|
-
var setRef = React.useCallback(function(node) {
|
|
101
|
-
if (unobserve.current !== void 0) {
|
|
102
|
-
unobserve.current();
|
|
103
|
-
unobserve.current = void 0;
|
|
104
|
-
}
|
|
105
|
-
if (skip)
|
|
106
|
-
return;
|
|
107
|
-
if (node) {
|
|
108
|
-
unobserve.current = observe(node, function(inView, entry) {
|
|
109
|
-
setState({
|
|
110
|
-
inView,
|
|
111
|
-
entry
|
|
112
|
-
});
|
|
113
|
-
if (callback.current)
|
|
114
|
-
callback.current(inView, entry);
|
|
115
|
-
if (entry.isIntersecting && triggerOnce && unobserve.current) {
|
|
116
|
-
unobserve.current();
|
|
117
|
-
unobserve.current = void 0;
|
|
118
|
-
}
|
|
119
|
-
}, {
|
|
120
|
-
root,
|
|
121
|
-
rootMargin,
|
|
122
|
-
threshold,
|
|
123
|
-
trackVisibility,
|
|
124
|
-
delay
|
|
125
|
-
}, fallbackInView);
|
|
126
|
-
}
|
|
127
|
-
}, [
|
|
128
|
-
Array.isArray(threshold) ? threshold.toString() : threshold,
|
|
129
|
-
root,
|
|
130
|
-
rootMargin,
|
|
131
|
-
triggerOnce,
|
|
132
|
-
skip,
|
|
133
|
-
trackVisibility,
|
|
134
|
-
fallbackInView,
|
|
135
|
-
delay
|
|
136
|
-
]);
|
|
137
|
-
React.useEffect(function() {
|
|
138
|
-
if (!unobserve.current && state.entry && !triggerOnce && !skip) {
|
|
139
|
-
setState({
|
|
140
|
-
inView: !!initialInView
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
var result = [setRef, state.inView, state.entry];
|
|
145
|
-
result.ref = result[0];
|
|
146
|
-
result.inView = result[1];
|
|
147
|
-
result.entry = result[2];
|
|
148
|
-
return result;
|
|
149
|
-
}
|
|
150
|
-
export { useInView as u };
|