@zayne-labs/toolkit-react 0.11.7 → 0.11.8

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,3 +1,3 @@
1
- import { ContextError, CustomContextOptions, UseCustomContext, createCustomContext, createUseLocationState, createUseStorageState, getErrorMessage, useAfterMountEffect, useAnimateElementRefs, useAnimationInterval, useAsyncEffect, useCallbackRef, useClickOutside, useComposeRefs, useConstant, useCopyToClipboard, useDebouncedFn, useDebouncedState, useDisclosure, useEffectOnce, useIsHydrated, useIsServer, useLazyRef, useLifeCycle, useLocationState, useMountEffect, useScrollObserver, useSearch, useSearchParams, useSearchParamsObject, useShallowCompSelector, useShallowCompValue, useStorageState, useStore, useThrottleByFrame, useThrottleBySetTimeout, useThrottleByTimer, useToggle, useUnmountEffect } from "../index-BszCeil2.js";
1
+ import { ContextError, CustomContextOptions, UseCustomContext, createCustomContext, createUseLocationState, createUseStorageState, getErrorMessage, useAfterMountEffect, useAnimateElementRefs, useAnimationInterval, useAsyncEffect, useCallbackRef, useClickOutside, useComposeRefs, useConstant, useCopyToClipboard, useDebouncedFn, useDebouncedState, useDisclosure, useEffectOnce, useIsHydrated, useIsServer, useLazyRef, useLifeCycle, useLocationState, useMountEffect, useScrollObserver, useSearch, useSearchParams, useSearchParamsObject, useShallowCompSelector, useShallowCompValue, useStorageState, useStore, useThrottleByFrame, useThrottleBySetTimeout, useThrottleByTimer, useToggle, useUnmountEffect } from "../index-kzBML-eP.js";
2
2
  import "../index-BDOKnQLQ.js";
3
3
  export { ContextError, CustomContextOptions, UseCustomContext, createCustomContext, createUseLocationState, createUseStorageState, getErrorMessage, useAfterMountEffect, useAnimateElementRefs, useAnimationInterval, useAsyncEffect, useCallbackRef, useClickOutside, useComposeRefs, useConstant, useCopyToClipboard, useDebouncedFn, useDebouncedState, useDisclosure, useEffectOnce, useIsHydrated, useIsServer, useLazyRef, useLifeCycle, useLocationState, useMountEffect, useScrollObserver, useSearch, useSearchParams, useSearchParamsObject, useShallowCompSelector, useShallowCompValue, useStorageState, useStore, useThrottleByFrame, useThrottleBySetTimeout, useThrottleByTimer, useToggle, useUnmountEffect };
@@ -1,5 +1,5 @@
1
1
  import { PossibleRef } from "./index-BDOKnQLQ.js";
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";
@@ -16,7 +16,7 @@ type CustomContextOptions<TContextValue, TStrict extends boolean> = {
16
16
  strict?: TStrict;
17
17
  };
18
18
  type UseCustomContext<TContextValue, TStrict extends boolean> = () => TStrict extends true ? TContextValue : TContextValue | null;
19
- declare const createCustomContext: <TContextValue = null, TStrict extends boolean = true>(options?: CustomContextOptions<TContextValue, TStrict>) => [Provider: react0.Context<TContextValue>, useCustomContext: UseCustomContext<TContextValue, TStrict>];
19
+ declare const createCustomContext: <TContextValue = null, TStrict extends boolean = true>(options?: CustomContextOptions<TContextValue, TStrict>) => [Provider: react1.Context<TContextValue>, useCustomContext: UseCustomContext<TContextValue, TStrict>];
20
20
  declare class ContextError extends Error {
21
21
  name: string;
22
22
  }
@@ -88,11 +88,11 @@ type UseClickOutsideOptions<TElement extends HTMLElement> = {
88
88
  ref?: Array<React.RefObject<TElement>> | React.RefObject<TElement>;
89
89
  };
90
90
  declare const useClickOutside: <TElement extends HTMLElement>(options: UseClickOutsideOptions<TElement>) => {
91
- ref: react0.RefObject<TElement | null>;
91
+ ref: react1.RefObject<TElement | null>;
92
92
  };
93
93
  //#endregion
94
94
  //#region src/hooks/useComposeRefs.d.ts
95
- declare const useComposeRefs: <TRef extends HTMLElement>(...refs: Array<PossibleRef<TRef>>) => react0.RefCallback<TRef>;
95
+ declare const useComposeRefs: <TRef extends HTMLElement>(...refs: Array<PossibleRef<TRef>>) => react1.RefCallback<TRef>;
96
96
  //#endregion
97
97
  //#region src/hooks/useConstant.d.ts
98
98
  declare const useConstant: <TResult>(initCallbackFn: () => TResult) => TResult;
@@ -114,13 +114,13 @@ declare const useDebouncedFn: <TParams>(callBackFn: CallbackFn<TParams>, delay:
114
114
  cancelMaxWait(): void;
115
115
  };
