@bitcobblers/wod-wiki-lang 0.1.5 → 0.1.6
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.cjs +351 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +156 -7
- package/dist/index.d.ts +156 -7
- package/dist/index.mjs +351 -7
- package/dist/index.mjs.map +1 -1
- package/dist/react.cjs +8 -0
- package/dist/react.cjs.map +1 -1
- package/dist/react.mjs +8 -0
- package/dist/react.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -3005,6 +3005,155 @@ declare const PRODUCTION_STRATEGIES: readonly IRuntimeBlockStrategy[];
|
|
|
3005
3005
|
*/
|
|
3006
3006
|
declare function createCompiler(strategies?: IRuntimeBlockStrategy[]): JitCompiler;
|
|
3007
3007
|
|
|
3008
|
+
type ExecutionStatus = 'idle' | 'executing' | 'paused' | 'completed' | 'error';
|
|
3009
|
+
type BlockType = 'workout' | 'group' | 'timer' | 'rounds' | 'effort' | 'exercise' | 'custom';
|
|
3010
|
+
type BlockStatus = 'pending' | 'active' | 'running' | 'complete' | 'error';
|
|
3011
|
+
type MemoryType = 'metric' | 'timer-state' | 'loop-state' | 'group-state' | 'handler' | 'span' | 'unknown';
|
|
3012
|
+
type MemoryGrouping = 'owner' | 'type' | 'none';
|
|
3013
|
+
interface MetricValue {
|
|
3014
|
+
value: any;
|
|
3015
|
+
unit?: string;
|
|
3016
|
+
formatted: string;
|
|
3017
|
+
}
|
|
3018
|
+
/**
|
|
3019
|
+
* Benchmarking metrics for runtime operations.
|
|
3020
|
+
*/
|
|
3021
|
+
interface BenchmarkMetrics {
|
|
3022
|
+
snapshotCreationTime: number;
|
|
3023
|
+
renderTime: number;
|
|
3024
|
+
memoryUsage?: number;
|
|
3025
|
+
frameRate?: number;
|
|
3026
|
+
}
|
|
3027
|
+
/**
|
|
3028
|
+
* UI-friendly representation of IRuntimeBlock
|
|
3029
|
+
*/
|
|
3030
|
+
interface RuntimeStackBlock {
|
|
3031
|
+
key: string;
|
|
3032
|
+
blockType: BlockType;
|
|
3033
|
+
parentKey?: string;
|
|
3034
|
+
children: string[];
|
|
3035
|
+
depth: number;
|
|
3036
|
+
label: string;
|
|
3037
|
+
color: string;
|
|
3038
|
+
icon?: string;
|
|
3039
|
+
isActive: boolean;
|
|
3040
|
+
isComplete: boolean;
|
|
3041
|
+
status: BlockStatus;
|
|
3042
|
+
metric: Record<string, MetricValue>;
|
|
3043
|
+
metrics?: MetricContainer;
|
|
3044
|
+
metricGroups?: MetricContainer[];
|
|
3045
|
+
sourceIds: number[];
|
|
3046
|
+
lineNumber?: number;
|
|
3047
|
+
metadata?: {
|
|
3048
|
+
mountTime?: number;
|
|
3049
|
+
executionTime?: number;
|
|
3050
|
+
iterationCount?: number;
|
|
3051
|
+
};
|
|
3052
|
+
}
|
|
3053
|
+
/**
|
|
3054
|
+
* UI-friendly representation of memory allocation
|
|
3055
|
+
*/
|
|
3056
|
+
interface MemoryEntry {
|
|
3057
|
+
id: string;
|
|
3058
|
+
ownerId: string;
|
|
3059
|
+
ownerLabel?: string;
|
|
3060
|
+
type: MemoryType;
|
|
3061
|
+
value: any;
|
|
3062
|
+
valueFormatted: string;
|
|
3063
|
+
label: string;
|
|
3064
|
+
groupLabel?: string;
|
|
3065
|
+
icon?: string;
|
|
3066
|
+
lineNumber?: number;
|
|
3067
|
+
isValid: boolean;
|
|
3068
|
+
isHighlighted: boolean;
|
|
3069
|
+
metadata?: {
|
|
3070
|
+
createdAt?: number;
|
|
3071
|
+
lastModified?: number;
|
|
3072
|
+
accessCount?: number;
|
|
3073
|
+
};
|
|
3074
|
+
references?: string[];
|
|
3075
|
+
referencedBy?: string[];
|
|
3076
|
+
}
|
|
3077
|
+
/**
|
|
3078
|
+
* Immutable snapshot of runtime state for UI rendering
|
|
3079
|
+
*/
|
|
3080
|
+
interface ExecutionSnapshot {
|
|
3081
|
+
stack: {
|
|
3082
|
+
blocks: RuntimeStackBlock[];
|
|
3083
|
+
activeIndex: number;
|
|
3084
|
+
depth: number;
|
|
3085
|
+
rootBlockKey?: string;
|
|
3086
|
+
};
|
|
3087
|
+
memory: {
|
|
3088
|
+
entries: MemoryEntry[];
|
|
3089
|
+
groupedByOwner: Map<string, MemoryEntry[]>;
|
|
3090
|
+
groupedByType: Map<string, MemoryEntry[]>;
|
|
3091
|
+
totalEntries: number;
|
|
3092
|
+
};
|
|
3093
|
+
status: ExecutionStatus;
|
|
3094
|
+
metadata: {
|
|
3095
|
+
stepCount: number;
|
|
3096
|
+
elapsedTime: number;
|
|
3097
|
+
lastEvent?: string;
|
|
3098
|
+
lastEventTime?: number;
|
|
3099
|
+
benchmarkMetrics?: BenchmarkMetrics;
|
|
3100
|
+
};
|
|
3101
|
+
timestamp: number;
|
|
3102
|
+
}
|
|
3103
|
+
/**
|
|
3104
|
+
* Converts ScriptRuntime state to ExecutionSnapshot
|
|
3105
|
+
*/
|
|
3106
|
+
interface IRuntimeAdapter {
|
|
3107
|
+
createSnapshot(runtime: any): ExecutionSnapshot;
|
|
3108
|
+
extractStackBlocks(runtime: any): RuntimeStackBlock[];
|
|
3109
|
+
extractMemoryEntries(runtime: any): MemoryEntry[];
|
|
3110
|
+
groupMemoryEntries(entries: MemoryEntry[], groupBy: MemoryGrouping): Map<string, MemoryEntry[]>;
|
|
3111
|
+
}
|
|
3112
|
+
|
|
3113
|
+
/**
|
|
3114
|
+
* Adapter that converts ScriptRuntime state to UI-friendly ExecutionSnapshot
|
|
3115
|
+
*/
|
|
3116
|
+
declare class RuntimeAdapter implements IRuntimeAdapter {
|
|
3117
|
+
/**
|
|
3118
|
+
* Creates immutable snapshot of runtime state for UI rendering
|
|
3119
|
+
*/
|
|
3120
|
+
createSnapshot(runtime: IScriptRuntime): ExecutionSnapshot;
|
|
3121
|
+
/**
|
|
3122
|
+
* Extracts RuntimeStackBlocks from runtime stack
|
|
3123
|
+
*/
|
|
3124
|
+
extractStackBlocks(runtime: IScriptRuntime): RuntimeStackBlock[];
|
|
3125
|
+
/**
|
|
3126
|
+
* Extracts metrics from block's source statements for unified visualization
|
|
3127
|
+
*/
|
|
3128
|
+
private extractBlockFragments;
|
|
3129
|
+
/**
|
|
3130
|
+
* Extracts MemoryEntries from runtime memory
|
|
3131
|
+
*/
|
|
3132
|
+
extractMemoryEntries(runtime: IScriptRuntime): MemoryEntry[];
|
|
3133
|
+
/**
|
|
3134
|
+
* Generates a label for a memory entry from its type
|
|
3135
|
+
*/
|
|
3136
|
+
private generateMemoryLabelFromType;
|
|
3137
|
+
/**
|
|
3138
|
+
* Groups memory entries by specified grouping strategy
|
|
3139
|
+
*/
|
|
3140
|
+
groupMemoryEntries(entries: MemoryEntry[], groupBy: MemoryGrouping): Map<string, MemoryEntry[]>;
|
|
3141
|
+
private determineExecutionStatus;
|
|
3142
|
+
private mapBlockType;
|
|
3143
|
+
private determineBlockStatus;
|
|
3144
|
+
private findParentKey;
|
|
3145
|
+
private findChildrenKeys;
|
|
3146
|
+
private generateBlockLabel;
|
|
3147
|
+
private getBlockColor;
|
|
3148
|
+
private getBlockIcon;
|
|
3149
|
+
private mapMemoryType;
|
|
3150
|
+
private generateOwnerLabel;
|
|
3151
|
+
private formatValue;
|
|
3152
|
+
private generateMemoryLabel;
|
|
3153
|
+
private generateGroupLabel;
|
|
3154
|
+
private getMemoryIcon;
|
|
3155
|
+
}
|
|
3156
|
+
|
|
3008
3157
|
/**
|
|
3009
3158
|
* AST for the composed-calculation expression language (spec §2).
|
|
3010
3159
|
*
|
|
@@ -4077,13 +4226,13 @@ declare function toStoredOutputStatement(output: IOutputStatement | OutputStatem
|
|
|
4077
4226
|
* Auto-generated build version metadata.
|
|
4078
4227
|
* Do not edit directly; updated by scripts/stamp-version.ts
|
|
4079
4228
|
*/
|
|
4080
|
-
declare const VERSION = "0.1.
|
|
4081
|
-
declare const GIT_SHA = "
|
|
4082
|
-
declare const BUILD_TIME = "2026-08-18T18:
|
|
4229
|
+
declare const VERSION = "0.1.6";
|
|
4230
|
+
declare const GIT_SHA = "9c5467d";
|
|
4231
|
+
declare const BUILD_TIME = "2026-08-18T18:12:54.408Z";
|
|
4083
4232
|
declare const SEMVER: {
|
|
4084
|
-
readonly version: "0.1.
|
|
4085
|
-
readonly gitSha: "
|
|
4086
|
-
readonly buildTime: "2026-08-18T18:
|
|
4233
|
+
readonly version: "0.1.6";
|
|
4234
|
+
readonly gitSha: "9c5467d";
|
|
4235
|
+
readonly buildTime: "2026-08-18T18:12:54.408Z";
|
|
4087
4236
|
};
|
|
4088
4237
|
|
|
4089
|
-
export { AbortSessionAction, type ActionDescriptor, type ActionPrimitive, AnalyticsContext, AnalyticsEngine, type AnalyticsProfileContext, type AnalyticsResult, AnalyticsTransformer, BUILD_TIME, BUILTIN_CALCS, BUNDLED_EFFORT_COUNT, BehaviorContext, BlockContext, BlockLifecycleOptions, CONSUMED_HINTS, CONSUMED_HINT_KEYS, type CalculationDefinition$1 as CalcDefinition, CalcEngine, type CalcOrigin, type CalcScope, type CalculationDefinition as CalculateBlockDefinition, type CalculateBlockParseError, type CalculateBlockParseResult, CalculateBlockProcessor, CalculationRegistry, CardioDialect, ClearChildrenAction, ClimbDialect, type ClimbGradeMetricValue, type ClimbGradeSystem, ClimbMetricType, CompileAndPushBlockAction, CompletionDecision, type CreateAnalyticsEngineOptions, type CreateAnalyticsEngineResult, CrossFitDialect, DAY, DEFAULT_UNRESOLVED_EFFORT_MET, DIM_LENGTH, DIM_MASS, DIM_TIME, DIM_ZERO, type DayRollup, DialectStack, type Dimension, type DurationPrimitive, EFFORT_DATA_METRIC_TYPE, EffortBlock, type EffortBlockConfig, type EffortPrimitive, EffortRegistrySource, EffortResolutionOptions, EffortResolver, EffortResolverOptions, EmitEventAction, EmitSystemOutputAction, ErrorAction, EventBus, type EventHandlerRegistration, ExecutionContext, type FuzzyCandidate, GIT_SHA, HabitsDialect, type HeadingPrimitive, IAnalyticsEngine, type IAnalyticsProfile, IBlockContext, IEffort, IEffortRegistry, IEffortResolver, IEvent, IEventBus, IJitCompiler, type ILookupTable, IMemoryLocation, IMemoryReference, type IMetricPresentationPolicy, INowProvider, IRealtimeProcessor, IRuntimeAction, IRuntimeBehavior, IRuntimeBlock, type IRuntimeBlockStrategy, IRuntimeClock, type IRuntimeFactory, IRuntimeStack, IScript, IScriptRuntime, ISummaryProcessor, InMemoryEffortRegistry, JitCompiler, type LapPrimitive, type LineLocator, type LogLevel, LookupRegistry, MdTimerRuntime, MemoryTag, MemoryTypeEnum, type MetricObjectPrimitive, type MetricPresentationSurface, type MetricPresentationToken, type MetricRenderKind, type MetricTone, MetricVisibility, type MockClock, NextAction, NextEvent, NextEventHandler, OutputEmitter, PREDEFINED_SOUNDS, PRODUCTION_STRATEGIES, type ParseOptions, PlaySoundAction, PopBlockAction, type PredefinedSoundName, ProjectionResult, type PropertyPrimitive, PushBlockAction, PushRestBlockAction, type QuantityPrimitive, RegisterEventHandlerAction, Registry, ResolvedEffort, type ResolvedEffortData, RestBlock, type RestBlockConfig, type RoundsPrimitive, 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, 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 SyntaxFacts, type SyntaxMeta, type SyntaxPrimitive, type SyntaxStatement, type TextPrimitive, ThrowError, ThrowErrorAction, TimeSpan, TimerState, TwoPassEffortResolutionProcess, TypedMemoryReference, type UnitDef$1 as UnitDef, type UnitMatch, UnitRegistry, UnitSet, UnitsDialect, UnregisterEventHandlerAction, Unsubscribe, UpdateNextPreviewAction, VERSION, WaitingToStartBlock, WhiteboardScript, WodDialect, YogaDialect, buildTooltip, bundledEfforts, index as calc, calculateElapsed, classifyStatements, closeCurrentSpan, commonFixtureSet, computeColumnLabel, computeLabel, computeWorkloadRollups, createAnalyticsEngineForBlock, createCalcEngine, createCompiler, createDialectStack, createLineLocator, createPolicy as createMetricPresentationPolicy, createMockClock, createParser, dailySessionLoads, dayBucket, dialectRegistry, dialectStack, evaluate, evaluateCalculateDefinitions, extractEffortData, extractMetrics, extractStatements, extractStatementsRaw, extractSyntaxFacts, findBestFuzzyMatch, fixtureBackSquat, fixtureBurpee, fixturePlank, fixtureRowing, fixtureRunning, fixtureUserCustom, fixtureUserOverride, formatDuration, metricsToLabel as fragmentsToLabel, fullFixtureSet, fuseUnits, fuseUnitsInMetrics, getAnalyticsFromLogs, getAnalyticsFromRuntime, getHints, hasHint, hintMetric, hintsToContainer, isTimeLikeMetric, isWithinThreshold, levenshteinDistance, metricPresentation, mutateTimerSpans, normalizeForFuzzy, openSpan, parseCalcLine, parseCalculateBlock, parseExpression, parseScript, readTimer, realtimeProcessorRegistry, resolveDominantOrigin, sharedParser, startSpan, strategyRegistry, summaryProcessorRegistry, toStoredOutputStatement, parser as whiteboardParser, whiteboardScript, whiteboardScriptLanguage };
|
|
4238
|
+
export { AbortSessionAction, type ActionDescriptor, type ActionPrimitive, AnalyticsContext, AnalyticsEngine, type AnalyticsProfileContext, type AnalyticsResult, AnalyticsTransformer, BUILD_TIME, BUILTIN_CALCS, BUNDLED_EFFORT_COUNT, BehaviorContext, BlockContext, BlockLifecycleOptions, CONSUMED_HINTS, CONSUMED_HINT_KEYS, type CalculationDefinition$1 as CalcDefinition, CalcEngine, type CalcOrigin, type CalcScope, type CalculationDefinition as CalculateBlockDefinition, type CalculateBlockParseError, type CalculateBlockParseResult, CalculateBlockProcessor, CalculationRegistry, CardioDialect, ClearChildrenAction, ClimbDialect, type ClimbGradeMetricValue, type ClimbGradeSystem, ClimbMetricType, CompileAndPushBlockAction, CompletionDecision, type CreateAnalyticsEngineOptions, type CreateAnalyticsEngineResult, CrossFitDialect, DAY, DEFAULT_UNRESOLVED_EFFORT_MET, DIM_LENGTH, DIM_MASS, DIM_TIME, DIM_ZERO, type DayRollup, DialectStack, type Dimension, type DurationPrimitive, EFFORT_DATA_METRIC_TYPE, EffortBlock, type EffortBlockConfig, type EffortPrimitive, EffortRegistrySource, EffortResolutionOptions, EffortResolver, EffortResolverOptions, EmitEventAction, EmitSystemOutputAction, ErrorAction, EventBus, type EventHandlerRegistration, ExecutionContext, type FuzzyCandidate, GIT_SHA, HabitsDialect, type HeadingPrimitive, IAnalyticsEngine, type IAnalyticsProfile, IBlockContext, IEffort, IEffortRegistry, IEffortResolver, IEvent, IEventBus, IJitCompiler, type ILookupTable, IMemoryLocation, IMemoryReference, type IMetricPresentationPolicy, INowProvider, IRealtimeProcessor, IRuntimeAction, IRuntimeBehavior, IRuntimeBlock, type IRuntimeBlockStrategy, IRuntimeClock, type IRuntimeFactory, IRuntimeStack, IScript, IScriptRuntime, ISummaryProcessor, InMemoryEffortRegistry, JitCompiler, type LapPrimitive, type LineLocator, type LogLevel, LookupRegistry, MdTimerRuntime, MemoryTag, MemoryTypeEnum, type MetricObjectPrimitive, type MetricPresentationSurface, type MetricPresentationToken, type MetricRenderKind, type MetricTone, MetricVisibility, type MockClock, NextAction, NextEvent, NextEventHandler, OutputEmitter, PREDEFINED_SOUNDS, PRODUCTION_STRATEGIES, type ParseOptions, PlaySoundAction, PopBlockAction, type PredefinedSoundName, ProjectionResult, type PropertyPrimitive, PushBlockAction, PushRestBlockAction, type QuantityPrimitive, 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, 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 SyntaxFacts, type SyntaxMeta, type SyntaxPrimitive, type SyntaxStatement, type TextPrimitive, ThrowError, ThrowErrorAction, TimeSpan, TimerState, TwoPassEffortResolutionProcess, TypedMemoryReference, type UnitDef$1 as UnitDef, type UnitMatch, UnitRegistry, UnitSet, UnitsDialect, UnregisterEventHandlerAction, Unsubscribe, UpdateNextPreviewAction, VERSION, WaitingToStartBlock, WhiteboardScript, WodDialect, YogaDialect, buildTooltip, bundledEfforts, index as calc, calculateElapsed, classifyStatements, closeCurrentSpan, commonFixtureSet, computeColumnLabel, computeLabel, computeWorkloadRollups, createAnalyticsEngineForBlock, createCalcEngine, createCompiler, createDialectStack, createLineLocator, createPolicy as createMetricPresentationPolicy, createMockClock, createParser, dailySessionLoads, dayBucket, dialectRegistry, dialectStack, evaluate, evaluateCalculateDefinitions, extractEffortData, extractMetrics, extractStatements, extractStatementsRaw, extractSyntaxFacts, findBestFuzzyMatch, fixtureBackSquat, fixtureBurpee, fixturePlank, fixtureRowing, fixtureRunning, fixtureUserCustom, fixtureUserOverride, formatDuration, metricsToLabel as fragmentsToLabel, fullFixtureSet, fuseUnits, fuseUnitsInMetrics, getAnalyticsFromLogs, getAnalyticsFromRuntime, getHints, hasHint, hintMetric, hintsToContainer, isTimeLikeMetric, isWithinThreshold, levenshteinDistance, metricPresentation, mutateTimerSpans, normalizeForFuzzy, openSpan, parseCalcLine, parseCalculateBlock, parseExpression, parseScript, readTimer, realtimeProcessorRegistry, resolveDominantOrigin, sharedParser, startSpan, strategyRegistry, summaryProcessorRegistry, toStoredOutputStatement, parser as whiteboardParser, whiteboardScript, whiteboardScriptLanguage };
|
package/dist/index.d.ts
CHANGED
|
@@ -3005,6 +3005,155 @@ declare const PRODUCTION_STRATEGIES: readonly IRuntimeBlockStrategy[];
|
|
|
3005
3005
|
*/
|
|
3006
3006
|
declare function createCompiler(strategies?: IRuntimeBlockStrategy[]): JitCompiler;
|
|
3007
3007
|
|
|
3008
|
+
type ExecutionStatus = 'idle' | 'executing' | 'paused' | 'completed' | 'error';
|
|
3009
|
+
type BlockType = 'workout' | 'group' | 'timer' | 'rounds' | 'effort' | 'exercise' | 'custom';
|
|
3010
|
+
type BlockStatus = 'pending' | 'active' | 'running' | 'complete' | 'error';
|
|
3011
|
+
type MemoryType = 'metric' | 'timer-state' | 'loop-state' | 'group-state' | 'handler' | 'span' | 'unknown';
|
|
3012
|
+
type MemoryGrouping = 'owner' | 'type' | 'none';
|
|
3013
|
+
interface MetricValue {
|
|
3014
|
+
value: any;
|
|
3015
|
+
unit?: string;
|
|
3016
|
+
formatted: string;
|
|
3017
|
+
}
|
|
3018
|
+
/**
|
|
3019
|
+
* Benchmarking metrics for runtime operations.
|
|
3020
|
+
*/
|
|
3021
|
+
interface BenchmarkMetrics {
|
|
3022
|
+
snapshotCreationTime: number;
|
|
3023
|
+
renderTime: number;
|
|
3024
|
+
memoryUsage?: number;
|
|
3025
|
+
frameRate?: number;
|
|
3026
|
+
}
|
|
3027
|
+
/**
|
|
3028
|
+
* UI-friendly representation of IRuntimeBlock
|
|
3029
|
+
*/
|
|
3030
|
+
interface RuntimeStackBlock {
|
|
3031
|
+
key: string;
|
|
3032
|
+
blockType: BlockType;
|
|
3033
|
+
parentKey?: string;
|
|
3034
|
+
children: string[];
|
|
3035
|
+
depth: number;
|
|
3036
|
+
label: string;
|
|
3037
|
+
color: string;
|
|
3038
|
+
icon?: string;
|
|
3039
|
+
isActive: boolean;
|
|
3040
|
+
isComplete: boolean;
|
|
3041
|
+
status: BlockStatus;
|
|
3042
|
+
metric: Record<string, MetricValue>;
|
|
3043
|
+
metrics?: MetricContainer;
|
|
3044
|
+
metricGroups?: MetricContainer[];
|
|
3045
|
+
sourceIds: number[];
|
|
3046
|
+
lineNumber?: number;
|
|
3047
|
+
metadata?: {
|
|
3048
|
+
mountTime?: number;
|
|
3049
|
+
executionTime?: number;
|
|
3050
|
+
iterationCount?: number;
|
|
3051
|
+
};
|
|
3052
|
+
}
|
|
3053
|
+
/**
|
|
3054
|
+
* UI-friendly representation of memory allocation
|
|
3055
|
+
*/
|
|
3056
|
+
interface MemoryEntry {
|
|
3057
|
+
id: string;
|
|
3058
|
+
ownerId: string;
|
|
3059
|
+
ownerLabel?: string;
|
|
3060
|
+
type: MemoryType;
|
|
3061
|
+
value: any;
|
|
3062
|
+
valueFormatted: string;
|
|
3063
|
+
label: string;
|
|
3064
|
+
groupLabel?: string;
|
|
3065
|
+
icon?: string;
|
|
3066
|
+
lineNumber?: number;
|
|
3067
|
+
isValid: boolean;
|
|
3068
|
+
isHighlighted: boolean;
|
|
3069
|
+
metadata?: {
|
|
3070
|
+
createdAt?: number;
|
|
3071
|
+
lastModified?: number;
|
|
3072
|
+
accessCount?: number;
|
|
3073
|
+
};
|
|
3074
|
+
references?: string[];
|
|
3075
|
+
referencedBy?: string[];
|
|
3076
|
+
}
|
|
3077
|
+
/**
|
|
3078
|
+
* Immutable snapshot of runtime state for UI rendering
|
|
3079
|
+
*/
|
|
3080
|
+
interface ExecutionSnapshot {
|
|
3081
|
+
stack: {
|
|
3082
|
+
blocks: RuntimeStackBlock[];
|
|
3083
|
+
activeIndex: number;
|
|
3084
|
+
depth: number;
|
|
3085
|
+
rootBlockKey?: string;
|
|
3086
|
+
};
|
|
3087
|
+
memory: {
|
|
3088
|
+
entries: MemoryEntry[];
|
|
3089
|
+
groupedByOwner: Map<string, MemoryEntry[]>;
|
|
3090
|
+
groupedByType: Map<string, MemoryEntry[]>;
|
|
3091
|
+
totalEntries: number;
|
|
3092
|
+
};
|
|
3093
|
+
status: ExecutionStatus;
|
|
3094
|
+
metadata: {
|
|
3095
|
+
stepCount: number;
|
|
3096
|
+
elapsedTime: number;
|
|
3097
|
+
lastEvent?: string;
|
|
3098
|
+
lastEventTime?: number;
|
|
3099
|
+
benchmarkMetrics?: BenchmarkMetrics;
|
|
3100
|
+
};
|
|
3101
|
+
timestamp: number;
|
|
3102
|
+
}
|
|
3103
|
+
/**
|
|
3104
|
+
* Converts ScriptRuntime state to ExecutionSnapshot
|
|
3105
|
+
*/
|
|
3106
|
+
interface IRuntimeAdapter {
|
|
3107
|
+
createSnapshot(runtime: any): ExecutionSnapshot;
|
|
3108
|
+
extractStackBlocks(runtime: any): RuntimeStackBlock[];
|
|
3109
|
+
extractMemoryEntries(runtime: any): MemoryEntry[];
|
|
3110
|
+
groupMemoryEntries(entries: MemoryEntry[], groupBy: MemoryGrouping): Map<string, MemoryEntry[]>;
|
|
3111
|
+
}
|
|
3112
|
+
|
|
3113
|
+
/**
|
|
3114
|
+
* Adapter that converts ScriptRuntime state to UI-friendly ExecutionSnapshot
|
|
3115
|
+
*/
|
|
3116
|
+
declare class RuntimeAdapter implements IRuntimeAdapter {
|
|
3117
|
+
/**
|
|
3118
|
+
* Creates immutable snapshot of runtime state for UI rendering
|
|
3119
|
+
*/
|
|
3120
|
+
createSnapshot(runtime: IScriptRuntime): ExecutionSnapshot;
|
|
3121
|
+
/**
|
|
3122
|
+
* Extracts RuntimeStackBlocks from runtime stack
|
|
3123
|
+
*/
|
|
3124
|
+
extractStackBlocks(runtime: IScriptRuntime): RuntimeStackBlock[];
|
|
3125
|
+
/**
|
|
3126
|
+
* Extracts metrics from block's source statements for unified visualization
|
|
3127
|
+
*/
|
|
3128
|
+
private extractBlockFragments;
|
|
3129
|
+
/**
|
|
3130
|
+
* Extracts MemoryEntries from runtime memory
|
|
3131
|
+
*/
|
|
3132
|
+
extractMemoryEntries(runtime: IScriptRuntime): MemoryEntry[];
|
|
3133
|
+
/**
|
|
3134
|
+
* Generates a label for a memory entry from its type
|
|
3135
|
+
*/
|
|
3136
|
+
private generateMemoryLabelFromType;
|
|
3137
|
+
/**
|
|
3138
|
+
* Groups memory entries by specified grouping strategy
|
|
3139
|
+
*/
|
|
3140
|
+
groupMemoryEntries(entries: MemoryEntry[], groupBy: MemoryGrouping): Map<string, MemoryEntry[]>;
|
|
3141
|
+
private determineExecutionStatus;
|
|
3142
|
+
private mapBlockType;
|
|
3143
|
+
private determineBlockStatus;
|
|
3144
|
+
private findParentKey;
|
|
3145
|
+
private findChildrenKeys;
|
|
3146
|
+
private generateBlockLabel;
|
|
3147
|
+
private getBlockColor;
|
|
3148
|
+
private getBlockIcon;
|
|
3149
|
+
private mapMemoryType;
|
|
3150
|
+
private generateOwnerLabel;
|
|
3151
|
+
private formatValue;
|
|
3152
|
+
private generateMemoryLabel;
|
|
3153
|
+
private generateGroupLabel;
|
|
3154
|
+
private getMemoryIcon;
|
|
3155
|
+
}
|
|
3156
|
+
|
|
3008
3157
|
/**
|
|
3009
3158
|
* AST for the composed-calculation expression language (spec §2).
|
|
3010
3159
|
*
|
|
@@ -4077,13 +4226,13 @@ declare function toStoredOutputStatement(output: IOutputStatement | OutputStatem
|
|
|
4077
4226
|
* Auto-generated build version metadata.
|
|
4078
4227
|
* Do not edit directly; updated by scripts/stamp-version.ts
|
|
4079
4228
|
*/
|
|
4080
|
-
declare const VERSION = "0.1.
|
|
4081
|
-
declare const GIT_SHA = "
|
|
4082
|
-
declare const BUILD_TIME = "2026-08-18T18:
|
|
4229
|
+
declare const VERSION = "0.1.6";
|
|
4230
|
+
declare const GIT_SHA = "9c5467d";
|
|
4231
|
+
declare const BUILD_TIME = "2026-08-18T18:12:54.408Z";
|
|
4083
4232
|
declare const SEMVER: {
|
|
4084
|
-
readonly version: "0.1.
|
|
4085
|
-
readonly gitSha: "
|
|
4086
|
-
readonly buildTime: "2026-08-18T18:
|
|
4233
|
+
readonly version: "0.1.6";
|
|
4234
|
+
readonly gitSha: "9c5467d";
|
|
4235
|
+
readonly buildTime: "2026-08-18T18:12:54.408Z";
|
|
4087
4236
|
};
|
|
4088
4237
|
|
|
4089
|
-
export { AbortSessionAction, type ActionDescriptor, type ActionPrimitive, AnalyticsContext, AnalyticsEngine, type AnalyticsProfileContext, type AnalyticsResult, AnalyticsTransformer, BUILD_TIME, BUILTIN_CALCS, BUNDLED_EFFORT_COUNT, BehaviorContext, BlockContext, BlockLifecycleOptions, CONSUMED_HINTS, CONSUMED_HINT_KEYS, type CalculationDefinition$1 as CalcDefinition, CalcEngine, type CalcOrigin, type CalcScope, type CalculationDefinition as CalculateBlockDefinition, type CalculateBlockParseError, type CalculateBlockParseResult, CalculateBlockProcessor, CalculationRegistry, CardioDialect, ClearChildrenAction, ClimbDialect, type ClimbGradeMetricValue, type ClimbGradeSystem, ClimbMetricType, CompileAndPushBlockAction, CompletionDecision, type CreateAnalyticsEngineOptions, type CreateAnalyticsEngineResult, CrossFitDialect, DAY, DEFAULT_UNRESOLVED_EFFORT_MET, DIM_LENGTH, DIM_MASS, DIM_TIME, DIM_ZERO, type DayRollup, DialectStack, type Dimension, type DurationPrimitive, EFFORT_DATA_METRIC_TYPE, EffortBlock, type EffortBlockConfig, type EffortPrimitive, EffortRegistrySource, EffortResolutionOptions, EffortResolver, EffortResolverOptions, EmitEventAction, EmitSystemOutputAction, ErrorAction, EventBus, type EventHandlerRegistration, ExecutionContext, type FuzzyCandidate, GIT_SHA, HabitsDialect, type HeadingPrimitive, IAnalyticsEngine, type IAnalyticsProfile, IBlockContext, IEffort, IEffortRegistry, IEffortResolver, IEvent, IEventBus, IJitCompiler, type ILookupTable, IMemoryLocation, IMemoryReference, type IMetricPresentationPolicy, INowProvider, IRealtimeProcessor, IRuntimeAction, IRuntimeBehavior, IRuntimeBlock, type IRuntimeBlockStrategy, IRuntimeClock, type IRuntimeFactory, IRuntimeStack, IScript, IScriptRuntime, ISummaryProcessor, InMemoryEffortRegistry, JitCompiler, type LapPrimitive, type LineLocator, type LogLevel, LookupRegistry, MdTimerRuntime, MemoryTag, MemoryTypeEnum, type MetricObjectPrimitive, type MetricPresentationSurface, type MetricPresentationToken, type MetricRenderKind, type MetricTone, MetricVisibility, type MockClock, NextAction, NextEvent, NextEventHandler, OutputEmitter, PREDEFINED_SOUNDS, PRODUCTION_STRATEGIES, type ParseOptions, PlaySoundAction, PopBlockAction, type PredefinedSoundName, ProjectionResult, type PropertyPrimitive, PushBlockAction, PushRestBlockAction, type QuantityPrimitive, RegisterEventHandlerAction, Registry, ResolvedEffort, type ResolvedEffortData, RestBlock, type RestBlockConfig, type RoundsPrimitive, 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, 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 SyntaxFacts, type SyntaxMeta, type SyntaxPrimitive, type SyntaxStatement, type TextPrimitive, ThrowError, ThrowErrorAction, TimeSpan, TimerState, TwoPassEffortResolutionProcess, TypedMemoryReference, type UnitDef$1 as UnitDef, type UnitMatch, UnitRegistry, UnitSet, UnitsDialect, UnregisterEventHandlerAction, Unsubscribe, UpdateNextPreviewAction, VERSION, WaitingToStartBlock, WhiteboardScript, WodDialect, YogaDialect, buildTooltip, bundledEfforts, index as calc, calculateElapsed, classifyStatements, closeCurrentSpan, commonFixtureSet, computeColumnLabel, computeLabel, computeWorkloadRollups, createAnalyticsEngineForBlock, createCalcEngine, createCompiler, createDialectStack, createLineLocator, createPolicy as createMetricPresentationPolicy, createMockClock, createParser, dailySessionLoads, dayBucket, dialectRegistry, dialectStack, evaluate, evaluateCalculateDefinitions, extractEffortData, extractMetrics, extractStatements, extractStatementsRaw, extractSyntaxFacts, findBestFuzzyMatch, fixtureBackSquat, fixtureBurpee, fixturePlank, fixtureRowing, fixtureRunning, fixtureUserCustom, fixtureUserOverride, formatDuration, metricsToLabel as fragmentsToLabel, fullFixtureSet, fuseUnits, fuseUnitsInMetrics, getAnalyticsFromLogs, getAnalyticsFromRuntime, getHints, hasHint, hintMetric, hintsToContainer, isTimeLikeMetric, isWithinThreshold, levenshteinDistance, metricPresentation, mutateTimerSpans, normalizeForFuzzy, openSpan, parseCalcLine, parseCalculateBlock, parseExpression, parseScript, readTimer, realtimeProcessorRegistry, resolveDominantOrigin, sharedParser, startSpan, strategyRegistry, summaryProcessorRegistry, toStoredOutputStatement, parser as whiteboardParser, whiteboardScript, whiteboardScriptLanguage };
|
|
4238
|
+
export { AbortSessionAction, type ActionDescriptor, type ActionPrimitive, AnalyticsContext, AnalyticsEngine, type AnalyticsProfileContext, type AnalyticsResult, AnalyticsTransformer, BUILD_TIME, BUILTIN_CALCS, BUNDLED_EFFORT_COUNT, BehaviorContext, BlockContext, BlockLifecycleOptions, CONSUMED_HINTS, CONSUMED_HINT_KEYS, type CalculationDefinition$1 as CalcDefinition, CalcEngine, type CalcOrigin, type CalcScope, type CalculationDefinition as CalculateBlockDefinition, type CalculateBlockParseError, type CalculateBlockParseResult, CalculateBlockProcessor, CalculationRegistry, CardioDialect, ClearChildrenAction, ClimbDialect, type ClimbGradeMetricValue, type ClimbGradeSystem, ClimbMetricType, CompileAndPushBlockAction, CompletionDecision, type CreateAnalyticsEngineOptions, type CreateAnalyticsEngineResult, CrossFitDialect, DAY, DEFAULT_UNRESOLVED_EFFORT_MET, DIM_LENGTH, DIM_MASS, DIM_TIME, DIM_ZERO, type DayRollup, DialectStack, type Dimension, type DurationPrimitive, EFFORT_DATA_METRIC_TYPE, EffortBlock, type EffortBlockConfig, type EffortPrimitive, EffortRegistrySource, EffortResolutionOptions, EffortResolver, EffortResolverOptions, EmitEventAction, EmitSystemOutputAction, ErrorAction, EventBus, type EventHandlerRegistration, ExecutionContext, type FuzzyCandidate, GIT_SHA, HabitsDialect, type HeadingPrimitive, IAnalyticsEngine, type IAnalyticsProfile, IBlockContext, IEffort, IEffortRegistry, IEffortResolver, IEvent, IEventBus, IJitCompiler, type ILookupTable, IMemoryLocation, IMemoryReference, type IMetricPresentationPolicy, INowProvider, IRealtimeProcessor, IRuntimeAction, IRuntimeBehavior, IRuntimeBlock, type IRuntimeBlockStrategy, IRuntimeClock, type IRuntimeFactory, IRuntimeStack, IScript, IScriptRuntime, ISummaryProcessor, InMemoryEffortRegistry, JitCompiler, type LapPrimitive, type LineLocator, type LogLevel, LookupRegistry, MdTimerRuntime, MemoryTag, MemoryTypeEnum, type MetricObjectPrimitive, type MetricPresentationSurface, type MetricPresentationToken, type MetricRenderKind, type MetricTone, MetricVisibility, type MockClock, NextAction, NextEvent, NextEventHandler, OutputEmitter, PREDEFINED_SOUNDS, PRODUCTION_STRATEGIES, type ParseOptions, PlaySoundAction, PopBlockAction, type PredefinedSoundName, ProjectionResult, type PropertyPrimitive, PushBlockAction, PushRestBlockAction, type QuantityPrimitive, 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, 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 SyntaxFacts, type SyntaxMeta, type SyntaxPrimitive, type SyntaxStatement, type TextPrimitive, ThrowError, ThrowErrorAction, TimeSpan, TimerState, TwoPassEffortResolutionProcess, TypedMemoryReference, type UnitDef$1 as UnitDef, type UnitMatch, UnitRegistry, UnitSet, UnitsDialect, UnregisterEventHandlerAction, Unsubscribe, UpdateNextPreviewAction, VERSION, WaitingToStartBlock, WhiteboardScript, WodDialect, YogaDialect, buildTooltip, bundledEfforts, index as calc, calculateElapsed, classifyStatements, closeCurrentSpan, commonFixtureSet, computeColumnLabel, computeLabel, computeWorkloadRollups, createAnalyticsEngineForBlock, createCalcEngine, createCompiler, createDialectStack, createLineLocator, createPolicy as createMetricPresentationPolicy, createMockClock, createParser, dailySessionLoads, dayBucket, dialectRegistry, dialectStack, evaluate, evaluateCalculateDefinitions, extractEffortData, extractMetrics, extractStatements, extractStatementsRaw, extractSyntaxFacts, findBestFuzzyMatch, fixtureBackSquat, fixtureBurpee, fixturePlank, fixtureRowing, fixtureRunning, fixtureUserCustom, fixtureUserOverride, formatDuration, metricsToLabel as fragmentsToLabel, fullFixtureSet, fuseUnits, fuseUnitsInMetrics, getAnalyticsFromLogs, getAnalyticsFromRuntime, getHints, hasHint, hintMetric, hintsToContainer, isTimeLikeMetric, isWithinThreshold, levenshteinDistance, metricPresentation, mutateTimerSpans, normalizeForFuzzy, openSpan, parseCalcLine, parseCalculateBlock, parseExpression, parseScript, readTimer, realtimeProcessorRegistry, resolveDominantOrigin, sharedParser, startSpan, strategyRegistry, summaryProcessorRegistry, toStoredOutputStatement, parser as whiteboardParser, whiteboardScript, whiteboardScriptLanguage };
|