@sia.soul/sia-react-ui 0.1.166 → 0.1.167

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 (40) hide show
  1. package/dist/chart.cjs +4553 -4513
  2. package/dist/chart.d.cts +1850 -1843
  3. package/dist/chart.d.ts +1850 -1843
  4. package/dist/chart.js +1 -1
  5. package/dist/chunk-2FZI7TP6.js +0 -0
  6. package/dist/{chunk-T2F6X3LA.js → chunk-5CGJVE4C.js} +26 -22
  7. package/dist/{chunk-2EC653G5.js → chunk-5KTQXNGL.js} +2 -2
  8. package/dist/{chunk-NHGCGOF2.js → chunk-A7TLMWMM.js} +4754 -4714
  9. package/dist/{chunk-G5EJJFUI.js → chunk-FSO46WEJ.js} +14 -6
  10. package/dist/{chunk-SX4LLT3H.js → chunk-KDNOLFDJ.js} +2 -2
  11. package/dist/{chunk-DKQ5UCN6.js → chunk-S6FA6NN3.js} +519 -220
  12. package/dist/{chunk-23FQ5ARA.js → chunk-XS7AVCHO.js} +27 -17
  13. package/dist/{core-Cnt8r6pj.d.cts → core-C7Was4Vc.d.cts} +6 -9
  14. package/dist/{core-Dy8NWJ1b.d.ts → core-D7C32Rdq.d.ts} +6 -9
  15. package/dist/core.cjs +83 -61
  16. package/dist/core.css +3135 -5340
  17. package/dist/core.d.cts +1 -1
  18. package/dist/core.d.ts +1 -1
  19. package/dist/core.js +4 -4
  20. package/dist/game.cjs +14 -6
  21. package/dist/game.css +1666 -3147
  22. package/dist/game.js +1 -1
  23. package/dist/index.cjs +6625 -6197
  24. package/dist/index.css +8733 -8560
  25. package/dist/index.d.cts +126 -110
  26. package/dist/index.d.ts +126 -110
  27. package/dist/index.js +817 -749
  28. package/dist/markdown-editor.css +461 -0
  29. package/dist/markdown-editor.js +2 -1
  30. package/dist/rich-text-editor.cjs +38 -20
  31. package/dist/rich-text-editor.css +461 -0
  32. package/dist/rich-text-editor.js +4 -3
  33. package/dist/{select-date-range-E1N5-oXv.d.ts → select-date-range-AOleKBXc.d.ts} +6 -9
  34. package/dist/{select-date-range-BnlISSPV.d.cts → select-date-range-BtTkMElI.d.cts} +6 -9
  35. package/dist/select-date-range.cjs +529 -222
  36. package/dist/select-date-range.d.cts +1 -1
  37. package/dist/select-date-range.d.ts +1 -1
  38. package/dist/select-date-range.js +4 -4
  39. package/package.json +5 -1
  40. /package/dist/{chunk-V4I32DPL.js → chunk-GKWSCL5Q.js} +0 -0
package/dist/index.d.cts CHANGED
@@ -1,13 +1,13 @@
1
1
  import * as react from 'react';
2
2
  import { HTMLAttributes, ReactNode, CSSProperties, ElementType, FormHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, MouseEvent, Key, PointerEvent, Ref, ReactElement, ButtonHTMLAttributes, VideoHTMLAttributes } from 'react';
