@zayne-labs/toolkit-react 0.11.12 → 0.11.13

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, useControllableProp, useControllableState, 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-Cga7yUgd.js";
1
+ import { ContextError, CustomContextOptions, UseCustomContext, createCustomContext, createUseLocationState, createUseStorageState, getErrorMessage, useAfterMountEffect, useAnimateElementRefs, useAnimationInterval, useAsyncEffect, useCallbackRef, useClickOutside, useComposeRefs, useConstant, useControllableProp, useControllableState, 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-xSLi3FE8.js";
2
2
  import "../index-DlScRgBk.js";
3
3
  export { ContextError, CustomContextOptions, UseCustomContext, createCustomContext, createUseLocationState, createUseStorageState, getErrorMessage, useAfterMountEffect, useAnimateElementRefs, useAnimationInterval, useAsyncEffect, useCallbackRef, useClickOutside, useComposeRefs, useConstant, useControllableProp, useControllableState, 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, StateSetter } from "./index-DlScRgBk.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 { AllowedClipboardItems, AnimationIntervalOptions, CopyToClipboardOptions, 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>(initFn: () => TResult) => TResult;
@@ -156,7 +156,7 @@ declare const useCopyToClipboard: (options?: CopyToClipboardOptions & {
156
156
  }) => {
157
157
  handleCopy: (valueToCopy: AllowedClipboardItems) => void;
158
158
  hasCopied: boolean;
159
- setValue: react0.Dispatch<react0.SetStateAction<AllowedClipboardItems>>;
159
+ setValue: react1.Dispatch<react1.SetStateAction<AllowedClipboardItems>>;
160
160
  value: AllowedClipboardItems;
161
161
  };
162
162
  //#endregion
@@ -170,13 +170,13 @@ declare const useDebouncedFn: <TParams>(callBackFn: CallbackFn<TParams>, delay:
170
170
  cancelMaxWait(): void;
171
171
  };
172
172
  declare const useDebouncedState: <TValue>(defaultValue: TValue, delay: number | undefined) => readonly [TValue, {
173
- (...params: react0.SetStateAction<TValue>[]): void;
174
- (params: react0.SetStateAction<TValue> | react0.SetStateAction<TValue>[], overrideOptions: {
173
+ (...params: react1.SetStateAction<TValue>[]): void;
174
+ (params: react1.SetStateAction<TValue> | react1.SetStateAction<TValue>[], overrideOptions: {
175
175
  $delay: number;
176
176
  }): void;
177
177
  cancel: () => void;
178
178
  cancelMaxWait(): void;
179
- }, react0.Dispatch<react0.SetStateAction<TValue>>];
179
+ }, react1.Dispatch<react1.SetStateAction<TValue>>];
180
180
  //#endregion
181
181
  //#region src/hooks/useDisclosure.d.ts
182
182
  type DisclosureOptions = {
@@ -226,7 +226,7 @@ declare const useIsServer: () => boolean;
226
226
  //#endregion
227
227
  //#region src/hooks/useLocationState.d.ts
228
228
  type UseLocationResult<TSlice> = [state: TSlice, actions: LocationStoreApi];
229
- declare const createUseLocationState: (options?: LocationStoreOptions) => Omit<_zayne_labs_toolkit_core0.StoreApi<_zayne_labs_toolkit_core0.URLInfoObject>, "resetState" | "setState"> & {
229
+ declare const createUseLocationState: (options?: LocationStoreOptions) => Omit<_zayne_labs_toolkit_core0.StoreApi<_zayne_labs_toolkit_core0.URLInfoObject>, "setState" | "resetState"> & {
230
230
  push: (url: string | _zayne_labs_toolkit_core0.PartialURLInfo, options?: {
231
231
  state?: _zayne_labs_toolkit_core0.PartialURLInfo["state"];
232
232
  }) => void;
@@ -246,7 +246,7 @@ declare const useSearch: <TData>(initialData: TData[], delay?: number) => {
246
246
  data: TData[];
247
247
  isLoading: boolean;
248
248
  query: string;
249
- setQuery: react0.Dispatch<react0.SetStateAction<string>>;
249
+ setQuery: react1.Dispatch<react1.SetStateAction<string>>;
250
250
  };
251
251
  //#endregion
252
252
  //#region src/hooks/useSearchParams.d.ts
@@ -299,4 +299,4 @@ type InitialState = boolean | (() => boolean);
299
299
  declare const useToggle: (initialValue?: InitialState) => [value: boolean, toggleValue: <TValue>(newValue?: TValue) => void];
300
300
  //#endregion
301
301
  export { ContextError, CustomContextOptions, UseCustomContext, createCustomContext, createUseLocationState, createUseStorageState, getErrorMessage, useAfterMountEffect, useAnimateElementRefs, useAnimationInterval, useAsyncEffect, useCallbackRef, useClickOutside, useComposeRefs, useConstant, useControllableProp, useControllableState, useCopyToClipboard, useDebouncedFn, useDebouncedState, useDisclosure, useEffectOnce, useIsHydrated, useIsServer, useLazyRef, useLifeCycle, useLocationState, useMountEffect, useScrollObserver, useSearch, useSearchParams, useSearchParamsObject, useShallowCompSelector, useShallowCompValue, useStorageState, useStore, useThrottleByFrame, useThrottleBySetTimeout, useThrottleByTimer, useToggle, useUnmountEffect };
302
- //# sourceMappingURL=index-Cga7yUgd.d.ts.map
302
+ //# sourceMappingURL=index-xSLi3FE8.d.ts.map
@@ -1,6 +1,6 @@
1
- import { CustomContextOptions } from "../index-Cga7yUgd.js";
1
+ import { CustomContextOptions } from "../index-xSLi3FE8.js";
2
2
  import "../index-DlScRgBk.js";
3
- import * as react11 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
- }) => react11.FunctionComponentElement<react11.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.12",
4
+ "version": "0.11.13",
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.12",
51
- "@zayne-labs/toolkit-type-helpers": "0.11.12"
50
+ "@zayne-labs/toolkit-core": "0.11.13",
51
+ "@zayne-labs/toolkit-type-helpers": "0.11.13"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@arethetypeswrong/cli": "^0.18.2",