atom.io 0.34.2 → 0.35.0
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/dist/internal/index.d.ts +32 -41
- package/dist/internal/index.d.ts.map +1 -1
- package/dist/internal/index.js +106 -128
- package/dist/internal/index.js.map +1 -1
- package/dist/json/index.d.ts +7 -7
- package/dist/json/index.js +2 -2
- package/dist/json/index.js.map +1 -1
- package/dist/main/index.d.ts +779 -886
- package/dist/main/index.d.ts.map +1 -1
- package/dist/main/index.js +46 -14
- package/dist/main/index.js.map +1 -1
- package/dist/react-devtools/index.js +10 -10
- package/dist/react-devtools/index.js.map +1 -1
- package/dist/realtime/index.d.ts.map +1 -1
- package/dist/realtime/index.js +3 -5
- package/dist/realtime/index.js.map +1 -1
- package/dist/realtime-client/index.js +10 -10
- package/dist/realtime-client/index.js.map +1 -1
- package/dist/realtime-server/index.d.ts.map +1 -1
- package/dist/realtime-server/index.js +8 -10
- package/dist/realtime-server/index.js.map +1 -1
- package/package.json +4 -4
- package/src/internal/atom/create-regular-atom.ts +1 -0
- package/src/internal/atom/index.ts +0 -1
- package/src/internal/families/index.ts +0 -1
- package/src/internal/index.ts +111 -89
- package/src/internal/join/join-internal.ts +3 -4
- package/src/internal/mutable/create-mutable-atom-family.ts +0 -1
- package/src/internal/mutable/create-mutable-atom.ts +1 -1
- package/src/internal/selector/register-selector.ts +2 -2
- package/src/json/entries.ts +7 -7
- package/src/main/atom.ts +67 -114
- package/src/main/dispose-state.ts +0 -2
- package/src/main/find-state.ts +3 -9
- package/src/main/get-state.ts +0 -2
- package/src/main/index.ts +1 -176
- package/src/main/join.ts +0 -7
- package/src/main/reset-state.ts +0 -2
- package/src/main/selector.ts +5 -72
- package/src/main/set-state.ts +1 -4
- package/src/main/silo.ts +14 -5
- package/src/main/subscribe.ts +0 -7
- package/src/main/timeline.ts +1 -18
- package/src/main/tokens.ts +247 -0
- package/src/main/transaction.ts +17 -55
- package/src/main/validators.ts +1 -1
- package/src/react-devtools/store.ts +61 -45
- package/src/realtime/shared-room-store.ts +3 -5
- package/src/realtime-server/realtime-server-stores/server-user-store.ts +3 -5
- package/src/internal/atom/create-standalone-atom.ts +0 -39
- package/src/internal/families/create-atom-family.ts +0 -38
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
AtomToken,
|
|
3
|
-
MutableAtomOptions,
|
|
4
|
-
MutableAtomToken,
|
|
5
|
-
RegularAtomOptions,
|
|
6
|
-
RegularAtomToken,
|
|
7
|
-
} from "atom.io"
|
|
8
|
-
import type { Json } from "atom.io/json"
|
|
9
|
-
|
|
10
|
-
import type { Transceiver } from "../mutable"
|
|
11
|
-
import { createMutableAtom } from "../mutable"
|
|
12
|
-
import type { Store } from "../store"
|
|
13
|
-
import { createRegularAtom } from "./create-regular-atom"
|
|
14
|
-
|
|
15
|
-
export function createStandaloneAtom<T>(
|
|
16
|
-
store: Store,
|
|
17
|
-
options: RegularAtomOptions<T>,
|
|
18
|
-
): RegularAtomToken<T>
|
|
19
|
-
|
|
20
|
-
export function createStandaloneAtom<
|
|
21
|
-
T extends Transceiver<any>,
|
|
22
|
-
J extends Json.Serializable,
|
|
23
|
-
>(store: Store, options: MutableAtomOptions<T, J>): MutableAtomToken<T, J>
|
|
24
|
-
|
|
25
|
-
export function createStandaloneAtom<T>(
|
|
26
|
-
store: Store,
|
|
27
|
-
options: MutableAtomOptions<any, any> | RegularAtomOptions<T>,
|
|
28
|
-
): AtomToken<T> {
|
|
29
|
-
const isMutable = `mutable` in options
|
|
30
|
-
|
|
31
|
-
if (isMutable) {
|
|
32
|
-
const state = createMutableAtom(store, options, undefined)
|
|
33
|
-
store.on.atomCreation.next(state)
|
|
34
|
-
return state
|
|
35
|
-
}
|
|
36
|
-
const state = createRegularAtom(store, options, undefined)
|
|
37
|
-
store.on.atomCreation.next(state)
|
|
38
|
-
return state
|
|
39
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
AtomFamilyToken,
|
|
3
|
-
MutableAtomFamilyOptions,
|
|
4
|
-
MutableAtomFamilyToken,
|
|
5
|
-
RegularAtomFamilyOptions,
|
|
6
|
-
RegularAtomFamilyToken,
|
|
7
|
-
} from "atom.io"
|
|
8
|
-
import type { Canonical, Json } from "atom.io/json"
|
|
9
|
-
|
|
10
|
-
import { createMutableAtomFamily, type Transceiver } from "../mutable"
|
|
11
|
-
import type { Store } from "../store"
|
|
12
|
-
import { createRegularAtomFamily } from "./create-regular-atom-family"
|
|
13
|
-
|
|
14
|
-
export function createAtomFamily<
|
|
15
|
-
T extends Transceiver<any>,
|
|
16
|
-
J extends Json.Serializable,
|
|
17
|
-
K extends Canonical,
|
|
18
|
-
>(
|
|
19
|
-
store: Store,
|
|
20
|
-
options: MutableAtomFamilyOptions<T, J, K>,
|
|
21
|
-
): MutableAtomFamilyToken<T, J, K>
|
|
22
|
-
export function createAtomFamily<T, K extends Canonical>(
|
|
23
|
-
store: Store,
|
|
24
|
-
options: RegularAtomFamilyOptions<T, K>,
|
|
25
|
-
): RegularAtomFamilyToken<T, K>
|
|
26
|
-
export function createAtomFamily<T, K extends Canonical>(
|
|
27
|
-
store: Store,
|
|
28
|
-
options:
|
|
29
|
-
| MutableAtomFamilyOptions<any, any, any>
|
|
30
|
-
| RegularAtomFamilyOptions<T, K>,
|
|
31
|
-
): AtomFamilyToken<any, any> {
|
|
32
|
-
const isMutable = `mutable` in options
|
|
33
|
-
|
|
34
|
-
if (isMutable) {
|
|
35
|
-
return createMutableAtomFamily(store, options)
|
|
36
|
-
}
|
|
37
|
-
return createRegularAtomFamily<T, K>(store, options)
|
|
38
|
-
}
|