@bitcobblers/wod-wiki-ui 0.55.2206 → 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.
@@ -1,3 +1,3 @@
1
- export { DefaultFrontmatterWidget, INTERNAL_FRONTMATTER_KEYS, activeCursorSection, addRuntimePanel, attachmentUrlFacet, autocompleteTooltipTheme, blockContentId, configureOverlayActions, cursorFocusExtension, customCompletionSources, dispatchAddRuntimePanel, dispatchExpandRuntimePanel, dispatchGutterHighlights, dispatchRemoveRuntimePanel, editingQuerySectionsField, editingWidgetsField, editorFocusField, editorFocusTracker, editorPreset, editorTheme, embedPreviewDecorations, expandRuntimePanel, fenceCompletion, findQueryBlockSection, findWorkoutErrors, forceSectionParse, frontmatterDebugMode, frontmatterDetailed, frontmatterKeymap, frontmatterPreview, frontmatterPreviewField, frontmatterReferenceIndex, frontmatterSource, frontmatterSuggestions, frontmatterVisibility, getCursorFocusState, getOverlayActions, gutterHighlightsField, gutterUnified, handleFenceAutoWrap, handleSmartUrlPaste, inlineButtonDecoration, insertMarkdownLinkCommand, isEditorFocused, isInternalFrontmatterKey, isNavigableUrl, lineIdsExtension, linkOpen, linkPreview, markdownSyntaxHiding, markdownTablePreview, navigationFacet, nestedCompletion, nestedCompletionOptions, previewDecorations, queryBlockPreview, referenceIndexReload, registeredSectionWidgets, removeRuntimePanel, resolveCodeLanguage, runtimePanelField, saveBlockQuerySource, sectionAtPos, sectionField, sectionGeometry, sectionIdentity, sectionIdentityHistory, sectionMove, sectionRestore, sectionSaved, sessionQueryFence, sessionQueryInsert, sessionQueryWql, setEditorFocused, setFrontmatterDetailed, setFrontmatterSource, setGutterHighlights, setQuerySourceEditing, slashBlockCompletion, smartIncrement, toggleInlineMarkdown, toggleWidgetEdit, urlAtPos, widgetBlockPreview, wodAutoWrap, wodAutocompletion, wodCompletionSource, wodEditorKeymap, wodLinter, wodOverlayPanel, workoutLintSource, wrapInTimeFence } from '../chunk-JERLIUE2.mjs';
1
+ export { DefaultFrontmatterWidget, INTERNAL_FRONTMATTER_KEYS, activeCursorSection, addRuntimePanel, attachmentUrlFacet, autocompleteTooltipTheme, blockContentId, configureOverlayActions, cursorFocusExtension, customCompletionSources, dispatchAddRuntimePanel, dispatchExpandRuntimePanel, dispatchGutterHighlights, dispatchRemoveRuntimePanel, editingQuerySectionsField, editingWidgetsField, editorFocusField, editorFocusTracker, editorPreset, editorTheme, embedPreviewDecorations, expandRuntimePanel, fenceCompletion, findQueryBlockSection, findWorkoutErrors, forceSectionParse, frontmatterDebugMode, frontmatterDetailed, frontmatterKeymap, frontmatterPreview, frontmatterPreviewField, frontmatterReferenceIndex, frontmatterSource, frontmatterSuggestions, frontmatterVisibility, getCursorFocusState, getOverlayActions, gutterHighlightsField, gutterUnified, handleFenceAutoWrap, handleSmartUrlPaste, inlineButtonDecoration, insertMarkdownLinkCommand, isEditorFocused, isInternalFrontmatterKey, isNavigableUrl, lineIdsExtension, linkOpen, linkPreview, markdownSyntaxHiding, markdownTablePreview, navigationFacet, nestedCompletion, nestedCompletionOptions, previewDecorations, queryBlockPreview, referenceIndexReload, registeredSectionWidgets, removeRuntimePanel, resolveCodeLanguage, runtimePanelField, saveBlockQuerySource, sectionAtPos, sectionField, sectionGeometry, sectionIdentity, sectionIdentityHistory, sectionMove, sectionRestore, sectionSaved, sessionQueryFence, sessionQueryInsert, sessionQueryWql, setEditorFocused, setFrontmatterDetailed, setFrontmatterSource, setGutterHighlights, setQuerySourceEditing, slashBlockCompletion, smartIncrement, toggleInlineMarkdown, toggleWidgetEdit, urlAtPos, widgetBlockPreview, wodAutoWrap, wodAutocompletion, wodCompletionSource, wodEditorKeymap, wodLinter, wodOverlayPanel, workoutLintSource, wrapInTimeFence } from '../chunk-VYFKXF46.mjs';
2
2
  //# sourceMappingURL=index.mjs.map
