@botiverse/raft-ui 0.21.2 → 0.22.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/style.css CHANGED
@@ -276,7 +276,7 @@
276
276
  }
277
277
  }
278
278
  .r-timeline {
279
- --r-timeline-icon-size: var(--r-timeline-custom-icon-size, 9px);
279
+ --r-timeline-icon-size: var(--r-timeline-custom-icon-size, 10px);
280
280
  --r-timeline-title-font-size: var(--text-callout);
281
281
  --r-timeline-content-font-size: var(--text-mono-meta);
282
282
  --r-timeline-time-font-size: var(--text-mono-meta);
package/dist/styles.css CHANGED
@@ -578,6 +578,79 @@ textarea:-webkit-autofill:disabled {
578
578
  text-decoration-line: none;
579
579
  }
580
580
 
581
+ /* Located: the item a jump took someone to (a link to a message, Back to the
582
+ results, a comment's anchor, the rows a bulk change touched) shows
583
+ `info-soft` at once, holds it 1.2s, fades out over 0.8s and is gone at 2s
584
+ (design/foundations/states.md#located). The fill is a registered colour so
585
+ it can animate; it is painted as a layer over the item's own fill, so a
586
+ row's surface stays underneath and comes back as the cyan fades.
587
+ - Stronger marks win: an item that is selected, active, current, a search
588
+ match, checked, or has its popup open isn't painted; its own mark already
589
+ says where it is.
590
+ - Unlayered, so it beats the hover utilities (a located item doesn't answer
591
+ hover: the pointer often rests where the item lands, and a grey would
592
+ hide the cyan). Not while pressed: :active lets the press tier show.
593
+ - The app sets data-located through useLocated (lib/located.ts), which
594
+ drops it after LOCATED_MS. Setting the attribute again while it is on
595
+ doesn't restart the animation; it restarts only after it was removed
596
+ for a frame, which useLocated does. Left on, the end state is a
597
+ transparent layer that still hides hover, so don't set it by hand.
598
+ - A message row takes the fill as --mi-row-fill instead: its resting
599
+ fill is var(--located-fill), so its own marks (an open menu, a search
600
+ match, a checked box) override it like any other state, with no has-selector
601
+ here, and the delegated face's ring keeps matching the row
602
+ (message-item.recipe.ts). */
603
+ @property --located-fill {
604
+ syntax: "<color>";
605
+ inherits: false;
606
+ initial-value: transparent;
607
+ }
608
+
609
+ @keyframes raft-located {
610
+ 0%,
611
+ 60% {
612
+ --located-fill: var(--info-soft);
613
+ animation-timing-function: ease-out;
614
+ }
615
+ 100% {
616
+ --located-fill: transparent;
617
+ }
618
+ }
619
+
620
+ @keyframes raft-located-still {
621
+ from,
622
+ to {
623
+ --located-fill: var(--info-soft);
624
+ }
625
+ }
626
+
627
+ /* The shorthand replaces any animation of the element's own while it is
628
+ located; no raft-ui row has one. It runs on every located item, marked or
629
+ not, so a mark that comes and goes (a popup opened and closed) doesn't
630
+ start the highlight over. */
631
+ [data-located] {
632
+ animation: var(--located-animation, raft-located) 2s linear;
633
+ }
634
+
635
+ [data-located]:not(
636
+ [data-message-item],
637
+ :active,
638
+ [data-selected]:not([data-selected="false"]),
639
+ [data-active="true"],
640
+ [aria-selected="true"],
641
+ [aria-current]:not([aria-current="false"]),
642
+ [data-popup-open]
643
+ ) {
644
+ background-image: linear-gradient(var(--located-fill), var(--located-fill));
645
+ }
646
+
647
+ /* Reduced motion: the same 2s, held still, then off without a fade. */
648
+ @media (prefers-reduced-motion: reduce) {
649
+ [data-located] {
650
+ --located-animation: raft-located-still;
651
+ }
652
+ }
653
+
581
654
  @utility image-transparency-bg {
582
655
  --checker-cell: light-dark(oklch(0.1813 0.00497 17.62 / 0.12), oklch(1 0 0 / 0.1));
583
656
  background-color: light-dark(oklch(1 0 0), oklch(0.23 0 0));
@@ -625,9 +698,9 @@ textarea:-webkit-autofill:disabled {
625
698
  background-image: linear-gradient(var(--fill-medium), var(--fill-medium));
626
699
  }
627
700
 
628
- /* A mark that leads a line of text: the icon or status light at the start of
629
- a banner, a toast, a panel notice or a chip sits on the first line of its
630
- text, centred on it, and stays there when the text wraps
701
+ /* A mark that leads a line of text: the icon at the start of a banner, a
702
+ toast or a panel notice, or the status light of a chip, sits on the first
703
+ line of its text, centred on it, and stays there when the text wraps
631
704
  (design/foundations/alignment.md#a-mark-that-leads-text). In Space
632
705
  Grotesk's metrics the centre of the line box is the centre of the cap
633
706
  height (to 0.006em); Chromium's rounding can lift the letters 0.5px, which
@@ -640,17 +713,18 @@ textarea:-webkit-autofill:disabled {
640
713
  the mark reads `1lh` from it.
641
714
 
642
715
  `lead-dot` places a status light the same way, in a box one line tall,
643
- and keeps it at its one size beside text, 9px with a 1.5px ink edge
644
- (status.md#sizes). It is kept at 9px inside components (Banner,
645
- PanelNotice, ToastIcon, Badge, PanelActivity); when placing Status
646
- yourself, don't pass a size. */
716
+ and keeps it at its one size beside text, 10px with a 1.5px ink edge
717
+ (status.md#sizes). It is kept at 10px inside components (Badge,
718
+ PanelActivity, a panel header); when placing Status yourself, don't pass
719
+ a size. A notice never uses a status light to say what kind of notice
720
+ it is; it leads with its intent's icon (status.md#sizes). */
647
721
  @utility lead-icon {
648
722
  flex-shrink: 0;
649
723
  align-self: start;
650
724
  translate: 0 calc(0.5lh - 50%);
651
725
  }
652
726
  @utility lead-dot {
653
- --lead-dot: 9px;
727
+ --lead-dot: 10px;
654
728
  flex-shrink: 0;
655
729
  width: var(--lead-dot);
656
730
  height: var(--lead-dot);
package/dist/tokens.json CHANGED
@@ -1261,14 +1261,14 @@
1261
1261
  "link": {
1262
1262
  "$value": {
1263
1263
  "colorSpace": "oklch",
1264
- "components": [0.4878, 0.2432, 264.4]
1264
+ "components": [0.4327, 0.1282, 256.54]
1265
1265
  },
1266
1266
  "$extensions": {
1267
1267
  "build.botiverse.raft": {
1268
1268
  "modes": {
1269
1269
  "dark": {
1270
1270
  "colorSpace": "oklch",
1271
- "components": [0.8071, 0.1007, 250.45]
1271
+ "components": [0.717, 0.1183, 253.58]
1272
1272
  }
1273
1273
  }
1274
1274
  }
package/dist/wip.d.mts CHANGED
@@ -1,9 +1,9 @@
1
- import { $i as DialogTitleProps, Ai as Dialog, E as MessageQuotedPreviewAuthorDelegatedByProps, Ii as DialogContentProps, Jr as DropdownMenuLinkItemProps, Ni as DialogClose, Oi as TextLinkProps, T as MessageQuotedPreviewAuthorDelegatedBy, _n as MessageItemDelegatedByButton, a as MessageListJumpPillDismissProps, bn as MessageItemDelegatedByNameProps, c as MessageListJumpPillProps, ca as DataAttributes, ea as DialogTrigger, gn as MessageItemDelegatedBy, hn as MessageItemDelegatedAvatarProps, i as MessageListJumpPillDismiss, la as StyledProps, mn as MessageItemDelegatedAvatar, n as MessageListJumpControlsProps, o as MessageListJumpPillGroup, qr as DropdownMenuLinkItem, r as MessageListJumpPill, ra as ButtonProps, s as MessageListJumpPillGroupProps, sa as VariantProps, t as MessageListJumpControls, vn as MessageItemDelegatedByButtonProps, xn as MessageItemDelegatedByProps, yn as MessageItemDelegatedByName } from "./index-C1FHbVfH.mjs";
1
+ import { $i as MobileNavServerPopoverDestinationProps, As as DialogContentProps, B as MessageListJumpPill, C as InboxItemProps, Ca as PopoverBodyProps, Cs as DialogSheetContentProps, Ds as DialogClose, Fs as DialogFooterNoteProps, G as MessageListJumpPillProps, H as MessageListJumpPillDismissProps, Ji as MobileNavServerItemProps, Jt as MessageReferenceIcon, Ks as DialogSheetBack, Ps as DialogFooterNote, Qi as MobileNavServerPopoverDestination, Qs as DialogTrigger, R as MessageListJumpControls, Sa as PopoverBody, Ss as DialogSheetContent, Ti as PreviewCardMetaProps, U as MessageListJumpPillGroup, V as MessageListJumpPillDismiss, W as MessageListJumpPillGroupProps, Xi as MobileNavServerPopoverContent, Yi as MobileNavServerPopover, Yt as MessageReferenceIconProps, Zi as MobileNavServerPopoverContentProps, Zs as DialogTitleProps, _a as PopoverActionsProps, aa as MobileNavServerPopoverListProps, ar as MessageItemDelegatedByButtonProps, bi as PreviewCardFooter, bs as DialogCommit, ca as MobileNavServerPopoverRowBody, cc as DataAttributes, ci as PreviewCardActions, cr as MessageItemDelegatedByProps, ct as MessageQuotedPreviewAuthorDelegatedBy, da as MobileNavServerPopoverRowDescriptionProps, ea as MobileNavServerPopoverDestinations, fa as MobileNavServerPopoverRowLabel, fi as PreviewCardBody, ga as PopoverActions, ho as DropdownMenuLinkItemProps, ia as MobileNavServerPopoverList, ir as MessageItemDelegatedByButton, la as MobileNavServerPopoverRowBodyProps, lc as StyledProps, li as PreviewCardActionsProps, ls as ListRowProps, lt as MessageQuotedPreviewAuthorDelegatedByProps, ma as MobileNavServerPopoverRowProps, mo as DropdownMenuLinkItem, na as MobileNavServerPopoverGroup, nn as MessageReferenceReadMark, nr as MessageItemDelegatedAvatarProps, oa as MobileNavServerPopoverProps, or as MessageItemDelegatedByName, pa as MobileNavServerPopoverRowLabelProps, pi as PreviewCardBodyProps, qi as MobileNavServerItem, qs as DialogSheetBackProps, ra as MobileNavServerPopoverGroupProps, rc as ButtonProps, rn as MessageReferenceReadMarkProps, rr as MessageItemDelegatedBy, sa as MobileNavServerPopoverRow, sc as VariantProps, sr as MessageItemDelegatedByNameProps, ta as MobileNavServerPopoverDestinationsProps, tr as MessageItemDelegatedAvatar, u as InboxItemDensity, ua as MobileNavServerPopoverRowDescription, vi as PreviewCardEyebrow, vs as TextLinkProps, wi as PreviewCardMeta, ws as Dialog, xi as PreviewCardFooterProps, xs as DialogCommitProps, yi as PreviewCardEyebrowProps, z as MessageListJumpControlsProps } from "./inbox-item-ChANmbeB.mjs";
2
2
  import { CSSProperties, ComponentProps, ComponentPropsWithRef, PointerEvent, ReactNode, RefObject } from "react";
3
3
  import { Button } from "@base-ui/react/button";
4
4
  import { useRender } from "@base-ui/react/use-render";
5
- import { Combobox } from "@base-ui/react/combobox";
6
5
  import { PointerSensor, TouchSensor, TouchSensorOptions } from "@dnd-kit/core";
6
+ import { Combobox } from "@base-ui/react/combobox";
7
7
  import { Meter as Meter$1 } from "@base-ui/react/meter";
8
8
  //#region src/components/combobox-select/combobox-select.types.d.ts
9
9
  type ComboboxSelectValue = string | number;
@@ -392,6 +392,69 @@ type InboxItemLeadingBadgeProps = useRender.ComponentProps<"span">;
392
392
  */
393
393
  export declare function InboxItemLeadingBadge({ className, render, ...props }: InboxItemLeadingBadgeProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
394
394
  //#endregion
395
+ //#region src/components/inbox-item/inbox-item-skeleton.d.ts
396
+ type InboxItemSkeletonShape = {
397
+ /** The density of the rows it stands for. */
398
+ density?: InboxItemDensity;
399
+ /** A 35px block where the rows have an `InboxItemLeading` avatar or tile. */
400
+ leading?: boolean;
401
+ /** A context line above the title, where the rows have an `InboxItemContext`. */
402
+ context?: boolean;
403
+ };
404
+ type InboxItemSkeletonProps = Omit<InboxItemProps, "active" | "disabled" | "children"> & InboxItemSkeletonShape;
405
+ /**
406
+ * A placeholder for one `InboxItem` while the list loads. It is an
407
+ * `InboxItem` itself, with the same parts as the loaded row (an optional
408
+ * leading block, the context line, the title, the excerpt, the timestamp),
409
+ * each holding a bar instead of text. The padding, the divider and every
410
+ * line's height are the loaded row's, so nothing moves when the content
411
+ * arrives. Match `density`, `leading` and `context` to the rows it stands for.
412
+ * Hidden from assistive technology: mark the region that stays while the
413
+ * list loads `aria-busy`.
414
+ */
415
+ export declare function InboxItemSkeleton({ density, leading, context, ...props }: InboxItemSkeletonProps): import("react").JSX.Element;
416
+ type InboxItemSkeletonListProps = useRender.ComponentProps<"div"> & InboxItemSkeletonShape & {
417
+ /** How many rows to show. About a screenful; ignored when there are children. */
418
+ count?: number;
419
+ /**
420
+ * Milliseconds to wait before the rows appear, so a fast load doesn't
421
+ * flash them (Feedback, "Empty, loading and failed"). The list is empty
422
+ * until then. A list skeleton is only for a slow load, so it waits 1
423
+ * second by default; pass `0` to show the rows at once.
424
+ */
425
+ delay?: number;
426
+ };
427
+ /**
428
+ * The list of `InboxItemSkeleton` rows that stands in for a list of
429
+ * `InboxItem` rows while it loads, with nothing between or around the rows
430
+ * that the loaded list doesn't have (no gap, no border, no card). Renders
431
+ * `count` rows of the given shape, or its children, once `delay` (1 second by
432
+ * default) has passed. It isn't `aria-busy` itself: it goes away when the
433
+ * content arrives, so mark the region that stays, such as the list's panel or
434
+ * viewport, `aria-busy` while it loads.
435
+ */
436
+ export declare function InboxItemSkeletonList({ count, delay, density, leading, context, children, className, render, ...props }: InboxItemSkeletonListProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
437
+ //#endregion
438
+ //#region src/components/list-row/list-row-skeleton.d.ts
439
+ type ListRowSkeletonProps = Omit<ListRowProps, "tone" | "selected" | "interactive" | "children"> & {
440
+ /**
441
+ * A leading block: 35px for an avatar or tile in a `default` row, 20px for
442
+ * a `ListRowIcon` in a `plain` or `entry` row. On by default in a `default`
443
+ * row.
444
+ */
445
+ leading?: boolean;
446
+ /** A second line, where the rows have a `ListRowDescription`. On by default in a `default` row. */
447
+ description?: boolean;
448
+ };
449
+ /**
450
+ * A placeholder for one `ListRow` while the list loads. It is a display-only
451
+ * `ListRow` of the same `variant`, with a bar in its title, its time and its
452
+ * description, so it is the loaded row's size and its divider sits in the
453
+ * same place. Hidden from assistive technology: mark the region that stays
454
+ * while the list loads, such as its `ListRowGroup`, `aria-busy`.
455
+ */
456
+ export declare function ListRowSkeleton({ variant, leading, description, className, ...props }: ListRowSkeletonProps): import("react").JSX.Element;
457
+ //#endregion
395
458
  //#region src/components/meter/meter.d.ts
396
459
  declare const meter: import("tailwind-variants/lite").TVReturnType<{
397
460
  level: {
@@ -500,4 +563,45 @@ export declare function MeterTrack({ className, ...props }: MeterTrackProps): im
500
563
  type MeterIndicatorProps = StyledProps<Meter$1.Indicator.Props>;
501
564
  export declare function MeterIndicator({ className, ...props }: MeterIndicatorProps): import("react").JSX.Element;
502
565
  //#endregion
503
- export { Dialog as AnnouncementDialog, DialogClose as AnnouncementDialogClose, DialogTrigger as AnnouncementDialogTrigger, type ComboboxSelectGroup, type ComboboxSelectMessages, type ComboboxSelectOption, type ComboboxSelectProps, type ComboboxSelectSelection, type ComboboxSelectValue, type CommentCardMetaProps, type CommentCardProps, type CommentCardQuoteProps, type CommentCardTriggerProps, type CommentEntryAuthorProps, type CommentEntryBodyProps, type CommentEntryHeaderProps, type CommentEntryProps, type CommentEntryTimeProps, type CommentMarginItemProps, type CommentMarginLayout, type CommentMarginLayoutItem, type CommentMarginLayoutOptions, type CommentMarginProps, type CommentMarkerProps, DropdownMenuLinkItem, type DropdownMenuLinkItemProps, type EllipsisProps, type EllipsisState, type EllipsisToggleProps, type HoldThenMoveOptions, type InboxItemLeadingBadgeProps, MessageItemDelegatedAvatar, type MessageItemDelegatedAvatarProps, MessageItemDelegatedBy, MessageItemDelegatedByButton, type MessageItemDelegatedByButtonProps, MessageItemDelegatedByName, type MessageItemDelegatedByNameProps, type MessageItemDelegatedByProps, MessageListJumpControls, type MessageListJumpControlsProps, MessageListJumpPill, MessageListJumpPillDismiss, type MessageListJumpPillDismissProps, MessageListJumpPillGroup, type MessageListJumpPillGroupProps, type MessageListJumpPillProps, MessageQuotedPreviewAuthorDelegatedBy, type MessageQuotedPreviewAuthorDelegatedByProps, type MeterHeaderProps, type MeterIndicatorProps, type MeterLabelProps, type MeterProps, type MeterTrackProps, type MeterValueProps, type UseCommentMarginFitsOptions };
566
+ //#region src/lib/overlay-depth.d.ts
567
+ /**
568
+ * A modal surface: a centred dialog (Dialog, AlertDialog, or an app's own
569
+ * modal) or a sheet (Drawer).
570
+ */
571
+ type OverlayLayerKind = "dialog" | "drawer";
572
+ type OverlayLayerProviderProps = {
573
+ /**
574
+ * What the surface is. Use `"dialog"` for an app's own modal, whatever it
575
+ * looks like: `"drawer"` is for a Base UI Drawer, which nests under another
576
+ * drawer by itself and only draws its own scrim over a `"dialog"`.
577
+ */
578
+ kind: OverlayLayerKind;
579
+ /** Whether it dims what is under it. A non-modal surface adds nothing. */
580
+ modal: boolean;
581
+ children?: ReactNode;
582
+ };
583
+ /**
584
+ * Tells everything under it that a modal surface is open, so a raft-ui
585
+ * Dialog, AlertDialog or Drawer opened from inside draws the lighter nested
586
+ * scrim (design/foundations/elevation.md#stacked-overlays). raft-ui's own
587
+ * roots add one by themselves; an app's own modal (its own backdrop, Esc and
588
+ * focus) wraps its scrim and its content in one to join the stack, and reads
589
+ * `useParentOverlayKind` inside it to pick its own scrim. Modal overlays only:
590
+ * a non-modal one passes `modal={false}`, adds nothing, and must not call
591
+ * `useParentOverlayKind` (it would read the layer below as its own).
592
+ */
593
+ export declare function OverlayLayerProvider({ kind, modal, children }: OverlayLayerProviderProps): import("react").JSX.Element;
594
+ /**
595
+ * The modal surface this overlay's own surface was opened from, or null when
596
+ * it is the first. Call it inside the surface's own `OverlayLayerProvider`
597
+ * (for raft-ui's overlays, inside their root): the last entry is the surface
598
+ * itself and the one before it is its parent. Not null means the surface is
599
+ * stacked over another and draws `layer-backdrop-nested` instead of
600
+ * `layer-backdrop`. Modal overlays only: under `modal={false}` nothing is
601
+ * added, so the last entry is the parent and this returns the wrong layer. It reads React context, so it sees the surfaces whose
602
+ * tree this one is rendered in, portals included; one opened from outside
603
+ * that tree is not stacked on it here.
604
+ */
605
+ export declare function useParentOverlayKind(): OverlayLayerKind | null;
606
+ //#endregion
607
+ export { Dialog as AnnouncementDialog, DialogClose as AnnouncementDialogClose, DialogTrigger as AnnouncementDialogTrigger, type ComboboxSelectGroup, type ComboboxSelectMessages, type ComboboxSelectOption, type ComboboxSelectProps, type ComboboxSelectSelection, type ComboboxSelectValue, type CommentCardMetaProps, type CommentCardProps, type CommentCardQuoteProps, type CommentCardTriggerProps, type CommentEntryAuthorProps, type CommentEntryBodyProps, type CommentEntryHeaderProps, type CommentEntryProps, type CommentEntryTimeProps, type CommentMarginItemProps, type CommentMarginLayout, type CommentMarginLayoutItem, type CommentMarginLayoutOptions, type CommentMarginProps, type CommentMarkerProps, DialogCommit, type DialogCommitProps, DialogFooterNote, type DialogFooterNoteProps, DialogSheetBack, type DialogSheetBackProps, DialogSheetContent, type DialogSheetContentProps, DropdownMenuLinkItem, type DropdownMenuLinkItemProps, type EllipsisProps, type EllipsisState, type EllipsisToggleProps, type HoldThenMoveOptions, type InboxItemLeadingBadgeProps, type InboxItemSkeletonListProps, type InboxItemSkeletonProps, type ListRowSkeletonProps, MessageItemDelegatedAvatar, type MessageItemDelegatedAvatarProps, MessageItemDelegatedBy, MessageItemDelegatedByButton, type MessageItemDelegatedByButtonProps, MessageItemDelegatedByName, type MessageItemDelegatedByNameProps, type MessageItemDelegatedByProps, MessageListJumpControls, type MessageListJumpControlsProps, MessageListJumpPill, MessageListJumpPillDismiss, type MessageListJumpPillDismissProps, MessageListJumpPillGroup, type MessageListJumpPillGroupProps, type MessageListJumpPillProps, MessageQuotedPreviewAuthorDelegatedBy, type MessageQuotedPreviewAuthorDelegatedByProps, MessageReferenceIcon, type MessageReferenceIconProps, MessageReferenceReadMark, type MessageReferenceReadMarkProps, type MeterHeaderProps, type MeterIndicatorProps, type MeterLabelProps, type MeterProps, type MeterTrackProps, type MeterValueProps, MobileNavServerItem, type MobileNavServerItemProps, MobileNavServerPopover, MobileNavServerPopoverContent, type MobileNavServerPopoverContentProps, MobileNavServerPopoverDestination, type MobileNavServerPopoverDestinationProps, MobileNavServerPopoverDestinations, type MobileNavServerPopoverDestinationsProps, MobileNavServerPopoverGroup, type MobileNavServerPopoverGroupProps, MobileNavServerPopoverList, type MobileNavServerPopoverListProps, type MobileNavServerPopoverProps, MobileNavServerPopoverRow, MobileNavServerPopoverRowBody, type MobileNavServerPopoverRowBodyProps, MobileNavServerPopoverRowDescription, type MobileNavServerPopoverRowDescriptionProps, MobileNavServerPopoverRowLabel, type MobileNavServerPopoverRowLabelProps, type MobileNavServerPopoverRowProps, type OverlayLayerKind, type OverlayLayerProviderProps, PopoverActions, type PopoverActionsProps, PopoverBody, type PopoverBodyProps, PreviewCardActions, type PreviewCardActionsProps, PreviewCardBody, type PreviewCardBodyProps, PreviewCardEyebrow, type PreviewCardEyebrowProps, PreviewCardFooter, type PreviewCardFooterProps, PreviewCardMeta, type PreviewCardMetaProps, type UseCommentMarginFitsOptions };
package/dist/wip.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $n as DialogTitle, Fn as TooltipContent, Gn as DialogContent, Gt as measureContent, Hn as Dialog, Jt as readNow, Kt as measureElement, Pn as Tooltip, Rn as TooltipTrigger, Wn as DialogClose, Wt as useOverflowTitle, _ as MessageQuotedPreviewAuthorDelegatedBy, _t as MessageItemDelegatedByName, a as MessageListJumpPill, cr as useThemeScopeProps, dr as tv, er as DialogTrigger, gt as MessageItemDelegatedByButton, ht as MessageItemDelegatedBy, i as MessageListJumpControls, in as DropdownMenuLinkItem, ir as defaultNativeButton, lr as useTheme, mt as MessageItemDelegatedAvatar, n as useHoldThenMoveTouchSensor, o as MessageListJumpPillDismiss, qt as observeTruncation, s as MessageListJumpPillGroup, t as inboxItem, tr as Button$1, zn as TextLink } from "./inbox-item.recipe-CuJPcy-3.mjs";
1
+ import { $r as ListRowTitle, An as MobileNavServerItem, Bn as MobileNavServerPopoverRowLabel, C as MessageListJumpPillDismiss, Fi as OverlayLayerProvider, Fn as MobileNavServerPopoverGroup, Ft as MessageItemDelegatedBy, Gn as PopoverBody, Gr as ListRow, Hn as PopoverActions, Ii as useParentOverlayKind, In as MobileNavServerPopoverList, It as MessageItemDelegatedByButton, Kr as ListRowBody, Ln as MobileNavServerPopoverRow, Lt as MessageItemDelegatedByName, Mn as MobileNavServerPopoverContent, Nn as MobileNavServerPopoverDestination, Oi as TextLink, P as MessageQuotedPreviewAuthorDelegatedBy, Pi as defaultNativeButton, Pn as MobileNavServerPopoverDestinations, Pt as MessageItemDelegatedAvatar, Qr as ListRowMeta, Ri as useThemeScopeProps, Rn as MobileNavServerPopoverRowBody, S as MessageListJumpPill, Si as DialogSheetBack, Sn as PreviewCardFooter, Ti as DialogTrigger, Vi as tv, Yr as ListRowDescription, _ as InboxItemTrailing, _i as DialogFooterNote, a as InboxItemContext, b as Skeleton, c as InboxItemLeading, ci as DialogCommit, ct as MessageReferenceReadMark, di as Dialog, dn as measureContent, ei as ListRowTop, fn as measureElement, g as InboxItemTitle, gn as PreviewCardActions, gr as DropdownMenuLinkItem, h as InboxItemTimestamp, i as InboxItemContent, it as MessageReferenceIcon, ji as Button$1, jn as MobileNavServerPopover, li as DialogSheetContent, mi as DialogContent, mn as readNow, ni as Tooltip, nr as useHoldThenMoveTouchSensor, o as InboxItemHeading, oi as TooltipTrigger, pi as DialogClose, pn as observeTruncation, qr as ListRowBottom, r as InboxItemBody, ri as TooltipContent, t as InboxItem, un as useOverflowTitle, vn as PreviewCardBody, w as MessageListJumpPillGroup, wi as DialogTitle, wn as PreviewCardMeta, x as MessageListJumpControls, xn as PreviewCardEyebrow, y as inboxItem, zi as useTheme, zn as MobileNavServerPopoverRowDescription } from "./inbox-item-BtvK75T1.mjs";
2
2
  import { Check, ChevronDown, LoaderCircle, Plus, X } from "lucide-react";
3
3
  import { createContext, use, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
4
4
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -528,7 +528,7 @@ const announcement = tv({ slots: {
528
528
  ],
529
529
  header: ["flex min-w-0 items-center justify-between gap-3"],
530
530
  label: ["flex min-w-0 items-center gap-2 wrap-break-word", "text-caption text-foreground-muted"],
531
- dot: ["shrink-0", "size-[9px] rounded-[2px] border-[1.5px] border-sticker-ink bg-attention-400"],
531
+ dot: ["shrink-0", "size-2.5 rounded-[2px] border-[1.5px] border-sticker-ink bg-attention-400"],
532
532
  title: ["mt-3 wrap-break-word normal-case", "text-headline font-bold tracking-normal"],
533
533
  picture: ["mt-5 h-44 w-full overflow-hidden border border-line-hairline [&_img]:size-full [&_img]:object-contain", "rounded-container bg-fill-muted"],
534
534
  text: [
@@ -1491,6 +1491,142 @@ function InboxItemLeadingBadge({ className, render, ...props }) {
1491
1491
  });
1492
1492
  }
1493
1493
  //#endregion
1494
+ //#region src/components/inbox-item/inbox-item-skeleton.recipe.ts
1495
+ const inboxItemSkeleton = tv({ slots: {
1496
+ list: ["flex min-w-0 flex-col"],
1497
+ row: [
1498
+ "[--inbox-item-skeleton-context:5rem] [--inbox-item-skeleton-title:60%] [--inbox-item-skeleton-body:80%]",
1499
+ "nth-[3n+2]:[--inbox-item-skeleton-context:4rem] nth-[3n+2]:[--inbox-item-skeleton-title:45%] nth-[3n+2]:[--inbox-item-skeleton-body:70%]",
1500
+ "nth-[3n]:[--inbox-item-skeleton-context:6rem] nth-[3n]:[--inbox-item-skeleton-title:55%] nth-[3n]:[--inbox-item-skeleton-body:75%]"
1501
+ ],
1502
+ leading: ["size-[35px]"],
1503
+ line: ["min-w-0 flex-1"],
1504
+ title: ["pl-0"],
1505
+ bar: ["inline-block h-[0.75em] max-w-full align-middle"],
1506
+ contextBar: ["w-(--inbox-item-skeleton-context)"],
1507
+ titleBar: ["w-(--inbox-item-skeleton-title)"],
1508
+ bodyBar: ["w-(--inbox-item-skeleton-body)"],
1509
+ timestampBar: ["w-9"]
1510
+ } });
1511
+ //#endregion
1512
+ //#region src/components/inbox-item/inbox-item-skeleton.tsx
1513
+ /**
1514
+ * A placeholder for one `InboxItem` while the list loads. It is an
1515
+ * `InboxItem` itself, with the same parts as the loaded row (an optional
1516
+ * leading block, the context line, the title, the excerpt, the timestamp),
1517
+ * each holding a bar instead of text. The padding, the divider and every
1518
+ * line's height are the loaded row's, so nothing moves when the content
1519
+ * arrives. Match `density`, `leading` and `context` to the rows it stands for.
1520
+ * Hidden from assistive technology: mark the region that stays while the
1521
+ * list loads `aria-busy`.
1522
+ */
1523
+ function InboxItemSkeleton({ density, leading = false, context = false, ...props }) {
1524
+ const slots = inboxItemSkeleton();
1525
+ const bar = (width) => /* @__PURE__ */ jsx(Skeleton, {
1526
+ variant: "line",
1527
+ className: slots.bar({ className: width })
1528
+ });
1529
+ return /* @__PURE__ */ jsxs(InboxItem, {
1530
+ "aria-hidden": true,
1531
+ "data-skeleton": "",
1532
+ density,
1533
+ disabled: true,
1534
+ ...props,
1535
+ className: slots.row({ className: props.className }),
1536
+ children: [
1537
+ leading ? /* @__PURE__ */ jsx(InboxItemLeading, { children: /* @__PURE__ */ jsx(Skeleton, { className: slots.leading() }) }) : null,
1538
+ /* @__PURE__ */ jsxs(InboxItemContent, { children: [
1539
+ context ? /* @__PURE__ */ jsx(InboxItemContext, { children: /* @__PURE__ */ jsx("span", {
1540
+ className: slots.line(),
1541
+ children: bar(slots.contextBar())
1542
+ }) }) : null,
1543
+ /* @__PURE__ */ jsx(InboxItemHeading, { children: /* @__PURE__ */ jsx(InboxItemTitle, {
1544
+ className: slots.title(),
1545
+ children: bar(slots.titleBar())
1546
+ }) }),
1547
+ /* @__PURE__ */ jsx(InboxItemBody, { children: bar(slots.bodyBar()) })
1548
+ ] }),
1549
+ /* @__PURE__ */ jsx(InboxItemTrailing, { children: /* @__PURE__ */ jsx(InboxItemTimestamp, { children: bar(slots.timestampBar()) }) })
1550
+ ]
1551
+ });
1552
+ }
1553
+ /**
1554
+ * The list of `InboxItemSkeleton` rows that stands in for a list of
1555
+ * `InboxItem` rows while it loads, with nothing between or around the rows
1556
+ * that the loaded list doesn't have (no gap, no border, no card). Renders
1557
+ * `count` rows of the given shape, or its children, once `delay` (1 second by
1558
+ * default) has passed. It isn't `aria-busy` itself: it goes away when the
1559
+ * content arrives, so mark the region that stays, such as the list's panel or
1560
+ * viewport, `aria-busy` while it loads.
1561
+ */
1562
+ function InboxItemSkeletonList({ count = 6, delay = 1e3, density, leading, context, children, className, render, ...props }) {
1563
+ const { list } = inboxItemSkeleton();
1564
+ const shown = useDelayPassed(delay);
1565
+ const defaultProps = {
1566
+ "data-slot": "inbox-item-skeleton-list",
1567
+ "data-waiting": shown ? void 0 : "",
1568
+ className: list({ className }),
1569
+ children: shown ? children ?? Array.from({ length: count }, (_, index) => /* @__PURE__ */ jsx(InboxItemSkeleton, {
1570
+ density,
1571
+ leading,
1572
+ context
1573
+ }, index)) : null
1574
+ };
1575
+ return useRender({
1576
+ defaultTagName: "div",
1577
+ render,
1578
+ props: mergeProps(defaultProps, props)
1579
+ });
1580
+ }
1581
+ /** Whether `delay` milliseconds have passed since mount; at once for `0`. */
1582
+ function useDelayPassed(delay) {
1583
+ const [passed, setPassed] = useState(false);
1584
+ useEffect(() => {
1585
+ if (delay <= 0) return;
1586
+ const timer = setTimeout(() => setPassed(true), delay);
1587
+ return () => clearTimeout(timer);
1588
+ }, [delay]);
1589
+ return passed || delay <= 0;
1590
+ }
1591
+ //#endregion
1592
+ //#region src/components/list-row/list-row-skeleton.tsx
1593
+ const listRowSkeleton = tv({ slots: {
1594
+ row: [
1595
+ "[--list-row-skeleton-title:45%] [--list-row-skeleton-description:75%]",
1596
+ "nth-[3n+2]:[--list-row-skeleton-title:35%] nth-[3n+2]:[--list-row-skeleton-description:60%]",
1597
+ "nth-[3n]:[--list-row-skeleton-title:55%] nth-[3n]:[--list-row-skeleton-description:70%]"
1598
+ ],
1599
+ avatar: ["size-[35px] shrink-0"],
1600
+ icon: ["size-5 shrink-0"],
1601
+ bar: ["inline-block h-[0.75em] max-w-full align-middle"],
1602
+ titleBar: ["w-(--list-row-skeleton-title)"],
1603
+ descriptionBar: ["w-(--list-row-skeleton-description)"],
1604
+ metaBar: ["w-9"]
1605
+ } });
1606
+ /**
1607
+ * A placeholder for one `ListRow` while the list loads. It is a display-only
1608
+ * `ListRow` of the same `variant`, with a bar in its title, its time and its
1609
+ * description, so it is the loaded row's size and its divider sits in the
1610
+ * same place. Hidden from assistive technology: mark the region that stays
1611
+ * while the list loads, such as its `ListRowGroup`, `aria-busy`.
1612
+ */
1613
+ function ListRowSkeleton({ variant = "default", leading = variant === "default", description = variant === "default", className, ...props }) {
1614
+ const slots = listRowSkeleton();
1615
+ const bar = (width) => /* @__PURE__ */ jsx(Skeleton, {
1616
+ variant: "line",
1617
+ className: slots.bar({ className: width })
1618
+ });
1619
+ return /* @__PURE__ */ jsxs(ListRow, {
1620
+ "aria-hidden": true,
1621
+ "data-skeleton": "",
1622
+ interactive: false,
1623
+ variant,
1624
+ ...props,
1625
+ className: slots.row({ className }),
1626
+ children: [leading ? /* @__PURE__ */ jsx(Skeleton, { className: variant === "default" ? slots.avatar() : slots.icon() }) : null, /* @__PURE__ */ jsxs(ListRowBody, { children: [/* @__PURE__ */ jsxs(ListRowTop, { children: [/* @__PURE__ */ jsx(ListRowTitle, { children: bar(slots.titleBar()) }), variant === "default" ? /* @__PURE__ */ jsx(ListRowMeta, { children: bar(slots.metaBar()) }) : null] }), description ? /* @__PURE__ */ jsx(ListRowBottom, { children: /* @__PURE__ */ jsx(ListRowDescription, { children: bar(slots.descriptionBar()) }) }) : null] })]
1627
+ });
1628
+ }
1629
+ //#endregion
1494
1630
  //#region src/components/meter/meter.tsx
1495
1631
  const meter = tv({
1496
1632
  slots: {
@@ -1614,4 +1750,4 @@ function MeterIndicator({ className, ...props }) {
1614
1750
  });
1615
1751
  }
1616
1752
  //#endregion
1617
- export { Dialog as AnnouncementDialog, AnnouncementDialogAction, AnnouncementDialogBody, DialogClose as AnnouncementDialogClose, AnnouncementDialogContent, AnnouncementDialogFooter, AnnouncementDialogHeader, AnnouncementDialogLabel, AnnouncementDialogPicture, AnnouncementDialogSecondaryAction, AnnouncementDialogText, AnnouncementDialogTitle, DialogTrigger as AnnouncementDialogTrigger, COMMENT_HIGHLIGHT, COMMENT_HIGHLIGHT_ACTIVE, ComboboxSelect, CommentCard, CommentCardMeta, CommentCardQuote, CommentCardTrigger, CommentEntry, CommentEntryAuthor, CommentEntryBody, CommentEntryHeader, CommentEntryTime, CommentMargin, CommentMarginItem, CommentMarker, DropdownMenuLinkItem, Ellipsis, EllipsisToggle, InboxItemLeadingBadge, MessageItemDelegatedAvatar, MessageItemDelegatedBy, MessageItemDelegatedByButton, MessageItemDelegatedByName, MessageListJumpControls, MessageListJumpPill, MessageListJumpPillDismiss, MessageListJumpPillGroup, MessageQuotedPreviewAuthorDelegatedBy, Meter, MeterHeader, MeterIndicator, MeterLabel, MeterTrack, MeterValue, resolveCommentMarginLayout, setCommentHighlights, useCommentMarginFits, useHoldThenMoveTouchSensor, useTruncated };
1753
+ export { Dialog as AnnouncementDialog, AnnouncementDialogAction, AnnouncementDialogBody, DialogClose as AnnouncementDialogClose, AnnouncementDialogContent, AnnouncementDialogFooter, AnnouncementDialogHeader, AnnouncementDialogLabel, AnnouncementDialogPicture, AnnouncementDialogSecondaryAction, AnnouncementDialogText, AnnouncementDialogTitle, DialogTrigger as AnnouncementDialogTrigger, COMMENT_HIGHLIGHT, COMMENT_HIGHLIGHT_ACTIVE, ComboboxSelect, CommentCard, CommentCardMeta, CommentCardQuote, CommentCardTrigger, CommentEntry, CommentEntryAuthor, CommentEntryBody, CommentEntryHeader, CommentEntryTime, CommentMargin, CommentMarginItem, CommentMarker, DialogCommit, DialogFooterNote, DialogSheetBack, DialogSheetContent, DropdownMenuLinkItem, Ellipsis, EllipsisToggle, InboxItemLeadingBadge, InboxItemSkeleton, InboxItemSkeletonList, ListRowSkeleton, MessageItemDelegatedAvatar, MessageItemDelegatedBy, MessageItemDelegatedByButton, MessageItemDelegatedByName, MessageListJumpControls, MessageListJumpPill, MessageListJumpPillDismiss, MessageListJumpPillGroup, MessageQuotedPreviewAuthorDelegatedBy, MessageReferenceIcon, MessageReferenceReadMark, Meter, MeterHeader, MeterIndicator, MeterLabel, MeterTrack, MeterValue, MobileNavServerItem, MobileNavServerPopover, MobileNavServerPopoverContent, MobileNavServerPopoverDestination, MobileNavServerPopoverDestinations, MobileNavServerPopoverGroup, MobileNavServerPopoverList, MobileNavServerPopoverRow, MobileNavServerPopoverRowBody, MobileNavServerPopoverRowDescription, MobileNavServerPopoverRowLabel, OverlayLayerProvider, PopoverActions, PopoverBody, PreviewCardActions, PreviewCardBody, PreviewCardEyebrow, PreviewCardFooter, PreviewCardMeta, resolveCommentMarginLayout, setCommentHighlights, useCommentMarginFits, useHoldThenMoveTouchSensor, useParentOverlayKind, useTruncated };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botiverse/raft-ui",
3
- "version": "0.21.2",
3
+ "version": "0.22.1",
4
4
  "description": "React components and CSS foundations for the Raft Design System.",
5
5
  "keywords": [
6
6
  "agent-skills",