@bitblit/ratchet-echarts 4.0.210-alpha → 4.0.219-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.
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:"210",hash:"8490a192d81de0ea00f88a5d60add399ed69aa8e",branch:"alpha-2023-08-30-3",tag:"alpha-2023-08-30-3",timeBuiltISO:"2023-08-30T11:18:27-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:"219",hash:"0bb0813c0bd056e47ed88525a92a45f064dd208a",branch:"alpha-2023-09-04-8",tag:"alpha-2023-09-04-8",timeBuiltISO:"2023-09-04T21:57:27-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/lib/index.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../src/build/ratchet-echarts-info.ts","../src/common/echart-ratchet.ts"],"sourcesContent":["export class RatchetEchartsInfo {\n constructor() { }\n static buildInformation() {\n const val = {\n version: 'LOCAL-SNAPSHOT',\n hash: 'LOCAL-HASH',\n branch: 'LOCAL-BRANCH',\n tag: 'LOCAL-TAG',\n timeBuiltISO: 'LOCAL-TIME-ISO',\n notes: 'LOCAL-NOTES',\n };\n return val;\n }\n}\n//# sourceMappingURL=ratchet-echarts-info.js.map","import * as echarts from 'echarts';\nimport { Canvas } from 'canvas';\nimport fs from 'fs';\nexport class EChartRatchet {\n static async renderChartUsingProvidedCanvas(opt, canvas) {\n if (!opt) {\n throw new Error('You must supply an opts parameter');\n }\n if (!canvas) {\n throw new Error('You must supply an canvas parameter');\n }\n let rval = null;\n opt.animation = false;\n const canvasHtml = canvas;\n const chart = echarts.init(canvasHtml);\n chart.setOption(opt);\n rval = canvas.toBuffer();\n return rval;\n }\n static async renderChart(opts, config) {\n if (!opts) {\n throw new Error('You must supply an opts parameter');\n }\n if (!config) {\n throw new Error('You must supply an config parameter');\n }\n const canvas = new Canvas(config.width, config.height);\n const rval = await this.renderChartUsingProvidedCanvas(opts, canvas);\n return rval;\n }\n static async renderChartToPngFile(filename, opts, config) {\n if (!opts) {\n throw new Error('You must supply an opts parameter');\n }\n if (!config) {\n throw new Error('You must supply an config parameter');\n }\n if (!filename || filename.trim().length === 0) {\n throw new Error('You must supply a non-empty filename parameter');\n }\n if (!filename.toLowerCase().endsWith('.png')) {\n throw new Error('Your filename should end with .png - this generates a png file');\n }\n const rval = await this.renderChart(opts, config);\n fs.writeFileSync(filename, rval);\n return rval;\n }\n}\n//# sourceMappingURL=echart-ratchet.js.map"],"names":["RatchetEchartsInfo","constructor","static","version","hash","branch","tag","timeBuiltISO","notes","EChartRatchet","opt","canvas","Error","rval","animation","canvasHtml","echarts","init","setOption","toBuffer","opts","config","Canvas","width","height","this","renderChartUsingProvidedCanvas","filename","trim","length","toLowerCase","endsWith","renderChart","fs","writeFileSync"],"mappings":"4EAAO,MAAMA,EACTC,cAAiB,CACjBC,0BASI,MARY,CACRC,QAAS,iBACTC,KAAM,aACNC,OAAQ,eACRC,IAAK,YACLC,aAAc,iBACdC,MAAO,cAGd,ECTE,MAAMC,EACTP,4CAA4CQ,EAAKC,GAC7C,IAAKD,EACD,MAAM,IAAIE,MAAM,qCAEpB,IAAKD,EACD,MAAM,IAAIC,MAAM,uCAEpB,IAAIC,EAAO,KACXH,EAAII,WAAY,EAChB,MAAMC,EAAaJ,EAInB,OAHcK,EAAQC,KAAKF,GACrBG,UAAUR,GAChBG,EAAOF,EAAOQ,WACPN,CACV,CACDX,yBAAyBkB,EAAMC,GAC3B,IAAKD,EACD,MAAM,IAAIR,MAAM,qCAEpB,IAAKS,EACD,MAAM,IAAIT,MAAM,uCAEpB,MAAMD,EAAS,IAAIW,EAAOD,EAAOE,MAAOF,EAAOG,QAE/C,aADmBC,KAAKC,+BAA+BN,EAAMT,EAEhE,CACDT,kCAAkCyB,EAAUP,EAAMC,GAC9C,IAAKD,EACD,MAAM,IAAIR,MAAM,qCAEpB,IAAKS,EACD,MAAM,IAAIT,MAAM,uCAEpB,IAAKe,GAAuC,IAA3BA,EAASC,OAAOC,OAC7B,MAAM,IAAIjB,MAAM,kDAEpB,IAAKe,EAASG,cAAcC,SAAS,QACjC,MAAM,IAAInB,MAAM,kEAEpB,MAAMC,QAAaY,KAAKO,YAAYZ,EAAMC,GAE1C,OADAY,EAAGC,cAAcP,EAAUd,GACpBA,CACV"}
1
+ {"version":3,"file":"index.mjs","sources":["../src/build/ratchet-echarts-info.ts","../src/common/echart-ratchet.ts"],"sourcesContent":["export class RatchetEchartsInfo {\n constructor() { }\n static buildInformation() {\n const val = {\n version: 'LOCAL-SNAPSHOT',\n hash: 'LOCAL-HASH',\n branch: 'LOCAL-BRANCH',\n tag: 'LOCAL-TAG',\n timeBuiltISO: 'LOCAL-TIME-ISO',\n notes: 'LOCAL-NOTES',\n };\n return val;\n }\n}\n//# sourceMappingURL=ratchet-echarts-info.js.map","import * as echarts from 'echarts';\nimport { Canvas } from 'canvas';\nimport fs from 'fs';\nexport class EChartRatchet {\n static async renderChartUsingProvidedCanvas(opt, canvas) {\n if (!opt) {\n throw new Error('You must supply an opts parameter');\n }\n if (!canvas) {\n throw new Error('You must supply an canvas parameter');\n }\n let rval = null;\n opt.animation = false;\n const canvasHtml = canvas;\n const chart = echarts.init(canvasHtml);\n chart.setOption(opt);\n rval = canvas.toBuffer();\n return rval;\n }\n static async renderChart(opts, config) {\n if (!opts) {\n throw new Error('You must supply an opts parameter');\n }\n if (!config) {\n throw new Error('You must supply an config parameter');\n }\n const canvas = new Canvas(config.width, config.height);\n const rval = await this.renderChartUsingProvidedCanvas(opts, canvas);\n return rval;\n }\n static async renderChartToPngFile(filename, opts, config) {\n if (!opts) {\n throw new Error('You must supply an opts parameter');\n }\n if (!config) {\n throw new Error('You must supply an config parameter');\n }\n if (!filename || filename.trim().length === 0) {\n throw new Error('You must supply a non-empty filename parameter');\n }\n if (!filename.toLowerCase().endsWith('.png')) {\n throw new Error('Your filename should end with .png - this generates a png file');\n }\n const rval = await this.renderChart(opts, config);\n fs.writeFileSync(filename, rval);\n return rval;\n }\n}\n//# sourceMappingURL=echart-ratchet.js.map"],"names":["RatchetEchartsInfo","constructor","buildInformation","version","hash","branch","tag","timeBuiltISO","notes","EChartRatchet","renderChartUsingProvidedCanvas","opt","canvas","Error","rval","animation","canvasHtml","echarts","init","setOption","toBuffer","renderChart","opts","config","Canvas","width","height","this","renderChartToPngFile","filename","trim","length","toLowerCase","endsWith","fs","writeFileSync"],"mappings":"4EAAO,MAAMA,EACT,WAAAC,GAAiB,CACjB,uBAAOC,GASH,MARY,CACRC,QAAS,iBACTC,KAAM,aACNC,OAAQ,eACRC,IAAK,YACLC,aAAc,iBACdC,MAAO,cAGd,ECTE,MAAMC,EACT,2CAAaC,CAA+BC,EAAKC,GAC7C,IAAKD,EACD,MAAM,IAAIE,MAAM,qCAEpB,IAAKD,EACD,MAAM,IAAIC,MAAM,uCAEpB,IAAIC,EAAO,KACXH,EAAII,WAAY,EAChB,MAAMC,EAAaJ,EAInB,OAHcK,EAAQC,KAAKF,GACrBG,UAAUR,GAChBG,EAAOF,EAAOQ,WACPN,CACV,CACD,wBAAaO,CAAYC,EAAMC,GAC3B,IAAKD,EACD,MAAM,IAAIT,MAAM,qCAEpB,IAAKU,EACD,MAAM,IAAIV,MAAM,uCAEpB,MAAMD,EAAS,IAAIY,EAAOD,EAAOE,MAAOF,EAAOG,QAE/C,aADmBC,KAAKjB,+BAA+BY,EAAMV,EAEhE,CACD,iCAAagB,CAAqBC,EAAUP,EAAMC,GAC9C,IAAKD,EACD,MAAM,IAAIT,MAAM,qCAEpB,IAAKU,EACD,MAAM,IAAIV,MAAM,uCAEpB,IAAKgB,GAAuC,IAA3BA,EAASC,OAAOC,OAC7B,MAAM,IAAIlB,MAAM,kDAEpB,IAAKgB,EAASG,cAAcC,SAAS,QACjC,MAAM,IAAIpB,MAAM,kEAEpB,MAAMC,QAAaa,KAAKN,YAAYC,EAAMC,GAE1C,OADAW,EAAGC,cAAcN,EAAUf,GACpBA,CACV"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitblit/ratchet-echarts",
3
- "version": "4.0.210-alpha",
3
+ "version": "4.0.219-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.210-alpha",
34
+ "@bitblit/ratchet-common": "4.0.219-alpha",
35
35
  "canvas": "2.11.2",
36
36
  "echarts": "5.4.3"
37
37
  },
38
38
  "peerDependencies": {
39
- "@bitblit/ratchet-common": "4.0.210-alpha",
39
+ "@bitblit/ratchet-common": "4.0.219-alpha",
40
40
  "canvas": "^2.11.2",
41
41
  "echarts": "^5.4.3"
42
42
  }