@cclr/react 0.1.31 → 0.1.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.
@@ -1,5 +1,3 @@
1
- import * as React$1 from 'react';
2
- import React__default from 'react';
3
1
  import { TPlainObject, TAny, TPlainFunction, TNoop } from '@cclr/lang';
4
2
  import { TEventMap } from '@cclr/front';
5
3
 
@@ -7,7 +5,7 @@ import { TEventMap } from '@cclr/front';
7
5
  * 适配子元素为DOM元素
8
6
  * 如果没有传入dom子元素,则返回一个空的div
9
7
  */
10
- declare const AdaptDomChildren: React__default.ForwardRefExoticComponent<Omit<any, "ref"> & React__default.RefAttributes<any>>;
8
+ declare const AdaptDomChildren: any;
11
9
 
12
10
  /**
13
11
  * 简化 createContext 的使用
@@ -53,16 +51,7 @@ declare const useDebounceFn: <T extends TPlainFunction>(cb: T, options?: {
53
51
  trailing?: boolean;
54
52
  /** 最大等待时间,单位为毫秒 */
55
53
  maxWait?: number;
56
- }) => {
57
- run: T & {
58
- cancel: () => void;
59
- flush: () => void;
60
- fun: T;
61
- };
62
- cancel: () => void;
63
- flush: () => void;
64
- fun: T;
65
- };
54
+ }) => any;
66
55
 
67
56
  /**
68
57
  * 使用多个事件监听器
@@ -77,7 +66,7 @@ declare const useEventListenerMultiple: <T extends HTMLElement = HTMLElement>(re
77
66
  * @param eventMap 事件监听器映射
78
67
  */
79
68
  declare const useEventListenerMultipleRef: <T extends HTMLElement = HTMLElement>(eventMap: TEventMap) => {
80
- ref: React$1.RefObject<T>;
69
+ ref: any;
81
70
  };
82
71
 
83
72
  /**
@@ -93,7 +82,7 @@ declare const useOnceFun: (fun: TNoop) => void;
93
82
  * @param initFun 初始化函数
94
83
  * @returns
95
84
  */
96
- declare const useRefPro: <T>(initFun: (() => T) | T) => React$1.MutableRefObject<T | undefined>;
85
+ declare const useRefPro: <T>(initFun: (() => T) | T) => any;
97
86
 
98
87
  /**
99
88
  * 节流
@@ -107,24 +96,15 @@ declare const useThrottleFn: <T extends TPlainFunction>(cb: T, options?: {
107
96
  leading?: boolean;
108
97
  /** 是否在延迟开始后调用函数 default: true */
109
98
  trailing?: boolean;
110
- }) => {
111
- run: T & {
112
- cancel: () => void;
113
- flush: () => void;
114
- fun: T;
115
- };
116
- cancel: () => void;
117
- flush: () => void;
118
- fun: T;
119
- };
99
+ }) => any;
120
100
 
121
- declare const useUpdate: () => () => void;
101
+ declare const useUpdate: () => () => any;
122
102
 
123
103
  /**
124
104
  * 生成一个 uuid
125
105
  * @returns string
126
106
  */
127
- declare const useUuid: () => string;
107
+ declare const useUuid: () => any;
128
108
 
129
109
  interface ICommonUiProps {
130
110
  className?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cclr/react",
3
- "version": "0.1.31",
3
+ "version": "0.1.44",
4
4
  "description": "react 相关功能",
5
5
  "author": "cclr <18843152354@163.com>",
6
6
  "homepage": "",
@@ -27,12 +27,12 @@
27
27
  "g:test": "vitest run",
28
28
  "g:build": "drr build"
29
29
  },
30
- "gitHead": "e86a8a5d203fc0623bdcc158b63a007fe546f05e",
30
+ "gitHead": "afd2fc69e186fe3cb4aeaa07b5909d45f7260619",
31
31
  "dependencies": {
32
- "@cclr/front": "0.1.31",
33
- "@cclr/lang": "0.1.30",
34
- "@cclr/model": "0.1.31",
35
- "@cclr/utils": "0.1.31"
32
+ "@cclr/front": "^0.1.44",
33
+ "@cclr/lang": "^0.1.44",
34
+ "@cclr/model": "^0.1.44",
35
+ "@cclr/utils": "^0.1.44"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/react": "^18.3.27",