@basthon/gui-base 0.36.2 → 0.36.3

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 CHANGED
@@ -1,10 +1,5 @@
1
1
  import { KernelBase } from "@basthon/kernel-base";
2
2
  import { KernelLoader } from "@basthon/kernel-loader";
3
- declare global {
4
- interface Window {
5
- Basthon?: any;
6
- }
7
- }
8
3
  /**
9
4
  * Base class for console and notebook GUI.
10
5
  */
@@ -13,7 +8,7 @@ export declare class GUIBase {
13
8
  private readonly _loaded;
14
9
  private _loader;
15
10
  private _console_error;
16
- constructor(language: string);
11
+ constructor(kernelRootPath: string, language: string);
17
12
  /**
18
13
  * Language getter.
19
14
  */
package/lib/main.js CHANGED
@@ -5,17 +5,14 @@ import { KernelLoader } from "@basthon/kernel-loader";
5
5
  * Base class for console and notebook GUI.
6
6
  */
7
7
  export class GUIBase {
8
- constructor(language) {
8
+ constructor(kernelRootPath, language) {
9
9
  this._loaded = new PromiseDelegate();
10
10
  /* console errors redirected to notification system */
11
11
  this._console_error = console.error;
12
12
  this._language = language;
13
- this._loader = new KernelLoader(language);
13
+ this._loader = new KernelLoader(kernelRootPath, language);
14
14
  // loading Basthon (errors are fatal)
15
15
  this._loader.showLoader("Chargement de Basthon...", false);
16
- this._loader.kernelAvailable().then((kernel) => {
17
- window.Basthon = kernel;
18
- });
19
16
  }
20
17
  /**
21
18
  * Language getter.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basthon/gui-base",
3
- "version": "0.36.2",
3
+ "version": "0.36.3",
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.36.2",
29
- "@basthon/kernel-loader": "^0.36.2",
28
+ "@basthon/kernel-base": "^0.36.3",
29
+ "@basthon/kernel-loader": "^0.36.3",
30
30
  "promise-delegate": "^1.0.1"
31
31
  },
32
32
  "devDependencies": {
@@ -37,5 +37,5 @@
37
37
  "publishConfig": {
38
38
  "access": "public"
39
39
  },
40
- "gitHead": "8fe755fb31a810261ca52b797c491dea633c17a9"
40
+ "gitHead": "9d71d09b47d5f7e1eccf83f1a83004c7225a51a2"
41
41
  }