@dxos/plugin-debug 0.8.4-main.bc674ce → 0.8.4-main.bcb3aa67d6
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 +97 -91
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/types/src/DebugPlugin.d.ts +6 -1
- package/dist/types/src/DebugPlugin.d.ts.map +1 -1
- 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 +15 -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 +10 -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 +79 -0
- package/dist/types/src/components/DebugSettings/DebugSettings.stories.d.ts.map +1 -0
- package/dist/types/src/components/DebugSettings/index.d.ts +3 -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 +1 -1
- package/dist/types/src/components/SpaceGenerator/ObjectGenerator.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/{components → containers/DebugGraph}/DebugGraph.d.ts +0 -1
- package/dist/types/src/containers/DebugGraph/DebugGraph.d.ts.map +1 -0
- package/dist/types/src/containers/DebugGraph/index.d.ts +3 -0
- package/dist/types/src/containers/DebugGraph/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/DebugObjectPanel}/DebugObjectPanel.d.ts +1 -1
- package/dist/types/src/containers/DebugObjectPanel/DebugObjectPanel.d.ts.map +1 -0
- package/dist/types/src/containers/DebugObjectPanel/index.d.ts +3 -0
- package/dist/types/src/containers/DebugObjectPanel/index.d.ts.map +1 -0
- package/dist/types/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.d.ts +3 -0
- package/dist/types/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.d.ts.map +1 -0
- package/dist/types/src/containers/DebugSpaceObjectsPanel/index.d.ts +3 -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 +3 -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 +3 -0
- package/dist/types/src/containers/DevtoolsOverviewContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.d.ts +15 -0
- package/dist/types/src/{components → containers}/SpaceGenerator/SpaceGenerator.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceGenerator/index.d.ts +3 -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 +3 -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/translations.d.ts +60 -58
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Settings.d.ts +6 -0
- package/dist/types/src/types/Settings.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +67 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +74 -67
- package/src/DebugPlugin.tsx +23 -10
- package/src/capabilities/app-graph-builder.ts +406 -0
- package/src/capabilities/index.ts +6 -4
- package/src/capabilities/react-context.tsx +25 -0
- package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +122 -109
- 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 +228 -0
- package/src/components/DebugSettings/index.ts +7 -0
- package/src/components/{SpaceGenerator → SchemaTable}/SchemaTable.tsx +2 -2
- package/src/components/SchemaTable/index.ts +5 -0
- package/src/components/SpaceGenerator/ObjectGenerator.tsx +7 -8
- package/src/components/SpaceGenerator/index.ts +2 -3
- package/src/components/SpaceGenerator/presets.ts +51 -46
- package/src/components/index.ts +4 -11
- package/src/{components → containers/DebugGraph}/DebugGraph.tsx +0 -2
- package/src/containers/DebugGraph/index.ts +7 -0
- package/src/containers/DebugObjectPanel/DebugObjectPanel.tsx +47 -0
- package/src/containers/DebugObjectPanel/index.ts +7 -0
- package/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.tsx +55 -0
- package/src/containers/DebugSpaceObjectsPanel/index.ts +7 -0
- package/src/{components → containers/DebugStatus}/DebugStatus.tsx +41 -17
- package/src/containers/DebugStatus/index.ts +7 -0
- package/src/containers/DevtoolsOverviewContainer/DevtoolsOverviewContainer.tsx +25 -0
- package/src/containers/DevtoolsOverviewContainer/index.ts +7 -0
- package/src/containers/SpaceGenerator/SpaceGenerator.tsx +130 -0
- package/src/containers/SpaceGenerator/index.ts +7 -0
- package/src/{components → containers/Wireframe}/Wireframe.tsx +2 -2
- package/src/containers/Wireframe/index.ts +7 -0
- package/src/containers/index.ts +13 -0
- package/src/meta.ts +1 -1
- package/src/translations.ts +66 -58
- package/src/types/Settings.ts +15 -0
- package/src/{types.ts → types/index.ts} +7 -13
- 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-H33AEFGC.mjs +0 -1152
- package/dist/lib/browser/SpaceGenerator-H33AEFGC.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-LV73R7HR.mjs +0 -598
- package/dist/lib/browser/app-graph-builder-LV73R7HR.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-2N6CPSHR.mjs +0 -757
- package/dist/lib/browser/react-surface-2N6CPSHR.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.map +0 -1
- 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 -420
- 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/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,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
|
+
);
|
|
@@ -5,8 +5,10 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
import React, { useCallback } from 'react';
|
|
7
7
|
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
|
+
import { Surface, useOperationInvoker, useSettingsState } from '@dxos/app-framework/ui';
|
|
10
|
+
import { AppCapabilities, LayoutOperation, getObjectPathFromObject } from '@dxos/app-toolkit';
|
|
11
|
+
|
|
10
12
|
import {
|
|
11
13
|
AutomergePanel,
|
|
12
14
|
ConfigPanel,
|
|
@@ -35,26 +37,29 @@ import {
|
|
|
35
37
|
WorkflowPanel,
|
|
36
38
|
} from '@dxos/devtools';
|
|
37
39
|
import { Obj } from '@dxos/echo';
|
|
40
|
+
import { Collection } from '@dxos/echo';
|
|
41
|
+
import { type LogBuffer } from '@dxos/log';
|
|
38
42
|
import { log } from '@dxos/log';
|
|
39
|
-
|
|
43
|
+
|
|
40
44
|
import { type Graph } from '@dxos/plugin-graph';
|
|
41
|
-
import { ScriptOperation } from '@dxos/plugin-script/
|
|
42
|
-
import { SpaceOperation } from '@dxos/plugin-space/
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
45
|
+
import { ScriptOperation } from '@dxos/plugin-script/operations';
|
|
46
|
+
import { SpaceOperation } from '@dxos/plugin-space/operations';
|
|
47
|
+
import { useActiveSpace } from '@dxos/app-toolkit/ui';
|
|
48
|
+
import { type Space, SpaceState, isSpace } from '@dxos/react-client/echo';
|
|
49
|
+
import { Panel } from '@dxos/react-ui';
|
|
46
50
|
|
|
51
|
+
import { DebugSettings } from '#components';
|
|
47
52
|
import {
|
|
48
53
|
DebugGraph,
|
|
49
54
|
DebugObjectPanel,
|
|
50
|
-
|
|
55
|
+
DebugSpaceObjectsPanel,
|
|
51
56
|
DebugStatus,
|
|
52
57
|
DevtoolsOverviewContainer,
|
|
53
58
|
SpaceGenerator,
|
|
54
59
|
Wireframe,
|
|
55
|
-
} from '
|
|
56
|
-
import { meta } from '
|
|
57
|
-
import { DebugCapabilities, type
|
|
60
|
+
} from '#containers';
|
|
61
|
+
import { meta } from '#meta';
|
|
62
|
+
import { DebugCapabilities, type Settings, Devtools } from '#types';
|
|
58
63
|
|
|
59
64
|
type SpaceDebug = {
|
|
60
65
|
type: string;
|
|
@@ -66,7 +71,7 @@ type GraphDebug = {
|
|
|
66
71
|
root: string;
|
|
67
72
|
};
|
|
68
73
|
|
|
69
|
-
const isSpaceDebug = (data: any): data is SpaceDebug => data?.type === `${meta.id}
|
|
74
|
+
const isSpaceDebug = (data: any): data is SpaceDebug => data?.type === `${meta.id}.space` && isSpace(data.space);
|
|
70
75
|
const isGraphDebug = (data: any): data is GraphDebug => {
|
|
71
76
|
const graph = data?.graph;
|
|
72
77
|
return (
|
|
@@ -74,34 +79,39 @@ const isGraphDebug = (data: any): data is GraphDebug => {
|
|
|
74
79
|
);
|
|
75
80
|
};
|
|
76
81
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
const { spaceId } = parseId(layout.workspace);
|
|
82
|
-
const space = spaceId ? client.spaces.get(spaceId) : undefined;
|
|
83
|
-
return space;
|
|
82
|
+
const useCurrentSpace = useActiveSpace;
|
|
83
|
+
|
|
84
|
+
type ReactSurfaceOptions = {
|
|
85
|
+
logBuffer: LogBuffer;
|
|
84
86
|
};
|
|
85
87
|
|
|
86
88
|
export default Capability.makeModule(
|
|
87
|
-
Effect.fnUntraced(function* () {
|
|
89
|
+
Effect.fnUntraced(function* ({ logBuffer }: ReactSurfaceOptions) {
|
|
88
90
|
const capabilities = yield* Capability.Service;
|
|
89
|
-
const registry = capabilities.get(
|
|
91
|
+
const registry = capabilities.get(Capabilities.AtomRegistry);
|
|
90
92
|
const settingsAtom = capabilities.get(DebugCapabilities.Settings);
|
|
93
|
+
const fileUploader = capabilities.getAll(AppCapabilities.FileUploader)[0];
|
|
91
94
|
|
|
92
|
-
return Capability.contributes(
|
|
93
|
-
|
|
94
|
-
id: `${meta.id}
|
|
95
|
+
return Capability.contributes(Capabilities.ReactSurface, [
|
|
96
|
+
Surface.create({
|
|
97
|
+
id: `${meta.id}.plugin-settings`,
|
|
95
98
|
role: 'article',
|
|
96
|
-
filter: (data): data is { subject:
|
|
97
|
-
|
|
99
|
+
filter: (data): data is { subject: AppCapabilities.Settings } =>
|
|
100
|
+
AppCapabilities.isSettings(data.subject) && data.subject.prefix === meta.id,
|
|
98
101
|
component: ({ data: { subject } }) => {
|
|
99
|
-
const { settings, updateSettings } = useSettingsState<
|
|
100
|
-
return
|
|
102
|
+
const { settings, updateSettings } = useSettingsState<Settings.Settings>(subject.atom);
|
|
103
|
+
return (
|
|
104
|
+
<DebugSettings
|
|
105
|
+
settings={settings}
|
|
106
|
+
onSettingsChange={updateSettings}
|
|
107
|
+
logBuffer={logBuffer}
|
|
108
|
+
onUpload={fileUploader}
|
|
109
|
+
/>
|
|
110
|
+
);
|
|
101
111
|
},
|
|
102
112
|
}),
|
|
103
|
-
|
|
104
|
-
id: `${meta.id}
|
|
113
|
+
Surface.create({
|
|
114
|
+
id: `${meta.id}.space`,
|
|
105
115
|
role: 'article',
|
|
106
116
|
filter: (data): data is { subject: SpaceDebug } => isSpaceDebug(data.subject),
|
|
107
117
|
component: ({ role, data }) => {
|
|
@@ -131,102 +141,112 @@ export default Capability.makeModule(
|
|
|
131
141
|
);
|
|
132
142
|
|
|
133
143
|
return (
|
|
134
|
-
<
|
|
135
|
-
<
|
|
136
|
-
|
|
144
|
+
<Panel.Root role={role} className='dx-document'>
|
|
145
|
+
<Panel.Content asChild>
|
|
146
|
+
<SpaceGenerator space={data.subject.space} onCreateObjects={handleCreateObject} />
|
|
147
|
+
</Panel.Content>
|
|
148
|
+
</Panel.Root>
|
|
137
149
|
);
|
|
138
150
|
},
|
|
139
151
|
}),
|
|
140
|
-
|
|
141
|
-
id: `${meta.id}
|
|
152
|
+
Surface.create({
|
|
153
|
+
id: `${meta.id}.app-graph`,
|
|
142
154
|
role: 'article',
|
|
143
155
|
filter: (data): data is { subject: GraphDebug } => isGraphDebug(data.subject),
|
|
144
156
|
component: ({ data }) => <DebugGraph graph={data.subject.graph} root={data.subject.root} />,
|
|
145
157
|
}),
|
|
146
|
-
|
|
147
|
-
id: `${meta.id}
|
|
158
|
+
Surface.create({
|
|
159
|
+
id: `${meta.id}.wireframe`,
|
|
148
160
|
role: ['article', 'section'],
|
|
149
161
|
position: 'hoist',
|
|
150
162
|
filter: (data): data is { subject: Obj.Unknown } => {
|
|
151
163
|
const settings = registry.get(settingsAtom);
|
|
152
164
|
return Obj.isObject(data.subject) && !!settings.wireframe;
|
|
153
165
|
},
|
|
154
|
-
component: ({ data, role }) => (
|
|
166
|
+
component: ({ data, role, name }) => (
|
|
155
167
|
<Wireframe label={`${role}:${name}`} object={data.subject} classNames='row-span-2 overflow-hidden' />
|
|
156
168
|
),
|
|
157
169
|
}),
|
|
158
|
-
|
|
159
|
-
id: `${meta.id}
|
|
170
|
+
Surface.create({
|
|
171
|
+
id: `${meta.id}.object-debug`,
|
|
160
172
|
role: 'article',
|
|
161
173
|
filter: (data): data is { companionTo: Obj.Unknown } =>
|
|
162
174
|
data.subject === 'debug' && Obj.isObject(data.companionTo),
|
|
163
175
|
component: ({ data }) => <DebugObjectPanel object={data.companionTo} />,
|
|
164
176
|
}),
|
|
165
|
-
|
|
166
|
-
id: `${meta.id}
|
|
177
|
+
Surface.create({
|
|
178
|
+
id: `${meta.id}.devtools-overview`,
|
|
167
179
|
role: 'deck-companion--devtools',
|
|
180
|
+
filter: (data): data is { subject: 'devtools' } => data.subject === 'devtools',
|
|
168
181
|
component: () => <DevtoolsOverviewContainer />,
|
|
169
182
|
}),
|
|
170
|
-
|
|
171
|
-
id: `${meta.id}
|
|
172
|
-
role: '
|
|
173
|
-
|
|
183
|
+
Surface.create({
|
|
184
|
+
id: `${meta.id}.space-objects`,
|
|
185
|
+
role: 'deck-companion--space-objects',
|
|
186
|
+
filter: (data): data is { subject: 'space-objects' } => data.subject === 'space-objects',
|
|
187
|
+
component: () => <DebugSpaceObjectsPanel />,
|
|
174
188
|
}),
|
|
175
189
|
|
|
190
|
+
Surface.create({
|
|
191
|
+
id: `${meta.id}.status`,
|
|
192
|
+
role: 'status-indicator',
|
|
193
|
+
position: 'hoist',
|
|
194
|
+
component: () => <DebugStatus />,
|
|
195
|
+
}),
|
|
176
196
|
//
|
|
177
197
|
// Devtools
|
|
178
198
|
//
|
|
179
199
|
|
|
180
|
-
|
|
181
|
-
id: `${meta.id}
|
|
200
|
+
Surface.create({
|
|
201
|
+
id: `${meta.id}.client.config`,
|
|
182
202
|
role: 'article',
|
|
183
203
|
filter: (data): data is any => data.subject === Devtools.Client.Config,
|
|
184
204
|
component: () => <ConfigPanel vaultSelector={false} />,
|
|
185
205
|
}),
|
|
186
|
-
|
|
187
|
-
id: `${meta.id}
|
|
206
|
+
Surface.create({
|
|
207
|
+
id: `${meta.id}.client.storage`,
|
|
188
208
|
role: 'article',
|
|
189
209
|
filter: (data): data is any => data.subject === Devtools.Client.Storage,
|
|
190
210
|
component: () => <StoragePanel />,
|
|
191
211
|
}),
|
|
192
|
-
|
|
193
|
-
id: `${meta.id}
|
|
212
|
+
Surface.create({
|
|
213
|
+
id: `${meta.id}.client.logs`,
|
|
194
214
|
role: 'article',
|
|
195
215
|
filter: (data): data is any => data.subject === Devtools.Client.Logs,
|
|
196
216
|
component: () => <LoggingPanel />,
|
|
197
217
|
}),
|
|
198
|
-
|
|
199
|
-
id: `${meta.id}
|
|
218
|
+
Surface.create({
|
|
219
|
+
id: `${meta.id}.client.diagnostics`,
|
|
200
220
|
role: 'article',
|
|
201
221
|
filter: (data): data is any => data.subject === Devtools.Client.Diagnostics,
|
|
202
222
|
component: () => <DiagnosticsPanel />,
|
|
203
223
|
}),
|
|
204
|
-
|
|
205
|
-
id: `${meta.id}
|
|
224
|
+
Surface.create({
|
|
225
|
+
id: `${meta.id}.client.tracing`,
|
|
206
226
|
role: 'article',
|
|
207
227
|
filter: (data): data is any => data.subject === Devtools.Client.Tracing,
|
|
208
228
|
component: () => <TracingPanel />,
|
|
209
229
|
}),
|
|
210
|
-
|
|
211
|
-
id: `${meta.id}
|
|
230
|
+
Surface.create({
|
|
231
|
+
id: `${meta.id}.halo.identity`,
|
|
212
232
|
role: 'article',
|
|
213
233
|
filter: (data): data is any => data.subject === Devtools.Halo.Identity,
|
|
214
234
|
component: () => <IdentityPanel />,
|
|
215
235
|
}),
|
|
216
|
-
|
|
217
|
-
id: `${meta.id}
|
|
236
|
+
Surface.create({
|
|
237
|
+
id: `${meta.id}.halo.devices`,
|
|
218
238
|
role: 'article',
|
|
219
239
|
filter: (data): data is any => data.subject === Devtools.Halo.Devices,
|
|
220
240
|
component: () => <DeviceListPanel />,
|
|
221
241
|
}),
|
|
222
|
-
|
|
223
|
-
id: `${meta.id}
|
|
242
|
+
Surface.create({
|
|
243
|
+
id: `${meta.id}.halo.keyring`,
|
|
224
244
|
role: 'article',
|
|
225
245
|
filter: (data): data is any => data.subject === Devtools.Halo.Keyring,
|
|
226
246
|
component: () => <KeyringPanel />,
|
|
227
247
|
}),
|
|
228
|
-
|
|
229
|
-
id: `${meta.id}
|
|
248
|
+
Surface.create({
|
|
249
|
+
id: `${meta.id}.halo.credentials`,
|
|
230
250
|
role: 'article',
|
|
231
251
|
filter: (data): data is any => data.subject === Devtools.Halo.Credentials,
|
|
232
252
|
component: () => {
|
|
@@ -234,35 +254,35 @@ export default Capability.makeModule(
|
|
|
234
254
|
return <CredentialsPanel space={space} />;
|
|
235
255
|
},
|
|
236
256
|
}),
|
|
237
|
-
|
|
238
|
-
id: `${meta.id}
|
|
257
|
+
Surface.create({
|
|
258
|
+
id: `${meta.id}.echo.spaces`,
|
|
239
259
|
role: 'article',
|
|
240
260
|
filter: (data): data is any => data.subject === Devtools.Echo.Spaces,
|
|
241
261
|
component: () => {
|
|
242
262
|
const { invokePromise } = useOperationInvoker();
|
|
243
263
|
const handleSelect = useCallback(
|
|
244
|
-
() => invokePromise(
|
|
264
|
+
() => invokePromise(LayoutOperation.Open, { subject: [Devtools.Echo.Space] }),
|
|
245
265
|
[invokePromise],
|
|
246
266
|
);
|
|
247
267
|
return <SpaceListPanel onSelect={handleSelect} />;
|
|
248
268
|
},
|
|
249
269
|
}),
|
|
250
|
-
|
|
251
|
-
id: `${meta.id}
|
|
270
|
+
Surface.create({
|
|
271
|
+
id: `${meta.id}.echo.space`,
|
|
252
272
|
role: 'article',
|
|
253
273
|
filter: (data): data is any => data.subject === Devtools.Echo.Space,
|
|
254
274
|
component: () => {
|
|
255
275
|
const space = useCurrentSpace();
|
|
256
276
|
const { invokePromise } = useOperationInvoker();
|
|
257
277
|
const handleSelect = useCallback(
|
|
258
|
-
() => invokePromise(
|
|
278
|
+
() => invokePromise(LayoutOperation.Open, { subject: [Devtools.Echo.Feeds] }),
|
|
259
279
|
[invokePromise],
|
|
260
280
|
);
|
|
261
281
|
return <SpaceInfoPanel space={space} onSelectFeed={handleSelect} onSelectPipeline={handleSelect} />;
|
|
262
282
|
},
|
|
263
283
|
}),
|
|
264
|
-
|
|
265
|
-
id: `${meta.id}
|
|
284
|
+
Surface.create({
|
|
285
|
+
id: `${meta.id}.echo.feeds`,
|
|
266
286
|
role: 'article',
|
|
267
287
|
filter: (data): data is any => data.subject === Devtools.Echo.Feeds,
|
|
268
288
|
component: () => {
|
|
@@ -270,8 +290,8 @@ export default Capability.makeModule(
|
|
|
270
290
|
return <FeedsPanel space={space} />;
|
|
271
291
|
},
|
|
272
292
|
}),
|
|
273
|
-
|
|
274
|
-
id: `${meta.id}
|
|
293
|
+
Surface.create({
|
|
294
|
+
id: `${meta.id}.echo.objects`,
|
|
275
295
|
role: 'article',
|
|
276
296
|
filter: (data): data is any => data.subject === Devtools.Echo.Objects,
|
|
277
297
|
component: () => {
|
|
@@ -279,8 +299,8 @@ export default Capability.makeModule(
|
|
|
279
299
|
return <ObjectsPanel space={space} />;
|
|
280
300
|
},
|
|
281
301
|
}),
|
|
282
|
-
|
|
283
|
-
id: `${meta.id}
|
|
302
|
+
Surface.create({
|
|
303
|
+
id: `${meta.id}.echo.schema`,
|
|
284
304
|
role: 'article',
|
|
285
305
|
filter: (data): data is any => data.subject === Devtools.Echo.Schema,
|
|
286
306
|
component: () => {
|
|
@@ -288,8 +308,8 @@ export default Capability.makeModule(
|
|
|
288
308
|
return <SchemaPanel space={space} />;
|
|
289
309
|
},
|
|
290
310
|
}),
|
|
291
|
-
|
|
292
|
-
id: `${meta.id}
|
|
311
|
+
Surface.create({
|
|
312
|
+
id: `${meta.id}.echo.automerge`,
|
|
293
313
|
role: 'article',
|
|
294
314
|
filter: (data): data is any => data.subject === Devtools.Echo.Automerge,
|
|
295
315
|
component: () => {
|
|
@@ -297,14 +317,14 @@ export default Capability.makeModule(
|
|
|
297
317
|
return <AutomergePanel space={space} />;
|
|
298
318
|
},
|
|
299
319
|
}),
|
|
300
|
-
|
|
301
|
-
id: `${meta.id}
|
|
320
|
+
Surface.create({
|
|
321
|
+
id: `${meta.id}.echo.queues`,
|
|
302
322
|
role: 'article',
|
|
303
323
|
filter: (data): data is any => data.subject === Devtools.Echo.Queues,
|
|
304
324
|
component: () => <QueuesPanel />,
|
|
305
325
|
}),
|
|
306
|
-
|
|
307
|
-
id: `${meta.id}
|
|
326
|
+
Surface.create({
|
|
327
|
+
id: `${meta.id}.echo.members`,
|
|
308
328
|
role: 'article',
|
|
309
329
|
filter: (data): data is any => data.subject === Devtools.Echo.Members,
|
|
310
330
|
component: () => {
|
|
@@ -312,26 +332,26 @@ export default Capability.makeModule(
|
|
|
312
332
|
return <MembersPanel space={space} />;
|
|
313
333
|
},
|
|
314
334
|
}),
|
|
315
|
-
|
|
316
|
-
id: `${meta.id}
|
|
335
|
+
Surface.create({
|
|
336
|
+
id: `${meta.id}.echo.metadata`,
|
|
317
337
|
role: 'article',
|
|
318
338
|
filter: (data): data is any => data.subject === Devtools.Echo.Metadata,
|
|
319
339
|
component: () => <MetadataPanel />,
|
|
320
340
|
}),
|
|
321
|
-
|
|
322
|
-
id: `${meta.id}
|
|
341
|
+
Surface.create({
|
|
342
|
+
id: `${meta.id}.mesh.signal`,
|
|
323
343
|
role: 'article',
|
|
324
344
|
filter: (data): data is any => data.subject === Devtools.Mesh.Signal,
|
|
325
345
|
component: () => <SignalPanel />,
|
|
326
346
|
}),
|
|
327
|
-
|
|
328
|
-
id: `${meta.id}
|
|
347
|
+
Surface.create({
|
|
348
|
+
id: `${meta.id}.mesh.swarm`,
|
|
329
349
|
role: 'article',
|
|
330
350
|
filter: (data): data is any => data.subject === Devtools.Mesh.Swarm,
|
|
331
351
|
component: () => <SwarmPanel />,
|
|
332
352
|
}),
|
|
333
|
-
|
|
334
|
-
id: `${meta.id}
|
|
353
|
+
Surface.create({
|
|
354
|
+
id: `${meta.id}.mesh.network`,
|
|
335
355
|
role: 'article',
|
|
336
356
|
filter: (data): data is any => data.subject === Devtools.Mesh.Network,
|
|
337
357
|
component: () => {
|
|
@@ -339,21 +359,14 @@ export default Capability.makeModule(
|
|
|
339
359
|
return <NetworkPanel space={space} />;
|
|
340
360
|
},
|
|
341
361
|
}),
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
// id: `${meta.id}/agent/dashboard`,
|
|
345
|
-
// role: 'article',
|
|
346
|
-
// filter: (data): data is any => data.subject === Devtools.Agent.Dashboard,
|
|
347
|
-
// component: () => <DashboardPanel />,
|
|
348
|
-
// }),
|
|
349
|
-
Common.createSurface({
|
|
350
|
-
id: `${meta.id}/edge/dashboard`,
|
|
362
|
+
Surface.create({
|
|
363
|
+
id: `${meta.id}.edge.dashboard`,
|
|
351
364
|
role: 'article',
|
|
352
365
|
filter: (data): data is any => data.subject === Devtools.Edge.Dashboard,
|
|
353
366
|
component: () => <EdgeDashboardPanel />,
|
|
354
367
|
}),
|
|
355
|
-
|
|
356
|
-
id: `${meta.id}
|
|
368
|
+
Surface.create({
|
|
369
|
+
id: `${meta.id}.edge.workflows`,
|
|
357
370
|
role: 'article',
|
|
358
371
|
filter: (data): data is any => data.subject === Devtools.Edge.Workflows,
|
|
359
372
|
component: () => {
|
|
@@ -361,8 +374,8 @@ export default Capability.makeModule(
|
|
|
361
374
|
return <WorkflowPanel space={space} />;
|
|
362
375
|
},
|
|
363
376
|
}),
|
|
364
|
-
|
|
365
|
-
id: `${meta.id}
|
|
377
|
+
Surface.create({
|
|
378
|
+
id: `${meta.id}.edge.traces`,
|
|
366
379
|
role: 'article',
|
|
367
380
|
filter: (data): data is any => data.subject === Devtools.Edge.Traces,
|
|
368
381
|
component: () => {
|
|
@@ -371,8 +384,8 @@ export default Capability.makeModule(
|
|
|
371
384
|
return <InvocationTraceContainer db={space?.db} queueDxn={queueDxn} detailAxis='block' />;
|
|
372
385
|
},
|
|
373
386
|
}),
|
|
374
|
-
|
|
375
|
-
id: `${meta.id}
|
|
387
|
+
Surface.create({
|
|
388
|
+
id: `${meta.id}.edge.testing`,
|
|
376
389
|
role: 'article',
|
|
377
390
|
filter: (data): data is any => data.subject === Devtools.Edge.Testing,
|
|
378
391
|
component: () => {
|
|
@@ -393,9 +406,9 @@ export default Capability.makeModule(
|
|
|
393
406
|
await invokePromise(SpaceOperation.AddObject, { target: space.db, object: createResult.data.object });
|
|
394
407
|
}
|
|
395
408
|
log.info('script created', { result: createResult });
|
|
396
|
-
if (createResult.data?.object
|
|
397
|
-
await invokePromise(
|
|
398
|
-
subject: [
|
|
409
|
+
if (createResult.data?.object) {
|
|
410
|
+
await invokePromise(LayoutOperation.Open, {
|
|
411
|
+
subject: [getObjectPathFromObject(createResult.data.object)],
|
|
399
412
|
});
|
|
400
413
|
}
|
|
401
414
|
},
|
|
@@ -4,25 +4,26 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
|
-
import { Capability
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
8
9
|
import { createKvsStore } from '@dxos/effect';
|
|
9
10
|
|
|
10
|
-
import { meta } from '
|
|
11
|
-
import { DebugCapabilities,
|
|
11
|
+
import { meta } from '#meta';
|
|
12
|
+
import { DebugCapabilities, Settings } from '#types';
|
|
12
13
|
|
|
13
14
|
export default Capability.makeModule(() =>
|
|
14
15
|
Effect.sync(() => {
|
|
15
16
|
const settingsAtom = createKvsStore({
|
|
16
17
|
key: meta.id,
|
|
17
|
-
schema:
|
|
18
|
+
schema: Settings.Settings,
|
|
18
19
|
defaultValue: () => ({}),
|
|
19
20
|
});
|
|
20
21
|
|
|
21
22
|
return [
|
|
22
23
|
Capability.contributes(DebugCapabilities.Settings, settingsAtom),
|
|
23
|
-
Capability.contributes(
|
|
24
|
+
Capability.contributes(AppCapabilities.Settings, {
|
|
24
25
|
prefix: meta.id,
|
|
25
|
-
schema:
|
|
26
|
+
schema: Settings.Settings,
|
|
26
27
|
atom: settingsAtom,
|
|
27
28
|
}),
|
|
28
29
|
];
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
|
|
7
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
8
|
+
import { withClientProvider } from '@dxos/react-client/testing';
|
|
9
|
+
|
|
10
|
+
import { translations } from '../../translations';
|
|
11
|
+
|
|
12
|
+
import { DebugSettings } from './DebugSettings';
|
|
13
|
+
|
|
14
|
+
const meta = {
|
|
15
|
+
title: 'plugins/plugin-debug/components/DebugSettings',
|
|
16
|
+
component: DebugSettings,
|
|
17
|
+
decorators: [withTheme(), withLayout({ layout: 'fullscreen' }), withClientProvider({ createIdentity: true })],
|
|
18
|
+
tags: ['settings'],
|
|
19
|
+
parameters: {
|
|
20
|
+
layout: 'fullscreen',
|
|
21
|
+
translations,
|
|
22
|
+
},
|
|
23
|
+
} satisfies Meta<typeof DebugSettings>;
|
|
24
|
+
|
|
25
|
+
export default meta;
|
|
26
|
+
|
|
27
|
+
type Story = StoryObj<typeof meta>;
|
|
28
|
+
|
|
29
|
+
export const Default: Story = {
|
|
30
|
+
args: {
|
|
31
|
+
settings: {
|
|
32
|
+
wireframe: false,
|
|
33
|
+
},
|
|
34
|
+
logBuffer: { serialize: () => '' } as any,
|
|
35
|
+
},
|
|
36
|
+
};
|