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

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 (64) hide show
  1. package/dist/lib/browser/{DebugApp-HCHR6GKO.mjs → DebugApp-LQHFFK3Y.mjs} +4 -2
  2. package/dist/lib/browser/{DebugApp-HCHR6GKO.mjs.map → DebugApp-LQHFFK3Y.mjs.map} +3 -3
  3. package/dist/lib/browser/{DebugSpace-V3K3PQP6.mjs → DebugSpace-4JHYA7FG.mjs} +7 -5
  4. package/dist/lib/browser/{DebugSpace-V3K3PQP6.mjs.map → DebugSpace-4JHYA7FG.mjs.map} +3 -3
  5. package/dist/lib/browser/{SpaceGenerator-Y2NXBQVR.mjs → SpaceGenerator-NJCG57CU.mjs} +7 -5
  6. package/dist/lib/browser/{SpaceGenerator-Y2NXBQVR.mjs.map → SpaceGenerator-NJCG57CU.mjs.map} +3 -3
  7. package/dist/lib/browser/app-graph-builder-FXELWOFS.mjs +177 -0
  8. package/dist/lib/browser/app-graph-builder-FXELWOFS.mjs.map +7 -0
  9. package/dist/lib/browser/{chunk-CAENAAHY.mjs → chunk-I3ON45JK.mjs} +3 -3
  10. package/dist/lib/browser/chunk-I3ON45JK.mjs.map +7 -0
  11. package/dist/lib/browser/{chunk-6CGQHKET.mjs → chunk-P7GHHMDB.mjs} +1 -1
  12. package/dist/lib/browser/chunk-P7GHHMDB.mjs.map +7 -0
  13. package/dist/lib/browser/index.mjs +66 -712
  14. package/dist/lib/browser/index.mjs.map +4 -4
  15. package/dist/lib/browser/meta.json +1 -1
  16. package/dist/lib/browser/react-context-OZU6J7G3.mjs +37 -0
  17. package/dist/lib/browser/react-context-OZU6J7G3.mjs.map +7 -0
  18. package/dist/lib/browser/react-surface-5GNO6NWP.mjs +468 -0
  19. package/dist/lib/browser/react-surface-5GNO6NWP.mjs.map +7 -0
  20. package/dist/lib/browser/settings-JCZUA643.mjs +25 -0
  21. package/dist/lib/browser/settings-JCZUA643.mjs.map +7 -0
  22. package/dist/types/src/DebugPlugin.d.ts +1 -2
  23. package/dist/types/src/DebugPlugin.d.ts.map +1 -1
  24. package/dist/types/src/capabilities/app-graph-builder.d.ts +181 -0
  25. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
  26. package/dist/types/src/capabilities/index.d.ts +185 -0
  27. package/dist/types/src/capabilities/index.d.ts.map +1 -0
  28. package/dist/types/src/capabilities/react-context.d.ts +8 -0
  29. package/dist/types/src/capabilities/react-context.d.ts.map +1 -0
  30. package/dist/types/src/capabilities/react-surface.d.ts +4 -0
  31. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  32. package/dist/types/src/capabilities/settings.d.ts +4 -0
  33. package/dist/types/src/capabilities/settings.d.ts.map +1 -0
  34. package/dist/types/src/components/DebugStatus.d.ts.map +1 -1
  35. package/dist/types/src/index.d.ts +1 -2
  36. package/dist/types/src/index.d.ts.map +1 -1
  37. package/dist/types/src/meta.d.ts +1 -2
  38. package/dist/types/src/meta.d.ts.map +1 -1
  39. package/dist/types/src/types.d.ts +0 -3
  40. package/dist/types/src/types.d.ts.map +1 -1
  41. package/dist/types/tsconfig.tsbuildinfo +1 -1
  42. package/package.json +43 -51
  43. package/src/DebugPlugin.tsx +58 -345
  44. package/src/capabilities/app-graph-builder.ts +177 -0
  45. package/src/capabilities/index.ts +10 -0
  46. package/src/capabilities/react-context.tsx +38 -0
  47. package/src/capabilities/react-surface.tsx +138 -0
  48. package/src/capabilities/settings.ts +18 -0
  49. package/src/components/DebugApp/DebugApp.tsx +1 -1
  50. package/src/components/DebugSettings.tsx +4 -4
  51. package/src/components/DebugSpace/DebugSpace.tsx +1 -1
  52. package/src/components/DebugStatus.tsx +3 -9
  53. package/src/components/SpaceGenerator/ObjectGenerator.tsx +3 -3
  54. package/src/components/SpaceGenerator/SpaceGenerator.tsx +1 -1
  55. package/src/index.ts +1 -4
  56. package/src/meta.ts +1 -1
  57. package/src/types.ts +0 -13
  58. package/dist/lib/browser/chunk-6CGQHKET.mjs.map +0 -7
  59. package/dist/lib/browser/chunk-CAENAAHY.mjs.map +0 -7
  60. package/dist/lib/browser/meta.mjs +0 -9
  61. package/dist/lib/browser/meta.mjs.map +0 -7
  62. package/dist/types/src/components/DebugSurface.d.ts +0 -9
  63. package/dist/types/src/components/DebugSurface.d.ts.map +0 -1
  64. package/src/components/DebugSurface.tsx +0 -55
