@sia.soul/sia-react-ui 0.1.136 → 0.1.138

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -13844,11 +13844,16 @@ function createRowIdentity() {
13844
13844
  }
13845
13845
 
13846
13846
  // src/components/Table/cellFocus.ts
13847
- function playCellFocusGlow(cell, isVisible, onFinish) {
13847
+ function playCellFocusGlow(cell, isVisible, onFinish, options) {
13848
13848
  const namespace = "http://www.w3.org/2000/svg";
13849
13849
  const glow = document.createElementNS(namespace, "svg");
13850
13850
  glow.classList.add("sia-table__cell-focus-glow");
13851
13851
  glow.setAttribute("aria-hidden", "true");
13852
+ if (options?.color) glow.style.color = options.color;
13853
+ const requestedSpeed = options?.speed, requestedWidth = options?.lineWidth;
13854
+ const speed = typeof requestedSpeed === "number" && Number.isFinite(requestedSpeed) && requestedSpeed > 0 ? Math.min(10, Math.max(0.1, requestedSpeed)) : 1;
13855
+ const lineWidth = typeof requestedWidth === "number" && Number.isFinite(requestedWidth) && requestedWidth > 0 ? Math.min(12, Math.max(1, requestedWidth)) : 4;
13856
+ glow.style.setProperty("--sia-cell-focus-duration", `${600 / speed}ms`);
13852
13857
  const path = document.createElementNS(namespace, "path");
13853
13858
  path.setAttribute("pathLength", "100");
13854
13859
  glow.appendChild(path);
@@ -13867,7 +13872,9 @@ function playCellFocusGlow(cell, isVisible, onFinish) {
13867
13872
  }
13868
13873
  const rect = cell.getBoundingClientRect();
13869
13874
  Object.assign(glow.style, { left: `${rect.left}px`, top: `${rect.top}px`, width: `${rect.width}px`, height: `${rect.height}px` });
13870
- path.setAttribute("d", `M 2 2 H ${rect.width - 2} V ${rect.height - 2} H 2 Z`);
13875
+ const actualWidth = Math.min(lineWidth, rect.width, rect.height), inset = actualWidth / 2;
13876
+ path.style.strokeWidth = `${actualWidth}px`;
13877
+ path.setAttribute("d", `M ${inset} ${inset} H ${rect.width - inset} V ${rect.height - inset} H ${inset} Z`);
13871
13878
  frame = requestAnimationFrame(position);
13872
13879
  };
13873
13880
  position();
@@ -17055,7 +17062,7 @@ function TableInner(props, ref) {
17055
17062
  if (options?.highlight !== false) {
17056
17063
  const cleanup2 = playCellFocusGlow(cell, visible, () => {
17057
17064
  cellGlow.current = null;
17058
- });
17065
+ }, options);
17059
17066
  cellGlow.current = cleanup2;
17060
17067
  }
17061
17068
  return true;
package/dist/index.css CHANGED
@@ -11193,26 +11193,41 @@ body > .sia-title-tooltip[data-sia-popup-layer] {
11193
11193
  overflow: visible;
11194
11194
  pointer-events: none;
11195
11195
  fill: none;
11196
- animation: sia-table-cell-focus-fade 1100ms linear forwards;
11196
+ color: #ff303b;
11197
+ animation: sia-table-cell-focus-lifetime var(--sia-cell-focus-duration, 600ms) linear forwards;
11197
11198
  }
11198
11199
  .sia-table__cell-focus-glow path {
11199
- stroke: #ff303b;
11200
+ stroke: currentColor;
11200
11201
  stroke-width: 4px;
11201
11202
  stroke-linecap: round;
11202
11203
  stroke-dashoffset: 0;
11203
- filter: drop-shadow(0 0 3px rgb(255 48 59 / 55%));
11204
- animation: sia-table-cell-focus-grow 900ms linear forwards;
11204
+ filter: drop-shadow(0 0 3px color-mix(in srgb, currentColor 55%, transparent));
11205
+ animation: sia-table-cell-focus-grow-retract var(--sia-cell-focus-duration, 600ms) linear forwards;
11205
11206
  }
