lingee-ui 0.0.16 → 0.0.17

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.
Files changed (56) hide show
  1. package/dist/button/index.css +1 -1
  2. package/dist/button/index.d.mts +1 -1
  3. package/dist/button/index.d.ts +1 -1
  4. package/dist/button/index.js +1 -1
  5. package/dist/button/index.mjs +1 -1
  6. package/dist/{chunk-7I26V66U.js → chunk-3IO42CRF.js} +1 -1
  7. package/dist/chunk-3RAHZU2C.js +1 -0
  8. package/dist/{chunk-LAIK6VBD.mjs → chunk-4OLAOR2B.mjs} +1 -1
  9. package/dist/{chunk-22TFFOQL.js → chunk-CW6SU5IY.js} +1 -1
  10. package/dist/{chunk-HOX3ZANF.mjs → chunk-H44VO62M.mjs} +1 -1
  11. package/dist/chunk-KSRZSPQR.js +1 -0
  12. package/dist/{chunk-ZX6JEZS3.mjs → chunk-L6IXM6OV.mjs} +1 -1
  13. package/dist/{chunk-T4CPHENK.js → chunk-O6LSVS7F.js} +1 -1
  14. package/dist/{chunk-Q5MDN5PA.js → chunk-QRQE2XPJ.js} +1 -1
  15. package/dist/{chunk-YPES54ON.mjs → chunk-TL3WZ5RY.mjs} +1 -1
  16. package/dist/chunk-X2JJ6KOR.mjs +1 -0
  17. package/dist/chunk-XQRQYJIE.mjs +1 -0
  18. package/dist/{index-7pb5YOcq.d.mts → index-BVXwKHfX.d.mts} +1 -1
  19. package/dist/{index-7pb5YOcq.d.ts → index-BVXwKHfX.d.ts} +1 -1
  20. package/dist/index.css +1 -1
  21. package/dist/index.d.mts +75 -3
  22. package/dist/index.d.ts +75 -3
  23. package/dist/index.js +2 -2
  24. package/dist/index.mjs +2 -2
  25. package/dist/input/index.css +1 -1
  26. package/dist/input/index.d.mts +6 -0
  27. package/dist/input/index.d.ts +6 -0
  28. package/dist/input/index.js +1 -1
  29. package/dist/input/index.mjs +1 -1
  30. package/dist/popover/index.css +1 -1
  31. package/dist/switch/index.css +1 -1
  32. package/dist/switch/index.js +1 -1
  33. package/dist/switch/index.mjs +1 -1
  34. package/dist/tabs/index.css +1 -1
  35. package/dist/tabs/index.d.mts +1 -1
  36. package/dist/tabs/index.d.ts +1 -1
  37. package/dist/tabs/index.js +1 -1
  38. package/dist/tabs/index.mjs +1 -1
  39. package/dist/toast/index.js +1 -1
  40. package/dist/toast/index.mjs +1 -1
  41. package/dist/tree/index.js +1 -1
  42. package/dist/tree/index.mjs +1 -1
  43. package/package.json +1 -1
  44. package/skill/AGENTS-SNIPPET.md +3 -2
  45. package/skill/SKILL.md +6 -5
  46. package/skill/VERSION.json +5 -5
  47. package/skill/references/components/infinite-scroll.md +74 -0
  48. package/skill/references/components/input.md +1 -0
  49. package/skill/references/components/tooltip.md +0 -1
  50. package/skill/references/icons.md +5 -2
  51. package/skill/references/setup.md +1 -1
  52. package/skill/references/tokens.md +1 -1
  53. package/dist/chunk-CB2FRG23.js +0 -1
  54. package/dist/chunk-CGHN44HV.mjs +0 -1
  55. package/dist/chunk-ITHSP4P3.js +0 -1
  56. package/dist/chunk-YNDT7LQA.mjs +0 -1
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { B as ButtonProps } from './index-7pb5YOcq.mjs';
2
- export { a as Button, b as ButtonShape, c as ButtonSize, d as ButtonVariant } from './index-7pb5YOcq.mjs';
1
+ import { B as ButtonProps } from './index-BVXwKHfX.mjs';
2
+ export { a as Button, b as ButtonShape, c as ButtonSize, d as ButtonVariant } from './index-BVXwKHfX.mjs';
3
3
  import * as React$1 from 'react';
4
4
  import React__default, { ReactNode, CSSProperties, HTMLAttributes, MouseEvent, ComponentType, Key, ReactElement, UIEventHandler, Ref } from 'react';
5
5
  import { TooltipProps } from './tooltip/index.mjs';
@@ -247,6 +247,12 @@ declare const zhCN: {
247
247
  /** 错误态传入 onRetry 后,固定追加在 description 之后的重试引导 */
248
248
  retry: string;
249
249
  };
