@zayne-labs/toolkit-react 0.12.33 → 0.12.35

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 { A as useUnmountEffect, B as getErrorMessage, C as useConstant, D as useCallbackRef, E as useClickOutside, F as useAfterMountEffect, I as ContextError, L as CustomContextOptions, M as useLifeCycle, N as useEffectOnce, O as useAnimationInterval, P as useAsyncEffect, R as UseCustomContext, S as useControllableState, T as useComposeRefs, _ as useDisclosure, a as useStore, b as useCopyToClipboard, c as useCompareSelector, d as useSearchParamsObject, f as useSearch, g as useIsHydrated, h as useLocationState, i as useThrottleByTimer, j as useMountEffect, k as useAnimateElementRefs, l as useCompareValue, m as createUseLocationState, n as useThrottleByFrame, o as createUseStorageState, p as useScrollObserver, r as useThrottleByTimeout, s as useStorageState, t as useToggle, u as useSearchParams, v as useDebouncedFn, w as useLazyRef, x as useControllableProp, y as useDebouncedState, z as createCustomContext } from "../index-AM1fhfRi.js";
2
- import "../index-B08DS8-6.js";
1
+ import { A as useUnmountEffect, B as getErrorMessage, C as useConstant, D as useCallbackRef, E as useClickOutside, F as useAfterMountEffect, I as ContextError, L as CustomContextOptions, M as useLifeCycle, N as useEffectOnce, O as useAnimationInterval, P as useAsyncEffect, R as UseCustomContext, S as useControllableState, T as useComposeRefs, _ as useDisclosure, a as useStore, b as useCopyToClipboard, c as useCompareSelector, d as useSearchParamsObject, f as useSearch, g as useIsHydrated, h as useLocationState, i as useThrottleByTimer, j as useMountEffect, k as useAnimateElementRefs, l as useCompareValue, m as createUseLocationState, n as useThrottleByFrame, o as createUseStorageState, p as useScrollObserver, r as useThrottleByTimeout, s as useStorageState, t as useToggle, u as useSearchParams, v as useDebouncedFn, w as useLazyRef, x as useControllableProp, y as useDebouncedState, z as createCustomContext } from "../index-Csosalr1.js";
2
+ import "../index-BPCbCf4b.js";
3
3
  export { ContextError, CustomContextOptions, UseCustomContext, createCustomContext, createUseLocationState, createUseStorageState, getErrorMessage, useAfterMountEffect, useAnimateElementRefs, useAnimationInterval, useAsyncEffect, useCallbackRef, useClickOutside, useCompareSelector, useCompareValue, useComposeRefs, useConstant, useControllableProp, useControllableState, useCopyToClipboard, useDebouncedFn, useDebouncedState, useDisclosure, useEffectOnce, useIsHydrated, useLazyRef, useLifeCycle, useLocationState, useMountEffect, useScrollObserver, useSearch, useSearchParams, useSearchParamsObject, useStorageState, useStore, useThrottleByFrame, useThrottleByTimeout, useThrottleByTimer, useToggle, useUnmountEffect };
