atom.io 0.33.4 → 0.33.6
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/data/index.d.ts +2 -7
- package/dist/data/index.d.ts.map +1 -1
- package/dist/eslint-plugin/index.d.ts +0 -6
- package/dist/eslint-plugin/index.d.ts.map +1 -1
- package/dist/internal/index.d.ts +12 -100
- package/dist/internal/index.d.ts.map +1 -1
- package/dist/internal/index.js +35 -35
- package/dist/internal/index.js.map +1 -1
- package/dist/introspection/index.d.ts +0 -8
- package/dist/introspection/index.d.ts.map +1 -1
- package/dist/introspection/index.js +9 -9
- package/dist/introspection/index.js.map +1 -1
- package/dist/json/index.d.ts +1 -6
- package/dist/json/index.d.ts.map +1 -1
- package/dist/main/index.d.ts +3 -28
- package/dist/main/index.d.ts.map +1 -1
- package/dist/main/index.js +4 -6
- package/dist/main/index.js.map +1 -1
- package/dist/react/index.d.ts +0 -5
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +7 -11
- package/dist/react/index.js.map +1 -1
- package/dist/react-devtools/index.css +9 -7
- package/dist/react-devtools/index.css.map +1 -1
- package/dist/react-devtools/index.d.ts +1 -12
- package/dist/react-devtools/index.d.ts.map +1 -1
- package/dist/react-devtools/index.js +7 -4
- package/dist/react-devtools/index.js.map +1 -1
- package/dist/realtime/index.d.ts +0 -2
- package/dist/realtime/index.d.ts.map +1 -1
- package/dist/realtime/index.js.map +1 -1
- package/dist/realtime-client/index.d.ts +13 -38
- package/dist/realtime-client/index.d.ts.map +1 -1
- package/dist/realtime-client/index.js +4 -6
- package/dist/realtime-client/index.js.map +1 -1
- package/dist/realtime-react/index.d.ts +7 -25
- package/dist/realtime-react/index.d.ts.map +1 -1
- package/dist/realtime-react/index.js +23 -42
- package/dist/realtime-react/index.js.map +1 -1
- package/dist/realtime-server/index.d.ts +11 -31
- package/dist/realtime-server/index.d.ts.map +1 -1
- package/dist/realtime-server/index.js +6 -6
- package/dist/realtime-server/index.js.map +1 -1
- package/dist/realtime-testing/index.d.ts +0 -1
- package/dist/realtime-testing/index.js +1 -1
- package/dist/realtime-testing/index.js.map +1 -1
- package/dist/transceivers/set-rtx/index.d.ts +0 -1
- package/dist/web/index.d.ts +0 -1
- package/package.json +37 -28
- package/src/internal/families/dispose-from-store.ts +1 -1
- package/src/internal/mutable/create-mutable-atom.ts +2 -6
- package/src/internal/set-state/set-into-store.ts +1 -1
- package/src/internal/store/withdraw.ts +13 -13
- package/src/internal/timeline/time-travel.ts +0 -2
- package/src/introspection/attach-type-selectors.ts +1 -1
- package/src/main/index.ts +2 -8
- package/src/main/logger.ts +2 -2
- package/src/react-devtools/AtomIODevtools.tsx +2 -2
- package/src/react-devtools/StateEditor.tsx +1 -5
- package/src/react-devtools/Updates.tsx +3 -5
- package/src/react-devtools/devtools.css +9 -7
- package/src/react-devtools/elastic-input/NumberInput.tsx +1 -1
- package/src/react-devtools/error-boundary/ReactErrorBoundary.tsx +1 -1
- package/src/react-devtools/json-editor/developer-interface.tsx +1 -1
- package/src/react-devtools/json-editor/editors-by-type/utilities/cast-json.ts +1 -1
- package/src/realtime/shared-room-store.ts +0 -3
- package/src/realtime-react/use-pull-selector.ts +0 -1
- package/src/realtime-react/use-single-effect.ts +2 -0
- package/src/realtime-server/continuity/prepare-to-sync-realtime-continuity.ts +1 -1
- package/src/realtime-server/continuity/subscribe-to-continuity-actions.ts +0 -2
- package/src/realtime-server/ipc-sockets/parent-socket.ts +1 -1
|
@@ -137,52 +137,52 @@ export function withdraw<
|
|
|
137
137
|
): MutableAtomFamily<T, J, K>
|
|
138
138
|
export function withdraw<T, K extends Canonical>(
|
|
139
139
|
store: Store,
|
|
140
|
-
token: AtomFamilyToken<T>,
|
|
141
|
-
): AtomFamily<T,
|
|
140
|
+
token: AtomFamilyToken<T, K>,
|
|
141
|
+
): AtomFamily<T, K>
|
|
142
142
|
export function withdraw<T, K extends Canonical>(
|
|
143
143
|
store: Store,
|
|
144
144
|
token: ReadonlyHeldSelectorFamilyToken<T, K>,
|
|
145
|
-
): ReadonlyHeldSelectorFamily<T,
|
|
145
|
+
): ReadonlyHeldSelectorFamily<T, K>
|
|
146
146
|
export function withdraw<T, K extends Canonical>(
|
|
147
147
|
store: Store,
|
|
148
148
|
token: WritableHeldSelectorFamilyToken<T, K>,
|
|
149
|
-
): WritableHeldSelectorFamily<T,
|
|
149
|
+
): WritableHeldSelectorFamily<T, K>
|
|
150
150
|
export function withdraw<T, K extends Canonical>(
|
|
151
151
|
store: Store,
|
|
152
152
|
token: ReadonlyPureSelectorFamilyToken<T, K>,
|
|
153
|
-
): ReadonlyPureSelectorFamily<T,
|
|
153
|
+
): ReadonlyPureSelectorFamily<T, K>
|
|
154
154
|
export function withdraw<T, K extends Canonical>(
|
|
155
155
|
store: Store,
|
|
156
156
|
token: WritablePureSelectorFamilyToken<T, K>,
|
|
157
|
-
): WritablePureSelectorFamily<T,
|
|
157
|
+
): WritablePureSelectorFamily<T, K>
|
|
158
158
|
export function withdraw<T, K extends Canonical>(
|
|
159
159
|
store: Store,
|
|
160
160
|
token: ReadonlySelectorFamilyToken<T, K>,
|
|
161
|
-
): ReadonlySelectorFamily<T,
|
|
161
|
+
): ReadonlySelectorFamily<T, K>
|
|
162
162
|
export function withdraw<T, K extends Canonical>(
|
|
163
163
|
store: Store,
|
|
164
164
|
token: WritableSelectorFamilyToken<T, K>,
|
|
165
|
-
): WritableSelectorFamily<T,
|
|
165
|
+
): WritableSelectorFamily<T, K>
|
|
166
166
|
export function withdraw<T, K extends Canonical>(
|
|
167
167
|
store: Store,
|
|
168
168
|
token: HeldSelectorFamilyToken<T, K>,
|
|
169
|
-
): HeldSelectorFamily<T,
|
|
169
|
+
): HeldSelectorFamily<T, K>
|
|
170
170
|
export function withdraw<T, K extends Canonical>(
|
|
171
171
|
store: Store,
|
|
172
172
|
token: PureSelectorFamilyToken<T, K>,
|
|
173
|
-
): PureSelectorFamily<T,
|
|
173
|
+
): PureSelectorFamily<T, K>
|
|
174
174
|
export function withdraw<T, K extends Canonical>(
|
|
175
175
|
store: Store,
|
|
176
176
|
token: SelectorFamilyToken<T, K>,
|
|
177
|
-
): SelectorFamily<T,
|
|
177
|
+
): SelectorFamily<T, K>
|
|
178
178
|
export function withdraw<T, K extends Canonical>(
|
|
179
179
|
store: Store,
|
|
180
180
|
token: ReadableFamilyToken<T, K>,
|
|
181
|
-
): ReadableFamily<T,
|
|
181
|
+
): ReadableFamily<T, K>
|
|
182
182
|
export function withdraw<T, K extends Canonical>(
|
|
183
183
|
store: Store,
|
|
184
184
|
token: WritableFamilyToken<T, K>,
|
|
185
|
-
): WritableFamily<T,
|
|
185
|
+
): WritableFamily<T, K>
|
|
186
186
|
|
|
187
187
|
export function withdraw<T extends Func>(
|
|
188
188
|
store: Store,
|
package/src/main/index.ts
CHANGED
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
import type { Transceiver } from "atom.io/internal"
|
|
2
2
|
import type { Canonical, Json, stringified } from "atom.io/json"
|
|
3
3
|
|
|
4
|
-
import type {
|
|
5
|
-
import type { getState } from "./get-state"
|
|
4
|
+
import type { AtomFamilyToken } from "./atom"
|
|
6
5
|
import type {
|
|
7
6
|
SelectorFamilyToken,
|
|
8
7
|
WritableSelectorFamilyToken,
|
|
9
8
|
} from "./selector"
|
|
10
|
-
import type { setState } from "./set-state"
|
|
11
9
|
import type { TimelineToken } from "./timeline"
|
|
12
|
-
import type {
|
|
13
|
-
runTransaction,
|
|
14
|
-
transaction,
|
|
15
|
-
TransactionToken,
|
|
16
|
-
} from "./transaction"
|
|
10
|
+
import type { TransactionToken } from "./transaction"
|
|
17
11
|
|
|
18
12
|
export * from "./atom"
|
|
19
13
|
export * from "./dispose-state"
|
package/src/main/logger.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const LOGGER_ICON_DICTIONARY = {
|
|
2
2
|
"⌛": `Timeline event fully captured`,
|
|
3
3
|
"⏩": `Timeline redo`,
|
|
4
4
|
"⏪": `Timeline undo`,
|
|
@@ -50,7 +50,7 @@ const LoggerIconDictionary = {
|
|
|
50
50
|
"🖌": `Redacting realtime update`,
|
|
51
51
|
"👁": `Determining perspective`,
|
|
52
52
|
} as const
|
|
53
|
-
export type LoggerIcon = keyof typeof
|
|
53
|
+
export type LoggerIcon = keyof typeof LOGGER_ICON_DICTIONARY
|
|
54
54
|
export type TokenDenomination =
|
|
55
55
|
| `atom_family`
|
|
56
56
|
| `atom`
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./devtools.css"
|
|
2
2
|
|
|
3
3
|
import { StoreContext, useI, useO } from "atom.io/react"
|
|
4
|
-
import { LayoutGroup, motion
|
|
4
|
+
import { LayoutGroup, motion } from "motion/react"
|
|
5
5
|
import { useContext, useRef } from "react"
|
|
6
6
|
|
|
7
7
|
import { StateIndex } from "./StateIndex"
|
|
@@ -63,7 +63,7 @@ const AtomIODevtoolsInternal = (): React.ReactNode => {
|
|
|
63
63
|
drag
|
|
64
64
|
dragConstraints={constraintsRef}
|
|
65
65
|
data-css="atom_io_devtools"
|
|
66
|
-
transition={spring}
|
|
66
|
+
transition={{ type: `spring`, bounce: 0.25 }}
|
|
67
67
|
style={
|
|
68
68
|
devtoolsAreOpen
|
|
69
69
|
? {}
|
|
@@ -67,11 +67,9 @@ const TransactionUpdateFC: React.FC<{
|
|
|
67
67
|
{typeof param === `object` &&
|
|
68
68
|
param !== null &&
|
|
69
69
|
`type` in param &&
|
|
70
|
-
`target` in param
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
<>{JSON.stringify(param)}</>
|
|
74
|
-
)}
|
|
70
|
+
`target` in param
|
|
71
|
+
? JSON.stringify(param.type)
|
|
72
|
+
: JSON.stringify(param)}
|
|
75
73
|
</span>
|
|
76
74
|
</article>
|
|
77
75
|
)
|
|
@@ -27,6 +27,7 @@ main[data-css="atom_io_devtools"] {
|
|
|
27
27
|
* {
|
|
28
28
|
font-size: 16px;
|
|
29
29
|
font-family: theia, monospace;
|
|
30
|
+
line-height: 1em;
|
|
30
31
|
}
|
|
31
32
|
> header {
|
|
32
33
|
padding: 5px;
|
|
@@ -35,7 +36,6 @@ main[data-css="atom_io_devtools"] {
|
|
|
35
36
|
display: flex;
|
|
36
37
|
justify-content: space-between;
|
|
37
38
|
h1 {
|
|
38
|
-
font-size: inherit;
|
|
39
39
|
margin: 0;
|
|
40
40
|
font-size: 24px;
|
|
41
41
|
font-family: charter, serif;
|
|
@@ -47,7 +47,7 @@ main[data-css="atom_io_devtools"] {
|
|
|
47
47
|
cursor: pointer;
|
|
48
48
|
background: none;
|
|
49
49
|
border: none;
|
|
50
|
-
padding:
|
|
50
|
+
padding: 0px 5px;
|
|
51
51
|
margin-bottom: -2px;
|
|
52
52
|
z-index: 1000;
|
|
53
53
|
&:disabled {
|
|
@@ -114,10 +114,12 @@ main[data-css="atom_io_devtools"] {
|
|
|
114
114
|
flex-flow: row;
|
|
115
115
|
gap: 5px;
|
|
116
116
|
cursor: help;
|
|
117
|
-
|
|
117
|
+
align-items: baseline;
|
|
118
|
+
/* h2,
|
|
119
|
+
span.type {
|
|
118
120
|
display: inline-block;
|
|
119
121
|
margin: 0;
|
|
120
|
-
}
|
|
122
|
+
} */
|
|
121
123
|
.detail {
|
|
122
124
|
color: #777;
|
|
123
125
|
@media (prefers-color-scheme: light) {
|
|
@@ -126,9 +128,9 @@ main[data-css="atom_io_devtools"] {
|
|
|
126
128
|
}
|
|
127
129
|
}
|
|
128
130
|
}
|
|
129
|
-
main {
|
|
130
|
-
|
|
131
|
-
|
|
131
|
+
/* main {
|
|
132
|
+
margin-left: 15px;
|
|
133
|
+
} */
|
|
132
134
|
}
|
|
133
135
|
section.transaction_log {
|
|
134
136
|
margin-top: 0;
|
|
@@ -12,7 +12,7 @@ function round(value: number, decimalPlaces?: number): number {
|
|
|
12
12
|
const factor = 10 ** decimalPlaces
|
|
13
13
|
return Math.round(value * factor) / factor
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function _roundAndPad(value: number, decimalPlaces?: number): string {
|
|
16
16
|
const roundedValue = round(value, decimalPlaces)
|
|
17
17
|
const paddedString = roundedValue.toFixed(decimalPlaces)
|
|
18
18
|
return paddedString
|
|
@@ -13,7 +13,7 @@ export type ErrorBoundaryProps = {
|
|
|
13
13
|
children: ReactNode
|
|
14
14
|
onError?: ((error: Error | string, errorInfo: ErrorInfo) => void) | undefined
|
|
15
15
|
Fallback?: FC<FallbackProps> | undefined
|
|
16
|
-
|
|
16
|
+
resetErrorState?: () => void
|
|
17
17
|
useErrorState?: () => [
|
|
18
18
|
ErrorBoundaryState,
|
|
19
19
|
(
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import type {
|
|
2
|
-
AtomToken,
|
|
3
2
|
JoinToken,
|
|
4
3
|
MutableAtomToken,
|
|
5
4
|
ReadonlyPureSelectorFamilyToken,
|
|
6
|
-
ReadonlyPureSelectorToken,
|
|
7
5
|
} from "atom.io"
|
|
8
6
|
import { atom, getInternalRelations, join, selectorFamily } from "atom.io"
|
|
9
|
-
import { Join } from "atom.io/internal"
|
|
10
7
|
import type { SetRTXJson } from "atom.io/transceivers/set-rtx"
|
|
11
8
|
import { SetRTX } from "atom.io/transceivers/set-rtx"
|
|
12
9
|
|
|
@@ -49,7 +49,7 @@ export function prepareToExposeRealtimeContinuity({
|
|
|
49
49
|
userKey,
|
|
50
50
|
store,
|
|
51
51
|
).socketKeyOfUser
|
|
52
|
-
const
|
|
52
|
+
const _unsubscribeFromSocketTracking = subscribeToState(
|
|
53
53
|
store,
|
|
54
54
|
socketKeyState,
|
|
55
55
|
`sync-continuity:${continuityKey}:${userKey}`,
|