@trackunit/react-core-hooks 1.3.152 → 1.3.154

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/index.cjs.js CHANGED
@@ -497,7 +497,7 @@ const useLocalStorageEffect = ({ key, state, defaultState, schema, onValidationF
497
497
  */
498
498
  const useLocalStorage = ({ key, defaultState, schema, onValidationFailed, onValidationSuccessful, }) => {
499
499
  if (!key) {
500
- throw new Error("useLocalStorage key may not be falsy");
500
+ throw new Error("useLocalStorage key must be defined");
501
501
  }
502
502
  const [state, setState] = react.useState(initLocalStorageState({ key, defaultState, schema }));
503
503
  const prevKey = usePrevious(key);
package/index.esm.js CHANGED
@@ -495,7 +495,7 @@ const useLocalStorageEffect = ({ key, state, defaultState, schema, onValidationF
495
495
  */
496
496
  const useLocalStorage = ({ key, defaultState, schema, onValidationFailed, onValidationSuccessful, }) => {
497
497
  if (!key) {
498
- throw new Error("useLocalStorage key may not be falsy");
498
+ throw new Error("useLocalStorage key must be defined");
499
499
  }
500
500
  const [state, setState] = useState(initLocalStorageState({ key, defaultState, schema }));
501
501
  const prevKey = usePrevious(key);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-core-hooks",
3
- "version": "1.3.152",
3
+ "version": "1.3.154",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -10,11 +10,11 @@
10
10
  "react": "19.0.0",
11
11
  "jest-fetch-mock": "^3.0.3",
12
12
  "zod": "3.23.4",
13
- "@trackunit/react-core-contexts-api": "1.4.147",
14
- "@trackunit/iris-app-runtime-core": "1.4.150",
15
- "@trackunit/shared-utils": "1.5.140",
13
+ "@trackunit/react-core-contexts-api": "1.4.148",
14
+ "@trackunit/iris-app-runtime-core": "1.4.151",
15
+ "@trackunit/shared-utils": "1.5.141",
16
16
  "@tanstack/react-router": "1.114.29",
17
- "@trackunit/react-test-setup": "1.0.30"
17
+ "@trackunit/react-test-setup": "1.0.31"
18
18
  },
19
19
  "module": "./index.esm.js",
20
20
  "main": "./index.cjs.js",
@@ -10,4 +10,4 @@ import { Dispatch } from "react";
10
10
  * @example
11
11
  * const [result, searchText, setSearchText] = useTextSearch(items, item => [item.name, item.description]);
12
12
  */
13
- export declare function useTextSearch<TSearchableItem>(items: TSearchableItem[], props: (item: TSearchableItem) => (Maybe<string> | undefined)[]): [TSearchableItem[], string, Dispatch<string>];
13
+ export declare function useTextSearch<TSearchableItem>(items: Array<TSearchableItem>, props: (item: TSearchableItem) => Array<Maybe<string> | undefined>): [Array<TSearchableItem>, string, Dispatch<string>];