reykit 1.0.255 → 1.0.256

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.
@@ -1,9 +1,10 @@
1
1
  import { ReactNode, ComponentProps } from 'react';
2
+ export { TextBadges };
2
3
  /**
3
4
  * Text component of with multiple badges.
4
5
  *
5
6
  * @param texts - Text list.
6
7
  */
7
- export declare function TextBadges({ contents, className, ...args }: {
8
+ declare function TextBadges({ contents, className, ...args }: {
8
9
  contents: ReactNode[];
9
10
  } & ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,11 @@
1
1
  import { ReactNode } from 'react';
2
- export type Language = 'en' | 'zh';
3
- export type CoverContextParams = {
2
+ export { type Language, type CoverContextParams, useDefaultLanguage, setDefaultLanguage, createCover, Loading, useLoading };
3
+ type Language = 'en' | 'zh';
4
+ type CoverContextParams = {
4
5
  isCovering: boolean;
5
6
  setIsCovering: (value: boolean) => void;
6
7
  };
7
- export declare const useDefaultLanguage: () => Language, setDefaultLanguage: (newValue: Language) => void;
8
+ declare const useDefaultLanguage: () => Language, setDefaultLanguage: (newValue: Language) => void;
8
9
  /**
9
10
  * Create cover component and hook.
10
11
  *
@@ -17,14 +18,14 @@ export declare const useDefaultLanguage: () => Language, setDefaultLanguage: (ne
17
18
  * <button onClick={() => withCover(console, 'test')}>Button</button>
18
19
  * </Cover>
19
20
  */
20
- export declare function createCover(display: ReactNode): [({ children }: {
21
+ declare function createCover(display: ReactNode): [({ children }: {
21
22
  children: ReactNode;
22
23
  }) => import("react/jsx-runtime").JSX.Element, () => {
23
24
  withCover: <T, Args extends any[]>(fn: (...args: Args) => T | Promise<T>, ...args: Args) => Promise<T>;
24
25
  isCovering: boolean;
25
26
  setIsCovering: (value: boolean) => void;
26
27
  }];
27
- export declare const Loading: ({ children }: {
28
+ declare const Loading: ({ children }: {
28
29
  children: ReactNode;
29
30
  }) => import("react/jsx-runtime").JSX.Element, useLoading: () => {
30
31
  withCover: <T, Args extends any[]>(fn: (...args: Args) => T | Promise<T>, ...args: Args) => Promise<T>;
@@ -4,7 +4,8 @@
4
4
  * @Contact : reyxbo@163.com
5
5
  * @Explain : Breadcrumb components.
6
6
  */
7
- export type BreadcrumbDict = Record<string, {
7
+ export { type BreadcrumbDict, Breadcrumb };
8
+ type BreadcrumbDict = Record<string, {
8
9
  label: string;
9
10
  href?: string;
10
11
  }[]>;
@@ -13,6 +14,6 @@ export type BreadcrumbDict = Record<string, {
13
14
  *
14
15
  * @param props.dict - Breadcrumb data dictionary.
15
16
  */
16
- export declare function Breadcrumb({ dict }: {
17
+ declare function Breadcrumb({ dict }: {
17
18
  dict: BreadcrumbDict;
18
19
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,11 +1,12 @@
1
1
  import { ReactNode, ComponentProps, MouseEvent } from 'react';
2
+ export { CycleButton, ScrollToTopButton };
2
3
  /**
3
4
  * Button component of cycle display children.
4
5
  *
5
6
  * @param props.childrens - Children array.
6
7
  * @param props.handleCycle - Handle cycle.
7
8
  */
8
- export declare function CycleButton({ childrens, handleCycle, onClick, ...props }: {
9
+ declare function CycleButton({ childrens, handleCycle, onClick, ...props }: {
9
10
  childrens: ReactNode[];
10
11
  handleCycle: (index: number) => any | Promise<any>;
11
12
  data: {
@@ -19,6 +20,6 @@ export declare function CycleButton({ childrens, handleCycle, onClick, ...props
19
20
  *
20
21
  * @param buttonColor - Button color, need hexadecimal color value.
21
22
  */
22
- export declare function ScrollToTopButton({ buttonColor, className, style, ...args }: {
23
+ declare function ScrollToTopButton({ buttonColor, className, style, ...args }: {
23
24
  buttonColor?: string;
24
25
  } & ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element | null;
@@ -1,11 +1,12 @@
1
1
  import { ComponentProps } from 'react';
2
+ export { Form };
2
3
  /**
3
4
  * Form component of prevent access link.
4
5
  *
5
6
  * @param props.handleFormData - Handle submited form data.
6
7
  * @param props.link - Access router link.
7
8
  */
8
- export declare function Form({ handleFormData, link, onSubmit, ...props }: {
9
+ declare function Form({ handleFormData, link, onSubmit, ...props }: {
9
10
  handleFormData?: (formData: FormData) => any | Promise<any>;
10
11
  link?: string;
11
12
  } & ComponentProps<'form'>): import("react/jsx-runtime").JSX.Element;
@@ -1,12 +1,13 @@
1
1
  import { ComponentProps } from 'react';
2
2
  import * as ui from './ui';
3
+ export { PopupImage, PopupVideo, CarouselMedia, Video };
3
4
  /**
4
5
  * Media component of pop up show image.
5
6
  *
6
7
  * @param path - Image path.
7
8
  * @param loading - Loading scheme.
8
9
  */
9
- export declare function PopupImage({ path, loading, ...args }: {
10
+ declare function PopupImage({ path, loading, ...args }: {
10
11
  path: string;
11
12
  loading?: 'eager' | 'lazy';
12
13
  } & ComponentProps<typeof ui.DialogTrigger>): import("react/jsx-runtime").JSX.Element;
@@ -16,7 +17,7 @@ export declare function PopupImage({ path, loading, ...args }: {
16
17
  * @param path - Video path.
17
18
  * @param preload - Preload scheme.
18
19
  */
19
- export declare function PopupVideo({ path, preload, ...args }: {
20
+ declare function PopupVideo({ path, preload, ...args }: {
20
21
  path: string;
21
22
  preload?: 'metadata' | 'aotu' | 'none';
22
23
  } & ComponentProps<typeof ui.DialogTrigger>): import("react/jsx-runtime").JSX.Element;
@@ -31,7 +32,7 @@ export declare function PopupVideo({ path, preload, ...args }: {
31
32
  * @param showControl - Whether show controls.
32
33
  * @param language - Language type.
33
34
  */
34
- export declare function CarouselMedia({ data, orientation, width, showButton, showControl, language, ...args }: {
35
+ declare function CarouselMedia({ data, orientation, width, showButton, showControl, language, ...args }: {
35
36
  data: {
36
37
  type: 'image' | 'video';
37
38
  path: string;
@@ -42,3 +43,13 @@ export declare function CarouselMedia({ data, orientation, width, showButton, sh
42
43
  showControl?: boolean;
43
44
  language?: 'en' | 'zh';
44
45
  } & ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
46
+ /**
47
+ * Video player component.
48
+ *
49
+ * @param path - Video path.
50
+ */
51
+ declare function Video({ path, fit, language, ...args }: {
52
+ path: string;
53
+ fit?: ComponentProps<typeof ui.VideoViewport>['fit'];
54
+ language?: 'en' | 'zh';
55
+ } & ui.VideoRootProps): import("react/jsx-runtime").JSX.Element;
@@ -1,11 +1,12 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { ToasterProps } from 'sonner';
3
3
  export { toast as notice } from 'sonner';
4
+ export { Notice };
4
5
  /**
5
6
  * Top banner notice component.
6
7
  *
7
8
  * @param props.children - The node tree of the mounting context.
8
9
  */
9
- export declare function Notice({ children, position, richColors, toastOptions, ...props }: {
10
+ declare function Notice({ children, position, richColors, toastOptions, ...props }: {
10
11
  children: ReactNode;
11
12
  } & ToasterProps): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
- export type TableFieldOption<Row extends Record<string, any>> = {
2
+ export { type TableFieldOption, type DefaultTableFieldOption, type TableSearchOption, type TableButtonOption, type TableRowOptionItemLink, type TableRowOptionItem, type TableRowOption, type TableSelectRowsOptionItem, type TableSelectRowsOption, Table };
3
+ type TableFieldOption<Row extends Record<string, any>> = {
3
4
  key: string;
4
5
  name: string;
5
6
  isBadge?: boolean;
@@ -10,7 +11,7 @@ export type TableFieldOption<Row extends Record<string, any>> = {
10
11
  sortMethod?: (a: Row, b: Row) => number;
11
12
  defaultValue?: any;
12
13
  }[];
13
- export type DefaultTableFieldOption = {
14
+ type DefaultTableFieldOption = {
14
15
  isBadge?: boolean;
15
16
  isHide?: boolean;
16
17
  isSort?: boolean;
@@ -18,31 +19,31 @@ export type DefaultTableFieldOption = {
18
19
  isGroupSearch?: boolean;
19
20
  defaultValue?: any;
20
21
  };
21
- export type TableSearchOption<Row extends Record<string, any>> = {
22
+ type TableSearchOption<Row extends Record<string, any>> = {
22
23
  method: (value: string, row: Row) => boolean;
23
24
  placeholder?: string;
24
25
  };
25
- export type TableButtonOption = {
26
+ type TableButtonOption = {
26
27
  name: ReactNode;
27
28
  method: () => void;
28
29
  }[];
29
- export type TableRowOptionItemLink = string;
30
- export type TableRowOptionItem<Row extends Record<string, any>> = {
30
+ type TableRowOptionItemLink = string;
31
+ type TableRowOptionItem<Row extends Record<string, any>> = {
31
32
  name: ReactNode;
32
33
  method: ((row: Row) => void) | TableRowOptionItemLink | null;
33
34
  };
34
- export type TableRowOption<Row extends Record<string, any>> = {
35
+ type TableRowOption<Row extends Record<string, any>> = {
35
36
  options?: TableRowOptionItem<Row>[];
36
37
  destructiveOptions?: TableRowOptionItem<Row>[];
37
38
  } | ((row: Row) => {
38
39
  options?: TableRowOptionItem<Row>[];
39
40
  destructiveOptions?: TableRowOptionItem<Row>[];
40
41
  });
41
- export type TableSelectRowsOptionItem<Row extends Record<string, any>> = {
42
+ type TableSelectRowsOptionItem<Row extends Record<string, any>> = {
42
43
  name: ReactNode;
43
44
  method: ((selectRows: Row[]) => void) | null;
44
45
  };
45
- export type TableSelectRowsOption<Row extends Record<string, any>> = {
46
+ type TableSelectRowsOption<Row extends Record<string, any>> = {
46
47
  options?: TableSelectRowsOptionItem<Row>[];
47
48
  destructiveOptions?: TableSelectRowsOptionItem<Row>[];
48
49
  } | ((selectRows: Row[]) => {
@@ -82,7 +83,7 @@ export type TableSelectRowsOption<Row extends Record<string, any>> = {
82
83
  * @param language - Language type.
83
84
  * @param defaultFieldOption - Default field option.
84
85
  */
85
- export declare function Table<Row extends Record<string, any>>({ data, setData, fieldOption, searchOption, buttonOption, rowOption, selectRowsOption, pageSize, mobilePageSize, language, defaultFieldOption, }: {
86
+ declare function Table<Row extends Record<string, any>>({ data, setData, fieldOption, searchOption, buttonOption, rowOption, selectRowsOption, pageSize, mobilePageSize, language, defaultFieldOption, }: {
86
87
  data: Row[];
87
88
  setData: (value: Row[] | ((value: Row[]) => Row[])) => void;
88
89
  fieldOption?: TableFieldOption<Row>;
@@ -1,4 +1,5 @@
1
1
  import { ReactNode, ComponentProps } from 'react';
2
+ export { IconText, MarkdownText };
2
3
  /**
3
4
  * Text component of with icon.
4
5
  *
@@ -8,7 +9,7 @@ import { ReactNode, ComponentProps } from 'react';
8
9
  * @param mobileHideIcon - Whether hide icon content on mobile devices.
9
10
  * @param mobileHideText - Whether hide text content on mobile devices.
10
11
  */
11
- export declare function IconText({ icon, text, url, hideMobileIcon, hideMobileText, className, ...args }: {
12
+ declare function IconText({ icon, text, url, hideMobileIcon, hideMobileText, className, ...args }: {
12
13
  icon: ReactNode;
13
14
  text: string | ReactNode;
14
15
  url?: string;
@@ -18,6 +19,6 @@ export declare function IconText({ icon, text, url, hideMobileIcon, hideMobileTe
18
19
  /**
19
20
  * Text component of supporting Markdown.
20
21
  */
21
- export declare function MarkdownText({ ...args }: {
22
+ declare function MarkdownText({ ...args }: {
22
23
  children?: string | null;
23
24
  } & Omit<ComponentProps<'article'>, 'children'>): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import { ReactNode, ComponentProps } from 'react';
2
+ export { IconToggle };
2
3
  /**
3
4
  * Toggle component of with icon.
4
5
  *
@@ -11,7 +12,7 @@ import { ReactNode, ComponentProps } from 'react';
11
12
  * @param props.onChangeOpen - Open callback function.
12
13
  * @param props.defaultOpen - Default open state.
13
14
  */
14
- export declare function IconToggle({ openIcon, closeIcon, tooltip, tooltipSide, rotate, open, onChangeOpen, defaultOpen, onClick, className, ...props }: {
15
+ declare function IconToggle({ openIcon, closeIcon, tooltip, tooltipSide, rotate, open, onChangeOpen, defaultOpen, onClick, className, ...props }: {
15
16
  openIcon: ReactNode;
16
17
  closeIcon: ReactNode;
17
18
  tooltip?: string;
@@ -11,7 +11,7 @@ export { type Language, type CoverContextParams, useDefaultLanguage, setDefaultL
11
11
  export { type BreadcrumbDict, Breadcrumb } from './Breadcrumb';
12
12
  export { CycleButton, ScrollToTopButton } from './Button';
13
13
  export { Form } from './Form';
14
- export { PopupImage, PopupVideo, CarouselMedia } from './Media';
14
+ export { PopupImage, PopupVideo, CarouselMedia, Video } from './Media';
15
15
  export { Notice, notice } from './Notice';
16
16
  export { type TableFieldOption, type TableSearchOption, type TableButtonOption, type TableRowOption, type TableSelectRowsOption, Table } from './Table';
17
17
  export { IconText, MarkdownText } from './Text';
@@ -53,6 +53,7 @@ import { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLab
53
53
  import { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, emptyMediaVariants } from './empty';
54
54
  import { SidebarProvider, SidebarInset, SidebarTrigger, Sidebar, SidebarRail, SidebarHeader, SidebarContent, SidebarFooter, SidebarSeparator, SidebarInput, SidebarGroup, SidebarGroupLabel, SidebarGroupAction, SidebarGroupContent, SidebarMenu, SidebarMenuSkeleton, SidebarMenuItem, SidebarMenuButton, SidebarMenuAction, SidebarMenuBadge, SidebarMenuSub, SidebarMenuSubItem, SidebarMenuSubButton, sidebarMenuButtonVariants, useSidebar } from './sidebar';
55
55
  import { JsonViewer } from './json-viewer';
56
+ import { useVideo, VideoProvider, VideoRootProps, VideoRoot, VideoViewportProps, VideoViewport, VideoControlsProps, VideoControls, VideoSoundControlProps, VideoSoundControl, VideoPipTriggerProps, VideoPipTrigger, VideoPlayTriggerProps, VideoPlayTrigger, VideoFullscreenTriggerProps, VideoFullscreenTrigger, VideoProgressBarProps, VideoProgressBar } from './video-player';
56
57
  import * as icon from './icon';
57
58
  /**
58
59
  * Hook of return popup box component dictionary by media inquiries.
@@ -70,4 +71,4 @@ declare function usePopupBox(): {
70
71
  } & PreviewCardPrimitive.Trigger.Props) => import("react/jsx-runtime").JSX.Element;
71
72
  PopupBoxContent: typeof HoverCardContent;
72
73
  };
73
- export { icon, Link, Button, buttonVariants, Badge, badgeVariants, Label, Input, Textarea, Checkbox, RadioGroup, RadioGroupItem, Switch, Toggle, toggleVariants, Kbd, Progress, Slider, Calendar, Spinner, Separator, Skeleton, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, inputGroupAddonVariants, inputGroupButtonVariants, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants, ToggleGroup, ToggleGroupItem, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Collapsible, CollapsibleContent, CollapsibleTrigger, Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, alertVariants, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, HoverCard, HoverCardContent, HoverCardTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, type CarouselApi, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Popover, PopoverContent, PopoverTrigger, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogTitle, DialogTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogTitle, AlertDialogTrigger, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerTitle, DrawerTrigger, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Toaster, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Tabs, TabsContent, TabsList, TabsTrigger, tabsListVariants, ScrollArea, ScrollBar, AspectRatio, ResizableHandle, ResizablePanel, ResizablePanelGroup, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, Item, ItemActions, ItemContent, ItemDescription, ItemGroup, ItemMedia, ItemSeparator, ItemTitle, itemVariants, itemMediaVariants, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, fieldVariants, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, emptyMediaVariants, SidebarProvider, SidebarInset, SidebarTrigger, Sidebar, SidebarRail, SidebarHeader, SidebarContent, SidebarFooter, SidebarSeparator, SidebarInput, SidebarGroup, SidebarGroupLabel, SidebarGroupAction, SidebarGroupContent, SidebarMenu, SidebarMenuSkeleton, SidebarMenuItem, SidebarMenuButton, SidebarMenuAction, SidebarMenuBadge, SidebarMenuSub, SidebarMenuSubItem, SidebarMenuSubButton, sidebarMenuButtonVariants, JsonViewer, useSidebar, usePopupBox };
74
+ export { icon, Link, Button, buttonVariants, Badge, badgeVariants, Label, Input, Textarea, Checkbox, RadioGroup, RadioGroupItem, Switch, Toggle, toggleVariants, Kbd, Progress, Slider, Calendar, Spinner, Separator, Skeleton, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, inputGroupAddonVariants, inputGroupButtonVariants, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants, ToggleGroup, ToggleGroupItem, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Collapsible, CollapsibleContent, CollapsibleTrigger, Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, alertVariants, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, HoverCard, HoverCardContent, HoverCardTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, type CarouselApi, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Popover, PopoverContent, PopoverTrigger, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogTitle, DialogTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogTitle, AlertDialogTrigger, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerTitle, DrawerTrigger, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Toaster, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Tabs, TabsContent, TabsList, TabsTrigger, tabsListVariants, ScrollArea, ScrollBar, AspectRatio, ResizableHandle, ResizablePanel, ResizablePanelGroup, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, Item, ItemActions, ItemContent, ItemDescription, ItemGroup, ItemMedia, ItemSeparator, ItemTitle, itemVariants, itemMediaVariants, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, fieldVariants, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, emptyMediaVariants, SidebarProvider, SidebarInset, SidebarTrigger, Sidebar, SidebarRail, SidebarHeader, SidebarContent, SidebarFooter, SidebarSeparator, SidebarInput, SidebarGroup, SidebarGroupLabel, SidebarGroupAction, SidebarGroupContent, SidebarMenu, SidebarMenuSkeleton, SidebarMenuItem, SidebarMenuButton, SidebarMenuAction, SidebarMenuBadge, SidebarMenuSub, SidebarMenuSubItem, SidebarMenuSubButton, sidebarMenuButtonVariants, JsonViewer, useVideo, VideoProvider, type VideoRootProps, VideoRoot, type VideoViewportProps, VideoViewport, type VideoControlsProps, VideoControls, type VideoSoundControlProps, VideoSoundControl, type VideoPipTriggerProps, VideoPipTrigger, type VideoPlayTriggerProps, VideoPlayTrigger, type VideoFullscreenTriggerProps, VideoFullscreenTrigger, type VideoProgressBarProps, VideoProgressBar, useSidebar, usePopupBox };
@@ -0,0 +1,82 @@
1
+ import { default as React } from 'react';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ interface VideoContextType {
4
+ videoRef: React.RefObject<HTMLVideoElement | null>;
5
+ containerRef: React.RefObject<HTMLDivElement | null>;
6
+ isPlaying: boolean;
7
+ isBuffering: boolean;
8
+ hasError: boolean;
9
+ videoProgress: number;
10
+ videoDuration: number;
11
+ areControlsShown: boolean;
12
+ isFullscreen: boolean;
13
+ isPip: boolean;
14
+ isVolumeControlOpen: boolean;
15
+ repeatVideoAutomatically: boolean;
16
+ autoPlayVideoUponVisible: boolean;
17
+ autoHideControls: boolean;
18
+ showCenterControls: boolean;
19
+ attemptTogglePlay: () => void;
20
+ toggleFullscreen: () => void;
21
+ setIsPlaying: (playing: boolean) => void;
22
+ setIsBuffering: (buffering: boolean) => void;
23
+ setHasError: (hasError: boolean) => void;
24
+ setVideoProgress: (progress: number) => void;
25
+ setVideoDuration: (videoDuration: number) => void;
26
+ setShowControls: (show: boolean) => void;
27
+ showControlsTemporarily: () => void;
28
+ setVolume: (x: number) => void;
29
+ setIsMouseOverControls: (x: boolean) => void;
30
+ toggleMute: (x: boolean) => void;
31
+ togglePip: () => void;
32
+ setIsVolumeControlOpen: (x: boolean) => void;
33
+ clearControlsTimeout: () => void;
34
+ }
35
+ declare function useVideo(): VideoContextType;
36
+ declare function VideoProvider({ repeat, auto, autoHideControls, showCenterControls, children }: {
37
+ repeat: boolean;
38
+ auto: boolean;
39
+ autoHideControls: boolean;
40
+ showCenterControls?: boolean;
41
+ children: React.ReactNode;
42
+ }): React.ReactElement;
43
+ interface VideoRootProps extends React.ComponentPropsWithoutRef<'div'> {
44
+ repeat?: boolean;
45
+ auto?: boolean;
46
+ autoHideControls?: boolean;
47
+ showCenterControls?: boolean;
48
+ }
49
+ declare function VideoRoot({ children, className, repeat, auto, autoHideControls, showCenterControls, ...props }: VideoRootProps): import("react/jsx-runtime").JSX.Element;
50
+ declare const videoViewportVariants: (props?: ({
51
+ fit?: "fill" | "none" | "contain" | "cover" | "scaleDown" | null | undefined;
52
+ } & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
53
+ interface VideoViewportProps extends Omit<React.ComponentPropsWithoutRef<'video'>, 'controls'>, VariantProps<typeof videoViewportVariants> {
54
+ }
55
+ declare function VideoViewport({ src, fit, className, ...props }: VideoViewportProps): import("react/jsx-runtime").JSX.Element;
56
+ interface VideoControlsProps extends React.ComponentPropsWithoutRef<'div'> {
57
+ }
58
+ declare function VideoControls({ children, className, ...props }: VideoControlsProps): React.ReactElement;
59
+ interface VideoSoundControlProps extends React.ComponentPropsWithoutRef<'button'> {
60
+ }
61
+ declare function VideoSoundControl({ className, language, ...props }: {
62
+ language?: 'en' | 'zh';
63
+ } & VideoSoundControlProps): import("react/jsx-runtime").JSX.Element;
64
+ interface VideoPipTriggerProps extends React.ComponentPropsWithoutRef<'button'> {
65
+ }
66
+ declare function VideoPipTrigger({ language, className, ...props }: {
67
+ language?: 'en' | 'zh';
68
+ } & VideoPipTriggerProps): React.ReactElement;
69
+ interface VideoPlayTriggerProps extends React.ComponentPropsWithoutRef<'button'> {
70
+ }
71
+ declare function VideoPlayTrigger({ language, className, ...props }: {
72
+ language?: 'en' | 'zh';
73
+ } & VideoPlayTriggerProps): React.ReactElement;
74
+ interface VideoFullscreenTriggerProps extends React.ComponentPropsWithoutRef<'button'> {
75
+ }
76
+ declare function VideoFullscreenTrigger({ language, className, ...props }: {
77
+ language?: 'en' | 'zh';
78
+ } & VideoFullscreenTriggerProps): React.ReactElement;
79
+ interface VideoProgressBarProps extends React.ComponentPropsWithoutRef<'div'> {
80
+ }
81
+ declare function VideoProgressBar({ className, ...props }: VideoProgressBarProps): React.ReactElement;
82
+ export { useVideo, VideoProvider, type VideoRootProps, VideoRoot, type VideoViewportProps, VideoViewport, type VideoControlsProps, VideoControls, type VideoSoundControlProps, VideoSoundControl, type VideoPipTriggerProps, VideoPipTrigger, type VideoPlayTriggerProps, VideoPlayTrigger, type VideoFullscreenTriggerProps, VideoFullscreenTrigger, type VideoProgressBarProps, VideoProgressBar };
@@ -4,19 +4,20 @@
4
4
  * @Contact : reyxbo@163.com
5
5
  * @Explain : Base methods module.
6
6
  */
7
- export type Key<T> = keyof T;
8
- export type Value<T> = T[keyof T];
9
- export type KeyByValue<T, V> = {
7
+ export { Key, Value, KeyByValue, debugCss, isUrl };
8
+ type Key<T> = keyof T;
9
+ type Value<T> = T[keyof T];
10
+ type KeyByValue<T, V> = {
10
11
  [K in keyof T]: T[K] extends V ? K : never;
11
12
  }[keyof T];
12
13
  /**
13
14
  * Start debug CSS style, need to import 'reykit/debug' CSS style first.
14
15
  */
15
- export declare function debugCss(): void;
16
+ declare function debugCss(): void;
16
17
  /**
17
18
  * Judge whether value is a URL.
18
19
  *
19
20
  * @param value - Value.
20
21
  * @returns Judgement result.
21
22
  */
22
- export declare function isUrl(value: string): boolean;
23
+ declare function isUrl(value: string): boolean;
@@ -1,7 +1,27 @@
1
+ export { type AliGraphCaptchaOnErrorArg, type AliGraphCaptchaOnError, type AliGraphCaptchaConfig, initAliGraphCaptcha, verifyAliGraphCaptcha };
2
+ type AliGraphCaptchaOnErrorArg = {
3
+ code: string;
4
+ msg: string;
5
+ desc: {
6
+ detail: string;
7
+ };
8
+ };
9
+ type AliGraphCaptchaOnError = (error: AliGraphCaptchaOnErrorArg) => void;
10
+ type AliGraphCaptchaConfig = {
11
+ appId: string | null;
12
+ onError: AliGraphCaptchaOnError | null;
13
+ };
1
14
  /**
2
- * @Time : 2026-06-11
3
- * @Author : Rey
4
- * @Contact : reyxbo@163.com
5
- * @Explain : Graphical CAPTCHA module.
15
+ * Initialize Ali graph captcha.
16
+ *
17
+ * @param appId: Account APP ID.
18
+ * @param onError: Callback function of error.
6
19
  */
7
- export { initAliGraphCaptcha, verifyAliGraphCaptcha } from './captcha';
20
+ declare function initAliGraphCaptcha(appId: string, onError?: AliGraphCaptchaOnError | null): void;
21
+ /**
22
+ * Use Ali graph captcha.
23
+ *
24
+ * @param fn - Execution function after verification.
25
+ * @param args - Execution function arguments.
26
+ */
27
+ declare function verifyAliGraphCaptcha<T, Args extends any[]>(fn: (...args: Args) => T | Promise<T>, ...args: Args): void;
@@ -4,10 +4,11 @@
4
4
  * @Contact : reyxbo@163.com
5
5
  * @Explain : Data processing module.
6
6
  */
7
- export declare function range(stop: number): Generator<number>;
8
- export declare function range(start: number, stop: number, step?: number): Generator<number>;
9
- export declare function rangeArr(stop: number): number[];
10
- export declare function rangeArr(start: number, stop: number, step?: number): number[];
7
+ export { range, rangeArr, toggleArr, compare, sort, countArr };
8
+ declare function range(stop: number): Generator<number>;
9
+ declare function range(start: number, stop: number, step?: number): Generator<number>;
10
+ declare function rangeArr(stop: number): number[];
11
+ declare function rangeArr(start: number, stop: number, step?: number): number[];
11
12
  /**
12
13
  * Toggle array element value.
13
14
  *
@@ -15,7 +16,7 @@ export declare function rangeArr(start: number, stop: number, step?: number): nu
15
16
  * @Param value - Element value.
16
17
  * @returns Array of toggled element.
17
18
  */
18
- export declare function toggleArr<T>(arr: T[], value: T): T[];
19
+ declare function toggleArr<T>(arr: T[], value: T): T[];
19
20
  /**
20
21
  * Compare the sizes of two values.
21
22
  *
@@ -24,7 +25,7 @@ export declare function toggleArr<T>(arr: T[], value: T): T[];
24
25
  * @param order - Sorting type.
25
26
  * @returns Sorted result.
26
27
  */
27
- export declare function compare(a: any, b: any, order?: 'asc' | 'desc'): 1 | 0 | -1;
28
+ declare function compare(a: any, b: any, order?: 'asc' | 'desc'): 1 | 0 | -1;
28
29
  /**
29
30
  * Sorting array.
30
31
  *
@@ -33,11 +34,11 @@ export declare function compare(a: any, b: any, order?: 'asc' | 'desc'): 1 | 0 |
33
34
  * @param key - Element object index key.
34
35
  * @returns Sorted array.
35
36
  */
36
- export declare function sort<T>(arr: T[], order?: 'asc' | 'desc', key?: keyof T): T[];
37
+ declare function sort<T>(arr: T[], order?: 'asc' | 'desc', key?: keyof T): T[];
37
38
  /**
38
39
  * Count elements of array.
39
40
  *
40
41
  * @param arr - Array.
41
42
  * @returns Count result.
42
43
  */
43
- export declare function countArr<T>(arr: T[]): Map<T, number>;
44
+ declare function countArr<T>(arr: T[]): Map<T, number>;
@@ -4,6 +4,7 @@
4
4
  * @Contact : reyxbo@163.com
5
5
  * @Explain : Image processing module.
6
6
  */
7
+ export { getQrcode, openQrcode, downloadQrcode, setQrcode };
7
8
  /**
8
9
  * Generate QRCode URL.
9
10
  *
@@ -12,7 +13,7 @@
12
13
  * @param options.margin - Number of margin blank square.
13
14
  * @returns QR code URL.
14
15
  */
15
- export declare function getQrcode(text: string, options?: {
16
+ declare function getQrcode(text: string, options?: {
16
17
  width?: number;
17
18
  margin?: number;
18
19
  }): Promise<string>;
@@ -24,7 +25,7 @@ export declare function getQrcode(text: string, options?: {
24
25
  * @param options.margin - Number of margin blank square.
25
26
  * @returns QR code URL.
26
27
  */
27
- export declare function openQrcode(text: string, options?: {
28
+ declare function openQrcode(text: string, options?: {
28
29
  width?: number;
29
30
  margin?: number;
30
31
  }): Promise<string>;
@@ -37,7 +38,7 @@ export declare function openQrcode(text: string, options?: {
37
38
  * @param options.margin - Number of margin blank square.
38
39
  * @returns QR code URL.
39
40
  */
40
- export declare function downloadQrcode(text: string, options?: {
41
+ declare function downloadQrcode(text: string, options?: {
41
42
  fileName?: string;
42
43
  width?: number;
43
44
  margin?: number;
@@ -51,7 +52,7 @@ export declare function downloadQrcode(text: string, options?: {
51
52
  * @param options.margin - Number of margin blank square.
52
53
  * @returns QR code URL.
53
54
  */
54
- export declare function setQrcode(text: string, element: HTMLElement | string, options?: {
55
+ declare function setQrcode(text: string, element: HTMLElement | string, options?: {
55
56
  width?: number;
56
57
  margin?: number;
57
58
  }): Promise<string>;
@@ -4,6 +4,7 @@
4
4
  * @Contact : reyxbo@163.com
5
5
  * @Explain : Network module.
6
6
  */
7
+ export { request };
7
8
  /**
8
9
  * Send request.
9
10
  *
@@ -23,7 +24,7 @@
23
24
  * Note: `Error.message` is response body string, `Error.cause` is `Response` instance.
24
25
  * - `undefined` : False.
25
26
  */
26
- export declare function request(url: string, option?: {
27
+ declare function request(url: string, option?: {
27
28
  params?: Record<string, string | number | boolean>;
28
29
  body?: URLSearchParams | File | FormData | Blob | Record<string, any> | string;
29
30
  headers?: Record<string, string | number | boolean>;
@@ -4,6 +4,7 @@
4
4
  * @Contact : reyxbo@163.com
5
5
  * @Explain : Random value module.
6
6
  */
7
+ export { randChar };
7
8
  /**
8
9
  * Generate random characters.
9
10
  *
@@ -11,4 +12,4 @@
11
12
  * @param style - Character style.
12
13
  * @returns Random characters.
13
14
  */
14
- export declare function randChar(length?: number, style?: 'd' | 'l' | 'p' | 'dl' | 'dp' | 'lp' | 'dlp'): string;
15
+ declare function randChar(length?: number, style?: 'd' | 'l' | 'p' | 'dl' | 'dp' | 'lp' | 'dlp'): string;
@@ -4,8 +4,9 @@
4
4
  * @Contact : reyxbo@163.com
5
5
  * @Explain : Regular expression module.
6
6
  */
7
- export declare const PATTERN_IP: RegExp;
8
- export declare const PATTERN_URL: RegExp;
9
- export declare const PATTERN_EMAIL: RegExp;
10
- export declare const PATTERN_PHONE: RegExp;
11
- export declare const PATTERN_CN: RegExp;
7
+ export { PATTERN_IP, PATTERN_URL, PATTERN_EMAIL, PATTERN_PHONE, PATTERN_CN };
8
+ declare const PATTERN_IP: RegExp;
9
+ declare const PATTERN_URL: RegExp;
10
+ declare const PATTERN_EMAIL: RegExp;
11
+ declare const PATTERN_PHONE: RegExp;
12
+ declare const PATTERN_CN: RegExp;