@titan-design/react-ui 0.9.2 → 0.9.3

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.js CHANGED
@@ -4,11 +4,11 @@ var jsxRuntime = require('react/jsx-runtime');
4
4
  var reactNative = require('react-native');
5
5
  var clsx = require('clsx');
6
6
  var tailwindMerge = require('tailwind-merge');
7
- var React24 = require('react');
7
+ var React25 = require('react');
8
8
 
9
9
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
10
10
 
11
- var React24__default = /*#__PURE__*/_interopDefault(React24);
11
+ var React25__default = /*#__PURE__*/_interopDefault(React25);
12
12
 
13
13
  var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
14
14
  get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
@@ -1194,7 +1194,7 @@ var textSizeStyles = {
1194
1194
  md: "text-sm",
1195
1195
  lg: "text-base"
1196
1196
  };
1197
- var Button = React24.forwardRef(function Button2({
1197
+ var Button = React25.forwardRef(function Button2({
1198
1198
  variant = "solid",
1199
1199
  size = "md",
1200
1200
  color = "primary",
@@ -1302,7 +1302,7 @@ var variantStyles2 = {
1302
1302
  error: "border-border-input-error"
1303
1303
  }
1304
1304
  };
1305
- var Input = React24.forwardRef(function Input2({
1305
+ var Input = React25.forwardRef(function Input2({
1306
1306
  size = "md",
1307
1307
  variant = "outline",
1308
1308
  isDisabled = false,
@@ -1322,7 +1322,7 @@ var Input = React24.forwardRef(function Input2({
1322
1322
  onBlur,
1323
1323
  ...props
1324
1324
  }, ref) {
1325
- const [isFocused, setIsFocused] = React24.useState(false);
1325
+ const [isFocused, setIsFocused] = React25.useState(false);
1326
1326
  const handleFocus = (e) => {
1327
1327
  setIsFocused(true);
1328
1328
  onFocus?.(e);
@@ -1388,8 +1388,8 @@ var Input = React24.forwardRef(function Input2({
1388
1388
  function InputGroup({ children, className }) {
1389
1389
  return /* @__PURE__ */ jsx(reactNative.View, { className: cn("flex-col gap-4", className), children });
1390
1390
  }
1391
- var PasswordInput = React24.forwardRef(function PasswordInput2({ showIcon, hideIcon, ...props }, ref) {
1392
- const [isVisible, setIsVisible] = React24.useState(false);
1391
+ var PasswordInput = React25.forwardRef(function PasswordInput2({ showIcon, hideIcon, ...props }, ref) {
1392
+ const [isVisible, setIsVisible] = React25.useState(false);
1393
1393
  const toggleVisibility = () => setIsVisible(!isVisible);
1394
1394
  const defaultShowIcon = /* @__PURE__ */ jsxs(reactNative.View, { className: "w-5 h-5 items-center justify-center", children: [
1395
1395
  /* @__PURE__ */ jsx(reactNative.View, { className: "w-3 h-3 rounded-full border-2 border-text-secondary" }),
@@ -2564,6 +2564,40 @@ var audiobookPreset = {
2564
2564
  },
2565
2565
  rootClasses: ["atmosphere-warm", "grain"]
2566
2566
  };
2567
+ var SURFACE_LEVEL_TOKEN = {
2568
+ background: "background-base",
2569
+ base: "surface-base",
2570
+ elevated: "surface-elevated",
2571
+ raised: "surface-raised",
2572
+ overlay: "surface-overlay"
2573
+ };
2574
+ var ON_SURFACE_TOKEN = {
2575
+ primary: "text-primary",
2576
+ secondary: "text-secondary",
2577
+ tertiary: "text-tertiary"
2578
+ };
2579
+ var DEFAULT_CONTEXT = { mode: "dark", level: "base" };
2580
+ var SurfaceContext = React25.createContext(DEFAULT_CONTEXT);
2581
+ function useSurface() {
2582
+ return React25.useContext(SurfaceContext);
2583
+ }
2584
+ function useSurfaceMode() {
2585
+ return React25.useContext(SurfaceContext).mode;
2586
+ }
2587
+ function onSurfaceColors(mode) {
2588
+ const c = getSemanticColors(mode);
2589
+ return {
2590
+ primary: c[ON_SURFACE_TOKEN.primary],
2591
+ secondary: c[ON_SURFACE_TOKEN.secondary],
2592
+ tertiary: c[ON_SURFACE_TOKEN.tertiary]
2593
+ };
2594
+ }
2595
+ function useOnSurfaceColor(role = "primary") {
2596
+ return getSemanticColors(useSurfaceMode())[ON_SURFACE_TOKEN[role]];
2597
+ }
2598
+ function surfaceBackground(level, mode) {
2599
+ return getSemanticColors(mode)[SURFACE_LEVEL_TOKEN[level]];
2600
+ }
2567
2601
  function getTheme() {
2568
2602
  if (typeof document === "undefined") return "dark";
2569
2603
  return document.documentElement.classList.contains("light") ? "light" : "dark";
@@ -2600,7 +2634,7 @@ function getServerSnapshot() {
2600
2634
  return "dark";
2601
2635
  }
2602
2636
  function useTheme() {
2603
- return React24.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
2637
+ return React25.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
2604
2638
  }
2605
2639
 
2606
2640
  // src/components/ui/card/Card.tsx
@@ -2633,17 +2667,17 @@ function Card({
2633
2667
  ...props
2634
2668
  }) {
2635
2669
  const isClickable = isInteractive || !!onPress;
2636
- const [isHovered, setIsHovered] = React24.useState(false);
2670
+ const [isHovered, setIsHovered] = React25.useState(false);
2637
2671
  const theme = useTheme();
2638
- const elevationLevel = React24.useMemo(() => {
2672
+ const elevationLevel = React25.useMemo(() => {
2639
2673
  const validated = getValidatedElevation("card", elevation);
2640
2674
  if (variant === "outline" || variant === "accent" || variant === "subtle") {
2641
2675
  return 1;
2642
2676
  }
2643
2677
  return validated;
2644
2678
  }, [variant, elevation]);
2645
- const baseColor = React24.useMemo(() => getBaseSurfaceColor(theme), [theme]);
2646
- const surfaceColor = React24.useMemo(() => {
2679
+ const baseColor = React25.useMemo(() => getBaseSurfaceColor(theme), [theme]);
2680
+ const surfaceColor = React25.useMemo(() => {
2647
2681
  if ((variant === "outline" || variant === "accent") && theme === "light") {
2648
2682
  return "#FAFAFA";
2649
2683
  }
@@ -2652,7 +2686,7 @@ function Card({
2652
2686
  }
2653
2687
  return getElevationSurface(baseColor, elevationLevel, theme);
2654
2688
  }, [baseColor, elevationLevel, theme, variant]);
2655
- const shadowStyle = React24.useMemo(() => {
2689
+ const shadowStyle = React25.useMemo(() => {
2656
2690
  const shouldHover = isHovered && isClickable;
2657
2691
  return getElevationShadow(baseColor, elevationLevel, theme, shouldHover);
2658
2692
  }, [baseColor, elevationLevel, theme, isHovered, isClickable]);
@@ -2683,11 +2717,11 @@ function Card({
2683
2717
  isLoading && "pointer-events-none animate-pulse",
2684
2718
  className
2685
2719
  );
2686
- const accentStyle = React24.useMemo(() => variant === "accent" ? {
2720
+ const accentStyle = React25.useMemo(() => variant === "accent" ? {
2687
2721
  borderLeftWidth: accentWidth ?? 3,
2688
2722
  borderLeftColor: accentColor ?? "var(--color-brand-primary)"
2689
2723
  } : {}, [variant, accentWidth, accentColor]);
2690
- const mergedStyle = React24.useMemo(() => {
2724
+ const mergedStyle = React25.useMemo(() => {
2691
2725
  const elevationStyle = {
2692
2726
  backgroundColor: bgColor || surfaceColor,
2693
2727
  borderRadius: 8,
@@ -3052,7 +3086,7 @@ function AvatarGroup({
3052
3086
  size = "md",
3053
3087
  className
3054
3088
  }) {
3055
- const childArray = React24__default.default.Children.toArray(children);
3089
+ const childArray = React25__default.default.Children.toArray(children);
3056
3090
  const visibleChildren = max ? childArray.slice(0, max) : childArray;
3057
3091
  const remainingCount = max ? Math.max(0, childArray.length - max) : 0;
3058
3092
  return /* @__PURE__ */ jsxs(reactNative.View, { className: cn("flex-row", className), children: [
@@ -3063,7 +3097,7 @@ function AvatarGroup({
3063
3097
  "border-2 border-surface-base rounded-full",
3064
3098
  index > 0 && "-ml-2"
3065
3099
  ),
3066
- children: React24__default.default.isValidElement(child) ? React24__default.default.cloneElement(child, { size }) : child
3100
+ children: React25__default.default.isValidElement(child) ? React25__default.default.cloneElement(child, { size }) : child
3067
3101
  },
3068
3102
  index
3069
3103
  )),
@@ -3106,7 +3140,7 @@ var sizeStyles6 = {
3106
3140
  md: { box: "w-5 h-5", icon: "w-3 h-3", label: "text-base" },
3107
3141
  lg: { box: "w-6 h-6", icon: "w-3.5 h-3.5", label: "text-lg" }
3108
3142
  };
3109
- var Checkbox = React24.forwardRef(function Checkbox2({
3143
+ var Checkbox = React25.forwardRef(function Checkbox2({
3110
3144
  isChecked = false,
3111
3145
  isIndeterminate = false,
3112
3146
  isDisabled = false,
@@ -3192,7 +3226,7 @@ var sizeStyles7 = {
3192
3226
  md: { track: "w-10 h-5", thumb: "w-4 h-4", translate: "translate-x-5" },
3193
3227
  lg: { track: "w-12 h-6", thumb: "w-5 h-5", translate: "translate-x-6" }
3194
3228
  };
3195
- var Switch = React24.forwardRef(function Switch2({
3229
+ var Switch = React25.forwardRef(function Switch2({
3196
3230
  isChecked = false,
3197
3231
  isDisabled = false,
3198
3232
  size = "md",
@@ -3251,7 +3285,7 @@ var Switch = React24.forwardRef(function Switch2({
3251
3285
  }
3252
3286
  );
3253
3287
  });
3254
- var ModalContext = React24.createContext({ size: "md", scrollBehavior: "outside" });
3288
+ var ModalContext = React25.createContext({ size: "md", scrollBehavior: "outside" });
3255
3289
  var sizeStyles8 = {
3256
3290
  xs: "max-w-xs",
3257
3291
  sm: "max-w-sm",
@@ -3309,7 +3343,7 @@ function Modal({
3309
3343
  ) });
3310
3344
  }
3311
3345
  function ModalContent({ children, className }) {
3312
- const { size } = React24.useContext(ModalContext);
3346
+ const { size } = React25.useContext(ModalContext);
3313
3347
  return /* @__PURE__ */ jsx(
3314
3348
  reactNative.Pressable,
3315
3349
  {
@@ -3342,7 +3376,7 @@ function ModalTitle({ children, className }) {
3342
3376
  );
3343
3377
  }
3344
3378
  function ModalCloseButton({ className }) {
3345
- const { onClose } = React24.useContext(ModalContext);
3379
+ const { onClose } = React25.useContext(ModalContext);
3346
3380
  return /* @__PURE__ */ jsx(
3347
3381
  reactNative.Pressable,
3348
3382
  {
@@ -3358,7 +3392,7 @@ function ModalCloseButton({ className }) {
3358
3392
  );
3359
3393
  }
3360
3394
  function ModalBody({ children, maxHeight, className }) {
3361
- const { scrollBehavior } = React24.useContext(ModalContext);
3395
+ const { scrollBehavior } = React25.useContext(ModalContext);
3362
3396
  if (scrollBehavior === "inside") {
3363
3397
  return /* @__PURE__ */ jsx(
3364
3398
  reactNative.ScrollView,
@@ -3494,7 +3528,7 @@ function SkeletonListItem({
3494
3528
  /* @__PURE__ */ jsx(reactNative.View, { className: "flex-1", children: /* @__PURE__ */ jsx(SkeletonText, { lines, animation }) })
3495
3529
  ] });
3496
3530
  }
3497
- var TabsContext = React24.createContext({
3531
+ var TabsContext = React25.createContext({
3498
3532
  activeIndex: 0,
3499
3533
  setActiveIndex: () => {
3500
3534
  },
@@ -3511,7 +3545,7 @@ function Tabs({
3511
3545
  children,
3512
3546
  ...props
3513
3547
  }) {
3514
- const [internalIndex, setInternalIndex] = React24.useState(defaultIndex);
3548
+ const [internalIndex, setInternalIndex] = React25.useState(defaultIndex);
3515
3549
  const activeIndex = index ?? internalIndex;
3516
3550
  const setActiveIndex = (newIndex) => {
3517
3551
  if (index === void 0) {
@@ -3532,7 +3566,7 @@ function Tabs({
3532
3566
  ) });
3533
3567
  }
3534
3568
  function TabList({ children, className }) {
3535
- const { variant, orientation } = React24.useContext(TabsContext);
3569
+ const { variant, orientation } = React25.useContext(TabsContext);
3536
3570
  const variantStyles5 = {
3537
3571
  line: orientation === "horizontal" ? "border-b border-border" : "border-r border-border",
3538
3572
  enclosed: "bg-surface-raised rounded-lg p-1",
@@ -3546,9 +3580,9 @@ function TabList({ children, className }) {
3546
3580
  variantStyles5[variant],
3547
3581
  className
3548
3582
  ),
3549
- children: React24__default.default.Children.map(children, (child, index) => {
3550
- if (React24__default.default.isValidElement(child)) {
3551
- return React24__default.default.cloneElement(child, { index });
3583
+ children: React25__default.default.Children.map(children, (child, index) => {
3584
+ if (React25__default.default.isValidElement(child)) {
3585
+ return React25__default.default.cloneElement(child, { index });
3552
3586
  }
3553
3587
  return child;
3554
3588
  })
@@ -3573,7 +3607,7 @@ function Tab({
3573
3607
  className,
3574
3608
  children
3575
3609
  }) {
3576
- const { activeIndex, setActiveIndex, variant, orientation } = React24.useContext(TabsContext);
3610
+ const { activeIndex, setActiveIndex, variant, orientation } = React25.useContext(TabsContext);
3577
3611
  const isActive = activeIndex === index;
3578
3612
  const baseStyles = "font-medium text-sm transition-colors";
3579
3613
  const variantStyles5 = {
@@ -3618,9 +3652,9 @@ function Tab({
3618
3652
  );
3619
3653
  }
3620
3654
  function TabPanels({ children, className }) {
3621
- const { activeIndex } = React24.useContext(TabsContext);
3622
- return /* @__PURE__ */ jsx(reactNative.View, { className: cn("flex-1", className), children: React24__default.default.Children.map(children, (child, index) => {
3623
- if (React24__default.default.isValidElement(child) && index === activeIndex) {
3655
+ const { activeIndex } = React25.useContext(TabsContext);
3656
+ return /* @__PURE__ */ jsx(reactNative.View, { className: cn("flex-1", className), children: React25__default.default.Children.map(children, (child, index) => {
3657
+ if (React25__default.default.isValidElement(child) && index === activeIndex) {
3624
3658
  return child;
3625
3659
  }
3626
3660
  return null;
@@ -3803,13 +3837,13 @@ function Tooltip({
3803
3837
  usePortal: usePortalProp = false,
3804
3838
  ...props
3805
3839
  }) {
3806
- const [isVisible, setIsVisible] = React24.useState(false);
3807
- const [portalPos, setPortalPos] = React24.useState(null);
3808
- const openTimeoutRef = React24.useRef(null);
3809
- const closeTimeoutRef = React24.useRef(null);
3810
- const triggerRef = React24.useRef(null);
3840
+ const [isVisible, setIsVisible] = React25.useState(false);
3841
+ const [portalPos, setPortalPos] = React25.useState(null);
3842
+ const openTimeoutRef = React25.useRef(null);
3843
+ const closeTimeoutRef = React25.useRef(null);
3844
+ const triggerRef = React25.useRef(null);
3811
3845
  const isPortalMode = usePortalProp && reactNative.Platform.OS === "web" && !!createPortal;
3812
- React24.useEffect(() => {
3846
+ React25.useEffect(() => {
3813
3847
  if (!isVisible || !isPortalMode || !triggerRef.current) return;
3814
3848
  const node = triggerRef.current;
3815
3849
  const id = requestAnimationFrame(() => {
@@ -3943,7 +3977,7 @@ function Tooltip({
3943
3977
  )
3944
3978
  ] });
3945
3979
  }
3946
- var CollapseContext = React24.createContext({
3980
+ var CollapseContext = React25.createContext({
3947
3981
  isOpen: false,
3948
3982
  toggle: () => {
3949
3983
  }
@@ -3956,7 +3990,7 @@ function Collapse({
3956
3990
  children,
3957
3991
  ...props
3958
3992
  }) {
3959
- const [internalIsOpen, setInternalIsOpen] = React24.useState(defaultIsOpen);
3993
+ const [internalIsOpen, setInternalIsOpen] = React25.useState(defaultIsOpen);
3960
3994
  const isOpen = controlledIsOpen ?? internalIsOpen;
3961
3995
  const toggle = () => {
3962
3996
  const newState = !isOpen;
@@ -3968,7 +4002,7 @@ function Collapse({
3968
4002
  return /* @__PURE__ */ jsx(CollapseContext.Provider, { value: { isOpen, toggle }, children: /* @__PURE__ */ jsx(reactNative.View, { className: cn("w-full", className), ...props, children }) });
3969
4003
  }
3970
4004
  function CollapseButton({ children, className }) {
3971
- const { isOpen, toggle } = React24.useContext(CollapseContext);
4005
+ const { isOpen, toggle } = React25.useContext(CollapseContext);
3972
4006
  return /* @__PURE__ */ jsxs(
3973
4007
  reactNative.Pressable,
3974
4008
  {
@@ -3988,11 +4022,11 @@ function CollapseButton({ children, className }) {
3988
4022
  );
3989
4023
  }
3990
4024
  function CollapseContent({ children, className }) {
3991
- const { isOpen } = React24.useContext(CollapseContext);
4025
+ const { isOpen } = React25.useContext(CollapseContext);
3992
4026
  if (!isOpen) return null;
3993
4027
  return /* @__PURE__ */ jsx(reactNative.View, { className: cn("overflow-hidden", className), children });
3994
4028
  }
3995
- var AccordionContext = React24.createContext({
4029
+ var AccordionContext = React25.createContext({
3996
4030
  openIndices: /* @__PURE__ */ new Set(),
3997
4031
  toggleIndex: () => {
3998
4032
  },
@@ -4005,7 +4039,7 @@ function Accordion({
4005
4039
  children,
4006
4040
  ...props
4007
4041
  }) {
4008
- const [openIndices, setOpenIndices] = React24.useState(new Set(defaultIndex));
4042
+ const [openIndices, setOpenIndices] = React25.useState(new Set(defaultIndex));
4009
4043
  const toggleIndex = (index) => {
4010
4044
  setOpenIndices((prev) => {
4011
4045
  const newSet = new Set(prev);
@@ -4020,19 +4054,19 @@ function Accordion({
4020
4054
  return newSet;
4021
4055
  });
4022
4056
  };
4023
- return /* @__PURE__ */ jsx(AccordionContext.Provider, { value: { openIndices, toggleIndex, allowMultiple }, children: /* @__PURE__ */ jsx(reactNative.View, { className: cn("w-full divide-y divide-border", className), ...props, children: React24__default.default.Children.map(children, (child, index) => {
4024
- if (React24__default.default.isValidElement(child)) {
4025
- return React24__default.default.cloneElement(child, { index });
4057
+ return /* @__PURE__ */ jsx(AccordionContext.Provider, { value: { openIndices, toggleIndex, allowMultiple }, children: /* @__PURE__ */ jsx(reactNative.View, { className: cn("w-full divide-y divide-border", className), ...props, children: React25__default.default.Children.map(children, (child, index) => {
4058
+ if (React25__default.default.isValidElement(child)) {
4059
+ return React25__default.default.cloneElement(child, { index });
4026
4060
  }
4027
4061
  return child;
4028
4062
  }) }) });
4029
4063
  }
4030
4064
  function AccordionItem({ index = 0, children, className }) {
4031
- const { openIndices, toggleIndex } = React24.useContext(AccordionContext);
4065
+ const { openIndices, toggleIndex } = React25.useContext(AccordionContext);
4032
4066
  const isOpen = openIndices.has(index);
4033
- return /* @__PURE__ */ jsx(reactNative.View, { className, children: React24__default.default.Children.map(children, (child) => {
4034
- if (React24__default.default.isValidElement(child)) {
4035
- return React24__default.default.cloneElement(child, {
4067
+ return /* @__PURE__ */ jsx(reactNative.View, { className, children: React25__default.default.Children.map(children, (child) => {
4068
+ if (React25__default.default.isValidElement(child)) {
4069
+ return React25__default.default.cloneElement(child, {
4036
4070
  isOpen,
4037
4071
  onToggle: () => toggleIndex(index)
4038
4072
  });
@@ -4075,7 +4109,7 @@ function Breadcrumbs({
4075
4109
  children,
4076
4110
  ...props
4077
4111
  }) {
4078
- const items = React24__default.default.Children.toArray(children);
4112
+ const items = React25__default.default.Children.toArray(children);
4079
4113
  let displayItems = items;
4080
4114
  if (maxItems && items.length > maxItems) {
4081
4115
  const firstItem = items[0];
@@ -4141,7 +4175,7 @@ function BreadcrumbItem({
4141
4175
  function BreadcrumbEllipsis() {
4142
4176
  return /* @__PURE__ */ jsx(reactNative.Text, { className: "text-sm text-text-tertiary", children: "..." });
4143
4177
  }
4144
- var PopoverContext = React24.createContext({
4178
+ var PopoverContext = React25.createContext({
4145
4179
  isOpen: false,
4146
4180
  setIsOpen: () => {
4147
4181
  },
@@ -4163,16 +4197,16 @@ function Popover({
4163
4197
  children,
4164
4198
  ...props
4165
4199
  }) {
4166
- const [internalIsOpen, setInternalIsOpen] = React24.useState(false);
4200
+ const [internalIsOpen, setInternalIsOpen] = React25.useState(false);
4167
4201
  const isOpen = controlledIsOpen ?? internalIsOpen;
4168
- const closeTimerRef = React24.useRef(null);
4169
- const setIsOpen = React24.useCallback((open) => {
4202
+ const closeTimerRef = React25.useRef(null);
4203
+ const setIsOpen = React25.useCallback((open) => {
4170
4204
  if (controlledIsOpen === void 0) {
4171
4205
  setInternalIsOpen(open);
4172
4206
  }
4173
4207
  onOpenChange?.(open);
4174
4208
  }, [controlledIsOpen, onOpenChange]);
4175
- const handleHoverIn = React24.useCallback(() => {
4209
+ const handleHoverIn = React25.useCallback(() => {
4176
4210
  if (triggerMode !== "hover") return;
4177
4211
  if (closeTimerRef.current) {
4178
4212
  clearTimeout(closeTimerRef.current);
@@ -4180,7 +4214,7 @@ function Popover({
4180
4214
  }
4181
4215
  setIsOpen(true);
4182
4216
  }, [triggerMode, setIsOpen]);
4183
- const handleHoverOut = React24.useCallback(() => {
4217
+ const handleHoverOut = React25.useCallback(() => {
4184
4218
  if (triggerMode !== "hover") return;
4185
4219
  closeTimerRef.current = setTimeout(() => {
4186
4220
  setIsOpen(false);
@@ -4196,7 +4230,7 @@ function Popover({
4196
4230
  );
4197
4231
  }
4198
4232
  function PopoverTrigger({ children, className }) {
4199
- const { isOpen, setIsOpen, triggerMode, handleHoverIn, handleHoverOut } = React24.useContext(PopoverContext);
4233
+ const { isOpen, setIsOpen, triggerMode, handleHoverIn, handleHoverOut } = React25.useContext(PopoverContext);
4200
4234
  const hoverProps = triggerMode === "hover" ? {
4201
4235
  onHoverIn: handleHoverIn,
4202
4236
  onHoverOut: handleHoverOut,
@@ -4222,7 +4256,7 @@ var SPACER_STYLES = {
4222
4256
  right: { top: 0, bottom: 0, left: 0, width: 8, transform: "translateX(-100%)" }
4223
4257
  };
4224
4258
  function PopoverContent({ children, className }) {
4225
- const { isOpen, setIsOpen, placement, triggerMode, handleHoverIn, handleHoverOut } = React24.useContext(PopoverContext);
4259
+ const { isOpen, setIsOpen, placement, triggerMode, handleHoverIn, handleHoverOut } = React25.useContext(PopoverContext);
4226
4260
  if (!isOpen) return null;
4227
4261
  const placementStyles3 = {
4228
4262
  top: "bottom-full left-0 mb-2",
@@ -4277,7 +4311,7 @@ function PopoverContent({ children, className }) {
4277
4311
  ] });
4278
4312
  }
4279
4313
  function PopoverCloseButton({ children, className }) {
4280
- const { setIsOpen } = React24.useContext(PopoverContext);
4314
+ const { setIsOpen } = React25.useContext(PopoverContext);
4281
4315
  return /* @__PURE__ */ jsx(
4282
4316
  reactNative.Pressable,
4283
4317
  {
@@ -4289,7 +4323,7 @@ function PopoverCloseButton({ children, className }) {
4289
4323
  }
4290
4324
  );
4291
4325
  }
4292
- var MenuContext = React24.createContext({
4326
+ var MenuContext = React25.createContext({
4293
4327
  isOpen: false,
4294
4328
  setIsOpen: () => {
4295
4329
  },
@@ -4303,7 +4337,7 @@ function Menu({
4303
4337
  children,
4304
4338
  ...props
4305
4339
  }) {
4306
- const [internalIsOpen, setInternalIsOpen] = React24.useState(false);
4340
+ const [internalIsOpen, setInternalIsOpen] = React25.useState(false);
4307
4341
  const isOpen = controlledIsOpen ?? internalIsOpen;
4308
4342
  const setIsOpen = (open) => {
4309
4343
  if (controlledIsOpen === void 0) {
@@ -4315,7 +4349,7 @@ function Menu({
4315
4349
  return /* @__PURE__ */ jsx(MenuContext.Provider, { value: { isOpen, setIsOpen, closeMenu }, children: /* @__PURE__ */ jsx(reactNative.View, { className: cn("relative", className), ...props, children }) });
4316
4350
  }
4317
4351
  function MenuTrigger({ children, className }) {
4318
- const { isOpen, setIsOpen } = React24.useContext(MenuContext);
4352
+ const { isOpen, setIsOpen } = React25.useContext(MenuContext);
4319
4353
  return /* @__PURE__ */ jsx(
4320
4354
  reactNative.Pressable,
4321
4355
  {
@@ -4328,7 +4362,7 @@ function MenuTrigger({ children, className }) {
4328
4362
  );
4329
4363
  }
4330
4364
  function MenuList({ children, className }) {
4331
- const { isOpen, setIsOpen } = React24.useContext(MenuContext);
4365
+ const { isOpen, setIsOpen } = React25.useContext(MenuContext);
4332
4366
  if (!isOpen) return null;
4333
4367
  return /* @__PURE__ */ jsxs(jsxRuntime.Fragment, { children: [
4334
4368
  /* @__PURE__ */ jsx(
@@ -4362,7 +4396,7 @@ function MenuItem({
4362
4396
  className,
4363
4397
  children
4364
4398
  }) {
4365
- const { closeMenu } = React24.useContext(MenuContext);
4399
+ const { closeMenu } = React25.useContext(MenuContext);
4366
4400
  const handlePress = () => {
4367
4401
  if (isDisabled) return;
4368
4402
  onPress?.();
@@ -4406,7 +4440,7 @@ function MenuGroup({ label, children, className }) {
4406
4440
  children
4407
4441
  ] });
4408
4442
  }
4409
- var SelectContext = React24.createContext({
4443
+ var SelectContext = React25.createContext({
4410
4444
  value: null,
4411
4445
  isMulti: false,
4412
4446
  isOpen: false,
@@ -4430,7 +4464,7 @@ function Select({
4430
4464
  className,
4431
4465
  ...props
4432
4466
  }) {
4433
- const [isOpen, setIsOpen] = React24.useState(false);
4467
+ const [isOpen, setIsOpen] = React25.useState(false);
4434
4468
  const selectValue = (val) => {
4435
4469
  if (isMulti) {
4436
4470
  const newValues = values.includes(val) ? values.filter((v) => v !== val) : [...values, val];
@@ -4533,7 +4567,7 @@ function Select({
4533
4567
  ] }) });
4534
4568
  }
4535
4569
  function SelectOption({ option }) {
4536
- const { selectValue, isSelected, isMulti } = React24.useContext(SelectContext);
4570
+ const { selectValue, isSelected, isMulti } = React25.useContext(SelectContext);
4537
4571
  const selected = isSelected(option.value);
4538
4572
  return /* @__PURE__ */ jsxs(
4539
4573
  reactNative.Pressable,
@@ -4564,7 +4598,7 @@ function SelectOption({ option }) {
4564
4598
  }
4565
4599
  );
4566
4600
  }
4567
- var ToolbarButtonContext = React24.createContext({
4601
+ var ToolbarButtonContext = React25.createContext({
4568
4602
  isOpen: false,
4569
4603
  setIsOpen: () => {
4570
4604
  }
@@ -4597,16 +4631,16 @@ function ToolbarButton({
4597
4631
  children,
4598
4632
  ...props
4599
4633
  }) {
4600
- const [isOpen, setIsOpen] = React24.useState(false);
4601
- const [isHovered, setIsHovered] = React24.useState(false);
4602
- const handlePress = React24.useCallback(() => {
4634
+ const [isOpen, setIsOpen] = React25.useState(false);
4635
+ const [isHovered, setIsHovered] = React25.useState(false);
4636
+ const handlePress = React25.useCallback(() => {
4603
4637
  if (isDisabled) return;
4604
4638
  if (menuContent) {
4605
4639
  setIsOpen((prev) => !prev);
4606
4640
  }
4607
4641
  onPress?.();
4608
4642
  }, [isDisabled, menuContent, onPress]);
4609
- const handleClose = React24.useCallback(() => {
4643
+ const handleClose = React25.useCallback(() => {
4610
4644
  setIsOpen(false);
4611
4645
  }, []);
4612
4646
  const selected = isActive === void 0 ? isOpen : isActive;
@@ -4661,7 +4695,7 @@ function ToolbarButton({
4661
4695
  }
4662
4696
  ],
4663
4697
  children: [
4664
- icon && /* @__PURE__ */ jsx(reactNative.View, { className: "w-5 h-5 items-center justify-center", children: React24__default.default.isValidElement(icon) ? React24__default.default.cloneElement(icon, {
4698
+ icon && /* @__PURE__ */ jsx(reactNative.View, { className: "w-5 h-5 items-center justify-center", children: React25__default.default.isValidElement(icon) ? React25__default.default.cloneElement(icon, {
4665
4699
  size: 20,
4666
4700
  width: 20,
4667
4701
  height: 20,
@@ -4750,9 +4784,9 @@ function ToolbarButtonGroup({
4750
4784
  );
4751
4785
  }
4752
4786
  function useToolbarButton() {
4753
- return React24.useContext(ToolbarButtonContext);
4787
+ return React25.useContext(ToolbarButtonContext);
4754
4788
  }
4755
- var RadioGroupContext = React24.createContext(null);
4789
+ var RadioGroupContext = React25.createContext(null);
4756
4790
  var gapStyles2 = {
4757
4791
  sm: "gap-2",
4758
4792
  md: "gap-3",
@@ -4815,7 +4849,7 @@ function Radio({
4815
4849
  children,
4816
4850
  ...props
4817
4851
  }) {
4818
- const context = React24.useContext(RadioGroupContext);
4852
+ const context = React25.useContext(RadioGroupContext);
4819
4853
  if (!context) {
4820
4854
  throw new Error("Radio must be used within a RadioGroup");
4821
4855
  }
@@ -5194,7 +5228,7 @@ function ProgressSteps({
5194
5228
  }) {
5195
5229
  const { dot, connector } = stepSizeStyles[size];
5196
5230
  return /* @__PURE__ */ jsxs(reactNative.View, { className: cn("w-full", className), ...props, children: [
5197
- /* @__PURE__ */ jsx(reactNative.View, { className: "flex-row items-center", children: Array.from({ length: totalSteps }).map((_, index) => /* @__PURE__ */ jsxs(React24__default.default.Fragment, { children: [
5231
+ /* @__PURE__ */ jsx(reactNative.View, { className: "flex-row items-center", children: Array.from({ length: totalSteps }).map((_, index) => /* @__PURE__ */ jsxs(React25__default.default.Fragment, { children: [
5198
5232
  /* @__PURE__ */ jsx(
5199
5233
  reactNative.View,
5200
5234
  {
@@ -5229,7 +5263,7 @@ function ProgressSteps({
5229
5263
  )) })
5230
5264
  ] });
5231
5265
  }
5232
- var ToastContext = React24.createContext(null);
5266
+ var ToastContext = React25.createContext(null);
5233
5267
  var toastIdCounter = 0;
5234
5268
  var positionStyles = {
5235
5269
  "top": "top-4 left-1/2 -translate-x-1/2",
@@ -5245,8 +5279,8 @@ function ToastProvider({
5245
5279
  maxToasts = 5,
5246
5280
  children
5247
5281
  }) {
5248
- const [toasts, setToasts] = React24.useState([]);
5249
- const addToast = React24.useCallback((config) => {
5282
+ const [toasts, setToasts] = React25.useState([]);
5283
+ const addToast = React25.useCallback((config) => {
5250
5284
  const id = `toast-${++toastIdCounter}`;
5251
5285
  const newToast = {
5252
5286
  id,
@@ -5261,10 +5295,10 @@ function ToastProvider({
5261
5295
  });
5262
5296
  return id;
5263
5297
  }, [defaultDuration, maxToasts]);
5264
- const removeToast = React24.useCallback((id) => {
5265
- setToasts((prev) => prev.filter((t17) => t17.id !== id));
5298
+ const removeToast = React25.useCallback((id) => {
5299
+ setToasts((prev) => prev.filter((t16) => t16.id !== id));
5266
5300
  }, []);
5267
- const removeAllToasts = React24.useCallback(() => {
5301
+ const removeAllToasts = React25.useCallback(() => {
5268
5302
  setToasts([]);
5269
5303
  }, []);
5270
5304
  return /* @__PURE__ */ jsxs(ToastContext.Provider, { value: { toasts, addToast, removeToast, removeAllToasts }, children: [
@@ -5293,7 +5327,7 @@ function ToastProvider({
5293
5327
  ] });
5294
5328
  }
5295
5329
  function useToast() {
5296
- const context = React24.useContext(ToastContext);
5330
+ const context = React25.useContext(ToastContext);
5297
5331
  if (!context) {
5298
5332
  throw new Error("useToast must be used within a ToastProvider");
5299
5333
  }
@@ -5337,7 +5371,7 @@ function ToastItem({
5337
5371
  onClose
5338
5372
  }) {
5339
5373
  const { bg, border, icon } = statusStyles[status];
5340
- React24.useEffect(() => {
5374
+ React25.useEffect(() => {
5341
5375
  if (duration > 0) {
5342
5376
  const timer = setTimeout(onClose, duration);
5343
5377
  return () => clearTimeout(timer);
@@ -5439,18 +5473,18 @@ function Autocomplete({
5439
5473
  inputProps,
5440
5474
  ...props
5441
5475
  }) {
5442
- const [inputValue, setInputValue] = React24.useState("");
5443
- const [isOpen, setIsOpen] = React24.useState(false);
5444
- const [highlightedIndex, setHighlightedIndex] = React24.useState(-1);
5445
- const selectedOption = React24.useMemo(
5476
+ const [inputValue, setInputValue] = React25.useState("");
5477
+ const [isOpen, setIsOpen] = React25.useState(false);
5478
+ const [highlightedIndex, setHighlightedIndex] = React25.useState(-1);
5479
+ const selectedOption = React25.useMemo(
5446
5480
  () => options.find((o) => o.value === value),
5447
5481
  [options, value]
5448
5482
  );
5449
- const filteredOptions = React24.useMemo(() => {
5483
+ const filteredOptions = React25.useMemo(() => {
5450
5484
  if (inputValue.length < minChars) return [];
5451
5485
  return options.filter((option) => filterFn(option, inputValue));
5452
5486
  }, [options, inputValue, minChars, filterFn]);
5453
- const handleInputChange = React24.useCallback(
5487
+ const handleInputChange = React25.useCallback(
5454
5488
  (text) => {
5455
5489
  setInputValue(text);
5456
5490
  setIsOpen(true);
@@ -5459,7 +5493,7 @@ function Autocomplete({
5459
5493
  },
5460
5494
  [onInputChange]
5461
5495
  );
5462
- const handleSelectOption = React24.useCallback(
5496
+ const handleSelectOption = React25.useCallback(
5463
5497
  (option) => {
5464
5498
  if (option.isDisabled) return;
5465
5499
  onChange?.(option.value);
@@ -5468,18 +5502,18 @@ function Autocomplete({
5468
5502
  },
5469
5503
  [onChange]
5470
5504
  );
5471
- const handleClear = React24.useCallback(() => {
5505
+ const handleClear = React25.useCallback(() => {
5472
5506
  onChange?.(null);
5473
5507
  setInputValue("");
5474
5508
  setIsOpen(false);
5475
5509
  }, [onChange]);
5476
- const handleFocus = React24.useCallback(() => {
5510
+ const handleFocus = React25.useCallback(() => {
5477
5511
  setIsOpen(true);
5478
5512
  if (selectedOption && !inputValue) {
5479
5513
  setInputValue(selectedOption.label);
5480
5514
  }
5481
5515
  }, [selectedOption, inputValue]);
5482
- const handleBlur = React24.useCallback(() => {
5516
+ const handleBlur = React25.useCallback(() => {
5483
5517
  setTimeout(() => {
5484
5518
  setIsOpen(false);
5485
5519
  if (selectedOption) {
@@ -5653,7 +5687,7 @@ function HelpTip({
5653
5687
  className,
5654
5688
  ...props
5655
5689
  }) {
5656
- const [internalIsOpen, setInternalIsOpen] = React24.useState(false);
5690
+ const [internalIsOpen, setInternalIsOpen] = React25.useState(false);
5657
5691
  const isOpen = controlledIsOpen ?? internalIsOpen;
5658
5692
  const { icon: iconSize, text: textSize } = sizeStyles13[size];
5659
5693
  const handlePress = () => {
@@ -5759,7 +5793,7 @@ function FormField({
5759
5793
  }) {
5760
5794
  const isInvalid = !!errorMessage;
5761
5795
  const isHorizontal = orientation === "horizontal";
5762
- const fieldId = React24__default.default.useId();
5796
+ const fieldId = React25__default.default.useId();
5763
5797
  const helperId = `${fieldId}-helper`;
5764
5798
  const errorId = `${fieldId}-error`;
5765
5799
  return /* @__PURE__ */ jsxs(
@@ -5800,10 +5834,10 @@ function FormField({
5800
5834
  }
5801
5835
  ),
5802
5836
  /* @__PURE__ */ jsxs(reactNative.View, { className: cn(isHorizontal && "flex-1"), children: [
5803
- React24__default.default.Children.map(children, (child) => {
5804
- if (React24__default.default.isValidElement(child)) {
5837
+ React25__default.default.Children.map(children, (child) => {
5838
+ if (React25__default.default.isValidElement(child)) {
5805
5839
  const childProps = child.props;
5806
- return React24__default.default.cloneElement(child, {
5840
+ return React25__default.default.cloneElement(child, {
5807
5841
  accessibilityHint: errorMessage || helperText || childProps.accessibilityHint,
5808
5842
  accessibilityState: {
5809
5843
  ...childProps.accessibilityState,
@@ -6014,32 +6048,37 @@ function IconBox({
6014
6048
  }
6015
6049
  function Surface({
6016
6050
  elevation = 0,
6051
+ level,
6017
6052
  glowColor,
6018
6053
  glowIntensity,
6019
- theme = "dark",
6054
+ theme,
6055
+ rounded,
6020
6056
  className,
6021
6057
  style,
6022
6058
  children,
6023
6059
  ...props
6024
6060
  }) {
6025
- const baseColor = getBaseSurfaceColor(theme);
6026
- const surfaceColor = getElevationSurface(baseColor, elevation, theme);
6027
- const shadowStyle = getElevationShadow(baseColor, elevation, theme);
6061
+ const inherited = useSurface();
6062
+ const mode = theme ?? inherited.mode;
6063
+ const isPlane = level != null;
6064
+ const baseColor = getBaseSurfaceColor(mode);
6065
+ const backgroundColor = isPlane ? surfaceBackground(level, mode) : getElevationSurface(baseColor, elevation, mode);
6066
+ const shadowStyle = isPlane ? {} : getElevationShadow(baseColor, elevation, mode);
6028
6067
  const glowStyle = glowColor ? getGlowShadow(glowColor, glowIntensity) : {};
6029
- return /* @__PURE__ */ jsx(
6068
+ const applyRounded = rounded ?? !isPlane;
6069
+ const value = React25.useMemo(
6070
+ () => ({ mode, level: level ?? inherited.level }),
6071
+ [mode, level, inherited.level]
6072
+ );
6073
+ return /* @__PURE__ */ jsx(SurfaceContext.Provider, { value, children: /* @__PURE__ */ jsx(
6030
6074
  reactNative.View,
6031
6075
  {
6032
- className: cn("rounded-2xl", className),
6033
- style: [
6034
- { backgroundColor: surfaceColor },
6035
- shadowStyle,
6036
- glowStyle,
6037
- style
6038
- ],
6076
+ className: cn(applyRounded && "rounded-2xl", className),
6077
+ style: [{ backgroundColor }, shadowStyle, glowStyle, style],
6039
6078
  ...props,
6040
6079
  children
6041
6080
  }
6042
- );
6081
+ ) });
6043
6082
  }
6044
6083
  function ListItem({ className, children, onPress, ...props }) {
6045
6084
  const Container = onPress ? reactNative.Pressable : reactNative.View;
@@ -6277,7 +6316,7 @@ function Label(props) {
6277
6316
  function Overline(props) {
6278
6317
  return /* @__PURE__ */ jsx(Typography, { variant: "overline", color: "secondary", ...props });
6279
6318
  }
6280
- var SidebarContext = React24.createContext({
6319
+ var SidebarContext = React25.createContext({
6281
6320
  isCollapsed: false
6282
6321
  });
6283
6322
  function Sidebar({
@@ -6321,7 +6360,7 @@ function SidebarFooter({ children, className }) {
6321
6360
  return /* @__PURE__ */ jsx(reactNative.View, { className: cn("px-2 py-4 border-t border-border-subtle", className), children });
6322
6361
  }
6323
6362
  function SidebarSection({ title, children, className }) {
6324
- const { isCollapsed } = React24.useContext(SidebarContext);
6363
+ const { isCollapsed } = React25.useContext(SidebarContext);
6325
6364
  return /* @__PURE__ */ jsxs(reactNative.View, { className: cn("px-2 py-2", className), children: [
6326
6365
  title && !isCollapsed && /* @__PURE__ */ jsx(reactNative.Text, { className: "px-3 py-2 text-xs font-semibold uppercase tracking-wider text-text-tertiary", children: title }),
6327
6366
  /* @__PURE__ */ jsx(reactNative.View, { className: "gap-0.5", children })
@@ -6338,7 +6377,7 @@ function SidebarItem({
6338
6377
  onPress,
6339
6378
  ...props
6340
6379
  }) {
6341
- const { isCollapsed, activeItem, onItemSelect } = React24.useContext(SidebarContext);
6380
+ const { isCollapsed, activeItem, onItemSelect } = React25.useContext(SidebarContext);
6342
6381
  const isActive = activeItem === id;
6343
6382
  const handlePress = (e) => {
6344
6383
  onItemSelect?.(id);
@@ -6390,7 +6429,7 @@ function SidebarItem({
6390
6429
  function SidebarDivider({ className }) {
6391
6430
  return /* @__PURE__ */ jsx(reactNative.View, { className: cn("h-px mx-4 my-2 bg-border-subtle", className) });
6392
6431
  }
6393
- var TableContext = React24.createContext({
6432
+ var TableContext = React25.createContext({
6394
6433
  sortDirection: null,
6395
6434
  selectedRows: /* @__PURE__ */ new Set(),
6396
6435
  selectable: false,
@@ -6472,7 +6511,7 @@ function TableHeaderCell({
6472
6511
  onPress,
6473
6512
  ...props
6474
6513
  }) {
6475
- const { sortColumn, sortDirection, onSort } = React24.useContext(TableContext);
6514
+ const { sortColumn, sortDirection, onSort } = React25.useContext(TableContext);
6476
6515
  const isSorted = sortKey && sortColumn === sortKey;
6477
6516
  const isSortable = !!sortKey && !!onSort;
6478
6517
  const ariaSort = isSorted ? sortDirection === "asc" ? "ascending" : sortDirection === "desc" ? "descending" : "none" : "none";
@@ -6660,11 +6699,11 @@ function useTable({
6660
6699
  defaultSortColumn,
6661
6700
  defaultSortDirection = null
6662
6701
  }) {
6663
- const [page, setPage] = React24.useState(0);
6664
- const [pageSize, setPageSize] = React24.useState(defaultPageSize);
6665
- const [sortColumn, setSortColumn] = React24.useState(defaultSortColumn);
6666
- const [sortDirection, setSortDirection] = React24.useState(defaultSortDirection);
6667
- const sortedData = React24.useMemo(() => {
6702
+ const [page, setPage] = React25.useState(0);
6703
+ const [pageSize, setPageSize] = React25.useState(defaultPageSize);
6704
+ const [sortColumn, setSortColumn] = React25.useState(defaultSortColumn);
6705
+ const [sortDirection, setSortDirection] = React25.useState(defaultSortDirection);
6706
+ const sortedData = React25.useMemo(() => {
6668
6707
  if (!sortColumn || !sortDirection) return data;
6669
6708
  return [...data].sort((a, b) => {
6670
6709
  const aVal = a[sortColumn];
@@ -6676,7 +6715,7 @@ function useTable({
6676
6715
  return sortDirection === "asc" ? comparison : -comparison;
6677
6716
  });
6678
6717
  }, [data, sortColumn, sortDirection]);
6679
- const paginatedData = React24.useMemo(() => {
6718
+ const paginatedData = React25.useMemo(() => {
6680
6719
  const start = page * pageSize;
6681
6720
  return sortedData.slice(start, start + pageSize);
6682
6721
  }, [sortedData, page, pageSize]);
@@ -6745,7 +6784,7 @@ function EmptyState({
6745
6784
  }
6746
6785
  );
6747
6786
  }
6748
- var StepperContext = React24.createContext({
6787
+ var StepperContext = React25.createContext({
6749
6788
  activeStep: 0,
6750
6789
  orientation: "horizontal"
6751
6790
  });
@@ -6764,11 +6803,11 @@ function Stepper({
6764
6803
  className
6765
6804
  ),
6766
6805
  ...props,
6767
- children: React24__default.default.Children.map(children, (child, index) => {
6768
- if (React24__default.default.isValidElement(child)) {
6806
+ children: React25__default.default.Children.map(children, (child, index) => {
6807
+ if (React25__default.default.isValidElement(child)) {
6769
6808
  return /* @__PURE__ */ jsxs(jsxRuntime.Fragment, { children: [
6770
- React24__default.default.cloneElement(child, { index }),
6771
- index < React24__default.default.Children.count(children) - 1 && /* @__PURE__ */ jsx(StepConnector, { index })
6809
+ React25__default.default.cloneElement(child, { index }),
6810
+ index < React25__default.default.Children.count(children) - 1 && /* @__PURE__ */ jsx(StepConnector, { index })
6772
6811
  ] });
6773
6812
  }
6774
6813
  return child;
@@ -6777,7 +6816,7 @@ function Stepper({
6777
6816
  ) });
6778
6817
  }
6779
6818
  function StepConnector({ index }) {
6780
- const { activeStep, orientation } = React24.useContext(StepperContext);
6819
+ const { activeStep, orientation } = React25.useContext(StepperContext);
6781
6820
  const isCompleted = index < activeStep;
6782
6821
  if (orientation === "horizontal") {
6783
6822
  return /* @__PURE__ */ jsx(
@@ -6801,7 +6840,7 @@ function StepConnector({ index }) {
6801
6840
  );
6802
6841
  }
6803
6842
  function Step({ index = 0, status, className, children }) {
6804
- const { activeStep, orientation } = React24.useContext(StepperContext);
6843
+ const { activeStep, orientation } = React25.useContext(StepperContext);
6805
6844
  const derivedStatus = status || (index < activeStep ? "completed" : index === activeStep ? "active" : "upcoming");
6806
6845
  return /* @__PURE__ */ jsx(
6807
6846
  reactNative.View,
@@ -6810,9 +6849,9 @@ function Step({ index = 0, status, className, children }) {
6810
6849
  orientation === "horizontal" ? "items-center" : "flex-row items-start",
6811
6850
  className
6812
6851
  ),
6813
- children: React24__default.default.Children.map(children, (child) => {
6814
- if (React24__default.default.isValidElement(child)) {
6815
- return React24__default.default.cloneElement(child, {
6852
+ children: React25__default.default.Children.map(children, (child) => {
6853
+ if (React25__default.default.isValidElement(child)) {
6854
+ return React25__default.default.cloneElement(child, {
6816
6855
  status: derivedStatus,
6817
6856
  index
6818
6857
  });
@@ -6856,7 +6895,7 @@ function StepIndicator({
6856
6895
  );
6857
6896
  }
6858
6897
  function StepLabel({ status = "upcoming", className, children }) {
6859
- const { orientation } = React24.useContext(StepperContext);
6898
+ const { orientation } = React25.useContext(StepperContext);
6860
6899
  return /* @__PURE__ */ jsx(
6861
6900
  reactNative.Text,
6862
6901
  {
@@ -7015,8 +7054,8 @@ function DateTime({
7015
7054
  className,
7016
7055
  ...props
7017
7056
  }) {
7018
- const [now, setNow] = React24.useState(() => Date.now());
7019
- React24.useEffect(() => {
7057
+ const [now, setNow] = React25.useState(() => Date.now());
7058
+ React25.useEffect(() => {
7020
7059
  if (!live) return;
7021
7060
  const id = setInterval(() => setNow(Date.now()), refreshMs);
7022
7061
  return () => clearInterval(id);
@@ -7050,8 +7089,8 @@ function useTimer(options = {}) {
7050
7089
  tickMs = 1e3
7051
7090
  } = options;
7052
7091
  const isControlled = controlledElapsedMs != null;
7053
- const [internalElapsedMs, setInternalElapsedMs] = React24.useState(0);
7054
- React24.useEffect(() => {
7092
+ const [internalElapsedMs, setInternalElapsedMs] = React25.useState(0);
7093
+ React25.useEffect(() => {
7055
7094
  if (isControlled || !autoTick || !running) return;
7056
7095
  const id = setInterval(() => {
7057
7096
  setInternalElapsedMs((prev) => prev + tickMs);
@@ -7210,8 +7249,8 @@ function MetricGroup({
7210
7249
  children,
7211
7250
  ...props
7212
7251
  }) {
7213
- const items = React24__default.default.Children.toArray(children);
7214
- return /* @__PURE__ */ jsx(reactNative.View, { className: cn("flex-row items-center", className), ...props, children: items.map((child, i) => /* @__PURE__ */ jsxs(React24__default.default.Fragment, { children: [
7252
+ const items = React25__default.default.Children.toArray(children);
7253
+ return /* @__PURE__ */ jsx(reactNative.View, { className: cn("flex-row items-center", className), ...props, children: items.map((child, i) => /* @__PURE__ */ jsxs(React25__default.default.Fragment, { children: [
7215
7254
  /* @__PURE__ */ jsx(reactNative.View, { className: "flex-1 items-center", children: child }),
7216
7255
  i < items.length - 1 && /* @__PURE__ */ jsx(
7217
7256
  reactNative.View,
@@ -7243,7 +7282,7 @@ function BaseBadge({
7243
7282
  children,
7244
7283
  ...props
7245
7284
  }) {
7246
- const [scaleAnim] = React24.useState(() => new reactNative.Animated.Value(1));
7285
+ const [scaleAnim] = React25.useState(() => new reactNative.Animated.Value(1));
7247
7286
  const config = baseBadgeSizeConfig[size];
7248
7287
  const colors = variantColors[variant];
7249
7288
  const handlePressIn = () => {
@@ -7402,9 +7441,9 @@ function PrBadge({
7402
7441
  ...props
7403
7442
  }) {
7404
7443
  const resolvedLabel = labelProp ?? typeLabels[type];
7405
- const [scale] = React24.useState(() => new reactNative.Animated.Value(animate ? 0.8 : 1));
7406
- const [opacity] = React24.useState(() => new reactNative.Animated.Value(animate ? 0 : 1));
7407
- React24.useEffect(() => {
7444
+ const [scale] = React25.useState(() => new reactNative.Animated.Value(animate ? 0.8 : 1));
7445
+ const [opacity] = React25.useState(() => new reactNative.Animated.Value(animate ? 0 : 1));
7446
+ React25.useEffect(() => {
7408
7447
  if (!animate) return;
7409
7448
  reactNative.Animated.parallel([
7410
7449
  reactNative.Animated.timing(scale, {
@@ -7975,7 +8014,7 @@ function TempoDisplay({
7975
8014
  className,
7976
8015
  ...props
7977
8016
  }) {
7978
- const [showTooltip, setShowTooltip] = React24.useState(false);
8017
+ const [showTooltip, setShowTooltip] = React25.useState(false);
7979
8018
  const [eccentric, pauseBottom, concentric, pauseTop] = roundTempo(tempo);
7980
8019
  const isSm = size === "sm";
7981
8020
  const fontSize = fontSizeProp ?? (isSm ? 9 : 11);
@@ -7983,7 +8022,7 @@ function TempoDisplay({
7983
8022
  const chromePadY = Math.round(fontSize * 0.3);
7984
8023
  const chromeRadius = Math.round(fontSize * 0.4);
7985
8024
  const labelFont = Math.max(9, Math.round(fontSize * 0.5));
7986
- const handlePress = React24.useCallback(() => {
8025
+ const handlePress = React25.useCallback(() => {
7987
8026
  if (onPress) {
7988
8027
  onPress();
7989
8028
  }
@@ -8250,8 +8289,8 @@ function IntensityBar({
8250
8289
  const pct2 = Math.round(Math.max(0, level) * 100);
8251
8290
  const zone = zoneForPct(pct2);
8252
8291
  const atTarget = isAtTarget(pct2, threshold);
8253
- const [fillAnim] = React24.useState(() => new reactNative.Animated.Value(fillLevel));
8254
- React24.useEffect(() => {
8292
+ const [fillAnim] = React25.useState(() => new reactNative.Animated.Value(fillLevel));
8293
+ React25.useEffect(() => {
8255
8294
  const animation = reactNative.Animated.timing(fillAnim, {
8256
8295
  toValue: fillLevel,
8257
8296
  duration: 250,
@@ -8405,8 +8444,8 @@ var textColors = {
8405
8444
  deload: WORKOUT_PILL_DELOAD
8406
8445
  };
8407
8446
  function usePulse(enabled) {
8408
- const [opacity] = React24.useState(() => new reactNative.Animated.Value(1));
8409
- React24.useEffect(() => {
8447
+ const [opacity] = React25.useState(() => new reactNative.Animated.Value(1));
8448
+ React25.useEffect(() => {
8410
8449
  if (!enabled) {
8411
8450
  opacity.setValue(1);
8412
8451
  return;
@@ -8536,8 +8575,8 @@ var PULSE_HALF_MS = 950;
8536
8575
  var PULSE_MIN_OPACITY = 0.45;
8537
8576
  var SEGMENTED_BAR_GAP = 5;
8538
8577
  function usePulse2(active) {
8539
- const [value] = React24.useState(() => new reactNative.Animated.Value(0));
8540
- React24.useEffect(() => {
8578
+ const [value] = React25.useState(() => new reactNative.Animated.Value(0));
8579
+ React25.useEffect(() => {
8541
8580
  if (!active) return;
8542
8581
  const loop = reactNative.Animated.loop(
8543
8582
  reactNative.Animated.sequence([
@@ -8962,8 +9001,8 @@ function getReducedMotionPreference() {
8962
9001
  return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
8963
9002
  }
8964
9003
  function usePrefersReducedMotion() {
8965
- const [reduced, setReduced] = React24.useState(getReducedMotionPreference);
8966
- React24.useEffect(() => {
9004
+ const [reduced, setReduced] = React25.useState(getReducedMotionPreference);
9005
+ React25.useEffect(() => {
8967
9006
  if (typeof window === "undefined" || typeof window.matchMedia !== "function") return;
8968
9007
  const mq = window.matchMedia("(prefers-reduced-motion: reduce)");
8969
9008
  const handler = () => setReduced(mq.matches);
@@ -8978,8 +9017,8 @@ var ANIMATION_EASING = reactNative.Easing.bezier(0.22, 1, 0.36, 1);
8978
9017
  var POP_EASING = reactNative.Easing.bezier(0.34, 1.56, 0.64, 1);
8979
9018
  function useLiveRepPop(active, liveRepIndex, liveVelocity, isNewPeak) {
8980
9019
  const prefersReducedMotion = usePrefersReducedMotion();
8981
- const [liveScale] = React24.useState(() => new reactNative.Animated.Value(1));
8982
- React24.useEffect(() => {
9020
+ const [liveScale] = React25.useState(() => new reactNative.Animated.Value(1));
9021
+ React25.useEffect(() => {
8983
9022
  if (!active || liveRepIndex == null || liveVelocity == null) return;
8984
9023
  if (prefersReducedMotion) {
8985
9024
  liveScale.setValue(1);
@@ -9027,7 +9066,7 @@ function HeroVelocityChart({
9027
9066
  }) {
9028
9067
  const liveVelocity = liveRepIndex != null ? doneVelocities[liveRepIndex] : void 0;
9029
9068
  const liveScale = useLiveRepPop(true, liveRepIndex, liveVelocity, isNewPeak);
9030
- const [plotW, setPlotW] = React24.useState(0);
9069
+ const [plotW, setPlotW] = React25.useState(0);
9031
9070
  const onPlotLayout = (e) => setPlotW(e.nativeEvent.layout.width);
9032
9071
  const plotHeight = Math.max(0, height - HERO_LABEL_HEADROOM);
9033
9072
  const barHeight = (velocity) => scaleDenom > 0 ? Math.max(HERO_MIN_BAR_HEIGHT, Math.min(1, velocity / scaleDenom) * plotHeight) : HERO_MIN_BAR_HEIGHT;
@@ -9201,9 +9240,9 @@ function VelocityStrip({
9201
9240
  return SET_STRIP_VARIABLE_COLOR;
9202
9241
  };
9203
9242
  const meanZone = hasZones ? classifyBand(meanVelocity, zones)?.label ?? "" : getVelocityZoneName(meanVelocity);
9204
- const [heightAnim] = React24.useState(() => new reactNative.Animated.Value(expanded ? height : 3));
9205
- const [labelOpacity] = React24.useState(() => new reactNative.Animated.Value(expanded ? 1 : 0));
9206
- const [infoOpacity] = React24.useState(() => new reactNative.Animated.Value(expanded ? 1 : 0));
9243
+ const [heightAnim] = React25.useState(() => new reactNative.Animated.Value(expanded ? height : 3));
9244
+ const [labelOpacity] = React25.useState(() => new reactNative.Animated.Value(expanded ? 1 : 0));
9245
+ const [infoOpacity] = React25.useState(() => new reactNative.Animated.Value(expanded ? 1 : 0));
9207
9246
  const liveVelocity = liveRepIndex != null ? doneVelocities[liveRepIndex] : void 0;
9208
9247
  const isNewPeak = liveVelocity != null && maxVelocity > 0 && liveVelocity === maxVelocity;
9209
9248
  const liveScale = useLiveRepPop(
@@ -9212,7 +9251,7 @@ function VelocityStrip({
9212
9251
  liveVelocity,
9213
9252
  isNewPeak
9214
9253
  );
9215
- React24.useEffect(() => {
9254
+ React25.useEffect(() => {
9216
9255
  if (variant !== "expanded" || !framed) return;
9217
9256
  reactNative.Animated.parallel([
9218
9257
  reactNative.Animated.timing(heightAnim, {
@@ -10359,7 +10398,7 @@ function compactUntil(ms) {
10359
10398
  return `${Math.round(d / 7)}w`;
10360
10399
  }
10361
10400
  function ScheduleTiles({ when, now, gap = 1, ...props }) {
10362
- const [mountNow] = React24.useState(() => Date.now());
10401
+ const [mountNow] = React25.useState(() => Date.now());
10363
10402
  const reference = now ?? mountNow;
10364
10403
  const whenMs = when instanceof Date ? when.getTime() : when;
10365
10404
  const soon = whenMs - reference < DAY_MS;
@@ -10621,7 +10660,7 @@ function CollapsedCard({
10621
10660
  totalPlannedSets,
10622
10661
  supersetPosition
10623
10662
  }) {
10624
- const [pressed, setPressed] = React24.useState(false);
10663
+ const [pressed, setPressed] = React25.useState(false);
10625
10664
  const completedSets = setVelocities?.length ?? 0;
10626
10665
  const remaining = Math.max(0, (totalPlannedSets ?? 0) - completedSets);
10627
10666
  const borderRadius = getSupersetBorderRadius(supersetPosition);
@@ -10853,7 +10892,7 @@ function ExerciseCard({
10853
10892
  onExpandedChange,
10854
10893
  ...rest
10855
10894
  }) {
10856
- const [internalExpanded, setInternalExpanded] = React24.useState(defaultExpanded ?? false);
10895
+ const [internalExpanded, setInternalExpanded] = React25.useState(defaultExpanded ?? false);
10857
10896
  const isControlled = expanded !== void 0;
10858
10897
  const isExpanded = isControlled ? expanded : internalExpanded;
10859
10898
  const onToggle = () => {
@@ -10864,8 +10903,6 @@ function ExerciseCard({
10864
10903
  if (upcoming) return /* @__PURE__ */ jsx(UpcomingCard, { ...rest, onToggle });
10865
10904
  return isExpanded ? /* @__PURE__ */ jsx(ExpandedCard, { ...rest, onToggle }) : /* @__PURE__ */ jsx(CollapsedCard, { ...rest, onToggle });
10866
10905
  }
10867
- var t9 = getSemanticColors("dark");
10868
- var HEADER_BG = t9["background-base"];
10869
10906
  var BAR_HEIGHT = 9;
10870
10907
  var BAR_GAP = 3;
10871
10908
  function SessionHeader({
@@ -10883,17 +10920,18 @@ function SessionHeader({
10883
10920
  }) {
10884
10921
  const upcoming = next != null;
10885
10922
  const totalSets = plan.reduce((sum, e) => sum + e.sets, 0);
10923
+ const onSurface = onSurfaceColors(useSurfaceMode());
10886
10924
  const hasPace = !upcoming && budgetMs != null && elapsedMs != null;
10887
10925
  const target = hasPace ? elapsedMs / budgetMs : void 0;
10888
10926
  const setsLabel = upcoming ? `${totalSets} sets` : `${Math.floor(setsDone)}/${totalSets} sets`;
10889
- const setsLabelColor = upcoming ? t9["text-secondary"] : paceToneColor(paceTone(totalSets > 0 ? setsDone / totalSets : 0, target));
10927
+ const setsLabelColor = upcoming ? onSurface.secondary : paceToneColor(paceTone(totalSets > 0 ? setsDone / totalSets : 0, target));
10890
10928
  return /* @__PURE__ */ jsxs(
10891
- reactNative.View,
10929
+ Surface,
10892
10930
  {
10931
+ level: "background",
10893
10932
  className,
10894
10933
  style: [
10895
10934
  {
10896
- backgroundColor: HEADER_BG,
10897
10935
  paddingTop: 11,
10898
10936
  paddingRight: 12,
10899
10937
  paddingBottom: 12,
@@ -10914,7 +10952,7 @@ function SessionHeader({
10914
10952
  lineHeight: 18,
10915
10953
  fontWeight: "700",
10916
10954
  fontFamily: '"Space Grotesk", sans-serif',
10917
- color: t9["text-primary"],
10955
+ color: onSurface.primary,
10918
10956
  marginBottom: 10
10919
10957
  },
10920
10958
  testID: "session-rail-title",
@@ -10970,7 +11008,6 @@ function SessionHeader({
10970
11008
  }
10971
11009
  );
10972
11010
  }
10973
- var INSET = primitiveColors.charcoal[600];
10974
11011
  var DIVIDER = primitiveColors.charcoal[300];
10975
11012
  var DEFAULT_WIDTH = 246;
10976
11013
  function SessionRail({
@@ -10990,10 +11027,11 @@ function SessionRail({
10990
11027
  ...props
10991
11028
  }) {
10992
11029
  return /* @__PURE__ */ jsxs(
10993
- reactNative.View,
11030
+ Surface,
10994
11031
  {
11032
+ level: "elevated",
10995
11033
  className,
10996
- style: [{ width, flexDirection: "column", backgroundColor: INSET }, style],
11034
+ style: [{ width, flexDirection: "column" }, style],
10997
11035
  testID: "session-rail",
10998
11036
  ...props,
10999
11037
  children: [
@@ -11011,9 +11049,10 @@ function SessionRail({
11011
11049
  }
11012
11050
  ),
11013
11051
  /* @__PURE__ */ jsx(
11014
- reactNative.View,
11052
+ Surface,
11015
11053
  {
11016
- style: [{ flex: 1, backgroundColor: INSET }, neumorphicShadows.charcoal.pressed.subtle],
11054
+ level: "elevated",
11055
+ style: [{ flex: 1 }, neumorphicShadows.charcoal.pressed.subtle],
11017
11056
  testID: "session-rail-list",
11018
11057
  children: exercises.map((ex, i) => /* @__PURE__ */ jsx(
11019
11058
  reactNative.View,
@@ -11112,7 +11151,7 @@ function clampProgress(currentWeek, weekCount) {
11112
11151
  return Math.max(0, Math.min(1, ratio));
11113
11152
  }
11114
11153
  function MesoSegment({ meso, isActive, onPress }) {
11115
- const [pressScale] = React24.useState(() => new reactNative.Animated.Value(1));
11154
+ const [pressScale] = React25.useState(() => new reactNative.Animated.Value(1));
11116
11155
  const handlePressIn = () => {
11117
11156
  reactNative.Animated.timing(pressScale, {
11118
11157
  toValue: 0.98,
@@ -11309,10 +11348,10 @@ function WeekRow({
11309
11348
  }
11310
11349
  );
11311
11350
  }
11312
- var t10 = getSemanticColors("dark");
11351
+ var t9 = getSemanticColors("dark");
11313
11352
  var COLORS = {
11314
- statusSuccess: t10["status-success"],
11315
- brandPrimary: t10["brand-primary"],
11353
+ statusSuccess: t9["status-success"],
11354
+ brandPrimary: t9["brand-primary"],
11316
11355
  borderDefault: "#1F1F1F",
11317
11356
  brandPrimarySubtle: "rgba(255,121,0,0.06)"
11318
11357
  };
@@ -11480,8 +11519,8 @@ function MesoCard({
11480
11519
  ...props
11481
11520
  }) {
11482
11521
  const isExpandable = onToggle != null;
11483
- const [highlight] = React24.useState(() => new reactNative.Animated.Value(highlighted ? 1 : 0));
11484
- React24.useEffect(() => {
11522
+ const [highlight] = React25.useState(() => new reactNative.Animated.Value(highlighted ? 1 : 0));
11523
+ React25.useEffect(() => {
11485
11524
  const animation = reactNative.Animated.timing(highlight, {
11486
11525
  toValue: highlighted ? 1 : 0,
11487
11526
  duration: 250,
@@ -11796,12 +11835,12 @@ function PrHistoryModal({
11796
11835
  }
11797
11836
  );
11798
11837
  }
11799
- var t11 = getSemanticColors("dark");
11800
- var BRAND_PRIMARY9 = t11["brand-primary"];
11838
+ var t10 = getSemanticColors("dark");
11839
+ var BRAND_PRIMARY9 = t10["brand-primary"];
11801
11840
  var BRAND_PRIMARY_SUBTLE = "rgba(255,121,0,0.12)";
11802
- var STATUS_SUCCESS2 = t11["status-success"];
11803
- var STATUS_WARNING2 = t11["status-warning"];
11804
- var STATUS_ERROR2 = t11["status-error"];
11841
+ var STATUS_SUCCESS2 = t10["status-success"];
11842
+ var STATUS_WARNING2 = t10["status-warning"];
11843
+ var STATUS_ERROR2 = t10["status-error"];
11805
11844
  var EMOJI_SETS = {
11806
11845
  sleep: ["\u{1F634}", "\u{1F610}", "\u{1F642}", "\u{1F60A}", "\u{1F929}"],
11807
11846
  soreness: ["\u{1F635}", "\u{1F623}", "\u{1F610}", "\u{1F642}", "\u{1F4AA}"],
@@ -11991,13 +12030,13 @@ function ReadinessCheck({
11991
12030
  )
11992
12031
  ] }) });
11993
12032
  }
11994
- var t12 = getSemanticColors("dark");
11995
- var BRAND_PRIMARY10 = t12["brand-primary"];
12033
+ var t11 = getSemanticColors("dark");
12034
+ var BRAND_PRIMARY10 = t11["brand-primary"];
11996
12035
  var BRAND_PRIMARY_DARK2 = MESO_ACCENT_GRADIENT_DARK;
11997
12036
  var BRAND_PRIMARY_LIGHT2 = MESO_ACCENT_GRADIENT_LIGHT;
11998
- var SUCCESS = t12["status-success"];
11999
- var WARNING = t12["status-warning"];
12000
- var ERROR = t12["status-error"];
12037
+ var SUCCESS = t11["status-success"];
12038
+ var WARNING = t11["status-warning"];
12039
+ var ERROR = t11["status-error"];
12001
12040
  var ACCENT_STOPS2 = [BRAND_PRIMARY_DARK2, BRAND_PRIMARY10, BRAND_PRIMARY_LIGHT2];
12002
12041
  var CARD_GRADIENT = `linear-gradient(135deg, ${resolveColor("surface-elevated")} 0%, ${resolveColor("surface-raised")} 100%)`;
12003
12042
  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%)";
@@ -12031,7 +12070,7 @@ function renderCoachingText(text, highlights) {
12031
12070
  children: part
12032
12071
  },
12033
12072
  `${part}-${index}`
12034
- ) : /* @__PURE__ */ jsx(React24.Fragment, { children: part }, `t-${index}`)
12073
+ ) : /* @__PURE__ */ jsx(React25.Fragment, { children: part }, `t-${index}`)
12035
12074
  );
12036
12075
  }
12037
12076
  function StatusPill({ badge }) {
@@ -12368,8 +12407,8 @@ var ERROR_PILL_BORDER = "rgba(209,67,67,0.20)";
12368
12407
  var PLOT_LEFT = 26;
12369
12408
  var TOOLTIP_WIDTH = 124;
12370
12409
  function timeOf(dateStr) {
12371
- const t17 = Date.parse(dateStr);
12372
- return Number.isNaN(t17) ? 0 : t17;
12410
+ const t16 = Date.parse(dateStr);
12411
+ return Number.isNaN(t16) ? 0 : t16;
12373
12412
  }
12374
12413
  function formatValue(value) {
12375
12414
  return `${Math.round(value)}`;
@@ -12497,17 +12536,17 @@ function StrengthTrendChart({
12497
12536
  className,
12498
12537
  ...props
12499
12538
  }) {
12500
- const geometry = React24.useMemo(
12539
+ const geometry = React25.useMemo(
12501
12540
  () => buildGeometry(data, projection, mesoBoundaries, width, height),
12502
12541
  [data, projection, mesoBoundaries, width, height]
12503
12542
  );
12504
- const trend = React24.useMemo(
12543
+ const trend = React25.useMemo(
12505
12544
  () => computeTrend(data, mesoBoundaries),
12506
12545
  [data, mesoBoundaries]
12507
12546
  );
12508
- const [reveal] = React24.useState(() => new reactNative.Animated.Value(animateOnMount ? 0 : 1));
12509
- const [selected, setSelected] = React24.useState(null);
12510
- React24.useEffect(() => {
12547
+ const [reveal] = React25.useState(() => new reactNative.Animated.Value(animateOnMount ? 0 : 1));
12548
+ const [selected, setSelected] = React25.useState(null);
12549
+ React25.useEffect(() => {
12511
12550
  if (!animateOnMount) return;
12512
12551
  const animation = reactNative.Animated.timing(reveal, {
12513
12552
  toValue: 1,
@@ -12858,10 +12897,10 @@ function StrengthTrendChart({
12858
12897
  }
12859
12898
  );
12860
12899
  }
12861
- var t13 = getSemanticColors("dark");
12862
- var STATUS_SUCCESS4 = t13["status-success"];
12863
- var STATUS_WARNING4 = t13["status-warning"];
12864
- var STATUS_INFO = t13["status-info"];
12900
+ var t12 = getSemanticColors("dark");
12901
+ var STATUS_SUCCESS4 = t12["status-success"];
12902
+ var STATUS_WARNING4 = t12["status-warning"];
12903
+ var STATUS_INFO = t12["status-info"];
12865
12904
  var DOT_BORDER = "#F3F4F6";
12866
12905
  var BAND_FILL = "rgba(46,213,115,0.1)";
12867
12906
  var BAND_EDGE = "rgba(46,213,115,0.45)";
@@ -12904,8 +12943,8 @@ function interpEdge(pixels, x, key) {
12904
12943
  const a = pixels[i];
12905
12944
  const b = pixels[i + 1];
12906
12945
  if (x >= a.x && x <= b.x) {
12907
- const t17 = b.x === a.x ? 0 : (x - a.x) / (b.x - a.x);
12908
- return a[key] + t17 * (b[key] - a[key]);
12946
+ const t16 = b.x === a.x ? 0 : (x - a.x) / (b.x - a.x);
12947
+ return a[key] + t16 * (b[key] - a[key]);
12909
12948
  }
12910
12949
  }
12911
12950
  return pixels[pixels.length - 1][key];
@@ -12961,12 +13000,12 @@ function CapacityBandChart({
12961
13000
  className,
12962
13001
  ...props
12963
13002
  }) {
12964
- const [reveal] = React24.useState(() => new reactNative.Animated.Value(0));
12965
- const dotAnims = React24.useMemo(
13003
+ const [reveal] = React25.useState(() => new reactNative.Animated.Value(0));
13004
+ const dotAnims = React25.useMemo(
12966
13005
  () => Array.from({ length: workouts.length }, () => new reactNative.Animated.Value(0)),
12967
13006
  [workouts.length]
12968
13007
  );
12969
- React24.useEffect(() => {
13008
+ React25.useEffect(() => {
12970
13009
  reveal.setValue(0);
12971
13010
  dotAnims.forEach((a) => a.setValue(0));
12972
13011
  const draw = reactNative.Animated.timing(reveal, {
@@ -12989,7 +13028,7 @@ function CapacityBandChart({
12989
13028
  }, [reveal, dotAnims, band.length, workouts.length]);
12990
13029
  const plotWidth = width - PADDING_LEFT - PADDING_RIGHT;
12991
13030
  const plotHeight = height - PADDING_TOP - PADDING_BOTTOM;
12992
- const scale = React24.useMemo(() => {
13031
+ const scale = React25.useMemo(() => {
12993
13032
  const times = band.map((p) => parseTime(p.date));
12994
13033
  projection?.withTraining.forEach((p) => times.push(parseTime(p.date)));
12995
13034
  projection?.withRest.forEach((p) => times.push(parseTime(p.date)));
@@ -13235,13 +13274,13 @@ function CapacityBandChart({
13235
13274
  }
13236
13275
  );
13237
13276
  }
13238
- var t14 = getSemanticColors("dark");
13277
+ var t13 = getSemanticColors("dark");
13239
13278
  function glowShadow(color) {
13240
13279
  return `0 0 5px 1px ${alpha(color, 0.3)}, 0 0 10px 3px ${alpha(color, 0.12)}`;
13241
13280
  }
13242
13281
  var DEFAULT_TRACK_COLOR = primitiveColors.charcoal[200];
13243
13282
  var DEFAULT_MARKER_COLOR2 = primitiveColors.white;
13244
- var TICK_COLOR = t14["text-tertiary"];
13283
+ var TICK_COLOR = t13["text-tertiary"];
13245
13284
  var ZONE_SIZES = {
13246
13285
  default: {
13247
13286
  trackHeight: 14,
@@ -13298,7 +13337,7 @@ function ZoneTrack({
13298
13337
  const s = ZONE_SIZES[size];
13299
13338
  const trackHeight = trackHeightProp ?? s.trackHeight;
13300
13339
  const needleOverhang = needleOverhangProp ?? s.needleOverhang;
13301
- const [trackW, setTrackW] = React24.useState(0);
13340
+ const [trackW, setTrackW] = React25.useState(0);
13302
13341
  const onTrackLayout = (e) => setTrackW(e.nativeEvent.layout.width);
13303
13342
  const tickCount = ticks?.length ?? 0;
13304
13343
  const tickSpacing = trackW > 0 && tickCount > 0 ? trackW / tickCount : Infinity;
@@ -13424,7 +13463,7 @@ function ZoneTrack({
13424
13463
  ),
13425
13464
  ticks?.map((tick, i) => {
13426
13465
  const emphasized = tick.emphasized === true;
13427
- const lineColor = tick.color ?? (emphasized ? t14["brand-primary"] : TICK_COLOR);
13466
+ const lineColor = tick.color ?? (emphasized ? t13["brand-primary"] : TICK_COLOR);
13428
13467
  const lineWidth = emphasized ? s.tickLineEmphasized : s.tickLineNormal;
13429
13468
  return /* @__PURE__ */ jsx(
13430
13469
  reactNative.View,
@@ -13455,7 +13494,7 @@ function ZoneTrack({
13455
13494
  if (tick.label == null) return null;
13456
13495
  const emphasized = tick.emphasized === true;
13457
13496
  if (!showTickLabel(i, emphasized)) return null;
13458
- const labelColor = tick.color ?? (emphasized ? t14["brand-primary"] : TICK_COLOR);
13497
+ const labelColor = tick.color ?? (emphasized ? t13["brand-primary"] : TICK_COLOR);
13459
13498
  const labelNode = /* @__PURE__ */ jsx(
13460
13499
  reactNative.Text,
13461
13500
  {
@@ -13641,7 +13680,7 @@ function VolumeLandmarkBar({
13641
13680
  }
13642
13681
  );
13643
13682
  }
13644
- var t15 = getSemanticColors("dark");
13683
+ var t14 = getSemanticColors("dark");
13645
13684
  var statusToken = {
13646
13685
  productive: "status-success",
13647
13686
  threshold: "status-warning",
@@ -13658,7 +13697,7 @@ var defaultLabel = {
13658
13697
  stop: "Stop"
13659
13698
  };
13660
13699
  function statusPillColor(status) {
13661
- return t15[statusToken[status]];
13700
+ return t14[statusToken[status]];
13662
13701
  }
13663
13702
  function StatusPill2({ status, label, className, style, ...props }) {
13664
13703
  const color = statusPillColor(status);
@@ -13691,7 +13730,7 @@ function StatusPill2({ status, label, className, style, ...props }) {
13691
13730
  }
13692
13731
  );
13693
13732
  }
13694
- var t16 = getSemanticColors("dark");
13733
+ var t15 = getSemanticColors("dark");
13695
13734
  var categoryToken = {
13696
13735
  productive: null,
13697
13736
  threshold: "status-warning",
@@ -13704,7 +13743,7 @@ var floodOpacity = {
13704
13743
  };
13705
13744
  function liveAuraColor(category) {
13706
13745
  const token = categoryToken[category];
13707
- return token ? t16[token] : null;
13746
+ return token ? t15[token] : null;
13708
13747
  }
13709
13748
  function LiveAuraFrame({
13710
13749
  category,
@@ -13733,9 +13772,9 @@ function LiveAuraFrame({
13733
13772
  position: "relative",
13734
13773
  overflow: "hidden",
13735
13774
  borderRadius: 10,
13736
- backgroundColor: t16["background-base"],
13775
+ backgroundColor: t15["background-base"],
13737
13776
  borderWidth: 1,
13738
- borderColor: t16["border-default"]
13777
+ borderColor: t15["border-default"]
13739
13778
  },
13740
13779
  style
13741
13780
  ],
@@ -13962,28 +14001,28 @@ function Scatter({
13962
14001
  testID: "scatter-canvas",
13963
14002
  style: { position: "absolute", top: 0, left: 0, width, height, overflow: "hidden" },
13964
14003
  children: [
13965
- ticksOf(yd, TICK_COUNT).map((t17, i) => {
13966
- const y = toY(t17);
14004
+ ticksOf(yd, TICK_COUNT).map((t16, i) => {
14005
+ const y = toY(t16);
13967
14006
  return /* @__PURE__ */ jsx(
13968
14007
  reactNative.View,
13969
14008
  {
13970
14009
  accessibilityElementsHidden: true,
13971
14010
  testID: "scatter-gridline-y",
13972
14011
  style: { position: "absolute", left: PLOT_LEFT2, width: innerW, top: y, height: 1, backgroundColor: GRID_LINE2 },
13973
- children: /* @__PURE__ */ jsx(reactNative.Text, { className: "text-[9px] text-text-tertiary", style: { position: "absolute", left: -PLOT_LEFT2, top: -6, width: PLOT_LEFT2 - 6, textAlign: "right" }, children: formatTick(t17) })
14012
+ children: /* @__PURE__ */ jsx(reactNative.Text, { className: "text-[9px] text-text-tertiary", style: { position: "absolute", left: -PLOT_LEFT2, top: -6, width: PLOT_LEFT2 - 6, textAlign: "right" }, children: formatTick(t16) })
13974
14013
  },
13975
14014
  `y-${i}`
13976
14015
  );
13977
14016
  }),
13978
- ticksOf(xd, TICK_COUNT).map((t17, i) => {
13979
- const x = toX(t17);
14017
+ ticksOf(xd, TICK_COUNT).map((t16, i) => {
14018
+ const x = toX(t16);
13980
14019
  return /* @__PURE__ */ jsx(
13981
14020
  reactNative.View,
13982
14021
  {
13983
14022
  accessibilityElementsHidden: true,
13984
14023
  testID: "scatter-gridline-x",
13985
14024
  style: { position: "absolute", top: PLOT_TOP, height: innerH, left: x, width: 1, backgroundColor: GRID_LINE2 },
13986
- children: /* @__PURE__ */ jsx(reactNative.Text, { className: "text-[9px] text-text-tertiary", style: { position: "absolute", top: innerH + 4, left: -16, width: 32, textAlign: "center" }, children: formatTick(t17) })
14025
+ children: /* @__PURE__ */ jsx(reactNative.Text, { className: "text-[9px] text-text-tertiary", style: { position: "absolute", top: innerH + 4, left: -16, width: 32, textAlign: "center" }, children: formatTick(t16) })
13987
14026
  },
13988
14027
  `x-${i}`
13989
14028
  );
@@ -14118,23 +14157,23 @@ function Gauge2({
14118
14157
  testID: "gauge",
14119
14158
  ...props,
14120
14159
  children: [
14121
- ticks.map((t17) => /* @__PURE__ */ jsx(
14160
+ ticks.map((t16) => /* @__PURE__ */ jsx(
14122
14161
  reactNative.View,
14123
14162
  {
14124
14163
  accessibilityElementsHidden: true,
14125
14164
  testID: "gauge-segment",
14126
14165
  style: {
14127
14166
  position: "absolute",
14128
- left: t17.left - tickThickness / 2,
14129
- top: t17.top - tickLength / 2,
14167
+ left: t16.left - tickThickness / 2,
14168
+ top: t16.top - tickLength / 2,
14130
14169
  width: tickThickness,
14131
14170
  height: tickLength,
14132
14171
  borderRadius: tickThickness / 2,
14133
- backgroundColor: t17.color,
14134
- transform: [{ rotate: t17.rotate }]
14172
+ backgroundColor: t16.color,
14173
+ transform: [{ rotate: t16.rotate }]
14135
14174
  }
14136
14175
  },
14137
- t17.key
14176
+ t16.key
14138
14177
  )),
14139
14178
  /* @__PURE__ */ jsxs(reactNative.View, { style: { position: "absolute", top: 0, left: 0, width: size, height: size }, className: "items-center justify-center", children: [
14140
14179
  /* @__PURE__ */ jsxs(reactNative.View, { className: "flex-row items-baseline gap-0.5", children: [
@@ -14305,7 +14344,7 @@ function TopBar({
14305
14344
  onSelectDevice,
14306
14345
  className
14307
14346
  }) {
14308
- const [width, setWidth] = React24.useState(SUBTITLE_MIN);
14347
+ const [width, setWidth] = React25.useState(SUBTITLE_MIN);
14309
14348
  const onLayout = (e) => setWidth(e.nativeEvent.layout.width);
14310
14349
  const subtitleVisible = showSubtitle ?? width >= SUBTITLE_MIN;
14311
14350
  const clockVisible = showClock ?? width >= CLOCK_MIN;
@@ -14453,8 +14492,10 @@ function DashboardShell({
14453
14492
  return (
14454
14493
  // Column: the TopBar spans the FULL width across the top, and the SideNav sits BELOW it
14455
14494
  // 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: [
14495
+ // unbroken edge-to-edge and lets the nav align under it. The shell is the outermost
14496
+ // Surface it owns the base plane and seeds the on-surface colour context (mode) for
14497
+ // the whole dashboard tree.
14498
+ /* @__PURE__ */ jsxs(Surface, { level: "base", className: cn("flex-1", className), children: [
14458
14499
  /* @__PURE__ */ jsx(TopBar, { state, devices, subtitle, onSelectDevice }),
14459
14500
  /* @__PURE__ */ jsxs(reactNative.View, { className: "flex-1 flex-row", children: [
14460
14501
  /* @__PURE__ */ jsx(SideNav, { activeKey, items: navItems, liveKey, onNavigate }),
@@ -14685,6 +14726,7 @@ exports.ReadinessCheck = ReadinessCheck;
14685
14726
  exports.RestTimer = RestTimer;
14686
14727
  exports.SET_STRIP_VARIABLE_COLOR = SET_STRIP_VARIABLE_COLOR;
14687
14728
  exports.SET_STRIP_ZONES = SET_STRIP_ZONES;
14729
+ exports.SURFACE_LEVEL_TOKEN = SURFACE_LEVEL_TOKEN;
14688
14730
  exports.ScaleIcon = ScaleIcon;
14689
14731
  exports.Scatter = Scatter;
14690
14732
  exports.ScheduleTiles = ScheduleTiles;
@@ -14729,6 +14771,7 @@ exports.StepperStep = Step;
14729
14771
  exports.StrengthTrendChart = StrengthTrendChart;
14730
14772
  exports.SupersetWrapper = SupersetWrapper;
14731
14773
  exports.Surface = Surface;
14774
+ exports.SurfaceContext = SurfaceContext;
14732
14775
  exports.SvgIcon = SvgIcon;
14733
14776
  exports.Switch = Switch;
14734
14777
  exports.Tab = Tab;
@@ -14826,6 +14869,7 @@ exports.lighten = lighten;
14826
14869
  exports.linearGradient = linearGradient;
14827
14870
  exports.liveAuraColor = liveAuraColor;
14828
14871
  exports.neumorphicShadows = neumorphicShadows;
14872
+ exports.onSurfaceColors = onSurfaceColors;
14829
14873
  exports.paceTone = paceTone;
14830
14874
  exports.paceToneColor = paceToneColor;
14831
14875
  exports.primitiveBorderRadius = primitiveBorderRadius;
@@ -14850,7 +14894,11 @@ exports.semanticTypography = semanticTypography;
14850
14894
  exports.sequentialEffort = sequentialEffort;
14851
14895
  exports.shadowColors = shadowColors;
14852
14896
  exports.statusPillColor = statusPillColor;
14897
+ exports.surfaceBackground = surfaceBackground;
14853
14898
  exports.surfaceGradient = surfaceGradient;
14899
+ exports.useOnSurfaceColor = useOnSurfaceColor;
14900
+ exports.useSurface = useSurface;
14901
+ exports.useSurfaceMode = useSurfaceMode;
14854
14902
  exports.useTable = useTable;
14855
14903
  exports.useTimer = useTimer;
14856
14904
  exports.useToast = useToast;