@dxos/plugin-debug 0.8.4-main.dedc0f3 → 0.8.4-main.dfabb4ec29

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