@bitblit/ratchet-echarts 4.0.375-alpha → 4.0.378-alpha

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 (2) hide show
  1. package/lib/index.mjs +1 -1
  2. package/package.json +3 -3
package/lib/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import*as r from"echarts";import{Canvas as t}from"canvas";import e from"fs";class n{constructor(){}static buildInformation(){return{version:"375",hash:"afbc7e8acad73374be0be47ba620b178cc6f3771",branch:"alpha-2024-06-22-1",tag:"alpha-2024-06-22-1",timeBuiltISO:"2024-06-22T12:27:29-0700",notes:"No notes"}}}class a{static async renderChartUsingProvidedCanvas(t,e){if(!t)throw new Error("You must supply an opts parameter");if(!e)throw new Error("You must supply an canvas parameter");let n=null;t.animation=!1;const a=e;return r.init(a).setOption(t),n=e.toBuffer(),n}static async renderChart(r,e){if(!r)throw new Error("You must supply an opts parameter");if(!e)throw new Error("You must supply an config parameter");const n=new t(e.width,e.height);return await this.renderChartUsingProvidedCanvas(r,n)}static async renderChartToPngFile(r,t,n){if(!t)throw new Error("You must supply an opts parameter");if(!n)throw new Error("You must supply an config parameter");if(!r||0===r.trim().length)throw new Error("You must supply a non-empty filename parameter");if(!r.toLowerCase().endsWith(".png"))throw new Error("Your filename should end with .png - this generates a png file");const a=await this.renderChart(t,n);return e.writeFileSync(r,a),a}}export{a as EChartRatchet,n as RatchetEchartsInfo};
1
+ import*as r from"echarts";import{Canvas as t}from"canvas";import e from"fs";class n{constructor(){}static buildInformation(){return{version:"378",hash:"9922dde70b301cc39f9e90313395a7eaffafef02",branch:"alpha-2024-06-22-4",tag:"alpha-2024-06-22-4",timeBuiltISO:"2024-06-22T19:00:33-0700",notes:"No notes"}}}class a{static async renderChartUsingProvidedCanvas(t,e){if(!t)throw new Error("You must supply an opts parameter");if(!e)throw new Error("You must supply an canvas parameter");let n=null;t.animation=!1;const a=e;return r.init(a).setOption(t),n=e.toBuffer(),n}static async renderChart(r,e){if(!r)throw new Error("You must supply an opts parameter");if(!e)throw new Error("You must supply an config parameter");const n=new t(e.width,e.height);return await this.renderChartUsingProvidedCanvas(r,n)}static async renderChartToPngFile(r,t,n){if(!t)throw new Error("You must supply an opts parameter");if(!n)throw new Error("You must supply an config parameter");if(!r||0===r.trim().length)throw new Error("You must supply a non-empty filename parameter");if(!r.toLowerCase().endsWith(".png"))throw new Error("Your filename should end with .png - this generates a png file");const a=await this.renderChart(t,n);return e.writeFileSync(r,a),a}}export{a as EChartRatchet,n as RatchetEchartsInfo};
2
2
  //# sourceMappingURL=index.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitblit/ratchet-echarts",
3
- "version": "4.0.375-alpha",
3
+ "version": "4.0.378-alpha",
4
4
  "description": "Library for using echarts on Node",
5
5
  "type": "module",
6
6
  "module": "./lib/index.mjs",
@@ -31,12 +31,12 @@
31
31
  "config": {},
32
32
  "license": "Apache-2.0",
33
33
  "dependencies": {
34
- "@bitblit/ratchet-common": "4.0.375-alpha",
34
+ "@bitblit/ratchet-common": "4.0.378-alpha",
35
35
  "canvas": "2.11.2",
36
36
  "echarts": "5.5.0"
37
37
  },
38
38
  "peerDependencies": {
39
- "@bitblit/ratchet-common": "4.0.375-alpha",
39
+ "@bitblit/ratchet-common": "4.0.378-alpha",
40
40
  "canvas": "^2.11.2",
41
41
  "echarts": "^5.5.0"
42
42
  }