diff --git a/package.json b/package.json index e4cd0b39f..78bf0c905 100644 --- a/package.json +++ b/package.json @@ -73,6 +73,7 @@ "immer": "^9.0.21", "is-hotkey": "^0.2.0", "jotai": "^2.19.0", + "jotai-family": "^1.0.1", "linkify-react": "^4.3.2", "linkifyjs": "^4.3.2", "matrix-js-sdk": "^38.4.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b70c88fc2..1bf462b1f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -134,6 +134,9 @@ importers: jotai: specifier: ^2.19.0 version: 2.19.0(@babel/core@7.29.0)(@babel/template@7.28.6)(@types/react@18.3.28)(react@18.3.1) + jotai-family: + specifier: ^1.0.1 + version: 1.0.1(jotai@2.19.0(@babel/core@7.29.0)(@babel/template@7.28.6)(@types/react@18.3.28)(react@18.3.1)) linkify-react: specifier: ^4.3.2 version: 4.3.2(linkifyjs@4.3.2)(react@18.3.1) @@ -4192,6 +4195,12 @@ packages: resolution: {integrity: sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==} hasBin: true + jotai-family@1.0.1: + resolution: {integrity: sha512-Zb/79GNDhC/z82R+6qTTpeKW4l4H6ZCApfF5W8G4SH37E4mhbysU7r8DkP0KX94hWvjB/6lt/97nSr3wB+64Zg==} + engines: {node: '>=12.20.0'} + peerDependencies: + jotai: '>=2.9.0' + jotai@2.19.0: resolution: {integrity: sha512-r2wwxEXP1F2JteDLZEOPoIpAHhV89paKsN5GWVYndPNMMP/uVZDcC+fNj0A8NjKgaPWzdyO8Vp8YcYKe0uCEqQ==} engines: {node: '>=12.20.0'} @@ -10070,6 +10079,10 @@ snapshots: jiti@2.6.1: {} + jotai-family@1.0.1(jotai@2.19.0(@babel/core@7.29.0)(@babel/template@7.28.6)(@types/react@18.3.28)(react@18.3.1)): + dependencies: + jotai: 2.19.0(@babel/core@7.29.0)(@babel/template@7.28.6)(@types/react@18.3.28)(react@18.3.1) + jotai@2.19.0(@babel/core@7.29.0)(@babel/template@7.28.6)(@types/react@18.3.28)(react@18.3.1): optionalDependencies: '@babel/core': 7.29.0 diff --git a/src/app/state/room/roomInputDrafts.ts b/src/app/state/room/roomInputDrafts.ts index 852c84ac2..9aa9667bf 100644 --- a/src/app/state/room/roomInputDrafts.ts +++ b/src/app/state/room/roomInputDrafts.ts @@ -1,5 +1,5 @@ import { atom } from 'jotai'; -import { atomFamily } from 'jotai/utils'; +import { atomFamily } from 'jotai-family'; import { type Descendant } from 'slate'; import { type EncryptedAttachmentInfo } from 'browser-encrypt-attachment'; import { type IEventRelation } from '$types/matrix-sdk'; diff --git a/src/app/state/room/roomToOpenThread.ts b/src/app/state/room/roomToOpenThread.ts index 0a60fa4a7..c177cf0b5 100644 --- a/src/app/state/room/roomToOpenThread.ts +++ b/src/app/state/room/roomToOpenThread.ts @@ -1,5 +1,5 @@ import { atom } from 'jotai'; -import { atomFamily } from 'jotai/utils'; +import { atomFamily } from 'jotai-family'; const createOpenThreadAtom = () => atom(undefined); export type TOpenThreadAtom = ReturnType; diff --git a/src/app/state/room/roomToThreadBrowser.ts b/src/app/state/room/roomToThreadBrowser.ts index 3d8963165..91b7f1b77 100644 --- a/src/app/state/room/roomToThreadBrowser.ts +++ b/src/app/state/room/roomToThreadBrowser.ts @@ -1,5 +1,5 @@ import { atom } from 'jotai'; -import { atomFamily } from 'jotai/utils'; +import { atomFamily } from 'jotai-family'; const createThreadBrowserAtom = () => atom(false); export type TThreadBrowserAtom = ReturnType; diff --git a/src/app/state/scheduledMessages.ts b/src/app/state/scheduledMessages.ts index ba28b60eb..3bb0dd172 100644 --- a/src/app/state/scheduledMessages.ts +++ b/src/app/state/scheduledMessages.ts @@ -1,5 +1,5 @@ import { atom } from 'jotai'; -import { atomFamily } from 'jotai/utils'; +import { atomFamily } from 'jotai-family'; export const delayedEventsSupportedAtom = atom(false); diff --git a/src/app/state/upload.ts b/src/app/state/upload.ts index 125db34f2..2179ee360 100644 --- a/src/app/state/upload.ts +++ b/src/app/state/upload.ts @@ -1,5 +1,5 @@ import { atom, useAtom } from 'jotai'; -import { atomFamily } from 'jotai/utils'; +import { atomFamily } from 'jotai-family'; import { type MatrixClient, type UploadResponse,