atom.io 0.33.12 → 0.33.14
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.js.map +1 -1
- package/dist/eslint-plugin/index.js.map +1 -1
- package/dist/internal/index.js +25 -23
- package/dist/internal/index.js.map +1 -1
- package/dist/introspection/index.d.ts +7 -7
- package/dist/introspection/index.d.ts.map +1 -1
- package/dist/introspection/index.js +26 -38
- package/dist/introspection/index.js.map +1 -1
- package/dist/json/index.js.map +1 -1
- package/dist/main/index.js +11 -11
- package/dist/main/index.js.map +1 -1
- package/dist/react/index.js.map +1 -1
- package/dist/react-devtools/index.css +182 -96
- package/dist/react-devtools/index.css.map +1 -1
- package/dist/react-devtools/index.d.ts +1 -0
- package/dist/react-devtools/index.d.ts.map +1 -1
- package/dist/react-devtools/index.js +177 -81
- package/dist/react-devtools/index.js.map +1 -1
- package/dist/realtime/index.js.map +1 -1
- package/dist/realtime-client/index.js.map +1 -1
- package/dist/realtime-react/index.js.map +1 -1
- package/dist/realtime-server/index.js.map +1 -1
- package/dist/realtime-testing/index.js.map +1 -1
- package/dist/transceivers/set-rtx/index.js.map +1 -1
- package/dist/use-o-BrXc7Qro.js.map +1 -1
- package/dist/web/index.js.map +1 -1
- package/package.json +10 -10
- package/src/internal/transaction/create-transaction.ts +9 -5
- package/src/introspection/attach-atom-index.ts +6 -15
- package/src/introspection/attach-introspection-states.ts +5 -5
- package/src/introspection/attach-selector-index.ts +78 -85
- package/src/introspection/attach-timeline-index.ts +5 -12
- package/src/introspection/attach-transaction-index.ts +18 -16
- package/src/introspection/auditor.ts +2 -3
- package/src/react-devtools/Button.tsx +12 -4
- package/src/react-devtools/StateEditor.tsx +13 -1
- package/src/react-devtools/StateIndex.tsx +83 -39
- package/src/react-devtools/TimelineIndex.tsx +16 -12
- package/src/react-devtools/TransactionIndex.tsx +22 -18
- package/src/react-devtools/devtools.css +182 -96
- package/src/react-devtools/json-editor/developer-interface.tsx +2 -1
- package/src/react-devtools/json-editor/editors-by-type/array-editor.tsx +23 -20
- package/src/react-devtools/json-editor/editors-by-type/object-editor.tsx +7 -23
- package/src/react-devtools/json-editor/json-editor-internal.tsx +94 -77
- package/src/react-devtools/store.ts +97 -6
|
@@ -25,11 +25,13 @@ export function createTransaction<F extends Func>(
|
|
|
25
25
|
store: Store,
|
|
26
26
|
options: TransactionOptions<F>,
|
|
27
27
|
): TransactionToken<F> {
|
|
28
|
+
const { key } = options
|
|
29
|
+
const transactionAlreadyExists = store.transactions.has(key)
|
|
28
30
|
const newTransaction: Transaction<F> = {
|
|
29
|
-
key
|
|
31
|
+
key,
|
|
30
32
|
type: `transaction`,
|
|
31
33
|
run: (params: Parameters<F>, id: string) => {
|
|
32
|
-
const childStore = buildTransaction(store,
|
|
34
|
+
const childStore = buildTransaction(store, key, params, id)
|
|
33
35
|
try {
|
|
34
36
|
const target = newest(store)
|
|
35
37
|
const { toolkit } = childStore.transactionMeta
|
|
@@ -38,7 +40,7 @@ export function createTransaction<F extends Func>(
|
|
|
38
40
|
return output
|
|
39
41
|
} catch (thrown) {
|
|
40
42
|
abortTransaction(target)
|
|
41
|
-
store.logger.warn(`💥`, `transaction`,
|
|
43
|
+
store.logger.warn(`💥`, `transaction`, key, `caught:`, thrown)
|
|
42
44
|
throw thrown
|
|
43
45
|
}
|
|
44
46
|
},
|
|
@@ -46,8 +48,10 @@ export function createTransaction<F extends Func>(
|
|
|
46
48
|
subject: new Subject(),
|
|
47
49
|
}
|
|
48
50
|
const target = newest(store)
|
|
49
|
-
target.transactions.set(
|
|
51
|
+
target.transactions.set(key, newTransaction)
|
|
50
52
|
const token = deposit(newTransaction)
|
|
51
|
-
|
|
53
|
+
if (!transactionAlreadyExists) {
|
|
54
|
+
store.on.transactionCreation.next(token)
|
|
55
|
+
}
|
|
52
56
|
return token
|
|
53
57
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type { AtomToken
|
|
1
|
+
import type { AtomToken } from "atom.io"
|
|
2
2
|
import type { Store } from "atom.io/internal"
|
|
3
3
|
import {
|
|
4
4
|
createRegularAtom,
|
|
5
|
-
createStandaloneSelector,
|
|
6
5
|
deposit,
|
|
7
6
|
isReservedIntrospectionKey,
|
|
8
7
|
} from "atom.io/internal"
|
|
@@ -11,13 +10,11 @@ import type { WritableTokenIndex } from "."
|
|
|
11
10
|
|
|
12
11
|
export type AtomTokenIndex = WritableTokenIndex<AtomToken<unknown>>
|
|
13
12
|
|
|
14
|
-
export const attachAtomIndex = (
|
|
15
|
-
|
|
16
|
-
): ReadonlyPureSelectorToken<AtomTokenIndex> => {
|
|
17
|
-
const atomTokenIndexState__INTERNAL = createRegularAtom<AtomTokenIndex>(
|
|
13
|
+
export const attachAtomIndex = (store: Store): AtomToken<AtomTokenIndex> => {
|
|
14
|
+
return createRegularAtom<AtomTokenIndex>(
|
|
18
15
|
store,
|
|
19
16
|
{
|
|
20
|
-
key: `🔍 Atom Token Index
|
|
17
|
+
key: `🔍 Atom Token Index`,
|
|
21
18
|
default: () => {
|
|
22
19
|
const base: AtomTokenIndex = new Map()
|
|
23
20
|
for (const [key, val] of store.atoms) {
|
|
@@ -66,7 +63,7 @@ export const attachAtomIndex = (
|
|
|
66
63
|
} else {
|
|
67
64
|
self.set(atomToken.key, atomToken)
|
|
68
65
|
}
|
|
69
|
-
return self
|
|
66
|
+
return new Map(self)
|
|
70
67
|
})
|
|
71
68
|
})
|
|
72
69
|
store.on.atomDisposal.subscribe(`introspection`, (atomToken) => {
|
|
@@ -80,10 +77,8 @@ export const attachAtomIndex = (
|
|
|
80
77
|
self.delete(familyKey)
|
|
81
78
|
}
|
|
82
79
|
}
|
|
83
|
-
} else {
|
|
84
|
-
self.delete(atomToken.key)
|
|
85
80
|
}
|
|
86
|
-
return self
|
|
81
|
+
return new Map(self)
|
|
87
82
|
})
|
|
88
83
|
})
|
|
89
84
|
},
|
|
@@ -91,8 +86,4 @@ export const attachAtomIndex = (
|
|
|
91
86
|
},
|
|
92
87
|
undefined,
|
|
93
88
|
)
|
|
94
|
-
return createStandaloneSelector(store, {
|
|
95
|
-
key: `🔍 Atom Token Index`,
|
|
96
|
-
get: ({ get }) => get(atomTokenIndexState__INTERNAL),
|
|
97
|
-
})
|
|
98
89
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type {
|
|
2
|
+
AtomToken,
|
|
2
3
|
Loadable,
|
|
3
4
|
ReadonlyPureSelectorFamilyToken,
|
|
4
|
-
ReadonlyPureSelectorToken,
|
|
5
5
|
TimelineToken,
|
|
6
6
|
TransactionToken,
|
|
7
7
|
TransactionUpdate,
|
|
@@ -18,14 +18,14 @@ import { attachTransactionLogs } from "./attach-transaction-logs"
|
|
|
18
18
|
import { attachTypeSelectors } from "./attach-type-selectors"
|
|
19
19
|
|
|
20
20
|
export type IntrospectionStates = {
|
|
21
|
-
atomIndex:
|
|
22
|
-
selectorIndex:
|
|
23
|
-
transactionIndex:
|
|
21
|
+
atomIndex: AtomToken<AtomTokenIndex>
|
|
22
|
+
selectorIndex: AtomToken<SelectorTokenIndex>
|
|
23
|
+
transactionIndex: AtomToken<TransactionToken<Func>[]>
|
|
24
24
|
transactionLogSelectors: ReadonlyPureSelectorFamilyToken<
|
|
25
25
|
TransactionUpdate<Func>[],
|
|
26
26
|
string
|
|
27
27
|
>
|
|
28
|
-
timelineIndex:
|
|
28
|
+
timelineIndex: AtomToken<TimelineToken<any>[]>
|
|
29
29
|
timelineSelectors: ReadonlyPureSelectorFamilyToken<Timeline<any>, string>
|
|
30
30
|
typeSelectors: ReadonlyPureSelectorFamilyToken<Loadable<string>, string>
|
|
31
31
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AtomToken, SelectorToken } from "atom.io"
|
|
2
2
|
import type { Store } from "atom.io/internal"
|
|
3
3
|
import {
|
|
4
4
|
createRegularAtom,
|
|
5
|
-
createStandaloneSelector,
|
|
6
5
|
deposit,
|
|
7
6
|
isReservedIntrospectionKey,
|
|
8
7
|
} from "atom.io/internal"
|
|
@@ -13,97 +12,91 @@ export type SelectorTokenIndex = WritableTokenIndex<SelectorToken<unknown>>
|
|
|
13
12
|
|
|
14
13
|
export const attachSelectorIndex = (
|
|
15
14
|
store: Store,
|
|
16
|
-
):
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
{
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
if (
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
key: val.family.key,
|
|
36
|
-
familyMembers: new Map(),
|
|
37
|
-
}
|
|
38
|
-
base.set(val.family.key, familyNode)
|
|
15
|
+
): AtomToken<SelectorTokenIndex> => {
|
|
16
|
+
return createRegularAtom<SelectorTokenIndex>(
|
|
17
|
+
store,
|
|
18
|
+
{
|
|
19
|
+
key: `🔍 Selector Token Index`,
|
|
20
|
+
default: () => {
|
|
21
|
+
const base: SelectorTokenIndex = new Map()
|
|
22
|
+
for (const map of [store.readonlySelectors, store.writableSelectors]) {
|
|
23
|
+
for (const [key, val] of map) {
|
|
24
|
+
if (isReservedIntrospectionKey(key)) {
|
|
25
|
+
continue
|
|
26
|
+
}
|
|
27
|
+
const token = deposit(val)
|
|
28
|
+
if (val.family) {
|
|
29
|
+
let familyNode = base.get(val.family.key)
|
|
30
|
+
if (!familyNode || !(`familyMembers` in familyNode)) {
|
|
31
|
+
familyNode = {
|
|
32
|
+
key: val.family.key,
|
|
33
|
+
familyMembers: new Map(),
|
|
39
34
|
}
|
|
40
|
-
|
|
41
|
-
} else {
|
|
42
|
-
base.set(key, token)
|
|
35
|
+
base.set(val.family.key, familyNode)
|
|
43
36
|
}
|
|
37
|
+
familyNode.familyMembers.set(val.family.subKey, token)
|
|
38
|
+
} else {
|
|
39
|
+
base.set(key, token)
|
|
44
40
|
}
|
|
45
41
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
42
|
+
}
|
|
43
|
+
return base
|
|
44
|
+
},
|
|
45
|
+
effects: [
|
|
46
|
+
({ setSelf }) => {
|
|
47
|
+
store.on.selectorCreation.subscribe(
|
|
48
|
+
`introspection`,
|
|
49
|
+
(selectorToken) => {
|
|
50
|
+
if (isReservedIntrospectionKey(selectorToken.key)) {
|
|
51
|
+
return
|
|
52
|
+
}
|
|
56
53
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
self.set(familyKey, familyNode)
|
|
54
|
+
setSelf((self) => {
|
|
55
|
+
if (selectorToken.family) {
|
|
56
|
+
const { key: familyKey, subKey } = selectorToken.family
|
|
57
|
+
let familyNode = self.get(familyKey)
|
|
58
|
+
if (
|
|
59
|
+
familyNode === undefined ||
|
|
60
|
+
!(`familyMembers` in familyNode)
|
|
61
|
+
) {
|
|
62
|
+
familyNode = {
|
|
63
|
+
key: familyKey,
|
|
64
|
+
familyMembers: new Map(),
|
|
70
65
|
}
|
|
71
|
-
|
|
72
|
-
} else {
|
|
73
|
-
self.set(selectorToken.key, selectorToken)
|
|
66
|
+
self.set(familyKey, familyNode)
|
|
74
67
|
}
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
68
|
+
familyNode.familyMembers.set(subKey, selectorToken)
|
|
69
|
+
} else {
|
|
70
|
+
self.set(selectorToken.key, selectorToken)
|
|
71
|
+
}
|
|
72
|
+
return new Map(self)
|
|
73
|
+
})
|
|
74
|
+
},
|
|
75
|
+
)
|
|
79
76
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
77
|
+
store.on.selectorDisposal.subscribe(
|
|
78
|
+
`introspection`,
|
|
79
|
+
(selectorToken) => {
|
|
80
|
+
setSelf((self) => {
|
|
81
|
+
if (selectorToken.family) {
|
|
82
|
+
const { key: familyKey, subKey } = selectorToken.family
|
|
83
|
+
const familyNode = self.get(familyKey)
|
|
84
|
+
if (familyNode && `familyMembers` in familyNode) {
|
|
85
|
+
familyNode.familyMembers.delete(subKey)
|
|
86
|
+
if (familyNode.familyMembers.size === 0) {
|
|
87
|
+
self.delete(familyKey)
|
|
92
88
|
}
|
|
93
|
-
} else {
|
|
94
|
-
self.delete(selectorToken.key)
|
|
95
89
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
})
|
|
90
|
+
} else {
|
|
91
|
+
self.delete(selectorToken.key)
|
|
92
|
+
}
|
|
93
|
+
return new Map(self)
|
|
94
|
+
})
|
|
95
|
+
},
|
|
96
|
+
)
|
|
97
|
+
},
|
|
98
|
+
],
|
|
99
|
+
},
|
|
100
|
+
undefined,
|
|
101
|
+
)
|
|
109
102
|
}
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AtomToken, TimelineToken } from "atom.io"
|
|
2
2
|
import type { Store } from "atom.io/internal"
|
|
3
|
-
import { createRegularAtom
|
|
3
|
+
import { createRegularAtom } from "atom.io/internal"
|
|
4
4
|
|
|
5
5
|
export const attachTimelineIndex = (
|
|
6
6
|
store: Store,
|
|
7
|
-
):
|
|
8
|
-
|
|
9
|
-
TimelineToken<any>[]
|
|
10
|
-
>(
|
|
7
|
+
): AtomToken<TimelineToken<any>[]> => {
|
|
8
|
+
return createRegularAtom<TimelineToken<any>[]>(
|
|
11
9
|
store,
|
|
12
10
|
{
|
|
13
|
-
key: `🔍 Timeline Token Index
|
|
11
|
+
key: `🔍 Timeline Token Index`,
|
|
14
12
|
default: () =>
|
|
15
13
|
[...store.timelines].map(([key]): TimelineToken<any> => {
|
|
16
14
|
return { key, type: `timeline` }
|
|
@@ -28,9 +26,4 @@ export const attachTimelineIndex = (
|
|
|
28
26
|
},
|
|
29
27
|
undefined,
|
|
30
28
|
)
|
|
31
|
-
const timelineTokenIndex = createStandaloneSelector(store, {
|
|
32
|
-
key: `🔍 Timeline Token Index`,
|
|
33
|
-
get: ({ get }) => get(timelineTokenIndexState__INTERNAL),
|
|
34
|
-
})
|
|
35
|
-
return timelineTokenIndex
|
|
36
29
|
}
|
|
@@ -1,25 +1,32 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AtomToken, TransactionToken } from "atom.io"
|
|
2
2
|
import type { Func, Store } from "atom.io/internal"
|
|
3
|
-
import { createRegularAtom,
|
|
3
|
+
import { createRegularAtom, isReservedIntrospectionKey } from "atom.io/internal"
|
|
4
4
|
|
|
5
5
|
export const attachTransactionIndex = (
|
|
6
6
|
store: Store,
|
|
7
|
-
):
|
|
8
|
-
|
|
9
|
-
TransactionToken<Func>[]
|
|
10
|
-
>(
|
|
7
|
+
): AtomToken<TransactionToken<Func>[]> => {
|
|
8
|
+
return createRegularAtom<TransactionToken<Func>[]>(
|
|
11
9
|
store,
|
|
12
10
|
{
|
|
13
|
-
key: `🔍 Transaction Token Index
|
|
14
|
-
default: () =>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
key: `🔍 Transaction Token Index`,
|
|
12
|
+
default: () => {
|
|
13
|
+
const tokens: TransactionToken<Func>[] = []
|
|
14
|
+
for (const [key] of store.transactions) {
|
|
15
|
+
if (isReservedIntrospectionKey(key)) {
|
|
16
|
+
continue
|
|
17
|
+
}
|
|
18
|
+
tokens.push({ key, type: `transaction` })
|
|
19
|
+
}
|
|
20
|
+
return tokens
|
|
21
|
+
},
|
|
18
22
|
effects: [
|
|
19
23
|
({ setSelf }) => {
|
|
20
24
|
store.on.transactionCreation.subscribe(
|
|
21
25
|
`introspection`,
|
|
22
26
|
(transactionToken) => {
|
|
27
|
+
if (isReservedIntrospectionKey(transactionToken.key)) {
|
|
28
|
+
return
|
|
29
|
+
}
|
|
23
30
|
setSelf((state) => [...state, transactionToken])
|
|
24
31
|
},
|
|
25
32
|
)
|
|
@@ -28,9 +35,4 @@ export const attachTransactionIndex = (
|
|
|
28
35
|
},
|
|
29
36
|
undefined,
|
|
30
37
|
)
|
|
31
|
-
const transactionTokenIndex = createStandaloneSelector(store, {
|
|
32
|
-
key: `🔍 Transaction Token Index`,
|
|
33
|
-
get: ({ get }) => get(transactionTokenIndexState__INTERNAL),
|
|
34
|
-
})
|
|
35
|
-
return transactionTokenIndex
|
|
36
38
|
}
|
|
@@ -2,7 +2,6 @@ import {
|
|
|
2
2
|
type AtomToken,
|
|
3
3
|
getState,
|
|
4
4
|
type ReadableToken,
|
|
5
|
-
type ReadonlyPureSelectorToken,
|
|
6
5
|
type SelectorToken,
|
|
7
6
|
} from "atom.io"
|
|
8
7
|
import * as Internal from "atom.io/internal"
|
|
@@ -26,8 +25,8 @@ export class Auditor {
|
|
|
26
25
|
public readonly store: Internal.Store
|
|
27
26
|
public auditorCreatedAt: number = performance.now()
|
|
28
27
|
public statesCreatedAt: Map<string, number> = new Map()
|
|
29
|
-
public readonly atomIndex:
|
|
30
|
-
public readonly selectorIndex:
|
|
28
|
+
public readonly atomIndex: AtomToken<AtomTokenIndex>
|
|
29
|
+
public readonly selectorIndex: AtomToken<SelectorTokenIndex>
|
|
31
30
|
public disposed = false
|
|
32
31
|
|
|
33
32
|
private readonly unsubscribeFromAtomCreation: () => void
|
|
@@ -3,17 +3,25 @@ import type { FC } from "react"
|
|
|
3
3
|
|
|
4
4
|
export const OpenClose: FC<{
|
|
5
5
|
isOpen: boolean
|
|
6
|
-
setIsOpen
|
|
6
|
+
setIsOpen?: ((next: Modify<boolean> | boolean) => void) | undefined
|
|
7
|
+
onShiftClick?: (
|
|
8
|
+
event: React.MouseEvent<HTMLButtonElement, MouseEvent>,
|
|
9
|
+
) => boolean
|
|
7
10
|
disabled?: boolean
|
|
8
11
|
testid: string
|
|
9
|
-
}> = ({ isOpen, setIsOpen, disabled, testid }) => {
|
|
12
|
+
}> = ({ isOpen, setIsOpen, onShiftClick, disabled, testid }) => {
|
|
10
13
|
return (
|
|
11
14
|
<button
|
|
12
15
|
type="button"
|
|
13
16
|
data-testid={testid}
|
|
14
17
|
className={`carat ${isOpen ? `open` : `closed`}`}
|
|
15
|
-
onClick={() => {
|
|
16
|
-
|
|
18
|
+
onClick={(event) => {
|
|
19
|
+
if (onShiftClick && event.shiftKey) {
|
|
20
|
+
if (!onShiftClick(event)) {
|
|
21
|
+
return
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
setIsOpen?.((prev) => !prev)
|
|
17
25
|
}}
|
|
18
26
|
disabled={disabled}
|
|
19
27
|
>
|
|
@@ -9,8 +9,16 @@ export const StateEditor: FC<{
|
|
|
9
9
|
}> = ({ token }) => {
|
|
10
10
|
const set = useI(token)
|
|
11
11
|
const data = useO(token)
|
|
12
|
+
const metaPath = token.family
|
|
13
|
+
? [token.family.key, token.family.subKey]
|
|
14
|
+
: [token.key]
|
|
12
15
|
return (
|
|
13
|
-
<JsonEditor
|
|
16
|
+
<JsonEditor
|
|
17
|
+
testid={`${token.key}-state-editor`}
|
|
18
|
+
data={data}
|
|
19
|
+
set={set}
|
|
20
|
+
path={metaPath}
|
|
21
|
+
/>
|
|
14
22
|
)
|
|
15
23
|
}
|
|
16
24
|
|
|
@@ -18,12 +26,16 @@ export const ReadonlySelectorViewer: FC<{
|
|
|
18
26
|
token: ReadonlySelectorToken<unknown>
|
|
19
27
|
}> = ({ token }) => {
|
|
20
28
|
const data = useO(token)
|
|
29
|
+
const metaPath = token.family
|
|
30
|
+
? [token.family.key, token.family.subKey]
|
|
31
|
+
: [token.key]
|
|
21
32
|
return (
|
|
22
33
|
<JsonEditor
|
|
23
34
|
testid={`${token.key}-state-editor`}
|
|
24
35
|
data={data}
|
|
25
36
|
set={() => null}
|
|
26
37
|
isReadonly={() => true}
|
|
38
|
+
path={metaPath}
|
|
27
39
|
/>
|
|
28
40
|
)
|
|
29
41
|
}
|