3
- import { T as TagStatus, B as BadgeProps } from './core-Cnt8r6pj.cjs';
4
- export { a as Badge, b as BadgeRibbonProps, c as BadgeStatus, d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, C as Calendar, g as CalendarProps, h as Card, i as CardAccent, j as CardProps, k as Carousel, l as CarouselProps, m as CarouselRef, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, D as Dropdown, r as DropdownButtonProps, s as DropdownMenuProps, t as DropdownOpenSource, u as DropdownPlacement, v as DropdownProps, w as DropdownTrigger, F as FILLED_ICON_NAMES, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, H as FloatingPlacement, I as FloatingScrollbarProvider, J as FloatingScrollbarProviderProps, K as FloatingTrigger, L as ICON_NAMES, M as Icon, N as IconName, O as IconProps, P as IconVariant, Q as Image, R as ImagePreview, S as ImagePreviewConfig, U as ImagePreviewGroup, V as ImagePreviewGroupProps, W as ImagePreviewProps, X as ImageProps, Y as Input, Z as InputProps, _ as Menu, $ as MenuClickInfo, a0 as MenuItem, a1 as MenuMode, a2 as MenuProps, a3 as MenuTheme, a4 as MessageConfig, a5 as MessageHandle, a6 as MessageKey, a7 as MessageType, a8 as NotificationConfig, a9 as NotificationPlacement, aa as NotificationType, ab as Popconfirm, ac as PopconfirmProps, ad as Popover, ae as PopoverProps, af as Progress, ag as ProgressProps, ah as ProgressStatus, ai as Rate, aj as RateProps, ak as Result, al as ResultProps, am as ResultStatus, an as Segmented, ao as SegmentedOption, ap as SegmentedProps, aq as SegmentedValue, ar as Skeleton, as as SkeletonProps, at as Spin, au as SpinProps, av as StepItem, aw as StepStatus, ax as Steps, ay as StepsProps, az as TabItem, aA as Tabs, aB as TabsContextMenuClickInfo, aC as TabsOrientation, aD as TabsPosition, aE as TabsProps, aF as TabsType, aG as Tag, aH as TagProps, aI as TagSize, aJ as TagVariant, aK as Timeline, aL as TimelineItem, aM as TimelineProps, aN as Toolbar, aO as ToolbarItem, aP as ToolbarProps, aQ as Tooltip, aR as TooltipProps, aS as Tour, aT as TourProps, aU as TourStep, aV as Tree, aW as TreeDropPosition, aX as TreeKey, aY as TreeNode, aZ as TreeProps, a_ as Typography, a$ as TypographyLinkProps, b0 as TypographyProps, b1 as TypographyTitleProps, b2 as TypographyType, b3 as Upload, b4 as UploadChangeInfo, b5 as UploadDraggerProps, b6 as UploadFile, b7 as UploadFileStatus, b8 as UploadHttpRequest, b9 as UploadItemActions, ba as UploadProps, bb as UploadRef, bc as UploadRejectInfo, bd as UploadRequestHandle, be as UploadRequestOptions, bf as Watermark, bg as WatermarkFont, bh as WatermarkProps, bi as message, bj as notification } from './core-Cnt8r6pj.cjs';
3
+ import { T as TagStatus, B as BadgeProps } from './core-C7Was4Vc.cjs';
4
+ export { a as Badge, b as BadgeRibbonProps, c as BadgeStatus, d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, C as Calendar, g as CalendarProps, h as Card, i as CardAccent, j as CardProps, k as Carousel, l as CarouselProps, m as CarouselRef, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, D as Dropdown, r as DropdownButtonProps, s as DropdownMenuProps, t as DropdownOpenSource, u as DropdownPlacement, v as DropdownProps, w as DropdownTrigger, F as FILLED_ICON_NAMES, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, H as FloatingPlacement, I as FloatingScrollbarProvider, J as FloatingScrollbarProviderProps, K as FloatingTrigger, L as ICON_NAMES, M as Icon, N as IconName, O as IconProps, P as IconVariant, Q as Image, R as ImagePreview, S as ImagePreviewConfig, U as ImagePreviewGroup, V as ImagePreviewGroupProps, W as ImagePreviewProps, X as ImageProps, Y as Input, Z as InputProps, _ as Menu, $ as MenuClickInfo, a0 as MenuItem, a1 as MenuMode, a2 as MenuProps, a3 as MenuTheme, a4 as MessageConfig, a5 as MessageHandle, a6 as MessageKey, a7 as MessageType, a8 as NotificationConfig, a9 as NotificationPlacement, aa as NotificationType, ab as Popconfirm, ac as PopconfirmProps, ad as Popover, ae as PopoverProps, af as Progress, ag as ProgressProps, ah as ProgressStatus, ai as Rate, aj as RateProps, ak as Result, al as ResultProps, am as ResultStatus, an as Segmented, ao as SegmentedOption, ap as SegmentedProps, aq as SegmentedValue, ar as Skeleton, as as SkeletonProps, at as Spin, au as SpinProps, av as StepItem, aw as StepStatus, ax as Steps, ay as StepsProps, az as TabItem, aA as Tabs, aB as TabsContextMenuClickInfo, aC as TabsOrientation, aD as TabsPosition, aE as TabsProps, aF as TabsType, aG as Tag, aH as TagProps, aI as TagSize, aJ as TagVariant, aK as Timeline, aL as TimelineItem, aM as TimelineProps, aN as Toolbar, aO as ToolbarItem, aP as ToolbarProps, aQ as Tooltip, aR as TooltipProps, aS as Tour, aT as TourProps, aU as TourStep, aV as Tree, aW as TreeDropPosition, aX as TreeKey, aY as TreeNode, aZ as TreeProps, a_ as Typography, a$ as TypographyLinkProps, b0 as TypographyProps, b1 as TypographyTitleProps, b2 as TypographyType, b3 as Upload, b4 as UploadChangeInfo, b5 as UploadDraggerProps, b6 as UploadFile, b7 as UploadFileStatus, b8 as UploadHttpRequest, b9 as UploadItemActions, ba as UploadProps, bb as UploadRef, bc as UploadRejectInfo, bd as UploadRequestHandle, be as UploadRequestOptions, bf as Watermark, bg as WatermarkFont, bh as WatermarkProps, bi as message, bj as notification } from './core-C7Was4Vc.cjs';
5
5
  import { C as ControlSize, I as InputPlaceholderMode, a as ControlStatus } from './shared-Bx4B28Wh.cjs';
