@dxos/plugin-debug 0.8.4-main.937b3ca → 0.8.4-main.abd8ff62ef
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/lib/browser/index.mjs +19 -118
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/translations.mjs +81 -0
- package/dist/lib/browser/translations.mjs.map +7 -0
- package/dist/types/src/DebugPlugin.d.ts +3 -1
- package/dist/types/src/DebugPlugin.d.ts.map +1 -1
- package/dist/types/src/DebugPlugin.node.d.ts +5 -0
- package/dist/types/src/DebugPlugin.node.d.ts.map +1 -0
- package/dist/types/src/DebugPlugin.test.d.ts +2 -0
- package/dist/types/src/DebugPlugin.test.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +11 -4
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/{react-context/react-context.d.ts → react-context.d.ts} +1 -1
- package/dist/types/src/capabilities/react-context.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +9 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings.d.ts +7 -0
- package/dist/types/src/capabilities/settings.d.ts.map +1 -0
- package/dist/types/src/components/DebugSettings/DebugSettings.d.ts +11 -0
- package/dist/types/src/components/DebugSettings/DebugSettings.d.ts.map +1 -0
- package/dist/types/src/components/DebugSettings/DebugSettings.stories.d.ts +97 -0
- package/dist/types/src/components/DebugSettings/DebugSettings.stories.d.ts.map +1 -0
- package/dist/types/src/components/DebugSettings/index.d.ts +2 -0
- package/dist/types/src/components/DebugSettings/index.d.ts.map +1 -0
- package/dist/types/src/components/SchemaTable/SchemaTable.d.ts.map +1 -0
- package/dist/types/src/components/SchemaTable/index.d.ts +2 -0
- package/dist/types/src/components/SchemaTable/index.d.ts.map +1 -0
- package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts +2 -2
- package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/draw-util.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/index.d.ts +2 -2
- package/dist/types/src/components/SpaceGenerator/index.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/presets.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +4 -10
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/DebugGraph/DebugGraph.d.ts +8 -0
- package/dist/types/src/containers/DebugGraph/DebugGraph.d.ts.map +1 -0
- package/dist/types/src/containers/DebugGraph/index.d.ts +2 -0
- package/dist/types/src/containers/DebugGraph/index.d.ts.map +1 -0
- package/dist/types/src/containers/DebugObjectPanel/DebugObjectPanel.d.ts +6 -0
- package/dist/types/src/containers/DebugObjectPanel/DebugObjectPanel.d.ts.map +1 -0
- package/dist/types/src/containers/DebugObjectPanel/index.d.ts +2 -0
- package/dist/types/src/containers/DebugObjectPanel/index.d.ts.map +1 -0
- package/dist/types/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.d.ts +5 -0
- package/dist/types/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.d.ts.map +1 -0
- package/dist/types/src/containers/DebugSpaceObjectsPanel/index.d.ts +2 -0
- package/dist/types/src/containers/DebugSpaceObjectsPanel/index.d.ts.map +1 -0
- package/dist/types/src/containers/DebugStatus/DebugStatus.d.ts.map +1 -0
- package/dist/types/src/containers/DebugStatus/index.d.ts +2 -0
- package/dist/types/src/containers/DebugStatus/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/DevtoolsOverviewContainer}/DevtoolsOverviewContainer.d.ts +0 -1
- package/dist/types/src/containers/DevtoolsOverviewContainer/DevtoolsOverviewContainer.d.ts.map +1 -0
- package/dist/types/src/containers/DevtoolsOverviewContainer/index.d.ts +2 -0
- package/dist/types/src/containers/DevtoolsOverviewContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.d.ts +11 -0
- package/dist/types/src/{components → containers}/SpaceGenerator/SpaceGenerator.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceGenerator/index.d.ts +2 -0
- package/dist/types/src/containers/SpaceGenerator/index.d.ts.map +1 -0
- package/dist/types/src/containers/Wireframe/Wireframe.d.ts.map +1 -0
- package/dist/types/src/containers/Wireframe/index.d.ts +2 -0
- package/dist/types/src/containers/Wireframe/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +9 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +3 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +78 -59
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Settings.d.ts +8 -0
- package/dist/types/src/types/Settings.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +69 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +89 -70
- package/src/DebugPlugin.node.ts +18 -0
- package/src/DebugPlugin.test.ts +29 -0
- package/src/DebugPlugin.tsx +20 -11
- package/src/capabilities/app-graph-builder.ts +405 -0
- package/src/capabilities/index.ts +6 -4
- package/src/capabilities/react-context.tsx +25 -0
- package/src/capabilities/react-surface.tsx +439 -0
- package/src/capabilities/{settings/settings.ts → settings.ts} +7 -6
- package/src/components/DebugSettings/DebugSettings.stories.tsx +36 -0
- package/src/components/DebugSettings/DebugSettings.tsx +262 -0
- package/src/components/DebugSettings/index.ts +5 -0
- package/src/components/{SpaceGenerator → SchemaTable}/SchemaTable.tsx +2 -2
- package/src/components/SchemaTable/index.ts +5 -0
- package/src/components/SpaceGenerator/ObjectGenerator.tsx +14 -15
- package/src/components/SpaceGenerator/draw-util.ts +8 -8
- package/src/components/SpaceGenerator/index.ts +2 -3
- package/src/components/SpaceGenerator/presets.ts +55 -73
- package/src/components/index.ts +4 -11
- package/src/{components → containers/DebugGraph}/DebugGraph.tsx +3 -4
- package/src/containers/DebugGraph/index.ts +5 -0
- package/src/containers/DebugObjectPanel/DebugObjectPanel.tsx +76 -0
- package/src/containers/DebugObjectPanel/index.ts +5 -0
- package/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.tsx +47 -0
- package/src/containers/DebugSpaceObjectsPanel/index.ts +5 -0
- package/src/{components → containers/DebugStatus}/DebugStatus.tsx +41 -19
- package/src/containers/DebugStatus/index.ts +5 -0
- package/src/containers/DevtoolsOverviewContainer/DevtoolsOverviewContainer.tsx +25 -0
- package/src/containers/DevtoolsOverviewContainer/index.ts +5 -0
- package/src/containers/SpaceGenerator/SpaceGenerator.tsx +126 -0
- package/src/containers/SpaceGenerator/index.ts +5 -0
- package/src/{components → containers/Wireframe}/Wireframe.tsx +3 -7
- package/src/containers/Wireframe/index.ts +5 -0
- package/src/containers/index.ts +13 -0
- package/src/index.ts +7 -1
- package/src/meta.ts +1 -1
- package/src/translations.ts +75 -58
- package/src/types/Settings.ts +16 -0
- package/src/{types.ts → types/index.ts} +15 -14
- package/dist/lib/browser/DebugGraph-6VMEOKEV.mjs +0 -15
- package/dist/lib/browser/DebugGraph-6VMEOKEV.mjs.map +0 -7
- package/dist/lib/browser/DevtoolsOverviewContainer-77PKFLYV.mjs +0 -19
- package/dist/lib/browser/DevtoolsOverviewContainer-77PKFLYV.mjs.map +0 -7
- package/dist/lib/browser/SpaceGenerator-ZHVZWGM7.mjs +0 -1150
- package/dist/lib/browser/SpaceGenerator-ZHVZWGM7.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-FBDRMMYF.mjs +0 -597
- package/dist/lib/browser/app-graph-builder-FBDRMMYF.mjs.map +0 -7
- package/dist/lib/browser/chunk-4UFQXPP7.mjs +0 -78
- package/dist/lib/browser/chunk-4UFQXPP7.mjs.map +0 -7
- package/dist/lib/browser/chunk-A5H5GRV6.mjs +0 -20
- package/dist/lib/browser/chunk-A5H5GRV6.mjs.map +0 -7
- package/dist/lib/browser/react-context-FSWBT3MH.mjs +0 -17
- package/dist/lib/browser/react-context-FSWBT3MH.mjs.map +0 -7
- package/dist/lib/browser/react-surface-W62RJ32U.mjs +0 -757
- package/dist/lib/browser/react-surface-W62RJ32U.mjs.map +0 -7
- package/dist/lib/browser/settings-KA4GN73K.mjs +0 -31
- package/dist/lib/browser/settings-KA4GN73K.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +0 -6
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-context/index.d.ts +0 -7
- package/dist/types/src/capabilities/react-context/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-context/react-context.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +0 -5
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/index.d.ts +0 -3
- package/dist/types/src/capabilities/settings/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/settings.d.ts +0 -5
- package/dist/types/src/capabilities/settings/settings.d.ts.map +0 -1
- package/dist/types/src/components/Container.d.ts +0 -5
- package/dist/types/src/components/Container.d.ts.map +0 -1
- package/dist/types/src/components/DebugGraph.d.ts +0 -9
- package/dist/types/src/components/DebugGraph.d.ts.map +0 -1
- package/dist/types/src/components/DebugObjectPanel.d.ts +0 -7
- package/dist/types/src/components/DebugObjectPanel.d.ts.map +0 -1
- package/dist/types/src/components/DebugSettings.d.ts +0 -8
- package/dist/types/src/components/DebugSettings.d.ts.map +0 -1
- package/dist/types/src/components/DebugStatus.d.ts.map +0 -1
- package/dist/types/src/components/DevtoolsOverviewContainer.d.ts.map +0 -1
- package/dist/types/src/components/SpaceGenerator/SchemaTable.d.ts.map +0 -1
- package/dist/types/src/components/SpaceGenerator/SpaceGenerator.d.ts +0 -9
- package/dist/types/src/components/SpaceGenerator/SpaceGenerator.stories.d.ts +0 -15
- package/dist/types/src/components/SpaceGenerator/SpaceGenerator.stories.d.ts.map +0 -1
- package/dist/types/src/components/Wireframe.d.ts.map +0 -1
- package/dist/types/src/types.d.ts +0 -68
- package/dist/types/src/types.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +0 -419
- package/src/capabilities/app-graph-builder/index.ts +0 -7
- package/src/capabilities/react-context/index.ts +0 -7
- package/src/capabilities/react-context/react-context.tsx +0 -20
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/react-surface/react-surface.tsx +0 -409
- package/src/capabilities/settings/index.ts +0 -7
- package/src/components/Container.tsx +0 -15
- package/src/components/DebugObjectPanel.tsx +0 -33
- package/src/components/DebugSettings.tsx +0 -185
- package/src/components/DevtoolsOverviewContainer.tsx +0 -20
- package/src/components/SpaceGenerator/SpaceGenerator.stories.tsx +0 -54
- package/src/components/SpaceGenerator/SpaceGenerator.tsx +0 -127
- /package/dist/types/src/components/{SpaceGenerator → SchemaTable}/SchemaTable.d.ts +0 -0
- /package/dist/types/src/{components → containers/DebugStatus}/DebugStatus.d.ts +0 -0
- /package/dist/types/src/{components → containers/Wireframe}/Wireframe.d.ts +0 -0
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { AppCapabilities, AppNode, getSpaceIdFromPath } from '@dxos/app-toolkit';
|
|
9
|
+
import { ClientCapabilities } from '@dxos/plugin-client/types';
|
|
10
|
+
import { GraphBuilder, Node, NodeMatcher } from '@dxos/plugin-graph';
|
|
11
|
+
import { SPACE_TYPE } from '@dxos/plugin-space/types';
|
|
12
|
+
import { getParentId } from '@dxos/react-ui-attention';
|
|
13
|
+
|
|
14
|
+
import { meta } from '#meta';
|
|
15
|
+
import { Devtools } from '#types';
|
|
16
|
+
|
|
17
|
+
const DEVTOOLS_TYPE = `${meta.id}.devtools`;
|
|
18
|
+
|
|
19
|
+
export default Capability.makeModule(
|
|
20
|
+
Effect.fnUntraced(function* () {
|
|
21
|
+
const extensions = yield* Effect.all([
|
|
22
|
+
GraphBuilder.createExtension({
|
|
23
|
+
id: 'devtools',
|
|
24
|
+
match: NodeMatcher.whenAny(NodeMatcher.whenRoot, NodeMatcher.whenNodeType(SPACE_TYPE)),
|
|
25
|
+
connector: (node, get) =>
|
|
26
|
+
Effect.gen(function* () {
|
|
27
|
+
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
28
|
+
const layoutAtom = get(yield* Capability.atom(AppCapabilities.Layout))[0];
|
|
29
|
+
const layout = layoutAtom ? get(layoutAtom) : undefined;
|
|
30
|
+
const spaceId = layout?.workspace ? getSpaceIdFromPath(layout.workspace) : undefined;
|
|
31
|
+
const space = spaceId ? client.spaces.get(spaceId) : undefined;
|
|
32
|
+
const [graph] = get(yield* Capability.atom(AppCapabilities.AppGraph));
|
|
33
|
+
|
|
34
|
+
return [
|
|
35
|
+
Node.make({
|
|
36
|
+
id: Devtools.id,
|
|
37
|
+
data: null,
|
|
38
|
+
type: DEVTOOLS_TYPE,
|
|
39
|
+
properties: {
|
|
40
|
+
label: ['devtools.label', { ns: meta.id }],
|
|
41
|
+
icon: 'ph--hammer--regular',
|
|
42
|
+
disposition: 'pin-end',
|
|
43
|
+
position: 'fallback',
|
|
44
|
+
},
|
|
45
|
+
nodes: [
|
|
46
|
+
Node.make({
|
|
47
|
+
id: 'app-graph',
|
|
48
|
+
type: `${meta.id}.app-graph`,
|
|
49
|
+
data: { graph: graph?.graph, root: node.id === Node.RootId ? node.id : getParentId(node.id) },
|
|
50
|
+
properties: {
|
|
51
|
+
label: ['debug-app-graph.label', { ns: meta.id }],
|
|
52
|
+
icon: 'ph--graph--regular',
|
|
53
|
+
},
|
|
54
|
+
}),
|
|
55
|
+
Node.make({
|
|
56
|
+
id: 'tools-explorer',
|
|
57
|
+
data: Devtools.ToolsExplorer,
|
|
58
|
+
type: DEVTOOLS_TYPE,
|
|
59
|
+
properties: {
|
|
60
|
+
label: ['debug-tools-explorer.label', { ns: meta.id }],
|
|
61
|
+
icon: 'ph--toolbox--regular',
|
|
62
|
+
},
|
|
63
|
+
}),
|
|
64
|
+
...(space && node.type === SPACE_TYPE
|
|
65
|
+
? [
|
|
66
|
+
Node.make({
|
|
67
|
+
id: 'debug',
|
|
68
|
+
type: `${meta.id}.space`,
|
|
69
|
+
data: { space, type: `${meta.id}.space` },
|
|
70
|
+
properties: {
|
|
71
|
+
label: ['generate-objects.label', { ns: meta.id }],
|
|
72
|
+
icon: 'ph--dice-five--regular',
|
|
73
|
+
},
|
|
74
|
+
}),
|
|
75
|
+
]
|
|
76
|
+
: []),
|
|
77
|
+
Node.make({
|
|
78
|
+
id: Devtools.Client.id,
|
|
79
|
+
data: null,
|
|
80
|
+
type: DEVTOOLS_TYPE,
|
|
81
|
+
properties: {
|
|
82
|
+
label: ['client.label', { ns: meta.id }],
|
|
83
|
+
icon: 'ph--users--regular',
|
|
84
|
+
},
|
|
85
|
+
nodes: [
|
|
86
|
+
Node.make({
|
|
87
|
+
id: Devtools.Client.Config,
|
|
88
|
+
data: Devtools.Client.Config,
|
|
89
|
+
type: DEVTOOLS_TYPE,
|
|
90
|
+
properties: {
|
|
91
|
+
label: ['config.label', { ns: meta.id }],
|
|
92
|
+
icon: 'ph--gear--regular',
|
|
93
|
+
},
|
|
94
|
+
}),
|
|
95
|
+
Node.make({
|
|
96
|
+
id: Devtools.Client.Storage,
|
|
97
|
+
data: Devtools.Client.Storage,
|
|
98
|
+
type: DEVTOOLS_TYPE,
|
|
99
|
+
properties: {
|
|
100
|
+
label: ['storage.label', { ns: meta.id }],
|
|
101
|
+
icon: 'ph--hard-drives--regular',
|
|
102
|
+
},
|
|
103
|
+
}),
|
|
104
|
+
Node.make({
|
|
105
|
+
id: Devtools.Client.Logs,
|
|
106
|
+
data: Devtools.Client.Logs,
|
|
107
|
+
type: DEVTOOLS_TYPE,
|
|
108
|
+
properties: {
|
|
109
|
+
label: ['logs.label', { ns: meta.id }],
|
|
110
|
+
icon: 'ph--file-text--regular',
|
|
111
|
+
},
|
|
112
|
+
}),
|
|
113
|
+
Node.make({
|
|
114
|
+
id: Devtools.Client.Diagnostics,
|
|
115
|
+
data: Devtools.Client.Diagnostics,
|
|
116
|
+
type: DEVTOOLS_TYPE,
|
|
117
|
+
properties: {
|
|
118
|
+
label: ['diagnostics.label', { ns: meta.id }],
|
|
119
|
+
icon: 'ph--chart-line--regular',
|
|
120
|
+
},
|
|
121
|
+
}),
|
|
122
|
+
],
|
|
123
|
+
}),
|
|
124
|
+
Node.make({
|
|
125
|
+
id: Devtools.Halo.id,
|
|
126
|
+
data: null,
|
|
127
|
+
type: DEVTOOLS_TYPE,
|
|
128
|
+
properties: {
|
|
129
|
+
label: ['halo.label', { ns: meta.id }],
|
|
130
|
+
icon: 'ph--identification-badge--regular',
|
|
131
|
+
},
|
|
132
|
+
nodes: [
|
|
133
|
+
Node.make({
|
|
134
|
+
id: Devtools.Halo.Identity,
|
|
135
|
+
data: Devtools.Halo.Identity,
|
|
136
|
+
type: DEVTOOLS_TYPE,
|
|
137
|
+
properties: {
|
|
138
|
+
label: ['identity.label', { ns: meta.id }],
|
|
139
|
+
icon: 'ph--identification-badge--regular',
|
|
140
|
+
},
|
|
141
|
+
}),
|
|
142
|
+
Node.make({
|
|
143
|
+
id: Devtools.Halo.Devices,
|
|
144
|
+
data: Devtools.Halo.Devices,
|
|
145
|
+
type: DEVTOOLS_TYPE,
|
|
146
|
+
properties: {
|
|
147
|
+
label: ['devices.label', { ns: meta.id }],
|
|
148
|
+
icon: 'ph--devices--regular',
|
|
149
|
+
},
|
|
150
|
+
}),
|
|
151
|
+
Node.make({
|
|
152
|
+
id: Devtools.Halo.Keyring,
|
|
153
|
+
data: Devtools.Halo.Keyring,
|
|
154
|
+
type: DEVTOOLS_TYPE,
|
|
155
|
+
properties: {
|
|
156
|
+
label: ['keyring.label', { ns: meta.id }],
|
|
157
|
+
icon: 'ph--key--regular',
|
|
158
|
+
},
|
|
159
|
+
}),
|
|
160
|
+
Node.make({
|
|
161
|
+
id: Devtools.Halo.Credentials,
|
|
162
|
+
data: Devtools.Halo.Credentials,
|
|
163
|
+
type: DEVTOOLS_TYPE,
|
|
164
|
+
properties: {
|
|
165
|
+
label: ['credentials.label', { ns: meta.id }],
|
|
166
|
+
icon: 'ph--credit-card--regular',
|
|
167
|
+
},
|
|
168
|
+
}),
|
|
169
|
+
],
|
|
170
|
+
}),
|
|
171
|
+
Node.make({
|
|
172
|
+
id: Devtools.Echo.id,
|
|
173
|
+
data: null,
|
|
174
|
+
type: DEVTOOLS_TYPE,
|
|
175
|
+
properties: {
|
|
176
|
+
label: ['echo.label', { ns: meta.id }],
|
|
177
|
+
icon: 'ph--database--regular',
|
|
178
|
+
},
|
|
179
|
+
nodes: [
|
|
180
|
+
Node.make({
|
|
181
|
+
id: Devtools.Echo.Spaces,
|
|
182
|
+
data: Devtools.Echo.Spaces,
|
|
183
|
+
type: DEVTOOLS_TYPE,
|
|
184
|
+
properties: {
|
|
185
|
+
label: ['spaces.label', { ns: meta.id }],
|
|
186
|
+
icon: 'ph--graph--regular',
|
|
187
|
+
},
|
|
188
|
+
}),
|
|
189
|
+
Node.make({
|
|
190
|
+
id: Devtools.Echo.Space,
|
|
191
|
+
data: Devtools.Echo.Space,
|
|
192
|
+
type: DEVTOOLS_TYPE,
|
|
193
|
+
properties: {
|
|
194
|
+
label: ['space.label', { ns: meta.id }],
|
|
195
|
+
icon: 'ph--planet--regular',
|
|
196
|
+
},
|
|
197
|
+
}),
|
|
198
|
+
Node.make({
|
|
199
|
+
id: Devtools.Echo.Feeds,
|
|
200
|
+
data: Devtools.Echo.Feeds,
|
|
201
|
+
type: DEVTOOLS_TYPE,
|
|
202
|
+
properties: {
|
|
203
|
+
label: ['feeds.label', { ns: meta.id }],
|
|
204
|
+
icon: 'ph--list-bullets--regular',
|
|
205
|
+
},
|
|
206
|
+
}),
|
|
207
|
+
Node.make({
|
|
208
|
+
id: Devtools.Echo.Objects,
|
|
209
|
+
data: Devtools.Echo.Objects,
|
|
210
|
+
type: DEVTOOLS_TYPE,
|
|
211
|
+
properties: {
|
|
212
|
+
label: ['objects.label', { ns: meta.id }],
|
|
213
|
+
icon: 'ph--cube--regular',
|
|
214
|
+
},
|
|
215
|
+
}),
|
|
216
|
+
Node.make({
|
|
217
|
+
id: Devtools.Echo.Schema,
|
|
218
|
+
data: Devtools.Echo.Schema,
|
|
219
|
+
type: DEVTOOLS_TYPE,
|
|
220
|
+
properties: {
|
|
221
|
+
label: ['schema.label', { ns: meta.id }],
|
|
222
|
+
icon: 'ph--database--regular',
|
|
223
|
+
},
|
|
224
|
+
}),
|
|
225
|
+
Node.make({
|
|
226
|
+
id: Devtools.Echo.Automerge,
|
|
227
|
+
data: Devtools.Echo.Automerge,
|
|
228
|
+
type: DEVTOOLS_TYPE,
|
|
229
|
+
properties: {
|
|
230
|
+
label: ['automerge.label', { ns: meta.id }],
|
|
231
|
+
icon: 'ph--gear-six--regular',
|
|
232
|
+
},
|
|
233
|
+
}),
|
|
234
|
+
Node.make({
|
|
235
|
+
id: Devtools.Echo.Queues,
|
|
236
|
+
data: Devtools.Echo.Queues,
|
|
237
|
+
type: DEVTOOLS_TYPE,
|
|
238
|
+
properties: {
|
|
239
|
+
label: ['queues.label', { ns: meta.id }],
|
|
240
|
+
icon: 'ph--queue--regular',
|
|
241
|
+
},
|
|
242
|
+
}),
|
|
243
|
+
Node.make({
|
|
244
|
+
id: Devtools.Echo.Members,
|
|
245
|
+
data: Devtools.Echo.Members,
|
|
246
|
+
type: DEVTOOLS_TYPE,
|
|
247
|
+
properties: {
|
|
248
|
+
label: ['members.label', { ns: meta.id }],
|
|
249
|
+
icon: 'ph--users--regular',
|
|
250
|
+
},
|
|
251
|
+
}),
|
|
252
|
+
Node.make({
|
|
253
|
+
id: Devtools.Echo.Metadata,
|
|
254
|
+
data: Devtools.Echo.Metadata,
|
|
255
|
+
type: DEVTOOLS_TYPE,
|
|
256
|
+
properties: {
|
|
257
|
+
label: ['metadata.label', { ns: meta.id }],
|
|
258
|
+
icon: 'ph--hard-drive--regular',
|
|
259
|
+
},
|
|
260
|
+
}),
|
|
261
|
+
],
|
|
262
|
+
}),
|
|
263
|
+
Node.make({
|
|
264
|
+
id: Devtools.Mesh.id,
|
|
265
|
+
data: null,
|
|
266
|
+
type: DEVTOOLS_TYPE,
|
|
267
|
+
properties: {
|
|
268
|
+
label: ['mesh.label', { ns: meta.id }],
|
|
269
|
+
icon: 'ph--graph--regular',
|
|
270
|
+
},
|
|
271
|
+
nodes: [
|
|
272
|
+
Node.make({
|
|
273
|
+
id: Devtools.Mesh.Signal,
|
|
274
|
+
data: Devtools.Mesh.Signal,
|
|
275
|
+
type: DEVTOOLS_TYPE,
|
|
276
|
+
properties: {
|
|
277
|
+
label: ['signal.label', { ns: meta.id }],
|
|
278
|
+
icon: 'ph--wifi-high--regular',
|
|
279
|
+
},
|
|
280
|
+
}),
|
|
281
|
+
Node.make({
|
|
282
|
+
id: Devtools.Mesh.Swarm,
|
|
283
|
+
data: Devtools.Mesh.Swarm,
|
|
284
|
+
type: DEVTOOLS_TYPE,
|
|
285
|
+
properties: {
|
|
286
|
+
label: ['swarm.label', { ns: meta.id }],
|
|
287
|
+
icon: 'ph--users-three--regular',
|
|
288
|
+
},
|
|
289
|
+
}),
|
|
290
|
+
Node.make({
|
|
291
|
+
id: Devtools.Mesh.Network,
|
|
292
|
+
data: Devtools.Mesh.Network,
|
|
293
|
+
type: DEVTOOLS_TYPE,
|
|
294
|
+
properties: {
|
|
295
|
+
label: ['network.label', { ns: meta.id }],
|
|
296
|
+
icon: 'ph--polygon--regular',
|
|
297
|
+
},
|
|
298
|
+
}),
|
|
299
|
+
],
|
|
300
|
+
}),
|
|
301
|
+
Node.make({
|
|
302
|
+
id: Devtools.Edge.id,
|
|
303
|
+
data: null,
|
|
304
|
+
type: DEVTOOLS_TYPE,
|
|
305
|
+
properties: {
|
|
306
|
+
label: ['edge.label', { ns: meta.id }],
|
|
307
|
+
icon: 'ph--cloud--regular',
|
|
308
|
+
},
|
|
309
|
+
nodes: [
|
|
310
|
+
Node.make({
|
|
311
|
+
id: Devtools.Edge.Dashboard,
|
|
312
|
+
data: Devtools.Edge.Dashboard,
|
|
313
|
+
type: DEVTOOLS_TYPE,
|
|
314
|
+
properties: {
|
|
315
|
+
label: ['dashboard.label', { ns: meta.id }],
|
|
316
|
+
icon: 'ph--computer-tower--regular',
|
|
317
|
+
},
|
|
318
|
+
}),
|
|
319
|
+
Node.make({
|
|
320
|
+
id: Devtools.Edge.Workflows,
|
|
321
|
+
data: Devtools.Edge.Workflows,
|
|
322
|
+
type: DEVTOOLS_TYPE,
|
|
323
|
+
properties: {
|
|
324
|
+
label: ['workflows.label', { ns: meta.id }],
|
|
325
|
+
icon: 'ph--function--regular',
|
|
326
|
+
},
|
|
327
|
+
}),
|
|
328
|
+
Node.make({
|
|
329
|
+
id: Devtools.Edge.Traces,
|
|
330
|
+
data: Devtools.Edge.Traces,
|
|
331
|
+
type: DEVTOOLS_TYPE,
|
|
332
|
+
properties: {
|
|
333
|
+
label: ['traces.label', { ns: meta.id }],
|
|
334
|
+
icon: 'ph--line-segments--regular',
|
|
335
|
+
},
|
|
336
|
+
}),
|
|
337
|
+
Node.make({
|
|
338
|
+
id: Devtools.Edge.Testing,
|
|
339
|
+
data: Devtools.Edge.Testing,
|
|
340
|
+
type: DEVTOOLS_TYPE,
|
|
341
|
+
properties: {
|
|
342
|
+
label: ['testing.label', { ns: meta.id }],
|
|
343
|
+
icon: 'ph--flask--regular',
|
|
344
|
+
},
|
|
345
|
+
}),
|
|
346
|
+
],
|
|
347
|
+
}),
|
|
348
|
+
],
|
|
349
|
+
}),
|
|
350
|
+
];
|
|
351
|
+
}),
|
|
352
|
+
}),
|
|
353
|
+
|
|
354
|
+
// Debug object companion.
|
|
355
|
+
GraphBuilder.createExtension({
|
|
356
|
+
id: 'debug-object',
|
|
357
|
+
match: NodeMatcher.whenEchoObject,
|
|
358
|
+
connector: () =>
|
|
359
|
+
Effect.succeed([
|
|
360
|
+
AppNode.makeCompanion({
|
|
361
|
+
id: 'debug',
|
|
362
|
+
label: ['debug.label', { ns: meta.id }],
|
|
363
|
+
icon: 'ph--bug--regular',
|
|
364
|
+
data: 'debug',
|
|
365
|
+
position: 'fallback',
|
|
366
|
+
}),
|
|
367
|
+
]),
|
|
368
|
+
}),
|
|
369
|
+
|
|
370
|
+
// Devtools deck companion.
|
|
371
|
+
GraphBuilder.createExtension({
|
|
372
|
+
id: 'devtools-overview',
|
|
373
|
+
match: NodeMatcher.whenRoot,
|
|
374
|
+
connector: () =>
|
|
375
|
+
Effect.succeed([
|
|
376
|
+
AppNode.makeDeckCompanion({
|
|
377
|
+
id: 'devtools',
|
|
378
|
+
label: ['devtools-overview.label', { ns: meta.id }],
|
|
379
|
+
icon: 'ph--equalizer--regular',
|
|
380
|
+
data: 'devtools' as const,
|
|
381
|
+
position: 'fallback',
|
|
382
|
+
}),
|
|
383
|
+
]),
|
|
384
|
+
}),
|
|
385
|
+
|
|
386
|
+
// Object explorer.
|
|
387
|
+
GraphBuilder.createExtension({
|
|
388
|
+
id: 'space-objects',
|
|
389
|
+
match: NodeMatcher.whenRoot,
|
|
390
|
+
connector: () =>
|
|
391
|
+
Effect.succeed([
|
|
392
|
+
AppNode.makeDeckCompanion({
|
|
393
|
+
id: 'space-objects',
|
|
394
|
+
label: ['space-objects.label', { ns: meta.id }],
|
|
395
|
+
icon: 'ph--cube--regular',
|
|
396
|
+
data: 'space-objects' as const,
|
|
397
|
+
position: 'fallback',
|
|
398
|
+
}),
|
|
399
|
+
]),
|
|
400
|
+
}),
|
|
401
|
+
]);
|
|
402
|
+
|
|
403
|
+
return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
|
|
404
|
+
}),
|
|
405
|
+
);
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
export
|
|
5
|
+
import { Capability } from '@dxos/app-framework';
|
|
6
|
+
|
|
7
|
+
export const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));
|
|
8
|
+
export const ReactContext = Capability.lazy('ReactContext', () => import('./react-context'));
|
|
9
|
+
export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
|
|
10
|
+
export const DebugSettings = Capability.lazy('DebugSettings', () => import('./settings'));
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
10
|
+
import { DevtoolsContextProvider } from '@dxos/devtools';
|
|
11
|
+
|
|
12
|
+
import { meta } from '#meta';
|
|
13
|
+
|
|
14
|
+
export default Capability.makeModule(() =>
|
|
15
|
+
Effect.succeed(
|
|
16
|
+
Capability.contributes(Capabilities.ReactContext, {
|
|
17
|
+
id: meta.id,
|
|
18
|
+
context: ({ children }) => (
|
|
19
|
+
<Surface.ProfilerProvider>
|
|
20
|
+
<DevtoolsContextProvider>{children}</DevtoolsContextProvider>
|
|
21
|
+
</Surface.ProfilerProvider>
|
|
22
|
+
),
|
|
23
|
+
}),
|
|
24
|
+
),
|
|
25
|
+
);
|