@zhama/tego-ui 0.0.0-stage → 1.36.1

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 (57) hide show
  1. package/LICENSE +172 -0
  2. package/assets/styles/tokens.css +1 -0
  3. package/dist/animations-FAPO43TO.css +1 -0
  4. package/dist/chunk-4MXE2PSC.js +1 -0
  5. package/dist/chunk-6HRT65AA.cjs +1 -0
  6. package/dist/chunk-6Z2BWV6F.js +1 -0
  7. package/dist/chunk-CRTE56HI.js +1 -0
  8. package/dist/chunk-ERURJLNK.cjs +1 -0
  9. package/dist/chunk-GZXKQ2K6.cjs +1 -0
  10. package/dist/chunk-H7AHFBEU.js +1 -0
  11. package/dist/chunk-M2GCF4FZ.cjs +1 -0
  12. package/dist/chunk-MTA2XHQG.cjs +1 -0
  13. package/dist/chunk-MVPRTW7Z.js +1 -0
  14. package/dist/chunk-NA5M3B4G.js +1 -0
  15. package/dist/chunk-ON32SVTM.cjs +1 -0
  16. package/dist/chunk-OS64HXLJ.js +1 -0
  17. package/dist/chunk-QPXIAUJD.js +1 -0
  18. package/dist/chunk-RWEJPTVG.cjs +1 -0
  19. package/dist/chunk-SHFR7LZH.js +1 -0
  20. package/dist/chunk-SLTTRXOU.cjs +1 -0
  21. package/dist/chunk-ULCTAAJ2.js +1 -0
  22. package/dist/chunk-UQZZ6WIZ.cjs +1 -0
  23. package/dist/chunk-YWPIPAUQ.cjs +1 -0
  24. package/dist/command-palette.cjs +1 -0
  25. package/dist/command-palette.d.cts +44 -0
  26. package/dist/command-palette.d.ts +44 -0
  27. package/dist/command-palette.js +1 -0
  28. package/dist/config-form/index.cjs +1 -0
  29. package/dist/config-form/index.d.cts +99 -0
  30. package/dist/config-form/index.d.ts +99 -0
  31. package/dist/config-form/index.js +1 -0
  32. package/dist/design-system/index.cjs +1 -0
  33. package/dist/design-system/index.d.cts +629 -0
  34. package/dist/design-system/index.d.ts +629 -0
  35. package/dist/design-system/index.js +1 -0
  36. package/dist/editors.cjs +1 -0
  37. package/dist/editors.d.cts +68 -0
  38. package/dist/editors.d.ts +68 -0
  39. package/dist/editors.js +1 -0
  40. package/dist/highlight-IORKDKTB.css +1 -0
  41. package/dist/index.cjs +2 -0
  42. package/dist/index.d.cts +3157 -0
  43. package/dist/index.d.ts +3157 -0
  44. package/dist/index.js +2 -0
  45. package/dist/styles-447PVICJ.css +1 -0
  46. package/dist/styles-FZ7XXKJP.css +1 -0
  47. package/dist/summary-charts.cjs +1 -0
  48. package/dist/summary-charts.d.cts +45 -0
  49. package/dist/summary-charts.d.ts +45 -0
  50. package/dist/summary-charts.js +1 -0
  51. package/dist/tag-input.cjs +1 -0
  52. package/dist/tag-input.d.cts +15 -0
  53. package/dist/tag-input.d.ts +15 -0
  54. package/dist/tag-input.js +1 -0
  55. package/package.json +122 -4
  56. package/tailwind-preset.cjs +1 -0
  57. package/README.md +0 -3
