@dxos/plugin-debug 0.8.4-main.c85a9c8dae → 0.8.4-main.d9fc60f731
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/LICENSE +102 -5
- package/PLUGIN.mdl +373 -0
- package/README.md +1 -1
- package/dist/lib/{browser/DebugGraph-7HXJ2PS2.mjs → neutral/DebugGraph-G4FWS57E.mjs} +4 -5
- package/dist/lib/neutral/DebugGraph-G4FWS57E.mjs.map +7 -0
- package/dist/lib/neutral/DebugObjectPanel-OS65NC4M.mjs +59 -0
- package/dist/lib/neutral/DebugObjectPanel-OS65NC4M.mjs.map +7 -0
- package/dist/lib/neutral/DebugPlugin.mjs +59 -0
- package/dist/lib/neutral/DebugPlugin.mjs.map +7 -0
- package/dist/lib/neutral/DebugPlugin.node.mjs +18 -0
- package/dist/lib/neutral/DebugPlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/DebugPlugin.workerd.mjs +12 -0
- package/dist/lib/neutral/DebugPlugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/DebugSettings-RKYNQIKH.mjs +223 -0
- package/dist/lib/neutral/DebugSettings-RKYNQIKH.mjs.map +7 -0
- package/dist/lib/{browser/DebugSpaceObjectsPanel-7NRPLWZ4.mjs → neutral/DebugSpaceObjectsPanel-BHOCFWDJ.mjs} +10 -26
- package/dist/lib/neutral/DebugSpaceObjectsPanel-BHOCFWDJ.mjs.map +7 -0
- package/dist/lib/{browser/DebugStatus-COQGH37G.mjs → neutral/DebugStatus-H2BAHN26.mjs} +36 -39
- package/dist/lib/neutral/DebugStatus-H2BAHN26.mjs.map +7 -0
- package/dist/lib/{browser/DevtoolsOverviewContainer-C75NFVER.mjs → neutral/DevtoolsOverviewContainer-YX7Z3D2H.mjs} +9 -6
- package/dist/lib/neutral/DevtoolsOverviewContainer-YX7Z3D2H.mjs.map +7 -0
- package/dist/lib/neutral/GithubPanel-QJKDJRVQ.mjs +177 -0
- package/dist/lib/neutral/GithubPanel-QJKDJRVQ.mjs.map +7 -0
- package/dist/lib/neutral/RegistryPanel-64GIYJHN.mjs +161 -0
- package/dist/lib/neutral/RegistryPanel-64GIYJHN.mjs.map +7 -0
- package/dist/lib/neutral/SpaceGenerator-Y35G6DRV.mjs +146 -0
- package/dist/lib/neutral/SpaceGenerator-Y35G6DRV.mjs.map +7 -0
- package/dist/lib/{browser/Wireframe-KAGOKEFW.mjs → neutral/Wireframe-WD7S2AUU.mjs} +9 -10
- package/dist/lib/neutral/Wireframe-WD7S2AUU.mjs.map +7 -0
- package/dist/lib/{browser/app-graph-builder-LGUQNXHD.mjs → neutral/app-graph-builder-XYLTBYKN.mjs} +246 -259
- package/dist/lib/neutral/app-graph-builder-XYLTBYKN.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +15 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-HOV6MV5B.mjs +43 -0
- package/dist/lib/neutral/chunk-HOV6MV5B.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/{browser/chunk-4UFQXPP7.mjs → neutral/chunk-UAAGABXZ.mjs} +24 -12
- package/dist/lib/neutral/chunk-UAAGABXZ.mjs.map +7 -0
- package/dist/lib/{browser/SpaceGenerator-SWSGJEEL.mjs → neutral/components/index.mjs} +90 -292
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +25 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +18 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +8 -0
- package/dist/lib/neutral/meta.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +12 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/{browser/react-context-I3USIAF6.mjs → neutral/react-context-MUZ3KVLU.mjs} +6 -6
- package/dist/lib/neutral/react-context-MUZ3KVLU.mjs.map +7 -0
- package/dist/lib/{browser/react-surface-BTVNKKVQ.mjs → neutral/react-surface-3MDMZGCA.mjs} +162 -180
- package/dist/lib/neutral/react-surface-3MDMZGCA.mjs.map +7 -0
- package/dist/lib/{browser/settings-SLTQJJNF.mjs → neutral/settings-MPM6YUP4.mjs} +7 -11
- package/dist/lib/neutral/settings-MPM6YUP4.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +91 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +14 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/types/src/DebugPlugin.d.ts +2 -5
- 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/DebugPlugin.workerd.d.ts +5 -0
- package/dist/types/src/DebugPlugin.workerd.d.ts.map +1 -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.d.ts.map +1 -0
- package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +2 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/{settings/settings.d.ts → settings.d.ts} +2 -1
- 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 +106 -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 -1
- package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts +3 -4
- 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/presets.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -0
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/DebugGraph/DebugGraph.d.ts +2 -2
- package/dist/types/src/containers/DebugGraph/DebugGraph.d.ts.map +1 -1
- package/dist/types/src/containers/DebugGraph/index.d.ts +1 -2
- package/dist/types/src/containers/DebugGraph/index.d.ts.map +1 -1
- package/dist/types/src/containers/DebugObjectPanel/DebugObjectPanel.d.ts +3 -4
- package/dist/types/src/containers/DebugObjectPanel/DebugObjectPanel.d.ts.map +1 -1
- package/dist/types/src/containers/DebugObjectPanel/index.d.ts +1 -2
- package/dist/types/src/containers/DebugObjectPanel/index.d.ts.map +1 -1
- package/dist/types/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.d.ts +3 -1
- package/dist/types/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.d.ts.map +1 -1
- package/dist/types/src/containers/DebugSpaceObjectsPanel/index.d.ts +1 -2
- package/dist/types/src/containers/DebugSpaceObjectsPanel/index.d.ts.map +1 -1
- package/dist/types/src/containers/DebugStatus/DebugStatus.d.ts.map +1 -1
- package/dist/types/src/containers/DebugStatus/index.d.ts +1 -2
- package/dist/types/src/containers/DebugStatus/index.d.ts.map +1 -1
- package/dist/types/src/containers/DevtoolsOverviewContainer/DevtoolsOverviewContainer.d.ts.map +1 -1
- package/dist/types/src/containers/DevtoolsOverviewContainer/index.d.ts +1 -2
- package/dist/types/src/containers/DevtoolsOverviewContainer/index.d.ts.map +1 -1
- package/dist/types/src/containers/GithubPanel/GithubComponent.d.ts +15 -0
- package/dist/types/src/containers/GithubPanel/GithubComponent.d.ts.map +1 -0
- package/dist/types/src/containers/GithubPanel/GithubComponent.stories.d.ts +106 -0
- package/dist/types/src/containers/GithubPanel/GithubComponent.stories.d.ts.map +1 -0
- package/dist/types/src/containers/GithubPanel/GithubPanel.d.ts +3 -0
- package/dist/types/src/containers/GithubPanel/GithubPanel.d.ts.map +1 -0
- package/dist/types/src/containers/GithubPanel/index.d.ts +2 -0
- package/dist/types/src/containers/GithubPanel/index.d.ts.map +1 -0
- package/dist/types/src/containers/RegistryPanel/RegistryPanel.d.ts +3 -0
- package/dist/types/src/containers/RegistryPanel/RegistryPanel.d.ts.map +1 -0
- package/dist/types/src/containers/RegistryPanel/index.d.ts +2 -0
- package/dist/types/src/containers/RegistryPanel/index.d.ts.map +1 -0
- package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.d.ts +3 -1
- package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceGenerator/index.d.ts +1 -2
- package/dist/types/src/containers/SpaceGenerator/index.d.ts.map +1 -1
- package/dist/types/src/containers/Wireframe/Wireframe.d.ts.map +1 -1
- package/dist/types/src/containers/Wireframe/index.d.ts +1 -2
- package/dist/types/src/containers/Wireframe/index.d.ts.map +1 -1
- package/dist/types/src/containers/index.d.ts +2 -1
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +1 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +87 -61
- 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 +70 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +112 -71
- package/src/DebugPlugin.node.ts +18 -0
- package/src/DebugPlugin.test.ts +29 -0
- package/src/DebugPlugin.tsx +14 -10
- package/src/DebugPlugin.workerd.ts +12 -0
- package/src/capabilities/app-graph-builder.ts +433 -0
- package/src/capabilities/index.ts +6 -4
- package/src/capabilities/{react-context/react-context.tsx → react-context.tsx} +7 -2
- package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +179 -161
- package/src/capabilities/{settings/settings.ts → settings.ts} +4 -4
- package/src/components/DebugSettings/DebugSettings.stories.tsx +36 -0
- package/src/components/DebugSettings/DebugSettings.tsx +259 -0
- package/src/components/DebugSettings/index.ts +5 -0
- package/src/components/SpaceGenerator/ObjectGenerator.tsx +28 -28
- package/src/components/SpaceGenerator/draw-util.ts +8 -8
- package/src/components/SpaceGenerator/presets.ts +39 -62
- package/src/components/index.ts +4 -0
- package/src/containers/DebugGraph/DebugGraph.tsx +3 -2
- package/src/containers/DebugGraph/index.ts +1 -3
- package/src/containers/DebugObjectPanel/DebugObjectPanel.tsx +49 -18
- package/src/containers/DebugObjectPanel/index.ts +1 -3
- package/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.tsx +11 -24
- package/src/containers/DebugSpaceObjectsPanel/index.ts +1 -3
- package/src/containers/DebugStatus/DebugStatus.tsx +42 -19
- package/src/containers/DebugStatus/index.ts +1 -3
- package/src/containers/DevtoolsOverviewContainer/DevtoolsOverviewContainer.tsx +8 -1
- package/src/containers/DevtoolsOverviewContainer/index.ts +1 -3
- package/src/containers/GithubPanel/GithubComponent.stories.tsx +38 -0
- package/src/containers/GithubPanel/GithubComponent.tsx +192 -0
- package/src/containers/GithubPanel/GithubPanel.tsx +17 -0
- package/src/containers/GithubPanel/index.ts +5 -0
- package/src/containers/RegistryPanel/RegistryPanel.tsx +150 -0
- package/src/containers/RegistryPanel/index.ts +5 -0
- package/src/containers/SpaceGenerator/SpaceGenerator.tsx +104 -104
- package/src/containers/SpaceGenerator/index.ts +1 -3
- package/src/containers/Wireframe/Wireframe.tsx +3 -7
- package/src/containers/Wireframe/index.ts +1 -3
- package/src/containers/index.ts +2 -1
- package/src/index.ts +1 -1
- package/src/meta.ts +26 -6
- package/src/plugin.ts +10 -0
- package/src/translations.ts +83 -60
- package/src/types/Settings.ts +16 -0
- package/src/{types.ts → types/index.ts} +16 -14
- package/src/vite-env.d.ts +10 -0
- package/dist/lib/browser/DebugGraph-7HXJ2PS2.mjs.map +0 -7
- package/dist/lib/browser/DebugObjectPanel-3TCDNUNW.mjs +0 -33
- package/dist/lib/browser/DebugObjectPanel-3TCDNUNW.mjs.map +0 -7
- package/dist/lib/browser/DebugSettings-JZMIUDYB.mjs +0 -174
- package/dist/lib/browser/DebugSettings-JZMIUDYB.mjs.map +0 -7
- package/dist/lib/browser/DebugSpaceObjectsPanel-7NRPLWZ4.mjs.map +0 -7
- package/dist/lib/browser/DebugStatus-COQGH37G.mjs.map +0 -7
- package/dist/lib/browser/DevtoolsOverviewContainer-C75NFVER.mjs.map +0 -7
- package/dist/lib/browser/SpaceGenerator-SWSGJEEL.mjs.map +0 -7
- package/dist/lib/browser/Wireframe-KAGOKEFW.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-LGUQNXHD.mjs.map +0 -7
- 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/index.mjs +0 -132
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/react-context-I3USIAF6.mjs.map +0 -7
- package/dist/lib/browser/react-surface-BTVNKKVQ.mjs.map +0 -7
- package/dist/lib/browser/settings-SLTQJJNF.mjs.map +0 -7
- 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 -5
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- 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.map +0 -1
- package/dist/types/src/containers/DebugSettings/DebugSettings.d.ts +0 -10
- package/dist/types/src/containers/DebugSettings/DebugSettings.d.ts.map +0 -1
- package/dist/types/src/containers/DebugSettings/index.d.ts +0 -3
- package/dist/types/src/containers/DebugSettings/index.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 -441
- package/src/capabilities/app-graph-builder/index.ts +0 -7
- package/src/capabilities/react-context/index.ts +0 -7
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/settings/index.ts +0 -7
- package/src/containers/DebugSettings/DebugSettings.tsx +0 -201
- package/src/containers/DebugSettings/index.ts +0 -7
- /package/dist/types/src/capabilities/{app-graph-builder/app-graph-builder.d.ts → app-graph-builder.d.ts} +0 -0
- /package/dist/types/src/capabilities/{react-context/react-context.d.ts → react-context.d.ts} +0 -0
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
|
+
import * as Option from 'effect/Option';
|
|
6
7
|
import React, { useCallback } from 'react';
|
|
7
8
|
|
|
8
9
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
|
-
import { Surface,
|
|
10
|
-
import { AppCapabilities, LayoutOperation } from '@dxos/app-toolkit';
|
|
11
|
-
import {
|
|
10
|
+
import { Surface, useOperationInvoker, useSettingsState } from '@dxos/app-framework/ui';
|
|
11
|
+
import { AppCapabilities, LayoutOperation, RootCollectionAnnotation, getObjectPathFromObject } from '@dxos/app-toolkit';
|
|
12
|
+
import { AppSurface, useActiveSpace } from '@dxos/app-toolkit/ui';
|
|
12
13
|
import {
|
|
13
14
|
AutomergePanel,
|
|
14
15
|
ConfigPanel,
|
|
@@ -33,32 +34,33 @@ import {
|
|
|
33
34
|
StoragePanel,
|
|
34
35
|
SwarmPanel,
|
|
35
36
|
TestingPanel,
|
|
36
|
-
TracingPanel,
|
|
37
37
|
WorkflowPanel,
|
|
38
38
|
} from '@dxos/devtools';
|
|
39
|
-
import { Obj } from '@dxos/echo';
|
|
40
|
-
import { Collection } from '@dxos/echo';
|
|
41
|
-
import { type LogBuffer } from '@dxos/log';
|
|
39
|
+
import { Annotation, Collection, Feed, Obj } from '@dxos/echo';
|
|
42
40
|
import { log } from '@dxos/log';
|
|
43
|
-
import {
|
|
41
|
+
import { type IdbLogStore } from '@dxos/log-store-idb';
|
|
44
42
|
import { type Graph } from '@dxos/plugin-graph';
|
|
45
|
-
import { ScriptOperation } from '@dxos/plugin-script
|
|
46
|
-
import { SpaceOperation } from '@dxos/plugin-space
|
|
47
|
-
import { type Space, SpaceState, isSpace
|
|
48
|
-
import {
|
|
43
|
+
import { ScriptOperation } from '@dxos/plugin-script';
|
|
44
|
+
import { SpaceOperation } from '@dxos/plugin-space';
|
|
45
|
+
import { type Space, SpaceState, isSpace } from '@dxos/react-client/echo';
|
|
46
|
+
import { ToolsExplorer } from '@dxos/react-ui-introspect';
|
|
49
47
|
|
|
48
|
+
import { DebugSettings } from '#components';
|
|
50
49
|
import {
|
|
51
50
|
DebugGraph,
|
|
52
51
|
DebugObjectPanel,
|
|
53
|
-
DebugSettings,
|
|
54
52
|
DebugSpaceObjectsPanel,
|
|
55
53
|
DebugStatus,
|
|
56
54
|
DevtoolsOverviewContainer,
|
|
55
|
+
RegistryPanel,
|
|
57
56
|
SpaceGenerator,
|
|
58
57
|
Wireframe,
|
|
59
|
-
} from '
|
|
60
|
-
import { meta } from '
|
|
61
|
-
import { DebugCapabilities, type
|
|
58
|
+
} from '#containers';
|
|
59
|
+
import { meta } from '#meta';
|
|
60
|
+
import { DebugCapabilities, type Settings, Devtools } from '#types';
|
|
61
|
+
|
|
62
|
+
// TODO(burdon): Move to config.
|
|
63
|
+
const MCP_SERVER_URL = 'https://introspect-service-labs.dxos.workers.dev/mcp';
|
|
62
64
|
|
|
63
65
|
type SpaceDebug = {
|
|
64
66
|
type: string;
|
|
@@ -70,7 +72,7 @@ type GraphDebug = {
|
|
|
70
72
|
root: string;
|
|
71
73
|
};
|
|
72
74
|
|
|
73
|
-
const isSpaceDebug = (data: any): data is SpaceDebug => data?.type === `${meta.id}
|
|
75
|
+
const isSpaceDebug = (data: any): data is SpaceDebug => data?.type === `${meta.id}.space` && isSpace(data.space);
|
|
74
76
|
const isGraphDebug = (data: any): data is GraphDebug => {
|
|
75
77
|
const graph = data?.graph;
|
|
76
78
|
return (
|
|
@@ -78,38 +80,35 @@ const isGraphDebug = (data: any): data is GraphDebug => {
|
|
|
78
80
|
);
|
|
79
81
|
};
|
|
80
82
|
|
|
81
|
-
// TODO(wittjosiah): Factor out?
|
|
82
|
-
const useCurrentSpace = () => {
|
|
83
|
-
const layout = useLayout();
|
|
84
|
-
const client = useCapability(ClientCapabilities.Client);
|
|
85
|
-
const { spaceId } = parseId(layout.workspace);
|
|
86
|
-
const space = spaceId ? client.spaces.get(spaceId) : undefined;
|
|
87
|
-
return space;
|
|
88
|
-
};
|
|
89
|
-
|
|
90
83
|
type ReactSurfaceOptions = {
|
|
91
|
-
|
|
84
|
+
logStore?: IdbLogStore;
|
|
92
85
|
};
|
|
93
86
|
|
|
94
87
|
export default Capability.makeModule(
|
|
95
|
-
Effect.fnUntraced(function* ({
|
|
88
|
+
Effect.fnUntraced(function* ({ logStore }: ReactSurfaceOptions) {
|
|
96
89
|
const capabilities = yield* Capability.Service;
|
|
97
90
|
const registry = capabilities.get(Capabilities.AtomRegistry);
|
|
98
91
|
const settingsAtom = capabilities.get(DebugCapabilities.Settings);
|
|
92
|
+
const fileUploader = capabilities.getAll(AppCapabilities.FileUploader)[0];
|
|
99
93
|
|
|
100
94
|
return Capability.contributes(Capabilities.ReactSurface, [
|
|
101
95
|
Surface.create({
|
|
102
|
-
id:
|
|
103
|
-
|
|
104
|
-
filter: (data): data is { subject: AppCapabilities.Settings } =>
|
|
105
|
-
AppCapabilities.isSettings(data.subject) && data.subject.prefix === meta.id,
|
|
96
|
+
id: 'pluginSettings',
|
|
97
|
+
filter: AppSurface.settings(AppSurface.Article, meta.id),
|
|
106
98
|
component: ({ data: { subject } }) => {
|
|
107
|
-
const { settings, updateSettings } = useSettingsState<
|
|
108
|
-
return
|
|
99
|
+
const { settings, updateSettings } = useSettingsState<Settings.Settings>(subject.atom);
|
|
100
|
+
return (
|
|
101
|
+
<DebugSettings
|
|
102
|
+
settings={settings}
|
|
103
|
+
onSettingsChange={updateSettings}
|
|
104
|
+
logStore={logStore}
|
|
105
|
+
onUpload={fileUploader}
|
|
106
|
+
/>
|
|
107
|
+
);
|
|
109
108
|
},
|
|
110
109
|
}),
|
|
111
110
|
Surface.create({
|
|
112
|
-
id:
|
|
111
|
+
id: 'space',
|
|
113
112
|
role: 'article',
|
|
114
113
|
filter: (data): data is { subject: SpaceDebug } => isSpaceDebug(data.subject),
|
|
115
114
|
component: ({ role, data }) => {
|
|
@@ -123,7 +122,8 @@ export default Capability.makeModule(
|
|
|
123
122
|
|
|
124
123
|
const collection =
|
|
125
124
|
data.subject.space.state.get() === SpaceState.SPACE_READY &&
|
|
126
|
-
data.subject.space.properties
|
|
125
|
+
Annotation.get(data.subject.space.properties, RootCollectionAnnotation).pipe(Option.getOrUndefined)
|
|
126
|
+
?.target;
|
|
127
127
|
if (!Obj.instanceOf(Collection.Collection, collection)) {
|
|
128
128
|
return;
|
|
129
129
|
}
|
|
@@ -138,27 +138,30 @@ export default Capability.makeModule(
|
|
|
138
138
|
[data.subject.space, invokePromise],
|
|
139
139
|
);
|
|
140
140
|
|
|
141
|
-
return
|
|
142
|
-
<Panel.Root role={role} className='dx-article'>
|
|
143
|
-
<Panel.Content asChild>
|
|
144
|
-
<Panel.Content asChild>
|
|
145
|
-
<SpaceGenerator space={data.subject.space} onCreateObjects={handleCreateObject} />
|
|
146
|
-
</Panel.Content>
|
|
147
|
-
</Panel.Content>
|
|
148
|
-
</Panel.Root>
|
|
149
|
-
);
|
|
141
|
+
return <SpaceGenerator role={role} space={data.subject.space} onCreateObjects={handleCreateObject} />;
|
|
150
142
|
},
|
|
151
143
|
}),
|
|
152
144
|
Surface.create({
|
|
153
|
-
id:
|
|
145
|
+
id: 'appGraph',
|
|
154
146
|
role: 'article',
|
|
155
147
|
filter: (data): data is { subject: GraphDebug } => isGraphDebug(data.subject),
|
|
156
148
|
component: ({ data }) => <DebugGraph graph={data.subject.graph} root={data.subject.root} />,
|
|
157
149
|
}),
|
|
158
150
|
Surface.create({
|
|
159
|
-
id:
|
|
151
|
+
id: 'toolsExplorer',
|
|
152
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.ToolsExplorer),
|
|
153
|
+
component: () => <ToolsExplorer serverUrl={MCP_SERVER_URL} />,
|
|
154
|
+
}),
|
|
155
|
+
Surface.create({
|
|
156
|
+
id: 'registry',
|
|
157
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Registry),
|
|
158
|
+
component: () => <RegistryPanel />,
|
|
159
|
+
}),
|
|
160
|
+
Surface.create({
|
|
161
|
+
id: 'wireframe',
|
|
162
|
+
// TODO(wittjosiah): Split into multiple surfaces if this filter proves too strict for non-article roles.
|
|
160
163
|
role: ['article', 'section'],
|
|
161
|
-
position: '
|
|
164
|
+
position: 'first',
|
|
162
165
|
filter: (data): data is { subject: Obj.Unknown } => {
|
|
163
166
|
const settings = registry.get(settingsAtom);
|
|
164
167
|
return Obj.isObject(data.subject) && !!settings.wireframe;
|
|
@@ -168,95 +171,95 @@ export default Capability.makeModule(
|
|
|
168
171
|
),
|
|
169
172
|
}),
|
|
170
173
|
Surface.create({
|
|
171
|
-
id:
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
174
|
+
id: 'objectDebug',
|
|
175
|
+
filter: AppSurface.allOf(
|
|
176
|
+
AppSurface.literal(AppSurface.Article, 'debug'),
|
|
177
|
+
AppSurface.companion(AppSurface.Article),
|
|
178
|
+
),
|
|
179
|
+
component: ({ role, data }) => <DebugObjectPanel role={role} companionTo={data.companionTo} />,
|
|
176
180
|
}),
|
|
177
181
|
Surface.create({
|
|
178
|
-
id:
|
|
179
|
-
|
|
180
|
-
filter: (data): data is { subject: 'devtools' } => data.subject === 'devtools',
|
|
182
|
+
id: 'devtoolsOverview',
|
|
183
|
+
filter: AppSurface.literal(Surface.makeType<{ subject: string }>('deck-companion--devtools'), 'devtools'),
|
|
181
184
|
component: () => <DevtoolsOverviewContainer />,
|
|
182
185
|
}),
|
|
183
186
|
Surface.create({
|
|
184
|
-
id:
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
187
|
+
id: 'spaceObjects',
|
|
188
|
+
filter: AppSurface.literal(
|
|
189
|
+
Surface.makeType<{ subject: string }>('deck-companion--space-objects'),
|
|
190
|
+
'space-objects',
|
|
191
|
+
),
|
|
192
|
+
component: () => {
|
|
193
|
+
const space = useActiveSpace();
|
|
194
|
+
if (!space) {
|
|
195
|
+
return null;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
return <DebugSpaceObjectsPanel space={space} />;
|
|
199
|
+
},
|
|
188
200
|
}),
|
|
189
201
|
|
|
190
202
|
Surface.create({
|
|
191
|
-
id:
|
|
192
|
-
role: 'status',
|
|
203
|
+
id: 'debugStatus',
|
|
204
|
+
role: 'status-indicator',
|
|
205
|
+
position: 'first',
|
|
193
206
|
component: () => <DebugStatus />,
|
|
194
207
|
}),
|
|
208
|
+
|
|
195
209
|
//
|
|
196
210
|
// Devtools
|
|
197
211
|
//
|
|
198
212
|
|
|
199
213
|
Surface.create({
|
|
200
|
-
id:
|
|
201
|
-
|
|
202
|
-
filter: (data): data is any => data.subject === Devtools.Client.Config,
|
|
214
|
+
id: 'client.config',
|
|
215
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Client.Config),
|
|
203
216
|
component: () => <ConfigPanel vaultSelector={false} />,
|
|
204
217
|
}),
|
|
205
218
|
Surface.create({
|
|
206
|
-
id:
|
|
207
|
-
|
|
208
|
-
filter: (data): data is any => data.subject === Devtools.Client.Storage,
|
|
219
|
+
id: 'client.storage',
|
|
220
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Client.Storage),
|
|
209
221
|
component: () => <StoragePanel />,
|
|
210
222
|
}),
|
|
211
223
|
Surface.create({
|
|
212
|
-
id:
|
|
213
|
-
|
|
214
|
-
filter: (data): data is any => data.subject === Devtools.Client.Logs,
|
|
224
|
+
id: 'client.logs',
|
|
225
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Client.Logs),
|
|
215
226
|
component: () => <LoggingPanel />,
|
|
216
227
|
}),
|
|
217
228
|
Surface.create({
|
|
218
|
-
id:
|
|
219
|
-
|
|
220
|
-
filter: (data): data is any => data.subject === Devtools.Client.Diagnostics,
|
|
229
|
+
id: 'client.diagnostics',
|
|
230
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Client.Diagnostics),
|
|
221
231
|
component: () => <DiagnosticsPanel />,
|
|
222
232
|
}),
|
|
223
233
|
Surface.create({
|
|
224
|
-
id:
|
|
225
|
-
|
|
226
|
-
filter: (data): data is any => data.subject === Devtools.Client.Tracing,
|
|
227
|
-
component: () => <TracingPanel />,
|
|
228
|
-
}),
|
|
229
|
-
Surface.create({
|
|
230
|
-
id: `${meta.id}/halo/identity`,
|
|
231
|
-
role: 'article',
|
|
232
|
-
filter: (data): data is any => data.subject === Devtools.Halo.Identity,
|
|
234
|
+
id: 'halo.identity',
|
|
235
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Halo.Identity),
|
|
233
236
|
component: () => <IdentityPanel />,
|
|
234
237
|
}),
|
|
235
238
|
Surface.create({
|
|
236
|
-
id:
|
|
237
|
-
|
|
238
|
-
filter: (data): data is any => data.subject === Devtools.Halo.Devices,
|
|
239
|
+
id: 'halo.devices',
|
|
240
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Halo.Devices),
|
|
239
241
|
component: () => <DeviceListPanel />,
|
|
240
242
|
}),
|
|
241
243
|
Surface.create({
|
|
242
|
-
id:
|
|
243
|
-
|
|
244
|
-
filter: (data): data is any => data.subject === Devtools.Halo.Keyring,
|
|
244
|
+
id: 'halo.keyring',
|
|
245
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Halo.Keyring),
|
|
245
246
|
component: () => <KeyringPanel />,
|
|
246
247
|
}),
|
|
247
248
|
Surface.create({
|
|
248
|
-
id:
|
|
249
|
-
|
|
250
|
-
filter: (data): data is any => data.subject === Devtools.Halo.Credentials,
|
|
249
|
+
id: 'halo.credentials',
|
|
250
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Halo.Credentials),
|
|
251
251
|
component: () => {
|
|
252
|
-
const space =
|
|
252
|
+
const space = useActiveSpace();
|
|
253
|
+
if (!space) {
|
|
254
|
+
return null;
|
|
255
|
+
}
|
|
256
|
+
|
|
253
257
|
return <CredentialsPanel space={space} />;
|
|
254
258
|
},
|
|
255
259
|
}),
|
|
256
260
|
Surface.create({
|
|
257
|
-
id:
|
|
258
|
-
|
|
259
|
-
filter: (data): data is any => data.subject === Devtools.Echo.Spaces,
|
|
261
|
+
id: 'echo.spaces',
|
|
262
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Spaces),
|
|
260
263
|
component: () => {
|
|
261
264
|
const { invokePromise } = useOperationInvoker();
|
|
262
265
|
const handleSelect = useCallback(
|
|
@@ -267,133 +270,148 @@ export default Capability.makeModule(
|
|
|
267
270
|
},
|
|
268
271
|
}),
|
|
269
272
|
Surface.create({
|
|
270
|
-
id:
|
|
271
|
-
|
|
272
|
-
filter: (data): data is any => data.subject === Devtools.Echo.Space,
|
|
273
|
+
id: 'echo.space',
|
|
274
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Space),
|
|
273
275
|
component: () => {
|
|
274
|
-
const space =
|
|
276
|
+
const space = useActiveSpace();
|
|
275
277
|
const { invokePromise } = useOperationInvoker();
|
|
276
278
|
const handleSelect = useCallback(
|
|
277
279
|
() => invokePromise(LayoutOperation.Open, { subject: [Devtools.Echo.Feeds] }),
|
|
278
280
|
[invokePromise],
|
|
279
281
|
);
|
|
282
|
+
if (!space) {
|
|
283
|
+
return null;
|
|
284
|
+
}
|
|
285
|
+
|
|
280
286
|
return <SpaceInfoPanel space={space} onSelectFeed={handleSelect} onSelectPipeline={handleSelect} />;
|
|
281
287
|
},
|
|
282
288
|
}),
|
|
283
289
|
Surface.create({
|
|
284
|
-
id:
|
|
285
|
-
|
|
286
|
-
filter: (data): data is any => data.subject === Devtools.Echo.Feeds,
|
|
290
|
+
id: 'echo.feeds',
|
|
291
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Feeds),
|
|
287
292
|
component: () => {
|
|
288
|
-
const space =
|
|
293
|
+
const space = useActiveSpace();
|
|
294
|
+
if (!space) {
|
|
295
|
+
return null;
|
|
296
|
+
}
|
|
297
|
+
|
|
289
298
|
return <FeedsPanel space={space} />;
|
|
290
299
|
},
|
|
291
300
|
}),
|
|
292
301
|
Surface.create({
|
|
293
|
-
id:
|
|
294
|
-
|
|
295
|
-
filter: (data): data is any => data.subject === Devtools.Echo.Objects,
|
|
302
|
+
id: 'echo.objects',
|
|
303
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Objects),
|
|
296
304
|
component: () => {
|
|
297
|
-
const space =
|
|
305
|
+
const space = useActiveSpace();
|
|
306
|
+
if (!space) {
|
|
307
|
+
return null;
|
|
308
|
+
}
|
|
309
|
+
|
|
298
310
|
return <ObjectsPanel space={space} />;
|
|
299
311
|
},
|
|
300
312
|
}),
|
|
301
313
|
Surface.create({
|
|
302
|
-
id:
|
|
303
|
-
|
|
304
|
-
filter: (data): data is any => data.subject === Devtools.Echo.Schema,
|
|
314
|
+
id: 'echo.schema',
|
|
315
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Schema),
|
|
305
316
|
component: () => {
|
|
306
|
-
const space =
|
|
317
|
+
const space = useActiveSpace();
|
|
318
|
+
if (!space) {
|
|
319
|
+
return null;
|
|
320
|
+
}
|
|
321
|
+
|
|
307
322
|
return <SchemaPanel space={space} />;
|
|
308
323
|
},
|
|
309
324
|
}),
|
|
310
325
|
Surface.create({
|
|
311
|
-
id:
|
|
312
|
-
|
|
313
|
-
filter: (data): data is any => data.subject === Devtools.Echo.Automerge,
|
|
326
|
+
id: 'echo.automerge',
|
|
327
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Automerge),
|
|
314
328
|
component: () => {
|
|
315
|
-
const space =
|
|
329
|
+
const space = useActiveSpace();
|
|
330
|
+
if (!space) {
|
|
331
|
+
return null;
|
|
332
|
+
}
|
|
333
|
+
|
|
316
334
|
return <AutomergePanel space={space} />;
|
|
317
335
|
},
|
|
318
336
|
}),
|
|
319
337
|
Surface.create({
|
|
320
|
-
id:
|
|
321
|
-
|
|
322
|
-
filter: (data): data is any => data.subject === Devtools.Echo.Queues,
|
|
338
|
+
id: 'echo.queues',
|
|
339
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Queues),
|
|
323
340
|
component: () => <QueuesPanel />,
|
|
324
341
|
}),
|
|
325
342
|
Surface.create({
|
|
326
|
-
id:
|
|
327
|
-
|
|
328
|
-
filter: (data): data is any => data.subject === Devtools.Echo.Members,
|
|
343
|
+
id: 'echo.members',
|
|
344
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Members),
|
|
329
345
|
component: () => {
|
|
330
|
-
const space =
|
|
346
|
+
const space = useActiveSpace();
|
|
347
|
+
if (!space) {
|
|
348
|
+
return null;
|
|
349
|
+
}
|
|
350
|
+
|
|
331
351
|
return <MembersPanel space={space} />;
|
|
332
352
|
},
|
|
333
353
|
}),
|
|
334
354
|
Surface.create({
|
|
335
|
-
id:
|
|
336
|
-
|
|
337
|
-
filter: (data): data is any => data.subject === Devtools.Echo.Metadata,
|
|
355
|
+
id: 'echo.metadata',
|
|
356
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Metadata),
|
|
338
357
|
component: () => <MetadataPanel />,
|
|
339
358
|
}),
|
|
340
359
|
Surface.create({
|
|
341
|
-
id:
|
|
342
|
-
|
|
343
|
-
filter: (data): data is any => data.subject === Devtools.Mesh.Signal,
|
|
360
|
+
id: 'mesh.signal',
|
|
361
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Mesh.Signal),
|
|
344
362
|
component: () => <SignalPanel />,
|
|
345
363
|
}),
|
|
346
364
|
Surface.create({
|
|
347
|
-
id:
|
|
348
|
-
|
|
349
|
-
filter: (data): data is any => data.subject === Devtools.Mesh.Swarm,
|
|
365
|
+
id: 'mesh.swarm',
|
|
366
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Mesh.Swarm),
|
|
350
367
|
component: () => <SwarmPanel />,
|
|
351
368
|
}),
|
|
352
369
|
Surface.create({
|
|
353
|
-
id:
|
|
354
|
-
|
|
355
|
-
filter: (data): data is any => data.subject === Devtools.Mesh.Network,
|
|
370
|
+
id: 'mesh.network',
|
|
371
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Mesh.Network),
|
|
356
372
|
component: () => {
|
|
357
|
-
const space =
|
|
373
|
+
const space = useActiveSpace();
|
|
374
|
+
if (!space) {
|
|
375
|
+
return null;
|
|
376
|
+
}
|
|
377
|
+
|
|
358
378
|
return <NetworkPanel space={space} />;
|
|
359
379
|
},
|
|
360
380
|
}),
|
|
361
|
-
// TODO(wittjosiah): Remove?
|
|
362
|
-
// createSurface({
|
|
363
|
-
// id: `${meta.id}/agent/dashboard`,
|
|
364
|
-
// role: 'article',
|
|
365
|
-
// filter: (data): data is any => data.subject === Devtools.Agent.Dashboard,
|
|
366
|
-
// component: () => <DashboardPanel />,
|
|
367
|
-
// }),
|
|
368
381
|
Surface.create({
|
|
369
|
-
id:
|
|
370
|
-
|
|
371
|
-
filter: (data): data is any => data.subject === Devtools.Edge.Dashboard,
|
|
382
|
+
id: 'edge.dashboard',
|
|
383
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Edge.Dashboard),
|
|
372
384
|
component: () => <EdgeDashboardPanel />,
|
|
373
385
|
}),
|
|
374
386
|
Surface.create({
|
|
375
|
-
id:
|
|
376
|
-
|
|
377
|
-
filter: (data): data is any => data.subject === Devtools.Edge.Workflows,
|
|
387
|
+
id: 'edge.workflows',
|
|
388
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Edge.Workflows),
|
|
378
389
|
component: () => {
|
|
379
|
-
const space =
|
|
390
|
+
const space = useActiveSpace();
|
|
391
|
+
if (!space) {
|
|
392
|
+
return null;
|
|
393
|
+
}
|
|
394
|
+
|
|
380
395
|
return <WorkflowPanel space={space} />;
|
|
381
396
|
},
|
|
382
397
|
}),
|
|
383
398
|
Surface.create({
|
|
384
|
-
id:
|
|
385
|
-
|
|
386
|
-
filter: (data): data is any => data.subject === Devtools.Edge.Traces,
|
|
399
|
+
id: 'edge.traces',
|
|
400
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Edge.Traces),
|
|
387
401
|
component: () => {
|
|
388
|
-
const space =
|
|
389
|
-
|
|
390
|
-
|
|
402
|
+
const space = useActiveSpace();
|
|
403
|
+
if (!space) {
|
|
404
|
+
return null;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
const feed = space.properties.invocationTraceFeed?.target;
|
|
408
|
+
const feedDXN = feed ? Feed.getQueueUri(feed) : undefined;
|
|
409
|
+
return <InvocationTraceContainer db={space.db} feedDXN={feedDXN} detailAxis='block' />;
|
|
391
410
|
},
|
|
392
411
|
}),
|
|
393
412
|
Surface.create({
|
|
394
|
-
id:
|
|
395
|
-
|
|
396
|
-
filter: (data): data is any => data.subject === Devtools.Edge.Testing,
|
|
413
|
+
id: 'edge.testing',
|
|
414
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Edge.Testing),
|
|
397
415
|
component: () => {
|
|
398
416
|
const { invokePromise } = useOperationInvoker();
|
|
399
417
|
const onSpaceCreate = useCallback(
|
|
@@ -412,9 +430,9 @@ export default Capability.makeModule(
|
|
|
412
430
|
await invokePromise(SpaceOperation.AddObject, { target: space.db, object: createResult.data.object });
|
|
413
431
|
}
|
|
414
432
|
log.info('script created', { result: createResult });
|
|
415
|
-
if (createResult.data?.object
|
|
433
|
+
if (createResult.data?.object) {
|
|
416
434
|
await invokePromise(LayoutOperation.Open, {
|
|
417
|
-
subject: [
|
|
435
|
+
subject: [getObjectPathFromObject(createResult.data.object)],
|
|
418
436
|
});
|
|
419
437
|
}
|
|
420
438
|
},
|
|
@@ -8,14 +8,14 @@ import { Capability } from '@dxos/app-framework';
|
|
|
8
8
|
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
9
9
|
import { createKvsStore } from '@dxos/effect';
|
|
10
10
|
|
|
11
|
-
import { meta } from '
|
|
12
|
-
import { DebugCapabilities,
|
|
11
|
+
import { meta } from '#meta';
|
|
12
|
+
import { DebugCapabilities, Settings } from '#types';
|
|
13
13
|
|
|
14
14
|
export default Capability.makeModule(() =>
|
|
15
15
|
Effect.sync(() => {
|
|
16
16
|
const settingsAtom = createKvsStore({
|
|
17
17
|
key: meta.id,
|
|
18
|
-
schema:
|
|
18
|
+
schema: Settings.Settings,
|
|
19
19
|
defaultValue: () => ({}),
|
|
20
20
|
});
|
|
21
21
|
|
|
@@ -23,7 +23,7 @@ export default Capability.makeModule(() =>
|
|
|
23
23
|
Capability.contributes(DebugCapabilities.Settings, settingsAtom),
|
|
24
24
|
Capability.contributes(AppCapabilities.Settings, {
|
|
25
25
|
prefix: meta.id,
|
|
26
|
-
schema:
|
|
26
|
+
schema: Settings.Settings,
|
|
27
27
|
atom: settingsAtom,
|
|
28
28
|
}),
|
|
29
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 { withClientProvider } from '@dxos/react-client/testing';
|
|
8
|
+
import { withLayout, withTheme } from '@dxos/react-ui/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
|
+
logStore: { export: async () => '' } as any,
|
|
35
|
+
},
|
|
36
|
+
};
|