3
3
  //# sourceMappingURL=index.mjs.map
package/dist/index.cjs CHANGED
@@ -353,6 +353,27 @@ var SERIES_COLORS = [
353
353
  "hsl(var(--metric-action))",
354
354
  "hsl(var(--primary))"
355
355
  ];
356
+ function formatWithUnit(formattedNumber, unit) {
357
+ const cleanUnit = unit?.trim();
358
+ return cleanUnit ? `${formattedNumber} ${cleanUnit}` : formattedNumber;
359
+ }
360
+ function formatTimeseriesTick(value, unit) {
361
+ const numeric = Number(value);
362
+ if (!Number.isFinite(numeric)) {
363
+ return formatWithUnit(String(value), unit);
364
+ }
365
+ const maximumFractionDigits = Math.abs(numeric) >= 100 ? 0 : 1;
366
+ const formatted = new Intl.NumberFormat(void 0, { maximumFractionDigits }).format(numeric);
367
+ return formatWithUnit(formatted, unit);
368
+ }
369
+ function formatTimeseriesTooltipValue(value, unit) {
370
+ const numeric = Number(value);
371
+ if (!Number.isFinite(numeric)) {
372
+ return formatWithUnit(String(value), unit);
373
+ }
374
+ const formatted = new Intl.NumberFormat(void 0, { maximumFractionDigits: 1 }).format(numeric);
375
+ return formatWithUnit(formatted, unit);
376
+ }
356
377
  function WqlTimeseries({ result, unit: unitProp }) {
357
378
  const shape = useChartShape(result);
358
379
  const data2 = React2.useMemo(() => mergeSeries(result.series), [result]);
@@ -381,7 +402,7 @@ function WqlTimeseries({ result, unit: unitProp }) {
381
402
  width: 64,
382
403
  stroke: "hsl(var(--muted-foreground))",
383
404
  tick: { fill: "hsl(var(--muted-foreground))", fontSize: 10 },
384
- unit: unit ? ` ${unit}` : ""
405
+ tickFormatter: (v) => formatTimeseriesTick(v, unit)
385
406
  }
386
407
  ),
387
408
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -394,7 +415,7 @@ function WqlTimeseries({ result, unit: unitProp }) {
394
415
  color: "hsl(var(--popover-foreground))"
395
416
  },
396
417
  labelFormatter: (v) => tooltipTimestamp(v),
397
- formatter: (v) => [`${Number(v).toLocaleString()} ${unit ?? ""}`.trim(), ""]
418
+ formatter: (v) => [formatTimeseriesTooltipValue(v, unit), ""]
398
419
  }
399
420
  ),
400
421
  result.series.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(recharts.Legend, { wrapperStyle: { fontSize: 11 } }),
@@ -469,9 +490,6 @@ function WqlBars({ result, unit: unitProp }) {
469
490
  ] }) });
470
491
  }
471
492
  var MAX_ROWS = 12;
