atom.io 0.28.0 → 0.28.1
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/{chunk-BX3MTH2Z.js → chunk-6WL4RQMQ.js} +0 -6
- package/dist/{chunk-EUVKUTW3.js → chunk-YQ46F5O2.js} +8 -2
- package/internal/dist/index.js +1 -1
- package/internal/src/families/dispose-from-store.ts +0 -6
- package/json/dist/index.js +2 -2
- package/json/src/index.ts +7 -1
- package/package.json +2 -2
- package/react-devtools/dist/index.js +2 -2
- package/react-devtools/src/StateIndex.tsx +3 -2
- package/react-devtools/src/Updates.tsx +2 -0
- package/realtime/src/realtime-continuity.ts +3 -2
- package/realtime-client/src/pull-atom-family-member.ts +2 -0
- package/realtime-client/src/pull-mutable-atom-family-member.ts +2 -0
- package/realtime-client/src/pull-selector-family-member.ts +2 -0
- package/realtime-server/src/ipc-sockets/child-socket.ts +2 -0
- package/realtime-testing/src/setup-realtime-test.tsx +2 -0
- package/src/logger.ts +1 -0
- package/transceivers/set-rtx/src/set-rtx.ts +1 -0
|
@@ -1353,11 +1353,6 @@ function disposeFromStore(store, ...params) {
|
|
|
1353
1353
|
const disposal = store.disposalTraces.buffer.find(
|
|
1354
1354
|
(item) => item?.key === token.key
|
|
1355
1355
|
);
|
|
1356
|
-
console.log(
|
|
1357
|
-
`seeking disposal trace for`,
|
|
1358
|
-
token,
|
|
1359
|
-
store.disposalTraces.buffer.filter(Boolean)
|
|
1360
|
-
);
|
|
1361
1356
|
store.logger.error(
|
|
1362
1357
|
`\u274C`,
|
|
1363
1358
|
token.type,
|
|
@@ -1388,7 +1383,6 @@ ${disposal.trace}` : `No previous disposal trace was found.`
|
|
|
1388
1383
|
`)?.slice(3)?.join(`
|
|
1389
1384
|
`);
|
|
1390
1385
|
store.disposalTraces.add({ key: token.key, trace });
|
|
1391
|
-
console.log(`added`, token);
|
|
1392
1386
|
}
|
|
1393
1387
|
}
|
|
1394
1388
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createWritableSelectorFamily } from './chunk-
|
|
1
|
+
import { createWritableSelectorFamily } from './chunk-6WL4RQMQ.js';
|
|
2
2
|
import { createStandaloneSelector, IMPLICIT, growMoleculeInStore, initFamilyMemberInStore, withdraw, seekInStore } from 'atom.io/internal';
|
|
3
3
|
|
|
4
4
|
// json/src/entries.ts
|
|
@@ -78,7 +78,13 @@ function selectJsonFamily(atomFamilyToken, transform, store = IMPLICIT.STORE) {
|
|
|
78
78
|
// json/src/index.ts
|
|
79
79
|
var parseJson = (str) => JSON.parse(str);
|
|
80
80
|
var stringifyJson = (json) => JSON.stringify(json);
|
|
81
|
-
var JSON_PROTOTYPES = [
|
|
81
|
+
var JSON_PROTOTYPES = [
|
|
82
|
+
Array.prototype,
|
|
83
|
+
Boolean.prototype,
|
|
84
|
+
Number.prototype,
|
|
85
|
+
Object.prototype,
|
|
86
|
+
String.prototype
|
|
87
|
+
];
|
|
82
88
|
var isJson = (input) => {
|
|
83
89
|
if (input === null) return true;
|
|
84
90
|
if (input === void 0) return false;
|
package/internal/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { FAMILY_MEMBER_TOKEN_TYPES, FamilyTracker, Future, IMPLICIT, LazyMap, Molecule, NotFoundError, StatefulSubject, Store, Subject, TRANSACTION_PHASES, Tracker, abortTransaction, actUponStore, applyTransaction, arbitrary, assignTransactionToContinuity, become, buildTransaction, cacheValue, clearStore, closeOperation, counterfeit, createAtomFamily, createMoleculeFamily, createMutableAtom, createMutableAtomFamily, createReadonlySelector, createReadonlySelectorFamily, createRegularAtom, createRegularAtomFamily, createSelectorFamily, createStandaloneAtom, createStandaloneSelector, createTimeline, createTransaction, createWritableSelector, deposit, disposeAtom, disposeFromStore, disposeMolecule, disposeSelector, eldest, evictCachedValue, findInStore, getContinuityKey, getEnvironmentData, getEpochNumberOfAction, getEpochNumberOfContinuity, getFromStore, getJsonFamily, getJsonToken, getSelectorDependencyKeys, getUpdateFamily, getUpdateToken, growMoleculeInStore, ingestAtomUpdate, ingestCreationEvent, ingestDisposalEvent, ingestMoleculeCreationEvent, ingestMoleculeDisposalEvent, ingestSelectorUpdate, ingestTransactionUpdate, initFamilyMemberInStore, isAtomDefault, isAtomKey, isChildStore, isDone, isReadonlySelectorKey, isRootStore, isSelectorKey, isStateKey, isTransceiver, makeMoleculeInStore, markAtomAsDefault, markAtomAsNotDefault, markDone, newest, openOperation, prettyPrintTokenType, readCachedValue, readOrComputeValue, recallState, registerSelector, seekInStore, setAtomOrSelector, setEpochNumberOfAction, setEpochNumberOfContinuity, setIntoStore, subscribeInStore, subscribeToRootAtoms, subscribeToState, subscribeToTimeline, subscribeToTransaction, timeTravel, traceAllSelectorAtoms, traceSelectorAtoms, updateSelectorAtoms, withdraw } from '../../dist/chunk-
|
|
1
|
+
export { FAMILY_MEMBER_TOKEN_TYPES, FamilyTracker, Future, IMPLICIT, LazyMap, Molecule, NotFoundError, StatefulSubject, Store, Subject, TRANSACTION_PHASES, Tracker, abortTransaction, actUponStore, applyTransaction, arbitrary, assignTransactionToContinuity, become, buildTransaction, cacheValue, clearStore, closeOperation, counterfeit, createAtomFamily, createMoleculeFamily, createMutableAtom, createMutableAtomFamily, createReadonlySelector, createReadonlySelectorFamily, createRegularAtom, createRegularAtomFamily, createSelectorFamily, createStandaloneAtom, createStandaloneSelector, createTimeline, createTransaction, createWritableSelector, deposit, disposeAtom, disposeFromStore, disposeMolecule, disposeSelector, eldest, evictCachedValue, findInStore, getContinuityKey, getEnvironmentData, getEpochNumberOfAction, getEpochNumberOfContinuity, getFromStore, getJsonFamily, getJsonToken, getSelectorDependencyKeys, getUpdateFamily, getUpdateToken, growMoleculeInStore, ingestAtomUpdate, ingestCreationEvent, ingestDisposalEvent, ingestMoleculeCreationEvent, ingestMoleculeDisposalEvent, ingestSelectorUpdate, ingestTransactionUpdate, initFamilyMemberInStore, isAtomDefault, isAtomKey, isChildStore, isDone, isReadonlySelectorKey, isRootStore, isSelectorKey, isStateKey, isTransceiver, makeMoleculeInStore, markAtomAsDefault, markAtomAsNotDefault, markDone, newest, openOperation, prettyPrintTokenType, readCachedValue, readOrComputeValue, recallState, registerSelector, seekInStore, setAtomOrSelector, setEpochNumberOfAction, setEpochNumberOfContinuity, setIntoStore, subscribeInStore, subscribeToRootAtoms, subscribeToState, subscribeToTimeline, subscribeToTransaction, timeTravel, traceAllSelectorAtoms, traceSelectorAtoms, updateSelectorAtoms, withdraw } from '../../dist/chunk-6WL4RQMQ.js';
|
|
2
2
|
import '../../dist/chunk-IBTHB2PI.js';
|
|
3
3
|
import '../../dist/chunk-XWL6SNVU.js';
|
|
@@ -59,11 +59,6 @@ export function disposeFromStore(
|
|
|
59
59
|
const disposal = store.disposalTraces.buffer.find(
|
|
60
60
|
(item) => item?.key === token.key,
|
|
61
61
|
)
|
|
62
|
-
console.log(
|
|
63
|
-
`seeking disposal trace for`,
|
|
64
|
-
token,
|
|
65
|
-
store.disposalTraces.buffer.filter(Boolean),
|
|
66
|
-
)
|
|
67
62
|
store.logger.error(
|
|
68
63
|
`❌`,
|
|
69
64
|
token.type,
|
|
@@ -93,6 +88,5 @@ export function disposeFromStore(
|
|
|
93
88
|
if (stack) {
|
|
94
89
|
const trace = stack?.split(`\n`)?.slice(3)?.join(`\n`)
|
|
95
90
|
store.disposalTraces.add({ key: token.key, trace })
|
|
96
|
-
console.log(`added`, token)
|
|
97
91
|
}
|
|
98
92
|
}
|
package/json/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { fromEntries, isJson, parseJson, selectJson, selectJsonFamily, stringifyJson, toEntries } from '../../dist/chunk-
|
|
2
|
-
import '../../dist/chunk-
|
|
1
|
+
export { fromEntries, isJson, parseJson, selectJson, selectJsonFamily, stringifyJson, toEntries } from '../../dist/chunk-YQ46F5O2.js';
|
|
2
|
+
import '../../dist/chunk-6WL4RQMQ.js';
|
|
3
3
|
import '../../dist/chunk-IBTHB2PI.js';
|
|
4
4
|
import '../../dist/chunk-XWL6SNVU.js';
|
package/json/src/index.ts
CHANGED
|
@@ -46,7 +46,13 @@ export type JsonInterface<T, J extends Json.Serializable = Json.Serializable> =
|
|
|
46
46
|
fromJson: (json: J) => T
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
const JSON_PROTOTYPES = [
|
|
49
|
+
const JSON_PROTOTYPES = [
|
|
50
|
+
Array.prototype,
|
|
51
|
+
Boolean.prototype,
|
|
52
|
+
Number.prototype,
|
|
53
|
+
Object.prototype,
|
|
54
|
+
String.prototype,
|
|
55
|
+
] as const
|
|
50
56
|
export const isJson = (input: unknown): input is Json.Tree.Node => {
|
|
51
57
|
if (input === null) return true
|
|
52
58
|
if (input === undefined) return false
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "atom.io",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.1",
|
|
4
4
|
"description": "Composable and testable reactive data library.",
|
|
5
5
|
"homepage": "https://atom.io.fyi",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"@vitest/coverage-v8": "2.0.5",
|
|
65
65
|
"@vitest/ui": "2.0.5",
|
|
66
66
|
"concurrently": "8.2.2",
|
|
67
|
-
"drizzle-kit": "0.24.
|
|
67
|
+
"drizzle-kit": "0.24.1",
|
|
68
68
|
"drizzle-orm": "0.33.0",
|
|
69
69
|
"eslint": "9.9.0",
|
|
70
70
|
"framer-motion": "11.3.29",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { pipe, ifDefined, isArray, isRecord, doesExtend, jsonRefinery, doNothing, isPlainObject, become, mapObject, delve } from '../../dist/chunk-D52JNVER.js';
|
|
2
|
-
import { isJson as isJson$1 } from '../../dist/chunk-
|
|
3
|
-
import '../../dist/chunk-
|
|
2
|
+
import { isJson as isJson$1 } from '../../dist/chunk-YQ46F5O2.js';
|
|
3
|
+
import '../../dist/chunk-6WL4RQMQ.js';
|
|
4
4
|
import '../../dist/chunk-IBTHB2PI.js';
|
|
5
5
|
import '../../dist/chunk-XWL6SNVU.js';
|
|
6
6
|
import { useI, useO } from 'atom.io/react';
|
|
@@ -3,11 +3,10 @@ import type {
|
|
|
3
3
|
ReadonlySelectorToken,
|
|
4
4
|
RegularAtomToken,
|
|
5
5
|
} from "atom.io"
|
|
6
|
-
import { getState
|
|
6
|
+
import { getState } from "atom.io"
|
|
7
7
|
import { findState } from "atom.io/ephemeral"
|
|
8
8
|
import type { FamilyNode, WritableTokenIndex } from "atom.io/introspection"
|
|
9
9
|
import { primitiveRefinery } from "atom.io/introspection"
|
|
10
|
-
import type { Canonical } from "atom.io/json"
|
|
11
10
|
import { useI, useO } from "atom.io/react"
|
|
12
11
|
import type { FC } from "react"
|
|
13
12
|
|
|
@@ -15,6 +14,8 @@ import { button } from "./Button"
|
|
|
15
14
|
import { StoreEditor } from "./StateEditor"
|
|
16
15
|
import { typeSelectors, viewIsOpenAtoms } from "./store"
|
|
17
16
|
|
|
17
|
+
/* eslint-disable no-console */
|
|
18
|
+
|
|
18
19
|
export const StateIndexLeafNode: FC<{
|
|
19
20
|
node: ReadableToken<unknown>
|
|
20
21
|
isOpenState: RegularAtomToken<boolean>
|
|
@@ -7,6 +7,8 @@ import type { Func } from "atom.io/internal"
|
|
|
7
7
|
import { discoverType, prettyJson } from "atom.io/introspection"
|
|
8
8
|
import * as React from "react"
|
|
9
9
|
|
|
10
|
+
/* eslint-disable no-console */
|
|
11
|
+
|
|
10
12
|
const AtomUpdateFC: React.FC<{
|
|
11
13
|
serialNumber: number
|
|
12
14
|
atomUpdate: KeyedStateUpdate<unknown>
|
|
@@ -8,11 +8,12 @@ import type {
|
|
|
8
8
|
} from "atom.io"
|
|
9
9
|
import {
|
|
10
10
|
assignTransactionToContinuity,
|
|
11
|
-
getUpdateToken,
|
|
12
11
|
IMPLICIT,
|
|
13
12
|
setEpochNumberOfContinuity,
|
|
14
13
|
} from "atom.io/internal"
|
|
15
|
-
import type { Canonical
|
|
14
|
+
import type { Canonical } from "atom.io/json"
|
|
15
|
+
|
|
16
|
+
/* eslint-disable no-console */
|
|
16
17
|
|
|
17
18
|
export class InvariantMap<K, V> extends Map<K, V> {
|
|
18
19
|
public set(key: K, value: V): this {
|
|
@@ -4,6 +4,8 @@ import type { Json } from "atom.io/json"
|
|
|
4
4
|
import { parseJson } from "atom.io/json"
|
|
5
5
|
import type { Socket } from "socket.io-client"
|
|
6
6
|
|
|
7
|
+
/* eslint-disable no-console */
|
|
8
|
+
|
|
7
9
|
export function pullAtomFamilyMember<J extends Json.Serializable>(
|
|
8
10
|
token: AtomIO.RegularAtomToken<J>,
|
|
9
11
|
socket: Socket,
|
|
@@ -5,6 +5,8 @@ import type { Json } from "atom.io/json"
|
|
|
5
5
|
import { parseJson } from "atom.io/json"
|
|
6
6
|
import type { Socket } from "socket.io-client"
|
|
7
7
|
|
|
8
|
+
/* eslint-disable no-console */
|
|
9
|
+
|
|
8
10
|
export function pullMutableAtomFamilyMember<
|
|
9
11
|
T extends Transceiver<any>,
|
|
10
12
|
J extends Json.Serializable,
|
|
@@ -5,6 +5,8 @@ import type { Socket } from "socket.io-client"
|
|
|
5
5
|
import { pullAtomFamilyMember } from "./pull-atom-family-member"
|
|
6
6
|
import { pullMutableAtomFamilyMember } from "./pull-mutable-atom-family-member"
|
|
7
7
|
|
|
8
|
+
/* eslint-disable no-console */
|
|
9
|
+
|
|
8
10
|
export function pullSelectorFamilyMember<T>(
|
|
9
11
|
token: AtomIO.SelectorToken<T>,
|
|
10
12
|
socket: Socket,
|
package/src/logger.ts
CHANGED
|
@@ -85,6 +85,7 @@ export type Logger = Record<LogLevel, LogFn>
|
|
|
85
85
|
export const simpleLog =
|
|
86
86
|
(logLevel: keyof Logger): LogFn =>
|
|
87
87
|
(icon, denomination, tokenKey, message, ...rest) => {
|
|
88
|
+
/* eslint-disable-next-line no-console */
|
|
88
89
|
console[logLevel](
|
|
89
90
|
`${icon} ${denomination} "${tokenKey}" ${message}`,
|
|
90
91
|
...rest,
|
|
@@ -110,6 +110,7 @@ export class SetRTX<P extends primitive>
|
|
|
110
110
|
this.emit(`tx:${this.transactionUpdates.join(`;`)}`)
|
|
111
111
|
}
|
|
112
112
|
} catch (thrown) {
|
|
113
|
+
/* eslint-disable-next-line no-console */
|
|
113
114
|
console.error(`Failed to apply transaction to SetRTX:`, thrown)
|
|
114
115
|
throw thrown
|
|
115
116
|
} finally {
|