@zayne-labs/toolkit-react 0.11.5 → 0.11.6

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-PZiFvZNC.js";
2
- import "../index-CByHxS0M.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-a5cYg8rz.js";
2
+ import "../index-B7RWhh84.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 };
@@ -178,8 +178,11 @@ 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 ForwardedRefType<TComponent extends HTMLElement | React.ElementType> = TComponent extends React.ElementType ? React.ForwardedRef<React.Ref<TComponent>> : React.ForwardedRef<TComponent>;
182
- type InferProps<TComponent extends HTMLElement | React.ElementType> = TComponent extends React.ElementType ? React.ComponentPropsWithRef<TComponent> : React.HTMLAttributes<TComponent>;
181
+ type ValidElementType = HTMLElement | React.ElementType;
182
+ type ForwardedRefType<TElement extends ValidElementType> = TElement extends React.ElementType ? React.ForwardedRef<React.Ref<TElement>> : React.ForwardedRef<TElement>;
183
+ type InferPropsLax<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] };
185
+ type InferProps<TElement extends ValidElementType> = RemoveStringSignature<InferPropsLax<TElement>>;
183
186
  type StateSetter<TSetter = unknown> = React.Dispatch<React.SetStateAction<TSetter>>;
184
187
  type CssWithCustomProperties<TExtra extends Record<string, string> = NonNullable<unknown>> = React.CSSProperties & Record<`--${string}`, string> & TExtra;
185
188
  type DefaultRenderItemErrorMessages = {
@@ -221,5 +224,5 @@ type InferRemainingProps<TElement extends React.ElementType, TProps> = Omit<Infe
221
224
  type MergedGivenPropsWithAs<TElement extends React.ElementType, TProps> = Prettify<Omit<AsProp<TElement>, keyof TProps> & TProps>;
222
225
  type PolymorphicProps<TElement extends React.ElementType, TProps extends AnyObject = NonNullable<unknown>> = MergedGivenPropsWithAs<TElement, TProps> & InferRemainingProps<TElement, TProps>;
223
226
  //#endregion
224
- export { AsProp, CssWithCustomProperties, DefaultRenderErrorMessages, DefaultRenderItemErrorMessages, DiscriminatedRenderItemProps, DiscriminatedRenderProps, ForwardedRefType, FunctionalComponent, GetSlotComponentProps, GetSlotMapResult, InferProps, PolymorphicProps, PossibleRef, StateSetter, composeEventHandlers, composeRefs, composeTwoEventHandlers, createSlotComponent, getMultipleSlots, getRegularChildren, getSingleSlot, getSlotMap, matchesAnySlotComponent, matchesSlotComponent, mergeProps, mergeTwoProps, setRef, slotComponentSymbol, withSlotNameAndSymbol };
225
- //# sourceMappingURL=index-CByHxS0M.d.ts.map
227
+ export { AsProp, CssWithCustomProperties, DefaultRenderErrorMessages, DefaultRenderItemErrorMessages, DiscriminatedRenderItemProps, DiscriminatedRenderProps, ForwardedRefType, FunctionalComponent, GetSlotComponentProps, GetSlotMapResult, InferProps, InferPropsLax, PolymorphicProps, PossibleRef, StateSetter, composeEventHandlers, composeRefs, composeTwoEventHandlers, createSlotComponent, getMultipleSlots, getRegularChildren, getSingleSlot, getSlotMap, matchesAnySlotComponent, matchesSlotComponent, mergeProps, mergeTwoProps, setRef, slotComponentSymbol, withSlotNameAndSymbol };
228
+ //# sourceMappingURL=index-B7RWhh84.d.ts.map
@@ -1,4 +1,4 @@
1
- import { PossibleRef } from "./index-CByHxS0M.js";
1
+ import { PossibleRef } from "./index-B7RWhh84.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";
@@ -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-PZiFvZNC.d.ts.map
246
+ //# sourceMappingURL=index-a5cYg8rz.d.ts.map
@@ -1,2 +1,2 @@
1
- import { AsProp, CssWithCustomProperties, DefaultRenderErrorMessages, DefaultRenderItemErrorMessages, DiscriminatedRenderItemProps, DiscriminatedRenderProps, ForwardedRefType, FunctionalComponent, GetSlotComponentProps, GetSlotMapResult, InferProps, PolymorphicProps, PossibleRef, StateSetter, composeEventHandlers, composeRefs, composeTwoEventHandlers, createSlotComponent, getMultipleSlots, getRegularChildren, getSingleSlot, getSlotMap, matchesAnySlotComponent, matchesSlotComponent, mergeProps, mergeTwoProps, setRef, slotComponentSymbol, withSlotNameAndSymbol } from "../index-CByHxS0M.js";
2
- export { AsProp, CssWithCustomProperties, DefaultRenderErrorMessages, DefaultRenderItemErrorMessages, DiscriminatedRenderItemProps, DiscriminatedRenderProps, ForwardedRefType, FunctionalComponent, GetSlotComponentProps, GetSlotMapResult, InferProps, PolymorphicProps, PossibleRef, StateSetter, composeEventHandlers, composeRefs, composeTwoEventHandlers, createSlotComponent, getMultipleSlots, getRegularChildren, getSingleSlot, getSlotMap, matchesAnySlotComponent, matchesSlotComponent, mergeProps, mergeTwoProps, setRef, slotComponentSymbol, withSlotNameAndSymbol };
1
+ import { AsProp, CssWithCustomProperties, DefaultRenderErrorMessages, DefaultRenderItemErrorMessages, DiscriminatedRenderItemProps, DiscriminatedRenderProps, ForwardedRefType, FunctionalComponent, GetSlotComponentProps, GetSlotMapResult, InferProps, InferPropsLax, PolymorphicProps, PossibleRef, StateSetter, composeEventHandlers, composeRefs, composeTwoEventHandlers, createSlotComponent, getMultipleSlots, getRegularChildren, getSingleSlot, getSlotMap, matchesAnySlotComponent, matchesSlotComponent, mergeProps, mergeTwoProps, setRef, slotComponentSymbol, withSlotNameAndSymbol } from "../index-B7RWhh84.js";
2
+ export { AsProp, CssWithCustomProperties, DefaultRenderErrorMessages, DefaultRenderItemErrorMessages, DiscriminatedRenderItemProps, DiscriminatedRenderProps, ForwardedRefType, FunctionalComponent, GetSlotComponentProps, GetSlotMapResult, InferProps, InferPropsLax, PolymorphicProps, PossibleRef, StateSetter, composeEventHandlers, composeRefs, composeTwoEventHandlers, createSlotComponent, getMultipleSlots, getRegularChildren, getSingleSlot, getSlotMap, matchesAnySlotComponent, matchesSlotComponent, mergeProps, mergeTwoProps, setRef, slotComponentSymbol, withSlotNameAndSymbol };
@@ -1,5 +1,5 @@
1
- import { CustomContextOptions } from "../index-PZiFvZNC.js";
2
- import "../index-CByHxS0M.js";
1
+ import { CustomContextOptions } from "../index-a5cYg8rz.js";
2
+ import "../index-B7RWhh84.js";
3
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";
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.5",
4
+ "version": "0.11.6",
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.5",
51
- "@zayne-labs/toolkit-type-helpers": "0.11.5"
50
+ "@zayne-labs/toolkit-core": "0.11.6",
51
+ "@zayne-labs/toolkit-type-helpers": "0.11.6"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@arethetypeswrong/cli": "^0.18.2",