@titan-design/react-ui 0.2.7 → 0.4.0
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/bodymap-BhG55xHM.d.mts +318 -0
- package/dist/bodymap-BhG55xHM.d.ts +318 -0
- package/dist/bodymap.d.mts +3 -0
- package/dist/bodymap.d.ts +3 -0
- package/dist/bodymap.js +3014 -0
- package/dist/bodymap.js.map +1 -0
- package/dist/bodymap.mjs +1088 -0
- package/dist/bodymap.mjs.map +1 -0
- package/dist/chunk-2SISKTWM.mjs +1027 -0
- package/dist/chunk-2SISKTWM.mjs.map +1 -0
- package/dist/{chunk-5SSKGS6E.mjs → chunk-7XPB4NAO.mjs} +124 -4
- package/dist/chunk-7XPB4NAO.mjs.map +1 -0
- package/dist/{chunk-3VLOBS6O.mjs → chunk-SNVKL5WZ.mjs} +42 -5
- package/dist/chunk-SNVKL5WZ.mjs.map +1 -0
- package/dist/index.d.mts +416 -250
- package/dist/index.d.ts +416 -250
- package/dist/index.js +1567 -1123
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1491 -2201
- package/dist/index.mjs.map +1 -1
- package/dist/theme/index.d.mts +288 -2
- package/dist/theme/index.d.ts +288 -2
- package/dist/theme/index.js +159 -2
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/index.mjs +2 -2
- package/dist/theme/tokens-css.d.mts +5 -3
- package/dist/theme/tokens-css.d.ts +5 -3
- package/dist/theme/tokens-css.js +318 -9
- package/dist/theme/tokens-css.js.map +1 -1
- package/dist/theme/tokens-css.mjs +1 -1
- package/dist/theme/tokens-css.mjs.map +1 -1
- package/package.json +10 -1
- package/src/bodymap.ts +37 -0
- package/src/components/custom/Table/Table.test.tsx +27 -0
- package/src/components/custom/Table/Table.tsx +33 -17
- package/src/components/custom/Workout/ActiveWorkoutPage.stories.tsx +118 -0
- package/src/components/custom/Workout/ActiveWorkoutPage.test.tsx +171 -0
- package/src/components/custom/Workout/ActiveWorkoutPage.tsx +442 -0
- package/src/components/custom/Workout/BodyMap.tsx +7 -9
- package/src/components/custom/Workout/BodyMapDetailPanel.tsx +25 -29
- package/src/components/custom/Workout/CapacityBandChart.tsx +2 -3
- package/src/components/custom/Workout/ExerciseCard.test.tsx +24 -0
- package/src/components/custom/Workout/ExerciseCard.tsx +24 -26
- package/src/components/custom/Workout/ExerciseDetailPage.stories.tsx +225 -0
- package/src/components/custom/Workout/ExerciseDetailPage.test.tsx +128 -0
- package/src/components/custom/Workout/ExerciseDetailPage.tsx +624 -0
- package/src/components/custom/Workout/InputBar.tsx +10 -12
- package/src/components/custom/Workout/MesoCard.tsx +2 -4
- package/src/components/custom/Workout/MesoProgressBar.test.tsx +12 -0
- package/src/components/custom/Workout/MesoProgressBar.tsx +5 -1
- package/src/components/custom/Workout/MesoStatusCard.tsx +17 -15
- package/src/components/custom/Workout/MuscleGroupChip.tsx +2 -4
- package/src/components/custom/Workout/PlaceholderStrip.tsx +2 -4
- package/src/components/custom/Workout/PrHistoryModal.tsx +12 -14
- package/src/components/custom/Workout/ProgramPlanningPage.stories.tsx +257 -0
- package/src/components/custom/Workout/ProgramPlanningPage.test.tsx +142 -0
- package/src/components/custom/Workout/ProgramPlanningPage.tsx +418 -0
- package/src/components/custom/Workout/ReadinessCheck.tsx +13 -12
- package/src/components/custom/Workout/RestTimer.test.tsx +10 -0
- package/src/components/custom/Workout/RestTimer.tsx +12 -9
- package/src/components/custom/Workout/SetRow.tsx +16 -19
- package/src/components/custom/Workout/StatusDot.tsx +1 -0
- package/src/components/custom/Workout/StrengthTrendChart.tsx +15 -17
- package/src/components/custom/Workout/TempoBar.stories.tsx +95 -0
- package/src/components/custom/Workout/TempoBar.test.tsx +103 -0
- package/src/components/custom/Workout/TempoBar.tsx +215 -0
- package/src/components/custom/Workout/TempoDisplay.tsx +3 -1
- package/src/components/custom/Workout/TrainingStatusPage.stories.tsx +212 -0
- package/src/components/custom/Workout/TrainingStatusPage.test.tsx +131 -0
- package/src/components/custom/Workout/TrainingStatusPage.tsx +312 -0
- package/src/components/custom/Workout/VelocityStrip.test.tsx +10 -0
- package/src/components/custom/Workout/VelocityStrip.tsx +19 -16
- package/src/components/custom/Workout/WeekRow.tsx +2 -1
- package/src/components/custom/Workout/WorkoutCard.tsx +3 -6
- package/src/components/custom/Workout/index.ts +80 -32
- package/src/test/nativewind-stub.ts +13 -0
- package/src/theme/ThemeProvider.test.tsx +24 -0
- package/src/theme/ThemeProvider.tsx +50 -0
- package/src/theme/config.completeness.test.ts +77 -0
- package/src/theme/config.ts +151 -0
- package/src/theme/index.ts +2 -0
- package/src/theme/manifest/design-freeze.test.ts +155 -0
- package/src/theme/manifest/extract-css-properties.fixture.html +29 -0
- package/src/theme/manifest/extract-css-properties.test.ts +112 -0
- package/src/theme/resolve-color.ts +19 -0
- package/src/theme/tokens-css.ts +5 -3
- package/src/theme/workout-tokens.ts +12 -14
- package/src/utils/index.ts +10 -0
- package/src/utils/workout-format.test.ts +81 -0
- package/src/utils/workout-format.ts +83 -0
- package/dist/chunk-3VLOBS6O.mjs.map +0 -1
- package/dist/chunk-5SSKGS6E.mjs.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,9 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import React, { ReactNode } from 'react';
|
|
3
3
|
import { ViewProps, PressableProps, View, TextInputProps, TextInput, ImageSourcePropType, ModalProps as ModalProps$1, TextProps } from 'react-native';
|
|
4
4
|
import { ElevationLevel, GlowIntensity } from './theme/index.js';
|
|
5
|
-
export { ComponentType, CssPropertyEntry, CssPropertyManifest, ElevationConfig, ManifestValidationResult, ShadowIntensity, ShadowSurface, ThemeConfig, ThemeMode, ThemePreset, ThemePresetColors, ThemePresetFonts, ThemePresetRadii, ThemePresetShadows, VariantAxes, VariantOverride, applyThemePreset, audiobookPreset, buttonSizes, componentElevationRanges, createFlatShadow, createPressedHoverShadow, createPressedShadow, createRaisedHoverShadow, createRaisedShadow, darkThemeCSSVars, darken, defaultPreset, discreteRainbow, elevationSystem, getBaseSurfaceColor, getDiscreteRainbowColor, getElevationConfig, getElevationShadow, getElevationSurface, getGlowShadow, getHoverColors, getSemanticColors, getThemeCSSVars, getValidatedElevation, gluestackConfig, hexToRgb, hsvToRgb, isCssPropertyManifest, isDark, lightThemeCSSVars, lighten, neumorphicShadows, primitiveBorderRadius, primitiveBreakpoints, primitiveColors, primitiveShadows, primitiveSpacing, primitiveTypography, primitiveZIndex, rgbToHex, rgbToHsv, semanticColorsDark, semanticColorsLight, semanticTypography, shadowColors, validateCssPropertyManifest } from './theme/index.js';
|
|
5
|
+
export { ComponentType, CssPropertyEntry, CssPropertyManifest, ElevationConfig, ManifestValidationResult, ShadowIntensity, ShadowSurface, ThemeConfig, ThemeMode, ThemePreset, ThemePresetColors, ThemePresetFonts, ThemePresetRadii, ThemePresetShadows, ThemeProvider, ThemeProviderMode, ThemeProviderProps, VariantAxes, VariantOverride, applyThemePreset, audiobookPreset, buttonSizes, componentElevationRanges, createFlatShadow, createPressedHoverShadow, createPressedShadow, createRaisedHoverShadow, createRaisedShadow, darkThemeCSSVars, darken, defaultPreset, discreteRainbow, elevationSystem, getBaseSurfaceColor, getDiscreteRainbowColor, getElevationConfig, getElevationShadow, getElevationSurface, getGlowShadow, getHoverColors, getSemanticColors, getThemeCSSVars, getValidatedElevation, gluestackConfig, hexToRgb, hsvToRgb, isCssPropertyManifest, isDark, lightThemeCSSVars, lighten, neumorphicShadows, primitiveBorderRadius, primitiveBreakpoints, primitiveColors, primitiveShadows, primitiveSpacing, primitiveTypography, primitiveZIndex, resolveColor, rgbToHex, rgbToHsv, semanticColorsDark, semanticColorsLight, semanticTypography, shadowColors, validateCssPropertyManifest } from './theme/index.js';
|
|
6
|
+
import { M as MesoStatusCardProps } from './bodymap-BhG55xHM.js';
|
|
7
|
+
export { B as BodyMapData, a as BodyMapDetailPanelProps, b as BodyMapProps, C as ContributingExercise, c as MesoStatusBadge, d as MesoStatusBadgeVariant, e as MesoStatusCard, f as MesoStatusCoaching, g as MesoStatusGauge, h as MesoStatusMetric, i as MesoStatusNextTarget, j as MovementCategory, k as MuscleGroup, S as SimpleMuscleGroup, T as TrainingStatusMuscle, l as TrainingStatusPageProps, m as TrainingStatusSummary, U as UpcomingExercise, V as VolumeLandmarks } from './bodymap-BhG55xHM.js';
|
|
6
8
|
import { ClassValue } from 'clsx';
|
|
7
9
|
|
|
8
10
|
type AlertStatus = 'success' | 'info' | 'warning' | 'error';
|
|
@@ -2549,6 +2551,7 @@ declare function PrBadge({ type, label: labelProp, compact, animate, className,
|
|
|
2549
2551
|
type StatusDotVariant = 'success' | 'warning' | 'error' | 'neutral' | 'on-track' | 'deviation' | 'future';
|
|
2550
2552
|
interface StatusDotProps extends ViewProps {
|
|
2551
2553
|
variant: StatusDotVariant;
|
|
2554
|
+
/** Center glyph. Only rendered at size="md"; the 8px "sm" dot is too small to fit one. */
|
|
2552
2555
|
icon?: 'check' | 'exclamation' | 'dash';
|
|
2553
2556
|
size?: 'sm' | 'md';
|
|
2554
2557
|
/** Adds a subtle glow effect in the variant color */
|
|
@@ -2581,6 +2584,46 @@ interface TempoDisplayProps extends ViewProps {
|
|
|
2581
2584
|
}
|
|
2582
2585
|
declare function TempoDisplay({ tempo, size, colored, showInfo, onPress, className, ...props }: TempoDisplayProps): react_jsx_runtime.JSX.Element;
|
|
2583
2586
|
|
|
2587
|
+
/**
|
|
2588
|
+
* Titan-local phase key. Consumers map their own movement-phase enum onto this
|
|
2589
|
+
* presentational key at the call site — TempoBar owns rendering only.
|
|
2590
|
+
*/
|
|
2591
|
+
type TempoPhaseKey = 'concentric' | 'hold' | 'eccentric';
|
|
2592
|
+
/** Pacing tuning shared with the fill/pacing helpers below. */
|
|
2593
|
+
declare const TEMPO_PACING: {
|
|
2594
|
+
readonly behindThresholdPct: 0.15;
|
|
2595
|
+
readonly minPhaseDurationMs: 500;
|
|
2596
|
+
};
|
|
2597
|
+
type TempoPacingState = 'none' | 'on-pace' | 'behind';
|
|
2598
|
+
/**
|
|
2599
|
+
* Classify how a phase's elapsed time tracks against its target duration.
|
|
2600
|
+
* `none` when there is no meaningful target; `behind` once elapsed exceeds the
|
|
2601
|
+
* target by more than the behind threshold; `on-pace` otherwise.
|
|
2602
|
+
*/
|
|
2603
|
+
declare function getTempoPacingState(elapsedMs: number, targetMs: number | null): TempoPacingState;
|
|
2604
|
+
/** Fill percentage (0–100) for the active phase; full when no target is set. */
|
|
2605
|
+
declare function getTempoFillPct(elapsedMs: number, targetMs: number | null): number;
|
|
2606
|
+
interface TempoBarProps extends ViewProps {
|
|
2607
|
+
/** Phase currently in progress, or null when idle/at rest. */
|
|
2608
|
+
activePhase: TempoPhaseKey | null;
|
|
2609
|
+
/** Elapsed time (ms) within the active phase. */
|
|
2610
|
+
phaseElapsedMs: number;
|
|
2611
|
+
/** Completed phase durations (ms) for the current rep, keyed by phase. */
|
|
2612
|
+
completed?: Partial<Record<TempoPhaseKey, number>>;
|
|
2613
|
+
/** Optional per-phase target durations (seconds) for pacing feedback. */
|
|
2614
|
+
target?: Partial<Record<TempoPhaseKey, number>>;
|
|
2615
|
+
className?: string;
|
|
2616
|
+
}
|
|
2617
|
+
/**
|
|
2618
|
+
* TempoBar — live rep phase progression indicator.
|
|
2619
|
+
*
|
|
2620
|
+
* Renders a segmented bar (Con → Hold → Ecc) where the active phase fills in
|
|
2621
|
+
* real time and completed phases show their duration with a ✓/✗ pacing mark.
|
|
2622
|
+
* Presentational only: the consumer derives which phase is active, its elapsed
|
|
2623
|
+
* time, and completed durations, then feeds them in.
|
|
2624
|
+
*/
|
|
2625
|
+
declare function TempoBar({ activePhase, phaseElapsedMs, completed, target, className, ...props }: TempoBarProps): react_jsx_runtime.JSX.Element;
|
|
2626
|
+
|
|
2584
2627
|
interface DeviationBarProps extends ViewProps {
|
|
2585
2628
|
deviation: number;
|
|
2586
2629
|
width?: number;
|
|
@@ -2637,10 +2680,10 @@ declare function calculateVelocityLoss(velocities: number[]): number;
|
|
|
2637
2680
|
declare function calculateMeanVelocity(velocities: number[]): number;
|
|
2638
2681
|
declare function VelocityStrip({ velocities, expanded, onToggle, onRepPress, variant, showInfo, className, ...props }: VelocityStripProps): react_jsx_runtime.JSX.Element;
|
|
2639
2682
|
|
|
2640
|
-
type VolumeStatus
|
|
2683
|
+
type VolumeStatus = 'untrained' | 'behind' | 'ontrack' | 'target' | 'over';
|
|
2641
2684
|
interface MuscleGroupChipProps extends ViewProps {
|
|
2642
2685
|
name: string;
|
|
2643
|
-
volumeStatus?: VolumeStatus
|
|
2686
|
+
volumeStatus?: VolumeStatus;
|
|
2644
2687
|
onPress?: () => void;
|
|
2645
2688
|
className?: string;
|
|
2646
2689
|
}
|
|
@@ -3029,79 +3072,6 @@ interface ReadinessCheckProps {
|
|
|
3029
3072
|
*/
|
|
3030
3073
|
declare function ReadinessCheck({ factors, score, warmUpValidation, warmUpCompleted, onConfirm, className, }: ReadinessCheckProps): react_jsx_runtime.JSX.Element;
|
|
3031
3074
|
|
|
3032
|
-
type MesoStatusBadgeVariant = 'success' | 'warning' | 'error';
|
|
3033
|
-
interface MesoStatusBadge {
|
|
3034
|
-
/** Short status label, e.g. "On Track". */
|
|
3035
|
-
label: string;
|
|
3036
|
-
/** Color treatment for the badge. */
|
|
3037
|
-
variant: MesoStatusBadgeVariant;
|
|
3038
|
-
}
|
|
3039
|
-
interface MesoStatusMetric {
|
|
3040
|
-
/** Cell label, e.g. "Prescribed". */
|
|
3041
|
-
label: string;
|
|
3042
|
-
/** Cell value, e.g. "3×8 @ RPE 8". */
|
|
3043
|
-
value: string;
|
|
3044
|
-
}
|
|
3045
|
-
interface MesoStatusGauge {
|
|
3046
|
-
/** Gauge label, e.g. "Intensity". */
|
|
3047
|
-
label: string;
|
|
3048
|
-
/** Fill position 0-1; the 14px marker sits at this level. */
|
|
3049
|
-
level: number;
|
|
3050
|
-
/** Optional right-aligned sublabel, e.g. "Prescribed". */
|
|
3051
|
-
sublabel?: string;
|
|
3052
|
-
}
|
|
3053
|
-
interface MesoStatusCoaching {
|
|
3054
|
-
/** Coaching recommendation copy. */
|
|
3055
|
-
text: string;
|
|
3056
|
-
/** Substrings within `text` to render in bold. */
|
|
3057
|
-
highlights?: string[];
|
|
3058
|
-
}
|
|
3059
|
-
interface MesoStatusNextTarget {
|
|
3060
|
-
/** Leading glyph/emoji, e.g. "→" or "🎯". */
|
|
3061
|
-
icon: string;
|
|
3062
|
-
/** Next-session target copy. */
|
|
3063
|
-
text: string;
|
|
3064
|
-
}
|
|
3065
|
-
interface MesoStatusCardProps extends ViewProps {
|
|
3066
|
-
/** Mesocycle name, e.g. "Hypertrophy Block". */
|
|
3067
|
-
mesoName: string;
|
|
3068
|
-
/** Context line, e.g. "Week 6 of 8 · Upper/Lower". */
|
|
3069
|
-
mesoSubtitle: string;
|
|
3070
|
-
/** Status pill in the header. */
|
|
3071
|
-
statusBadge: MesoStatusBadge;
|
|
3072
|
-
/** Prescription-vs-actual metrics rendered as a 2x2 grid. */
|
|
3073
|
-
metrics: MesoStatusMetric[];
|
|
3074
|
-
/** Intensity / volume gauges stacked vertically. */
|
|
3075
|
-
gauges: MesoStatusGauge[];
|
|
3076
|
-
/** Optional coaching recommendation box. */
|
|
3077
|
-
coaching?: MesoStatusCoaching;
|
|
3078
|
-
/** Optional next-session target box. */
|
|
3079
|
-
nextTarget?: MesoStatusNextTarget;
|
|
3080
|
-
className?: string;
|
|
3081
|
-
}
|
|
3082
|
-
/**
|
|
3083
|
-
* Mesocycle context card for a specific exercise: prescription vs actual
|
|
3084
|
-
* metrics, intensity/volume gauges, and coaching guidance. Composes the titan
|
|
3085
|
-
* `Card` plus the Workout `StatusDot`, and renders the §25 gauge (8px track,
|
|
3086
|
-
* 50% center line, 14px marker) inline since that visual differs from the
|
|
3087
|
-
* IntensityBar/DeviationBar primitives.
|
|
3088
|
-
*
|
|
3089
|
-
* @example
|
|
3090
|
-
* <MesoStatusCard
|
|
3091
|
-
* mesoName="Hypertrophy Block"
|
|
3092
|
-
* mesoSubtitle="Week 6 of 8 · Upper/Lower"
|
|
3093
|
-
* statusBadge={{ label: 'On Track', variant: 'success' }}
|
|
3094
|
-
* metrics={[
|
|
3095
|
-
* { label: 'Prescribed', value: '3×8 @ RPE 8' },
|
|
3096
|
-
* { label: 'Actual', value: '3×8 @ 185 lbs' },
|
|
3097
|
-
* ]}
|
|
3098
|
-
* gauges={[{ label: 'Intensity', level: 0.7, sublabel: 'Actual' }]}
|
|
3099
|
-
* coaching={{ text: 'Add load next session.', highlights: ['Add load'] }}
|
|
3100
|
-
* nextTarget={{ icon: '→', text: '190 lbs × 8' }}
|
|
3101
|
-
* />
|
|
3102
|
-
*/
|
|
3103
|
-
declare function MesoStatusCard({ mesoName, mesoSubtitle, statusBadge, metrics, gauges, coaching, nextTarget, className, ...props }: MesoStatusCardProps): react_jsx_runtime.JSX.Element;
|
|
3104
|
-
|
|
3105
3075
|
interface StrengthTrendDataPoint {
|
|
3106
3076
|
/** ISO date string for the session. */
|
|
3107
3077
|
date: string;
|
|
@@ -3212,186 +3182,342 @@ interface CapacityBandChartProps extends ViewProps {
|
|
|
3212
3182
|
*/
|
|
3213
3183
|
declare function CapacityBandChart({ band, workouts, projection, width, height, onWorkoutPress, className, ...props }: CapacityBandChartProps): react_jsx_runtime.JSX.Element;
|
|
3214
3184
|
|
|
3215
|
-
/**
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
declare enum MuscleGroup {
|
|
3220
|
-
CHEST = "chest",
|
|
3221
|
-
FRONT_DELTS = "front_delts",
|
|
3222
|
-
SIDE_DELTS = "side_delts",
|
|
3223
|
-
TRICEPS = "triceps",
|
|
3224
|
-
LATS = "lats",
|
|
3225
|
-
UPPER_BACK = "upper_back",
|
|
3226
|
-
REAR_DELTS = "rear_delts",
|
|
3227
|
-
BICEPS = "biceps",
|
|
3228
|
-
FOREARMS = "forearms",
|
|
3229
|
-
QUADS = "quads",
|
|
3230
|
-
HAMSTRINGS = "hamstrings",
|
|
3231
|
-
GLUTES = "glutes",
|
|
3232
|
-
CALVES = "calves",
|
|
3233
|
-
ABS = "abs",
|
|
3234
|
-
OBLIQUES = "obliques"
|
|
3235
|
-
}
|
|
3236
|
-
/**
|
|
3237
|
-
* Simplified muscle group view for beginners. Maps to one or more MuscleGroup.
|
|
3238
|
-
*/
|
|
3239
|
-
declare enum SimpleMuscleGroup {
|
|
3240
|
-
CHEST = "chest",
|
|
3241
|
-
BACK = "back",
|
|
3242
|
-
SHOULDERS = "shoulders",
|
|
3243
|
-
BICEPS = "biceps",
|
|
3244
|
-
TRICEPS = "triceps",
|
|
3245
|
-
LEGS = "legs",
|
|
3246
|
-
CORE = "core",
|
|
3247
|
-
FOREARMS = "forearms"
|
|
3248
|
-
}
|
|
3249
|
-
/** Mapping from simplified groups to the full taxonomy. */
|
|
3250
|
-
declare const SIMPLE_TO_DETAILED: Record<SimpleMuscleGroup, MuscleGroup[]>;
|
|
3251
|
-
/** Reverse map: detailed MuscleGroup -> its SimpleMuscleGroup. */
|
|
3252
|
-
declare const DETAILED_TO_SIMPLE: Record<MuscleGroup, SimpleMuscleGroup>;
|
|
3253
|
-
/** Movement category for training split organization. */
|
|
3254
|
-
type MovementCategory = 'push' | 'pull' | 'legs' | 'core';
|
|
3255
|
-
declare const MUSCLE_TO_CATEGORY: Record<MuscleGroup, MovementCategory>;
|
|
3256
|
-
/**
|
|
3257
|
-
* react-native-body-highlighter slug(s) per muscle group. Phase 1 uses the
|
|
3258
|
-
* closest available slug; deltoids share one path and lats/upper-back share
|
|
3259
|
-
* `upper-back` (see doc Level 4 "Recommended approach").
|
|
3260
|
-
*/
|
|
3261
|
-
declare const MUSCLE_TO_SVG_SLUGS: Record<MuscleGroup, string[]>;
|
|
3262
|
-
/** Human-readable name per muscle group (used in a11y labels). */
|
|
3263
|
-
declare const MUSCLE_DISPLAY_NAMES: Record<MuscleGroup, string>;
|
|
3264
|
-
/** Human-readable name per simple group. */
|
|
3265
|
-
declare const SIMPLE_DISPLAY_NAMES: Record<SimpleMuscleGroup, string>;
|
|
3266
|
-
/** Volume landmarks per muscle group (weekly working sets). */
|
|
3267
|
-
interface VolumeLandmarks {
|
|
3268
|
-
mev: number;
|
|
3269
|
-
mav: number;
|
|
3270
|
-
mrv: number;
|
|
3271
|
-
}
|
|
3272
|
-
declare const DEFAULT_VOLUME_LANDMARKS: Record<MuscleGroup, VolumeLandmarks>;
|
|
3273
|
-
/** Weekly-volume status relative to MEV/MAV/MRV landmarks. */
|
|
3274
|
-
type VolumeStatus = 'under' | 'maintenance' | 'productive' | 'over';
|
|
3275
|
-
/** Readable label per status for a11y descriptions. */
|
|
3276
|
-
declare const VOLUME_STATUS_LABELS: Record<VolumeStatus, string>;
|
|
3277
|
-
/**
|
|
3278
|
-
* Maps a volume status (and intensity, 0-1) to a heatmap fill color. The
|
|
3279
|
-
* `approaching` token is used when a productive muscle nears its MRV.
|
|
3280
|
-
*/
|
|
3281
|
-
declare function getHeatmapColor(status: VolumeStatus | null | undefined, intensity?: number): string;
|
|
3282
|
-
|
|
3283
|
-
interface BodyMapData {
|
|
3284
|
-
muscleGroup: MuscleGroup;
|
|
3285
|
-
/** Intensity 0-1 for heatmap color. */
|
|
3286
|
-
intensity: number;
|
|
3287
|
-
/** Volume status for tooltip / heatmap token. */
|
|
3288
|
-
volumeStatus: VolumeStatus;
|
|
3289
|
-
/** Weekly effective sets. */
|
|
3290
|
-
weeklySets: number;
|
|
3291
|
-
}
|
|
3292
|
-
interface BodyMapProps extends ViewProps {
|
|
3293
|
-
/** Muscle group intensity data. */
|
|
3294
|
-
data: BodyMapData[];
|
|
3295
|
-
/** Which view to show. */
|
|
3296
|
-
view: 'front' | 'back';
|
|
3297
|
-
/** Toggle between front/back. */
|
|
3298
|
-
onViewChange?: (view: 'front' | 'back') => void;
|
|
3299
|
-
/** Called when a muscle group is tapped. */
|
|
3300
|
-
onMusclePress?: (muscleGroup: MuscleGroup) => void;
|
|
3301
|
-
/** Currently highlighted muscle (from external selection). */
|
|
3302
|
-
highlightedMuscle?: MuscleGroup | null;
|
|
3303
|
-
/** Show simplified (8 groups) or detailed (15 groups). */
|
|
3304
|
-
mode?: 'simple' | 'detailed';
|
|
3305
|
-
className?: string;
|
|
3306
|
-
}
|
|
3307
|
-
/**
|
|
3308
|
-
* Interactive SVG body map with tappable muscle groups and a volume heatmap.
|
|
3309
|
-
* Renders the front or back view (toggle via onViewChange), colors each muscle
|
|
3310
|
-
* by its weekly-volume status, and exposes an accessible muscle legend wired to
|
|
3311
|
-
* onMusclePress. Phase 1 uses react-native-body-highlighter's combined slugs
|
|
3312
|
-
* (deltoids as one path, lats/upper-back shared); swipe between views and the
|
|
3313
|
-
* delt/lat SVG split are follow-ups.
|
|
3314
|
-
*
|
|
3315
|
-
* @example
|
|
3316
|
-
* <BodyMap
|
|
3317
|
-
* data={[{ muscleGroup: MuscleGroup.CHEST, intensity: 0.7, volumeStatus: 'productive', weeklySets: 12 }]}
|
|
3318
|
-
* view="front"
|
|
3319
|
-
* onViewChange={setView}
|
|
3320
|
-
* onMusclePress={setSelected}
|
|
3321
|
-
* highlightedMuscle={selected}
|
|
3322
|
-
* />
|
|
3323
|
-
*/
|
|
3324
|
-
declare function BodyMap({ data, view, onViewChange, onMusclePress, highlightedMuscle, mode, className, ...props }: BodyMapProps): react_jsx_runtime.JSX.Element;
|
|
3325
|
-
|
|
3326
|
-
interface ContributingExercise {
|
|
3327
|
-
/** Exercise name. */
|
|
3185
|
+
/** A single workout within a planned week, plus its exercise breakdown. */
|
|
3186
|
+
interface PlanWorkout {
|
|
3187
|
+
/** Stable identifier used for drill-down selection. */
|
|
3188
|
+
id: string;
|
|
3328
3189
|
name: string;
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3190
|
+
date: string;
|
|
3191
|
+
duration?: string;
|
|
3192
|
+
status: WorkoutStatus;
|
|
3193
|
+
muscleGroups: WorkoutMuscleGroup[];
|
|
3194
|
+
totalSets: number;
|
|
3195
|
+
totalVolume?: number;
|
|
3196
|
+
unit: 'lbs' | 'kg';
|
|
3197
|
+
/** Exercises revealed when the workout is opened. */
|
|
3198
|
+
exercises: ExerciseCardProps[];
|
|
3333
3199
|
}
|
|
3334
|
-
|
|
3335
|
-
|
|
3200
|
+
/** A training week inside a mesocycle. */
|
|
3201
|
+
interface PlanWeek {
|
|
3202
|
+
/** 1-based week index within the mesocycle. */
|
|
3203
|
+
weekNumber: number;
|
|
3204
|
+
/** Planned intensity for the week, 0-1. */
|
|
3205
|
+
intensityLevel: number;
|
|
3206
|
+
/** Optional MRV/overexertion threshold, 0-1. */
|
|
3207
|
+
intensityThreshold?: number;
|
|
3208
|
+
isDeload?: boolean;
|
|
3209
|
+
isCurrent?: boolean;
|
|
3210
|
+
workouts: PlanWorkout[];
|
|
3211
|
+
}
|
|
3212
|
+
/** A mesocycle: the top level of the drill-down. */
|
|
3213
|
+
interface PlanMeso {
|
|
3214
|
+
id: string;
|
|
3336
3215
|
name: string;
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3216
|
+
goal: string;
|
|
3217
|
+
split: string;
|
|
3218
|
+
weekRange: string;
|
|
3219
|
+
weekCount: number;
|
|
3220
|
+
currentWeek?: number;
|
|
3221
|
+
status: MesoStatus;
|
|
3222
|
+
volumeHeatmap?: MesoVolumeHeatmapEntry[];
|
|
3223
|
+
weeks: PlanWeek[];
|
|
3224
|
+
}
|
|
3225
|
+
/** Current depth of the meso -> week -> workout drill-down. */
|
|
3226
|
+
type ProgramNavLevel = 'meso' | 'week' | 'workout';
|
|
3227
|
+
/** The navigation cursor within the active mesocycle. */
|
|
3228
|
+
interface ProgramSelection {
|
|
3229
|
+
weekNumber: number | null;
|
|
3230
|
+
workoutId: string | null;
|
|
3231
|
+
}
|
|
3232
|
+
/** One tappable step in the breadcrumb trail. */
|
|
3233
|
+
interface ProgramBreadcrumb {
|
|
3234
|
+
key: string;
|
|
3235
|
+
label: string;
|
|
3236
|
+
level: ProgramNavLevel;
|
|
3237
|
+
}
|
|
3238
|
+
interface ProgramPlanningPageProps extends ViewProps {
|
|
3239
|
+
/** Page heading. */
|
|
3240
|
+
title?: string;
|
|
3241
|
+
/** Mesocycles that make up the program. */
|
|
3242
|
+
mesos: PlanMeso[];
|
|
3243
|
+
className?: string;
|
|
3244
|
+
}
|
|
3245
|
+
/** Derive the current drill-down level from the selection cursor (pure). */
|
|
3246
|
+
declare function deriveNavLevel(selection: ProgramSelection): ProgramNavLevel;
|
|
3247
|
+
/** Project the mesocycles onto MesoProgressBar segment data (pure). */
|
|
3248
|
+
declare function toProgressBarMesos(mesos: PlanMeso[]): Meso[];
|
|
3249
|
+
/** Look up a meso by id, or null. */
|
|
3250
|
+
declare function findMeso(mesos: PlanMeso[], id: string | null): PlanMeso | null;
|
|
3251
|
+
/** Look up a week within a meso, or null. */
|
|
3252
|
+
declare function findWeek(meso: PlanMeso | null, weekNumber: number | null): PlanWeek | null;
|
|
3253
|
+
/** Look up a workout within a week, or null. */
|
|
3254
|
+
declare function findWorkout(week: PlanWeek | null, workoutId: string | null): PlanWorkout | null;
|
|
3255
|
+
/** Build the breadcrumb trail for the active drill path (pure). */
|
|
3256
|
+
declare function buildBreadcrumbs(meso: PlanMeso, weekNumber: number | null, workout: PlanWorkout | null): ProgramBreadcrumb[];
|
|
3257
|
+
/**
|
|
3258
|
+
* ProgramPlanningPage — a meso -> week -> workout drill-down over an entire
|
|
3259
|
+
* training program. A `MesoProgressBar` pins the mesocycle timeline to the top;
|
|
3260
|
+
* the body swaps between three levels: expandable `MesoCard`s (with inline
|
|
3261
|
+
* `WeekRow`s), a week's `WorkoutCard` list, and a single opened `WorkoutCard`
|
|
3262
|
+
* with inline `ExerciseCard` expansion. A breadcrumb trail tracks and rewinds
|
|
3263
|
+
* the drill path. Selection is page-level state; children keep their own styles.
|
|
3264
|
+
*
|
|
3265
|
+
* @example
|
|
3266
|
+
* <ProgramPlanningPage mesos={mesos} />
|
|
3267
|
+
*/
|
|
3268
|
+
declare function ProgramPlanningPage({ title, mesos, className, ...props }: ProgramPlanningPageProps): react_jsx_runtime.JSX.Element;
|
|
3269
|
+
|
|
3270
|
+
/** Which tab of the exercise detail view is showing. */
|
|
3271
|
+
type ExerciseDetailTab = 'progress' | 'history' | 'advanced';
|
|
3272
|
+
/** Tabs in display order. */
|
|
3273
|
+
declare const EXERCISE_DETAIL_TABS: Array<{
|
|
3274
|
+
key: ExerciseDetailTab;
|
|
3275
|
+
label: string;
|
|
3276
|
+
}>;
|
|
3277
|
+
/** Identity + headline stats for the exercise being inspected. */
|
|
3278
|
+
interface ExerciseDetailHeader {
|
|
3279
|
+
/** Exercise name, e.g. "Barbell Bench Press". */
|
|
3280
|
+
name: string;
|
|
3281
|
+
/** Context line, e.g. "Chest · Barbell". */
|
|
3282
|
+
subtitle: string;
|
|
3283
|
+
/** Unit used across the page. */
|
|
3284
|
+
unit: 'lbs' | 'kg';
|
|
3285
|
+
/** Current estimated one-rep max, shown as a header pill. */
|
|
3286
|
+
currentE1rm?: number;
|
|
3369
3287
|
}
|
|
3370
3288
|
/**
|
|
3371
|
-
*
|
|
3372
|
-
*
|
|
3373
|
-
*
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3289
|
+
* A single expandable entry — one progression week or one logged session.
|
|
3290
|
+
* Projected onto an `ExerciseCard`, so it collapses to a summary and expands
|
|
3291
|
+
* to its `SetRow` breakdown.
|
|
3292
|
+
*/
|
|
3293
|
+
interface ExerciseDetailEntry {
|
|
3294
|
+
/** Stable id for inline-expansion selection. */
|
|
3295
|
+
id: string;
|
|
3296
|
+
/** Row title, e.g. "Week 3" or "Mon, Jun 16". */
|
|
3297
|
+
title: string;
|
|
3298
|
+
/** Collapsed summary (sets × reps @ weight). */
|
|
3299
|
+
summary?: ExerciseCardProps['summary'];
|
|
3300
|
+
/** Estimated one-rep max badge. */
|
|
3301
|
+
e1rm?: ExerciseCardProps['e1rm'];
|
|
3302
|
+
/** Flags a personal-record entry. */
|
|
3303
|
+
isPR?: boolean;
|
|
3304
|
+
/** Prescribed tempo, revealed when expanded. */
|
|
3305
|
+
tempo?: ExerciseCardProps['tempo'];
|
|
3306
|
+
/** Per-set breakdown revealed when expanded. */
|
|
3307
|
+
sets: SetRowProps[];
|
|
3308
|
+
}
|
|
3309
|
+
/** Strength-trend inputs for the Progress tab chart. */
|
|
3310
|
+
interface ExerciseTrend {
|
|
3311
|
+
/** Measured e1RM data points, chronological. */
|
|
3312
|
+
data: StrengthTrendDataPoint[];
|
|
3313
|
+
/** Planned/projected trajectory (dashed line). */
|
|
3314
|
+
projection?: StrengthTrendDataPoint[];
|
|
3315
|
+
/** Mesocycle boundary guides. */
|
|
3316
|
+
mesoBoundaries?: StrengthTrendChartMesoBoundary[];
|
|
3317
|
+
}
|
|
3318
|
+
/** One set's velocity trace for the Advanced tab breakdown. */
|
|
3319
|
+
interface ExerciseVbtSet {
|
|
3320
|
+
/** Row label, e.g. "Set 1". */
|
|
3321
|
+
label: string;
|
|
3322
|
+
/** Per-rep mean concentric velocities (m/s). */
|
|
3323
|
+
velocities: number[];
|
|
3324
|
+
}
|
|
3325
|
+
/** Velocity-based-training inputs for the Advanced tab. */
|
|
3326
|
+
interface ExerciseVbt {
|
|
3327
|
+
/** Capacity band shape over time. */
|
|
3328
|
+
band: CapacityBandDataPoint[];
|
|
3329
|
+
/** Sessions plotted against the band. */
|
|
3330
|
+
workouts: WorkoutDot[];
|
|
3331
|
+
/** Optional forward band projection. */
|
|
3332
|
+
projection?: CapacityBandProjection;
|
|
3333
|
+
/** Per-set velocity traces for the most recent session. */
|
|
3334
|
+
sets: ExerciseVbtSet[];
|
|
3335
|
+
}
|
|
3336
|
+
/** Page-level roll-up of the logged sessions. */
|
|
3337
|
+
interface ExerciseDetailStats {
|
|
3338
|
+
/** Number of logged sessions. */
|
|
3339
|
+
sessions: number;
|
|
3340
|
+
/** Best estimated one-rep max seen, or null if none recorded. */
|
|
3341
|
+
bestE1rm: number | null;
|
|
3342
|
+
/** Count of PR entries. */
|
|
3343
|
+
prCount: number;
|
|
3344
|
+
}
|
|
3345
|
+
/** Aggregate velocity readout for the Advanced tab. */
|
|
3346
|
+
interface VbtSummary {
|
|
3347
|
+
/** Mean concentric velocity across every logged rep. */
|
|
3348
|
+
meanVelocity: number;
|
|
3349
|
+
/** Worst within-set velocity loss (%), i.e. the most-fatigued set. */
|
|
3350
|
+
velocityLoss: number;
|
|
3351
|
+
}
|
|
3352
|
+
interface ExerciseDetailPageProps extends ViewProps {
|
|
3353
|
+
/** Exercise identity + headline stats. */
|
|
3354
|
+
exercise: ExerciseDetailHeader;
|
|
3355
|
+
/** Mesocycle context banner (Progress tab). */
|
|
3356
|
+
meso: MesoStatusCardProps;
|
|
3357
|
+
/** Strength trend inputs (Progress tab). */
|
|
3358
|
+
trend: ExerciseTrend;
|
|
3359
|
+
/** Week-by-week progression entries (Progress tab). */
|
|
3360
|
+
progression: ExerciseDetailEntry[];
|
|
3361
|
+
/** All logged sessions (History tab). */
|
|
3362
|
+
history: ExerciseDetailEntry[];
|
|
3363
|
+
/** Velocity-based-training inputs (Advanced tab). */
|
|
3364
|
+
vbt: ExerciseVbt;
|
|
3365
|
+
className?: string;
|
|
3366
|
+
}
|
|
3367
|
+
/** Roll up logged sessions into the page summary (pure, testable). */
|
|
3368
|
+
declare function deriveExerciseStats(entries: ExerciseDetailEntry[]): ExerciseDetailStats;
|
|
3369
|
+
/** Project an entry onto ExerciseCard props, wiring inline expansion (pure). */
|
|
3370
|
+
declare function toExerciseCardProps(entry: ExerciseDetailEntry, expanded: boolean, onToggle: () => void): ExerciseCardProps;
|
|
3371
|
+
/** Aggregate per-set velocity traces into the Advanced readout (pure). */
|
|
3372
|
+
declare function summarizeVbt(sets: ExerciseVbtSet[]): VbtSummary;
|
|
3373
|
+
/**
|
|
3374
|
+
* ExerciseDetailPage — a tabbed per-exercise view. A shared header (name,
|
|
3375
|
+
* context line, current e1RM pill) sits above a Progress / History / Advanced
|
|
3376
|
+
* tab bar. Progress composes the `MesoStatusCard` context banner, a stats
|
|
3377
|
+
* strip, a `StrengthTrendChart`, and a week-by-week progression list with
|
|
3378
|
+
* inline `ExerciseCard` expansion. History lists every logged session with the
|
|
3379
|
+
* same inline expansion. Advanced surfaces VBT data via a `CapacityBandChart`,
|
|
3380
|
+
* a velocity summary, and a per-set `VelocityStrip` breakdown. Tab and
|
|
3381
|
+
* per-list expansion are page-level state; children keep their own styles.
|
|
3382
|
+
*
|
|
3383
|
+
* @example
|
|
3384
|
+
* <ExerciseDetailPage
|
|
3385
|
+
* exercise={exercise}
|
|
3386
|
+
* meso={meso}
|
|
3387
|
+
* trend={trend}
|
|
3388
|
+
* progression={progression}
|
|
3389
|
+
* history={history}
|
|
3390
|
+
* vbt={vbt}
|
|
3392
3391
|
* />
|
|
3393
3392
|
*/
|
|
3394
|
-
declare function
|
|
3393
|
+
declare function ExerciseDetailPage({ exercise, meso, trend, progression, history, vbt, className, ...props }: ExerciseDetailPageProps): react_jsx_runtime.JSX.Element;
|
|
3394
|
+
|
|
3395
|
+
/** Where an exercise sits in the during-workout flow. */
|
|
3396
|
+
type ActiveExerciseStatus = 'completed' | 'active' | 'upcoming';
|
|
3397
|
+
/**
|
|
3398
|
+
* One exercise in the running workout. Projected onto an `ExerciseCard`, whose
|
|
3399
|
+
* visual state is driven by `status` and the page's zoom focus: completed and
|
|
3400
|
+
* active exercises collapse/expand, upcoming ones stay dimmed.
|
|
3401
|
+
*/
|
|
3402
|
+
interface ActiveWorkoutExercise {
|
|
3403
|
+
/** Stable id for zoom-focus selection. */
|
|
3404
|
+
id: string;
|
|
3405
|
+
/** Exercise name, e.g. "Barbell Bench Press". */
|
|
3406
|
+
name: string;
|
|
3407
|
+
/** Position in the workout flow. */
|
|
3408
|
+
status: ActiveExerciseStatus;
|
|
3409
|
+
/** Unit used for this exercise's loads. */
|
|
3410
|
+
unit: 'lbs' | 'kg';
|
|
3411
|
+
/** Total sets prescribed for this exercise. */
|
|
3412
|
+
totalPlannedSets: number;
|
|
3413
|
+
/** Collapsed summary (sets × reps @ weight) for a completed exercise. */
|
|
3414
|
+
summary?: ExerciseCardProps['summary'];
|
|
3415
|
+
/** Estimated one-rep max badge. */
|
|
3416
|
+
e1rm?: ExerciseCardProps['e1rm'];
|
|
3417
|
+
/** Flags a personal-record exercise. */
|
|
3418
|
+
isPR?: boolean;
|
|
3419
|
+
/** Prescribed tempo, revealed when expanded. */
|
|
3420
|
+
tempo?: ExerciseCardProps['tempo'];
|
|
3421
|
+
/** Per-rep velocities for each logged set (drives collapsed strips + set count). */
|
|
3422
|
+
setVelocities?: number[][];
|
|
3423
|
+
/** Per-set breakdown revealed when expanded. */
|
|
3424
|
+
sets?: SetRowProps[];
|
|
3425
|
+
/** One-line prescription for an upcoming exercise. */
|
|
3426
|
+
prescription?: string;
|
|
3427
|
+
/** Previous-best hint for an upcoming exercise. */
|
|
3428
|
+
previousBest?: string;
|
|
3429
|
+
/** Groups consecutive exercises under a shared `SupersetWrapper`. */
|
|
3430
|
+
supersetId?: string;
|
|
3431
|
+
}
|
|
3432
|
+
/** A superset grouping consecutive exercises that share its id. */
|
|
3433
|
+
interface ActiveWorkoutSuperset {
|
|
3434
|
+
/** Matches `ActiveWorkoutExercise.supersetId`. */
|
|
3435
|
+
id: string;
|
|
3436
|
+
/** Corner badge label, e.g. "SS1". */
|
|
3437
|
+
label: string;
|
|
3438
|
+
/** Accent color for the wrapper rail + label. */
|
|
3439
|
+
color?: string;
|
|
3440
|
+
}
|
|
3441
|
+
/** Live-set inputs shown in the bottom `InputBar`. */
|
|
3442
|
+
interface ActiveWorkoutInput {
|
|
3443
|
+
/** Current reps field value. */
|
|
3444
|
+
reps: string;
|
|
3445
|
+
/** Current weight field value. */
|
|
3446
|
+
weight: string;
|
|
3447
|
+
}
|
|
3448
|
+
/** Rest-timer inputs shown in the bottom `RestTimer`. */
|
|
3449
|
+
interface ActiveWorkoutRest {
|
|
3450
|
+
/** Prescribed rest length, seconds. */
|
|
3451
|
+
totalSeconds: number;
|
|
3452
|
+
/** Elapsed rest, milliseconds. */
|
|
3453
|
+
elapsedMs: number;
|
|
3454
|
+
/** Next-set hint, e.g. "Set 3 · 8 × 195 lbs". */
|
|
3455
|
+
nextSetInfo?: string;
|
|
3456
|
+
}
|
|
3457
|
+
/** Derived, page-level roll-up of workout progress. */
|
|
3458
|
+
interface WorkoutProgress {
|
|
3459
|
+
/** Number of exercises marked completed. */
|
|
3460
|
+
completedExercises: number;
|
|
3461
|
+
/** Total exercises in the workout. */
|
|
3462
|
+
totalExercises: number;
|
|
3463
|
+
/** Sets logged so far across all exercises. */
|
|
3464
|
+
completedSets: number;
|
|
3465
|
+
/** Total sets prescribed across all exercises. */
|
|
3466
|
+
totalSets: number;
|
|
3467
|
+
/** Fraction of prescribed sets logged, 0-1. */
|
|
3468
|
+
fraction: number;
|
|
3469
|
+
}
|
|
3470
|
+
/** An ordered render group: a lone exercise or a superset of exercises. */
|
|
3471
|
+
type WorkoutGroup = {
|
|
3472
|
+
type: 'single';
|
|
3473
|
+
exercise: ActiveWorkoutExercise;
|
|
3474
|
+
} | {
|
|
3475
|
+
type: 'superset';
|
|
3476
|
+
superset: ActiveWorkoutSuperset;
|
|
3477
|
+
exercises: ActiveWorkoutExercise[];
|
|
3478
|
+
};
|
|
3479
|
+
interface ActiveWorkoutPageProps extends ViewProps {
|
|
3480
|
+
/** Workout name shown in the header. */
|
|
3481
|
+
title?: string;
|
|
3482
|
+
/** Context line under the title, e.g. "Push Day A · Week 6". */
|
|
3483
|
+
subtitle?: string;
|
|
3484
|
+
/** Exercises in flow order. */
|
|
3485
|
+
exercises: ActiveWorkoutExercise[];
|
|
3486
|
+
/** Superset groupings referenced by `exercise.supersetId`. */
|
|
3487
|
+
supersets?: ActiveWorkoutSuperset[];
|
|
3488
|
+
/** Seed reps/weight for the live `InputBar`. */
|
|
3489
|
+
input?: ActiveWorkoutInput;
|
|
3490
|
+
/** Rest-timer state; when resting, the timer replaces the input bar. */
|
|
3491
|
+
rest?: ActiveWorkoutRest;
|
|
3492
|
+
/** Start the page in the resting state (timer showing). */
|
|
3493
|
+
initialResting?: boolean;
|
|
3494
|
+
className?: string;
|
|
3495
|
+
}
|
|
3496
|
+
/** Count the sets logged for an exercise (pure). */
|
|
3497
|
+
declare function countCompletedSets(exercise: ActiveWorkoutExercise): number;
|
|
3498
|
+
/** Roll up the exercises into the header progress readout (pure, testable). */
|
|
3499
|
+
declare function deriveWorkoutProgress(exercises: ActiveWorkoutExercise[]): WorkoutProgress;
|
|
3500
|
+
/** The active exercise anchors the bottom bar; find it, or null (pure). */
|
|
3501
|
+
declare function findActiveExercise(exercises: ActiveWorkoutExercise[]): ActiveWorkoutExercise | null;
|
|
3502
|
+
/** Map an exercise's status + focus onto an `ExerciseCard` visual state (pure). */
|
|
3503
|
+
declare function statusToCardState(status: ActiveExerciseStatus, focused: boolean): ExerciseCardState;
|
|
3504
|
+
/** Project an exercise onto ExerciseCard props, wiring zoom focus (pure). */
|
|
3505
|
+
declare function toActiveCardProps(exercise: ActiveWorkoutExercise, focused: boolean, onToggle: () => void, supersetPosition?: ExerciseCardProps['supersetPosition'], supersetColor?: string): ExerciseCardProps;
|
|
3506
|
+
/** Fold consecutive same-superset exercises into render groups (pure). */
|
|
3507
|
+
declare function groupExercises(exercises: ActiveWorkoutExercise[], supersets: ActiveWorkoutSuperset[]): WorkoutGroup[];
|
|
3508
|
+
/**
|
|
3509
|
+
* ActiveWorkoutPage — the during-workout screen, built as a zoom hierarchy over
|
|
3510
|
+
* `ExerciseCard`s. A header progress bar rolls up completed sets; the flow list
|
|
3511
|
+
* dims upcoming exercises, collapses finished ones to their velocity strips, and
|
|
3512
|
+
* expands exactly one focused exercise to its `SetRow` breakdown. Consecutive
|
|
3513
|
+
* superset exercises stitch together inside a `SupersetWrapper`. A pinned bottom
|
|
3514
|
+
* bar toggles between the live `InputBar` (log the next set) and the `RestTimer`.
|
|
3515
|
+
* Focus and rest are page-level state; children keep their own styles.
|
|
3516
|
+
*
|
|
3517
|
+
* @example
|
|
3518
|
+
* <ActiveWorkoutPage title="Push Day A" exercises={exercises} />
|
|
3519
|
+
*/
|
|
3520
|
+
declare function ActiveWorkoutPage({ title, subtitle, exercises, supersets, input, rest, initialResting, className, ...props }: ActiveWorkoutPageProps): react_jsx_runtime.JSX.Element;
|
|
3395
3521
|
|
|
3396
3522
|
interface TreemapDatum {
|
|
3397
3523
|
/** Stable identity — returned by onPress and used as the React key. */
|
|
@@ -3684,4 +3810,44 @@ type FormErrors<T extends FormValues> = Partial<Record<keyof T, string>>;
|
|
|
3684
3810
|
*/
|
|
3685
3811
|
type FormTouched<T extends FormValues> = Partial<Record<keyof T, boolean>>;
|
|
3686
3812
|
|
|
3687
|
-
|
|
3813
|
+
/**
|
|
3814
|
+
* Presentation helpers for workout metrics.
|
|
3815
|
+
*
|
|
3816
|
+
* The data layer (`@voltras/workout-analytics` view-model derivations) supplies
|
|
3817
|
+
* EXACT, unrounded values; these turn them into the rounded / banded / formatted
|
|
3818
|
+
* forms a view renders. Keeping display munging here — in the design system, not
|
|
3819
|
+
* the analytics layer — is the render half of the model↔render split: one view
|
|
3820
|
+
* can round while another (or a hover) shows the exact value from the same real
|
|
3821
|
+
* data. Workout components consume these so the rules live in one place.
|
|
3822
|
+
*/
|
|
3823
|
+
/** Round an exact RPE onto its conventional 0.5 granularity for display. */
|
|
3824
|
+
declare function roundRpe(rpe: number): number;
|
|
3825
|
+
/**
|
|
3826
|
+
* Color band for an RPE on the canonical performance scale. Higher RPE = harder
|
|
3827
|
+
* = red (direction inverted vs velocity, which shares the same scale). Bands:
|
|
3828
|
+
* `<7` green, `7–8.5` yellow, `8.5–9.5` orange, `≥9.5` red.
|
|
3829
|
+
*/
|
|
3830
|
+
declare function rpeColor(rpe: number): string;
|
|
3831
|
+
/** Round a weight or e1RM to a whole unit for compact display. */
|
|
3832
|
+
declare function roundWeight(weight: number): number;
|
|
3833
|
+
/** Format an exact velocity (m/s) to the 2-dp string shown on the velocity strip. */
|
|
3834
|
+
declare function formatVelocity(velocity: number): string;
|
|
3835
|
+
/** Round an exact tempo tuple (seconds) to 1 dp per phase for display. */
|
|
3836
|
+
declare function roundTempo(tempo: [number, number, number, number]): [number, number, number, number];
|
|
3837
|
+
/** Signed percentage label for a deviation ratio, e.g. `+9%` / `-5%` / `0%`. */
|
|
3838
|
+
declare function formatSignedPct(ratio: number): string;
|
|
3839
|
+
/** Structured prescription for the active exercise (from the plan). */
|
|
3840
|
+
interface PrescriptionInput {
|
|
3841
|
+
repsLow?: number;
|
|
3842
|
+
repsHigh?: number;
|
|
3843
|
+
weightLbs?: number;
|
|
3844
|
+
rpe?: number;
|
|
3845
|
+
}
|
|
3846
|
+
/**
|
|
3847
|
+
* Human prescription string, e.g. `"8–10 @ 62 lb · RPE 8"`. `null` when there is
|
|
3848
|
+
* nothing to show. Presentation-only: the plan supplies the numbers, this shapes
|
|
3849
|
+
* the label.
|
|
3850
|
+
*/
|
|
3851
|
+
declare function formatPrescription(p: PrescriptionInput | null | undefined): string | null;
|
|
3852
|
+
|
|
3853
|
+
export { Accordion, AccordionButton, type AccordionButtonProps, AccordionItem, type AccordionItemProps, AccordionPanel, type AccordionPanelProps, type AccordionProps, type ActiveExerciseStatus, type ActiveWorkoutExercise, type ActiveWorkoutInput, ActiveWorkoutPage, type ActiveWorkoutPageProps, type ActiveWorkoutRest, type ActiveWorkoutSuperset, Alert, AlertDescription, type AlertDescriptionProps, type AlertProps, type AlertStatus, AlertTitle, type AlertTitleProps, type AlertVariant, Autocomplete, type AutocompleteOption, type AutocompleteProps, Avatar, AvatarBadge, type AvatarBadgeProps, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, Badge, type BadgeColor, type BadgeProps, type BadgeSize, BadgeText, type BadgeTextProps, type BadgeVariant, BaseBadge, type BaseBadgeProps, type BaseBadgeSize, type BaseBadgeVariant, BreadcrumbItem, type BreadcrumbItemProps, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonColor, ButtonIcon, type ButtonIconProps, type ButtonProps, type ButtonSize, ButtonSpinner, type ButtonSpinnerProps, ButtonText, type ButtonTextProps, type ButtonVariant, CapacityBandChart, type CapacityBandChartProps, type CapacityBandDataPoint, type CapacityBandProjection, Caption, type CaptionProps, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, type CardElevation, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardSkeleton, type CardSkeletonProps, CardTitle, type CardTitleProps, type CardVariant, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type CheckboxSize, Chip, type ChipColor, type ChipProps, type ChipSize, type ChipVariant, CircularProgress, type CircularProgressProps, Collapse, CollapseButton, type CollapseButtonProps, CollapseContent, type CollapseContentProps, type CollapseProps, DataRow, type DataRowProps, DateTime, type DateTimeFormat, type DateTimeProps, DeviationBar, type DeviationBarProps, Divider, type DividerOrientation, type DividerProps, Drawer, DrawerBody, type DrawerBodyProps, DrawerFooter, type DrawerFooterProps, DrawerHeader, type DrawerHeaderProps, type DrawerPlacement, type DrawerProps, type DrawerSize, EXERCISE_DETAIL_TABS, ElevationLevel, EmptyState, type EmptyStateProps, ExerciseCard, type ExerciseCardProps, type ExerciseCardState, type ExerciseDetailEntry, type ExerciseDetailHeader, ExerciseDetailPage, type ExerciseDetailPageProps, type ExerciseDetailStats, type ExerciseDetailTab, type ExerciseTrend, type ExerciseVbt, type ExerciseVbtSet, type FieldState, type FieldWrapperProps, FormActions, type FormActionsProps, type FormErrors, FormField, type FormFieldProps, FormRow, type FormRowProps, FormSection, type FormSectionProps, type FormTouched, type FormValues, Gauge, type GaugeProps, type GaugeThreshold, GlowIntensity, HStack, Heading, type HeadingProps, HelpTip, type HelpTipIcon, type HelpTipPlacement, type HelpTipProps, type HelpTipSize, IconBox, type IconBoxProps, Indicator, type IndicatorColor, type IndicatorProps, type IndicatorSize, Input, InputBar, type InputBarProps, InputGroup, type InputGroupProps, type InputProps, type InputSize, type InputVariant, IntensityBar, type IntensityBarProps, Label, type LabelProps, LabelWithHelp, type LabelWithHelpProps, Link, type LinkColor, type LinkProps, type LinkUnderline, ListItem, ListItemContent, type ListItemContentProps, ListItemDivider, type ListItemDividerProps, ListItemIcon, type ListItemIconProps, type ListItemProps, ListItemTrailing, type ListItemTrailingProps, Menu, MenuDivider, type MenuDividerProps, MenuGroup, type MenuGroupProps, MenuItem, type MenuItemProps, MenuList, type MenuListProps, type MenuProps, MenuTrigger, type MenuTriggerProps, type Meso, MesoCard, type MesoCardProps, MesoProgressBar, type MesoProgressBarProps, type MesoStatus, MesoStatusCardProps, type MesoVolumeHeatmapEntry, Metric, MetricGroup, type MetricGroupProps, type MetricProps, type MetricTrend, Modal, ModalBody, type ModalBodyProps, ModalCloseButton, type ModalCloseButtonProps, ModalContent, type ModalContentProps, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, type ModalProps, type ModalSize, ModalTitle, type ModalTitleProps, MuscleGroupChip, type MuscleGroupChipProps, Overline, type OverlineProps, type PRType, Paragraph, type ParagraphProps, PasswordInput, type PasswordInputProps, Pill, type PillColor, type PillProps, type PillSize, type PillVariant, PlaceholderStrip, type PlaceholderStripProps, type PlanMeso, type PlanWeek, type PlanWorkout, Popover, PopoverCloseButton, type PopoverCloseButtonProps, PopoverContent, type PopoverContentProps, type PopoverPlacement, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, PrBadge, type PrBadgeProps, PrHistoryModal, type PrHistoryModalProps, type PrRecord, type PrRecordType, type PrescriptionInput, type ProgramBreadcrumb, type ProgramNavLevel, ProgramPlanningPage, type ProgramPlanningPageProps, type ProgramSelection, Progress, type ProgressColor, type ProgressProps, type ProgressSize, ProgressSteps, type ProgressStepsProps, type ProgressVariant, Radio, type RadioColor, RadioGroup, type RadioGroupProps, type RadioProps, type RadioSize, ReadinessCheck, type ReadinessCheckProps, type ReadinessFactor, RestTimer, type RestTimerProps, type ResultType, Scatter, type ScatterAxis, type ScatterDatum, type ScatterProps, Section, SectionContent, type SectionContentProps, SectionHeader, type SectionHeaderProps, type SectionProps, Select, type SelectOption, type SelectProps, SetRow, type SetRowMode, type SetRowProps, Sidebar, SidebarContent, type SidebarContentProps, SidebarDivider, type SidebarDividerProps, SidebarFooter, type SidebarFooterProps, SidebarHeader, type SidebarHeaderProps, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarSection, type SidebarSectionProps, Skeleton, type SkeletonAnimation, SkeletonCard, type SkeletonCardProps, SkeletonCircle, type SkeletonCircleProps, SkeletonListItem, type SkeletonListItemProps, type SkeletonProps, SkeletonText, type SkeletonTextProps, type SkeletonVariant, type SortDirection, Sparkline, type SparklineProps, Spinner, type SpinnerColor, type SpinnerProps, type SpinnerSize, Stack, type StackProps, StatusDot, type StatusDotProps, type StatusDotVariant, type StatusType, StepContent, type StepContentProps, StepIndicator, type StepIndicatorProps, StepLabel, type StepLabelProps, type StepStatus, Stepper, type StepperOrientation, type StepperProps, Step as StepperStep, type StepProps as StepperStepProps, StrengthTrendChart, type StrengthTrendChartMesoBoundary, type StrengthTrendChartProps, type StrengthTrendDataPoint, SupersetWrapper, type SupersetWrapperProps, Surface, type SurfaceProps, Switch, type SwitchProps, type SwitchSize, TEMPO_PACING, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, TabPanels, type TabPanelsProps, type TabProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableHeader, TableHeaderCell, type TableHeaderCellProps, type TableHeaderProps, TablePagination, type TablePaginationProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsOrientation, type TabsProps, type TabsVariant, TempoBar, type TempoBarProps, TempoDisplay, type TempoDisplayProps, type TempoPacingState, type TempoPhaseKey, Toast, type ToastConfig, type ToastPosition, type ToastProps, ToastProvider, type ToastProviderProps, type ToastStatus, ToolbarButton, ToolbarButtonGroup, type ToolbarButtonGroupProps, type ToolbarButtonProps, type ToolbarButtonSize, type ToolbarButtonVariant, Tooltip, type TooltipPlacement, type TooltipProps, Treemap, type TreemapDatum, type TreemapProps, type TreemapScale, Typography, type TypographyAlign, type TypographyColor, type TypographyProps, type TypographyVariant, type UseTableOptions, type UseTableReturn, VStack, type VbtSummary, VelocityStrip, type VelocityStripProps, type VolumeStatus, type WarmUpStatus, type WarmUpValidation, WeekRow, type WeekRowProps, type WeekRowWorkout, WeightBadge, type WeightBadgeProps, type WeightBadgeSize, WorkoutCard, type WorkoutCardProps, type WorkoutDot, type WorkoutDotStatus, type WorkoutGroup, type WorkoutMuscleGroup, type WorkoutMuscleVolumeStatus, WorkoutPill, type WorkoutPillProps, type WorkoutPillStatus, type WorkoutProgress, type WorkoutStatus, alpha, buildBreadcrumbs, calculateMeanVelocity, calculateVelocityLoss, cn, composeValidators, countCompletedSets, createFieldId, deriveExerciseStats, deriveNavLevel, deriveWorkoutProgress, findActiveExercise, findMeso, findWeek, findWorkout, formatDateTime, formatPrescription, formatSignedPct, formatVelocity, getContrastText, getFieldAriaProps, getFieldValidationProps, getLuminance, getResultColor, getStatusColor, getTempoFillPct, getTempoPacingState, getVelocityZoneColor, getVelocityZoneName, groupExercises, hasMaxLength, hasMinLength, isEmpty, isValidEmail, roundRpe, roundTempo, roundWeight, rpeColor, statusToCardState, summarizeVbt, toActiveCardProps, toExerciseCardProps, toProgressBarMesos, useTable, useToast, useToolbarButton, validationRules };
|