@dxos/plugin-debug 0.6.13 → 0.6.14-main.7bd9c89

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 (62) hide show
  1. package/dist/lib/browser/{DebugGlobal-H56M2VL4.mjs → DebugGlobal-ZTCBF3XR.mjs} +5 -5
  2. package/dist/lib/browser/{DebugSpace-NHPMLATA.mjs → DebugSpace-FKZHQ75S.mjs} +16 -41
  3. package/dist/lib/browser/DebugSpace-FKZHQ75S.mjs.map +7 -0
  4. package/dist/lib/browser/chunk-2HTS7SNO.mjs +17 -0
  5. package/dist/lib/browser/chunk-2HTS7SNO.mjs.map +7 -0
  6. package/dist/lib/browser/{chunk-RYK3J66D.mjs → chunk-6Y463JSP.mjs} +3 -3
  7. package/dist/lib/browser/{chunk-ED5L5YYI.mjs → chunk-H3BJHVRD.mjs} +5 -8
  8. package/dist/lib/browser/chunk-H3BJHVRD.mjs.map +7 -0
  9. package/dist/lib/browser/index.mjs +133 -106
  10. package/dist/lib/browser/index.mjs.map +4 -4
  11. package/dist/lib/browser/meta.json +1 -1
  12. package/dist/lib/browser/meta.mjs +1 -1
  13. package/dist/types/src/DebugPlugin.d.ts.map +1 -1
  14. package/dist/types/src/components/DebugObjectPanel.d.ts +7 -0
  15. package/dist/types/src/components/DebugObjectPanel.d.ts.map +1 -0
  16. package/dist/types/src/components/DebugPanel.d.ts +3 -3
  17. package/dist/types/src/components/DebugPanel.d.ts.map +1 -1
  18. package/dist/types/src/components/DebugSpace.stories.d.ts +3 -13
  19. package/dist/types/src/components/DebugSpace.stories.d.ts.map +1 -1
  20. package/dist/types/src/components/DebugStatus.d.ts.map +1 -1
  21. package/dist/types/src/components/ObjectCreator.d.ts +5 -5
  22. package/dist/types/src/components/ObjectCreator.d.ts.map +1 -1
  23. package/dist/types/src/components/ObjectCreator.stories.d.ts +3 -14
  24. package/dist/types/src/components/ObjectCreator.stories.d.ts.map +1 -1
  25. package/dist/types/src/components/SurfaceDebug.d.ts +9 -0
  26. package/dist/types/src/components/SurfaceDebug.d.ts.map +1 -0
  27. package/dist/types/src/components/Wireframe.d.ts +5 -4
  28. package/dist/types/src/components/Wireframe.d.ts.map +1 -1
  29. package/dist/types/src/components/index.d.ts +3 -4
  30. package/dist/types/src/components/index.d.ts.map +1 -1
  31. package/dist/types/src/meta.d.ts +4 -9
  32. package/dist/types/src/meta.d.ts.map +1 -1
  33. package/dist/types/src/scaffolding/generator.d.ts +1 -2
  34. package/dist/types/src/scaffolding/generator.d.ts.map +1 -1
  35. package/package.json +40 -43
  36. package/src/DebugPlugin.tsx +21 -15
  37. package/src/components/DebugObjectPanel.tsx +22 -0
  38. package/src/components/DebugPanel.tsx +4 -9
  39. package/src/components/DebugSpace.stories.tsx +6 -3
  40. package/src/components/DebugStatus.tsx +20 -13
  41. package/src/components/ObjectCreator.stories.tsx +13 -10
  42. package/src/components/ObjectCreator.tsx +12 -21
  43. package/src/components/SurfaceDebug.tsx +55 -0
  44. package/src/components/Wireframe.tsx +20 -11
  45. package/src/components/index.ts +4 -5
  46. package/src/meta.ts +15 -0
  47. package/src/scaffolding/generator.ts +4 -15
  48. package/dist/lib/browser/DebugSpace-NHPMLATA.mjs.map +0 -7
  49. package/dist/lib/browser/DevtoolsMain-RWT3FLJ6.mjs +0 -15
  50. package/dist/lib/browser/DevtoolsMain-RWT3FLJ6.mjs.map +0 -7
  51. package/dist/lib/browser/chunk-ED5L5YYI.mjs.map +0 -7
  52. package/dist/lib/browser/chunk-WEGYHXMB.mjs +0 -21
  53. package/dist/lib/browser/chunk-WEGYHXMB.mjs.map +0 -7
  54. package/dist/types/src/components/DevtoolsMain.d.ts +0 -4
  55. package/dist/types/src/components/DevtoolsMain.d.ts.map +0 -1
  56. package/dist/types/src/types.test.d.ts +0 -2
  57. package/dist/types/src/types.test.d.ts.map +0 -1
  58. package/src/components/DevtoolsMain.tsx +0 -15
  59. package/src/meta.tsx +0 -19
  60. package/src/types.test.ts +0 -13
  61. /package/dist/lib/browser/{DebugGlobal-H56M2VL4.mjs.map → DebugGlobal-ZTCBF3XR.mjs.map} +0 -0
  62. /package/dist/lib/browser/{chunk-RYK3J66D.mjs.map → chunk-6Y463JSP.mjs.map} +0 -0
