amos-tool 1.6.2 → 1.6.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.
Files changed (35) hide show
  1. package/README.md +3 -0
  2. package/lib/log.js +17 -14
  3. package/lib/math/_keyColor.js +2 -1
  4. package/package.json +1 -1
  5. package/docs/Logger.html +0 -351
  6. package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
  7. package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  8. package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
  9. package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
  10. package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
  11. package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  12. package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
  13. package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
  14. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  15. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +0 -978
  16. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  17. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  18. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  19. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  20. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +0 -1049
  21. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  22. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  23. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  24. package/docs/global.html +0 -16622
  25. package/docs/index.html +0 -804
  26. package/docs/scripts/collapse.js +0 -20
  27. package/docs/scripts/linenumber.js +0 -25
  28. package/docs/scripts/nav.js +0 -12
  29. package/docs/scripts/polyfill.js +0 -4
  30. package/docs/scripts/prettify/Apache-License-2.0.txt +0 -202
  31. package/docs/scripts/prettify/lang-css.js +0 -2
  32. package/docs/scripts/prettify/prettify.js +0 -28
  33. package/docs/scripts/search.js +0 -83
  34. package/docs/styles/jsdoc.css +0 -765
  35. package/docs/styles/prettify.css +0 -79
package/README.md CHANGED
@@ -650,6 +650,9 @@ convert2Blob(canvas, fn, options)
650
650
 
651
651
  ## changelog
652
652
 
653
+ * v1.6.3
654
+ `*` fix Log
655
+
653
656
  * v1.6.1
654
657
  `*` fix saver
655
658
 
package/lib/log.js CHANGED
@@ -1,23 +1,23 @@
1
1
  "use strict";
2
2
 
