atom.io 0.33.13 → 0.33.15

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.
Files changed (56) hide show
  1. package/dist/data/index.js.map +1 -1
  2. package/dist/eslint-plugin/index.js.map +1 -1
  3. package/dist/internal/index.d.ts +9 -7
  4. package/dist/internal/index.d.ts.map +1 -1
  5. package/dist/internal/index.js +98 -53
  6. package/dist/internal/index.js.map +1 -1
  7. package/dist/introspection/index.d.ts +7 -7
  8. package/dist/introspection/index.d.ts.map +1 -1
  9. package/dist/introspection/index.js +26 -38
  10. package/dist/introspection/index.js.map +1 -1
  11. package/dist/json/index.js.map +1 -1
  12. package/dist/main/index.d.ts +21 -1
  13. package/dist/main/index.d.ts.map +1 -1
  14. package/dist/main/index.js +24 -13
  15. package/dist/main/index.js.map +1 -1
  16. package/dist/react/index.js.map +1 -1
  17. package/dist/react-devtools/index.css +110 -56
  18. package/dist/react-devtools/index.css.map +1 -1
  19. package/dist/react-devtools/index.js +38 -14
  20. package/dist/react-devtools/index.js.map +1 -1
  21. package/dist/realtime/index.js.map +1 -1
  22. package/dist/realtime-client/index.js.map +1 -1
  23. package/dist/realtime-react/index.js.map +1 -1
  24. package/dist/realtime-server/index.js.map +1 -1
  25. package/dist/realtime-testing/index.js.map +1 -1
  26. package/dist/transceivers/set-rtx/index.js.map +1 -1
  27. package/dist/use-o-BrXc7Qro.js.map +1 -1
  28. package/dist/web/index.js.map +1 -1
  29. package/package.json +10 -10
  30. package/src/internal/atom/create-regular-atom.ts +0 -2
  31. package/src/internal/atom/index.ts +0 -1
  32. package/src/internal/mutable/create-mutable-atom.ts +0 -2
  33. package/src/internal/selector/trace-selector-atoms.ts +9 -7
  34. package/src/internal/set-state/index.ts +2 -0
  35. package/src/internal/set-state/reset-atom-or-selector.ts +32 -0
  36. package/src/internal/set-state/reset-in-store.ts +78 -0
  37. package/src/internal/set-state/set-atom.ts +0 -4
  38. package/src/internal/subscribe/subscribe-to-root-atoms.ts +2 -8
  39. package/src/internal/transaction/build-transaction.ts +11 -2
  40. package/src/internal/transaction/create-transaction.ts +9 -5
  41. package/src/introspection/attach-atom-index.ts +6 -15
  42. package/src/introspection/attach-introspection-states.ts +5 -5
  43. package/src/introspection/attach-selector-index.ts +78 -85
  44. package/src/introspection/attach-timeline-index.ts +5 -12
  45. package/src/introspection/attach-transaction-index.ts +18 -16
  46. package/src/introspection/auditor.ts +2 -3
  47. package/src/main/index.ts +1 -0
  48. package/src/main/reset-state.ts +35 -0
  49. package/src/main/silo.ts +6 -0
  50. package/src/main/transaction.ts +2 -0
  51. package/src/react-devtools/StateIndex.tsx +44 -20
  52. package/src/react-devtools/TimelineIndex.tsx +16 -12
  53. package/src/react-devtools/TransactionIndex.tsx +22 -18
  54. package/src/react-devtools/devtools.css +110 -56
  55. package/src/react-devtools/store.ts +1 -1
  56. package/src/internal/atom/is-default.ts +0 -18
