@dxos/plugin-debug 0.8.4-main.3eb6e50203 → 0.8.4-main.3fbcb4aa9b

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 (221) hide show
  1. package/dist/lib/{browser/DebugGraph-6VMEOKEV.mjs → neutral/DebugGraph-G4FWS57E.mjs} +5 -5
  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/{browser/app-graph-builder-DEBTVBQG.mjs → neutral/app-graph-builder-YPYHL2K5.mjs} +217 -239
  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/{browser/chunk-A5H5GRV6.mjs → neutral/chunk-3OGPOE7H.mjs} +2 -2
  26. package/dist/lib/{browser/chunk-A5H5GRV6.mjs.map → neutral/chunk-3OGPOE7H.mjs.map} +3 -3
  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-4UFQXPP7.mjs → neutral/chunk-NFIOTQRZ.mjs} +23 -12
  30. package/dist/lib/neutral/chunk-NFIOTQRZ.mjs.map +7 -0
  31. package/dist/lib/{browser/SpaceGenerator-W3LJORYT.mjs → neutral/components/index.mjs} +283 -454
  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/{browser/react-context-I3USIAF6.mjs → neutral/react-context-MUZ3KVLU.mjs} +6 -6
  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/{browser/settings-SLTQJJNF.mjs → neutral/settings-MPM6YUP4.mjs} +7 -11
  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 +3 -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 +6 -0
  59. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
  60. package/dist/types/src/capabilities/index.d.ts +11 -4
  61. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  62. package/dist/types/src/capabilities/{react-context/react-context.d.ts → react-context.d.ts} +1 -1
  63. package/dist/types/src/capabilities/react-context.d.ts.map +1 -0
  64. package/dist/types/src/capabilities/react-surface.d.ts +9 -0
  65. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  66. package/dist/types/src/capabilities/settings.d.ts +7 -0
  67. package/dist/types/src/capabilities/settings.d.ts.map +1 -0
  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 +2 -2
  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.map +1 -1
  83. package/dist/types/src/components/index.d.ts +4 -10
  84. package/dist/types/src/components/index.d.ts.map +1 -1
  85. package/dist/types/src/containers/DebugGraph/DebugGraph.d.ts +8 -0
  86. package/dist/types/src/containers/DebugGraph/DebugGraph.d.ts.map +1 -0
  87. package/dist/types/src/containers/DebugGraph/index.d.ts +2 -0
  88. package/dist/types/src/containers/DebugGraph/index.d.ts.map +1 -0
  89. package/dist/types/src/containers/DebugObjectPanel/DebugObjectPanel.d.ts +6 -0
  90. package/dist/types/src/containers/DebugObjectPanel/DebugObjectPanel.d.ts.map +1 -0
  91. package/dist/types/src/containers/DebugObjectPanel/index.d.ts +2 -0
  92. package/dist/types/src/containers/DebugObjectPanel/index.d.ts.map +1 -0
  93. package/dist/types/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.d.ts +5 -0
  94. package/dist/types/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.d.ts.map +1 -0
  95. package/dist/types/src/containers/DebugSpaceObjectsPanel/index.d.ts +2 -0
  96. package/dist/types/src/containers/DebugSpaceObjectsPanel/index.d.ts.map +1 -0
  97. package/dist/types/src/containers/DebugStatus/DebugStatus.d.ts.map +1 -0
  98. package/dist/types/src/containers/DebugStatus/index.d.ts +2 -0
  99. package/dist/types/src/containers/DebugStatus/index.d.ts.map +1 -0
  100. package/dist/types/src/{components → containers/DevtoolsOverviewContainer}/DevtoolsOverviewContainer.d.ts +0 -1
  101. package/dist/types/src/containers/DevtoolsOverviewContainer/DevtoolsOverviewContainer.d.ts.map +1 -0
  102. package/dist/types/src/containers/DevtoolsOverviewContainer/index.d.ts +2 -0
  103. package/dist/types/src/containers/DevtoolsOverviewContainer/index.d.ts.map +1 -0
  104. package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.d.ts +11 -0
  105. package/dist/types/src/{components → containers}/SpaceGenerator/SpaceGenerator.d.ts.map +1 -1
  106. package/dist/types/src/containers/SpaceGenerator/index.d.ts +2 -0
  107. package/dist/types/src/containers/SpaceGenerator/index.d.ts.map +1 -0
  108. package/dist/types/src/containers/Wireframe/Wireframe.d.ts.map +1 -0
  109. package/dist/types/src/containers/Wireframe/index.d.ts +2 -0
  110. package/dist/types/src/containers/Wireframe/index.d.ts.map +1 -0
  111. package/dist/types/src/containers/index.d.ts +9 -0
  112. package/dist/types/src/containers/index.d.ts.map +1 -0
  113. package/dist/types/src/index.d.ts +1 -1
  114. package/dist/types/src/index.d.ts.map +1 -1
  115. package/dist/types/src/plugin.d.ts +4 -0
  116. package/dist/types/src/plugin.d.ts.map +1 -0
  117. package/dist/types/src/translations.d.ts +80 -59
  118. package/dist/types/src/translations.d.ts.map +1 -1
  119. package/dist/types/src/types/Settings.d.ts +8 -0
  120. package/dist/types/src/types/Settings.d.ts.map +1 -0
  121. package/dist/types/src/types/index.d.ts +69 -0
  122. package/dist/types/src/types/index.d.ts.map +1 -0
  123. package/dist/types/tsconfig.tsbuildinfo +1 -1
  124. package/package.json +116 -66
  125. package/src/DebugPlugin.node.ts +18 -0
  126. package/src/DebugPlugin.test.ts +29 -0
  127. package/src/DebugPlugin.tsx +14 -6
  128. package/src/capabilities/app-graph-builder.ts +405 -0
  129. package/src/capabilities/index.ts +6 -4
  130. package/src/capabilities/{react-context/react-context.tsx → react-context.tsx} +7 -2
  131. package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +175 -147
  132. package/src/capabilities/{settings/settings.ts → settings.ts} +4 -4
  133. package/src/components/DebugSettings/DebugSettings.stories.tsx +36 -0
  134. package/src/components/DebugSettings/DebugSettings.tsx +262 -0
  135. package/src/components/DebugSettings/index.ts +5 -0
  136. package/src/components/{SpaceGenerator → SchemaTable}/SchemaTable.tsx +2 -2
  137. package/src/components/SchemaTable/index.ts +5 -0
  138. package/src/components/SpaceGenerator/ObjectGenerator.tsx +16 -17
  139. package/src/components/SpaceGenerator/draw-util.ts +8 -8
  140. package/src/components/SpaceGenerator/index.ts +2 -3
  141. package/src/components/SpaceGenerator/presets.ts +49 -63
  142. package/src/components/index.ts +4 -11
  143. package/src/{components → containers/DebugGraph}/DebugGraph.tsx +3 -4
  144. package/src/containers/DebugGraph/index.ts +5 -0
  145. package/src/containers/DebugObjectPanel/DebugObjectPanel.tsx +76 -0
  146. package/src/containers/DebugObjectPanel/index.ts +5 -0
  147. package/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.tsx +47 -0
  148. package/src/containers/DebugSpaceObjectsPanel/index.ts +5 -0
  149. package/src/{components → containers/DebugStatus}/DebugStatus.tsx +41 -19
  150. package/src/containers/DebugStatus/index.ts +5 -0
  151. package/src/{components → containers/DevtoolsOverviewContainer}/DevtoolsOverviewContainer.tsx +8 -3
  152. package/src/containers/DevtoolsOverviewContainer/index.ts +5 -0
  153. package/src/containers/SpaceGenerator/SpaceGenerator.tsx +126 -0
  154. package/src/containers/SpaceGenerator/index.ts +5 -0
  155. package/src/{components → containers/Wireframe}/Wireframe.tsx +3 -7
  156. package/src/containers/Wireframe/index.ts +5 -0
  157. package/src/containers/index.ts +13 -0
  158. package/src/index.ts +1 -1
  159. package/src/meta.ts +1 -1
  160. package/src/plugin.ts +10 -0
  161. package/src/translations.ts +75 -58
  162. package/src/types/Settings.ts +16 -0
  163. package/src/{types.ts → types/index.ts} +15 -14
  164. package/dist/lib/browser/DebugGraph-6VMEOKEV.mjs.map +0 -7
  165. package/dist/lib/browser/DevtoolsOverviewContainer-2C6XMJ3L.mjs +0 -19
  166. package/dist/lib/browser/DevtoolsOverviewContainer-2C6XMJ3L.mjs.map +0 -7
  167. package/dist/lib/browser/SpaceGenerator-W3LJORYT.mjs.map +0 -7
  168. package/dist/lib/browser/app-graph-builder-DEBTVBQG.mjs.map +0 -7
  169. package/dist/lib/browser/chunk-4UFQXPP7.mjs.map +0 -7
  170. package/dist/lib/browser/index.mjs +0 -126
  171. package/dist/lib/browser/index.mjs.map +0 -7
  172. package/dist/lib/browser/meta.json +0 -1
  173. package/dist/lib/browser/react-context-I3USIAF6.mjs.map +0 -7
  174. package/dist/lib/browser/react-surface-FMVC5GPV.mjs +0 -758
  175. package/dist/lib/browser/react-surface-FMVC5GPV.mjs.map +0 -7
  176. package/dist/lib/browser/settings-SLTQJJNF.mjs.map +0 -7
  177. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +0 -6
  178. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
  179. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
  180. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
  181. package/dist/types/src/capabilities/react-context/index.d.ts +0 -7
  182. package/dist/types/src/capabilities/react-context/index.d.ts.map +0 -1
  183. package/dist/types/src/capabilities/react-context/react-context.d.ts.map +0 -1
  184. package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
  185. package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
  186. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +0 -5
  187. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
  188. package/dist/types/src/capabilities/settings/index.d.ts +0 -3
  189. package/dist/types/src/capabilities/settings/index.d.ts.map +0 -1
  190. package/dist/types/src/capabilities/settings/settings.d.ts +0 -6
  191. package/dist/types/src/capabilities/settings/settings.d.ts.map +0 -1
  192. package/dist/types/src/components/Container.d.ts +0 -5
  193. package/dist/types/src/components/Container.d.ts.map +0 -1
  194. package/dist/types/src/components/DebugGraph.d.ts +0 -9
  195. package/dist/types/src/components/DebugGraph.d.ts.map +0 -1
  196. package/dist/types/src/components/DebugObjectPanel.d.ts +0 -7
  197. package/dist/types/src/components/DebugObjectPanel.d.ts.map +0 -1
  198. package/dist/types/src/components/DebugSettings.d.ts +0 -8
  199. package/dist/types/src/components/DebugSettings.d.ts.map +0 -1
  200. package/dist/types/src/components/DebugStatus.d.ts.map +0 -1
  201. package/dist/types/src/components/DevtoolsOverviewContainer.d.ts.map +0 -1
  202. package/dist/types/src/components/SpaceGenerator/SchemaTable.d.ts.map +0 -1
  203. package/dist/types/src/components/SpaceGenerator/SpaceGenerator.d.ts +0 -9
  204. package/dist/types/src/components/SpaceGenerator/SpaceGenerator.stories.d.ts +0 -15
  205. package/dist/types/src/components/SpaceGenerator/SpaceGenerator.stories.d.ts.map +0 -1
  206. package/dist/types/src/components/Wireframe.d.ts.map +0 -1
  207. package/dist/types/src/types.d.ts +0 -68
  208. package/dist/types/src/types.d.ts.map +0 -1
  209. package/src/capabilities/app-graph-builder/app-graph-builder.ts +0 -421
  210. package/src/capabilities/app-graph-builder/index.ts +0 -7
  211. package/src/capabilities/react-context/index.ts +0 -7
  212. package/src/capabilities/react-surface/index.ts +0 -7
  213. package/src/capabilities/settings/index.ts +0 -7
  214. package/src/components/Container.tsx +0 -15
  215. package/src/components/DebugObjectPanel.tsx +0 -32
  216. package/src/components/DebugSettings.tsx +0 -185
  217. package/src/components/SpaceGenerator/SpaceGenerator.stories.tsx +0 -54
  218. package/src/components/SpaceGenerator/SpaceGenerator.tsx +0 -126
  219. /package/dist/types/src/components/{SpaceGenerator → SchemaTable}/SchemaTable.d.ts +0 -0
  220. /package/dist/types/src/{components → containers/DebugStatus}/DebugStatus.d.ts +0 -0
  221. /package/dist/types/src/{components → containers/Wireframe}/Wireframe.d.ts +0 -0
