@dxos/plugin-debug 0.7.5-main.9d2a38b → 0.7.5-main.b19bfc8

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 (80) hide show
  1. package/dist/lib/browser/{DebugSpace-4JHYA7FG.mjs → DebugSpace-BTMTVZ6C.mjs} +2 -2
  2. package/dist/lib/browser/SpaceGenerator-BPZGOSH4.mjs +1238 -0
  3. package/dist/lib/browser/SpaceGenerator-BPZGOSH4.mjs.map +7 -0
  4. package/dist/lib/browser/app-graph-builder-BZFZ6UG6.mjs +533 -0
  5. package/dist/lib/browser/app-graph-builder-BZFZ6UG6.mjs.map +7 -0
  6. package/dist/lib/browser/chunk-EF3UVAVI.mjs +21 -0
  7. package/dist/lib/browser/chunk-EF3UVAVI.mjs.map +7 -0
  8. package/dist/lib/browser/chunk-UASI2CRI.mjs +72 -0
  9. package/dist/lib/browser/chunk-UASI2CRI.mjs.map +7 -0
  10. package/dist/lib/browser/index.mjs +40 -10
  11. package/dist/lib/browser/index.mjs.map +3 -3
  12. package/dist/lib/browser/meta.json +1 -1
  13. package/dist/lib/browser/react-context-TCD3MNIT.mjs +16 -0
  14. package/dist/lib/browser/react-context-TCD3MNIT.mjs.map +7 -0
  15. package/dist/lib/browser/{react-surface-5GNO6NWP.mjs → react-surface-W6QLG4YJ.mjs} +258 -85
  16. package/dist/lib/browser/react-surface-W6QLG4YJ.mjs.map +7 -0
  17. package/dist/lib/browser/{settings-JCZUA643.mjs → settings-INPXR64L.mjs} +6 -7
  18. package/dist/lib/browser/{settings-JCZUA643.mjs.map → settings-INPXR64L.mjs.map} +3 -3
  19. package/dist/types/src/DebugPlugin.d.ts.map +1 -1
  20. package/dist/types/src/capabilities/app-graph-builder.d.ts +110 -110
  21. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  22. package/dist/types/src/capabilities/index.d.ts +116 -116
  23. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  24. package/dist/types/src/capabilities/react-context.d.ts.map +1 -1
  25. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  26. package/dist/types/src/capabilities/settings.d.ts.map +1 -1
  27. package/dist/types/src/components/Container.d.ts +2 -2
  28. package/dist/types/src/components/Container.d.ts.map +1 -1
  29. package/dist/types/src/components/DebugObjectPanel.d.ts +1 -2
  30. package/dist/types/src/components/DebugObjectPanel.d.ts.map +1 -1
  31. package/dist/types/src/components/DebugSettings.d.ts +1 -2
  32. package/dist/types/src/components/DebugSettings.d.ts.map +1 -1
  33. package/dist/types/src/components/DebugSpace/ObjectCreator.d.ts +1 -2
  34. package/dist/types/src/components/DebugSpace/ObjectCreator.d.ts.map +1 -1
  35. package/dist/types/src/components/DebugStatus.d.ts +1 -2
  36. package/dist/types/src/components/DebugStatus.d.ts.map +1 -1
  37. package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts.map +1 -1
  38. package/dist/types/src/components/SpaceGenerator/SchemaTable.d.ts +1 -2
  39. package/dist/types/src/components/SpaceGenerator/SchemaTable.d.ts.map +1 -1
  40. package/dist/types/src/components/SpaceGenerator/SpaceGenerator.d.ts +1 -2
  41. package/dist/types/src/components/SpaceGenerator/SpaceGenerator.d.ts.map +1 -1
  42. package/dist/types/src/components/SpaceGenerator/presets.d.ts +22 -0
  43. package/dist/types/src/components/SpaceGenerator/presets.d.ts.map +1 -0
  44. package/dist/types/src/components/Wireframe.d.ts +1 -2
  45. package/dist/types/src/components/Wireframe.d.ts.map +1 -1
  46. package/dist/types/src/components/index.d.ts +4 -4
  47. package/dist/types/src/components/index.d.ts.map +1 -1
  48. package/dist/types/src/meta.d.ts +1 -0
  49. package/dist/types/src/meta.d.ts.map +1 -1
  50. package/dist/types/src/translations.d.ts +28 -0
  51. package/dist/types/src/translations.d.ts.map +1 -1
  52. package/dist/types/src/types.d.ts +44 -1
  53. package/dist/types/src/types.d.ts.map +1 -1
  54. package/package.json +50 -43
  55. package/src/DebugPlugin.tsx +6 -3
  56. package/src/capabilities/app-graph-builder.ts +297 -89
  57. package/src/capabilities/react-context.tsx +3 -25
  58. package/src/capabilities/react-surface.tsx +202 -33
  59. package/src/capabilities/settings.ts +0 -1
  60. package/src/components/DebugObjectPanel.tsx +17 -5
  61. package/src/components/DebugSettings.tsx +7 -12
  62. package/src/components/DebugStatus.tsx +17 -21
  63. package/src/components/SpaceGenerator/ObjectGenerator.tsx +31 -4
  64. package/src/components/SpaceGenerator/SpaceGenerator.tsx +75 -6
  65. package/src/components/SpaceGenerator/presets.ts +563 -0
  66. package/src/meta.ts +3 -1
  67. package/src/translations.ts +28 -0
  68. package/src/types.ts +52 -1
  69. package/dist/lib/browser/SpaceGenerator-NJCG57CU.mjs +0 -279
  70. package/dist/lib/browser/SpaceGenerator-NJCG57CU.mjs.map +0 -7
  71. package/dist/lib/browser/app-graph-builder-FXELWOFS.mjs +0 -177
  72. package/dist/lib/browser/app-graph-builder-FXELWOFS.mjs.map +0 -7
  73. package/dist/lib/browser/chunk-I3ON45JK.mjs +0 -18
  74. package/dist/lib/browser/chunk-I3ON45JK.mjs.map +0 -7
  75. package/dist/lib/browser/chunk-P7GHHMDB.mjs +0 -21
  76. package/dist/lib/browser/chunk-P7GHHMDB.mjs.map +0 -7
  77. package/dist/lib/browser/react-context-OZU6J7G3.mjs +0 -37
  78. package/dist/lib/browser/react-context-OZU6J7G3.mjs.map +0 -7
  79. package/dist/lib/browser/react-surface-5GNO6NWP.mjs.map +0 -7
  80. /package/dist/lib/browser/{DebugSpace-4JHYA7FG.mjs.map → DebugSpace-BTMTVZ6C.mjs.map} +0 -0
