lingee-ui 0.0.11 → 0.0.13

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 (54) 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-56AGGSSV.mjs +1 -0
  7. package/dist/{chunk-HBUCDYU4.mjs → chunk-6QCL57T5.mjs} +1 -1
  8. package/dist/{chunk-U7SNZQQT.mjs → chunk-B6CAD73P.mjs} +1 -1
  9. package/dist/chunk-DHCCF3XI.mjs +1 -0
  10. package/dist/{chunk-2EQT33RE.mjs → chunk-FRXQG2XX.mjs} +2 -2
  11. package/dist/chunk-FTEVUZKX.js +1 -0
  12. package/dist/{chunk-GN64U4A6.js → chunk-HYN4Y4AW.js} +1 -1
  13. package/dist/{chunk-NK4H3KPJ.js → chunk-LSZ4P7R5.js} +1 -1
  14. package/dist/chunk-M37T4ADR.mjs +1 -0
  15. package/dist/{chunk-Y3P3LG3L.js → chunk-T534AXC3.js} +2 -2
  16. package/dist/{chunk-SV5ZR6K5.js → chunk-TL6FYFGR.js} +1 -1
  17. package/dist/{chunk-LSQ4CC7K.js → chunk-XOVQPZCB.js} +1 -1
  18. package/dist/{index-89atTLPD.d.mts → index-7pb5YOcq.d.mts} +2 -2
  19. package/dist/{index-89atTLPD.d.ts → index-7pb5YOcq.d.ts} +2 -2
  20. package/dist/index.css +1 -1
  21. package/dist/index.d.mts +61 -6
  22. package/dist/index.d.ts +61 -6
  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.js +1 -1
  27. package/dist/input/index.mjs +1 -1
  28. package/dist/tabs/index.css +1 -1
  29. package/dist/tabs/index.js +1 -1
  30. package/dist/tabs/index.mjs +1 -1
  31. package/dist/toast/index.css +1 -1
  32. package/dist/toast/index.d.mts +7 -1
  33. package/dist/toast/index.d.ts +7 -1
  34. package/dist/toast/index.js +1 -1
  35. package/dist/toast/index.mjs +1 -1
  36. package/dist/tooltip/index.css +1 -1
  37. package/dist/tooltip/index.js +1 -1
  38. package/dist/tooltip/index.mjs +1 -1
  39. package/dist/tree/index.css +1 -1
  40. package/dist/tree/index.js +1 -1
  41. package/dist/tree/index.mjs +1 -1
  42. package/package.json +3 -3
  43. package/skill/AGENTS-SNIPPET.md +1 -1
  44. package/skill/SKILL.md +3 -3
  45. package/skill/VERSION.json +3 -3
  46. package/skill/references/components/dialog.md +14 -0
  47. package/skill/references/components/toast.md +1 -1
  48. package/skill/references/icons.md +1 -1
  49. package/skill/references/setup.md +1 -1
  50. package/skill/references/tokens.md +1 -1
  51. package/dist/chunk-D25GF6TL.mjs +0 -1
  52. package/dist/chunk-KY6SDUK5.mjs +0 -1
  53. package/dist/chunk-OKHDREZ4.js +0 -1
  54. package/dist/chunk-Q4CF2U5W.mjs +0 -1
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { B as ButtonProps } from './index-89atTLPD.mjs';
2
- export { a as Button, b as ButtonShape, c as ButtonSize, d as ButtonVariant } from './index-89atTLPD.mjs';
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';
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';
@@ -70,6 +70,32 @@ interface EllipsisTooltipProps extends Omit<TooltipProps, "children" | "content"
70
70
  */
71
71
  declare const EllipsisTooltip: React__default.ForwardRefExoticComponent<EllipsisTooltipProps & React__default.RefAttributes<HTMLElement>>;
72
72
 
