@bitcobblers/wod-wiki-lang 0.59.2243 → 0.59.2244
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/{ScriptOutlineProjection-BnS5Xkgf.d.cts → ScriptOutlineProjection-BhzHfbnJ.d.cts} +4 -3
- package/dist/{ScriptOutlineProjection-BnS5Xkgf.d.ts → ScriptOutlineProjection-BhzHfbnJ.d.ts} +4 -3
- package/dist/index.cjs +7 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +40 -33
- package/dist/index.d.ts +40 -33
- package/dist/index.mjs +7 -5
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.cts +2 -2
- package/dist/react.d.ts +2 -2
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IMetric, MetricContainer, MetricOrigin, MetricType, IDialect, ICodeStatement, DialectAnalysis, TagIndex, ParsedCodeStatement, TagTypeRecord, Tag, TagMetricContribution, IOutputStatement, OutputStatementType, BlockKey, TagReferenceMetadata, ScriptBlock, FenceDialect, Segment, AnalyticsGroup, StoredOutputStatement, OutputStatement, TimeSpan as TimeSpan$1 } 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, P as ProjectionResult, 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, Q as IMemoryReference, V as RuntimeStackLogger, X as StackObserver, Y as StackSnapshot, Z as StackListener, _ as MemoryTypeEnum, $ as IAnchorValue, a0 as TimerPolarity, a1 as SoundProfile, a2 as ButtonConfig, a3 as IEventHandler, a4 as HandlerScope, a5 as IScriptRuntime, a6 as TestableBlockConfig, a7 as IRuntimeOptions, a8 as ScriptRuntime, a9 as EventHandlerOptions, aa as EventCallback, ab as TimerState, ac as CalculationDefinition, ad as PropertyRuleInput, ae as IRealtimeProcessor, af as ISummaryProcessor, ag as DimVector, ah as CalcLine, ai as ExprNode, aj as CalcScope, ak as ILookupTable, al as LookupRegistry, am as CalcRegistrationDiagnostic } from './ScriptOutlineProjection-
|
|
4
|
-
export { an as ABSENT, ao as BinaryOp, ap as ButtonVariant, aq as ButtonsState, ar as CalcEvalError, as as CalcNode, at as CalcOrigin, au as CalcVariant, av as ChildrenStatusState, aw as CompiledPropertySummaries, ax as CompletionState, ay as DEFAULT_RESOLVER_OPTIONS, az as DEFAULT_RUNTIME_OPTIONS, aA as DEFAULT_SOUND_PROFILE, aB as DIM_COUNT, aC as DIM_ENERGY, aD as DIM_LENGTH, aE as DIM_MASS, aF as DIM_TIME, aG as DIM_ZERO, aH as DISCIPLINE_FACTORS, aI as DisplayState, aJ as EFFORT_DISCIPLINES, aK as EFFORT_REGISTRY_ORIGINS, aL as EffortBaseAttributes, aM as EffortDerivation, aN as EffortDiscipline, aO as EffortMaterializer, aP as EffortResolvedFrom, aQ as EvalContext, aR as FenceDialect, aS as FragmentDisplayState, aT as FragmentState, aU as IAnalyticsProcessorDescriptor, aV as INTENSITY_TIERS, aW as IScript, aX as IntensityTier, aY as InterceptMode, aZ as LiveRoundSplitRow, a_ as LiveSessionTelemetryFrame, a$ as LiveSummaryMetric, b0 as LookupFieldDef, b1 as LookupLayer, b2 as MemoryLocation, b3 as MemoryType, b4 as MemoryTypeMap, b5 as MemoryValueOf, b6 as NAMED_COMPOUNDS, b7 as ProjectedRepTarget, b8 as ProjectedSecondaryTimer, b9 as PropertySourceLayer, ba as ReferenceCatalog, bb as ResolvedReferences, bc as RoundState, bd as RuntimeState, be as SEED_PRECEDENCE_RANK, bf as ScriptOutlineNode, bg as ScriptOutlineStatus, bh as ScriptRuntimeDependencies, bi as SeedPrecedenceTier, bj as SerializedTimerSpan, bk as SessionClockFrame, bl as SessionClockInputSignal, bm as SessionClockProjectionOptions, bn as SessionExecutionStatus, bo as SessionVisualPolarity, bp as ShakeOutQueueOptions, bq as ShakeOutResult, br as SkippedDependencyDiagnostic, bs as SoundRule, bt as SoundTriggerAnchor, bu as SoundTriggerPoint, bv as StackEvent, bw as StackedDashboardWidgetDescriptor, bx as TimerDirection, by as VISIBILITY_ICONS, bz as VISIBILITY_LABELS, bA as Val, bB as addDim, bC as compilePropertySummaryCalcs, bD as compilePropertySummaryCalcsWithDiagnostics, bE as compoundName, bF as createBrowserRuntimeNow, bG as createReferenceIndex, bH as dedupeEntitiesByPrecedence, bI as dimEquals, bJ as disciplineFactorFor, bK as evaluate, bL as extractPropertyRulesFromMeta, bM as extractStatementRefs, bN as extractTagPropertyRules, bO as filterTagsByVisibility, bP as formatDim, bQ as formatSoundTrigger, bR as frozenNow, bS as getMetricVisibility, bT as getRuntimeNowMs, bU as interpolateSessionClockFrame, bV as isDimensionless, bW as isEffortDiscipline, bX as isFragmentTag, bY as isRequiredCountdownLocked, bZ as num, b_ as observeSessionClockInputs, b$ as parseSoundTrigger, c0 as projectLiveSessionTelemetry, c1 as projectScriptOutline, c2 as projectSessionClock, c3 as resolveEntityRank, c4 as resolveEntityTier, c5 as resolveProfileRules, c6 as resolvePropertyDashboardWidgets, c7 as resolveSourceRank, c8 as resolveSourceTier, c9 as resolveVisualPolarity, ca as runMetricShakeOutQueue, cb as slugifyRefLabel, cc as str, cd as subDim, ce as synthesizeWorkoutFormat, cf as truthy, cg as wallClockNow } from './ScriptOutlineProjection-
|
|
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, P as ProjectionResult, 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, Q as IMemoryReference, V as RuntimeStackLogger, X as StackObserver, Y as StackSnapshot, Z as StackListener, _ as MemoryTypeEnum, $ as IAnchorValue, a0 as TimerPolarity, a1 as SoundProfile, a2 as ButtonConfig, a3 as IEventHandler, a4 as HandlerScope, a5 as IScriptRuntime, a6 as TestableBlockConfig, a7 as IRuntimeOptions, a8 as ScriptRuntime, a9 as EventHandlerOptions, aa as EventCallback, ab as TimerState, ac as CalculationDefinition, ad as PropertyRuleInput, ae as IRealtimeProcessor, af as ISummaryProcessor, ag as DimVector, ah as CalcLine, ai as ExprNode, aj as CalcScope, ak as ILookupTable, al as LookupRegistry, am as CalcRegistrationDiagnostic } from './ScriptOutlineProjection-BhzHfbnJ.cjs';
|
|
4
|
+
export { an as ABSENT, ao as BinaryOp, ap as ButtonVariant, aq as ButtonsState, ar as CalcEvalError, as as CalcNode, at as CalcOrigin, au as CalcVariant, av as ChildrenStatusState, aw as CompiledPropertySummaries, ax as CompletionState, ay as DEFAULT_RESOLVER_OPTIONS, az as DEFAULT_RUNTIME_OPTIONS, aA as DEFAULT_SOUND_PROFILE, aB as DIM_COUNT, aC as DIM_ENERGY, aD as DIM_LENGTH, aE as DIM_MASS, aF as DIM_TIME, aG as DIM_ZERO, aH as DISCIPLINE_FACTORS, aI as DisplayState, aJ as EFFORT_DISCIPLINES, aK as EFFORT_REGISTRY_ORIGINS, aL as EffortBaseAttributes, aM as EffortDerivation, aN as EffortDiscipline, aO as EffortMaterializer, aP as EffortResolvedFrom, aQ as EvalContext, aR as FenceDialect, aS as FragmentDisplayState, aT as FragmentState, aU as IAnalyticsProcessorDescriptor, aV as INTENSITY_TIERS, aW as IScript, aX as IntensityTier, aY as InterceptMode, aZ as LiveRoundSplitRow, a_ as LiveSessionTelemetryFrame, a$ as LiveSummaryMetric, b0 as LookupFieldDef, b1 as LookupLayer, b2 as MemoryLocation, b3 as MemoryType, b4 as MemoryTypeMap, b5 as MemoryValueOf, b6 as NAMED_COMPOUNDS, b7 as ProjectedRepTarget, b8 as ProjectedSecondaryTimer, b9 as PropertySourceLayer, ba as ReferenceCatalog, bb as ResolvedReferences, bc as RoundState, bd as RuntimeState, be as SEED_PRECEDENCE_RANK, bf as ScriptOutlineNode, bg as ScriptOutlineStatus, bh as ScriptRuntimeDependencies, bi as SeedPrecedenceTier, bj as SerializedTimerSpan, bk as SessionClockFrame, bl as SessionClockInputSignal, bm as SessionClockProjectionOptions, bn as SessionExecutionStatus, bo as SessionVisualPolarity, bp as ShakeOutQueueOptions, bq as ShakeOutResult, br as SkippedDependencyDiagnostic, bs as SoundRule, bt as SoundTriggerAnchor, bu as SoundTriggerPoint, bv as StackEvent, bw as StackedDashboardWidgetDescriptor, bx as TimerDirection, by as VISIBILITY_ICONS, bz as VISIBILITY_LABELS, bA as Val, bB as addDim, bC as compilePropertySummaryCalcs, bD as compilePropertySummaryCalcsWithDiagnostics, bE as compoundName, bF as createBrowserRuntimeNow, bG as createReferenceIndex, bH as dedupeEntitiesByPrecedence, bI as dimEquals, bJ as disciplineFactorFor, bK as evaluate, bL as extractPropertyRulesFromMeta, bM as extractStatementRefs, bN as extractTagPropertyRules, bO as filterTagsByVisibility, bP as formatDim, bQ as formatSoundTrigger, bR as frozenNow, bS as getMetricVisibility, bT as getRuntimeNowMs, bU as interpolateSessionClockFrame, bV as isDimensionless, bW as isEffortDiscipline, bX as isFragmentTag, bY as isRequiredCountdownLocked, bZ as num, b_ as observeSessionClockInputs, b$ as parseSoundTrigger, c0 as projectLiveSessionTelemetry, c1 as projectScriptOutline, c2 as projectSessionClock, c3 as resolveEntityRank, c4 as resolveEntityTier, c5 as resolveProfileRules, c6 as resolvePropertyDashboardWidgets, c7 as resolveSourceRank, c8 as resolveSourceTier, c9 as resolveVisualPolarity, ca as runMetricShakeOutQueue, cb as slugifyRefLabel, cc as str, cd as subDim, ce as synthesizeWorkoutFormat, cf as truthy, cg as wallClockNow } from './ScriptOutlineProjection-BhzHfbnJ.cjs';
|
|
5
5
|
import { Tree } from '@lezer/common';
|
|
6
6
|
import { LanguageSupport, LRLanguage } from '@codemirror/language';
|
|
7
7
|
import { CompletionSource, Completion } from '@codemirror/autocomplete';
|
|
@@ -32,7 +32,7 @@ declare class Registry<T extends {
|
|
|
32
32
|
id: string;
|
|
33
33
|
priority?: number;
|
|
34
34
|
}> {
|
|
35
|
-
private items;
|
|
35
|
+
private readonly items;
|
|
36
36
|
constructor(defaults?: readonly T[]);
|
|
37
37
|
/**
|
|
38
38
|
* Register an item. If an item with the same `id` already exists it is
|
|
@@ -736,8 +736,11 @@ declare function extractStatementsRaw(sourceOrTree: SourceInput, treeArg?: Tree,
|
|
|
736
736
|
* every statement here, so every parse consumer gets fused units and sport
|
|
737
737
|
* hints uniformly. See `DialectStack.ts`.
|
|
738
738
|
*
|
|
739
|
-
* @param
|
|
739
|
+
* @param sourceOrTree - WhiteboardScript source text or pre-parsed Lezer tree.
|
|
740
|
+
* @param sportOrTree - The block's `:sport` fence suffix (` ```log:climbing `) or pre-parsed Lezer tree.
|
|
740
741
|
* Omitted → the full registry stack runs. See {@link DialectStack.dialectsFor}.
|
|
742
|
+
* @param sportArg - Optional `:sport` suffix when `sportOrTree` is a `Tree`.
|
|
743
|
+
* @param references - Optional resolved catalog references for enrichment.
|
|
741
744
|
*/
|
|
742
745
|
declare function extractStatements(sourceOrTree: SourceInput, sportOrTree?: string | Tree, sportArg?: string, references?: ParseReferences): ICodeStatement[];
|
|
743
746
|
|
|
@@ -779,6 +782,7 @@ declare class MdTimerRuntime {
|
|
|
779
782
|
* Parse WhiteboardScript source into a {@link WhiteboardScript}, running the
|
|
780
783
|
* Dialect Stack on every statement.
|
|
781
784
|
*
|
|
785
|
+
* @param inputText - Raw WhiteboardScript source text.
|
|
782
786
|
* @param sport - The block's `:sport` fence suffix (` ```log:climbing `).
|
|
783
787
|
*/
|
|
784
788
|
read(inputText: string, sport?: string): WhiteboardScript;
|
|
@@ -1025,7 +1029,7 @@ declare function tagCategoryRecordToDocument(category: string, record?: TagTypeR
|
|
|
1025
1029
|
|
|
1026
1030
|
declare class EffortResolver implements IEffortResolver {
|
|
1027
1031
|
private readonly registry;
|
|
1028
|
-
private options;
|
|
1032
|
+
private readonly options;
|
|
1029
1033
|
constructor(registry: IEffortRegistry, options?: EffortResolverOptions);
|
|
1030
1034
|
resolveBySlug(slug: string): IEffort | null;
|
|
1031
1035
|
resolveByAlias(label: string): IEffort | null;
|
|
@@ -1055,8 +1059,8 @@ declare class EffortResolver implements IEffortResolver {
|
|
|
1055
1059
|
* - Bundled seed fallback
|
|
1056
1060
|
*/
|
|
1057
1061
|
declare class InMemoryEffortRegistry implements IEffortRegistry {
|
|
1058
|
-
private efforts;
|
|
1059
|
-
private sourceFilter;
|
|
1062
|
+
private readonly efforts;
|
|
1063
|
+
private readonly sourceFilter;
|
|
1060
1064
|
private initialized;
|
|
1061
1065
|
constructor(sourceFilter?: EffortRegistrySource);
|
|
1062
1066
|
/** Seed with bundled efforts */
|
|
@@ -1412,7 +1416,7 @@ declare class ErrorAction implements IRuntimeAction {
|
|
|
1412
1416
|
*/
|
|
1413
1417
|
declare class OutputEmitter {
|
|
1414
1418
|
private _outputStatements;
|
|
1415
|
-
private _outputListeners;
|
|
1419
|
+
private readonly _outputListeners;
|
|
1416
1420
|
private _analyticsEngine;
|
|
1417
1421
|
/** Session-scoped latch: summary outputs are appended once per session. */
|
|
1418
1422
|
private _analyticsFinalized;
|
|
@@ -1541,7 +1545,7 @@ declare class BehaviorContext implements IBehaviorContext {
|
|
|
1541
1545
|
readonly block: IRuntimeBlock;
|
|
1542
1546
|
readonly clock: IRuntimeClock;
|
|
1543
1547
|
readonly stackLevel: number;
|
|
1544
|
-
private runtime;
|
|
1548
|
+
private readonly runtime;
|
|
1545
1549
|
private subscriptions;
|
|
1546
1550
|
/**
|
|
1547
1551
|
* Capabilities registered on this context (or shared from the persistent
|
|
@@ -1556,7 +1560,7 @@ declare class BehaviorContext implements IBehaviorContext {
|
|
|
1556
1560
|
* the shared Set so all contexts for the same block observe the same
|
|
1557
1561
|
* capabilities.
|
|
1558
1562
|
*/
|
|
1559
|
-
private _capabilities;
|
|
1563
|
+
private readonly _capabilities;
|
|
1560
1564
|
constructor(block: IRuntimeBlock, clock: IRuntimeClock, stackLevel: number, runtime: IRuntimeContext, sharedCapabilities?: Set<string>);
|
|
1561
1565
|
get nowProvider(): INowProvider;
|
|
1562
1566
|
subscribe(eventType: BehaviorEventType, listener: BehaviorEventListener, options?: SubscribeOptions): Unsubscribe$1;
|
|
@@ -1909,7 +1913,7 @@ declare class RuntimeLoggerImpl {
|
|
|
1909
1913
|
private readonly _console;
|
|
1910
1914
|
private _enabled;
|
|
1911
1915
|
private _history;
|
|
1912
|
-
private _maxHistory;
|
|
1916
|
+
private readonly _maxHistory;
|
|
1913
1917
|
private readonly EVENT_STYLES;
|
|
1914
1918
|
constructor();
|
|
1915
1919
|
get enabled(): boolean;
|
|
@@ -2024,7 +2028,7 @@ type RuntimeMemoryLocation = {
|
|
|
2024
2028
|
* events to the EventBus. This keeps RuntimeMemory decoupled from the event system.
|
|
2025
2029
|
*/
|
|
2026
2030
|
declare class RuntimeMemory implements IRuntimeMemory {
|
|
2027
|
-
private _references;
|
|
2031
|
+
private readonly _references;
|
|
2028
2032
|
allocate<T>(type: string, ownerId: string, initialValue?: T, visibility?: 'public' | 'private' | 'inherited'): TypedMemoryReference<T>;
|
|
2029
2033
|
get<T>(reference: TypedMemoryReference<T>): T | undefined;
|
|
2030
2034
|
set<T>(reference: TypedMemoryReference<T>, value: T): void;
|
|
@@ -2166,7 +2170,7 @@ declare class BlockContext implements IBlockContext {
|
|
|
2166
2170
|
readonly exerciseId: string;
|
|
2167
2171
|
private _references;
|
|
2168
2172
|
private _released;
|
|
2169
|
-
private _memory;
|
|
2173
|
+
private readonly _memory;
|
|
2170
2174
|
constructor(runtime: IRuntimeContext, ownerId: string, exerciseId?: string, initialReferences?: IMemoryReference[], memory?: IRuntimeMemory);
|
|
2171
2175
|
get references(): ReadonlyArray<IMemoryReference>;
|
|
2172
2176
|
allocate<T>(type: MemoryTypeEnum | string, initialValue?: T, visibility?: 'public' | 'private' | 'inherited'): TypedMemoryReference<T>;
|
|
@@ -2268,7 +2272,7 @@ interface CountupTimerConfig {
|
|
|
2268
2272
|
declare class CountupTimerBehavior implements IRuntimeBehavior {
|
|
2269
2273
|
readonly config: CountupTimerConfig;
|
|
2270
2274
|
constructor(config?: CountupTimerConfig);
|
|
2271
|
-
private subscriptions;
|
|
2275
|
+
private readonly subscriptions;
|
|
2272
2276
|
private isPaused;
|
|
2273
2277
|
private firstNextSeen;
|
|
2274
2278
|
onMount(ctx: IBehaviorContext): IRuntimeAction[];
|
|
@@ -2326,7 +2330,7 @@ interface CountdownTimerConfig {
|
|
|
2326
2330
|
declare class CountdownTimerBehavior implements IRuntimeBehavior {
|
|
2327
2331
|
readonly config: CountdownTimerConfig;
|
|
2328
2332
|
constructor(config: CountdownTimerConfig);
|
|
2329
|
-
private subscriptions;
|
|
2333
|
+
private readonly subscriptions;
|
|
2330
2334
|
private isPaused;
|
|
2331
2335
|
onMount(ctx: IBehaviorContext): IRuntimeAction[];
|
|
2332
2336
|
onNext(ctx: IBehaviorContext): IRuntimeAction[];
|
|
@@ -2639,7 +2643,7 @@ interface SoundProfileBehaviorConfig {
|
|
|
2639
2643
|
* command.
|
|
2640
2644
|
*/
|
|
2641
2645
|
declare class SoundProfileBehavior implements IRuntimeBehavior {
|
|
2642
|
-
private config;
|
|
2646
|
+
private readonly config;
|
|
2643
2647
|
private rules;
|
|
2644
2648
|
/** Rule indices already fired, so each rule fires exactly once. */
|
|
2645
2649
|
private readonly fired;
|
|
@@ -2657,6 +2661,7 @@ declare class SoundProfileBehavior implements IRuntimeBehavior {
|
|
|
2657
2661
|
/**
|
|
2658
2662
|
* Fire every rule whose trigger point has been reached.
|
|
2659
2663
|
*
|
|
2664
|
+
* @param ctx active behavior context
|
|
2660
2665
|
* @param elapsed milliseconds elapsed on the block's timer
|
|
2661
2666
|
* @param durationMs the block's total duration
|
|
2662
2667
|
* @param ending whether the block is ending — a rule anchored to the end
|
|
@@ -2706,7 +2711,7 @@ interface ControlsConfig {
|
|
|
2706
2711
|
* ```
|
|
2707
2712
|
*/
|
|
2708
2713
|
declare class ButtonBehavior implements IRuntimeBehavior {
|
|
2709
|
-
private config;
|
|
2714
|
+
private readonly config;
|
|
2710
2715
|
constructor(config: ControlsConfig);
|
|
2711
2716
|
onMount(ctx: IBehaviorContext): IRuntimeAction[];
|
|
2712
2717
|
onNext(_ctx: IBehaviorContext): IRuntimeAction[];
|
|
@@ -2772,8 +2777,8 @@ interface RepeaterConfig {
|
|
|
2772
2777
|
*/
|
|
2773
2778
|
type BehaviorConstructor<T extends IRuntimeBehavior> = new (...args: any[]) => T;
|
|
2774
2779
|
declare class BlockBuilder {
|
|
2775
|
-
private runtime;
|
|
2776
|
-
private behaviors;
|
|
2780
|
+
private readonly runtime;
|
|
2781
|
+
private readonly behaviors;
|
|
2777
2782
|
private context;
|
|
2778
2783
|
private key;
|
|
2779
2784
|
private label;
|
|
@@ -3013,7 +3018,7 @@ interface IRuntimeEventProvider {
|
|
|
3013
3018
|
declare class PushBlockAction implements IRuntimeAction {
|
|
3014
3019
|
readonly block: IRuntimeBlock;
|
|
3015
3020
|
private readonly options;
|
|
3016
|
-
private _type;
|
|
3021
|
+
private readonly _type;
|
|
3017
3022
|
constructor(block: IRuntimeBlock, options?: BlockLifecycleOptions);
|
|
3018
3023
|
get type(): string;
|
|
3019
3024
|
set type(_value: string);
|
|
@@ -3419,7 +3424,7 @@ declare function ThrowError(error: Error, source: string): IRuntimeAction;
|
|
|
3419
3424
|
*/
|
|
3420
3425
|
declare class ExecutionContext implements IRuntimeContext {
|
|
3421
3426
|
private readonly _runtime;
|
|
3422
|
-
private _workList;
|
|
3427
|
+
private readonly _workList;
|
|
3423
3428
|
private _iteration;
|
|
3424
3429
|
private readonly _maxIterations;
|
|
3425
3430
|
private readonly _snapshotClock;
|
|
@@ -3508,8 +3513,8 @@ interface IPromotionResolver {
|
|
|
3508
3513
|
* Coordinates strategy application to build composed RuntimeBlocks.
|
|
3509
3514
|
*/
|
|
3510
3515
|
declare class JitCompiler implements IJitCompiler {
|
|
3511
|
-
private strategies;
|
|
3512
|
-
private _promotionResolver;
|
|
3516
|
+
private readonly strategies;
|
|
3517
|
+
private readonly _promotionResolver;
|
|
3513
3518
|
constructor(strategies?: IRuntimeBlockStrategy[], promotionResolver?: IPromotionResolver);
|
|
3514
3519
|
registerStrategy(strategy: IRuntimeBlockStrategy): void;
|
|
3515
3520
|
compile(nodes: ICodeStatement[], runtime: IRuntimeContext): IRuntimeBlock | undefined;
|
|
@@ -3610,7 +3615,7 @@ declare class RuntimeFactory implements IRuntimeFactory {
|
|
|
3610
3615
|
declare class RuntimeBuilder {
|
|
3611
3616
|
private readonly script;
|
|
3612
3617
|
private readonly compiler;
|
|
3613
|
-
private options;
|
|
3618
|
+
private readonly options;
|
|
3614
3619
|
private nowProvider;
|
|
3615
3620
|
constructor(script: WhiteboardScript, compiler: JitCompiler);
|
|
3616
3621
|
/**
|
|
@@ -4064,8 +4069,8 @@ type EventHandlerRegistration = {
|
|
|
4064
4069
|
* of which block is active. They do not produce actions and cannot affect runtime state.
|
|
4065
4070
|
*/
|
|
4066
4071
|
declare class EventBus implements IEventBus {
|
|
4067
|
-
private handlersByEvent;
|
|
4068
|
-
private callbacksByEvent;
|
|
4072
|
+
private readonly handlersByEvent;
|
|
4073
|
+
private readonly callbacksByEvent;
|
|
4069
4074
|
register(eventName: string, handler: IEventHandler, ownerId: string, options?: EventHandlerOptions): () => void;
|
|
4070
4075
|
on(eventName: string, callback: EventCallback, ownerId: string): () => void;
|
|
4071
4076
|
unregisterById(handlerId: string): void;
|
|
@@ -4095,8 +4100,8 @@ declare class NextEvent implements IEvent {
|
|
|
4095
4100
|
}
|
|
4096
4101
|
|
|
4097
4102
|
declare class NextEventHandler implements IEventHandler {
|
|
4098
|
-
private _id;
|
|
4099
|
-
private _name;
|
|
4103
|
+
private readonly _id;
|
|
4104
|
+
private readonly _name;
|
|
4100
4105
|
constructor(id: string);
|
|
4101
4106
|
get id(): string;
|
|
4102
4107
|
set id(_value: string);
|
|
@@ -4565,7 +4570,7 @@ declare class LocalEventProvider implements IRuntimeEventProvider {
|
|
|
4565
4570
|
*/
|
|
4566
4571
|
declare class SubscriptionManager {
|
|
4567
4572
|
private readonly runtime;
|
|
4568
|
-
private subscriptions;
|
|
4573
|
+
private readonly subscriptions;
|
|
4569
4574
|
private stackUnsub;
|
|
4570
4575
|
private outputUnsub;
|
|
4571
4576
|
private disposed;
|
|
@@ -4647,9 +4652,9 @@ interface IAnalyticsProfile {
|
|
|
4647
4652
|
}
|
|
4648
4653
|
|
|
4649
4654
|
declare class AnalyticsEngine implements IAnalyticsEngine {
|
|
4650
|
-
private realtimeProcessors;
|
|
4651
|
-
private summaryProcessors;
|
|
4652
|
-
private outputHistory;
|
|
4655
|
+
private readonly realtimeProcessors;
|
|
4656
|
+
private readonly summaryProcessors;
|
|
4657
|
+
private readonly outputHistory;
|
|
4653
4658
|
/** Emits a live 'analytics' snapshot per segment so the UI updates in real time. */
|
|
4654
4659
|
private _onLiveOutput?;
|
|
4655
4660
|
private _liveProjections;
|
|
@@ -5457,7 +5462,9 @@ declare class FixtureSyntaxError extends Error {
|
|
|
5457
5462
|
declare function canonicalizeType(token: string): string;
|
|
5458
5463
|
/**
|
|
5459
5464
|
* Parse one `- …` expectation line.
|
|
5460
|
-
* @param
|
|
5465
|
+
* @param line raw `- …` expectation line.
|
|
5466
|
+
* @param file fixture file path for diagnostics.
|
|
5467
|
+
* @param lineNo 1-based line number for diagnostics.
|
|
5461
5468
|
*/
|
|
5462
5469
|
declare function parseMetricLine(line: string, file: string, lineNo: number): MetricLine;
|
|
5463
5470
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IMetric, MetricContainer, MetricOrigin, MetricType, IDialect, ICodeStatement, DialectAnalysis, TagIndex, ParsedCodeStatement, TagTypeRecord, Tag, TagMetricContribution, IOutputStatement, OutputStatementType, BlockKey, TagReferenceMetadata, ScriptBlock, FenceDialect, Segment, AnalyticsGroup, StoredOutputStatement, OutputStatement, TimeSpan as TimeSpan$1 } 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, P as ProjectionResult, 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, Q as IMemoryReference, V as RuntimeStackLogger, X as StackObserver, Y as StackSnapshot, Z as StackListener, _ as MemoryTypeEnum, $ as IAnchorValue, a0 as TimerPolarity, a1 as SoundProfile, a2 as ButtonConfig, a3 as IEventHandler, a4 as HandlerScope, a5 as IScriptRuntime, a6 as TestableBlockConfig, a7 as IRuntimeOptions, a8 as ScriptRuntime, a9 as EventHandlerOptions, aa as EventCallback, ab as TimerState, ac as CalculationDefinition, ad as PropertyRuleInput, ae as IRealtimeProcessor, af as ISummaryProcessor, ag as DimVector, ah as CalcLine, ai as ExprNode, aj as CalcScope, ak as ILookupTable, al as LookupRegistry, am as CalcRegistrationDiagnostic } from './ScriptOutlineProjection-
|
|
4
|
-
export { an as ABSENT, ao as BinaryOp, ap as ButtonVariant, aq as ButtonsState, ar as CalcEvalError, as as CalcNode, at as CalcOrigin, au as CalcVariant, av as ChildrenStatusState, aw as CompiledPropertySummaries, ax as CompletionState, ay as DEFAULT_RESOLVER_OPTIONS, az as DEFAULT_RUNTIME_OPTIONS, aA as DEFAULT_SOUND_PROFILE, aB as DIM_COUNT, aC as DIM_ENERGY, aD as DIM_LENGTH, aE as DIM_MASS, aF as DIM_TIME, aG as DIM_ZERO, aH as DISCIPLINE_FACTORS, aI as DisplayState, aJ as EFFORT_DISCIPLINES, aK as EFFORT_REGISTRY_ORIGINS, aL as EffortBaseAttributes, aM as EffortDerivation, aN as EffortDiscipline, aO as EffortMaterializer, aP as EffortResolvedFrom, aQ as EvalContext, aR as FenceDialect, aS as FragmentDisplayState, aT as FragmentState, aU as IAnalyticsProcessorDescriptor, aV as INTENSITY_TIERS, aW as IScript, aX as IntensityTier, aY as InterceptMode, aZ as LiveRoundSplitRow, a_ as LiveSessionTelemetryFrame, a$ as LiveSummaryMetric, b0 as LookupFieldDef, b1 as LookupLayer, b2 as MemoryLocation, b3 as MemoryType, b4 as MemoryTypeMap, b5 as MemoryValueOf, b6 as NAMED_COMPOUNDS, b7 as ProjectedRepTarget, b8 as ProjectedSecondaryTimer, b9 as PropertySourceLayer, ba as ReferenceCatalog, bb as ResolvedReferences, bc as RoundState, bd as RuntimeState, be as SEED_PRECEDENCE_RANK, bf as ScriptOutlineNode, bg as ScriptOutlineStatus, bh as ScriptRuntimeDependencies, bi as SeedPrecedenceTier, bj as SerializedTimerSpan, bk as SessionClockFrame, bl as SessionClockInputSignal, bm as SessionClockProjectionOptions, bn as SessionExecutionStatus, bo as SessionVisualPolarity, bp as ShakeOutQueueOptions, bq as ShakeOutResult, br as SkippedDependencyDiagnostic, bs as SoundRule, bt as SoundTriggerAnchor, bu as SoundTriggerPoint, bv as StackEvent, bw as StackedDashboardWidgetDescriptor, bx as TimerDirection, by as VISIBILITY_ICONS, bz as VISIBILITY_LABELS, bA as Val, bB as addDim, bC as compilePropertySummaryCalcs, bD as compilePropertySummaryCalcsWithDiagnostics, bE as compoundName, bF as createBrowserRuntimeNow, bG as createReferenceIndex, bH as dedupeEntitiesByPrecedence, bI as dimEquals, bJ as disciplineFactorFor, bK as evaluate, bL as extractPropertyRulesFromMeta, bM as extractStatementRefs, bN as extractTagPropertyRules, bO as filterTagsByVisibility, bP as formatDim, bQ as formatSoundTrigger, bR as frozenNow, bS as getMetricVisibility, bT as getRuntimeNowMs, bU as interpolateSessionClockFrame, bV as isDimensionless, bW as isEffortDiscipline, bX as isFragmentTag, bY as isRequiredCountdownLocked, bZ as num, b_ as observeSessionClockInputs, b$ as parseSoundTrigger, c0 as projectLiveSessionTelemetry, c1 as projectScriptOutline, c2 as projectSessionClock, c3 as resolveEntityRank, c4 as resolveEntityTier, c5 as resolveProfileRules, c6 as resolvePropertyDashboardWidgets, c7 as resolveSourceRank, c8 as resolveSourceTier, c9 as resolveVisualPolarity, ca as runMetricShakeOutQueue, cb as slugifyRefLabel, cc as str, cd as subDim, ce as synthesizeWorkoutFormat, cf as truthy, cg as wallClockNow } from './ScriptOutlineProjection-
|
|
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, P as ProjectionResult, 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, Q as IMemoryReference, V as RuntimeStackLogger, X as StackObserver, Y as StackSnapshot, Z as StackListener, _ as MemoryTypeEnum, $ as IAnchorValue, a0 as TimerPolarity, a1 as SoundProfile, a2 as ButtonConfig, a3 as IEventHandler, a4 as HandlerScope, a5 as IScriptRuntime, a6 as TestableBlockConfig, a7 as IRuntimeOptions, a8 as ScriptRuntime, a9 as EventHandlerOptions, aa as EventCallback, ab as TimerState, ac as CalculationDefinition, ad as PropertyRuleInput, ae as IRealtimeProcessor, af as ISummaryProcessor, ag as DimVector, ah as CalcLine, ai as ExprNode, aj as CalcScope, ak as ILookupTable, al as LookupRegistry, am as CalcRegistrationDiagnostic } from './ScriptOutlineProjection-BhzHfbnJ.js';
|
|
4
|
+
export { an as ABSENT, ao as BinaryOp, ap as ButtonVariant, aq as ButtonsState, ar as CalcEvalError, as as CalcNode, at as CalcOrigin, au as CalcVariant, av as ChildrenStatusState, aw as CompiledPropertySummaries, ax as CompletionState, ay as DEFAULT_RESOLVER_OPTIONS, az as DEFAULT_RUNTIME_OPTIONS, aA as DEFAULT_SOUND_PROFILE, aB as DIM_COUNT, aC as DIM_ENERGY, aD as DIM_LENGTH, aE as DIM_MASS, aF as DIM_TIME, aG as DIM_ZERO, aH as DISCIPLINE_FACTORS, aI as DisplayState, aJ as EFFORT_DISCIPLINES, aK as EFFORT_REGISTRY_ORIGINS, aL as EffortBaseAttributes, aM as EffortDerivation, aN as EffortDiscipline, aO as EffortMaterializer, aP as EffortResolvedFrom, aQ as EvalContext, aR as FenceDialect, aS as FragmentDisplayState, aT as FragmentState, aU as IAnalyticsProcessorDescriptor, aV as INTENSITY_TIERS, aW as IScript, aX as IntensityTier, aY as InterceptMode, aZ as LiveRoundSplitRow, a_ as LiveSessionTelemetryFrame, a$ as LiveSummaryMetric, b0 as LookupFieldDef, b1 as LookupLayer, b2 as MemoryLocation, b3 as MemoryType, b4 as MemoryTypeMap, b5 as MemoryValueOf, b6 as NAMED_COMPOUNDS, b7 as ProjectedRepTarget, b8 as ProjectedSecondaryTimer, b9 as PropertySourceLayer, ba as ReferenceCatalog, bb as ResolvedReferences, bc as RoundState, bd as RuntimeState, be as SEED_PRECEDENCE_RANK, bf as ScriptOutlineNode, bg as ScriptOutlineStatus, bh as ScriptRuntimeDependencies, bi as SeedPrecedenceTier, bj as SerializedTimerSpan, bk as SessionClockFrame, bl as SessionClockInputSignal, bm as SessionClockProjectionOptions, bn as SessionExecutionStatus, bo as SessionVisualPolarity, bp as ShakeOutQueueOptions, bq as ShakeOutResult, br as SkippedDependencyDiagnostic, bs as SoundRule, bt as SoundTriggerAnchor, bu as SoundTriggerPoint, bv as StackEvent, bw as StackedDashboardWidgetDescriptor, bx as TimerDirection, by as VISIBILITY_ICONS, bz as VISIBILITY_LABELS, bA as Val, bB as addDim, bC as compilePropertySummaryCalcs, bD as compilePropertySummaryCalcsWithDiagnostics, bE as compoundName, bF as createBrowserRuntimeNow, bG as createReferenceIndex, bH as dedupeEntitiesByPrecedence, bI as dimEquals, bJ as disciplineFactorFor, bK as evaluate, bL as extractPropertyRulesFromMeta, bM as extractStatementRefs, bN as extractTagPropertyRules, bO as filterTagsByVisibility, bP as formatDim, bQ as formatSoundTrigger, bR as frozenNow, bS as getMetricVisibility, bT as getRuntimeNowMs, bU as interpolateSessionClockFrame, bV as isDimensionless, bW as isEffortDiscipline, bX as isFragmentTag, bY as isRequiredCountdownLocked, bZ as num, b_ as observeSessionClockInputs, b$ as parseSoundTrigger, c0 as projectLiveSessionTelemetry, c1 as projectScriptOutline, c2 as projectSessionClock, c3 as resolveEntityRank, c4 as resolveEntityTier, c5 as resolveProfileRules, c6 as resolvePropertyDashboardWidgets, c7 as resolveSourceRank, c8 as resolveSourceTier, c9 as resolveVisualPolarity, ca as runMetricShakeOutQueue, cb as slugifyRefLabel, cc as str, cd as subDim, ce as synthesizeWorkoutFormat, cf as truthy, cg as wallClockNow } from './ScriptOutlineProjection-BhzHfbnJ.js';
|
|
5
5
|
import { Tree } from '@lezer/common';
|
|
6
6
|
import { LanguageSupport, LRLanguage } from '@codemirror/language';
|
|
7
7
|
import { CompletionSource, Completion } from '@codemirror/autocomplete';
|
|
@@ -32,7 +32,7 @@ declare class Registry<T extends {
|
|
|
32
32
|
id: string;
|
|
33
33
|
priority?: number;
|
|
34
34
|
}> {
|
|
35
|
-
private items;
|
|
35
|
+
private readonly items;
|
|
36
36
|
constructor(defaults?: readonly T[]);
|
|
37
37
|
/**
|
|
38
38
|
* Register an item. If an item with the same `id` already exists it is
|
|
@@ -736,8 +736,11 @@ declare function extractStatementsRaw(sourceOrTree: SourceInput, treeArg?: Tree,
|
|
|
736
736
|
* every statement here, so every parse consumer gets fused units and sport
|
|
737
737
|
* hints uniformly. See `DialectStack.ts`.
|
|
738
738
|
*
|
|
739
|
-
* @param
|
|
739
|
+
* @param sourceOrTree - WhiteboardScript source text or pre-parsed Lezer tree.
|
|
740
|
+
* @param sportOrTree - The block's `:sport` fence suffix (` ```log:climbing `) or pre-parsed Lezer tree.
|
|
740
741
|
* Omitted → the full registry stack runs. See {@link DialectStack.dialectsFor}.
|
|
742
|
+
* @param sportArg - Optional `:sport` suffix when `sportOrTree` is a `Tree`.
|
|
743
|
+
* @param references - Optional resolved catalog references for enrichment.
|
|
741
744
|
*/
|
|
742
745
|
declare function extractStatements(sourceOrTree: SourceInput, sportOrTree?: string | Tree, sportArg?: string, references?: ParseReferences): ICodeStatement[];
|
|
743
746
|
|
|
@@ -779,6 +782,7 @@ declare class MdTimerRuntime {
|
|
|
779
782
|
* Parse WhiteboardScript source into a {@link WhiteboardScript}, running the
|
|
780
783
|
* Dialect Stack on every statement.
|
|
781
784
|
*
|
|
785
|
+
* @param inputText - Raw WhiteboardScript source text.
|
|
782
786
|
* @param sport - The block's `:sport` fence suffix (` ```log:climbing `).
|
|
783
787
|
*/
|
|
784
788
|
read(inputText: string, sport?: string): WhiteboardScript;
|
|
@@ -1025,7 +1029,7 @@ declare function tagCategoryRecordToDocument(category: string, record?: TagTypeR
|
|
|
1025
1029
|
|
|
1026
1030
|
declare class EffortResolver implements IEffortResolver {
|
|
1027
1031
|
private readonly registry;
|
|
1028
|
-
private options;
|
|
1032
|
+
private readonly options;
|
|
1029
1033
|
constructor(registry: IEffortRegistry, options?: EffortResolverOptions);
|
|
1030
1034
|
resolveBySlug(slug: string): IEffort | null;
|
|
1031
1035
|
resolveByAlias(label: string): IEffort | null;
|
|
@@ -1055,8 +1059,8 @@ declare class EffortResolver implements IEffortResolver {
|
|
|
1055
1059
|
* - Bundled seed fallback
|
|
1056
1060
|
*/
|
|
1057
1061
|
declare class InMemoryEffortRegistry implements IEffortRegistry {
|
|
1058
|
-
private efforts;
|
|
1059
|
-
private sourceFilter;
|
|
1062
|
+
private readonly efforts;
|
|
1063
|
+
private readonly sourceFilter;
|
|
1060
1064
|
private initialized;
|
|
1061
1065
|
constructor(sourceFilter?: EffortRegistrySource);
|
|
1062
1066
|
/** Seed with bundled efforts */
|
|
@@ -1412,7 +1416,7 @@ declare class ErrorAction implements IRuntimeAction {
|
|
|
1412
1416
|
*/
|
|
1413
1417
|
declare class OutputEmitter {
|
|
1414
1418
|
private _outputStatements;
|
|
1415
|
-
private _outputListeners;
|
|
1419
|
+
private readonly _outputListeners;
|
|
1416
1420
|
private _analyticsEngine;
|
|
1417
1421
|
/** Session-scoped latch: summary outputs are appended once per session. */
|
|
1418
1422
|
private _analyticsFinalized;
|
|
@@ -1541,7 +1545,7 @@ declare class BehaviorContext implements IBehaviorContext {
|
|
|
1541
1545
|
readonly block: IRuntimeBlock;
|
|
1542
1546
|
readonly clock: IRuntimeClock;
|
|
1543
1547
|
readonly stackLevel: number;
|
|
1544
|
-
private runtime;
|
|
1548
|
+
private readonly runtime;
|
|
1545
1549
|
private subscriptions;
|
|
1546
1550
|
/**
|
|
1547
1551
|
* Capabilities registered on this context (or shared from the persistent
|
|
@@ -1556,7 +1560,7 @@ declare class BehaviorContext implements IBehaviorContext {
|
|
|
1556
1560
|
* the shared Set so all contexts for the same block observe the same
|
|
1557
1561
|
* capabilities.
|
|
1558
1562
|
*/
|
|
1559
|
-
private _capabilities;
|
|
1563
|
+
private readonly _capabilities;
|
|
1560
1564
|
constructor(block: IRuntimeBlock, clock: IRuntimeClock, stackLevel: number, runtime: IRuntimeContext, sharedCapabilities?: Set<string>);
|
|
1561
1565
|
get nowProvider(): INowProvider;
|
|
1562
1566
|
subscribe(eventType: BehaviorEventType, listener: BehaviorEventListener, options?: SubscribeOptions): Unsubscribe$1;
|
|
@@ -1909,7 +1913,7 @@ declare class RuntimeLoggerImpl {
|
|
|
1909
1913
|
private readonly _console;
|
|
1910
1914
|
private _enabled;
|
|
1911
1915
|
private _history;
|
|
1912
|
-
private _maxHistory;
|
|
1916
|
+
private readonly _maxHistory;
|
|
1913
1917
|
private readonly EVENT_STYLES;
|
|
1914
1918
|
constructor();
|
|
1915
1919
|
get enabled(): boolean;
|
|
@@ -2024,7 +2028,7 @@ type RuntimeMemoryLocation = {
|
|
|
2024
2028
|
* events to the EventBus. This keeps RuntimeMemory decoupled from the event system.
|
|
2025
2029
|
*/
|
|
2026
2030
|
declare class RuntimeMemory implements IRuntimeMemory {
|
|
2027
|
-
private _references;
|
|
2031
|
+
private readonly _references;
|
|
2028
2032
|
allocate<T>(type: string, ownerId: string, initialValue?: T, visibility?: 'public' | 'private' | 'inherited'): TypedMemoryReference<T>;
|
|
2029
2033
|
get<T>(reference: TypedMemoryReference<T>): T | undefined;
|
|
2030
2034
|
set<T>(reference: TypedMemoryReference<T>, value: T): void;
|
|
@@ -2166,7 +2170,7 @@ declare class BlockContext implements IBlockContext {
|
|
|
2166
2170
|
readonly exerciseId: string;
|
|
2167
2171
|
private _references;
|
|
2168
2172
|
private _released;
|
|
2169
|
-
private _memory;
|
|
2173
|
+
private readonly _memory;
|
|
2170
2174
|
constructor(runtime: IRuntimeContext, ownerId: string, exerciseId?: string, initialReferences?: IMemoryReference[], memory?: IRuntimeMemory);
|
|
2171
2175
|
get references(): ReadonlyArray<IMemoryReference>;
|
|
2172
2176
|
allocate<T>(type: MemoryTypeEnum | string, initialValue?: T, visibility?: 'public' | 'private' | 'inherited'): TypedMemoryReference<T>;
|
|
@@ -2268,7 +2272,7 @@ interface CountupTimerConfig {
|
|
|
2268
2272
|
declare class CountupTimerBehavior implements IRuntimeBehavior {
|
|
2269
2273
|
readonly config: CountupTimerConfig;
|
|
2270
2274
|
constructor(config?: CountupTimerConfig);
|
|
2271
|
-
private subscriptions;
|
|
2275
|
+
private readonly subscriptions;
|
|
2272
2276
|
private isPaused;
|
|
2273
2277
|
private firstNextSeen;
|
|
2274
2278
|
onMount(ctx: IBehaviorContext): IRuntimeAction[];
|
|
@@ -2326,7 +2330,7 @@ interface CountdownTimerConfig {
|
|
|
2326
2330
|
declare class CountdownTimerBehavior implements IRuntimeBehavior {
|
|
2327
2331
|
readonly config: CountdownTimerConfig;
|
|
2328
2332
|
constructor(config: CountdownTimerConfig);
|
|
2329
|
-
private subscriptions;
|
|
2333
|
+
private readonly subscriptions;
|
|
2330
2334
|
private isPaused;
|
|
2331
2335
|
onMount(ctx: IBehaviorContext): IRuntimeAction[];
|
|
2332
2336
|
onNext(ctx: IBehaviorContext): IRuntimeAction[];
|
|
@@ -2639,7 +2643,7 @@ interface SoundProfileBehaviorConfig {
|
|
|
2639
2643
|
* command.
|
|
2640
2644
|
*/
|
|
2641
2645
|
declare class SoundProfileBehavior implements IRuntimeBehavior {
|
|
2642
|
-
private config;
|
|
2646
|
+
private readonly config;
|
|
2643
2647
|
private rules;
|
|
2644
2648
|
/** Rule indices already fired, so each rule fires exactly once. */
|
|
2645
2649
|
private readonly fired;
|
|
@@ -2657,6 +2661,7 @@ declare class SoundProfileBehavior implements IRuntimeBehavior {
|
|
|
2657
2661
|
/**
|
|
2658
2662
|
* Fire every rule whose trigger point has been reached.
|
|
2659
2663
|
*
|
|
2664
|
+
* @param ctx active behavior context
|
|
2660
2665
|
* @param elapsed milliseconds elapsed on the block's timer
|
|
2661
2666
|
* @param durationMs the block's total duration
|
|
2662
2667
|
* @param ending whether the block is ending — a rule anchored to the end
|
|
@@ -2706,7 +2711,7 @@ interface ControlsConfig {
|
|
|
2706
2711
|
* ```
|
|
2707
2712
|
*/
|
|
2708
2713
|
declare class ButtonBehavior implements IRuntimeBehavior {
|
|
2709
|
-
private config;
|
|
2714
|
+
private readonly config;
|
|
2710
2715
|
constructor(config: ControlsConfig);
|
|
2711
2716
|
onMount(ctx: IBehaviorContext): IRuntimeAction[];
|
|
2712
2717
|
onNext(_ctx: IBehaviorContext): IRuntimeAction[];
|
|
@@ -2772,8 +2777,8 @@ interface RepeaterConfig {
|
|
|
2772
2777
|
*/
|
|
2773
2778
|
type BehaviorConstructor<T extends IRuntimeBehavior> = new (...args: any[]) => T;
|
|
2774
2779
|
declare class BlockBuilder {
|
|
2775
|
-
private runtime;
|
|
2776
|
-
private behaviors;
|
|
2780
|
+
private readonly runtime;
|
|
2781
|
+
private readonly behaviors;
|
|
2777
2782
|
private context;
|
|
2778
2783
|
private key;
|
|
2779
2784
|
private label;
|
|
@@ -3013,7 +3018,7 @@ interface IRuntimeEventProvider {
|
|
|
3013
3018
|
declare class PushBlockAction implements IRuntimeAction {
|
|
3014
3019
|
readonly block: IRuntimeBlock;
|
|
3015
3020
|
private readonly options;
|
|
3016
|
-
private _type;
|
|
3021
|
+
private readonly _type;
|
|
3017
3022
|
constructor(block: IRuntimeBlock, options?: BlockLifecycleOptions);
|
|
3018
3023
|
get type(): string;
|
|
3019
3024
|
set type(_value: string);
|
|
@@ -3419,7 +3424,7 @@ declare function ThrowError(error: Error, source: string): IRuntimeAction;
|
|
|
3419
3424
|
*/
|
|
3420
3425
|
declare class ExecutionContext implements IRuntimeContext {
|
|
3421
3426
|
private readonly _runtime;
|
|
3422
|
-
private _workList;
|
|
3427
|
+
private readonly _workList;
|
|
3423
3428
|
private _iteration;
|
|
3424
3429
|
private readonly _maxIterations;
|
|
3425
3430
|
private readonly _snapshotClock;
|
|
@@ -3508,8 +3513,8 @@ interface IPromotionResolver {
|
|
|
3508
3513
|
* Coordinates strategy application to build composed RuntimeBlocks.
|
|
3509
3514
|
*/
|
|
3510
3515
|
declare class JitCompiler implements IJitCompiler {
|
|
3511
|
-
private strategies;
|
|
3512
|
-
private _promotionResolver;
|
|
3516
|
+
private readonly strategies;
|
|
3517
|
+
private readonly _promotionResolver;
|
|
3513
3518
|
constructor(strategies?: IRuntimeBlockStrategy[], promotionResolver?: IPromotionResolver);
|
|
3514
3519
|
registerStrategy(strategy: IRuntimeBlockStrategy): void;
|
|
3515
3520
|
compile(nodes: ICodeStatement[], runtime: IRuntimeContext): IRuntimeBlock | undefined;
|
|
@@ -3610,7 +3615,7 @@ declare class RuntimeFactory implements IRuntimeFactory {
|
|
|
3610
3615
|
declare class RuntimeBuilder {
|
|
3611
3616
|
private readonly script;
|
|
3612
3617
|
private readonly compiler;
|
|
3613
|
-
private options;
|
|
3618
|
+
private readonly options;
|
|
3614
3619
|
private nowProvider;
|
|
3615
3620
|
constructor(script: WhiteboardScript, compiler: JitCompiler);
|
|
3616
3621
|
/**
|
|
@@ -4064,8 +4069,8 @@ type EventHandlerRegistration = {
|
|
|
4064
4069
|
* of which block is active. They do not produce actions and cannot affect runtime state.
|
|
4065
4070
|
*/
|
|
4066
4071
|
declare class EventBus implements IEventBus {
|
|
4067
|
-
private handlersByEvent;
|
|
4068
|
-
private callbacksByEvent;
|
|
4072
|
+
private readonly handlersByEvent;
|
|
4073
|
+
private readonly callbacksByEvent;
|
|
4069
4074
|
register(eventName: string, handler: IEventHandler, ownerId: string, options?: EventHandlerOptions): () => void;
|
|
4070
4075
|
on(eventName: string, callback: EventCallback, ownerId: string): () => void;
|
|
4071
4076
|
unregisterById(handlerId: string): void;
|
|
@@ -4095,8 +4100,8 @@ declare class NextEvent implements IEvent {
|
|
|
4095
4100
|
}
|
|
4096
4101
|
|
|
4097
4102
|
declare class NextEventHandler implements IEventHandler {
|
|
4098
|
-
private _id;
|
|
4099
|
-
private _name;
|
|
4103
|
+
private readonly _id;
|
|
4104
|
+
private readonly _name;
|
|
4100
4105
|
constructor(id: string);
|
|
4101
4106
|
get id(): string;
|
|
4102
4107
|
set id(_value: string);
|
|
@@ -4565,7 +4570,7 @@ declare class LocalEventProvider implements IRuntimeEventProvider {
|
|
|
4565
4570
|
*/
|
|
4566
4571
|
declare class SubscriptionManager {
|
|
4567
4572
|
private readonly runtime;
|
|
4568
|
-
private subscriptions;
|
|
4573
|
+
private readonly subscriptions;
|
|
4569
4574
|
private stackUnsub;
|
|
4570
4575
|
private outputUnsub;
|
|
4571
4576
|
private disposed;
|
|
@@ -4647,9 +4652,9 @@ interface IAnalyticsProfile {
|
|
|
4647
4652
|
}
|
|
4648
4653
|
|
|
4649
4654
|
declare class AnalyticsEngine implements IAnalyticsEngine {
|
|
4650
|
-
private realtimeProcessors;
|
|
4651
|
-
private summaryProcessors;
|
|
4652
|
-
private outputHistory;
|
|
4655
|
+
private readonly realtimeProcessors;
|
|
4656
|
+
private readonly summaryProcessors;
|
|
4657
|
+
private readonly outputHistory;
|
|
4653
4658
|
/** Emits a live 'analytics' snapshot per segment so the UI updates in real time. */
|
|
4654
4659
|
private _onLiveOutput?;
|
|
4655
4660
|
private _liveProjections;
|
|
@@ -5457,7 +5462,9 @@ declare class FixtureSyntaxError extends Error {
|
|
|
5457
5462
|
declare function canonicalizeType(token: string): string;
|
|
5458
5463
|
/**
|
|
5459
5464
|
* Parse one `- …` expectation line.
|
|
5460
|
-
* @param
|
|
5465
|
+
* @param line raw `- …` expectation line.
|
|
5466
|
+
* @param file fixture file path for diagnostics.
|
|
5467
|
+
* @param lineNo 1-based line number for diagnostics.
|
|
5461
5468
|
*/
|
|
5462
5469
|
declare function parseMetricLine(line: string, file: string, lineNo: number): MetricLine;
|
|
5463
5470
|
|
package/dist/index.mjs
CHANGED
|
@@ -817,7 +817,7 @@ var ClimbDialect = class {
|
|
|
817
817
|
const metric = metrics[index];
|
|
818
818
|
const current = metricText(metric);
|
|
819
819
|
const next = metricText(metrics[index + 1]);
|
|
820
|
-
const vScale = current.match(/\bV(\d{1,2})
|
|
820
|
+
const vScale = current.match(/\bV(\d{1,2})[-+]?\b/i);
|
|
821
821
|
if (vScale) {
|
|
822
822
|
const gradeNumber = Number(vScale[1]);
|
|
823
823
|
return { raw: vScale[0].toUpperCase(), system: "v-scale", normalizedRank: gradeNumber };
|
|
@@ -833,13 +833,13 @@ var ClimbDialect = class {
|
|
|
833
833
|
if (ydsInline) {
|
|
834
834
|
return { raw: ydsInline[0], system: "yds", normalizedRank: this.ydsRank(ydsInline[0]) };
|
|
835
835
|
}
|
|
836
|
-
const fontInline = current.match(/\b([3-9][ABC]
|
|
836
|
+
const fontInline = current.match(/\b([3-9][ABC]\+?)\b/);
|
|
837
837
|
if (fontInline) return { raw: fontInline[1], system: "font" };
|
|
838
838
|
if (typeof metric.value === "number" && metric.value >= 3 && metric.value <= 9) {
|
|
839
839
|
const suffix = next.match(/^\s*([ABC]\+?)\b/)?.[1];
|
|
840
840
|
if (suffix) return { raw: `${metric.value}${suffix}`, system: "font" };
|
|
841
841
|
}
|
|
842
|
-
const frenchInline = current.match(/\b([3-9][abc]
|
|
842
|
+
const frenchInline = current.match(/\b([3-9][abc]\+?)\b/);
|
|
843
843
|
if (frenchInline) return { raw: frenchInline[1], system: "french" };
|
|
844
844
|
}
|
|
845
845
|
return void 0;
|
|
@@ -2295,6 +2295,7 @@ var MdTimerRuntime = class {
|
|
|
2295
2295
|
* Parse WhiteboardScript source into a {@link WhiteboardScript}, running the
|
|
2296
2296
|
* Dialect Stack on every statement.
|
|
2297
2297
|
*
|
|
2298
|
+
* @param inputText - Raw WhiteboardScript source text.
|
|
2298
2299
|
* @param sport - The block's `:sport` fence suffix (` ```log:climbing `).
|
|
2299
2300
|
*/
|
|
2300
2301
|
read(inputText, sport) {
|
|
@@ -9698,7 +9699,7 @@ function parsePropertyMetricRule(key, rawValue, layer, sourceSlug) {
|
|
|
9698
9699
|
const amount = Number(qtyMatch[1]);
|
|
9699
9700
|
const unitStr = qtyMatch[2];
|
|
9700
9701
|
const knownUnit = getUnit(unitStr);
|
|
9701
|
-
if (!Number.isNaN(amount) && (knownUnit || /^(kg|lb|
|
|
9702
|
+
if (!Number.isNaN(amount) && (knownUnit || /^(kg|lb|[mshW%]|km|mi|min|ms|reps|cal|bpm|pts|AU)$/i.test(unitStr))) {
|
|
9702
9703
|
return {
|
|
9703
9704
|
kind: "static",
|
|
9704
9705
|
key: normalizedKey,
|
|
@@ -9811,7 +9812,7 @@ function extractUnit(metric) {
|
|
|
9811
9812
|
function hasStatementOwnedMetric(container, key) {
|
|
9812
9813
|
const targetType = canonicalMetricType(key);
|
|
9813
9814
|
return container.rawMetrics.some(
|
|
9814
|
-
(m) => (m.type === targetType || m.type === key || m.name === key) && STATEMENT_OWNED_ORIGINS[m.origin]
|
|
9815
|
+
(m) => (m.type === targetType || m.type === key || m.name === key) && STATEMENT_OWNED_ORIGINS[m.origin]
|
|
9815
9816
|
);
|
|
9816
9817
|
}
|
|
9817
9818
|
function inferApproxDim(node, dims) {
|
|
@@ -10921,6 +10922,7 @@ var SoundProfileBehavior = class {
|
|
|
10921
10922
|
/**
|
|
10922
10923
|
* Fire every rule whose trigger point has been reached.
|
|
10923
10924
|
*
|
|
10925
|
+
* @param ctx active behavior context
|
|
10924
10926
|
* @param elapsed milliseconds elapsed on the block's timer
|
|
10925
10927
|
* @param durationMs the block's total duration
|
|
10926
10928
|
* @param ending whether the block is ending — a rule anchored to the end
|