472
- function formatValue(v, unit) {
473
- return `${v.toLocaleString()}${unit ? ` ${unit}` : ""}`;
474
- }
475
493
  function WqlTable({ result, unit: unitProp }) {
476
494
  const shape = useChartShape(result);
477
495
  const unit = result.series[0]?.unit ?? unitProp ?? "";
@@ -479,14 +497,14 @@ function WqlTable({ result, unit: unitProp }) {
479
497
  if (shape.kind === "scalar") {
480
498
  return {
481
499
  head: ["Metric", "Value"],
482
- body: [[result.series[0]?.label ?? "scalar", formatValue(shape.value, unit)]],
500
+ body: [[result.series[0]?.label ?? "scalar", formatTimeseriesTooltipValue(shape.value, unit)]],
483
501
  more: 0
484
502
  };
485
503
  }
486
504
  if (shape.kind === "bars") {
487
505
  const all = result.series.map((s) => [
488
506
  s.label,
489
- formatValue(s.points[0]?.value ?? 0, unit)
507
+ formatTimeseriesTooltipValue(s.points[0]?.value ?? 0, unit)
490
508
  ]);
491
509
  return {
492
510
  head: ["Series", "Value"],
@@ -507,7 +525,7 @@ function WqlTable({ result, unit: unitProp }) {
507
525
  formatTimestamp(ts),
508
526
  ...result.series.map((s) => {
509
527
  const v = seriesMap.get(s.label)?.get(ts);
510
- return v !== void 0 ? formatValue(v, unit) : "\u2014";
528
+ return v !== void 0 ? formatTimeseriesTooltipValue(v, unit) : "\u2014";
511
529
  })
512
530
  ]);
513
531
  return { head, body, more: Math.max(0, timestamps.length - MAX_ROWS) };
@@ -7138,7 +7156,7 @@ var lineIdsExtension = view.ViewPlugin.fromClass(
7138
7156
  if (!label) label = timestamp;
7139
7157
  }
7140
7158
  id = label.toLowerCase().replace(/[^\w]+/g, "-");
7141
- } else if (/^```(time|log)/.test(trimmed)) {
7159
+ } else if (/^```(time|wod|whiteboard|log)/i.test(trimmed)) {
7142
7160
  id = `workout-line-${i}`;
7143
7161
  }
7144
7162
  if (id && line.from >= view$1.viewport.from && line.to <= view$1.viewport.to) {
@@ -18249,13 +18267,13 @@ function editorPreset(optionsOrDialect = "markdown") {
18249
18267
  }
18250
18268
 
18251
18269
  // src/version.ts
18252
- var VERSION = "0.55.2206";
18253
- var GIT_SHA = "5735d1c";
18254
- var BUILD_TIME = "2026-11-12T04:20:12.798Z";
18270
+ var VERSION = "0.56.2210";
18271
+ var GIT_SHA = "92d64b5";
18272
+ var BUILD_TIME = "2026-11-12T20:56:12.928Z";
18255
18273
  var SEMVER = {
18256
- version: "0.55.2206",
18257
- gitSha: "5735d1c",
18258
- buildTime: "2026-11-12T04:20:12.798Z"
18274
+ version: "0.56.2210",
18275
+ gitSha: "92d64b5",
18276
+ buildTime: "2026-11-12T20:56:12.928Z"
18259
18277
  };
18260
18278
 
18261
18279
  Object.defineProperty(exports, "CONTENT_GROUPING_DIMENSIONS", {
@@ -18370,6 +18388,8 @@ exports.findWorkoutErrors = findWorkoutErrors;
18370
18388
  exports.forceSectionParse = forceSectionParse;
18371
18389
  exports.formatClockTime = formatClockTime;
18372
18390
  exports.formatMMSS = formatMMSS;
18391
+ exports.formatTimeseriesTick = formatTimeseriesTick;
18392
+ exports.formatTimeseriesTooltipValue = formatTimeseriesTooltipValue;
18373
18393
  exports.formatTimestamp = formatTimestamp;
18374
18394
  exports.frontmatterDebugMode = frontmatterDebugMode;
18375
18395
  exports.frontmatterDetailed = frontmatterDetailed;