pyret-npm 0.0.71 → 0.0.73

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pyret-npm",
3
- "version": "0.0.71",
3
+ "version": "0.0.73",
4
4
  "description": "The CLI for the Pyret programming language",
5
5
  "files": [
6
6
  "pyret.js",
@@ -239213,7 +239213,7 @@ return {"staticModules":{"builtin://global":({
239213
239213
  type: 'linear',
239214
239214
  range: 'width',
239215
239215
  zero: false,
239216
- domain: { data: 'rawTable', field: 'bin1' }
239216
+ domain: { data: 'rawTable', fields: ['bin0', 'bin1'] }
239217
239217
  },
239218
239218
  {
239219
239219
  name: 'countScale',
@@ -240764,15 +240764,20 @@ return {"staticModules":{"builtin://global":({
240764
240764
  let height = toFixnum(globalOptions['height']);
240765
240765
  const vegaTooltipHandler = new vegaTooltip.Handler({
240766
240766
  formatTooltip: (value, valueToHtml, maxDepth, baseURL) => {
240767
- if (typeof value === 'object') {
240767
+ let ans;
240768
+ if (typeof value === 'object' && value.title instanceof Array) {
240768
240769
  const { title, ...rest } = value;
240769
240770
  if (title instanceof Array) {
240770
240771
  const titleStr = `<h2>${title.map(valueToHtml).join('<br/>')}</h2>`;
240771
240772
  const restStr = vegaTooltip.formatValue(rest, valueToHtml, maxDepth, baseURL);
240772
- return titleStr + restStr;
240773
+ ans = titleStr + restStr;
240773
240774
  }
240775
+ } else {
240776
+ ans = vegaTooltip.formatValue(value, valueToHtml, maxDepth, baseURL);
240774
240777
  }
240775
- return vegaTooltip.formatValue(value, valueToHtml, maxDepth, baseURL);
240778
+ ans = ans.replaceAll("<table>", "<table class=\"pyret-row\">");
240779
+ ans = ans.replaceAll("<td class=\"value\">", "<td class=\"value replTextOutput\"> ");
240780
+ return ans;
240776
240781
  }
240777
240782
  });
240778
240783
  const view = new vega.View(vega.parse(processed), {
@@ -1753,7 +1753,7 @@
1753
1753
  type: 'linear',
1754
1754
  range: 'width',
1755
1755
  zero: false,
1756
- domain: { data: 'rawTable', field: 'bin1' }
1756
+ domain: { data: 'rawTable', fields: ['bin0', 'bin1'] }
1757
1757
  },
1758
1758
  {
1759
1759
  name: 'countScale',
@@ -3304,15 +3304,20 @@
3304
3304
  let height = toFixnum(globalOptions['height']);
3305
3305
  const vegaTooltipHandler = new vegaTooltip.Handler({
3306
3306
  formatTooltip: (value, valueToHtml, maxDepth, baseURL) => {
3307
- if (typeof value === 'object') {
3307
+ let ans;
3308
+ if (typeof value === 'object' && value.title instanceof Array) {
3308
3309
  const { title, ...rest } = value;
3309
3310
  if (title instanceof Array) {
3310
3311
  const titleStr = `<h2>${title.map(valueToHtml).join('<br/>')}</h2>`;
3311
3312
  const restStr = vegaTooltip.formatValue(rest, valueToHtml, maxDepth, baseURL);
3312
- return titleStr + restStr;
3313
+ ans = titleStr + restStr;
3313
3314
  }
3315
+ } else {
3316
+ ans = vegaTooltip.formatValue(value, valueToHtml, maxDepth, baseURL);
3314
3317
  }
3315
- return vegaTooltip.formatValue(value, valueToHtml, maxDepth, baseURL);
3318
+ ans = ans.replaceAll("<table>", "<table class=\"pyret-row\">");
3319
+ ans = ans.replaceAll("<td class=\"value\">", "<td class=\"value replTextOutput\"> ");
3320
+ return ans;
3316
3321
  }
3317
3322
  });
3318
3323
  const view = new vega.View(vega.parse(processed), {
@@ -1753,7 +1753,7 @@
1753
1753
  type: 'linear',
1754
1754
  range: 'width',
1755
1755
  zero: false,
1756
- domain: { data: 'rawTable', field: 'bin1' }
1756
+ domain: { data: 'rawTable', fields: ['bin0', 'bin1'] }
1757
1757
  },
1758
1758
  {
1759
1759
  name: 'countScale',
@@ -3304,15 +3304,20 @@
3304
3304
  let height = toFixnum(globalOptions['height']);
3305
3305
  const vegaTooltipHandler = new vegaTooltip.Handler({
3306
3306
  formatTooltip: (value, valueToHtml, maxDepth, baseURL) => {
3307
- if (typeof value === 'object') {
3307
+ let ans;
3308
+ if (typeof value === 'object' && value.title instanceof Array) {
3308
3309
  const { title, ...rest } = value;
3309
3310
  if (title instanceof Array) {
3310
3311
  const titleStr = `<h2>${title.map(valueToHtml).join('<br/>')}</h2>`;
3311
3312
  const restStr = vegaTooltip.formatValue(rest, valueToHtml, maxDepth, baseURL);
3312
- return titleStr + restStr;
3313
+ ans = titleStr + restStr;
3313
3314
  }
3315
+ } else {
3316
+ ans = vegaTooltip.formatValue(value, valueToHtml, maxDepth, baseURL);
3314
3317
  }
3315
- return vegaTooltip.formatValue(value, valueToHtml, maxDepth, baseURL);
3318
+ ans = ans.replaceAll("<table>", "<table class=\"pyret-row\">");
3319
+ ans = ans.replaceAll("<td class=\"value\">", "<td class=\"value replTextOutput\"> ");
3320
+ return ans;
3316
3321
  }
3317
3322
  });
3318
3323
  const view = new vega.View(vega.parse(processed), {