116
116
  declare const useDebouncedState: <TValue>(defaultValue: TValue, delay: number | undefined) => readonly [TValue, {
117
- (...params: react0.SetStateAction<TValue>[]): void;
118
- (params: react0.SetStateAction<TValue> | react0.SetStateAction<TValue>[], overrideOptions: {
117
+ (...params: react1.SetStateAction<TValue>[]): void;
118
+ (params: react1.SetStateAction<TValue> | react1.SetStateAction<TValue>[], overrideOptions: {
119
119
  $delay: number;
120
120
  }): void;
121
121
  cancel: () => void;
122
122
  cancelMaxWait(): void;
123
- }, react0.Dispatch<react0.SetStateAction<TValue>>];
123
+ }, react1.Dispatch<react1.SetStateAction<TValue>>];
124
124
  //#endregion
125
125
  //#region src/hooks/useDisclosure.d.ts
126
126
  type DisclosureOptions = {
@@ -170,7 +170,7 @@ declare const useIsServer: () => boolean;
170
170
  //#endregion
171
171
  //#region src/hooks/useLocationState.d.ts
172
172
  type UseLocationResult<TSlice> = [state: TSlice, actions: LocationStoreApi];
173
- declare const createUseLocationState: (options?: LocationStoreOptions) => Omit<_zayne_labs_toolkit_core0.StoreApi<_zayne_labs_toolkit_core0.URLInfoObject>, "resetState" | "setState"> & {
173
+ declare const createUseLocationState: (options?: LocationStoreOptions) => Omit<_zayne_labs_toolkit_core0.StoreApi<_zayne_labs_toolkit_core0.URLInfoObject>, "setState" | "resetState"> & {
174
174
  push: (url: string | _zayne_labs_toolkit_core0.PartialURLInfo, options?: {
175
175
  state?: _zayne_labs_toolkit_core0.PartialURLInfo["state"];
176
176
  }) => void;
@@ -190,7 +190,7 @@ declare const useSearch: <TData>(initialData: TData[], delay?: number) => {
190
190
  data: TData[];
191
191
  isLoading: boolean;
192
192
  query: string;
193
- setQuery: react0.Dispatch<react0.SetStateAction<string>>;
193
+ setQuery: react1.Dispatch<react1.SetStateAction<string>>;
194
194
  };
195
195
  //#endregion
196
196
  //#region src/hooks/useSearchParams.d.ts
@@ -243,4 +243,4 @@ type InitialState = boolean | (() => boolean);
243
243
  declare const useToggle: (initialValue?: InitialState) => readonly [boolean, <TValue>(newValue?: TValue) => void];
244
244
  //#endregion
245
245
  export { ContextError, CustomContextOptions, UseCustomContext, createCustomContext, createUseLocationState, createUseStorageState, getErrorMessage, useAfterMountEffect, useAnimateElementRefs, useAnimationInterval, useAsyncEffect, useCallbackRef, useClickOutside, useComposeRefs, useConstant, useCopyToClipboard, useDebouncedFn, useDebouncedState, useDisclosure, useEffectOnce, useIsHydrated, useIsServer, useLazyRef, useLifeCycle, useLocationState, useMountEffect, useScrollObserver, useSearch, useSearchParams, useSearchParamsObject, useShallowCompSelector, useShallowCompValue, useStorageState, useStore, useThrottleByFrame, useThrottleBySetTimeout, useThrottleByTimer, useToggle, useUnmountEffect };
246
- //# sourceMappingURL=index-BszCeil2.d.ts.map
246
+ //# sourceMappingURL=index-kzBML-eP.d.ts.map
@@ -1,6 +1,6 @@
1
- import { CustomContextOptions } from "../index-BszCeil2.js";
1
+ import { CustomContextOptions } from "../index-kzBML-eP.js";
2
2
  import "../index-BDOKnQLQ.js";
3
- import * as react9 from "react";
3
+ import * as react0 from "react";
4
4
  import { StoreApi } from "@zayne-labs/toolkit-core";
5
5
  import { AnyObject, Prettify, SelectorFn } from "@zayne-labs/toolkit-type-helpers";
6
6
  import * as zustand0 from "zustand";
@@ -10,7 +10,7 @@ import { Mutate, StateCreator as StateCreator$1, StoreMutatorIdentifier, UseBoun
10
10
  declare const createZustandContext: <TState extends Record<string, unknown>, TStore extends StoreApi<TState> = StoreApi<TState>>(options?: CustomContextOptions<TStore, true>) => [ZustandStoreContextProvider: (props: {
11
11
  children: React.ReactNode;
12
12
  store: TStore;
13
- }) => react9.FunctionComponentElement<react9.ProviderProps<TStore>>, useZustandStoreContext: <TResult = TState>(selector?: SelectorFn<TState, TResult>) => TResult];
13
+ }) => react0.FunctionComponentElement<react0.ProviderProps<TStore>>, useZustandStoreContext: <TResult = TState>(selector?: SelectorFn<TState, TResult>) => TResult];
14
14
  //#endregion
15
15
  //#region src/zustand/createZustandStoreWithCombine.d.ts
16
16
  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.11.7",
4
+ "version": "0.11.8",
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.11.7",
51
- "@zayne-labs/toolkit-type-helpers": "0.11.7"
50
+ "@zayne-labs/toolkit-type-helpers": "0.11.8",
51
+ "@zayne-labs/toolkit-core": "0.11.8"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@arethetypeswrong/cli": "^0.18.2",