@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.
- package/dist/{chunk-C6BT5QVA.mjs → chunk-SDIPYD4U.mjs} +23 -4
- package/dist/chunk-SDIPYD4U.mjs.map +1 -0
- package/dist/extensions/index.cjs +21 -2
- package/dist/extensions/index.cjs.map +1 -1
- package/dist/extensions/index.d.cts +1 -1
- package/dist/extensions/index.d.ts +1 -1
- package/dist/extensions/index.mjs +1 -1
- package/dist/{index-ByZr9Fye.d.cts → index-BL555pPw.d.cts} +5 -0
- package/dist/{index-ByZr9Fye.d.ts → index-BL555pPw.d.ts} +5 -0
- package/dist/index.cjs +27 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.mjs +8 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/dist/chunk-C6BT5QVA.mjs.map +0 -1
|
@@ -3588,6 +3588,17 @@ function formatPaceMMSS(secPerKm) {
|
|
|
3588
3588
|
const secs = rounded % 60;
|
|
3589
3589
|
return `${mins}:${String(secs).padStart(2, "0")} /km`;
|
|
3590
3590
|
}
|
|
3591
|
+
function normalizePaceToSecPerKm(value, unit) {
|
|
3592
|
+
if (!Number.isFinite(value) || value <= 0) return null;
|
|
3593
|
+
const u = (unit ?? "").trim().toLowerCase();
|
|
3594
|
+
if (!u || u === "sec/km" || u === "s/km") return value;
|
|
3595
|
+
if (u === "min/km") return value * 60;
|
|
3596
|
+
if (u === "min/mi") return value * 60 / 1.609344;
|
|
3597
|
+
if (u === "sec/mi" || u === "s/mi") return value / 1.609344;
|
|
3598
|
+
if (u === "m/s") return 1e3 / value;
|
|
3599
|
+
if (u === "km/h" || u === "kph") return 3600 / value;
|
|
3600
|
+
return null;
|
|
3601
|
+
}
|
|
3591
3602
|
function humanizeSlug(slug) {
|
|
3592
3603
|
return slug.split(/[-_\s]+/).filter(Boolean).map((p) => p.charAt(0).toUpperCase() + p.slice(1)).join(" ");
|
|
3593
3604
|
}
|
|
@@ -3747,7 +3758,14 @@ function buildSpreadsheetRows(run, prHighlights) {
|
|
|
3747
3758
|
power = m.value;
|
|
3748
3759
|
if (m.unit) powerUnit = m.unit;
|
|
3749
3760
|
} else if (canon === "pace") {
|
|
3750
|
-
|
|
3761
|
+
const normalized = normalizePaceToSecPerKm(m.value, m.unit);
|
|
3762
|
+
if (normalized !== null) {
|
|
3763
|
+
const u = (m.unit ?? "").trim().toLowerCase();
|
|
3764
|
+
const isExplicitPace = !u || u === "min/km" || u === "sec/km" || u === "s/km" || u === "min/mi" || u === "sec/mi" || u === "s/mi";
|
|
3765
|
+
if (paceSecPerKm === null || isExplicitPace || isUser) {
|
|
3766
|
+
paceSecPerKm = normalized;
|
|
3767
|
+
}
|
|
3768
|
+
}
|
|
3751
3769
|
} else if (canon === "rounds" || canon === "currentround" || lower === "current-round") {
|
|
3752
3770
|
round = Math.round(m.value);
|
|
3753
3771
|
} else if (!KNOWN_CANONICAL_KEYS.has(canon) && !KNOWN_CANONICAL_KEYS.has(lower)) {
|
|
@@ -12705,10 +12723,11 @@ function createFrontmatterSummary(entries, onShowDetails, docKind, referenceProv
|
|
|
12705
12723
|
const lower = val.toLowerCase();
|
|
12706
12724
|
if (seenTags.has(lower)) continue;
|
|
12707
12725
|
seenTags.add(lower);
|
|
12726
|
+
const match = referenceProvider?.resolveTag?.(val, normKey) ?? null;
|
|
12708
12727
|
tagItems.push({
|
|
12709
12728
|
text: val,
|
|
12710
12729
|
hash: true,
|
|
12711
|
-
href: referenceProvider
|
|
12730
|
+
href: match && referenceProvider ? referenceProvider.openHref("tag", match.slug, match.type ?? normKey) : void 0
|
|
12712
12731
|
});
|
|
12713
12732
|
}
|
|
12714
12733
|
}
|