Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
61b53f8
fix(chat): standardize public types and docs
RSS1102 Aug 4, 2026
12d01bf
fix(chat): align content component contracts
RSS1102 Aug 5, 2026
92e8098
docs(chat): avoid typo false positive in snapshot link
RSS1102 Aug 6, 2026
12c3e83
docs(chat): keep contract comparison in pull request
RSS1102 Aug 6, 2026
3b6d539
refactor(chat): consolidate shared type sources
RSS1102 Aug 11, 2026
48a310a
build(chat): publish declarations without source maps
RSS1102 Aug 11, 2026
b4743d5
Merge branch 'next' into rss1102/standardize-chat-types-docs
RSS1102 Aug 18, 2026
c2e7680
fix(types): preserve public declarations and deduplicate sources
RSS1102 Aug 18, 2026
8034fac
fix(build): separate declaration emission from esm output
RSS1102 Aug 18, 2026
05c066c
fix(chat): remove ambiguous content extension type
RSS1102 Aug 19, 2026
650820c
fix(types): close public API boundary leaks
RSS1102 Aug 19, 2026
925a15a
fix(checkbox): keep implementation prop names
RSS1102 Aug 19, 2026
bcf203d
fix(types): upgrade declaration build pipeline
RSS1102 Aug 20, 2026
6ed3c43
refactor(types): make component exports explicit
RSS1102 Aug 20, 2026
ec7817e
fix(build): preserve runtime entry exports
RSS1102 Aug 20, 2026
ace4c5b
Merge remote-tracking branch 'origin/rss1102/standardize-chat-types-d…
RSS1102 Aug 20, 2026
5ed1be9
build(types): omit declaration maps from packages
RSS1102 Aug 20, 2026
ff53222
fix(types): preserve existing component exports
RSS1102 Aug 20, 2026
b5d9e78
refactor(types): expose canonical component props
RSS1102 Aug 20, 2026
d698140
refactor(types): remove redundant suppressions
RSS1102 Aug 20, 2026
46aedf9
refactor(types): normalize type re-exports
RSS1102 Aug 20, 2026
251aa06
fix(dropdown): tighten recursive option types
RSS1102 Aug 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"init": "git submodule update --init packages/common",
"dev:ui": "pnpm --filter @tdesign/web-components-site dev",
"dev:chat": "pnpm --filter @tdesign/web-components-chat-site dev",
"check:types": "tsc -p packages/vite-config/tsconfig.check.json && node --import tsx/esm ./packages/vite-config/src/cli/prepare.mjs && pnpm --filter @tdesign/web-components-shared build && tsc -p packages/components/tsconfig.check.json && pnpm --filter @tdesign/components build && tsc -p packages/pro-components/chat/tsconfig.check.json",
"check:types": "tsc -p packages/vite-config/tsconfig.check.json && node --import tsx/esm ./packages/vite-config/src/cli/prepare.mjs && pnpm --filter @tdesign/web-components-shared build && tsc -p packages/components/tsconfig.check.json && pnpm --filter @tdesign/components build && tsc -p packages/pro-components/chat/tsconfig.check.json && pnpm run check:chat-contracts",
"check:chat-contracts": "node scripts/check-chat-contracts.mjs",
"check:pack": "pnpm run build:chat && node scripts/check-pack.mjs",
"build": "pnpm run build:chat",
"build:ui": "pnpm --filter @tdesign/web-components build",
Expand Down Expand Up @@ -69,7 +70,7 @@
"vitest": "catalog:tooling"
},
"engines": {
"node": ">=22.13.0"
"node": ">=22.18.0"
},
"pnpm": {
"overrides": {
Expand Down
4 changes: 2 additions & 2 deletions packages/components/affix/affix.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { ScrollContainerElement, StyledProps } from '@tdesign/web-components-sha
import { isFunction } from 'lodash-es';
import { Component, createRef, tag } from 'omi';

import { AffixRef, TdAffixProps } from './type';
import { TdAffixProps } from './type';

export interface AffixProps extends TdAffixProps, StyledProps, AffixRef {}
export interface AffixProps extends TdAffixProps, StyledProps {}

@tag('t-affix')
export default class Affix extends Component<AffixProps> {
Expand Down
3 changes: 1 addition & 2 deletions packages/components/affix/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import './style/index.js';
import _Affix from './affix';

export type { AffixProps } from './affix';
export type { AffixRef } from './type';
export const Affix = _Affix;
export default Affix;

export * from './type';
4 changes: 2 additions & 2 deletions packages/components/avatar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import _Avatar from './avatar';
import _AvatarGroup from './avatar-group';

export type { AvatarProps } from './avatar';
export type { AvatarGroupProps } from './avatar-group';
export type { CascadingValue, ShapeEnum } from './type';
export const Avatar = _Avatar;
export const AvatarGroup = _AvatarGroup;

export default Avatar;

export * from './type';
5 changes: 2 additions & 3 deletions packages/components/avatar/type.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
/* eslint-disable */

/**
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
* */

import { TElement, TNode } from '@tdesign/web-components-shared/common';

import { ImageProps } from '../image';
import { PopupProps } from '../popup';
import { TNode, TElement } from '@tdesign/web-components-shared/common';

export interface TdAvatarProps {
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/components/breadcrumb/breadcrumb-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { bind, Component, OmiDOMAttributes, tag } from 'omi';

import { TdBreadcrumbItemProps } from './type';

interface BreadcrumbItemProps extends TdBreadcrumbItemProps, OmiDOMAttributes {}
export interface BreadcrumbItemProps extends TdBreadcrumbItemProps, OmiDOMAttributes {}

interface LocalTBreadcrumb {
separator: TNode | string;
Expand Down
2 changes: 1 addition & 1 deletion packages/components/breadcrumb/breadcrumb.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Component, tag } from 'omi';

import { TdBreadcrumbProps } from './type';

interface BreadcrumbProps extends TdBreadcrumbProps, StyledProps {}
export interface BreadcrumbProps extends TdBreadcrumbProps, StyledProps {}

@tag('t-breadcrumb')
export default class Breadcrumb extends Component<BreadcrumbProps> {
Expand Down
4 changes: 2 additions & 2 deletions packages/components/breadcrumb/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import './style/index.js';
import _Breadcrumb from './breadcrumb';
import _BreadcrumbItem from './breadcrumb-item';

export type { TdBreadcrumbItemProps, TdBreadcrumbProps } from './type';
export * from './type';
export type { BreadcrumbProps } from './breadcrumb';
export type { BreadcrumbItemProps } from './breadcrumb-item';
export const Breadcrumb = _Breadcrumb;
export const BreadcrumbItem = _BreadcrumbItem;
export default Breadcrumb;
3 changes: 0 additions & 3 deletions packages/components/button/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import './style/index.js';

import _Button from './button';

export type { ButtonProps } from './button';
export const Button = _Button;
export default Button;

export * from './type';
3 changes: 0 additions & 3 deletions packages/components/card/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import './style/index.js';

import _Card from './card.jsx';

export type { CardProps } from './card.jsx';
export const Card = _Card;
export default Card;

export * from './type';
4 changes: 2 additions & 2 deletions packages/components/card/type.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable */
import { LoadingProps } from '../loading';
import { TNode } from '@tdesign/web-components-shared/common';

import { LoadingProps } from '../loading';

export interface TdCardProps {
/**
* 卡片操作区
Expand Down
3 changes: 1 addition & 2 deletions packages/components/checkbox/checkbox-group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ import {
} from './type';

export interface CheckboxGroupProps<T extends CheckboxGroupValue = CheckboxGroupValue>
extends TdCheckboxGroupProps<T>,
StyledProps {
extends TdCheckboxGroupProps<T>, StyledProps {
children?: TNode;
}

Expand Down
9 changes: 3 additions & 6 deletions packages/components/checkbox/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@ import './style/index';

import _Checkbox from './checkbox';
import _Group from './checkbox-group';
import type { TdCheckboxGroupProps, TdCheckboxProps } from './type';

export type CheckboxProps = TdCheckboxProps;
export type CheckboxGroupProps = TdCheckboxGroupProps;
export type { CheckboxProps } from './checkbox';
export type { CheckboxGroupProps } from './checkbox-group';
export type { CheckboxGroupChangeContext, CheckboxGroupValue, CheckboxOption, CheckboxOptionObj } from './type';

export const Checkbox = _Checkbox;
export const CheckboxGroup = _Group;

export * from './type';

export default Checkbox;
3 changes: 1 addition & 2 deletions packages/components/collapse/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import _Collapse from './collapse';

export type { CollapseProps } from './collapse';
export { default as CollapsePanel, type CollapsePanelProps } from './collapse-panel';
export * from './type';

export type { CollapsePanelValue, CollapseValue } from './type';
export const Collapse = _Collapse;
export default Collapse;
3 changes: 1 addition & 2 deletions packages/components/date-picker/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ import _DateRangePicker from './DateRangePicker';

export type { DatePickerProps } from './DatePicker';
export type { DateRangePickerProps } from './DateRangePicker';
export type { DateRangeValue, DateValue, DisableDate, DisableDateObject, PresetDate, PresetRange } from './type';

export const DatePicker = _DatePicker;
export const DateRangePicker = _DateRangePicker;

export default DatePicker;

export * from './type';
21 changes: 1 addition & 20 deletions packages/components/date-picker/panel/RangePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { Component, createRef, OmiProps, tag } from 'omi';
import { PaginationMini } from '../../pagination/PaginationMini';
import { TdPaginationMiniProps } from '../../pagination/type';
import { DateValue, DisableDate, PresetRange, TdDateRangePickerProps } from '../type';
import type { DatePickerTableCell } from './internal-type';

dayjs.locale('zh-cn');
dayjs.extend(isoWeek);
Expand All @@ -42,26 +43,6 @@ interface WeekInfo {
week: number;
}

export interface DatePickerTableCell {
text: string | number;
value: Date;
time?: string;
active?: boolean;
highlight?: boolean;
hoverHighlight?: boolean;
disabled?: boolean;
additional?: boolean;
now?: boolean;
firstDayOfMonth?: boolean;
lastDayOfMonth?: boolean;
weekOfYear?: boolean;
startOfRange?: boolean;
endOfRange?: boolean;
hoverStartOfRange?: boolean;
hoverEndOfRange?: boolean;
dayjsObj?: any;
}

export interface RangePanelProps extends Pick<
TdDateRangePickerProps,
'mode' | 'firstDayOfWeek' | 'disableDate' | 'presets' | 'presetsPlacement' | 'panelPreselection'
Expand Down
21 changes: 1 addition & 20 deletions packages/components/date-picker/panel/SinglePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { Component, createRef, OmiProps, tag } from 'omi';
import { PaginationMini } from '../../pagination/PaginationMini';
import { TdPaginationMiniProps } from '../../pagination/type';
import { DateValue, DisableDate, PresetDate, TdDatePickerProps } from '../type';
import type { DatePickerTableCell } from './internal-type';

dayjs.locale('zh-cn');
dayjs.extend(isoWeek);
Expand All @@ -37,26 +38,6 @@ interface YearOption {

type ScrollAnchor = 'default' | 'top' | 'bottom';

export interface DatePickerTableCell {
text: string | number;
value: Date;
time?: string;
active?: boolean;
highlight?: boolean;
hoverHighlight?: boolean;
disabled?: boolean;
additional?: boolean;
now?: boolean;
firstDayOfMonth?: boolean;
lastDayOfMonth?: boolean;
weekOfYear?: boolean;
startOfRange?: boolean;
endOfRange?: boolean;
hoverStartOfRange?: boolean;
hoverEndOfRange?: boolean;
dayjsObj?: any;
}

export interface SinglePanelProps extends Pick<
TdDatePickerProps,
'mode' | 'firstDayOfWeek' | 'disableDate' | 'minDate' | 'maxDate'
Expand Down
20 changes: 20 additions & 0 deletions packages/components/date-picker/panel/internal-type.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/** DatePicker 单面板与范围面板共享的内部单元格结构。 */
export interface DatePickerTableCell {
text: string | number;
value: Date;
time?: string;
active?: boolean;
highlight?: boolean;
hoverHighlight?: boolean;
disabled?: boolean;
additional?: boolean;
now?: boolean;
firstDayOfMonth?: boolean;
lastDayOfMonth?: boolean;
weekOfYear?: boolean;
startOfRange?: boolean;
endOfRange?: boolean;
hoverStartOfRange?: boolean;
hoverEndOfRange?: boolean;
dayjsObj?: any;
}
3 changes: 2 additions & 1 deletion packages/components/date-picker/type.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { DateValue as CommonDateValue } from '@common/js/date-picker/utils';
import { TNode } from '@tdesign/web-components-shared/common';

export type DateValue = string | number | Date;
export type DateValue = CommonDateValue;

export type DateRangeValue = Array<DateValue>;

Expand Down
23 changes: 21 additions & 2 deletions packages/components/dialog/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,29 @@ import './style/index.js';

import _Dialog from './dialog';
import { DialogPlugin as _DialogPlugin } from './plugin';
import type {
DialogAlertMethod,
DialogCloseContext,
DialogConfirmMethod,
DialogEventSource,
DialogInstance,
DialogMethod,
DialogOptions,
TdDialogCardProps,
} from './type';

export type { DialogProps } from './dialog';
export * from './type';
export type {
DialogAlertMethod,
DialogCloseContext,
DialogConfirmMethod,
DialogEventSource,
DialogInstance,
DialogMethod,
DialogOptions,
TdDialogCardProps,
};

export type { DialogProps } from './dialog';
export const Dialog = _Dialog;
export const dialog = _DialogPlugin;
export const DialogPlugin = _DialogPlugin;
Expand Down
32 changes: 15 additions & 17 deletions packages/components/dialog/type.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
/* eslint-disable */

/**
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
* */

import { AttachNode, Styles, TNode } from '@tdesign/web-components-shared/common';

import { ButtonProps } from '../button';
import { TNode, Styles, AttachNode } from '@tdesign/web-components-shared/common';

export interface TdDialogProps {
/**
Expand Down Expand Up @@ -153,20 +152,19 @@ export interface TdDialogProps {
children?: TNode;
}

export interface TdDialogCardProps
extends Pick<
TdDialogProps,
| 'body'
| 'cancelBtn'
| 'closeBtn'
| 'confirmBtn'
| 'footer'
| 'header'
| 'theme'
| 'onCancel'
| 'onCloseBtnClick'
| 'onConfirm'
> {}
export type TdDialogCardProps = Pick<
TdDialogProps,
| 'body'
| 'cancelBtn'
| 'closeBtn'
| 'confirmBtn'
| 'footer'
| 'header'
| 'theme'
| 'onCancel'
| 'onCloseBtnClick'
| 'onConfirm'
>;

export interface DialogOptions extends Omit<TdDialogProps, 'attach'> {
/**
Expand Down
3 changes: 0 additions & 3 deletions packages/components/divider/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import './style/index.js';

import _Divider from './divider';

export type { DividerProps } from './divider';
export * from './type';

export const Divider = _Divider;
export default Divider;
4 changes: 2 additions & 2 deletions packages/components/dropdown/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ hideAfterItemClick | Boolean | true | 点击选项后是否自动隐藏弹窗 |
maxColumnWidth | String / Number | 100 | 选项最大宽度,内容超出时,显示为省略号。值为字符串时,值就是最大宽度;值为数字时,单位:px | N
maxHeight | Number | 300 | 弹窗最大高度,单位:px 。统一控制每一列的高度 | N
minColumnWidth | String / Number | 10 | 选项最小宽度。值为字符串时,值就是最小宽度;值为数字时,单位:px | N
options | Array | [] | 下拉操作项。TS 类型:`Array<DropdownOption>` `type DropdownOption = { children?: Array<TdDropdownItemProps> } & TdDropdownItemProps & Record<string, any>`。[详细类型定义](https://github.com/TDesignOteam/tdesign-web-components/tree/main/src/dropdown/type.ts) | N
options | Array | [] | 下拉操作项。TS 类型:`Array<DropdownOption>` `type DropdownOption = TdDropdownItemProps & { children?: DropdownOption[] } & Record<string, unknown>`。[详细类型定义](https://github.com/TDesignOteam/tdesign-web-components/tree/main/src/dropdown/type.ts) | N
panelBottomContent | TNode | - | 面板内的底部内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/TDesignOteam/tdesign-web-components/tree/main/src/common.ts) | N
panelTopContent | TNode | - | 面板内的顶部内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/TDesignOteam/tdesign-web-components/tree/main/src/common.ts) | N
placement | String | bottom-left | 弹窗定位方式,可选值同 Popup 组件。可选项:top/left/right/bottom/top-left/top-right/bottom-left/bottom-right/left-top/left-bottom/right-top/right-bottom | N
Expand All @@ -105,5 +105,5 @@ disabled | Boolean | false | 是否禁用操作项 | N
divider | Boolean | false | 是否显示操作项之间的分隔线(分隔线默认在下方) | N
prefixIcon | TElement | - | 组件前置图标。TS 类型:`TNode`。[通用类型定义](https://github.com/TDesignOteam/tdesign-web-components/tree/main/src/common.ts) | N
theme | String | default | 下拉菜单选项主题。可选项:default/success/warning/error。TS 类型:`DropdownItemTheme` `type DropdownItemTheme = 'default' \| 'success' \| 'warning' \| 'error'`。[详细类型定义](https://github.com/TDesignOteam/tdesign-web-components/tree/main/src/dropdown-menu/type.ts) | N
value | String / Number / Object | - | 下拉操作项唯一标识。TS 类型:`string \| number \| { [key: string]: any }` | N
value | String / Number / Object | - | 下拉操作项唯一标识。TS 类型:`string \| number \| Record<string, unknown>` | N
onClick | Function | | TS 类型:`(dropdownItem: DropdownOption, context: { e: MouseEvent }) => void`<br/>点击时触发 | N
2 changes: 1 addition & 1 deletion packages/components/dropdown/dropdownMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export default class DropdownMenu extends Component<DropdownMenuProps> {
onClick={
optionItem.disabled || optionItem.children
? () => null
: (value: string | number | { [key: string]: any }, context: { e: MouseEvent }) =>
: (value: DropdownOption['value'], context: { e: MouseEvent }) =>
this.handleItemClick({ data: optionItem, context })
}
>
Expand Down
3 changes: 1 addition & 2 deletions packages/components/dropdown/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import './style/index.js';
import _Dropdown from './dropdown';

export type { DropdownProps } from './dropdown';
export * from './type';

export type { DropdownItemTheme, DropdownOption, TdDropdownItemProps } from './type';
export const Dropdown = _Dropdown;

export default Dropdown;
Loading
Loading