atom.io 0.6.7 → 0.6.9
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/index.d.mts +241 -263
- package/dist/index.d.ts +241 -263
- package/dist/index.js +28 -1911
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -1871
- package/dist/index.mjs.map +1 -1
- package/introspection/dist/index.d.mts +121 -176
- package/introspection/dist/index.d.ts +121 -176
- package/introspection/dist/index.js +6 -346
- package/introspection/dist/index.js.map +1 -1
- package/introspection/dist/index.mjs +5 -324
- package/introspection/dist/index.mjs.map +1 -1
- package/json/dist/index.d.mts +37 -8
- package/json/dist/index.d.ts +37 -8
- package/json/dist/index.js +31 -48
- package/json/dist/index.js.map +1 -1
- package/json/dist/index.mjs +6 -14
- package/json/dist/index.mjs.map +1 -1
- package/package.json +30 -14
- package/react/dist/index.js +34 -83
- package/react/dist/index.js.map +1 -1
- package/react/dist/index.mjs +7 -43
- package/react/dist/index.mjs.map +1 -1
- package/react-devtools/dist/index.css +1 -42
- package/react-devtools/dist/index.css.map +1 -1
- package/react-devtools/dist/index.d.mts +128 -193
- package/react-devtools/dist/index.d.ts +128 -193
- package/react-devtools/dist/index.js +56 -4154
- package/react-devtools/dist/index.js.map +1 -1
- package/react-devtools/dist/index.mjs +19 -4117
- package/react-devtools/dist/index.mjs.map +1 -1
- package/realtime/dist/index.d.mts +7 -11
- package/realtime/dist/index.d.ts +7 -11
- package/realtime/dist/index.js +26 -185
- package/realtime/dist/index.js.map +1 -1
- package/realtime/dist/index.mjs +4 -149
- package/realtime/dist/index.mjs.map +1 -1
- package/realtime-react/dist/index.d.mts +12 -16
- package/realtime-react/dist/index.d.ts +12 -16
- package/realtime-react/dist/index.js +41 -214
- package/realtime-react/dist/index.js.map +1 -1
- package/realtime-react/dist/index.mjs +9 -169
- package/realtime-react/dist/index.mjs.map +1 -1
- package/src/atom.ts +7 -6
- package/src/index.ts +12 -9
- package/src/logger.ts +5 -5
- package/src/selector.ts +16 -14
- package/src/silo.ts +36 -39
- package/src/subscribe.ts +25 -20
- package/src/timeline.ts +9 -4
- package/src/transaction.ts +3 -4
- package/src/internal/atom-internal.ts +0 -54
- package/src/internal/families-internal.ts +0 -141
- package/src/internal/get.ts +0 -129
- package/src/internal/index.ts +0 -15
- package/src/internal/is-default.ts +0 -35
- package/src/internal/operation.ts +0 -139
- package/src/internal/selector/create-read-write-selector.ts +0 -66
- package/src/internal/selector/create-readonly-selector.ts +0 -46
- package/src/internal/selector/index.ts +0 -4
- package/src/internal/selector/lookup-selector-sources.ts +0 -16
- package/src/internal/selector/register-selector.ts +0 -57
- package/src/internal/selector/trace-selector-atoms.ts +0 -43
- package/src/internal/selector/update-selector-atoms.ts +0 -33
- package/src/internal/selector-internal.ts +0 -58
- package/src/internal/set.ts +0 -99
- package/src/internal/store.ts +0 -151
- package/src/internal/subject.ts +0 -24
- package/src/internal/subscribe-internal.ts +0 -88
- package/src/internal/time-travel-internal.ts +0 -91
- package/src/internal/timeline/add-atom-to-timeline.ts +0 -168
- package/src/internal/timeline/index.ts +0 -1
- package/src/internal/timeline-internal.ts +0 -107
- package/src/internal/transaction/abort-transaction.ts +0 -12
- package/src/internal/transaction/apply-transaction.ts +0 -57
- package/src/internal/transaction/build-transaction.ts +0 -33
- package/src/internal/transaction/index.ts +0 -25
- package/src/internal/transaction/redo-transaction.ts +0 -23
- package/src/internal/transaction/undo-transaction.ts +0 -23
- package/src/internal/transaction-internal.ts +0 -61
- package/src/introspection/attach-atom-index.ts +0 -73
- package/src/introspection/attach-introspection-states.ts +0 -42
- package/src/introspection/attach-selector-index.ts +0 -77
- package/src/introspection/attach-timeline-family.ts +0 -59
- package/src/introspection/attach-timeline-index.ts +0 -36
- package/src/introspection/attach-transaction-index.ts +0 -38
- package/src/introspection/attach-transaction-logs.ts +0 -40
- package/src/introspection/index.ts +0 -20
- package/src/json/index.ts +0 -1
- package/src/json/select-json.ts +0 -18
- package/src/react/index.ts +0 -2
- package/src/react/store-context.tsx +0 -13
- package/src/react/store-hooks.ts +0 -47
- package/src/react-devtools/AtomIODevtools.tsx +0 -107
- package/src/react-devtools/Button.tsx +0 -24
- package/src/react-devtools/StateEditor.tsx +0 -70
- package/src/react-devtools/StateIndex.tsx +0 -153
- package/src/react-devtools/TimelineIndex.tsx +0 -92
- package/src/react-devtools/TransactionIndex.tsx +0 -70
- package/src/react-devtools/Updates.tsx +0 -145
- package/src/react-devtools/devtools.scss +0 -311
- package/src/react-devtools/index.ts +0 -72
- package/src/react-explorer/AtomIOExplorer.tsx +0 -218
- package/src/react-explorer/explorer-effects.ts +0 -20
- package/src/react-explorer/explorer-states.ts +0 -217
- package/src/react-explorer/index.ts +0 -23
- package/src/react-explorer/space-states.ts +0 -72
- package/src/react-explorer/view-states.ts +0 -41
- package/src/realtime/README.md +0 -33
- package/src/realtime/hook-composition/expose-family.ts +0 -101
- package/src/realtime/hook-composition/expose-single.ts +0 -38
- package/src/realtime/hook-composition/expose-timeline.ts +0 -60
- package/src/realtime/hook-composition/index.ts +0 -12
- package/src/realtime/hook-composition/receive-state.ts +0 -29
- package/src/realtime/hook-composition/receive-transaction.ts +0 -18
- package/src/realtime/index.ts +0 -1
- package/src/realtime-react/index.ts +0 -3
- package/src/realtime-react/realtime-context.tsx +0 -30
- package/src/realtime-react/realtime-hooks.ts +0 -39
- package/src/realtime-react/realtime-state.ts +0 -10
- package/src/realtime-react/use-pull-family-member.ts +0 -26
- package/src/realtime-react/use-pull-family.ts +0 -24
- package/src/realtime-react/use-pull.ts +0 -22
- package/src/realtime-react/use-push.ts +0 -25
- package/src/realtime-react/use-server-action.ts +0 -33
- package/src/realtime-testing/index.ts +0 -1
- package/src/realtime-testing/setup-realtime-test.tsx +0 -159
- package/src/web-effects/index.ts +0 -1
- package/src/web-effects/storage.ts +0 -30
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import type { ƒn } from "~/packages/anvl/src/function"
|
|
2
|
-
import { discoverType } from "~/packages/anvl/src/refinement/refinery"
|
|
3
|
-
|
|
4
|
-
import { prettyJson } from "."
|
|
5
|
-
import type { KeyedStateUpdate } from "../subscribe"
|
|
6
|
-
import type { TimelineUpdate } from "../timeline"
|
|
7
|
-
import type { TransactionUpdate } from "../transaction"
|
|
8
|
-
|
|
9
|
-
const AtomUpdateFC: React.FC<{
|
|
10
|
-
serialNumber: number
|
|
11
|
-
atomUpdate: KeyedStateUpdate<unknown>
|
|
12
|
-
}> = ({ atomUpdate }) => {
|
|
13
|
-
return (
|
|
14
|
-
<article
|
|
15
|
-
key={atomUpdate.key}
|
|
16
|
-
className="node atom_update"
|
|
17
|
-
onClick={() => console.log(atomUpdate)}
|
|
18
|
-
onKeyUp={() => console.log(atomUpdate)}
|
|
19
|
-
>
|
|
20
|
-
<span className="detail">{atomUpdate.key}: </span>
|
|
21
|
-
<span>
|
|
22
|
-
<span className="summary">
|
|
23
|
-
{prettyJson.diff(atomUpdate.oldValue, atomUpdate.newValue).summary}
|
|
24
|
-
</span>
|
|
25
|
-
</span>
|
|
26
|
-
</article>
|
|
27
|
-
)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const TransactionUpdateFC: React.FC<{
|
|
31
|
-
serialNumber: number
|
|
32
|
-
transactionUpdate: TransactionUpdate<ƒn>
|
|
33
|
-
}> = ({ serialNumber, transactionUpdate }) => {
|
|
34
|
-
return (
|
|
35
|
-
<article className="node transaction_update">
|
|
36
|
-
<header>
|
|
37
|
-
<h4>{serialNumber}</h4>
|
|
38
|
-
</header>
|
|
39
|
-
<main>
|
|
40
|
-
<section className="transaction_params">
|
|
41
|
-
<span className="detail">params: </span>
|
|
42
|
-
{transactionUpdate.params.map((param, index) => {
|
|
43
|
-
return (
|
|
44
|
-
<article
|
|
45
|
-
key={`param` + index}
|
|
46
|
-
className="node transaction_param"
|
|
47
|
-
onClick={() => console.log(transactionUpdate)}
|
|
48
|
-
onKeyUp={() => console.log(transactionUpdate)}
|
|
49
|
-
>
|
|
50
|
-
<span className="detail">{discoverType(param)}: </span>
|
|
51
|
-
<span className="summary">
|
|
52
|
-
{typeof param === `object` &&
|
|
53
|
-
`type` in param &&
|
|
54
|
-
`target` in param ? (
|
|
55
|
-
<>{JSON.stringify(param.type)}</>
|
|
56
|
-
) : (
|
|
57
|
-
<>{JSON.stringify(param)}</>
|
|
58
|
-
)}
|
|
59
|
-
</span>
|
|
60
|
-
</article>
|
|
61
|
-
)
|
|
62
|
-
})}
|
|
63
|
-
</section>
|
|
64
|
-
<section className="node transaction_output">
|
|
65
|
-
<span className="detail">output: </span>
|
|
66
|
-
<span className="detail">
|
|
67
|
-
{discoverType(transactionUpdate.output)}
|
|
68
|
-
</span>
|
|
69
|
-
{transactionUpdate.output ? (
|
|
70
|
-
<span className="summary">
|
|
71
|
-
: {JSON.stringify(transactionUpdate.output)}
|
|
72
|
-
</span>
|
|
73
|
-
) : null}
|
|
74
|
-
</section>
|
|
75
|
-
<section className="transaction_impact">
|
|
76
|
-
<span className="detail">impact: </span>
|
|
77
|
-
{transactionUpdate.atomUpdates
|
|
78
|
-
.filter((token) => !token.key.startsWith(`👁🗨`))
|
|
79
|
-
.map((atomUpdate, index) => {
|
|
80
|
-
return (
|
|
81
|
-
<article.AtomUpdate
|
|
82
|
-
key={`${transactionUpdate.key}:${index}:${atomUpdate.key}`}
|
|
83
|
-
serialNumber={index}
|
|
84
|
-
atomUpdate={atomUpdate}
|
|
85
|
-
/>
|
|
86
|
-
)
|
|
87
|
-
})}
|
|
88
|
-
</section>
|
|
89
|
-
</main>
|
|
90
|
-
</article>
|
|
91
|
-
)
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export const TimelineUpdateFC: React.FC<{
|
|
95
|
-
timelineUpdate: TimelineUpdate
|
|
96
|
-
}> = ({ timelineUpdate }) => {
|
|
97
|
-
return (
|
|
98
|
-
<article className="node timeline_update">
|
|
99
|
-
<header>
|
|
100
|
-
<h4>
|
|
101
|
-
{timelineUpdate.timestamp}: {timelineUpdate.type} ({timelineUpdate.key}
|
|
102
|
-
)
|
|
103
|
-
</h4>
|
|
104
|
-
</header>
|
|
105
|
-
<main>
|
|
106
|
-
{timelineUpdate.type === `transaction_update` ? (
|
|
107
|
-
timelineUpdate.atomUpdates
|
|
108
|
-
.filter((token) => !token.key.startsWith(`👁🗨`))
|
|
109
|
-
.map((atomUpdate, index) => {
|
|
110
|
-
return (
|
|
111
|
-
<article.AtomUpdate
|
|
112
|
-
key={`${timelineUpdate.key}:${index}:${atomUpdate.key}`}
|
|
113
|
-
serialNumber={index}
|
|
114
|
-
atomUpdate={atomUpdate}
|
|
115
|
-
/>
|
|
116
|
-
)
|
|
117
|
-
})
|
|
118
|
-
) : timelineUpdate.type === `selector_update` ? (
|
|
119
|
-
timelineUpdate.atomUpdates
|
|
120
|
-
.filter((token) => !token.key.startsWith(`👁🗨`))
|
|
121
|
-
.map((atomUpdate, index) => {
|
|
122
|
-
return (
|
|
123
|
-
<article.AtomUpdate
|
|
124
|
-
key={`${timelineUpdate.key}:${index}:${atomUpdate.key}`}
|
|
125
|
-
serialNumber={index}
|
|
126
|
-
atomUpdate={atomUpdate}
|
|
127
|
-
/>
|
|
128
|
-
)
|
|
129
|
-
})
|
|
130
|
-
) : timelineUpdate.type === `atom_update` ? (
|
|
131
|
-
<article.AtomUpdate
|
|
132
|
-
serialNumber={timelineUpdate.timestamp}
|
|
133
|
-
atomUpdate={timelineUpdate}
|
|
134
|
-
/>
|
|
135
|
-
) : null}
|
|
136
|
-
</main>
|
|
137
|
-
</article>
|
|
138
|
-
)
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
export const article = {
|
|
142
|
-
AtomUpdate: AtomUpdateFC,
|
|
143
|
-
TransactionUpdate: TransactionUpdateFC,
|
|
144
|
-
TimelineUpdate: TimelineUpdateFC,
|
|
145
|
-
}
|
|
@@ -1,311 +0,0 @@
|
|
|
1
|
-
main.atom_io_devtools {
|
|
2
|
-
--fg-color: #eee;
|
|
3
|
-
--bg-color: #111;
|
|
4
|
-
--bg-tint1: #222;
|
|
5
|
-
--fg-border: 1px solid var(--fg-color);
|
|
6
|
-
@media (prefers-color-scheme: light) {
|
|
7
|
-
--fg-color: #444;
|
|
8
|
-
--bg-color: #ddd;
|
|
9
|
-
--bg-tint1: #e3e3e3;
|
|
10
|
-
}
|
|
11
|
-
box-sizing: border-box;
|
|
12
|
-
color: var(--fg-color);
|
|
13
|
-
background-color: var(--bg-color);
|
|
14
|
-
border: 2px solid var(--fg-color);
|
|
15
|
-
position: fixed;
|
|
16
|
-
right: 0;
|
|
17
|
-
bottom: 0;
|
|
18
|
-
height: 100%;
|
|
19
|
-
display: flex;
|
|
20
|
-
flex-flow: column;
|
|
21
|
-
max-height: 800px;
|
|
22
|
-
width: 100%;
|
|
23
|
-
max-width: 500px;
|
|
24
|
-
overflow-y: scroll;
|
|
25
|
-
* {
|
|
26
|
-
font-size: 16px;
|
|
27
|
-
font-family: theia, monospace;
|
|
28
|
-
}
|
|
29
|
-
> header {
|
|
30
|
-
padding: 5px;
|
|
31
|
-
padding-left: 10px;
|
|
32
|
-
padding-bottom: 0;
|
|
33
|
-
display: flex;
|
|
34
|
-
justify-content: space-between;
|
|
35
|
-
h1 {
|
|
36
|
-
font-size: inherit;
|
|
37
|
-
margin: 0;
|
|
38
|
-
font-size: 24px;
|
|
39
|
-
font-family: charter;
|
|
40
|
-
}
|
|
41
|
-
nav {
|
|
42
|
-
display: flex;
|
|
43
|
-
flex-flow: row nowrap;
|
|
44
|
-
button {
|
|
45
|
-
cursor: pointer;
|
|
46
|
-
background: none;
|
|
47
|
-
border: none;
|
|
48
|
-
padding: none;
|
|
49
|
-
margin-bottom: -2px;
|
|
50
|
-
z-index: 1000;
|
|
51
|
-
&:disabled {
|
|
52
|
-
cursor: default;
|
|
53
|
-
background-color: var(--bg-tint1);
|
|
54
|
-
color: var(--fg-color);
|
|
55
|
-
border: var(--fg-border);
|
|
56
|
-
border-bottom: none;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
> main {
|
|
62
|
-
background: var(--bg-tint1);
|
|
63
|
-
}
|
|
64
|
-
main {
|
|
65
|
-
overflow-y: scroll;
|
|
66
|
-
flex-grow: 1;
|
|
67
|
-
display: flex;
|
|
68
|
-
flex-flow: column;
|
|
69
|
-
gap: 0;
|
|
70
|
-
article.index {
|
|
71
|
-
.node .node {
|
|
72
|
-
border-right: var(--fg-border);
|
|
73
|
-
padding-right: 0;
|
|
74
|
-
background: #fff3;
|
|
75
|
-
}
|
|
76
|
-
.node > .node {
|
|
77
|
-
margin: 5px 0;
|
|
78
|
-
margin-left: 12px;
|
|
79
|
-
border-left: var(--fg-border);
|
|
80
|
-
}
|
|
81
|
-
.node {
|
|
82
|
-
border-top: var(--fg-border);
|
|
83
|
-
overflow-x: scroll;
|
|
84
|
-
padding: 5px;
|
|
85
|
-
&:last-of-type {
|
|
86
|
-
border-bottom: var(--fg-border);
|
|
87
|
-
}
|
|
88
|
-
&.transaction_update {
|
|
89
|
-
padding: 0;
|
|
90
|
-
}
|
|
91
|
-
header {
|
|
92
|
-
display: flex;
|
|
93
|
-
flex-flow: row;
|
|
94
|
-
gap: 5px;
|
|
95
|
-
position: sticky;
|
|
96
|
-
z-index: 999;
|
|
97
|
-
top: 0;
|
|
98
|
-
button.carat {
|
|
99
|
-
cursor: pointer;
|
|
100
|
-
background: none;
|
|
101
|
-
border: none;
|
|
102
|
-
width: 20px;
|
|
103
|
-
&.open {
|
|
104
|
-
transform: rotate(90deg);
|
|
105
|
-
}
|
|
106
|
-
&:disabled {
|
|
107
|
-
cursor: default;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
label {
|
|
111
|
-
display: flex;
|
|
112
|
-
flex-flow: row;
|
|
113
|
-
gap: 5px;
|
|
114
|
-
cursor: help;
|
|
115
|
-
h2 {
|
|
116
|
-
display: inline-block;
|
|
117
|
-
margin: 0;
|
|
118
|
-
}
|
|
119
|
-
.detail {
|
|
120
|
-
color: #777;
|
|
121
|
-
@media (prefers-color-scheme: light) {
|
|
122
|
-
color: #999;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
main {
|
|
128
|
-
margin-left: 15px;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
section.transaction_log {
|
|
132
|
-
margin-top: 0;
|
|
133
|
-
header: {
|
|
134
|
-
padding: 5px;
|
|
135
|
-
}
|
|
136
|
-
main {
|
|
137
|
-
display: flex;
|
|
138
|
-
flex-flow: row wrap;
|
|
139
|
-
gap: 5px;
|
|
140
|
-
.transaction_update {
|
|
141
|
-
width: 100%;
|
|
142
|
-
display: flex;
|
|
143
|
-
flex-flow: row;
|
|
144
|
-
align-items: flex-start;
|
|
145
|
-
justify-content: flex-start;
|
|
146
|
-
justify-items: flex-start;
|
|
147
|
-
align-content: flex-start;
|
|
148
|
-
border-left: var(--fg-border);
|
|
149
|
-
border-top: var(--fg-border);
|
|
150
|
-
header {
|
|
151
|
-
padding: 5px;
|
|
152
|
-
h4 {
|
|
153
|
-
margin: 0;
|
|
154
|
-
padding: 0;
|
|
155
|
-
font-size: inherit;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
main {
|
|
159
|
-
margin-left: 0;
|
|
160
|
-
display: flex;
|
|
161
|
-
flex-flow: column;
|
|
162
|
-
gap: 0px;
|
|
163
|
-
border-left: 1px solid #333;
|
|
164
|
-
section ~ section {
|
|
165
|
-
border-top: 1px solid #333;
|
|
166
|
-
}
|
|
167
|
-
section {
|
|
168
|
-
padding: 5px;
|
|
169
|
-
&.transaction_output {
|
|
170
|
-
border-right: none;
|
|
171
|
-
}
|
|
172
|
-
&.transaction_impact {
|
|
173
|
-
padding: 5px;
|
|
174
|
-
}
|
|
175
|
-
margin: 0;
|
|
176
|
-
article {
|
|
177
|
-
border-left: var(--fg-border);
|
|
178
|
-
border-right: var(--fg-border);
|
|
179
|
-
.summary {
|
|
180
|
-
white-space: nowrap;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
section.timeline_log {
|
|
189
|
-
header {
|
|
190
|
-
display: flex;
|
|
191
|
-
label {
|
|
192
|
-
display: flex;
|
|
193
|
-
width: 100%;
|
|
194
|
-
flex-grow: 1;
|
|
195
|
-
.gap {
|
|
196
|
-
flex-grow: 1;
|
|
197
|
-
}
|
|
198
|
-
nav {
|
|
199
|
-
display: flex;
|
|
200
|
-
flex-flow: row nowrap;
|
|
201
|
-
gap: 5px;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
.timeline_update {
|
|
206
|
-
padding: 5px;
|
|
207
|
-
border-left: var(--fg-border);
|
|
208
|
-
h4 {
|
|
209
|
-
margin: 0;
|
|
210
|
-
padding: 0;
|
|
211
|
-
font-size: inherit;
|
|
212
|
-
}
|
|
213
|
-
main {
|
|
214
|
-
margin: 0;
|
|
215
|
-
.node.atom_update {
|
|
216
|
-
border-left: var(--fg-border);
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
.you_are_here {
|
|
221
|
-
background: var(--fg-color);
|
|
222
|
-
color: var(--bg-color);
|
|
223
|
-
text-align: center;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
footer {
|
|
229
|
-
display: flex;
|
|
230
|
-
justify-content: flex-end;
|
|
231
|
-
button {
|
|
232
|
-
cursor: pointer;
|
|
233
|
-
background: none;
|
|
234
|
-
border: none;
|
|
235
|
-
padding: none;
|
|
236
|
-
position: absolute;
|
|
237
|
-
right: 0;
|
|
238
|
-
bottom: 0;
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
.json_editor {
|
|
243
|
-
input {
|
|
244
|
-
// font-size: 20px;
|
|
245
|
-
font-family: theia;
|
|
246
|
-
border: none;
|
|
247
|
-
border-bottom: 1px solid;
|
|
248
|
-
background: none;
|
|
249
|
-
&:disabled {
|
|
250
|
-
border: none;
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
button {
|
|
254
|
-
background: none;
|
|
255
|
-
margin-left: auto;
|
|
256
|
-
color: #777;
|
|
257
|
-
border: none;
|
|
258
|
-
font-family: theia;
|
|
259
|
-
font-size: 14px;
|
|
260
|
-
margin: none;
|
|
261
|
-
padding: 4px;
|
|
262
|
-
padding-bottom: 6px;
|
|
263
|
-
cursor: pointer;
|
|
264
|
-
&:hover {
|
|
265
|
-
color: #333;
|
|
266
|
-
background-color: #aaa;
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
select {
|
|
270
|
-
font-family: theia;
|
|
271
|
-
font-size: 14px;
|
|
272
|
-
background: none;
|
|
273
|
-
border: none;
|
|
274
|
-
color: #777;
|
|
275
|
-
@media (prefers-color-scheme: light) {
|
|
276
|
-
color: #999;
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
.json_editor_unofficial {
|
|
280
|
-
background-color: #777;
|
|
281
|
-
button {
|
|
282
|
-
color: #333;
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
.json_editor_missing {
|
|
286
|
-
background-color: #f055;
|
|
287
|
-
}
|
|
288
|
-
.json_editor_key {
|
|
289
|
-
padding-right: 10px;
|
|
290
|
-
input {
|
|
291
|
-
color: #999;
|
|
292
|
-
@media (prefers-color-scheme: light) {
|
|
293
|
-
color: #777;
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
.json_editor_object {
|
|
298
|
-
border-left: 2px solid #333;
|
|
299
|
-
padding-left: 20px;
|
|
300
|
-
@media (prefers-color-scheme: light) {
|
|
301
|
-
border-color: #ccc;
|
|
302
|
-
}
|
|
303
|
-
.json_editor_properties {
|
|
304
|
-
> * {
|
|
305
|
-
border-bottom: var(--fg-border);
|
|
306
|
-
margin-bottom: 2px;
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { isPlainObject } from "~/packages/anvl/src/object"
|
|
2
|
-
import { Refinery } from "~/packages/anvl/src/refinement/refinery"
|
|
3
|
-
import {
|
|
4
|
-
diffArray,
|
|
5
|
-
diffBoolean,
|
|
6
|
-
diffNumber,
|
|
7
|
-
diffObject,
|
|
8
|
-
diffString,
|
|
9
|
-
Differ,
|
|
10
|
-
} from "~/packages/anvl/src/tree/differ"
|
|
11
|
-
|
|
12
|
-
import { atom, atomFamily } from ".."
|
|
13
|
-
import { attachIntrospectionStates } from "../introspection"
|
|
14
|
-
import { lazyLocalStorageEffect } from "../web-effects"
|
|
15
|
-
|
|
16
|
-
export * from "./AtomIODevtools"
|
|
17
|
-
|
|
18
|
-
export const {
|
|
19
|
-
atomIndex,
|
|
20
|
-
selectorIndex,
|
|
21
|
-
transactionIndex,
|
|
22
|
-
findTransactionLogState,
|
|
23
|
-
timelineIndex,
|
|
24
|
-
findTimelineState,
|
|
25
|
-
} = attachIntrospectionStates()
|
|
26
|
-
|
|
27
|
-
export const devtoolsAreOpenState = atom<boolean>({
|
|
28
|
-
key: `👁🗨 Devtools Are Open`,
|
|
29
|
-
default: true,
|
|
30
|
-
effects: [lazyLocalStorageEffect(`👁🗨 Devtools Are Open`)],
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
type DevtoolsView = `atoms` | `selectors` | `timelines` | `transactions`
|
|
34
|
-
|
|
35
|
-
export const devtoolsViewSelectionState = atom<DevtoolsView>({
|
|
36
|
-
key: `👁🗨 Devtools View Selection`,
|
|
37
|
-
default: `atoms`,
|
|
38
|
-
effects: [lazyLocalStorageEffect(`👁🗨 Devtools View`)],
|
|
39
|
-
})
|
|
40
|
-
|
|
41
|
-
export const devtoolsViewOptionsState = atom<DevtoolsView[]>({
|
|
42
|
-
key: `👁🗨 Devtools View Options`,
|
|
43
|
-
default: [`atoms`, `selectors`, `transactions`, `timelines`],
|
|
44
|
-
effects: [lazyLocalStorageEffect(`👁🗨 Devtools View Options`)],
|
|
45
|
-
})
|
|
46
|
-
|
|
47
|
-
export const findViewIsOpenState = atomFamily<boolean, string>({
|
|
48
|
-
key: `👁🗨 Devtools View Is Open`,
|
|
49
|
-
default: false,
|
|
50
|
-
effects: (key) => [lazyLocalStorageEffect(key + `:view-is-open`)],
|
|
51
|
-
})
|
|
52
|
-
|
|
53
|
-
export const primitiveRefinery = new Refinery({
|
|
54
|
-
number: (input: unknown): input is number => typeof input === `number`,
|
|
55
|
-
string: (input: unknown): input is string => typeof input === `string`,
|
|
56
|
-
boolean: (input: unknown): input is boolean => typeof input === `boolean`,
|
|
57
|
-
null: (input: unknown): input is null => input === null,
|
|
58
|
-
})
|
|
59
|
-
|
|
60
|
-
export const jsonTreeRefinery = new Refinery({
|
|
61
|
-
object: isPlainObject,
|
|
62
|
-
array: (input: unknown): input is unknown[] => Array.isArray(input),
|
|
63
|
-
})
|
|
64
|
-
|
|
65
|
-
export const prettyJson = new Differ(primitiveRefinery, jsonTreeRefinery, {
|
|
66
|
-
number: diffNumber,
|
|
67
|
-
string: diffString,
|
|
68
|
-
boolean: diffBoolean,
|
|
69
|
-
null: () => ({ summary: `No Change` }),
|
|
70
|
-
object: diffObject,
|
|
71
|
-
array: diffArray,
|
|
72
|
-
})
|