@bitcobblers/wod-wiki-lang 0.59.2243 → 0.59.2245

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/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { UnitRegistry, hintsToContainer, hasHint, CONSUMED_HINTS, wallClockNow, TimeSpan, metricPresentation, hintMetric, resolveTagContributions, tagReferenceFor, tagContributionMetrics, tagMarkerType, collectTagReferences, tagMarkerSlugs, getHints } from './chunk-WALDXZIA.mjs';
2
- export { CONSUMED_HINTS, CONSUMED_HINT_KEYS, MAX_TAG_CONTRIBUTION_DEPTH, STANDARD_UNITS, TAG_MARKER_PREFIX, TimeSpan, UnitRegistry, UnitSet, buildTooltip, calculateDuration, computeColumnLabel, computeLabel, createBrowserRuntimeNow, createPolicy as createMetricPresentationPolicy, findTagContributionCycles, formatDurationCompact, formatDurationSmart, formatSecondsHHMMSS, formatSecondsMMSS, formatTime, formatTimeHHMMSS, formatTimeMMSS, formatTimePrecise, formatTimestamp, frozenNow, getHints, getRuntimeNowMs, hasHint, hintMetric, hintsToContainer, interpolateSessionClockFrame, isRequiredCountdownLocked, isTimeLikeMetric, metricPresentation, observeSessionClockInputs, projectLiveSessionTelemetry, projectScriptOutline, projectSessionClock, resolveTagContributions, resolveVisualPolarity, roundToTenth, synthesizeWorkoutFormat, tagContributionMetrics, tagMarkerSlug, tagMarkerSlugs, tagMarkerType, wallClockNow } from './chunk-WALDXZIA.mjs';
1
+ import { UnitRegistry, hintsToContainer, hasHint, CONSUMED_HINTS, wallClockNow, TimeSpan, metricPresentation, hintMetric, resolveTagContributions, tagReferenceFor, tagContributionMetrics, tagMarkerType, collectTagReferences, tagMarkerSlugs, getHints } from './chunk-L6BUOOKE.mjs';
2
+ export { CONSUMED_HINTS, CONSUMED_HINT_KEYS, MAX_TAG_CONTRIBUTION_DEPTH, STANDARD_UNITS, TAG_MARKER_PREFIX, TimeSpan, UnitRegistry, UnitSet, buildTooltip, calculateDuration, computeColumnLabel, computeLabel, createBrowserRuntimeNow, createPolicy as createMetricPresentationPolicy, findTagContributionCycles, formatDurationCompact, formatDurationSmart, formatSecondsHHMMSS, formatSecondsMMSS, formatTime, formatTimeHHMMSS, formatTimeMMSS, formatTimePrecise, formatTimestamp, frozenNow, getHints, getRuntimeNowMs, hasHint, hintMetric, hintsToContainer, interpolateSessionClockFrame, isRequiredCountdownLocked, isTimeLikeMetric, metricPresentation, observeSessionClockInputs, projectLiveSessionTelemetry, projectScriptOutline, projectSessionClock, resolveTagContributions, resolveVisualPolarity, roundToTenth, synthesizeWorkoutFormat, tagContributionMetrics, tagMarkerSlug, tagMarkerSlugs, tagMarkerType, wallClockNow } from './chunk-L6BUOOKE.mjs';
3
3
  import { MetricType, MetricContainer, BlockKey, REFERENCE_METADATA_KEY, ParsedCodeStatement, getReferenceMetadata, TAG_REFERENCE_METADATA_KEY, parseFrontmatter, getScalar, OutputStatement, valueKindOf, normalizeFieldPath } from '@bitcobblers/wod-wiki-core';
4
4
  import { LRParser } from '@lezer/lr';
5
5
  import { LRLanguage, LanguageSupport, syntaxTree } from '@codemirror/language';