@@ -0,0 +1,3157 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as class_variance_authority from 'class-variance-authority';
3
+ import { VariantProps } from 'class-variance-authority';
4
+ import * as React$1 from 'react';
5
+ import React__default, { ReactNode, CSSProperties, PointerEvent, KeyboardEvent, ComponentType, HTMLAttributes, MouseEvent } from 'react';
6
+ import useEmblaCarousel, { UseEmblaCarouselType } from 'embla-carousel-react';
7
+ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
8
+ import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
9
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
10
+ import * as LabelPrimitive from '@radix-ui/react-label';
11
+ import * as AvatarPrimitive from '@radix-ui/react-avatar';
12
+ import * as SelectPrimitive from '@radix-ui/react-select';
13
+ import * as SwitchPrimitive from '@radix-ui/react-switch';
14
+ import * as SliderPrimitive from '@radix-ui/react-slider';
15
+ import * as TabsPrimitive from '@radix-ui/react-tabs';
16
+ import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
17
+ export { TagInput, TagInputProps } from './tag-input.cjs';
18
+ import * as react_day_picker from 'react-day-picker';
19
+ import { DayPicker } from 'react-day-picker';
20
+ import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
21
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
22
+ import * as SeparatorPrimitive from '@radix-ui/react-separator';
23
+ import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
24
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
25
+ import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
26
+ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
27
+ import * as ProgressPrimitive from '@radix-ui/react-progress';
28
+ import * as _radix_ui_react_toast from '@radix-ui/react-toast';
29
+ import { Components } from 'react-markdown';
30
+ import { Pluggable } from 'unified';
31
+ import { ClassValue } from 'clsx';
32
+ export { animations, breakpoints, buildBadgeClass, buildButtonClass, buildCardClass, buildFocusableClass, buildGridClass, buildInputClass, buildSkeletonClass, buildTableClass, chatBubbles, colors, combineTokens, designTokens, focusRing, getAnimation, getContainerClass, getIconSize, getSpacing, getStateStyle, getStatusBadgeVariant, getStatusColor, getTruncateClass, getTypography, iconSizes, interactions, layout, presets, radius, shadows, spacing, states, surfaces, transitions, truncate, typography } from './design-system/index.cjs';
33
+ export { SummaryBarChart, SummaryBarSeries, SummaryLineChart, SummaryPieChart } from './summary-charts.cjs';
34
+
35
+ declare const Alert: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
36
+ variant?: "default" | "destructive" | "warning" | "info" | "success" | null | undefined;
37
+ } & class_variance_authority_types.ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLDivElement>>;
38
+ declare const AlertTitle: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLHeadingElement> & React$1.RefAttributes<HTMLParagraphElement>>;
39
+ declare const AlertDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
40
+
41
+ declare const badgeVariants: (props?: ({
42
+ variant?: "default" | "destructive" | "warning" | "success" | "secondary" | "outline" | null | undefined;
43
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
44
+ interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
45
+ }
46
+ declare function Badge({ className, variant, ...props }: BadgeProps): React$1.JSX.Element;
47
+
48
+ declare const buttonVariants: (props?: ({
49
+ variant?: "default" | "destructive" | "warning" | "success" | "link" | "secondary" | "outline" | "ghost" | "gradient" | null | undefined;
50
+ size?: "default" | "sm" | "lg" | "icon" | "xs" | null | undefined;
51
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
52
+ interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
53
+ asChild?: boolean;
54
+ }
55
+ declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
56
+
57
+ /**
58
+ * 表面层级。
59
+ *
60
+ * `default` 是既有的「白底 + 1px 描边 + 轻阴影」,全站十几个包吃这一档,
61
+ * 不动它。另两档是消费侧用的:
62
+ *
63
+ * - `raised` 去掉描边,靠柔和双层阴影起层级。描边加阴影是管理后台的做法 ——
64
+ * 一屏二十个等宽白卡各描一条灰边,网格线感极强,读起来像表格而不是内容。
65
+ * - `sunken` 比页面底色暗一档,用来装工具条与分组,替代到处的 border-b。
66
+ *
67
+ * 用 CSS 变量的 arbitrary value 而不是 `shadow-card` 这类命名工具类:命名档位
68
+ * 只在 apps/ai-studio 的 tailwind.config.js 里映射了,而这个组件同时被
69
+ * dashboard 与 office 消费 —— 那两边编译不出命名类,卡片会完全没有阴影。
70
+ * arbitrary value 在任何配置下都能编译,未定义变量的应用则优雅退化成无阴影。
71
+ */
72
+ declare const CARD_SURFACE: {
73
+ readonly default: "border border-border/70 bg-card shadow-subtle";
74
+ readonly raised: "bg-[hsl(var(--surface-raised))] shadow-[var(--shadow-card)] rounded-[var(--radius-card)]";
75
+ readonly sunken: "bg-[hsl(var(--surface-sunken))] rounded-[var(--radius-card)]";
76
+ };
77
+ declare const Card: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & {
78
+ interactive?: boolean;
79
+ surface?: keyof typeof CARD_SURFACE;
80
+ } & React$1.RefAttributes<HTMLDivElement>>;
81
+ declare const CardHeader: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
82
+ declare const CardTitle: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLHeadingElement> & React$1.RefAttributes<HTMLParagraphElement>>;
83
+ declare const CardDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
84
+ declare const CardContent: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
85
+ declare const CardFooter: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
86
+
87
+ type CarouselApi = UseEmblaCarouselType[1];
88
+ type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
89
+ type CarouselOptions = UseCarouselParameters[0];
90
+ type CarouselPlugin = UseCarouselParameters[1];
91
+ interface CarouselProps {
92
+ opts?: CarouselOptions;
93
+ plugins?: CarouselPlugin;
94
+ orientation?: 'horizontal' | 'vertical';
95
+ setApi?: (api: CarouselApi) => void;
96
+ }
97
+ interface CarouselContextProps extends CarouselProps {
98
+ carouselRef: ReturnType<typeof useEmblaCarousel>[0];
99
+ api: CarouselApi;
100
+ scrollPrev: () => void;
101
+ scrollNext: () => void;
102
+ canScrollPrev: boolean;
103
+ canScrollNext: boolean;
104
+ }
105
+ declare function useCarousel(): CarouselContextProps;
106
+ declare const Carousel: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & CarouselProps & React$1.RefAttributes<HTMLDivElement>>;
107
+ declare const CarouselContent: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
108
+ declare const CarouselItem: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
109
+ declare const CarouselPrevious: React$1.ForwardRefExoticComponent<React$1.ButtonHTMLAttributes<HTMLButtonElement> & React$1.RefAttributes<HTMLButtonElement>>;
110
+ declare const CarouselNext: React$1.ForwardRefExoticComponent<React$1.ButtonHTMLAttributes<HTMLButtonElement> & React$1.RefAttributes<HTMLButtonElement>>;
111
+
112
+ declare const Checkbox: React$1.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
113
+
114
+ /**
115
+ * One choice out of a list whose options are sentences rather than words — an
116
+ * exam question, a disposition — where `Segmented` would squeeze them into a
117
+ * pill track. Built on native radios: they already share a name, move with the
118
+ * arrow keys and read as a radio group, which is everything this needs.
119
+ */
120
+ declare function RadioGroup({ value, onValueChange, disabled, className, children, ...props }: Omit<React$1.HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> & {
121
+ value: string | undefined;
122
+ onValueChange: (value: string) => void;
123
+ disabled?: boolean;
124
+ }): React$1.JSX.Element;
125
+ /** An option with its label; the whole row is the hit target. */
126
+ declare function RadioGroupItem({ value, disabled, className, children, }: {
127
+ value: string;
128
+ disabled?: boolean;
129
+ className?: string;
130
+ children: React$1.ReactNode;
131
+ }): React$1.JSX.Element;
132
+
133
+ interface TreeNode {
134
+ id: string | number;
135
+ label: React__default.ReactNode;
136
+ value?: any;
137
+ children?: TreeNode[];
138
+ icon?: React__default.ReactNode;
139
+ disabled?: boolean;
140
+ defaultExpanded?: boolean;
141
+ checkable?: boolean;
142
+ checkboxId?: string;
143
+ }
144
+ interface TreeProps {
145
+ data: TreeNode[];
146
+ className?: string;
147
+ onSelect?: (node: TreeNode) => void;
148
+ onExpand?: (node: TreeNode, expanded: boolean) => void;
149
+ selectedValue?: any;
150
+ renderNode?: (node: TreeNode, isSelected: boolean, isExpanded: boolean, checkState?: CheckState) => React__default.ReactNode;
151
+ showConnectors?: boolean;
152
+ collapsible?: boolean;
153
+ defaultExpandAll?: boolean;
154
+ /**
155
+ * Clicking a row that has children expands it, not just the chevron.
156
+ *
157
+ * Off by default: in a permission tree a parent row is a thing you select, and
158
+ * hijacking that click would change what those trees mean. A file browser is
159
+ * the opposite — a folder row is the folder, and asking the user to hit a 12px
160
+ * chevron to open it is the kind of target only the author ever hits.
161
+ */
162
+ expandOnSelect?: boolean;
163
+ checkable?: boolean;
164
+ defaultCheckedKeys?: (string | number)[];
165
+ checkedKeys?: (string | number)[];
166
+ onCheckedChange?: (checkedKeys: (string | number)[]) => void;
167
+ checkStrictly?: boolean;
168
+ showSelectAll?: boolean;
169
+ i18n?: {
170
+ selectAll?: string;
171
+ deselectAll?: string;
172
+ permissionSelection?: string;
173
+ expand?: string;
174
+ collapse?: string;
175
+ };
176
+ ref?: React__default.Ref<TreeRef>;
177
+ }
178
+ interface TreeRef {
179
+ getCheckedKeys: () => (string | number)[];
180
+ setCheckedKeys: (keys: (string | number)[]) => void;
181
+ selectAll: () => void;
182
+ deselectAll: () => void;
183
+ }
184
+ interface CheckInfo {
185
+ checked: boolean;
186
+ checkedNodes: TreeNode[];
187
+ node: TreeNode;
188
+ halfCheckedKeys: (string | number)[];
189
+ }
190
+ interface CheckState {
191
+ checked: boolean;
192
+ indeterminate: boolean;
193
+ }
194
+ declare const Tree: React__default.ForwardRefExoticComponent<Omit<TreeProps, "ref"> & React__default.RefAttributes<TreeRef>>;
195
+
196
+ interface CascadingTreeSelectProps {
197
+ nodes: TreeNode[];
198
+ value: Array<string | number>;
199
+ onValueChange: (value: Array<string | number>) => void;
200
+ searchable?: boolean;
201
+ disabledKeys?: Array<string | number>;
202
+ placeholder?: string;
203
+ emptyText?: string;
204
+ inheritedText?: string;
205
+ selectedText?: (count: number, coveredCount: number) => string;
206
+ className?: string;
207
+ renderNode?: (node: TreeNode) => ReactNode;
208
+ }
209
+ declare function CascadingTreeSelect({ nodes, value, onValueChange, searchable, disabledKeys, placeholder, emptyText, inheritedText, selectedText, className, renderNode, }: CascadingTreeSelectProps): React$1.JSX.Element;
210
+
211
+ interface CascadingSelectionNode {
212
+ id: string | number;
213
+ children?: CascadingSelectionNode[];
214
+ }
215
+ interface CascadingSelectionState {
216
+ checked: boolean;
217
+ explicit: boolean;
218
+ inherited: boolean;
219
+ indeterminate: boolean;
220
+ }
221
+ declare function normalizeCascadingSelection(nodes: CascadingSelectionNode[], value: Array<string | number>): Array<string | number>;
222
+ declare function getCascadingSelectionState(nodes: CascadingSelectionNode[], value: Array<string | number>, id: string | number): CascadingSelectionState;
223
+ declare function toggleCascadingSelection(nodes: CascadingSelectionNode[], value: Array<string | number>, id: string | number): Array<string | number>;
224
+
225
+ declare function getCapabilityTagTone(label: string): string;
226
+ interface CapabilityTagProps extends Omit<React$1.HTMLAttributes<HTMLSpanElement>, 'children'> {
227
+ label: string;
228
+ size?: 'sm' | 'md';
229
+ tone?: 'auto' | 'neutral';
230
+ }
231
+ declare function CapabilityTag({ label, size, tone, className, ...props }: CapabilityTagProps): React$1.JSX.Element;
232
+
233
+ declare const Collapsible: React$1.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleProps & React$1.RefAttributes<HTMLDivElement>>;
234
+ declare const CollapsibleTrigger: React$1.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
235
+ declare const CollapsibleContent: React$1.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleContentProps & React$1.RefAttributes<HTMLDivElement>>;
236
+
237
+ /**
238
+ * 一个可搜索的单选选择器。
239
+ *
240
+ * `Select` 的选项是一份写死的短列表,`UserPicker` 的选项是人(头像、用户名、
241
+ * 邮箱都写在组件里)。落在两者之间的字段——「上级公司」「汇报对象」这类指向另一
242
+ * 条记录的引用——此前没有能用的组件,于是消费方各自拿 `Select` 加一个搜索
243
+ * `Input` 拼出来:一个字段两个控件,搜索框还长得像下一个字段。
244
+ *
245
+ * 所以搜索归到浮层里面,跟选项在一起。
246
+ */
247
+ interface ComboboxOption {
248
+ value: string;
249
+ label: string;
250
+ /** 第二行,用来区分同名选项:所属公司、邮箱。 */
251
+ description?: string;
252
+ /** 层级选项的深度;调用方按树的顺序提供选项。 */
253
+ depth?: number;
254
+ }
255
+ interface ComboboxProps {
256
+ options: ComboboxOption[];
257
+ /** 当前值。`null` 表示未设置。 */
258
+ value: string | null;
259
+ /** 清空时给 `null`,而不是空串——空串在多数后端是「有值且为空」。 */
260
+ onChange: (value: string | null) => void;
261
+ /**
262
+ * 交给调用方去查(通常是一次请求)。
263
+ *
264
+ * 给了它就由调用方决定 `options` 里有什么,组件不再本地过滤——否则一份服务端
265
+ * 刚按关键词返回的列表会被再过滤一遍,用户搜到的东西反而不见了。
266
+ */
267
+ onSearch?: (query: string) => void;
268
+ /** 请求进行中。只在给了 `onSearch` 时有意义。 */
269
+ searching?: boolean;
270
+ /**
271
+ * 值已设置但不在 `options` 里时显示的文字。
272
+ *
273
+ * 搜索只返回前若干条,当前值常常不在其中;没有这个兜底,一条设了汇报对象的
274
+ * 记录会显示成「未设置」。
275
+ */
276
+ selectedLabel?: string | null | undefined;
277
+ placeholder?: string;
278
+ searchPlaceholder?: string;
279
+ emptyText?: string;
280
+ clearLabel?: string;
281
+ /** 是否提供「清空」。必填字段不给。 */
282
+ allowClear?: boolean;
283
+ disabled?: boolean;
284
+ /** 挂载即展开:就地编辑时点一下值就该看到选项,而不是再点一次触发器。 */
285
+ defaultOpen?: boolean;
286
+ onOpenChange?: (open: boolean) => void;
287
+ /** 触发器的无障碍名称。字段标签不是 `<label for>` 时需要它。 */
288
+ 'aria-label'?: string;
289
+ 'aria-labelledby'?: string;
290
+ className?: string;
291
+ align?: 'start' | 'center' | 'end';
292
+ }
293
+ declare function Combobox({ options, value, onChange, onSearch, searching, selectedLabel, placeholder, searchPlaceholder, emptyText, clearLabel, allowClear, disabled, defaultOpen, onOpenChange, className, align, ...aria }: ComboboxProps): React$1.JSX.Element;
294
+
295
+ declare const DropdownMenu: React$1.FC<DropdownMenuPrimitive.DropdownMenuProps>;
296
+ declare const DropdownMenuTrigger: React$1.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
297
+ declare const DropdownMenuGroup: React$1.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React$1.RefAttributes<HTMLDivElement>>;
298
+ declare const DropdownMenuPortal: React$1.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
299
+ declare const DropdownMenuSub: React$1.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
300
+ declare const DropdownMenuRadioGroup: React$1.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React$1.RefAttributes<HTMLDivElement>>;
301
+ declare const DropdownMenuSubTrigger: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
302
+ inset?: boolean;
303
+ } & React$1.RefAttributes<HTMLDivElement>>;
304
+ declare const DropdownMenuSubContent: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
305
+ declare const DropdownMenuContent: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
306
+ declare const DropdownMenuItem: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
307
+ inset?: boolean;
308
+ } & React$1.RefAttributes<HTMLDivElement>>;
309
+ declare const DropdownMenuCheckboxItem: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
310
+ declare const DropdownMenuRadioItem: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
311
+ declare const DropdownMenuLabel: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
312
+ inset?: boolean;
313
+ } & React$1.RefAttributes<HTMLDivElement>>;
314
+ declare const DropdownMenuSeparator: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
315
+ declare const DropdownMenuShortcut: {
316
+ ({ className, ...props }: React$1.HTMLAttributes<HTMLSpanElement>): React$1.JSX.Element;
317
+ displayName: string;
318
+ };
319
+
320
+ interface FilterChip<T extends string> {
321
+ value: T;
322
+ label: React$1.ReactNode;
323
+ count?: number;
324
+ }
325
+ interface FilterChipRailProps<T extends string> {
326
+ chips: FilterChip<T>[];
327
+ value: T;
328
+ onValueChange: (value: T) => void;
329
+ className?: string;
330
+ 'aria-label'?: string;
331
+ }
332
+ /**
333
+ * A single-select filter rail that scrolls horizontally when the chips
334
+ * outgrow the row.
335
+ *
336
+ * The edge gradients are driven by measured scroll position rather than left
337
+ * on permanently: a fade that never goes away reads as a visual flourish, and
338
+ * then it stops telling anyone there is more to the right.
339
+ *
340
+ * The fade is not enough on its own, which is why the edges also carry a real
341
+ * button. On the skills page the rail is 998px wide over 1584px of chips: a
342
+ * plain mouse has no horizontal wheel, the rail's own scrollbar is hidden, and
343
+ * the arrow keys only work once focus is already inside the rail — so a third
344
+ * of the categories were reachable by trackpad only.
345
+ */
346
+ declare function FilterChipRail<T extends string>({ chips, value, onValueChange, className, 'aria-label': ariaLabel, }: FilterChipRailProps<T>): React$1.JSX.Element;
347
+
348
+ interface HeroSearchProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange' | 'size' | 'type'> {
349
+ value: string;
350
+ onValueChange: (value: string) => void;
351
+ /** 右侧插槽:视图切换、筛选入口。 */
352
+ trailing?: React$1.ReactNode;
353
+ /** 输入框下方的一行提示或热门词。 */
354
+ hint?: React$1.ReactNode;
355
+ clearLabel?: string;
356
+ }
357
+ /**
358
+ * 页面级搜索。
359
+ *
360
+ * 与 `Input` + 一个搜索图标的区别不只是尺寸:这是「页面的主要动作就是搜」的
361
+ * 那类页面(员工、招募)唯一的主焦点,所以它自己是一个容器。白色工作画布上用
362
+ * 细描边与轻阴影交代输入边界,只在 focus 时出现克制的主色光晕;不再常驻一整块
363
+ * sunken 灰底。做成受控组件而不是包一层 form:消费侧这几个页面都是输入即筛选,
364
+ * 没有提交动作。
365
+ *
366
+ * 之所以要有这个原语:原来的招募页在标题下方放了一个 h-9 的普通输入框,和
367
+ * 旁边的筛选下拉、排序下拉三个同尺寸控件并排,用户看不出哪个是主路径。
368
+ */
369
+ declare const HeroSearch: React$1.ForwardRefExoticComponent<HeroSearchProps & React$1.RefAttributes<HTMLInputElement>>;
370
+
371
+ declare const SIZES: {
372
+ readonly sm: {
373
+ readonly box: "h-9 w-9";
374
+ readonly text: "text-xs";
375
+ readonly ring: 2;
376
+ };
377
+ readonly md: {
378
+ readonly box: "h-12 w-12";
379
+ readonly text: "text-sm";
380
+ readonly ring: 2;
381
+ };
382
+ readonly lg: {
383
+ readonly box: "h-16 w-16";
384
+ readonly text: "text-lg";
385
+ readonly ring: 3;
386
+ };
387
+ readonly xl: {
388
+ readonly box: "h-20 w-20";
389
+ readonly text: "text-2xl";
390
+ readonly ring: 3;
391
+ };
392
+ };
393
+ interface IdentityAvatarProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, 'children'> {
394
+ /** 稳定标识,决定身份色。传员工 id;没有 id 时退化到 name。 */
395
+ seed: string;
396
+ /** 用于生成首字回退,也是无障碍名称。 */
397
+ name: string;
398
+ src?: string | null;
399
+ size?: keyof typeof SIZES;
400
+ /** 关掉身份色环 —— 已经贴在同色身份色带上时会重复。 */
401
+ ring?: boolean;
402
+ }
403
+ /**
404
+ * 带身份色的员工头像。
405
+ *
406
+ * 与 `BaseAvatarImage` 的区别:那个的回退是一张所有人共用的灰色默认头像,而
407
+ * 消费侧多数员工并没有自定义头像,结果是一列一模一样的灰头像。这里的回退是
408
+ * 身份色底 + 首字,没头像的员工彼此照样能分开。
409
+ */
410
+ declare const IdentityAvatar: React$1.ForwardRefExoticComponent<IdentityAvatarProps & React$1.RefAttributes<HTMLDivElement>>;
411
+
412
+ /**
413
+ * 员工身份色 — 由 id 决定性哈希出的色相。
414
+ *
415
+ * 为什么需要它:消费侧此前只有中性灰加一个品牌 indigo,而 indigo 只出现在
416
+ * active 态。八位员工并排时除了头像图片以外没有任何区分手段,用户记不住
417
+ * 「财务那位在第几张卡」。身份色把同一位员工在员工卡色带、头像环、岗位标签、
418
+ * 技能页上下文条上统一成一个颜色,成为跨页面的锚点。
419
+ *
420
+ * 为什么是预设色相而不是把哈希直接铺满 0-359:随机色相必然撞出两类问题——
421
+ * 相邻两位员工拿到 12° 之内的色相彼此难分;以及落在 60°-70°(黄)这类
422
+ * 明度天然偏高的区间,同一套饱和度/明度公式在那里对比度不达标。八个预设值
423
+ * 是手挑的,绕满色环且两两间隔不小于 36°(由 identity-color.test.ts 的
424
+ * IC-007 守住),都能在 globals.css 的 `.identity-surface` 公式下于浅深色
425
+ * 两个主题满足 WCAG AA。
426
+ *
427
+ * 饱和度与明度不参与哈希 —— 它们按用途固定在 CSS 里(见 globals.css 的
428
+ * `--identity-band` / `--identity-soft` / `--identity-text`),所以对比度是
429
+ * 可预测的,而不是每位员工一次抽奖。
430
+ */
431
+ declare const IDENTITY_HUES: readonly [226, 262, 298, 336, 14, 50, 150, 190];
432
+ /** 把任意稳定标识(员工 id 优先,退化到名称)映射到一个预设色相。 */
433
+ declare function identityHue(seed: string): number;
434
+ /**
435
+ * 配合 `.identity-surface` 使用的 inline style。
436
+ *
437
+ * 走 CSS 自定义属性而不是直接算出 `hsl(...)` 字符串:后者要在 TS 里复制一遍
438
+ * 浅色与暗色两套饱和度/明度公式,并且拿不到主题切换 —— 组件挂载时是浅色,
439
+ * 用户切到暗色后 inline 的颜色纹丝不动。
440
+ */
441
+ declare function identityStyle(seed: string): CSSProperties;
442
+
443
+ /**
444
+ * Reading the color tokens from code: parse the `H S% L%` triplets that
445
+ * tokens.css stores, convert them, and measure contrast.
446
+ *
447
+ * For the places a CSS class cannot reach — canvas charts, terminals, native
448
+ * window backgrounds — and for the contrast test that guards tokens.css.
449
+ */
450
+ type Rgb = readonly [number, number, number];
451
+ /** `"234 56% 53%"` (optionally with `/ alpha`) → `[234, 56, 53]`; null if malformed. */
452
+ declare function parseHslTriplet(value: string): [number, number, number] | null;
453
+ declare function hslToRgb(h: number, s: number, l: number): Rgb;
454
+ declare function hslTripletToRgb(value: string): Rgb | null;
455
+ /** WCAG 2.x relative luminance. */
456
+ declare function relativeLuminance([r, g, b]: Rgb): number;
457
+ /** WCAG 2.x contrast ratio, 1–21. */
458
+ declare function contrastRatio(a: Rgb, b: Rgb): number;
459
+ /**
460
+ * The current value of a color token as a CSS color, e.g. `tokenColor('primary')`
461
+ * → `hsl(234 56% 53%)`. Reads from <html>, so it follows theme and visual;
462
+ * call it again after either changes.
463
+ */
464
+ declare function tokenColor(name: string, alpha?: number): string;
465
+
466
+ /** Reads a token's raw `H S% L%` value, e.g. `name => style.getPropertyValue(`--${name}`)`. */
467
+ type TokenReader = (name: string) => string;
468
+ declare const CHART_SERIES_TOKENS: readonly ["chart-1", "chart-2", "chart-3", "chart-4", "chart-5", "chart-6", "chart-7", "chart-8"];
469
+ /**
470
+ * An ECharts theme object built from the color tokens. ECharts draws on a
471
+ * canvas, so it cannot follow CSS variables; colors are resolved to `rgba()`
472
+ * here (its parser does not read the space-separated `hsl()` syntax).
473
+ */
474
+ declare function buildChartTheme(read: TokenReader, fontFamily?: string): Record<string, unknown>;
475
+ /** The chart theme for the current light/dark theme, re-read when it changes. */
476
+ declare function useChartTheme(): Record<string, unknown>;
477
+
478
+ type InputProps = React$1.InputHTMLAttributes<HTMLInputElement>;
479
+ declare const Input: React$1.ForwardRefExoticComponent<InputProps & React$1.RefAttributes<HTMLInputElement>>;
480
+
481
+ declare const Label: React$1.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React$1.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: class_variance_authority_types.ClassProp | undefined) => string> & React$1.RefAttributes<HTMLLabelElement>>;
482
+
483
+ declare const loadingVariants: (props?: ({
484
+ size?: "default" | "sm" | "lg" | "xl" | null | undefined;
485
+ variant?: "spinner" | "dots" | "pulse" | "bars" | null | undefined;
486
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
487
+ interface LoadingProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof loadingVariants> {
488
+ text?: string;
489
+ showText?: boolean;
490
+ }
491
+ declare const Loading: React$1.ForwardRefExoticComponent<LoadingProps & React$1.RefAttributes<HTMLDivElement>>;
492
+
493
+ declare const LOGO_SIZES: {
494
+ readonly SMALL: 64;
495
+ readonly MEDIUM: 128;
496
+ readonly LARGE: 256;
497
+ };
498
+ interface LogoProps {
499
+ variant?: 'primary' | 'secondary' | 'light' | 'dark' | 'default';
500
+ size?: keyof typeof LOGO_SIZES | number;
501
+ className?: string;
502
+ priority?: boolean;
503
+ }
504
+ /**
505
+ * Logo组件,支持不同变体和尺寸
506
+ */
507
+ declare function Logo({ variant, size, className, priority, }: LogoProps): React__default.JSX.Element;
508
+
509
+ interface OptimizedImageProps extends Omit<React__default.ImgHTMLAttributes<HTMLImageElement>, 'src' | 'alt' | 'className'> {
510
+ src: string;
511
+ alt: string;
512
+ fallbackSrc?: string;
513
+ className?: string;
514
+ showLoader?: boolean;
515
+ showError?: boolean;
516
+ }
517
+ /**
518
+ * 优化的图片组件,支持加载状态、错误处理和回退图片
519
+ */
520
+ declare function OptimizedImage({ src, alt, fallbackSrc, className, showLoader, showError, ...props }: OptimizedImageProps): React__default.JSX.Element;
521
+
522
+ interface PageHeaderProps extends Omit<React$1.HTMLAttributes<HTMLElement>, 'title' | 'children'> {
523
+ title: React$1.ReactNode;
524
+ description?: React$1.ReactNode;
525
+ /** The module navigation already identifies this page. */
526
+ titleVisuallyHidden?: boolean;
527
+ /** Right-aligned slot: primary action, overflow menu, view toggles. */
528
+ actions?: React$1.ReactNode;
529
+ /**
530
+ * Overrides the actions row layout. Needed when the slot holds more than
531
+ * buttons — e.g. `min-w-0 flex-1 flex-wrap` lets a search field share the row
532
+ * and wrap instead of pushing the title off screen.
533
+ */
534
+ actionsClassName?: string;
535
+ /** Left of the title — an icon or back button. */
536
+ leading?: React$1.ReactNode;
537
+ /** Full-width row under the title block: filters, search, tab rails. */
538
+ toolbar?: React$1.ReactNode;
539
+ /** Heading level. Pages get one h1; panels inside a page get h2. */
540
+ as?: 'h1' | 'h2';
541
+ /**
542
+ * Type scale for the title.
543
+ *
544
+ * `default` (18px) stays for admin screens and in-page panels. `display`
545
+ * (32px, tightened tracking) is for consumer landing surfaces, where the old
546
+ * size left barely a step and a half between the page title and body text —
547
+ * the page read as one flat sheet with no entry point.
548
+ */
549
+ size?: 'default' | 'display';
550
+ }
551
+ declare function PageHeader({ title, description, titleVisuallyHidden, actions, actionsClassName, leading, toolbar, as: Heading, size, className, ...props }: PageHeaderProps): React$1.JSX.Element;
552
+
553
+ /**
554
+ * 消费端页面的外壳,也是这批页面唯一的版式来源。
555
+ *
556
+ * 六个消费端页面(员工 / 招募 / 技能 / 知识 / 资料 / 任务)此前各自实现了一遍
557
+ * 页面版式,于是长出了三种背景(`bg-background` / `bg-muted/25` / `bg-card`)、
558
+ * 三种内容宽度(`max-w-7xl` / `max-w-screen-xl` / 不限宽)、两种页头内边距和两档
559
+ * 标题字号。侧栏里挨在一起的六个入口,来回切时背景在变、标题在跳、滚动条从窗口
560
+ * 边缘换到内容区——用户读到的不是「六个页面各有特点」,而是「这个应用是拼出来的」。
561
+ *
562
+ * 所以版式不再是各页面的自由:
563
+ *
564
+ * - **背景**:一律 `bg-background`,即应用壳里那块内容面板的底色;卡片用 `bg-card`
565
+ * 加细环投影浮在上面。不直接写 `bg-white`,暗色模式仍由主题变量接管。
566
+ * - **宽度**:一律 `max-w-7xl`,左右 `px-4 md:px-8`。
567
+ * - **页头**:钉住不滚,`pt-6 md:pt-8` / `pb-4`,与内容之间画一条 `divided` 分隔线。
568
+ * - **标题**:`PageHeader size='display'`。同一层级的页面用同一档字号,密度差异靠
569
+ * 内容解决,不靠把标题改小。
570
+ * - **滚动**:只有内容区滚。
571
+ *
572
+ * 新增消费端页面时套这个壳,不要再写第七种。
573
+ */
574
+ interface PageShellProps extends React$1.HTMLAttributes<HTMLDivElement> {
575
+ /**
576
+ * 钉住的部分:`PageHeader`、搜索框、筛选带。
577
+ *
578
+ * 它不参与滚动,所以放进来的东西要能在窄屏下自己收起 —— 一条不换行的筛选带会
579
+ * 永久占掉首屏高度。
580
+ */
581
+ header?: React$1.ReactNode;
582
+ /** 页头与内容之间画分隔线。内容滚到页头下方时需要它交代边界。 */
583
+ divided?: boolean;
584
+ /**
585
+ * 内容区的排布方式。
586
+ *
587
+ * `scroll`(默认)适合卡片网格与列表:内容区自己纵向滚。
588
+ * `fill` 给看板这类「自己管高度」的内容:外壳只负责宽度与内边距,滚动交给内容
589
+ * 自己实现(看板要的是每列独立纵滚 + 整体横滚,套一层外层纵滚会得到两条滚动条)。
590
+ */
591
+ contentLayout?: 'scroll' | 'fill';
592
+ /**
593
+ * 钉在底部的部分:分页条。
594
+ *
595
+ * 分页控件必须留在视口里 —— 跟着内容滚的分页条要求用户先滚到列表底部才能翻页,
596
+ * 而翻页的目的正是不想滚。
597
+ */
598
+ footer?: React$1.ReactNode;
599
+ /** 滚动容器上的类名,用于改内边距或背景。 */
600
+ contentClassName?: string;
601
+ /**
602
+ * 去掉 1280px 上限,内容铺满可用宽度。
603
+ *
604
+ * 给以表格与矩阵为主的页面:一张十列的表在 1920 视口下被压进 1280,两侧留白比
605
+ * 表格本身还宽,而横向滚动条就出现在这条上限上。默认仍是限宽 —— 卡片网格与阅读
606
+ * 型页面在超宽屏上铺满只会让行长到读不动。
607
+ */
608
+ fullWidth?: boolean;
609
+ }
610
+ declare function PageShell({ header, divided, contentLayout, footer, contentClassName, fullWidth, className, children, ...props }: PageShellProps): React$1.JSX.Element;
611
+
612
+ /**
613
+ * 与滚动区右边缘对齐用的补偿内边距。
614
+ *
615
+ * ai-studio 的滚动条是 6px 的**占位**滚动条(不是浮层),宽度从内容里扣。所以在
616
+ * `PageShell` 的 `contentLayout='fill'` 下,页面自己实现滚动时,那些不滚的兄弟元素
617
+ * (工具栏、看板容器)会比下面的滚动内容宽 6px,右边缘错开——1440 视口下量出来是
618
+ * 1408 对 1402。
619
+ *
620
+ * 用法:给「和滚动区并列、但自己不滚」的元素加上它。已经在 `PageShell` 的容器里,
621
+ * 所以只补滚动条那 6px,不重复补容器的 `px`。
622
+ *
623
+ * `--shell-scrollbar` 由宿主定义(ai-studio 定为 6px),缺省 0px —— 用系统浮层滚动
624
+ * 条的宿主不需要补偿。
625
+ */
626
+ declare const SCROLLBAR_GUTTER = "pr-[var(--shell-scrollbar,0px)]";
627
+
628
+ interface SegmentedOption<T extends string> {
629
+ value: T;
630
+ label: React$1.ReactNode;
631
+ /** Rendered as a muted pill after the label — item counts, mostly. */
632
+ count?: number;
633
+ disabled?: boolean;
634
+ /**
635
+ * Why this option cannot be picked, shown on hover. A greyed-out option that
636
+ * says nothing reads as a bug; requires a `TooltipProvider` above.
637
+ */
638
+ disabledReason?: string;
639
+ }
640
+ interface SegmentedProps<T extends string> {
641
+ options: SegmentedOption<T>[];
642
+ value: T;
643
+ onValueChange: (value: T) => void;
644
+ size?: 'sm' | 'md';
645
+ /** Use a filled primary selected state when the choice needs more emphasis. */
646
+ variant?: 'default' | 'accent' | 'underline';
647
+ /** Stretch each option to fill the track evenly. */
648
+ fullWidth?: boolean;
649
+ className?: string;
650
+ 'aria-label'?: string;
651
+ }
652
+ /**
653
+ * A segmented control: pick one of a few options that re-filter a single list.
654
+ *
655
+ * Deliberately not built on `Tabs`. Tabs promise a panel per trigger and get
656
+ * `role="tab"` + `aria-controls` for it; a filter has one list and no panels,
657
+ * so radio semantics are what a screen reader should hear. Arrow keys move
658
+ * between options with a roving tabindex, which is also what `radiogroup`
659
+ * callers expect — Tab enters the group once and leaves it once.
660
+ */
661
+ declare function Segmented<T extends string>({ options, value, onValueChange, size, variant, fullWidth, className, 'aria-label': ariaLabel, }: SegmentedProps<T>): React$1.JSX.Element;
662
+
663
+ declare const Avatar: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
664
+ declare const AvatarImage$1: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React$1.RefAttributes<HTMLImageElement>, "ref"> & React$1.RefAttributes<HTMLImageElement>>;
665
+ declare const AvatarFallback: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
666
+
667
+ declare const AVATAR_SIZES: {
668
+ readonly SMALL: 32;
669
+ readonly MEDIUM: 48;
670
+ readonly LARGE: 96;
671
+ readonly XLARGE: 128;
672
+ };
673
+ interface AvatarImageProps {
674
+ src?: string | null;
675
+ alt: string;
676
+ size?: keyof typeof AVATAR_SIZES | number;
677
+ className?: string;
678
+ fallback?: React__default.ReactNode;
679
+ }
680
+ /**
681
+ * 头像图片组件,自动处理尺寸和回退
682
+ */
683
+ declare function AvatarImage({ src, alt, size, className, fallback, }: AvatarImageProps): React__default.JSX.Element;
684
+
685
+ declare const Select: React$1.FC<SelectPrimitive.SelectProps>;
686
+ declare const SelectGroup: React$1.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React$1.RefAttributes<HTMLDivElement>>;
687
+ declare const SelectValue: React$1.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React$1.RefAttributes<HTMLSpanElement>>;
688
+ declare const SelectTrigger: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
689
+ declare const SelectContent: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
690
+ declare const SelectLabel: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
691
+ declare const SelectItem: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
692
+
693
+ declare const Switch: React$1.ForwardRefExoticComponent<Omit<SwitchPrimitive.SwitchProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
694
+
695
+ declare const Slider: React$1.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
696
+
697
+ declare const statusBadgeVariants: (props?: ({
698
+ variant?: "default" | "destructive" | "warning" | "info" | "success" | "outline" | null | undefined;
699
+ size?: "default" | "sm" | "lg" | null | undefined;
700
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
701
+ interface StatusBadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof statusBadgeVariants> {
702
+ icon?: React$1.ReactNode;
703
+ pulse?: boolean;
704
+ }
705
+ declare const StatusBadge: React$1.ForwardRefExoticComponent<StatusBadgeProps & React$1.RefAttributes<HTMLDivElement>>;
706
+
707
+ type StatusTone = 'active' | 'live' | 'idle' | 'pending' | 'paused' | 'error';
708
+ declare const SIZE_CLASS$1: {
709
+ readonly sm: "h-1.5 w-1.5";
710
+ readonly md: "h-2 w-2";
711
+ };
712
+ interface StatusDotProps extends Omit<React$1.HTMLAttributes<HTMLSpanElement>, 'children'> {
713
+ tone: StatusTone;
714
+ size?: keyof typeof SIZE_CLASS$1;
715
+ /**
716
+ * 呼吸光圈。只给 active / live 用,且只在员工卡这类「此刻确实在工作」的位置用 ——
717
+ * 一屏里超过两三个持续动画会把注意力全部吃掉,什么都不再显眼。
718
+ */
719
+ pulse?: boolean;
720
+ /**
721
+ * 状态的文字说明。给了就渲染在点右侧;没给则点本身带 aria-label,读屏不会
722
+ * 读到一个无名的装饰元素。
723
+ */
724
+ label?: string;
725
+ }
726
+ declare const StatusDot: React$1.ForwardRefExoticComponent<StatusDotProps & React$1.RefAttributes<HTMLSpanElement>>;
727
+
728
+ interface TaskEntryTileProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
729
+ /** 用户想完成的事,用第一人称任务写,不要写功能名。 */
730
+ label: string;
731
+ /** 一行补充:这条路径会给到什么。可省。 */
732
+ caption?: string;
733
+ icon?: React$1.ReactNode;
734
+ /** 右下角的量词,例如「6 位候选」。 */
735
+ meta?: string;
736
+ }
737
+ /**
738
+ * 任务型入口。
739
+ *
740
+ * 招募页与空态用它替代「分类筛选下拉」:用户来的时候想的是「我要有人帮我盯
741
+ * 竞品」,而不是「我要在 marketing 分类里筛」。分类是数据的组织方式,任务是
742
+ * 用户的语言,入口应该用后者。
743
+ *
744
+ * 是 button 而不是 Card + onClick:它整体可点,需要原生的键盘可达性与
745
+ * disabled 语义,而 div 上加 onClick 还得自己补 role/tabIndex/Enter 处理。
746
+ */
747
+ declare const TaskEntryTile: React$1.ForwardRefExoticComponent<TaskEntryTileProps & React$1.RefAttributes<HTMLButtonElement>>;
748
+
749
+ interface FormStep {
750
+ id: string;
751
+ title: string;
752
+ description?: string;
753
+ icon?: React$1.ReactNode;
754
+ isCompleted?: boolean;
755
+ isDisabled?: boolean;
756
+ }
757
+ interface FormWizardProps {
758
+ steps: FormStep[];
759
+ currentStep: number;
760
+ onStepChange: (step: number) => void;
761
+ children: React$1.ReactNode;
762
+ className?: string;
763
+ showStepIndicator?: boolean;
764
+ allowStepNavigation?: boolean;
765
+ }
766
+ interface FormWizardStepProps {
767
+ children: React$1.ReactNode;
768
+ className?: string;
769
+ }
770
+ interface FormWizardNavigationProps {
771
+ onPrevious?: () => void;
772
+ onNext?: () => void;
773
+ onSubmit?: () => void;
774
+ isFirstStep?: boolean;
775
+ isLastStep?: boolean;
776
+ isPreviousDisabled?: boolean;
777
+ isNextDisabled?: boolean;
778
+ isSubmitDisabled?: boolean;
779
+ previousLabel?: string;
780
+ nextLabel?: string;
781
+ submitLabel?: string;
782
+ className?: string;
783
+ }
784
+ declare const FormWizard: React$1.ForwardRefExoticComponent<FormWizardProps & React$1.RefAttributes<HTMLDivElement>>;
785
+ declare const FormWizardStep: React$1.ForwardRefExoticComponent<FormWizardStepProps & React$1.RefAttributes<HTMLDivElement>>;
786
+ declare const FormWizardNavigation: React$1.ForwardRefExoticComponent<FormWizardNavigationProps & React$1.RefAttributes<HTMLDivElement>>;
787
+
788
+ interface EnhancedInputProps extends React$1.InputHTMLAttributes<HTMLInputElement> {
789
+ label?: string;
790
+ description?: string;
791
+ error?: string;
792
+ success?: string;
793
+ leftIcon?: React$1.ReactNode;
794
+ rightIcon?: React$1.ReactNode;
795
+ isLoading?: boolean;
796
+ showCharacterCount?: boolean;
797
+ maxCharacters?: number;
798
+ onValueChange?: (value: string) => void;
799
+ containerClassName?: string;
800
+ labelClassName?: string;
801
+ descriptionClassName?: string;
802
+ errorClassName?: string;
803
+ successClassName?: string;
804
+ }
805
+ declare const EnhancedInput: React$1.ForwardRefExoticComponent<EnhancedInputProps & React$1.RefAttributes<HTMLInputElement>>;
806
+
807
+ interface SkeletonProps extends React$1.HTMLAttributes<HTMLDivElement> {
808
+ variant?: 'default' | 'circular' | 'text' | 'card';
809
+ width?: string | number;
810
+ height?: string | number;
811
+ count?: number;
812
+ }
813
+ declare const Skeleton: React$1.ForwardRefExoticComponent<SkeletonProps & React$1.RefAttributes<HTMLDivElement>>;
814
+ declare const SkeletonCard: ({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>) => React$1.JSX.Element;
815
+ declare const SkeletonList: ({ count, className, ...props }: {
816
+ count?: number;
817
+ } & React$1.HTMLAttributes<HTMLDivElement>) => React$1.JSX.Element;
818
+ declare const SkeletonTable: ({ rows, columns, className, ...props }: {
819
+ rows?: number;
820
+ columns?: number;
821
+ } & React$1.HTMLAttributes<HTMLDivElement>) => React$1.JSX.Element;
822
+
823
+ /**
824
+ * 统计卡片骨架屏
825
+ */
826
+ declare function StatCardSkeleton(): React$1.JSX.Element;
827
+ /**
828
+ * 统计网格骨架屏
829
+ */
830
+ declare function StatsGridSkeleton({ count }: {
831
+ count?: number;
832
+ }): React$1.JSX.Element;
833
+ /**
834
+ * 表格骨架屏
835
+ */
836
+ declare function TableSkeleton({ rows, columns, }: {
837
+ rows?: number;
838
+ columns?: number;
839
+ }): React$1.JSX.Element;
840
+ /**
841
+ * 卡片列表骨架屏
842
+ */
843
+ declare function CardListSkeleton({ count }: {
844
+ count?: number;
845
+ }): React$1.JSX.Element;
846
+ /** 员工卡:竖版,顶部身份色带 + 大头像 + 岗位 + 状态 + 擅长 chips。 */
847
+ declare function EmployeeCardSkeleton(): React$1.JSX.Element;
848
+ /** 候选员工卡(招募页):横版,岗位 + 价值 + 成果 + 适用任务。 */
849
+ declare function CandidateCardSkeleton(): React$1.JSX.Element;
850
+ /**
851
+ * 技能卡:图标 + 两行成果描述 + meta + 标签 + 卡底一条分隔线和主动作。
852
+ *
853
+ * 逐块对齐真实卡片(`ExtensionCard`)的高度与位置。骨架屏的价值全在这里 —— 一块
854
+ * 尺寸不对的灰块比什么都不画更糟:内容一到就整页跳一次。
855
+ */
856
+ declare function SkillCardSkeleton(): React$1.JSX.Element;
857
+ /**
858
+ * 看板骨架:列的外框与列名先出现,卡片位置留白。
859
+ *
860
+ * 看板的列数与列名是配置决定的、不随数据变化,所以它们可以先画出来 —— 用户在等的
861
+ * 是卡片,不是「这个看板有哪几列」。
862
+ */
863
+ declare function BoardColumnsSkeleton({ count }: {
864
+ count?: number;
865
+ }): React$1.JSX.Element;
866
+ /** 列表行:左边标题与副标题,右边状态与时间。 */
867
+ declare function ListRowsSkeleton({ count }: {
868
+ count?: number;
869
+ }): React$1.JSX.Element;
870
+ /** 知识库卡:图标 + 名称 + 一行说明 + 两项计量。 */
871
+ declare function LibraryCardSkeleton(): React$1.JSX.Element;
872
+ /**
873
+ * 页面头部骨架屏
874
+ */
875
+ declare function PageHeaderSkeleton(): React$1.JSX.Element;
876
+
877
+ declare const Tabs: React$1.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React$1.RefAttributes<HTMLDivElement>>;
878
+ declare const TabsList: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
879
+ declare const TabsTrigger: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
880
+ declare const TabsContent: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
881
+
882
+ /**
883
+ * A row of toggles for a toolbar.
884
+ *
885
+ * `Segmented` covers the neighbouring shape — one choice out of a few that
886
+ * re-filters a list, drawn as a pill track with radio semantics. This one is
887
+ * for formatting controls: items are icon-sized and sit flush against each
888
+ * other, and `type="multiple"` lets bold and italic be on at the same time,
889
+ * which a radio group cannot express.
890
+ *
891
+ * Radix supplies the part that is tedious to get right by hand: the group is a
892
+ * single Tab stop and the arrow keys move within it, so a toolbar of twelve
893
+ * buttons does not cost twelve presses to skip past.
894
+ */
895
+ declare const ToggleGroup: React$1.ForwardRefExoticComponent<(Omit<ToggleGroupPrimitive.ToggleGroupSingleProps & React$1.RefAttributes<HTMLDivElement>, "ref"> | Omit<ToggleGroupPrimitive.ToggleGroupMultipleProps & React$1.RefAttributes<HTMLDivElement>, "ref">) & React$1.RefAttributes<HTMLDivElement>>;
896
+ declare const ToggleGroupItem: React$1.ForwardRefExoticComponent<Omit<ToggleGroupPrimitive.ToggleGroupItemProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
897
+
898
+ /**
899
+ * A keyboard key, for shortcut hints in tooltips and help panels.
900
+ *
901
+ * The background is a translucent foreground rather than `bg-muted` because
902
+ * this mostly renders inside a tooltip, and in dark mode `--muted` and
903
+ * `--popover` are one percent of lightness apart: a muted key on a popover
904
+ * would be invisible. Tinting the foreground keeps contrast on any surface.
905
+ *
906
+ * `font-sans` is deliberate — `⌘` and `⇧` in a monospace fall back to whatever
907
+ * glyph the mono face happens to have, and they rarely line up with the letter
908
+ * beside them.
909
+ */
910
+ declare const Kbd: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLElement> & React$1.RefAttributes<HTMLElement>>;
911
+
912
+ interface DeltaIndicatorProps {
913
+ /** The change as a fraction (0.12 is +12%); null when there is no basis. */
914
+ value: number | null;
915
+ /**
916
+ * Which way is good. A rise in receivables overdue is bad news, so the
917
+ * colour follows the metric, not the arrow.
918
+ */
919
+ direction?: 'up' | 'down';
920
+ /** Shown instead of a percentage when `value` is null, e.g. "no prior data". */
921
+ emptyLabel?: string;
922
+ /** What the change is against, for the accessible name: "vs last month". */
923
+ comparisonLabel?: string;
924
+ className?: string;
925
+ }
926
+ /** A period-on-period change: arrow, signed percentage, good or bad colour. */
927
+ declare function DeltaIndicator({ value, direction, emptyLabel, comparisonLabel, className, }: DeltaIndicatorProps): React$1.JSX.Element;
928
+
929
+ declare const SIZE_CLASS: {
930
+ readonly sm: "text-base";
931
+ readonly md: "text-xl";
932
+ readonly lg: "text-3xl";
933
+ };
934
+ interface MetricValueProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, 'children'> {
935
+ /** The figure, already formatted. `null`/`undefined` renders as an em dash. */
936
+ value: React$1.ReactNode;
937
+ label?: React$1.ReactNode;
938
+ unit?: React$1.ReactNode;
939
+ /** Period-on-period change, rendered with `DeltaIndicator`. */
940
+ delta?: Pick<DeltaIndicatorProps, 'value' | 'direction' | 'comparisonLabel' | 'emptyLabel'>;
941
+ size?: keyof typeof SIZE_CLASS;
942
+ }
943
+ /**
944
+ * A machine-produced number: mono, tabular, with an optional unit and change.
945
+ * Figures in a column line up digit for digit, and a refresh that changes one
946
+ * digit does not make the rest of the row jump.
947
+ */
948
+ declare function MetricValue({ value, label, unit, delta, size, className, ...rest }: MetricValueProps): React$1.JSX.Element;
949
+
950
+ interface PanelHeaderProps extends Omit<React$1.HTMLAttributes<HTMLElement>, 'title'> {
951
+ title: React$1.ReactNode;
952
+ icon?: React$1.ReactNode;
953
+ /** Right-aligned controls: a count, a filter, a "view all" link. */
954
+ actions?: React$1.ReactNode;
955
+ }
956
+ /**
957
+ * The head strip of a panel inside a card: small label, a hairline under it,
958
+ * a tinted band in the new visual. Separates sections of a card without
959
+ * nesting another card inside it.
960
+ */
961
+ declare const PanelHeader: React$1.ForwardRefExoticComponent<PanelHeaderProps & React$1.RefAttributes<HTMLElement>>;
962
+
963
+ declare const contentTabsListClassName = "inline-flex h-11 w-fit max-w-full items-center gap-6 overflow-x-auto border-b border-border/60 bg-transparent [scrollbar-width:none] [&::-webkit-scrollbar]:hidden";
964
+ declare const contentTabsTriggerClassName = "relative inline-flex !h-11 flex-shrink-0 items-center gap-2 !rounded-none !px-0 !py-0 text-sm font-semibold !text-muted-foreground transition-colors after:absolute after:inset-x-0 after:-bottom-px after:!h-0.5 after:rounded-full after:!bg-transparent after:content-[\"\"] hover:!bg-transparent hover:!text-foreground data-[state=active]:!bg-transparent data-[state=active]:!text-primary data-[state=active]:shadow-none data-[state=active]:after:!bg-primary";
965
+ declare const contentTabsButtonClassName = "relative inline-flex h-11 flex-shrink-0 items-center gap-2 rounded-none bg-transparent px-0 py-0 text-sm font-semibold transition-colors after:absolute after:inset-x-0 after:-bottom-px after:h-0.5 after:rounded-full after:content-[\"\"]";
966
+ declare const contentTabsButtonActiveClassName = "text-primary after:bg-primary hover:bg-transparent hover:text-primary";
967
+ declare const contentTabsButtonInactiveClassName = "text-muted-foreground after:bg-transparent hover:bg-transparent hover:text-foreground";
968
+
969
+ interface UserPickerOption {
970
+ id: string;
971
+ username?: string | null;
972
+ fullName?: string | null;
973
+ displayName?: string | null;
974
+ email?: string | null;
975
+ avatar?: string | null;
976
+ description?: string | null;
977
+ }
978
+ interface UserPickerCommonProps {
979
+ users: UserPickerOption[];
980
+ onSearch?: (query: string) => Promise<UserPickerOption[]> | UserPickerOption[];
981
+ placeholder?: string;
982
+ searchPlaceholder?: string;
983
+ emptyText?: string;
984
+ loadingText?: string;
985
+ loading?: boolean;
986
+ errorText?: string;
987
+ retryLabel?: string;
988
+ clearLabel?: string;
989
+ disabled?: boolean;
990
+ className?: string;
991
+ triggerClassName?: string;
992
+ align?: 'start' | 'center' | 'end';
993
+ 'aria-label'?: string;
994
+ 'aria-labelledby'?: string;
995
+ }
996
+ type UserPickerProps = (UserPickerCommonProps & {
997
+ multiple?: false;
998
+ value: string;
999
+ onChange: (value: string) => void;
1000
+ allowClear?: boolean;
1001
+ }) | (UserPickerCommonProps & {
1002
+ multiple: true;
1003
+ value: string[];
1004
+ onChange: (value: string[]) => void;
1005
+ maxVisibleUsers?: number;
1006
+ });
1007
+ declare function UserPicker(props: UserPickerProps): React$1.JSX.Element;
1008
+
1009
+ type TextareaProps = React$1.TextareaHTMLAttributes<HTMLTextAreaElement>;
1010
+ declare const Textarea: React$1.ForwardRefExoticComponent<TextareaProps & React$1.RefAttributes<HTMLTextAreaElement>>;
1011
+
1012
+ type CalendarProps = React$1.ComponentProps<typeof DayPicker>;
1013
+ declare function Calendar({ className, classNames, captionLayout, locale, navLayout, showOutsideDays, fixedWeeks, labels, ...props }: CalendarProps): React$1.JSX.Element;
1014
+ declare namespace Calendar {
1015
+ var displayName: string;
1016
+ }
1017
+
1018
+ interface DatePickerProps {
1019
+ value?: string;
1020
+ onChange: (value: string) => void;
1021
+ placeholder?: string;
1022
+ locale?: CalendarProps['locale'];
1023
+ labels?: CalendarProps['labels'];
1024
+ weekStartsOn?: CalendarProps['weekStartsOn'];
1025
+ startMonth?: CalendarProps['startMonth'];
1026
+ endMonth?: CalendarProps['endMonth'];
1027
+ formatDisplay?: (value: string) => string;
1028
+ disabled?: boolean;
1029
+ /** 挂载即展开日历。就地编辑时点一下日期就该看到日历,而不是再点一次触发器。 */
1030
+ defaultOpen?: boolean;
1031
+ /** 关闭时通知调用方,让「点一下才编辑」的字段知道该退回只读。 */
1032
+ onOpenChange?: (open: boolean) => void;
1033
+ /** 触发器的无障碍名称。字段标签不是 `<label for>` 时需要它。 */
1034
+ 'aria-label'?: string;
1035
+ className?: string;
1036
+ calendarClassName?: string;
1037
+ }
1038
+ declare const datePickerLocales: {
1039
+ enUS: react_day_picker.DayPickerLocale;
1040
+ zhCN: react_day_picker.DayPickerLocale;
1041
+ };
1042
+ declare function DatePicker({ value, onChange, placeholder, locale, labels, weekStartsOn, startMonth, endMonth, formatDisplay, disabled, defaultOpen, onOpenChange, className, calendarClassName, ...aria }: DatePickerProps): React$1.JSX.Element;
1043
+ declare namespace DatePicker {
1044
+ var displayName: string;
1045
+ }
1046
+
1047
+ declare const Table: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableElement> & React$1.RefAttributes<HTMLTableElement>>;
1048
+ declare const TableHeader: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
1049
+ declare const TableBody: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
1050
+ declare const TableFooter: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
1051
+ declare const TableRow: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableRowElement> & React$1.RefAttributes<HTMLTableRowElement>>;
1052
+ declare const TableHead: React$1.ForwardRefExoticComponent<React$1.ThHTMLAttributes<HTMLTableCellElement> & React$1.RefAttributes<HTMLTableCellElement>>;
1053
+ type SortDirection = 'asc' | 'desc';
1054
+ interface SortableTableHeadProps extends Omit<React$1.ThHTMLAttributes<HTMLTableCellElement>, 'onClick'> {
1055
+ /** The direction this column is sorted in, or null when it is not the one. */
1056
+ direction?: SortDirection | null;
1057
+ /** Called with the direction to move to. */
1058
+ onSort: (direction: SortDirection) => void;
1059
+ }
1060
+ /**
1061
+ * A column header you can sort by.
1062
+ *
1063
+ * The whole header is the button, not an icon beside the label: a four-pixel
1064
+ * arrow is a target nobody hits, and the label is what people aim at. The
1065
+ * unsorted state still shows an arrow pair, faintly — a header that looks
1066
+ * inert until hovered is a control users never find.
1067
+ *
1068
+ * `aria-sort` on the `th` is the reason this is a shared component rather than
1069
+ * a `<button>` inside `TableHead` at each call site: it is the part everyone
1070
+ * forgets, and without it a screen reader cannot tell a sorted table from an
1071
+ * arbitrary one.
1072
+ */
1073
+ declare const SortableTableHead: React$1.ForwardRefExoticComponent<SortableTableHeadProps & React$1.RefAttributes<HTMLTableCellElement>>;
1074
+ declare const TableCell: React$1.ForwardRefExoticComponent<React$1.TdHTMLAttributes<HTMLTableCellElement> & React$1.RefAttributes<HTMLTableCellElement>>;
1075
+ declare const TableCaption: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableCaptionElement> & React$1.RefAttributes<HTMLTableCaptionElement>>;
1076
+
1077
+ /**
1078
+ * Right-click menus.
1079
+ *
1080
+ * The same menu a row's `⋯` button opens, reached the way a file manager taught
1081
+ * everyone to reach it. Radix keeps the two in agreement about keyboard
1082
+ * behaviour and focus return, which is the part that gets skipped when a surface
1083
+ * hand-rolls its own `onContextMenu`.
1084
+ *
1085
+ * Styling is deliberately identical to `dropdown-menu.tsx`: they are the same
1086
+ * menu, and a right-click that produced a differently-shaped popover would read
1087
+ * as a different feature.
1088
+ */
1089
+
1090
+ declare const ContextMenu: React$1.FC<ContextMenuPrimitive.ContextMenuProps>;
1091
+ declare const ContextMenuTrigger: React$1.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuTriggerProps & React$1.RefAttributes<HTMLSpanElement>>;
1092
+ declare const ContextMenuGroup: React$1.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuGroupProps & React$1.RefAttributes<HTMLDivElement>>;
1093
+ declare const ContextMenuPortal: React$1.FC<ContextMenuPrimitive.ContextMenuPortalProps>;
1094
+ declare const ContextMenuSub: React$1.FC<ContextMenuPrimitive.ContextMenuSubProps>;
1095
+ declare const ContextMenuSubTrigger: React$1.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSubTriggerProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
1096
+ declare const ContextMenuSubContent: React$1.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSubContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
1097
+ declare const ContextMenuContent: React$1.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
1098
+ declare const ContextMenuItem: React$1.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
1099
+ declare const ContextMenuCheckboxItem: React$1.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuCheckboxItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
1100
+ declare const ContextMenuLabel: React$1.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuLabelProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
1101
+ declare const ContextMenuSeparator: React$1.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
1102
+
1103
+ /**
1104
+ * One file, in a list.
1105
+ *
1106
+ * Same shape wherever files are listed: icon, name, secondary meta, and actions
1107
+ * that appear on hover. Two details are the reason this is shared rather than
1108
+ * re-typed per surface:
1109
+ *
1110
+ * - hover-revealed actions must also appear on keyboard focus, or they are
1111
+ * unreachable without a mouse (`focus-within:opacity-100`);
1112
+ * - the actions sit inside the row's click target, so each one has to stop
1113
+ * propagation. Every surface that hand-rolled this forgot one of the two.
1114
+ */
1115
+
1116
+ interface FileListRowProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, 'children'> {
1117
+ icon?: React$1.ReactNode;
1118
+ name: React$1.ReactNode;
1119
+ /** Size, time, origin — whatever this surface reads on the second line. */
1120
+ meta?: React$1.ReactNode;
1121
+ /** Rendered at the right edge, revealed on hover or keyboard focus. */
1122
+ actions?: React$1.ReactNode;
1123
+ /** Always-visible trailing content, before the actions. */
1124
+ trailing?: React$1.ReactNode;
1125
+ selected?: boolean;
1126
+ /** Dims the row while something is in flight, without blocking it. */
1127
+ busy?: boolean;
1128
+ onOpen?: () => void;
1129
+ }
1130
+ declare const FileListRow: React$1.ForwardRefExoticComponent<FileListRowProps & React$1.RefAttributes<HTMLDivElement>>;
1131
+
1132
+ declare const Dialog: React$1.FC<DialogPrimitive.DialogProps>;
1133
+ declare const DialogTrigger: React$1.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
1134
+ declare const DialogPortal: React$1.FC<DialogPrimitive.DialogPortalProps>;
1135
+ declare const DialogClose: React$1.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React$1.RefAttributes<HTMLButtonElement>>;
1136
+ declare const DialogOverlay: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
1137
+ declare const DialogContent: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
1138
+ hideCloseButton?: boolean;
1139
+ overlayClassName?: string;
1140
+ /**
1141
+ * Allow dismissing the dialog by clicking the overlay / outside.
1142
+ * Defaults to `false` so dialogs require an explicit action (close button,
1143
+ * a footer action, or Esc) to dismiss — avoids accidental data loss.
1144
+ */
1145
+ closeOnOutsideClick?: boolean;
1146
+ } & React$1.RefAttributes<HTMLDivElement>>;
1147
+ declare const DialogHeader: {
1148
+ ({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): React$1.JSX.Element;
1149
+ displayName: string;
1150
+ };
1151
+ declare const DialogFooter: {
1152
+ ({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): React$1.JSX.Element;
1153
+ displayName: string;
1154
+ };
1155
+ declare const DialogTitle: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>, "ref"> & React$1.RefAttributes<HTMLHeadingElement>>;
1156
+ declare const DialogDescription: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
1157
+
1158
+ interface DrawerProps {
1159
+ children: React$1.ReactNode;
1160
+ open?: boolean;
1161
+ onOpenChange?: (open: boolean) => void;
1162
+ }
1163
+ declare const Drawer: React$1.ForwardRefExoticComponent<DrawerProps & React$1.RefAttributes<HTMLDivElement>>;
1164
+ interface DrawerTriggerProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
1165
+ asChild?: boolean;
1166
+ }
1167
+ declare const DrawerTrigger: React$1.ForwardRefExoticComponent<DrawerTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
1168
+ interface DrawerPortalProps {
1169
+ children: React$1.ReactNode;
1170
+ }
1171
+ declare const DrawerPortal: React$1.FC<DrawerPortalProps>;
1172
+ type DrawerOverlayProps = React$1.HTMLAttributes<HTMLDivElement>;
1173
+ declare const DrawerOverlay: React$1.ForwardRefExoticComponent<DrawerOverlayProps & React$1.RefAttributes<HTMLDivElement>>;
1174
+ interface DrawerContentProps extends React$1.HTMLAttributes<HTMLDivElement> {
1175
+ side?: 'left' | 'right' | 'top' | 'bottom';
1176
+ /** 是否以模态方式展示;关闭后不渲染遮罩,也不锁定页面滚动。 */
1177
+ modal?: boolean;
1178
+ closeOnOverlayClick?: boolean;
1179
+ closeOnEscape?: boolean;
1180
+ /** 覆盖抽屉背景遮罩样式;适合搜索等弱模态侧栏降低遮罩强度。 */
1181
+ overlayClassName?: string;
1182
+ }
1183
+ declare const DrawerContent: React$1.ForwardRefExoticComponent<DrawerContentProps & React$1.RefAttributes<HTMLDivElement>>;
1184
+ type DrawerHeaderProps = React$1.HTMLAttributes<HTMLDivElement>;
1185
+ declare const DrawerHeader: React$1.ForwardRefExoticComponent<DrawerHeaderProps & React$1.RefAttributes<HTMLDivElement>>;
1186
+ type DrawerFooterProps = React$1.HTMLAttributes<HTMLDivElement>;
1187
+ declare const DrawerFooter: React$1.ForwardRefExoticComponent<DrawerFooterProps & React$1.RefAttributes<HTMLDivElement>>;
1188
+ type DrawerTitleProps = React$1.HTMLAttributes<HTMLHeadingElement>;
1189
+ declare const DrawerTitle: React$1.ForwardRefExoticComponent<DrawerTitleProps & React$1.RefAttributes<HTMLHeadingElement>>;
1190
+ type DrawerDescriptionProps = React$1.HTMLAttributes<HTMLParagraphElement>;
1191
+ declare const DrawerDescription: React$1.ForwardRefExoticComponent<DrawerDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>>;
1192
+ type DrawerBodyProps = React$1.HTMLAttributes<HTMLDivElement>;
1193
+ declare const DrawerBody: React$1.ForwardRefExoticComponent<DrawerBodyProps & React$1.RefAttributes<HTMLDivElement>>;
1194
+ interface DrawerCloseProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
1195
+ asChild?: boolean;
1196
+ }
1197
+ declare const DrawerClose: React$1.ForwardRefExoticComponent<DrawerCloseProps & React$1.RefAttributes<HTMLButtonElement>>;
1198
+
1199
+ declare const Separator: React$1.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
1200
+
1201
+ interface ScrollAreaProps extends React$1.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> {
1202
+ viewportRef?: React$1.Ref<HTMLDivElement>;
1203
+ viewportClassName?: string;
1204
+ horizontalScroll?: boolean;
1205
+ }
1206
+ declare const ScrollArea: React$1.ForwardRefExoticComponent<ScrollAreaProps & React$1.RefAttributes<HTMLDivElement>>;
1207
+ declare const ScrollBar: React$1.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaScrollbarProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
1208
+
1209
+ declare const Popover: React$1.FC<PopoverPrimitive.PopoverProps>;
1210
+ declare const PopoverTrigger: React$1.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
1211
+ declare const PopoverAnchor: React$1.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React$1.RefAttributes<HTMLDivElement>>;
1212
+ declare const PopoverContent: React$1.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
1213
+ portalContainer?: HTMLElement | null;
1214
+ } & React$1.RefAttributes<HTMLDivElement>>;
1215
+
1216
+ declare const HoverCard: React$1.FC<HoverCardPrimitive.HoverCardProps>;
1217
+ declare const HoverCardTrigger: React$1.ForwardRefExoticComponent<HoverCardPrimitive.HoverCardTriggerProps & React$1.RefAttributes<HTMLAnchorElement>>;
1218
+ declare const HoverCardContent: React$1.ForwardRefExoticComponent<Omit<HoverCardPrimitive.HoverCardContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
1219
+
1220
+ interface InfoTipProps {
1221
+ /** What the explanation is about; read out as the button's name. */
1222
+ label: string;
1223
+ children: React$1.ReactNode;
1224
+ className?: string;
1225
+ /** Plugins pass their style scope (e.g. `tego-crm`) for the portalled content. */
1226
+ contentClassName?: string;
1227
+ }
1228
+ /**
1229
+ * The (?) beside a label, holding the explanation the label leaves out.
1230
+ *
1231
+ * A popover rather than a tooltip: it opens on click and on touch, and the
1232
+ * text can be selected and read at its own pace.
1233
+ */
1234
+ declare function InfoTip({ label, children, className, contentClassName, }: InfoTipProps): React$1.JSX.Element;
1235
+
1236
+ interface EmptyStateProps {
1237
+ icon?: React.ReactNode;
1238
+ title: string;
1239
+ description?: string;
1240
+ action?: {
1241
+ label: string;
1242
+ onClick: () => void;
1243
+ icon?: React.ReactNode;
1244
+ };
1245
+ secondaryAction?: {
1246
+ label: string;
1247
+ onClick: () => void;
1248
+ };
1249
+ /**
1250
+ * `compact` fits a single empty row in a tree or compact list.
1251
+ * `sm` fits an empty state inside a panel or table body, where the default
1252
+ * page-sized proportions read as a hole in the layout.
1253
+ */
1254
+ size?: 'compact' | 'sm' | 'md';
1255
+ className?: string;
1256
+ }
1257
+ declare function EmptyState({ icon, title, description, action, secondaryAction, size, className, }: EmptyStateProps): React$1.JSX.Element;
1258
+
1259
+ interface BreadcrumbItem {
1260
+ label: string;
1261
+ href?: string;
1262
+ icon?: React.ReactNode;
1263
+ onClick?: () => void;
1264
+ }
1265
+ interface BreadcrumbProps {
1266
+ items: BreadcrumbItem[];
1267
+ homeHref?: string;
1268
+ onHomeClick?: () => void;
1269
+ showHome?: boolean;
1270
+ className?: string;
1271
+ }
1272
+ declare function Breadcrumb({ items, homeHref, onHomeClick, showHome, className, }: BreadcrumbProps): React$1.JSX.Element;
1273
+
1274
+ declare const TooltipProvider: React$1.FC<TooltipPrimitive.TooltipProviderProps>;
1275
+ declare const Tooltip: React$1.FC<TooltipPrimitive.TooltipProps>;
1276
+ declare const TooltipTrigger: React$1.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
1277
+ declare const TooltipContent: React$1.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
1278
+
1279
+ declare const Progress: React$1.ForwardRefExoticComponent<Omit<ProgressPrimitive.ProgressProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
1280
+
1281
+ interface TopProgressBarProps {
1282
+ /** 是否显示进度条 */
1283
+ loading: boolean;
1284
+ /** 进度条颜色,默认为 primary */
1285
+ color?: 'primary' | 'secondary' | 'destructive' | 'warning';
1286
+ /** 进度条高度,默认为 2px */
1287
+ height?: number;
1288
+ /** 进度条速度,毫秒,默认为 200ms */
1289
+ speed?: number;
1290
+ /** 最小展示时间,毫秒,防止闪烁,默认为 300ms */
1291
+ minDisplayTime?: number;
1292
+ /** 自定义类名 */
1293
+ className?: string;
1294
+ }
1295
+ declare function TopProgressBar({ loading, color, height, speed, minDisplayTime, className, }: TopProgressBarProps): React__default.JSX.Element | null;
1296
+
1297
+ /**
1298
+ * File Upload Component
1299
+ * 通用文件上传组件 - 支持拖拽上传
1300
+ */
1301
+
1302
+ interface FileUploadProps {
1303
+ /** 已选择的文件 */
1304
+ value?: File | null;
1305
+ /** 文件变化回调 */
1306
+ onChange?: (file: File | null) => void;
1307
+ /** 批量选择;单文件调用方无需修改。 */
1308
+ multiple?: boolean;
1309
+ files?: File[];
1310
+ onFilesChange?: (files: File[]) => void;
1311
+ /** 接受的文件类型 */
1312
+ accept?: string;
1313
+ /** 最大文件大小(字节) */
1314
+ maxSize?: number;
1315
+ /** 是否禁用 */
1316
+ disabled?: boolean;
1317
+ /** 是否显示文件信息 */
1318
+ showFileInfo?: boolean;
1319
+ /** 自定义类名 */
1320
+ className?: string;
1321
+ /** 上传区域提示文本 */
1322
+ hint?: string;
1323
+ /** 支持格式说明 */
1324
+ supportedFormats?: string;
1325
+ /** 最大文件大小说明 */
1326
+ maxSizeText?: string;
1327
+ }
1328
+ declare function FileUpload({ value, onChange, multiple, files, onFilesChange, accept, maxSize, // 默认 50MB
1329
+ disabled, showFileInfo, className, hint, supportedFormats, maxSizeText, }: FileUploadProps): React$1.JSX.Element;
1330
+
1331
+ declare const ToastProvider: React$1.FC<_radix_ui_react_toast.ToastProviderProps>;
1332
+ declare const ToastViewport: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_toast.ToastViewportProps & React$1.RefAttributes<HTMLOListElement>, "ref"> & React$1.RefAttributes<HTMLOListElement>>;
1333
+ declare const Toast$1: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_toast.ToastProps & React$1.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
1334
+ variant?: "default" | "destructive" | "warning" | "info" | "success" | null | undefined;
1335
+ } & class_variance_authority_types.ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLLIElement>>;
1336
+ declare const ToastAction: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_toast.ToastActionProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
1337
+ declare const ToastClose: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_toast.ToastCloseProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
1338
+ declare const ToastTitle: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_toast.ToastTitleProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
1339
+ declare const ToastDescription: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_toast.ToastDescriptionProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
1340
+ type ToastProps = React$1.ComponentPropsWithoutRef<typeof Toast$1>;
1341
+ /**
1342
+ * `ReactElement`'s first parameter is the element's props, so the shadcn
1343
+ * boilerplate this came from — `ReactElement<typeof ToastAction>` — asked for
1344
+ * props shaped like the component function itself, which no element can have.
1345
+ * JSX slipped through only because `JSX.Element` is `ReactElement<any, any>`;
1346
+ * `createElement`, which reports its props precisely, did not.
1347
+ */
1348
+ type ToastActionElement = React$1.ReactElement<React$1.ComponentPropsWithoutRef<typeof ToastAction>>;
1349
+
1350
+ declare function Toaster(): React__default.JSX.Element;
1351
+
1352
+ interface ToastViewportOverrideProps {
1353
+ /** Space reserved below the viewport; its own padding remains unchanged. */
1354
+ bottomOffset: number;
1355
+ }
1356
+ /**
1357
+ * Temporarily reserves space below the global toast viewport. The latest
1358
+ * mounted override wins and is removed automatically when its page unmounts.
1359
+ */
1360
+ declare function ToastViewportOverride({ bottomOffset, }: ToastViewportOverrideProps): null;
1361
+
1362
+ type ToasterToast = ToastProps & {
1363
+ id: string;
1364
+ title?: React$1.ReactNode;
1365
+ description?: React$1.ReactNode;
1366
+ action?: ToastActionElement;
1367
+ errorId?: string;
1368
+ severity?: 'info' | 'warning' | 'error' | 'critical' | 'success';
1369
+ retryable?: boolean;
1370
+ retryAction?: () => Promise<void>;
1371
+ helpUrl?: string;
1372
+ duration?: number;
1373
+ priority?: number;
1374
+ deduplicationKey?: string;
1375
+ timestamp?: number;
1376
+ count?: number;
1377
+ };
1378
+ type Toast = Omit<ToasterToast, 'id'>;
1379
+ declare function toast({ ...props }: Toast): {
1380
+ id: string;
1381
+ dismiss: () => void;
1382
+ update: (props: ToasterToast) => void;
1383
+ };
1384
+ declare function useToast(): {
1385
+ toast: typeof toast;
1386
+ dismiss: (toastId?: string) => void;
1387
+ toasts: ToasterToast[];
1388
+ };
1389
+
1390
+ /**
1391
+ * 显示错误Toast
1392
+ */
1393
+ declare function showErrorToast(options: {
1394
+ title?: string;
1395
+ description: string;
1396
+ errorId?: string;
1397
+ retryable?: boolean;
1398
+ retryAction?: () => Promise<void>;
1399
+ helpUrl?: string;
1400
+ duration?: number;
1401
+ severity?: 'error' | 'critical';
1402
+ deduplicationKey?: string;
1403
+ }): {
1404
+ id: string;
1405
+ dismiss: () => void;
1406
+ update: (props: ToasterToast) => void;
1407
+ };
1408
+ /**
1409
+ * 显示警告Toast
1410
+ */
1411
+ declare function showWarningToast(options: {
1412
+ title?: string;
1413
+ description: string;
1414
+ duration?: number;
1415
+ helpUrl?: string;
1416
+ deduplicationKey?: string;
1417
+ }): {
1418
+ id: string;
1419
+ dismiss: () => void;
1420
+ update: (props: ToasterToast) => void;
1421
+ };
1422
+ /**
1423
+ * 显示信息Toast
1424
+ */
1425
+ declare function showInfoToast(options: {
1426
+ title?: string;
1427
+ description: string;
1428
+ duration?: number;
1429
+ deduplicationKey?: string;
1430
+ }): {
1431
+ id: string;
1432
+ dismiss: () => void;
1433
+ update: (props: ToasterToast) => void;
1434
+ };
1435
+ /**
1436
+ * 显示成功Toast
1437
+ */
1438
+ declare function showSuccessToast(options: {
1439
+ title?: string;
1440
+ description: string;
1441
+ duration?: number;
1442
+ deduplicationKey?: string;
1443
+ }): {
1444
+ id: string;
1445
+ dismiss: () => void;
1446
+ update: (props: ToasterToast) => void;
1447
+ };
1448
+
1449
+ /**
1450
+ * 创建带图标的 Toast 助手函数
1451
+ */
1452
+ declare function createToastHelpers(): {
1453
+ /**
1454
+ * 成功通知
1455
+ */
1456
+ success: (title: string, description?: string) => {
1457
+ id: string;
1458
+ dismiss: () => void;
1459
+ update: (props: Omit<Omit<_radix_ui_react_toast.ToastProps & React$1.RefAttributes<HTMLLIElement>, "ref"> & class_variance_authority.VariantProps<(props?: ({
1460
+ variant?: "default" | "destructive" | "warning" | "info" | "success" | null | undefined;
1461
+ } & class_variance_authority_types.ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLLIElement>, "ref"> & {
1462
+ id: string;
1463
+ title?: React.ReactNode;
1464
+ description?: React.ReactNode;
1465
+ action?: ToastActionElement;
1466
+ errorId?: string;
1467
+ severity?: "info" | "warning" | "error" | "critical" | "success";
1468
+ retryable?: boolean;
1469
+ retryAction?: () => Promise<void>;
1470
+ helpUrl?: string;
1471
+ duration?: number;
1472
+ priority?: number;
1473
+ deduplicationKey?: string;
1474
+ timestamp?: number;
1475
+ count?: number;
1476
+ }) => void;
1477
+ };
1478
+ /**
1479
+ * 错误通知
1480
+ */
1481
+ error: (title: string, description?: string) => {
1482
+ id: string;
1483
+ dismiss: () => void;
1484
+ update: (props: Omit<Omit<_radix_ui_react_toast.ToastProps & React$1.RefAttributes<HTMLLIElement>, "ref"> & class_variance_authority.VariantProps<(props?: ({
1485
+ variant?: "default" | "destructive" | "warning" | "info" | "success" | null | undefined;
1486
+ } & class_variance_authority_types.ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLLIElement>, "ref"> & {
1487
+ id: string;
1488
+ title?: React.ReactNode;
1489
+ description?: React.ReactNode;
1490
+ action?: ToastActionElement;
1491
+ errorId?: string;
1492
+ severity?: "info" | "warning" | "error" | "critical" | "success";
1493
+ retryable?: boolean;
1494
+ retryAction?: () => Promise<void>;
1495
+ helpUrl?: string;
1496
+ duration?: number;
1497
+ priority?: number;
1498
+ deduplicationKey?: string;
1499
+ timestamp?: number;
1500
+ count?: number;
1501
+ }) => void;
1502
+ };
1503
+ /**
1504
+ * 警告通知
1505
+ */
1506
+ warning: (title: string, description?: string) => {
1507
+ id: string;
1508
+ dismiss: () => void;
1509
+ update: (props: Omit<Omit<_radix_ui_react_toast.ToastProps & React$1.RefAttributes<HTMLLIElement>, "ref"> & class_variance_authority.VariantProps<(props?: ({
1510
+ variant?: "default" | "destructive" | "warning" | "info" | "success" | null | undefined;
1511
+ } & class_variance_authority_types.ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLLIElement>, "ref"> & {
1512
+ id: string;
1513
+ title?: React.ReactNode;
1514
+ description?: React.ReactNode;
1515
+ action?: ToastActionElement;
1516
+ errorId?: string;
1517
+ severity?: "info" | "warning" | "error" | "critical" | "success";
1518
+ retryable?: boolean;
1519
+ retryAction?: () => Promise<void>;
1520
+ helpUrl?: string;
1521
+ duration?: number;
1522
+ priority?: number;
1523
+ deduplicationKey?: string;
1524
+ timestamp?: number;
1525
+ count?: number;
1526
+ }) => void;
1527
+ };
1528
+ /**
1529
+ * 信息通知
1530
+ */
1531
+ info: (title: string, description?: string) => {
1532
+ id: string;
1533
+ dismiss: () => void;
1534
+ update: (props: Omit<Omit<_radix_ui_react_toast.ToastProps & React$1.RefAttributes<HTMLLIElement>, "ref"> & class_variance_authority.VariantProps<(props?: ({
1535
+ variant?: "default" | "destructive" | "warning" | "info" | "success" | null | undefined;
1536
+ } & class_variance_authority_types.ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLLIElement>, "ref"> & {
1537
+ id: string;
1538
+ title?: React.ReactNode;
1539
+ description?: React.ReactNode;
1540
+ action?: ToastActionElement;
1541
+ errorId?: string;
1542
+ severity?: "info" | "warning" | "error" | "critical" | "success";
1543
+ retryable?: boolean;
1544
+ retryAction?: () => Promise<void>;
1545
+ helpUrl?: string;
1546
+ duration?: number;
1547
+ priority?: number;
1548
+ deduplicationKey?: string;
1549
+ timestamp?: number;
1550
+ count?: number;
1551
+ }) => void;
1552
+ };
1553
+ /**
1554
+ * Promise 通知 - 自动处理加载、成功、错误状态
1555
+ */
1556
+ promise: <T>(promise: Promise<T>, messages: {
1557
+ loading: string;
1558
+ success: string | ((data: T) => string);
1559
+ error: string | ((error: Error) => string);
1560
+ }) => Promise<T>;
1561
+ };
1562
+ /**
1563
+ * 导出默认实例,可直接使用
1564
+ */
1565
+ declare const toasts: {
1566
+ /**
1567
+ * 成功通知
1568
+ */
1569
+ success: (title: string, description?: string) => {
1570
+ id: string;
1571
+ dismiss: () => void;
1572
+ update: (props: Omit<Omit<_radix_ui_react_toast.ToastProps & React$1.RefAttributes<HTMLLIElement>, "ref"> & class_variance_authority.VariantProps<(props?: ({
1573
+ variant?: "default" | "destructive" | "warning" | "info" | "success" | null | undefined;
1574
+ } & class_variance_authority_types.ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLLIElement>, "ref"> & {
1575
+ id: string;
1576
+ title?: React.ReactNode;
1577
+ description?: React.ReactNode;
1578
+ action?: ToastActionElement;
1579
+ errorId?: string;
1580
+ severity?: "info" | "warning" | "error" | "critical" | "success";
1581
+ retryable?: boolean;
1582
+ retryAction?: () => Promise<void>;
1583
+ helpUrl?: string;
1584
+ duration?: number;
1585
+ priority?: number;
1586
+ deduplicationKey?: string;
1587
+ timestamp?: number;
1588
+ count?: number;
1589
+ }) => void;
1590
+ };
1591
+ /**
1592
+ * 错误通知
1593
+ */
1594
+ error: (title: string, description?: string) => {
1595
+ id: string;
1596
+ dismiss: () => void;
1597
+ update: (props: Omit<Omit<_radix_ui_react_toast.ToastProps & React$1.RefAttributes<HTMLLIElement>, "ref"> & class_variance_authority.VariantProps<(props?: ({
1598
+ variant?: "default" | "destructive" | "warning" | "info" | "success" | null | undefined;
1599
+ } & class_variance_authority_types.ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLLIElement>, "ref"> & {
1600
+ id: string;
1601
+ title?: React.ReactNode;
1602
+ description?: React.ReactNode;
1603
+ action?: ToastActionElement;
1604
+ errorId?: string;
1605
+ severity?: "info" | "warning" | "error" | "critical" | "success";
1606
+ retryable?: boolean;
1607
+ retryAction?: () => Promise<void>;
1608
+ helpUrl?: string;
1609
+ duration?: number;
1610
+ priority?: number;
1611
+ deduplicationKey?: string;
1612
+ timestamp?: number;
1613
+ count?: number;
1614
+ }) => void;
1615
+ };
1616
+ /**
1617
+ * 警告通知
1618
+ */
1619
+ warning: (title: string, description?: string) => {
1620
+ id: string;
1621
+ dismiss: () => void;
1622
+ update: (props: Omit<Omit<_radix_ui_react_toast.ToastProps & React$1.RefAttributes<HTMLLIElement>, "ref"> & class_variance_authority.VariantProps<(props?: ({
1623
+ variant?: "default" | "destructive" | "warning" | "info" | "success" | null | undefined;
1624
+ } & class_variance_authority_types.ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLLIElement>, "ref"> & {
1625
+ id: string;
1626
+ title?: React.ReactNode;
1627
+ description?: React.ReactNode;
1628
+ action?: ToastActionElement;
1629
+ errorId?: string;
1630
+ severity?: "info" | "warning" | "error" | "critical" | "success";
1631
+ retryable?: boolean;
1632
+ retryAction?: () => Promise<void>;
1633
+ helpUrl?: string;
1634
+ duration?: number;
1635
+ priority?: number;
1636
+ deduplicationKey?: string;
1637
+ timestamp?: number;
1638
+ count?: number;
1639
+ }) => void;
1640
+ };
1641
+ /**
1642
+ * 信息通知
1643
+ */
1644
+ info: (title: string, description?: string) => {
1645
+ id: string;
1646
+ dismiss: () => void;
1647
+ update: (props: Omit<Omit<_radix_ui_react_toast.ToastProps & React$1.RefAttributes<HTMLLIElement>, "ref"> & class_variance_authority.VariantProps<(props?: ({
1648
+ variant?: "default" | "destructive" | "warning" | "info" | "success" | null | undefined;
1649
+ } & class_variance_authority_types.ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLLIElement>, "ref"> & {
1650
+ id: string;
1651
+ title?: React.ReactNode;
1652
+ description?: React.ReactNode;
1653
+ action?: ToastActionElement;
1654
+ errorId?: string;
1655
+ severity?: "info" | "warning" | "error" | "critical" | "success";
1656
+ retryable?: boolean;
1657
+ retryAction?: () => Promise<void>;
1658
+ helpUrl?: string;
1659
+ duration?: number;
1660
+ priority?: number;
1661
+ deduplicationKey?: string;
1662
+ timestamp?: number;
1663
+ count?: number;
1664
+ }) => void;
1665
+ };
1666
+ /**
1667
+ * Promise 通知 - 自动处理加载、成功、错误状态
1668
+ */
1669
+ promise: <T>(promise: Promise<T>, messages: {
1670
+ loading: string;
1671
+ success: string | ((data: T) => string);
1672
+ error: string | ((error: Error) => string);
1673
+ }) => Promise<T>;
1674
+ };
1675
+
1676
+ interface ResizableWidthOptions {
1677
+ min: number;
1678
+ max: number;
1679
+ initial: number;
1680
+ /** Remembers the width per viewer (localStorage). */
1681
+ storageKey: string;
1682
+ /**
1683
+ * The edge the user drags: `right` for a panel on the left (a sidebar),
1684
+ * `left` for a panel on the right. Defaults to `right`.
1685
+ */
1686
+ edge?: 'left' | 'right';
1687
+ }
1688
+ /**
1689
+ * A panel edge the user drags (or moves with the arrow keys) to resize, the
1690
+ * same interaction as the app sidebar's edge. Returns the width and the props
1691
+ * for the separator element (see `ResizeHandle`).
1692
+ */
1693
+ declare function useResizableWidth({ min, max, initial, storageKey, edge, }: ResizableWidthOptions): {
1694
+ width: number;
1695
+ resizing: boolean;
1696
+ separatorProps: {
1697
+ role: "separator";
1698
+ 'aria-orientation': "vertical";
1699
+ 'aria-valuemin': number;
1700
+ 'aria-valuemax': number;
1701
+ 'aria-valuenow': number;
1702
+ tabIndex: number;
1703
+ onPointerDown: (event: PointerEvent<HTMLElement>) => void;
1704
+ onKeyDown: (event: KeyboardEvent<HTMLElement>) => void;
1705
+ };
1706
+ };
1707
+
1708
+ interface ResizeHandleProps {
1709
+ /** `separatorProps` from `useResizableWidth`. */
1710
+ separator: ReturnType<typeof useResizableWidth>['separatorProps'];
1711
+ /** The panel edge it sits on; match the hook's `edge`. */
1712
+ edge: 'left' | 'right';
1713
+ resizing: boolean;
1714
+ label: string;
1715
+ className?: string;
1716
+ }
1717
+ /**
1718
+ * The draggable edge of a resizable panel. Place it inside the panel, which
1719
+ * must be `relative`; it straddles the edge, shows a hairline on hover and while
1720
+ * dragging, and is hidden on narrow screens where panels do not resize.
1721
+ */
1722
+ declare function ResizeHandle({ separator, edge, resizing, label, className, }: ResizeHandleProps): React$1.JSX.Element;
1723
+
1724
+ interface ConfirmDialogTexts {
1725
+ title?: string;
1726
+ confirm?: string;
1727
+ cancel?: string;
1728
+ processing?: string;
1729
+ }
1730
+ interface ConfirmDialogProps {
1731
+ open: boolean;
1732
+ onOpenChange: (open: boolean) => void;
1733
+ title?: string;
1734
+ description?: string;
1735
+ confirmText?: string;
1736
+ cancelText?: string;
1737
+ /**
1738
+ * 用于「只需知会一声」的提示:隐藏取消按钮,只留一个确认。
1739
+ * 关掉对话框仍然走 onCancel,调用方据此判断的语义不变。
1740
+ */
1741
+ hideCancel?: boolean;
1742
+ /**
1743
+ * 第三个出口,用于「既不确认、也不是取消」的分支——典型例子是关闭未保存
1744
+ * 文档时的「不保存」:取消是留下继续编辑,它是放弃改动后继续。
1745
+ * 省略时对话框只有确认/取消两个按钮。
1746
+ */
1747
+ alternateText?: string;
1748
+ variant?: 'default' | 'destructive' | 'warning' | 'info';
1749
+ onConfirm?: () => void | Promise<void>;
1750
+ onAlternate?: () => void;
1751
+ onCancel?: () => void;
1752
+ loading?: boolean;
1753
+ texts?: ConfirmDialogTexts;
1754
+ }
1755
+ declare function ConfirmDialog({ open, onOpenChange, title, description, confirmText, cancelText, hideCancel, alternateText, variant, onConfirm, onAlternate, onCancel, loading, texts, }: ConfirmDialogProps): React$1.JSX.Element;
1756
+ /**
1757
+ * 三个出口各自的答案。
1758
+ *
1759
+ * 之所以不是布尔值:关闭未保存文档时「取消」和「不保存」都不是确认,但一个
1760
+ * 是留下继续编辑、一个是丢弃改动后继续,把它们并成 false 就丢掉了区别。
1761
+ */
1762
+ type ConfirmChoice = 'confirm' | 'alternate' | 'cancel';
1763
+ type ConfirmRequest = Omit<ConfirmDialogProps, 'open' | 'onOpenChange'>;
1764
+ declare function useConfirm(): {
1765
+ confirm: (props: ConfirmRequest) => Promise<boolean>;
1766
+ choose: (props: ConfirmRequest) => Promise<ConfirmChoice>;
1767
+ ConfirmDialog: () => React$1.JSX.Element;
1768
+ };
1769
+
1770
+ interface PromptDialogProps {
1771
+ open: boolean;
1772
+ onOpenChange: (open: boolean) => void;
1773
+ title?: string;
1774
+ description?: string;
1775
+ /** Label above the field. Omit for a field the title already explains. */
1776
+ label?: string;
1777
+ placeholder?: string;
1778
+ /** Prefilled and selected on open, so accepting it takes one keystroke. */
1779
+ defaultValue?: string;
1780
+ confirmText?: string;
1781
+ cancelText?: string;
1782
+ /** Allow an empty answer when it has a meaning, such as the root folder. */
1783
+ allowEmpty?: boolean;
1784
+ /** Called with the trimmed value; empty only when `allowEmpty` is enabled. */
1785
+ onConfirm?: (value: string) => void;
1786
+ onCancel?: () => void;
1787
+ }
1788
+ /**
1789
+ * 要一句文本再继续。
1790
+ *
1791
+ * 与 ConfirmDialog 的区别只在多一个输入框,但那点区别决定了它能不能替代
1792
+ * `window.prompt` —— 后者由浏览器绘制、样式不受控,且在部分环境里被直接禁用。
1793
+ */
1794
+ declare function PromptDialog({ open, onOpenChange, title, description, label, placeholder, defaultValue, confirmText, cancelText, allowEmpty, onConfirm, onCancel, }: PromptDialogProps): React$1.JSX.Element;
1795
+ type PromptRequest = Omit<PromptDialogProps, 'open' | 'onOpenChange' | 'onConfirm' | 'onCancel'>;
1796
+ /**
1797
+ * `prompt(...)` 的组件版:返回用户输入的字符串,取消则返回 null。
1798
+ */
1799
+ declare function usePrompt(): {
1800
+ prompt: (request: PromptRequest) => Promise<string | null>;
1801
+ PromptDialog: () => React$1.JSX.Element;
1802
+ };
1803
+
1804
+ interface TypographyProps {
1805
+ borderRadius?: number;
1806
+ fontSize?: number;
1807
+ headerMultiple?: number;
1808
+ lineHeight?: number;
1809
+ marginMultiple?: number;
1810
+ }
1811
+ interface MarkdownProps extends TypographyProps {
1812
+ /** Markdown 内容 */
1813
+ children: string;
1814
+ className?: string;
1815
+ /** 是否启用动画效果(流式输出) */
1816
+ animated?: boolean;
1817
+ /** 是否启用 LaTeX 数学公式 */
1818
+ enableLatex?: boolean;
1819
+ /** 是否启用 Mermaid 图表 */
1820
+ enableMermaid?: boolean;
1821
+ /** 是否启用 GitHub 风格警告 */
1822
+ enableGithubAlert?: boolean;
1823
+ /** 是否启用流式渲染 */
1824
+ enableStream?: boolean;
1825
+ /** 是否显示代码块复制按钮 */
1826
+ showCopyButton?: boolean;
1827
+ /** 变体:default 或 chat */
1828
+ variant?: 'default' | 'chat';
1829
+ /** 自定义组件 */
1830
+ components?: Components;
1831
+ /** 额外的 remark 插件 */
1832
+ remarkPlugins?: Pluggable[];
1833
+ /** 额外的 rehype 插件 */
1834
+ rehypePlugins?: Pluggable[];
1835
+ /** 渲染前改写图片地址(如补上服务端地址与查看者凭据) */
1836
+ transformImageSrc?: (src: string) => string;
1837
+ }
1838
+ declare const MarkdownRenderer: React__default.NamedExoticComponent<MarkdownProps>;
1839
+ /**
1840
+ * The `components` map callers pass to override how a tag renders. Re-exported
1841
+ * because react-markdown is an implementation detail of this package, so a
1842
+ * consumer cannot name the type itself.
1843
+ */
1844
+ type MarkdownComponents = Components;
1845
+
1846
+ /**
1847
+ * 错误边界状态
1848
+ */
1849
+ interface ErrorBoundaryState {
1850
+ hasError: boolean;
1851
+ error: Error | null;
1852
+ errorInfo: React__default.ErrorInfo | null;
1853
+ errorId: string | null;
1854
+ }
1855
+ /**
1856
+ * 错误边界文本配置
1857
+ */
1858
+ interface ErrorBoundaryTexts {
1859
+ title?: string;
1860
+ message?: string;
1861
+ retry?: string;
1862
+ refreshPage?: string;
1863
+ backToHome?: string;
1864
+ errorDetails?: string;
1865
+ pageLoadFailed?: string;
1866
+ blockRenderFailed?: string;
1867
+ componentRenderFailed?: string;
1868
+ }
1869
+ /**
1870
+ * 错误边界属性
1871
+ */
1872
+ interface ErrorBoundaryProps {
1873
+ children: React__default.ReactNode;
1874
+ /** 自定义错误处理函数 */
1875
+ onError?: (error: Error, errorInfo: React__default.ErrorInfo) => void;
1876
+ /** 是否显示详细错误信息(开发环境) */
1877
+ showDetails?: boolean;
1878
+ /** 自定义错误UI */
1879
+ fallback?: React__default.ComponentType<ErrorFallbackProps>;
1880
+ /** 错误级别 */
1881
+ level?: 'page' | 'section' | 'component';
1882
+ /** 组件名称(用于错误追踪) */
1883
+ name?: string;
1884
+ /** 国际化文本 */
1885
+ texts?: ErrorBoundaryTexts;
1886
+ }
1887
+ /**
1888
+ * 错误回退组件属性
1889
+ */
1890
+ interface ErrorFallbackProps {
1891
+ error: Error;
1892
+ errorInfo: React__default.ErrorInfo;
1893
+ resetError: () => void;
1894
+ level: 'page' | 'section' | 'component';
1895
+ name?: string;
1896
+ texts?: ErrorBoundaryTexts;
1897
+ }
1898
+ /**
1899
+ * React错误边界组件
1900
+ */
1901
+ declare class ErrorBoundary extends React__default.Component<ErrorBoundaryProps, ErrorBoundaryState> {
1902
+ constructor(props: ErrorBoundaryProps);
1903
+ static getDerivedStateFromError(error: Error): Partial<ErrorBoundaryState>;
1904
+ componentDidCatch(error: Error, errorInfo: React__default.ErrorInfo): void;
1905
+ /**
1906
+ * 重置错误状态
1907
+ */
1908
+ resetError: () => void;
1909
+ /**
1910
+ * 获取错误严重级别
1911
+ */
1912
+ private getErrorSeverity;
1913
+ render(): string | number | bigint | boolean | React__default.JSX.Element | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | null | undefined;
1914
+ }
1915
+ /**
1916
+ * 高阶组件:为组件添加错误边界
1917
+ */
1918
+ declare function withErrorBoundary<P extends object>(Component: React__default.ComponentType<P>, errorBoundaryProps?: Omit<ErrorBoundaryProps, 'children'>): {
1919
+ (props: P): React__default.JSX.Element;
1920
+ displayName: string;
1921
+ };
1922
+ /**
1923
+ * Hook:在函数组件中使用错误边界
1924
+ */
1925
+ declare function useErrorHandler(texts?: {
1926
+ operationFailed?: string;
1927
+ }): {
1928
+ captureError: (error: Error) => void;
1929
+ resetError: () => void;
1930
+ };
1931
+ /**
1932
+ * Suspense错误边界属性
1933
+ */
1934
+ interface SuspenseErrorBoundaryProps {
1935
+ children: React__default.ReactNode;
1936
+ /** 加载回退组件 */
1937
+ fallback?: React__default.ReactNode;
1938
+ /** 错误边界属性 */
1939
+ errorBoundaryProps?: Omit<ErrorBoundaryProps, 'children'>;
1940
+ /** 加载文本 */
1941
+ loadingText?: string;
1942
+ /** 组件名称(用于错误追踪) */
1943
+ name?: string;
1944
+ /** 是否启用错误边界 */
1945
+ enableErrorBoundary?: boolean;
1946
+ }
1947
+ /**
1948
+ * Suspense错误边界组件
1949
+ * 将Suspense和ErrorBoundary结合,提供完整的异步组件保护
1950
+ */
1951
+ declare function SuspenseErrorBoundary({ children, fallback, errorBoundaryProps, loadingText, name, enableErrorBoundary, }: SuspenseErrorBoundaryProps): React__default.JSX.Element;
1952
+ /**
1953
+ * 页面级Suspense错误边界
1954
+ * 用于页面级别的异步组件保护
1955
+ */
1956
+ declare function PageSuspenseErrorBoundary({ children, fallback, name, texts, }: {
1957
+ children: React__default.ReactNode;
1958
+ fallback?: React__default.ReactNode;
1959
+ name?: string;
1960
+ texts?: ErrorBoundaryTexts;
1961
+ }): React__default.JSX.Element;
1962
+ /**
1963
+ * 区块级Suspense错误边界
1964
+ * 用于页面区块级别的异步组件保护
1965
+ */
1966
+ declare function SectionSuspenseErrorBoundary({ children, fallback, name, className, texts, }: {
1967
+ children: React__default.ReactNode;
1968
+ fallback?: React__default.ReactNode;
1969
+ name?: string;
1970
+ className?: string;
1971
+ texts?: ErrorBoundaryTexts;
1972
+ }): React__default.JSX.Element;
1973
+ /**
1974
+ * 组件级Suspense错误边界
1975
+ * 用于单个组件的异步保护
1976
+ */
1977
+ declare function ComponentSuspenseErrorBoundary({ children, fallback, name, size, }: {
1978
+ children: React__default.ReactNode;
1979
+ fallback?: React__default.ReactNode;
1980
+ name?: string;
1981
+ size?: 'sm' | 'md' | 'lg';
1982
+ }): React__default.JSX.Element;
1983
+ /**
1984
+ * 高阶组件:为异步组件添加Suspense和错误边界
1985
+ */
1986
+ declare function withSuspenseErrorBoundary<P extends object>(Component: React__default.ComponentType<P>, options?: {
1987
+ fallback?: React__default.ReactNode;
1988
+ errorBoundaryProps?: Omit<ErrorBoundaryProps, 'children'>;
1989
+ loadingText?: string;
1990
+ name?: string;
1991
+ }): {
1992
+ (props: P): React__default.JSX.Element;
1993
+ displayName: string;
1994
+ };
1995
+ /**
1996
+ * Hook:用于处理Suspense相关的错误
1997
+ */
1998
+ declare function useSuspenseErrorHandler(componentName?: string): {
1999
+ handleSuspenseError: (error: Error) => void;
2000
+ };
2001
+
2002
+ /**
2003
+ * 错误严重级别
2004
+ */
2005
+ declare enum ErrorSeverity {
2006
+ /** 信息级别 - 不影响功能的提示 */
2007
+ INFO = "info",
2008
+ /** 警告级别 - 可能影响体验但不阻断功能 */
2009
+ WARNING = "warning",
2010
+ /** 错误级别 - 影响当前操作但不影响整体功能 */
2011
+ ERROR = "error",
2012
+ /** 严重级别 - 影响核心功能或导致数据丢失 */
2013
+ CRITICAL = "critical"
2014
+ }
2015
+ /**
2016
+ * 错误分类
2017
+ */
2018
+ declare enum ErrorCategory {
2019
+ /** 网络相关错误 */
2020
+ NETWORK = "network",
2021
+ /** 认证授权错误 */
2022
+ AUTH = "auth",
2023
+ /** 业务逻辑错误 */
2024
+ BUSINESS = "business",
2025
+ /** 数据验证错误 */
2026
+ VALIDATION = "validation",
2027
+ /** 系统错误 */
2028
+ SYSTEM = "system",
2029
+ /** 用户操作错误 */
2030
+ USER = "user",
2031
+ /** 第三方服务错误 */
2032
+ EXTERNAL = "external",
2033
+ /** 未知错误 */
2034
+ UNKNOWN = "unknown"
2035
+ }
2036
+ /**
2037
+ * 错误恢复策略
2038
+ */
2039
+ declare enum ErrorRecoveryStrategy {
2040
+ /** 无需恢复 */
2041
+ NONE = "none",
2042
+ /** 用户可重试 */
2043
+ RETRY = "retry",
2044
+ /** 需要刷新页面 */
2045
+ REFRESH = "refresh",
2046
+ /** 需要重新登录 */
2047
+ REAUTH = "reauth",
2048
+ /** 需要联系支持 */
2049
+ CONTACT_SUPPORT = "contact_support",
2050
+ /** 自动恢复 */
2051
+ AUTO_RECOVER = "auto_recover"
2052
+ }
2053
+ /**
2054
+ * 错误显示模式
2055
+ */
2056
+ declare enum ErrorDisplayMode {
2057
+ /** Toast 通知 */
2058
+ TOAST = "toast",
2059
+ /** 模态对话框 */
2060
+ MODAL = "modal",
2061
+ /** 内联显示 */
2062
+ INLINE = "inline",
2063
+ /** 页面级错误 */
2064
+ PAGE = "page",
2065
+ /** 静默处理(仅记录日志) */
2066
+ SILENT = "silent"
2067
+ }
2068
+ /**
2069
+ * 基础错误接口
2070
+ */
2071
+ interface BaseError {
2072
+ /** 错误唯一标识 */
2073
+ id: string;
2074
+ /** 错误代码 */
2075
+ code: string;
2076
+ /** 错误消息 */
2077
+ message: string;
2078
+ /** 错误分类 */
2079
+ category: ErrorCategory;
2080
+ /** 严重级别 */
2081
+ severity: ErrorSeverity;
2082
+ /** 时间戳 */
2083
+ timestamp: Date;
2084
+ /** 错误来源(组件、服务、API等) */
2085
+ source?: string;
2086
+ /** 错误上下文信息 */
2087
+ context?: Record<string, any>;
2088
+ /** 原始错误对象 */
2089
+ originalError?: Error | unknown;
2090
+ /** 用户友好的错误描述 */
2091
+ userMessage?: string;
2092
+ /** 技术错误详情(仅开发环境显示) */
2093
+ technicalDetails?: string;
2094
+ /** 错误恢复策略 */
2095
+ recoveryStrategy?: ErrorRecoveryStrategy;
2096
+ /** 显示模式 */
2097
+ displayMode?: ErrorDisplayMode;
2098
+ /** 是否可重试 */
2099
+ retryable?: boolean;
2100
+ /** 重试次数 */
2101
+ retryCount?: number;
2102
+ /** 最大重试次数 */
2103
+ maxRetries?: number;
2104
+ /** 是否需要用户确认 */
2105
+ requiresUserAction?: boolean;
2106
+ /** 相关的帮助链接 */
2107
+ helpUrl?: string;
2108
+ /** 错误标签(用于分类和搜索) */
2109
+ tags?: string[];
2110
+ }
2111
+ /**
2112
+ * 错误通知处理器接口
2113
+ */
2114
+ interface ErrorNotificationHandler {
2115
+ /** 显示错误通知 */
2116
+ showError(error: BaseError): Promise<void>;
2117
+ /** 显示警告通知 */
2118
+ showWarning(error: BaseError): Promise<void>;
2119
+ /** 显示信息通知 */
2120
+ showInfo(error: BaseError): Promise<void>;
2121
+ /** 关闭通知 */
2122
+ dismiss(errorId: string): Promise<void>;
2123
+ }
2124
+
2125
+ /**
2126
+ * Toast错误通知处理器
2127
+ * 实现shared包中定义的ErrorNotificationHandler接口
2128
+ */
2129
+ declare class ToastErrorNotificationHandler implements ErrorNotificationHandler {
2130
+ /**
2131
+ * 显示错误通知
2132
+ */
2133
+ showError(error: BaseError): Promise<void>;
2134
+ /**
2135
+ * 显示警告通知
2136
+ */
2137
+ showWarning(error: BaseError): Promise<void>;
2138
+ /**
2139
+ * 显示信息通知
2140
+ */
2141
+ showInfo(error: BaseError): Promise<void>;
2142
+ /**
2143
+ * 关闭通知
2144
+ */
2145
+ dismiss(_errorId: string): Promise<void>;
2146
+ /**
2147
+ * 获取错误标题
2148
+ */
2149
+ private getErrorTitle;
2150
+ /**
2151
+ * 获取错误显示时长
2152
+ */
2153
+ private getErrorDuration;
2154
+ /**
2155
+ * 创建重试动作
2156
+ */
2157
+ private createRetryAction;
2158
+ }
2159
+ /**
2160
+ * 创建Toast错误通知处理器实例
2161
+ */
2162
+ declare function createToastErrorNotificationHandler(): ToastErrorNotificationHandler;
2163
+
2164
+ /**
2165
+ * 错误消息key映射
2166
+ * 将错误代码映射到i18n key路径
2167
+ */
2168
+ declare const ERROR_MESSAGE_KEYS: {
2169
+ readonly NETWORK_ERROR: "errors.network.general";
2170
+ readonly CONNECTION_TIMEOUT: "errors.network.timeout";
2171
+ readonly CONNECTION_FAILED: "errors.network.failed";
2172
+ readonly NETWORK_UNAVAILABLE: "errors.network.unavailable";
2173
+ readonly REQUEST_FAILED: "errors.network.requestFailed";
2174
+ readonly CORS_ERROR: "errors.network.cors";
2175
+ readonly DNS_ERROR: "errors.network.dns";
2176
+ readonly UNAUTHORIZED: "errors.auth.unauthorized";
2177
+ readonly FORBIDDEN: "errors.auth.forbidden";
2178
+ readonly TOKEN_EXPIRED: "errors.auth.tokenExpired";
2179
+ readonly TOKEN_INVALID: "errors.auth.tokenInvalid";
2180
+ readonly LOGIN_REQUIRED: "errors.auth.loginRequired";
2181
+ readonly PERMISSION_DENIED: "errors.auth.permissionDenied";
2182
+ readonly BAD_REQUEST: "errors.http.badRequest";
2183
+ readonly NOT_FOUND: "errors.http.notFound";
2184
+ readonly VALIDATION_ERROR: "errors.http.validationError";
2185
+ readonly RATE_LIMITED: "errors.http.rateLimited";
2186
+ readonly INTERNAL_SERVER_ERROR: "errors.http.internalServerError";
2187
+ readonly BAD_GATEWAY: "errors.http.badGateway";
2188
+ readonly SERVICE_UNAVAILABLE: "errors.http.serviceUnavailable";
2189
+ readonly GATEWAY_TIMEOUT: "errors.http.gatewayTimeout";
2190
+ readonly BUSINESS_RULE_VIOLATION: "errors.business.ruleViolation";
2191
+ readonly OPERATION_NOT_ALLOWED: "errors.business.operationNotAllowed";
2192
+ readonly RESOURCE_CONFLICT: "errors.business.resourceConflict";
2193
+ readonly RESOURCE_NOT_FOUND: "errors.business.resourceNotFound";
2194
+ readonly RESOURCE_ALREADY_EXISTS: "errors.business.resourceAlreadyExists";
2195
+ readonly QUOTA_EXCEEDED: "errors.business.quotaExceeded";
2196
+ readonly REQUIRED_FIELD_MISSING: "errors.validation.requiredFieldMissing";
2197
+ readonly INVALID_FORMAT: "errors.validation.invalidFormat";
2198
+ readonly VALUE_OUT_OF_RANGE: "errors.validation.valueOutOfRange";
2199
+ readonly INVALID_EMAIL: "errors.validation.invalidEmail";
2200
+ readonly INVALID_PASSWORD: "errors.validation.invalidPassword";
2201
+ readonly PASSWORD_TOO_WEAK: "errors.validation.passwordTooWeak";
2202
+ readonly DATABASE_ERROR: "errors.system.database";
2203
+ readonly FILE_SYSTEM_ERROR: "errors.system.fileSystem";
2204
+ readonly MEMORY_ERROR: "errors.system.memory";
2205
+ readonly CONFIGURATION_ERROR: "errors.system.configuration";
2206
+ readonly OPERATION_CANCELLED: "errors.user.operationCancelled";
2207
+ readonly OPERATION_TIMEOUT: "errors.user.operationTimeout";
2208
+ readonly INVALID_OPERATION: "errors.user.invalidOperation";
2209
+ readonly OPERATION_FAILED: "errors.user.operationFailed";
2210
+ readonly EXTERNAL_SERVICE_ERROR: "errors.external.serviceError";
2211
+ readonly EXTERNAL_API_ERROR: "errors.external.apiError";
2212
+ readonly PAYMENT_ERROR: "errors.external.paymentError";
2213
+ readonly EMAIL_SERVICE_ERROR: "errors.external.emailServiceError";
2214
+ readonly FILE_NOT_FOUND: "errors.file.notFound";
2215
+ readonly FILE_TOO_LARGE: "errors.file.tooLarge";
2216
+ readonly FILE_TYPE_NOT_SUPPORTED: "errors.file.typeNotSupported";
2217
+ readonly FILE_UPLOAD_FAILED: "errors.file.uploadFailed";
2218
+ readonly FILE_DOWNLOAD_FAILED: "errors.file.downloadFailed";
2219
+ readonly STORAGE_ERROR: "errors.storage.general";
2220
+ readonly STORAGE_QUOTA_EXCEEDED: "errors.storage.quotaExceeded";
2221
+ readonly STORAGE_UNAVAILABLE: "errors.storage.unavailable";
2222
+ readonly CACHE_ERROR: "errors.storage.cache";
2223
+ readonly REACT_ERROR_BOUNDARY: "errors.react.boundary";
2224
+ readonly COMPONENT_ERROR: "errors.react.component";
2225
+ readonly SUSPENSE_ERROR: "errors.react.suspense";
2226
+ readonly NEXTJS_PAGE_ERROR: "errors.nextjs.page";
2227
+ readonly UNKNOWN_ERROR: "errors.unknown.general";
2228
+ readonly UNEXPECTED_ERROR: "errors.unknown.unexpected";
2229
+ };
2230
+ /**
2231
+ * 后备错误消息(当i18n不可用时使用)
2232
+ */
2233
+ declare const FALLBACK_ERROR_MESSAGES: {
2234
+ readonly zh: {
2235
+ readonly 'errors.network.general': "网络连接失败,请检查网络设置";
2236
+ readonly 'errors.network.timeout': "网络请求超时,请稍后重试";
2237
+ readonly 'errors.network.failed': "网络请求失败";
2238
+ readonly 'errors.network.unavailable': "网络不可用";
2239
+ readonly 'errors.network.requestFailed': "请求失败";
2240
+ readonly 'errors.network.cors': "跨域请求被阻止";
2241
+ readonly 'errors.network.dns': "DNS解析失败";
2242
+ readonly 'errors.auth.unauthorized': "未授权访问,请重新登录";
2243
+ readonly 'errors.auth.forbidden': "权限不足,无法执行此操作";
2244
+ readonly 'errors.auth.tokenExpired': "登录已过期,请重新登录";
2245
+ readonly 'errors.auth.tokenInvalid': "登录状态无效,请重新登录";
2246
+ readonly 'errors.auth.loginRequired': "请先登录";
2247
+ readonly 'errors.auth.permissionDenied': "权限不足";
2248
+ readonly 'errors.http.badRequest': "请求参数有误";
2249
+ readonly 'errors.http.notFound': "资源不存在";
2250
+ readonly 'errors.http.validationError': "数据验证失败";
2251
+ readonly 'errors.http.rateLimited': "请求过于频繁,请稍后重试";
2252
+ readonly 'errors.http.internalServerError': "服务器内部错误";
2253
+ readonly 'errors.http.badGateway': "网关错误";
2254
+ readonly 'errors.http.serviceUnavailable': "服务暂时不可用";
2255
+ readonly 'errors.http.gatewayTimeout': "网关超时";
2256
+ readonly 'errors.business.ruleViolation': "违反业务规则";
2257
+ readonly 'errors.business.operationNotAllowed': "操作不被允许";
2258
+ readonly 'errors.business.resourceConflict': "资源冲突";
2259
+ readonly 'errors.business.resourceNotFound': "资源不存在";
2260
+ readonly 'errors.business.resourceAlreadyExists': "资源已存在";
2261
+ readonly 'errors.business.quotaExceeded': "超出配额限制";
2262
+ readonly 'errors.validation.requiredFieldMissing': "必填字段缺失";
2263
+ readonly 'errors.validation.invalidFormat': "格式不正确";
2264
+ readonly 'errors.validation.valueOutOfRange': "值超出范围";
2265
+ readonly 'errors.validation.invalidEmail': "邮箱格式不正确";
2266
+ readonly 'errors.validation.invalidPassword': "密码格式不正确";
2267
+ readonly 'errors.validation.passwordTooWeak': "密码强度不够";
2268
+ readonly 'errors.system.database': "数据库错误";
2269
+ readonly 'errors.system.fileSystem': "文件系统错误";
2270
+ readonly 'errors.system.memory': "内存不足";
2271
+ readonly 'errors.system.configuration': "配置错误";
2272
+ readonly 'errors.user.operationCancelled': "操作已取消";
2273
+ readonly 'errors.user.operationTimeout': "操作超时";
2274
+ readonly 'errors.user.invalidOperation': "无效操作";
2275
+ readonly 'errors.user.operationFailed': "操作失败";
2276
+ readonly 'errors.external.serviceError': "第三方服务错误";
2277
+ readonly 'errors.external.apiError': "外部API错误";
2278
+ readonly 'errors.external.paymentError': "支付服务错误";
2279
+ readonly 'errors.external.emailServiceError': "邮件服务错误";
2280
+ readonly 'errors.file.notFound': "文件不存在";
2281
+ readonly 'errors.file.tooLarge': "文件过大";
2282
+ readonly 'errors.file.typeNotSupported': "文件类型不支持";
2283
+ readonly 'errors.file.uploadFailed': "文件上传失败";
2284
+ readonly 'errors.file.downloadFailed': "文件下载失败";
2285
+ readonly 'errors.storage.general': "存储错误";
2286
+ readonly 'errors.storage.quotaExceeded': "存储空间不足";
2287
+ readonly 'errors.storage.unavailable': "存储服务不可用";
2288
+ readonly 'errors.storage.cache': "缓存错误";
2289
+ readonly 'errors.react.boundary': "组件渲染错误";
2290
+ readonly 'errors.react.component': "组件错误";
2291
+ readonly 'errors.react.suspense': "组件加载错误";
2292
+ readonly 'errors.nextjs.page': "页面错误";
2293
+ readonly 'errors.unknown.general': "发生未知错误";
2294
+ readonly 'errors.unknown.unexpected': "发生意外错误";
2295
+ };
2296
+ readonly en: {
2297
+ readonly 'errors.network.general': "Network connection failed, please check your network settings";
2298
+ readonly 'errors.network.timeout': "Network request timeout, please try again later";
2299
+ readonly 'errors.network.failed': "Network request failed";
2300
+ readonly 'errors.network.unavailable': "Network unavailable";
2301
+ readonly 'errors.network.requestFailed': "Request failed";
2302
+ readonly 'errors.network.cors': "Cross-origin request blocked";
2303
+ readonly 'errors.network.dns': "DNS resolution failed";
2304
+ readonly 'errors.auth.unauthorized': "Unauthorized access, please login again";
2305
+ readonly 'errors.auth.forbidden': "Insufficient permissions to perform this operation";
2306
+ readonly 'errors.auth.tokenExpired': "Login expired, please login again";
2307
+ readonly 'errors.auth.tokenInvalid': "Invalid login status, please login again";
2308
+ readonly 'errors.auth.loginRequired': "Please login first";
2309
+ readonly 'errors.auth.permissionDenied': "Permission denied";
2310
+ readonly 'errors.http.badRequest': "Invalid request parameters";
2311
+ readonly 'errors.http.notFound': "Resource not found";
2312
+ readonly 'errors.http.validationError': "Data validation failed";
2313
+ readonly 'errors.http.rateLimited': "Too many requests, please try again later";
2314
+ readonly 'errors.http.internalServerError': "Internal server error";
2315
+ readonly 'errors.http.badGateway': "Bad gateway";
2316
+ readonly 'errors.http.serviceUnavailable': "Service temporarily unavailable";
2317
+ readonly 'errors.http.gatewayTimeout': "Gateway timeout";
2318
+ readonly 'errors.business.ruleViolation': "Business rule violation";
2319
+ readonly 'errors.business.operationNotAllowed': "Operation not allowed";
2320
+ readonly 'errors.business.resourceConflict': "Resource conflict";
2321
+ readonly 'errors.business.resourceNotFound': "Resource not found";
2322
+ readonly 'errors.business.resourceAlreadyExists': "Resource already exists";
2323
+ readonly 'errors.business.quotaExceeded': "Quota exceeded";
2324
+ readonly 'errors.validation.requiredFieldMissing': "Required field missing";
2325
+ readonly 'errors.validation.invalidFormat': "Invalid format";
2326
+ readonly 'errors.validation.valueOutOfRange': "Value out of range";
2327
+ readonly 'errors.validation.invalidEmail': "Invalid email format";
2328
+ readonly 'errors.validation.invalidPassword': "Invalid password format";
2329
+ readonly 'errors.validation.passwordTooWeak': "Password too weak";
2330
+ readonly 'errors.system.database': "Database error";
2331
+ readonly 'errors.system.fileSystem': "File system error";
2332
+ readonly 'errors.system.memory': "Out of memory";
2333
+ readonly 'errors.system.configuration': "Configuration error";
2334
+ readonly 'errors.user.operationCancelled': "Operation cancelled";
2335
+ readonly 'errors.user.operationTimeout': "Operation timeout";
2336
+ readonly 'errors.user.invalidOperation': "Invalid operation";
2337
+ readonly 'errors.user.operationFailed': "Operation failed";
2338
+ readonly 'errors.external.serviceError': "External service error";
2339
+ readonly 'errors.external.apiError': "External API error";
2340
+ readonly 'errors.external.paymentError': "Payment service error";
2341
+ readonly 'errors.external.emailServiceError': "Email service error";
2342
+ readonly 'errors.file.notFound': "File not found";
2343
+ readonly 'errors.file.tooLarge': "File too large";
2344
+ readonly 'errors.file.typeNotSupported': "File type not supported";
2345
+ readonly 'errors.file.uploadFailed': "File upload failed";
2346
+ readonly 'errors.file.downloadFailed': "File download failed";
2347
+ readonly 'errors.storage.general': "Storage error";
2348
+ readonly 'errors.storage.quotaExceeded': "Storage quota exceeded";
2349
+ readonly 'errors.storage.unavailable': "Storage service unavailable";
2350
+ readonly 'errors.storage.cache': "Cache error";
2351
+ readonly 'errors.react.boundary': "Component rendering error";
2352
+ readonly 'errors.react.component': "Component error";
2353
+ readonly 'errors.react.suspense': "Component loading error";
2354
+ readonly 'errors.nextjs.page': "Page error";
2355
+ readonly 'errors.unknown.general': "Unknown error occurred";
2356
+ readonly 'errors.unknown.unexpected': "Unexpected error occurred";
2357
+ };
2358
+ };
2359
+ /**
2360
+ * 错误消息文本配置
2361
+ */
2362
+ interface ErrorMessagesTexts {
2363
+ [key: string]: string;
2364
+ }
2365
+ /**
2366
+ * 错误消息Hook选项
2367
+ */
2368
+ interface UseErrorMessagesOptions {
2369
+ /** 默认语言 */
2370
+ defaultLocale?: 'zh' | 'en';
2371
+ /** 自定义翻译函数 */
2372
+ translate?: (key: string, params?: Record<string, any>) => string;
2373
+ /** 自定义错误消息文本 */
2374
+ texts?: ErrorMessagesTexts;
2375
+ }
2376
+ /**
2377
+ * 错误消息Hook返回值
2378
+ */
2379
+ interface UseErrorMessagesReturn {
2380
+ /** 获取错误消息 */
2381
+ getErrorMessage: (error: BaseError | string, params?: Record<string, any>) => string;
2382
+ /** 获取错误标题 */
2383
+ getErrorTitle: (error: BaseError) => string;
2384
+ /** 获取错误描述 */
2385
+ getErrorDescription: (error: BaseError, params?: Record<string, any>) => string;
2386
+ /** 获取错误消息key */
2387
+ getErrorMessageKey: (errorCode: string) => string;
2388
+ }
2389
+ /**
2390
+ * 错误消息国际化Hook
2391
+ * 使用UI翻译系统,支持任何i18n库
2392
+ */
2393
+ declare function useErrorMessages(options?: UseErrorMessagesOptions): UseErrorMessagesReturn;
2394
+ /**
2395
+ * 创建带有特定翻译函数的错误消息Hook
2396
+ */
2397
+ declare function createErrorMessagesHook(t: (key: string, params?: Record<string, any>) => string, defaultLocale?: 'zh' | 'en'): () => UseErrorMessagesReturn;
2398
+
2399
+ declare function cn(...inputs: ClassValue[]): string;
2400
+
2401
+ declare function sanitizeTrustedHtml(html: string): TrustedHTML;
2402
+ declare function sanitizeTrustedSvg(svg: string): TrustedHTML;
2403
+ /** Assign HTML only to a frame whose sandbox isolates scripts from the app. */
2404
+ declare function setSandboxedFrameSrcDoc(frame: HTMLIFrameElement, html: string): void;
2405
+ /**
2406
+ * Markup written back into a page shown by `setSandboxedFrameSrcDoc`, unfiltered
2407
+ * for the same reason the page is: the frame runs no script, and the document
2408
+ * must leave the editor as it arrived.
2409
+ */
2410
+ declare function sandboxedFrameHtml(page: Document, html: string): TrustedHTML | string;
2411
+
2412
+ /**
2413
+ * file-icon — shared mapping from a file (by extension / mime / coarse
2414
+ * category) to a lucide icon plus Tailwind color classes.
2415
+ *
2416
+ * Used by chat attachment previews and the workboard task-result file list so
2417
+ * every surface renders the same type-specific, color-coded file icons.
2418
+ */
2419
+
2420
+ /**
2421
+ * A lucide icon or any custom SVG component. Props mirror the subset of lucide
2422
+ * props that callers actually pass (size/color via Tailwind classes).
2423
+ */
2424
+ type FileIcon = ComponentType<{
2425
+ className?: string;
2426
+ strokeWidth?: string | number;
2427
+ size?: string | number;
2428
+ }>;
2429
+ interface FileIconConfig {
2430
+ icon: FileIcon;
2431
+ /** Tailwind text-color class. */
2432
+ color: string;
2433
+ /** Tailwind background-color class (light + dark). */
2434
+ bgColor: string;
2435
+ }
2436
+ /** Coarse file category used as a fallback when the extension is unknown. */
2437
+ type FileCategory = 'document' | 'text' | 'code' | 'image' | 'audio' | 'video' | 'archive' | 'unknown' | 'file';
2438
+ /** Extract the lowercased extension from a filename or URL (query/hash stripped). */
2439
+ declare function getFileExtension(filename?: string | null): string;
2440
+ interface FileIconOptions {
2441
+ /** MIME type, used as a fallback when the extension is unknown. */
2442
+ mimeType?: string | undefined;
2443
+ /** Coarse category, used as a fallback when the extension is unknown. */
2444
+ category?: FileCategory | undefined;
2445
+ }
2446
+ /**
2447
+ * Resolve a file's icon + color. Resolution order: extension, then explicit
2448
+ * category, then MIME type, then a neutral default.
2449
+ */
2450
+ declare function getFileIconConfig(filename?: string | null, options?: FileIconOptions): FileIconConfig;
2451
+
2452
+ /**
2453
+ * file-type-icons — custom SVG glyphs for file formats that lucide-react does
2454
+ * not ship a dedicated icon for (PDF, Word). They share lucide's 24x24 box and
2455
+ * use `currentColor` for the page fill so the surrounding text-color class still
2456
+ * drives the tint; the format label is rendered in white so it reads on both
2457
+ * light and dark surfaces.
2458
+ */
2459
+ declare function PdfFileIcon({ className }: {
2460
+ className?: string | undefined;
2461
+ }): React$1.JSX.Element;
2462
+ declare function DocFileIcon({ className }: {
2463
+ className?: string | undefined;
2464
+ }): React$1.JSX.Element;
2465
+
2466
+ /** Byte count as a short human string, e.g. `36.8 KB`. */
2467
+ declare function formatFileSize(bytes: number): string;
2468
+
2469
+ /**
2470
+ * 应用错误类
2471
+ * 提供统一的错误创建和处理接口
2472
+ */
2473
+ declare class AppError extends Error implements BaseError {
2474
+ readonly id: string;
2475
+ readonly code: string;
2476
+ readonly category: ErrorCategory;
2477
+ readonly severity: ErrorSeverity;
2478
+ readonly timestamp: Date;
2479
+ readonly source?: string;
2480
+ readonly context?: Record<string, any>;
2481
+ readonly originalError?: Error | unknown;
2482
+ readonly userMessage?: string;
2483
+ readonly technicalDetails?: string;
2484
+ readonly recoveryStrategy?: ErrorRecoveryStrategy;
2485
+ readonly displayMode?: ErrorDisplayMode;
2486
+ readonly retryable?: boolean;
2487
+ readonly retryCount?: number;
2488
+ readonly maxRetries?: number;
2489
+ readonly requiresUserAction?: boolean;
2490
+ readonly helpUrl?: string;
2491
+ readonly tags?: string[];
2492
+ constructor(options: {
2493
+ code: string;
2494
+ message: string;
2495
+ category: ErrorCategory;
2496
+ severity?: ErrorSeverity;
2497
+ source?: string;
2498
+ context?: Record<string, any>;
2499
+ originalError?: Error | unknown;
2500
+ userMessage?: string;
2501
+ technicalDetails?: string;
2502
+ recoveryStrategy?: ErrorRecoveryStrategy;
2503
+ displayMode?: ErrorDisplayMode;
2504
+ retryable?: boolean;
2505
+ maxRetries?: number;
2506
+ requiresUserAction?: boolean;
2507
+ helpUrl?: string;
2508
+ tags?: string[];
2509
+ });
2510
+ /**
2511
+ * 生成唯一错误ID
2512
+ */
2513
+ private generateErrorId;
2514
+ /**
2515
+ * 创建网络错误
2516
+ */
2517
+ static createNetworkError(options: {
2518
+ code: string;
2519
+ message: string;
2520
+ originalError?: Error | unknown;
2521
+ url?: string;
2522
+ method?: string;
2523
+ timeout?: number;
2524
+ }): AppError;
2525
+ /**
2526
+ * 创建认证错误
2527
+ */
2528
+ static createAuthError(options: {
2529
+ code: string;
2530
+ message: string;
2531
+ originalError?: Error | unknown;
2532
+ }): AppError;
2533
+ /**
2534
+ * 创建业务错误
2535
+ */
2536
+ static createBusinessError(options: {
2537
+ code: string;
2538
+ message: string;
2539
+ userMessage?: string;
2540
+ context?: Record<string, any>;
2541
+ severity?: ErrorSeverity;
2542
+ }): AppError;
2543
+ /**
2544
+ * 创建验证错误
2545
+ */
2546
+ static createValidationError(options: {
2547
+ code: string;
2548
+ message: string;
2549
+ field?: string;
2550
+ rule?: string;
2551
+ expectedValue?: any;
2552
+ actualValue?: any;
2553
+ }): AppError;
2554
+ /**
2555
+ * 创建系统错误
2556
+ */
2557
+ static createSystemError(options: {
2558
+ code: string;
2559
+ message: string;
2560
+ originalError?: Error | unknown;
2561
+ technicalDetails?: string;
2562
+ }): AppError;
2563
+ /**
2564
+ * 创建用户操作错误
2565
+ */
2566
+ static createUserError(options: {
2567
+ code: string;
2568
+ message: string;
2569
+ userMessage: string;
2570
+ context?: Record<string, any>;
2571
+ }): AppError;
2572
+ /**
2573
+ * 从原生Error创建AppError
2574
+ */
2575
+ static fromError(error: Error, options?: {
2576
+ code?: string;
2577
+ category?: ErrorCategory;
2578
+ severity?: ErrorSeverity;
2579
+ context?: Record<string, any>;
2580
+ }): AppError;
2581
+ /**
2582
+ * 从未知错误创建AppError
2583
+ */
2584
+ static fromUnknown(error: unknown, options?: {
2585
+ code?: string;
2586
+ category?: ErrorCategory;
2587
+ severity?: ErrorSeverity;
2588
+ context?: Record<string, any>;
2589
+ }): AppError;
2590
+ /**
2591
+ * 检查是否为AppError实例
2592
+ */
2593
+ static isAppError(error: unknown): error is AppError;
2594
+ /**
2595
+ * 创建错误的副本,增加重试次数
2596
+ */
2597
+ withRetry(): AppError;
2598
+ /**
2599
+ * 获取用户可见的错误消息
2600
+ */
2601
+ getUserMessage(): string;
2602
+ /**
2603
+ * 获取技术详情
2604
+ */
2605
+ getTechnicalDetails(): string | undefined;
2606
+ /**
2607
+ * 检查是否可以重试
2608
+ */
2609
+ canRetry(): boolean;
2610
+ /**
2611
+ * 序列化错误信息
2612
+ */
2613
+ toJSON(): Record<string, any>;
2614
+ /**
2615
+ * 转换为字符串表示
2616
+ */
2617
+ toString(): string;
2618
+ }
2619
+
2620
+ interface PaginationInfo {
2621
+ page: number;
2622
+ limit: number;
2623
+ total: number;
2624
+ totalPages: number;
2625
+ hasNext?: boolean;
2626
+ hasPrev?: boolean;
2627
+ offset?: number;
2628
+ }
2629
+ interface PaginationTexts {
2630
+ showing?: string;
2631
+ itemsPerPage?: string;
2632
+ firstPage?: string;
2633
+ previous?: string;
2634
+ next?: string;
2635
+ lastPage?: string;
2636
+ }
2637
+ interface PaginationProps {
2638
+ pagination: PaginationInfo;
2639
+ onPageChange: (offset: number) => void;
2640
+ onPageSizeChange: (pageSize: number) => void;
2641
+ pageSizeOptions?: number[];
2642
+ showPageSizeSelector?: boolean;
2643
+ showPageInfo?: boolean;
2644
+ className?: string;
2645
+ texts?: PaginationTexts;
2646
+ }
2647
+ declare const Pagination: React$1.ForwardRefExoticComponent<PaginationProps & React$1.RefAttributes<HTMLDivElement>>;
2648
+
2649
+ interface DataTableColumn<T = any> {
2650
+ key: string;
2651
+ title: string;
2652
+ dataIndex?: keyof T;
2653
+ render?: (value: any, record: T, index: number) => React$1.ReactNode;
2654
+ sortable?: boolean;
2655
+ width?: string | number;
2656
+ align?: 'left' | 'center' | 'right';
2657
+ className?: string;
2658
+ }
2659
+ /** Which column the data is ordered by, and which way. */
2660
+ interface DataTableSort {
2661
+ key: string;
2662
+ direction: SortDirection;
2663
+ }
2664
+ interface DataTableFilter {
2665
+ key: string;
2666
+ label: string;
2667
+ options: Array<{
2668
+ label: string;
2669
+ value: string;
2670
+ }>;
2671
+ value: string;
2672
+ onChange: (value: string) => void;
2673
+ }
2674
+ interface DataTableTexts {
2675
+ search?: string;
2676
+ refresh?: string;
2677
+ noData?: string;
2678
+ loading?: string;
2679
+ itemsPerPage?: string;
2680
+ page?: string;
2681
+ of?: string;
2682
+ items?: string;
2683
+ previous?: string;
2684
+ next?: string;
2685
+ firstPage?: string;
2686
+ lastPage?: string;
2687
+ showing?: string;
2688
+ }
2689
+ interface DataTableProps<T = any> {
2690
+ data: T[];
2691
+ columns: DataTableColumn<T>[];
2692
+ loading?: boolean;
2693
+ pagination?: PaginationInfo;
2694
+ onPageChange?: (offset: number) => void;
2695
+ onPageSizeChange?: (pageSize: number) => void;
2696
+ searchable?: boolean;
2697
+ searchValue?: string;
2698
+ onSearchChange?: (value: string) => void;
2699
+ searchPlaceholder?: string;
2700
+ filters?: DataTableFilter[];
2701
+ /**
2702
+ * 排序相关。列上的 `sortable` 只在这两个都给了时才起作用——排序是把参数交给
2703
+ * 数据源,不是在当前这一页里重排(那样只排到本页的几十行,翻页就自相矛盾)。
2704
+ */
2705
+ sort?: DataTableSort | null;
2706
+ onSortChange?: (sort: DataTableSort) => void;
2707
+ actions?: React$1.ReactNode;
2708
+ /** Composed toolbar replaces the default search, filters, and actions. */
2709
+ toolbar?: React$1.ReactNode;
2710
+ rowSelection?: {
2711
+ selectedKeys: string[];
2712
+ onChange: (keys: string[]) => void;
2713
+ label?: string;
2714
+ };
2715
+ className?: string;
2716
+ tableClassName?: string;
2717
+ emptyText?: string;
2718
+ emptyIcon?: React$1.ReactNode;
2719
+ emptyActions?: React$1.ReactNode;
2720
+ rowKey?: keyof T | ((record: T) => string);
2721
+ onRowClick?: (record: T, index: number) => void;
2722
+ rowClassName?: string | ((record: T, index: number) => string);
2723
+ texts?: DataTableTexts;
2724
+ }
2725
+ declare function DataTable<T = any>({ data, columns, loading, pagination, onPageChange, onPageSizeChange, searchable, searchValue, onSearchChange, searchPlaceholder, filters, sort, onSortChange, actions, toolbar, rowSelection, className, tableClassName, emptyText, emptyIcon, emptyActions, rowKey, onRowClick, rowClassName, texts, }: DataTableProps<T>): React$1.JSX.Element;
2726
+
2727
+ /**
2728
+ * AudioPlayer — chat-bubble inline audio player.
2729
+ *
2730
+ * Visual structure (full mode):
2731
+ *
2732
+ * ┌────────────────────────────────────────────────────────┐
2733
+ * │ ▶ ━━━━━●━━━━━━━━━━━━━━━━━━ 0:08 / 1:24 ♪ ⤓ │
2734
+ * └────────────────────────────────────────────────────────┘
2735
+ *
2736
+ * Notes
2737
+ * -----
2738
+ * • The card shares a visual language with `VideoPlayer` — same border,
2739
+ * radius and accent — so audio and video bubbles feel like siblings.
2740
+ * • Single-row layout: play / seek / time / mute / download. The
2741
+ * filename row was removed because the dominant call site
2742
+ * (TTS-synthesized voice in the chat transcript) carries an
2743
+ * auto-generated `voice-<ts>.mp3` filename that adds noise without
2744
+ * information; the filename remains accessible via the download
2745
+ * `aria-label` / `title` for screen readers and tooltip hover.
2746
+ * • Compact mode (used by `VoiceBubble`-adjacent surfaces) drops
2747
+ * the secondary controls and uses a pill silhouette.
2748
+ * • The actual `<audio>` element stays hidden so we can render a fully
2749
+ * custom transport (better contrast, theme-aware accent, no native
2750
+ * "right-click → Save audio" menu that bypasses our download glyph).
2751
+ */
2752
+
2753
+ interface AudioPlayerProps {
2754
+ src: string;
2755
+ /** 文件名(用作下载文件名 + 下载按钮的 a11y label / hover tooltip) */
2756
+ title?: string;
2757
+ /** 文件大小(字节) — 当前 UI 不直接显示,保留供未来 hover 详情使用 */
2758
+ size?: number;
2759
+ /** MIME 类型 — 当前 UI 不直接显示,保留供未来 hover 详情使用 */
2760
+ mimeType?: string;
2761
+ /** 初始时长(秒),用于在 metadata 加载前展示 */
2762
+ durationSeconds?: number;
2763
+ className?: string;
2764
+ /** 紧凑模式(VoiceBubble 等场景使用,仅保留单行播放条) */
2765
+ compact?: boolean;
2766
+ /** 是否显示下载按钮(默认 true,compact 模式下默认 false) */
2767
+ downloadable?: boolean;
2768
+ /**
2769
+ * 自定义下载处理。传入时下载按钮渲染为 `<button>` 并调用此回调,
2770
+ * 而不是裸 `<a href download>`。Tauri webview 下裸 `<a>` 指向
2771
+ * `tauri://localhost/...` 无法触发文件下载,需要走宿主的下载流程。
2772
+ */
2773
+ onDownload?: () => void;
2774
+ /**
2775
+ * 外部跳转播放位置。`requestId` 每次请求都要变,否则连续两次跳到同一
2776
+ * 秒数时 effect 不会重跑。调用方不要改用 `key` 强制重挂载来跳转 ——
2777
+ * 那会把正在播放的音频打断、进度归零。
2778
+ */
2779
+ seekTo?: {
2780
+ seconds: number;
2781
+ requestId: number;
2782
+ };
2783
+ }
2784
+ declare function AudioPlayer({ src, title, size: _size, mimeType: _mimeType, durationSeconds, className, compact, downloadable, onDownload, seekTo, }: AudioPlayerProps): React__default.JSX.Element;
2785
+
2786
+ /**
2787
+ * VideoPlayer — chat-bubble inline video.
2788
+ *
2789
+ * Sibling component to `AudioPlayer`. We keep the same outer card chrome
2790
+ * (rounded border, gradient surface, subtle shadow) so audio and video
2791
+ * attachments inside an assistant bubble feel like a unified family
2792
+ * rather than three different ad-hoc widgets.
2793
+ *
2794
+ * ┌──────────────────────────────────────────────────────┐
2795
+ * │ │
2796
+ * │ ▶ video preview │
2797
+ * │ │
2798
+ * ├──────────────────────────────────────────────────────┤
2799
+ * │ intro.mp4 · MP4 · 4.3 MB ⤓ │
2800
+ * └──────────────────────────────────────────────────────┘
2801
+ *
2802
+ * `gifPlayback` mode strips chrome and renders a bare looping muted
2803
+ * `<video>` so a "GIF-like" video clip behaves like an animated image.
2804
+ */
2805
+
2806
+ interface VideoPlayerProps {
2807
+ src: string;
2808
+ poster?: string;
2809
+ /** 文件名(meta 行;下载文件名) */
2810
+ title?: string;
2811
+ /** 文件大小(字节) */
2812
+ size?: number;
2813
+ /** MIME 类型(用于 type 标签兜底) */
2814
+ mimeType?: string;
2815
+ className?: string;
2816
+ /** 最大高度(用于消息气泡内排版) */
2817
+ maxHeight?: number | string;
2818
+ /** 是否循环播放(gifPlayback 时启用) */
2819
+ loop?: boolean;
2820
+ /** 是否静音 */
2821
+ muted?: boolean;
2822
+ /** 自动播放(gifPlayback 时启用) */
2823
+ autoPlay?: boolean;
2824
+ /** 显示控件(默认 true;gifPlayback 时通常关闭) */
2825
+ controls?: boolean;
2826
+ /** 是否显示底部 meta + 下载行(默认 true,gifPlayback / 无 controls 时为 false) */
2827
+ showMeta?: boolean;
2828
+ /** 显式控制下载按钮可见性 */
2829
+ downloadable?: boolean;
2830
+ /**
2831
+ * 自定义下载处理。传入时下载按钮渲染为 `<button>` 并调用此回调,
2832
+ * 而不是裸 `<a href download>`。Tauri webview 下裸 `<a>` 指向
2833
+ * `tauri://localhost/...` 无法触发文件下载,需要走宿主的下载流程。
2834
+ */
2835
+ onDownload?: () => void;
2836
+ }
2837
+ declare function VideoPlayer({ src, poster, title, size, mimeType, className, maxHeight, loop, muted, autoPlay, controls, showMeta, downloadable, onDownload, }: VideoPlayerProps): React__default.JSX.Element;
2838
+
2839
+ interface VoiceBubbleProps {
2840
+ src: string;
2841
+ /** 初始时长(秒) */
2842
+ durationSeconds?: number;
2843
+ className?: string;
2844
+ /** 消息是否由当前用户发送(影响颜色) */
2845
+ isOwn?: boolean;
2846
+ }
2847
+ /** 语音气泡:圆形播放按钮 + 波形条 + 时长。 */
2848
+ declare function VoiceBubble({ src, durationSeconds, className, isOwn, }: VoiceBubbleProps): React__default.JSX.Element;
2849
+
2850
+ interface AnimatedImagePreviewProps {
2851
+ src: string;
2852
+ alt?: string;
2853
+ className?: string;
2854
+ /** 最大高度(像素) */
2855
+ maxHeight?: number | string;
2856
+ }
2857
+ /**
2858
+ * 动图预览:浏览器原生渲染 GIF/动态 WebP/APNG。
2859
+ * 兜底:加载失败时显示 fallback 占位符。
2860
+ *
2861
+ * 注意:若需要将动图表示为 gifPlayback 视频,请使用 VideoPlayer。
2862
+ */
2863
+ declare function AnimatedImagePreview({ src, alt, className, maxHeight, }: AnimatedImagePreviewProps): React__default.JSX.Element;
2864
+
2865
+ /**
2866
+ * 共享媒体工具 - 时长格式化、回退处理。
2867
+ */
2868
+ declare function formatMediaDuration(seconds: number | undefined): string;
2869
+
2870
+ /** Shared, responsive native-currency series chart. Data values are also accessible as a list. */
2871
+ declare function SummaryTrendChart({ data, label, className, }: {
2872
+ data: {
2873
+ label: string;
2874
+ values: number[];
2875
+ }[];
2876
+ label: string;
2877
+ className?: string;
2878
+ }): React$1.JSX.Element;
2879
+ declare function SummaryDistributionChart({ data, label, }: {
2880
+ data: {
2881
+ label: string;
2882
+ value: number;
2883
+ }[];
2884
+ label: string;
2885
+ }): React$1.JSX.Element;
2886
+
2887
+ interface FunnelChartItem {
2888
+ id: string;
2889
+ label: string;
2890
+ value: number;
2891
+ detail?: string;
2892
+ tone?: 'default' | 'success' | 'warning' | 'destructive';
2893
+ }
2894
+ /**
2895
+ * Stage volumes, drawn as a proportional funnel, bars, or a process funnel.
2896
+ * The process funnel preserves the business meaning of a sales funnel: active
2897
+ * stages narrow toward the successful outcome, while exit outcomes are shown
2898
+ * separately instead of pretending to be later steps in the process.
2899
+ *
2900
+ * Hovering or focusing a stage lifts the whole row — band, name, and figures —
2901
+ * and repeats the figures in a tooltip, which is what the band is for on a
2902
+ * narrow viewport where the number column has scrolled out of sight.
2903
+ */
2904
+ declare function FunnelChart({ data, label, onSelect, className, shape, resultLabel, }: {
2905
+ data: FunnelChartItem[];
2906
+ label: string;
2907
+ onSelect?: (id: string) => void;
2908
+ className?: string;
2909
+ resultLabel?: string;
2910
+ /**
2911
+ * `funnel` sizes slices by value; `bars` shows independent stage volumes.
2912
+ * `stages` keeps a fixed process funnel and separates exit outcomes.
2913
+ */
2914
+ shape?: 'funnel' | 'bars' | 'stages';
2915
+ }): React$1.JSX.Element;
2916
+
2917
+ type ComboTone = 'primary' | 'success' | 'warning' | 'destructive' | 'accent' | 'muted';
2918
+ interface ComboSeries {
2919
+ key: string;
2920
+ label: string;
2921
+ tone: ComboTone;
2922
+ kind: 'bar' | 'line';
2923
+ /** Lines in another unit (a rate beside amounts) read off the right axis. */
2924
+ axis?: 'left' | 'right';
2925
+ /** A comparison or a target rather than the figure itself. */
2926
+ dashed?: boolean;
2927
+ }
2928
+ interface ComboDatum {
2929
+ key: string;
2930
+ label: string;
2931
+ /** The full name of the bucket for the tooltip, e.g. a date range. */
2932
+ detail?: string;
2933
+ /** One value per series, in series order; null is a gap, not a zero. */
2934
+ values: (number | null)[];
2935
+ }
2936
+ interface ComboChartProps {
2937
+ data: ComboDatum[];
2938
+ series: ComboSeries[];
2939
+ label: string;
2940
+ missingLabel: string;
2941
+ formatValue?: (value: number, series: ComboSeries) => string;
2942
+ formatAxis?: (value: number, axis: 'left' | 'right') => string;
2943
+ /** Clicking a bar or a point, e.g. to drill into the rows behind it. */
2944
+ onSelect?: (datum: ComboDatum, series: ComboSeries) => void;
2945
+ className?: string;
2946
+ }
2947
+ /**
2948
+ * Bars and lines over the same buckets — this period's amount as bars, last
2949
+ * period's as a dashed line, a rate on its own axis. Every mark has a tooltip
2950
+ * and, given `onSelect`, is a button into the rows behind it.
2951
+ */
2952
+ declare function ComboChart({ data, series, label, missingLabel, formatValue, formatAxis, onSelect, className, }: ComboChartProps): React$1.JSX.Element;
2953
+
2954
+ /**
2955
+ * Axis arithmetic shared by the SVG charts: a range that includes zero and
2956
+ * ends on round numbers, and the ticks along it.
2957
+ *
2958
+ * Zero is always on the axis. A bar that starts anywhere else misstates its
2959
+ * size, and business figures cross zero (reversals, refunds) often enough
2960
+ * that the axis has to make room below it rather than clip.
2961
+ */
2962
+ interface ChartScale {
2963
+ min: number;
2964
+ max: number;
2965
+ ticks: number[];
2966
+ }
2967
+ /**
2968
+ * A scale covering every finite value and zero, on round ticks. Missing
2969
+ * values (null, NaN) are ignored; with nothing to show the axis is 0–1.
2970
+ */
2971
+ declare function chartScale(values: readonly (number | null | undefined)[], tickCount?: number): ChartScale;
2972
+ /** Where `value` falls on a scale, from 0 (bottom) to 1 (top). */
2973
+ declare function scaleFraction(scale: ChartScale, value: number): number;
2974
+ interface WaterfallStep {
2975
+ key: string;
2976
+ label: string;
2977
+ value: number;
2978
+ /** `total` stands on the axis; the others float from the running sum. */
2979
+ kind: 'total' | 'increase' | 'decrease';
2980
+ }
2981
+ interface WaterfallBar extends WaterfallStep {
2982
+ /** Bottom and top of the bar, in data units. */
2983
+ from: number;
2984
+ to: number;
2985
+ }
2986
+ /**
2987
+ * Bars for a waterfall: totals from zero, each change from where the last
2988
+ * one left the running sum. A decrease is given as a positive amount.
2989
+ */
2990
+ declare function waterfallBars(steps: readonly WaterfallStep[]): WaterfallBar[];
2991
+
2992
+ interface WaterfallChartProps {
2993
+ steps: WaterfallStep[];
2994
+ label: string;
2995
+ formatValue?: (value: number) => string;
2996
+ onSelect?: (step: WaterfallStep) => void;
2997
+ className?: string;
2998
+ }
2999
+ /**
3000
+ * How a balance got from its opening to its closing figure: the opening
3001
+ * total, each increase and decrease floating from the running sum, the
3002
+ * closing total. Decreases are passed as positive amounts.
3003
+ */
3004
+ declare function WaterfallChart({ steps, label, formatValue, onSelect, className, }: WaterfallChartProps): React$1.JSX.Element;
3005
+
3006
+ interface SparklineProps {
3007
+ values: readonly (number | null)[];
3008
+ /** The comparison period, drawn faint behind the current one. */
3009
+ previous?: readonly (number | null)[] | null;
3010
+ /** The accessible name: what the line shows. */
3011
+ label: string;
3012
+ className?: string;
3013
+ }
3014
+ /**
3015
+ * A trend in the space of a word, for a metric card. Missing points break
3016
+ * the line rather than dropping it to zero; buckets still to come are null.
3017
+ */
3018
+ declare function Sparkline({ values, previous, label, className, }: SparklineProps): React$1.JSX.Element;
3019
+
3020
+ /** Inclusive `YYYY-MM-DD` bounds. */
3021
+ interface DateRangeValue {
3022
+ start: string;
3023
+ end: string;
3024
+ }
3025
+ interface DateRangePickerProps {
3026
+ value?: DateRangeValue | null;
3027
+ onChange: (value: DateRangeValue) => void;
3028
+ placeholder?: string;
3029
+ locale?: CalendarProps['locale'];
3030
+ labels?: CalendarProps['labels'];
3031
+ weekStartsOn?: CalendarProps['weekStartsOn'];
3032
+ formatDisplay?: (value: DateRangeValue) => string;
3033
+ disabled?: boolean;
3034
+ 'aria-label'?: string;
3035
+ className?: string;
3036
+ }
3037
+ /**
3038
+ * Picks a custom period. The range is only reported once both ends are
3039
+ * chosen, so a half-picked range never reaches a query.
3040
+ */
3041
+ declare function DateRangePicker({ value, onChange, placeholder, locale, labels, weekStartsOn, formatDisplay, disabled, className, ...aria }: DateRangePickerProps): React$1.JSX.Element;
3042
+
3043
+ interface StageStepperItem {
3044
+ id: string;
3045
+ label: string;
3046
+ /** Shown on hover — what a rep should be doing at this stage. */
3047
+ hint?: string | undefined;
3048
+ /** A stage that can be moved to from the current one. */
3049
+ reachable?: boolean | undefined;
3050
+ }
3051
+ interface StageStepperProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, 'onSelect'> {
3052
+ items: StageStepperItem[];
3053
+ /** The stage the record sits in; earlier items render as passed. */
3054
+ currentId: string | null;
3055
+ /**
3056
+ * How the current stage should look. `open` is the ordinary case; a closed
3057
+ * record colours the whole track by its outcome.
3058
+ */
3059
+ outcome?: 'open' | 'won' | 'lost' | undefined;
3060
+ onSelect?: ((id: string) => void) | undefined;
3061
+ disabled?: boolean | undefined;
3062
+ }
3063
+ /**
3064
+ * A horizontal stage track: passed stages filled, the current one bold, the
3065
+ * ones ahead muted. Only reachable stages are clickable — the caller decides
3066
+ * what a click means (a direct move or a handoff form).
3067
+ */
3068
+ declare function StageStepper({ items, currentId, outcome, onSelect, disabled, className, ...props }: StageStepperProps): React$1.JSX.Element;
3069
+
3070
+ interface KeyMetricItem {
3071
+ label: string;
3072
+ /** The figure or name. `null`/`undefined` renders as an em dash. */
3073
+ value: React$1.ReactNode;
3074
+ /** A second line under the value — a currency, a date, a qualifier. */
3075
+ hint?: string | undefined;
3076
+ /** Below the hint: a progress bar, a sparkline, a badge. */
3077
+ footer?: React$1.ReactNode;
3078
+ /** Makes the value a link to somewhere else in the app. */
3079
+ onClick?: (() => void) | undefined;
3080
+ }
3081
+ interface KeyMetricBarProps extends React$1.HTMLAttributes<HTMLDivElement> {
3082
+ items: KeyMetricItem[];
3083
+ /**
3084
+ * `sm` for a record header, where the bar sits above the fields it
3085
+ * summarises; `lg` for a dashboard, where the figures are the page.
3086
+ */
3087
+ size?: 'sm' | 'lg';
3088
+ }
3089
+ /**
3090
+ * A row of the few numbers a record is judged by, for the top of a detail
3091
+ * view: amount, stage, owner, close date. Cells share one border and wrap to
3092
+ * a grid on narrow screens rather than shrinking the figures.
3093
+ */
3094
+ declare function KeyMetricBar({ items, size, className, ...rest }: KeyMetricBarProps): React$1.JSX.Element;
3095
+
3096
+ interface FilterToolbarProps extends HTMLAttributes<HTMLDivElement> {
3097
+ onReset?: (() => void) | undefined;
3098
+ resetLabel?: string;
3099
+ }
3100
+ /** Search and filters share one responsive surface; active filters can be cleared together. */
3101
+ declare function FilterToolbar({ children, className, onReset, resetLabel, ...props }: FilterToolbarProps): React$1.JSX.Element;
3102
+
3103
+ /**
3104
+ * The drag payload's type, exported because a board is not always built from
3105
+ * `KanbanColumn` and `KanbanItem`. A board with its own column layout still
3106
+ * has to name the same MIME type and put `{ id, column }` in it, and a second
3107
+ * copy of that string is how two boards stop interoperating.
3108
+ */
3109
+ declare const KANBAN_DRAG_MIME = "application/x-tego-kanban";
3110
+ declare function KanbanBoard({ children, label, navigation, fillHeight, }: {
3111
+ children: ReactNode;
3112
+ label: string;
3113
+ navigation?: {
3114
+ previous: string;
3115
+ next: string;
3116
+ };
3117
+ fillHeight?: boolean;
3118
+ }): React$1.JSX.Element;
3119
+ declare function KanbanColumn({ id, title, summary, children, onMove, disabled, }: {
3120
+ id: string;
3121
+ title: ReactNode;
3122
+ summary?: ReactNode;
3123
+ children: ReactNode;
3124
+ disabled?: boolean;
3125
+ onMove: (itemId: string, fromColumn: string, toColumn: string) => void;
3126
+ }): React$1.JSX.Element;
3127
+ declare function KanbanItem({ id, column, children, disabled, label, }: {
3128
+ id: string;
3129
+ column: string;
3130
+ children: ReactNode;
3131
+ disabled?: boolean;
3132
+ label: string;
3133
+ }): React$1.JSX.Element;
3134
+
3135
+ /** Viewport positioning without leaving the containing dialog's focus boundary. */
3136
+ declare function ViewportLayer({ children, }: {
3137
+ children: (container: HTMLDivElement) => ReactNode;
3138
+ }): React$1.JSX.Element;
3139
+
3140
+ interface ModuleNavigationItem {
3141
+ id: string;
3142
+ label: string;
3143
+ href: string;
3144
+ icon?: ReactNode;
3145
+ }
3146
+ interface ModuleNavigationProps {
3147
+ label: string;
3148
+ icon?: ReactNode;
3149
+ items: ModuleNavigationItem[];
3150
+ utilityItems?: ModuleNavigationItem[];
3151
+ current: string;
3152
+ onNavigate?(event: MouseEvent<HTMLAnchorElement>, id: string): void;
3153
+ }
3154
+ /** Module destinations stay separate from the host sidebar and page-level views. */
3155
+ declare function ModuleNavigation({ label, icon, items, utilityItems, current, onNavigate, }: ModuleNavigationProps): React$1.JSX.Element;
3156
+
3157
+ export { Alert, AlertDescription, AlertTitle, AnimatedImagePreview, type AnimatedImagePreviewProps, AppError, AudioPlayer, type AudioPlayerProps, Avatar, AvatarFallback, AvatarImage$1 as AvatarImage, Badge, AvatarImage as BaseAvatarImage, type BaseError, BoardColumnsSkeleton, Breadcrumb, type BreadcrumbItem, Button, CHART_SERIES_TOKENS, Calendar, CandidateCardSkeleton, CapabilityTag, type CapabilityTagProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardListSkeleton, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type CarouselProps, CascadingTreeSelect, type CascadingTreeSelectProps, type ChartScale, type CheckInfo, type CheckState, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, ComboChart, type ComboChartProps, type ComboDatum, type ComboSeries, type ComboTone, Combobox, type ComboboxOption, type ComboboxProps, ComponentSuspenseErrorBoundary, type ConfirmChoice, ConfirmDialog, type ConfirmDialogProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuSeparator, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataTable, type DataTableColumn, type DataTableFilter, type DataTableProps, type DataTableSort, type DataTableTexts, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, type DateRangeValue, DeltaIndicator, type DeltaIndicatorProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DocFileIcon, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ERROR_MESSAGE_KEYS, EmployeeCardSkeleton, EmptyState, EnhancedInput, ErrorBoundary, ErrorCategory, ErrorDisplayMode, type ErrorFallbackProps, type ErrorNotificationHandler, ErrorRecoveryStrategy, ErrorSeverity, FALLBACK_ERROR_MESSAGES, type FileCategory, type FileIcon, type FileIconConfig, type FileIconOptions, FileListRow, type FileListRowProps, FileUpload, type FileUploadProps, type FilterChip, FilterChipRail, type FilterChipRailProps, FilterToolbar, type FilterToolbarProps, FormWizard, FormWizardNavigation, FormWizardStep, FunnelChart, type FunnelChartItem, HeroSearch, type HeroSearchProps, HoverCard, HoverCardContent, HoverCardTrigger, IDENTITY_HUES, IdentityAvatar, type IdentityAvatarProps, InfoTip, type InfoTipProps, Input, KANBAN_DRAG_MIME, KanbanBoard, KanbanColumn, KanbanItem, Kbd, KeyMetricBar, type KeyMetricBarProps, type KeyMetricItem, Label, LibraryCardSkeleton, ListRowsSkeleton, Loading, Logo, type MarkdownComponents, MarkdownRenderer, MetricValue, type MetricValueProps, ModuleNavigation, type ModuleNavigationItem, type ModuleNavigationProps, OptimizedImage, PageHeader, type PageHeaderProps, PageHeaderSkeleton, PageShell, type PageShellProps, PageSuspenseErrorBoundary, Pagination, type PaginationInfo, PanelHeader, type PanelHeaderProps, PdfFileIcon, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, PromptDialog, type PromptDialogProps, RadioGroup, RadioGroupItem, type ResizableWidthOptions, ResizeHandle, type ResizeHandleProps, type Rgb, SCROLLBAR_GUTTER, ScrollArea, ScrollBar, SectionSuspenseErrorBoundary, Segmented, type SegmentedOption, type SegmentedProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectTrigger, SelectValue, Separator, Skeleton, SkeletonCard, SkeletonList, SkeletonTable, SkillCardSkeleton, Slider, type SortDirection, SortableTableHead, type SortableTableHeadProps, Sparkline, type SparklineProps, StageStepper, type StageStepperItem, type StageStepperProps, StatCardSkeleton, StatsGridSkeleton, StatusBadge, StatusDot, type StatusDotProps, type StatusTone, SummaryDistributionChart, SummaryTrendChart, SuspenseErrorBoundary, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, TableSkeleton, Tabs, TabsContent, TabsList, TabsTrigger, TaskEntryTile, type TaskEntryTileProps, Textarea, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, ToastErrorNotificationHandler, type ToastProps, ToastProvider, ToastTitle, ToastViewport, ToastViewportOverride, type ToastViewportOverrideProps, Toaster, ToggleGroup, ToggleGroupItem, type TokenReader, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TopProgressBar, type TopProgressBarProps, Tree, type TreeNode, type TreeProps, type TreeRef, type UseErrorMessagesOptions, type UseErrorMessagesReturn, UserPicker, type UserPickerOption, type UserPickerProps, VideoPlayer, type VideoPlayerProps, ViewportLayer, VoiceBubble, type VoiceBubbleProps, type WaterfallBar, WaterfallChart, type WaterfallChartProps, type WaterfallStep, buildChartTheme, chartScale, cn, contentTabsButtonActiveClassName, contentTabsButtonClassName, contentTabsButtonInactiveClassName, contentTabsListClassName, contentTabsTriggerClassName, contrastRatio, createErrorMessagesHook, createToastErrorNotificationHandler, createToastHelpers, datePickerLocales, formatFileSize, formatMediaDuration, getCapabilityTagTone, getCascadingSelectionState, getFileExtension, getFileIconConfig, hslToRgb, hslTripletToRgb, identityHue, identityStyle, normalizeCascadingSelection, parseHslTriplet, relativeLuminance, sandboxedFrameHtml, sanitizeTrustedHtml, sanitizeTrustedSvg, scaleFraction, setSandboxedFrameSrcDoc, showErrorToast, showInfoToast, showSuccessToast, showWarningToast, toast, toasts, toggleCascadingSelection, tokenColor, useCarousel, useChartTheme, useConfirm, useErrorHandler, useErrorMessages, usePrompt, useResizableWidth, useSuspenseErrorHandler, useToast, waterfallBars, withErrorBoundary, withSuspenseErrorBoundary };