6
6
  import { B as ButtonProps, a as ButtonSize } from './Button-xLR4Yt57.cjs';
7
7
  export { b as Button, c as ButtonVariant } from './Button-xLR4Yt57.cjs';
8
8
  import { O as OverlayContainer, a as OverlayApiHandle, M as ModalOpenConfig, S as SelectOption, b as SelectChangeValue, c as SelectProps, d as ModalActionResult } from './Select-Dxevc0f6.cjs';
9
9
  export { e as Modal, f as ModalProps, g as ModalType, h as Select, i as SelectMode, j as SelectValue } from './Select-Dxevc0f6.cjs';
10
- export { D as DatePicker, a as DatePickerDisabledInfo, b as DatePickerPreset, c as DatePickerProps, d as DatePickerShowTime, e as DatePickerType, f as DatePickerValue, g as DateRangePickerPreset, h as DateRangePickerProps, S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-BnlISSPV.cjs';
10
+ export { D as DatePicker, a as DatePickerDisabledInfo, b as DatePickerPreset, c as DatePickerProps, d as DatePickerShowTime, e as DatePickerType, f as DatePickerValue, g as DateRangePickerPreset, h as DateRangePickerProps, S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-BtTkMElI.cjs';
11
11
  export { RichTextContent, RichTextContentFormat, RichTextContentProps, RichTextEditor, RichTextEditorProps, RichTextImagePasteHandler, RichTextToolbar } from './rich-text-editor.cjs';
12
12
  export { MarkdownEditor, MarkdownEditorMode, MarkdownEditorProps } from './markdown-editor.cjs';
13
13
  import * as Monaco from 'monaco-editor';
@@ -139,7 +139,7 @@ interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
139
139
  afterClose?: () => void;
140
140
  }
141
141
  /** 警告提示组件;入场及关闭使用同一条 180ms 淡入轨迹,关闭反播后卸载;onClose 立即触发,afterClose 等待退场完成。 */
142
- declare function Alert({ status, type, title, message, description, action, showIcon, closable, closeIcon, banner, onClose, afterClose, className, ...props }: AlertProps): react.JSX.Element | null;
142
+ declare const Alert: react.ForwardRefExoticComponent<AlertProps & react.RefAttributes<HTMLDivElement>>;
143
143
 
144
144
  /** 分页器默认提供的每页记录数选项。 */
145
145
  declare const DEFAULT_PAGE_SIZE_OPTIONS: readonly [10, 25, 50, 100, 200, 500, 1000, 2000, 5000];
@@ -203,7 +203,7 @@ interface PaginationProps extends Omit<HTMLAttributes<HTMLElement>, "onChange">
203
203
  onShowSizeChange?: (current: number, pageSize: number) => void;
204
204
  }
205
205
  /** 分页组件。 */
206
- declare function Pagination({ size: sizeProp, total, currentPageCount, current, defaultCurrent, pageSize, defaultPageSize, pageSizeOptions, showSizeChanger, showTotal, disabled, hideOnSinglePage, refreshing, onRefreshTotal, onChange, onShowSizeChange, className, ...props }: PaginationProps): react.JSX.Element | null;
206
+ declare const Pagination: react.ForwardRefExoticComponent<PaginationProps & react.RefAttributes<HTMLElement>>;
207
207
 
208
208
  /** 级联选择的值类型。 */
209
209
  type CascaderValue = string | number;
@@ -287,7 +287,7 @@ interface CascaderProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultVal
287
287
  onChange?: (value: readonly CascaderValue[] | readonly (readonly CascaderValue[])[] | undefined, selectedOptions: CascaderOption[] | CascaderOption[][]) => void;
288
288
  }
289
289
  /** 级联选择组件;弹层宽度由当前展开的菜单列及搜索栏决定,每列最小宽度为 170px,不跟随输入框预留空白子级区域;展开子项后才增加对应列,分隔线仅显示在相邻列之间。 */
290
- declare function Cascader({ options, value, defaultValue, size: sizeProp, multiple, showSearch, allowClear, changeOnSelect, expandTrigger, placeholder, placeholderMode, disabled, fieldNames, displayRender, loadData, onChange, className, ...props }: CascaderProps): react.JSX.Element;
290
+ declare const Cascader: react.ForwardRefExoticComponent<CascaderProps & react.RefAttributes<HTMLDivElement>>;
291
291
 
292
292
  /** 布局间距,可使用预设等级或数值。 */
293
293
  type LayoutGap = "small" | "medium" | "large" | number | string;
