@dxos/plugin-debug 0.8.1 → 0.8.2-main.2f9c567

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/lib/browser/DevtoolsOverviewContainer-HYNZTH2Z.mjs +19 -0
  2. package/dist/lib/browser/DevtoolsOverviewContainer-HYNZTH2Z.mjs.map +7 -0
  3. package/dist/lib/browser/{SpaceGenerator-NBOQZ4JF.mjs → SpaceGenerator-6ZW3GZSC.mjs} +36 -35
  4. package/dist/lib/browser/SpaceGenerator-6ZW3GZSC.mjs.map +7 -0
  5. package/dist/lib/browser/{app-graph-builder-ALFPRSAR.mjs → app-graph-builder-45VXMVPN.mjs} +89 -53
  6. package/dist/lib/browser/app-graph-builder-45VXMVPN.mjs.map +7 -0
  7. package/dist/lib/browser/{chunk-TCEHALD4.mjs → chunk-ZJTKMYOG.mjs} +5 -4
  8. package/dist/lib/browser/chunk-ZJTKMYOG.mjs.map +7 -0
  9. package/dist/lib/browser/index.mjs +5 -3
  10. package/dist/lib/browser/index.mjs.map +2 -2
  11. package/dist/lib/browser/meta.json +1 -1
  12. package/dist/lib/browser/{react-surface-MXXLOQYV.mjs → react-surface-UZUZU3MI.mjs} +23 -29
  13. package/dist/lib/browser/react-surface-UZUZU3MI.mjs.map +7 -0
  14. package/dist/lib/browser/{settings-AP74NCXH.mjs → settings-6SG54GZO.mjs} +4 -4
  15. package/dist/lib/browser/settings-6SG54GZO.mjs.map +7 -0
  16. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  17. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  18. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  19. package/dist/types/src/components/DebugObjectPanel.d.ts +2 -2
  20. package/dist/types/src/components/DebugObjectPanel.d.ts.map +1 -1
  21. package/dist/types/src/components/DebugStatus.d.ts.map +1 -1
  22. package/dist/types/src/components/DevtoolsOverviewContainer.d.ts +4 -0
  23. package/dist/types/src/components/DevtoolsOverviewContainer.d.ts.map +1 -0
  24. package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts +2 -2
  25. package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts.map +1 -1
  26. package/dist/types/src/components/SpaceGenerator/SpaceGenerator.d.ts +2 -2
  27. package/dist/types/src/components/SpaceGenerator/SpaceGenerator.d.ts.map +1 -1
  28. package/dist/types/src/components/SpaceGenerator/presets.d.ts +1 -1
  29. package/dist/types/src/components/SpaceGenerator/presets.d.ts.map +1 -1
  30. package/dist/types/src/components/Wireframe.d.ts +2 -2
  31. package/dist/types/src/components/Wireframe.d.ts.map +1 -1
  32. package/dist/types/src/components/index.d.ts +1 -0
  33. package/dist/types/src/components/index.d.ts.map +1 -1
  34. package/dist/types/src/translations.d.ts +2 -0
  35. package/dist/types/src/translations.d.ts.map +1 -1
  36. package/dist/types/src/types.d.ts +5 -4
  37. package/dist/types/src/types.d.ts.map +1 -1
  38. package/package.json +54 -50
  39. package/src/capabilities/app-graph-builder.ts +76 -59
  40. package/src/capabilities/react-surface.tsx +34 -11
  41. package/src/capabilities/settings.ts +2 -2
  42. package/src/components/DebugObjectPanel.tsx +2 -2
  43. package/src/components/DebugStatus.tsx +2 -24
  44. package/src/components/DevtoolsOverviewContainer.tsx +20 -0
  45. package/src/components/SpaceGenerator/ObjectGenerator.tsx +10 -14
  46. package/src/components/SpaceGenerator/SpaceGenerator.tsx +5 -5
  47. package/src/components/SpaceGenerator/presets.ts +14 -12
  48. package/src/components/Wireframe.tsx +2 -2
  49. package/src/components/index.ts +1 -0
  50. package/src/translations.ts +2 -0
  51. package/src/types.ts +6 -5
  52. package/dist/lib/browser/SpaceGenerator-NBOQZ4JF.mjs.map +0 -7
  53. package/dist/lib/browser/app-graph-builder-ALFPRSAR.mjs.map +0 -7
  54. package/dist/lib/browser/chunk-TCEHALD4.mjs.map +0 -7
  55. package/dist/lib/browser/react-surface-MXXLOQYV.mjs.map +0 -7
  56. package/dist/lib/browser/settings-AP74NCXH.mjs.map +0 -7
