@tarsis/toolkit 0.6.3 → 0.6.5
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/{gl-D-zF6Ayx.js → gl-Bp3e3vph.js} +1 -1
- package/dist/{gl-DWPW-YX3.cjs → gl-Duf2UKsB.cjs} +1 -1
- package/dist/hooks.cjs +1 -1
- package/dist/hooks.d.ts +31 -2
- package/dist/hooks.js +1 -1
- package/dist/{index-Cz-laGWF.cjs → index-BcIzOPR7.cjs} +9112 -7300
- package/dist/{index-C4GTBWOD.js → index-BjG_vCX_.js} +1 -1
- package/dist/{index-CY0ljiRP.cjs → index-ZBjz1bHI.cjs} +1 -1
- package/dist/{index-Benrsg6B.js → index-ss50SEnC.js} +9100 -7299
- package/dist/index.cjs +14 -3
- package/dist/index.d.ts +291 -142
- package/dist/index.js +2 -2
- package/dist/styles.css +2110 -507
- package/dist/{useWindowReady-Il0Ibn7I.cjs → useWindowReady-6kIdYolB.cjs} +1445 -1420
- package/dist/{useWindowReady-DVV-s65K.js → useWindowReady-tUs-ONyG.js} +1444 -1419
- package/package.json +13 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as commonjsGlobal, a as getAugmentedNamespace, g as getDefaultExportFromCjs, W as WebGLRenderer, P as PerspectiveCamera, S as Scene, T as THREE$1, C as Clock, b as TextureLoader, R as RawShaderMaterial, D as DoubleSide, d as WebGLRenderTarget, e as Color, M as Mesh, f as TorusKnotGeometry, h as ShaderMaterial } from './index-
|
|
1
|
+
import { c as commonjsGlobal, a as getAugmentedNamespace, g as getDefaultExportFromCjs, W as WebGLRenderer, P as PerspectiveCamera, S as Scene, T as THREE$1, C as Clock, b as TextureLoader, R as RawShaderMaterial, D as DoubleSide, d as WebGLRenderTarget, e as Color, M as Mesh, f as TorusKnotGeometry, h as ShaderMaterial } from './index-ss50SEnC.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
object-assign
|
package/dist/hooks.cjs
CHANGED
package/dist/hooks.d.ts
CHANGED
|
@@ -25,7 +25,10 @@ declare interface UseBowserResult {
|
|
|
25
25
|
*
|
|
26
26
|
* @param callback - The function to debounce
|
|
27
27
|
* @param delay - The delay time (in milliseconds) to wait before executing the callback
|
|
28
|
-
* @
|
|
28
|
+
* @param options - Optional configuration object
|
|
29
|
+
* @param options.maxWait - Maximum time before function must be invoked
|
|
30
|
+
* @param options.leading - If true, invoke on the leading edge
|
|
31
|
+
* @returns A debounced version of the callback function with a `cancel` method
|
|
29
32
|
*
|
|
30
33
|
* @example
|
|
31
34
|
* ```tsx
|
|
@@ -35,8 +38,34 @@ declare interface UseBowserResult {
|
|
|
35
38
|
*
|
|
36
39
|
* return <input onChange={(e) => debouncedSearch(e.target.value)} />
|
|
37
40
|
* ```
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```tsx
|
|
44
|
+
* // With maxWait and leading options
|
|
45
|
+
* const debouncedSearch = useDebounce(
|
|
46
|
+
* (query: string) => console.log('Searching for:', query),
|
|
47
|
+
* 300,
|
|
48
|
+
* { maxWait: 1000, leading: true }
|
|
49
|
+
* )
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```tsx
|
|
54
|
+
* // Cancel pending debounced call
|
|
55
|
+
* const debouncedSearch = useDebounce((query: string) => {
|
|
56
|
+
* console.log('Searching for:', query)
|
|
57
|
+
* }, 300)
|
|
58
|
+
*
|
|
59
|
+
* debouncedSearch('test')
|
|
60
|
+
* debouncedSearch.cancel() // Cancels the pending call
|
|
61
|
+
* ```
|
|
38
62
|
*/
|
|
39
|
-
export declare const useDebounce: <T extends (...args: any[]) => any>(callback: T, delay: number
|
|
63
|
+
export declare const useDebounce: <T extends (...args: any[]) => any>(callback: T, delay: number, { maxWait, leading }?: {
|
|
64
|
+
maxWait?: number;
|
|
65
|
+
leading?: boolean;
|
|
66
|
+
}) => T & {
|
|
67
|
+
cancel: VoidFunction;
|
|
68
|
+
};
|
|
40
69
|
|
|
41
70
|
/**
|
|
42
71
|
* A React hook that implements the useEffectEvent pattern from React RFC.
|
package/dist/hooks.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { u as useAnimatedText, a as useBowser, b as useDebounce, d as useEffectEvent, e as useInterval, f as useLiveRef, g as useMatchMedia, h as useOklch, i as useOutsideClick, k as usePreviousRender, j as usePreviousState, l as useRaf, m as useThrottle, n as useTimeout, c as useUniversalLayoutEffect, o as useWindowReady } from './useWindowReady-
|
|
1
|
+
export { u as useAnimatedText, a as useBowser, b as useDebounce, d as useEffectEvent, e as useInterval, f as useLiveRef, g as useMatchMedia, h as useOklch, i as useOutsideClick, k as usePreviousRender, j as usePreviousState, l as useRaf, m as useThrottle, n as useTimeout, c as useUniversalLayoutEffect, o as useWindowReady } from './useWindowReady-tUs-ONyG.js';
|