@@ -817,7 +817,7 @@ var ClimbDialect = class {
817
817
  const metric = metrics[index];
818
818
  const current = metricText(metric);
819
819
  const next = metricText(metrics[index + 1]);
820
- const vScale = current.match(/\bV(\d{1,2})(?:[-+])?\b/i);
820
+ const vScale = current.match(/\bV(\d{1,2})[-+]?\b/i);
821
821
  if (vScale) {
822
822
  const gradeNumber = Number(vScale[1]);
823
823
  return { raw: vScale[0].toUpperCase(), system: "v-scale", normalizedRank: gradeNumber };
@@ -833,13 +833,13 @@ var ClimbDialect = class {
833
833
  if (ydsInline) {
834
834
  return { raw: ydsInline[0], system: "yds", normalizedRank: this.ydsRank(ydsInline[0]) };
835
835
  }
836
- const fontInline = current.match(/\b([3-9][ABC](?:\+)?)\b/);
836
+ const fontInline = current.match(/\b([3-9][ABC]\+?)\b/);
837
837
  if (fontInline) return { raw: fontInline[1], system: "font" };
838
838
  if (typeof metric.value === "number" && metric.value >= 3 && metric.value <= 9) {
839
839
  const suffix = next.match(/^\s*([ABC]\+?)\b/)?.[1];
840
840
  if (suffix) return { raw: `${metric.value}${suffix}`, system: "font" };
841
841
  }
842
- const frenchInline = current.match(/\b([3-9][abc](?:\+)?)\b/);
842
+ const frenchInline = current.match(/\b([3-9][abc]\+?)\b/);
843
843
  if (frenchInline) return { raw: frenchInline[1], system: "french" };
844
844
  }
845
845
  return void 0;
@@ -2295,6 +2295,7 @@ var MdTimerRuntime = class {
2295
2295
  * Parse WhiteboardScript source into a {@link WhiteboardScript}, running the
2296
2296
  * Dialect Stack on every statement.
2297
2297
  *
2298
+ * @param inputText - Raw WhiteboardScript source text.
2298
2299
  * @param sport - The block's `:sport` fence suffix (` ```log:climbing `).
2299
2300
  */
2300
2301
  read(inputText, sport) {
@@ -4731,7 +4732,7 @@ function createReferenceIndex(catalog, materialize) {
4731
4732
  const resolvedEquipment = resolveEquipmentValues(values);
4732
4733
  equipmentRefs = resolvedEquipment.refs;
4733
4734
  diagnostics.push(...resolvedEquipment.diagnostics);
4734
- if (effortEntity?.equipment?.length) {
4735
+ if (effortEntity && effortEntity.equipment?.length) {
4735
4736
  const definitionSlugs = new Set(effortEntity.equipment);
4736
4737
  const authoredSlugs = equipmentRefs.map((ref) => ref.slug);
4737
4738
  if (authoredSlugs.length > 0 && authoredSlugs.some((slug) => !definitionSlugs.has(slug))) {
@@ -5064,6 +5065,7 @@ var NextAction = class {
5064
5065
  * When provided (e.g., from PopBlockAction carrying createdAt), these options
5065
5066
  * are merged with a snapshot clock. When omitted (e.g., user-triggered next),
5066
5067
  * a fresh snapshot clock is created.
5068
+ * @param now Clock provider used when minting a fresh snapshot clock.
5067
5069
  */
5068
5070
  constructor(options, now = wallClockNow) {
5069
5071
  this.options = options;
@@ -9698,7 +9700,7 @@ function parsePropertyMetricRule(key, rawValue, layer, sourceSlug) {
9698
9700
  const amount = Number(qtyMatch[1]);
9699
9701
  const unitStr = qtyMatch[2];
9700
9702
  const knownUnit = getUnit(unitStr);
9701
- if (!Number.isNaN(amount) && (knownUnit || /^(kg|lb|m|km|mi|s|min|h|ms|reps|cal|bpm|W|pts|AU|%)$/i.test(unitStr))) {
9703
+ if (!Number.isNaN(amount) && (knownUnit || /^(kg|lb|[mshW%]|km|mi|min|ms|reps|cal|bpm|pts|AU)$/i.test(unitStr))) {
9702
9704
  return {
9703
9705
  kind: "static",
9704
9706
  key: normalizedKey,
@@ -9811,7 +9813,7 @@ function extractUnit(metric) {
9811
9813
  function hasStatementOwnedMetric(container, key) {
9812
9814
  const targetType = canonicalMetricType(key);
9813
9815
  return container.rawMetrics.some(
9814
- (m) => (m.type === targetType || m.type === key || m.name === key) && STATEMENT_OWNED_ORIGINS[m.origin] === true
9816
+ (m) => (m.type === targetType || m.type === key || m.name === key) && STATEMENT_OWNED_ORIGINS[m.origin]
9815
9817
  );
9816
9818
  }
9817
9819
  function inferApproxDim(node, dims) {
@@ -10921,6 +10923,7 @@ var SoundProfileBehavior = class {
10921
10923
  /**
10922
10924
  * Fire every rule whose trigger point has been reached.
10923
10925
  *
10926
+ * @param ctx active behavior context
10924
10927
  * @param elapsed milliseconds elapsed on the block's timer
10925
10928
  * @param durationMs the block's total duration
10926
10929
  * @param ending whether the block is ending — a rule anchored to the end