@@ -0,0 +1,35 @@
1
+ import * as Internal from "atom.io/internal"
2
+ import type { Canonical } from "atom.io/json"
3
+
4
+ import type { WritableFamilyToken, WritableToken } from "."
5
+
6
+ /**
7
+ * @public
8
+ * Set the value of a state into the implicit store back to its default value.
9
+ * @param token - An atom or writable selector token.
10
+ * @overload Default
11
+ * @default
12
+ */
13
+ export function resetState(token: WritableToken<any>): void
14
+ /**
15
+ * @public
16
+ * Set the value of a state into the implicit store back to its default value.
17
+ * @param token - An atom family or writable selector family token.
18
+ * @param key - The unique key of the state to set.
19
+ * @overload Streamlined
20
+ */
21
+ export function resetState<K extends Canonical>(
22
+ token: WritableFamilyToken<any, K>,
23
+ key: K,
24
+ ): void
25
+ export function resetState(
26
+ ...params:
27
+ | [token: WritableFamilyToken<any, Canonical>, key: Canonical]
28
+ | [token: WritableToken<any>]
29
+ ): void {
30
+ if (params.length === 2) {
31
+ Internal.resetInStore(Internal.IMPLICIT.STORE, ...params)
32
+ } else {
33
+ Internal.resetInStore(Internal.IMPLICIT.STORE, ...params)
34
+ }
35
+ }
package/src/main/silo.ts CHANGED
@@ -13,6 +13,7 @@ import {
13
13
  getFromStore,
14
14
  IMPLICIT,
15
15
  installIntoStore,
16
+ resetInStore,
16
17
  setIntoStore,
17
18
  Store,
18
19
  subscribeInStore,
@@ -30,6 +31,7 @@ import type {
30
31
  undo,
31
32
  } from "."
32
33
  import type { atom, atomFamily } from "./atom"
34
+ import type { resetState } from "./reset-state"
33
35
  import type { selector, selectorFamily } from "./selector"
34
36
  import type { runTransaction, transaction } from "./transaction"
35
37
 
@@ -44,6 +46,7 @@ export class Silo {
44
46
  public findState: typeof findState
45
47
  public getState: typeof getState
46
48
  public setState: typeof setState
49
+ public resetState: typeof resetState
47
50
  public disposeState: typeof disposeState
48
51
  public subscribe: typeof subscribe
49
52
  public undo: typeof undo
@@ -70,6 +73,9 @@ export class Silo {
70
73
  this.setState = ((...params: Parameters<typeof setState>) => {
71
74
  setIntoStore(s, ...params)
72
75
  }) as typeof setState
76
+ this.resetState = ((...params: Parameters<typeof resetState>) => {
77
+ resetInStore(s, ...params)
78
+ }) as typeof resetState
73
79
  this.disposeState = ((...params: Parameters<typeof disposeState>) => {
74
80
  disposeFromStore(s, ...params)
75
81
  }) as typeof disposeState
@@ -16,6 +16,7 @@ import type {
16
16
  TokenType,
17
17
  WritablePureSelectorToken,
18
18
  } from "."
19
+ import type { resetState } from "./reset-state"
19
20
 
20
21
  export type TransactionToken<F extends Func> = {
21
22
  key: string
@@ -93,6 +94,7 @@ export type SetterToolkit = Readonly<{
93
94
  export type ActorToolkit = Readonly<{
94
95
  get: typeof getState
95
96
  set: typeof setState
97
+ reset: typeof resetState
96
98
  find: typeof findState
97
99
  json: <T extends Transceiver<any>, J extends Json.Serializable>(
98
100
  state: MutableAtomToken<T, J>,
@@ -1,4 +1,5 @@
1
1
  import type {
2
+ AtomToken,
2
3
  Loadable,
3
4
  ReadableToken,
4
5
  ReadonlyPureSelectorToken,
@@ -7,6 +8,7 @@ import type {
7
8
  import {
8
9
  actUponStore,
9
10
  arbitrary,
11
+ disposeFromStore,
10
12
  findInStore,
11
13
  getFromStore,
12
14
  } from "atom.io/internal"
@@ -16,6 +18,7 @@ import { useI, useO } from "atom.io/react"
16
18
  import { type FC, useContext } from "react"
17
19
 
18
20
  import { button } from "./Button"
21
+ import { DEFAULT_JSON_EDITOR_COMPONENTS } from "./json-editor"
19
22
  import { StoreEditor } from "./StateEditor"
20
23
  import { DevtoolsContext } from "./store"
21
24
 
@@ -25,7 +28,8 @@ export const StateIndexLeafNode: FC<{
25
28
  node: ReadableToken<unknown>
26
29
  isOpenState: RegularAtomToken<boolean>
27
30
  typeState: ReadonlyPureSelectorToken<Loadable<string>>
28
- }> = ({ node, isOpenState, typeState }) => {
31
+ dispose?: (() => void) | undefined
32
+ }> = ({ node, isOpenState, typeState, dispose }) => {
29
33
  const { openCloseAllTX, store } = useContext(DevtoolsContext)
30
34
 
31
35
  const setIsOpen = useI(isOpenState)
@@ -64,11 +68,23 @@ export const StateIndexLeafNode: FC<{
64
68
  <h2>{node.family?.subKey ?? node.key}</h2>
65
69
  <span className="type detail">({stateType})</span>
66
70
  </main>
67
- {isPrimitive ? (
68
- <StoreEditor token={node} />
69
- ) : (
70
- <div className="json_viewer">{JSON.stringify(state)}</div>
71
- )}
71
+ <footer>
72
+ {isPrimitive ? (
73
+ <StoreEditor token={node} />
74
+ ) : (
75
+ <div className="json_viewer">{JSON.stringify(state)}</div>
76
+ )}
77
+ {dispose ? (
78
+ <DEFAULT_JSON_EDITOR_COMPONENTS.Button
79
+ onClick={() => {
80
+ dispose?.()
81
+ }}
82
+ testid={`${node.key}-dispose`}
83
+ >
84
+ <DEFAULT_JSON_EDITOR_COMPONENTS.DeleteIcon />
85
+ </DEFAULT_JSON_EDITOR_COMPONENTS.Button>
86
+ ) : null}
87
+ </footer>
72
88
  </header>
73
89
  {isOpen && !isPrimitive ? (
74
90
  <main>
@@ -120,6 +136,9 @@ export const StateIndexTreeNode: FC<{
120
136
  node={childNode}
121
137
  isOpenState={findInStore(store, viewIsOpenAtoms, [node.key, key])}
122
138
  typeState={findInStore(store, typeSelectors, childNode.key)}
139
+ dispose={() => {
140
+ disposeFromStore(store, childNode)
141
+ }}
123
142
  />
124
143
  ))
125
144
  : null}
@@ -131,7 +150,8 @@ export const StateIndexNode: FC<{
131
150
  node: FamilyNode<ReadableToken<unknown>> | ReadableToken<unknown>
132
151
  isOpenState: RegularAtomToken<boolean>
133
152
  typeState: ReadonlyPureSelectorToken<Loadable<string>>
134
- }> = ({ node, isOpenState, typeState }) => {
153
+ dispose?: () => void
154
+ }> = ({ node, isOpenState, typeState, dispose }) => {
135
155
  return (
136
156
  <section className="node state" data-testid={`state-${node.key}`}>
137
157
  {`type` in node ? (
@@ -139,6 +159,7 @@ export const StateIndexNode: FC<{
139
159
  node={node}
140
160
  isOpenState={isOpenState}
141
161
  typeState={typeState}
162
+ dispose={dispose}
142
163
  />
143
164
  ) : (
144
165
  <StateIndexTreeNode node={node} isOpenState={isOpenState} />
@@ -148,26 +169,29 @@ export const StateIndexNode: FC<{
148
169
  }
149
170
 
150
171
  export const StateIndex: FC<{
151
- tokenIndex: ReadonlyPureSelectorToken<
152
- WritableTokenIndex<ReadableToken<unknown>>
153
- >
172
+ tokenIndex: AtomToken<WritableTokenIndex<ReadableToken<unknown>>>
154
173
  }> = ({ tokenIndex }) => {
155
174
  const tokenIds = useO(tokenIndex)
156
175
 
157
176
  const { typeSelectors, viewIsOpenAtoms, store } = useContext(DevtoolsContext)
177
+ const statesName = tokenIndex.key.includes(`Atom`) ? `atoms` : `selectors`
158
178
 
159
179
  return (
160
180
  <article className="index state_index" data-testid="state-index">
161
- {[...tokenIds.entries()].map(([key, node]) => {
162
- return (
163
- <StateIndexNode
164
- key={key}
165
- node={node}
166
- isOpenState={findInStore(store, viewIsOpenAtoms, [node.key])}
167
- typeState={findInStore(store, typeSelectors, node.key)}
168
- />
169
- )
170
- })}
181
+ {tokenIds.size === 0 ? (
182
+ <p className="index-empty-state">(no {statesName})</p>
183
+ ) : (
184
+ [...tokenIds.entries()].map(([key, node]) => {
185
+ return (
186
+ <StateIndexNode
187
+ key={key}
188
+ node={node}
189
+ isOpenState={findInStore(store, viewIsOpenAtoms, [node.key])}
190
+ typeState={findInStore(store, typeSelectors, node.key)}
191
+ />
192
+ )
193
+ })
194
+ )}
171
195
  </article>
172
196
  )
173
197
  }
@@ -95,18 +95,22 @@ export const TimelineIndex: FC = () => {
95
95
 
96
96
  return (
97
97
  <article className="index timeline_index" data-testid="timeline-index">
98
- {tokenIds
99
- .filter((token) => !token.key.startsWith(`👁‍🗨`))
100
- .map((token) => {
101
- return (
102
- <TimelineLog
103
- key={token.key}
104
- token={token}
105
- isOpenState={findInStore(store, viewIsOpenAtoms, [token.key])}
106
- timelineState={findInStore(store, timelineSelectors, token.key)}
107
- />
108
- )
109
- })}
98
+ {tokenIds.length === 0 ? (
99
+ <p className="index-empty-state">(no timelines)</p>
100
+ ) : (
101
+ tokenIds
102
+ .filter((token) => !token.key.startsWith(`👁‍🗨`))
103
+ .map((token) => {
104
+ return (
105
+ <TimelineLog
106
+ key={token.key}
107
+ token={token}
108
+ isOpenState={findInStore(store, viewIsOpenAtoms, [token.key])}
109
+ timelineState={findInStore(store, timelineSelectors, token.key)}
110
+ />
111
+ )
112
+ })
113
+ )}
110
114
  </article>
111
115
  )
112
116
  }
@@ -27,15 +27,15 @@ export const TransactionLog: FC<{
27
27
  data-testid={`transaction-${token.key}`}
28
28
  >
29
29
  <header>
30
- <button.OpenClose
31
- isOpen={isOpen}
32
- testid={`open-close-transaction-${token.key}`}
33
- setIsOpen={setIsOpen}
34
- />
35
30
  <main>
31
+ <button.OpenClose
32
+ isOpen={isOpen}
33
+ testid={`open-close-transaction-${token.key}`}
34
+ setIsOpen={setIsOpen}
35
+ />
36
36
  <h2>{token.key}</h2>
37
- <span className="detail length">({log.length})</span>
38
37
  </main>
38
+ <span className="detail length">({log.length})</span>
39
39
  </header>
40
40
  {isOpen ? (
41
41
  <main>
@@ -59,18 +59,22 @@ export const TransactionIndex: FC = () => {
59
59
  const tokenIds = useO(transactionIndex)
60
60
  return (
61
61
  <article className="index transaction_index" data-testid="transaction-index">
62
- {tokenIds
63
- .filter((token) => !token.key.startsWith(`🔍`))
64
- .map((token) => {
65
- return (
66
- <TransactionLog
67
- key={token.key}
68
- token={token}
69
- isOpenState={findInStore(store, viewIsOpenAtoms, [token.key])}
70
- logState={findInStore(store, transactionLogSelectors, token.key)}
71
- />
72
- )
73
- })}
62
+ {tokenIds.length === 0 ? (
63
+ <p className="index-empty-state">(no transactions)</p>
64
+ ) : (
65
+ tokenIds
66
+ .filter((token) => !token.key.startsWith(`🔍`))
67
+ .map((token) => {
68
+ return (
69
+ <TransactionLog
70
+ key={token.key}
71
+ token={token}
72
+ isOpenState={findInStore(store, viewIsOpenAtoms, [token.key])}
73
+ logState={findInStore(store, transactionLogSelectors, token.key)}
74
+ />
75
+ )
76
+ })
77
+ )}
74
78
  </article>
75
79
  )
76
80
  }
@@ -86,42 +86,62 @@ main[data-css="atom_io_devtools"] {
86
86
  }
87
87
  }
88
88
  }
89
+
89
90
  > main {
90
91
  background: var(--bg-tint1);
91
- }
92
- > main::before {
93
- background-color: black;
94
- height: 10px;
95
- }
96
- > main {
97
92
  overflow-y: scroll;
98
93
  flex-grow: 1;
99
94
  display: flex;
100
95
  flex-flow: column;
101
96
  gap: 0;
102
97
  article.index {
103
- margin-bottom: 24px;
104
- border-bottom: var(--fg-border);
98
+ margin-bottom: 0px;
99
+ padding-bottom: 24px;
100
+ border-top: var(--fg-border);
101
+ min-height: calc(100% - 24px);
102
+ display: flex;
103
+ flex-shrink: 0;
104
+ flex-flow: column;
105
105
  .node .node {
106
- border-right: var(--fg-border);
106
+ border-right: none;
107
107
  padding-right: 0;
108
108
  background: #ffffff08;
109
109
  @media (prefers-color-scheme: light) {
110
110
  background: #00000004;
111
111
  }
112
112
  }
113
+ .index-empty-state {
114
+ width: 100%;
115
+ height: 100%;
116
+ font-style: italic;
117
+ display: flex;
118
+ justify-content: center;
119
+ align-items: center;
120
+ }
113
121
  .node > .node {
114
122
  margin: 0px 0px 0px 9px;
123
+ width: calc(100% - 9px);
115
124
  border-left: var(--fg-border-soft);
125
+ &:first-of-type {
126
+ border-top: var(--fg-border-soft);
127
+ }
128
+ &:last-of-type {
129
+ border-bottom: none;
130
+ }
116
131
  }
117
132
  .node {
118
- border-top: var(--fg-border);
133
+ position: relative;
134
+ border-bottom: var(--fg-border-soft);
119
135
  overflow: visible;
120
-
136
+ width: 100%;
137
+ display: flex;
138
+ flex-flow: column;
121
139
  &.transaction_update {
122
140
  padding: 0;
123
141
  }
142
+
124
143
  > header {
144
+ width: auto;
125
145
  display: flex;
126
146
  flex-flow: row;
127
147
  justify-content: space-between;
@@ -131,7 +151,11 @@ main[data-css="atom_io_devtools"] {
131
151
  height: 22px;
132
152
  background: var(--bg-tint2);
133
153
  border-bottom: none;
154
+ align-items: center;
155
+ overflow: hidden;
156
+
134
157
  > main {
158
+ height: 100%;
135
159
  display: flex;
136
160
  flex-flow: row;
137
161
  cursor: help;
@@ -147,51 +171,67 @@ main[data-css="atom_io_devtools"] {
147
171
  h2 {
148
172
  margin: 0;
149
173
  }
150
- .detail {
151
- margin-left: 5px;
152
- color: #777;
153
- @media (prefers-color-scheme: light) {
154
- color: #999;
155
- }
156
- }
157
- }
158
- > .json_editor {
159
- border-left: var(--fg-border-soft);
160
- padding: 3px 0px;
161
174
  }
162
- > .json_viewer {
163
- color: var(--fg-light);
164
- font-size: 14px;
165
- flex-shrink: 1;
166
- }
167
- > .json_editor,
168
- > .json_viewer {
169
- margin-left: 3px;
175
+
176
+ > footer {
177
+ height: 16px;
178
+ width: fit-content;
179
+ min-width: 0;
170
180
  display: flex;
171
- flex-shrink: 1;
172
- z-index: -1;
173
- overflow-x: scroll;
181
+ justify-content: flex-start;
174
182
  align-items: center;
175
- white-space: pre;
176
- background: var(--bg-tint2);
177
- &:focus-within {
178
- background-color: var(--bg-max);
179
- outline: 2px solid var(--fg-max);
180
- * {
181
- color: var(--fg-max);
182
- }
183
- }
184
- &.nu * {
185
- display: flex;
186
- height: 100%;
183
+ flex-shrink: 1;
184
+ > button {
185
+ border: none;
186
+ background: none;
187
+ border-left: var(--fg-border-soft);
187
188
  }
188
- > span {
189
- padding: 0px 5px;
190
- z-index: 0;
189
+ > .json_viewer {
190
+ color: var(--fg-light);
191
+ flex-shrink: 1;
192
+ overflow: scroll;
193
+ align-self: center;
194
+ align-items: flex-start;
191
195
  }
192
- input {
193
- outline: none;
196
+ > .json_editor,
197
+ > .json_viewer {
198
+ height: 16px;
194
199
  min-width: 10px;
200
+ padding-left: 4px;
201
+ padding-right: 2px;
202
+ display: flex;
203
+ flex-flow: row;
204
+ margin-right: 0px;
205
+ overflow-x: scroll;
206
+ align-items: center;
207
+ justify-content: flex-start;
208
+ white-space: pre;
209
+ border-left: var(--fg-border-soft);
210
+ &:focus-within {
211
+ background-color: var(--bg-max);
212
+ outline: 2px solid var(--fg-max);
213
+ * {
214
+ color: var(--fg-max);
215
+ }
216
+ }
217
+ main {
218
+ height: 100%;
219
+ }
220
+ > span {
221
+ padding: 0px 5px;
222
+ z-index: 0;
223
+ }
224
+ input {
225
+ outline: none;
226
+ }
227
+ }
228
+ }
229
+
230
+ .detail {
231
+ margin-left: 5px;
232
+ color: #777;
233
+ @media (prefers-color-scheme: light) {
234
+ color: #999;
195
235
  }
196
236
  }
197
237
  }
@@ -201,8 +241,8 @@ main[data-css="atom_io_devtools"] {
201
241
  main {
202
242
  display: flex;
203
243
  flex-flow: row wrap;
204
- gap: 5px;
205
- .transaction_update {
244
+ gap: 0;
245
+ article.transaction_update {
206
246
  width: 100%;
207
247
  display: flex;
208
248
  flex-flow: row;
@@ -210,10 +250,14 @@ main[data-css="atom_io_devtools"] {
210
250
  justify-content: flex-start;
211
251
  justify-items: flex-start;
212
252
  align-content: flex-start;
213
- border-left: var(--fg-border);
253
+ border-left: none;
254
+ border-bottom: none;
214
255
  border-top: var(--fg-border);
215
256
  header {
257
+ height: 100%;
216
258
  padding: 5px;
259
+ display: flex;
260
+ flex-flow: column;
217
261
  h4 {
218
262
  margin: 0;
219
263
  padding: 0;
@@ -224,6 +268,7 @@ main[data-css="atom_io_devtools"] {
224
268
  margin-left: 0;
225
269
  display: flex;
226
270
  flex-flow: column;
271
+ flex-grow: 1;
227
272
  gap: 0px;
228
273
  border-left: 1px solid #333;
229
274
  section ~ section {
@@ -231,16 +276,22 @@ main[data-css="atom_io_devtools"] {
231
276
  }
232
277
  section {
233
278
  padding: 5px;
279
+ border-bottom: none;
280
+ margin: 0;
234
281
  &.transaction_output {
235
282
  border-right: none;
236
283
  }
237
284
  &.transaction_impact {
238
285
  padding: 5px;
239
286
  }
240
- margin: 0;
287
+
241
288
  article {
289
+ padding: 3px 6px;
242
290
  border-left: var(--fg-border);
243
291
  border-right: var(--fg-border);
292
+ &:first-of-type {
293
+ border-top: var(--fg-border);
294
+ }
244
295
  .summary {
245
296
  white-space: nowrap;
246
297
  }
@@ -250,6 +301,7 @@ main[data-css="atom_io_devtools"] {
250
301
  }
251
302
  }
252
303
  }
304
+
253
305
  section.timeline_log {
254
306
  header {
255
307
  display: flex;
@@ -290,7 +342,9 @@ main[data-css="atom_io_devtools"] {
290
342
  }
291
343
  }
292
344
  }
345
+
293
346
  > footer {
347
+ z-index: 10000;
294
348
  display: flex;
295
349
  justify-content: flex-end;
296
350
  button {
@@ -307,7 +361,6 @@ main[data-css="atom_io_devtools"] {
307
361
  .json_editor {
308
362
  display: flex;
309
363
  flex-flow: column;
310
- align-items: flex-start;
311
364
  > header {
312
365
  width: 100%;
313
366
  display: flex;
@@ -323,9 +376,10 @@ main[data-css="atom_io_devtools"] {
323
376
  display: flex;
324
377
  flex-flow: row;
325
378
  align-items: center;
379
+ align-self: center;
326
380
  flex-shrink: 1;
327
381
  overflow-x: hidden;
328
- align-self: center;
382
+ padding-right: 2px;
329
383
  > .json_viewer {
330
384
  flex-shrink: 1;
331
385
  overflow-x: scroll;
@@ -82,7 +82,7 @@ export function attachDevtoolsStates(
82
82
  > = createTransaction<
83
83
  (path: readonly (number | string)[], current?: boolean) => void
84
84
  >(store, {
85
- key: `openCloseMultiView`,
85
+ key: `🔍 Open Close All`,
86
86
  do: ({ get, set }, path, current) => {
87
87
  const currentView = get(devtoolsViewSelectionState)
88
88
  let states:
@@ -1,18 +0,0 @@
1
- import { newest } from "../lineage"
2
- import type { Store } from "../store"
3
-
4
- export const isAtomDefault = (store: Store, key: string): boolean => {
5
- const core = newest(store)
6
- return core.atomsThatAreDefault.has(key)
7
- }
8
-
9
- export const markAtomAsDefault = (store: Store, key: string): void => {
10
- const core = newest(store)
11
- core.atomsThatAreDefault = new Set(core.atomsThatAreDefault).add(key)
12
- }
13
-
14
- export const markAtomAsNotDefault = (store: Store, key: string): void => {
15
- const core = newest(store)
16
- core.atomsThatAreDefault = new Set(newest(store).atomsThatAreDefault)
17
- core.atomsThatAreDefault.delete(key)
18
- }