@@ -1,11 +1,15 @@
1
1
  import {
2
2
  DEBUG_PLUGIN
3
- } from "./chunk-I3ON45JK.mjs";
3
+ } from "./chunk-EF3UVAVI.mjs";
4
+ import {
5
+ Devtools
6
+ } from "./chunk-UASI2CRI.mjs";
4
7
 
5
8
  // packages/plugins/plugin-debug/src/capabilities/react-surface.tsx
6
9
  import React5, { useCallback } from "react";
7
- import { Capabilities as Capabilities3, contributes, createIntent, createSurface, useCapability as useCapability2 } from "@dxos/app-framework";
8
- import { Devtools } from "@dxos/devtools";
10
+ import { Capabilities as Capabilities2, contributes, createIntent, createSurface, LayoutAction } from "@dxos/app-framework";
11
+ import { ConfigPanel, CredentialsPanel, DeviceListPanel, DiagnosticsPanel, FeedsPanel, IdentityPanel, KeyringPanel, LoggingPanel, MembersPanel, MetadataPanel, NetworkPanel, ObjectsPanel, SignalPanel, SpaceInfoPanel, SpaceListPanel, StoragePanel, SwarmPanel, TracingPanel, DashboardPanel, EdgeDashboardPanel, SearchPanel, AutomergePanel, WorkflowPanel } from "@dxos/devtools";
12
+ import { SettingsStore } from "@dxos/local-storage";
9
13
  import { Graph } from "@dxos/plugin-graph";
10
14
  import { SpaceAction, CollectionType } from "@dxos/plugin-space/types";
11
15
  import { SpaceState, isSpace, isEchoObject } from "@dxos/react-client/echo";
@@ -15,26 +19,37 @@ import { lazy } from "react";
15
19
 
16
20
  // packages/plugins/plugin-debug/src/components/DebugObjectPanel.tsx
17
21
  import React from "react";
22
+ import { Clipboard, Input } from "@dxos/react-ui";
18
23
  import { SyntaxHighlighter } from "@dxos/react-ui-syntax-highlighter";
19
24
  var DebugObjectPanel = ({ object }) => {
20
- return /* @__PURE__ */ React.createElement("div", {
25
+ const dxn = `dxn:echo:@:${object.id}`;
26
+ return /* @__PURE__ */ React.createElement(Clipboard.Provider, null, /* @__PURE__ */ React.createElement("div", {
21
27
  className: "flex flex-col"
22
- }, /* @__PURE__ */ React.createElement(SyntaxHighlighter, {
28
+ }, /* @__PURE__ */ React.createElement(Input.Root, null, /* @__PURE__ */ React.createElement("div", {
29
+ role: "none",
30
+ className: "flex flex-col gap-1"
31
+ }, /* @__PURE__ */ React.createElement("div", {
32
+ role: "none",
33
+ className: "flex gap-1"
34
+ }, /* @__PURE__ */ React.createElement(Input.TextInput, {
35
+ disabled: true,
36
+ value: dxn
37
+ }), /* @__PURE__ */ React.createElement(Clipboard.IconButton, {
38
+ value: dxn
39
+ })))), /* @__PURE__ */ React.createElement(SyntaxHighlighter, {
23
40
  classNames: "flex text-xs",
24
41
  language: "json"
25
- }, JSON.stringify(object, null, 2)));
42
+ }, JSON.stringify(object, null, 2))));
26
43
  };
