@dxos/react-hooks 0.8.4-main.406dc2a → 0.8.4-main.548089c

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/react-hooks",
3
- "version": "0.8.4-main.406dc2a",
3
+ "version": "0.8.4-main.548089c",
4
4
  "description": "React hooks supporting DXOS React primitives.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -29,13 +29,13 @@
29
29
  "alea": "^1.0.1",
30
30
  "lodash.defaultsdeep": "^4.6.1",
31
31
  "mini-virtual-list": "^0.3.2",
32
- "@dxos/async": "0.8.4-main.406dc2a",
33
- "@dxos/log": "0.8.4-main.406dc2a"
32
+ "@dxos/async": "0.8.4-main.548089c",
33
+ "@dxos/log": "0.8.4-main.548089c"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/lodash.defaultsdeep": "^4.6.6",
37
37
  "@types/react": "~19.2.2",
38
- "@types/react-dom": "~19.2.1",
38
+ "@types/react-dom": "~19.2.2",
39
39
  "react": "~19.2.0",
40
40
  "react-dom": "~19.2.0"
41
41
  },
@@ -3,12 +3,12 @@
3
3
  //
4
4
 
5
5
  import { useCallback } from '@preact-signals/safe-react/react';
6
- import { type Dispatch, type MutableRefObject, type SetStateAction, useEffect, useRef, useState } from 'react';
6
+ import { type Dispatch, type RefObject, type SetStateAction, useEffect, useRef, useState } from 'react';
7
7
 
8
8
  /**
9
9
  * Like `useState` but with an additional dynamic value.
10
10
  */
11
- export const useStateWithRef = <T>(valueParam: T): [T, Dispatch<SetStateAction<T>>, MutableRefObject<T>] => {
11
+ export const useStateWithRef = <T>(valueParam: T): [T, Dispatch<SetStateAction<T>>, RefObject<T>] => {
12
12
  const [value, setValue] = useState<T>(valueParam);
13
13
  const valueRef = useRef<T>(valueParam);
14
14
  const setter = useCallback<Dispatch<SetStateAction<T>>>((value) => {
@@ -29,7 +29,7 @@ export const useStateWithRef = <T>(valueParam: T): [T, Dispatch<SetStateAction<T
29
29
  /**
30
30
  * Ref that is updated by a dependency.
31
31
  */
32
- export const useDynamicRef = <T>(value: T): MutableRefObject<T> => {
32
+ export const useDynamicRef = <T>(value: T): RefObject<T> => {
33
33
  const valueRef = useRef<T>(value);
34
34
  useEffect(() => {
35
35
  valueRef.current = value;