@zayne-labs/toolkit-react 0.10.10 → 0.10.11
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,2 +1,2 @@
|
|
|
1
|
-
import { ContextError, CustomContextOptions, createCustomContext, createUseLocationState, createUseStorageState, getErrorMessage, useAfterMountEffect, useAnimateElementRefs, useAnimationInterval, useAsyncEffect, useCallbackRef, useClickOutside, useConstant, useCopyToClipboard, useDebouncedFn, useDebouncedState, useDisclosure, useEffectOnce, useIsServer, useLazyRef, useLifeCycle, useLocationState, useMountEffect, usePresence, useScrollObserver, useSearch, useSearchParams, useSearchParamsObject, useShallowComparedSelector, useShallowComparedValue, useStorageState, useStore, useThrottleByFrame, useThrottleBySetTimeout, useThrottleByTimer, useToggle, useUnmountEffect } from "../index-
|
|
1
|
+
import { ContextError, CustomContextOptions, createCustomContext, createUseLocationState, createUseStorageState, getErrorMessage, useAfterMountEffect, useAnimateElementRefs, useAnimationInterval, useAsyncEffect, useCallbackRef, useClickOutside, useConstant, useCopyToClipboard, useDebouncedFn, useDebouncedState, useDisclosure, useEffectOnce, useIsServer, useLazyRef, useLifeCycle, useLocationState, useMountEffect, usePresence, useScrollObserver, useSearch, useSearchParams, useSearchParamsObject, useShallowComparedSelector, useShallowComparedValue, useStorageState, useStore, useThrottleByFrame, useThrottleBySetTimeout, useThrottleByTimer, useToggle, useUnmountEffect } from "../index-DUbtxRUA.js";
|
|
2
2
|
export { ContextError, CustomContextOptions, createCustomContext, createUseLocationState, createUseStorageState, getErrorMessage, useAfterMountEffect, useAnimateElementRefs, useAnimationInterval, useAsyncEffect, useCallbackRef, useClickOutside, useConstant, useCopyToClipboard, useDebouncedFn, useDebouncedState, useDisclosure, useEffectOnce, useIsServer, useLazyRef, useLifeCycle, useLocationState, useMountEffect, usePresence, useScrollObserver, useSearch, useSearchParams, useSearchParamsObject, useShallowComparedSelector, useShallowComparedValue, useStorageState, useStore, useThrottleByFrame, useThrottleBySetTimeout, useThrottleByTimer, useToggle, useUnmountEffect };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AnyFunction, CallbackFn, NonEmptyArray, Prettify, SelectorFn } from "@zayne-labs/toolkit-type-helpers";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react6 from "react";
|
|
3
3
|
import { RefCallback, useEffect } from "react";
|
|
4
4
|
import * as _zayne_labs_toolkit_core0 from "@zayne-labs/toolkit-core";
|
|
5
5
|
import { AnimationIntervalOptions, LocationInfo, LocationStoreApi, LocationStoreOptions, ScrollObserverOptions, StorageOptions, StorageStoreApi, StoreApi, URLSearchParamsInit } from "@zayne-labs/toolkit-core";
|
|
@@ -19,8 +19,8 @@ type CustomContextOptions<TContextValue, TStrict extends boolean> = {
|
|
|
19
19
|
strict?: TStrict;
|
|
20
20
|
};
|
|
21
21
|
type UseCustomContextResult<TContextValue, TStrict extends boolean> = TStrict extends true ? TContextValue : TContextValue | null;
|
|
22
|
-
declare const createCustomContext: <TContextValue, TStrict extends boolean = true>(options?: CustomContextOptions<TContextValue, TStrict>) => [
|
|
23
|
-
$inferUnion:
|
|
22
|
+
declare const createCustomContext: <TContextValue, TStrict extends boolean = true>(options?: CustomContextOptions<TContextValue, TStrict>) => [react6.Context<TContextValue | null>, () => UseCustomContextResult<TContextValue, TStrict>] & {
|
|
23
|
+
$inferUnion: react6.Context<TContextValue | null> | (() => UseCustomContextResult<TContextValue, TStrict>);
|
|
24
24
|
};
|
|
25
25
|
//#endregion
|
|
26
26
|
//#region src/hooks/effects/useAfterMountEffect.d.ts
|
|
@@ -108,13 +108,13 @@ declare const useDebouncedFn: <TParams>(callBackFn: CallbackFn<TParams>, delay:
|
|
|
108
108
|
cancelMaxWait(): void;
|
|
109
109
|
};
|
|
110
110
|
declare const useDebouncedState: <TValue>(defaultValue: TValue, delay: number | undefined) => readonly [TValue, {
|
|
111
|
-
(...params:
|
|
112
|
-
(params:
|
|
111
|
+
(...params: react6.SetStateAction<TValue>[]): void;
|
|
112
|
+
(params: react6.SetStateAction<TValue> | react6.SetStateAction<TValue>[], overrideOptions: {
|
|
113
113
|
$delay: number;
|
|
114
114
|
}): void;
|
|
115
115
|
cancel: () => void;
|
|
116
116
|
cancelMaxWait(): void;
|
|
117
|
-
},
|
|
117
|
+
}, react6.Dispatch<react6.SetStateAction<TValue>>];
|
|
118
118
|
//#endregion
|
|
119
119
|
//#region src/hooks/useDisclosure.d.ts
|
|
120
120
|
type DisclosureOptions = {
|
|
@@ -138,7 +138,7 @@ declare const useIsServer: () => boolean;
|
|
|
138
138
|
//#endregion
|
|
139
139
|
//#region src/hooks/useLocationState.d.ts
|
|
140
140
|
type UseLocationResult<TSlice> = [state: TSlice, actions: LocationStoreApi];
|
|
141
|
-
declare const createUseLocationState: (options?: LocationStoreOptions) => Omit<_zayne_labs_toolkit_core0.StoreApi<_zayne_labs_toolkit_core0.URLInfoObject>, "
|
|
141
|
+
declare const createUseLocationState: (options?: LocationStoreOptions) => Omit<_zayne_labs_toolkit_core0.StoreApi<_zayne_labs_toolkit_core0.URLInfoObject>, "resetState" | "setState"> & {
|
|
142
142
|
push: (url: string | _zayne_labs_toolkit_core0.PartialURLInfo, options?: {
|
|
143
143
|
state?: _zayne_labs_toolkit_core0.PartialURLInfo["state"];
|
|
144
144
|
}) => void;
|
|
@@ -199,7 +199,7 @@ declare const useSearch: <TData>(initialData: TData[], delay?: number) => {
|
|
|
199
199
|
data: TData[];
|
|
200
200
|
isLoading: boolean;
|
|
201
201
|
query: string;
|
|
202
|
-
setQuery:
|
|
202
|
+
setQuery: react6.Dispatch<react6.SetStateAction<string>>;
|
|
203
203
|
};
|
|
204
204
|
//#endregion
|
|
205
205
|
//#region src/hooks/useSearchParams.d.ts
|
|
@@ -248,4 +248,4 @@ declare const useThrottleByFrame: <TParams>(callbackFn: CallbackFn<TParams>) =>
|
|
|
248
248
|
};
|
|
249
249
|
//#endregion
|
|
250
250
|
export { ContextError, CustomContextOptions, createCustomContext, createUseLocationState, createUseStorageState, getErrorMessage, useAfterMountEffect, useAnimateElementRefs, useAnimationInterval, useAsyncEffect, useCallbackRef, useClickOutside, useConstant, useCopyToClipboard, useDebouncedFn, useDebouncedState, useDisclosure, useEffectOnce, useIsServer, useLazyRef, useLifeCycle, useLocationState, useMountEffect, usePresence, useScrollObserver, useSearch, useSearchParams, useSearchParamsObject, useShallowComparedSelector, useShallowComparedValue, useStorageState, useStore, useThrottleByFrame, useThrottleBySetTimeout, useThrottleByTimer, useToggle, useUnmountEffect };
|
|
251
|
-
//# sourceMappingURL=index-
|
|
251
|
+
//# sourceMappingURL=index-DUbtxRUA.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CustomContextOptions } from "../index-
|
|
1
|
+
import { CustomContextOptions } from "../index-DUbtxRUA.js";
|
|
2
2
|
import { AnyObject, Prettify, SelectorFn } from "@zayne-labs/toolkit-type-helpers";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react8 from "react";
|
|
4
4
|
import { StoreApi } from "@zayne-labs/toolkit-core";
|
|
5
5
|
import * as zustand0 from "zustand";
|
|
6
6
|
import { Mutate, StateCreator as StateCreator$1, StoreMutatorIdentifier, UseBoundStore } from "zustand";
|
|
@@ -9,7 +9,7 @@ import { Mutate, StateCreator as StateCreator$1, StoreMutatorIdentifier, UseBoun
|
|
|
9
9
|
declare const createZustandContext: <TState extends Record<string, unknown>, TStore extends StoreApi<TState> = StoreApi<TState>>(options?: CustomContextOptions<TStore, true>) => [ZustandStoreContextProvider: (props: {
|
|
10
10
|
children: React.ReactNode;
|
|
11
11
|
store: TStore;
|
|
12
|
-
}) =>
|
|
12
|
+
}) => react8.FunctionComponentElement<react8.ProviderProps<TStore | null>>, useZustandStoreContext: <TResult = TState>(selector?: SelectorFn<TState, TResult>) => TResult];
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region src/zustand/createZustandStoreWithCombine.d.ts
|
|
15
15
|
type Write<TInitialState, TExtraState> = Prettify<Omit<TInitialState, keyof TExtraState> & TExtraState>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zayne-labs/toolkit-react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.10.
|
|
4
|
+
"version": "0.10.11",
|
|
5
5
|
"description": "A collection of utility functions, types and composables used by my other projects. Nothing too fancy but can be useful.",
|
|
6
6
|
"author": "Ryan Zayne",
|
|
7
7
|
"license": "MIT",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@zayne-labs/toolkit-core": "0.10.
|
|
51
|
-
"@zayne-labs/toolkit-type-helpers": "0.10.
|
|
50
|
+
"@zayne-labs/toolkit-core": "0.10.11",
|
|
51
|
+
"@zayne-labs/toolkit-type-helpers": "0.10.11"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@arethetypeswrong/cli": "^0.18.2",
|
|
@@ -57,14 +57,14 @@
|
|
|
57
57
|
"@size-limit/preset-small-lib": "^11.2.0",
|
|
58
58
|
"@total-typescript/ts-reset": "^0.6.1",
|
|
59
59
|
"@types/node": "^24.3.0",
|
|
60
|
-
"@types/react": "^19.1.
|
|
61
|
-
"@zayne-labs/tsconfig": "0.9.
|
|
62
|
-
"concurrently": "^9.2.
|
|
60
|
+
"@types/react": "^19.1.12",
|
|
61
|
+
"@zayne-labs/tsconfig": "0.9.11",
|
|
62
|
+
"concurrently": "^9.2.1",
|
|
63
63
|
"cross-env": "^10.0.0",
|
|
64
64
|
"publint": "^0.3.12",
|
|
65
65
|
"react": "^19.1.1",
|
|
66
66
|
"size-limit": "^11.2.0",
|
|
67
|
-
"tsdown": "^0.14.
|
|
67
|
+
"tsdown": "^0.14.2",
|
|
68
68
|
"typescript": "5.9.2",
|
|
69
69
|
"zustand": "^5.0.8"
|
|
70
70
|
},
|