3
3
  var Logger = function() {
4
- var o = this, i = 0, n = 1, t = 2, r = 3, c = 4, g = 5, s = console, f = [ "TRACE", "DEBUG", "INFO", "WARN", "ERROR", "FATAL" ];
5
- function l(i, n) {
4
+ var o = this, n = 0, i = 1, t = 2, r = 3, c = 4, f = 5, g = console, a = [ "TRACE", "DEBUG", "INFO", "WARN", "ERROR", "FATAL" ];
5
+ function l(n, i) {
6
6
  var t = [];
7
- for (var r in t.push(i), n) t.push(n[r]);
7
+ for (var r in t.push(n), i) t.push(i[r]);
8
8
  o.log.apply(o, t);
9
9
  }
10
10
  this.log = function() {
11
- var o = arguments[0], i = o === c;
12
- if (o = arguments[0] = "[" + f[o] + "] ", window.LogConfig && window.LogConfig.isDebug && (s.log.apply(s, arguments),
13
- i)) try {
14
- var n = Array.prototype.slice.call(arguments);
15
- throw n = n.slice(1), new Error(n.join(","));
11
+ var o = arguments[0], n = o === c;
12
+ if (o = arguments[0] = "[" + a[o] + "] ", window.LogConfig && window.LogConfig.isDebug && (g.log.apply(g, arguments),
13
+ n)) try {
14
+ var i = Array.prototype.slice.call(arguments);
15
+ throw i = i.slice(1), new Error(i.join(","));
16
16
  } catch (o) {}
17
17
  }, this.trace = function() {
18
- this.log && l(i, arguments);
19
- }, this.debug = function() {
20
18
  this.log && l(n, arguments);
19
+ }, this.debug = function() {
20
+ this.log && l(i, arguments);
21
21
  }, this.info = function() {
22
22
  this.log && l(t, arguments);
23
23
  }, this.warn = function() {
@@ -25,12 +25,15 @@ var Logger = function() {
25
25
  }, this.error = function() {
26
26
  this.log && l(c, arguments);
27
27
  }, this.fatal = function() {
28
- this.log && l(g, arguments);
28
+ this.log && l(f, arguments);
29
29
  }, this.clear = function() {
30
- s.clear();
30
+ g.clear();
31
31
  }, this.pkgInfo = function(o) {
32
- var i = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "1.0.0", n = "%c " + (o = o || "unknown") + " %c v".concat(i = i || "1.0.0", " "), t = "padding: 2px 1px; border-radius: 3px 0 0 3px; color: #fff; background: #4e5950; font-weight: bold;", r = "padding: 2px 1px; border-radius: 0 3px 3px 0; color: #fff; background: #49c31b; font-weight: bold;";
33
- s.log(n, t, r);
32
+ var n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "1.0.0", i = "%c " + (o = o || "unknown") + " %c v".concat(n = n || "1.0.0", " "), t = "padding: 2px 1px; border-radius: 3px 0 0 3px; color: #fff; background: #4e5950; font-weight: bold;", r = "padding: 2px 1px; border-radius: 0 3px 3px 0; color: #fff; background: #49c31b; font-weight: bold;";
33
+ g.log(i, t, r);
34
+ }, this.pkgWarn = function(o) {
35
+ var n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "1.0.0", i = "%c " + (o = o || "unknown") + " %c ".concat(n = n || "1.0.0", " "), t = "padding: 2px 1px; border-radius: 3px 0 0 3px; color: #fff; background: #ff8000; font-weight: bold;", r = "padding: 2px 1px; border-radius: 0 3px 3px 0; color: #fff; background: #878f99; font-weight: bold;";
36
+ g.log(i, t, r);
34
37
  };
35
38
  };
36
39
 
@@ -149,7 +149,8 @@ var colorKeyWordsHexStr = {
149
149
  whitesmoke: "#f5f5f5",
150
150
  yellow: "#ffff00",
151
151
  yellowgreen: "#9acd32",
152
- transparent: "rgba(0, 0, 0, 0)"
152
+ transparent: "rgba(0, 0, 0, 0)",
153
+ none: "rgba(0, 0, 0, 0)"
153
154
  };
154
155
 
155
156
  module.exports = colorKeyWordsHexStr;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "amos-tool",
3
- "version": "1.6.2",
3
+ "version": "1.6.4",
4
4
  "description": "amos ui tool",
5
5
  "main": "index.js",
6
6
  "directories": {
package/docs/Logger.html DELETED
@@ -1,351 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
-
5
- <meta charset="utf-8">
6
- <title>Logger - Documentation</title>
7
-
8
-
9
- <script src="scripts/prettify/prettify.js"></script>
10
- <script src="scripts/prettify/lang-css.js"></script>
11
- <!--[if lt IE 9]>
12
- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
13
- <![endif]-->
14
- <link type="text/css" rel="stylesheet" href="styles/prettify.css">
15
- <link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
16
- <script src="scripts/nav.js" defer></script>
17
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
18
- </head>
19
- <body>
20
-
21
- <input type="checkbox" id="nav-trigger" class="nav-trigger" />
22
- <label for="nav-trigger" class="navicon-button x">
23
- <div class="navicon"></div>
24
- </label>
25
-
26
- <label for="nav-trigger" class="overlay"></label>
27
-
28
- <nav >
29
-
30
- <input type="text" id="nav-search" placeholder="Search" />
31
-
32
- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Logger.html">Logger</a><ul class='methods'><li data-type='method'><a href="Logger.html#pkgInfo">pkgInfo</a></li></ul></li></ul><h3>Global</h3><ul><li><a href="global.html#_boost">_boost</a></li><li><a href="global.html#_defaultBrowsers">_defaultBrowsers</a></li><li><a href="global.html#_muiltBrowsers">_muiltBrowsers</a></li><li><a href="global.html#advancePolicy">advancePolicy</a></li><li><a href="global.html#alphaHexMap">alphaHexMap</a></li><li><a href="global.html#amosCookie">amosCookie</a></li><li><a href="global.html#array2tree">array2tree</a></li><li><a href="global.html#arrayFilter">arrayFilter</a></li><li><a href="global.html#beautifyRoutes">beautifyRoutes</a></li><li><a href="global.html#browserSupport">browserSupport</a></li><li><a href="global.html#bt4ToHex">bt4ToHex</a></li><li><a href="global.html#byteToString">byteToString</a></li><li><a href="global.html#calcBrowserVersion">calcBrowserVersion</a></li><li><a href="global.html#checkFlash">checkFlash</a></li><li><a href="global.html#clone">clone</a></li><li><a href="global.html#colorKeyWordsHexStr">colorKeyWordsHexStr</a></li><li><a href="global.html#completeUnit">completeUnit</a></li><li><a href="global.html#customEqual">customEqual</a></li><li><a href="global.html#debounce">debounce</a></li><li><a href="global.html#deepCopy">deepCopy</a></li><li><a href="global.html#deepEqual">deepEqual</a></li><li><a href="global.html#DesUtils">DesUtils</a></li><li><a href="global.html#divide">divide</a></li><li><a href="global.html#drawPolygon">drawPolygon</a></li><li><a href="global.html#enc">enc</a></li><li><a href="global.html#encodeLen">encodeLen</a></li><li><a href="global.html#encodeNumber">encodeNumber</a></li><li><a href="global.html#eq">eq</a></li><li><a href="global.html#fieldContentRegExp">fieldContentRegExp</a></li><li><a href="global.html#fileSizeToByte">fileSizeToByte</a></li><li><a href="global.html#fileterAllMatchedData">fileterAllMatchedData</a></li><li><a href="global.html#filterAllCheckedData">filterAllCheckedData</a></li><li><a href="global.html#filterChilds">filterChilds</a></li><li><a href="global.html#filterTreeLevel">filterTreeLevel</a></li><li><a href="global.html#genBitmapImage">genBitmapImage</a></li><li><a href="global.html#generateKeys">generateKeys</a></li><li><a href="global.html#getFileExtension">getFileExtension</a></li><li><a href="global.html#getKeyBytes">getKeyBytes</a></li><li><a href="global.html#getTreeFlatKeys">getTreeFlatKeys</a></li><li><a href="global.html#gradientColor">gradientColor</a></li><li><a href="global.html#has">has</a></li><li><a href="global.html#hasOwnProperty">hasOwnProperty</a></li><li><a href="global.html#hexToBt4">hexToBt4</a></li><li><a href="global.html#imageCompress">imageCompress</a></li><li><a href="global.html#isArray">isArray</a></li><li><a href="global.html#isBoolean">isBoolean</a></li><li><a href="global.html#isBuiltInObject">isBuiltInObject</a></li><li><a href="global.html#isDom">isDom</a></li><li><a href="global.html#isElement">isElement</a></li><li><a href="global.html#isEmpty">isEmpty</a></li><li><a href="global.html#isEmptyObject">isEmptyObject</a></li><li><a href="global.html#isFloat">isFloat</a></li><li><a href="global.html#isHexColor">isHexColor</a></li><li><a href="global.html#isImageSrc">isImageSrc</a></li><li><a href="global.html#isInputEqual">isInputEqual</a></li><li><a href="global.html#isJson">isJson</a></li><li><a href="global.html#isKeyColor">isKeyColor</a></li><li><a href="global.html#isKeyInObject">isKeyInObject</a></li><li><a href="global.html#isNil">isNil</a></li><li><a href="global.html#isNull">isNull</a></li><li><a href="global.html#isNullOrUndefined">isNullOrUndefined</a></li><li><a href="global.html#isNumber">isNumber</a></li><li><a href="global.html#isObject">isObject</a></li><li><a href="global.html#isOnlyObject">isOnlyObject</a></li><li><a href="global.html#isOpacity">isOpacity</a></li><li><a href="global.html#isOwnKeyInObject">isOwnKeyInObject</a></li><li><a href="global.html#isPromise">isPromise</a></li><li><a href="global.html#isRgbColor">isRgbColor</a></li><li><a href="global.html#isUndefined">isUndefined</a></li><li><a href="global.html#isUrl">isUrl</a></li><li><a href="global.html#isValidDate">isValidDate</a></li><li><a href="global.html#keyColorToHex">keyColorToHex</a></li><li><a href="global.html#Log">Log</a></li><li><a href="global.html#merge">merge</a></li><li><a href="global.html#mergeAll">mergeAll</a></li><li><a href="global.html#mod">mod</a></li><li><a href="global.html#multiply">multiply</a></li><li><a href="global.html#normalPolicy">normalPolicy</a></li><li><a href="global.html#null2default">null2default</a></li><li><a href="global.html#objRGB2str">objRGB2str</a></li><li><a href="global.html#parse">parse</a></li><li><a href="global.html#pathToTree">pathToTree</a></li><li><a href="global.html#plus">plus</a></li><li><a href="global.html#PNGlib">PNGlib</a></li><li><a href="global.html#Queue">Queue</a></li><li><a href="global.html#random">random</a></li><li><a href="global.html#randomInt">randomInt</a></li><li><a href="global.html#recursive">recursive</a></li><li><a href="global.html#recursiveGen">recursiveGen</a></li><li><a href="global.html#rgb2object">rgb2object</a></li><li><a href="global.html#saveAsImage">saveAsImage</a></li><li><a href="global.html#serialize">serialize</a></li><li><a href="global.html#shallowEqual">shallowEqual</a></li><li><a href="global.html#simpleEqual">simpleEqual</a></li><li><a href="global.html#simpleThrottle">simpleThrottle</a></li><li><a href="global.html#slpitArray">slpitArray</a></li><li><a href="global.html#some">some</a></li><li><a href="global.html#stringIsJson">stringIsJson</a></li><li><a href="global.html#strToBt">strToBt</a></li><li><a href="global.html#subObjectEqual">subObjectEqual</a></li><li><a href="global.html#subtract">subtract</a></li><li><a href="global.html#throttle">throttle</a></li><li><a href="global.html#toHexAlphaColor">toHexAlphaColor</a></li><li><a href="global.html#toHexColor">toHexColor</a></li><li><a href="global.html#toRGBcolor">toRGBcolor</a></li><li><a href="global.html#toStringHexColor">toStringHexColor</a></li><li><a href="global.html#transformColor">transformColor</a></li><li><a href="global.html#useMd5Policy">useMd5Policy</a></li><li><a href="global.html#useMd5Policy2">useMd5Policy2</a></li><li><a href="global.html#utils">utils</a></li><li><a href="global.html#values">values</a></li></ul>
33
- </nav>
34
-
35
- <div id="main">
36
-
37
- <h1 class="page-title">Logger</h1>
38
-
39
-
40
-
41
-
42
-
43
-
44
-
45
- <section>
46
-
47
- <header>
48
-
49
- <h2>
50
- Logger
51
- </h2>
52
-
53
-
54
- </header>
55
-
56
- <article>
57
-
58
- <div class="container-overview">
59
-
60
-
61
-
62
-
63
-
64
- <h4 class="name" id="Logger"><span class="type-signature"></span>new Logger<span class="signature">()</span><span class="type-signature"></span></h4>
65
-
66
-
67
-
68
-
69
-
70
-
71
- <dl class="details">
72
-
73
-
74
-
75
-
76
-
77
-
78
-
79
-
80
-
81
-
82
-
83
-
84
-
85
-
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
-
100
-
101
-
102
-
103
-
104
- </dl>
105
-
106
-
107
-
108
-
109
-
110
- <div class="description usertext">
111
- <p>Function Logger
112
- LogConfig: {
113
- isDebug: true
114
- }</p>
115
- </div>
116
-
117
-
118
-
119
-
120
-
121
-
122
-
123
-
124
-
125
-
126
-
127
-
128
-
129
-
130
-
131
-
132
-
133
-
134
-
135
-
136
-
137
-
138
-
139
-
140
-
141
-
142
-
143
-
144
-
145
- </div>
146
-
147
-
148
-
149
-
150
-
151
-
152
-
153
-
154
-
155
-
156
-
157
-
158
-
159
-
160
-
161
-
162
-
163
- <h3 class="subsection-title">Methods</h3>
164
-
165
-
166
-
167
-
168
-
169
-
170
- <h4 class="name" id="pkgInfo"><span class="type-signature"></span>pkgInfo<span class="signature">(name, version)</span><span class="type-signature"></span></h4>
171
-
172
-
173
-
174
-
175
-
176
-
177
- <dl class="details">
178
-
179
-
180
-
181
-
182
-
183
-
184
-
185
-
186
-
187
-
188
-
189
-
190
-
191
-
192
-
193
-
194
-
195
-
196
-
197
-
198
-
199
-
200
-
201
-
202
-
203
-
204
-
205
-
206
-
207
-
208
-
209
-
210
- </dl>
211
-
212
-
213
-
214
-
215
-
216
- <div class="description usertext">
217
- <p>显示 pkg info 信息</p>
218
- </div>
219
-
220
-
221
-
222
-
223
-
224
-
225
-
226
-
227
-
228
-
229
-
230
- <h5>Parameters:</h5>
231
-
232
-
233
- <table class="params">
234
- <thead>
235
- <tr>
236
-
237
- <th>Name</th>
238
-
239
-
240
- <th>Type</th>
241
-
242
-
243
-
244
-
245
-
246
- <th class="last">Description</th>
247
- </tr>
248
- </thead>
249
-
250
- <tbody>
251
-
252
-
253
- <tr>
254
-
255
- <td class="name"><code>name</code></td>
256
-
257
-
258
- <td class="type">
259
-
260
-
261
- <span class="param-type">String</span>
262
-
263
-
264
-
265
- </td>
266
-
267
-
268
-
269
-
270
-
271
- <td class="description last"></td>
272
- </tr>
273
-
274
-
275
-
276
- <tr>
277
-
278
- <td class="name"><code>version</code></td>
279
-
280
-
281
- <td class="type">
282
-
283
-
284
- <span class="param-type">String</span>
285
-
286
-
287
-
288
- </td>
289
-
290
-
291
-
292
-
293
-
294
- <td class="description last"></td>
295
- </tr>
296
-
297
-
298
- </tbody>
299
- </table>
300
-
301
-
302
-
303
-
304
-
305
-
306
-
307
-
308
-
309
-
310
-
311
-
312
-
313
-
314
-
315
-
316
-
317
-
318
-
319
-
320
-
321
-
322
-
323
-
324
-
325
- </article>
326
-
327
- </section>
328
-
329
-
330
-
331
-
332
-
333
-
334
- </div>
335
-
336
- <br class="clear">
337
-
338
- <footer>
339
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Thu Aug 31 2023 11:02:25 GMT+0800 (GMT+08:00) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
340
- </footer>
341
-
342
- <script>prettyPrint();</script>
343
- <script src="scripts/polyfill.js"></script>
344
- <script src="scripts/linenumber.js"></script>
345
-
346
- <script src="scripts/search.js" defer></script>
347
-
348
-
349
-
350
- </body>
351
- </html>