@zayne-labs/toolkit-react 0.12.35 → 0.12.36
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.
- package/dist/esm/hooks/index.d.ts +2 -2
- package/dist/esm/{index-Csosalr1.d.ts → index-BtNqNoV4.d.ts} +3 -3
- package/dist/esm/{index-BPCbCf4b.d.ts → index-Dw4Oci7Z.d.ts} +5 -6
- package/dist/esm/{types-DG4Yz-Hr.d.ts → types-Ixr9rCyA.d.ts} +2 -2
- package/dist/esm/utils/index.d.ts +1 -1
- package/dist/esm/zustand/compatible/index.d.ts +3 -3
- package/dist/esm/zustand/index.d.ts +3 -3
- package/package.json +3 -3
|
@@ -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-
|
|
2
|
-
import "../index-
|
|
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-BtNqNoV4.js";
|
|
2
|
+
import "../index-Dw4Oci7Z.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 };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as PossibleRef, f as StateSetter } from "./index-
|
|
1
|
+
import { D as PossibleRef, f as StateSetter } from "./index-Dw4Oci7Z.js";
|
|
2
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";
|
|
@@ -234,7 +234,7 @@ declare const createUseLocationState: (options?: LocationStoreOptions) => Omit<{
|
|
|
234
234
|
}) | undefined): void;
|
|
235
235
|
};
|
|
236
236
|
subscribe: _zayne_labs_toolkit_core0.SubscribeFn<_zayne_labs_toolkit_core0.URLInfoObject>;
|
|
237
|
-
}, "
|
|
237
|
+
}, "setState" | "resetState"> & {
|
|
238
238
|
push: (newURL: string | _zayne_labs_toolkit_core0.PartialURLInfo, options?: {
|
|
239
239
|
shouldNotifySync?: boolean;
|
|
240
240
|
state?: _zayne_labs_toolkit_core0.PartialURLInfo["state"];
|
|
@@ -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-
|
|
353
|
+
//# sourceMappingURL=index-BtNqNoV4.d.ts.map
|
|
@@ -178,11 +178,10 @@ declare const mergeProps: <TProps extends Record<never, never>>(...propsObjectAr
|
|
|
178
178
|
declare const mergeTwoProps: <TProps extends Record<never, never>>(formerProps: TProps | undefined, latterProps: TProps | undefined) => TProps;
|
|
179
179
|
//#endregion
|
|
180
180
|
//#region src/utils/types/common.d.ts
|
|
181
|
-
type
|
|
182
|
-
type
|
|
183
|
-
type
|
|
184
|
-
type
|
|
185
|
-
type InferPropsStrict<TElement extends ValidElementType> = RemoveStringSignature<InferProps<TElement>>;
|
|
181
|
+
type ForwardedRefType<TElement extends HTMLElement | React.ElementType> = TElement extends React.ElementType ? React.ForwardedRef<React.Ref<TElement>> : React.ForwardedRef<TElement>;
|
|
182
|
+
type InferProps<TElement extends HTMLElement | React.ElementType> = TElement extends React.ElementType ? React.ComponentProps<TElement> : React.HTMLAttributes<TElement>;
|
|
183
|
+
type RemoveStringSignature<TObject extends object> = { [Key in keyof TObject as string extends Key ? never : Key]: string extends Key ? never : TObject[Key] };
|
|
184
|
+
type InferPropsStrict<TElement extends HTMLElement | React.ElementType> = RemoveStringSignature<InferProps<TElement>>;
|
|
186
185
|
type StateSetter<TSetter = unknown> = React.Dispatch<React.SetStateAction<TSetter>>;
|
|
187
186
|
type CssWithCustomProperties<TExtra extends Record<string, string> = NonNullable<unknown>> = React.CSSProperties & Record<`--${string}`, string> & TExtra;
|
|
188
187
|
type DefaultRenderItemErrorMessages = {
|
|
@@ -225,4 +224,4 @@ type PolymorphicProps<TElement extends React.ElementType, TProps extends AnyObje
|
|
|
225
224
|
type PolymorphicPropsStrict<TElement extends React.ElementType, TProps extends AnyObject = NonNullable<unknown>> = MergedGivenPropsWithAs<TElement, TProps> & Omit<InferPropsStrict<TElement>, keyof TProps>;
|
|
226
225
|
//#endregion
|
|
227
226
|
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-
|
|
227
|
+
//# sourceMappingURL=index-Dw4Oci7Z.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { L as CustomContextOptions } from "./index-
|
|
1
|
+
import { L as CustomContextOptions } from "./index-BtNqNoV4.js";
|
|
2
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";
|
|
@@ -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-
|
|
24
|
+
//# sourceMappingURL=types-Ixr9rCyA.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-
|
|
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-Dw4Oci7Z.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-
|
|
2
|
-
import "../../index-
|
|
3
|
-
import { n as UseBoundStore, r as createReactStoreContext, t as Get } from "../../types-
|
|
1
|
+
import "../../index-BtNqNoV4.js";
|
|
2
|
+
import "../../index-Dw4Oci7Z.js";
|
|
3
|
+
import { n as UseBoundStore, r as createReactStoreContext, t as Get } from "../../types-Ixr9rCyA.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-
|
|
2
|
-
import "../index-
|
|
3
|
-
import { n as UseBoundStore, r as createReactStoreContext } from "../types-
|
|
1
|
+
import "../index-BtNqNoV4.js";
|
|
2
|
+
import "../index-Dw4Oci7Z.js";
|
|
3
|
+
import { n as UseBoundStore, r as createReactStoreContext } from "../types-Ixr9rCyA.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.
|
|
4
|
+
"version": "0.12.36",
|
|
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.
|
|
53
|
-
"@zayne-labs/toolkit-type-helpers": "0.12.
|
|
52
|
+
"@zayne-labs/toolkit-core": "0.12.36",
|
|
53
|
+
"@zayne-labs/toolkit-type-helpers": "0.12.36"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@arethetypeswrong/cli": "^0.18.2",
|