@titan-design/react-ui 0.4.0 → 0.6.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/MesoStatusCard-CQk71hSi.d.mts +77 -0
- package/dist/MesoStatusCard-CQk71hSi.d.ts +77 -0
- package/dist/bodymap.d.mts +246 -3
- package/dist/bodymap.d.ts +246 -3
- package/dist/bodymap.js +232 -185
- package/dist/bodymap.js.map +1 -1
- package/dist/bodymap.mjs +1963 -11
- package/dist/bodymap.mjs.map +1 -1
- package/dist/index.d.mts +193 -744
- package/dist/index.d.ts +193 -744
- package/dist/index.js +1551 -1856
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10770 -8213
- package/dist/index.mjs.map +1 -1
- package/dist/pages-D7Jlssvp.d.ts +791 -0
- package/dist/pages-MO0JCySL.d.mts +791 -0
- package/dist/pages.d.mts +4 -0
- package/dist/pages.d.ts +4 -0
- package/dist/pages.js +6694 -0
- package/dist/pages.js.map +1 -0
- package/dist/pages.mjs +6674 -0
- package/dist/pages.mjs.map +1 -0
- package/dist/theme/index.d.mts +473 -211
- package/dist/theme/index.d.ts +473 -211
- package/dist/theme/index.js +341 -127
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/index.mjs +2085 -2
- package/dist/theme/index.mjs.map +1 -1
- package/dist/theme/tokens-css.js +148 -139
- package/dist/theme/tokens-css.js.map +1 -1
- package/dist/theme/tokens-css.mjs +582 -1
- package/dist/theme/tokens-css.mjs.map +1 -1
- package/package.json +11 -7
- package/src/components/custom/DateTime/DateTime.stories.tsx +82 -6
- package/src/components/custom/DateTime/DateTime.test.tsx +29 -3
- package/src/components/custom/DateTime/DateTime.tsx +55 -15
- package/src/components/custom/Gauge/Gauge.test.tsx +2 -2
- package/src/components/custom/Gauge/Gauge.tsx +6 -3
- package/src/components/custom/Scatter/Scatter.tsx +3 -5
- package/src/components/custom/Treemap/Treemap.tsx +3 -5
- package/src/components/custom/Typography/Typography.stories.tsx +45 -27
- package/src/components/custom/Typography/Typography.test.tsx +13 -3
- package/src/components/custom/Typography/Typography.tsx +5 -0
- package/src/components/custom/Workout/ActiveWorkoutPage.tsx +2 -1
- package/src/components/custom/Workout/BaseBadge.stories.tsx +3 -3
- package/src/components/custom/Workout/BaseBadge.test.tsx +1 -1
- package/src/components/custom/Workout/BaseBadge.tsx +1 -1
- package/src/components/custom/Workout/BodyMap.tsx +6 -3
- package/src/components/custom/Workout/BodyMapDetailPanel.tsx +6 -3
- package/src/components/custom/Workout/CapacityBandChart.test.tsx +2 -2
- package/src/components/custom/Workout/CapacityBandChart.tsx +9 -6
- package/src/components/custom/Workout/DeviationBar.test.tsx +1 -1
- package/src/components/custom/Workout/DeviationBar.tsx +7 -4
- package/src/components/custom/Workout/ExerciseCard.tsx +5 -1
- package/src/components/custom/Workout/ExerciseDetailPage.tsx +19 -5
- package/src/components/custom/Workout/InputBar.tsx +2 -1
- package/src/components/custom/Workout/IntensityBar.test.tsx +112 -60
- package/src/components/custom/Workout/IntensityBar.tsx +113 -58
- package/src/components/custom/Workout/MesoCard.tsx +8 -3
- package/src/components/custom/Workout/MesoProgressBar.test.tsx +1 -1
- package/src/components/custom/Workout/MesoProgressBar.tsx +3 -2
- package/src/components/custom/Workout/MesoStatusCard.tsx +20 -13
- package/src/components/custom/Workout/MuscleGroupChip.tsx +7 -4
- package/src/components/custom/Workout/PlaceholderStrip.tsx +5 -9
- package/src/components/custom/Workout/PrBadge.tsx +7 -4
- package/src/components/custom/Workout/PrHistoryModal.tsx +6 -5
- package/src/components/custom/Workout/ProgramPlanningPage.tsx +2 -1
- package/src/components/custom/Workout/README.md +50 -0
- package/src/components/custom/Workout/ReadinessCheck.tsx +7 -4
- package/src/components/custom/Workout/RestTimer.test.tsx +41 -10
- package/src/components/custom/Workout/RestTimer.tsx +50 -44
- package/src/components/custom/Workout/SetRow.tsx +12 -2
- package/src/components/custom/Workout/Sparkline.tsx +2 -1
- package/src/components/custom/Workout/StatusDot.test.tsx +2 -2
- package/src/components/custom/Workout/StatusDot.tsx +12 -9
- package/src/components/custom/Workout/StrengthTrendChart.tsx +9 -6
- package/src/components/custom/Workout/SupersetWrapper.tsx +2 -1
- package/src/components/custom/Workout/TempoDisplay.stories.tsx +69 -2
- package/src/components/custom/Workout/TempoDisplay.test.tsx +35 -0
- package/src/components/custom/Workout/TempoDisplay.tsx +109 -3
- package/src/components/custom/Workout/VelocityStrip.test.tsx +89 -2
- package/src/components/custom/Workout/VelocityStrip.tsx +203 -38
- package/src/components/custom/Workout/WeekRow.test.tsx +2 -2
- package/src/components/custom/Workout/WeekRow.tsx +3 -2
- package/src/components/custom/Workout/WeightBadge.test.tsx +2 -2
- package/src/components/custom/Workout/WeightBadge.tsx +8 -4
- package/src/components/custom/Workout/WorkoutCard.tsx +5 -2
- package/src/components/custom/Workout/WorkoutPill.tsx +12 -8
- package/src/components/custom/Workout/icons.tsx +7 -0
- package/src/components/custom/Workout/index.ts +38 -47
- package/src/components/icons/SvgIcon.tsx +50 -0
- package/src/components/icons/icons.stories.tsx +57 -0
- package/src/components/icons/icons.test.tsx +43 -0
- package/src/components/icons/icons.tsx +45 -0
- package/src/components/icons/index.ts +4 -0
- package/src/components/index.ts +6 -0
- package/src/components/shell/BrandLockup.stories.tsx +27 -0
- package/src/components/shell/BrandLockup.test.tsx +23 -0
- package/src/components/shell/BrandLockup.tsx +47 -0
- package/src/components/shell/DeviceIndicator.stories.tsx +28 -0
- package/src/components/shell/DeviceIndicator.test.tsx +26 -0
- package/src/components/shell/DeviceIndicator.tsx +52 -0
- package/src/components/shell/DeviceMenu.stories.tsx +47 -0
- package/src/components/shell/DeviceMenu.test.tsx +40 -0
- package/src/components/shell/DeviceMenu.tsx +65 -0
- package/src/components/shell/DeviceRow.stories.tsx +38 -0
- package/src/components/shell/DeviceRow.test.tsx +37 -0
- package/src/components/shell/DeviceRow.tsx +58 -0
- package/src/components/shell/README.md +86 -0
- package/src/components/shell/SessionStatePill.stories.tsx +27 -0
- package/src/components/shell/SessionStatePill.test.tsx +25 -0
- package/src/components/shell/SessionStatePill.tsx +46 -0
- package/src/components/shell/TopBar.stories.tsx +49 -0
- package/src/components/shell/TopBar.test.tsx +36 -0
- package/src/components/shell/TopBar.tsx +89 -0
- package/src/components/shell/index.ts +8 -0
- package/src/components/ui/indicator/Indicator.stories.tsx +37 -1
- package/src/components/ui/indicator/Indicator.test.tsx +19 -1
- package/src/components/ui/indicator/Indicator.tsx +45 -6
- package/src/components/ui/indicator/index.ts +1 -1
- package/src/components/ui/spinner/Spinner.tsx +3 -2
- package/src/components/ui/toolbar-button/ToolbarButton.tsx +2 -1
- package/src/index.ts +3 -2
- package/src/pages.ts +61 -0
- package/src/test/stories-smoke.test.tsx +50 -0
- package/src/theme/ColorSystem.stories.tsx +323 -0
- package/src/theme/Colors.stories.tsx +69 -1
- package/src/theme/barrel.ts +54 -0
- package/src/theme/config.ts +16 -3
- package/src/theme/extracted-colors-dataviz.ts +21 -0
- package/src/theme/extracted-colors-ui.ts +20 -0
- package/src/theme/global.css +64 -52
- package/src/theme/gradients.test.ts +25 -0
- package/src/theme/gradients.ts +36 -0
- package/src/theme/index.ts +8 -43
- package/src/theme/native-theming-guard.test.ts +117 -0
- package/src/theme/tokens/primitives.test.ts +232 -0
- package/src/theme/tokens/primitives.ts +247 -0
- package/src/theme/tokens/semantic.ts +93 -81
- package/src/theme/workout-tokens.ts +22 -21
- package/src/utils/avatar-color.ts +3 -3
- package/tailwind.config.js +10 -3
- package/dist/bodymap-BhG55xHM.d.mts +0 -318
- package/dist/bodymap-BhG55xHM.d.ts +0 -318
- package/dist/chunk-2SISKTWM.mjs +0 -1027
- package/dist/chunk-2SISKTWM.mjs.map +0 -1
- package/dist/chunk-7XPB4NAO.mjs +0 -1013
- package/dist/chunk-7XPB4NAO.mjs.map +0 -1
- package/dist/chunk-SNVKL5WZ.mjs +0 -883
- package/dist/chunk-SNVKL5WZ.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -2,11 +2,48 @@ 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.mjs';
|
|
5
|
-
export { ComponentType, CssPropertyEntry, CssPropertyManifest, ElevationConfig, ManifestValidationResult, ShadowIntensity, ShadowSurface, ThemeConfig, ThemeMode, ThemePreset, ThemePresetColors, ThemePresetFonts, ThemePresetRadii, ThemePresetShadows,
|
|
6
|
-
|
|
7
|
-
export {
|
|
5
|
+
export { CATEGORICAL_CVD_SAFE_MAX, CategoricalVariant, ComponentType, CssPropertyEntry, CssPropertyManifest, ElevationConfig, GradientStyle, ManifestValidationResult, ShadowIntensity, ShadowSurface, ThemeConfig, ThemeMode, ThemePreset, ThemePresetColors, ThemePresetFonts, ThemePresetRadii, ThemePresetShadows, ThemeProviderMode, ThemeProviderProps, VariantAxes, VariantOverride, applyThemePreset, audiobookPreset, bestTextColor, buttonSizes, categoricalPalette, componentElevationRanges, createFlatShadow, createPressedHoverShadow, createPressedShadow, createRaisedHoverShadow, createRaisedShadow, darkThemeCSSVars, darken, defaultPreset, discreteRainbow, divergingScale, elevationSystem, getBaseSurfaceColor, getCategoricalColor, getDiscreteRainbowColor, getElevationConfig, getElevationShadow, getElevationSurface, getGlowShadow, getHoverColors, getSemanticColors, getThemeCSSVars, getValidatedElevation, gluestackConfig, hexToRgb, hsvToRgb, isCssPropertyManifest, isDark, lightThemeCSSVars, lighten, linearGradient, neumorphicShadows, primitiveBorderRadius, primitiveBreakpoints, primitiveColors, primitiveRamps, primitiveShadows, primitiveSpacing, primitiveTypography, primitiveZIndex, resolveColor, rgbToHex, rgbToHsv, semanticColorsDark, semanticColorsLight, semanticTypography, sequentialEffort, shadowColors, surfaceGradient, validateCssPropertyManifest } from './theme/index.mjs';
|
|
6
|
+
export { A as ActiveExerciseStatus, a as ActiveWorkoutExercise, b as ActiveWorkoutInput, c as ActiveWorkoutPageProps, d as ActiveWorkoutRest, e as ActiveWorkoutSuperset, C as CapacityBandChart, f as CapacityBandChartProps, g as CapacityBandDataPoint, h as CapacityBandProjection, E as ExerciseCard, i as ExerciseCardProps, j as ExerciseCardState, k as ExerciseDetailEntry, l as ExerciseDetailHeader, m as ExerciseDetailPageProps, n as ExerciseDetailStats, o as ExerciseDetailTab, p as ExerciseTrend, q as ExerciseVbt, r as ExerciseVbtSet, M as Meso, s as MesoCard, t as MesoCardProps, u as MesoProgressBar, v as MesoProgressBarProps, w as MesoStatus, x as MesoVolumeHeatmapEntry, P as PRType, y as PlanMeso, z as PlanWeek, B as PlanWorkout, D as PrBadge, F as PrBadgeProps, G as ProgramBreadcrumb, H as ProgramNavLevel, I as ProgramPlanningPageProps, J as ProgramSelection, S as SetRow, K as SetRowMode, L as SetRowProps, N as StrengthTrendChart, O as StrengthTrendChartMesoBoundary, Q as StrengthTrendChartProps, R as StrengthTrendDataPoint, V as VbtSummary, T as VelocityStrip, U as VelocityStripProps, W as VelocityZoneBandProp, X as WeekRow, Y as WeekRowProps, Z as WeekRowWorkout, _ as WorkoutCard, $ as WorkoutCardProps, a0 as WorkoutDot, a1 as WorkoutDotStatus, a2 as WorkoutGroup, a3 as WorkoutMuscleGroup, a4 as WorkoutMuscleVolumeStatus, a5 as WorkoutPill, a6 as WorkoutPillProps, a7 as WorkoutPillStatus, a8 as WorkoutProgress, a9 as WorkoutStatus, aa as calculateMeanVelocity, ab as calculateVelocityLoss, ac as getVelocityZoneColor, ad as getVelocityZoneName } from './pages-MO0JCySL.mjs';
|
|
7
|
+
export { M as MesoStatusBadge, a as MesoStatusBadgeVariant, b as MesoStatusCard, c as MesoStatusCardProps, d as MesoStatusCoaching, e as MesoStatusGauge, f as MesoStatusMetric, g as MesoStatusNextTarget } from './MesoStatusCard-CQk71hSi.mjs';
|
|
8
|
+
export { BodyMapData, BodyMapDetailPanelProps, BodyMapProps, ContributingExercise, MovementCategory, MuscleGroup, SimpleMuscleGroup, TrainingStatusMuscle, TrainingStatusPageProps, TrainingStatusSummary, UpcomingExercise, VolumeLandmarks } from './bodymap.mjs';
|
|
8
9
|
import { ClassValue } from 'clsx';
|
|
9
10
|
|
|
11
|
+
interface IconProps {
|
|
12
|
+
/** Rendered width/height in px (viewBox is fixed 24×24). */
|
|
13
|
+
size?: number;
|
|
14
|
+
/** Stroke color (or fill, for solid icons). Defaults to `currentColor` so a wrapper's text token drives it. */
|
|
15
|
+
color?: string;
|
|
16
|
+
/** Stroke width for outline icons. */
|
|
17
|
+
strokeWidth?: number;
|
|
18
|
+
/** Fill color; defaults to `none` (outline). */
|
|
19
|
+
fill?: string;
|
|
20
|
+
/** Accessible title — sets `role="img"` + `<title>`. Omit for a decorative icon (hidden from AT). */
|
|
21
|
+
title?: string;
|
|
22
|
+
}
|
|
23
|
+
interface SvgIconProps extends IconProps {
|
|
24
|
+
children: ReactNode;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Base SVG wrapper for the titan icon set — a 24×24 web-`<svg>` with the shared
|
|
28
|
+
* accessibility contract (titled → `role="img"` + `<title>`; untitled →
|
|
29
|
+
* `aria-hidden`) and `currentColor` inheritance. Icons pass their paths as
|
|
30
|
+
* children plus their stroke/fill defaults.
|
|
31
|
+
*/
|
|
32
|
+
declare function SvgIcon({ size, color, strokeWidth, fill, title, children, }: SvgIconProps): react_jsx_runtime.JSX.Element;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Voltras brand mark — the ◇ diamond (outline). Pass `fill` for a solid mark.
|
|
36
|
+
*/
|
|
37
|
+
declare function VoltrasMark({ size, ...props }: IconProps): react_jsx_runtime.JSX.Element;
|
|
38
|
+
/**
|
|
39
|
+
* Bluetooth glyph (stroked) — e.g. device-connection state (color via `currentColor`).
|
|
40
|
+
*/
|
|
41
|
+
declare function BluetoothIcon({ size, ...props }: IconProps): react_jsx_runtime.JSX.Element;
|
|
42
|
+
/** Dumbbell glyph (mirrors lucide-react `Dumbbell`). Outline-only by default. */
|
|
43
|
+
declare function DumbbellIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
44
|
+
/** Star glyph (mirrors lucide-react `Star`). Pass `fill` for a solid star. */
|
|
45
|
+
declare function StarIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
46
|
+
|
|
10
47
|
type AlertStatus = 'success' | 'info' | 'warning' | 'error';
|
|
11
48
|
type AlertVariant = 'subtle' | 'outline' | 'solid';
|
|
12
49
|
interface AlertProps extends ViewProps {
|
|
@@ -314,7 +351,9 @@ interface CardSkeletonProps {
|
|
|
314
351
|
declare function CardSkeleton({ hasHeader, hasFooter, contentLines, className, }: CardSkeletonProps): react_jsx_runtime.JSX.Element;
|
|
315
352
|
|
|
316
353
|
type IndicatorSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
317
|
-
type IndicatorColor = 'default' | 'primary' | 'success' | 'error' | 'warning' | 'info';
|
|
354
|
+
type IndicatorColor = 'default' | 'primary' | 'success' | 'error' | 'warning' | 'info' | 'error-vivid';
|
|
355
|
+
/** How a pulsing indicator animates: a subtle opacity fade, or an expanding ring. */
|
|
356
|
+
type IndicatorPulse = 'opacity' | 'ping';
|
|
318
357
|
interface IndicatorProps extends ViewProps {
|
|
319
358
|
/** Dot size */
|
|
320
359
|
size?: IndicatorSize;
|
|
@@ -326,10 +365,12 @@ interface IndicatorProps extends ViewProps {
|
|
|
326
365
|
glow?: boolean;
|
|
327
366
|
/** Add a ring border */
|
|
328
367
|
ring?: boolean;
|
|
368
|
+
/** Animate for live/active status. `true` = opacity fade; `'ping'` = expanding ring. */
|
|
369
|
+
pulse?: boolean | IndicatorPulse;
|
|
329
370
|
/** Additional className */
|
|
330
371
|
className?: string;
|
|
331
372
|
}
|
|
332
|
-
declare function Indicator({ size, color, customColor, glow, ring, className, style, ...props }: IndicatorProps): react_jsx_runtime.JSX.Element;
|
|
373
|
+
declare function Indicator({ size, color, customColor, glow, ring, pulse, className, style, ...props }: IndicatorProps): react_jsx_runtime.JSX.Element;
|
|
333
374
|
|
|
334
375
|
type BadgeVariant = 'solid' | 'subtle' | 'outline';
|
|
335
376
|
type BadgeColor = 'default' | 'primary' | 'secondary' | 'success' | 'error' | 'warning' | 'info';
|
|
@@ -1985,7 +2026,7 @@ interface PillProps extends ViewProps {
|
|
|
1985
2026
|
}
|
|
1986
2027
|
declare function Pill({ children, variant, color, size, rounded, leftElement, onPress, className, ...props }: PillProps): react_jsx_runtime.JSX.Element;
|
|
1987
2028
|
|
|
1988
|
-
type TypographyVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'body1' | 'body2' | 'subtitle1' | 'subtitle2' | 'caption' | 'overline' | 'button';
|
|
2029
|
+
type TypographyVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'body1' | 'body2' | 'subtitle1' | 'subtitle2' | 'caption' | 'overline' | 'button' | 'mono' | 'monoLabel';
|
|
1989
2030
|
type TypographyColor = 'primary' | 'secondary' | 'tertiary' | 'disabled' | 'inverse' | 'success' | 'error' | 'warning' | 'info' | 'inherit';
|
|
1990
2031
|
type TypographyAlign = 'left' | 'center' | 'right' | 'justify';
|
|
1991
2032
|
type TypographyMarginBottom = 'none' | 'sm' | 'md' | 'lg';
|
|
@@ -2446,14 +2487,24 @@ declare function StepContent({ status, className, children }: StepContentProps):
|
|
|
2446
2487
|
|
|
2447
2488
|
type DateTimeFormat = 'date' | 'time' | 'datetime' | 'relative' | 'short' | 'medium' | 'long' | 'full';
|
|
2448
2489
|
interface DateTimeProps extends TextProps {
|
|
2449
|
-
/** Date value (timestamp in ms, Date object, or ISO string) */
|
|
2450
|
-
value
|
|
2490
|
+
/** Date value (timestamp in ms, Date object, or ISO string). Optional when `live`. */
|
|
2491
|
+
value?: number | Date | string | null | undefined;
|
|
2451
2492
|
/** Display format */
|
|
2452
2493
|
format?: DateTimeFormat;
|
|
2453
2494
|
/** Custom format string (overrides format) */
|
|
2454
2495
|
customFormat?: string;
|
|
2455
2496
|
/** Whether to show in UTC */
|
|
2456
2497
|
isUTC?: boolean;
|
|
2498
|
+
/** Force 12h (true) or 24h (false) for time/datetime formats; locale default when omitted. */
|
|
2499
|
+
hour12?: boolean;
|
|
2500
|
+
/** Include seconds in time/datetime formats. */
|
|
2501
|
+
seconds?: boolean;
|
|
2502
|
+
/** Render through Typography with this variant (e.g. 'mono'); plain inheriting Text when omitted. */
|
|
2503
|
+
variant?: TypographyVariant;
|
|
2504
|
+
/** Track the current time and re-render on an interval (ignores `value`). For clocks / relative time. */
|
|
2505
|
+
live?: boolean;
|
|
2506
|
+
/** Refresh interval in ms when `live` (default 1000). */
|
|
2507
|
+
refreshMs?: number;
|
|
2457
2508
|
/** Fallback text when value is null/undefined */
|
|
2458
2509
|
fallback?: string;
|
|
2459
2510
|
/** Text color */
|
|
@@ -2477,7 +2528,7 @@ interface DateTimeProps extends TextProps {
|
|
|
2477
2528
|
* // UTC time
|
|
2478
2529
|
* <DateTime value={timestamp} format="datetime" isUTC />
|
|
2479
2530
|
*/
|
|
2480
|
-
declare function DateTime({ value, format, customFormat, isUTC, fallback, color, className, ...props }: DateTimeProps): react_jsx_runtime.JSX.Element;
|
|
2531
|
+
declare function DateTime({ value, format, customFormat, isUTC, hour12, seconds, variant, live, refreshMs, fallback, color, className, ...props }: DateTimeProps): react_jsx_runtime.JSX.Element;
|
|
2481
2532
|
/**
|
|
2482
2533
|
* Utility function to format dates outside of React components.
|
|
2483
2534
|
*/
|
|
@@ -2534,20 +2585,6 @@ interface WeightBadgeProps extends Omit<BaseBadgeProps, 'variant' | 'icon' | 'ch
|
|
|
2534
2585
|
}
|
|
2535
2586
|
declare function WeightBadge({ value, unit, reps, delta, isPr, showIcon, size, onPress, className, ...props }: WeightBadgeProps): react_jsx_runtime.JSX.Element;
|
|
2536
2587
|
|
|
2537
|
-
type PRType = 'e1rm' | 'weight' | 'reps' | 'volume' | 'velocity';
|
|
2538
|
-
interface PrBadgeProps extends ViewProps {
|
|
2539
|
-
/** PR type determines auto-generated label */
|
|
2540
|
-
type?: PRType;
|
|
2541
|
-
/** Display label (e.g., "PR e1RM", "PR 5RM"). Auto-generated from type if omitted. */
|
|
2542
|
-
label?: string;
|
|
2543
|
-
/** Show only the star icon, no text label */
|
|
2544
|
-
compact?: boolean;
|
|
2545
|
-
/** Trigger pop animation on mount */
|
|
2546
|
-
animate?: boolean;
|
|
2547
|
-
className?: string;
|
|
2548
|
-
}
|
|
2549
|
-
declare function PrBadge({ type, label: labelProp, compact, animate, className, ...props }: PrBadgeProps): react_jsx_runtime.JSX.Element;
|
|
2550
|
-
|
|
2551
2588
|
type StatusDotVariant = 'success' | 'warning' | 'error' | 'neutral' | 'on-track' | 'deviation' | 'future';
|
|
2552
2589
|
interface StatusDotProps extends ViewProps {
|
|
2553
2590
|
variant: StatusDotVariant;
|
|
@@ -2571,6 +2608,19 @@ interface PlaceholderStripProps extends ViewProps {
|
|
|
2571
2608
|
}
|
|
2572
2609
|
declare function PlaceholderStrip({ mode, segments, ...props }: PlaceholderStripProps): react_jsx_runtime.JSX.Element;
|
|
2573
2610
|
|
|
2611
|
+
/** The four tempo phases, in the order the display renders them. */
|
|
2612
|
+
type TempoLivePhase = 'eccentric' | 'pauseBottom' | 'concentric' | 'pauseTop';
|
|
2613
|
+
/**
|
|
2614
|
+
* Live rep state driving the phase-fill overlay. Controlled by the consumer
|
|
2615
|
+
* (matching titan's `elapsedMs`-in convention) so the same real timer feeds
|
|
2616
|
+
* both web dashboard and native app — TempoDisplay owns rendering only.
|
|
2617
|
+
*/
|
|
2618
|
+
interface TempoLiveState {
|
|
2619
|
+
/** Phase currently in progress, or null when idle/at rest. */
|
|
2620
|
+
activePhase: TempoLivePhase | null;
|
|
2621
|
+
/** Elapsed time (ms) within the active phase. */
|
|
2622
|
+
phaseElapsedMs: number;
|
|
2623
|
+
}
|
|
2574
2624
|
interface TempoDisplayProps extends ViewProps {
|
|
2575
2625
|
/** Tempo values: [eccentric, pauseBottom, concentric, pauseTop] in seconds */
|
|
2576
2626
|
tempo: [number, number, number, number];
|
|
@@ -2579,10 +2629,16 @@ interface TempoDisplayProps extends ViewProps {
|
|
|
2579
2629
|
colored?: boolean;
|
|
2580
2630
|
/** Show info tooltip on press */
|
|
2581
2631
|
showInfo?: boolean;
|
|
2632
|
+
/**
|
|
2633
|
+
* When set, renders a live phase-fill: the active phase digit fills against
|
|
2634
|
+
* its prescribed duration and inactive phases dim. Omit for the static
|
|
2635
|
+
* prescription string (default, backward compatible).
|
|
2636
|
+
*/
|
|
2637
|
+
live?: TempoLiveState;
|
|
2582
2638
|
onPress?: () => void;
|
|
2583
2639
|
className?: string;
|
|
2584
2640
|
}
|
|
2585
|
-
declare function TempoDisplay({ tempo, size, colored, showInfo, onPress, className, ...props }: TempoDisplayProps): react_jsx_runtime.JSX.Element;
|
|
2641
|
+
declare function TempoDisplay({ tempo, size, colored, showInfo, live, onPress, className, ...props }: TempoDisplayProps): react_jsx_runtime.JSX.Element;
|
|
2586
2642
|
|
|
2587
2643
|
/**
|
|
2588
2644
|
* Titan-local phase key. Consumers map their own movement-phase enum onto this
|
|
@@ -2633,9 +2689,9 @@ declare function DeviationBar({ deviation, width, className, ...props }: Deviati
|
|
|
2633
2689
|
|
|
2634
2690
|
type IntensityBarOrientation = 'vertical' | 'horizontal';
|
|
2635
2691
|
interface IntensityBarProps extends ViewProps {
|
|
2636
|
-
/** Current intensity level
|
|
2692
|
+
/** Current intensity level; 1 == 100% of target. Values >1 render as over-target. */
|
|
2637
2693
|
level: number;
|
|
2638
|
-
/**
|
|
2694
|
+
/** Target position 0-1. When the level sits at this target the fill gains an at-target glow. */
|
|
2639
2695
|
threshold?: number;
|
|
2640
2696
|
/** Orientation */
|
|
2641
2697
|
orientation?: IntensityBarOrientation;
|
|
@@ -2643,43 +2699,12 @@ interface IntensityBarProps extends ViewProps {
|
|
|
2643
2699
|
size?: number;
|
|
2644
2700
|
/** Width for vertical (default 6px) or height for horizontal */
|
|
2645
2701
|
thickness?: number;
|
|
2646
|
-
/** Show
|
|
2702
|
+
/** Show the "MRV" threshold label under the bar */
|
|
2647
2703
|
showThresholdLabel?: boolean;
|
|
2648
2704
|
className?: string;
|
|
2649
2705
|
}
|
|
2650
2706
|
declare function IntensityBar({ level, threshold, orientation, size, thickness, showThresholdLabel, className, ...props }: IntensityBarProps): react_jsx_runtime.JSX.Element;
|
|
2651
2707
|
|
|
2652
|
-
/**
|
|
2653
|
-
* Spec statuses: completed | current | upcoming | deload.
|
|
2654
|
-
* `next` and `missed` are additive extras supported by this implementation.
|
|
2655
|
-
*/
|
|
2656
|
-
type WorkoutPillStatus = 'completed' | 'current' | 'upcoming' | 'deload' | 'next' | 'missed';
|
|
2657
|
-
interface WorkoutPillProps extends ViewProps {
|
|
2658
|
-
name: string;
|
|
2659
|
-
status: WorkoutPillStatus;
|
|
2660
|
-
/** Force pulsing animation. Defaults to pulsing only on `current` status. */
|
|
2661
|
-
pulse?: boolean;
|
|
2662
|
-
onPress?: () => void;
|
|
2663
|
-
highlighted?: boolean;
|
|
2664
|
-
className?: string;
|
|
2665
|
-
}
|
|
2666
|
-
declare function WorkoutPill({ name, status, pulse, onPress, highlighted, className, ...props }: WorkoutPillProps): react_jsx_runtime.JSX.Element;
|
|
2667
|
-
|
|
2668
|
-
interface VelocityStripProps extends ViewProps {
|
|
2669
|
-
velocities: number[];
|
|
2670
|
-
expanded?: boolean;
|
|
2671
|
-
onToggle?: () => void;
|
|
2672
|
-
onRepPress?: (index: number, velocity: number) => void;
|
|
2673
|
-
variant?: 'full' | 'mini';
|
|
2674
|
-
showInfo?: boolean;
|
|
2675
|
-
className?: string;
|
|
2676
|
-
}
|
|
2677
|
-
declare function getVelocityZoneColor(velocity: number): string;
|
|
2678
|
-
declare function getVelocityZoneName(velocity: number): string;
|
|
2679
|
-
declare function calculateVelocityLoss(velocities: number[]): number;
|
|
2680
|
-
declare function calculateMeanVelocity(velocities: number[]): number;
|
|
2681
|
-
declare function VelocityStrip({ velocities, expanded, onToggle, onRepPress, variant, showInfo, className, ...props }: VelocityStripProps): react_jsx_runtime.JSX.Element;
|
|
2682
|
-
|
|
2683
2708
|
type VolumeStatus = 'untrained' | 'behind' | 'ontrack' | 'target' | 'over';
|
|
2684
2709
|
interface MuscleGroupChipProps extends ViewProps {
|
|
2685
2710
|
name: string;
|
|
@@ -2706,34 +2731,6 @@ interface SparklineProps extends ViewProps {
|
|
|
2706
2731
|
}
|
|
2707
2732
|
declare function Sparkline({ data, width, height, color, showDots, referenceLines, highlightLast, className, ...props }: SparklineProps): react_jsx_runtime.JSX.Element;
|
|
2708
2733
|
|
|
2709
|
-
type SetRowMode = 'active' | 'completed' | 'history';
|
|
2710
|
-
interface SetRowProps {
|
|
2711
|
-
mode: SetRowMode;
|
|
2712
|
-
setNumber: number;
|
|
2713
|
-
previous?: {
|
|
2714
|
-
reps: number;
|
|
2715
|
-
weight: number;
|
|
2716
|
-
} | null;
|
|
2717
|
-
reps: number | null;
|
|
2718
|
-
weight: number | null;
|
|
2719
|
-
rpe?: number | null;
|
|
2720
|
-
unit: 'lbs' | 'kg';
|
|
2721
|
-
velocities?: number[];
|
|
2722
|
-
velocityExpanded?: boolean;
|
|
2723
|
-
onVelocityToggle?: () => void;
|
|
2724
|
-
setType?: string;
|
|
2725
|
-
prBadges?: Array<{
|
|
2726
|
-
type: PRType;
|
|
2727
|
-
label: string;
|
|
2728
|
-
}>;
|
|
2729
|
-
isNextSet?: boolean;
|
|
2730
|
-
targets?: {
|
|
2731
|
-
reps: number;
|
|
2732
|
-
weight: number;
|
|
2733
|
-
};
|
|
2734
|
-
}
|
|
2735
|
-
declare function SetRow({ mode, setNumber, previous, reps, weight, rpe, unit, velocities, velocityExpanded, onVelocityToggle, setType, prBadges, isNextSet, targets, }: SetRowProps): react_jsx_runtime.JSX.Element;
|
|
2736
|
-
|
|
2737
2734
|
interface InputBarProps {
|
|
2738
2735
|
exerciseName: string;
|
|
2739
2736
|
setNumber: number;
|
|
@@ -2756,36 +2753,10 @@ interface RestTimerProps {
|
|
|
2756
2753
|
onAddTime: () => void;
|
|
2757
2754
|
nextSetInfo?: string;
|
|
2758
2755
|
visible: boolean;
|
|
2756
|
+
/** Passive/poll-only mode: hides the Skip and +30s controls, keeps the countdown, progress bar, and next-set line. */
|
|
2757
|
+
displayOnly?: boolean;
|
|
2759
2758
|
}
|
|
2760
|
-
declare function RestTimer({ totalSeconds, elapsedMs, onSkip, onAddTime, nextSetInfo, visible, }: RestTimerProps): react_jsx_runtime.JSX.Element | null;
|
|
2761
|
-
|
|
2762
|
-
type ExerciseCardState = 'collapsed' | 'expanded' | 'upcoming';
|
|
2763
|
-
interface ExerciseCardProps {
|
|
2764
|
-
name: string;
|
|
2765
|
-
state: ExerciseCardState;
|
|
2766
|
-
onToggle: () => void;
|
|
2767
|
-
onNavigateDetail?: () => void;
|
|
2768
|
-
summary?: {
|
|
2769
|
-
sets: number;
|
|
2770
|
-
reps: number | string;
|
|
2771
|
-
weight: number;
|
|
2772
|
-
unit: 'lbs' | 'kg';
|
|
2773
|
-
};
|
|
2774
|
-
e1rm?: {
|
|
2775
|
-
value: number;
|
|
2776
|
-
unit: 'lbs' | 'kg';
|
|
2777
|
-
};
|
|
2778
|
-
isPR?: boolean;
|
|
2779
|
-
setVelocities?: number[][];
|
|
2780
|
-
totalPlannedSets?: number;
|
|
2781
|
-
sets?: SetRowProps[];
|
|
2782
|
-
tempo?: [number, number, number, number];
|
|
2783
|
-
prescription?: string;
|
|
2784
|
-
previousBest?: string;
|
|
2785
|
-
supersetPosition?: 'first' | 'last' | 'middle' | null;
|
|
2786
|
-
supersetColor?: string;
|
|
2787
|
-
}
|
|
2788
|
-
declare function ExerciseCard(props: ExerciseCardProps): react_jsx_runtime.JSX.Element;
|
|
2759
|
+
declare function RestTimer({ totalSeconds, elapsedMs, onSkip, onAddTime, nextSetInfo, visible, displayOnly, }: RestTimerProps): react_jsx_runtime.JSX.Element | null;
|
|
2789
2760
|
|
|
2790
2761
|
interface SupersetWrapperProps {
|
|
2791
2762
|
label?: string;
|
|
@@ -2794,187 +2765,6 @@ interface SupersetWrapperProps {
|
|
|
2794
2765
|
}
|
|
2795
2766
|
declare function SupersetWrapper({ label, color, children, }: SupersetWrapperProps): react_jsx_runtime.JSX.Element;
|
|
2796
2767
|
|
|
2797
|
-
type MesoStatus = 'completed' | 'current' | 'upcoming';
|
|
2798
|
-
interface Meso {
|
|
2799
|
-
id: string;
|
|
2800
|
-
name: string;
|
|
2801
|
-
weekCount: number;
|
|
2802
|
-
status: MesoStatus;
|
|
2803
|
-
/**
|
|
2804
|
-
* 1-based week index of progress within a `current` meso.
|
|
2805
|
-
* Drives the solid fill width. Ignored for non-current mesos.
|
|
2806
|
-
*/
|
|
2807
|
-
currentWeek?: number;
|
|
2808
|
-
}
|
|
2809
|
-
interface MesoProgressBarProps extends ViewProps {
|
|
2810
|
-
mesos: Meso[];
|
|
2811
|
-
activeMesoId: string | null;
|
|
2812
|
-
onMesoPress: (mesoId: string) => void;
|
|
2813
|
-
className?: string;
|
|
2814
|
-
}
|
|
2815
|
-
/**
|
|
2816
|
-
* Segmented horizontal bar of mesocycles. Each segment is tappable and its
|
|
2817
|
-
* flex width is proportional to the meso's `weekCount`. The active segment is
|
|
2818
|
-
* highlighted with a 2px brand border to stay in sync with MesoCard selection.
|
|
2819
|
-
*
|
|
2820
|
-
* @example
|
|
2821
|
-
* <MesoProgressBar
|
|
2822
|
-
* mesos={[
|
|
2823
|
-
* { id: 'm1', name: 'Accumulation', weekCount: 4, status: 'completed' },
|
|
2824
|
-
* { id: 'm2', name: 'Intensification', weekCount: 3, status: 'current', currentWeek: 2 },
|
|
2825
|
-
* { id: 'm3', name: 'Peak', weekCount: 2, status: 'upcoming' },
|
|
2826
|
-
* ]}
|
|
2827
|
-
* activeMesoId="m2"
|
|
2828
|
-
* onMesoPress={(id) => console.log(id)}
|
|
2829
|
-
* />
|
|
2830
|
-
*/
|
|
2831
|
-
declare function MesoProgressBar({ mesos, activeMesoId, onMesoPress, className, ...props }: MesoProgressBarProps): react_jsx_runtime.JSX.Element;
|
|
2832
|
-
|
|
2833
|
-
interface WeekRowWorkout {
|
|
2834
|
-
name: string;
|
|
2835
|
-
status: WorkoutPillStatus;
|
|
2836
|
-
onPress?: () => void;
|
|
2837
|
-
}
|
|
2838
|
-
interface WeekRowProps extends ViewProps {
|
|
2839
|
-
/** Week index within the mesocycle (1-based) */
|
|
2840
|
-
weekNumber: number;
|
|
2841
|
-
/** Total weeks in the mesocycle */
|
|
2842
|
-
totalWeeks: number;
|
|
2843
|
-
/** Workouts scheduled for this week */
|
|
2844
|
-
workouts: WeekRowWorkout[];
|
|
2845
|
-
/** Planned intensity for the week, 0-1 */
|
|
2846
|
-
intensityLevel: number;
|
|
2847
|
-
/** Optional MRV/overexertion threshold, 0-1 */
|
|
2848
|
-
intensityThreshold?: number;
|
|
2849
|
-
/** Highlights this row as the active week */
|
|
2850
|
-
isCurrent?: boolean;
|
|
2851
|
-
/** Renders this row as a deload week (purple tint, deload pills) */
|
|
2852
|
-
isDeload?: boolean;
|
|
2853
|
-
className?: string;
|
|
2854
|
-
}
|
|
2855
|
-
/**
|
|
2856
|
-
* A single week within a mesocycle, showing the week number, its workout pills,
|
|
2857
|
-
* and a right-aligned vertical intensity indicator.
|
|
2858
|
-
*
|
|
2859
|
-
* @example
|
|
2860
|
-
* <WeekRow
|
|
2861
|
-
* weekNumber={1}
|
|
2862
|
-
* totalWeeks={4}
|
|
2863
|
-
* workouts={[
|
|
2864
|
-
* { name: 'Upper', status: 'completed' },
|
|
2865
|
-
* { name: 'Lower', status: 'current' },
|
|
2866
|
-
* ]}
|
|
2867
|
-
* intensityLevel={0.55}
|
|
2868
|
-
* intensityThreshold={0.8}
|
|
2869
|
-
* isCurrent
|
|
2870
|
-
* />
|
|
2871
|
-
*/
|
|
2872
|
-
declare function WeekRow({ weekNumber, totalWeeks, workouts, intensityLevel, intensityThreshold, isCurrent, isDeload, className, ...props }: WeekRowProps): react_jsx_runtime.JSX.Element;
|
|
2873
|
-
|
|
2874
|
-
type WorkoutStatus = 'completed' | 'today' | 'upcoming';
|
|
2875
|
-
/** Spec volume-status vocabulary; mapped to MuscleGroupChip's VolumeStatus internally. */
|
|
2876
|
-
type WorkoutMuscleVolumeStatus = 'under' | 'maintenance' | 'productive' | 'over';
|
|
2877
|
-
interface WorkoutMuscleGroup {
|
|
2878
|
-
/** Muscle group identifier (free-form to match plan data). */
|
|
2879
|
-
group: string;
|
|
2880
|
-
/** Display label, may be abbreviated. */
|
|
2881
|
-
label: string;
|
|
2882
|
-
/** Volume status relative to landmarks. */
|
|
2883
|
-
volumeStatus?: WorkoutMuscleVolumeStatus;
|
|
2884
|
-
}
|
|
2885
|
-
interface WorkoutCardProps extends ViewProps {
|
|
2886
|
-
name: string;
|
|
2887
|
-
date: string;
|
|
2888
|
-
/** e.g. "45 min" */
|
|
2889
|
-
duration?: string;
|
|
2890
|
-
status: WorkoutStatus;
|
|
2891
|
-
muscleGroups: WorkoutMuscleGroup[];
|
|
2892
|
-
totalSets: number;
|
|
2893
|
-
/** Total lbs/kg moved across the workout. */
|
|
2894
|
-
totalVolume?: number;
|
|
2895
|
-
unit: 'lbs' | 'kg';
|
|
2896
|
-
exercises?: ExerciseCardProps[];
|
|
2897
|
-
expanded?: boolean;
|
|
2898
|
-
onToggle?: () => void;
|
|
2899
|
-
className?: string;
|
|
2900
|
-
}
|
|
2901
|
-
/**
|
|
2902
|
-
* A workout within a week: name, date, duration, muscle-group pills, and a
|
|
2903
|
-
* stats summary. When expandable it renders contained ExerciseCards on expand.
|
|
2904
|
-
* Status drives a colored left border, today adds a brand tint, and upcoming
|
|
2905
|
-
* is dimmed.
|
|
2906
|
-
*
|
|
2907
|
-
* @example
|
|
2908
|
-
* <WorkoutCard
|
|
2909
|
-
* name="Upper A"
|
|
2910
|
-
* date="Mon, Jun 23"
|
|
2911
|
-
* duration="45 min"
|
|
2912
|
-
* status="today"
|
|
2913
|
-
* muscleGroups={[{ group: 'chest', label: 'Chest', volumeStatus: 'productive' }]}
|
|
2914
|
-
* totalSets={18}
|
|
2915
|
-
* totalVolume={12450}
|
|
2916
|
-
* unit="lbs"
|
|
2917
|
-
* expanded
|
|
2918
|
-
* onToggle={() => {}}
|
|
2919
|
-
* exercises={exercises}
|
|
2920
|
-
* />
|
|
2921
|
-
*/
|
|
2922
|
-
declare function WorkoutCard({ name, date, duration, status, muscleGroups, totalSets, totalVolume, unit, exercises, expanded, onToggle, className, ...props }: WorkoutCardProps): react_jsx_runtime.JSX.Element;
|
|
2923
|
-
|
|
2924
|
-
interface MesoVolumeHeatmapEntry {
|
|
2925
|
-
/** Muscle group identifier (free-form to match plan data). */
|
|
2926
|
-
group: string;
|
|
2927
|
-
/** Planned volume intensity for the group, 0-100. */
|
|
2928
|
-
percentage: number;
|
|
2929
|
-
}
|
|
2930
|
-
interface MesoCardProps extends ViewProps {
|
|
2931
|
-
/** Mesocycle name, e.g. "Accumulation". */
|
|
2932
|
-
name: string;
|
|
2933
|
-
/** Training goal, e.g. "Hypertrophy", "Strength", "Peaking". */
|
|
2934
|
-
goal: string;
|
|
2935
|
-
/** Training split, e.g. "Upper/Lower", "Push/Pull/Legs". */
|
|
2936
|
-
split: string;
|
|
2937
|
-
/** Week range label, e.g. "Weeks 1-4". */
|
|
2938
|
-
weekRange: string;
|
|
2939
|
-
/** Current week within the mesocycle (1-based). */
|
|
2940
|
-
currentWeek?: number;
|
|
2941
|
-
/** Total weeks in the mesocycle. */
|
|
2942
|
-
totalWeeks: number;
|
|
2943
|
-
/** Weeks rendered as a WeekRow list when expanded. */
|
|
2944
|
-
weeks: WeekRowProps[];
|
|
2945
|
-
/** Whether the card is expanded to reveal the week list. */
|
|
2946
|
-
expanded?: boolean;
|
|
2947
|
-
/** Toggles expansion; makes the header a button when provided. */
|
|
2948
|
-
onToggle?: () => void;
|
|
2949
|
-
/** Whether this meso is highlighted in the MesoProgressBar. */
|
|
2950
|
-
highlighted?: boolean;
|
|
2951
|
-
/** Volume heatmap data per muscle group for the meso. */
|
|
2952
|
-
volumeHeatmap?: MesoVolumeHeatmapEntry[];
|
|
2953
|
-
className?: string;
|
|
2954
|
-
}
|
|
2955
|
-
/**
|
|
2956
|
-
* A mesocycle card with name, goal, split, week range, an optional volume
|
|
2957
|
-
* heatmap strip, and an expandable WeekRow list. Highlighting animates the
|
|
2958
|
-
* border toward brand-primary with a subtle glow to stay in sync with the
|
|
2959
|
-
* MesoProgressBar.
|
|
2960
|
-
*
|
|
2961
|
-
* @example
|
|
2962
|
-
* <MesoCard
|
|
2963
|
-
* name="Accumulation"
|
|
2964
|
-
* goal="Hypertrophy"
|
|
2965
|
-
* split="Upper/Lower"
|
|
2966
|
-
* weekRange="Weeks 1-4"
|
|
2967
|
-
* currentWeek={2}
|
|
2968
|
-
* totalWeeks={4}
|
|
2969
|
-
* weeks={weeks}
|
|
2970
|
-
* volumeHeatmap={[{ group: 'chest', percentage: 80 }]}
|
|
2971
|
-
* expanded
|
|
2972
|
-
* onToggle={() => {}}
|
|
2973
|
-
* highlighted
|
|
2974
|
-
* />
|
|
2975
|
-
*/
|
|
2976
|
-
declare function MesoCard({ name, goal, split, weekRange, currentWeek, totalWeeks, weeks, expanded, onToggle, highlighted, volumeHeatmap, className, ...props }: MesoCardProps): react_jsx_runtime.JSX.Element;
|
|
2977
|
-
|
|
2978
2768
|
type PrRecordType = 'e1rm' | 'weight' | 'reps' | 'volume' | 'velocity';
|
|
2979
2769
|
interface PrRecord {
|
|
2980
2770
|
/** PR category, drives the row label and ordering grouping. */
|
|
@@ -3072,453 +2862,6 @@ interface ReadinessCheckProps {
|
|
|
3072
2862
|
*/
|
|
3073
2863
|
declare function ReadinessCheck({ factors, score, warmUpValidation, warmUpCompleted, onConfirm, className, }: ReadinessCheckProps): react_jsx_runtime.JSX.Element;
|
|
3074
2864
|
|
|
3075
|
-
interface StrengthTrendDataPoint {
|
|
3076
|
-
/** ISO date string for the session. */
|
|
3077
|
-
date: string;
|
|
3078
|
-
/** Estimated one-rep max in the chart's unit. */
|
|
3079
|
-
e1rm: number;
|
|
3080
|
-
/** Marks a personal-record session (rendered with a star). */
|
|
3081
|
-
isPR?: boolean;
|
|
3082
|
-
/** Optional human label shown in the tooltip instead of the raw date. */
|
|
3083
|
-
sessionLabel?: string;
|
|
3084
|
-
}
|
|
3085
|
-
interface StrengthTrendChartMesoBoundary {
|
|
3086
|
-
/** ISO date where the mesocycle boundary falls. */
|
|
3087
|
-
date: string;
|
|
3088
|
-
/** Short label, e.g. "Hypertrophy". */
|
|
3089
|
-
label: string;
|
|
3090
|
-
}
|
|
3091
|
-
interface StrengthTrendChartProps extends ViewProps {
|
|
3092
|
-
/** Actual e1RM data points, chronological. */
|
|
3093
|
-
data: StrengthTrendDataPoint[];
|
|
3094
|
-
/** Projected/planned e1RM trajectory, drawn as a dashed line. */
|
|
3095
|
-
projection?: StrengthTrendDataPoint[];
|
|
3096
|
-
/** Chart plot width in pixels. */
|
|
3097
|
-
width: number;
|
|
3098
|
-
/** Chart plot height in pixels (120-160 for the compact variant). */
|
|
3099
|
-
height: number;
|
|
3100
|
-
/** Mesocycle boundary markers (vertical guides + labels). */
|
|
3101
|
-
mesoBoundaries?: StrengthTrendChartMesoBoundary[];
|
|
3102
|
-
/** Called when an actual data point is tapped. */
|
|
3103
|
-
onPointPress?: (point: StrengthTrendDataPoint) => void;
|
|
3104
|
-
/** Unit for display and labels. */
|
|
3105
|
-
unit: 'lbs' | 'kg';
|
|
3106
|
-
/** Animate the left-to-right line draw on mount (default true). */
|
|
3107
|
-
animateOnMount?: boolean;
|
|
3108
|
-
className?: string;
|
|
3109
|
-
}
|
|
3110
|
-
/**
|
|
3111
|
-
* Estimated-1RM line chart over time with an optional dashed plan-projection
|
|
3112
|
-
* line and PR star markers. Rendered entirely with absolutely-positioned
|
|
3113
|
-
* Views (no SVG), following the Sparkline approach. Tapping an actual point
|
|
3114
|
-
* opens a tooltip and fires `onPointPress`. A trend pill below the chart
|
|
3115
|
-
* summarizes the percentage change for the current mesocycle.
|
|
3116
|
-
*
|
|
3117
|
-
* @example
|
|
3118
|
-
* <StrengthTrendChart
|
|
3119
|
-
* data={[{ date: '2026-01-01', e1rm: 225 }, { date: '2026-02-01', e1rm: 245, isPR: true }]}
|
|
3120
|
-
* projection={[{ date: '2026-02-01', e1rm: 245 }, { date: '2026-03-01', e1rm: 260 }]}
|
|
3121
|
-
* width={320}
|
|
3122
|
-
* height={150}
|
|
3123
|
-
* unit="lbs"
|
|
3124
|
-
* />
|
|
3125
|
-
*/
|
|
3126
|
-
declare function StrengthTrendChart({ data, projection, width, height, mesoBoundaries, onPointPress, unit, animateOnMount, className, ...props }: StrengthTrendChartProps): react_jsx_runtime.JSX.Element;
|
|
3127
|
-
|
|
3128
|
-
type WorkoutDotStatus = 'within' | 'above' | 'below';
|
|
3129
|
-
interface CapacityBandDataPoint {
|
|
3130
|
-
/** ISO-ish date string (e.g. "2026-06-01"). */
|
|
3131
|
-
date: string;
|
|
3132
|
-
/** Lower bound of the capacity band (MEV equivalent). */
|
|
3133
|
-
bandLow: number;
|
|
3134
|
-
/** Upper bound of the capacity band (MRV equivalent). */
|
|
3135
|
-
bandHigh: number;
|
|
3136
|
-
}
|
|
3137
|
-
interface WorkoutDot {
|
|
3138
|
-
date: string;
|
|
3139
|
-
/** Actual session load score. */
|
|
3140
|
-
load: number;
|
|
3141
|
-
/** Position of the session relative to the band. */
|
|
3142
|
-
status: WorkoutDotStatus;
|
|
3143
|
-
}
|
|
3144
|
-
interface CapacityBandProjection {
|
|
3145
|
-
/** Band shape over the next days if training continues (rises). */
|
|
3146
|
-
withTraining: CapacityBandDataPoint[];
|
|
3147
|
-
/** Band shape over the next days if resting (drops). */
|
|
3148
|
-
withRest: CapacityBandDataPoint[];
|
|
3149
|
-
}
|
|
3150
|
-
interface CapacityBandChartProps extends ViewProps {
|
|
3151
|
-
/** Capacity band shape over time. */
|
|
3152
|
-
band: CapacityBandDataPoint[];
|
|
3153
|
-
/** Workout sessions plotted as dots. */
|
|
3154
|
-
workouts: WorkoutDot[];
|
|
3155
|
-
/** Optional forward projection (next few days). */
|
|
3156
|
-
projection?: CapacityBandProjection;
|
|
3157
|
-
/** Chart width in px. */
|
|
3158
|
-
width: number;
|
|
3159
|
-
/** Chart height in px. */
|
|
3160
|
-
height: number;
|
|
3161
|
-
/** Called when a workout dot is tapped. */
|
|
3162
|
-
onWorkoutPress?: (workout: WorkoutDot) => void;
|
|
3163
|
-
className?: string;
|
|
3164
|
-
}
|
|
3165
|
-
/**
|
|
3166
|
-
* Gentler-Streak-inspired fatigue visualization. Renders a shaded capacity
|
|
3167
|
-
* band (between a rolling MEV/MRV estimate), workout sessions as colored dots
|
|
3168
|
-
* positioned by load, and an optional dashed forward projection that diverges
|
|
3169
|
-
* for "keep training" (rises) versus "rest" (drops). View-based, no SVG:
|
|
3170
|
-
* the band fill is a run of vertical columns and the edges/projection are
|
|
3171
|
-
* rotated line Views (same technique as Sparkline).
|
|
3172
|
-
*
|
|
3173
|
-
* @example
|
|
3174
|
-
* <CapacityBandChart
|
|
3175
|
-
* band={band}
|
|
3176
|
-
* workouts={workouts}
|
|
3177
|
-
* projection={{ withTraining, withRest }}
|
|
3178
|
-
* width={320}
|
|
3179
|
-
* height={180}
|
|
3180
|
-
* onWorkoutPress={(w) => openSession(w)}
|
|
3181
|
-
* />
|
|
3182
|
-
*/
|
|
3183
|
-
declare function CapacityBandChart({ band, workouts, projection, width, height, onWorkoutPress, className, ...props }: CapacityBandChartProps): react_jsx_runtime.JSX.Element;
|
|
3184
|
-
|
|
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;
|
|
3189
|
-
name: string;
|
|
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[];
|
|
3199
|
-
}
|
|
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;
|
|
3215
|
-
name: string;
|
|
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;
|
|
3287
|
-
}
|
|
3288
|
-
/**
|
|
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}
|
|
3391
|
-
* />
|
|
3392
|
-
*/
|
|
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;
|
|
3521
|
-
|
|
3522
2865
|
interface TreemapDatum {
|
|
3523
2866
|
/** Stable identity — returned by onPress and used as the React key. */
|
|
3524
2867
|
id: string;
|
|
@@ -3642,6 +2985,112 @@ interface GaugeProps extends Omit<ViewProps, 'children'> {
|
|
|
3642
2985
|
*/
|
|
3643
2986
|
declare function Gauge({ value, min, max, size, label, unit, thresholds, color, className, ...props }: GaugeProps): react_jsx_runtime.JSX.Element;
|
|
3644
2987
|
|
|
2988
|
+
interface BrandLockupProps extends ViewProps {
|
|
2989
|
+
/** The "/ subtitle" that follows the wordmark. Default "wall dashboard". */
|
|
2990
|
+
subtitle?: string;
|
|
2991
|
+
/** Show the subtitle. Hidden at tablet width and below (S1-Q4 responsive). */
|
|
2992
|
+
showSubtitle?: boolean;
|
|
2993
|
+
className?: string;
|
|
2994
|
+
}
|
|
2995
|
+
/**
|
|
2996
|
+
* Product identity lockup for the top bar: ◇ mark + VOLTRAS wordmark + optional
|
|
2997
|
+
* subtitle. Composes the VoltrasMark icon + Typography. S1 · BrandLockup.
|
|
2998
|
+
*/
|
|
2999
|
+
declare function BrandLockup({ subtitle, showSubtitle, className, ...props }: BrandLockupProps): react_jsx_runtime.JSX.Element;
|
|
3000
|
+
|
|
3001
|
+
type SessionState = 'live' | 'rest' | 'idle';
|
|
3002
|
+
interface SessionStatePillProps extends ViewProps {
|
|
3003
|
+
/** Session state → dot color + pulse + label. */
|
|
3004
|
+
state: SessionState;
|
|
3005
|
+
/** Override the default label (LIVE / REST / IDLE). */
|
|
3006
|
+
label?: string;
|
|
3007
|
+
className?: string;
|
|
3008
|
+
}
|
|
3009
|
+
/**
|
|
3010
|
+
* The global session-state readout (dot + label). Shared: the top bar's status
|
|
3011
|
+
* and the Live-view header both use it (this is the ledger's "StatusPill",
|
|
3012
|
+
* Family C — built once). S1 · SessionStatePill.
|
|
3013
|
+
*/
|
|
3014
|
+
declare function SessionStatePill({ state, label, className, ...props }: SessionStatePillProps): react_jsx_runtime.JSX.Element;
|
|
3015
|
+
|
|
3016
|
+
type DeviceConnState = 'connected' | 'degraded' | 'lost';
|
|
3017
|
+
interface DeviceIndicatorProps extends ViewProps {
|
|
3018
|
+
/** Aggregate connection state (worst-of the bound devices) → glyph color. */
|
|
3019
|
+
status?: DeviceConnState;
|
|
3020
|
+
/** Tap handler. When omitted the glyph is non-interactive (e.g. inside a PopoverTrigger). */
|
|
3021
|
+
onPress?: () => void;
|
|
3022
|
+
/** Accessible label (names the glyph / the wrapping trigger button). */
|
|
3023
|
+
label?: string;
|
|
3024
|
+
className?: string;
|
|
3025
|
+
}
|
|
3026
|
+
/**
|
|
3027
|
+
* The device/BLE connection glyph — a color-coded bluetooth mark, no label.
|
|
3028
|
+
* Opens the DeviceMenu when tapped. S1 · DeviceIndicator.
|
|
3029
|
+
*/
|
|
3030
|
+
declare function DeviceIndicator({ status, onPress, label, className, ...props }: DeviceIndicatorProps): react_jsx_runtime.JSX.Element;
|
|
3031
|
+
|
|
3032
|
+
type DeviceRowState = 'connected' | 'available' | 'degraded' | 'lost';
|
|
3033
|
+
interface Device {
|
|
3034
|
+
/** Stable device id (e.g. "Voltra-A3F2"). */
|
|
3035
|
+
id: string;
|
|
3036
|
+
/** User-assigned slot/device name (e.g. "Left Cable"). */
|
|
3037
|
+
nickname: string;
|
|
3038
|
+
/** Bound slot, or null when unbound/available (used for the menu's bound/available tally). */
|
|
3039
|
+
slot?: 'L' | 'R' | null;
|
|
3040
|
+
/** Connection/availability state → the status dot color. */
|
|
3041
|
+
state: DeviceRowState;
|
|
3042
|
+
}
|
|
3043
|
+
interface DeviceRowProps extends ViewProps {
|
|
3044
|
+
device: Device;
|
|
3045
|
+
onPress?: () => void;
|
|
3046
|
+
className?: string;
|
|
3047
|
+
}
|
|
3048
|
+
/**
|
|
3049
|
+
* One device in the DeviceMenu: status dot · name · Bluetooth id. The dot color
|
|
3050
|
+
* carries the connection state (no redundant status text); the name is the one
|
|
3051
|
+
* slot label (no duplicate slot badge). S1 · DeviceRow.
|
|
3052
|
+
*/
|
|
3053
|
+
declare function DeviceRow({ device, onPress, className, ...props }: DeviceRowProps): react_jsx_runtime.JSX.Element;
|
|
3054
|
+
|
|
3055
|
+
interface DeviceMenuProps {
|
|
3056
|
+
devices: Device[];
|
|
3057
|
+
/** Controlled open state (optional — uncontrolled otherwise). */
|
|
3058
|
+
isOpen?: boolean;
|
|
3059
|
+
onOpenChange?: (open: boolean) => void;
|
|
3060
|
+
onSelectDevice?: (device: Device) => void;
|
|
3061
|
+
className?: string;
|
|
3062
|
+
}
|
|
3063
|
+
/**
|
|
3064
|
+
* The device glyph + its dropdown of individual devices (availability, slot
|
|
3065
|
+
* binding, id, connection state). Composes Popover + DeviceIndicator +
|
|
3066
|
+
* DeviceRow. S1 · DeviceMenu.
|
|
3067
|
+
*/
|
|
3068
|
+
declare function DeviceMenu({ devices, isOpen, onOpenChange, onSelectDevice, className, }: DeviceMenuProps): react_jsx_runtime.JSX.Element;
|
|
3069
|
+
|
|
3070
|
+
interface TopBarProps {
|
|
3071
|
+
/** Global session state → the status pill. */
|
|
3072
|
+
state: SessionState;
|
|
3073
|
+
/** Devices for the connection glyph + dropdown. */
|
|
3074
|
+
devices: Device[];
|
|
3075
|
+
/** The moment to display in the clock (Date/timestamp). Omit for a live ticking clock. */
|
|
3076
|
+
time?: number | Date;
|
|
3077
|
+
/** Brand subtitle. Default "wall dashboard". */
|
|
3078
|
+
subtitle?: string;
|
|
3079
|
+
/** Force the subtitle on/off; defaults to container-responsive (hidden below ~1024px). */
|
|
3080
|
+
showSubtitle?: boolean;
|
|
3081
|
+
/** Force the clock on/off; defaults to container-responsive (hidden below ~720px). */
|
|
3082
|
+
showClock?: boolean;
|
|
3083
|
+
onSelectDevice?: (device: Device) => void;
|
|
3084
|
+
className?: string;
|
|
3085
|
+
}
|
|
3086
|
+
/**
|
|
3087
|
+
* S1 · TopBar — the persistent shell chrome band. Brand (left) + a right cluster
|
|
3088
|
+
* of session state · device glyph · clock (clock edge-pinned so spacing stays
|
|
3089
|
+
* stable as the state text changes). Collapses subtitle then clock as its
|
|
3090
|
+
* container narrows.
|
|
3091
|
+
*/
|
|
3092
|
+
declare function TopBar({ state, devices, time, subtitle, showSubtitle, showClock, onSelectDevice, className, }: TopBarProps): react_jsx_runtime.JSX.Element;
|
|
3093
|
+
|
|
3645
3094
|
/**
|
|
3646
3095
|
* Utility function to merge Tailwind CSS classes with proper conflict resolution.
|
|
3647
3096
|
* Combines clsx for conditional classes with tailwind-merge for deduplication.
|
|
@@ -3850,4 +3299,4 @@ interface PrescriptionInput {
|
|
|
3850
3299
|
*/
|
|
3851
3300
|
declare function formatPrescription(p: PrescriptionInput | null | undefined): string | null;
|
|
3852
3301
|
|
|
3853
|
-
export { Accordion, AccordionButton, type AccordionButtonProps, AccordionItem, type AccordionItemProps, AccordionPanel, type AccordionPanelProps, type AccordionProps,
|
|
3302
|
+
export { Accordion, AccordionButton, type AccordionButtonProps, AccordionItem, type AccordionItemProps, AccordionPanel, type AccordionPanelProps, type AccordionProps, 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, BluetoothIcon, BrandLockup, type BrandLockupProps, BreadcrumbItem, type BreadcrumbItemProps, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonColor, ButtonIcon, type ButtonIconProps, type ButtonProps, type ButtonSize, ButtonSpinner, type ButtonSpinnerProps, ButtonText, type ButtonTextProps, type ButtonVariant, 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, type Device, type DeviceConnState, DeviceIndicator, type DeviceIndicatorProps, DeviceMenu, type DeviceMenuProps, DeviceRow, type DeviceRowProps, type DeviceRowState, Divider, type DividerOrientation, type DividerProps, Drawer, DrawerBody, type DrawerBodyProps, DrawerFooter, type DrawerFooterProps, DrawerHeader, type DrawerHeaderProps, type DrawerPlacement, type DrawerProps, type DrawerSize, DumbbellIcon, ElevationLevel, EmptyState, type EmptyStateProps, 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, type IconProps, Indicator, type IndicatorColor, type IndicatorProps, type IndicatorPulse, 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, 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, Paragraph, type ParagraphProps, PasswordInput, type PasswordInputProps, Pill, type PillColor, type PillProps, type PillSize, type PillVariant, PlaceholderStrip, type PlaceholderStripProps, Popover, PopoverCloseButton, type PopoverCloseButtonProps, PopoverContent, type PopoverContentProps, type PopoverPlacement, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, PrHistoryModal, type PrHistoryModalProps, type PrRecord, type PrRecordType, type PrescriptionInput, 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, type SessionState, SessionStatePill, type SessionStatePillProps, 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, StarIcon, 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, SupersetWrapper, type SupersetWrapperProps, Surface, type SurfaceProps, SvgIcon, type SvgIconProps, 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 TempoLivePhase, type TempoLiveState, 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, TopBar, type TopBarProps, Treemap, type TreemapDatum, type TreemapProps, type TreemapScale, Typography, type TypographyAlign, type TypographyColor, type TypographyProps, type TypographyVariant, type UseTableOptions, type UseTableReturn, VStack, VoltrasMark, type VolumeStatus, type WarmUpStatus, type WarmUpValidation, WeightBadge, type WeightBadgeProps, type WeightBadgeSize, alpha, cn, composeValidators, createFieldId, formatDateTime, formatPrescription, formatSignedPct, formatVelocity, getContrastText, getFieldAriaProps, getFieldValidationProps, getLuminance, getResultColor, getStatusColor, getTempoFillPct, getTempoPacingState, hasMaxLength, hasMinLength, isEmpty, isValidEmail, roundRpe, roundTempo, roundWeight, rpeColor, useTable, useToast, useToolbarButton, validationRules };
|