mirror of
https://github.com/SableClient/Sable.git
synced 2026-12-05 08:12:22 -08:00
refactor: use jotai-family atomFamily
This commit is contained in:
7 files changed
+19
-5
No files matched your search
@@ -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",
|
||||
|
||||
Generated
+13
@@ -134,6 +134,9 @@ importers:
|
||||
jotai:
|
||||
specifier: ^2.19.0
|
||||
version: 2.19.0(@babel/[email protected])(@babel/[email protected])(@types/[email protected])([email protected])
|
||||
jotai-family:
|
||||
specifier: ^1.0.1
|
||||
version: 1.0.1([email protected](@babel/[email protected])(@babel/[email protected])(@types/[email protected])([email protected]))
|
||||
linkify-react:
|
||||
specifier: ^4.3.2
|
||||
version: 4.3.2([email protected])([email protected])
|
||||
@@ -4192,6 +4195,12 @@ packages:
|
||||
resolution: {integrity: sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==}
|
||||
hasBin: true
|
||||
|
||||
[email protected]:
|
||||
resolution: {integrity: sha512-Zb/79GNDhC/z82R+6qTTpeKW4l4H6ZCApfF5W8G4SH37E4mhbysU7r8DkP0KX94hWvjB/6lt/97nSr3wB+64Zg==}
|
||||
engines: {node: '>=12.20.0'}
|
||||
peerDependencies:
|
||||
jotai: '>=2.9.0'
|
||||
|
||||
[email protected]:
|
||||
resolution: {integrity: sha512-r2wwxEXP1F2JteDLZEOPoIpAHhV89paKsN5GWVYndPNMMP/uVZDcC+fNj0A8NjKgaPWzdyO8Vp8YcYKe0uCEqQ==}
|
||||
engines: {node: '>=12.20.0'}
|
||||
@@ -10070,6 +10079,10 @@ snapshots:
|
||||
|
||||
[email protected]: {}
|
||||
|
||||
[email protected]([email protected](@babel/[email protected])(@babel/[email protected])(@types/[email protected])([email protected])):
|
||||
dependencies:
|
||||
jotai: 2.19.0(@babel/[email protected])(@babel/[email protected])(@types/[email protected])([email protected])
|
||||
|
||||
[email protected](@babel/[email protected])(@babel/[email protected])(@types/[email protected])([email protected]):
|
||||
optionalDependencies:
|
||||
'@babel/core': 7.29.0
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { atom } from 'jotai';
|
||||
import { atomFamily } from 'jotai/utils';
|
||||
import { atomFamily } from 'jotai-family';
|
||||
|
||||
const createOpenThreadAtom = () => atom<string | undefined>(undefined);
|
||||
export type TOpenThreadAtom = ReturnType<typeof createOpenThreadAtom>;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { atom } from 'jotai';
|
||||
import { atomFamily } from 'jotai/utils';
|
||||
import { atomFamily } from 'jotai-family';
|
||||
|
||||
const createThreadBrowserAtom = () => atom<boolean>(false);
|
||||
export type TThreadBrowserAtom = ReturnType<typeof createThreadBrowserAtom>;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { atom } from 'jotai';
|
||||
import { atomFamily } from 'jotai/utils';
|
||||
import { atomFamily } from 'jotai-family';
|
||||
|
||||
export const delayedEventsSupportedAtom = atom<boolean>(false);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { atom, useAtom } from 'jotai';
|
||||
import { atomFamily } from 'jotai/utils';
|
||||
import { atomFamily } from 'jotai-family';
|
||||
import {
|
||||
type MatrixClient,
|
||||
type UploadResponse,
|
||||
|
||||
Reference in new issue
Block a user