27
44
 
28
45
  // packages/plugins/plugin-debug/src/components/DebugSettings.tsx
29
- import { Gift, DownloadSimple, FirstAidKit } from "@phosphor-icons/react";
30
46
  import React2, { useEffect, useState } from "react";
31
47
  import { Capabilities, useCapabilities } from "@dxos/app-framework";
32
48
  import { defs, SaveConfig, Storage } from "@dxos/config";
33
49
  import { log } from "@dxos/log";
34
50
  import { useClient } from "@dxos/react-client";
35
- import { useTranslation, Button, Toast, Input, useFileDownload, Select } from "@dxos/react-ui";
36
- import { DeprecatedFormInput } from "@dxos/react-ui-form";
37
- import { getSize, mx } from "@dxos/react-ui-theme";
51
+ import { useTranslation, Button, Toast, Input as Input2, useFileDownload, Select, Icon } from "@dxos/react-ui";
52
+ import { DeprecatedFormContainer, DeprecatedFormInput } from "@dxos/react-ui-form";
38
53
  import { setDeep } from "@dxos/util";
39
54
  var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-debug/src/components/DebugSettings.tsx";
40
55
  var StorageAdapters = {
@@ -72,7 +87,7 @@ var DebugSettings = ({ settings }) => {
72
87
  if (!info) {
73
88
  log.error("diagnostics failed to upload to IPFS", void 0, {
74
89
  F: __dxlog_file,
75
- L: 58,
90
+ L: 56,
76
91
  S: void 0,
77
92
  C: (f, a) => f(...a)
78
93
  });
@@ -92,7 +107,7 @@ var DebugSettings = ({ settings }) => {
92
107
  url
93
108
  }, {
94
109
  F: __dxlog_file,
95
- L: 67,
110
+ L: 65,
96
111
  S: void 0,
97
112
  C: (f, a) => f(...a)
98
113
  });
@@ -113,36 +128,34 @@ var DebugSettings = ({ settings }) => {
113
128
  });
114
129
  }
115
130
  };