@@ -564,39 +564,49 @@ declare function ToolPanel({ title, icon, items, activeKey, defaultActiveKey, on
564
564
 
565
565
  /** SiaTheme的模式类型。 */
566
566
  type SiaThemeMode = "light" | "dark";
567
- /** 框架主题令牌集合。 */
567
+ /** 框架主题令牌集合,与浅色默认 CSS 变量保持一致;业务可通过容器或组件上的同名 `--sia-*` 变量覆盖。 */
568
568
  declare const SIA_THEME: {
569
- /** 主色。 */
569
+ /** 主色,对应 `--sia-color-primary`。 */
570
570
  readonly colorPrimary: "#1677ff";
571
- /** 主色的悬停色。 */
571
+ /** 主色的悬停色,对应 `--sia-color-primary-hover`。 */
572
572
  readonly colorPrimaryHover: "#4096ff";
573
- /** 主色的按下色。 */
573
+ /** 主色的按下色,对应 `--sia-color-primary-active`。 */
574
574
  readonly colorPrimaryActive: "#0958d9";
575
- /** 主要文本颜色。 */
575
+ /** 成功语义色,对应 `--sia-color-success`。 */
576
+ readonly colorSuccess: "#52c41a";
577
+ /** 警告语义色,对应 `--sia-color-warning`。 */
578
+ readonly colorWarning: "#faad14";
579
+ /** 错误语义色,对应 `--sia-color-error`。 */
580
+ readonly colorError: "#ff4d4f";
581
+ /** 主要文本颜色,对应 `--sia-color-text`。 */
576
582
  readonly colorText: "#1f1f1f";
577
- /** 次要文本颜色。 */
583
+ /** 次要文本颜色,对应 `--sia-color-text-secondary`。 */
578
584
  readonly colorTextSecondary: "#666666";
579
- /** 页面背景颜色。 */
585
+ /** 页面背景颜色,对应 `--sia-color-background`。 */
580
586
  readonly colorBackground: "#f5f7fa";
581
- /** 组件表面颜色。 */
587
+ /** 组件表面颜色,对应 `--sia-color-surface`。 */
582
588
  readonly colorSurface: "#ffffff";
583
- /** 默认边框颜色。 */
589
+ /** 默认边框颜色,对应 `--sia-color-border`。 */
584
590
  readonly colorBorder: "#d9d9d9";
585
- /** 默认圆角半径,单位为像素。 */
591
+ /** 默认圆角半径,单位为像素,对应 `--sia-radius`。 */
586
592
  readonly borderRadius: 6;
587
- /** 默认控件高度,单位为像素。 */
588
- readonly controlHeight: 32;
589
- /** 默认布局间距为 8 像素,对应 --sia-spacing;业务可通过容器或组件上的同名 CSS 变量覆盖。 */
593
+ /** 小号控件高度,单位为像素,对应 `--sia-control-height-small`。 */
594
+ readonly controlHeightSmall: 22;
595
+ /** 默认(中号)控件高度,单位为像素,对应 `--sia-control-height` / `--sia-control-height-medium`。 */
596
+ readonly controlHeight: 30;
597
+ /** 大号控件高度,单位为像素,对应 `--sia-control-height-large`。 */
598
+ readonly controlHeightLarge: 38;
599
+ /** 默认布局间距为 8 像素,对应 `--sia-spacing`;业务可通过容器或组件上的同名 CSS 变量覆盖。 */
590
600
  readonly spacing: 8;
591
- /** 默认基础字号为 13 像素,对应 --sia-font-size;业务可通过 CSS 变量覆盖。 */
601
+ /** 默认基础字号为 13 像素,对应 `--sia-font-size`;业务可通过 CSS 变量覆盖。 */
592
602
  readonly fontSize: 13;
593
- /** 默认小号文字尺寸为 13 像素,对应 --sia-font-size-small;业务可通过 CSS 变量覆盖。 */
603
+ /** 默认小号文字尺寸为 13 像素,对应 `--sia-font-size-small`;业务可通过 CSS 变量覆盖。 */
594
604
  readonly fontSizeSmall: 13;
595
- /** 大号文字尺寸,单位为像素。 */
605
+ /** 大号文字尺寸,单位为像素,对应 `--sia-font-size-large`。 */
596
606
  readonly fontSizeLarge: 18;
597
607
  };
598
- /** 将亮色或暗色主题应用到指定元素;省略目标时应用到文档根节点。 */
599
- declare function applySiaTheme(mode: SiaThemeMode, target?: HTMLElement): void;
608
+ /** 将亮色或暗色主题应用到指定元素;省略目标时默认应用到文档根节点,服务端无 `document` 环境或目标为空时静默跳过。 */
609
+ declare function applySiaTheme(mode: SiaThemeMode, target?: HTMLElement | null): void;
600
610
 
601
611
  /** 窗口控制操作名称。 */
602
612
  type WindowAction = "start-dragging" | "minimize" | "toggle-maximize" | "close";
@@ -1220,7 +1230,7 @@ interface SliderProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue
1220
1230
  onChangeComplete?: (value: SliderValue) => void;
1221
1231
  }
1222
1232
  /** 滑块组件。 */
1223
- declare function Slider({ value, defaultValue, min, max, step, range, disabled, reverse, vertical, marks, tooltip, className, onChange, onChangeComplete, ...props }: SliderProps): react.JSX.Element;
1233
+ declare const Slider: react.ForwardRefExoticComponent<SliderProps & react.RefAttributes<HTMLDivElement>>;
1224
1234
 
1225
1235
  /** 颜色选择的模式类型。 */
1226
1236
  type ColorPickerMode = "solid" | "gradient";
@@ -1286,7 +1296,7 @@ interface ColorPickerProps extends Omit<HTMLAttributes<HTMLDivElement>, "default
1286
1296
  onClear?: () => void;
1287
1297
  }
