@botiverse/raft-ui 0.22.1 → 0.23.1

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.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { cn } from "./cn.mjs";
2
- import { $ as MessageMultiSelect, $n as PopoverTitle, $r as ListRowTitle, $t as MessageItemAvatarSlot, A as MessageQuotedPreview, Ai as DialogSheetReset, Ar as PanelBody, At as MessageItemReadReceipt, B as MessageQuotedPreviewLoading, Bi as ThemeStateContext, Br as ScrollAreaThumb, Bt as MessageItemMeta, Ci as DialogSurface, Cn as PreviewCardHeader, Cr as DropdownMenuShortcut, Ct as MessageReactionTooltipMeta, D as MessageListHistoryLimited, Di as panelToggleAction, Dn as PreviewCardSeparator, Dr as Kbd, Dt as MessageReactionTooltipSeparator, E as MessageListEndFade, Ei as PanelAction, En as PreviewCardPortal, Er as DropdownMenuTrigger, Et as MessageReactionTooltipNames, F as MessageQuotedPreviewAuthorMeta, Fr as PanelSection, G as MessageEmbed, Gi as headEdgePull, Gr as ListRow, Gt as MessageItemTime, H as MessageQuotedPreviewThread, Hi as stackedActions, Hr as Checkbox, Ht as MessageItemSenderBadges, I as MessageQuotedPreviewAuthorName, Ii as useParentOverlayKind, Ir as ScrollArea, J as MessageEmbedHeader, Jn as PopoverDescription, Jr as ListRowChevron, Jt as MessageItemContent, K as MessageEmbedContent, Ki as headEdges, Kn as PopoverClose, Kr as ListRowBody, Kt as MessageItemAttachments, L as MessageQuotedPreviewChannel, Li as withOverlayLayer, Lr as ScrollAreaContent, M as MessageQuotedPreviewAttachments, Mi as buttonVariants, Mr as PanelHeaderRoot, Mt as MessageItemToolbar, N as MessageQuotedPreviewAuthor, Ni as Spinner, Nr as PanelScrollContent, Nt as MessageItemToolbarButton, O as MessageListNotice, Oi as TextLink, On as PreviewCardTitle, Or as KbdGroup, Ot as MessageItemBadge, Pi as defaultNativeButton, Pr as PanelScrollViewport, Q as MessageTextSelectionToolbarSeparator, Qn as PopoverSeparator, Qr as ListRowMeta, Qt as MessageItemSearchMatch, R as MessageQuotedPreviewContent, Ri as useThemeScopeProps, Rr as ScrollAreaCorner, Rt as MessageItemHeader, Sr as DropdownMenuSeparator, St as MessageReactionTooltipContent, T as MessageListDateDivider, Ti as DialogTrigger, Tn as PreviewCardPopup, Tr as DropdownMenuSubmenuTrigger, Tt as MessageReactionTooltipNameText, U as MessageQuotedPreviewTimestamp, Ui as useStackedActions, Un as PopoverArrow, Ur as CheckboxIndicator, Ut as MessageItemSenderButton, V as MessageQuotedPreviewText, Vi as tv, Vn as Popover, Vr as ScrollAreaViewport, Vt as MessageItemSender, W as MessageQuotedPreviewUnavailable, Wi as controlIconInset, Wn as PopoverBackdrop, Wr as PRESENCE_COLOR, Wt as MessageItemSenderGroup, X as MessageTextSelectionToolbar, Xn as PopoverPopup, Xr as ListRowGroup, Xt as MessageItemEmbedded, Y as messageEmbed, Yn as PopoverHeader, Yr as ListRowDescription, Yt as MessageItemEdited, Z as MessageTextSelectionToolbarButton, Zn as PopoverPortal, Zr as ListRowIcon, Zt as MessageItemFooter, _ as InboxItemTrailing, _n as PreviewCardArrow, _r as DropdownMenuPopup, _t as MessageReactionGlyph, a as InboxItemContext, ai as TooltipProvider, an as AvatarBadge, ar as MobileNavLabel, at as MessageReferenceIndicator, b as Skeleton, bi as DialogOverlay, bn as PreviewCardDescription, br as DropdownMenuRadioItem, bt as MessageReactionQuickButton, c as InboxItemLeading, cn as AvatarGroupCount, cr as DropdownMenuCheckboxItem, d as InboxItemMetadata, di as Dialog, dr as DropdownMenuFooter, dt as MessageReferenceUnavailable, ei as ListRowTop, en as MessageItemContinuationTime, er as PopoverTrigger, et as MessageMultiSelectCheckbox, f as InboxItemSelection, fi as DialogBody, fr as DropdownMenuItem, ft as inlineChip, g as InboxItemTitle, gi as DialogFooter, gt as MessageReactionErrorIndicator, h as InboxItemTimestamp, hi as DialogDescription, hn as PreviewCard, hr as DropdownMenuLabel, ht as MessageReactionCount, i as InboxItemContent, ii as TooltipPortal, in as Avatar, ir as MobileNavItem, j as MessageQuotedPreviewAttachment, ji as Button, jr as PanelFooter, jt as MessageItemSavedIndicator, k as MessageList, ki as textLinkVariants, kn as PreviewCardTrigger, kr as Panel, kt as MessageItemBadgeSeparator, l as InboxItemMarks, ln as AvatarImage, lr as DropdownMenuCheckboxItemIndicator, lt as MessageReferenceSuffix, m as InboxItemSubtitle, mi as DialogContent, mr as DropdownMenuItemLabel, mt as MessageReactionChip, n as InboxItemActions, ni as Tooltip, nn as MessageItem, nr as useHoldThenMoveTouchSensor, nt as MessageMultiSelectToolbarActions, o as InboxItemHeading, oi as TooltipTrigger, on as AvatarFallback, or as MobileNavRoot, ot as MessageReferenceLabel, p as InboxItemSender, pi as DialogClose, pr as DropdownMenuItemCount, pt as MessageReactionAddButton, q as MessageEmbedFooter, qi as decisionWidth, qn as PopoverContent, qr as ListRowBottom, qt as MessageItemBody, r as InboxItemBody, ri as TooltipContent, rn as searchHit, rr as useMouseOnlyPointerSensor, rt as MessageReferenceChip, s as InboxItemHoverTarget, si as Badge, sn as AvatarGroup, sr as DropdownMenu, st as MessageReferencePending, t as InboxItem, ti as ListRowValue, tn as MessageItemGutter, tr as PopoverViewport, tt as MessageMultiSelectToolbar, u as InboxItemMessage, ui as useMobileViewport, un as useOverflowTitle, ur as DropdownMenuContent, ut as MessageReferenceText, v as InboxItemTrigger, vi as DialogHeader, vr as DropdownMenuPortal, vt as MessageReactionPickerContent, wi as DialogTitle, wr as DropdownMenuSubmenu, wt as MessageReactionTooltipName, xi as DialogPortal, xr as DropdownMenuRadioItemIndicator, xt as MessageReactionQuickRow, yi as DialogNav, yn as PreviewCardContent, yr as DropdownMenuRadioGroup, yt as MessageReactionPickerStatic, z as MessageQuotedPreviewHeader, zi as useTheme, zr as ScrollAreaScrollbar, zt as MessageItemInlineStatus } from "./inbox-item-BtvK75T1.mjs";
2
+ import { $ as MessageMultiSelect, $n as PopoverTitle, $r as ListRowTitle, $t as MessageItemAvatarSlot, A as MessageQuotedPreview, Ai as DialogSheetReset, Ar as PanelBody, At as MessageItemReadReceipt, B as MessageQuotedPreviewLoading, Bi as ThemeStateContext, Br as ScrollAreaThumb, Bt as MessageItemMeta, Ci as DialogSurface, Cn as PreviewCardHeader, Cr as DropdownMenuShortcut, Ct as MessageReactionTooltipMeta, D as MessageListHistoryLimited, Di as panelToggleAction, Dn as PreviewCardSeparator, Dr as Kbd, Dt as MessageReactionTooltipSeparator, E as MessageListEndFade, Ei as PanelAction, En as PreviewCardPortal, Er as DropdownMenuTrigger, Et as MessageReactionTooltipNames, F as MessageQuotedPreviewAuthorMeta, Fr as PanelSection, G as MessageEmbed, Gi as headEdgePull, Gr as ListRow, Gt as MessageItemTime, H as MessageQuotedPreviewThread, Hi as stackedActions, Hr as Checkbox, Ht as MessageItemSenderBadges, I as MessageQuotedPreviewAuthorName, Ii as useParentOverlayKind, Ir as ScrollArea, J as MessageEmbedHeader, Jn as PopoverDescription, Jr as ListRowChevron, Jt as MessageItemContent, K as MessageEmbedContent, Ki as headEdges, Kn as PopoverClose, Kr as ListRowBody, Kt as MessageItemAttachments, L as MessageQuotedPreviewChannel, Li as withOverlayLayer, Lr as ScrollAreaContent, M as MessageQuotedPreviewAttachments, Mi as buttonVariants, Mr as PanelHeaderRoot, Mt as MessageItemToolbar, N as MessageQuotedPreviewAuthor, Ni as Spinner, Nr as PanelScrollContent, Nt as MessageItemToolbarButton, O as MessageListNotice, Oi as TextLink, On as PreviewCardTitle, Or as KbdGroup, Ot as MessageItemBadge, Pi as defaultNativeButton, Pr as PanelScrollViewport, Q as MessageTextSelectionToolbarSeparator, Qn as PopoverSeparator, Qr as ListRowMeta, Qt as MessageItemSearchMatch, R as MessageQuotedPreviewContent, Ri as useThemeScopeProps, Rr as ScrollAreaCorner, Rt as MessageItemHeader, Sr as DropdownMenuSeparator, St as MessageReactionTooltipContent, T as MessageListDateDivider, Ti as DialogTrigger, Tn as PreviewCardPopup, Tr as DropdownMenuSubmenuTrigger, Tt as MessageReactionTooltipNameText, U as MessageQuotedPreviewTimestamp, Ui as useStackedActions, Un as PopoverArrow, Ur as CheckboxIndicator, Ut as MessageItemSenderButton, V as MessageQuotedPreviewText, Vi as tv, Vn as Popover, Vr as ScrollAreaViewport, Vt as MessageItemSender, W as MessageQuotedPreviewUnavailable, Wi as controlIconInset, Wn as PopoverBackdrop, Wr as PRESENCE_COLOR, Wt as MessageItemSenderGroup, X as MessageTextSelectionToolbar, Xn as PopoverPopup, Xr as ListRowGroup, Xt as MessageItemEmbedded, Y as messageEmbed, Yn as PopoverHeader, Yr as ListRowDescription, Yt as MessageItemEdited, Z as MessageTextSelectionToolbarButton, Zn as PopoverPortal, Zr as ListRowIcon, Zt as MessageItemFooter, _ as InboxItemTrailing, _n as PreviewCardArrow, _r as DropdownMenuPopup, _t as MessageReactionGlyph, a as InboxItemContext, ai as TooltipProvider, an as AvatarBadge, ar as MobileNavLabel, at as MessageReferenceIndicator, b as Skeleton, bi as DialogOverlay, bn as PreviewCardDescription, br as DropdownMenuRadioItem, bt as MessageReactionQuickButton, c as InboxItemLeading, cn as AvatarGroupCount, cr as DropdownMenuCheckboxItem, d as InboxItemMetadata, di as Dialog, dr as DropdownMenuFooter, dt as MessageReferenceUnavailable, ei as ListRowTop, en as MessageItemContinuationTime, er as PopoverTrigger, et as MessageMultiSelectCheckbox, f as InboxItemSelection, fi as DialogBody, fr as DropdownMenuItem, ft as inlineChip, g as InboxItemTitle, gi as DialogFooter, gt as MessageReactionErrorIndicator, h as InboxItemTimestamp, hi as DialogDescription, hn as PreviewCard, hr as DropdownMenuLabel, ht as MessageReactionCount, i as InboxItemContent, ii as TooltipPortal, in as Avatar, ir as MobileNavItem, j as MessageQuotedPreviewAttachment, ji as Button, jr as PanelFooter, jt as MessageItemSavedIndicator, k as MessageList, ki as textLinkVariants, kn as PreviewCardTrigger, kr as Panel, kt as MessageItemBadgeSeparator, l as InboxItemMarks, ln as AvatarImage, lr as DropdownMenuCheckboxItemIndicator, lt as MessageReferenceSuffix, m as InboxItemSubtitle, mi as DialogContent, mr as DropdownMenuItemLabel, mt as MessageReactionChip, n as InboxItemActions, ni as Tooltip, nn as MessageItem, nr as useHoldThenMoveTouchSensor, nt as MessageMultiSelectToolbarActions, o as InboxItemHeading, oi as TooltipTrigger, on as AvatarFallback, or as MobileNavRoot, ot as MessageReferenceLabel, p as InboxItemSender, pi as DialogClose, pr as DropdownMenuItemCount, pt as MessageReactionAddButton, q as MessageEmbedFooter, qi as decisionWidth, qn as PopoverContent, qr as ListRowBottom, qt as MessageItemBody, r as InboxItemBody, ri as TooltipContent, rn as searchHit, rr as useMouseOnlyPointerSensor, rt as MessageReferenceChip, s as InboxItemHoverTarget, si as Badge, sn as AvatarGroup, sr as DropdownMenu, st as MessageReferencePending, t as InboxItem, ti as ListRowValue, tn as MessageItemGutter, tr as PopoverViewport, tt as MessageMultiSelectToolbar, u as InboxItemMessage, ui as useMobileViewport, un as useOverflowTitle, ur as DropdownMenuContent, ut as MessageReferenceText, v as InboxItemTrigger, vi as DialogHeader, vr as DropdownMenuPortal, vt as MessageReactionPickerContent, wi as DialogTitle, wr as DropdownMenuSubmenu, wt as MessageReactionTooltipName, xi as DialogPortal, xr as DropdownMenuRadioItemIndicator, xt as MessageReactionQuickRow, yi as DialogNav, yn as PreviewCardContent, yr as DropdownMenuRadioGroup, yt as MessageReactionPickerStatic, z as MessageQuotedPreviewHeader, zi as useTheme, zr as ScrollAreaScrollbar, zt as MessageItemInlineStatus } from "./inbox-item-B56I-Ckt.mjs";
3
3
  import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
