@titan-design/react-ui 0.9.3 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bodymap.js +78 -24
- package/dist/bodymap.js.map +1 -1
- package/dist/bodymap.mjs +78 -24
- package/dist/bodymap.mjs.map +1 -1
- package/dist/index.d.mts +31 -8
- package/dist/index.d.ts +31 -8
- package/dist/index.js +214 -113
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +210 -114
- package/dist/index.mjs.map +1 -1
- package/dist/pages.js +214 -157
- package/dist/pages.js.map +1 -1
- package/dist/pages.mjs +214 -157
- package/dist/pages.mjs.map +1 -1
- package/dist/theme/index.d.mts +129 -34
- package/dist/theme/index.d.ts +129 -34
- package/dist/theme/index.js +95 -19
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/index.mjs +92 -20
- package/dist/theme/index.mjs.map +1 -1
- package/dist/theme/tokens-css.js +88 -24
- package/dist/theme/tokens-css.js.map +1 -1
- package/dist/theme/tokens-css.mjs +88 -24
- package/dist/theme/tokens-css.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/custom/Workout/BaseBadge.tsx +5 -5
- package/src/components/custom/Workout/RowInventory.stories.tsx +5 -2
- package/src/components/custom/Workout/S3FullRail.stories.tsx +13 -1
- package/src/components/custom/Workout/SessionHeader.tsx +2 -2
- package/src/components/custom/Workout/SessionRail.stories.tsx +4 -1
- package/src/components/custom/Workout/SessionRail.tsx +5 -5
- package/src/components/custom/Workout/SupersetWrapper.stories.tsx +16 -25
- package/src/components/custom/Workout/SupersetWrapper.tsx +1 -1
- package/src/components/custom/Workout/TempoDisplay.tsx +3 -7
- package/src/components/custom/Workout/VolumeLandmarkBar.stories.tsx +4 -1
- package/src/components/custom/Workout/WorkoutPill.tsx +2 -2
- package/src/components/ui/surface/Surface.stories.tsx +195 -1
- package/src/components/ui/surface/Surface.test.tsx +148 -9
- package/src/components/ui/surface/Surface.tsx +37 -9
- package/src/components/ui/surface/SurfaceContext.ts +48 -8
- package/src/components/ui/surface/index.ts +1 -0
- package/src/components/ui/surface/surface.contract.test.ts +283 -0
- package/src/theme/ColorSystem.stories.tsx +232 -47
- package/src/theme/config.ts +12 -0
- package/src/theme/elevation.ts +90 -67
- package/src/theme/global.css +35 -9
- package/src/theme/tokens/primitives.ts +40 -0
- package/src/theme/tokens/semantic.ts +63 -14
- package/tailwind.config.js +8 -0
package/dist/pages.mjs
CHANGED
|
@@ -38,13 +38,24 @@ var primitiveColors = {
|
|
|
38
38
|
200: "#3C3C3C",
|
|
39
39
|
300: "#2C2C2C",
|
|
40
40
|
400: "#1F1F1F",
|
|
41
|
-
500: "#1C1C1C",
|
|
42
|
-
600: "#191919",
|
|
43
|
-
700: "#161616",
|
|
44
|
-
900: "#101010"
|
|
45
|
-
},
|
|
41
|
+
500: "#1C1C1C"},
|
|
46
42
|
// Pure colors
|
|
47
43
|
white: "#FFFFFF"};
|
|
44
|
+
var surfaceRampDark = {
|
|
45
|
+
inset: "#13100D",
|
|
46
|
+
// L*4.5 — sub-shell well / pressed
|
|
47
|
+
background: "#1C1916",
|
|
48
|
+
// L*9 — shell / frame
|
|
49
|
+
base: "#252321",
|
|
50
|
+
// L*13.5 — main content plane
|
|
51
|
+
elevated: "#2C2A28",
|
|
52
|
+
// L*17 — nav / rail
|
|
53
|
+
raised: "#31302F",
|
|
54
|
+
// L*20 — cards
|
|
55
|
+
overlay: "#373635"
|
|
56
|
+
// L*22.5 — hero / popover
|
|
57
|
+
};
|
|
58
|
+
var backgroundFrameDark = "#100D0A";
|
|
48
59
|
var primitiveRamps = {
|
|
49
60
|
red: {
|
|
50
61
|
50: "#FFF4F4",
|
|
@@ -1366,83 +1377,6 @@ function InfoIcon(props) {
|
|
|
1366
1377
|
/* @__PURE__ */ jsx("path", { d: "M12 8h.01" })
|
|
1367
1378
|
] });
|
|
1368
1379
|
}
|
|
1369
|
-
var baseBadgeSizeConfig = {
|
|
1370
|
-
sm: { fontSize: 9, paddingH: 6, paddingV: 2, iconSize: 10 },
|
|
1371
|
-
md: { fontSize: 10, paddingH: 8, paddingV: 2, iconSize: 12 },
|
|
1372
|
-
lg: { fontSize: 12, paddingH: 10, paddingV: 4, iconSize: 14 }
|
|
1373
|
-
};
|
|
1374
|
-
var variantColors = {
|
|
1375
|
-
plain: { backgroundColor: "#1C1C1C", borderColor: "#1F1F1F" },
|
|
1376
|
-
pr: {
|
|
1377
|
-
backgroundColor: "rgba(255, 121, 0, 0.12)",
|
|
1378
|
-
borderColor: "rgba(255, 121, 0, 0.3)"
|
|
1379
|
-
}
|
|
1380
|
-
};
|
|
1381
|
-
function BaseBadge({
|
|
1382
|
-
variant = "plain",
|
|
1383
|
-
size = "md",
|
|
1384
|
-
icon,
|
|
1385
|
-
onPress,
|
|
1386
|
-
className,
|
|
1387
|
-
children,
|
|
1388
|
-
...props
|
|
1389
|
-
}) {
|
|
1390
|
-
const [scaleAnim] = useState(() => new Animated.Value(1));
|
|
1391
|
-
const config = baseBadgeSizeConfig[size];
|
|
1392
|
-
const colors = variantColors[variant];
|
|
1393
|
-
const handlePressIn = () => {
|
|
1394
|
-
Animated.timing(scaleAnim, {
|
|
1395
|
-
toValue: 0.97,
|
|
1396
|
-
duration: 150,
|
|
1397
|
-
useNativeDriver: true
|
|
1398
|
-
}).start();
|
|
1399
|
-
};
|
|
1400
|
-
const handlePressOut = () => {
|
|
1401
|
-
Animated.timing(scaleAnim, {
|
|
1402
|
-
toValue: 1,
|
|
1403
|
-
duration: 150,
|
|
1404
|
-
useNativeDriver: true
|
|
1405
|
-
}).start();
|
|
1406
|
-
};
|
|
1407
|
-
const badge = /* @__PURE__ */ jsxs(
|
|
1408
|
-
View,
|
|
1409
|
-
{
|
|
1410
|
-
className,
|
|
1411
|
-
style: {
|
|
1412
|
-
flexDirection: "row",
|
|
1413
|
-
alignItems: "center",
|
|
1414
|
-
gap: 3,
|
|
1415
|
-
// borderRadius 2 is intentional per workout-tokens.ts (squared-off pill)
|
|
1416
|
-
borderRadius: 2,
|
|
1417
|
-
borderWidth: 1,
|
|
1418
|
-
borderColor: colors.borderColor,
|
|
1419
|
-
backgroundColor: colors.backgroundColor,
|
|
1420
|
-
paddingHorizontal: config.paddingH,
|
|
1421
|
-
paddingVertical: config.paddingV
|
|
1422
|
-
},
|
|
1423
|
-
...props,
|
|
1424
|
-
children: [
|
|
1425
|
-
icon != null && /* @__PURE__ */ jsx(View, { accessibilityElementsHidden: true, testID: "base-badge-icon", children: icon }),
|
|
1426
|
-
children
|
|
1427
|
-
]
|
|
1428
|
-
}
|
|
1429
|
-
);
|
|
1430
|
-
if (onPress) {
|
|
1431
|
-
return /* @__PURE__ */ jsx(Animated.View, { style: { transform: [{ scale: scaleAnim }] }, children: /* @__PURE__ */ jsx(
|
|
1432
|
-
Pressable,
|
|
1433
|
-
{
|
|
1434
|
-
onPress,
|
|
1435
|
-
onPressIn: handlePressIn,
|
|
1436
|
-
onPressOut: handlePressOut,
|
|
1437
|
-
accessibilityRole: "button",
|
|
1438
|
-
accessibilityLabel: props.accessibilityLabel,
|
|
1439
|
-
testID: "base-badge-pressable",
|
|
1440
|
-
children: badge
|
|
1441
|
-
}
|
|
1442
|
-
) });
|
|
1443
|
-
}
|
|
1444
|
-
return badge;
|
|
1445
|
-
}
|
|
1446
1380
|
|
|
1447
1381
|
// src/theme/tokens/semantic.ts
|
|
1448
1382
|
var semanticColorsLight = {
|
|
@@ -1549,10 +1483,19 @@ var semanticColorsLight = {
|
|
|
1549
1483
|
"surface-overlay": primitiveColors.white,
|
|
1550
1484
|
"surface-input": primitiveColors.neutral[50],
|
|
1551
1485
|
// Input field background (filled variant)
|
|
1486
|
+
// Deepest pressed pit (TD-surface-tokens, S-3) — light-mode counterpart of
|
|
1487
|
+
// the dark ramp's `inset` plane; a placeholder pairing, not part of the
|
|
1488
|
+
// dark-ramp investigation (surface.contract.test.ts is dark-mode only).
|
|
1489
|
+
"surface-inset": primitiveColors.neutral[300],
|
|
1552
1490
|
// Background colors (background-*)
|
|
1553
1491
|
"background-base": "#EBEBEB",
|
|
1554
1492
|
"background-default": primitiveColors.white,
|
|
1555
1493
|
"background-subtle": primitiveColors.neutral[50],
|
|
1494
|
+
// Frame/bezel chrome (TD-surface-tokens, S-3) — top bar + side nav shell,
|
|
1495
|
+
// one step below `background-base` (darker still than `surface-inset`
|
|
1496
|
+
// above, mirroring the dark-mode ordering). Placeholder pairing for light
|
|
1497
|
+
// mode (see dark-mode note on `surface-inset` above).
|
|
1498
|
+
"background-frame": primitiveColors.neutral[400],
|
|
1556
1499
|
// Border colors (border-*)
|
|
1557
1500
|
"border-default": "#E8E9EB",
|
|
1558
1501
|
"border-subtle": primitiveColors.neutral[100],
|
|
@@ -1568,6 +1511,11 @@ var semanticColorsLight = {
|
|
|
1568
1511
|
// Input field border on focus
|
|
1569
1512
|
"border-input-error": primitiveColors.red[600],
|
|
1570
1513
|
// Input field border on error
|
|
1514
|
+
// Alpha hairline separators (surface-independent — composite toward black on
|
|
1515
|
+
// light surfaces, mirroring the dark-mode white-alpha family). See §4/S-2.
|
|
1516
|
+
"hairline-subtle": "rgba(0, 0, 0, 0.06)",
|
|
1517
|
+
"hairline-default": "rgba(0, 0, 0, 0.09)",
|
|
1518
|
+
"hairline-strong": "rgba(0, 0, 0, 0.14)",
|
|
1571
1519
|
// Interactive states (interactive-*)
|
|
1572
1520
|
"interactive-hover": "rgba(55, 65, 81, 0.04)",
|
|
1573
1521
|
"interactive-focus": "rgba(55, 65, 81, 0.12)",
|
|
@@ -1660,25 +1608,46 @@ var semanticColorsDark = {
|
|
|
1660
1608
|
"text-inverse": primitiveColors.neutral[900],
|
|
1661
1609
|
"text-link": "#828DF8",
|
|
1662
1610
|
"text-link-hover": primitiveColors.blue[400],
|
|
1663
|
-
// Surface colors - dark backgrounds
|
|
1664
|
-
|
|
1665
|
-
//
|
|
1666
|
-
|
|
1667
|
-
//
|
|
1668
|
-
|
|
1669
|
-
//
|
|
1670
|
-
|
|
1671
|
-
//
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
//
|
|
1675
|
-
"
|
|
1676
|
-
//
|
|
1677
|
-
"
|
|
1678
|
-
//
|
|
1679
|
-
"
|
|
1680
|
-
//
|
|
1681
|
-
|
|
1611
|
+
// Surface colors - dark backgrounds — warm-tapered DERIVED ramp (TD-surface-tokens,
|
|
1612
|
+
// S-1, re-spaced S-3). Shipped verbatim from `deriveSurfaceRamp()` — see
|
|
1613
|
+
// `surfaceRampDark` in primitives.ts for the full derivation note. `surface-overlay`
|
|
1614
|
+
// and `surface-elevated` are distinct (were both #191919 pre-S-1); `surface-input`
|
|
1615
|
+
// tracks one plane above `surface-base`, same relative position as before the remap.
|
|
1616
|
+
// `background-base` backs `Surface level="background"` (SurfaceContext.SURFACE_LEVEL_TOKEN),
|
|
1617
|
+
// so it takes the ramp's `background` (shell/frame) role, NOT `inset`. The ramp's
|
|
1618
|
+
// deepest `inset` plane is now promoted to `surface-inset` below (S-3) — still no
|
|
1619
|
+
// `SurfaceLevel` member for it (follow-up, alongside the elevation.ts -1/-2 pressed
|
|
1620
|
+
// levels — parallel workstream, not this branch).
|
|
1621
|
+
"surface-base": surfaceRampDark.base,
|
|
1622
|
+
// main surface (#252321, L*13.5)
|
|
1623
|
+
"surface-elevated": surfaceRampDark.elevated,
|
|
1624
|
+
// elevated surface (#2C2A28, L*17 — nav/rail)
|
|
1625
|
+
"surface-raised": surfaceRampDark.raised,
|
|
1626
|
+
// raised surface (#31302F, L*20 — cards)
|
|
1627
|
+
"surface-overlay": surfaceRampDark.overlay,
|
|
1628
|
+
// overlay surface (#373635, L*22.5 — hero/popover)
|
|
1629
|
+
"surface-input": surfaceRampDark.elevated,
|
|
1630
|
+
// input surface (#2C2A28 — one plane above base)
|
|
1631
|
+
"surface-inset": surfaceRampDark.inset,
|
|
1632
|
+
// deepest pressed pit (#13100D, L*4.5 — sub-shell well)
|
|
1633
|
+
// Background colors — same ramp, the frame/shell end of it.
|
|
1634
|
+
"background-base": surfaceRampDark.background,
|
|
1635
|
+
// shell / frame (#1C1916, L*9 — Surface level="background")
|
|
1636
|
+
"background-default": surfaceRampDark.base,
|
|
1637
|
+
// main background (#252321, L*13.5 — matches surface-base)
|
|
1638
|
+
"background-subtle": surfaceRampDark.elevated,
|
|
1639
|
+
// subtle background (#2C2A28, L*17 — matches surface-elevated)
|
|
1640
|
+
// Frame/bezel chrome (S-3) — the top bar + side nav shell; one step BELOW
|
|
1641
|
+
// `background-base`, darker even than `surface-inset` — it exits the content
|
|
1642
|
+
// ramp entirely rather than sitting in it. See `backgroundFrameDark` in
|
|
1643
|
+
// primitives.ts.
|
|
1644
|
+
"background-frame": backgroundFrameDark,
|
|
1645
|
+
// frame / bezel (#100D0A, L*3.79)
|
|
1646
|
+
// Border colors — `border-subtle` (#1C1C1C) previously collided with
|
|
1647
|
+
// `surface-raised` (also #1C1C1C, an invisible border on raised cards). The
|
|
1648
|
+
// re-spaced ramp above moved `surface-raised` to #2D2C2B, so this value is now
|
|
1649
|
+
// distinct from every surface hex without needing to change it — see
|
|
1650
|
+
// `surface.contract.test.ts` R2/R4.
|
|
1682
1651
|
"border-default": primitiveColors.charcoal[400],
|
|
1683
1652
|
// default border
|
|
1684
1653
|
"border-subtle": primitiveColors.charcoal[500],
|
|
@@ -1692,6 +1661,14 @@ var semanticColorsDark = {
|
|
|
1692
1661
|
"border-input-hover": primitiveColors.neutral[500],
|
|
1693
1662
|
"border-input-focus": "#828DF8",
|
|
1694
1663
|
"border-input-error": primitiveColors.red[500],
|
|
1664
|
+
// Alpha hairline separators — the primary separation cue (§4/S-2). Self-
|
|
1665
|
+
// normalizing: composites toward white by ~the same amount on ANY plane, so
|
|
1666
|
+
// one family works at every elevation instead of per-surface border tokens.
|
|
1667
|
+
// Shadows are demoted to floating-overlay use only (not shipped as a fill
|
|
1668
|
+
// separator here — see elevation.ts, follow-up S-4).
|
|
1669
|
+
"hairline-subtle": "rgba(255, 255, 255, 0.06)",
|
|
1670
|
+
"hairline-default": "rgba(255, 255, 255, 0.09)",
|
|
1671
|
+
"hairline-strong": "rgba(255, 255, 255, 0.14)",
|
|
1695
1672
|
// Interactive states
|
|
1696
1673
|
"interactive-hover": "rgba(255, 255, 255, 0.04)",
|
|
1697
1674
|
"interactive-focus": "rgba(255, 255, 255, 0.12)",
|
|
@@ -1710,6 +1687,86 @@ function getSemanticColors(mode) {
|
|
|
1710
1687
|
return mode === "dark" ? semanticColorsDark : semanticColorsLight;
|
|
1711
1688
|
}
|
|
1712
1689
|
|
|
1690
|
+
// src/components/custom/Workout/BaseBadge.tsx
|
|
1691
|
+
var t = getSemanticColors("dark");
|
|
1692
|
+
var baseBadgeSizeConfig = {
|
|
1693
|
+
sm: { fontSize: 9, paddingH: 6, paddingV: 2, iconSize: 10 },
|
|
1694
|
+
md: { fontSize: 10, paddingH: 8, paddingV: 2, iconSize: 12 },
|
|
1695
|
+
lg: { fontSize: 12, paddingH: 10, paddingV: 4, iconSize: 14 }
|
|
1696
|
+
};
|
|
1697
|
+
var variantColors = {
|
|
1698
|
+
plain: { backgroundColor: t["surface-raised"], borderColor: "#1F1F1F" },
|
|
1699
|
+
pr: {
|
|
1700
|
+
backgroundColor: "rgba(255, 121, 0, 0.12)",
|
|
1701
|
+
borderColor: "rgba(255, 121, 0, 0.3)"
|
|
1702
|
+
}
|
|
1703
|
+
};
|
|
1704
|
+
function BaseBadge({
|
|
1705
|
+
variant = "plain",
|
|
1706
|
+
size = "md",
|
|
1707
|
+
icon,
|
|
1708
|
+
onPress,
|
|
1709
|
+
className,
|
|
1710
|
+
children,
|
|
1711
|
+
...props
|
|
1712
|
+
}) {
|
|
1713
|
+
const [scaleAnim] = useState(() => new Animated.Value(1));
|
|
1714
|
+
const config = baseBadgeSizeConfig[size];
|
|
1715
|
+
const colors = variantColors[variant];
|
|
1716
|
+
const handlePressIn = () => {
|
|
1717
|
+
Animated.timing(scaleAnim, {
|
|
1718
|
+
toValue: 0.97,
|
|
1719
|
+
duration: 150,
|
|
1720
|
+
useNativeDriver: true
|
|
1721
|
+
}).start();
|
|
1722
|
+
};
|
|
1723
|
+
const handlePressOut = () => {
|
|
1724
|
+
Animated.timing(scaleAnim, {
|
|
1725
|
+
toValue: 1,
|
|
1726
|
+
duration: 150,
|
|
1727
|
+
useNativeDriver: true
|
|
1728
|
+
}).start();
|
|
1729
|
+
};
|
|
1730
|
+
const badge = /* @__PURE__ */ jsxs(
|
|
1731
|
+
View,
|
|
1732
|
+
{
|
|
1733
|
+
className,
|
|
1734
|
+
style: {
|
|
1735
|
+
flexDirection: "row",
|
|
1736
|
+
alignItems: "center",
|
|
1737
|
+
gap: 3,
|
|
1738
|
+
// borderRadius 2 is intentional per workout-tokens.ts (squared-off pill)
|
|
1739
|
+
borderRadius: 2,
|
|
1740
|
+
borderWidth: 1,
|
|
1741
|
+
borderColor: colors.borderColor,
|
|
1742
|
+
backgroundColor: colors.backgroundColor,
|
|
1743
|
+
paddingHorizontal: config.paddingH,
|
|
1744
|
+
paddingVertical: config.paddingV
|
|
1745
|
+
},
|
|
1746
|
+
...props,
|
|
1747
|
+
children: [
|
|
1748
|
+
icon != null && /* @__PURE__ */ jsx(View, { accessibilityElementsHidden: true, testID: "base-badge-icon", children: icon }),
|
|
1749
|
+
children
|
|
1750
|
+
]
|
|
1751
|
+
}
|
|
1752
|
+
);
|
|
1753
|
+
if (onPress) {
|
|
1754
|
+
return /* @__PURE__ */ jsx(Animated.View, { style: { transform: [{ scale: scaleAnim }] }, children: /* @__PURE__ */ jsx(
|
|
1755
|
+
Pressable,
|
|
1756
|
+
{
|
|
1757
|
+
onPress,
|
|
1758
|
+
onPressIn: handlePressIn,
|
|
1759
|
+
onPressOut: handlePressOut,
|
|
1760
|
+
accessibilityRole: "button",
|
|
1761
|
+
accessibilityLabel: props.accessibilityLabel,
|
|
1762
|
+
testID: "base-badge-pressable",
|
|
1763
|
+
children: badge
|
|
1764
|
+
}
|
|
1765
|
+
) });
|
|
1766
|
+
}
|
|
1767
|
+
return badge;
|
|
1768
|
+
}
|
|
1769
|
+
|
|
1713
1770
|
// src/components/custom/Workout/PrBadge.tsx
|
|
1714
1771
|
var BRAND_PRIMARY = getSemanticColors("dark")["brand-primary"];
|
|
1715
1772
|
var typeLabels = {
|
|
@@ -1960,7 +2017,7 @@ function MetricCell({ children, color, fontSize = 11 }) {
|
|
|
1960
2017
|
}
|
|
1961
2018
|
|
|
1962
2019
|
// src/components/custom/Workout/SetsRepsLoad.tsx
|
|
1963
|
-
var
|
|
2020
|
+
var t2 = getSemanticColors("dark");
|
|
1964
2021
|
var TIMES = "\xD7";
|
|
1965
2022
|
var AT = "@";
|
|
1966
2023
|
function SetsRepsLoad({
|
|
@@ -1972,8 +2029,8 @@ function SetsRepsLoad({
|
|
|
1972
2029
|
className,
|
|
1973
2030
|
...props
|
|
1974
2031
|
}) {
|
|
1975
|
-
const value =
|
|
1976
|
-
const sep =
|
|
2032
|
+
const value = t2["text-primary"];
|
|
2033
|
+
const sep = t2["text-tertiary"];
|
|
1977
2034
|
return /* @__PURE__ */ jsxs(
|
|
1978
2035
|
View,
|
|
1979
2036
|
{
|
|
@@ -2304,19 +2361,19 @@ function alpha(color, opacity) {
|
|
|
2304
2361
|
}
|
|
2305
2362
|
|
|
2306
2363
|
// src/components/custom/Workout/TempoDisplay.tsx
|
|
2307
|
-
var
|
|
2364
|
+
var t3 = getSemanticColors("dark");
|
|
2308
2365
|
var INTER = "Inter, sans-serif";
|
|
2309
2366
|
var TEXT_TERTIARY = "#6B7280";
|
|
2310
|
-
var STATUS_ERROR =
|
|
2311
|
-
var STATUS_SUCCESS =
|
|
2312
|
-
var STATUS_WARNING =
|
|
2367
|
+
var STATUS_ERROR = t3["status-error"];
|
|
2368
|
+
var STATUS_SUCCESS = t3["status-success"];
|
|
2369
|
+
var STATUS_WARNING = t3["status-warning"];
|
|
2313
2370
|
var ON_TARGET_MS = 100;
|
|
2314
2371
|
function getTempoFillPct(elapsedMs, targetMs) {
|
|
2315
2372
|
if (!targetMs) return 100;
|
|
2316
2373
|
return Math.min(100, elapsedMs / targetMs * 100);
|
|
2317
2374
|
}
|
|
2318
2375
|
function activeNumberTone(elapsedMs, targetMs) {
|
|
2319
|
-
if (targetMs == null) return
|
|
2376
|
+
if (targetMs == null) return t3["text-primary"];
|
|
2320
2377
|
const remainingMs = targetMs - elapsedMs;
|
|
2321
2378
|
if (remainingMs > ON_TARGET_MS) return STATUS_WARNING;
|
|
2322
2379
|
if (remainingMs >= -ON_TARGET_MS) return STATUS_SUCCESS;
|
|
@@ -2468,7 +2525,7 @@ function TempoDisplay({
|
|
|
2468
2525
|
style: {
|
|
2469
2526
|
flexDirection: "row",
|
|
2470
2527
|
alignItems: "center",
|
|
2471
|
-
backgroundColor: "
|
|
2528
|
+
backgroundColor: t3["surface-raised"],
|
|
2472
2529
|
paddingHorizontal: chromePadX,
|
|
2473
2530
|
paddingVertical: chromePadY,
|
|
2474
2531
|
borderRadius: chromeRadius
|
|
@@ -2483,7 +2540,7 @@ function TempoDisplay({
|
|
|
2483
2540
|
fontSize: labelFont,
|
|
2484
2541
|
fontWeight: "500",
|
|
2485
2542
|
// Live-muted green while a rep is running, tertiary at rest.
|
|
2486
|
-
color: live ?
|
|
2543
|
+
color: live ? t3["status-live-muted"] : TEXT_TERTIARY,
|
|
2487
2544
|
letterSpacing: 0.5,
|
|
2488
2545
|
textTransform: "uppercase",
|
|
2489
2546
|
marginRight: Math.round(fontSize * 0.5)
|
|
@@ -2541,7 +2598,7 @@ function TempoDisplay({
|
|
|
2541
2598
|
View,
|
|
2542
2599
|
{
|
|
2543
2600
|
style: {
|
|
2544
|
-
backgroundColor: "
|
|
2601
|
+
backgroundColor: t3["surface-overlay"],
|
|
2545
2602
|
borderRadius: 6,
|
|
2546
2603
|
paddingVertical: 8,
|
|
2547
2604
|
paddingHorizontal: 12,
|
|
@@ -2594,14 +2651,14 @@ function TempoDisplay({
|
|
|
2594
2651
|
}
|
|
2595
2652
|
);
|
|
2596
2653
|
}
|
|
2597
|
-
var
|
|
2654
|
+
var t4 = getSemanticColors("dark");
|
|
2598
2655
|
var INDICATOR_CONFIG = {
|
|
2599
|
-
imbalance: { Icon: ScaleIcon, color:
|
|
2600
|
-
overshoot: { Icon: AlertTriangleIcon, color:
|
|
2601
|
-
"velocity-loss": { Icon: TrendingDownIcon, color:
|
|
2602
|
-
"missed-reps": { Icon: CircleSlashIcon, color:
|
|
2603
|
-
pr: { Icon: AwardIcon, color:
|
|
2604
|
-
info: { Icon: InfoIcon, color:
|
|
2656
|
+
imbalance: { Icon: ScaleIcon, color: t4["status-error"], label: "Left/right imbalance" },
|
|
2657
|
+
overshoot: { Icon: AlertTriangleIcon, color: t4["status-error"], label: "Load overshoot" },
|
|
2658
|
+
"velocity-loss": { Icon: TrendingDownIcon, color: t4["status-warning"], label: "Velocity loss" },
|
|
2659
|
+
"missed-reps": { Icon: CircleSlashIcon, color: t4["status-warning"], label: "Missed reps" },
|
|
2660
|
+
pr: { Icon: AwardIcon, color: t4["status-success"], label: "Personal record" },
|
|
2661
|
+
info: { Icon: InfoIcon, color: t4["status-info"], label: "More info" }
|
|
2605
2662
|
};
|
|
2606
2663
|
function ExerciseIndicator({ kind, onPress, className, ...props }) {
|
|
2607
2664
|
const { Icon, color, label } = INDICATOR_CONFIG[kind];
|
|
@@ -3617,7 +3674,7 @@ function RestTimer({
|
|
|
3617
3674
|
var DEFAULTS = {
|
|
3618
3675
|
label: "SS",
|
|
3619
3676
|
color: getSemanticColors("dark")["brand-primary"],
|
|
3620
|
-
bgBase: "
|
|
3677
|
+
bgBase: getSemanticColors("dark")["background-base"]
|
|
3621
3678
|
};
|
|
3622
3679
|
function SupersetWrapper({
|
|
3623
3680
|
label = DEFAULTS.label,
|
|
@@ -4399,11 +4456,11 @@ function CardContent({ children, className }) {
|
|
|
4399
4456
|
function CardFooter({ children, className }) {
|
|
4400
4457
|
return /* @__PURE__ */ jsx(View, { className: cn("px-6 py-4 flex-row items-center gap-2", className), children });
|
|
4401
4458
|
}
|
|
4402
|
-
var
|
|
4459
|
+
var t5 = getSemanticColors("dark");
|
|
4403
4460
|
var solidVariantColors = {
|
|
4404
|
-
success:
|
|
4405
|
-
warning:
|
|
4406
|
-
error:
|
|
4461
|
+
success: t5["status-success"],
|
|
4462
|
+
warning: t5["status-warning"],
|
|
4463
|
+
error: t5["status-error"],
|
|
4407
4464
|
neutral: "#6B7280"
|
|
4408
4465
|
};
|
|
4409
4466
|
var ringVariantStyles = {
|
|
@@ -4443,8 +4500,8 @@ var iconColors = {
|
|
|
4443
4500
|
warning: "#6B4000",
|
|
4444
4501
|
error: "#5C1A1A",
|
|
4445
4502
|
neutral: "#D1D5DB",
|
|
4446
|
-
"on-track":
|
|
4447
|
-
deviation:
|
|
4503
|
+
"on-track": t5["status-success"],
|
|
4504
|
+
deviation: t5["status-warning"],
|
|
4448
4505
|
future: "#6B7280"
|
|
4449
4506
|
};
|
|
4450
4507
|
var sizeDimensions = {
|
|
@@ -4530,13 +4587,13 @@ var MESO_ACCENT_GRADIENT_LIGHT = primitiveRamps.orange[300];
|
|
|
4530
4587
|
var WORKOUT_PILL_DELOAD = primitiveRamps.magenta[600];
|
|
4531
4588
|
|
|
4532
4589
|
// src/components/custom/Workout/MesoStatusCard.tsx
|
|
4533
|
-
var
|
|
4534
|
-
var BRAND_PRIMARY5 =
|
|
4590
|
+
var t6 = getSemanticColors("dark");
|
|
4591
|
+
var BRAND_PRIMARY5 = t6["brand-primary"];
|
|
4535
4592
|
var BRAND_PRIMARY_DARK = MESO_ACCENT_GRADIENT_DARK;
|
|
4536
4593
|
var BRAND_PRIMARY_LIGHT = MESO_ACCENT_GRADIENT_LIGHT;
|
|
4537
|
-
var SUCCESS =
|
|
4538
|
-
var WARNING =
|
|
4539
|
-
var ERROR =
|
|
4594
|
+
var SUCCESS = t6["status-success"];
|
|
4595
|
+
var WARNING = t6["status-warning"];
|
|
4596
|
+
var ERROR = t6["status-error"];
|
|
4540
4597
|
var ACCENT_STOPS = [BRAND_PRIMARY_DARK, BRAND_PRIMARY5, BRAND_PRIMARY_LIGHT];
|
|
4541
4598
|
var CARD_GRADIENT = `linear-gradient(135deg, ${resolveColor("surface-elevated")} 0%, ${resolveColor("surface-raised")} 100%)`;
|
|
4542
4599
|
var GAUGE_GRADIENT = "linear-gradient(90deg, rgba(46,213,115,0.25) 0%, rgba(249,180,21,0.25) 50%, rgba(209,67,67,0.25) 100%)";
|
|
@@ -4907,8 +4964,8 @@ var ERROR_PILL_BORDER = "rgba(209,67,67,0.20)";
|
|
|
4907
4964
|
var PLOT_LEFT = 26;
|
|
4908
4965
|
var TOOLTIP_WIDTH = 124;
|
|
4909
4966
|
function timeOf(dateStr) {
|
|
4910
|
-
const
|
|
4911
|
-
return Number.isNaN(
|
|
4967
|
+
const t12 = Date.parse(dateStr);
|
|
4968
|
+
return Number.isNaN(t12) ? 0 : t12;
|
|
4912
4969
|
}
|
|
4913
4970
|
function formatValue(value) {
|
|
4914
4971
|
return `${Math.round(value)}`;
|
|
@@ -5397,10 +5454,10 @@ function StrengthTrendChart({
|
|
|
5397
5454
|
}
|
|
5398
5455
|
);
|
|
5399
5456
|
}
|
|
5400
|
-
var
|
|
5401
|
-
var STATUS_SUCCESS3 =
|
|
5402
|
-
var STATUS_WARNING3 =
|
|
5403
|
-
var STATUS_INFO =
|
|
5457
|
+
var t7 = getSemanticColors("dark");
|
|
5458
|
+
var STATUS_SUCCESS3 = t7["status-success"];
|
|
5459
|
+
var STATUS_WARNING3 = t7["status-warning"];
|
|
5460
|
+
var STATUS_INFO = t7["status-info"];
|
|
5404
5461
|
var DOT_BORDER = "#F3F4F6";
|
|
5405
5462
|
var BAND_FILL = "rgba(46,213,115,0.1)";
|
|
5406
5463
|
var BAND_EDGE = "rgba(46,213,115,0.45)";
|
|
@@ -5443,8 +5500,8 @@ function interpEdge(pixels, x, key) {
|
|
|
5443
5500
|
const a = pixels[i];
|
|
5444
5501
|
const b = pixels[i + 1];
|
|
5445
5502
|
if (x >= a.x && x <= b.x) {
|
|
5446
|
-
const
|
|
5447
|
-
return a[key] +
|
|
5503
|
+
const t12 = b.x === a.x ? 0 : (x - a.x) / (b.x - a.x);
|
|
5504
|
+
return a[key] + t12 * (b[key] - a[key]);
|
|
5448
5505
|
}
|
|
5449
5506
|
}
|
|
5450
5507
|
return pixels[pixels.length - 1][key];
|
|
@@ -6483,12 +6540,12 @@ function Badge({
|
|
|
6483
6540
|
}
|
|
6484
6541
|
);
|
|
6485
6542
|
}
|
|
6486
|
-
var
|
|
6543
|
+
var t8 = getSemanticColors("dark");
|
|
6487
6544
|
var statusBgColors = {
|
|
6488
6545
|
completed: "rgba(46,213,115,0.15)",
|
|
6489
6546
|
current: "rgba(255,121,0,0.15)",
|
|
6490
6547
|
next: "transparent",
|
|
6491
|
-
upcoming: "
|
|
6548
|
+
upcoming: t8["surface-raised"],
|
|
6492
6549
|
missed: "rgba(209,67,67,0.1)",
|
|
6493
6550
|
deload: "rgba(186,41,150,0.15)"
|
|
6494
6551
|
};
|
|
@@ -6501,9 +6558,9 @@ var statusBorderStyles = {
|
|
|
6501
6558
|
deload: { borderWidth: 1, borderColor: "rgba(186,41,150,0.3)" }
|
|
6502
6559
|
};
|
|
6503
6560
|
var textColors = {
|
|
6504
|
-
completed:
|
|
6505
|
-
current:
|
|
6506
|
-
next:
|
|
6561
|
+
completed: t8["status-success"],
|
|
6562
|
+
current: t8["brand-primary"],
|
|
6563
|
+
next: t8["brand-primary"],
|
|
6507
6564
|
upcoming: "#6B7280",
|
|
6508
6565
|
missed: "rgba(209,67,67,0.7)",
|
|
6509
6566
|
deload: WORKOUT_PILL_DELOAD
|
|
@@ -6636,19 +6693,19 @@ function WorkoutPill({
|
|
|
6636
6693
|
}
|
|
6637
6694
|
return pill;
|
|
6638
6695
|
}
|
|
6639
|
-
var
|
|
6696
|
+
var t9 = getSemanticColors("dark");
|
|
6640
6697
|
var TRACK_BG = "#333333";
|
|
6641
6698
|
var LABEL_COLOR = "#6B7280";
|
|
6642
6699
|
var TARGET_LINE_COLOR = "rgba(33, 150, 243, 0.5)";
|
|
6643
6700
|
var AT_TARGET_GLOW = "0 0 5px 1px rgba(33, 150, 243, 0.35), 0 0 10px 3px rgba(33, 150, 243, 0.15)";
|
|
6644
6701
|
var ZONE = {
|
|
6645
|
-
building:
|
|
6702
|
+
building: t9["status-success"],
|
|
6646
6703
|
// below target ramp-up
|
|
6647
|
-
approaching:
|
|
6704
|
+
approaching: t9["status-warning"],
|
|
6648
6705
|
// nearing target
|
|
6649
|
-
target:
|
|
6706
|
+
target: t9["brand-primary"],
|
|
6650
6707
|
// exactly at target
|
|
6651
|
-
over1:
|
|
6708
|
+
over1: t9["status-error"],
|
|
6652
6709
|
// mild over-target
|
|
6653
6710
|
over2: WORKOUT_TOKENS.intensity.over2,
|
|
6654
6711
|
// moderate over-target
|
|
@@ -7071,13 +7128,13 @@ function MesoCard({
|
|
|
7071
7128
|
}
|
|
7072
7129
|
) });
|
|
7073
7130
|
}
|
|
7074
|
-
var
|
|
7131
|
+
var t10 = getSemanticColors("dark");
|
|
7075
7132
|
var dotColorMap = {
|
|
7076
7133
|
untrained: "#2C2C2C",
|
|
7077
|
-
behind:
|
|
7078
|
-
ontrack:
|
|
7079
|
-
target:
|
|
7080
|
-
over:
|
|
7134
|
+
behind: t10["brand-secondary"],
|
|
7135
|
+
ontrack: t10["status-success"],
|
|
7136
|
+
target: t10["brand-primary"],
|
|
7137
|
+
over: t10["status-error"]
|
|
7081
7138
|
};
|
|
7082
7139
|
function MuscleGroupChip({
|
|
7083
7140
|
name,
|
|
@@ -7151,10 +7208,10 @@ function MuscleGroupChip({
|
|
|
7151
7208
|
}
|
|
7152
7209
|
|
|
7153
7210
|
// src/components/custom/Workout/WorkoutCard.tsx
|
|
7154
|
-
var
|
|
7211
|
+
var t11 = getSemanticColors("dark");
|
|
7155
7212
|
var COLORS = {
|
|
7156
|
-
statusSuccess:
|
|
7157
|
-
brandPrimary:
|
|
7213
|
+
statusSuccess: t11["status-success"],
|
|
7214
|
+
brandPrimary: t11["brand-primary"],
|
|
7158
7215
|
borderDefault: "#1F1F1F",
|
|
7159
7216
|
brandPrimarySubtle: "rgba(255,121,0,0.06)"
|
|
7160
7217
|
};
|