@bitcobblers/wod-wiki-lang 0.56.2208 → 0.56.2210
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-XDMS3U3W.mjs → chunk-3F27TTFS.mjs} +34 -8
- package/dist/chunk-3F27TTFS.mjs.map +1 -0
- package/dist/index.cjs +45 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.mjs +15 -4
- package/dist/index.mjs.map +1 -1
- package/dist/react.cjs +32 -6
- package/dist/react.cjs.map +1 -1
- package/dist/react.mjs +2 -2
- package/package.json +2 -2
- package/dist/chunk-XDMS3U3W.mjs.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -2241,6 +2241,13 @@ interface CountupTimerConfig {
|
|
|
2241
2241
|
/** Timer role for display priority */
|
|
2242
2242
|
role?: 'primary' | 'secondary' | 'hidden' | 'auto';
|
|
2243
2243
|
polarity?: TimerPolarity;
|
|
2244
|
+
/**
|
|
2245
|
+
* Reset the initial open mount span to `now` on the first onNext.
|
|
2246
|
+
* SessionRootBlock enables this so the session clock starts at the
|
|
2247
|
+
* moment the WaitingToStart gate pops, not at session mount — the
|
|
2248
|
+
* athlete's idle wait at the gate is not workout time.
|
|
2249
|
+
*/
|
|
2250
|
+
resetOnFirstNext?: boolean;
|
|
2244
2251
|
}
|
|
2245
2252
|
/**
|
|
2246
2253
|
* CountupTimerBehavior manages the full lifecycle of a count-up timer.
|
|
@@ -2263,8 +2270,9 @@ declare class CountupTimerBehavior implements IRuntimeBehavior {
|
|
|
2263
2270
|
constructor(config?: CountupTimerConfig);
|
|
2264
2271
|
private subscriptions;
|
|
2265
2272
|
private isPaused;
|
|
2273
|
+
private firstNextSeen;
|
|
2266
2274
|
onMount(ctx: IBehaviorContext): IRuntimeAction[];
|
|
2267
|
-
onNext(
|
|
2275
|
+
onNext(ctx: IBehaviorContext): IRuntimeAction[];
|
|
2268
2276
|
onUnmount(ctx: IBehaviorContext): IRuntimeAction[];
|
|
2269
2277
|
onDispose(_ctx: IBehaviorContext): void;
|
|
2270
2278
|
private createFragment;
|
package/dist/index.d.ts
CHANGED
|
@@ -2241,6 +2241,13 @@ interface CountupTimerConfig {
|
|
|
2241
2241
|
/** Timer role for display priority */
|
|
2242
2242
|
role?: 'primary' | 'secondary' | 'hidden' | 'auto';
|
|
2243
2243
|
polarity?: TimerPolarity;
|
|
2244
|
+
/**
|
|
2245
|
+
* Reset the initial open mount span to `now` on the first onNext.
|
|
2246
|
+
* SessionRootBlock enables this so the session clock starts at the
|
|
2247
|
+
* moment the WaitingToStart gate pops, not at session mount — the
|
|
2248
|
+
* athlete's idle wait at the gate is not workout time.
|
|
2249
|
+
*/
|
|
2250
|
+
resetOnFirstNext?: boolean;
|
|
2244
2251
|
}
|
|
2245
2252
|
/**
|
|
2246
2253
|
* CountupTimerBehavior manages the full lifecycle of a count-up timer.
|
|
@@ -2263,8 +2270,9 @@ declare class CountupTimerBehavior implements IRuntimeBehavior {
|
|
|
2263
2270
|
constructor(config?: CountupTimerConfig);
|
|
2264
2271
|
private subscriptions;
|
|
2265
2272
|
private isPaused;
|
|
2273
|
+
private firstNextSeen;
|
|
2266
2274
|
onMount(ctx: IBehaviorContext): IRuntimeAction[];
|
|
2267
|
-
onNext(
|
|
2275
|
+
onNext(ctx: IBehaviorContext): IRuntimeAction[];
|
|
2268
2276
|
onUnmount(ctx: IBehaviorContext): IRuntimeAction[];
|
|
2269
2277
|
onDispose(_ctx: IBehaviorContext): void;
|
|
2270
2278
|
private createFragment;
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { UnitRegistry, hintsToContainer, hasHint, CONSUMED_HINTS, wallClockNow, TimeSpan, metricPresentation, hintMetric, resolveTagContributions, tagReferenceFor, tagContributionMetrics, tagMarkerType, collectTagReferences, tagMarkerSlugs, getHints } from './chunk-
|
|
2
|
-
export { CONSUMED_HINTS, CONSUMED_HINT_KEYS, MAX_TAG_CONTRIBUTION_DEPTH, STANDARD_UNITS, TAG_MARKER_PREFIX, TimeSpan, UnitRegistry, UnitSet, buildTooltip, calculateDuration, computeColumnLabel, computeLabel, createBrowserRuntimeNow, createPolicy as createMetricPresentationPolicy, findTagContributionCycles, formatDurationCompact, formatDurationSmart, formatSecondsHHMMSS, formatSecondsMMSS, formatTime, formatTimeHHMMSS, formatTimeMMSS, formatTimePrecise, formatTimestamp, frozenNow, getHints, getRuntimeNowMs, hasHint, hintMetric, hintsToContainer, interpolateSessionClockFrame, isRequiredCountdownLocked, isTimeLikeMetric, metricPresentation, observeSessionClockInputs, projectLiveSessionTelemetry, projectScriptOutline, projectSessionClock, resolveTagContributions, resolveVisualPolarity, roundToTenth, synthesizeWorkoutFormat, tagContributionMetrics, tagMarkerSlug, tagMarkerSlugs, tagMarkerType, wallClockNow } from './chunk-
|
|
1
|
+
import { UnitRegistry, hintsToContainer, hasHint, CONSUMED_HINTS, wallClockNow, TimeSpan, metricPresentation, hintMetric, resolveTagContributions, tagReferenceFor, tagContributionMetrics, tagMarkerType, collectTagReferences, tagMarkerSlugs, getHints } from './chunk-3F27TTFS.mjs';
|
|
2
|
+
export { CONSUMED_HINTS, CONSUMED_HINT_KEYS, MAX_TAG_CONTRIBUTION_DEPTH, STANDARD_UNITS, TAG_MARKER_PREFIX, TimeSpan, UnitRegistry, UnitSet, buildTooltip, calculateDuration, computeColumnLabel, computeLabel, createBrowserRuntimeNow, createPolicy as createMetricPresentationPolicy, findTagContributionCycles, formatDurationCompact, formatDurationSmart, formatSecondsHHMMSS, formatSecondsMMSS, formatTime, formatTimeHHMMSS, formatTimeMMSS, formatTimePrecise, formatTimestamp, frozenNow, getHints, getRuntimeNowMs, hasHint, hintMetric, hintsToContainer, interpolateSessionClockFrame, isRequiredCountdownLocked, isTimeLikeMetric, metricPresentation, observeSessionClockInputs, projectLiveSessionTelemetry, projectScriptOutline, projectSessionClock, resolveTagContributions, resolveVisualPolarity, roundToTenth, synthesizeWorkoutFormat, tagContributionMetrics, tagMarkerSlug, tagMarkerSlugs, tagMarkerType, wallClockNow } from './chunk-3F27TTFS.mjs';
|
|
3
3
|
import { MetricType, MetricContainer, BlockKey, REFERENCE_METADATA_KEY, ParsedCodeStatement, getReferenceMetadata, TAG_REFERENCE_METADATA_KEY, parseFrontmatter, getScalar, OutputStatement, valueKindOf, normalizeFieldPath } from '@bitcobblers/wod-wiki-core';
|
|
4
4
|
import { LRParser } from '@lezer/lr';
|
|
5
5
|
import { LRLanguage, LanguageSupport, syntaxTree } from '@codemirror/language';
|
|
@@ -7562,6 +7562,7 @@ var CountupTimerBehavior = class {
|
|
|
7562
7562
|
config;
|
|
7563
7563
|
subscriptions = [];
|
|
7564
7564
|
isPaused = false;
|
|
7565
|
+
firstNextSeen = false;
|
|
7565
7566
|
onMount(ctx) {
|
|
7566
7567
|
const now = ctx.clock.currentDate.getTime();
|
|
7567
7568
|
const label = this.config.label ?? ctx.block.label;
|
|
@@ -7591,7 +7592,14 @@ var CountupTimerBehavior = class {
|
|
|
7591
7592
|
);
|
|
7592
7593
|
return [];
|
|
7593
7594
|
}
|
|
7594
|
-
onNext(
|
|
7595
|
+
onNext(ctx) {
|
|
7596
|
+
if (this.config.resetOnFirstNext && !this.firstNextSeen) {
|
|
7597
|
+
this.firstNextSeen = true;
|
|
7598
|
+
mutateTimerSpans(
|
|
7599
|
+
ctx,
|
|
7600
|
+
(spans, nowMs) => spans.length === 1 && spans[0].ended === void 0 ? [new TimeSpan(nowMs)] : [...spans]
|
|
7601
|
+
);
|
|
7602
|
+
}
|
|
7595
7603
|
return [];
|
|
7596
7604
|
}
|
|
7597
7605
|
onUnmount(ctx) {
|
|
@@ -11635,7 +11643,10 @@ var SessionRootBlock = class _SessionRootBlock extends RuntimeBlock {
|
|
|
11635
11643
|
const sessionLabel = config.label ?? "Session";
|
|
11636
11644
|
behaviors.push(new CountupTimerBehavior({
|
|
11637
11645
|
label: sessionLabel,
|
|
11638
|
-
role: "auto"
|
|
11646
|
+
role: "auto",
|
|
11647
|
+
// The session clock starts when the WaitingToStart gate pops —
|
|
11648
|
+
// not at mount — so idle wait time never counts as workout time.
|
|
11649
|
+
resetOnFirstNext: true
|
|
11639
11650
|
}));
|
|
11640
11651
|
behaviors.push(new ChildSelectionBehavior({
|
|
11641
11652
|
childGroups: config.childGroups,
|