@bitcobblers/wod-wiki-lang 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.
package/dist/react.cjs CHANGED
@@ -857,12 +857,37 @@ var COLUMN_LABEL_MAP = {
857
857
  "session-load": "Session Load",
858
858
  "met-score": "MET Score",
859
859
  tis: "TIS",
860
- sound: "Sound"
860
+ sound: "Sound",
861
+ // Derived / analytics columns (keys are lowercased in computeColumnLabel).
862
+ "calc.metminutes": "MET Minutes",
863
+ metminutes: "MET Minutes",
864
+ metminutesestimated: "MET Minutes Est.",
865
+ sessionload: "Session Load",
866
+ totalvolume: "Total Volume",
867
+ totalreps: "Total Reps",
868
+ totaldistance: "Total Distance",
869
+ "calc.acwr": "ACWR",
870
+ "calc.monotony": "Monotony",
871
+ "calc.strain": "Strain",
872
+ "calc.readiness": "Readiness",
873
+ "calc.hrv": "HRV",
874
+ "calc.sleep": "Sleep",
875
+ "calc.soreness": "Soreness"
876
+ };
877
+ var METRIC_KEY_ACRONYMS = {
878
+ met: "MET",
879
+ hrv: "HRV",
880
+ rpe: "RPE",
881
+ tis: "TIS",
882
+ acwr: "ACWR",
883
+ vo2max: "VO2max"
861
884
  };
862
885
  function humanizeMetricKey(value) {
863
- const spaced = value.replace(/[_-]+/g, " ").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").trim();
886
+ const spaced = value.replace(/^calc\./i, "").replace(/[_-]+/g, " ").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").trim();
864
887
  if (spaced.length === 0) return "";
865
888
  return spaced.split(/\s+/).map((word) => {
889
+ const acronym = METRIC_KEY_ACRONYMS[word.toLowerCase()];
890
+ if (acronym) return acronym;
866
891
  if (word === word.toUpperCase()) return word;
867
892
  if (/^[A-Z]{2,}$/.test(word)) return word;
868
893
  return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
@@ -1219,9 +1244,10 @@ function projectSessionClock(runtime, options = {}) {
1219
1244
  if (!subLabels) subLabels = subLabel ? [subLabel] : void 0;
1220
1245
  const activeDirection = active?.timer.direction ?? "up";
1221
1246
  const activeDurationMs = active?.timer.durationMs;
1222
- const activeSpans = active ? serializeSpans(active.timer.spans) : [];
1247
+ const isWaitingToStart = blocks[0]?.blockType === "WaitingToStart";
1248
+ const activeSpans = active && !isWaitingToStart ? serializeSpans(active.timer.spans) : [];
1223
1249
  let displayMs = 0;
1224
- if (active) {
1250
+ if (active && !isWaitingToStart) {
1225
1251
  const elapsed = calculateDuration(active.timer.spans, nowMs);
1226
1252
  displayMs = activeDirection === "down" && activeDurationMs !== void 0 ? Math.max(0, activeDurationMs - elapsed) : elapsed;
1227
1253
  }
@@ -1233,8 +1259,8 @@ function projectSessionClock(runtime, options = {}) {
1233
1259
  (best, cur) => cur.elapsed > (best?.elapsed ?? -1) ? cur : best,
1234
1260
  withElapsed[withElapsed.length - 1]
1235
1261
  );
1236
- const sessionElapsedMs = sessionHolder?.elapsed ?? 0;
1237
- const sessionSpans = sessionHolder ? serializeSpans(sessionHolder.entry.timer.spans) : [];
1262
+ const sessionElapsedMs = isWaitingToStart ? 0 : sessionHolder?.elapsed ?? 0;
1263
+ const sessionSpans = sessionHolder && !isWaitingToStart ? serializeSpans(sessionHolder.entry.timer.spans) : [];
1238
1264
  const activeKey = active?.block.key.toString();
1239
1265
  const sessionKey = sessionHolder?.entry.block.key.toString();
1240
1266
  const secondaryTimers = allTimers.filter((t) => {