@zayne-labs/toolkit-react 0.12.46 → 0.12.47
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 +1 -1
- package/dist/esm/{index-BrSA_v5B.d.ts → index-Dne3LeeI.d.ts} +29 -29
- package/dist/esm/{index-B82o59W9.d.ts → index-wDTupPDM.d.ts} +4 -4
- package/dist/esm/{types-BVMQNFW4.d.ts → types-swxeu4dB.d.ts} +4 -4
- package/dist/esm/utils/index.d.ts +1 -1
- package/dist/esm/zustand/compatible/index.d.ts +1 -1
- package/dist/esm/zustand/index.d.ts +1 -1
- package/package.json +6 -6
|
@@ -1,2 +1,2 @@
|
|
|
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-
|
|
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-Dne3LeeI.js";
|
|
2
2
|
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,7 +1,7 @@
|
|
|
1
|
-
import { D as PossibleRef, f as StateSetter } from "./index-
|
|
2
|
-
import * as react from "react";
|
|
1
|
+
import { D as PossibleRef, f as StateSetter } from "./index-wDTupPDM.js";
|
|
2
|
+
import * as _$react from "react";
|
|
3
3
|
import { RefCallback, useEffect } from "react";
|
|
4
|
-
import * as _zayne_labs_toolkit_core0 from "@zayne-labs/toolkit-core";
|
|
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";
|
|
6
6
|
import { AnyFunction, CallbackFn, NonEmptyArray, Prettify, SelectorFn } from "@zayne-labs/toolkit-type-helpers";
|
|
7
7
|
|
|
@@ -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: react.Context<TContextValue>, useCustomContext: UseCustomContext<TContextValue, TStrict>];
|
|
19
|
+
declare const createCustomContext: <TContextValue = null, TStrict extends boolean = true>(options?: CustomContextOptions<TContextValue, TStrict>) => [Provider: _$react.Context<TContextValue>, useCustomContext: UseCustomContext<TContextValue, TStrict>];
|
|
20
20
|
declare class ContextError extends Error {
|
|
21
21
|
name: string;
|
|
22
22
|
}
|
|
@@ -59,7 +59,7 @@ type ElementsInfoArray<TTargetElement extends string> = NonEmptyArray<{
|
|
|
59
59
|
* @returns - An object containing the refs of the animated elements and a function to handle the initiation and removal animation.
|
|
60
60
|
*/
|
|
61
61
|
declare const useAnimateElementRefs: <TTargetElement extends string>(elementsInfoArray: ElementsInfoArray<TTargetElement>) => {
|
|
62
|
-
animatedElementsRef: react.RefObject<Record<TTargetElement, HTMLElement | null>>;
|
|
62
|
+
animatedElementsRef: _$react.RefObject<Record<TTargetElement, HTMLElement | null>>;
|
|
63
63
|
handleElementsAnimation: () => void;
|
|
64
64
|
setAnimatedNode: (targetElement: TTargetElement) => React.RefCallback<HTMLElement>;
|
|
65
65
|
};
|
|
@@ -89,11 +89,11 @@ type UseClickOutsideOptions<TElement extends HTMLElement> = {
|
|
|
89
89
|
ref?: Array<React.RefObject<TElement>> | React.RefObject<TElement>;
|
|
90
90
|
};
|
|
91
91
|
declare const useClickOutside: <TElement extends HTMLElement>(options: UseClickOutsideOptions<TElement>) => {
|
|
92
|
-
ref: react.RefObject<TElement | null>;
|
|
92
|
+
ref: _$react.RefObject<TElement | null>;
|
|
93
93
|
};
|
|
94
94
|
//#endregion
|
|
95
95
|
//#region src/hooks/useComposeRefs.d.ts
|
|
96
|
-
declare const useComposeRefs: <TRef extends HTMLElement>(...refs: Array<PossibleRef<TRef>>) => react.RefCallback<TRef>;
|
|
96
|
+
declare const useComposeRefs: <TRef extends HTMLElement>(...refs: Array<PossibleRef<TRef>>) => _$react.RefCallback<TRef>;
|
|
97
97
|
//#endregion
|
|
98
98
|
//#region src/hooks/useConstant.d.ts
|
|
99
99
|
declare const useConstant: <TResult>(initFn: () => TResult) => TResult;
|
|
@@ -151,7 +151,7 @@ declare const useCopyToClipboard: (options?: CopyToClipboardOptions & {
|
|
|
151
151
|
}) => {
|
|
152
152
|
handleCopy: (valueToCopy: AllowedClipboardItems) => void;
|
|
153
153
|
hasCopied: boolean;
|
|
154
|
-
setValue: react.Dispatch<react.SetStateAction<AllowedClipboardItems>>;
|
|
154
|
+
setValue: _$react.Dispatch<_$react.SetStateAction<AllowedClipboardItems>>;
|
|
155
155
|
value: AllowedClipboardItems;
|
|
156
156
|
};
|
|
157
157
|
//#endregion
|
|
@@ -165,13 +165,13 @@ declare const useDebouncedFn: <TParams>(callBackFn: CallbackFn<TParams>, delay:
|
|
|
165
165
|
cancelMaxWait: () => void;
|
|
166
166
|
};
|
|
167
167
|
declare const useDebouncedState: <TValue>(defaultValue: TValue, delay: number | undefined) => readonly [TValue, {
|
|
168
|
-
(value: react.SetStateAction<TValue>): void;
|
|
169
|
-
(parameters: [value: react.SetStateAction<TValue>], overrideOptions: {
|
|
168
|
+
(value: _$react.SetStateAction<TValue>): void;
|
|
169
|
+
(parameters: [value: _$react.SetStateAction<TValue>], overrideOptions: {
|
|
170
170
|
$delay: number;
|
|
171
171
|
}): void;
|
|
172
172
|
cancel: () => void;
|
|
173
173
|
cancelMaxWait: () => void;
|
|
174
|
-
}, react.Dispatch<react.SetStateAction<TValue>>];
|
|
174
|
+
}, _$react.Dispatch<_$react.SetStateAction<TValue>>];
|
|
175
175
|
//#endregion
|
|
176
176
|
//#region src/hooks/useDisclosure.d.ts
|
|
177
177
|
type DisclosureOptions = {
|
|
@@ -214,35 +214,35 @@ declare const useIsHydrated: () => boolean;
|
|
|
214
214
|
//#region src/hooks/useLocationState.d.ts
|
|
215
215
|
type UseLocationResult<TSlice> = [state: TSlice, actions: LocationStoreApi];
|
|
216
216
|
declare const createUseLocationState: (options?: LocationStoreOptions) => Omit<{
|
|
217
|
-
getInitialState: () => _zayne_labs_toolkit_core0.URLInfoObject;
|
|
218
|
-
getListeners: () => Set<(state: _zayne_labs_toolkit_core0.URLInfoObject, prevState: _zayne_labs_toolkit_core0.URLInfoObject) => void>;
|
|
219
|
-
getState: () => _zayne_labs_toolkit_core0.URLInfoObject;
|
|
217
|
+
getInitialState: () => _$_zayne_labs_toolkit_core0.URLInfoObject;
|
|
218
|
+
getListeners: () => Set<(state: _$_zayne_labs_toolkit_core0.URLInfoObject, prevState: _$_zayne_labs_toolkit_core0.URLInfoObject) => void>;
|
|
219
|
+
getState: () => _$_zayne_labs_toolkit_core0.URLInfoObject;
|
|
220
220
|
resetState: () => void;
|
|
221
221
|
setState: {
|
|
222
|
-
(stateUpdate: Partial<_zayne_labs_toolkit_core0.URLInfoObject> | ((prevState: _zayne_labs_toolkit_core0.URLInfoObject) => Partial<_zayne_labs_toolkit_core0.URLInfoObject>), options?: ({
|
|
223
|
-
onNotifySync?: ((previousState: _zayne_labs_toolkit_core0.URLInfoObject) => void) | undefined;
|
|
224
|
-
onNotifyViaBatch?: ((previousStateSnapshot: _zayne_labs_toolkit_core0.URLInfoObject) => void) | undefined;
|
|
222
|
+
(stateUpdate: Partial<_$_zayne_labs_toolkit_core0.URLInfoObject> | ((prevState: _$_zayne_labs_toolkit_core0.URLInfoObject) => Partial<_$_zayne_labs_toolkit_core0.URLInfoObject>), options?: ({
|
|
223
|
+
onNotifySync?: ((previousState: _$_zayne_labs_toolkit_core0.URLInfoObject) => void) | undefined;
|
|
224
|
+
onNotifyViaBatch?: ((previousStateSnapshot: _$_zayne_labs_toolkit_core0.URLInfoObject) => void) | undefined;
|
|
225
225
|
shouldNotifySync?: boolean | undefined;
|
|
226
226
|
} & {
|
|
227
227
|
shouldReplace?: false;
|
|
228
228
|
}) | undefined): void;
|
|
229
|
-
(stateUpdate: _zayne_labs_toolkit_core0.URLInfoObject | ((prevState: _zayne_labs_toolkit_core0.URLInfoObject) => _zayne_labs_toolkit_core0.URLInfoObject), options?: ({
|
|
230
|
-
onNotifySync?: ((previousState: _zayne_labs_toolkit_core0.URLInfoObject) => void) | undefined;
|
|
231
|
-
onNotifyViaBatch?: ((previousStateSnapshot: _zayne_labs_toolkit_core0.URLInfoObject) => void) | undefined;
|
|
229
|
+
(stateUpdate: _$_zayne_labs_toolkit_core0.URLInfoObject | ((prevState: _$_zayne_labs_toolkit_core0.URLInfoObject) => _$_zayne_labs_toolkit_core0.URLInfoObject), options?: ({
|
|
230
|
+
onNotifySync?: ((previousState: _$_zayne_labs_toolkit_core0.URLInfoObject) => void) | undefined;
|
|
231
|
+
onNotifyViaBatch?: ((previousStateSnapshot: _$_zayne_labs_toolkit_core0.URLInfoObject) => void) | undefined;
|
|
232
232
|
shouldNotifySync?: boolean | undefined;
|
|
233
233
|
} & {
|
|
234
234
|
shouldReplace: true;
|
|
235
235
|
}) | undefined): void;
|
|
236
236
|
};
|
|
237
|
-
subscribe: _zayne_labs_toolkit_core0.SubscribeFn<_zayne_labs_toolkit_core0.URLInfoObject>;
|
|
237
|
+
subscribe: _$_zayne_labs_toolkit_core0.SubscribeFn<_$_zayne_labs_toolkit_core0.URLInfoObject>;
|
|
238
238
|
}, "resetState" | "setState"> & {
|
|
239
|
-
push: (newURL: string | _zayne_labs_toolkit_core0.PartialURLInfo, options?: {
|
|
239
|
+
push: (newURL: string | _$_zayne_labs_toolkit_core0.PartialURLInfo, options?: {
|
|
240
240
|
shouldNotifySync?: boolean;
|
|
241
|
-
state?: _zayne_labs_toolkit_core0.PartialURLInfo["state"];
|
|
241
|
+
state?: _$_zayne_labs_toolkit_core0.PartialURLInfo["state"];
|
|
242
242
|
}) => void;
|
|
243
243
|
replace: LocationStoreApi["push"];
|
|
244
244
|
triggerPopstateEvent: (nextLocationState?: LocationStoreInfo["state"]) => void;
|
|
245
|
-
} & (<TSlice = _zayne_labs_toolkit_core0.URLInfoObject>(selector?: SelectorFn<LocationStoreInfo, TSlice>) => UseLocationResult<TSlice>);
|
|
245
|
+
} & (<TSlice = _$_zayne_labs_toolkit_core0.URLInfoObject>(selector?: SelectorFn<LocationStoreInfo, TSlice>) => UseLocationResult<TSlice>);
|
|
246
246
|
declare const useLocationState: <TSlice = LocationStoreInfo>(selector?: SelectorFn<LocationStoreInfo, TSlice>, options?: LocationStoreOptions) => UseLocationResult<TSlice>;
|
|
247
247
|
//#endregion
|
|
248
248
|
//#region src/hooks/useScrollObserver.d.ts
|
|
@@ -257,7 +257,7 @@ declare const useSearch: <TData>(initialData: TData[], delay?: number) => {
|
|
|
257
257
|
data: TData[];
|
|
258
258
|
isLoading: boolean;
|
|
259
259
|
query: string;
|
|
260
|
-
setQuery: react.Dispatch<react.SetStateAction<string>>;
|
|
260
|
+
setQuery: _$react.Dispatch<_$react.SetStateAction<string>>;
|
|
261
261
|
};
|
|
262
262
|
//#endregion
|
|
263
263
|
//#region src/hooks/useSearchParams.d.ts
|
|
@@ -265,8 +265,8 @@ type UseSearchParamsOptions<TSearchParams extends URLSearchParamsInit> = Omit<Lo
|
|
|
265
265
|
action?: "push" | "replace";
|
|
266
266
|
defaultValues?: TSearchParams;
|
|
267
267
|
};
|
|
268
|
-
declare const useSearchParams: <TSearchParams extends URLSearchParamsInit>(options?: UseSearchParamsOptions<TSearchParams>) => [searchParams: URLSearchParams, setSearchParams: (newQueryParams: TSearchParams | ((prev: URLSearchParams) => TSearchParams)) => void, triggerPopstateEvent: (nextLocationState?: _zayne_labs_toolkit_core0.LocationStoreInfo["state"]) => void];
|
|
269
|
-
declare const useSearchParamsObject: <TSearchParams extends Extract<URLSearchParamsInit, Record<string, string | string[]>>>(options?: UseSearchParamsOptions<TSearchParams>) => [searchParamsObject: TSearchParams, setSearchParamsObject: (newQueryParams: TSearchParams | ((prev: TSearchParams) => TSearchParams)) => void, triggerPopstateEvent: (nextLocationState?: _zayne_labs_toolkit_core0.LocationStoreInfo["state"]) => void];
|
|
268
|
+
declare const useSearchParams: <TSearchParams extends URLSearchParamsInit>(options?: UseSearchParamsOptions<TSearchParams>) => [searchParams: URLSearchParams, setSearchParams: (newQueryParams: TSearchParams | ((prev: URLSearchParams) => TSearchParams)) => void, triggerPopstateEvent: (nextLocationState?: _$_zayne_labs_toolkit_core0.LocationStoreInfo["state"]) => void];
|
|
269
|
+
declare const useSearchParamsObject: <TSearchParams extends Extract<URLSearchParamsInit, Record<string, string | string[]>>>(options?: UseSearchParamsOptions<TSearchParams>) => [searchParamsObject: TSearchParams, setSearchParamsObject: (newQueryParams: TSearchParams | ((prev: TSearchParams) => TSearchParams)) => void, triggerPopstateEvent: (nextLocationState?: _$_zayne_labs_toolkit_core0.LocationStoreInfo["state"]) => void];
|
|
270
270
|
//#endregion
|
|
271
271
|
//#region src/hooks/useCompare.d.ts
|
|
272
272
|
type UseCompareSelectorOptions = {
|
|
@@ -303,7 +303,7 @@ declare const createUseStorageState: <TState>(baseOptions: StorageOptions<TState
|
|
|
303
303
|
shouldReplace: true;
|
|
304
304
|
}) | undefined): void;
|
|
305
305
|
};
|
|
306
|
-
subscribe: _zayne_labs_toolkit_core0.SubscribeFn<TState>;
|
|
306
|
+
subscribe: _$_zayne_labs_toolkit_core0.SubscribeFn<TState>;
|
|
307
307
|
}, "setState"> & {
|
|
308
308
|
removeState: () => void;
|
|
309
309
|
setState: {
|
|
@@ -351,4 +351,4 @@ type InitialState = boolean | (() => boolean);
|
|
|
351
351
|
declare const useToggle: (initialValue?: InitialState) => [value: boolean, toggleValue: <TValue>(newValue?: TValue) => void];
|
|
352
352
|
//#endregion
|
|
353
353
|
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 };
|
|
354
|
-
//# sourceMappingURL=index-
|
|
354
|
+
//# sourceMappingURL=index-Dne3LeeI.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as react from "react";
|
|
1
|
+
import * as _$react from "react";
|
|
2
2
|
import { RefCallback } from "react";
|
|
3
3
|
import { AnyFunction, AnyObject, CallbackFn, EmptyObject, Prettify, UnionDiscriminator, UnionToIntersection, UnknownObject, UnknownObjectWithAnyKey } from "@zayne-labs/toolkit-type-helpers";
|
|
4
4
|
|
|
@@ -46,7 +46,7 @@ type SlotOptions = {
|
|
|
46
46
|
*
|
|
47
47
|
* @throws { AssertionError } when throwOnMultipleSlotMatch is true and multiple slots are found
|
|
48
48
|
*/
|
|
49
|
-
declare const getSingleSlot: (children: React.ReactNode, SlotComponent: FunctionalComponent, options?: SlotOptions) => react.ReactNode;
|
|
49
|
+
declare const getSingleSlot: (children: React.ReactNode, SlotComponent: FunctionalComponent, options?: SlotOptions) => _$react.ReactNode;
|
|
50
50
|
type MultipleSlotsOptions = {
|
|
51
51
|
/**
|
|
52
52
|
* @description The error message to throw when multiple slots are found for a given slot component
|
|
@@ -72,7 +72,7 @@ declare const getMultipleSlots: <const TSlotComponents extends FunctionalCompone
|
|
|
72
72
|
/**
|
|
73
73
|
* @description Returns all children that are not slot elements (i.e., don't match any of the provided slot components)
|
|
74
74
|
*/
|
|
75
|
-
declare const getRegularChildren: (children: React.ReactNode, SlotComponentOrComponents: FunctionalComponent | FunctionalComponent[]) => react.ReactNode[];
|
|
75
|
+
declare const getRegularChildren: (children: React.ReactNode, SlotComponentOrComponents: FunctionalComponent | FunctionalComponent[]) => _$react.ReactNode[];
|
|
76
76
|
//#endregion
|
|
77
77
|
//#region src/utils/getSlotMap/getSlotMap.d.ts
|
|
78
78
|
type GetSlotName<TSlotComponentProps extends GetSlotComponentProps> = string extends TSlotComponentProps["name"] ? never : "default" extends TSlotComponentProps["name"] ? never : TSlotComponentProps["name"];
|
|
@@ -224,4 +224,4 @@ type PolymorphicProps<TElement extends React.ElementType, TProps extends AnyObje
|
|
|
224
224
|
type PolymorphicPropsStrict<TElement extends React.ElementType, TProps extends AnyObject = NonNullable<unknown>> = MergedGivenPropsWithAs<TElement, TProps> & Omit<InferPropsStrict<TElement>, keyof TProps>;
|
|
225
225
|
//#endregion
|
|
226
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 };
|
|
227
|
-
//# sourceMappingURL=index-
|
|
227
|
+
//# sourceMappingURL=index-wDTupPDM.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as CustomContextOptions } from "./index-
|
|
2
|
-
import * as react from "react";
|
|
1
|
+
import { L as CustomContextOptions } from "./index-Dne3LeeI.js";
|
|
2
|
+
import * as _$react 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
|
-
}) => react.FunctionComponentElement<react.ProviderProps<TStore>>, useZustandStoreContext: <TResult = TState>(selector?: SelectorFn<TState, TResult>) => TResult];
|
|
10
|
+
}) => _$react.FunctionComponentElement<_$react.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-
|
|
24
|
+
//# sourceMappingURL=types-swxeu4dB.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-wDTupPDM.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,4 +1,4 @@
|
|
|
1
|
-
import { n as UseBoundStore, r as createReactStoreContext, t as Get } from "../../types-
|
|
1
|
+
import { n as UseBoundStore, r as createReactStoreContext, t as Get } from "../../types-swxeu4dB.js";
|
|
2
2
|
import { StoreApi } from "@zayne-labs/toolkit-core";
|
|
3
3
|
import { Mutate, StoreMutatorIdentifier } from "zustand";
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as UseBoundStore, r as createReactStoreContext } from "../types-
|
|
1
|
+
import { n as UseBoundStore, r as createReactStoreContext } from "../types-swxeu4dB.js";
|
|
2
2
|
import { StoreApi, StoreStateInitializer } from "@zayne-labs/toolkit-core";
|
|
3
3
|
|
|
4
4
|
//#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.47",
|
|
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.47",
|
|
53
|
+
"@zayne-labs/toolkit-type-helpers": "0.12.47"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@arethetypeswrong/cli": "^0.18.2",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"react": "^19.2.4",
|
|
68
68
|
"size-limit": "^12.0.1",
|
|
69
69
|
"tailwind-merge": "3.5.0",
|
|
70
|
-
"tsdown": "0.21.
|
|
70
|
+
"tsdown": "0.21.7",
|
|
71
71
|
"typescript": "6.0.2",
|
|
72
72
|
"zustand": "^5.0.12"
|
|
73
73
|
},
|
|
@@ -100,8 +100,8 @@
|
|
|
100
100
|
"build:test": "concurrently --prefix-colors \"yellow.bold,#7da4f8.bold,magenta\" --names PUBLINT,TSUP 'pnpm:lint:publint' 'pnpm:build:dev'",
|
|
101
101
|
"dev": "pnpm build:dev --watch",
|
|
102
102
|
"lint:attw": "attw --pack . --ignore-rules=cjs-resolves-to-esm",
|
|
103
|
-
"lint:eslint": "eslint . --max-warnings
|
|
104
|
-
"lint:eslint:interactive": "pnpx eslint-interactive@latest . --max-warnings
|
|
103
|
+
"lint:eslint": "eslint . --max-warnings=0",
|
|
104
|
+
"lint:eslint:interactive": "pnpx eslint-interactive@latest . --max-warnings=0 --fix",
|
|
105
105
|
"lint:format": "prettier --write .",
|
|
106
106
|
"lint:publint": "publint --strict .",
|
|
107
107
|
"lint:size": "size-limit",
|