mazey 3.3.5 → 3.3.6
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/LICENSE +21 -21
- package/README.md +535 -568
- package/README_CN.md +334 -334
- package/examples/index.html +21 -21
- package/examples/index.ts +70 -50
- package/images/mazey-v1.4.39.svg +0 -0
- package/lib/index.cjs.js +2 -2
- package/lib/index.d.ts +0 -0
- package/lib/index.d.ts.map +0 -0
- package/lib/index.esm.js +2 -2
- package/lib/mazey.min.js +2 -2
- package/package.json +110 -109
- package/scripts/build-helper.js +17 -17
- package/scripts/dev.js +22 -19
- package/scripts/github-helper.js +110 -57
- package/scripts/release.js +7 -7
- package/scripts/webpack.config.dev.js +39 -39
- package/src/index.ts +1608 -1608
- package/src/{index.js → preview.js} +47 -47
- package/src/t.html +18 -0
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author: Mazey Chu
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
// Define event.
|
|
6
|
-
let defineListeners = {};
|
|
7
|
-
|
|
8
|
-
// Add event.
|
|
9
|
-
function addEvent(type, fn) {
|
|
10
|
-
if (typeof defineListeners[type] === "undefined") {
|
|
11
|
-
defineListeners[type] = [];
|
|
12
|
-
}
|
|
13
|
-
if (typeof fn === "function") {
|
|
14
|
-
defineListeners[type].push(fn);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// Invoke event.
|
|
19
|
-
function fireEvent(type) {
|
|
20
|
-
let arrayEvent = defineListeners[type];
|
|
21
|
-
if (arrayEvent instanceof Array) {
|
|
22
|
-
for (let i = 0, length = arrayEvent.length; i < length; i++) {
|
|
23
|
-
if (typeof arrayEvent[i] === "function") {
|
|
24
|
-
arrayEvent[i]({
|
|
25
|
-
type: type
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
// Remove event.
|
|
33
|
-
function removeEvent(type, fn) {
|
|
34
|
-
let arrayEvent = defineListeners[type];
|
|
35
|
-
if (typeof type === "string" && arrayEvent instanceof Array) {
|
|
36
|
-
if (typeof fn === "function") {
|
|
37
|
-
for (let i = 0, length = arrayEvent.length; i < length; i++) {
|
|
38
|
-
if (arrayEvent[i] === fn) {
|
|
39
|
-
defineListeners[type].splice(i, 1);
|
|
40
|
-
break;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
} else {
|
|
44
|
-
delete defineListeners[type];
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @author: Mazey Chu
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// Define event.
|
|
6
|
+
let defineListeners = {};
|
|
7
|
+
|
|
8
|
+
// Add event.
|
|
9
|
+
function addEvent(type, fn) {
|
|
10
|
+
if (typeof defineListeners[type] === "undefined") {
|
|
11
|
+
defineListeners[type] = [];
|
|
12
|
+
}
|
|
13
|
+
if (typeof fn === "function") {
|
|
14
|
+
defineListeners[type].push(fn);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// Invoke event.
|
|
19
|
+
function fireEvent(type) {
|
|
20
|
+
let arrayEvent = defineListeners[type];
|
|
21
|
+
if (arrayEvent instanceof Array) {
|
|
22
|
+
for (let i = 0, length = arrayEvent.length; i < length; i++) {
|
|
23
|
+
if (typeof arrayEvent[i] === "function") {
|
|
24
|
+
arrayEvent[i]({
|
|
25
|
+
type: type
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Remove event.
|
|
33
|
+
function removeEvent(type, fn) {
|
|
34
|
+
let arrayEvent = defineListeners[type];
|
|
35
|
+
if (typeof type === "string" && arrayEvent instanceof Array) {
|
|
36
|
+
if (typeof fn === "function") {
|
|
37
|
+
for (let i = 0, length = arrayEvent.length; i < length; i++) {
|
|
38
|
+
if (arrayEvent[i] === fn) {
|
|
39
|
+
defineListeners[type].splice(i, 1);
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
} else {
|
|
44
|
+
delete defineListeners[type];
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
package/src/t.html
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang=zh>
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset=UTF-8>
|
|
6
|
+
<meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no">
|
|
7
|
+
<meta http-equiv=X-UA-Compatible content="ie=edge">
|
|
8
|
+
<meta name=format-detection content="telephone=no,date=no,address=no,email=no,url=no">
|
|
9
|
+
<title>redirect...</title>
|
|
10
|
+
</head>
|
|
11
|
+
|
|
12
|
+
<body>
|
|
13
|
+
<script>
|
|
14
|
+
location.href="./modules/_index_.html";
|
|
15
|
+
</script>
|
|
16
|
+
</body>
|
|
17
|
+
|
|
18
|
+
</html>
|