@@ -3,10 +3,11 @@
3
3
  //
4
4
 
5
5
  import { contributes, Capabilities, type PluginsContext } from '@dxos/app-framework';
6
- import { ATTENDABLE_PATH_SEPARATOR, PLANK_COMPANION_TYPE } from '@dxos/plugin-deck/types';
7
- import { createExtension, toSignal, type Node } from '@dxos/plugin-graph';
8
- import { CollectionType } from '@dxos/plugin-space/types';
9
- import { isEchoObject, isSpace, type ReactiveEchoObject, SpaceState, type Space } from '@dxos/react-client/echo';
6
+ import { ClientCapabilities } from '@dxos/plugin-client';
7
+ import { ATTENDABLE_PATH_SEPARATOR, DECK_COMPANION_TYPE, PLANK_COMPANION_TYPE } from '@dxos/plugin-deck/types';
8
+ import { createExtension, type Node } from '@dxos/plugin-graph';
9
+ import { SPACE_PLUGIN } from '@dxos/plugin-space';
10
+ import { isEchoObject, type AnyLiveObject, parseId } from '@dxos/react-client/echo';
10
11
 
11
12
  import { DEBUG_PLUGIN } from '../meta';
12
13
  import { Devtools } from '../types';
@@ -18,43 +19,31 @@ export default (context: PluginsContext) =>
18
19
  // Devtools node.
