atom.io 0.32.3 → 0.32.4
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/data/dist/index.js +1 -1
- package/data/src/struct.ts +1 -0
- package/dist/{chunk-35NB2XZU.js → chunk-7SJVR7FZ.js} +8 -10
- package/dist/{chunk-EF4S7H42.js → chunk-IR77IXS7.js} +1 -1
- package/dist/{chunk-TS76LQVD.js → chunk-PG57JXN4.js} +2 -2
- package/dist/{chunk-LTLDKXDN.js → chunk-PXB4YZDI.js} +4 -4
- package/dist/{chunk-RGUNRT72.js → chunk-Q6OOJWM4.js} +1 -1
- package/dist/{chunk-MENOYVPP.js → chunk-TJPLOX7Z.js} +4 -6
- package/dist/{chunk-2XDFCXGB.js → chunk-U4K63VLA.js} +1 -1
- package/dist/index.js +1 -1
- package/eslint-plugin/dist/index.d.ts +2 -15
- package/internal/dist/index.d.ts +3 -0
- package/internal/dist/index.js +1 -1
- package/internal/src/families/create-writable-selector-family.ts +4 -2
- package/internal/src/join/find-relations-in-store.ts +12 -0
- package/internal/src/selector/register-selector.ts +2 -1
- package/internal/src/store/store.ts +9 -7
- package/internal/src/transaction/build-transaction.ts +2 -1
- package/introspection/dist/index.js +2 -2
- package/json/dist/index.js +1 -1
- package/package.json +22 -22
- package/react/dist/index.js +2 -2
- package/react/src/use-i.ts +3 -5
- package/react-devtools/dist/index.d.ts +12 -3
- package/react-devtools/dist/index.js +5 -5
- package/react-devtools/src/json-editor/developer-interface.tsx +2 -2
- package/react-devtools/src/json-editor/editors-by-type/utilities/cast-json.ts +2 -2
- package/react-devtools/src/json-editor/editors-by-type/utilities/object-properties.ts +3 -3
- package/react-devtools/src/json-editor/index.ts +2 -5
- package/react-devtools/src/json-editor/json-editor-internal.tsx +4 -2
- package/realtime/dist/index.js +2 -2
- package/realtime-client/dist/index.js +2 -2
- package/realtime-react/dist/index.js +4 -4
- package/realtime-react/src/use-single-effect.ts +2 -1
- package/realtime-server/dist/index.js +3 -3
- package/realtime-server/src/ipc-sockets/child-socket.ts +1 -1
- package/realtime-testing/dist/index.js +6 -6
- package/transceivers/set-rtx/dist/index.js +1 -1
package/data/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IMPLICIT, createStandaloneSelector, findInStore, capitalize, createRegularAtom, createRegularAtomFamily, createSelectorFamily } from '../../dist/chunk-
|
|
1
|
+
import { IMPLICIT, createStandaloneSelector, findInStore, capitalize, createRegularAtom, createRegularAtomFamily, createSelectorFamily } from '../../dist/chunk-7SJVR7FZ.js';
|
|
2
2
|
import '../../dist/chunk-XWL6SNVU.js';
|
|
3
3
|
|
|
4
4
|
// data/src/dict.ts
|
package/data/src/struct.ts
CHANGED
|
@@ -798,7 +798,7 @@ var registerSelector = (selectorKey, covered, store) => ({
|
|
|
798
798
|
const state = withdraw(target, token);
|
|
799
799
|
setAtomOrSelector(target, state, value);
|
|
800
800
|
},
|
|
801
|
-
find: (
|
|
801
|
+
find: (...args) => findInStore(store, ...args),
|
|
802
802
|
json: (token) => getJsonToken(store, token)
|
|
803
803
|
});
|
|
804
804
|
|
|
@@ -1070,8 +1070,8 @@ function createWritableSelectorFamily(store, options, internalRoles) {
|
|
|
1070
1070
|
default: (key) => {
|
|
1071
1071
|
const getFn = options.get(key);
|
|
1072
1072
|
return getFn({
|
|
1073
|
-
get: (...
|
|
1074
|
-
find: (
|
|
1073
|
+
get: (...args) => getFromStore(store, ...args),
|
|
1074
|
+
find: (...args) => findInStore(store, ...args),
|
|
1075
1075
|
json: (token) => getJsonToken(store, token)
|
|
1076
1076
|
});
|
|
1077
1077
|
}
|
|
@@ -2205,7 +2205,7 @@ var buildTransaction = (store, key, params, id) => {
|
|
|
2205
2205
|
setIntoStore(child, ...ps);
|
|
2206
2206
|
},
|
|
2207
2207
|
run: (token, identifier = arbitrary()) => actUponStore(child, token, identifier),
|
|
2208
|
-
find: (
|
|
2208
|
+
find: (...ps) => findInStore(store, ...ps),
|
|
2209
2209
|
json: (token) => getJsonToken(child, token),
|
|
2210
2210
|
dispose: (...ps) => {
|
|
2211
2211
|
disposeFromStore(child, ...ps);
|
|
@@ -2528,12 +2528,10 @@ var Store = class {
|
|
|
2528
2528
|
};
|
|
2529
2529
|
var IMPLICIT = {
|
|
2530
2530
|
get STORE() {
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
});
|
|
2536
|
-
}
|
|
2531
|
+
globalThis.ATOM_IO_IMPLICIT_STORE ??= new Store({
|
|
2532
|
+
name: `IMPLICIT_STORE`,
|
|
2533
|
+
lifespan: `ephemeral`
|
|
2534
|
+
});
|
|
2537
2535
|
return globalThis.ATOM_IO_IMPLICIT_STORE;
|
|
2538
2536
|
}
|
|
2539
2537
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { persistSync } from './chunk-4LWKCEW3.js';
|
|
2
|
-
import { atom, selector, setIntoStore, isRootStore, getEpochNumberOfContinuity, ingestTransactionUpdate, setEpochNumberOfContinuity, disposeAtom, parseJson, getJsonToken, getUpdateToken, subscribeToState, subscribeToTransaction, getFromStore, assignTransactionToContinuity, actUponStore } from './chunk-
|
|
2
|
+
import { atom, selector, setIntoStore, isRootStore, getEpochNumberOfContinuity, ingestTransactionUpdate, setEpochNumberOfContinuity, disposeAtom, parseJson, getJsonToken, getUpdateToken, subscribeToState, subscribeToTransaction, getFromStore, assignTransactionToContinuity, actUponStore } from './chunk-7SJVR7FZ.js';
|
|
3
3
|
|
|
4
4
|
// realtime-client/src/continuity/register-and-attempt-confirmed-update.ts
|
|
5
5
|
var useRegisterAndAttemptConfirmedUpdate = (store, continuityKey, socket, optimisticUpdates, confirmedUpdates) => (confirmed) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { roomIndex, usersInRooms } from './chunk-
|
|
2
|
-
import { atomFamily, selectorFamily, transaction, editRelationsInStore, atom, SetRTX, join, parseJson, Subject, stringifyJson, findRelationsInStore, IMPLICIT, getFromStore, subscribeToState, findInStore, getJsonToken, getUpdateToken, actUponStore, setIntoStore, subscribeToTransaction, isRootStore } from './chunk-
|
|
1
|
+
import { roomIndex, usersInRooms } from './chunk-U4K63VLA.js';
|
|
2
|
+
import { atomFamily, selectorFamily, transaction, editRelationsInStore, atom, SetRTX, join, parseJson, Subject, stringifyJson, findRelationsInStore, IMPLICIT, getFromStore, subscribeToState, findInStore, getJsonToken, getUpdateToken, actUponStore, setIntoStore, subscribeToTransaction, isRootStore } from './chunk-7SJVR7FZ.js';
|
|
3
3
|
import { spawn } from 'node:child_process';
|
|
4
4
|
|
|
5
5
|
// realtime-server/src/ipc-sockets/custom-socket.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { myIdState__INTERNAL, pullAtom, pullAtomFamilyMember, pullMutableAtom, pullMutableAtomFamilyMember, pullSelector, pullSelectorFamilyMember, pushState, serverAction, syncContinuity } from './chunk-
|
|
2
|
-
import { useI, StoreContext, useO } from './chunk-
|
|
3
|
-
import { findInStore, actUponStore, arbitrary } from './chunk-
|
|
1
|
+
import { myIdState__INTERNAL, pullAtom, pullAtomFamilyMember, pullMutableAtom, pullMutableAtomFamilyMember, pullSelector, pullSelectorFamilyMember, pushState, serverAction, syncContinuity } from './chunk-IR77IXS7.js';
|
|
2
|
+
import { useI, StoreContext, useO } from './chunk-TJPLOX7Z.js';
|
|
3
|
+
import { findInStore, actUponStore, arbitrary } from './chunk-7SJVR7FZ.js';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
@@ -22,7 +22,7 @@ var RealtimeProvider = ({ children, socket }) => {
|
|
|
22
22
|
}, [socket, setMyId]);
|
|
23
23
|
return /* @__PURE__ */ jsx(RealtimeContext.Provider, { value: { socket, services }, children });
|
|
24
24
|
};
|
|
25
|
-
var { NODE_ENV } = globalThis
|
|
25
|
+
var { NODE_ENV } = globalThis[`env`] ?? {};
|
|
26
26
|
var IN_DEV = NODE_ENV === `development`;
|
|
27
27
|
function noop() {
|
|
28
28
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IMPLICIT, getState, createReadonlySelectorFamily, createRegularAtomFamily, Subject, createSelectorFamily, createRegularAtom, createStandaloneSelector, isReservedIntrospectionKey, deposit } from './chunk-
|
|
1
|
+
import { IMPLICIT, getState, createReadonlySelectorFamily, createRegularAtomFamily, Subject, createSelectorFamily, createRegularAtom, createStandaloneSelector, isReservedIntrospectionKey, deposit } from './chunk-7SJVR7FZ.js';
|
|
2
2
|
|
|
3
3
|
// introspection/src/attach-atom-index.ts
|
|
4
4
|
var attachAtomIndex = (store) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IMPLICIT, setIntoStore, subscribeToState, getFromStore, findInStore, getJsonToken, withdraw, subscribeToTimeline, redo, undo } from './chunk-
|
|
1
|
+
import { IMPLICIT, setIntoStore, subscribeToState, getFromStore, findInStore, getJsonToken, withdraw, subscribeToTimeline, redo, undo } from './chunk-7SJVR7FZ.js';
|
|
2
2
|
import * as React5 from 'react';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
|
|
@@ -23,11 +23,9 @@ function useI(...params) {
|
|
|
23
23
|
const store = React5.useContext(StoreContext);
|
|
24
24
|
const token = parseStateOverloads(store, ...params);
|
|
25
25
|
const setter = React5.useRef(null);
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
};
|
|
30
|
-
}
|
|
26
|
+
setter.current ??= (next) => {
|
|
27
|
+
setIntoStore(store, token, next);
|
|
28
|
+
};
|
|
31
29
|
return setter.current;
|
|
32
30
|
}
|
|
33
31
|
function useO(...params) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { atom, SetRTX, join, selectorFamily, getInternalRelations, assignTransactionToContinuity, IMPLICIT, setEpochNumberOfContinuity } from './chunk-
|
|
1
|
+
import { atom, SetRTX, join, selectorFamily, getInternalRelations, assignTransactionToContinuity, IMPLICIT, setEpochNumberOfContinuity } from './chunk-7SJVR7FZ.js';
|
|
2
2
|
|
|
3
3
|
// realtime/src/realtime-continuity.ts
|
|
4
4
|
var InvariantMap = class extends Map {
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { $claim, Anarchy, AtomIOLogger, LOG_LEVELS, Realm, Silo, T$, atom, atomFamily, belongsTo, disposeState, editRelations, findRelations, findState, getInternalRelations, getState, isToken, join, redo, runTransaction, selector, selectorFamily, setState, simpleLog, simpleLogger, subscribe, timeline, transaction, undo } from './chunk-
|
|
1
|
+
export { $claim, Anarchy, AtomIOLogger, LOG_LEVELS, Realm, Silo, T$, atom, atomFamily, belongsTo, disposeState, editRelations, findRelations, findState, getInternalRelations, getState, isToken, join, redo, runTransaction, selector, selectorFamily, setState, simpleLog, simpleLogger, subscribe, timeline, transaction, undo } from './chunk-7SJVR7FZ.js';
|
|
2
2
|
import './chunk-XWL6SNVU.js';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as _eslint_core from '@eslint/core';
|
|
2
1
|
import * as ESTree from 'estree';
|
|
3
2
|
import * as eslint from 'eslint';
|
|
4
3
|
import { Rule } from 'eslint';
|
|
@@ -17,13 +16,7 @@ declare const synchronousSelectorDependencies: {
|
|
|
17
16
|
};
|
|
18
17
|
schema: never[];
|
|
19
18
|
};
|
|
20
|
-
create(context:
|
|
21
|
-
LangOptions: eslint.Linter.LanguageOptions;
|
|
22
|
-
Code: eslint.SourceCode;
|
|
23
|
-
RuleOptions: any[];
|
|
24
|
-
Node: ESTree.Node;
|
|
25
|
-
MessageIds: string;
|
|
26
|
-
}>): {
|
|
19
|
+
create(context: Rule.RuleContext): {
|
|
27
20
|
CallExpression(node: ESTree.CallExpression & Rule.NodeParentExtension): void;
|
|
28
21
|
};
|
|
29
22
|
};
|
|
@@ -48,13 +41,7 @@ declare const _default: {
|
|
|
48
41
|
};
|
|
49
42
|
schema: never[];
|
|
50
43
|
};
|
|
51
|
-
create(context:
|
|
52
|
-
LangOptions: eslint.Linter.LanguageOptions;
|
|
53
|
-
Code: eslint.SourceCode;
|
|
54
|
-
RuleOptions: any[];
|
|
55
|
-
Node: ESTree.Node;
|
|
56
|
-
MessageIds: string;
|
|
57
|
-
}>): {
|
|
44
|
+
create(context: eslint.Rule.RuleContext): {
|
|
58
45
|
CallExpression(node: ESTree.CallExpression & eslint.Rule.NodeParentExtension): void;
|
|
59
46
|
};
|
|
60
47
|
};
|
package/internal/dist/index.d.ts
CHANGED
|
@@ -423,6 +423,9 @@ declare class Store implements Lineage {
|
|
|
423
423
|
logger: Logger;
|
|
424
424
|
constructor(config: Store[`config`], store?: Store | null);
|
|
425
425
|
}
|
|
426
|
+
declare global {
|
|
427
|
+
var ATOM_IO_IMPLICIT_STORE: Store | undefined;
|
|
428
|
+
}
|
|
426
429
|
declare const IMPLICIT: {
|
|
427
430
|
readonly STORE: Store;
|
|
428
431
|
};
|
package/internal/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { CircularBuffer, FAMILY_MEMBER_TOKEN_TYPES, FamilyTracker, Future, IMPLICIT, Join, Junction, LazyMap, NotFoundError, StatefulSubject, Store, Subject, TRANSACTION_PHASES, Tracker, abortTransaction, actUponStore, allocateIntoStore, applyTransaction, arbitrary, assignTransactionToContinuity, become, buildTransaction, cacheValue, capitalize, claimWithinStore, clearStore, closeOperation, counterfeit, createAtomFamily, createMutableAtom, createMutableAtomFamily, createReadonlySelector, createReadonlySelectorFamily, createRegularAtom, createRegularAtomFamily, createSelectorFamily, createStandaloneAtom, createStandaloneSelector, createTimeline, createTransaction, createWritableSelector, deallocateFromStore, deposit, disposeAtom, disposeFromStore, disposeSelector, editRelationsInStore, evictCachedValue, findInStore, findRelationsInStore, fuseWithinStore, getContinuityKey, getEnvironmentData, getEpochNumberOfAction, getEpochNumberOfContinuity, getFromStore, getInternalRelationsFromStore, getJoin, getJsonFamily, getJsonToken, getSelectorDependencyKeys, getTrace, getUpdateFamily, getUpdateToken, ingestAtomUpdate, ingestCreationEvent, ingestDisposalEvent, ingestMoleculeCreationEvent, ingestMoleculeDisposalEvent, ingestMoleculeTransferEvent, ingestSelectorUpdate, ingestTransactionUpdate, initFamilyMemberInStore, isAtomDefault, isAtomKey, isChildStore, isDone, isReadonlySelectorKey, isReservedIntrospectionKey, isRootStore, isSelectorKey, isStateKey, isTransceiver, makeRootMoleculeInStore, 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 { CircularBuffer, FAMILY_MEMBER_TOKEN_TYPES, FamilyTracker, Future, IMPLICIT, Join, Junction, LazyMap, NotFoundError, StatefulSubject, Store, Subject, TRANSACTION_PHASES, Tracker, abortTransaction, actUponStore, allocateIntoStore, applyTransaction, arbitrary, assignTransactionToContinuity, become, buildTransaction, cacheValue, capitalize, claimWithinStore, clearStore, closeOperation, counterfeit, createAtomFamily, createMutableAtom, createMutableAtomFamily, createReadonlySelector, createReadonlySelectorFamily, createRegularAtom, createRegularAtomFamily, createSelectorFamily, createStandaloneAtom, createStandaloneSelector, createTimeline, createTransaction, createWritableSelector, deallocateFromStore, deposit, disposeAtom, disposeFromStore, disposeSelector, editRelationsInStore, evictCachedValue, findInStore, findRelationsInStore, fuseWithinStore, getContinuityKey, getEnvironmentData, getEpochNumberOfAction, getEpochNumberOfContinuity, getFromStore, getInternalRelationsFromStore, getJoin, getJsonFamily, getJsonToken, getSelectorDependencyKeys, getTrace, getUpdateFamily, getUpdateToken, ingestAtomUpdate, ingestCreationEvent, ingestDisposalEvent, ingestMoleculeCreationEvent, ingestMoleculeDisposalEvent, ingestMoleculeTransferEvent, ingestSelectorUpdate, ingestTransactionUpdate, initFamilyMemberInStore, isAtomDefault, isAtomKey, isChildStore, isDone, isReadonlySelectorKey, isReservedIntrospectionKey, isRootStore, isSelectorKey, isStateKey, isTransceiver, makeRootMoleculeInStore, 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-7SJVR7FZ.js';
|
|
2
2
|
import '../../dist/chunk-XWL6SNVU.js';
|
|
@@ -76,8 +76,10 @@ export function createWritableSelectorFamily<T, K extends Canonical>(
|
|
|
76
76
|
default: (key: K) => {
|
|
77
77
|
const getFn = options.get(key)
|
|
78
78
|
return getFn({
|
|
79
|
-
get: ((...
|
|
80
|
-
|
|
79
|
+
get: ((...args: Parameters<typeof getState>) =>
|
|
80
|
+
getFromStore(store, ...args)) as typeof getState,
|
|
81
|
+
find: ((...args: Parameters<typeof findState>) =>
|
|
82
|
+
findInStore(store, ...args)) as typeof findState,
|
|
81
83
|
json: (token) => getJsonToken(store, token),
|
|
82
84
|
})
|
|
83
85
|
},
|
|
@@ -26,11 +26,13 @@ export function findRelationsInStore<
|
|
|
26
26
|
const keyBA = `${token.b}KeyOf${capitalize(token.a)}`
|
|
27
27
|
relations = {
|
|
28
28
|
get [keyAB]() {
|
|
29
|
+
// @ts-expect-error way too complicated to represent
|
|
29
30
|
const familyAB = myJoin.states[keyAB as any]
|
|
30
31
|
const state = findInStore(store, familyAB, key)
|
|
31
32
|
return state
|
|
32
33
|
},
|
|
33
34
|
get [keyBA]() {
|
|
35
|
+
// @ts-expect-error way too complicated to represent
|
|
34
36
|
const familyBA = myJoin.states[keyBA as any]
|
|
35
37
|
const state = findInStore(store, familyBA, key)
|
|
36
38
|
return state
|
|
@@ -41,11 +43,13 @@ export function findRelationsInStore<
|
|
|
41
43
|
const entryBA = `${token.b}EntryOf${capitalize(token.a)}`
|
|
42
44
|
Object.assign(relations, {
|
|
43
45
|
get [entryAB]() {
|
|
46
|
+
// @ts-expect-error way too complicated to represent
|
|
44
47
|
const familyAB = myJoin.states[entryAB as any]
|
|
45
48
|
const state = findInStore(store, familyAB, key)
|
|
46
49
|
return state
|
|
47
50
|
},
|
|
48
51
|
get [entryBA]() {
|
|
52
|
+
// @ts-expect-error way too complicated to represent
|
|
49
53
|
const familyBA = myJoin.states[entryBA as any]
|
|
50
54
|
const state = findInStore(store, familyBA, key)
|
|
51
55
|
return state
|
|
@@ -59,11 +63,13 @@ export function findRelationsInStore<
|
|
|
59
63
|
const keysBA = `${token.b}KeysOf${capitalize(token.a)}`
|
|
60
64
|
relations = {
|
|
61
65
|
get [keyAB]() {
|
|
66
|
+
// @ts-expect-error way too complicated to represent
|
|
62
67
|
const familyAB = myJoin.states[keyAB as any]
|
|
63
68
|
const state = findInStore(store, familyAB, key)
|
|
64
69
|
return state
|
|
65
70
|
},
|
|
66
71
|
get [keysBA]() {
|
|
72
|
+
// @ts-expect-error way too complicated to represent
|
|
67
73
|
const familyBA = myJoin.states[keysBA as any]
|
|
68
74
|
const state = findInStore(store, familyBA, key)
|
|
69
75
|
return state
|
|
@@ -74,11 +80,13 @@ export function findRelationsInStore<
|
|
|
74
80
|
const entriesBA = `${token.b}EntriesOf${capitalize(token.a)}`
|
|
75
81
|
Object.assign(relations, {
|
|
76
82
|
get [entryAB]() {
|
|
83
|
+
// @ts-expect-error way too complicated to represent
|
|
77
84
|
const familyAB = myJoin.states[entryAB as any]
|
|
78
85
|
const state = findInStore(store, familyAB, key)
|
|
79
86
|
return state
|
|
80
87
|
},
|
|
81
88
|
get [entriesBA]() {
|
|
89
|
+
// @ts-expect-error way too complicated to represent
|
|
82
90
|
const familyBA = myJoin.states[entriesBA as any]
|
|
83
91
|
const state = findInStore(store, familyBA, key)
|
|
84
92
|
return state
|
|
@@ -92,11 +100,13 @@ export function findRelationsInStore<
|
|
|
92
100
|
const keysBA = `${token.b}KeysOf${capitalize(token.a)}`
|
|
93
101
|
relations = {
|
|
94
102
|
get [keysAB]() {
|
|
103
|
+
// @ts-expect-error way too complicated to represent
|
|
95
104
|
const familyAB = myJoin.states[keysAB as any]
|
|
96
105
|
const state = findInStore(store, familyAB, key)
|
|
97
106
|
return state
|
|
98
107
|
},
|
|
99
108
|
get [keysBA]() {
|
|
109
|
+
// @ts-expect-error way too complicated to represent
|
|
100
110
|
const familyBA = myJoin.states[keysBA as any]
|
|
101
111
|
const state = findInStore(store, familyBA, key)
|
|
102
112
|
return state
|
|
@@ -107,11 +117,13 @@ export function findRelationsInStore<
|
|
|
107
117
|
const entriesBA = `${token.b}EntriesOf${capitalize(token.a)}`
|
|
108
118
|
Object.assign(relations, {
|
|
109
119
|
get [entriesAB]() {
|
|
120
|
+
// @ts-expect-error way too complicated to represent
|
|
110
121
|
const familyAB = myJoin.states[entriesAB as any]
|
|
111
122
|
const state = findInStore(store, familyAB, key)
|
|
112
123
|
return state
|
|
113
124
|
},
|
|
114
125
|
get [entriesBA]() {
|
|
126
|
+
// @ts-expect-error way too complicated to represent
|
|
115
127
|
const familyBA = myJoin.states[entriesBA as any]
|
|
116
128
|
const state = findInStore(store, familyBA, key)
|
|
117
129
|
return state
|
|
@@ -86,6 +86,7 @@ export const registerSelector = (
|
|
|
86
86
|
const state = withdraw(target, token)
|
|
87
87
|
setAtomOrSelector(target, state, value)
|
|
88
88
|
}) as typeof setState,
|
|
89
|
-
find: ((
|
|
89
|
+
find: ((...args: Parameters<typeof findState>) =>
|
|
90
|
+
findInStore(store, ...args)) as typeof findState,
|
|
90
91
|
json: (token) => getJsonToken(store, token),
|
|
91
92
|
})
|
|
@@ -250,15 +250,17 @@ export class Store implements Lineage {
|
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
+
declare global {
|
|
254
|
+
var ATOM_IO_IMPLICIT_STORE: Store | undefined
|
|
255
|
+
}
|
|
256
|
+
|
|
253
257
|
export const IMPLICIT = {
|
|
254
258
|
get STORE(): Store {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
}
|
|
261
|
-
return globalThis.ATOM_IO_IMPLICIT_STORE as Store
|
|
259
|
+
globalThis.ATOM_IO_IMPLICIT_STORE ??= new Store({
|
|
260
|
+
name: `IMPLICIT_STORE`,
|
|
261
|
+
lifespan: `ephemeral`,
|
|
262
|
+
})
|
|
263
|
+
return globalThis.ATOM_IO_IMPLICIT_STORE
|
|
262
264
|
},
|
|
263
265
|
}
|
|
264
266
|
|
|
@@ -79,7 +79,8 @@ export const buildTransaction = (
|
|
|
79
79
|
}) as typeof setState,
|
|
80
80
|
run: (token, identifier = arbitrary()) =>
|
|
81
81
|
actUponStore(child, token, identifier),
|
|
82
|
-
find: ((
|
|
82
|
+
find: ((...ps: Parameters<typeof findState>) =>
|
|
83
|
+
findInStore(store, ...ps)) as typeof findState,
|
|
83
84
|
json: (token) => getJsonToken(child, token),
|
|
84
85
|
dispose: ((...ps: Parameters<typeof disposeState>) => {
|
|
85
86
|
disposeFromStore(child, ...ps)
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Auditor, Differ, Refinery, attachIntrospectionStates, diffArray, diffBoolean, diffNumber, diffObject, diffString, discoverType, isPlainObject, jsonRefinery, jsonTreeRefinery, prettyJson, primitiveRefinery, sprawl } from '../../dist/chunk-
|
|
2
|
-
import '../../dist/chunk-
|
|
1
|
+
export { Auditor, Differ, Refinery, attachIntrospectionStates, diffArray, diffBoolean, diffNumber, diffObject, diffString, discoverType, isPlainObject, jsonRefinery, jsonTreeRefinery, prettyJson, primitiveRefinery, sprawl } from '../../dist/chunk-Q6OOJWM4.js';
|
|
2
|
+
import '../../dist/chunk-7SJVR7FZ.js';
|
|
3
3
|
import '../../dist/chunk-XWL6SNVU.js';
|
package/json/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { JSON_DEFAULTS, JSON_TYPE_NAMES, fromEntries, isJson, parseJson, selectJson, selectJsonFamily, stringifyJson, toEntries } from '../../dist/chunk-
|
|
1
|
+
export { JSON_DEFAULTS, JSON_TYPE_NAMES, fromEntries, isJson, parseJson, selectJson, selectJsonFamily, stringifyJson, toEntries } from '../../dist/chunk-7SJVR7FZ.js';
|
|
2
2
|
import '../../dist/chunk-XWL6SNVU.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "atom.io",
|
|
3
|
-
"version": "0.32.
|
|
3
|
+
"version": "0.32.4",
|
|
4
4
|
"description": "Composable and testable reactive data library.",
|
|
5
5
|
"homepage": "https://atom.io.fyi",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -52,45 +52,45 @@
|
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@testing-library/react": "16.
|
|
55
|
+
"@testing-library/react": "16.3.0",
|
|
56
56
|
"@types/eslint": "9.6.1",
|
|
57
57
|
"@types/estree": "1.0.6",
|
|
58
58
|
"@types/http-proxy": "1.17.16",
|
|
59
59
|
"@types/npmlog": "7.0.0",
|
|
60
|
-
"@types/react": "19.0
|
|
60
|
+
"@types/react": "19.1.0",
|
|
61
61
|
"@types/tmp": "0.2.6",
|
|
62
|
-
"@typescript-eslint/parser": "8.
|
|
63
|
-
"@typescript-eslint/rule-tester": "8.
|
|
64
|
-
"@typescript-eslint/utils": "8.
|
|
65
|
-
"@vitest/coverage-v8": "3.
|
|
66
|
-
"@vitest/ui": "3.
|
|
67
|
-
"bun-types": "1.2.
|
|
62
|
+
"@typescript-eslint/parser": "8.29.1",
|
|
63
|
+
"@typescript-eslint/rule-tester": "8.29.1",
|
|
64
|
+
"@typescript-eslint/utils": "8.29.1",
|
|
65
|
+
"@vitest/coverage-v8": "3.1.1",
|
|
66
|
+
"@vitest/ui": "3.1.1",
|
|
67
|
+
"bun-types": "1.2.9",
|
|
68
68
|
"concurrently": "9.1.2",
|
|
69
|
-
"drizzle-kit": "0.30.
|
|
70
|
-
"drizzle-orm": "0.
|
|
71
|
-
"eslint": "9.
|
|
69
|
+
"drizzle-kit": "0.30.6",
|
|
70
|
+
"drizzle-orm": "0.41.0",
|
|
71
|
+
"eslint": "9.24.0",
|
|
72
72
|
"happy-dom": "17.4.4",
|
|
73
73
|
"http-proxy": "1.18.1",
|
|
74
|
-
"motion": "12.
|
|
74
|
+
"motion": "12.6.3",
|
|
75
75
|
"npmlog": "7.0.1",
|
|
76
76
|
"nyc": "17.1.0",
|
|
77
77
|
"postgres": "3.4.5",
|
|
78
|
-
"preact": "10.26.
|
|
79
|
-
"react": "19.
|
|
80
|
-
"react-dom": "19.
|
|
81
|
-
"react-router-dom": "7.
|
|
78
|
+
"preact": "10.26.5",
|
|
79
|
+
"react": "19.1.0",
|
|
80
|
+
"react-dom": "19.1.0",
|
|
81
|
+
"react-router-dom": "7.5.0",
|
|
82
|
+
"recoverage": "0.1.7",
|
|
82
83
|
"socket.io": "4.8.1",
|
|
83
84
|
"socket.io-client": "4.8.1",
|
|
84
85
|
"tmp": "0.2.3",
|
|
85
86
|
"tsup": "8.4.0",
|
|
86
87
|
"tsx": "4.19.3",
|
|
87
|
-
"typescript": "5.8.
|
|
88
|
-
"vite": "6.2.
|
|
88
|
+
"typescript": "5.8.3",
|
|
89
|
+
"vite": "6.2.6",
|
|
89
90
|
"vite-tsconfig-paths": "5.1.4",
|
|
90
|
-
"vitest": "3.
|
|
91
|
+
"vitest": "3.1.1",
|
|
91
92
|
"zod": "3.24.2",
|
|
92
|
-
"break-check": "0.6.
|
|
93
|
-
"recoverage": "0.1.3"
|
|
93
|
+
"break-check": "0.6.10"
|
|
94
94
|
},
|
|
95
95
|
"main": "dist/index.js",
|
|
96
96
|
"types": "dist/index.d.ts",
|
package/react/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { StoreContext, StoreProvider, useI, useJSON, useO, useTL } from '../../dist/chunk-
|
|
2
|
-
import '../../dist/chunk-
|
|
1
|
+
export { StoreContext, StoreProvider, useI, useJSON, useO, useTL } from '../../dist/chunk-TJPLOX7Z.js';
|
|
2
|
+
import '../../dist/chunk-7SJVR7FZ.js';
|
|
3
3
|
import '../../dist/chunk-XWL6SNVU.js';
|
package/react/src/use-i.ts
CHANGED
|
@@ -20,13 +20,11 @@ export function useI<T, K extends Canonical>(
|
|
|
20
20
|
): <New extends T>(next: New | ((old: T) => New)) => void {
|
|
21
21
|
const store = React.useContext(StoreContext)
|
|
22
22
|
const token = parseStateOverloads(store, ...params)
|
|
23
|
-
const setter: React.
|
|
23
|
+
const setter: React.RefObject<
|
|
24
24
|
(<New extends T>(next: New | ((old: T) => New)) => void) | null
|
|
25
25
|
> = React.useRef(null)
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
setIntoStore(store, token, next)
|
|
29
|
-
}
|
|
26
|
+
setter.current ??= (next) => {
|
|
27
|
+
setIntoStore(store, token, next)
|
|
30
28
|
}
|
|
31
29
|
return setter.current
|
|
32
30
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
1
2
|
import { DetailedHTMLProps, InputHTMLAttributes, ForwardRefExoticComponent, FC, ErrorInfo, ReactNode, Component, CSSProperties, ReactElement } from 'react';
|
|
3
|
+
import * as atom_io_json from 'atom.io/json';
|
|
2
4
|
import { JsonTypes, Json } from 'atom.io/json';
|
|
3
5
|
|
|
4
6
|
declare const AtomIODevtools: React.FC;
|
|
@@ -131,7 +133,7 @@ type JsonEditorProps<T> = {
|
|
|
131
133
|
set: (valOrUpdater: T | ((currVal: T) => T)) => void;
|
|
132
134
|
name?: string | undefined;
|
|
133
135
|
rename?: ((newKey: string) => void) | undefined;
|
|
134
|
-
remove?: () => void;
|
|
136
|
+
remove?: (() => void) | undefined;
|
|
135
137
|
path?: ReadonlyArray<number | string>;
|
|
136
138
|
isReadonly?: (path: ReadonlyArray<number | string>) => boolean;
|
|
137
139
|
isHidden?: (path: ReadonlyArray<number | string>) => boolean;
|
|
@@ -141,7 +143,7 @@ type JsonEditorProps<T> = {
|
|
|
141
143
|
data: T;
|
|
142
144
|
}>;
|
|
143
145
|
Components?: Partial<JsonEditorComponents>;
|
|
144
|
-
testid?: string;
|
|
146
|
+
testid?: string | undefined;
|
|
145
147
|
};
|
|
146
148
|
declare const JsonEditor: <T>({ data, set, name, rename, remove, isReadonly, isHidden, className, Header, style, Components: CustomComponents, testid, }: JsonEditorProps<T>) => ReactElement;
|
|
147
149
|
|
|
@@ -155,6 +157,13 @@ declare const castToJson: (input: unknown) => {
|
|
|
155
157
|
};
|
|
156
158
|
|
|
157
159
|
type SetterOrUpdater<T> = <New extends T>(next: New | ((old: T) => New)) => void;
|
|
158
|
-
declare const SubEditors:
|
|
160
|
+
declare const SubEditors: {
|
|
161
|
+
array: ({ path, isReadonly, isHidden, data, set, Components, testid, }: JsonEditorProps_INTERNAL<atom_io_json.Json.Tree.Array>) => react.ReactElement;
|
|
162
|
+
boolean: ({ data, set, Components, testid, }: JsonEditorProps_INTERNAL<boolean>) => react.ReactElement;
|
|
163
|
+
null: ({ Components, testid, }: JsonEditorProps_INTERNAL<null>) => react.ReactElement;
|
|
164
|
+
number: ({ path, isReadonly, data, set, Components, testid, }: JsonEditorProps_INTERNAL<number>) => react.ReactElement;
|
|
165
|
+
object: <T extends atom_io_json.Json.Tree.Object>({ path, isReadonly, isHidden, data, set, Components, testid, }: JsonEditorProps_INTERNAL<T>) => react.ReactElement;
|
|
166
|
+
string: ({ path, isReadonly, data, set, Components, testid, }: JsonEditorProps_INTERNAL<string>) => react.ReactElement;
|
|
167
|
+
};
|
|
159
168
|
|
|
160
169
|
export { AtomIODevtools, DEFAULT_JSON_EDITOR_COMPONENTS, DEFAULT_NUMBER_CONSTRAINTS, type DecimalInProgress, DefaultFallback, type Dict, ElasticInput, type ElasticInputProps, ErrorBoundary, type ErrorBoundaryProps, type ErrorBoundaryState, type FallbackProps, JsonEditor, type JsonEditorComponents, type JsonEditorProps, type NumberConstraints, NumberInput, type SetterOrUpdater, SubEditors, TextInput, type TextInputProps, VALID_NON_NUMBERS, VALID_NON_NUMBER_INTERPRETATIONS, type ValidNonNumber, type WC, type WrapperComponent, castToJson, clampInto, isDecimalInProgress, isValidNonNumber };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { persistSync } from '../../dist/chunk-4LWKCEW3.js';
|
|
2
|
-
import { attachIntrospectionStates, jsonRefinery, primitiveRefinery, discoverType, prettyJson } from '../../dist/chunk-
|
|
3
|
-
import { StoreContext, useI, useO } from '../../dist/chunk-
|
|
4
|
-
import { IMPLICIT, createStandaloneAtom, createAtomFamily, fromEntries, become, isJson, toEntries, JSON_DEFAULTS, findInStore, undo, redo, getState, stringifyJson } from '../../dist/chunk-
|
|
2
|
+
import { attachIntrospectionStates, jsonRefinery, primitiveRefinery, discoverType, prettyJson } from '../../dist/chunk-Q6OOJWM4.js';
|
|
3
|
+
import { StoreContext, useI, useO } from '../../dist/chunk-TJPLOX7Z.js';
|
|
4
|
+
import { IMPLICIT, createStandaloneAtom, createAtomFamily, fromEntries, become, isJson, toEntries, JSON_DEFAULTS, findInStore, undo, redo, getState, stringifyJson } from '../../dist/chunk-7SJVR7FZ.js';
|
|
5
5
|
import '../../dist/chunk-XWL6SNVU.js';
|
|
6
6
|
import { motion, spring, LayoutGroup } from 'motion/react';
|
|
7
7
|
import { forwardRef, useRef, useState, useImperativeHandle, useLayoutEffect, createContext, useId, Component, useContext, Fragment as Fragment$1 } from 'react';
|
|
@@ -401,8 +401,8 @@ var stringToObject = (str) => {
|
|
|
401
401
|
}
|
|
402
402
|
};
|
|
403
403
|
var objectToString = (obj) => JSON.stringify(obj);
|
|
404
|
-
var objectToBoolean = (obj) => obj
|
|
405
|
-
var objectToNumber = (obj) => Number(obj
|
|
404
|
+
var objectToBoolean = (obj) => obj[`true`] === true;
|
|
405
|
+
var objectToNumber = (obj) => Number(obj[`number`] ?? obj[`size`] ?? obj[`count`] ?? 0);
|
|
406
406
|
var objectToArray = (obj) => Object.entries(obj);
|
|
407
407
|
var booleanToString = (bool) => bool.toString();
|
|
408
408
|
var booleanToNumber = (bool) => +bool;
|
|
@@ -31,7 +31,7 @@ export type JsonEditorProps<T> = {
|
|
|
31
31
|
set: (valOrUpdater: T | ((currVal: T) => T)) => void
|
|
32
32
|
name?: string | undefined
|
|
33
33
|
rename?: ((newKey: string) => void) | undefined
|
|
34
|
-
remove?: () => void
|
|
34
|
+
remove?: (() => void) | undefined
|
|
35
35
|
path?: ReadonlyArray<number | string>
|
|
36
36
|
isReadonly?: (path: ReadonlyArray<number | string>) => boolean
|
|
37
37
|
isHidden?: (path: ReadonlyArray<number | string>) => boolean
|
|
@@ -39,7 +39,7 @@ export type JsonEditorProps<T> = {
|
|
|
39
39
|
style?: CSSProperties
|
|
40
40
|
Header?: FC<{ data: T }>
|
|
41
41
|
Components?: Partial<JsonEditorComponents>
|
|
42
|
-
testid?: string
|
|
42
|
+
testid?: string | undefined
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
export const JsonEditor = <T,>({
|
|
@@ -14,9 +14,9 @@ export const stringToObject = (str: string): Json.Tree.Object => {
|
|
|
14
14
|
export const objectToString = (obj: Json.Tree.Object): string =>
|
|
15
15
|
JSON.stringify(obj)
|
|
16
16
|
export const objectToBoolean = (obj: Json.Tree.Object): boolean =>
|
|
17
|
-
obj
|
|
17
|
+
obj[`true`] === true
|
|
18
18
|
export const objectToNumber = (obj: Json.Tree.Object): number =>
|
|
19
|
-
Number(obj
|
|
19
|
+
Number(obj[`number`] ?? obj[`size`] ?? obj[`count`] ?? 0)
|
|
20
20
|
export const objectToArray = <T>(
|
|
21
21
|
obj: Json.Tree.Object<string, T>,
|
|
22
22
|
): [key: string, value: T][] => Object.entries(obj)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { become } from "atom.io/internal"
|
|
2
2
|
import type { Json, JsonTypeName } from "atom.io/json"
|
|
3
3
|
import { fromEntries, JSON_DEFAULTS, toEntries } from "atom.io/json"
|
|
4
|
-
import type {
|
|
4
|
+
import type { RefObject } from "react"
|
|
5
5
|
|
|
6
6
|
import type { SetterOrUpdater } from "../.."
|
|
7
7
|
import { castToJson } from "./cast-to-json"
|
|
@@ -13,7 +13,7 @@ export const makePropertySetters = <T extends Json.Tree.Object>(
|
|
|
13
13
|
fromEntries(
|
|
14
14
|
toEntries(data).map(([key, value]) => [
|
|
15
15
|
key,
|
|
16
|
-
(newValue) => {
|
|
16
|
+
(newValue: unknown) => {
|
|
17
17
|
set({ ...data, [key]: become(newValue)(value) })
|
|
18
18
|
},
|
|
19
19
|
]),
|
|
@@ -22,7 +22,7 @@ export const makePropertySetters = <T extends Json.Tree.Object>(
|
|
|
22
22
|
export const makePropertyRenamers = <T extends Json.Tree.Object>(
|
|
23
23
|
data: T,
|
|
24
24
|
set: SetterOrUpdater<T>,
|
|
25
|
-
stableKeyMapRef:
|
|
25
|
+
stableKeyMapRef: RefObject<{ [Key in keyof T]: keyof T }>,
|
|
26
26
|
): { [K in keyof T]: (newKey: string) => void } =>
|
|
27
27
|
fromEntries(
|
|
28
28
|
toEntries(data).map(([key, value]) => [
|
|
@@ -19,14 +19,11 @@ export type SetterOrUpdater<T> = <New extends T>(
|
|
|
19
19
|
next: New | ((old: T) => New),
|
|
20
20
|
) => void
|
|
21
21
|
|
|
22
|
-
export const SubEditors
|
|
23
|
-
keyof JsonTypes,
|
|
24
|
-
FC<JsonEditorProps_INTERNAL<any>>
|
|
25
|
-
> = {
|
|
22
|
+
export const SubEditors = {
|
|
26
23
|
array: ArrayEditor,
|
|
27
24
|
boolean: BooleanEditor,
|
|
28
25
|
null: NullEditor,
|
|
29
26
|
number: NumberEditor,
|
|
30
27
|
object: ObjectEditor,
|
|
31
28
|
string: StringEditor,
|
|
32
|
-
}
|
|
29
|
+
} satisfies Record<keyof JsonTypes, FC<JsonEditorProps_INTERNAL<any>>>
|
|
@@ -47,7 +47,9 @@ export const JsonEditor_INTERNAL = <T,>({
|
|
|
47
47
|
type: `non-json`,
|
|
48
48
|
data,
|
|
49
49
|
}
|
|
50
|
-
const SubEditor = dataIsJson
|
|
50
|
+
const SubEditor = dataIsJson
|
|
51
|
+
? SubEditors[refined.type as keyof JsonTypes]
|
|
52
|
+
: NonJsonEditor
|
|
51
53
|
|
|
52
54
|
const disabled = isReadonly(path)
|
|
53
55
|
|
|
@@ -92,7 +94,7 @@ export const JsonEditor_INTERNAL = <T,>({
|
|
|
92
94
|
</Components.KeyWrapper>
|
|
93
95
|
)}
|
|
94
96
|
<SubEditor
|
|
95
|
-
data={refined.data}
|
|
97
|
+
data={refined.data as never}
|
|
96
98
|
set={set}
|
|
97
99
|
remove={remove}
|
|
98
100
|
rename={rename}
|
package/realtime/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { DEFAULT_USER_IN_ROOM_META, InvariantMap, SyncGroup, continuity, roomIndex, usersInMyRoomView, usersInRooms, usersInThisRoomIndex } from '../../dist/chunk-
|
|
2
|
-
import '../../dist/chunk-
|
|
1
|
+
export { DEFAULT_USER_IN_ROOM_META, InvariantMap, SyncGroup, continuity, roomIndex, usersInMyRoomView, usersInRooms, usersInThisRoomIndex } from '../../dist/chunk-U4K63VLA.js';
|
|
2
|
+
import '../../dist/chunk-7SJVR7FZ.js';
|
|
3
3
|
import '../../dist/chunk-XWL6SNVU.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { confirmedUpdateQueue, myIdState, myIdState__INTERNAL, myUsernameState, optimisticUpdateQueue, pullAtom, pullAtomFamilyMember, pullMutableAtom, pullMutableAtomFamilyMember, pullSelector, pullSelectorFamilyMember, pushState, serverAction, syncContinuity, useConcealState, useRegisterAndAttemptConfirmedUpdate, useRevealState } from '../../dist/chunk-
|
|
1
|
+
export { confirmedUpdateQueue, myIdState, myIdState__INTERNAL, myUsernameState, optimisticUpdateQueue, pullAtom, pullAtomFamilyMember, pullMutableAtom, pullMutableAtomFamilyMember, pullSelector, pullSelectorFamilyMember, pushState, serverAction, syncContinuity, useConcealState, useRegisterAndAttemptConfirmedUpdate, useRevealState } from '../../dist/chunk-IR77IXS7.js';
|
|
2
2
|
import '../../dist/chunk-4LWKCEW3.js';
|
|
3
|
-
import '../../dist/chunk-
|
|
3
|
+
import '../../dist/chunk-7SJVR7FZ.js';
|
|
4
4
|
import '../../dist/chunk-XWL6SNVU.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { RealtimeContext, RealtimeProvider, usePullAtom, usePullAtomFamilyMember, usePullMutable, usePullMutableAtomFamilyMember, usePullSelector, usePullSelectorFamilyMember, usePush, useServerAction, useSyncContinuity } from '../../dist/chunk-
|
|
2
|
-
import '../../dist/chunk-
|
|
1
|
+
export { RealtimeContext, RealtimeProvider, usePullAtom, usePullAtomFamilyMember, usePullMutable, usePullMutableAtomFamilyMember, usePullSelector, usePullSelectorFamilyMember, usePush, useServerAction, useSyncContinuity } from '../../dist/chunk-PXB4YZDI.js';
|
|
2
|
+
import '../../dist/chunk-IR77IXS7.js';
|
|
3
3
|
import '../../dist/chunk-4LWKCEW3.js';
|
|
4
|
-
import '../../dist/chunk-
|
|
5
|
-
import '../../dist/chunk-
|
|
4
|
+
import '../../dist/chunk-TJPLOX7Z.js';
|
|
5
|
+
import '../../dist/chunk-7SJVR7FZ.js';
|
|
6
6
|
import '../../dist/chunk-XWL6SNVU.js';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from "react"
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// @ts-expect-error this is a safe way to check a property on the global object
|
|
4
|
+
const { NODE_ENV } = globalThis[`env`] ?? {}
|
|
4
5
|
const IN_DEV = NODE_ENV === `development`
|
|
5
6
|
|
|
6
7
|
function noop() {}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ChildSocket, CustomSocket, ParentSocket, SubjectSocket, createRoomTX, destroyRoomTX, joinRoomTX, leaveRoomTX, prepareToExposeRealtimeContinuity, realtimeActionReceiver, realtimeAtomFamilyProvider, realtimeMutableFamilyProvider, realtimeMutableProvider, realtimeStateProvider, realtimeStateReceiver, redactTransactionUpdateContent, redactorAtoms, roomArgumentsAtoms, roomSelectors, socketAtoms, socketIndex, userIndex, userUnacknowledgedQueues, usersOfSockets } from '../../dist/chunk-
|
|
2
|
-
import '../../dist/chunk-
|
|
3
|
-
import '../../dist/chunk-
|
|
1
|
+
export { ChildSocket, CustomSocket, ParentSocket, SubjectSocket, createRoomTX, destroyRoomTX, joinRoomTX, leaveRoomTX, prepareToExposeRealtimeContinuity, realtimeActionReceiver, realtimeAtomFamilyProvider, realtimeMutableFamilyProvider, realtimeMutableProvider, realtimeStateProvider, realtimeStateReceiver, redactTransactionUpdateContent, redactorAtoms, roomArgumentsAtoms, roomSelectors, socketAtoms, socketIndex, userIndex, userUnacknowledgedQueues, usersOfSockets } from '../../dist/chunk-PG57JXN4.js';
|
|
2
|
+
import '../../dist/chunk-U4K63VLA.js';
|
|
3
|
+
import '../../dist/chunk-7SJVR7FZ.js';
|
|
4
4
|
import '../../dist/chunk-XWL6SNVU.js';
|
|
@@ -49,7 +49,7 @@ export class ChildSocket<
|
|
|
49
49
|
) {
|
|
50
50
|
super((event, ...args) => {
|
|
51
51
|
const stringifiedEvent = JSON.stringify([event, ...args]) + `\x03`
|
|
52
|
-
const errorHandler = (err) => {
|
|
52
|
+
const errorHandler = (err: { code: string }) => {
|
|
53
53
|
if (err.code === `EPIPE`) {
|
|
54
54
|
console.error(`EPIPE error during write`, this.process.stdin)
|
|
55
55
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { RealtimeProvider } from '../../dist/chunk-
|
|
2
|
-
import { myUsernameState } from '../../dist/chunk-
|
|
3
|
-
import { socketAtoms, usersOfSockets, userIndex, socketIndex, roomSelectors } from '../../dist/chunk-
|
|
4
|
-
import { roomIndex } from '../../dist/chunk-
|
|
1
|
+
import { RealtimeProvider } from '../../dist/chunk-PXB4YZDI.js';
|
|
2
|
+
import { myUsernameState } from '../../dist/chunk-IR77IXS7.js';
|
|
3
|
+
import { socketAtoms, usersOfSockets, userIndex, socketIndex, roomSelectors } from '../../dist/chunk-PG57JXN4.js';
|
|
4
|
+
import { roomIndex } from '../../dist/chunk-U4K63VLA.js';
|
|
5
5
|
import '../../dist/chunk-4LWKCEW3.js';
|
|
6
|
-
import { StoreProvider } from '../../dist/chunk-
|
|
7
|
-
import { Silo, IMPLICIT, Realm, findInStore, setIntoStore, editRelationsInStore, toEntries, findRelationsInStore, getFromStore, clearStore, AtomIOLogger } from '../../dist/chunk-
|
|
6
|
+
import { StoreProvider } from '../../dist/chunk-TJPLOX7Z.js';
|
|
7
|
+
import { Silo, IMPLICIT, Realm, findInStore, setIntoStore, editRelationsInStore, toEntries, findRelationsInStore, getFromStore, clearStore, AtomIOLogger } from '../../dist/chunk-7SJVR7FZ.js';
|
|
8
8
|
import '../../dist/chunk-XWL6SNVU.js';
|
|
9
9
|
import * as http from 'node:http';
|
|
10
10
|
import { render, prettyDOM } from '@testing-library/react';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { SetRTX } from '../../../dist/chunk-
|
|
1
|
+
export { SetRTX } from '../../../dist/chunk-7SJVR7FZ.js';
|
|
2
2
|
import '../../../dist/chunk-XWL6SNVU.js';
|