@bitcobblers/wod-wiki-lang 0.50.2188 → 0.50.2190

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,7 +1,7 @@
1
- import { IMetric, MetricContainer, MetricOrigin, MetricType, IDialect, ICodeStatement, DialectAnalysis, TagIndex, ParsedCodeStatement, TagMetricContribution, IOutputStatement, OutputStatementType, BlockKey, TagReferenceMetadata, ScriptBlock, FenceDialect, Segment, AnalyticsGroup, StoredOutputStatement, OutputStatement } from '@bitcobblers/wod-wiki-core';
1
+ import { IMetric, MetricContainer, MetricOrigin, MetricType, IDialect, ICodeStatement, DialectAnalysis, TagIndex, ParsedCodeStatement, TagTypeRecord, Tag, TagMetricContribution, IOutputStatement, OutputStatementType, BlockKey, TagReferenceMetadata, ScriptBlock, FenceDialect, Segment, AnalyticsGroup, StoredOutputStatement, OutputStatement } from '@bitcobblers/wod-wiki-core';
2
2
  export { ParseError } from '@bitcobblers/wod-wiki-core';
3
- import { R as ReferenceIndex, a as ReferenceResolutionDefaults, W as WhiteboardScript, I as IEquipment, b as IEffort, c as IEffortResolver, d as IEffortRegistry, E as EffortResolverOptions, e as EffortResolutionOptions, f as ResolvedEffort, g as EffortRegistrySource, h as IEquipmentRegistry, i as EquipmentStorageAdapter, j as EffortStorageAdapter, k as IRuntimeActionable, l as IEventBus, m as IRuntimeStack, n as IRuntimeClock, o as IJitCompiler, p as INowProvider, q as RuntimeStackOptions, r as RuntimeError, A as AnalyticsContext, s as IEvent, t as IRuntimeAction, O as OutputListener, U as Unsubscribe, u as IAnalyticsEngine, v as IRuntimeBlock, w as IBehaviorContext, B as BehaviorEventType, x as BehaviorEventListener, S as SubscribeOptions, y as Unsubscribe$1, z as OutputOptions, M as MemoryTag, C as IMemoryLocation, D as IRuntimeBehavior, F as IBlockContext, G as MetricVisibility, H as BlockLifecycleOptions, J as CompletionDecision, T as TimeSpan, K as IRuntimeMemory, L as TypedMemoryReference, N as MemorySearchCriteria, P as IMemoryReference, Q as RuntimeStackLogger, V as StackObserver, X as StackSnapshot, Y as StackListener, Z as MemoryTypeEnum, _ as IAnchorValue, $ as SoundProfile, a0 as ButtonConfig, a1 as IEventHandler, a2 as HandlerScope, a3 as IScriptRuntime, a4 as TestableBlockConfig, a5 as IRuntimeOptions, a6 as ScriptRuntime, a7 as EventHandlerOptions, a8 as EventCallback, a9 as TimerState, aa as CalculationDefinition, ab as PropertyRuleInput, ac as IRealtimeProcessor, ad as ISummaryProcessor, ae as DimVector, af as CalcLine, ag as ExprNode, ah as CalcScope, ai as ILookupTable, aj as LookupRegistry, ak as CalcRegistrationDiagnostic, al as ProjectionResult } from './browserRuntimeNow-DUJFkpUq.cjs';
4
- export { am as ABSENT, an as BinaryOp, ao as ButtonVariant, ap as ButtonsState, aq as CalcEvalError, ar as CalcNode, as as CalcOrigin, at as CalcVariant, au as ChildrenStatusState, av as CompiledPropertySummaries, aw as CompletionState, ax as DEFAULT_RESOLVER_OPTIONS, ay as DEFAULT_RUNTIME_OPTIONS, az as DEFAULT_SOUND_PROFILE, aA as DIM_COUNT, aB as DIM_ENERGY, aC as DIM_LENGTH, aD as DIM_MASS, aE as DIM_TIME, aF as DIM_ZERO, aG as DISCIPLINE_FACTORS, aH as DisplayState, aI as EFFORT_DISCIPLINES, aJ as EFFORT_REGISTRY_ORIGINS, aK as EffortBaseAttributes, aL as EffortDerivation, aM as EffortDiscipline, aN as EffortMaterializer, aO as EffortResolvedFrom, aP as EvalContext, aQ as FenceDialect, aR as FragmentDisplayState, aS as FragmentState, aT as IAnalyticsProcessorDescriptor, aU as INTENSITY_TIERS, aV as IScript, aW as IntensityTier, aX as InterceptMode, aY as LookupFieldDef, aZ as LookupLayer, a_ as MemoryLocation, a$ as MemoryType, b0 as MemoryTypeMap, b1 as MemoryValueOf, b2 as NAMED_COMPOUNDS, b3 as PropertySourceLayer, b4 as ReferenceCatalog, b5 as ResolvedReferences, b6 as RoundState, b7 as RuntimeState, b8 as SEED_PRECEDENCE_RANK, b9 as ScriptRuntimeDependencies, ba as SeedPrecedenceTier, bb as ShakeOutQueueOptions, bc as ShakeOutResult, bd as SkippedDependencyDiagnostic, be as SoundRule, bf as SoundTriggerAnchor, bg as SoundTriggerPoint, bh as StackEvent, bi as TimerDirection, bj as VISIBILITY_ICONS, bk as VISIBILITY_LABELS, bl as Val, bm as addDim, bn as compilePropertySummaryCalcs, bo as compilePropertySummaryCalcsWithDiagnostics, bp as compoundName, bq as createBrowserRuntimeNow, br as createReferenceIndex, bs as dedupeEntitiesByPrecedence, bt as dimEquals, bu as disciplineFactorFor, bv as evaluate, bw as extractPropertyRulesFromMeta, bx as extractStatementRefs, by as extractTagPropertyRules, bz as filterTagsByVisibility, bA as formatDim, bB as formatSoundTrigger, bC as frozenNow, bD as getMetricVisibility, bE as getRuntimeNowMs, bF as isDimensionless, bG as isEffortDiscipline, bH as isFragmentTag, bI as num, bJ as parseSoundTrigger, bK as resolveEntityRank, bL as resolveEntityTier, bM as resolveProfileRules, bN as resolveSourceRank, bO as resolveSourceTier, bP as runMetricShakeOutQueue, bQ as slugifyRefLabel, bR as str, bS as subDim, bT as truthy, bU as wallClockNow } from './browserRuntimeNow-DUJFkpUq.cjs';
3
+ import { R as ReferenceIndex, a as ReferenceResolutionDefaults, W as WhiteboardScript, I as IEquipment, b as IEffort, c as IEffortResolver, d as IEffortRegistry, E as EffortResolverOptions, e as EffortResolutionOptions, f as ResolvedEffort, g as EffortRegistrySource, h as IEquipmentRegistry, i as EquipmentStorageAdapter, j as EffortStorageAdapter, k as IRuntimeActionable, l as IEventBus, m as IRuntimeStack, n as IRuntimeClock, o as IJitCompiler, p as INowProvider, q as RuntimeStackOptions, r as RuntimeError, A as AnalyticsContext, s as IEvent, t as IRuntimeAction, O as OutputListener, U as Unsubscribe, u as IAnalyticsEngine, v as IRuntimeBlock, w as IBehaviorContext, B as BehaviorEventType, x as BehaviorEventListener, S as SubscribeOptions, y as Unsubscribe$1, z as OutputOptions, M as MemoryTag, C as IMemoryLocation, D as IRuntimeBehavior, F as IBlockContext, G as MetricVisibility, H as BlockLifecycleOptions, J as CompletionDecision, T as TimeSpan, K as IRuntimeMemory, L as TypedMemoryReference, N as MemorySearchCriteria, P as IMemoryReference, Q as RuntimeStackLogger, V as StackObserver, X as StackSnapshot, Y as StackListener, Z as MemoryTypeEnum, _ as IAnchorValue, $ as SoundProfile, a0 as ButtonConfig, a1 as IEventHandler, a2 as HandlerScope, a3 as IScriptRuntime, a4 as TestableBlockConfig, a5 as IRuntimeOptions, a6 as ScriptRuntime, a7 as EventHandlerOptions, a8 as EventCallback, a9 as TimerState, aa as CalculationDefinition, ab as PropertyRuleInput, ac as IRealtimeProcessor, ad as ISummaryProcessor, ae as DimVector, af as CalcLine, ag as ExprNode, ah as CalcScope, ai as ILookupTable, aj as LookupRegistry, ak as CalcRegistrationDiagnostic, al as ProjectionResult } from './browserRuntimeNow-JnK2JvJg.cjs';
4
+ export { am as ABSENT, an as BinaryOp, ao as ButtonVariant, ap as ButtonsState, aq as CalcEvalError, ar as CalcNode, as as CalcOrigin, at as CalcVariant, au as ChildrenStatusState, av as CompiledPropertySummaries, aw as CompletionState, ax as DEFAULT_RESOLVER_OPTIONS, ay as DEFAULT_RUNTIME_OPTIONS, az as DEFAULT_SOUND_PROFILE, aA as DIM_COUNT, aB as DIM_ENERGY, aC as DIM_LENGTH, aD as DIM_MASS, aE as DIM_TIME, aF as DIM_ZERO, aG as DISCIPLINE_FACTORS, aH as DisplayState, aI as EFFORT_DISCIPLINES, aJ as EFFORT_REGISTRY_ORIGINS, aK as EffortBaseAttributes, aL as EffortDerivation, aM as EffortDiscipline, aN as EffortMaterializer, aO as EffortResolvedFrom, aP as EvalContext, aQ as FenceDialect, aR as FragmentDisplayState, aS as FragmentState, aT as IAnalyticsProcessorDescriptor, aU as INTENSITY_TIERS, aV as IScript, aW as IntensityTier, aX as InterceptMode, aY as LookupFieldDef, aZ as LookupLayer, a_ as MemoryLocation, a$ as MemoryType, b0 as MemoryTypeMap, b1 as MemoryValueOf, b2 as NAMED_COMPOUNDS, b3 as PropertySourceLayer, b4 as ReferenceCatalog, b5 as ResolvedReferences, b6 as RoundState, b7 as RuntimeState, b8 as SEED_PRECEDENCE_RANK, b9 as ScriptRuntimeDependencies, ba as SeedPrecedenceTier, bb as ShakeOutQueueOptions, bc as ShakeOutResult, bd as SkippedDependencyDiagnostic, be as SoundRule, bf as SoundTriggerAnchor, bg as SoundTriggerPoint, bh as StackEvent, bi as StackedDashboardWidgetDescriptor, bj as TimerDirection, bk as VISIBILITY_ICONS, bl as VISIBILITY_LABELS, bm as Val, bn as addDim, bo as compilePropertySummaryCalcs, bp as compilePropertySummaryCalcsWithDiagnostics, bq as compoundName, br as createBrowserRuntimeNow, bs as createReferenceIndex, bt as dedupeEntitiesByPrecedence, bu as dimEquals, bv as disciplineFactorFor, bw as evaluate, bx as extractPropertyRulesFromMeta, by as extractStatementRefs, bz as extractTagPropertyRules, bA as filterTagsByVisibility, bB as formatDim, bC as formatSoundTrigger, bD as frozenNow, bE as getMetricVisibility, bF as getRuntimeNowMs, bG as isDimensionless, bH as isEffortDiscipline, bI as isFragmentTag, bJ as num, bK as parseSoundTrigger, bL as resolveEntityRank, bM as resolveEntityTier, bN as resolveProfileRules, bO as resolvePropertyDashboardWidgets, bP as resolveSourceRank, bQ as resolveSourceTier, bR as runMetricShakeOutQueue, bS as slugifyRefLabel, bT as str, bU as subDim, bV as truthy, bW as wallClockNow } from './browserRuntimeNow-JnK2JvJg.cjs';
5
5
  import { Tree } from '@lezer/common';
6
6
  import { LanguageSupport, LRLanguage } from '@codemirror/language';
7
7
  import { CompletionSource, Completion } from '@codemirror/autocomplete';
