@bitcobblers/wod-wiki-lang 0.1.6 → 0.1.14
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/{chunk-F2TOS4AF.mjs → chunk-PFQDVQQO.mjs} +3 -9
- package/dist/chunk-PFQDVQQO.mjs.map +1 -0
- package/dist/index.cjs +220 -72
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +178 -96
- package/dist/index.d.ts +178 -96
- package/dist/index.mjs +178 -68
- package/dist/index.mjs.map +1 -1
- package/dist/react.mjs +2 -2
- package/package.json +2 -2
- package/dist/chunk-F2TOS4AF.mjs.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1880,6 +1880,58 @@ interface IRuntimeBlockStrategy {
|
|
|
1880
1880
|
apply(builder: BlockBuilder, statements: ICodeStatement[], runtime: IRuntimeContext): void;
|
|
1881
1881
|
}
|
|
1882
1882
|
|
|
1883
|
+
/**
|
|
1884
|
+
* A subscription that receives runtime state updates.
|
|
1885
|
+
*
|
|
1886
|
+
* Implementations determine what happens with the data:
|
|
1887
|
+
* - LocalRuntimeSubscription updates the workbench store (local UI)
|
|
1888
|
+
* - ChromecastRuntimeSubscription serializes and sends over RPC transport
|
|
1889
|
+
*
|
|
1890
|
+
* Multiple subscriptions can be active simultaneously. The SubscriptionManager
|
|
1891
|
+
* fans out stack snapshots and output statements to all registered subscriptions.
|
|
1892
|
+
*/
|
|
1893
|
+
interface IRuntimeSubscription {
|
|
1894
|
+
/** Unique identifier for add/remove tracking */
|
|
1895
|
+
readonly id: string;
|
|
1896
|
+
/**
|
|
1897
|
+
* Called when a stack mutation occurs (push/pop/clear/initial).
|
|
1898
|
+
* The snapshot contains the full block list, the affected block, and timing.
|
|
1899
|
+
*/
|
|
1900
|
+
onStackSnapshot(snapshot: StackSnapshot): void;
|
|
1901
|
+
/**
|
|
1902
|
+
* Called when an output statement is emitted (block unmount, milestone, etc.).
|
|
1903
|
+
*/
|
|
1904
|
+
onOutput(output: IOutputStatement): void;
|
|
1905
|
+
/**
|
|
1906
|
+
* Clean up resources held by this subscription (unsubscribe listeners, close channels, etc.).
|
|
1907
|
+
*/
|
|
1908
|
+
dispose(): void;
|
|
1909
|
+
}
|
|
1910
|
+
|
|
1911
|
+
/**
|
|
1912
|
+
* Chromecast-specific subscription interface that extends IRuntimeSubscription
|
|
1913
|
+
* with analytics summary functionality.
|
|
1914
|
+
*
|
|
1915
|
+
* Only ChromecastRuntimeSubscription implements this interface — local
|
|
1916
|
+
* subscriptions do not support analytics summary.
|
|
1917
|
+
*/
|
|
1918
|
+
interface ICastSubscription extends IRuntimeSubscription {
|
|
1919
|
+
/**
|
|
1920
|
+
* Send analytics summary with projection results to Chromecast review.
|
|
1921
|
+
* Called by browser when workout completes to show focused review.
|
|
1922
|
+
*/
|
|
1923
|
+
sendAnalyticsSummary(projections: Array<{
|
|
1924
|
+
name: string;
|
|
1925
|
+
value: number;
|
|
1926
|
+
unit: string;
|
|
1927
|
+
metricType?: string;
|
|
1928
|
+
}>, totalDurationMs: number, completedSegments: number): void;
|
|
1929
|
+
}
|
|
1930
|
+
/**
|
|
1931
|
+
* Type guard to check if a subscription supports Chromecast analytics.
|
|
1932
|
+
*/
|
|
1933
|
+
declare function isCastSubscription(s: IRuntimeSubscription): s is ICastSubscription;
|
|
1934
|
+
|
|
1883
1935
|
/**
|
|
1884
1936
|
* Action that pushes a compiled block onto the runtime stack.
|
|
1885
1937
|
* Used by behaviors to add child blocks for execution.
|
|
@@ -3154,6 +3206,125 @@ declare class RuntimeAdapter implements IRuntimeAdapter {
|
|
|
3154
3206
|
private getMemoryIcon;
|
|
3155
3207
|
}
|
|
3156
3208
|
|
|
3209
|
+
/**
|
|
3210
|
+
* LocalRuntimeSubscription — a no-op subscription that simply receives
|
|
3211
|
+
* stack snapshots and output statements without transforming them.
|
|
3212
|
+
*
|
|
3213
|
+
* This is the "identity" subscription: the SubscriptionManager fans out
|
|
3214
|
+
* runtime events to all subscriptions, and the local one simply consumes
|
|
3215
|
+
* them for any local-side effect (e.g., updating the workbench store).
|
|
3216
|
+
*
|
|
3217
|
+
* An optional callback can be provided for each event type to allow
|
|
3218
|
+
* the consumer to react to state changes.
|
|
3219
|
+
*/
|
|
3220
|
+
declare class LocalRuntimeSubscription implements IRuntimeSubscription {
|
|
3221
|
+
readonly id: string;
|
|
3222
|
+
private onStackSnapshotCallback?;
|
|
3223
|
+
private onOutputCallback?;
|
|
3224
|
+
constructor(options?: {
|
|
3225
|
+
id?: string;
|
|
3226
|
+
onStackSnapshot?: (snapshot: StackSnapshot) => void;
|
|
3227
|
+
onOutput?: (output: IOutputStatement) => void;
|
|
3228
|
+
});
|
|
3229
|
+
onStackSnapshot(snapshot: StackSnapshot): void;
|
|
3230
|
+
onOutput(output: IOutputStatement): void;
|
|
3231
|
+
dispose(): void;
|
|
3232
|
+
}
|
|
3233
|
+
|
|
3234
|
+
/**
|
|
3235
|
+
* Provides bidirectional event flow between runtime consumers.
|
|
3236
|
+
*
|
|
3237
|
+
* Implementations determine the transport:
|
|
3238
|
+
* - LocalEventProvider dispatches directly to the local IScriptRuntime
|
|
3239
|
+
* - ChromecastEventProvider sends/receives events over the RPC transport
|
|
3240
|
+
*
|
|
3241
|
+
* This abstracts away whether an event originates locally (button press)
|
|
3242
|
+
* or remotely (Chromecast D-Pad) — the runtime processes both identically.
|
|
3243
|
+
*/
|
|
3244
|
+
interface IRuntimeEventProvider {
|
|
3245
|
+
/**
|
|
3246
|
+
* Dispatch an event to be processed by the runtime.
|
|
3247
|
+
* For local: calls runtime.handle(event) directly.
|
|
3248
|
+
* For chromecast: serializes and sends over the RPC channel.
|
|
3249
|
+
*/
|
|
3250
|
+
dispatch(event: IEvent): void;
|
|
3251
|
+
/**
|
|
3252
|
+
* Listen for incoming events (from remote sources or the runtime event bus).
|
|
3253
|
+
* Returns an unsubscribe function.
|
|
3254
|
+
*/
|
|
3255
|
+
onEvent(handler: (event: IEvent) => void): Unsubscribe;
|
|
3256
|
+
/**
|
|
3257
|
+
* Clean up resources.
|
|
3258
|
+
*/
|
|
3259
|
+
dispose(): void;
|
|
3260
|
+
}
|
|
3261
|
+
|
|
3262
|
+
/**
|
|
3263
|
+
* LocalEventProvider — dispatches events directly to the local IScriptRuntime.
|
|
3264
|
+
*
|
|
3265
|
+
* - dispatch(event) → runtime.handle(event), which triggers the event bus
|
|
3266
|
+
* and executes resulting actions in a single turn.
|
|
3267
|
+
* - onEvent(handler) → registers on the runtime event bus to receive
|
|
3268
|
+
* all events (using the 'global' callback registration path).
|
|
3269
|
+
*/
|
|
3270
|
+
declare class LocalEventProvider implements IRuntimeEventProvider {
|
|
3271
|
+
private readonly runtime;
|
|
3272
|
+
private static subscriptionCounter;
|
|
3273
|
+
private unsubscribes;
|
|
3274
|
+
private disposed;
|
|
3275
|
+
constructor(runtime: IScriptRuntime);
|
|
3276
|
+
dispatch(event: IEvent): void;
|
|
3277
|
+
onEvent(handler: (event: IEvent) => void): Unsubscribe;
|
|
3278
|
+
dispose(): void;
|
|
3279
|
+
}
|
|
3280
|
+
|
|
3281
|
+
/**
|
|
3282
|
+
* SubscriptionManager — fans out runtime stack and output events to
|
|
3283
|
+
* multiple IRuntimeSubscription instances.
|
|
3284
|
+
*
|
|
3285
|
+
* Lifecycle:
|
|
3286
|
+
* 1. Created when a runtime is initialized (by RuntimeLifecycleProvider)
|
|
3287
|
+
* 2. Always holds a LocalRuntimeSubscription for the browser UI
|
|
3288
|
+
* 3. ChromecastRuntimeSubscription added/removed via cast session lifecycle
|
|
3289
|
+
* 4. Disposed when the runtime is disposed
|
|
3290
|
+
*
|
|
3291
|
+
* The manager subscribes once to the runtime's stack and output APIs,
|
|
3292
|
+
* then iterates over all registered subscriptions for each event.
|
|
3293
|
+
*/
|
|
3294
|
+
declare class SubscriptionManager {
|
|
3295
|
+
private readonly runtime;
|
|
3296
|
+
private subscriptions;
|
|
3297
|
+
private stackUnsub;
|
|
3298
|
+
private outputUnsub;
|
|
3299
|
+
private disposed;
|
|
3300
|
+
constructor(runtime: IScriptRuntime);
|
|
3301
|
+
/**
|
|
3302
|
+
* Register a subscription. If a subscription with the same ID already exists,
|
|
3303
|
+
* the old one is disposed and replaced.
|
|
3304
|
+
*
|
|
3305
|
+
* New subscriptions immediately receive the current stack state and any
|
|
3306
|
+
* existing output statements to catch them up.
|
|
3307
|
+
*/
|
|
3308
|
+
add(subscription: IRuntimeSubscription): void;
|
|
3309
|
+
/**
|
|
3310
|
+
* Remove and dispose a subscription by ID.
|
|
3311
|
+
* Returns true if the subscription was found and removed.
|
|
3312
|
+
*/
|
|
3313
|
+
remove(id: string): boolean;
|
|
3314
|
+
/**
|
|
3315
|
+
* Check if a subscription with the given ID is registered.
|
|
3316
|
+
*/
|
|
3317
|
+
has(id: string): boolean;
|
|
3318
|
+
/**
|
|
3319
|
+
* Get the number of active subscriptions.
|
|
3320
|
+
*/
|
|
3321
|
+
get count(): number;
|
|
3322
|
+
/**
|
|
3323
|
+
* Dispose all subscriptions and unsubscribe from the runtime.
|
|
3324
|
+
*/
|
|
3325
|
+
dispose(): void;
|
|
3326
|
+
}
|
|
3327
|
+
|
|
3157
3328
|
/**
|
|
3158
3329
|
* AST for the composed-calculation expression language (spec §2).
|
|
3159
3330
|
*
|
|
@@ -4085,95 +4256,6 @@ interface CalcAnalysis {
|
|
|
4085
4256
|
}
|
|
4086
4257
|
declare function buildStaticLookups(): LookupRegistry;
|
|
4087
4258
|
|
|
4088
|
-
declare const index_ABSENT: typeof ABSENT;
|
|
4089
|
-
declare const index_AGGREGATE_BUILTINS: typeof AGGREGATE_BUILTINS;
|
|
4090
|
-
declare const index_AUTHORITATIVE_CASTS: typeof AUTHORITATIVE_CASTS;
|
|
4091
|
-
declare const index_BUILTIN_CALCS: typeof BUILTIN_CALCS;
|
|
4092
|
-
type index_BinaryOp = BinaryOp;
|
|
4093
|
-
declare const index_CONTEXT_ATOMS: typeof CONTEXT_ATOMS;
|
|
4094
|
-
type index_CalcAnalysis = CalcAnalysis;
|
|
4095
|
-
type index_CalcDiagnostic = CalcDiagnostic;
|
|
4096
|
-
type index_CalcEngine = CalcEngine;
|
|
4097
|
-
declare const index_CalcEngine: typeof CalcEngine;
|
|
4098
|
-
type index_CalcEngineDeps = CalcEngineDeps;
|
|
4099
|
-
type index_CalcEvalError = CalcEvalError;
|
|
4100
|
-
declare const index_CalcEvalError: typeof CalcEvalError;
|
|
4101
|
-
type index_CalcLine = CalcLine;
|
|
4102
|
-
type index_CalcNode = CalcNode;
|
|
4103
|
-
type index_CalcOrigin = CalcOrigin;
|
|
4104
|
-
type index_CalcParseError = CalcParseError;
|
|
4105
|
-
declare const index_CalcParseError: typeof CalcParseError;
|
|
4106
|
-
type index_CalcRegistrationError = CalcRegistrationError;
|
|
4107
|
-
declare const index_CalcRegistrationError: typeof CalcRegistrationError;
|
|
4108
|
-
type index_CalcScope = CalcScope;
|
|
4109
|
-
type index_CalcStack = CalcStack;
|
|
4110
|
-
type index_CalcStackOptions = CalcStackOptions;
|
|
4111
|
-
type index_CalcUnitError = CalcUnitError;
|
|
4112
|
-
declare const index_CalcUnitError: typeof CalcUnitError;
|
|
4113
|
-
type index_CalcVariant = CalcVariant;
|
|
4114
|
-
type index_CalculationRegistry = CalculationRegistry;
|
|
4115
|
-
declare const index_CalculationRegistry: typeof CalculationRegistry;
|
|
4116
|
-
type index_CompiledLineForm = CompiledLineForm;
|
|
4117
|
-
declare const index_DIM_COUNT: typeof DIM_COUNT;
|
|
4118
|
-
declare const index_DIM_ENERGY: typeof DIM_ENERGY;
|
|
4119
|
-
declare const index_DIM_LENGTH: typeof DIM_LENGTH;
|
|
4120
|
-
declare const index_DIM_MASS: typeof DIM_MASS;
|
|
4121
|
-
declare const index_DIM_TIME: typeof DIM_TIME;
|
|
4122
|
-
declare const index_DIM_ZERO: typeof DIM_ZERO;
|
|
4123
|
-
type index_DimVector = DimVector;
|
|
4124
|
-
type index_EvalContext = EvalContext;
|
|
4125
|
-
type index_ExprNode = ExprNode;
|
|
4126
|
-
type index_ILookupTable = ILookupTable;
|
|
4127
|
-
type index_IProfileSource = IProfileSource;
|
|
4128
|
-
type index_LineFormScope = LineFormScope;
|
|
4129
|
-
type index_LookupFieldDef = LookupFieldDef;
|
|
4130
|
-
type index_LookupLayer = LookupLayer;
|
|
4131
|
-
type index_LookupRegistry = LookupRegistry;
|
|
4132
|
-
declare const index_LookupRegistry: typeof LookupRegistry;
|
|
4133
|
-
declare const index_NAMED_COMPOUNDS: typeof NAMED_COMPOUNDS;
|
|
4134
|
-
declare const index_REST_EXCLUSION: typeof REST_EXCLUSION;
|
|
4135
|
-
declare const index_RPE_LABELS: typeof RPE_LABELS;
|
|
4136
|
-
declare const index_STORE_CALCS: typeof STORE_CALCS;
|
|
4137
|
-
declare const index_STREAM_ATOMS: typeof STREAM_ATOMS;
|
|
4138
|
-
type index_StaticEnv = StaticEnv;
|
|
4139
|
-
type index_StreamAtomDef = StreamAtomDef;
|
|
4140
|
-
declare const index_UNITS: typeof UNITS;
|
|
4141
|
-
type index_UnitDef = UnitDef;
|
|
4142
|
-
type index_Val = Val;
|
|
4143
|
-
declare const index_addDim: typeof addDim;
|
|
4144
|
-
declare const index_buildStaticLookups: typeof buildStaticLookups;
|
|
4145
|
-
declare const index_checkCalcLine: typeof checkCalcLine;
|
|
4146
|
-
declare const index_compileLineForm: typeof compileLineForm;
|
|
4147
|
-
declare const index_composeDivUnit: typeof composeDivUnit;
|
|
4148
|
-
declare const index_composeMulUnit: typeof composeMulUnit;
|
|
4149
|
-
declare const index_compoundName: typeof compoundName;
|
|
4150
|
-
declare const index_convertScalar: typeof convertScalar;
|
|
4151
|
-
declare const index_createCalcEngine: typeof createCalcEngine;
|
|
4152
|
-
declare const index_createCalcStack: typeof createCalcStack;
|
|
4153
|
-
declare const index_createDisciplinesTable: typeof createDisciplinesTable;
|
|
4154
|
-
declare const index_createEffortTable: typeof createEffortTable;
|
|
4155
|
-
declare const index_createProfileTable: typeof createProfileTable;
|
|
4156
|
-
declare const index_createRpeLabelsTable: typeof createRpeLabelsTable;
|
|
4157
|
-
declare const index_dimEquals: typeof dimEquals;
|
|
4158
|
-
declare const index_evaluate: typeof evaluate;
|
|
4159
|
-
declare const index_formatDim: typeof formatDim;
|
|
4160
|
-
declare const index_getUnit: typeof getUnit;
|
|
4161
|
-
declare const index_inferDim: typeof inferDim;
|
|
4162
|
-
declare const index_isDimensionless: typeof isDimensionless;
|
|
4163
|
-
declare const index_num: typeof num;
|
|
4164
|
-
declare const index_outputNodeId: typeof outputNodeId;
|
|
4165
|
-
declare const index_outputNodeIds: typeof outputNodeIds;
|
|
4166
|
-
declare const index_parseCalcLine: typeof parseCalcLine;
|
|
4167
|
-
declare const index_parseExpression: typeof parseExpression;
|
|
4168
|
-
declare const index_printCalculation: typeof printCalculation;
|
|
4169
|
-
declare const index_str: typeof str;
|
|
4170
|
-
declare const index_subDim: typeof subDim;
|
|
4171
|
-
declare const index_truthy: typeof truthy;
|
|
4172
|
-
declare const index_validateOutputUnit: typeof validateOutputUnit;
|
|
4173
|
-
declare namespace index {
|
|
4174
|
-
export { index_ABSENT as ABSENT, index_AGGREGATE_BUILTINS as AGGREGATE_BUILTINS, index_AUTHORITATIVE_CASTS as AUTHORITATIVE_CASTS, index_BUILTIN_CALCS as BUILTIN_CALCS, type index_BinaryOp as BinaryOp, index_CONTEXT_ATOMS as CONTEXT_ATOMS, type index_CalcAnalysis as CalcAnalysis, type index_CalcDiagnostic as CalcDiagnostic, index_CalcEngine as CalcEngine, type index_CalcEngineDeps as CalcEngineDeps, index_CalcEvalError as CalcEvalError, type index_CalcLine as CalcLine, type index_CalcNode as CalcNode, type index_CalcOrigin as CalcOrigin, index_CalcParseError as CalcParseError, index_CalcRegistrationError as CalcRegistrationError, type index_CalcScope as CalcScope, type index_CalcStack as CalcStack, type index_CalcStackOptions as CalcStackOptions, index_CalcUnitError as CalcUnitError, type index_CalcVariant as CalcVariant, type CalculationDefinition$1 as CalculationDefinition, index_CalculationRegistry as CalculationRegistry, type index_CompiledLineForm as CompiledLineForm, index_DIM_COUNT as DIM_COUNT, index_DIM_ENERGY as DIM_ENERGY, index_DIM_LENGTH as DIM_LENGTH, index_DIM_MASS as DIM_MASS, index_DIM_TIME as DIM_TIME, index_DIM_ZERO as DIM_ZERO, type index_DimVector as DimVector, type index_EvalContext as EvalContext, type index_ExprNode as ExprNode, type index_ILookupTable as ILookupTable, type index_IProfileSource as IProfileSource, type index_LineFormScope as LineFormScope, type index_LookupFieldDef as LookupFieldDef, type index_LookupLayer as LookupLayer, index_LookupRegistry as LookupRegistry, index_NAMED_COMPOUNDS as NAMED_COMPOUNDS, index_REST_EXCLUSION as REST_EXCLUSION, index_RPE_LABELS as RPE_LABELS, index_STORE_CALCS as STORE_CALCS, index_STREAM_ATOMS as STREAM_ATOMS, type index_StaticEnv as StaticEnv, type index_StreamAtomDef as StreamAtomDef, index_UNITS as UNITS, type index_UnitDef as UnitDef, type index_Val as Val, index_addDim as addDim, index_buildStaticLookups as buildStaticLookups, index_checkCalcLine as checkCalcLine, index_compileLineForm as compileLineForm, index_composeDivUnit as composeDivUnit, index_composeMulUnit as composeMulUnit, index_compoundName as compoundName, index_convertScalar as convertScalar, index_createCalcEngine as createCalcEngine, index_createCalcStack as createCalcStack, index_createDisciplinesTable as createDisciplinesTable, index_createEffortTable as createEffortTable, index_createProfileTable as createProfileTable, index_createRpeLabelsTable as createRpeLabelsTable, index_dimEquals as dimEquals, index_evaluate as evaluate, index_formatDim as formatDim, index_getUnit as getUnit, index_inferDim as inferDim, index_isDimensionless as isDimensionless, index_num as num, index_outputNodeId as outputNodeId, index_outputNodeIds as outputNodeIds, index_parseCalcLine as parseCalcLine, index_parseExpression as parseExpression, index_printCalculation as printCalculation, index_str as str, index_subDim as subDim, index_truthy as truthy, index_validateOutputUnit as validateOutputUnit };
|
|
4175
|
-
}
|
|
4176
|
-
|
|
4177
4259
|
/**
|
|
4178
4260
|
* workloadRollup — pure workload-window math behind Rollup Facts
|
|
4179
4261
|
* (CONTEXT.md §Analytics). Foster sRPE periodization over daily SessionLoad:
|
|
@@ -4226,13 +4308,13 @@ declare function toStoredOutputStatement(output: IOutputStatement | OutputStatem
|
|
|
4226
4308
|
* Auto-generated build version metadata.
|
|
4227
4309
|
* Do not edit directly; updated by scripts/stamp-version.ts
|
|
4228
4310
|
*/
|
|
4229
|
-
declare const VERSION = "0.1.
|
|
4230
|
-
declare const GIT_SHA = "
|
|
4231
|
-
declare const BUILD_TIME = "2026-08-18T18:
|
|
4311
|
+
declare const VERSION = "0.1.14";
|
|
4312
|
+
declare const GIT_SHA = "ce7593a";
|
|
4313
|
+
declare const BUILD_TIME = "2026-08-18T18:26:56.537Z";
|
|
4232
4314
|
declare const SEMVER: {
|
|
4233
|
-
readonly version: "0.1.
|
|
4234
|
-
readonly gitSha: "
|
|
4235
|
-
readonly buildTime: "2026-08-18T18:
|
|
4315
|
+
readonly version: "0.1.14";
|
|
4316
|
+
readonly gitSha: "ce7593a";
|
|
4317
|
+
readonly buildTime: "2026-08-18T18:26:56.537Z";
|
|
4236
4318
|
};
|
|
4237
4319
|
|
|
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,
|
|
4320
|
+
export { ABSENT, AGGREGATE_BUILTINS, AUTHORITATIVE_CASTS, AbortSessionAction, type ActionDescriptor, type ActionPrimitive, AnalyticsContext, AnalyticsEngine, type AnalyticsProfileContext, type AnalyticsResult, AnalyticsTransformer, BUILD_TIME, BUILTIN_CALCS, BUNDLED_EFFORT_COUNT, BehaviorContext, type BinaryOp, BlockContext, BlockLifecycleOptions, CONSUMED_HINTS, CONSUMED_HINT_KEYS, CONTEXT_ATOMS, type CalcAnalysis, type CalculationDefinition$1 as CalcDefinition, type CalcDiagnostic, CalcEngine, type CalcEngineDeps, CalcEvalError, type CalcLine, type CalcNode, type CalcOrigin, CalcParseError, CalcRegistrationError, type CalcScope, type CalcStack, type CalcStackOptions, type UnitDef as CalcUnitDef, CalcUnitError, type CalcVariant, type CalculationDefinition as CalculateBlockDefinition, type CalculateBlockParseError, type CalculateBlockParseResult, CalculateBlockProcessor, type CalculationDefinition$1 as CalculationDefinition, CalculationRegistry, CardioDialect, ClearChildrenAction, ClimbDialect, type ClimbGradeMetricValue, type ClimbGradeSystem, ClimbMetricType, CompileAndPushBlockAction, type CompiledLineForm, CompletionDecision, type CreateAnalyticsEngineOptions, type CreateAnalyticsEngineResult, CrossFitDialect, DAY, DEFAULT_UNRESOLVED_EFFORT_MET, DIM_COUNT, DIM_ENERGY, DIM_LENGTH, DIM_MASS, DIM_TIME, DIM_ZERO, type DayRollup, DialectStack, type DimVector, type Dimension, type DurationPrimitive, EFFORT_DATA_METRIC_TYPE, EffortBlock, type EffortBlockConfig, type EffortPrimitive, EffortRegistrySource, EffortResolutionOptions, EffortResolver, EffortResolverOptions, EmitEventAction, EmitSystemOutputAction, ErrorAction, type EvalContext, EventBus, type EventHandlerRegistration, ExecutionContext, type ExecutionSnapshot, type ExprNode, type FuzzyCandidate, GIT_SHA, HabitsDialect, type HeadingPrimitive, IAnalyticsEngine, type IAnalyticsProfile, IBlockContext, type ICastSubscription, IEffort, IEffortRegistry, IEffortResolver, IEvent, IEventBus, IEventHandler, IJitCompiler, type ILookupTable, IMemoryLocation, IMemoryReference, type IMetricPresentationPolicy, INowProvider, type IProfileSource, IRealtimeProcessor, IRuntimeAction, IRuntimeBehavior, IRuntimeBlock, type IRuntimeBlockStrategy, IRuntimeClock, type IRuntimeFactory, IRuntimeStack, type IRuntimeSubscription, IScript, IScriptRuntime, ISummaryProcessor, InMemoryEffortRegistry, JitCompiler, type LapPrimitive, type LineFormScope, type LineLocator, LocalEventProvider, LocalRuntimeSubscription, type LogLevel, type LookupFieldDef, type LookupLayer, LookupRegistry, MdTimerRuntime, type MemoryEntry, MemoryTag, MemoryTypeEnum, type MetricObjectPrimitive, type MetricPresentationSurface, type MetricPresentationToken, type MetricRenderKind, type MetricTone, MetricVisibility, type MockClock, NAMED_COMPOUNDS, NextAction, NextEvent, NextEventHandler, OutputEmitter, PREDEFINED_SOUNDS, PRODUCTION_STRATEGIES, type ParseOptions, PlaySoundAction, PopBlockAction, type PredefinedSoundName, ProjectionResult, type PropertyPrimitive, PushBlockAction, PushRestBlockAction, type QuantityPrimitive, REST_EXCLUSION, RPE_LABELS, RegisterEventHandlerAction, Registry, ResolvedEffort, type ResolvedEffortData, RestBlock, type RestBlockConfig, type RoundsPrimitive, RuntimeAdapter, RuntimeBlock, type RuntimeBlockOptions, RuntimeBuilder, type RuntimeButton, RuntimeClock, type RuntimeController, type RuntimeControls, RuntimeError, RuntimeFactory, type RuntimeLogEntry, RuntimeLogger, RuntimeMemory, type RuntimeMemoryLocation, RuntimeObservers, RuntimeStack, SEMVER, STANDARD_UNITS, STORE_CALCS, STREAM_ATOMS, ScriptRuntime, type SegmentWithMetadata, SessionRootBlock, type SessionRootConfig, SnapshotClock, type SoundBehaviorConfig, type SoundCue, type SoundCueState, type SoundState, type SourceInput, type SpanList, StackObserver, StackSnapshot, StandardAnalyticsProfile, StartSessionAction, type StartSessionOptions, StartWorkoutAction, type StartWorkoutOptions, type StaticEnv, type StreamAtomDef, SubscriptionManager, type SyntaxFacts, type SyntaxMeta, type SyntaxPrimitive, type SyntaxStatement, type TextPrimitive, ThrowError, ThrowErrorAction, TimeSpan, TimerState, TwoPassEffortResolutionProcess, TypedMemoryReference, UNITS, type UnitDef$1 as UnitDef, type UnitMatch, UnitRegistry, UnitSet, UnitsDialect, UnregisterEventHandlerAction, Unsubscribe, UpdateNextPreviewAction, VERSION, type Val, WaitingToStartBlock, WhiteboardScript, WodDialect, YogaDialect, addDim, buildStaticLookups, buildTooltip, bundledEfforts, calculateElapsed, checkCalcLine, classifyStatements, closeCurrentSpan, commonFixtureSet, compileLineForm, composeDivUnit, composeMulUnit, compoundName, computeColumnLabel, computeLabel, computeWorkloadRollups, convertScalar, createAnalyticsEngineForBlock, createCalcEngine, createCalcStack, createCompiler, createDialectStack, createDisciplinesTable, createEffortTable, createLineLocator, createPolicy as createMetricPresentationPolicy, createMockClock, createParser, createProfileTable, createRpeLabelsTable, dailySessionLoads, dayBucket, dialectRegistry, dialectStack, dimEquals, evaluate, evaluateCalculateDefinitions, extractEffortData, extractMetrics, extractStatements, extractStatementsRaw, extractSyntaxFacts, findBestFuzzyMatch, fixtureBackSquat, fixtureBurpee, fixturePlank, fixtureRowing, fixtureRunning, fixtureUserCustom, fixtureUserOverride, formatDim, formatDuration, metricsToLabel as fragmentsToLabel, fullFixtureSet, fuseUnits, fuseUnitsInMetrics, getAnalyticsFromLogs, getAnalyticsFromRuntime, getHints, getUnit, hasHint, hintMetric, hintsToContainer, inferDim, isCastSubscription, isDimensionless, isTimeLikeMetric, isWithinThreshold, levenshteinDistance, metricPresentation, mutateTimerSpans, normalizeForFuzzy, num, openSpan, outputNodeId, outputNodeIds, parseCalcLine, parseCalculateBlock, parseExpression, parseScript, printCalculation, readTimer, realtimeProcessorRegistry, resolveDominantOrigin, sharedParser, startSpan, str, strategyRegistry, subDim, summaryProcessorRegistry, toStoredOutputStatement, truthy, validateOutputUnit, parser as whiteboardParser, whiteboardScript, whiteboardScriptLanguage };
|
package/dist/index.d.ts
CHANGED
|
@@ -1880,6 +1880,58 @@ interface IRuntimeBlockStrategy {
|
|
|
1880
1880
|
apply(builder: BlockBuilder, statements: ICodeStatement[], runtime: IRuntimeContext): void;
|
|
1881
1881
|
}
|
|
1882
1882
|
|
|
1883
|
+
/**
|
|
1884
|
+
* A subscription that receives runtime state updates.
|
|
1885
|
+
*
|
|
1886
|
+
* Implementations determine what happens with the data:
|
|
1887
|
+
* - LocalRuntimeSubscription updates the workbench store (local UI)
|
|
1888
|
+
* - ChromecastRuntimeSubscription serializes and sends over RPC transport
|
|
1889
|
+
*
|
|
1890
|
+
* Multiple subscriptions can be active simultaneously. The SubscriptionManager
|
|
1891
|
+
* fans out stack snapshots and output statements to all registered subscriptions.
|
|
1892
|
+
*/
|
|
1893
|
+
interface IRuntimeSubscription {
|
|
1894
|
+
/** Unique identifier for add/remove tracking */
|
|
1895
|
+
readonly id: string;
|
|
1896
|
+
/**
|
|
1897
|
+
* Called when a stack mutation occurs (push/pop/clear/initial).
|
|
1898
|
+
* The snapshot contains the full block list, the affected block, and timing.
|
|
1899
|
+
*/
|
|
1900
|
+
onStackSnapshot(snapshot: StackSnapshot): void;
|
|
1901
|
+
/**
|
|
1902
|
+
* Called when an output statement is emitted (block unmount, milestone, etc.).
|
|
1903
|
+
*/
|
|
1904
|
+
onOutput(output: IOutputStatement): void;
|
|
1905
|
+
/**
|
|
1906
|
+
* Clean up resources held by this subscription (unsubscribe listeners, close channels, etc.).
|
|
1907
|
+
*/
|
|
1908
|
+
dispose(): void;
|
|
1909
|
+
}
|
|
1910
|
+
|
|
1911
|
+
/**
|
|
1912
|
+
* Chromecast-specific subscription interface that extends IRuntimeSubscription
|
|
1913
|
+
* with analytics summary functionality.
|
|
1914
|
+
*
|
|
1915
|
+
* Only ChromecastRuntimeSubscription implements this interface — local
|
|
1916
|
+
* subscriptions do not support analytics summary.
|
|
1917
|
+
*/
|
|
1918
|
+
interface ICastSubscription extends IRuntimeSubscription {
|
|
1919
|
+
/**
|
|
1920
|
+
* Send analytics summary with projection results to Chromecast review.
|
|
1921
|
+
* Called by browser when workout completes to show focused review.
|
|
1922
|
+
*/
|
|
1923
|
+
sendAnalyticsSummary(projections: Array<{
|
|
1924
|
+
name: string;
|
|
1925
|
+
value: number;
|
|
1926
|
+
unit: string;
|
|
1927
|
+
metricType?: string;
|
|
1928
|
+
}>, totalDurationMs: number, completedSegments: number): void;
|
|
1929
|
+
}
|
|
1930
|
+
/**
|
|
1931
|
+
* Type guard to check if a subscription supports Chromecast analytics.
|
|
1932
|
+
*/
|
|
1933
|
+
declare function isCastSubscription(s: IRuntimeSubscription): s is ICastSubscription;
|
|
1934
|
+
|
|
1883
1935
|
/**
|
|
1884
1936
|
* Action that pushes a compiled block onto the runtime stack.
|
|
1885
1937
|
* Used by behaviors to add child blocks for execution.
|
|
@@ -3154,6 +3206,125 @@ declare class RuntimeAdapter implements IRuntimeAdapter {
|
|
|
3154
3206
|
private getMemoryIcon;
|
|
3155
3207
|
}
|
|
3156
3208
|
|
|
3209
|
+
/**
|
|
3210
|
+
* LocalRuntimeSubscription — a no-op subscription that simply receives
|
|
3211
|
+
* stack snapshots and output statements without transforming them.
|
|
3212
|
+
*
|
|
3213
|
+
* This is the "identity" subscription: the SubscriptionManager fans out
|
|
3214
|
+
* runtime events to all subscriptions, and the local one simply consumes
|
|
3215
|
+
* them for any local-side effect (e.g., updating the workbench store).
|
|
3216
|
+
*
|
|
3217
|
+
* An optional callback can be provided for each event type to allow
|
|
3218
|
+
* the consumer to react to state changes.
|
|
3219
|
+
*/
|
|
3220
|
+
declare class LocalRuntimeSubscription implements IRuntimeSubscription {
|
|
3221
|
+
readonly id: string;
|
|
3222
|
+
private onStackSnapshotCallback?;
|
|
3223
|
+
private onOutputCallback?;
|
|
3224
|
+
constructor(options?: {
|
|
3225
|
+
id?: string;
|
|
3226
|
+
onStackSnapshot?: (snapshot: StackSnapshot) => void;
|
|
3227
|
+
onOutput?: (output: IOutputStatement) => void;
|
|
3228
|
+
});
|
|
3229
|
+
onStackSnapshot(snapshot: StackSnapshot): void;
|
|
3230
|
+
onOutput(output: IOutputStatement): void;
|
|
3231
|
+
dispose(): void;
|
|
3232
|
+
}
|
|
3233
|
+
|
|
3234
|
+
/**
|
|
3235
|
+
* Provides bidirectional event flow between runtime consumers.
|
|
3236
|
+
*
|
|
3237
|
+
* Implementations determine the transport:
|
|
3238
|
+
* - LocalEventProvider dispatches directly to the local IScriptRuntime
|
|
3239
|
+
* - ChromecastEventProvider sends/receives events over the RPC transport
|
|
3240
|
+
*
|
|
3241
|
+
* This abstracts away whether an event originates locally (button press)
|
|
3242
|
+
* or remotely (Chromecast D-Pad) — the runtime processes both identically.
|
|
3243
|
+
*/
|
|
3244
|
+
interface IRuntimeEventProvider {
|
|
3245
|
+
/**
|
|
3246
|
+
* Dispatch an event to be processed by the runtime.
|
|
3247
|
+
* For local: calls runtime.handle(event) directly.
|
|
3248
|
+
* For chromecast: serializes and sends over the RPC channel.
|
|
3249
|
+
*/
|
|
3250
|
+
dispatch(event: IEvent): void;
|
|
3251
|
+
/**
|
|
3252
|
+
* Listen for incoming events (from remote sources or the runtime event bus).
|
|
3253
|
+
* Returns an unsubscribe function.
|
|
3254
|
+
*/
|
|
3255
|
+
onEvent(handler: (event: IEvent) => void): Unsubscribe;
|
|
3256
|
+
/**
|
|
3257
|
+
* Clean up resources.
|
|
3258
|
+
*/
|
|
3259
|
+
dispose(): void;
|
|
3260
|
+
}
|
|
3261
|
+
|
|
3262
|
+
/**
|
|
3263
|
+
* LocalEventProvider — dispatches events directly to the local IScriptRuntime.
|
|
3264
|
+
*
|
|
3265
|
+
* - dispatch(event) → runtime.handle(event), which triggers the event bus
|
|
3266
|
+
* and executes resulting actions in a single turn.
|
|
3267
|
+
* - onEvent(handler) → registers on the runtime event bus to receive
|
|
3268
|
+
* all events (using the 'global' callback registration path).
|
|
3269
|
+
*/
|
|
3270
|
+
declare class LocalEventProvider implements IRuntimeEventProvider {
|
|
3271
|
+
private readonly runtime;
|
|
3272
|
+
private static subscriptionCounter;
|
|
3273
|
+
private unsubscribes;
|
|
3274
|
+
private disposed;
|
|
3275
|
+
constructor(runtime: IScriptRuntime);
|
|
3276
|
+
dispatch(event: IEvent): void;
|
|
3277
|
+
onEvent(handler: (event: IEvent) => void): Unsubscribe;
|
|
3278
|
+
dispose(): void;
|
|
3279
|
+
}
|
|
3280
|
+
|
|
3281
|
+
/**
|
|
3282
|
+
* SubscriptionManager — fans out runtime stack and output events to
|
|
3283
|
+
* multiple IRuntimeSubscription instances.
|
|
3284
|
+
*
|
|
3285
|
+
* Lifecycle:
|
|
3286
|
+
* 1. Created when a runtime is initialized (by RuntimeLifecycleProvider)
|
|
3287
|
+
* 2. Always holds a LocalRuntimeSubscription for the browser UI
|
|
3288
|
+
* 3. ChromecastRuntimeSubscription added/removed via cast session lifecycle
|
|
3289
|
+
* 4. Disposed when the runtime is disposed
|
|
3290
|
+
*
|
|
3291
|
+
* The manager subscribes once to the runtime's stack and output APIs,
|
|
3292
|
+
* then iterates over all registered subscriptions for each event.
|
|
3293
|
+
*/
|
|
3294
|
+
declare class SubscriptionManager {
|
|
3295
|
+
private readonly runtime;
|
|
3296
|
+
private subscriptions;
|
|
3297
|
+
private stackUnsub;
|
|
3298
|
+
private outputUnsub;
|
|
3299
|
+
private disposed;
|
|
3300
|
+
constructor(runtime: IScriptRuntime);
|
|
3301
|
+
/**
|
|
3302
|
+
* Register a subscription. If a subscription with the same ID already exists,
|
|
3303
|
+
* the old one is disposed and replaced.
|
|
3304
|
+
*
|
|
3305
|
+
* New subscriptions immediately receive the current stack state and any
|
|
3306
|
+
* existing output statements to catch them up.
|
|
3307
|
+
*/
|
|
3308
|
+
add(subscription: IRuntimeSubscription): void;
|
|
3309
|
+
/**
|
|
3310
|
+
* Remove and dispose a subscription by ID.
|
|
3311
|
+
* Returns true if the subscription was found and removed.
|
|
3312
|
+
*/
|
|
3313
|
+
remove(id: string): boolean;
|
|
3314
|
+
/**
|
|
3315
|
+
* Check if a subscription with the given ID is registered.
|
|
3316
|
+
*/
|
|
3317
|
+
has(id: string): boolean;
|
|
3318
|
+
/**
|
|
3319
|
+
* Get the number of active subscriptions.
|
|
3320
|
+
*/
|
|
3321
|
+
get count(): number;
|
|
3322
|
+
/**
|
|
3323
|
+
* Dispose all subscriptions and unsubscribe from the runtime.
|
|
3324
|
+
*/
|
|
3325
|
+
dispose(): void;
|
|
3326
|
+
}
|
|
3327
|
+
|
|
3157
3328
|
/**
|
|
3158
3329
|
* AST for the composed-calculation expression language (spec §2).
|
|
3159
3330
|
*
|
|
@@ -4085,95 +4256,6 @@ interface CalcAnalysis {
|
|
|
4085
4256
|
}
|
|
4086
4257
|
declare function buildStaticLookups(): LookupRegistry;
|
|
4087
4258
|
|
|
4088
|
-
declare const index_ABSENT: typeof ABSENT;
|
|
4089
|
-
declare const index_AGGREGATE_BUILTINS: typeof AGGREGATE_BUILTINS;
|
|
4090
|
-
declare const index_AUTHORITATIVE_CASTS: typeof AUTHORITATIVE_CASTS;
|
|
4091
|
-
declare const index_BUILTIN_CALCS: typeof BUILTIN_CALCS;
|
|
4092
|
-
type index_BinaryOp = BinaryOp;
|
|
4093
|
-
declare const index_CONTEXT_ATOMS: typeof CONTEXT_ATOMS;
|
|
4094
|
-
type index_CalcAnalysis = CalcAnalysis;
|
|
4095
|
-
type index_CalcDiagnostic = CalcDiagnostic;
|
|
4096
|
-
type index_CalcEngine = CalcEngine;
|
|
4097
|
-
declare const index_CalcEngine: typeof CalcEngine;
|
|
4098
|
-
type index_CalcEngineDeps = CalcEngineDeps;
|
|
4099
|
-
type index_CalcEvalError = CalcEvalError;
|
|
4100
|
-
declare const index_CalcEvalError: typeof CalcEvalError;
|
|
4101
|
-
type index_CalcLine = CalcLine;
|
|
4102
|
-
type index_CalcNode = CalcNode;
|
|
4103
|
-
type index_CalcOrigin = CalcOrigin;
|
|
4104
|
-
type index_CalcParseError = CalcParseError;
|
|
4105
|
-
declare const index_CalcParseError: typeof CalcParseError;
|
|
4106
|
-
type index_CalcRegistrationError = CalcRegistrationError;
|
|
4107
|
-
declare const index_CalcRegistrationError: typeof CalcRegistrationError;
|
|
4108
|
-
type index_CalcScope = CalcScope;
|
|
4109
|
-
type index_CalcStack = CalcStack;
|
|
4110
|
-
type index_CalcStackOptions = CalcStackOptions;
|
|
4111
|
-
type index_CalcUnitError = CalcUnitError;
|
|
4112
|
-
declare const index_CalcUnitError: typeof CalcUnitError;
|
|
4113
|
-
type index_CalcVariant = CalcVariant;
|
|
4114
|
-
type index_CalculationRegistry = CalculationRegistry;
|
|
4115
|
-
declare const index_CalculationRegistry: typeof CalculationRegistry;
|
|
4116
|
-
type index_CompiledLineForm = CompiledLineForm;
|
|
4117
|
-
declare const index_DIM_COUNT: typeof DIM_COUNT;
|
|
4118
|
-
declare const index_DIM_ENERGY: typeof DIM_ENERGY;
|
|
4119
|
-
declare const index_DIM_LENGTH: typeof DIM_LENGTH;
|
|
4120
|
-
declare const index_DIM_MASS: typeof DIM_MASS;
|
|
4121
|
-
declare const index_DIM_TIME: typeof DIM_TIME;
|
|
4122
|
-
declare const index_DIM_ZERO: typeof DIM_ZERO;
|
|
4123
|
-
type index_DimVector = DimVector;
|
|
4124
|
-
type index_EvalContext = EvalContext;
|
|
4125
|
-
type index_ExprNode = ExprNode;
|
|
4126
|
-
type index_ILookupTable = ILookupTable;
|
|
4127
|
-
type index_IProfileSource = IProfileSource;
|
|
4128
|
-
type index_LineFormScope = LineFormScope;
|
|
4129
|
-
type index_LookupFieldDef = LookupFieldDef;
|
|
4130
|
-
type index_LookupLayer = LookupLayer;
|
|
4131
|
-
type index_LookupRegistry = LookupRegistry;
|
|
4132
|
-
declare const index_LookupRegistry: typeof LookupRegistry;
|
|
4133
|
-
declare const index_NAMED_COMPOUNDS: typeof NAMED_COMPOUNDS;
|
|
4134
|
-
declare const index_REST_EXCLUSION: typeof REST_EXCLUSION;
|
|
4135
|
-
declare const index_RPE_LABELS: typeof RPE_LABELS;
|
|
4136
|
-
declare const index_STORE_CALCS: typeof STORE_CALCS;
|
|
4137
|
-
declare const index_STREAM_ATOMS: typeof STREAM_ATOMS;
|
|
4138
|
-
type index_StaticEnv = StaticEnv;
|
|
4139
|
-
type index_StreamAtomDef = StreamAtomDef;
|
|
4140
|
-
declare const index_UNITS: typeof UNITS;
|
|
4141
|
-
type index_UnitDef = UnitDef;
|
|
4142
|
-
type index_Val = Val;
|
|
4143
|
-
declare const index_addDim: typeof addDim;
|
|
4144
|
-
declare const index_buildStaticLookups: typeof buildStaticLookups;
|
|
4145
|
-
declare const index_checkCalcLine: typeof checkCalcLine;
|
|
4146
|
-
declare const index_compileLineForm: typeof compileLineForm;
|
|
4147
|
-
declare const index_composeDivUnit: typeof composeDivUnit;
|
|
4148
|
-
declare const index_composeMulUnit: typeof composeMulUnit;
|
|
4149
|
-
declare const index_compoundName: typeof compoundName;
|
|
4150
|
-
declare const index_convertScalar: typeof convertScalar;
|
|
4151
|
-
declare const index_createCalcEngine: typeof createCalcEngine;
|
|
4152
|
-
declare const index_createCalcStack: typeof createCalcStack;
|
|
4153
|
-
declare const index_createDisciplinesTable: typeof createDisciplinesTable;
|
|
4154
|
-
declare const index_createEffortTable: typeof createEffortTable;
|
|
4155
|
-
declare const index_createProfileTable: typeof createProfileTable;
|
|
4156
|
-
declare const index_createRpeLabelsTable: typeof createRpeLabelsTable;
|
|
4157
|
-
declare const index_dimEquals: typeof dimEquals;
|
|
4158
|
-
declare const index_evaluate: typeof evaluate;
|
|
4159
|
-
declare const index_formatDim: typeof formatDim;
|
|
4160
|
-
declare const index_getUnit: typeof getUnit;
|
|
4161
|
-
declare const index_inferDim: typeof inferDim;
|
|
4162
|
-
declare const index_isDimensionless: typeof isDimensionless;
|
|
4163
|
-
declare const index_num: typeof num;
|
|
4164
|
-
declare const index_outputNodeId: typeof outputNodeId;
|
|
4165
|
-
declare const index_outputNodeIds: typeof outputNodeIds;
|
|
4166
|
-
declare const index_parseCalcLine: typeof parseCalcLine;
|
|
4167
|
-
declare const index_parseExpression: typeof parseExpression;
|
|
4168
|
-
declare const index_printCalculation: typeof printCalculation;
|
|
4169
|
-
declare const index_str: typeof str;
|
|
4170
|
-
declare const index_subDim: typeof subDim;
|
|
4171
|
-
declare const index_truthy: typeof truthy;
|
|
4172
|
-
declare const index_validateOutputUnit: typeof validateOutputUnit;
|
|
4173
|
-
declare namespace index {
|
|
4174
|
-
export { index_ABSENT as ABSENT, index_AGGREGATE_BUILTINS as AGGREGATE_BUILTINS, index_AUTHORITATIVE_CASTS as AUTHORITATIVE_CASTS, index_BUILTIN_CALCS as BUILTIN_CALCS, type index_BinaryOp as BinaryOp, index_CONTEXT_ATOMS as CONTEXT_ATOMS, type index_CalcAnalysis as CalcAnalysis, type index_CalcDiagnostic as CalcDiagnostic, index_CalcEngine as CalcEngine, type index_CalcEngineDeps as CalcEngineDeps, index_CalcEvalError as CalcEvalError, type index_CalcLine as CalcLine, type index_CalcNode as CalcNode, type index_CalcOrigin as CalcOrigin, index_CalcParseError as CalcParseError, index_CalcRegistrationError as CalcRegistrationError, type index_CalcScope as CalcScope, type index_CalcStack as CalcStack, type index_CalcStackOptions as CalcStackOptions, index_CalcUnitError as CalcUnitError, type index_CalcVariant as CalcVariant, type CalculationDefinition$1 as CalculationDefinition, index_CalculationRegistry as CalculationRegistry, type index_CompiledLineForm as CompiledLineForm, index_DIM_COUNT as DIM_COUNT, index_DIM_ENERGY as DIM_ENERGY, index_DIM_LENGTH as DIM_LENGTH, index_DIM_MASS as DIM_MASS, index_DIM_TIME as DIM_TIME, index_DIM_ZERO as DIM_ZERO, type index_DimVector as DimVector, type index_EvalContext as EvalContext, type index_ExprNode as ExprNode, type index_ILookupTable as ILookupTable, type index_IProfileSource as IProfileSource, type index_LineFormScope as LineFormScope, type index_LookupFieldDef as LookupFieldDef, type index_LookupLayer as LookupLayer, index_LookupRegistry as LookupRegistry, index_NAMED_COMPOUNDS as NAMED_COMPOUNDS, index_REST_EXCLUSION as REST_EXCLUSION, index_RPE_LABELS as RPE_LABELS, index_STORE_CALCS as STORE_CALCS, index_STREAM_ATOMS as STREAM_ATOMS, type index_StaticEnv as StaticEnv, type index_StreamAtomDef as StreamAtomDef, index_UNITS as UNITS, type index_UnitDef as UnitDef, type index_Val as Val, index_addDim as addDim, index_buildStaticLookups as buildStaticLookups, index_checkCalcLine as checkCalcLine, index_compileLineForm as compileLineForm, index_composeDivUnit as composeDivUnit, index_composeMulUnit as composeMulUnit, index_compoundName as compoundName, index_convertScalar as convertScalar, index_createCalcEngine as createCalcEngine, index_createCalcStack as createCalcStack, index_createDisciplinesTable as createDisciplinesTable, index_createEffortTable as createEffortTable, index_createProfileTable as createProfileTable, index_createRpeLabelsTable as createRpeLabelsTable, index_dimEquals as dimEquals, index_evaluate as evaluate, index_formatDim as formatDim, index_getUnit as getUnit, index_inferDim as inferDim, index_isDimensionless as isDimensionless, index_num as num, index_outputNodeId as outputNodeId, index_outputNodeIds as outputNodeIds, index_parseCalcLine as parseCalcLine, index_parseExpression as parseExpression, index_printCalculation as printCalculation, index_str as str, index_subDim as subDim, index_truthy as truthy, index_validateOutputUnit as validateOutputUnit };
|
|
4175
|
-
}
|
|
4176
|
-
|
|
4177
4259
|
/**
|
|
4178
4260
|
* workloadRollup — pure workload-window math behind Rollup Facts
|
|
4179
4261
|
* (CONTEXT.md §Analytics). Foster sRPE periodization over daily SessionLoad:
|
|
@@ -4226,13 +4308,13 @@ declare function toStoredOutputStatement(output: IOutputStatement | OutputStatem
|
|
|
4226
4308
|
* Auto-generated build version metadata.
|
|
4227
4309
|
* Do not edit directly; updated by scripts/stamp-version.ts
|
|
4228
4310
|
*/
|
|
4229
|
-
declare const VERSION = "0.1.
|
|
4230
|
-
declare const GIT_SHA = "
|
|
4231
|
-
declare const BUILD_TIME = "2026-08-18T18:
|
|
4311
|
+
declare const VERSION = "0.1.14";
|
|
4312
|
+
declare const GIT_SHA = "ce7593a";
|
|
4313
|
+
declare const BUILD_TIME = "2026-08-18T18:26:56.537Z";
|
|
4232
4314
|
declare const SEMVER: {
|
|
4233
|
-
readonly version: "0.1.
|
|
4234
|
-
readonly gitSha: "
|
|
4235
|
-
readonly buildTime: "2026-08-18T18:
|
|
4315
|
+
readonly version: "0.1.14";
|
|
4316
|
+
readonly gitSha: "ce7593a";
|
|
4317
|
+
readonly buildTime: "2026-08-18T18:26:56.537Z";
|
|
4236
4318
|
};
|
|
4237
4319
|
|
|
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,
|
|
4320
|
+
export { ABSENT, AGGREGATE_BUILTINS, AUTHORITATIVE_CASTS, AbortSessionAction, type ActionDescriptor, type ActionPrimitive, AnalyticsContext, AnalyticsEngine, type AnalyticsProfileContext, type AnalyticsResult, AnalyticsTransformer, BUILD_TIME, BUILTIN_CALCS, BUNDLED_EFFORT_COUNT, BehaviorContext, type BinaryOp, BlockContext, BlockLifecycleOptions, CONSUMED_HINTS, CONSUMED_HINT_KEYS, CONTEXT_ATOMS, type CalcAnalysis, type CalculationDefinition$1 as CalcDefinition, type CalcDiagnostic, CalcEngine, type CalcEngineDeps, CalcEvalError, type CalcLine, type CalcNode, type CalcOrigin, CalcParseError, CalcRegistrationError, type CalcScope, type CalcStack, type CalcStackOptions, type UnitDef as CalcUnitDef, CalcUnitError, type CalcVariant, type CalculationDefinition as CalculateBlockDefinition, type CalculateBlockParseError, type CalculateBlockParseResult, CalculateBlockProcessor, type CalculationDefinition$1 as CalculationDefinition, CalculationRegistry, CardioDialect, ClearChildrenAction, ClimbDialect, type ClimbGradeMetricValue, type ClimbGradeSystem, ClimbMetricType, CompileAndPushBlockAction, type CompiledLineForm, CompletionDecision, type CreateAnalyticsEngineOptions, type CreateAnalyticsEngineResult, CrossFitDialect, DAY, DEFAULT_UNRESOLVED_EFFORT_MET, DIM_COUNT, DIM_ENERGY, DIM_LENGTH, DIM_MASS, DIM_TIME, DIM_ZERO, type DayRollup, DialectStack, type DimVector, type Dimension, type DurationPrimitive, EFFORT_DATA_METRIC_TYPE, EffortBlock, type EffortBlockConfig, type EffortPrimitive, EffortRegistrySource, EffortResolutionOptions, EffortResolver, EffortResolverOptions, EmitEventAction, EmitSystemOutputAction, ErrorAction, type EvalContext, EventBus, type EventHandlerRegistration, ExecutionContext, type ExecutionSnapshot, type ExprNode, type FuzzyCandidate, GIT_SHA, HabitsDialect, type HeadingPrimitive, IAnalyticsEngine, type IAnalyticsProfile, IBlockContext, type ICastSubscription, IEffort, IEffortRegistry, IEffortResolver, IEvent, IEventBus, IEventHandler, IJitCompiler, type ILookupTable, IMemoryLocation, IMemoryReference, type IMetricPresentationPolicy, INowProvider, type IProfileSource, IRealtimeProcessor, IRuntimeAction, IRuntimeBehavior, IRuntimeBlock, type IRuntimeBlockStrategy, IRuntimeClock, type IRuntimeFactory, IRuntimeStack, type IRuntimeSubscription, IScript, IScriptRuntime, ISummaryProcessor, InMemoryEffortRegistry, JitCompiler, type LapPrimitive, type LineFormScope, type LineLocator, LocalEventProvider, LocalRuntimeSubscription, type LogLevel, type LookupFieldDef, type LookupLayer, LookupRegistry, MdTimerRuntime, type MemoryEntry, MemoryTag, MemoryTypeEnum, type MetricObjectPrimitive, type MetricPresentationSurface, type MetricPresentationToken, type MetricRenderKind, type MetricTone, MetricVisibility, type MockClock, NAMED_COMPOUNDS, NextAction, NextEvent, NextEventHandler, OutputEmitter, PREDEFINED_SOUNDS, PRODUCTION_STRATEGIES, type ParseOptions, PlaySoundAction, PopBlockAction, type PredefinedSoundName, ProjectionResult, type PropertyPrimitive, PushBlockAction, PushRestBlockAction, type QuantityPrimitive, REST_EXCLUSION, RPE_LABELS, RegisterEventHandlerAction, Registry, ResolvedEffort, type ResolvedEffortData, RestBlock, type RestBlockConfig, type RoundsPrimitive, RuntimeAdapter, RuntimeBlock, type RuntimeBlockOptions, RuntimeBuilder, type RuntimeButton, RuntimeClock, type RuntimeController, type RuntimeControls, RuntimeError, RuntimeFactory, type RuntimeLogEntry, RuntimeLogger, RuntimeMemory, type RuntimeMemoryLocation, RuntimeObservers, RuntimeStack, SEMVER, STANDARD_UNITS, STORE_CALCS, STREAM_ATOMS, ScriptRuntime, type SegmentWithMetadata, SessionRootBlock, type SessionRootConfig, SnapshotClock, type SoundBehaviorConfig, type SoundCue, type SoundCueState, type SoundState, type SourceInput, type SpanList, StackObserver, StackSnapshot, StandardAnalyticsProfile, StartSessionAction, type StartSessionOptions, StartWorkoutAction, type StartWorkoutOptions, type StaticEnv, type StreamAtomDef, SubscriptionManager, type SyntaxFacts, type SyntaxMeta, type SyntaxPrimitive, type SyntaxStatement, type TextPrimitive, ThrowError, ThrowErrorAction, TimeSpan, TimerState, TwoPassEffortResolutionProcess, TypedMemoryReference, UNITS, type UnitDef$1 as UnitDef, type UnitMatch, UnitRegistry, UnitSet, UnitsDialect, UnregisterEventHandlerAction, Unsubscribe, UpdateNextPreviewAction, VERSION, type Val, WaitingToStartBlock, WhiteboardScript, WodDialect, YogaDialect, addDim, buildStaticLookups, buildTooltip, bundledEfforts, calculateElapsed, checkCalcLine, classifyStatements, closeCurrentSpan, commonFixtureSet, compileLineForm, composeDivUnit, composeMulUnit, compoundName, computeColumnLabel, computeLabel, computeWorkloadRollups, convertScalar, createAnalyticsEngineForBlock, createCalcEngine, createCalcStack, createCompiler, createDialectStack, createDisciplinesTable, createEffortTable, createLineLocator, createPolicy as createMetricPresentationPolicy, createMockClock, createParser, createProfileTable, createRpeLabelsTable, dailySessionLoads, dayBucket, dialectRegistry, dialectStack, dimEquals, evaluate, evaluateCalculateDefinitions, extractEffortData, extractMetrics, extractStatements, extractStatementsRaw, extractSyntaxFacts, findBestFuzzyMatch, fixtureBackSquat, fixtureBurpee, fixturePlank, fixtureRowing, fixtureRunning, fixtureUserCustom, fixtureUserOverride, formatDim, formatDuration, metricsToLabel as fragmentsToLabel, fullFixtureSet, fuseUnits, fuseUnitsInMetrics, getAnalyticsFromLogs, getAnalyticsFromRuntime, getHints, getUnit, hasHint, hintMetric, hintsToContainer, inferDim, isCastSubscription, isDimensionless, isTimeLikeMetric, isWithinThreshold, levenshteinDistance, metricPresentation, mutateTimerSpans, normalizeForFuzzy, num, openSpan, outputNodeId, outputNodeIds, parseCalcLine, parseCalculateBlock, parseExpression, parseScript, printCalculation, readTimer, realtimeProcessorRegistry, resolveDominantOrigin, sharedParser, startSpan, str, strategyRegistry, subDim, summaryProcessorRegistry, toStoredOutputStatement, truthy, validateOutputUnit, parser as whiteboardParser, whiteboardScript, whiteboardScriptLanguage };
|