@bitcobblers/wod-wiki-lang 0.2.22 → 0.4.24

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.d.cts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { IMetric, MetricContainer, MetricOrigin, MetricType, IDialect, ICodeStatement, DialectAnalysis, ParsedCodeStatement, IOutputStatement, OutputStatementType, BlockKey, ScriptBlock, FenceDialect, Segment, AnalyticsGroup, StoredOutputStatement, OutputStatement } from '@bitcobblers/wod-wiki-core';
2
2
  export { ParseError } from '@bitcobblers/wod-wiki-core';
3
3
  import { Tree } from '@lezer/common';
4
- import { W as WhiteboardScript, I as IScript, a as IEffortResolver, b as IEffortRegistry, E as EffortResolverOptions, c as IEffort, d as EffortResolutionOptions, R as ResolvedEffort, e as EffortRegistrySource, f as IRuntimeActionable, g as IEventBus, h as IRuntimeStack, i as IRuntimeClock, j as IJitCompiler, k as INowProvider, l as RuntimeStackOptions, m as RuntimeError, A as AnalyticsContext, n as IEvent, o as IRuntimeAction, O as OutputListener, U as Unsubscribe, p as IAnalyticsEngine, q as IRuntimeBlock, r as IBehaviorContext, B as BehaviorEventType, s as BehaviorEventListener, S as SubscribeOptions, t as Unsubscribe$1, u as OutputOptions, M as MemoryTag, v as IMemoryLocation, w as IRuntimeBehavior, x as IBlockContext, y as MetricVisibility, z as BlockLifecycleOptions, C as CompletionDecision, T as TimeSpan, D as IRuntimeMemory, F as TypedMemoryReference, G as MemorySearchCriteria, H as IMemoryReference, J as StackObserver, K as StackSnapshot, L as StackListener, N as MemoryTypeEnum, P as IAnchorValue, Q as IEventHandler, V as HandlerScope, X as IScriptRuntime, Y as TestableBlockConfig, Z as IRuntimeOptions, _ as ScriptRuntime, $ as EventHandlerOptions, a0 as EventCallback, a1 as TimerState, a2 as IRealtimeProcessor, a3 as ISummaryProcessor, a4 as ProjectionResult } from './browserRuntimeNow-SxxdmtB7.cjs';
5
- export { a5 as ButtonConfig, a6 as ButtonVariant, a7 as ButtonsState, a8 as ChildrenStatusState, a9 as CompletionState, aa as DEFAULT_RESOLVER_OPTIONS, ab as DISCIPLINE_FACTORS, ac as DisplayState, ad as EFFORT_DISCIPLINES, ae as EFFORT_REGISTRY_ORIGINS, af as EffortBaseAttributes, ag as EffortDerivation, ah as EffortDiscipline, ai as EffortResolvedFrom, aj as FenceDialect, ak as FragmentDisplayState, al as FragmentState, am as IAnalyticsProcessorDescriptor, an as INTENSITY_TIERS, ao as IntensityTier, ap as MemoryLocation, aq as MemoryType, ar as MemoryTypeMap, as as MemoryValueOf, at as RoundState, au as RuntimeState, av as ScriptRuntimeDependencies, aw as TimerDirection, ax as VISIBILITY_ICONS, ay as VISIBILITY_LABELS, az as createBrowserRuntimeNow, aA as disciplineFactorFor, aB as filterTagsByVisibility, aC as frozenNow, aD as getMetricVisibility, aE as getRuntimeNowMs, aF as isEffortDiscipline, aG as isFragmentTag, aH as wallClockNow } from './browserRuntimeNow-SxxdmtB7.cjs';
4
+ import { W as WhiteboardScript, I as IScript, a as IEffortResolver, b as IEffortRegistry, E as EffortResolverOptions, c as IEffort, d as EffortResolutionOptions, R as ResolvedEffort, e as EffortRegistrySource, f as IRuntimeActionable, g as IEventBus, h as IRuntimeStack, i as IRuntimeClock, j as IJitCompiler, k as INowProvider, l as RuntimeStackOptions, m as RuntimeError, A as AnalyticsContext, n as IEvent, o as IRuntimeAction, O as OutputListener, U as Unsubscribe, p as IAnalyticsEngine, q as IRuntimeBlock, r as IBehaviorContext, B as BehaviorEventType, s as BehaviorEventListener, S as SubscribeOptions, t as Unsubscribe$1, u as OutputOptions, M as MemoryTag, v as IMemoryLocation, w as IRuntimeBehavior, x as IBlockContext, y as MetricVisibility, z as BlockLifecycleOptions, C as CompletionDecision, T as TimeSpan, D as IRuntimeMemory, F as TypedMemoryReference, G as MemorySearchCriteria, H as IMemoryReference, J as StackObserver, K as StackSnapshot, L as StackListener, N as MemoryTypeEnum, P as IAnchorValue, Q as IEventHandler, V as HandlerScope, X as IScriptRuntime, Y as TestableBlockConfig, Z as IRuntimeOptions, _ as ScriptRuntime, $ as EventHandlerOptions, a0 as EventCallback, a1 as TimerState, a2 as IRealtimeProcessor, a3 as ISummaryProcessor, a4 as ProjectionResult } from './browserRuntimeNow-DCJ4w4o_.cjs';
5
+ export { a5 as ButtonConfig, a6 as ButtonVariant, a7 as ButtonsState, a8 as ChildrenStatusState, a9 as CompletionState, aa as DEFAULT_RESOLVER_OPTIONS, ab as DEFAULT_RUNTIME_OPTIONS, ac as DISCIPLINE_FACTORS, ad as DisplayState, ae as EFFORT_DISCIPLINES, af as EFFORT_REGISTRY_ORIGINS, ag as EffortBaseAttributes, ah as EffortDerivation, ai as EffortDiscipline, aj as EffortResolvedFrom, ak as FenceDialect, al as FragmentDisplayState, am as FragmentState, an as IAnalyticsProcessorDescriptor, ao as INTENSITY_TIERS, ap as IntensityTier, aq as InterceptMode, ar as MemoryLocation, as as MemoryType, at as MemoryTypeMap, au as MemoryValueOf, av as RoundState, aw as RuntimeState, ax as ScriptRuntimeDependencies, ay as StackEvent, az as TimerDirection, aA as VISIBILITY_ICONS, aB as VISIBILITY_LABELS, aC as createBrowserRuntimeNow, aD as disciplineFactorFor, aE as filterTagsByVisibility, aF as frozenNow, aG as getMetricVisibility, aH as getRuntimeNowMs, aI as isEffortDiscipline, aJ as isFragmentTag, aK as wallClockNow } from './browserRuntimeNow-DCJ4w4o_.cjs';
6
6
  import { LanguageSupport, LRLanguage } from '@codemirror/language';
7
7
  import { LRParser } from '@lezer/lr';
8
8
 
@@ -1686,6 +1686,97 @@ declare class NextAction implements IRuntimeAction {
1686
1686
  private validateRuntimeState;
1687
1687
  }
1688
1688
 
