@tarsis/toolkit 0.6.6 → 0.7.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/Container-BVX2MW1U.cjs +138 -0
- package/dist/Container-BirkN1fA.js +119 -0
- package/dist/SelectBase-BC6WKZVF.cjs +448 -0
- package/dist/SelectBase-DPcXvMTa.js +399 -0
- package/dist/Slot-SOe-b2n6.cjs +77 -0
- package/dist/Slot-z71j7q57.js +65 -0
- package/dist/animation-BFpILbqb.js +102 -0
- package/dist/animation-BauloIgQ.cjs +119 -0
- package/dist/assets-BMqH4phf.cjs +52 -0
- package/dist/assets-huTvlamy.js +29 -0
- package/dist/audio/fail.mp3 +0 -0
- package/dist/audio/fail.ogg +0 -0
- package/dist/audio/hover.mp3 +0 -0
- package/dist/audio/hover.ogg +0 -0
- package/dist/audio/lock/fail.mp3 +0 -0
- package/dist/audio/lock/fail.ogg +0 -0
- package/dist/audio/lock/hover.mp3 +0 -0
- package/dist/audio/lock/hover.ogg +0 -0
- package/dist/audio/lock/prev-next.mp3 +0 -0
- package/dist/audio/lock/prev-next.ogg +0 -0
- package/dist/audio/lock/select.mp3 +0 -0
- package/dist/audio/lock/select.ogg +0 -0
- package/dist/audio/lock/success.mp3 +0 -0
- package/dist/audio/lock/success.ogg +0 -0
- package/dist/audio/prev-next.mp3 +0 -0
- package/dist/audio/prev-next.ogg +0 -0
- package/dist/audio/select.mp3 +0 -0
- package/dist/audio/select.ogg +0 -0
- package/dist/audio/success.mp3 +0 -0
- package/dist/audio/success.ogg +0 -0
- package/dist/chunk-CKQMccvm.cjs +28 -0
- package/dist/fonts/orbitron/orbitron-black.fnt +426 -0
- package/dist/fonts/orbitron/orbitron-black.png +0 -0
- package/dist/fonts/orbitron-black.fnt +426 -0
- package/dist/fonts/orbitron-black.png +0 -0
- package/dist/gl-B0NhVYRl.cjs +177 -0
- package/dist/gl-BipoEx9s.js +171 -0
- package/dist/hooks.cjs +661 -24
- package/dist/hooks.d.ts +72 -0
- package/dist/hooks.js +635 -1
- package/dist/index.cjs +26708 -384
- package/dist/index.d.ts +913 -27
- package/dist/index.js +26282 -3
- package/dist/layout.cjs +5 -0
- package/dist/layout.d.ts +45 -0
- package/dist/layout.js +2 -0
- package/dist/primitives.cjs +13 -0
- package/dist/primitives.d.ts +178 -0
- package/dist/primitives.js +3 -0
- package/dist/server.cjs +25 -0
- package/dist/server.d.ts +70 -0
- package/dist/server.js +2 -0
- package/dist/styles.css +4020 -2946
- package/dist/tokens-B2AxRYyF.js +434 -0
- package/dist/tokens-DlMougUi.cjs +469 -0
- package/dist/tokens.cjs +12 -0
- package/dist/tokens.d.ts +435 -0
- package/dist/tokens.js +3 -0
- package/dist/useMergeRefs-BM2-gSLn.js +16 -0
- package/dist/useMergeRefs-C_l6omwU.cjs +28 -0
- package/dist/utils-BGgmkNY4.cjs +330 -0
- package/dist/utils-Dw5El_3G.js +222 -0
- package/dist/utils.cjs +44 -38
- package/dist/utils.d.ts +75 -0
- package/dist/utils.js +3 -1
- package/dist/values-BTw18-W5.js +138 -0
- package/dist/values-BqSJ0h9o.cjs +275 -0
- package/package.json +88 -36
- package/dist/gl-C1OpenGq.js +0 -3258
- package/dist/gl-LtHwn-bj.cjs +0 -3262
- package/dist/index-Cz74WvnK.js +0 -3910
- package/dist/index-DhWWozeo.cjs +0 -3912
- package/dist/index-DvXp0wCM.cjs +0 -116866
- package/dist/index-JZY8IMW2.js +0 -116503
- package/dist/svg-BT_esDTZ.cjs +0 -236
- package/dist/svg-CQLdTbLk.js +0 -205
- package/dist/useWindowReady-6kIdYolB.cjs +0 -9317
- package/dist/useWindowReady-tUs-ONyG.js +0 -9224
package/dist/hooks.d.ts
CHANGED
|
@@ -1,7 +1,42 @@
|
|
|
1
1
|
import { default as default_2 } from 'react';
|
|
2
2
|
import { DependencyList } from 'react';
|
|
3
|
+
import { Ref } from 'react';
|
|
4
|
+
import { RefCallback } from 'react';
|
|
3
5
|
import { RefObject } from 'react';
|
|
4
6
|
|
|
7
|
+
declare type FormFieldAria = {
|
|
8
|
+
'aria-describedby'?: string;
|
|
9
|
+
'aria-invalid'?: boolean;
|
|
10
|
+
'aria-errormessage'?: string;
|
|
11
|
+
id: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export declare type FormFieldIds = {
|
|
15
|
+
fieldId: string;
|
|
16
|
+
labelId: string;
|
|
17
|
+
errorId: string;
|
|
18
|
+
hintId: string;
|
|
19
|
+
descriptionId: string;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
declare type GsapCallable = (...args: unknown[]) => unknown;
|
|
23
|
+
|
|
24
|
+
declare type GsapCleanup = () => void;
|
|
25
|
+
|
|
26
|
+
export declare type GsapContextLike = {
|
|
27
|
+
add(methodName: string, func: GsapCallable, scope?: Element | string | object): GsapCallable;
|
|
28
|
+
add<T extends GsapCallable>(func: T, scope?: Element | string | object): ReturnType<T>;
|
|
29
|
+
ignore(func: GsapCallable): void;
|
|
30
|
+
kill(revert?: boolean): void;
|
|
31
|
+
revert(config?: object): void;
|
|
32
|
+
clear(): void;
|
|
33
|
+
isReverted: boolean;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export declare function mergeRefs<T>(...refs: PossibleRef<T>[]): RefCallback<T>;
|
|
37
|
+
|
|
38
|
+
declare type PossibleRef<T> = Ref<T> | undefined | null;
|
|
39
|
+
|
|
5
40
|
export declare function useAnimatedText(text: string, delimiter?: 'letter' | 'word'): string;
|
|
6
41
|
|
|
7
42
|
export declare const useBowser: () => UseBowserResult | null;
|
|
@@ -16,6 +51,8 @@ declare interface UseBowserResult {
|
|
|
16
51
|
isChrome: boolean;
|
|
17
52
|
}
|
|
18
53
|
|
|
54
|
+
export declare function useControllableState<T>(controlledValue: T | undefined, defaultValue: T, onChange?: (value: T) => void): [T, (next: T | ((prev: T) => T)) => void];
|
|
55
|
+
|
|
19
56
|
/**
|
|
20
57
|
* Custom hook that debounces a callback function to delay its execution until after
|
|
21
58
|
* a specified wait time has elapsed since the last time it was invoked.
|
|
@@ -80,6 +117,37 @@ export declare function useEffectEvent<TArgs extends any[], TReturn>(callback: (
|
|
|
80
117
|
|
|
81
118
|
export declare function useEffectEvent<TArgs extends any[], TReturn>(callback: ((...args: TArgs) => TReturn) | undefined): (...args: TArgs) => TReturn | undefined;
|
|
82
119
|
|
|
120
|
+
export declare function useFormField(options?: UseFormFieldOptions): UseFormFieldReturn;
|
|
121
|
+
|
|
122
|
+
export declare type UseFormFieldOptions = {
|
|
123
|
+
id?: string;
|
|
124
|
+
hasError?: boolean;
|
|
125
|
+
hasHint?: boolean;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
export declare type UseFormFieldReturn = {
|
|
129
|
+
ids: FormFieldIds;
|
|
130
|
+
labelProps: {
|
|
131
|
+
htmlFor: string;
|
|
132
|
+
id: string;
|
|
133
|
+
};
|
|
134
|
+
fieldProps: FormFieldAria;
|
|
135
|
+
errorProps: {
|
|
136
|
+
id: string;
|
|
137
|
+
role: 'alert';
|
|
138
|
+
};
|
|
139
|
+
hintProps: {
|
|
140
|
+
id: string;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Creates a GSAP context scoped to the given ref.
|
|
146
|
+
* All animations created inside the callback are automatically
|
|
147
|
+
* reverted on unmount — preventing DOM leak bugs.
|
|
148
|
+
*/
|
|
149
|
+
export declare function useGsapContext(scope: RefObject<HTMLElement | null>, callback: (ctx: GsapContextLike) => void | GsapCleanup, deps?: unknown[]): RefObject<GsapContextLike | null>;
|
|
150
|
+
|
|
83
151
|
/**
|
|
84
152
|
* Custom hook that manages an interval with automatic cleanup.
|
|
85
153
|
* Provides a reliable way to handle intervals that are properly cleaned up
|
|
@@ -109,6 +177,8 @@ export declare const useLiveRef: <T>(value: T) => RefObject<T>;
|
|
|
109
177
|
|
|
110
178
|
export declare const useMatchMedia: (query: string) => boolean | null;
|
|
111
179
|
|
|
180
|
+
export declare function useMergeRefs<T>(...refs: PossibleRef<T>[]): RefCallback<T>;
|
|
181
|
+
|
|
112
182
|
export declare const useOklch: () => void;
|
|
113
183
|
|
|
114
184
|
/**
|
|
@@ -162,6 +232,8 @@ export declare const usePreviousState: <T>(value: T) => T | undefined;
|
|
|
162
232
|
*/
|
|
163
233
|
export declare const useRaf: (callback: VoidFunction, enabled?: boolean) => VoidFunction;
|
|
164
234
|
|
|
235
|
+
export declare function useReducedMotion(): boolean;
|
|
236
|
+
|
|
165
237
|
/**
|
|
166
238
|
* Custom hook that throttles a callback function to limit how often it can be invoked.
|
|
167
239
|
*
|