@appartmint/mint 1.2.3 → 1.2.5
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/css/mint.css +66 -43
- package/dist/css/mint.css.map +1 -1
- package/dist/css/mint.min.css +1 -1
- package/dist/css/mint.min.css.map +1 -1
- package/dist/js/index.js.map +1 -1
- package/dist/js/index.min.js +1 -1
- package/dist/js/index.min.js.map +1 -1
- package/package.json +1 -1
- package/src/scss/imports/_index.scss +10 -10
- package/src/scss/imports/components/_index.scss +16 -16
- package/src/scss/imports/global/_grid.scss +9 -0
- package/src/scss/imports/global/_structure.scss +9 -0
- package/src/scss/imports/global/_texture.scss +11 -1
- package/src/scss/imports/util/_index.scss +9 -9
- package/src/ts/imports/enums/side.ts +9 -9
- package/src/ts/imports/util/display.ts +72 -72
- package/src/ts/imports/util/event.ts +93 -93
- package/src/ts/imports/util/math.ts +17 -17
- package/src/ts/imports/util/window.ts +14 -14
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
/// _index.scss - Forward all overrides
|
|
2
|
-
/// @author App Art Mint LLC
|
|
3
|
-
///
|
|
4
|
-
/// @group Index
|
|
5
|
-
@charset 'utf-8';
|
|
6
|
-
|
|
7
|
-
/// Imports
|
|
8
|
-
@use './backgrounds';
|
|
9
|
-
@use './buttons';
|
|
10
|
-
@use './cards';
|
|
11
|
-
@use './embed';
|
|
12
|
-
@use './footer';
|
|
13
|
-
@use './header';
|
|
14
|
-
@use './image';
|
|
15
|
-
@use './recaptcha';
|
|
16
|
-
@use './tables';
|
|
1
|
+
/// _index.scss - Forward all overrides
|
|
2
|
+
/// @author App Art Mint LLC
|
|
3
|
+
///
|
|
4
|
+
/// @group Index
|
|
5
|
+
@charset 'utf-8';
|
|
6
|
+
|
|
7
|
+
/// Imports
|
|
8
|
+
@use './backgrounds';
|
|
9
|
+
@use './buttons';
|
|
10
|
+
@use './cards';
|
|
11
|
+
@use './embed';
|
|
12
|
+
@use './footer';
|
|
13
|
+
@use './header';
|
|
14
|
+
@use './image';
|
|
15
|
+
@use './recaptcha';
|
|
16
|
+
@use './tables';
|
|
@@ -72,3 +72,12 @@
|
|
|
72
72
|
#{class(right)} {
|
|
73
73
|
float: right;
|
|
74
74
|
}
|
|
75
|
+
|
|
76
|
+
#{class(full-page)} {
|
|
77
|
+
display: flex;
|
|
78
|
+
flex-direction: column;
|
|
79
|
+
align-items: center;
|
|
80
|
+
justify-content: center;
|
|
81
|
+
min-height: calc(100vh - css-var(header-height));
|
|
82
|
+
min-height: calc(100dvh - css-var(header-height));
|
|
83
|
+
}
|
|
@@ -100,6 +100,7 @@
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
+
/// Alt Texture Styles
|
|
103
104
|
@if $texture-alt-bg and $texture-alt-num {
|
|
104
105
|
@for $num from 1 through $texture-alt-num {
|
|
105
106
|
#{class(texture-#{$num})} {
|
|
@@ -110,4 +111,13 @@
|
|
|
110
111
|
}
|
|
111
112
|
}
|
|
112
113
|
}
|
|
113
|
-
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/// Overlay texture
|
|
117
|
+
#{class(overlay)} {
|
|
118
|
+
#{class(border)}, #{class(texture)} {
|
|
119
|
+
&::before {
|
|
120
|
+
z-index: 100;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/// _index.scss - Forward all overrides
|
|
2
|
-
/// @author App Art Mint LLC
|
|
3
|
-
///
|
|
4
|
-
/// @group Index
|
|
5
|
-
@charset 'utf-8';
|
|
6
|
-
|
|
7
|
-
/// Imports
|
|
8
|
-
@forward './util';
|
|
9
|
-
@forward './vars';
|
|
1
|
+
/// _index.scss - Forward all overrides
|
|
2
|
+
/// @author App Art Mint LLC
|
|
3
|
+
///
|
|
4
|
+
/// @group Index
|
|
5
|
+
@charset 'utf-8';
|
|
6
|
+
|
|
7
|
+
/// Imports
|
|
8
|
+
@forward './util';
|
|
9
|
+
@forward './vars';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Side Enum
|
|
3
|
-
*/
|
|
4
|
-
export enum EMintSide {
|
|
5
|
-
Top,
|
|
6
|
-
Right,
|
|
7
|
-
Bottom,
|
|
8
|
-
Left
|
|
9
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* Side Enum
|
|
3
|
+
*/
|
|
4
|
+
export enum EMintSide {
|
|
5
|
+
Top,
|
|
6
|
+
Right,
|
|
7
|
+
Bottom,
|
|
8
|
+
Left
|
|
9
|
+
};
|
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Imports
|
|
3
|
-
*/
|
|
4
|
-
import { EMintSide } from '../enums';
|
|
5
|
-
import { MintSettings } from './settings';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Handles the display of elements
|
|
9
|
-
*/
|
|
10
|
-
export abstract class MintDisplay {
|
|
11
|
-
/**
|
|
12
|
-
* Sets the element's height to its `innerHeight`, then to `auto` after a delay
|
|
13
|
-
* @param el - the element whose height will be set
|
|
14
|
-
* @param delay - the amount of time in milliseconds that the show animation will be active
|
|
15
|
-
* @param from - the side that the element is animating from
|
|
16
|
-
*/
|
|
17
|
-
static show (el?: HTMLElement | null, delay: number = MintSettings.delay.default, from: EMintSide = EMintSide.Top) : void {
|
|
18
|
-
if (el) {
|
|
19
|
-
el.style.display = '';
|
|
20
|
-
requestAnimationFrame(() => {
|
|
21
|
-
if (from === EMintSide.Top || from === EMintSide.Bottom) {
|
|
22
|
-
el.style.height = `${el.scrollHeight}px`;
|
|
23
|
-
} else {
|
|
24
|
-
el.style.width = `${el.scrollWidth}px`;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
setTimeout(() => {
|
|
28
|
-
if (from === EMintSide.Top || from === EMintSide.Bottom) {
|
|
29
|
-
el.style.height = 'auto';
|
|
30
|
-
} else {
|
|
31
|
-
el.style.width = 'auto';
|
|
32
|
-
}
|
|
33
|
-
}, delay);
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Sets the element's height to 0
|
|
40
|
-
* @param el - the element whose height will be set
|
|
41
|
-
* @param delay - the amount of time in milliseconds that the show animation will be active
|
|
42
|
-
* @param from - the side that the element is animating from
|
|
43
|
-
*/
|
|
44
|
-
static hide (el?: HTMLElement | null, delay: number = MintSettings.delay.default, from: EMintSide = EMintSide.Top) : void {
|
|
45
|
-
if (el) {
|
|
46
|
-
let height = el.scrollHeight,
|
|
47
|
-
width = el.scrollWidth,
|
|
48
|
-
transition = el.style.transition;
|
|
49
|
-
el.style.transition = '';
|
|
50
|
-
requestAnimationFrame(() => {
|
|
51
|
-
if (from === EMintSide.Top || from === EMintSide.Bottom) {
|
|
52
|
-
el.style.height = `${height}px`;
|
|
53
|
-
} else {
|
|
54
|
-
el.style.width = `${width}px`;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
el.style.transition = transition;
|
|
58
|
-
requestAnimationFrame(() => {
|
|
59
|
-
if (from === EMintSide.Top || from === EMintSide.Bottom) {
|
|
60
|
-
el.style.height = '0';
|
|
61
|
-
} else {
|
|
62
|
-
el.style.width = '0';
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
setTimeout(() => {
|
|
67
|
-
el.style.display = 'none';
|
|
68
|
-
}, delay);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
export default MintDisplay;
|
|
1
|
+
/**
|
|
2
|
+
* Imports
|
|
3
|
+
*/
|
|
4
|
+
import { EMintSide } from '../enums';
|
|
5
|
+
import { MintSettings } from './settings';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Handles the display of elements
|
|
9
|
+
*/
|
|
10
|
+
export abstract class MintDisplay {
|
|
11
|
+
/**
|
|
12
|
+
* Sets the element's height to its `innerHeight`, then to `auto` after a delay
|
|
13
|
+
* @param el - the element whose height will be set
|
|
14
|
+
* @param delay - the amount of time in milliseconds that the show animation will be active
|
|
15
|
+
* @param from - the side that the element is animating from
|
|
16
|
+
*/
|
|
17
|
+
static show (el?: HTMLElement | null, delay: number = MintSettings.delay.default, from: EMintSide = EMintSide.Top) : void {
|
|
18
|
+
if (el) {
|
|
19
|
+
el.style.display = '';
|
|
20
|
+
requestAnimationFrame(() => {
|
|
21
|
+
if (from === EMintSide.Top || from === EMintSide.Bottom) {
|
|
22
|
+
el.style.height = `${el.scrollHeight}px`;
|
|
23
|
+
} else {
|
|
24
|
+
el.style.width = `${el.scrollWidth}px`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
setTimeout(() => {
|
|
28
|
+
if (from === EMintSide.Top || from === EMintSide.Bottom) {
|
|
29
|
+
el.style.height = 'auto';
|
|
30
|
+
} else {
|
|
31
|
+
el.style.width = 'auto';
|
|
32
|
+
}
|
|
33
|
+
}, delay);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Sets the element's height to 0
|
|
40
|
+
* @param el - the element whose height will be set
|
|
41
|
+
* @param delay - the amount of time in milliseconds that the show animation will be active
|
|
42
|
+
* @param from - the side that the element is animating from
|
|
43
|
+
*/
|
|
44
|
+
static hide (el?: HTMLElement | null, delay: number = MintSettings.delay.default, from: EMintSide = EMintSide.Top) : void {
|
|
45
|
+
if (el) {
|
|
46
|
+
let height = el.scrollHeight,
|
|
47
|
+
width = el.scrollWidth,
|
|
48
|
+
transition = el.style.transition;
|
|
49
|
+
el.style.transition = '';
|
|
50
|
+
requestAnimationFrame(() => {
|
|
51
|
+
if (from === EMintSide.Top || from === EMintSide.Bottom) {
|
|
52
|
+
el.style.height = `${height}px`;
|
|
53
|
+
} else {
|
|
54
|
+
el.style.width = `${width}px`;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
el.style.transition = transition;
|
|
58
|
+
requestAnimationFrame(() => {
|
|
59
|
+
if (from === EMintSide.Top || from === EMintSide.Bottom) {
|
|
60
|
+
el.style.height = '0';
|
|
61
|
+
} else {
|
|
62
|
+
el.style.width = '0';
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
setTimeout(() => {
|
|
67
|
+
el.style.display = 'none';
|
|
68
|
+
}, delay);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
export default MintDisplay;
|
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
import MintSettings from "./settings";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Event helper functions
|
|
5
|
-
*/
|
|
6
|
-
export abstract class MintEvent {
|
|
7
|
-
/**
|
|
8
|
-
* Ensures that a function `func` is run only after not being called for `wait` milliseconds
|
|
9
|
-
* @param func - the function to debounce
|
|
10
|
-
* @param wait - the amount of time to wait before running the function
|
|
11
|
-
* @returns - the debounced function
|
|
12
|
-
*/
|
|
13
|
-
static debounce (func: Function, wait: number = MintSettings.delay.default) : Function {
|
|
14
|
-
let timer: number;
|
|
15
|
-
return function (e: any) {
|
|
16
|
-
if (timer) {
|
|
17
|
-
clearTimeout(timer);
|
|
18
|
-
}
|
|
19
|
-
timer = setTimeout(func, wait, e);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Ensures that a function `func` is run only after not being called for `wait` milliseconds
|
|
25
|
-
* @param func - the function to debounce
|
|
26
|
-
* @param wait - the amount of time to wait before running the function
|
|
27
|
-
* @returns - the debounced function as an EventListener
|
|
28
|
-
*/
|
|
29
|
-
static debounceEvent (func: Function, wait: number = MintSettings.delay.default) : EventListener {
|
|
30
|
-
return MintEvent.debounce(func, wait) as EventListener;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Ensures that a function `func` is called at most every `wait` milliseconds with optional leading and trailing calls
|
|
35
|
-
* @param func - the function to throttle
|
|
36
|
-
* @param wait - the amount of time between function calls
|
|
37
|
-
* @param options - leading and trailing options: default = \{ leading: true, trailing, true \}
|
|
38
|
-
* @returns - the throttled function
|
|
39
|
-
*/
|
|
40
|
-
static throttle (func: Function,
|
|
41
|
-
wait: number = MintSettings.delay.default,
|
|
42
|
-
options?: {[key: string]: boolean}) : Function {
|
|
43
|
-
let context: any, args: any, result: any,
|
|
44
|
-
timeout: number, previous: number = 0,
|
|
45
|
-
later: Function = function () {
|
|
46
|
-
previous = options?.leading === false ? 0 : new Date().getTime();
|
|
47
|
-
timeout = 0;
|
|
48
|
-
result = func.apply(context, args);
|
|
49
|
-
if (!timeout) {
|
|
50
|
-
context = args = null;
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
throttled: Function = function (this: any): any {
|
|
54
|
-
let now: number = new Date().getTime();
|
|
55
|
-
if (!previous && options?.leading === false) {
|
|
56
|
-
previous = now;
|
|
57
|
-
}
|
|
58
|
-
let remaining: number = wait - now + previous;
|
|
59
|
-
context = this;
|
|
60
|
-
args = arguments;
|
|
61
|
-
if (remaining <= 0 || remaining > wait) {
|
|
62
|
-
if (timeout) {
|
|
63
|
-
clearTimeout(timeout);
|
|
64
|
-
timeout = 0;
|
|
65
|
-
}
|
|
66
|
-
previous = now;
|
|
67
|
-
result = func.apply(context, args);
|
|
68
|
-
if (!timeout) {
|
|
69
|
-
context = args = null;
|
|
70
|
-
}
|
|
71
|
-
} else if (!timeout && options?.trailing !== false) {
|
|
72
|
-
timeout = window.setTimeout(later, remaining);
|
|
73
|
-
}
|
|
74
|
-
return result;
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
return throttled;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Ensures that a function `func` is called at most every `wait` milliseconds with optional leading and trailing calls
|
|
82
|
-
* @param func - the function to throttle
|
|
83
|
-
* @param wait - the amount of time between function calls
|
|
84
|
-
* @param options - leading and trailing options: default = \{ leading: true, trailing, true \}
|
|
85
|
-
* @returns - the throttled function as an EventListener
|
|
86
|
-
*/
|
|
87
|
-
static throttleEvent (func: Function,
|
|
88
|
-
wait: number = MintSettings.delay.default,
|
|
89
|
-
options?: {[key: string]: boolean}) : EventListener {
|
|
90
|
-
return MintEvent.throttle(func, wait, options) as EventListener;
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
export default MintEvent;
|
|
1
|
+
import MintSettings from "./settings";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Event helper functions
|
|
5
|
+
*/
|
|
6
|
+
export abstract class MintEvent {
|
|
7
|
+
/**
|
|
8
|
+
* Ensures that a function `func` is run only after not being called for `wait` milliseconds
|
|
9
|
+
* @param func - the function to debounce
|
|
10
|
+
* @param wait - the amount of time to wait before running the function
|
|
11
|
+
* @returns - the debounced function
|
|
12
|
+
*/
|
|
13
|
+
static debounce (func: Function, wait: number = MintSettings.delay.default) : Function {
|
|
14
|
+
let timer: number;
|
|
15
|
+
return function (e: any) {
|
|
16
|
+
if (timer) {
|
|
17
|
+
clearTimeout(timer);
|
|
18
|
+
}
|
|
19
|
+
timer = setTimeout(func, wait, e);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Ensures that a function `func` is run only after not being called for `wait` milliseconds
|
|
25
|
+
* @param func - the function to debounce
|
|
26
|
+
* @param wait - the amount of time to wait before running the function
|
|
27
|
+
* @returns - the debounced function as an EventListener
|
|
28
|
+
*/
|
|
29
|
+
static debounceEvent (func: Function, wait: number = MintSettings.delay.default) : EventListener {
|
|
30
|
+
return MintEvent.debounce(func, wait) as EventListener;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Ensures that a function `func` is called at most every `wait` milliseconds with optional leading and trailing calls
|
|
35
|
+
* @param func - the function to throttle
|
|
36
|
+
* @param wait - the amount of time between function calls
|
|
37
|
+
* @param options - leading and trailing options: default = \{ leading: true, trailing, true \}
|
|
38
|
+
* @returns - the throttled function
|
|
39
|
+
*/
|
|
40
|
+
static throttle (func: Function,
|
|
41
|
+
wait: number = MintSettings.delay.default,
|
|
42
|
+
options?: {[key: string]: boolean}) : Function {
|
|
43
|
+
let context: any, args: any, result: any,
|
|
44
|
+
timeout: number, previous: number = 0,
|
|
45
|
+
later: Function = function () {
|
|
46
|
+
previous = options?.leading === false ? 0 : new Date().getTime();
|
|
47
|
+
timeout = 0;
|
|
48
|
+
result = func.apply(context, args);
|
|
49
|
+
if (!timeout) {
|
|
50
|
+
context = args = null;
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
throttled: Function = function (this: any): any {
|
|
54
|
+
let now: number = new Date().getTime();
|
|
55
|
+
if (!previous && options?.leading === false) {
|
|
56
|
+
previous = now;
|
|
57
|
+
}
|
|
58
|
+
let remaining: number = wait - now + previous;
|
|
59
|
+
context = this;
|
|
60
|
+
args = arguments;
|
|
61
|
+
if (remaining <= 0 || remaining > wait) {
|
|
62
|
+
if (timeout) {
|
|
63
|
+
clearTimeout(timeout);
|
|
64
|
+
timeout = 0;
|
|
65
|
+
}
|
|
66
|
+
previous = now;
|
|
67
|
+
result = func.apply(context, args);
|
|
68
|
+
if (!timeout) {
|
|
69
|
+
context = args = null;
|
|
70
|
+
}
|
|
71
|
+
} else if (!timeout && options?.trailing !== false) {
|
|
72
|
+
timeout = window.setTimeout(later, remaining);
|
|
73
|
+
}
|
|
74
|
+
return result;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
return throttled;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Ensures that a function `func` is called at most every `wait` milliseconds with optional leading and trailing calls
|
|
82
|
+
* @param func - the function to throttle
|
|
83
|
+
* @param wait - the amount of time between function calls
|
|
84
|
+
* @param options - leading and trailing options: default = \{ leading: true, trailing, true \}
|
|
85
|
+
* @returns - the throttled function as an EventListener
|
|
86
|
+
*/
|
|
87
|
+
static throttleEvent (func: Function,
|
|
88
|
+
wait: number = MintSettings.delay.default,
|
|
89
|
+
options?: {[key: string]: boolean}) : EventListener {
|
|
90
|
+
return MintEvent.throttle(func, wait, options) as EventListener;
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
export default MintEvent;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Math functions for the util library
|
|
3
|
-
*/
|
|
4
|
-
export abstract class MintMath {
|
|
5
|
-
/**
|
|
6
|
-
* Get a random integer between min and max
|
|
7
|
-
* @param max Maximum value to return
|
|
8
|
-
* @param min Minimum value to return (default is 0)
|
|
9
|
-
* @returns a random integer between min and max
|
|
10
|
-
*/
|
|
11
|
-
static randomInt (max: number, min: number = 0): number {
|
|
12
|
-
min = Math.ceil(min);
|
|
13
|
-
max = Math.floor(max);
|
|
14
|
-
return Math.floor(Math.random() * (max - min) + min);
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
export default MintMath;
|
|
1
|
+
/**
|
|
2
|
+
* Math functions for the util library
|
|
3
|
+
*/
|
|
4
|
+
export abstract class MintMath {
|
|
5
|
+
/**
|
|
6
|
+
* Get a random integer between min and max
|
|
7
|
+
* @param max Maximum value to return
|
|
8
|
+
* @param min Minimum value to return (default is 0)
|
|
9
|
+
* @returns a random integer between min and max
|
|
10
|
+
*/
|
|
11
|
+
static randomInt (max: number, min: number = 0): number {
|
|
12
|
+
min = Math.ceil(min);
|
|
13
|
+
max = Math.floor(max);
|
|
14
|
+
return Math.floor(Math.random() * (max - min) + min);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
export default MintMath;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Functions related to the browser window.
|
|
3
|
-
*/
|
|
4
|
-
export abstract class MintWindow {
|
|
5
|
-
/**
|
|
6
|
-
* Returns the width of the window, including fractional pixels
|
|
7
|
-
* @returns the width of the window
|
|
8
|
-
*/
|
|
9
|
-
static width () : number {
|
|
10
|
-
const decimal: number = document.body.getBoundingClientRect().width % 1;
|
|
11
|
-
return window.innerWidth + decimal;
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
export default MintWindow;
|
|
1
|
+
/**
|
|
2
|
+
* Functions related to the browser window.
|
|
3
|
+
*/
|
|
4
|
+
export abstract class MintWindow {
|
|
5
|
+
/**
|
|
6
|
+
* Returns the width of the window, including fractional pixels
|
|
7
|
+
* @returns the width of the window
|
|
8
|
+
*/
|
|
9
|
+
static width () : number {
|
|
10
|
+
const decimal: number = document.body.getBoundingClientRect().width % 1;
|
|
11
|
+
return window.innerWidth + decimal;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
export default MintWindow;
|