@@ -1,421 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import * as Effect from 'effect/Effect';
6
-
7
- import { Capability } from '@dxos/app-framework';
8
- import { AppCapabilities } from '@dxos/app-toolkit';
9
- import { Obj } from '@dxos/echo';
10
- import { ClientCapabilities } from '@dxos/plugin-client';
11
- import { ATTENDABLE_PATH_SEPARATOR, DECK_COMPANION_TYPE, PLANK_COMPANION_TYPE } from '@dxos/plugin-deck/types';
12
- import { GraphBuilder, Node, NodeMatcher } from '@dxos/plugin-graph';
13
- import { meta as spaceMeta } from '@dxos/plugin-space';
14
- import { parseId } from '@dxos/react-client/echo';
15
-
16
- import { meta } from '../../meta';
17
- import { Devtools } from '../../types';
18
-
19
- const DEVTOOLS_TYPE = `${meta.id}/devtools`;
20
-
21
- export default Capability.makeModule(
22
- Effect.fnUntraced(function* () {
23
- const extensions = yield* Effect.all([
24
- // Devtools node.
25
- GraphBuilder.createExtension({
26
- id: `${meta.id}/devtools`,
27
- match: NodeMatcher.whenAny(NodeMatcher.whenRoot, NodeMatcher.whenNodeType(`${spaceMeta.id}/settings`)),
28
- connector: (node, get) =>
29
- Effect.gen(function* () {
30
- const client = yield* Capability.get(ClientCapabilities.Client);
31
- const layoutAtom = get(yield* Capability.atom(AppCapabilities.Layout))[0];
32
- const layout = layoutAtom ? get(layoutAtom) : undefined;
33
- const { spaceId } = parseId(layout?.workspace);
34
- const space = spaceId ? client.spaces.get(spaceId) : undefined;
35
- const [graph] = get(yield* Capability.atom(AppCapabilities.AppGraph));
36
-
37
- return [
38
- {
39
- id: `${Devtools.id}-${node.id}`,
40
- data: null,
41
- type: DEVTOOLS_TYPE,
42
- properties: {
43
- label: ['devtools label', { ns: meta.id }],
44
- icon: 'ph--hammer--regular',
45
- disposition: 'pin-end',
46
- position: 'fallback',
47
- },
48
- nodes: [
49
- ...(space && node.type === `${spaceMeta.id}/settings`
50
- ? [
51
- {
52
- id: `debug-${node.id}`,
53
- type: `${meta.id}/space`,
54
- data: { space, type: `${meta.id}/space` },
55
- properties: {
56
- label: ['debug label', { ns: meta.id }],
57
- icon: 'ph--bug--regular',
58
- },
59
- },
60
- ]
61
- : []),
62
- {
63
- id: `app-graph-${node.id}`,
64
- type: `${meta.id}/app-graph`,
65
- data: { graph: graph?.graph, root: space ? space.id : Node.RootId },
66
- properties: {
67
- label: ['debug app graph label', { ns: meta.id }],
68
- icon: 'ph--graph--regular',
69
- },
70
- },
71
- {
72
- id: `${Devtools.Client.id}-${node.id}`,
73
- data: null,
74
- type: DEVTOOLS_TYPE,
75
- properties: {
76
- label: ['client label', { ns: meta.id }],
77
- icon: 'ph--users--regular',
78
- },
79
- nodes: [
80
- {
81
- id: `${Devtools.Client.Config}-${node.id}`,
82
- data: Devtools.Client.Config,
83
- type: DEVTOOLS_TYPE,
84
- properties: {
85
- label: ['config label', { ns: meta.id }],
86
- icon: 'ph--gear--regular',
87
- },
88
- },
89
- {
90
- id: `${Devtools.Client.Storage}-${node.id}`,
91
- data: Devtools.Client.Storage,
92
- type: DEVTOOLS_TYPE,
93
- properties: {
94
- label: ['storage label', { ns: meta.id }],
95
- icon: 'ph--hard-drives--regular',
96
- },
97
- },
98
- {
99
- id: `${Devtools.Client.Logs}-${node.id}`,
100
- data: Devtools.Client.Logs,
101
- type: DEVTOOLS_TYPE,
102
- properties: {
103
- label: ['logs label', { ns: meta.id }],
104
- icon: 'ph--file-text--regular',
105
- },
106
- },
107
- {
108
- id: `${Devtools.Client.Diagnostics}-${node.id}`,
109
- data: Devtools.Client.Diagnostics,
110
- type: DEVTOOLS_TYPE,
111
- properties: {
112
- label: ['diagnostics label', { ns: meta.id }],
113
- icon: 'ph--chart-line--regular',
114
- },
115
- },
116
- {
117
- id: `${Devtools.Client.Tracing}-${node.id}`,
118
- data: Devtools.Client.Tracing,
119
- type: DEVTOOLS_TYPE,
120
- properties: {
121
- label: ['tracing label', { ns: meta.id }],
122
- icon: 'ph--fire--regular',
123
- },
124
- },
125
- ],
126
- },
127
- {
128
- id: `${Devtools.Halo.id}-${node.id}`,
129
- data: null,
130
- type: DEVTOOLS_TYPE,
131
- properties: {
132
- label: ['halo label', { ns: meta.id }],
133
- icon: 'ph--identification-badge--regular',
134
- },
135
- nodes: [
136
- {
137
- id: `${Devtools.Halo.Identity}-${node.id}`,
138
- data: Devtools.Halo.Identity,
139
- type: DEVTOOLS_TYPE,
140
- properties: {
141
- label: ['identity label', { ns: meta.id }],
142
- icon: 'ph--identification-badge--regular',
143
- },
144
- },
145
- {
146
- id: `${Devtools.Halo.Devices}-${node.id}`,
147
- data: Devtools.Halo.Devices,
148
- type: DEVTOOLS_TYPE,
149
- properties: {
150
- label: ['devices label', { ns: meta.id }],
151
- icon: 'ph--devices--regular',
152
- },
153
- },
154
- {
155
- id: `${Devtools.Halo.Keyring}-${node.id}`,
156
- data: Devtools.Halo.Keyring,
157
- type: DEVTOOLS_TYPE,
158
- properties: {
159
- label: ['keyring label', { ns: meta.id }],
160
- icon: 'ph--key--regular',
161
- },
162
- },
163
- {
164
- id: `${Devtools.Halo.Credentials}-${node.id}`,
165
- data: Devtools.Halo.Credentials,
166
- type: DEVTOOLS_TYPE,
167
- properties: {
168
- label: ['credentials label', { ns: meta.id }],
169
- icon: 'ph--credit-card--regular',
170
- },
171
- },
172
- ],
173
- },
174
- {
175
- id: `${Devtools.Echo.id}-${node.id}`,
176
- data: null,
177
- type: DEVTOOLS_TYPE,
178
- properties: {
179
- label: ['echo label', { ns: meta.id }],
180
- icon: 'ph--database--regular',
181
- },
182
- nodes: [
183
- {
184
- id: `${Devtools.Echo.Spaces}-${node.id}`,
185
- data: Devtools.Echo.Spaces,
186
- type: DEVTOOLS_TYPE,
187
- properties: {
188
- label: ['spaces label', { ns: meta.id }],
189
- icon: 'ph--graph--regular',
190
- },
191
- },
192
- {
193
- id: `${Devtools.Echo.Space}-${node.id}`,
194
- data: Devtools.Echo.Space,
195
- type: DEVTOOLS_TYPE,
196
- properties: {
197
- label: ['space label', { ns: meta.id }],
198
- icon: 'ph--planet--regular',
199
- },
200
- },
201
- {
202
- id: `${Devtools.Echo.Feeds}-${node.id}`,
203
- data: Devtools.Echo.Feeds,
204
- type: DEVTOOLS_TYPE,
205
- properties: {
206
- label: ['feeds label', { ns: meta.id }],
207
- icon: 'ph--list-bullets--regular',
208
- },
209
- },
210
- {
211
- id: `${Devtools.Echo.Objects}-${node.id}`,
212
- data: Devtools.Echo.Objects,
213
- type: DEVTOOLS_TYPE,
214
- properties: {
215
- label: ['objects label', { ns: meta.id }],
216
- icon: 'ph--cube--regular',
217
- },
218
- },
219
- {
220
- id: `${Devtools.Echo.Schema}-${node.id}`,
221
- data: Devtools.Echo.Schema,
222
- type: DEVTOOLS_TYPE,
223
- properties: {
224
- label: ['schema label', { ns: meta.id }],
225
- icon: 'ph--database--regular',
226
- },
227
- },
228
- {
229
- id: `${Devtools.Echo.Automerge}-${node.id}`,
230
- data: Devtools.Echo.Automerge,
231
- type: DEVTOOLS_TYPE,
232
- properties: {
233
- label: ['automerge label', { ns: meta.id }],
234
- icon: 'ph--gear-six--regular',
235
- },
236
- },
237
- {
238
- id: `${Devtools.Echo.Queues}-${node.id}`,
239
- data: Devtools.Echo.Queues,
240
- type: DEVTOOLS_TYPE,
241
- properties: {
242
- label: ['queues label', { ns: meta.id }],
243
- icon: 'ph--queue--regular',
244
- },
245
- },
246
- {
247
- id: `${Devtools.Echo.Members}-${node.id}`,
248
- data: Devtools.Echo.Members,
249
- type: DEVTOOLS_TYPE,
250
- properties: {
251
- label: ['members label', { ns: meta.id }],
252
- icon: 'ph--users--regular',
253
- },
254
- },
255
- {
256
- id: `${Devtools.Echo.Metadata}-${node.id}`,
257
- data: Devtools.Echo.Metadata,
258
- type: DEVTOOLS_TYPE,
259
- properties: {
260
- label: ['metadata label', { ns: meta.id }],
261
- icon: 'ph--hard-drive--regular',
262
- },
263
- },
264
- ],
265
- },
266
- {
267
- id: `${Devtools.Mesh.id}-${node.id}`,
268
- data: null,
269
- type: DEVTOOLS_TYPE,
270
- properties: {
271
- label: ['mesh label', { ns: meta.id }],
272
- icon: 'ph--graph--regular',
273
- },
274
- nodes: [
275
- {
276
- id: `${Devtools.Mesh.Signal}-${node.id}`,
277
- data: Devtools.Mesh.Signal,
278
- type: DEVTOOLS_TYPE,
279
- properties: {
280
- label: ['signal label', { ns: meta.id }],
281
- icon: 'ph--wifi-high--regular',
282
- },
283
- },
284
- {
285
- id: `${Devtools.Mesh.Swarm}-${node.id}`,
286
- data: Devtools.Mesh.Swarm,
287
- type: DEVTOOLS_TYPE,
288
- properties: {
289
- label: ['swarm label', { ns: meta.id }],
290
- icon: 'ph--users-three--regular',
291
- },
292
- },
293
- {
294
- id: `${Devtools.Mesh.Network}-${node.id}`,
295
- data: Devtools.Mesh.Network,
296
- type: DEVTOOLS_TYPE,
297
- properties: {
298
- label: ['network label', { ns: meta.id }],
299
- icon: 'ph--polygon--regular',
300
- },
301
- },
302
- ],
303
- },
304
- // TODO(wittjosiah): Remove?
305
- // {
306
- // id: `${prefix}-${Devtools.Agent.id}`,
307
- // data: null,
308
- // type: DEVTOOLS_TYPE,
309
- // properties: {
310
- // label: ['agent label', { ns: meta.id }],
311
- // icon: 'ph--robot--regular',
312
- // },
313
- // nodes: [
314
- // {
315
- // id: `${prefix}-${Devtools.Agent.Dashboard}`,
316
- // data: Devtools.Agent.Dashboard,
317
- // type: DEVTOOLS_TYPE,
318
- // properties: {
319
- // label: ['dashboard label', { ns: meta.id }],
320
- // icon: 'ph--computer-tower--regular',
321
- // },
322
- // },
323
- // ],
324
- // },
325
- {
326
- id: `${Devtools.Edge.id}-${node.id}`,
327
- data: null,
328
- type: DEVTOOLS_TYPE,
329
- properties: {
330
- label: ['edge label', { ns: meta.id }],
331
- icon: 'ph--cloud--regular',
332
- },
333
- nodes: [
334
- {
335
- id: `${Devtools.Edge.Dashboard}-${node.id}`,
336
- data: Devtools.Edge.Dashboard,
337
- type: DEVTOOLS_TYPE,
338
- properties: {
339
- label: ['dashboard label', { ns: meta.id }],
340
- icon: 'ph--computer-tower--regular',
341
- },
342
- },
343
- {
344
- id: `${Devtools.Edge.Workflows}-${node.id}`,
345
- data: Devtools.Edge.Workflows,
346
- type: DEVTOOLS_TYPE,
347
- properties: {
348
- label: ['workflows label', { ns: meta.id }],
349
- icon: 'ph--function--regular',
350
- },
351
- },
352
- {
353
- id: `${Devtools.Edge.Traces}-${node.id}`,
354
- data: Devtools.Edge.Traces,
355
- type: DEVTOOLS_TYPE,
356
- properties: {
357
- label: ['traces label', { ns: meta.id }],
358
- icon: 'ph--line-segments--regular',
359
- },
360
- },
361
- {
362
- id: `${Devtools.Edge.Testing}-${node.id}`,
363
- data: Devtools.Edge.Testing,
364
- type: DEVTOOLS_TYPE,
365
- properties: {
366
- label: ['testing label', { ns: meta.id }],
367
- icon: 'ph--flask--regular',
368
- },
369
- },
370
- ],
371
- },
372
- ],
373
- },
374
- ];
375
- }),
376
- }),
377
-
378
- // Debug object companion.
379
- GraphBuilder.createExtension({
380
- id: `${meta.id}/debug-object`,
381
- match: NodeMatcher.whenEchoObject,
382
- connector: (object) =>
383
- Effect.succeed([
384
- {
385
- id: [Obj.getDXN(object).toString(), 'debug'].join(ATTENDABLE_PATH_SEPARATOR),
386
- type: PLANK_COMPANION_TYPE,
387
- data: 'debug',
388
- properties: {
389
- label: ['debug label', { ns: meta.id }],
390
- icon: 'ph--bug--regular',
391
- disposition: 'hidden',
392
- position: 'fallback',
393
- },
394
- },
395
- ]),
396
- }),
397
-
398
- // Devtools deck companion.
399
- GraphBuilder.createExtension({
400
- id: `${meta.id}/devtools-overview`,
401
- match: NodeMatcher.whenRoot,
402
- connector: (node) =>
403
- Effect.succeed([
404
- {
405
- id: [node.id, 'devtools'].join(ATTENDABLE_PATH_SEPARATOR),
406
- type: DECK_COMPANION_TYPE,
407
- data: null,
408
- properties: {
409
- label: ['devtools overview label', { ns: meta.id }],
410
- icon: 'ph--equalizer--regular',
411
- disposition: 'hidden',
412
- position: 'fallback',
413
- },
414
- },
415
- ]),
416
- }),
417
- ]);
418
-
419
- return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
420
- }),
421
- );
@@ -1,7 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { Capability } from '@dxos/app-framework';
6
-
7
- export const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));
@@ -1,7 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { Capability } from '@dxos/app-framework';
6
-
7
- export const ReactContext = Capability.lazy('ReactContext', () => import('./react-context'));
@@ -1,7 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { Capability } from '@dxos/app-framework';
6
-
7
- export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
@@ -1,7 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { Capability } from '@dxos/app-framework';
6
-
7
- export const DebugSettings = Capability.lazy('DebugSettings', () => import('./settings'));
@@ -1,15 +0,0 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
-
5
- import React, { type PropsWithChildren, type ReactNode } from 'react';
6
-
7
- // TODO(burdon): Convert to grid.
8
- export const Container = ({ toolbar, children }: PropsWithChildren<{ toolbar: ReactNode }>) => {
9
- return (
10
- <div role='none' className='flex flex-col grow overflow-hidden divide-y divide-separator'>
11
- {toolbar}
12
- <div className='flex flex-col grow overflow-auto'>{children}</div>
13
- </div>
14
- );
15
- };
@@ -1,32 +0,0 @@
1
- //
2
- // Copyright 2024 DXOS.org
3
- //
4
-
5
- import React from 'react';
6
-
7
- import { type Obj } from '@dxos/echo';
8
- import { Clipboard, Input, Layout, Toolbar } from '@dxos/react-ui';
9
- import { Json } from '@dxos/react-ui-syntax-highlighter';
10
-
11
- export type DebugObjectPanelProps = {
12
- object: Obj.Unknown;
13
- };
14
-
15
- // TODO(burdon): Get schema and traverse references.
16
- export const DebugObjectPanel = ({ object }: DebugObjectPanelProps) => {
17
- const dxn = `dxn:echo:@:${object.id}`;
18
-
19
- return (
20
- <Clipboard.Provider>
21
- <Layout.Main toolbar>
22
- <Toolbar.Root>
23
- <Input.Root>
24
- <Input.TextInput disabled value={dxn} />
25
- <Clipboard.IconButton value={dxn} />
26
- </Input.Root>
27
- </Toolbar.Root>
28
- <Json data={object} />
29
- </Layout.Main>
30
- </Clipboard.Provider>
31
- );
32
- };
@@ -1,185 +0,0 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
-
5
- import React, { useEffect, useState } from 'react';
6
-
7
- import { useCapabilities } from '@dxos/app-framework/ui';
8
- import { AppCapabilities } from '@dxos/app-toolkit';
9
- import { type ConfigProto, SaveConfig, Storage, defs } from '@dxos/config';
10
- import { log } from '@dxos/log';
11
- import { useClient } from '@dxos/react-client';
12
- import { Icon, IconButton, Input, Select, Toast, useFileDownload, useTranslation } from '@dxos/react-ui';
13
- import { Settings } from '@dxos/react-ui-form';
14
- import { setDeep } from '@dxos/util';
15
-
16
- import { meta } from '../meta';
17
- import { type DebugSettingsProps } from '../types';
18
-
19
- type Toast = {
20
- title: string;
21
- description?: string;
22
- };
23
-
24
- const StorageAdapters = {
25
- opfs: defs.Runtime.Client.Storage.StorageDriver.WEBFS,
26
- idb: defs.Runtime.Client.Storage.StorageDriver.IDB,
27
- } as const;
28
-
29
- export type DebugSettingsComponentProps = {
30
- settings: DebugSettingsProps;
31
- onSettingsChange: (fn: (current: DebugSettingsProps) => DebugSettingsProps) => void;
32
- };
33
-
34
- export const DebugSettings = ({ settings, onSettingsChange }: DebugSettingsComponentProps) => {
35
- const { t } = useTranslation(meta.id);
36
- const [toast, setToast] = useState<Toast>();
37
- const client = useClient();
38
- const download = useFileDownload();
39
- // TODO(mykola): Get updates from other places that change Config.
40
- const [storageConfig, setStorageConfig] = useState<ConfigProto>({});
41
- const [upload] = useCapabilities(AppCapabilities.FileUploader);
42
-
43
- useEffect(() => {
44
- void Storage().then((config) => setStorageConfig(config));
45
- }, []);
46
-
47
- const handleToast = (toast: Toast) => {
48
- setToast(toast);
49
- const t = setTimeout(() => setToast(undefined), 5_000);
50
- return () => clearTimeout(t);
51
- };
52
-
53
- const handleDownload = async () => {
54
- const data = await client.diagnostics();
55
- const file = new Blob([JSON.stringify(data, undefined, 2)], {
56
- type: 'text/plain',
57
- });
58
- const fileName = `composer-${new Date().toISOString().replace(/\W/g, '-')}.json`;
59
- download(file, fileName);
60
-
61
- if (upload) {
62
- const info = await upload(client.spaces.default.db, new File([file], fileName));
63
- if (!info) {
64
- log.error('diagnostics failed to upload to IPFS');
65
- return;
66
- }
67
- handleToast({
68
- title: t('settings uploaded'),
69
- description: t('settings uploaded to clipboard'),
70
- });
71
-
72
- // TODO(nf): move to IpfsPlugin?
73
- const url = client.config.values.runtime!.services!.ipfs!.gateway + '/' + info.cid;
74
- void navigator.clipboard.writeText(url);
75
- handleToast({
76
- title: t('settings uploaded'),
77
- description: t('settings uploaded to clipboard'),
78
- });
79
- log.info('diagnostics', { url });
80
- }
81
- };
82
-
83
- const handleRepair = async () => {
84
- try {
85
- const info = await client.repair();
86
- setStorageConfig(await Storage());
87
- handleToast({
88
- title: t('settings repair success'),
89
- description: JSON.stringify(info, undefined, 2),
90
- });
91
- } catch (err: any) {
92
- handleToast({
93
- title: t('settings repair failed'),
94
- description: err.message,
95
- });
96
- }
97
- };
98
-
99
- return (
100
- <Settings.Root>
101
- <Settings.Section title={t('settings title', { ns: meta.id })}>
102
- <Settings.Group>
103
- <Settings.ItemInput title={t('settings wireframe')}>
104
- <Input.Switch
105
- checked={settings.wireframe}
106
- onCheckedChange={(checked) => onSettingsChange((s) => ({ ...s, wireframe: !!checked }))}
107
- />
108
- </Settings.ItemInput>
109
- <Settings.ItemInput title={t('settings download diagnostics')}>
110
- <IconButton
111
- icon='ph--download-simple--regular'
112
- iconOnly
113
- label={t('settings download diagnostics')}
114
- onClick={handleDownload}
115
- />
116
- </Settings.ItemInput>
117
- <Settings.ItemInput title={t('settings repair')}>
118
- <IconButton
119
- icon='ph--first-aid-kit--regular'
120
- iconOnly
121
- label={t('settings repair')}
122
- onClick={handleRepair}
123
- />
124
- </Settings.ItemInput>
125
-
126
- {/* TODO(burdon): Move to layout? */}
127
- {toast && (
128
- <Toast.Root>
129
- <Toast.Body>
130
- <Toast.Title>
131
- <Icon icon='ph--gift--duotone' size={5} classNames='inline mr-1' />
132
- <span>{toast.title}</span>
133
- </Toast.Title>
134
- {toast.description && <Toast.Description>{toast.description}</Toast.Description>}
135
- </Toast.Body>
136
- </Toast.Root>
137
- )}
138
-
139
- <Settings.ItemInput title={t('settings choose storage adaptor')}>
140
- <Select.Root
141
- value={
142
- Object.entries(StorageAdapters).find(
143
- ([_name, value]) => value === storageConfig?.runtime?.client?.storage?.dataStore,
144
- )?.[0]
145
- }
146
- onValueChange={(value) => {
147
- if (confirm(t('settings storage adapter changed alert'))) {
148
- updateConfig(
149
- storageConfig,
150
- setStorageConfig,
151
- ['runtime', 'client', 'storage', 'dataStore'],
152
- StorageAdapters[value as keyof typeof StorageAdapters],
153
- );
154
- }
155
- }}
156
- >
157
- <Select.TriggerButton placeholder={t('settings data store label')} />
158
- <Select.Portal>
159
- <Select.Content>
160
- <Select.Viewport>
161
- {Object.keys(StorageAdapters).map((key) => (
162
- <Select.Option key={key} value={key}>
163
- {t(`settings storage adaptor ${key} label`)}
164
- </Select.Option>
165
- ))}
166
- </Select.Viewport>
167
- <Select.Arrow />
168
- </Select.Content>
169
- </Select.Portal>
170
- </Select.Root>
171
- </Settings.ItemInput>
172
- </Settings.Group>
173
- </Settings.Section>
174
- </Settings.Root>
175
- );
176
- };
177
-
178
- const updateConfig = (config: ConfigProto, setConfig: (newConfig: ConfigProto) => void, path: string[], value: any) => {
179
- const storageConfigCopy = JSON.parse(JSON.stringify(config ?? {}));
180
- setDeep(storageConfigCopy, path, value);
181
- setConfig(storageConfigCopy);
182
- queueMicrotask(async () => {
183
- await SaveConfig(storageConfigCopy);
184
- });
185
- };