@choice-ui/react 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -2
- package/dist/shared/index.d.ts +420 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
|
+
import { useLayoutEffect, MutableRefObject, SetStateAction, PointerEvent as PointerEvent$1, KeyboardEvent, ReactNode, ComponentType, ReactElement } from 'react';
|
|
3
|
+
import cx from 'classnames';
|
|
4
|
+
import { TV } from 'tailwind-variants';
|
|
5
|
+
export { TV, TVReturnType, VariantProps } from 'tailwind-variants';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 创建一个始终保持最新值的稳定引用
|
|
9
|
+
*
|
|
10
|
+
* 这个 Hook 解决了闭包中访问过期值的问题,确保在回调函数中始终能访问到最新的 props 或 state。
|
|
11
|
+
* 它会在每次渲染时同步更新 ref 的值,但 ref 对象本身保持不变。
|
|
12
|
+
*
|
|
13
|
+
* @param data - 需要保持最新引用的数据
|
|
14
|
+
* @returns 包含最新数据的稳定引用对象
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* const Component = ({ onClick }) => {
|
|
19
|
+
* const onClickRef = useAsRef(onClick)
|
|
20
|
+
*
|
|
21
|
+
* const handleClick = useCallback(() => {
|
|
22
|
+
* // 总是调用最新的 onClick 函数
|
|
23
|
+
* onClickRef.current?.()
|
|
24
|
+
* }, [onClickRef])
|
|
25
|
+
*
|
|
26
|
+
* return <button onClick={handleClick}>Click me</button>
|
|
27
|
+
* }
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
declare function useAsRef<T>(data: T): React$1.MutableRefObject<T>;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* 同构布局效果 Hook
|
|
34
|
+
*
|
|
35
|
+
* 这个 Hook 解决了 SSR(服务端渲染)环境中 useLayoutEffect 的兼容性问题。
|
|
36
|
+
* 在浏览器环境中使用 useLayoutEffect,在服务端环境中使用 useEffect。
|
|
37
|
+
*
|
|
38
|
+
* useLayoutEffect 在 DOM 更新后同步执行,适用于需要同步读取 DOM 布局信息的场景。
|
|
39
|
+
* 但在服务端环境中,window 对象不存在,使用 useLayoutEffect 会产生警告。
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```tsx
|
|
43
|
+
* const Component = () => {
|
|
44
|
+
* const [height, setHeight] = useState(0)
|
|
45
|
+
* const ref = useRef<HTMLDivElement>(null)
|
|
46
|
+
*
|
|
47
|
+
* useIsomorphicLayoutEffect(() => {
|
|
48
|
+
* if (ref.current) {
|
|
49
|
+
* // 同步读取 DOM 尺寸信息
|
|
50
|
+
* setHeight(ref.current.offsetHeight)
|
|
51
|
+
* }
|
|
52
|
+
* }, [])
|
|
53
|
+
*
|
|
54
|
+
* return <div ref={ref}>高度: {height}px</div>
|
|
55
|
+
* }
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
declare const useIsomorphicLayoutEffect: typeof useLayoutEffect;
|
|
59
|
+
|
|
60
|
+
type Direction = "ltr" | "rtl";
|
|
61
|
+
/**
|
|
62
|
+
* 文本方向上下文
|
|
63
|
+
*
|
|
64
|
+
* 用于在组件树中传递文本方向信息(从左到右或从右到左)
|
|
65
|
+
*/
|
|
66
|
+
declare const DirectionContext: React$1.Context<Direction | undefined>;
|
|
67
|
+
/**
|
|
68
|
+
* 获取文本方向的 Hook
|
|
69
|
+
*
|
|
70
|
+
* 这个 Hook 用于确定组件的文本方向,支持国际化应用。
|
|
71
|
+
* 优先级:props > context > 默认值(ltr)
|
|
72
|
+
*
|
|
73
|
+
* @param dirProp - 通过 props 传入的方向值
|
|
74
|
+
* @returns 最终确定的文本方向
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```tsx
|
|
78
|
+
* const Component = ({ dir }) => {
|
|
79
|
+
* const direction = useDirection(dir)
|
|
80
|
+
*
|
|
81
|
+
* return (
|
|
82
|
+
* <div dir={direction}>
|
|
83
|
+
* {direction === 'rtl' ? 'من اليمين إلى اليسار' : 'Left to Right'}
|
|
84
|
+
* </div>
|
|
85
|
+
* )
|
|
86
|
+
* }
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
declare function useDirection(dirProp?: Direction): Direction;
|
|
90
|
+
|
|
91
|
+
declare function useDisableScroll({ ref }: {
|
|
92
|
+
ref: React.RefObject<HTMLDivElement>;
|
|
93
|
+
}): {
|
|
94
|
+
disableScrollProps: {
|
|
95
|
+
onFocus: () => void;
|
|
96
|
+
onBlur: () => void;
|
|
97
|
+
onMouseEnter: () => void;
|
|
98
|
+
onMouseLeave: () => void;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* 懒加载引用 Hook
|
|
104
|
+
*
|
|
105
|
+
* 这个 Hook 用于延迟初始化一个引用值,只有在第一次访问时才会执行初始化函数。
|
|
106
|
+
* 适用于创建成本较高的对象(如 Map、Set、复杂对象等)。
|
|
107
|
+
*
|
|
108
|
+
* 与 useState 的懒加载不同,这个 Hook 创建的是一个稳定的引用,
|
|
109
|
+
* 不会触发组件重新渲染,适用于需要在多次渲染间保持同一个对象实例的场景。
|
|
110
|
+
*
|
|
111
|
+
* @param fn - 初始化函数,只会在第一次调用时执行
|
|
112
|
+
* @returns 包含初始化值的稳定引用对象
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* ```tsx
|
|
116
|
+
* const Component = () => {
|
|
117
|
+
* // 只在第一次渲染时创建 Map 实例
|
|
118
|
+
* const mapRef = useLazyRef(() => new Map<string, any>())
|
|
119
|
+
*
|
|
120
|
+
* const addItem = (key: string, value: any) => {
|
|
121
|
+
* mapRef.current!.set(key, value)
|
|
122
|
+
* }
|
|
123
|
+
*
|
|
124
|
+
* return (
|
|
125
|
+
* <div>
|
|
126
|
+
* <button onClick={() => addItem('key1', 'value1')}>
|
|
127
|
+
* 添加项目
|
|
128
|
+
* </button>
|
|
129
|
+
* <p>Map 大小: {mapRef.current!.size}</p>
|
|
130
|
+
* </div>
|
|
131
|
+
* )
|
|
132
|
+
* }
|
|
133
|
+
* ```
|
|
134
|
+
*/
|
|
135
|
+
declare function useLazyRef<T>(fn: () => T): MutableRefObject<T>;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* useMergedValue 钩子的配置选项
|
|
139
|
+
* @template T - 状态值的类型
|
|
140
|
+
*/
|
|
141
|
+
type Options<T> = {
|
|
142
|
+
/**
|
|
143
|
+
* 是否允许使用空值。当设置为 true 时,
|
|
144
|
+
* 即使所有值源都是 undefined,也不会显示警告。
|
|
145
|
+
*/
|
|
146
|
+
allowEmpty?: boolean;
|
|
147
|
+
/**
|
|
148
|
+
* 内部状态的默认值,当 value 和 defaultValue 都未提供时使用。
|
|
149
|
+
* 可以是一个值或返回值的函数(惰性初始化)。
|
|
150
|
+
*/
|
|
151
|
+
defaultStateValue?: T | (() => T);
|
|
152
|
+
/**
|
|
153
|
+
* 非受控模式下的初始值。仅在组件首次渲染时使用。
|
|
154
|
+
* 只有在未提供 value 时才会使用此值。
|
|
155
|
+
*/
|
|
156
|
+
defaultValue?: T;
|
|
157
|
+
/**
|
|
158
|
+
* 值变化时的回调函数。
|
|
159
|
+
* 在受控模式下,此回调应更新 value。
|
|
160
|
+
*/
|
|
161
|
+
onChange?: (value: T) => void;
|
|
162
|
+
/**
|
|
163
|
+
* 当尝试设置与当前值相同的值时触发的回调。
|
|
164
|
+
*/
|
|
165
|
+
onUnchange?: () => void;
|
|
166
|
+
/**
|
|
167
|
+
* 受控模式下的值。提供此参数会使组件进入受控模式。
|
|
168
|
+
* 在受控模式下,组件状态完全由此值控制。
|
|
169
|
+
*/
|
|
170
|
+
value?: T;
|
|
171
|
+
};
|
|
172
|
+
/**
|
|
173
|
+
* 合并受控和非受控状态的 Hook
|
|
174
|
+
*
|
|
175
|
+
* 该 Hook 处理组件的受控和非受控两种模式:
|
|
176
|
+
* - 受控模式:当提供 value 时,组件状态完全由外部控制
|
|
177
|
+
* - 非受控模式:当仅提供 defaultValue 时,组件内部维护自己的状态
|
|
178
|
+
*
|
|
179
|
+
* @template T - 状态值的类型
|
|
180
|
+
* @param options - 配置选项
|
|
181
|
+
* @returns [currentValue, setValue] - 当前值和设置值的函数
|
|
182
|
+
*/
|
|
183
|
+
declare function useMergedValue<T>(options: Options<T>): readonly [T, (this: any, v: SetStateAction<T>, forceTrigger?: any) => void];
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* 处理键盘修饰键状态的钩子
|
|
187
|
+
* @param disabled 是否禁用键盘监听
|
|
188
|
+
* @returns 修饰键状态
|
|
189
|
+
*/
|
|
190
|
+
declare function useModifierKeys(disabled?: boolean): {
|
|
191
|
+
shiftPressed: boolean;
|
|
192
|
+
metaPressed: boolean;
|
|
193
|
+
ctrlPressed: boolean;
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
type PressEvent = PointerEvent$1<HTMLElement> | KeyboardEvent<HTMLElement>;
|
|
197
|
+
type PressProps = {
|
|
198
|
+
disabled?: boolean;
|
|
199
|
+
onPress?: (event: PressEvent) => void;
|
|
200
|
+
onPressEnd?: (event: PressEvent) => void;
|
|
201
|
+
onPressStart?: (event: PressEvent) => void;
|
|
202
|
+
};
|
|
203
|
+
declare function usePress({ disabled, onPress, onPressStart, onPressEnd }: PressProps): {
|
|
204
|
+
isPressed: boolean;
|
|
205
|
+
pressProps: {
|
|
206
|
+
onPointerDown: (event: PointerEvent$1<HTMLElement>) => void;
|
|
207
|
+
onKeyDown: (event: KeyboardEvent<HTMLElement>) => void;
|
|
208
|
+
onKeyUp: (event: KeyboardEvent<HTMLElement>) => void;
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
type PressMoveProps = PressProps & {
|
|
213
|
+
disabled?: boolean;
|
|
214
|
+
onPressEnd?: (e: PointerEvent) => void;
|
|
215
|
+
onPressMove?: (e: PointerEvent) => void;
|
|
216
|
+
onPressMoveBottom?: (delta: number) => void;
|
|
217
|
+
onPressMoveLeft?: (delta: number) => void;
|
|
218
|
+
onPressMoveRight?: (delta: number) => void;
|
|
219
|
+
onPressMoveTop?: (delta: number) => void;
|
|
220
|
+
onPressStart?: (e: PointerEvent) => void;
|
|
221
|
+
};
|
|
222
|
+
interface PressMoveResult {
|
|
223
|
+
isPressed: boolean;
|
|
224
|
+
pressMoveProps: {
|
|
225
|
+
onPointerDown: (e: React.PointerEvent<HTMLElement>) => void;
|
|
226
|
+
ref: (el: HTMLElement | null) => void;
|
|
227
|
+
style?: React.CSSProperties;
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
declare const usePressMove: ({ onPressMove, onPressMoveLeft, onPressMoveRight, onPressMoveTop, onPressMoveBottom, onPressStart, onPressEnd, ...rest }: PressMoveProps) => PressMoveResult;
|
|
231
|
+
|
|
232
|
+
declare const tcx: (...args: cx.ArgumentArray) => string;
|
|
233
|
+
declare const tcv: TV;
|
|
234
|
+
|
|
235
|
+
interface Props {
|
|
236
|
+
[key: string]: unknown;
|
|
237
|
+
}
|
|
238
|
+
type PropsArg = Props | null | undefined;
|
|
239
|
+
type TupleTypes<T> = {
|
|
240
|
+
[P in keyof T]: T[P];
|
|
241
|
+
} extends {
|
|
242
|
+
[key: number]: infer V;
|
|
243
|
+
} ? NullToObject<V> : never;
|
|
244
|
+
type NullToObject<T> = T extends null | undefined ? object : T;
|
|
245
|
+
type UnionToIntersection<U> = (U extends unknown ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
246
|
+
/**
|
|
247
|
+
* Merges multiple props objects together. Event handlers are chained,
|
|
248
|
+
* classNames are combined, and ids are deduplicated.
|
|
249
|
+
* For all other props, the last prop object overrides all previous ones.
|
|
250
|
+
* @param args - Multiple sets of props to merge together.
|
|
251
|
+
*/
|
|
252
|
+
declare function mergeProps<T extends PropsArg[]>(...args: T): UnionToIntersection<TupleTypes<T>>;
|
|
253
|
+
|
|
254
|
+
type ReactRef<T> = React$1.RefObject<T> | React$1.MutableRefObject<T> | React$1.Ref<T>;
|
|
255
|
+
/**
|
|
256
|
+
* Assigns a value to a ref function or object
|
|
257
|
+
*
|
|
258
|
+
* @param ref the ref to assign to
|
|
259
|
+
* @param value the value
|
|
260
|
+
*/
|
|
261
|
+
declare function assignRef<T>(ref: ReactRef<T> | undefined, value: T | null): void;
|
|
262
|
+
/**
|
|
263
|
+
* Combine multiple React refs into a single ref function.
|
|
264
|
+
* This is used mostly when you need to allow consumers forward refs to
|
|
265
|
+
* internal components
|
|
266
|
+
*
|
|
267
|
+
* @param refs refs to assign to value to
|
|
268
|
+
*/
|
|
269
|
+
declare function mergeRefs<T>(...refs: (ReactRef<T> | undefined)[]): (node: T | null) => void;
|
|
270
|
+
|
|
271
|
+
declare function assert(condition: unknown, message?: string): asserts condition;
|
|
272
|
+
declare function assertNever(value: never, message?: string): never;
|
|
273
|
+
type Dict<T = unknown> = Record<string, T>;
|
|
274
|
+
declare function isArray<T>(value: unknown): value is Array<T>;
|
|
275
|
+
declare function isEmptyArray(value: unknown): boolean;
|
|
276
|
+
declare function isObject(value: unknown): value is Dict;
|
|
277
|
+
declare function isEmptyObject(value: unknown): boolean;
|
|
278
|
+
declare function isEmpty(value: unknown): boolean;
|
|
279
|
+
declare function isFunction<T extends (...args: unknown[]) => unknown = (...args: unknown[]) => unknown>(value: unknown): value is T;
|
|
280
|
+
type Booleanish = boolean | "true" | "false";
|
|
281
|
+
declare const dataAttr: (condition: boolean | undefined) => Booleanish;
|
|
282
|
+
declare const isNumeric: (value?: string | number) => boolean;
|
|
283
|
+
declare const isMultiElement: (children: ReactNode) => boolean;
|
|
284
|
+
declare const findChildByType: (children: ReactNode, componentType: ComponentType<any>) => ReactElement | null;
|
|
285
|
+
|
|
286
|
+
declare function formatBytes(bytes: number): string;
|
|
287
|
+
|
|
288
|
+
type SupportedLanguage = "en" | "cn" | "ja" | "ko" | "es" | "fr" | "de" | "pt" | "ru" | "ar";
|
|
289
|
+
interface TimezoneOptions {
|
|
290
|
+
referenceTime?: Date;
|
|
291
|
+
useUTC?: boolean;
|
|
292
|
+
}
|
|
293
|
+
interface CustomFormatOptions {
|
|
294
|
+
fullDate?: string;
|
|
295
|
+
monthDay?: string;
|
|
296
|
+
time?: string;
|
|
297
|
+
}
|
|
298
|
+
interface FormatRelativeTimeOptions {
|
|
299
|
+
customFormat?: CustomFormatOptions;
|
|
300
|
+
daysThreshold?: number;
|
|
301
|
+
forceNumericFormat?: boolean;
|
|
302
|
+
language?: SupportedLanguage;
|
|
303
|
+
showSpecificTime?: boolean;
|
|
304
|
+
timezone?: TimezoneOptions;
|
|
305
|
+
yearThreshold?: number;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Formats a date into a human-readable relative time string with internationalization support
|
|
310
|
+
*
|
|
311
|
+
* @param date - The date to format
|
|
312
|
+
* @param options - Configuration options for formatting
|
|
313
|
+
* @returns A formatted date string
|
|
314
|
+
*
|
|
315
|
+
* @example
|
|
316
|
+
* ```typescript
|
|
317
|
+
* // Basic usage
|
|
318
|
+
* formatRelativeTime(new Date()) // "a few seconds ago"
|
|
319
|
+
*
|
|
320
|
+
* // With Chinese locale
|
|
321
|
+
* formatRelativeTime(new Date(), { language: "cn" }) // "几秒前"
|
|
322
|
+
*
|
|
323
|
+
* // Show specific time for recent dates
|
|
324
|
+
* formatRelativeTime(new Date(), {
|
|
325
|
+
* showSpecificTime: true,
|
|
326
|
+
* language: "en"
|
|
327
|
+
* }) // "Today at 2:30 PM"
|
|
328
|
+
*
|
|
329
|
+
* // Custom thresholds
|
|
330
|
+
* formatRelativeTime(oldDate, {
|
|
331
|
+
* daysThreshold: 30,
|
|
332
|
+
* yearThreshold: 2
|
|
333
|
+
* })
|
|
334
|
+
* ```
|
|
335
|
+
*/
|
|
336
|
+
declare const formatRelativeTime: (date: Date, options?: FormatRelativeTimeOptions) => string;
|
|
337
|
+
/**
|
|
338
|
+
* Creates a date formatter with default configuration
|
|
339
|
+
*
|
|
340
|
+
* @param defaultOptions - Default options to use for all formatting operations
|
|
341
|
+
* @returns A configured formatter function
|
|
342
|
+
*
|
|
343
|
+
* @example
|
|
344
|
+
* ```typescript
|
|
345
|
+
* const formatter = createDateFormatter({
|
|
346
|
+
* language: "cn",
|
|
347
|
+
* daysThreshold: 14,
|
|
348
|
+
* showSpecificTime: true
|
|
349
|
+
* })
|
|
350
|
+
*
|
|
351
|
+
* formatter(new Date()) // Uses configured defaults
|
|
352
|
+
* formatter(new Date(), { language: "en" }) // Overrides language
|
|
353
|
+
* ```
|
|
354
|
+
*/
|
|
355
|
+
declare const createDateFormatter: (defaultOptions?: FormatRelativeTimeOptions) => (date: Date, options?: FormatRelativeTimeOptions) => string;
|
|
356
|
+
/**
|
|
357
|
+
* Formats a date to a simple readable format
|
|
358
|
+
*
|
|
359
|
+
* @param date - The date to format
|
|
360
|
+
* @param options - Formatting options
|
|
361
|
+
* @returns A simple formatted date string
|
|
362
|
+
*
|
|
363
|
+
* @example
|
|
364
|
+
* ```typescript
|
|
365
|
+
* formatSimpleDate(new Date()) // "Jan 15, 2024"
|
|
366
|
+
* formatSimpleDate(new Date(), { language: "cn" }) // "2024年1月15日"
|
|
367
|
+
* ```
|
|
368
|
+
*/
|
|
369
|
+
declare const formatSimpleDate: (date: Date, options?: Pick<FormatRelativeTimeOptions, "language" | "customFormat">) => string;
|
|
370
|
+
/**
|
|
371
|
+
* Formats time only from a date
|
|
372
|
+
*
|
|
373
|
+
* @param date - The date to extract time from
|
|
374
|
+
* @param options - Formatting options
|
|
375
|
+
* @returns A formatted time string
|
|
376
|
+
*
|
|
377
|
+
* @example
|
|
378
|
+
* ```typescript
|
|
379
|
+
* formatTime(new Date()) // "2:30 PM"
|
|
380
|
+
* formatTime(new Date(), { language: "cn" }) // "14:30"
|
|
381
|
+
* ```
|
|
382
|
+
*/
|
|
383
|
+
declare const formatTime: (date: Date, options?: Pick<FormatRelativeTimeOptions, "language" | "customFormat">) => string;
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* 通用 i18n 工具系统
|
|
387
|
+
* 提供简洁的API,无需为每个组件单独封装Hook
|
|
388
|
+
*/
|
|
389
|
+
/**
|
|
390
|
+
* 深度合并两个对象,用户配置会覆盖默认配置
|
|
391
|
+
*/
|
|
392
|
+
declare const mergeI18nConfig: <T extends Record<string, unknown>>(defaultConfig: T, userConfig?: Partial<T>) => T;
|
|
393
|
+
/**
|
|
394
|
+
* 通用的 i18n Hook,自动缓存合并结果
|
|
395
|
+
* 直接使用,无需为每个组件单独封装
|
|
396
|
+
*
|
|
397
|
+
* @example
|
|
398
|
+
* const i18n = useI18n(defaultConfig, userConfig)
|
|
399
|
+
*/
|
|
400
|
+
declare const useI18n: <T extends Record<string, unknown>>(defaultConfig: T, userConfig?: Partial<T>) => T;
|
|
401
|
+
/**
|
|
402
|
+
* 从嵌套对象中安全获取值,支持点号路径
|
|
403
|
+
* @example getI18nText(i18n, 'url.placeholder') // 获取 i18n.url.placeholder
|
|
404
|
+
*/
|
|
405
|
+
declare const getI18nText: <T extends Record<string, unknown>>(i18n: T, path: string, fallback?: string) => string;
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* Check if code is running in browser environment
|
|
409
|
+
*/
|
|
410
|
+
declare const isBrowser: boolean;
|
|
411
|
+
/**
|
|
412
|
+
* SSR-safe window access helper
|
|
413
|
+
*/
|
|
414
|
+
declare function getWindow(): Window | undefined;
|
|
415
|
+
/**
|
|
416
|
+
* SSR-safe document access helper
|
|
417
|
+
*/
|
|
418
|
+
declare function getDocument(): Document | undefined;
|
|
419
|
+
|
|
420
|
+
export { type Dict, DirectionContext, type FormatRelativeTimeOptions, type PressMoveProps, type PressMoveResult, type PressProps, type ReactRef, type SupportedLanguage, assert, assertNever, assignRef, createDateFormatter, dataAttr, findChildByType, formatBytes, formatRelativeTime, formatSimpleDate, formatTime, getDocument, getI18nText, getWindow, isArray, isBrowser, isEmpty, isEmptyArray, isEmptyObject, isFunction, isMultiElement, isNumeric, isObject, mergeI18nConfig, mergeProps, mergeRefs, tcv, tcx, useAsRef, useDirection, useDisableScroll, useI18n, useIsomorphicLayoutEffect, useLazyRef, useMergedValue, useModifierKeys, usePress, usePressMove };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@choice-ui/react",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "A desktop-first React UI component library built for professional desktop applications with comprehensive documentation",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"react-dom": ">=18.0.0"
|
|
114
114
|
},
|
|
115
115
|
"scripts": {
|
|
116
|
-
"build": "pnpm run clean && vite build",
|
|
116
|
+
"build": "pnpm run clean && pnpm --filter @choice-ui/shared build && vite build",
|
|
117
117
|
"build:watch": "vite build --watch",
|
|
118
118
|
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,css,md}\"",
|
|
119
119
|
"lint": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .",
|