@botiverse/raft-ui 0.22.0 → 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));
@@ -640,8 +713,8 @@ 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 (Badge,
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,
645
718
  PanelActivity, a panel header); when placing Status yourself, don't pass
646
719
  a size. A notice never uses a status light to say what kind of notice
647
720
  it is; it leads with its intent's icon (status.md#sizes). */
@@ -651,7 +724,7 @@ textarea:-webkit-autofill:disabled {
651
724
  translate: 0 calc(0.5lh - 50%);
652
725
  }
653
726
  @utility lead-dot {
654
- --lead-dot: 9px;
727
+ --lead-dot: 10px;
655
728
  flex-shrink: 0;
656
729
  width: var(--lead-dot);
657
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,4 +1,4 @@
1
- import { $o as VariantProps, Aa as DropdownMenuLinkItemProps, Br as PreviewCardMetaProps, Ci as MobileNavServerPopoverRowBody, Cn as MessageItemDelegatedByProps, Cr as PreviewCardActions, Di as MobileNavServerPopoverRowLabel, Do as DialogFooterNoteProps, Dr as PreviewCardBody, E as MessageQuotedPreviewAuthorDelegatedByProps, Ei as MobileNavServerPopoverRowDescriptionProps, Eo as DialogFooterNote, Fr as PreviewCardFooter, Ir as PreviewCardFooterProps, Li as PopoverBody, Mi as PopoverActionsProps, Nr as PreviewCardEyebrow, Oi as MobileNavServerPopoverRowLabelProps, Or as PreviewCardBodyProps, Pr as PreviewCardEyebrowProps, Ri as PopoverBodyProps, Ro as DialogSheetBack, Si as MobileNavServerPopoverRow, Sn as MessageItemDelegatedByNameProps, So as DialogContentProps, T as MessageQuotedPreviewAuthorDelegatedBy, Ti as MobileNavServerPopoverRowDescription, Uo as DialogTitleProps, Wo as DialogTrigger, Yo as ButtonProps, _i as MobileNavServerPopoverGroup, _n as MessageItemDelegatedAvatarProps, a as MessageListJumpPillDismissProps, bi as MobileNavServerPopoverListProps, bn as MessageItemDelegatedByButtonProps, c as MessageListJumpPillProps, ci as MobileNavServerItem, di as MobileNavServerPopoverContent, dt as MessageReferenceIcon, es as DataAttributes, fi as MobileNavServerPopoverContentProps, fo as DialogCommit, ft as MessageReferenceIconProps, gi as MobileNavServerPopoverDestinationsProps, gn as MessageItemDelegatedAvatar, go as Dialog, hi as MobileNavServerPopoverDestinations, ho as DialogSheetContentProps, i as MessageListJumpPillDismiss, ji as PopoverActions, ka as DropdownMenuLinkItem, ki as MobileNavServerPopoverRowProps, li as MobileNavServerItemProps, mi as MobileNavServerPopoverDestinationProps, mo as DialogSheetContent, n as MessageListJumpControlsProps, o as MessageListJumpPillGroup, pi as MobileNavServerPopoverDestination, po as DialogCommitProps, r as MessageListJumpPill, s as MessageListJumpPillGroupProps, t as MessageListJumpControls, ts as StyledProps, ui as MobileNavServerPopover, uo as TextLinkProps, vi as MobileNavServerPopoverGroupProps, vn as MessageItemDelegatedBy, wi as MobileNavServerPopoverRowBodyProps, wr as PreviewCardActionsProps, xi as MobileNavServerPopoverProps, xn as MessageItemDelegatedByName, yi as MobileNavServerPopoverList, yn as MessageItemDelegatedByButton, yo as DialogClose, zo as DialogSheetBackProps, zr as PreviewCardMeta } from "./index-DT1Hg5N-.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";
@@ -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: {
@@ -541,4 +604,4 @@ export declare function OverlayLayerProvider({ kind, modal, children }: OverlayL
541
604
  */
542
605
  export declare function useParentOverlayKind(): OverlayLayerKind | null;
543
606
  //#endregion
544
- 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, 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, 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 };
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 { Br as DialogFooterNote, Er as TooltipContent, Gr as DialogSheetBack, Gt as measureContent, In as useHoldThenMoveTouchSensor, Ir as DialogClose, Jr as DialogTrigger, Jt as readNow, Kt as measureElement, Lr as DialogContent, Mr as DialogSheetContent, Pr as Dialog, Qt as PreviewCardBody, Sn as PopoverActions, Tn as PopoverBody, Tr as Tooltip, Wt as useOverflowTitle, Xn as DropdownMenuLinkItem, Xt as PreviewCardActions, Zr as TextLink, _n as MobileNavServerPopoverRow, _t as MessageItemDelegatedByName, a as MessageListJumpPillGroup, ai as useParentOverlayKind, bn as MobileNavServerPopoverRowLabel, ci as useTheme, dn as MobileNavServerPopover, ei as Button$1, fn as MobileNavServerPopoverContent, gn as MobileNavServerPopoverList, gt as MessageItemDelegatedByButton, h as MessageQuotedPreviewAuthorDelegatedBy, hn as MobileNavServerPopoverGroup, ht as MessageItemDelegatedBy, i as MessageListJumpPillDismiss, ii as OverlayLayerProvider, in as PreviewCardMeta, jr as DialogCommit, kr as TooltipTrigger, mn as MobileNavServerPopoverDestinations, mt as MessageItemDelegatedAvatar, n as MessageListJumpControls, nn as PreviewCardFooter, pn as MobileNavServerPopoverDestination, qr as DialogTitle, qt as observeTruncation, r as MessageListJumpPill, ri as defaultNativeButton, si as useThemeScopeProps, t as inboxItem, tn as PreviewCardEyebrow, ui as tv, un as MobileNavServerItem, vn as MobileNavServerPopoverRowBody, yn as MobileNavServerPopoverRowDescription, z as MessageReferenceIcon } from "./inbox-item.recipe-3j4DHKZ2.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, DialogCommit, DialogFooterNote, DialogSheetBack, DialogSheetContent, DropdownMenuLinkItem, Ellipsis, EllipsisToggle, InboxItemLeadingBadge, MessageItemDelegatedAvatar, MessageItemDelegatedBy, MessageItemDelegatedByButton, MessageItemDelegatedByName, MessageListJumpControls, MessageListJumpPill, MessageListJumpPillDismiss, MessageListJumpPillGroup, MessageQuotedPreviewAuthorDelegatedBy, MessageReferenceIcon, 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 };
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.22.0",
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",