@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.
Files changed (83) hide show
  1. package/dist/commonjs.js +1 -0
  2. package/dist/components/Page/index.js +31 -0
  3. package/dist/components/ProgressBarStyle/index.js +34 -0
  4. package/dist/components/index.js +4 -1318
  5. package/dist/contexts/HostThemeContext/index.js +71 -0
  6. package/dist/contexts/LocalesContext/index.js +46 -0
  7. package/dist/contexts/index.js +3 -174
  8. package/dist/hooks/index.js +6 -40
  9. package/dist/hooks/useHostTheme/index.js +9 -0
  10. package/dist/hooks/useLocales/index.js +9 -0
  11. package/dist/hooks/useResponsive/index.js +26 -0
  12. package/dist/index.js +19 -1654
  13. package/dist/lib/components/Page/index.d.ts +3 -9
  14. package/dist/lib/components/Page/types.d.ts +7 -0
  15. package/dist/lib/components/{ProgressBar → ProgressBarStyle}/index.d.ts +0 -1
  16. package/dist/lib/components/index.d.ts +1 -6
  17. package/dist/lib/hooks/useHostTheme/index.d.ts +1 -0
  18. package/dist/lib/hooks/useLocales/index.d.ts +1 -0
  19. package/dist/lib/hooks/{useResponsive.d.ts → useResponsive/index.d.ts} +0 -0
  20. package/dist/lib/index.d.ts +0 -1
  21. package/dist/lib/theme/palette.d.ts +1 -2
  22. package/dist/react-helmet-async-invariant.js +19 -0
  23. package/dist/react-helmet-async-react-fast-compare.js +90 -0
  24. package/dist/react-helmet-async-shallowequal.js +32 -0
  25. package/dist/react-helmet-async.js +363 -0
  26. package/dist/theme/index.js +1553 -0
  27. package/dist/utils/index.js +91 -0
  28. package/package.json +3 -9
  29. package/dist/components/mui_extended/index.js +0 -53
  30. package/dist/layouts/index.js +0 -39
  31. package/dist/lib/components/CompanyLogo/index.d.ts +0 -3
  32. package/dist/lib/components/CompanyLogo/styles.d.ts +0 -5
  33. package/dist/lib/components/CompanyLogo/types.d.ts +0 -6
  34. package/dist/lib/components/Image/index.d.ts +0 -3
  35. package/dist/lib/components/Image/styles.d.ts +0 -5
  36. package/dist/lib/components/Image/types.d.ts +0 -19
  37. package/dist/lib/components/LanguagePopover/index.d.ts +0 -3
  38. package/dist/lib/components/LanguagePopover/types.d.ts +0 -3
  39. package/dist/lib/components/LinkWithRoute/index.d.ts +0 -3
  40. package/dist/lib/components/LinkWithRoute/types.d.ts +0 -7
  41. package/dist/lib/components/Loadable/index.d.ts +0 -2
  42. package/dist/lib/components/Typography/index.d.ts +0 -3
  43. package/dist/lib/components/Typography/types.d.ts +0 -5
  44. package/dist/lib/components/animate/DialogAnimate.d.ts +0 -7
  45. package/dist/lib/components/animate/FabButtonAnimate.d.ts +0 -8
  46. package/dist/lib/components/animate/IconButtonAnimate/index.d.ts +0 -4
  47. package/dist/lib/components/animate/MotionContainer.d.ts +0 -10
  48. package/dist/lib/components/animate/MotionInView.d.ts +0 -9
  49. package/dist/lib/components/animate/MotionLazyContainer.d.ts +0 -6
  50. package/dist/lib/components/animate/TextAnimate.d.ts +0 -9
  51. package/dist/lib/components/animate/index.d.ts +0 -8
  52. package/dist/lib/components/animate/type.d.ts +0 -26
  53. package/dist/lib/components/animate/variants/actions.d.ts +0 -5
  54. package/dist/lib/components/animate/variants/background.d.ts +0 -104
  55. package/dist/lib/components/animate/variants/bounce.d.ts +0 -136
  56. package/dist/lib/components/animate/variants/container.d.ts +0 -19
  57. package/dist/lib/components/animate/variants/fade.d.ts +0 -217
  58. package/dist/lib/components/animate/variants/flip.d.ts +0 -75
  59. package/dist/lib/components/animate/variants/index.d.ts +0 -12
  60. package/dist/lib/components/animate/variants/path.d.ts +0 -14
  61. package/dist/lib/components/animate/variants/rotate.d.ts +0 -39
  62. package/dist/lib/components/animate/variants/scale.d.ts +0 -75
  63. package/dist/lib/components/animate/variants/slide.d.ts +0 -155
  64. package/dist/lib/components/animate/variants/transition.d.ts +0 -13
  65. package/dist/lib/components/animate/variants/zoom.d.ts +0 -199
  66. package/dist/lib/components/mui_extended/LoadingButton/index.d.ts +0 -3
  67. package/dist/lib/components/mui_extended/LoadingButton/skeleton.d.ts +0 -2
  68. package/dist/lib/components/mui_extended/LoadingButton/styles.d.ts +0 -2
  69. package/dist/lib/components/mui_extended/LoadingButton/types.d.ts +0 -5
  70. package/dist/lib/components/mui_extended/Typography/index.d.ts +0 -3
  71. package/dist/lib/components/mui_extended/Typography/types.d.ts +0 -5
  72. package/dist/lib/components/mui_extended/index.d.ts +0 -37
  73. package/dist/lib/hooks/useHostTheme.d.ts +0 -1
  74. package/dist/lib/hooks/useLocales.d.ts +0 -1
  75. package/dist/lib/layouts/NoAuthModuleLayout/components/ModuleWrapper/index.d.ts +0 -3
  76. package/dist/lib/layouts/NoAuthModuleLayout/components/ModuleWrapper/styles.d.ts +0 -13
  77. package/dist/lib/layouts/NoAuthModuleLayout/components/ModuleWrapper/types.d.ts +0 -4
  78. package/dist/lib/layouts/NoAuthModuleLayout/contexts/NoAuthModuleContext/index.d.ts +0 -5
  79. package/dist/lib/layouts/NoAuthModuleLayout/contexts/NoAuthModuleContext/types.d.ts +0 -12
  80. package/dist/lib/layouts/NoAuthModuleLayout/index.d.ts +0 -3
  81. package/dist/lib/layouts/NoAuthModuleLayout/types.d.ts +0 -11
  82. package/dist/lib/layouts/index.d.ts +0 -1
  83. package/dist/node_modules.js +0 -150
@@ -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 };