@appartmint/mint 5.0.2 → 5.0.4
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/imports/abstract/attaches-events.cjs.js +1 -0
- package/dist/{js/imports → imports}/abstract/attaches-events.d.ts +0 -4
- package/dist/imports/abstract/attaches-events.esm.js +23 -0
- package/dist/imports/abstract/index.cjs.js +1 -0
- package/dist/{js/imports → imports}/abstract/index.d.ts +0 -1
- package/dist/imports/abstract/index.esm.js +2 -0
- package/dist/imports/components/grid.cjs.js +1 -0
- package/dist/imports/components/grid.d.ts +9 -0
- package/dist/imports/components/grid.esm.js +7 -0
- package/dist/imports/components/header.cjs.js +1 -0
- package/dist/{js/imports → imports}/components/header.d.ts +12 -13
- package/dist/imports/components/header.esm.js +31 -0
- package/dist/imports/components/index.cjs.js +1 -0
- package/dist/{js/imports → imports}/components/index.d.ts +0 -1
- package/dist/imports/components/index.esm.js +5 -0
- package/dist/imports/components/menu.cjs.js +1 -0
- package/dist/{js/imports → imports}/components/menu.d.ts +9 -7
- package/dist/imports/components/menu.esm.js +119 -0
- package/dist/imports/components/panel.cjs.js +1 -0
- package/dist/{js/imports → imports}/components/panel.d.ts +15 -4
- package/dist/imports/components/panel.esm.js +88 -0
- package/dist/imports/enums/index.cjs.js +1 -0
- package/dist/{js/imports → imports}/enums/index.d.ts +0 -1
- package/dist/imports/enums/index.esm.js +2 -0
- package/dist/imports/enums/side.cjs.js +1 -0
- package/dist/{js/imports → imports}/enums/side.d.ts +0 -1
- package/dist/imports/enums/side.esm.js +6 -0
- package/dist/imports/index.cjs.js +1 -0
- package/dist/{js/imports → imports}/index.d.ts +0 -1
- package/dist/imports/index.esm.js +23 -0
- package/dist/imports/models/color.cjs.js +1 -0
- package/dist/{js/imports → imports}/models/color.d.ts +1 -4
- package/dist/imports/models/color.esm.js +48 -0
- package/dist/imports/models/event.cjs.js +1 -0
- package/dist/{js/imports → imports}/models/event.d.ts +0 -1
- package/dist/imports/models/event.esm.js +0 -0
- package/dist/imports/models/file.cjs.js +1 -0
- package/dist/{js/imports → imports}/models/file.d.ts +2 -7
- package/dist/imports/models/file.esm.js +0 -0
- package/dist/imports/models/index.cjs.js +1 -0
- package/dist/{js/imports → imports}/models/index.d.ts +0 -1
- package/dist/imports/models/index.esm.js +3 -0
- package/dist/imports/models/item.cjs.js +1 -0
- package/dist/{js/imports → imports}/models/item.d.ts +5 -14
- package/dist/imports/models/item.esm.js +45 -0
- package/dist/imports/models/minify.cjs.js +1 -0
- package/dist/{js/imports → imports}/models/minify.d.ts +0 -1
- package/dist/imports/models/minify.esm.js +0 -0
- package/dist/imports/models/page.cjs.js +1 -0
- package/dist/{js/imports → imports}/models/page.d.ts +1 -5
- package/dist/imports/models/page.esm.js +0 -0
- package/dist/imports/models/primitive.cjs.js +1 -0
- package/dist/{js/imports → imports}/models/primitive.d.ts +0 -1
- package/dist/imports/models/primitive.esm.js +0 -0
- package/dist/imports/models/recaptcha.cjs.js +1 -0
- package/dist/{js/imports → imports}/models/recaptcha.d.ts +0 -1
- package/dist/imports/models/recaptcha.esm.js +0 -0
- package/dist/imports/util/async.cjs.js +1 -0
- package/dist/imports/util/async.d.ts +10 -0
- package/dist/imports/util/async.esm.js +6 -0
- package/dist/imports/util/display.cjs.js +1 -0
- package/dist/{js/imports → imports}/util/display.d.ts +4 -8
- package/dist/imports/util/display.esm.js +26 -0
- package/dist/imports/util/event.cjs.js +1 -0
- package/dist/{js/imports → imports}/util/event.d.ts +8 -11
- package/dist/imports/util/event.esm.js +31 -0
- package/dist/imports/util/icon.cjs.js +1 -0
- package/dist/imports/util/icon.d.ts +23 -0
- package/dist/imports/util/icon.esm.js +33 -0
- package/dist/imports/util/index.cjs.js +1 -0
- package/dist/{js/imports → imports}/util/index.d.ts +0 -1
- package/dist/imports/util/index.esm.js +13 -0
- package/dist/imports/util/list.cjs.js +1 -0
- package/dist/{js/imports → imports}/util/list.d.ts +5 -6
- package/dist/imports/util/list.esm.js +21 -0
- package/dist/imports/util/math.cjs.js +1 -0
- package/dist/{js/imports → imports}/util/math.d.ts +7 -8
- package/dist/imports/util/math.esm.js +16 -0
- package/dist/imports/util/object.cjs.js +1 -0
- package/dist/{js/imports → imports}/util/object.d.ts +16 -17
- package/dist/imports/util/object.esm.js +115 -0
- package/dist/imports/util/scroll.cjs.js +1 -0
- package/dist/{js/imports → imports}/util/scroll.d.ts +6 -7
- package/dist/imports/util/scroll.esm.js +26 -0
- package/dist/imports/util/selectors.cjs.js +8 -0
- package/dist/{js/imports → imports}/util/selectors.d.ts +26 -69
- package/dist/imports/util/selectors.esm.js +63 -0
- package/dist/imports/util/settings.cjs.js +1 -0
- package/dist/imports/util/settings.d.ts +38 -0
- package/dist/imports/util/settings.esm.js +43 -0
- package/dist/imports/util/text.cjs.js +8 -0
- package/dist/{js/imports → imports}/util/text.d.ts +13 -14
- package/dist/imports/util/text.esm.js +75 -0
- package/dist/imports/util/window.cjs.js +1 -0
- package/dist/{js/imports → imports}/util/window.d.ts +4 -5
- package/dist/imports/util/window.esm.js +13 -0
- package/dist/index.cjs.js +1 -0
- package/dist/{js/index.d.ts → index.d.ts} +0 -1
- package/dist/index.esm.js +22 -0
- package/dist/{css/mint.css → mint.css} +1 -4
- package/dist/mint.css.map +1 -0
- package/dist/mint.min.css +1 -0
- package/dist/mint.min.css.map +1 -0
- package/dist/noscript.css +5 -0
- package/dist/noscript.css.map +1 -0
- package/dist/noscript.min.css +1 -0
- package/dist/noscript.min.css.map +1 -0
- package/package.json +76 -67
- package/src/scss/imports/util/_vars.scss +12 -12
- package/dist/css/mint.css.map +0 -1
- package/dist/css/mint.min.css +0 -3
- package/dist/css/mint.min.css.map +0 -1
- package/dist/css/noscript.css +0 -8
- package/dist/css/noscript.css.map +0 -1
- package/dist/css/noscript.min.css +0 -3
- package/dist/css/noscript.min.css.map +0 -1
- package/dist/js/imports/abstract/attaches-events.d.ts.map +0 -1
- package/dist/js/imports/abstract/index.d.ts.map +0 -1
- package/dist/js/imports/components/grid.d.ts +0 -10
- package/dist/js/imports/components/grid.d.ts.map +0 -1
- package/dist/js/imports/components/header.d.ts.map +0 -1
- package/dist/js/imports/components/index.d.ts.map +0 -1
- package/dist/js/imports/components/menu.d.ts.map +0 -1
- package/dist/js/imports/components/panel.d.ts.map +0 -1
- package/dist/js/imports/enums/index.d.ts.map +0 -1
- package/dist/js/imports/enums/side.d.ts.map +0 -1
- package/dist/js/imports/index.d.ts.map +0 -1
- package/dist/js/imports/models/color.d.ts.map +0 -1
- package/dist/js/imports/models/event.d.ts.map +0 -1
- package/dist/js/imports/models/file.d.ts.map +0 -1
- package/dist/js/imports/models/index.d.ts.map +0 -1
- package/dist/js/imports/models/item.d.ts.map +0 -1
- package/dist/js/imports/models/minify.d.ts.map +0 -1
- package/dist/js/imports/models/page.d.ts.map +0 -1
- package/dist/js/imports/models/primitive.d.ts.map +0 -1
- package/dist/js/imports/models/recaptcha.d.ts.map +0 -1
- package/dist/js/imports/util/async.d.ts +0 -11
- package/dist/js/imports/util/async.d.ts.map +0 -1
- package/dist/js/imports/util/display.d.ts.map +0 -1
- package/dist/js/imports/util/event.d.ts.map +0 -1
- package/dist/js/imports/util/icon.d.ts +0 -29
- package/dist/js/imports/util/icon.d.ts.map +0 -1
- package/dist/js/imports/util/index.d.ts.map +0 -1
- package/dist/js/imports/util/list.d.ts.map +0 -1
- package/dist/js/imports/util/math.d.ts.map +0 -1
- package/dist/js/imports/util/object.d.ts.map +0 -1
- package/dist/js/imports/util/scroll.d.ts.map +0 -1
- package/dist/js/imports/util/selectors.d.ts.map +0 -1
- package/dist/js/imports/util/settings.d.ts +0 -39
- package/dist/js/imports/util/settings.d.ts.map +0 -1
- package/dist/js/imports/util/text.d.ts.map +0 -1
- package/dist/js/imports/util/window.d.ts.map +0 -1
- package/dist/js/index.d.ts.map +0 -1
- package/dist/js/index.js +0 -2455
- package/dist/js/index.js.map +0 -1
- package/dist/js/index.min.js +0 -2
- package/dist/js/index.min.js.map +0 -1
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});
|
|
@@ -10,12 +10,7 @@ export interface IMintFile {
|
|
|
10
10
|
error?: boolean;
|
|
11
11
|
fetched?: boolean;
|
|
12
12
|
empty?: boolean;
|
|
13
|
-
files?:
|
|
14
|
-
|
|
15
|
-
};
|
|
16
|
-
metadata?: {
|
|
17
|
-
[key: string]: string;
|
|
18
|
-
};
|
|
13
|
+
files?: Record<string, IMintFile>;
|
|
14
|
+
metadata?: Record<string, string>;
|
|
19
15
|
}
|
|
20
16
|
export default IMintFile;
|
|
21
|
-
//# sourceMappingURL=file.d.ts.map
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./color.cjs.js"),t=require("./item.cjs.js");exports.MintItem=t.MintItem,exports.mintColor=e.mintColor;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var e=class{version=0;priority=0;price=0;level=0;size=0;num=0;width=0;height=0;active=!1;centered=!1;disabled=!1;private=!1;id;slug;name;title;subtitle;description;category;type;unit;logo;icon;position;transform;date;src;href;target;routerLink;attr={};params={};options={};lists={};paragraphs=[];classes=[];items=[];images=[];buttons=[];click};exports.MintItem=e,exports.default=e;
|
|
@@ -48,18 +48,10 @@ export declare class MintItem {
|
|
|
48
48
|
/**
|
|
49
49
|
* Item data
|
|
50
50
|
*/
|
|
51
|
-
attr?:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
[key: string]: string;
|
|
56
|
-
};
|
|
57
|
-
options?: {
|
|
58
|
-
[key: string]: string;
|
|
59
|
-
};
|
|
60
|
-
lists?: {
|
|
61
|
-
[key: string]: string[];
|
|
62
|
-
};
|
|
51
|
+
attr?: Record<string, string>;
|
|
52
|
+
params?: Record<string, string>;
|
|
53
|
+
options?: Record<string, string>;
|
|
54
|
+
lists?: Record<string, string[]>;
|
|
63
55
|
/**
|
|
64
56
|
* Item lists
|
|
65
57
|
*/
|
|
@@ -71,7 +63,6 @@ export declare class MintItem {
|
|
|
71
63
|
/**
|
|
72
64
|
* Item functions
|
|
73
65
|
*/
|
|
74
|
-
click?:
|
|
66
|
+
click?: (...args: unknown[]) => unknown;
|
|
75
67
|
}
|
|
76
68
|
export default MintItem;
|
|
77
|
-
//# sourceMappingURL=item.d.ts.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
//#region src/ts/imports/models/item.ts
|
|
2
|
+
var e = class {
|
|
3
|
+
version = 0;
|
|
4
|
+
priority = 0;
|
|
5
|
+
price = 0;
|
|
6
|
+
level = 0;
|
|
7
|
+
size = 0;
|
|
8
|
+
num = 0;
|
|
9
|
+
width = 0;
|
|
10
|
+
height = 0;
|
|
11
|
+
active = !1;
|
|
12
|
+
centered = !1;
|
|
13
|
+
disabled = !1;
|
|
14
|
+
private = !1;
|
|
15
|
+
id;
|
|
16
|
+
slug;
|
|
17
|
+
name;
|
|
18
|
+
title;
|
|
19
|
+
subtitle;
|
|
20
|
+
description;
|
|
21
|
+
category;
|
|
22
|
+
type;
|
|
23
|
+
unit;
|
|
24
|
+
logo;
|
|
25
|
+
icon;
|
|
26
|
+
position;
|
|
27
|
+
transform;
|
|
28
|
+
date;
|
|
29
|
+
src;
|
|
30
|
+
href;
|
|
31
|
+
target;
|
|
32
|
+
routerLink;
|
|
33
|
+
attr = {};
|
|
34
|
+
params = {};
|
|
35
|
+
options = {};
|
|
36
|
+
lists = {};
|
|
37
|
+
paragraphs = [];
|
|
38
|
+
classes = [];
|
|
39
|
+
items = [];
|
|
40
|
+
images = [];
|
|
41
|
+
buttons = [];
|
|
42
|
+
click;
|
|
43
|
+
};
|
|
44
|
+
//#endregion
|
|
45
|
+
export { e as MintItem, e as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Imports
|
|
3
|
-
*/
|
|
4
|
-
import MintItem from "./item";
|
|
1
|
+
import { default as MintItem } from './item';
|
|
5
2
|
/**
|
|
6
3
|
* Page Interface
|
|
7
4
|
*/
|
|
@@ -15,4 +12,3 @@ export interface IMintPage {
|
|
|
15
12
|
updatedAt?: string;
|
|
16
13
|
}
|
|
17
14
|
export default IMintPage;
|
|
18
|
-
//# sourceMappingURL=page.d.ts.map
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var e={wait(e){return new Promise(t=>setTimeout(t,e))}};exports.MintAsync=e,exports.default=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../enums/side.cjs.js"),t=require("./settings.cjs.js");var n={show(n,r=t.MintSettings.delay.default,i=e.EMintSide.Top){n&&(n.style.display=``,requestAnimationFrame(()=>{i===e.EMintSide.Top||i===e.EMintSide.Bottom?n.style.height=`${String(n.scrollHeight)}px`:n.style.width=`${String(n.scrollWidth)}px`,setTimeout(()=>{i===e.EMintSide.Top||i===e.EMintSide.Bottom?n.style.height=`auto`:n.style.width=`auto`},r)}))},hide(n,r=t.MintSettings.delay.default,i=e.EMintSide.Top){if(n){let t=n.scrollHeight,a=n.scrollWidth,o=n.style.transition;n.style.transition=``,requestAnimationFrame(()=>{i===e.EMintSide.Top||i===e.EMintSide.Bottom?n.style.height=`${String(t)}px`:n.style.width=`${String(a)}px`,n.style.transition=o,requestAnimationFrame(()=>{i===e.EMintSide.Top||i===e.EMintSide.Bottom?n.style.height=`0`:n.style.width=`0`})}),setTimeout(()=>{n.style.display=`none`},r)}}};exports.MintDisplay=n,exports.default=n;
|
|
@@ -1,25 +1,21 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Imports
|
|
3
|
-
*/
|
|
4
1
|
import { EMintSide } from '../enums/side';
|
|
5
2
|
/**
|
|
6
3
|
* Handles the display of elements
|
|
7
4
|
*/
|
|
8
|
-
export declare
|
|
5
|
+
export declare const MintDisplay: {
|
|
9
6
|
/**
|
|
10
7
|
* Sets the element's height to its `innerHeight`, then to `auto` after a delay
|
|
11
8
|
* @param el - the element whose height will be set
|
|
12
9
|
* @param delay - the amount of time in milliseconds that the show animation will be active
|
|
13
10
|
* @param from - the side that the element is animating from
|
|
14
11
|
*/
|
|
15
|
-
|
|
12
|
+
show(el?: HTMLElement | null, delay?: number, from?: EMintSide): void;
|
|
16
13
|
/**
|
|
17
14
|
* Sets the element's height to 0
|
|
18
15
|
* @param el - the element whose height will be set
|
|
19
16
|
* @param delay - the amount of time in milliseconds that the show animation will be active
|
|
20
17
|
* @param from - the side that the element is animating from
|
|
21
18
|
*/
|
|
22
|
-
|
|
23
|
-
}
|
|
19
|
+
hide(el?: HTMLElement | null, delay?: number, from?: EMintSide): void;
|
|
20
|
+
};
|
|
24
21
|
export default MintDisplay;
|
|
25
|
-
//# sourceMappingURL=display.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { EMintSide as e } from "../enums/side.esm.js";
|
|
2
|
+
import { MintSettings as t } from "./settings.esm.js";
|
|
3
|
+
//#region src/ts/imports/util/display.ts
|
|
4
|
+
var n = {
|
|
5
|
+
show(n, r = t.delay.default, i = e.Top) {
|
|
6
|
+
n && (n.style.display = "", requestAnimationFrame(() => {
|
|
7
|
+
i === e.Top || i === e.Bottom ? n.style.height = `${String(n.scrollHeight)}px` : n.style.width = `${String(n.scrollWidth)}px`, setTimeout(() => {
|
|
8
|
+
i === e.Top || i === e.Bottom ? n.style.height = "auto" : n.style.width = "auto";
|
|
9
|
+
}, r);
|
|
10
|
+
}));
|
|
11
|
+
},
|
|
12
|
+
hide(n, r = t.delay.default, i = e.Top) {
|
|
13
|
+
if (n) {
|
|
14
|
+
let t = n.scrollHeight, a = n.scrollWidth, o = n.style.transition;
|
|
15
|
+
n.style.transition = "", requestAnimationFrame(() => {
|
|
16
|
+
i === e.Top || i === e.Bottom ? n.style.height = `${String(t)}px` : n.style.width = `${String(a)}px`, n.style.transition = o, requestAnimationFrame(() => {
|
|
17
|
+
i === e.Top || i === e.Bottom ? n.style.height = "0" : n.style.width = "0";
|
|
18
|
+
});
|
|
19
|
+
}), setTimeout(() => {
|
|
20
|
+
n.style.display = "none";
|
|
21
|
+
}, r);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
//#endregion
|
|
26
|
+
export { n as MintDisplay, n as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./settings.cjs.js");var t={debounce(t,n=e.MintSettings.delay.default){let r=0;return(...e)=>{r&&clearTimeout(r),r=window.setTimeout(()=>{t(...e)},n)}},debounceEvent(n,r=e.MintSettings.delay.default){return t.debounce(n,r)},throttle(t,n=e.MintSettings.delay.default,r){let i,a,o=0,s=0,c=()=>{s=r?.leading===!1?0:new Date().getTime(),o=0,i&&(a=t(...i)),o||(i=void 0)};return(...e)=>{let l=new Date().getTime();!s&&r?.leading===!1&&(s=l);let u=n-l+s;return i=e,u<=0||u>n?(o&&=(clearTimeout(o),0),s=l,a=t(...i),o||(i=void 0)):!o&&r?.trailing!==!1&&(o=window.setTimeout(c,u)),a}},throttleEvent(n,r=e.MintSettings.delay.default,i){return t.throttle(n,r,i)}};exports.MintEvent=t,exports.default=t;
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
+
/** Accepts any function; `never[]` is the safe "any callback" parameter type. */
|
|
2
|
+
export type Callback = (...args: never[]) => unknown;
|
|
1
3
|
/**
|
|
2
4
|
* Event helper functions
|
|
3
5
|
*/
|
|
4
|
-
export declare
|
|
6
|
+
export declare const MintEvent: {
|
|
5
7
|
/**
|
|
6
8
|
* Ensures that a function `func` is run only after not being called for `wait` milliseconds
|
|
7
9
|
* @param func - the function to debounce
|
|
8
10
|
* @param wait - the amount of time to wait before running the function
|
|
9
11
|
* @returns - the debounced function
|
|
10
12
|
*/
|
|
11
|
-
|
|
13
|
+
debounce(func: Callback, wait?: number): Callback;
|
|
12
14
|
/**
|
|
13
15
|
* Ensures that a function `func` is run only after not being called for `wait` milliseconds
|
|
14
16
|
* @param func - the function to debounce
|
|
15
17
|
* @param wait - the amount of time to wait before running the function
|
|
16
18
|
* @returns - the debounced function as an EventListener
|
|
17
19
|
*/
|
|
18
|
-
|
|
20
|
+
debounceEvent(func: Callback, wait?: number): EventListener;
|
|
19
21
|
/**
|
|
20
22
|
* Ensures that a function `func` is called at most every `wait` milliseconds with optional leading and trailing calls
|
|
21
23
|
* @param func - the function to throttle
|
|
@@ -23,9 +25,7 @@ export declare abstract class MintEvent {
|
|
|
23
25
|
* @param options - leading and trailing options: default = \{ leading: true, trailing, true \}
|
|
24
26
|
* @returns - the throttled function
|
|
25
27
|
*/
|
|
26
|
-
|
|
27
|
-
[key: string]: boolean;
|
|
28
|
-
}): Function;
|
|
28
|
+
throttle(func: Callback, wait?: number, options?: Record<string, boolean>): Callback;
|
|
29
29
|
/**
|
|
30
30
|
* Ensures that a function `func` is called at most every `wait` milliseconds with optional leading and trailing calls
|
|
31
31
|
* @param func - the function to throttle
|
|
@@ -33,9 +33,6 @@ export declare abstract class MintEvent {
|
|
|
33
33
|
* @param options - leading and trailing options: default = \{ leading: true, trailing, true \}
|
|
34
34
|
* @returns - the throttled function as an EventListener
|
|
35
35
|
*/
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}): EventListener;
|
|
39
|
-
}
|
|
36
|
+
throttleEvent(func: Callback, wait?: number, options?: Record<string, boolean>): EventListener;
|
|
37
|
+
};
|
|
40
38
|
export default MintEvent;
|
|
41
|
-
//# sourceMappingURL=event.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { MintSettings as e } from "./settings.esm.js";
|
|
2
|
+
//#region src/ts/imports/util/event.ts
|
|
3
|
+
var t = {
|
|
4
|
+
debounce(t, n = e.delay.default) {
|
|
5
|
+
let r = 0;
|
|
6
|
+
return (...e) => {
|
|
7
|
+
r && clearTimeout(r), r = window.setTimeout(() => {
|
|
8
|
+
t(...e);
|
|
9
|
+
}, n);
|
|
10
|
+
};
|
|
11
|
+
},
|
|
12
|
+
debounceEvent(n, r = e.delay.default) {
|
|
13
|
+
return t.debounce(n, r);
|
|
14
|
+
},
|
|
15
|
+
throttle(t, n = e.delay.default, r) {
|
|
16
|
+
let i, a, o = 0, s = 0, c = () => {
|
|
17
|
+
s = r?.leading === !1 ? 0 : (/* @__PURE__ */ new Date()).getTime(), o = 0, i && (a = t(...i)), o || (i = void 0);
|
|
18
|
+
};
|
|
19
|
+
return (...e) => {
|
|
20
|
+
let l = (/* @__PURE__ */ new Date()).getTime();
|
|
21
|
+
!s && r?.leading === !1 && (s = l);
|
|
22
|
+
let u = n - l + s;
|
|
23
|
+
return i = e, u <= 0 || u > n ? (o &&= (clearTimeout(o), 0), s = l, a = t(...i), o || (i = void 0)) : !o && r?.trailing !== !1 && (o = window.setTimeout(c, u)), a;
|
|
24
|
+
};
|
|
25
|
+
},
|
|
26
|
+
throttleEvent(n, r = e.delay.default, i) {
|
|
27
|
+
return t.throttle(n, r, i);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
//#endregion
|
|
31
|
+
export { t as MintEvent, t as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var e={icons:{'a[href^="mailto:"]':`far fa-envelope`,'a[href^="tel:"]':`fas fa-phone-flip`,'a[href^="sms:"]':`far fa-message`,'a[href^="https://maps"]':`fas fa-map-location-dot`,'a[href^="http"]':`fas fa-up-right-from-square`},append(e,t){document.querySelectorAll(t).forEach(t=>{let n=document.createElement(`i`);n.classList.add(...e.split(` `)),t.querySelector(`i`)||t.appendChild(n),n.classList.contains(`fa-up-right-from-square`)&&t.setAttribute(`target`,`_blank`)})},update(t){let n={...e.icons,...t},r=Object.fromEntries(Object.entries(n).filter(e=>e[1]!==!1));Object.keys(r).forEach(t=>{e.append(r[t],t)})},remove(e){document.querySelectorAll(e).forEach(e=>{let t=e.querySelector(`i`);t&&t.remove()})}};exports.MintIcon=e,exports.default=e;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Icon helper functions
|
|
3
|
+
*/
|
|
4
|
+
export declare const MintIcon: {
|
|
5
|
+
/**
|
|
6
|
+
* Default icons
|
|
7
|
+
*/
|
|
8
|
+
icons: Record<string, string>;
|
|
9
|
+
/**
|
|
10
|
+
* Appends the given icon to the given selector if there is not already an icon appended
|
|
11
|
+
*/
|
|
12
|
+
append(icon: string, selector: string): void;
|
|
13
|
+
/**
|
|
14
|
+
* Updates the icons
|
|
15
|
+
* @param icons - the icons to update
|
|
16
|
+
*/
|
|
17
|
+
update(icons?: Record<string, string | false>): void;
|
|
18
|
+
/**
|
|
19
|
+
* Removes the icon from the given selector
|
|
20
|
+
*/
|
|
21
|
+
remove(selector: string): void;
|
|
22
|
+
};
|
|
23
|
+
export default MintIcon;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//#region src/ts/imports/util/icon.ts
|
|
2
|
+
var e = {
|
|
3
|
+
icons: {
|
|
4
|
+
"a[href^=\"mailto:\"]": "far fa-envelope",
|
|
5
|
+
"a[href^=\"tel:\"]": "fas fa-phone-flip",
|
|
6
|
+
"a[href^=\"sms:\"]": "far fa-message",
|
|
7
|
+
"a[href^=\"https://maps\"]": "fas fa-map-location-dot",
|
|
8
|
+
"a[href^=\"http\"]": "fas fa-up-right-from-square"
|
|
9
|
+
},
|
|
10
|
+
append(e, t) {
|
|
11
|
+
document.querySelectorAll(t).forEach((t) => {
|
|
12
|
+
let n = document.createElement("i");
|
|
13
|
+
n.classList.add(...e.split(" ")), t.querySelector("i") || t.appendChild(n), n.classList.contains("fa-up-right-from-square") && t.setAttribute("target", "_blank");
|
|
14
|
+
});
|
|
15
|
+
},
|
|
16
|
+
update(t) {
|
|
17
|
+
let n = {
|
|
18
|
+
...e.icons,
|
|
19
|
+
...t
|
|
20
|
+
}, r = Object.fromEntries(Object.entries(n).filter((e) => e[1] !== !1));
|
|
21
|
+
Object.keys(r).forEach((t) => {
|
|
22
|
+
e.append(r[t], t);
|
|
23
|
+
});
|
|
24
|
+
},
|
|
25
|
+
remove(e) {
|
|
26
|
+
document.querySelectorAll(e).forEach((e) => {
|
|
27
|
+
let t = e.querySelector("i");
|
|
28
|
+
t && t.remove();
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
33
|
+
export { e as MintIcon, e as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./math.cjs.js"),t=require("./async.cjs.js"),n=require("./settings.cjs.js"),r=require("./display.cjs.js"),i=require("./event.cjs.js"),a=require("./icon.cjs.js"),o=require("./list.cjs.js"),s=require("./object.cjs.js"),c=require("./scroll.cjs.js"),l=require("./selectors.cjs.js"),u=require("./text.cjs.js"),d=require("./window.cjs.js");exports.MintAsync=t.MintAsync,exports.MintDisplay=r.MintDisplay,exports.MintEvent=i.MintEvent,exports.MintIcon=a.MintIcon,exports.MintList=o.MintList,exports.MintMath=e.MintMath,exports.MintObject=s.MintObject,exports.MintScroll=c.MintScroll,exports.MintSelectors=l.MintSelectors,exports.MintSettings=n.MintSettings,exports.MintText=u.MintText,exports.MintWindow=d.MintWindow;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MintMath as e } from "./math.esm.js";
|
|
2
|
+
import { MintAsync as t } from "./async.esm.js";
|
|
3
|
+
import { MintSettings as n } from "./settings.esm.js";
|
|
4
|
+
import { MintDisplay as r } from "./display.esm.js";
|
|
5
|
+
import { MintEvent as i } from "./event.esm.js";
|
|
6
|
+
import { MintIcon as a } from "./icon.esm.js";
|
|
7
|
+
import { MintList as o } from "./list.esm.js";
|
|
8
|
+
import { MintObject as s } from "./object.esm.js";
|
|
9
|
+
import { MintScroll as c } from "./scroll.esm.js";
|
|
10
|
+
import { MintSelectors as l } from "./selectors.esm.js";
|
|
11
|
+
import { MintText as u } from "./text.esm.js";
|
|
12
|
+
import { MintWindow as d } from "./window.esm.js";
|
|
13
|
+
export { t as MintAsync, r as MintDisplay, i as MintEvent, a as MintIcon, o as MintList, e as MintMath, s as MintObject, c as MintScroll, l as MintSelectors, n as MintSettings, u as MintText, d as MintWindow };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var e={shuffleCopy(e){let t=[...e];for(let e=t.length-1;e>0;e--){let n=Math.floor(Math.random()*(e+1));[t[e],t[n]]=[t[n],t[e]]}return t},filter(e,t){let n=0;for(let r of e.slice())t(r)&&(e[n++]=r);return e.length=n,e},unique(e){return[...new Set(e)]}};exports.MintList=e,exports.default=e;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* List functions for the util library
|
|
3
3
|
*/
|
|
4
|
-
export declare
|
|
4
|
+
export declare const MintList: {
|
|
5
5
|
/**
|
|
6
6
|
* Returns a copy of the provided list with the items in random order
|
|
7
7
|
* @param list - the list to shuffle
|
|
8
8
|
* @returns - the shuffled list
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
shuffleCopy<T>(list: T[]): T[];
|
|
11
11
|
/**
|
|
12
12
|
* Filters the array in place based on a test condition and returns the filtered array.
|
|
13
13
|
* This method modifies the original array by removing elements that do not pass the test implemented by the provided function.
|
|
@@ -17,13 +17,12 @@ export declare abstract class MintList {
|
|
|
17
17
|
* @param {(item: T) => boolean} test A function that tests each element of the array. Return `true` to keep the element, `false` otherwise.
|
|
18
18
|
* @returns {T[]} The original array with only the elements that passed the test.
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
filter<T>(list: T[], test: (item: T) => boolean): T[];
|
|
21
21
|
/**
|
|
22
22
|
* Returns a copy of the provided list with unique items
|
|
23
23
|
* @param list - the list to unique
|
|
24
24
|
* @returns - the unique list
|
|
25
25
|
*/
|
|
26
|
-
|
|
27
|
-
}
|
|
26
|
+
unique<T>(list: T[]): T[];
|
|
27
|
+
};
|
|
28
28
|
export default MintList;
|
|
29
|
-
//# sourceMappingURL=list.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//#region src/ts/imports/util/list.ts
|
|
2
|
+
var e = {
|
|
3
|
+
shuffleCopy(e) {
|
|
4
|
+
let t = [...e];
|
|
5
|
+
for (let e = t.length - 1; e > 0; e--) {
|
|
6
|
+
let n = Math.floor(Math.random() * (e + 1));
|
|
7
|
+
[t[e], t[n]] = [t[n], t[e]];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
},
|
|
11
|
+
filter(e, t) {
|
|
12
|
+
let n = 0;
|
|
13
|
+
for (let r of e.slice()) t(r) && (e[n++] = r);
|
|
14
|
+
return e.length = n, e;
|
|
15
|
+
},
|
|
16
|
+
unique(e) {
|
|
17
|
+
return [...new Set(e)];
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
export { e as MintList, e as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e={randomInt(e,t=0){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t)+t)},clamp(e,t,n){return Math.max(Math.min(e??t,n),t)},headerMin:1,headerMax:6,headerLevel(t){return e.clamp(t,e.headerMin,e.headerMax)}};exports.MintMath=e;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Math functions for the util library
|
|
3
3
|
*/
|
|
4
|
-
export declare
|
|
4
|
+
export declare const MintMath: {
|
|
5
5
|
/**
|
|
6
6
|
* Get a random integer between min and max
|
|
7
7
|
* @param max Maximum value to return
|
|
8
8
|
* @param min Minimum value to return (default is 0)
|
|
9
9
|
* @returns a random integer between min and max
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
randomInt(max: number, min?: number): number;
|
|
12
12
|
/**
|
|
13
13
|
* Return a number between min and max
|
|
14
14
|
* @param num - the number to clamp
|
|
@@ -16,14 +16,13 @@ export declare abstract class MintMath {
|
|
|
16
16
|
* @param max - the maximum value
|
|
17
17
|
* @returns a number between min and max
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
clamp(num: number | undefined | null, min: number, max: number): number;
|
|
20
20
|
/**
|
|
21
21
|
* Return a valid header number
|
|
22
22
|
* @param num - the number to validate
|
|
23
23
|
* @returns a valid header number
|
|
24
24
|
*/
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=math.d.ts.map
|
|
25
|
+
headerMin: number;
|
|
26
|
+
headerMax: number;
|
|
27
|
+
headerLevel(num?: number | null): number;
|
|
28
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//#region src/ts/imports/util/math.ts
|
|
2
|
+
var e = {
|
|
3
|
+
randomInt(e, t = 0) {
|
|
4
|
+
return t = Math.ceil(t), e = Math.floor(e), Math.floor(Math.random() * (e - t) + t);
|
|
5
|
+
},
|
|
6
|
+
clamp(e, t, n) {
|
|
7
|
+
return Math.max(Math.min(e ?? t, n), t);
|
|
8
|
+
},
|
|
9
|
+
headerMin: 1,
|
|
10
|
+
headerMax: 6,
|
|
11
|
+
headerLevel(t) {
|
|
12
|
+
return e.clamp(t, e.headerMin, e.headerMax);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { e as MintMath };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var e={isSimilar(e,t){let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;let r=!0;return n.forEach(n=>{e[n]!==t[n]&&(r=!1)}),r},isSuperset(t,n){let r=!0;if(t===n)return r;try{if(Object.keys(n).length===0)return!r}catch{return!r}let i=n,a=t??{};return Object.keys(i).forEach(t=>{r&&=e.isSuperset(a[t],i[t])}),r},remove(t,n){return e.removeKeys(t,n)},removeKeys(e,t){return Object.keys(e).reduce((n,r)=>(t.includes(r)||(n[r]=e[r]),n),{})},removeValues(e,t){return Object.keys(e).reduce((n,r)=>(t.includes(e[r])||(n[r]=e[r]),n),{})},sort(t,n){return e.sortKeys(t,n)},sortKeys(e,t){return Object.keys(e).sort(t).reduce((t,n)=>(t[n]=e[n],t),{})},sortValues(e,t){return Object.keys(e).sort((n,r)=>t(e[n],e[r])).reduce((t,n)=>(t[n]=e[n],t),{})},filter(t,n){return e.filterKeys(t,n)},filterKeys(e,t){return t.reduce((t,n)=>(t[n]=e[n],t),{})},filterValues(e,t){return Object.keys(e).reduce((n,r)=>(t.includes(e[r])&&(n[r]=e[r]),n),{})},updateArray(e,t,n=`id`){let r=e=>typeof e==`string`||typeof e==`number`?String(e):``;if(!t?.length)return;let i=t.reduce((e,t)=>({...e,[r(t[n])]:t}),{});e.filter(e=>!(r(e[n])in i)).forEach(t=>{let n=e.indexOf(t);n!==-1&&e.splice(n,1)}),e.forEach(e=>{let t=r(e[n]);t in i&&Object.assign(e,i[t])}),t.filter(t=>!e.some(e=>e[n]===t[n])).forEach(t=>e.push(t))},getKeyByValue(e,t){return Object.keys(e).find(n=>e[n]===t)},deepClone(e){if(typeof e!=`object`||!e)return e;let t=new WeakMap,n=[[e,Array.isArray(e)?[]:{}]];for(;n.length;){let e=n.pop();if(!e)break;let[r,i,a]=e;if(a!==void 0){let e=r[a];if(typeof e==`function`){i[a]=e.bind(i);continue}if(typeof e!=`object`||!e){i[a]=e;continue}if(t.has(e)){i[a]=t.get(e);continue}i[a]=Array.isArray(e)?[]:{},t.set(e,i[a]),n.push([e,i[a]])}else{if(t.set(r,i),Array.isArray(r)){r.forEach((e,t)=>{n.push([r,i,t])});continue}Object.keys(r).forEach(e=>{n.push([r,i,e])})}}return t.get(e)}};exports.MintObject=e,exports.default=e;
|