@basthon/gui-base 0.36.10 → 0.37.0
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/lib/main.d.ts +1 -0
- package/lib/main.js +7 -6
- package/package.json +4 -4
package/lib/main.d.ts
CHANGED
package/lib/main.js
CHANGED
|
@@ -22,6 +22,7 @@ export class GUIBase {
|
|
|
22
22
|
* Kernel getter.
|
|
23
23
|
*/
|
|
24
24
|
get kernel() { return this._loader.kernel; }
|
|
25
|
+
get kernelSafe() { return this._loader.kernelSafe; }
|
|
25
26
|
/**
|
|
26
27
|
* KernelLoader getter.
|
|
27
28
|
*/
|
|
@@ -107,7 +108,7 @@ export class GUIBase {
|
|
|
107
108
|
/**
|
|
108
109
|
* Restart the kernel.
|
|
109
110
|
*/
|
|
110
|
-
kernelRestart() { var _a; (_a = this.
|
|
111
|
+
kernelRestart() { var _a; (_a = this.kernelSafe) === null || _a === void 0 ? void 0 : _a.restart(); }
|
|
111
112
|
/**
|
|
112
113
|
* Load ressources from URL (common part to files and modules).
|
|
113
114
|
*/
|
|
@@ -141,7 +142,7 @@ export class GUIBase {
|
|
|
141
142
|
reader.readAsArrayBuffer(file);
|
|
142
143
|
reader.onload = async (event) => {
|
|
143
144
|
var _a, _b, _c;
|
|
144
|
-
(_a = this.
|
|
145
|
+
(_a = this.kernelSafe) === null || _a === void 0 ? void 0 : _a.putRessource(file.name, reader.result);
|
|
145
146
|
this.info(`Fichier utilisable depuis ${(_b = this.kernel) === null || _b === void 0 ? void 0 : _b.languageName()}`, `${file.name} est maintenant utilisable depuis ${(_c = this.kernel) === null || _c === void 0 ? void 0 : _c.languageName()}`);
|
|
146
147
|
resolve();
|
|
147
148
|
};
|
|
@@ -152,17 +153,17 @@ export class GUIBase {
|
|
|
152
153
|
* Load auxiliary files submited via URL (aux= parameter) (async).
|
|
153
154
|
*/
|
|
154
155
|
async loadURLAux() {
|
|
155
|
-
if (this.
|
|
156
|
+
if (this.kernelSafe == null)
|
|
156
157
|
return;
|
|
157
|
-
await this._loadFromURL('aux', this.
|
|
158
|
+
await this._loadFromURL('aux', this.kernelSafe.putFile.bind(this.kernelSafe));
|
|
158
159
|
}
|
|
159
160
|
/**
|
|
160
161
|
* Load modules submited via URL (module= parameter) (async).
|
|
161
162
|
*/
|
|
162
163
|
async loadURLModules() {
|
|
163
|
-
if (this.
|
|
164
|
+
if (this.kernelSafe == null)
|
|
164
165
|
return;
|
|
165
|
-
await this._loadFromURL('module', this.
|
|
166
|
+
await this._loadFromURL('module', this.kernelSafe.putModule.bind(this.kernelSafe));
|
|
166
167
|
}
|
|
167
168
|
/**
|
|
168
169
|
* Opening file: If it has ext as extension, loading it in
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basthon/gui-base",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.37.0",
|
|
4
4
|
"description": "Basthon - Base GUI",
|
|
5
5
|
"homepage": "https://basthon.fr",
|
|
6
6
|
"bugs": {
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"clean": "rm -rf lib/"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@basthon/kernel-base": "^0.
|
|
29
|
-
"@basthon/kernel-loader": "^0.
|
|
28
|
+
"@basthon/kernel-base": "^0.37.0",
|
|
29
|
+
"@basthon/kernel-loader": "^0.37.0",
|
|
30
30
|
"js-base64": "^3.7.2",
|
|
31
31
|
"pako": "^2.0.4",
|
|
32
32
|
"promise-delegate": "^1.0.1"
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "bdafd1d07f6280d24e7b879d035c342c8fe7d61e"
|
|
44
44
|
}
|