250
+ InfiniteScroll: {
251
+ loading: string;
252
+ noMore: string;
253
+ /** 「重试」引导语由 Empty.Card 依 onRetry 自动追加,此处不含 */
254
+ loadFailed: string;
255
+ };
250
256
  Sidebar: {
251
257
  expand: string;
252
258
  collapse: string;
@@ -396,6 +402,12 @@ declare const enUS: {
396
402
  Empty: {
397
403
  retry: string;
398
404
  };
405
+ InfiniteScroll: {
406
+ loading: string;
407
+ noMore: string;
408
+ /** Retry hint is appended by Empty.Card via onRetry, not included here */
409
+ loadFailed: string;
410
+ };
399
411
  Sidebar: {
400
412
  expand: string;
401
413
  collapse: string;
@@ -1654,6 +1666,66 @@ declare const Empty: React$1.ForwardRefExoticComponent<EmptyProps & React$1.RefA
1654
1666
  Card: React$1.ForwardRefExoticComponent<EmptyCardProps & React$1.RefAttributes<HTMLDivElement>>;
1655
1667
  };
1656
1668
 
1669
+ /**
1670
+ * 滚动容器指定方式。
1671
+ *
1672
+ * 缺省时组件自动向上查找最近的可滚动祖先。配合 `ScrollArea` 时建议显式传入
1673
+ * 其 viewport(`() => viewportRef.current`)—— 自动查找会命中第一个
1674
+ * `overflow: auto | scroll` 的祖先,若组件被放到了 ScrollArea 之外,
1675
+ * 可能落到更外层的容器上(例如 Dialog 的 body)。
1676
+ *
1677
+ * 用函数形态是因为 ref 在首次渲染时还是 null,直接传值会永远拿不到元素。
1678
+ */
1679
+ type InfiniteScrollTarget = HTMLElement | Window | null | (() => HTMLElement | Window | null);
1680
+ interface InfiniteScrollProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
1681
+ /**
1682
+ * 加载下一页。必须返回 Promise —— 组件靠它判断加载何时结束,
1683
+ * 进而决定是否继续续拉(首屏未填满时)或进入失败态。
1684
+ *
1685
+ * @param isRetry 由用户点击重试触发时为 true,可用于区分自动加载与手动重试
1686
+ */
1687
+ loadMore: (isRetry: boolean) => Promise<void>;
1688
+ /** 是否还有更多数据。为 false 时停止观测并渲染「没有更多」态 */
1689
+ hasMore: boolean;
1690
+ /**
1691
+ * 距容器底部多少像素时触发,默认 80。
1692
+ *
1693
+ * 不取 antd-mobile 的 250 —— 那是移动端整页滚动的尺度,
1694
+ * 用在弹窗内的列表上会导致刚滚一点就触发。
1695
+ */
1696
+ threshold?: number;
1697
+ /** 滚动容器,缺省自动查找 */
1698
+ scrollTarget?: InfiniteScrollTarget;
1699
+ /** 加载中的自定义内容,传 null 则不渲染 */
1700
+ loading?: ReactNode;
1701
+ /** 无更多数据时的自定义内容,传 null 则不渲染 */
1702
+ noMore?: ReactNode;
1703
+ /**
1704
+ * 加载失败时的自定义内容,传 null 则不渲染。
1705
+ * 函数形态可拿到重试句柄,用于自绘重试入口。
1706
+ */
1707
+ error?: ReactNode | ((retry: () => void) => ReactNode);
1708
+ /** 自定义类名 */
1709
+ className?: string;
1710
+ /** 自定义行内样式 */
1711
+ style?: CSSProperties;
1712
+ }
1713
+
1714
+ /**
1715
+ * InfiniteScroll 无限滚动
1716
+ *
1717
+ * 作为哨兵放在滚动内容的末尾,进入容器底部阈值范围时调用 `loadMore`。
1718
+ * 自身只负责「何时该加载」与「底部状态行」,不持有列表数据 —— 各调用点的
1719
+ * 数据层差异很大(React Query / 原生 state / 自定义分页器),持有状态必然处处开逃生口。
1720
+ *
1721
+ * 四个基础问题在组件内解决,调用方无需重复处理:
1722
+ * - **并发重入**:`loadMore` 返回的 Promise 未结束前丢弃重复触发
1723
+ * - **首屏未填满**:每次渲染后重新判定,不足一屏会继续拉直到填满或 `hasMore` 为 false
1724
+ * - **失败熔断**:失败后停止自动触发,避免「失败 → 仍在视口 → 立刻重试」的死循环
1725
+ * - **隐藏态误触**:祖先链上有 `display: none` 时跳过(keep-alive 面板、未激活页签)
1726
+ */
1727
+ declare const InfiniteScroll: React__default.ForwardRefExoticComponent<InfiniteScrollProps & React__default.RefAttributes<HTMLDivElement>>;
1728
+
1657
1729
  /** 附件/截图元信息 */
1658
1730
  interface FeedbackAttachment {
1659
1731
  name: string;
@@ -3514,4 +3586,4 @@ declare const Carousel: CarouselComponent;
3514
3586
  */
3515
3587
  declare function cn(...inputs: ClassValue[]): string;
3516
3588
 
3517
- export { Alert, type AlertProps, type AlertType, AvatarWithGroup as Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, ButtonProps, Carousel, type CarouselApi, type CarouselDotsPlacement, CarouselItem, type CarouselItemProps, type CarouselProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type CheckboxSize, ColorPicker, type ColorPickerProps, type ColorPickerSize, type ComponentConfig, type CoverConfig, type CustomRequestOptions, type CustomRequestReturn, DatePicker, type DatePickerProps, type DatePickerSize, type DateRange, Dialog, type DialogConfig, type DialogConfirmOptions, type DialogHostModal, type DialogProps, Divider, type DividerOrientation, type DividerProps, type DividerVariant, Drawer, type DrawerPlacement, type DrawerProps, Dropdown, DropdownButton, type DropdownButtonProps, DropdownCheckboxItem, type DropdownCheckboxItemProps, DropdownContent, type DropdownContentProps, type DropdownEllipsisTooltip, DropdownGroup, type DropdownGroupProps, DropdownItem, type DropdownItemData, type DropdownItemProps, DropdownLabel, type DropdownLabelData, type DropdownLabelProps, type DropdownMenuItemData, type DropdownProps, DropdownRadioGroup, type DropdownRadioGroupProps, DropdownRadioItem, type DropdownRadioItemProps, DropdownSeparator, type DropdownSeparatorData, type DropdownSeparatorProps, DropdownStatus, type DropdownStatusProps, type DropdownStatusText, type DropdownStatusType, DropdownSub, DropdownSubContent, type DropdownSubContentProps, type DropdownSubProps, DropdownSubTrigger, type DropdownSubTriggerProps, DropdownTrigger, type DropdownTriggerProps, EllipsisTooltip, type EllipsisTooltipProps, Empty, EmptyCard, type EmptyCardAlign, type EmptyCardProps, type EmptyCardSpacing, type EmptyCardStatus, type EmptyCardVariant, type EmptyIconComponent, type EmptyProps, type EmptySize, type FeedbackAttachment, type FeedbackFileWallItem, type FeedbackHistoryDetail, type FeedbackHistoryItem, type FeedbackReply, type FeedbackSimilarItem, type FeedbackStatus, type FeedbackTabKey, type FileItemActions, Flex, type FlexGapSize, type FlexOrientation, type FlexProps, Form, type FormInstance, type FormItemProps, type FormLayout, type FormProps, HostModalPage, type HostModalPageProps, type HostToastLevel, Image, type ImagePreviewGroupProps, type ImageProps, type ImgInfo, LgSize, LingeeProvider, type LingeeProviderProps, type LingeeSite, type Locale, Pagination, type PaginationProps, type PaginationVariant, PopoverContentProps, type PreviewGroupType, type PreviewType, Progress, type ProgressProps, type ProgressStatus, type ProgressType, RadioGroup, type RadioGroupProps, RadioItem, type RadioItemProps, type RadioSize, RangePicker, type RangePickerProps, type RangePickerSize, type RejectReason, ScrollArea, type ScrollAreaProps, ScrollBar, type ScrollBarProps, Select, type SelectDropdownProps, type SelectMode, type SelectOption, type SelectOptionGroup, type SelectProps, type SelectSize, Sidebar, SidebarAuthImage, type SidebarAuthImageProps, type SidebarCaretPlacement, type SidebarCaretTone, SidebarCollapsibleListItem, type SidebarCollapsibleListItemProps, SidebarCollapsibleNavItem, type SidebarCollapsibleNavItemChild, type SidebarCollapsibleNavItemProps, SidebarFeedbackAttachmentRow, type SidebarFeedbackAttachmentRowProps, SidebarFeedbackDetail, type SidebarFeedbackDetailProps, SidebarFeedbackField, type SidebarFeedbackFieldProps, SidebarFeedbackFileWall, type SidebarFeedbackFileWallProps, SidebarFeedbackHistoryItem, type SidebarFeedbackHistoryItemProps, SidebarFeedbackHistoryPanel, type SidebarFeedbackHistoryPanelProps, SidebarFeedbackModal, type SidebarFeedbackModalProps, SidebarFeedbackSimilarItem, type SidebarFeedbackSimilarItemProps, SidebarFeedbackSubmitPanel, type SidebarFeedbackSubmitPanelProps, SidebarFolderNode, type SidebarFolderNodeProps, SidebarFolderSection, type SidebarFolderSectionProps, type SidebarFolderStatus, type SidebarFolderStatusText, SidebarFooter, SidebarFooterBadge, type SidebarFooterBadgeProps, SidebarFooterMenuStaticRow, type SidebarFooterMenuStaticRowProps, type SidebarFooterProps, SidebarFooterUser, type SidebarFooterUserProps, SidebarGroupHeader, type SidebarGroupHeaderProps, SidebarHeader, type SidebarHeaderProps, type SidebarIndicatorType, SidebarListItem, type SidebarListItemProps, SidebarNavItem, type SidebarNavItemProps, SidebarRoot, type SidebarRootProps, SidebarStickyHeader, type SidebarStickyHeaderProps, SidebarTabBar, type SidebarTabBarProps, type SidebarTabItem, SidebarUsageBar, type SidebarUsageBarProps, SidebarUsagePanel, type SidebarUsagePanelProps, SidebarUsagePanelSection, type SidebarUsagePanelSectionProps, type SidebarUsageTone, Skeleton, type SkeletonAnimation, type SkeletonProps, type SkeletonVariant, Slider, type SliderProps, type SliderSize, Spin, type SpinProps, type SpinSize, type StepItem, type StepStatus, Steps, type StepsProps, type StepsSize, type StepsTitlePlacement, Table, type TableColumnType, type TableProps, type TableRowSelection, type TableSize, type TableSorterState, type TableStatusText, type TableStatusType, Tag, type TagPresetColor, type TagProps, type TagShape, type TagSize, TimePicker, type TimePickerProps, type TimePickerSize, type TimeValue, TooltipProps, type TransformAction, type TransformType, Upload, type UploadFile, type UploadFileStatus, type UploadProps, closeHostModal, cn, enUS, formatFileSize, getHostModalParams, isInHostModal, notifyHostModalReady, useComponentConfig, useComponentLocale, useLocale, useSite, zhCN };
3589
+ export { Alert, type AlertProps, type AlertType, AvatarWithGroup as Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, ButtonProps, Carousel, type CarouselApi, type CarouselDotsPlacement, CarouselItem, type CarouselItemProps, type CarouselProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type CheckboxSize, ColorPicker, type ColorPickerProps, type ColorPickerSize, type ComponentConfig, type CoverConfig, type CustomRequestOptions, type CustomRequestReturn, DatePicker, type DatePickerProps, type DatePickerSize, type DateRange, Dialog, type DialogConfig, type DialogConfirmOptions, type DialogHostModal, type DialogProps, Divider, type DividerOrientation, type DividerProps, type DividerVariant, Drawer, type DrawerPlacement, type DrawerProps, Dropdown, DropdownButton, type DropdownButtonProps, DropdownCheckboxItem, type DropdownCheckboxItemProps, DropdownContent, type DropdownContentProps, type DropdownEllipsisTooltip, DropdownGroup, type DropdownGroupProps, DropdownItem, type DropdownItemData, type DropdownItemProps, DropdownLabel, type DropdownLabelData, type DropdownLabelProps, type DropdownMenuItemData, type DropdownProps, DropdownRadioGroup, type DropdownRadioGroupProps, DropdownRadioItem, type DropdownRadioItemProps, DropdownSeparator, type DropdownSeparatorData, type DropdownSeparatorProps, DropdownStatus, type DropdownStatusProps, type DropdownStatusText, type DropdownStatusType, DropdownSub, DropdownSubContent, type DropdownSubContentProps, type DropdownSubProps, DropdownSubTrigger, type DropdownSubTriggerProps, DropdownTrigger, type DropdownTriggerProps, EllipsisTooltip, type EllipsisTooltipProps, Empty, EmptyCard, type EmptyCardAlign, type EmptyCardProps, type EmptyCardSpacing, type EmptyCardStatus, type EmptyCardVariant, type EmptyIconComponent, type EmptyProps, type EmptySize, type FeedbackAttachment, type FeedbackFileWallItem, type FeedbackHistoryDetail, type FeedbackHistoryItem, type FeedbackReply, type FeedbackSimilarItem, type FeedbackStatus, type FeedbackTabKey, type FileItemActions, Flex, type FlexGapSize, type FlexOrientation, type FlexProps, Form, type FormInstance, type FormItemProps, type FormLayout, type FormProps, HostModalPage, type HostModalPageProps, type HostToastLevel, Image, type ImagePreviewGroupProps, type ImageProps, type ImgInfo, InfiniteScroll, type InfiniteScrollProps, type InfiniteScrollTarget, LgSize, LingeeProvider, type LingeeProviderProps, type LingeeSite, type Locale, Pagination, type PaginationProps, type PaginationVariant, PopoverContentProps, type PreviewGroupType, type PreviewType, Progress, type ProgressProps, type ProgressStatus, type ProgressType, RadioGroup, type RadioGroupProps, RadioItem, type RadioItemProps, type RadioSize, RangePicker, type RangePickerProps, type RangePickerSize, type RejectReason, ScrollArea, type ScrollAreaProps, ScrollBar, type ScrollBarProps, Select, type SelectDropdownProps, type SelectMode, type SelectOption, type SelectOptionGroup, type SelectProps, type SelectSize, Sidebar, SidebarAuthImage, type SidebarAuthImageProps, type SidebarCaretPlacement, type SidebarCaretTone, SidebarCollapsibleListItem, type SidebarCollapsibleListItemProps, SidebarCollapsibleNavItem, type SidebarCollapsibleNavItemChild, type SidebarCollapsibleNavItemProps, SidebarFeedbackAttachmentRow, type SidebarFeedbackAttachmentRowProps, SidebarFeedbackDetail, type SidebarFeedbackDetailProps, SidebarFeedbackField, type SidebarFeedbackFieldProps, SidebarFeedbackFileWall, type SidebarFeedbackFileWallProps, SidebarFeedbackHistoryItem, type SidebarFeedbackHistoryItemProps, SidebarFeedbackHistoryPanel, type SidebarFeedbackHistoryPanelProps, SidebarFeedbackModal, type SidebarFeedbackModalProps, SidebarFeedbackSimilarItem, type SidebarFeedbackSimilarItemProps, SidebarFeedbackSubmitPanel, type SidebarFeedbackSubmitPanelProps, SidebarFolderNode, type SidebarFolderNodeProps, SidebarFolderSection, type SidebarFolderSectionProps, type SidebarFolderStatus, type SidebarFolderStatusText, SidebarFooter, SidebarFooterBadge, type SidebarFooterBadgeProps, SidebarFooterMenuStaticRow, type SidebarFooterMenuStaticRowProps, type SidebarFooterProps, SidebarFooterUser, type SidebarFooterUserProps, SidebarGroupHeader, type SidebarGroupHeaderProps, SidebarHeader, type SidebarHeaderProps, type SidebarIndicatorType, SidebarListItem, type SidebarListItemProps, SidebarNavItem, type SidebarNavItemProps, SidebarRoot, type SidebarRootProps, SidebarStickyHeader, type SidebarStickyHeaderProps, SidebarTabBar, type SidebarTabBarProps, type SidebarTabItem, SidebarUsageBar, type SidebarUsageBarProps, SidebarUsagePanel, type SidebarUsagePanelProps, SidebarUsagePanelSection, type SidebarUsagePanelSectionProps, type SidebarUsageTone, Skeleton, type SkeletonAnimation, type SkeletonProps, type SkeletonVariant, Slider, type SliderProps, type SliderSize, Spin, type SpinProps, type SpinSize, type StepItem, type StepStatus, Steps, type StepsProps, type StepsSize, type StepsTitlePlacement, Table, type TableColumnType, type TableProps, type TableRowSelection, type TableSize, type TableSorterState, type TableStatusText, type TableStatusType, Tag, type TagPresetColor, type TagProps, type TagShape, type TagSize, TimePicker, type TimePickerProps, type TimePickerSize, type TimeValue, TooltipProps, type TransformAction, type TransformType, Upload, type UploadFile, type UploadFileStatus, type UploadProps, closeHostModal, cn, enUS, formatFileSize, getHostModalParams, isInHostModal, notifyHostModalReady, useComponentConfig, useComponentLocale, useLocale, useSite, zhCN };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { B as ButtonProps } from './index-7pb5YOcq.js';
2
- export { a as Button, b as ButtonShape, c as ButtonSize, d as ButtonVariant } from './index-7pb5YOcq.js';
1
+ import { B as ButtonProps } from './index-BVXwKHfX.js';
2
+ export { a as Button, b as ButtonShape, c as ButtonSize, d as ButtonVariant } from './index-BVXwKHfX.js';
3
3
  import * as React$1 from 'react';
4
4
  import React__default, { ReactNode, CSSProperties, HTMLAttributes, MouseEvent, ComponentType, Key, ReactElement, UIEventHandler, Ref } from 'react';
5
5
  import { TooltipProps } from './tooltip/index.js';
@@ -247,6 +247,12 @@ declare const zhCN: {
247
247
  /** 错误态传入 onRetry 后,固定追加在 description 之后的重试引导 */
248
248
  retry: string;
249
249
  };
250
+ InfiniteScroll: {
251
+ loading: string;
252
+ noMore: string;
253
+ /** 「重试」引导语由 Empty.Card 依 onRetry 自动追加,此处不含 */
254
+ loadFailed: string;
255
+ };
250
256
  Sidebar: {
251
257
  expand: string;
252
258
  collapse: string;
@@ -396,6 +402,12 @@ declare const enUS: {
396
402
  Empty: {
397
403
  retry: string;
398
404
  };
405
+ InfiniteScroll: {
406
+ loading: string;
407
+ noMore: string;
408
+ /** Retry hint is appended by Empty.Card via onRetry, not included here */
409
+ loadFailed: string;
410
+ };
399
411
  Sidebar: {
400
412
  expand: string;
401
413
  collapse: string;
@@ -1654,6 +1666,66 @@ declare const Empty: React$1.ForwardRefExoticComponent<EmptyProps & React$1.RefA
1654
1666
  Card: React$1.ForwardRefExoticComponent<EmptyCardProps & React$1.RefAttributes<HTMLDivElement>>;
1655
1667
  };
1656
1668
 
1669
+ /**
1670
+ * 滚动容器指定方式。
1671
+ *
1672
+ * 缺省时组件自动向上查找最近的可滚动祖先。配合 `ScrollArea` 时建议显式传入
1673
+ * 其 viewport(`() => viewportRef.current`)—— 自动查找会命中第一个
1674
+ * `overflow: auto | scroll` 的祖先,若组件被放到了 ScrollArea 之外,
1675
+ * 可能落到更外层的容器上(例如 Dialog 的 body)。
1676
+ *
1677
+ * 用函数形态是因为 ref 在首次渲染时还是 null,直接传值会永远拿不到元素。
1678
+ */
1679
+ type InfiniteScrollTarget = HTMLElement | Window | null | (() => HTMLElement | Window | null);
1680
+ interface InfiniteScrollProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
1681
+ /**
1682
+ * 加载下一页。必须返回 Promise —— 组件靠它判断加载何时结束,
1683
+ * 进而决定是否继续续拉(首屏未填满时)或进入失败态。
1684
+ *
1685
+ * @param isRetry 由用户点击重试触发时为 true,可用于区分自动加载与手动重试
1686
+ */
1687
+ loadMore: (isRetry: boolean) => Promise<void>;
1688
+ /** 是否还有更多数据。为 false 时停止观测并渲染「没有更多」态 */
1689
+ hasMore: boolean;
1690
+ /**
1691
+ * 距容器底部多少像素时触发,默认 80。
1692
+ *
1693
+ * 不取 antd-mobile 的 250 —— 那是移动端整页滚动的尺度,
1694
+ * 用在弹窗内的列表上会导致刚滚一点就触发。
1695
+ */
1696
+ threshold?: number;
1697
+ /** 滚动容器,缺省自动查找 */
1698
+ scrollTarget?: InfiniteScrollTarget;
1699
+ /** 加载中的自定义内容,传 null 则不渲染 */
1700
+ loading?: ReactNode;
1701
+ /** 无更多数据时的自定义内容,传 null 则不渲染 */
1702
+ noMore?: ReactNode;
1703
+ /**
1704
+ * 加载失败时的自定义内容,传 null 则不渲染。
1705
+ * 函数形态可拿到重试句柄,用于自绘重试入口。
1706
+ */
1707
+ error?: ReactNode | ((retry: () => void) => ReactNode);
1708
+ /** 自定义类名 */
1709
+ className?: string;
1710
+ /** 自定义行内样式 */
1711
+ style?: CSSProperties;
1712
+ }
1713
+
1714
+ /**
1715
+ * InfiniteScroll 无限滚动
1716
+ *
1717
+ * 作为哨兵放在滚动内容的末尾,进入容器底部阈值范围时调用 `loadMore`。
1718
+ * 自身只负责「何时该加载」与「底部状态行」,不持有列表数据 —— 各调用点的
1719
+ * 数据层差异很大(React Query / 原生 state / 自定义分页器),持有状态必然处处开逃生口。
1720
+ *
1721
+ * 四个基础问题在组件内解决,调用方无需重复处理:
1722
+ * - **并发重入**:`loadMore` 返回的 Promise 未结束前丢弃重复触发
1723
+ * - **首屏未填满**:每次渲染后重新判定,不足一屏会继续拉直到填满或 `hasMore` 为 false
1724
+ * - **失败熔断**:失败后停止自动触发,避免「失败 → 仍在视口 → 立刻重试」的死循环
1725
+ * - **隐藏态误触**:祖先链上有 `display: none` 时跳过(keep-alive 面板、未激活页签)
1726
+ */
1727
+ declare const InfiniteScroll: React__default.ForwardRefExoticComponent<InfiniteScrollProps & React__default.RefAttributes<HTMLDivElement>>;
1728
+
1657
1729
  /** 附件/截图元信息 */
1658
1730
  interface FeedbackAttachment {
1659
1731
  name: string;
@@ -3514,4 +3586,4 @@ declare const Carousel: CarouselComponent;
3514
3586
  */
3515
3587
  declare function cn(...inputs: ClassValue[]): string;
3516
3588
 
3517
- export { Alert, type AlertProps, type AlertType, AvatarWithGroup as Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, ButtonProps, Carousel, type CarouselApi, type CarouselDotsPlacement, CarouselItem, type CarouselItemProps, type CarouselProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type CheckboxSize, ColorPicker, type ColorPickerProps, type ColorPickerSize, type ComponentConfig, type CoverConfig, type CustomRequestOptions, type CustomRequestReturn, DatePicker, type DatePickerProps, type DatePickerSize, type DateRange, Dialog, type DialogConfig, type DialogConfirmOptions, type DialogHostModal, type DialogProps, Divider, type DividerOrientation, type DividerProps, type DividerVariant, Drawer, type DrawerPlacement, type DrawerProps, Dropdown, DropdownButton, type DropdownButtonProps, DropdownCheckboxItem, type DropdownCheckboxItemProps, DropdownContent, type DropdownContentProps, type DropdownEllipsisTooltip, DropdownGroup, type DropdownGroupProps, DropdownItem, type DropdownItemData, type DropdownItemProps, DropdownLabel, type DropdownLabelData, type DropdownLabelProps, type DropdownMenuItemData, type DropdownProps, DropdownRadioGroup, type DropdownRadioGroupProps, DropdownRadioItem, type DropdownRadioItemProps, DropdownSeparator, type DropdownSeparatorData, type DropdownSeparatorProps, DropdownStatus, type DropdownStatusProps, type DropdownStatusText, type DropdownStatusType, DropdownSub, DropdownSubContent, type DropdownSubContentProps, type DropdownSubProps, DropdownSubTrigger, type DropdownSubTriggerProps, DropdownTrigger, type DropdownTriggerProps, EllipsisTooltip, type EllipsisTooltipProps, Empty, EmptyCard, type EmptyCardAlign, type EmptyCardProps, type EmptyCardSpacing, type EmptyCardStatus, type EmptyCardVariant, type EmptyIconComponent, type EmptyProps, type EmptySize, type FeedbackAttachment, type FeedbackFileWallItem, type FeedbackHistoryDetail, type FeedbackHistoryItem, type FeedbackReply, type FeedbackSimilarItem, type FeedbackStatus, type FeedbackTabKey, type FileItemActions, Flex, type FlexGapSize, type FlexOrientation, type FlexProps, Form, type FormInstance, type FormItemProps, type FormLayout, type FormProps, HostModalPage, type HostModalPageProps, type HostToastLevel, Image, type ImagePreviewGroupProps, type ImageProps, type ImgInfo, LgSize, LingeeProvider, type LingeeProviderProps, type LingeeSite, type Locale, Pagination, type PaginationProps, type PaginationVariant, PopoverContentProps, type PreviewGroupType, type PreviewType, Progress, type ProgressProps, type ProgressStatus, type ProgressType, RadioGroup, type RadioGroupProps, RadioItem, type RadioItemProps, type RadioSize, RangePicker, type RangePickerProps, type RangePickerSize, type RejectReason, ScrollArea, type ScrollAreaProps, ScrollBar, type ScrollBarProps, Select, type SelectDropdownProps, type SelectMode, type SelectOption, type SelectOptionGroup, type SelectProps, type SelectSize, Sidebar, SidebarAuthImage, type SidebarAuthImageProps, type SidebarCaretPlacement, type SidebarCaretTone, SidebarCollapsibleListItem, type SidebarCollapsibleListItemProps, SidebarCollapsibleNavItem, type SidebarCollapsibleNavItemChild, type SidebarCollapsibleNavItemProps, SidebarFeedbackAttachmentRow, type SidebarFeedbackAttachmentRowProps, SidebarFeedbackDetail, type SidebarFeedbackDetailProps, SidebarFeedbackField, type SidebarFeedbackFieldProps, SidebarFeedbackFileWall, type SidebarFeedbackFileWallProps, SidebarFeedbackHistoryItem, type SidebarFeedbackHistoryItemProps, SidebarFeedbackHistoryPanel, type SidebarFeedbackHistoryPanelProps, SidebarFeedbackModal, type SidebarFeedbackModalProps, SidebarFeedbackSimilarItem, type SidebarFeedbackSimilarItemProps, SidebarFeedbackSubmitPanel, type SidebarFeedbackSubmitPanelProps, SidebarFolderNode, type SidebarFolderNodeProps, SidebarFolderSection, type SidebarFolderSectionProps, type SidebarFolderStatus, type SidebarFolderStatusText, SidebarFooter, SidebarFooterBadge, type SidebarFooterBadgeProps, SidebarFooterMenuStaticRow, type SidebarFooterMenuStaticRowProps, type SidebarFooterProps, SidebarFooterUser, type SidebarFooterUserProps, SidebarGroupHeader, type SidebarGroupHeaderProps, SidebarHeader, type SidebarHeaderProps, type SidebarIndicatorType, SidebarListItem, type SidebarListItemProps, SidebarNavItem, type SidebarNavItemProps, SidebarRoot, type SidebarRootProps, SidebarStickyHeader, type SidebarStickyHeaderProps, SidebarTabBar, type SidebarTabBarProps, type SidebarTabItem, SidebarUsageBar, type SidebarUsageBarProps, SidebarUsagePanel, type SidebarUsagePanelProps, SidebarUsagePanelSection, type SidebarUsagePanelSectionProps, type SidebarUsageTone, Skeleton, type SkeletonAnimation, type SkeletonProps, type SkeletonVariant, Slider, type SliderProps, type SliderSize, Spin, type SpinProps, type SpinSize, type StepItem, type StepStatus, Steps, type StepsProps, type StepsSize, type StepsTitlePlacement, Table, type TableColumnType, type TableProps, type TableRowSelection, type TableSize, type TableSorterState, type TableStatusText, type TableStatusType, Tag, type TagPresetColor, type TagProps, type TagShape, type TagSize, TimePicker, type TimePickerProps, type TimePickerSize, type TimeValue, TooltipProps, type TransformAction, type TransformType, Upload, type UploadFile, type UploadFileStatus, type UploadProps, closeHostModal, cn, enUS, formatFileSize, getHostModalParams, isInHostModal, notifyHostModalReady, useComponentConfig, useComponentLocale, useLocale, useSite, zhCN };
3589
+ export { Alert, type AlertProps, type AlertType, AvatarWithGroup as Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, ButtonProps, Carousel, type CarouselApi, type CarouselDotsPlacement, CarouselItem, type CarouselItemProps, type CarouselProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type CheckboxSize, ColorPicker, type ColorPickerProps, type ColorPickerSize, type ComponentConfig, type CoverConfig, type CustomRequestOptions, type CustomRequestReturn, DatePicker, type DatePickerProps, type DatePickerSize, type DateRange, Dialog, type DialogConfig, type DialogConfirmOptions, type DialogHostModal, type DialogProps, Divider, type DividerOrientation, type DividerProps, type DividerVariant, Drawer, type DrawerPlacement, type DrawerProps, Dropdown, DropdownButton, type DropdownButtonProps, DropdownCheckboxItem, type DropdownCheckboxItemProps, DropdownContent, type DropdownContentProps, type DropdownEllipsisTooltip, DropdownGroup, type DropdownGroupProps, DropdownItem, type DropdownItemData, type DropdownItemProps, DropdownLabel, type DropdownLabelData, type DropdownLabelProps, type DropdownMenuItemData, type DropdownProps, DropdownRadioGroup, type DropdownRadioGroupProps, DropdownRadioItem, type DropdownRadioItemProps, DropdownSeparator, type DropdownSeparatorData, type DropdownSeparatorProps, DropdownStatus, type DropdownStatusProps, type DropdownStatusText, type DropdownStatusType, DropdownSub, DropdownSubContent, type DropdownSubContentProps, type DropdownSubProps, DropdownSubTrigger, type DropdownSubTriggerProps, DropdownTrigger, type DropdownTriggerProps, EllipsisTooltip, type EllipsisTooltipProps, Empty, EmptyCard, type EmptyCardAlign, type EmptyCardProps, type EmptyCardSpacing, type EmptyCardStatus, type EmptyCardVariant, type EmptyIconComponent, type EmptyProps, type EmptySize, type FeedbackAttachment, type FeedbackFileWallItem, type FeedbackHistoryDetail, type FeedbackHistoryItem, type FeedbackReply, type FeedbackSimilarItem, type FeedbackStatus, type FeedbackTabKey, type FileItemActions, Flex, type FlexGapSize, type FlexOrientation, type FlexProps, Form, type FormInstance, type FormItemProps, type FormLayout, type FormProps, HostModalPage, type HostModalPageProps, type HostToastLevel, Image, type ImagePreviewGroupProps, type ImageProps, type ImgInfo, InfiniteScroll, type InfiniteScrollProps, type InfiniteScrollTarget, LgSize, LingeeProvider, type LingeeProviderProps, type LingeeSite, type Locale, Pagination, type PaginationProps, type PaginationVariant, PopoverContentProps, type PreviewGroupType, type PreviewType, Progress, type ProgressProps, type ProgressStatus, type ProgressType, RadioGroup, type RadioGroupProps, RadioItem, type RadioItemProps, type RadioSize, RangePicker, type RangePickerProps, type RangePickerSize, type RejectReason, ScrollArea, type ScrollAreaProps, ScrollBar, type ScrollBarProps, Select, type SelectDropdownProps, type SelectMode, type SelectOption, type SelectOptionGroup, type SelectProps, type SelectSize, Sidebar, SidebarAuthImage, type SidebarAuthImageProps, type SidebarCaretPlacement, type SidebarCaretTone, SidebarCollapsibleListItem, type SidebarCollapsibleListItemProps, SidebarCollapsibleNavItem, type SidebarCollapsibleNavItemChild, type SidebarCollapsibleNavItemProps, SidebarFeedbackAttachmentRow, type SidebarFeedbackAttachmentRowProps, SidebarFeedbackDetail, type SidebarFeedbackDetailProps, SidebarFeedbackField, type SidebarFeedbackFieldProps, SidebarFeedbackFileWall, type SidebarFeedbackFileWallProps, SidebarFeedbackHistoryItem, type SidebarFeedbackHistoryItemProps, SidebarFeedbackHistoryPanel, type SidebarFeedbackHistoryPanelProps, SidebarFeedbackModal, type SidebarFeedbackModalProps, SidebarFeedbackSimilarItem, type SidebarFeedbackSimilarItemProps, SidebarFeedbackSubmitPanel, type SidebarFeedbackSubmitPanelProps, SidebarFolderNode, type SidebarFolderNodeProps, SidebarFolderSection, type SidebarFolderSectionProps, type SidebarFolderStatus, type SidebarFolderStatusText, SidebarFooter, SidebarFooterBadge, type SidebarFooterBadgeProps, SidebarFooterMenuStaticRow, type SidebarFooterMenuStaticRowProps, type SidebarFooterProps, SidebarFooterUser, type SidebarFooterUserProps, SidebarGroupHeader, type SidebarGroupHeaderProps, SidebarHeader, type SidebarHeaderProps, type SidebarIndicatorType, SidebarListItem, type SidebarListItemProps, SidebarNavItem, type SidebarNavItemProps, SidebarRoot, type SidebarRootProps, SidebarStickyHeader, type SidebarStickyHeaderProps, SidebarTabBar, type SidebarTabBarProps, type SidebarTabItem, SidebarUsageBar, type SidebarUsageBarProps, SidebarUsagePanel, type SidebarUsagePanelProps, SidebarUsagePanelSection, type SidebarUsagePanelSectionProps, type SidebarUsageTone, Skeleton, type SkeletonAnimation, type SkeletonProps, type SkeletonVariant, Slider, type SliderProps, type SliderSize, Spin, type SpinProps, type SpinSize, type StepItem, type StepStatus, Steps, type StepsProps, type StepsSize, type StepsTitlePlacement, Table, type TableColumnType, type TableProps, type TableRowSelection, type TableSize, type TableSorterState, type TableStatusText, type TableStatusType, Tag, type TagPresetColor, type TagProps, type TagShape, type TagSize, TimePicker, type TimePickerProps, type TimePickerSize, type TimeValue, TooltipProps, type TransformAction, type TransformType, Upload, type UploadFile, type UploadFileStatus, type UploadProps, closeHostModal, cn, enUS, formatFileSize, getHostModalParams, isInHostModal, notifyHostModalReady, useComponentConfig, useComponentLocale, useLocale, useSite, zhCN };