@dxos/plugin-debug 0.8.4-main.2e9d522 → 0.8.4-main.3c1ae3b

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 (94) hide show
  1. package/dist/lib/browser/DebugGraph-EDOH6R2G.mjs +20 -0
  2. package/dist/lib/browser/DebugGraph-EDOH6R2G.mjs.map +7 -0
  3. package/dist/lib/browser/{DevtoolsOverviewContainer-EPD6EWT5.mjs → DevtoolsOverviewContainer-JXVZVPHN.mjs} +2 -2
  4. package/dist/lib/browser/{DevtoolsOverviewContainer-EPD6EWT5.mjs.map → DevtoolsOverviewContainer-JXVZVPHN.mjs.map} +1 -1
  5. package/dist/lib/browser/{SpaceGenerator-AG3XGNMV.mjs → SpaceGenerator-GYCIEMMO.mjs} +274 -99
  6. package/dist/lib/browser/SpaceGenerator-GYCIEMMO.mjs.map +7 -0
  7. package/dist/lib/browser/{app-graph-builder-SQXFD2BL.mjs → app-graph-builder-CRH2HJKT.mjs} +77 -86
  8. package/dist/lib/browser/app-graph-builder-CRH2HJKT.mjs.map +7 -0
  9. package/dist/lib/browser/{chunk-AJA6RYN3.mjs → chunk-SRV2AIGJ.mjs} +2 -2
  10. package/dist/lib/browser/chunk-SRV2AIGJ.mjs.map +7 -0
  11. package/dist/lib/browser/chunk-WZFZ4ESO.mjs +20 -0
  12. package/dist/lib/browser/chunk-WZFZ4ESO.mjs.map +7 -0
  13. package/dist/lib/browser/index.mjs +13 -13
  14. package/dist/lib/browser/index.mjs.map +3 -3
  15. package/dist/lib/browser/meta.json +1 -1
  16. package/dist/lib/browser/{react-context-NVAGLAJD.mjs → react-context-P2YDWEWI.mjs} +6 -6
  17. package/dist/lib/browser/react-context-P2YDWEWI.mjs.map +7 -0
  18. package/dist/lib/browser/{react-surface-3GD2OWCA.mjs → react-surface-RFG63TTF.mjs} +104 -98
  19. package/dist/lib/browser/react-surface-RFG63TTF.mjs.map +7 -0
  20. package/dist/lib/browser/{settings-LSSWLM5I.mjs → settings-SQXR3OAH.mjs} +5 -5
  21. package/dist/lib/browser/{settings-LSSWLM5I.mjs.map → settings-SQXR3OAH.mjs.map} +1 -1
  22. package/dist/types/src/DebugPlugin.d.ts +1 -1
  23. package/dist/types/src/DebugPlugin.d.ts.map +1 -1
  24. package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
  25. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  26. package/dist/types/src/capabilities/index.d.ts +5 -5
  27. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  28. package/dist/types/src/capabilities/react-context.d.ts +2 -2
  29. package/dist/types/src/capabilities/react-surface.d.ts +1 -1
  30. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  31. package/dist/types/src/capabilities/settings.d.ts +1 -1
  32. package/dist/types/src/components/DebugGraph.d.ts +8 -0
  33. package/dist/types/src/components/DebugGraph.d.ts.map +1 -0
  34. package/dist/types/src/components/DebugObjectPanel.d.ts.map +1 -1
  35. package/dist/types/src/components/DebugSettings.d.ts.map +1 -1
  36. package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts +4 -4
  37. package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts.map +1 -1
  38. package/dist/types/src/components/SpaceGenerator/SpaceGenerator.d.ts +1 -1
  39. package/dist/types/src/components/SpaceGenerator/SpaceGenerator.d.ts.map +1 -1
  40. package/dist/types/src/components/SpaceGenerator/SpaceGenerator.stories.d.ts +13 -4
  41. package/dist/types/src/components/SpaceGenerator/SpaceGenerator.stories.d.ts.map +1 -1
  42. package/dist/types/src/components/SpaceGenerator/draw-util.d.ts.map +1 -1
  43. package/dist/types/src/components/SpaceGenerator/presets.d.ts +51 -4
  44. package/dist/types/src/components/SpaceGenerator/presets.d.ts.map +1 -1
  45. package/dist/types/src/components/Wireframe.d.ts +2 -2
  46. package/dist/types/src/components/Wireframe.d.ts.map +1 -1
  47. package/dist/types/src/components/index.d.ts +2 -1
  48. package/dist/types/src/components/index.d.ts.map +1 -1
  49. package/dist/types/src/meta.d.ts +0 -1
  50. package/dist/types/src/meta.d.ts.map +1 -1
  51. package/dist/types/src/translations.d.ts +3 -1
  52. package/dist/types/src/translations.d.ts.map +1 -1
  53. package/dist/types/src/types.d.ts +1 -1
  54. package/dist/types/src/types.d.ts.map +1 -1
  55. package/dist/types/tsconfig.tsbuildinfo +1 -1
  56. package/package.json +68 -64
  57. package/src/DebugPlugin.tsx +6 -7
  58. package/src/capabilities/app-graph-builder.ts +68 -94
  59. package/src/capabilities/react-context.tsx +2 -2
  60. package/src/capabilities/react-surface.tsx +77 -56
  61. package/src/components/DebugGraph.tsx +14 -0
  62. package/src/components/DebugObjectPanel.tsx +2 -4
  63. package/src/components/DebugSettings.tsx +102 -73
  64. package/src/components/DebugStatus.tsx +2 -2
  65. package/src/components/DevtoolsOverviewContainer.tsx +1 -1
  66. package/src/components/SpaceGenerator/ObjectGenerator.tsx +29 -36
  67. package/src/components/SpaceGenerator/SchemaTable.tsx +2 -2
  68. package/src/components/SpaceGenerator/SpaceGenerator.stories.tsx +11 -11
  69. package/src/components/SpaceGenerator/SpaceGenerator.tsx +20 -16
  70. package/src/components/SpaceGenerator/draw-util.ts +5 -5
  71. package/src/components/SpaceGenerator/presets.ts +200 -21
  72. package/src/components/Wireframe.tsx +5 -5
  73. package/src/components/index.ts +1 -1
  74. package/src/meta.ts +6 -5
  75. package/src/translations.ts +3 -1
  76. package/src/types.ts +1 -1
  77. package/dist/lib/browser/DebugApp-ZDL4CPY5.mjs +0 -228
  78. package/dist/lib/browser/DebugApp-ZDL4CPY5.mjs.map +0 -7
  79. package/dist/lib/browser/SpaceGenerator-AG3XGNMV.mjs.map +0 -7
  80. package/dist/lib/browser/app-graph-builder-SQXFD2BL.mjs.map +0 -7
  81. package/dist/lib/browser/chunk-5XPIRNQS.mjs +0 -18
  82. package/dist/lib/browser/chunk-5XPIRNQS.mjs.map +0 -7
  83. package/dist/lib/browser/chunk-AJA6RYN3.mjs.map +0 -7
  84. package/dist/lib/browser/react-context-NVAGLAJD.mjs.map +0 -7
  85. package/dist/lib/browser/react-surface-3GD2OWCA.mjs.map +0 -7
  86. package/dist/types/src/components/DebugApp/DebugApp.d.ts +0 -6
  87. package/dist/types/src/components/DebugApp/DebugApp.d.ts.map +0 -1
  88. package/dist/types/src/components/DebugApp/Tree.d.ts +0 -18
  89. package/dist/types/src/components/DebugApp/Tree.d.ts.map +0 -1
  90. package/dist/types/src/components/DebugApp/index.d.ts +0 -3
  91. package/dist/types/src/components/DebugApp/index.d.ts.map +0 -1
  92. package/src/components/DebugApp/DebugApp.tsx +0 -84
  93. package/src/components/DebugApp/Tree.tsx +0 -103
  94. package/src/components/DebugApp/index.ts +0 -7
