@titan-design/react-ui 0.9.1 → 0.9.2
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/index.d.mts +13 -3
- package/dist/index.d.ts +13 -3
- package/dist/index.js +20 -21
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -21
- package/dist/index.mjs.map +1 -1
- package/dist/pages.js +2 -1
- package/dist/pages.js.map +1 -1
- package/dist/pages.mjs +2 -1
- package/dist/pages.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/custom/Workout/ExerciseHeading.tsx +5 -3
- package/src/components/custom/Workout/SessionHeader.tsx +6 -5
- package/src/components/custom/Workout/SessionRail.tsx +18 -7
- package/src/components/custom/Workout/SetsRepsLoad.tsx +2 -1
- package/src/components/shell/DashboardShell.tsx +7 -9
- package/src/components/shell/NavItem.tsx +6 -1
package/dist/index.d.mts
CHANGED
|
@@ -2939,7 +2939,8 @@ declare function MetricCell({ children, color, fontSize }: MetricCellProps): rea
|
|
|
2939
2939
|
interface SetsRepsLoadProps extends ViewProps {
|
|
2940
2940
|
sets: number;
|
|
2941
2941
|
reps: number | string;
|
|
2942
|
-
load
|
|
2942
|
+
/** Load value; a string (e.g. "—") passes through verbatim for an unset/discovery load. */
|
|
2943
|
+
load: number | string;
|
|
2943
2944
|
/** Displayed load unit label (e.g. "lb", "kg"). */
|
|
2944
2945
|
unit?: string;
|
|
2945
2946
|
/** Cell font size (px). Default 11 — the compact rail/card scale. Raise for a wall read-out. */
|
|
@@ -3117,7 +3118,8 @@ interface ExerciseHeadingProps {
|
|
|
3117
3118
|
/** Prescription line values (sets × reps @ load). */
|
|
3118
3119
|
sets: number;
|
|
3119
3120
|
reps: number | string;
|
|
3120
|
-
load
|
|
3121
|
+
/** Load value; a string (e.g. "—") passes through verbatim for an unset/discovery load. */
|
|
3122
|
+
load: number | string;
|
|
3121
3123
|
unit?: 'lbs' | 'kg';
|
|
3122
3124
|
/** Tempo tuple [eccentric, pauseBottom, concentric, pauseTop]; hidden when absent. */
|
|
3123
3125
|
tempo?: [number, number, number, number];
|
|
@@ -3211,12 +3213,20 @@ interface SessionRailExercise {
|
|
|
3211
3213
|
/** Stable key + press payload. Falls back to list index when absent. */
|
|
3212
3214
|
id?: string;
|
|
3213
3215
|
name: string;
|
|
3216
|
+
/** `weight` accepts a string (e.g. "—") for an unset/discovery load — never a faked 0. */
|
|
3214
3217
|
summary: {
|
|
3215
3218
|
sets: number;
|
|
3216
3219
|
reps: number | string;
|
|
3217
|
-
weight: number;
|
|
3220
|
+
weight: number | string;
|
|
3218
3221
|
unit: 'lbs' | 'kg';
|
|
3219
3222
|
};
|
|
3223
|
+
/**
|
|
3224
|
+
* Prescribed set count for the header total + pace-bar segment width. Distinct from
|
|
3225
|
+
* `summary.sets`, which is the row's live DONE count (0 for the active exercise before
|
|
3226
|
+
* its first set) — using that for the total under-counts by the active exercise's
|
|
3227
|
+
* remaining sets. Falls back to `summary.sets` when absent.
|
|
3228
|
+
*/
|
|
3229
|
+
plannedSets?: number;
|
|
3220
3230
|
tempo?: [number, number, number, number];
|
|
3221
3231
|
indicator?: ExerciseIndicatorKind;
|
|
3222
3232
|
/** Per-set performance data driving the heading strip. */
|
package/dist/index.d.ts
CHANGED
|
@@ -2939,7 +2939,8 @@ declare function MetricCell({ children, color, fontSize }: MetricCellProps): rea
|
|
|
2939
2939
|
interface SetsRepsLoadProps extends ViewProps {
|
|
2940
2940
|
sets: number;
|
|
2941
2941
|
reps: number | string;
|
|
2942
|
-
load
|
|
2942
|
+
/** Load value; a string (e.g. "—") passes through verbatim for an unset/discovery load. */
|
|
2943
|
+
load: number | string;
|
|
2943
2944
|
/** Displayed load unit label (e.g. "lb", "kg"). */
|
|
2944
2945
|
unit?: string;
|
|
2945
2946
|
/** Cell font size (px). Default 11 — the compact rail/card scale. Raise for a wall read-out. */
|
|
@@ -3117,7 +3118,8 @@ interface ExerciseHeadingProps {
|
|
|
3117
3118
|
/** Prescription line values (sets × reps @ load). */
|
|
3118
3119
|
sets: number;
|
|
3119
3120
|
reps: number | string;
|
|
3120
|
-
load
|
|
3121
|
+
/** Load value; a string (e.g. "—") passes through verbatim for an unset/discovery load. */
|
|
3122
|
+
load: number | string;
|
|
3121
3123
|
unit?: 'lbs' | 'kg';
|
|
3122
3124
|
/** Tempo tuple [eccentric, pauseBottom, concentric, pauseTop]; hidden when absent. */
|
|
3123
3125
|
tempo?: [number, number, number, number];
|
|
@@ -3211,12 +3213,20 @@ interface SessionRailExercise {
|
|
|
3211
3213
|
/** Stable key + press payload. Falls back to list index when absent. */
|
|
3212
3214
|
id?: string;
|
|
3213
3215
|
name: string;
|
|
3216
|
+
/** `weight` accepts a string (e.g. "—") for an unset/discovery load — never a faked 0. */
|
|
3214
3217
|
summary: {
|
|
3215
3218
|
sets: number;
|
|
3216
3219
|
reps: number | string;
|
|
3217
|
-
weight: number;
|
|
3220
|
+
weight: number | string;
|
|
3218
3221
|
unit: 'lbs' | 'kg';
|
|
3219
3222
|
};
|
|
3223
|
+
/**
|
|
3224
|
+
* Prescribed set count for the header total + pace-bar segment width. Distinct from
|
|
3225
|
+
* `summary.sets`, which is the row's live DONE count (0 for the active exercise before
|
|
3226
|
+
* its first set) — using that for the total under-counts by the active exercise's
|
|
3227
|
+
* remaining sets. Falls back to `summary.sets` when absent.
|
|
3228
|
+
*/
|
|
3229
|
+
plannedSets?: number;
|
|
3220
3230
|
tempo?: [number, number, number, number];
|
|
3221
3231
|
indicator?: ExerciseIndicatorKind;
|
|
3222
3232
|
/** Per-set performance data driving the heading strip. */
|
package/dist/index.js
CHANGED
|
@@ -10429,7 +10429,8 @@ function ExerciseIndicator({ kind, onPress, className, ...props }) {
|
|
|
10429
10429
|
return chip;
|
|
10430
10430
|
}
|
|
10431
10431
|
function headingLabel(name, sets, reps, load, unit) {
|
|
10432
|
-
|
|
10432
|
+
const loadLabel = typeof load === "number" ? roundWeight(load) : load;
|
|
10433
|
+
return `${name}, ${sets}\xD7${reps} @ ${loadLabel} ${unit}`;
|
|
10433
10434
|
}
|
|
10434
10435
|
function ExerciseHeading({
|
|
10435
10436
|
name,
|
|
@@ -10864,7 +10865,7 @@ function ExerciseCard({
|
|
|
10864
10865
|
return isExpanded ? /* @__PURE__ */ jsx(ExpandedCard, { ...rest, onToggle }) : /* @__PURE__ */ jsx(CollapsedCard, { ...rest, onToggle });
|
|
10865
10866
|
}
|
|
10866
10867
|
var t9 = getSemanticColors("dark");
|
|
10867
|
-
var
|
|
10868
|
+
var HEADER_BG = t9["background-base"];
|
|
10868
10869
|
var BAR_HEIGHT = 9;
|
|
10869
10870
|
var BAR_GAP = 3;
|
|
10870
10871
|
function SessionHeader({
|
|
@@ -10892,7 +10893,7 @@ function SessionHeader({
|
|
|
10892
10893
|
className,
|
|
10893
10894
|
style: [
|
|
10894
10895
|
{
|
|
10895
|
-
backgroundColor:
|
|
10896
|
+
backgroundColor: HEADER_BG,
|
|
10896
10897
|
paddingTop: 11,
|
|
10897
10898
|
paddingRight: 12,
|
|
10898
10899
|
paddingBottom: 12,
|
|
@@ -10969,8 +10970,8 @@ function SessionHeader({
|
|
|
10969
10970
|
}
|
|
10970
10971
|
);
|
|
10971
10972
|
}
|
|
10972
|
-
var INSET = primitiveColors.charcoal[
|
|
10973
|
-
var DIVIDER = primitiveColors.charcoal[
|
|
10973
|
+
var INSET = primitiveColors.charcoal[600];
|
|
10974
|
+
var DIVIDER = primitiveColors.charcoal[300];
|
|
10974
10975
|
var DEFAULT_WIDTH = 246;
|
|
10975
10976
|
function SessionRail({
|
|
10976
10977
|
title,
|
|
@@ -11000,7 +11001,7 @@ function SessionRail({
|
|
|
11000
11001
|
SessionHeader,
|
|
11001
11002
|
{
|
|
11002
11003
|
title,
|
|
11003
|
-
plan: exercises.map((ex) => ({ name: ex.name, sets: ex.summary.sets })),
|
|
11004
|
+
plan: exercises.map((ex) => ({ name: ex.name, sets: ex.plannedSets ?? ex.summary.sets })),
|
|
11004
11005
|
setsDone,
|
|
11005
11006
|
elapsedMs,
|
|
11006
11007
|
budgetMs,
|
|
@@ -14383,7 +14384,8 @@ function NavItem({
|
|
|
14383
14384
|
{
|
|
14384
14385
|
variant: "button",
|
|
14385
14386
|
color: "inherit",
|
|
14386
|
-
|
|
14387
|
+
style: { fontSize: 8.5, lineHeight: 11 },
|
|
14388
|
+
className: cn("font-bold uppercase tracking-[0.4px]", labelColor),
|
|
14387
14389
|
children: label
|
|
14388
14390
|
}
|
|
14389
14391
|
)
|
|
@@ -14448,21 +14450,18 @@ function DashboardShell({
|
|
|
14448
14450
|
children,
|
|
14449
14451
|
className
|
|
14450
14452
|
}) {
|
|
14451
|
-
return
|
|
14452
|
-
|
|
14453
|
-
|
|
14454
|
-
|
|
14455
|
-
|
|
14456
|
-
|
|
14457
|
-
|
|
14458
|
-
|
|
14459
|
-
|
|
14460
|
-
|
|
14461
|
-
}
|
|
14462
|
-
),
|
|
14463
|
-
/* @__PURE__ */ jsx(reactNative.View, { className: "flex-1", children: children ?? /* @__PURE__ */ jsx(ContentPlaceholder, {}) })
|
|
14453
|
+
return (
|
|
14454
|
+
// Column: the TopBar spans the FULL width across the top, and the SideNav sits BELOW it
|
|
14455
|
+
// in the content row (not a full-height left rail). This keeps the brand/status band
|
|
14456
|
+
// unbroken edge-to-edge and lets the nav align under it.
|
|
14457
|
+
/* @__PURE__ */ jsxs(reactNative.View, { className: cn("flex-1 bg-surface-base", className), children: [
|
|
14458
|
+
/* @__PURE__ */ jsx(TopBar, { state, devices, subtitle, onSelectDevice }),
|
|
14459
|
+
/* @__PURE__ */ jsxs(reactNative.View, { className: "flex-1 flex-row", children: [
|
|
14460
|
+
/* @__PURE__ */ jsx(SideNav, { activeKey, items: navItems, liveKey, onNavigate }),
|
|
14461
|
+
/* @__PURE__ */ jsx(reactNative.View, { className: "flex-1", children: children ?? /* @__PURE__ */ jsx(ContentPlaceholder, {}) })
|
|
14462
|
+
] })
|
|
14464
14463
|
] })
|
|
14465
|
-
|
|
14464
|
+
);
|
|
14466
14465
|
}
|
|
14467
14466
|
|
|
14468
14467
|
// src/utils/form.ts
|