@titan-design/react-ui 0.6.0 → 0.7.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 (248) hide show
  1. package/dist/bodymap.js +12 -7
  2. package/dist/bodymap.js.map +1 -1
  3. package/dist/bodymap.mjs +12 -7
  4. package/dist/bodymap.mjs.map +1 -1
  5. package/dist/index.d.mts +855 -124
  6. package/dist/index.d.ts +855 -124
  7. package/dist/index.js +2276 -801
  8. package/dist/index.js.map +1 -1
  9. package/dist/index.mjs +2230 -802
  10. package/dist/index.mjs.map +1 -1
  11. package/dist/{pages-MO0JCySL.d.mts → pages-8u_4WbL-.d.mts} +280 -57
  12. package/dist/{pages-D7Jlssvp.d.ts → pages-DaWiBOGa.d.ts} +280 -57
  13. package/dist/pages.d.mts +1 -1
  14. package/dist/pages.d.ts +1 -1
  15. package/dist/pages.js +1255 -798
  16. package/dist/pages.js.map +1 -1
  17. package/dist/pages.mjs +1255 -798
  18. package/dist/pages.mjs.map +1 -1
  19. package/dist/theme/index.d.mts +16 -82
  20. package/dist/theme/index.d.ts +16 -82
  21. package/dist/theme/index.js +13 -115
  22. package/dist/theme/index.js.map +1 -1
  23. package/dist/theme/index.mjs +13 -115
  24. package/dist/theme/index.mjs.map +1 -1
  25. package/dist/theme/tokens-css.js +14 -6
  26. package/dist/theme/tokens-css.js.map +1 -1
  27. package/dist/theme/tokens-css.mjs +14 -6
  28. package/dist/theme/tokens-css.mjs.map +1 -1
  29. package/package.json +1 -1
  30. package/src/arch/Architecture.stories.tsx +870 -0
  31. package/src/arch/annotations.json +48 -0
  32. package/src/arch/arch-graph.json +4301 -0
  33. package/src/components/custom/DateTime/DateTime.stories.tsx +1 -1
  34. package/src/components/custom/EmptyState/EmptyState.stories.tsx +1 -1
  35. package/src/components/custom/Gauge/Gauge.stories.tsx +1 -1
  36. package/src/components/custom/Metric/Metric.stories.tsx +1 -1
  37. package/src/components/custom/Scatter/Scatter.stories.tsx +1 -1
  38. package/src/components/custom/Sidebar/Sidebar.stories.tsx +1 -1
  39. package/src/components/custom/Table/Table.stories.tsx +1 -1
  40. package/src/components/custom/TimerReadout/TimerReadout.stories.tsx +62 -0
  41. package/src/components/custom/TimerReadout/TimerReadout.test.tsx +72 -0
  42. package/src/components/custom/TimerReadout/TimerReadout.tsx +75 -0
  43. package/src/components/custom/TimerReadout/index.ts +1 -0
  44. package/src/components/custom/Treemap/Treemap.stories.tsx +1 -1
  45. package/src/components/custom/Typography/Typography.stories.tsx +1 -1
  46. package/src/components/custom/Workout/ActiveWorkoutPage.stories.tsx +21 -13
  47. package/src/components/custom/Workout/ActiveWorkoutPage.test.tsx +16 -13
  48. package/src/components/custom/Workout/ActiveWorkoutPage.tsx +9 -15
  49. package/src/components/custom/Workout/BaseBadge.stories.tsx +1 -1
  50. package/src/components/custom/Workout/BodyMap.stories.tsx +1 -1
  51. package/src/components/custom/Workout/BodyMapDetailPanel.stories.tsx +1 -1
  52. package/src/components/custom/Workout/CapacityBandChart.stories.tsx +1 -1
  53. package/src/components/custom/Workout/DeviationBar.stories.tsx +1 -1
  54. package/src/components/custom/Workout/ExerciseCard.stories.tsx +51 -66
  55. package/src/components/custom/Workout/ExerciseCard.test.tsx +146 -143
  56. package/src/components/custom/Workout/ExerciseCard.tsx +176 -198
  57. package/src/components/custom/Workout/ExerciseCardHeading.stories.tsx +99 -0
  58. package/src/components/custom/Workout/ExerciseCardHeading.test.tsx +72 -0
  59. package/src/components/custom/Workout/ExerciseCardHeading.tsx +43 -0
  60. package/src/components/custom/Workout/ExerciseCardUnified.stories.tsx +151 -0
  61. package/src/components/custom/Workout/ExerciseDetailPage.stories.tsx +5 -3
  62. package/src/components/custom/Workout/ExerciseDetailPage.test.tsx +4 -4
  63. package/src/components/custom/Workout/ExerciseDetailPage.tsx +4 -5
  64. package/src/components/custom/Workout/ExerciseHeading.stories.tsx +81 -0
  65. package/src/components/custom/Workout/ExerciseHeading.test.tsx +77 -0
  66. package/src/components/custom/Workout/ExerciseHeading.tsx +85 -0
  67. package/src/components/custom/Workout/ExerciseIndicator.stories.tsx +110 -0
  68. package/src/components/custom/Workout/ExerciseIndicator.test.tsx +93 -0
  69. package/src/components/custom/Workout/ExerciseIndicator.tsx +120 -0
  70. package/src/components/custom/Workout/FatigueMeter.stories.tsx +51 -0
  71. package/src/components/custom/Workout/FatigueMeter.test.tsx +73 -0
  72. package/src/components/custom/Workout/FatigueMeter.tsx +82 -0
  73. package/src/components/custom/Workout/InputBar.stories.tsx +1 -1
  74. package/src/components/custom/Workout/IntensityBar.stories.tsx +1 -1
  75. package/src/components/custom/Workout/LiveAuraFrame.stories.tsx +153 -0
  76. package/src/components/custom/Workout/LiveAuraFrame.test.tsx +74 -0
  77. package/src/components/custom/Workout/LiveAuraFrame.tsx +105 -0
  78. package/src/components/custom/Workout/MesoCard.stories.tsx +1 -1
  79. package/src/components/custom/Workout/MesoProgressBar.stories.tsx +1 -1
  80. package/src/components/custom/Workout/MesoStatusCard.stories.tsx +1 -1
  81. package/src/components/custom/Workout/MetricTiles.stories.tsx +60 -0
  82. package/src/components/custom/Workout/MetricTiles.test.tsx +58 -0
  83. package/src/components/custom/Workout/MetricTiles.tsx +48 -0
  84. package/src/components/custom/Workout/MuscleGroupChip.stories.tsx +1 -1
  85. package/src/components/custom/Workout/PlaceholderStrip.stories.tsx +1 -1
  86. package/src/components/custom/Workout/PrBadge.stories.tsx +1 -1
  87. package/src/components/custom/Workout/PrHistoryModal.stories.tsx +1 -1
  88. package/src/components/custom/Workout/ProgramPlanningPage.stories.tsx +4 -16
  89. package/src/components/custom/Workout/ProgramPlanningPage.tsx +8 -6
  90. package/src/components/custom/Workout/README.md +146 -4
  91. package/src/components/custom/Workout/ReadinessCheck.stories.tsx +1 -1
  92. package/src/components/custom/Workout/RestTimer.stories.tsx +1 -1
  93. package/src/components/custom/Workout/RestTimer.tsx +15 -10
  94. package/src/components/custom/Workout/RowInventory.stories.tsx +405 -0
  95. package/src/components/custom/Workout/S3FullRail.stories.tsx +34 -0
  96. package/src/components/custom/Workout/S3SessionPace.stories.tsx +95 -0
  97. package/src/components/custom/Workout/S3SessionRailHeading.stories.tsx +61 -0
  98. package/src/components/custom/Workout/S3SetTypes.stories.tsx +176 -0
  99. package/src/components/custom/Workout/S3WorkoutExpansion.stories.tsx +240 -0
  100. package/src/components/custom/Workout/ScheduleTiles.stories.tsx +40 -0
  101. package/src/components/custom/Workout/ScheduleTiles.test.tsx +34 -0
  102. package/src/components/custom/Workout/ScheduleTiles.tsx +70 -0
  103. package/src/components/custom/Workout/SegmentedBar.stories.tsx +99 -0
  104. package/src/components/custom/Workout/SegmentedBar.test.tsx +77 -0
  105. package/src/components/custom/Workout/SegmentedBar.tsx +172 -0
  106. package/src/components/custom/Workout/SegmentedProgressBar.stories.tsx +50 -0
  107. package/src/components/custom/Workout/SegmentedProgressBar.test.tsx +80 -0
  108. package/src/components/custom/Workout/SegmentedProgressBar.tsx +67 -0
  109. package/src/components/custom/Workout/SessionHeader.stories.tsx +121 -0
  110. package/src/components/custom/Workout/SessionHeader.test.tsx +122 -0
  111. package/src/components/custom/Workout/SessionHeader.tsx +152 -0
  112. package/src/components/custom/Workout/SessionRail.stories.tsx +153 -0
  113. package/src/components/custom/Workout/SessionRail.test.tsx +86 -0
  114. package/src/components/custom/Workout/SessionRail.tsx +126 -0
  115. package/src/components/custom/Workout/SetBar.stories.tsx +124 -0
  116. package/src/components/custom/Workout/SetBar.test.tsx +123 -0
  117. package/src/components/custom/Workout/SetBar.tsx +171 -0
  118. package/src/components/custom/Workout/SetRow.stories.tsx +50 -100
  119. package/src/components/custom/Workout/SetRow.test.tsx +94 -166
  120. package/src/components/custom/Workout/SetRow.tsx +169 -232
  121. package/src/components/custom/Workout/SetStrip.stories.tsx +154 -0
  122. package/src/components/custom/Workout/SetStrip.test.tsx +109 -0
  123. package/src/components/custom/Workout/SetStrip.tsx +71 -0
  124. package/src/components/custom/Workout/SetTableHeader.stories.tsx +66 -0
  125. package/src/components/custom/Workout/SetTableHeader.test.tsx +47 -0
  126. package/src/components/custom/Workout/SetTableHeader.tsx +88 -0
  127. package/src/components/custom/Workout/SetsRepsLoad.stories.tsx +47 -0
  128. package/src/components/custom/Workout/SetsRepsLoad.test.tsx +44 -0
  129. package/src/components/custom/Workout/SetsRepsLoad.tsx +52 -0
  130. package/src/components/custom/Workout/Sparkline.stories.tsx +1 -1
  131. package/src/components/custom/Workout/StatusDot.stories.tsx +1 -1
  132. package/src/components/custom/Workout/StatusPill.stories.tsx +59 -0
  133. package/src/components/custom/Workout/StatusPill.test.tsx +63 -0
  134. package/src/components/custom/Workout/StatusPill.tsx +88 -0
  135. package/src/components/custom/Workout/StrengthTrendChart.stories.tsx +1 -1
  136. package/src/components/custom/Workout/SupersetWrapper.stories.tsx +1 -1
  137. package/src/components/custom/Workout/TempoBar.stories.tsx +1 -1
  138. package/src/components/custom/Workout/TempoDisplay.stories.tsx +12 -1
  139. package/src/components/custom/Workout/TempoDisplay.tsx +23 -33
  140. package/src/components/custom/Workout/TrainingStatusPage.stories.tsx +1 -1
  141. package/src/components/custom/Workout/VelocityStrip.modalities.stories.tsx +254 -0
  142. package/src/components/custom/Workout/VelocityStrip.responsive.stories.tsx +145 -0
  143. package/src/components/custom/Workout/VelocityStrip.stories.tsx +129 -66
  144. package/src/components/custom/Workout/VelocityStrip.test.tsx +376 -141
  145. package/src/components/custom/Workout/VelocityStrip.tsx +508 -120
  146. package/src/components/custom/Workout/VolumeLandmarkBar.stories.tsx +73 -0
  147. package/src/components/custom/Workout/VolumeLandmarkBar.test.tsx +119 -0
  148. package/src/components/custom/Workout/VolumeLandmarkBar.tsx +154 -0
  149. package/src/components/custom/Workout/WeekRow.stories.tsx +1 -1
  150. package/src/components/custom/Workout/WeightBadge.stories.tsx +1 -1
  151. package/src/components/custom/Workout/WorkoutCard.stories.tsx +2 -6
  152. package/src/components/custom/Workout/WorkoutCard.test.tsx +13 -46
  153. package/src/components/custom/Workout/WorkoutPill.stories.tsx +1 -1
  154. package/src/components/custom/Workout/ZoneTrack.stories.tsx +140 -0
  155. package/src/components/custom/Workout/ZoneTrack.test.tsx +200 -0
  156. package/src/components/custom/Workout/ZoneTrack.tsx +315 -0
  157. package/src/components/custom/Workout/index.ts +55 -2
  158. package/src/components/custom/Workout/metricText.stories.tsx +69 -0
  159. package/src/components/custom/Workout/metricText.tsx +34 -0
  160. package/src/components/custom/Workout/paceTone.test.ts +29 -0
  161. package/src/components/custom/Workout/paceTone.ts +27 -0
  162. package/src/components/custom/Workout/setHeadingKit.tsx +177 -0
  163. package/src/components/custom/index.ts +1 -0
  164. package/src/components/custom/stepper/Stepper.stories.tsx +1 -1
  165. package/src/components/icons/icons.stories.tsx +67 -2
  166. package/src/components/icons/icons.test.tsx +32 -2
  167. package/src/components/icons/icons.tsx +108 -0
  168. package/src/components/shell/BrandLockup.stories.tsx +3 -3
  169. package/src/components/shell/DashboardShell.stories.tsx +65 -0
  170. package/src/components/shell/DashboardShell.test.tsx +42 -0
  171. package/src/components/shell/DashboardShell.tsx +74 -0
  172. package/src/components/shell/DeviceIndicator.stories.tsx +2 -2
  173. package/src/components/shell/DeviceMenu.stories.tsx +5 -5
  174. package/src/components/shell/DeviceRow.stories.tsx +3 -3
  175. package/src/components/shell/NavItem.stories.tsx +52 -0
  176. package/src/components/shell/NavItem.test.tsx +35 -0
  177. package/src/components/shell/NavItem.tsx +75 -0
  178. package/src/components/shell/README.md +30 -0
  179. package/src/components/shell/SessionRailSpecimen.stories.tsx +753 -0
  180. package/src/components/shell/SessionStatePill.stories.tsx +3 -3
  181. package/src/components/shell/SessionStatePill.tsx +1 -1
  182. package/src/components/shell/SideNav.stories.tsx +81 -0
  183. package/src/components/shell/SideNav.test.tsx +51 -0
  184. package/src/components/shell/SideNav.tsx +74 -0
  185. package/src/components/shell/TopBar.stories.tsx +5 -5
  186. package/src/components/shell/index.ts +5 -0
  187. package/src/components/ui/alert/Alert.stories.tsx +1 -1
  188. package/src/components/ui/autocomplete/Autocomplete.stories.tsx +1 -1
  189. package/src/components/ui/avatar/Avatar.stories.tsx +1 -1
  190. package/src/components/ui/badge/Badge.stories.tsx +1 -1
  191. package/src/components/ui/breadcrumbs/Breadcrumbs.stories.tsx +1 -1
  192. package/src/components/ui/button/Button.stories.tsx +1 -1
  193. package/src/components/ui/card/Card.stories.tsx +1 -1
  194. package/src/components/ui/checkbox/Checkbox.stories.tsx +1 -1
  195. package/src/components/ui/chip/Chip.stories.tsx +1 -1
  196. package/src/components/ui/collapse/Collapse.stories.tsx +1 -1
  197. package/src/components/ui/data-row/DataRow.stories.tsx +1 -1
  198. package/src/components/ui/divider/Divider.stories.tsx +1 -1
  199. package/src/components/ui/drawer/Drawer.stories.tsx +1 -1
  200. package/src/components/ui/form-field/FormField.stories.tsx +1 -1
  201. package/src/components/ui/help-tip/HelpTip.stories.tsx +1 -1
  202. package/src/components/ui/icon-box/IconBox.stories.tsx +1 -1
  203. package/src/components/ui/index.ts +1 -0
  204. package/src/components/ui/indicator/Indicator.stories.tsx +2 -2
  205. package/src/components/ui/indicator/Indicator.test.tsx +1 -0
  206. package/src/components/ui/indicator/Indicator.tsx +6 -1
  207. package/src/components/ui/input/Input.stories.tsx +1 -1
  208. package/src/components/ui/link/Link.stories.tsx +1 -1
  209. package/src/components/ui/list-item/ListItem.stories.tsx +1 -1
  210. package/src/components/ui/menu/Menu.stories.tsx +1 -1
  211. package/src/components/ui/modal/Modal.stories.tsx +1 -1
  212. package/src/components/ui/pill/Pill.stories.tsx +1 -1
  213. package/src/components/ui/popover/Popover.stories.tsx +1 -1
  214. package/src/components/ui/progress/Progress.stories.tsx +1 -1
  215. package/src/components/ui/radio/Radio.stories.tsx +1 -1
  216. package/src/components/ui/section/Section.stories.tsx +1 -1
  217. package/src/components/ui/select/Select.stories.tsx +1 -1
  218. package/src/components/ui/skeleton/Skeleton.stories.tsx +1 -1
  219. package/src/components/ui/spinner/Spinner.stories.tsx +1 -1
  220. package/src/components/ui/stack/Stack.stories.tsx +1 -1
  221. package/src/components/ui/surface/Surface.stories.tsx +1 -1
  222. package/src/components/ui/switch/Switch.stories.tsx +1 -1
  223. package/src/components/ui/tabs/Tabs.stories.tsx +1 -1
  224. package/src/components/ui/tile/Tile.stories.tsx +79 -0
  225. package/src/components/ui/tile/Tile.test.tsx +48 -0
  226. package/src/components/ui/tile/Tile.tsx +64 -0
  227. package/src/components/ui/tile/index.ts +2 -0
  228. package/src/components/ui/toast/Toast.stories.tsx +1 -1
  229. package/src/components/ui/toolbar-button/ToolbarButton.stories.tsx +1 -1
  230. package/src/components/ui/tooltip/Tooltip.stories.tsx +1 -1
  231. package/src/examples/react-hook-form/ReactHookForm.stories.tsx +1 -1
  232. package/src/hooks/index.ts +2 -0
  233. package/src/hooks/useTimer.test.ts +150 -0
  234. package/src/hooks/useTimer.ts +77 -0
  235. package/src/index.ts +3 -0
  236. package/src/pages.ts +1 -1
  237. package/src/stories/PresetShowcase.stories.tsx +1 -1
  238. package/src/stories/ThemePresets.stories.tsx +1 -1
  239. package/src/theme/ColorSystem.stories.tsx +1 -1
  240. package/src/theme/Colors.stories.tsx +5 -8
  241. package/src/theme/config.ts +4 -0
  242. package/src/theme/elevation.stories.tsx +1 -1
  243. package/src/theme/global.css +5 -1
  244. package/src/theme/shadows.stories.tsx +1 -1
  245. package/src/theme/tokens/primitives.ts +11 -107
  246. package/src/theme/tokens/semantic.ts +8 -0
  247. package/src/theme/workout-tokens.ts +11 -7
  248. package/tailwind.config.js +5 -0