1689
+ interface CountupTimerConfig {
1690
+ /** Human-readable label shown in the display layer */
1691
+ label?: string;
1692
+ /** Timer role for display priority */
1693
+ role?: 'primary' | 'secondary' | 'hidden' | 'auto';
1694
+ }
1695
+ /**
1696
+ * CountupTimerBehavior manages the full lifecycle of a count-up timer.
1697
+ *
1698
+ * ## Aspect: Time (Count-up)
1699
+ *
1700
+ * Covers the complete lifecycle for blocks without a fixed duration:
1701
+ * - **mount**: opens an initial TimeSpan to start tracking
1702
+ * - **pause/resume events**: closes/opens spans to exclude paused time
1703
+ * - **unmount**: closes the current span to finalise elapsed time
1704
+ *
1705
+ * There is no tick subscription and no completion signal — the block
1706
+ * advances only when the user (or a parent) calls `next()`.
1707
+ *
1708
+ * Strategies: assign this directly instead of composing TimerInitBehavior
1709
+ * + TimerTickBehavior + TimerPauseBehavior.
1710
+ */
1711
+ declare class CountupTimerBehavior implements IRuntimeBehavior {
1712
+ readonly config: CountupTimerConfig;
1713
+ constructor(config?: CountupTimerConfig);
1714
+ private subscriptions;
1715
+ private isPaused;
1716
+ onMount(ctx: IBehaviorContext): IRuntimeAction[];
1717
+ onNext(_ctx: IBehaviorContext): IRuntimeAction[];
1718
+ onUnmount(ctx: IBehaviorContext): IRuntimeAction[];
1719
+ onDispose(_ctx: IBehaviorContext): void;
1720
+ private createFragment;
1721
+ }
1722
+
1723
+ /**
1724
+ * Controls what happens when the countdown reaches zero.
1725
+ *
1726
+ * - `complete-block`: marks the block complete and clears children.
1727
+ * Use for timers that own the block's lifecycle (AMRAP cap, timed effort).
1728
+ * - `reset-interval`: resets spans and children state for the next round.
1729
+ * Use for repeating-interval timers where the block lives across many rounds (EMOM).
1730
+ */
1731
+ type CountdownMode = 'complete-block' | 'reset-interval';
1732
+ interface CountdownTimerConfig {
1733
+ /** Duration in milliseconds — required for a countdown */
1734
+ durationMs: number;
1735
+ /** Human-readable label shown in the display layer */
1736
+ label?: string;
1737
+ /** Timer role for display priority */
1738
+ role?: 'primary' | 'secondary' | 'hidden' | 'auto';
1739
+ /**
1740
+ * What happens when elapsed >= durationMs.
1741
+ * Defaults to `'complete-block'`.
1742
+ */
1743
+ mode?: CountdownMode;
1744
+ /** Factory to create a rest block for "next" transitions */
1745
+ restBlockFactory?: (durationMs: number, label?: string) => IRuntimeAction[];
1746
+ /**
1747
+ * If true, the user cannot skip this timer. Pressing "Next" emits a
1748
+ * `timer:skip-attempt` event instead of advancing the block.
1749
+ */
1750
+ required?: boolean;
1751
+ }
1752
+ /**
1753
+ * CountdownTimerBehavior manages the full lifecycle of a count-down timer.
1754
+ *
1755
+ * ## Aspect: Time (Count-down)
1756
+ *
1757
+ * Covers the complete lifecycle for blocks with a fixed duration:
1758
+ * - **mount**: opens an initial TimeSpan; checks immediate expiry
1759
+ * - **tick events**: monitors elapsed time and fires `timer:complete` on expiry
1760
+ * - **pause/resume events**: closes/opens spans to exclude paused time
1761
+ * - **unmount**: closes the current span to finalise elapsed time
1762
+ *
1763
+ * Strategies assign this one behavior instead of composing the old quartet
1764
+ * (TimerInitBehavior + TimerTickBehavior + TimerEndingBehavior + TimerPauseBehavior).
1765
+ */
1766
+ declare class CountdownTimerBehavior implements IRuntimeBehavior {
1767
+ readonly config: CountdownTimerConfig;
1768
+ constructor(config: CountdownTimerConfig);
1769
+ private subscriptions;
1770
+ private isPaused;
1771
+ onMount(ctx: IBehaviorContext): IRuntimeAction[];
1772
+ onNext(ctx: IBehaviorContext): IRuntimeAction[];
1773
+ onUnmount(ctx: IBehaviorContext): IRuntimeAction[];
1774
+ onDispose(_ctx: IBehaviorContext): void;
1775
+ private handleExpiry;
1776
+ private getRemainingCountdownMs;
1777
+ private createFragment;
1778
+ }
1779
+
1689
1780
  type ChildSelectionLoopCondition = 'always' | 'timer-active' | 'rounds-remaining';