@@ -1,31 +1,44 @@
1
1
  import {
2
2
  DebugAction,
3
3
  DebugContext
4
- } from "./chunk-RYK3J66D.mjs";
4
+ } from "./chunk-6Y463JSP.mjs";
5
5
  import {
6
6
  DEBUG_PLUGIN,
7
7
  meta_default
8
- } from "./chunk-WEGYHXMB.mjs";
8
+ } from "./chunk-2HTS7SNO.mjs";
9
9
 
10
- // packages/plugins/experimental/plugin-debug/src/DebugPlugin.tsx
11
- import { Bug, Hammer } from "@phosphor-icons/react";
10
+ // packages/plugins/plugin-debug/src/DebugPlugin.tsx
12
11
  import React5, { useEffect as useEffect3, useState as useState3 } from "react";
13
12
  import { getPlugin, parseGraphPlugin as parseGraphPlugin2, parseIntentPlugin, resolvePlugin } from "@dxos/app-framework";
14
13
  import { Timer } from "@dxos/async";
14
+ import { Devtools } from "@dxos/devtools";
15
15
  import { LocalStorageStore } from "@dxos/local-storage";
16
16
  import { createExtension, Graph } from "@dxos/plugin-graph";
17
17
  import { SpaceAction } from "@dxos/plugin-space";
18
18
  import { CollectionType } from "@dxos/plugin-space/types";
19
- import { SpaceState, isSpace } from "@dxos/react-client/echo";
19
+ import { SpaceState, isEchoObject, isSpace } from "@dxos/react-client/echo";
20
20
  import { Main } from "@dxos/react-ui";
21
- import { baseSurface, topbarBlockPaddingStart, fixedInsetFlexLayout, bottombarBlockPaddingEnd } from "@dxos/react-ui-theme";
21
+ import { baseSurface, bottombarBlockPaddingEnd, fixedInsetFlexLayout, topbarBlockPaddingStart } from "@dxos/react-ui-theme";
22
22
 
23
- // packages/plugins/experimental/plugin-debug/src/components/index.ts
24
- import React4 from "react";
23
+ // packages/plugins/plugin-debug/src/components/index.ts
24
+ import { lazy } from "react";
25
+
26
+ // packages/plugins/plugin-debug/src/components/DebugObjectPanel.tsx
27
+ import React from "react";
28
+ import { SyntaxHighlighter } from "@dxos/react-ui-syntax-highlighter";
29
+ var DebugObjectPanel = ({ object }) => {
30
+ return /* @__PURE__ */ React.createElement("div", {
31
+ role: "form",
32
+ className: "flex flex-col"
33
+ }, /* @__PURE__ */ React.createElement(SyntaxHighlighter, {
34
+ classNames: "flex text-xs",
35
+ language: "json"
36
+ }, JSON.stringify(object, null, 2)));
37
+ };
25
38
 