116
- return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(DeprecatedFormInput, {
131
+ return /* @__PURE__ */ React2.createElement(DeprecatedFormContainer, null, /* @__PURE__ */ React2.createElement(DeprecatedFormInput, {
117
132
  label: t("settings show debug panel")
118
- }, /* @__PURE__ */ React2.createElement(Input.Switch, {
133
+ }, /* @__PURE__ */ React2.createElement(Input2.Switch, {
119
134
  checked: settings.debug,
120
135
  onCheckedChange: (checked) => settings.debug = !!checked
121
- })), /* @__PURE__ */ React2.createElement(DeprecatedFormInput, {
122
- label: t("settings show devtools panel")
123
- }, /* @__PURE__ */ React2.createElement(Input.Switch, {
124
- checked: settings.devtools,
125
- onCheckedChange: (checked) => settings.devtools = !!checked
126
136
  })), /* @__PURE__ */ React2.createElement(DeprecatedFormInput, {
127
137
  label: t("settings wireframe")
128
- }, /* @__PURE__ */ React2.createElement(Input.Switch, {
138
+ }, /* @__PURE__ */ React2.createElement(Input2.Switch, {
129
139
  checked: settings.wireframe,
130
140
  onCheckedChange: (checked) => settings.wireframe = !!checked
131
141
  })), /* @__PURE__ */ React2.createElement(DeprecatedFormInput, {
132
142
  label: t("settings download diagnostics")
133
143
  }, /* @__PURE__ */ React2.createElement(Button, {
134
144
  onClick: handleDownload
135
- }, /* @__PURE__ */ React2.createElement(DownloadSimple, {
136
- className: getSize(5)
145
+ }, /* @__PURE__ */ React2.createElement(Icon, {
146
+ icon: "ph--download-simple--regular",
147
+ size: 5
137
148
  }))), /* @__PURE__ */ React2.createElement(DeprecatedFormInput, {
138
149
  label: t("settings repair")
139
150
  }, /* @__PURE__ */ React2.createElement(Button, {
140
151
  onClick: handleRepair
141
- }, /* @__PURE__ */ React2.createElement(FirstAidKit, {
142
- className: getSize(5)
143
- }))), toast && /* @__PURE__ */ React2.createElement(Toast.Root, null, /* @__PURE__ */ React2.createElement(Toast.Body, null, /* @__PURE__ */ React2.createElement(Toast.Title, null, /* @__PURE__ */ React2.createElement(Gift, {
144
- className: mx(getSize(5), "inline mr-1"),
145
- weight: "duotone"
152
+ }, /* @__PURE__ */ React2.createElement(Icon, {
153
+ icon: "ph--first-aid-kit--regular",
154
+ size: 5
155
+ }))), toast && /* @__PURE__ */ React2.createElement(Toast.Root, null, /* @__PURE__ */ React2.createElement(Toast.Body, null, /* @__PURE__ */ React2.createElement(Toast.Title, null, /* @__PURE__ */ React2.createElement(Icon, {
156
+ icon: "ph--gift--duotone",
157
+ size: 5,
158
+ classNames: "inline mr-1"
146
159
  }), /* @__PURE__ */ React2.createElement("span", null, toast.title)), toast.description && /* @__PURE__ */ React2.createElement(Toast.Description, null, toast.description))), /* @__PURE__ */ React2.createElement(DeprecatedFormInput, {
147
160
  label: t("settings choose storage adaptor")
148
161
  }, /* @__PURE__ */ React2.createElement(Select.Root, {
@@ -175,15 +188,14 @@ var updateConfig = (config, setConfig, path, value) => {
175
188
 
176
189
  // packages/plugins/plugin-debug/src/components/DebugStatus.tsx
177
190
  import React3, { useEffect as useEffect2, useRef, useState as useState2 } from "react";
178
- import { Capabilities as Capabilities2, firstIdInPart, useCapability } from "@dxos/app-framework";
191
+ import { useAppGraph, useLayout } from "@dxos/app-framework";
179
192
  import { TimeoutError } from "@dxos/async";
180
193
  import { StatsPanel, useStats } from "@dxos/devtools";
181
194
  import { getActiveSpace } from "@dxos/plugin-space";
182
195
  import { StatusBar } from "@dxos/plugin-status-bar";
183
196
  import { ConnectionState } from "@dxos/protocols/proto/dxos/client/services";
184
197
  import { useNetworkStatus } from "@dxos/react-client/mesh";
185
- import { Icon } from "@dxos/react-ui";
186
- import { mx as mx2 } from "@dxos/react-ui-theme";
198
+ import { Icon as Icon2, Popover } from "@dxos/react-ui";
187
199
  var styles = {
188
200
  success: "text-sky-300 dark:text-green-700",
189
201
  warning: "text-orange-300 dark:text-orange-600",
@@ -215,7 +227,7 @@ var ErrorIndicator = () => {
215
227
  return /* @__PURE__ */ React3.createElement(StatusBar.Button, {
216
228
  title: errorRef.current.message,
217
229
  onClick: handleReset
218
- }, /* @__PURE__ */ React3.createElement(Icon, {
230
+ }, /* @__PURE__ */ React3.createElement(Icon2, {
219
231
  icon: "ph--warning-circle--duotone",
220
232
  size: 4,
221
233
  classNames: styles.error
@@ -223,7 +235,7 @@ var ErrorIndicator = () => {
223
235
  } else {
224
236
  return /* @__PURE__ */ React3.createElement(StatusBar.Item, {
225
237
  title: "No errors."
226
- }, /* @__PURE__ */ React3.createElement(Icon, {
238
+ }, /* @__PURE__ */ React3.createElement(Icon2, {
227
239
  icon: "ph--check--regular",
228
240
  size: 4
229
241
  }));
@@ -240,14 +252,14 @@ var SwarmIndicator = () => {
240
252
  if (state === 0) {
241
253
  return /* @__PURE__ */ React3.createElement(StatusBar.Item, {
242
254
  title: "Connected to swarm."
243
- }, /* @__PURE__ */ React3.createElement(Icon, {
255
+ }, /* @__PURE__ */ React3.createElement(Icon2, {
244
256
  icon: "ph--lightning--regular",
245
257
  size: 4
246
258
  }));
247
259
  } else {
248
260
  return /* @__PURE__ */ React3.createElement(StatusBar.Item, {
249
261
  title: "Disconnected from swarm."
250
- }, /* @__PURE__ */ React3.createElement(Icon, {
262
+ }, /* @__PURE__ */ React3.createElement(Icon2, {
251
263
  icon: "ph--lightning-slash--regular",
252
264
  size: 4,
253
265
  classNames: styles.warning
@@ -256,14 +268,14 @@ var SwarmIndicator = () => {
256
268
  };
257
269
  var SavingIndicator = () => {
258
270
  const [state, _setState] = useState2(0);
259
- const location = useCapability(Capabilities2.Location);
260
- const { graph } = useCapability(Capabilities2.AppGraph);
261
- const _space = location && graph ? getActiveSpace(graph, firstIdInPart(location.active, "main")) : void 0;
271
+ const layout = useLayout();
272
+ const { graph } = useAppGraph();
273
+ const _space = graph ? getActiveSpace(graph, layout.active[0]) : void 0;
262
274
  switch (state) {
263
275
  case 2:
264
276
  return /* @__PURE__ */ React3.createElement(StatusBar.Item, {
265
277
  title: "Edit not saved."
266
- }, /* @__PURE__ */ React3.createElement(Icon, {
278
+ }, /* @__PURE__ */ React3.createElement(Icon2, {
267
279
  icon: "ph--circle--duotone",
268
280
  size: 4,
269
281
  classNames: styles.warning
@@ -271,7 +283,7 @@ var SavingIndicator = () => {
271
283
  case 1:
272
284
  return /* @__PURE__ */ React3.createElement(StatusBar.Item, {
273
285
  title: "Saving..."
274
- }, /* @__PURE__ */ React3.createElement(Icon, {
286
+ }, /* @__PURE__ */ React3.createElement(Icon2, {
275
287
  icon: "ph--circle--duotone",
276
288
  size: 4,
277
289
  classNames: styles.success
@@ -280,7 +292,7 @@ var SavingIndicator = () => {
280
292
  default:
281
293
  return /* @__PURE__ */ React3.createElement(StatusBar.Item, {
282
294
  title: "Modified indicator."
283
- }, /* @__PURE__ */ React3.createElement(Icon, {
295
+ }, /* @__PURE__ */ React3.createElement(Icon2, {
284
296
  icon: "ph--circle--duotone",
285
297
  size: 4
286
298
  }));
@@ -289,18 +301,23 @@ var SavingIndicator = () => {
289
301
  var PerformanceIndicator = () => {
290
302
  const [visible, setVisible] = useState2(false);
291
303
  const [stats, refreshStats] = useStats();
292
- return /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(StatusBar.Button, {
304
+ return /* @__PURE__ */ React3.createElement(Popover.Root, {
305
+ open: visible,
306
+ onOpenChange: setVisible
307
+ }, /* @__PURE__ */ React3.createElement(Popover.Trigger, {
308
+ asChild: true
309
+ }, /* @__PURE__ */ React3.createElement(StatusBar.Button, {
293
310
  onClick: () => setVisible((visible2) => !visible2),
294
311
  title: "Performance panels"
295
- }, /* @__PURE__ */ React3.createElement(Icon, {
312
+ }, /* @__PURE__ */ React3.createElement(Icon2, {
296
313
  icon: "ph--chart-bar--regular",
297
314
  size: 4
298
- })), visible && /* @__PURE__ */ React3.createElement("div", {
299
- className: mx2("z-20 absolute bottom-[--statusbar-size] right-4 w-[450px]", "overflow-x-hidden overflow-y-auto scrollbar-thin", "border-x border-y border-separator")
315
+ }))), /* @__PURE__ */ React3.createElement(Popover.Portal, null, /* @__PURE__ */ React3.createElement(Popover.Content, {
316
+ classNames: "max-is-[min(var(--radix-popover-content-available-width),300px)] max-bs-[--radix-popover-content-available-height]"
300
317
  }, /* @__PURE__ */ React3.createElement(StatsPanel, {
301
318
  stats,
302
319
  onRefresh: refreshStats
303
- })));
320
+ }), /* @__PURE__ */ React3.createElement(Popover.Arrow, null))));
304
321
  };
305
322
  var indicators = [
306
323
  SavingIndicator,
@@ -320,13 +337,13 @@ import { useResizeDetector } from "react-resize-detector";
320
337
  import { fullyQualifiedId } from "@dxos/react-client/echo";
321
338
  import { useAttendableAttributes } from "@dxos/react-ui-attention";
322
339
  import { SyntaxHighlighter as SyntaxHighlighter2 } from "@dxos/react-ui-syntax-highlighter";
323
- import { mx as mx3 } from "@dxos/react-ui-theme";
340
+ import { mx } from "@dxos/react-ui-theme";
324
341
  var Wireframe = ({ classNames, label, object }) => {
325
342
  const attendableAttrs = useAttendableAttributes(fullyQualifiedId(object));
326
343
  const { width, height, ref } = useResizeDetector();
327
344
  return /* @__PURE__ */ React4.createElement("div", {
328
345
  ref,
329
- className: mx3("relative grow min-bs-96", classNames),
346
+ className: mx("relative grow min-bs-96", classNames),
330
347
  ...attendableAttrs
331
348
  }, /* @__PURE__ */ React4.createElement("div", {
332
349
  className: "absolute inset-2 flex flex-col gap-2 overflow-hidden font-mono"
@@ -363,45 +380,20 @@ var Wireframe = ({ classNames, label, object }) => {
363
380
 
364
381
  // packages/plugins/plugin-debug/src/components/index.ts
365
382
  var DebugApp = lazy(() => import("./DebugApp-LQHFFK3Y.mjs"));
366
- var DebugSpace = lazy(() => import("./DebugSpace-4JHYA7FG.mjs"));
367
- var SpaceGenerator = lazy(() => import("./SpaceGenerator-NJCG57CU.mjs"));
383
+ var DebugSpace = lazy(() => import("./DebugSpace-BTMTVZ6C.mjs"));
384
+ var SpaceGenerator = lazy(() => import("./SpaceGenerator-BPZGOSH4.mjs"));
368
385
 
369
386
  // packages/plugins/plugin-debug/src/capabilities/react-surface.tsx
370
- var isSpaceDebug = (data) => data.type === `${DEBUG_PLUGIN}/space` && isSpace(data.space);
371
- var isGraphDebug = (data) => data.graph instanceof Graph;
372
- var react_surface_default = (context) => contributes(Capabilities3.ReactSurface, [
387
+ var isSpaceDebug = (data) => data?.type === `${DEBUG_PLUGIN}/space` && isSpace(data.space);
388
+ var isGraphDebug = (data) => data?.graph instanceof Graph;
389
+ var react_surface_default = (context) => contributes(Capabilities2.ReactSurface, [
373
390
  createSurface({
374
391
  id: `${DEBUG_PLUGIN}/settings`,
375
- role: "settings",
376
- filter: (data) => data.subject === DEBUG_PLUGIN,
377
- component: () => {
378
- const settings = useCapability2(Capabilities3.SettingsStore).getStore(DEBUG_PLUGIN).value;
379
- return /* @__PURE__ */ React5.createElement(DebugSettings, {
380
- settings
381
- });
382
- }
383
- }),
384
- createSurface({
385
- id: `${DEBUG_PLUGIN}/status`,
386
- role: "status",
387
- component: () => /* @__PURE__ */ React5.createElement(DebugStatus, null)
388
- }),
389
- createSurface({
390
- id: `${DEBUG_PLUGIN}/complementary`,
391
- role: "complementary--debug",
392
- filter: (data) => isEchoObject(data.subject),
393
- component: ({ data }) => /* @__PURE__ */ React5.createElement(DebugObjectPanel, {
394
- object: data.subject
395
- })
396
- }),
397
- createSurface({
398
- id: `${DEBUG_PLUGIN}/devtools`,
399
392
  role: "article",
400
- filter: (data) => {
401
- const settings = context.requestCapability(Capabilities3.SettingsStore).getStore(DEBUG_PLUGIN).value;
402
- return data.subject === "devtools" && !!settings.devtools;
403
- },
404
- component: () => /* @__PURE__ */ React5.createElement(Devtools, null)
393
+ filter: (data) => data.subject instanceof SettingsStore && data.subject.prefix === DEBUG_PLUGIN,
394
+ component: ({ data: { subject } }) => /* @__PURE__ */ React5.createElement(DebugSettings, {
395
+ settings: subject.value
396
+ })
405
397
  }),
406
398
  createSurface({
407
399
  id: `${DEBUG_PLUGIN}/space`,
@@ -416,7 +408,7 @@ var react_surface_default = (context) => contributes(Capabilities3.ReactSurface,
416
408
  if (!(collection instanceof CollectionType)) {
417
409
  return;
418
410
  }
419
- const { dispatchPromise: dispatch } = context.requestCapability(Capabilities3.IntentDispatcher);
411
+ const { dispatchPromise: dispatch } = context.requestCapability(Capabilities2.IntentDispatcher);
420
412
  objects.forEach((object) => {
421
413
  void dispatch(createIntent(SpaceAction.AddObject, {
422
414
  target: collection,
@@ -450,9 +442,9 @@ var react_surface_default = (context) => contributes(Capabilities3.ReactSurface,
450
442
  "article",
451
443
  "section"
452
444
  ],
453
- disposition: "hoist",
445
+ position: "hoist",
454
446
  filter: (data) => {
455
- const settings = context.requestCapability(Capabilities3.SettingsStore).getStore(DEBUG_PLUGIN).value;
447
+ const settings = context.requestCapability(Capabilities2.SettingsStore).getStore(DEBUG_PLUGIN).value;
456
448
  return isEchoObject(data.subject) && !!settings.wireframe;
457
449
  },
458
450
  component: ({ data, role }) => /* @__PURE__ */ React5.createElement(Wireframe, {
@@ -460,9 +452,190 @@ var react_surface_default = (context) => contributes(Capabilities3.ReactSurface,
460
452
  object: data.subject,
461
453
  classNames: "row-span-2 overflow-hidden"
462
454
  })
455
+ }),
456
+ createSurface({
457
+ id: `${DEBUG_PLUGIN}/complementary`,
458
+ role: "complementary--debug",
459
+ filter: (data) => isEchoObject(data.subject),
460
+ component: ({ data }) => /* @__PURE__ */ React5.createElement(DebugObjectPanel, {
461
+ object: data.subject
462
+ })
463
+ }),
464
+ createSurface({
465
+ id: `${DEBUG_PLUGIN}/status`,
466
+ role: "status",
467
+ component: () => /* @__PURE__ */ React5.createElement(DebugStatus, null)
468
+ }),
469
+ //
470
+ // Devtools
471
+ //
472
+ createSurface({
473
+ id: `${DEBUG_PLUGIN}/client/config`,
474
+ role: "article",
475
+ filter: (data) => data.subject === Devtools.Client.Config,
476
+ component: () => /* @__PURE__ */ React5.createElement(ConfigPanel, null)
477
+ }),
478
+ createSurface({
479
+ id: `${DEBUG_PLUGIN}/client/storage`,
480
+ role: "article",
481
+ filter: (data) => data.subject === Devtools.Client.Storage,
482
+ component: () => /* @__PURE__ */ React5.createElement(StoragePanel, null)
483
+ }),
484
+ createSurface({
485
+ id: `${DEBUG_PLUGIN}/client/logs`,
486
+ role: "article",
487
+ filter: (data) => data.subject === Devtools.Client.Logs,
488
+ component: () => /* @__PURE__ */ React5.createElement(LoggingPanel, null)
489
+ }),
490
+ createSurface({
491
+ id: `${DEBUG_PLUGIN}/client/diagnostics`,
492
+ role: "article",
493
+ filter: (data) => data.subject === Devtools.Client.Diagnostics,
494
+ component: () => /* @__PURE__ */ React5.createElement(DiagnosticsPanel, null)
495
+ }),
496
+ createSurface({
497
+ id: `${DEBUG_PLUGIN}/client/tracing`,
498
+ role: "article",
499
+ filter: (data) => data.subject === Devtools.Client.Tracing,
500
+ component: () => /* @__PURE__ */ React5.createElement(TracingPanel, null)
501
+ }),
502
+ createSurface({
503
+ id: `${DEBUG_PLUGIN}/halo/identity`,
504
+ role: "article",
505
+ filter: (data) => data.subject === Devtools.Halo.Identity,
506
+ component: () => /* @__PURE__ */ React5.createElement(IdentityPanel, null)
507
+ }),
508
+ createSurface({
509
+ id: `${DEBUG_PLUGIN}/halo/devices`,
510
+ role: "article",
511
+ filter: (data) => data.subject === Devtools.Halo.Devices,
512
+ component: () => /* @__PURE__ */ React5.createElement(DeviceListPanel, null)
513
+ }),
514
+ createSurface({
515
+ id: `${DEBUG_PLUGIN}/halo/keyring`,
516
+ role: "article",
517
+ filter: (data) => data.subject === Devtools.Halo.Keyring,
518
+ component: () => /* @__PURE__ */ React5.createElement(KeyringPanel, null)
519
+ }),
520
+ createSurface({
521
+ id: `${DEBUG_PLUGIN}/halo/credentials`,
522
+ role: "article",
523
+ filter: (data) => data.subject === Devtools.Halo.Credentials,
524
+ component: () => /* @__PURE__ */ React5.createElement(CredentialsPanel, null)
525
+ }),
526
+ createSurface({
527
+ id: `${DEBUG_PLUGIN}/echo/spaces`,
528
+ role: "article",
529
+ filter: (data) => data.subject === Devtools.Echo.Spaces,
530
+ component: () => {
531
+ const { dispatchPromise: dispatch } = context.requestCapability(Capabilities2.IntentDispatcher);
532
+ const handleSelect = useCallback(() => dispatch(createIntent(LayoutAction.Open, {
533
+ part: "main",
534
+ subject: [
535
+ Devtools.Echo.Space
536
+ ]
537
+ })), [
538
+ dispatch
539
+ ]);
540
+ return /* @__PURE__ */ React5.createElement(SpaceListPanel, {
541
+ onSelect: handleSelect
542
+ });
543
+ }
544
+ }),
545
+ createSurface({
546
+ id: `${DEBUG_PLUGIN}/echo/space`,
547
+ role: "article",
548
+ filter: (data) => data.subject === Devtools.Echo.Space,
549
+ component: () => {
550
+ const { dispatchPromise: dispatch } = context.requestCapability(Capabilities2.IntentDispatcher);
551
+ const handleSelect = useCallback(() => dispatch(createIntent(LayoutAction.Open, {
552
+ part: "main",
553
+ subject: [
554
+ Devtools.Echo.Feeds
555
+ ]
556
+ })), [
557
+ dispatch
558
+ ]);
559
+ return /* @__PURE__ */ React5.createElement(SpaceInfoPanel, {
560
+ onSelectFeed: handleSelect,
561
+ onSelectPipeline: handleSelect
562
+ });
563
+ }
564
+ }),
565
+ createSurface({
566
+ id: `${DEBUG_PLUGIN}/echo/feeds`,
567
+ role: "article",
568
+ filter: (data) => data.subject === Devtools.Echo.Feeds,
569
+ component: () => /* @__PURE__ */ React5.createElement(FeedsPanel, null)
570
+ }),
571
+ createSurface({
572
+ id: `${DEBUG_PLUGIN}/echo/objects`,
573
+ role: "article",
574
+ filter: (data) => data.subject === Devtools.Echo.Objects,
575
+ component: () => /* @__PURE__ */ React5.createElement(ObjectsPanel, null)
576
+ }),
577
+ createSurface({
578
+ id: `${DEBUG_PLUGIN}/echo/automerge`,
579
+ role: "article",
580
+ filter: (data) => data.subject === Devtools.Echo.Automerge,
581
+ component: () => /* @__PURE__ */ React5.createElement(AutomergePanel, null)
582
+ }),
583
+ createSurface({
584
+ id: `${DEBUG_PLUGIN}/echo/members`,
585
+ role: "article",
586
+ filter: (data) => data.subject === Devtools.Echo.Members,
587
+ component: () => /* @__PURE__ */ React5.createElement(MembersPanel, null)
588
+ }),
589
+ createSurface({
590
+ id: `${DEBUG_PLUGIN}/echo/metadata`,
591
+ role: "article",
592
+ filter: (data) => data.subject === Devtools.Echo.Metadata,
593
+ component: () => /* @__PURE__ */ React5.createElement(MetadataPanel, null)
594
+ }),
595
+ createSurface({
596
+ id: `${DEBUG_PLUGIN}/mesh/signal`,
597
+ role: "article",
598
+ filter: (data) => data.subject === Devtools.Mesh.Signal,
599
+ component: () => /* @__PURE__ */ React5.createElement(SignalPanel, null)
600
+ }),
601
+ createSurface({
602
+ id: `${DEBUG_PLUGIN}/mesh/swarm`,
603
+ role: "article",
604
+ filter: (data) => data.subject === Devtools.Mesh.Swarm,
605
+ component: () => /* @__PURE__ */ React5.createElement(SwarmPanel, null)
606
+ }),
607
+ createSurface({
608
+ id: `${DEBUG_PLUGIN}/mesh/network`,
609
+ role: "article",
610
+ filter: (data) => data.subject === Devtools.Mesh.Network,
611
+ component: () => /* @__PURE__ */ React5.createElement(NetworkPanel, null)
612
+ }),
613
+ createSurface({
614
+ id: `${DEBUG_PLUGIN}/agent/dashboard`,
615
+ role: "article",
616
+ filter: (data) => data.subject === Devtools.Agent.Dashboard,
617
+ component: () => /* @__PURE__ */ React5.createElement(DashboardPanel, null)
618
+ }),
619
+ createSurface({
620
+ id: `${DEBUG_PLUGIN}/agent/search`,
621
+ role: "article",
622
+ filter: (data) => data.subject === Devtools.Agent.Search,
623
+ component: () => /* @__PURE__ */ React5.createElement(SearchPanel, null)
624
+ }),
625
+ createSurface({
626
+ id: `${DEBUG_PLUGIN}/edge/dashboard`,
627
+ role: "article",
628
+ filter: (data) => data.subject === Devtools.Edge.Dashboard,
629
+ component: () => /* @__PURE__ */ React5.createElement(EdgeDashboardPanel, null)
630
+ }),
631
+ createSurface({
632
+ id: `${DEBUG_PLUGIN}/edge/workflows`,
633
+ role: "article",
634
+ filter: (data) => data.subject === Devtools.Edge.Workflows,
635
+ component: () => /* @__PURE__ */ React5.createElement(WorkflowPanel, null)
463
636
  })
464
637
  ]);
465
638
  export {
466
639
  react_surface_default as default
467
640
  };
468
- //# sourceMappingURL=react-surface-5GNO6NWP.mjs.map
641
+ //# sourceMappingURL=react-surface-W6QLG4YJ.mjs.map