@zayne-labs/toolkit-react 0.12.33 → 0.12.34
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-
|
|
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-FF_az23J.js";
|
|
2
2
|
import "../index-B08DS8-6.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,7 +1,7 @@
|
|
|
1
1
|
import { D as PossibleRef, f as StateSetter } from "./index-B08DS8-6.js";
|
|
2
2
|
import * as react0 from "react";
|
|
3
3
|
import { RefCallback, useEffect } from "react";
|
|
4
|
-
import * as
|
|
4
|
+
import * as _zayne_labs_toolkit_core1 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
|
|
|
@@ -213,35 +213,35 @@ declare const useIsHydrated: () => boolean;
|
|
|
213
213
|
//#region src/hooks/useLocationState.d.ts
|
|
214
214
|
type UseLocationResult<TSlice> = [state: TSlice, actions: LocationStoreApi];
|
|
215
215
|
declare const createUseLocationState: (options?: LocationStoreOptions) => Omit<{
|
|
216
|
-
getInitialState: () =>
|
|
217
|
-
getListeners: () => Set<(state:
|
|
218
|
-
getState: () =>
|
|
216
|
+
getInitialState: () => _zayne_labs_toolkit_core1.URLInfoObject;
|
|
217
|
+
getListeners: () => Set<(state: _zayne_labs_toolkit_core1.URLInfoObject, prevState: _zayne_labs_toolkit_core1.URLInfoObject) => void>;
|
|
218
|
+
getState: () => _zayne_labs_toolkit_core1.URLInfoObject;
|
|
219
219
|
resetState: () => void;
|
|
220
220
|
setState: {
|
|
221
|
-
(stateUpdate: Partial<
|
|
222
|
-
onNotifySync?: ((previousState:
|
|
223
|
-
onNotifyViaBatch?: ((previousStateSnapshot:
|
|
221
|
+
(stateUpdate: Partial<_zayne_labs_toolkit_core1.URLInfoObject> | ((prevState: _zayne_labs_toolkit_core1.URLInfoObject) => Partial<_zayne_labs_toolkit_core1.URLInfoObject>), options?: ({
|
|
222
|
+
onNotifySync?: ((previousState: _zayne_labs_toolkit_core1.URLInfoObject) => void) | undefined;
|
|
223
|
+
onNotifyViaBatch?: ((previousStateSnapshot: _zayne_labs_toolkit_core1.URLInfoObject) => void) | undefined;
|
|
224
224
|
shouldNotifySync?: boolean | undefined;
|
|
225
225
|
} & {
|
|
226
226
|
shouldReplace?: false;
|
|
227
227
|
}) | undefined): void;
|
|
228
|
-
(stateUpdate:
|
|
229
|
-
onNotifySync?: ((previousState:
|
|
230
|
-
onNotifyViaBatch?: ((previousStateSnapshot:
|
|
228
|
+
(stateUpdate: _zayne_labs_toolkit_core1.URLInfoObject | ((prevState: _zayne_labs_toolkit_core1.URLInfoObject) => _zayne_labs_toolkit_core1.URLInfoObject), options?: ({
|
|
229
|
+
onNotifySync?: ((previousState: _zayne_labs_toolkit_core1.URLInfoObject) => void) | undefined;
|
|
230
|
+
onNotifyViaBatch?: ((previousStateSnapshot: _zayne_labs_toolkit_core1.URLInfoObject) => void) | undefined;
|
|
231
231
|
shouldNotifySync?: boolean | undefined;
|
|
232
232
|
} & {
|
|
233
233
|
shouldReplace: true;
|
|
234
234
|
}) | undefined): void;
|
|
235
235
|
};
|
|
236
|
-
subscribe:
|
|
236
|
+
subscribe: _zayne_labs_toolkit_core1.SubscribeFn<_zayne_labs_toolkit_core1.URLInfoObject>;
|
|
237
237
|
}, "resetState" | "setState"> & {
|
|
238
|
-
push: (newURL: string |
|
|
238
|
+
push: (newURL: string | _zayne_labs_toolkit_core1.PartialURLInfo, options?: {
|
|
239
239
|
shouldNotifySync?: boolean;
|
|
240
|
-
state?:
|
|
240
|
+
state?: _zayne_labs_toolkit_core1.PartialURLInfo["state"];
|
|
241
241
|
}) => void;
|
|
242
242
|
replace: LocationStoreApi["push"];
|
|
243
243
|
triggerPopstateEvent: (nextLocationState?: LocationStoreInfo["state"]) => void;
|
|
244
|
-
} & (<TSlice =
|
|
244
|
+
} & (<TSlice = _zayne_labs_toolkit_core1.URLInfoObject>(selector?: SelectorFn<LocationStoreInfo, TSlice>) => UseLocationResult<TSlice>);
|
|
245
245
|
declare const useLocationState: <TSlice = LocationStoreInfo>(selector?: SelectorFn<LocationStoreInfo, TSlice>, options?: LocationStoreOptions) => UseLocationResult<TSlice>;
|
|
246
246
|
//#endregion
|
|
247
247
|
//#region src/hooks/useScrollObserver.d.ts
|
|
@@ -264,8 +264,8 @@ type UseSearchParamsOptions<TSearchParams extends URLSearchParamsInit> = Omit<Lo
|
|
|
264
264
|
action?: "push" | "replace";
|
|
265
265
|
defaultValues?: TSearchParams;
|
|
266
266
|
};
|
|
267
|
-
declare const useSearchParams: <TSearchParams extends URLSearchParamsInit>(options?: UseSearchParamsOptions<TSearchParams>) => [searchParams: URLSearchParams, setSearchParams: (newQueryParams: TSearchParams | ((prev: URLSearchParams) => TSearchParams)) => void, triggerPopstateEvent: (nextLocationState?:
|
|
268
|
-
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?:
|
|
267
|
+
declare const useSearchParams: <TSearchParams extends URLSearchParamsInit>(options?: UseSearchParamsOptions<TSearchParams>) => [searchParams: URLSearchParams, setSearchParams: (newQueryParams: TSearchParams | ((prev: URLSearchParams) => TSearchParams)) => void, triggerPopstateEvent: (nextLocationState?: _zayne_labs_toolkit_core1.LocationStoreInfo["state"]) => void];
|
|
268
|
+
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_core1.LocationStoreInfo["state"]) => void];
|
|
269
269
|
//#endregion
|
|
270
270
|
//#region src/hooks/useCompare.d.ts
|
|
271
271
|
type UseCompareSelectorOptions = {
|
|
@@ -302,7 +302,7 @@ declare const createUseStorageState: <TState>(baseOptions: StorageOptions<TState
|
|
|
302
302
|
shouldReplace: true;
|
|
303
303
|
}) | undefined): void;
|
|
304
304
|
};
|
|
305
|
-
subscribe:
|
|
305
|
+
subscribe: _zayne_labs_toolkit_core1.SubscribeFn<TState>;
|
|
306
306
|
}, "setState"> & {
|
|
307
307
|
removeState: () => void;
|
|
308
308
|
setState: {
|
|
@@ -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-FF_az23J.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { L as CustomContextOptions } from "./index-
|
|
1
|
+
import { L as CustomContextOptions } from "./index-FF_az23J.js";
|
|
2
2
|
import * as react10 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-CJwxCSV-.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../../index-
|
|
1
|
+
import "../../index-FF_az23J.js";
|
|
2
2
|
import "../../index-B08DS8-6.js";
|
|
3
|
-
import { n as UseBoundStore, r as createReactStoreContext, t as Get } from "../../types-
|
|
3
|
+
import { n as UseBoundStore, r as createReactStoreContext, t as Get } from "../../types-CJwxCSV-.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-
|
|
1
|
+
import "../index-FF_az23J.js";
|
|
2
2
|
import "../index-B08DS8-6.js";
|
|
3
|
-
import { n as UseBoundStore, r as createReactStoreContext } from "../types-
|
|
3
|
+
import { n as UseBoundStore, r as createReactStoreContext } from "../types-CJwxCSV-.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.34",
|
|
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.34",
|
|
53
|
+
"@zayne-labs/toolkit-type-helpers": "0.12.34"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@arethetypeswrong/cli": "^0.18.2",
|