@basthon/gui-base 0.41.1 → 0.41.5

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
@@ -181,7 +181,7 @@ export declare class GUIBase {
181
181
  /**
182
182
  * Download content to file.
183
183
  */
184
- download(): void;
184
+ download(filename?: string): void;
185
185
  /**
186
186
  * Copy a text to clipboard.
187
187
  */
package/lib/main.js CHANGED
@@ -8,7 +8,7 @@ import { KernelLoader } from "@basthon/kernel-loader";
8
8
  export class GUIBase {
9
9
  constructor(options) {
10
10
  this._loaded = new PromiseDelegate();
11
- this._maxCheckpoints = 5;
11
+ this._maxCheckpoints = 10;
12
12
  this._contentFilename = "content.txt";
13
13
  this._urlKey = "content";
14
14
  /* console errors redirected to notification system */
@@ -436,11 +436,11 @@ Un lien permanant vers le contenu actuel a été créé.
436
436
  /**
437
437
  * Download content to file.
438
438
  */
439
- download() {
439
+ download(filename) {
440
440
  this.backup();
441
441
  const content = this.content().replace(/\r\n|\r|\n/g, "\r\n"); // To retain the Line breaks.
442
442
  let blob = new Blob([content], { type: "text/plain" });
443
- GUIBase.openURL(window.URL.createObjectURL(blob), this._contentFilename);
443
+ GUIBase.openURL(window.URL.createObjectURL(blob), filename !== null && filename !== void 0 ? filename : this._contentFilename);
444
444
  }
445
445
  /**
446
446
  * Binding to kernel's XHR.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basthon/gui-base",
3
- "version": "0.41.1",
3
+ "version": "0.41.5",
4
4
  "description": "Basthon - Base GUI",
5
5
  "homepage": "https://basthon.fr",
6
6
  "bugs": {
@@ -25,9 +25,9 @@
25
25
  "clean": "rm -rf lib/"
26
26
  },
27
27
  "dependencies": {
28
- "@basthon/checkpoints": "^0.41.1",
29
- "@basthon/kernel-base": "^0.41.1",
30
- "@basthon/kernel-loader": "^0.41.1",
28
+ "@basthon/checkpoints": "^0.41.5",
29
+ "@basthon/kernel-base": "^0.41.5",
30
+ "@basthon/kernel-loader": "^0.41.5",
31
31
  "js-base64": "^3.7.2",
32
32
  "pako": "^2.0.4",
33
33
  "promise-delegate": "^1.0.1"
@@ -41,5 +41,5 @@
41
41
  "publishConfig": {
42
42
  "access": "public"
43
43
  },
44
- "gitHead": "0a1c9fe267022d6dab4e532f95f499bc573f6e22"
44
+ "gitHead": "077946ce25c4cb4f813829b981e2c25e492b5166"
45
45
  }