@bitcobblers/wod-wiki-ui 0.62.2261 → 0.62.2262

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.
@@ -3580,6 +3580,17 @@ function formatPaceMMSS(secPerKm) {
3580
3580
  const secs = rounded % 60;
3581
3581
  return `${mins}:${String(secs).padStart(2, "0")} /km`;
3582
3582
  }
3583
+ function normalizePaceToSecPerKm(value, unit) {
3584
+ if (!Number.isFinite(value) || value <= 0) return null;
3585
+ const u = (unit ?? "").trim().toLowerCase();
3586
+ if (!u || u === "sec/km" || u === "s/km") return value;
3587
+ if (u === "min/km") return value * 60;
3588
+ if (u === "min/mi") return value * 60 / 1.609344;
3589
+ if (u === "sec/mi" || u === "s/mi") return value / 1.609344;
3590
+ if (u === "m/s") return 1e3 / value;
3591
+ if (u === "km/h" || u === "kph") return 3600 / value;
3592
+ return null;
3593
+ }
3583
3594
  function humanizeSlug(slug) {
3584
3595
  return slug.split(/[-_\s]+/).filter(Boolean).map((p) => p.charAt(0).toUpperCase() + p.slice(1)).join(" ");
3585
3596
  }
@@ -3739,7 +3750,14 @@ function buildSpreadsheetRows(run, prHighlights) {
3739
3750
  power = m.value;
3740
3751
  if (m.unit) powerUnit = m.unit;
3741
3752
  } else if (canon === "pace") {
3742
- paceSecPerKm = m.value;
3753
+ const normalized = normalizePaceToSecPerKm(m.value, m.unit);
3754
+ if (normalized !== null) {
3755
+ const u = (m.unit ?? "").trim().toLowerCase();
3756
+ const isExplicitPace = !u || u === "min/km" || u === "sec/km" || u === "s/km" || u === "min/mi" || u === "sec/mi" || u === "s/mi";
3757
+ if (paceSecPerKm === null || isExplicitPace || isUser) {
3758
+ paceSecPerKm = normalized;
3759
+ }
3760
+ }
3743
3761
  } else if (canon === "rounds" || canon === "currentround" || lower === "current-round") {
3744
3762
  round = Math.round(m.value);
3745
3763
  } else if (!KNOWN_CANONICAL_KEYS.has(canon) && !KNOWN_CANONICAL_KEYS.has(lower)) {
@@ -12900,10 +12918,11 @@ function createFrontmatterSummary(entries, onShowDetails, docKind, referenceProv
12900
12918
  const lower = val.toLowerCase();
12901
12919
  if (seenTags.has(lower)) continue;
12902
12920
  seenTags.add(lower);
12921
+ const match = referenceProvider?.resolveTag?.(val, normKey) ?? null;
12903
12922
  tagItems.push({
12904
12923
  text: val,
12905
12924
  hash: true,
12906
- href: referenceProvider?.openHref("tag", val, normKey)
12925
+ href: match && referenceProvider ? referenceProvider.openHref("tag", match.slug, match.type ?? normKey) : void 0
12907
12926
  });
12908
12927
  }
12909
12928
  }
@@ -21898,5 +21917,5 @@ function editorPreset(optionsOrDialect = "markdown") {
21898
21917
  }
21899
21918
 