@@ -1,16 +1,17 @@
1
1
  import {
2
2
  Devtools
3
- } from "./chunk-AJA6RYN3.mjs";
3
+ } from "./chunk-SRV2AIGJ.mjs";
4
4
  import {
5
- DEBUG_PLUGIN
6
- } from "./chunk-5XPIRNQS.mjs";
5
+ meta
6
+ } from "./chunk-WZFZ4ESO.mjs";
7
7
 
8
8
  // src/capabilities/react-surface.tsx
9
- import { pipe } from "effect";
9
+ import * as Function from "effect/Function";
10
10
  import React5, { useCallback } from "react";
11
- import { Capabilities as Capabilities2, chain, contributes, createIntent, createSurface, LayoutAction, useCapability, useIntentDispatcher } from "@dxos/app-framework";
11
+ import { Capabilities as Capabilities2, LayoutAction, chain, contributes, createIntent, createSurface } from "@dxos/app-framework";
12
+ import { useCapability, useIntentDispatcher } from "@dxos/app-framework/react";
12
13
  import { AutomergePanel, ConfigPanel, CredentialsPanel, DeviceListPanel, DiagnosticsPanel, EdgeDashboardPanel, FeedsPanel, IdentityPanel, InvocationTraceContainer, KeyringPanel, LoggingPanel, MembersPanel, MetadataPanel, NetworkPanel, ObjectsPanel, QueuesPanel, SchemaPanel, SignalPanel, SpaceInfoPanel, SpaceListPanel, StoragePanel, SwarmPanel, TestingPanel, TracingPanel, WorkflowPanel } from "@dxos/devtools";
13
- import { Obj } from "@dxos/echo";
14
+ import { Obj as Obj2 } from "@dxos/echo";
14
15
  import { SettingsStore } from "@dxos/local-storage";
15
16
  import { log as log2 } from "@dxos/log";
16
17
  import { ClientCapabilities } from "@dxos/plugin-client";
@@ -19,7 +20,7 @@ import { ScriptAction } from "@dxos/plugin-script/types";
19
20
  import { SpaceAction } from "@dxos/plugin-space/types";
20
21
  import { SpaceState, isSpace, parseId } from "@dxos/react-client/echo";
21
22
  import { StackItem as StackItem2 } from "@dxos/react-ui-stack";
