nexusframework 0.3.0-beta.73 → 0.3.0-beta.74
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.md +55 -55
- package/README.md +12 -12
- package/about/index.json +5 -5
- package/about/index.nhp +4 -4
- package/icon.png +0 -0
- package/index.d.ts +0 -2
- package/index.js +0 -0
- package/index.js.map +1 -1
- package/index.ts +101 -101
- package/indexOfSkeleton.nhp +133 -133
- package/legacySkeleton.nhp +22 -22
- package/loader/overlay.css +1 -1
- package/loader/overlay.html +25 -25
- package/loader/overlay.scss +152 -152
- package/package.json +102 -90
- package/scripts/es5/compat.js +100 -100
- package/scripts/es5/compat.min.js +1 -1
- package/scripts/es5/loader.js +0 -0
- package/scripts/es5/loader.js.map +0 -0
- package/scripts/es5/loader.min.js +1 -1
- package/scripts/es5/loader.min.js.map +0 -0
- package/scripts/es5/nexusframeworkclient.js +1224 -1224
- package/scripts/es5/nexusframeworkclient.js.map +0 -0
- package/scripts/es5/nexusframeworkclient.min.js +1 -1
- package/scripts/es5/nexusframeworkclient.min.js.map +0 -0
- package/scripts/es6/compat.js +64 -64
- package/scripts/es6/compat.min.js +1 -1
- package/scripts/es6/loader.js +0 -0
- package/scripts/es6/loader.js.map +0 -0
- package/scripts/es6/loader.min.js +1 -1
- package/scripts/es6/loader.min.js.map +0 -0
- package/scripts/es6/nexusframeworkclient.js +1146 -1146
- package/scripts/es6/nexusframeworkclient.js.map +0 -0
- package/scripts/es6/nexusframeworkclient.min.js +1 -1
- package/scripts/es6/nexusframeworkclient.min.js.map +0 -0
- package/scripts/index.d.ts +259 -259
- package/scripts/src/compat.ts +62 -62
- package/scripts/src/loader.ts +385 -385
- package/scripts/src/nexusframeworkclient.ts +1163 -1163
- package/scripts/tsconfig.json +11 -11
- package/src/cli.d.ts +1 -0
- package/src/cli.js +102 -102
- package/src/cli.js.map +1 -1
- package/src/cli.ts +101 -101
- package/src/compileScripts.d.ts +0 -0
- package/src/compileScripts.js +0 -0
- package/src/compileScripts.js.map +1 -1
- package/src/compileScripts.ts +153 -153
- package/src/nexusframework.d.ts +5 -5
- package/src/nexusframework.js +44 -37
- package/src/nexusframework.js.map +1 -1
- package/src/nexusframework.ts +3631 -3622
- package/templates/basic/package.json +3 -3
- package/templates/basic/www/skeleton.nhp +1 -1
- package/templates/bootstrap/package.json +2 -2
- package/templates/bootstrap/www/skeleton.nhp +1 -1
- package/templates/bootstrap-material-design/package.json +2 -2
- package/templates/bootstrap-material-design/www/skeleton.nhp +1 -1
- package/tsconfig.json +25 -22
- package/types.d.ts +612 -612
package/scripts/src/compat.ts
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
/// <reference path="../index.d.ts" />
|
|
2
|
-
(function(window) {
|
|
3
|
-
var Buffer;
|
|
4
|
-
const TextDecoder: {new (encoding: string): TextDecoder} = window['TextDecoder'];
|
|
5
|
-
const TextEncoder: {new (encoding: string): TextEncoder} = window['TextEncoder'];
|
|
6
|
-
class BufferBase extends Uint8Array {
|
|
7
|
-
static isBuffer(object: any) {
|
|
8
|
-
return object instanceof Buffer;
|
|
9
|
-
}
|
|
10
|
-
slice(start = 0, end = this.length) {
|
|
11
|
-
return new Buffer(this.buffer.slice(start, end));
|
|
12
|
-
}
|
|
13
|
-
write(index: number, val: number) {
|
|
14
|
-
this[index] = val;
|
|
15
|
-
}
|
|
16
|
-
copy(from: Uint8Array, offset = 0, start = 0, end = from.length) {
|
|
17
|
-
const copylen = end - start + offset;
|
|
18
|
-
for(var i=offset; i<copylen; i++)
|
|
19
|
-
this[offset] = from[start + i];
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
if (TextDecoder && TextEncoder) {
|
|
23
|
-
class BufferImpl extends BufferBase {
|
|
24
|
-
toString(encoding?: string, start = 0, end = this.length) {
|
|
25
|
-
const decoder = new TextDecoder(encoding);
|
|
26
|
-
if (start > 0 || end < this.length)
|
|
27
|
-
return decoder.decode(this.slice(start, end));
|
|
28
|
-
return decoder.decode(this);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
((Buffer = BufferImpl) as any)['from'] = function(data, encoding = "utf8") {
|
|
32
|
-
const encoder = new TextEncoder(encoding);
|
|
33
|
-
const encoded = encoder.encode(data);
|
|
34
|
-
const buffer = new Buffer(encoded.length);
|
|
35
|
-
buffer.copy(encoded);
|
|
36
|
-
return buffer;
|
|
37
|
-
};
|
|
38
|
-
} else {
|
|
39
|
-
class BufferImpl extends BufferBase {
|
|
40
|
-
toString(encoding?: string, start = 0, end = this.length) {
|
|
41
|
-
var str = "";
|
|
42
|
-
for(var i=start; i<end; i++)
|
|
43
|
-
str += String.fromCharCode(this[i]);
|
|
44
|
-
return str;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
((Buffer = BufferImpl) as any)['from'] = function(data, encoding = "utf8") {
|
|
48
|
-
if (encoding === "utf8") {
|
|
49
|
-
data = "" + data;
|
|
50
|
-
const len = data.length;
|
|
51
|
-
const buff = new Buffer(len);
|
|
52
|
-
for(var i=0; i<len; i++)
|
|
53
|
-
buff[i] = data.charCodeAt(i) & 0xFF;
|
|
54
|
-
console.log(buff);
|
|
55
|
-
return buff;
|
|
56
|
-
} else
|
|
57
|
-
return new Buffer(data);
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
window['Buffer'] = Buffer;
|
|
61
|
-
window['global'] = window;
|
|
62
|
-
})(window);
|
|
1
|
+
/// <reference path="../index.d.ts" />
|
|
2
|
+
(function(window) {
|
|
3
|
+
var Buffer;
|
|
4
|
+
const TextDecoder: {new (encoding: string): TextDecoder} = window['TextDecoder'];
|
|
5
|
+
const TextEncoder: {new (encoding: string): TextEncoder} = window['TextEncoder'];
|
|
6
|
+
class BufferBase extends Uint8Array {
|
|
7
|
+
static isBuffer(object: any) {
|
|
8
|
+
return object instanceof Buffer;
|
|
9
|
+
}
|
|
10
|
+
slice(start = 0, end = this.length) {
|
|
11
|
+
return new Buffer(this.buffer.slice(start, end));
|
|
12
|
+
}
|
|
13
|
+
write(index: number, val: number) {
|
|
14
|
+
this[index] = val;
|
|
15
|
+
}
|
|
16
|
+
copy(from: Uint8Array, offset = 0, start = 0, end = from.length) {
|
|
17
|
+
const copylen = end - start + offset;
|
|
18
|
+
for(var i=offset; i<copylen; i++)
|
|
19
|
+
this[offset] = from[start + i];
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
if (TextDecoder && TextEncoder) {
|
|
23
|
+
class BufferImpl extends BufferBase {
|
|
24
|
+
toString(encoding?: string, start = 0, end = this.length) {
|
|
25
|
+
const decoder = new TextDecoder(encoding);
|
|
26
|
+
if (start > 0 || end < this.length)
|
|
27
|
+
return decoder.decode(this.slice(start, end));
|
|
28
|
+
return decoder.decode(this);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
((Buffer = BufferImpl) as any)['from'] = function(data, encoding = "utf8") {
|
|
32
|
+
const encoder = new TextEncoder(encoding);
|
|
33
|
+
const encoded = encoder.encode(data);
|
|
34
|
+
const buffer = new Buffer(encoded.length);
|
|
35
|
+
buffer.copy(encoded);
|
|
36
|
+
return buffer;
|
|
37
|
+
};
|
|
38
|
+
} else {
|
|
39
|
+
class BufferImpl extends BufferBase {
|
|
40
|
+
toString(encoding?: string, start = 0, end = this.length) {
|
|
41
|
+
var str = "";
|
|
42
|
+
for(var i=start; i<end; i++)
|
|
43
|
+
str += String.fromCharCode(this[i]);
|
|
44
|
+
return str;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
((Buffer = BufferImpl) as any)['from'] = function(data, encoding = "utf8") {
|
|
48
|
+
if (encoding === "utf8") {
|
|
49
|
+
data = "" + data;
|
|
50
|
+
const len = data.length;
|
|
51
|
+
const buff = new Buffer(len);
|
|
52
|
+
for(var i=0; i<len; i++)
|
|
53
|
+
buff[i] = data.charCodeAt(i) & 0xFF;
|
|
54
|
+
console.log(buff);
|
|
55
|
+
return buff;
|
|
56
|
+
} else
|
|
57
|
+
return new Buffer(data);
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
window['Buffer'] = Buffer;
|
|
61
|
+
window['global'] = window;
|
|
62
|
+
})(window);
|