menupro 2.0.5 → 2.1.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/FUNDING.yml +16 -0
- package/README.md +5 -1
- package/SECURITY.md +3 -0
- package/index.cjs +81 -0
- package/index.css +111 -0
- package/index.d.ts +0 -7
- package/index.js +79 -1
- package/package.json +48 -35
- package/types/files.d.ts +38 -0
- package/types/menupro.d.ts +11 -9
package/FUNDING.yml
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# These are supported funding model platforms
|
|
2
|
+
|
|
3
|
+
github: passariello
|
|
4
|
+
patreon: passariello
|
|
5
|
+
open_collective: # Replace with a single Open Collective username
|
|
6
|
+
ko_fi: passariello
|
|
7
|
+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
|
8
|
+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
+
liberapay: passariello
|
|
10
|
+
issuehunt: passariello
|
|
11
|
+
otechie: # Replace with a single Otechie username
|
|
12
|
+
custom:
|
|
13
|
+
[
|
|
14
|
+
"https://dario.passariello.ca",
|
|
15
|
+
"https://www.indiegogo.com/individuals/28513718",
|
|
16
|
+
]
|
package/README.md
CHANGED
|
@@ -140,6 +140,10 @@ The `onclick` property supports multiple formats:
|
|
|
140
140
|
</html>
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
+
## License
|
|
144
|
+
|
|
145
|
+
MIT License
|
|
146
|
+
|
|
143
147
|
## Credits
|
|
144
148
|
|
|
145
|
-
|
|
149
|
+
Copyrigth (c) [Dario Passariello](https://dario.passariello.ca/)
|
package/SECURITY.md
ADDED
package/index.cjs
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
;(()=>{const s=document.createElement("style");s.textContent="@layer menupro {.menupro{position:relative;margin:0;padding:0;}.menupro ul,.menupro li,.menupro ul{background-color:#000;list-style:none;margin:0;padding:0;}.menupro img,.menupro svg{max-width:20px;}.menupro li:hover{transition:0s;transition-delay:0s;}.menupro ul,.menupro ul,.menupro ul:hover,.menupro ul:hover{transition:0s;transition-delay:0.5s;}.menupro hr{border:1px solid !important;height:0 !important;color:#333 !important;background-color:#333 !important;margin:0;padding:0;}.menupro a{padding:4px 10px;display:block;text-align:left;white-space:nowrap;}.menupro:hover{background-color:#0b86bf;}.menupro li{float:left;position:relative;}.menupro li:hover,.menupro li:active{background-color:#0b86bf;}.menupro li:hover > ul,.menupro li:focus-within > ul{opacity:1;visibility:visible;transition-delay:visibility 0s;}.menupro li > span.icon{position:absolute;left:5px;top:8px;width:13px;height:auto;filter:invert(0.5);}.menupro li > span.arrow:before{content:\u0022\\203a\u0022;position:absolute;right:5px;top:0;font-size:1.5em;line-height:1em;}.menupro li > ul{position:absolute;width:auto;float:left;opacity:0;visibility:hidden;transition-delay:visibility 0s;box-shadow:0 10px 12px -8px black;padding:0;}.menupro li > ul li{float:left;position:relative;width:100%;padding:0;}.menupro li > ul li:hover > ul,.menupro li > ul li:focus-within > ul{opacity:1;pointer-events:auto;}.menupro li > ul li:not(:visible){pointer-events:none;}.menupro li > ul li > ul{position:absolute;margin:0 auto;top:0px;left:99%;}.menupro li > ul li a{padding:4px 20px 4px 30px;}}";document.head.appendChild(s)})();"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(window, "menupro", {
|
|
4
|
+
value: {
|
|
5
|
+
start: {}
|
|
6
|
+
},
|
|
7
|
+
writable: !1,
|
|
8
|
+
configurable: !1,
|
|
9
|
+
enumerable: !1
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
var e = new Set([ "eval", "Function", "exec", "spawn", "execSync", "fetch", "XMLHttpRequest", "WebSocket", "importScripts", "setTimeout", "setInterval", "setImmediate", "document.write", "document.writeln", "innerHTML", "outerHTML", "location", "location.href", "location.assign", "location.replace", "history.pushState", "history.replaceState", "localStorage", "sessionStorage", "cookie", "postMessage", "import", "require" ]), t = t => /^[a-zA-Z_$][a-zA-Z0-9_$.]*$/.test(t) && !e.has(t) && !t.includes("__");
|
|
13
|
+
|
|
14
|
+
menupro.start = e => {
|
|
15
|
+
const {element: n, name: i = e.name || "menupro", nav: s = e.nav || []} = e;
|
|
16
|
+
let o, c;
|
|
17
|
+
const a = e => document.createElement(e), l = (e, n = "." + i) => {
|
|
18
|
+
const s = "string" == typeof n ? document.querySelector(n) : n;
|
|
19
|
+
s && e?.map(e => {
|
|
20
|
+
if (e.name) {
|
|
21
|
+
o = a("li");
|
|
22
|
+
const t = a("a");
|
|
23
|
+
t.textContent = e.name, o.appendChild(t), s.appendChild(o);
|
|
24
|
+
}
|
|
25
|
+
if (e.onclick && 0 === e.sub?.length) {
|
|
26
|
+
let n;
|
|
27
|
+
if ("function" == typeof e.onclick) n = e.onclick; else if ("string" == typeof e.onclick) {
|
|
28
|
+
const i = e.onclick.trim();
|
|
29
|
+
if (i.includes("(") && i.endsWith(")")) {
|
|
30
|
+
const e = i.match(/^(\w+)\((.*)\)$/);
|
|
31
|
+
if (e) {
|
|
32
|
+
const [, i, s] = e;
|
|
33
|
+
if (t(i)) {
|
|
34
|
+
const e = window[i];
|
|
35
|
+
if (e && "function" == typeof e) {
|
|
36
|
+
const t = e => {
|
|
37
|
+
const t = e.trim();
|
|
38
|
+
return t.startsWith('"') && t.endsWith('"') || t.startsWith("'") && t.endsWith("'") ? t.slice(1, -1) : isNaN(Number(t)) ? "true" === t || "false" !== t && ("null" === t ? null : void 0) : Number(t);
|
|
39
|
+
}, i = [];
|
|
40
|
+
if (s.trim()) {
|
|
41
|
+
let e = "", n = 0, o = !1, c = "";
|
|
42
|
+
for (const a of s) '"' !== a && "'" !== a || "\\" === e.slice(-1) || (o ? a === c && (o = !1,
|
|
43
|
+
c = "") : (o = !0, c = a)), o || "(" !== a || n++, o || ")" !== a || n--, o || 0 !== n || "," !== a ? e += a : (i.push(t(e)),
|
|
44
|
+
e = "");
|
|
45
|
+
e.trim() && i.push(t(e));
|
|
46
|
+
}
|
|
47
|
+
n = () => {
|
|
48
|
+
try {
|
|
49
|
+
e(...i);
|
|
50
|
+
} catch (e) {}
|
|
51
|
+
};
|
|
52
|
+
} else n = () => {};
|
|
53
|
+
} else n = () => {};
|
|
54
|
+
} else n = () => {};
|
|
55
|
+
} else if (t(i)) {
|
|
56
|
+
const e = window[i];
|
|
57
|
+
n = e || (() => {});
|
|
58
|
+
} else n = () => {};
|
|
59
|
+
} else n = () => {};
|
|
60
|
+
o.addEventListener("click", n);
|
|
61
|
+
}
|
|
62
|
+
if ("" === e.name && (o = a("hr"), s.appendChild(o)), n != "." + i) {
|
|
63
|
+
if (e.icon) {
|
|
64
|
+
const t = a("span");
|
|
65
|
+
t.className = "icon", t.innerHTML = e.icon, o.appendChild(t);
|
|
66
|
+
}
|
|
67
|
+
if (e.sub?.length > 0) {
|
|
68
|
+
const e = a("span");
|
|
69
|
+
e.className = "arrow", o.appendChild(e);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
e.sub?.length > 0 && (c = a("ul"), o.appendChild(c), l(e.sub, c));
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
setTimeout(() => {
|
|
76
|
+
const e = a("ul");
|
|
77
|
+
e.className = i;
|
|
78
|
+
const t = "string" == typeof n ? document.querySelector(n) : n;
|
|
79
|
+
t && (t.appendChild(e), l(s, e));
|
|
80
|
+
}, 0);
|
|
81
|
+
};
|
package/index.css
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
|
|
3
|
+
/* scss/menupro.scss */
|
|
4
|
+
.menupro {
|
|
5
|
+
position: relative;
|
|
6
|
+
margin: 0;
|
|
7
|
+
padding: 0;
|
|
8
|
+
}
|
|
9
|
+
.menupro ul,
|
|
10
|
+
.menupro li,
|
|
11
|
+
.menupro ul {
|
|
12
|
+
background-color: #000;
|
|
13
|
+
list-style: none;
|
|
14
|
+
margin: 0;
|
|
15
|
+
padding: 0;
|
|
16
|
+
}
|
|
17
|
+
.menupro img,
|
|
18
|
+
.menupro svg {
|
|
19
|
+
max-width: 20px;
|
|
20
|
+
}
|
|
21
|
+
.menupro li:hover {
|
|
22
|
+
transition: 0s;
|
|
23
|
+
transition-delay: 0s;
|
|
24
|
+
}
|
|
25
|
+
.menupro ul,
|
|
26
|
+
.menupro ul,
|
|
27
|
+
.menupro ul:hover,
|
|
28
|
+
.menupro ul:hover {
|
|
29
|
+
transition: 0s;
|
|
30
|
+
transition-delay: 0.5s;
|
|
31
|
+
}
|
|
32
|
+
.menupro hr {
|
|
33
|
+
border: 1px solid !important;
|
|
34
|
+
height: 0 !important;
|
|
35
|
+
color: #333 !important;
|
|
36
|
+
background-color: #333 !important;
|
|
37
|
+
margin: 0;
|
|
38
|
+
padding: 0;
|
|
39
|
+
}
|
|
40
|
+
.menupro a {
|
|
41
|
+
padding: 4px 10px;
|
|
42
|
+
display: block;
|
|
43
|
+
text-align: left;
|
|
44
|
+
white-space: nowrap;
|
|
45
|
+
}
|
|
46
|
+
.menupro :hover {
|
|
47
|
+
background-color: #0b86bf;
|
|
48
|
+
}
|
|
49
|
+
.menupro li {
|
|
50
|
+
float: left;
|
|
51
|
+
position: relative;
|
|
52
|
+
}
|
|
53
|
+
.menupro li :hover,
|
|
54
|
+
.menupro li :active {
|
|
55
|
+
background-color: #0b86bf;
|
|
56
|
+
}
|
|
57
|
+
.menupro li:hover > ul,
|
|
58
|
+
.menupro li:focus-within > ul {
|
|
59
|
+
opacity: 1;
|
|
60
|
+
visibility: visible;
|
|
61
|
+
transition-delay: visibility 0s;
|
|
62
|
+
}
|
|
63
|
+
.menupro li > span.icon {
|
|
64
|
+
position: absolute;
|
|
65
|
+
left: 5px;
|
|
66
|
+
top: 8px;
|
|
67
|
+
width: 13px;
|
|
68
|
+
height: auto;
|
|
69
|
+
filter: invert(0.5);
|
|
70
|
+
}
|
|
71
|
+
.menupro li > span.arrow:before {
|
|
72
|
+
content: "\203a";
|
|
73
|
+
position: absolute;
|
|
74
|
+
right: 5px;
|
|
75
|
+
top: 0;
|
|
76
|
+
font-size: 1.5em;
|
|
77
|
+
line-height: 1em;
|
|
78
|
+
}
|
|
79
|
+
.menupro li > ul {
|
|
80
|
+
position: absolute;
|
|
81
|
+
width: auto;
|
|
82
|
+
float: left;
|
|
83
|
+
opacity: 0;
|
|
84
|
+
visibility: hidden;
|
|
85
|
+
transition-delay: visibility 0s;
|
|
86
|
+
box-shadow: 0 10px 12px -8px black;
|
|
87
|
+
padding: 0;
|
|
88
|
+
}
|
|
89
|
+
.menupro li > ul li {
|
|
90
|
+
float: left;
|
|
91
|
+
position: relative;
|
|
92
|
+
width: 100%;
|
|
93
|
+
padding: 0;
|
|
94
|
+
}
|
|
95
|
+
.menupro li > ul li:hover > ul,
|
|
96
|
+
.menupro li > ul li:focus-within > ul {
|
|
97
|
+
opacity: 1;
|
|
98
|
+
pointer-events: auto;
|
|
99
|
+
}
|
|
100
|
+
.menupro li > ul li:not(:visible) {
|
|
101
|
+
pointer-events: none;
|
|
102
|
+
}
|
|
103
|
+
.menupro li > ul li > ul {
|
|
104
|
+
position: absolute;
|
|
105
|
+
margin: 0 auto;
|
|
106
|
+
top: 0px;
|
|
107
|
+
left: 99%;
|
|
108
|
+
}
|
|
109
|
+
.menupro li > ul li a {
|
|
110
|
+
padding: 4px 20px 4px 30px;
|
|
111
|
+
}
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -1 +1,79 @@
|
|
|
1
|
-
|
|
1
|
+
;(()=>{const s=document.createElement("style");s.textContent="@layer menupro {.menupro{position:relative;margin:0;padding:0;}.menupro ul,.menupro li,.menupro ul{background-color:#000;list-style:none;margin:0;padding:0;}.menupro img,.menupro svg{max-width:20px;}.menupro li:hover{transition:0s;transition-delay:0s;}.menupro ul,.menupro ul,.menupro ul:hover,.menupro ul:hover{transition:0s;transition-delay:0.5s;}.menupro hr{border:1px solid !important;height:0 !important;color:#333 !important;background-color:#333 !important;margin:0;padding:0;}.menupro a{padding:4px 10px;display:block;text-align:left;white-space:nowrap;}.menupro:hover{background-color:#0b86bf;}.menupro li{float:left;position:relative;}.menupro li:hover,.menupro li:active{background-color:#0b86bf;}.menupro li:hover > ul,.menupro li:focus-within > ul{opacity:1;visibility:visible;transition-delay:visibility 0s;}.menupro li > span.icon{position:absolute;left:5px;top:8px;width:13px;height:auto;filter:invert(0.5);}.menupro li > span.arrow:before{content:\u0022\\203a\u0022;position:absolute;right:5px;top:0;font-size:1.5em;line-height:1em;}.menupro li > ul{position:absolute;width:auto;float:left;opacity:0;visibility:hidden;transition-delay:visibility 0s;box-shadow:0 10px 12px -8px black;padding:0;}.menupro li > ul li{float:left;position:relative;width:100%;padding:0;}.menupro li > ul li:hover > ul,.menupro li > ul li:focus-within > ul{opacity:1;pointer-events:auto;}.menupro li > ul li:not(:visible){pointer-events:none;}.menupro li > ul li > ul{position:absolute;margin:0 auto;top:0px;left:99%;}.menupro li > ul li a{padding:4px 20px 4px 30px;}}";document.head.appendChild(s)})();Object.defineProperty(window, "menupro", {
|
|
2
|
+
value: {
|
|
3
|
+
start: {}
|
|
4
|
+
},
|
|
5
|
+
writable: !1,
|
|
6
|
+
configurable: !1,
|
|
7
|
+
enumerable: !1
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
var e = new Set([ "eval", "Function", "exec", "spawn", "execSync", "fetch", "XMLHttpRequest", "WebSocket", "importScripts", "setTimeout", "setInterval", "setImmediate", "document.write", "document.writeln", "innerHTML", "outerHTML", "location", "location.href", "location.assign", "location.replace", "history.pushState", "history.replaceState", "localStorage", "sessionStorage", "cookie", "postMessage", "import", "require" ]), t = t => /^[a-zA-Z_$][a-zA-Z0-9_$.]*$/.test(t) && !e.has(t) && !t.includes("__");
|
|
11
|
+
|
|
12
|
+
menupro.start = e => {
|
|
13
|
+
const {element: n, name: i = e.name || "menupro", nav: s = e.nav || []} = e;
|
|
14
|
+
let o, c;
|
|
15
|
+
const a = e => document.createElement(e), l = (e, n = "." + i) => {
|
|
16
|
+
const s = "string" == typeof n ? document.querySelector(n) : n;
|
|
17
|
+
s && e?.map(e => {
|
|
18
|
+
if (e.name) {
|
|
19
|
+
o = a("li");
|
|
20
|
+
const t = a("a");
|
|
21
|
+
t.textContent = e.name, o.appendChild(t), s.appendChild(o);
|
|
22
|
+
}
|
|
23
|
+
if (e.onclick && 0 === e.sub?.length) {
|
|
24
|
+
let n;
|
|
25
|
+
if ("function" == typeof e.onclick) n = e.onclick; else if ("string" == typeof e.onclick) {
|
|
26
|
+
const i = e.onclick.trim();
|
|
27
|
+
if (i.includes("(") && i.endsWith(")")) {
|
|
28
|
+
const e = i.match(/^(\w+)\((.*)\)$/);
|
|
29
|
+
if (e) {
|
|
30
|
+
const [, i, s] = e;
|
|
31
|
+
if (t(i)) {
|
|
32
|
+
const e = window[i];
|
|
33
|
+
if (e && "function" == typeof e) {
|
|
34
|
+
const t = e => {
|
|
35
|
+
const t = e.trim();
|
|
36
|
+
return t.startsWith('"') && t.endsWith('"') || t.startsWith("'") && t.endsWith("'") ? t.slice(1, -1) : isNaN(Number(t)) ? "true" === t || "false" !== t && ("null" === t ? null : void 0) : Number(t);
|
|
37
|
+
}, i = [];
|
|
38
|
+
if (s.trim()) {
|
|
39
|
+
let e = "", n = 0, o = !1, c = "";
|
|
40
|
+
for (const a of s) '"' !== a && "'" !== a || "\\" === e.slice(-1) || (o ? a === c && (o = !1,
|
|
41
|
+
c = "") : (o = !0, c = a)), o || "(" !== a || n++, o || ")" !== a || n--, o || 0 !== n || "," !== a ? e += a : (i.push(t(e)),
|
|
42
|
+
e = "");
|
|
43
|
+
e.trim() && i.push(t(e));
|
|
44
|
+
}
|
|
45
|
+
n = () => {
|
|
46
|
+
try {
|
|
47
|
+
e(...i);
|
|
48
|
+
} catch (e) {}
|
|
49
|
+
};
|
|
50
|
+
} else n = () => {};
|
|
51
|
+
} else n = () => {};
|
|
52
|
+
} else n = () => {};
|
|
53
|
+
} else if (t(i)) {
|
|
54
|
+
const e = window[i];
|
|
55
|
+
n = e || (() => {});
|
|
56
|
+
} else n = () => {};
|
|
57
|
+
} else n = () => {};
|
|
58
|
+
o.addEventListener("click", n);
|
|
59
|
+
}
|
|
60
|
+
if ("" === e.name && (o = a("hr"), s.appendChild(o)), n != "." + i) {
|
|
61
|
+
if (e.icon) {
|
|
62
|
+
const t = a("span");
|
|
63
|
+
t.className = "icon", t.innerHTML = e.icon, o.appendChild(t);
|
|
64
|
+
}
|
|
65
|
+
if (e.sub?.length > 0) {
|
|
66
|
+
const e = a("span");
|
|
67
|
+
e.className = "arrow", o.appendChild(e);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
e.sub?.length > 0 && (c = a("ul"), o.appendChild(c), l(e.sub, c));
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
setTimeout(() => {
|
|
74
|
+
const e = a("ul");
|
|
75
|
+
e.className = i;
|
|
76
|
+
const t = "string" == typeof n ? document.querySelector(n) : n;
|
|
77
|
+
t && (t.appendChild(e), l(s, e));
|
|
78
|
+
}, 0);
|
|
79
|
+
};
|
package/package.json
CHANGED
|
@@ -1,24 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "menupro",
|
|
3
|
-
"
|
|
4
|
-
"version": "2.
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
],
|
|
3
|
+
"code": "menupro",
|
|
4
|
+
"version": "2.1.1",
|
|
5
|
+
"description": "Custom menu like OS but better",
|
|
6
|
+
"main": "./index.cjs",
|
|
7
|
+
"browser": "./index.cjs",
|
|
8
|
+
"types": "./index.d.ts",
|
|
9
|
+
"typing": "./types/*",
|
|
10
|
+
"homepage": "https://a51.gitbook.io/menupro",
|
|
12
11
|
"license": "MIT",
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"homepage": "https://a51.dev/npm/menupro",
|
|
16
|
-
"main": "./index.js",
|
|
17
|
-
"author": {
|
|
18
|
-
"name": "Dario Passariello",
|
|
19
|
-
"url": "https://github.com/passariello/",
|
|
20
|
-
"email": "dariopassariello@gmail.com"
|
|
21
|
-
},
|
|
12
|
+
"copyright": "Dario Passariello",
|
|
13
|
+
"author": "Dario Passariello",
|
|
22
14
|
"contributors": [
|
|
23
15
|
{
|
|
24
16
|
"name": "Dario Passariello",
|
|
@@ -29,29 +21,50 @@
|
|
|
29
21
|
"email": "valeriacalascaglitta@gmail.com"
|
|
30
22
|
}
|
|
31
23
|
],
|
|
24
|
+
"keywords": [
|
|
25
|
+
"layer",
|
|
26
|
+
"popup",
|
|
27
|
+
"modal",
|
|
28
|
+
"menupro",
|
|
29
|
+
"ui",
|
|
30
|
+
"ux",
|
|
31
|
+
"frontend",
|
|
32
|
+
"gui",
|
|
33
|
+
"styles",
|
|
34
|
+
"customization"
|
|
35
|
+
],
|
|
32
36
|
"funding": [
|
|
33
37
|
{
|
|
34
38
|
"type": "patreon",
|
|
35
39
|
"url": "https://www.patreon.com/passariello"
|
|
36
40
|
}
|
|
37
41
|
],
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
"engines": {
|
|
43
|
+
"node": ">=18.0.0"
|
|
44
|
+
},
|
|
45
|
+
"files": [
|
|
46
|
+
"**/*"
|
|
42
47
|
],
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
|
|
48
|
+
"repository": {
|
|
49
|
+
"type": "git",
|
|
50
|
+
"url": "git+https://github.com/a51-dev/a51.menupro.git"
|
|
51
|
+
},
|
|
52
|
+
"bugs": {
|
|
53
|
+
"url": "https://github.com/a51-dev/a51.menupro/issues"
|
|
54
|
+
},
|
|
55
|
+
"support": {
|
|
56
|
+
"name": "Dario Passariello",
|
|
57
|
+
"url": "https://dario.passariello.ca/",
|
|
58
|
+
"email": "dariopassariello@gmail.com"
|
|
59
|
+
},
|
|
60
|
+
"module": "./index.js",
|
|
61
|
+
"exports": {
|
|
62
|
+
".": {
|
|
63
|
+
"import": "./index.js",
|
|
64
|
+
"require": "./index.cjs",
|
|
65
|
+
"types": "./index.d.ts"
|
|
66
|
+
},
|
|
67
|
+
"./types/*": "./types/*"
|
|
47
68
|
},
|
|
48
|
-
"
|
|
49
|
-
"@types/node": "^25.3.3",
|
|
50
|
-
"esbuild": "^0.27.3",
|
|
51
|
-
"esbuild-sass-plugin": "3.6.0",
|
|
52
|
-
"sass": "^1.97.3",
|
|
53
|
-
"ts-node": "10.9.2",
|
|
54
|
-
"tslib": "2.8.1",
|
|
55
|
-
"typescript": "5.9.3"
|
|
56
|
-
}
|
|
69
|
+
"typings": "./index.d.ts"
|
|
57
70
|
}
|
package/types/files.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
declare module '*.js' {
|
|
2
|
+
const value: any
|
|
3
|
+
export default value
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
declare module "*.svg" {
|
|
9
|
+
const value: any
|
|
10
|
+
export default value
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
///
|
|
14
|
+
|
|
15
|
+
declare module '*.css'
|
|
16
|
+
|
|
17
|
+
declare module '*.scss' {
|
|
18
|
+
const resource: { [key: string]: string }
|
|
19
|
+
export = resource
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
declare module '*.module.scss' {
|
|
23
|
+
const classes: { [key: string]: string }
|
|
24
|
+
export default classes
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
declare module '*.sass' {
|
|
28
|
+
const resource: { [key: string]: string }
|
|
29
|
+
export = resource
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
///
|
|
33
|
+
|
|
34
|
+
declare module '*.htm'
|
|
35
|
+
declare module '*.html'
|
|
36
|
+
declare module '*.mp3'
|
|
37
|
+
declare module '*.ogg'
|
|
38
|
+
declare module '*.mp3'
|
package/types/menupro.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
interface _menupro {
|
|
2
|
+
[key: string]: any
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
interface Window {
|
|
6
|
+
[key: string]: any
|
|
7
|
+
}
|
|
5
8
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export default content
|
|
9
|
+
interface globalThis {
|
|
10
|
+
[key: string]: any
|
|
9
11
|
}
|
|
10
12
|
|
|
11
13
|
declare module 'menupro' {
|
|
@@ -13,5 +15,5 @@ declare module 'menupro' {
|
|
|
13
15
|
export = resource
|
|
14
16
|
}
|
|
15
17
|
|
|
16
|
-
declare var menupro:
|
|
17
|
-
type menupro =
|
|
18
|
+
declare var menupro: _menupro
|
|
19
|
+
type menupro = _menupro
|