22
- import { DataType } from "@dxos/schema";
23
+ import { Collection } from "@dxos/schema";
23
24
 
24
25
  // src/components/index.ts
25
26
  import { lazy } from "react";
@@ -29,7 +30,7 @@ import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
29
30
  import React from "react";
30
31
  import { Clipboard, Input, Toolbar } from "@dxos/react-ui";
31
32
  import { StackItem } from "@dxos/react-ui-stack";
32
- import { SyntaxHighlighter } from "@dxos/react-ui-syntax-highlighter";
33
+ import { Json } from "@dxos/react-ui-syntax-highlighter";
33
34
  var DebugObjectPanel = ({ object }) => {
34
35
  var _effect = _useSignals();
35
36
  try {
@@ -41,10 +42,9 @@ var DebugObjectPanel = ({ object }) => {
41
42
  value: dxn
42
43
  }), /* @__PURE__ */ React.createElement(Clipboard.IconButton, {
43
44
  value: dxn
44
- }))), /* @__PURE__ */ React.createElement(SyntaxHighlighter, {
45
- classNames: "flex text-xs",
46
- language: "json"
47
- }, JSON.stringify(object, null, 2))));
45
+ }))), /* @__PURE__ */ React.createElement(Json, {
46
+ data: object
47
+ })));
48
48
  } finally {
49
49
  _effect.f();
50
50
  }