21900
21919
  export { AGG_OPTIONS, CANONICAL_BLOCK_TYPES, CLAUSE_META, ClauseIcon, ComposerRegistry, DEFAULT_DIAGNOSTICS_DEBOUNCE_MS, DEFAULT_OUTPUT_FILTERS, DEFAULT_PRIMARY_FILTER, DefaultFrontmatterWidget, EditorDialog, GROUPBY_OPTIONS, GoalRings, INTERNAL_FRONTMATTER_KEYS, KIND_OPTIONS, METRIC_OPTIONS, MULTI_VALUE_TYPES, MetricBadge, OUTPUT_TYPE_CLASS, OUTPUT_TYPE_DOT, OutputFilterPills, OutputStatementsTable, PLANE_OPTIONS, PRBadge, ProposedMetricBadge, QueryBlockView, QueryObjectBuilder, QueryValue, ROLLUP_OPTIONS, ResultsSpreadsheetGrid, RowsResultsChrome, RowsTable, RpePopoverControl, SERIES_COLORS, SOURCE_OPTIONS, SUGGESTION_BINDINGS, SessionSummaryCard, SingleLineYAxisTick, StackedBar, TARGET_OPTIONS, TIME_OPTIONS, TONE_CLASS, TokenSlotPill, TopList, UNIT_OPTIONS, WHERE_AGGREGATORS, WHERE_METRICS, WidgetChart, WidgetProblemBadge, WqlBars, WqlComposer, WqlDiagnosticsStrip, WqlEmptyState, WqlQueryInspectorModal, WqlScopeMap, WqlTable, WqlTimeseries, ZONE_META, ZONE_ORDER, ZoneDistribution, acceptCompletionOrFirst, activeCursorSection, addRuntimePanel, affiliateTagFacet, applyAmazonAffiliateTag, attachmentUrlFacet, autocompleteTooltipTheme, bindTokenParamIntoWql, bindTokenToQueryObject, blockTypesFromBlocks, buildAddableFilterGroups, buildScopeZones, buildSpreadsheetRows, canonicalSuggestionItems, compactNumber, composerRegistry, computeSessionPrHighlights, computeYAxisWidth, configureOverlayActions, createExecutorDocumentHost, cursorFocusExtension, customCompletionSources, cycleBaselineLayer, dateRangeSlot, dispatchAddRuntimePanel, dispatchExpandRuntimePanel, dispatchGutterHighlights, dispatchRemoveRuntimePanel, editQueryClause, editingQuerySectionsField, editingWidgetsField, editorFocusField, editorFocusTracker, editorPreset, editorTheme, embedPreviewDecorations, expandRuntimePanel, extractBlockQueries, extractMetricsByCategory, fenceCompletion, findQueryBlockSection, findWorkoutErrors, forceSectionParse, formatAnalyticsFloat, formatAxisTick, formatClockTime, formatCompactMetricValue, formatHumanQuerySummary, formatMMSS, formatMetricValue, formatSummaryDurationMMSS, formatTimeseriesTick, formatTimeseriesTooltipValue, formatTimestamp, frontmatterDebugMode, frontmatterDetailed, frontmatterKeymap, frontmatterPreview, frontmatterPreviewField, frontmatterReferenceIndex, frontmatterSource, frontmatterSuggestions, frontmatterVisibility, getClauseMeta, getClauseSupportError, getClauseZone, getCursorFocusState, getOverlayActions, getSuggestionBinding, gutterHighlightsField, gutterUnified, handleFenceAutoWrap, handleSmartUrlPaste, inlineButtonDecoration, insertMarkdownLinkCommand, insertWhiteboardNewline, invalidateSuggestions, isAmazonRetailHost, isEditorFocused, isInternalFrontmatterKey, isNavigableUrl, isWhiteboardScriptBody, lineIdsExtension, linkOpen, linkPreview, loadSuggestions, markdownSyntaxHiding, markdownTablePreview, matchFilterTypeahead, mergeSeries, mergeSuggestionItems, mergeTagSuggestions, mobileDockedCompletionFacet, navigationFacet, nestedCompletion, nestedCompletionOptions, normalizeOutputFilter, normalizeSimplePipelineToAggregate, notebookSlugsFromBlocks, outputToRunResult, outputsToRunResult, patchBlockQuery, presentBadges, previewDecorations, primaryQueryOf, promoteFindToChartObject, queryBlockPreview, readSessionRpe, referenceIndexReload, registeredSectionWidgets, removeRuntimePanel, removeSeriesLayer, resolveCodeLanguage, resolveQueryDraft, resolveWidgetDisplayUnit, runtimePanelField, saveBlockQuerySource, sectionAtPos, sectionField, sectionGeometry, sectionIdentity, sectionIdentityHistory, sectionMove, sectionRestore, sectionSaved, sessionQueryFence, sessionQueryInsert, sessionQueryWql, setEditorFocused, setFrontmatterDetailed, setFrontmatterSource, setGutterHighlights, setPrimaryQueryOnObject, setQuerySourceEditing, setSuggestionBinding, shouldTriggerBackspaceCompletion, slashBlockCompletion, smartIncrement, summarizeAggregate, summarizeFind, summarizePipeline, tagsFromStaticBlocks, toChartResult, toggleCompareLayer, toggleGoalLayer, toggleInlineMarkdown, toggleWidgetEdit, tooltipTimestamp, urlAtPos, useChartShape, useComposerSlots, useSessionPrHighlights, useSuggestions, useWqlStageCounts, widgetBlockPreview, wodAutoWrap, wodAutocompletion, wodBackspaceCompletion, wodCompletionIconOption, wodCompletionKeymap, wodCompletionSource, wodEditorKeymap, wodIndentKeymap, wodLinter, wodOverlayPanel, workoutLintSource, wqlToPills, wrapInTimeFence };
21901
- //# sourceMappingURL=chunk-C6BT5QVA.mjs.map
21902
- //# sourceMappingURL=chunk-C6BT5QVA.mjs.map
21920
+ //# sourceMappingURL=chunk-SDIPYD4U.mjs.map
21921
+ //# sourceMappingURL=chunk-SDIPYD4U.mjs.map