@@ -181,7 +181,7 @@ declare const mergeTwoProps: <TProps extends Record<never, never>>(formerProps:
181
181
  type ValidElementType = HTMLElement | React.ElementType;
182
182
  type ForwardedRefType<TElement extends ValidElementType> = TElement extends React.ElementType ? React.ForwardedRef<React.Ref<TElement>> : React.ForwardedRef<TElement>;
183
183
  type InferProps<TElement extends ValidElementType> = TElement extends React.ElementType ? React.ComponentProps<TElement> : React.HTMLAttributes<TElement>;
184
- type RemoveStringSignature<TObject extends object> = { [Key in keyof TObject as string extends Key ? never : Key]: TObject[Key] };
184
+ type RemoveStringSignature<TObject extends object> = { [Key in keyof TObject]: string extends Key ? never : TObject[Key] };
185
185
  type InferPropsStrict<TElement extends ValidElementType> = RemoveStringSignature<InferProps<TElement>>;
186
186
  type StateSetter<TSetter = unknown> = React.Dispatch<React.SetStateAction<TSetter>>;
187
187
  type CssWithCustomProperties<TExtra extends Record<string, string> = NonNullable<unknown>> = React.CSSProperties & Record<`--${string}`, string> & TExtra;
@@ -225,4 +225,4 @@ type PolymorphicProps<TElement extends React.ElementType, TProps extends AnyObje
225
225
  type PolymorphicPropsStrict<TElement extends React.ElementType, TProps extends AnyObject = NonNullable<unknown>> = MergedGivenPropsWithAs<TElement, TProps> & Omit<InferPropsStrict<TElement>, keyof TProps>;
226
226
  //#endregion
227
227
  export { composeEventHandlers as A, getRegularChildren as C, PossibleRef as D, matchesSlotComponent as E, composeRefs as O, getMultipleSlots as S, matchesAnySlotComponent as T, createSlotComponent as _, DefaultRenderErrorMessages as a, withSlotNameAndSymbol as b, DiscriminatedRenderProps as c, InferPropsStrict as d, StateSetter as f, GetSlotMapResult as g, GetSlotComponentProps as h, CssWithCustomProperties as i, composeTwoEventHandlers as j, setRef as k, ForwardedRefType as l, mergeProps as m, PolymorphicProps as n, DefaultRenderItemErrorMessages as o, mergeTwoProps as p, PolymorphicPropsStrict as r, DiscriminatedRenderItemProps as s, AsProp as t, InferProps as u, getSlotMap as v, getSingleSlot as w, FunctionalComponent as x, slotComponentSymbol as y };
228
- //# sourceMappingURL=index-B08DS8-6.d.ts.map
228
+ //# sourceMappingURL=index-BPCbCf4b.d.ts.map
@@ -1,5 +1,5 @@
1
- import { D as PossibleRef, f as StateSetter } from "./index-B08DS8-6.js";
2
- import * as react0 from "react";
1
+ import { D as PossibleRef, f as StateSetter } from "./index-BPCbCf4b.js";
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, CompareFnOptions, CopyToClipboardOptions, LocationStoreApi, LocationStoreInfo, 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;
@@ -150,7 +150,7 @@ declare const useCopyToClipboard: (options?: CopyToClipboardOptions & {
150
150
  }) => {
151
151
  handleCopy: (valueToCopy: AllowedClipboardItems) => void;
152
152
  hasCopied: boolean;
153
- setValue: react0.Dispatch<react0.SetStateAction<AllowedClipboardItems>>;
153
+ setValue: react1.Dispatch<react1.SetStateAction<AllowedClipboardItems>>;
154
154
  value: AllowedClipboardItems;
155
155
  };
156
156
  //#endregion
@@ -164,13 +164,13 @@ declare const useDebouncedFn: <TParams>(callBackFn: CallbackFn<TParams>, delay:
164
164
  cancelMaxWait: () => void;
165
165
  };
166
166
  declare const useDebouncedState: <TValue>(defaultValue: TValue, delay: number | undefined) => readonly [TValue, {
167
- (value: react0.SetStateAction<TValue>): void;
168
- (parameters: [value: react0.SetStateAction<TValue>], overrideOptions: {
167
+ (value: react1.SetStateAction<TValue>): void;
168
+ (parameters: [value: react1.SetStateAction<TValue>], overrideOptions: {
169
169
  $delay: number;
170
170
  }): void;
171
171
  cancel: () => void;
172
172
  cancelMaxWait: () => void;
173
- }, react0.Dispatch<react0.SetStateAction<TValue>>];
173
+ }, react1.Dispatch<react1.SetStateAction<TValue>>];
174
174
  //#endregion
175
175
  //#region src/hooks/useDisclosure.d.ts
176
176
  type DisclosureOptions = {
@@ -256,7 +256,7 @@ declare const useSearch: <TData>(initialData: TData[], delay?: number) => {
256
256
  data: TData[];
257
257
  isLoading: boolean;
258
258
  query: string;
259
- setQuery: react0.Dispatch<react0.SetStateAction<string>>;
259
+ setQuery: react1.Dispatch<react1.SetStateAction<string>>;
260
260
  };
261
261
  //#endregion
262
262
  //#region src/hooks/useSearchParams.d.ts
@@ -350,4 +350,4 @@ type InitialState = boolean | (() => boolean);
350
350
  declare const useToggle: (initialValue?: InitialState) => [value: boolean, toggleValue: <TValue>(newValue?: TValue) => void];
351
351
  //#endregion
352
352
  export { useUnmountEffect as A, getErrorMessage as B, useConstant as C, useCallbackRef as D, useClickOutside as E, useAfterMountEffect as F, ContextError as I, CustomContextOptions as L, useLifeCycle as M, useEffectOnce as N, useAnimationInterval as O, useAsyncEffect as P, UseCustomContext as R, useControllableState as S, useComposeRefs as T, useDisclosure as _, useStore as a, useCopyToClipboard as b, useCompareSelector as c, useSearchParamsObject as d, useSearch as f, useIsHydrated as g, useLocationState as h, useThrottleByTimer as i, useMountEffect as j, useAnimateElementRefs as k, useCompareValue as l, createUseLocationState as m, useThrottleByFrame as n, createUseStorageState as o, useScrollObserver as p, useThrottleByTimeout as r, useStorageState as s, useToggle as t, useSearchParams as u, useDebouncedFn as v, useLazyRef as w, useControllableProp as x, useDebouncedState as y, createCustomContext as z };
353
- //# sourceMappingURL=index-AM1fhfRi.d.ts.map
353
+ //# sourceMappingURL=index-Csosalr1.d.ts.map
@@ -1,5 +1,5 @@
1
- import { L as CustomContextOptions } from "./index-AM1fhfRi.js";
2
- import * as react10 from "react";
1
+ import { L as CustomContextOptions } from "./index-Csosalr1.js";
2
+ import * as react0 from "react";
3
3
  import { StoreApi } from "@zayne-labs/toolkit-core";
4
4
  import { SelectorFn } from "@zayne-labs/toolkit-type-helpers";
5
5
 
@@ -7,7 +7,7 @@ import { SelectorFn } from "@zayne-labs/toolkit-type-helpers";
7
7
  declare const createReactStoreContext: <TState extends Record<string, unknown>, TStore extends StoreApi<TState> = StoreApi<TState>>(options?: CustomContextOptions<TStore, true>) => [ZustandStoreContextProvider: (props: {
8
8
  children: React.ReactNode;
9
9
  store: TStore;
10
- }) => react10.FunctionComponentElement<react10.ProviderProps<TStore>>, useZustandStoreContext: <TResult = TState>(selector?: SelectorFn<TState, TResult>) => TResult];
10
+ }) => react0.FunctionComponentElement<react0.ProviderProps<TStore>>, useZustandStoreContext: <TResult = TState>(selector?: SelectorFn<TState, TResult>) => TResult];
11
11
  //#endregion
