@bitcobblers/wod-wiki-ui 0.56.2208 → 0.56.2210

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.
@@ -330,7 +330,7 @@ var lineIdsExtension = view.ViewPlugin.fromClass(
330
330
  if (!label) label = timestamp;
331
331
  }
332
332
  id = label.toLowerCase().replace(/[^\w]+/g, "-");
333
- } else if (/^```(time|log)/.test(trimmed)) {
333
+ } else if (/^```(time|wod|whiteboard|log)/i.test(trimmed)) {
334
334
  id = `workout-line-${i}`;
335
335
  }
336
336
  if (id && line.from >= view$1.viewport.from && line.to <= view$1.viewport.to) {
@@ -6843,9 +6843,6 @@ function WqlBars({ result, unit: unitProp }) {
6843
6843
  ] }) });
6844
6844
  }
6845
6845
  var MAX_ROWS = 12;
6846
- function formatValue(v, unit) {
6847
- return `${v.toLocaleString()}${unit ? ` ${unit}` : ""}`;
6848
- }
6849
6846
  function WqlTable({ result, unit: unitProp }) {
6850
6847
  const shape = useChartShape(result);
6851
6848
  const unit = result.series[0]?.unit ?? unitProp ?? "";
@@ -6853,14 +6850,14 @@ function WqlTable({ result, unit: unitProp }) {
6853
6850
  if (shape.kind === "scalar") {
6854
6851
  return {
6855
6852
  head: ["Metric", "Value"],
6856
- body: [[result.series[0]?.label ?? "scalar", formatValue(shape.value, unit)]],
6853
+ body: [[result.series[0]?.label ?? "scalar", formatTimeseriesTooltipValue(shape.value, unit)]],
6857
6854
  more: 0
6858
6855
  };
6859
6856
  }
6860
6857
  if (shape.kind === "bars") {
6861
6858
  const all = result.series.map((s) => [
6862
6859
  s.label,
6863
- formatValue(s.points[0]?.value ?? 0, unit)
6860
+ formatTimeseriesTooltipValue(s.points[0]?.value ?? 0, unit)
6864
6861
  ]);
6865
6862
  return {
6866
6863
  head: ["Series", "Value"],
@@ -6881,7 +6878,7 @@ function WqlTable({ result, unit: unitProp }) {
6881
6878
  formatTimestamp(ts),
6882
6879
  ...result.series.map((s) => {
6883
6880
  const v = seriesMap.get(s.label)?.get(ts);
6884
- return v !== void 0 ? formatValue(v, unit) : "\u2014";
6881
+ return v !== void 0 ? formatTimeseriesTooltipValue(v, unit) : "\u2014";
6885
6882
  })
6886
6883
  ]);
6887
6884
  return { head, body, more: Math.max(0, timestamps.length - MAX_ROWS) };