@@ -53,12 +53,13 @@ var DebugObjectPanel = ({ object }) => {
53
53
  // src/components/DebugSettings.tsx
54
54
  import { useSignals as _useSignals2 } from "@preact-signals/safe-react/tracking";
55
55
  import React2, { useEffect, useState } from "react";
56
- import { Capabilities, useCapabilities } from "@dxos/app-framework";
57
- import { defs, SaveConfig, Storage } from "@dxos/config";
56
+ import { Capabilities } from "@dxos/app-framework";
57
+ import { useCapabilities } from "@dxos/app-framework/react";
58
+ import { SaveConfig, Storage, defs } from "@dxos/config";
58
59
  import { log } from "@dxos/log";
59
60
  import { useClient } from "@dxos/react-client";
60
- import { useTranslation, Button, Toast, Input as Input2, useFileDownload, Select, Icon } from "@dxos/react-ui";
61
- import { DeprecatedFormContainer, DeprecatedFormInput } from "@dxos/react-ui-form";
61
+ import { Icon, IconButton, Input as Input2, Select, Toast, useFileDownload, useTranslation } from "@dxos/react-ui";
62
+ import { ControlGroup, ControlItemInput, ControlPage, ControlSection } from "@dxos/react-ui-form";
62
63
  import { setDeep } from "@dxos/util";
63
64
  var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-debug/src/components/DebugSettings.tsx";
64
65
  var StorageAdapters = {
@@ -68,7 +69,7 @@ var StorageAdapters = {
68
69
  var DebugSettings = ({ settings }) => {
69
70
  var _effect = _useSignals2();
70
71
  try {
71
- const { t } = useTranslation(DEBUG_PLUGIN);
72
+ const { t } = useTranslation(meta.id);
72
73
  const [toast, setToast] = useState();
73
74
  const client = useClient();
74
75
  const download = useFileDownload();
@@ -92,13 +93,13 @@ var DebugSettings = ({ settings }) => {
92
93
  const fileName = `composer-${(/* @__PURE__ */ new Date()).toISOString().replace(/\W/g, "-")}.json`;
93
94
  download(file, fileName);
94
95
  if (upload) {
95
- const info = await upload(new File([
96
+ const info = await upload(client.spaces.default, new File([
96
97
  file
97
- ], fileName), client.spaces.default);
98
+ ], fileName));
98
99
  if (!info) {
99
100
  log.error("diagnostics failed to upload to IPFS", void 0, {
100
101
  F: __dxlog_file,
101
- L: 56,
102
+ L: 59,
102
103
  S: void 0,
103
104
  C: (f, a) => f(...a)
104
105
  });
@@ -118,7 +119,7 @@ var DebugSettings = ({ settings }) => {
118
119
  url
119
120
  }, {
120
121
  F: __dxlog_file,
121
- L: 65,
122
+ L: 74,
122
123
  S: void 0,
123
124
  C: (f, a) => f(...a)
124
125
  });
@@ -139,33 +140,37 @@ var DebugSettings = ({ settings }) => {
139
140
  });
140
141
  }
141
142
  };
142
- return /* @__PURE__ */ React2.createElement(DeprecatedFormContainer, null, /* @__PURE__ */ React2.createElement(DeprecatedFormInput, {
143
- label: t("settings wireframe")
143
+ return /* @__PURE__ */ React2.createElement(ControlPage, null, /* @__PURE__ */ React2.createElement(ControlSection, {
144
+ title: t("settings title", {
145
+ ns: meta.id
146
+ })
147
+ }, /* @__PURE__ */ React2.createElement(ControlGroup, null, /* @__PURE__ */ React2.createElement(ControlItemInput, {
148
+ title: t("settings wireframe")
144
149
  }, /* @__PURE__ */ React2.createElement(Input2.Switch, {
145
150
  checked: settings.wireframe,
146
151
  onCheckedChange: (checked) => settings.wireframe = !!checked
147
- })), /* @__PURE__ */ React2.createElement(DeprecatedFormInput, {
148
- label: t("settings download diagnostics")
149
- }, /* @__PURE__ */ React2.createElement(Button, {
150
- onClick: handleDownload
151
- }, /* @__PURE__ */ React2.createElement(Icon, {
152
+ })), /* @__PURE__ */ React2.createElement(ControlItemInput, {
153
+ title: t("settings download diagnostics")
154
+ }, /* @__PURE__ */ React2.createElement(IconButton, {
152
155
  icon: "ph--download-simple--regular",
153
- size: 5
154
- }))), /* @__PURE__ */ React2.createElement(DeprecatedFormInput, {
155
- label: t("settings repair")
156
- }, /* @__PURE__ */ React2.createElement(Button, {
157
- onClick: handleRepair
158
- }, /* @__PURE__ */ React2.createElement(Icon, {
156
+ iconOnly: true,
157
+ label: t("settings download diagnostics"),
158
+ onClick: handleDownload
159
+ })), /* @__PURE__ */ React2.createElement(ControlItemInput, {
160
+ title: t("settings repair")
161
+ }, /* @__PURE__ */ React2.createElement(IconButton, {
159
162
  icon: "ph--first-aid-kit--regular",
160
- size: 5
161
- }))), toast && /* @__PURE__ */ React2.createElement(Toast.Root, null, /* @__PURE__ */ React2.createElement(Toast.Body, null, /* @__PURE__ */ React2.createElement(Toast.Title, null, /* @__PURE__ */ React2.createElement(Icon, {
163
+ iconOnly: true,
164
+ label: t("settings repair"),
165
+ onClick: handleRepair
166
+ })), toast && /* @__PURE__ */ React2.createElement(Toast.Root, null, /* @__PURE__ */ React2.createElement(Toast.Body, null, /* @__PURE__ */ React2.createElement(Toast.Title, null, /* @__PURE__ */ React2.createElement(Icon, {
162
167
  icon: "ph--gift--duotone",
163
168
  size: 5,
164
169
  classNames: "inline mr-1"
165
- }), /* @__PURE__ */ React2.createElement("span", null, toast.title)), toast.description && /* @__PURE__ */ React2.createElement(Toast.Description, null, toast.description))), /* @__PURE__ */ React2.createElement(DeprecatedFormInput, {
166
- label: t("settings choose storage adaptor")
170
+ }), /* @__PURE__ */ React2.createElement("span", null, toast.title)), toast.description && /* @__PURE__ */ React2.createElement(Toast.Description, null, toast.description))), /* @__PURE__ */ React2.createElement(ControlItemInput, {
171
+ title: t("settings choose storage adaptor")
167
172
  }, /* @__PURE__ */ React2.createElement(Select.Root, {
168
- value: Object.entries(StorageAdapters).find(([name2, value]) => value === storageConfig?.runtime?.client?.storage?.dataStore)?.[0],
173
+ value: Object.entries(StorageAdapters).find(([_name, value]) => value === storageConfig?.runtime?.client?.storage?.dataStore)?.[0],
169
174
  onValueChange: (value) => {
170
175
  if (confirm(t("settings storage adapter changed alert"))) {
171
176
  updateConfig(storageConfig, setStorageConfig, [
@@ -181,7 +186,7 @@ var DebugSettings = ({ settings }) => {
181
186
  }), /* @__PURE__ */ React2.createElement(Select.Portal, null, /* @__PURE__ */ React2.createElement(Select.Content, null, /* @__PURE__ */ React2.createElement(Select.Viewport, null, Object.keys(StorageAdapters).map((key) => /* @__PURE__ */ React2.createElement(Select.Option, {
182
187
  key,
183
188
  value: key
184
- }, t(`settings storage adaptor ${key} label`)))))))));
189
+ }, t(`settings storage adaptor ${key} label`)))), /* @__PURE__ */ React2.createElement(Select.Arrow, null))))))));
185
190
  } finally {
186
191
  _effect.f();
187
192
  }
