@titan-design/react-ui 0.7.0 → 0.9.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.
Files changed (52) hide show
  1. package/dist/index.d.mts +112 -55
  2. package/dist/index.d.ts +112 -55
  3. package/dist/index.js +795 -501
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +795 -498
  6. package/dist/index.mjs.map +1 -1
  7. package/dist/{pages-8u_4WbL-.d.mts → pages-D7hOD4Vj.d.mts} +17 -8
  8. package/dist/{pages-DaWiBOGa.d.ts → pages-DyEx-lBf.d.ts} +17 -8
  9. package/dist/pages.d.mts +1 -1
  10. package/dist/pages.d.ts +1 -1
  11. package/dist/pages.js +691 -250
  12. package/dist/pages.js.map +1 -1
  13. package/dist/pages.mjs +692 -251
  14. package/dist/pages.mjs.map +1 -1
  15. package/package.json +1 -1
  16. package/src/components/custom/CircularTimer/CircularTimer.stories.tsx +90 -0
  17. package/src/components/custom/CircularTimer/CircularTimer.test.tsx +62 -0
  18. package/src/components/custom/CircularTimer/CircularTimer.tsx +112 -0
  19. package/src/components/custom/CircularTimer/index.ts +1 -0
  20. package/src/components/custom/Workout/ExerciseIndicator.tsx +1 -1
  21. package/src/components/custom/Workout/FatigueMeter.stories.tsx +2 -2
  22. package/src/components/custom/Workout/FatigueMeter.test.tsx +12 -0
  23. package/src/components/custom/Workout/FatigueMeter.tsx +7 -3
  24. package/src/components/custom/Workout/README.md +70 -3
  25. package/src/components/custom/Workout/RestTimer.stories.tsx +132 -2
  26. package/src/components/custom/Workout/RestTimer.test.tsx +73 -0
  27. package/src/components/custom/Workout/RestTimer.tsx +141 -50
  28. package/src/components/custom/Workout/SetsRepsLoad.test.tsx +6 -0
  29. package/src/components/custom/Workout/SetsRepsLoad.tsx +15 -6
  30. package/src/components/custom/Workout/TempoDisplay.stories.tsx +240 -65
  31. package/src/components/custom/Workout/TempoDisplay.test.tsx +61 -16
  32. package/src/components/custom/Workout/TempoDisplay.tsx +173 -60
  33. package/src/components/custom/Workout/VelocityStrip.stories.tsx +152 -9
  34. package/src/components/custom/Workout/VelocityStrip.test.tsx +67 -3
  35. package/src/components/custom/Workout/VelocityStrip.tsx +323 -42
  36. package/src/components/custom/Workout/ZoneTrack.stories.tsx +2 -3
  37. package/src/components/custom/Workout/ZoneTrack.test.tsx +34 -0
  38. package/src/components/custom/Workout/ZoneTrack.tsx +91 -19
  39. package/src/components/custom/Workout/index.ts +1 -9
  40. package/src/components/custom/index.ts +1 -0
  41. package/src/components/ui/alert/Alert.stories.tsx +85 -2
  42. package/src/components/ui/alert/Alert.test.tsx +52 -0
  43. package/src/components/ui/alert/Alert.tsx +54 -20
  44. package/src/components/ui/progress/Progress.tsx +47 -22
  45. package/src/lab/north-star/LivePage.tsx +101 -0
  46. package/src/lab/north-star/LiveView.tsx +409 -0
  47. package/src/lab/north-star/LiveWallDashboard.stories.tsx +129 -0
  48. package/src/lab/north-star/RestView.tsx +140 -0
  49. package/src/lab/north-star/fixtures.ts +224 -0
  50. package/src/components/custom/Workout/TempoBar.stories.tsx +0 -95
  51. package/src/components/custom/Workout/TempoBar.test.tsx +0 -103
  52. package/src/components/custom/Workout/TempoBar.tsx +0 -215
