reykit 1.0.48 → 1.0.50

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,3 +1,9 @@
1
+ /**
2
+ * @Time : 2026-03-11
3
+ * @Author : Rey
4
+ * @Contact : reyxbo@163.com
5
+ * @Explain : Base methods.
6
+ */
1
7
  export type Key<T> = keyof T;
2
8
  export type Value<T> = T[keyof T];
3
9
  export type KeyByValue<T, V> = {
@@ -7,7 +7,7 @@ import { ReactNode, ComponentProps, MouseEvent } from 'react';
7
7
  */
8
8
  export declare function CycleButton({ childrens, handleCycle, onClick, ...props }: {
9
9
  childrens: ReactNode[];
10
- handleCycle: (index: number) => void;
10
+ handleCycle: (index: number) => any | Promise<any>;
11
11
  data: {
12
12
  children: ReactNode;
13
13
  handleClick: (event: MouseEvent<HTMLButtonElement>) => void;
@@ -5,7 +5,7 @@ import { ComponentProps } from 'react';
5
5
  * @param handleFormData - Handle submited form data.
6
6
  * @param link - Access router link.
7
7
  */
8
- export default function Form({ handleFormData, link, onSubmit, ...props }: {
9
- handleFormData?: (formData: FormData) => void | Promise<void>;
8
+ export declare function Form({ handleFormData, link, onSubmit, ...props }: {
9
+ handleFormData?: (formData: FormData) => any | Promise<any>;
10
10
  link?: string;
11
11
  } & ComponentProps<'form'>): import("react/jsx-runtime").JSX.Element;
@@ -11,7 +11,7 @@ import { ReactNode, ComponentProps } from 'react';
11
11
  export declare function IconToggle({ openIcon, closeIcon, handleOpen, defaultOpen, rotate, className, onClick, ...props }: {
12
12
  openIcon: ReactNode;
13
13
  closeIcon: ReactNode;
14
- handleOpen: (open: boolean) => void | Promise<void>;
14
+ handleOpen: (open: boolean) => any | Promise<any>;
15
15
  defaultOpen?: boolean;
16
16
  rotate?: boolean;
17
17
  } & ComponentProps<'button'>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @Time : 2026-03-11
3
+ * @Author : Rey
4
+ * @Contact : reyxbo@163.com
5
+ * @Explain : Component index file.
6
+ */
7
+ export { CycleButton } from './Button';
8
+ export { Form } from './Form';
9
+ export { IconToggle } from './Toggle';
package/dist/index.d.ts CHANGED
@@ -1,24 +1,23 @@
1
- import { CycleButton } from './components/Button';
2
- import { default as Form } from './components/Form';
3
- import { IconToggle } from './components/Toggle';
4
- import { useOpen, useCount, useIndex, useIsMobile } from './hook';
5
- import { renderReact } from './react';
6
- import { default as request } from './request';
7
- import { default as Storager } from './storage';
8
- import { cn } from './tailwindcss';
9
- import * as types from './type';
1
+ /**
2
+ * @Time : 2026-03-11
3
+ * @Author : Rey
4
+ * @Contact : reyxbo@163.com
5
+ * @Explain : Main index file.
6
+ */
7
+ import * as component from './components';
8
+ import * as base from './base';
9
+ import * as net from './net';
10
+ import * as re from './re';
11
+ import * as react from './react';
12
+ import * as tailwindcss from './tailwindcss';
13
+ import * as window from './window';
10
14
  declare const _default: {
11
- types: typeof types;
12
- CycleButton: typeof CycleButton;
13
- Form: typeof Form;
14
- IconToggle: typeof IconToggle;
15
- useOpen: typeof useOpen;
16
- useCount: typeof useCount;
17
- useIndex: typeof useIndex;
18
- useIsMobile: typeof useIsMobile;
19
- renderReact: typeof renderReact;
20
- request: typeof request;
21
- Storager: typeof Storager;
22
- cn: typeof cn;
15
+ component: typeof component;
16
+ base: typeof base;
17
+ net: typeof net;
18
+ re: typeof re;
19
+ react: typeof react;
20
+ tailwindcss: typeof tailwindcss;
21
+ window: typeof window;
23
22
  };
24
23
  export default _default;