12
12
  //#region src/zustand/types.d.ts
13
13
  type Get<T, K, F> = K extends keyof T ? T[K] : F;
@@ -21,4 +21,4 @@ type UseBoundStore<TStoreApi extends ReadonlyStoreApi<unknown>> = TStoreApi & {
21
21
  };
22
22
  //#endregion
23
23
  export { UseBoundStore as n, createReactStoreContext as r, Get as t };
24
- //# sourceMappingURL=types-zR1X_VWo.d.ts.map
24
+ //# sourceMappingURL=types-DG4Yz-Hr.d.ts.map
@@ -1,2 +1,2 @@
1
- import { A as composeEventHandlers, C as getRegularChildren, D as PossibleRef, E as matchesSlotComponent, O as composeRefs, S as getMultipleSlots, T as matchesAnySlotComponent, _ as createSlotComponent, a as DefaultRenderErrorMessages, b as withSlotNameAndSymbol, c as DiscriminatedRenderProps, d as InferPropsStrict, f as StateSetter, g as GetSlotMapResult, h as GetSlotComponentProps, i as CssWithCustomProperties, j as composeTwoEventHandlers, k as setRef, l as ForwardedRefType, m as mergeProps, n as PolymorphicProps, o as DefaultRenderItemErrorMessages, p as mergeTwoProps, r as PolymorphicPropsStrict, s as DiscriminatedRenderItemProps, t as AsProp, u as InferProps, v as getSlotMap, w as getSingleSlot, x as FunctionalComponent, y as slotComponentSymbol } from "../index-B08DS8-6.js";
1
+ import { A as composeEventHandlers, C as getRegularChildren, D as PossibleRef, E as matchesSlotComponent, O as composeRefs, S as getMultipleSlots, T as matchesAnySlotComponent, _ as createSlotComponent, a as DefaultRenderErrorMessages, b as withSlotNameAndSymbol, c as DiscriminatedRenderProps, d as InferPropsStrict, f as StateSetter, g as GetSlotMapResult, h as GetSlotComponentProps, i as CssWithCustomProperties, j as composeTwoEventHandlers, k as setRef, l as ForwardedRefType, m as mergeProps, n as PolymorphicProps, o as DefaultRenderItemErrorMessages, p as mergeTwoProps, r as PolymorphicPropsStrict, s as DiscriminatedRenderItemProps, t as AsProp, u as InferProps, v as getSlotMap, w as getSingleSlot, x as FunctionalComponent, y as slotComponentSymbol } from "../index-BPCbCf4b.js";
2
2
  export { AsProp, CssWithCustomProperties, DefaultRenderErrorMessages, DefaultRenderItemErrorMessages, DiscriminatedRenderItemProps, DiscriminatedRenderProps, ForwardedRefType, FunctionalComponent, GetSlotComponentProps, GetSlotMapResult, InferProps, InferPropsStrict, PolymorphicProps, PolymorphicPropsStrict, PossibleRef, StateSetter, composeEventHandlers, composeRefs, composeTwoEventHandlers, createSlotComponent, getMultipleSlots, getRegularChildren, getSingleSlot, getSlotMap, matchesAnySlotComponent, matchesSlotComponent, mergeProps, mergeTwoProps, setRef, slotComponentSymbol, withSlotNameAndSymbol };