@@ -213,7 +218,7 @@ var ErrorIndicator = () => {
213
218
  var _effect = _useSignals3();
214
219
  try {
215
220
  const [, forceUpdate] = useState2({});
216
- const errorRef = useRef();
221
+ const errorRef = useRef(null);
217
222
  useEffect2(() => {
218
223
  const errorListener = (event) => {
219
224
  const error = event.error ?? event.reason;
@@ -230,7 +235,7 @@ var ErrorIndicator = () => {
230
235
  };
231
236
  }, []);
232
237
  const handleReset = () => {
233
- errorRef.current = void 0;
238
+ errorRef.current = null;
234
239
  forceUpdate({});
235
240
  };
236
241
  if (errorRef.current) {
@@ -339,14 +344,14 @@ var DebugStatus = () => {
339
344
  import { useSignals as _useSignals4 } from "@preact-signals/safe-react/tracking";
340
345
  import React4 from "react";
341
346
  import { useResizeDetector } from "react-resize-detector";
342
- import { fullyQualifiedId } from "@dxos/react-client/echo";
347
+ import { Obj } from "@dxos/echo";
343
348
  import { useAttentionAttributes } from "@dxos/react-ui-attention";
344
- import { SyntaxHighlighter as SyntaxHighlighter2 } from "@dxos/react-ui-syntax-highlighter";
349
+ import { SyntaxHighlighter } from "@dxos/react-ui-syntax-highlighter";
345
350
  import { mx } from "@dxos/react-ui-theme";
346
351
  var Wireframe = ({ classNames, label, object }) => {
347
352
  var _effect = _useSignals4();
348
353
  try {
349
- const attentionAttrs = useAttentionAttributes(fullyQualifiedId(object));
354
+ const attentionAttrs = useAttentionAttributes(Obj.getDXN(object).toString());
350
355
  const { width, height, ref } = useResizeDetector();
351
356
  return /* @__PURE__ */ React4.createElement("div", {
352
357
  ref,
@@ -356,9 +361,9 @@ var Wireframe = ({ classNames, label, object }) => {
356
361
  className: "absolute inset-2 flex flex-col gap-2 overflow-hidden font-mono"
357
362
  }, /* @__PURE__ */ React4.createElement("div", {
358
363
  className: "flex justify-between"
359
- }, /* @__PURE__ */ React4.createElement("div", null, label), /* @__PURE__ */ React4.createElement("div", null, `[${width}x${height}]`)), object && /* @__PURE__ */ React4.createElement(SyntaxHighlighter2, {
364
+ }, /* @__PURE__ */ React4.createElement("div", null, label), /* @__PURE__ */ React4.createElement("div", null, `[${width}x${height}]`)), object && /* @__PURE__ */ React4.createElement(SyntaxHighlighter, {
360
365
  language: "json",
361
- classNames: "flex w-full text-xs opacity-75 rounded"
366
+ classNames: "text-xs opacity-75 rounded"
362
367
  }, JSON.stringify(object, void 0, 2))), /* @__PURE__ */ React4.createElement("svg", {
363
368
  width,
364
369
  height,
@@ -389,14 +394,14 @@ var Wireframe = ({ classNames, label, object }) => {
389
394
  };
390
395
 
391
396
  // src/components/index.ts
392
- var DebugApp = lazy(() => import("./DebugApp-ZDL4CPY5.mjs"));
393
- var DevtoolsOverviewContainer = lazy(() => import("./DevtoolsOverviewContainer-EPD6EWT5.mjs"));
394
- var SpaceGenerator = lazy(() => import("./SpaceGenerator-AG3XGNMV.mjs"));
397
+ var DebugGraph = lazy(() => import("./DebugGraph-EDOH6R2G.mjs"));
398
+ var DevtoolsOverviewContainer = lazy(() => import("./DevtoolsOverviewContainer-JXVZVPHN.mjs"));
399
+ var SpaceGenerator = lazy(() => import("./SpaceGenerator-GYCIEMMO.mjs"));
395
400
 
396
401
  // src/capabilities/react-surface.tsx
397
402
  var __dxlog_file2 = "/__w/dxos/dxos/packages/plugins/plugin-debug/src/capabilities/react-surface.tsx";
398
- var isSpaceDebug = (data) => data?.type === `${DEBUG_PLUGIN}/space` && isSpace(data.space);
399
- var isGraphDebug = (data) => data?.graph instanceof Graph;
403
+ var isSpaceDebug = (data) => data?.type === `${meta.id}/space` && isSpace(data.space);
404
+ var isGraphDebug = (data) => data?.graph instanceof Graph && typeof data?.root === "string";
400
405
  var useCurrentSpace = () => {
401
406
  const layout = useCapability(Capabilities2.Layout);
402
407
  const client = useCapability(ClientCapabilities.Client);
@@ -404,17 +409,17 @@ var useCurrentSpace = () => {
404
409
  const space = spaceId ? client.spaces.get(spaceId) : void 0;
405
410
  return space;
406
411
  };
407
- var react_surface_default = (context) => contributes(Capabilities2.ReactSurface, [
412
+ var react_surface_default = ((context) => contributes(Capabilities2.ReactSurface, [
408
413
  createSurface({
409
- id: `${DEBUG_PLUGIN}/plugin-settings`,
414
+ id: `${meta.id}/plugin-settings`,
410
415
  role: "article",
411
- filter: (data) => data.subject instanceof SettingsStore && data.subject.prefix === DEBUG_PLUGIN,
416
+ filter: (data) => data.subject instanceof SettingsStore && data.subject.prefix === meta.id,
412
417
  component: ({ data: { subject } }) => /* @__PURE__ */ React5.createElement(DebugSettings, {
413
418
  settings: subject.value
414
419
  })
415
420
  }),
416
421
  createSurface({
417
- id: `${DEBUG_PLUGIN}/space`,
422
+ id: `${meta.id}/space`,
418
423
  role: "article",
419
424
  filter: (data) => isSpaceDebug(data.subject),
420
425
  component: ({ data }) => {
@@ -423,8 +428,8 @@ var react_surface_default = (context) => contributes(Capabilities2.ReactSurface,
423
428
  if (!isSpace(data.subject.space)) {
424
429
  return;
425
430
  }
426
- const collection = data.subject.space.state.get() === SpaceState.SPACE_READY && data.subject.space.properties[DataType.Collection.typename]?.target;
427
- if (!Obj.instanceOf(DataType.Collection, collection)) {
431
+ const collection = data.subject.space.state.get() === SpaceState.SPACE_READY && data.subject.space.properties[Collection.Collection.typename]?.target;
432
+ if (!Obj2.instanceOf(Collection.Collection, collection)) {
428
433
  return;
429
434
  }
430
435
  objects.forEach((object) => {
@@ -443,23 +448,24 @@ var react_surface_default = (context) => contributes(Capabilities2.ReactSurface,
443
448
  }
444
449
  }),
445
450
  createSurface({
446
- id: `${DEBUG_PLUGIN}/graph`,
451
+ id: `${meta.id}/app-graph`,
447
452
  role: "article",
448
453
  filter: (data) => isGraphDebug(data.subject),
449
- component: ({ data }) => /* @__PURE__ */ React5.createElement(DebugApp, {
450
- graph: data.subject.graph
454
+ component: ({ data }) => /* @__PURE__ */ React5.createElement(DebugGraph, {
455
+ graph: data.subject.graph,
456
+ root: data.subject.root
451
457
  })
452
458
  }),
453
459
  createSurface({
454
- id: `${DEBUG_PLUGIN}/wireframe`,
460
+ id: `${meta.id}/wireframe`,
455
461
  role: [
456
462
  "article",
457
463
  "section"
458
464
  ],
459
465
  position: "hoist",
460
466
  filter: (data) => {
461
- const settings = context.getCapability(Capabilities2.SettingsStore).getStore(DEBUG_PLUGIN).value;
462
- return Obj.isObject(data.subject) && !!settings.wireframe;
467
+ const settings = context.getCapability(Capabilities2.SettingsStore).getStore(meta.id).value;
468
+ return Obj2.isObject(data.subject) && !!settings.wireframe;
463
469
  },
464
470
  component: ({ data, role }) => /* @__PURE__ */ React5.createElement(Wireframe, {
465
471
  label: `${role}:${name}`,
@@ -468,20 +474,20 @@ var react_surface_default = (context) => contributes(Capabilities2.ReactSurface,
468
474
  })
469
475
  }),
470
476
  createSurface({
471
- id: `${DEBUG_PLUGIN}/object-debug`,
477
+ id: `${meta.id}/object-debug`,
472
478
  role: "article",
473
- filter: (data) => data.subject === "debug" && Obj.isObject(data.companionTo),
479
+ filter: (data) => data.subject === "debug" && Obj2.isObject(data.companionTo),
474
480
  component: ({ data }) => /* @__PURE__ */ React5.createElement(DebugObjectPanel, {
475
481
  object: data.companionTo
476
482
  })
477
483
  }),
478
484
  createSurface({
479
- id: `${DEBUG_PLUGIN}/devtools-overview`,
485
+ id: `${meta.id}/devtools-overview`,
480
486
  role: "deck-companion--devtools",
481
487
  component: () => /* @__PURE__ */ React5.createElement(DevtoolsOverviewContainer, null)
482
488
  }),
483
489
  createSurface({
484
- id: `${DEBUG_PLUGIN}/status`,
490
+ id: `${meta.id}/status`,
485
491
  role: "status",
486
492
  component: () => /* @__PURE__ */ React5.createElement(DebugStatus, null)
487
493
  }),
@@ -489,7 +495,7 @@ var react_surface_default = (context) => contributes(Capabilities2.ReactSurface,
489
495
  // Devtools
490
496
  //
491
497
  createSurface({
492
- id: `${DEBUG_PLUGIN}/client/config`,
498
+ id: `${meta.id}/client/config`,
493
499
  role: "article",
494
500
  filter: (data) => data.subject === Devtools.Client.Config,
495
501
  component: () => /* @__PURE__ */ React5.createElement(ConfigPanel, {
@@ -497,49 +503,49 @@ var react_surface_default = (context) => contributes(Capabilities2.ReactSurface,
497
503
  })
498
504
  }),
499
505
  createSurface({
500
- id: `${DEBUG_PLUGIN}/client/storage`,
506
+ id: `${meta.id}/client/storage`,
501
507
  role: "article",
502
508
  filter: (data) => data.subject === Devtools.Client.Storage,
503
509
  component: () => /* @__PURE__ */ React5.createElement(StoragePanel, null)
504
510
  }),
505
511
  createSurface({
506
- id: `${DEBUG_PLUGIN}/client/logs`,
512
+ id: `${meta.id}/client/logs`,
507
513
  role: "article",
508
514
  filter: (data) => data.subject === Devtools.Client.Logs,
509
515
  component: () => /* @__PURE__ */ React5.createElement(LoggingPanel, null)
510
516
  }),
511
517
  createSurface({
512
- id: `${DEBUG_PLUGIN}/client/diagnostics`,
518
+ id: `${meta.id}/client/diagnostics`,
513
519
  role: "article",
514
520
  filter: (data) => data.subject === Devtools.Client.Diagnostics,
515
521
  component: () => /* @__PURE__ */ React5.createElement(DiagnosticsPanel, null)
516
522
  }),
517
523
  createSurface({
518
- id: `${DEBUG_PLUGIN}/client/tracing`,
524
+ id: `${meta.id}/client/tracing`,
519
525
  role: "article",
520
526
  filter: (data) => data.subject === Devtools.Client.Tracing,
521
527
  component: () => /* @__PURE__ */ React5.createElement(TracingPanel, null)
522
528
  }),
523
529
  createSurface({
524
- id: `${DEBUG_PLUGIN}/halo/identity`,
530
+ id: `${meta.id}/halo/identity`,
525
531
  role: "article",
526
532
  filter: (data) => data.subject === Devtools.Halo.Identity,
527
533
  component: () => /* @__PURE__ */ React5.createElement(IdentityPanel, null)
528
534
  }),
529
535
  createSurface({
530
- id: `${DEBUG_PLUGIN}/halo/devices`,
536
+ id: `${meta.id}/halo/devices`,
531
537
  role: "article",
532
538
  filter: (data) => data.subject === Devtools.Halo.Devices,
533
539
  component: () => /* @__PURE__ */ React5.createElement(DeviceListPanel, null)
534
540
  }),
535
541
  createSurface({
536
- id: `${DEBUG_PLUGIN}/halo/keyring`,
542
+ id: `${meta.id}/halo/keyring`,
537
543
  role: "article",
538
544
  filter: (data) => data.subject === Devtools.Halo.Keyring,
539
545
  component: () => /* @__PURE__ */ React5.createElement(KeyringPanel, null)
540
546
  }),
541
547
  createSurface({
542
- id: `${DEBUG_PLUGIN}/halo/credentials`,
548
+ id: `${meta.id}/halo/credentials`,
543
549
  role: "article",
544
550
  filter: (data) => data.subject === Devtools.Halo.Credentials,
545
551
  component: () => {
@@ -550,7 +556,7 @@ var react_surface_default = (context) => contributes(Capabilities2.ReactSurface,
550
556
  }
551
557
  }),
552
558
  createSurface({
553
- id: `${DEBUG_PLUGIN}/echo/spaces`,
559
+ id: `${meta.id}/echo/spaces`,
554
560
  role: "article",
555
561
  filter: (data) => data.subject === Devtools.Echo.Spaces,
556
562
  component: () => {
@@ -569,7 +575,7 @@ var react_surface_default = (context) => contributes(Capabilities2.ReactSurface,
569
575
  }
570
576
  }),
571
577
  createSurface({
572
- id: `${DEBUG_PLUGIN}/echo/space`,
578
+ id: `${meta.id}/echo/space`,
573
579
  role: "article",
574
580
  filter: (data) => data.subject === Devtools.Echo.Space,
575
581
  component: () => {
@@ -591,7 +597,7 @@ var react_surface_default = (context) => contributes(Capabilities2.ReactSurface,
591
597
  }
592
598
  }),
593
599
  createSurface({
594
- id: `${DEBUG_PLUGIN}/echo/feeds`,
600
+ id: `${meta.id}/echo/feeds`,
595
601
  role: "article",
596
602
  filter: (data) => data.subject === Devtools.Echo.Feeds,
597
603
  component: () => {
@@ -602,7 +608,7 @@ var react_surface_default = (context) => contributes(Capabilities2.ReactSurface,
602
608
  }
603
609
  }),
604
610
  createSurface({
605
- id: `${DEBUG_PLUGIN}/echo/objects`,
611
+ id: `${meta.id}/echo/objects`,
606
612
  role: "article",
607
613
  filter: (data) => data.subject === Devtools.Echo.Objects,
608
614
  component: () => {
@@ -613,7 +619,7 @@ var react_surface_default = (context) => contributes(Capabilities2.ReactSurface,
613
619
  }
614
620
  }),
615
621
  createSurface({
616
- id: `${DEBUG_PLUGIN}/echo/schema`,
622
+ id: `${meta.id}/echo/schema`,
617
623
  role: "article",
618
624
  filter: (data) => data.subject === Devtools.Echo.Schema,
619
625
  component: () => {
@@ -624,7 +630,7 @@ var react_surface_default = (context) => contributes(Capabilities2.ReactSurface,
624
630
  }
625
631
  }),
626
632
  createSurface({
627
- id: `${DEBUG_PLUGIN}/echo/automerge`,
633
+ id: `${meta.id}/echo/automerge`,
628
634
  role: "article",
629
635
  filter: (data) => data.subject === Devtools.Echo.Automerge,
630
636
  component: () => {
@@ -635,13 +641,13 @@ var react_surface_default = (context) => contributes(Capabilities2.ReactSurface,
635
641
  }
636
642
  }),
637
643
  createSurface({
638
- id: `${DEBUG_PLUGIN}/echo/queues`,
644
+ id: `${meta.id}/echo/queues`,
639
645
  role: "article",
640
646
  filter: (data) => data.subject === Devtools.Echo.Queues,
641
647
  component: () => /* @__PURE__ */ React5.createElement(QueuesPanel, null)
642
648
  }),
643
649
  createSurface({
644
- id: `${DEBUG_PLUGIN}/echo/members`,
650
+ id: `${meta.id}/echo/members`,
645
651
  role: "article",
646
652
  filter: (data) => data.subject === Devtools.Echo.Members,
647
653
  component: () => {
@@ -652,25 +658,25 @@ var react_surface_default = (context) => contributes(Capabilities2.ReactSurface,
652
658
  }
653
659
  }),
654
660
  createSurface({
655
- id: `${DEBUG_PLUGIN}/echo/metadata`,
661
+ id: `${meta.id}/echo/metadata`,
656
662
  role: "article",
657
663
  filter: (data) => data.subject === Devtools.Echo.Metadata,
658
664
  component: () => /* @__PURE__ */ React5.createElement(MetadataPanel, null)
659
665
  }),
660
666
  createSurface({
661
- id: `${DEBUG_PLUGIN}/mesh/signal`,
667
+ id: `${meta.id}/mesh/signal`,
662
668
  role: "article",
663
669
  filter: (data) => data.subject === Devtools.Mesh.Signal,
664
670
  component: () => /* @__PURE__ */ React5.createElement(SignalPanel, null)
665
671
  }),
666
672
  createSurface({
667
- id: `${DEBUG_PLUGIN}/mesh/swarm`,
673
+ id: `${meta.id}/mesh/swarm`,
668
674
  role: "article",
669
675
  filter: (data) => data.subject === Devtools.Mesh.Swarm,
670
676
  component: () => /* @__PURE__ */ React5.createElement(SwarmPanel, null)
671
677
  }),
672
678
  createSurface({
673
- id: `${DEBUG_PLUGIN}/mesh/network`,
679
+ id: `${meta.id}/mesh/network`,
674
680
  role: "article",
675
681
  filter: (data) => data.subject === Devtools.Mesh.Network,
676
682
  component: () => {
@@ -682,19 +688,19 @@ var react_surface_default = (context) => contributes(Capabilities2.ReactSurface,
682
688
  }),
683
689
  // TODO(wittjosiah): Remove?
684
690
  // createSurface({
685
- // id: `${DEBUG_PLUGIN}/agent/dashboard`,
691
+ // id: `${meta.id}/agent/dashboard`,
686
692
  // role: 'article',
687
693
  // filter: (data): data is any => data.subject === Devtools.Agent.Dashboard,
688
694
  // component: () => <DashboardPanel />,
689
695
  // }),
690
696
  createSurface({
691
- id: `${DEBUG_PLUGIN}/edge/dashboard`,
697
+ id: `${meta.id}/edge/dashboard`,
692
698
  role: "article",
693
699
  filter: (data) => data.subject === Devtools.Edge.Dashboard,
694
700
  component: () => /* @__PURE__ */ React5.createElement(EdgeDashboardPanel, null)
695
701
  }),
696
702
  createSurface({
697
- id: `${DEBUG_PLUGIN}/edge/workflows`,
703
+ id: `${meta.id}/edge/workflows`,
698
704
  role: "article",
699
705
  filter: (data) => data.subject === Devtools.Edge.Workflows,
700
706
  component: () => {
@@ -705,7 +711,7 @@ var react_surface_default = (context) => contributes(Capabilities2.ReactSurface,
705
711
  }
706
712
  }),
707
713
  createSurface({
708
- id: `${DEBUG_PLUGIN}/edge/traces`,
714
+ id: `${meta.id}/edge/traces`,
709
715
  role: "article",
710
716
  filter: (data) => data.subject === Devtools.Edge.Traces,
711
717
  component: () => {
@@ -717,7 +723,7 @@ var react_surface_default = (context) => contributes(Capabilities2.ReactSurface,
717
723
  }
718
724
  }),
719
725
  createSurface({
720
- id: `${DEBUG_PLUGIN}/edge/testing`,
726
+ id: `${meta.id}/edge/testing`,
721
727
  role: "article",
722
728
  filter: (data) => data.subject === Devtools.Edge.Testing,
723
729
  component: () => {
@@ -733,7 +739,7 @@ var react_surface_default = (context) => contributes(Capabilities2.ReactSurface,
733
739
  ]);
734
740
  const onScriptPluginOpen = useCallback(async (space) => {
735
741
  await space.waitUntilReady();
736
- const result = await dispatch(pipe(createIntent(ScriptAction.Create, {
742
+ const result = await dispatch(Function.pipe(createIntent(ScriptAction.CreateScript, {
737
743
  space
738
744
  }), chain(SpaceAction.AddObject, {
739
745
  target: space
@@ -742,7 +748,7 @@ var react_surface_default = (context) => contributes(Capabilities2.ReactSurface,
742
748
  result
743
749
  }, {
744
750
  F: __dxlog_file2,
745
- L: 387,
751
+ L: 405,
746
752
  S: void 0,
747
753
  C: (f, a) => f(...a)
748
754
  });
@@ -761,8 +767,8 @@ var react_surface_default = (context) => contributes(Capabilities2.ReactSurface,
761
767
  });
762
768
  }
763
769
  })
764
- ]);
770
+ ]));
765
771
  export {
766
772
  react_surface_default as default
767
773
  };
768
- //# sourceMappingURL=react-surface-3GD2OWCA.mjs.map
774
+ //# sourceMappingURL=react-surface-RFG63TTF.mjs.map