26
- // packages/plugins/experimental/plugin-debug/src/components/DebugSettings.tsx
39
+ // packages/plugins/plugin-debug/src/components/DebugSettings.tsx
27
40
  import { Gift, DownloadSimple, FirstAidKit } from "@phosphor-icons/react";
28
- import React, { useEffect, useState } from "react";
41
+ import React2, { useEffect, useState } from "react";
29
42
  import { parseFileManagerPlugin, useResolvePlugin } from "@dxos/app-framework";
30
43
  import { defs, SaveConfig, Storage } from "@dxos/config";
31
44
  import { log } from "@dxos/log";
@@ -34,7 +47,7 @@ import { useClient } from "@dxos/react-client";
34
47
  import { useTranslation, Button, Toast, Input, useFileDownload, Select } from "@dxos/react-ui";
35
48
  import { getSize, mx } from "@dxos/react-ui-theme";
36
49
  import { setDeep } from "@dxos/util";
37
- var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/experimental/plugin-debug/src/components/DebugSettings.tsx";
50
+ var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-debug/src/components/DebugSettings.tsx";
38
51
  var StorageAdapters = {
39
52
  opfs: defs.Runtime.Client.Storage.StorageDriver.WEBFS,
40
53
  idb: defs.Runtime.Client.Storage.StorageDriver.IDB
@@ -111,39 +124,39 @@ var DebugSettings = ({ settings }) => {
111
124
  });
112
125
  }
113
126
  };
