atom.io 0.30.2 → 0.30.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atom.io",
3
- "version": "0.30.2",
3
+ "version": "0.30.4",
4
4
  "description": "Composable and testable reactive data library.",
5
5
  "homepage": "https://atom.io.fyi",
6
6
  "sideEffects": false,
@@ -20,7 +20,7 @@
20
20
  "@floating-ui/react-dom": ">=2.0.0",
21
21
  "@testing-library/react": ">=14.0.0",
22
22
  "eslint": ">=9.0.0",
23
- "framer-motion": ">=10.0.0",
23
+ "motion": ">=11.0.0",
24
24
  "react": ">=18.0.0",
25
25
  "socket.io": ">=4.0.0",
26
26
  "socket.io-client": ">=4.0.0"
@@ -41,7 +41,7 @@
41
41
  "eslint": {
42
42
  "optional": true
43
43
  },
44
- "framer-motion": {
44
+ "motion": {
45
45
  "optional": true
46
46
  },
47
47
  "socket.io": {
@@ -59,32 +59,32 @@
59
59
  "@types/npmlog": "7.0.0",
60
60
  "@types/react": "18.3.12",
61
61
  "@types/tmp": "0.2.6",
62
- "@typescript-eslint/parser": "8.10.0",
63
- "@typescript-eslint/rule-tester": "8.10.0",
64
- "@vitest/coverage-v8": "2.1.3",
65
- "@vitest/ui": "2.1.3",
66
- "concurrently": "9.0.1",
67
- "drizzle-kit": "0.26.2",
68
- "drizzle-orm": "0.35.3",
69
- "eslint": "9.13.0",
70
- "framer-motion": "11.11.9",
71
- "happy-dom": "15.7.4",
62
+ "@typescript-eslint/parser": "8.15.0",
63
+ "@typescript-eslint/rule-tester": "8.15.0",
64
+ "@vitest/coverage-v8": "2.1.5",
65
+ "@vitest/ui": "2.1.5",
66
+ "concurrently": "9.1.0",
67
+ "drizzle-kit": "0.28.1",
68
+ "drizzle-orm": "0.36.3",
69
+ "eslint": "9.15.0",
70
+ "happy-dom": "15.11.6",
72
71
  "http-proxy": "1.18.1",
72
+ "motion": "11.11.17",
73
73
  "npmlog": "7.0.1",
74
- "postgres": "3.4.4",
74
+ "postgres": "3.4.5",
75
75
  "preact": "10.24.3",
76
76
  "react": "18.3.1",
77
77
  "react-dom": "18.3.1",
78
- "react-router-dom": "6.27.0",
79
- "socket.io": "4.8.0",
80
- "socket.io-client": "4.8.0",
78
+ "react-router-dom": "6.28.0",
79
+ "socket.io": "4.8.1",
80
+ "socket.io-client": "4.8.1",
81
81
  "tmp": "0.2.3",
82
- "tsup": "8.3.0",
83
- "tsx": "4.19.1",
82
+ "tsup": "8.3.5",
83
+ "tsx": "4.19.2",
84
84
  "typescript": "5.6.3",
85
- "vite": "5.4.10",
86
- "vite-tsconfig-paths": "5.0.1",
87
- "vitest": "2.1.3",
85
+ "vite": "5.4.11",
86
+ "vite-tsconfig-paths": "5.1.3",
87
+ "vitest": "2.1.5",
88
88
  "zod": "3.23.8"
89
89
  },
90
90
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  import '../../dist/chunk-XWL6SNVU.js';
2
2
  import { StoreContext, useI, useO } from 'atom.io/react';
3
- import { motion, spring, LayoutGroup } from 'framer-motion';
3
+ import { motion, spring, LayoutGroup } from 'motion/react';
4
4
  import { forwardRef, useRef, useState, useImperativeHandle, useLayoutEffect, createContext, useId, Component, useContext, Fragment as Fragment$1 } from 'react';
5
5
  import { undo, redo, getState } from 'atom.io';
6
6
  import { IMPLICIT, createStandaloneAtom, createAtomFamily, findInStore, become } from 'atom.io/internal';
@@ -1,7 +1,7 @@
1
1
  import "./devtools.scss"
2
2
 
3
3
  import { StoreContext, useI, useO } from "atom.io/react"
4
- import { LayoutGroup, motion, spring } from "framer-motion"
4
+ import { LayoutGroup, motion, spring } from "motion/react"
5
5
  import { useContext, useRef } from "react"
6
6
 
7
7
  import { StateIndex } from "./StateIndex"
@@ -166,7 +166,6 @@ export const NumberInput: FC<NumberInputProps> = ({
166
166
 
167
167
  return (
168
168
  <span>
169
- {/* biome-ignore lint/a11y/noLabelWithoutControl: it's associated via htmlFor */}
170
169
  {label ? <label htmlFor={htmlId}>{label}</label> : null}
171
170
  {autoSize ? (
172
171
  <ElasticInput
@@ -23,7 +23,6 @@ export const TextInput: FC<TextInputProps> = ({
23
23
  const htmlId = useId()
24
24
  return (
25
25
  <span>
26
- {/* biome-ignore lint/a11y/noLabelWithoutControl: it's associated via htmlFor */}
27
26
  {label ? <label htmlFor={htmlId}>{label}</label> : null}
28
27
  {autoSize ? (
29
28
  <ElasticInput
@@ -1,6 +1,7 @@
1
1
  import * as atom_io from 'atom.io';
2
2
  import { AtomFamilyToken, ReadableFamilyToken, ReadableToken, TokenType, AtomToken, TransactionToken, MutableAtomToken } from 'atom.io';
3
3
  import { Canonical } from 'atom.io/json';
4
+ import { UserKey } from 'atom.io/realtime-server';
4
5
  import * as atom_io_data from 'atom.io/data';
5
6
  import { SetRTX, SetRTXJson } from 'atom.io/transceivers/set-rtx';
6
7
 
@@ -11,7 +12,7 @@ declare class InvariantMap<K, V> extends Map<K, V> {
11
12
  type PerspectiveToken<F extends AtomFamilyToken<any>> = {
12
13
  type: `realtime_perspective`;
13
14
  resourceAtoms: F;
14
- viewAtoms: ReadableFamilyToken<ReadableToken<TokenType<F>>[], string>;
15
+ viewAtoms: ReadableFamilyToken<ReadableToken<TokenType<F>>[], UserKey>;
15
16
  };
16
17
  type ContinuityToken = {
17
18
  readonly type: `continuity`;
@@ -12,6 +12,7 @@ import {
12
12
  setEpochNumberOfContinuity,
13
13
  } from "atom.io/internal"
14
14
  import type { Canonical } from "atom.io/json"
15
+ import type { UserKey } from "atom.io/realtime-server"
15
16
 
16
17
  /* eslint-disable no-console */
17
18
 
@@ -35,7 +36,7 @@ export class InvariantMap<K, V> extends Map<K, V> {
35
36
  export type PerspectiveToken<F extends AtomFamilyToken<any>> = {
36
37
  type: `realtime_perspective`
37
38
  resourceAtoms: F
38
- viewAtoms: ReadableFamilyToken<ReadableToken<TokenType<F>>[], string>
39
+ viewAtoms: ReadableFamilyToken<ReadableToken<TokenType<F>>[], UserKey>
39
40
  }
40
41
 
41
42
  export type ContinuityToken = {
@@ -96,7 +97,7 @@ export class SyncGroup {
96
97
  {
97
98
  const [family, index] = args as [
98
99
  AtomFamilyToken<any, any>,
99
- ReadableFamilyToken<ReadableToken<any>[], string>,
100
+ ReadableFamilyToken<ReadableToken<any>[], UserKey>,
100
101
  ]
101
102
  this.perspectives.push({
102
103
  type: `realtime_perspective`,
@@ -1,13 +1,16 @@
1
1
  import { Subject, Transceiver, Store } from 'atom.io/internal';
2
2
  import { Json, stringified, JsonIO, Canonical } from 'atom.io/json';
3
+ import { ContinuityToken, UserInRoomMeta } from 'atom.io/realtime';
3
4
  import { ChildProcessWithoutNullStreams } from 'node:child_process';
4
5
  import * as AtomIO from 'atom.io';
5
6
  import { TransactionUpdateContent, TransactionUpdate, Hierarchy, WritableToken } from 'atom.io';
6
- import { ContinuityToken, UserInRoomMeta } from 'atom.io/realtime';
7
7
  import * as atom_io_data from 'atom.io/data';
8
8
  import { Loadable } from 'atom.io/data';
9
9
  import { SetRTX, SetRTXJson } from 'atom.io/transceivers/set-rtx';
10
10
 
11
+ type ExposeRealtimeContinuity = (continuity: ContinuityToken) => () => void;
12
+ declare function prepareToExposeRealtimeContinuity({ socket: initialSocket, store, }: ServerConfig): ExposeRealtimeContinuity;
13
+
11
14
  type Events = Json.Object<string, Json.Serializable[]>;
12
15
  type StringifiedEvent<Key extends string, Params extends Json.Serializable[]> = stringified<[Key, ...Params]>;
13
16
  interface EventBuffer<Key extends string, Params extends Json.Serializable[]> extends Buffer {
@@ -82,9 +85,6 @@ declare class ParentSocket<I extends Events & {
82
85
  type ActionReceiver = ReturnType<typeof realtimeActionReceiver>;
83
86
  declare function realtimeActionReceiver({ socket, store, }: ServerConfig): <F extends JsonIO>(tx: AtomIO.TransactionToken<F>) => () => void;
84
87
 
85
- type RealtimeContinuitySynchronizer = ReturnType<typeof realtimeContinuitySynchronizer>;
86
- declare function realtimeContinuitySynchronizer({ socket: initialSocket, store, }: ServerConfig): (continuity: ContinuityToken) => () => void;
87
-
88
88
  type FamilyProvider = ReturnType<typeof realtimeAtomFamilyProvider>;
89
89
  declare function realtimeAtomFamilyProvider({ socket, store, }: ServerConfig): <J extends Json.Serializable, K extends Canonical>(family: AtomIO.RegularAtomFamilyToken<J, K>, index: AtomIO.ReadableToken<Iterable<K>>) => () => void;
90
90
 
@@ -107,10 +107,11 @@ declare const roomArgumentsAtoms: AtomIO.RegularAtomFamilyToken<RoomArguments, s
107
107
  declare const roomSelectors: AtomIO.ReadonlySelectorFamilyToken<Loadable<ChildSocket<any, any>>, string>;
108
108
 
109
109
  declare function redactTransactionUpdateContent(visibleStateKeys: string[], updates: TransactionUpdateContent[]): TransactionUpdateContent[];
110
- declare const actionOcclusionAtoms: AtomIO.RegularAtomFamilyToken<{
110
+ declare const redactorAtoms: AtomIO.RegularAtomFamilyToken<{
111
111
  occlude: (updates: TransactionUpdateContent[]) => TransactionUpdateContent[];
112
- }, string>;
113
- declare const userUnacknowledgedQueues: AtomIO.RegularAtomFamilyToken<Pick<TransactionUpdate<any>, "key" | "epoch" | "id" | "updates" | "output">[], string>;
112
+ }, `user::${string}`>;
113
+ type ContinuitySyncTransactionUpdate = Pick<TransactionUpdate<any>, `epoch` | `id` | `key` | `output` | `updates`>;
114
+ declare const userUnacknowledgedQueues: AtomIO.RegularAtomFamilyToken<ContinuitySyncTransactionUpdate[], `user::${string}`>;
114
115
 
115
116
  type SocketKey = `socket::${string}`;
116
117
  type UserKey = `user::${string}`;
@@ -145,4 +146,4 @@ type ServerConfig = {
145
146
  store?: Store;
146
147
  };
147
148
 
148
- export { type ActionReceiver, ChildSocket, type CreateRoomIO, CustomSocket, type EventBuffer, type Events, type FamilyProvider, type JoinRoomIO, type LeaveRoomIO, type MutableFamilyProvider, type MutableProvider, ParentSocket, type RealtimeContinuitySynchronizer, type RoomArguments, type RoomKey, type ServerConfig, type Socket, type SocketKey, type SocketSystemHierarchy, type StateProvider, type StateReceiver, type StringifiedEvent, SubjectSocket, type UserKey, actionOcclusionAtoms, createRoomTX, destroyRoomTX, joinRoomTX, leaveRoomTX, realtimeActionReceiver, realtimeAtomFamilyProvider, realtimeContinuitySynchronizer, realtimeMutableFamilyProvider, realtimeMutableProvider, realtimeStateProvider, realtimeStateReceiver, redactTransactionUpdateContent, roomArgumentsAtoms, roomSelectors, socketAtoms, socketIndex, userIndex, userUnacknowledgedQueues, usersOfSockets };
149
+ export { type ActionReceiver, ChildSocket, type ContinuitySyncTransactionUpdate, type CreateRoomIO, CustomSocket, type EventBuffer, type Events, type ExposeRealtimeContinuity, type FamilyProvider, type JoinRoomIO, type LeaveRoomIO, type MutableFamilyProvider, type MutableProvider, ParentSocket, type RoomArguments, type RoomKey, type ServerConfig, type Socket, type SocketKey, type SocketSystemHierarchy, type StateProvider, type StateReceiver, type StringifiedEvent, SubjectSocket, type UserKey, createRoomTX, destroyRoomTX, joinRoomTX, leaveRoomTX, prepareToExposeRealtimeContinuity, realtimeActionReceiver, realtimeAtomFamilyProvider, realtimeMutableFamilyProvider, realtimeMutableProvider, realtimeStateProvider, realtimeStateReceiver, redactTransactionUpdateContent, redactorAtoms, roomArgumentsAtoms, roomSelectors, socketAtoms, socketIndex, userIndex, userUnacknowledgedQueues, usersOfSockets };