4
4
  import { AlertTriangle, Bell, Check, CheckCircle2, ChevronDown, ChevronLeft, ChevronRight, CircleCheck, Copy, FileText, Image, Info, TriangleAlert, Upload, X, Zap } from "lucide-react";
5
5
  import { Children, cloneElement, createContext, createElement, isValidElement, use, useCallback, useContext, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
@@ -587,6 +587,7 @@ function DrawerActions({ className, render, children, ...props }) {
587
587
  const { actions } = drawer({ axis: swipeAxis });
588
588
  const defaultProps = {
589
589
  className: actions({ className }),
590
+ "data-stacked": swipeAxis === "x" ? void 0 : "",
590
591
  children
591
592
  };
592
593
  return useRender({
@@ -2083,10 +2084,10 @@ const sidebarSectionRecipe = tv({ slots: {
2083
2084
  sidebarSectionControls: [
2084
2085
  "flex shrink-0 items-center gap-1",
2085
2086
  "pointer-events-none absolute top-1/2 right-0 -translate-y-1/2 opacity-0",
2086
- "max-md:static max-md:pointer-events-auto max-md:translate-y-0 max-md:opacity-100",
2087
- "md:group-hover/section-header:pointer-events-auto md:group-hover/section-header:opacity-100",
2088
- "md:focus-within:pointer-events-auto md:focus-within:opacity-100",
2089
- "md:has-[[data-popup-open]]:pointer-events-auto md:has-[[data-popup-open]]:opacity-100"
2087
+ "not-pointer-fine:static not-pointer-fine:pointer-events-auto not-pointer-fine:translate-y-0 not-pointer-fine:opacity-100",
2088
+ "pointer-fine:group-hover/section-header:pointer-events-auto pointer-fine:group-hover/section-header:opacity-100",
2089
+ "pointer-fine:focus-within:pointer-events-auto pointer-fine:focus-within:opacity-100",
2090
+ "pointer-fine:has-data-popup-open:pointer-events-auto pointer-fine:has-data-popup-open:opacity-100"
2090
2091
  ],
2091
2092
  sidebarSectionControl: ["flex h-7 w-auto min-w-7 shrink-0 items-center justify-center p-0 -my-1.5", "[&>svg]:shrink-0 [&>svg:not([class*='size-'])]:size-4"]
2092
2093
  } });
@@ -4316,10 +4317,72 @@ function SwitchThumb({ className, ...props }) {
4316
4317
  });
4317
4318
  }
4318
4319
  //#endregion
4320
+ //#region src/lib/use-merged-ref.ts
4321
+ /**
4322
+ * Merges refs into one setter. Returns `[setRef, getRef]`: `setRef(el)` stores `el` and passes it to
4323
+ * every ref; `getRef()` reads the stored element. When a ref changes between renders (checked while
4324
+ * rendering), the old one is cleared and the new one gets the stored element at once. The setter
4325
+ * calls ref callbacks itself, so what they return is ignored.
4326
+ */
4327
+ function useMergedRef(...refs) {
4328
+ const entries = useMemo(() => [], []);
4329
+ const elementRef = useRef(null);
4330
+ const getRef = useCallback(() => elementRef.current, []);
4331
+ const clearEntry = useCallback((entry) => {
4332
+ if (entry != null) {
4333
+ if (entry.type === "RefCallback") entry.ref(null);
4334
+ else entry.ref.current = null;
4335
+ }
4336
+ }, []);
4337
+ const applyStoredElement = useCallback((ref) => {
4338
+ if (typeof ref == "function") ref(getRef());
4339
+ else ref.current = getRef();
4340
+ }, [getRef]);
4341
+ const setRef = useCallback((el) => {
4342
+ elementRef.current = el;
4343
+ for (const entry of entries) if (entry == null) continue;
4344
+ else if (entry.type === "RefObject") entry.ref.current = el;
4345
+ else entry.ref(el);
4346
+ }, [entries]);
4347
+ for (let i = 0; i < refs.length; i++) {
4348
+ const ref = refs[i];
4349
+ const entry = entries[i];
4350
+ if (ref == null) {
4351
+ clearEntry(entry);
4352
+ entries[i] = null;
4353
+ } else {
4354
+ if (entry && entry.ref === ref) continue;
4355
+ if (typeof ref == "function") {
4356
+ if (entry != null) clearEntry(entry);
4357
+ entries[i] = {
4358
+ type: "RefCallback",
4359
+ ref
4360
+ };
4361
+ } else {
4362
+ if (entry != null) clearEntry(entry);
4363
+ entries[i] = {
4364
+ type: "RefObject",
4365
+ ref
4366
+ };
4367
+ }
4368
+ applyStoredElement(ref);
4369
+ }
4370
+ }
4371
+ for (let i = refs.length; i < entries.length; i++) {
4372
+ clearEntry(entries[i]);
4373
+ entries[i] = null;
4374
+ }
4375
+ return [setRef, getRef];
4376
+ }
4377
+ //#endregion
4319
4378
  //#region src/components/segmented-control/segmented-control.tsx
4320
4379
  const segmentedControl = tv({
4321
4380
  slots: {
4322
- root: ["inline-flex shrink-0 items-center", "w-fit flex-nowrap gap-[3px] rounded-[11px] bg-fill-muted p-[3px]"],
4381
+ root: [
4382
+ "inline-flex min-w-0 items-center",
4383
+ "w-fit max-w-full flex-nowrap gap-[3px] rounded-[11px] bg-fill-muted p-[3px]",
4384
+ "data-overflowing:overflow-x-auto data-overflowing:overscroll-x-contain data-overflowing:scrollbar-none"
4385
+ ],
4323
4386
  item: [
4324
4387
  "inline-flex min-w-0 shrink-0 items-center gap-1.5",
4325
4388
  "outline-none disabled:pointer-events-none",
@@ -4354,20 +4417,204 @@ const segmentedControl = tv({
4354
4417
  lg: { root: ["@max-lg:**:data-[slot=segmented-control-item]:relative @max-lg:**:data-[slot=segmented-control-item]:w-8 @max-lg:**:data-[slot=segmented-control-item]:px-0", "@max-lg:**:data-[slot=segmented-control-label]:sr-only @max-lg:**:data-[slot=segmented-control-count]:sr-only"] },
4355
4418
  xl: { root: ["@max-xl:**:data-[slot=segmented-control-item]:relative @max-xl:**:data-[slot=segmented-control-item]:w-8 @max-xl:**:data-[slot=segmented-control-item]:px-0", "@max-xl:**:data-[slot=segmented-control-label]:sr-only @max-xl:**:data-[slot=segmented-control-count]:sr-only"] },
4356
4419
  "2xl": { root: ["@max-2xl:**:data-[slot=segmented-control-item]:relative @max-2xl:**:data-[slot=segmented-control-item]:w-8 @max-2xl:**:data-[slot=segmented-control-item]:px-0", "@max-2xl:**:data-[slot=segmented-control-label]:sr-only @max-2xl:**:data-[slot=segmented-control-count]:sr-only"] }
4357
- }
4420
+ },
4421
+ iconsOnlyMeasured: { true: { root: ["data-icons-only:**:data-[slot=segmented-control-item]:relative data-icons-only:**:data-[slot=segmented-control-item]:w-8 data-icons-only:**:data-[slot=segmented-control-item]:px-0", "data-icons-only:**:data-[slot=segmented-control-label]:sr-only data-icons-only:**:data-[slot=segmented-control-count]:sr-only"] } }
4358
4422
  }
4359
4423
  });
4424
+ const ICONS_ONLY_PRESETS = /* @__PURE__ */ new Set([
4425
+ "xs",
4426
+ "sm",
4427
+ "md",
4428
+ "lg",
4429
+ "xl",
4430
+ "2xl"
4431
+ ]);
4432
+ function isIconsOnlyPreset(value) {
4433
+ return value !== void 0 && ICONS_ONLY_PRESETS.has(value);
4434
+ }
4360
4435
  const SegmentedControlIconsOnlyContext = createContext(false);
4361
- function SegmentedControl({ disabled = false, iconsOnlyBelow, variant = "default", className, ...props }) {
4436
+ /**
4437
+ * A length threshold in CSS pixels, or `undefined` for a value that isn't a
4438
+ * `px`, `rem` or `em` length. `em` is the container's font size, as in a
4439
+ * container query.
4440
+ */
4441
+ function lengthToPx(value, container) {
4442
+ const match = /^(\d*\.?\d+)(px|rem|em)$/.exec(value.trim());
4443
+ if (!match) return void 0;
4444
+ const amount = Number(match[1]);
4445
+ if (match[2] === "px") return amount;
4446
+ const fontOf = match[2] === "rem" ? document.documentElement : container;
4447
+ return amount * parseFloat(getComputedStyle(fontOf).fontSize);
4448
+ }
4449
+ /** The nearest size container above the track, as a container query finds it; else its parent. */
4450
+ function queryContainerOf(track) {
4451
+ for (let el = track.parentElement; el; el = el.parentElement) if (getComputedStyle(el).containerType !== "normal") return el;
4452
+ return track.parentElement;
4453
+ }
4454
+ function contentInlineSize(el) {
4455
+ const style = getComputedStyle(el);
4456
+ return el.clientWidth - parseFloat(style.paddingLeft) - parseFloat(style.paddingRight);
4457
+ }
4458
+ /**
4459
+ * Whether the labelled segments fit the track's box: the segments, first to
4460
+ * last, and the track's padding take no more than its `clientWidth` (half a
4461
+ * pixel of rounding aside; `scrollWidth` would let the last segment eat into
4462
+ * the end padding first, and Base UI's visually hidden radio inputs must not
4463
+ * count), and no label is truncated (a track stretched with `*:flex-1`
4464
+ * shrinks its labels instead). Measured in the labelled layout
4465
+ * whatever the control shows now: the attribute comes off for the read and
4466
+ * goes back before anything paints. The track is `w-fit max-w-full min-w-0`,
4467
+ * so its box is the width it is given, a shrinking flex item's included,
4468
+ * never more than its labels need: the answer depends only on the room
4469
+ * around it, not on what it shows, and so can't flap at the boundary.
4470
+ */
4471
+ function labelsFit(track) {
4472
+ const iconsOnly = track.hasAttribute("data-icons-only");
4473
+ if (iconsOnly) track.removeAttribute("data-icons-only");
4474
+ const segments = Array.from(track.querySelectorAll(":scope > [data-slot=segmented-control-item]"));
4475
+ let fits = true;
4476
+ if (segments.length > 0) {
4477
+ const style = getComputedStyle(track);
4478
+ fits = segments[segments.length - 1].getBoundingClientRect().right - segments[0].getBoundingClientRect().left + parseFloat(style.paddingLeft) + parseFloat(style.paddingRight) - track.clientWidth <= .5;
4479
+ }
4480
+ if (fits) {
4481
+ for (const label of Array.from(track.querySelectorAll("[data-slot=segmented-control-label]"))) if (label.scrollWidth - label.clientWidth > 1) {
4482
+ fits = false;
4483
+ break;
4484
+ }
4485
+ }
4486
+ if (iconsOnly) track.setAttribute("data-icons-only", "");
4487
+ return fits;
4488
+ }
4489
+ /**
4490
+ * Lays the track out and reports whether its segments run past its box. The
4491
+ * track comes from a callback ref, so a swapped element is measured too.
4492
+ *
4493
+ * With `iconsOnlyBelow="auto"` or a length, it decides here whether the
4494
+ * segments show only their icons, and sets `data-icons-only` on the track
4495
+ * (the presets are container queries in CSS and need nothing here). The
4496
+ * decision is taken synchronously, in the layout effect and in the observers'
4497
+ * callbacks, so the first frame and every resize paint the right layout.
4498
+ * Taken again when the track, a segment, the element it is measured against
4499
+ * (the parent for `auto`, the container for a length) or one of that
4500
+ * element's children resizes or comes and goes, a label, a count or the
4501
+ * selection changes, or a web font arrives.
4502
+ *
4503
+ * The overflow is the track's own `scrollWidth` against its `clientWidth`
4504
+ * after that decision, measured in the next frame.
4505
+ */
4506
+ function useTrackFit(track, iconsOnlyBelow) {
4507
+ const [overflowing, setOverflowing] = useState(false);
4508
+ const measured = iconsOnlyBelow !== void 0 && !isIconsOnlyPreset(iconsOnlyBelow);
4509
+ useLayoutEffect(() => {
4510
+ if (!track || typeof ResizeObserver === "undefined") return void 0;
4511
+ const reference = !measured ? null : iconsOnlyBelow === "auto" ? track.parentElement : queryContainerOf(track);
4512
+ if (measured && iconsOnlyBelow !== "auto" && reference && lengthToPx(iconsOnlyBelow, reference) === void 0 && process.env.NODE_ENV !== "production") console.warn(`raft-ui: SegmentedControl iconsOnlyBelow="${iconsOnlyBelow}" is not a preset, "auto" or a px, rem or em length; the segments keep their labels.`);
4513
+ const fitIcons = () => {
4514
+ if (!measured) return;
4515
+ let iconsOnly = false;
4516
+ if (iconsOnlyBelow === "auto") iconsOnly = !labelsFit(track);
4517
+ else if (reference) {
4518
+ const threshold = lengthToPx(iconsOnlyBelow, reference);
4519
+ iconsOnly = threshold !== void 0 && contentInlineSize(reference) < threshold;
4520
+ }
4521
+ if (iconsOnly !== track.hasAttribute("data-icons-only")) track.toggleAttribute("data-icons-only", iconsOnly);
4522
+ };
4523
+ let frame = 0;
4524
+ const measure = () => {
4525
+ frame = 0;
4526
+ setOverflowing(track.scrollWidth - track.clientWidth > 1);
4527
+ };
4528
+ const schedule = () => {
4529
+ if (frame === 0) frame = requestAnimationFrame(measure);
4530
+ };
4531
+ const update = () => {
4532
+ fitIcons();
4533
+ schedule();
4534
+ };
4535
+ const resize = new ResizeObserver(update);
4536
+ const observeAll = () => {
4537
+ resize.disconnect();
4538
+ resize.observe(track);
4539
+ for (const child of Array.from(track.children)) resize.observe(child);
4540
+ if (reference) {
4541
+ resize.observe(reference);
4542
+ for (const child of Array.from(reference.children)) resize.observe(child);
4543
+ }
4544
+ };
4545
+ observeAll();
4546
+ const mutation = new MutationObserver(() => {
4547
+ observeAll();
4548
+ update();
4549
+ });
4550
+ mutation.observe(track, {
4551
+ childList: true,
4552
+ subtree: true,
4553
+ characterData: true,
4554
+ attributeFilter: ["data-checked"]
4555
+ });
4556
+ if (reference) mutation.observe(reference, { childList: true });
4557
+ const fonts = typeof document === "undefined" ? void 0 : document.fonts;
4558
+ fonts?.addEventListener("loadingdone", update);
4559
+ fitIcons();
4560
+ measure();
4561
+ return () => {
4562
+ if (frame !== 0) cancelAnimationFrame(frame);
4563
+ resize.disconnect();
4564
+ mutation.disconnect();
4565
+ fonts?.removeEventListener("loadingdone", update);
4566
+ track.removeAttribute("data-icons-only");
4567
+ };
4568
+ }, [
4569
+ track,
4570
+ measured,
4571
+ iconsOnlyBelow
4572
+ ]);
4573
+ return overflowing;
4574
+ }
4575
+ /** In development, warns when segments that may show only their icons have none. */
4576
+ function useIconsOnlyWarning(ref, iconsOnlyBelow) {
4577
+ useLayoutEffect(() => {
4578
+ if (process.env.NODE_ENV === "production" || iconsOnlyBelow === void 0) return;
4579
+ const items = ref.current?.querySelectorAll("[data-slot=segmented-control-item]") ?? [];
4580
+ for (const item of Array.from(items)) if (!item.querySelector("svg, img")) {
4581
+ console.warn("raft-ui: a SegmentedControl with iconsOnlyBelow has a segment with no icon; it would be left empty when the segments show only their icons. Give every segment an icon.");
4582
+ return;
4583
+ }
4584
+ }, [ref, iconsOnlyBelow]);
4585
+ }
4586
+ function SegmentedControl({ disabled = false, iconsOnlyBelow, variant = "default", className, ref, ...props }) {
4587
+ const preset = isIconsOnlyPreset(iconsOnlyBelow);
4362
4588
  const { root } = segmentedControl({
4363
- iconsOnlyBelow,
4589
+ iconsOnlyBelow: preset ? iconsOnlyBelow : void 0,
4590
+ iconsOnlyMeasured: iconsOnlyBelow !== void 0 && !preset ? true : void 0,
4364
4591
  variant
4365
4592
  });
4593
+ const rootRef = useRef(null);
4594
+ const [track, setTrack] = useState(null);
4595
+ const [setRef] = useMergedRef(rootRef, setTrack, ref);
4596
+ const overflowing = useTrackFit(track, iconsOnlyBelow);
4597
+ useIconsOnlyWarning(rootRef, iconsOnlyBelow);
4598
+ const value = props.value;
4599
+ useLayoutEffect(() => {
4600
+ const track = rootRef.current;
4601
+ if (!overflowing || !track) return;
4602
+ const checked = track.querySelector("[data-checked]");
4603
+ if (!checked) return;
4604
+ const trackLeft = track.getBoundingClientRect().left;
4605
+ const box = checked.getBoundingClientRect();
4606
+ const start = box.left - trackLeft + track.scrollLeft;
4607
+ const end = start + box.width;
4608
+ if (start < track.scrollLeft) track.scrollLeft = start;
4609
+ else if (end > track.scrollLeft + track.clientWidth) track.scrollLeft = end - track.clientWidth;
4610
+ }, [overflowing, value]);
4366
4611
  return /* @__PURE__ */ jsx(SegmentedControlIconsOnlyContext, {
4367
4612
  value: iconsOnlyBelow !== void 0,
4368
4613
  children: /* @__PURE__ */ jsx(RadioGroup$1, {
4614
+ ref: setRef,
4369
4615
  disabled,
4370
4616
  "data-slot": "segmented-control",
4617
+ "data-overflowing": overflowing ? "" : void 0,
4371
4618
  className: root({ className }),
4372
4619
  ...props
4373
4620
  })
@@ -4554,8 +4801,10 @@ const descriptionList = tv({
4554
4801
  variants: { direction: {
4555
4802
  vertical: {},
4556
4803
  horizontal: { root: [
4557
- "grid items-baseline",
4558
- "max-sm:grid-cols-1 max-sm:gap-y-0.5",
4804
+ "@container/description-list w-full grid items-baseline",
4805
+ "[&>[data-slot=description-item]>*]:@max-sm/description-list:col-span-full",
4806
+ "[&>[data-slot=description-item]>[data-slot=description-details]]:@max-sm/description-list:min-h-0",
4807
+ "[&>[data-slot=description-item]+[data-slot=description-item]>[data-slot=description-term]]:@max-sm/description-list:mt-2",
4559
4808
  "*:data-[slot=description-item]:contents",
4560
4809
  "[&>[data-slot=description-item]>[data-slot=description-term]]:mb-0",
4561
4810
  "[&>[data-slot=description-item]>[data-slot=description-term]]:max-w-40",
@@ -4774,16 +5023,33 @@ function CodeBlockBody({ children, className, render, ...props }) {
4774
5023
  * its own. Code that fits adds no Tab stop.
4775
5024
  */
4776
5025
  function CodeBlockPre({ render, ref, "aria-label": ariaLabel = "Code", ...props }) {
4777
- const preRef = useRef(null);
5026
+ const [pre, setPre] = useState(null);
5027
+ const preRef = useCallback((element) => setPre(element), []);
4778
5028
  const [overflowing, setOverflowing] = useState(false);
4779
- useEffect(() => {
4780
- const pre = preRef.current;
5029
+ useLayoutEffect(() => {
4781
5030
  if (!pre) return;
4782
- const observer = new ResizeObserver(() => setOverflowing(pre.scrollWidth > pre.clientWidth));
4783
- observer.observe(pre);
4784
- for (const child of pre.children) observer.observe(child);
4785
- return () => observer.disconnect();
4786
- }, []);
5031
+ const measure = () => setOverflowing(pre.scrollWidth > pre.clientWidth);
5032
+ const resize = new ResizeObserver(measure);
5033
+ const observe = () => {
5034
+ resize.disconnect();
5035
+ resize.observe(pre);
5036
+ for (const child of pre.children) resize.observe(child);
5037
+ };
5038
+ observe();
5039
+ const mutation = new MutationObserver(() => {
5040
+ observe();
5041
+ measure();
5042
+ });
5043
+ mutation.observe(pre, {
5044
+ childList: true,
5045
+ subtree: true,
5046
+ characterData: true
5047
+ });
5048
+ return () => {
5049
+ resize.disconnect();
5050
+ mutation.disconnect();
5051
+ };
5052
+ }, [pre]);
4787
5053
  return useRender({
4788
5054
  defaultTagName: "pre",
4789
5055
  render,
@@ -5431,7 +5697,7 @@ const messageActionCard = tv({
5431
5697
  //#endregion
5432
5698
  //#region src/components/message-action-card/message-action-card-content.recipe.ts
5433
5699
  const messageActionCardContent = tv({ slots: {
5434
- root: ["p-3", "flex flex-col gap-2 px-3 pt-0 pb-3"],
5700
+ root: ["p-3", "@container/action-card flex flex-col gap-2 px-3 pt-0 pb-3"],
5435
5701
  panel: [
5436
5702
  "h-(--collapsible-panel-height) overflow-hidden",
5437
5703
  "transition-[height] duration-200 ease-out motion-reduce:transition-none",
@@ -5439,12 +5705,20 @@ const messageActionCardContent = tv({ slots: {
5439
5705
  ],
5440
5706
  properties: [
5441
5707
  "m-0 grid",
5442
- "max-sm:grid-cols-1 max-sm:gap-y-0.5",
5708
+ "@max-sm/action-card:grid-cols-1",
5443
5709
  "grid-cols-[minmax(88px,max-content)_minmax(0,1fr)] items-baseline gap-x-4 gap-y-0.5"
5444
5710
  ],
5445
5711
  property: ["contents"],
5446
- propertyLabel: ["max-w-40 min-w-0 wrap-break-word", "text-footnote font-medium text-foreground-hint"],
5447
- propertyValue: ["m-0 min-w-0 wrap-break-word", "min-h-8 py-1.5 text-callout text-foreground"],
5712
+ propertyLabel: [
5713
+ "max-w-40 min-w-0 wrap-break-word",
5714
+ "text-footnote font-medium text-foreground-hint",
5715
+ "[[data-slot=message-action-card-property]+[data-slot=message-action-card-property]>&]:@max-sm/action-card:mt-2"
5716
+ ],
5717
+ propertyValue: [
5718
+ "m-0 min-w-0 wrap-break-word",
5719
+ "min-h-8 py-1.5 text-callout text-foreground",
5720
+ "@max-sm/action-card:min-h-0 @max-sm/action-card:py-0"
5721
+ ],
5448
5722
  scopeList: ["mt-0 stack-y-1.5"],
5449
5723
  scopeListViewport: ["overflow-y-auto overscroll-contain", "max-h-[164px] stack-y-1.5 pr-1"],
5450
5724
  scopeListLabel: ["text-footnote font-medium text-foreground-hint"],
@@ -5916,7 +6190,7 @@ function MessageAttachmentAction({ className, render, ...props }) {
5916
6190
  //#region src/components/message-attachment/message-image-gallery.recipe.ts
5917
6191
  const messageImageGallery = tv({
5918
6192
  slots: {
5919
- root: ["max-w-[min(360px,calc(100vw-112px))] stack-y-1 md:max-w-[360px]"],
6193
+ root: ["@container/gallery w-full max-w-[min(360px,100%)] stack-y-1"],
5920
6194
  row: ["grid", "gap-1"],
5921
6195
  item: [
5922
6196
  "group/img relative overflow-hidden text-left",
@@ -5941,28 +6215,24 @@ const messageImageGallery = tv({
5941
6215
  {
5942
6216
  count: 1,
5943
6217
  single: false,
5944
- class: { row: "auto-rows-[8rem] sm:auto-rows-[9rem]" }
6218
+ class: { row: "auto-rows-[8rem] @min-[360px]/gallery:auto-rows-[9rem]" }
5945
6219
  },
5946
6220
  {
5947
6221
  count: 2,
5948
6222
  single: false,
5949
- class: { row: "auto-rows-[8rem] sm:auto-rows-[9rem]" }
6223
+ class: { row: "auto-rows-[8rem] @min-[360px]/gallery:auto-rows-[9rem]" }
5950
6224
  },
5951
6225
  {
5952
6226
  count: 3,
5953
6227
  single: false,
5954
- class: { row: "auto-rows-[7rem] sm:auto-rows-[8rem]" }
5955
- },
5956
- {
5957
- count: 3,
5958
- class: { row: "md:grid-cols-2" }
6228
+ class: { row: "auto-rows-[7rem] @min-[360px]/gallery:auto-rows-[8rem]" }
5959
6229
  }
5960
6230
  ],
5961
6231
  variants: {
5962
6232
  count: {
5963
6233
  1: { row: "grid-cols-1" },
5964
6234
  2: { row: "grid-cols-2" },
5965
- 3: { row: "grid-cols-2 md:grid-cols-3" }
6235
+ 3: { row: "grid-cols-2" }
5966
6236
  },
5967
6237
  /** A single-image gallery keeps the image's proportions instead of a row height. */
5968
6238
  single: { true: { item: ["inline-block w-fit max-w-[26rem] justify-self-start", "rounded-container"] } },
@@ -6136,7 +6406,7 @@ const messageVideoPreview = tv({ slots: {
6136
6406
  root: [
6137
6407
  "group/video relative aspect-video w-full overflow-hidden",
6138
6408
  "bg-black text-left",
6139
- "max-w-[min(360px,calc(100vw-112px))] rounded-container border border-line-hairline bg-clip-padding"
6409
+ "max-w-[min(360px,100%)] rounded-container border border-line-hairline bg-clip-padding"
6140
6410
  ],
6141
6411
  media: "block size-full bg-black object-contain",
6142
6412
  fallback: "flex size-full items-center justify-center bg-black text-white",
@@ -6323,14 +6593,14 @@ action: {
6323
6593
  */
6324
6594
  const messageForwardedBundleGallery = tv({
6325
6595
  slots: {
6326
- root: ["min-w-0"],
6596
+ root: ["@container/bundle w-full min-w-0"],
6327
6597
  row: ["grid gap-2"],
6328
6598
  tile: ["[&_img]:block [&_img]:size-full [&_img]:object-cover"]
6329
6599
  },
6330
6600
  variants: { count: {
6331
- 1: { row: "grid-cols-1 auto-rows-[8rem] sm:auto-rows-[9rem]" },
6332
- 2: { row: "grid-cols-2 auto-rows-[8rem] sm:auto-rows-[9rem]" },
6333
- 3: { row: "grid-cols-2 auto-rows-[7rem] sm:auto-rows-[8rem] md:grid-cols-3" }
6601
+ 1: { row: "grid-cols-1 auto-rows-[8rem] @min-[360px]/bundle:auto-rows-[9rem]" },
6602
+ 2: { row: "grid-cols-2 auto-rows-[8rem] @min-[360px]/bundle:auto-rows-[9rem]" },
6603
+ 3: { row: "grid-cols-2 auto-rows-[7rem] @min-[360px]/bundle:auto-rows-[8rem] @min-[360px]/bundle:grid-cols-3" }
6334
6604
  } }
6335
6605
  });
6336
6606
  //#endregion
@@ -12741,64 +13011,6 @@ function useMemoWithPrevious(fn, deps) {
12741
13011
  });
12742
13012
  }
12743
13013
  //#endregion
12744
- //#region src/components/virtual-list/hooks/use-merged-ref.ts
12745
- /**
12746
- * Merges refs into one setter. Returns `[setRef, getRef]`: `setRef(el)` stores `el` and passes it to
12747
- * every ref; `getRef()` reads the stored element. When a ref changes between renders (checked while
12748
- * rendering), the old one is cleared and the new one gets the stored element at once. The setter
12749
- * calls ref callbacks itself, so what they return is ignored.
12750
- */
12751
- function useMergedRef(...refs) {
12752
- const entries = useMemo(() => [], []);
12753
- const elementRef = useRef(null);
12754
- const getRef = useCallback(() => elementRef.current, []);
12755
- const clearEntry = useCallback((entry) => {
12756
- if (entry != null) {
12757
- if (entry.type === "RefCallback") entry.ref(null);
12758
- else entry.ref.current = null;
12759
- }
12760
- }, []);
12761
- const applyStoredElement = useCallback((ref) => {
12762
- if (typeof ref == "function") ref(getRef());
12763
- else ref.current = getRef();
12764
- }, [getRef]);
12765
- const setRef = useCallback((el) => {
12766
- elementRef.current = el;
12767
- for (const entry of entries) if (entry == null) continue;
12768
- else if (entry.type === "RefObject") entry.ref.current = el;
12769
- else entry.ref(el);
12770
- }, [entries]);
12771
- for (let i = 0; i < refs.length; i++) {
12772
- const ref = refs[i];
12773
- const entry = entries[i];
12774
- if (ref == null) {
12775
- clearEntry(entry);
12776
- entries[i] = null;
12777
- } else {
12778
- if (entry && entry.ref === ref) continue;
12779
- if (typeof ref == "function") {
12780
- if (entry != null) clearEntry(entry);
12781
- entries[i] = {
12782
- type: "RefCallback",
12783
- ref
12784
- };
12785
- } else {
12786
- if (entry != null) clearEntry(entry);
12787
- entries[i] = {
12788
- type: "RefObject",
12789
- ref
12790
- };
12791
- }
12792
- applyStoredElement(ref);
12793
- }
12794
- }
12795
- for (let i = refs.length; i < entries.length; i++) {
12796
- clearEntry(entries[i]);
12797
- entries[i] = null;
12798
- }
12799
- return [setRef, getRef];
12800
- }
12801
- //#endregion
12802
13014
  //#region src/components/virtual-list/hooks/use-non-passive-wheel.ts
12803
13015
  /**
12804
13016
  * Adds a non-passive `wheel` listener (so it may call `preventDefault`) to the element `getTarget`
@@ -14868,19 +15080,19 @@ function VirtualList(props) {
14868
15080
  //#endregion
14869
15081
  //#region src/components/tasks/tasks-panel.recipe.ts
14870
15082
  const tasksPanel = tv({ slots: {
14871
- root: ["flex min-h-0 min-w-0 flex-1 flex-col", "bg-layer-canvas text-foreground"],
15083
+ root: ["@container/tasks flex min-h-0 min-w-0 flex-1 flex-col", "bg-layer-canvas text-foreground"],
14872
15084
  toolbar: [
14873
15085
  "grid shrink-0 grid-cols-[minmax(0,1fr)_auto] items-center gap-2",
14874
- "md:flex md:flex-wrap md:items-center md:justify-between",
15086
+ "@min-md/tasks:flex @min-md/tasks:flex-wrap @min-md/tasks:items-center @min-md/tasks:justify-between",
14875
15087
  "min-h-14 border-b border-line-seam bg-layer-canvas px-5 py-3",
14876
- "max-md:px-4"
15088
+ "@max-md/tasks:px-4"
14877
15089
  ],
14878
15090
  toolbarGroup: ["flex flex-wrap items-center gap-2"],
14879
15091
  toolbarNewTask: ["col-start-1 row-start-1 justify-self-start", "flex flex-wrap items-center gap-2"],
14880
15092
  toolbarFilters: [
14881
15093
  "col-span-2 row-start-2 min-w-0",
14882
15094
  "only:col-auto only:row-auto",
14883
- "md:mr-auto",
15095
+ "@min-md/tasks:mr-auto",
14884
15096
  "flex flex-wrap items-center gap-2"
14885
15097
  ],
14886
15098
  toolbarView: ["col-start-2 row-start-1 justify-self-end", "flex flex-wrap items-center gap-2"],
@@ -14895,7 +15107,7 @@ const tasksPanel = tv({ slots: {
14895
15107
  "min-h-0 flex-1 overflow-auto overscroll-contain p-4",
14896
15108
  "pb-[calc(1rem+env(safe-area-inset-bottom,0px))]",
14897
15109
  "bg-layer-canvas px-5",
14898
- "max-md:px-4"
15110
+ "@max-md/tasks:px-4"
14899
15111
  ],
14900
15112
  empty: ["flex h-full flex-col items-center justify-center"]
14901
15113
  } });
@@ -15067,7 +15279,7 @@ const taskChip = tv({
15067
15279
  closed: { root: ["bg-task-status-closed-soft"] }
15068
15280
  },
15069
15281
  variant: {
15070
- default: { root: ["h-[22px] gap-1.5 rounded-chip px-[7px] py-0", "text-[12px] leading-4"] },
15282
+ default: { root: ["h-[22px] items-baseline gap-1.5 rounded-chip px-[7px] py-[3px] [&>svg]:self-center", "text-[12px] leading-4"] },
15071
15283
  inline: {}
15072
15284
  },
15073
15285
  size: {
@@ -15088,7 +15300,7 @@ const taskChip = tv({
15088
15300
  }, {
15089
15301
  variant: "default",
15090
15302
  size: "sm",
15091
- class: { root: ["h-5 gap-1 px-[5px]"] }
15303
+ class: { root: ["h-5 gap-1 px-[5px] py-0.5"] }
15092
15304
  }],
15093
15305
  defaultVariants: {
15094
15306
  variant: "default",
@@ -15471,9 +15683,7 @@ function ActivityInboxSidebar({ className, children, ...props }) {
15471
15683
  const activityInboxToolbar = tv({ slots: {
15472
15684
  controls: ["flex shrink-0 flex-nowrap items-center gap-2", "bg-layer-canvas px-4 py-3"],
15473
15685
  selectionToolbar: [
15474
- "flex min-h-11 shrink-0 items-center gap-2",
15475
- "max-md:flex-wrap max-md:py-2",
15476
- "md:h-11 md:flex-nowrap md:py-0",
15686
+ "flex min-h-11 shrink-0 flex-wrap items-center gap-2 pt-1.5 pb-[5px]",
15477
15687
  "border-b border-line-hairline bg-layer-canvas px-4",
15478
15688
  "**:data-[activity-inbox-action=sort]:text-foreground-muted",
15479
15689
  "**:data-[activity-inbox-action=sort]:hover:text-foreground"
@@ -15602,7 +15812,7 @@ const searchEntity = tv({ slots: {
15602
15812
  entity: [
15603
15813
  "flex min-w-0 w-full items-center gap-3 p-3 text-left transition-colors",
15604
15814
  "relative rounded-none border-0 bg-transparent px-4 py-3 text-foreground shadow-none",
15605
- "max-md:min-h-16",
15815
+ "pointer-coarse:min-h-16",
15606
15816
  "not-first:before:absolute not-first:before:top-0 not-first:before:right-0 not-first:before:left-[55px] not-first:before:border-t not-first:before:border-line-hairline",
15607
15817
  "hover:bg-fill-subtle active:bg-fill-medium",
15608
15818
  "not-data-[selected=true]:data-popup-open:bg-fill-subtle",
package/dist/style.css CHANGED
@@ -771,14 +771,14 @@
771
771
  }
772
772
  }
773
773
 
774
- @media (width >= 40rem) {
775
- .r-steps--horizontal {
776
- flex-wrap: wrap;
777
- row-gap: 8px;
778
- }
774
+ .r-steps--horizontal {
775
+ flex-wrap: wrap;
776
+ row-gap: 8px;
777
+ inline-size: 100%;
778
+ container-type: inline-size;
779
779
  }
780
780
 
781
- @media (width < 40rem) {
781
+ @container (width < 40rem) {
782
782
  .r-steps--horizontal > .r-step {
783
783
  --r-steps-connector-gap: 6px;
784
784
  --r-steps-connector-min-width: 8px;
package/dist/styles.css CHANGED
@@ -225,6 +225,7 @@
225
225
  --color-brand-950: var(--brand-950);
226
226
  --color-brand-strong: var(--brand-strong);
227
227
  --color-brand-soft: var(--brand-soft);
228
+ --color-selection: var(--selection);
228
229
  --color-brand-hover: var(--brand-hover);
229
230
  --color-brand-active: var(--brand-active);
230
231
 
@@ -561,11 +562,12 @@ textarea:-webkit-autofill:disabled {
561
562
  yellow of a highlight and a 2px yellow underline; the passage of the open
562
563
  discussion gets the full yellow with ink type, like a search hit, in both
563
564
  modes. `--brand-400` is the `brand` role (what `bg-brand` paints):
564
- `--color-brand` is an inline theme value and emits no variable. */
565
+ `--color-brand` is an inline theme value and emits no variable. In dark
566
+ mode the wash is `--selection` (brand at 22%), kept in one place. */
565
567
  ::highlight(raft-comment) {
566
568
  background-color: light-dark(
567
569
  color-mix(in oklch, var(--brand-400) 35%, transparent),
568
- color-mix(in oklch, var(--brand-400) 22%, transparent)
570
+ var(--selection)
569
571
  );
570
572
  text-decoration-line: underline;
571
573
  text-decoration-color: var(--brand-400);