@@ -0,0 +1,468 @@
1
+ import {
2
+ DEBUG_PLUGIN
3
+ } from "./chunk-I3ON45JK.mjs";
4
+
5
+ // packages/plugins/plugin-debug/src/capabilities/react-surface.tsx
6
+ 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";
9
+ import { Graph } from "@dxos/plugin-graph";
10
+ import { SpaceAction, CollectionType } from "@dxos/plugin-space/types";
11
+ import { SpaceState, isSpace, isEchoObject } from "@dxos/react-client/echo";
12
+
13
+ // packages/plugins/plugin-debug/src/components/index.ts
14
+ import { lazy } from "react";
15
+
16
+ // packages/plugins/plugin-debug/src/components/DebugObjectPanel.tsx
17
+ import React from "react";
18
+ import { SyntaxHighlighter } from "@dxos/react-ui-syntax-highlighter";
19
+ var DebugObjectPanel = ({ object }) => {
20
+ return /* @__PURE__ */ React.createElement("div", {
21
+ className: "flex flex-col"
22
+ }, /* @__PURE__ */ React.createElement(SyntaxHighlighter, {
23
+ classNames: "flex text-xs",
24
+ language: "json"
25
+ }, JSON.stringify(object, null, 2)));
26
+ };
27
+
28
+ // packages/plugins/plugin-debug/src/components/DebugSettings.tsx
29
+ import { Gift, DownloadSimple, FirstAidKit } from "@phosphor-icons/react";
30
+ import React2, { useEffect, useState } from "react";
31
+ import { Capabilities, useCapabilities } from "@dxos/app-framework";
32
+ import { defs, SaveConfig, Storage } from "@dxos/config";
33
+ import { log } from "@dxos/log";
34
+ 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";
38
+ import { setDeep } from "@dxos/util";
39
+ var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-debug/src/components/DebugSettings.tsx";
40
+ var StorageAdapters = {
41
+ opfs: defs.Runtime.Client.Storage.StorageDriver.WEBFS,
42
+ idb: defs.Runtime.Client.Storage.StorageDriver.IDB
43
+ };
44
+ var DebugSettings = ({ settings }) => {
45
+ const { t } = useTranslation(DEBUG_PLUGIN);
46
+ const [toast, setToast] = useState();
47
+ const client = useClient();
48
+ const download = useFileDownload();
49
+ const [storageConfig, setStorageConfig] = useState({});
50
+ const [upload] = useCapabilities(Capabilities.FileUploader);
51
+ useEffect(() => {
52
+ void Storage().then((config) => setStorageConfig(config));
53
+ }, []);
54
+ const handleToast = (toast2) => {
55
+ setToast(toast2);
56
+ const t2 = setTimeout(() => setToast(void 0), 5e3);
57
+ return () => clearTimeout(t2);
58
+ };
59
+ const handleDownload = async () => {
60
+ const data = await client.diagnostics();
61
+ const file = new Blob([
62
+ JSON.stringify(data, void 0, 2)
63
+ ], {
64
+ type: "text/plain"
65
+ });
66
+ const fileName = `composer-${(/* @__PURE__ */ new Date()).toISOString().replace(/\W/g, "-")}.json`;
67
+ download(file, fileName);
68
+ if (upload) {
69
+ const info = await upload(new File([
70
+ file
71
+ ], fileName), client.spaces.default);
72
+ if (!info) {
73
+ log.error("diagnostics failed to upload to IPFS", void 0, {
74
+ F: __dxlog_file,
75
+ L: 58,
76
+ S: void 0,
77
+ C: (f, a) => f(...a)
78
+ });
79
+ return;
80
+ }
81
+ handleToast({
82
+ title: t("settings uploaded"),
83
+ description: t("settings uploaded to clipboard")
84
+ });
85
+ const url = client.config.values.runtime.services.ipfs.gateway + "/" + info.cid;
86
+ void navigator.clipboard.writeText(url);
87
+ handleToast({
88
+ title: t("settings uploaded"),
89
+ description: t("settings uploaded to clipboard")
90
+ });
91
+ log.info("diagnostics", {
92
+ url
93
+ }, {
94
+ F: __dxlog_file,
95
+ L: 67,
96
+ S: void 0,
97
+ C: (f, a) => f(...a)
98
+ });
99
+ }
100
+ };
101
+ const handleRepair = async () => {
102
+ try {
103
+ const info = await client.repair();
104
+ setStorageConfig(await Storage());
105
+ handleToast({
106
+ title: t("settings repair success"),
107
+ description: JSON.stringify(info, void 0, 2)
108
+ });
109
+ } catch (err) {
110
+ handleToast({
111
+ title: t("settings repair failed"),
112
+ description: err.message
113
+ });
114
+ }
115
+ };
116
+ return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(DeprecatedFormInput, {
117
+ label: t("settings show debug panel")
118
+ }, /* @__PURE__ */ React2.createElement(Input.Switch, {
119
+ checked: settings.debug,
120
+ 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
+ })), /* @__PURE__ */ React2.createElement(DeprecatedFormInput, {
127
+ label: t("settings wireframe")
128
+ }, /* @__PURE__ */ React2.createElement(Input.Switch, {
129
+ checked: settings.wireframe,
130
+ onCheckedChange: (checked) => settings.wireframe = !!checked
131
+ })), /* @__PURE__ */ React2.createElement(DeprecatedFormInput, {
132
+ label: t("settings download diagnostics")
133
+ }, /* @__PURE__ */ React2.createElement(Button, {
134
+ onClick: handleDownload
135
+ }, /* @__PURE__ */ React2.createElement(DownloadSimple, {
136
+ className: getSize(5)
137
+ }))), /* @__PURE__ */ React2.createElement(DeprecatedFormInput, {
138
+ label: t("settings repair")
139
+ }, /* @__PURE__ */ React2.createElement(Button, {
140
+ 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"
146
+ }), /* @__PURE__ */ React2.createElement("span", null, toast.title)), toast.description && /* @__PURE__ */ React2.createElement(Toast.Description, null, toast.description))), /* @__PURE__ */ React2.createElement(DeprecatedFormInput, {
147
+ label: t("settings choose storage adaptor")
148
+ }, /* @__PURE__ */ React2.createElement(Select.Root, {
149
+ value: Object.entries(StorageAdapters).find(([name2, value]) => value === storageConfig?.runtime?.client?.storage?.dataStore)?.[0],
150
+ onValueChange: (value) => {
151
+ if (confirm(t("settings storage adapter changed alert"))) {
152
+ updateConfig(storageConfig, setStorageConfig, [
153
+ "runtime",
154
+ "client",
155
+ "storage",
156
+ "dataStore"
157
+ ], StorageAdapters[value]);
158
+ }
159
+ }
160
+ }, /* @__PURE__ */ React2.createElement(Select.TriggerButton, {
161
+ placeholder: t("settings data store label")
162
+ }), /* @__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, {
163
+ key,
164
+ value: key
165
+ }, t(`settings storage adaptor ${key} label`)))))))));
166
+ };
167
+ var updateConfig = (config, setConfig, path, value) => {
168
+ const storageConfigCopy = JSON.parse(JSON.stringify(config ?? {}));
169
+ setDeep(storageConfigCopy, path, value);
170
+ setConfig(storageConfigCopy);
171
+ queueMicrotask(async () => {
172
+ await SaveConfig(storageConfigCopy);
173
+ });
174
+ };
175
+
176
+ // packages/plugins/plugin-debug/src/components/DebugStatus.tsx
177
+ import React3, { useEffect as useEffect2, useRef, useState as useState2 } from "react";
178
+ import { Capabilities as Capabilities2, firstIdInPart, useCapability } from "@dxos/app-framework";
179
+ import { TimeoutError } from "@dxos/async";
180
+ import { StatsPanel, useStats } from "@dxos/devtools";
181
+ import { getActiveSpace } from "@dxos/plugin-space";
182
+ import { StatusBar } from "@dxos/plugin-status-bar";
183
+ import { ConnectionState } from "@dxos/protocols/proto/dxos/client/services";
184
+ import { useNetworkStatus } from "@dxos/react-client/mesh";
185
+ import { Icon } from "@dxos/react-ui";
186
+ import { mx as mx2 } from "@dxos/react-ui-theme";
187
+ var styles = {
188
+ success: "text-sky-300 dark:text-green-700",
189
+ warning: "text-orange-300 dark:text-orange-600",
190
+ error: "text-red-300 dark:text-red-600"
191
+ };
192
+ var ErrorIndicator = () => {
193
+ const [, forceUpdate] = useState2({});
194
+ const errorRef = useRef();
195
+ useEffect2(() => {
196
+ const errorListener = (event) => {
197
+ const error = event.error ?? event.reason;
198
+ if (errorRef.current !== error) {
199
+ errorRef.current = error;
200
+ forceUpdate({});
201
+ }
202
+ };
203
+ window.addEventListener("error", errorListener);
204
+ window.addEventListener("unhandledrejection", errorListener);
205
+ return () => {
206
+ window.removeEventListener("error", errorListener);
207
+ window.removeEventListener("unhandledrejection", errorListener);
208
+ };
209
+ }, []);
210
+ const handleReset = () => {
211
+ errorRef.current = void 0;
212
+ forceUpdate({});
213
+ };
214
+ if (errorRef.current) {
215
+ return /* @__PURE__ */ React3.createElement(StatusBar.Button, {
216
+ title: errorRef.current.message,
217
+ onClick: handleReset
218
+ }, /* @__PURE__ */ React3.createElement(Icon, {
219
+ icon: "ph--warning-circle--duotone",
220
+ size: 4,
221
+ classNames: styles.error
222
+ }));
223
+ } else {
224
+ return /* @__PURE__ */ React3.createElement(StatusBar.Item, {
225
+ title: "No errors."
226
+ }, /* @__PURE__ */ React3.createElement(Icon, {
227
+ icon: "ph--check--regular",
228
+ size: 4
229
+ }));
230
+ }
231
+ };
232
+ var SwarmIndicator = () => {
233
+ const [state, setState] = useState2(0);
234
+ const { swarm } = useNetworkStatus();
235
+ useEffect2(() => {
236
+ setState(swarm === ConnectionState.ONLINE ? 0 : 1);
237
+ }, [
238
+ swarm
239
+ ]);
240
+ if (state === 0) {
241
+ return /* @__PURE__ */ React3.createElement(StatusBar.Item, {
242
+ title: "Connected to swarm."
243
+ }, /* @__PURE__ */ React3.createElement(Icon, {
244
+ icon: "ph--lightning--regular",
245
+ size: 4
246
+ }));
247
+ } else {
248
+ return /* @__PURE__ */ React3.createElement(StatusBar.Item, {
249
+ title: "Disconnected from swarm."
250
+ }, /* @__PURE__ */ React3.createElement(Icon, {
251
+ icon: "ph--lightning-slash--regular",
252
+ size: 4,
253
+ classNames: styles.warning
254
+ }));
255
+ }
256
+ };
257
+ var SavingIndicator = () => {
258
+ 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;
262
+ switch (state) {
263
+ case 2:
264
+ return /* @__PURE__ */ React3.createElement(StatusBar.Item, {
265
+ title: "Edit not saved."
266
+ }, /* @__PURE__ */ React3.createElement(Icon, {
267
+ icon: "ph--circle--duotone",
268
+ size: 4,
269
+ classNames: styles.warning
270
+ }));
271
+ case 1:
272
+ return /* @__PURE__ */ React3.createElement(StatusBar.Item, {
273
+ title: "Saving..."
274
+ }, /* @__PURE__ */ React3.createElement(Icon, {
275
+ icon: "ph--circle--duotone",
276
+ size: 4,
277
+ classNames: styles.success
278
+ }));
279
+ case 0:
280
+ default:
281
+ return /* @__PURE__ */ React3.createElement(StatusBar.Item, {
282
+ title: "Modified indicator."
283
+ }, /* @__PURE__ */ React3.createElement(Icon, {
284
+ icon: "ph--circle--duotone",
285
+ size: 4
286
+ }));
287
+ }
288
+ };
289
+ var PerformanceIndicator = () => {
290
+ const [visible, setVisible] = useState2(false);
291
+ const [stats, refreshStats] = useStats();
292
+ return /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(StatusBar.Button, {
293
+ onClick: () => setVisible((visible2) => !visible2),
294
+ title: "Performance panels"
295
+ }, /* @__PURE__ */ React3.createElement(Icon, {
296
+ icon: "ph--chart-bar--regular",
297
+ 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")
300
+ }, /* @__PURE__ */ React3.createElement(StatsPanel, {
301
+ stats,
302
+ onRefresh: refreshStats
303
+ })));
304
+ };
305
+ var indicators = [
306
+ SavingIndicator,
307
+ SwarmIndicator,
308
+ PerformanceIndicator,
309
+ ErrorIndicator
310
+ ];
311
+ var DebugStatus = () => {
312
+ return /* @__PURE__ */ React3.createElement(React3.Fragment, null, indicators.map((Indicator) => /* @__PURE__ */ React3.createElement(Indicator, {
313
+ key: Indicator.name
314
+ })));
315
+ };
316
+
317
+ // packages/plugins/plugin-debug/src/components/Wireframe.tsx
318
+ import React4 from "react";
319
+ import { useResizeDetector } from "react-resize-detector";
320
+ import { fullyQualifiedId } from "@dxos/react-client/echo";
321
+ import { useAttendableAttributes } from "@dxos/react-ui-attention";
322
+ import { SyntaxHighlighter as SyntaxHighlighter2 } from "@dxos/react-ui-syntax-highlighter";
323
+ import { mx as mx3 } from "@dxos/react-ui-theme";
324
+ var Wireframe = ({ classNames, label, object }) => {
325
+ const attendableAttrs = useAttendableAttributes(fullyQualifiedId(object));
326
+ const { width, height, ref } = useResizeDetector();
327
+ return /* @__PURE__ */ React4.createElement("div", {
328
+ ref,
329
+ className: mx3("relative grow min-bs-96", classNames),
330
+ ...attendableAttrs
331
+ }, /* @__PURE__ */ React4.createElement("div", {
332
+ className: "absolute inset-2 flex flex-col gap-2 overflow-hidden font-mono"
333
+ }, /* @__PURE__ */ React4.createElement("div", {
334
+ className: "flex justify-between"
335
+ }, /* @__PURE__ */ React4.createElement("div", null, label), /* @__PURE__ */ React4.createElement("div", null, `[${width}x${height}]`)), object && /* @__PURE__ */ React4.createElement(SyntaxHighlighter2, {
336
+ language: "json",
337
+ classNames: "flex w-full text-xs opacity-75 rounded"
338
+ }, JSON.stringify(object, void 0, 2))), /* @__PURE__ */ React4.createElement("svg", {
339
+ width,
340
+ height,
341
+ className: "bg-transparent [&>*]:text-subdued"
342
+ }, /* @__PURE__ */ React4.createElement("rect", {
343
+ x: 0,
344
+ y: 0,
345
+ width,
346
+ height,
347
+ strokeWidth: 1,
348
+ fill: "none"
349
+ }), /* @__PURE__ */ React4.createElement("line", {
350
+ x1: 0,
351
+ y1: 0,
352
+ x2: width,
353
+ y2: height,
354
+ strokeWidth: 1
355
+ }), /* @__PURE__ */ React4.createElement("line", {
356
+ x1: 0,
357
+ y1: height,
358
+ x2: width,
359
+ y2: 0,
360
+ strokeWidth: 1
361
+ })));
362
+ };
363
+
364
+ // packages/plugins/plugin-debug/src/components/index.ts
365
+ var DebugApp = lazy(() => import("./DebugApp-LQHFFK3Y.mjs"));
366
+ var DebugSpace = lazy(() => import("./DebugSpace-4JHYA7FG.mjs"));
367
+ var SpaceGenerator = lazy(() => import("./SpaceGenerator-NJCG57CU.mjs"));
368
+
369
+ // 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, [
373
+ createSurface({
374
+ 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
+ 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)
405
+ }),
406
+ createSurface({
407
+ id: `${DEBUG_PLUGIN}/space`,
408
+ role: "article",
409
+ filter: (data) => isSpaceDebug(data.subject),
410
+ component: ({ data }) => {
411
+ const handleCreateObject = useCallback((objects) => {
412
+ if (!isSpace(data.subject.space)) {
413
+ return;
414
+ }
415
+ const collection = data.subject.space.state.get() === SpaceState.SPACE_READY && data.subject.space.properties[CollectionType.typename]?.target;
416
+ if (!(collection instanceof CollectionType)) {
417
+ return;
418
+ }
419
+ const { dispatchPromise: dispatch } = context.requestCapability(Capabilities3.IntentDispatcher);
420
+ objects.forEach((object) => {
421
+ void dispatch(createIntent(SpaceAction.AddObject, {
422
+ target: collection,
423
+ object
424
+ }));
425
+ });
426
+ }, [
427
+ data.subject.space
428
+ ]);
429
+ const deprecated = false;
430
+ return deprecated ? /* @__PURE__ */ React5.createElement(DebugSpace, {
431
+ space: data.subject.space,
432
+ onAddObjects: handleCreateObject
433
+ }) : /* @__PURE__ */ React5.createElement(SpaceGenerator, {
434
+ space: data.subject.space,
435
+ onCreateObjects: handleCreateObject
436
+ });
437
+ }
438
+ }),
439
+ createSurface({
440
+ id: `${DEBUG_PLUGIN}/graph`,
441
+ role: "article",
442
+ filter: (data) => isGraphDebug(data.subject),
443
+ component: ({ data }) => /* @__PURE__ */ React5.createElement(DebugApp, {
444
+ graph: data.subject.graph
445
+ })
446
+ }),
447
+ createSurface({
448
+ id: `${DEBUG_PLUGIN}/wireframe`,
449
+ role: [
450
+ "article",
451
+ "section"
452
+ ],
453
+ disposition: "hoist",
454
+ filter: (data) => {
455
+ const settings = context.requestCapability(Capabilities3.SettingsStore).getStore(DEBUG_PLUGIN).value;
456
+ return isEchoObject(data.subject) && !!settings.wireframe;
457
+ },
458
+ component: ({ data, role }) => /* @__PURE__ */ React5.createElement(Wireframe, {
459
+ label: `${role}:${name}`,
460
+ object: data.subject,
461
+ classNames: "row-span-2 overflow-hidden"
462
+ })
463
+ })
464
+ ]);
465
+ export {
466
+ react_surface_default as default
467
+ };
468
+ //# sourceMappingURL=react-surface-5GNO6NWP.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/react-surface.tsx", "../../../src/components/index.ts", "../../../src/components/DebugObjectPanel.tsx", "../../../src/components/DebugSettings.tsx", "../../../src/components/DebugStatus.tsx", "../../../src/components/Wireframe.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useCallback } from 'react';\n\nimport {\n Capabilities,\n contributes,\n createIntent,\n createSurface,\n useCapability,\n type PluginsContext,\n} from '@dxos/app-framework';\nimport { Devtools } from '@dxos/devtools';\nimport { Graph } from '@dxos/plugin-graph';\nimport { SpaceAction, CollectionType } from '@dxos/plugin-space/types';\nimport {\n SpaceState,\n isSpace,\n isEchoObject,\n type ReactiveEchoObject,\n type ReactiveObject,\n type Space,\n} from '@dxos/react-client/echo';\n\nimport {\n DebugApp,\n DebugObjectPanel,\n DebugSettings,\n DebugSpace,\n DebugStatus,\n SpaceGenerator,\n Wireframe,\n} from '../components';\nimport { DEBUG_PLUGIN } from '../meta';\nimport { type DebugSettingsProps } from '../types';\n\ntype SpaceDebug = {\n type: string;\n space: Space;\n};\n\ntype GraphDebug = {\n graph: Graph;\n};\n\nconst isSpaceDebug = (data: any): data is SpaceDebug => data.type === `${DEBUG_PLUGIN}/space` && isSpace(data.space);\nconst isGraphDebug = (data: any): data is GraphDebug => data.graph instanceof Graph;\n\nexport default (context: PluginsContext) =>\n contributes(Capabilities.ReactSurface, [\n createSurface({\n id: `${DEBUG_PLUGIN}/settings`,\n role: 'settings',\n filter: (data): data is any => data.subject === DEBUG_PLUGIN,\n component: () => {\n const settings = useCapability(Capabilities.SettingsStore).getStore<DebugSettingsProps>(DEBUG_PLUGIN)!.value;\n return <DebugSettings settings={settings} />;\n },\n }),\n createSurface({\n id: `${DEBUG_PLUGIN}/status`,\n role: 'status',\n component: () => <DebugStatus />,\n }),\n createSurface({\n id: `${DEBUG_PLUGIN}/complementary`,\n role: 'complementary--debug',\n filter: (data): data is { subject: ReactiveEchoObject<any> } => isEchoObject(data.subject),\n component: ({ data }) => <DebugObjectPanel object={data.subject} />,\n }),\n createSurface({\n id: `${DEBUG_PLUGIN}/devtools`,\n role: 'article',\n filter: (data): data is any => {\n const settings = context\n .requestCapability(Capabilities.SettingsStore)\n .getStore<DebugSettingsProps>(DEBUG_PLUGIN)!.value;\n return data.subject === 'devtools' && !!settings.devtools;\n },\n component: () => <Devtools />,\n }),\n createSurface({\n id: `${DEBUG_PLUGIN}/space`,\n role: 'article',\n filter: (data): data is { subject: SpaceDebug } => isSpaceDebug(data.subject),\n component: ({ data }) => {\n const handleCreateObject = useCallback(\n (objects: ReactiveObject<any>[]) => {\n if (!isSpace(data.subject.space)) {\n return;\n }\n\n const collection =\n data.subject.space.state.get() === SpaceState.SPACE_READY &&\n data.subject.space.properties[CollectionType.typename]?.target;\n if (!(collection instanceof CollectionType)) {\n return;\n }\n\n const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);\n objects.forEach((object) => {\n void dispatch(createIntent(SpaceAction.AddObject, { target: collection, object }));\n });\n },\n [data.subject.space],\n );\n\n const deprecated = false;\n return deprecated ? (\n <DebugSpace space={data.subject.space} onAddObjects={handleCreateObject} />\n ) : (\n <SpaceGenerator space={data.subject.space} onCreateObjects={handleCreateObject} />\n );\n },\n }),\n createSurface({\n id: `${DEBUG_PLUGIN}/graph`,\n role: 'article',\n filter: (data): data is { subject: GraphDebug } => isGraphDebug(data.subject),\n component: ({ data }) => <DebugApp graph={data.subject.graph} />,\n }),\n createSurface({\n id: `${DEBUG_PLUGIN}/wireframe`,\n role: ['article', 'section'],\n disposition: 'hoist',\n filter: (data): data is { subject: ReactiveEchoObject<any> } => {\n const settings = context\n .requestCapability(Capabilities.SettingsStore)\n .getStore<DebugSettingsProps>(DEBUG_PLUGIN)!.value;\n return isEchoObject(data.subject) && !!settings.wireframe;\n },\n component: ({ data, role }) => (\n <Wireframe label={`${role}:${name}`} object={data.subject} classNames='row-span-2 overflow-hidden' />\n ),\n }),\n ]);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { lazy } from 'react';\n\nexport const DebugApp = lazy(() => import('./DebugApp'));\nexport const DebugSpace = lazy(() => import('./DebugSpace'));\nexport const SpaceGenerator = lazy(() => import('./SpaceGenerator'));\n\nexport * from './DebugObjectPanel';\nexport * from './DebugSettings';\nexport * from './DebugStatus';\nexport * from './Wireframe';\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type ReactiveEchoObject } from '@dxos/client/echo';\nimport { SyntaxHighlighter } from '@dxos/react-ui-syntax-highlighter';\n\nexport type DebugObjectPanelProps = {\n object: ReactiveEchoObject<any>;\n};\n\n// TODO(burdon): Get schema and traverse references.\nexport const DebugObjectPanel = ({ object }: DebugObjectPanelProps) => {\n return (\n <div className='flex flex-col'>\n <SyntaxHighlighter classNames='flex text-xs' language='json'>\n {JSON.stringify(object, null, 2)}\n </SyntaxHighlighter>\n </div>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Gift, DownloadSimple, FirstAidKit } from '@phosphor-icons/react';\nimport React, { useEffect, useState } from 'react';\n\nimport { Capabilities, useCapabilities } from '@dxos/app-framework';\nimport { type ConfigProto, defs, SaveConfig, Storage } from '@dxos/config';\nimport { log } from '@dxos/log';\nimport { useClient } from '@dxos/react-client';\nimport { useTranslation, Button, Toast, Input, useFileDownload, Select } from '@dxos/react-ui';\nimport { DeprecatedFormInput } from '@dxos/react-ui-form';\nimport { getSize, mx } from '@dxos/react-ui-theme';\nimport { setDeep } from '@dxos/util';\n\nimport { DEBUG_PLUGIN } from '../meta';\nimport { type DebugSettingsProps } from '../types';\n\ntype Toast = {\n title: string;\n description?: string;\n};\n\nconst StorageAdapters = {\n opfs: defs.Runtime.Client.Storage.StorageDriver.WEBFS,\n idb: defs.Runtime.Client.Storage.StorageDriver.IDB,\n} as const;\n\nexport const DebugSettings = ({ settings }: { settings: DebugSettingsProps }) => {\n const { t } = useTranslation(DEBUG_PLUGIN);\n const [toast, setToast] = useState<Toast>();\n const client = useClient();\n const download = useFileDownload();\n // TODO(mykola): Get updates from other places that change Config.\n const [storageConfig, setStorageConfig] = useState<ConfigProto>({});\n const [upload] = useCapabilities(Capabilities.FileUploader);\n\n useEffect(() => {\n void Storage().then((config) => setStorageConfig(config));\n }, []);\n\n const handleToast = (toast: Toast) => {\n setToast(toast);\n const t = setTimeout(() => setToast(undefined), 5_000);\n return () => clearTimeout(t);\n };\n\n const handleDownload = async () => {\n const data = await client.diagnostics();\n const file = new Blob([JSON.stringify(data, undefined, 2)], { type: 'text/plain' });\n const fileName = `composer-${new Date().toISOString().replace(/\\W/g, '-')}.json`;\n download(file, fileName);\n\n if (upload) {\n const info = await upload(new File([file], fileName), client.spaces.default);\n if (!info) {\n log.error('diagnostics failed to upload to IPFS');\n return;\n }\n handleToast({ title: t('settings uploaded'), description: t('settings uploaded to clipboard') });\n\n // TODO(nf): move to IpfsPlugin?\n const url = client.config.values.runtime!.services!.ipfs!.gateway + '/' + info.cid;\n void navigator.clipboard.writeText(url);\n handleToast({ title: t('settings uploaded'), description: t('settings uploaded to clipboard') });\n log.info('diagnostics', { url });\n }\n };\n\n const handleRepair = async () => {\n try {\n const info = await client.repair();\n setStorageConfig(await Storage());\n handleToast({ title: t('settings repair success'), description: JSON.stringify(info, undefined, 2) });\n } catch (err: any) {\n handleToast({ title: t('settings repair failed'), description: err.message });\n }\n };\n\n return (\n <>\n <DeprecatedFormInput label={t('settings show debug panel')}>\n <Input.Switch checked={settings.debug} onCheckedChange={(checked) => (settings.debug = !!checked)} />\n </DeprecatedFormInput>\n <DeprecatedFormInput label={t('settings show devtools panel')}>\n <Input.Switch checked={settings.devtools} onCheckedChange={(checked) => (settings.devtools = !!checked)} />\n </DeprecatedFormInput>\n <DeprecatedFormInput label={t('settings wireframe')}>\n <Input.Switch checked={settings.wireframe} onCheckedChange={(checked) => (settings.wireframe = !!checked)} />\n </DeprecatedFormInput>\n <DeprecatedFormInput label={t('settings download diagnostics')}>\n <Button onClick={handleDownload}>\n <DownloadSimple className={getSize(5)} />\n </Button>\n </DeprecatedFormInput>\n <DeprecatedFormInput label={t('settings repair')}>\n <Button onClick={handleRepair}>\n <FirstAidKit className={getSize(5)} />\n </Button>\n </DeprecatedFormInput>\n\n {/* TODO(burdon): Move to layout? */}\n {toast && (\n <Toast.Root>\n <Toast.Body>\n <Toast.Title>\n <Gift className={mx(getSize(5), 'inline mr-1')} weight='duotone' />\n <span>{toast.title}</span>\n </Toast.Title>\n {toast.description && <Toast.Description>{toast.description}</Toast.Description>}\n </Toast.Body>\n </Toast.Root>\n )}\n\n <DeprecatedFormInput label={t('settings choose storage adaptor')}>\n <Select.Root\n value={\n Object.entries(StorageAdapters).find(\n ([name, value]) => value === storageConfig?.runtime?.client?.storage?.dataStore,\n )?.[0]\n }\n onValueChange={(value) => {\n if (confirm(t('settings storage adapter changed alert'))) {\n updateConfig(\n storageConfig,\n setStorageConfig,\n ['runtime', 'client', 'storage', 'dataStore'],\n StorageAdapters[value as keyof typeof StorageAdapters],\n );\n }\n }}\n >\n <Select.TriggerButton placeholder={t('settings data store label')} />\n <Select.Portal>\n <Select.Content>\n <Select.Viewport>\n {Object.keys(StorageAdapters).map((key) => (\n <Select.Option key={key} value={key}>\n {t(`settings storage adaptor ${key} label`)}\n </Select.Option>\n ))}\n </Select.Viewport>\n </Select.Content>\n </Select.Portal>\n </Select.Root>\n </DeprecatedFormInput>\n </>\n );\n};\n\nconst updateConfig = (config: ConfigProto, setConfig: (newConfig: ConfigProto) => void, path: string[], value: any) => {\n const storageConfigCopy = JSON.parse(JSON.stringify(config ?? {}));\n setDeep(storageConfigCopy, path, value);\n setConfig(storageConfigCopy);\n queueMicrotask(async () => {\n await SaveConfig(storageConfigCopy);\n });\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useEffect, useRef, useState } from 'react';\n\nimport { Capabilities, firstIdInPart, useCapability } from '@dxos/app-framework';\nimport { TimeoutError } from '@dxos/async';\nimport { StatsPanel, useStats } from '@dxos/devtools';\nimport { getActiveSpace } from '@dxos/plugin-space';\nimport { StatusBar } from '@dxos/plugin-status-bar';\nimport { ConnectionState } from '@dxos/protocols/proto/dxos/client/services';\nimport { useNetworkStatus } from '@dxos/react-client/mesh';\nimport { Icon } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nconst styles = {\n success: 'text-sky-300 dark:text-green-700',\n warning: 'text-orange-300 dark:text-orange-600',\n error: 'text-red-300 dark:text-red-600',\n};\n\n// TODO(burdon): Move out of debug plugin.\n// TODO(burdon): Make pluggable (move indicators to relevant plugins).\n// TODO(burdon): Vault heartbeat indicator (global scope)?\n\n/**\n * Ensure light doesn't flicker immediately after start.\n */\n// TODO(burdon): Move to @dxos/async (debounce?)\nconst _timer = (cb: (err?: Error) => void, options?: { min?: number; max?: number }) => {\n const min = options?.min ?? 500;\n let start: number;\n let pending: NodeJS.Timeout;\n let timeout: NodeJS.Timeout;\n return {\n start: () => {\n start = Date.now();\n clearTimeout(pending);\n if (options?.max) {\n clearTimeout(timeout);\n timeout = setTimeout(() => {\n cb(new TimeoutError(options.max));\n }, options.max);\n }\n },\n stop: () => {\n clearTimeout(timeout);\n const delta = Date.now() - start;\n if (delta < min) {\n pending = setTimeout(() => {\n cb();\n }, min - delta);\n }\n },\n };\n};\n\n/**\n * Global error handler.\n */\n// TODO(burdon): Integrate with Sentry?\nconst ErrorIndicator = () => {\n const [, forceUpdate] = useState({});\n const errorRef = useRef<Error>();\n useEffect(() => {\n const errorListener = (event: any) => {\n const error: Error = event.error ?? event.reason;\n if (errorRef.current !== error) {\n errorRef.current = error;\n forceUpdate({});\n }\n };\n\n // TODO(burdon): Register globally?\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/error_event\n window.addEventListener('error', errorListener);\n\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/unhandledrejection_event\n window.addEventListener('unhandledrejection', errorListener);\n\n return () => {\n window.removeEventListener('error', errorListener);\n window.removeEventListener('unhandledrejection', errorListener);\n };\n }, []);\n\n const handleReset = () => {\n errorRef.current = undefined;\n forceUpdate({});\n };\n\n if (errorRef.current) {\n return (\n <StatusBar.Button title={errorRef.current.message} onClick={handleReset}>\n <Icon icon='ph--warning-circle--duotone' size={4} classNames={styles.error} />\n </StatusBar.Button>\n );\n } else {\n return (\n <StatusBar.Item title='No errors.'>\n <Icon icon='ph--check--regular' size={4} />\n </StatusBar.Item>\n );\n }\n};\n\n/**\n * Swarm connection handler.\n */\nconst SwarmIndicator = () => {\n const [state, setState] = useState(0);\n const { swarm } = useNetworkStatus();\n useEffect(() => {\n setState(swarm === ConnectionState.ONLINE ? 0 : 1);\n }, [swarm]);\n\n if (state === 0) {\n return (\n <StatusBar.Item title='Connected to swarm.'>\n <Icon icon='ph--lightning--regular' size={4} />\n </StatusBar.Item>\n );\n } else {\n return (\n <StatusBar.Item title='Disconnected from swarm.'>\n <Icon icon='ph--lightning-slash--regular' size={4} classNames={styles.warning} />\n </StatusBar.Item>\n );\n }\n};\n\n/**\n * Data saving indicator.\n */\n// TODO(burdon): Merge with SaveStatus.\nconst SavingIndicator = () => {\n const [state, _setState] = useState(0);\n const location = useCapability(Capabilities.Location);\n const { graph } = useCapability(Capabilities.AppGraph);\n const _space = location && graph ? getActiveSpace(graph, firstIdInPart(location.active, 'main')) : undefined;\n // TODO(dmaretskyi): Fix this when we have save status for automerge.\n // useEffect(() => {\n // if (!space) {\n // return;\n // }\n // const { start, stop } = timer(() => setState(0), { min: 250 });\n // return space.db.pendingBatch.on(({ duration, error }) => {\n // if (error) {\n // setState(2);\n // stop();\n // } else if (duration === undefined) {\n // setState(1);\n // start();\n // } else {\n // stop();\n // }\n // });\n // }, [space]);\n\n switch (state) {\n case 2:\n return (\n <StatusBar.Item title='Edit not saved.'>\n <Icon icon='ph--circle--duotone' size={4} classNames={styles.warning} />\n </StatusBar.Item>\n );\n case 1:\n return (\n <StatusBar.Item title='Saving...'>\n <Icon icon='ph--circle--duotone' size={4} classNames={styles.success} />\n </StatusBar.Item>\n );\n case 0:\n default:\n return (\n <StatusBar.Item title='Modified indicator.'>\n <Icon icon='ph--circle--duotone' size={4} />\n </StatusBar.Item>\n );\n }\n};\n\nconst PerformanceIndicator = () => {\n const [visible, setVisible] = useState(false);\n const [stats, refreshStats] = useStats();\n\n return (\n <>\n <StatusBar.Button onClick={() => setVisible((visible) => !visible)} title='Performance panels'>\n <Icon icon='ph--chart-bar--regular' size={4} />\n </StatusBar.Button>\n {visible && (\n <div\n className={mx(\n 'z-20 absolute bottom-[--statusbar-size] right-4 w-[450px]',\n 'overflow-x-hidden overflow-y-auto scrollbar-thin',\n 'border-x border-y border-separator',\n )}\n >\n <StatsPanel stats={stats} onRefresh={refreshStats} />\n </div>\n )}\n </>\n );\n};\n\nconst indicators = [SavingIndicator, SwarmIndicator, PerformanceIndicator, ErrorIndicator];\n\nexport const DebugStatus = () => {\n return (\n <>\n {indicators.map((Indicator) => (\n <Indicator key={Indicator.name} />\n ))}\n </>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\nimport { useResizeDetector } from 'react-resize-detector';\n\nimport { fullyQualifiedId, type ReactiveEchoObject } from '@dxos/react-client/echo';\nimport { type ThemedClassName } from '@dxos/react-ui';\nimport { useAttendableAttributes } from '@dxos/react-ui-attention';\nimport { SyntaxHighlighter } from '@dxos/react-ui-syntax-highlighter';\nimport { mx } from '@dxos/react-ui-theme';\n\n// TODO(burdon): Create generic container with wireframe mode.\nexport type WireframeProps = ThemedClassName<{\n label?: string;\n object: ReactiveEchoObject<any>;\n}>;\n\n// TODO(burdon): Make focusable and attendable with input.\nexport const Wireframe = ({ classNames, label, object }: WireframeProps) => {\n const attendableAttrs = useAttendableAttributes(fullyQualifiedId(object));\n const { width, height, ref } = useResizeDetector();\n return (\n <div ref={ref} className={mx('relative grow min-bs-96', classNames)} {...attendableAttrs}>\n <div className='absolute inset-2 flex flex-col gap-2 overflow-hidden font-mono'>\n <div className='flex justify-between'>\n <div>{label}</div>\n <div>{`[${width}x${height}]`}</div>\n </div>\n {object && (\n <SyntaxHighlighter language='json' classNames='flex w-full text-xs opacity-75 rounded'>\n {JSON.stringify(object, undefined, 2)}\n </SyntaxHighlighter>\n )}\n </div>\n <svg width={width} height={height} className='bg-transparent [&>*]:text-subdued'>\n <rect x={0} y={0} width={width} height={height} strokeWidth={1} fill='none' />\n <line x1={0} y1={0} x2={width} y2={height} strokeWidth={1} />\n <line x1={0} y1={height} x2={width} y2={0} strokeWidth={1} />\n </svg>\n </div>\n );\n};\n"],
5
+ "mappings": ";;;;;AAIA,OAAOA,UAASC,mBAAmB;AAEnC,SACEC,gBAAAA,eACAC,aACAC,cACAC,eACAC,iBAAAA,sBAEK;AACP,SAASC,gBAAgB;AACzB,SAASC,aAAa;AACtB,SAASC,aAAaC,sBAAsB;AAC5C,SACEC,YACAC,SACAC,oBAIK;;;ACpBP,SAASC,YAAY;;;ACArB,OAAOC,WAAW;AAGlB,SAASC,yBAAyB;AAO3B,IAAMC,mBAAmB,CAAC,EAAEC,OAAM,MAAyB;AAChE,SACE,sBAAA,cAACC,OAAAA;IAAIC,WAAU;KACb,sBAAA,cAACC,mBAAAA;IAAkBC,YAAW;IAAeC,UAAS;KACnDC,KAAKC,UAAUP,QAAQ,MAAM,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6B,YAAAA;QAAWhD,OAAOJ,KAAKgB,QAAQZ;QAAOiD,cAAcrB;WAErD,gBAAAT,OAAA,cAAC+B,gBAAAA;QAAelD,OAAOJ,KAAKgB,QAAQZ;QAAOmD,iBAAiBvB;;IAEhE;EACF,CAAA;EACApB,cAAc;IACZC,IAAI,GAAGX,YAAAA;IACPY,MAAM;IACNC,QAAQ,CAACf,SAA0CK,aAAaL,KAAKgB,OAAO;IAC5EC,WAAW,CAAC,EAAEjB,KAAI,MAAO,gBAAAuB,OAAA,cAACiC,UAAAA;MAASlD,OAAON,KAAKgB,QAAQV;;EACzD,CAAA;EACAM,cAAc;IACZC,IAAI,GAAGX,YAAAA;IACPY,MAAM;MAAC;MAAW;;IAClB2C,aAAa;IACb1C,QAAQ,CAACf,SAAAA;AACP,YAAMkB,WAAWV,QACdqB,kBAAkBnB,cAAaU,aAAa,EAC5CC,SAA6BnB,YAAAA,EAAeoB;AAC/C,aAAOI,aAAa1B,KAAKgB,OAAO,KAAK,CAAC,CAACE,SAASwC;IAClD;IACAzC,WAAW,CAAC,EAAEjB,MAAMc,KAAI,MACtB,gBAAAS,OAAA,cAACoC,WAAAA;MAAUC,OAAO,GAAG9C,IAAAA,IAAQ+C,IAAAA;MAAQjC,QAAQ5B,KAAKgB;MAAS8C,YAAW;;EAE1E,CAAA;CACD;",
6
+ "names": ["React", "useCallback", "Capabilities", "contributes", "createIntent", "createSurface", "useCapability", "Devtools", "Graph", "SpaceAction", "CollectionType", "SpaceState", "isSpace", "isEchoObject", "lazy", "React", "SyntaxHighlighter", "DebugObjectPanel", "object", "div", "className", "SyntaxHighlighter", "classNames", "language", "JSON", "stringify", "Gift", "DownloadSimple", "FirstAidKit", "React", "useEffect", "useState", "Capabilities", "useCapabilities", "defs", "SaveConfig", "Storage", "log", "useClient", "useTranslation", "Button", "Toast", "Input", "useFileDownload", "Select", "DeprecatedFormInput", "getSize", "mx", "setDeep", "StorageAdapters", "opfs", "defs", "Runtime", "Client", "Storage", "StorageDriver", "WEBFS", "idb", "IDB", "DebugSettings", "settings", "t", "useTranslation", "DEBUG_PLUGIN", "toast", "setToast", "useState", "client", "useClient", "download", "useFileDownload", "storageConfig", "setStorageConfig", "upload", "useCapabilities", "Capabilities", "FileUploader", "useEffect", "then", "config", "handleToast", "setTimeout", "undefined", "clearTimeout", "handleDownload", "data", "diagnostics", "file", "Blob", "JSON", "stringify", "type", "fileName", "Date", "toISOString", "replace", "info", "File", "spaces", "default", "log", "error", "title", "description", "url", "values", "runtime", "services", "ipfs", "gateway", "cid", "navigator", "clipboard", "writeText", "handleRepair", "repair", "err", "message", "React", "DeprecatedFormInput", "label", "Input", "Switch", "checked", "debug", "onCheckedChange", "devtools", "wireframe", "Button", "onClick", "DownloadSimple", "className", "getSize", "FirstAidKit", "Toast", "Root", "Body", "Title", "Gift", "mx", "weight", "span", "Description", "Select", "value", "Object", "entries", "find", "name", "storage", "dataStore", "onValueChange", "confirm", "updateConfig", "TriggerButton", "placeholder", "Portal", "Content", "Viewport", "keys", "map", "key", "Option", "setConfig", "path", "storageConfigCopy", "parse", "setDeep", "queueMicrotask", "SaveConfig", "React", "useEffect", "useRef", "useState", "Capabilities", "firstIdInPart", "useCapability", "TimeoutError", "StatsPanel", "useStats", "getActiveSpace", "StatusBar", "ConnectionState", "useNetworkStatus", "Icon", "mx", "styles", "success", "warning", "error", "ErrorIndicator", "forceUpdate", "useState", "errorRef", "useRef", "useEffect", "errorListener", "event", "error", "reason", "current", "window", "addEventListener", "removeEventListener", "handleReset", "undefined", "React", "StatusBar", "Button", "title", "message", "onClick", "Icon", "icon", "size", "classNames", "styles", "Item", "SwarmIndicator", "state", "setState", "swarm", "useNetworkStatus", "ConnectionState", "ONLINE", "warning", "SavingIndicator", "_setState", "location", "useCapability", "Capabilities", "Location", "graph", "AppGraph", "_space", "getActiveSpace", "firstIdInPart", "active", "success", "PerformanceIndicator", "visible", "setVisible", "stats", "refreshStats", "useStats", "div", "className", "mx", "StatsPanel", "onRefresh", "indicators", "DebugStatus", "map", "Indicator", "key", "name", "React", "useResizeDetector", "fullyQualifiedId", "useAttendableAttributes", "SyntaxHighlighter", "mx", "Wireframe", "classNames", "label", "object", "attendableAttrs", "useAttendableAttributes", "fullyQualifiedId", "width", "height", "ref", "useResizeDetector", "React", "div", "className", "mx", "SyntaxHighlighter", "language", "JSON", "stringify", "undefined", "svg", "rect", "x", "y", "strokeWidth", "fill", "line", "x1", "y1", "x2", "y2", "DebugApp", "lazy", "DebugSpace", "SpaceGenerator", "isSpaceDebug", "data", "type", "DEBUG_PLUGIN", "isSpace", "space", "isGraphDebug", "graph", "Graph", "context", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "role", "filter", "subject", "component", "settings", "useCapability", "SettingsStore", "getStore", "value", "React", "DebugSettings", "DebugStatus", "isEchoObject", "DebugObjectPanel", "object", "requestCapability", "devtools", "Devtools", "handleCreateObject", "useCallback", "objects", "collection", "state", "get", "SpaceState", "SPACE_READY", "properties", "CollectionType", "typename", "target", "dispatchPromise", "dispatch", "IntentDispatcher", "forEach", "createIntent", "SpaceAction", "AddObject", "deprecated", "DebugSpace", "onAddObjects", "SpaceGenerator", "onCreateObjects", "DebugApp", "disposition", "wireframe", "Wireframe", "label", "name", "classNames"]
7
+ }
@@ -0,0 +1,25 @@
1
+ import {
2
+ DebugSettingsSchema
3
+ } from "./chunk-P7GHHMDB.mjs";
4
+ import {
5
+ DEBUG_PLUGIN
6
+ } from "./chunk-I3ON45JK.mjs";
7
+
8
+ // packages/plugins/plugin-debug/src/capabilities/settings.ts
9
+ import { Capabilities, contributes } from "@dxos/app-framework";
10
+ import { create } from "@dxos/react-client/echo";
11
+ var settings_default = () => {
12
+ const settings = create({
13
+ debug: true,
14
+ devtools: true
15
+ });
16
+ return contributes(Capabilities.Settings, {
17
+ schema: DebugSettingsSchema,
18
+ prefix: DEBUG_PLUGIN,
19
+ value: settings
20
+ });
21
+ };
22
+ export {
23
+ settings_default as default
24
+ };
25
+ //# sourceMappingURL=settings-JCZUA643.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/settings.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, contributes } from '@dxos/app-framework';\nimport { create } from '@dxos/react-client/echo';\n\nimport { DEBUG_PLUGIN } from '../meta';\nimport { type DebugSettingsProps, DebugSettingsSchema } from '../types';\n\nexport default () => {\n const settings = create<DebugSettingsProps>({\n debug: true,\n devtools: true,\n });\n\n return contributes(Capabilities.Settings, { schema: DebugSettingsSchema, prefix: DEBUG_PLUGIN, value: settings });\n};\n"],
5
+ "mappings": ";;;;;;;;AAIA,SAASA,cAAcC,mBAAmB;AAC1C,SAASC,cAAc;AAKvB,IAAA,mBAAe,MAAA;AACb,QAAMC,WAAWC,OAA2B;IAC1CC,OAAO;IACPC,UAAU;EACZ,CAAA;AAEA,SAAOC,YAAYC,aAAaC,UAAU;IAAEC,QAAQC;IAAqBC,QAAQC;IAAcC,OAAOX;EAAS,CAAA;AACjH;",
6
+ "names": ["Capabilities", "contributes", "create", "settings", "create", "debug", "devtools", "contributes", "Capabilities", "Settings", "schema", "DebugSettingsSchema", "prefix", "DEBUG_PLUGIN", "value"]
7
+ }
@@ -1,3 +1,2 @@
1
- import { type DebugPluginProvides } from './types';
2
- export declare const DebugPlugin: () => import("@dxos/app-framework").PluginDefinition<DebugPluginProvides>;
1
+ export declare const DebugPlugin: () => import("@dxos/app-framework").Plugin;
3
2
  //# sourceMappingURL=DebugPlugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DebugPlugin.d.ts","sourceRoot":"","sources":["../../../src/DebugPlugin.tsx"],"names":[],"mappings":"AA+CA,OAAO,EAAgB,KAAK,mBAAmB,EAAgD,MAAM,SAAS,CAAC;AAc/G,eAAO,MAAM,WAAW,2EAsStB,CAAC"}
1
+ {"version":3,"file":"DebugPlugin.d.ts","sourceRoot":"","sources":["../../../src/DebugPlugin.tsx"],"names":[],"mappings":"AAYA,eAAO,MAAM,WAAW,4CAwCvB,CAAC"}