11206
- @keyframes sia-table-cell-focus-grow {
11207
- from {
11207
+ @keyframes sia-table-cell-focus-grow-retract {
11208
+ 0% {
11208
11209
  stroke-dasharray: 0px 100px;
11210
+ stroke-dashoffset: 0px;
11209
11211
  }
11210
- to {
11212
+ 50% {
11211
11213
  stroke-dasharray: 100px 0px;
11214
+ stroke-dashoffset: 0px;
11215
+ }
11216
+ 100% {
11217
+ stroke-dasharray: 0px 100px;
11218
+ stroke-dashoffset: -100px;
11219
+ }
11220
+ }
11221
+ @keyframes sia-table-cell-focus-lifetime {
11222
+ from {
11223
+ opacity: 1;
11224
+ }
11225
+ to {
11226
+ opacity: 1;
11212
11227
  }
11213
11228
  }
11214
11229
  @keyframes sia-table-cell-focus-fade {
11215
- 0%, 82% {
11230
+ 0% {
11216
11231
  opacity: 1;
11217
11232
  }
11218
11233
  100% {
@@ -11221,7 +11236,7 @@ body > .sia-title-tooltip[data-sia-popup-layer] {
11221
11236
  }
11222
11237
  @media (prefers-reduced-motion: reduce) {
11223
11238
  .sia-table__cell-focus-glow {
11224
- animation-duration: 200ms;
11239
+ animation: sia-table-cell-focus-fade 200ms linear forwards;
11225
11240
  }
11226
11241
  .sia-table__cell-focus-glow path {
11227
11242
  animation: none;
package/dist/index.d.cts CHANGED
@@ -2349,6 +2349,17 @@ interface TableProps<T extends Record<string, unknown> = Record<string, unknown>
2349
2349
  /** 表格元素的内联样式。 */
2350
2350
  tableStyle?: CSSProperties;
2351
2351
  }
2352
+ /** 单元格定位时的一次性视觉反馈配置;每次调用独立生效,不改变表格数据或全局默认值。 */
2353
+ interface TableCellFocusOptions {
2354
+ /** 是否在目标可见后播放先增长一圈、再由尾部收拢消失的边框光线,默认 true;false 仅滚动、选中和聚焦。 */
2355
+ highlight?: boolean;
2356
+ /** 描边和柔光共用的 CSS 颜色,默认红色 #ff303b;例如 #fa8c16 为橙色。无效颜色回退默认值;CSS 变量需在页面根层可用。 */
2357
+ color?: string;
2358
+ /** 动效速度倍率,默认 1,即增长 300ms、收缩 300ms;2 为双倍速度、0.5 为半速。有限正数限制在 0.1~10,零、负数或非有限值回退 1;减少动态效果时忽略此倍率,统一 200ms 淡出。 */
2359
+ speed?: number;
2360
+ /** 描边线宽,单位 CSS px,默认 4;有限正数限制在 1~12,零、负数或非有限值回退 4。极窄单元格会按可容纳宽度缩小,柔光颜色跟随 color。 */
2361
+ lineWidth?: number;
2362
+ }
2352
2363
  /** 表格的实例引用接口。 */
2353
2364
  interface TableRef<T> {
2354
2365
  /** 读取插件当前处理的行数据。 */
@@ -2361,11 +2372,8 @@ interface TableRef<T> {
2361
2372
  scrollTo: (options: ScrollToOptions) => void;
2362
2373
  /** 按 rowKey 定位当前筛选、排序、分页及树展开后列表中的行,仅在该行被遮挡时立即纵向滚动,使其避开吸顶表头和合计行;支持虚拟列表,不改变横向位置或焦点。返回是否找到目标且视口可见;目标被筛掉、位于其他页、表格隐藏或未挂载时返回 false,不自动切页。应在数据提交和弹框显示后调用。 */
2363
2374
  scrollToRow: (key: TableKey) => boolean;
2364
- /** 按稳定行键和叶子列键定位单元格,横纵滚动避开吸顶表头、固定列及合计行,选中并聚焦但不进入编辑。等待虚拟行挂载、位置稳定且整格在可视区后返回成功,再由顶层浮层从左上角沿边框顺时针增长红线:尾端固定,约 900 毫秒围满一圈,随后 200 毫秒渐隐消失;不拦截操作,减少动态效果时仅红框淡出。隐藏列、其它页、无法完整显示的单元格、不可见表格或被后续定位取代时返回 false,不自动切页或显示隐藏列。应在数据更新及弹框关闭动画完成后调用;再次定位、目标滚出可视区或卸载会清理动效。 */
2365
- focusCell: (rowKey: TableKey, columnKey: string, options?: {
2366
- /** 是否在目标可见后播放尾端固定、沿边框增长一圈的红光渐隐,默认 true;false 仅滚动、选中和聚焦。 */
2367
- highlight?: boolean;
2368
- }) => Promise<boolean>;
2375
+ /** 按稳定行键和叶子列键定位单元格,横纵滚动避开吸顶表头、固定列及合计行,选中并聚焦但不进入编辑。等待虚拟行挂载、位置稳定且整格在可视区后返回成功,再由顶层浮层从左上角沿边框顺时针增长光线:尾端固定,默认速度下 300 毫秒围满一圈,再用 300 毫秒从尾部收拢至头部后消失;不拦截操作,减少动态效果时仅同色边框淡出。隐藏列、其它页、无法完整显示的单元格、不可见表格或被后续定位取代时返回 false,不自动切页或显示隐藏列。应在数据更新及弹框关闭动画完成后调用;再次定位、目标滚出可视区或卸载会清理动效。 */
2376
+ focusCell: (rowKey: TableKey, columnKey: string, options?: TableCellFocusOptions) => Promise<boolean>;
2369
2377
  /** 切换加载状态。 */
2370
2378
  setLoading: (loading: boolean) => void;
2371
2379
  /** 读取当前分页状态。 */
@@ -3534,4 +3542,4 @@ interface NumberRangeProps extends Omit<HTMLAttributes<HTMLSpanElement>, "onChan
3534
3542
  /** 日期区间风格的双数字输入框,使用波浪线分隔;可直接绑定 Form.Item。 */
3535
3543
  declare const NumberRange: react.ForwardRefExoticComponent<NumberRangeProps & react.RefAttributes<HTMLSpanElement>>;
3536
3544
 
3537
- export { Alert, type AlertProps, type AlertStatus, type AnyTablePlugin, AutoSizer, type AutoSizerProps, type AutoSizerSize, BadgeProps, ButtonProps, ButtonSize, Cascader, type CascaderFieldNames, type CascaderOption, type CascaderProps, type CascaderValue, Checkbox, type CheckboxGroupProps, type CheckboxOption, type CheckboxProps, type CheckboxValue, Col, type ColProps, type ColSize, ColorPicker, type ColorPickerMode, type ColorPickerPreset, type ColorPickerProps, ControlSize, ControlStatus, CursorPreview, type CursorPreviewFrame, type CursorPreviewProps, DEFAULT_PAGE_SIZE_OPTIONS, Divider, type DividerProps, Drawer, type DrawerOpenConfig, type DrawerPlacement, type DrawerProps, type DrawerPush, type DrawerPushConfig, Editor, type EditorCommand, type EditorCompletionContext, type EditorCompletionItem, type EditorCompletionItemKind, type EditorCompletionProvider, type EditorContextMenuItem, type EditorHandle, type EditorKeyDownEvent, type EditorLanguage, type EditorMarker, type EditorProps, type EditorRange, type EditorSelectionChange, type EditorTheme, type FlatTreeNode, type FlatTreeOptions, Flex, type FlexProps, FloatingPanel, type FloatingPanelProps, FloatingScrollbarProvider, type FloatingScrollbarProviderProps, Form, type FormErrorField, type FormFieldData, type FormInstance, type FormItemProps, type FormListField, type FormListOperation, type FormListProps, type FormProps, type FormRule, type FormValues, type GridBreakpoint, InputNumber, type InputNumberProps, InputPlaceholderMode, InputSelect, type InputSelectProps, type LayoutGap, Markdown, type MarkdownProps, ModalActionResult, ModalOpenConfig, type NamePath, NumberRange, type NumberRangeProps, type NumberRangeValue, OverlayApiHandle, Pagination, type PaginationProps, QueryForm, type QueryFormField, type QueryFormFieldSetting, type QueryFormProps, type QueryFormSearchInfo, type QueryFormSettingsConfig, type QueryFormSettingsSnapshot, type QueryFormShortcut, Radio, type RadioGroupProps, type RadioOption, type RadioProps, type RadioValue, Row, type RowProps, SIA_THEME, SelectChangeValue, type SelectModalConfig, SelectOption, SelectProps, type SelectionOption, SelectionPanel, type SelectionPanelProps, type SelectionValue, type SiaThemeMode, Slider, type SliderMark, type SliderProps, type SliderValue, type SortableKey, SortableList, type SortableListProps, Space, type SpaceCompactProps, type SpaceProps, Splitter, type SplitterPanelProps, type SplitterProps, Switch, type SwitchProps, type SwitchVariant, Table, type TableAlign, type TableCanvasCell, type TableCellAddress, type TableCellRange, type TableCellRenderInfo, type TableCellSelectionApi, type TableCellSelectionPluginOptions, type TableColumn, type TableColumnSettingApi, type TableColumnSettingItem, type TableColumnSettingPluginOptions, type TableColumnTransformPluginOptions, type TableEditableApi, type TableEditableCellConfig, type TableEditableCellType, type TableEditablePluginOptions, type TableExportApi, type TableExportPluginOptions, type TableExportScope, type TableFilterApi, type TableFilterPluginOptions, type TableFilterValues, type TableFixed, type TableHighlightPluginOptions, type TableHighlightValue, type TableIndexPluginOptions, type TableKey, type TableMergeStickyConfig, type TablePageParams, type TablePaginationApi, type TablePaginationPluginOptions, type TablePlugin, type TablePluginCellProps, type TablePluginContext, type TablePluginEvent, type TableProps, type TableRef, type TableResizeApi, type TableResizePluginOptions, type TableRow, type TableRowSpanPluginOptions, type TableSelectedCell, type TableSelectionApi, type TableSelectionMode, type TableSelectionPluginOptions, type TableSettingsAdapter, type TableSettingsSnapshot, type TableSize, type TableSortApi, type TableSortInfo, type TableSortPluginOptions, type TableSummaryPluginOptions, type TableSummaryRow, type TableToolbarItem, type TableToolbarPluginOptions, type TableTreeApi, type TableTreePluginOptions, type TableWorksheetApi, type TableWorksheetChange, type TableWorksheetHistory, type TableWorksheetOperation, type TableWorksheetPluginOptions, type TableWorksheetReason, type TableWorksheetValueContext, TagStatus, TextArea, type TextAreaProps, ThemeSwitch, type ThemeSwitchProps, TimePicker, type TimePickerProps, type TimeRangePickerProps, ToolPanel, type ToolPanelItem, type ToolPanelPlacement, type ToolPanelProps, TreeSelect, type TreeSelectNode, type TreeSelectProps, type TreeSelectValue, Treemap, type TreemapNode, type TreemapNodeClickInfo, type TreemapNodeKind, type TreemapProps, type WindowAction, type WindowActionHandler, type WindowControlAction, type WindowControlLabels, WindowControls, type WindowControlsProps, WindowFrame, type WindowFrameProps, WindowTitleBar, type WindowTitleBarActionsAlign, type WindowTitleBarProps, applySiaTheme, buildFlatTree, createCellSelectionPlugin, createColumnSettingPlugin, createColumnTransformPlugin, createEditablePlugin, createExportPlugin, createFilterPlugin, createHighlightPlugin, createIndexPlugin, createLocalStorageTableSettingsAdapter, createPaginationPlugin, createResizePlugin, createRowSpanPlugin, createSelectionPlugin, createSortPlugin, createSummaryPlugin, createToolbarPlugin, createTreePlugin, createWorksheetPlugin, openSelectModal, useForm };
3545
+ export { Alert, type AlertProps, type AlertStatus, type AnyTablePlugin, AutoSizer, type AutoSizerProps, type AutoSizerSize, BadgeProps, ButtonProps, ButtonSize, Cascader, type CascaderFieldNames, type CascaderOption, type CascaderProps, type CascaderValue, Checkbox, type CheckboxGroupProps, type CheckboxOption, type CheckboxProps, type CheckboxValue, Col, type ColProps, type ColSize, ColorPicker, type ColorPickerMode, type ColorPickerPreset, type ColorPickerProps, ControlSize, ControlStatus, CursorPreview, type CursorPreviewFrame, type CursorPreviewProps, DEFAULT_PAGE_SIZE_OPTIONS, Divider, type DividerProps, Drawer, type DrawerOpenConfig, type DrawerPlacement, type DrawerProps, type DrawerPush, type DrawerPushConfig, Editor, type EditorCommand, type EditorCompletionContext, type EditorCompletionItem, type EditorCompletionItemKind, type EditorCompletionProvider, type EditorContextMenuItem, type EditorHandle, type EditorKeyDownEvent, type EditorLanguage, type EditorMarker, type EditorProps, type EditorRange, type EditorSelectionChange, type EditorTheme, type FlatTreeNode, type FlatTreeOptions, Flex, type FlexProps, FloatingPanel, type FloatingPanelProps, FloatingScrollbarProvider, type FloatingScrollbarProviderProps, Form, type FormErrorField, type FormFieldData, type FormInstance, type FormItemProps, type FormListField, type FormListOperation, type FormListProps, type FormProps, type FormRule, type FormValues, type GridBreakpoint, InputNumber, type InputNumberProps, InputPlaceholderMode, InputSelect, type InputSelectProps, type LayoutGap, Markdown, type MarkdownProps, ModalActionResult, ModalOpenConfig, type NamePath, NumberRange, type NumberRangeProps, type NumberRangeValue, OverlayApiHandle, Pagination, type PaginationProps, QueryForm, type QueryFormField, type QueryFormFieldSetting, type QueryFormProps, type QueryFormSearchInfo, type QueryFormSettingsConfig, type QueryFormSettingsSnapshot, type QueryFormShortcut, Radio, type RadioGroupProps, type RadioOption, type RadioProps, type RadioValue, Row, type RowProps, SIA_THEME, SelectChangeValue, type SelectModalConfig, SelectOption, SelectProps, type SelectionOption, SelectionPanel, type SelectionPanelProps, type SelectionValue, type SiaThemeMode, Slider, type SliderMark, type SliderProps, type SliderValue, type SortableKey, SortableList, type SortableListProps, Space, type SpaceCompactProps, type SpaceProps, Splitter, type SplitterPanelProps, type SplitterProps, Switch, type SwitchProps, type SwitchVariant, Table, type TableAlign, type TableCanvasCell, type TableCellAddress, type TableCellFocusOptions, type TableCellRange, type TableCellRenderInfo, type TableCellSelectionApi, type TableCellSelectionPluginOptions, type TableColumn, type TableColumnSettingApi, type TableColumnSettingItem, type TableColumnSettingPluginOptions, type TableColumnTransformPluginOptions, type TableEditableApi, type TableEditableCellConfig, type TableEditableCellType, type TableEditablePluginOptions, type TableExportApi, type TableExportPluginOptions, type TableExportScope, type TableFilterApi, type TableFilterPluginOptions, type TableFilterValues, type TableFixed, type TableHighlightPluginOptions, type TableHighlightValue, type TableIndexPluginOptions, type TableKey, type TableMergeStickyConfig, type TablePageParams, type TablePaginationApi, type TablePaginationPluginOptions, type TablePlugin, type TablePluginCellProps, type TablePluginContext, type TablePluginEvent, type TableProps, type TableRef, type TableResizeApi, type TableResizePluginOptions, type TableRow, type TableRowSpanPluginOptions, type TableSelectedCell, type TableSelectionApi, type TableSelectionMode, type TableSelectionPluginOptions, type TableSettingsAdapter, type TableSettingsSnapshot, type TableSize, type TableSortApi, type TableSortInfo, type TableSortPluginOptions, type TableSummaryPluginOptions, type TableSummaryRow, type TableToolbarItem, type TableToolbarPluginOptions, type TableTreeApi, type TableTreePluginOptions, type TableWorksheetApi, type TableWorksheetChange, type TableWorksheetHistory, type TableWorksheetOperation, type TableWorksheetPluginOptions, type TableWorksheetReason, type TableWorksheetValueContext, TagStatus, TextArea, type TextAreaProps, ThemeSwitch, type ThemeSwitchProps, TimePicker, type TimePickerProps, type TimeRangePickerProps, ToolPanel, type ToolPanelItem, type ToolPanelPlacement, type ToolPanelProps, TreeSelect, type TreeSelectNode, type TreeSelectProps, type TreeSelectValue, Treemap, type TreemapNode, type TreemapNodeClickInfo, type TreemapNodeKind, type TreemapProps, type WindowAction, type WindowActionHandler, type WindowControlAction, type WindowControlLabels, WindowControls, type WindowControlsProps, WindowFrame, type WindowFrameProps, WindowTitleBar, type WindowTitleBarActionsAlign, type WindowTitleBarProps, applySiaTheme, buildFlatTree, createCellSelectionPlugin, createColumnSettingPlugin, createColumnTransformPlugin, createEditablePlugin, createExportPlugin, createFilterPlugin, createHighlightPlugin, createIndexPlugin, createLocalStorageTableSettingsAdapter, createPaginationPlugin, createResizePlugin, createRowSpanPlugin, createSelectionPlugin, createSortPlugin, createSummaryPlugin, createToolbarPlugin, createTreePlugin, createWorksheetPlugin, openSelectModal, useForm };
package/dist/index.d.ts CHANGED
@@ -2349,6 +2349,17 @@ interface TableProps<T extends Record<string, unknown> = Record<string, unknown>
2349
2349
  /** 表格元素的内联样式。 */
2350
2350
  tableStyle?: CSSProperties;
2351
2351
  }
2352
+ /** 单元格定位时的一次性视觉反馈配置;每次调用独立生效,不改变表格数据或全局默认值。 */
2353
+ interface TableCellFocusOptions {
2354
+ /** 是否在目标可见后播放先增长一圈、再由尾部收拢消失的边框光线,默认 true;false 仅滚动、选中和聚焦。 */
2355
+ highlight?: boolean;
2356
+ /** 描边和柔光共用的 CSS 颜色,默认红色 #ff303b;例如 #fa8c16 为橙色。无效颜色回退默认值;CSS 变量需在页面根层可用。 */
2357
+ color?: string;
2358
+ /** 动效速度倍率,默认 1,即增长 300ms、收缩 300ms;2 为双倍速度、0.5 为半速。有限正数限制在 0.1~10,零、负数或非有限值回退 1;减少动态效果时忽略此倍率,统一 200ms 淡出。 */
2359
+ speed?: number;
2360
+ /** 描边线宽,单位 CSS px,默认 4;有限正数限制在 1~12,零、负数或非有限值回退 4。极窄单元格会按可容纳宽度缩小,柔光颜色跟随 color。 */
2361
+ lineWidth?: number;
2362
+ }
2352
2363
  /** 表格的实例引用接口。 */
2353
2364
  interface TableRef<T> {
2354
2365
  /** 读取插件当前处理的行数据。 */
@@ -2361,11 +2372,8 @@ interface TableRef<T> {
2361
2372
  scrollTo: (options: ScrollToOptions) => void;
2362
2373
  /** 按 rowKey 定位当前筛选、排序、分页及树展开后列表中的行,仅在该行被遮挡时立即纵向滚动,使其避开吸顶表头和合计行;支持虚拟列表,不改变横向位置或焦点。返回是否找到目标且视口可见;目标被筛掉、位于其他页、表格隐藏或未挂载时返回 false,不自动切页。应在数据提交和弹框显示后调用。 */
2363
2374
  scrollToRow: (key: TableKey) => boolean;
2364
- /** 按稳定行键和叶子列键定位单元格,横纵滚动避开吸顶表头、固定列及合计行,选中并聚焦但不进入编辑。等待虚拟行挂载、位置稳定且整格在可视区后返回成功,再由顶层浮层从左上角沿边框顺时针增长红线:尾端固定,约 900 毫秒围满一圈,随后 200 毫秒渐隐消失;不拦截操作,减少动态效果时仅红框淡出。隐藏列、其它页、无法完整显示的单元格、不可见表格或被后续定位取代时返回 false,不自动切页或显示隐藏列。应在数据更新及弹框关闭动画完成后调用;再次定位、目标滚出可视区或卸载会清理动效。 */
2365
- focusCell: (rowKey: TableKey, columnKey: string, options?: {
2366
- /** 是否在目标可见后播放尾端固定、沿边框增长一圈的红光渐隐,默认 true;false 仅滚动、选中和聚焦。 */
2367
- highlight?: boolean;
2368
- }) => Promise<boolean>;
2375
+ /** 按稳定行键和叶子列键定位单元格,横纵滚动避开吸顶表头、固定列及合计行,选中并聚焦但不进入编辑。等待虚拟行挂载、位置稳定且整格在可视区后返回成功,再由顶层浮层从左上角沿边框顺时针增长光线:尾端固定,默认速度下 300 毫秒围满一圈,再用 300 毫秒从尾部收拢至头部后消失;不拦截操作,减少动态效果时仅同色边框淡出。隐藏列、其它页、无法完整显示的单元格、不可见表格或被后续定位取代时返回 false,不自动切页或显示隐藏列。应在数据更新及弹框关闭动画完成后调用;再次定位、目标滚出可视区或卸载会清理动效。 */
2376
+ focusCell: (rowKey: TableKey, columnKey: string, options?: TableCellFocusOptions) => Promise<boolean>;
2369
2377
  /** 切换加载状态。 */
2370
2378
  setLoading: (loading: boolean) => void;
2371
2379
  /** 读取当前分页状态。 */
@@ -3534,4 +3542,4 @@ interface NumberRangeProps extends Omit<HTMLAttributes<HTMLSpanElement>, "onChan
3534
3542
  /** 日期区间风格的双数字输入框,使用波浪线分隔;可直接绑定 Form.Item。 */
3535
3543
  declare const NumberRange: react.ForwardRefExoticComponent<NumberRangeProps & react.RefAttributes<HTMLSpanElement>>;
3536
3544
 
3537
- export { Alert, type AlertProps, type AlertStatus, type AnyTablePlugin, AutoSizer, type AutoSizerProps, type AutoSizerSize, BadgeProps, ButtonProps, ButtonSize, Cascader, type CascaderFieldNames, type CascaderOption, type CascaderProps, type CascaderValue, Checkbox, type CheckboxGroupProps, type CheckboxOption, type CheckboxProps, type CheckboxValue, Col, type ColProps, type ColSize, ColorPicker, type ColorPickerMode, type ColorPickerPreset, type ColorPickerProps, ControlSize, ControlStatus, CursorPreview, type CursorPreviewFrame, type CursorPreviewProps, DEFAULT_PAGE_SIZE_OPTIONS, Divider, type DividerProps, Drawer, type DrawerOpenConfig, type DrawerPlacement, type DrawerProps, type DrawerPush, type DrawerPushConfig, Editor, type EditorCommand, type EditorCompletionContext, type EditorCompletionItem, type EditorCompletionItemKind, type EditorCompletionProvider, type EditorContextMenuItem, type EditorHandle, type EditorKeyDownEvent, type EditorLanguage, type EditorMarker, type EditorProps, type EditorRange, type EditorSelectionChange, type EditorTheme, type FlatTreeNode, type FlatTreeOptions, Flex, type FlexProps, FloatingPanel, type FloatingPanelProps, FloatingScrollbarProvider, type FloatingScrollbarProviderProps, Form, type FormErrorField, type FormFieldData, type FormInstance, type FormItemProps, type FormListField, type FormListOperation, type FormListProps, type FormProps, type FormRule, type FormValues, type GridBreakpoint, InputNumber, type InputNumberProps, InputPlaceholderMode, InputSelect, type InputSelectProps, type LayoutGap, Markdown, type MarkdownProps, ModalActionResult, ModalOpenConfig, type NamePath, NumberRange, type NumberRangeProps, type NumberRangeValue, OverlayApiHandle, Pagination, type PaginationProps, QueryForm, type QueryFormField, type QueryFormFieldSetting, type QueryFormProps, type QueryFormSearchInfo, type QueryFormSettingsConfig, type QueryFormSettingsSnapshot, type QueryFormShortcut, Radio, type RadioGroupProps, type RadioOption, type RadioProps, type RadioValue, Row, type RowProps, SIA_THEME, SelectChangeValue, type SelectModalConfig, SelectOption, SelectProps, type SelectionOption, SelectionPanel, type SelectionPanelProps, type SelectionValue, type SiaThemeMode, Slider, type SliderMark, type SliderProps, type SliderValue, type SortableKey, SortableList, type SortableListProps, Space, type SpaceCompactProps, type SpaceProps, Splitter, type SplitterPanelProps, type SplitterProps, Switch, type SwitchProps, type SwitchVariant, Table, type TableAlign, type TableCanvasCell, type TableCellAddress, type TableCellRange, type TableCellRenderInfo, type TableCellSelectionApi, type TableCellSelectionPluginOptions, type TableColumn, type TableColumnSettingApi, type TableColumnSettingItem, type TableColumnSettingPluginOptions, type TableColumnTransformPluginOptions, type TableEditableApi, type TableEditableCellConfig, type TableEditableCellType, type TableEditablePluginOptions, type TableExportApi, type TableExportPluginOptions, type TableExportScope, type TableFilterApi, type TableFilterPluginOptions, type TableFilterValues, type TableFixed, type TableHighlightPluginOptions, type TableHighlightValue, type TableIndexPluginOptions, type TableKey, type TableMergeStickyConfig, type TablePageParams, type TablePaginationApi, type TablePaginationPluginOptions, type TablePlugin, type TablePluginCellProps, type TablePluginContext, type TablePluginEvent, type TableProps, type TableRef, type TableResizeApi, type TableResizePluginOptions, type TableRow, type TableRowSpanPluginOptions, type TableSelectedCell, type TableSelectionApi, type TableSelectionMode, type TableSelectionPluginOptions, type TableSettingsAdapter, type TableSettingsSnapshot, type TableSize, type TableSortApi, type TableSortInfo, type TableSortPluginOptions, type TableSummaryPluginOptions, type TableSummaryRow, type TableToolbarItem, type TableToolbarPluginOptions, type TableTreeApi, type TableTreePluginOptions, type TableWorksheetApi, type TableWorksheetChange, type TableWorksheetHistory, type TableWorksheetOperation, type TableWorksheetPluginOptions, type TableWorksheetReason, type TableWorksheetValueContext, TagStatus, TextArea, type TextAreaProps, ThemeSwitch, type ThemeSwitchProps, TimePicker, type TimePickerProps, type TimeRangePickerProps, ToolPanel, type ToolPanelItem, type ToolPanelPlacement, type ToolPanelProps, TreeSelect, type TreeSelectNode, type TreeSelectProps, type TreeSelectValue, Treemap, type TreemapNode, type TreemapNodeClickInfo, type TreemapNodeKind, type TreemapProps, type WindowAction, type WindowActionHandler, type WindowControlAction, type WindowControlLabels, WindowControls, type WindowControlsProps, WindowFrame, type WindowFrameProps, WindowTitleBar, type WindowTitleBarActionsAlign, type WindowTitleBarProps, applySiaTheme, buildFlatTree, createCellSelectionPlugin, createColumnSettingPlugin, createColumnTransformPlugin, createEditablePlugin, createExportPlugin, createFilterPlugin, createHighlightPlugin, createIndexPlugin, createLocalStorageTableSettingsAdapter, createPaginationPlugin, createResizePlugin, createRowSpanPlugin, createSelectionPlugin, createSortPlugin, createSummaryPlugin, createToolbarPlugin, createTreePlugin, createWorksheetPlugin, openSelectModal, useForm };
3545
+ export { Alert, type AlertProps, type AlertStatus, type AnyTablePlugin, AutoSizer, type AutoSizerProps, type AutoSizerSize, BadgeProps, ButtonProps, ButtonSize, Cascader, type CascaderFieldNames, type CascaderOption, type CascaderProps, type CascaderValue, Checkbox, type CheckboxGroupProps, type CheckboxOption, type CheckboxProps, type CheckboxValue, Col, type ColProps, type ColSize, ColorPicker, type ColorPickerMode, type ColorPickerPreset, type ColorPickerProps, ControlSize, ControlStatus, CursorPreview, type CursorPreviewFrame, type CursorPreviewProps, DEFAULT_PAGE_SIZE_OPTIONS, Divider, type DividerProps, Drawer, type DrawerOpenConfig, type DrawerPlacement, type DrawerProps, type DrawerPush, type DrawerPushConfig, Editor, type EditorCommand, type EditorCompletionContext, type EditorCompletionItem, type EditorCompletionItemKind, type EditorCompletionProvider, type EditorContextMenuItem, type EditorHandle, type EditorKeyDownEvent, type EditorLanguage, type EditorMarker, type EditorProps, type EditorRange, type EditorSelectionChange, type EditorTheme, type FlatTreeNode, type FlatTreeOptions, Flex, type FlexProps, FloatingPanel, type FloatingPanelProps, FloatingScrollbarProvider, type FloatingScrollbarProviderProps, Form, type FormErrorField, type FormFieldData, type FormInstance, type FormItemProps, type FormListField, type FormListOperation, type FormListProps, type FormProps, type FormRule, type FormValues, type GridBreakpoint, InputNumber, type InputNumberProps, InputPlaceholderMode, InputSelect, type InputSelectProps, type LayoutGap, Markdown, type MarkdownProps, ModalActionResult, ModalOpenConfig, type NamePath, NumberRange, type NumberRangeProps, type NumberRangeValue, OverlayApiHandle, Pagination, type PaginationProps, QueryForm, type QueryFormField, type QueryFormFieldSetting, type QueryFormProps, type QueryFormSearchInfo, type QueryFormSettingsConfig, type QueryFormSettingsSnapshot, type QueryFormShortcut, Radio, type RadioGroupProps, type RadioOption, type RadioProps, type RadioValue, Row, type RowProps, SIA_THEME, SelectChangeValue, type SelectModalConfig, SelectOption, SelectProps, type SelectionOption, SelectionPanel, type SelectionPanelProps, type SelectionValue, type SiaThemeMode, Slider, type SliderMark, type SliderProps, type SliderValue, type SortableKey, SortableList, type SortableListProps, Space, type SpaceCompactProps, type SpaceProps, Splitter, type SplitterPanelProps, type SplitterProps, Switch, type SwitchProps, type SwitchVariant, Table, type TableAlign, type TableCanvasCell, type TableCellAddress, type TableCellFocusOptions, type TableCellRange, type TableCellRenderInfo, type TableCellSelectionApi, type TableCellSelectionPluginOptions, type TableColumn, type TableColumnSettingApi, type TableColumnSettingItem, type TableColumnSettingPluginOptions, type TableColumnTransformPluginOptions, type TableEditableApi, type TableEditableCellConfig, type TableEditableCellType, type TableEditablePluginOptions, type TableExportApi, type TableExportPluginOptions, type TableExportScope, type TableFilterApi, type TableFilterPluginOptions, type TableFilterValues, type TableFixed, type TableHighlightPluginOptions, type TableHighlightValue, type TableIndexPluginOptions, type TableKey, type TableMergeStickyConfig, type TablePageParams, type TablePaginationApi, type TablePaginationPluginOptions, type TablePlugin, type TablePluginCellProps, type TablePluginContext, type TablePluginEvent, type TableProps, type TableRef, type TableResizeApi, type TableResizePluginOptions, type TableRow, type TableRowSpanPluginOptions, type TableSelectedCell, type TableSelectionApi, type TableSelectionMode, type TableSelectionPluginOptions, type TableSettingsAdapter, type TableSettingsSnapshot, type TableSize, type TableSortApi, type TableSortInfo, type TableSortPluginOptions, type TableSummaryPluginOptions, type TableSummaryRow, type TableToolbarItem, type TableToolbarPluginOptions, type TableTreeApi, type TableTreePluginOptions, type TableWorksheetApi, type TableWorksheetChange, type TableWorksheetHistory, type TableWorksheetOperation, type TableWorksheetPluginOptions, type TableWorksheetReason, type TableWorksheetValueContext, TagStatus, TextArea, type TextAreaProps, ThemeSwitch, type ThemeSwitchProps, TimePicker, type TimePickerProps, type TimeRangePickerProps, ToolPanel, type ToolPanelItem, type ToolPanelPlacement, type ToolPanelProps, TreeSelect, type TreeSelectNode, type TreeSelectProps, type TreeSelectValue, Treemap, type TreemapNode, type TreemapNodeClickInfo, type TreemapNodeKind, type TreemapProps, type WindowAction, type WindowActionHandler, type WindowControlAction, type WindowControlLabels, WindowControls, type WindowControlsProps, WindowFrame, type WindowFrameProps, WindowTitleBar, type WindowTitleBarActionsAlign, type WindowTitleBarProps, applySiaTheme, buildFlatTree, createCellSelectionPlugin, createColumnSettingPlugin, createColumnTransformPlugin, createEditablePlugin, createExportPlugin, createFilterPlugin, createHighlightPlugin, createIndexPlugin, createLocalStorageTableSettingsAdapter, createPaginationPlugin, createResizePlugin, createRowSpanPlugin, createSelectionPlugin, createSortPlugin, createSummaryPlugin, createToolbarPlugin, createTreePlugin, createWorksheetPlugin, openSelectModal, useForm };
package/dist/index.js CHANGED
@@ -5699,11 +5699,16 @@ function createRowIdentity() {
5699
5699
  }
5700
5700
 
5701
5701
  // src/components/Table/cellFocus.ts
5702
- function playCellFocusGlow(cell, isVisible, onFinish) {
5702
+ function playCellFocusGlow(cell, isVisible, onFinish, options) {
5703
5703
  const namespace = "http://www.w3.org/2000/svg";
5704
5704
  const glow = document.createElementNS(namespace, "svg");
5705
5705
  glow.classList.add("sia-table__cell-focus-glow");
5706
5706
  glow.setAttribute("aria-hidden", "true");
5707
+ if (options?.color) glow.style.color = options.color;
5708
+ const requestedSpeed = options?.speed, requestedWidth = options?.lineWidth;
5709
+ const speed = typeof requestedSpeed === "number" && Number.isFinite(requestedSpeed) && requestedSpeed > 0 ? Math.min(10, Math.max(0.1, requestedSpeed)) : 1;
5710
+ const lineWidth = typeof requestedWidth === "number" && Number.isFinite(requestedWidth) && requestedWidth > 0 ? Math.min(12, Math.max(1, requestedWidth)) : 4;
5711
+ glow.style.setProperty("--sia-cell-focus-duration", `${600 / speed}ms`);
5707
5712
  const path = document.createElementNS(namespace, "path");
5708
5713
  path.setAttribute("pathLength", "100");
5709
5714
  glow.appendChild(path);
@@ -5722,7 +5727,9 @@ function playCellFocusGlow(cell, isVisible, onFinish) {
5722
5727
  }
5723
5728
  const rect = cell.getBoundingClientRect();
5724
5729
  Object.assign(glow.style, { left: `${rect.left}px`, top: `${rect.top}px`, width: `${rect.width}px`, height: `${rect.height}px` });
5725
- path.setAttribute("d", `M 2 2 H ${rect.width - 2} V ${rect.height - 2} H 2 Z`);
5730
+ const actualWidth = Math.min(lineWidth, rect.width, rect.height), inset = actualWidth / 2;
5731
+ path.style.strokeWidth = `${actualWidth}px`;
5732
+ path.setAttribute("d", `M ${inset} ${inset} H ${rect.width - inset} V ${rect.height - inset} H ${inset} Z`);
5726
5733
  frame = requestAnimationFrame(position);
5727
5734
  };
5728
5735
  position();
@@ -8910,7 +8917,7 @@ function TableInner(props, ref) {
8910
8917
  if (options?.highlight !== false) {
8911
8918
  const cleanup = playCellFocusGlow(cell, visible, () => {
8912
8919
  cellGlow.current = null;
8913
- });
8920
+ }, options);
8914
8921
  cellGlow.current = cleanup;
8915
8922
  }
8916
8923
  return true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sia.soul/sia-react-ui",
3
- "version": "0.1.136",
3
+ "version": "0.1.138",
4
4
  "description": "Sia Design components and tokens for React",
5
5
  "publishConfig": {
6
6
  "access": "public",