@botiverse/raft-ui 0.23.1 → 0.25.0
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/CHANGELOG.md +125 -0
- package/dist/{inbox-item-ChGeZBFb.d.mts → inbox-item-CiTYKTly.d.mts} +15 -5
- package/dist/{inbox-item-B56I-Ckt.mjs → inbox-item-nHjMl3SO.mjs} +148 -10
- package/dist/index.d.mts +4 -2
- package/dist/index.mjs +41 -22
- package/dist/styles.css +23 -0
- package/dist/themes.css +474 -0
- package/dist/wip.d.mts +1 -1
- package/dist/wip.mjs +1 -1
- package/package.json +4 -2
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-
|
|
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-nHjMl3SO.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";
|
|
@@ -336,7 +336,7 @@ const drawer = tv({
|
|
|
336
336
|
swipeHandle: [
|
|
337
337
|
"relative z-10 shrink-0 cursor-grab select-none active:cursor-grabbing",
|
|
338
338
|
"before:absolute before:content-['']",
|
|
339
|
-
"before:rounded-
|
|
339
|
+
"before:rounded-full before:bg-line-seam"
|
|
340
340
|
],
|
|
341
341
|
close: ["shrink-0"],
|
|
342
342
|
closeIcon: ["size-control-icon"],
|
|
@@ -1049,7 +1049,8 @@ const appRail = tv({ slots: {
|
|
|
1049
1049
|
nav: [
|
|
1050
1050
|
"flex w-full flex-1 flex-col items-center py-2",
|
|
1051
1051
|
"gap-1.5 pt-2.5 pb-2 first:pt-2",
|
|
1052
|
-
"[@media(max-height:600px)]:pt-1.5 [@media(max-height:600px)]:first:pt-1.5"
|
|
1052
|
+
"[@media(max-height:600px)]:pt-1.5 [@media(max-height:600px)]:first:pt-1.5",
|
|
1053
|
+
"after:mt-auto after:h-28 after:min-h-0 after:w-12 after:shrink after:content-[''] after:frame-decor-rail"
|
|
1053
1054
|
],
|
|
1054
1055
|
footer: ["flex w-full shrink-0 flex-col items-center justify-center", "h-auto gap-1.5 pb-2 [@media(max-height:600px)]:pb-1.5"],
|
|
1055
1056
|
item: [
|
|
@@ -1666,7 +1667,7 @@ const sidebarItemRecipe = tv({
|
|
|
1666
1667
|
"max-md:h-auto max-md:min-h-11 max-md:py-[8.5px]",
|
|
1667
1668
|
"font-sans text-subhead font-medium text-foreground",
|
|
1668
1669
|
"max-md:text-body max-md:font-semibold",
|
|
1669
|
-
"data-active:border-
|
|
1670
|
+
"data-active:border-brand-edge data-active:bg-brand data-active:font-bold data-active:text-sticker-ink data-active:ring-[1.5px] data-active:ring-sticker-edge",
|
|
1670
1671
|
"not-data-active:data-[tone=muted]:text-foreground-muted not-data-active:data-[tone=away]:text-foreground-hint",
|
|
1671
1672
|
"outline-none"
|
|
1672
1673
|
],
|
|
@@ -1764,7 +1765,7 @@ function MessageIcon(props) {
|
|
|
1764
1765
|
stroke: "currentColor",
|
|
1765
1766
|
strokeLinecap: "round",
|
|
1766
1767
|
strokeLinejoin: "round",
|
|
1767
|
-
strokeWidth: 1,
|
|
1768
|
+
strokeWidth: 1.5,
|
|
1768
1769
|
...props,
|
|
1769
1770
|
children: /* @__PURE__ */ jsx("path", { d: "M14.25 2.25H3.75C2.65 2.25 1.75 3.15 1.75 4.25V11.25C1.75 12.35 2.65 13.25 3.75 13.25H5.75V16.25L9.5 13.25H14.25C15.35 13.25 16.25 12.35 16.25 11.25V4.25C16.25 3.15 15.35 2.25 14.25 2.25Z" })
|
|
1770
1771
|
});
|
|
@@ -1781,7 +1782,7 @@ function ChatIcon(props) {
|
|
|
1781
1782
|
stroke: "currentColor",
|
|
1782
1783
|
strokeLinecap: "round",
|
|
1783
1784
|
strokeLinejoin: "round",
|
|
1784
|
-
strokeWidth: 1,
|
|
1785
|
+
strokeWidth: 1.5,
|
|
1785
1786
|
...props,
|
|
1786
1787
|
children: [
|
|
1787
1788
|
/* @__PURE__ */ jsx("path", { d: "M14.25 2.25H3.75C2.65 2.25 1.75 3.15 1.75 4.25V11.25C1.75 12.35 2.65 13.25 3.75 13.25H5.75V16.25L9.5 13.25H14.25C15.35 13.25 16.25 12.35 16.25 11.25V4.25C16.25 3.15 15.35 2.25 14.25 2.25Z" }),
|
|
@@ -1846,13 +1847,9 @@ function ThreadIcon(props) {
|
|
|
1846
1847
|
stroke: "currentColor",
|
|
1847
1848
|
strokeLinecap: "round",
|
|
1848
1849
|
strokeLinejoin: "round",
|
|
1849
|
-
strokeWidth: 1,
|
|
1850
|
+
strokeWidth: 1.5,
|
|
1850
1851
|
...props,
|
|
1851
|
-
children: [/* @__PURE__ */ jsx("path", { d: "
|
|
1852
|
-
d: "M8.75 5.5H15.5C16.6 5.5 17.5 6.4 17.5 7.5V12.25C17.5 13.35 16.6 14.25 15.5 14.25H14V16.75L10.75 14.25H8.75C7.65 14.25 6.75 13.35 6.75 12.25V7.5C6.75 6.4 7.65 5.5 8.75 5.5Z",
|
|
1853
|
-
fill: "currentColor",
|
|
1854
|
-
stroke: "none"
|
|
1855
|
-
})]
|
|
1852
|
+
children: [/* @__PURE__ */ jsx("path", { d: "M3.5 11.5L1.75 13.25V4.25A2 2 0 0 1 3.75 2.25H11.25" }), /* @__PURE__ */ jsx("path", { d: "M8.25 5H14.5C15.6 5 16.5 5.9 16.5 7V11.75C16.5 12.85 15.6 13.75 14.5 13.75H13V16.25L9.75 13.75H8.25C7.15 13.75 6.25 12.85 6.25 11.75V7C6.25 5.9 7.15 5 8.25 5Z" })]
|
|
1856
1853
|
});
|
|
1857
1854
|
}
|
|
1858
1855
|
//#endregion
|
|
@@ -9491,7 +9488,7 @@ const banner = tv({
|
|
|
9491
9488
|
defaultVariants: { size: "md" },
|
|
9492
9489
|
compoundVariants: [{
|
|
9493
9490
|
size: "sm",
|
|
9494
|
-
class: { root: "has-[>[data-slot=banner-action]]:py-[calc((--spacing(8)-1lh)/2+--spacing(1))]" }
|
|
9491
|
+
class: { root: "has-[>[data-slot=banner-action],>[data-banner-close]]:py-[calc((--spacing(8)-1lh)/2+--spacing(1))]" }
|
|
9495
9492
|
}]
|
|
9496
9493
|
});
|
|
9497
9494
|
/**
|
|
@@ -9799,7 +9796,7 @@ const notificationCenter = tv({
|
|
|
9799
9796
|
variants: {
|
|
9800
9797
|
viewport: {
|
|
9801
9798
|
desktop: { popup: "w-[380px]" },
|
|
9802
|
-
mobile: { popup: "w-[min(
|
|
9799
|
+
mobile: { popup: "w-[min(var(--available-width,calc(100vw-16px)),480px)]" }
|
|
9803
9800
|
},
|
|
9804
9801
|
size: {
|
|
9805
9802
|
sm: { popup: "h-56" },
|
|
@@ -9828,6 +9825,13 @@ const notificationCenter = tv({
|
|
|
9828
9825
|
status: "info"
|
|
9829
9826
|
}
|
|
9830
9827
|
});
|
|
9828
|
+
/**
|
|
9829
|
+
* On a phone the popup is as wide as the screen less 8px on each side, and the
|
|
9830
|
+
* collision padding stops it 8px from the edge it is pushed against, so it
|
|
9831
|
+
* lines up with the server list under the same top bar
|
|
9832
|
+
* (design/foundations/elevation.md#popups).
|
|
9833
|
+
*/
|
|
9834
|
+
const PHONE_INSET = 8;
|
|
9831
9835
|
function NotificationCenter({ modal = false, ...props }) {
|
|
9832
9836
|
return /* @__PURE__ */ jsx(Popover$1.Root, {
|
|
9833
9837
|
modal,
|
|
@@ -9876,7 +9880,7 @@ function NotificationCenterPopup({ viewport = "desktop", size = "md", className,
|
|
|
9876
9880
|
arrowPadding,
|
|
9877
9881
|
collisionAvoidance,
|
|
9878
9882
|
collisionBoundary,
|
|
9879
|
-
collisionPadding,
|
|
9883
|
+
collisionPadding: collisionPadding ?? (viewport === "mobile" ? PHONE_INSET : void 0),
|
|
9880
9884
|
disableAnchorTracking,
|
|
9881
9885
|
positionMethod,
|
|
9882
9886
|
side,
|
|
@@ -13535,8 +13539,8 @@ function useIosMomentumCompensation({ enabled, listElRef, itemsElRef, syncViewpo
|
|
|
13535
13539
|
clampCompensation();
|
|
13536
13540
|
const listEl = listElRef.current;
|
|
13537
13541
|
if (listEl) {
|
|
13538
|
-
if (listEl.scrollTop <= 0) {
|
|
13539
|
-
|
|
13542
|
+
if (listEl.scrollTop <= 0 && touchEndedRef.current) {
|
|
13543
|
+
flushCompensation("scrollToTop");
|
|
13540
13544
|
return true;
|
|
13541
13545
|
}
|
|
13542
13546
|
if (iosCompYRef.current > 0) {
|
|
@@ -14658,22 +14662,37 @@ function VirtualList(props) {
|
|
|
14658
14662
|
clearItemResizeQueue();
|
|
14659
14663
|
return;
|
|
14660
14664
|
}
|
|
14665
|
+
const scrollTopBefore = listElBefore == null ? 0 : listElBefore.scrollTop;
|
|
14666
|
+
const effectiveTopBefore = scrollTopBefore + compensationYRef.current;
|
|
14661
14667
|
applyLayoutStyles(startIndex);
|
|
14662
|
-
onContentResize?.();
|
|
14663
14668
|
const listEl = listElRef.current;
|
|
14669
|
+
let contentMoved = true;
|
|
14664
14670
|
if (listEl != null) {
|
|
14665
|
-
|
|
14671
|
+
const pendingTask = pendingScrollTaskRef.current;
|
|
14672
|
+
if (pendingTask?.type === void 0) {
|
|
14666
14673
|
const compensates = (index, key) => key !== void 0 && isFirstOfKey.get(key) === true && prependIndexes.includes(index) || index < viewTopIndex;
|
|
14667
14674
|
let compensation = 0;
|
|
14675
|
+
let uncompensated = false;
|
|
14668
14676
|
for (const { index, key, delta } of resizes) if (compensates(index, key)) compensation += delta;
|
|
14677
|
+
else if (delta !== 0) uncompensated = true;
|
|
14669
14678
|
const firstItem = items[0];
|
|
14670
14679
|
if (leadingMarginDelta !== 0 && (viewTop > 0 || compensates(0, firstItem === void 0 ? void 0 : getKey(firstItem)))) compensation += leadingMarginDelta;
|
|
14671
|
-
if (
|
|
14672
|
-
|
|
14680
|
+
else if (leadingMarginDelta !== 0) uncompensated = true;
|
|
14681
|
+
if (compensation !== 0) {
|
|
14682
|
+
const remaining = compensation - (listEl.scrollTop - scrollTopBefore);
|
|
14683
|
+
if (remaining !== 0 && !addCompensation(remaining)) listEl.scrollBy(0, remaining);
|
|
14684
|
+
}
|
|
14685
|
+
const effectiveTop = listEl.scrollTop + compensationYRef.current;
|
|
14686
|
+
contentMoved = uncompensated || Math.abs(effectiveTop - (effectiveTopBefore + compensation)) >= 1;
|
|
14687
|
+
} else {
|
|
14688
|
+
onContentResize?.();
|
|
14689
|
+
replayPendingScrollTask();
|
|
14690
|
+
}
|
|
14673
14691
|
const viewport = viewportRef.current;
|
|
14674
14692
|
viewport.scrollTop = listEl.scrollTop;
|
|
14675
14693
|
viewport.scrollLeft = listEl.scrollLeft;
|
|
14676
|
-
|
|
14694
|
+
if (pendingTask?.type === void 0 && contentMoved) onContentResize?.();
|
|
14695
|
+
} else if (contentMoved) onContentResize?.();
|
|
14677
14696
|
clearItemResizeQueue();
|
|
14678
14697
|
updateRange("batchItemResize", false, null);
|
|
14679
14698
|
});
|
package/dist/styles.css
CHANGED
|
@@ -212,6 +212,7 @@
|
|
|
212
212
|
--color-ink-40: var(--ink-40);
|
|
213
213
|
|
|
214
214
|
--color-brand: var(--brand-400);
|
|
215
|
+
--color-brand-edge: var(--brand-edge);
|
|
215
216
|
--color-brand-50: var(--brand-50);
|
|
216
217
|
--color-brand-100: var(--brand-100);
|
|
217
218
|
--color-brand-200: var(--brand-200);
|
|
@@ -679,6 +680,28 @@ textarea:-webkit-autofill:disabled {
|
|
|
679
680
|
sticker overlay-sticker-medium, on the frame overlay-frame-medium.
|
|
680
681
|
Use the bg-fill-* colours instead on a transparent control whose fill fades
|
|
681
682
|
in with transition-colors. */
|
|
683
|
+
/* Theme decorations on the frame (themes.css): the theme's sprites on the top
|
|
684
|
+
bar's right and above the rail's foot; none without a decorated theme. */
|
|
685
|
+
/* The top bar's strip (190px) sits 72px from its right end, clear of the
|
|
686
|
+
right-hand controls; only from 1024px, where the centered search field
|
|
687
|
+
(at most min(32vw, 420px)) leaves it room. */
|
|
688
|
+
@utility frame-decor-top {
|
|
689
|
+
background-repeat: no-repeat;
|
|
690
|
+
background-position: right 72px center;
|
|
691
|
+
@media (width >= 1024px) {
|
|
692
|
+
background-image: var(--frame-decor-top, none);
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
/* The rail's strip (48×112), for the nav's last flex item: laid out after
|
|
697
|
+
the items, so it never sits behind one, and clipped from the top when the
|
|
698
|
+
rail has less room than the strip. */
|
|
699
|
+
@utility frame-decor-rail {
|
|
700
|
+
background-image: var(--frame-decor-rail, none);
|
|
701
|
+
background-repeat: no-repeat;
|
|
702
|
+
background-position: center bottom;
|
|
703
|
+
}
|
|
704
|
+
|
|
682
705
|
@utility overlay-subtle {
|
|
683
706
|
background-image: linear-gradient(var(--fill-subtle), var(--fill-subtle));
|
|
684
707
|
}
|