73
+ /**
74
+ * 全局提示的跨窗口通信协议
75
+ *
76
+ * ── 为什么组件库自己实现一份,而不 import lingee-web-bridge-sdk ──
77
+ *
78
+ * 与 dialog/host-modal-protocol.ts 同一个理由:这是一份**协议契约**,不是共享实现。
79
+ * 组件库对宿主的依赖必须零包依赖 —— 对客户端做能力探测,对父窗口按约定
80
+ * postMessage。改成 import SDK 会把 private 包的协议代码 bundle 进 lingee-ui
81
+ * 的公开发布物,且给所有接入方多背一个只有一个宿主用得上的运行时依赖。
82
+ *
83
+ * ⚠️ **本文件的常量与字段形状必须与 SDK 的 shared/constants.ts 保持逐字一致**。
84
+ * 任一端改动协议,另一端必须同步,否则消息会被对方静默丢弃
85
+ * (信封校验不通过时不会报错,只是收不到)。
86
+ *
87
+ * ── 与弹窗协议最大的差异:没有响应,故可用性靠预先协商 ──
88
+ *
89
+ * 弹窗类通道靠「宿主回没回受理」判断可用性,为此付一次握手等待。提示不能这么做:
90
+ * 那意味着每条提示延迟 1.5 秒,而提示的全部价值就是即时反馈。
91
+ *
92
+ * 因此这里维护一个能力标记,由两条路填充:宿主在 iframe 就绪后主动广播 ready;
93
+ * 本模块加载时主动 probe 一次,宿主收到即补发。两条都要有 —— 只留一条会在
94
+ * 时序另一侧留下盲区,表现为「有时能盖住宿主侧边栏、有时不能」,比稳定失效更难查。
95
+ */
96
+ /** 提示级别;只开放这四档,与 ToastType 一致(端侧组件库的 feature 档不暴露) */
97
+ type HostToastLevel = 'info' | 'success' | 'warning' | 'error';
98
+
73
99
  /**
74
100
  * site 全局配置
75
101
  *
@@ -222,9 +248,16 @@ declare const zhCN: {
222
248
 
223
249
  /** 语言包类型,由 zh-CN 推导结构 */
224
250
  type Locale = typeof zhCN;
251
+ /** Dialog 的全局基线配置,单个 Dialog 的同名 Props 优先。 */
252
+ interface DialogConfig {
253
+ /** 遮罩层 z-index;弹窗内容自动使用该值 + 1 */
254
+ zIndex?: number;
255
+ }
225
256
  interface LingeeProviderProps {
226
257
  /** 语言包,默认中文 */
227
258
  locale?: Locale;
259
+ /** Dialog 组件的全局基线配置 */
260
+ dialog?: DialogConfig;
228
261
  /**
229
262
  * 运行宿主标识,默认不传。
230
263
  *
@@ -352,6 +385,12 @@ declare const enUS: {
352
385
  };
353
386
  };
354
387
 
388
+ interface ComponentConfig {
389
+ dialog: DialogConfig;
390
+ }
391
+ /** 获取声明式组件当前生效的组件级配置。 */
392
+ declare function useComponentConfig(): ComponentConfig;
393
+
355
394
  /**
356
395
  * 组件库根 Provider
357
396
  *
@@ -367,7 +406,7 @@ declare const enUS: {
367
406
  * </LingeeProvider>
368
407
  * ```
369
408
  */
370
- declare function LingeeProvider({ locale, site, children }: LingeeProviderProps): react_jsx_runtime.JSX.Element;
409
+ declare function LingeeProvider({ locale, site, dialog, children }: LingeeProviderProps): react_jsx_runtime.JSX.Element;
371
410
  declare namespace LingeeProvider {
372
411
  var displayName: string;
373
412
  }
@@ -551,7 +590,7 @@ interface DialogProps {
551
590
  maskClassName?: string;
552
591
  /** 关闭后是否销毁子节点,默认 true */
553
592
  destroyOnHidden?: boolean;
554
- /** 自定义 z-index */
593
+ /** 自定义 z-index;优先于 LingeeProvider 的 dialog.zIndex */
555
594
  zIndex?: number;
556
595
  /** 弹窗面板总高上限,默认 640px */
557
596
  maxHeight?: number | string;
@@ -607,7 +646,18 @@ interface DialogConfirmOptions extends Omit<DialogProps, "open" | "onOpenChange"
607
646
  declare const Dialog$1: React__default.FC<DialogProps>;
608
647
 
609
648
  declare function confirm(options: DialogConfirmOptions): Promise<boolean>;
610
- /** 命令式关闭当前 confirm 弹窗(不 resolve,用于外部强制关闭兜底) */
649
+ /**
650
+ * 强制关闭确认弹窗:当前一项与队列中排队的全部按 false 结算。
651
+ *
652
+ * 为什么连排队项一起清掉,而不是只关当前一项:调用方的意图是「确保某个弹窗不在了」,
653
+ * 而队列化之后,目标弹窗可能还排在队里没显示。若只关 activeTask,就会关掉前面那个
654
+ * 无关的弹窗,而目标弹窗随后照样弹出来 —— 与调用方意图正好相反。
655
+ *
656
+ * 队列化前 `destroy()` 是无条件清场,语义确定;这里保持一致。
657
+ * 需要「只关自己那一个」的场景应当由调用方持有句柄,而不是依赖这个全局兜底。
658
+ *
659
+ * 与旧实现一致,不调用 onCancel,只结算 false。
660
+ */
611
661
  declare function closeConfirm(): void;
612
662
 
613
663
  /** 当前页面是否运行在宿主弹窗内(含端侧 webview 与浏览器 iframe 两种承载) */
@@ -1860,6 +1910,11 @@ interface SidebarGroupHeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, "
1860
1910
  onToggle?: () => void;
1861
1911
  /** 右侧操作区插槽 */
1862
1912
  actions?: ReactNode;
1913
+ /**
1914
+ * 操作区常显。默认 false —— 常态隐藏、hover / 键盘聚焦时显现(分组头数量多时避免噪音)。
1915
+ * 置 true 让操作区一直显示(与 CollapsibleListItem.actionsVisible 语义一致)。
1916
+ */
1917
+ actionsVisible?: boolean;
1863
1918
  className?: string;
1864
1919
  style?: CSSProperties;
1865
1920
  }
@@ -3278,4 +3333,4 @@ declare const Carousel: CarouselComponent;
3278
3333
  */
3279
3334
  declare function cn(...inputs: ClassValue[]): string;
3280
3335
 
3281
- 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 CoverConfig, type CustomRequestOptions, type CustomRequestReturn, DatePicker, type DatePickerProps, type DatePickerSize, type DateRange, Dialog, 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 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, 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, 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, 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, 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, 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, useComponentLocale, useLocale, useSite, zhCN };
3336
+ 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 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, 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, 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, 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, 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-89atTLPD.js';
2
- export { a as Button, b as ButtonShape, c as ButtonSize, d as ButtonVariant } from './index-89atTLPD.js';
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';
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';
@@ -70,6 +70,32 @@ interface EllipsisTooltipProps extends Omit<TooltipProps, "children" | "content"
70
70
  */