19
20
  createExtension({
20
21
  id: 'dxos.org/plugin/debug/devtools',
21
- filter: (node): node is Node<null | Space> => node.id === 'root' || isSpace(node.data),
22
+ filter: (node): node is Node<null> => node.id === 'root' || node.type === `${SPACE_PLUGIN}/settings`,
22
23
  connector: ({ node }) => {
23
- const space = node.data;
24
- const state = toSignal(
25
- (onChange) => space?.state.subscribe(() => onChange()).unsubscribe ?? (() => {}),
26
- () => space?.state.get(),
27
- space?.id,
28
- );
29
- if (node.id !== 'root' && state !== SpaceState.SPACE_READY) {
30
- return;
31
- }
32
-
33
- // Not adding the debug node until the root collection is available aligns the behaviour of this
34
- // extension with that of the space plugin adding objects. This ensures that the debug node is added at
35
- // the same time as objects and prevents order from changing as the nodes are added.
36
- const collection = space?.properties[CollectionType.typename]?.target as CollectionType | undefined;
37
- if (node.id !== 'root' && !collection) {
38
- return;
39
- }
24
+ const layout = context.requestCapability(Capabilities.Layout);
25
+ const client = context.requestCapability(ClientCapabilities.Client);
26
+ const { spaceId } = parseId(layout.workspace);
27
+ const space = spaceId && client.spaces.get(spaceId);
40
28
 
41
29
  return [
42
30
  {
43
- id: `${node.id}-${Devtools.id}`,
31
+ id: `${Devtools.id}-${node.id}`,
44
32
  data: null,
45
33
  type: DEVTOOLS_TYPE,
46
34
  properties: {
47
35
  label: ['devtools label', { ns: DEBUG_PLUGIN }],
48
- disposition: 'workspace',
49
36
  icon: 'ph--hammer--regular',
37
+ disposition: 'workspace',
38
+ position: 'fallback',
50
39
  },
51
40
  nodes: [
52
- ...(isSpace(node.data)
41
+ ...(space
53
42
  ? [
54
43
  {
55
- id: `${node.data.id}-debug`,
44
+ id: `debug-${node.id}`,
56
45
  type: 'dxos.org/plugin/debug/space',
57
- data: { space: node.data, type: 'dxos.org/plugin/debug/space' },
46
+ data: { space, type: 'dxos.org/plugin/debug/space' },
58
47
  properties: {
59
48
  label: ['debug label', { ns: DEBUG_PLUGIN }],
60
49
  icon: 'ph--bug--regular',
@@ -63,7 +52,7 @@ export default (context: PluginsContext) =>
63
52
  ]
64
53
  : []),
65
54
  {
66
- id: `${node.id}-${Devtools.Client.id}`,
55
+ id: `${Devtools.Client.id}-${node.id}`,
67
56
  data: null,
68
57
  type: DEVTOOLS_TYPE,
69
58
  properties: {
@@ -72,7 +61,7 @@ export default (context: PluginsContext) =>
72
61
  },
73
62
  nodes: [
74
63
  {
75
- id: `${node.id}-${Devtools.Client.Config}`,
64
+ id: `${Devtools.Client.Config}-${node.id}`,
76
65
  data: Devtools.Client.Config,
77
66
  type: DEVTOOLS_TYPE,
78
67
  properties: {
@@ -81,7 +70,7 @@ export default (context: PluginsContext) =>
81
70
  },
82
71
  },
83
72
  {
84
- id: `${node.id}-${Devtools.Client.Storage}`,
73
+ id: `${Devtools.Client.Storage}-${node.id}`,
85
74
  data: Devtools.Client.Storage,
86
75
  type: DEVTOOLS_TYPE,
87
76
  properties: {
@@ -90,7 +79,7 @@ export default (context: PluginsContext) =>
90
79
  },
91
80
  },
92
81
  {
93
- id: `${node.id}-${Devtools.Client.Logs}`,
82
+ id: `${Devtools.Client.Logs}-${node.id}`,
94
83
  data: Devtools.Client.Logs,
95
84
  type: DEVTOOLS_TYPE,
96
85
  properties: {
@@ -99,7 +88,7 @@ export default (context: PluginsContext) =>
99
88
  },
100
89
  },
101
90
  {
102
- id: `${node.id}-${Devtools.Client.Diagnostics}`,
91
+ id: `${Devtools.Client.Diagnostics}-${node.id}`,
103
92
  data: Devtools.Client.Diagnostics,
104
93
  type: DEVTOOLS_TYPE,
105
94
  properties: {
@@ -108,7 +97,7 @@ export default (context: PluginsContext) =>
108
97
  },
109
98
  },
110
99
  {
111
- id: `${node.id}-${Devtools.Client.Tracing}`,
100
+ id: `${Devtools.Client.Tracing}-${node.id}`,
112
101
  data: Devtools.Client.Tracing,
113
102
  type: DEVTOOLS_TYPE,
114
103
  properties: {
@@ -119,7 +108,7 @@ export default (context: PluginsContext) =>
119
108
  ],
120
109
  },
121
110
  {
122
- id: `${node.id}-${Devtools.Halo.id}`,
111
+ id: `${Devtools.Halo.id}-${node.id}`,
123
112
  data: null,
124
113
  type: DEVTOOLS_TYPE,
125
114
  properties: {
@@ -128,7 +117,7 @@ export default (context: PluginsContext) =>
128
117
  },
129
118
  nodes: [
130
119
  {
131
- id: `${node.id}-${Devtools.Halo.Identity}`,
120
+ id: `${Devtools.Halo.Identity}-${node.id}`,
132
121
  data: Devtools.Halo.Identity,
133
122
  type: DEVTOOLS_TYPE,
134
123
  properties: {
@@ -137,7 +126,7 @@ export default (context: PluginsContext) =>
137
126
  },
138
127
  },
139
128
  {
140
- id: `${node.id}-${Devtools.Halo.Devices}`,
129
+ id: `${Devtools.Halo.Devices}-${node.id}`,
141
130
  data: Devtools.Halo.Devices,
142
131
  type: DEVTOOLS_TYPE,
143
132
  properties: {
@@ -146,7 +135,7 @@ export default (context: PluginsContext) =>
146
135
  },
147
136
  },
148
137
  {
149
- id: `${node.id}-${Devtools.Halo.Keyring}`,
138
+ id: `${Devtools.Halo.Keyring}-${node.id}`,
150
139
  data: Devtools.Halo.Keyring,
151
140
  type: DEVTOOLS_TYPE,
152
141
  properties: {
@@ -155,7 +144,7 @@ export default (context: PluginsContext) =>
155
144
  },
156
145
  },
157
146
  {
158
- id: `${node.id}-${Devtools.Halo.Credentials}`,
147
+ id: `${Devtools.Halo.Credentials}-${node.id}`,
159
148
  data: Devtools.Halo.Credentials,
160
149
  type: DEVTOOLS_TYPE,
161
150
  properties: {
@@ -166,7 +155,7 @@ export default (context: PluginsContext) =>
166
155
  ],
167
156
  },
168
157
  {
169
- id: `${node.id}-${Devtools.Echo.id}`,
158
+ id: `${Devtools.Echo.id}-${node.id}`,
170
159
  data: null,
171
160
  type: DEVTOOLS_TYPE,
172
161
  properties: {
@@ -175,7 +164,7 @@ export default (context: PluginsContext) =>
175
164
  },
176
165
  nodes: [
177
166
  {
178
- id: `${node.id}-${Devtools.Echo.Spaces}`,
167
+ id: `${Devtools.Echo.Spaces}-${node.id}`,
179
168
  data: Devtools.Echo.Spaces,
180
169
  type: DEVTOOLS_TYPE,
181
170
  properties: {
@@ -184,7 +173,7 @@ export default (context: PluginsContext) =>
184
173
  },
185
174
  },
186
175
  {
187
- id: `${node.id}-${Devtools.Echo.Space}`,
176
+ id: `${Devtools.Echo.Space}-${node.id}`,
188
177
  data: Devtools.Echo.Space,
189
178
  type: DEVTOOLS_TYPE,
190
179
  properties: {
@@ -193,7 +182,7 @@ export default (context: PluginsContext) =>
193
182
  },
194
183
  },
195
184
  {
196
- id: `${node.id}-${Devtools.Echo.Feeds}`,
185
+ id: `${Devtools.Echo.Feeds}-${node.id}`,
197
186
  data: Devtools.Echo.Feeds,
198
187
  type: DEVTOOLS_TYPE,
199
188
  properties: {
@@ -202,16 +191,25 @@ export default (context: PluginsContext) =>
202
191
  },
203
192
  },
204
193
  {
205
- id: `${node.id}-${Devtools.Echo.Objects}`,
194
+ id: `${Devtools.Echo.Objects}-${node.id}`,
206
195
  data: Devtools.Echo.Objects,
207
196
  type: DEVTOOLS_TYPE,
208
197
  properties: {
209
198
  label: ['objects label', { ns: DEBUG_PLUGIN }],
199
+ icon: 'ph--cube--regular',
200
+ },
201
+ },
202
+ {
203
+ id: `${Devtools.Echo.Schema}-${node.id}`,
204
+ data: Devtools.Echo.Schema,
205
+ type: DEVTOOLS_TYPE,
206
+ properties: {
207
+ label: ['schema label', { ns: DEBUG_PLUGIN }],
210
208
  icon: 'ph--database--regular',
211
209
  },
212
210
  },
213
211
  {
214
- id: `${node.id}-${Devtools.Echo.Automerge}`,
212
+ id: `${Devtools.Echo.Automerge}-${node.id}`,
215
213
  data: Devtools.Echo.Automerge,
216
214
  type: DEVTOOLS_TYPE,
217
215
  properties: {
@@ -220,7 +218,7 @@ export default (context: PluginsContext) =>
220
218
  },
221
219
  },
222
220
  {
223
- id: `${node.id}-${Devtools.Echo.Queues}`,
221
+ id: `${Devtools.Echo.Queues}-${node.id}`,
224
222
  data: Devtools.Echo.Queues,
225
223
  type: DEVTOOLS_TYPE,
226
224
  properties: {
@@ -229,7 +227,7 @@ export default (context: PluginsContext) =>
229
227
  },
230
228
  },
231
229
  {
232
- id: `${node.id}-${Devtools.Echo.Members}`,
230
+ id: `${Devtools.Echo.Members}-${node.id}`,
233
231
  data: Devtools.Echo.Members,
234
232
  type: DEVTOOLS_TYPE,
235
233
  properties: {
@@ -238,7 +236,7 @@ export default (context: PluginsContext) =>
238
236
  },
239
237
  },
240
238
  {
241
- id: `${node.id}-${Devtools.Echo.Metadata}`,
239
+ id: `${Devtools.Echo.Metadata}-${node.id}`,
242
240
  data: Devtools.Echo.Metadata,
243
241
  type: DEVTOOLS_TYPE,
244
242
  properties: {
@@ -249,7 +247,7 @@ export default (context: PluginsContext) =>
249
247
  ],
250
248
  },
251
249
  {
252
- id: `${node.id}-${Devtools.Mesh.id}`,
250
+ id: `${Devtools.Mesh.id}-${node.id}`,
253
251
  data: null,
254
252
  type: DEVTOOLS_TYPE,
255
253
  properties: {
@@ -258,7 +256,7 @@ export default (context: PluginsContext) =>
258
256
  },
259
257
  nodes: [
260
258
  {
261
- id: `${node.id}-${Devtools.Mesh.Signal}`,
259
+ id: `${Devtools.Mesh.Signal}-${node.id}`,
262
260
  data: Devtools.Mesh.Signal,
263
261
  type: DEVTOOLS_TYPE,
264
262
  properties: {
@@ -267,7 +265,7 @@ export default (context: PluginsContext) =>
267
265
  },
268
266
  },
269
267
  {
270
- id: `${node.id}-${Devtools.Mesh.Swarm}`,
268
+ id: `${Devtools.Mesh.Swarm}-${node.id}`,
271
269
  data: Devtools.Mesh.Swarm,
272
270
  type: DEVTOOLS_TYPE,
273
271
  properties: {
@@ -276,7 +274,7 @@ export default (context: PluginsContext) =>
276
274
  },
277
275
  },
278
276
  {
279
- id: `${node.id}-${Devtools.Mesh.Network}`,
277
+ id: `${Devtools.Mesh.Network}-${node.id}`,
280
278
  data: Devtools.Mesh.Network,
281
279
  type: DEVTOOLS_TYPE,
282
280
  properties: {
@@ -288,7 +286,7 @@ export default (context: PluginsContext) =>
288
286
  },
289
287
  // TODO(wittjosiah): Remove?
290
288
  // {
291
- // id: `${node.id}-${Devtools.Agent.id}`,
289
+ // id: `${prefix}-${Devtools.Agent.id}`,
292
290
  // data: null,
293
291
  // type: DEVTOOLS_TYPE,
294
292
  // properties: {
@@ -297,7 +295,7 @@ export default (context: PluginsContext) =>
297
295
  // },
298
296
  // nodes: [
299
297
  // {
300
- // id: `${node.id}-${Devtools.Agent.Dashboard}`,
298
+ // id: `${prefix}-${Devtools.Agent.Dashboard}`,
301
299
  // data: Devtools.Agent.Dashboard,
302
300
  // type: DEVTOOLS_TYPE,
303
301
  // properties: {
@@ -308,7 +306,7 @@ export default (context: PluginsContext) =>
308
306
  // ],
309
307
  // },
310
308
  {
311
- id: `${node.id}-${Devtools.Edge.id}`,
309
+ id: `${Devtools.Edge.id}-${node.id}`,
312
310
  data: null,
313
311
  type: DEVTOOLS_TYPE,
314
312
  properties: {
@@ -317,7 +315,7 @@ export default (context: PluginsContext) =>
317
315
  },
318
316
  nodes: [
319
317
  {
320
- id: `${node.id}-${Devtools.Edge.Dashboard}`,
318
+ id: `${Devtools.Edge.Dashboard}-${node.id}`,
321
319
  data: Devtools.Edge.Dashboard,
322
320
  type: DEVTOOLS_TYPE,
323
321
  properties: {
@@ -326,7 +324,7 @@ export default (context: PluginsContext) =>
326
324
  },
327
325
  },
328
326
  {
329
- id: `${node.id}-${Devtools.Edge.Workflows}`,
327
+ id: `${Devtools.Edge.Workflows}-${node.id}`,
330
328
  data: Devtools.Edge.Workflows,
331
329
  type: DEVTOOLS_TYPE,
332
330
  properties: {
@@ -335,7 +333,7 @@ export default (context: PluginsContext) =>
335
333
  },
336
334
  },
337
335
  {
338
- id: `${node.id}-${Devtools.Edge.Traces}`,
336
+ id: `${Devtools.Edge.Traces}-${node.id}`,
339
337
  data: Devtools.Edge.Traces,
340
338
  type: DEVTOOLS_TYPE,
341
339
  properties: {
@@ -344,7 +342,7 @@ export default (context: PluginsContext) =>
344
342
  },
345
343
  },
346
344
  {
347
- id: `${node.id}-${Devtools.Edge.Testing}`,
345
+ id: `${Devtools.Edge.Testing}-${node.id}`,
348
346
  data: Devtools.Edge.Testing,
349
347
  type: DEVTOOLS_TYPE,
350
348
  properties: {
@@ -395,7 +393,7 @@ export default (context: PluginsContext) =>
395
393
  // Debug object companion.
396
394
  createExtension({
397
395
  id: `${DEBUG_PLUGIN}/debug-object`,
398
- filter: (node): node is Node<ReactiveEchoObject<any>> => isEchoObject(node.data),
396
+ filter: (node): node is Node<AnyLiveObject<any>> => isEchoObject(node.data),
399
397
  connector: ({ node }) => [
400
398
  {
401
399
  id: [node.id, 'debug'].join(ATTENDABLE_PATH_SEPARATOR),
@@ -410,4 +408,23 @@ export default (context: PluginsContext) =>
410
408
  },
411
409
  ],
412
410
  }),
411
+
412
+ // Devtools deck companion.
413
+ createExtension({
414
+ id: `${DEBUG_PLUGIN}/devtools-overview`,
415
+ filter: (node): node is Node<null> => node.id === 'root',
416
+ connector: ({ node }) => [
417
+ {
418
+ id: [node.id, 'devtools'].join(ATTENDABLE_PATH_SEPARATOR),
419
+ type: DECK_COMPANION_TYPE,
420
+ data: null,
421
+ properties: {
422
+ label: ['devtools overview label', { ns: DEBUG_PLUGIN }],
423
+ icon: 'ph--hammer--regular',
424
+ disposition: 'hidden',
425
+ position: 'fallback',
426
+ },
427
+ },
428
+ ],
429
+ }),
413
430
  ]);
@@ -16,30 +16,31 @@ import {
16
16
  type PluginsContext,
17
17
  } from '@dxos/app-framework';
18
18
  import {
19
+ AutomergePanel,
19
20
  ConfigPanel,
20
21
  CredentialsPanel,
21
22
  DeviceListPanel,
22
23
  DiagnosticsPanel,
24
+ EdgeDashboardPanel,
23
25
  FeedsPanel,
24
26
  IdentityPanel,
27
+ InvocationTracePanel,
25
28
  KeyringPanel,
26
29
  LoggingPanel,
27
30
  MembersPanel,
28
31
  MetadataPanel,
29
32
  NetworkPanel,
30
33
  ObjectsPanel,
34
+ QueuesPanel,
35
+ SchemaPanel,
31
36
  SignalPanel,
32
37
  SpaceInfoPanel,
33
38
  SpaceListPanel,
34
39
  StoragePanel,
35
40
  SwarmPanel,
41
+ TestingPanel,
36
42
  TracingPanel,
37
- EdgeDashboardPanel,
38
- AutomergePanel,
39
43
  WorkflowPanel,
40
- QueuesPanel,
41
- InvocationTracePanel,
42
- TestingPanel,
43
44
  } from '@dxos/devtools';
44
45
  import { SettingsStore } from '@dxos/local-storage';
45
46
  import { log } from '@dxos/log';
@@ -51,13 +52,21 @@ import {
51
52
  SpaceState,
52
53
  isSpace,
53
54
  isEchoObject,
54
- type ReactiveEchoObject,
55
- type ReactiveObject,
55
+ type AnyLiveObject,
56
+ type Live,
56
57
  type Space,
57
58
  parseId,
58
59
  } from '@dxos/react-client/echo';
59
60
 
60
- import { DebugApp, DebugObjectPanel, DebugSettings, DebugStatus, SpaceGenerator, Wireframe } from '../components';
61
+ import {
62
+ DebugApp,
63
+ DebugObjectPanel,
64
+ DebugSettings,
65
+ DebugStatus,
66
+ DevtoolsOverviewContainer,
67
+ SpaceGenerator,
68
+ Wireframe,
69
+ } from '../components';
61
70
  import { DEBUG_PLUGIN } from '../meta';
62
71
  import { type DebugSettingsProps, Devtools } from '../types';
63
72
 
@@ -97,7 +106,7 @@ export default (context: PluginsContext) =>
97
106
  filter: (data): data is { subject: SpaceDebug } => isSpaceDebug(data.subject),
98
107
  component: ({ data }) => {
99
108
  const handleCreateObject = useCallback(
100
- (objects: ReactiveObject<any>[]) => {
109
+ (objects: Live<any>[]) => {
101
110
  if (!isSpace(data.subject.space)) {
102
111
  return;
103
112
  }
@@ -130,7 +139,7 @@ export default (context: PluginsContext) =>
130
139
  id: `${DEBUG_PLUGIN}/wireframe`,
131
140
  role: ['article', 'section'],
132
141
  position: 'hoist',
133
- filter: (data): data is { subject: ReactiveEchoObject<any> } => {
142
+ filter: (data): data is { subject: AnyLiveObject<any> } => {
134
143
  const settings = context
135
144
  .requestCapability(Capabilities.SettingsStore)
136
145
  .getStore<DebugSettingsProps>(DEBUG_PLUGIN)!.value;
@@ -143,10 +152,15 @@ export default (context: PluginsContext) =>
143
152
  createSurface({
144
153
  id: `${DEBUG_PLUGIN}/object-debug`,
145
154
  role: 'article',
146
- filter: (data): data is { companionTo: ReactiveEchoObject<any> } =>
155
+ filter: (data): data is { companionTo: AnyLiveObject<any> } =>
147
156
  data.subject === 'debug' && isEchoObject(data.companionTo),
148
157
  component: ({ data }) => <DebugObjectPanel object={data.companionTo} />,
149
158
  }),
159
+ createSurface({
160
+ id: `${DEBUG_PLUGIN}/devtools-overview`,
161
+ role: 'deck-companion--devtools',
162
+ component: () => <DevtoolsOverviewContainer />,
163
+ }),
150
164
  createSurface({
151
165
  id: `${DEBUG_PLUGIN}/status`,
152
166
  role: 'status',
@@ -259,6 +273,15 @@ export default (context: PluginsContext) =>
259
273
  return <ObjectsPanel space={space} />;
260
274
  },
261
275
  }),
276
+ createSurface({
277
+ id: `${DEBUG_PLUGIN}/echo/schema`,
278
+ role: 'article',
279
+ filter: (data): data is any => data.subject === Devtools.Echo.Schema,
280
+ component: () => {
281
+ const space = useCurrentSpace();
282
+ return <SchemaPanel space={space} />;
283
+ },
284
+ }),
262
285
  createSurface({
263
286
  id: `${DEBUG_PLUGIN}/echo/automerge`,
264
287
  role: 'article',
@@ -3,13 +3,13 @@
3
3
  //
4
4
 
5
5
  import { Capabilities, contributes } from '@dxos/app-framework';
6
- import { create } from '@dxos/react-client/echo';
6
+ import { live } from '@dxos/react-client/echo';
7
7
 
8
8
  import { DEBUG_PLUGIN } from '../meta';
9
9
  import { type DebugSettingsProps, DebugSettingsSchema } from '../types';
10
10
 
11
11
  export default () => {
12
- const settings = create<DebugSettingsProps>({});
12
+ const settings = live<DebugSettingsProps>({});
13
13
 
14
14
  return contributes(Capabilities.Settings, { schema: DebugSettingsSchema, prefix: DEBUG_PLUGIN, value: settings });
15
15
  };
@@ -4,12 +4,12 @@
4
4
 
5
5
  import React from 'react';
6
6
 
7
- import { type ReactiveEchoObject } from '@dxos/client/echo';
7
+ import { type AnyLiveObject } from '@dxos/client/echo';
8
8
  import { Clipboard, Input } from '@dxos/react-ui';
9
9
  import { SyntaxHighlighter } from '@dxos/react-ui-syntax-highlighter';
10
10
 
11
11
  export type DebugObjectPanelProps = {
12
- object: ReactiveEchoObject<any>;
12
+ object: AnyLiveObject<any>;
13
13
  };
14
14
 
15
15
  // TODO(burdon): Get schema and traverse references.
@@ -6,12 +6,11 @@ import React, { useEffect, useRef, useState } from 'react';
6
6
 
7
7
  import { useAppGraph, useLayout } from '@dxos/app-framework';
8
8
  import { TimeoutError } from '@dxos/async';
9
- import { StatsPanel, useStats } from '@dxos/devtools';
10
9
  import { getActiveSpace } from '@dxos/plugin-space';
11
10
  import { StatusBar } from '@dxos/plugin-status-bar';
12
11
  import { ConnectionState } from '@dxos/protocols/proto/dxos/client/services';
13
12
  import { useNetworkStatus } from '@dxos/react-client/mesh';
14
- import { Icon, Popover } from '@dxos/react-ui';
13
+ import { Icon } from '@dxos/react-ui';
15
14
 
16
15
  const styles = {
17
16
  success: 'text-sky-300 dark:text-green-700',
@@ -180,28 +179,7 @@ const SavingIndicator = () => {
180
179
  }
181
180
  };
182
181
 
183
- const PerformanceIndicator = () => {
184
- const [visible, setVisible] = useState(false);
185
- const [stats, refreshStats] = useStats();
186
-
187
- return (
188
- <Popover.Root open={visible} onOpenChange={setVisible}>
189
- <Popover.Trigger asChild>
190
- <StatusBar.Button onClick={() => setVisible((visible) => !visible)} title='Performance panels'>
191
- <Icon icon='ph--chart-bar--regular' size={4} />
192
- </StatusBar.Button>
193
- </Popover.Trigger>
194
- <Popover.Portal>
195
- <Popover.Content classNames='max-is-[min(var(--radix-popover-content-available-width),300px)] max-bs-[--radix-popover-content-available-height]'>
196
- <StatsPanel stats={stats} onRefresh={refreshStats} />
197
- <Popover.Arrow />
198
- </Popover.Content>
199
- </Popover.Portal>
200
- </Popover.Root>
201
- );
202
- };
203
-
204
- const indicators = [SavingIndicator, SwarmIndicator, PerformanceIndicator, ErrorIndicator];
182
+ const indicators = [SavingIndicator, SwarmIndicator, ErrorIndicator];
205
183
 
206
184
  export const DebugStatus = () => {
207
185
  return (
@@ -0,0 +1,20 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import React from 'react';
6
+
7
+ import { Surface } from '@dxos/app-framework';
8
+ import { StatsPanel, useStats } from '@dxos/devtools';
9
+
10
+ export const DevtoolsOverviewContainer = () => {
11
+ const [stats, refreshStats] = useStats();
12
+
13
+ return (
14
+ <StatsPanel stats={stats} onRefresh={refreshStats}>
15
+ <Surface role='devtools-overview' />
16
+ </StatsPanel>
17
+ );
18
+ };
19
+
20
+ export default DevtoolsOverviewContainer;
@@ -6,7 +6,7 @@ import { addressToA1Notation } from '@dxos/compute';
6
6
  import { ComputeGraph, ComputeGraphModel, DEFAULT_OUTPUT, NODE_INPUT, NODE_OUTPUT } from '@dxos/conductor';
7
7
  import { ObjectId, type BaseObject, type TypedObject } from '@dxos/echo-schema';
8
8
  import { DXN } from '@dxos/keys';
9
- import { create, makeRef, type ReactiveObject } from '@dxos/live-object';
9
+ import { live, makeRef, type Live } from '@dxos/live-object';
10
10
  import { DocumentType } from '@dxos/plugin-markdown/types';
11
11
  import { createSheet } from '@dxos/plugin-sheet/types';
12
12
  import { SheetType, type CellValue } from '@dxos/plugin-sheet/types';
@@ -14,7 +14,7 @@ import { CanvasType, DiagramType } from '@dxos/plugin-sketch/types';
14
14
  import { faker } from '@dxos/random';
15
15
  import { Filter, type Space } from '@dxos/react-client/echo';
16
16
  import { TableType } from '@dxos/react-ui-table';
17
- import { createView, TextType } from '@dxos/schema';
17
+ import { createView, DataType } from '@dxos/schema';
18
18
  import { createAsyncGenerator, type ValueGenerator } from '@dxos/schema/testing';
19
19
  import { range } from '@dxos/util';
20
20
 
@@ -31,8 +31,8 @@ const generator: ValueGenerator = faker as any;
31
31
  export type ObjectGenerator<T extends BaseObject> = (
32
32
  space: Space,
33
33
  n: number,
34
- cb?: (objects: ReactiveObject<any>[]) => void,
35
- ) => Promise<ReactiveObject<T>[]>;
34
+ cb?: (objects: Live<any>[]) => void,
35
+ ) => Promise<Live<T>[]>;
36
36
 
37
37
  export const staticGenerators = new Map<string, ObjectGenerator<any>>([
38
38
  [
@@ -40,9 +40,9 @@ export const staticGenerators = new Map<string, ObjectGenerator<any>>([
40
40
  async (space, n, cb) => {
41
41
  const objects = range(n).map(() => {
42
42
  return space.db.add(
43
- create(DocumentType, {
43
+ live(DocumentType, {
44
44
  name: faker.commerce.productName(),
45
- content: makeRef(create(TextType, { content: faker.lorem.sentences(5) })),
45
+ content: makeRef(live(DataType.Text, { content: faker.lorem.sentences(5) })),
46
46
  threads: [],
47
47
  }),
48
48
  );
@@ -58,9 +58,9 @@ export const staticGenerators = new Map<string, ObjectGenerator<any>>([
58
58
  const objects = range(n).map(() => {
59
59
  // TODO(burdon): Generate diagram.
60
60
  const obj = space.db.add(
61
- create(DiagramType, {
61
+ live(DiagramType, {
62
62
  name: faker.commerce.productName(),
63
- canvas: makeRef(create(CanvasType, { content: {} })),
63
+ canvas: makeRef(live(CanvasType, { content: {} })),
64
64
  }),
65
65
  );
66
66
 
@@ -139,11 +139,7 @@ export const staticGenerators = new Map<string, ObjectGenerator<any>>([
139
139
  ]);
140
140
 
141
141
  export const createGenerator = <T extends BaseObject>(type: TypedObject<T>): ObjectGenerator<T> => {
142
- return async (
143
- space: Space,
144
- n: number,
145
- cb?: (objects: ReactiveObject<any>[]) => void,
146
- ): Promise<ReactiveObject<T>[]> => {
142
+ return async (space: Space, n: number, cb?: (objects: Live<any>[]) => void): Promise<Live<T>[]> => {
147
143
  // Find or create mutable schema.
148
144
  const schema =
149
145
  (await space.db.schemaRegistry.query({ typename: type.typename }).firstOrUndefined()) ??
@@ -159,7 +155,7 @@ export const createGenerator = <T extends BaseObject>(type: TypedObject<T>): Obj
159
155
  if (!table) {
160
156
  const name = type.typename.split('/').pop() ?? type.typename;
161
157
  const view = createView({ name, typename: type.typename, jsonSchema: schema.jsonSchema });
162
- const table = space.db.add(create(TableType, { name, view: makeRef(view) }));
158
+ const table = space.db.add(live(TableType, { name, view: makeRef(view) }));
163
159
  cb?.([table]);
164
160
  }
165
161