@@ -1,26 +1,61 @@
1
1
  import { useState } from 'react'
2
2
  import type { Meta, StoryObj } from '@storybook/react-vite'
3
- import { View } from 'react-native'
3
+ import { View, Text } from 'react-native'
4
4
  import { VelocityStrip } from './VelocityStrip'
5
5
 
6
6
  const meta: Meta<typeof VelocityStrip> = {
7
- title: 'Custom/Workout/VelocityStrip',
7
+ title: 'Workout/DataViz/VelocityStrip',
8
8
  component: VelocityStrip,
9
9
  tags: ['autodocs'],
10
- argTypes: {
11
- expanded: {
12
- control: 'boolean',
13
- description: 'Whether the strip is expanded into a bar chart',
10
+ parameters: {
11
+ docs: {
12
+ description: {
13
+ component:
14
+ 'Per-rep velocity strip. Two variants: `mini` (a flat 3px static strip) and `expanded` ' +
15
+ '(the velocity-HEIGHT bar chart, rounded tops). The `expanded` chrome is prop-driven — ' +
16
+ 'with `showNumbers`/`showInfo` on it is the framed chart (raised surface, per-bar m/s ' +
17
+ 'labels, mean/loss info row, interactive tap-to-expand); with both off it is a bare strip, ' +
18
+ 'the active-set spotlight. `height` sets the plot height; `scale` is `peak` (to the set max) ' +
19
+ 'or `fixed` (a fixed ceiling, cross-set-comparable). Feed either `velocities` or a `set` ' +
20
+ 'descriptor (set-type aware — see the ' +
21
+ '[modalities](?path=/docs/workout-dataviz-velocitystrip-modalities--docs) sheet).',
22
+ },
14
23
  },
24
+ },
25
+ argTypes: {
15
26
  variant: {
16
27
  control: 'select',
17
- options: ['full', 'mini'],
28
+ options: ['mini', 'expanded'],
18
29
  description: 'Display variant',
19
30
  },
31
+ expanded: {
32
+ control: 'boolean',
33
+ description: 'expanded (framed): whether the chart is open (toggle for tap-to-expand)',
34
+ },
35
+ showNumbers: {
36
+ control: 'boolean',
37
+ description: 'expanded framed chart: per-bar m/s labels (default true)',
38
+ },
20
39
  showInfo: {
21
40
  control: 'boolean',
22
- description: 'Whether to show the info row (zone name + loss %) in expanded mode',
41
+ description: 'expanded framed chart: the mean/loss info row (default true)',
42
+ },
43
+ height: {
44
+ control: { type: 'number', min: 12, max: 96, step: 2 },
45
+ description: 'expanded plot height in px (bars scale to this). Default 60.',
46
+ },
47
+ scale: {
48
+ control: 'inline-radio',
49
+ options: ['peak', 'fixed'],
50
+ description: 'expanded bar scaling: peak (set max) or fixed (cross-set ceiling)',
23
51
  },
52
+ liveRepIndex: {
53
+ control: 'number',
54
+ description:
55
+ 'expanded framed chart: index of the newest rep to animate (pop / new-peak bounce)',
56
+ },
57
+ set: { control: false, description: 'Structured set descriptor (supersedes `velocities`)' },
58
+ zones: { control: false, description: 'Velocity-zone bands (WA); default scale when absent' },
24
59
  },
25
60
  }
26
61
 
@@ -32,94 +67,122 @@ const slowSet = [0.65, 0.58, 0.52, 0.48, 0.42]
32
67
  const mixedSet = [1.1, 0.95, 0.82, 0.68, 0.55, 0.45]
33
68
  const moderateSet = [0.88, 0.85, 0.82, 0.78, 0.76]
34
69
 
35
- export const DefaultCollapsed: Story = {
36
- args: {
37
- velocities: moderateSet,
38
- onToggle: () => {},
39
- },
40
- }
41
-
42
- export const Expanded: Story = {
70
+ /** Controls-driven: flip `variant` / `showNumbers` / `showInfo` / `height` / `scale` in the panel. */
71
+ export const Playground: Story = {
43
72
  args: {
44
73
  velocities: moderateSet,
74
+ variant: 'expanded',
45
75
  expanded: true,
76
+ showNumbers: true,
77
+ showInfo: true,
78
+ height: 60,
79
+ scale: 'peak',
46
80
  onToggle: () => {},
47
81
  },
82
+ decorators: [
83
+ (Story) => (
84
+ <View style={{ width: 300, padding: 16 }}>
85
+ <Story />
86
+ </View>
87
+ ),
88
+ ],
48
89
  }
49
90
 
50
- export const ExpandedNoInfo: Story = {
51
- args: {
52
- velocities: moderateSet,
53
- expanded: true,
54
- showInfo: false,
55
- onToggle: () => {},
56
- },
57
- }
58
-
59
- export const FastEasySet: Story = {
60
- args: {
61
- velocities: fastSet,
62
- expanded: true,
63
- onToggle: () => {},
64
- },
91
+ /** The flat 3px static strip — the collapsed glance used in cards and rails. */
92
+ export const Mini: Story = {
93
+ args: { velocities: mixedSet, variant: 'mini' },
65
94
  }
66
95
 
67
- export const SlowGrindingSet: Story = {
68
- args: {
69
- velocities: slowSet,
70
- expanded: true,
71
- onToggle: () => {},
72
- },
96
+ /** Framed chart with per-bar m/s labels + info row (numbers ON) — the rich readout. */
97
+ export const ExpandedWithNumbers: Story = {
98
+ args: { velocities: mixedSet, variant: 'expanded', expanded: true },
99
+ decorators: [
100
+ (Story) => (
101
+ <View style={{ width: 300, padding: 16 }}>
102
+ <Story />
103
+ </View>
104
+ ),
105
+ ],
73
106
  }
74
107
 
75
- export const MixedVelocities: Story = {
108
+ /** Bare velocity-height strip (numbers OFF, info OFF, fixed 24px) — the active-set spotlight. */
109
+ export const ExpandedBareSpotlight: Story = {
76
110
  args: {
77
- velocities: mixedSet,
78
- expanded: true,
79
- onToggle: () => {},
111
+ variant: 'expanded',
112
+ showNumbers: false,
113
+ showInfo: false,
114
+ height: 24,
115
+ scale: 'fixed',
116
+ set: { type: 'straight', velocities: [0.95, 0.9, 0.86, 0.8, 0.72], planned: 10 },
80
117
  },
81
118
  }
82
119
 
83
- export const Mini: Story = {
120
+ /** A structured set descriptor (a drop set): the mini variant carries the set-type gap/color encoding. */
121
+ export const SetTypeMini: Story = {
84
122
  args: {
85
- velocities: mixedSet,
86
123
  variant: 'mini',
124
+ set: {
125
+ type: 'drop',
126
+ subloads: [
127
+ [1.0, 0.92],
128
+ [0.85, 0.78],
129
+ [0.7, 0.62],
130
+ ],
131
+ },
87
132
  },
88
133
  }
89
134
 
90
135
  function InteractiveVelocityStrip() {
91
- const [expanded, setExpanded] = useState(false)
136
+ const [open, setOpen] = useState(false)
137
+ // Tap-to-expand: `onToggle` + the controlled `expanded` boolean. Tapping the strip
138
+ // toggles both ways (collapsed 3px ↔ chart). No `onRepPress` here — per-bar rep
139
+ // presses would intercept bar taps and block collapse; that's a separate mode.
92
140
  return (
93
141
  <View style={{ width: 300, padding: 16 }}>
94
- <VelocityStrip
95
- velocities={moderateSet}
96
- expanded={expanded}
97
- onToggle={() => setExpanded(!expanded)}
98
- onRepPress={(index, velocity) =>
99
- console.log(`Rep ${index + 1}: ${velocity}`)
100
- }
101
- />
142
+ <VelocityStrip velocities={moderateSet} expanded={open} onToggle={() => setOpen((v) => !v)} />
102
143
  </View>
103
144
  )
104
145
  }
105
146
 
147
+ /** Tap to expand; tap again to collapse (3px ↔ chart, animated). */
106
148
  export const Interactive: Story = {
107
149
  render: () => <InteractiveVelocityStrip />,
108
150
  }
109
151
 
110
- export const AllProfiles: Story = {
111
- render: () => (
112
- <View style={{ gap: 24, padding: 16 }}>
113
- <View style={{ gap: 8 }}>
114
- <VelocityStrip velocities={fastSet} expanded onToggle={() => {}} />
115
- <VelocityStrip
116
- velocities={moderateSet}
117
- expanded
118
- onToggle={() => {}}
119
- />
120
- <VelocityStrip velocities={slowSet} expanded onToggle={() => {}} />
121
- <VelocityStrip velocities={mixedSet} expanded onToggle={() => {}} />
152
+ /** The four zone profiles across the treatments, so the color scale reads at a glance. */
153
+ export const Profiles: Story = {
154
+ render: () => {
155
+ const rows: [string, number[]][] = [
156
+ ['Speed', fastSet],
157
+ ['Power', moderateSet],
158
+ ['Strength', slowSet],
159
+ ['Mixed', mixedSet],
160
+ ]
161
+ return (
162
+ <View style={{ gap: 20, padding: 16, width: 320 }}>
163
+ {rows.map(([label, velocities]) => (
164
+ <View key={label} style={{ gap: 6 }}>
165
+ <Text style={{ fontFamily: 'Inter, sans-serif', fontSize: 11, color: '#9CA3AF' }}>
166
+ {label}
167
+ </Text>
168
+ <VelocityStrip
169
+ velocities={velocities}
170
+ variant="expanded"
171
+ showInfo={false}
172
+ onToggle={() => {}}
173
+ />
174
+ <VelocityStrip
175
+ variant="expanded"
176
+ showNumbers={false}
177
+ showInfo={false}
178
+ height={24}
179
+ scale="fixed"
180
+ set={{ type: 'straight', velocities, planned: velocities.length }}
181
+ />
182
+ <VelocityStrip velocities={velocities} variant="mini" />
183
+ </View>
184
+ ))}
122
185
  </View>
123
- </View>
124
- ),
186
+ )
187
+ },
125
188
  }