1288
1298
  /** 颜色选择组件。 */
1289
- declare function ColorPicker({ size: sizeProp, value, defaultValue, mode, defaultMode, modes, disabled, allowClear, showText, showAlpha, presets, className, onChange, onChangeComplete, onModeChange, onClear, ...props }: ColorPickerProps): react.JSX.Element;
1299
+ declare const ColorPicker: react.ForwardRefExoticComponent<ColorPickerProps & react.RefAttributes<HTMLDivElement>>;
1290
1300
 
1291
1301
  /** 时间选择的属性配置。 */
1292
1302
  interface TimePickerProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size" | "value" | "defaultValue" | "onChange"> {
@@ -1352,13 +1362,11 @@ interface TimeRangePickerProps extends Omit<TimePickerProps, "value" | "defaultV
1352
1362
  /** 值发生变化时调用;参数为新值及类型声明中列出的关联信息。 */
1353
1363
  onChange?: (value: readonly [string, string]) => void;
1354
1364
  }
1355
- declare function TimeRangePicker({ value, defaultValue, placeholder, separator, onChange, className, style, ...props }: TimeRangePickerProps): react.JSX.Element;
1356
1365
  /** 时间选择组件。 */
1357
- declare function TimePicker({ value, defaultValue, size: sizeProp, status, allowClear, use12Hours, showSecond, suffixIcon, disabledTime, disabled, readOnly, className, style, onChange, onOpenChange, placeholder, placeholderMode, min, max, step, ...props }: TimePickerProps): react.JSX.Element;
1358
- declare namespace TimePicker {
1366
+ declare const TimePicker: react.ForwardRefExoticComponent<TimePickerProps & react.RefAttributes<HTMLSpanElement>> & {
1359
1367
  /** 时间区间选择器。 */
1360
- const RangePicker: typeof TimeRangePicker;
1361
- }
1368
+ RangePicker: react.ForwardRefExoticComponent<TimeRangePickerProps & react.RefAttributes<HTMLSpanElement>>;
1369
+ };
1362
1370
 
1363
1371
  /** 树选择的值类型。 */
1364
1372
  type TreeSelectValue = string | number;
@@ -1511,7 +1519,7 @@ interface TreeSelectProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultV
1511
1519
  onDropdownVisibleChange?: (open: boolean) => void;
1512
1520
  }
1513
1521
  /** 树选择组件。 */
1514
- declare function TreeSelect({ treeData, value, defaultValue, multiple, treeCheckable, showSearch, allowClear, treeDefaultExpandAll, placeholder, placeholderMode, searchPlaceholder, maxTagCount, disabled, size: sizeProp, status, className, onChange, onSearch, onDropdownVisibleChange, open: controlledOpen, defaultOpen, searchValue, treeExpandedKeys, treeDefaultExpandedKeys, onTreeExpand, filterTreeNode, treeCheckStrictly, showCheckedStrategy, loading, listHeight, popupClassName, popupStyle, dropdownFooter, displayRender, renderTrigger, onClear, onSelect, onDeselect, ...props }: TreeSelectProps): react.JSX.Element;
1522
+ declare const TreeSelect: react.ForwardRefExoticComponent<TreeSelectProps & react.RefAttributes<HTMLDivElement>>;
1515
1523
 
1516
1524
  /** FlatTree的配置选项。 */
