@zayne-labs/toolkit-react 0.10.13 → 0.10.15

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, useIsHydrated, useIsServer, useLazyRef, useLifeCycle, useLocationState, useMountEffect, usePresence, useScrollObserver, useSearch, useSearchParams, useSearchParamsObject, useShallowComparedSelector, useShallowComparedValue, useStorageState, useStore, useThrottleByFrame, useThrottleBySetTimeout, useThrottleByTimer, useToggle, useUnmountEffect } from "../index-UAmW9cBE.js";
1
+ import { ContextError, CustomContextOptions, createCustomContext, createUseLocationState, createUseStorageState, getErrorMessage, useAfterMountEffect, useAnimateElementRefs, useAnimationInterval, useAsyncEffect, useCallbackRef, useClickOutside, useConstant, useCopyToClipboard, useDebouncedFn, useDebouncedState, useDisclosure, useEffectOnce, useIsHydrated, useIsServer, useLazyRef, useLifeCycle, useLocationState, useMountEffect, usePresence, useScrollObserver, useSearch, useSearchParams, useSearchParamsObject, useShallowComparedSelector, useShallowComparedValue, useStorageState, useStore, useThrottleByFrame, useThrottleBySetTimeout, useThrottleByTimer, useToggle, useUnmountEffect } from "../index-ByW4GDLQ.js";
2
2
  export { ContextError, CustomContextOptions, createCustomContext, createUseLocationState, createUseStorageState, getErrorMessage, useAfterMountEffect, useAnimateElementRefs, useAnimationInterval, useAsyncEffect, useCallbackRef, useClickOutside, useConstant, useCopyToClipboard, useDebouncedFn, useDebouncedState, useDisclosure, useEffectOnce, useIsHydrated, 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 react0 from "react";
2
+ import * as react1 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>) => [react0.Context<TContextValue | null>, () => UseCustomContextResult<TContextValue, TStrict>] & {
23
- $inferUnion: react0.Context<TContextValue | null> | (() => UseCustomContextResult<TContextValue, TStrict>);
22
+ declare const createCustomContext: <TContextValue, TStrict extends boolean = true>(options?: CustomContextOptions<TContextValue, TStrict>) => [react1.Context<TContextValue | null>, () => UseCustomContextResult<TContextValue, TStrict>] & {
23
+ $inferUnion: react1.Context<TContextValue | null> | (() => UseCustomContextResult<TContextValue, TStrict>);
24
24
  };
25
25
  //#endregion
26
26
  //#region src/hooks/effects/useAfterMountEffect.d.ts
@@ -89,7 +89,7 @@ type UseClickOutsideOptions<TElement extends HTMLElement> = {
89
89
  ref?: Array<React.RefObject<TElement>> | React.RefObject<TElement>;
90
90
  };
91
91
  declare const useClickOutside: <TElement extends HTMLElement>(options: UseClickOutsideOptions<TElement>) => {
92
- ref: react0.RefObject<TElement | null>;
92
+ ref: react1.RefObject<TElement | null>;
93
93
  };
94
94
  //#endregion
95
95
  //#region src/hooks/useConstant.d.ts
@@ -112,13 +112,13 @@ declare const useDebouncedFn: <TParams>(callBackFn: CallbackFn<TParams>, delay:
112
112
  cancelMaxWait(): void;
113
113
  };
114
114
  declare const useDebouncedState: <TValue>(defaultValue: TValue, delay: number | undefined) => readonly [TValue, {
115
- (...params: react0.SetStateAction<TValue>[]): void;
116
- (params: react0.SetStateAction<TValue> | react0.SetStateAction<TValue>[], overrideOptions: {
115
+ (...params: react1.SetStateAction<TValue>[]): void;
116
+ (params: react1.SetStateAction<TValue> | react1.SetStateAction<TValue>[], overrideOptions: {
117
117
  $delay: number;
118
118
  }): void;
119
119
  cancel: () => void;
120
120
  cancelMaxWait(): void;
121
- }, react0.Dispatch<react0.SetStateAction<TValue>>];
121
+ }, react1.Dispatch<react1.SetStateAction<TValue>>];
122
122
  //#endregion
123
123
  //#region src/hooks/useDisclosure.d.ts
124
124
  type DisclosureOptions = {
@@ -168,7 +168,7 @@ declare const useIsServer: () => boolean;
168
168
  //#endregion
169
169
  //#region src/hooks/useLocationState.d.ts
170
170
  type UseLocationResult<TSlice> = [state: TSlice, actions: LocationStoreApi];
171
- declare const createUseLocationState: (options?: LocationStoreOptions) => Omit<_zayne_labs_toolkit_core0.StoreApi<_zayne_labs_toolkit_core0.URLInfoObject>, "resetState" | "setState"> & {
171
+ declare const createUseLocationState: (options?: LocationStoreOptions) => Omit<_zayne_labs_toolkit_core0.StoreApi<_zayne_labs_toolkit_core0.URLInfoObject>, "setState" | "resetState"> & {
172
172
  push: (url: string | _zayne_labs_toolkit_core0.PartialURLInfo, options?: {
173
173
  state?: _zayne_labs_toolkit_core0.PartialURLInfo["state"];
174
174
  }) => void;
@@ -229,7 +229,7 @@ declare const useSearch: <TData>(initialData: TData[], delay?: number) => {
229
229
  data: TData[];
230
230
  isLoading: boolean;
231
231
  query: string;
232
- setQuery: react0.Dispatch<react0.SetStateAction<string>>;
232
+ setQuery: react1.Dispatch<react1.SetStateAction<string>>;
233
233
  };
234
234
  //#endregion
235
235
  //#region src/hooks/useSearchParams.d.ts
@@ -278,4 +278,4 @@ declare const useThrottleByFrame: <TParams>(callbackFn: CallbackFn<TParams>) =>
278
278
  };
279
279
  //#endregion
280
280
  export { ContextError, CustomContextOptions, createCustomContext, createUseLocationState, createUseStorageState, getErrorMessage, useAfterMountEffect, useAnimateElementRefs, useAnimationInterval, useAsyncEffect, useCallbackRef, useClickOutside, useConstant, useCopyToClipboard, useDebouncedFn, useDebouncedState, useDisclosure, useEffectOnce, useIsHydrated, useIsServer, useLazyRef, useLifeCycle, useLocationState, useMountEffect, usePresence, useScrollObserver, useSearch, useSearchParams, useSearchParamsObject, useShallowComparedSelector, useShallowComparedValue, useStorageState, useStore, useThrottleByFrame, useThrottleBySetTimeout, useThrottleByTimer, useToggle, useUnmountEffect };
281
- //# sourceMappingURL=index-UAmW9cBE.d.ts.map
281
+ //# sourceMappingURL=index-ByW4GDLQ.d.ts.map
@@ -1,6 +1,6 @@
1
- import { CustomContextOptions } from "../index-UAmW9cBE.js";
1
+ import { CustomContextOptions } from "../index-ByW4GDLQ.js";
2
2
  import { AnyObject, Prettify, SelectorFn } from "@zayne-labs/toolkit-type-helpers";
3
- import * as react9 from "react";
3
+ import * as react0 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
- }) => react9.FunctionComponentElement<react9.ProviderProps<TStore | null>>, useZustandStoreContext: <TResult = TState>(selector?: SelectorFn<TState, TResult>) => TResult];
12
+ }) => react0.FunctionComponentElement<react0.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.13",
4
+ "version": "0.10.15",
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.13",
51
- "@zayne-labs/toolkit-type-helpers": "0.10.13"
50
+ "@zayne-labs/toolkit-core": "0.10.15",
51
+ "@zayne-labs/toolkit-type-helpers": "0.10.15"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@arethetypeswrong/cli": "^0.18.2",
@@ -56,9 +56,9 @@
56
56
  "@size-limit/esbuild-why": "^11.2.0",
57
57
  "@size-limit/preset-small-lib": "^11.2.0",
58
58
  "@total-typescript/ts-reset": "^0.6.1",
59
- "@types/node": "^24.3.0",
59
+ "@types/node": "^24.3.1",
60
60
  "@types/react": "^19.1.12",
61
- "@zayne-labs/tsconfig": "0.9.11",
61
+ "@zayne-labs/tsconfig": "0.9.14",
62
62
  "concurrently": "^9.2.1",
63
63
  "cross-env": "^10.0.0",
64
64
  "publint": "^0.3.12",