llm-usage-metrics 0.4.1 → 0.4.2

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/dist/index.js CHANGED
@@ -2580,7 +2580,7 @@ function renderCommitBarLabels(monthlyRows, chartLeft, stepX, maxCommits, chartT
2580
2580
  return monthlyRows.map((row, i) => {
2581
2581
  const x = chartLeft + i * stepX;
2582
2582
  const yTop = scaleY(row.commitCount, maxCommits, chartTop, chartBottom);
2583
- return `<text x="${x.toFixed(2)}" y="${(yTop - 8).toFixed(0)}" text-anchor="middle" font-size="12" font-weight="600" fill="${shareTheme.textSecondary}" font-family="${shareTheme.font}">${formatInteger(row.commitCount)}</text>`;
2583
+ return `<text x="${x.toFixed(2)}" y="${(yTop - 8).toFixed(0)}" text-anchor="middle" font-size="12" font-weight="600" fill="${shareTheme.textSecondary}" font-family="${shareTheme.font}">${escapeSvg(formatInteger(row.commitCount))}</text>`;
2584
2584
  }).join("\n");
2585
2585
  }
2586
2586
  function renderUsdDataLabels(monthlyRows, usdPoints) {
@@ -7333,13 +7333,7 @@ function buildStackedValues(series) {
7333
7333
  return stacked;
7334
7334
  }
7335
7335
  function renderAccentBar() {
7336
- return [
7337
- `<defs><linearGradient id="accent-grad" x1="0" y1="0" x2="1" y2="0">`,
7338
- ` <stop offset="0%" stop-color="#10b981"/>`,
7339
- ` <stop offset="100%" stop-color="#06b6d4"/>`,
7340
- `</linearGradient></defs>`,
7341
- `<rect width="${W3}" height="${ACCENT_H3}" fill="url(#accent-grad)"/>`
7342
- ].join("\n");
7336
+ return `<rect width="${W3}" height="${ACCENT_H3}" fill="url(#accent-grad)"/>`;
7343
7337
  }
7344
7338
  function renderStatColumn(totalTokens, costUsd, sourceCount) {
7345
7339
  const x = 60;
@@ -7524,6 +7518,10 @@ function renderUsageShareSvg(usageData, granularity) {
7524
7518
  }
7525
7519
  return `<svg xmlns="http://www.w3.org/2000/svg" width="${W3}" height="${H3}" viewBox="0 0 ${W3} ${H3}">
7526
7520
  <defs>
7521
+ <linearGradient id="accent-grad" x1="0" y1="0" x2="1" y2="0">
7522
+ <stop offset="0%" stop-color="#10b981"/>
7523
+ <stop offset="100%" stop-color="#06b6d4"/>
7524
+ </linearGradient>
7527
7525
  <clipPath id="chart-clip">
7528
7526
  <rect x="${chartLeft}" y="${chartTop - 4}" width="${chartW}" height="${chartH + 8}"/>
7529
7527
  </clipPath>