@gomeniucivan/ui 1.0.43 → 1.0.44

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.
@@ -0,0 +1,4236 @@
1
+ import * as react from 'react';
2
+ import react__default, { AnchorHTMLAttributes, HTMLAttributes, FC, Ref, ElementType, CSSProperties, ReactNode, Key, ReactElement, ComponentPropsWithRef, RefAttributes, Context, MouseEvent, ComponentProps, ChangeEvent, FocusEvent, FormEvent, FormHTMLAttributes, KeyboardEvent, ComponentType } from 'react';
3
+ import { FlexProps as FlexProps$1, MenuProps as MenuProps$1, MenuRef, AlertProps as AlertProps$1, AutoCompleteProps as AutoCompleteProps$1, AvatarProps as AvatarProps$1, DrawerProps as DrawerProps$1, ButtonProps as ButtonProps$1, CollapseProps as CollapseProps$1, DatePickerProps as DatePickerProps$1, InputProps as InputProps$1, InputRef, InputNumberProps as InputNumberProps$1, ModalProps as ModalProps$1, ImageProps as ImageProps$2, SelectProps as SelectProps$1, TagProps as TagProps$1, TabsProps as TabsProps$1, AnchorProps, SegmentedProps as SegmentedProps$1, SliderSingleProps } from 'antd';
4
+ import { LucideProps, LucideIcon } from 'lucide-react';
5
+ import { TooltipPopupProps, TooltipPortalProps as TooltipPortalProps$1, TooltipPositionerProps as TooltipPositionerProps$1, Tooltip as Tooltip$1, TooltipTriggerProps } from '@base-ui/react/tooltip';
6
+ import { Placement as Placement$1 } from '@floating-ui/react';
7
+ import * as _base_ui_react_menu from '@base-ui/react/menu';
8
+ import { MenuRootProps, MenuPopupProps, MenuPortalProps, MenuPositionerProps, MenuTriggerProps, Menu as Menu$1 } from '@base-ui/react/menu';
9
+ import { MenuItemType as MenuItemType$1, SubMenuType as SubMenuType$1, MenuItemGroupType as MenuItemGroupType$1, MenuDividerType as MenuDividerType$1, MenuInfo } from 'rc-menu/es/interface';
10
+ export { MenuInfo } from 'rc-menu/es/interface';
11
+ import { AlertRef } from 'antd/lib/alert/Alert';
12
+ import { FileDiffOptions } from '@pierre/diffs';
13
+ import { ItemType as ItemType$1 } from 'rc-collapse/es/interface';
14
+ import * as motion_react from 'motion/react';
15
+ import { HTMLMotionProps, Transition, TargetAndTransition } from 'motion/react';
16
+ import * as m from 'motion/react-m';
17
+ import * as react_jsx_runtime from 'react/jsx-runtime';
18
+ import { ConfigType } from 'dayjs';
19
+ import { OTPProps, OTPRef } from 'antd/es/input/OTP';
20
+ import { PasswordProps } from 'antd/es/input/Password';
21
+ import { TextAreaProps as TextAreaProps$2, TextAreaRef } from 'antd/es/input/TextArea';
22
+ import Inputmask from 'inputmask';
23
+ import { InputNumberRef } from 'rc-input-number';
24
+ import { Size, NumberSize } from 're-resizable';
25
+ import { Props as Props$1 } from 'react-rnd';
26
+ import { DropdownProps as DropdownProps$1 } from 'antd/es';
27
+ import * as _base_ui_react_autocomplete from '@base-ui/react/autocomplete';
28
+ import { Autocomplete, AutocompleteRootChangeEventDetails, AutocompleteRootProps } from '@base-ui/react/autocomplete';
29
+ import * as _base_ui_react_popover from '@base-ui/react/popover';
30
+ import { PopoverBackdropProps as PopoverBackdropProps$1, PopoverPopupProps as PopoverPopupProps$1, PopoverPortalProps as PopoverPortalProps$1, PopoverPositionerProps as PopoverPositionerProps$1, Popover as Popover$1, PopoverTriggerProps } from '@base-ui/react/popover';
31
+ import { FooterProps as FooterProps$1 } from 'rc-footer';
32
+ import { Switch as Switch$1 } from '@base-ui/react/switch';
33
+ import { BuiltinTheme } from 'shiki';
34
+ import { PreviewConfig } from 'antd/es/image';
35
+ import { GroupPreviewConfig } from 'antd/es/image/PreviewGroup';
36
+ import * as node_modules__base_ui_react_esm_separator_Separator from 'node_modules/@base-ui/react/esm/separator/Separator';
37
+ import * as _base_ui_react_select from '@base-ui/react/select';
38
+ import { Select as Select$1 } from '@base-ui/react/select';
39
+ import { Components, Options } from 'react-markdown';
40
+ import { Pluggable } from 'unified';
41
+ import { MermaidConfig } from 'mermaid';
42
+ import { Node } from 'unist';
43
+ import { Root } from 'hast';
44
+ import { ScrollArea as ScrollArea$1 } from '@base-ui/react/scroll-area';
45
+ import { TableProps as TableProps$1 } from 'antd/es/table';
46
+ import { GetCustomStylish, GetCustomToken, ThemeProviderProps as ThemeProviderProps$1, CustomStylishParams, CustomTokenParams, ThemeMode } from 'antd-style';
47
+ export { createStyles, cx, useAntdToken as useToken } from 'antd-style';
48
+ import { AliasToken } from 'antd/es/theme/interface';
49
+ import { Toast } from '@base-ui/react/toast';
50
+ export { ErrorBoundary, ErrorBoundaryProps } from 'react-error-boundary';
51
+
52
+ interface LobeCustomStylish {
53
+ active: string;
54
+ blur: string;
55
+ blurStrong: string;
56
+ bottomScrollbar: string;
57
+ disabled: string;
58
+ gradientAnimation: string;
59
+ noScrollbar: string;
60
+ resetLinkColor: string;
61
+ shadow: string;
62
+ variantBorderless: string;
63
+ variantBorderlessDanger: string;
64
+ variantBorderlessWithoutHover: string;
65
+ variantFilled: string;
66
+ variantFilledDanger: string;
67
+ variantFilledWithoutHover: string;
68
+ variantOutlined: string;
69
+ variantOutlinedDanger: string;
70
+ variantOutlinedWithoutHover: string;
71
+ }
72
+
73
+ declare const PresetColors: readonly ["red", "volcano", "orange", "gold", "yellow", "lime", "green", "cyan", "blue", "geekblue", "purple", "magenta", "gray"];
74
+ declare const PresetSystemColors: readonly ["Error", "Warning", "Success", "Info"];
75
+ type PresetColorKey = (typeof PresetColors)[number];
76
+ type PresetSystemColorKey = (typeof PresetSystemColors)[number];
77
+ type PresetColorType = Record<PresetColorKey, string>;
78
+ type PresetSystemColorType = Record<PresetSystemColorKey, string>;
79
+ type ColorPaletteKeyIndex = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
80
+ type ColorTokenKey = 'Fill' | 'FillSecondary' | 'FillTertiary' | 'FillQuaternary' | 'Bg' | 'BgHover' | 'Border' | 'BorderSecondary' | 'BorderHover' | 'Hover' | '' | 'Active' | 'TextHover' | 'Text' | 'TextActive';
81
+ type SystemColorTokenKey = 'Fill' | 'FillSecondary' | 'FillTertiary' | 'FillQuaternary';
82
+ type ColorToken = {
83
+ [key in `${keyof PresetColorType}${ColorTokenKey}`]: string;
84
+ };
85
+ type SystemColorToken = {
86
+ [key in `color${keyof PresetSystemColorType}${SystemColorTokenKey}`]: string;
87
+ };
88
+ type ColorPalettes = {
89
+ [key in `${keyof PresetColorType}${ColorPaletteKeyIndex}`]: string;
90
+ };
91
+ type ColorPalettesAlpha = {
92
+ [key in `${keyof PresetColorType}${ColorPaletteKeyIndex}A`]: string;
93
+ };
94
+ interface LobeCustomToken extends ColorPalettes, ColorPalettesAlpha, ColorToken, SystemColorToken {
95
+ colorBgContainerSecondary: string;
96
+ }
97
+
98
+ /**
99
+ * Common trigger type for components that support hover/click interactions
100
+ */
101
+ type Trigger = 'hover' | 'click' | 'both' | ('hover' | 'click')[];
102
+
103
+ type DivProps = HTMLAttributes<HTMLDivElement>;
104
+ type VideoProps$2 = HTMLAttributes<HTMLVideoElement>;
105
+ type SvgProps = HTMLAttributes<SVGSVGElement>;
106
+ type ImgProps = HTMLAttributes<HTMLImageElement>;
107
+ type AProps = AnchorHTMLAttributes<HTMLAnchorElement>;
108
+ type TextAreaProps$1 = HTMLAttributes<HTMLTextAreaElement>;
109
+ type SpanProps = HTMLAttributes<HTMLSpanElement>;
110
+
111
+ declare const A: FC<AProps & {
112
+ ref?: Ref<HTMLAnchorElement>;
113
+ }>;
114
+
115
+ type FlexDirection = 'vertical' | 'vertical-reverse' | 'horizontal' | 'horizontal-reverse';
116
+ interface FlexProps extends FlexProps$1 {
117
+ as?: ElementType;
118
+ direction?: FlexDirection;
119
+ distribution?: CSSProperties['justifyContent'];
120
+ horizontal?: boolean;
121
+ vertical?: boolean;
122
+ padding?: number | string;
123
+ paddingBlock?: number | string;
124
+ paddingInline?: number | string;
125
+ width?: number | string;
126
+ height?: number | string;
127
+ allowShrink?: boolean;
128
+ visible?: boolean;
129
+ ref?: Ref<HTMLElement>;
130
+ }
131
+ declare const Flex: react.ForwardRefExoticComponent<Omit<FlexProps, "ref"> & react.RefAttributes<HTMLElement>>;
132
+
133
+ interface BlockProps extends FlexProps {
134
+ clickable?: boolean;
135
+ glass?: boolean;
136
+ ref?: Ref<HTMLDivElement>;
137
+ shadow?: boolean;
138
+ variant?: 'filled' | 'outlined' | 'borderless';
139
+ }
140
+
141
+ declare const Block: FC<BlockProps>;
142
+
143
+ interface AccordionItemProps extends Pick<BlockProps, 'padding' | 'paddingBlock' | 'paddingInline' | 'variant' | 'ref'> {
144
+ /**
145
+ * Action component that appears on hover
146
+ */
147
+ action?: ReactNode;
148
+ /**
149
+ * Whether to allow expanding (hide indicator when false)
150
+ * @default true
151
+ */
152
+ allowExpand?: boolean;
153
+ /**
154
+ * Content of the accordion item
155
+ */
156
+ children?: ReactNode;
157
+ /**
158
+ * Custom classNames for child elements
159
+ */
160
+ classNames?: {
161
+ action?: string;
162
+ base?: string;
163
+ content?: string;
164
+ header?: string;
165
+ indicator?: string;
166
+ title?: string;
167
+ };
168
+ /**
169
+ * Default expanded state (uncontrolled)
170
+ */
171
+ defaultExpand?: boolean;
172
+ /**
173
+ * Whether the item is disabled
174
+ */
175
+ disabled?: boolean;
176
+ /**
177
+ * Controlled expanded state
178
+ */
179
+ expand?: boolean;
180
+ headerWrapper?: (header: ReactNode) => ReactNode;
181
+ /**
182
+ * Whether to hide the chevron indicator
183
+ * @default false
184
+ */
185
+ hideIndicator?: boolean;
186
+ /**
187
+ * Custom indicator component or function
188
+ */
189
+ indicator?: ReactNode | ((props: {
190
+ isDisabled?: boolean;
191
+ isOpen: boolean;
192
+ }) => ReactNode);
193
+ /**
194
+ * Indicator placement
195
+ * @default 'start'
196
+ */
197
+ indicatorPlacement?: 'end' | 'start';
198
+ /**
199
+ * Unique identifier for the item (use as React key)
200
+ */
201
+ itemKey: Key;
202
+ /**
203
+ * Callback when expanded state changes
204
+ */
205
+ onExpandChange?: (expanded: boolean) => void;
206
+ /**
207
+ * Custom styles for child elements
208
+ */
209
+ styles?: {
210
+ action?: CSSProperties;
211
+ base?: CSSProperties;
212
+ content?: CSSProperties;
213
+ header?: CSSProperties;
214
+ indicator?: CSSProperties;
215
+ title?: CSSProperties;
216
+ };
217
+ /**
218
+ * Title of the accordion item
219
+ */
220
+ title: ReactNode;
221
+ }
222
+ interface AccordionProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>, Pick<BlockProps, 'variant' | 'ref'> {
223
+ /**
224
+ * Whether only one item can be expanded at a time
225
+ * @default false
226
+ */
227
+ accordion?: boolean;
228
+ /**
229
+ * Accordion items
230
+ */
231
+ children?: ReactNode;
232
+ /**
233
+ * Custom classNames for child elements
234
+ */
235
+ classNames?: {
236
+ base?: string;
237
+ };
238
+ /**
239
+ * Default expanded keys (uncontrolled)
240
+ */
241
+ defaultExpandedKeys?: Key[];
242
+ /**
243
+ * Disable animation
244
+ * @default false
245
+ */
246
+ disableAnimation?: boolean;
247
+ /**
248
+ * Controlled expanded keys
249
+ */
250
+ expandedKeys?: Key[];
251
+ /**
252
+ * Gap between accordion items
253
+ */
254
+ gap?: number;
255
+ /**
256
+ * Whether to hide the chevron indicator for all items
257
+ * @default false
258
+ */
259
+ hideIndicator?: boolean;
260
+ /**
261
+ * Indicator placement for all items
262
+ * @default 'start'
263
+ */
264
+ indicatorPlacement?: 'end' | 'start';
265
+ /**
266
+ * Keep content mounted when collapsed
267
+ * @default true
268
+ */
269
+ keepContentMounted?: boolean;
270
+ /**
271
+ * Motion props for motion animation
272
+ */
273
+ motionProps?: any;
274
+ /**
275
+ * Callback when expanded keys change
276
+ */
277
+ onExpandedChange?: (keys: Key[]) => void;
278
+ /**
279
+ * Whether to show dividers between items
280
+ * @default false
281
+ */
282
+ showDivider?: boolean;
283
+ /**
284
+ * Custom styles for child elements
285
+ */
286
+ styles?: {
287
+ base?: CSSProperties;
288
+ };
289
+ }
290
+
291
+ declare const Accordion: react.NamedExoticComponent<AccordionProps>;
292
+
293
+ declare const AccordionItem: react.NamedExoticComponent<AccordionItemProps>;
294
+
295
+ interface IconSizeConfig extends Pick<LucideProps, 'strokeWidth' | 'absoluteStrokeWidth'> {
296
+ size?: number | string;
297
+ }
298
+ type IconSizeType = 'large' | 'middle' | 'small';
299
+ type IconSize = number | IconSizeType | IconSizeConfig;
300
+ type LucideIconProps = Pick<LucideProps, 'fill' | 'fillRule' | 'fillOpacity' | 'color' | 'focusable'>;
301
+ interface IconProps$1 extends Omit<SpanProps, 'children'>, LucideIconProps {
302
+ icon: LucideIcon | FC<any> | ReactNode;
303
+ ref?: Ref<SVGSVGElement>;
304
+ size?: IconSize;
305
+ spin?: boolean;
306
+ }
307
+
308
+ type IconContentConfig = Omit<IconProps$1, 'icon' | 'ref'>;
309
+ declare const IconProvider: react.NamedExoticComponent<{
310
+ children: ReactNode;
311
+ config?: IconContentConfig;
312
+ }>;
313
+
314
+ declare const Icon: react.NamedExoticComponent<IconProps$1>;
315
+
316
+ declare const KeyMapEnum: {
317
+ readonly Alt: "alt";
318
+ readonly Backquote: "backquote";
319
+ readonly Backslash: "backslash";
320
+ readonly Backspace: "backspace";
321
+ readonly BracketLeft: "bracketleft";
322
+ readonly BracketRight: "bracketright";
323
+ readonly Comma: "comma";
324
+ readonly CommandOrControl: "commandorcontrol";
325
+ readonly Control: "control";
326
+ readonly Ctrl: "ctrl";
327
+ readonly Down: "down";
328
+ readonly Enter: "enter";
329
+ readonly Equal: "equal";
330
+ readonly Esc: "esc";
331
+ readonly Left: "left";
332
+ readonly LeftClick: "left-click";
333
+ readonly LeftDoubleClick: "left-double-click";
334
+ readonly Meta: "meta";
335
+ readonly MiddleClick: "middle-click";
336
+ readonly Minus: "minus";
337
+ readonly Mod: "mod";
338
+ readonly Period: "period";
339
+ readonly Plus: "equal";
340
+ readonly QuestionMark: "slash";
341
+ readonly Quote: "quote";
342
+ readonly Right: "right";
343
+ readonly RightClick: "right-click";
344
+ readonly RightDoubleClick: "right-double-click";
345
+ readonly Semicolon: "semicolon";
346
+ readonly Shift: "shift";
347
+ readonly Slash: "slash";
348
+ readonly Space: "space";
349
+ readonly Tab: "tab";
350
+ readonly Up: "up";
351
+ };
352
+
353
+ interface HotkeyProps extends Omit<FlexProps, 'children'> {
354
+ classNames?: {
355
+ kbdClassName?: string;
356
+ };
357
+ compact?: boolean;
358
+ inverseTheme?: boolean;
359
+ isApple?: boolean;
360
+ keys: string;
361
+ styles?: {
362
+ kbdStyle?: CSSProperties;
363
+ };
364
+ variant?: 'filled' | 'outlined' | 'borderless';
365
+ }
366
+
367
+ declare const Hotkey: react.NamedExoticComponent<HotkeyProps>;
368
+
369
+ declare const combineKeys: (keys: string[]) => string;
370
+
371
+ /**
372
+ * Base UI uses a small set of string literal unions for alignment and side.
373
+ * We re-declare them here to avoid importing internal/non-exported Base UI paths.
374
+ */
375
+ type Side = 'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start';
376
+ type Align = 'start' | 'center' | 'end';
377
+ type PlacementConfig = {
378
+ align: Align;
379
+ side: Side;
380
+ };
381
+ /**
382
+ * All supported placement values
383
+ * - Unified placement names for Tooltip, Popover, and DropdownMenu
384
+ * - Ant Design style: topLeft, topCenter, topRight, etc.
385
+ * - Additional aliases: top (same as topCenter), bottom (same as bottomCenter)
386
+ */
387
+ type Placement = 'top' | 'topLeft' | 'topCenter' | 'topRight' | 'bottom' | 'bottomLeft' | 'bottomCenter' | 'bottomRight' | 'left' | 'leftTop' | 'leftBottom' | 'right' | 'rightTop' | 'rightBottom';
388
+ /**
389
+ * Map of placement values to Base UI placement config
390
+ * Used by Popover and DropdownMenu components
391
+ */
392
+ declare const placementMap: Record<Placement, PlacementConfig>;
393
+ /**
394
+ * Convert unified Placement to Floating UI placement format
395
+ * Used by Tooltip component which uses @floating-ui/react
396
+ *
397
+ * @param placement - Unified placement value
398
+ * @returns Floating UI placement (e.g., 'top-start', 'bottom-end')
399
+ */
400
+ declare const toFloatingUIPlacement: (placement?: Placement) => Placement$1;
401
+
402
+ type TooltipPlacement = Placement;
403
+ /**
404
+ * Base UI Positioner props that can be passed through
405
+ */
406
+ type TooltipPositionerProps = Omit<TooltipPositionerProps$1, 'className' | 'style' | 'children'>;
407
+ /**
408
+ * Base UI Trigger props that can be passed through
409
+ */
410
+ type TooltipTriggerComponentProps = Omit<TooltipTriggerProps, 'className' | 'style' | 'children' | 'render' | 'handle' | 'payload'>;
411
+ /**
412
+ * Base UI Popup props that can be passed through
413
+ */
414
+ type TooltipPopupComponentProps = Omit<TooltipPopupProps, 'className' | 'style' | 'children'>;
415
+ /**
416
+ * Base UI Portal props that can be passed through
417
+ */
418
+ type TooltipPortalProps = Omit<TooltipPortalProps$1, 'children' | 'container'>;
419
+ interface TooltipProps {
420
+ /**
421
+ * Whether the tooltip has an arrow pointer.
422
+ * @default false
423
+ */
424
+ arrow?: boolean;
425
+ /**
426
+ * Trigger element. Prefer a single React element.
427
+ */
428
+ children: ReactElement | ReactNode;
429
+ /**
430
+ * Custom className for the tooltip floating root.
431
+ */
432
+ className?: string;
433
+ /**
434
+ * Compatible with Ant Design `classNames` shape (subset).
435
+ */
436
+ classNames?: {
437
+ arrow?: string;
438
+ container?: string;
439
+ content?: string;
440
+ root?: string;
441
+ };
442
+ /**
443
+ * Delay (in milliseconds) before closing the tooltip.
444
+ * Takes precedence over `mouseLeaveDelay`.
445
+ */
446
+ closeDelay?: number;
447
+ /**
448
+ * Uncontrolled initial open state.
449
+ */
450
+ defaultOpen?: boolean;
451
+ /**
452
+ * Disable tooltip behavior.
453
+ */
454
+ disabled?: boolean;
455
+ /**
456
+ * An Ant Design compatible escape hatch for portal container.
457
+ */
458
+ getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
459
+ hotkey?: string;
460
+ hotkeyProps?: Omit<HotkeyProps, 'keys'>;
461
+ /**
462
+ * Delay (in seconds) before showing the tooltip on hover.
463
+ * Kept compatible with Ant Design `Tooltip`.
464
+ */
465
+ mouseEnterDelay?: number;
466
+ /**
467
+ * Delay (in seconds) before hiding the tooltip on hover out.
468
+ * Kept compatible with Ant Design `Tooltip`.
469
+ */
470
+ mouseLeaveDelay?: number;
471
+ /**
472
+ * Callback when open state changes.
473
+ */
474
+ onOpenChange?: (open: boolean) => void;
475
+ /**
476
+ * Controlled open state.
477
+ */
478
+ open?: boolean;
479
+ /**
480
+ * Delay (in milliseconds) before opening the tooltip.
481
+ * Takes precedence over `mouseEnterDelay`.
482
+ */
483
+ openDelay?: number;
484
+ /**
485
+ * Tooltip placement. Supports Floating UI placements and Ant Design legacy placements.
486
+ */
487
+ placement?: TooltipPlacement;
488
+ /**
489
+ * Base UI Popup 组件的 props
490
+ */
491
+ popupProps?: TooltipPopupComponentProps;
492
+ /**
493
+ * Base UI Portal 组件的 props
494
+ */
495
+ portalProps?: TooltipPortalProps;
496
+ /**
497
+ * Base UI Positioner 组件的 props
498
+ */
499
+ positionerProps?: TooltipPositionerProps;
500
+ ref?: ComponentPropsWithRef<typeof Tooltip$1.Trigger>['ref'];
501
+ /**
502
+ * When true, this tooltip will render independently even inside a TooltipGroup,
503
+ * ignoring the group singleton behavior.
504
+ */
505
+ standalone?: boolean;
506
+ /**
507
+ * Compatible with Ant Design `styles` shape (subset).
508
+ */
509
+ styles?: {
510
+ arrow?: CSSProperties;
511
+ /**
512
+ * Backwards-compatible alias for the floating root style.
513
+ */
514
+ container?: CSSProperties;
515
+ content?: CSSProperties;
516
+ root?: CSSProperties;
517
+ };
518
+ /**
519
+ * Tooltip content.
520
+ */
521
+ title: ReactNode;
522
+ /**
523
+ * Base UI Trigger 组件的 props
524
+ */
525
+ triggerProps?: TooltipTriggerComponentProps;
526
+ /**
527
+ * z-index for tooltip floating root.
528
+ */
529
+ zIndex?: number;
530
+ }
531
+ /**
532
+ * Props for `TooltipGroup`.
533
+ */
534
+ interface TooltipGroupProps {
535
+ arrow?: boolean;
536
+ children: ReactNode;
537
+ className?: string;
538
+ classNames?: TooltipProps['classNames'];
539
+ closeDelay?: number;
540
+ /**
541
+ * Disable the "destroy on invalid trigger (display:none / disconnected)" guard for performance.
542
+ * @default false
543
+ */
544
+ disableDestroyOnInvalidTrigger?: boolean;
545
+ /**
546
+ * Disable the "hide when positioner falls back to (0,0)" visual guard for performance.
547
+ * @default false
548
+ */
549
+ disableZeroOriginGuard?: boolean;
550
+ disabled?: boolean;
551
+ getPopupContainer?: TooltipProps['getPopupContainer'];
552
+ hotkey?: string;
553
+ hotkeyProps?: Omit<HotkeyProps, 'keys'>;
554
+ layoutAnimation?: boolean;
555
+ mouseEnterDelay?: number;
556
+ mouseLeaveDelay?: number;
557
+ openDelay?: number;
558
+ placement?: TooltipPlacement;
559
+ popupProps?: TooltipPopupComponentProps;
560
+ portalProps?: TooltipPortalProps;
561
+ positionerProps?: TooltipPositionerProps;
562
+ styles?: TooltipProps['styles'];
563
+ triggerProps?: TooltipTriggerComponentProps;
564
+ zIndex?: number;
565
+ }
566
+
567
+ declare const Tooltip: FC<TooltipProps>;
568
+
569
+ declare const TooltipGroup: FC<TooltipGroupProps>;
570
+
571
+ interface ActionIconSizeConfig extends IconSizeConfig {
572
+ blockSize?: number | string;
573
+ borderRadius?: number | string;
574
+ }
575
+ type ActionIconSize = number | IconSizeType | ActionIconSizeConfig;
576
+ interface ActionIconProps extends Partial<LucideIconProps>, Omit<FlexProps, 'title' | 'children'> {
577
+ active?: boolean;
578
+ danger?: boolean;
579
+ disabled?: boolean;
580
+ glass?: boolean;
581
+ icon?: IconProps$1['icon'] | ReactNode;
582
+ loading?: boolean;
583
+ ref?: Ref<HTMLDivElement>;
584
+ shadow?: boolean;
585
+ size?: ActionIconSize;
586
+ spin?: boolean;
587
+ title?: TooltipProps['title'];
588
+ tooltipProps?: Omit<TooltipProps, 'children' | 'title'>;
589
+ variant?: 'borderless' | 'filled' | 'outlined';
590
+ }
591
+
592
+ declare const ActionIcon: react.NamedExoticComponent<ActionIconProps>;
593
+
594
+ /**
595
+ * Checkbox menu item shared by DropdownMenu / ContextMenu.
596
+ * This is intentionally aligned with Base UI's `Menu.CheckboxItem` API we use.
597
+ */
598
+ interface MenuCheckboxItemType {
599
+ checked?: boolean;
600
+ closeOnClick?: boolean;
601
+ danger?: boolean;
602
+ defaultChecked?: boolean;
603
+ disabled?: boolean;
604
+ extra?: ReactNode;
605
+ icon?: IconProps$1['icon'];
606
+ key: Key;
607
+ label?: ReactNode;
608
+ onCheckedChange?: (checked: boolean) => void;
609
+ title?: ReactNode;
610
+ type: 'checkbox';
611
+ }
612
+
613
+ /**
614
+ * Switch menu item shared by DropdownMenu / ContextMenu.
615
+ * Similar to checkbox but renders as a toggle switch.
616
+ */
617
+ interface MenuSwitchItemType {
618
+ checked?: boolean;
619
+ closeOnClick?: boolean;
620
+ danger?: boolean;
621
+ defaultChecked?: boolean;
622
+ disabled?: boolean;
623
+ extra?: ReactNode;
624
+ icon?: IconProps$1['icon'];
625
+ key: Key;
626
+ label?: ReactNode;
627
+ onCheckedChange?: (checked: boolean) => void;
628
+ title?: ReactNode;
629
+ type: 'switch';
630
+ }
631
+
632
+ interface MenuItemType extends MenuItemType$1 {
633
+ /**
634
+ * Whether to close the menu when this item is clicked.
635
+ * Set to `false` to keep the menu open (useful for items with Upload, file picker, etc.)
636
+ * @default true
637
+ */
638
+ closeOnClick?: boolean;
639
+ danger?: boolean;
640
+ icon?: IconProps$1['icon'];
641
+ loading?: boolean;
642
+ title?: string;
643
+ }
644
+ interface SubMenuType<T extends MenuItemType = MenuItemType> extends Omit<SubMenuType$1, 'children'> {
645
+ children: ItemType<T>[];
646
+ icon?: IconProps$1['icon'];
647
+ }
648
+ interface MenuItemGroupType<T extends MenuItemType = MenuItemType> extends Omit<MenuItemGroupType$1, 'children'> {
649
+ children?: ItemType<T>[];
650
+ key?: Key;
651
+ }
652
+ interface MenuDividerType extends MenuDividerType$1 {
653
+ dashed?: boolean;
654
+ key?: Key;
655
+ }
656
+ type ItemType<T extends MenuItemType = MenuItemType> = T | SubMenuType<T> | MenuItemGroupType<T> | MenuDividerType | null;
657
+ type GenericItemType<T = unknown> = T extends infer U extends MenuItemType ? unknown extends U ? ItemType : ItemType<U> : ItemType;
658
+ interface MenuProps<T = unknown> extends Omit<MenuProps$1, 'items'> {
659
+ compact?: boolean;
660
+ iconProps?: IconContentConfig;
661
+ items: GenericItemType<T>[];
662
+ ref?: Ref<MenuRef>;
663
+ shadow?: boolean;
664
+ variant?: 'filled' | 'outlined' | 'borderless';
665
+ }
666
+
667
+ /**
668
+ * Group type for Base UI driven menus (DropdownMenu / ContextMenu).
669
+ * Unlike MenuItemGroupType, this supports checkbox/switch items in children.
670
+ */
671
+ interface BaseMenuItemGroupType {
672
+ children?: BaseMenuItemType[];
673
+ key?: Key;
674
+ label?: ReactNode;
675
+ type: 'group';
676
+ }
677
+ /**
678
+ * Submenu type for Base UI driven menus (DropdownMenu / ContextMenu).
679
+ * Unlike SubMenuType, this supports checkbox/switch items in children.
680
+ */
681
+ interface BaseSubMenuType extends Omit<SubMenuType, 'children'> {
682
+ children?: BaseMenuItemType[];
683
+ }
684
+ /**
685
+ * Base item union for Base UI driven menus (DropdownMenu / ContextMenu).
686
+ *
687
+ * Note: This intentionally does NOT change `GenericItemType` itself,
688
+ * because `GenericItemType` maps to rc-menu/antd Menu item types.
689
+ */
690
+ type BaseMenuItemType = MenuItemType | BaseSubMenuType | BaseMenuItemGroupType | MenuDividerType | MenuCheckboxItemType | MenuSwitchItemType | null;
691
+
692
+ declare const Menu: react.NamedExoticComponent<MenuProps<unknown>>;
693
+
694
+ type IconSpaceMode = 'global' | 'group';
695
+ interface RenderOptions {
696
+ iconSpaceMode?: IconSpaceMode;
697
+ indicatorOnRight?: boolean;
698
+ reserveIconSpace?: boolean;
699
+ }
700
+
701
+ declare const renderDropdownMenuItems: (items: DropdownItem[], keyPath?: string[], options?: RenderOptions) => ReactNode[];
702
+
703
+ type DropdownMenuPlacement = Placement;
704
+ type DropdownMenuCheckboxItem = MenuCheckboxItemType;
705
+ type DropdownItem = BaseMenuItemType;
706
+ interface DropdownMenuProps<Payload = unknown> extends Omit<MenuRootProps<Payload>, 'children'> {
707
+ children: ReactNode;
708
+ /**
709
+ * 图标空间保留模式
710
+ * - 'global': 当任何一个选项有图标时,所有 item 都保留图标位
711
+ * - 'group': 只有当一个分组中存在图标时,该分组才保留图标位
712
+ * @default 'global'
713
+ */
714
+ iconSpaceMode?: IconSpaceMode;
715
+ items: DropdownItem[] | (() => DropdownItem[]);
716
+ nativeButton?: boolean;
717
+ placement?: DropdownMenuPlacement;
718
+ popupProps?: MenuPopupProps;
719
+ portalProps?: MenuPortalProps;
720
+ positionerProps?: MenuPositionerProps;
721
+ /**
722
+ * 触发方式
723
+ * @default 'click'
724
+ */
725
+ trigger?: Trigger;
726
+ triggerProps?: Omit<MenuTriggerProps<Payload>, 'children'>;
727
+ }
728
+
729
+ declare const DROPDOWN_MENU_CONTAINER_ATTR = "data-lobe-ui-dropdown-menu-container";
730
+ declare const DropdownMenuRoot: typeof Menu$1.Root;
731
+ declare const DropdownMenuSubmenuRoot: typeof Menu$1.SubmenuRoot;
732
+ declare const DropdownMenuCheckboxItemIndicator: react__default.ForwardRefExoticComponent<_base_ui_react_menu.MenuCheckboxItemIndicatorProps & react__default.RefAttributes<HTMLSpanElement>>;
733
+ type DropdownMenuTriggerProps = Omit<react__default.ComponentPropsWithRef<typeof Menu$1.Trigger>, 'children' | 'render'> & {
734
+ children: react__default.ReactNode;
735
+ };
736
+ declare const DropdownMenuTrigger: {
737
+ ({ children, className, nativeButton, ref: refProp, ...rest }: DropdownMenuTriggerProps): react_jsx_runtime.JSX.Element;
738
+ displayName: string;
739
+ };
740
+ type DropdownMenuPortalProps = react__default.ComponentProps<typeof Menu$1.Portal> & {
741
+ /**
742
+ * When `container` is not provided, it uses a shared container created by `usePortalContainer`.
743
+ */
744
+ container?: HTMLElement | null;
745
+ };
746
+ declare const DropdownMenuPortal: {
747
+ ({ container, ...rest }: DropdownMenuPortalProps): react_jsx_runtime.JSX.Element;
748
+ displayName: string;
749
+ };
750
+ type DropdownMenuPositionerProps = react__default.ComponentProps<typeof Menu$1.Positioner> & {
751
+ hoverTrigger?: boolean;
752
+ placement?: DropdownMenuPlacement;
753
+ };
754
+ declare const DropdownMenuPositioner: {
755
+ ({ className, placement, hoverTrigger, align, side, sideOffset, children, ...rest }: DropdownMenuPositionerProps): react_jsx_runtime.JSX.Element;
756
+ displayName: string;
757
+ };
758
+ type DropdownMenuPopupProps = react__default.ComponentProps<typeof Menu$1.Popup>;
759
+ declare const DropdownMenuPopup: {
760
+ ({ className, ...rest }: DropdownMenuPopupProps): react_jsx_runtime.JSX.Element;
761
+ displayName: string;
762
+ };
763
+ type DropdownMenuItemProps = react__default.ComponentProps<typeof Menu$1.Item> & {
764
+ danger?: boolean;
765
+ };
766
+ declare const DropdownMenuItem: {
767
+ ({ className, danger, ...rest }: DropdownMenuItemProps): react_jsx_runtime.JSX.Element;
768
+ displayName: string;
769
+ };
770
+ type DropdownMenuCheckboxItemProps = react__default.ComponentProps<typeof Menu$1.CheckboxItem> & {
771
+ danger?: boolean;
772
+ };
773
+ declare const DropdownMenuCheckboxItemPrimitive: {
774
+ ({ className, danger, ...rest }: DropdownMenuCheckboxItemProps): react_jsx_runtime.JSX.Element;
775
+ displayName: string;
776
+ };
777
+ type DropdownMenuSeparatorProps = react__default.ComponentProps<typeof Menu$1.Separator>;
778
+ declare const DropdownMenuSeparator: {
779
+ ({ className, ...rest }: DropdownMenuSeparatorProps): react_jsx_runtime.JSX.Element;
780
+ displayName: string;
781
+ };
782
+ declare const DropdownMenuGroup: react__default.ForwardRefExoticComponent<_base_ui_react_menu.MenuGroupProps & react__default.RefAttributes<Element>>;
783
+ type DropdownMenuGroupLabelProps = react__default.ComponentProps<typeof Menu$1.GroupLabel>;
784
+ declare const DropdownMenuGroupLabel: {
785
+ ({ className, ...rest }: DropdownMenuGroupLabelProps): react_jsx_runtime.JSX.Element;
786
+ displayName: string;
787
+ };
788
+ type DropdownMenuSubmenuTriggerProps = react__default.ComponentProps<typeof Menu$1.SubmenuTrigger> & {
789
+ danger?: boolean;
790
+ };
791
+ declare const DropdownMenuSubmenuTrigger: {
792
+ ({ className, danger, ...rest }: DropdownMenuSubmenuTriggerProps): react_jsx_runtime.JSX.Element;
793
+ displayName: string;
794
+ };
795
+ type DropdownMenuItemContentProps = react__default.HTMLAttributes<HTMLDivElement>;
796
+ declare const DropdownMenuItemContent: {
797
+ ({ className, ...rest }: DropdownMenuItemContentProps): react_jsx_runtime.JSX.Element;
798
+ displayName: string;
799
+ };
800
+ type DropdownMenuItemIconProps = react__default.HTMLAttributes<HTMLSpanElement>;
801
+ declare const DropdownMenuItemIcon: {
802
+ ({ className, ...rest }: DropdownMenuItemIconProps): react_jsx_runtime.JSX.Element;
803
+ displayName: string;
804
+ };
805
+ type DropdownMenuItemLabelProps = react__default.HTMLAttributes<HTMLSpanElement>;
806
+ declare const DropdownMenuItemLabel: {
807
+ ({ className, ...rest }: DropdownMenuItemLabelProps): react_jsx_runtime.JSX.Element;
808
+ displayName: string;
809
+ };
810
+ type DropdownMenuItemExtraProps = react__default.HTMLAttributes<HTMLSpanElement>;
811
+ declare const DropdownMenuItemExtra: {
812
+ ({ className, ...rest }: DropdownMenuItemExtraProps): react_jsx_runtime.JSX.Element;
813
+ displayName: string;
814
+ };
815
+ type DropdownMenuSubmenuArrowProps = react__default.HTMLAttributes<HTMLSpanElement>;
816
+ declare const DropdownMenuSubmenuArrow: {
817
+ ({ className, ...rest }: DropdownMenuSubmenuArrowProps): react_jsx_runtime.JSX.Element;
818
+ displayName: string;
819
+ };
820
+
821
+ declare const DropdownMenu: react.NamedExoticComponent<DropdownMenuProps<unknown>>;
822
+
823
+ type ActionIconGroupEvent = Pick<MenuInfo, 'key' | 'keyPath' | 'domEvent'>;
824
+ interface ActionIconGroupProps extends Omit<FlexProps, 'children'> {
825
+ actionIconProps?: Partial<Omit<ActionIconProps, 'icon' | 'size' | 'ref'>>;
826
+ disabled?: boolean;
827
+ glass?: boolean;
828
+ items?: MenuItemType[];
829
+ menu?: DropdownMenuProps['items'];
830
+ onActionClick?: (action: ActionIconGroupEvent) => void;
831
+ ref?: Ref<HTMLDivElement>;
832
+ shadow?: boolean;
833
+ size?: ActionIconProps['size'];
834
+ variant?: 'filled' | 'outlined' | 'borderless';
835
+ }
836
+
837
+ declare const ActionIconGroup: FC<ActionIconGroupProps>;
838
+
839
+ interface AlertProps extends Omit<AlertProps$1, 'icon' | 'type'> {
840
+ classNames?: {
841
+ alert?: string;
842
+ container?: string;
843
+ extraContent?: string;
844
+ };
845
+ colorfulText?: boolean;
846
+ extra?: ReactNode;
847
+ extraDefaultExpand?: boolean;
848
+ extraIsolate?: boolean;
849
+ glass?: boolean;
850
+ icon?: IconProps$1['icon'];
851
+ iconProps?: Omit<IconProps$1, 'icon'>;
852
+ ref?: Ref<AlertRef>;
853
+ styles?: {
854
+ alert?: CSSProperties;
855
+ container?: CSSProperties;
856
+ extraContent?: CSSProperties;
857
+ };
858
+ text?: {
859
+ detail?: string;
860
+ };
861
+ type?: 'success' | 'info' | 'warning' | 'error' | 'secondary';
862
+ variant?: 'filled' | 'outlined' | 'borderless';
863
+ }
864
+
865
+ declare const Alert: react.NamedExoticComponent<AlertProps>;
866
+
867
+ interface AutoCompleteProps extends AutoCompleteProps$1 {
868
+ shadow?: boolean;
869
+ }
870
+
871
+ declare const AutoComplete: react.NamedExoticComponent<AutoCompleteProps>;
872
+
873
+ interface AvatarProps extends AvatarProps$1 {
874
+ animation?: boolean;
875
+ avatar?: string | ReactNode;
876
+ background?: string;
877
+ bordered?: boolean;
878
+ borderedColor?: string;
879
+ emojiScaleWithBackground?: boolean;
880
+ loading?: boolean;
881
+ ref?: Ref<HTMLDivElement>;
882
+ shadow?: boolean;
883
+ shape?: 'circle' | 'square';
884
+ size?: number;
885
+ sliceText?: boolean;
886
+ title?: string;
887
+ tooltipProps?: Omit<TooltipProps, 'children' | 'title'>;
888
+ unoptimized?: boolean;
889
+ variant?: 'borderless' | 'filled' | 'outlined';
890
+ }
891
+ interface AvatarGroupItemType extends Pick<AvatarProps, 'avatar' | 'title' | 'alt' | 'onClick' | 'style' | 'className' | 'loading'> {
892
+ key: string;
893
+ }
894
+ interface AvatarGroupProps extends Pick<AvatarProps, 'variant' | 'bordered' | 'shadow' | 'size' | 'background' | 'animation' | 'draggable' | 'shape'>, Omit<FlexProps, 'children' | 'onClick'> {
895
+ classNames?: {
896
+ avatar?: string;
897
+ count?: string;
898
+ };
899
+ items: AvatarGroupItemType[];
900
+ max?: number;
901
+ onClick?: (props: {
902
+ item: AvatarGroupItemType;
903
+ key: string;
904
+ }) => void;
905
+ ref?: Ref<HTMLDivElement>;
906
+ styles?: {
907
+ avatar?: CSSProperties;
908
+ count?: CSSProperties;
909
+ };
910
+ zIndexReverse?: boolean;
911
+ }
912
+
913
+ declare const AvatarGroup: react.NamedExoticComponent<AvatarGroupProps>;
914
+
915
+ interface IAvatar {
916
+ (props: AvatarProps & RefAttributes<HTMLDivElement>): ReactNode;
917
+ Group: typeof AvatarGroup;
918
+ }
919
+ declare const Avatar: IAvatar;
920
+
921
+ interface BurgerProps {
922
+ className?: string;
923
+ drawerProps?: Partial<Omit<DrawerProps$1, 'items' | 'opened' | 'setOpened'>>;
924
+ fullscreen?: boolean;
925
+ headerHeight?: number;
926
+ iconProps?: Partial<ActionIconProps>;
927
+ items: MenuProps$1['items'];
928
+ onClick?: MenuProps$1['onClick'];
929
+ openKeys?: MenuProps$1['openKeys'];
930
+ opened: boolean;
931
+ ref?: Ref<HTMLDivElement>;
932
+ rootClassName?: string;
933
+ selectedKeys?: MenuProps$1['selectedKeys'];
934
+ setOpened: (state: boolean) => void;
935
+ size?: ActionIconProps['size'];
936
+ style?: CSSProperties;
937
+ variant?: ActionIconProps['variant'];
938
+ }
939
+
940
+ declare const Burger: react.NamedExoticComponent<BurgerProps>;
941
+
942
+ interface ButtonProps extends Omit<ButtonProps$1, 'icon'> {
943
+ glass?: boolean;
944
+ icon?: IconProps$1['icon'];
945
+ iconProps?: Partial<Omit<IconProps$1, 'icon'>>;
946
+ ref?: Ref<HTMLButtonElement | HTMLAnchorElement>;
947
+ shadow?: boolean;
948
+ }
949
+
950
+ declare const Button: FC<ButtonProps>;
951
+
952
+ interface TextProps extends DivProps {
953
+ align?: 'left' | 'center' | 'right';
954
+ as?: ElementType;
955
+ code?: boolean;
956
+ color?: string;
957
+ delete?: boolean;
958
+ disabled?: boolean;
959
+ ellipsis?: boolean | {
960
+ rows?: number;
961
+ tooltip?: boolean | string | TooltipProps;
962
+ tooltipWhenOverflow?: boolean;
963
+ };
964
+ fontSize?: number | string;
965
+ italic?: boolean;
966
+ /**
967
+ * Clamp lines with CSS line-clamp.
968
+ *
969
+ * Note: When `ellipsis` is provided, `ellipsis` takes precedence.
970
+ */
971
+ lineClamp?: number;
972
+ lineHeight?: CSSProperties['lineHeight'];
973
+ mark?: boolean;
974
+ /**
975
+ * Whether to disable wrapping (set `white-space: nowrap`).
976
+ *
977
+ * Note: When multi-line ellipsis is enabled, it will be ignored.
978
+ */
979
+ noWrap?: boolean;
980
+ ref?: Ref<HTMLDivElement>;
981
+ strong?: boolean;
982
+ textDecoration?: CSSProperties['textDecoration'];
983
+ textTransform?: CSSProperties['textTransform'];
984
+ type?: 'secondary' | 'success' | 'warning' | 'danger' | 'info';
985
+ underline?: boolean;
986
+ weight?: 'bold' | 'bolder' | number;
987
+ whiteSpace?: CSSProperties['whiteSpace'];
988
+ wordBreak?: CSSProperties['wordBreak'];
989
+ }
990
+
991
+ declare const Text: FC<TextProps>;
992
+
993
+ interface CheckboxProps extends Omit<DivProps, 'onChange'> {
994
+ backgroundColor?: string;
995
+ checked?: boolean;
996
+ classNames?: {
997
+ checkbox?: string;
998
+ text?: string;
999
+ wrapper?: string;
1000
+ };
1001
+ defaultChecked?: boolean;
1002
+ disabled?: boolean;
1003
+ indeterminate?: boolean;
1004
+ onChange?: (checked: boolean) => void;
1005
+ shape?: 'square' | 'circle';
1006
+ size?: number;
1007
+ styles?: {
1008
+ checkbox?: CSSProperties;
1009
+ text?: CSSProperties;
1010
+ wrapper?: CSSProperties;
1011
+ };
1012
+ textProps?: Omit<TextProps, 'children' | 'className' | 'style'>;
1013
+ }
1014
+ interface CheckboxGroupOption {
1015
+ disabled?: boolean;
1016
+ label: ReactNode;
1017
+ value: string;
1018
+ }
1019
+ interface CheckboxGroupProps extends Omit<FlexProps, 'defaultValue' | 'onChange'> {
1020
+ defaultValue?: string[];
1021
+ disabled?: boolean;
1022
+ onChange?: (value: string[]) => void;
1023
+ options: string[] | CheckboxGroupOption[];
1024
+ shape?: 'square' | 'circle';
1025
+ size?: number;
1026
+ textProps?: Omit<TextProps, 'children' | 'className' | 'style'>;
1027
+ value?: string[];
1028
+ }
1029
+
1030
+ declare const CheckboxGroup: FC<CheckboxGroupProps>;
1031
+
1032
+ interface ICheckbox {
1033
+ (props: CheckboxProps & RefAttributes<HTMLDivElement>): ReactNode;
1034
+ Group: typeof CheckboxGroup;
1035
+ }
1036
+ declare const Checkbox: ICheckbox;
1037
+
1038
+ type DiffViewMode = 'split' | 'unified';
1039
+ interface CodeDiffProps extends Omit<FlexProps, 'children'> {
1040
+ /**
1041
+ * Actions to render in the header
1042
+ */
1043
+ actionsRender?: (props: {
1044
+ newContent: string;
1045
+ oldContent: string;
1046
+ originalNode: ReactNode;
1047
+ }) => ReactNode;
1048
+ /**
1049
+ * Custom class names for different parts
1050
+ */
1051
+ classNames?: {
1052
+ body?: string;
1053
+ header?: string;
1054
+ };
1055
+ /**
1056
+ * Options for the diff component
1057
+ */
1058
+ diffOptions?: FileDiffOptions<string>;
1059
+ /**
1060
+ * File name to display
1061
+ */
1062
+ fileName?: string;
1063
+ /**
1064
+ * Programming language for syntax highlighting
1065
+ */
1066
+ language?: string;
1067
+ /**
1068
+ * New content (after changes)
1069
+ */
1070
+ newContent: string;
1071
+ /**
1072
+ * Old content (before changes)
1073
+ */
1074
+ oldContent: string;
1075
+ /**
1076
+ * Whether to show file header
1077
+ * @default true
1078
+ */
1079
+ showHeader?: boolean;
1080
+ /**
1081
+ * Custom styles for different parts
1082
+ */
1083
+ styles?: {
1084
+ body?: CSSProperties;
1085
+ header?: CSSProperties;
1086
+ };
1087
+ /**
1088
+ * Visual variant
1089
+ * @default 'filled'
1090
+ */
1091
+ variant?: 'filled' | 'outlined' | 'borderless';
1092
+ /**
1093
+ * View mode for diff display
1094
+ * @default 'split'
1095
+ */
1096
+ viewMode?: DiffViewMode;
1097
+ }
1098
+ interface PatchDiffProps extends Omit<FlexProps, 'children'> {
1099
+ /**
1100
+ * Actions to render in the header
1101
+ */
1102
+ actionsRender?: (props: {
1103
+ originalNode: ReactNode;
1104
+ patch: string;
1105
+ }) => ReactNode;
1106
+ /**
1107
+ * Custom class names for different parts
1108
+ */
1109
+ classNames?: {
1110
+ body?: string;
1111
+ header?: string;
1112
+ };
1113
+ /**
1114
+ * Options for the diff component
1115
+ */
1116
+ diffOptions?: FileDiffOptions<string>;
1117
+ /**
1118
+ * File name to display (optional, extracted from patch if not provided)
1119
+ */
1120
+ fileName?: string;
1121
+ /**
1122
+ * Programming language for syntax highlighting
1123
+ */
1124
+ language?: string;
1125
+ /**
1126
+ * Unified diff patch string
1127
+ */
1128
+ patch: string;
1129
+ /**
1130
+ * Whether to show file header
1131
+ * @default true
1132
+ */
1133
+ showHeader?: boolean;
1134
+ /**
1135
+ * Custom styles for different parts
1136
+ */
1137
+ styles?: {
1138
+ body?: CSSProperties;
1139
+ header?: CSSProperties;
1140
+ };
1141
+ /**
1142
+ * Visual variant
1143
+ * @default 'filled'
1144
+ */
1145
+ variant?: 'filled' | 'outlined' | 'borderless';
1146
+ /**
1147
+ * View mode for diff display
1148
+ * @default 'split'
1149
+ */
1150
+ viewMode?: DiffViewMode;
1151
+ }
1152
+
1153
+ declare const CodeDiff: react.NamedExoticComponent<CodeDiffProps>;
1154
+
1155
+ declare const PatchDiff: react.NamedExoticComponent<PatchDiffProps>;
1156
+
1157
+ interface CodeEditorProps extends TextAreaProps$1, Pick<FlexProps, 'width' | 'height' | 'flex'> {
1158
+ classNames?: {
1159
+ highlight?: string;
1160
+ textarea?: string;
1161
+ };
1162
+ defaultValue?: string;
1163
+ language: string;
1164
+ onValueChange: (value: string) => void;
1165
+ placeholder?: string;
1166
+ ref?: Ref<HTMLTextAreaElement>;
1167
+ style?: CSSProperties;
1168
+ styles?: {
1169
+ highlight?: CSSProperties;
1170
+ textarea?: CSSProperties;
1171
+ };
1172
+ value: string;
1173
+ variant?: 'filled' | 'outlined' | 'borderless';
1174
+ }
1175
+
1176
+ declare const CodeEditor: react.NamedExoticComponent<CodeEditorProps>;
1177
+
1178
+ interface CollapseItemType extends ItemType$1 {
1179
+ desc?: ReactNode;
1180
+ icon?: IconProps$1['icon'];
1181
+ }
1182
+ interface CollapseProps extends Omit<CollapseProps$1, 'collapsible' | 'ghost' | 'items'> {
1183
+ classNames?: {
1184
+ desc?: string;
1185
+ header?: string;
1186
+ title?: string;
1187
+ };
1188
+ collapsible?: boolean;
1189
+ gap?: number;
1190
+ items: CollapseItemType[];
1191
+ padding?: number | string | {
1192
+ body?: number | string;
1193
+ header?: number | string;
1194
+ };
1195
+ ref?: Ref<HTMLDivElement>;
1196
+ styles?: {
1197
+ desc?: CSSProperties;
1198
+ header?: CSSProperties;
1199
+ title?: CSSProperties;
1200
+ };
1201
+ variant?: 'filled' | 'outlined' | 'borderless';
1202
+ }
1203
+
1204
+ declare const Collapse: react.NamedExoticComponent<CollapseProps>;
1205
+
1206
+ interface ColorSwatchesItemType {
1207
+ color: string;
1208
+ key?: Key;
1209
+ title?: ReactNode;
1210
+ }
1211
+ interface ColorSwatchesProps extends Omit<FlexProps, 'onChange'> {
1212
+ colors: ColorSwatchesItemType[];
1213
+ defaultValue?: string;
1214
+ enableColorPicker?: boolean;
1215
+ enableColorSwatches?: boolean;
1216
+ onChange?: (color?: string) => void;
1217
+ ref?: Ref<HTMLDivElement>;
1218
+ shape?: 'circle' | 'square';
1219
+ size?: number;
1220
+ texts?: {
1221
+ custom: string;
1222
+ presets: string;
1223
+ };
1224
+ value?: string;
1225
+ }
1226
+
1227
+ declare const ColorSwatches: FC<ColorSwatchesProps>;
1228
+
1229
+ type MotionComponentType = typeof motion_react.motion | typeof m;
1230
+ declare const MotionComponent: Context<MotionComponentType>;
1231
+ declare const MotionProvider: react.NamedExoticComponent<{
1232
+ children: ReactNode;
1233
+ motion: MotionComponentType;
1234
+ }>;
1235
+ declare const useMotionComponent: () => MotionComponentType;
1236
+
1237
+ declare const _default$8: {
1238
+ readonly 'sideNav.collapse': "Collapse sidebar";
1239
+ readonly 'sideNav.demoActiveLabel': "Active";
1240
+ readonly 'sideNav.demoFeatureAutoCollapseDesc': "Drag below threshold for smart collapse";
1241
+ readonly 'sideNav.demoFeatureAutoCollapseTitle': "Auto-collapse";
1242
+ readonly 'sideNav.demoFeaturePerformanceDesc': "No animation overhead for better performance";
1243
+ readonly 'sideNav.demoFeaturePerformanceTitle': "Performance";
1244
+ readonly 'sideNav.demoFeatureResizeDesc': "Drag to adjust panel width";
1245
+ readonly 'sideNav.demoFeatureResizeTitle': "Flexible Resize";
1246
+ readonly 'sideNav.demoFeatureSmartHandleDesc': "Hover to reveal toggle button";
1247
+ readonly 'sideNav.demoFeatureSmartHandleTitle': "Smart Handle";
1248
+ readonly 'sideNav.demoFeaturesTitle': "Features";
1249
+ readonly 'sideNav.demoHint': "Try dragging the panel edge and using the toggle button ->";
1250
+ readonly 'sideNav.demoSubtitle': "A workspace-style side panel with draggable resize";
1251
+ readonly 'sideNav.demoTitle': "DraggableSideNav Demo";
1252
+ readonly 'sideNav.expand': "Expand sidebar";
1253
+ };
1254
+
1255
+ declare const _default$7: {
1256
+ readonly 'messageModal.cancel': "Cancel";
1257
+ readonly 'messageModal.confirm': "Confirm";
1258
+ readonly 'messageModal.edit': "Edit";
1259
+ };
1260
+
1261
+ declare const _default$6: {
1262
+ readonly 'hotkey.conflict': "This shortcut conflicts with an existing one.";
1263
+ readonly 'hotkey.invalidCombination': "Shortcut must include a modifier key (Ctrl, Alt, Shift) and only one regular key.";
1264
+ readonly 'hotkey.placeholder': "Press keys to record shortcut";
1265
+ readonly 'hotkey.reset': "Reset to default";
1266
+ };
1267
+
1268
+ declare const _default$5: {
1269
+ readonly 'form.reset': "Reset";
1270
+ readonly 'form.submit': "Submit";
1271
+ readonly 'form.unsavedChanges': "Unsaved changes";
1272
+ readonly 'form.unsavedWarning': "You have unsaved changes. Are you sure you want to leave?";
1273
+ };
1274
+
1275
+ declare const _default$4: {
1276
+ readonly 'emojiPicker.delete': "Delete";
1277
+ readonly 'emojiPicker.draggerDesc': "Click or Drag image to this area to upload";
1278
+ readonly 'emojiPicker.emoji': "Emoji";
1279
+ readonly 'emojiPicker.fileTypeError': "You can only upload image file!";
1280
+ readonly 'emojiPicker.upload': "Upload";
1281
+ readonly 'emojiPicker.uploadBtn': "Crop and Upload";
1282
+ };
1283
+
1284
+ declare const _default$3: {
1285
+ readonly 'editableMessage.addProps': "Add Props";
1286
+ readonly 'editableMessage.delete': "Delete";
1287
+ readonly 'editableMessage.input': "Input";
1288
+ readonly 'editableMessage.inputPlaceholder': "Please enter sample input content";
1289
+ readonly 'editableMessage.output': "Output";
1290
+ readonly 'editableMessage.outputPlaceholder': "Please enter sample output content";
1291
+ readonly 'editableMessage.system': "System";
1292
+ };
1293
+
1294
+ declare const _default$2: {
1295
+ readonly 'common.cancel': "Cancel";
1296
+ readonly 'common.confirm': "Confirm";
1297
+ readonly 'common.delete': "Delete";
1298
+ readonly 'common.edit': "Edit";
1299
+ readonly 'common.empty': "(empty)";
1300
+ };
1301
+
1302
+ declare const _default$1: {
1303
+ readonly 'chat.avatar': "avatar";
1304
+ readonly 'chat.placeholder': "...";
1305
+ readonly 'tokenTag.overload': "Overload";
1306
+ readonly 'tokenTag.remained': "Remained";
1307
+ readonly 'tokenTag.used': "Used";
1308
+ };
1309
+
1310
+ type BuiltinTranslationResources = typeof _default$1 & typeof _default$2 & typeof _default$3 & typeof _default$4 & typeof _default$5 & typeof _default$6 & typeof _default$7 & typeof _default$8;
1311
+ type TranslationKey = keyof BuiltinTranslationResources;
1312
+ type TranslationValue = string;
1313
+ /**
1314
+ * A (partial) dictionary of translations.
1315
+ *
1316
+ * Note: it's intentionally Partial so feature-level modules can pass only their own keys as
1317
+ * fallback resources (e.g. `useTranslation(editableMessageMessages)`).
1318
+ */
1319
+ type TranslationResources = Partial<Record<TranslationKey, TranslationValue>>;
1320
+ type TranslationResourcesMap = TranslationResources[] | Record<string, TranslationResources>;
1321
+ type TranslationResourcesInput = TranslationResourcesMap | Promise<TranslationResourcesMap>;
1322
+
1323
+ type CDN = 'aliyun' | 'unpkg';
1324
+ interface CdnApi {
1325
+ path: string;
1326
+ pkg: string;
1327
+ proxy?: CDN;
1328
+ version?: string;
1329
+ }
1330
+ declare const genCdnUrl: ({ pkg, version, path, proxy }: CdnApi) => string;
1331
+
1332
+ interface Config {
1333
+ aAs?: ElementType;
1334
+ customCdnFn?: CdnFn;
1335
+ imgAs?: ElementType;
1336
+ imgUnoptimized?: boolean;
1337
+ proxy?: CDN | 'custom';
1338
+ }
1339
+ interface ConfigProviderProps {
1340
+ children: ReactNode;
1341
+ config?: Config;
1342
+ locale?: string;
1343
+ motion: MotionComponentType;
1344
+ resources?: TranslationResourcesInput;
1345
+ }
1346
+ declare const ConfigProvider: react.NamedExoticComponent<ConfigProviderProps>;
1347
+ type CdnFn = ({ pkg, version, path }: CdnApi) => string;
1348
+ declare const useCdnFn: () => CdnFn;
1349
+
1350
+ type ContextMenuCheckboxItem = MenuCheckboxItemType;
1351
+ type ContextMenuItem = BaseMenuItemType;
1352
+
1353
+ type ContextMenuTriggerProps = {
1354
+ children: ReactNode;
1355
+ /**
1356
+ * Menu items to display. Supports lazy rendering via function.
1357
+ * When provided, context menu will be automatically shown on right-click.
1358
+ */
1359
+ items?: ContextMenuItem[] | (() => ContextMenuItem[]);
1360
+ /**
1361
+ * Custom context menu handler. If `items` is provided, this is optional.
1362
+ */
1363
+ onContextMenu?: (event: MouseEvent<HTMLElement>) => void;
1364
+ } & Omit<HTMLAttributes<HTMLElement>, 'onContextMenu' | 'children'>;
1365
+ declare const ContextMenuTrigger: react__default.NamedExoticComponent<ContextMenuTriggerProps>;
1366
+
1367
+ declare const ContextMenuHost: react.MemoExoticComponent<() => react_jsx_runtime.JSX.Element | null>;
1368
+
1369
+ interface ShowContextMenuOptions {
1370
+ iconSpaceMode?: IconSpaceMode;
1371
+ }
1372
+ declare const showContextMenu: (items: ContextMenuItem[], options?: ShowContextMenuOptions) => void;
1373
+ /**
1374
+ * Update menu items while keeping current anchor/position.
1375
+ * Useful for interactive menu items (e.g. checkbox) to avoid re-positioning.
1376
+ */
1377
+ declare const updateContextMenuItems: (items: ContextMenuItem[]) => void;
1378
+ declare const closeContextMenu: () => void;
1379
+
1380
+ interface CopyButtonProps extends Omit<ActionIconProps, 'content'> {
1381
+ content: string | (() => string);
1382
+ }
1383
+
1384
+ declare const CopyButton: react.NamedExoticComponent<CopyButtonProps>;
1385
+
1386
+ interface DatePickerProps extends DatePickerProps$1 {
1387
+ shadow?: boolean;
1388
+ /**
1389
+ * Force mobile drawer / wheel UI when true; otherwise uses ThemeProvider context.
1390
+ */
1391
+ isMobile?: boolean;
1392
+ /**
1393
+ * Lower bound for selectable dates (inclusive).
1394
+ */
1395
+ min?: ConfigType;
1396
+ /**
1397
+ * Upper bound for selectable dates (inclusive).
1398
+ */
1399
+ max?: ConfigType;
1400
+ /**
1401
+ * Show years in ascending order instead of the default descending order.
1402
+ */
1403
+ revertYear?: boolean;
1404
+ }
1405
+
1406
+ declare const DatePicker: react.NamedExoticComponent<DatePickerProps>;
1407
+
1408
+ interface DownloadButtonProps extends ActionIconProps {
1409
+ blobUrl?: string;
1410
+ fileName?: string;
1411
+ fileType?: string;
1412
+ }
1413
+
1414
+ declare const DownloadButton: react__default.NamedExoticComponent<DownloadButtonProps>;
1415
+
1416
+ interface InputProps extends InputProps$1 {
1417
+ ref?: Ref<InputRef>;
1418
+ shadow?: boolean;
1419
+ }
1420
+ interface TextAreaProps extends TextAreaProps$2 {
1421
+ ref?: Ref<TextAreaRef>;
1422
+ resize?: boolean;
1423
+ shadow?: boolean;
1424
+ }
1425
+ interface InputNumberProps extends InputNumberProps$1 {
1426
+ ref?: Ref<InputNumberRef>;
1427
+ shadow?: boolean;
1428
+ }
1429
+ interface InputPasswordProps extends PasswordProps {
1430
+ ref?: Ref<InputRef>;
1431
+ shadow?: boolean;
1432
+ }
1433
+ interface InputOPTProps extends OTPProps {
1434
+ ref?: Ref<OTPRef>;
1435
+ shadow?: boolean;
1436
+ }
1437
+ interface InputMaskProps extends InputProps$1 {
1438
+ ref?: Ref<InputRef>;
1439
+ shadow?: boolean;
1440
+ mask: NonNullable<Inputmask.Options['mask']>;
1441
+ maskChar?: string | null;
1442
+ maskPlaceholder?: string | null;
1443
+ alwaysShowMask?: boolean;
1444
+ }
1445
+
1446
+ type SelectSize = 'large' | 'middle' | 'small';
1447
+ type SelectVariant = 'borderless' | 'filled' | 'outlined';
1448
+ type SelectBehaviorVariant = 'default' | 'item-aligned';
1449
+ /**
1450
+ * Variant for how selected items are indicated in the popup.
1451
+ * - `check`: Display a checkmark icon next to selected items (default)
1452
+ * - `bold`: Display selected items with bold text, no checkmark
1453
+ */
1454
+ type SelectIndicatorVariant = 'check' | 'bold';
1455
+ interface SelectOption<Value = string> {
1456
+ className?: string;
1457
+ disabled?: boolean;
1458
+ label: ReactNode;
1459
+ style?: CSSProperties;
1460
+ title?: string;
1461
+ value: Value;
1462
+ }
1463
+ interface SelectOptionGroup<Value = string> {
1464
+ disabled?: boolean;
1465
+ label: ReactNode;
1466
+ options: SelectOption<Value>[];
1467
+ }
1468
+ type SelectOptions<Value = string> = Array<SelectOption<Value> | SelectOptionGroup<Value>>;
1469
+ interface SelectClassNames {
1470
+ clear?: string;
1471
+ dropdown?: string;
1472
+ empty?: string;
1473
+ group?: string;
1474
+ groupLabel?: string;
1475
+ icon?: string;
1476
+ item?: string;
1477
+ itemIndicator?: string;
1478
+ itemText?: string;
1479
+ list?: string;
1480
+ mobileClose?: string;
1481
+ mobileContent?: string;
1482
+ mobileGroupLabel?: string;
1483
+ mobileHeader?: string;
1484
+ mobileList?: string;
1485
+ mobileOverlay?: string;
1486
+ mobileOption?: string;
1487
+ mobileOptionCheck?: string;
1488
+ mobileOptionLabel?: string;
1489
+ mobileOptionSelected?: string;
1490
+ mobileSheet?: string;
1491
+ mobileTitle?: string;
1492
+ option?: string;
1493
+ popup?: string;
1494
+ prefix?: string;
1495
+ root?: string;
1496
+ search?: string;
1497
+ suffix?: string;
1498
+ trigger?: string;
1499
+ value?: string;
1500
+ }
1501
+ interface SelectProps<Value = string> {
1502
+ allowClear?: boolean;
1503
+ autoFocus?: boolean;
1504
+ /**
1505
+ * Behavior variant for Base UI Select.
1506
+ *
1507
+ * - `default`: regular dropdown positioning (alignItemWithTrigger=false, modal=false)
1508
+ * - `item-aligned`: aligns the selected item with trigger and uses modal=true
1509
+ * @default 'default'
1510
+ */
1511
+ behaviorVariant?: SelectBehaviorVariant;
1512
+ className?: string;
1513
+ classNames?: SelectClassNames;
1514
+ defaultOpen?: boolean;
1515
+ defaultValue?: Value | Value[] | null;
1516
+ disabled?: boolean;
1517
+ id?: string;
1518
+ /**
1519
+ * When true, uses a mobile drawer picker (recommended for touch devices).
1520
+ * @default false
1521
+ */
1522
+ isMobile?: boolean;
1523
+ labelRender?: (option: SelectOption<Value>) => ReactNode;
1524
+ /**
1525
+ * 设置弹窗滚动高度
1526
+ * @default 256
1527
+ */
1528
+ listHeight?: number;
1529
+ listItemHeight?: number;
1530
+ loading?: boolean;
1531
+ mode?: 'multiple' | 'tags';
1532
+ name?: string;
1533
+ onChange?: (value: Value | Value[] | null, option?: SelectOption<Value> | SelectOption<Value>[]) => void;
1534
+ onOpenChange?: (open: boolean) => void;
1535
+ onSelect?: (value: Value, option?: SelectOption<Value>) => void;
1536
+ open?: boolean;
1537
+ optionRender?: (option: SelectOption<Value>, info: {
1538
+ index: number;
1539
+ }) => ReactNode;
1540
+ options?: SelectOptions<Value>;
1541
+ placeholder?: ReactNode;
1542
+ popupClassName?: string;
1543
+ popupMatchSelectWidth?: boolean | number;
1544
+ prefix?: ReactNode | IconProps$1['icon'];
1545
+ readOnly?: boolean;
1546
+ required?: boolean;
1547
+ /**
1548
+ * Variant for how selected items are indicated in the popup.
1549
+ * - `check`: Display a checkmark icon next to selected items (default)
1550
+ * - `bold`: Display selected items with bold text, no checkmark
1551
+ * @default 'check'
1552
+ */
1553
+ selectedIndicatorVariant?: SelectIndicatorVariant;
1554
+ shadow?: boolean;
1555
+ showSearch?: boolean;
1556
+ size?: SelectSize;
1557
+ style?: CSSProperties;
1558
+ styles?: {
1559
+ popup?: {
1560
+ root?: CSSProperties;
1561
+ };
1562
+ };
1563
+ suffixIcon?: IconProps$1['icon'] | ReactNode;
1564
+ suffixIconProps?: Omit<IconProps$1, 'icon'>;
1565
+ tokenSeparators?: string[];
1566
+ value?: Value | Value[] | null;
1567
+ variant?: SelectVariant;
1568
+ virtual?: boolean;
1569
+ }
1570
+
1571
+ type Meridiem = 'AM' | 'PM';
1572
+ type TimeValue = {
1573
+ hour: number;
1574
+ minute: number;
1575
+ };
1576
+ interface TimePickerProps extends Omit<InputProps, 'defaultValue' | 'onChange' | 'type' | 'value' | 'size' | 'status' | 'addonAfter' | 'addonBefore' | 'suffix'> {
1577
+ allowClear?: boolean;
1578
+ className?: string;
1579
+ defaultOpen?: boolean;
1580
+ defaultValue?: string | null;
1581
+ format?: string | ((value: TimeValue | null) => string);
1582
+ hourStep?: number;
1583
+ /**
1584
+ * Force mobile drawer / wheel UI when true; otherwise uses ThemeProvider context.
1585
+ */
1586
+ isMobile?: boolean;
1587
+ inputReadOnly?: boolean;
1588
+ minuteStep?: number;
1589
+ onChange?: (value: string | null, formatted: string) => void;
1590
+ onOpenChange?: (open: boolean) => void;
1591
+ open?: boolean;
1592
+ placeholder?: string;
1593
+ size?: SelectSize;
1594
+ style?: CSSProperties;
1595
+ use12Hours?: boolean;
1596
+ value?: string | null;
1597
+ }
1598
+
1599
+ declare const TimePicker: react.NamedExoticComponent<TimePickerProps>;
1600
+
1601
+ type DraggablePanelBodyProps = DivProps;
1602
+ declare const DraggablePanelBody: react.NamedExoticComponent<DivProps>;
1603
+
1604
+ type DraggablePanelContainerProps = DivProps;
1605
+ declare const DraggablePanelContainer: react.NamedExoticComponent<DivProps>;
1606
+
1607
+ type DraggablePanelFooterProps = DivProps;
1608
+ declare const DraggablePanelFooter: react.NamedExoticComponent<DivProps>;
1609
+
1610
+ interface DraggablePanelHeaderProps extends Omit<DivProps, 'children'> {
1611
+ pin?: boolean;
1612
+ position?: 'left' | 'right';
1613
+ setExpand?: (expand: boolean) => void;
1614
+ setPin?: (pin: boolean) => void;
1615
+ title?: string;
1616
+ }
1617
+ declare const DraggablePanelHeader: react.NamedExoticComponent<DraggablePanelHeaderProps>;
1618
+
1619
+ type PlacementType = 'right' | 'left' | 'top' | 'bottom';
1620
+ interface DraggablePanelProps extends DivProps {
1621
+ backgroundColor?: string;
1622
+ classNames?: {
1623
+ content?: string;
1624
+ handle?: string;
1625
+ };
1626
+ defaultExpand?: boolean;
1627
+ defaultSize?: Partial<Size>;
1628
+ destroyOnClose?: boolean;
1629
+ expand?: boolean;
1630
+ expandable?: boolean;
1631
+ fullscreen?: boolean;
1632
+ headerHeight?: number;
1633
+ maxHeight?: number;
1634
+ maxWidth?: number;
1635
+ minHeight?: number;
1636
+ minWidth?: number;
1637
+ mode?: 'fixed' | 'float';
1638
+ onExpandChange?: (expand: boolean) => void;
1639
+ onSizeChange?: (delta: NumberSize, size?: Size) => void;
1640
+ onSizeDragging?: (delta: NumberSize, size?: Size) => void;
1641
+ pin?: boolean;
1642
+ placement: PlacementType;
1643
+ resize?: Props$1['enableResizing'];
1644
+ /**
1645
+ * Whether to show border
1646
+ * @default true
1647
+ */
1648
+ showBorder?: boolean;
1649
+ showHandleHighlight?: boolean;
1650
+ showHandleWhenCollapsed?: boolean;
1651
+ showHandleWideArea?: boolean;
1652
+ size?: Partial<Size>;
1653
+ styles?: {
1654
+ content?: CSSProperties;
1655
+ handle?: CSSProperties;
1656
+ };
1657
+ }
1658
+
1659
+ interface IDraggablePanel {
1660
+ (props: DraggablePanelProps & RefAttributes<HTMLDivElement>): ReactNode;
1661
+ Body: typeof DraggablePanelBody;
1662
+ Container: typeof DraggablePanelContainer;
1663
+ Footer: typeof DraggablePanelFooter;
1664
+ Header: typeof DraggablePanelHeader;
1665
+ }
1666
+ declare const DraggablePanel: IDraggablePanel;
1667
+
1668
+ interface DraggableSideNavProps extends Omit<DivProps, 'children' | 'onSelect'> {
1669
+ backgroundColor?: string;
1670
+ /**
1671
+ * Body content (main content area)
1672
+ * Function that receives expand state
1673
+ */
1674
+ body: (expand: boolean) => ReactNode;
1675
+ /**
1676
+ * Classnames for internal components
1677
+ */
1678
+ classNames?: {
1679
+ body?: string;
1680
+ container?: string;
1681
+ content?: string;
1682
+ footer?: string;
1683
+ handle?: string;
1684
+ header?: string;
1685
+ };
1686
+ /**
1687
+ * Whether the panel is expanded by default
1688
+ * @default true
1689
+ */
1690
+ defaultExpand?: boolean;
1691
+ /**
1692
+ * Default width (number format)
1693
+ */
1694
+ defaultWidth?: number;
1695
+ /**
1696
+ * Whether the panel is expanded (controlled)
1697
+ */
1698
+ expand?: boolean;
1699
+ /**
1700
+ * Whether the panel can be expanded/collapsed
1701
+ * @default true
1702
+ */
1703
+ expandable?: boolean;
1704
+ /**
1705
+ * Footer content
1706
+ * Can be a static element or a function that receives expand state
1707
+ */
1708
+ footer?: ReactNode | ((expand: boolean) => ReactNode);
1709
+ /**
1710
+ * Header content
1711
+ * Can be a static element or a function that receives expand state
1712
+ */
1713
+ header?: ReactNode | ((expand: boolean) => ReactNode);
1714
+ /**
1715
+ * Maximum width
1716
+ */
1717
+ maxWidth?: number;
1718
+ /**
1719
+ * Minimum width when expanded (does not affect collapsed width which is always 64px)
1720
+ * Only applies when the panel is in expanded state
1721
+ * @default 64
1722
+ */
1723
+ minWidth?: number;
1724
+ /**
1725
+ * Callback when expand state changes
1726
+ */
1727
+ onExpandChange?: (expand: boolean) => void;
1728
+ /**
1729
+ * Callback when menu item is selected
1730
+ */
1731
+ onSelect?: (key: string) => void;
1732
+ /**
1733
+ * Callback when width changes
1734
+ */
1735
+ onWidthChange?: (delta: NumberSize, width: number) => void;
1736
+ /**
1737
+ * Callback when actively resizing width
1738
+ */
1739
+ onWidthDragging?: (delta: NumberSize, width: number) => void;
1740
+ /**
1741
+ * Placement of the side nav
1742
+ * @default 'left'
1743
+ */
1744
+ placement?: 'left' | 'right';
1745
+ /**
1746
+ * Whether to enable resizing
1747
+ * @default true
1748
+ */
1749
+ resizable?: boolean;
1750
+ /**
1751
+ * Whether to show border
1752
+ * @default true
1753
+ */
1754
+ showBorder?: boolean;
1755
+ /**
1756
+ * Whether to show handle for toggling
1757
+ * @default true
1758
+ */
1759
+ showHandle?: boolean;
1760
+ showHandleHighlight?: boolean;
1761
+ /**
1762
+ * Whether to show handle when collapsed
1763
+ * @default false
1764
+ */
1765
+ showHandleWhenCollapsed?: boolean;
1766
+ /**
1767
+ * Custom styles
1768
+ */
1769
+ styles?: {
1770
+ body?: CSSProperties;
1771
+ container?: CSSProperties;
1772
+ content?: CSSProperties;
1773
+ footer?: CSSProperties;
1774
+ handle?: CSSProperties;
1775
+ header?: CSSProperties;
1776
+ };
1777
+ /**
1778
+ * Expanded width (controlled)
1779
+ * This represents the width when expanded, not the current displayed width
1780
+ * The actual displayed width will be `width` when expanded, or `minWidth` when collapsed
1781
+ */
1782
+ width?: number;
1783
+ }
1784
+
1785
+ declare const DraggableSideNav: react.NamedExoticComponent<DraggableSideNavProps>;
1786
+
1787
+ interface DrawerProps extends Omit<DrawerProps$1, 'styles' | 'classNames'> {
1788
+ classNames?: DrawerProps$1['classNames'] & {
1789
+ bodyContent?: string;
1790
+ extra?: string;
1791
+ sidebar?: string;
1792
+ sidebarContent?: string;
1793
+ title?: string;
1794
+ };
1795
+ closeIconProps?: ActionIconProps;
1796
+ containerMaxWidth?: number | string;
1797
+ noHeader?: boolean;
1798
+ ref?: Ref<HTMLDivElement>;
1799
+ sidebar?: ReactNode;
1800
+ sidebarWidth?: number;
1801
+ styles?: DrawerProps$1['styles'] & {
1802
+ bodyContent?: CSSProperties;
1803
+ extra?: CSSProperties;
1804
+ sidebar?: CSSProperties;
1805
+ sidebarContent?: CSSProperties;
1806
+ title?: CSSProperties;
1807
+ };
1808
+ }
1809
+
1810
+ declare const Drawer: react.NamedExoticComponent<DrawerProps>;
1811
+
1812
+ interface DropdownProps extends Omit<DropdownProps$1, 'menu'> {
1813
+ iconProps?: IconContentConfig;
1814
+ menu: MenuProps;
1815
+ }
1816
+
1817
+ /**
1818
+ * @deprecated
1819
+ * Use `DropdownMenu` or `ContextMenu` instead
1820
+ * @see https://ui.lobehub.com/components/context-menu
1821
+ * @see https://ui.lobehub.com/components/dropdown-menu
1822
+ */
1823
+ declare const Dropdown: react.NamedExoticComponent<DropdownProps>;
1824
+
1825
+ declare const Input: react.NamedExoticComponent<InputProps>;
1826
+
1827
+ declare const InputMask: react.NamedExoticComponent<InputMaskProps>;
1828
+
1829
+ declare const InputNumber: react.NamedExoticComponent<InputNumberProps>;
1830
+
1831
+ declare const InputOPT: react.NamedExoticComponent<InputOPTProps>;
1832
+
1833
+ declare const InputPassword: react.NamedExoticComponent<InputPasswordProps>;
1834
+
1835
+ declare const TextArea: react.NamedExoticComponent<TextAreaProps>;
1836
+
1837
+ interface ControlInputProps extends Omit<InputProps, 'onChange' | 'value' | 'onAbort'> {
1838
+ onChange?: (value: string) => void;
1839
+ onChangeEnd?: (value: string) => void;
1840
+ onValueChanging?: (value: string) => void;
1841
+ submitIcon?: ActionIconProps['icon'];
1842
+ texts?: {
1843
+ reset?: string;
1844
+ submit?: string;
1845
+ };
1846
+ value?: string;
1847
+ }
1848
+
1849
+ interface EditableTextProps extends Omit<FlexProps, 'onChange' | 'onBlur' | 'onFocus'>, Pick<ControlInputProps, 'onChange' | 'value' | 'onChangeEnd' | 'onValueChanging' | 'texts' | 'variant' | 'onBlur' | 'onFocus' | 'size'> {
1850
+ className?: string;
1851
+ classNames?: {
1852
+ container?: string;
1853
+ input?: string;
1854
+ };
1855
+ editing?: boolean;
1856
+ inputProps?: Omit<ControlInputProps, 'onChange' | 'value' | 'onChangeEnd' | 'onValueChanging' | 'texts' | 'className' | 'style' | 'onBlur' | 'onFocus' | 'size'>;
1857
+ onEditingChange?: (editing: boolean) => void;
1858
+ showEditIcon?: boolean;
1859
+ style?: CSSProperties;
1860
+ styles?: {
1861
+ container?: CSSProperties;
1862
+ input?: CSSProperties;
1863
+ };
1864
+ }
1865
+
1866
+ declare const EditableText: react.NamedExoticComponent<EditableTextProps>;
1867
+
1868
+ declare const EditorSlashMenuList: react__default.ForwardRefExoticComponent<Omit<_base_ui_react_autocomplete.AutocompleteListProps & react__default.RefAttributes<HTMLDivElement>, "ref"> & react__default.RefAttributes<HTMLDivElement>>;
1869
+ type EditorSlashMenuPortalProps = react__default.ComponentProps<typeof Autocomplete.Portal> & {
1870
+ /**
1871
+ * When `container` is not provided, it uses a shared container created by `usePortalContainer`.
1872
+ */
1873
+ container?: HTMLElement | null;
1874
+ };
1875
+ declare const EditorSlashMenuPortal: {
1876
+ ({ container, ...rest }: EditorSlashMenuPortalProps): react_jsx_runtime.JSX.Element;
1877
+ displayName: string;
1878
+ };
1879
+ type EditorSlashMenuPositionerProps = react__default.ComponentProps<typeof Autocomplete.Positioner>;
1880
+ declare const EditorSlashMenuPositioner: {
1881
+ ({ className, align, positionMethod, side, sideOffset, ...rest }: EditorSlashMenuPositionerProps): react_jsx_runtime.JSX.Element;
1882
+ displayName: string;
1883
+ };
1884
+ type EditorSlashMenuPopupProps = react__default.ComponentProps<typeof Autocomplete.Popup>;
1885
+ declare const EditorSlashMenuPopup: {
1886
+ ({ className, initialFocus, ...rest }: EditorSlashMenuPopupProps): react_jsx_runtime.JSX.Element;
1887
+ displayName: string;
1888
+ };
1889
+ declare const EditorSlashMenuGroup$1: react__default.ForwardRefExoticComponent<_base_ui_react_autocomplete.AutocompleteGroupProps & react__default.RefAttributes<HTMLDivElement>>;
1890
+ type EditorSlashMenuHiddenInputProps = react__default.ComponentProps<typeof Autocomplete.Input>;
1891
+ declare const EditorSlashMenuHiddenInput: {
1892
+ ({ className, ...rest }: EditorSlashMenuHiddenInputProps): react_jsx_runtime.JSX.Element;
1893
+ displayName: string;
1894
+ };
1895
+
1896
+ type EditorSlashMenuItemValue = string;
1897
+ type EditorSlashMenuOption = {
1898
+ /** Render danger style (red) */
1899
+ danger?: boolean;
1900
+ /** Whether the item is disabled */
1901
+ disabled?: boolean;
1902
+ /** Optional extra content shown at the end */
1903
+ extra?: react__default.ReactNode;
1904
+ /** Optional icon shown at the start */
1905
+ icon?: react__default.ReactNode;
1906
+ /** Optional additional keywords for filtering */
1907
+ keywords?: string[];
1908
+ /** Visible label, also used for filtering by default */
1909
+ label: string;
1910
+ /** Unique id of the command */
1911
+ value: EditorSlashMenuItemValue;
1912
+ };
1913
+ type EditorSlashMenuGroup = {
1914
+ items: EditorSlashMenuOption[];
1915
+ /** Optional group title */
1916
+ label?: string;
1917
+ };
1918
+ type EditorSlashMenuItems = Array<EditorSlashMenuOption | EditorSlashMenuGroup>;
1919
+
1920
+ type Props = {
1921
+ /** Anchor for positioning (caret virtual element, dom element, ref, etc.) */
1922
+ anchor?: react__default.ComponentProps<typeof EditorSlashMenuPositioner>['anchor'];
1923
+ defaultOpen?: boolean;
1924
+ /** Initial query string (uncontrolled) */
1925
+ defaultValue?: string;
1926
+ /** Optional custom empty state */
1927
+ empty?: react__default.ReactNode;
1928
+ hiddenInputProps?: react__default.ComponentProps<typeof EditorSlashMenuHiddenInput>;
1929
+ items: EditorSlashMenuItems;
1930
+ listProps?: react__default.ComponentProps<typeof EditorSlashMenuList>;
1931
+ onOpenChange?: (open: boolean, details: AutocompleteRootChangeEventDetails) => void;
1932
+ onOpenChangeComplete?: (open: boolean) => void;
1933
+ /** Called when a command is selected. */
1934
+ onSelect?: (item: EditorSlashMenuOption, details: AutocompleteRootChangeEventDetails) => void;
1935
+ /** Called when query changes. By default, changes caused by item selection are ignored. */
1936
+ onValueChange?: (value: string, details: AutocompleteRootChangeEventDetails) => void;
1937
+ open?: boolean;
1938
+ popupProps?: react__default.ComponentProps<typeof EditorSlashMenuPopup>;
1939
+ portalProps?: Omit<react__default.ComponentProps<typeof EditorSlashMenuPortal>, 'container'> & {
1940
+ container?: HTMLElement | null;
1941
+ };
1942
+ positionerProps?: Omit<react__default.ComponentProps<typeof EditorSlashMenuPositioner>, 'anchor'>;
1943
+ /** Optional custom group label renderer */
1944
+ renderGroupLabel?: (label: string) => react__default.ReactNode;
1945
+ /** Optional custom item renderer */
1946
+ renderItem?: (item: EditorSlashMenuOption) => react__default.ReactNode;
1947
+ /** Reserve icon space even when icon is missing */
1948
+ reserveIconSpace?: boolean;
1949
+ /** Pass-through props */
1950
+ rootProps?: Omit<AutocompleteRootProps<EditorSlashMenuOption>, 'items' | 'value' | 'defaultValue' | 'onValueChange' | 'open' | 'defaultOpen' | 'onOpenChange' | 'onOpenChangeComplete' | 'itemToStringValue'>;
1951
+ /** Whether selecting an item should propagate its filled value via `onValueChange`. */
1952
+ updateValueOnSelect?: boolean;
1953
+ /** Current query string (controlled) */
1954
+ value?: string;
1955
+ /**
1956
+ * Render a visually-hidden input element for keyboard navigation / screen readers.
1957
+ * Default is `false` because slash menus usually live inside an editor input.
1958
+ */
1959
+ withHiddenInput?: boolean;
1960
+ };
1961
+ declare const EditorSlashMenu: react__default.NamedExoticComponent<Props>;
1962
+
1963
+ declare const PopoverArrowIcon: react_jsx_runtime.JSX.Element;
1964
+
1965
+ type PopoverPlacement = Placement;
1966
+ type PopoverTrigger = Trigger;
1967
+ /**
1968
+ * Base UI Positioner props that can be passed through
1969
+ */
1970
+ type PopoverPositionerProps = Omit<PopoverPositionerProps$1, 'className' | 'style' | 'children'>;
1971
+ /**
1972
+ * Base UI Trigger props that can be passed through
1973
+ */
1974
+ type PopoverTriggerComponentProps = Omit<PopoverTriggerProps, 'className' | 'style' | 'children' | 'render' | 'nativeButton' | 'handle' | 'payload'>;
1975
+ /**
1976
+ * Base UI Popup props that can be passed through
1977
+ */
1978
+ type PopoverPopupProps = Omit<PopoverPopupProps$1, 'className' | 'style' | 'children'>;
1979
+ /**
1980
+ * Base UI Backdrop props that can be passed through
1981
+ */
1982
+ type PopoverBackdropProps = Omit<PopoverBackdropProps$1, 'className' | 'style'>;
1983
+ /**
1984
+ * Base UI Portal props that can be passed through
1985
+ */
1986
+ type PopoverPortalProps = Omit<PopoverPortalProps$1, 'children' | 'container'>;
1987
+ interface PopoverProps {
1988
+ /**
1989
+ * 是否显示箭头, 在 `inset` 下无法使用
1990
+ * @default false
1991
+ */
1992
+ arrow?: boolean;
1993
+ /**
1994
+ * Base UI Backdrop 组件的 props
1995
+ */
1996
+ backdropProps?: PopoverBackdropProps;
1997
+ /**
1998
+ * 触发元素
1999
+ */
2000
+ children: ReactElement | ReactNode;
2001
+ /**
2002
+ * 弹出容器类名
2003
+ */
2004
+ className?: string;
2005
+ /**
2006
+ * 自定义类名
2007
+ */
2008
+ classNames?: {
2009
+ arrow?: string;
2010
+ content?: string;
2011
+ root?: string;
2012
+ trigger?: string;
2013
+ };
2014
+ /**
2015
+ * 关闭延迟(毫秒),优先级高于 mouseLeaveDelay
2016
+ */
2017
+ closeDelay?: number;
2018
+ /**
2019
+ * 弹出内容
2020
+ */
2021
+ content: ReactNode;
2022
+ /**
2023
+ * 默认打开状态
2024
+ * @default false
2025
+ */
2026
+ defaultOpen?: boolean;
2027
+ /**
2028
+ * 是否禁用
2029
+ * @default false
2030
+ */
2031
+ disabled?: boolean;
2032
+ /**
2033
+ * 获取弹出容器
2034
+ */
2035
+ getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
2036
+ /**
2037
+ * 是否嵌入 trigger 内部显示
2038
+ * @default false
2039
+ */
2040
+ inset?: boolean;
2041
+ /**
2042
+ * 鼠标移入延迟(秒)
2043
+ * @default 0.1
2044
+ */
2045
+ mouseEnterDelay?: number;
2046
+ /**
2047
+ * 鼠标移出延迟(秒)
2048
+ * @default 0.1
2049
+ */
2050
+ mouseLeaveDelay?: number;
2051
+ /**
2052
+ * 是否使用原生 button 元素作为触发器
2053
+ */
2054
+ nativeButton?: boolean;
2055
+ /**
2056
+ * 打开状态变化回调
2057
+ */
2058
+ onOpenChange?: (open: boolean) => void;
2059
+ /**
2060
+ * 受控的打开状态
2061
+ */
2062
+ open?: boolean;
2063
+ /**
2064
+ * 打开延迟(毫秒),优先级高于 mouseEnterDelay
2065
+ */
2066
+ openDelay?: number;
2067
+ /**
2068
+ * 弹出位置
2069
+ * @default 'top'
2070
+ */
2071
+ placement?: PopoverPlacement;
2072
+ /**
2073
+ * Base UI Popup 组件的 props
2074
+ */
2075
+ popupProps?: PopoverPopupProps;
2076
+ /**
2077
+ * Base UI Portal 组件的 props
2078
+ */
2079
+ portalProps?: PopoverPortalProps;
2080
+ /**
2081
+ * Base UI Positioner 组件的 props
2082
+ */
2083
+ positionerProps?: PopoverPositionerProps;
2084
+ /**
2085
+ * ref
2086
+ */
2087
+ ref?: ComponentPropsWithRef<typeof Popover$1.Trigger>['ref'];
2088
+ /**
2089
+ * 当设置为 true 时,即使在 PopoverGroup 内部也会独立渲染,忽略 group 单例行为
2090
+ */
2091
+ standalone?: boolean;
2092
+ /**
2093
+ * 自定义样式
2094
+ */
2095
+ styles?: {
2096
+ arrow?: CSSProperties;
2097
+ content?: CSSProperties;
2098
+ root?: CSSProperties;
2099
+ };
2100
+ /**
2101
+ * 触发方式
2102
+ * @default 'hover'
2103
+ */
2104
+ trigger?: Trigger;
2105
+ /**
2106
+ * Base UI Trigger 组件的 props
2107
+ */
2108
+ triggerProps?: PopoverTriggerComponentProps;
2109
+ /**
2110
+ * z-index
2111
+ */
2112
+ zIndex?: number;
2113
+ }
2114
+
2115
+ declare const PopoverRoot: typeof Popover$1.Root;
2116
+ declare const PopoverBackdrop: react.ForwardRefExoticComponent<_base_ui_react_popover.PopoverBackdropProps & react.RefAttributes<HTMLDivElement>>;
2117
+ type PopoverTriggerElementProps = Omit<ComponentPropsWithRef<typeof Popover$1.Trigger>, 'children' | 'render'> & {
2118
+ children: ComponentProps<typeof Popover$1.Trigger>['children'];
2119
+ };
2120
+ declare const PopoverTriggerElement: {
2121
+ ({ children, className, nativeButton, ref: refProp, ...rest }: PopoverTriggerElementProps): react_jsx_runtime.JSX.Element;
2122
+ displayName: string;
2123
+ };
2124
+ type PopoverPortalAtomProps = Omit<ComponentProps<typeof Popover$1.Portal>, 'container'> & {
2125
+ /**
2126
+ * Portal container. When not provided, it uses the shared container created by `usePopoverPortalContainer`.
2127
+ */
2128
+ container?: HTMLElement | null;
2129
+ /**
2130
+ * Root element used by `usePopoverPortalContainer` to create the default container.
2131
+ */
2132
+ root?: HTMLElement | ShadowRoot | null;
2133
+ };
2134
+ declare const PopoverPortal: {
2135
+ ({ container, root, children, ...rest }: PopoverPortalAtomProps): react_jsx_runtime.JSX.Element | null;
2136
+ displayName: string;
2137
+ };
2138
+ type PopoverPositionerAtomProps = ComponentProps<typeof Popover$1.Positioner> & {
2139
+ hoverTrigger?: boolean;
2140
+ placement?: PopoverPlacement;
2141
+ };
2142
+ declare const PopoverPositioner: {
2143
+ ({ children, className, hoverTrigger, placement, align, side, sideOffset, ...rest }: PopoverPositionerAtomProps): react_jsx_runtime.JSX.Element;
2144
+ displayName: string;
2145
+ };
2146
+ type PopoverPopupAtomProps = ComponentProps<typeof Popover$1.Popup>;
2147
+ declare const PopoverPopup: {
2148
+ ({ className, ...rest }: PopoverPopupAtomProps): react_jsx_runtime.JSX.Element;
2149
+ displayName: string;
2150
+ };
2151
+ type PopoverArrowAtomProps = ComponentProps<typeof Popover$1.Arrow>;
2152
+ declare const PopoverArrow: {
2153
+ ({ className, children, ...rest }: PopoverArrowAtomProps): react_jsx_runtime.JSX.Element;
2154
+ displayName: string;
2155
+ };
2156
+ type PopoverViewportAtomProps = ComponentProps<typeof Popover$1.Viewport>;
2157
+ declare const PopoverViewport: {
2158
+ ({ className, ...rest }: PopoverViewportAtomProps): react_jsx_runtime.JSX.Element;
2159
+ displayName: string;
2160
+ };
2161
+
2162
+ type PopoverContextValue = {
2163
+ close: () => void;
2164
+ };
2165
+ declare const PopoverProvider: react.NamedExoticComponent<{
2166
+ children: ReactNode;
2167
+ value: PopoverContextValue;
2168
+ }>;
2169
+ declare const usePopoverContext: () => PopoverContextValue;
2170
+
2171
+ declare const Popover: FC<PopoverProps>;
2172
+
2173
+ type PopoverGroupSharedProps = Omit<PopoverProps, 'children' | 'content' | 'defaultOpen' | 'open' | 'ref'> & {
2174
+ /**
2175
+ * @description Whether to enable content layout animation when switching triggers
2176
+ * @default false
2177
+ */
2178
+ contentLayoutAnimation?: boolean;
2179
+ /**
2180
+ * Disable the "destroy on invalid trigger (display:none / disconnected)" guard for performance.
2181
+ * @default false
2182
+ */
2183
+ disableDestroyOnInvalidTrigger?: boolean;
2184
+ /**
2185
+ * Disable the "hide when positioner falls back to (0,0)" visual guard for performance.
2186
+ * @default false
2187
+ */
2188
+ disableZeroOriginGuard?: boolean;
2189
+ };
2190
+
2191
+ type PopoverGroupProps = PopoverGroupSharedProps & {
2192
+ children: ReactNode;
2193
+ };
2194
+ declare const PopoverGroup: FC<PopoverGroupProps>;
2195
+
2196
+ declare const POPOVER_CONTAINER_ATTR = "data-lobe-ui-popover-container";
2197
+ declare const usePopoverPortalContainer: (root?: HTMLElement | ShadowRoot | null) => HTMLElement | null;
2198
+
2199
+ interface AvatarUploaderProps {
2200
+ compressSize?: number;
2201
+ onChange: (avatar: string) => void;
2202
+ onUpload?: (file: File) => void;
2203
+ shape?: 'circle' | 'square';
2204
+ texts?: {
2205
+ draggerDesc?: string;
2206
+ fileTypeError?: string;
2207
+ uploadBtn?: string;
2208
+ };
2209
+ }
2210
+ interface EmojiPickerCustomEmoji {
2211
+ emojis: [
2212
+ {
2213
+ id: string;
2214
+ keywords?: string[];
2215
+ name: string;
2216
+ skins: {
2217
+ src: string;
2218
+ }[];
2219
+ }
2220
+ ];
2221
+ id: string;
2222
+ name: string;
2223
+ }
2224
+ interface EmojiPickerCustomTab {
2225
+ label: ReactNode;
2226
+ render: (handleAvatarChange: (avatar: string) => void) => ReactNode;
2227
+ value: string;
2228
+ }
2229
+ interface EmojiPickerProps extends Omit<AvatarProps, 'onChange' | 'avatar'> {
2230
+ allowDelete?: boolean;
2231
+ allowUpload?: boolean | {
2232
+ enableEmoji?: boolean;
2233
+ };
2234
+ compressSize?: number;
2235
+ contentProps?: Omit<FlexProps, 'className' | 'ref' | 'style'>;
2236
+ customEmojis?: EmojiPickerCustomEmoji[];
2237
+ customRender?: (avatar: string) => ReactNode;
2238
+ customTabs?: EmojiPickerCustomTab[];
2239
+ defaultAvatar?: string;
2240
+ defaultOpen?: boolean;
2241
+ loading?: boolean;
2242
+ locale?: string;
2243
+ onChange?: (emoji: string) => void;
2244
+ onDelete?: () => void;
2245
+ onOpenChange?: (open: boolean) => void;
2246
+ onUpload?: AvatarUploaderProps['onUpload'];
2247
+ open?: boolean;
2248
+ popupClassName?: string;
2249
+ popupProps?: Omit<PopoverProps, 'onOpenChange' | 'defaultOpen' | 'content' | 'open' | 'trigger' | 'children'>;
2250
+ popupStyle?: CSSProperties;
2251
+ size?: number;
2252
+ texts?: AvatarUploaderProps['texts'] & {
2253
+ delete?: string;
2254
+ emoji?: string;
2255
+ upload?: string;
2256
+ };
2257
+ value?: string;
2258
+ }
2259
+
2260
+ declare const EmojiPicker: react.NamedExoticComponent<EmojiPickerProps>;
2261
+
2262
+ interface EmptyProps extends Omit<FlexProps, 'title'> {
2263
+ action?: ReactNode;
2264
+ actionProps?: Omit<FlexProps, 'children'>;
2265
+ description?: ReactNode;
2266
+ descriptionProps?: Omit<TextProps, 'children'>;
2267
+ emoji?: string;
2268
+ icon?: IconProps$1['icon'];
2269
+ iconColor?: IconProps$1['color'];
2270
+ image?: ReactNode;
2271
+ imageProps?: Omit<BlockProps, 'children'>;
2272
+ imageSize?: number;
2273
+ title?: ReactNode;
2274
+ titleProps?: Omit<TextProps, 'children'>;
2275
+ type?: 'default' | 'page';
2276
+ }
2277
+
2278
+ declare const Empty: FC<EmptyProps>;
2279
+
2280
+ type IconProps = SvgProps & DivProps;
2281
+ interface FileTypeIconProps extends IconProps {
2282
+ color?: string;
2283
+ filetype?: string;
2284
+ icon?: ReactNode;
2285
+ ref?: Ref<HTMLDivElement>;
2286
+ size?: number;
2287
+ type?: 'file' | 'folder';
2288
+ variant?: 'color' | 'mono';
2289
+ }
2290
+
2291
+ declare const FileTypeIcon: FC<FileTypeIconProps>;
2292
+
2293
+ type EmojiType = 'anim' | 'flat' | 'modern' | 'mono' | 'raw' | '3d';
2294
+
2295
+ interface FluentEmojiProps extends DivProps {
2296
+ emoji: string;
2297
+ ref?: Ref<HTMLImageElement>;
2298
+ size?: number;
2299
+ type?: EmojiType;
2300
+ unoptimized?: boolean;
2301
+ }
2302
+
2303
+ declare const FluentEmoji: FC<FluentEmojiProps>;
2304
+
2305
+ interface FontLoaderProps {
2306
+ url: string;
2307
+ }
2308
+ declare const FontLoader: react.NamedExoticComponent<FontLoaderProps>;
2309
+
2310
+ interface FooterProps extends FlexProps {
2311
+ bottom?: ReactNode;
2312
+ columns: FooterProps$1['columns'];
2313
+ contentMaxWidth?: number;
2314
+ theme?: 'light' | 'dark';
2315
+ }
2316
+
2317
+ declare const Footer: react.NamedExoticComponent<FooterProps>;
2318
+
2319
+ interface FormConfig<T extends Record<string, any>> {
2320
+ initialValues: T;
2321
+ onSubmit: (values: T) => void | Promise<void>;
2322
+ validate?: (values: T) => Partial<Record<keyof T, string>>;
2323
+ }
2324
+ interface FormState<T extends Record<string, any>> {
2325
+ values: T;
2326
+ errors: Partial<Record<keyof T, string>>;
2327
+ fieldErrors: Partial<Record<keyof T, string>>;
2328
+ touched: Partial<Record<keyof T, boolean>>;
2329
+ isSubmitting: boolean;
2330
+ isValid: boolean;
2331
+ validationSequence: number;
2332
+ }
2333
+ declare function useForm<T extends Record<string, any>>(config: FormConfig<T>): {
2334
+ readonly form: {
2335
+ readonly values: T;
2336
+ readonly errors: Partial<Record<keyof T, string>>;
2337
+ readonly fieldErrors: Partial<Record<keyof T, string>>;
2338
+ readonly touched: Partial<Record<keyof T, boolean>>;
2339
+ readonly validationSequence: number;
2340
+ readonly setFieldValue: (field: PropertyKey, value: unknown) => void;
2341
+ readonly setFieldError: (field: PropertyKey, error?: string) => void;
2342
+ readonly setFieldTouched: (field: PropertyKey, touched?: boolean) => void;
2343
+ readonly handleChange: (e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => void;
2344
+ readonly handleBlur: (e: FocusEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => void;
2345
+ readonly handleSubmit: (e?: FormEvent) => Promise<void>;
2346
+ readonly resetForm: () => void;
2347
+ readonly validateForm: () => boolean;
2348
+ readonly triggerValidation: () => void;
2349
+ readonly isSubmitting: boolean;
2350
+ readonly isValid: boolean;
2351
+ };
2352
+ readonly setFieldValue: (field: keyof T, value: any) => void;
2353
+ readonly setFieldTouched: (field: keyof T, touched?: boolean) => void;
2354
+ readonly setFieldError: (field: keyof T, error?: string) => void;
2355
+ readonly handleChange: (e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => void;
2356
+ readonly handleBlur: (e: FocusEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => void;
2357
+ readonly handleSubmit: (e?: FormEvent) => void;
2358
+ readonly resetForm: () => void;
2359
+ readonly validateForm: () => boolean;
2360
+ readonly triggerValidation: () => void;
2361
+ readonly values: T;
2362
+ readonly errors: Partial<Record<keyof T, string>>;
2363
+ readonly fieldErrors: Partial<Record<keyof T, string>>;
2364
+ readonly touched: Partial<Record<keyof T, boolean>>;
2365
+ readonly isSubmitting: boolean;
2366
+ readonly isValid: boolean;
2367
+ readonly validationSequence: number;
2368
+ };
2369
+ type UseFormReturn<T extends Record<string, any>> = ReturnType<typeof useForm<T>>;
2370
+
2371
+ type FormVariant = 'borderless' | 'filled' | 'outlined';
2372
+ interface FormProps<T extends Record<string, any>> extends Omit<FormHTMLAttributes<HTMLFormElement>, 'onSubmit'> {
2373
+ children: ReactNode;
2374
+ onSubmit?: (values: T) => void | Promise<void>;
2375
+ form?: UseFormReturn<T>;
2376
+ initialValues?: T;
2377
+ validate?: (values: T) => Partial<Record<keyof T, string>>;
2378
+ className?: string;
2379
+ /**
2380
+ * Layout of form fields.
2381
+ * - `vertical`: label/description stacked above control (default)
2382
+ * - `horizontal`: label/description on the left, control on the right
2383
+ */
2384
+ layout?: 'vertical' | 'horizontal';
2385
+ /**
2386
+ * When `layout="horizontal"`, sets the width of the label/description column.
2387
+ * Accepts any CSS width value (e.g., `180px`, `12rem`, `30%`).
2388
+ * @default '200px'
2389
+ */
2390
+ labelWidth?: string | number;
2391
+ fieldMinWidth?: string | number;
2392
+ /**
2393
+ * Shared visual style for form wrappers and field components.
2394
+ * @default 'borderless'
2395
+ */
2396
+ variant?: FormVariant;
2397
+ }
2398
+ interface FormGroupProps {
2399
+ /** Group title */
2400
+ title?: ReactNode;
2401
+ /** Group description */
2402
+ description?: ReactNode;
2403
+ /** Group icon (component or element) */
2404
+ icon?: any;
2405
+ /** Extra content on the right side of the header */
2406
+ extra?: ReactNode;
2407
+ /** Group children */
2408
+ children?: ReactNode;
2409
+ /** Additional CSS class */
2410
+ className?: string;
2411
+ /** Style object */
2412
+ style?: CSSProperties;
2413
+ /** Whether the group is collapsible */
2414
+ collapsible?: boolean;
2415
+ /** Whether the group is collapsed by default */
2416
+ defaultCollapsed?: boolean;
2417
+ /** Variant style for the group container */
2418
+ variant?: FormVariant;
2419
+ }
2420
+
2421
+ declare function Form<T extends Record<string, any>>({ children, onSubmit, form, initialValues, validate, className, style, layout, labelWidth, variant, fieldMinWidth, ...props }: FormProps<T>): react_jsx_runtime.JSX.Element;
2422
+ declare namespace Form {
2423
+ var displayName: string;
2424
+ }
2425
+
2426
+ type FormErrorProps = {
2427
+ message?: string;
2428
+ className?: string;
2429
+ style?: react__default.CSSProperties;
2430
+ };
2431
+ declare const FormError: {
2432
+ ({ message, className, style }: FormErrorProps): react_jsx_runtime.JSX.Element | null;
2433
+ displayName: string;
2434
+ };
2435
+
2436
+ type FormInputProps<T extends Record<string, any>> = Omit<InputProps, 'name' | 'value' | 'onChange' | 'onBlur' | 'defaultValue' | 'form'> & {
2437
+ name: keyof T & string;
2438
+ label?: string;
2439
+ description?: react__default.ReactNode;
2440
+ form?: UseFormReturn<T>;
2441
+ required?: boolean;
2442
+ helperText?: react__default.ReactNode;
2443
+ onChange?: InputProps['onChange'];
2444
+ onBlur?: InputProps['onBlur'];
2445
+ rules?: FormFieldRules<T>;
2446
+ };
2447
+ type FormFieldRules<T extends Record<string, any>> = {
2448
+ required?: boolean | string | {
2449
+ message: string;
2450
+ };
2451
+ pattern?: {
2452
+ value: RegExp;
2453
+ message: string;
2454
+ };
2455
+ minLength?: {
2456
+ value: number;
2457
+ message: string;
2458
+ };
2459
+ maxLength?: {
2460
+ value: number;
2461
+ message: string;
2462
+ };
2463
+ validate?: (value: any, values: T) => string | boolean | void;
2464
+ } | string;
2465
+ declare const runRules: <T extends Record<string, any>>(rules: FormFieldRules<T> | undefined, value: any, values: T) => string | undefined;
2466
+ declare const FormInput: {
2467
+ <T extends Record<string, any>>({ name, label, description, form, required, helperText, className, id, variant: inputVariant, onChange, onBlur, rules, ...inputProps }: FormInputProps<T>): react_jsx_runtime.JSX.Element;
2468
+ displayName: string;
2469
+ };
2470
+
2471
+ type FormLabelProps = {
2472
+ htmlFor?: string;
2473
+ children: react__default.ReactNode;
2474
+ className?: string;
2475
+ description?: react__default.ReactNode;
2476
+ required?: boolean;
2477
+ };
2478
+ declare const FormLabel: {
2479
+ ({ htmlFor, children, className, description, required }: FormLabelProps): react_jsx_runtime.JSX.Element;
2480
+ displayName: string;
2481
+ };
2482
+
2483
+ type FormTimePickerProps<T extends Record<string, any>> = Omit<TimePickerProps, 'name' | 'value' | 'onChange' | 'defaultValue' | 'form'> & {
2484
+ name: keyof T & string;
2485
+ label?: string;
2486
+ description?: react__default.ReactNode;
2487
+ form?: UseFormReturn<T>;
2488
+ required?: boolean;
2489
+ onValueChange?: (value: string | null, formatted: string) => void;
2490
+ rules?: FormFieldRules<T>;
2491
+ };
2492
+ declare const FormTimePicker: {
2493
+ <T extends Record<string, any>>({ name, label, description, form, required, className, variant: timeVariant, onValueChange, rules, ...pickerProps }: FormTimePickerProps<T>): react_jsx_runtime.JSX.Element;
2494
+ displayName: string;
2495
+ };
2496
+
2497
+ type FormCheckboxProps<T extends Record<string, any>> = Omit<CheckboxProps, 'checked' | 'defaultChecked' | 'onChange'> & {
2498
+ name: keyof T & string;
2499
+ label?: react__default.ReactNode;
2500
+ description?: react__default.ReactNode;
2501
+ form?: UseFormReturn<T>;
2502
+ rules?: FormFieldRules<T>;
2503
+ onChange?: (checked: boolean) => void;
2504
+ };
2505
+ declare const FormCheckbox: {
2506
+ <T extends Record<string, any>>({ name, label, description, form, className, rules, onChange, ...rest }: FormCheckboxProps<T>): react_jsx_runtime.JSX.Element;
2507
+ displayName: string;
2508
+ };
2509
+
2510
+ type SwitchSize = 'default' | 'small';
2511
+ type SwitchChangeEventHandler = (checked: boolean, event: MouseEvent<HTMLButtonElement> | KeyboardEvent<HTMLButtonElement>) => void;
2512
+ type SwitchClickEventHandler = SwitchChangeEventHandler;
2513
+ interface SwitchClassNames {
2514
+ content?: string;
2515
+ root?: string;
2516
+ thumb?: string;
2517
+ }
2518
+ interface SwitchStyles {
2519
+ content?: CSSProperties;
2520
+ root?: CSSProperties;
2521
+ thumb?: CSSProperties;
2522
+ }
2523
+ interface SwitchContextType {
2524
+ isChecked: boolean;
2525
+ isPressed: boolean;
2526
+ setIsChecked: (checked: boolean) => void;
2527
+ setIsPressed: (pressed: boolean) => void;
2528
+ }
2529
+ type SwitchRootProps = Omit<ComponentProps<typeof Switch$1.Root>, 'render'> & HTMLMotionProps<'button'> & {
2530
+ size?: SwitchSize;
2531
+ };
2532
+ type SwitchThumbProps = Omit<ComponentProps<typeof Switch$1.Thumb>, 'render'> & HTMLMotionProps<'span'> & {
2533
+ pressedAnimation?: TargetAndTransition | boolean;
2534
+ size?: SwitchSize;
2535
+ transition?: Transition;
2536
+ };
2537
+ type SwitchIconPosition = 'left' | 'right' | 'thumb';
2538
+ type SwitchIconProps = HTMLMotionProps<'span'> & {
2539
+ position: SwitchIconPosition;
2540
+ transition?: Transition;
2541
+ };
2542
+ interface SwitchProps {
2543
+ /**
2544
+ * Whether to set focus automatically when mounted
2545
+ */
2546
+ autoFocus?: boolean;
2547
+ /**
2548
+ * Whether the switch is checked
2549
+ */
2550
+ checked?: boolean;
2551
+ /**
2552
+ * Icon to show when checked (left position)
2553
+ */
2554
+ checkedChildren?: ReactNode;
2555
+ /**
2556
+ * Custom class name
2557
+ */
2558
+ className?: string;
2559
+ /**
2560
+ * Custom class names for each part
2561
+ */
2562
+ classNames?: SwitchClassNames;
2563
+ /**
2564
+ * Initial checked state (uncontrolled)
2565
+ */
2566
+ defaultChecked?: boolean;
2567
+ /**
2568
+ * Alias for `defaultChecked`
2569
+ */
2570
+ defaultValue?: boolean;
2571
+ /**
2572
+ * Whether the switch is disabled
2573
+ */
2574
+ disabled?: boolean;
2575
+ /**
2576
+ * Element id
2577
+ */
2578
+ id?: string;
2579
+ /**
2580
+ * Show loading indicator
2581
+ */
2582
+ loading?: boolean;
2583
+ /**
2584
+ * Name attribute for form submission
2585
+ */
2586
+ name?: string;
2587
+ /**
2588
+ * Callback when the switch state changes
2589
+ */
2590
+ onChange?: SwitchChangeEventHandler;
2591
+ /**
2592
+ * Callback when clicking the switch
2593
+ */
2594
+ onClick?: SwitchClickEventHandler;
2595
+ /**
2596
+ * Reference to the root element
2597
+ */
2598
+ ref?: Ref<HTMLButtonElement>;
2599
+ /**
2600
+ * Additional class name for root element
2601
+ */
2602
+ rootClassName?: string;
2603
+ /**
2604
+ * Size of the switch
2605
+ * @default 'default'
2606
+ */
2607
+ size?: SwitchSize;
2608
+ /**
2609
+ * Custom inline style
2610
+ */
2611
+ style?: CSSProperties;
2612
+ /**
2613
+ * Custom styles for each part
2614
+ */
2615
+ styles?: SwitchStyles;
2616
+ /**
2617
+ * Tab index for keyboard navigation
2618
+ */
2619
+ tabIndex?: number;
2620
+ /**
2621
+ * Native title attribute
2622
+ */
2623
+ title?: string;
2624
+ /**
2625
+ * Icon to show when unchecked (right position)
2626
+ */
2627
+ unCheckedChildren?: ReactNode;
2628
+ /**
2629
+ * Alias for `checked`
2630
+ */
2631
+ value?: boolean;
2632
+ }
2633
+
2634
+ type FormSwitchProps<T extends Record<string, any>> = Omit<SwitchProps, 'checked' | 'defaultChecked' | 'onChange' | 'value'> & {
2635
+ name: keyof T & string;
2636
+ label?: string;
2637
+ description?: react__default.ReactNode;
2638
+ form?: UseFormReturn<T>;
2639
+ rules?: FormFieldRules<T>;
2640
+ onChange?: (checked: boolean) => void;
2641
+ };
2642
+ declare const FormSwitch: {
2643
+ <T extends Record<string, any>>({ name, label, description, form, className, rules, onChange, ...rest }: FormSwitchProps<T>): react_jsx_runtime.JSX.Element;
2644
+ displayName: string;
2645
+ };
2646
+
2647
+ type FormDatePickerProps<T extends Record<string, any>> = Omit<DatePickerProps, 'name' | 'value' | 'onChange' | 'defaultValue' | 'form'> & {
2648
+ name: keyof T & string;
2649
+ label?: string;
2650
+ description?: react__default.ReactNode;
2651
+ form?: UseFormReturn<T>;
2652
+ rules?: FormFieldRules<T>;
2653
+ };
2654
+ declare const FormDatePicker: {
2655
+ <T extends Record<string, any>>({ name, label, description, form, className, variant: dateVariant, rules, ...rest }: FormDatePickerProps<T>): react_jsx_runtime.JSX.Element;
2656
+ displayName: string;
2657
+ };
2658
+
2659
+ type FormSelectProps<T extends Record<string, any>, Value = string> = Omit<SelectProps<Value>, 'name' | 'value' | 'onChange' | 'defaultValue' | 'form'> & {
2660
+ name: keyof T & string;
2661
+ label?: string;
2662
+ description?: react__default.ReactNode;
2663
+ form?: UseFormReturn<T>;
2664
+ rules?: FormFieldRules<T>;
2665
+ options?: SelectOption<Value>[];
2666
+ };
2667
+ declare const FormSelect: {
2668
+ <T extends Record<string, any>, Value = string>({ name, label, description, form, className, variant: selectVariant, rules, ...rest }: FormSelectProps<T, Value>): react_jsx_runtime.JSX.Element;
2669
+ displayName: string;
2670
+ };
2671
+
2672
+ type FormSegmentProps = {
2673
+ title?: react__default.ReactNode;
2674
+ description?: react__default.ReactNode;
2675
+ children?: react__default.ReactNode;
2676
+ className?: string;
2677
+ collapsible?: boolean;
2678
+ defaultCollapsed?: boolean;
2679
+ };
2680
+ declare const FormSegment: {
2681
+ ({ title, description, children, className, collapsible, defaultCollapsed, }: FormSegmentProps): react_jsx_runtime.JSX.Element;
2682
+ displayName: string;
2683
+ };
2684
+
2685
+ declare const FormGroup: {
2686
+ ({ title, description, icon, extra, children, className, style, collapsible, defaultCollapsed, variant: groupVariant, }: FormGroupProps): react_jsx_runtime.JSX.Element;
2687
+ displayName: string;
2688
+ };
2689
+
2690
+ type FormComponent = <T extends Record<string, any>>(props: FormProps<T> & RefAttributes<HTMLFormElement>) => ReturnType<typeof Form>;
2691
+ type FormCompound = FormComponent & {
2692
+ Input: typeof FormInput;
2693
+ Label: typeof FormLabel;
2694
+ Error: typeof FormError;
2695
+ TimePicker: typeof FormTimePicker;
2696
+ Checkbox: typeof FormCheckbox;
2697
+ Switch: typeof FormSwitch;
2698
+ DatePicker: typeof FormDatePicker;
2699
+ Select: typeof FormSelect;
2700
+ Segment: typeof FormSegment;
2701
+ Group: typeof FormGroup;
2702
+ };
2703
+ declare const FormComponentImpl: FormCompound;
2704
+
2705
+ type ModalProps = Omit<ModalProps$1, 'okType' | 'wrapClassName'> & {
2706
+ allowFullscreen?: boolean;
2707
+ enableResponsive?: boolean;
2708
+ paddings?: {
2709
+ desktop?: number;
2710
+ mobile?: number;
2711
+ };
2712
+ };
2713
+ type ModalContextValue = {
2714
+ close: () => void;
2715
+ setCanDismissByClickOutside: (value: boolean) => void;
2716
+ };
2717
+ type ModalInstance = ModalContextValue & {
2718
+ destroy: () => void;
2719
+ update: (nextProps: Partial<ImperativeModalProps>) => void;
2720
+ };
2721
+ type ImperativeModalProps = ModalProps;
2722
+ type RawModalComponentProps = {
2723
+ onClose: () => void;
2724
+ open: boolean;
2725
+ };
2726
+ type RawModalComponent<P = any> = ComponentType<P>;
2727
+ type RawModalOptions<OpenKey extends PropertyKey = 'open', CloseKey extends PropertyKey = 'onClose'> = {
2728
+ destroyDelay?: number;
2729
+ destroyOnClose?: boolean;
2730
+ onCloseKey?: CloseKey;
2731
+ openKey?: OpenKey;
2732
+ };
2733
+ type RawModalKeyOptions<OpenKey extends PropertyKey = 'open', CloseKey extends PropertyKey = 'onClose'> = RawModalOptions<OpenKey, CloseKey> & {
2734
+ onCloseKey: CloseKey;
2735
+ openKey: OpenKey;
2736
+ };
2737
+ type RawModalInstance<P = any, OpenKey extends PropertyKey = 'open', CloseKey extends PropertyKey = 'onClose'> = ModalContextValue & {
2738
+ destroy: () => void;
2739
+ update: (nextProps: Partial<Omit<P, Extract<OpenKey, keyof P> | Extract<CloseKey, keyof P>>>) => void;
2740
+ };
2741
+
2742
+ type ModalHostProps = {
2743
+ root?: HTMLElement | ShadowRoot | null;
2744
+ };
2745
+ declare const ModalHost: ({ root }: ModalHostProps) => react_jsx_runtime.JSX.Element | null;
2746
+ declare const createModal: (props: ImperativeModalProps) => ModalInstance;
2747
+ declare function createRawModal<P extends RawModalComponentProps>(component: RawModalComponent<P>, props: Omit<P, 'open' | 'onClose'>, options?: RawModalOptions): RawModalInstance<P>;
2748
+ declare function createRawModal<P, OpenKey extends keyof P, CloseKey extends keyof P>(component: RawModalComponent<P>, props: Omit<P, OpenKey | CloseKey>, options: RawModalKeyOptions<OpenKey, CloseKey>): RawModalInstance<P, OpenKey, CloseKey>;
2749
+
2750
+ declare const Modal: react.NamedExoticComponent<ModalProps>;
2751
+
2752
+ declare const ModalProvider: react.NamedExoticComponent<{
2753
+ children: ReactNode;
2754
+ value: ModalContextValue;
2755
+ }>;
2756
+ declare const useModalContext: () => ModalContextValue;
2757
+
2758
+ interface FormModalProps<T extends Record<string, any>> extends Omit<ModalProps, 'footer' | 'onOk' | 'children' | 'title'> {
2759
+ children: ReactNode;
2760
+ form?: UseFormReturn<T>;
2761
+ initialValues?: T;
2762
+ onSubmit?: FormProps<T>['onSubmit'];
2763
+ submitButtonProps?: ButtonProps;
2764
+ submitText?: string;
2765
+ title?: ReactNode;
2766
+ validate?: FormProps<T>['validate'];
2767
+ loading?: boolean;
2768
+ }
2769
+
2770
+ declare const FormModal: {
2771
+ <T extends Record<string, any>>({ children, form, initialValues, onSubmit, validate, submitText, submitButtonProps, loading, ...modalProps }: FormModalProps<T>): react_jsx_runtime.JSX.Element;
2772
+ displayName: string;
2773
+ };
2774
+
2775
+ interface GridProps extends Omit<FlexProps, 'gap'> {
2776
+ gap?: string | number;
2777
+ maxItemWidth?: string | number;
2778
+ ref?: Ref<HTMLDivElement>;
2779
+ rows?: number;
2780
+ }
2781
+
2782
+ declare const Grid: FC<GridProps>;
2783
+
2784
+ /**
2785
+ * Predefined smooth corners masks for common corner values
2786
+ */
2787
+ declare const SMOOTH_CORNER_MASKS: {
2788
+ readonly circle: string;
2789
+ readonly ios: string;
2790
+ readonly sharp: string;
2791
+ readonly smooth: string;
2792
+ readonly square: string;
2793
+ readonly squircle: string;
2794
+ };
2795
+
2796
+ type AvatarItem = string | Omit<AvatarProps, 'size'>;
2797
+ interface GroupAvatarProps extends Omit<BlockProps, 'width' | 'height' | 'variant'> {
2798
+ avatarShape?: AvatarProps['shape'];
2799
+ avatars?: AvatarItem[];
2800
+ cornerShape?: keyof typeof SMOOTH_CORNER_MASKS;
2801
+ grid?: 2 | 3 | 'auto';
2802
+ ref?: Ref<HTMLDivElement>;
2803
+ size?: number;
2804
+ }
2805
+
2806
+ declare const GroupAvatar: FC<GroupAvatarProps>;
2807
+
2808
+ interface GuideCardProps extends Omit<FlexProps, 'title'> {
2809
+ afterClose?: () => void;
2810
+ alt?: string;
2811
+ classNames?: {
2812
+ content?: string;
2813
+ cover?: string;
2814
+ };
2815
+ closable?: boolean;
2816
+ closeIconProps?: Omit<ActionIconProps, 'icon' | 'onClick'>;
2817
+ cover?: string;
2818
+ coverProps?: ImgProps & ImageProps$2 & {
2819
+ priority?: boolean;
2820
+ };
2821
+ desc?: ReactNode;
2822
+ height?: number;
2823
+ onClose?: ActionIconProps['onClick'];
2824
+ ref?: Ref<HTMLDivElement>;
2825
+ shadow?: boolean;
2826
+ styles?: {
2827
+ content?: CSSProperties;
2828
+ cover?: CSSProperties;
2829
+ };
2830
+ title?: ReactNode;
2831
+ variant?: 'filled' | 'outlined' | 'borderless';
2832
+ width?: number;
2833
+ }
2834
+
2835
+ declare const GuideCard: react.NamedExoticComponent<GuideCardProps>;
2836
+
2837
+ interface HeaderProps extends FlexProps {
2838
+ actions?: ReactNode;
2839
+ actionsClassName?: string;
2840
+ actionsStyle?: CSSProperties;
2841
+ logo?: ReactNode;
2842
+ logoClassName?: string;
2843
+ logoStyle?: CSSProperties;
2844
+ nav?: ReactNode;
2845
+ navClassName?: string;
2846
+ navStyle?: CSSProperties;
2847
+ ref?: Ref<HTMLDivElement>;
2848
+ }
2849
+
2850
+ declare const Header: react.NamedExoticComponent<HeaderProps>;
2851
+
2852
+ interface HighlighterThemeItem {
2853
+ displayName: string;
2854
+ id: string;
2855
+ }
2856
+ declare const highlighterThemes: HighlighterThemeItem[];
2857
+
2858
+ interface SyntaxHighlighterProps extends DivProps {
2859
+ animated?: boolean;
2860
+ children: string;
2861
+ enableTransformer?: HighlighterProps['enableTransformer'];
2862
+ language: HighlighterProps['language'];
2863
+ ref?: Ref<HTMLDivElement>;
2864
+ theme?: HighlighterProps['theme'];
2865
+ variant?: HighlighterProps['variant'];
2866
+ }
2867
+ interface HighlighterProps extends Omit<FlexProps, 'children' | 'wrap'> {
2868
+ actionIconSize?: ActionIconProps['size'];
2869
+ actionsRender?: (props: {
2870
+ actionIconSize: ActionIconProps['size'];
2871
+ content: string;
2872
+ getContent: () => string;
2873
+ language: string;
2874
+ originalNode: ReactNode;
2875
+ }) => ReactNode;
2876
+ allowChangeLanguage?: boolean;
2877
+ animated?: boolean;
2878
+ bodyRender?: (props: {
2879
+ content: string;
2880
+ language: string;
2881
+ originalNode: ReactNode;
2882
+ }) => ReactNode;
2883
+ children: string;
2884
+ classNames?: {
2885
+ body?: string;
2886
+ content?: string;
2887
+ header?: string;
2888
+ };
2889
+ copyable?: boolean;
2890
+ defaultExpand?: boolean;
2891
+ enableTransformer?: boolean;
2892
+ fileName?: string;
2893
+ fullFeatured?: boolean;
2894
+ icon?: ReactNode;
2895
+ language: string;
2896
+ shadow?: boolean;
2897
+ showLanguage?: boolean;
2898
+ styles?: {
2899
+ body?: CSSProperties;
2900
+ content?: CSSProperties;
2901
+ header?: CSSProperties;
2902
+ };
2903
+ theme?: 'lobe-theme' | BuiltinTheme;
2904
+ variant?: 'filled' | 'outlined' | 'borderless';
2905
+ wrap?: boolean;
2906
+ }
2907
+
2908
+ declare const Highlighter: react.NamedExoticComponent<HighlighterProps>;
2909
+
2910
+ declare const SyntaxHighlighter: react.NamedExoticComponent<SyntaxHighlighterProps>;
2911
+
2912
+ /**
2913
+ * Preprocessing options for markdown content
2914
+ */
2915
+ interface PreprocessOptions {
2916
+ citationsLength?: number;
2917
+ enableCustomFootnotes?: boolean;
2918
+ enableLatex?: boolean;
2919
+ }
2920
+ declare const preprocessMarkdownContent: (str: string, { enableCustomFootnotes, enableLatex, citationsLength }?: PreprocessOptions) => string;
2921
+
2922
+ interface HotkeyInputProps {
2923
+ allowReset?: boolean;
2924
+ className?: string;
2925
+ defaultValue?: string;
2926
+ disabled?: boolean;
2927
+ hotkeyConflicts?: string[];
2928
+ isApple?: boolean;
2929
+ onBlur?: InputProps$1['onBlur'];
2930
+ onChange?: (value: string) => void;
2931
+ onConflict?: (conflictKey: string) => void;
2932
+ onFocus?: InputProps$1['onFocus'];
2933
+ onReset?: (currentValue: string, resetValue: string) => void;
2934
+ placeholder?: string;
2935
+ resetValue?: string;
2936
+ shadow?: boolean;
2937
+ style?: CSSProperties;
2938
+ texts?: {
2939
+ conflicts?: string;
2940
+ invalidCombination?: string;
2941
+ reset?: string;
2942
+ };
2943
+ value?: string;
2944
+ variant?: 'filled' | 'borderless' | 'outlined';
2945
+ }
2946
+
2947
+ declare const HotkeyInput: react.NamedExoticComponent<HotkeyInputProps>;
2948
+
2949
+ interface PreviewGroupPreviewOptions extends GroupPreviewConfig {
2950
+ classNames?: {
2951
+ root?: string;
2952
+ };
2953
+ toolbarAddon?: ReactNode;
2954
+ }
2955
+ interface PreviewGroupProps {
2956
+ children?: ReactNode;
2957
+ enable?: boolean;
2958
+ items?: string[];
2959
+ preview?: boolean | PreviewGroupPreviewOptions;
2960
+ }
2961
+ interface ImagePreviewOptions extends PreviewConfig {
2962
+ toolbarAddon?: ReactNode;
2963
+ }
2964
+ interface ImageProps$1 extends Omit<ImageProps$2, 'preview'> {
2965
+ actions?: ReactNode;
2966
+ alwaysShowActions?: boolean;
2967
+ classNames?: {
2968
+ image?: string;
2969
+ wrapper?: string;
2970
+ };
2971
+ isLoading?: boolean;
2972
+ maxHeight?: number | string;
2973
+ maxWidth?: number | string;
2974
+ minHeight?: number | string;
2975
+ minWidth?: number | string;
2976
+ objectFit?: 'cover' | 'contain';
2977
+ preview?: boolean | ImagePreviewOptions;
2978
+ ref?: Ref<HTMLDivElement>;
2979
+ size?: number | string;
2980
+ styles?: {
2981
+ image?: CSSProperties;
2982
+ wrapper?: CSSProperties;
2983
+ };
2984
+ toolbarAddon?: ReactNode;
2985
+ variant?: 'borderless' | 'filled' | 'outlined';
2986
+ }
2987
+
2988
+ declare const PreviewGroup: react.NamedExoticComponent<PreviewGroupProps>;
2989
+
2990
+ interface IImage {
2991
+ (props: ImageProps$1): ReactNode;
2992
+ PreviewGroup: typeof PreviewGroup;
2993
+ }
2994
+ declare const Image: IImage;
2995
+
2996
+ interface ImageSelectItem {
2997
+ alt?: string;
2998
+ icon?: IconProps$1['icon'];
2999
+ img: string;
3000
+ label: ReactNode;
3001
+ value: string;
3002
+ }
3003
+ interface ImageSelectProps extends FlexProps {
3004
+ className?: string;
3005
+ classNames?: {
3006
+ img?: string;
3007
+ };
3008
+ defaultValue?: SelectProps$1['defaultValue'];
3009
+ height?: number;
3010
+ onChange?: (value: this['value']) => void;
3011
+ options?: ImageSelectItem[];
3012
+ ref?: Ref<HTMLDivElement>;
3013
+ style?: CSSProperties;
3014
+ styles?: {
3015
+ img?: CSSProperties;
3016
+ };
3017
+ unoptimized?: boolean;
3018
+ value?: SelectProps$1['value'];
3019
+ width?: number;
3020
+ }
3021
+
3022
+ declare const ImageSelect: react.NamedExoticComponent<ImageSelectProps>;
3023
+
3024
+ declare const LayoutFooter: react.NamedExoticComponent<DivProps>;
3025
+
3026
+ interface LayoutProps {
3027
+ asideWidth?: number;
3028
+ children?: ReactNode;
3029
+ content?: ReactNode;
3030
+ footer?: ReactNode;
3031
+ header?: ReactNode;
3032
+ headerHeight?: number;
3033
+ helmet?: ReactNode;
3034
+ sidebar?: ReactNode;
3035
+ toc?: ReactNode;
3036
+ tocWidth?: number;
3037
+ }
3038
+ type LayoutFooterProps = DivProps;
3039
+ interface LayoutHeaderProps extends DivProps {
3040
+ headerHeight?: number;
3041
+ }
3042
+ type LayoutMainProps = DivProps;
3043
+ interface LayoutSidebarProps extends DivProps {
3044
+ headerHeight?: number;
3045
+ }
3046
+ interface LayoutSidebarInnerProps extends DivProps {
3047
+ headerHeight?: number;
3048
+ }
3049
+ interface LayoutTocProps extends DivProps {
3050
+ tocWidth?: number;
3051
+ }
3052
+
3053
+ declare const LayoutHeader: react.NamedExoticComponent<LayoutHeaderProps>;
3054
+
3055
+ declare const LayoutMain: react.NamedExoticComponent<DivProps>;
3056
+
3057
+ declare const LayoutSidebar: react.NamedExoticComponent<LayoutSidebarProps>;
3058
+
3059
+ declare const LayoutSidebarInner: react.NamedExoticComponent<LayoutSidebarInnerProps>;
3060
+
3061
+ declare const LayoutToc: react.NamedExoticComponent<LayoutTocProps>;
3062
+
3063
+ interface ILayout {
3064
+ (props: LayoutProps): ReactNode;
3065
+ Footer: typeof LayoutFooter;
3066
+ Header: typeof LayoutHeader;
3067
+ Main: typeof LayoutMain;
3068
+ Sidebar: typeof LayoutSidebar;
3069
+ SidebarInner: typeof LayoutSidebarInner;
3070
+ Toc: typeof LayoutToc;
3071
+ }
3072
+ declare const Layout: ILayout;
3073
+
3074
+ interface ListItemProps extends Omit<FlexProps, 'title'> {
3075
+ actions?: ReactNode;
3076
+ active?: boolean;
3077
+ addon?: ReactNode;
3078
+ avatar?: ReactNode;
3079
+ classNames?: {
3080
+ actions?: string;
3081
+ container?: string;
3082
+ content?: string;
3083
+ date?: string;
3084
+ desc?: string;
3085
+ pin?: string;
3086
+ title?: string;
3087
+ };
3088
+ date?: number;
3089
+ description?: ReactNode;
3090
+ key: string;
3091
+ loading?: boolean;
3092
+ onHoverChange?: (hover: boolean) => void;
3093
+ pin?: boolean;
3094
+ ref?: Ref<HTMLDivElement>;
3095
+ showAction?: boolean;
3096
+ styles?: {
3097
+ actions?: CSSProperties;
3098
+ container?: CSSProperties;
3099
+ content?: CSSProperties;
3100
+ date?: CSSProperties;
3101
+ desc?: CSSProperties;
3102
+ pin?: CSSProperties;
3103
+ title?: CSSProperties;
3104
+ };
3105
+ title: ReactNode;
3106
+ }
3107
+ interface ListProps extends Omit<FlexProps, 'onClick'> {
3108
+ activeKey?: string;
3109
+ classNames?: {
3110
+ item?: string;
3111
+ } & ListItemProps['classNames'];
3112
+ items: ListItemProps[];
3113
+ onClick?: (props: {
3114
+ item: ListItemProps;
3115
+ key: ListItemProps['key'];
3116
+ }) => void;
3117
+ ref?: Ref<HTMLDivElement>;
3118
+ styles?: {
3119
+ item?: CSSProperties;
3120
+ } & ListItemProps['styles'];
3121
+ }
3122
+
3123
+ declare const ListItem: react.NamedExoticComponent<ListItemProps>;
3124
+
3125
+ interface IList {
3126
+ (props: ListProps & RefAttributes<HTMLDivElement>): ReactNode;
3127
+ Item: typeof ListItem;
3128
+ }
3129
+ declare const List: IList;
3130
+
3131
+ declare const SELECT_CONTAINER_ATTR = "data-custom-select-container";
3132
+ declare const CUSTOM_SELECT_CONTAINER_ATTR = "data-custom-select-container";
3133
+
3134
+ declare const SelectRoot: typeof Select$1.Root;
3135
+ declare const SelectBackdrop: react.ForwardRefExoticComponent<_base_ui_react_select.SelectBackdropProps & react.RefAttributes<HTMLDivElement>>;
3136
+ declare const SelectSeparator: react.ForwardRefExoticComponent<node_modules__base_ui_react_esm_separator_Separator.SeparatorProps & react.RefAttributes<HTMLDivElement>>;
3137
+ type SelectTriggerProps = Omit<ComponentPropsWithRef<typeof Select$1.Trigger>, 'children' | 'render'> & {
3138
+ children: ComponentProps<typeof Select$1.Trigger>['children'];
3139
+ shadow?: boolean;
3140
+ size?: SelectSize;
3141
+ variant?: SelectVariant;
3142
+ };
3143
+ declare const SelectTrigger: {
3144
+ ({ children, className, nativeButton, shadow, size, variant, ref: refProp, ...rest }: SelectTriggerProps): react_jsx_runtime.JSX.Element;
3145
+ displayName: string;
3146
+ };
3147
+ type SelectIconProps = ComponentProps<typeof Select$1.Icon>;
3148
+ declare const SelectIcon: {
3149
+ ({ className, ...rest }: SelectIconProps): react_jsx_runtime.JSX.Element;
3150
+ displayName: string;
3151
+ };
3152
+ type SelectValueProps = ComponentProps<typeof Select$1.Value>;
3153
+ declare const SelectValue: {
3154
+ ({ className, ...rest }: SelectValueProps): react_jsx_runtime.JSX.Element;
3155
+ displayName: string;
3156
+ };
3157
+ type SelectPortalProps = ComponentProps<typeof Select$1.Portal> & {
3158
+ /**
3159
+ * When `container` is not provided, it uses a shared container created by `usePortalContainer`.
3160
+ */
3161
+ container?: HTMLElement | null;
3162
+ };
3163
+ declare const SelectPortal: {
3164
+ ({ container, ...rest }: SelectPortalProps): react_jsx_runtime.JSX.Element;
3165
+ displayName: string;
3166
+ };
3167
+ type SelectPositionerProps = ComponentProps<typeof Select$1.Positioner>;
3168
+ declare const SelectPositioner: {
3169
+ ({ align, alignItemWithTrigger, className, side, sideOffset, ...rest }: SelectPositionerProps): react_jsx_runtime.JSX.Element;
3170
+ displayName: string;
3171
+ };
3172
+ type SelectPopupProps = ComponentProps<typeof Select$1.Popup>;
3173
+ declare const SelectPopup: {
3174
+ ({ className, ...rest }: SelectPopupProps): react_jsx_runtime.JSX.Element;
3175
+ displayName: string;
3176
+ };
3177
+ type SelectListProps = ComponentProps<typeof Select$1.List>;
3178
+ declare const SelectList: {
3179
+ ({ className, ...rest }: SelectListProps): react_jsx_runtime.JSX.Element;
3180
+ displayName: string;
3181
+ };
3182
+ type SelectItemProps = ComponentProps<typeof Select$1.Item>;
3183
+ declare const SelectItem: {
3184
+ ({ className, ...rest }: SelectItemProps): react_jsx_runtime.JSX.Element;
3185
+ displayName: string;
3186
+ };
3187
+ type SelectItemTextProps = ComponentProps<typeof Select$1.ItemText>;
3188
+ declare const SelectItemText: {
3189
+ ({ className, ...rest }: SelectItemTextProps): react_jsx_runtime.JSX.Element;
3190
+ displayName: string;
3191
+ };
3192
+ type SelectItemIndicatorProps = ComponentProps<typeof Select$1.ItemIndicator>;
3193
+ declare const SelectItemIndicator: {
3194
+ ({ className, ...rest }: SelectItemIndicatorProps): react_jsx_runtime.JSX.Element;
3195
+ displayName: string;
3196
+ };
3197
+ type SelectGroupProps = ComponentProps<typeof Select$1.Group>;
3198
+ declare const SelectGroup: {
3199
+ ({ className, ...rest }: SelectGroupProps): react_jsx_runtime.JSX.Element;
3200
+ displayName: string;
3201
+ };
3202
+ type SelectGroupLabelProps = ComponentProps<typeof Select$1.GroupLabel>;
3203
+ declare const SelectGroupLabel: {
3204
+ ({ className, ...rest }: SelectGroupLabelProps): react_jsx_runtime.JSX.Element;
3205
+ displayName: string;
3206
+ };
3207
+ type SelectScrollUpArrowProps = ComponentProps<typeof Select$1.ScrollUpArrow>;
3208
+ declare const SelectScrollUpArrow: {
3209
+ ({ className, ...rest }: SelectScrollUpArrowProps): react_jsx_runtime.JSX.Element;
3210
+ displayName: string;
3211
+ };
3212
+ type SelectScrollDownArrowProps = ComponentProps<typeof Select$1.ScrollDownArrow>;
3213
+ declare const SelectScrollDownArrow: {
3214
+ ({ className, ...rest }: SelectScrollDownArrowProps): react_jsx_runtime.JSX.Element;
3215
+ displayName: string;
3216
+ };
3217
+ type SelectArrowProps = ComponentProps<typeof Select$1.Arrow>;
3218
+ declare const SelectArrow: {
3219
+ ({ className, ...rest }: SelectArrowProps): react_jsx_runtime.JSX.Element;
3220
+ displayName: string;
3221
+ };
3222
+
3223
+ declare const Select: react.NamedExoticComponent<SelectProps<any>>;
3224
+
3225
+ declare const useSwitchContext: () => SwitchContextType;
3226
+ type SwitchRootInternalProps = Omit<SwitchRootProps, 'onCheckedChange' | 'onClick'> & {
3227
+ onCheckedChange?: SwitchChangeEventHandler;
3228
+ onClick?: SwitchChangeEventHandler;
3229
+ };
3230
+ declare const SwitchRoot: {
3231
+ ({ checked, className, defaultChecked, onCheckedChange, onClick, size, children, disabled, readOnly, required, inputRef, id, name, ...rest }: SwitchRootInternalProps): react_jsx_runtime.JSX.Element;
3232
+ displayName: string;
3233
+ };
3234
+ declare const SwitchThumb: {
3235
+ ({ className, pressedAnimation, size, transition, children, ...rest }: SwitchThumbProps): react_jsx_runtime.JSX.Element;
3236
+ displayName: string;
3237
+ };
3238
+ declare const SwitchIcon: {
3239
+ ({ children, className, position, transition, ...rest }: SwitchIconProps & {
3240
+ children?: React.ReactNode;
3241
+ size?: "default" | "small";
3242
+ }): react_jsx_runtime.JSX.Element;
3243
+ displayName: string;
3244
+ };
3245
+
3246
+ declare const Switch: react.NamedExoticComponent<SwitchProps>;
3247
+
3248
+ interface MermaidThemeItem {
3249
+ background?: string;
3250
+ displayName: string;
3251
+ id: string;
3252
+ }
3253
+ declare const mermaidThemes: MermaidThemeItem[];
3254
+
3255
+ interface SyntaxMermaidProps {
3256
+ animated?: boolean;
3257
+ children: string;
3258
+ className?: string;
3259
+ fallbackClassName?: string;
3260
+ ref?: Ref<HTMLDivElement>;
3261
+ style?: CSSProperties;
3262
+ theme?: MermaidProps['theme'];
3263
+ variant?: MermaidProps['variant'];
3264
+ }
3265
+ interface MermaidProps extends DivProps {
3266
+ actionIconSize?: ActionIconProps['size'];
3267
+ actionsRender?: (props: {
3268
+ actionIconSize: ActionIconProps['size'];
3269
+ content: string;
3270
+ getContent: () => string;
3271
+ originalNode: ReactNode;
3272
+ }) => ReactNode;
3273
+ animated?: boolean;
3274
+ bodyRender?: (props: {
3275
+ content: string;
3276
+ originalNode: ReactNode;
3277
+ }) => ReactNode;
3278
+ children: string;
3279
+ classNames?: {
3280
+ body?: string;
3281
+ content?: string;
3282
+ header?: string;
3283
+ };
3284
+ copyable?: boolean;
3285
+ defaultExpand?: boolean;
3286
+ fileName?: string;
3287
+ fullFeatured?: boolean;
3288
+ language?: string;
3289
+ shadow?: boolean;
3290
+ showLanguage?: boolean;
3291
+ styles?: {
3292
+ body?: CSSProperties;
3293
+ content?: CSSProperties;
3294
+ header?: CSSProperties;
3295
+ };
3296
+ theme?: 'lobe-theme' | MermaidConfig['theme'];
3297
+ variant?: 'filled' | 'outlined' | 'borderless';
3298
+ }
3299
+
3300
+ declare const Mermaid: react.NamedExoticComponent<MermaidProps>;
3301
+
3302
+ declare const SyntaxMermaid: react.NamedExoticComponent<SyntaxMermaidProps>;
3303
+
3304
+ interface TagProps extends Omit<TagProps$1, 'color' | 'variant'> {
3305
+ color?: TagProps$1['color'] | 'info';
3306
+ ref?: Ref<HTMLDivElement>;
3307
+ size?: 'small' | 'middle' | 'large';
3308
+ variant?: 'filled' | 'outlined' | 'borderless';
3309
+ }
3310
+
3311
+ declare const Tag: FC<TagProps>;
3312
+
3313
+ type ImageProps = ImageProps$1;
3314
+
3315
+ interface CitationItem {
3316
+ alt?: string;
3317
+ summary?: string;
3318
+ title?: string;
3319
+ url: string;
3320
+ }
3321
+
3322
+ interface SnippetProps extends FlexProps {
3323
+ children: string;
3324
+ copyable?: boolean;
3325
+ language?: string;
3326
+ prefix?: string;
3327
+ ref?: Ref<HTMLDivElement>;
3328
+ shadow?: boolean;
3329
+ spotlight?: boolean;
3330
+ variant?: 'filled' | 'outlined' | 'borderless';
3331
+ }
3332
+
3333
+ declare const Snippet: FC<SnippetProps>;
3334
+
3335
+ type PreProps = HighlighterProps;
3336
+
3337
+ interface VideoProps$1 extends VideoProps$2, Pick<FlexProps, 'width' | 'height'> {
3338
+ autoPlay?: boolean;
3339
+ classNames?: {
3340
+ mask?: string;
3341
+ video?: string;
3342
+ wrapper?: string;
3343
+ };
3344
+ isLoading?: boolean;
3345
+ loop?: boolean;
3346
+ maxHeight?: number | string;
3347
+ maxWidth?: number | string;
3348
+ minHeight?: number | string;
3349
+ minWidth?: number | string;
3350
+ muted?: HTMLVideoElement['muted'];
3351
+ onEnded?: VideoProps$2['onEnded'];
3352
+ onMouseEnter?: VideoProps$2['onMouseEnter'];
3353
+ onMouseLeave?: VideoProps$2['onMouseLeave'];
3354
+ onPause?: VideoProps$2['onPause'];
3355
+ onPlay?: VideoProps$2['onPlay'];
3356
+ onPlaying?: VideoProps$2['onPlaying'];
3357
+ onProgress?: VideoProps$2['onProgress'];
3358
+ poster?: string;
3359
+ preload?: HTMLVideoElement['preload'];
3360
+ preview?: boolean;
3361
+ ref?: Ref<HTMLDivElement>;
3362
+ size?: number | string;
3363
+ src: string;
3364
+ styles?: {
3365
+ mask?: CSSProperties;
3366
+ video?: CSSProperties;
3367
+ wrapper?: CSSProperties;
3368
+ };
3369
+ variant?: 'borderless' | 'filled' | 'outlined';
3370
+ }
3371
+ declare const Video: react.NamedExoticComponent<VideoProps$1>;
3372
+
3373
+ type VideoProps = VideoProps$1;
3374
+
3375
+ interface TabsProps extends TabsProps$1 {
3376
+ compact?: boolean;
3377
+ variant?: 'square' | 'rounded' | 'point';
3378
+ }
3379
+
3380
+ declare const Tabs: FC<TabsProps>;
3381
+
3382
+ interface TypographyProps extends DivProps {
3383
+ borderRadius?: number;
3384
+ fontSize?: number;
3385
+ headerMultiple?: number;
3386
+ lineHeight?: number;
3387
+ marginMultiple?: number;
3388
+ ref?: Ref<HTMLDivElement>;
3389
+ }
3390
+ interface SyntaxMarkdownProps {
3391
+ allowHtml?: boolean;
3392
+ allowHtmlList?: ElementType[];
3393
+ animated?: boolean;
3394
+ children: string;
3395
+ citations?: CitationItem[];
3396
+ componentProps?: {
3397
+ a?: Partial<AProps & AnchorProps>;
3398
+ highlight?: Partial<HighlighterProps>;
3399
+ img?: Partial<ImageProps>;
3400
+ mermaid?: Partial<MermaidProps>;
3401
+ pre?: Partial<PreProps>;
3402
+ video?: Partial<VideoProps>;
3403
+ };
3404
+ components?: Components & Record<string, FC>;
3405
+ enableCustomFootnotes?: boolean;
3406
+ enableGithubAlert?: boolean;
3407
+ enableLatex?: boolean;
3408
+ enableMermaid?: boolean;
3409
+ enableStream?: boolean;
3410
+ fullFeaturedCodeBlock?: boolean;
3411
+ reactMarkdownProps?: Omit<Readonly<Options>, 'components' | 'rehypePlugins' | 'remarkPlugins'>;
3412
+ rehypePlugins?: Pluggable[];
3413
+ rehypePluginsAhead?: Pluggable[];
3414
+ remarkPlugins?: Pluggable[];
3415
+ remarkPluginsAhead?: Pluggable[];
3416
+ showFootnotes?: boolean;
3417
+ variant?: 'default' | 'chat';
3418
+ }
3419
+ interface MarkdownProps extends SyntaxMarkdownProps, Omit<TypographyProps, 'children'> {
3420
+ className?: string;
3421
+ customRender?: (dom: ReactNode, context: {
3422
+ text: string;
3423
+ }) => ReactNode;
3424
+ enableImageGallery?: boolean;
3425
+ onDoubleClick?: () => void;
3426
+ ref?: Ref<HTMLDivElement>;
3427
+ style?: CSSProperties;
3428
+ }
3429
+
3430
+ declare const Markdown: react.NamedExoticComponent<MarkdownProps>;
3431
+
3432
+ declare const Typography: react.NamedExoticComponent<TypographyProps>;
3433
+
3434
+ interface SearchResultItem {
3435
+ alt?: string;
3436
+ summary?: string;
3437
+ title?: string;
3438
+ url: string;
3439
+ }
3440
+ interface SearchResultCardsProps extends FlexProps {
3441
+ dataSource: string[] | SearchResultItem[];
3442
+ ref?: Ref<HTMLDivElement>;
3443
+ }
3444
+ declare const SearchResultCards: react.NamedExoticComponent<SearchResultCardsProps>;
3445
+
3446
+ declare const rehypeCustomFootnotes: () => (tree: any, file: any) => void;
3447
+
3448
+ declare const rehypeKatexDir: () => (tree: Node) => void;
3449
+
3450
+ declare const rehypeStreamAnimated: () => (tree: Root) => void;
3451
+
3452
+ /**
3453
+ * Remark plugin to handle <br> and <br/> tags in markdown text
3454
+ * This plugin converts <br> and <br/> tags to proper HTML elements
3455
+ * without requiring allowHtml to be enabled
3456
+ */
3457
+ declare const remarkBr: () => (tree: any) => void;
3458
+
3459
+ interface RemarkColorOptions {
3460
+ /**
3461
+ * 自定义颜色验证函数
3462
+ */
3463
+ colorValidator?: (colorString: string) => boolean;
3464
+ }
3465
+ /**
3466
+ * Remark plugin to handle color syntax in markdown code spans
3467
+ * Supports GitHub-style color visualization for HEX, RGB, and HSL colors
3468
+ *
3469
+ * @example
3470
+ * `#FF0000` -> renders with red color preview
3471
+ * `rgb(255, 0, 0)` -> renders with red color preview
3472
+ * `hsl(0, 100%, 50%)` -> renders with red color preview
3473
+ */
3474
+ declare const remarkColor: (options?: RemarkColorOptions) => (tree: any) => void;
3475
+
3476
+ declare const remarkCustomFootnotes: () => (tree: any, file: any) => void;
3477
+
3478
+ interface RemarkGfmPlusOptions {
3479
+ allowHtmlTags?: string[];
3480
+ }
3481
+ declare const remarkGfmPlus: (options?: RemarkGfmPlusOptions) => (tree: any) => void;
3482
+
3483
+ interface RemarkVideoOptions {
3484
+ /**
3485
+ * 支持的视频标签名,默认为 ['video']
3486
+ */
3487
+ videoTags?: string[];
3488
+ }
3489
+ /**
3490
+ * Remark plugin to handle <video> tags in markdown text
3491
+ * This plugin converts <video> tags to proper video elements
3492
+ * without requiring allowHtml to be enabled
3493
+ *
3494
+ * @example
3495
+ * <video src="https://example.com/video.mp4" />
3496
+ * <video src="https://example.com/video.mp4" controls width="400" height="300" />
3497
+ */
3498
+ declare const remarkVideo: (options?: RemarkVideoOptions) => (tree: any) => void;
3499
+
3500
+ interface MaskShadowProps extends FlexProps {
3501
+ position?: 'top' | 'bottom' | 'left' | 'right';
3502
+ size?: number;
3503
+ visibility?: 'auto' | 'always' | 'never';
3504
+ }
3505
+
3506
+ declare const MaskShadow: react.NamedExoticComponent<MaskShadowProps>;
3507
+
3508
+ interface MaterialFileTypeIconProps extends DivProps {
3509
+ fallbackUnknownType?: boolean;
3510
+ filename: string;
3511
+ open?: boolean;
3512
+ size?: number;
3513
+ type?: 'file' | 'folder';
3514
+ variant?: 'raw' | 'file' | 'folder';
3515
+ }
3516
+
3517
+ declare const MaterialFileTypeIcon: FC<MaterialFileTypeIconProps>;
3518
+
3519
+ declare const styles: {
3520
+ danger: string;
3521
+ empty: string;
3522
+ extra: string;
3523
+ groupLabel: string;
3524
+ icon: string;
3525
+ item: string;
3526
+ itemContent: string;
3527
+ label: string;
3528
+ popup: string;
3529
+ positioner: string;
3530
+ separator: string;
3531
+ submenuArrow: string;
3532
+ };
3533
+
3534
+ interface I18nProviderProps {
3535
+ children: ReactNode;
3536
+ locale?: string;
3537
+ motion: MotionComponentType;
3538
+ resources?: TranslationResourcesInput;
3539
+ }
3540
+
3541
+ declare const I18nProvider: react.NamedExoticComponent<I18nProviderProps>;
3542
+
3543
+ declare const useTranslation: (fallbackResources?: TranslationResources) => {
3544
+ locale: string;
3545
+ t: (key: TranslationKey) => string;
3546
+ };
3547
+
3548
+ type ScrollAreaRootProps = react__default.ComponentProps<typeof ScrollArea$1.Root>;
3549
+ type ScrollAreaViewportProps = react__default.ComponentProps<typeof ScrollArea$1.Viewport> & {
3550
+ /**
3551
+ * Enable gradient scroll fade on the viewport edges.
3552
+ * @default false
3553
+ */
3554
+ scrollFade?: boolean;
3555
+ };
3556
+ type ScrollAreaContentProps = react__default.ComponentProps<typeof ScrollArea$1.Content>;
3557
+ type ScrollAreaScrollbarProps = react__default.ComponentProps<typeof ScrollArea$1.Scrollbar>;
3558
+ type ScrollAreaThumbProps = react__default.ComponentProps<typeof ScrollArea$1.Thumb>;
3559
+ type ScrollAreaCornerProps = react__default.ComponentProps<typeof ScrollArea$1.Corner>;
3560
+ declare const ScrollAreaRoot: {
3561
+ ({ className, ...rest }: ScrollAreaRootProps): react_jsx_runtime.JSX.Element;
3562
+ displayName: string;
3563
+ };
3564
+ declare const ScrollAreaViewport: {
3565
+ ({ className, scrollFade, ...rest }: ScrollAreaViewportProps): react_jsx_runtime.JSX.Element;
3566
+ displayName: string;
3567
+ };
3568
+ declare const ScrollAreaContent: {
3569
+ ({ className, ...rest }: ScrollAreaContentProps): react_jsx_runtime.JSX.Element;
3570
+ displayName: string;
3571
+ };
3572
+ declare const ScrollAreaScrollbar: {
3573
+ ({ className, ...rest }: ScrollAreaScrollbarProps): react_jsx_runtime.JSX.Element;
3574
+ displayName: string;
3575
+ };
3576
+ declare const ScrollAreaThumb: {
3577
+ ({ className, ...rest }: ScrollAreaThumbProps): react_jsx_runtime.JSX.Element;
3578
+ displayName: string;
3579
+ };
3580
+ declare const ScrollAreaCorner: {
3581
+ ({ className, ...rest }: ScrollAreaCornerProps): react_jsx_runtime.JSX.Element;
3582
+ displayName: string;
3583
+ };
3584
+
3585
+ interface ScrollAreaProps extends Omit<ScrollAreaRootProps, 'children'> {
3586
+ children?: ReactNode;
3587
+ contentProps?: Omit<ScrollAreaContentProps, 'children'>;
3588
+ corner?: boolean;
3589
+ cornerProps?: ScrollAreaCornerProps;
3590
+ scrollFade?: boolean;
3591
+ scrollbarProps?: Omit<ScrollAreaScrollbarProps, 'children'>;
3592
+ thumbProps?: ScrollAreaThumbProps;
3593
+ viewportProps?: Omit<ScrollAreaViewportProps, 'children' | 'scrollFade'>;
3594
+ }
3595
+
3596
+ declare const ScrollArea: FC<ScrollAreaProps>;
3597
+
3598
+ interface ScrollShadowProps extends FlexProps {
3599
+ hideScrollBar?: boolean;
3600
+ isEnabled?: boolean;
3601
+ offset?: number;
3602
+ onVisibilityChange?: (visibility: {
3603
+ bottom?: boolean;
3604
+ left?: boolean;
3605
+ right?: boolean;
3606
+ top?: boolean;
3607
+ }) => void;
3608
+ orientation?: 'vertical' | 'horizontal';
3609
+ ref?: Ref<HTMLDivElement>;
3610
+ size?: number;
3611
+ visibility?: 'auto' | 'always' | 'never';
3612
+ }
3613
+
3614
+ declare const ScrollShadow: FC<ScrollShadowProps>;
3615
+
3616
+ interface SearchBarProps extends Omit<InputProps, 'styles' | 'classNames'> {
3617
+ classNames?: {
3618
+ input?: string;
3619
+ shortKey?: string;
3620
+ };
3621
+ defaultOpen?: boolean;
3622
+ defaultValue?: string;
3623
+ enableShortKey?: boolean;
3624
+ loading?: boolean;
3625
+ modal?: boolean;
3626
+ modalProps?: Omit<ModalProps, 'children' | 'open'> & {
3627
+ onCancel?: ModalProps['onCancel'];
3628
+ };
3629
+ modalTitle?: ReactNode;
3630
+ modalWidth?: number | string;
3631
+ modalContent?: ReactNode | ((value: string, close: () => void) => ReactNode);
3632
+ onInputChange?: (value: string) => void;
3633
+ onOpenChange?: (open: boolean) => void;
3634
+ onSearch?: (value: string) => void;
3635
+ open?: boolean;
3636
+ shortKey?: string;
3637
+ spotlight?: boolean;
3638
+ styles?: {
3639
+ input?: CSSProperties;
3640
+ shortKey?: CSSProperties;
3641
+ };
3642
+ value?: string;
3643
+ }
3644
+
3645
+ declare const SearchBar: react.NamedExoticComponent<SearchBarProps>;
3646
+
3647
+ interface SegmentedProps extends SegmentedProps$1 {
3648
+ glass?: boolean;
3649
+ iconProps?: Omit<IconProps$1, 'icon'>;
3650
+ padding?: string | number;
3651
+ ref?: Ref<HTMLDivElement>;
3652
+ shadow?: boolean;
3653
+ variant?: 'filled' | 'outlined' | 'borderless';
3654
+ }
3655
+
3656
+ declare const Segmented: react.NamedExoticComponent<SegmentedProps>;
3657
+
3658
+ interface SideNavProps extends FlexProps {
3659
+ avatar?: ReactNode;
3660
+ bottomActions: ReactNode;
3661
+ topActions?: ReactNode;
3662
+ }
3663
+
3664
+ declare const SideNav: react.NamedExoticComponent<SideNavProps>;
3665
+
3666
+ interface SkeletonBlockProps {
3667
+ active?: boolean;
3668
+ className?: string;
3669
+ height?: number | string;
3670
+ style?: CSSProperties;
3671
+ width?: number | string;
3672
+ }
3673
+ interface SkeletonTitleProps extends Omit<SkeletonBlockProps, 'height'> {
3674
+ fontSize?: number;
3675
+ height?: number;
3676
+ lineHeight?: number;
3677
+ width?: number | string;
3678
+ }
3679
+ interface SkeletonParagraphProps extends Omit<SkeletonBlockProps, 'width' | 'height'> {
3680
+ fontSize?: number;
3681
+ gap?: number;
3682
+ height?: number;
3683
+ lineHeight?: number;
3684
+ rows?: number;
3685
+ width?: number | string | (number | string)[];
3686
+ }
3687
+ interface SkeletonTagsProps extends Omit<SkeletonBlockProps, 'width'> {
3688
+ count?: number;
3689
+ gap?: number;
3690
+ size?: 'small' | 'middle' | 'large';
3691
+ width?: number | string | (number | string)[];
3692
+ }
3693
+ interface SkeletonAvatarProps extends SkeletonBlockProps {
3694
+ shape?: 'circle' | 'square';
3695
+ size?: number | string;
3696
+ }
3697
+ interface SkeletonButtonProps extends SkeletonBlockProps {
3698
+ block?: boolean;
3699
+ shape?: 'circle' | 'round' | 'default';
3700
+ size?: 'large' | 'small' | 'default';
3701
+ }
3702
+ interface SkeletonProps extends SkeletonBlockProps {
3703
+ avatar?: SkeletonAvatarProps | boolean;
3704
+ classNames?: {
3705
+ avatar?: string;
3706
+ paragraph?: string;
3707
+ root?: string;
3708
+ title?: string;
3709
+ };
3710
+ gap?: number;
3711
+ paragraph?: SkeletonParagraphProps | boolean;
3712
+ styles?: {
3713
+ avatar?: CSSProperties;
3714
+ paragraph?: CSSProperties;
3715
+ root?: CSSProperties;
3716
+ title?: CSSProperties;
3717
+ };
3718
+ title?: SkeletonTitleProps | boolean;
3719
+ }
3720
+
3721
+ declare const SkeletonAvatar: FC<SkeletonAvatarProps>;
3722
+
3723
+ declare const SkeletonBlock: FC<SkeletonBlockProps>;
3724
+
3725
+ declare const SkeletonButton: FC<SkeletonButtonProps>;
3726
+
3727
+ declare const SkeletonParagraph: FC<SkeletonParagraphProps>;
3728
+
3729
+ declare const SkeletonTags: FC<SkeletonTagsProps>;
3730
+
3731
+ declare const SkeletonTitle: FC<SkeletonTitleProps>;
3732
+
3733
+ interface ISkeleton {
3734
+ (props: SkeletonProps): ReactNode;
3735
+ Avatar: typeof SkeletonAvatar;
3736
+ Block: typeof SkeletonBlock;
3737
+ Button: typeof SkeletonButton;
3738
+ Paragraph: typeof SkeletonParagraph;
3739
+ Tags: typeof SkeletonTags;
3740
+ Title: typeof SkeletonTitle;
3741
+ }
3742
+ declare const Skeleton: ISkeleton;
3743
+
3744
+ interface SliderWithInputProps extends Omit<SliderSingleProps, 'classNames' | 'styles'> {
3745
+ changeOnWheel?: boolean;
3746
+ classNames?: {
3747
+ input?: string;
3748
+ slider?: string;
3749
+ } & SliderSingleProps['classNames'];
3750
+ controls?: InputNumberProps['controls'];
3751
+ gap?: FlexProps['gap'];
3752
+ size?: InputNumberProps['size'];
3753
+ styles?: {
3754
+ input?: CSSProperties;
3755
+ slider?: CSSProperties;
3756
+ } & SliderSingleProps['styles'];
3757
+ unlimitedInput?: boolean;
3758
+ variant?: InputNumberProps['variant'];
3759
+ }
3760
+
3761
+ declare const SliderWithInput: react.NamedExoticComponent<SliderWithInputProps>;
3762
+
3763
+ declare const DragHandle: react.NamedExoticComponent<ActionIconProps>;
3764
+
3765
+ interface SortableItemProps extends Omit<FlexProps, 'id'> {
3766
+ id: string | number;
3767
+ variant?: 'borderless' | 'filled' | 'outlined';
3768
+ }
3769
+ declare const SortableItem: react.NamedExoticComponent<SortableItemProps>;
3770
+
3771
+ interface SortableListItem {
3772
+ [key: string]: any;
3773
+ id: string | number;
3774
+ }
3775
+ interface SortableListProps extends Omit<FlexProps, 'onChange'> {
3776
+ items: SortableListItem[];
3777
+ onChange(items: SortableListItem[]): void;
3778
+ ref?: Ref<HTMLUListElement>;
3779
+ renderItem(item: SortableListItem): ReactNode;
3780
+ }
3781
+
3782
+ interface ISortableList {
3783
+ (props: SortableListProps): ReactNode;
3784
+ DragHandle: typeof DragHandle;
3785
+ Item: typeof SortableItem;
3786
+ }
3787
+ declare const SortableList: ISortableList;
3788
+
3789
+ type TableAlign = "left" | "center" | "right";
3790
+ type TableColumnFixed = "start" | "end" | "left" | "right" | true;
3791
+ type TableColumn<TData> = {
3792
+ key: string;
3793
+ title: string;
3794
+ item?: string;
3795
+ sortable?: boolean;
3796
+ hiddeable?: boolean;
3797
+ width?: number | string;
3798
+ align?: TableAlign;
3799
+ fixed?: TableColumnFixed;
3800
+ headerClassName?: string;
3801
+ cellClassName?: string;
3802
+ headerStyle?: react.CSSProperties;
3803
+ cellStyle?: react.CSSProperties;
3804
+ func?: (row: TData, context: {
3805
+ value: unknown;
3806
+ rowIndex: number;
3807
+ }) => react.ReactNode;
3808
+ };
3809
+ type TableReadConfig<TData> = {
3810
+ method?: "get" | "post";
3811
+ url?: string;
3812
+ get?: string;
3813
+ post?: string;
3814
+ payload?: unknown;
3815
+ body?: unknown;
3816
+ params?: Record<string, unknown>;
3817
+ headers?: HeadersInit;
3818
+ resultKey?: string;
3819
+ mapData?: (raw: unknown) => TData[];
3820
+ delay?: number;
3821
+ };
3822
+ type TableDataSource<TData> = {
3823
+ bind?: TData[];
3824
+ read?: TableReadConfig<TData>;
3825
+ };
3826
+ type TablePageSizeConfig = {
3827
+ visible?: boolean;
3828
+ count?: number;
3829
+ options?: number[];
3830
+ };
3831
+ type AntdTablePropsBase<TData> = Omit<TableProps$1<TData>, "columns" | "dataSource" | "pagination">;
3832
+ interface TableProps<TData> extends AntdTablePropsBase<TData> {
3833
+ data: TableDataSource<TData>;
3834
+ columns: TableColumn<TData>[];
3835
+ pagination?: boolean;
3836
+ sortable?: boolean;
3837
+ reload?: boolean;
3838
+ filterable?: boolean;
3839
+ selectable?: boolean;
3840
+ height?: number | string;
3841
+ rowHeight?: number;
3842
+ overscan?: number;
3843
+ defaultPageSize?: number;
3844
+ pageSize?: TablePageSizeConfig;
3845
+ className?: string;
3846
+ emptyState?: react.ReactNode;
3847
+ onDataChange?: (rows: TData[]) => void;
3848
+ }
3849
+
3850
+ declare const Table: {
3851
+ <TData extends object>({ data, columns, pagination, sortable, reload, filterable, selectable: selectableProp, height, defaultPageSize, pageSize, className, emptyState, onDataChange, loading: loadingProp, rowSelection: rowSelectionProp, rowKey: rowKeyProp, bordered: borderedProp, size: sizeProp, sticky: stickyProp, scroll: scrollProp, virtual: virtualProp, locale: localeProp, style: tableStyle, ...restTableProps }: TableProps<TData>): react_jsx_runtime.JSX.Element;
3852
+ displayName: string;
3853
+ };
3854
+
3855
+ declare const primaryColors: {
3856
+ blue: string;
3857
+ cyan: string;
3858
+ geekblue: string;
3859
+ gold: string;
3860
+ green: string;
3861
+ lime: string;
3862
+ magenta: string;
3863
+ orange: string;
3864
+ purple: string;
3865
+ red: string;
3866
+ volcano: string;
3867
+ yellow: string;
3868
+ };
3869
+ type PrimaryColorsObj = typeof primaryColors;
3870
+ type PrimaryColors = keyof PrimaryColorsObj;
3871
+ declare const primaryColorsSwatches: string[];
3872
+ declare const neutralColors: {
3873
+ mauve: string;
3874
+ olive: string;
3875
+ sage: string;
3876
+ sand: string;
3877
+ slate: string;
3878
+ };
3879
+ declare const neutralColorsSwatches: string[];
3880
+ type NeutralColorsObj = typeof neutralColors;
3881
+ type NeutralColors = keyof NeutralColorsObj;
3882
+ declare const findCustomThemeName: (type: "primary" | "neutral", value: string) => string | undefined;
3883
+
3884
+ declare const generateCustomStylish: GetCustomStylish<LobeCustomStylish>;
3885
+
3886
+ declare const staticStylish: LobeCustomStylish;
3887
+
3888
+ declare const generateCustomToken: GetCustomToken<LobeCustomToken>;
3889
+
3890
+ type colorStep = [
3891
+ string,
3892
+ string,
3893
+ string,
3894
+ string,
3895
+ string,
3896
+ string,
3897
+ string,
3898
+ string,
3899
+ string,
3900
+ string,
3901
+ string,
3902
+ string,
3903
+ string
3904
+ ];
3905
+ interface ColorScaleItem {
3906
+ dark: colorStep;
3907
+ darkA: colorStep;
3908
+ light: colorStep;
3909
+ lightA: colorStep;
3910
+ }
3911
+
3912
+ declare const generateColorPalette: ({ type, scale, appearance, }: {
3913
+ appearance: "light" | "dark";
3914
+ scale: ColorScaleItem;
3915
+ type: "Primary" | "Success" | "Warning" | "Error" | "Info" | string;
3916
+ }) => Partial<AliasToken>;
3917
+ declare const generateColorNeutralPalette: ({ scale, appearance, }: {
3918
+ appearance: "light" | "dark";
3919
+ scale: ColorScaleItem;
3920
+ }) => Partial<AliasToken>;
3921
+
3922
+ declare const CLASSNAMES: {
3923
+ ContextTrigger: string;
3924
+ DropdownMenuTrigger: string;
3925
+ };
3926
+
3927
+ interface ThemeProviderProps extends ThemeProviderProps$1<any> {
3928
+ className?: string;
3929
+ customFonts?: string[];
3930
+ customStylish?: (theme: CustomStylishParams) => {
3931
+ [key: string]: any;
3932
+ };
3933
+ customTheme?: {
3934
+ neutralColor?: NeutralColors;
3935
+ primaryColor?: PrimaryColors;
3936
+ };
3937
+ customToken?: (theme: CustomTokenParams) => {
3938
+ [key: string]: any;
3939
+ };
3940
+ enableCustomFonts?: boolean;
3941
+ enableGlobalStyle?: boolean;
3942
+ /**
3943
+ * Global mobile mode. Components with an `isMobile` prop will default to this value.
3944
+ */
3945
+ isMobile?: boolean;
3946
+ style?: CSSProperties;
3947
+ }
3948
+ interface MetaProps {
3949
+ description?: string;
3950
+ title?: string;
3951
+ withManifest?: boolean;
3952
+ }
3953
+
3954
+ declare const Meta: FC<MetaProps>;
3955
+
3956
+ declare const ThemeProvider: react.NamedExoticComponent<ThemeProviderProps>;
3957
+
3958
+ interface ThemeSwitchProps extends DivProps {
3959
+ labels?: {
3960
+ auto: string;
3961
+ dark: string;
3962
+ light: string;
3963
+ };
3964
+ onThemeSwitch: (themeMode: ThemeMode) => void;
3965
+ size?: ActionIconProps['size'];
3966
+ themeMode: ThemeMode;
3967
+ type?: 'icon' | 'select';
3968
+ variant?: ActionIconProps['variant'];
3969
+ }
3970
+
3971
+ declare const ThemeSwitch: FC<ThemeSwitchProps>;
3972
+
3973
+ type ToastType = 'success' | 'info' | 'warning' | 'error' | 'loading' | 'default';
3974
+ type ToastPosition = 'top' | 'top-left' | 'top-right' | 'bottom' | 'bottom-left' | 'bottom-right';
3975
+ type ToastActionVariant = 'primary' | 'secondary' | 'text' | 'danger' | 'ghost';
3976
+ interface ToastAction {
3977
+ /**
3978
+ * Action button label
3979
+ */
3980
+ label: ReactNode;
3981
+ /**
3982
+ * Click handler
3983
+ */
3984
+ onClick?: () => void;
3985
+ /**
3986
+ * Additional props for the button
3987
+ */
3988
+ props?: Omit<React.ComponentPropsWithRef<'button'>, 'onClick'>;
3989
+ /**
3990
+ * Button variant
3991
+ * @default 'primary'
3992
+ */
3993
+ variant?: ToastActionVariant;
3994
+ }
3995
+ interface ToastOptions {
3996
+ /**
3997
+ * Action button props
3998
+ * @deprecated Use `actions` instead
3999
+ */
4000
+ actionProps?: React.ComponentPropsWithRef<'button'>;
4001
+ /**
4002
+ * Multiple action buttons
4003
+ */
4004
+ actions?: ToastAction[];
4005
+ /**
4006
+ * Additional class name
4007
+ */
4008
+ className?: string;
4009
+ /**
4010
+ * Whether the toast is closable
4011
+ * @default true
4012
+ */
4013
+ closable?: boolean;
4014
+ /**
4015
+ * Custom data for the toast
4016
+ */
4017
+ data?: Record<string, unknown>;
4018
+ /**
4019
+ * Toast description
4020
+ */
4021
+ description?: ReactNode;
4022
+ /**
4023
+ * Custom duration in milliseconds
4024
+ * @default 5000
4025
+ */
4026
+ duration?: number;
4027
+ /**
4028
+ * Hide the close button
4029
+ * @default false
4030
+ */
4031
+ hideCloseButton?: boolean;
4032
+ /**
4033
+ * Custom icon
4034
+ */
4035
+ icon?: IconProps$1['icon'];
4036
+ /**
4037
+ * Callback when toast is closed
4038
+ */
4039
+ onClose?: () => void;
4040
+ /**
4041
+ * Callback when toast is removed
4042
+ */
4043
+ onRemove?: () => void;
4044
+ /**
4045
+ * Toast placement, overrides global ToastHost position
4046
+ */
4047
+ placement?: ToastPosition;
4048
+ /**
4049
+ * Additional styles
4050
+ */
4051
+ style?: CSSProperties;
4052
+ /**
4053
+ * Toast title
4054
+ */
4055
+ title?: ReactNode;
4056
+ /**
4057
+ * Toast type
4058
+ * @default 'default'
4059
+ */
4060
+ type?: ToastType;
4061
+ }
4062
+ interface ToastInstance {
4063
+ /**
4064
+ * Close the toast
4065
+ */
4066
+ close: () => void;
4067
+ /**
4068
+ * The toast ID
4069
+ */
4070
+ id: string;
4071
+ /**
4072
+ * Update the toast
4073
+ */
4074
+ update: (options: Partial<ToastOptions>) => void;
4075
+ }
4076
+ interface ToastProps {
4077
+ classNames?: {
4078
+ action?: string;
4079
+ actions?: string;
4080
+ close?: string;
4081
+ content?: string;
4082
+ description?: string;
4083
+ icon?: string;
4084
+ root?: string;
4085
+ title?: string;
4086
+ };
4087
+ styles?: {
4088
+ action?: CSSProperties;
4089
+ actions?: CSSProperties;
4090
+ close?: CSSProperties;
4091
+ content?: CSSProperties;
4092
+ description?: CSSProperties;
4093
+ icon?: CSSProperties;
4094
+ root?: CSSProperties;
4095
+ title?: CSSProperties;
4096
+ };
4097
+ toast: Toast.Root.ToastObject<ToastOptions>;
4098
+ }
4099
+ interface ToastPromiseOptions<T> {
4100
+ error: ReactNode | ((error: Error) => ReactNode) | Omit<ToastOptions, 'type'>;
4101
+ loading: ReactNode | Omit<ToastOptions, 'type'>;
4102
+ success: ReactNode | ((data: T) => ReactNode) | Omit<ToastOptions, 'type'>;
4103
+ }
4104
+ interface ToastAPI {
4105
+ (options: ToastOptions): ToastInstance;
4106
+ dismiss: (id?: string) => void;
4107
+ error: (options: Omit<ToastOptions, 'type'> | string) => ToastInstance;
4108
+ info: (options: Omit<ToastOptions, 'type'> | string) => ToastInstance;
4109
+ loading: (options: Omit<ToastOptions, 'type'> | string) => ToastInstance;
4110
+ promise: <T>(promise: Promise<T>, options: ToastPromiseOptions<T>) => Promise<T>;
4111
+ success: (options: Omit<ToastOptions, 'type'> | string) => ToastInstance;
4112
+ warning: (options: Omit<ToastOptions, 'type'> | string) => ToastInstance;
4113
+ }
4114
+
4115
+ declare const toast: ToastAPI;
4116
+ interface ToastHostProps {
4117
+ className?: string;
4118
+ /**
4119
+ * Default duration for toasts
4120
+ * @default 5000
4121
+ */
4122
+ duration?: number;
4123
+ /**
4124
+ * Maximum number of toasts
4125
+ * @default 5
4126
+ */
4127
+ limit?: number;
4128
+ /**
4129
+ * Toast position
4130
+ * @default 'bottom-right'
4131
+ */
4132
+ position?: ToastPosition;
4133
+ /**
4134
+ * Root element for portal
4135
+ */
4136
+ root?: HTMLElement | ShadowRoot | null;
4137
+ /**
4138
+ * Swipe direction to dismiss
4139
+ * @default ['down', 'right']
4140
+ */
4141
+ swipeDirection?: ('left' | 'right' | 'up' | 'down') | ('left' | 'right' | 'up' | 'down')[];
4142
+ }
4143
+ declare const ToastHost: react.MemoExoticComponent<({ root, className, duration, limit, position, swipeDirection, }: ToastHostProps) => react.ReactPortal | null>;
4144
+ declare const useToast: () => ToastAPI;
4145
+
4146
+ interface TocItemType {
4147
+ children?: TocItemType[];
4148
+ id: string;
4149
+ title: string;
4150
+ }
4151
+ interface TocMobileProps {
4152
+ activeKey?: string;
4153
+ getContainer?: AnchorProps['getContainer'];
4154
+ headerHeight?: number;
4155
+ items: TocItemType[];
4156
+ onChange?: (activeKey: string) => void;
4157
+ tocWidth?: number;
4158
+ }
4159
+ interface TocProps extends TocMobileProps {
4160
+ isMobile?: boolean;
4161
+ }
4162
+
4163
+ declare const Toc: react.NamedExoticComponent<TocProps>;
4164
+
4165
+ declare const copyToClipboard: (text: string) => Promise<void>;
4166
+
4167
+ declare const preventDefault: <T extends {
4168
+ preventDefault: () => void;
4169
+ }>(event: T) => void;
4170
+ declare const stopPropagation: <T extends {
4171
+ stopPropagation: () => void;
4172
+ }>(event: T) => void;
4173
+ declare const preventDefaultAndStopPropagation: <T extends {
4174
+ preventBaseUIHandler?: () => void;
4175
+ preventDefault: () => void;
4176
+ stopPropagation: () => void;
4177
+ }>(event: T) => void;
4178
+
4179
+ declare const _default: {
4180
+ displayName: string;
4181
+ name: string;
4182
+ semanticHighlighting: boolean;
4183
+ tokenColors: ({
4184
+ settings: {
4185
+ foreground: string;
4186
+ fontStyle?: undefined;
4187
+ background?: undefined;
4188
+ };
4189
+ scope?: undefined;
4190
+ } | {
4191
+ scope: string;
4192
+ settings: {
4193
+ foreground: string;
4194
+ fontStyle?: undefined;
4195
+ background?: undefined;
4196
+ };
4197
+ } | {
4198
+ scope: string;
4199
+ settings: {
4200
+ fontStyle: string;
4201
+ foreground: string;
4202
+ background?: undefined;
4203
+ };
4204
+ } | {
4205
+ settings: {
4206
+ background: string;
4207
+ foreground: string;
4208
+ fontStyle?: undefined;
4209
+ };
4210
+ scope?: undefined;
4211
+ } | {
4212
+ scope: string[];
4213
+ settings: {
4214
+ foreground: string;
4215
+ fontStyle?: undefined;
4216
+ background?: undefined;
4217
+ };
4218
+ } | {
4219
+ scope: string[];
4220
+ settings: {
4221
+ fontStyle: string;
4222
+ foreground?: undefined;
4223
+ background?: undefined;
4224
+ };
4225
+ } | {
4226
+ scope: string[];
4227
+ settings: {
4228
+ fontStyle: string;
4229
+ foreground: string;
4230
+ background?: undefined;
4231
+ };
4232
+ })[];
4233
+ type: string;
4234
+ };
4235
+
4236
+ export { A, type AProps, Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ActionIcon, ActionIconGroup, type ActionIconGroupEvent, type MenuItemType as ActionIconGroupItemType, type ActionIconGroupProps, type ActionIconProps, type ActionIconSize, Alert, type AlertProps, AutoComplete, type AutoCompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type BaseMenuItemType, Block, type BlockProps, Burger, type BurgerProps, Button, type ButtonProps, type CDN, CLASSNAMES, CUSTOM_SELECT_CONTAINER_ATTR, Checkbox, CheckboxGroup, type CheckboxGroupOption, type CheckboxGroupProps, type CheckboxProps, CodeDiff, type CodeDiffProps, CodeEditor, type CodeEditorProps, Collapse, type CollapseItemType, type CollapseProps, type ColorPalettes, type ColorPalettesAlpha, ColorSwatches, type ColorSwatchesProps, type ColorToken, type Config, ConfigProvider, type ContextMenuCheckboxItem, ContextMenuHost, type ContextMenuItem, ContextMenuTrigger, CopyButton, type CopyButtonProps, DROPDOWN_MENU_CONTAINER_ATTR, DatePicker, type DatePickerProps, type DiffViewMode, type DivProps, DownloadButton, type DownloadButtonProps, DraggablePanel, DraggablePanelBody, type DraggablePanelBodyProps, DraggablePanelContainer, type DraggablePanelContainerProps, DraggablePanelFooter, type DraggablePanelFooterProps, DraggablePanelHeader, type DraggablePanelHeaderProps, type DraggablePanelProps, DraggableSideNav, type DraggableSideNavProps, Drawer, type DrawerProps, Dropdown, type DropdownItem, DropdownMenu, type DropdownMenuCheckboxItem, DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, DropdownMenuGroup, DropdownMenuGroupLabel, type DropdownMenuGroupLabelProps, DropdownMenuItem, DropdownMenuItemContent, type DropdownMenuItemContentProps, DropdownMenuItemExtra, type DropdownMenuItemExtraProps, DropdownMenuItemIcon, type DropdownMenuItemIconProps, DropdownMenuItemLabel, type DropdownMenuItemLabelProps, type DropdownMenuItemProps, type MenuItemType as DropdownMenuItemType, type DropdownMenuPlacement, DropdownMenuPopup, type DropdownMenuPopupProps, DropdownMenuPortal, type DropdownMenuPortalProps, DropdownMenuPositioner, type DropdownMenuPositionerProps, type DropdownMenuProps, DropdownMenuRoot, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuSubmenuArrow, type DropdownMenuSubmenuArrowProps, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, type DropdownMenuSubmenuTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, type DropdownProps, EditableText, type EditableTextProps, EditorSlashMenu, EditorSlashMenuGroup$1 as EditorSlashMenuGroup, type EditorSlashMenuItems, type EditorSlashMenuOption, EmojiPicker, type EmojiPickerProps, Empty, type EmptyProps, FileTypeIcon, type FileTypeIconProps, Flex, type FlexDirection, type FlexProps, FluentEmoji, type FluentEmojiProps, FontLoader, type FontLoaderProps, Footer, type FooterProps, FormComponentImpl as Form, FormCheckbox, type FormConfig, FormDatePicker, FormError, type FormFieldRules, FormGroup, FormInput, FormLabel, FormModal, type FormModalProps, type FormProps, FormSegment, FormSelect, type FormState, FormSwitch, FormTimePicker, type GenericItemType, Grid, type GridProps, GroupAvatar, type GroupAvatarProps, GuideCard, type GuideCardProps, Header, type HeaderProps, Highlighter, type HighlighterProps, Hotkey, HotkeyInput, type HotkeyInputProps, type HotkeyProps, I18nProvider, type I18nProviderProps, Icon, type IconProps$1 as IconProps, IconProvider, type IconSize, Image, type ImageProps$1 as ImageProps, ImageSelect, type ImageSelectItem, type ImageSelectProps, type ImgProps, type ImperativeModalProps, Input, InputMask, type InputMaskProps, InputNumber, type InputNumberProps, InputOPT, type InputOPTProps, InputPassword, type InputPasswordProps, type InputProps, type ItemType, KeyMapEnum, Layout, LayoutFooter, type LayoutFooterProps, LayoutHeader, type LayoutHeaderProps, LayoutMain, type LayoutMainProps, type LayoutProps, LayoutSidebar, LayoutSidebarInner, type LayoutSidebarInnerProps, type LayoutSidebarProps, LayoutToc, type LayoutTocProps, List, ListItem, type ListItemProps, type ListProps, type LobeCustomStylish, type LobeCustomToken, I18nProvider as LobeUIProvider, Markdown, type MarkdownProps, MaskShadow, type MaskShadowProps, MaterialFileTypeIcon, type MaterialFileTypeIconProps, Menu, type MenuCheckboxItemType, type MenuItemType, type MenuProps, Mermaid, type MermaidProps, Meta, type MetaProps, Modal, ModalHost, type ModalHostProps, type ModalInstance, type ModalProps, ModalProvider, MotionComponent, type MotionComponentType, MotionProvider, type NeutralColors, type NeutralColorsObj, POPOVER_CONTAINER_ATTR, PatchDiff, type PatchDiffProps, type Placement, type PlacementConfig, Popover, PopoverArrow, type PopoverArrowAtomProps, PopoverArrowIcon, PopoverBackdrop, type PopoverContextValue, PopoverGroup, type PopoverPlacement, PopoverPopup, type PopoverPopupAtomProps, PopoverPortal, type PopoverPortalAtomProps, PopoverPositioner, type PopoverPositionerAtomProps, type PopoverProps, PopoverProvider, PopoverRoot, type PopoverTrigger, PopoverTriggerElement, type PopoverTriggerElementProps, PopoverViewport, type PopoverViewportAtomProps, type PresetColorKey, type PresetColorType, type PresetSystemColorKey, type PresetSystemColorType, PreviewGroup, type PreviewGroupProps, type PrimaryColors, type PrimaryColorsObj, type RawModalComponent, type RawModalComponentProps, type RawModalInstance, type RawModalKeyOptions, type RawModalOptions, SELECT_CONTAINER_ATTR, ScrollArea, ScrollAreaContent, type ScrollAreaContentProps, ScrollAreaCorner, type ScrollAreaCornerProps, type ScrollAreaProps, ScrollAreaRoot, type ScrollAreaRootProps, ScrollAreaScrollbar, type ScrollAreaScrollbarProps, ScrollAreaThumb, type ScrollAreaThumbProps, ScrollAreaViewport, type ScrollAreaViewportProps, ScrollShadow, type ScrollShadowProps, SearchBar, type SearchBarProps, SearchResultCards, type SearchResultCardsProps, Segmented, type SegmentedProps, Select, SelectArrow, type SelectArrowProps, SelectBackdrop, type SelectBehaviorVariant, type SelectClassNames, SelectGroup, SelectGroupLabel, type SelectGroupLabelProps, type SelectGroupProps, SelectIcon, type SelectIconProps, type SelectIndicatorVariant, SelectItem, SelectItemIndicator, type SelectItemIndicatorProps, type SelectItemProps, SelectItemText, type SelectItemTextProps, SelectList, type SelectListProps, type SelectOption, type SelectOptionGroup, type SelectOptions, SelectPopup, type SelectPopupProps, SelectPortal, type SelectPortalProps, SelectPositioner, type SelectPositionerProps, type SelectProps, SelectRoot, SelectScrollDownArrow, type SelectScrollDownArrowProps, SelectScrollUpArrow, type SelectScrollUpArrowProps, SelectSeparator, type SelectSize, SelectTrigger, type SelectTriggerProps, SelectValue, type SelectValueProps, type SelectVariant, _default as ShikiLobeTheme, SideNav, type SideNavProps, Skeleton, SkeletonAvatar, type SkeletonAvatarProps, SkeletonBlock, type SkeletonBlockProps, SkeletonButton, type SkeletonButtonProps, SkeletonParagraph, type SkeletonParagraphProps, type SkeletonProps, SkeletonTags, type SkeletonTagsProps, SkeletonTitle, type SkeletonTitleProps, SliderWithInput, type SliderWithInputProps, Snippet, type SnippetProps, SortableList, type SortableListProps, type SpanProps, type SvgProps, Switch, type SwitchChangeEventHandler, type SwitchClassNames, type SwitchClickEventHandler, type SwitchContextType, SwitchIcon, type SwitchIconPosition, type SwitchIconProps, type SwitchProps, SwitchRoot, type SwitchRootProps, type SwitchSize, type SwitchStyles, SwitchThumb, type SwitchThumbProps, SyntaxHighlighter, type SyntaxHighlighterProps, SyntaxMermaid, type SyntaxMermaidProps, type SystemColorToken, Table, type TableColumn, type TableDataSource, type TablePageSizeConfig, type TableProps, type TableReadConfig, Tabs, type TabsProps, Tag, type TagProps, Text, TextArea, type TextAreaProps, type TextProps, ThemeProvider, type ThemeProviderProps, ThemeSwitch, type ThemeSwitchProps, TimePicker, type Meridiem as TimePickerMeridiem, type TimePickerProps, type TimeValue as TimePickerValue, type ToastAPI, ToastHost, type ToastHostProps, type ToastInstance, type ToastOptions, type ToastPosition, type ToastPromiseOptions, type ToastProps, type ToastType, Toc, type TocProps, Tooltip, TooltipGroup, type TooltipProps, type Trigger, Typography, type TypographyProps, type UseFormReturn, Video, type VideoProps$1 as VideoProps, closeContextMenu, combineKeys, copyToClipboard, createModal, createRawModal, findCustomThemeName, genCdnUrl, generateColorNeutralPalette, generateColorPalette, highlighterThemes, generateCustomStylish as lobeCustomStylish, generateCustomToken as lobeCustomToken, staticStylish as lobeStaticStylish, styles as menuSharedStyles, mermaidThemes, neutralColors, neutralColorsSwatches, placementMap, preprocessMarkdownContent, preventDefault, preventDefaultAndStopPropagation, primaryColors, primaryColorsSwatches, rehypeCustomFootnotes, rehypeKatexDir, rehypeStreamAnimated, remarkBr, remarkColor, remarkCustomFootnotes, remarkGfmPlus, remarkVideo, renderDropdownMenuItems, runRules, showContextMenu, stopPropagation, toFloatingUIPlacement, toast, updateContextMenuItems, useCdnFn, useForm, useModalContext, useMotionComponent, usePopoverContext, usePopoverPortalContainer, useSwitchContext, useToast, useTranslation };