@dxos/plugin-debug 0.7.5-labs.ff2ff30 → 0.7.5-main.5ae2ba8
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/{DebugSpace-4JHYA7FG.mjs → DebugSpace-BTMTVZ6C.mjs} +2 -2
- package/dist/lib/browser/{SpaceGenerator-4VO7E5P2.mjs → SpaceGenerator-BPZGOSH4.mjs} +409 -17
- package/dist/lib/browser/SpaceGenerator-BPZGOSH4.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-BZFZ6UG6.mjs +533 -0
- package/dist/lib/browser/app-graph-builder-BZFZ6UG6.mjs.map +7 -0
- package/dist/lib/browser/chunk-UASI2CRI.mjs +72 -0
- package/dist/lib/browser/chunk-UASI2CRI.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +44 -8
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-context-TCD3MNIT.mjs +16 -0
- package/dist/lib/browser/react-context-TCD3MNIT.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-ZRQ4TPNG.mjs → react-surface-W6QLG4YJ.mjs} +191 -34
- package/dist/lib/browser/react-surface-W6QLG4YJ.mjs.map +7 -0
- package/dist/lib/browser/{settings-OIMSBZUC.mjs → settings-INPXR64L.mjs} +5 -6
- package/dist/lib/browser/{settings-OIMSBZUC.mjs.map → settings-INPXR64L.mjs.map} +3 -3
- package/dist/types/src/DebugPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +110 -110
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +115 -110
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-context.d.ts +8 -0
- package/dist/types/src/capabilities/react-context.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/components/Container.d.ts +2 -2
- package/dist/types/src/components/Container.d.ts.map +1 -1
- package/dist/types/src/components/DebugObjectPanel.d.ts +1 -2
- package/dist/types/src/components/DebugObjectPanel.d.ts.map +1 -1
- package/dist/types/src/components/DebugSettings.d.ts +1 -2
- package/dist/types/src/components/DebugSettings.d.ts.map +1 -1
- package/dist/types/src/components/DebugSpace/ObjectCreator.d.ts +1 -2
- package/dist/types/src/components/DebugSpace/ObjectCreator.d.ts.map +1 -1
- package/dist/types/src/components/DebugStatus.d.ts +1 -2
- package/dist/types/src/components/DebugStatus.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/SchemaTable.d.ts +1 -2
- package/dist/types/src/components/SpaceGenerator/SchemaTable.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/SpaceGenerator.d.ts +1 -2
- package/dist/types/src/components/SpaceGenerator/SpaceGenerator.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/presets.d.ts +6 -1
- package/dist/types/src/components/SpaceGenerator/presets.d.ts.map +1 -1
- package/dist/types/src/components/Wireframe.d.ts +1 -2
- package/dist/types/src/components/Wireframe.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +4 -4
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +28 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +44 -1
- package/dist/types/src/types.d.ts.map +1 -1
- package/package.json +49 -47
- package/src/DebugPlugin.tsx +12 -4
- package/src/capabilities/app-graph-builder.ts +292 -82
- package/src/capabilities/index.ts +1 -0
- package/src/capabilities/react-context.tsx +16 -0
- package/src/capabilities/react-surface.tsx +204 -27
- package/src/capabilities/settings.ts +0 -1
- package/src/components/DebugSettings.tsx +0 -3
- package/src/components/SpaceGenerator/ObjectGenerator.tsx +2 -2
- package/src/components/SpaceGenerator/SpaceGenerator.tsx +68 -2
- package/src/components/SpaceGenerator/presets.ts +250 -9
- package/src/translations.ts +28 -0
- package/src/types.ts +52 -1
- package/dist/lib/browser/SpaceGenerator-4VO7E5P2.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-DCMGZAT3.mjs +0 -181
- package/dist/lib/browser/app-graph-builder-DCMGZAT3.mjs.map +0 -7
- package/dist/lib/browser/chunk-P7GHHMDB.mjs +0 -21
- package/dist/lib/browser/chunk-P7GHHMDB.mjs.map +0 -7
- package/dist/lib/browser/react-surface-ZRQ4TPNG.mjs.map +0 -7
- /package/dist/lib/browser/{DebugSpace-4JHYA7FG.mjs.map → DebugSpace-BTMTVZ6C.mjs.map} +0 -0
|
@@ -8,10 +8,53 @@ export type DebugContextType = {
|
|
|
8
8
|
};
|
|
9
9
|
export declare const DebugContext: Context<DebugContextType>;
|
|
10
10
|
export declare const DebugSettingsSchema: S.mutable<S.Struct<{
|
|
11
|
-
devtools: S.optional<typeof S.Boolean>;
|
|
12
11
|
debug: S.optional<typeof S.Boolean>;
|
|
13
12
|
wireframe: S.optional<typeof S.Boolean>;
|
|
14
13
|
}>>;
|
|
15
14
|
export interface DebugSettingsProps extends S.Schema.Type<typeof DebugSettingsSchema> {
|
|
16
15
|
}
|
|
16
|
+
export declare namespace Devtools {
|
|
17
|
+
const id = "dxos.org.plugin.debug.devtools";
|
|
18
|
+
namespace Client {
|
|
19
|
+
const id = "dxos.org.plugin.debug.devtools.client";
|
|
20
|
+
const Config = "dxos.org.plugin.debug.devtools.client.config";
|
|
21
|
+
const Storage = "dxos.org.plugin.debug.devtools.client.storage";
|
|
22
|
+
const Logs = "dxos.org.plugin.debug.devtools.client.logs";
|
|
23
|
+
const Diagnostics = "dxos.org.plugin.debug.devtools.client.diagnostics";
|
|
24
|
+
const Tracing = "dxos.org.plugin.debug.devtools.client.tracing";
|
|
25
|
+
}
|
|
26
|
+
namespace Halo {
|
|
27
|
+
const id = "dxos.org.plugin.debug.devtools.halo";
|
|
28
|
+
const Identity = "dxos.org.plugin.debug.devtools.halo.identity";
|
|
29
|
+
const Devices = "dxos.org.plugin.debug.devtools.halo.devices";
|
|
30
|
+
const Keyring = "dxos.org.plugin.debug.devtools.halo.keyring";
|
|
31
|
+
const Credentials = "dxos.org.plugin.debug.devtools.halo.credentials";
|
|
32
|
+
}
|
|
33
|
+
namespace Echo {
|
|
34
|
+
const id = "dxos.org.plugin.debug.devtools.echo";
|
|
35
|
+
const Spaces = "dxos.org.plugin.debug.devtools.echo.spaces";
|
|
36
|
+
const Space = "dxos.org.plugin.debug.devtools.echo.space";
|
|
37
|
+
const Feeds = "dxos.org.plugin.debug.devtools.echo.feeds";
|
|
38
|
+
const Objects = "dxos.org.plugin.debug.devtools.echo.objects";
|
|
39
|
+
const Automerge = "dxos.org.plugin.debug.devtools.echo.automerge";
|
|
40
|
+
const Members = "dxos.org.plugin.debug.devtools.echo.members";
|
|
41
|
+
const Metadata = "dxos.org.plugin.debug.devtools.echo.metadata";
|
|
42
|
+
}
|
|
43
|
+
namespace Mesh {
|
|
44
|
+
const id = "dxos.org.plugin.debug.devtools.mesh";
|
|
45
|
+
const Signal = "dxos.org.plugin.debug.devtools.mesh.signal";
|
|
46
|
+
const Swarm = "dxos.org.plugin.debug.devtools.mesh.swarm";
|
|
47
|
+
const Network = "dxos.org.plugin.debug.devtools.mesh.network";
|
|
48
|
+
}
|
|
49
|
+
namespace Agent {
|
|
50
|
+
const id = "dxos.org.plugin.debug.devtools.agent";
|
|
51
|
+
const Dashboard = "dxos.org.plugin.debug.devtools.agent.dashboard";
|
|
52
|
+
const Search = "dxos.org.plugin.debug.devtools.agent.search";
|
|
53
|
+
}
|
|
54
|
+
namespace Edge {
|
|
55
|
+
const id = "dxos.org.plugin.debug.devtools.edge";
|
|
56
|
+
const Dashboard = "dxos.org.plugin.debug.devtools.edge.dashboard";
|
|
57
|
+
const Workflows = "dxos.org.plugin.debug.devtools.edge.workflows";
|
|
58
|
+
}
|
|
59
|
+
}
|
|
17
60
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAAiB,MAAM,OAAO,CAAC;AAEpD,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAEtC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,CAAC,EAAE,EAAE,aAAa,EAAE,OAAO,EAAE,YAAY,KAAK,IAAI,CAAC;IAC1D,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,OAAO,CAAC,gBAAgB,CAIjD,CAAC;AAEH,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAAiB,MAAM,OAAO,CAAC;AAEpD,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAEtC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,CAAC,EAAE,EAAE,aAAa,EAAE,OAAO,EAAE,YAAY,KAAK,IAAI,CAAC;IAC1D,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,OAAO,CAAC,gBAAgB,CAIjD,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;GAK/B,CAAC;AAEF,MAAM,WAAW,kBAAmB,SAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,mBAAmB,CAAC;CAAG;AAExF,yBAAiB,QAAQ,CAAC;IAEjB,MAAM,EAAE,mCAAmC,CAAC;IAEnD,UAAiB,MAAM,CAAC;QACf,MAAM,EAAE,0CAA0B,CAAC;QACnC,MAAM,MAAM,iDAAiC,CAAC;QAC9C,MAAM,OAAO,kDAAkC,CAAC;QAChD,MAAM,IAAI,+CAA+B,CAAC;QAC1C,MAAM,WAAW,sDAAsC,CAAC;QACxD,MAAM,OAAO,kDAAkC,CAAC;KACxD;IAED,UAAiB,IAAI,CAAC;QACb,MAAM,EAAE,wCAAwB,CAAC;QACjC,MAAM,QAAQ,iDAAiC,CAAC;QAChD,MAAM,OAAO,gDAAgC,CAAC;QAC9C,MAAM,OAAO,gDAAgC,CAAC;QAC9C,MAAM,WAAW,oDAAoC,CAAC;KAC9D;IAED,UAAiB,IAAI,CAAC;QACb,MAAM,EAAE,wCAAwB,CAAC;QACjC,MAAM,MAAM,+CAA+B,CAAC;QAC5C,MAAM,KAAK,8CAA8B,CAAC;QAC1C,MAAM,KAAK,8CAA8B,CAAC;QAC1C,MAAM,OAAO,gDAAgC,CAAC;QAC9C,MAAM,SAAS,kDAAkC,CAAC;QAClD,MAAM,OAAO,gDAAgC,CAAC;QAC9C,MAAM,QAAQ,iDAAiC,CAAC;KACxD;IAED,UAAiB,IAAI,CAAC;QACb,MAAM,EAAE,wCAAwB,CAAC;QACjC,MAAM,MAAM,+CAA+B,CAAC;QAC5C,MAAM,KAAK,8CAA8B,CAAC;QAC1C,MAAM,OAAO,gDAAgC,CAAC;KACtD;IAED,UAAiB,KAAK,CAAC;QACd,MAAM,EAAE,yCAAyB,CAAC;QAClC,MAAM,SAAS,mDAAmC,CAAC;QACnD,MAAM,MAAM,gDAAgC,CAAC;KACrD;IAED,UAAiB,IAAI,CAAC;QACb,MAAM,EAAE,wCAAwB,CAAC;QACjC,MAAM,SAAS,kDAAkC,CAAC;QAClD,MAAM,SAAS,kDAAkC,CAAC;KAC1D;CACF"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-debug",
|
|
3
|
-
"version": "0.7.5-
|
|
3
|
+
"version": "0.7.5-main.5ae2ba8",
|
|
4
4
|
"description": "DXOS Surface plugin for testing.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"author": "DXOS.org",
|
|
9
9
|
"sideEffects": true,
|
|
10
|
+
"type": "module",
|
|
10
11
|
"exports": {
|
|
11
12
|
".": {
|
|
12
13
|
"types": "./dist/types/src/index.d.ts",
|
|
@@ -32,46 +33,47 @@
|
|
|
32
33
|
"react-json-tree": "^0.18.0",
|
|
33
34
|
"react-resize-detector": "^11.0.1",
|
|
34
35
|
"workerize-loader": "^2.0.2",
|
|
35
|
-
"@dxos/async": "0.7.5-
|
|
36
|
-
"@dxos/
|
|
37
|
-
"@dxos/
|
|
38
|
-
"@dxos/
|
|
39
|
-
"@dxos/
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/echo-
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/log": "0.7.5-
|
|
52
|
-
"@dxos/plugin-client": "0.7.5-
|
|
53
|
-
"@dxos/plugin-
|
|
54
|
-
"@dxos/plugin-
|
|
55
|
-
"@dxos/plugin-
|
|
56
|
-
"@dxos/plugin-
|
|
57
|
-
"@dxos/plugin-
|
|
58
|
-
"@dxos/plugin-
|
|
59
|
-
"@dxos/plugin-
|
|
60
|
-
"@dxos/plugin-table": "0.7.5-
|
|
61
|
-
"@dxos/
|
|
62
|
-
"@dxos/
|
|
63
|
-
"@dxos/
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/react-hooks": "0.7.5-
|
|
66
|
-
"@dxos/react-ui-attention": "0.7.5-
|
|
67
|
-
"@dxos/react-ui-
|
|
68
|
-
"@dxos/react-ui-
|
|
69
|
-
"@dxos/react-ui-
|
|
70
|
-
"@dxos/react-ui-
|
|
71
|
-
"@dxos/react-ui-
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/react-ui-
|
|
74
|
-
"@dxos/schema": "0.7.5-
|
|
36
|
+
"@dxos/async": "0.7.5-main.5ae2ba8",
|
|
37
|
+
"@dxos/app-framework": "0.7.5-main.5ae2ba8",
|
|
38
|
+
"@dxos/automerge": "0.7.5-main.5ae2ba8",
|
|
39
|
+
"@dxos/client-services": "0.7.5-main.5ae2ba8",
|
|
40
|
+
"@dxos/conductor": "0.7.5-main.5ae2ba8",
|
|
41
|
+
"@dxos/compute": "0.7.5-main.5ae2ba8",
|
|
42
|
+
"@dxos/config": "0.7.5-main.5ae2ba8",
|
|
43
|
+
"@dxos/devtools": "0.7.5-main.5ae2ba8",
|
|
44
|
+
"@dxos/echo-generator": "0.7.5-main.5ae2ba8",
|
|
45
|
+
"@dxos/echo-pipeline": "0.7.5-main.5ae2ba8",
|
|
46
|
+
"@dxos/functions": "0.7.5-main.5ae2ba8",
|
|
47
|
+
"@dxos/invariant": "0.7.5-main.5ae2ba8",
|
|
48
|
+
"@dxos/echo-schema": "0.7.5-main.5ae2ba8",
|
|
49
|
+
"@dxos/keys": "0.7.5-main.5ae2ba8",
|
|
50
|
+
"@dxos/local-storage": "0.7.5-main.5ae2ba8",
|
|
51
|
+
"@dxos/live-object": "0.7.5-main.5ae2ba8",
|
|
52
|
+
"@dxos/log": "0.7.5-main.5ae2ba8",
|
|
53
|
+
"@dxos/plugin-client": "0.7.5-main.5ae2ba8",
|
|
54
|
+
"@dxos/plugin-deck": "0.7.5-main.5ae2ba8",
|
|
55
|
+
"@dxos/plugin-graph": "0.7.5-main.5ae2ba8",
|
|
56
|
+
"@dxos/plugin-sheet": "0.7.5-main.5ae2ba8",
|
|
57
|
+
"@dxos/plugin-markdown": "0.7.5-main.5ae2ba8",
|
|
58
|
+
"@dxos/plugin-sketch": "0.7.5-main.5ae2ba8",
|
|
59
|
+
"@dxos/plugin-status-bar": "0.7.5-main.5ae2ba8",
|
|
60
|
+
"@dxos/plugin-space": "0.7.5-main.5ae2ba8",
|
|
61
|
+
"@dxos/plugin-table": "0.7.5-main.5ae2ba8",
|
|
62
|
+
"@dxos/plugin-theme": "0.7.5-main.5ae2ba8",
|
|
63
|
+
"@dxos/protocols": "0.7.5-main.5ae2ba8",
|
|
64
|
+
"@dxos/random": "0.7.5-main.5ae2ba8",
|
|
65
|
+
"@dxos/react-client": "0.7.5-main.5ae2ba8",
|
|
66
|
+
"@dxos/react-hooks": "0.7.5-main.5ae2ba8",
|
|
67
|
+
"@dxos/react-ui-attention": "0.7.5-main.5ae2ba8",
|
|
68
|
+
"@dxos/react-ui-form": "0.7.5-main.5ae2ba8",
|
|
69
|
+
"@dxos/react-ui-kanban": "0.7.5-main.5ae2ba8",
|
|
70
|
+
"@dxos/react-ui-canvas-compute": "0.7.5-main.5ae2ba8",
|
|
71
|
+
"@dxos/react-ui-canvas-editor": "0.7.5-main.5ae2ba8",
|
|
72
|
+
"@dxos/react-ui-syntax-highlighter": "0.7.5-main.5ae2ba8",
|
|
73
|
+
"@dxos/react-ui-table": "0.7.5-main.5ae2ba8",
|
|
74
|
+
"@dxos/react-ui-stack": "0.7.5-main.5ae2ba8",
|
|
75
|
+
"@dxos/schema": "0.7.5-main.5ae2ba8",
|
|
76
|
+
"@dxos/util": "0.7.5-main.5ae2ba8"
|
|
75
77
|
},
|
|
76
78
|
"devDependencies": {
|
|
77
79
|
"@phosphor-icons/react": "^2.1.5",
|
|
@@ -81,17 +83,17 @@
|
|
|
81
83
|
"react": "~18.2.0",
|
|
82
84
|
"react-dom": "~18.2.0",
|
|
83
85
|
"vite": "5.4.7",
|
|
84
|
-
"@dxos/react-ui": "0.7.5-
|
|
85
|
-
"@dxos/react-ui-theme": "0.7.5-
|
|
86
|
-
"@dxos/storybook-utils": "0.7.5-
|
|
86
|
+
"@dxos/react-ui": "0.7.5-main.5ae2ba8",
|
|
87
|
+
"@dxos/react-ui-theme": "0.7.5-main.5ae2ba8",
|
|
88
|
+
"@dxos/storybook-utils": "0.7.5-main.5ae2ba8"
|
|
87
89
|
},
|
|
88
90
|
"peerDependencies": {
|
|
89
91
|
"@phosphor-icons/react": "^2.1.5",
|
|
90
92
|
"react": "~18.2.0",
|
|
91
93
|
"react-dom": "~18.2.0",
|
|
92
|
-
"@dxos/random": "0.7.5-
|
|
93
|
-
"@dxos/react-ui
|
|
94
|
-
"@dxos/react-ui": "0.7.5-
|
|
94
|
+
"@dxos/random": "0.7.5-main.5ae2ba8",
|
|
95
|
+
"@dxos/react-ui": "0.7.5-main.5ae2ba8",
|
|
96
|
+
"@dxos/react-ui-theme": "0.7.5-main.5ae2ba8"
|
|
95
97
|
},
|
|
96
98
|
"publishConfig": {
|
|
97
99
|
"access": "public"
|
package/src/DebugPlugin.tsx
CHANGED
|
@@ -3,13 +3,15 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Capabilities, contributes, defineModule, definePlugin, Events } from '@dxos/app-framework';
|
|
6
|
-
import { DeckCapabilities } from '@dxos/plugin-deck';
|
|
6
|
+
import { DeckCapabilities, DeckEvents } from '@dxos/plugin-deck';
|
|
7
7
|
import { type Client } from '@dxos/react-client';
|
|
8
|
+
import { isEchoObject, getSpace } from '@dxos/react-client/echo';
|
|
8
9
|
|
|
9
|
-
import { AppGraphBuilder, DebugSettings, ReactSurface } from './capabilities';
|
|
10
|
+
import { AppGraphBuilder, DebugSettings, ReactContext, ReactSurface } from './capabilities';
|
|
10
11
|
import { DEBUG_PLUGIN, meta } from './meta';
|
|
11
12
|
import translations from './translations';
|
|
12
13
|
|
|
14
|
+
// TODO(wittjosiah): Rename to DevtoolsPlugin?
|
|
13
15
|
export const DebugPlugin = () => {
|
|
14
16
|
setupDevtools();
|
|
15
17
|
|
|
@@ -26,17 +28,23 @@ export const DebugPlugin = () => {
|
|
|
26
28
|
}),
|
|
27
29
|
defineModule({
|
|
28
30
|
id: `${meta.id}/module/complementary-panel`,
|
|
29
|
-
activatesOn:
|
|
31
|
+
activatesOn: DeckEvents.SetupComplementaryPanels,
|
|
30
32
|
activate: () =>
|
|
31
33
|
contributes(DeckCapabilities.ComplementaryPanel, {
|
|
32
34
|
id: 'debug',
|
|
33
35
|
label: ['debug label', { ns: DEBUG_PLUGIN }],
|
|
34
36
|
icon: 'ph--bug--regular',
|
|
37
|
+
filter: (node) => isEchoObject(node.data) && !!getSpace(node.data),
|
|
35
38
|
}),
|
|
36
39
|
}),
|
|
40
|
+
defineModule({
|
|
41
|
+
id: `${meta.id}/module/react-context`,
|
|
42
|
+
activatesOn: Events.Startup,
|
|
43
|
+
activate: ReactContext,
|
|
44
|
+
}),
|
|
37
45
|
defineModule({
|
|
38
46
|
id: `${meta.id}/module/react-surface`,
|
|
39
|
-
activatesOn: Events.
|
|
47
|
+
activatesOn: Events.SetupReactSurface,
|
|
40
48
|
activate: ReactSurface,
|
|
41
49
|
}),
|
|
42
50
|
defineModule({
|
|
@@ -3,41 +3,307 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { contributes, Capabilities, type PluginsContext } from '@dxos/app-framework';
|
|
6
|
-
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
7
6
|
import { createExtension, toSignal, type Node } from '@dxos/plugin-graph';
|
|
8
|
-
import { memoizeQuery } from '@dxos/plugin-space';
|
|
9
7
|
import { CollectionType } from '@dxos/plugin-space/types';
|
|
10
|
-
import {
|
|
8
|
+
import { SpaceState } from '@dxos/react-client/echo';
|
|
11
9
|
import { isSpace, type Space } from '@dxos/react-client/echo';
|
|
12
10
|
|
|
13
11
|
import { DEBUG_PLUGIN } from '../meta';
|
|
14
|
-
import { type DebugSettingsProps } from '../types';
|
|
12
|
+
import { type DebugSettingsProps, Devtools } from '../types';
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
const resolve = (typename: string) =>
|
|
18
|
-
context.requestCapabilities(Capabilities.Metadata).find(({ id }) => id === typename)?.metadata ?? {};
|
|
14
|
+
const DEVTOOLS_TYPE = 'dxos.org/plugin/debug/devtools';
|
|
19
15
|
|
|
20
|
-
|
|
16
|
+
export default (context: PluginsContext) =>
|
|
17
|
+
contributes(Capabilities.AppGraphBuilder, [
|
|
21
18
|
// Devtools node.
|
|
22
19
|
createExtension({
|
|
23
20
|
id: 'dxos.org/plugin/debug/devtools',
|
|
24
|
-
filter: (node): node is Node<null> =>
|
|
25
|
-
const settings = context
|
|
26
|
-
.requestCapabilities(Capabilities.SettingsStore)[0]
|
|
27
|
-
?.getStore<DebugSettingsProps>(DEBUG_PLUGIN)?.value;
|
|
28
|
-
return !!settings?.devtools && node.id === 'root';
|
|
29
|
-
},
|
|
21
|
+
filter: (node): node is Node<null> => node.id === 'root',
|
|
30
22
|
connector: () => [
|
|
31
23
|
{
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
type: 'dxos.org/plugin/debug/devtools',
|
|
24
|
+
id: Devtools.id,
|
|
25
|
+
data: null,
|
|
26
|
+
type: DEVTOOLS_TYPE,
|
|
36
27
|
properties: {
|
|
37
28
|
label: ['devtools label', { ns: DEBUG_PLUGIN }],
|
|
38
|
-
disposition: '
|
|
29
|
+
disposition: 'workspace',
|
|
39
30
|
icon: 'ph--hammer--regular',
|
|
40
31
|
},
|
|
32
|
+
nodes: [
|
|
33
|
+
{
|
|
34
|
+
id: Devtools.Client.id,
|
|
35
|
+
data: null,
|
|
36
|
+
type: DEVTOOLS_TYPE,
|
|
37
|
+
properties: {
|
|
38
|
+
label: ['client label', { ns: DEBUG_PLUGIN }],
|
|
39
|
+
icon: 'ph--users--regular',
|
|
40
|
+
},
|
|
41
|
+
nodes: [
|
|
42
|
+
{
|
|
43
|
+
id: Devtools.Client.Config,
|
|
44
|
+
data: Devtools.Client.Config,
|
|
45
|
+
type: DEVTOOLS_TYPE,
|
|
46
|
+
properties: {
|
|
47
|
+
label: ['config label', { ns: DEBUG_PLUGIN }],
|
|
48
|
+
icon: 'ph--gear--regular',
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: Devtools.Client.Storage,
|
|
53
|
+
data: Devtools.Client.Storage,
|
|
54
|
+
type: DEVTOOLS_TYPE,
|
|
55
|
+
properties: {
|
|
56
|
+
label: ['storage label', { ns: DEBUG_PLUGIN }],
|
|
57
|
+
icon: 'ph--hard-drives--regular',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
id: Devtools.Client.Logs,
|
|
62
|
+
data: Devtools.Client.Logs,
|
|
63
|
+
type: DEVTOOLS_TYPE,
|
|
64
|
+
properties: {
|
|
65
|
+
label: ['logs label', { ns: DEBUG_PLUGIN }],
|
|
66
|
+
icon: 'ph--file-text--regular',
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
id: Devtools.Client.Diagnostics,
|
|
71
|
+
data: Devtools.Client.Diagnostics,
|
|
72
|
+
type: DEVTOOLS_TYPE,
|
|
73
|
+
properties: {
|
|
74
|
+
label: ['diagnostics label', { ns: DEBUG_PLUGIN }],
|
|
75
|
+
icon: 'ph--chart-line--regular',
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: Devtools.Client.Tracing,
|
|
80
|
+
data: Devtools.Client.Tracing,
|
|
81
|
+
type: DEVTOOLS_TYPE,
|
|
82
|
+
properties: {
|
|
83
|
+
label: ['tracing label', { ns: DEBUG_PLUGIN }],
|
|
84
|
+
icon: 'ph--fire--regular',
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
id: Devtools.Halo.id,
|
|
91
|
+
data: null,
|
|
92
|
+
type: DEVTOOLS_TYPE,
|
|
93
|
+
properties: {
|
|
94
|
+
label: ['halo label', { ns: DEBUG_PLUGIN }],
|
|
95
|
+
icon: 'ph--identification-badge--regular',
|
|
96
|
+
},
|
|
97
|
+
nodes: [
|
|
98
|
+
{
|
|
99
|
+
id: Devtools.Halo.Identity,
|
|
100
|
+
data: Devtools.Halo.Identity,
|
|
101
|
+
type: DEVTOOLS_TYPE,
|
|
102
|
+
properties: {
|
|
103
|
+
label: ['identity label', { ns: DEBUG_PLUGIN }],
|
|
104
|
+
icon: 'ph--identification-badge--regular',
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
id: Devtools.Halo.Devices,
|
|
109
|
+
data: Devtools.Halo.Devices,
|
|
110
|
+
type: DEVTOOLS_TYPE,
|
|
111
|
+
properties: {
|
|
112
|
+
label: ['devices label', { ns: DEBUG_PLUGIN }],
|
|
113
|
+
icon: 'ph--devices--regular',
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
id: Devtools.Halo.Keyring,
|
|
118
|
+
data: Devtools.Halo.Keyring,
|
|
119
|
+
type: DEVTOOLS_TYPE,
|
|
120
|
+
properties: {
|
|
121
|
+
label: ['keyring label', { ns: DEBUG_PLUGIN }],
|
|
122
|
+
icon: 'ph--key--regular',
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
id: Devtools.Halo.Credentials,
|
|
127
|
+
data: Devtools.Halo.Credentials,
|
|
128
|
+
type: DEVTOOLS_TYPE,
|
|
129
|
+
properties: {
|
|
130
|
+
label: ['credentials label', { ns: DEBUG_PLUGIN }],
|
|
131
|
+
icon: 'ph--credit-card--regular',
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
],
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
id: Devtools.Echo.id,
|
|
138
|
+
data: null,
|
|
139
|
+
type: DEVTOOLS_TYPE,
|
|
140
|
+
properties: {
|
|
141
|
+
label: ['echo label', { ns: DEBUG_PLUGIN }],
|
|
142
|
+
icon: 'ph--database--regular',
|
|
143
|
+
},
|
|
144
|
+
nodes: [
|
|
145
|
+
{
|
|
146
|
+
id: Devtools.Echo.Spaces,
|
|
147
|
+
data: Devtools.Echo.Spaces,
|
|
148
|
+
type: DEVTOOLS_TYPE,
|
|
149
|
+
properties: {
|
|
150
|
+
label: ['spaces label', { ns: DEBUG_PLUGIN }],
|
|
151
|
+
icon: 'ph--graph--regular',
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
id: Devtools.Echo.Space,
|
|
156
|
+
data: Devtools.Echo.Space,
|
|
157
|
+
type: DEVTOOLS_TYPE,
|
|
158
|
+
properties: {
|
|
159
|
+
label: ['space label', { ns: DEBUG_PLUGIN }],
|
|
160
|
+
icon: 'ph--planet--regular',
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
id: Devtools.Echo.Feeds,
|
|
165
|
+
data: Devtools.Echo.Feeds,
|
|
166
|
+
type: DEVTOOLS_TYPE,
|
|
167
|
+
properties: {
|
|
168
|
+
label: ['feeds label', { ns: DEBUG_PLUGIN }],
|
|
169
|
+
icon: 'ph--queue--regular',
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
id: Devtools.Echo.Objects,
|
|
174
|
+
data: Devtools.Echo.Objects,
|
|
175
|
+
type: DEVTOOLS_TYPE,
|
|
176
|
+
properties: {
|
|
177
|
+
label: ['objects label', { ns: DEBUG_PLUGIN }],
|
|
178
|
+
icon: 'ph--database--regular',
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
id: Devtools.Echo.Automerge,
|
|
183
|
+
data: Devtools.Echo.Automerge,
|
|
184
|
+
type: DEVTOOLS_TYPE,
|
|
185
|
+
properties: {
|
|
186
|
+
label: ['automerge label', { ns: DEBUG_PLUGIN }],
|
|
187
|
+
icon: 'ph--gear-six--regular',
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
id: Devtools.Echo.Members,
|
|
192
|
+
data: Devtools.Echo.Members,
|
|
193
|
+
type: DEVTOOLS_TYPE,
|
|
194
|
+
properties: {
|
|
195
|
+
label: ['members label', { ns: DEBUG_PLUGIN }],
|
|
196
|
+
icon: 'ph--users--regular',
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
id: Devtools.Echo.Metadata,
|
|
201
|
+
data: Devtools.Echo.Metadata,
|
|
202
|
+
type: DEVTOOLS_TYPE,
|
|
203
|
+
properties: {
|
|
204
|
+
label: ['metadata label', { ns: DEBUG_PLUGIN }],
|
|
205
|
+
icon: 'ph--hard-drive--regular',
|
|
206
|
+
},
|
|
207
|
+
},
|
|
208
|
+
],
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
id: Devtools.Mesh.id,
|
|
212
|
+
data: null,
|
|
213
|
+
type: DEVTOOLS_TYPE,
|
|
214
|
+
properties: {
|
|
215
|
+
label: ['mesh label', { ns: DEBUG_PLUGIN }],
|
|
216
|
+
icon: 'ph--graph--regular',
|
|
217
|
+
},
|
|
218
|
+
nodes: [
|
|
219
|
+
{
|
|
220
|
+
id: Devtools.Mesh.Signal,
|
|
221
|
+
data: Devtools.Mesh.Signal,
|
|
222
|
+
type: DEVTOOLS_TYPE,
|
|
223
|
+
properties: {
|
|
224
|
+
label: ['signal label', { ns: DEBUG_PLUGIN }],
|
|
225
|
+
icon: 'ph--wifi-high--regular',
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
id: Devtools.Mesh.Swarm,
|
|
230
|
+
data: Devtools.Mesh.Swarm,
|
|
231
|
+
type: DEVTOOLS_TYPE,
|
|
232
|
+
properties: {
|
|
233
|
+
label: ['swarm label', { ns: DEBUG_PLUGIN }],
|
|
234
|
+
icon: 'ph--users-three--regular',
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
id: Devtools.Mesh.Network,
|
|
239
|
+
data: Devtools.Mesh.Network,
|
|
240
|
+
type: DEVTOOLS_TYPE,
|
|
241
|
+
properties: {
|
|
242
|
+
label: ['network label', { ns: DEBUG_PLUGIN }],
|
|
243
|
+
icon: 'ph--polygon--regular',
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
],
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
id: Devtools.Agent.id,
|
|
250
|
+
data: null,
|
|
251
|
+
type: DEVTOOLS_TYPE,
|
|
252
|
+
properties: {
|
|
253
|
+
label: ['agent label', { ns: DEBUG_PLUGIN }],
|
|
254
|
+
icon: 'ph--robot--regular',
|
|
255
|
+
},
|
|
256
|
+
nodes: [
|
|
257
|
+
{
|
|
258
|
+
id: Devtools.Agent.Dashboard,
|
|
259
|
+
data: Devtools.Agent.Dashboard,
|
|
260
|
+
type: DEVTOOLS_TYPE,
|
|
261
|
+
properties: {
|
|
262
|
+
label: ['dashboard label', { ns: DEBUG_PLUGIN }],
|
|
263
|
+
icon: 'ph--computer-tower--regular',
|
|
264
|
+
},
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
id: Devtools.Agent.Search,
|
|
268
|
+
data: Devtools.Agent.Search,
|
|
269
|
+
type: DEVTOOLS_TYPE,
|
|
270
|
+
properties: {
|
|
271
|
+
label: ['search label', { ns: DEBUG_PLUGIN }],
|
|
272
|
+
icon: 'ph--magnifying-glass--regular',
|
|
273
|
+
},
|
|
274
|
+
},
|
|
275
|
+
],
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
id: Devtools.Edge.id,
|
|
279
|
+
data: null,
|
|
280
|
+
type: DEVTOOLS_TYPE,
|
|
281
|
+
properties: {
|
|
282
|
+
label: ['edge label', { ns: DEBUG_PLUGIN }],
|
|
283
|
+
icon: 'ph--cloud--regular',
|
|
284
|
+
},
|
|
285
|
+
nodes: [
|
|
286
|
+
{
|
|
287
|
+
id: Devtools.Edge.Dashboard,
|
|
288
|
+
data: Devtools.Edge.Dashboard,
|
|
289
|
+
type: DEVTOOLS_TYPE,
|
|
290
|
+
properties: {
|
|
291
|
+
label: ['dashboard label', { ns: DEBUG_PLUGIN }],
|
|
292
|
+
icon: 'ph--computer-tower--regular',
|
|
293
|
+
},
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
id: Devtools.Edge.Workflows,
|
|
297
|
+
data: Devtools.Edge.Workflows,
|
|
298
|
+
type: DEVTOOLS_TYPE,
|
|
299
|
+
properties: {
|
|
300
|
+
label: ['workflows label', { ns: DEBUG_PLUGIN }],
|
|
301
|
+
icon: 'ph--function--regular',
|
|
302
|
+
},
|
|
303
|
+
},
|
|
304
|
+
],
|
|
305
|
+
},
|
|
306
|
+
],
|
|
41
307
|
},
|
|
42
308
|
],
|
|
43
309
|
}),
|
|
@@ -46,10 +312,12 @@ export default (context: PluginsContext) => {
|
|
|
46
312
|
createExtension({
|
|
47
313
|
id: 'dxos.org/plugin/debug/debug',
|
|
48
314
|
filter: (node): node is Node<null> => {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
315
|
+
// TODO(wittjosiah): Plank is currently blank. Remove?
|
|
316
|
+
// const settings = context
|
|
317
|
+
// .requestCapabilities(Capabilities.SettingsStore)[0]
|
|
318
|
+
// ?.getStore<DebugSettingsProps>(DEBUG_PLUGIN)?.value;
|
|
319
|
+
// return !!settings?.debug && node.id === 'root';
|
|
320
|
+
return false;
|
|
53
321
|
},
|
|
54
322
|
connector: () => {
|
|
55
323
|
const [graph] = context.requestCapabilities(Capabilities.AppGraph);
|
|
@@ -102,6 +370,7 @@ export default (context: PluginsContext) => {
|
|
|
102
370
|
|
|
103
371
|
return [
|
|
104
372
|
{
|
|
373
|
+
// TODO(wittjosiah): Cannot use slashes in ids until we have a router which decouples ids from url paths.
|
|
105
374
|
id: `${space.id}-debug`, // TODO(burdon): Change to slashes consistently.
|
|
106
375
|
type: 'dxos.org/plugin/debug/space',
|
|
107
376
|
data: { space, type: 'dxos.org/plugin/debug/space' },
|
|
@@ -113,63 +382,4 @@ export default (context: PluginsContext) => {
|
|
|
113
382
|
];
|
|
114
383
|
},
|
|
115
384
|
}),
|
|
116
|
-
|
|
117
|
-
// Create nodes for debug sidebar.
|
|
118
|
-
createExtension({
|
|
119
|
-
id: `${DEBUG_PLUGIN}/debug-for-subject`,
|
|
120
|
-
resolver: ({ id }) => {
|
|
121
|
-
if (!id.endsWith('~debug')) {
|
|
122
|
-
return;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
const type = 'orphan-settings-for-subject';
|
|
126
|
-
const icon = 'ph--bug--regular';
|
|
127
|
-
|
|
128
|
-
const client = context.requestCapability(ClientCapabilities.Client);
|
|
129
|
-
const [subjectId] = id.split('~');
|
|
130
|
-
const { spaceId, objectId } = parseId(subjectId);
|
|
131
|
-
const spaces = toSignal(
|
|
132
|
-
(onChange) => client.spaces.subscribe(() => onChange()).unsubscribe,
|
|
133
|
-
() => client.spaces.get(),
|
|
134
|
-
);
|
|
135
|
-
const space = spaces?.find((space) => space.state.get() === SpaceState.SPACE_READY && space.id === spaceId);
|
|
136
|
-
if (!objectId) {
|
|
137
|
-
// TODO(burdon): Ref SPACE_PLUGIN ns.
|
|
138
|
-
const label = space
|
|
139
|
-
? space.properties.name || ['unnamed space label', { ns: DEBUG_PLUGIN }]
|
|
140
|
-
: ['unnamed object settings label', { ns: DEBUG_PLUGIN }];
|
|
141
|
-
|
|
142
|
-
// TODO(wittjosiah): Support comments for arbitrary subjects.
|
|
143
|
-
// This is to ensure that the comments panel is not stuck on an old object.
|
|
144
|
-
return {
|
|
145
|
-
id,
|
|
146
|
-
type,
|
|
147
|
-
data: null,
|
|
148
|
-
properties: { icon, label, object: null, space },
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
const [object] = memoizeQuery(space, { id: objectId });
|
|
153
|
-
if (!object || !subjectId) {
|
|
154
|
-
return;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
const meta = resolve(getTypename(object) ?? '');
|
|
158
|
-
const label = meta.label?.(object) ||
|
|
159
|
-
object.name ||
|
|
160
|
-
meta.placeholder || ['unnamed object settings label', { ns: DEBUG_PLUGIN }];
|
|
161
|
-
|
|
162
|
-
return {
|
|
163
|
-
id,
|
|
164
|
-
type,
|
|
165
|
-
data: null,
|
|
166
|
-
properties: {
|
|
167
|
-
icon,
|
|
168
|
-
label,
|
|
169
|
-
object,
|
|
170
|
-
},
|
|
171
|
-
};
|
|
172
|
-
},
|
|
173
|
-
}),
|
|
174
385
|
]);
|
|
175
|
-
};
|
|
@@ -5,5 +5,6 @@
|
|
|
5
5
|
import { lazy } from '@dxos/app-framework';
|
|
6
6
|
|
|
7
7
|
export const AppGraphBuilder = lazy(() => import('./app-graph-builder'));
|
|
8
|
+
export const ReactContext = lazy(() => import('./react-context'));
|
|
8
9
|
export const ReactSurface = lazy(() => import('./react-surface'));
|
|
9
10
|
export const DebugSettings = lazy(() => import('./settings'));
|