1517
1525
  interface FlatTreeOptions {
@@ -2641,6 +2649,18 @@ interface HighlightState {
2641
2649
  }
2642
2650
  /** 创建表格行和单元格高亮插件。将返回值加入 Table 的 plugins 后生效。 */
2643
2651
  declare function createHighlightPlugin<T extends Record<string, unknown>>(options?: TableHighlightPluginOptions): TablePlugin<T, HighlightState>;
2652
+ /** TableRowSpan的插件配置。 */
2653
+ interface TableRowSpanPluginOptions<T> {
2654
+ /** 列配置或选项布局列数,具体类型见签名。 */
2655
+ columns?: readonly string[];
2656
+ /** 自定义两个值的相等性判断。 */
2657
+ equals?: (left: unknown, right: unknown, column: TableColumn<T>) => boolean;
2658
+ /** 是否禁用虚拟渲染,默认 true;仅在展示行数不超过 100 时生效,超过 100 行由表格强制启用。 */
2659
+ disableVirtual?: boolean;
2660
+ }
2661
+ /** 创建表格跨行合并插件。将返回值加入 Table 的 plugins 后生效。 */
2662
+ declare function createRowSpanPlugin<T extends Record<string, unknown>>(options?: TableRowSpanPluginOptions<T>): TablePlugin<T, undefined>;
2663
+
2644
2664
  /** 通过行标识和列标识定位一个单元格。 */
2645
2665
  interface TableCellAddress {
2646
2666
  /** 行唯一键字段或计算函数 */
@@ -2711,17 +2731,7 @@ interface TableCellSelectionApi<T> {
2711
2731
  }
2712
2732
  /** 创建表格单元格区域选择插件。Table 默认内置;点击表格空白处或表格外部时清除单元格选区,不改变行勾选状态。显式传入 plugins 可自定义选择和复制行为。 */
2713
2733
  declare function createCellSelectionPlugin<T extends Record<string, unknown>>(options?: TableCellSelectionPluginOptions<T>): TablePlugin<T, CellSelectionState, TableCellSelectionApi<T>>;
2714
- /** TableRowSpan的插件配置。 */
2715
- interface TableRowSpanPluginOptions<T> {
2716
- /** 列配置或选项布局列数,具体类型见签名。 */
2717
- columns?: readonly string[];
2718
- /** 自定义两个值的相等性判断。 */
2719
- equals?: (left: unknown, right: unknown, column: TableColumn<T>) => boolean;
2720
- /** 是否禁用虚拟渲染,默认 true;仅在展示行数不超过 100 时生效,超过 100 行由表格强制启用。 */
2721
- disableVirtual?: boolean;
2722
- }
2723
- /** 创建表格跨行合并插件。将返回值加入 Table 的 plugins 后生效。 */
2724
- declare function createRowSpanPlugin<T extends Record<string, unknown>>(options?: TableRowSpanPluginOptions<T>): TablePlugin<T, undefined>;
2734
+
2725
2735
  /** TableSelection的模式类型。 */
2726
2736
  type TableSelectionMode = "single" | "multiple" | "row";
2727
2737
  /** TableSelection的插件配置。 */
@@ -2785,6 +2795,17 @@ interface TableSelectionApi<T> {
2785
2795
  }
2786
2796
  /** 创建表格行勾选插件。将返回值加入 Table 的 plugins 后生效;跨页行缓存属于表格实例,重新创建插件不会清空缓存,不同表格互不共享。 */
2787
2797
  declare function createSelectionPlugin<T extends Record<string, unknown>>(options?: TableSelectionPluginOptions<T>): TablePlugin<T, SelectionState<T>, TableSelectionApi<T>>;
2798
+
2799
+ /** 表格分页和总数请求状态(插件间共享的内部状态结构)。 */
2800
+ interface PaginationState {
2801
+ /** 当前页码。 */
2802
+ current: number;
2803
+ /** 每页记录数。 */
2804
+ pageSize: number;
2805
+ /** 是否正在请求记录总数。 */
2806
+ requestLoading: boolean;
2807
+ }
2808
+
2788
2809
  /** TableSort的插件配置。 */
2789
2810
  interface TableSortPluginOptions {
2790
2811
  /** 展示或交互模式;可选值见类型定义。 */
@@ -2872,15 +2893,6 @@ interface TablePaginationPluginOptions {
2872
2893
  /** 是否为首次加载。 */
2873
2894
  isFirstLoad?: boolean;
2874
2895
  }
2875
- /** 表格分页和总数请求状态。 */
2876
- interface PaginationState {
2877
- /** 当前页码。 */
2878
- current: number;
2879
- /** 每页记录数。 */
2880
- pageSize: number;
2881
- /** 是否正在请求记录总数。 */
2882
- requestLoading: boolean;
2883
- }
2884
2896
  /** TablePagination的操作接口。 */
2885
2897
  interface TablePaginationApi {
2886
2898
  /** 读取当前分页状态。 */
@@ -2904,6 +2916,7 @@ interface TablePaginationApi {
2904
2916
  }
2905
2917
  /** 创建表格分页插件。将返回值加入 Table 的 plugins 后生效。 */
2906
2918
  declare function createPaginationPlugin<T extends Record<string, unknown>>(options?: TablePaginationPluginOptions): TablePlugin<T, PaginationState, TablePaginationApi>;
2919
+
2907
2920
  /** TableIndex的插件配置。 */
2908
2921
  interface TableIndexPluginOptions {
2909
2922
  /** 标题内容,可传入文本或 React 节点。 */
@@ -2965,6 +2978,7 @@ interface TableSummaryPluginOptions<T> {
2965
2978
  }
2966
2979
  /** 创建表格小计与总计插件。将返回值加入 Table 的 plugins 后生效。 */
2967
2980
  declare function createSummaryPlugin<T extends Record<string, unknown>>(options: TableSummaryPluginOptions<T>): TablePlugin<T, undefined>;
2981
+
2968
2982
  /** 表格当前编辑单元格的状态。 */
2969
2983
  interface EditableState {
2970
2984
  /** 是否处于编辑状态。 */
@@ -3016,64 +3030,7 @@ interface TableResizeApi {
3016
3030
  }
3017
3031
  /** 创建表格列宽拖拽调整插件。将返回值加入 Table 的 plugins 后生效。 */
3018
3032
  declare function createResizePlugin<T extends Record<string, unknown>>(options?: TableResizePluginOptions): TablePlugin<T, ResizeState, TableResizeApi>;
3019
- /** TableColumnSetting的插件配置。 */
3020
- interface TableColumnSettingPluginOptions<T> {
3021
- /** 设置按钮的完整 Button 属性;className 合并,disabled/loading 同时禁用菜单触发。 */
3022
- buttonProps?: ButtonProps;
3023
- /** 追加到设置下拉菜单中的业务操作。 */
3024
- menuItems?: readonly TableToolbarItem<T>[];
3025
- /** 是否显示设置菜单中的导出操作,默认 true。 */
3026
- showExport?: boolean;
3027
- /** 未读取到保存配置时默认显示的列标识。 */
3028
- defaultVisibleKeys?: readonly string[];
3029
- /** 是否在工具栏显示此插件的操作按钮。 */
3030
- showButton?: boolean;
3031
- /** 可见列集合变化时调用。 */
3032
- onVisibleChange?: (columns: readonly TableColumn<T>[]) => void;
3033
- /** 列顺序变化时调用。 */
3034
- onOrderChange?: (columns: readonly TableColumn<T>[]) => void;
3035
- /** 配置持久化适配器,提供 load 和 save 方法对接本地或云端存储。 */
3036
- adapter?: TableSettingsAdapter;
3037
- /** 配置存储的作用域,用于隔离不同模块和业务表格。 */
3038
- scope?: {
3039
- /** 所属业务模块名称。 */
3040
- moduleName: string;
3041
- /** 同一模块内用于区分表格配置的业务标识。 */
3042
- businessKey: string;
3043
- };
3044
- }
3045
- /** 列设置插件的加载、面板和持久化状态。 */
3046
- interface ColumnSettingState {
3047
- /** 列设置面板是否打开。 */
3048
- open: boolean;
3049
- /** 当前列设置集合。 */
3050
- items: readonly TableColumnSettingItem[];
3051
- /** 是否已完成一次配置读取。 */
3052
- loaded: boolean;
3053
- /** 是否正在读取配置。 */
3054
- loading?: boolean;
3055
- /** 最近一次配置读取是否失败。 */
3056
- loadError?: boolean;
3057
- /** 用于忽略过期读取响应的请求标记。 */
3058
- loadToken?: symbol;
3059
- /** 每页记录数。 */
3060
- pageSize?: number;
3061
- }
3062
- /** TableColumnSetting的操作接口。 */
3063
- interface TableColumnSettingApi {
3064
- /** 打开列设置面板,并通过已配置的适配器重新读取保存配置。 */
3065
- open: () => void;
3066
- /** 关闭当前界面或实例。 */
3067
- close: () => void;
3068
- /** 读取当前列设置快照。 */
3069
- getSettings: () => readonly TableColumnSettingItem[];
3070
- /** 应用传入的配置;是否持久化由方法参数或插件选项控制。 */
3071
- apply: (settings: readonly TableColumnSettingItem[]) => void;
3072
- }
3073
- /** 创建表格列设置和持久化插件。将返回值加入 Table 的 plugins 后生效;序号和勾选附加列不显示在设置中,不参与业务列排序、显隐、固定位置与宽度配置,旧存储中的附加列配置会被忽略。动态分组展开时自动补齐新叶子列,收起时保留子列设置供再次展开恢复。面板草稿在父级重渲染、聚焦、滚动或尺寸变化时保留;重新打开或外部配置实际变化时同步保存值。 */
3074
- declare function createColumnSettingPlugin<T extends Record<string, unknown>>(options?: TableColumnSettingPluginOptions<T>): TablePlugin<T, ColumnSettingState, TableColumnSettingApi>;
3075
- /** 创建使用 localStorage 持久化表格设置的适配器,按模块及业务标识隔离配置。 */
3076
- declare function createLocalStorageTableSettingsAdapter(prefix?: string): TableSettingsAdapter;
3033
+
3077
3034
  /** TableToolbar的项目定义。 */
3078
3035
  interface TableToolbarItem<T> {
3079
3036
  /** 唯一标识;同一集合内应保持唯一且稳定,用于定位、渲染和状态关联。 */
@@ -3143,6 +3100,65 @@ interface TableExportApi<T> {
3143
3100
  /** 创建表格数据导出插件。将返回值加入 Table 的 plugins 后生效。 */
3144
3101
  declare function createExportPlugin<T extends Record<string, unknown>>(options?: TableExportPluginOptions<T>): TablePlugin<T, undefined, TableExportApi<T>>;
3145
3102
 
3103
+ /** TableColumnSetting的插件配置。 */
3104
+ interface TableColumnSettingPluginOptions<T> {
3105
+ /** 设置按钮的完整 Button 属性;className 合并,disabled/loading 同时禁用菜单触发。 */
3106
+ buttonProps?: ButtonProps;
3107
+ /** 追加到设置下拉菜单中的业务操作。 */
3108
+ menuItems?: readonly TableToolbarItem<T>[];
3109
+ /** 是否显示设置菜单中的导出操作,默认 true。 */
3110
+ showExport?: boolean;
3111
+ /** 未读取到保存配置时默认显示的列标识。 */
3112
+ defaultVisibleKeys?: readonly string[];
3113
+ /** 是否在工具栏显示此插件的操作按钮。 */
3114
+ showButton?: boolean;
3115
+ /** 可见列集合变化时调用。 */
3116
+ onVisibleChange?: (columns: readonly TableColumn<T>[]) => void;
3117
+ /** 列顺序变化时调用。 */
3118
+ onOrderChange?: (columns: readonly TableColumn<T>[]) => void;
3119
+ /** 配置持久化适配器,提供 load 和 save 方法对接本地或云端存储。 */
3120
+ adapter?: TableSettingsAdapter;
3121
+ /** 配置存储的作用域,用于隔离不同模块和业务表格。 */
3122
+ scope?: {
3123
+ /** 所属业务模块名称。 */
3124
+ moduleName: string;
3125
+ /** 同一模块内用于区分表格配置的业务标识。 */
3126
+ businessKey: string;
3127
+ };
3128
+ }
3129
+ /** 列设置插件的加载、面板和持久化状态。 */
3130
+ interface ColumnSettingState {
3131
+ /** 列设置面板是否打开。 */
3132
+ open: boolean;
3133
+ /** 当前列设置集合。 */
3134
+ items: readonly TableColumnSettingItem[];
3135
+ /** 是否已完成一次配置读取。 */
3136
+ loaded: boolean;
3137
+ /** 是否正在读取配置。 */
3138
+ loading?: boolean;
3139
+ /** 最近一次配置读取是否失败。 */
3140
+ loadError?: boolean;
3141
+ /** 用于忽略过期读取响应的请求标记。 */
3142
+ loadToken?: symbol;
3143
+ /** 每页记录数。 */
3144
+ pageSize?: number;
3145
+ }
3146
+ /** TableColumnSetting的操作接口。 */
3147
+ interface TableColumnSettingApi {
3148
+ /** 打开列设置面板,并通过已配置的适配器重新读取保存配置。 */
3149
+ open: () => void;
3150
+ /** 关闭当前界面或实例。 */
3151
+ close: () => void;
3152
+ /** 读取当前列设置快照。 */
3153
+ getSettings: () => readonly TableColumnSettingItem[];
3154
+ /** 应用传入的配置;是否持久化由方法参数或插件选项控制。 */
3155
+ apply: (settings: readonly TableColumnSettingItem[]) => void;
3156
+ }
3157
+ /** 创建表格列设置和持久化插件。将返回值加入 Table 的 plugins 后生效;序号和勾选附加列不显示在设置中,不参与业务列排序、显隐、固定位置与宽度配置,旧存储中的附加列配置会被忽略。动态分组展开时自动补齐新叶子列,收起时保留子列设置供再次展开恢复。面板草稿在父级重渲染、聚焦、滚动或尺寸变化时保留;重新打开或外部配置实际变化时同步保存值。 */
3158
+ declare function createColumnSettingPlugin<T extends Record<string, unknown>>(options?: TableColumnSettingPluginOptions<T>): TablePlugin<T, ColumnSettingState, TableColumnSettingApi>;
3159
+ /** 创建使用 localStorage 持久化表格设置的适配器,按模块及业务标识隔离配置。 */
3160
+ declare function createLocalStorageTableSettingsAdapter(prefix?: string): TableSettingsAdapter;
3161
+
3146
3162
  /** 工作表一次数据变更的来源;行操作通过 replaceData 纳入同一历史。 */
3147
3163
  type TableWorksheetReason = "edit" | "paste" | "fill" | "replace" | "undo" | "redo";
3148
3164
  /** 单个单元格变更;只包含本次确实写入的单元格。 */