atom.io 0.32.1 → 0.32.2

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.
@@ -1,4 +1,4 @@
1
- import { IMPLICIT, createStandaloneSelector, findInStore, capitalize, createRegularAtom, createRegularAtomFamily, createSelectorFamily } from '../../dist/chunk-UQEYZ3OI.js';
1
+ import { IMPLICIT, createStandaloneSelector, findInStore, capitalize, createRegularAtom, createRegularAtomFamily, createSelectorFamily } from '../../dist/chunk-RXQWAO26.js';
2
2
  import '../../dist/chunk-XWL6SNVU.js';
3
3
 
4
4
  // data/src/dict.ts
@@ -1,4 +1,4 @@
1
- import { IMPLICIT, setIntoStore, subscribeToState, getFromStore, findInStore, getJsonToken, withdraw, subscribeToTimeline, redo, undo } from './chunk-UQEYZ3OI.js';
1
+ import { IMPLICIT, setIntoStore, subscribeToState, getFromStore, findInStore, getJsonToken, withdraw, subscribeToTimeline, redo, undo } from './chunk-RXQWAO26.js';
2
2
  import * as React5 from 'react';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
 
@@ -1,4 +1,4 @@
1
- import { IMPLICIT, getState, createReadonlySelectorFamily, createRegularAtomFamily, Subject, createSelectorFamily, createRegularAtom, createStandaloneSelector, deposit } from './chunk-UQEYZ3OI.js';
1
+ import { IMPLICIT, getState, createReadonlySelectorFamily, createRegularAtomFamily, Subject, createSelectorFamily, createRegularAtom, createStandaloneSelector, deposit } from './chunk-RXQWAO26.js';
2
2
 
3
3
  // introspection/src/attach-atom-index.ts