1690
1781
  interface ChildSelectionConfig {
1691
1782
  /** Groups of statement indices to compile and dispatch */
@@ -1932,6 +2023,34 @@ interface ICastSubscription extends IRuntimeSubscription {
1932
2023
  */
1933
2024
  declare function isCastSubscription(s: IRuntimeSubscription): s is ICastSubscription;
1934
2025
 
2026
+ /**
2027
+ * Provides bidirectional event flow between runtime consumers.
2028
+ *
2029
+ * Implementations determine the transport:
2030
+ * - LocalEventProvider dispatches directly to the local IScriptRuntime
2031
+ * - ChromecastEventProvider sends/receives events over the RPC transport
2032
+ *
2033
+ * This abstracts away whether an event originates locally (button press)
2034
+ * or remotely (Chromecast D-Pad) — the runtime processes both identically.
2035
+ */
2036
+ interface IRuntimeEventProvider {
2037
+ /**
2038
+ * Dispatch an event to be processed by the runtime.
2039
+ * For local: calls runtime.handle(event) directly.
2040
+ * For chromecast: serializes and sends over the RPC channel.
2041
+ */
2042
+ dispatch(event: IEvent): void;
2043
+ /**
2044
+ * Listen for incoming events (from remote sources or the runtime event bus).
2045
+ * Returns an unsubscribe function.
2046
+ */
2047
+ onEvent(handler: (event: IEvent) => void): Unsubscribe;
2048
+ /**
2049
+ * Clean up resources.
2050
+ */
2051
+ dispose(): void;
2052
+ }
2053
+
1935
2054
  /**
1936
2055
  * Action that pushes a compiled block onto the runtime stack.
1937
2056
  * Used by behaviors to add child blocks for execution.
@@ -3319,34 +3438,6 @@ declare class LocalRuntimeSubscription implements IRuntimeSubscription {
3319
3438
  dispose(): void;
3320
3439
  }
3321
3440
 
3322
- /**
3323
- * Provides bidirectional event flow between runtime consumers.
3324
- *
3325
- * Implementations determine the transport:
3326
- * - LocalEventProvider dispatches directly to the local IScriptRuntime
3327
- * - ChromecastEventProvider sends/receives events over the RPC transport
3328
- *
3329
- * This abstracts away whether an event originates locally (button press)
3330
- * or remotely (Chromecast D-Pad) — the runtime processes both identically.
3331
- */
3332
- interface IRuntimeEventProvider {
3333
- /**
3334
- * Dispatch an event to be processed by the runtime.
3335
- * For local: calls runtime.handle(event) directly.
3336
- * For chromecast: serializes and sends over the RPC channel.
3337
- */
3338
- dispatch(event: IEvent): void;
3339
- /**
3340
- * Listen for incoming events (from remote sources or the runtime event bus).
3341
- * Returns an unsubscribe function.
3342
- */
3343
- onEvent(handler: (event: IEvent) => void): Unsubscribe;
3344
- /**
3345
- * Clean up resources.
3346
- */
3347
- dispose(): void;
3348
- }
3349
-
3350
3441
  /**
3351
3442
  * LocalEventProvider — dispatches events directly to the local IScriptRuntime.
3352
3443
  *
@@ -4396,13 +4487,13 @@ declare function toStoredOutputStatement(output: IOutputStatement | OutputStatem
4396
4487
  * Auto-generated build version metadata.
4397
4488
  * Do not edit directly; updated by scripts/stamp-version.ts
4398
4489
  */
4399
- declare const VERSION = "0.2.22";
4400
- declare const GIT_SHA = "ad43a34";
4401
- declare const BUILD_TIME = "2026-08-18T18:49:40.692Z";
4490
+ declare const VERSION = "0.4.24";
4491
+ declare const GIT_SHA = "90d86de";
4492
+ declare const BUILD_TIME = "2026-08-18T20:19:27.340Z";
4402
4493
  declare const SEMVER: {
4403
- readonly version: "0.2.22";
4404
- readonly gitSha: "ad43a34";
4405
- readonly buildTime: "2026-08-18T18:49:40.692Z";
4494
+ readonly version: "0.4.24";
4495
+ readonly gitSha: "90d86de";
4496
+ readonly buildTime: "2026-08-18T20:19:27.340Z";
4406
4497
  };
4407
4498
 
4408
- export { ABSENT, AGGREGATE_BUILTINS, AUTHORITATIVE_CASTS, AbortSessionAction, type ActionDescriptor, type ActionPrimitive, AnalyticsContext, AnalyticsEngine, type AnalyticsProfileContext, type AnalyticsResult, AnalyticsTransformer, BUILD_TIME, BUILTIN_CALCS, BUNDLED_EFFORT_COUNT, BehaviorContext, type BinaryOp, BlockContext, BlockLifecycleOptions, CONSUMED_HINTS, CONSUMED_HINT_KEYS, CONTEXT_ATOMS, type CalcAnalysis, type CalculationDefinition$1 as CalcDefinition, type CalcDiagnostic, CalcEngine, type CalcEngineDeps, CalcEvalError, type CalcLine, type CalcNode, type CalcOrigin, CalcParseError, CalcRegistrationError, type CalcScope, type CalcStack, type CalcStackOptions, type UnitDef as CalcUnitDef, CalcUnitError, type CalcVariant, type CalculationDefinition as CalculateBlockDefinition, type CalculateBlockParseError, type CalculateBlockParseResult, CalculateBlockProcessor, type CalculationDefinition$1 as CalculationDefinition, CalculationRegistry, CardioDialect, ClearChildrenAction, ClimbDialect, type ClimbGradeMetricValue, type ClimbGradeSystem, ClimbMetricType, CompileAndPushBlockAction, type CompiledLineForm, CompletionDecision, type CreateAnalyticsEngineOptions, type CreateAnalyticsEngineResult, CrossFitDialect, DAY, DEFAULT_UNRESOLVED_EFFORT_MET, DIM_COUNT, DIM_ENERGY, DIM_LENGTH, DIM_MASS, DIM_TIME, DIM_ZERO, type DayRollup, DialectStack, type DimVector, type Dimension, type DurationPrimitive, EFFORT_DATA_METRIC_TYPE, EffortBlock, type EffortBlockConfig, type EffortPrimitive, EffortRegistrySource, EffortResolutionOptions, EffortResolver, EffortResolverOptions, EmitEventAction, EmitSystemOutputAction, ErrorAction, type EvalContext, EventBus, type EventHandlerRegistration, ExecutionContext, type ExecutionSnapshot, type ExprNode, type FuzzyCandidate, GIT_SHA, HabitsDialect, type HeadingPrimitive, IAnalyticsEngine, type IAnalyticsProfile, IBlockContext, type ICastSubscription, IEffort, IEffortRegistry, IEffortResolver, IEvent, IEventBus, IEventHandler, IJitCompiler, type ILookupTable, IMemoryLocation, IMemoryReference, type IMetricPresentationPolicy, INowProvider, type IProfileSource, IRealtimeProcessor, IRuntimeAction, IRuntimeBehavior, IRuntimeBlock, type IRuntimeBlockStrategy, IRuntimeClock, type IRuntimeFactory, IRuntimeStack, type IRuntimeSubscription, IScript, IScriptRuntime, ISummaryProcessor, InMemoryEffortRegistry, JitCompiler, type LapPrimitive, type LineFormScope, type LineLocator, LocalEventProvider, LocalRuntimeSubscription, type LogLevel, type LookupFieldDef, type LookupLayer, LookupRegistry, MdTimerRuntime, type MemoryEntry, MemoryTag, MemoryTypeEnum, type MetricObjectPrimitive, type MetricPresentationSurface, type MetricPresentationToken, type MetricRenderKind, type MetricTone, MetricVisibility, type MockClock, NAMED_COMPOUNDS, NextAction, NextEvent, NextEventHandler, OutputEmitter, PREDEFINED_SOUNDS, PRODUCTION_STRATEGIES, type ParseOptions, PlaySoundAction, PopBlockAction, type PredefinedSoundName, ProjectionResult, type PropertyPrimitive, PushBlockAction, PushRestBlockAction, type QuantityPrimitive, REST_EXCLUSION, RPE_LABELS, RegisterEventHandlerAction, Registry, ResolvedEffort, type ResolvedEffortData, RestBlock, type RestBlockConfig, type RoundsPrimitive, RuntimeAdapter, RuntimeBlock, type RuntimeBlockOptions, RuntimeBuilder, type RuntimeButton, RuntimeClock, type RuntimeController, type RuntimeControls, RuntimeError, RuntimeFactory, type RuntimeLogEntry, RuntimeLogger, RuntimeMemory, type RuntimeMemoryLocation, RuntimeObservers, RuntimeStack, SEMVER, STANDARD_UNITS, STORE_CALCS, STREAM_ATOMS, ScriptRuntime, type SegmentWithMetadata, SessionRootBlock, type SessionRootConfig, SnapshotClock, type SoundBehaviorConfig, type SoundCue, type SoundCueState, type SoundState, type SourceInput, type SpanList, StackObserver, StackSnapshot, StandardAnalyticsProfile, StartSessionAction, type StartSessionOptions, StartWorkoutAction, type StartWorkoutOptions, type StaticEnv, type StreamAtomDef, SubscriptionManager, type SyntaxFacts, type SyntaxMeta, type SyntaxPrimitive, type SyntaxStatement, type TextPrimitive, ThrowError, ThrowErrorAction, TimeSpan, TimerState, TwoPassEffortResolutionProcess, TypedMemoryReference, UNITS, type UnitDef$1 as UnitDef, type UnitMatch, UnitRegistry, UnitSet, UnitsDialect, UnregisterEventHandlerAction, Unsubscribe, UpdateNextPreviewAction, VERSION, type Val, WaitingToStartBlock, WhiteboardScript, WodDialect, YogaDialect, addDim, buildStaticLookups, buildTooltip, bundledEfforts, calculateElapsed, checkCalcLine, classifyStatements, closeCurrentSpan, collapseUnresolvedChoices, commonFixtureSet, compileLineForm, composeDivUnit, composeMulUnit, compoundName, computeColumnLabel, computeLabel, computeWorkloadRollups, convertScalar, createAnalyticsEngineForBlock, createCalcEngine, createCalcStack, createCompiler, createDialectStack, createDisciplinesTable, createEffortTable, createLineLocator, createPolicy as createMetricPresentationPolicy, createMockClock, createParser, createProfileTable, createRpeLabelsTable, dailySessionLoads, dayBucket, dialectRegistry, dialectStack, dimEquals, evaluate, evaluateCalculateDefinitions, extractEffortData, extractMetrics, extractStatements, extractStatementsRaw, extractSyntaxFacts, findBestFuzzyMatch, findUnresolvedChoices, fixtureBackSquat, fixtureBurpee, fixturePlank, fixtureRowing, fixtureRunning, fixtureUserCustom, fixtureUserOverride, formatDim, formatDuration, metricsToLabel as fragmentsToLabel, fullFixtureSet, fuseUnits, fuseUnitsInMetrics, getAnalyticsFromLogs, getAnalyticsFromRuntime, getHints, getUnit, hasHint, hintMetric, hintsToContainer, inferDim, isCastSubscription, isChoiceResolved, isDimensionless, isTimeLikeMetric, isWithinThreshold, levenshteinDistance, metricPresentation, mutateTimerSpans, normalizeForFuzzy, num, openSpan, outputNodeId, outputNodeIds, parseCalcLine, parseCalculateBlock, parseExpression, parseScript, printCalculation, readTimer, realtimeProcessorRegistry, resolveDominantOrigin, sharedParser, startSpan, str, strategyRegistry, subDim, summaryProcessorRegistry, toStoredOutputStatement, truthy, validateOutputUnit, parser as whiteboardParser, whiteboardScript, whiteboardScriptLanguage, writeChoiceSelection };
4499
+ export { ABSENT, AGGREGATE_BUILTINS, AUTHORITATIVE_CASTS, AbortSessionAction, type ActionDescriptor, type ActionPrimitive, AnalyticsContext, AnalyticsEngine, type AnalyticsProfileContext, type AnalyticsResult, AnalyticsTransformer, BUILD_TIME, BUILTIN_CALCS, BUNDLED_EFFORT_COUNT, BehaviorContext, BehaviorEventListener, BehaviorEventType, type BinaryOp, BlockBuilder, BlockContext, BlockLifecycleOptions, CONSUMED_HINTS, CONSUMED_HINT_KEYS, CONTEXT_ATOMS, type CalcAnalysis, type CalculationDefinition$1 as CalcDefinition, type CalcDiagnostic, CalcEngine, type CalcEngineDeps, CalcEvalError, type CalcLine, type CalcNode, type CalcOrigin, CalcParseError, CalcRegistrationError, type CalcScope, type CalcStack, type CalcStackOptions, type UnitDef as CalcUnitDef, CalcUnitError, type CalcVariant, type CalculationDefinition as CalculateBlockDefinition, type CalculateBlockParseError, type CalculateBlockParseResult, CalculateBlockProcessor, type CalculationDefinition$1 as CalculationDefinition, CalculationRegistry, CardioDialect, ChoiceGroupMetric, ClearChildrenAction, ClimbDialect, type ClimbGradeMetricValue, type ClimbGradeSystem, ClimbMetricType, CompileAndPushBlockAction, type CompiledLineForm, CompletionDecision, CountdownTimerBehavior, CountupTimerBehavior, type CreateAnalyticsEngineOptions, type CreateAnalyticsEngineResult, CrossFitDialect, DAY, DEFAULT_UNRESOLVED_EFFORT_MET, DIM_COUNT, DIM_ENERGY, DIM_LENGTH, DIM_MASS, DIM_TIME, DIM_ZERO, type DayRollup, DialectStack, type DimVector, type Dimension, type DurationPrimitive, EFFORT_DATA_METRIC_TYPE, EffortBlock, type EffortBlockConfig, type EffortPrimitive, EffortRegistrySource, EffortResolutionOptions, EffortResolver, EffortResolverOptions, EmitEventAction, EmitSystemOutputAction, ErrorAction, type EvalContext, EventBus, EventCallback, EventHandlerOptions, type EventHandlerRegistration, ExecutionContext, type ExecutionSnapshot, type ExecutionStatus, type ExprNode, type FuzzyCandidate, GIT_SHA, HabitsDialect, type HeadingPrimitive, IAnalyticsEngine, type IAnalyticsProfile, IAnchorValue, IBehaviorContext, IBlockContext, type ICastSubscription, IEffort, IEffortRegistry, IEffortResolver, IEvent, IEventBus, IEventHandler, IJitCompiler, type ILookupTable, IMemoryLocation, IMemoryReference, type IMetricPresentationPolicy, INowProvider, type IProfileSource, IRealtimeProcessor, IRuntimeAction, IRuntimeActionable, IRuntimeBehavior, IRuntimeBlock, type IRuntimeBlockStrategy, IRuntimeClock, type IRuntimeEventProvider, type IRuntimeFactory, IRuntimeMemory, IRuntimeStack, type IRuntimeSubscription, IScript, IScriptRuntime, ISummaryProcessor, InMemoryEffortRegistry, JitCompiler, type LapPrimitive, type LineFormScope, type LineLocator, LocalEventProvider, LocalRuntimeSubscription, type LogLevel, type LookupFieldDef, type LookupLayer, LookupRegistry, MdTimerRuntime, type MemoryEntry, MemoryTag, MemoryTypeEnum, type MetricObjectPrimitive, type MetricPresentationSurface, type MetricPresentationToken, type MetricRenderKind, type MetricTone, MetricVisibility, type MockClock, NAMED_COMPOUNDS, NextAction, NextEvent, NextEventHandler, OutputEmitter, OutputListener, PREDEFINED_SOUNDS, PRODUCTION_STRATEGIES, type ParseOptions, PlaySoundAction, PopBlockAction, type PredefinedSoundName, ProjectionResult, type PropertyPrimitive, PushBlockAction, PushRestBlockAction, type QuantityPrimitive, REST_EXCLUSION, RPE_LABELS, RegisterEventHandlerAction, Registry, ResolvedEffort, type ResolvedEffortData, RestBlock, type RestBlockConfig, type RoundsPrimitive, RuntimeAdapter, RuntimeBlock, type RuntimeBlockOptions, RuntimeBuilder, type RuntimeButton, RuntimeClock, type RuntimeController, type RuntimeControls, RuntimeError, RuntimeFactory, type RuntimeLogEntry, RuntimeLogger, RuntimeMemory, type RuntimeMemoryLocation, RuntimeObservers, RuntimeStack, RuntimeStackOptions, SEMVER, STANDARD_UNITS, STORE_CALCS, STREAM_ATOMS, ScriptRuntime, type SegmentWithMetadata, SessionRootBlock, type SessionRootConfig, SnapshotClock, type SoundBehaviorConfig, type SoundCue, type SoundCueState, type SoundState, type SourceInput, type SpanList, StackListener, StackObserver, StackSnapshot, StandardAnalyticsProfile, StartSessionAction, type StartSessionOptions, StartWorkoutAction, type StartWorkoutOptions, type StaticEnv, type StreamAtomDef, SubscribeOptions, SubscriptionManager, type SyntaxFacts, type SyntaxMeta, type SyntaxPrimitive, type SyntaxStatement, TestableBlockConfig, type TextPrimitive, ThrowError, ThrowErrorAction, TimeSpan, TimerState, TwoPassEffortResolutionProcess, TypedMemoryReference, UNITS, type UnitDef$1 as UnitDef, type UnitMatch, UnitRegistry, UnitSet, UnitsDialect, UnregisterEventHandlerAction, Unsubscribe, UpdateNextPreviewAction, VERSION, type Val, WaitingToStartBlock, WhiteboardScript, WodDialect, YogaDialect, addDim, buildStaticLookups, buildTooltip, bundledEfforts, calculateElapsed, checkCalcLine, classifyStatements, closeCurrentSpan, collapseUnresolvedChoices, commonFixtureSet, compileLineForm, composeDivUnit, composeMulUnit, compoundName, computeColumnLabel, computeLabel, computeWorkloadRollups, convertScalar, createAnalyticsEngineForBlock, createCalcEngine, createCalcStack, createCompiler, createDialectStack, createDisciplinesTable, createEffortTable, createLineLocator, createPolicy as createMetricPresentationPolicy, createMockClock, createParser, createProfileTable, createRpeLabelsTable, dailySessionLoads, dayBucket, dialectRegistry, dialectStack, dimEquals, evaluate, evaluateCalculateDefinitions, extractEffortData, extractMetrics, extractStatements, extractStatementsRaw, extractSyntaxFacts, findBestFuzzyMatch, findUnresolvedChoices, fixtureBackSquat, fixtureBurpee, fixturePlank, fixtureRowing, fixtureRunning, fixtureUserCustom, fixtureUserOverride, formatDim, formatDuration, metricsToLabel as fragmentsToLabel, fullFixtureSet, fuseUnits, fuseUnitsInMetrics, getAnalyticsFromLogs, getAnalyticsFromRuntime, getHints, getUnit, hasHint, hintMetric, hintsToContainer, inferDim, isCastSubscription, isChoiceResolved, isDimensionless, isTimeLikeMetric, isWithinThreshold, levenshteinDistance, metricPresentation, mutateTimerSpans, normalizeForFuzzy, num, openSpan, outputNodeId, outputNodeIds, parseCalcLine, parseCalculateBlock, parseExpression, parseScript, printCalculation, readTimer, realtimeProcessorRegistry, resolveDominantOrigin, sharedParser, startSpan, str, strategyRegistry, subDim, summaryProcessorRegistry, toStoredOutputStatement, truthy, validateOutputUnit, parser as whiteboardParser, whiteboardScript, whiteboardScriptLanguage, writeChoiceSelection };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { IMetric, MetricContainer, MetricOrigin, MetricType, IDialect, ICodeStatement, DialectAnalysis, ParsedCodeStatement, IOutputStatement, OutputStatementType, BlockKey, ScriptBlock, FenceDialect, Segment, AnalyticsGroup, StoredOutputStatement, OutputStatement } from '@bitcobblers/wod-wiki-core';
2
2
  export { ParseError } from '@bitcobblers/wod-wiki-core';
3
3
  import { Tree } from '@lezer/common';
4
- import { W as WhiteboardScript, I as IScript, a as IEffortResolver, b as IEffortRegistry, E as EffortResolverOptions, c as IEffort, d as EffortResolutionOptions, R as ResolvedEffort, e as EffortRegistrySource, f as IRuntimeActionable, g as IEventBus, h as IRuntimeStack, i as IRuntimeClock, j as IJitCompiler, k as INowProvider, l as RuntimeStackOptions, m as RuntimeError, A as AnalyticsContext, n as IEvent, o as IRuntimeAction, O as OutputListener, U as Unsubscribe, p as IAnalyticsEngine, q as IRuntimeBlock, r as IBehaviorContext, B as BehaviorEventType, s as BehaviorEventListener, S as SubscribeOptions, t as Unsubscribe$1, u as OutputOptions, M as MemoryTag, v as IMemoryLocation, w as IRuntimeBehavior, x as IBlockContext, y as MetricVisibility, z as BlockLifecycleOptions, C as CompletionDecision, T as TimeSpan, D as IRuntimeMemory, F as TypedMemoryReference, G as MemorySearchCriteria, H as IMemoryReference, J as StackObserver, K as StackSnapshot, L as StackListener, N as MemoryTypeEnum, P as IAnchorValue, Q as IEventHandler, V as HandlerScope, X as IScriptRuntime, Y as TestableBlockConfig, Z as IRuntimeOptions, _ as ScriptRuntime, $ as EventHandlerOptions, a0 as EventCallback, a1 as TimerState, a2 as IRealtimeProcessor, a3 as ISummaryProcessor, a4 as ProjectionResult } from './browserRuntimeNow-SxxdmtB7.js';
5
- export { a5 as ButtonConfig, a6 as ButtonVariant, a7 as ButtonsState, a8 as ChildrenStatusState, a9 as CompletionState, aa as DEFAULT_RESOLVER_OPTIONS, ab as DISCIPLINE_FACTORS, ac as DisplayState, ad as EFFORT_DISCIPLINES, ae as EFFORT_REGISTRY_ORIGINS, af as EffortBaseAttributes, ag as EffortDerivation, ah as EffortDiscipline, ai as EffortResolvedFrom, aj as FenceDialect, ak as FragmentDisplayState, al as FragmentState, am as IAnalyticsProcessorDescriptor, an as INTENSITY_TIERS, ao as IntensityTier, ap as MemoryLocation, aq as MemoryType, ar as MemoryTypeMap, as as MemoryValueOf, at as RoundState, au as RuntimeState, av as ScriptRuntimeDependencies, aw as TimerDirection, ax as VISIBILITY_ICONS, ay as VISIBILITY_LABELS, az as createBrowserRuntimeNow, aA as disciplineFactorFor, aB as filterTagsByVisibility, aC as frozenNow, aD as getMetricVisibility, aE as getRuntimeNowMs, aF as isEffortDiscipline, aG as isFragmentTag, aH as wallClockNow } from './browserRuntimeNow-SxxdmtB7.js';
4
+ import { W as WhiteboardScript, I as IScript, a as IEffortResolver, b as IEffortRegistry, E as EffortResolverOptions, c as IEffort, d as EffortResolutionOptions, R as ResolvedEffort, e as EffortRegistrySource, f as IRuntimeActionable, g as IEventBus, h as IRuntimeStack, i as IRuntimeClock, j as IJitCompiler, k as INowProvider, l as RuntimeStackOptions, m as RuntimeError, A as AnalyticsContext, n as IEvent, o as IRuntimeAction, O as OutputListener, U as Unsubscribe, p as IAnalyticsEngine, q as IRuntimeBlock, r as IBehaviorContext, B as BehaviorEventType, s as BehaviorEventListener, S as SubscribeOptions, t as Unsubscribe$1, u as OutputOptions, M as MemoryTag, v as IMemoryLocation, w as IRuntimeBehavior, x as IBlockContext, y as MetricVisibility, z as BlockLifecycleOptions, C as CompletionDecision, T as TimeSpan, D as IRuntimeMemory, F as TypedMemoryReference, G as MemorySearchCriteria, H as IMemoryReference, J as StackObserver, K as StackSnapshot, L as StackListener, N as MemoryTypeEnum, P as IAnchorValue, Q as IEventHandler, V as HandlerScope, X as IScriptRuntime, Y as TestableBlockConfig, Z as IRuntimeOptions, _ as ScriptRuntime, $ as EventHandlerOptions, a0 as EventCallback, a1 as TimerState, a2 as IRealtimeProcessor, a3 as ISummaryProcessor, a4 as ProjectionResult } from './browserRuntimeNow-DCJ4w4o_.js';
5
+ export { a5 as ButtonConfig, a6 as ButtonVariant, a7 as ButtonsState, a8 as ChildrenStatusState, a9 as CompletionState, aa as DEFAULT_RESOLVER_OPTIONS, ab as DEFAULT_RUNTIME_OPTIONS, ac as DISCIPLINE_FACTORS, ad as DisplayState, ae as EFFORT_DISCIPLINES, af as EFFORT_REGISTRY_ORIGINS, ag as EffortBaseAttributes, ah as EffortDerivation, ai as EffortDiscipline, aj as EffortResolvedFrom, ak as FenceDialect, al as FragmentDisplayState, am as FragmentState, an as IAnalyticsProcessorDescriptor, ao as INTENSITY_TIERS, ap as IntensityTier, aq as InterceptMode, ar as MemoryLocation, as as MemoryType, at as MemoryTypeMap, au as MemoryValueOf, av as RoundState, aw as RuntimeState, ax as ScriptRuntimeDependencies, ay as StackEvent, az as TimerDirection, aA as VISIBILITY_ICONS, aB as VISIBILITY_LABELS, aC as createBrowserRuntimeNow, aD as disciplineFactorFor, aE as filterTagsByVisibility, aF as frozenNow, aG as getMetricVisibility, aH as getRuntimeNowMs, aI as isEffortDiscipline, aJ as isFragmentTag, aK as wallClockNow } from './browserRuntimeNow-DCJ4w4o_.js';
6
6
  import { LanguageSupport, LRLanguage } from '@codemirror/language';
7
7
  import { LRParser } from '@lezer/lr';
8
8
 
@@ -1686,6 +1686,97 @@ declare class NextAction implements IRuntimeAction {
1686
1686
  private validateRuntimeState;
1687
1687
  }
1688
1688
 
1689
+ interface CountupTimerConfig {
1690
+ /** Human-readable label shown in the display layer */
1691
+ label?: string;
1692
+ /** Timer role for display priority */
1693
+ role?: 'primary' | 'secondary' | 'hidden' | 'auto';
1694
+ }
1695
+ /**
1696
+ * CountupTimerBehavior manages the full lifecycle of a count-up timer.
1697
+ *
1698
+ * ## Aspect: Time (Count-up)
1699
+ *
1700
+ * Covers the complete lifecycle for blocks without a fixed duration:
1701
+ * - **mount**: opens an initial TimeSpan to start tracking
1702
+ * - **pause/resume events**: closes/opens spans to exclude paused time
1703
+ * - **unmount**: closes the current span to finalise elapsed time
1704
+ *
1705
+ * There is no tick subscription and no completion signal — the block
1706
+ * advances only when the user (or a parent) calls `next()`.
1707
+ *
1708
+ * Strategies: assign this directly instead of composing TimerInitBehavior
1709
+ * + TimerTickBehavior + TimerPauseBehavior.
1710
+ */
1711
+ declare class CountupTimerBehavior implements IRuntimeBehavior {
1712
+ readonly config: CountupTimerConfig;
1713
+ constructor(config?: CountupTimerConfig);
1714
+ private subscriptions;
1715
+ private isPaused;
1716
+ onMount(ctx: IBehaviorContext): IRuntimeAction[];
1717
+ onNext(_ctx: IBehaviorContext): IRuntimeAction[];
1718
+ onUnmount(ctx: IBehaviorContext): IRuntimeAction[];
1719
+ onDispose(_ctx: IBehaviorContext): void;
1720
+ private createFragment;
1721
+ }
1722
+
1723
+ /**
1724
+ * Controls what happens when the countdown reaches zero.
1725
+ *
1726
+ * - `complete-block`: marks the block complete and clears children.
1727
+ * Use for timers that own the block's lifecycle (AMRAP cap, timed effort).
1728
+ * - `reset-interval`: resets spans and children state for the next round.
1729
+ * Use for repeating-interval timers where the block lives across many rounds (EMOM).
1730
+ */
1731
+ type CountdownMode = 'complete-block' | 'reset-interval';
1732
+ interface CountdownTimerConfig {
1733
+ /** Duration in milliseconds — required for a countdown */
1734
+ durationMs: number;
1735
+ /** Human-readable label shown in the display layer */
1736
+ label?: string;
1737
+ /** Timer role for display priority */
1738
+ role?: 'primary' | 'secondary' | 'hidden' | 'auto';
1739
+ /**
1740
+ * What happens when elapsed >= durationMs.
1741
+ * Defaults to `'complete-block'`.
1742
+ */
1743
+ mode?: CountdownMode;
1744
+ /** Factory to create a rest block for "next" transitions */
1745
+ restBlockFactory?: (durationMs: number, label?: string) => IRuntimeAction[];
1746
+ /**
1747
+ * If true, the user cannot skip this timer. Pressing "Next" emits a
1748
+ * `timer:skip-attempt` event instead of advancing the block.
1749
+ */
1750
+ required?: boolean;
1751
+ }
1752
+ /**
1753
+ * CountdownTimerBehavior manages the full lifecycle of a count-down timer.
1754
+ *
1755
+ * ## Aspect: Time (Count-down)
1756
+ *
1757
+ * Covers the complete lifecycle for blocks with a fixed duration:
1758
+ * - **mount**: opens an initial TimeSpan; checks immediate expiry
1759
+ * - **tick events**: monitors elapsed time and fires `timer:complete` on expiry
1760
+ * - **pause/resume events**: closes/opens spans to exclude paused time
1761
+ * - **unmount**: closes the current span to finalise elapsed time
1762
+ *
1763
+ * Strategies assign this one behavior instead of composing the old quartet
1764
+ * (TimerInitBehavior + TimerTickBehavior + TimerEndingBehavior + TimerPauseBehavior).
1765
+ */
1766
+ declare class CountdownTimerBehavior implements IRuntimeBehavior {
1767
+ readonly config: CountdownTimerConfig;
1768
+ constructor(config: CountdownTimerConfig);
1769
+ private subscriptions;
1770
+ private isPaused;
1771
+ onMount(ctx: IBehaviorContext): IRuntimeAction[];
1772
+ onNext(ctx: IBehaviorContext): IRuntimeAction[];
1773
+ onUnmount(ctx: IBehaviorContext): IRuntimeAction[];
1774
+ onDispose(_ctx: IBehaviorContext): void;
1775
+ private handleExpiry;
1776
+ private getRemainingCountdownMs;
1777
+ private createFragment;
1778
+ }
1779
+
1689
1780
  type ChildSelectionLoopCondition = 'always' | 'timer-active' | 'rounds-remaining';
1690
1781
  interface ChildSelectionConfig {
1691
1782
  /** Groups of statement indices to compile and dispatch */
@@ -1932,6 +2023,34 @@ interface ICastSubscription extends IRuntimeSubscription {
1932
2023
  */
1933
2024
  declare function isCastSubscription(s: IRuntimeSubscription): s is ICastSubscription;
1934
2025
 
2026
+ /**
2027
+ * Provides bidirectional event flow between runtime consumers.
2028
+ *
2029
+ * Implementations determine the transport:
2030
+ * - LocalEventProvider dispatches directly to the local IScriptRuntime
2031
+ * - ChromecastEventProvider sends/receives events over the RPC transport
2032
+ *
2033
+ * This abstracts away whether an event originates locally (button press)
2034
+ * or remotely (Chromecast D-Pad) — the runtime processes both identically.
2035
+ */
2036
+ interface IRuntimeEventProvider {
2037
+ /**
2038
+ * Dispatch an event to be processed by the runtime.
2039
+ * For local: calls runtime.handle(event) directly.
2040
+ * For chromecast: serializes and sends over the RPC channel.
2041
+ */
2042
+ dispatch(event: IEvent): void;
2043
+ /**
2044
+ * Listen for incoming events (from remote sources or the runtime event bus).
2045
+ * Returns an unsubscribe function.
2046
+ */
2047
+ onEvent(handler: (event: IEvent) => void): Unsubscribe;
2048
+ /**
2049
+ * Clean up resources.
2050
+ */
2051
+ dispose(): void;
2052
+ }
2053
+
1935
2054
  /**
1936
2055
  * Action that pushes a compiled block onto the runtime stack.
1937
2056
  * Used by behaviors to add child blocks for execution.
@@ -3319,34 +3438,6 @@ declare class LocalRuntimeSubscription implements IRuntimeSubscription {
3319
3438
  dispose(): void;
3320
3439
  }
3321
3440
 
3322
- /**
3323
- * Provides bidirectional event flow between runtime consumers.
3324
- *
3325
- * Implementations determine the transport:
3326
- * - LocalEventProvider dispatches directly to the local IScriptRuntime
3327
- * - ChromecastEventProvider sends/receives events over the RPC transport
3328
- *
3329
- * This abstracts away whether an event originates locally (button press)
3330
- * or remotely (Chromecast D-Pad) — the runtime processes both identically.
3331
- */
3332
- interface IRuntimeEventProvider {
3333
- /**
3334
- * Dispatch an event to be processed by the runtime.
3335
- * For local: calls runtime.handle(event) directly.
3336
- * For chromecast: serializes and sends over the RPC channel.
3337
- */
3338
- dispatch(event: IEvent): void;
3339
- /**
3340
- * Listen for incoming events (from remote sources or the runtime event bus).
3341
- * Returns an unsubscribe function.
3342
- */
3343
- onEvent(handler: (event: IEvent) => void): Unsubscribe;
3344
- /**
3345
- * Clean up resources.
3346
- */
3347
- dispose(): void;
3348
- }
3349
-
3350
3441
  /**
3351
3442
  * LocalEventProvider — dispatches events directly to the local IScriptRuntime.
3352
3443
  *
@@ -4396,13 +4487,13 @@ declare function toStoredOutputStatement(output: IOutputStatement | OutputStatem
4396
4487
  * Auto-generated build version metadata.
4397
4488
  * Do not edit directly; updated by scripts/stamp-version.ts
4398
4489
  */
4399
- declare const VERSION = "0.2.22";
4400
- declare const GIT_SHA = "ad43a34";
4401
- declare const BUILD_TIME = "2026-08-18T18:49:40.692Z";
4490
+ declare const VERSION = "0.4.24";
4491
+ declare const GIT_SHA = "90d86de";
4492
+ declare const BUILD_TIME = "2026-08-18T20:19:27.340Z";
4402
4493
  declare const SEMVER: {
4403
- readonly version: "0.2.22";
4404
- readonly gitSha: "ad43a34";
4405
- readonly buildTime: "2026-08-18T18:49:40.692Z";
4494
+ readonly version: "0.4.24";
4495
+ readonly gitSha: "90d86de";
4496
+ readonly buildTime: "2026-08-18T20:19:27.340Z";
4406
4497
  };
4407
4498
 
4408
- export { ABSENT, AGGREGATE_BUILTINS, AUTHORITATIVE_CASTS, AbortSessionAction, type ActionDescriptor, type ActionPrimitive, AnalyticsContext, AnalyticsEngine, type AnalyticsProfileContext, type AnalyticsResult, AnalyticsTransformer, BUILD_TIME, BUILTIN_CALCS, BUNDLED_EFFORT_COUNT, BehaviorContext, type BinaryOp, BlockContext, BlockLifecycleOptions, CONSUMED_HINTS, CONSUMED_HINT_KEYS, CONTEXT_ATOMS, type CalcAnalysis, type CalculationDefinition$1 as CalcDefinition, type CalcDiagnostic, CalcEngine, type CalcEngineDeps, CalcEvalError, type CalcLine, type CalcNode, type CalcOrigin, CalcParseError, CalcRegistrationError, type CalcScope, type CalcStack, type CalcStackOptions, type UnitDef as CalcUnitDef, CalcUnitError, type CalcVariant, type CalculationDefinition as CalculateBlockDefinition, type CalculateBlockParseError, type CalculateBlockParseResult, CalculateBlockProcessor, type CalculationDefinition$1 as CalculationDefinition, CalculationRegistry, CardioDialect, ClearChildrenAction, ClimbDialect, type ClimbGradeMetricValue, type ClimbGradeSystem, ClimbMetricType, CompileAndPushBlockAction, type CompiledLineForm, CompletionDecision, type CreateAnalyticsEngineOptions, type CreateAnalyticsEngineResult, CrossFitDialect, DAY, DEFAULT_UNRESOLVED_EFFORT_MET, DIM_COUNT, DIM_ENERGY, DIM_LENGTH, DIM_MASS, DIM_TIME, DIM_ZERO, type DayRollup, DialectStack, type DimVector, type Dimension, type DurationPrimitive, EFFORT_DATA_METRIC_TYPE, EffortBlock, type EffortBlockConfig, type EffortPrimitive, EffortRegistrySource, EffortResolutionOptions, EffortResolver, EffortResolverOptions, EmitEventAction, EmitSystemOutputAction, ErrorAction, type EvalContext, EventBus, type EventHandlerRegistration, ExecutionContext, type ExecutionSnapshot, type ExprNode, type FuzzyCandidate, GIT_SHA, HabitsDialect, type HeadingPrimitive, IAnalyticsEngine, type IAnalyticsProfile, IBlockContext, type ICastSubscription, IEffort, IEffortRegistry, IEffortResolver, IEvent, IEventBus, IEventHandler, IJitCompiler, type ILookupTable, IMemoryLocation, IMemoryReference, type IMetricPresentationPolicy, INowProvider, type IProfileSource, IRealtimeProcessor, IRuntimeAction, IRuntimeBehavior, IRuntimeBlock, type IRuntimeBlockStrategy, IRuntimeClock, type IRuntimeFactory, IRuntimeStack, type IRuntimeSubscription, IScript, IScriptRuntime, ISummaryProcessor, InMemoryEffortRegistry, JitCompiler, type LapPrimitive, type LineFormScope, type LineLocator, LocalEventProvider, LocalRuntimeSubscription, type LogLevel, type LookupFieldDef, type LookupLayer, LookupRegistry, MdTimerRuntime, type MemoryEntry, MemoryTag, MemoryTypeEnum, type MetricObjectPrimitive, type MetricPresentationSurface, type MetricPresentationToken, type MetricRenderKind, type MetricTone, MetricVisibility, type MockClock, NAMED_COMPOUNDS, NextAction, NextEvent, NextEventHandler, OutputEmitter, PREDEFINED_SOUNDS, PRODUCTION_STRATEGIES, type ParseOptions, PlaySoundAction, PopBlockAction, type PredefinedSoundName, ProjectionResult, type PropertyPrimitive, PushBlockAction, PushRestBlockAction, type QuantityPrimitive, REST_EXCLUSION, RPE_LABELS, RegisterEventHandlerAction, Registry, ResolvedEffort, type ResolvedEffortData, RestBlock, type RestBlockConfig, type RoundsPrimitive, RuntimeAdapter, RuntimeBlock, type RuntimeBlockOptions, RuntimeBuilder, type RuntimeButton, RuntimeClock, type RuntimeController, type RuntimeControls, RuntimeError, RuntimeFactory, type RuntimeLogEntry, RuntimeLogger, RuntimeMemory, type RuntimeMemoryLocation, RuntimeObservers, RuntimeStack, SEMVER, STANDARD_UNITS, STORE_CALCS, STREAM_ATOMS, ScriptRuntime, type SegmentWithMetadata, SessionRootBlock, type SessionRootConfig, SnapshotClock, type SoundBehaviorConfig, type SoundCue, type SoundCueState, type SoundState, type SourceInput, type SpanList, StackObserver, StackSnapshot, StandardAnalyticsProfile, StartSessionAction, type StartSessionOptions, StartWorkoutAction, type StartWorkoutOptions, type StaticEnv, type StreamAtomDef, SubscriptionManager, type SyntaxFacts, type SyntaxMeta, type SyntaxPrimitive, type SyntaxStatement, type TextPrimitive, ThrowError, ThrowErrorAction, TimeSpan, TimerState, TwoPassEffortResolutionProcess, TypedMemoryReference, UNITS, type UnitDef$1 as UnitDef, type UnitMatch, UnitRegistry, UnitSet, UnitsDialect, UnregisterEventHandlerAction, Unsubscribe, UpdateNextPreviewAction, VERSION, type Val, WaitingToStartBlock, WhiteboardScript, WodDialect, YogaDialect, addDim, buildStaticLookups, buildTooltip, bundledEfforts, calculateElapsed, checkCalcLine, classifyStatements, closeCurrentSpan, collapseUnresolvedChoices, commonFixtureSet, compileLineForm, composeDivUnit, composeMulUnit, compoundName, computeColumnLabel, computeLabel, computeWorkloadRollups, convertScalar, createAnalyticsEngineForBlock, createCalcEngine, createCalcStack, createCompiler, createDialectStack, createDisciplinesTable, createEffortTable, createLineLocator, createPolicy as createMetricPresentationPolicy, createMockClock, createParser, createProfileTable, createRpeLabelsTable, dailySessionLoads, dayBucket, dialectRegistry, dialectStack, dimEquals, evaluate, evaluateCalculateDefinitions, extractEffortData, extractMetrics, extractStatements, extractStatementsRaw, extractSyntaxFacts, findBestFuzzyMatch, findUnresolvedChoices, fixtureBackSquat, fixtureBurpee, fixturePlank, fixtureRowing, fixtureRunning, fixtureUserCustom, fixtureUserOverride, formatDim, formatDuration, metricsToLabel as fragmentsToLabel, fullFixtureSet, fuseUnits, fuseUnitsInMetrics, getAnalyticsFromLogs, getAnalyticsFromRuntime, getHints, getUnit, hasHint, hintMetric, hintsToContainer, inferDim, isCastSubscription, isChoiceResolved, isDimensionless, isTimeLikeMetric, isWithinThreshold, levenshteinDistance, metricPresentation, mutateTimerSpans, normalizeForFuzzy, num, openSpan, outputNodeId, outputNodeIds, parseCalcLine, parseCalculateBlock, parseExpression, parseScript, printCalculation, readTimer, realtimeProcessorRegistry, resolveDominantOrigin, sharedParser, startSpan, str, strategyRegistry, subDim, summaryProcessorRegistry, toStoredOutputStatement, truthy, validateOutputUnit, parser as whiteboardParser, whiteboardScript, whiteboardScriptLanguage, writeChoiceSelection };
4499
+ export { ABSENT, AGGREGATE_BUILTINS, AUTHORITATIVE_CASTS, AbortSessionAction, type ActionDescriptor, type ActionPrimitive, AnalyticsContext, AnalyticsEngine, type AnalyticsProfileContext, type AnalyticsResult, AnalyticsTransformer, BUILD_TIME, BUILTIN_CALCS, BUNDLED_EFFORT_COUNT, BehaviorContext, BehaviorEventListener, BehaviorEventType, type BinaryOp, BlockBuilder, BlockContext, BlockLifecycleOptions, CONSUMED_HINTS, CONSUMED_HINT_KEYS, CONTEXT_ATOMS, type CalcAnalysis, type CalculationDefinition$1 as CalcDefinition, type CalcDiagnostic, CalcEngine, type CalcEngineDeps, CalcEvalError, type CalcLine, type CalcNode, type CalcOrigin, CalcParseError, CalcRegistrationError, type CalcScope, type CalcStack, type CalcStackOptions, type UnitDef as CalcUnitDef, CalcUnitError, type CalcVariant, type CalculationDefinition as CalculateBlockDefinition, type CalculateBlockParseError, type CalculateBlockParseResult, CalculateBlockProcessor, type CalculationDefinition$1 as CalculationDefinition, CalculationRegistry, CardioDialect, ChoiceGroupMetric, ClearChildrenAction, ClimbDialect, type ClimbGradeMetricValue, type ClimbGradeSystem, ClimbMetricType, CompileAndPushBlockAction, type CompiledLineForm, CompletionDecision, CountdownTimerBehavior, CountupTimerBehavior, type CreateAnalyticsEngineOptions, type CreateAnalyticsEngineResult, CrossFitDialect, DAY, DEFAULT_UNRESOLVED_EFFORT_MET, DIM_COUNT, DIM_ENERGY, DIM_LENGTH, DIM_MASS, DIM_TIME, DIM_ZERO, type DayRollup, DialectStack, type DimVector, type Dimension, type DurationPrimitive, EFFORT_DATA_METRIC_TYPE, EffortBlock, type EffortBlockConfig, type EffortPrimitive, EffortRegistrySource, EffortResolutionOptions, EffortResolver, EffortResolverOptions, EmitEventAction, EmitSystemOutputAction, ErrorAction, type EvalContext, EventBus, EventCallback, EventHandlerOptions, type EventHandlerRegistration, ExecutionContext, type ExecutionSnapshot, type ExecutionStatus, type ExprNode, type FuzzyCandidate, GIT_SHA, HabitsDialect, type HeadingPrimitive, IAnalyticsEngine, type IAnalyticsProfile, IAnchorValue, IBehaviorContext, IBlockContext, type ICastSubscription, IEffort, IEffortRegistry, IEffortResolver, IEvent, IEventBus, IEventHandler, IJitCompiler, type ILookupTable, IMemoryLocation, IMemoryReference, type IMetricPresentationPolicy, INowProvider, type IProfileSource, IRealtimeProcessor, IRuntimeAction, IRuntimeActionable, IRuntimeBehavior, IRuntimeBlock, type IRuntimeBlockStrategy, IRuntimeClock, type IRuntimeEventProvider, type IRuntimeFactory, IRuntimeMemory, IRuntimeStack, type IRuntimeSubscription, IScript, IScriptRuntime, ISummaryProcessor, InMemoryEffortRegistry, JitCompiler, type LapPrimitive, type LineFormScope, type LineLocator, LocalEventProvider, LocalRuntimeSubscription, type LogLevel, type LookupFieldDef, type LookupLayer, LookupRegistry, MdTimerRuntime, type MemoryEntry, MemoryTag, MemoryTypeEnum, type MetricObjectPrimitive, type MetricPresentationSurface, type MetricPresentationToken, type MetricRenderKind, type MetricTone, MetricVisibility, type MockClock, NAMED_COMPOUNDS, NextAction, NextEvent, NextEventHandler, OutputEmitter, OutputListener, PREDEFINED_SOUNDS, PRODUCTION_STRATEGIES, type ParseOptions, PlaySoundAction, PopBlockAction, type PredefinedSoundName, ProjectionResult, type PropertyPrimitive, PushBlockAction, PushRestBlockAction, type QuantityPrimitive, REST_EXCLUSION, RPE_LABELS, RegisterEventHandlerAction, Registry, ResolvedEffort, type ResolvedEffortData, RestBlock, type RestBlockConfig, type RoundsPrimitive, RuntimeAdapter, RuntimeBlock, type RuntimeBlockOptions, RuntimeBuilder, type RuntimeButton, RuntimeClock, type RuntimeController, type RuntimeControls, RuntimeError, RuntimeFactory, type RuntimeLogEntry, RuntimeLogger, RuntimeMemory, type RuntimeMemoryLocation, RuntimeObservers, RuntimeStack, RuntimeStackOptions, SEMVER, STANDARD_UNITS, STORE_CALCS, STREAM_ATOMS, ScriptRuntime, type SegmentWithMetadata, SessionRootBlock, type SessionRootConfig, SnapshotClock, type SoundBehaviorConfig, type SoundCue, type SoundCueState, type SoundState, type SourceInput, type SpanList, StackListener, StackObserver, StackSnapshot, StandardAnalyticsProfile, StartSessionAction, type StartSessionOptions, StartWorkoutAction, type StartWorkoutOptions, type StaticEnv, type StreamAtomDef, SubscribeOptions, SubscriptionManager, type SyntaxFacts, type SyntaxMeta, type SyntaxPrimitive, type SyntaxStatement, TestableBlockConfig, type TextPrimitive, ThrowError, ThrowErrorAction, TimeSpan, TimerState, TwoPassEffortResolutionProcess, TypedMemoryReference, UNITS, type UnitDef$1 as UnitDef, type UnitMatch, UnitRegistry, UnitSet, UnitsDialect, UnregisterEventHandlerAction, Unsubscribe, UpdateNextPreviewAction, VERSION, type Val, WaitingToStartBlock, WhiteboardScript, WodDialect, YogaDialect, addDim, buildStaticLookups, buildTooltip, bundledEfforts, calculateElapsed, checkCalcLine, classifyStatements, closeCurrentSpan, collapseUnresolvedChoices, commonFixtureSet, compileLineForm, composeDivUnit, composeMulUnit, compoundName, computeColumnLabel, computeLabel, computeWorkloadRollups, convertScalar, createAnalyticsEngineForBlock, createCalcEngine, createCalcStack, createCompiler, createDialectStack, createDisciplinesTable, createEffortTable, createLineLocator, createPolicy as createMetricPresentationPolicy, createMockClock, createParser, createProfileTable, createRpeLabelsTable, dailySessionLoads, dayBucket, dialectRegistry, dialectStack, dimEquals, evaluate, evaluateCalculateDefinitions, extractEffortData, extractMetrics, extractStatements, extractStatementsRaw, extractSyntaxFacts, findBestFuzzyMatch, findUnresolvedChoices, fixtureBackSquat, fixtureBurpee, fixturePlank, fixtureRowing, fixtureRunning, fixtureUserCustom, fixtureUserOverride, formatDim, formatDuration, metricsToLabel as fragmentsToLabel, fullFixtureSet, fuseUnits, fuseUnitsInMetrics, getAnalyticsFromLogs, getAnalyticsFromRuntime, getHints, getUnit, hasHint, hintMetric, hintsToContainer, inferDim, isCastSubscription, isChoiceResolved, isDimensionless, isTimeLikeMetric, isWithinThreshold, levenshteinDistance, metricPresentation, mutateTimerSpans, normalizeForFuzzy, num, openSpan, outputNodeId, outputNodeIds, parseCalcLine, parseCalculateBlock, parseExpression, parseScript, printCalculation, readTimer, realtimeProcessorRegistry, resolveDominantOrigin, sharedParser, startSpan, str, strategyRegistry, subDim, summaryProcessorRegistry, toStoredOutputStatement, truthy, validateOutputUnit, parser as whiteboardParser, whiteboardScript, whiteboardScriptLanguage, writeChoiceSelection };
package/dist/index.mjs CHANGED
@@ -13142,15 +13142,15 @@ function toStoredOutputStatement(output) {
13142
13142
  }
13143
13143
 
13144
13144
  // src/version.ts
13145
- var VERSION = "0.2.22";
13146
- var GIT_SHA = "ad43a34";
13147
- var BUILD_TIME = "2026-08-18T18:49:40.692Z";
13145
+ var VERSION = "0.4.24";
13146
+ var GIT_SHA = "90d86de";
13147
+ var BUILD_TIME = "2026-08-18T20:19:27.340Z";
13148
13148
  var SEMVER = {
13149
- version: "0.2.22",
13150
- gitSha: "ad43a34",
13151
- buildTime: "2026-08-18T18:49:40.692Z"
13149
+ version: "0.4.24",
13150
+ gitSha: "90d86de",
13151
+ buildTime: "2026-08-18T20:19:27.340Z"
13152
13152
  };
13153
13153
 
13154
- export { ABSENT, AGGREGATE_BUILTINS, AUTHORITATIVE_CASTS, AbortSessionAction, AnalyticsEngine, AnalyticsTransformer, BUILD_TIME, BUILTIN_CALCS, BUNDLED_EFFORT_COUNT, BehaviorContext, BlockContext, CONSUMED_HINTS, CONSUMED_HINT_KEYS, CONTEXT_ATOMS, CalcEngine, CalcEvalError, CalcParseError, CalcRegistrationError, CalcUnitError, CalculateBlockProcessor, CalculationRegistry, CardioDialect, ClearChildrenAction, ClimbDialect, ClimbMetricType, CompileAndPushBlockAction, CrossFitDialect, DAY, DEFAULT_RESOLVER_OPTIONS, DEFAULT_UNRESOLVED_EFFORT_MET, DIM_COUNT, DIM_ENERGY, DIM_LENGTH, DIM_MASS, DIM_TIME, DIM_ZERO, DISCIPLINE_FACTORS, DialectStack, EFFORT_DATA_METRIC_TYPE, EFFORT_DISCIPLINES, EFFORT_REGISTRY_ORIGINS, EffortBlock, EffortResolver, EmitEventAction, EmitSystemOutputAction, ErrorAction, EventBus, ExecutionContext, GIT_SHA, HabitsDialect, INTENSITY_TIERS, InMemoryEffortRegistry, JitCompiler, LocalEventProvider, LocalRuntimeSubscription, LookupRegistry, MdTimerRuntime, MemoryLocation, MemoryTypeEnum, NAMED_COMPOUNDS, NextAction, NextEvent, NextEventHandler, OutputEmitter, PREDEFINED_SOUNDS, PRODUCTION_STRATEGIES, PlaySoundAction, PopBlockAction, PushBlockAction, PushRestBlockAction, REST_EXCLUSION, RPE_LABELS, RegisterEventHandlerAction, Registry, RestBlock, RuntimeAdapter, RuntimeBlock, RuntimeBuilder, RuntimeClock, RuntimeFactory, RuntimeLogger, RuntimeMemory, RuntimeObservers, RuntimeStack, SEMVER, STANDARD_UNITS, STORE_CALCS, STREAM_ATOMS, ScriptRuntime, SessionRootBlock, SnapshotClock, StandardAnalyticsProfile, StartSessionAction, StartWorkoutAction, SubscriptionManager, ThrowError, ThrowErrorAction, TimeSpan, TwoPassEffortResolutionProcess, TypedMemoryReference, UNITS, UnitRegistry, UnitSet, UnitsDialect, UnregisterEventHandlerAction, UpdateNextPreviewAction, VERSION, VISIBILITY_ICONS, VISIBILITY_LABELS, WaitingToStartBlock, WhiteboardScript, WodDialect, YogaDialect, addDim, buildStaticLookups, buildTooltip, bundledEfforts, calculateElapsed, checkCalcLine, classifyStatements, closeCurrentSpan, collapseUnresolvedChoices, commonFixtureSet, compileLineForm, composeDivUnit, composeMulUnit, compoundName, computeColumnLabel, computeLabel, computeWorkloadRollups, convertScalar, createAnalyticsEngineForBlock, createCalcEngine, createCalcStack, createCompiler, createDialectStack, createDisciplinesTable, createEffortTable, createLineLocator, createPolicy as createMetricPresentationPolicy, createMockClock, createParser, createProfileTable, createRpeLabelsTable, dailySessionLoads, dayBucket, dialectRegistry, dialectStack, dimEquals, disciplineFactorFor, evaluate, evaluateCalculateDefinitions, extractEffortData, extractMetrics, extractStatements, extractStatementsRaw, extractSyntaxFacts, filterTagsByVisibility, findBestFuzzyMatch, findUnresolvedChoices, fixtureBackSquat, fixtureBurpee, fixturePlank, fixtureRowing, fixtureRunning, fixtureUserCustom, fixtureUserOverride, formatDim, formatDuration, metricsToLabel as fragmentsToLabel, fullFixtureSet, fuseUnits, fuseUnitsInMetrics, getAnalyticsFromLogs, getAnalyticsFromRuntime, getHints, getMetricVisibility, getUnit, hasHint, hintMetric, hintsToContainer, inferDim, isCastSubscription, isChoiceResolved, isDimensionless, isEffortDiscipline, isFragmentTag, isTimeLikeMetric, isWithinThreshold, levenshteinDistance, metricPresentation, mutateTimerSpans, normalizeForFuzzy, num, openSpan, outputNodeId, outputNodeIds, parseCalcLine, parseCalculateBlock, parseExpression, parseScript, printCalculation, readTimer, realtimeProcessorRegistry, resolveDominantOrigin, sharedParser, startSpan, str, strategyRegistry, subDim, summaryProcessorRegistry, toStoredOutputStatement, truthy, validateOutputUnit, parser as whiteboardParser, whiteboardScript, whiteboardScriptLanguage, writeChoiceSelection };
13154
+ export { ABSENT, AGGREGATE_BUILTINS, AUTHORITATIVE_CASTS, AbortSessionAction, AnalyticsEngine, AnalyticsTransformer, BUILD_TIME, BUILTIN_CALCS, BUNDLED_EFFORT_COUNT, BehaviorContext, BlockBuilder, BlockContext, CONSUMED_HINTS, CONSUMED_HINT_KEYS, CONTEXT_ATOMS, CalcEngine, CalcEvalError, CalcParseError, CalcRegistrationError, CalcUnitError, CalculateBlockProcessor, CalculationRegistry, CardioDialect, ChoiceGroupMetric, ClearChildrenAction, ClimbDialect, ClimbMetricType, CompileAndPushBlockAction, CountdownTimerBehavior, CountupTimerBehavior, CrossFitDialect, DAY, DEFAULT_RESOLVER_OPTIONS, DEFAULT_RUNTIME_OPTIONS, DEFAULT_UNRESOLVED_EFFORT_MET, DIM_COUNT, DIM_ENERGY, DIM_LENGTH, DIM_MASS, DIM_TIME, DIM_ZERO, DISCIPLINE_FACTORS, DialectStack, EFFORT_DATA_METRIC_TYPE, EFFORT_DISCIPLINES, EFFORT_REGISTRY_ORIGINS, EffortBlock, EffortResolver, EmitEventAction, EmitSystemOutputAction, ErrorAction, EventBus, ExecutionContext, GIT_SHA, HabitsDialect, INTENSITY_TIERS, InMemoryEffortRegistry, JitCompiler, LocalEventProvider, LocalRuntimeSubscription, LookupRegistry, MdTimerRuntime, MemoryLocation, MemoryTypeEnum, NAMED_COMPOUNDS, NextAction, NextEvent, NextEventHandler, OutputEmitter, PREDEFINED_SOUNDS, PRODUCTION_STRATEGIES, PlaySoundAction, PopBlockAction, PushBlockAction, PushRestBlockAction, REST_EXCLUSION, RPE_LABELS, RegisterEventHandlerAction, Registry, RestBlock, RuntimeAdapter, RuntimeBlock, RuntimeBuilder, RuntimeClock, RuntimeFactory, RuntimeLogger, RuntimeMemory, RuntimeObservers, RuntimeStack, SEMVER, STANDARD_UNITS, STORE_CALCS, STREAM_ATOMS, ScriptRuntime, SessionRootBlock, SnapshotClock, StandardAnalyticsProfile, StartSessionAction, StartWorkoutAction, SubscriptionManager, ThrowError, ThrowErrorAction, TimeSpan, TwoPassEffortResolutionProcess, TypedMemoryReference, UNITS, UnitRegistry, UnitSet, UnitsDialect, UnregisterEventHandlerAction, UpdateNextPreviewAction, VERSION, VISIBILITY_ICONS, VISIBILITY_LABELS, WaitingToStartBlock, WhiteboardScript, WodDialect, YogaDialect, addDim, buildStaticLookups, buildTooltip, bundledEfforts, calculateElapsed, checkCalcLine, classifyStatements, closeCurrentSpan, collapseUnresolvedChoices, commonFixtureSet, compileLineForm, composeDivUnit, composeMulUnit, compoundName, computeColumnLabel, computeLabel, computeWorkloadRollups, convertScalar, createAnalyticsEngineForBlock, createCalcEngine, createCalcStack, createCompiler, createDialectStack, createDisciplinesTable, createEffortTable, createLineLocator, createPolicy as createMetricPresentationPolicy, createMockClock, createParser, createProfileTable, createRpeLabelsTable, dailySessionLoads, dayBucket, dialectRegistry, dialectStack, dimEquals, disciplineFactorFor, evaluate, evaluateCalculateDefinitions, extractEffortData, extractMetrics, extractStatements, extractStatementsRaw, extractSyntaxFacts, filterTagsByVisibility, findBestFuzzyMatch, findUnresolvedChoices, fixtureBackSquat, fixtureBurpee, fixturePlank, fixtureRowing, fixtureRunning, fixtureUserCustom, fixtureUserOverride, formatDim, formatDuration, metricsToLabel as fragmentsToLabel, fullFixtureSet, fuseUnits, fuseUnitsInMetrics, getAnalyticsFromLogs, getAnalyticsFromRuntime, getHints, getMetricVisibility, getUnit, hasHint, hintMetric, hintsToContainer, inferDim, isCastSubscription, isChoiceResolved, isDimensionless, isEffortDiscipline, isFragmentTag, isTimeLikeMetric, isWithinThreshold, levenshteinDistance, metricPresentation, mutateTimerSpans, normalizeForFuzzy, num, openSpan, outputNodeId, outputNodeIds, parseCalcLine, parseCalculateBlock, parseExpression, parseScript, printCalculation, readTimer, realtimeProcessorRegistry, resolveDominantOrigin, sharedParser, startSpan, str, strategyRegistry, subDim, summaryProcessorRegistry, toStoredOutputStatement, truthy, validateOutputUnit, parser as whiteboardParser, whiteboardScript, whiteboardScriptLanguage, writeChoiceSelection };
13155
13155
  //# sourceMappingURL=index.mjs.map
13156
13156
  //# sourceMappingURL=index.mjs.map