@@ -23,7 +23,7 @@ declare function WorkoutPill({ name, status, pulse, onPress, highlighted, classN
23
23
  * (e.g. workout-analytics' `VelocityZones.bands`).
24
24
  *
25
25
  * Deliberately a plain structural shape — titan never imports the analytics
26
- * package (same policy as TempoBar's presentational phase key). Any object with
26
+ * package (the same presentational-only policy the Workout family follows). Any object with
27
27
  * this shape can be passed, so `zones={waVelocityZones.bands}` works directly.
28
28
  * Bands are ordered slow → fast, contiguous, and cover `[0, ∞)` with the top
29
29
  * band's `max === null`. Bands carry NO color — color is a UI concern resolved
@@ -87,15 +87,24 @@ interface VelocityStripProps extends ViewProps {
87
87
  * HEIGHT bar chart (rounded tops), whose chrome is prop-driven: with
88
88
  * {@link showNumbers} or {@link showInfo} on it's the framed chart (raised surface,
89
89
  * padding, per-bar m/s labels, mean/loss info row, interactive collapse); with both
90
- * off it's a bare strip — the active-set "spotlight" of {@link ExerciseCard}.
90
+ * off it's a bare strip — the active-set "spotlight" of {@link ExerciseCard}. `hero`
91
+ * — the across-the-room, single-set wall treatment: tall bars, a per-bar m/s value
92
+ * label, a dashed running-best reference line, and dashed placeholders for the reps
93
+ * still to come (see {@link targetReps}). Reuses the zone scale and the live-rep pop.
91
94
  */
92
- variant?: 'mini' | 'expanded';
93
- /** `expanded` plot height in px (bars scale to this). Default 60. */
95
+ variant?: 'mini' | 'expanded' | 'hero';
96
+ /** `expanded` / `hero` plot height in px (bars scale to this). Default 60 (`expanded`) / 220 (`hero`). */
94
97
  height?: number;
95
98
  /**
96
- * `expanded` bar scaling. `peak` (default) scales to the set's own max (+15%
97
- * headroom). `fixed` scales to a fixed velocity ceiling so bar heights read the
98
- * same absolute velocity across sets (the spotlight).
99
+ * `hero` only: the set's planned rep count. Reps beyond {@link velocities} draw as
100
+ * dashed placeholder stubs so the wall reads "3 of 8 done" at a glance. Ignored
101
+ * (and no placeholders drawn) when absent or ≤ the performed-rep count.
102
+ */
103
+ targetReps?: number;
104
+ /**
105
+ * `expanded` / `hero` bar scaling. `peak` (default) scales to the set's own max
106
+ * (+15% headroom). `fixed` scales to a fixed velocity ceiling so bar heights read
107
+ * the same absolute velocity across sets (the spotlight).
99
108
  */
100
109
  scale?: 'peak' | 'fixed';
101
110
  /** `expanded` framed chart: per-bar m/s labels. Default true. */
@@ -158,7 +167,7 @@ type VelocitySet =
158
167
  groupSize: number;
159
168
  planned?: number;
160
169
  };
161
- declare function VelocityStrip({ velocities, set, zones, liveRepIndex, expanded, onToggle, onRepPress, variant, height, scale, showNumbers, showInfo, className, ...props }: VelocityStripProps): react_jsx_runtime.JSX.Element | null;
170
+ declare function VelocityStrip({ velocities, set, zones, liveRepIndex, expanded, onToggle, onRepPress, variant, height, targetReps, scale, showNumbers, showInfo, className, ...props }: VelocityStripProps): react_jsx_runtime.JSX.Element | null;
162
171
 
163
172
  type SetRowUnit = 'lbs' | 'kg';
164
173
  /** A set's lifecycle: logged (`done`), being performed now (`live`), or planned (`todo`). */
@@ -23,7 +23,7 @@ declare function WorkoutPill({ name, status, pulse, onPress, highlighted, classN
23
23
  * (e.g. workout-analytics' `VelocityZones.bands`).
24
24
  *
25
25
  * Deliberately a plain structural shape — titan never imports the analytics
26
- * package (same policy as TempoBar's presentational phase key). Any object with
26
+ * package (the same presentational-only policy the Workout family follows). Any object with
27
27
  * this shape can be passed, so `zones={waVelocityZones.bands}` works directly.
28
28
  * Bands are ordered slow → fast, contiguous, and cover `[0, ∞)` with the top
29
29
  * band's `max === null`. Bands carry NO color — color is a UI concern resolved
@@ -87,15 +87,24 @@ interface VelocityStripProps extends ViewProps {
87
87
  * HEIGHT bar chart (rounded tops), whose chrome is prop-driven: with
88
88
  * {@link showNumbers} or {@link showInfo} on it's the framed chart (raised surface,
89
89
  * padding, per-bar m/s labels, mean/loss info row, interactive collapse); with both
90
- * off it's a bare strip — the active-set "spotlight" of {@link ExerciseCard}.
90
+ * off it's a bare strip — the active-set "spotlight" of {@link ExerciseCard}. `hero`
91
+ * — the across-the-room, single-set wall treatment: tall bars, a per-bar m/s value
92
+ * label, a dashed running-best reference line, and dashed placeholders for the reps
93
+ * still to come (see {@link targetReps}). Reuses the zone scale and the live-rep pop.
91
94
  */
92
- variant?: 'mini' | 'expanded';
93
- /** `expanded` plot height in px (bars scale to this). Default 60. */
95
+ variant?: 'mini' | 'expanded' | 'hero';
96
+ /** `expanded` / `hero` plot height in px (bars scale to this). Default 60 (`expanded`) / 220 (`hero`). */
94
97
  height?: number;
95
98
  /**
96
- * `expanded` bar scaling. `peak` (default) scales to the set's own max (+15%
97
- * headroom). `fixed` scales to a fixed velocity ceiling so bar heights read the
98
- * same absolute velocity across sets (the spotlight).
99
+ * `hero` only: the set's planned rep count. Reps beyond {@link velocities} draw as
100
+ * dashed placeholder stubs so the wall reads "3 of 8 done" at a glance. Ignored
101
+ * (and no placeholders drawn) when absent or ≤ the performed-rep count.
102
+ */
103
+ targetReps?: number;
104
+ /**
105
+ * `expanded` / `hero` bar scaling. `peak` (default) scales to the set's own max
106
+ * (+15% headroom). `fixed` scales to a fixed velocity ceiling so bar heights read
107
+ * the same absolute velocity across sets (the spotlight).
99
108
  */
100
109
  scale?: 'peak' | 'fixed';
101
110
  /** `expanded` framed chart: per-bar m/s labels. Default true. */
@@ -158,7 +167,7 @@ type VelocitySet =
158
167
  groupSize: number;
159
168
  planned?: number;
160
169
  };
161
- declare function VelocityStrip({ velocities, set, zones, liveRepIndex, expanded, onToggle, onRepPress, variant, height, scale, showNumbers, showInfo, className, ...props }: VelocityStripProps): react_jsx_runtime.JSX.Element | null;
170
+ declare function VelocityStrip({ velocities, set, zones, liveRepIndex, expanded, onToggle, onRepPress, variant, height, targetReps, scale, showNumbers, showInfo, className, ...props }: VelocityStripProps): react_jsx_runtime.JSX.Element | null;
162
171
 
163
172
  type SetRowUnit = 'lbs' | 'kg';
164
173
  /** A set's lifecycle: logged (`done`), being performed now (`live`), or planned (`todo`). */
package/dist/pages.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- export { A as ActiveExerciseStatus, a as ActiveWorkoutExercise, b as ActiveWorkoutInput, an as ActiveWorkoutPage, c as ActiveWorkoutPageProps, d as ActiveWorkoutRest, e as ActiveWorkoutSuperset, ao as EXERCISE_DETAIL_TABS, k as ExerciseDetailEntry, l as ExerciseDetailHeader, ap as ExerciseDetailPage, m as ExerciseDetailPageProps, n as ExerciseDetailStats, o as ExerciseDetailTab, r as ExerciseTrend, s as ExerciseVbt, t as ExerciseVbtSet, P as PlanMeso, B as PlanWeek, D as PlanWorkout, F as ProgramBreadcrumb, G as ProgramNavLevel, aq as ProgramPlanningPage, H as ProgramPlanningPageProps, J as ProgramSelection, Z as VbtSummary, a9 as WorkoutGroup, af as WorkoutProgress, ar as buildBreadcrumbs, as as countCompletedSets, at as deriveExerciseStats, au as deriveNavLevel, av as deriveWorkoutProgress, aw as findActiveExercise, ax as findMeso, ay as findWeek, az as findWorkout, aA as groupExercises, aB as isUpcomingExercise, aC as summarizeVbt, aD as toActiveCardProps, aE as toExerciseCardProps, aF as toProgressBarMesos } from './pages-8u_4WbL-.mjs';
1
+ export { A as ActiveExerciseStatus, a as ActiveWorkoutExercise, b as ActiveWorkoutInput, an as ActiveWorkoutPage, c as ActiveWorkoutPageProps, d as ActiveWorkoutRest, e as ActiveWorkoutSuperset, ao as EXERCISE_DETAIL_TABS, k as ExerciseDetailEntry, l as ExerciseDetailHeader, ap as ExerciseDetailPage, m as ExerciseDetailPageProps, n as ExerciseDetailStats, o as ExerciseDetailTab, r as ExerciseTrend, s as ExerciseVbt, t as ExerciseVbtSet, P as PlanMeso, B as PlanWeek, D as PlanWorkout, F as ProgramBreadcrumb, G as ProgramNavLevel, aq as ProgramPlanningPage, H as ProgramPlanningPageProps, J as ProgramSelection, Z as VbtSummary, a9 as WorkoutGroup, af as WorkoutProgress, ar as buildBreadcrumbs, as as countCompletedSets, at as deriveExerciseStats, au as deriveNavLevel, av as deriveWorkoutProgress, aw as findActiveExercise, ax as findMeso, ay as findWeek, az as findWorkout, aA as groupExercises, aB as isUpcomingExercise, aC as summarizeVbt, aD as toActiveCardProps, aE as toExerciseCardProps, aF as toProgressBarMesos } from './pages-D7hOD4Vj.mjs';
2
2
  import 'react/jsx-runtime';
3
3
  import 'react-native';
4
4
  import './MesoStatusCard-CQk71hSi.mjs';
package/dist/pages.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { A as ActiveExerciseStatus, a as ActiveWorkoutExercise, b as ActiveWorkoutInput, an as ActiveWorkoutPage, c as ActiveWorkoutPageProps, d as ActiveWorkoutRest, e as ActiveWorkoutSuperset, ao as EXERCISE_DETAIL_TABS, k as ExerciseDetailEntry, l as ExerciseDetailHeader, ap as ExerciseDetailPage, m as ExerciseDetailPageProps, n as ExerciseDetailStats, o as ExerciseDetailTab, r as ExerciseTrend, s as ExerciseVbt, t as ExerciseVbtSet, P as PlanMeso, B as PlanWeek, D as PlanWorkout, F as ProgramBreadcrumb, G as ProgramNavLevel, aq as ProgramPlanningPage, H as ProgramPlanningPageProps, J as ProgramSelection, Z as VbtSummary, a9 as WorkoutGroup, af as WorkoutProgress, ar as buildBreadcrumbs, as as countCompletedSets, at as deriveExerciseStats, au as deriveNavLevel, av as deriveWorkoutProgress, aw as findActiveExercise, ax as findMeso, ay as findWeek, az as findWorkout, aA as groupExercises, aB as isUpcomingExercise, aC as summarizeVbt, aD as toActiveCardProps, aE as toExerciseCardProps, aF as toProgressBarMesos } from './pages-DaWiBOGa.js';
1
+ export { A as ActiveExerciseStatus, a as ActiveWorkoutExercise, b as ActiveWorkoutInput, an as ActiveWorkoutPage, c as ActiveWorkoutPageProps, d as ActiveWorkoutRest, e as ActiveWorkoutSuperset, ao as EXERCISE_DETAIL_TABS, k as ExerciseDetailEntry, l as ExerciseDetailHeader, ap as ExerciseDetailPage, m as ExerciseDetailPageProps, n as ExerciseDetailStats, o as ExerciseDetailTab, r as ExerciseTrend, s as ExerciseVbt, t as ExerciseVbtSet, P as PlanMeso, B as PlanWeek, D as PlanWorkout, F as ProgramBreadcrumb, G as ProgramNavLevel, aq as ProgramPlanningPage, H as ProgramPlanningPageProps, J as ProgramSelection, Z as VbtSummary, a9 as WorkoutGroup, af as WorkoutProgress, ar as buildBreadcrumbs, as as countCompletedSets, at as deriveExerciseStats, au as deriveNavLevel, av as deriveWorkoutProgress, aw as findActiveExercise, ax as findMeso, ay as findWeek, az as findWorkout, aA as groupExercises, aB as isUpcomingExercise, aC as summarizeVbt, aD as toActiveCardProps, aE as toExerciseCardProps, aF as toProgressBarMesos } from './pages-DyEx-lBf.js';
2
2
  import 'react/jsx-runtime';
3
3
  import 'react-native';
4
4
  import './MesoStatusCard-CQk71hSi.js';