71
71
  declare const EllipsisTooltip: React__default.ForwardRefExoticComponent<EllipsisTooltipProps & React__default.RefAttributes<HTMLElement>>;
72
72
 
73
+ /**
74
+ * 全局提示的跨窗口通信协议
75
+ *
76
+ * ── 为什么组件库自己实现一份,而不 import lingee-web-bridge-sdk ──
77
+ *
78
+ * 与 dialog/host-modal-protocol.ts 同一个理由:这是一份**协议契约**,不是共享实现。
79
+ * 组件库对宿主的依赖必须零包依赖 —— 对客户端做能力探测,对父窗口按约定
80
+ * postMessage。改成 import SDK 会把 private 包的协议代码 bundle 进 lingee-ui
81
+ * 的公开发布物,且给所有接入方多背一个只有一个宿主用得上的运行时依赖。
82
+ *
83
+ * ⚠️ **本文件的常量与字段形状必须与 SDK 的 shared/constants.ts 保持逐字一致**。
84
+ * 任一端改动协议,另一端必须同步,否则消息会被对方静默丢弃
85
+ * (信封校验不通过时不会报错,只是收不到)。
86
+ *
87
+ * ── 与弹窗协议最大的差异:没有响应,故可用性靠预先协商 ──
88
+ *
89
+ * 弹窗类通道靠「宿主回没回受理」判断可用性,为此付一次握手等待。提示不能这么做:
90
+ * 那意味着每条提示延迟 1.5 秒,而提示的全部价值就是即时反馈。
91
+ *
92
+ * 因此这里维护一个能力标记,由两条路填充:宿主在 iframe 就绪后主动广播 ready;
93
+ * 本模块加载时主动 probe 一次,宿主收到即补发。两条都要有 —— 只留一条会在
94
+ * 时序另一侧留下盲区,表现为「有时能盖住宿主侧边栏、有时不能」,比稳定失效更难查。
95
+ */
96
+ /** 提示级别;只开放这四档,与 ToastType 一致(端侧组件库的 feature 档不暴露) */
97
+ type HostToastLevel = 'info' | 'success' | 'warning' | 'error';
98
+
73
99
  /**
74
100
  * site 全局配置
75
101
  *
@@ -222,9 +248,16 @@ declare const zhCN: {
222
248
 
223
249
  /** 语言包类型,由 zh-CN 推导结构 */
224
250
  type Locale = typeof zhCN;