4
4
  var attachAtomIndex = (store) => {
@@ -381,6 +381,16 @@ var attachIntrospectionStates = (store) => {
381
381
 
382
382
  // introspection/src/auditor.ts
383
383
  var Auditor = class _Auditor {
384
+ store;
385
+ auditorCreatedAt = performance.now();
386
+ statesCreatedAt = /* @__PURE__ */ new Map();
387
+ atomIndex;
388
+ selectorIndex;
389
+ disposed = false;
390
+ unsubscribeFromAtomCreation;
391
+ unsubscribeFromAtomDisposal;
392
+ unsubscribeFromSelectorCreation;
393
+ unsubscribeFromSelectorDisposal;
384
394
  /**
385
395
  * @param {Store} store - The store to audit.
386
396
  */
@@ -416,15 +426,6 @@ var Auditor = class _Auditor {
416
426
  }
417
427
  );
418
428
  }
419
- auditorCreatedAt = performance.now();
420
- statesCreatedAt = /* @__PURE__ */ new Map();
421
- atomIndex;
422
- selectorIndex;
423
- disposed = false;
424
- unsubscribeFromAtomCreation;
425
- unsubscribeFromAtomDisposal;
426
- unsubscribeFromSelectorCreation;
427
- unsubscribeFromSelectorDisposal;
428
429
  static DEFAULT_LIST_RESOURCES_PARAM = {
429
430
  atomFamilies: true,
430
431
  selectorFamilies: true
@@ -1,14 +1,9 @@
1
- import { roomIndex, usersInRooms } from './chunk-X7SD2NXU.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-UQEYZ3OI.js';
1
+ import { roomIndex, usersInRooms } from './chunk-YPME5OLO.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-RXQWAO26.js';
3
3
  import { spawn } from 'node:child_process';
4
4
 
5
5
  // realtime-server/src/ipc-sockets/custom-socket.ts
6
6
  var CustomSocket = class {
7
- constructor(emit) {
8
- this.emit = emit;
9
- this.listeners = /* @__PURE__ */ new Map();
10
- this.globalListeners = /* @__PURE__ */ new Set();
11
- }
12
7
  listeners;
13
8
  globalListeners;
14
9
  handleEvent(event, ...args) {
@@ -23,6 +18,12 @@ var CustomSocket = class {
23
18
  }
24
19
  }
25
20
  id = `no_id_retrieved`;
21
+ emit;
22
+ constructor(emit) {
23
+ this.emit = emit;
24
+ this.listeners = /* @__PURE__ */ new Map();
25
+ this.globalListeners = /* @__PURE__ */ new Set();
26
+ }
26
27
  on(event, listener) {
27
28
  const listeners = this.listeners.get(event);
28
29
  if (listeners) {
@@ -1,6 +1,6 @@
1
- import { myIdState__INTERNAL, pullAtom, pullAtomFamilyMember, pullMutableAtom, pullMutableAtomFamilyMember, pullSelector, pullSelectorFamilyMember, pushState, serverAction, syncContinuity } from './chunk-3ZFTRSNG.js';
2
- import { useI, StoreContext, useO } from './chunk-3PQTWLQQ.js';
3
- import { findInStore, actUponStore, arbitrary } from './chunk-UQEYZ3OI.js';
1
+ import { myIdState__INTERNAL, pullAtom, pullAtomFamilyMember, pullMutableAtom, pullMutableAtomFamilyMember, pullSelector, pullSelectorFamilyMember, pushState, serverAction, syncContinuity } from './chunk-XN3EO2UT.js';
2
+ import { useI, StoreContext, useO } from './chunk-HEEVASKG.js';
3
+ import { findInStore, actUponStore, arbitrary } from './chunk-RXQWAO26.js';
4
4
  import * as React from 'react';
5
5
  import { jsx } from 'react/jsx-runtime';
6
6
 
@@ -202,6 +202,9 @@ var simpleLogger = {
202
202
  warn: simpleLog(`warn`)
203
203
  };
204
204
  var AtomIOLogger = class {
205
+ logLevel;
206
+ filter;
207
+ logger;
205
208
  constructor(logLevel, filter, logger = simpleLogger) {
206
209
  this.logLevel = logLevel;
207
210
  this.filter = filter;
@@ -2104,11 +2107,12 @@ var Junction = class {
2104
2107
 
2105
2108
  // internal/src/lazy-map.ts
2106
2109
  var LazyMap = class extends Map {
2110
+ deleted = /* @__PURE__ */ new Set();
2111
+ source;
2107
2112
  constructor(source) {
2108
2113
  super();
2109
2114
  this.source = source;
2110
2115
  }
2111
- deleted = /* @__PURE__ */ new Set();
2112
2116
  get(key) {
2113
2117
  const has = super.has(key);
2114
2118
  if (has) {
@@ -1,5 +1,5 @@
1
1
  import { persistSync } from './chunk-4LWKCEW3.js';
2
- import { atom, selector, setIntoStore, getEpochNumberOfContinuity, isRootStore, ingestTransactionUpdate, setEpochNumberOfContinuity, disposeAtom, parseJson, getJsonToken, getUpdateToken, subscribeToState, subscribeToTransaction, getFromStore, assignTransactionToContinuity, actUponStore } from './chunk-UQEYZ3OI.js';
2
+ import { atom, selector, setIntoStore, getEpochNumberOfContinuity, isRootStore, ingestTransactionUpdate, setEpochNumberOfContinuity, disposeAtom, parseJson, getJsonToken, getUpdateToken, subscribeToState, subscribeToTransaction, getFromStore, assignTransactionToContinuity, actUponStore } from './chunk-RXQWAO26.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,4 +1,4 @@
1
- import { atom, SetRTX, join, selectorFamily, getInternalRelations, assignTransactionToContinuity, IMPLICIT, setEpochNumberOfContinuity } from './chunk-UQEYZ3OI.js';
1
+ import { atom, SetRTX, join, selectorFamily, getInternalRelations, assignTransactionToContinuity, IMPLICIT, setEpochNumberOfContinuity } from './chunk-RXQWAO26.js';
2
2
 
3
3
  // realtime/src/realtime-continuity.ts
4
4
  var InvariantMap = class extends Map {
@@ -17,13 +17,14 @@ var InvariantMap = class extends Map {
17
17
  }
18
18
  };
19
19
  var SyncGroup = class _SyncGroup {
20
- constructor(key) {
21
- this.key = key;
22
- }
23
20
  type = `continuity`;
24
21
  globals = [];
25
22
  actions = [];
26
23
  perspectives = [];
24
+ key;
25
+ constructor(key) {
26
+ this.key = key;
27
+ }
27
28
  static existing = new InvariantMap();
28
29
  static create(key, builder) {
29
30
  const group = new _SyncGroup(key);
package/dist/index.d.ts CHANGED
@@ -460,9 +460,9 @@ declare const simpleLog: (logLevel: keyof Logger) => LogFn;
460
460
  declare const simpleLogger: Logger;
461
461
  declare class AtomIOLogger implements Logger {
462
462
  logLevel: `error` | `info` | `warn` | null;
463
- private readonly filter?;
463
+ private readonly filter;
464
464
  private readonly logger;
465
- constructor(logLevel: `error` | `info` | `warn` | null, filter?: LogFilter | undefined, logger?: Logger);
465
+ constructor(logLevel: `error` | `info` | `warn` | null, filter?: LogFilter, logger?: Logger);
466
466
  error: LogFn;
467
467
  info: LogFn;
468
468
  warn: LogFn;
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-UQEYZ3OI.js';
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-RXQWAO26.js';
2
2
  import './chunk-XWL6SNVU.js';
@@ -622,8 +622,8 @@ type StateKey<T> = AtomKey<T> | ReadonlySelectorKey<T> | SelectorKey<T>;
622
622
  declare const isStateKey: (store: Store, key: string) => key is StateKey<unknown>;
623
623
 
624
624
  declare class LazyMap<K, V> extends Map<K, V> {
625
- protected readonly source: Map<K, V>;
626
625
  deleted: Set<K>;
626
+ protected readonly source: Map<K, V>;
627
627
  constructor(source: Map<K, V>);
628
628
  get(key: K): V | undefined;
629
629
  set(key: K, value: V): this;
@@ -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, 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-UQEYZ3OI.js';
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, 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-RXQWAO26.js';
2
2
  import '../../dist/chunk-XWL6SNVU.js';
@@ -1,8 +1,10 @@
1
1
  export class LazyMap<K, V> extends Map<K, V> {
2
2
  public deleted = new Set<K>()
3
+ protected readonly source: Map<K, V>
3
4
 
4
- public constructor(protected readonly source: Map<K, V>) {
5
+ public constructor(source: Map<K, V>) {
5
6
  super()
7
+ this.source = source
6
8
  }
7
9
 
8
10
  public get(key: K): V | undefined {
@@ -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-VRJP2PCU.js';
2
- import '../../dist/chunk-UQEYZ3OI.js';
1
+ export { Auditor, Differ, Refinery, attachIntrospectionStates, diffArray, diffBoolean, diffNumber, diffObject, diffString, discoverType, isPlainObject, jsonRefinery, jsonTreeRefinery, prettyJson, primitiveRefinery, sprawl } from '../../dist/chunk-KMBRCA5Q.js';
2
+ import '../../dist/chunk-RXQWAO26.js';
3
3
  import '../../dist/chunk-XWL6SNVU.js';
@@ -23,6 +23,7 @@ export type ListResourcesParam = {
23
23
  * @experimental
24
24
  */
25
25
  export class Auditor {
26
+ public readonly store: Internal.Store
26
27
  public auditorCreatedAt: number = performance.now()
27
28
  public statesCreatedAt: Map<string, number> = new Map()
28
29
  public readonly atomIndex: ReadonlySelectorToken<AtomTokenIndex>
@@ -37,9 +38,8 @@ export class Auditor {
37
38
  /**
38
39
  * @param {Store} store - The store to audit.
39
40
  */
40
- public constructor(
41
- public readonly store: Internal.Store = Internal.IMPLICIT.STORE,
42
- ) {
41
+ public constructor(store: Internal.Store = Internal.IMPLICIT.STORE) {
42
+ this.store = store
43
43
  this.atomIndex = attachAtomIndex(this.store)
44
44
  this.selectorIndex = attachSelectorIndex(this.store)
45
45
  this.unsubscribeFromAtomCreation = this.store.on.atomCreation.subscribe(
@@ -1,2 +1,2 @@
1
- export { JSON_DEFAULTS, JSON_TYPE_NAMES, fromEntries, isJson, parseJson, selectJson, selectJsonFamily, stringifyJson, toEntries } from '../../dist/chunk-UQEYZ3OI.js';
1
+ export { JSON_DEFAULTS, JSON_TYPE_NAMES, fromEntries, isJson, parseJson, selectJson, selectJsonFamily, stringifyJson, toEntries } from '../../dist/chunk-RXQWAO26.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.1",
3
+ "version": "0.32.2",
4
4
  "description": "Composable and testable reactive data library.",
5
5
  "homepage": "https://atom.io.fyi",
6
6
  "sideEffects": false,
@@ -89,8 +89,8 @@
89
89
  "vite-tsconfig-paths": "5.1.4",
90
90
  "vitest": "3.0.7",
91
91
  "zod": "3.24.2",
92
- "break-check": "0.6.6",
93
- "recoverage": "0.0.7"
92
+ "recoverage": "0.0.7",
93
+ "break-check": "0.6.6"
94
94
  },
95
95
  "main": "dist/index.js",
96
96
  "types": "dist/index.d.ts",
@@ -1,3 +1,3 @@
1
- export { StoreContext, StoreProvider, useI, useJSON, useO, useTL } from '../../dist/chunk-3PQTWLQQ.js';
2
- import '../../dist/chunk-UQEYZ3OI.js';
1
+ export { StoreContext, StoreProvider, useI, useJSON, useO, useTL } from '../../dist/chunk-HEEVASKG.js';
2
+ import '../../dist/chunk-RXQWAO26.js';
3
3
  import '../../dist/chunk-XWL6SNVU.js';
@@ -1,7 +1,7 @@
1
1
  import { persistSync } from '../../dist/chunk-4LWKCEW3.js';
2
- import { attachIntrospectionStates, jsonRefinery, primitiveRefinery, discoverType, prettyJson } from '../../dist/chunk-VRJP2PCU.js';
3
- import { StoreContext, useI, useO } from '../../dist/chunk-3PQTWLQQ.js';
4
- import { IMPLICIT, createStandaloneAtom, createAtomFamily, fromEntries, become, isJson, toEntries, JSON_DEFAULTS, findInStore, undo, redo, getState, stringifyJson } from '../../dist/chunk-UQEYZ3OI.js';
2
+ import { attachIntrospectionStates, jsonRefinery, primitiveRefinery, discoverType, prettyJson } from '../../dist/chunk-KMBRCA5Q.js';
3
+ import { StoreContext, useI, useO } from '../../dist/chunk-HEEVASKG.js';
4
+ import { IMPLICIT, createStandaloneAtom, createAtomFamily, fromEntries, become, isJson, toEntries, JSON_DEFAULTS, findInStore, undo, redo, getState, stringifyJson } from '../../dist/chunk-RXQWAO26.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';
@@ -21,11 +21,11 @@ type ContinuityToken = {
21
21
  readonly perspectives: PerspectiveToken<AtomFamilyToken<any, Canonical>>[];
22
22
  };
23
23
  declare class SyncGroup {
24
- protected readonly key: string;
25
24
  type: "continuity";
26
25
  protected globals: AtomToken<any>[];
27
26
  protected actions: TransactionToken<any>[];
28
27
  protected perspectives: PerspectiveToken<any>[];
28
+ protected readonly key: string;
29
29
  protected constructor(key: string);
30
30
  static existing: InvariantMap<string, ContinuityToken>;
31
31
  static create(key: string, builder: (group: SyncGroup) => SyncGroup): ContinuityToken;
@@ -1,3 +1,3 @@
1
- export { DEFAULT_USER_IN_ROOM_META, InvariantMap, SyncGroup, continuity, roomIndex, usersInMyRoomView, usersInRooms, usersInThisRoomIndex } from '../../dist/chunk-X7SD2NXU.js';
2
- import '../../dist/chunk-UQEYZ3OI.js';
1
+ export { DEFAULT_USER_IN_ROOM_META, InvariantMap, SyncGroup, continuity, roomIndex, usersInMyRoomView, usersInRooms, usersInThisRoomIndex } from '../../dist/chunk-YPME5OLO.js';
2
+ import '../../dist/chunk-RXQWAO26.js';
3
3
  import '../../dist/chunk-XWL6SNVU.js';
@@ -53,8 +53,11 @@ export class SyncGroup {
53
53
  protected globals: AtomToken<any>[] = []
54
54
  protected actions: TransactionToken<any>[] = []
55
55
  protected perspectives: PerspectiveToken<any>[] = []
56
+ protected readonly key: string
56
57
 
57
- protected constructor(protected readonly key: string) {}
58
+ protected constructor(key: string) {
59
+ this.key = key
60
+ }
58
61
 
59
62
  public static existing: InvariantMap<string, ContinuityToken> =
60
63
  new InvariantMap()
@@ -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-3ZFTRSNG.js';
1
+ export { confirmedUpdateQueue, myIdState, myIdState__INTERNAL, myUsernameState, optimisticUpdateQueue, pullAtom, pullAtomFamilyMember, pullMutableAtom, pullMutableAtomFamilyMember, pullSelector, pullSelectorFamilyMember, pushState, serverAction, syncContinuity, useConcealState, useRegisterAndAttemptConfirmedUpdate, useRevealState } from '../../dist/chunk-XN3EO2UT.js';
2
2
  import '../../dist/chunk-4LWKCEW3.js';
3
- import '../../dist/chunk-UQEYZ3OI.js';
3
+ import '../../dist/chunk-RXQWAO26.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-KVI5OBF2.js';
2
- import '../../dist/chunk-3ZFTRSNG.js';
1
+ export { RealtimeContext, RealtimeProvider, usePullAtom, usePullAtomFamilyMember, usePullMutable, usePullMutableAtomFamilyMember, usePullSelector, usePullSelectorFamilyMember, usePush, useServerAction, useSyncContinuity } from '../../dist/chunk-QRPY4LSO.js';
2
+ import '../../dist/chunk-XN3EO2UT.js';
3
3
  import '../../dist/chunk-4LWKCEW3.js';
4
- import '../../dist/chunk-3PQTWLQQ.js';
5
- import '../../dist/chunk-UQEYZ3OI.js';
4
+ import '../../dist/chunk-HEEVASKG.js';
5
+ import '../../dist/chunk-RXQWAO26.js';
6
6
  import '../../dist/chunk-XWL6SNVU.js';
@@ -15,11 +15,11 @@ interface EventBuffer<Key extends string, Params extends Json.Serializable[]> ex
15
15
  toString(): StringifiedEvent<Key, Params>;
16
16
  }
17
17
  declare class CustomSocket<I extends Events, O extends Events> implements Socket {
18
- emit: <Event extends keyof I>(event: Event, ...args: I[Event]) => CustomSocket<I, O>;
19
18
  protected listeners: Map<keyof O, Set<(...args: Json.Array) => void>>;
20
19
  protected globalListeners: Set<(event: string, ...args: Json.Array) => void>;
21
20
  protected handleEvent<Event extends keyof I>(event: string, ...args: I[Event]): void;
22
21
  id: string;
22
+ emit: <Event extends keyof I>(event: Event, ...args: I[Event]) => CustomSocket<I, O>;
23
23
  constructor(emit: <Event extends keyof I>(event: Event, ...args: I[Event]) => CustomSocket<I, O>);
24
24
  on<Event extends keyof O>(event: Event, listener: (...args: O[Event]) => void): this;
25
25
  onAny(listener: (event: string, ...args: Json.Array) => void): this;
@@ -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-UYYKOGZQ.js';
2
- import '../../dist/chunk-X7SD2NXU.js';
3
- import '../../dist/chunk-UQEYZ3OI.js';
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-NDTM5IY3.js';
2
+ import '../../dist/chunk-YPME5OLO.js';
3
+ import '../../dist/chunk-RXQWAO26.js';
4
4
  import '../../dist/chunk-XWL6SNVU.js';
@@ -35,13 +35,18 @@ export class CustomSocket<I extends Events, O extends Events> implements Socket
35
35
  }
36
36
 
37
37
  public id = `no_id_retrieved`
38
+ public emit: <Event extends keyof I>(
39
+ event: Event,
40
+ ...args: I[Event]
41
+ ) => CustomSocket<I, O>
38
42
 
39
43
  public constructor(
40
- public emit: <Event extends keyof I>(
44
+ emit: <Event extends keyof I>(
41
45
  event: Event,
42
46
  ...args: I[Event]
43
47
  ) => CustomSocket<I, O>,
44
48
  ) {
49
+ this.emit = emit
45
50
  this.listeners = new Map()
46
51
  this.globalListeners = new Set()
47
52
  }
@@ -1,10 +1,10 @@
1
- import { RealtimeProvider } from '../../dist/chunk-KVI5OBF2.js';
2
- import { myUsernameState } from '../../dist/chunk-3ZFTRSNG.js';
3
- import { socketAtoms, usersOfSockets, userIndex, socketIndex, roomSelectors } from '../../dist/chunk-UYYKOGZQ.js';
4
- import { roomIndex } from '../../dist/chunk-X7SD2NXU.js';
1
+ import { RealtimeProvider } from '../../dist/chunk-QRPY4LSO.js';
2
+ import { myUsernameState } from '../../dist/chunk-XN3EO2UT.js';
3
+ import { socketAtoms, usersOfSockets, userIndex, socketIndex, roomSelectors } from '../../dist/chunk-NDTM5IY3.js';
4
+ import { roomIndex } from '../../dist/chunk-YPME5OLO.js';
5
5
  import '../../dist/chunk-4LWKCEW3.js';
6
- import { StoreProvider } from '../../dist/chunk-3PQTWLQQ.js';
7
- import { Silo, IMPLICIT, Realm, findInStore, setIntoStore, editRelationsInStore, toEntries, findRelationsInStore, getFromStore, clearStore, AtomIOLogger } from '../../dist/chunk-UQEYZ3OI.js';
6
+ import { StoreProvider } from '../../dist/chunk-HEEVASKG.js';
7
+ import { Silo, IMPLICIT, Realm, findInStore, setIntoStore, editRelationsInStore, toEntries, findRelationsInStore, getFromStore, clearStore, AtomIOLogger } from '../../dist/chunk-RXQWAO26.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';
package/src/logger.ts CHANGED
@@ -98,11 +98,19 @@ export const simpleLogger: Logger = {
98
98
  }
99
99
 
100
100
  export class AtomIOLogger implements Logger {
101
+ public logLevel: `error` | `info` | `warn` | null
102
+ private readonly filter: LogFilter | undefined
103
+ private readonly logger: Logger
104
+
101
105
  public constructor(
102
- public logLevel: `error` | `info` | `warn` | null,
103
- private readonly filter?: LogFilter,
104
- private readonly logger: Logger = simpleLogger,
105
- ) {}
106
+ logLevel: `error` | `info` | `warn` | null,
107
+ filter?: LogFilter,
108
+ logger: Logger = simpleLogger,
109
+ ) {
110
+ this.logLevel = logLevel
111
+ this.filter = filter
112
+ this.logger = logger
113
+ }
106
114
 
107
115
  public error: LogFn = (...args) => {
108
116
  if ((this.filter?.(...args) ?? true) && this.logLevel !== null) {
@@ -1,2 +1,2 @@
1
- export { SetRTX } from '../../../dist/chunk-UQEYZ3OI.js';
1
+ export { SetRTX } from '../../../dist/chunk-RXQWAO26.js';
2
2
  import '../../../dist/chunk-XWL6SNVU.js';