@@ -1,6 +1,6 @@
1
- import "../../index-AM1fhfRi.js";
2
- import "../../index-B08DS8-6.js";
3
- import { n as UseBoundStore, r as createReactStoreContext, t as Get } from "../../types-zR1X_VWo.js";
1
+ import "../../index-Csosalr1.js";
2
+ import "../../index-BPCbCf4b.js";
3
+ import { n as UseBoundStore, r as createReactStoreContext, t as Get } from "../../types-DG4Yz-Hr.js";
4
4
  import { StoreApi } from "@zayne-labs/toolkit-core";
5
5
  import { Mutate, StoreMutatorIdentifier } from "zustand";
6
6
 
@@ -1,6 +1,6 @@
1
- import "../index-AM1fhfRi.js";
2
- import "../index-B08DS8-6.js";
3
- import { n as UseBoundStore, r as createReactStoreContext } from "../types-zR1X_VWo.js";
1
+ import "../index-Csosalr1.js";
2
+ import "../index-BPCbCf4b.js";
3
+ import { n as UseBoundStore, r as createReactStoreContext } from "../types-DG4Yz-Hr.js";
4
4
  import { StoreApi, StoreStateInitializer } from "@zayne-labs/toolkit-core";
5
5
 
6
6
  //#region src/zustand/createReactStore.d.ts
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zayne-labs/toolkit-react",
3
3
  "type": "module",
4
- "version": "0.12.33",
4
+ "version": "0.12.35",
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",
@@ -49,8 +49,8 @@
49
49
  }
50
50
  },
51
51
  "dependencies": {
52
- "@zayne-labs/toolkit-core": "0.12.33",
53
- "@zayne-labs/toolkit-type-helpers": "0.12.33"
52
+ "@zayne-labs/toolkit-core": "0.12.35",
53
+ "@zayne-labs/toolkit-type-helpers": "0.12.35"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@arethetypeswrong/cli": "^0.18.2",