@@ -980,6 +980,7 @@ interface TagPropertyDocument {
980
980
  aliases: string[];
981
981
  metrics: Record<string, string | number | readonly string[]>;
982
982
  summaries: Record<string, string>;
983
+ widgets?: Record<string, string>;
983
984
  tags: string[];
984
985
  functions: string[];
985
986
  body?: string;
@@ -997,9 +998,19 @@ interface TagCategoryPropertyDocument {
997
998
  color?: string;
998
999
  metrics?: Record<string, string | number>;
999
1000
  summaries?: Record<string, string>;
1001
+ widgets?: Record<string, string>;
1000
1002
  body?: string;
1001
1003
  }
1002
1004
  declare function tagCategoryToDocument(category: TagCategoryPropertyDocument): string;
1005
+ /**
1006
+ * Synthesize a Property Note document directly from a stored Tag record,
1007
+ * unpacking its `contributions` into `metrics.*`, `summaries.*`, `tags`, and `functions`.
1008
+ */
1009
+ declare function tagRecordToDocument(tag: Tag, categoryFallback?: string): string;
1010
+ /**
1011
+ * Synthesize a Tag Category Property Note document from a TagTypeRecord.
1012
+ */
1013
+ declare function tagCategoryRecordToDocument(category: string, record?: TagTypeRecord): string;
1003
1014
 
1004
1015
  /**
1005
1016
  * Effort Resolver — Analytics Boundary
@@ -5385,4 +5396,4 @@ declare function diffStatement(expected: MetricLine[], actual: readonly IMetric[
5385
5396
  */
5386
5397
  declare function compareStatement(expectations: MetricLine[], actual: readonly IMetric[], mode: MatchMode): string[];
5387
5398
 
5388
- export { AGGREGATE_BUILTINS, AUTHORITATIVE_CASTS, AbortSessionAction, type ActionDescriptor, type ActionPrimitive, AmrapLogicStrategy, AnalyticsContext, AnalyticsEngine, type AnalyticsProfileContext, type AnalyticsResult, AnalyticsTransformer, BUILTIN_CALCS, BUNDLED_EFFORT_COUNT, BehaviorContext, BehaviorEventListener, BehaviorEventType, BlockBuilder, BlockContext, BlockLifecycleOptions, ButtonBehavior, ButtonConfig, COMPLETION_PROPERTY_KEYS, CONSUMED_HINTS, CONSUMED_HINT_KEYS, CONTEXT_ATOMS, type CalcAnalysis, CalculationDefinition as CalcDefinition, type CalcDiagnostic, CalcEngine, type CalcEngineDeps, CalcLine, CalcParseError, CalcRegistrationError, CalcScope, type CalcStack, type CalcStackOptions, type UnitDef as CalcUnitDef, CalcUnitError, CalculationDefinition, CalculationRegistry, CardioDialect, ChildSelectionBehavior, type ChildSelectionConfig, type ChildSelectionLoopCondition, ChildrenStrategy, ChoiceGroupMetric, ClearChildrenAction, ClimbDialect, type ClimbGradeMetricValue, type ClimbGradeSystem, ClimbMetricType, CompileAndPushBlockAction, type CompiledLineForm, CompletionDecision, CompletionTimestampBehavior, type CompletionValueOption, type CompletionValueSource, CompositeEffortRegistry, type CompositeEffortRegistryOptions, CompositeEquipmentRegistry, CompositePropertyRegistry, type ControlsConfig, type CountdownMode, CountdownTimerBehavior, type CountdownTimerConfig, CountupTimerBehavior, type CountupTimerConfig, type CreateAnalyticsEngineOptions, type CreateAnalyticsEngineResult, CrossFitDialect, DAY, DEFAULT_UNRESOLVED_EFFORT_MET, type DayRollup, DialectStack, DimVector, type Dimension, type DurationPrimitive, EFFORT_DATA_METRIC_TYPE, EffortBlock, type EffortBlockConfig, EffortFallbackStrategy, type EffortPrimitive, EffortRegistrySource, EffortResolutionOptions, EffortResolver, EffortResolverOptions, EffortStorageAdapter, EmitEventAction, EmitSystemOutputAction, type EquipmentParseResult, EquipmentStorageAdapter, ErrorAction, EventBus, EventCallback, EventHandlerOptions, type EventHandlerRegistration, ExecutionContext, type ExecutionSnapshot, type ExecutionStatus, ExitBehavior, type ExitConfig, ExprNode, FixtureSyntaxError, type FuzzyCandidate, GenericGroupStrategy, GenericLoopStrategy, GenericTimerStrategy, HabitsDialect, type HeadingPrimitive, IAnalyticsEngine, type IAnalyticsProfile, IAnchorValue, IBehaviorContext, IBlockContext, type ICastSubscription, IEffort, IEffortRegistry, IEffortResolver, IEquipment, IEquipmentRegistry, IEvent, IEventBus, IEventHandler, IJitCompiler, ILookupTable, IMemoryLocation, IMemoryReference, type IMetricPresentationPolicy, INowProvider, type IProfileSource, IRealtimeProcessor, IRuntimeAction, IRuntimeActionable, IRuntimeBehavior, IRuntimeBlock, type IRuntimeBlockStrategy, IRuntimeClock, type IRuntimeEventProvider, type IRuntimeFactory, IRuntimeMemory, IRuntimeStack, type IRuntimeSubscription, IScriptRuntime, ISummaryProcessor, InMemoryEffortRegistry, IntervalLogicStrategy, JitCompiler, LabelingBehavior, type LabelingConfig, type LapPrimitive, type LineFormScope, type LineLocator, type LiteralKind, LocalEventProvider, LocalRuntimeSubscription, type LogLevel, type LoggableOutput, LookupRegistry, MAX_TAG_CONTRIBUTION_DEPTH, type MatchMode, MdTimerRuntime, type MemoryEntry, MemoryTag, MemoryTypeEnum, type MetricLine, type MetricObjectPrimitive, type MetricPresentationSurface, type MetricPresentationToken, MetricPromotionBehavior, type MetricPromotionConfig, type MetricRenderKind, type MetricTone, MetricVisibility, type MockClock, NextAction, NextEvent, NextEventHandler, OutputEmitter, OutputListener, PRODUCTION_STRATEGIES, PROPERTY_KEY_TO_METRIC_TYPE, type ParseOptions, type ParseReferences, type ParseResult, type ParserConfig, PopBlockAction, ProjectionResult, type PromotionRule, type PropertyEntity, type PropertyPrimitive, PropertyRuleInput, type PropertyStorageAdapter, PushBlockAction, PushRestBlockAction, type QuantityPrimitive, REFERENCE_PAIR_KEYS, REST_EXCLUSION, RPE_LABELS, RUNTIME_LOG_SUBJECT_WIDTH, ReferenceIndex, ReferenceResolutionDefaults, RegisterEventHandlerAction, Registry, ReportOutputBehavior, type ReportOutputConfig, ReportOutputStrategy, ResolvedEffort, type ResolvedEffortData, type ResolvedTagContributions, RestBlock, type RestBlockConfig, type RoundSchemePrimitive, RoundsMetric, 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, SOUND_PLAY_EVENT, SOUND_PROFILE_METRIC, STANDARD_UNITS, STORE_CALCS, STREAM_ATOMS, STRUCTURAL_EFFORT_WORDS, ScriptRuntime, type SegmentWithMetadata, SessionRootBlock, type SessionRootConfig, SessionRootStrategy, SnapshotClock, SoundProfile, SoundProfileBehavior, type SoundProfileBehaviorConfig, SoundStrategy, type SourceInput, type SpanList, SpanTrackingBehavior, StackListener, StackObserver, StackSnapshot, StandardAnalyticsProfile, StartSessionAction, type StartSessionOptions, StartWorkoutAction, type StartWorkoutOptions, type StatementMetricDiff, type StaticEnv, type StreamAtomDef, SubscribeOptions, SubscriptionManager, type SyntaxFacts, type SyntaxMeta, type SyntaxPrimitive, type SyntaxStatement, TAG_MARKER_PREFIX, type TagCategoryPropertyDocument, type TagParseResult, type TagPropertyDocument, type TagRefPrimitive, TestableBlockConfig, type TextPrimitive, ThrowError, ThrowErrorAction, TimeSpan, TimerState, TwoPassEffortResolutionProcess, TypedMemoryReference, UNITS, type UnitDef$1 as UnitDef, type UnitMatch, UnitRegistry, UnitSet, UnitsDialect, UnregisterEventHandlerAction, Unsubscribe, UpdateNextPreviewAction, WaitingToStartBlock, WaitingToStartInjectorBehavior, WhiteboardScript, type WhiteboardScriptCompletionOptions, type WhiteboardScriptSnippet, WodDialect, YogaDialect, addAliasToEffort, applyTemplateDefaults, buildStaticLookups, buildTooltip, bundledEfforts, calculateElapsed, canonicalizeType, checkCalcLine, classifyStatements, closeCurrentSpan, collapseUnresolvedChoices, commonFixtureSet, compareStatement, compileLineForm, composeDivUnit, composeMulUnit, computeColumnLabel, computeLabel, computeWorkloadRollups, convertScalar, createAnalyticsEngineForBlock, createCalcEngine, createCalcStack, createCompiler, createDialectStack, createDisciplinesTable, createEffortTable, createLineLocator, createPolicy as createMetricPresentationPolicy, createMockClock, createParser, createProfileTable, createRpeLabelsTable, dailySessionLoads, dayBucket, dialectRegistry, dialectStack, diffStatement, documentToEffort, documentToEquipment, documentToTag, effortToDocument, equipmentToDocument, extractEffortData, extractMetrics, extractStatements, extractStatementsRaw, extractSyntaxFacts, findBestFuzzyMatch, findTagContributionCycles, findUnresolvedChoices, fixtureBackSquat, fixtureBurpee, fixturePlank, fixtureRowing, fixtureRunning, fixtureUserCustom, fixtureUserOverride, formatDuration, formatRuntimeLogLine, formatRuntimeLogRule, formatRuntimeTimestamp, metricsToLabel as fragmentsToLabel, fullFixtureSet, fuseUnits, fuseUnitsInMetrics, getAnalyticsFromLogs, getAnalyticsFromRuntime, getHints, getUnit, hasHint, hintMetric, hintsToContainer, inferDim, isCastSubscription, isChoiceResolved, isTimeLikeMetric, isWithinThreshold, levenshteinDistance, metricPresentation, mutateTimerSpans, normalizeForFuzzy, openSpan, outputNodeId, outputNodeIds, padRuntimeLogEvent, padRuntimeLogSubject, parseCalcLine, parseEffortFile, parseEquipmentFile, parseExpression, parseMetricLine, parseScript, printCalculation, readNestedSection, readTimer, realtimeProcessorRegistry, renderMetric, resolveDominantOrigin, resolveFusedEffortReferences, resolveSoundProfile, resolveTagContributions, snippetCompletions, startSpan, strategyRegistry, summaryProcessorRegistry, tagCategoryToDocument, tagContributionMetrics, tagMarkerSlug, tagMarkerSlugs, tagMarkerType, tagToDocument, toStoredOutputStatement, validateOutputUnit, parser as whiteboardParser, whiteboardScript, whiteboardScriptCompletion, whiteboardScriptCompletionSource, whiteboardScriptLanguage, whiteboardScriptSnippets, writeChoiceSelection };
5399
+ export { AGGREGATE_BUILTINS, AUTHORITATIVE_CASTS, AbortSessionAction, type ActionDescriptor, type ActionPrimitive, AmrapLogicStrategy, AnalyticsContext, AnalyticsEngine, type AnalyticsProfileContext, type AnalyticsResult, AnalyticsTransformer, BUILTIN_CALCS, BUNDLED_EFFORT_COUNT, BehaviorContext, BehaviorEventListener, BehaviorEventType, BlockBuilder, BlockContext, BlockLifecycleOptions, ButtonBehavior, ButtonConfig, COMPLETION_PROPERTY_KEYS, CONSUMED_HINTS, CONSUMED_HINT_KEYS, CONTEXT_ATOMS, type CalcAnalysis, CalculationDefinition as CalcDefinition, type CalcDiagnostic, CalcEngine, type CalcEngineDeps, CalcLine, CalcParseError, CalcRegistrationError, CalcScope, type CalcStack, type CalcStackOptions, type UnitDef as CalcUnitDef, CalcUnitError, CalculationDefinition, CalculationRegistry, CardioDialect, ChildSelectionBehavior, type ChildSelectionConfig, type ChildSelectionLoopCondition, ChildrenStrategy, ChoiceGroupMetric, ClearChildrenAction, ClimbDialect, type ClimbGradeMetricValue, type ClimbGradeSystem, ClimbMetricType, CompileAndPushBlockAction, type CompiledLineForm, CompletionDecision, CompletionTimestampBehavior, type CompletionValueOption, type CompletionValueSource, CompositeEffortRegistry, type CompositeEffortRegistryOptions, CompositeEquipmentRegistry, CompositePropertyRegistry, type ControlsConfig, type CountdownMode, CountdownTimerBehavior, type CountdownTimerConfig, CountupTimerBehavior, type CountupTimerConfig, type CreateAnalyticsEngineOptions, type CreateAnalyticsEngineResult, CrossFitDialect, DAY, DEFAULT_UNRESOLVED_EFFORT_MET, type DayRollup, DialectStack, DimVector, type Dimension, type DurationPrimitive, EFFORT_DATA_METRIC_TYPE, EffortBlock, type EffortBlockConfig, EffortFallbackStrategy, type EffortPrimitive, EffortRegistrySource, EffortResolutionOptions, EffortResolver, EffortResolverOptions, EffortStorageAdapter, EmitEventAction, EmitSystemOutputAction, type EquipmentParseResult, EquipmentStorageAdapter, ErrorAction, EventBus, EventCallback, EventHandlerOptions, type EventHandlerRegistration, ExecutionContext, type ExecutionSnapshot, type ExecutionStatus, ExitBehavior, type ExitConfig, ExprNode, FixtureSyntaxError, type FuzzyCandidate, GenericGroupStrategy, GenericLoopStrategy, GenericTimerStrategy, HabitsDialect, type HeadingPrimitive, IAnalyticsEngine, type IAnalyticsProfile, IAnchorValue, IBehaviorContext, IBlockContext, type ICastSubscription, IEffort, IEffortRegistry, IEffortResolver, IEquipment, IEquipmentRegistry, IEvent, IEventBus, IEventHandler, IJitCompiler, ILookupTable, IMemoryLocation, IMemoryReference, type IMetricPresentationPolicy, INowProvider, type IProfileSource, IRealtimeProcessor, IRuntimeAction, IRuntimeActionable, IRuntimeBehavior, IRuntimeBlock, type IRuntimeBlockStrategy, IRuntimeClock, type IRuntimeEventProvider, type IRuntimeFactory, IRuntimeMemory, IRuntimeStack, type IRuntimeSubscription, IScriptRuntime, ISummaryProcessor, InMemoryEffortRegistry, IntervalLogicStrategy, JitCompiler, LabelingBehavior, type LabelingConfig, type LapPrimitive, type LineFormScope, type LineLocator, type LiteralKind, LocalEventProvider, LocalRuntimeSubscription, type LogLevel, type LoggableOutput, LookupRegistry, MAX_TAG_CONTRIBUTION_DEPTH, type MatchMode, MdTimerRuntime, type MemoryEntry, MemoryTag, MemoryTypeEnum, type MetricLine, type MetricObjectPrimitive, type MetricPresentationSurface, type MetricPresentationToken, MetricPromotionBehavior, type MetricPromotionConfig, type MetricRenderKind, type MetricTone, MetricVisibility, type MockClock, NextAction, NextEvent, NextEventHandler, OutputEmitter, OutputListener, PRODUCTION_STRATEGIES, PROPERTY_KEY_TO_METRIC_TYPE, type ParseOptions, type ParseReferences, type ParseResult, type ParserConfig, PopBlockAction, ProjectionResult, type PromotionRule, type PropertyEntity, type PropertyPrimitive, PropertyRuleInput, type PropertyStorageAdapter, PushBlockAction, PushRestBlockAction, type QuantityPrimitive, REFERENCE_PAIR_KEYS, REST_EXCLUSION, RPE_LABELS, RUNTIME_LOG_SUBJECT_WIDTH, ReferenceIndex, ReferenceResolutionDefaults, RegisterEventHandlerAction, Registry, ReportOutputBehavior, type ReportOutputConfig, ReportOutputStrategy, ResolvedEffort, type ResolvedEffortData, type ResolvedTagContributions, RestBlock, type RestBlockConfig, type RoundSchemePrimitive, RoundsMetric, 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, SOUND_PLAY_EVENT, SOUND_PROFILE_METRIC, STANDARD_UNITS, STORE_CALCS, STREAM_ATOMS, STRUCTURAL_EFFORT_WORDS, ScriptRuntime, type SegmentWithMetadata, SessionRootBlock, type SessionRootConfig, SessionRootStrategy, SnapshotClock, SoundProfile, SoundProfileBehavior, type SoundProfileBehaviorConfig, SoundStrategy, type SourceInput, type SpanList, SpanTrackingBehavior, StackListener, StackObserver, StackSnapshot, StandardAnalyticsProfile, StartSessionAction, type StartSessionOptions, StartWorkoutAction, type StartWorkoutOptions, type StatementMetricDiff, type StaticEnv, type StreamAtomDef, SubscribeOptions, SubscriptionManager, type SyntaxFacts, type SyntaxMeta, type SyntaxPrimitive, type SyntaxStatement, TAG_MARKER_PREFIX, type TagCategoryPropertyDocument, type TagParseResult, type TagPropertyDocument, type TagRefPrimitive, TestableBlockConfig, type TextPrimitive, ThrowError, ThrowErrorAction, TimeSpan, TimerState, TwoPassEffortResolutionProcess, TypedMemoryReference, UNITS, type UnitDef$1 as UnitDef, type UnitMatch, UnitRegistry, UnitSet, UnitsDialect, UnregisterEventHandlerAction, Unsubscribe, UpdateNextPreviewAction, WaitingToStartBlock, WaitingToStartInjectorBehavior, WhiteboardScript, type WhiteboardScriptCompletionOptions, type WhiteboardScriptSnippet, WodDialect, YogaDialect, addAliasToEffort, applyTemplateDefaults, buildStaticLookups, buildTooltip, bundledEfforts, calculateElapsed, canonicalizeType, checkCalcLine, classifyStatements, closeCurrentSpan, collapseUnresolvedChoices, commonFixtureSet, compareStatement, compileLineForm, composeDivUnit, composeMulUnit, computeColumnLabel, computeLabel, computeWorkloadRollups, convertScalar, createAnalyticsEngineForBlock, createCalcEngine, createCalcStack, createCompiler, createDialectStack, createDisciplinesTable, createEffortTable, createLineLocator, createPolicy as createMetricPresentationPolicy, createMockClock, createParser, createProfileTable, createRpeLabelsTable, dailySessionLoads, dayBucket, dialectRegistry, dialectStack, diffStatement, documentToEffort, documentToEquipment, documentToTag, effortToDocument, equipmentToDocument, extractEffortData, extractMetrics, extractStatements, extractStatementsRaw, extractSyntaxFacts, findBestFuzzyMatch, findTagContributionCycles, findUnresolvedChoices, fixtureBackSquat, fixtureBurpee, fixturePlank, fixtureRowing, fixtureRunning, fixtureUserCustom, fixtureUserOverride, formatDuration, formatRuntimeLogLine, formatRuntimeLogRule, formatRuntimeTimestamp, metricsToLabel as fragmentsToLabel, fullFixtureSet, fuseUnits, fuseUnitsInMetrics, getAnalyticsFromLogs, getAnalyticsFromRuntime, getHints, getUnit, hasHint, hintMetric, hintsToContainer, inferDim, isCastSubscription, isChoiceResolved, isTimeLikeMetric, isWithinThreshold, levenshteinDistance, metricPresentation, mutateTimerSpans, normalizeForFuzzy, openSpan, outputNodeId, outputNodeIds, padRuntimeLogEvent, padRuntimeLogSubject, parseCalcLine, parseEffortFile, parseEquipmentFile, parseExpression, parseMetricLine, parseScript, printCalculation, readNestedSection, readTimer, realtimeProcessorRegistry, renderMetric, resolveDominantOrigin, resolveFusedEffortReferences, resolveSoundProfile, resolveTagContributions, snippetCompletions, startSpan, strategyRegistry, summaryProcessorRegistry, tagCategoryRecordToDocument, tagCategoryToDocument, tagContributionMetrics, tagMarkerSlug, tagMarkerSlugs, tagMarkerType, tagRecordToDocument, tagToDocument, toStoredOutputStatement, validateOutputUnit, parser as whiteboardParser, whiteboardScript, whiteboardScriptCompletion, whiteboardScriptCompletionSource, whiteboardScriptLanguage, whiteboardScriptSnippets, writeChoiceSelection };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { IMetric, MetricContainer, MetricOrigin, MetricType, IDialect, ICodeStatement, DialectAnalysis, TagIndex, ParsedCodeStatement, TagMetricContribution, IOutputStatement, OutputStatementType, BlockKey, TagReferenceMetadata, ScriptBlock, FenceDialect, Segment, AnalyticsGroup, StoredOutputStatement, OutputStatement } from '@bitcobblers/wod-wiki-core';
1
+ import { IMetric, MetricContainer, MetricOrigin, MetricType, IDialect, ICodeStatement, DialectAnalysis, TagIndex, ParsedCodeStatement, TagTypeRecord, Tag, TagMetricContribution, IOutputStatement, OutputStatementType, BlockKey, TagReferenceMetadata, ScriptBlock, FenceDialect, Segment, AnalyticsGroup, StoredOutputStatement, OutputStatement } from '@bitcobblers/wod-wiki-core';
2
2
  export { ParseError } from '@bitcobblers/wod-wiki-core';
3
- import { R as ReferenceIndex, a as ReferenceResolutionDefaults, W as WhiteboardScript, I as IEquipment, b as IEffort, c as IEffortResolver, d as IEffortRegistry, E as EffortResolverOptions, e as EffortResolutionOptions, f as ResolvedEffort, g as EffortRegistrySource, h as IEquipmentRegistry, i as EquipmentStorageAdapter, j as EffortStorageAdapter, k as IRuntimeActionable, l as IEventBus, m as IRuntimeStack, n as IRuntimeClock, o as IJitCompiler, p as INowProvider, q as RuntimeStackOptions, r as RuntimeError, A as AnalyticsContext, s as IEvent, t as IRuntimeAction, O as OutputListener, U as Unsubscribe, u as IAnalyticsEngine, v as IRuntimeBlock, w as IBehaviorContext, B as BehaviorEventType, x as BehaviorEventListener, S as SubscribeOptions, y as Unsubscribe$1, z as OutputOptions, M as MemoryTag, C as IMemoryLocation, D as IRuntimeBehavior, F as IBlockContext, G as MetricVisibility, H as BlockLifecycleOptions, J as CompletionDecision, T as TimeSpan, K as IRuntimeMemory, L as TypedMemoryReference, N as MemorySearchCriteria, P as IMemoryReference, Q as RuntimeStackLogger, V as StackObserver, X as StackSnapshot, Y as StackListener, Z as MemoryTypeEnum, _ as IAnchorValue, $ as SoundProfile, a0 as ButtonConfig, a1 as IEventHandler, a2 as HandlerScope, a3 as IScriptRuntime, a4 as TestableBlockConfig, a5 as IRuntimeOptions, a6 as ScriptRuntime, a7 as EventHandlerOptions, a8 as EventCallback, a9 as TimerState, aa as CalculationDefinition, ab as PropertyRuleInput, ac as IRealtimeProcessor, ad as ISummaryProcessor, ae as DimVector, af as CalcLine, ag as ExprNode, ah as CalcScope, ai as ILookupTable, aj as LookupRegistry, ak as CalcRegistrationDiagnostic, al as ProjectionResult } from './browserRuntimeNow-DUJFkpUq.js';
4
- export { am as ABSENT, an as BinaryOp, ao as ButtonVariant, ap as ButtonsState, aq as CalcEvalError, ar as CalcNode, as as CalcOrigin, at as CalcVariant, au as ChildrenStatusState, av as CompiledPropertySummaries, aw as CompletionState, ax as DEFAULT_RESOLVER_OPTIONS, ay as DEFAULT_RUNTIME_OPTIONS, az as DEFAULT_SOUND_PROFILE, aA as DIM_COUNT, aB as DIM_ENERGY, aC as DIM_LENGTH, aD as DIM_MASS, aE as DIM_TIME, aF as DIM_ZERO, aG as DISCIPLINE_FACTORS, aH as DisplayState, aI as EFFORT_DISCIPLINES, aJ as EFFORT_REGISTRY_ORIGINS, aK as EffortBaseAttributes, aL as EffortDerivation, aM as EffortDiscipline, aN as EffortMaterializer, aO as EffortResolvedFrom, aP as EvalContext, aQ as FenceDialect, aR as FragmentDisplayState, aS as FragmentState, aT as IAnalyticsProcessorDescriptor, aU as INTENSITY_TIERS, aV as IScript, aW as IntensityTier, aX as InterceptMode, aY as LookupFieldDef, aZ as LookupLayer, a_ as MemoryLocation, a$ as MemoryType, b0 as MemoryTypeMap, b1 as MemoryValueOf, b2 as NAMED_COMPOUNDS, b3 as PropertySourceLayer, b4 as ReferenceCatalog, b5 as ResolvedReferences, b6 as RoundState, b7 as RuntimeState, b8 as SEED_PRECEDENCE_RANK, b9 as ScriptRuntimeDependencies, ba as SeedPrecedenceTier, bb as ShakeOutQueueOptions, bc as ShakeOutResult, bd as SkippedDependencyDiagnostic, be as SoundRule, bf as SoundTriggerAnchor, bg as SoundTriggerPoint, bh as StackEvent, bi as TimerDirection, bj as VISIBILITY_ICONS, bk as VISIBILITY_LABELS, bl as Val, bm as addDim, bn as compilePropertySummaryCalcs, bo as compilePropertySummaryCalcsWithDiagnostics, bp as compoundName, bq as createBrowserRuntimeNow, br as createReferenceIndex, bs as dedupeEntitiesByPrecedence, bt as dimEquals, bu as disciplineFactorFor, bv as evaluate, bw as extractPropertyRulesFromMeta, bx as extractStatementRefs, by as extractTagPropertyRules, bz as filterTagsByVisibility, bA as formatDim, bB as formatSoundTrigger, bC as frozenNow, bD as getMetricVisibility, bE as getRuntimeNowMs, bF as isDimensionless, bG as isEffortDiscipline, bH as isFragmentTag, bI as num, bJ as parseSoundTrigger, bK as resolveEntityRank, bL as resolveEntityTier, bM as resolveProfileRules, bN as resolveSourceRank, bO as resolveSourceTier, bP as runMetricShakeOutQueue, bQ as slugifyRefLabel, bR as str, bS as subDim, bT as truthy, bU as wallClockNow } from './browserRuntimeNow-DUJFkpUq.js';
3
+ import { R as ReferenceIndex, a as ReferenceResolutionDefaults, W as WhiteboardScript, I as IEquipment, b as IEffort, c as IEffortResolver, d as IEffortRegistry, E as EffortResolverOptions, e as EffortResolutionOptions, f as ResolvedEffort, g as EffortRegistrySource, h as IEquipmentRegistry, i as EquipmentStorageAdapter, j as EffortStorageAdapter, k as IRuntimeActionable, l as IEventBus, m as IRuntimeStack, n as IRuntimeClock, o as IJitCompiler, p as INowProvider, q as RuntimeStackOptions, r as RuntimeError, A as AnalyticsContext, s as IEvent, t as IRuntimeAction, O as OutputListener, U as Unsubscribe, u as IAnalyticsEngine, v as IRuntimeBlock, w as IBehaviorContext, B as BehaviorEventType, x as BehaviorEventListener, S as SubscribeOptions, y as Unsubscribe$1, z as OutputOptions, M as MemoryTag, C as IMemoryLocation, D as IRuntimeBehavior, F as IBlockContext, G as MetricVisibility, H as BlockLifecycleOptions, J as CompletionDecision, T as TimeSpan, K as IRuntimeMemory, L as TypedMemoryReference, N as MemorySearchCriteria, P as IMemoryReference, Q as RuntimeStackLogger, V as StackObserver, X as StackSnapshot, Y as StackListener, Z as MemoryTypeEnum, _ as IAnchorValue, $ as SoundProfile, a0 as ButtonConfig, a1 as IEventHandler, a2 as HandlerScope, a3 as IScriptRuntime, a4 as TestableBlockConfig, a5 as IRuntimeOptions, a6 as ScriptRuntime, a7 as EventHandlerOptions, a8 as EventCallback, a9 as TimerState, aa as CalculationDefinition, ab as PropertyRuleInput, ac as IRealtimeProcessor, ad as ISummaryProcessor, ae as DimVector, af as CalcLine, ag as ExprNode, ah as CalcScope, ai as ILookupTable, aj as LookupRegistry, ak as CalcRegistrationDiagnostic, al as ProjectionResult } from './browserRuntimeNow-JnK2JvJg.js';
4
+ export { am as ABSENT, an as BinaryOp, ao as ButtonVariant, ap as ButtonsState, aq as CalcEvalError, ar as CalcNode, as as CalcOrigin, at as CalcVariant, au as ChildrenStatusState, av as CompiledPropertySummaries, aw as CompletionState, ax as DEFAULT_RESOLVER_OPTIONS, ay as DEFAULT_RUNTIME_OPTIONS, az as DEFAULT_SOUND_PROFILE, aA as DIM_COUNT, aB as DIM_ENERGY, aC as DIM_LENGTH, aD as DIM_MASS, aE as DIM_TIME, aF as DIM_ZERO, aG as DISCIPLINE_FACTORS, aH as DisplayState, aI as EFFORT_DISCIPLINES, aJ as EFFORT_REGISTRY_ORIGINS, aK as EffortBaseAttributes, aL as EffortDerivation, aM as EffortDiscipline, aN as EffortMaterializer, aO as EffortResolvedFrom, aP as EvalContext, aQ as FenceDialect, aR as FragmentDisplayState, aS as FragmentState, aT as IAnalyticsProcessorDescriptor, aU as INTENSITY_TIERS, aV as IScript, aW as IntensityTier, aX as InterceptMode, aY as LookupFieldDef, aZ as LookupLayer, a_ as MemoryLocation, a$ as MemoryType, b0 as MemoryTypeMap, b1 as MemoryValueOf, b2 as NAMED_COMPOUNDS, b3 as PropertySourceLayer, b4 as ReferenceCatalog, b5 as ResolvedReferences, b6 as RoundState, b7 as RuntimeState, b8 as SEED_PRECEDENCE_RANK, b9 as ScriptRuntimeDependencies, ba as SeedPrecedenceTier, bb as ShakeOutQueueOptions, bc as ShakeOutResult, bd as SkippedDependencyDiagnostic, be as SoundRule, bf as SoundTriggerAnchor, bg as SoundTriggerPoint, bh as StackEvent, bi as StackedDashboardWidgetDescriptor, bj as TimerDirection, bk as VISIBILITY_ICONS, bl as VISIBILITY_LABELS, bm as Val, bn as addDim, bo as compilePropertySummaryCalcs, bp as compilePropertySummaryCalcsWithDiagnostics, bq as compoundName, br as createBrowserRuntimeNow, bs as createReferenceIndex, bt as dedupeEntitiesByPrecedence, bu as dimEquals, bv as disciplineFactorFor, bw as evaluate, bx as extractPropertyRulesFromMeta, by as extractStatementRefs, bz as extractTagPropertyRules, bA as filterTagsByVisibility, bB as formatDim, bC as formatSoundTrigger, bD as frozenNow, bE as getMetricVisibility, bF as getRuntimeNowMs, bG as isDimensionless, bH as isEffortDiscipline, bI as isFragmentTag, bJ as num, bK as parseSoundTrigger, bL as resolveEntityRank, bM as resolveEntityTier, bN as resolveProfileRules, bO as resolvePropertyDashboardWidgets, bP as resolveSourceRank, bQ as resolveSourceTier, bR as runMetricShakeOutQueue, bS as slugifyRefLabel, bT as str, bU as subDim, bV as truthy, bW as wallClockNow } from './browserRuntimeNow-JnK2JvJg.js';
5
5
  import { Tree } from '@lezer/common';
6
6
  import { LanguageSupport, LRLanguage } from '@codemirror/language';
7
7
  import { CompletionSource, Completion } from '@codemirror/autocomplete';
@@ -980,6 +980,7 @@ interface TagPropertyDocument {
980
980
  aliases: string[];
981
981
  metrics: Record<string, string | number | readonly string[]>;
982
982
  summaries: Record<string, string>;
983
+ widgets?: Record<string, string>;
983
984
  tags: string[];
984
985
  functions: string[];
985
986
  body?: string;
@@ -997,9 +998,19 @@ interface TagCategoryPropertyDocument {
997
998
  color?: string;
998
999
  metrics?: Record<string, string | number>;
999
1000
  summaries?: Record<string, string>;
1001
+ widgets?: Record<string, string>;
1000
1002
  body?: string;
1001
1003
  }
1002
1004
  declare function tagCategoryToDocument(category: TagCategoryPropertyDocument): string;
1005
+ /**
1006
+ * Synthesize a Property Note document directly from a stored Tag record,
1007
+ * unpacking its `contributions` into `metrics.*`, `summaries.*`, `tags`, and `functions`.
1008
+ */
1009
+ declare function tagRecordToDocument(tag: Tag, categoryFallback?: string): string;
1010
+ /**
1011
+ * Synthesize a Tag Category Property Note document from a TagTypeRecord.
1012
+ */
1013
+ declare function tagCategoryRecordToDocument(category: string, record?: TagTypeRecord): string;
1003
1014
 
1004
1015
  /**
1005
1016
  * Effort Resolver — Analytics Boundary
@@ -5385,4 +5396,4 @@ declare function diffStatement(expected: MetricLine[], actual: readonly IMetric[
5385
5396
  */
5386
5397
  declare function compareStatement(expectations: MetricLine[], actual: readonly IMetric[], mode: MatchMode): string[];
5387
5398
 
5388
- export { AGGREGATE_BUILTINS, AUTHORITATIVE_CASTS, AbortSessionAction, type ActionDescriptor, type ActionPrimitive, AmrapLogicStrategy, AnalyticsContext, AnalyticsEngine, type AnalyticsProfileContext, type AnalyticsResult, AnalyticsTransformer, BUILTIN_CALCS, BUNDLED_EFFORT_COUNT, BehaviorContext, BehaviorEventListener, BehaviorEventType, BlockBuilder, BlockContext, BlockLifecycleOptions, ButtonBehavior, ButtonConfig, COMPLETION_PROPERTY_KEYS, CONSUMED_HINTS, CONSUMED_HINT_KEYS, CONTEXT_ATOMS, type CalcAnalysis, CalculationDefinition as CalcDefinition, type CalcDiagnostic, CalcEngine, type CalcEngineDeps, CalcLine, CalcParseError, CalcRegistrationError, CalcScope, type CalcStack, type CalcStackOptions, type UnitDef as CalcUnitDef, CalcUnitError, CalculationDefinition, CalculationRegistry, CardioDialect, ChildSelectionBehavior, type ChildSelectionConfig, type ChildSelectionLoopCondition, ChildrenStrategy, ChoiceGroupMetric, ClearChildrenAction, ClimbDialect, type ClimbGradeMetricValue, type ClimbGradeSystem, ClimbMetricType, CompileAndPushBlockAction, type CompiledLineForm, CompletionDecision, CompletionTimestampBehavior, type CompletionValueOption, type CompletionValueSource, CompositeEffortRegistry, type CompositeEffortRegistryOptions, CompositeEquipmentRegistry, CompositePropertyRegistry, type ControlsConfig, type CountdownMode, CountdownTimerBehavior, type CountdownTimerConfig, CountupTimerBehavior, type CountupTimerConfig, type CreateAnalyticsEngineOptions, type CreateAnalyticsEngineResult, CrossFitDialect, DAY, DEFAULT_UNRESOLVED_EFFORT_MET, type DayRollup, DialectStack, DimVector, type Dimension, type DurationPrimitive, EFFORT_DATA_METRIC_TYPE, EffortBlock, type EffortBlockConfig, EffortFallbackStrategy, type EffortPrimitive, EffortRegistrySource, EffortResolutionOptions, EffortResolver, EffortResolverOptions, EffortStorageAdapter, EmitEventAction, EmitSystemOutputAction, type EquipmentParseResult, EquipmentStorageAdapter, ErrorAction, EventBus, EventCallback, EventHandlerOptions, type EventHandlerRegistration, ExecutionContext, type ExecutionSnapshot, type ExecutionStatus, ExitBehavior, type ExitConfig, ExprNode, FixtureSyntaxError, type FuzzyCandidate, GenericGroupStrategy, GenericLoopStrategy, GenericTimerStrategy, HabitsDialect, type HeadingPrimitive, IAnalyticsEngine, type IAnalyticsProfile, IAnchorValue, IBehaviorContext, IBlockContext, type ICastSubscription, IEffort, IEffortRegistry, IEffortResolver, IEquipment, IEquipmentRegistry, IEvent, IEventBus, IEventHandler, IJitCompiler, ILookupTable, IMemoryLocation, IMemoryReference, type IMetricPresentationPolicy, INowProvider, type IProfileSource, IRealtimeProcessor, IRuntimeAction, IRuntimeActionable, IRuntimeBehavior, IRuntimeBlock, type IRuntimeBlockStrategy, IRuntimeClock, type IRuntimeEventProvider, type IRuntimeFactory, IRuntimeMemory, IRuntimeStack, type IRuntimeSubscription, IScriptRuntime, ISummaryProcessor, InMemoryEffortRegistry, IntervalLogicStrategy, JitCompiler, LabelingBehavior, type LabelingConfig, type LapPrimitive, type LineFormScope, type LineLocator, type LiteralKind, LocalEventProvider, LocalRuntimeSubscription, type LogLevel, type LoggableOutput, LookupRegistry, MAX_TAG_CONTRIBUTION_DEPTH, type MatchMode, MdTimerRuntime, type MemoryEntry, MemoryTag, MemoryTypeEnum, type MetricLine, type MetricObjectPrimitive, type MetricPresentationSurface, type MetricPresentationToken, MetricPromotionBehavior, type MetricPromotionConfig, type MetricRenderKind, type MetricTone, MetricVisibility, type MockClock, NextAction, NextEvent, NextEventHandler, OutputEmitter, OutputListener, PRODUCTION_STRATEGIES, PROPERTY_KEY_TO_METRIC_TYPE, type ParseOptions, type ParseReferences, type ParseResult, type ParserConfig, PopBlockAction, ProjectionResult, type PromotionRule, type PropertyEntity, type PropertyPrimitive, PropertyRuleInput, type PropertyStorageAdapter, PushBlockAction, PushRestBlockAction, type QuantityPrimitive, REFERENCE_PAIR_KEYS, REST_EXCLUSION, RPE_LABELS, RUNTIME_LOG_SUBJECT_WIDTH, ReferenceIndex, ReferenceResolutionDefaults, RegisterEventHandlerAction, Registry, ReportOutputBehavior, type ReportOutputConfig, ReportOutputStrategy, ResolvedEffort, type ResolvedEffortData, type ResolvedTagContributions, RestBlock, type RestBlockConfig, type RoundSchemePrimitive, RoundsMetric, 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, SOUND_PLAY_EVENT, SOUND_PROFILE_METRIC, STANDARD_UNITS, STORE_CALCS, STREAM_ATOMS, STRUCTURAL_EFFORT_WORDS, ScriptRuntime, type SegmentWithMetadata, SessionRootBlock, type SessionRootConfig, SessionRootStrategy, SnapshotClock, SoundProfile, SoundProfileBehavior, type SoundProfileBehaviorConfig, SoundStrategy, type SourceInput, type SpanList, SpanTrackingBehavior, StackListener, StackObserver, StackSnapshot, StandardAnalyticsProfile, StartSessionAction, type StartSessionOptions, StartWorkoutAction, type StartWorkoutOptions, type StatementMetricDiff, type StaticEnv, type StreamAtomDef, SubscribeOptions, SubscriptionManager, type SyntaxFacts, type SyntaxMeta, type SyntaxPrimitive, type SyntaxStatement, TAG_MARKER_PREFIX, type TagCategoryPropertyDocument, type TagParseResult, type TagPropertyDocument, type TagRefPrimitive, TestableBlockConfig, type TextPrimitive, ThrowError, ThrowErrorAction, TimeSpan, TimerState, TwoPassEffortResolutionProcess, TypedMemoryReference, UNITS, type UnitDef$1 as UnitDef, type UnitMatch, UnitRegistry, UnitSet, UnitsDialect, UnregisterEventHandlerAction, Unsubscribe, UpdateNextPreviewAction, WaitingToStartBlock, WaitingToStartInjectorBehavior, WhiteboardScript, type WhiteboardScriptCompletionOptions, type WhiteboardScriptSnippet, WodDialect, YogaDialect, addAliasToEffort, applyTemplateDefaults, buildStaticLookups, buildTooltip, bundledEfforts, calculateElapsed, canonicalizeType, checkCalcLine, classifyStatements, closeCurrentSpan, collapseUnresolvedChoices, commonFixtureSet, compareStatement, compileLineForm, composeDivUnit, composeMulUnit, computeColumnLabel, computeLabel, computeWorkloadRollups, convertScalar, createAnalyticsEngineForBlock, createCalcEngine, createCalcStack, createCompiler, createDialectStack, createDisciplinesTable, createEffortTable, createLineLocator, createPolicy as createMetricPresentationPolicy, createMockClock, createParser, createProfileTable, createRpeLabelsTable, dailySessionLoads, dayBucket, dialectRegistry, dialectStack, diffStatement, documentToEffort, documentToEquipment, documentToTag, effortToDocument, equipmentToDocument, extractEffortData, extractMetrics, extractStatements, extractStatementsRaw, extractSyntaxFacts, findBestFuzzyMatch, findTagContributionCycles, findUnresolvedChoices, fixtureBackSquat, fixtureBurpee, fixturePlank, fixtureRowing, fixtureRunning, fixtureUserCustom, fixtureUserOverride, formatDuration, formatRuntimeLogLine, formatRuntimeLogRule, formatRuntimeTimestamp, metricsToLabel as fragmentsToLabel, fullFixtureSet, fuseUnits, fuseUnitsInMetrics, getAnalyticsFromLogs, getAnalyticsFromRuntime, getHints, getUnit, hasHint, hintMetric, hintsToContainer, inferDim, isCastSubscription, isChoiceResolved, isTimeLikeMetric, isWithinThreshold, levenshteinDistance, metricPresentation, mutateTimerSpans, normalizeForFuzzy, openSpan, outputNodeId, outputNodeIds, padRuntimeLogEvent, padRuntimeLogSubject, parseCalcLine, parseEffortFile, parseEquipmentFile, parseExpression, parseMetricLine, parseScript, printCalculation, readNestedSection, readTimer, realtimeProcessorRegistry, renderMetric, resolveDominantOrigin, resolveFusedEffortReferences, resolveSoundProfile, resolveTagContributions, snippetCompletions, startSpan, strategyRegistry, summaryProcessorRegistry, tagCategoryToDocument, tagContributionMetrics, tagMarkerSlug, tagMarkerSlugs, tagMarkerType, tagToDocument, toStoredOutputStatement, validateOutputUnit, parser as whiteboardParser, whiteboardScript, whiteboardScriptCompletion, whiteboardScriptCompletionSource, whiteboardScriptLanguage, whiteboardScriptSnippets, writeChoiceSelection };
5399
+ export { AGGREGATE_BUILTINS, AUTHORITATIVE_CASTS, AbortSessionAction, type ActionDescriptor, type ActionPrimitive, AmrapLogicStrategy, AnalyticsContext, AnalyticsEngine, type AnalyticsProfileContext, type AnalyticsResult, AnalyticsTransformer, BUILTIN_CALCS, BUNDLED_EFFORT_COUNT, BehaviorContext, BehaviorEventListener, BehaviorEventType, BlockBuilder, BlockContext, BlockLifecycleOptions, ButtonBehavior, ButtonConfig, COMPLETION_PROPERTY_KEYS, CONSUMED_HINTS, CONSUMED_HINT_KEYS, CONTEXT_ATOMS, type CalcAnalysis, CalculationDefinition as CalcDefinition, type CalcDiagnostic, CalcEngine, type CalcEngineDeps, CalcLine, CalcParseError, CalcRegistrationError, CalcScope, type CalcStack, type CalcStackOptions, type UnitDef as CalcUnitDef, CalcUnitError, CalculationDefinition, CalculationRegistry, CardioDialect, ChildSelectionBehavior, type ChildSelectionConfig, type ChildSelectionLoopCondition, ChildrenStrategy, ChoiceGroupMetric, ClearChildrenAction, ClimbDialect, type ClimbGradeMetricValue, type ClimbGradeSystem, ClimbMetricType, CompileAndPushBlockAction, type CompiledLineForm, CompletionDecision, CompletionTimestampBehavior, type CompletionValueOption, type CompletionValueSource, CompositeEffortRegistry, type CompositeEffortRegistryOptions, CompositeEquipmentRegistry, CompositePropertyRegistry, type ControlsConfig, type CountdownMode, CountdownTimerBehavior, type CountdownTimerConfig, CountupTimerBehavior, type CountupTimerConfig, type CreateAnalyticsEngineOptions, type CreateAnalyticsEngineResult, CrossFitDialect, DAY, DEFAULT_UNRESOLVED_EFFORT_MET, type DayRollup, DialectStack, DimVector, type Dimension, type DurationPrimitive, EFFORT_DATA_METRIC_TYPE, EffortBlock, type EffortBlockConfig, EffortFallbackStrategy, type EffortPrimitive, EffortRegistrySource, EffortResolutionOptions, EffortResolver, EffortResolverOptions, EffortStorageAdapter, EmitEventAction, EmitSystemOutputAction, type EquipmentParseResult, EquipmentStorageAdapter, ErrorAction, EventBus, EventCallback, EventHandlerOptions, type EventHandlerRegistration, ExecutionContext, type ExecutionSnapshot, type ExecutionStatus, ExitBehavior, type ExitConfig, ExprNode, FixtureSyntaxError, type FuzzyCandidate, GenericGroupStrategy, GenericLoopStrategy, GenericTimerStrategy, HabitsDialect, type HeadingPrimitive, IAnalyticsEngine, type IAnalyticsProfile, IAnchorValue, IBehaviorContext, IBlockContext, type ICastSubscription, IEffort, IEffortRegistry, IEffortResolver, IEquipment, IEquipmentRegistry, IEvent, IEventBus, IEventHandler, IJitCompiler, ILookupTable, IMemoryLocation, IMemoryReference, type IMetricPresentationPolicy, INowProvider, type IProfileSource, IRealtimeProcessor, IRuntimeAction, IRuntimeActionable, IRuntimeBehavior, IRuntimeBlock, type IRuntimeBlockStrategy, IRuntimeClock, type IRuntimeEventProvider, type IRuntimeFactory, IRuntimeMemory, IRuntimeStack, type IRuntimeSubscription, IScriptRuntime, ISummaryProcessor, InMemoryEffortRegistry, IntervalLogicStrategy, JitCompiler, LabelingBehavior, type LabelingConfig, type LapPrimitive, type LineFormScope, type LineLocator, type LiteralKind, LocalEventProvider, LocalRuntimeSubscription, type LogLevel, type LoggableOutput, LookupRegistry, MAX_TAG_CONTRIBUTION_DEPTH, type MatchMode, MdTimerRuntime, type MemoryEntry, MemoryTag, MemoryTypeEnum, type MetricLine, type MetricObjectPrimitive, type MetricPresentationSurface, type MetricPresentationToken, MetricPromotionBehavior, type MetricPromotionConfig, type MetricRenderKind, type MetricTone, MetricVisibility, type MockClock, NextAction, NextEvent, NextEventHandler, OutputEmitter, OutputListener, PRODUCTION_STRATEGIES, PROPERTY_KEY_TO_METRIC_TYPE, type ParseOptions, type ParseReferences, type ParseResult, type ParserConfig, PopBlockAction, ProjectionResult, type PromotionRule, type PropertyEntity, type PropertyPrimitive, PropertyRuleInput, type PropertyStorageAdapter, PushBlockAction, PushRestBlockAction, type QuantityPrimitive, REFERENCE_PAIR_KEYS, REST_EXCLUSION, RPE_LABELS, RUNTIME_LOG_SUBJECT_WIDTH, ReferenceIndex, ReferenceResolutionDefaults, RegisterEventHandlerAction, Registry, ReportOutputBehavior, type ReportOutputConfig, ReportOutputStrategy, ResolvedEffort, type ResolvedEffortData, type ResolvedTagContributions, RestBlock, type RestBlockConfig, type RoundSchemePrimitive, RoundsMetric, 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, SOUND_PLAY_EVENT, SOUND_PROFILE_METRIC, STANDARD_UNITS, STORE_CALCS, STREAM_ATOMS, STRUCTURAL_EFFORT_WORDS, ScriptRuntime, type SegmentWithMetadata, SessionRootBlock, type SessionRootConfig, SessionRootStrategy, SnapshotClock, SoundProfile, SoundProfileBehavior, type SoundProfileBehaviorConfig, SoundStrategy, type SourceInput, type SpanList, SpanTrackingBehavior, StackListener, StackObserver, StackSnapshot, StandardAnalyticsProfile, StartSessionAction, type StartSessionOptions, StartWorkoutAction, type StartWorkoutOptions, type StatementMetricDiff, type StaticEnv, type StreamAtomDef, SubscribeOptions, SubscriptionManager, type SyntaxFacts, type SyntaxMeta, type SyntaxPrimitive, type SyntaxStatement, TAG_MARKER_PREFIX, type TagCategoryPropertyDocument, type TagParseResult, type TagPropertyDocument, type TagRefPrimitive, TestableBlockConfig, type TextPrimitive, ThrowError, ThrowErrorAction, TimeSpan, TimerState, TwoPassEffortResolutionProcess, TypedMemoryReference, UNITS, type UnitDef$1 as UnitDef, type UnitMatch, UnitRegistry, UnitSet, UnitsDialect, UnregisterEventHandlerAction, Unsubscribe, UpdateNextPreviewAction, WaitingToStartBlock, WaitingToStartInjectorBehavior, WhiteboardScript, type WhiteboardScriptCompletionOptions, type WhiteboardScriptSnippet, WodDialect, YogaDialect, addAliasToEffort, applyTemplateDefaults, buildStaticLookups, buildTooltip, bundledEfforts, calculateElapsed, canonicalizeType, checkCalcLine, classifyStatements, closeCurrentSpan, collapseUnresolvedChoices, commonFixtureSet, compareStatement, compileLineForm, composeDivUnit, composeMulUnit, computeColumnLabel, computeLabel, computeWorkloadRollups, convertScalar, createAnalyticsEngineForBlock, createCalcEngine, createCalcStack, createCompiler, createDialectStack, createDisciplinesTable, createEffortTable, createLineLocator, createPolicy as createMetricPresentationPolicy, createMockClock, createParser, createProfileTable, createRpeLabelsTable, dailySessionLoads, dayBucket, dialectRegistry, dialectStack, diffStatement, documentToEffort, documentToEquipment, documentToTag, effortToDocument, equipmentToDocument, extractEffortData, extractMetrics, extractStatements, extractStatementsRaw, extractSyntaxFacts, findBestFuzzyMatch, findTagContributionCycles, findUnresolvedChoices, fixtureBackSquat, fixtureBurpee, fixturePlank, fixtureRowing, fixtureRunning, fixtureUserCustom, fixtureUserOverride, formatDuration, formatRuntimeLogLine, formatRuntimeLogRule, formatRuntimeTimestamp, metricsToLabel as fragmentsToLabel, fullFixtureSet, fuseUnits, fuseUnitsInMetrics, getAnalyticsFromLogs, getAnalyticsFromRuntime, getHints, getUnit, hasHint, hintMetric, hintsToContainer, inferDim, isCastSubscription, isChoiceResolved, isTimeLikeMetric, isWithinThreshold, levenshteinDistance, metricPresentation, mutateTimerSpans, normalizeForFuzzy, openSpan, outputNodeId, outputNodeIds, padRuntimeLogEvent, padRuntimeLogSubject, parseCalcLine, parseEffortFile, parseEquipmentFile, parseExpression, parseMetricLine, parseScript, printCalculation, readNestedSection, readTimer, realtimeProcessorRegistry, renderMetric, resolveDominantOrigin, resolveFusedEffortReferences, resolveSoundProfile, resolveTagContributions, snippetCompletions, startSpan, strategyRegistry, summaryProcessorRegistry, tagCategoryRecordToDocument, tagCategoryToDocument, tagContributionMetrics, tagMarkerSlug, tagMarkerSlugs, tagMarkerType, tagRecordToDocument, tagToDocument, toStoredOutputStatement, validateOutputUnit, parser as whiteboardParser, whiteboardScript, whiteboardScriptCompletion, whiteboardScriptCompletionSource, whiteboardScriptLanguage, whiteboardScriptSnippets, writeChoiceSelection };
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { wallClockNow, formatDurationSmart } from './chunk-PFQDVQQO.mjs';
2
2
  export { createBrowserRuntimeNow, frozenNow, getRuntimeNowMs, wallClockNow } from './chunk-PFQDVQQO.mjs';
3
- import { MetricType, MetricContainer, BlockKey, REFERENCE_METADATA_KEY, ParsedCodeStatement, getReferenceMetadata, TAG_REFERENCE_METADATA_KEY, OutputStatement, valueKindOf, normalizeFieldPath, getTagReference } from '@bitcobblers/wod-wiki-core';
3
+ import { MetricType, MetricContainer, BlockKey, REFERENCE_METADATA_KEY, ParsedCodeStatement, getReferenceMetadata, TAG_REFERENCE_METADATA_KEY, parseFrontmatter, getScalar, OutputStatement, valueKindOf, normalizeFieldPath, getTagReference } from '@bitcobblers/wod-wiki-core';
4
4
  import { LRParser } from '@lezer/lr';
5
5
  import { LRLanguage, LanguageSupport, syntaxTree } from '@codemirror/language';
6
6
  import { NodeProp } from '@lezer/common';
@@ -3696,38 +3696,6 @@ function quoteYaml(val) {
3696
3696
  }
3697
3697
  return val;
3698
3698
  }
3699
- function parseFrontmatter(raw) {
3700
- const match = raw.match(FRONTMATTER_RE);
3701
- if (!match) return { meta: {}, body: raw };
3702
- const lines = match[1].split(/\r?\n/);
3703
- const meta2 = {};
3704
- for (let i = 0; i < lines.length; i++) {
3705
- const keyMatch = lines[i].match(/^([A-Za-z][\w.-]*)\s*:(.*)$/);
3706
- if (!keyMatch) continue;
3707
- const key = keyMatch[1];
3708
- const rawVal = keyMatch[2].trim();
3709
- if (rawVal === "") {
3710
- const items = [];
3711
- while (i + 1 < lines.length) {
3712
- const itemMatch = lines[i + 1].match(/^\s+-\s+(.+)$/);
3713
- if (!itemMatch) break;
3714
- items.push(unquote(itemMatch[1].trim()));
3715
- i++;
3716
- }
3717
- meta2[key] = items.length > 0 ? items : "";
3718
- } else {
3719
- const wasQuoted = /^(['"])(.*)\1$/.test(rawVal);
3720
- const value = unquote(rawVal);
3721
- const num2 = Number(value);
3722
- meta2[key] = !wasQuoted && value !== "" && !isNaN(num2) ? num2 : value;
3723
- }
3724
- }
3725
- return { meta: meta2, body: raw.slice(match[0].length) };
3726
- }
3727
- function getScalar(meta2, key) {
3728
- const value = meta2[key];
3729
- return typeof value === "string" || typeof value === "number" ? value : void 0;
3730
- }
3731
3699
  function getListStrict(meta2, key) {
3732
3700
  const value = meta2[key];
3733
3701
  if (value === void 0) return [];
@@ -4142,6 +4110,7 @@ function documentToTag(doc, defaultCategory = "tag") {
4142
4110
  if (!label) errors.push("Missing required field: label");
4143
4111
  const metrics = {};
4144
4112
  const summaries = {};
4113
+ const widgets = {};
4145
4114
  const nestedMetrics = readNestedSection(innerLines, "metrics") ?? {};
4146
4115
  for (const [k, v] of Object.entries(nestedMetrics)) {
4147
4116
  if (typeof v === "number" || typeof v === "string") metrics[k] = v;
@@ -4150,6 +4119,10 @@ function documentToTag(doc, defaultCategory = "tag") {
4150
4119
  for (const [k, v] of Object.entries(nestedSummaries)) {
4151
4120
  if (typeof v === "number" || typeof v === "string") summaries[k] = String(v);
4152
4121
  }
4122
+ const nestedWidgets = readNestedSection(innerLines, "widgets") ?? {};
4123
+ for (const [k, v] of Object.entries(nestedWidgets)) {
4124
+ if (typeof v === "number" || typeof v === "string") widgets[k] = String(v);
4125
+ }
4153
4126
  for (const [k, v] of Object.entries(meta2)) {
4154
4127
  if (k.startsWith("metrics.")) {
4155
4128
  const sub = k.slice("metrics.".length).trim();
@@ -4157,6 +4130,9 @@ function documentToTag(doc, defaultCategory = "tag") {
4157
4130
  } else if (k.startsWith("summaries.")) {
4158
4131
  const sub = k.slice("summaries.".length).trim();
4159
4132
  if (sub && !Array.isArray(v)) summaries[sub] = String(v);
4133
+ } else if (k.startsWith("widgets.")) {
4134
+ const sub = k.slice("widgets.".length).trim();
4135
+ if (sub && !Array.isArray(v)) widgets[sub] = String(v);
4160
4136
  }
4161
4137
  }
4162
4138
  return {
@@ -4168,6 +4144,7 @@ function documentToTag(doc, defaultCategory = "tag") {
4168
4144
  aliases,
4169
4145
  metrics,
4170
4146
  summaries,
4147
+ ...Object.keys(widgets).length > 0 ? { widgets } : {},
4171
4148
  tags: tags2,
4172
4149
  functions,
4173
4150
  ...bodyText ? { body: bodyText } : {}
@@ -4208,6 +4185,9 @@ function tagToDocument(tag) {
4208
4185
  for (const [k, v] of Object.entries(tag.summaries)) {
4209
4186
  lines.push(`summaries.${k}: ${quoteYaml(v)}`);
4210
4187
  }
4188
+ for (const [k, v] of Object.entries(tag.widgets ?? {})) {
4189
+ lines.push(`widgets.${k}: ${quoteYaml(v)}`);
4190
+ }
4211
4191
  lines.push("---");
4212
4192
  if (tag.body) {
4213
4193
  lines.push("");
@@ -4236,6 +4216,9 @@ function tagCategoryToDocument(category) {
4236
4216
  for (const [k, v] of Object.entries(category.summaries ?? {})) {
4237
4217
  lines.push(`summaries.${k}: ${quoteYaml(v)}`);
4238
4218
  }
4219
+ for (const [k, v] of Object.entries(category.widgets ?? {})) {
4220
+ lines.push(`widgets.${k}: ${quoteYaml(v)}`);
4221
+ }
4239
4222
  lines.push("---");
4240
4223
  if (category.body) {
4241
4224
  lines.push("");
@@ -4250,6 +4233,62 @@ function tagCategoryToDocument(category) {
4250
4233
  }
4251
4234
  return lines.join("\n");
4252
4235
  }
4236
+ function tagRecordToDocument(tag, categoryFallback = "tag") {
4237
+ const metrics = {};
4238
+ const summaries = {};
4239
+ const widgets = {};
4240
+ const tags2 = [];
4241
+ const functions = [];
4242
+ for (const c of tag.contributions ?? []) {
4243
+ if (c.kind === "metric" && c.type.startsWith("summaries.")) {
4244
+ summaries[c.type.slice("summaries.".length)] = String(c.value);
4245
+ } else if (c.kind === "metric" && c.type.startsWith("widgets.")) {
4246
+ widgets[c.type.slice("widgets.".length)] = String(c.value);
4247
+ } else if (c.kind === "metric" && c.type) {
4248
+ metrics[c.type] = c.unit ? `${String(c.value)} ${c.unit}` : c.value === null || typeof c.value === "boolean" ? String(c.value ?? "") : c.value;
4249
+ } else if (c.kind === "tag" && c.slug) {
4250
+ tags2.push(c.slug);
4251
+ } else if (c.kind === "function" && c.name) {
4252
+ functions.push(c.name);
4253
+ }
4254
+ }
4255
+ return tagToDocument({
4256
+ id: tag.id,
4257
+ slug: tag.label,
4258
+ label: tag.label,
4259
+ category: tag.type || categoryFallback,
4260
+ aliases: [],
4261
+ metrics,
4262
+ summaries,
4263
+ ...Object.keys(widgets).length > 0 ? { widgets } : {},
4264
+ tags: tags2,
4265
+ functions
4266
+ });
4267
+ }
4268
+ function tagCategoryRecordToDocument(category, record) {
4269
+ const title = record?.label || category.replace(/[-_]+/g, " ").trim().replace(/\b\w/g, (c) => c.toUpperCase());
4270
+ const metrics = {};
4271
+ const summaries = {};
4272
+ const widgets = {};
4273
+ for (const c of record?.contributions ?? []) {
4274
+ if (c.kind === "metric" && c.type.startsWith("summaries.")) {
4275
+ summaries[c.type.slice("summaries.".length)] = String(c.value);
4276
+ } else if (c.kind === "metric" && c.type.startsWith("widgets.")) {
4277
+ widgets[c.type.slice("widgets.".length)] = String(c.value);
4278
+ } else if (c.kind === "metric" && c.type) {
4279
+ metrics[c.type] = c.unit ? `${String(c.value)} ${c.unit}` : typeof c.value === "number" ? c.value : String(c.value);
4280
+ }
4281
+ }
4282
+ return tagCategoryToDocument({
4283
+ id: record?.id ?? `tag-type-${category}`,
4284
+ name: category,
4285
+ label: title || category,
4286
+ color: record?.color,
4287
+ metrics,
4288
+ summaries,
4289
+ ...Object.keys(widgets).length > 0 ? { widgets } : {}
4290
+ });
4291
+ }
4253
4292
 
4254
4293
  // src/effort-registry/fuzzyMatch.ts
4255
4294
  function levenshteinDistance(a, b) {
@@ -9660,6 +9699,7 @@ var STATEMENT_OWNED_ORIGINS = {
9660
9699
  function extractPropertyRulesFromMeta(meta2, layer, sourceSlug) {
9661
9700
  const metrics = {};
9662
9701
  const summaries = {};
9702
+ const widgets = {};
9663
9703
  for (const [rawKey, rawValue] of Object.entries(meta2)) {
9664
9704
  const key = rawKey.trim();
9665
9705
  if (key.startsWith("metrics.")) {
@@ -9684,13 +9724,25 @@ function extractPropertyRulesFromMeta(meta2, layer, sourceSlug) {
9684
9724
  summaries[childKey.trim()] = String(childVal);
9685
9725
  }
9686
9726
  }
9727
+ } else if (key.startsWith("widgets.")) {
9728
+ const subKey = key.slice("widgets.".length).trim();
9729
+ if (subKey && (typeof rawValue === "string" || typeof rawValue === "number")) {
9730
+ widgets[subKey] = String(rawValue);
9731
+ }
9732
+ } else if (key === "widgets" && isPlainObject(rawValue)) {
9733
+ for (const [childKey, childVal] of Object.entries(rawValue)) {
9734
+ if (typeof childVal === "string" || typeof childVal === "number") {
9735
+ widgets[childKey.trim()] = String(childVal);
9736
+ }
9737
+ }
9687
9738
  }
9688
9739
  }
9689
9740
  return {
9690
9741
  layer,
9691
9742
  sourceSlug,
9692
9743
  metrics,
9693
- summaries
9744
+ summaries,
9745
+ ...Object.keys(widgets).length > 0 ? { widgets } : {}
9694
9746
  };
9695
9747
  }
9696
9748
  function isSupportedMetricValue(val) {
@@ -9709,13 +9761,16 @@ function extractTagPropertyRules(tags2, slugs) {
9709
9761
  if (resolved.metrics.length === 0) continue;
9710
9762
  const tagMetrics = {};
9711
9763
  const tagSummaries = {};
9764
+ const tagWidgets = {};
9712
9765
  const categoryMetrics = {};
9713
9766
  const categorySummaries = {};
9767
+ const categoryWidgets = {};
9714
9768
  for (const involvedSlug of resolved.tags) {
9715
9769
  const definition = tags2.resolve(involvedSlug);
9716
9770
  if (!definition) continue;
9717
9771
  const metrics = definition.isCategory ? categoryMetrics : tagMetrics;
9718
9772
  const summaries = definition.isCategory ? categorySummaries : tagSummaries;
9773
+ const widgets = definition.isCategory ? categoryWidgets : tagWidgets;
9719
9774
  for (const m of definition.contributions) {
9720
9775
  if (m.kind !== "metric") continue;
9721
9776
  const key = m.type.trim();
@@ -9725,16 +9780,33 @@ function extractTagPropertyRules(tags2, slugs) {
9725
9780
  if (subKey && !(subKey in summaries)) {
9726
9781
  summaries[subKey] = String(m.value);
9727
9782
  }
9783
+ } else if (key.startsWith("widgets.")) {
9784
+ const subKey = key.slice("widgets.".length).trim();
9785
+ if (subKey && !(subKey in widgets)) {
9786
+ widgets[subKey] = String(m.value);
9787
+ }
9728
9788
  } else if (!(key in metrics)) {
9729
9789
  metrics[key] = m.unit ? `${String(m.value)} ${m.unit}` : m.value === null || typeof m.value === "boolean" ? String(m.value) : m.value;
9730
9790
  }
9731
9791
  }
9732
9792
  }
9733
- if (Object.keys(tagMetrics).length > 0 || Object.keys(tagSummaries).length > 0) {
9734
- rules.push({ layer: "tag", sourceSlug: slug, metrics: tagMetrics, summaries: tagSummaries });
9793
+ if (Object.keys(tagMetrics).length > 0 || Object.keys(tagSummaries).length > 0 || Object.keys(tagWidgets).length > 0) {
9794
+ rules.push({
9795
+ layer: "tag",
9796
+ sourceSlug: slug,
9797
+ metrics: tagMetrics,
9798
+ summaries: tagSummaries,
9799
+ ...Object.keys(tagWidgets).length > 0 ? { widgets: tagWidgets } : {}
9800
+ });
9735
9801
  }
9736
- if (Object.keys(categoryMetrics).length > 0 || Object.keys(categorySummaries).length > 0) {
9737
- rules.push({ layer: "category", sourceSlug: slug, metrics: categoryMetrics, summaries: categorySummaries });
9802
+ if (Object.keys(categoryMetrics).length > 0 || Object.keys(categorySummaries).length > 0 || Object.keys(categoryWidgets).length > 0) {
9803
+ rules.push({
9804
+ layer: "category",
9805
+ sourceSlug: slug,
9806
+ metrics: categoryMetrics,
9807
+ summaries: categorySummaries,
9808
+ ...Object.keys(categoryWidgets).length > 0 ? { widgets: categoryWidgets } : {}
9809
+ });
9738
9810
  }
9739
9811
  }
9740
9812
  return rules;
@@ -9796,6 +9868,9 @@ function compilePropertySummaryCalcsWithDiagnostics(sources) {
9796
9868
  try {
9797
9869
  const compiled = compileLineForm(line, { scope: "workout" });
9798
9870
  for (const def of compiled.defs) {
9871
+ const groupedMatch = expr2.match(/^\s*grouped\s*\(\s*([A-Za-z_][\w.]*)\s*,/);
9872
+ const isGrouped = Boolean(def.output?.isGrouped || groupedMatch);
9873
+ const groupBy = def.output?.groupBy ?? (groupedMatch ? [groupedMatch[1]] : void 0);
9799
9874
  defs.push({
9800
9875
  ...def,
9801
9876
  customAtoms,
@@ -9804,7 +9879,7 @@ function compilePropertySummaryCalcsWithDiagnostics(sources) {
9804
9879
  key: def.output?.key ?? key,
9805
9880
  emitType: def.output?.emitType ?? key,
9806
9881
  unit: def.output?.unit ?? "auto",
9807
- ...def.output?.isGrouped ? { isGrouped: true, groupBy: def.output.groupBy } : {},
9882
+ ...isGrouped ? { isGrouped: true, ...groupBy ? { groupBy } : {} } : {},
9808
9883
  ...def.output?.label ? { label: def.output.label } : {}
9809
9884
  }
9810
9885
  });
@@ -9814,6 +9889,87 @@ function compilePropertySummaryCalcsWithDiagnostics(sources) {
9814
9889
  }
9815
9890
  return { defs, diagnostics };
9816
9891
  }
9892
+ function parseWidgetSpecValue(key, rawSpec) {
9893
+ const trimmed = rawSpec.trim();
9894
+ const title = key.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[-_]+/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
9895
+ const prefixMatch = trimmed.match(/^([a-z][a-z0-9-]*)\s*\|\s*([\s\S]+)$/i);
9896
+ if (prefixMatch) {
9897
+ return {
9898
+ type: prefixMatch[1].toLowerCase(),
9899
+ wql: prefixMatch[2].trim(),
9900
+ title
9901
+ };
9902
+ }
9903
+ const sinkMatch = trimmed.match(/\|\s*:([a-z][a-z0-9-]*)\s*\{[^}]*\}\s*$/i);
9904
+ return {
9905
+ type: sinkMatch ? sinkMatch[1].toLowerCase() : "timeseries",
9906
+ wql: trimmed,
9907
+ title
9908
+ };
9909
+ }
9910
+ function resolvePropertyDashboardWidgets(sources, options = {}) {
9911
+ const ordered = [...sources].sort(
9912
+ (a, b) => SUMMARY_LAYER_PRECEDENCE[b.layer] - SUMMARY_LAYER_PRECEDENCE[a.layer]
9913
+ );
9914
+ const filterClause = options.scopeFilter?.trim() ?? "$scope";
9915
+ const includeSummaries = options.includeSummaries ?? true;
9916
+ const out = [];
9917
+ const seenKeys = /* @__PURE__ */ new Set();
9918
+ for (const source of ordered) {
9919
+ if (!source.widgets) continue;
9920
+ for (const [rawKey, rawSpec] of Object.entries(source.widgets)) {
9921
+ const key = rawKey.trim();
9922
+ if (!key || !rawSpec.trim() || seenKeys.has(`widget:${key}`)) continue;
9923
+ seenKeys.add(`widget:${key}`);
9924
+ const parsed = parseWidgetSpecValue(key, rawSpec);
9925
+ const resolvedWql = filterClause ? parsed.wql.replace(/\$scope\b/g, filterClause) : parsed.wql;
9926
+ out.push({
9927
+ key: `widget:${key}`,
9928
+ title: parsed.title,
9929
+ type: parsed.type,
9930
+ wql: resolvedWql,
9931
+ sourceLayer: source.layer,
9932
+ sourceSlug: source.sourceSlug,
9933
+ origin: "widget"
9934
+ });
9935
+ }
9936
+ }
9937
+ if (includeSummaries) {
9938
+ const chosenSummarySource = /* @__PURE__ */ new Map();
9939
+ for (const source of ordered) {
9940
+ if (!source.summaries) continue;
9941
+ for (const [rawKey, rawExpr] of Object.entries(source.summaries)) {
9942
+ const key = rawKey.trim();
9943
+ if (!key || !rawExpr.trim() || chosenSummarySource.has(key)) continue;
9944
+ chosenSummarySource.set(key, source);
9945
+ }
9946
+ }
9947
+ const compiled = compilePropertySummaryCalcs(sources);
9948
+ for (const def of compiled) {
9949
+ const metricKey = def.output?.key ?? def.id;
9950
+ if (!metricKey || seenKeys.has(`summary:${metricKey}`) || seenKeys.has(`widget:${metricKey}`)) continue;
9951
+ seenKeys.add(`summary:${metricKey}`);
9952
+ const source = chosenSummarySource.get(metricKey) ?? ordered[0];
9953
+ if (!source) continue;
9954
+ const isGrouped = Boolean(def.output?.isGrouped);
9955
+ const groupDim = def.output?.groupBy?.[0] ?? "effort";
9956
+ const label = def.output?.label ?? metricKey.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[-_]+/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
9957
+ const braces = filterClause ? `{${filterClause}}` : "{}";
9958
+ const wql = isGrouped ? `sum:${metricKey}${braces} by {${groupDim}}` : `sum:${metricKey}${braces} by {week}`;
9959
+ out.push({
9960
+ key: `summary:${metricKey}`,
9961
+ title: label,
9962
+ type: isGrouped ? "bar" : "timeseries",
9963
+ wql,
9964
+ sourceLayer: source.layer,
9965
+ sourceSlug: source.sourceSlug,
9966
+ origin: "summary",
9967
+ metricKey
9968
+ });
9969
+ }
9970
+ }
9971
+ return out;
9972
+ }
9817
9973
  function collectRequiredRefs(node, into = /* @__PURE__ */ new Set()) {
9818
9974
  if (!node) return into;
9819
9975
  switch (node.kind) {
@@ -15963,6 +16119,6 @@ function compareStatement(expectations, actual, mode) {
15963
16119
  return diffs;
15964
16120
  }
15965
16121
 
15966
- export { ABSENT, AGGREGATE_BUILTINS, AUTHORITATIVE_CASTS, AbortSessionAction, AmrapLogicStrategy, AnalyticsEngine, AnalyticsTransformer, BUILTIN_CALCS, BUNDLED_EFFORT_COUNT, BehaviorContext, BlockBuilder, BlockContext, ButtonBehavior, COMPLETION_PROPERTY_KEYS, CONSUMED_HINTS, CONSUMED_HINT_KEYS, CONTEXT_ATOMS, CalcEngine, CalcEvalError, CalcParseError, CalcRegistrationError, CalcUnitError, CalculationRegistry, CardioDialect, ChildSelectionBehavior, ChildrenStrategy, ChoiceGroupMetric, ClearChildrenAction, ClimbDialect, ClimbMetricType, CompileAndPushBlockAction, CompletionTimestampBehavior, CompositeEffortRegistry, CompositeEquipmentRegistry, CompositePropertyRegistry, CountdownTimerBehavior, CountupTimerBehavior, CrossFitDialect, DAY, DEFAULT_RESOLVER_OPTIONS, DEFAULT_RUNTIME_OPTIONS, DEFAULT_SOUND_PROFILE, 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, EffortFallbackStrategy, EffortResolver, EmitEventAction, EmitSystemOutputAction, ErrorAction, EventBus, ExecutionContext, ExitBehavior, FixtureSyntaxError, GenericGroupStrategy, GenericLoopStrategy, GenericTimerStrategy, HabitsDialect, INTENSITY_TIERS, InMemoryEffortRegistry, IntervalLogicStrategy, JitCompiler, LabelingBehavior, LocalEventProvider, LocalRuntimeSubscription, LookupRegistry, MAX_TAG_CONTRIBUTION_DEPTH, MdTimerRuntime, MemoryLocation, MemoryTypeEnum, MetricPromotionBehavior, NAMED_COMPOUNDS, NextAction, NextEvent, NextEventHandler, OutputEmitter, PRODUCTION_STRATEGIES, PROPERTY_KEY_TO_METRIC_TYPE, PopBlockAction, PushBlockAction, PushRestBlockAction, REFERENCE_PAIR_KEYS, REST_EXCLUSION, RPE_LABELS, RUNTIME_LOG_SUBJECT_WIDTH, RegisterEventHandlerAction, Registry, ReportOutputBehavior, ReportOutputStrategy, RestBlock, RoundsMetric, RuntimeAdapter, RuntimeBlock, RuntimeBuilder, RuntimeClock, RuntimeFactory, RuntimeLogger, RuntimeMemory, RuntimeObservers, RuntimeStack, SEED_PRECEDENCE_RANK, SOUND_PLAY_EVENT, SOUND_PROFILE_METRIC, STANDARD_UNITS, STORE_CALCS, STREAM_ATOMS, STRUCTURAL_EFFORT_WORDS, ScriptRuntime, SessionRootBlock, SessionRootStrategy, SnapshotClock, SoundProfileBehavior, SoundStrategy, SpanTrackingBehavior, StandardAnalyticsProfile, StartSessionAction, StartWorkoutAction, SubscriptionManager, TAG_MARKER_PREFIX, ThrowError, ThrowErrorAction, TimeSpan, TwoPassEffortResolutionProcess, TypedMemoryReference, UNITS, UnitRegistry, UnitSet, UnitsDialect, UnregisterEventHandlerAction, UpdateNextPreviewAction, VISIBILITY_ICONS, VISIBILITY_LABELS, WaitingToStartBlock, WaitingToStartInjectorBehavior, WhiteboardScript, WodDialect, YogaDialect, addAliasToEffort, addDim, applyTemplateDefaults, buildStaticLookups, buildTooltip, bundledEfforts, calculateElapsed, canonicalizeType, checkCalcLine, classifyStatements, closeCurrentSpan, collapseUnresolvedChoices, commonFixtureSet, compareStatement, compileLineForm, compilePropertySummaryCalcs, compilePropertySummaryCalcsWithDiagnostics, composeDivUnit, composeMulUnit, compoundName, computeColumnLabel, computeLabel, computeWorkloadRollups, convertScalar, createAnalyticsEngineForBlock, createCalcEngine, createCalcStack, createCompiler, createDialectStack, createDisciplinesTable, createEffortTable, createLineLocator, createPolicy as createMetricPresentationPolicy, createMockClock, createParser, createProfileTable, createReferenceIndex, createRpeLabelsTable, dailySessionLoads, dayBucket, dedupeEntitiesByPrecedence, dialectRegistry, dialectStack, diffStatement, dimEquals, disciplineFactorFor, documentToEffort, documentToEquipment, documentToTag, effortToDocument, equipmentToDocument, evaluate, extractEffortData, extractMetrics, extractPropertyRulesFromMeta, extractStatementRefs, extractStatements, extractStatementsRaw, extractSyntaxFacts, extractTagPropertyRules, filterTagsByVisibility, findBestFuzzyMatch, findTagContributionCycles, findUnresolvedChoices, fixtureBackSquat, fixtureBurpee, fixturePlank, fixtureRowing, fixtureRunning, fixtureUserCustom, fixtureUserOverride, formatDim, formatDuration, formatRuntimeLogLine, formatRuntimeLogRule, formatRuntimeTimestamp, formatSoundTrigger, 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, padRuntimeLogEvent, padRuntimeLogSubject, parseCalcLine, parseEffortFile, parseEquipmentFile, parseExpression, parseMetricLine, parseScript, parseSoundTrigger, printCalculation, readNestedSection, readTimer, realtimeProcessorRegistry, renderMetric, resolveDominantOrigin, resolveEntityRank, resolveEntityTier, resolveFusedEffortReferences, resolveProfileRules, resolveSoundProfile, resolveSourceRank, resolveSourceTier, resolveTagContributions, runMetricShakeOutQueue, slugifyRefLabel, snippetCompletions, startSpan, str, strategyRegistry, subDim, summaryProcessorRegistry, tagCategoryToDocument, tagContributionMetrics, tagMarkerSlug, tagMarkerSlugs, tagMarkerType, tagToDocument, toStoredOutputStatement, truthy, validateOutputUnit, parser as whiteboardParser, whiteboardScript, whiteboardScriptCompletion, whiteboardScriptCompletionSource, whiteboardScriptLanguage, whiteboardScriptSnippets, writeChoiceSelection };
16122
+ export { ABSENT, AGGREGATE_BUILTINS, AUTHORITATIVE_CASTS, AbortSessionAction, AmrapLogicStrategy, AnalyticsEngine, AnalyticsTransformer, BUILTIN_CALCS, BUNDLED_EFFORT_COUNT, BehaviorContext, BlockBuilder, BlockContext, ButtonBehavior, COMPLETION_PROPERTY_KEYS, CONSUMED_HINTS, CONSUMED_HINT_KEYS, CONTEXT_ATOMS, CalcEngine, CalcEvalError, CalcParseError, CalcRegistrationError, CalcUnitError, CalculationRegistry, CardioDialect, ChildSelectionBehavior, ChildrenStrategy, ChoiceGroupMetric, ClearChildrenAction, ClimbDialect, ClimbMetricType, CompileAndPushBlockAction, CompletionTimestampBehavior, CompositeEffortRegistry, CompositeEquipmentRegistry, CompositePropertyRegistry, CountdownTimerBehavior, CountupTimerBehavior, CrossFitDialect, DAY, DEFAULT_RESOLVER_OPTIONS, DEFAULT_RUNTIME_OPTIONS, DEFAULT_SOUND_PROFILE, 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, EffortFallbackStrategy, EffortResolver, EmitEventAction, EmitSystemOutputAction, ErrorAction, EventBus, ExecutionContext, ExitBehavior, FixtureSyntaxError, GenericGroupStrategy, GenericLoopStrategy, GenericTimerStrategy, HabitsDialect, INTENSITY_TIERS, InMemoryEffortRegistry, IntervalLogicStrategy, JitCompiler, LabelingBehavior, LocalEventProvider, LocalRuntimeSubscription, LookupRegistry, MAX_TAG_CONTRIBUTION_DEPTH, MdTimerRuntime, MemoryLocation, MemoryTypeEnum, MetricPromotionBehavior, NAMED_COMPOUNDS, NextAction, NextEvent, NextEventHandler, OutputEmitter, PRODUCTION_STRATEGIES, PROPERTY_KEY_TO_METRIC_TYPE, PopBlockAction, PushBlockAction, PushRestBlockAction, REFERENCE_PAIR_KEYS, REST_EXCLUSION, RPE_LABELS, RUNTIME_LOG_SUBJECT_WIDTH, RegisterEventHandlerAction, Registry, ReportOutputBehavior, ReportOutputStrategy, RestBlock, RoundsMetric, RuntimeAdapter, RuntimeBlock, RuntimeBuilder, RuntimeClock, RuntimeFactory, RuntimeLogger, RuntimeMemory, RuntimeObservers, RuntimeStack, SEED_PRECEDENCE_RANK, SOUND_PLAY_EVENT, SOUND_PROFILE_METRIC, STANDARD_UNITS, STORE_CALCS, STREAM_ATOMS, STRUCTURAL_EFFORT_WORDS, ScriptRuntime, SessionRootBlock, SessionRootStrategy, SnapshotClock, SoundProfileBehavior, SoundStrategy, SpanTrackingBehavior, StandardAnalyticsProfile, StartSessionAction, StartWorkoutAction, SubscriptionManager, TAG_MARKER_PREFIX, ThrowError, ThrowErrorAction, TimeSpan, TwoPassEffortResolutionProcess, TypedMemoryReference, UNITS, UnitRegistry, UnitSet, UnitsDialect, UnregisterEventHandlerAction, UpdateNextPreviewAction, VISIBILITY_ICONS, VISIBILITY_LABELS, WaitingToStartBlock, WaitingToStartInjectorBehavior, WhiteboardScript, WodDialect, YogaDialect, addAliasToEffort, addDim, applyTemplateDefaults, buildStaticLookups, buildTooltip, bundledEfforts, calculateElapsed, canonicalizeType, checkCalcLine, classifyStatements, closeCurrentSpan, collapseUnresolvedChoices, commonFixtureSet, compareStatement, compileLineForm, compilePropertySummaryCalcs, compilePropertySummaryCalcsWithDiagnostics, composeDivUnit, composeMulUnit, compoundName, computeColumnLabel, computeLabel, computeWorkloadRollups, convertScalar, createAnalyticsEngineForBlock, createCalcEngine, createCalcStack, createCompiler, createDialectStack, createDisciplinesTable, createEffortTable, createLineLocator, createPolicy as createMetricPresentationPolicy, createMockClock, createParser, createProfileTable, createReferenceIndex, createRpeLabelsTable, dailySessionLoads, dayBucket, dedupeEntitiesByPrecedence, dialectRegistry, dialectStack, diffStatement, dimEquals, disciplineFactorFor, documentToEffort, documentToEquipment, documentToTag, effortToDocument, equipmentToDocument, evaluate, extractEffortData, extractMetrics, extractPropertyRulesFromMeta, extractStatementRefs, extractStatements, extractStatementsRaw, extractSyntaxFacts, extractTagPropertyRules, filterTagsByVisibility, findBestFuzzyMatch, findTagContributionCycles, findUnresolvedChoices, fixtureBackSquat, fixtureBurpee, fixturePlank, fixtureRowing, fixtureRunning, fixtureUserCustom, fixtureUserOverride, formatDim, formatDuration, formatRuntimeLogLine, formatRuntimeLogRule, formatRuntimeTimestamp, formatSoundTrigger, 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, padRuntimeLogEvent, padRuntimeLogSubject, parseCalcLine, parseEffortFile, parseEquipmentFile, parseExpression, parseMetricLine, parseScript, parseSoundTrigger, printCalculation, readNestedSection, readTimer, realtimeProcessorRegistry, renderMetric, resolveDominantOrigin, resolveEntityRank, resolveEntityTier, resolveFusedEffortReferences, resolveProfileRules, resolvePropertyDashboardWidgets, resolveSoundProfile, resolveSourceRank, resolveSourceTier, resolveTagContributions, runMetricShakeOutQueue, slugifyRefLabel, snippetCompletions, startSpan, str, strategyRegistry, subDim, summaryProcessorRegistry, tagCategoryRecordToDocument, tagCategoryToDocument, tagContributionMetrics, tagMarkerSlug, tagMarkerSlugs, tagMarkerType, tagRecordToDocument, tagToDocument, toStoredOutputStatement, truthy, validateOutputUnit, parser as whiteboardParser, whiteboardScript, whiteboardScriptCompletion, whiteboardScriptCompletionSource, whiteboardScriptLanguage, whiteboardScriptSnippets, writeChoiceSelection };
15967
16123
  //# sourceMappingURL=index.mjs.map
15968
16124
  //# sourceMappingURL=index.mjs.map