114
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(SettingsValue, {
127
+ return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(SettingsValue, {
115
128
  label: t("settings show debug panel")
116
- }, /* @__PURE__ */ React.createElement(Input.Switch, {
129
+ }, /* @__PURE__ */ React2.createElement(Input.Switch, {
117
130
  checked: settings.debug,
118
131
  onCheckedChange: (checked) => settings.debug = !!checked
119
- })), /* @__PURE__ */ React.createElement(SettingsValue, {
132
+ })), /* @__PURE__ */ React2.createElement(SettingsValue, {
120
133
  label: t("settings show devtools panel")
121
- }, /* @__PURE__ */ React.createElement(Input.Switch, {
134
+ }, /* @__PURE__ */ React2.createElement(Input.Switch, {
122
135
  checked: settings.devtools,
123
136
  onCheckedChange: (checked) => settings.devtools = !!checked
124
- })), /* @__PURE__ */ React.createElement(SettingsValue, {
137
+ })), /* @__PURE__ */ React2.createElement(SettingsValue, {
125
138
  label: t("settings wireframe")
126
- }, /* @__PURE__ */ React.createElement(Input.Switch, {
139
+ }, /* @__PURE__ */ React2.createElement(Input.Switch, {
127
140
  checked: settings.wireframe,
128
141
  onCheckedChange: (checked) => settings.wireframe = !!checked
129
- })), /* @__PURE__ */ React.createElement(SettingsValue, {
142
+ })), /* @__PURE__ */ React2.createElement(SettingsValue, {
130
143
  label: t("settings download diagnostics")
131
- }, /* @__PURE__ */ React.createElement(Button, {
144
+ }, /* @__PURE__ */ React2.createElement(Button, {
132
145
  onClick: handleDownload
133
- }, /* @__PURE__ */ React.createElement(DownloadSimple, {
146
+ }, /* @__PURE__ */ React2.createElement(DownloadSimple, {
134
147
  className: getSize(5)
135
- }))), /* @__PURE__ */ React.createElement(SettingsValue, {
148
+ }))), /* @__PURE__ */ React2.createElement(SettingsValue, {
136
149
  label: t("settings repair")
137
- }, /* @__PURE__ */ React.createElement(Button, {
150
+ }, /* @__PURE__ */ React2.createElement(Button, {
138
151
  onClick: handleRepair
139
- }, /* @__PURE__ */ React.createElement(FirstAidKit, {
152
+ }, /* @__PURE__ */ React2.createElement(FirstAidKit, {
140
153
  className: getSize(5)
141
- }))), toast && /* @__PURE__ */ React.createElement(Toast.Root, null, /* @__PURE__ */ React.createElement(Toast.Body, null, /* @__PURE__ */ React.createElement(Toast.Title, null, /* @__PURE__ */ React.createElement(Gift, {
154
+ }))), toast && /* @__PURE__ */ React2.createElement(Toast.Root, null, /* @__PURE__ */ React2.createElement(Toast.Body, null, /* @__PURE__ */ React2.createElement(Toast.Title, null, /* @__PURE__ */ React2.createElement(Gift, {
142
155
  className: mx(getSize(5), "inline mr-1"),
143
156
  weight: "duotone"
144
- }), /* @__PURE__ */ React.createElement("span", null, toast.title)), toast.description && /* @__PURE__ */ React.createElement(Toast.Description, null, toast.description))), /* @__PURE__ */ React.createElement(SettingsValue, {
157
+ }), /* @__PURE__ */ React2.createElement("span", null, toast.title)), toast.description && /* @__PURE__ */ React2.createElement(Toast.Description, null, toast.description))), /* @__PURE__ */ React2.createElement(SettingsValue, {
145
158
  label: t("settings choose storage adaptor")
146
- }, /* @__PURE__ */ React.createElement(Select.Root, {
159
+ }, /* @__PURE__ */ React2.createElement(Select.Root, {
147
160
  value: Object.entries(StorageAdapters).find(([name, value]) => value === storageConfig?.runtime?.client?.storage?.dataStore)?.[0],
148
161
  onValueChange: (value) => {
149
162
  if (confirm(t("settings storage adapter changed alert"))) {
@@ -155,9 +168,9 @@ var DebugSettings = ({ settings }) => {
155
168
  ], StorageAdapters[value]);
156
169
  }
157
170
  }
158
- }, /* @__PURE__ */ React.createElement(Select.TriggerButton, {
171
+ }, /* @__PURE__ */ React2.createElement(Select.TriggerButton, {
159
172
  placeholder: t("settings data store label")
160
- }), /* @__PURE__ */ React.createElement(Select.Portal, null, /* @__PURE__ */ React.createElement(Select.Content, null, /* @__PURE__ */ React.createElement(Select.Viewport, null, Object.keys(StorageAdapters).map((key) => /* @__PURE__ */ React.createElement(Select.Option, {
173
+ }), /* @__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, {
161
174
  key,
162
175
  value: key
163
176
  }, t(`settings storage adaptor ${key} label`)))))))));
@@ -171,9 +184,8 @@ var updateConfig = (config, setConfig, path, value) => {
171
184
  });
172
185
  };
173
186
 
174
- // packages/plugins/experimental/plugin-debug/src/components/DebugStatus.tsx
175
- import { ChartBar, Circle, Lightning, LightningSlash } from "@phosphor-icons/react";
176
- import React2, { useEffect as useEffect2, useRef, useState as useState2 } from "react";
187
+ // packages/plugins/plugin-debug/src/components/DebugStatus.tsx
188
+ import React3, { useEffect as useEffect2, useRef, useState as useState2 } from "react";
177
189
  import { firstIdInPart, parseGraphPlugin, parseNavigationPlugin, useResolvePlugin as useResolvePlugin2 } from "@dxos/app-framework";
178
190
  import { TimeoutError } from "@dxos/async";
179
191
  import { StatsPanel, useStats } from "@dxos/devtools";
@@ -182,8 +194,9 @@ import { getActiveSpace } from "@dxos/plugin-space";
182
194
  import { StatusBar } from "@dxos/plugin-status-bar";
183
195
  import { ConnectionState } from "@dxos/protocols/proto/dxos/client/services";
184
196
  import { useNetworkStatus } from "@dxos/react-client/mesh";
185
- import { getSize as getSize2, mx as mx2 } from "@dxos/react-ui-theme";
186
- var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/plugins/experimental/plugin-debug/src/components/DebugStatus.tsx";
197
+ import { Icon } from "@dxos/react-ui";
198
+ import { mx as mx2 } from "@dxos/react-ui-theme";
199
+ var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-debug/src/components/DebugStatus.tsx";
187
200
  var styles = {
188
201
  success: "text-sky-300 dark:text-green-700",
189
202
  warning: "text-orange-300 dark:text-orange-600",
@@ -220,19 +233,20 @@ var ErrorIndicator = () => {
220
233
  forceUpdate({});
221
234
  };
222
235
  if (errorRef.current) {
223
- return /* @__PURE__ */ React2.createElement(StatusBar.Button, {
236
+ return /* @__PURE__ */ React3.createElement(StatusBar.Button, {
224
237
  title: errorRef.current.message,
225
238
  onClick: handleReset
226
- }, /* @__PURE__ */ React2.createElement(Circle, {
227
- weight: "fill",
228
- className: mx2(styles.error, getSize2(3))
239
+ }, /* @__PURE__ */ React3.createElement(Icon, {
240
+ icon: "ph--warning-circle--duotone",
241
+ size: 4,
242
+ classNames: styles.error
229
243
  }));
230
244
  } else {
231
- return /* @__PURE__ */ React2.createElement(StatusBar.Item, {
245
+ return /* @__PURE__ */ React3.createElement(StatusBar.Item, {
232
246
  title: "No errors."
233
- }, /* @__PURE__ */ React2.createElement(Circle, {
234
- weight: "fill",
235
- className: getSize2(3)
247
+ }, /* @__PURE__ */ React3.createElement(Icon, {
248
+ icon: "ph--check--regular",
249
+ size: 4
236
250
  }));
237
251
  }
238
252
  };
@@ -245,16 +259,19 @@ var SwarmIndicator = () => {
245
259
  swarm
246
260
  ]);
247
261
  if (state === 0) {
248
- return /* @__PURE__ */ React2.createElement(StatusBar.Item, {
262
+ return /* @__PURE__ */ React3.createElement(StatusBar.Item, {
249
263
  title: "Connected to swarm."
250
- }, /* @__PURE__ */ React2.createElement(Lightning, {
251
- className: getSize2(4)
264
+ }, /* @__PURE__ */ React3.createElement(Icon, {
265
+ icon: "ph--lightning--regular",
266
+ size: 4
252
267
  }));
253
268
  } else {
254
- return /* @__PURE__ */ React2.createElement(StatusBar.Item, {
269
+ return /* @__PURE__ */ React3.createElement(StatusBar.Item, {
255
270
  title: "Disconnected from swarm."
256
- }, /* @__PURE__ */ React2.createElement(LightningSlash, {
257
- className: mx2(styles.warning, getSize2(4))
271
+ }, /* @__PURE__ */ React3.createElement(Icon, {
272
+ icon: "ph--lightning-slash--regular",
273
+ size: 4,
274
+ classNames: styles.warning
258
275
  }));
259
276
  }
260
277
  };
@@ -267,92 +284,98 @@ var SavingIndicator = () => {
267
284
  const _space = location2 && graph ? getActiveSpace(graph, firstIdInPart(location2.active, "main")) : void 0;
268
285
  switch (state) {
269
286
  case 2:
270
- return /* @__PURE__ */ React2.createElement(StatusBar.Item, {
287
+ return /* @__PURE__ */ React3.createElement(StatusBar.Item, {
271
288
  title: "Edit not saved."
272
- }, /* @__PURE__ */ React2.createElement(Circle, {
273
- weight: "fill",
274
- className: mx2(styles.warning, getSize2(3))
289
+ }, /* @__PURE__ */ React3.createElement(Icon, {
290
+ icon: "ph--circle--duotone",
291
+ size: 4,
292
+ classNames: styles.warning
275
293
  }));
276
294
  case 1:
277
- return /* @__PURE__ */ React2.createElement(StatusBar.Item, {
295
+ return /* @__PURE__ */ React3.createElement(StatusBar.Item, {
278
296
  title: "Saving..."
279
- }, /* @__PURE__ */ React2.createElement(Circle, {
280
- weight: "fill",
281
- className: mx2(styles.success, getSize2(3))
297
+ }, /* @__PURE__ */ React3.createElement(Icon, {
298
+ icon: "ph--circle--duotone",
299
+ size: 4,
300
+ classNames: styles.success
282
301
  }));
283
302
  case 0:
284
303
  default:
285
- return /* @__PURE__ */ React2.createElement(StatusBar.Item, {
304
+ return /* @__PURE__ */ React3.createElement(StatusBar.Item, {
286
305
  title: "Modified indicator."
287
- }, /* @__PURE__ */ React2.createElement(Circle, {
288
- weight: "fill",
289
- className: getSize2(3)
306
+ }, /* @__PURE__ */ React3.createElement(Icon, {
307
+ icon: "ph--circle--duotone",
308
+ size: 4
290
309
  }));
291
310
  }
292
311
  };
293
312
  var PerformanceIndicator = () => {
294
313
  const [visible, setVisible] = useState2(false);
295
314
  const [stats, refreshStats] = useStats();
296
- return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(StatusBar.Button, {
315
+ return /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(StatusBar.Button, {
297
316
  onClick: () => setVisible((visible2) => !visible2),
298
317
  title: "Performance panels"
299
- }, /* @__PURE__ */ React2.createElement(ChartBar, null)), visible && /* @__PURE__ */ React2.createElement("div", {
300
- className: "z-20 absolute bottom-[24px] w-[450px] border-l border-y border-separator"
301
- }, /* @__PURE__ */ React2.createElement(StatsPanel, {
318
+ }, /* @__PURE__ */ React3.createElement(Icon, {
319
+ icon: "ph--chart-bar--regular",
320
+ size: 4
321
+ })), visible && /* @__PURE__ */ React3.createElement("div", {
322
+ className: mx2("z-20 absolute bottom-[--statusbar-size] right-2 w-[450px] max-h-[600px]", "overflow-x-hidden overflow-y-auto scrollbar-thin", "border-x border-y border-separator")
323
+ }, /* @__PURE__ */ React3.createElement(StatsPanel, {
302
324
  stats,
303
325
  onRefresh: refreshStats
304
326
  })));
305
327
  };
306
328
  var indicators = [
307
- PerformanceIndicator,
308
329
  SavingIndicator,
309
- ErrorIndicator,
310
- SwarmIndicator
330
+ SwarmIndicator,
331
+ PerformanceIndicator,
332
+ ErrorIndicator
311
333
  ];
312
334
  var DebugStatus = () => {
313
- return /* @__PURE__ */ React2.createElement(React2.Fragment, null, indicators.map((Indicator) => /* @__PURE__ */ React2.createElement(Indicator, {
335
+ return /* @__PURE__ */ React3.createElement(React3.Fragment, null, indicators.map((Indicator) => /* @__PURE__ */ React3.createElement(Indicator, {
314
336
  key: Indicator.name
315
337
  })));
316
338
  };
317
339
 
318
- // packages/plugins/experimental/plugin-debug/src/components/Wireframe.tsx
319
- import React3 from "react";
340
+ // packages/plugins/plugin-debug/src/components/Wireframe.tsx
341
+ import React4 from "react";
320
342
  import { useResizeDetector } from "react-resize-detector";
321
- import { createAttendableAttributes } from "@dxos/react-ui-attention";
343
+ import { fullyQualifiedId } from "@dxos/react-client/echo";
344
+ import { useAttendableAttributes } from "@dxos/react-ui-attention";
345
+ import { SyntaxHighlighter as SyntaxHighlighter2 } from "@dxos/react-ui-syntax-highlighter";
322
346
  import { mx as mx3 } from "@dxos/react-ui-theme";
323
- var Wireframe = ({ label, data, className }) => {
324
- const attendableAttrs = createAttendableAttributes(data);
347
+ var Wireframe = ({ classNames, label, object }) => {
348
+ const attendableAttrs = useAttendableAttributes(fullyQualifiedId(object));
325
349
  const { width, height, ref } = useResizeDetector();
326
- return /* @__PURE__ */ React3.createElement("div", {
350
+ return /* @__PURE__ */ React4.createElement("div", {
327
351
  ref,
328
- className: mx3("relative grow min-bs-96", className),
352
+ className: mx3("relative grow min-bs-96", classNames),
329
353
  ...attendableAttrs
330
- }, /* @__PURE__ */ React3.createElement("div", {
331
- className: "absolute inset-2 flex flex-col overflow-hidden font-mono"
332
- }, /* @__PURE__ */ React3.createElement("div", {
354
+ }, /* @__PURE__ */ React4.createElement("div", {
355
+ className: "absolute inset-2 flex flex-col gap-2 overflow-hidden font-mono"
356
+ }, /* @__PURE__ */ React4.createElement("div", {
333
357
  className: "flex justify-between"
334
- }, /* @__PURE__ */ React3.createElement("div", null, label), /* @__PURE__ */ React3.createElement("div", null, `[${width}x${height}]`)), /* @__PURE__ */ React3.createElement("div", {
335
- className: "flex grow overflow-auto"
336
- }, data && /* @__PURE__ */ React3.createElement("pre", {
337
- className: "text-neutral-500 text-sm whitespace-pre-line"
338
- }, JSON.stringify(data, void 0, 1)))), /* @__PURE__ */ React3.createElement("svg", {
358
+ }, /* @__PURE__ */ React4.createElement("div", null, label), /* @__PURE__ */ React4.createElement("div", null, `[${width}x${height}]`)), object && /* @__PURE__ */ React4.createElement(SyntaxHighlighter2, {
359
+ language: "json",
360
+ classNames: "flex w-full text-xs opacity-75 rounded"
361
+ }, JSON.stringify(object, void 0, 2))), /* @__PURE__ */ React4.createElement("svg", {
339
362
  width,
340
363
  height,
341
- className: "bg-transparent [&>*]:stroke-neutral-500"
342
- }, /* @__PURE__ */ React3.createElement("rect", {
364
+ className: "bg-transparent [&>*]:text-subdued"
365
+ }, /* @__PURE__ */ React4.createElement("rect", {
343
366
  x: 0,
344
367
  y: 0,
345
368
  width,
346
369
  height,
347
370
  strokeWidth: 1,
348
371
  fill: "none"
349
- }), /* @__PURE__ */ React3.createElement("line", {
372
+ }), /* @__PURE__ */ React4.createElement("line", {
350
373
  x1: 0,
351
374
  y1: 0,
352
375
  x2: width,
353
376
  y2: height,
354
377
  strokeWidth: 1
355
- }), /* @__PURE__ */ React3.createElement("line", {
378
+ }), /* @__PURE__ */ React4.createElement("line", {
356
379
  x1: 0,
357
380
  y1: height,
358
381
  x2: width,
@@ -361,12 +384,11 @@ var Wireframe = ({ label, data, className }) => {
361
384
  })));
362
385
  };
363
386
 
364
- // packages/plugins/experimental/plugin-debug/src/components/index.ts
365
- var DebugGlobal = React4.lazy(() => import("./DebugGlobal-H56M2VL4.mjs"));
366
- var DebugSpace = React4.lazy(() => import("./DebugSpace-NHPMLATA.mjs"));
367
- var DevtoolsMain = React4.lazy(() => import("./DevtoolsMain-RWT3FLJ6.mjs"));
387
+ // packages/plugins/plugin-debug/src/components/index.ts
388
+ var DebugGlobal = lazy(() => import("./DebugGlobal-ZTCBF3XR.mjs"));
389
+ var DebugSpace = lazy(() => import("./DebugSpace-FKZHQ75S.mjs"));
368
390
 
369
- // packages/plugins/experimental/plugin-debug/src/translations.ts
391
+ // packages/plugins/plugin-debug/src/translations.ts
370
392
  var translations_default = [
371
393
  {
372
394
  "en-US": {
@@ -397,7 +419,7 @@ var translations_default = [
397
419
  }
398
420
  ];
399
421
 
400
- // packages/plugins/experimental/plugin-debug/src/DebugPlugin.tsx
422
+ // packages/plugins/plugin-debug/src/DebugPlugin.tsx
401
423
  var SETTINGS_KEY = DEBUG_PLUGIN + "/settings";
402
424
  var DebugPlugin = () => {
403
425
  const settings = new LocalStorageStore(DEBUG_PLUGIN, {
@@ -483,8 +505,7 @@ var DebugPlugin = () => {
483
505
  ns: DEBUG_PLUGIN
484
506
  }
485
507
  ],
486
- icon: (props) => /* @__PURE__ */ React5.createElement(Hammer, props),
487
- iconSymbol: "ph--hammer--regular"
508
+ icon: "ph--hammer--regular"
488
509
  }
489
510
  }
490
511
  ]
@@ -507,8 +528,7 @@ var DebugPlugin = () => {
507
528
  ns: DEBUG_PLUGIN
508
529
  }
509
530
  ],
510
- icon: (props) => /* @__PURE__ */ React5.createElement(Bug, props),
511
- iconSymbol: "ph--bug--regular"
531
+ icon: "ph--bug--regular"
512
532
  }
513
533
  }
514
534
  ]
@@ -533,8 +553,7 @@ var DebugPlugin = () => {
533
553
  ns: DEBUG_PLUGIN
534
554
  }
535
555
  ],
536
- icon: (props) => /* @__PURE__ */ React5.createElement(Bug, props),
537
- iconSymbol: "ph--bug--regular"
556
+ icon: "ph--bug--regular"
538
557
  }
539
558
  }
540
559
  ];
@@ -574,12 +593,16 @@ var DebugPlugin = () => {
574
593
  }) : null;
575
594
  case "status":
576
595
  return /* @__PURE__ */ React5.createElement(DebugStatus, null);
596
+ case "complementary--debug":
597
+ return isEchoObject(data.subject) ? /* @__PURE__ */ React5.createElement(DebugObjectPanel, {
598
+ object: data.subject
599
+ }) : null;
577
600
  }
578
601
  const primary = data.active ?? data.object;
579
602
  let component;
580
603
  if (role === "main" || role === "article") {
581
604
  if (primary === "devtools" && settings.values.devtools) {
582
- component = /* @__PURE__ */ React5.createElement(DevtoolsMain, null);
605
+ component = /* @__PURE__ */ React5.createElement(Devtools, null);
583
606
  } else if (!primary || typeof primary !== "object" || !settings.values.debug) {
584
607
  component = null;
585
608
  } else if ("space" in primary && isSpace(primary.space)) {
@@ -614,12 +637,16 @@ var DebugPlugin = () => {
614
637
  if (settings.values.wireframe) {
615
638
  if (role === "main" || role === "article" || role === "section") {
616
639
  const primary2 = data.active ?? data.object;
617
- if (!(primary2 instanceof CollectionType)) {
618
- return /* @__PURE__ */ React5.createElement(Wireframe, {
619
- label: role,
620
- data,
621
- className: "row-span-2 overflow-hidden"
622
- });
640
+ const isCollection = primary2 instanceof CollectionType;
641
+ if (!isCollection) {
642
+ return {
643
+ disposition: "hoist",
644
+ node: /* @__PURE__ */ React5.createElement(Wireframe, {
645
+ label: `${role}:${name}`,
646
+ object: primary2,
647
+ classNames: "row-span-2 overflow-hidden"
648
+ })
649
+ };
623
650
  }
624
651
  }
625
652
  }
@@ -648,7 +675,7 @@ var DebugPlugin = () => {
648
675
  };
649
676
  };
650
677
 
651
- // packages/plugins/experimental/plugin-debug/src/index.ts
678
+ // packages/plugins/plugin-debug/src/index.ts
652
679
  var src_default = DebugPlugin;
653
680
  export {
654
681
  DebugPlugin,