251
+ /** Dialog 的全局基线配置,单个 Dialog 的同名 Props 优先。 */
252
+ interface DialogConfig {
253
+ /** 遮罩层 z-index;弹窗内容自动使用该值 + 1 */
254
+ zIndex?: number;
255
+ }
225
256
  interface LingeeProviderProps {
226
257
  /** 语言包,默认中文 */
227
258
  locale?: Locale;
259
+ /** Dialog 组件的全局基线配置 */
260
+ dialog?: DialogConfig;
228
261
  /**
229
262
  * 运行宿主标识,默认不传。
230
263
  *
@@ -352,6 +385,12 @@ declare const enUS: {
352
385
  };
353
386
  };
354
387
 
388
+ interface ComponentConfig {
389
+ dialog: DialogConfig;
390
+ }
391
+ /** 获取声明式组件当前生效的组件级配置。 */
392
+ declare function useComponentConfig(): ComponentConfig;
393
+
355
394
  /**
356
395
  * 组件库根 Provider
357
396
  *
@@ -367,7 +406,7 @@ declare const enUS: {
367
406
  * </LingeeProvider>
368
407
  * ```
369
408
  */
370
- declare function LingeeProvider({ locale, site, children }: LingeeProviderProps): react_jsx_runtime.JSX.Element;
409
+ declare function LingeeProvider({ locale, site, dialog, children }: LingeeProviderProps): react_jsx_runtime.JSX.Element;
371
410
  declare namespace LingeeProvider {
372
411
  var displayName: string;
373
412
  }
@@ -551,7 +590,7 @@ interface DialogProps {
551
590
  maskClassName?: string;
552
591
  /** 关闭后是否销毁子节点,默认 true */
553
592
  destroyOnHidden?: boolean;
554
- /** 自定义 z-index */
593
+ /** 自定义 z-index;优先于 LingeeProvider 的 dialog.zIndex */
555
594
  zIndex?: number;
556
595
  /** 弹窗面板总高上限,默认 640px */
557
596
  maxHeight?: number | string;
@@ -607,7 +646,18 @@ interface DialogConfirmOptions extends Omit<DialogProps, "open" | "onOpenChange"
607
646
  declare const Dialog$1: React__default.FC<DialogProps>;
608
647
 
609
648
  declare function confirm(options: DialogConfirmOptions): Promise<boolean>;
610
- /** 命令式关闭当前 confirm 弹窗(不 resolve,用于外部强制关闭兜底) */
649
+ /**
650
+ * 强制关闭确认弹窗:当前一项与队列中排队的全部按 false 结算。
651
+ *
652
+ * 为什么连排队项一起清掉,而不是只关当前一项:调用方的意图是「确保某个弹窗不在了」,
653
+ * 而队列化之后,目标弹窗可能还排在队里没显示。若只关 activeTask,就会关掉前面那个
654
+ * 无关的弹窗,而目标弹窗随后照样弹出来 —— 与调用方意图正好相反。
655
+ *
656
+ * 队列化前 `destroy()` 是无条件清场,语义确定;这里保持一致。
657
+ * 需要「只关自己那一个」的场景应当由调用方持有句柄,而不是依赖这个全局兜底。
658
+ *
659
+ * 与旧实现一致,不调用 onCancel,只结算 false。
660
+ */
611
661
  declare function closeConfirm(): void;
612
662
 
613
663
  /** 当前页面是否运行在宿主弹窗内(含端侧 webview 与浏览器 iframe 两种承载) */
@@ -1860,6 +1910,11 @@ interface SidebarGroupHeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, "
1860
1910
  onToggle?: () => void;
1861
1911
  /** 右侧操作区插槽 */
1862
1912
  actions?: ReactNode;
1913
+ /**
1914
+ * 操作区常显。默认 false —— 常态隐藏、hover / 键盘聚焦时显现(分组头数量多时避免噪音)。
1915
+ * 置 true 让操作区一直显示(与 CollapsibleListItem.actionsVisible 语义一致)。
1916
+ */
1917
+ actionsVisible?: boolean;
1863
1918
  className?: string;
1864
1919
  style?: CSSProperties;
1865
1920
  }
@@ -3278,4 +3333,4 @@ declare const Carousel: CarouselComponent;
3278
3333
  */
3279
3334
  declare function cn(...inputs: ClassValue[]): string;
3280
3335
 
3281
- 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 CoverConfig, type CustomRequestOptions, type CustomRequestReturn, DatePicker, type DatePickerProps, type DatePickerSize, type DateRange, Dialog, 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 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, 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, 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, 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, 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, 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, useComponentLocale, useLocale, useSite, zhCN };
3336
+ 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 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, 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, 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, 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, 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 };